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/6804.3b90d7d6.async.js

1414 lines
2.2 MiB

(self.webpackChunk=self.webpackChunk||[]).push([[6804],{87169:function(fn,Bn,Ft){"use strict";Ft.d(Bn,{Z:function(){return Fe}});var pt=Ft(72308),Ht=Ft(59301),ve={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z"}},{tag:"path",attrs:{d:"M464 688a48 48 0 1096 0 48 48 0 10-96 0zm24-112h48c4.4 0 8-3.6 8-8V296c0-4.4-3.6-8-8-8h-48c-4.4 0-8 3.6-8 8v272c0 4.4 3.6 8 8 8z"}}]},name:"exclamation-circle",theme:"outlined"},Me=ve,Pe=Ft(7657),Ae=function(de,he){return Ht.createElement(Pe.Z,(0,pt.Z)({},de,{ref:he,icon:Me}))},ee=Ht.forwardRef(Ae),Fe=ee},12893:function(fn,Bn,Ft){"use strict";Ft.d(Bn,{Z:function(){return Fe}});var pt=Ft(72308),Ht=Ft(59301),ve={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M696 480H328c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8h368c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8z"}},{tag:"path",attrs:{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z"}}]},name:"minus-circle",theme:"outlined"},Me=ve,Pe=Ft(7657),Ae=function(de,he){return Ht.createElement(Pe.Z,(0,pt.Z)({},de,{ref:he,icon:Me}))},ee=Ht.forwardRef(Ae),Fe=ee},32134:function(fn,Bn,Ft){"use strict";Ft.d(Bn,{Z:function(){return Fe}});var pt=Ft(72308),Ht=Ft(59301),ve={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M696 480H544V328c0-4.4-3.6-8-8-8h-48c-4.4 0-8 3.6-8 8v152H328c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8h152v152c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8V544h152c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8z"}},{tag:"path",attrs:{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z"}}]},name:"plus-circle",theme:"outlined"},Me=ve,Pe=Ft(7657),Ae=function(de,he){return Ht.createElement(Pe.Z,(0,pt.Z)({},de,{ref:he,icon:Me}))},ee=Ht.forwardRef(Ae),Fe=ee},37036:function(){"use strict"},88010:function(fn,Bn){"use strict";Bn.Z={lists:"lists___xhHyq",item:"item___pWJAA",children:"children___sDG61",diamond:"diamond___FwgzD",button:"button___WPN6r",mathWrap:"mathWrap___FmnMJ",mathFillWrap:"mathFillWrap___PmY3H"}},43809:function(fn,Bn){"use strict";Bn.Z={wrap:"wrap___ilWvf",deleteIcon:"deleteIcon___JBDG8",keywordTag:"keywordTag___iieCb",questionTitleEditorWrap:"questionTitleEditorWrap___MHB5s",choiceListWrap:"choiceListWrap___jB8b1",choiceWrap:"choiceWrap___QFkTc",choiceIndex:"choiceIndex___Mr2YO",judgementIndex:"judgementIndex___fUVWK",setAnswerBtn:"setAnswerBtn___Whox5",activeAnswer:"activeAnswer___fGU6Y",activeJudgementAnswer:"activeJudgementAnswer___wJv8P",actionWrapper:"actionWrapper___ERQ7k",addIcon:"addIcon___L9TE0",inputBorder:"inputBorder___Q5tRE",placeholder:"placeholder___p9sFY",blankInputNumberWrapper:"blankInputNumberWrapper___uEHb0",addBtn:"addBtn___WR5ZI",blankIndex:"blankIndex___x9Pny",baseInputWrapper:"baseInputWrapper___eVsG7",collapseWrapper:"collapseWrapper___ZTysU",panelHeader:"panelHeader___QSN9g",open:"open___B6FU9",close:"close___QX19r",hide:"hide___mn25n"}},7761:function(fn,Bn){"use strict";Bn.Z={flex_box_center:"flex_box_center___ycN2f",flex_space_between:"flex_space_between___LcS9e",flex_box_vertical_center:"flex_box_vertical_center___uwjPm",flex_box_center_end:"flex_box_center_end___Pc903",flex_box_column:"flex_box_column___AXEdv",bg:"bg___fm2Cw",title:"title___J3MCU",editIcon:"editIcon___i4Zll",titleLeft:"titleLeft___da61c",titleRight:"titleRight___EsdL6",formWrap:"formWrap___YTxC3",baseLineHeight:"baseLineHeight___TprCB",radioBtnWrapper:"radioBtnWrapper___Mt_XG",radiogroup:"radiogroup___EvkWh",easy:"easy___mSxtg",medium:"medium___NIaWN",hard:"hard___mddnD",baseFormItem:"baseFormItem___csbyb",cascaderPopup:"cascaderPopup___BttnF",selectdiv:"selectdiv___TAr4i",divitem:"divitem___iaXB2",bottmodiv:"bottmodiv___bmp6p",cancelBtn:"cancelBtn___Q4ZcL",confirmBtn:"confirmBtn___nRiCD",concat:"concat___jlPR1"}},84287:function(fn,Bn,Ft){"use strict";var pt=Ft(59301),Ht=Object.defineProperty,ve=Object.getOwnPropertySymbols,Me=Object.prototype.hasOwnProperty,Pe=Object.prototype.propertyIsEnumerable,Ae=(ye,de,he)=>de in ye?Ht(ye,de,{enumerable:!0,configurable:!0,writable:!0,value:he}):ye[de]=he,ee=(ye,de)=>{for(var he in de||(de={}))Me.call(de,he)&&Ae(ye,he,de[he]);if(ve)for(var he of ve(de))Pe.call(de,he)&&Ae(ye,he,de[he]);return ye};const Fe=ye=>React.createElement("svg",ee({className:"jiangxu_svg__icon",viewBox:"0 0 1024 1024",xmlns:"http://www.w3.org/2000/svg",width:32,height:32},ye),React.createElement("path",{d:"M365.714 73.143H1024v73.143H365.714zm0 292.571H1024v73.143H365.714zm0 292.572H1024v73.143H365.714zm0 292.571H1024V1024H365.714v-73.143z",fill:"#98BDF7"}),React.createElement("path",{d:"m248.686 803.182-65.829 75.922V658.286h-73.143v220.818l-65.828-75.995L0 851.383 146.286 1024 292.57 851.53z",fill:"#145DFF"}),React.createElement("path",{d:"M146.286 0 0 158.72l43.886 55.223 65.828-75.922v227.693h73.143V138.021l65.829 75.922 43.885-55.223z",fill:"#98BDF7"}));Bn.Z="data:image/svg+xml;base64,PHN2ZyBjbGFzcz0iaWNvbiIgdmlld0JveD0iMCAwIDEwMjQgMTAyNCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB3aWR0aD0iMzIiIGhlaWdodD0iMzIiPjxwYXRoIGQ9Ik0zNjUuNzE0IDczLjE0M0gxMDI0djczLjE0M0gzNjUuNzE0em0wIDI5Mi41NzFIMTAyNHY3My4xNDNIMzY1LjcxNHptMCAyOTIuNTcySDEwMjR2NzMuMTQzSDM2NS43MTR6bTAgMjkyLjU3MUgxMDI0VjEwMjRIMzY1LjcxNHYtNzMuMTQzeiIgZmlsbD0iIzk4QkRGNyIvPjxwYXRoIGQ9Im0yNDguNjg2IDgwMy4xODItNjUuODI5IDc1LjkyMlY2NTguMjg2aC03My4xNDN2MjIwLjgxOGwtNjUuODI4LTc1Ljk5NUwwIDg1MS4zODMgMTQ2LjI4NiAxMDI0IDI5Mi41NyA4NTEuNTN6IiBmaWxsPSIjMTQ1REZGIi8+PHBhdGggZD0iTTE0Ni4yODYgMCAwIDE1OC43Mmw0My44ODYgNTUuMjIzIDY1LjgyOC03NS45MjJ2MjI3LjY5M2g3My4xNDNWMTM4LjAyMWw2NS44MjkgNzUuOTIyIDQzLjg4NS01NS4yMjN6IiBmaWxsPSIjOThCREY3Ii8+PC9zdmc+"},86087:function(fn,Bn,Ft){"use strict";var pt=Ft(59301),Ht=Object.defineProperty,ve=Object.getOwnPropertySymbols,Me=Object.prototype.hasOwnProperty,Pe=Object.prototype.propertyIsEnumerable,Ae=(ye,de,he)=>de in ye?Ht(ye,de,{enumerable:!0,configurable:!0,writable:!0,value:he}):ye[de]=he,ee=(ye,de)=>{for(var he in de||(de={}))Me.call(de,he)&&Ae(ye,he,de[he]);if(ve)for(var he of ve(de))Pe.call(de,he)&&Ae(ye,he,de[he]);return ye};const Fe=ye=>React.createElement("svg",ee({className:"shengxu_svg__icon",viewBox:"0 0 1024 1024",xmlns:"http://www.w3.org/2000/svg",width:32,height:32},ye),React.createElement("path",{d:"M365.714 73.143H1024v73.143H365.714zm0 292.571H1024v73.143H365.714zm0 292.572H1024v73.143H365.714zm0 292.571H1024V1024H365.714v-73.143zM248.686 803.182l-65.829 75.922V658.286h-73.143v220.818l-65.828-75.995L0 851.383 146.286 1024 292.57 851.53z",fill:"#98BDF7"}),React.createElement("path",{d:"M146.286 0 0 158.72l43.886 55.223 65.828-75.922v227.693h73.143V138.021l65.829 75.922 43.885-55.223z",fill:"#145DFF"}));Bn.Z="data:image/svg+xml;base64,PHN2ZyBjbGFzcz0iaWNvbiIgdmlld0JveD0iMCAwIDEwMjQgMTAyNCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB3aWR0aD0iMzIiIGhlaWdodD0iMzIiPjxwYXRoIGQ9Ik0zNjUuNzE0IDczLjE0M0gxMDI0djczLjE0M0gzNjUuNzE0em0wIDI5Mi41NzFIMTAyNHY3My4xNDNIMzY1LjcxNHptMCAyOTIuNTcySDEwMjR2NzMuMTQzSDM2NS43MTR6bTAgMjkyLjU3MUgxMDI0VjEwMjRIMzY1LjcxNHYtNzMuMTQzek0yNDguNjg2IDgwMy4xODJsLTY1LjgyOSA3NS45MjJWNjU4LjI4NmgtNzMuMTQzdjIyMC44MThsLTY1LjgyOC03NS45OTVMMCA4NTEuMzgzIDE0Ni4yODYgMTAyNCAyOTIuNTcgODUxLjUzeiIgZmlsbD0iIzk4QkRGNyIvPjxwYXRoIGQ9Ik0xNDYuMjg2IDAgMCAxNTguNzJsNDMuODg2IDU1LjIyMyA2NS44MjgtNzUuOTIydjIyNy42OTNoNzMuMTQzVjEzOC4wMjFsNjUuODI5IDc1LjkyMiA0My44ODUtNTUuMjIzeiIgZmlsbD0iIzE0NURGRiIvPjwvc3ZnPg=="},74413:function(){"use strict";function fn(kt,nt,et,ht){et===void 0&&(et=0),ht===void 0&&(ht=1/0),this._name=kt,this._defaultValue=nt,this._minimum=et,this._maximum=ht}Object.defineProperty(fn.prototype,"name",{get:function(){return this._name},set:function(kt){if(typeof kt!="string"||kt==="")throw new Error("Shape name must be a valid string.");this._name=kt}}),Object.defineProperty(fn.prototype,"defaultValue",{get:function(){return this._defaultValue},set:function(kt){if(typeof kt!="number"||isNaN(kt))throw new Error("The default value must be a real number, not: "+kt);this._defaultValue=kt}}),Object.defineProperty(fn.prototype,"minimum",{get:function(){return this._minimum},set:function(kt){if(typeof kt!="number"||isNaN(kt))throw new Error("Minimum must be a real number, not: "+kt);this._minimum=kt}}),Object.defineProperty(fn.prototype,"maximum",{get:function(){return this._maximum},set:function(kt){if(typeof kt!="number"||isNaN(kt))throw new Error("Maximum must be a real number, not: "+kt);this._maximum=kt}}),go.Shape._FigureParameters={},go.Shape.getFigureParameter=function(kt,nt){var et=go.Shape._FigureParameters[kt];return et?et[nt]:null},go.Shape.setFigureParameter=function(kt,nt,et){if(!(et instanceof fn))throw new Error("Third argument to Shape.setFigureParameter is not FigureParameter: "+et);if(et.defaultValue<et.minimum||et.defaultValue>et.maximum)throw new Error("defaultValue must be between minimum and maximum, not: "+et.defaultValue);var ht=go.Shape._FigureParameters[kt];ht||(ht=[],go.Shape._FigureParameters[kt]=ht),ht[nt]=et};var Bn=[];function Ft(kt,nt){var et=Bn.pop();return et===void 0?new go.Point(kt,nt):(et.x=kt,et.y=nt,et)}function pt(){var kt=Bn.pop();return kt===void 0?new go.Point:kt}function Ht(kt){Bn.push(kt)}function ve(kt,nt,et,ht,lt,gt,yt,Lt,Dt){Dt||(Dt=new go.Point);var zt=kt-et,Xt=lt-yt,re=NaN,le=NaN;if(zt===0)if(Xt===0)kt===et&&(re=kt,le=nt);else{var ae=(gt-Lt)/Xt,je=gt-ae*lt;re=kt,le=ae*re+je}else if(Xt===0){var ne=(nt-ht)/zt,Le=nt-ne*kt;re=lt,le=ne*re+Le}else{var ne=(nt-ht)/zt,ae=(gt-Lt)/Xt,Le=nt-ne*kt,je=gt-ae*lt;re=(je-Le)/(ne-ae),le=ne*re+Le}return Dt.x=re,Dt.y=le,Dt}function Me(kt,nt,et,ht,lt,gt,yt,Lt,Dt,zt,Xt,re,le,ae){var je=1-Dt,ne=Dt,Le=kt*je+et*ne,ue=nt*je+ht*ne,Ee=et*je+lt*ne,ge=ht*je+gt*ne,Ue=lt*je+yt*ne,nn=gt*je+Lt*ne,_e=Le*je+Ee*ne,qt=ue*je+ge*ne,Jt=Ee*je+Ue*ne,De=ge*je+nn*ne,sn=_e*je+Jt*ne,cn=qt*je+De*ne;zt.x=Le,zt.y=ue,Xt.x=_e,Xt.y=qt,re.x=sn,re.y=cn,le.x=Jt,le.y=De,ae.x=Ue,ae.y=nn}var Pe=new go.Spot(.156,.156),Ae=new go.Spot(.844,.844),ee=4*((Math.sqrt(2)-1)/3);go.Shape.setFigureParameter("RoundedRectangle",0,new fn("CornerRounding",5)),go.Shape.defineFigureGenerator("RoundedRectangle",function(kt,nt,et){var ht=kt?kt.parameter1:NaN;(isNaN(ht)||ht<0)&&(ht=5),ht=Math.min(ht,nt/3),ht=Math.min(ht,et/3);var lt=ht*ee,gt=new go.Geometry().add(new go.PathFigure(ht,0,!0).add(new go.PathSegment(go.PathSegment.Line,nt-ht,0)).add(new go.PathSegment(go.PathSegment.Bezier,nt,ht,nt-lt,0,nt,lt)).add(new go.PathSegment(go.PathSegment.Line,nt,et-ht)).add(new go.PathSegment(go.PathSegment.Bezier,nt-ht,et,nt,et-lt,nt-lt,et)).add(new go.PathSegment(go.PathSegment.Line,ht,et)).add(new go.PathSegment(go.PathSegment.Bezier,0,et-ht,lt,et,0,et-lt)).add(new go.PathSegment(go.PathSegment.Line,0,ht)).add(new go.PathSegment(go.PathSegment.Bezier,ht,0,0,lt,lt,0).close()));return lt>1&&(gt.spot1=new go.Spot(0,0,lt,lt),gt.spot2=new go.Spot(1,1,-lt,-lt)),gt}),go.Shape.defineFigureGenerator("Border","RoundedRectangle"),go.Shape.defineFigureGenerator("TriangleRight",function(kt,nt,et){return new go.Geometry().add(new go.PathFigure(0,0).add(new go.PathSegment(go.PathSegment.Line,nt,.5*et)).add(new go.PathSegment(go.PathSegment.Line,0,et).close())).setSpots(0,.25,.5,.75)}),go.Shape.defineFigureGenerator("TriangleDown",function(kt,nt,et){return new go.Geometry().add(new go.PathFigure(0,0).add(new go.PathSegment(go.PathSegment.Line,nt,0)).add(new go.PathSegment(go.PathSegment.Line,.5*nt,et).close())).setSpots(.25,0,.75,.5)}),go.Shape.defineFigureGenerator("TriangleLeft",function(kt,nt,et){return new go.Geometry().add(new go.PathFigure(nt,et).add(new go.PathSegment(go.PathSegment.Line,0,.5*et)).add(new go.PathSegment(go.PathSegment.Line,nt,0).close())).setSpots(.5,.25,1,.75)}),go.Shape.defineFigureGenerator("TriangleUp",function(kt,nt,et){return new go.Geometry().add(new go.PathFigure(nt,et).add(new go.PathSegment(go.PathSegment.Line,0,et)).add(new go.PathSegment(go.PathSegment.Line,.5*nt,0).close())).setSpots(.25,.5,.75,1)}),go.Shape.defineFigureGenerator("Triangle","TriangleUp"),go.Shape.defineFigureGenerator("Diamond",function(kt,nt,et){return new go.Geometry().add(new go.PathFigure(.5*nt,0).add(new go.PathSegment(go.PathSegment.Line,0,.5*et)).add(new go.PathSegment(go.PathSegment.Line,.5*nt,et)).add(new go.PathSegment(go.PathSegment.Line,nt,.5*et).close())).setSpots(.25,.25,.75,.75)}),go.Shape.defineFigureGenerator("LineH",function(kt,nt,et){var ht=new go.Geometry(go.Geometry.Line);return ht.startX=0,ht.startY=et/2,ht.endX=nt,ht.endY=et/2,ht}),go.Shape.defineFigureGenerator("LineV",function(kt,nt,et){var ht=new go.Geometry(go.Geometry.Line);return ht.startX=nt/2,ht.startY=0,ht.endX=nt/2,ht.endY=et,ht}),go.Shape.defineFigureGenerator("BarH","Rectangle"),go.Shape.defineFigureGenerator("BarV","Rectangle"),go.Shape.defineFigureGenerator("MinusLine","LineH"),go.Shape.defineFigureGenerator("PlusLine",function(kt,nt,et){return new go.Geometry().add(new go.PathFigure(0,et/2,!1).add(new go.PathSegment(go.PathSegment.Line,nt,et/2)).add(new go.PathSegment(go.PathSegment.Move,nt/2,0)).add(new go.PathSegment(go.PathSegment.Line,nt/2,et)))}),go.Shape.defineFigureGenerator("XLine",function(kt,nt,et){return new go.Geometry().add(new go.PathFigure(0,et,!1).add(new go.PathSegment(go.PathSegment.Line,nt,0)).add(new go.PathSegment(go.PathSegment.Move,0,0)).add(new go.PathSegment(go.PathSegment.Line,nt,et)))}),go.Shape.defineFigureGenerator("LineRight",function(kt,nt,et){return new go.Geometry().add(new go.PathFigure(.25*nt,0,!1).add(new go.PathSegment(go.PathSegment.Line,.75*nt,.5*et)).add(new go.PathSegment(go.PathSegment.Line,.25*nt,et)))}),go.Shape.defineFigureGenerator("LineDown",function(kt,nt,et){return new go.Geometry().add(new go.PathFigure(0,.25*et,!1).add(new go.PathSegment(go.PathSegment.Line,.5*nt,.75*et)).add(new go.PathSegment(go.PathSegment.Line,nt,.25*et)))}),go.Shape.defineFigureGenerator("LineLeft",function(kt,nt,et){return new go.Geometry().add(new go.PathFigure(.75*nt,0,!1).add(new go.PathSegment(go.PathSegment.Line,.25*nt,.5*et)).add(new go.PathSegment(go.PathSegment.Line,.75*nt,et)))}),go.Shape.defineFigureGenerator("LineUp",function(kt,nt,et){return new go.Geometry().add(new go.PathFigure(0,.75*et,!1).add(new go.PathSegment(go.PathSegment.Line,.5*nt,.25*et)).add(new go.PathSegment(go.PathSegment.Line,nt,.75*et)))}),go.Shape.defineFigureGenerator("AsteriskLine",function(kt,nt,et){var ht=.2/Math.SQRT2;return new go.Geometry().add(new go.PathFigure(ht*nt,(1-ht)*et,!1).add(new go.PathSegment(go.PathSegment.Line,(1-ht)*nt,ht*et)).add(new go.PathSegment(go.PathSegment.Move,ht*nt,ht*et)).add(new go.PathSegment(go.PathSegment.Line,(1-ht)*nt,(1-ht)*et)).add(new go.PathSegment(go.PathSegment.Move,0,et/2)).add(new go.PathSegment(go.PathSegment.Line,nt,et/2)).add(new go.PathSegment(go.PathSegment.Move,nt/2,0)).add(new go.PathSegment(go.PathSegment.Line,nt/2,et)))}),go.Shape.defineFigureGenerator("CircleLine",function(kt,nt,et){var ht=nt/2,lt=new go.Geometry().add(new go.PathFigure(nt,nt/2,!1).add(new go.PathSegment(go.PathSegment.Arc,0,360,ht,ht,ht,ht).close()));return lt.spot1=Pe,lt.spot2=Ae,lt.defaultStretch=go.GraphObject.Uniform,lt}),go.Shape.defineFigureGenerator("Line1",function(kt,nt,et){var ht=new go.Geometry(go.Geometry.Line);return ht.startX=0,ht.startY=0,ht.endX=nt,ht.endY=et,ht}),go.Shape.defineFigureGenerator("Line2",function(kt,nt,et){var ht=new go.Geometry(go.Geometry.Line);return ht.startX=nt,ht.startY=0,ht.endX=0,ht.endY=et,ht}),go.Shape.defineFigureGenerator("Curve1",function(kt,nt,et){return new go.Geometry().add(new go.PathFigure(0,0,!1).add(new go.PathSegment(go.PathSegment.Bezier,nt,et,ee*nt,0,nt,(1-ee)*et)))}),go.Shape.defineFigureGenerator("Curve2",function(kt,nt,et){return new go.Geometry().add(new go.PathFigure(0,0,!1).add(new go.PathSegment(go.PathSegment.Bezier,nt,et,0,ee*et,(1-ee)*nt,et)))}),go.Shape.defineFigureGenerator("Curve3",function(kt,nt,et){return new go.Geometry().add(new go.PathFigure(nt,0,!1).add(new go.PathSegment(go.PathSegment.Bezier,0,et,nt,ee*et,ee*nt,et)))}),go.Shape.defineFigureGenerator("Curve4",function(kt,nt,et){return new go.Geometry().add(new go.PathFigure(nt,0,!1).add(new go.PathSegment(go.PathSegment.Bezier,0,et,(1-ee)*nt,0,0,(1-ee)*et)))}),go.Shape.defineFigureGenerator("TriangleDownLeft",function(kt,nt,et){return new go.Geometry().add(new go.PathFigure(0,0,!0).add(new go.PathSegment(go.PathSegment.Line,nt,et)).add(new go.PathSegment(go.PathSegment.Line,0,et).close())).setSpots(0,.5,.5,1)}),go.Shape.defineFigureGenerator("TriangleDownRight",function(kt,nt,et){return new go.Geometry().add(new go.PathFigure(nt,0,!0).add(new go.PathSegment(go.PathSegment.Line,nt,et)).add(new go.PathSegment(go.PathSegment.Line,0,et).close())).setSpots(.5,.5,1,1)}),go.Shape.defineFigureGenerator("TriangleUpLeft",function(kt,nt,et){return new go.Geometry().add(new go.PathFigure(0,0,!0).add(new go.PathSegment(go.PathSegment.Line,nt,0)).add(new go.PathSegment(go.PathSegment.Line,0,et).close())).setSpots(0,0,.5,.5)}),go.Shape.defineFigureGenerator("TriangleUpRight",function(kt,nt,et){return new go.Geometry().add(new go.PathFigure(0,0,!0).add(new go.PathSegment(go.PathSegment.Line,nt,0)).add(new go.PathSegment(go.PathSegment.Line,nt,et).close())).setSpots(.5,0,1,.5)}),go.Shape.defineFigureGenerator("RightTriangle","TriangleDownLeft"),go.Shape.setFigureParameter("Parallelogram1",0,new fn("Indent",.1,-.99,.99)),go.Shape.defineFigureGenerator("Parallelogram1",function(kt,nt,et){var ht=kt?kt.parameter1:NaN;isNaN(ht)?ht=.1:ht<-1?ht=-1:ht>1&&(ht=1);var lt=Math.abs(ht)*nt;if(ht===0){var gt=new go.Geometry(go.Geometry.Rectangle);return gt.startX=0,gt.startY=0,gt.endX=nt,gt.endY=et,gt}else{var gt=new go.Geometry;return ht>0?gt.add(new go.PathFigure(lt,0).add(new go.PathSegment(go.PathSegment.Line,nt,0)).add(new go.PathSegment(go.PathSegment.Line,nt-lt,et)).add(new go.PathSegment(go.PathSegment.Line,0,et).close())):gt.add(new go.PathFigure(0,0).add(new go.PathSegment(go.PathSegment.Line,nt-lt,0)).add(new go.PathSegment(go.PathSegment.Line,nt,et)).add(new go.PathSegment(go.PathSegment.Line,lt,et).close())),lt<nt/2&&gt.setSpots(lt/nt,0,(nt-lt)/nt,1),gt}}),go.Shape.defineFigureGenerator("Parallelogram","Parallelogram1"),go.Shape.setFigureParameter("Parallelogram2",0,new fn("Indent",10,-1/0,1/0)),go.Shape.defineFigureGenerator("Parallelogram2",function(kt,nt,et){var ht=kt?kt.parameter1:NaN;isNaN(ht)?ht=10:ht<-nt?ht=-nt:ht>nt&&(ht=nt);var lt=Math.abs(ht);if(ht===0){var gt=new go.Geometry(go.Geometry.Rectangle);return gt.startX=0,gt.startY=0,gt.endX=nt,gt.endY=et,gt}else{var gt=new go.Geometry;return ht>0?gt.add(new go.PathFigure(lt,0).add(new go.PathSegment(go.PathSegment.Line,nt,0)).add(new go.PathSegment(go.PathSegment.Line,nt-lt,et)).add(new go.PathSegment(go.PathSegment.Line,0,et).close())):gt.add(new go.PathFigure(0,0).add(new go.PathSegment(go.PathSegment.Line,nt-lt,0)).add(new go.PathSegment(go.PathSegment.Line,nt,et)).add(new go.PathSegment(go.PathSegment.Line,lt,et).close())),lt<nt/2&&gt.setSpots(lt/nt,0,(nt-lt)/nt,1),gt}}),go.Shape.setFigureParameter("Trapezoid1",0,new fn("Indent",.2,-.99,.99)),go.Shape.defineFigureGenerator("Trapezoid1",function(kt,nt,et){var ht=kt?kt.parameter1:NaN;isNaN(ht)?ht=.2:ht<.5?ht=-.5:ht>.5&&(ht=.5);var lt=Math.abs(ht)*nt;if(ht===0){var gt=new go.Geometry(go.Geometry.Rectangle);return gt.startX=0,gt.startY=0,gt.endX=nt,gt.endY=et,gt}else{var gt=new go.Geometry;return ht>0?gt.add(new go.PathFigure(lt,0).add(new go.PathSegment(go.PathSegment.Line,nt-lt,0)).add(new go.PathSegment(go.PathSegment.Line,nt,et)).add(new go.PathSegment(go.PathSegment.Line,0,et).close())):gt.add(new go.PathFigure(0,0).add(new go.PathSegment(go.PathSegment.Line,nt,0)).add(new go.PathSegment(go.PathSegment.Line,nt-lt,et)).add(new go.PathSegment(go.PathSegment.Line,lt,et).close())),lt<nt/2&&gt.setSpots(lt/nt,0,(nt-lt)/nt,1),gt}}),go.Shape.defineFigureGenerator("Trapezoid","Trapezoid1"),go.Shape.setFigureParameter("Trapezoid2",0,new fn("Indent",20,-1/0,1/0)),go.Shape.defineFigureGenerator("Trapezoid2",function(kt,nt,et){var ht=kt?kt.parameter1:NaN;isNaN(ht)?ht=20:ht<-nt?ht=-nt/2:ht>nt&&(ht=nt/2);var lt=Math.abs(ht);if(ht===0){var gt=new go.Geometry(go.Geometry.Rectangle);return gt.startX=0,gt.startY=0,gt.endX=nt,gt.endY=et,gt}else{var gt=new go.Geometry;return ht>0?gt.add(new go.PathFigure(lt,0).add(new go.PathSegment(go.PathSegment.Line,nt-lt,0)).add(new go.PathSegment(go.PathSegment.Line,nt,et)).add(new go.PathSegment(go.PathSegment.Line,0,et).close())):gt.add(new go.PathFigure(0,0).add(new go.PathSegment(go.PathSegment.Line,nt,0)).add(new go.PathSegment(go.PathSegment.Line,nt-lt,et)).add(new go.PathSegment(go.PathSegment.Line,lt,et).close())),lt<nt/2&&gt.setSpots(lt/nt,0,(nt-lt)/nt,1),gt}}),go.Shape.setFigureParameter("ManualOperation",0,new fn("Indent",10,-1/0,1/0)),go.Shape.defineFigureGenerator("ManualOperation",function(kt,nt,et){var ht=kt?kt.parameter1:NaN;isNaN(ht)?ht=10:ht<-nt?ht=-nt/2:ht>nt&&(ht=nt/2);var lt=Math.abs(ht);if(ht===0){var gt=new go.Geometry(go.Geometry.Rectangle);return gt.startX=0,gt.startY=0,gt.endX=nt,gt.endY=et,gt}else{var gt=new go.Geometry;return ht>0?gt.add(new go.PathFigure(0,0).add(new go.PathSegment(go.PathSegment.Line,nt,0)).add(new go.PathSegment(go.PathSegment.Line,nt-lt,et)).add(new go.PathSegment(go.PathSegment.Line,lt,et).close())):gt.add(new go.PathFigure(lt,0).add(new go.PathSegment(go.PathSegment.Line,nt-lt,0)).add(new go.PathSegment(go.PathSegment.Line,nt,et)).add(new go.PathSegment(go.PathSegment.Line,0,et).close())),lt<nt/2&&gt.setSpots(lt/nt,0,(nt-lt)/nt,1),gt}});var Fe=[];function ye(){var kt=Fe.pop();return kt===void 0?[]:kt}function de(kt){kt.length=0,Fe.push(kt)}function he(kt){for(var nt=ye(),et=.5,ht=.5,lt=Math.PI*1.5,gt=0,yt=0;yt<kt;yt++)gt=2*Math.PI/kt*yt+lt,nt[yt]=new go.Point(ht+et*Math.cos(gt),ht+et*Math.sin(gt));return nt.push(nt[0]),nt}function Ne(kt){var nt=He(kt),et=ye();et[0]=nt[0];for(var ht=1,lt=1;ht<nt.length;ht+=2,lt+=3)et[lt]=nt[ht],et[lt+1]=nt[ht],et[lt+2]=nt[ht+1];return de(nt),et}function He(kt){for(var nt=he(kt),et=ye(),ht=Math.floor(nt.length/2),lt=nt.length-1,gt=kt%2===0?2:1,yt=0;yt<lt;yt++){var Lt=nt[yt],Dt=nt[yt+1],zt=nt[(ht+yt-1)%lt],Xt=nt[(ht+yt+gt)%lt];et[yt*2]=Lt,et[yt*2+1]=ve(Lt.x,Lt.y,zt.x,zt.y,Dt.x,Dt.y,Xt.x,Xt.y,new go.Point)}return et[et.length]=et[0],de(nt),et}go.Shape.defineFigureGenerator("Pentagon",function(kt,nt,et){var ht=he(5),lt=new go.Geometry,gt=new go.PathFigure(ht[0].x*nt,ht[0].y*et,!0);lt.add(gt);for(var yt=1;yt<5;yt++)gt.add(new go.PathSegment(go.PathSegment.Line,ht[yt].x*nt,ht[yt].y*et));return gt.add(new go.PathSegment(go.PathSegment.Line,ht[0].x*nt,ht[0].y*et).close()),de(ht),lt.spot1=new go.Spot(.2,.22),lt.spot2=new go.Spot(.8,.9),lt}),go.Shape.defineFigureGenerator("Hexagon",function(kt,nt,et){var ht=he(6),lt=new go.Geometry,gt=new go.PathFigure(ht[0].x*nt,ht[0].y*et,!0);lt.add(gt);for(var yt=1;yt<6;yt++)gt.add(new go.PathSegment(go.PathSegment.Line,ht[yt].x*nt,ht[yt].y*et));return gt.add(new go.PathSegment(go.PathSegment.Line,ht[0].x*nt,ht[0].y*et).close()),de(ht),lt.spot1=new go.Spot(.07,.25),lt.spot2=new go.Spot(.93,.75),lt}),go.Shape.defineFigureGenerator("Heptagon",function(kt,nt,et){var ht=he(7),lt=new go.Geometry,gt=new go.PathFigure(ht[0].x*nt,ht[0].y*et,!0);lt.add(gt);for(var yt=1;yt<7;yt++)gt.add(new go.PathSegment(go.PathSegment.Line,ht[yt].x*nt,ht[yt].y*et));return gt.add(new go.PathSegment(go.PathSegment.Line,ht[0].x*nt,ht[0].y*et).close()),de(ht),lt.spot1=new go.Spot(.2,.15),lt.spot2=new go.Spot(.8,.85),lt}),go.Shape.defineFigureGenerator("Octagon",function(kt,nt,et){var ht=he(8),lt=new go.Geometry,gt=new go.PathFigure(ht[0].x*nt,ht[0].y*et,!0);lt.add(gt);for(var yt=1;yt<8;yt++)gt.add(new go.PathSegment(go.PathSegment.Line,ht[yt].x*nt,ht[yt].y*et));return gt.add(new go.PathSegment(go.PathSegment.Line,ht[0].x*nt,ht[0].y*et).close()),de(ht),lt.spot1=new go.Spot(.15,.15),lt.spot2=new go.Spot(.85,.85),lt}),go.Shape.defineFigureGenerator("Nonagon",function(kt,nt,et){var ht=he(9),lt=new go.Geometry,gt=new go.PathFigure(ht[0].x*nt,ht[0].y*et,!0);lt.add(gt);for(var yt=1;yt<9;yt++)gt.add(new go.PathSegment(go.PathSegment.Line,ht[yt].x*nt,ht[yt].y*et));return gt.add(new go.PathSegment(go.PathSegment.Line,ht[0].x*nt,ht[0].y*et).close()),de(ht),lt.spot1=new go.Spot(.17,.13),lt.spot2=new go.Spot(.82,.82),lt}),go.Shape.defineFigureGenerator("Decagon",function(kt,nt,et){var ht=he(10),lt=new go.Geometry,gt=new go.PathFigure(ht[0].x*nt,ht[0].y*et,!0);lt.add(gt);for(var yt=1;yt<10;yt++)gt.add(new go.PathSegment(go.PathSegment.Line,ht[yt].x*nt,ht[yt].y*et));return gt.add(new go.PathSegment(go.PathSegment.Line,ht[0].x*nt,ht[0].y*et).close()),de(ht),lt.spot1=new go.Spot(.16,.16),lt.spot2=new go.Spot(.84,.84),lt}),go.Shape.defineFigureGenerator("Dodecagon",function(kt,nt,et){var ht=he(12),lt=new go.Geometry,gt=new go.PathFigure(ht[0].x*nt,ht[0].y*et,!0);lt.add(gt);for(var yt=1;yt<12;yt++)gt.add(new go.PathSegment(go.PathSegment.Line,ht[yt].x*nt,ht[yt].y*et));return gt.add(new go.PathSegment(go.PathSegment.Line,ht[0].x*nt,ht[0].y*et).close()),de(ht),lt.spot1=new go.Spot(.16,.16),lt.spot2=new go.Spot(.84,.84),lt}),go.Shape.defineFigureGenerator("FivePointedStar",function(kt,nt,et){var ht=He(5),lt=new go.Geometry,gt=new go.PathFigure(ht[0].x*nt,ht[0].y*et,!0);lt.add(gt);for(var yt=1;yt<10;yt++)gt.add(new go.PathSegment(go.PathSegment.Line,ht[yt].x*nt,ht[yt].y*et));return gt.add(new go.PathSegment(go.PathSegment.Line,ht[0].x*nt,ht[0].y*et).close()),de(ht),lt.spot1=new go.Spot(.266,.333),lt.spot2=new go.Spot(.733,.733),lt}),go.Shape.defineFigureGenerator("SixPointedStar",function(kt,nt,et){var ht=He(6),lt=new go.Geometry,gt=new go.PathFigure(ht[0].x*nt,ht[0].y*et,!0);lt.add(gt);for(var yt=1;yt<12;yt++)gt.add(new go.PathSegment(go.PathSegment.Line,ht[yt].x*nt,ht[yt].y*et));return gt.add(new go.PathSegment(go.PathSegment.Line,ht[0].x*nt,ht[0].y*et).close()),de(ht),lt.spot1=new go.Spot(.17,.25),lt.spot2=new go.Spot(.83,.75),lt}),go.Shape.defineFigureGenerator("SevenPointedStar",function(kt,nt,et){var ht=He(7),lt=new go.Geometry,gt=new go.PathFigure(ht[0].x*nt,ht[0].y*et,!0);lt.add(gt);for(var yt=1;yt<14;yt++)gt.add(new go.PathSegment(go.PathSegment.Line,ht[yt].x*nt,ht[yt].y*et));return gt.add(new go.PathSegment(go.PathSegment.Line,ht[0].x*nt,ht[0].y*et).close()),de(ht),lt.spot1=new go.Spot(.222,.277),lt.spot2=new go.Spot(.777,.666),lt}),go.Shape.defineFigureGenerator("EightPointedStar",function(kt,nt,et){var ht=He(8),lt=new go.Geometry,gt=new go.PathFigure(ht[0].x*nt,ht[0].y*et,!0);lt.add(gt);for(var yt=1;yt<16;yt++)gt.add(new go.PathSegment(go.PathSegment.Line,ht[yt].x*nt,ht[yt].y*et));return gt.add(new go.PathSegment(go.PathSegment.Line,ht[0].x*nt,ht[0].y*et).close()),de(ht),lt.spot1=new go.Spot(.25,.25),lt.spot2=new go.Spot(.75,.75),lt}),go.Shape.defineFigureGenerator("NinePointedStar",function(kt,nt,et){var ht=He(9),lt=new go.Geometry,gt=new go.PathFigure(ht[0].x*nt,ht[0].y*et,!0);lt.add(gt);for(var yt=1;yt<18;yt++)gt.add(new go.PathSegment(go.PathSegment.Line,ht[yt].x*nt,ht[yt].y*et));return gt.add(new go.PathSegment(go.PathSegment.Line,ht[0].x*nt,ht[0].y*et).close()),de(ht),lt.spot1=new go.Spot(.222,.277),lt.spot2=new go.Spot(.777,.666),lt}),go.Shape.defineFigureGenerator("TenPointedStar",function(kt,nt,et){var ht=He(10),lt=new go.Geometry,gt=new go.PathFigure(ht[0].x*nt,ht[0].y*et,!0);lt.add(gt);for(var yt=1;yt<20;yt++)gt.add(new go.PathSegment(go.PathSegment.Line,ht[yt].x*nt,ht[yt].y*et));return gt.add(new go.PathSegment(go.PathSegment.Line,ht[0].x*nt,ht[0].y*et).close()),de(ht),lt.spot1=new go.Spot(.281,.261),lt.spot2=new go.Spot(.723,.748),lt}),go.Shape.defineFigureGenerator("FivePointedBurst",function(kt,nt,et){var ht=Ne(5),lt=new go.Geometry,gt=new go.PathFigure(ht[0].x*nt,ht[0].y*et,!0);lt.add(gt);for(var yt=1;yt<ht.length;yt+=3)gt.add(new go.PathSegment(go.PathSegment.Bezier,ht[yt+2].x*nt,ht[yt+2].y*et,ht[yt].x*nt,ht[yt].y*et,ht[yt+1].x*nt,ht[yt+1].y*et));return gt.segments.last().close(),de(ht),lt.spot1=new go.Spot(.222,.277),lt.spot2=new go.Spot(.777,.777),lt}),go.Shape.defineFigureGenerator("SixPointedBurst",function(kt,nt,et){var ht=Ne(6),lt=new go.Geometry,gt=new go.PathFigure(ht[0].x*nt,ht[0].y*et,!0);lt.add(gt);for(var yt=1;yt<ht.length;yt+=3)gt.add(new go.PathSegment(go.PathSegment.Bezier,ht[yt+2].x*nt,ht[yt+2].y*et,ht[yt].x*nt,ht[yt].y*et,ht[yt+1].x*nt,ht[yt+1].y*et));return gt.segments.last().close(),de(ht),lt.spot1=new go.Spot(.17,.222),lt.spot2=new go.Spot(.833,.777),lt}),go.Shape.defineFigureGenerator("SevenPointedBurst",function(kt,nt,et){var ht=Ne(7),lt=new go.Geometry,gt=new go.PathFigure(ht[0].x*nt,ht[0].y*et,!0);lt.add(gt);for(var yt=1;yt<ht.length;yt+=3)gt.add(new go.PathSegment(go.PathSegment.Bezier,ht[yt+2].x*nt,ht[yt+2].y*et,ht[yt].x*nt,ht[yt].y*et,ht[yt+1].x*nt,ht[yt+1].y*et));return gt.segments.last().close(),de(ht),lt.spot1=new go.Spot(.222,.222),lt.spot2=new go.Spot(.777,.777),lt}),go.Shape.defineFigureGenerator("EightPointedBurst",function(kt,nt,et){var ht=Ne(8),lt=new go.Geometry,gt=new go.PathFigure(ht[0].x*nt,ht[0].y*et,!0);lt.add(gt);for(var yt=1;yt<ht.length;yt+=3)gt.add(new go.PathSegment(go.PathSegment.Bezier,ht[yt+2].x*nt,ht[yt+2].y*et,ht[yt].x*nt,ht[yt].y*et,ht[yt+1].x*nt,ht[yt+1].y*et));return gt.segments.last().close(),de(ht),lt.spot1=new go.Spot(.222,.222),lt.spot2=new go.Spot(.777,.777),lt}),go.Shape.defineFigureGenerator("NinePointedBurst",function(kt,nt,et){var ht=Ne(9),lt=new go.Geometry,gt=new go.PathFigure(ht[0].x*nt,ht[0].y*et,!0);lt.add(gt);for(var yt=1;yt<ht.length;yt+=3)gt.add(new go.PathSegment(go.PathSegment.Bezier,ht[yt+2].x*nt,ht[yt+2].y*et,ht[yt].x*nt,ht[yt].y*et,ht[yt+1].x*nt,ht[yt+1].y*et));return gt.segments.last().close(),de(ht),lt.spot1=new go.Spot(.222,.222),lt.spot2=new go.Spot(.777,.777),lt}),go.Shape.defineFigureGenerator("TenPointedBurst",function(kt,nt,et){var ht=Ne(10),lt=new go.Geometry,gt=new go.PathFigure(ht[0].x*nt,ht[0].y*et,!0);lt.add(gt);for(var yt=1;yt<ht.length;yt+=3)gt.add(new go.PathSegment(go.PathSegment.Bezier,ht[yt+2].x*nt,ht[yt+2].y*et,ht[yt].x*nt,ht[yt].y*et,ht[yt+1].x*nt,ht[yt+1].y*et));return gt.segments.last().close(),de(ht),lt.spot1=new go.Spot(.222,.222),lt.spot2=new go.Spot(.777,.777),lt}),go.Shape.setFigureParameter("FramedRectangle",0,new fn("ThicknessX",8)),go.Shape.setFigureParameter("FramedRectangle",1,new fn("ThicknessY",8)),go.Shape.defineFigureGenerator("FramedRectangle",function(kt,nt,et){var ht=kt?kt.parameter1:NaN,lt=kt?kt.parameter2:NaN;isNaN(ht)&&(ht=8),isNaN(lt)&&(lt=8);var gt=new go.Geometry,yt=new go.PathFigure(0,0,!0);return gt.add(yt),yt.add(new go.PathSegment(go.PathSegment.Line,nt,0)),yt.add(new go.PathSegment(go.PathSegment.Line,nt,et)),yt.add(new go.PathSegment(go.PathSegment.Line,0,et).close()),ht<nt/2&&lt<et/2&&(yt.add(new go.PathSegment(go.PathSegment.Move,ht,lt)),yt.add(new go.PathSegment(go.PathSegment.Line,ht,et-lt)),yt.add(new go.PathSegment(go.PathSegment.Line,nt-ht,et-lt)),yt.add(new go.PathSegment(go.PathSegment.Line,nt-ht,lt).close())),gt.setSpots(0,0,1,1,ht,lt,-ht,-lt),gt}),go.Shape.setFigureParameter("Ring",0,new fn("Thickness",8)),go.Shape.defineFigureGenerator("Ring",function(kt,nt,et){var ht=kt?kt.parameter1:NaN;(isNaN(ht)||ht<0)&&(ht=8);var lt=nt/2,gt=new go.Geometry,yt=new go.PathFigure(nt,nt/2,!0);gt.add(yt),yt.add(new go.PathSegment(go.PathSegment.Arc,0,360,lt,lt,lt,lt).close());var Lt=Math.max(lt-ht,0);return Lt>0&&(yt.add(new go.PathSegment(go.PathSegment.Move,nt/2+Lt,nt/2)),yt.add(new go.PathSegment(go.PathSegment.Arc,0,-360,lt,lt,Lt,Lt).close())),gt.spot1=Pe,gt.spot2=Ae,gt.defaultStretch=go.GraphObject.Uniform,gt}),go.Shape.defineFigureGenerator("Cloud",function(kt,nt,et){return new go.Geometry().add(new go.PathFigure(.08034461*nt,.1944299*et,!0).add(new go.PathSegment(go.PathSegment.Bezier,.2008615*nt,.05349299*et,-.09239631*nt,.07836421*et,.1406031*nt,-.0542823*et)).add(new go.PathSegment(go.PathSegment.Bezier,.4338609*nt,.074219*et,.2450511*nt,-.00697547*et,.3776197*nt,-.01112067*et)).add(new go.PathSegment(go.PathSegment.Bezier,.6558228*nt,.07004196*et,.4539471*nt,0,.6066018*nt,-.02526587*et)).add(new go.PathSegment(go.PathSegment.Bezier,.8921095*nt,.08370865*et,.6914277*nt,-.01904177*et,.8921095*nt,-.01220843*et)).add(new go.PathSegment(go.PathSegment.Bezier,.9147671*nt,.3194596*et,1.036446*nt,.04105738*et,1.020377*nt,.3022052*et)).add(new go.PathSegment(go.PathSegment.Bezier,.9082935*nt,.562044*et,1.04448*nt,.360238*et,.992256*nt,.5219009*et)).add(new go.PathSegment(go.PathSegment.Bezier,.9212406*nt,.8217117*et,1.032337*nt,.5771781*et,1.018411*nt,.8120651*et)).add(new go.PathSegment(go.PathSegment.Bezier,.7592566*nt,.9156953*et,1.028411*nt,.9571472*et,.8556702*nt,1.052487*et)).add(new go.PathSegment(go.PathSegment.Bezier,.5101666*nt,.9310455*et,.7431877*nt,1.009325*et,.5624123*nt,1.021761*et)).add(new go.PathSegment(go.PathSegment.Bezier,.2609328*nt,.9344623*et,.4820677*nt,1.031761*et,.3030112*nt,1.002796*et)).add(new go.PathSegment(go.PathSegment.Bezier,.08034461*nt,.870098*et,.2329994*nt,1.01518*et,.03213784*nt,1.01518*et)).add(new go.PathSegment(go.PathSegment.Bezier,.06829292*nt,.6545475*et,-.02812061*nt,.9032597*et,-.01205169*nt,.6835638*et)).add(new go.PathSegment(go.PathSegment.Bezier,.06427569*nt,.4265613*et,-.01812061*nt,.6089503*et,-.00606892*nt,.4555777*et)).add(new go.PathSegment(go.PathSegment.Bezier,.08034461*nt,.1944299*et,-.01606892*nt,.3892545*et,-.01205169*nt,.1944299*et))).setSpots(.1,.1,.9,.9)}),go.Shape.defineFigureGenerator("StopSign",function(kt,nt,et){var ht=1/(Math.SQRT2+2);return new go.Geometry().add(new go.PathFigure(ht*nt,0,!0).add(new go.PathSegment(go.PathSegment.Line,(1-ht)*nt,0)).add(new go.PathSegment(go.PathSegment.Line,nt,ht*et)).add(new go.PathSegment(go.PathSegment.Line,nt,(1-ht)*et)).add(new go.PathSegment(go.PathSegment.Line,(1-ht)*nt,et)).add(new go.PathSegment(go.PathSegment.Line,ht*nt,et)).add(new go.PathSegment(go.PathSegment.Line,0,(1-ht)*et)).add(new go.PathSegment(go.PathSegment.Line,0,ht*et).close())).setSpots(ht/2,ht/2,1-ht/2,1-ht/2)}),go.Shape.setFigureParameter("Pie",0,new fn("Start",0,-360,360)),go.Shape.setFigureParameter("Pie",1,new fn("Sweep",315,-360,360)),go.Shape.defineFigureGenerator("Pie",function(kt,nt,et){var ht=kt?kt.parameter1:NaN,lt=kt?kt.parameter2:NaN;isNaN(ht)&&(ht=0),isNaN(lt)&&(lt=315);var gt=ht%360;gt<0&&(gt+=360);var yt=lt%360,Lt=Math.min(nt,et)/2;return new go.Geometry().add(new go.PathFigure(Lt,Lt).add(new go.PathSegment(go.PathSegment.Arc,gt,yt,Lt,Lt,Lt,Lt).close()))}),go.Shape.defineFigureGenerator("PiePiece",function(kt,nt,et){var ht=ee/Math.SQRT2*.5,lt=Math.SQRT2/2,gt=1-Math.SQRT2/2;return new go.Geometry().add(new go.PathFigure(nt,et,!0).add(new go.PathSegment(go.PathSegment.Bezier,lt*nt,gt*et,nt,(1-ht)*et,(lt+ht)*nt,(gt+ht)*et)).add(new go.PathSegment(go.PathSegment.Line,0,et).close()))}),go.Shape.setFigureParameter("ThickCross",0,new fn("Thickness",30)),go.Shape.defineFigureGenerator("ThickCross",function(kt,nt,et){var ht=kt?kt.parameter1:NaN;(isNaN(ht)||ht<0)&&(ht=30);var lt=Math.min(ht,nt)/2,gt=nt/2,yt=et/2;return new go.Geometry().add(new go.PathFigure(gt-lt,0,!0).add(new go.PathSegment(go.PathSegment.Line,gt+lt,0)).add(new go.PathSegment(go.PathSegment.Line,gt+lt,yt-lt)).add(new go.PathSegment(go.PathSegment.Line,nt,yt-lt)).add(new go.PathSegment(go.PathSegment.Line,nt,yt+lt)).add(new go.PathSegment(go.PathSegment.Line,gt+lt,yt+lt)).add(new go.PathSegment(go.PathSegment.Line,gt+lt,et)).add(new go.PathSegment(go.PathSegment.Line,gt-lt,et)).add(new go.PathSegment(go.PathSegment.Line,gt-lt,yt+lt)).add(new go.PathSegment(go.PathSegment.Line,0,yt+lt)).add(new go.PathSegment(go.PathSegment.Line,0,yt-lt)).add(new go.PathSegment(go.PathSegment.Line,gt-lt,yt-lt).close()))}),go.Shape.setFigureParameter("ThinCross",0,new fn("Thickness",10)),go.Shape.defineFigureGenerator("ThinCross",function(kt,nt,et){var ht=kt?kt.parameter1:NaN;(isNaN(ht)||ht<0)&&(ht=10);var lt=Math.min(ht,nt)/2,gt=nt/2,yt=et/2;return new go.Geometry().add(new go.PathFigure(gt-lt,0,!0).add(new go.PathSegment(go.PathSegment.Line,gt+lt,0)).add(new go.PathSegment(go.PathSegment.Line,gt+lt,yt-lt)).add(new go.PathSegment(go.PathSegment.Line,nt,yt-lt)).add(new go.PathSegment(go.PathSegment.Line,nt,yt+lt)).add(new go.PathSegment(go.PathSegment.Line,gt+lt,yt+lt)).add(new go.PathSegment(go.PathSegment.Line,gt+lt,et)).add(new go.PathSegment(go.PathSegment.Line,gt-lt,et)).add(new go.PathSegment(go.PathSegment.Line,gt-lt,yt+lt)).add(new go.PathSegment(go.PathSegment.Line,0,yt+lt)).add(new go.PathSegment(go.PathSegment.Line,0,yt-lt)).add(new go.PathSegment(go.PathSegment.Line,gt-lt,yt-lt).close()))}),go.Shape.setFigureParameter("ThickX",0,new fn("Thickness",30)),go.Shape.defineFigureGenerator("ThickX",function(kt,nt,et){var ht=kt?kt.parameter1:NaN;if((isNaN(ht)||ht<0)&&(ht=30),nt===0||et===0){var lt=new go.Geometry(go.Geometry.Rectangle);return lt.startX=0,lt.startY=0,lt.endX=nt,lt.endY=et,lt}else{var gt=nt/2,yt=et/2,Lt=Math.atan2(et,nt),Dt=ht-Math.min(Math.cos(Lt)*ht/2,gt),zt=ht-Math.min(Math.sin(Lt)*ht/2,yt),lt=new go.Geometry,Xt=new go.PathFigure(Dt,0,!0);return lt.add(Xt),Xt.add(new go.PathSegment(go.PathSegment.Line,gt,.2*et)),Xt.add(new go.PathSegment(go.PathSegment.Line,nt-Dt,0)),Xt.add(new go.PathSegment(go.PathSegment.Line,nt,zt)),Xt.add(new go.PathSegment(go.PathSegment.Line,.8*nt,yt)),Xt.add(new go.PathSegment(go.PathSegment.Line,nt,et-zt)),Xt.add(new go.PathSegment(go.PathSegment.Line,nt-Dt,et)),Xt.add(new go.PathSegment(go.PathSegment.Line,gt,.8*et)),Xt.add(new go.PathSegment(go.PathSegment.Line,Dt,et)),Xt.add(new go.PathSegment(go.PathSegment.Line,0,et-zt)),Xt.add(new go.PathSegment(go.PathSegment.Line,.2*nt,yt)),Xt.add(new go.PathSegment(go.PathSegment.Line,0,zt).close()),lt}}),go.Shape.setFigureParameter("ThinX",0,new fn("Thickness",10)),go.Shape.defineFigureGenerator("ThinX",function(kt,nt,et){var ht=kt?kt.parameter1:NaN;(isNaN(ht)||ht<0)&&(ht=10);var lt=new go.Geometry,gt=new go.PathFigure(.1*nt,0,!0);return lt.add(gt),gt.add(new go.PathSegment(go.PathSegment.Line,.5*nt,.4*et)),gt.add(new go.PathSegment(go.PathSegment.Line,.9*nt,0)),gt.add(new go.PathSegment(go.PathSegment.Line,nt,.1*et)),gt.add(new go.PathSegment(go.PathSegment.Line,.6*nt,.5*et)),gt.add(new go.PathSegment(go.PathSegment.Line,nt,.9*et)),gt.add(new go.PathSegment(go.PathSegment.Line,.9*nt,et)),gt.add(new go.PathSegment(go.PathSegment.Line,.5*nt,.6*et)),gt.add(new go.PathSegment(go.PathSegment.Line,.1*nt,et)),gt.add(new go.PathSegment(go.PathSegment.Line,0,.9*et)),gt.add(new go.PathSegment(go.PathSegment.Line,.4*nt,.5*et)),gt.add(new go.PathSegment(go.PathSegment.Line,0,.1*et).close()),lt}),go.Shape.setFigureParameter("SquareIBeam",0,new fn("BeamWidth",.2,.1,.9)),go.Shape.defineFigureGenerator("SquareIBeam",function(kt,nt,et){var ht=kt?kt.parameter1:NaN;isNaN(ht)&&(ht=.2);var lt=new go.Geometry,gt=new go.PathFigure(0,0,!0);return lt.add(gt),gt.add(new go.PathSegment(go.PathSegment.Line,nt,0)),gt.add(new go.PathSegment(go.PathSegment.Line,nt,ht*et)),gt.add(new go.PathSegment(go.PathSegment.Line,(.5+ht/2)*nt,ht*et)),gt.add(new go.PathSegment(go.PathSegment.Line,(.5+ht/2)*nt,(1-ht)*et)),gt.add(new go.PathSegment(go.PathSegment.Line,nt,(1-ht)*et)),gt.add(new go.PathSegment(go.PathSegment.Line,nt,et)),gt.add(new go.PathSegment(go.PathSegment.Line,0,et)),gt.add(new go.PathSegment(go.PathSegment.Line,0,(1-ht)*et)),gt.add(new go.PathSegment(go.PathSegment.Line,(.5-ht/2)*nt,(1-ht)*et)),gt.add(new go.PathSegment(go.PathSegment.Line,(.5-ht/2)*nt,ht*et)),gt.add(new go.PathSegment(go.PathSegment.Line,0,ht*et).close()),lt}),go.Shape.setFigureParameter("RoundedIBeam",0,new fn("Curviness",.5,.05,.65)),go.Shape.defineFigureGenerator("RoundedIBeam",function(kt,nt,et){var ht=kt?kt.parameter1:NaN;isNaN(ht)&&(ht=.5);var lt=new go.Geometry,gt=new go.PathFigure(0,0,!0);return lt.add(gt),gt.add(new go.PathSegment(go.PathSegment.Line,nt,0)),gt.add(new go.PathSegment(go.PathSegment.Bezier,nt,et,Math.abs(1-ht)*nt,.25*et,Math.abs(1-ht)*nt,.75*et)),gt.add(new go.PathSegment(go.PathSegment.Line,0,et)),gt.add(new go.PathSegment(go.PathSegment.Bezier,0,0,ht*nt,.75*et,ht*nt,.25*et).close()),lt}),go.Shape.defineFigureGenerator("HalfEllipse",function(kt,nt,et){return new go.Geometry().add(new go.PathFigure(0,0,!0).add(new go.PathSegment(go.PathSegment.Bezier,nt,.5*et,ee*nt,0,nt,(.5-ee/2)*et)).add(new go.PathSegment(go.PathSegment.Bezier,0,et,nt,(.5+ee/2)*et,ee*nt,et).close())).setSpots(0,.156,.844,.844)}),go.Shape.defineFigureGenerator("Crescent",function(kt,nt,et){return new go.Geometry().add(new go.PathFigure(0,0,!0).add(new go.PathSegment(go.PathSegment.Bezier,0,et,nt,0,nt,et)).add(new go.PathSegment(go.PathSegment.Bezier,0,0,.5*nt,.75*et,.5*nt,.25*et).close())).setSpots(.311,.266,.744,.744)}),go.Shape.defineFigureGenerator("Heart",function(kt,nt,et){return new go.Geometry().add(new go.PathFigure(.5*nt,et,!0).add(new go.PathSegment(go.PathSegment.Bezier,0,.3*et,.1*nt,.8*et,0,.5*et)).add(new go.PathSegment(go.PathSegment.Bezier,.5*nt,.3*et,0,0,.45*nt,0)).add(new go.PathSegment(go.PathSegment.Bezier,nt,.3*et,.55*nt,0,nt,0)).add(new go.PathSegment(go.PathSegment.Bezier,.5*nt,et,nt,.5*et,.9*nt,.8*et).close())).setSpots(.14,.29,.86,.78)}),go.Shape.defineFigureGenerator("Spade",function(kt,nt,et){return new go.Geometry().add(new go.PathFigure(.5*nt,0,!0).add(new go.PathSegment(go.PathSegment.Line,.51*nt,.01*et)).add(new go.PathSegment(go.PathSegment.Bezier,nt,.5*et,.6*nt,.2*et,nt,.25*et)).add(new go.PathSegment(go.PathSegment.Bezier,.55*nt,.7*et,nt,.8*et,.6*nt,.8*et)).add(new go.PathSegment(go.PathSegment.Bezier,.75*nt,et,.5*nt,.75*et,.55*nt,.95*et)).add(new go.PathSegment(go.PathSegment.Line,.25*nt,et)).add(new go.PathSegment(go.PathSegment.Bezier,.45*nt,.7*et,.45*nt,.95*et,.5*nt,.75*et)).add(new go.PathSegment(go.PathSegment.Bezier,0,.5*et,.4*nt,.8*et,0,.8*et)).add(new go.PathSegment(go.PathSegment.Bezier,.49*nt,.01*et,0,.25*et,.4*nt,.2*et).close())).setSpots(.14,.26,.86,.78)}),go.Shape.defineFigureGenerator("Club",function(kt,nt,et){var ht=new go.Geometry,lt=new go.PathFigure(.4*nt,.6*et,!0);ht.add(lt),lt.add(new go.PathSegment(go.PathSegment.Bezier,.15*nt,et,.5*nt,.75*et,.45*nt,.95*et)),lt.add(new go.PathSegment(go.PathSegment.Line,.85*nt,et)),lt.add(new go.PathSegment(go.PathSegment.Bezier,.6*nt,.6*et,.55*nt,.95*et,.5*nt,.75*et));var gt=.2,yt=.3,Lt=0,Dt=gt*ee;return lt.add(new go.PathSegment(go.PathSegment.Bezier,(.5+yt)*nt,(.5+gt+Lt)*et,(.5-gt+yt)*nt,(.5+Dt+Lt)*et,(.5-Dt+yt)*nt,(.5+gt+Lt)*et)),lt.add(new go.PathSegment(go.PathSegment.Bezier,(1-.5+gt+yt)*nt,(.5+Lt)*et,(.5+Dt+yt)*nt,(.5+gt+Lt)*et,(.5+gt+yt)*nt,(.5+Dt+Lt)*et)),lt.add(new go.PathSegment(go.PathSegment.Bezier,(.5+yt)*nt,(.5-gt+Lt)*et,(1-.5+gt+yt)*nt,(.5-Dt+Lt)*et,(.5+Dt+yt)*nt,(.5-gt+Lt)*et)),lt.add(new go.PathSegment(go.PathSegment.Bezier,.65*nt,.36771243*et,(.5-Dt+yt)*nt,(.5-gt+Lt)*et,(.5-gt+yt+.05)*nt,(.5-Dt+Lt-.02)*et)),gt=.2,yt=0,Lt=-.3,Dt=gt*ee,lt.add(new go.PathSegment(go.PathSegment.Bezier,(1-.5+gt+yt)*nt,(.5+Lt)*et,(.5+Dt+yt)*nt,(.5+gt+Lt)*et,(.5+gt+yt)*nt,(.5+Dt+Lt)*et)),lt.add(new go.PathSegment(go.PathSegment.Bezier,(.5+yt)*nt,(.5-gt+Lt)*et,(1-.5+gt+yt)*nt,(.5-Dt+Lt)*et,(.5+Dt+yt)*nt,(.5-gt+Lt)*et)),lt.add(new go.PathSegment(go.PathSegment.Bezier,(.5-gt+yt)*nt,(.5+Lt)*et,(.5-Dt+yt)*nt,(.5-gt+Lt)*et,(.5-gt+yt)*nt,(.5-Dt+Lt)*et)),lt.add(new go.PathSegment(go.PathSegment.Bezier,(.5-Dt+yt)*nt,(.5+gt+Lt)*et,(.5-gt+yt)*nt,(.5+Dt+Lt)*et,(.5-Dt+yt)*nt,(.5+gt+Lt)*et)),gt=.2,yt=-.3,Lt=0,Dt=gt*ee,lt.add(new go.PathSegment(go.PathSegment.Bezier,(.5+yt)*nt,(.5-gt+Lt)*et,(1-.5+gt+yt-.05)*nt,(.5-Dt+Lt-.02)*et,(.5+Dt+yt)*nt,(.5-gt+Lt)*et)),lt.add(new go.PathSegment(go.PathSegment.Bezier,(.5-gt+yt)*nt,(.5+Lt)*et,(.5-Dt+yt)*nt,(.5-gt+Lt)*et,(.5-gt+yt)*nt,(.5-Dt+Lt)*et)),lt.add(new go.PathSegment(go.PathSegment.Bezier,(.5+yt)*nt,(.5+gt+Lt)*et,(.5-gt+yt)*nt,(.5+Dt+Lt)*et,(.5-Dt+yt)*nt,(.5+gt+Lt)*et)),lt.add(new go.PathSegment(go.PathSegment.Bezier,.4*nt,.6*et,(.5+Dt+yt)*nt,(.5+gt+Lt)*et,(.5+gt+yt)*nt,(.5+Dt+Lt)*et).close()),ht.setSpots(.06,.33,.93,.68),ht}),go.Shape.defineFigureGenerator("YinYang",function(kt,nt,et){var ht=new go.Geometry,lt=new go.PathFigure(nt*.5,0,!0);ht.add(lt),lt.add(new go.PathSegment(go.PathSegment.Arc,270,180,nt*.5,nt*.5,nt*.5,nt*.5)),lt.add(new go.PathSegment(go.PathSegment.Arc,90,-180,nt*.5,nt*.75,nt*.25,nt*.25)),lt.add(new go.PathSegment(go.PathSegment.Arc,90,180,nt*.5,nt*.25,nt*.25,nt*.25));var gt=.1,yt=.5,Lt=.25;return lt.add(new go.PathSegment(go.PathSegment.Move,(yt+gt)*nt,Lt*et)),lt.add(new go.PathSegment(go.PathSegment.Arc,0,-360,nt*yt,et*Lt,gt*nt,gt*nt).close()),lt=new go.PathFigure(nt*.5,0,!1),ht.add(lt),lt.add(new go.PathSegment(go.PathSegment.Arc,270,-180,nt*.5,nt*.5,nt*.5,nt*.5)),Lt=.75,lt=new go.PathFigure((yt+gt)*nt,Lt*et,!0),ht.add(lt),lt.add(new go.PathSegment(go.PathSegment.Arc,0,360,nt*yt,et*Lt,gt*nt,gt*nt).close()),ht.defaultStretch=go.GraphObject.Uniform,ht}),go.Shape.defineFigureGenerator("Peace",function(kt,nt,et){var ht=.8535533905932737,lt=.5*nt,gt=.5*et;return new go.Geometry().add(new go.PathFigure(lt,0,!1).add(new go.PathSegment(go.PathSegment.Arc,270,360,lt,gt,lt,gt)).add(new go.PathSegment(go.PathSegment.Line,lt,et)).add(new go.PathSegment(go.PathSegment.Move,lt,gt)).add(new go.PathSegment(go.PathSegment.Line,(1-ht)*nt,ht*et)).add(new go.PathSegment(go.PathSegment.Move,lt,gt)).add(new go.PathSegment(go.PathSegment.Line,ht*nt,ht*et)))}),go.Shape.defineFigureGenerator("NotAllowed",function(kt,nt,et){var ht=new go.Geometry,lt=ee*.5,gt=.5,yt=.5,Lt=.5,Dt=new go.PathFigure(yt*nt,(Lt-gt)*et);ht.add(Dt),Dt.add(new go.PathSegment(go.PathSegment.Bezier,(yt-gt)*nt,Lt*et,(yt-lt)*nt,(Lt-gt)*et,(yt-gt)*nt,(Lt-lt)*et)),Dt.add(new go.PathSegment(go.PathSegment.Bezier,yt*nt,(Lt+gt)*et,(yt-gt)*nt,(Lt+lt)*et,(yt-lt)*nt,(Lt+gt)*et)),Dt.add(new go.PathSegment(go.PathSegment.Bezier,(yt+gt)*nt,Lt*et,(yt+lt)*nt,(Lt+gt)*et,(yt+gt)*nt,(Lt+lt)*et)),Dt.add(new go.PathSegment(go.PathSegment.Bezier,yt*nt,(Lt-gt)*et,(yt+gt)*nt,(Lt-lt)*et,(yt+lt)*nt,(Lt-gt)*et)),gt=.4,lt=ee*.4;var zt=pt(),Xt=pt(),re=pt(),le=pt();Me(yt,Lt-gt,yt+lt,Lt-gt,yt+gt,Lt-lt,yt+gt,Lt,.42,zt,Xt,re,le,le);var ae=pt(),je=pt(),ne=pt();Me(yt,Lt-gt,yt+lt,Lt-gt,yt+gt,Lt-lt,yt+gt,Lt,.58,le,le,ne,ae,je);var Le=pt(),ue=pt(),Ee=pt();Me(yt,Lt+gt,yt-lt,Lt+gt,yt-gt,Lt+lt,yt-gt,Lt,.42,Le,ue,Ee,le,le);var ge=pt(),Ue=pt(),nn=pt();return Me(yt,Lt+gt,yt-lt,Lt+gt,yt-gt,Lt+lt,yt-gt,Lt,.58,le,le,nn,ge,Ue),Dt.add(new go.PathSegment(go.PathSegment.Move,nn.x*nt,nn.y*et)),Dt.add(new go.PathSegment(go.PathSegment.Bezier,(yt-gt)*nt,Lt*et,ge.x*nt,ge.y*et,Ue.x*nt,Ue.y*et)),Dt.add(new go.PathSegment(go.PathSegment.Bezier,yt*nt,(Lt-gt)*et,(yt-gt)*nt,(Lt-lt)*et,(yt-lt)*nt,(Lt-gt)*et)),Dt.add(new go.PathSegment(go.PathSegment.Bezier,re.x*nt,re.y*et,zt.x*nt,zt.y*et,Xt.x*nt,Xt.y*et)),Dt.add(new go.PathSegment(go.PathSegment.Line,nn.x*nt,nn.y*et).close()),Dt.add(new go.PathSegment(go.PathSegment.Move,Ee.x*nt,Ee.y*et)),Dt.add(new go.PathSegment(go.PathSegment.Line,ne.x*nt,ne.y*et)),Dt.add(new go.PathSegment(go.PathSegment.Bezier,(yt+gt)*nt,Lt*et,ae.x*nt,ae.y*et,je.x*nt,je.y*et)),Dt.add(new go.PathSegment(go.PathSegment.Bezier,yt*nt,(Lt+gt)*et,(yt+gt)*nt,(Lt+lt)*et,(yt+lt)*nt,(Lt+gt)*et)),Dt.add(new go.PathSegment(go.PathSegment.Bezier,Ee.x*nt,Ee.y*et,Le.x*nt,Le.y*et,ue.x*nt,ue.y*et).close()),Ht(zt),Ht(Xt),Ht(re),Ht(le),Ht(ae),Ht(je),Ht(ne),Ht(Le),Ht(ue),Ht(Ee),Ht(ge),Ht(Ue),Ht(nn),ht.defaultStretch=go.GraphObject.Uniform,ht}),go.Shape.defineFigureGenerator("Fragile",function(kt,nt,et){return new go.Geometry().add(new go.PathFigure(0,0,!0).add(new go.PathSegment(go.PathSegment.Line,.25*nt,0)).add(new go.PathSegment(go.PathSegment.Line,.2*nt,.15*et)).add(new go.PathSegment(go.PathSegment.Line,.3*nt,.25*et)).add(new go.PathSegment(go.PathSegment.Line,.29*nt,.33*et)).add(new go.PathSegment(go.PathSegment.Line,.35*nt,.25*et)).add(new go.PathSegment(go.PathSegment.Line,.3*nt,.15*et)).add(new go.PathSegment(go.PathSegment.Line,.4*nt,0)).add(new go.PathSegment(go.PathSegment.Line,nt,0)).add(new go.PathSegment(go.PathSegment.Bezier,.55*nt,.5*et,nt,.25*et,.75*nt,.5*et)).add(new go.PathSegment(go.PathSegment.Line,.55*nt,.9*et)).add(new go.PathSegment(go.PathSegment.Line,.7*nt,.9*et)).add(new go.PathSegment(go.PathSegment.Line,.7*nt,et)).add(new go.PathSegment(go.PathSegment.Line,.3*nt,et)).add(new go.PathSegment(go.PathSegment.Line,.3*nt,.9*et)).add(new go.PathSegment(go.PathSegment.Line,.45*nt,.9*et)).add(new go.PathSegment(go.PathSegment.Line,.45*nt,.5*et)).add(new go.PathSegment(go.PathSegment.Bezier,0,0,.25*nt,.5*et,0,.25*et).close()))}),go.Shape.setFigureParameter("HourGlass",0,new fn("Thickness",30)),go.Shape.defineFigureGenerator("HourGlass",function(kt,nt,et){var ht=kt?kt.parameter1:NaN;(isNaN(ht)||ht<0)&&(ht=30),ht>nt&&(ht=nt);var lt=(nt-ht)/2,gt=lt+ht;return new go.Geometry().add(new go.PathFigure(gt,.5*et).add(new go.PathSegment(go.PathSegment.Line,nt,et)).add(new go.PathSegment(go.PathSegment.Line,0,et)).add(new go.PathSegment(go.PathSegment.Line,lt,.5*et)).add(new go.PathSegment(go.PathSegment.Line,0,0)).add(new go.PathSegment(go.PathSegment.Line,nt,0).close()))}),go.Shape.defineFigureGenerator("Lightning",function(kt,nt,et){return new go.Geometry().add(new go.PathFigure(0,.55*et).add(new go.PathSegment(go.PathSegment.Line,.6*nt,0)).add(new go.PathSegment(go.PathSegment.Line,.3*nt,.45*et)).add(new go.PathSegment(go.PathSegment.Line,nt,.45*et)).add(new go.PathSegment(go.PathSegment.Line,.4*nt,et)).add(new go.PathSegment(go.PathSegment.Line,.7*nt,.55*et).close()))}),go.Shape.defineFigureGenerator("GenderMale",function(kt,nt,et){var ht=new go.Geometry,lt=ee*.4,gt=.4,yt=.5,Lt=.5,Dt=pt(),zt=pt(),Xt=pt(),re=pt(),le=new go.PathFigure((yt-gt)*nt,Lt*et,!1);ht.add(le),le.add(new go.PathSegment(go.PathSegment.Bezier,yt*nt,(Lt-gt)*et,(yt-gt)*nt,(Lt-lt)*et,(yt-lt)*nt,(Lt-gt)*et)),Me(yt,Lt-gt,yt+lt,Lt-gt,yt+gt,Lt-lt,yt+gt,Lt,.44,Xt,re,zt,Dt,Dt),le.add(new go.PathSegment(go.PathSegment.Bezier,zt.x*nt,zt.y*et,Xt.x*nt,Xt.y*et,re.x*nt,re.y*et));var ae=Ft(zt.x,zt.y);Me(yt,Lt-gt,yt+lt,Lt-gt,yt+gt,Lt-lt,yt+gt,Lt,.56,Dt,Dt,zt,Xt,re);var je=Ft(zt.x,zt.y);le.add(new go.PathSegment(go.PathSegment.Line,(ae.x*.1+.95*.9)*nt,ae.y*.1*et)),le.add(new go.PathSegment(go.PathSegment.Line,.85*nt,ae.y*.1*et)),le.add(new go.PathSegment(go.PathSegment.Line,.85*nt,0)),le.add(new go.PathSegment(go.PathSegment.Line,nt,0)),le.add(new go.PathSegment(go.PathSegment.Line,nt,.15*et)),le.add(new go.PathSegment(go.PathSegment.Line,(je.x*.1+.9)*nt,.15*et)),le.add(new go.PathSegment(go.PathSegment.Line,(je.x*.1+.9)*nt,(je.y*.1+.05*.9)*et)),le.add(new go.PathSegment(go.PathSegment.Line,je.x*nt,je.y*et)),le.add(new go.PathSegment(go.PathSegment.Bezier,(yt+gt)*nt,Lt*et,Xt.x*nt,Xt.y*et,re.x*nt,re.y*et)),le.add(new go.PathSegment(go.PathSegment.Bezier,yt*nt,(Lt+gt)*et,(yt+gt)*nt,(Lt+lt)*et,(yt+lt)*nt,(Lt+gt)*et)),le.add(new go.PathSegment(go.PathSegment.Bezier,(yt-gt)*nt,Lt*et,(yt-lt)*nt,(Lt+gt)*et,(yt-gt)*nt,(Lt+lt)*et)),gt=.35,lt=ee*.35;var ne=new go.PathFigure(yt*nt,(Lt-gt)*et,!1);ht.add(ne),ne.add(new go.PathSegment(go.PathSegment.Bezier,(yt-gt)*nt,Lt*et,(yt-lt)*nt,(Lt-gt)*et,(yt-gt)*nt,(Lt-lt)*et)),ne.add(new go.PathSegment(go.PathSegment.Bezier,yt*nt,(Lt+gt)*et,(yt-gt)*nt,(Lt+lt)*et,(yt-lt)*nt,(Lt+gt)*et)),ne.add(new go.PathSegment(go.PathSegment.Bezier,(yt+gt)*nt,Lt*et,(yt+lt)*nt,(Lt+gt)*et,(yt+gt)*nt,(Lt+lt)*et)),ne.add(new go.PathSegment(go.PathSegment.Bezier,yt*nt,(Lt-gt)*et,(yt+gt)*nt,(Lt-lt)*et,(yt+lt)*nt,(Lt-gt)*et));var Le=new go.PathFigure((yt-gt)*nt,Lt*et,!1);return ht.add(Le),Ht(Dt),Ht(zt),Ht(Xt),Ht(re),Ht(ae),Ht(je),ht.spot1=new go.Spot(.202,.257),ht.spot2=new go.Spot(.792,.739),ht.defaultStretch=go.GraphObject.Uniform,ht}),go.Shape.defineFigureGenerator("GenderFemale",function(kt,nt,et){var ht=new go.Geometry,lt=.375,gt=0,yt=-.125,Lt=lt*ee,Dt=new go.PathFigure((.525+gt)*nt,(.5+lt+yt)*et,!1);ht.add(Dt),Dt.add(new go.PathSegment(go.PathSegment.Bezier,(1-.5+lt+gt)*nt,(.5+yt)*et,(.5+Lt+gt)*nt,(.5+lt+yt)*et,(.5+lt+gt)*nt,(.5+Lt+yt)*et)),Dt.add(new go.PathSegment(go.PathSegment.Bezier,(.5+gt)*nt,(.5-lt+yt)*et,(1-.5+lt+gt)*nt,(.5-Lt+yt)*et,(.5+Lt+gt)*nt,(.5-lt+yt)*et)),Dt.add(new go.PathSegment(go.PathSegment.Bezier,(.5-lt+gt)*nt,(.5+yt)*et,(.5-Lt+gt)*nt,(.5-lt+yt)*et,(.5-lt+gt)*nt,(.5-Lt+yt)*et)),Dt.add(new go.PathSegment(go.PathSegment.Bezier,(.475+gt)*nt,(.5+lt+yt)*et,(.5-lt+gt)*nt,(.5+Lt+yt)*et,(.5-Lt+gt)*nt,(.5+lt+yt)*et)),Dt.add(new go.PathSegment(go.PathSegment.Line,.475*nt,.85*et)),Dt.add(new go.PathSegment(go.PathSegment.Line,.425*nt,.85*et)),Dt.add(new go.PathSegment(go.PathSegment.Line,.425*nt,.9*et)),Dt.add(new go.PathSegment(go.PathSegment.Line,.475*nt,.9*et)),Dt.add(new go.PathSegment(go.PathSegment.Line,.475*nt,et)),Dt.add(new go.PathSegment(go.PathSegment.Line,.525*nt,et)),Dt.add(new go.PathSegment(go.PathSegment.Line,.525*nt,.9*et)),Dt.add(new go.PathSegment(go.PathSegment.Line,.575*nt,.9*et)),Dt.add(new go.PathSegment(go.PathSegment.Line,.575*nt,.85*et)),Dt.add(new go.PathSegment(go.PathSegment.Line,.525*nt,.85*et).close()),lt=.325,gt=0,yt=-.125,Lt=lt*ee;var Dt=new go.PathFigure((1-.5+lt+gt)*nt,(.5+yt)*et,!1);ht.add(Dt),Dt.add(new go.PathSegment(go.PathSegment.Bezier,(.5+gt)*nt,(.5+lt+yt)*et,(.5+lt+gt)*nt,(.5+Lt+yt)*et,(.5+Lt+gt)*nt,(.5+lt+yt)*et)),Dt.add(new go.PathSegment(go.PathSegment.Bezier,(.5-lt+gt)*nt,(.5+yt)*et,(.5-Lt+gt)*nt,(.5+lt+yt)*et,(.5-lt+gt)*nt,(.5+Lt+yt)*et)),Dt.add(new go.PathSegment(go.PathSegment.Bezier,(.5+gt)*nt,(.5-lt+yt)*et,(.5-lt+gt)*nt,(.5-Lt+yt)*et,(.5-Lt+gt)*nt,(.5-lt+yt)*et)),Dt.add(new go.PathSegment(go.PathSegment.Bezier,(1-.5+lt+gt)*nt,(.5+yt)*et,(.5+Lt+gt)*nt,(.5-lt+yt)*et,(1-.5+lt+gt)*nt,(.5-Lt+yt)*et));var Dt=new go.PathFigure((.525+gt)*nt,(.5+lt+yt)*et,!1);return ht.add(Dt),ht.spot1=new go.Spot(.232,.136),ht.spot2=new go.Spot(.682,.611),ht.defaultStretch=go.GraphObject.Uniform,ht}),go.Shape.defineFigureGenerator("LogicImplies",function(kt,nt,et){var ht=kt?kt.parameter1:NaN;return isNaN(ht)&&(ht=.2),new go.Geometry().add(new go.PathFigure((1-ht)*nt,0,!1).add(new go.PathSegment(go.PathSegment.Line,nt,.5*et)).add(new go.PathSegment(go.PathSegment.Line,(1-ht)*nt,et)).add(new go.PathSegment(go.PathSegment.Move,0,.5*et)).add(new go.PathSegment(go.PathSegment.Line,nt,.5*et))).setSpots(0,0,.8,.5)}),go.Shape.defineFigureGenerator("LogicIff",function(kt,nt,et){var ht=kt?kt.parameter1:NaN;return isNaN(ht)&&(ht=.2),new go.Geometry().add(new go.PathFigure((1-ht)*nt,0,!1).add(new go.PathSegment(go.PathSegment.Line,nt,.5*et)).add(new go.PathSegment(go.PathSegment.Line,(1-ht)*nt,et)).add(new go.PathSegment(go.PathSegment.Move,0,.5*et)).add(new go.PathSegment(go.PathSegment.Line,nt,.5*et)).add(new go.PathSegment(go.PathSegment.Move,ht*nt,0)).add(new go.PathSegment(go.PathSegment.Line,0,.5*et)).add(new go.PathSegment(go.PathSegment.Line,ht*nt,et))).setSpots(.2,0,.8,.5)}),go.Shape.defineFigureGenerator("LogicNot",function(kt,nt,et){return new go.Geometry().add(new go.PathFigure(0,0,!1).add(new go.PathSegment(go.PathSegment.Line,nt,0)).add(new go.PathSegment(go.PathSegment.Line,nt,et)))}),go.Shape.defineFigureGenerator("LogicAnd",function(kt,nt,et){return new go.Geometry().add(new go.PathFigure(0,et,!1).add(new go.PathSegment(go.PathSegment.Line,.5*nt,0)).add(new go.PathSegment(go.PathSegment.Line,nt,et))).setSpots(.25,.5,.75,1)}),go.Shape.defineFigureGenerator("LogicOr",function(kt,nt,et){return new go.Geometry().add(new go.PathFigure(0,0,!1).add(new go.PathSegment(go.PathSegment.Line,.5*nt,et)).add(new go.PathSegment(go.PathSegment.Line,nt,0))).setSpots(.219,0,.78,.409)}),go.Shape.defineFigureGenerator("LogicXor",function(kt,nt,et){var ht=new go.Geometry().add(new go.PathFigure(.5*nt,0,!1).add(new go.PathSegment(go.PathSegment.Line,.5*nt,et)).add(new go.PathSegment(go.PathSegment.Move,0,.5*et)).add(new go.PathSegment(go.PathSegment.Line,nt,.5*et)).add(new go.PathSegment(go.PathSegment.Arc,0,360,.5*nt,.5*et,.5*nt,.5*et)));return ht.defaultStretch=go.GraphObject.Uniform,ht}),go.Shape.defineFigureGenerator("LogicTruth",function(kt,nt,et){return new go.Geometry().add(new go.PathFigure(0,0,!1).add(new go.PathSegment(go.PathSegment.Line,nt,0)).add(new go.PathSegment(go.PathSegment.Move,.5*nt,0)).add(new go.PathSegment(go.PathSegment.Line,.5*nt,et)))}),go.Shape.defineFigureGenerator("LogicFalsity",function(kt,nt,et){return new go.Geometry().add(new go.PathFigure(0,et,!1).add(new go.PathSegment(go.PathSegment.Line,nt,et)).add(new go.PathSegment(go.PathSegment.Move,.5*nt,et)).add(new go.PathSegment(go.PathSegment.Line,.5*nt,0)))}),go.Shape.defineFigureGenerator("LogicThereExists",function(kt,nt,et){return new go.Geometry().add(new go.PathFigure(0,0,!1).add(new go.PathSegment(go.PathSegment.Line,nt,0)).add(new go.PathSegment(go.PathSegment.Line,nt,.5*et)).add(new go.PathSegment(go.PathSegment.Line,0,.5*et)).add(new go.PathSegment(go.PathSegment.Move,nt,.5*et)).add(new go.PathSegment(go.PathSegment.Line,nt,et)).add(new go.PathSegment(go.PathSegment.Line,0,et)))}),go.Shape.defineFigureGenerator("LogicForAll",function(kt,nt,et){return new go.Geometry().add(new go.PathFigure(0,0,!1).add(new go.PathSegment(go.PathSegment.Line,.5*nt,et)).add(new go.PathSegment(go.PathSegment.Line,nt,0)).add(new go.PathSegment(go.PathSegment.Move,.25*nt,.5*et)).add(new go.PathSegment(go.PathSegment.Line,.75*nt,.5*et))).setSpots(.25,0,.75,.5)}),go.Shape.defineFigureGenerator("LogicIsDefinedAs",function(kt,nt,et){return new go.Geometry().add(new go.PathFigure(0,0,!1).add(new go.PathSegment(go.PathSegment.Line,nt,0)).add(new go.PathSegment(go.PathSegment.Move,0,.5*et)).add(new go.PathSegment(go.PathSegment.Line,nt,.5*et)).add(new go.PathSegment(go.PathSegment.Move,0,et)).add(new go.PathSegment(go.PathSegment.Line,nt,et))).setSpots(.01,.01,.99,.49)}),go.Shape.defineFigureGenerator("LogicIntersect",function(kt,nt,et){var ht=.5;return new go.Geometry().add(new go.PathFigure(0,et,!1).add(new go.PathSegment(go.PathSegment.Line,0,ht*et)).add(new go.PathSegment(go.PathSegment.Arc,180,180,ht*nt,ht*et,ht*nt,ht*et)).add(new go.PathSegment(go.PathSegment.Line,nt,et))).setSpots(0,.5,1,1)}),go.Shape.defineFigureGenerator("LogicUnion",function(kt,nt,et){var ht=.5;return new go.Geometry().add(new go.PathFigure(nt,0,!1).add(new go.PathSegment(go.PathSegment.Line,nt,ht*et)).add(new go.PathSegment(go.PathSegment.Arc,0,180,ht*nt,ht*et,ht*nt,ht*et)).add(new go.PathSegment(go.PathSegment.Line,0,0))).setSpots(0,0,1,.5)}),go.Shape.setFigureParameter("Arrow",0,new fn("ArrowheadWidth",.3,.01,.99)),go.Shape.setFigureParameter("Arrow",1,new fn("TailHeight",.3,.01,.99)),go.Shape.defineFigureGenerator("Arrow",function(kt,nt,et){var ht=kt?kt.parameter1:NaN;isNaN(ht)&&(ht=.3);var lt=kt?kt.parameter2:NaN;isNaN(lt)&&(lt=.3);var gt=(1-ht)*nt,yt=(.5-lt/2)*et,Lt=(.5+lt/2)*et,Dt=new go.Geometry,zt=new go.PathFigure(0,yt,!0);Dt.add(zt),zt.add(new go.PathSegment(go.PathSegment.Line,gt,yt)),zt.add(new go.PathSegment(go.PathSegment.Line,gt,0)),zt.add(new go.PathSegment(go.PathSegment.Line,nt,.5*et)),zt.add(new go.PathSegment(go.PathSegment.Line,gt,et)),zt.add(new go.PathSegment(go.PathSegment.Line,gt,Lt)),zt.add(new go.PathSegment(go.PathSegment.Line,0,Lt).close()),Dt.spot1=new go.Spot(0,yt/et);var Xt=ve(0,Lt/et,1,Lt/et,gt/nt,1,1,.5,pt());return Dt.spot2=new go.Spot(Xt.x,Xt.y),Ht(Xt),Dt}),go.Shape.setFigureParameter("Arrow2",0,new fn("ArrowheadWidth",30)),go.Shape.setFigureParameter("Arrow2",0,new fn("TailHeight",30)),go.Shape.defineFigureGenerator("Arrow2",function(kt,nt,et){var ht=kt?kt.parameter1:NaN;isNaN(ht)&&(ht=30),ht>nt&&(ht=nt);var lt=kt?kt.parameter2:NaN;isNaN(lt)&&(lt=30),lt=Math.min(lt,et/2);var gt=nt-ht,yt=(et-lt)/2,Lt=yt+lt,Dt=new go.Geometry,zt=new go.PathFigure(0,yt,!0);Dt.add(zt),zt.add(new go.PathSegment(go.PathSegment.Line,gt,yt)),zt.add(new go.PathSegment(go.PathSegment.Line,gt,0)),zt.add(new go.PathSegment(go.PathSegment.Line,nt,.5*et)),zt.add(new go.PathSegment(go.PathSegment.Line,gt,et)),zt.add(new go.PathSegment(go.PathSegment.Line,gt,Lt)),zt.add(new go.PathSegment(go.PathSegment.Line,0,Lt).close()),Dt.spot1=new go.Spot(0,yt/et);var Xt=ve(0,Lt/et,1,Lt/et,gt/nt,1,1,.5,pt());return Dt.spot2=new go.Spot(Xt.x,Xt.y),Ht(Xt),Dt}),go.Shape.defineFigureGenerator("Chevron",function(kt,nt,et){var ht=new go.Geometry,lt=new go.PathFigure(0,0,!0);return ht.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,.5*nt,0)),lt.add(new go.PathSegment(go.PathSegment.Line,nt,.5*et)),lt.add(new go.PathSegment(go.PathSegment.Line,.5*nt,et)),lt.add(new go.PathSegment(go.PathSegment.Line,0,et)),lt.add(new go.PathSegment(go.PathSegment.Line,.5*nt,.5*et).close()),ht}),go.Shape.defineFigureGenerator("DoubleArrow",function(kt,nt,et){var ht=new go.Geometry,lt=new go.PathFigure(0,0,!0);return ht.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,.3*nt,.214*et)),lt.add(new go.PathSegment(go.PathSegment.Line,.3*nt,0)),lt.add(new go.PathSegment(go.PathSegment.Line,1*nt,.5*et)),lt.add(new go.PathSegment(go.PathSegment.Line,.3*nt,1*et)),lt.add(new go.PathSegment(go.PathSegment.Line,.3*nt,.786*et)),lt.add(new go.PathSegment(go.PathSegment.Line,0,1*et).close()),ht}),go.Shape.setFigureParameter("DoubleEndArrow",0,new fn("ConnecterHeight",.3,.01,.99)),go.Shape.defineFigureGenerator("DoubleEndArrow",function(kt,nt,et){var ht=kt?kt.parameter1:NaN;isNaN(ht)&&(ht=.3);var lt=(.5-ht/2)*et,gt=(.5+ht/2)*et,yt=new go.Geometry,Lt=new go.PathFigure(nt,.5*et,!0);yt.add(Lt),Lt.add(new go.PathSegment(go.PathSegment.Line,.7*nt,et)),Lt.add(new go.PathSegment(go.PathSegment.Line,.7*nt,gt)),Lt.add(new go.PathSegment(go.PathSegment.Line,.3*nt,gt)),Lt.add(new go.PathSegment(go.PathSegment.Line,.3*nt,et)),Lt.add(new go.PathSegment(go.PathSegment.Line,0,.5*et)),Lt.add(new go.PathSegment(go.PathSegment.Line,.3*nt,0)),Lt.add(new go.PathSegment(go.PathSegment.Line,.3*nt,lt)),Lt.add(new go.PathSegment(go.PathSegment.Line,.7*nt,lt)),Lt.add(new go.PathSegment(go.PathSegment.Line,.7*nt,0).close());var Dt=ve(0,.5,.3,0,0,lt/et,.1,lt/et,pt());return yt.spot1=new go.Spot(Dt.x,Dt.y),Dt=ve(.7,1,1,.5,0,gt/et,1,gt/et,Dt),yt.spot2=new go.Spot(Dt.x,Dt.y),Ht(Dt),yt}),go.Shape.setFigureParameter("DoubleEndArrow2",0,new fn("ConnecterHeight",40)),go.Shape.setFigureParameter("DoubleEndArrow2",1,new fn("ArrowHeight",100)),go.Shape.defineFigureGenerator("DoubleEndArrow2",function(kt,nt,et){var ht=kt?kt.parameter1:NaN;isNaN(ht)&&(ht=40);var lt=kt?kt.parameter2:NaN;isNaN(lt)&&(lt=100);var gt=(et-ht)/2,yt=gt+ht,Lt=(et-lt)/2,Dt=Lt+lt;(ht>et||lt>et)&&(lt>ht?(ht=ht*et/lt,gt=(et-ht)/2,yt=gt+ht,Lt=0,Dt=et):(gt=0,yt=et,Lt=0,Dt=et));var zt=new go.Geometry,Xt=new go.PathFigure(nt,.5*et,!0);zt.add(Xt),Xt.add(new go.PathSegment(go.PathSegment.Line,.7*nt,Dt)),Xt.add(new go.PathSegment(go.PathSegment.Line,.7*nt,yt)),Xt.add(new go.PathSegment(go.PathSegment.Line,.3*nt,yt)),Xt.add(new go.PathSegment(go.PathSegment.Line,.3*nt,Dt)),Xt.add(new go.PathSegment(go.PathSegment.Line,0,.5*et)),Xt.add(new go.PathSegment(go.PathSegment.Line,.3*nt,Lt)),Xt.add(new go.PathSegment(go.PathSegment.Line,.3*nt,gt)),Xt.add(new go.PathSegment(go.PathSegment.Line,.7*nt,gt)),Xt.add(new go.PathSegment(go.PathSegment.Line,.7*nt,Lt).close());var re=ve(0,.5,.3,Lt/et,0,gt/et,1,gt/et,pt());return zt.spot1=new go.Spot(re.x,re.y),re=ve(.7,Dt/et,1,.5,0,yt/et,1,yt/et,re),zt.spot2=new go.Spot(re.x,re.y),Ht(re),zt}),go.Shape.setFigureParameter("IBeamArrow",0,new fn("ConnectorHeight",.7,.51,.97)),go.Shape.defineFigureGenerator("IBeamArrow",function(kt,nt,et){var ht=kt?kt.parameter1:NaN;isNaN(ht)&&(ht=.3);var lt=(.5-ht/2)*et,gt=(.5+ht/2)*et,yt=new go.Geometry,Lt=new go.PathFigure(nt,.5*et,!0);yt.add(Lt),Lt.add(new go.PathSegment(go.PathSegment.Line,.7*nt,et)),Lt.add(new go.PathSegment(go.PathSegment.Line,.7*nt,gt)),Lt.add(new go.PathSegment(go.PathSegment.Line,.2*nt,gt)),Lt.add(new go.PathSegment(go.PathSegment.Line,.2*nt,et)),Lt.add(new go.PathSegment(go.PathSegment.Line,0,et)),Lt.add(new go.PathSegment(go.PathSegment.Line,0,0)),Lt.add(new go.PathSegment(go.PathSegment.Line,.2*nt,0)),Lt.add(new go.PathSegment(go.PathSegment.Line,.2*nt,lt)),Lt.add(new go.PathSegment(go.PathSegment.Line,.7*nt,lt)),Lt.add(new go.PathSegment(go.PathSegment.Line,.7*nt,0).close()),yt.spot1=new go.Spot(0,lt/et);var Dt=ve(.7,1,1,.5,0,gt/et,1,gt/et,pt());return yt.spot2=new go.Spot(Dt.x,Dt.y),Ht(Dt),yt}),go.Shape.setFigureParameter("IBeamArrow2",0,new fn("ConnectorHeight",40)),go.Shape.setFigureParameter("IBeamArrow2",1,new fn("BeamArrowHeight",100)),go.Shape.defineFigureGenerator("IBeamArrow2",function(kt,nt,et){var ht=kt?kt.parameter1:NaN;isNaN(ht)&&(ht=40);var lt=kt?kt.parameter2:NaN;isNaN(lt)&&(lt=100);var gt=(et-ht)/2,yt=gt+ht,Lt=(et-lt)/2,Dt=Lt+lt;(ht>et||lt>et)&&(lt>ht?(ht=ht*et/lt,gt=(et-ht)/2,yt=gt+ht,Lt=0,Dt=et):(gt=0,yt=et,Lt=0,Dt=et));var zt=new go.Geometry,Xt=new go.PathFigure(nt,.5*et,!0);zt.add(Xt),Xt.add(new go.PathSegment(go.PathSegment.Line,.7*nt,Dt)),Xt.add(new go.PathSegment(go.PathSegment.Line,.7*nt,yt)),Xt.add(new go.PathSegment(go.PathSegment.Line,.2*nt,yt)),Xt.add(new go.PathSegment(go.PathSegment.Line,.2*nt,Dt)),Xt.add(new go.PathSegment(go.PathSegment.Line,0,Dt)),Xt.add(new go.PathSegment(go.PathSegment.Line,0,Lt)),Xt.add(new go.PathSegment(go.PathSegment.Line,.2*nt,Lt)),Xt.add(new go.PathSegment(go.PathSegment.Line,.2*nt,gt)),Xt.add(new go.PathSegment(go.PathSegment.Line,.7*nt,gt)),Xt.add(new go.PathSegment(go.PathSegment.Line,.7*nt,Lt).close()),zt.spot1=new go.Spot(0,gt/et);var re=ve(.7,Dt/et,1,.5,0,yt/et,1,yt/et,pt());return zt.spot2=new go.Spot(re.x,re.y),Ht(re),zt}),go.Shape.setFigureParameter("Pointer",0,new fn("BackPoint",.1,0,.2)),go.Shape.defineFigureGenerator("Pointer",function(kt,nt,et){var ht=kt?kt.parameter1:NaN;isNaN(ht)&&(ht=.1);var lt=new go.Geometry,gt=new go.PathFigure(nt,.5*et,!0);lt.add(gt),gt.add(new go.PathSegment(go.PathSegment.Line,0,et)),gt.add(new go.PathSegment(go.PathSegment.Line,ht*nt,.5*et)),gt.add(new go.PathSegment(go.PathSegment.Line,0,0).close()),lt.spot1=new go.Spot(ht,.35);var yt=ve(.2,.65,1,.65,0,1,1,.5,pt());return lt.spot2=new go.Spot(yt.x,yt.y),Ht(yt),lt}),go.Shape.setFigureParameter("RoundedPointer",0,new fn("RoundedEdge",.3,0,.5)),go.Shape.defineFigureGenerator("RoundedPointer",function(kt,nt,et){var ht=kt?kt.parameter1:NaN;isNaN(ht)&&(ht=.3);var lt=new go.Geometry,gt=new go.PathFigure(nt,.5*et,!0);lt.add(gt),gt.add(new go.PathSegment(go.PathSegment.Line,0,et)),gt.add(new go.PathSegment(go.PathSegment.Bezier,0,0,ht*nt,.75*et,ht*nt,.25*et).close()),lt.spot1=new go.Spot(ht,.35);var yt=ve(0,.65,1,.65,0,1,1,.5,pt());return lt.spot2=new go.Spot(yt.x,yt.y),Ht(yt),lt}),go.Shape.setFigureParameter("SplitEndArrow",0,new fn("TailHeight",.4,.01,.99)),go.Shape.defineFigureGenerator("SplitEndArrow",function(kt,nt,et){var ht=kt?kt.parameter1:NaN;isNaN(ht)&&(ht=.4);var lt=(.5-ht/2)*et,gt=(.5+ht/2)*et,yt=new go.Geometry,Lt=new go.PathFigure(nt,.5*et,!0);yt.add(Lt),Lt.add(new go.PathSegment(go.PathSegment.Line,.7*nt,et)),Lt.add(new go.PathSegment(go.PathSegment.Line,.7*nt,gt)),Lt.add(new go.PathSegment(go.PathSegment.Line,0,gt)),Lt.add(new go.PathSegment(go.PathSegment.Line,.2*nt,.5*et)),Lt.add(new go.PathSegment(go.PathSegment.Line,0,lt)),Lt.add(new go.PathSegment(go.PathSegment.Line,.7*nt,lt)),Lt.add(new go.PathSegment(go.PathSegment.Line,.7*nt,0).close()),yt.spot1=new go.Spot(.2,.3);var Dt=ve(.7,1,1,.5,0,gt/et,1,gt/et,pt());return yt.spot2=new go.Spot(Dt.x,Dt.y),Ht(Dt),yt}),go.Shape.setFigureParameter("SplitEndArrow2",0,new fn("TailThickness",50)),go.Shape.defineFigureGenerator("SplitEndArrow2",function(kt,nt,et){var ht=kt?kt.parameter1:NaN;isNaN(ht)&&(ht=50);var lt=(et-ht)/2,gt=lt+ht;ht>et&&(lt=0,gt=et);var yt=new go.Geometry,Lt=new go.PathFigure(nt,.5*et,!0);yt.add(Lt),Lt.add(new go.PathSegment(go.PathSegment.Line,.7*nt,et)),Lt.add(new go.PathSegment(go.PathSegment.Line,.7*nt,gt)),Lt.add(new go.PathSegment(go.PathSegment.Line,0,gt)),Lt.add(new go.PathSegment(go.PathSegment.Line,.2*nt,.5*et)),Lt.add(new go.PathSegment(go.PathSegment.Line,0,lt)),Lt.add(new go.PathSegment(go.PathSegment.Line,.7*nt,lt)),Lt.add(new go.PathSegment(go.PathSegment.Line,.7*nt,0).close()),yt.spot1=new go.Spot(.2,lt/et);var Dt=ve(.7,1,1,.5,0,gt/et,1,gt/et,pt());return yt.spot2=new go.Spot(Dt.x,Dt.y),Ht(Dt),yt}),go.Shape.setFigureParameter("SquareArrow",0,new fn("ArrowPoint",.7,.2,.9)),go.Shape.defineFigureGenerator("SquareArrow",function(kt,nt,et){var ht=kt?kt.parameter1:NaN;isNaN(ht)&&(ht=.7);var lt=new go.Geometry,gt=new go.PathFigure(nt,.5*et,!0);return lt.add(gt),gt.add(new go.PathSegment(go.PathSegment.Line,ht*nt,et)),gt.add(new go.PathSegment(go.PathSegment.Line,0,et)),gt.add(new go.PathSegment(go.PathSegment.Line,0,0)),gt.add(new go.PathSegment(go.PathSegment.Line,ht*nt,0).close()),lt.spot1=go.Spot.TopLeft,lt.spot2=new go.Spot(ht,1),lt}),go.Shape.defineFigureGenerator("Cone1",function(kt,nt,et){var ht=new go.Geometry,lt=ee*.5,gt=ee*.1,yt=new go.PathFigure(0,.9*et,!0);return ht.add(yt),yt.add(new go.PathSegment(go.PathSegment.Line,.5*nt,0)),yt.add(new go.PathSegment(go.PathSegment.Line,nt,.9*et)),yt.add(new go.PathSegment(go.PathSegment.Bezier,.5*nt,et,nt,(.9+gt)*et,(.5+lt)*nt,et)),yt.add(new go.PathSegment(go.PathSegment.Bezier,0,.9*et,(.5-lt)*nt,et,0,(.9+gt)*et).close()),ht.spot1=new go.Spot(.25,.5),ht.spot2=new go.Spot(.75,.97),ht}),go.Shape.defineFigureGenerator("Cone2",function(kt,nt,et){var ht=new go.Geometry,lt=new go.PathFigure(0,.9*et,!0);ht.add(lt),lt.add(new go.PathSegment(go.PathSegment.Bezier,nt,.9*et,(1-.85/.9)*nt,et,.85/.9*nt,et)),lt.add(new go.PathSegment(go.PathSegment.Line,.5*nt,0)),lt.add(new go.PathSegment(go.PathSegment.Line,0,.9*et).close());var gt=new go.PathFigure(0,.9*et,!1);return ht.add(gt),gt.add(new go.PathSegment(go.PathSegment.Bezier,nt,.9*et,(1-.85/.9)*nt,.8*et,.85/.9*nt,.8*et)),ht.spot1=new go.Spot(.25,.5),ht.spot2=new go.Spot(.75,.82),ht}),go.Shape.defineFigureGenerator("Cube1",function(kt,nt,et){var ht=new go.Geometry,lt=new go.PathFigure(.5*nt,et,!0);ht.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,nt,.85*et)),lt.add(new go.PathSegment(go.PathSegment.Line,nt,.15*et)),lt.add(new go.PathSegment(go.PathSegment.Line,.5*nt,0)),lt.add(new go.PathSegment(go.PathSegment.Line,0,.15*et)),lt.add(new go.PathSegment(go.PathSegment.Line,0,.85*et).close());var gt=new go.PathFigure(.5*nt,et,!1);return ht.add(gt),gt.add(new go.PathSegment(go.PathSegment.Line,.5*nt,.3*et)),gt.add(new go.PathSegment(go.PathSegment.Line,0,.15*et)),gt.add(new go.PathSegment(go.PathSegment.Move,.5*nt,.3*et)),gt.add(new go.PathSegment(go.PathSegment.Line,nt,.15*et)),ht.spot1=new go.Spot(0,.3),ht.spot2=new go.Spot(.5,.85),ht}),go.Shape.defineFigureGenerator("Cube2",function(kt,nt,et){var ht=new go.Geometry,lt=new go.PathFigure(0,.3*et,!0);ht.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,0,et)),lt.add(new go.PathSegment(go.PathSegment.Line,.7*nt,et)),lt.add(new go.PathSegment(go.PathSegment.Line,nt,.7*et)),lt.add(new go.PathSegment(go.PathSegment.Line,nt,0)),lt.add(new go.PathSegment(go.PathSegment.Line,.3*nt,0).close());var gt=new go.PathFigure(0,.3*et,!1);return ht.add(gt),gt.add(new go.PathSegment(go.PathSegment.Line,.7*nt,.3*et)),gt.add(new go.PathSegment(go.PathSegment.Line,nt,0)),gt.add(new go.PathSegment(go.PathSegment.Move,.7*nt,.3*et)),gt.add(new go.PathSegment(go.PathSegment.Line,.7*nt,et)),ht.spot1=new go.Spot(0,.3),ht.spot2=new go.Spot(.7,1),ht}),go.Shape.defineFigureGenerator("Cylinder1",function(kt,nt,et){var ht=kt?kt.parameter1:NaN;isNaN(ht)&&(ht=5),ht=Math.min(ht,et/3);var lt=new go.Geometry,gt=ee*.5,yt=new go.PathFigure(0,ht,!0);lt.add(yt),yt.add(new go.PathSegment(go.PathSegment.Bezier,.5*nt,0,0,ee*ht,(.5-gt)*nt,0)),yt.add(new go.PathSegment(go.PathSegment.Bezier,1*nt,ht,(.5+gt)*nt,0,1*nt,ee*ht)),yt.add(new go.PathSegment(go.PathSegment.Line,nt,et-ht)),yt.add(new go.PathSegment(go.PathSegment.Bezier,.5*nt,1*et,1*nt,et-ee*ht,(.5+gt)*nt,1*et)),yt.add(new go.PathSegment(go.PathSegment.Bezier,0,et-ht,(.5-gt)*nt,1*et,0,et-ee*ht)),yt.add(new go.PathSegment(go.PathSegment.Line,0,ht));var Lt=new go.PathFigure(nt,ht,!1);return lt.add(Lt),Lt.add(new go.PathSegment(go.PathSegment.Bezier,.5*nt,2*ht,1*nt,2*ht-ee*ht,(.5+gt)*nt,2*ht)),Lt.add(new go.PathSegment(go.PathSegment.Bezier,0,ht,(.5-gt)*nt,2*ht,0,2*ht-ee*ht)),lt.spot1=new go.Spot(0,0,0,2*ht),lt.spot2=new go.Spot(1,1),lt}),go.Shape.defineFigureGenerator("Cylinder2",function(kt,nt,et){var ht=kt?kt.parameter1:NaN;isNaN(ht)&&(ht=5),ht=Math.min(ht,et/3);var lt=new go.Geometry,gt=ee*.5,yt=new go.PathFigure(0,et-ht,!0);lt.add(yt),yt.add(new go.PathSegment(go.PathSegment.Line,0,ht)),yt.add(new go.PathSegment(go.PathSegment.Bezier,.5*nt,0,0,ee*ht,(.5-gt)*nt,0)),yt.add(new go.PathSegment(go.PathSegment.Bezier,nt,ht,(.5+gt)*nt,0,nt,ee*ht)),yt.add(new go.PathSegment(go.PathSegment.Line,nt,et-ht)),yt.add(new go.PathSegment(go.PathSegment.Bezier,.5*nt,et,nt,et-ee*ht,(.5+gt)*nt,et)),yt.add(new go.PathSegment(go.PathSegment.Bezier,0,et-ht,(.5-gt)*nt,et,0,et-ee*ht));var Lt=new go.PathFigure(0,et-ht,!1);return lt.add(Lt),Lt.add(new go.PathSegment(go.PathSegment.Bezier,.5*nt,et-2*ht,0,et-ht-ee*ht,(.5-gt)*nt,et-2*ht)),Lt.add(new go.PathSegment(go.PathSegment.Bezier,nt,et-ht,(.5+gt)*nt,et-2*ht,nt,et-ht-ee*ht)),lt.spot1=new go.Spot(0,0),lt.spot2=new go.Spot(1,1,0,-2*ht),lt}),go.Shape.defineFigureGenerator("Cylinder3",function(kt,nt,et){var ht=kt?kt.parameter1:NaN;isNaN(ht)&&(ht=5),ht=Math.min(ht,nt/3);var lt=new go.Geometry,gt=ee*.5,yt=new go.PathFigure(ht,0,!0);lt.add(yt),yt.add(new go.PathSegment(go.PathSegment.Line,nt-ht,0)),yt.add(new go.PathSegment(go.PathSegment.Bezier,nt,.5*et,nt-ee*ht,0,nt,(.5-gt)*et)),yt.add(new go.PathSegment(go.PathSegment.Bezier,nt-ht,et,nt,(.5+gt)*et,nt-ee*ht,et)),yt.add(new go.PathSegment(go.PathSegment.Line,ht,et)),yt.add(new go.PathSegment(go.PathSegment.Bezier,0,.5*et,ee*ht,et,0,(.5+gt)*et)),yt.add(new go.PathSegment(go.PathSegment.Bezier,ht,0,0,(.5-gt)*et,ee*ht,0));var Lt=new go.PathFigure(ht,0,!1);return lt.add(Lt),Lt.add(new go.PathSegment(go.PathSegment.Bezier,2*ht,.5*et,ht+ee*ht,0,2*ht,(.5-gt)*et)),Lt.add(new go.PathSegment(go.PathSegment.Bezier,ht,et,2*ht,(.5+gt)*et,ht+ee*ht,et)),lt.spot1=new go.Spot(0,0,2*ht,0),lt.spot2=new go.Spot(1,1),lt}),go.Shape.defineFigureGenerator("Cylinder4",function(kt,nt,et){var ht=kt?kt.parameter1:NaN;isNaN(ht)&&(ht=5),ht=Math.min(ht,nt/3);var lt=new go.Geometry,gt=ee*.5,yt=new go.PathFigure(nt-ht,0,!0);lt.add(yt),yt.add(new go.PathSegment(go.PathSegment.Bezier,nt,.5*et,nt-ee*ht,0,nt,(.5-gt)*et)),yt.add(new go.PathSegment(go.PathSegment.Bezier,nt-ht,et,nt,(.5+gt)*et,nt-ee*ht,et)),yt.add(new go.PathSegment(go.PathSegment.Line,ht,et)),yt.add(new go.PathSegment(go.PathSegment.Bezier,0,.5*et,ee*ht,et,0,(.5+gt)*et)),yt.add(new go.PathSegment(go.PathSegment.Bezier,ht,0,0,(.5-gt)*et,ee*ht,0)),yt.add(new go.PathSegment(go.PathSegment.Line,nt-ht,0));var Lt=new go.PathFigure(nt-ht,0,!1);return lt.add(Lt),Lt.add(new go.PathSegment(go.PathSegment.Bezier,nt-2*ht,.5*et,nt-ht-ee*ht,0,nt-2*ht,(.5-gt)*et)),Lt.add(new go.PathSegment(go.PathSegment.Bezier,nt-ht,et,nt-2*ht,(.5+gt)*et,nt-ht-ee*ht,et)),lt.spot1=new go.Spot(0,0),lt.spot2=new go.Spot(1,1,-2*ht,0),lt}),go.Shape.defineFigureGenerator("Prism1",function(kt,nt,et){var ht=new go.Geometry,lt=new go.PathFigure(.25*nt,.25*et,!0);ht.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,.75*nt,0)),lt.add(new go.PathSegment(go.PathSegment.Line,nt,.5*et)),lt.add(new go.PathSegment(go.PathSegment.Line,.5*nt,et)),lt.add(new go.PathSegment(go.PathSegment.Line,0,et).close());var gt=new go.PathFigure(.25*nt,.25*et,!1);return ht.add(gt),gt.add(new go.PathSegment(go.PathSegment.Line,.5*nt,et)),ht.spot1=new go.Spot(.408,.172),ht.spot2=new go.Spot(.833,.662),ht}),go.Shape.defineFigureGenerator("Prism2",function(kt,nt,et){var ht=new go.Geometry,lt=new go.PathFigure(0,.25*et,!0);ht.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,.75*nt,0)),lt.add(new go.PathSegment(go.PathSegment.Line,nt,.25*et)),lt.add(new go.PathSegment(go.PathSegment.Line,.75*nt,.75*et)),lt.add(new go.PathSegment(go.PathSegment.Line,0,et).close());var gt=new go.PathFigure(0,et,!1);return ht.add(gt),gt.add(new go.PathSegment(go.PathSegment.Line,.25*nt,.5*et)),gt.add(new go.PathSegment(go.PathSegment.Line,nt,.25*et)),gt.add(new go.PathSegment(go.PathSegment.Move,0,.25*et)),gt.add(new go.PathSegment(go.PathSegment.Line,.25*nt,.5*et)),ht.spot1=new go.Spot(.25,.5),ht.spot2=new go.Spot(.75,.75),ht}),go.Shape.defineFigureGenerator("Pyramid1",function(kt,nt,et){var ht=new go.Geometry,lt=new go.PathFigure(.5*nt,0,!0);ht.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,nt,.75*et)),lt.add(new go.PathSegment(go.PathSegment.Line,.5*nt,et)),lt.add(new go.PathSegment(go.PathSegment.Line,0,.75*et).close());var gt=new go.PathFigure(.5*nt,0,!1);return ht.add(gt),gt.add(new go.PathSegment(go.PathSegment.Line,.5*nt,et)),ht.spot1=new go.Spot(.25,.367),ht.spot2=new go.Spot(.75,.875),ht}),go.Shape.defineFigureGenerator("Pyramid2",function(kt,nt,et){var ht=new go.Geometry,lt=new go.PathFigure(.5*nt,0,!0);ht.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,nt,.85*et)),lt.add(new go.PathSegment(go.PathSegment.Line,.5*nt,et)),lt.add(new go.PathSegment(go.PathSegment.Line,0,.85*et).close());var gt=new go.PathFigure(.5*nt,0,!1);return ht.add(gt),gt.add(new go.PathSegment(go.PathSegment.Line,.5*nt,.7*et)),gt.add(new go.PathSegment(go.PathSegment.Line,0,.85*et)),gt.add(new go.PathSegment(go.PathSegment.Move,.5*nt,.7*et)),gt.add(new go.PathSegment(go.PathSegment.Line,nt,.85*et)),ht.spot1=new go.Spot(.25,.367),ht.spot2=new go.Spot(.75,.875),ht}),go.Shape.defineFigureGenerator("Actor",function(kt,nt,et){var ht=new go.Geometry,lt=.2,gt=.1,yt=ee*lt,Lt=ee*gt,Dt=.5,zt=.1,Xt=new go.PathFigure(Dt*nt,(zt+gt)*et,!0);ht.add(Xt),Xt.add(new go.PathSegment(go.PathSegment.Bezier,(Dt-lt)*nt,zt*et,(Dt-yt)*nt,(zt+gt)*et,(Dt-lt)*nt,(zt+Lt)*et)),Xt.add(new go.PathSegment(go.PathSegment.Bezier,Dt*nt,(zt-gt)*et,(Dt-lt)*nt,(zt-Lt)*et,(Dt-yt)*nt,(zt-gt)*et)),Xt.add(new go.PathSegment(go.PathSegment.Bezier,(Dt+lt)*nt,zt*et,(Dt+yt)*nt,(zt-gt)*et,(Dt+lt)*nt,(zt-Lt)*et)),Xt.add(new go.PathSegment(go.PathSegment.Bezier,Dt*nt,(zt+gt)*et,(Dt+lt)*nt,(zt+Lt)*et,(Dt+yt)*nt,(zt+gt)*et));var re=.05,le=ee*re;Dt=.05,zt=.25;var ae=new go.PathFigure(.5*nt,.2*et,!0);return ht.add(ae),ae.add(new go.PathSegment(go.PathSegment.Line,.95*nt,.2*et)),Dt=.95,zt=.25,ae.add(new go.PathSegment(go.PathSegment.Bezier,(Dt+re)*nt,zt*et,(Dt+le)*nt,(zt-re)*et,(Dt+re)*nt,(zt-le)*et)),ae.add(new go.PathSegment(go.PathSegment.Line,nt,.6*et)),ae.add(new go.PathSegment(go.PathSegment.Line,.85*nt,.6*et)),ae.add(new go.PathSegment(go.PathSegment.Line,.85*nt,.35*et)),re=.025,le=ee*re,Dt=.825,zt=.35,ae.add(new go.PathSegment(go.PathSegment.Bezier,Dt*nt,(zt-re)*et,(Dt+re)*nt,(zt-le)*et,(Dt+le)*nt,(zt-re)*et)),ae.add(new go.PathSegment(go.PathSegment.Bezier,(Dt-re)*nt,zt*et,(Dt-le)*nt,(zt-re)*et,(Dt-re)*nt,(zt-le)*et)),ae.add(new go.PathSegment(go.PathSegment.Line,.8*nt,et)),ae.add(new go.PathSegment(go.PathSegment.Line,.55*nt,et)),ae.add(new go.PathSegment(go.PathSegment.Line,.55*nt,.7*et)),re=.05,le=ee*re,Dt=.5,zt=.7,ae.add(new go.PathSegment(go.PathSegment.Bezier,Dt*nt,(zt-re)*et,(Dt+re)*nt,(zt-le)*et,(Dt+le)*nt,(zt-re)*et)),ae.add(new go.PathSegment(go.PathSegment.Bezier,(Dt-re)*nt,zt*et,(Dt-le)*nt,(zt-re)*et,(Dt-re)*nt,(zt-le)*et)),ae.add(new go.PathSegment(go.PathSegment.Line,.45*nt,et)),ae.add(new go.PathSegment(go.PathSegment.Line,.2*nt,et)),ae.add(new go.PathSegment(go.PathSegment.Line,.2*nt,.35*et)),re=.025,le=ee*re,Dt=.175,zt=.35,ae.add(new go.PathSegment(go.PathSegment.Bezier,Dt*nt,(zt-re)*et,(Dt+re)*nt,(zt-le)*et,(Dt+le)*nt,(zt-re)*et)),ae.add(new go.PathSegment(go.PathSegment.Bezier,(Dt-re)*nt,zt*et,(Dt-le)*nt,(zt-re)*et,(Dt-re)*nt,(zt-le)*et)),ae.add(new go.PathSegment(go.PathSegment.Line,.15*nt,.6*et)),ae.add(new go.PathSegment(go.PathSegment.Line,0,.6*et)),ae.add(new go.PathSegment(go.PathSegment.Line,0,.25*et)),re=.05,le=ee*re,Dt=.05,zt=.25,ae.add(new go.PathSegment(go.PathSegment.Bezier,Dt*nt,(zt-re)*et,(Dt-re)*nt,(zt-le)*et,(Dt-le)*nt,(zt-re)*et)),ae.add(new go.PathSegment(go.PathSegment.Line,.5*nt,.2*et)),ht.spot1=new go.Spot(.2,.2),ht.spot2=new go.Spot(.8,.65),ht}),go.Shape.setFigureParameter("Card",0,new fn("CornerCutoutSize",.2,.1,.9)),go.Shape.defineFigureGenerator("Card",function(kt,nt,et){var ht=kt?kt.parameter1:NaN;isNaN(ht)&&(ht=.2);var lt=new go.Geometry,gt=new go.PathFigure(nt,0,!0);return lt.add(gt),gt.add(new go.PathSegment(go.PathSegment.Line,nt,et)),gt.add(new go.PathSegment(go.PathSegment.Line,0,et)),gt.add(new go.PathSegment(go.PathSegment.Line,0,ht*et)),gt.add(new go.PathSegment(go.PathSegment.Line,ht*nt,0).close()),lt.spot1=new go.Spot(0,ht),lt.spot2=go.Spot.BottomRight,lt}),go.Shape.defineFigureGenerator("Collate",function(kt,nt,et){var ht=new go.Geometry,lt=new go.PathFigure(.5*nt,.5*et,!0);ht.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,0,0)),lt.add(new go.PathSegment(go.PathSegment.Line,nt,0)),lt.add(new go.PathSegment(go.PathSegment.Line,.5*nt,.5*et));var gt=new go.PathFigure(.5*nt,.5*et,!0);return ht.add(gt),gt.add(new go.PathSegment(go.PathSegment.Line,nt,et)),gt.add(new go.PathSegment(go.PathSegment.Line,0,et)),gt.add(new go.PathSegment(go.PathSegment.Line,.5*nt,.5*et)),ht.spot1=new go.Spot(.25,0),ht.spot2=new go.Spot(.75,.25),ht}),go.Shape.defineFigureGenerator("CreateRequest",function(kt,nt,et){var ht=new go.Geometry,lt=kt?kt.parameter1:NaN;isNaN(lt)&&(lt=.1);var gt=new go.PathFigure(0,0,!0);ht.add(gt),gt.add(new go.PathSegment(go.PathSegment.Line,nt,0)),gt.add(new go.PathSegment(go.PathSegment.Line,nt,et)),gt.add(new go.PathSegment(go.PathSegment.Line,0,et).close());var yt=new go.PathFigure(0,lt*et,!1);return ht.add(yt),yt.add(new go.PathSegment(go.PathSegment.Line,nt,lt*et)),yt.add(new go.PathSegment(go.PathSegment.Move,0,(1-lt)*et)),yt.add(new go.PathSegment(go.PathSegment.Line,nt,(1-lt)*et)),ht}),go.Shape.defineFigureGenerator("Database",function(kt,nt,et){var ht=new go.Geometry,lt=ee*.5,gt=ee*.1,yt=new go.PathFigure(nt,.1*et,!0);ht.add(yt),yt.add(new go.PathSegment(go.PathSegment.Line,nt,.9*et)),yt.add(new go.PathSegment(go.PathSegment.Bezier,.5*nt,et,nt,(.9+gt)*et,(.5+lt)*nt,et)),yt.add(new go.PathSegment(go.PathSegment.Bezier,0,.9*et,(.5-lt)*nt,et,0,(.9+gt)*et)),yt.add(new go.PathSegment(go.PathSegment.Line,0,.1*et)),yt.add(new go.PathSegment(go.PathSegment.Bezier,.5*nt,0,0,(.1-gt)*et,(.5-lt)*nt,0)),yt.add(new go.PathSegment(go.PathSegment.Bezier,nt,.1*et,(.5+lt)*nt,0,nt,(.1-gt)*et));var Lt=new go.PathFigure(nt,.1*et,!1);return ht.add(Lt),Lt.add(new go.PathSegment(go.PathSegment.Bezier,.5*nt,.2*et,nt,(.1+gt)*et,(.5+lt)*nt,.2*et)),Lt.add(new go.PathSegment(go.PathSegment.Bezier,0,.1*et,(.5-lt)*nt,.2*et,0,(.1+gt)*et)),Lt.add(new go.PathSegment(go.PathSegment.Move,nt,.2*et)),Lt.add(new go.PathSegment(go.PathSegment.Bezier,.5*nt,.3*et,nt,(.2+gt)*et,(.5+lt)*nt,.3*et)),Lt.add(new go.PathSegment(go.PathSegment.Bezier,0,.2*et,(.5-lt)*nt,.3*et,0,(.2+gt)*et)),Lt.add(new go.PathSegment(go.PathSegment.Move,nt,.3*et)),Lt.add(new go.PathSegment(go.PathSegment.Bezier,.5*nt,.4*et,nt,(.3+gt)*et,(.5+lt)*nt,.4*et)),Lt.add(new go.PathSegment(go.PathSegment.Bezier,0,.3*et,(.5-lt)*nt,.4*et,0,(.3+gt)*et)),ht.spot1=new go.Spot(0,.4),ht.spot2=new go.Spot(1,.9),ht}),go.Shape.defineFigureGenerator("DataStorage",function(kt,nt,et){var ht=new go.Geometry,lt=new go.PathFigure(0,0,!0);return ht.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,.75*nt,0)),lt.add(new go.PathSegment(go.PathSegment.Bezier,.75*nt,et,nt,0,nt,et)),lt.add(new go.PathSegment(go.PathSegment.Line,0,et)),lt.add(new go.PathSegment(go.PathSegment.Bezier,0,0,.25*nt,.9*et,.25*nt,.1*et).close()),ht.spot1=new go.Spot(.226,0),ht.spot2=new go.Spot(.81,1),ht}),go.Shape.defineFigureGenerator("DiskStorage",function(kt,nt,et){var ht=new go.Geometry,lt=ee*.5,gt=ee*.1,yt=new go.PathFigure(nt,.1*et,!0);ht.add(yt),yt.add(new go.PathSegment(go.PathSegment.Line,nt,.9*et)),yt.add(new go.PathSegment(go.PathSegment.Bezier,.5*nt,et,nt,(.9+gt)*et,(.5+lt)*nt,et)),yt.add(new go.PathSegment(go.PathSegment.Bezier,0,.9*et,(.5-lt)*nt,et,0,(.9+gt)*et)),yt.add(new go.PathSegment(go.PathSegment.Line,0,.1*et)),yt.add(new go.PathSegment(go.PathSegment.Bezier,.5*nt,0,0,(.1-gt)*et,(.5-lt)*nt,0)),yt.add(new go.PathSegment(go.PathSegment.Bezier,nt,.1*et,(.5+lt)*nt,0,nt,(.1-gt)*et));var Lt=new go.PathFigure(nt,.1*et,!1);return ht.add(Lt),Lt.add(new go.PathSegment(go.PathSegment.Bezier,.5*nt,.2*et,nt,(.1+gt)*et,(.5+lt)*nt,.2*et)),Lt.add(new go.PathSegment(go.PathSegment.Bezier,0,.1*et,(.5-lt)*nt,.2*et,0,(.1+gt)*et)),Lt.add(new go.PathSegment(go.PathSegment.Move,nt,.2*et)),Lt.add(new go.PathSegment(go.PathSegment.Bezier,.5*nt,.3*et,nt,(.2+gt)*et,(.5+lt)*nt,.3*et)),Lt.add(new go.PathSegment(go.PathSegment.Bezier,0,.2*et,(.5-lt)*nt,.3*et,0,(.2+gt)*et)),ht.spot1=new go.Spot(0,.3),ht.spot2=new go.Spot(1,.9),ht}),go.Shape.defineFigureGenerator("Display",function(kt,nt,et){var ht=new go.Geometry,lt=new go.PathFigure(.25*nt,0,!0);return ht.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,.75*nt,0)),lt.add(new go.PathSegment(go.PathSegment.Bezier,.75*nt,et,nt,0,nt,et)),lt.add(new go.PathSegment(go.PathSegment.Line,.25*nt,et)),lt.add(new go.PathSegment(go.PathSegment.Line,0,.5*et).close()),ht.spot1=new go.Spot(.25,0),ht.spot2=new go.Spot(.75,1),ht}),go.Shape.defineFigureGenerator("DividedEvent",function(kt,nt,et){var ht=new go.Geometry,lt=kt?kt.parameter1:NaN;isNaN(lt)?lt=.2:lt<.15&&(lt=.15);var gt=ee*.2,yt=new go.PathFigure(0,.2*et,!0);ht.add(yt),yt.add(new go.PathSegment(go.PathSegment.Bezier,.2*nt,0,0,(.2-gt)*et,(.2-gt)*nt,0)),yt.add(new go.PathSegment(go.PathSegment.Line,.8*nt,0)),yt.add(new go.PathSegment(go.PathSegment.Bezier,nt,.2*et,(.8+gt)*nt,0,nt,(.2-gt)*et)),yt.add(new go.PathSegment(go.PathSegment.Line,nt,.8*et)),yt.add(new go.PathSegment(go.PathSegment.Bezier,.8*nt,et,nt,(.8+gt)*et,(.8+gt)*nt,et)),yt.add(new go.PathSegment(go.PathSegment.Line,.2*nt,et)),yt.add(new go.PathSegment(go.PathSegment.Bezier,0,.8*et,(.2-gt)*nt,et,0,(.8+gt)*et)),yt.add(new go.PathSegment(go.PathSegment.Line,0,.2*et));var Lt=new go.PathFigure(0,lt*et,!1);return ht.add(Lt),Lt.add(new go.PathSegment(go.PathSegment.Line,nt,lt*et)),ht}),go.Shape.defineFigureGenerator("DividedProcess",function(kt,nt,et){var ht=new go.Geometry,lt=kt?kt.parameter1:NaN;(isNaN(lt)||lt<.1)&&(lt=.1);var gt=new go.PathFigure(0,0,!0);ht.add(gt),gt.add(new go.PathSegment(go.PathSegment.Line,nt,0)),gt.add(new go.PathSegment(go.PathSegment.Line,nt,et)),gt.add(new go.PathSegment(go.PathSegment.Line,0,et).close());var yt=new go.PathFigure(0,lt*et,!1);return ht.add(yt),yt.add(new go.PathSegment(go.PathSegment.Line,nt,lt*et)),ht}),go.Shape.defineFigureGenerator("Document",function(kt,nt,et){var ht=new go.Geometry;et=et/.8;var lt=new go.PathFigure(0,.7*et,!0);return ht.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,0,0)),lt.add(new go.PathSegment(go.PathSegment.Line,nt,0)),lt.add(new go.PathSegment(go.PathSegment.Line,nt,.7*et)),lt.add(new go.PathSegment(go.PathSegment.Bezier,0,.7*et,.5*nt,.4*et,.5*nt,et).close()),ht.spot1=go.Spot.TopLeft,ht.spot2=new go.Spot(1,.6),ht}),go.Shape.defineFigureGenerator("ExternalOrganization",function(kt,nt,et){var ht=new go.Geometry,lt=kt?kt.parameter1:NaN;(isNaN(lt)||lt<.2)&&(lt=.2);var gt=new go.PathFigure(0,0,!0);ht.add(gt),gt.add(new go.PathSegment(go.PathSegment.Line,nt,0)),gt.add(new go.PathSegment(go.PathSegment.Line,nt,et)),gt.add(new go.PathSegment(go.PathSegment.Line,0,et).close());var yt=new go.PathFigure(lt*nt,0,!1);return ht.add(yt),yt.add(new go.PathSegment(go.PathSegment.Line,0,lt*et)),yt.add(new go.PathSegment(go.PathSegment.Move,nt,lt*et)),yt.add(new go.PathSegment(go.PathSegment.Line,(1-lt)*nt,0)),yt.add(new go.PathSegment(go.PathSegment.Move,0,(1-lt)*et)),yt.add(new go.PathSegment(go.PathSegment.Line,lt*nt,et)),yt.add(new go.PathSegment(go.PathSegment.Move,(1-lt)*nt,et)),yt.add(new go.PathSegment(go.PathSegment.Line,nt,(1-lt)*et)),ht}),go.Shape.defineFigureGenerator("ExternalProcess",function(kt,nt,et){var ht=new go.Geometry,lt=new go.PathFigure(.5*nt,0,!0);ht.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,nt,.5*et)),lt.add(new go.PathSegment(go.PathSegment.Line,.5*nt,et)),lt.add(new go.PathSegment(go.PathSegment.Line,0,.5*et).close());var gt=new go.PathFigure(.1*nt,.4*et,!1);return ht.add(gt),gt.add(new go.PathSegment(go.PathSegment.Line,.1*nt,.6*et)),gt.add(new go.PathSegment(go.PathSegment.Move,.9*nt,.6*et)),gt.add(new go.PathSegment(go.PathSegment.Line,.9*nt,.4*et)),gt.add(new go.PathSegment(go.PathSegment.Move,.6*nt,.1*et)),gt.add(new go.PathSegment(go.PathSegment.Line,.4*nt,.1*et)),gt.add(new go.PathSegment(go.PathSegment.Move,.4*nt,.9*et)),gt.add(new go.PathSegment(go.PathSegment.Line,.6*nt,.9*et)),ht.spot1=new go.Spot(.25,.25),ht.spot2=new go.Spot(.75,.75),ht}),go.Shape.defineFigureGenerator("File",function(kt,nt,et){var ht=new go.Geometry,lt=new go.PathFigure(0,0,!0);ht.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,.75*nt,0)),lt.add(new go.PathSegment(go.PathSegment.Line,nt,.25*et)),lt.add(new go.PathSegment(go.PathSegment.Line,nt,et)),lt.add(new go.PathSegment(go.PathSegment.Line,0,et).close());var gt=new go.PathFigure(.75*nt,0,!1);return ht.add(gt),gt.add(new go.PathSegment(go.PathSegment.Line,.75*nt,.25*et)),gt.add(new go.PathSegment(go.PathSegment.Line,nt,.25*et)),ht.spot1=new go.Spot(0,.25),ht.spot2=go.Spot.BottomRight,ht}),go.Shape.defineFigureGenerator("Interrupt",function(kt,nt,et){var ht=new go.Geometry,lt=new go.PathFigure(nt,.5*et,!0);ht.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,0,et)),lt.add(new go.PathSegment(go.PathSegment.Line,0,0)),lt.add(new go.PathSegment(go.PathSegment.Line,nt,.5*et));var gt=new go.PathFigure(nt,.5*et,!1);ht.add(gt),gt.add(new go.PathSegment(go.PathSegment.Line,nt,et));var yt=new go.PathFigure(nt,.5*et,!1);return ht.add(yt),yt.add(new go.PathSegment(go.PathSegment.Line,nt,0)),ht.spot1=new go.Spot(0,.25),ht.spot2=new go.Spot(.5,.75),ht}),go.Shape.defineFigureGenerator("InternalStorage",function(kt,nt,et){var ht=new go.Geometry,lt=kt?kt.parameter1:NaN,gt=kt?kt.parameter2:NaN;isNaN(lt)&&(lt=.1),isNaN(gt)&&(gt=.1);var yt=new go.PathFigure(0,0,!0);ht.add(yt),yt.add(new go.PathSegment(go.PathSegment.Line,nt,0)),yt.add(new go.PathSegment(go.PathSegment.Line,nt,et)),yt.add(new go.PathSegment(go.PathSegment.Line,0,et).close());var Lt=new go.PathFigure(lt*nt,0,!1);return ht.add(Lt),Lt.add(new go.PathSegment(go.PathSegment.Line,lt*nt,et)),Lt.add(new go.PathSegment(go.PathSegment.Move,0,gt*et)),Lt.add(new go.PathSegment(go.PathSegment.Line,nt,gt*et)),ht}),go.Shape.defineFigureGenerator("Junction",function(kt,nt,et){var ht=new go.Geometry,lt=1/Math.SQRT2,gt=(1-1/Math.SQRT2)/2,yt=ee*.5,Lt=.5,Dt=new go.PathFigure(nt,Lt*et,!0);ht.add(Dt),Dt.add(new go.PathSegment(go.PathSegment.Bezier,Lt*nt,et,nt,(Lt+yt)*et,(Lt+yt)*nt,et)),Dt.add(new go.PathSegment(go.PathSegment.Bezier,0,Lt*et,(Lt-yt)*nt,et,0,(Lt+yt)*et)),Dt.add(new go.PathSegment(go.PathSegment.Bezier,Lt*nt,0,0,(Lt-yt)*et,(Lt-yt)*nt,0)),Dt.add(new go.PathSegment(go.PathSegment.Bezier,nt,Lt*et,(Lt+yt)*nt,0,nt,(Lt-yt)*et));var zt=new go.PathFigure((gt+lt)*nt,(gt+lt)*et,!1);return ht.add(zt),zt.add(new go.PathSegment(go.PathSegment.Line,gt*nt,gt*et)),zt.add(new go.PathSegment(go.PathSegment.Move,gt*nt,(gt+lt)*et)),zt.add(new go.PathSegment(go.PathSegment.Line,(gt+lt)*nt,gt*et)),ht}),go.Shape.defineFigureGenerator("LinedDocument",function(kt,nt,et){var ht=new go.Geometry;et=et/.8;var lt=new go.PathFigure(0,.7*et,!0);ht.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,0,0)),lt.add(new go.PathSegment(go.PathSegment.Line,nt,0)),lt.add(new go.PathSegment(go.PathSegment.Line,nt,.7*et)),lt.add(new go.PathSegment(go.PathSegment.Bezier,0,.7*et,.5*nt,.4*et,.5*nt,et).close());var gt=new go.PathFigure(.1*nt,0,!1);return ht.add(gt),gt.add(new go.PathSegment(go.PathSegment.Line,.1*nt,.75*et)),ht.spot1=new go.Spot(.1,0),ht.spot2=new go.Spot(1,.6),ht}),go.Shape.defineFigureGenerator("LoopLimit",function(kt,nt,et){var ht=new go.Geometry,lt=new go.PathFigure(0,et,!0);return ht.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,0,.25*et)),lt.add(new go.PathSegment(go.PathSegment.Line,.25*nt,0)),lt.add(new go.PathSegment(go.PathSegment.Line,.75*nt,0)),lt.add(new go.PathSegment(go.PathSegment.Line,nt,.25*et)),lt.add(new go.PathSegment(go.PathSegment.Line,nt,et).close()),ht.spot1=new go.Spot(0,.25),ht.spot2=go.Spot.BottomRight,ht}),go.Shape.defineFigureGenerator("MagneticTape",function(kt,nt,et){var ht=new go.Geometry,lt=ee*.5,gt=.5,yt=new go.PathFigure(.5*nt,et,!0);return ht.add(yt),yt.add(new go.PathSegment(go.PathSegment.Bezier,0,gt*et,(gt-lt)*nt,et,0,(gt+lt)*et)),yt.add(new go.PathSegment(go.PathSegment.Bezier,gt*nt,0,0,(gt-lt)*et,(gt-lt)*nt,0)),yt.add(new go.PathSegment(go.PathSegment.Bezier,nt,gt*et,(gt+lt)*nt,0,nt,(gt-lt)*et)),yt.add(new go.PathSegment(go.PathSegment.Bezier,(gt+.1)*nt,.9*et,nt,(gt+lt)*et,(gt+lt)*nt,.9*et)),yt.add(new go.PathSegment(go.PathSegment.Line,nt,.9*et)),yt.add(new go.PathSegment(go.PathSegment.Line,nt,et)),yt.add(new go.PathSegment(go.PathSegment.Line,.5*nt,et)),ht.spot1=new go.Spot(.15,.15),ht.spot2=new go.Spot(.85,.8),ht}),go.Shape.defineFigureGenerator("ManualInput",function(kt,nt,et){var ht=new go.Geometry,lt=new go.PathFigure(nt,0,!0);return ht.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,nt,et)),lt.add(new go.PathSegment(go.PathSegment.Line,0,et)),lt.add(new go.PathSegment(go.PathSegment.Line,0,.25*et).close()),ht.spot1=new go.Spot(0,.25),ht.spot2=go.Spot.BottomRight,ht}),go.Shape.defineFigureGenerator("MessageFromUser",function(kt,nt,et){var ht=new go.Geometry,lt=kt?kt.parameter1:NaN;isNaN(lt)&&(lt=.7);var gt=new go.PathFigure(0,0,!0);return ht.add(gt),gt.add(new go.PathSegment(go.PathSegment.Line,nt,0)),gt.add(new go.PathSegment(go.PathSegment.Line,lt*nt,.5*et)),gt.add(new go.PathSegment(go.PathSegment.Line,nt,et)),gt.add(new go.PathSegment(go.PathSegment.Line,0,et).close()),ht.spot1=go.Spot.TopLeft,ht}),go.Shape.defineFigureGenerator("MicroformProcessing",function(kt,nt,et){var ht=new go.Geometry,lt=kt?kt.parameter1:NaN;isNaN(lt)&&(lt=.25);var gt=new go.PathFigure(0,0,!0);return ht.add(gt),gt.add(new go.PathSegment(go.PathSegment.Line,.5*nt,lt*et)),gt.add(new go.PathSegment(go.PathSegment.Line,nt,0)),gt.add(new go.PathSegment(go.PathSegment.Line,nt,et)),gt.add(new go.PathSegment(go.PathSegment.Line,.5*nt,(1-lt)*et)),gt.add(new go.PathSegment(go.PathSegment.Line,0,et).close()),ht}),go.Shape.defineFigureGenerator("MicroformRecording",function(kt,nt,et){var ht=new go.Geometry,lt=new go.PathFigure(0,0,!0);return ht.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,.75*nt,.25*et)),lt.add(new go.PathSegment(go.PathSegment.Line,nt,.15*et)),lt.add(new go.PathSegment(go.PathSegment.Line,nt,.85*et)),lt.add(new go.PathSegment(go.PathSegment.Line,.75*nt,.75*et)),lt.add(new go.PathSegment(go.PathSegment.Line,0,et).close()),ht.spot1=new go.Spot(0,.25),ht.spot2=new go.Spot(1,.75),ht}),go.Shape.defineFigureGenerator("MultiDocument",function(kt,nt,et){var ht=new go.Geometry;et=et/.8;var lt=new go.PathFigure(nt,0,!0);ht.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,nt,.5*et)),lt.add(new go.PathSegment(go.PathSegment.Bezier,.9*nt,.44*et,.96*nt,.47*et,.93*nt,.45*et)),lt.add(new go.PathSegment(go.PathSegment.Line,.9*nt,.6*et)),lt.add(new go.PathSegment(go.PathSegment.Bezier,.8*nt,.54*et,.86*nt,.57*et,.83*nt,.55*et)),lt.add(new go.PathSegment(go.PathSegment.Line,.8*nt,.7*et)),lt.add(new go.PathSegment(go.PathSegment.Bezier,0,.7*et,.4*nt,.4*et,.4*nt,et)),lt.add(new go.PathSegment(go.PathSegment.Line,0,.2*et)),lt.add(new go.PathSegment(go.PathSegment.Line,.1*nt,.2*et)),lt.add(new go.PathSegment(go.PathSegment.Line,.1*nt,.1*et)),lt.add(new go.PathSegment(go.PathSegment.Line,.2*nt,.1*et)),lt.add(new go.PathSegment(go.PathSegment.Line,.2*nt,0).close());var gt=new go.PathFigure(.1*nt,.2*et,!1);return ht.add(gt),gt.add(new go.PathSegment(go.PathSegment.Line,.8*nt,.2*et)),gt.add(new go.PathSegment(go.PathSegment.Line,.8*nt,.54*et)),gt.add(new go.PathSegment(go.PathSegment.Move,.2*nt,.1*et)),gt.add(new go.PathSegment(go.PathSegment.Line,.9*nt,.1*et)),gt.add(new go.PathSegment(go.PathSegment.Line,.9*nt,.44*et)),ht.spot1=new go.Spot(0,.25),ht.spot2=new go.Spot(.8,.77),ht}),go.Shape.defineFigureGenerator("MultiProcess",function(kt,nt,et){var ht=new go.Geometry,lt=new go.PathFigure(.1*nt,.1*et,!0);ht.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,.2*nt,.1*et)),lt.add(new go.PathSegment(go.PathSegment.Line,.2*nt,0)),lt.add(new go.PathSegment(go.PathSegment.Line,nt,0)),lt.add(new go.PathSegment(go.PathSegment.Line,nt,.8*et)),lt.add(new go.PathSegment(go.PathSegment.Line,.9*nt,.8*et)),lt.add(new go.PathSegment(go.PathSegment.Line,.9*nt,.9*et)),lt.add(new go.PathSegment(go.PathSegment.Line,.8*nt,.9*et)),lt.add(new go.PathSegment(go.PathSegment.Line,.8*nt,et)),lt.add(new go.PathSegment(go.PathSegment.Line,0,et)),lt.add(new go.PathSegment(go.PathSegment.Line,0,.2*et)),lt.add(new go.PathSegment(go.PathSegment.Line,.1*nt,.2*et).close());var gt=new go.PathFigure(.2*nt,.1*et,!1);return ht.add(gt),gt.add(new go.PathSegment(go.PathSegment.Line,.9*nt,.1*et)),gt.add(new go.PathSegment(go.PathSegment.Line,.9*nt,.8*et)),gt.add(new go.PathSegment(go.PathSegment.Move,.1*nt,.2*et)),gt.add(new go.PathSegment(go.PathSegment.Line,.8*nt,.2*et)),gt.add(new go.PathSegment(go.PathSegment.Line,.8*nt,.9*et)),ht.spot1=new go.Spot(0,.2),ht.spot2=new go.Spot(.8,1),ht}),go.Shape.defineFigureGenerator("OfflineStorage",function(kt,nt,et){var ht=new go.Geometry,lt=kt?kt.parameter1:NaN;isNaN(lt)&&(lt=.1);var gt=1-lt,yt=new go.PathFigure(0,0,!0);ht.add(yt),yt.add(new go.PathSegment(go.PathSegment.Line,nt,0)),yt.add(new go.PathSegment(go.PathSegment.Line,.5*nt,et).close());var Lt=new go.PathFigure(.5*lt*nt,lt*et,!1);return ht.add(Lt),Lt.add(new go.PathSegment(go.PathSegment.Line,(1-.5*lt)*nt,lt*et)),ht}),go.Shape.defineFigureGenerator("OffPageConnector",function(kt,nt,et){var ht=new go.Geometry,lt=new go.PathFigure(0,0,!0);return ht.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,.75*nt,0)),lt.add(new go.PathSegment(go.PathSegment.Line,nt,.5*et)),lt.add(new go.PathSegment(go.PathSegment.Line,.75*nt,et)),lt.add(new go.PathSegment(go.PathSegment.Line,0,et).close()),ht.spot1=go.Spot.TopLeft,ht.spot2=new go.Spot(.75,1),ht}),go.Shape.defineFigureGenerator("Or",function(kt,nt,et){var ht=new go.Geometry,lt=ee*.5,gt=.5,yt=new go.PathFigure(nt,gt*et,!0);ht.add(yt),yt.add(new go.PathSegment(go.PathSegment.Bezier,gt*nt,et,nt,(gt+lt)*et,(gt+lt)*nt,et)),yt.add(new go.PathSegment(go.PathSegment.Bezier,0,gt*et,(gt-lt)*nt,et,0,(gt+lt)*et)),yt.add(new go.PathSegment(go.PathSegment.Bezier,gt*nt,0,0,(gt-lt)*et,(gt-lt)*nt,0)),yt.add(new go.PathSegment(go.PathSegment.Bezier,nt,gt*et,(gt+lt)*nt,0,nt,(gt-lt)*et));var Lt=new go.PathFigure(nt,.5*et,!1);return ht.add(Lt),Lt.add(new go.PathSegment(go.PathSegment.Line,0,.5*et)),Lt.add(new go.PathSegment(go.PathSegment.Move,.5*nt,et)),Lt.add(new go.PathSegment(go.PathSegment.Line,.5*nt,0)),ht}),go.Shape.defineFigureGenerator("PaperTape",function(kt,nt,et){var ht=new go.Geometry;et=et/.8;var lt=new go.PathFigure(0,.7*et,!0);return ht.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,0,.3*et)),lt.add(new go.PathSegment(go.PathSegment.Bezier,nt,.3*et,.5*nt,.6*et,.5*nt,0)),lt.add(new go.PathSegment(go.PathSegment.Line,nt,.7*et)),lt.add(new go.PathSegment(go.PathSegment.Bezier,0,.7*et,.5*nt,.4*et,.5*nt,et).close()),ht.spot1=new go.Spot(0,.49),ht.spot2=new go.Spot(1,.75),ht}),go.Shape.defineFigureGenerator("PrimitiveFromCall",function(kt,nt,et){var ht=new go.Geometry,lt=kt?kt.parameter1:NaN,gt=kt?kt.parameter2:NaN;isNaN(lt)&&(lt=.1),isNaN(gt)&&(gt=.3);var yt=new go.PathFigure(0,0,!0);return ht.add(yt),yt.add(new go.PathSegment(go.PathSegment.Line,nt,0)),yt.add(new go.PathSegment(go.PathSegment.Line,(1-gt)*nt,.5*et)),yt.add(new go.PathSegment(go.PathSegment.Line,nt,et)),yt.add(new go.PathSegment(go.PathSegment.Line,0,et).close()),ht}),go.Shape.defineFigureGenerator("PrimitiveToCall",function(kt,nt,et){var ht=new go.Geometry,lt=kt?kt.parameter1:NaN,gt=kt?kt.parameter2:NaN;isNaN(lt)&&(lt=.1),isNaN(gt)&&(gt=.3);var yt=new go.PathFigure(0,0,!0);return ht.add(yt),yt.add(new go.PathSegment(go.PathSegment.Line,(1-gt)*nt,0)),yt.add(new go.PathSegment(go.PathSegment.Line,nt,.5*et)),yt.add(new go.PathSegment(go.PathSegment.Line,(1-gt)*nt,et)),yt.add(new go.PathSegment(go.PathSegment.Line,0,et).close()),ht}),go.Shape.defineFigureGenerator("Procedure",function(kt,nt,et){var ht=new go.Geometry,lt=kt?kt.parameter1:NaN;isNaN(lt)&&(lt=.1);var gt=new go.PathFigure(0,0,!0);ht.add(gt),gt.add(new go.PathSegment(go.PathSegment.Line,nt,0)),gt.add(new go.PathSegment(go.PathSegment.Line,nt,et)),gt.add(new go.PathSegment(go.PathSegment.Line,0,et).close());var yt=new go.PathFigure((1-lt)*nt,0,!1);return ht.add(yt),yt.add(new go.PathSegment(go.PathSegment.Line,(1-lt)*nt,et)),yt.add(new go.PathSegment(go.PathSegment.Move,lt*nt,0)),yt.add(new go.PathSegment(go.PathSegment.Line,lt*nt,et)),ht}),go.Shape.defineFigureGenerator("Process",function(kt,nt,et){var ht=new go.Geometry,lt=kt?kt.parameter1:NaN;isNaN(lt)&&(lt=.1);var gt=new go.PathFigure(0,0,!0);ht.add(gt),gt.add(new go.PathSegment(go.PathSegment.Line,nt,0)),gt.add(new go.PathSegment(go.PathSegment.Line,nt,et)),gt.add(new go.PathSegment(go.PathSegment.Line,0,et).close());var yt=new go.PathFigure(lt*nt,0,!1);return ht.add(yt),yt.add(new go.PathSegment(go.PathSegment.Line,lt*nt,et)),ht.spot2=go.Spot.BottomRight,ht}),go.Shape.defineFigureGenerator("Sort",function(kt,nt,et){var ht=new go.Geometry,lt=new go.PathFigure(.5*nt,0,!0);ht.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,nt,.5*et)),lt.add(new go.PathSegment(go.PathSegment.Line,.5*nt,et)),lt.add(new go.PathSegment(go.PathSegment.Line,0,.5*et).close());var gt=new go.PathFigure(0,.5*et,!1);return ht.add(gt),gt.add(new go.PathSegment(go.PathSegment.Line,nt,.5*et)),ht.spot1=new go.Spot(.25,.25),ht.spot2=new go.Spot(.75,.5),ht}),go.Shape.defineFigureGenerator("Start",function(kt,nt,et){var ht=new go.Geometry,lt=kt?kt.parameter1:NaN;isNaN(lt)&&(lt=.25);var gt=new go.PathFigure(lt*nt,0,!0);ht.add(gt),gt.add(new go.PathSegment(go.PathSegment.Arc,270,180,.75*nt,.5*et,.25*nt,.5*et)),gt.add(new go.PathSegment(go.PathSegment.Arc,90,180,.25*nt,.5*et,.25*nt,.5*et));var yt=new go.PathFigure(lt*nt,0,!1);return ht.add(yt),yt.add(new go.PathSegment(go.PathSegment.Line,lt*nt,et)),yt.add(new go.PathSegment(go.PathSegment.Move,(1-lt)*nt,0)),yt.add(new go.PathSegment(go.PathSegment.Line,(1-lt)*nt,et)),ht.spot1=new go.Spot(lt,0),ht.spot2=new go.Spot(1-lt,1),ht}),go.Shape.defineFigureGenerator("Terminator",function(kt,nt,et){var ht=new go.Geometry,lt=new go.PathFigure(.25*nt,0,!0);return ht.add(lt),lt.add(new go.PathSegment(go.PathSegment.Arc,270,180,.75*nt,.5*et,.25*nt,.5*et)),lt.add(new go.PathSegment(go.PathSegment.Arc,90,180,.25*nt,.5*et,.25*nt,.5*et)),ht.spot1=new go.Spot(.23,0),ht.spot2=new go.Spot(.77,1),ht}),go.Shape.defineFigureGenerator("TransmittalTape",function(kt,nt,et){var ht=new go.Geometry,lt=kt?kt.parameter1:NaN;isNaN(lt)&&(lt=.1);var gt=new go.PathFigure(0,0,!0);return ht.add(gt),gt.add(new go.PathSegment(go.PathSegment.Line,nt,0)),gt.add(new go.PathSegment(go.PathSegment.Line,nt,et)),gt.add(new go.PathSegment(go.PathSegment.Line,.75*nt,(1-lt)*et)),gt.add(new go.PathSegment(go.PathSegment.Line,0,(1-lt)*et).close()),ht.spot1=go.Spot.TopLeft,ht}),go.Shape.defineFigureGenerator("AndGate",function(kt,nt,et){var ht=new go.Geometry,lt=ee*.5,gt=new go.PathFigure(0,0,!0);return ht.add(gt),gt.add(new go.PathSegment(go.PathSegment.Line,.5*nt,0)),gt.add(new go.PathSegment(go.PathSegment.Bezier,nt,.5*et,(.5+lt)*nt,0,nt,(.5-lt)*et)),gt.add(new go.PathSegment(go.PathSegment.Bezier,.5*nt,et,nt,(.5+lt)*et,(.5+lt)*nt,et)),gt.add(new go.PathSegment(go.PathSegment.Line,0,et).close()),ht.spot1=go.Spot.TopLeft,ht.spot2=new go.Spot(.55,1),ht}),go.Shape.defineFigureGenerator("Buffer",function(kt,nt,et){var ht=new go.Geometry,lt=new go.PathFigure(0,0,!0);return ht.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,nt,.5*et)),lt.add(new go.PathSegment(go.PathSegment.Line,0,et).close()),ht.spot1=new go.Spot(0,.25),ht.spot2=new go.Spot(.5,.75),ht}),go.Shape.defineFigureGenerator("Clock",function(kt,nt,et){var ht=new go.Geometry,lt=ee*.5,gt=.5,yt=new go.PathFigure(nt,gt*et,!0);ht.add(yt),yt.add(new go.PathSegment(go.PathSegment.Bezier,gt*nt,et,nt,(gt+lt)*et,(gt+lt)*nt,et)),yt.add(new go.PathSegment(go.PathSegment.Bezier,0,gt*et,(gt-lt)*nt,et,0,(gt+lt)*et)),yt.add(new go.PathSegment(go.PathSegment.Bezier,gt*nt,0,0,(gt-lt)*et,(gt-lt)*nt,0)),yt.add(new go.PathSegment(go.PathSegment.Bezier,nt,gt*et,(gt+lt)*nt,0,nt,(gt-lt)*et));var Lt=new go.PathFigure(nt,gt*et,!1);ht.add(Lt),Lt.add(new go.PathSegment(go.PathSegment.Line,nt,gt*et));var Dt=new go.PathFigure(.8*nt,.75*et,!1);return ht.add(Dt),Dt.add(new go.PathSegment(go.PathSegment.Line,.8*nt,.25*et)),Dt.add(new go.PathSegment(go.PathSegment.Line,.6*nt,.25*et)),Dt.add(new go.PathSegment(go.PathSegment.Line,.6*nt,.75*et)),Dt.add(new go.PathSegment(go.PathSegment.Line,.4*nt,.75*et)),Dt.add(new go.PathSegment(go.PathSegment.Line,.4*nt,.25*et)),Dt.add(new go.PathSegment(go.PathSegment.Line,.2*nt,.25*et)),Dt.add(new go.PathSegment(go.PathSegment.Line,.2*nt,.75*et)),ht}),go.Shape.defineFigureGenerator("Ground",function(kt,nt,et){var ht=new go.Geometry,lt=new go.PathFigure(.5*nt,0,!1);return ht.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,.5*nt,.4*et)),lt.add(new go.PathSegment(go.PathSegment.Move,.2*nt,.6*et)),lt.add(new go.PathSegment(go.PathSegment.Line,.8*nt,.6*et)),lt.add(new go.PathSegment(go.PathSegment.Move,.3*nt,.8*et)),lt.add(new go.PathSegment(go.PathSegment.Line,.7*nt,.8*et)),lt.add(new go.PathSegment(go.PathSegment.Move,.4*nt,et)),lt.add(new go.PathSegment(go.PathSegment.Line,.6*nt,et)),ht}),go.Shape.defineFigureGenerator("Inverter",function(kt,nt,et){var ht=new go.Geometry,lt=ee*.1,gt=.1,yt=.9,Lt=.5,Dt=new go.PathFigure(.8*nt,.5*et,!0);ht.add(Dt),Dt.add(new go.PathSegment(go.PathSegment.Line,0,et)),Dt.add(new go.PathSegment(go.PathSegment.Line,0,0)),Dt.add(new go.PathSegment(go.PathSegment.Line,.8*nt,.5*et));var zt=new go.PathFigure((yt+gt)*nt,Lt*et,!0);return ht.add(zt),zt.add(new go.PathSegment(go.PathSegment.Bezier,yt*nt,(Lt+gt)*et,(yt+gt)*nt,(Lt+lt)*et,(yt+lt)*nt,(Lt+gt)*et)),zt.add(new go.PathSegment(go.PathSegment.Bezier,(yt-gt)*nt,Lt*et,(yt-lt)*nt,(Lt+gt)*et,(yt-gt)*nt,(Lt+lt)*et)),zt.add(new go.PathSegment(go.PathSegment.Bezier,yt*nt,(Lt-gt)*et,(yt-gt)*nt,(Lt-lt)*et,(yt-lt)*nt,(Lt-gt)*et)),zt.add(new go.PathSegment(go.PathSegment.Bezier,(yt+gt)*nt,Lt*et,(yt+lt)*nt,(Lt-gt)*et,(yt+gt)*nt,(Lt-lt)*et)),ht.spot1=new go.Spot(0,.25),ht.spot2=new go.Spot(.4,.75),ht}),go.Shape.defineFigureGenerator("NandGate",function(kt,nt,et){var ht=new go.Geometry,lt=ee*.5,gt=ee*.4,yt=ee*.1,Lt=.1,Dt=.9,zt=.5,Xt=new go.PathFigure(.8*nt,.5*et,!0);ht.add(Xt),Xt.add(new go.PathSegment(go.PathSegment.Bezier,.4*nt,et,.8*nt,(.5+gt)*et,(.4+lt)*nt,et)),Xt.add(new go.PathSegment(go.PathSegment.Line,0,et)),Xt.add(new go.PathSegment(go.PathSegment.Line,0,0)),Xt.add(new go.PathSegment(go.PathSegment.Line,.4*nt,0)),Xt.add(new go.PathSegment(go.PathSegment.Bezier,.8*nt,.5*et,(.4+lt)*nt,0,.8*nt,(.5-gt)*et));var re=new go.PathFigure((Dt+Lt)*nt,zt*et,!0);return ht.add(re),re.add(new go.PathSegment(go.PathSegment.Bezier,Dt*nt,(zt+Lt)*et,(Dt+Lt)*nt,(zt+yt)*et,(Dt+yt)*nt,(zt+Lt)*et)),re.add(new go.PathSegment(go.PathSegment.Bezier,(Dt-Lt)*nt,zt*et,(Dt-yt)*nt,(zt+Lt)*et,(Dt-Lt)*nt,(zt+yt)*et)),re.add(new go.PathSegment(go.PathSegment.Bezier,Dt*nt,(zt-Lt)*et,(Dt-Lt)*nt,(zt-yt)*et,(Dt-yt)*nt,(zt-Lt)*et)),re.add(new go.PathSegment(go.PathSegment.Bezier,(Dt+Lt)*nt,zt*et,(Dt+yt)*nt,(zt-Lt)*et,(Dt+Lt)*nt,(zt-yt)*et)),ht.spot1=new go.Spot(0,.05),ht.spot2=new go.Spot(.55,.95),ht}),go.Shape.defineFigureGenerator("NorGate",function(kt,nt,et){var ht=new go.Geometry,lt=.5,gt=ee*lt,yt=0,Lt=.5,Dt=new go.PathFigure(.8*nt,.5*et,!0);ht.add(Dt),Dt.add(new go.PathSegment(go.PathSegment.Bezier,0,et,.7*nt,(Lt+gt)*et,(yt+gt)*nt,(Lt+lt)*et)),Dt.add(new go.PathSegment(go.PathSegment.Bezier,0,0,.25*nt,.75*et,.25*nt,.25*et)),Dt.add(new go.PathSegment(go.PathSegment.Bezier,.8*nt,.5*et,(yt+gt)*nt,(Lt-lt)*et,.7*nt,(Lt-gt)*et)),lt=.1,gt=ee*.1,yt=.9,Lt=.5;var zt=new go.PathFigure((yt-lt)*nt,Lt*et,!0);return ht.add(zt),zt.add(new go.PathSegment(go.PathSegment.Bezier,yt*nt,(Lt-lt)*et,(yt-lt)*nt,(Lt-gt)*et,(yt-gt)*nt,(Lt-lt)*et)),zt.add(new go.PathSegment(go.PathSegment.Bezier,(yt+lt)*nt,Lt*et,(yt+gt)*nt,(Lt-lt)*et,(yt+lt)*nt,(Lt-gt)*et)),zt.add(new go.PathSegment(go.PathSegment.Bezier,yt*nt,(Lt+lt)*et,(yt+lt)*nt,(Lt+gt)*et,(yt+gt)*nt,(Lt+lt)*et)),zt.add(new go.PathSegment(go.PathSegment.Bezier,(yt-lt)*nt,Lt*et,(yt-gt)*nt,(Lt+lt)*et,(yt-lt)*nt,(Lt+gt)*et)),ht.spot1=new go.Spot(.2,.25),ht.spot2=new go.Spot(.6,.75),ht}),go.Shape.defineFigureGenerator("OrGate",function(kt,nt,et){var ht=new go.Geometry,lt=.5,gt=ee*lt,yt=0,Lt=.5,Dt=new go.PathFigure(0,0,!0);return ht.add(Dt),Dt.add(new go.PathSegment(go.PathSegment.Bezier,nt,.5*et,(yt+gt+gt)*nt,(Lt-lt)*et,.8*nt,(Lt-gt)*et)),Dt.add(new go.PathSegment(go.PathSegment.Bezier,0,et,.8*nt,(Lt+gt)*et,(yt+gt+gt)*nt,(Lt+lt)*et)),Dt.add(new go.PathSegment(go.PathSegment.Bezier,0,0,.25*nt,.75*et,.25*nt,.25*et).close()),ht.spot1=new go.Spot(.2,.25),ht.spot2=new go.Spot(.75,.75),ht}),go.Shape.defineFigureGenerator("XnorGate",function(kt,nt,et){var ht=new go.Geometry,lt=.5,gt=ee*lt,yt=.2,Lt=.5,Dt=new go.PathFigure(.1*nt,0,!1);ht.add(Dt),Dt.add(new go.PathSegment(go.PathSegment.Bezier,.1*nt,et,.35*nt,.25*et,.35*nt,.75*et));var zt=new go.PathFigure(.8*nt,.5*et,!0);ht.add(zt),zt.add(new go.PathSegment(go.PathSegment.Bezier,.2*nt,et,.7*nt,(Lt+gt)*et,(yt+gt)*nt,(Lt+lt)*et)),zt.add(new go.PathSegment(go.PathSegment.Bezier,.2*nt,0,.45*nt,.75*et,.45*nt,.25*et)),zt.add(new go.PathSegment(go.PathSegment.Bezier,.8*nt,.5*et,(yt+gt)*nt,(Lt-lt)*et,.7*nt,(Lt-gt)*et)),lt=.1,gt=ee*.1,yt=.9,Lt=.5;var Xt=new go.PathFigure((yt-lt)*nt,Lt*et,!0);return ht.add(Xt),Xt.add(new go.PathSegment(go.PathSegment.Bezier,yt*nt,(Lt-lt)*et,(yt-lt)*nt,(Lt-gt)*et,(yt-gt)*nt,(Lt-lt)*et)),Xt.add(new go.PathSegment(go.PathSegment.Bezier,(yt+lt)*nt,Lt*et,(yt+gt)*nt,(Lt-lt)*et,(yt+lt)*nt,(Lt-gt)*et)),Xt.add(new go.PathSegment(go.PathSegment.Bezier,yt*nt,(Lt+lt)*et,(yt+lt)*nt,(Lt+gt)*et,(yt+gt)*nt,(Lt+lt)*et)),Xt.add(new go.PathSegment(go.PathSegment.Bezier,(yt-lt)*nt,Lt*et,(yt-gt)*nt,(Lt+lt)*et,(yt-lt)*nt,(Lt+gt)*et)),ht.spot1=new go.Spot(.4,.25),ht.spot2=new go.Spot(.65,.75),ht}),go.Shape.defineFigureGenerator("XorGate",function(kt,nt,et){var ht=new go.Geometry,lt=.5,gt=ee*lt,yt=.2,Lt=.5,Dt=new go.PathFigure(.1*nt,0,!1);ht.add(Dt),Dt.add(new go.PathSegment(go.PathSegment.Bezier,.1*nt,et,.35*nt,.25*et,.35*nt,.75*et));var zt=new go.PathFigure(.2*nt,0,!0);return ht.add(zt),zt.add(new go.PathSegment(go.PathSegment.Bezier,nt,.5*et,(yt+gt)*nt,(Lt-lt)*et,.9*nt,(Lt-gt)*et)),zt.add(new go.PathSegment(go.PathSegment.Bezier,.2*nt,et,.9*nt,(Lt+gt)*et,(yt+gt)*nt,(Lt+lt)*et)),zt.add(new go.PathSegment(go.PathSegment.Bezier,.2*nt,0,.45*nt,.75*et,.45*nt,.25*et).close()),ht.spot1=new go.Spot(.4,.25),ht.spot2=new go.Spot(.8,.75),ht}),go.Shape.defineFigureGenerator("Capacitor",function(kt,nt,et){var ht=new go.Geometry,lt=new go.PathFigure(0,0,!1);return ht.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,0,et)),lt.add(new go.PathSegment(go.PathSegment.Move,nt,0)),lt.add(new go.PathSegment(go.PathSegment.Line,nt,et)),ht}),go.Shape.defineFigureGenerator("Resistor",function(kt,nt,et){var ht=new go.Geometry,lt=new go.PathFigure(0,.5*et,!1);return ht.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,.1*nt,0)),lt.add(new go.PathSegment(go.PathSegment.Line,.2*nt,et)),lt.add(new go.PathSegment(go.PathSegment.Line,.3*nt,0)),lt.add(new go.PathSegment(go.PathSegment.Line,.4*nt,et)),lt.add(new go.PathSegment(go.PathSegment.Line,.5*nt,0)),lt.add(new go.PathSegment(go.PathSegment.Line,.6*nt,et)),lt.add(new go.PathSegment(go.PathSegment.Line,.7*nt,.5*et)),ht}),go.Shape.defineFigureGenerator("Inductor",function(kt,nt,et){var ht=new go.Geometry,lt=ee*.1,gt=.1,yt=.1,Lt=.5,Dt=new go.PathFigure((yt-lt*.5)*nt,et,!1);return ht.add(Dt),Dt.add(new go.PathSegment(go.PathSegment.Bezier,(yt+gt)*nt,0,(yt-lt)*nt,et,(yt-gt)*nt,0)),yt=.3,Dt.add(new go.PathSegment(go.PathSegment.Bezier,yt*nt,et,(yt+gt)*nt,0,(yt+lt)*nt,et)),Dt.add(new go.PathSegment(go.PathSegment.Bezier,(yt+gt)*nt,0,(yt-lt)*nt,et,(yt-gt)*nt,0)),yt=.5,Dt.add(new go.PathSegment(go.PathSegment.Bezier,yt*nt,et,(yt+gt)*nt,0,(yt+lt)*nt,et)),Dt.add(new go.PathSegment(go.PathSegment.Bezier,(yt+gt)*nt,0,(yt-lt)*nt,et,(yt-gt)*nt,0)),yt=.7,Dt.add(new go.PathSegment(go.PathSegment.Bezier,yt*nt,et,(yt+gt)*nt,0,(yt+lt)*nt,et)),Dt.add(new go.PathSegment(go.PathSegment.Bezier,(yt+gt)*nt,0,(yt-lt)*nt,et,(yt-gt)*nt,0)),yt=.9,Dt.add(new go.PathSegment(go.PathSegment.Bezier,(yt+lt*.5)*nt,et,(yt+gt)*nt,0,(yt+lt)*nt,et)),ht}),go.Shape.defineFigureGenerator("ACvoltageSource",function(kt,nt,et){var ht=new go.Geometry,lt=ee*.5,gt=.5,yt=.5,Lt=.5,Dt=new go.PathFigure((yt-gt)*nt,Lt*et,!1);return ht.add(Dt),Dt.add(new go.PathSegment(go.PathSegment.Bezier,yt*nt,(Lt-gt)*et,(yt-gt)*nt,(Lt-lt)*et,(yt-lt)*nt,(Lt-gt)*et)),Dt.add(new go.PathSegment(go.PathSegment.Bezier,(yt+gt)*nt,Lt*et,(yt+lt)*nt,(Lt-gt)*et,(yt+gt)*nt,(Lt-lt)*et)),Dt.add(new go.PathSegment(go.PathSegment.Bezier,yt*nt,(Lt+gt)*et,(yt+gt)*nt,(Lt+lt)*et,(yt+lt)*nt,(Lt+gt)*et)),Dt.add(new go.PathSegment(go.PathSegment.Bezier,(yt-gt)*nt,Lt*et,(yt-lt)*nt,(Lt+gt)*et,(yt-gt)*nt,(Lt+lt)*et)),Dt.add(new go.PathSegment(go.PathSegment.Move,(yt-gt+.1)*nt,Lt*et)),Dt.add(new go.PathSegment(go.PathSegment.Bezier,(yt+gt-.1)*nt,Lt*et,yt*nt,(Lt-gt)*et,yt*nt,(Lt+gt)*et)),ht}),go.Shape.defineFigureGenerator("DCvoltageSource",function(kt,nt,et){var ht=new go.Geometry,lt=new go.PathFigure(0,.75*et,!1);return ht.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,0,.25*et)),lt.add(new go.PathSegment(go.PathSegment.Move,nt,0)),lt.add(new go.PathSegment(go.PathSegment.Line,nt,et)),ht}),go.Shape.defineFigureGenerator("Diode",function(kt,nt,et){var ht=new go.Geometry,lt=new go.PathFigure(nt,0,!1);return ht.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,nt,.5*et)),lt.add(new go.PathSegment(go.PathSegment.Line,0,et)),lt.add(new go.PathSegment(go.PathSegment.Line,0,0)),lt.add(new go.PathSegment(go.PathSegment.Line,nt,.5*et)),lt.add(new go.PathSegment(go.PathSegment.Line,nt,et)),ht.spot1=new go.Spot(0,.25),ht.spot2=new go.Spot(.5,.75),ht}),go.Shape.defineFigureGenerator("Wifi",function(kt,nt,et){var ht=new go.Geometry,lt=nt,gt=et;nt=nt*.38,et=et*.6;var yt=ee*.8,Lt=.8,Dt=0,zt=.5,Xt=(lt-nt)/2,re=(gt-et)/2,le=new go.PathFigure(Dt*nt+Xt,(zt+Lt)*et+re,!0);ht.add(le),le.add(new go.PathSegment(go.PathSegment.Bezier,(Dt-Lt)*nt+Xt,zt*et+re,(Dt-yt)*nt+Xt,(zt+Lt)*et+re,(Dt-Lt)*nt+Xt,(zt+yt)*et+re)),le.add(new go.PathSegment(go.PathSegment.Bezier,Dt*nt+Xt,(zt-Lt)*et+re,(Dt-Lt)*nt+Xt,(zt-yt)*et+re,(Dt-yt)*nt+Xt,(zt-Lt)*et+re)),le.add(new go.PathSegment(go.PathSegment.Bezier,(Dt-Lt+yt*.5)*nt+Xt,zt*et+re,Dt*nt+Xt,(zt-Lt)*et+re,(Dt-Lt+yt*.5)*nt+Xt,(zt-yt)*et+re)),le.add(new go.PathSegment(go.PathSegment.Bezier,Dt*nt+Xt,(zt+Lt)*et+re,(Dt-Lt+yt*.5)*nt+Xt,(zt+yt)*et+re,Dt*nt+Xt,(zt+Lt)*et+re).close()),yt=ee*.4,Lt=.4,Dt=.2,zt=.5;var ae=new go.PathFigure(Dt*nt+Xt,(zt+Lt)*et+re,!0);ht.add(ae),ae.add(new go.PathSegment(go.PathSegment.Bezier,(Dt-Lt)*nt+Xt,zt*et+re,(Dt-yt)*nt+Xt,(zt+Lt)*et+re,(Dt-Lt)*nt+Xt,(zt+yt)*et+re)),ae.add(new go.PathSegment(go.PathSegment.Bezier,Dt*nt+Xt,(zt-Lt)*et+re,(Dt-Lt)*nt+Xt,(zt-yt)*et+re,(Dt-yt)*nt+Xt,(zt-Lt)*et+re)),ae.add(new go.PathSegment(go.PathSegment.Bezier,(Dt-Lt+yt*.5)*nt+Xt,zt*et+re,Dt*nt+Xt,(zt-Lt)*et+re,(Dt-Lt+yt*.5)*nt+Xt,(zt-yt)*et+re)),ae.add(new go.PathSegment(go.PathSegment.Bezier,Dt*nt+Xt,(zt+Lt)*et+re,(Dt-Lt+yt*.5)*nt+Xt,(zt+yt)*et+re,Dt*nt+Xt,(zt+Lt)*et+re).close()),yt=ee*.2,Lt=.2,Dt=.5,zt=.5;var je=new go.PathFigure((Dt-Lt)*nt+Xt,zt*et+re,!0);ht.add(je),je.add(new go.PathSegment(go.PathSegment.Bezier,Dt*nt+Xt,(zt-Lt)*et+re,(Dt-Lt)*nt+Xt,(zt-yt)*et+re,(Dt-yt)*nt+Xt,(zt-Lt)*et+re)),je.add(new go.PathSegment(go.PathSegment.Bezier,(Dt+Lt)*nt+Xt,zt*et+re,(Dt+yt)*nt+Xt,(zt-Lt)*et+re,(Dt+Lt)*nt+Xt,(zt-yt)*et+re)),je.add(new go.PathSegment(go.PathSegment.Bezier,Dt*nt+Xt,(zt+Lt)*et+re,(Dt+Lt)*nt+Xt,(zt+yt)*et+re,(Dt+yt)*nt+Xt,(zt+Lt)*et+re)),je.add(new go.PathSegment(go.PathSegment.Bezier,(Dt-Lt)*nt+Xt,zt*et+re,(Dt-yt)*nt+Xt,(zt+Lt)*et+re,(Dt-Lt)*nt+Xt,(zt+yt)*et+re)),yt=ee*.4,Lt=.4,Dt=.8,zt=.5;var ne=new go.PathFigure(Dt*nt+Xt,(zt-Lt)*et+re,!0);ht.add(ne),ne.add(new go.PathSegment(go.PathSegment.Bezier,(Dt+Lt)*nt+Xt,zt*et+re,(Dt+yt)*nt+Xt,(zt-Lt)*et+re,(Dt+Lt)*nt+Xt,(zt-yt)*et+re)),ne.add(new go.PathSegment(go.PathSegment.Bezier,Dt*nt+Xt,(zt+Lt)*et+re,(Dt+Lt)*nt+Xt,(zt+yt)*et+re,(Dt+yt)*nt+Xt,(zt+Lt)*et+re)),ne.add(new go.PathSegment(go.PathSegment.Bezier,(Dt+Lt-yt*.5)*nt+Xt,zt*et+re,Dt*nt+Xt,(zt+Lt)*et+re,(Dt+Lt-yt*.5)*nt+Xt,(zt+yt)*et+re)),ne.add(new go.PathSegment(go.PathSegment.Bezier,Dt*nt+Xt,(zt-Lt)*et+re,(Dt+Lt-yt*.5)*nt+Xt,(zt-yt)*et+re,Dt*nt+Xt,(zt-Lt)*et+re).close()),yt=ee*.8,Lt=.8,Dt=1,zt=.5;var Le=new go.PathFigure(Dt*nt+Xt,(zt-Lt)*et+re,!0);return ht.add(Le),Le.add(new go.PathSegment(go.PathSegment.Bezier,(Dt+Lt)*nt+Xt,zt*et+re,(Dt+yt)*nt+Xt,(zt-Lt)*et+re,(Dt+Lt)*nt+Xt,(zt-yt)*et+re)),Le.add(new go.PathSegment(go.PathSegment.Bezier,Dt*nt+Xt,(zt+Lt)*et+re,(Dt+Lt)*nt+Xt,(zt+yt)*et+re,(Dt+yt)*nt+Xt,(zt+Lt)*et+re)),Le.add(new go.PathSegment(go.PathSegment.Bezier,(Dt+Lt-yt*.5)*nt+Xt,zt*et+re,Dt*nt+Xt,(zt+Lt)*et+re,(Dt+Lt-yt*.5)*nt+Xt,(zt+yt)*et+re)),Le.add(new go.PathSegment(go.PathSegment.Bezier,Dt*nt+Xt,(zt-Lt)*et+re,(Dt+Lt-yt*.5)*nt+Xt,(zt-yt)*et+re,Dt*nt+Xt,(zt-Lt)*et+re).close()),ht}),go.Shape.defineFigureGenerator("Email",function(kt,nt,et){var ht=new go.Geometry,lt=new go.PathFigure(0,0,!0);ht.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,nt,0)),lt.add(new go.PathSegment(go.PathSegment.Line,nt,et)),lt.add(new go.PathSegment(go.PathSegment.Line,0,et)),lt.add(new go.PathSegment(go.PathSegment.Line,0,0).close());var gt=new go.PathFigure(0,0,!1);return ht.add(gt),gt.add(new go.PathSegment(go.PathSegment.Line,.5*nt,.6*et)),gt.add(new go.PathSegment(go.PathSegment.Line,nt,0)),gt.add(new go.PathSegment(go.PathSegment.Move,0,et)),gt.add(new go.PathSegment(go.PathSegment.Line,.45*nt,.54*et)),gt.add(new go.PathSegment(go.PathSegment.Move,nt,et)),gt.add(new go.PathSegment(go.PathSegment.Line,.55*nt,.54*et)),ht}),go.Shape.defineFigureGenerator("Ethernet",function(kt,nt,et){var ht=new go.Geometry,lt=new go.PathFigure(.35*nt,0,!0);ht.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,.65*nt,0)),lt.add(new go.PathSegment(go.PathSegment.Line,.65*nt,.4*et)),lt.add(new go.PathSegment(go.PathSegment.Line,.35*nt,.4*et)),lt.add(new go.PathSegment(go.PathSegment.Line,.35*nt,0).close());var gt=new go.PathFigure(.1*nt,et,!0,!0);ht.add(gt),gt.add(new go.PathSegment(go.PathSegment.Line,.4*nt,et)),gt.add(new go.PathSegment(go.PathSegment.Line,.4*nt,.6*et)),gt.add(new go.PathSegment(go.PathSegment.Line,.1*nt,.6*et)),gt.add(new go.PathSegment(go.PathSegment.Line,.1*nt,et).close());var yt=new go.PathFigure(.6*nt,et,!0,!0);ht.add(yt),yt.add(new go.PathSegment(go.PathSegment.Line,.9*nt,et)),yt.add(new go.PathSegment(go.PathSegment.Line,.9*nt,.6*et)),yt.add(new go.PathSegment(go.PathSegment.Line,.6*nt,.6*et)),yt.add(new go.PathSegment(go.PathSegment.Line,.6*nt,et).close());var Lt=new go.PathFigure(0,.5*et,!1);return ht.add(Lt),Lt.add(new go.PathSegment(go.PathSegment.Line,nt,.5*et)),Lt.add(new go.PathSegment(go.PathSegment.Move,.5*nt,.5*et)),Lt.add(new go.PathSegment(go.PathSegment.Line,.5*nt,.4*et)),Lt.add(new go.PathSegment(go.PathSegment.Move,.75*nt,.5*et)),Lt.add(new go.PathSegment(go.PathSegment.Line,.75*nt,.6*et)),Lt.add(new go.PathSegment(go.PathSegment.Move,.25*nt,.5*et)),Lt.add(new go.PathSegment(go.PathSegment.Line,.25*nt,.6*et)),ht}),go.Shape.defineFigureGenerator("Power",function(kt,nt,et){var ht=new go.Geometry,lt=ee*.4,gt=.4,yt=.5,Lt=.5,Dt=pt(),zt=pt(),Xt=pt(),re=pt();Me(yt,Lt-gt,yt+lt,Lt-gt,yt+gt,Lt-lt,yt+gt,Lt,.5,Dt,Dt,zt,Xt,re);var le=Ft(zt.x,zt.y),ae=new go.PathFigure(zt.x*nt,zt.y*et,!0);ht.add(ae),ae.add(new go.PathSegment(go.PathSegment.Bezier,(yt+gt)*nt,Lt*et,Xt.x*nt,Xt.y*et,re.x*nt,re.y*et)),ae.add(new go.PathSegment(go.PathSegment.Bezier,yt*nt,(Lt+gt)*et,(yt+gt)*nt,(Lt+lt)*et,(yt+lt)*nt,(Lt+gt)*et)),ae.add(new go.PathSegment(go.PathSegment.Bezier,(yt-gt)*nt,Lt*et,(yt-lt)*nt,(Lt+gt)*et,(yt-gt)*nt,(Lt+lt)*et)),Me(yt-gt,Lt,yt-gt,Lt-lt,yt-lt,Lt-gt,yt,Lt-gt,.5,Xt,re,zt,Dt,Dt),ae.add(new go.PathSegment(go.PathSegment.Bezier,zt.x*nt,zt.y*et,Xt.x*nt,Xt.y*et,re.x*nt,re.y*et)),lt=ee*.3,gt=.3,Me(yt-gt,Lt,yt-gt,Lt-lt,yt-lt,Lt-gt,yt,Lt-gt,.5,Xt,re,zt,Dt,Dt),ae.add(new go.PathSegment(go.PathSegment.Line,zt.x*nt,zt.y*et)),ae.add(new go.PathSegment(go.PathSegment.Bezier,(yt-gt)*nt,Lt*et,re.x*nt,re.y*et,Xt.x*nt,Xt.y*et)),ae.add(new go.PathSegment(go.PathSegment.Bezier,yt*nt,(Lt+gt)*et,(yt-gt)*nt,(Lt+lt)*et,(yt-lt)*nt,(Lt+gt)*et)),ae.add(new go.PathSegment(go.PathSegment.Bezier,(yt+gt)*nt,Lt*et,(yt+lt)*nt,(Lt+gt)*et,(yt+gt)*nt,(Lt+lt)*et)),Me(yt,Lt-gt,yt+lt,Lt-gt,yt+gt,Lt-lt,yt+gt,Lt,.5,Dt,Dt,zt,Xt,re),ae.add(new go.PathSegment(go.PathSegment.Bezier,zt.x*nt,zt.y*et,re.x*nt,re.y*et,Xt.x*nt,Xt.y*et).close());var ae=new go.PathFigure(.45*nt,0,!0);return ht.add(ae),ae.add(new go.PathSegment(go.PathSegment.Line,.45*nt,.5*et)),ae.add(new go.PathSegment(go.PathSegment.Line,.55*nt,.5*et)),ae.add(new go.PathSegment(go.PathSegment.Line,.55*nt,0).close()),Ht(Dt),Ht(zt),Ht(Xt),Ht(re),Ht(le),ht.spot1=new go.Spot(.25,.45),ht.spot2=new go.Spot(.75,.8),ht}),go.Shape.defineFigureGenerator("Fallout",function(kt,nt,et){var ht=new go.Geometry,lt=new go.PathFigure(0,et/2,!0);ht.add(lt),lt.add(new go.PathSegment(go.PathSegment.Arc,180,360,nt/2,et/2,nt/2,et/2));function gt(yt,Lt,Dt){yt.add(new go.PathSegment(go.PathSegment.Move,(.3+Lt)*nt,(.8+Dt)*et)),yt.add(new go.PathSegment(go.PathSegment.Line,(.5+Lt)*nt,(.5+Dt)*et)),yt.add(new go.PathSegment(go.PathSegment.Line,(.1+Lt)*nt,(.5+Dt)*et)),yt.add(new go.PathSegment(go.PathSegment.Line,(.3+Lt)*nt,(.8+Dt)*et).close())}return gt(lt,0,0),gt(lt,.4,0),gt(lt,.2,-.3),ht}),go.Shape.defineFigureGenerator("IrritationHazard",function(kt,nt,et){var ht=new go.Geometry,lt=new go.PathFigure(.2*nt,0,!0);return ht.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,.5*nt,.3*et)),lt.add(new go.PathSegment(go.PathSegment.Line,.8*nt,0)),lt.add(new go.PathSegment(go.PathSegment.Line,nt,.2*et)),lt.add(new go.PathSegment(go.PathSegment.Line,.7*nt,.5*et)),lt.add(new go.PathSegment(go.PathSegment.Line,nt,.8*et)),lt.add(new go.PathSegment(go.PathSegment.Line,.8*nt,et)),lt.add(new go.PathSegment(go.PathSegment.Line,.5*nt,.7*et)),lt.add(new go.PathSegment(go.PathSegment.Line,.2*nt,et)),lt.add(new go.PathSegment(go.PathSegment.Line,0,.8*et)),lt.add(new go.PathSegment(go.PathSegment.Line,.3*nt,.5*et)),lt.add(new go.PathSegment(go.PathSegment.Line,0,.2*et).close()),ht.spot1=new go.Spot(.3,.3),ht.spot2=new go.Spot(.7,.7),ht}),go.Shape.defineFigureGenerator("ElectricalHazard",function(kt,nt,et){var ht=new go.Geometry,lt=new go.PathFigure(.37*nt,0,!0);return ht.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,.5*nt,.11*et)),lt.add(new go.PathSegment(go.PathSegment.Line,.77*nt,.04*et)),lt.add(new go.PathSegment(go.PathSegment.Line,.33*nt,.49*et)),lt.add(new go.PathSegment(go.PathSegment.Line,nt,.37*et)),lt.add(new go.PathSegment(go.PathSegment.Line,.63*nt,.86*et)),lt.add(new go.PathSegment(go.PathSegment.Line,.77*nt,.91*et)),lt.add(new go.PathSegment(go.PathSegment.Line,.34*nt,et)),lt.add(new go.PathSegment(go.PathSegment.Line,.34*nt,.78*et)),lt.add(new go.PathSegment(go.PathSegment.Line,.44*nt,.8*et)),lt.add(new go.PathSegment(go.PathSegment.Line,.65*nt,.56*et)),lt.add(new go.PathSegment(go.PathSegment.Line,0,.68*et).close()),ht}),go.Shape.defineFigureGenerator("FireHazard",function(kt,nt,et){var ht=new go.Geometry,lt=new go.PathFigure(.1*nt,et,!0);return ht.add(lt),lt.add(new go.PathSegment(go.PathSegment.Bezier,.29*nt,0,-.25*nt,.63*et,.45*nt,.44*et)),lt.add(new go.PathSegment(go.PathSegment.Bezier,.51*nt,.42*et,.48*nt,.17*et,.54*nt,.35*et)),lt.add(new go.PathSegment(go.PathSegment.Bezier,.59*nt,.18*et,.59*nt,.29*et,.58*nt,.28*et)),lt.add(new go.PathSegment(go.PathSegment.Bezier,.75*nt,.6*et,.8*nt,.34*et,.88*nt,.43*et)),lt.add(new go.PathSegment(go.PathSegment.Bezier,.88*nt,.31*et,.87*nt,.48*et,.88*nt,.43*et)),lt.add(new go.PathSegment(go.PathSegment.Bezier,.9*nt,et,1.17*nt,.76*et,.82*nt,.8*et).close()),ht.spot1=new go.Spot(.07,.445),ht.spot2=new go.Spot(.884,.958),ht}),go.Shape.defineFigureGenerator("BpmnActivityLoop",function(kt,nt,et){var ht=new go.Geometry,lt=.5,gt=0,yt=0,Lt=lt*ee,Dt=.4*Math.SQRT2/2+.5,zt=.5-.5*Math.SQRT2/2,Xt=1,re=.5,le=.5,ae=0,je=new go.PathFigure(Dt*nt,(1-zt)*et,!1);return ht.add(je),je.add(new go.PathSegment(go.PathSegment.Bezier,Xt*nt,re*et,Xt*nt,.7*et,Xt*nt,re*et)),je.add(new go.PathSegment(go.PathSegment.Bezier,(le+gt)*nt,(ae+gt)*et,(.5+lt+gt)*nt,(.5-Lt+gt)*et,(.5+Lt+gt)*nt,(.5-lt+gt)*et)),je.add(new go.PathSegment(go.PathSegment.Bezier,(.5-lt+gt)*nt,(.5+yt)*et,(.5-Lt+gt)*nt,(.5-lt+yt)*et,(.5-lt+gt)*nt,(.5-Lt+yt)*et)),je.add(new go.PathSegment(go.PathSegment.Bezier,(.35+gt)*nt,.9*et,(.5-lt+gt)*nt,(.5+Lt+yt)*et,(.5-Lt+gt)*nt,.9*et)),je.add(new go.PathSegment(go.PathSegment.Move,(.25+gt)*nt,.8*et)),je.add(new go.PathSegment(go.PathSegment.Line,(.35+gt)*nt,.9*et)),je.add(new go.PathSegment(go.PathSegment.Line,(.2+gt)*nt,.95*et)),ht}),go.Shape.defineFigureGenerator("BpmnActivityParallel",function(kt,nt,et){var ht=new go.Geometry,lt=new go.PathFigure(0,0,!1);return ht.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,0,et)),lt.add(new go.PathSegment(go.PathSegment.Move,.5*nt,0)),lt.add(new go.PathSegment(go.PathSegment.Line,.5*nt,et)),lt.add(new go.PathSegment(go.PathSegment.Move,nt,0)),lt.add(new go.PathSegment(go.PathSegment.Line,nt,et)),ht}),go.Shape.defineFigureGenerator("BpmnActivitySequential",function(kt,nt,et){var ht=new go.Geometry,lt=new go.PathFigure(0,0,!1);return ht.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,nt,0)),lt.add(new go.PathSegment(go.PathSegment.Move,0,.5*et)),lt.add(new go.PathSegment(go.PathSegment.Line,nt,.5*et)),lt.add(new go.PathSegment(go.PathSegment.Move,0,et)),lt.add(new go.PathSegment(go.PathSegment.Line,nt,et)),ht}),go.Shape.defineFigureGenerator("BpmnActivityAdHoc",function(kt,nt,et){var ht=new go.Geometry,lt=new go.PathFigure(0,0,!1);ht.add(lt);var gt=new go.PathFigure(nt,et,!1);ht.add(gt);var yt=new go.PathFigure(0,.5*et,!1);return ht.add(yt),yt.add(new go.PathSegment(go.PathSegment.Bezier,.5*nt,.5*et,.2*nt,.35*et,.3*nt,.35*et)),yt.add(new go.PathSegment(go.PathSegment.Bezier,nt,.5*et,.7*nt,.65*et,.8*nt,.65*et)),ht}),go.Shape.defineFigureGenerator("BpmnActivityCompensation",function(kt,nt,et){var ht=new go.Geometry,lt=new go.PathFigure(0,.5*et,!0);return ht.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,.5*nt,0)),lt.add(new go.PathSegment(go.PathSegment.Line,.5*nt,.5*et)),lt.add(new go.PathSegment(go.PathSegment.Line,nt,et)),lt.add(new go.PathSegment(go.PathSegment.Line,nt,0)),lt.add(new go.PathSegment(go.PathSegment.Line,.5*nt,.5*et)),lt.add(new go.PathSegment(go.PathSegment.Line,.5*nt,et).close()),ht}),go.Shape.defineFigureGenerator("BpmnTaskMessage",function(kt,nt,et){var ht=new go.Geometry,lt=new go.PathFigure(0,.2*et,!0);ht.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,nt,.2*et)),lt.add(new go.PathSegment(go.PathSegment.Line,nt,.8*et)),lt.add(new go.PathSegment(go.PathSegment.Line,0,.8*et)),lt.add(new go.PathSegment(go.PathSegment.Line,0,.8*et).close());var lt=new go.PathFigure(0,.2*et,!1);return ht.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,.5*nt,.5*et)),lt.add(new go.PathSegment(go.PathSegment.Line,nt,.2*et)),ht}),go.Shape.defineFigureGenerator("BpmnTaskScript",function(kt,nt,et){var ht=new go.Geometry,lt=new go.PathFigure(.7*nt,et,!0);ht.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,.3*nt,et)),lt.add(new go.PathSegment(go.PathSegment.Bezier,.3*nt,0,.6*nt,.5*et,0,.5*et)),lt.add(new go.PathSegment(go.PathSegment.Line,.7*nt,0)),lt.add(new go.PathSegment(go.PathSegment.Bezier,.7*nt,et,.4*nt,.5*et,nt,.5*et).close());var gt=new go.PathFigure(.45*nt,.73*et,!1);return ht.add(gt),gt.add(new go.PathSegment(go.PathSegment.Line,.7*nt,.73*et)),gt.add(new go.PathSegment(go.PathSegment.Move,.38*nt,.5*et)),gt.add(new go.PathSegment(go.PathSegment.Line,.63*nt,.5*et)),gt.add(new go.PathSegment(go.PathSegment.Move,.31*nt,.27*et)),gt.add(new go.PathSegment(go.PathSegment.Line,.56*nt,.27*et)),ht}),go.Shape.defineFigureGenerator("BpmnTaskUser",function(kt,nt,et){var ht=new go.Geometry,lt=new go.PathFigure(0,0,!1);ht.add(lt);var gt=new go.PathFigure(.335*nt,(1-.555)*et,!0);ht.add(gt),gt.add(new go.PathSegment(go.PathSegment.Line,.335*nt,(1-.405)*et)),gt.add(new go.PathSegment(go.PathSegment.Line,(1-.335)*nt,(1-.405)*et)),gt.add(new go.PathSegment(go.PathSegment.Line,(1-.335)*nt,(1-.555)*et)),gt.add(new go.PathSegment(go.PathSegment.Bezier,nt,.68*et,(1-.12)*nt,.46*et,(1-.02)*nt,.54*et)),gt.add(new go.PathSegment(go.PathSegment.Line,nt,et)),gt.add(new go.PathSegment(go.PathSegment.Line,0,et)),gt.add(new go.PathSegment(go.PathSegment.Line,0,.68*et)),gt.add(new go.PathSegment(go.PathSegment.Bezier,.335*nt,(1-.555)*et,.02*nt,.54*et,.12*nt,.46*et)),gt.add(new go.PathSegment(go.PathSegment.Line,.365*nt,(1-.595)*et));var yt=.5-.285,Lt=.5,Dt=yt,zt=Math.PI/4,Xt=4*(1-Math.cos(zt))/(3*Math.sin(zt)),re=Xt*.5,le=yt,ae=yt,je=Xt*le,ne=Xt*ae;gt.add(new go.PathSegment(go.PathSegment.Bezier,(Lt-le)*nt,Dt*et,(Lt-(je+le)/2)*nt,(Dt+(ae+ne)/2)*et,(Lt-le)*nt,(Dt+ne)*et)),gt.add(new go.PathSegment(go.PathSegment.Bezier,Lt*nt,(Dt-ae)*et,(Lt-le)*nt,(Dt-ne)*et,(Lt-je)*nt,(Dt-ae)*et)),gt.add(new go.PathSegment(go.PathSegment.Bezier,(Lt+le)*nt,Dt*et,(Lt+je)*nt,(Dt-ae)*et,(Lt+le)*nt,(Dt-ne)*et)),gt.add(new go.PathSegment(go.PathSegment.Bezier,(1-.365)*nt,(1-.595)*et,(Lt+le)*nt,(Dt+ne)*et,(Lt+(je+le)/2)*nt,(Dt+(ae+ne)/2)*et)),gt.add(new go.PathSegment(go.PathSegment.Line,(1-.365)*nt,(1-.595)*et)),gt.add(new go.PathSegment(go.PathSegment.Line,(1-.335)*nt,(1-.555)*et)),gt.add(new go.PathSegment(go.PathSegment.Line,(1-.335)*nt,(1-.405)*et)),gt.add(new go.PathSegment(go.PathSegment.Line,.335*nt,(1-.405)*et));var Le=new go.PathFigure(.2*nt,et,!1);ht.add(Le),Le.add(new go.PathSegment(go.PathSegment.Line,.2*nt,.8*et));var ue=new go.PathFigure(.8*nt,et,!1);return ht.add(ue),ue.add(new go.PathSegment(go.PathSegment.Line,.8*nt,.8*et)),ht}),go.Shape.defineFigureGenerator("BpmnEventConditional",function(kt,nt,et){var ht=new go.Geometry,lt=new go.PathFigure(.1*nt,0,!0);ht.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,.9*nt,0)),lt.add(new go.PathSegment(go.PathSegment.Line,.9*nt,et)),lt.add(new go.PathSegment(go.PathSegment.Line,.1*nt,et).close());var gt=new go.PathFigure(.2*nt,.2*et,!1);return ht.add(gt),gt.add(new go.PathSegment(go.PathSegment.Line,.8*nt,.2*et)),gt.add(new go.PathSegment(go.PathSegment.Move,.2*nt,.4*et)),gt.add(new go.PathSegment(go.PathSegment.Line,.8*nt,.4*et)),gt.add(new go.PathSegment(go.PathSegment.Move,.2*nt,.6*et)),gt.add(new go.PathSegment(go.PathSegment.Line,.8*nt,.6*et)),gt.add(new go.PathSegment(go.PathSegment.Move,.2*nt,.8*et)),gt.add(new go.PathSegment(go.PathSegment.Line,.8*nt,.8*et)),ht}),go.Shape.defineFigureGenerator("BpmnEventError",function(kt,nt,et){var ht=new go.Geometry,lt=new go.PathFigure(0,et,!0);return ht.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,.33*nt,0)),lt.add(new go.PathSegment(go.PathSegment.Line,.66*nt,.5*et)),lt.add(new go.PathSegment(go.PathSegment.Line,nt,0)),lt.add(new go.PathSegment(go.PathSegment.Line,.66*nt,et)),lt.add(new go.PathSegment(go.PathSegment.Line,.33*nt,.5*et).close()),ht}),go.Shape.defineFigureGenerator("BpmnEventEscalation",function(kt,nt,et){var ht=new go.Geometry,lt=new go.PathFigure(0,0,!1);ht.add(lt);var gt=new go.PathFigure(nt,et,!1);ht.add(gt);var yt=new go.PathFigure(.1*nt,et,!0);return ht.add(yt),yt.add(new go.PathSegment(go.PathSegment.Line,.5*nt,0)),yt.add(new go.PathSegment(go.PathSegment.Line,.9*nt,et)),yt.add(new go.PathSegment(go.PathSegment.Line,.5*nt,.5*et).close()),ht}),go.Shape.defineFigureGenerator("Caution",function(kt,nt,et){var ht=new go.Geometry,lt=new go.PathFigure(.05*nt,et,!0);ht.add(lt),lt.add(new go.PathSegment(go.PathSegment.Bezier,.1*nt,.8*et,0,et,0,et)),lt.add(new go.PathSegment(go.PathSegment.Line,.45*nt,.1*et)),lt.add(new go.PathSegment(go.PathSegment.Bezier,.55*nt,.1*et,.5*nt,0,.5*nt,0)),lt.add(new go.PathSegment(go.PathSegment.Line,.95*nt,.9*et)),lt.add(new go.PathSegment(go.PathSegment.Bezier,.9*nt,et,nt,et,nt,et)),lt.add(new go.PathSegment(go.PathSegment.Line,.05*nt,et));var gt=.05;return lt.add(new go.PathSegment(go.PathSegment.Move,(.5-gt)*nt,.875*et)),lt.add(new go.PathSegment(go.PathSegment.Arc,180,-360,.5*nt,.875*et,gt*nt,gt*et)),lt.add(new go.PathSegment(go.PathSegment.Move,.5*nt,.75*et)),lt.add(new go.PathSegment(go.PathSegment.Bezier,.5*nt,.325*et,.575*nt,.725*et,.625*nt,.375*et)),lt.add(new go.PathSegment(go.PathSegment.Bezier,.5*nt,.75*et,.375*nt,.375*et,.425*nt,.725*et)),ht}),go.Shape.defineFigureGenerator("Recycle",function(kt,nt,et){var ht=new go.Geometry,lt=new go.PathFigure(.45*nt,.95*et,!1);ht.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,.2*nt,.95*et)),lt.add(new go.PathSegment(go.PathSegment.Bezier,.185*nt,.85*et,.17*nt,.95*et,.15*nt,.9*et)),lt.add(new go.PathSegment(go.PathSegment.Line,.235*nt,.75*et)),lt.add(new go.PathSegment(go.PathSegment.Line,.3*nt,.625*et)),lt.add(new go.PathSegment(go.PathSegment.Line,.35*nt,.65*et)),lt.add(new go.PathSegment(go.PathSegment.Line,.275*nt,.45*et)),lt.add(new go.PathSegment(go.PathSegment.Line,.05*nt,.45*et)),lt.add(new go.PathSegment(go.PathSegment.Line,.1*nt,.5*et)),lt.add(new go.PathSegment(go.PathSegment.Line,.05*nt,.575*et)),lt.add(new go.PathSegment(go.PathSegment.Bezier,.1875*nt,.95*et,0,.675*et,0,.7*et)),lt.add(new go.PathSegment(go.PathSegment.Move,.45*nt,.95*et)),lt.add(new go.PathSegment(go.PathSegment.Line,.45*nt,.775*et)),lt.add(new go.PathSegment(go.PathSegment.Line,.22*nt,.775*et));var gt=new go.PathFigure(.475*nt,.2*et,!1);ht.add(gt),gt.add(new go.PathSegment(go.PathSegment.Line,.4*nt,.4*et)),gt.add(new go.PathSegment(go.PathSegment.Line,.225*nt,.3*et)),gt.add(new go.PathSegment(go.PathSegment.Line,.275*nt,.175*et)),gt.add(new go.PathSegment(go.PathSegment.Line,.325*nt,.05*et)),gt.add(new go.PathSegment(go.PathSegment.Bezier,.4*nt,.05*et,.35*nt,0,.375*nt,0)),gt.add(new go.PathSegment(go.PathSegment.Line,.575*nt,.375*et)),gt.add(new go.PathSegment(go.PathSegment.Line,.525*nt,.4*et)),gt.add(new go.PathSegment(go.PathSegment.Line,.75*nt,.475*et)),gt.add(new go.PathSegment(go.PathSegment.Line,.85*nt,.315*et)),gt.add(new go.PathSegment(go.PathSegment.Line,.8*nt,.32*et)),gt.add(new go.PathSegment(go.PathSegment.Line,.65*nt,.05*et)),gt.add(new go.PathSegment(go.PathSegment.Bezier,.575*nt,0,.65*nt,.05*et,.625*nt,0)),gt.add(new go.PathSegment(go.PathSegment.Line,.38*nt,.0105*et));var yt=new go.PathFigure(.675*nt,.575*et,!1);return ht.add(yt),yt.add(new go.PathSegment(go.PathSegment.Line,.875*nt,.525*et)),yt.add(new go.PathSegment(go.PathSegment.Line,nt,.775*et)),yt.add(new go.PathSegment(go.PathSegment.Bezier,.85*nt,.95*et,nt,.8*et,nt,.85*et)),yt.add(new go.PathSegment(go.PathSegment.Line,.65*nt,.95*et)),yt.add(new go.PathSegment(go.PathSegment.Line,.65*nt,et)),yt.add(new go.PathSegment(go.PathSegment.Line,.55*nt,.85*et)),yt.add(new go.PathSegment(go.PathSegment.Line,.65*nt,.725*et)),yt.add(new go.PathSegment(go.PathSegment.Line,.65*nt,.775*et)),yt.add(new go.PathSegment(go.PathSegment.Line,.7*nt,.775*et)),yt.add(new go.PathSegment(go.PathSegment.Line,nt,.775*et)),yt.add(new go.PathSegment(go.PathSegment.Move,.675*nt,.575*et)),yt.add(new go.PathSegment(go.PathSegment.Line,.775*nt,.775*et)),ht}),go.Shape.defineFigureGenerator("BpmnEventTimer",function(kt,nt,et){var ht=new go.Geometry,lt=.5,gt=ee*.5,yt=new go.PathFigure(nt,lt*et,!0);ht.add(yt),yt.add(new go.PathSegment(go.PathSegment.Bezier,lt*nt,et,nt,(lt+gt)*et,(lt+gt)*nt,et)),yt.add(new go.PathSegment(go.PathSegment.Bezier,0,lt*et,(lt-gt)*nt,et,0,(lt+gt)*et)),yt.add(new go.PathSegment(go.PathSegment.Bezier,lt*nt,0,0,(lt-gt)*et,(lt-gt)*nt,0)),yt.add(new go.PathSegment(go.PathSegment.Bezier,nt,lt*et,(lt+gt)*nt,0,nt,(lt-gt)*et));var Lt=new go.PathFigure(lt*nt,0,!1);return ht.add(Lt),Lt.add(new go.PathSegment(go.PathSegment.Line,lt*nt,.15*et)),Lt.add(new go.PathSegment(go.PathSegment.Move,lt*nt,et)),Lt.add(new go.PathSegment(go.PathSegment.Line,lt*nt,.85*et)),Lt.add(new go.PathSegment(go.PathSegment.Move,0,lt*et)),Lt.add(new go.PathSegment(go.PathSegment.Line,.15*nt,lt*et)),Lt.add(new go.PathSegment(go.PathSegment.Move,nt,lt*et)),Lt.add(new go.PathSegment(go.PathSegment.Line,.85*nt,lt*et)),Lt.add(new go.PathSegment(go.PathSegment.Move,lt*nt,lt*et)),Lt.add(new go.PathSegment(go.PathSegment.Line,.58*nt,.1*et)),Lt.add(new go.PathSegment(go.PathSegment.Move,lt*nt,lt*et)),Lt.add(new go.PathSegment(go.PathSegment.Line,.78*nt,.54*et)),ht}),go.Shape.defineFigureGenerator("Package",function(kt,nt,et){var ht=new go.Geometry,lt=new go.PathFigure(0,.15*et,!0);ht.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,nt,.15*et)),lt.add(new go.PathSegment(go.PathSegment.Line,nt,et)),lt.add(new go.PathSegment(go.PathSegment.Line,0,et).close());var gt=new go.PathFigure(0,.15*et,!0);return ht.add(gt),gt.add(new go.PathSegment(go.PathSegment.Line,0,0)),gt.add(new go.PathSegment(go.PathSegment.Line,.6*nt,0)),gt.add(new go.PathSegment(go.PathSegment.Line,.65*nt,.15*et).close()),ht.spot1=new go.Spot(0,.1),ht.spot2=new go.Spot(1,1),ht}),go.Shape.defineFigureGenerator("Class",function(kt,nt,et){var ht=new go.Geometry,lt=new go.PathFigure(0,0,!0);ht.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,nt,0)),lt.add(new go.PathSegment(go.PathSegment.Line,nt,et)),lt.add(new go.PathSegment(go.PathSegment.Line,0,et)),lt.add(new go.PathSegment(go.PathSegment.Line,0,0).close());var gt=new go.PathFigure(0,.2*et,!1);ht.add(gt),gt.add(new go.PathSegment(go.PathSegment.Line,nt,.2*et).close());var yt=new go.PathFigure(0,.5*et,!1);return ht.add(yt),yt.add(new go.PathSegment(go.PathSegment.Line,nt,.5*et).close()),ht}),go.Shape.defineFigureGenerator("Component",function(kt,nt,et){var ht=new go.Geometry,lt=new go.PathFigure(nt,et,!0);ht.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,nt,0)),lt.add(new go.PathSegment(go.PathSegment.Line,.15*nt,0)),lt.add(new go.PathSegment(go.PathSegment.Line,.15*nt,et)),lt.add(new go.PathSegment(go.PathSegment.Line,nt,et).close());var gt=new go.PathFigure(0,.2*et,!0);ht.add(gt),gt.add(new go.PathSegment(go.PathSegment.Line,.45*nt,.2*et)),gt.add(new go.PathSegment(go.PathSegment.Line,.45*nt,.4*et)),gt.add(new go.PathSegment(go.PathSegment.Line,0,.4*et)),gt.add(new go.PathSegment(go.PathSegment.Line,0,.2*et).close());var yt=new go.PathFigure(0,.6*et,!0);return ht.add(yt),yt.add(new go.PathSegment(go.PathSegment.Line,.45*nt,.6*et)),yt.add(new go.PathSegment(go.PathSegment.Line,.45*nt,.8*et)),yt.add(new go.PathSegment(go.PathSegment.Line,0,.8*et)),yt.add(new go.PathSegment(go.PathSegment.Line,0,.6*et).close()),ht}),go.Shape.defineFigureGenerator("Boat Shipment",function(kt,nt,et){var ht=new go.Geometry,lt=new go.PathFigure(.15*nt,.6*et,!0);ht.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,.15*nt,.6*et)),lt.add(new go.PathSegment(go.PathSegment.Line,0,.6*et)),lt.add(new go.PathSegment(go.PathSegment.Line,.15*nt,et)),lt.add(new go.PathSegment(go.PathSegment.Line,.85*nt,et)),lt.add(new go.PathSegment(go.PathSegment.Line,nt,.6*et)),lt.add(new go.PathSegment(go.PathSegment.Line,.85*nt,.6*et)),lt.add(new go.PathSegment(go.PathSegment.Line,.5*nt,0)),lt.add(new go.PathSegment(go.PathSegment.Line,.15*nt,.6*et));var gt=new go.PathFigure(.15*nt,.6*et,!1);return ht.add(gt),gt.add(new go.PathSegment(go.PathSegment.Line,.85*nt,.6*et)),ht}),go.Shape.defineFigureGenerator("Customer/Supplier",function(kt,nt,et){var ht=new go.Geometry,lt=new go.PathFigure(nt,et,!0);return ht.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,nt,0)),lt.add(new go.PathSegment(go.PathSegment.Line,.66*nt,.33*et)),lt.add(new go.PathSegment(go.PathSegment.Line,.66*nt,0)),lt.add(new go.PathSegment(go.PathSegment.Line,.33*nt,.33*et)),lt.add(new go.PathSegment(go.PathSegment.Line,.33*nt,0)),lt.add(new go.PathSegment(go.PathSegment.Line,0,.33*et)),lt.add(new go.PathSegment(go.PathSegment.Line,0,et)),lt.add(new go.PathSegment(go.PathSegment.Line,nt,et).close()),ht}),go.Shape.defineFigureGenerator("Workcell",function(kt,nt,et){var ht=new go.Geometry,lt=new go.PathFigure(0,et,!0);return ht.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,0,0)),lt.add(new go.PathSegment(go.PathSegment.Line,nt,0)),lt.add(new go.PathSegment(go.PathSegment.Line,nt,et)),lt.add(new go.PathSegment(go.PathSegment.Line,.65*nt,et)),lt.add(new go.PathSegment(go.PathSegment.Line,.65*nt,.4*et)),lt.add(new go.PathSegment(go.PathSegment.Line,.35*nt,.4*et)),lt.add(new go.PathSegment(go.PathSegment.Line,.35*nt,et)),lt.add(new go.PathSegment(go.PathSegment.Line,0,et).close()),ht}),go.Shape.defineFigureGenerator("Supermarket",function(kt,nt,et){var ht=new go.Geometry,lt=new go.PathFigure(0,0,!1);return ht.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,nt,0)),lt.add(new go.PathSegment(go.PathSegment.Line,nt,.33*et)),lt.add(new go.PathSegment(go.PathSegment.Line,0,.33*et)),lt.add(new go.PathSegment(go.PathSegment.Move,nt,.33*et)),lt.add(new go.PathSegment(go.PathSegment.Line,nt,.66*et)),lt.add(new go.PathSegment(go.PathSegment.Line,0,.66*et)),lt.add(new go.PathSegment(go.PathSegment.Move,nt,.66*et)),lt.add(new go.PathSegment(go.PathSegment.Line,nt,et)),lt.add(new go.PathSegment(go.PathSegment.Line,0,et)),ht}),go.Shape.defineFigureGenerator("TruckShipment",function(kt,nt,et){var ht=new go.Geometry,lt=new go.PathFigure(0,0,!0);ht.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,.6*nt,0)),lt.add(new go.PathSegment(go.PathSegment.Line,.6*nt,.8*et)),lt.add(new go.PathSegment(go.PathSegment.Line,0,.8*et)),lt.add(new go.PathSegment(go.PathSegment.Line,0,0).close());var gt=new go.PathFigure(nt,.8*et,!0);ht.add(gt),gt.add(new go.PathSegment(go.PathSegment.Line,nt,.4*et)),gt.add(new go.PathSegment(go.PathSegment.Line,.6*nt,.4*et)),gt.add(new go.PathSegment(go.PathSegment.Line,.6*nt,.8*et)),gt.add(new go.PathSegment(go.PathSegment.Line,nt,.8*et).close());var yt=.1,Lt=ee*.1,Dt=.2,zt=.9,Xt=new go.PathFigure((Dt-yt)*nt,zt*et,!0);ht.add(Xt),Xt.add(new go.PathSegment(go.PathSegment.Bezier,Dt*nt,(zt-yt)*et,(Dt-yt)*nt,(zt-Lt)*et,(Dt-Lt)*nt,(zt-yt)*et)),Xt.add(new go.PathSegment(go.PathSegment.Bezier,(Dt+yt)*nt,zt*et,(Dt+Lt)*nt,(zt-yt)*et,(Dt+yt)*nt,(zt-Lt)*et)),Xt.add(new go.PathSegment(go.PathSegment.Bezier,Dt*nt,(zt+yt)*et,(Dt+yt)*nt,(zt+Lt)*et,(Dt+Lt)*nt,(zt+yt)*et)),Xt.add(new go.PathSegment(go.PathSegment.Bezier,(Dt-yt)*nt,zt*et,(Dt-Lt)*nt,(zt+yt)*et,(Dt-yt)*nt,(zt+Lt)*et).close()),yt=.1,Lt=ee*.1,Dt=.8,zt=.9;var re=new go.PathFigure((Dt-yt)*nt,zt*et,!0);return ht.add(re),re.add(new go.PathSegment(go.PathSegment.Bezier,Dt*nt,(zt-yt)*et,(Dt-yt)*nt,(zt-Lt)*et,(Dt-Lt)*nt,(zt-yt)*et)),re.add(new go.PathSegment(go.PathSegment.Bezier,(Dt+yt)*nt,zt*et,(Dt+Lt)*nt,(zt-yt)*et,(Dt+yt)*nt,(zt-Lt)*et)),re.add(new go.PathSegment(go.PathSegment.Bezier,Dt*nt,(zt+yt)*et,(Dt+yt)*nt,(zt+Lt)*et,(Dt+Lt)*nt,(zt+yt)*et)),re.add(new go.PathSegment(go.PathSegment.Bezier,(Dt-yt)*nt,zt*et,(Dt-Lt)*nt,(zt+yt)*et,(Dt-yt)*nt,(zt+Lt)*et).close()),ht}),go.Shape.defineFigureGenerator("KanbanPost",function(kt,nt,et){var ht=new go.Geometry,lt=new go.PathFigure(.2*nt,0,!1);return ht.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,.2*nt,.5*et)),lt.add(new go.PathSegment(go.PathSegment.Line,.8*nt,.5*et)),lt.add(new go.PathSegment(go.PathSegment.Line,.8*nt,0)),lt.add(new go.PathSegment(go.PathSegment.Move,.5*nt,.5*et)),lt.add(new go.PathSegment(go.PathSegment.Line,.5*nt,et)),lt.add(new go.PathSegment(go.PathSegment.Line,.2*nt,et)),lt.add(new go.PathSegment(go.PathSegment.Move,.5*nt,et)),lt.add(new go.PathSegment(go.PathSegment.Line,.8*nt,et)),ht}),go.Shape.defineFigureGenerator("Forklift",function(kt,nt,et){var ht=new go.Geometry,lt=new go.PathFigure(0,0,!0);ht.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,0,.5*et)),lt.add(new go.PathSegment(go.PathSegment.Line,.5*nt,.5*et)),lt.add(new go.PathSegment(go.PathSegment.Line,.4*nt,0)),lt.add(new go.PathSegment(go.PathSegment.Line,0,0));var gt=new go.PathFigure(0,.5*et,!0);ht.add(gt),gt.add(new go.PathSegment(go.PathSegment.Line,0,.8*et)),gt.add(new go.PathSegment(go.PathSegment.Line,.5*nt,.8*et)),gt.add(new go.PathSegment(go.PathSegment.Line,.5*nt,.5*et)),gt.add(new go.PathSegment(go.PathSegment.Line,0,.5*et));var yt=new go.PathFigure(.5*nt,.8*et,!0);ht.add(yt),yt.add(new go.PathSegment(go.PathSegment.Line,.5*nt,.1*et)),yt.add(new go.PathSegment(go.PathSegment.Line,.55*nt,.1*et)),yt.add(new go.PathSegment(go.PathSegment.Line,.55*nt,.8*et)),yt.add(new go.PathSegment(go.PathSegment.Line,.5*nt,.8*et));var Lt=new go.PathFigure(.5*nt,.7*et,!1);ht.add(Lt),Lt.add(new go.PathSegment(go.PathSegment.Line,nt,.7*et));var Dt=.1,zt=ee*.1,Xt=.1,re=.9,le=new go.PathFigure((Xt-Dt)*nt,re*et,!0);ht.add(le),le.add(new go.PathSegment(go.PathSegment.Bezier,Xt*nt,(re-Dt)*et,(Xt-Dt)*nt,(re-zt)*et,(Xt-zt)*nt,(re-Dt)*et)),le.add(new go.PathSegment(go.PathSegment.Bezier,(Xt+Dt)*nt,re*et,(Xt+zt)*nt,(re-Dt)*et,(Xt+Dt)*nt,(re-zt)*et)),le.add(new go.PathSegment(go.PathSegment.Bezier,Xt*nt,(re+Dt)*et,(Xt+Dt)*nt,(re+zt)*et,(Xt+zt)*nt,(re+Dt)*et)),le.add(new go.PathSegment(go.PathSegment.Bezier,(Xt-Dt)*nt,re*et,(Xt-zt)*nt,(re+Dt)*et,(Xt-Dt)*nt,(re+zt)*et)),Dt=.1,zt=ee*.1,Xt=.4,re=.9;var ae=new go.PathFigure((Xt-Dt)*nt,re*et,!0);return ht.add(ae),ae.add(new go.PathSegment(go.PathSegment.Bezier,Xt*nt,(re-Dt)*et,(Xt-Dt)*nt,(re-zt)*et,(Xt-zt)*nt,(re-Dt)*et)),ae.add(new go.PathSegment(go.PathSegment.Bezier,(Xt+Dt)*nt,re*et,(Xt+zt)*nt,(re-Dt)*et,(Xt+Dt)*nt,(re-zt)*et)),ae.add(new go.PathSegment(go.PathSegment.Bezier,Xt*nt,(re+Dt)*et,(Xt+Dt)*nt,(re+zt)*et,(Xt+zt)*nt,(re+Dt)*et)),ae.add(new go.PathSegment(go.PathSegment.Bezier,(Xt-Dt)*nt,re*et,(Xt-zt)*nt,(re+Dt)*et,(Xt-Dt)*nt,(re+zt)*et)),ht}),go.Shape.defineFigureGenerator("RailShipment",function(kt,nt,et){var ht=new go.Geometry,lt=new go.PathFigure(.1*nt,.4*et,!0);ht.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,.45*nt,.4*et)),lt.add(new go.PathSegment(go.PathSegment.Line,.45*nt,.9*et)),lt.add(new go.PathSegment(go.PathSegment.Line,.1*nt,.9*et)),lt.add(new go.PathSegment(go.PathSegment.Line,.1*nt,.4*et).close());var gt=new go.PathFigure(.45*nt,.7*et,!1);ht.add(gt),gt.add(new go.PathSegment(go.PathSegment.Line,.55*nt,.7*et));var yt=new go.PathFigure(.55*nt,.4*et,!0);ht.add(yt),yt.add(new go.PathSegment(go.PathSegment.Line,.9*nt,.4*et)),yt.add(new go.PathSegment(go.PathSegment.Line,.9*nt,.9*et)),yt.add(new go.PathSegment(go.PathSegment.Line,.55*nt,.9*et)),yt.add(new go.PathSegment(go.PathSegment.Line,.55*nt,.4*et).close());var Xt=.05,re=ee*.05,le=.175,ae=.95,Lt=new go.PathFigure((le-Xt)*nt,ae*et,!0);ht.add(Lt),Lt.add(new go.PathSegment(go.PathSegment.Bezier,le*nt,(ae-Xt)*et,(le-Xt)*nt,(ae-re)*et,(le-re)*nt,(ae-Xt)*et)),Lt.add(new go.PathSegment(go.PathSegment.Bezier,(le+Xt)*nt,ae*et,(le+re)*nt,(ae-Xt)*et,(le+Xt)*nt,(ae-re)*et)),Lt.add(new go.PathSegment(go.PathSegment.Bezier,le*nt,(ae+Xt)*et,(le+Xt)*nt,(ae+re)*et,(le+re)*nt,(ae+Xt)*et)),Lt.add(new go.PathSegment(go.PathSegment.Bezier,(le-Xt)*nt,ae*et,(le-re)*nt,(ae+Xt)*et,(le-Xt)*nt,(ae+re)*et));var Xt=.05,re=ee*.05,le=.375,ae=.95,Dt=new go.PathFigure((le-Xt)*nt,ae*et,!0);ht.add(Dt),Dt.add(new go.PathSegment(go.PathSegment.Bezier,le*nt,(ae-Xt)*et,(le-Xt)*nt,(ae-re)*et,(le-re)*nt,(ae-Xt)*et)),Dt.add(new go.PathSegment(go.PathSegment.Bezier,(le+Xt)*nt,ae*et,(le+re)*nt,(ae-Xt)*et,(le+Xt)*nt,(ae-re)*et)),Dt.add(new go.PathSegment(go.PathSegment.Bezier,le*nt,(ae+Xt)*et,(le+Xt)*nt,(ae+re)*et,(le+re)*nt,(ae+Xt)*et)),Dt.add(new go.PathSegment(go.PathSegment.Bezier,(le-Xt)*nt,ae*et,(le-re)*nt,(ae+Xt)*et,(le-Xt)*nt,(ae+re)*et));var Xt=.05,re=ee*.05,le=.625,ae=.95,zt=new go.PathFigure((le-Xt)*nt,ae*et,!0);ht.add(zt),zt.add(new go.PathSegment(go.PathSegment.Bezier,le*nt,(ae-Xt)*et,(le-Xt)*nt,(ae-re)*et,(le-re)*nt,(ae-Xt)*et)),zt.add(new go.PathSegment(go.PathSegment.Bezier,(le+Xt)*nt,ae*et,(le+re)*nt,(ae-Xt)*et,(le+Xt)*nt,(ae-re)*et)),zt.add(new go.PathSegment(go.PathSegment.Bezier,le*nt,(ae+Xt)*et,(le+Xt)*nt,(ae+re)*et,(le+re)*nt,(ae+Xt)*et)),zt.add(new go.PathSegment(go.PathSegment.Bezier,(le-Xt)*nt,ae*et,(le-re)*nt,(ae+Xt)*et,(le-Xt)*nt,(ae+re)*et));var Xt=.05,re=ee*.05,le=.825,ae=.95,je=new go.PathFigure((le-Xt)*nt,ae*et,!0);ht.add(je),je.add(new go.PathSegment(go.PathSegment.Bezier,le*nt,(ae-Xt)*et,(le-Xt)*nt,(ae-re)*et,(le-re)*nt,(ae-Xt)*et)),je.add(new go.PathSegment(go.PathSegment.Bezier,(le+Xt)*nt,ae*et,(le+re)*nt,(ae-Xt)*et,(le+Xt)*nt,(ae-re)*et)),je.add(new go.PathSegment(go.PathSegment.Bezier,le*nt,(ae+Xt)*et,(le+Xt)*nt,(ae+re)*et,(le+re)*nt,(ae+Xt)*et)),je.add(new go.PathSegment(go.PathSegment.Bezier,(le-Xt)*nt,ae*et,(le-re)*nt,(ae+Xt)*et,(le-Xt)*nt,(ae+re)*et).close());var ne=new go.PathFigure(0,et,!1);return ht.add(ne),ne.add(new go.PathSegment(go.PathSegment.Line,nt,et).close()),ht}),go.Shape.defineFigureGenerator("Warehouse",function(kt,nt,et){var ht=new go.Geometry,lt=new go.PathFigure(0,0,!0);ht.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,nt,0)),lt.add(new go.PathSegment(go.PathSegment.Line,nt,et)),lt.add(new go.PathSegment(go.PathSegment.Line,0,et)),lt.add(new go.PathSegment(go.PathSegment.Line,0,0).close());var gt=new go.PathFigure(0,.2*et,!1);ht.add(gt),gt.add(new go.PathSegment(go.PathSegment.Line,nt,.2*et).close());var yt=new go.PathFigure(.15*nt,et,!0);ht.add(yt),yt.add(new go.PathSegment(go.PathSegment.Line,.15*nt,.5*et)),yt.add(new go.PathSegment(go.PathSegment.Line,.4*nt,.5*et)),yt.add(new go.PathSegment(go.PathSegment.Line,.4*nt,et)),yt.add(new go.PathSegment(go.PathSegment.Line,.15*nt,et).close());var Lt=.05,Dt=ee*.05,zt=.35,Xt=.775,re=new go.PathFigure((zt-Lt)*nt,Xt*et,!0);return ht.add(re),re.add(new go.PathSegment(go.PathSegment.Bezier,zt*nt,(Xt-Lt)*et,(zt-Lt)*nt,(Xt-Dt)*et,(zt-Dt)*nt,(Xt-Lt)*et)),re.add(new go.PathSegment(go.PathSegment.Bezier,(zt+Lt)*nt,Xt*et,(zt+Dt)*nt,(Xt-Lt)*et,(zt+Lt)*nt,(Xt-Dt)*et)),re.add(new go.PathSegment(go.PathSegment.Bezier,zt*nt,(Xt+Lt)*et,(zt+Lt)*nt,(Xt+Dt)*et,(zt+Dt)*nt,(Xt+Lt)*et)),re.add(new go.PathSegment(go.PathSegment.Bezier,(zt-Lt)*nt,Xt*et,(zt-Dt)*nt,(Xt+Lt)*et,(zt-Lt)*nt,(Xt+Dt)*et).close()),ht}),go.Shape.defineFigureGenerator("ControlCenter",function(kt,nt,et){var ht=new go.Geometry,lt=new go.PathFigure(0,et,!0);return ht.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,0,.8*et)),lt.add(new go.PathSegment(go.PathSegment.Line,.1*nt,.8*et)),lt.add(new go.PathSegment(go.PathSegment.Line,.1*nt,0)),lt.add(new go.PathSegment(go.PathSegment.Line,.9*nt,0)),lt.add(new go.PathSegment(go.PathSegment.Line,.9*nt,.8*et)),lt.add(new go.PathSegment(go.PathSegment.Line,nt,.8*et)),lt.add(new go.PathSegment(go.PathSegment.Line,nt,et)),lt.add(new go.PathSegment(go.PathSegment.Line,0,et)),lt.add(new go.PathSegment(go.PathSegment.Move,.1*nt,.8*et)),lt.add(new go.PathSegment(go.PathSegment.Line,.9*nt,.8*et).close()),ht}),go.Shape.defineFigureGenerator("Bluetooth",function(kt,nt,et){var ht=new go.Geometry,lt=new go.PathFigure(0,.75*et,!1);return ht.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,0,.75*et)),lt.add(new go.PathSegment(go.PathSegment.Line,nt,.25*et)),lt.add(new go.PathSegment(go.PathSegment.Line,.5*nt,0)),lt.add(new go.PathSegment(go.PathSegment.Line,.5*nt,et)),lt.add(new go.PathSegment(go.PathSegment.Line,nt,.75*et)),lt.add(new go.PathSegment(go.PathSegment.Line,0,.25*et)),ht}),go.Shape.defineFigureGenerator("Bookmark",function(kt,nt,et){var ht=new go.Geometry,lt=new go.PathFigure(0,0,!0);return ht.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,0,et)),lt.add(new go.PathSegment(go.PathSegment.Line,.5*nt,.6*et)),lt.add(new go.PathSegment(go.PathSegment.Line,nt,et)),lt.add(new go.PathSegment(go.PathSegment.Line,nt,0)),lt.add(new go.PathSegment(go.PathSegment.Line,0,0)),lt.add(new go.PathSegment(go.PathSegment.Move,.2*nt,.2*et)),lt.add(new go.PathSegment(go.PathSegment.Line,.8*nt,.2*et)),lt.add(new go.PathSegment(go.PathSegment.Move,.2*nt,.4*et)),lt.add(new go.PathSegment(go.PathSegment.Line,.8*nt,.4*et)),ht}),go.Shape.defineFigureGenerator("Bookmark",function(kt,nt,et){var ht=new go.Geometry,lt=new go.PathFigure(0,0,!0);return ht.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,0,et)),lt.add(new go.PathSegment(go.PathSegment.Line,.5*nt,.6*et)),lt.add(new go.PathSegment(go.PathSegment.Line,nt,et)),lt.add(new go.PathSegment(go.PathSegment.Line,nt,0)),lt.add(new go.PathSegment(go.PathSegment.Line,0,0)),lt.add(new go.PathSegment(go.PathSegment.Move,.2*nt,.2*et)),lt.add(new go.PathSegment(go.PathSegment.Line,.8*nt,.2*et)),lt.add(new go.PathSegment(go.PathSegment.Move,.2*nt,.4*et)),lt.add(new go.PathSegment(go.PathSegment.Line,.8*nt,.4*et)),ht}),go.Shape.defineFigureGenerator("Globe",function(kt,nt,et){var ht=new go.Geometry,lt=new go.PathFigure(.5*nt,0,!1);return ht.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,.5*nt,et)),lt.add(new go.PathSegment(go.PathSegment.Move,0,.5*et)),lt.add(new go.PathSegment(go.PathSegment.Line,nt,.5*et)),lt.add(new go.PathSegment(go.PathSegment.Move,.5*nt,0)),lt.add(new go.PathSegment(go.PathSegment.Bezier,nt,.5*et,.75*nt,0,nt,.25*et)),lt.add(new go.PathSegment(go.PathSegment.Bezier,.5*nt,et,nt,.75*et,.75*nt,et)),lt.add(new go.PathSegment(go.PathSegment.Bezier,0,.5*et,.25*nt,et,0,.75*et)),lt.add(new go.PathSegment(go.PathSegment.Bezier,.5*nt,0,0,.25*et,.25*nt,0)),lt.add(new go.PathSegment(go.PathSegment.Bezier,.5*nt,et,.15*nt,.25*et,.15*nt,.75*et)),lt.add(new go.PathSegment(go.PathSegment.Bezier,.5*nt,0,.85*nt,.75*et,.85*nt,.25*et)),lt.add(new go.PathSegment(go.PathSegment.Move,.1675*nt,.15*et)),lt.add(new go.PathSegment(go.PathSegment.Bezier,.8325*nt,.15*et,.35*nt,.3*et,.65*nt,.3*et)),lt.add(new go.PathSegment(go.PathSegment.Move,.1675*nt,.85*et)),lt.add(new go.PathSegment(go.PathSegment.Bezier,.8325*nt,.85*et,.35*nt,.7*et,.65*nt,.7*et)),ht}),go.Shape.defineFigureGenerator("Wave",function(kt,nt,et){var ht=new go.Geometry,lt=new go.PathFigure(0,.25*et,!1);return ht.add(lt),lt.add(new go.PathSegment(go.PathSegment.Bezier,.3*nt,.25*et,.1*nt,0,.2*nt,0)),lt.add(new go.PathSegment(go.PathSegment.Bezier,.7*nt,.25*et,.425*nt,.5*et,.575*nt,.5*et)),lt.add(new go.PathSegment(go.PathSegment.Bezier,nt,.25*et,.8*nt,0,.9*nt,0)),lt.add(new go.PathSegment(go.PathSegment.Line,nt,.75*et)),lt.add(new go.PathSegment(go.PathSegment.Move,0,.25*et)),lt.add(new go.PathSegment(go.PathSegment.Line,0,.75*et)),lt.add(new go.PathSegment(go.PathSegment.Bezier,.3*nt,.75*et,.1*nt,.5*et,.2*nt,.5*et)),lt.add(new go.PathSegment(go.PathSegment.Bezier,.7*nt,.75*et,.425*nt,et,.575*nt,et)),lt.add(new go.PathSegment(go.PathSegment.Bezier,nt,.75*et,.8*nt,.5*et,.9*nt,.5*et)),ht}),go.Shape.defineFigureGenerator("Operator",function(kt,nt,et){var ht=new go.Geometry,lt=.3,gt=ee*.3,yt=.5,Lt=.7,Dt=new go.PathFigure((yt-lt)*nt,Lt*et,!0);ht.add(Dt),Dt.add(new go.PathSegment(go.PathSegment.Bezier,yt*nt,(Lt-lt)*et,(yt-lt)*nt,(Lt-gt)*et,(yt-gt)*nt,(Lt-lt)*et)),Dt.add(new go.PathSegment(go.PathSegment.Bezier,(yt+lt)*nt,Lt*et,(yt+gt)*nt,(Lt-lt)*et,(yt+lt)*nt,(Lt-gt)*et)),Dt.add(new go.PathSegment(go.PathSegment.Bezier,yt*nt,(Lt+lt)*et,(yt+lt)*nt,(Lt+gt)*et,(yt+gt)*nt,(Lt+lt)*et)),Dt.add(new go.PathSegment(go.PathSegment.Bezier,(yt-lt)*nt,Lt*et,(yt-gt)*nt,(Lt+lt)*et,(yt-lt)*nt,(Lt+gt)*et));var zt=new go.PathFigure(0,.7*et,!1);return ht.add(zt),zt.add(new go.PathSegment(go.PathSegment.Bezier,nt,.7*et,0,0,nt,0)),ht}),go.Shape.defineFigureGenerator("TripleFanBlades",function(kt,nt,et){var ht=new go.Geometry,lt=new go.PathFigure(.5*nt,0,!0);return ht.add(lt),lt.add(new go.PathSegment(go.PathSegment.Bezier,.5*nt,.65*et,.65*nt,.3*et,.65*nt,.5*et)),lt.add(new go.PathSegment(go.PathSegment.Bezier,.5*nt,0,.35*nt,.5*et,.35*nt,.3*et)),lt.add(new go.PathSegment(go.PathSegment.Move,.5*nt,.65*et)),lt.add(new go.PathSegment(go.PathSegment.Bezier,0,et,.3*nt,.6*et,.1*nt,.8*et)),lt.add(new go.PathSegment(go.PathSegment.Bezier,.5*nt,.65*et,.2*nt,et,.35*nt,.95*et)),lt.add(new go.PathSegment(go.PathSegment.Move,.5*nt,.65*et)),lt.add(new go.PathSegment(go.PathSegment.Bezier,nt,et,.7*nt,.6*et,.9*nt,.8*et)),lt.add(new go.PathSegment(go.PathSegment.Bezier,.5*nt,.65*et,.8*nt,et,.65*nt,.95*et)),ht}),go.Shape.defineFigureGenerator("CentrifugalPump",function(kt,nt,et){var ht=new go.Geometry,lt=new go.PathFigure(nt,0,!0);return ht.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,.4*nt,0)),lt.add(new go.PathSegment(go.PathSegment.Bezier,0,.5*et,0,.075*et,0,.5*et)),lt.add(new go.PathSegment(go.PathSegment.Bezier,.4*nt,et,0,et,.4*nt,et)),lt.add(new go.PathSegment(go.PathSegment.Bezier,.8*nt,.4*et,.8*nt,et,.85*nt,.6*et)),lt.add(new go.PathSegment(go.PathSegment.Line,nt,.4*et)),lt.add(new go.PathSegment(go.PathSegment.Line,nt,0)),ht}),go.Shape.defineFigureGenerator("Battery",function(kt,nt,et){var ht=new go.Geometry,lt=new go.PathFigure(0,et,!0);ht.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,0,.1*et)),lt.add(new go.PathSegment(go.PathSegment.Line,nt,.1*et)),lt.add(new go.PathSegment(go.PathSegment.Line,nt,et)),lt.add(new go.PathSegment(go.PathSegment.Line,0,et)),lt.add(new go.PathSegment(go.PathSegment.Move,.4*nt,.1*et)),lt.add(new go.PathSegment(go.PathSegment.Line,.4*nt,0)),lt.add(new go.PathSegment(go.PathSegment.Line,.6*nt,0)),lt.add(new go.PathSegment(go.PathSegment.Line,.6*nt,.1*et));var gt=new go.PathFigure(0,.6*et,!1);return ht.add(gt),gt.add(new go.PathSegment(go.PathSegment.Move,0,.4*et)),gt.add(new go.PathSegment(go.PathSegment.Line,nt,.4*et)),ht}),go.Shape.defineFigureGenerator("Delete",function(kt,nt,et){var ht=new go.Geometry,lt=.5,gt=ee*.5,yt=.5,Lt=.5,Dt=new go.PathFigure((yt-lt)*nt,Lt*et,!0);ht.add(Dt),Dt.add(new go.PathSegment(go.PathSegment.Bezier,yt*nt,(Lt-lt)*et,(yt-lt)*nt,(Lt-gt)*et,(yt-gt)*nt,(Lt-lt)*et)),Dt.add(new go.PathSegment(go.PathSegment.Bezier,(yt+lt)*nt,Lt*et,(yt+gt)*nt,(Lt-lt)*et,(yt+lt)*nt,(Lt-gt)*et)),Dt.add(new go.PathSegment(go.PathSegment.Bezier,yt*nt,(Lt+lt)*et,(yt+lt)*nt,(Lt+gt)*et,(yt+gt)*nt,(Lt+lt)*et)),Dt.add(new go.PathSegment(go.PathSegment.Bezier,(yt-lt)*nt,Lt*et,(yt-gt)*nt,(Lt+lt)*et,(yt-lt)*nt,(Lt+gt)*et));var zt=new go.PathFigure(.15*nt,.5*et,!1);return ht.add(zt),zt.add(new go.PathSegment(go.PathSegment.Line,.85*nt,.5*et)),ht}),go.Shape.defineFigureGenerator("Flag",function(kt,nt,et){var ht=new go.Geometry,lt=new go.PathFigure(0,.1*et,!0);return ht.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,0,et)),lt.add(new go.PathSegment(go.PathSegment.Move,0,.1*et)),lt.add(new go.PathSegment(go.PathSegment.Bezier,.5*nt,.1*et,.15*nt,0,.35*nt,0)),lt.add(new go.PathSegment(go.PathSegment.Bezier,nt,.1*et,.65*nt,.2*et,.85*nt,.2*et)),lt.add(new go.PathSegment(go.PathSegment.Line,nt,.5*et)),lt.add(new go.PathSegment(go.PathSegment.Bezier,.5*nt,.5*et,.85*nt,.6*et,.65*nt,.6*et)),lt.add(new go.PathSegment(go.PathSegment.Bezier,0,.5*et,.35*nt,.4*et,.15*nt,.4*et).close()),ht}),go.Shape.defineFigureGenerator("Help",function(kt,nt,et){var ht=new go.Geometry,lt=.5,gt=ee*.5,yt=.5,Lt=.5,Dt=new go.PathFigure((yt-lt)*nt,Lt*et,!1);ht.add(Dt),Dt.add(new go.PathSegment(go.PathSegment.Bezier,yt*nt,(Lt-lt)*et,(yt-lt)*nt,(Lt-gt)*et,(yt-gt)*nt,(Lt-lt)*et)),Dt.add(new go.PathSegment(go.PathSegment.Bezier,(yt+lt)*nt,Lt*et,(yt+gt)*nt,(Lt-lt)*et,(yt+lt)*nt,(Lt-gt)*et)),Dt.add(new go.PathSegment(go.PathSegment.Bezier,yt*nt,(Lt+lt)*et,(yt+lt)*nt,(Lt+gt)*et,(yt+gt)*nt,(Lt+lt)*et)),Dt.add(new go.PathSegment(go.PathSegment.Bezier,(yt-lt)*nt,Lt*et,(yt-gt)*nt,(Lt+lt)*et,(yt-lt)*nt,(Lt+gt)*et).close()),lt=.05,gt=ee*.05,yt=.5,Lt=.8;var zt=new go.PathFigure((yt-lt)*nt,Lt*et,!1);return ht.add(zt),zt.add(new go.PathSegment(go.PathSegment.Bezier,yt*nt,(Lt-lt)*et,(yt-lt)*nt,(Lt-gt)*et,(yt-gt)*nt,(Lt-lt)*et)),zt.add(new go.PathSegment(go.PathSegment.Bezier,(yt+lt)*nt,Lt*et,(yt+gt)*nt,(Lt-lt)*et,(yt+lt)*nt,(Lt-gt)*et)),zt.add(new go.PathSegment(go.PathSegment.Bezier,yt*nt,(Lt+lt)*et,(yt+lt)*nt,(Lt+gt)*et,(yt+gt)*nt,(Lt+lt)*et)),zt.add(new go.PathSegment(go.PathSegment.Bezier,(yt-lt)*nt,Lt*et,(yt-gt)*nt,(Lt+lt)*et,(yt-lt)*nt,(Lt+gt)*et).close()),zt.add(new go.PathSegment(go.PathSegment.Move,.5*nt,.7*et)),zt.add(new go.PathSegment(go.PathSegment.Line,.5*nt,.5*et)),zt.add(new go.PathSegment(go.PathSegment.Bezier,.5*nt,.2*et,.75*nt,.475*et,.75*nt,.225*et)),zt.add(new go.PathSegment(go.PathSegment.Bezier,.3*nt,.35*et,.4*nt,.2*et,.3*nt,.25*et)),ht}),go.Shape.defineFigureGenerator("Location",function(kt,nt,et){return new go.Geometry().add(new go.PathFigure(.5*nt,et,!0).add(new go.PathSegment(go.PathSegment.Line,.75*nt,.5*et)).add(new go.PathSegment(go.PathSegment.Bezier,.5*nt,0,.975*nt,.025*et,.5*nt,0)).add(new go.PathSegment(go.PathSegment.Bezier,.25*nt,.5*et,.5*nt,0,.025*nt,.025*et).close()).add(new go.PathSegment(go.PathSegment.Move,.5*nt,.2*et)).add(new go.PathSegment(go.PathSegment.Arc,270,360,.5*nt,.3*et,.1*nt,.1*et).close()))}),go.Shape.defineFigureGenerator("Lock",function(kt,nt,et){var ht=new go.Geometry,lt=new go.PathFigure(0,.5*et,!0);ht.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,0,et)),lt.add(new go.PathSegment(go.PathSegment.Line,nt,et)),lt.add(new go.PathSegment(go.PathSegment.Line,nt,.5*et)),lt.add(new go.PathSegment(go.PathSegment.Line,0,.5*et));var gt=new go.PathFigure(.2*nt,.5*et,!1);return ht.add(gt),gt.add(new go.PathSegment(go.PathSegment.Move,.2*nt,.5*et)),gt.add(new go.PathSegment(go.PathSegment.Line,.2*nt,.3*et)),gt.add(new go.PathSegment(go.PathSegment.Bezier,.8*nt,.3*et,.25*nt,0,.75*nt,0)),gt.add(new go.PathSegment(go.PathSegment.Line,.8*nt,.5*et)),gt.add(new go.PathSegment(go.PathSegment.Line,.8*nt,.3*et)),ht}),go.Shape.defineFigureGenerator("Unlocked",function(kt,nt,et){var ht=new go.Geometry,lt=new go.PathFigure(0,.5*et,!0);ht.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,0,et)),lt.add(new go.PathSegment(go.PathSegment.Line,nt,et)),lt.add(new go.PathSegment(go.PathSegment.Line,nt,.5*et)),lt.add(new go.PathSegment(go.PathSegment.Line,0,.5*et));var gt=new go.PathFigure(.2*nt,.5*et,!1);return ht.add(gt),gt.add(new go.PathSegment(go.PathSegment.Move,.2*nt,.5*et)),gt.add(new go.PathSegment(go.PathSegment.Line,.2*nt,.3*et)),gt.add(new go.PathSegment(go.PathSegment.Bezier,.8*nt,.3*et,.25*nt,0,.75*nt,0)),gt.add(new go.PathSegment(go.PathSegment.Line,.8*nt,.35*et)),ht}),go.Shape.defineFigureGenerator("Gear",function(kt,nt,et){return new go.Geometry().add(new go.PathFigure(.9375*nt,.56246875*et,!0).add(new go.PathSegment(go.PathSegment.Line,.9375*nt,.4375*et)).add(new go.PathSegment(go.PathSegment.Line,.80621875*nt,.4375*et)).add(new go.PathSegment(go.PathSegment.Bezier,.763*nt,.3316875*et,.79840625*nt,.39915625*et,.7834375*nt,.3635*et)).add(new go.PathSegment(go.PathSegment.Line,.8566875*nt,.23796875*et)).add(new go.PathSegment(go.PathSegment.Line,.76825*nt,.14959375*et)).add(new go.PathSegment(go.PathSegment.Line,.67596875*nt,.24184375*et)).add(new go.PathSegment(go.PathSegment.Bezier,.5625*nt,.19378125*et,.64228125*nt,.2188125*et,.603875*nt,.2021875*et)).add(new go.PathSegment(go.PathSegment.Line,.5625*nt,.0625*et)).add(new go.PathSegment(go.PathSegment.Line,.4375*nt,.0625*et)).add(new go.PathSegment(go.PathSegment.Line,.4375*nt,.19378125*et)).add(new go.PathSegment(go.PathSegment.Bezier,.32775*nt,.239375*et,.39759375*nt,.20190625*et,.36053125*nt,.2176875*et)).add(new go.PathSegment(go.PathSegment.Line,.2379375*nt,.14959375*et)).add(new go.PathSegment(go.PathSegment.Line,.14953125*nt,.2379375*et)).add(new go.PathSegment(go.PathSegment.Line,.23934375*nt,.3278125*et)).add(new go.PathSegment(go.PathSegment.Bezier,.19378125*nt,.4375*et,.21765625*nt,.36059375*et,.201875*nt,.397625*et)).add(new go.PathSegment(go.PathSegment.Line,.0625*nt,.4375*et)).add(new go.PathSegment(go.PathSegment.Line,.0625*nt,.5625*et)).add(new go.PathSegment(go.PathSegment.Line,.1938125*nt,.5625*et)).add(new go.PathSegment(go.PathSegment.Bezier,.241875*nt,.67596875*et,.20221875*nt,.603875*et,.21884375*nt,.64228125*et)).add(new go.PathSegment(go.PathSegment.Line,.1495625*nt,.76825*et)).add(new go.PathSegment(go.PathSegment.Line,.238*nt,.8566875*et)).add(new go.PathSegment(go.PathSegment.Line,.3316875*nt,.76296875*et)).add(new go.PathSegment(go.PathSegment.Bezier,.43753125*nt,.80621875*et,.36353125*nt,.78340625*et,.3991875*nt,.79840625*et)).add(new go.PathSegment(go.PathSegment.Line,.43753125*nt,.9375*et)).add(new go.PathSegment(go.PathSegment.Line,.5625*nt,.9375*et)).add(new go.PathSegment(go.PathSegment.Line,.5625*nt,.80621875*et)).add(new go.PathSegment(go.PathSegment.Bezier,.67225*nt,.760625*et,.602375*nt,.79809375*et,.63946875*nt,.78234375*et)).add(new go.PathSegment(go.PathSegment.Line,.76828125*nt,.8566875*et)).add(new go.PathSegment(go.PathSegment.Line,.85671875*nt,.76825*et)).add(new go.PathSegment(go.PathSegment.Line,.76065625*nt,.67221875*et)).add(new go.PathSegment(go.PathSegment.Bezier,.80621875*nt,.56246875*et,.78234375*nt,.63940625*et,.798125*nt,.602375*et)).add(new go.PathSegment(go.PathSegment.Line,.9375*nt,.56246875*et).close()).add(new go.PathSegment(go.PathSegment.Move,.5*nt,.6*et)).add(new go.PathSegment(go.PathSegment.Arc,90,360,.5*nt,.5*et,.1*nt,.1*et).close()))}),go.Shape.defineFigureGenerator("Hand",function(kt,nt,et){var ht=new go.Geometry,lt=new go.PathFigure(0,.5*et,!0);return ht.add(lt),lt.add(new go.PathSegment(go.PathSegment.Bezier,.1*nt,.3*et,0,.375*et,.05*nt,.325*et)),lt.add(new go.PathSegment(go.PathSegment.Bezier,.45*nt,.075*et,.3*nt,.225*et,.4*nt,.175*et)),lt.add(new go.PathSegment(go.PathSegment.Bezier,.525*nt,.075*et,.46*nt,.05*et,.525*nt,.05*et)),lt.add(new go.PathSegment(go.PathSegment.Bezier,.3*nt,.4*et,.525*nt,.275*et,.475*nt,.325*et)),lt.add(new go.PathSegment(go.PathSegment.Line,.9*nt,.4*et)),lt.add(new go.PathSegment(go.PathSegment.Bezier,.9*nt,.55*et,nt,.4*et,nt,.55*et)),lt.add(new go.PathSegment(go.PathSegment.Line,.425*nt,.55*et)),lt.add(new go.PathSegment(go.PathSegment.Line,.6*nt,.55*et)),lt.add(new go.PathSegment(go.PathSegment.Bezier,.6*nt,.7*et,.675*nt,.55*et,.675*nt,.7*et)),lt.add(new go.PathSegment(go.PathSegment.Line,.4*nt,.7*et)),lt.add(new go.PathSegment(go.PathSegment.Line,.575*nt,.7*et)),lt.add(new go.PathSegment(go.PathSegment.Bezier,.575*nt,.85*et,.65*nt,.7*et,.65*nt,.85*et)),lt.add(new go.PathSegment(go.PathSegment.Line,.4*nt,.85*et)),lt.add(new go.PathSegment(go.PathSegment.Line,.525*nt,.85*et)),lt.add(new go.PathSegment(go.PathSegment.Bezier,.535*nt,et,.61*nt,.85*et,.61*nt,et)),lt.add(new go.PathSegment(go.PathSegment.Bezier,0,.9*et,.435*nt,et,0,et).close()),ht}),go.Shape.defineFigureGenerator("Map",function(kt,nt,et){var ht=new go.Geometry,lt=new go.PathFigure(0,.2*et,!0);return ht.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,.25*nt,0)),lt.add(new go.PathSegment(go.PathSegment.Line,.5*nt,.2*et)),lt.add(new go.PathSegment(go.PathSegment.Line,.75*nt,0)),lt.add(new go.PathSegment(go.PathSegment.Line,nt,.2*et)),lt.add(new go.PathSegment(go.PathSegment.Line,nt,et)),lt.add(new go.PathSegment(go.PathSegment.Line,.75*nt,.8*et)),lt.add(new go.PathSegment(go.PathSegment.Line,.5*nt,et)),lt.add(new go.PathSegment(go.PathSegment.Line,.25*nt,.8*et)),lt.add(new go.PathSegment(go.PathSegment.Line,0,et).close()),lt.add(new go.PathSegment(go.PathSegment.Move,.25*nt,0)),lt.add(new go.PathSegment(go.PathSegment.Line,.25*nt,.8*et)),lt.add(new go.PathSegment(go.PathSegment.Move,.5*nt,.2*et)),lt.add(new go.PathSegment(go.PathSegment.Line,.5*nt,et)),lt.add(new go.PathSegment(go.PathSegment.Move,.75*nt,0)),lt.add(new go.PathSegment(go.PathSegment.Line,.75*nt,.8*et)),ht}),go.Shape.defineFigureGenerator("Eject",function(kt,nt,et){var ht=new go.Geometry,lt=new go.PathFigure(0,et,!0);ht.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,nt,et)),lt.add(new go.PathSegment(go.PathSegment.Line,nt,et*.7)),lt.add(new go.PathSegment(go.PathSegment.Line,0,et*.7).close());var gt=new go.PathFigure(0,et*.6,!0);return ht.add(gt),gt.add(new go.PathSegment(go.PathSegment.Line,nt,.6*et)),gt.add(new go.PathSegment(go.PathSegment.Line,.5*nt,0).close()),ht}),go.Shape.defineFigureGenerator("Pencil",function(kt,nt,et){return new go.Geometry().add(new go.PathFigure(0,0,!0).add(new go.PathSegment(go.PathSegment.Line,.2*nt,.1*et)).add(new go.PathSegment(go.PathSegment.Line,nt,.9*et)).add(new go.PathSegment(go.PathSegment.Line,.9*nt,et)).add(new go.PathSegment(go.PathSegment.Line,.1*nt,.2*et).close()))}),go.Shape.defineFigureGenerator("Building",function(kt,nt,et){var ht=new go.Geometry,lt=new go.PathFigure(nt*1,et*1,!1);ht.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,0,et*1)),lt.add(new go.PathSegment(go.PathSegment.Line,0,et*.85)),lt.add(new go.PathSegment(go.PathSegment.Line,.046*nt,et*.85)),lt.add(new go.PathSegment(go.PathSegment.Line,.046*nt,et*.45)),lt.add(new go.PathSegment(go.PathSegment.Line,0,et*.45)),lt.add(new go.PathSegment(go.PathSegment.Line,0,et*.3)),lt.add(new go.PathSegment(go.PathSegment.Line,.046*nt,et*.3)),lt.add(new go.PathSegment(go.PathSegment.Line,.5*nt,et*0)),lt.add(new go.PathSegment(go.PathSegment.Line,(1-.046)*nt,et*.3)),lt.add(new go.PathSegment(go.PathSegment.Line,nt,et*.3)),lt.add(new go.PathSegment(go.PathSegment.Line,nt,et*.45)),lt.add(new go.PathSegment(go.PathSegment.Line,(1-.046)*nt,et*.45)),lt.add(new go.PathSegment(go.PathSegment.Line,(1-.046)*nt,et*.85)),lt.add(new go.PathSegment(go.PathSegment.Line,nt,et*.85).close());var gt=new go.PathFigure(.126*nt,.85*et,!1);ht.add(gt),gt.add(new go.PathSegment(go.PathSegment.Line,.126*nt,.45*et)),gt.add(new go.PathSegment(go.PathSegment.Line,.322*nt,.45*et)),gt.add(new go.PathSegment(go.PathSegment.Line,.322*nt,.85*et).close());var yt=new go.PathFigure(.402*nt,.85*et,!1);ht.add(yt),yt.add(new go.PathSegment(go.PathSegment.Line,.402*nt,.45*et)),yt.add(new go.PathSegment(go.PathSegment.Line,.598*nt,.45*et)),yt.add(new go.PathSegment(go.PathSegment.Line,.598*nt,.85*et).close());var Lt=new go.PathFigure(.678*nt,.85*et,!1);ht.add(Lt),Lt.add(new go.PathSegment(go.PathSegment.Line,.678*nt,.45*et)),Lt.add(new go.PathSegment(go.PathSegment.Line,.874*nt,.45*et)),Lt.add(new go.PathSegment(go.PathSegment.Line,.874*nt,.85*et).close());var Dt=new go.PathFigure(.5*nt,.1*et,!1);return ht.add(Dt),Dt.add(new go.PathSegment(go.PathSegment.Line,(.046+.15)*nt,.3*et)),Dt.add(new go.PathSegment(go.PathSegment.Line,(1-(.046+.15))*nt,.3*et).close()),ht}),go.Shape.defineFigureGenerator("Staircase",function(kt,nt,et){var ht=new go.Geometry,lt=new go.PathFigure(0,et*1,!0);return ht.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,nt*.2,et*1)),lt.add(new go.PathSegment(go.PathSegment.Line,nt*.2,et*.8)),lt.add(new go.PathSegment(go.PathSegment.Line,nt*.4,et*.8)),lt.add(new go.PathSegment(go.PathSegment.Line,nt*.4,et*.6)),lt.add(new go.PathSegment(go.PathSegment.Line,nt*.6,et*.6)),lt.add(new go.PathSegment(go.PathSegment.Line,nt*.6,et*.4)),lt.add(new go.PathSegment(go.PathSegment.Line,nt*.8,et*.4)),lt.add(new go.PathSegment(go.PathSegment.Line,nt*.8,et*.2)),lt.add(new go.PathSegment(go.PathSegment.Line,nt*1,et*.2)),lt.add(new go.PathSegment(go.PathSegment.Line,nt*1,et*.15)),lt.add(new go.PathSegment(go.PathSegment.Line,nt*.75,et*.15)),lt.add(new go.PathSegment(go.PathSegment.Line,nt*.75,et*.35)),lt.add(new go.PathSegment(go.PathSegment.Line,nt*.55,et*.35)),lt.add(new go.PathSegment(go.PathSegment.Line,nt*.55,et*.55)),lt.add(new go.PathSegment(go.PathSegment.Line,nt*.35,et*.55)),lt.add(new go.PathSegment(go.PathSegment.Line,nt*.35,et*.75)),lt.add(new go.PathSegment(go.PathSegment.Line,nt*.15,et*.75)),lt.add(new go.PathSegment(go.PathSegment.Line,nt*.15,et*.95)),lt.add(new go.PathSegment(go.PathSegment.Line,0,et*.95).close()),ht}),go.Shape.defineFigureGenerator("5Bars",function(kt,nt,et){var ht=new go.Geometry,lt=new go.PathFigure(0,et*1,!0);ht.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,nt*.184,et*1)),lt.add(new go.PathSegment(go.PathSegment.Line,nt*.184,et*(1-.184)).close());var gt=new go.PathFigure(nt*.204,et,!0);ht.add(gt),gt.add(new go.PathSegment(go.PathSegment.Line,nt*.204,et*(1-.184))),gt.add(new go.PathSegment(go.PathSegment.Line,nt*.388,et*(1-.184*2))),gt.add(new go.PathSegment(go.PathSegment.Line,nt*.388,et*1).close());var yt=new go.PathFigure(nt*.408,et,!0);ht.add(yt),yt.add(new go.PathSegment(go.PathSegment.Line,nt*.408,et*(1-.184*2))),yt.add(new go.PathSegment(go.PathSegment.Line,nt*.592,et*(1-.184*3))),yt.add(new go.PathSegment(go.PathSegment.Line,nt*.592,et*1).close());var Lt=new go.PathFigure(nt*.612,et,!0);ht.add(Lt),Lt.add(new go.PathSegment(go.PathSegment.Line,nt*.612,et*(1-.184*3))),Lt.add(new go.PathSegment(go.PathSegment.Line,nt*.796,et*(1-.184*4))),Lt.add(new go.PathSegment(go.PathSegment.Line,nt*.796,et*1).close());var Dt=new go.PathFigure(nt*.816,et,!0);return ht.add(Dt),Dt.add(new go.PathSegment(go.PathSegment.Line,nt*.816,et*(1-.184*4))),Dt.add(new go.PathSegment(go.PathSegment.Line,nt*1,et*(1-.184*5))),Dt.add(new go.PathSegment(go.PathSegment.Line,nt*1,et*1).close()),ht}),go.Shape.defineFigureGenerator("PC",function(kt,nt,et){var ht=new go.Geometry,lt=new go.PathFigure(0,0,!0);ht.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,0,et*1)),lt.add(new go.PathSegment(go.PathSegment.Line,nt*.3,et*1)),lt.add(new go.PathSegment(go.PathSegment.Line,nt*.3,0).close());var gt=new go.PathFigure(nt*.055,.07*et,!0);ht.add(gt),gt.add(new go.PathSegment(go.PathSegment.Line,nt*.245,et*.07)),gt.add(new go.PathSegment(go.PathSegment.Line,nt*.245,et*.1)),gt.add(new go.PathSegment(go.PathSegment.Line,nt*.055,et*.1).close());var yt=new go.PathFigure(nt*.055,.13*et,!0);ht.add(yt),yt.add(new go.PathSegment(go.PathSegment.Line,nt*.245,et*.13)),yt.add(new go.PathSegment(go.PathSegment.Line,nt*.245,et*.16)),yt.add(new go.PathSegment(go.PathSegment.Line,nt*.055,et*.16).close());var Lt=new go.PathFigure(nt*.055,.18*et,!0);ht.add(Lt),Lt.add(new go.PathSegment(go.PathSegment.Line,nt*.245,et*.18)),Lt.add(new go.PathSegment(go.PathSegment.Line,nt*.245,et*.21)),Lt.add(new go.PathSegment(go.PathSegment.Line,nt*.055,et*.21).close());var Dt=new go.PathFigure(nt*1,0,!0);return ht.add(Dt),Dt.add(new go.PathSegment(go.PathSegment.Line,nt*.4,0)),Dt.add(new go.PathSegment(go.PathSegment.Line,nt*.4,et*.65)),Dt.add(new go.PathSegment(go.PathSegment.Line,nt*1,et*.65).close()),ht}),go.Shape.defineFigureGenerator("Plane",function(kt,nt,et){var ht=new go.Geometry,lt=new go.PathFigure(.55*nt,et,!0);return ht.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,.5*nt,.6*et)),lt.add(new go.PathSegment(go.PathSegment.Line,.4*nt,.7*et)),lt.add(new go.PathSegment(go.PathSegment.Line,.1*nt,.475*et)),lt.add(new go.PathSegment(go.PathSegment.Bezier,.35*nt,.525*et,0,.4*et,.225*nt,.45*et)),lt.add(new go.PathSegment(go.PathSegment.Line,.4*nt,.475*et)),lt.add(new go.PathSegment(go.PathSegment.Line,.15*nt,.35*et)),lt.add(new go.PathSegment(go.PathSegment.Line,.2*nt,.325*et)),lt.add(new go.PathSegment(go.PathSegment.Line,.6*nt,.325*et)),lt.add(new go.PathSegment(go.PathSegment.Line,.85*nt,.1*et)),lt.add(new go.PathSegment(go.PathSegment.Bezier,.9*nt,.2*et,.975*nt,0,nt,.08*et)),lt.add(new go.PathSegment(go.PathSegment.Line,.7*nt,.45*et)),lt.add(new go.PathSegment(go.PathSegment.Line,.6*nt,.95*et)),lt.add(new go.PathSegment(go.PathSegment.Line,.55*nt,et).close()),ht}),go.Shape.defineFigureGenerator("Key",function(kt,nt,et){var ht=new go.Geometry,lt=new go.PathFigure(nt*1,et*.5,!0);return ht.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,nt*.9,.4*et)),lt.add(new go.PathSegment(go.PathSegment.Line,nt*.5,.4*et)),lt.add(new go.PathSegment(go.PathSegment.Line,nt*.5,.35*et)),lt.add(new go.PathSegment(go.PathSegment.Line,nt*.45,.35*et)),lt.add(new go.PathSegment(go.PathSegment.Line,nt*.3,.2*et)),lt.add(new go.PathSegment(go.PathSegment.Line,nt*.15,.2*et)),lt.add(new go.PathSegment(go.PathSegment.Line,0,.35*et)),lt.add(new go.PathSegment(go.PathSegment.Line,0,.65*et)),lt.add(new go.PathSegment(go.PathSegment.Line,nt*.15,.8*et)),lt.add(new go.PathSegment(go.PathSegment.Line,nt*.3,.8*et)),lt.add(new go.PathSegment(go.PathSegment.Line,nt*.45,.65*et)),lt.add(new go.PathSegment(go.PathSegment.Line,nt*.5,.65*et)),lt.add(new go.PathSegment(go.PathSegment.Line,nt*.5,.6*et)),lt.add(new go.PathSegment(go.PathSegment.Line,nt*.6,.6*et)),lt.add(new go.PathSegment(go.PathSegment.Line,nt*.65,.55*et)),lt.add(new go.PathSegment(go.PathSegment.Line,nt*.7,.6*et)),lt.add(new go.PathSegment(go.PathSegment.Line,nt*.75,.55*et)),lt.add(new go.PathSegment(go.PathSegment.Line,nt*.8,.6*et)),lt.add(new go.PathSegment(go.PathSegment.Line,nt*.85,.575*et)),lt.add(new go.PathSegment(go.PathSegment.Line,nt*.9,.6*et).close()),lt.add(new go.PathSegment(go.PathSegment.Move,.17*nt,.425*et)),lt.add(new go.PathSegment(go.PathSegment.Arc,270,360,.17*nt,.5*et,.075*nt,.075*et).close()),ht}),go.Shape.defineFigureGenerator("FilmTape",function(kt,nt,et){var ht=new go.Geometry,lt=new go.PathFigure(0,0,!1);ht.add(lt),lt.add(new go.PathSegment(go.PathSegment.Arc,270,180,nt*0,nt*.3,nt*.055)),lt.add(new go.PathSegment(go.PathSegment.Line,0,et*1)),lt.add(new go.PathSegment(go.PathSegment.Line,nt*.08,et*1)),lt.add(new go.PathSegment(go.PathSegment.Line,nt*.08,et*.95)),lt.add(new go.PathSegment(go.PathSegment.Line,nt*(.08+.056*1),et*.95)),lt.add(new go.PathSegment(go.PathSegment.Line,nt*(.08+.056*1),et*1)),lt.add(new go.PathSegment(go.PathSegment.Line,nt*(.08+.056*2),et*1)),lt.add(new go.PathSegment(go.PathSegment.Line,nt*(.08+.056*2),et*.95)),lt.add(new go.PathSegment(go.PathSegment.Line,nt*(.08+.056*3),et*.95)),lt.add(new go.PathSegment(go.PathSegment.Line,nt*(.08+.056*3),et*1)),lt.add(new go.PathSegment(go.PathSegment.Line,nt*(.08+.056*4),et*1)),lt.add(new go.PathSegment(go.PathSegment.Line,nt*(.08+.056*4),et*.95)),lt.add(new go.PathSegment(go.PathSegment.Line,nt*(.08+.056*5),et*.95)),lt.add(new go.PathSegment(go.PathSegment.Line,nt*(.08+.056*5),et*1)),lt.add(new go.PathSegment(go.PathSegment.Line,nt*(.08+.056*6),et*1)),lt.add(new go.PathSegment(go.PathSegment.Line,nt*(.08+.056*6),et*.95)),lt.add(new go.PathSegment(go.PathSegment.Line,nt*(.08+.056*7),et*.95)),lt.add(new go.PathSegment(go.PathSegment.Line,nt*(.08+.056*7),et*1)),lt.add(new go.PathSegment(go.PathSegment.Line,nt*(.08+.056*8),et*1)),lt.add(new go.PathSegment(go.PathSegment.Line,nt*(.08+.056*8),et*.95)),lt.add(new go.PathSegment(go.PathSegment.Line,nt*(.08+.056*9),et*.95)),lt.add(new go.PathSegment(go.PathSegment.Line,nt*(.08+.056*9),et*1)),lt.add(new go.PathSegment(go.PathSegment.Line,nt*(.08+.056*10),et*1)),lt.add(new go.PathSegment(go.PathSegment.Line,nt*(.08+.056*10),et*.95)),lt.add(new go.PathSegment(go.PathSegment.Line,nt*(.08+.056*11),et*.95)),lt.add(new go.PathSegment(go.PathSegment.Line,nt*(.08+.056*11),et*1)),lt.add(new go.PathSegment(go.PathSegment.Line,nt*(.08+.056*12),et*1)),lt.add(new go.PathSegment(go.PathSegment.Line,nt*(.08+.056*12),et*.95)),lt.add(new go.PathSegment(go.PathSegment.Line,nt*(.08+.056*13),et*.95)),lt.add(new go.PathSegment(go.PathSegment.Line,nt*(.08+.056*13),et*1)),lt.add(new go.PathSegment(go.PathSegment.Line,nt*(.08+.056*14),et*1)),lt.add(new go.PathSegment(go.PathSegment.Line,nt*(.08+.056*14),et*.95)),lt.add(new go.PathSegment(go.PathSegment.Line,nt*(.08+.056*15),et*.95)),lt.add(new go.PathSegment(go.PathSegment.Line,nt*(.08+.056*15),et*1)),lt.add(new go.PathSegment(go.PathSegment.Line,nt*1,et*1)),lt.add(new go.PathSegment(go.PathSegment.Line,nt*1,et*1));var gt=new go.PathFigure(0,0,!1);ht.add(gt),gt.add(new go.PathSegment(go.PathSegment.Line,nt*1,et*0)),gt.add(new go.PathSegment(go.PathSegment.Arc,270,-180,nt*1,nt*.3,nt*.055)),gt.add(new go.PathSegment(go.PathSegment.Line,nt*1,et*1));var yt=new go.PathFigure(nt*.11,et*.1,!1);ht.add(yt),yt.add(new go.PathSegment(go.PathSegment.Line,nt*(.11+.24133333*1+.028*0),et*.1)),yt.add(new go.PathSegment(go.PathSegment.Line,nt*(.11+.24133333*1+.028*0),et*.8)),yt.add(new go.PathSegment(go.PathSegment.Line,nt*.11,et*.8).close());var Lt=new go.PathFigure(nt*(.11+.24133333*1+.028*1),et*.1,!1);ht.add(Lt),Lt.add(new go.PathSegment(go.PathSegment.Line,nt*(.11+.24133333*2+.028*1),et*.1)),Lt.add(new go.PathSegment(go.PathSegment.Line,nt*(.11+.24133333*2+.028*1),et*.8)),Lt.add(new go.PathSegment(go.PathSegment.Line,nt*(.11+.24133333*1+.028*1),et*.8).close());var Dt=new go.PathFigure(nt*(.11+.24133333*2+.028*2),et*.1,!1);return ht.add(Dt),Dt.add(new go.PathSegment(go.PathSegment.Line,nt*(.11+.24133333*3+.028*2),et*.1)),Dt.add(new go.PathSegment(go.PathSegment.Line,nt*(.11+.24133333*3+.028*2),et*.8)),Dt.add(new go.PathSegment(go.PathSegment.Line,nt*(.11+.24133333*2+.028*2),et*.8).close()),ht}),go.Shape.defineFigureGenerator("FloppyDisk",function(kt,nt,et){var ht=new go.Geometry,lt=8,gt=lt*ee,yt=new go.PathFigure(lt,0,!1);ht.add(yt),yt.add(new go.PathSegment(go.PathSegment.Line,nt*.86,0)),yt.add(new go.PathSegment(go.PathSegment.Line,nt*1,et*.14)),yt.add(new go.PathSegment(go.PathSegment.Line,nt,et-lt)),yt.add(new go.PathSegment(go.PathSegment.Bezier,nt-lt,et,nt,et-gt,nt-gt,et)),yt.add(new go.PathSegment(go.PathSegment.Line,lt,et)),yt.add(new go.PathSegment(go.PathSegment.Bezier,0,et-lt,gt,et,0,et-gt)),yt.add(new go.PathSegment(go.PathSegment.Line,0,lt)),yt.add(new go.PathSegment(go.PathSegment.Bezier,lt,0,0,gt,gt,0).close());var Lt=new go.PathFigure(nt*.83,0,!1);ht.add(Lt),Lt.add(new go.PathSegment(go.PathSegment.Line,nt*.83,et*.3)),Lt.add(new go.PathSegment(go.PathSegment.Line,nt*.17,et*.3)),Lt.add(new go.PathSegment(go.PathSegment.Line,nt*.17,et*0).close());var Dt=new go.PathFigure(nt*.83,et*1,!1);ht.add(Dt),Dt.add(new go.PathSegment(go.PathSegment.Line,nt*.83,et*.5)),Dt.add(new go.PathSegment(go.PathSegment.Line,nt*.17,et*.5)),Dt.add(new go.PathSegment(go.PathSegment.Line,nt*.17,et*1).close());var zt=new go.PathFigure(nt*.78,et*.05,!1);return ht.add(zt),zt.add(new go.PathSegment(go.PathSegment.Line,nt*.66,et*.05)),zt.add(new go.PathSegment(go.PathSegment.Line,nt*.66,et*.25)),zt.add(new go.PathSegment(go.PathSegment.Line,nt*.78,et*.25).close()),ht}),go.Shape.defineFigureGenerator("SpeechBubble",function(kt,nt,et){var ht=kt?kt.parameter1:NaN;(isNaN(ht)||ht<0)&&(ht=15),ht=Math.min(ht,nt/3),ht=Math.min(ht,et/3);var lt=ht*ee,gt=et*.8,yt=new go.Geometry,Lt=new go.PathFigure(ht,0,!0);return yt.add(Lt),Lt.add(new go.PathSegment(go.PathSegment.Line,nt-ht,0)),Lt.add(new go.PathSegment(go.PathSegment.Bezier,nt,ht,nt-lt,0,nt,lt)),Lt.add(new go.PathSegment(go.PathSegment.Line,nt,gt-ht)),Lt.add(new go.PathSegment(go.PathSegment.Bezier,nt-ht,gt,nt,gt-lt,nt-lt,gt)),Lt.add(new go.PathSegment(go.PathSegment.Line,nt*.7,gt)),Lt.add(new go.PathSegment(go.PathSegment.Line,nt*.7,et)),Lt.add(new go.PathSegment(go.PathSegment.Line,nt*.55,gt)),Lt.add(new go.PathSegment(go.PathSegment.Line,ht,gt)),Lt.add(new go.PathSegment(go.PathSegment.Bezier,0,gt-ht,lt,gt,0,gt-lt)),Lt.add(new go.PathSegment(go.PathSegment.Line,0,ht)),Lt.add(new go.PathSegment(go.PathSegment.Bezier,ht,0,0,lt,lt,0).close()),lt>1?(yt.spot1=new go.Spot(0,0,lt,lt),yt.spot2=new go.Spot(1,.8,-lt,-lt)):(yt.spot1=go.Spot.TopLeft,yt.spot2=new go.Spot(1,.8)),yt}),go.Shape.defineFigureGenerator("Repeat",function(kt,nt,et){var ht=new go.Geometry,lt=new go.PathFigure(nt*0,et*.45,!0);ht.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,nt*.25,et*0)),lt.add(new go.PathSegment(go.PathSegment.Line,nt*.5,et*.45)),lt.add(new go.PathSegment(go.PathSegment.Line,nt*.3,et*.45)),lt.add(new go.PathSegment(go.PathSegment.Line,nt*.3,et*.9)),lt.add(new go.PathSegment(go.PathSegment.Line,nt*.6,et*.9)),lt.add(new go.PathSegment(go.PathSegment.Line,nt*.65,et*1)),lt.add(new go.PathSegment(go.PathSegment.Line,nt*.2,et*1)),lt.add(new go.PathSegment(go.PathSegment.Line,nt*.2,et*.45).close());var gt=new go.PathFigure(nt*1,et*.55,!0);return ht.add(gt),gt.add(new go.PathSegment(go.PathSegment.Line,nt*.75,et*1)),gt.add(new go.PathSegment(go.PathSegment.Line,nt*.5,et*.55)),gt.add(new go.PathSegment(go.PathSegment.Line,nt*.7,et*.55)),gt.add(new go.PathSegment(go.PathSegment.Line,nt*.7,et*.1)),gt.add(new go.PathSegment(go.PathSegment.Line,nt*.4,et*.1)),gt.add(new go.PathSegment(go.PathSegment.Line,nt*.35,et*0)),gt.add(new go.PathSegment(go.PathSegment.Line,nt*.8,et*0)),gt.add(new go.PathSegment(go.PathSegment.Line,nt*.8,et*.55).close()),ht}),go.Shape.defineFigureGenerator("Windows",function(kt,nt,et){return new go.Geometry().add(new go.PathFigure(0,0,!0).add(new go.PathSegment(go.PathSegment.Line,nt,0)).add(new go.PathSegment(go.PathSegment.Line,nt,et)).add(new go.PathSegment(go.PathSegment.Line,0,et).close()).add(new go.PathSegment(go.PathSegment.Move,.4*nt,.4*et)).add(new go.PathSegment(go.PathSegment.Line,.4*nt,.8*et)).add(new go.PathSegment(go.PathSegment.Line,.9*nt,.8*et)).add(new go.PathSegment(go.PathSegment.Line,.9*nt,.4*et).close()).add(new go.PathSegment(go.PathSegment.Move,.2*nt,.1*et)).add(new go.PathSegment(go.PathSegment.Line,.2*nt,.6*et)).add(new go.PathSegment(go.PathSegment.Line,.7*nt,.6*et)).add(new go.PathSegment(go.PathSegment.Line,.7*nt,.1*et).close()).add(new go.PathSegment(go.PathSegment.Move,.1*nt,.6*et)).add(new go.PathSegment(go.PathSegment.Line,.1*nt,.9*et)).add(new go.PathSegment(go.PathSegment.Line,.5*nt,.9*et)).add(new go.PathSegment(go.PathSegment.Line,.5*nt,.6*et).close()))}),go.Shape.defineFigureGenerator("Terminal",function(kt,nt,et){var ht=new go.Geometry,lt=new go.PathFigure(nt*0,et*.1,!1);ht.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,nt*1,et*.1)),lt.add(new go.PathSegment(go.PathSegment.Line,nt*1,et*.9)),lt.add(new go.PathSegment(go.PathSegment.Line,nt*0,et*.9).close());var gt=new go.PathFigure(nt*.1,et*.2,!0);ht.add(gt),gt.add(new go.PathSegment(go.PathSegment.Line,nt*.1,et*.25)),gt.add(new go.PathSegment(go.PathSegment.Line,nt*.22,et*.285)),gt.add(new go.PathSegment(go.PathSegment.Line,nt*.1,et*.32)),gt.add(new go.PathSegment(go.PathSegment.Line,nt*.1,et*.37)),gt.add(new go.PathSegment(go.PathSegment.Line,nt*.275,et*.32)),gt.add(new go.PathSegment(go.PathSegment.Line,nt*.275,et*.25).close());var yt=new go.PathFigure(nt*.28,et*.37,!0);return ht.add(yt),yt.add(new go.PathSegment(go.PathSegment.Line,nt*.45,et*.37)),yt.add(new go.PathSegment(go.PathSegment.Line,nt*.45,et*.41)),yt.add(new go.PathSegment(go.PathSegment.Line,nt*.28,et*.41).close()),ht}),go.Shape.defineFigureGenerator("Beaker",function(kt,nt,et){var ht=new go.Geometry,lt=15,gt=lt*ee,yt=new go.PathFigure(nt*.62,et*.475,!0);return ht.add(yt),yt.add(new go.PathSegment(go.PathSegment.Line,nt,et-lt)),yt.add(new go.PathSegment(go.PathSegment.Bezier,nt-lt,et,nt,et-gt,nt-gt,et)),yt.add(new go.PathSegment(go.PathSegment.Line,lt,et)),yt.add(new go.PathSegment(go.PathSegment.Bezier,0,et-lt,gt,et,0,et-gt)),yt.add(new go.PathSegment(go.PathSegment.Line,nt*.38,et*.475)),yt.add(new go.PathSegment(go.PathSegment.Line,nt*.38,et*.03)),yt.add(new go.PathSegment(go.PathSegment.Line,nt*.36,et*0)),yt.add(new go.PathSegment(go.PathSegment.Line,nt*.64,et*0)),yt.add(new go.PathSegment(go.PathSegment.Line,nt*.62,et*.03).close()),gt>1?(ht.spot1=new go.Spot(0,0,gt,gt),ht.spot2=new go.Spot(1,1,-gt,-gt)):(ht.spot1=go.Spot.TopLeft,ht.spot2=go.Spot.BottomRight),ht}),go.Shape.defineFigureGenerator("Download",function(kt,nt,et){var ht=new go.Geometry,lt=new go.PathFigure(nt*0,et*1,!0);ht.add(lt);var gt=.1/.3;lt.add(new go.PathSegment(go.PathSegment.Line,nt*1,et*1)),lt.add(new go.PathSegment(go.PathSegment.Line,nt*1,et*(1-gt))),lt.add(new go.PathSegment(go.PathSegment.Line,nt*.8,et*0)),lt.add(new go.PathSegment(go.PathSegment.Line,nt*.66,et*0)),lt.add(new go.PathSegment(go.PathSegment.Line,nt*.66,et*.055)),lt.add(new go.PathSegment(go.PathSegment.Line,nt*.755,et*.055)),lt.add(new go.PathSegment(go.PathSegment.Line,nt*.93,et*(1-gt))),lt.add(new go.PathSegment(go.PathSegment.Line,nt*.64,et*(1-gt))),lt.add(new go.PathSegment(go.PathSegment.Line,nt*.61,et*.75)),lt.add(new go.PathSegment(go.PathSegment.Line,nt*.5,et*.75)),lt.add(new go.PathSegment(go.PathSegment.Line,nt*.39,et*.75)),lt.add(new go.PathSegment(go.PathSegment.Line,nt*.36,et*(1-gt))),lt.add(new go.PathSegment(go.PathSegment.Line,nt*.07,et*(1-gt))),lt.add(new go.PathSegment(go.PathSegment.Line,nt*(1-.755),et*.055)),lt.add(new go.PathSegment(go.PathSegment.Line,nt*(1-.66),et*.055)),lt.add(new go.PathSegment(go.PathSegment.Line,nt*(1-.66),et*0)),lt.add(new go.PathSegment(go.PathSegment.Line,nt*(1-.8),et*0)),lt.add(new go.PathSegment(go.PathSegment.Line,nt*0,et*(1-gt)).close());var yt=new go.PathFigure(nt*.4,et*0,!0);return ht.add(yt),yt.add(new go.PathSegment(go.PathSegment.Line,nt*.4,et*.44)),yt.add(new go.PathSegment(go.PathSegment.Line,nt*.26,et*.44)),yt.add(new go.PathSegment(go.PathSegment.Line,nt*.5,et*.66)),yt.add(new go.PathSegment(go.PathSegment.Line,nt*(1-.26),et*.44)),yt.add(new go.PathSegment(go.PathSegment.Line,nt*.6,et*.44)),yt.add(new go.PathSegment(go.PathSegment.Line,nt*.6,et*0).close()),ht}),go.Shape.defineFigureGenerator("Bin",function(kt,nt,et){var ht=new go.Geometry,lt=new go.PathFigure(nt*0,et*1,!0);ht.add(lt);var gt=.1/.3;return lt.add(new go.PathSegment(go.PathSegment.Line,nt*1,et*1)),lt.add(new go.PathSegment(go.PathSegment.Line,nt*1,et*(1-gt))),lt.add(new go.PathSegment(go.PathSegment.Line,nt*.8,et*0)),lt.add(new go.PathSegment(go.PathSegment.Line,nt*.66,et*0)),lt.add(new go.PathSegment(go.PathSegment.Line,nt*.66,et*.055)),lt.add(new go.PathSegment(go.PathSegment.Line,nt*.755,et*.055)),lt.add(new go.PathSegment(go.PathSegment.Line,nt*.93,et*(1-gt))),lt.add(new go.PathSegment(go.PathSegment.Line,nt*.64,et*(1-gt))),lt.add(new go.PathSegment(go.PathSegment.Line,nt*.61,et*.75)),lt.add(new go.PathSegment(go.PathSegment.Line,nt*.5,et*.75)),lt.add(new go.PathSegment(go.PathSegment.Line,nt*.39,et*.75)),lt.add(new go.PathSegment(go.PathSegment.Line,nt*.36,et*(1-gt))),lt.add(new go.PathSegment(go.PathSegment.Line,nt*.07,et*(1-gt))),lt.add(new go.PathSegment(go.PathSegment.Line,nt*(1-.755),et*.055)),lt.add(new go.PathSegment(go.PathSegment.Line,nt*(1-.66),et*.055)),lt.add(new go.PathSegment(go.PathSegment.Line,nt*(1-.66),et*0)),lt.add(new go.PathSegment(go.PathSegment.Line,nt*(1-.8),et*0)),lt.add(new go.PathSegment(go.PathSegment.Line,nt*0,et*(1-gt)).close()),ht}),go.Shape.defineFigureGenerator("Upload",function(kt,nt,et){var ht=new go.Geometry,lt=new go.PathFigure(nt*0,et*1,!0);ht.add(lt);var gt=.1/.3;lt.add(new go.PathSegment(go.PathSegment.Line,nt*1,et*1)),lt.add(new go.PathSegment(go.PathSegment.Line,nt*1,et*(1-gt))),lt.add(new go.PathSegment(go.PathSegment.Line,nt*.8,et*0)),lt.add(new go.PathSegment(go.PathSegment.Line,nt*.66,et*0)),lt.add(new go.PathSegment(go.PathSegment.Line,nt*.66,et*.055)),lt.add(new go.PathSegment(go.PathSegment.Line,nt*.755,et*.055)),lt.add(new go.PathSegment(go.PathSegment.Line,nt*.93,et*(1-gt))),lt.add(new go.PathSegment(go.PathSegment.Line,nt*.64,et*(1-gt))),lt.add(new go.PathSegment(go.PathSegment.Line,nt*.61,et*.75)),lt.add(new go.PathSegment(go.PathSegment.Line,nt*.5,et*.75)),lt.add(new go.PathSegment(go.PathSegment.Line,nt*.39,et*.75)),lt.add(new go.PathSegment(go.PathSegment.Line,nt*.36,et*(1-gt))),lt.add(new go.PathSegment(go.PathSegment.Line,nt*.07,et*(1-gt))),lt.add(new go.PathSegment(go.PathSegment.Line,nt*(1-.755),et*.055)),lt.add(new go.PathSegment(go.PathSegment.Line,nt*(1-.66),et*.055)),lt.add(new go.PathSegment(go.PathSegment.Line,nt*(1-.66),et*0)),lt.add(new go.PathSegment(go.PathSegment.Line,nt*(1-.8),et*0)),lt.add(new go.PathSegment(go.PathSegment.Line,nt*0,et*(1-gt)).close());var yt=new go.PathFigure(nt*.5,et*0,!0);return ht.add(yt),yt.add(new go.PathSegment(go.PathSegment.Line,nt*.26,et*.25)),yt.add(new go.PathSegment(go.PathSegment.Line,nt*.4,et*.25)),yt.add(new go.PathSegment(go.PathSegment.Line,nt*.4,et*.63)),yt.add(new go.PathSegment(go.PathSegment.Line,nt*.6,et*.63)),yt.add(new go.PathSegment(go.PathSegment.Line,nt*.6,et*.25)),yt.add(new go.PathSegment(go.PathSegment.Line,nt*.74,et*.25).close()),ht}),go.Shape.defineFigureGenerator("EmptyDrink",function(kt,nt,et){var ht=new go.Geometry,lt=new go.PathFigure(nt*.15,et*0,!1);return ht.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,nt*.85,et*0)),lt.add(new go.PathSegment(go.PathSegment.Line,nt*.7,et*1)),lt.add(new go.PathSegment(go.PathSegment.Line,nt*.3,et*1).close()),ht}),go.Shape.defineFigureGenerator("Drink",function(kt,nt,et){var ht=new go.Geometry,lt=new go.PathFigure(nt*.15,et*0,!1);ht.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,nt*.85,et*0)),lt.add(new go.PathSegment(go.PathSegment.Line,nt*.7,et*1)),lt.add(new go.PathSegment(go.PathSegment.Line,nt*.3,et*1).close());var gt=new go.PathFigure(nt*.235,et*.28,!0);return ht.add(gt),gt.add(new go.PathSegment(go.PathSegment.Line,nt*.765,et*.28)),gt.add(new go.PathSegment(go.PathSegment.Line,nt*.655,et*.97)),gt.add(new go.PathSegment(go.PathSegment.Line,nt*.345,et*.97).close()),ht}),go.Shape.defineFigureGenerator("4Arrows",function(kt,nt,et){var ht=new go.Geometry,lt=new go.PathFigure(nt*.5,et*0,!0);return ht.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,nt*.65,et*.25)),lt.add(new go.PathSegment(go.PathSegment.Line,nt*.55,et*.25)),lt.add(new go.PathSegment(go.PathSegment.Line,nt*.55,et*.45)),lt.add(new go.PathSegment(go.PathSegment.Line,nt*.75,et*.45)),lt.add(new go.PathSegment(go.PathSegment.Line,nt*.75,et*.35)),lt.add(new go.PathSegment(go.PathSegment.Line,nt*1,et*.5)),lt.add(new go.PathSegment(go.PathSegment.Line,nt*.75,et*.65)),lt.add(new go.PathSegment(go.PathSegment.Line,nt*.75,et*.55)),lt.add(new go.PathSegment(go.PathSegment.Line,nt*.55,et*.55)),lt.add(new go.PathSegment(go.PathSegment.Line,nt*.55,et*.75)),lt.add(new go.PathSegment(go.PathSegment.Line,nt*.65,et*.75)),lt.add(new go.PathSegment(go.PathSegment.Line,nt*.5,et*1)),lt.add(new go.PathSegment(go.PathSegment.Line,nt*.35,et*.75)),lt.add(new go.PathSegment(go.PathSegment.Line,nt*.45,et*.75)),lt.add(new go.PathSegment(go.PathSegment.Line,nt*.45,et*.55)),lt.add(new go.PathSegment(go.PathSegment.Line,nt*.25,et*.55)),lt.add(new go.PathSegment(go.PathSegment.Line,nt*.25,et*.65)),lt.add(new go.PathSegment(go.PathSegment.Line,nt*0,et*.5)),lt.add(new go.PathSegment(go.PathSegment.Line,nt*.25,et*.35)),lt.add(new go.PathSegment(go.PathSegment.Line,nt*.25,et*.45)),lt.add(new go.PathSegment(go.PathSegment.Line,nt*.45,et*.45)),lt.add(new go.PathSegment(go.PathSegment.Line,nt*.45,et*.25)),lt.add(new go.PathSegment(go.PathSegment.Line,nt*.35,et*.25).close()),ht}),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")},80727: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 fn={},Bn="5.0",Ft={},pt=null,Ht=!1,ve=!1,Me=null,Pe=!1,Ae=null,ee=null,Fe=0;Fe<arguments.length;Fe++){var ye=arguments[Fe];if(ye!==null)switch(typeof ye){case"number":Bn=ye.toFixed(1);break;case"string":ye.match(new RegExp("^[0-9]\\.[0-9]+$"))?Bn=ye:Me=ye;break;case"object":typeof ye.is3D!="undefined"?pt=ye:Ft=ye;break;case"boolean":Ht=ye,ve=!0;break}}pt===null&&(pt={is3D:!1,AV:!1,SV:!1,CV:!1,EV2:!1,CP:!1,PC:!1,DA:!1,FI:!1,PV:!1,macro:!1},Ft.material_id!==void 0&&!ve&&(Ht=!0)),Me!==null&&Ft.id===void 0&&(Ft.id=Me);var de="",he="",Ne=!1,He=null,kt=null,nt=null,et=!1,ht=null,lt=null,gt=null,yt=null,Lt=null;Ft.height!==void 0&&(Ft.height=Math.round(Ft.height)),Ft.width!==void 0&&(Ft.width=Math.round(Ft.width));var Dt=function(Te){return parseFloat(Te)>4?parseFloat(Te):5};fn.setHTML5Codebase=function(Te,en){ee=Te,De(Te,en)},fn.setJavaCodebase=fn.setJavaCodebaseVersion=fn.isCompiledInstalled=fn.setPreCompiledScriptPath=fn.setPreCompiledResourcePath=function(){},fn.setHTML5CodebaseVersion=function(Te,en){var Cn=parseFloat(Te);if(Cn!==NaN&&Cn<5){console.log("The GeoGebra HTML5 codebase version "+Cn+" is deprecated. Using version latest instead.");return}Ae=Te,Jt(Te,en)},fn.getHTML5CodebaseVersion=function(){return kt},fn.getParameters=function(){return Ft},fn.setFontsCSSURL=function(Te){yt=Te},fn.setGiacJSURL=function(Te){},fn.setJNLPFile=function(Te){de=Te},fn.setJNLPBaseDir=function(Te){},fn.inject=function(){function Te(){return window.frameElement&&window.frameElement.getAttribute("data-singleton")}for(var en="auto",Cn=Ft.id,Gn,vn=!1,zn=0;zn<arguments.length;zn++){var me=arguments[zn];typeof me=="string"?(me=me.toLowerCase(),me.match(/^(prefer)?(java|html5|compiled|auto|screenshot)$/)?en=me:Cn=arguments[zn]):typeof me=="boolean"?vn=me:me instanceof HTMLElement&&(Gn=me)}An();function An(){if(!Pe){setTimeout(An,200);return}en=_e(en);var ui=Gn||document.getElementById(Cn);if(!ui){console.log("possibly bug on ajax loading? ");return}if(fn.removeExistingApplet(ui,!1),Ft.width===void 0&&ui.clientWidth&&(Ft.width=ui.clientWidth),Ft.height===void 0&&ui.clientHeight&&(Ft.height=ui.clientHeight),!(Ft.width&&Ft.height)&&en==="html5"&&(delete Ft.width,delete Ft.height),He=en,en==="screenshot")ue(ui,Ft);else{var un=!1;Ft.hasOwnProperty("playButton")&&Ft.playButton||Ft.hasOwnProperty("clickToLoad")&&Ft.clickToLoad?un=!0:Ft.hasOwnProperty("playButtonAutoDecide")&&Ft.playButtonAutoDecide&&(un=(!zt()||Te())&&Xt()),un?(He="screenshot",ge(ui,Ft,vn,en)):Le(ui,Ft,vn)}}};function zt(){try{return window.self!==window.top}catch(Te){return!0}}function Xt(){return Ft.hasOwnProperty("screenshotGenerator")&&Ft.screenshotGenerator?!1:Math.max(screen.width,screen.height)<800}fn.getViews=function(){return pt},fn.isJavaInstalled=function(){return!1};var re=function(Te){var en=function(zn){var me=JSON.parse(zn),An=function(ln){return ln.type=="G"||ln.type=="E"},ui=me.elements?me.elements.filter(An)[0]:me;if(!ui||!ui.url){Cn();return}Ft.fileName=ui.url,le(ui.settings||{}),pt.is3D=!0;var un="https://www.geogebra.org/images/";fn.setPreviewImage(ht||ui.previewUrl,un+"GeoGebra_loading.png",un+"applet_play.png"),Te()},Cn=function(){Ft.onError&&Ft.onError(),sn("Error: Fetching material (id "+Ft.material_id+") failed.",Ft)},Gn=location.host.match(/(www|stage|beta|groot|alpha).geogebra.(org|net)/)?location.host:"www.geogebra.org",vn="/materials/"+Ft.material_id+"?scope=basic";ae("https://"+Gn+"/api/proxy.php?path="+encodeURIComponent(vn),en,Cn)};function le(Te){var en=["width","height","showToolBar","showMenuBar","showAlgebraInput","allowStyleBar","showResetIcon","enableLabelDrags","enableShiftDragZoom","enableRightClick","appName"];["enableLabelDrags","enableShiftDragZoom","enableRightClick"].forEach(function(Cn){Te[Cn]=!!Te[Cn]}),en.forEach(function(Cn){Ft[Cn]===void 0&&Te[Cn]!==void 0&&(Ft[Cn]=Te[Cn])}),Ft.showToolBarHelp===void 0&&(Ft.showToolBarHelp=Ft.showToolBar)}function ae(Te,en,Cn){var Gn=new XMLHttpRequest;Gn.open("GET",Te),Gn.onload=function(){en(Gn.responseText)},Gn.onerror=Cn,Gn.send()}fn.isHTML5Installed=function(){return!0},fn.getLoadedAppletType=function(){return He},fn.setPreviewImage=function(Te,en,Cn){ht=Te,lt=en,gt=Cn},fn.removeExistingApplet=function(Te,en){var Cn;typeof Te=="string"&&(Te=document.getElementById(Te)),He=null;var Gn=null;for(Cn=0;Cn<Te.childNodes.length;Cn++){var vn=Te.childNodes[Cn],zn=vn.className;zn==="applet_screenshot"?en?(vn.style.display="block",He="screenshot"):vn.style.display="none":zn!=="applet_scaler prerender"&&(Te.removeChild(vn),Gn=zn&&zn.indexOf("appletParameters")!=-1?vn.id:null,Cn--)}var me=Ft.id!==void 0?Ft.id:Gn,An=window[me];An&&typeof An.getBase64=="function"&&(An.remove(),window[me]=null)},fn.refreshHitPoints=function(){if(Dt(ggbHTML5LoadedCodebaseVersion)>=5)return!0;var Te=fn.getAppletObject();return Te&&typeof Te.recalculateEnvironments=="function"?(Te.recalculateEnvironments(),!0):!1},fn.startAnimation=function(){var Te=fn.getAppletObject();return Te&&typeof Te.startAnimation=="function"?(Te.startAnimation(),!0):!1},fn.stopAnimation=function(){var Te=fn.getAppletObject();return Te&&typeof Te.stopAnimation=="function"?(Te.stopAnimation(),!0):!1},fn.getAppletObject=function(){var Te=Ft.id!==void 0?Ft.id:"ggbApplet";return window[Te]},fn.resize=function(){};var je=function(Te,en,Cn){var Gn=document.createElement("param");Gn.setAttribute("name",en),Gn.setAttribute("value",Cn),Te.appendChild(Gn)},ne=function(Te){return Te&&Te!=="false"},Le=function(Te,en,Cn){Dt(kt)<=4.2&&(Cn=!0);var Gn=!isRenderGGBElementEnabled&&!scriptLoadStarted;(!isRenderGGBElementEnabled&&!scriptLoadStarted||ggbHTML5LoadedCodebaseVersion!==kt||ggbHTML5LoadedCodebaseIsWebSimple&&!et)&&(Gn=!0,isRenderGGBElementEnabled=!1,scriptLoadStarted=!1);var vn=document.createElement("div");vn.classList.add("appletParameters","notranslate");var zn=en.width,me=en.height;if(en.disableAutoScale=en.disableAutoScale===void 0?GGBAppletUtils.isFlexibleWorksheetEditor():en.disableAutoScale,en.width!==void 0)if(Dt(kt)<=4.4)ne(en.showToolBar)&&(en.height-=7),ne(en.showAlgebraInput)&&(en.height-=37),en.width<605&&ne(en.showToolBar)&&(en.width=605,zn=605);else{var An=100;(ne(en.showToolBar)||ne(en.showMenuBar))&&(en.hasOwnProperty("customToolBar")&&(en.customToolbar=en.customToolBar),An=ne(en.showMenuBar)?245:155),zn<An&&(en.width=An,zn=An)}vn.style.border="none",vn.style.display="inline-block";for(var ui in en)en.hasOwnProperty(ui)&&ui!=="appletOnLoad"&&vn.setAttribute("data-param-"+ui,en[ui]);yt&&vn.setAttribute("data-param-fontscssurl",yt),fn.resize=function(){GGBAppletUtils.responsiveResize(Te,en)},window.addEventListener("resize",function(Pt){fn.resize()});var un=typeof en.appletOnLoad=="function"?en.appletOnLoad:function(){};if(!Cn&&en.width!==void 0){en.hasOwnProperty("showSplash")||vn.setAttribute("data-param-showSplash","false");var ln=Te.querySelector(".applet_scaler.prerender"),oi=ln!==null;if(oi)var xn=ln.querySelector(".ggb_preview");else{var xn=nn(zn,me,en.borderColor,!1);ln=document.createElement("div"),ln.className="applet_scaler",ln.style.position="relative",ln.style.display="block",ln.style.width=zn+"px",ln.style.height=me+"px"}window.GGBT_spinner&&window.GGBT_spinner.attachSpinner(ln,"66%"),Dt(kt)>=5?(en.appletOnLoad=function(Pt){var It=Te.querySelector(".ggb_preview");It&&It.parentNode.removeChild(It),window.GGBT_spinner&&window.GGBT_spinner.removeSpinner(ln),window.GGBT_wsf_view&&$(window).trigger("resize"),un(Pt)},oi||ln.appendChild(xn)):vn.appendChild(xn),ln.appendChild(vn),oi||Te.appendChild(ln),setTimeout(function(){fn.resize()},1)}else{var Ie=document.createElement("div");Ie.className="applet_scaler",Ie.style.position="relative",Ie.style.display="block",Ie.appendChild(vn),Te.appendChild(Ie),en.appletOnLoad=function(Pt){fn.resize(),un(Pt)}}function Ze(Pt,It){It&&typeof It.appletOnLoad=="function"&&typeof renderGGBElement=="function"?renderGGBElement(Pt,It.appletOnLoad):renderGGBElement(Pt),sn("GeoGebra HTML5 applet injected and rendered with previously loaded codebase.",It)}function Hn(Pt,It){typeof renderGGBElement=="undefined"?(html5AppletsToProcess===null&&(html5AppletsToProcess=[]),html5AppletsToProcess.push({article:Pt,params:It}),window.renderGGBElementReady=function(){isRenderGGBElementEnabled=!0,html5AppletsToProcess!==null&&html5AppletsToProcess.length&&(html5AppletsToProcess.forEach(function(Yt){Ze(Yt.article,Yt.params)}),html5AppletsToProcess=null)},Dt(kt)<5&&(Pt.className+=" geogebraweb")):Ze(Pt,It)}if(Gn){scriptLoadStarted=!0;for(var qe=0;qe<vn.childNodes.length;qe++){var $e=vn.childNodes[qe].tagName;$e==="TABLE"&&(vn.removeChild(vn.childNodes[qe]),qe--)}if(ggbHTML5LoadedScript!==null){var Pn=document.querySelector('script[src="'+ggbHTML5LoadedScript+'"]');Pn!=null&&Pn.parentNode.removeChild(Pn)}var Rt=document.createElement("script"),bt=function(){Hn(vn,en)};Rt.src=he+nt,ggbHTML5LoadedCodebaseIsWebSimple=et,ggbHTML5LoadedCodebaseVersion=kt,ggbHTML5LoadedScript=Rt.src,sn("GeoGebra HTML5 codebase loaded: '"+he+"'.",en),!ee&&(!Ae||Ae=="5.0")?(et?webSimple.succeeded=webSimple.succeeded||webSimple():web3d.succeeded=web3d.succeeded||web3d(),bt()):he.requirejs?__webpack_require__.e(4184).then(function(){var Pt=[__webpack_require__(74620)];bt.apply(null,Pt)}.bind(this)).catch(__webpack_require__.oe):(Rt.onload=bt,Te.appendChild(Rt))}else Hn(vn,en);en.height=me,en.width=zn},ue=function(Te,en,Cn){var Gn=nn(en.width,en.height,en.borderColor,Cn),vn=document.createElement("div");vn.style.position="relative",vn.style.display="block",vn.style.width=en.width+"px",vn.style.height=en.height+"px",vn.className="applet_screenshot applet_scaler"+(Cn?" applet_screenshot_play":""),vn.appendChild(Gn);var zn=GGBAppletUtils.getScale(en,Te,Cn);Cn?(Te.appendChild(Ue()),window.GGBT_wsf_view||(Te.style.position="relative")):window.GGBT_spinner&&window.GGBT_spinner.attachSpinner(vn,"66%"),Te.appendChild(vn),zn!==1&&!isNaN(zn)&&(GGBAppletUtils.scaleElement(vn,zn),vn.style.width=en.width+"px",vn.style.height=en.height+"px",vn.parentNode.style.width=en.width*zn+"px",vn.parentNode.style.height=en.height*zn+"px"),fn.resize=function(){Ee(Te,Gn,vn,Cn)},window.addEventListener("resize",function(me){fn.resize()}),fn.resize()};function Ee(Te,en,Cn,Gn){if(Te.contains(en)){if(typeof window.GGBT_wsf_view=="object"&&window.GGBT_wsf_view.isFullscreen()){if(Te.id!=="fullscreencontent")return;window.GGBT_wsf_view.setCloseBtnPosition(Te)}var vn=GGBAppletUtils.getScale(Ft,Te,Gn);Cn.parentNode!==null&&(!isNaN(vn)&&vn!==1?(GGBAppletUtils.scaleElement(Cn,vn),Cn.parentNode.style.width=Ft.width*vn+"px",Cn.parentNode.style.height=Ft.height*vn+"px"):(GGBAppletUtils.scaleElement(Cn,1),Cn.parentNode.style.width=Ft.width+"px",Cn.parentNode.style.height=Ft.height+"px")),typeof window.GGBT_wsf_view=="object"&&window.GGBT_wsf_view.isFullscreen()&&GGBAppletUtils.positionCenter(Te),typeof window.GGBT_ws_header_footer=="object"&&window.GGBT_ws_header_footer.setWsScrollerHeight()}}fn.onExitFullscreen=function(Te,en){en.appendChild(Te)};var ge=function(Te,en,Cn,Gn){ue(Te,en,!0);for(var vn=function(){var An=[];for(me=0;me<Te.childNodes.length;me++)An.push(Te.childNodes[me]);if(window.GGBT_wsf_view){var ui=window.GGBT_wsf_view.renderFullScreen(Te,en.id),un=document.getElementById("fullscreencontainer"),ln=jQuery(Te).find(".fullscreencontent");ln.length>0?(ui.remove(),ln.attr("id","fullscreencontent").show(),jQuery(un).append(ln),window.dispatchEvent(new Event("resize"))):Le(ui,en,!1),window.GGBT_wsf_view.launchFullScreen(un)}else He=Gn,Le(Te,en,!1);if(!window.GGBT_wsf_view)for(me=0;me<An.length;me++)Te.removeChild(An[me])},zn=Te.getElementsByClassName("ggb_preview_play"),me=0;me<zn.length;me++)zn[me].addEventListener("click",vn,!1),zn[me].addEventListener("ontouchstart",vn,!1);typeof window.ggbAppletPlayerOnload=="function"&&window.ggbAppletPlayerOnload(Te),Xt()&&window.GGBT_wsf_view&&$(".wsf-element-fullscreen-button").remove()},Ue=function(){var Te=document.createElement("div");if(Te.className="ggb_preview_play icon-applet-play",!window.GGBT_wsf_view){var en='.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");}',Cn=document.createElement("style");Cn.styleSheet?Cn.styleSheet.cssText=en:Cn.appendChild(document.createTextNode(en)),document.getElementsByTagName("head")[0].appendChild(Cn)}return Te},nn=function(Te,en,Cn,Gn){var vn=document.createElement("div");vn.className="ggb_preview",vn.style.position="absolute",vn.style.zIndex="90",vn.style.width=Te-2+"px",vn.style.height=en-2+"px",vn.style.top="0px",vn.style.left="0px",vn.style.overflow="hidden",vn.style.backgroundColor="white";var zn="lightgrey";Cn!==void 0&&(Cn==="none"?zn="transparent":zn=Cn),vn.style.border="1px solid "+zn;var me=document.createElement("img");if(me.style.position="relative",me.style.zIndex="1000",me.style.top="-1px",me.style.left="-1px",ht!==null&&me.setAttribute("src",ht),me.style.opacity=.7,lt!==null){var An,ui,un;if(!Gn){An=document.createElement("img"),An.style.position="absolute",An.style.zIndex="1001",An.style.opacity=1,me.style.opacity=.3,ui=360,ui>Te/4*3&&(ui=Te/4*3),un=ui/5.8,An.setAttribute("src",lt),An.setAttribute("width",ui),An.setAttribute("height",un);var ln=(Te-ui)/2,oi=(en-un)/2;An.style.left=ln+"px",An.style.top=oi+"px",vn.appendChild(An)}}return vn.appendChild(me),vn},_e=function(Te){return Te=Te.toLowerCase(),Te==="html5"||Te==="screenshot"?Te:"html5"},qt=["web","webSimple","web3d","tablet","tablet3d","phone"],Jt=function(Te,en){if(kt=Te,en){De(kt,!0);return}var Cn=!Ht;if(Cn){var Gn=Dt(kt);!isNaN(Gn)&&Gn<4.4&&(Cn=!1)}var vn,zn;window.location.protocol.substr(0,4)==="http"?vn=window.location.protocol:vn="http:";var me=kt.indexOf("//");me>0?zn=kt:me===0?zn=vn+kt:zn="https://www.geogebra.org/apps/5.2.814.0/";for(var An in qt)if(kt.slice(qt[An].length*-1)===qt[An]||kt.slice((qt[An].length+1)*-1)===qt[An]+"/"){De(zn,!1);return}!GGBAppletUtils.isFlexibleWorksheetEditor()&&Cn&&!pt.is3D&&!pt.AV&&!pt.SV&&!pt.CV&&!pt.EV2&&!pt.CP&&!pt.PC&&!pt.DA&&!pt.FI&&!pt.PV&&!ne(Ft.showToolBar)&&!ne(Ft.showMenuBar)&&!ne(Ft.showAlgebraInput)&&!ne(Ft.enableRightClick)&&(!Ft.appName||Ft.appName=="classic")?zn+="webSimple/":zn+="web3d/",De(zn,!1)},De=function(Te,en){if(Te.requirejs){he=Te;return}Te.slice(-1)!=="/"&&(Te+="/"),he=Te,en===null&&(en=Te.indexOf("http")===-1),Ne=en,nt="web.nocache.js",et=!1;var Cn=he.split("/");Cn.length>1&&(!en&&Cn[Cn.length-2]==="webSimple"?(nt="webSimple.nocache.js",et=!0):qt.indexOf(Cn[Cn.length-2])>=0&&(nt=Cn[Cn.length-2]+".nocache.js")),Cn=Te.split("/"),kt=Cn[Cn.length-3],kt.substr(0,4)==="test"?kt=kt.substr(4,1)+"."+kt.substr(5,1):(kt.substr(0,3)==="war"||kt.substr(0,4)==="beta")&&(kt="5.0");var Gn=parseFloat(kt);Gn!==NaN&&Gn<5&&Te.indexOf("geogebra.org")>=0&&(console.log("The GeoGebra HTML5 codebase version "+Gn+" is deprecated. Using version latest instead."),Jt("5.0",en))},sn=function(Te,en){window.console&&window.console.log&&(!en||typeof en.showLogging=="undefined"||en.showLogging&&en.showLogging!=="false")&&console.log(Te)};Ft.material_id!==void 0?re(cn):cn();function cn(){var Te=Bn;Ae!==null?Te=Ae:parseFloat(Te)<5&&(Te="5.0"),Jt(Te,!1),ee!==null&&De(ee,Ne),Pe=!0}return fn},GGBAppletUtils=function(){"use strict";function fn(){return window.GGBT_wsf_edit!==void 0}function Bn(Pe,Ae){Ae!=1?(Pe.style.transformOrigin="0% 0% 0px",Pe.style.webkitTransformOrigin="0% 0% 0px",Pe.style.transform="scale("+Ae+","+Ae+")",Pe.style.webkitTransform="scale("+Ae+","+Ae+")",Pe.style.maxWidth="initial",Pe.querySelector(".ggb_preview")!==null&&(Pe.querySelector(".ggb_preview").style.maxWidth="initial"),Pe.querySelectorAll(".ggb_preview img")[0]!==void 0&&(Pe.querySelectorAll(".ggb_preview img")[0].style.maxWidth="initial"),Pe.querySelectorAll(".ggb_preview img")[1]!==void 0&&(Pe.querySelectorAll(".ggb_preview img")[1].style.maxWidth="initial")):(Pe.style.transform="none",Pe.style.webkitTransform="none")}function Ft(Pe,Ae,ee,Fe,ye,de){var he=null;if(de!=null&&de!="")for(var Ne=Pe.parentNode;Ne!=null;)if((" "+Ne.className+" ").indexOf(" "+de+" ")>-1){he=Ne;break}else Ne=Ne.parentNode;var He=0,kt=0,nt=0,et=0,ht=0,lt=0,gt=0;if(he)He=he.offsetWidth,kt=Math.max(Fe?he.offsetWidth:0,he.offsetHeight);else{if(window.innerWidth&&document.documentElement.clientWidth?(He=Math.min(window.innerWidth,document.documentElement.clientWidth),kt=Math.min(window.innerHeight,document.documentElement.clientHeight),nt=He):(He=window.innerWidth,kt=window.innerHeight,nt=window.innerWidth),Pe){var yt=Pe.getBoundingClientRect();yt.left>0&&yt.left<=He&&(ye===void 0||!ye)&&(document.dir==="rtl"?(ht=He-yt.width-yt.left,lt=nt<=480?10:30):(lt=yt.left,ht=nt<=480?10:30),et=lt+ht)}if(Pe&&typeof window.GGBT_wsf_view=="object"&&window.GGBT_wsf_view.isFullscreen()){var Lt=Pe.getBoundingClientRect();window.GGBT_wsf_view.getCloseBtnPosition()==="closePositionRight"?(et=40,gt=0):window.GGBT_wsf_view.getCloseBtnPosition()==="closePositionTop"&&(et=0,gt=40)}}return Pe&&((ee===void 0||!ee)&&Ae>0&&Ae+et<He?He=Ae:He-=et,typeof window.GGBT_wsf_view=="object"&&window.GGBT_wsf_view.isFullscreen()&&(ee===void 0||!ee)&&(kt-=gt)),{width:He,height:kt}}function pt(Pe,Ae,ee,Fe,ye){if(Pe.isScreenshoGenerator)return 1;var de=Fe!==void 0&&Fe,he=Pe.noScaleMargin!=null&&Pe.noScaleMargin,Ne=function(Lt){return Lt&&Lt!=="false"},He=Ne(Pe.autoHeight),kt=Ft(Ae,Pe.width,ee,He,de&&window.GGBT_wsf_view||he,ye),nt=parseInt(kt.width),et=Pe.width,ht=Pe.height;if(et===void 0){var lt=Ae.querySelector(".appletParameters");lt&&(et=lt.offsetWidth,ht=lt.offsetHeight)}var gt=nt/et,yt=de?1:kt.height/ht;return ee!==void 0&&!ee&&(gt=Math.min(1,gt),yt=Math.min(1,yt)),Math.min(gt,yt)}function Ht(Pe,Ae,ee){var Fe=1,ye,de=!1;if(Pe.hasOwnProperty("allowUpscale")&&(de=Pe.allowUpscale),Pe.hasOwnProperty("scale")&&(Fe=parseFloat(Pe.scale),(isNaN(Fe)||Fe===null||Fe===0)&&(Fe=1),Fe>1&&(de=!0)),Ae&&typeof window.GGBT_wsf_view=="object"&&window.GGBT_wsf_view.isFullscreen()&&(de=!0),!(Pe.hasOwnProperty("disableAutoScale")&&Pe.disableAutoScale))ye=pt(Pe,Ae,de,ee,Pe.scaleContainerClass);else return Fe;return de&&(!Pe.hasOwnProperty("scale")||Fe===1)?ye:Math.min(Fe,ye)}function ve(Pe){var Ae=Math.min(window.innerWidth,document.documentElement.clientWidth),ee=Math.min(window.innerHeight,document.documentElement.clientHeight),Fe=Pe.getBoundingClientRect(),ye=(Ae-Fe.width)/2,de=(ee-Fe.height)/2;de<0&&(de=0),Pe.style.position="relative",window.GGBT_wsf_view.getCloseBtnPosition()==="closePositionRight"?(ye<40?Pe.style.left="40px":Pe.style.left=ye+"px",Pe.style.top=de+"px"):window.GGBT_wsf_view.getCloseBtnPosition()==="closePositionTop"&&(de<40?Pe.style.top="40px":Pe.style.top=de+"px",Pe.style.left=ye+"px")}function Me(Pe,Ae){var ee=Pe.querySelector(".appletParameters");if(ee){if(typeof window.GGBT_wsf_view=="object"&&window.GGBT_wsf_view.isFullscreen()){if(Ae.id!==ee.getAttribute("data-param-id"))return;window.GGBT_wsf_view.setCloseBtnPosition(Pe)}if(ee.parentElement&&/fullscreen/.test(ee.parentElement.className))return;var Fe=Ht(Ae,Pe);fn()&&ee.setAttribute("data-param-scale",Fe);for(var ye=null,de=0;de<Pe.childNodes.length;de++)if(Pe.childNodes[de].className!==void 0&&Pe.childNodes[de].className.match(/^applet_scaler/)){ye=Pe.childNodes[de];break}if(ye!==null&&ye.querySelector(".noscale")!==null)return;var he=Ae.id!==void 0?Ae.id:"ggbApplet",Ne=window[he];(Ne==null||!Ne.recalculateEnvironments)&&ye!==null&&!ye.className.match(/fullscreen/)&&(ye.parentNode.style.transform="",!isNaN(Fe)&&Fe!==1?(ye.parentNode.style.width=Ae.width*Fe+"px",ye.parentNode.style.height=Ae.height*Fe+"px",Bn(ye,Fe)):(Bn(ye,1),ye.parentNode.style.width=Ae.width+"px",ye.parentNode.style.height=Ae.height+"px")),typeof window.GGBT_wsf_view=="object"&&window.GGBT_wsf_view.isFullscreen()&&ve(Pe),window.GGBT_wsf_view&&!window.GGBT_wsf_view.isFullscreen()&&window.GGBT_wsf_general.adjustContentToResize($(ee).parents(".content-added-content"))}}return{responsiveResize:Me,isFlexibleWorksheetEditor:fn,positionCenter:ve,getScale:Ht,scaleElement:Bn}}();__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 fn=n.location.search;return fn.indexOf(J)!=-1||fn.indexOf(K)!=-1}function q(fn,Bn){}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(fn){var Bn=s[L].bindings;s[L].bindings=function(){for(var Ft=Bn?Bn():{},pt=fn[webModule.__softPermutationId],Ht=O;Ht<pt.length;Ht++){var ve=pt[Ht];Ft[ve[O]]=ve[P]}return Ft}};var t;function u(){return v(),t}function v(){if(!t){var fn=o.createElement(Q);if(fn.id=L,fn.style.cssText=R+S,fn.tabIndex=-1,o.body.appendChild(fn),t=fn.contentWindow.document,navigator.userAgent.indexOf(T)==-1){t.open();var Bn=document.compatMode==U?V:W;t.write(Bn+X),t.close()}}}function w(fn){function Bn(pt){function Ht(){return typeof o.readyState==Y?typeof o.body!=Y&&o.body!=null:/loaded|complete/.test(o.readyState)}var ve=Ht();if(ve){pt();return}function Me(){if(!ve){if(!Ht())return;ve=!0,pt(),o.removeEventListener&&o.removeEventListener(Z,Me,!1),Pe&&clearInterval(Pe)}}o.addEventListener&&o.addEventListener(Z,Me,!1);var Pe=setInterval(function(){Me()},$)}function Ft(pt){var Ht=u(),ve=Ht.body,Me=Ht.createElement(_);Me.language=ab,Me.crossOrigin=W,Me.src=pt,webModule.__errFn&&(Me.onerror=function(){webModule.__errFn(L,new Error(bb+pt))}),ve.appendChild(Me)}Bn(function(){Ft(fn)})}webModule.__startLoadingFragment=function(fn){return C(fn)},webModule.__installRunAsyncCode=function(fn){var Bn=u(),Ft=Bn.body,pt=Bn.createElement(_);pt.language=ab,pt.text=fn,Ft.appendChild(pt),Ft.removeChild(pt)};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(fn){alert(nb+k+ob)}}else if(j==pb&&(k=i.getAttribute(kb),k))try{e=eval(k)}catch(fn){alert(nb+k+qb)}}}__gwt_getMetaProperty=function(fn){var Bn=c[fn];return Bn==null?null:Bn},r=d,webModule.__errFn=e}function B(){function fn(Pe){var Ae=Pe.lastIndexOf(rb);Ae==-1&&(Ae=Pe.length);var ee=Pe.indexOf(sb);ee==-1&&(ee=Pe.length);var Fe=Pe.lastIndexOf(tb,Math.min(ee,Ae));return Fe>=O?Pe.substring(O,Fe+P):W}function Bn(Pe){if(!Pe.match(/^\w+:\/\//)){var Ae=o.createElement(ub);Ae.src=Pe+vb,Pe=fn(Ae.src)}return Pe}function Ft(){var Pe=__gwt_getMetaProperty(wb);return Pe!=null?Pe:W}function pt(){for(var Pe=o.getElementsByTagName(_),Ae=O;Ae<Pe.length;++Ae)if(Pe[Ae].src.indexOf(xb)!=-1)return fn(Pe[Ae].src);return W}function Ht(){var Pe=o.getElementsByTagName(yb);return Pe.length>O?Pe[Pe.length-P].href:W}function ve(){var Pe=o.location;return Pe.href==Pe.protocol+zb+Pe.host+Pe.pathname+Pe.search+Pe.hash}var Me=Ft();return Me==W&&(Me=pt()),Me==W&&(Me=Ht()),Me==W&&ve()&&(Me=fn(o.location.href)),Me=Bn(Me),Me}function C(fn){return fn.match(/^\//)||fn.match(/^[a-zA-Z]+:\/\//)?fn:webModule.__moduleBase+fn}function D(){var fn=[],Bn=O,Ft=[],pt=[];function Ht(Pe){var Ae=pt[Pe](),ee=Ft[Pe];if(Ae in ee)return Ae;var Fe=[];for(var ye in ee)Fe[ee[ye]]=ye;throw r&&r(Pe,Fe,Ae),null}if(__gwt_isKnownPropertyValue=function(Pe,Ae){return Ae in Ft[Pe]},webModule.__getPropMap=function(){var Pe={};for(var Ae in Ft)Ft.hasOwnProperty(Ae)&&(Pe[Ae]=Ht(Ae));return Pe},webModule.__computePropValue=Ht,n.__gwt_activeModules[L].bindings=webModule.__getPropMap,p())return C(Bb);var ve;try{ve=Cb;var Me=ve.indexOf(Db);Me!=-1&&(Bn=parseInt(ve.substring(Me+P),$),ve=ve.substring(O,Me))}catch(Pe){}return webModule.__softPermutationId=Bn,C(ve+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})()},77903:function(fn,Bn,Ft){"use strict";Ft.d(Bn,{Ax:function(){return Me},Ds:function(){return Pe},KI:function(){return ee},SI:function(){return ve},f1:function(){return Ht}});var pt=Ft(3294);function Ht(Fe){let ye=!0;if(Fe.length>0){for(let de=0;de<Fe.length;de++)if(Fe[de].compile_success==0||!Fe[de].compile_success){ye=!1;break}}else ye=!1;return ye}function ve(Fe,ye=""){let de=[];for(let he=0;he<Fe.length;he++){let Ne=Fe[he],He=ye?`${ye}/${Ne.name}`:`${Ne.name}`;de.push({title:Ne.name,type:Ne.type,isLeaf:Ne.type!=="tree",key:He})}return de}function Me(Fe,ye,de){for(let he=0;he<Fe.length;he++){let Ne=Fe[he];if(Ne.key===ye){Ne.children=de;break}Ne.children&&Me(Ne.children,ye,de)}return Fe}function Pe(Fe,ye,de){let he;return function(){let Ne=this,He=arguments,kt=function(){he=null,de||Fe.apply(Ne,He)},nt=de&&!he;clearTimeout(he),he=setTimeout(kt,ye),nt&&Fe.apply(Ne,He)}}const Ae=!0,ee=pt.Z.API_SERVER},24544:function(fn,Bn,Ft){"use strict";var pt=Ft(86204),Ht=Ft.n(pt),ve=Object.defineProperty,Me=(Fe,ye,de)=>ye in Fe?ve(Fe,ye,{enumerable:!0,configurable:!0,writable:!0,value:de}):Fe[ye]=de,Pe=(Fe,ye,de)=>Me(Fe,typeof ye!="symbol"?ye+"":ye,de),Ae=(Fe,ye,de)=>new Promise((he,Ne)=>{var He=et=>{try{nt(de.next(et))}catch(ht){Ne(ht)}},kt=et=>{try{nt(de.throw(et))}catch(ht){Ne(ht)}},nt=et=>et.done?he(et.value):Promise.resolve(et.value).then(He,kt);nt((de=de.apply(Fe,ye)).next())});class ee extends pt.EventEmitter{constructor(ye,de){super(),Pe(this,"url"),Pe(this,"body"),Pe(this,"fullContent",""),Pe(this,"controller",null),this.url=ye,this.body=de}startStream(){return Ae(this,null,function*(){this.controller=new AbortController;const{signal:ye}=this.controller;try{const de=yield fetch(this.url,{method:"POST",headers:{"Content-Type":"application/json; charset=utf-8"},credentials:"include",body:JSON.stringify(this.body),signal:ye});if(!de.ok)throw new Error(`\u8BF7\u6C42\u5931\u8D25: ${de.status}`);const he=de.headers.get("content-type");if(!he)throw new Error("\u54CD\u5E94\u5934\u7F3A\u5C11 content-type");if(he.includes("application/json")){const kt=yield de.json();this.emit("error",kt);return}if(!he.includes("text/event-stream"))throw new Error("\u54CD\u5E94\u6570\u636E\u683C\u5F0F\u9519\u8BEF");const Ne=de.body.getReader(),He=new TextDecoder("utf-8");for(;;){const{done:kt,value:nt}=yield Ne.read();if(kt)break;const ht=He.decode(nt,{stream:!0}).split(`
`);for(const lt of ht)if(lt.startsWith("data:")){const gt=lt.slice(5).trim();if(gt==="[DONE]")break;try{const yt=JSON.parse(gt);yt.data&&this.handleData(yt.data)}catch(yt){console.error("\u89E3\u6790 JSON \u5931\u8D25:",yt)}}}this.emit("done",this.fullContent)}catch(de){de.name==="AbortError"?this.emit("cancelled",this.fullContent):this.emit("error",de.message)}})}handleData(ye){ye.content&&(this.fullContent+=ye.content,this.emit("data",{chunk:ye,full:this.fullContent}))}cancelRequest(){var ye;(ye=this.controller)==null||ye.abort()}}Bn.Z=ee},6584:function(fn,Bn,Ft){"use strict";Ft.d(Bn,{Z:function(){return _e}});var pt=Ft(59301),Ht=Ft(72719),ve=Ft(77596),Me=Ft(93772),Pe=Ft(14179),Ae=Ft(56102),ee={answer:"answer___UngkO",imgWrap:"imgWrap___ORTRf",codeCopy:"codeCopy___re8vm",runCode:"runCode___MYs9m"},Fe=Ft(8591),ye=Ft(11611),de=Ft(81327),he=Ft(3113),Ne=Ft(35328),He=Ft(30084),kt=Ft(10787),nt=Ft(50304),et=Ft(43428),ht=Ft(95237),lt=Ft(43604),gt={smartWrp:"smartWrp___NjRcB"},yt=Ft(23954),Lt=Ft(59301);const Dt=`<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>\u5FEB\u901F\u6392\u5E8F\u6F14\u793A</title>
<style>
body {
font-family: Arial, sans-serif;
text-align: center;
margin: 20px;
}
.array-container {
display: flex;
justify-content: center;
align-items: flex-end;
height: 300px;
margin-top: 20px;
}
.bar {
width: 30px;
margin: 0 2px;
background-color: #4caf50;
color: white;
display: flex;
justify-content: center;
align-items: center;
border-radius: 5px;
transition: all 0.3s ease;
}
.bar.sorted {
background-color: #ff9800;
}
.bar.pivot {
background-color: #f44336;
}
</style>
</head>
<body>
<h1>\u5FEB\u901F\u6392\u5E8F\u7B97\u6CD5\u6F14\u793A</h1>
<button id="start-sort">\u5F00\u59CB\u6392\u5E8F</button>
<div class="array-container" id="array-container"></div>
<script>
const array = [34, 7, 23, 32, 5, 62]; // \u56FA\u5B9A\u6570\u7EC4
let bars = [];
// \u521D\u59CB\u5316\u6570\u7EC4\u663E\u793A
function initArrayDisplay() {
const container = document.getElementById('array-container');
container.innerHTML = '';
bars = array.map(value => {
const bar = document.createElement('div');
bar.className = 'bar';
bar.style.height = \`\${value * 5}px\`;
bar.textContent = value;
container.appendChild(bar);
return bar;
});
}
// \u9AD8\u4EAE\u67D0\u4E2A\u8303\u56F4\u5185\u7684\u67F1\u5B50
function highlightBars(indices, className) {
indices.forEach(index => bars[index].classList.add(className));
}
// \u79FB\u9664\u9AD8\u4EAE
function removeHighlightBars(indices, className) {
indices.forEach(index => bars[index].classList.remove(className));
}
// \u5FEB\u901F\u6392\u5E8F\u4E3B\u51FD\u6570
async function quickSort(arr, left = 0, right = arr.length - 1) {
if (left >= right) return;
const pivotIndex = await partition(arr, left, right);
await quickSort(arr, left, pivotIndex - 1);
await quickSort(arr, pivotIndex + 1, right);
}
// \u5206\u533A\u51FD\u6570
async function partition(arr, left, right) {
const pivot = arr[right];
let i = left - 1;
highlightBars([right], 'pivot'); // \u9AD8\u4EAE\u57FA\u51C6\u503C
for (let j = left; j < right; j++) {
highlightBars([j], 'sorted'); // \u9AD8\u4EAE\u5F53\u524D\u6BD4\u8F83\u5143\u7D20
await sleep(500);
if (arr[j] <= pivot) {
i++;
[arr[i], arr[j]] = [arr[j], arr[i]];
// \u66F4\u65B0\u67F1\u5B50\u9AD8\u5EA6
bars[i].style.height = \`\${arr[i] * 5}px\`;
bars[i].textContent = arr[i];
bars[j].style.height = \`\${arr[j] * 5}px\`;
bars[j].textContent = arr[j];
await sleep(500);
}
removeHighlightBars([j], 'sorted'); // \u79FB\u9664\u9AD8\u4EAE
}
// \u5C06\u57FA\u51C6\u503C\u653E\u5230\u6B63\u786E\u4F4D\u7F6E
[arr[i + 1], arr[right]] = [arr[right], arr[i + 1]];
bars[i + 1].style.height = \`\${arr[i + 1] * 5}px\`;
bars[i + 1].textContent = arr[i + 1];
bars[right].style.height = \`\${arr[right] * 5}px\`;
bars[right].textContent = arr[right];
removeHighlightBars([right], 'pivot'); // \u79FB\u9664\u57FA\u51C6\u503C\u9AD8\u4EAE
highlightBars([i + 1], 'sorted'); // \u9AD8\u4EAE\u6700\u7EC8\u4F4D\u7F6E
await sleep(500);
removeHighlightBars([i + 1], 'sorted');
return i + 1;
}
// \u5EF6\u8FDF\u51FD\u6570
function sleep(ms) {
return new Promise(resolve => setTimeout(resolve, ms));
}
// \u5F00\u59CB\u6392\u5E8F\u6309\u94AE\u70B9\u51FB\u4E8B\u4EF6
document.getElementById('start-sort').addEventListener('click', () => {
quickSort(array);
});
// \u521D\u59CB\u5316\u9875\u9762
initArrayDisplay();
<\/script>
</body>
</html>`;function zt({open:qt=!0,onChange:Jt,defaultValue:De,placement:sn,width:cn,height:Te,extra:en}){const Cn=(0,pt.useRef)(null),Gn=(0,pt.useRef)(null),[vn,zn]=(0,pt.useState)(De||""),[me,An]=(0,pt.useState)(De||""),[ui,un]=(0,pt.useState)(!!qt),ln={selectOnLineNumbers:!0};(0,pt.useEffect)(()=>{qt&&(zn(De),An(De),un(!0))},[qt,De]),(0,pt.useEffect)(()=>{vn!==""&&(clearTimeout(Gn.current),Gn.current=setTimeout(()=>{const xn=document.createElement("iframe");if(xn.style.width="100%",xn.style.height="100%",xn.style.border="0",Cn.current){Cn.current.innerHTML="",Cn.current.appendChild(xn);const Ie=xn.contentDocument||xn.contentWindow.document;Ie.open(),Ie.write(vn),Ie.close()}},500))},[qt,vn]);const oi=xn=>{zn(xn),Jt==null||Jt(xn,me)};return Lt.createElement(et.Z,{title:"\u667A\u80FD\u5DE5\u5382",placement:sn||"bottom",open:ui,height:Te||"90vh",rootClassName:gt.smartWrp,destroyOnClose:!0,onClose:()=>un(!1),extra:en},Lt.createElement(ht.Z,null,Lt.createElement(lt.Z,{flex:"1",style:{background:"#f6f7fb",borderRight:"#e8eaf1 1px solid"}},Lt.createElement("div",{className:"h100",ref:Cn})),Lt.createElement(lt.Z,{flex:"1"},Lt.createElement(yt.ZP,{height:"90vh",value:De,language:"html",theme:"vs",showMiniMap:!1,options:ln,onChange:oi}))))}var Xt=zt,re=Object.defineProperty,le=Object.defineProperties,ae=Object.getOwnPropertyDescriptors,je=Object.getOwnPropertySymbols,ne=Object.prototype.hasOwnProperty,Le=Object.prototype.propertyIsEnumerable,ue=(qt,Jt,De)=>Jt in qt?re(qt,Jt,{enumerable:!0,configurable:!0,writable:!0,value:De}):qt[Jt]=De,Ee=(qt,Jt)=>{for(var De in Jt||(Jt={}))ne.call(Jt,De)&&ue(qt,De,Jt[De]);if(je)for(var De of je(Jt))Le.call(Jt,De)&&ue(qt,De,Jt[De]);return qt},ge=(qt,Jt)=>le(qt,ae(Jt)),Ue=(qt,Jt)=>{var De={};for(var sn in qt)ne.call(qt,sn)&&Jt.indexOf(sn)<0&&(De[sn]=qt[sn]);if(qt!=null&&je)for(var sn of je(qt))Jt.indexOf(sn)<0&&Le.call(qt,sn)&&(De[sn]=qt[sn]);return De},_e=({onFinish:qt,value:Jt,streamingStatus:De,cancelIndex:sn,loadImage:cn})=>{const[Te,en]=(0,pt.useState)(""),[Cn,Gn]=(0,pt.useState)({defaultValue:"",open:0,language:"",placement:"right",height:"100vh"}),[vn,zn]=(0,pt.useState)(0),[me,An]=(0,pt.useState)(!1),ui=oi=>oi.replace(/`(\$\$.*?\$\$)`/g,"$1").replace(/\$\$([\s\S]*?)\$\$/g,(xn,Ie)=>`<mathx data-text="${Ie.trim()}">$$${Ie.trim()}$$</mathx>`).replace(/\\\(([\s\S]*?)\\\)/g,'<mathx data-text="$1">$$$$$1$$$$</mathx>').replace(/\\\[([\s\S]*?)\\\]/g,'<mathx data-text="$1">$$$$$1$$$$</mathx>').replace(/_{2,}/g,"`$&`"),un=()=>{An(!0),qt==null||qt()};(0,pt.useEffect)(()=>{const oi=cn?`\u8FD9\u662F\u6839\u636E\u60A8\u7684\u63CF\u8FF0\u751F\u6210\u7684\u56FE\u7247\uFF1A
${Jt}`:Jt,xn=ui(oi);if(!me)if(cn||!De||sn>0){en(xn),zn(xn.length),(!De||sn>0)&&!cn&&un();return}else if(vn<xn.length){const Ie=xn.length-vn,Ze=setInterval(()=>{en(xn.slice(0,vn+2)),zn(Hn=>Hn+2)},Ie>10?Math.max(500/(Ie/2),20):50);return()=>clearInterval(Ze)}else De||un()},[Jt,De,sn,cn,vn]);const ln=(0,pt.useMemo)(()=>pt.createElement("section",{className:`${ee.answer} fadeIn animated edu_md`},pt.createElement(Ht.UG,{remarkPlugins:[He.Z,kt.Z],rehypePlugins:[Ne.Z,Me.Z],components:{code(oi){var xn=oi,{node:Ie,inline:Ze,className:Hn,children:qe}=xn,$e=Ue(xn,["node","inline","className","children"]);const Pn=/language-(\w+)/.exec(Hn||""),Rt=String(qe).trim();return Ze||!Pn?pt.createElement("code",Ee({className:Hn},$e),qe):pt.createElement("code",{className:ee.codeCopy,"data-text":`\`\`\`${Pn?Pn[1]:""}
${qe}
\`\`\``},pt.createElement(Ae.CopyToClipboard,{text:Rt,onCopy:()=>Fe.ZP.success({content:"\u590D\u5236\u6210\u529F",key:"copy"})},pt.createElement("button",null,"\u590D\u5236")),Pn[1]==="html"&&pt.createElement("button",{className:ee.runCode,onClick:()=>{Gn(Ee({},ge(Ee({},Cn),{open:Cn.open++,defaultValue:Rt,language:Pn[1]})))}},"\u8FD0\u884CHTML"),pt.createElement(ve.Z,Ee({style:Pe.Z,language:Pn[1],PreTag:"div",showLineNumbers:!0,lineNumberStyle:{minWidth:"40px"}},$e),Rt))},img({node:oi}){var xn;const Ie=(xn=oi.properties)==null?void 0:xn.src;return pt.createElement(ye.Z,{src:Ie,width:320,"data-text":Ie,onLoad:()=>cn&&setTimeout(()=>un(),500)})}}},me?Te:`${Te}__`)),[Te]);return pt.createElement(pt.Fragment,null,pt.createElement(Xt,{defaultValue:Cn.defaultValue,open:Cn.open,language:Cn.language,height:Cn.height,onChange:(oi,xn)=>{en(Te.replaceAll(xn,oi))},extra:pt.createElement(de.Z,null,pt.createElement(he.ZP,{type:"primary"},"\u4FDD\u5B58\u81F3\u8BFE\u9898"))}),ln)}},35339:function(fn,Bn,Ft){"use strict";Ft.d(Bn,{Z:function(){return re}});var pt=Ft(59301),Ht=Ft(8591),ve=Ft(43428),Me=Ft(95237),Pe=Ft(43418),Ae=Ft(92832),ee=Ft(54580),Fe=Ft(6848),ye=Ft(43604),de=Ft(5871),he={wrap:"wrap___Yz6fc",left:"left___F0axg",tip:"tip___nCmqI",bottomBtn:"bottomBtn___x70Gq",disabled:"disabled___CWzre"},Ne=Ft(85057),He=Ft(3294),kt=Ft(14791),nt=Ft(99064),et=Ft(2554),ht=Ft(955),lt=Ft(86106),gt=Ft(36136),yt=Ft(88985),Lt=Ft(25355),Dt="data:image/png;base64,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",zt=(le,ae,je)=>new Promise((ne,Le)=>{var ue=Ue=>{try{ge(je.next(Ue))}catch(nn){Le(nn)}},Ee=Ue=>{try{ge(je.throw(Ue))}catch(nn){Le(nn)}},ge=Ue=>Ue.done?ne(Ue.value):Promise.resolve(Ue.value).then(ue,Ee);ge((je=je.apply(le,ae)).next())}),re=(0,pt.forwardRef)(({onUpdateNum:le,onSave:ae},je)=>{var ne;const Le=`\u8BF7\u8F93\u5165\u51FA\u9898\u8981\u6C42\uFF0C\u60A8\u4E5F\u53EF\u4EE5\u5148\u4E0A\u4F20\u6750\u6599\u4E4B\u540E\u518D\u6839\u636E\u6750\u6599\u51FA\u9898
\u4F8B:\u8BF7\u751F\u6210\u5173\u4E8E\u300APython\u7A0B\u5E8F\u8BBE\u8BA1\u300B\u7684\u8BD5\u9898\u3002\u8003\u5BDF\u77E5\u8BC6\u70B9:\u53D8\u91CF\u5B9A\u4E49\u3001\u6570\u636E\u7C7B\u578B\u3001\u8FD0\u7B97\u7B26\u548C\u63A7\u5236\u7ED3\u6784\u3002\u96BE\u5EA6\u4E3A\u201C\u56F0\u96BE\u201D\u7684\u8BD5\u9898\u536020%`,[ue,Ee]=(0,pt.useState)(!1),[ge,Ue]=(0,pt.useState)([]),[nn,_e]=(0,pt.useState)(null),[qt,Jt]=(0,pt.useState)([]),[De,sn]=(0,pt.useState)(0),[cn,Te]=(0,pt.useState)(0),[en,Cn]=(0,pt.useState)(!1),[Gn,vn]=(0,pt.useState)(Le),[zn,me]=(0,pt.useState)(0),[An,ui]=(0,pt.useState)(0),[un,ln]=(0,pt.useState)(0),[oi,xn]=(0,pt.useState)(0),[Ie,Ze]=(0,pt.useState)(0),[Hn,qe]=(0,pt.useState)(0),[$e,Pn]=(0,pt.useState)(0),[Rt,bt]=(0,pt.useState)(0),[Pt,It]=(0,pt.useState)(Lt.Q),{contentRef:Yt,value:Nt,status:xe,open:_n,close:ni}=Pt,ei=(0,gt.Z)({contentRef:Yt,status:xe}),{openProgress:ii,closeProgress:Hi,CreateProgressModal:hi,progressOpen:Jn}=(0,lt.Z)();(0,pt.useEffect)(()=>{nn&&sr(),nn===!1&&(ni(),le==null||le(),Ue([]),vn(Le),me(0),ui(0),ln(0),xn(0),Ze(0),qe(0),Pn(0),bt(0))},[nn]);const Vi=()=>{_e(!0)};(0,pt.useImperativeHandle)(je,()=>({onClick:Vi}));const er=Ei=>{Cn(!0),sn(Ei),Te(0)},nr=Ei=>zt(void 0,null,function*(){const Qr=Ei.name.split(".").slice(-1)[0].toLowerCase();return["docx","doc","pdf","png","jpg"].indexOf(Qr)==-1?(Ht.ZP.warning("\u4E0A\u4F20\u7684\u6587\u4EF6\u683C\u5F0F\u6709\u8BEF\uFF0C\u8BF7\u68C0\u67E5\u540E\u91CD\u65B0\u4E0A\u4F20"),Promise.reject()):Ei.size/1024/1024>10?(Ht.ZP.warning("\u4E0A\u4F20\u7684\u6587\u4EF6\u5927\u5C0F\u9650\u523610MB\uFF0C\u8BF7\u68C0\u67E5\u540E\u91CD\u65B0\u4E0A\u4F20"),Promise.reject()):!0}),sr=()=>zt(void 0,null,function*(){const Ei=yield(0,nt.ZP)("/api/intelligent_imports/check_number.json",{method:"get"});Ei.status===0&&(sn(Ei.total_number),Te(Ei.remaining_number))}),kr=Ei=>(Ei=Ei||"",Ei=String(Ei),Ei=Ei.replace(/\s+/g,""),Ei),or=()=>zt(void 0,null,function*(){var Ei,Qr;if(kr(Gn)){if(Gn.length>1e3){Ht.ZP.warning("\u51FA\u9898\u8981\u6C42\u5B57\u6570\u9650\u5236\u4E3A1000\u5B57");return}}else{Ht.ZP.warning("\u8BF7\u5148\u8F93\u5165\u51FA\u9898\u8981\u6C42");return}if(!kr(Gn)&&!(ge!=null&&ge.length)){Ht.ZP.warning("\u8BF7\u4E0A\u4F20\u6750\u6599\u6587\u6863\u6216\u5728\u6587\u672C\u6846\u4E2D\u586B\u5199\u6750\u6599\u5185\u5BB9");return}const Rn=[{name:"\u5355\u9009\u9898",num:zn||0},{name:"\u591A\u9009\u9898",num:An||0},{name:"\u5224\u65AD\u9898",num:un||0},{name:"\u586B\u7A7A\u9898",num:oi||0},{name:"\u7B80\u7B54\u9898",num:Ie||0},{name:"\u7EC4\u5408\u9898",num:Rt||0},{name:"\u7F16\u7A0B\u9898",num:Hn||0},{name:"\u7A0B\u5E8F\u586B\u7A7A\u9898",num:$e||0}],Ct=Rn.reduce((ze,Yn)=>ze+Yn.num,0);if(Ct===0){Ht.ZP.warning("\u8BF7\u8BBE\u7F6E\u51FA\u9898\u6570\u91CF");return}if(Ct>50){Ht.ZP.warning("\u51FA\u9898\u6570\u91CF\u8FBE\u5230\u9650\u5236");return}Cn(!1);const Ci={scene_type:6,request_identifier:Math.random(),file_id:(Qr=(Ei=ge[0])==null?void 0:Ei.response)==null?void 0:Qr.id,content:Gn,count_arr:Rn.map(ze=>ze.num).join(",")};yield _n(Ci),sr()}),_i=()=>zt(void 0,null,function*(){const Ei=ei();if(ae){_e(!1),ae(Ei);return}ii(),Ee(!0),Jt([]);const Qr=new FormData;Qr.append("html",Ei);const Rn=yield(0,nt.ZP)("/api/intelligent_imports/import.json",{method:"post",body:Qr},!0);if((Rn==null?void 0:Rn.status)===0)if(Rn!=null&&Rn.data){Hi(100),Jt(Rn==null?void 0:Rn.data);return}else Ht.ZP.warning("\u672A\u8BC6\u522B\u5230\u8BD5\u9898");Ee(!1),Hi()}),gr=()=>zt(void 0,null,function*(){const Ei=ei();(0,ht.RG)(Ei)}),Mr=["uploading","error"].includes((ne=ge==null?void 0:ge[0])==null?void 0:ne.status);return pt.createElement(pt.Fragment,null,pt.createElement(yt.Z,{visible:en,totalCount:De,usedCount:cn,onCancel:()=>Cn(!1),onOk:or}),pt.createElement(ve.Z,{title:"\u667A\u80FD\u51FA\u9898",extra:pt.createElement("div",{className:he.extraHeader},pt.createElement(Me.Z,{align:"middle"},!xe&&!!Nt&&pt.createElement(pt.Fragment,null,pt.createElement(Ne.op,{onClick:_i,className:"mr15",shape:"default"},"\u4FDD\u5B58\u8BD5\u9898"),pt.createElement(Ne.op,{onClick:gr,shape:"default",type:"text"},pt.createElement("i",{className:"iconfont icon-fuzhi8 mr5 font14"}),"\u590D\u5236")),pt.createElement("i",{onClick:()=>{const Ei=Qr=>{Pe.default.confirm({centered:!0,icon:null,width:500,zIndex:1101,okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",title:"\u63D0\u793A",content:Qr,onOk:()=>{_e(!1)}})};if(xe){Ei("\u6B63\u5728\u751F\u6210\u8BD5\u9898\u4E2D\uFF0C\u786E\u5B9A\u8981\u9000\u51FA\u5417\uFF1F");return}else Nt?Ei("\u8BD5\u9898\u672A\u4FDD\u5B58\uFF0C\u786E\u5B9A\u8981\u9000\u51FA\u5417\uFF1F"):_e(!1)},className:"iconfont icon-guanbi11 current ml15"}))),placement:"bottom",height:"100%",headerStyle:{height:54,borderBottomColor:"#DCDCDC"},bodyStyle:{padding:0},closable:!1,className:"body-overflow-hidden",destroyOnClose:!0,open:nn},pt.createElement("div",{className:he.wrap},pt.createElement("div",{className:he.left},pt.createElement("div",{className:he.tip},pt.createElement("img",{src:Dt}),pt.createElement("span",null,"\u60A8\u597D\uFF01\u6211\u662F\u60A8\u7684\u667A\u80FD\u51FA\u9898\u52A9\u624B\uFF0C\u6211\u5DF2\u5B66\u4E60\u4E86\u5E73\u53F0\u4EE5\u53CA\u4E92\u8054\u7F51\u4E0A\u6D77\u91CF\u7684\u8BD5\u9898\u77E5\u8BC6\u5E93\u3002\u53EF\u4EE5\u6839\u636E\u60A8\u7684\u8981\u6C42\u548C\u4E0A\u4F20\u7684\u6750\u6599\u7075\u6D3B\u751F\u6210\u5404\u7C7B\u8BD5\u9898\u3002\u6B22\u8FCE\u968F\u65F6\u4E0E\u6211\u4E92\u52A8\uFF0C\u8BA9\u6211\u4EEC\u4E00\u8D77\u6253\u9020\u66F4\u9AD8\u6548\u3001\u66F4\u4F18\u8D28\u7684\u8BD5\u9898\uFF01")),pt.createElement("div",{className:"mb10 mt20 c-black"},pt.createElement("b",null,"\u51FA\u9898\u8981\u6C42")),pt.createElement(Ae.default.TextArea,{style:{height:160},className:"mb20",value:Gn,placeholder:"\u8BF7\u5148\u63D0\u4F9B\u60A8\u51FA\u9898\u4F9D\u636E\u7684\u6750\u6599\uFF0C\u53EF\u4EE5\u76F4\u63A5\u590D\u5236\u6750\u6599\u5185\u5BB9\u7C98\u8D34\u5728\u6B64\u533A\u57DF\uFF0C\u4E5F\u53EF\u70B9\u51FB\u4E0B\u65B9\u4E0A\u4F20\u6750\u6599\u6309\u94AE\u4E0A\u4F20\u672C\u5730\u6750\u6599\u6587\u6863",onChange:Ei=>{vn(Ei.target.value)}}),pt.createElement(ee.default,{accept:".doc,.docx,.pdf,.png,.jpg",action:`${He.Z.API_SERVER}/api/attachments.json`,maxCount:1,fileList:ge,withCredentials:!0,data:{upload_type:1},beforeUpload:nr,onChange:({file:Ei})=>{var Qr,Rn;Ei.status!=="removed"&&(Ei.status==="done"&&((Qr=Ei==null?void 0:Ei.response)==null?void 0:Qr.status)!==0&&(Ei.status="error",Ei.response=(Rn=Ei==null?void 0:Ei.response)==null?void 0:Rn.message),Ue([Ei]))},onRemove:()=>Ue([])},pt.createElement(Fe.Z,{title:"\u5355\u6B21\u4EC5\u652F\u6301\u4E0A\u4F201\u4E2A\u6587\u6863\u62161\u5F20\u56FE\u7247\uFF0C\u6587\u6863\u652F\u6301PDF/Word\u683C\u5F0F\uFF0C\u56FE\u7247\u652F\u63011\u5F20\u4E0D\u8D85\u8FC710M\u7684PNG/JPG\u56FE\u7247"},pt.createElement(Ne.op,{style:{borderRadius:2}},pt.createElement("i",{className:"icon-shangchuan3 mr5"}),"\u4E0A\u4F20\u6750\u6599"))),pt.createElement("div",{className:"c-black mt20"},pt.createElement("div",{className:"mb10 c-black"},pt.createElement("b",null,"\u51FA\u9898\u8981\u6C42"),pt.createElement("span",{className:"c-grey-999"},"\uFF08\u4E3A\u4FDD\u8BC1\u51FA\u9898\u4F53\u9A8C\uFF0C\u5355\u6B21\u51FA\u9898\u603B\u6570\u91CF\u4E0D\u80FD\u8D85\u8FC7",pt.createElement("span",{style:{padding:"0 6px",color:"#FB901F"}},"50"),"\u9053\uFF09")),pt.createElement(Me.Z,{style:{gap:16}},pt.createElement(ye.Z,null,pt.createElement("label",null,"\u5355\u9009\u9898"),pt.createElement(de.Z,{min:0,max:10,value:zn,onChange:me,style:{marginLeft:"8px"}})),pt.createElement(ye.Z,null,pt.createElement("label",null,"\u591A\u9009\u9898"),pt.createElement(de.Z,{min:0,max:10,value:An,onChange:ui,style:{marginLeft:"8px"}})),pt.createElement(ye.Z,null,pt.createElement("label",null,"\u5224\u65AD\u9898"),pt.createElement(de.Z,{min:0,max:10,value:un,onChange:ln,style:{marginLeft:"8px"}})),pt.createElement(ye.Z,null,pt.createElement("label",null,"\u586B\u7A7A\u9898"),pt.createElement(de.Z,{min:0,max:10,value:oi,onChange:xn,style:{marginLeft:"8px"}})),pt.createElement(ye.Z,null,pt.createElement("label",null,"\u7B80\u7B54\u9898"),pt.createElement(de.Z,{min:0,max:10,value:Ie,onChange:Ze,style:{marginLeft:"8px"}})),pt.createElement(ye.Z,null,pt.createElement("label",null,"\u7EC4\u5408\u9898"),pt.createElement(de.Z,{min:0,max:10,value:Rt,onChange:bt,style:{marginLeft:"8px"}})),pt.createElement(ye.Z,null,pt.createElement("label",null,"\u7F16\u7A0B\u9898"),pt.createElement(de.Z,{min:0,max:10,value:Hn,onChange:qe,style:{marginLeft:"8px"}})),pt.createElement(ye.Z,null,pt.createElement("label",null,"\u7A0B\u5E8F\u586B\u7A7A\u9898"),pt.createElement(de.Z,{min:0,max:10,value:$e,onChange:Pn,style:{marginLeft:"8px"}})))),xe?pt.createElement("div",{onClick:ni,className:he.bottomBtn},pt.createElement("i",{className:"iconfont icon-tingzhihuida"}),"\u505C\u6B62\u51FA\u9898"):Mr?pt.createElement("div",{className:`${he.bottomBtn} ${he.disabled}`},pt.createElement("i",{className:"iconfont icon-kaishichuti font14"}),"\u5F00\u59CB\u51FA\u9898"):pt.createElement("div",{onClick:()=>{if(De!==-1){Cn(!0);return}or()},className:he.bottomBtn},pt.createElement("i",{className:"iconfont icon-kaishichuti font14"}),"\u5F00\u59CB\u51FA\u9898")),pt.createElement(Lt.Z,{onStatusChange:It,loadingText:"\u8BD5\u9898\u751F\u6210\u4E2D",fetchUrl:"/api/stream/intelligent_imports/stream.json",showEditableToolbar:!Jn,noRestrictModal:er,stringTransformer:et.o,onError:Ei=>{Object.prototype.toString.call(Ei)==="[object Object]"&&Ei.status===-9&&er(Ei.data)}}))),pt.createElement(ve.Z,{placement:"bottom",height:"100%",closable:!1,className:"body-overflow-hidden",destroyOnClose:!0,open:ue},pt.createElement(Me.Z,{align:"middle",style:{margin:"8px auto 24px auto",width:1200,fontWeight:600},className:"c-black font18"},pt.createElement("img",{src:Ft(36413),alt:"\u667A\u80FD\u51FA\u9898"}),pt.createElement("span",{className:"ml10"},"\u667A\u80FD\u51FA\u9898")),pt.createElement(kt.Z,{stickyTop:-24,hideWordFeatures:!0,dataSource:qt,isRefreshItemBank:!0,okText:"\u5BFC\u5165\u9898\u5E93",mode:1,onCancel:()=>Ee(!1),onSuccess:()=>{Ee(!1),_e(!1)}}),pt.createElement("div",{style:{height:70}})),hi("\u5904\u7406\u4E2D"))})},27478:function(fn,Bn,Ft){"use strict";var pt=Ft(59301);const Ht=({scrollBoxRef:ve,bottomInspectRef:Me,contentRef:Pe,status:Ae,rootMargin:ee="70px",bottomOffset:Fe=110})=>{const[ye,de]=(0,pt.useState)(!0),he=(0,pt.useRef)(!1);return(0,pt.useEffect)(()=>{if(!ve.current||!Me.current)return;const Ne=new IntersectionObserver(([He])=>{var kt,nt,et,ht;if(!document.contains(He.target)){console.log("\u76EE\u6807\u5143\u7D20\u5DF2\u4ECE DOM \u79FB\u9664");return}if(((kt=He.rootBounds)==null?void 0:kt.width)===0&&((nt=He.rootBounds)==null?void 0:nt.height)===0){console.log("root\uFF08\u6EDA\u52A8\u5BB9\u5668\uFF09\u65E0\u6548\uFF0C\u53EF\u80FD\u5DF2\u88AB\u79FB\u9664");return}if(((et=He.boundingClientRect)==null?void 0:et.width)===0&&((ht=He.boundingClientRect)==null?void 0:ht.height)===0){console.log("\u76EE\u6807\u5143\u7D20\u5BBD\u9AD8\u4E3A 0\uFF0C\u53EF\u80FD\u5DF2\u88AB\u79FB\u9664\u6216 display: none");return}de(He.isIntersecting)},{root:ve.current,rootMargin:ee,threshold:0});return Ne.observe(Me.current),()=>{Ne.disconnect()}},[ve.current,Me.current,ee]),(0,pt.useEffect)(()=>{if(!Ae)return;const Ne=ve.current,He=Pe.current;he.current=!1;let kt=Ne.scrollTop;const nt=()=>{const{scrollTop:ht,scrollHeight:lt,clientHeight:gt}=Ne;ht>kt?ht+gt>=lt-Fe&&(Ne.scrollTop=Ne.scrollHeight,he.current=!1):ht<kt&&(he.current=!0),kt=ht};Ne.addEventListener("scroll",nt);const et=new ResizeObserver(()=>{he.current||(Ne.scrollTop=Ne.scrollHeight)});return et.observe(He),()=>{setTimeout(()=>{et.unobserve(He)},250),Ne.removeEventListener("scroll",nt)}},[Ae]),ye};Bn.Z=Ht},36136:function(fn,Bn,Ft){"use strict";var pt=Ft(59301);const Ht=({contentRef:ve,status:Me})=>((0,pt.useEffect)(()=>{!Me&&(ve!=null&&ve.current)&&ve.current.querySelectorAll("code[data-text], mathx[data-text]").forEach(ee=>{ee.tagName.toLowerCase()==="code"?ee.parentElement&&(ee.parentElement.contentEditable="false"):ee.tagName.toLowerCase()==="mathx"&&(ee.contentEditable="false")})},[Me]),(Ae=!1)=>{const ee=he=>{const Ne={"&amp;":"&","&lt;":"<","&gt;":">","&quot;":'"',"&#39;":"'","&nbsp;":" ","&copy;":"\xA9","&reg;":"\xAE","&euro;":"\u20AC"};return he.replace(/&[^;]+;/g,He=>Ne[He]||He)};if(!ve.current)return"";const Fe=ve.current.cloneNode(!0);Fe.querySelectorAll("code[data-text], mathx[data-text]").forEach(he=>{let Ne=he.getAttribute("data-text");he.tagName.toLowerCase()==="code"?Ne=Ne.replace(/```.*\n|\n```/g,""):he.tagName.toLowerCase()==="mathx"&&(Ne=`$$${Ne}$$`);const He=document.createTextNode(Ne);he.parentNode.replaceChild(He,he)}),Ae&&Fe.querySelectorAll('[data-select="disabled"]').forEach(Ne=>{var He;const kt=Ne.textContent||"",nt=document.createTextNode(kt+`
`);(He=Ne.parentNode)==null||He.replaceChild(nt,Ne)});let de=Fe.innerHTML;return Ae||(de=de.replace(/<[^>]*data-select="disabled"[^>]*>.*?<\/[^>]*>/g,"")),de=de.replace(/<p>/g,""),de=de.replace(/<\/p>/g,`
`),de=de.replace(/<br>/g,`
`),de=de.replace(/\r\n/g,`
`),de=de.replace(/<[^>]*>/g,""),de=ee(de),de});Bn.Z=Ht},86106:function(fn,Bn,Ft){"use strict";Ft.d(Bn,{Z:function(){return Ne}});var pt=Ft(59301),Ht=Ft(43418),ve=Ft(95237),Me=Ft(93948),Pe="data:image/png;base64,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",Ae="data:image/png;base64,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",ee="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAGIAAABeCAYAAADYHcHYAAAAAXNSR0IArs4c6QAAIABJREFUeF7tfQmcHFd55//V0cfcl2Z0jKTRZcuWZNmy8SVb8gEmCWD4EWzO9TqBxPjAgV1gs9mwiCQEOzYbCAmbi2OzkHgBQ8Bg8IFlfMnYum0dHml0a6TR3NMzfdXxlv979bprWjOa8cQGsdn6qdXV3TVVr77/+873fV8JvIrtuaOyKZHGu2WIeQjR79rYJ4B9jsTxFa1i9FWc6v8fWkEBMR2KfON5WZeowofqq/HJZEK2ubZA0gGSLqBOIDHmODjm2NjvF7FfSuyxLXSFQJddj+5lQhSmc51/z8dMCcQLp+S6gyfxN2EoVyKMCC8ASwCODSQc/UoloMBJuQLJBOA6gAwghYUh28YRKdHle+gMJfbaEvsTSRzsqsKpa4Xw/z0DYO59SiAe2S/n945gt5CyRkQA8J1/aN7HnYzHWIBjaYDINYZ7CFLCBWwbkCECCQw4Ng76IbrCAHvDAJ0ywH7h4dC//D0GNmwQ4b8XkKYE4m82ypq6OpwSUqbHAWHAIKViwEQfNf2i76Usk5MguREnGYAITtIRcF3NaX4Az7LRIwQOegG6ZIDdvsA+FNBVTODIJU1i+P81gKYE4ivPyFonhVMCMmVFXEBikcj8XAIhtq92Y2dWuxVXMh8JEnHiZwMSxZoSeS6QsAHXFXAcTfogQE5Y6IaFrmIB+2WIvaGFfWEBXY6N45fMFdlfR5CmBIKKumjLU5ZEkgAocSSAhBUokeOHQr30pBclcRUnfuVF4iCViBZxjWEevo/jJAHYjuYmA5QbcRG/DwJQhWWEwFEaCYUCOiGwp+DhgO2ia3AIJ29eIYpnK0hTAvF3m2W9HaJHSJk0oqnO9bCm3UIqaStieYFEwZPIeUC2CGTVvkAhoJgRJBBERP34BUtcMQF1FCAxcBTnSEVshHznK9SHcIJYEUAEiSIu4UaizuJkQRhKDMHCYeojr4DO0MIeP8B+q4hD2IXem28Wwa8SpCmB+MuNsqEqhR5AJhRHAFjaWMR5c5KGTqeNX59UKmIRpLwBSQFVBskjJyli678wnBLnBMMZpfcYGDKE0vi8Dt8Dfg4V4dV7CKGtu8hoSNCyS2iRR7CEBokA9ELgEIGh0QCgU9rY7+Rw6P2rMAQhYlru9YFrSiC+/LRslJbsKeRDt7VGKmLVp0LMaXBQlQDSCYGELZR8jxNwsuFWgkROykacNKa4Ccj7BFAglAKSf2A4IwJBcUb8ZQAhCCVAhAYm4hzzPbmIf0sQlNFAcFwgldQgJZMaKN5nGKIgLJy0LRwIfAXSHsfBPoo+L8SxDy4XmdcKlimB+B/PySbhyZ4Xdxcd8jd9BxK/OgnUpIC6KqChWqC5Wqj32qRAdUqgigA5AnZ0helMqRJIIeCFmpMIzmgBGC1C7ROogh/pJQMGxVVEYEP8IBwPhAEkDqDhMn5nRB+Z0xYSDi05F0gnJdJJoIr3lCJgmsssIKucWAv7gyK6HIE9wsJ+IXAgPR/HrxUi/2pAmhKI+zfKFgmceHF3zplbz1kaYmhMYqxAvcAboAiSSCUs1KRs1FYJ1BKgNNBYLdBUI9BYbaE+zd+BmqRA0p3yspOKOxLU88lFUgE0kgeGc8BwHsgUgZxnKW5SosmIMbMf+85wVVz0kfN4P/xO6R8pEYQSQcCXVjSWkIpjqnmP1QKNvL9aC401FqrSFugiQWLEtnFUCHQFPp4TAl+9dq7oOxMwU1Lkzx+Ws0QCJ57aOmQvm20jV/Bw/aoa/GDzMG5dX48HXyygs9uDJQRcx4JtW0riExzeBO2pVEKgJiXQUmvhkqUprF1mKw/837oZs1efR+skirrRolTgDGaB/iwwmCNgAtmiQLGkl8xflblBGwj6PGqCKeDKQPh+CC96+b5E0ePnAIEvYVn6PhuqLbTUO2httLFknou5LQ6EJbr9At70xoVi95lF9hkosuER2Zp0cOJ9FwRWb0bi5cNZ9GZdbN43jEC6OHQqh3Q6rWZLGITKOjIed6U4IjDvvKIOb78kidrU5EBM9st0xFulnuJYDNfSqsvkJYZyQP+Yfg3khOIqWnnkJD2hI0AIRBiqCUXCx4HwFAih+s4nt5BryE2h1NZdNNhLz0vjxqtqYDniqRvmWetnDMQfPS7bqiS671wrrYTy6Mrhjbwv0TcS4mh/iP09PvafKOJwX4Ce4QCj+VANRukIggPNIe9a24DfvjSlOOS12uKmrjlnHLRKU7h0XUV3Pa68R66Rinv6xyT6RoGBUXKTxGgeKBRJeAk/CBTxyQ0GGL7zHJyMBoiSPySBt66twRWravqPnMKc2y4R3kT3PSU1NvxIzhYuuj+yVgpaGdFkKaFuPGN+T8uJ04ny+9RwiMO9Pg6e4ivA0X4fvSMB3kGOuDiplHnc256UCyIqGj9EC6GyJRW/qUqOKX2OvPfKPzPcE3cijYVmLFafIClRF6IvI9EzHOLEYIATQwFODQUYGguRK4ZKh/BvKcq04i+PZsm8BH7nxqbeF7vE3A3XThzknBKIP/qJnGMDx/9grRQMO8RNxzgIhiBU5sns8yhms8jUXK+9cGowAlSQ2NEdYs1CR1le09kGMh68IIRtCTD87kQvfrYsikFyW8nCjbRFdOYYAHEQJgOgTDojnk4/b8Tg6gLkgrF8iIHRACcGAjz7SgEv7isoMJTij4axeJ6LW97adHJ7hzVvg5g4kDklNT72kJyXtnDso1dJHdqOOU+8TjwCG4YeasYeRCK/FV6mB/vq/xbVVamSCctjtx8LcMF8Z5zldKZB9I4U1Y3xGONQKtKrSLD2X/S7UGDxswanzHHjxFTMWzfcXQYpAqAivDLR3080iXjtzfsLuP/7gwiDOBAJvO+3mo6+a4m1YMY64pMPy3YrxNG710oVvlbsFxbh5vYg6y6CsOu0Rxzm0Jj9Z7j57QhGj2BvcBeC5jeiPl32mHnYSycCrCIQzpRzQI25L1NU4Fug6WhCJdqWVxPBzIaSf07QNAg6LiaU82bAUWONXPgyR5cBiM/kMwEwmeFgW8Bf/XAYT+/OlWi+ZH4C77yh8eD7l9mLZwzE3d+SC1JpHL7rSso+qcIG9d6zaHCOYbAvg57GD8GRGcwrfh1uYTf8kWN4Kfw4/MZ1aKgCOLBIdSjivXxScwSdvfg2GSwDmWJkv2uCcvYbcaRBKKuaMihxIaMnD0mtjGl61WpPe2VCWBqXCDj9q94mVfKxgVcCwlP9n2cy+Nefj5XE09IFSbz1+sbOW8+1zp0xEHc+KBemEzh01xXamfECIOF1Yg4eB6M0R3Pnoa1qH5zsVnjDx7FNfgqy8VLFCQTBTEDzvvtUgNXtjpL3k26xnwZHiuXAnoo68l9kIkfKwRyuFHr8tBElDbGMSVkCJvKoiYRRrsLoHcNx8VWwShthArbg4d98ahQPbx7T4Etg6cIk3riuYfdt59srZgzER78nO2wbBwkElTWDeH4ANI/9A2rsXghhI/T6UOg/hK34NNCwEnUpvUI3br0iotGeU5ojzghENFrSYnCM7nu0XhFfIYz5KyVOMFqb1yKRDSiG4MZHiHSA8aIVFxjvULGMcj7GBzUtCxZvqkLHVBKWXP9PT2bw2I5cyZRd0pHEuivrt9+10r5oxkDc/qBcnHbRddcVIVIOQxwSBR8QwQBm938ENrLIj6WxI/FZoLoD1QmhQSixelmh8zsDBK0fs51JWwyPemq2qviORTESKW5LhyE4KcgJDDtQbJW38r4iaZw7Sh8jcRUXNRWz3FhYDL9bxn6fnJfVOL++cRRPvpzTpmwILOlI4PJL61786AXOpTMG4iPfk0sY2Lrj8lDZ/rw9xRUcWeEg8kNdGLHXwEk3jQPgtPXsaDbvJUcscOAYbXuGm+JPI4ojNPEpNvhnJM7uYwGO9NOr1Sdg/OqcORbOmcOlPC26yrO3PI11NFdqbolC5ROFjeMOWWkVsQKIiRS2AeKZPXnt4Elg0cIE1lxUu+kTFzlXzhiI274jlyUddL73ghDz6hk61gG1YqAv4vk6/l8arBErFdOcH6kzDEfQ1JzOlsnSamL4PfIbJPBcJ51DHZJXVlykWRkQnN9sYd1yk+dD1IiLnvklcWPEVqQ0NMwGNwNa5JhF36vTOM6kazDmXnhbX31iDC/uLygg6Gt0LExg1cq6jX94sXXdjIG487vyHMvCK2SxmgTQUi1x7eIATdW2Yj3ay5yVKlA2BcsSiF09WkdMBMRE0Ixwyc8AIQRODEps6vQ1Z0A7iyvmOwqozV2eGselSx0snxeFASCQyUl0D4aorwLqq3T0V6mB0gQqx5dKoEQyiSCr4yiaqCTNNsnN0pf46sYsth0sqqgtwViwIIFzzq95/FMXW2+aMRC3f1+e60iV6lKaNe9cUcDitqQ2zyKXXoWNVbylvEBkxkoCc4BUCztPBFi9YGIgJhpkJhvpCNBhA7YeDHCgJ1TO5cr5DlYvdFUkd8cRH8/s1UvSDCi+87KE9j8sgR9uKeJon87MoS/EtRQVJa1lRFigrkqvr1BvlcLjBoiYcrbdaXLEkznsOurp8HkoMX+Bg46lVQ9veIPzlhkDcccD8jwrid2cFdw44961soBFrckYO1ecPlJSiksYClcE0Ur74ECIxa2xmTWFfNKiSYNIZbztUIB9J0NFwLdclES1yi0Bdh728RSB4LEW8N61SW0+C2BwVGLXsQD9mRDDOcaOoskSs7KYCFGb1otbrfUCi9u0hUQctNiVcLlSNMVGTv3az/LY2+2XRNO8dgfzFqa+/yeXOe+YMRC3fUuen0hgl+EIBcSqAjpmJaYa0/jfzcyKYkPT/eNRAhGWrbCTwxI/2x0o0UTduf78BJbPdbCdQOwuKjs37QI3X5HUMSjjD/CCQpvejHkNZiX6M4wey9JCF30kNdlC4DcvstWilgGC3yd54ukA8VQBB04FJY6YPc9G27z0d/7scuumGQPx4QfkSjeFl+JA3LSqgAWvFogpbmAy1T06RtFUNoE5w594OVDKOtK/WDbHVquAP9+vfY5VC2xcstjRSjzSXCYkT8KWIqQaG72g5EulS4ayDORJLJtrlSw0Y4hUV+vJN5kuVCKYHPG0hyP9QYkjWmdbaG51/uWzaxPvmzEQd/2rXEXRHgfi5lUFzG9JTGlBVF50QmJPYTxlRqNYU8yB48x9am+A3mFtOcWjqXMbBa5b6aooQGSh4uFtPkayUokezvLmGoogoCatEx/UkmgkhrQhxVU6rS/K1qBEDa2VKTaK0K8/4+P4INdjtLJubhOoa7K+cc9Vyf8wYyA+8l25Gha2jwPiggLam6ce1FSDns7vGghtvhp/TfkUQuD4gMSRvlCtnVN5L5xlqZdOfoksISHwxMs+Tg5Gvo+5KHWJDZWJYnRDQw0TIgTSSa08SkHByOtuqJ36npUf8SwXx8LScmtjK1BTL756z9XJD84YiA9/R17kOtgaB+LdFxQw9zUGYjLGGCEQVPia+oo4JHzK1dnopy0YGdlhThgpiqInMULRMybVCtzQKDCajxIgositiXIwM2XtClvrmEhRc7+5XhsoZ9oMEH2j0ZJpKNEwC0hVhX//F9ekb5sxEHc+KNdYNrZMBkRJXpZiNdGlYhYJv5me+3b6MEei6KsOaQMv7Jc43KvjXjVpoKFKixvOZpqttH70pWOKNnLgSoo3Emd0RHNFqcTWMMEZ02vaDNFctlz7ISUTXACt9VNzBMf49edCDI5FHBVK1LVIJNLBl+67puruGQNx+/fkxY7A5nFArC5gTuPUg5pq9kz5uwBGRorKFjfhboKwt1uboCrMEtson5mDVJdmCo/Ot6pN6zwsK+YjKCfNZGoYE7UE3HiP2pyeRvLsadwzJ8HXngsxkitfo7ZFwk2En7/v2tTHZwzEHQ/KN9g2XogD8Z7VBbRNY1BTEXo6XDLEFToTioiiqpzrxUCo3KrhLJS4GcnqRDSVa1Uhaqg/6LDRcaPYYe5VVZIZ5pprSglmsXCGMQCMM0GfZO407/nrz0pkCmbtGqhtCeEm5Wf/Yn3yj2cMxJ3fkZdZDp5/PYCYCij+TiDooZY3E57WMOpFHk15HsZsjAwTziKAuG+4xwCvwhVCZ/IxK7GmCqiJwGHaJb1xoxvMdbmO1d5UlgLxEVVOqK8+wwzFaN1aaiCsZPCZ+9enN8wYiNsflJc7NjbFgXjvhQXManhtRdNk3DE4XBgHBAmQLWgicpbG5Xg5ThSxRKQLaO4yXTOT1ZyTyWqnjgHLuOnLMaiU0pTAuR3WuFVEArGg2T2jD6HGIoF/fDpUE0LppBCoaw1hJYI/vn99+rMzBuKOb8srbRfPqsXwyK5+70UREGeK8k1nuk9DNg0QCGYQRzN/5xHgSJ8mGE1PKmwG8yhumAbJJVhyCZd01XhpacVFTsRHjCAztzabB0aZu5TlvkSxqDPJz19qo7Zah/15bSrwhTGOiN9e/Dbolf/D0zSpyxHf+jYJy/Y/cd+1VffPGIi7HpRrYeOZMCo5pE3/vouKaKl/9Q5d5SCmgQMIBDPpItcAPcNA5wlaO7o4Ja4PKG5oTREQOmu1VUB1WhdXMtqr9YGu14iDo8elf/dVxJSp/BrQSOrBVUBMHuIw90IQ/+7JAMUSvYDGuRLCDT92/7rUF2YMxO3fllfbLp4K/bLyef+aIpqnYcpNhymmOoYhjrGcvqv4ApynTE+tDyhuaKWM5aEIEBlZpVNThBEMZnRXk3PSQCqllTX9EOO4jTPFI04wC1xM1e1onhoIxrK+/ISvYlpmZbC5nYGx8PbPr0v97YyBuPNBuU5Y8mdBhDBv8gMXF9Fc99rqiMkGSCKRI5hnqpJ+PZ3eqPUBRVC0CS7jaqtprKABoi5g3IjKmtwzTpxEBSxMs1cp91VC6QbqHpq6hkeUHwkojpgOEEVf4q8fZwhcX43jb+2wIOzgQ/evT39lxkB8+NvyGtuRGxUQUab0LZd4aKr7t4umEg2nYouK3wmEAabghWq1UFcI6a0YAAdP+qirtlFfY8GxLR3Uo4mbDZHNATkqa70KO25juD6ZEFiy0FbFK68WCOqGL/yESXHRkqwE5i51YLvBLX9xdfp/zxyIb3nX2Y79U5/KJ8rtvPVSH42/JI6YDkbUW8xRpSXUOxLiiR1jeHJnTqd7OvQdLDTX22htctDW6KClgXUctjJhCyyAYcQ1FyKX42etI5Z22Kiv1cr61XAES9M+/6O8spZMvGrh8gSEI997/7rkAzMG4rZvy+ttSz6ugdBFKb9zeYDGaQTApkPE1+oYzuR/edpDV48OblCMFbwA+aKPfDFAoRgoLlI+iQGomgCxlsFBW5Ot6hpq0uSgqHNCxGI8HwsIF06gIyoNDsav7v0+K4z1xOW2dGUKluXffN81Vd+eORDf8t4kLPvRwCuHdT90ZYiGipDwVJZsPKsiEsCvCQa87t6j2krZdjBU6wn0G1RydmRSGWLRQycYJYAKgdqPA5R0LVUJRFDaGm3MbiRANlpqbSybrcUxOWYysTqcDfHnD45GAS/tfJ6/phrClu+4f13y+zMG4vcfkDcIO3zEJxBRGdNtV0nUT5MjyEG9owFYS8F817QrVH4Us0HscXlI0RCnY9PG7oay/uHNvl7cj1J2VJVplGnCHCwqcL4bi6oSIK1zyDWh4qACX1EhiuEglqa11FmY1+xgwSxXveY02WiqtXVCdbTANDAa4k+/NVICgkNdfVktLIRvu+/a1A8nBWLjrvxSO5G4/0hf0D6YCTuHRr0Xxwpy21gOu770u7W9v/dN783CsX7iedHSXyBxx3pMG4gTGR+nMoFewNFiU226V4dAmq+Epd4JFO3907CIf2EcBwAtKaGyCRlzIif0j7LARKrIJ0PeusavXKTP/RJArF4lQIFOCTI12/G5oQDyNNdQvGmQQlUmQIB4bFWSANklgKiPHngmq2tFou0NV9VDiPDN961PPTo5EHvyb3Ud5yFekDOp6FsYKwoMZPziSEEc6MuE/YMFrKUlwmgnk8vufiPZd3rmaxyIyQZhZKlSrqoFkeacKnIPC9dVYtl4ePhxVjpyuWJy0RzGsRqABrgGkZEqiYBhbnKGAijKzVUmMjnI11mMhoOMiOO4jT/BS7EoheIsT4AKBIdg6e8Ink5a0AtZjFt1LK3C6GjwyZ7D3nfz1X1Hd21YcVoHBPHE7vxv2bbzoyKVGeuSYzlKPBFnilpsHwtVFkT/WIiFLQLtLa5ScFwrZiuGUoJvBbUpmrqHfWQKoTp/nOhnUhKGe0h+5ZBF4KRdqyTeWqvK085gcZquir4oARRI1R2BEVsCNBBxEAEysafJACIHEcQzAVSkDoq4h1xUVDqIaSw2hModxaAQzn6EwV4ZhjtDS2zftu+pJ8VPd+V/U1jOw9qq0IXmpprfJOnSFFMzJtAD4WIKa+SyhVCtDbO0ddFsB+cvOHOWA01MzrqcKnIPld6gfU9xYRT4VCrCAMkFoKsWpEpBuImMhZKPEA+7VqBvACKx6Agy3Ybg8GUSCUj4OAeVdJAvVXG+4SB60+Ze4hxkHNK4BUd681hhqeS4/yV+ssP7DcsRP9ZAsLKSxeamzpjcECobnaW7WnTpGWGy+3TEksAEuOkqVqVMblFMxAHkGNUmIgKIIOVZQhvdvBELlX9LT3ftgpTO5DCqpwKNCS25mI4pnTM60Chxdc3onIw9KYCyWvcQIO5T7Jn0G5M9yr8n7ZSIiwwEijoeZywtAxDv+2jPKDI5j5m6OfHj7d6bhS1+QjYyQJhc1qbqUAXQMtkQOw4XMJQVmNucQiDLBeVadNCZCvDba9PjlBRvqD8bKKuJx9FaouznilnKsVTYgLI/TrASAULNLQQm54Xq3XjQPC9zmq4kEBXpLZWecomiZ5KDcSCjiXTaeaJwhSG64SAaBUq8ZUO1BqLC61F4wxzLCcyJy/EzJsZyYl4mm/dxsHuYHJEX/7ol/2bHcX6irQFtQQR+Fq+ctHDL+ho015q4C9eLc3hwUxbntNcoMPTk0sppJOvj3esIRJklqLj29OhCE7PFdYSS/XYETiT7qawnS1DmLOLNMHzN96WMhkbIVc7+Sf2aOEeYfcMRMU4Yh1vsZGY3LkKV9x2Ng+NiOJ213OQg6lZyEEuEzXZsQLe2yBV8HDgeAfHtzd4NjiUeIRBKxgUSb5v7Xfztz5fDbTgXcxt1BejqhbZKO3lsxxg27vKwaHZVRGAdqx8c9fG+a9PjrBvqmM5eT83siVyG+M0agGj20YultaS4x7UUJzGN3yQeG9FRkxjPTSXumIjFpuKImFKfVKRNcI7TdFoc1Miv4b3RGHh0p6cixmwcMDAWB8LKiW88m7/BdR0FBOVYS6IHb5nzEF48MRs/PfVbivhUKhQFb1njqnj/H3ylFysX1Uc1Czoy2Tfi4QPXVY3jCI6b8p/iiQqest+Ivclk/0TgEMSy32GpOg2ats1p5tPEMu+myEgvLV5EiDEdU1UWxZVFTDSdbjhM4ONUrI+rU0fnNGLWZKDsOhKo3F36OqcB8bUnvTdZrniUNjCtoxW1O3FF87P4p5cuRJ97KRzL0r2QAuD8dhsXdtj4u0eHkPMSpcAZQTo17OGW608HwtxjXPkVIvGSpSfLnhZR9FQdW1EGN9FE5o0SmDe0R+HRcXpCk+80nTyBItdZgiagfvqV4sZWWUDr4/iZnQpovak2SbEJUQkED6ahvbc7wJauSYD48kbvjbYlHgsIhATOrd6F62b9GA++sgZ7iutUxxnTYocZ2NesdPDwllF0nhBoqXOVfiAQ3QNF3PqmauXul8zRScRB5Uxj6KQYtQXS3c9CJc7OxD0E4uJ5lUDE2UNTS5mdE44jxgcRaqcTfvwfmtJ6rvFZCNB5qgDfz6HOHkHacVFV146EY09oUvPcnQTiwCRAfPFR73rLFo/7vrZs6p0BfGDOl3GiMAf3br0ZHXNqlcgiGPOaBNYscfDQzzMYzruoSlglIPYez2H30SyWzklgVUcS589Por3FUR1bTPggfltn8hf4m7I0Ki2niHt4Pk6AS9qTUejEyJOYUTCpTogJ8TjnVPga6mPFIDUQAWYHW5AOjkOEY4A3DFkcwZjfgsMNtyCVKHd2q9Q1BGLbZEDc+1DueifhPh6oqkDOIIF3tn0DLekM/mHfe1C06jGaC5BwLFx7AcWRwNcfG0ZLXTpy4fU68cuHsnhx/5i6fVU7BiZ60dFLYOXCJFYsTGJhq4PqpPaGJzIPp9CnpXOTe8gxbTV0hsafa3LrSf9idIIRlSV6x2Jhygo6DQh9QFIOoTV4Dgm/F/BGAT+LMD+C3tEkji/4Y9SxfqdS70Q3tu9EODEQlpUVn/tB7jrbdX+qgIhmSK0zAiccwUDQjosWcbElULmudTU2DpzwsHV/oIJdJAJnJoHY0TWGrQfHd/rkzZRaNNiWKipZ0OrivPlJLJ/nYmELLTEd8JkJMLSmKjcDRFwBl/YnEFMKkDgqJhOnpGk1IpxaDUEXmvwtsPxRIMjSzlesGw53oSvTgpFzP4NapsdG+bKVYyMQ2yfiCAXEQ941jis2+l6gPdSYl9neHGL1IpYrWaqlaHd/iO0HWQmjQ84kIJd3uc67rWsU2w97kCoBSp9EdRViyRb7ZNg6JuW6FhKurTz1dMpGW4ODjlkOFrdaaG+yVI0bwZ0sdhW/uTgQEwFgJlZlMlKcxsZyMucdD60WRhaKmOVvRo2/HwjGgKAQDdCB9PPwu3+GrfItcJZ/WNUZmq2SO/d1h9hxcAIdQSDue0RWWyK4F1JcFwThOZLL3IGOxBKUhCOVTU+XnovwxqoxfoEBYs+x/PCmvWM3CynXwU5cjdBbIyyrRik2i70AmTXBpC0LiQRj+BEgLgGyVA21bQuVt8oahwXNFtobdYIxjYGJgDFAxGe83o//f7rAI3EbZZeaKKPWHORlVWlJtHS0EMq5FX4/lljPwvV6AT8DhKz7okK2kT8Ons1RAAAPKUlEQVS0EbuxFoWqc3A4sR5L59SrnoZmCGoUMWQJxEsHGWmIzNe8jwP0rAlEfJj3PCYXOH6wVlq4XkhxdRCGS6SETUUezw+Nzx7O3nQCOHiqOFjM17b9/W26MdSKO07VhGl/jYVwne26621LXuI6doNpR00wEgTD0dxBjlHh44qQN5V9a53A/CaB+c0Cs2p1I3jeJL3yEifE0JhITxgucGQObeE21IQnVSbImLMUfWIZPKQimpW1dp3/Cpr9LbCDEcDLaE6QFqRfRP7os3i+/g/RXX1dqYhzeatAXcq0UI2oZCw3Pt9hukCMmztSivsezXcIaV8lgDdKWGvDMFwUQljUJ8ZOpxlZlQRODgaDvYNVJSAq52H7x46m51W5q52kfVUqkbzGdXFpwrVmqR5MFjvfEIhYmx9Ta2cmWKQACSQrfjpmCVx/XpSDr0TqeC4w44uDUh12Y7a/CU7IzjEq9Akp0hh1l6NXnIMQeinUlnm0+ZtQ7R3QXECd4BMEAJljGM2F6Dn3Xrw01IpRJhurPrMS5822UJc83ds3jEEdMSFHiAqOOJ2Jy99s2LDBqrv8DxdLKa8Stns9INYKGXS4NkTSDTGaQ/fw88n50+1wv2LDrsTi+nkrE659VSKRusaycJllhXOV7lEVQsZymdjQpSP1sd9IRKGTMgjjAIiK4S0RYpa/DY3+LgjJUChXhgL2dADsNEK7DgNYhp1jS3Bu3QDaik/D8fsiLsgCvqcUs+x/Gf31N6B//h2ES9WMMwNdmfd0hglEeuLx8tvXBIhKkDZIabX8tLA06VpX16St63L54Hu/uy75nTOBeabfrtkgnYUdxXMzI/mPC2Hdmk7acFzdMdPM6vgt0nH86JsTSv9MZrLSIdzXPYLrmjaijs2cdTG4fhlzwk4DThqBVYMs6lHjH4IIyAFjmgtofBQzGOs/gi31H0drxxvUgDgW9p7K5A0QEivn2qpwZqKNE2tS0STssYn/aqbUfA3+7spPdd8tLOuLJJbr2EinHFSlXaSSjtIlZqOl9tHfSCog4lbKOFHkHUBr/gkkMQqEnNW6hYAMfOS7tyAxfx1sdnZz2NOI5g4XYjz9Ilg8fKwbRzO1eDZ9N+xEHVbPtUqW5Y5jAUZiomlVu42marb40lucuARif3eInRMp67MRiKsIhGN/kbPXWGZK3Aj287NATkmnXNRVO/jEjSllHmu7vbwJ6aO1uAmNxa1AWACCohZHTDAe60Wm9yD6zrsfeasR54x8Fa5qwR+BIViypZvP+0OHsSV3JXbZN6iTV7nAmnZbN50HsOWIr5IUjGi6cKGN5ppY1kAMjDhHnFLLs0DOWE1nIxDrN5y8W9jWFyWBUNOqXE0an2W0pu773eZSlrcRYYlgAHOzP0Iq6I5md0Q2Nt7t245BzEffuX8KadXg+JBEcWAvbmj4MSy3GnBSbLgB6eWQH+nD7vS78cKpdtXGTgGREHhDh44lkbAvdPlqOVVnh0hcvMhRKTfxzXjpPL4zsppOB8I6+0TTO7/Yv2EoE35aUDRMAgK/JxD33tKofA/jiPK9MbsJs4e+A3BmU9xYKcUuxe5n8Zz8j2i78D0lkcF+ta/0hFhZ04n1bTvV+nE4ehJDxVr0ttyEU9kUth/RMTgSm8WSly11Sik6mzo9lYRA055ccclSB231ZSCMaFJgRDqCoumsBuKhbrkcAT63dXfhxqc3j1gqfUb9M++RPRRZU/Ql/uwDjeWqoZJglph//POo9o8AySbAG0HviUN4yL4HudRiXHd+2eRlP9rOE5pjLmrej2WpfQhSC5CpXq2If2okxJaDfslgoI+wdrlbAuLp3UW1CkegqX4uO8fF7MaJgaA1aDzrsxKIR07KVhngU0GIDxU8pF7qzOP57Vkt++MKz3S4jJoj8kEdf/K+hpJo0kdrNGx/AItPfB6hl8HRbBt+WPwDZP2EKmB802pNSFJ3XzeBiGY8gLlNNi5exPZH+mwnB0O82GWAkCr8sn5FQtdfCOBnLxXBzD5uBOKK5a46h9lKYimKuXUe1yEOA0RpzdqyR39lVtMjJ2W1HeLuX+SBfaLoodE8fOPl/QW8uDNbaicaF0/xGBGB+O831ynRpCHQMRmGVIqBhcH+fjQ01CCZTCrCc82YCcJtDeUZu+uIj30EIqLCghYLaxaX6+SO9wf4eadX+p1pQ9euKgPxxI4iBjK6momiae35LuY1ayAqxRKH+crZBISU0n7qJN7/i1aVnyn66FDJCuYBHGwR11XA1peZUm9E0jjdp0SVCm+4Av/tXTUlHWFAEGA4RqrOxEOjITJ5i7Ec1FfbmFVvqaVf05eJi/xs1cDEORK0tcHCRYvKQBztDbDpFaa76K2p1sL1F+o+UBzeY9s0EEY0Xb3CRXuLXr6NA0GxZIDYfjZwxHMn5fXCxr1egIuLNOujVMfSU1AksPdgEdt253WHzGhqjVspju6Qy5P/9berIyBMG0tyRKBWz7SYYgjDRsG3VFcBNpQfHmNaJHtu8PECAs21Vqk9NnOY4qmdR/sCPLsn6o7DFhB1Fm5YU+aIR7YU0T+iK/LIEVevTGDBrIgjonHy7awB4sUBufIX0fLPeQHe4vkQ5qknShwZMKL9zkNF7NhdKPXeUF5spQCNZNTtv5lGWz1tfmU3mRa7CgweoipLdQ9lJSyM9UKisac3ezURHDZhZ0J0U60ocQ1FHnUBfxscDdE3rNONLl7mlvpH/XhzQXETNx67bkUCC1rLQBgdUQKiWy8MnWIeLnOgTF7T660jtvbKucLGp0Pg1qKHhEpVjD+UKdqPc0TnYQ8790RAxKSt9inGi6nqpMBlyxx0tFqY1WCpRim6QXo87FFWmZWhEHNKHsGSKxK8d1jnIfE07FTA81IkmQePlDL2AOw64uFIr+YyZvatW5VAR5tuphI/twLiF13VqCMmAsKy7Mzroqyf6ZW1VRY+Ztn4T56PevP8H2VvVxC/xBURSPsOedixp1gySyuJX4IioqpSlJJZhGxaYqGtQaK9RWBRq6tKtvSypVHo5VTK0o2bKGEMY3IgHTTWX58aCpX4IaFZmUqHbVadpcqHjaHAlCE2ViFXsZPBREAwOrP3WIht1BEVHPG6ALF1UN5oAX8TSrSbInnThMRwhHmPiybDKRQFh7p9dPcEGB7RuVYTJ6dNNL+BgZEiuvtzKnv83OVprFycwtJmG+11NpiQZiyv8bw1vU8cG5Uzn40xMiaViU2Ttq1RP2OIllw81hIXTVzV3XOcK5y/BCCe7ZFLalLY7RWhFgwVqWKdwczsLT0Zy4ipOJfEHmvGPNKevgAnTwUYHAqirscVRKvAYyBTQM+Azm+c05FC65yEWg2sSVporbEwt9ZGWxXQmGSRTLmBvDnrxPCWy8BKNgS5JuKEnqEQAyNah3BF8YLI8vqVAfHZ74+2tcxKHp/XbNm0SLjoo1b2IlDMKl9JRMV1RrRvuMSIMJVTRRlelOgfCtBDUAZZb61JVskt/SNlIJYtr8KijpRO21SrgVG7bNWIHWBCCSvQGlxGvT3Ma3JU9zJTfzdZeH3cVDAOv+n74fGpXOPFk1HWe39ZHLFho0wli36PlGEdKzOp5OY0U9npxOISKLGnKY5T4AaYiENUblNsnw9TMo8/o9jq6wswMBiikC+DMjBSwIn+HJqbXKy9ol5lI6p6vSh3Vqc/ainOt/6BIh5+cgAneooqort8fvrYR99W+88tTc4az5MXC4FGpeOiJrxTCbG4figp7MiPoGhSsSajIwpBcPBERghhbXvNlfUXng6+GQbyXazC0s9u0yk1fF4bZSlBYWV/XIGf9pjLCTjF6BDNTRoQ/UhM3dBkoD/A4ECAvqEimmdZWLm8OmrsHnvohwEg6nT5/NYRbNo6HBWhOKFt2V8ZSxT+y5F7Fg6SiAcPylSxFqsCgbWOjXWhxKVSYi4TcCo7GVQadZWeNbmCynrnIYY4BIbzSnA9sOXA8CeTvYX+1xwIDuh/Pifn+X74NuGId4dBeKUMkdCPCePz2nQX4rYm/SA9ztS4zpiQQ+h5R2GEOGi0iNRj1yLxYKKwatZHnWlKMj3a4fW7ewp4eOMAegc8tVYOYe2zID/8yhfanzjTjN+4UTotq7DMEsEVlmWvFwKXh4FcwgQU0yKj8nrGd+E7zdeXjjA5LvzTA33W0yOW8/wPPqgfs/m6ABG/mb/amG0XjnOjbTs3eYG8MvTDBOvM+Fw3EoxgtDVZaKpjn1WhRVFciU+wb3SMeTeZdUamx2V7KSjLzjN+iKdeGMbmnboOWgjHg5BfHCoOfab3yytGpxI7lb9LKcXLA2h3gcukwHrHxpW+hxW2LZOqc07MGSVHHOzFse2HcMTzird+6m2pffHzve5AjAPledkuC+HbLVvcXCyGlwehTKgiSp3ticY6C3ObLfUubD6PNBI/MTAIlFHk5pHKkQ9XMgqMtVa6tgAOH8vjx08OYCjjq4ePCCF2ijD8vc4vzX/h1QJwpuM3d4+0VCdrL4bAOsfBVaGPCy1L1pHxgkB+bFmjPWGroF8qEPEb+PzPsvND33m7EM5NRT+83CenqBJZzSmM68xttRUorEJSFa8xQOI+yUScYcAoFkM8sWkIL+3lo2YY+HFyUsp7EM69d/+XROG1BGGic508Kav7Ev5FCctp8+rx0Aox8cPNf2VAxAf9Z49k5yNw3g7bualQDK7wfemy7puFk2TplgYL89psNDZEoLCyKVoVY3gvLqpKCcBcrD+Uw2PPDCEzxpQ99TjXTX4Y/H7XXy14+fUG4NWe/6wAIj7oT/8gu8CXzo1SOjcXPf9yL5Au83IpvsjeLY22AqWpkeFtoatbuTBjArBMo8wF2LhpBK8cyGrrTDgjYeB/+pXt+/4aT14bdZ56taR6fY8/64CI3+5//mZuoXTstwewbvK94DI/IKdE1pctMavJxrzZDurrLGV5DY4E2H+4gF2dY8jmQ139KsVj+Xzx9v1fWtD1+pLy33b2sxqI+K3d+U250Pdz7wiRuMn3/UuDQLpFz1ftgIIw1LXN7G7gk3tYbWT1e2H4yR33tH1NG7Nn9/ZrA0ScjB/8x9zCQijfIWHd5BWDS4t+6KpWC4FAoejl/NB+oFD0/9uWP5914uwmf3l0v5ZAxIn7nr/MdWSRv84vhA1eaO3PZ/Kbnv7cnN5fFwDMOP8vz4/Uk8nae+oAAAAASUVORK5CYII=",Fe={dotLoading:"dotLoading___s6Sh4",showHide:"showHide___Dfprh",progress:"progress___QUpqo"},ye=Ft(59301);const de=["\u6587\u4EF6\u89E3\u6790\u8BFB\u53D6\u4E2D","\u5185\u5BB9\u7406\u89E3\u5206\u6790\u4E2D","\u7ED3\u6784\u5316\u63D0\u53D6\u4E2D"];var Ne=()=>{const[He,kt]=(0,pt.useState)(0),[nt,et]=(0,pt.useState)(!1),[ht,lt]=(0,pt.useState)(!0),gt=(0,pt.useRef)(null);(0,pt.useEffect)(()=>{if(ht)return;const re=()=>{kt(le=>le>=99?(clearInterval(gt.current),99):le+1)};return gt.current=setInterval(re,5e4/99),()=>clearInterval(gt.current)},[ht]);const yt=()=>{kt(0),et(!0),lt(!1)},Lt=(re=0)=>{lt(!0),kt(re),et(!1)},Dt=re=>{const le=re/1048576;let ae;return le<=.3?ae=3:le<=.5?ae=5:le<=1?ae=10:le<=2?ae=20:le<=3?ae=30:le<=10?ae=le*10:ae=100,` \u9884\u8BA1\u5904\u7406\u65F6\u957F\u4E3A${ae}\u5206\u949F\uFF0C\u8BF7\u52FF\u5173\u95ED\u7A97\u53E3`},zt=()=>ye.createElement("span",{className:Fe.dotLoading},ye.createElement("span",null,"."),ye.createElement("span",null,"."),ye.createElement("span",null,"."));return{progress:He,progressOpen:nt,openProgress:yt,closeProgress:Lt,toggleLock:()=>lt(re=>!re),CreateProgressModal:(re=de,le)=>(typeof re=="string"&&(re=[re,re,re]),ye.createElement(Ht.default,{centered:!0,closable:!1,destroyOnClose:!0,zIndex:1200,open:nt,title:null,footer:null,width:500,afterClose:()=>kt(0)},ye.createElement(ve.Z,{align:"middle",className:"mt40 mb20",style:{flexDirection:"column"}},He<=30&&ye.createElement(ye.Fragment,null,ye.createElement("img",{src:Pe,alt:"Step 1"}),ye.createElement("div",{className:"mt20 c-light-primary"},re[0],zt())),He>30&&He<60&&ye.createElement(ye.Fragment,null,ye.createElement("img",{src:Ae,alt:"Step 2"}),ye.createElement("div",{className:"mt20 c-light-primary"},re[1],zt())),He>=60&&ye.createElement(ye.Fragment,null,ye.createElement("img",{src:ee,alt:"Step 3"}),ye.createElement("div",{className:"mt20 c-light-primary"},re[2],zt())),ye.createElement(Me.Z,{className:Fe.progress,status:"active",style:{width:"auto"},size:[300,8],percent:He}),!!le&&ye.createElement("div",{className:"c-grey-999"},Dt(le)))))}}},89498:function(fn,Bn,Ft){"use strict";Ft.d(Bn,{Z:function(){return De}});var pt=Ft(59301),Ht=Ft(38854),ve=Ft(8591),Me=Ft(6848),Pe=Ft(92832),Ae=Ft(3113),ee=Ft(6584),Fe={wrap:"wrap___AasCO",chatContainer:"chatContainer___n6e3E",btnContainer:"btnContainer___yKyVB",btn:"btn___Y_09T",inputContainer:"inputContainer____bM3M",sendBtn:"sendBtn___UHHLj",sendBtnDisabled:"sendBtnDisabled___AoSRc",cancelBtn:"cancelBtn___yql4C",loadingWrp:"loadingWrp___gYLGT","dot-fade":"dot-fade___LruoO"},de=({position:sn,children:cn})=>{const{left:Te=0,top:en=0}=sn||{},[Cn,Gn]=(0,pt.useState)(Te),[vn,zn]=(0,pt.useState)(en),me=(0,pt.useRef)(null),An=()=>{if(me.current){const ui=me.current.offsetWidth,un=me.current.offsetHeight,ln=window.innerWidth,oi=window.innerHeight;let xn=Te,Ie=en;Te+ui>ln&&(xn=ln-ui),xn<0&&(xn=0),en+un>oi&&(Ie=oi-un),Ie<0&&(Ie=0),Gn(xn),zn(Ie)}};return(0,pt.useEffect)(()=>{if(!me.current||!sn)return;const ui=new ResizeObserver(()=>{An()});return ui.observe(me.current),()=>{ui.disconnect()}},[Te,en,sn]),(0,pt.useEffect)(()=>{sn&&An()},[Te,en,sn]),sn?pt.createElement("div",{ref:me,style:{position:"fixed",left:`${Cn}px`,top:`${vn}px`,zIndex:1050}},cn):null},he=Ft(3294),Ne=Ft(56102),He=Ft(24544),kt=Object.defineProperty,nt=Object.defineProperties,et=Object.getOwnPropertyDescriptors,ht=Object.getOwnPropertySymbols,lt=Object.prototype.hasOwnProperty,gt=Object.prototype.propertyIsEnumerable,yt=(sn,cn,Te)=>cn in sn?kt(sn,cn,{enumerable:!0,configurable:!0,writable:!0,value:Te}):sn[cn]=Te,Lt=(sn,cn)=>{for(var Te in cn||(cn={}))lt.call(cn,Te)&&yt(sn,Te,cn[Te]);if(ht)for(var Te of ht(cn))gt.call(cn,Te)&&yt(sn,Te,cn[Te]);return sn},Dt=(sn,cn)=>nt(sn,et(cn)),zt=(sn,cn,Te)=>new Promise((en,Cn)=>{var Gn=me=>{try{zn(Te.next(me))}catch(An){Cn(An)}},vn=me=>{try{zn(Te.throw(me))}catch(An){Cn(An)}},zn=me=>me.done?en(me.value):Promise.resolve(me.value).then(Gn,vn);zn((Te=Te.apply(sn,cn)).next())}),re=({visible:sn,position:cn,selectText:Te,applyRefinedText:en,fetchUrl:Cn,noRestrictModal:Gn})=>{var vn;const[zn,me]=(0,pt.useState)(!1),[An,ui]=(0,pt.useState)([]),[un,ln]=(0,pt.useState)(""),[oi,xn]=(0,pt.useState)(1),[Ie,Ze]=(0,pt.useState)(""),[Hn,qe]=(0,pt.useState)(!1),$e=(0,pt.useRef)(null),[Pn,Rt]=(0,pt.useState)(!1),[bt,Pt]=(0,pt.useState)(0),It=(0,pt.useRef)(!1),Yt=((vn=An==null?void 0:An[(An==null?void 0:An.length)-1])==null?void 0:vn.loading)===!0;(0,pt.useEffect)(()=>{if(sn){xn(1);return}Rt(!1),me(!1),Nt(),Pt(0),ui([]),xn(0)},[sn]);const Nt=()=>{var or,_i;ln(""),Ze(""),(_i=(or=$e.current)==null?void 0:or.cancelRequest)==null||_i.call(or)},xe=(...or)=>zt(void 0,[...or],function*(_i="",gr=An){const Mr=Date.now(),Ei=[...gr,{text:_i,key:Mr,sender:"user",show:!0},{loading:!0,key:Mr,sender:"AI",show:!0}];xn(2),ui(Ei);const Qr=ni(gr),Rn={no_record_times:!0,prompt:_i,history:Qr};$e.current=new He.Z(he.Z.API_SERVER+Cn,Rn),yield new Promise(Ct=>{$e.current.on("data",zi=>{const{chunk:{msg:Ci},full:ze}=zi,Yn=Ci==="error";Rt(!0),Ze(Jn(ze)),ui(Xn=>Xn.map((fi,an)=>an===Xn.length-1?Dt(Lt({},fi),{text:ze,loading:!1,error:Yn}):fi))}),$e.current.on("done",()=>Ct()),$e.current.on("error",zi=>{const Ci="\u62B1\u6B49\uFF0C\u6211\u521A\u521A\u9047\u5230\u4E86\u4E00\u70B9\u95EE\u9898\uFF0C\u6CA1\u80FD\u5B8C\u6210\u60A8\u7684\u8BF7\u6C42\u3002\u8BF7\u60A8\u7A0D\u540E\u518D\u8BD5\u4E00\u6B21\uFF0C\u6216\u8005\u8054\u7CFB\u6280\u672F\u652F\u6301\u5E2E\u5FD9\u89E3\u51B3!";Object.prototype.toString.call(zi)==="[object Object]"&&zi.status===-9&&(xn(1),Gn(zi.data)),ui(ze=>ze.map((Yn,Xn)=>Xn===ze.length-1?Dt(Lt({},Yn),{text:Ci,loading:!1,error:!0}):Yn)),Ct()}),$e.current.on("cancelled",()=>Ct()),$e.current.startStream()}),me(!1)}),_n=or=>{ln(or.target.value)},ni=or=>or.reduce((gr,Mr)=>{if(Mr.sender==="user"){const Ei=or.find(Qr=>Qr.key===Mr.key&&Qr.sender==="AI");Ei&&(Ei!=null&&Ei.text)&&!(Ei!=null&&Ei.error)&&gr.push({question:Mr.text,answer:Ei.text})}return gr},[]),ei=()=>{if(kr)return;const or=Vi("\u6539\u5199");Nt(),me(!0),xe(or)},ii=or=>{if(or.key==="Enter"&&!or.shiftKey){if(or.preventDefault(),It.current||sr)return;ei()}},Hi=()=>{var or,_i;Pt(gr=>gr+1),(_i=(or=$e.current)==null?void 0:or.cancelRequest)==null||_i.call(or),me(!1),Rt(!1)},hi=[{key:"1",label:pt.createElement("span",null," ",pt.createElement("i",{className:"iconfont icon-runse font14 mr10"}),"\u6DA6\u8272 ")},{key:"2",label:pt.createElement("span",null,pt.createElement("i",{className:"iconfont icon-kuoxie font14 mr10"}),"\u6269\u5199")},{key:"3",label:pt.createElement("span",null," ",pt.createElement("i",{className:"iconfont icon-suoxie font14 mr10"}),"\u7F29\u5199")}],Jn=(or="")=>{const _i=["\u7B54\u6848\uFF1A","\u96BE\u5EA6\uFF1A","\u89E3\u6790\uFF1A","\u77E5\u8BC6\u70B9\uFF1A","\u65F6\u95F4\u9650\u5236\uFF08\u79D2\uFF09","\u7F16\u7A0B\u8BED\u8A00\uFF1A","\u5B66\u5458\u521D\u59CB\u4EE3\u7801\uFF1A","\u7A0B\u5E8F\u4EE3\u7801\uFF1A","\u6D4B\u8BD5\u7528\u4F8B\u8F93\u5165\uFF1A","\u6D4B\u8BD5\u7528\u4F8B\u8F93\u51FA\uFF1A"];return Array.from({length:20}).forEach((gr,Mr)=>{_i.push(`\u7B54\u6848${Mr+1}\uFF1A`,`\u6D4B\u8BD5\u7528\u4F8B(${Mr+1})\u8F93\u5165\uFF1A`,`\u6D4B\u8BD5\u7528\u4F8B(${Mr+1})\u8F93\u51FA\uFF1A`)}),_i.forEach(gr=>{const Mr=new RegExp(gr,"g");or=or.replace(Mr,`**${gr}** `)}),or},Vi=or=>or==="\u6539\u5199"?`${un}\uFF0C\u6839\u636E\u4E0A\u8FF0\u8981\u6C42\u6539\u5199\u8FD9\u53E5\u8BDD\uFF0C${Te}\uFF0C\u6839\u636E\u539F\u683C\u5F0F\u8FD4\u56DE\u7ED9\u6211\uFF0C\u4E0D\u8981\u53BB\u6389\u63D0\u793A\u8BED`:`${Te}\uFF0C${or}\u4E0A\u9762\u8FD9\u53E5\u8BDD\uFF0C\u6839\u636E\u539F\u683C\u5F0F\u8FD4\u56DE\u7ED9\u6211\uFF0C\u4E0D\u8981\u53BB\u6389\u63D0\u793A\u8BED`,er=or=>{let _i="";or.key==="1"&&(_i=Vi("\u6DA6\u8272")),or.key==="2"&&(_i=Vi("\u6269\u5199")),or.key==="3"&&(_i=Vi("\u7F29\u5199")),Nt(),me(!0),xe(_i)},nr=()=>{const or=An.splice(An.length-2),{text:_i}=(or==null?void 0:or[0])||{};Nt(),me(!0),xe(_i,An)},sr=zn||Pn,kr=(un==null?void 0:un.trim())==="";return sn?pt.createElement(Ht.Z,{open:kr&&!sr&&(Hn||!Ie),overlayStyle:{minWidth:200},menu:{items:hi,onClick:er}},pt.createElement(de,{position:cn},pt.createElement("div",{className:Fe.wrap},oi===2&&pt.createElement(pt.Fragment,null,pt.createElement("div",{className:Fe.chatContainer},Yt&&pt.createElement("div",{className:Fe.loadingWrp},pt.createElement("span",null,"\u6B63\u5728\u751F\u6210\u4E2D"),pt.createElement("div",{className:"ai-loading"})),Ie&&pt.createElement(ee.Z,{cancelIndex:bt,streamingStatus:zn,loadImage:!1,onFinish:()=>zt(void 0,null,function*(){Pt(0),setTimeout(()=>Rt(!1),0)}),value:Ie})),pt.createElement("div",{className:Fe.btnContainer},pt.createElement("div",{onClick:()=>en(!0,Ie),className:Fe.btn,style:{padding:"0 16px",width:"initial"}},pt.createElement("i",{className:"iconfont icon-tihuan mr10 font14"}),"\u66FF\u6362"),pt.createElement("div",{onClick:()=>en(!1,Ie),className:Fe.btn,style:{padding:"0 16px",width:"initial"}},pt.createElement("i",{className:"iconfont icon-charu mr10 font14"}),"\u63D2\u5165"),pt.createElement(Ne.CopyToClipboard,{text:Ie,onCopy:()=>ve.ZP.success({content:"\u590D\u5236\u6210\u529F",key:"copy"})},pt.createElement(Me.Z,{title:"\u590D\u5236"},pt.createElement("div",{className:Fe.btn,style:{marginLeft:"auto"}},pt.createElement("i",{className:"iconfont icon-fuzhi8 font14"})))),pt.createElement(Me.Z,{title:"\u91CD\u65B0\u751F\u6210"},pt.createElement("div",{onClick:nr,className:Fe.btn},pt.createElement("i",{className:"iciconfontonfot icon-gengxin-genghuan-tihuan font17"}))),pt.createElement(Me.Z,{title:"\u5220\u9664"},pt.createElement("div",{onClick:()=>{xn(1),Nt(),ui([])},className:Fe.btn},pt.createElement("i",{className:"iconfont icon-shanchu14 font14"}))))),pt.createElement("div",{className:Fe.inputContainer},pt.createElement(Pe.default.TextArea,{placeholder:"\u5728\u8FD9\u91CC\u8F93\u5165\u4F60\u7684\u6587\u672C\u4F18\u5316\u5EFA\u8BAE",value:un,bordered:!1,onFocus:()=>qe(!0),onBlur:()=>setTimeout(()=>qe(!1),300),onChange:_n,onPressEnter:ii,onCompositionStart:()=>It.current=!0,onCompositionEnd:()=>It.current=!1}),Pn?pt.createElement("div",{className:`iconfont icon-tingzhihuida ${Fe.cancelBtn}`,onClick:Hi}):pt.createElement(Ae.ZP,{className:kr?Fe.sendBtnDisabled:Fe.sendBtn,icon:pt.createElement("i",{className:"iconfont icon-fasong2 c-white"}),disabled:sr,onClick:ei}))))):pt.createElement(pt.Fragment,null)},le={"hover-line-container":"hover-line-container___kkYQN","hover-line-content":"hover-line-content___ZkD9e","line-button-container":"line-button-container___A79j9",button:"button___X_Iu7"},ae=Object.defineProperty,je=Object.getOwnPropertySymbols,ne=Object.prototype.hasOwnProperty,Le=Object.prototype.propertyIsEnumerable,ue=(sn,cn,Te)=>cn in sn?ae(sn,cn,{enumerable:!0,configurable:!0,writable:!0,value:Te}):sn[cn]=Te,Ee=(sn,cn)=>{for(var Te in cn||(cn={}))ne.call(cn,Te)&&ue(sn,Te,cn[Te]);if(je)for(var Te of je(cn))Le.call(cn,Te)&&ue(sn,Te,cn[Te]);return sn};const ge=sn=>React.createElement("svg",Ee({width:14,height:14,xmlns:"http://www.w3.org/2000/svg"},sn),React.createElement("title",null,"AI\u6539\u5199"),React.createElement("defs",null,React.createElement("linearGradient",{x1:"26.797%",y1:"22.073%",x2:"82.181%",y2:"80.474%",id:"rewrite_svg__a"},React.createElement("stop",{stopColor:"#5C64FF",offset:"0%"}),React.createElement("stop",{stopColor:"#6988F8",offset:"100%"}))),React.createElement("path",{d:"m10.406 4.741.007.015h-.007v-.022.007Zm-.04-.04.855-1.495 1.497-.855-1.496-.855L10.366 0l-.854 1.497-1.497.855 1.496.854.855 1.495ZM3.1 8.442l1.71 3.1 1.603-3.1 3.1-1.71L6.52 5.023l-1.71-3.1-1.71 3.1L0 6.733l3.099 1.709H3.1Zm6.84 3.1 1.069 1.924 1.068-1.924L14 10.473l-1.924-1.069-1.069-1.923L9.94 9.405l-1.924 1.068 1.924 1.07v-.001Z",fill:"url(#rewrite_svg__a)",fillRule:"nonzero"}));var Ue="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTQiIGhlaWdodD0iMTQiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGRlZnM+PGxpbmVhckdyYWRpZW50IHgxPSIyNi43OTclIiB5MT0iMjIuMDczJSIgeDI9IjgyLjE4MSUiIHkyPSI4MC40NzQlIiBpZD0iYSI+PHN0b3Agc3RvcC1jb2xvcj0iIzVDNjRGRiIgb2Zmc2V0PSIwJSIvPjxzdG9wIHN0b3AtY29sb3I9IiM2OTg4RjgiIG9mZnNldD0iMTAwJSIvPjwvbGluZWFyR3JhZGllbnQ+PC9kZWZzPjxwYXRoIGQ9Im0xMC40MDYgNC43NDEuMDA3LjAxNWgtLjAwN3YtLjAyMi4wMDdabS0uMDQtLjA0Ljg1NS0xLjQ5NSAxLjQ5Ny0uODU1LTEuNDk2LS44NTVMMTAuMzY2IDBsLS44NTQgMS40OTctMS40OTcuODU1IDEuNDk2Ljg1NC44NTUgMS40OTVaTTMuMSA4LjQ0MmwxLjcxIDMuMSAxLjYwMy0zLjEgMy4xLTEuNzFMNi41MiA1LjAyM2wtMS43MS0zLjEtMS43MSAzLjFMMCA2LjczM2wzLjA5OSAxLjcwOUgzLjFabTYuODQgMy4xIDEuMDY5IDEuOTI0IDEuMDY4LTEuOTI0TDE0IDEwLjQ3M2wtMS45MjQtMS4wNjktMS4wNjktMS45MjNMOS45NCA5LjQwNWwtMS45MjQgMS4wNjggMS45MjQgMS4wN3YtLjAwMVoiIGZpbGw9InVybCgjYSkiIGZpbGwtcnVsZT0ibm9uemVybyIvPjwvc3ZnPg==",_e=(0,pt.forwardRef)(({initialContent:sn,onButtonClick:cn},Te)=>{const[en,Cn]=(0,pt.useState)(null),[Gn,vn]=(0,pt.useState)(null),[zn,me]=(0,pt.useState)(""),[An,ui]=(0,pt.useState)(null),un=Te,ln=$e=>{const Pn=document.elementFromPoint(10,$e),Rt=document.createRange();let bt=null;const Pt=document.createTreeWalker(un.current,NodeFilter.SHOW_TEXT,{acceptNode:ei=>{const ii=document.createRange();ii.selectNodeContents(ei);const Hi=ii.getBoundingClientRect();return Hi.top<=$e&&Hi.bottom>=$e?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_REJECT}});let It="",Yt,Nt,xe=null,_n=null,ni=null;for(;Yt=Pt.nextNode();){Yt.parentNode.getAttribute("data-select")==="disabled"&&(Nt=!0),It+=Yt.textContent,_n||(_n=Yt),ni=Yt;const ei=document.createRange();ei.selectNodeContents(Yt);const ii=ei.getBoundingClientRect();xe===null&&(xe=ii.top)}if(_n&&ni&&!Nt){const ei=document.createRange();ei.setStart(_n,0),ei.setEnd(ni,ni.textContent.length),ui(ei)}else ui(null);return vn(xe-1),Nt?"":It.trim()};function oi($e){for(;$e.parentElement&&$e.parentElement.tagName.toLowerCase()!=="section";){var Pn=window.getComputedStyle($e.parentElement);if(Pn.pointerEvents==="none")return!0;$e=$e.parentElement}return!1}const xn=$e=>{var Pn,Rt;if(oi($e.target)){vn(-1e6);return}if(((Rt=(Pn=document.getSelection())==null?void 0:Pn.toString)==null?void 0:Rt.call(Pn))!==""){vn(-1e6);return}const bt=ln($e.clientY);if((bt==null?void 0:bt.trim())===""){vn(-1e6);return}const Pt=un.current.getBoundingClientRect();Cn(Pt.left-30),me(bt)},Ie=()=>{},Ze=$e=>{cn&&zn&&cn(zn,$e.clientX,$e.clientY,An)},Hn=()=>{if(An){const $e=window.getSelection();$e.removeAllRanges(),$e.addRange(An)}},qe=()=>{window.getSelection().removeAllRanges()};return(0,pt.useEffect)(()=>{const $e=un.current;return $e.addEventListener("mousemove",xn),$e.addEventListener("mouseleave",Ie),()=>{$e.removeEventListener("mousemove",xn),$e.removeEventListener("mouseleave",Ie),qe()}},[sn]),pt.createElement("div",{className:le["hover-line-container2"]},Gn!==null&&pt.createElement("div",{className:le["line-button-container"],style:{top:Gn,left:en},onMouseEnter:()=>{Hn()},onMouseLeave:()=>{qe(),vn(null),me(""),ui(null)}},pt.createElement("div",{className:le.button,onClick:Ze},pt.createElement("img",{src:Ue}),pt.createElement("span",null,"AI\u6539\u5199"))))}),qt={toolbar:"toolbar___qYQBF","chat-dialog":"chat-dialog___AUJYU",button:"button___VhNes"},De=({nodeRef:sn,noRestrictModal:cn})=>{const[Te,en]=(0,pt.useState)(null),[Cn,Gn]=(0,pt.useState)(null),[vn,zn]=(0,pt.useState)(!1),[me,An]=(0,pt.useState)(null),[ui,un]=(0,pt.useState)(!1),[ln,oi]=(0,pt.useState)(!1),xn=sn,Ie=(0,pt.useRef)(null),Ze=(0,pt.useRef)(null),[Hn,qe]=(0,pt.useState)("");(0,pt.useEffect)(()=>{Te!=null&&Te.toString()&&qe(Te==null?void 0:Te.toString())},[Te==null?void 0:Te.toString()]);const $e=()=>{const Pt=window.getSelection(),It=xn.current.scrollTop,Yt=xn.current.getBoundingClientRect();if(Pt.rangeCount>0&&Pt.toString().length>0){const Nt=Pt.getRangeAt(0);en(Nt.cloneRange());const xe=Nt.getBoundingClientRect(),_n=40;let ni=xe.top+It-5+_n;ni<It&&(ni=xe.bottom-Yt.top+It+5);const ei=xn.current.scrollHeight-_n;ni=Math.min(Math.max(ni,It),ei),Gn({top:ni+6,left:xe.left})}else en(null),Gn(null),zn(!1);Pn(Pt)},Pn=Pt=>{if(!Pt||Pt.rangeCount===0){un(!1);return}const Yt=Pt.getRangeAt(0).getBoundingClientRect(),Nt=window.getComputedStyle(xn.current),xe=parseInt(Nt.lineHeight),_n=parseInt(Nt.paddingTop),ni=xn.current.scrollTop,ei=xn.current.getBoundingClientRect(),ii=Yt.top-ei.top+ni,Hi=Math.floor((ii-_n)/xe),hi=_n+Hi*xe-ni;An(hi),un(!0)},Rt=Pt=>{xn.current&&!xn.current.contains(Pt.target)&&oi(!1)};(0,pt.useEffect)(()=>{const Pt=xn.current;return Pt.addEventListener("scroll",$e),Pt.addEventListener("input",$e),Pt.addEventListener("click",$e),Pt.addEventListener("mouseup",$e),Pt.addEventListener("keyup",$e),Pt.addEventListener("click",$e),document.addEventListener("mousedown",Rt),()=>{Pt.removeEventListener("scroll",$e),Pt.removeEventListener("input",$e),Pt.removeEventListener("click",$e),Pt.removeEventListener("mouseup",$e),Pt.removeEventListener("keyup",$e),Pt.removeEventListener("click",$e),document.removeEventListener("mousedown",Rt)}},[]);const bt=(Pt=!0,It)=>{if(!Te)return;const Yt=Ze.current.querySelector("section.edu_md").innerHTML.replace(/<p[^>]*>([\s\S]*?)<\/p>/g,"$1"),Nt=Te.cloneRange(),xe=window.getSelection();if(xe.removeAllRanges(),xe.addRange(Nt),Pt){Nt.deleteContents();const _n=document.createElement("div");_n.innerHTML=Yt;const ni=Array.from(_n.childNodes);for(;ni.length>0;)Nt.insertNode(ni.pop())}else{Nt.collapse(!1);const _n=document.createElement("div");_n.innerHTML=" "+Yt;const ni=Array.from(_n.childNodes);for(;ni.length>0;)Nt.insertNode(ni.pop())}xe.removeAllRanges(),en(null),zn(!1),Gn(null)};return pt.createElement("section",{ref:Ze},Cn&&pt.createElement("div",{ref:Ie,className:qt.toolbar,style:{top:Cn==null?void 0:Cn.top,left:Cn==null?void 0:Cn.left}},pt.createElement("div",{className:qt.button,onClick:()=>zn(!0)},pt.createElement("img",{src:Ue}),pt.createElement("span",null,"AI\u6539\u5199"))),pt.createElement(re,{key:JSON.stringify(Cn),noRestrictModal:cn,visible:vn,position:Cn,selectText:Hn,applyRefinedText:bt,fetchUrl:"/api/stream/intelligent_imports/stream.json"}),xn.current&&pt.createElement(_e,{ref:xn,onButtonClick:(Pt,It,Yt,Nt)=>{en(Nt),zn(!0),qe(Pt),Gn({left:It,top:Yt+20})}}))}},88985:function(fn,Bn,Ft){"use strict";Ft.d(Bn,{Z:function(){return Pe}});var pt=Ft(59301),Ht=Ft(43418),ve={num:"num___VQiqB"},Pe=({visible:Ae,usedCount:ee,totalCount:Fe,onOk:ye,onCancel:de})=>{const he=()=>ee>0?pt.createElement("div",null,"\u672C\u6B21\u5C06\u6D88\u80171\u6B21\u5927\u6A21\u578B\u4F7F\u7528\u673A\u4F1A\uFF08\u6BCF\u65E5",Fe,"\u6B21\u673A\u4F1A\uFF0C\u4ECA\u65E5\u5269\u4F59",pt.createElement("span",{className:ve.num},ee),"\u6B21\uFF09\uFF0C\u786E\u5B9A\u64CD\u4F5C\u5417\uFF1F"):pt.createElement("div",{className:"mb20"},"\u4ECA\u65E5\u5927\u6A21\u578B\u4F7F\u7528\u673A\u4F1A\u5DF2\u7528\u5B8C\uFF08\u6BCF\u65E5",Fe,"\u6B21\u673A\u4F1A\uFF0C\u4ECA\u65E5\u5269\u4F59",pt.createElement("span",{className:ve.num},ee),"\u6B21\uFF09\u3002");return pt.createElement(Ht.default,{centered:!0,open:Ae,title:"\u63D0\u793A",width:620,zIndex:1100,onCancel:de,onOk:ye,footer:ee>0?void 0:null},he())}},25355:function(fn,Bn,Ft){"use strict";Ft.d(Bn,{Z:function(){return et},Q:function(){return kt}});var pt=Ft(59301),Ht={container:"container___DAVRd",katex:"katex___oS9Qs",liWrap:"liWrap___pAkIe",backBottom:"backBottom___kT237",imgBox:"imgBox___O8q6M"},ve=Ft(24544),Me=Ft(3294),Pe=Ft(6584),Ae=Ft(89498),ee=Ft(27478),Fe=Ft(53630),ye="data:image/png;base64,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",de=Ft(92310),he=Ft.n(de),Ne=Ft(8591),He=(ht,lt,gt)=>new Promise((yt,Lt)=>{var Dt=re=>{try{Xt(gt.next(re))}catch(le){Lt(le)}},zt=re=>{try{Xt(gt.throw(re))}catch(le){Lt(le)}},Xt=re=>re.done?yt(re.value):Promise.resolve(re.value).then(Dt,zt);Xt((gt=gt.apply(ht,lt)).next())});const kt={contentRef:{current:null},value:null,status:!1,open:()=>He(void 0,null,function*(){}),close:()=>{}};var et=({className:ht,style:lt,onChange:gt,onSuccess:yt,onCancel:Lt,onError:Dt,fetchUrl:zt,noRestrictModal:Xt=()=>{},showEditableToolbar:re,bottomOffset:le=110,loadingText:ae,showEmptyData:je=!0,onStatusChange:ne,stringTransformer:Le,bottomContainerNode:ue})=>{const[Ee,ge]=(0,pt.useState)(!1),[Ue,nn]=(0,pt.useState)(""),[_e,qt]=(0,pt.useState)(0),[Jt,De]=(0,pt.useState)(!1),sn=(0,pt.useRef)(null),cn=(0,pt.useRef)(null),Te=(0,pt.useRef)(null),en=(0,pt.useRef)(null),Cn=(0,ee.Z)({scrollBoxRef:en,bottomInspectRef:Te,contentRef:cn,status:Jt,bottomOffset:le}),Gn=Ee||Jt;(0,pt.useEffect)(()=>{gt==null||gt(Ue)},[Ue]),(0,pt.useEffect)(()=>{ne==null||ne({contentRef:cn,status:Gn,value:Ue,open:vn,close:zn})},[Gn,Ue]);const vn=An=>He(void 0,null,function*(){ge(!0),nn(""),qt(0);const ui=zt;An!=null&&An.fetchUrl&&delete An.fetchUrl,sn.current=new ve.Z(`${Me.Z.API_SERVER}${ui}`,An),yield new Promise((un,ln)=>{sn.current.on("data",oi=>{let{chunk:{content:xn,type:Ie}}=oi;De(!0),Ie==="text"&&nn(Ze=>Le?Le(Ze+xn):Ze+xn)}),sn.current.on("done",()=>{un()}),sn.current.on("error",oi=>{Object.prototype.toString.call(oi)==="[object Object]"&&oi.status===-1&&Ne.ZP.warning((oi==null?void 0:oi.message)||""),un(),Dt==null||Dt(oi)}),sn.current.on("cancelled",()=>{un(),Lt==null||Lt()}),sn.current.startStream()}),ge(!1)}),zn=()=>{var An,ui;qt(1),(ui=(An=sn.current)==null?void 0:An.cancelRequest)==null||ui.call(An),ge(!1),De(!1)},me=(0,pt.useMemo)(()=>cn.current?pt.createElement(Ae.Z,{noRestrictModal:Xt,nodeRef:cn}):pt.createElement(pt.Fragment,null),[cn.current]);return pt.createElement(pt.Fragment,null,pt.createElement("div",{className:he()(Ht.container,ht),style:lt,ref:en},pt.createElement("div",{ref:cn,className:Ht.liWrap,contentEditable:!Gn},Ue&&pt.createElement(Pe.Z,{cancelIndex:_e,streamingStatus:Ee,loadImage:!1,onFinish:()=>He(void 0,null,function*(){qt(0),setTimeout(()=>De(!1),0),yt==null||yt(Ue)}),value:Ue})),!Ue&&!Gn&&pt.createElement("div",{className:Ht.imgBox},pt.createElement("img",{width:56,src:ye}),pt.createElement("span",null,"\u9884\u89C8\u533A")),je&&Gn&&pt.createElement(Fe.Z,{text:ae}),!Cn&&pt.createElement("div",{className:Ht.backBottom,onClick:()=>{en.current.scrollTop=en.current.scrollHeight}},pt.createElement("i",{className:"iconfont icon-huidaodibu"})),pt.createElement("div",{ref:Te}),ue),!Gn&&re&&me)}},53630:function(fn,Bn,Ft){"use strict";Ft.d(Bn,{Z:function(){return Me}});var pt=Ft(59301),Ht={loading:"loading___SifAS",dot:"dot___J5R0d","dot-fade":"dot-fade___BPUGC"},Me=({text:Pe})=>pt.createElement("div",null,pt.createElement("div",{className:Ht.loading},pt.createElement("div",{className:Ht.dot}),pt.createElement("div",{className:Ht.dot}),pt.createElement("div",{className:Ht.dot})),!!Pe&&pt.createElement("div",{className:"mt5"},Pe))},2554:function(fn,Bn,Ft){"use strict";Ft.d(Bn,{o:function(){return pt}});const pt=Ht=>(Ht=Ht.replace(new RegExp("(?<!\\*)\\*\\*\\*\\*([^*\\s\\n]+)\\*\\*\\*\\*(?!\\*)","g"),'<h2 data-select="disabled" data-type="title" contenteditable="false" class="c-black">$1</h2>'),Ht=Ht.replace(new RegExp("(?<!\\*)\\*\\*\\*([^*\\s\\n]+)\\*\\*\\*(?!\\*)","g"),`
<h3 data-select="disabled" contenteditable="false" class="c-black font18">$1</h3>
`),Ht)},85786:function(fn,Bn,Ft){"use strict";Ft.d(Bn,{Z:function(){return Me}});var pt=Ft(59301),Ht={digitalLabel:"digitalLabel___tImKs",active:"active___Ck70Q"},Me=({number:Pe,active:Ae,className:ee})=>pt.createElement("div",{className:`${Ht.digitalLabel} ${Ae?Ht.active:""} ${ee}`},Pe)},57647:function(fn,Bn,Ft){"use strict";Ft.d(Bn,{Z:function(){return lt}});var pt=Ft(59301),Ht=Ft(17574),ve={folderWrapper:"folderWrapper___G__0a",folderIcon:"folderIcon___oTG6c"},Me=Ft(73631),Pe=Ft(5623),Ae=Ft(16149),ee=Object.defineProperty,Fe=Object.defineProperties,ye=Object.getOwnPropertyDescriptors,de=Object.getOwnPropertySymbols,he=Object.prototype.hasOwnProperty,Ne=Object.prototype.propertyIsEnumerable,He=(gt,yt,Lt)=>yt in gt?ee(gt,yt,{enumerable:!0,configurable:!0,writable:!0,value:Lt}):gt[yt]=Lt,kt=(gt,yt)=>{for(var Lt in yt||(yt={}))he.call(yt,Lt)&&He(gt,Lt,yt[Lt]);if(de)for(var Lt of de(yt))Ne.call(yt,Lt)&&He(gt,Lt,yt[Lt]);return gt},nt=(gt,yt)=>Fe(gt,ye(yt)),et=(gt,yt,Lt)=>new Promise((Dt,zt)=>{var Xt=ae=>{try{le(Lt.next(ae))}catch(je){zt(je)}},re=ae=>{try{le(Lt.throw(ae))}catch(je){zt(je)}},le=ae=>ae.done?Dt(ae.value):Promise.resolve(ae.value).then(Xt,re);le((Lt=Lt.apply(gt,yt)).next())}),lt=({value:gt,onChange:yt,scrollId:Lt})=>{const[Dt,zt]=(0,pt.useState)([]);(0,pt.useEffect)(()=>{Xt()},[]);const Xt=()=>et(void 0,null,function*(){const Le=yield(0,Ae.NZ)({});if(Le!=null&&Le.data){const ue=[{title:"\u6839\u76EE\u5F55",value:0,key:0,icon:pt.createElement("img",{src:Me,className:ve.folderIcon}),isLeaf:!1,children:re(Le.data||[])}];zt(ue)}}),re=Le=>Le.map(ue=>({title:ue.name,key:ue.group_id,icon:pt.createElement("img",{src:Me,className:ve.folderIcon}),isLeaf:ue.children.length===0,children:re(ue.children)})),le=(Le,ue,Ee)=>Le.map(ge=>ge.key===ue?kt(kt({},ge),Ee):ge.children?nt(kt({},ge),{children:le(ge.children,ue,Ee)}):ge),ae=(Le,ue,Ee)=>Le.map(ge=>{if(ge.key===ue)return nt(kt({},ge),{icon:Ee?pt.createElement("img",{src:Pe,className:ve.folderIcon}):pt.createElement("img",{src:Me,className:ve.folderIcon})});if(ge.children)return nt(kt({},ge),{children:ae(ge.children,ue,Ee)})}),je=(Le,ue)=>{zt(Ee=>ae(Ee,ue.node.key,ue.expanded))},ne=gt?{selectedKeys:gt,defaultExpandedKeys:gt}:{};return Dt.length>0&&pt.createElement("div",{id:Lt||""},pt.createElement(Ht.default,kt({showLine:{showLeafIcon:!1},showIcon:!0,treeData:Dt,className:ve.folderWrapper,onSelect:yt,onExpand:je},ne)))}},32570:function(fn,Bn,Ft){"use strict";Ft.d(Bn,{Z:function(){return Ae}});var pt=Ft(60324),Ht={text:"text___FxbAX",wrap:"wrap___UlBQ1",contact:"contact____pUDq",img:"img___BapAv"},ve=Ft(32637),Me=Ft(59301),Ae=({type:ee,style:Fe})=>{const ye=Me.createElement("div",{className:Ht.wrap,onClick:de=>{de.preventDefault(),de.stopPropagation()}},Me.createElement("p",null,ee==="shixun"||ee==="paths"?"\u5F53\u524D\u5B9E\u8DF5\u9879\u76EE\u662F\u9AD8\u6D88\u8017\u7C7B\u578B\u7684\u5B9E\u9A8C\u3002":"\u5F53\u524D\u8BD5\u5377\u5305\u542B\u9AD8\u6D88\u8017\u7C7B\u578B\u7684\u5B9E\u9A8C\u3002",Me.createElement("br",null),"\u6839\u636E\u5E73\u53F0\u4F7F\u7528\u89C4\u5219\uFF0C\u9700\u8981\u6388\u6743\u624D\u80FD\u4F7F\u7528\u3002",ee==="paths"?"\u53D1\u9001\u5230\u8BFE\u5802":"\u53D1\u5E03","\u4F7F\u7528\u4E4B\u524D\uFF0C\u8BF7\u5148\u8054\u7CFB\u5E73\u53F0\u7BA1\u7406\u5458\u83B7\u53D6\u6388\u6743\u7801\u3002"),Me.createElement("div",{className:Ht.contact},Me.createElement("div",{className:Ht.img},Me.createElement("img",{src:ve,width:"124px",height:"124px"})),Me.createElement("div",{className:"tc font14 mt10",style:{color:"#777A93"}},"\u626B\u4E00\u626B\uFF0C\u83B7\u53D6\u6388\u6743\u7801")));return Me.createElement(pt.Z,{content:ye},Me.createElement("span",{className:Ht.text,style:Fe},"\u9AD8\u6D88\u8017"))}},16406:function(fn,Bn,Ft){"use strict";Ft.d(Bn,{Z:function(){return Pn}});var pt=Ft(59301),Ht={imageDimensions:"imageDimensions___a7crR",img:"img___Kroat",fullWidth:"fullWidth___c492T"},ve=Ft(92310),Me=Ft.n(ve),Pe=Ft(71418);var Ae=function(Rt,bt){return(Ae=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(Pt,It){Pt.__proto__=It}||function(Pt,It){for(var Yt in It)Object.prototype.hasOwnProperty.call(It,Yt)&&(Pt[Yt]=It[Yt])})(Rt,bt)};function ee(Rt,bt){function Pt(){this.constructor=Rt}Ae(Rt,bt),Rt.prototype=bt===null?Object.create(bt):(Pt.prototype=bt.prototype,new Pt)}function Fe(Rt,bt,Pt,It){return new(Pt||(Pt=Promise))(function(Yt,Nt){function xe(ei){try{ni(It.next(ei))}catch(ii){Nt(ii)}}function _n(ei){try{ni(It.throw(ei))}catch(ii){Nt(ii)}}function ni(ei){var ii;ei.done?Yt(ei.value):(ii=ei.value,ii instanceof Pt?ii:new Pt(function(Hi){Hi(ii)})).then(xe,_n)}ni((It=It.apply(Rt,bt||[])).next())})}function ye(Rt,bt){var Pt,It,Yt,Nt,xe={label:0,sent:function(){if(1&Yt[0])throw Yt[1];return Yt[1]},trys:[],ops:[]};return Nt={next:_n(0),throw:_n(1),return:_n(2)},typeof Symbol=="function"&&(Nt[Symbol.iterator]=function(){return this}),Nt;function _n(ni){return function(ei){return function(ii){if(Pt)throw new TypeError("Generator is already executing.");for(;xe;)try{if(Pt=1,It&&(Yt=2&ii[0]?It.return:ii[0]?It.throw||((Yt=It.return)&&Yt.call(It),0):It.next)&&!(Yt=Yt.call(It,ii[1])).done)return Yt;switch(It=0,Yt&&(ii=[2&ii[0],Yt.value]),ii[0]){case 0:case 1:Yt=ii;break;case 4:return xe.label++,{value:ii[1],done:!1};case 5:xe.label++,It=ii[1],ii=[0];continue;case 7:ii=xe.ops.pop(),xe.trys.pop();continue;default:if(Yt=xe.trys,!((Yt=Yt.length>0&&Yt[Yt.length-1])||ii[0]!==6&&ii[0]!==2)){xe=0;continue}if(ii[0]===3&&(!Yt||ii[1]>Yt[0]&&ii[1]<Yt[3])){xe.label=ii[1];break}if(ii[0]===6&&xe.label<Yt[1]){xe.label=Yt[1],Yt=ii;break}if(Yt&&xe.label<Yt[2]){xe.label=Yt[2],xe.ops.push(ii);break}Yt[2]&&xe.ops.pop(),xe.trys.pop();continue}ii=bt.call(Rt,xe)}catch(Hi){ii=[6,Hi],It=0}finally{Pt=Yt=0}if(5&ii[0])throw ii[1];return{value:ii[0]?ii[1]:void 0,done:!0}}([ni,ei])}}}function de(){for(var Rt=0,bt=0,Pt=arguments.length;bt<Pt;bt++)Rt+=arguments[bt].length;var It=Array(Rt),Yt=0;for(bt=0;bt<Pt;bt++)for(var Nt=arguments[bt],xe=0,_n=Nt.length;xe<_n;xe++,Yt++)It[Yt]=Nt[xe];return It}var he=function(){function Rt(){}return Rt.createDefs=function(){return document.createElementNS("http://www.w3.org/2000/svg","defs")},Rt.setAttributes=function(bt,Pt){for(var It=0,Yt=Pt;It<Yt.length;It++){var Nt=Yt[It],xe=Nt[0],_n=Nt[1];bt.setAttribute(xe,_n)}},Rt.createRect=function(bt,Pt,It){var Yt=document.createElementNS("http://www.w3.org/2000/svg","rect");return Yt.setAttribute("width",bt.toString()),Yt.setAttribute("height",Pt.toString()),It&&Rt.setAttributes(Yt,It),Yt},Rt.createLine=function(bt,Pt,It,Yt,Nt){var xe=document.createElementNS("http://www.w3.org/2000/svg","line");return xe.setAttribute("x1",bt.toString()),xe.setAttribute("y1",Pt.toString()),xe.setAttribute("x2",It.toString()),xe.setAttribute("y2",Yt.toString()),Nt&&Rt.setAttributes(xe,Nt),xe},Rt.createPolygon=function(bt,Pt){var It=document.createElementNS("http://www.w3.org/2000/svg","polygon");return It.setAttribute("points",bt),Pt&&Rt.setAttributes(It,Pt),It},Rt.createCircle=function(bt,Pt){var It=document.createElementNS("http://www.w3.org/2000/svg","circle");return It.setAttribute("cx",(bt/2).toString()),It.setAttribute("cy",(bt/2).toString()),It.setAttribute("r",bt.toString()),Pt&&Rt.setAttributes(It,Pt),It},Rt.createEllipse=function(bt,Pt,It){var Yt=document.createElementNS("http://www.w3.org/2000/svg","ellipse");return Yt.setAttribute("cx",(bt/2).toString()),Yt.setAttribute("cy",(Pt/2).toString()),Yt.setAttribute("rx",(bt/2).toString()),Yt.setAttribute("ry",(Pt/2).toString()),It&&Rt.setAttributes(Yt,It),Yt},Rt.createGroup=function(bt){var Pt=document.createElementNS("http://www.w3.org/2000/svg","g");return bt&&Rt.setAttributes(Pt,bt),Pt},Rt.createTransform=function(){return document.createElementNS("http://www.w3.org/2000/svg","svg").createSVGTransform()},Rt.createMarker=function(bt,Pt,It,Yt,Nt,xe,_n){var ni=document.createElementNS("http://www.w3.org/2000/svg","marker");return Rt.setAttributes(ni,[["id",bt],["orient",Pt],["markerWidth",It.toString()],["markerHeight",Yt.toString()],["refX",Nt.toString()],["refY",xe.toString()]]),ni.appendChild(_n),ni},Rt.createText=function(bt){var Pt=document.createElementNS("http://www.w3.org/2000/svg","text");return Pt.setAttribute("x","0"),Pt.setAttribute("y","0"),bt&&Rt.setAttributes(Pt,bt),Pt},Rt.createTSpan=function(bt,Pt){var It=document.createElementNS("http://www.w3.org/2000/svg","tspan");return It.textContent=bt,Pt&&Rt.setAttributes(It,Pt),It},Rt.createImage=function(bt){var Pt=document.createElementNS("http://www.w3.org/2000/svg","image");return bt&&Rt.setAttributes(Pt,bt),Pt},Rt.createPoint=function(bt,Pt){var It=document.createElementNS("http://www.w3.org/2000/svg","svg").createSVGPoint();return It.x=bt,It.y=Pt,It},Rt.createPath=function(bt,Pt){var It=document.createElementNS("http://www.w3.org/2000/svg","path");return It.setAttribute("d",bt),Pt&&Rt.setAttributes(It,Pt),It},Rt}(),Ne=function(){function Rt(){}return Rt.addKey=function(bt){Rt.key=bt},Object.defineProperty(Rt,"isLicensed",{get:function(){return!!Rt.key&&new RegExp(/^MJS2-[A-Z][0-9]{3}-[A-Z][0-9]{3}-[0-9]{4}$/,"i").test(Rt.key)},enumerable:!1,configurable:!0}),Rt}(),He=function(){function Rt(){this.naturalSize=!1,this.imageType="image/png",this.markersOnly=!1}return Rt.prototype.rasterize=function(bt,Pt,It){var Yt=this;return new Promise(function(Nt){var xe=It!==void 0?It:document.createElement("canvas");bt===null&&(Yt.markersOnly=!0,Yt.naturalSize=!1);var _n=document.createElementNS("http://www.w3.org/2000/svg","svg");_n.setAttribute("xmlns","http://www.w3.org/2000/svg"),_n.setAttribute("width",Pt.width.baseVal.valueAsString),_n.setAttribute("height",Pt.height.baseVal.valueAsString),_n.setAttribute("viewBox","0 0 "+Pt.viewBox.baseVal.width.toString()+" "+Pt.viewBox.baseVal.height.toString()),_n.innerHTML=Pt.innerHTML,Yt.naturalSize===!0?(_n.width.baseVal.value=bt.naturalWidth,_n.height.baseVal.value=bt.naturalHeight):Yt.width!==void 0&&Yt.height!==void 0&&(_n.width.baseVal.value=Yt.width,_n.height.baseVal.value=Yt.height),xe.width=_n.width.baseVal.value,xe.height=_n.height.baseVal.value;var ni=_n.outerHTML,ei=xe.getContext("2d");Yt.markersOnly!==!0&&ei.drawImage(bt,0,0,xe.width,xe.height);var ii=window.URL,Hi=new Image(xe.width,xe.height);Hi.setAttribute("crossOrigin","anonymous");var hi=new Blob([ni],{type:"image/svg+xml"}),Jn=ii.createObjectURL(hi);Hi.onload=function(){ei.drawImage(Hi,0,0),ii.revokeObjectURL(Jn);var Vi=xe.toDataURL(Yt.imageType,Yt.imageQuality);Nt(Vi)},Hi.src=Jn})},Rt}(),kt=function(){},nt=function(){function Rt(bt){this._classNamePrefixBase="__markerjs2_",this.classes=[],this.rules=[],this.settings=this.defaultSettings,this._classNamePrefix=this._classNamePrefixBase+"_"+bt+"_"}return Object.defineProperty(Rt.prototype,"classNamePrefixBase",{get:function(){return this._classNamePrefixBase},enumerable:!1,configurable:!0}),Object.defineProperty(Rt.prototype,"classNamePrefix",{get:function(){return this._classNamePrefix},enumerable:!1,configurable:!0}),Object.defineProperty(Rt.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(Rt.prototype,"fadeInAnimationClassName",{get:function(){return this.classNamePrefix+"fade_in"},enumerable:!1,configurable:!0}),Object.defineProperty(Rt.prototype,"fadeOutAnimationClassName",{get:function(){return this.classNamePrefix+"fade_out"},enumerable:!1,configurable:!0}),Rt.prototype.addClass=function(bt){return this.styleSheet===void 0&&this.addStyleSheet(),bt.name=""+this.classNamePrefix+bt.localName,this.classes.push(bt),this.styleSheet.sheet.insertRule("."+bt.name+" {"+bt.style+"}",this.styleSheet.sheet.cssRules.length),bt},Rt.prototype.addRule=function(bt){this.styleSheet===void 0&&this.addStyleSheet(),this.rules.push(bt),this.styleSheet.sheet.insertRule(bt.selector+" {"+bt.style+"}",this.styleSheet.sheet.cssRules.length)},Rt.prototype.addStyleSheet=function(){var bt;this.styleSheet=document.createElement("style"),((bt=this.styleSheetRoot)!==null&&bt!==void 0?bt:document.head).appendChild(this.styleSheet),this.addRule(new et("."+this.classNamePrefix+" h3","font-family: sans-serif")),this.addRule(new et("@keyframes "+this.classNamePrefix+"_fade_in_animation_frames",`
from {
opacity: 0;
}
to {
opacity: 1;
}
`)),this.addRule(new et("@keyframes "+this.classNamePrefix+"_fade_out_animation_frames",`
from {
opacity: 1;
}
to {
opacity: 0;
}
`)),this.addClass(new ht("fade_in",`
animation-duration: 0.3s;
animation-name: `+this.classNamePrefix+`_fade_in_animation_frames;
`)),this.addClass(new ht("fade_out",`
animation-duration: 0.3s;
animation-name: `+this.classNamePrefix+`_fade_out_animation_frames;
`))},Rt.prototype.removeStyleSheet=function(){var bt;this.styleSheet&&(((bt=this.styleSheetRoot)!==null&&bt!==void 0?bt:document.head).removeChild(this.styleSheet),this.styleSheet=void 0)},Rt}(),et=function(Rt,bt){this.selector=Rt,this.style=bt},ht=function(Rt,bt){this.localName=Rt,this.style=bt},lt=function(){function Rt(bt,Pt,It,Yt,Nt){this.buttons=[],this.markerButtons=[],this.buttonClickListeners=[],this.markerjsContainer=bt,this.displayMode=Pt,this.markerItems=It,this.uiStyleSettings=Yt,this.styles=Nt,this.addStyles(),this.adjustLayout=this.adjustLayout.bind(this),this.overflowButtonClicked=this.overflowButtonClicked.bind(this),this.setCurrentMarker=this.setCurrentMarker.bind(this)}return Rt.prototype.show=function(bt){var Pt=this;this.uiContainer=document.createElement("div"),this.uiContainer.style.visibility=bt,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(Nt){var xe=document.createElement("div");xe.className=""+Pt.toolbarButtonStyleClass.name,xe.setAttribute("data-type-name",Nt.typeName),xe.innerHTML=Nt.icon,xe.addEventListener("click",function(){Pt.markerToolbarButtonClicked(xe,Nt)}),Pt.buttons.push(xe),Pt.markerButtons.push(xe)}),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 Yt=document.createElement("div");Yt.className=this.toolbarBlockStyleClass.name,Yt.style.whiteSpace="nowrap",Yt.style.display=this.uiStyleSettings.resultButtonBlockVisible!==!1?"":"none",this.uiContainer.appendChild(Yt),this.addActionButton(Yt,'<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(Yt,'<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()},Rt.prototype.addButtonClickListener=function(bt){this.buttonClickListeners.push(bt)},Rt.prototype.removeButtonClickListener=function(bt){this.buttonClickListeners.indexOf(bt)>-1&&this.buttonClickListeners.splice(this.buttonClickListeners.indexOf(bt),1)},Rt.prototype.setSelectMode=function(){this.resetButtonStyles(),this.setActiveButton(this.buttons[0])},Rt.prototype.adjustLayout=function(){if(this.markerButtons&&this.markerButtons.length>0){var bt=Math.floor(this.markerButtonBlock.clientWidth/this.uiStyleSettings.toolbarHeight)-1;this.markerButtonBlock.innerHTML="",this.markerButtonOverflowBlock.innerHTML="";for(var Pt=0;Pt<this.markerButtons.length;Pt++)Pt<bt||Pt===bt&&this.markerButtons.length-1===bt?this.markerButtonBlock.appendChild(this.markerButtons[Pt]):(Pt===bt&&this.markerButtonBlock.appendChild(this.overflowButton),this.markerButtonOverflowBlock.appendChild(this.markerButtons[Pt]))}},Rt.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")},Rt.prototype.resetButtonStyles=function(){var bt=this;this.buttons.forEach(function(Pt){Pt.className=Pt.className.replace(bt.uiStyleSettings.toolbarButtonStyleColorsClassName?bt.uiStyleSettings.toolbarButtonStyleColorsClassName:bt.toolbarButtonStyleColorsClass.name,"").trim(),Pt.className=Pt.className.replace(bt.uiStyleSettings.toolbarActiveButtonStyleColorsClassName?bt.uiStyleSettings.toolbarActiveButtonStyleColorsClassName:bt.toolbarActiveButtonStyleColorsClass.name,"").trim(),Pt.className+=" "+(bt.uiStyleSettings.toolbarButtonStyleColorsClassName?bt.uiStyleSettings.toolbarButtonStyleColorsClassName:bt.toolbarButtonStyleColorsClass.name)})},Rt.prototype.addActionButton=function(bt,Pt,It){var Yt=this,Nt=document.createElement("div");switch(Nt.className=""+this.toolbarButtonStyleClass.name,Nt.innerHTML=Pt,Nt.setAttribute("data-action",It),Nt.addEventListener("click",function(){Yt.actionToolbarButtonClicked(Nt,It)}),It){case"select":Nt.style.fill=this.uiStyleSettings.selectButtonColor;break;case"delete":case"clear":Nt.style.fill=this.uiStyleSettings.deleteButtonColor;break;case"undo":case"redo":Nt.style.fill=this.uiStyleSettings.selectButtonColor;break;case"render":Nt.style.fill=this.uiStyleSettings.okButtonColor;break;case"close":Nt.style.fill=this.uiStyleSettings.closeButtonColor}bt.appendChild(Nt),this.buttons.push(Nt)},Rt.prototype.addStyles=function(){this.toolbarStyleClass=this.styles.addClass(new ht("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 ht("toolbar_colors",`
background-color: `+this.uiStyleSettings.toolbarBackgroundColor+`;
box-shadow: 0px 3px rgba(33, 33, 33, 0.1);
`)),this.toolbarBlockStyleClass=this.styles.addClass(new ht("toolbar-block",`
display: inline-block;
box-sizing: content-box;
`)),this.toolbarOverflowBlockStyleClass=this.styles.addClass(new ht("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 ht("toolbar-overflow-block_colors",`
background-color: `+this.uiStyleSettings.toolbarBackgroundColor+`;
`));var bt=this.uiStyleSettings.toolbarHeight/4;this.toolbarButtonStyleClass=this.styles.addClass(new ht("toolbar_button",`
display: inline-block;
width: `+(this.uiStyleSettings.toolbarHeight-2*bt)+`px;
height: `+(this.uiStyleSettings.toolbarHeight-2*bt)+`px;
padding: `+bt+`px;
box-sizing: content-box;
`)),this.toolbarButtonStyleColorsClass=this.styles.addClass(new ht("toolbar_button_colors",`
fill: `+this.uiStyleSettings.toolbarColor+`;
`)),this.toolbarActiveButtonStyleColorsClass=this.styles.addClass(new ht("toolbar_active_button",`
fill: `+this.uiStyleSettings.toolbarColor+`;
background-color: `+this.uiStyleSettings.toolbarBackgroundHoverColor+`
`)),this.styles.addRule(new et("."+this.toolbarButtonStyleClass.name+" svg",`
height: `+this.uiStyleSettings.toolbarHeight/2+`px;
`)),this.styles.addRule(new et("."+this.toolbarButtonStyleColorsClass.name+":hover",`
background-color: `+this.uiStyleSettings.toolbarBackgroundHoverColor+`
`))},Rt.prototype.markerToolbarButtonClicked=function(bt,Pt){this.setActiveButton(bt),this.buttonClickListeners&&this.buttonClickListeners.length>0&&this.buttonClickListeners.forEach(function(It){return It("marker",Pt)}),this.markerButtonOverflowBlock.style.display="none"},Rt.prototype.actionToolbarButtonClicked=function(bt,Pt){this.buttonClickListeners&&this.buttonClickListeners.length>0&&this.buttonClickListeners.forEach(function(It){return It("action",Pt)}),this.markerButtonOverflowBlock.style.display="none",this.setActiveButton(this.buttons[0])},Rt.prototype.setActiveButton=function(bt){this.resetButtonStyles(),bt.className=bt.className.replace(this.uiStyleSettings.toolbarButtonStyleColorsClassName?this.uiStyleSettings.toolbarButtonStyleColorsClassName:this.toolbarButtonStyleColorsClass.name,"").trim(),bt.className+=" "+(this.uiStyleSettings.toolbarActiveButtonStyleColorsClassName?this.uiStyleSettings.toolbarActiveButtonStyleColorsClassName:this.toolbarActiveButtonStyleColorsClass.name)},Rt.prototype.setActiveMarkerButton=function(bt){var Pt=this.markerButtons.find(function(It){return It.getAttribute("data-type-name")===bt});Pt&&this.setActiveButton(Pt)},Rt.prototype.setCurrentMarker=function(bt){var Pt=this;this.currentMarker=bt,this.buttons.filter(function(It){return/delete|notes/.test(It.getAttribute("data-action"))}).forEach(function(It){Pt.currentMarker===void 0?(It.style.fillOpacity="0.4",It.style.pointerEvents="none"):(It.style.fillOpacity="1",It.style.pointerEvents="all")})},Rt}(),gt=function(){function Rt(bt,Pt,It,Yt){this.panels=[],this.panelButtons=[],this.markerjsContainer=bt,this.displayMode=Pt,this.uiStyleSettings=It,this.styles=Yt,this.panelButtonClick=this.panelButtonClick.bind(this),this.addStyles()}return Rt.prototype.addStyles=function(){var bt;this.toolboxStyleClass=this.styles.addClass(new ht("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 ht("toolbox_colors",`
color: `+this.uiStyleSettings.toolboxColor+`;
`));var Pt=this.uiStyleSettings.toolbarHeight/4;this.toolboxButtonRowStyleClass=this.styles.addClass(new ht("toolbox-button-row",`
display: flex;
cursor: default;
box-sizing: content-box;
`)),this.toolboxButtonRowStyleColorsClass=this.styles.addClass(new ht("toolbox-button-row_colors",`
background-color: `+this.uiStyleSettings.toolbarBackgroundColor+`;
`)),this.toolboxPanelRowStyleClass=this.styles.addClass(new ht("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 ht("toolbox-panel-row_colors",`
background-color: `+((bt=this.uiStyleSettings.toolboxBackgroundColor)!==null&&bt!==void 0?bt:this.uiStyleSettings.toolbarBackgroundHoverColor)+`;
`)),this.toolboxButtonStyleClass=this.styles.addClass(new ht("toolbox_button",`
display: inline-block;
width: `+(this.uiStyleSettings.toolbarHeight-2*Pt)+`px;
height: `+(this.uiStyleSettings.toolbarHeight-2*Pt)+`px;
padding: `+Pt+`px;
box-sizing: content-box;
`)),this.toolboxButtonStyleColorsClass=this.styles.addClass(new ht("toolbox-button_colors",`
fill: `+this.uiStyleSettings.toolbarColor+`;
`)),this.toolboxActiveButtonStyleColorsClass=this.styles.addClass(new ht("toolbox-active-button_colors",`
background-color: `+this.uiStyleSettings.toolbarBackgroundHoverColor+`;
fill: `+this.uiStyleSettings.toolbarColor+`;
`)),this.styles.addRule(new et("."+this.toolboxButtonStyleColorsClass.name+":hover",`
background-color: `+this.uiStyleSettings.toolbarBackgroundHoverColor+`
`)),this.styles.addRule(new et("."+this.toolboxButtonStyleClass.name+" svg",`
height: `+this.uiStyleSettings.toolbarHeight/2+`px;
`))},Rt.prototype.show=function(bt){var Pt;this.uiContainer=document.createElement("div"),this.uiContainer.style.visibility=bt,this.uiContainer.className=this.toolboxStyleClass.name+" "+((Pt=this.uiStyleSettings.toolboxStyleColorsClassName)!==null&&Pt!==void 0?Pt:this.toolboxStyleColorsClass.name),this.markerjsContainer.appendChild(this.uiContainer)},Rt.prototype.setPanelButtons=function(bt){var Pt,It,Yt=this;this.panels=bt,this.uiContainer!==void 0&&(this.uiContainer.innerHTML="",this.panelRow=document.createElement("div"),this.panelRow.className=this.toolboxPanelRowStyleClass.name+" "+((Pt=this.uiStyleSettings.toolboxPanelRowStyleColorsClassName)!==null&&Pt!==void 0?Pt: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(Nt){var xe;Nt.uiStyleSettings=Yt.uiStyleSettings;var _n=document.createElement("div");_n.className=Yt.toolboxButtonStyleClass.name+" "+((xe=Yt.uiStyleSettings.toolboxButtonStyleColorsClassName)!==null&&xe!==void 0?xe:Yt.toolboxButtonStyleColorsClass.name),_n.innerHTML=Nt.icon,_n.title=Nt.title,_n.addEventListener("click",function(){Yt.panelButtonClick(Nt)}),Yt.panelButtons.push(_n),Yt.buttonRow.appendChild(_n)}),this.displayMode==="inline"?this.panelRow.style.display="none":this.panelRow.style.visibility="hidden")},Rt.prototype.panelButtonClick=function(bt){var Pt=this,It=-1;if(bt!==this.activePanel){It=this.panels.indexOf(bt),this.panelRow.innerHTML="";var Yt=bt.getUi();Yt.style.margin=this.uiStyleSettings.toolbarHeight/4+"px",this.panelRow.appendChild(Yt),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=bt}else this.activePanel=void 0,this.panelRow.className=this.panelRow.className.replace(this.styles.fadeInAnimationClassName,""),this.panelRow.className+=" "+this.styles.fadeOutAnimationClassName,setTimeout(function(){Pt.displayMode==="inline"?Pt.panelRow.style.display="none":Pt.panelRow.style.visibility="hidden"},200);this.panelButtons.forEach(function(Nt,xe){var _n,ni;Nt.className=Pt.toolboxButtonStyleClass.name+" "+(xe===It?""+((_n=Pt.uiStyleSettings.toolboxActiveButtonStyleColorsClassName)!==null&&_n!==void 0?_n:Pt.toolboxActiveButtonStyleColorsClass.name):""+((ni=Pt.uiStyleSettings.toolboxButtonStyleColorsClassName)!==null&&ni!==void 0?ni:Pt.toolboxButtonStyleColorsClass.name))})},Rt}(),yt=function(Rt,bt){this.title=Rt,this.icon=bt},Lt=function(Rt){function bt(Pt,It,Yt,Nt){var xe=Rt.call(this,Pt,Nt||'<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 xe.colors=[],xe.addTransparent=!1,xe.colorBoxes=[],xe.colors=It,xe.currentColor=Yt,xe.setCurrentColor=xe.setCurrentColor.bind(xe),xe.getColorBox=xe.getColorBox.bind(xe),xe}return ee(bt,Rt),bt.prototype.getUi=function(){var Pt=this,It=document.createElement("div");return It.style.overflow="hidden",It.style.whiteSpace="nowrap",this.colors.forEach(function(Yt){var Nt=Pt.getColorBox(Yt);It.appendChild(Nt),Pt.colorBoxes.push(Nt)}),It},bt.prototype.getColorBox=function(Pt){var It=this,Yt=this.uiStyleSettings.toolbarHeight/4,Nt=this.uiStyleSettings.toolbarHeight-Yt,xe=document.createElement("div");xe.style.display="inline-block",xe.style.boxSizing="content-box",xe.style.width=Nt-2+"px",xe.style.height=Nt-2+"px",xe.style.padding="1px",xe.style.marginRight="2px",xe.style.marginBottom="2px",xe.style.borderWidth="2px",xe.style.borderStyle="solid",xe.style.borderRadius=(Nt+2)/2+"px",xe.style.borderColor=Pt===this.currentColor?this.uiStyleSettings.toolboxAccentColor:"transparent",xe.addEventListener("click",function(){It.setCurrentColor(Pt,xe)});var _n=document.createElement("div");return _n.style.display="inline-block",_n.style.width=Nt-2+"px",_n.style.height=Nt-2+"px",_n.style.backgroundColor=Pt,_n.style.borderRadius=Nt/2+"px",Pt==="transparent"&&(_n.style.fill=this.uiStyleSettings.toolboxAccentColor,_n.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>`),xe.appendChild(_n),xe},bt.prototype.setCurrentColor=function(Pt,It){var Yt=this;this.currentColor=Pt,this.colorBoxes.forEach(function(Nt){Nt.style.borderColor=Nt===It?Yt.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onColorChanged&&this.onColorChanged(Pt)},bt}(yt),Dt=function(){function Rt(bt,Pt,It){this._state="new",this._isSelected=!1,this._container=bt,this._overlayContainer=Pt,this.globalSettings=It,this.stateChanged=this.stateChanged.bind(this),this.colorChanged=this.colorChanged.bind(this),this.fillColorChanged=this.fillColorChanged.bind(this)}return Object.defineProperty(Rt.prototype,"typeName",{get:function(){return Object.getPrototypeOf(this).constructor.typeName},enumerable:!1,configurable:!0}),Object.defineProperty(Rt.prototype,"container",{get:function(){return this._container},enumerable:!1,configurable:!0}),Object.defineProperty(Rt.prototype,"overlayContainer",{get:function(){return this._overlayContainer},enumerable:!1,configurable:!0}),Object.defineProperty(Rt.prototype,"state",{get:function(){return this._state},enumerable:!1,configurable:!0}),Object.defineProperty(Rt.prototype,"toolboxPanels",{get:function(){return[]},enumerable:!1,configurable:!0}),Rt.prototype.ownsTarget=function(bt){return!1},Object.defineProperty(Rt.prototype,"isSelected",{get:function(){return this._isSelected},enumerable:!1,configurable:!0}),Rt.prototype.select=function(){this.container.style.cursor="move",this._isSelected=!0,this.manipulationStartState=this.getState()},Rt.prototype.deselect=function(){this.container.style.cursor="default",this._isSelected=!1,this.stateChanged()},Rt.prototype.pointerDown=function(bt,Pt){},Rt.prototype.dblClick=function(bt,Pt){},Rt.prototype.manipulate=function(bt){},Rt.prototype.pointerUp=function(bt){this.stateChanged()},Rt.prototype.dispose=function(){},Rt.prototype.addMarkerVisualToContainer=function(bt){this.container.childNodes.length>0?this.container.insertBefore(bt,this.container.childNodes[0]):this.container.appendChild(bt)},Rt.prototype.getState=function(){return{typeName:Rt.typeName,state:this.state,notes:this.notes}},Rt.prototype.restoreState=function(bt){this._state=bt.state,this.notes=bt.notes},Rt.prototype.scale=function(bt,Pt){},Rt.prototype.colorChanged=function(bt){this.onColorChanged&&this.onColorChanged(bt),this.stateChanged()},Rt.prototype.fillColorChanged=function(bt){this.onFillColorChanged&&this.onFillColorChanged(bt),this.stateChanged()},Rt.prototype.stateChanged=function(){if(this.onStateChanged&&this.state!=="creating"&&this.state!=="new"){var bt=this.getState();this.manipulationStartState!==void 0&&(this.manipulationStartState.state="select"),bt.state="select",JSON.stringify(this.manipulationStartState)!=JSON.stringify(bt)&&this.onStateChanged(this)}},Rt.typeName="MarkerBase",Rt}(),zt=function(){function Rt(){this.findGripByVisual=this.findGripByVisual.bind(this)}return Rt.prototype.findGripByVisual=function(bt){return this.topLeft.ownsTarget(bt)?this.topLeft:this.topCenter.ownsTarget(bt)?this.topCenter:this.topRight.ownsTarget(bt)?this.topRight:this.centerLeft.ownsTarget(bt)?this.centerLeft:this.centerRight.ownsTarget(bt)?this.centerRight:this.bottomLeft.ownsTarget(bt)?this.bottomLeft:this.bottomCenter.ownsTarget(bt)?this.bottomCenter:this.bottomRight.ownsTarget(bt)?this.bottomRight:void 0},Rt}(),Xt=function(){function Rt(){this.GRIP_SIZE=10,this.visual=he.createGroup(),this.visual.appendChild(he.createCircle(1.5*this.GRIP_SIZE,[["fill","transparent"]])),this.visual.appendChild(he.createCircle(this.GRIP_SIZE,[["fill","#cccccc"],["fill-opacity","0.7"],["stroke","#333333"],["stroke-width","2"],["stroke-opacity","0.7"]]))}return Rt.prototype.ownsTarget=function(bt){return bt===this.visual||bt===this.visual.childNodes[0]||bt===this.visual.childNodes[1]},Rt}(),re=function(){function Rt(){}return Rt.toITransformMatrix=function(bt){return{a:bt.a,b:bt.b,c:bt.c,d:bt.d,e:bt.e,f:bt.f}},Rt.toSVGMatrix=function(bt,Pt){return bt.a=Pt.a,bt.b=Pt.b,bt.c=Pt.c,bt.d=Pt.d,bt.e=Pt.e,bt.f=Pt.f,bt},Rt}(),le=function(Rt){function bt(Pt,It,Yt){var Nt=Rt.call(this,Pt,It,Yt)||this;return Nt.left=0,Nt.top=0,Nt.width=0,Nt.height=0,Nt.defaultSize={x:50,y:20},Nt.offsetX=0,Nt.offsetY=0,Nt.rotationAngle=0,Nt.CB_DISTANCE=10,Nt._suppressMarkerCreateEvent=!1,Nt.container.transform.baseVal.appendItem(he.createTransform()),Nt.setupControlBox(),Nt}return ee(bt,Rt),Object.defineProperty(bt.prototype,"centerX",{get:function(){return this.left+this.width/2},enumerable:!1,configurable:!0}),Object.defineProperty(bt.prototype,"centerY",{get:function(){return this.top+this.height/2},enumerable:!1,configurable:!0}),Object.defineProperty(bt.prototype,"visual",{get:function(){return this._visual},set:function(Pt){this._visual=Pt;var It=he.createTransform();this._visual.transform.baseVal.appendItem(It)},enumerable:!1,configurable:!0}),bt.prototype.ownsTarget=function(Pt){return!!Rt.prototype.ownsTarget.call(this,Pt)||!!(this.controlGrips.findGripByVisual(Pt)!==void 0||this.rotatorGrip!==void 0&&this.rotatorGrip.ownsTarget(Pt))},bt.prototype.pointerDown=function(Pt,It){Rt.prototype.pointerDown.call(this,Pt,It),this.state==="new"&&(this.left=Pt.x,this.top=Pt.y),this.manipulationStartLeft=this.left,this.manipulationStartTop=this.top,this.manipulationStartWidth=this.width,this.manipulationStartHeight=this.height;var Yt=this.unrotatePoint(Pt);if(this.manipulationStartX=Yt.x,this.manipulationStartY=Yt.y,this.offsetX=Yt.x-this.left,this.offsetY=Yt.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 Nt=this.rotatePoint({x:this.centerX,y:this.centerY});this.left=Nt.x-this.width/2,this.top=Nt.y-this.height/2,this.moveVisual({x:this.left,y:this.top});var xe=this.container.transform.baseVal.getItem(0);xe.setRotate(this.rotationAngle,this.centerX,this.centerY),this.container.transform.baseVal.replaceItem(xe,0),this.adjustControlBox(),this._state="rotate"}else this._state="move"},bt.prototype.pointerUp=function(Pt){var It=this.state;Rt.prototype.pointerUp.call(this,Pt),this.state==="creating"&&this.width<10&&this.height<10?(this.width=this.defaultSize.x,this.height=this.defaultSize.y):this.manipulate(Pt),this._state="select",It==="creating"&&this.onMarkerCreated&&this._suppressMarkerCreateEvent===!1&&this.onMarkerCreated(this)},bt.prototype.moveVisual=function(Pt){this.visual.style.transform="translate("+Pt.x+"px, "+Pt.y+"px)"},bt.prototype.manipulate=function(Pt){var It=this.unrotatePoint(Pt);this.state==="creating"?this.resize(Pt):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(Pt)},bt.prototype.resize=function(Pt){var It=this.manipulationStartLeft,Yt=this.manipulationStartWidth,Nt=this.manipulationStartTop,xe=this.manipulationStartHeight;switch(this.activeGrip){case this.controlGrips.bottomLeft:case this.controlGrips.centerLeft:case this.controlGrips.topLeft:It=this.manipulationStartLeft+Pt.x-this.manipulationStartX,Yt=this.manipulationStartWidth+this.manipulationStartLeft-It;break;case this.controlGrips.bottomRight:case this.controlGrips.centerRight:case this.controlGrips.topRight:case void 0:Yt=this.manipulationStartWidth+Pt.x-this.manipulationStartX}switch(this.activeGrip){case this.controlGrips.topCenter:case this.controlGrips.topLeft:case this.controlGrips.topRight:Nt=this.manipulationStartTop+Pt.y-this.manipulationStartY,xe=this.manipulationStartHeight+this.manipulationStartTop-Nt;break;case this.controlGrips.bottomCenter:case this.controlGrips.bottomLeft:case this.controlGrips.bottomRight:case void 0:xe=this.manipulationStartHeight+Pt.y-this.manipulationStartY}Yt>=0?(this.left=It,this.width=Yt):(this.left=It+Yt,this.width=-Yt),xe>=0?(this.top=Nt,this.height=xe):(this.top=Nt+xe,this.height=-xe),this.setSize()},bt.prototype.setSize=function(){this.moveVisual({x:this.left,y:this.top}),this.adjustControlBox()},bt.prototype.rotate=function(Pt){if(Math.abs(Pt.x-this.centerX)>.1){var It=Math.sign(Pt.x-this.centerX);this.rotationAngle=180*Math.atan((Pt.y-this.centerY)/(Pt.x-this.centerX))/Math.PI+90*It,this.applyRotation()}},bt.prototype.applyRotation=function(){var Pt=this.container.transform.baseVal.getItem(0);Pt.setRotate(this.rotationAngle,this.centerX,this.centerY),this.container.transform.baseVal.replaceItem(Pt,0)},bt.prototype.rotatePoint=function(Pt){if(this.rotationAngle===0)return Pt;var It=this.container.getCTM(),Yt=he.createPoint(Pt.x,Pt.y);return{x:(Yt=Yt.matrixTransform(It)).x,y:Yt.y}},bt.prototype.unrotatePoint=function(Pt){if(this.rotationAngle===0)return Pt;var It=this.container.getCTM();It=It.inverse();var Yt=he.createPoint(Pt.x,Pt.y);return{x:(Yt=Yt.matrixTransform(It)).x,y:Yt.y}},bt.prototype.select=function(){Rt.prototype.select.call(this),this.adjustControlBox(),this.controlBox.style.display=""},bt.prototype.deselect=function(){Rt.prototype.deselect.call(this),this.controlBox.style.display="none"},bt.prototype.setupControlBox=function(){this.controlBox=he.createGroup();var Pt=he.createTransform();Pt.setTranslate(-this.CB_DISTANCE/2,-this.CB_DISTANCE/2),this.controlBox.transform.baseVal.appendItem(Pt),this.container.appendChild(this.controlBox),this.controlRect=he.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=he.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 zt,this.addControlGrips(),this.controlBox.style.display="none"},bt.prototype.adjustControlBox=function(){var Pt=this.controlBox.transform.baseVal.getItem(0);Pt.setTranslate(this.left-this.CB_DISTANCE/2,this.top-this.CB_DISTANCE/2),this.controlBox.transform.baseVal.replaceItem(Pt,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()},bt.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()},bt.prototype.createGrip=function(){var Pt=new Xt;return Pt.visual.transform.baseVal.appendItem(he.createTransform()),this.controlBox.appendChild(Pt.visual),Pt},bt.prototype.positionGrips=function(){var Pt=this.controlGrips.topLeft.GRIP_SIZE,It=-Pt/2,Yt=It,Nt=(this.width+this.CB_DISTANCE)/2-Pt/2,xe=(this.height+this.CB_DISTANCE)/2-Pt/2,_n=this.height+this.CB_DISTANCE-Pt/2,ni=this.width+this.CB_DISTANCE-Pt/2;this.positionGrip(this.controlGrips.topLeft.visual,It,Yt),this.positionGrip(this.controlGrips.topCenter.visual,Nt,Yt),this.positionGrip(this.controlGrips.topRight.visual,ni,Yt),this.positionGrip(this.controlGrips.centerLeft.visual,It,xe),this.positionGrip(this.controlGrips.centerRight.visual,ni,xe),this.positionGrip(this.controlGrips.bottomLeft.visual,It,_n),this.positionGrip(this.controlGrips.bottomCenter.visual,Nt,_n),this.positionGrip(this.controlGrips.bottomRight.visual,ni,_n),this.rotatorGrip!==void 0&&this.positionGrip(this.rotatorGrip.visual,Nt,Yt-3*this.CB_DISTANCE)},bt.prototype.positionGrip=function(Pt,It,Yt){var Nt=Pt.transform.baseVal.getItem(0);Nt.setTranslate(It,Yt),Pt.transform.baseVal.replaceItem(Nt,0)},bt.prototype.hideControlBox=function(){this.controlBox.style.display="none"},bt.prototype.showControlBox=function(){this.controlBox.style.display=""},bt.prototype.getState=function(){return Object.assign({left:this.left,top:this.top,width:this.width,height:this.height,rotationAngle:this.rotationAngle,visualTransformMatrix:re.toITransformMatrix(this.visual.transform.baseVal.getItem(0).matrix),containerTransformMatrix:re.toITransformMatrix(this.container.transform.baseVal.getItem(0).matrix)},Rt.prototype.getState.call(this))},bt.prototype.restoreState=function(Pt){Rt.prototype.restoreState.call(this,Pt);var It=Pt;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(re.toSVGMatrix(this.visual.transform.baseVal.getItem(0).matrix,It.visualTransformMatrix)),this.container.transform.baseVal.getItem(0).setMatrix(re.toSVGMatrix(this.container.transform.baseVal.getItem(0).matrix,It.containerTransformMatrix))},bt.prototype.scale=function(Pt,It){Rt.prototype.scale.call(this,Pt,It);var Yt=this.rotatePoint({x:this.left,y:this.top}),Nt=this.unrotatePoint({x:Yt.x*Pt,y:Yt.y*It});this.left=Nt.x,this.top=Nt.y,this.width=this.width*Pt,this.height=this.height*It,this.adjustControlBox()},bt}(Dt),ae=function(Rt){function bt(Pt,It,Yt){var Nt=Rt.call(this,Pt,It,Yt)||this;return Nt.fillColor="transparent",Nt.strokeColor="transparent",Nt.strokeWidth=0,Nt.strokeDasharray="",Nt.opacity=1,Nt.setStrokeColor=Nt.setStrokeColor.bind(Nt),Nt.setFillColor=Nt.setFillColor.bind(Nt),Nt.setStrokeWidth=Nt.setStrokeWidth.bind(Nt),Nt.setStrokeDasharray=Nt.setStrokeDasharray.bind(Nt),Nt.createVisual=Nt.createVisual.bind(Nt),Nt}return ee(bt,Rt),bt.prototype.ownsTarget=function(Pt){return!(!Rt.prototype.ownsTarget.call(this,Pt)&&Pt!==this.visual)},bt.prototype.createVisual=function(){this.visual=he.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)},bt.prototype.pointerDown=function(Pt,It){Rt.prototype.pointerDown.call(this,Pt,It),this.state==="new"&&(this.createVisual(),this.moveVisual(Pt),this._state="creating")},bt.prototype.manipulate=function(Pt){Rt.prototype.manipulate.call(this,Pt)},bt.prototype.resize=function(Pt){Rt.prototype.resize.call(this,Pt),this.setSize()},bt.prototype.setSize=function(){Rt.prototype.setSize.call(this),he.setAttributes(this.visual,[["width",this.width.toString()],["height",this.height.toString()]])},bt.prototype.pointerUp=function(Pt){Rt.prototype.pointerUp.call(this,Pt),this.setSize()},bt.prototype.setStrokeColor=function(Pt){this.strokeColor=Pt,this.visual&&he.setAttributes(this.visual,[["stroke",this.strokeColor]]),this.colorChanged(Pt),this.stateChanged()},bt.prototype.setFillColor=function(Pt){this.fillColor=Pt,this.visual&&he.setAttributes(this.visual,[["fill",this.fillColor]]),this.stateChanged()},bt.prototype.setStrokeWidth=function(Pt){this.strokeWidth=Pt,this.visual&&he.setAttributes(this.visual,[["stroke-width",this.strokeWidth.toString()]]),this.stateChanged()},bt.prototype.setStrokeDasharray=function(Pt){this.strokeDasharray=Pt,this.visual&&he.setAttributes(this.visual,[["stroke-dasharray",this.strokeDasharray]]),this.stateChanged()},bt.prototype.getState=function(){return Object.assign({fillColor:this.fillColor,strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray,opacity:this.opacity},Rt.prototype.getState.call(this))},bt.prototype.restoreState=function(Pt){var It=Pt;this.fillColor=It.fillColor,this.strokeColor=It.strokeColor,this.strokeWidth=It.strokeWidth,this.strokeDasharray=It.strokeDasharray,this.opacity=It.opacity,this.createVisual(),Rt.prototype.restoreState.call(this,Pt),this.setSize()},bt.prototype.scale=function(Pt,It){Rt.prototype.scale.call(this,Pt,It),this.setSize()},bt.title="Rectangle marker",bt}(le),je=function(Rt){function bt(Pt,It,Yt,Nt){var xe=Rt.call(this,Pt,Nt||'<svg viewBox="0 0 24 24"><path d="M3 17h18v-2H3v2m0 3h18v-1H3v1m0-7h18v-3H3v3m0-9v4h18V4H3z"/></svg>')||this;return xe.widths=[],xe.widthBoxes=[],xe.widths=It,xe.currentWidth=Yt,xe.setCurrentWidth=xe.setCurrentWidth.bind(xe),xe}return ee(bt,Rt),bt.prototype.getUi=function(){var Pt=this,It=document.createElement("div");return It.style.display="flex",It.style.overflow="hidden",It.style.flexGrow="2",this.widths.forEach(function(Yt){var Nt=document.createElement("div");Nt.style.display="flex",Nt.style.flexGrow="2",Nt.style.alignItems="center",Nt.style.justifyContent="space-between",Nt.style.padding="5px",Nt.style.borderWidth="2px",Nt.style.borderStyle="solid",Nt.style.borderColor=Yt===Pt.currentWidth?Pt.uiStyleSettings.toolboxAccentColor:"transparent",Nt.addEventListener("click",function(){Pt.setCurrentWidth(Yt,Nt)}),It.appendChild(Nt);var xe=document.createElement("div");xe.innerText=Yt.toString(),xe.style.marginRight="5px",Nt.appendChild(xe);var _n=document.createElement("div");_n.style.minHeight="20px",_n.style.flexGrow="2",_n.style.display="flex",_n.style.alignItems="center";var ni=document.createElement("hr");ni.style.minWidth="20px",ni.style.border="0px",ni.style.borderTop=Yt+"px solid "+Pt.uiStyleSettings.toolboxColor,ni.style.flexGrow="2",_n.appendChild(ni),Nt.appendChild(_n),Pt.widthBoxes.push(Nt)}),It},bt.prototype.setCurrentWidth=function(Pt,It){var Yt=this;this.currentWidth=Pt,this.widthBoxes.forEach(function(Nt){Nt.style.borderColor=Nt===It?Yt.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onWidthChanged&&this.onWidthChanged(this.currentWidth)},bt}(yt),ne=function(Rt){function bt(Pt,It,Yt,Nt){var xe=Rt.call(this,Pt,Nt||'<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 xe.styles=[],xe.styleBoxes=[],xe.styles=It,xe.currentStyle=Yt,xe.setCurrentStyle=xe.setCurrentStyle.bind(xe),xe}return ee(bt,Rt),bt.prototype.getUi=function(){var Pt=this,It=document.createElement("div");return It.style.display="flex",It.style.overflow="hidden",It.style.flexGrow="2",this.styles.forEach(function(Yt){var Nt=document.createElement("div");Nt.style.display="flex",Nt.style.alignItems="center",Nt.style.justifyContent="space-between",Nt.style.padding="5px",Nt.style.borderWidth="2px",Nt.style.borderStyle="solid",Nt.style.overflow="hidden",Nt.style.maxWidth=100/Pt.styles.length-5+"%",Nt.style.borderColor=Yt===Pt.currentStyle?Pt.uiStyleSettings.toolboxAccentColor:"transparent",Nt.addEventListener("click",function(){Pt.setCurrentStyle(Yt,Nt)}),It.appendChild(Nt);var xe=document.createElement("div");xe.style.minHeight="20px",xe.style.flexGrow="2",xe.style.overflow="hidden";var _n=`<svg width="100" height="20">
<line x1="0" y1="10" x2="100" y2="10" stroke="`+Pt.uiStyleSettings.toolboxColor+'" stroke-width="3" '+(Yt!==""?'stroke-dasharray="'+Yt+'"':"")+` />
</svg>`;xe.innerHTML=_n,Nt.appendChild(xe),Pt.styleBoxes.push(Nt)}),It},bt.prototype.setCurrentStyle=function(Pt,It){var Yt=this;this.currentStyle=Pt,this.styleBoxes.forEach(function(Nt){Nt.style.borderColor=Nt===It?Yt.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onStyleChanged&&this.onStyleChanged(this.currentStyle)},bt}(yt),Le=function(Rt){function bt(Pt,It,Yt){var Nt=Rt.call(this,Pt,It,Yt)||this;return Nt.strokeColor=Yt.defaultColor,Nt.strokeWidth=Yt.defaultStrokeWidth,Nt.strokeDasharray=Yt.defaultStrokeDasharray,Nt.strokePanel=new Lt("Line color",Yt.defaultColorSet,Yt.defaultColor),Nt.strokePanel.onColorChanged=Nt.setStrokeColor,Nt.strokeWidthPanel=new je("Line width",Yt.defaultStrokeWidths,Yt.defaultStrokeWidth),Nt.strokeWidthPanel.onWidthChanged=Nt.setStrokeWidth,Nt.strokeStylePanel=new ne("Line style",Yt.defaultStrokeDasharrays,Yt.defaultStrokeDasharray),Nt.strokeStylePanel.onStyleChanged=Nt.setStrokeDasharray,Nt}return ee(bt,Rt),Object.defineProperty(bt.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),bt.prototype.getState=function(){var Pt=Rt.prototype.getState.call(this);return Pt.typeName=bt.typeName,Pt},bt.typeName="FrameMarker",bt.title="Frame marker",bt.icon='<svg viewBox="0 0 24 24"><path d="M4 6v13h16V6H4m14 11H6V8h12v9z"/></svg>',bt}(ae),ue=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"},Ee=function(Rt){function bt(Pt,It,Yt){var Nt=Rt.call(this,Pt,It,Yt)||this;return Nt.x1=0,Nt.y1=0,Nt.x2=0,Nt.y2=0,Nt.defaultLength=50,Nt.manipulationStartX=0,Nt.manipulationStartY=0,Nt.manipulationStartX1=0,Nt.manipulationStartY1=0,Nt.manipulationStartX2=0,Nt.manipulationStartY2=0,Nt.setupControlBox(),Nt}return ee(bt,Rt),bt.prototype.ownsTarget=function(Pt){return!!Rt.prototype.ownsTarget.call(this,Pt)||!(!this.grip1.ownsTarget(Pt)&&!this.grip2.ownsTarget(Pt))},bt.prototype.pointerDown=function(Pt,It){Rt.prototype.pointerDown.call(this,Pt,It),this.manipulationStartX=Pt.x,this.manipulationStartY=Pt.y,this.state==="new"&&(this.x1=Pt.x,this.y1=Pt.y,this.x2=Pt.x,this.y2=Pt.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")},bt.prototype.pointerUp=function(Pt){var It=this.state;Rt.prototype.pointerUp.call(this,Pt),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(Pt),this._state="select",It==="creating"&&this.onMarkerCreated&&this.onMarkerCreated(this)},bt.prototype.adjustVisual=function(){},bt.prototype.manipulate=function(Pt){this.state==="creating"?this.resize(Pt):this.state==="move"?(this.x1=this.manipulationStartX1+Pt.x-this.manipulationStartX,this.y1=this.manipulationStartY1+Pt.y-this.manipulationStartY,this.x2=this.manipulationStartX2+Pt.x-this.manipulationStartX,this.y2=this.manipulationStartY2+Pt.y-this.manipulationStartY,this.adjustVisual(),this.adjustControlBox()):this.state==="resize"&&this.resize(Pt)},bt.prototype.resize=function(Pt){switch(this.activeGrip){case this.grip1:this.x1=Pt.x,this.y1=Pt.y;break;case this.grip2:case void 0:this.x2=Pt.x,this.y2=Pt.y}this.adjustVisual(),this.adjustControlBox()},bt.prototype.select=function(){Rt.prototype.select.call(this),this.adjustControlBox(),this.controlBox.style.display=""},bt.prototype.deselect=function(){Rt.prototype.deselect.call(this),this.controlBox.style.display="none"},bt.prototype.setupControlBox=function(){this.controlBox=he.createGroup(),this.container.appendChild(this.controlBox),this.addControlGrips(),this.controlBox.style.display="none"},bt.prototype.adjustControlBox=function(){this.positionGrips()},bt.prototype.addControlGrips=function(){this.grip1=this.createGrip(),this.grip2=this.createGrip(),this.positionGrips()},bt.prototype.createGrip=function(){var Pt=new Xt;return Pt.visual.transform.baseVal.appendItem(he.createTransform()),this.controlBox.appendChild(Pt.visual),Pt},bt.prototype.positionGrips=function(){var Pt=this.grip1.GRIP_SIZE;this.positionGrip(this.grip1.visual,this.x1-Pt/2,this.y1-Pt/2),this.positionGrip(this.grip2.visual,this.x2-Pt/2,this.y2-Pt/2)},bt.prototype.positionGrip=function(Pt,It,Yt){var Nt=Pt.transform.baseVal.getItem(0);Nt.setTranslate(It,Yt),Pt.transform.baseVal.replaceItem(Nt,0)},bt.prototype.getState=function(){return Object.assign({x1:this.x1,y1:this.y1,x2:this.x2,y2:this.y2},Rt.prototype.getState.call(this))},bt.prototype.restoreState=function(Pt){Rt.prototype.restoreState.call(this,Pt);var It=Pt;this.x1=It.x1,this.y1=It.y1,this.x2=It.x2,this.y2=It.y2},bt.prototype.scale=function(Pt,It){Rt.prototype.scale.call(this,Pt,It),this.x1=this.x1*Pt,this.y1=this.y1*It,this.x2=this.x2*Pt,this.y2=this.y2*It,this.adjustVisual(),this.adjustControlBox()},bt}(Dt),ge=function(Rt){function bt(Pt,It,Yt){var Nt=Rt.call(this,Pt,It,Yt)||this;return Nt.strokeColor="transparent",Nt.strokeWidth=0,Nt.strokeDasharray="",Nt.setStrokeColor=Nt.setStrokeColor.bind(Nt),Nt.setStrokeWidth=Nt.setStrokeWidth.bind(Nt),Nt.setStrokeDasharray=Nt.setStrokeDasharray.bind(Nt),Nt.strokeColor=Yt.defaultColor,Nt.strokeWidth=Yt.defaultStrokeWidth,Nt.strokeDasharray=Yt.defaultStrokeDasharray,Nt.strokePanel=new Lt("Line color",Yt.defaultColorSet,Yt.defaultColor),Nt.strokePanel.onColorChanged=Nt.setStrokeColor,Nt.strokeWidthPanel=new je("Line width",Yt.defaultStrokeWidths,Yt.defaultStrokeWidth),Nt.strokeWidthPanel.onWidthChanged=Nt.setStrokeWidth,Nt.strokeStylePanel=new ne("Line style",Yt.defaultStrokeDasharrays,Yt.defaultStrokeDasharray),Nt.strokeStylePanel.onStyleChanged=Nt.setStrokeDasharray,Nt}return ee(bt,Rt),bt.prototype.ownsTarget=function(Pt){return!(!Rt.prototype.ownsTarget.call(this,Pt)&&Pt!==this.visual&&Pt!==this.selectorLine&&Pt!==this.visibleLine)},bt.prototype.createVisual=function(){this.visual=he.createGroup(),this.selectorLine=he.createLine(this.x1,this.y1,this.x2,this.y2,[["stroke","transparent"],["stroke-width",(this.strokeWidth+10).toString()]]),this.visibleLine=he.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)},bt.prototype.pointerDown=function(Pt,It){Rt.prototype.pointerDown.call(this,Pt,It),this.state==="new"&&(this.createVisual(),this.adjustVisual(),this._state="creating")},bt.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()),he.setAttributes(this.visibleLine,[["stroke",this.strokeColor]]),he.setAttributes(this.visibleLine,[["stroke-width",this.strokeWidth.toString()]]),he.setAttributes(this.visibleLine,[["stroke-dasharray",this.strokeDasharray.toString()]]))},bt.prototype.setStrokeColor=function(Pt){this.strokeColor=Pt,this.adjustVisual(),this.colorChanged(Pt)},bt.prototype.setStrokeWidth=function(Pt){this.strokeWidth=Pt,this.adjustVisual()},bt.prototype.setStrokeDasharray=function(Pt){this.strokeDasharray=Pt,this.adjustVisual(),this.stateChanged()},Object.defineProperty(bt.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),bt.prototype.getState=function(){var Pt=Object.assign({strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray},Rt.prototype.getState.call(this));return Pt.typeName=bt.typeName,Pt},bt.prototype.restoreState=function(Pt){Rt.prototype.restoreState.call(this,Pt);var It=Pt;this.strokeColor=It.strokeColor,this.strokeWidth=It.strokeWidth,this.strokeDasharray=It.strokeDasharray,this.createVisual(),this.adjustVisual()},bt.typeName="LineMarker",bt.title="Line marker",bt.icon='<svg viewBox="0 0 24 24"><path d="M19 13H5v-2h14v2z"/></svg>',bt}(Ee),Ue=function(Rt){function bt(Pt,It,Yt,Nt){var xe=Rt.call(this,Pt,Nt||'<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 xe.fonts=[],xe.fontBoxes=[],xe.fonts=It,xe.currentFont=Yt,xe.setCurrentFont=xe.setCurrentFont.bind(xe),xe}return ee(bt,Rt),bt.prototype.getUi=function(){var Pt=this,It=document.createElement("div");return It.style.overflow="hidden",It.style.flexGrow="2",this.fonts.forEach(function(Yt){var Nt=document.createElement("div");Nt.style.display="inline-block",Nt.style.alignItems="center",Nt.style.justifyContent="space-between",Nt.style.padding="5px",Nt.style.borderWidth="2px",Nt.style.borderStyle="solid",Nt.style.overflow="hidden",Nt.style.maxWidth=100/Pt.fonts.length-5+"%",Nt.style.borderColor=Yt===Pt.currentFont?Pt.uiStyleSettings.toolboxAccentColor:"transparent",Nt.addEventListener("click",function(){Pt.setCurrentFont(Yt,Nt)}),It.appendChild(Nt);var xe=document.createElement("div");xe.style.display="flex",xe.style.minHeight="20px",xe.style.flexGrow="2",xe.style.fontFamily=Yt,xe.style.overflow="hidden";var _n=document.createElement("div");_n.style.whiteSpace="nowrap",_n.style.overflow="hidden",_n.style.textOverflow="ellipsis",_n.innerHTML="The quick brown fox jumps over the lazy dog",xe.appendChild(_n),Nt.appendChild(xe),Pt.fontBoxes.push(Nt)}),It},bt.prototype.setCurrentFont=function(Pt,It){var Yt=this;this.currentFont=Pt,this.fontBoxes.forEach(function(Nt){Nt.style.borderColor=Nt===It?Yt.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onFontChanged&&this.onFontChanged(this.currentFont)},bt}(yt),nn=function(Rt){function bt(Pt,It,Yt){var Nt=Rt.call(this,Pt,It,Yt)||this;return Nt.color="transparent",Nt.padding=5,Nt.DEFAULT_TEXT="\u8BF7\u8F93\u5165\u6587\u672C",Nt.text=Nt.DEFAULT_TEXT,Nt.isMoved=!1,Nt.color=Yt.defaultColor,Nt.fontFamily=Yt.defaultFontFamily,Nt.defaultSize={x:100,y:30},Nt.setColor=Nt.setColor.bind(Nt),Nt.setFont=Nt.setFont.bind(Nt),Nt.renderText=Nt.renderText.bind(Nt),Nt.sizeText=Nt.sizeText.bind(Nt),Nt.textEditDivClicked=Nt.textEditDivClicked.bind(Nt),Nt.showTextEditor=Nt.showTextEditor.bind(Nt),Nt.setSize=Nt.setSize.bind(Nt),Nt.positionTextEditor=Nt.positionTextEditor.bind(Nt),Nt.colorPanel=new Lt("Color",Yt.defaultColorSet,Yt.defaultColor),Nt.colorPanel.onColorChanged=Nt.setColor,Nt.fontFamilyPanel=new Ue("Font",Yt.defaultFontFamilies,Yt.defaultFontFamily),Nt.fontFamilyPanel.onFontChanged=Nt.setFont,Nt}return ee(bt,Rt),bt.prototype.ownsTarget=function(Pt){if(Rt.prototype.ownsTarget.call(this,Pt)||Pt===this.visual||Pt===this.textElement||Pt===this.bgRectangle)return!0;var It=!1;return this.textElement.childNodes.forEach(function(Yt){Yt===Pt&&(It=!0)}),It},bt.prototype.createVisual=function(){this.visual=he.createGroup(),this.bgRectangle=he.createRect(1,1,[["fill","transparent"]]),this.visual.appendChild(this.bgRectangle),this.textElement=he.createText([["fill",this.color],["font-family",this.fontFamily],["font-size","16px"],["x","0"],["y","0"]]),this.textElement.transform.baseVal.appendItem(he.createTransform()),this.textElement.transform.baseVal.appendItem(he.createTransform()),this.visual.appendChild(this.textElement),this.addMarkerVisualToContainer(this.visual),this.renderText()},bt.prototype.pointerDown=function(Pt,It){Rt.prototype.pointerDown.call(this,Pt,It),this.isMoved=!1,this.pointerDownPoint=Pt,this.pointerDownTimestamp=Date.now(),this.state==="new"&&(this.createVisual(),this.moveVisual(Pt),this._state="creating")},bt.prototype.renderText=function(){var Pt=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){Pt.textElement.appendChild(he.createTSpan(It.trim()===""?" ":It.trim(),[["x","0"],["dy","1.2em"]]))}),setTimeout(this.sizeText,10)}},bt.prototype.getTextScale=function(){var Pt=this.textElement.getBBox(),It=1;if(Pt.width>0&&Pt.height>0){var Yt=(1*this.width-this.width*this.padding*2/100)/Pt.width,Nt=(1*this.height-this.height*this.padding*2/100)/Pt.height;It=Math.min(Yt,Nt)}return It},bt.prototype.getTextPosition=function(Pt){var It=this.textElement.getBBox(),Yt=0,Nt=0;return It.width>0&&It.height>0&&(Yt=(this.width-It.width*Pt)/2,Nt=this.height/2-It.height*Pt/2),{x:Yt,y:Nt}},bt.prototype.sizeText=function(){var Pt=this.textElement.getBBox(),It=this.getTextScale(),Yt=this.getTextPosition(It);Yt.y-=Pt.y*It,navigator.userAgent.indexOf("Edge/")>-1?this.textElement.style.transform="translate("+Yt.x+"px, "+Yt.y+"px) scale("+It+", "+It+")":(this.textElement.transform.baseVal.getItem(0).setTranslate(Yt.x,Yt.y),this.textElement.transform.baseVal.getItem(1).setScale(It,It))},bt.prototype.manipulate=function(Pt){Rt.prototype.manipulate.call(this,Pt),this.pointerDownPoint!==void 0&&(this.isMoved=Math.abs(Pt.x-this.pointerDownPoint.x)>5||Math.abs(Pt.y-this.pointerDownPoint.y)>5)},bt.prototype.resize=function(Pt){Rt.prototype.resize.call(this,Pt),this.isMoved=!0,this.setSize(),this.sizeText()},bt.prototype.setSize=function(){Rt.prototype.setSize.call(this),this.visual&&this.bgRectangle&&(he.setAttributes(this.visual,[["width",this.width.toString()],["height",this.height.toString()]]),he.setAttributes(this.bgRectangle,[["width",this.width.toString()],["height",this.height.toString()]]))},bt.prototype.pointerUp=function(Pt){var It=this.state;It==="creating"&&(this._suppressMarkerCreateEvent=!0),Rt.prototype.pointerUp.call(this,Pt),this.setSize(),(It==="creating"||!this.isMoved&&Date.now()-this.pointerDownTimestamp>500)&&this.showTextEditor(),this.pointerDownPoint=void 0},bt.prototype.showTextEditor=function(){var Pt=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(Pt.textEditor.style.fontSize);Pt.textEditor.clientWidth>=Number.parseInt(Pt.textEditor.style.maxWidth)&&It>.9;)It-=.1,Pt.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 Yt=It.clipboardData.getData("text"),Nt=window.getSelection();if(!Nt.rangeCount)return!1;Nt.deleteFromDocument(),Nt.getRangeAt(0).insertNode(document.createTextNode(Yt)),It.preventDefault()}}),this.textEditDiv.addEventListener("pointerup",function(){Pt.textEditDivClicked(Pt.textEditor.innerText)}),this.textEditDiv.appendChild(this.textEditor),this.overlayContainer.appendChild(this.textEditDiv),this.hideVisual(),this.textEditor.focus(),document.execCommand("selectAll")},bt.prototype.positionTextEditor=function(){if(this.state==="edit")if(this.textEditor===void 0)this.showTextEditor();else{this.textElement.style.display="";var Pt=this.getTextScale(),It=this.rotatePoint({x:this.left+this.width/2,y:this.top+this.height/2}),Yt=this.textElement.getBBox(),Nt={x:Yt.width*Pt,y:Yt.height*Pt};It.x-=Nt.x/2,It.y-=Nt.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*Pt,12)+"px",this.textElement.style.display="none"}},bt.prototype.textEditDivClicked=function(Pt){this.text=Pt.trim(),this.overlayContainer.innerHTML="",this.renderText(),this.showVisual(),this._suppressMarkerCreateEvent&&(this._suppressMarkerCreateEvent=!1,this.onMarkerCreated&&this.onMarkerCreated(this)),this.stateChanged()},bt.prototype.select=function(){Rt.prototype.select.call(this),this.state==="edit"&&this.textEditDivClicked(this.textEditor.innerText)},bt.prototype.deselect=function(){this.state==="edit"&&this.textEditDivClicked(this.textEditor.innerText),Rt.prototype.deselect.call(this)},bt.prototype.dblClick=function(Pt,It){Rt.prototype.dblClick.call(this,Pt,It),this.showTextEditor()},bt.prototype.setColor=function(Pt){this.textElement&&he.setAttributes(this.textElement,[["fill",Pt]]),this.color=Pt,this.textEditor&&(this.textEditor.style.color=this.color),this.colorChanged(Pt)},bt.prototype.setFont=function(Pt){this.textElement&&he.setAttributes(this.textElement,[["font-family",Pt]]),this.fontFamily=Pt,this.textEditor&&(this.textEditor.style.fontFamily=this.fontFamily),this.renderText(),this.stateChanged()},bt.prototype.hideVisual=function(){this.textElement.style.display="none",this.hideControlBox()},bt.prototype.showVisual=function(){this.state==="edit"&&(this._state="select"),this.textElement.style.display="",this.showControlBox()},Object.defineProperty(bt.prototype,"toolboxPanels",{get:function(){return[this.colorPanel,this.fontFamilyPanel]},enumerable:!1,configurable:!0}),bt.prototype.getState=function(){var Pt=Object.assign({color:this.color,fontFamily:this.fontFamily,padding:this.padding,text:this.text},Rt.prototype.getState.call(this));return Pt.typeName=bt.typeName,Pt},bt.prototype.restoreState=function(Pt){var It=Pt;this.color=It.color,this.fontFamily=It.fontFamily,this.padding=It.padding,this.text=It.text,this.createVisual(),Rt.prototype.restoreState.call(this,Pt),this.setSize()},bt.prototype.scale=function(Pt,It){Rt.prototype.scale.call(this,Pt,It),this.setSize(),this.sizeText(),this.positionTextEditor()},bt.typeName="TextMarker",bt.title="Text marker",bt.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>',bt}(le),_e=function(Rt){function bt(Pt,It,Yt){var Nt=Rt.call(this,Pt,It,Yt)||this;return Nt.color="transparent",Nt.lineWidth=3,Nt.drawing=!1,Nt.pixelRatio=1,Nt.color=Yt.defaultColor,Nt.lineWidth=Yt.defaultStrokeWidth,Nt.pixelRatio=Yt.freehandPixelRatio,Nt.setColor=Nt.setColor.bind(Nt),Nt.addCanvas=Nt.addCanvas.bind(Nt),Nt.finishCreation=Nt.finishCreation.bind(Nt),Nt.setLineWidth=Nt.setLineWidth.bind(Nt),Nt.colorPanel=new Lt("Color",Yt.defaultColorSet,Yt.defaultColor),Nt.colorPanel.onColorChanged=Nt.setColor,Nt.lineWidthPanel=new je("Line width",Yt.defaultStrokeWidths,Yt.defaultStrokeWidth),Nt.lineWidthPanel.onWidthChanged=Nt.setLineWidth,Nt}return ee(bt,Rt),bt.prototype.ownsTarget=function(Pt){return!(!Rt.prototype.ownsTarget.call(this,Pt)&&Pt!==this.visual&&Pt!==this.drawingImage)},bt.prototype.createVisual=function(){this.visual=he.createGroup(),this.drawingImage=he.createImage(),this.visual.appendChild(this.drawingImage);var Pt=he.createTransform();this.visual.transform.baseVal.appendItem(Pt),this.addMarkerVisualToContainer(this.visual)},bt.prototype.pointerDown=function(Pt,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(Pt.x,Pt.y),this.drawing=!0):Rt.prototype.pointerDown.call(this,Pt,It)},bt.prototype.manipulate=function(Pt){this.state==="creating"?this.drawing&&(this.canvasContext.lineTo(Pt.x,Pt.y),this.canvasContext.stroke()):Rt.prototype.manipulate.call(this,Pt)},bt.prototype.resize=function(Pt){Rt.prototype.resize.call(this,Pt),he.setAttributes(this.visual,[["width",this.width.toString()],["height",this.height.toString()]]),he.setAttributes(this.drawingImage,[["width",this.width.toString()],["height",this.height.toString()]])},bt.prototype.pointerUp=function(Pt){this._state==="creating"?this.drawing&&(this.canvasContext.closePath(),this.drawing=!1,this.globalSettings.newFreehandMarkerOnPointerUp&&this.finishCreation()):Rt.prototype.pointerUp.call(this,Pt)},bt.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)},bt.prototype.select=function(){this.state==="creating"&&this.finishCreation(),Rt.prototype.select.call(this)},bt.prototype.deselect=function(){this.state==="creating"&&this.finishCreation(),Rt.prototype.deselect.call(this)},bt.prototype.finishCreation=function(){for(var Pt=this.canvasContext.getImageData(0,0,this.canvasElement.width,this.canvasElement.height),It=[this.canvasElement.width+1,this.canvasElement.height+1,-1,-1],Yt=It[0],Nt=It[1],xe=It[2],_n=It[3],ni=!1,ei=0;ei<this.canvasElement.height;ei++)for(var ii=0;ii<this.canvasElement.width;ii++)Pt.data[ei*this.canvasElement.width*4+4*ii+3]>0&&(ni=!0,ei<Nt&&(Nt=ei),ii<Yt&&(Yt=ii),ei>_n&&(_n=ei),ii>xe&&(xe=ii));if(ni){this.left=Yt/this.pixelRatio,this.top=Nt/this.pixelRatio,this.width=(xe-Yt)/this.pixelRatio,this.height=(_n-Nt)/this.pixelRatio;var Hi=document.createElement("canvas");Hi.width=xe-Yt,Hi.height=_n-Nt,Hi.getContext("2d").putImageData(this.canvasContext.getImageData(Yt,Nt,xe-Yt,_n-Nt),0,0),this.drawingImgUrl=Hi.toDataURL("image/png"),this.setDrawingImage(),this._state="select",this.onMarkerCreated&&this.onMarkerCreated(this)}this.overlayContainer.innerHTML=""},bt.prototype.setDrawingImage=function(){he.setAttributes(this.drawingImage,[["width",this.width.toString()],["height",this.height.toString()]]),he.setAttributes(this.drawingImage,[["href",this.drawingImgUrl]]),this.moveVisual({x:this.left,y:this.top})},bt.prototype.setColor=function(Pt){this.color=Pt,this.colorChanged(Pt)},bt.prototype.setLineWidth=function(Pt){this.lineWidth=Pt},Object.defineProperty(bt.prototype,"toolboxPanels",{get:function(){return this.state==="new"||this.state==="creating"?[this.colorPanel,this.lineWidthPanel]:[]},enumerable:!1,configurable:!0}),bt.prototype.getState=function(){var Pt=Object.assign({drawingImgUrl:this.drawingImgUrl},Rt.prototype.getState.call(this));return Pt.typeName=bt.typeName,Pt},bt.prototype.restoreState=function(Pt){this.createVisual(),Rt.prototype.restoreState.call(this,Pt),this.drawingImgUrl=Pt.drawingImgUrl,this.setDrawingImage()},bt.prototype.scale=function(Pt,It){Rt.prototype.scale.call(this,Pt,It),this.setDrawingImage()},bt.typeName="FreehandMarker",bt.title="Freehand marker",bt.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>',bt}(le),qt=function(Rt){function bt(Pt,It,Yt){var Nt=Rt.call(this,Pt,Yt||'<svg viewBox="0 0 24 24"><path d="M8 14v4l-6-6 6-6v4h8V6l6 6-6 6v-4H8z"/></svg>')||this;return Nt.typeBoxes=[],Nt.currentType=It,Nt.setCurrentType=Nt.setCurrentType.bind(Nt),Nt}return ee(bt,Rt),bt.prototype.getUi=function(){var Pt=this,It=document.createElement("div");It.style.display="flex",It.style.overflow="hidden",It.style.flexGrow="2";for(var Yt=function(_n){var ni="both";switch(_n){case 0:ni="both";break;case 1:ni="start";break;case 2:ni="end";break;case 3:ni="none"}var ei=document.createElement("div");if(ei.style.display="flex",ei.style.flexGrow="2",ei.style.alignItems="center",ei.style.justifyContent="space-between",ei.style.padding="5px",ei.style.borderWidth="2px",ei.style.borderStyle="solid",ei.style.borderColor=ni===Nt.currentType?Nt.uiStyleSettings.toolboxAccentColor:"transparent",ei.addEventListener("click",function(){Pt.setCurrentType(ni,ei)}),It.appendChild(ei),ni==="both"||ni==="start"){var ii=document.createElement("div");ii.style.display="flex",ii.style.alignItems="center",ii.style.minHeight="20px",ii.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="`+(Nt.uiStyleSettings!==void 0?Nt.uiStyleSettings.toolboxColor:"#eeeeee")+`" />
</svg>`,ii.style.marginLeft="5px",ei.appendChild(ii)}var Hi=document.createElement("div");Hi.style.display="flex",Hi.style.alignItems="center",Hi.style.minHeight="20px",Hi.style.flexGrow="2";var hi=document.createElement("hr");if(hi.style.minWidth="20px",hi.style.border="0px",hi.style.borderTop="3px solid "+(Nt.uiStyleSettings!==void 0?Nt.uiStyleSettings.toolboxColor:"#eeeeee"),hi.style.flexGrow="2",Hi.appendChild(hi),ei.appendChild(Hi),ni==="both"||ni==="end"){var Jn=document.createElement("div");Jn.style.display="flex",Jn.style.alignItems="center",Jn.style.minHeight="20px",Jn.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="`+(Nt.uiStyleSettings!==void 0?Nt.uiStyleSettings.toolboxColor:"#eeeeee")+`" />
</svg>`,Jn.style.marginRight="5px",ei.appendChild(Jn)}Nt.typeBoxes.push(ei)},Nt=this,xe=0;xe<4;xe++)Yt(xe);return It},bt.prototype.setCurrentType=function(Pt,It){var Yt=this;this.currentType=Pt,this.typeBoxes.forEach(function(Nt){Nt.style.borderColor=Nt===It?Yt.uiStyleSettings!==void 0?Yt.uiStyleSettings.toolboxAccentColor:"#3080c3":"transparent"}),this.onArrowTypeChanged&&this.onArrowTypeChanged(this.currentType)},bt}(yt),Jt=function(Rt){function bt(Pt,It,Yt){var Nt=Rt.call(this,Pt,It,Yt)||this;return Nt.arrowType="end",Nt.arrowBaseHeight=10,Nt.arrowBaseWidth=10,Nt.getArrowPoints=Nt.getArrowPoints.bind(Nt),Nt.setArrowType=Nt.setArrowType.bind(Nt),Nt.arrowTypePanel=new qt("Arrow type","end"),Nt.arrowTypePanel.onArrowTypeChanged=Nt.setArrowType,Nt}return ee(bt,Rt),bt.prototype.ownsTarget=function(Pt){return!(!Rt.prototype.ownsTarget.call(this,Pt)&&Pt!==this.arrow1&&Pt!==this.arrow2)},bt.prototype.getArrowPoints=function(Pt,It){var Yt=this.arrowBaseWidth+2*this.strokeWidth,Nt=this.arrowBaseHeight+2*this.strokeWidth;return Pt-Yt/2+","+(It+Nt/2)+" "+Pt+","+(It-Nt/2)+" "+(Pt+Yt/2)+","+(It+Nt/2)},bt.prototype.createTips=function(){this.arrow1=he.createPolygon(this.getArrowPoints(this.x1,this.y1),[["fill",this.strokeColor]]),this.arrow1.transform.baseVal.appendItem(he.createTransform()),this.visual.appendChild(this.arrow1),this.arrow2=he.createPolygon(this.getArrowPoints(this.x2,this.y2),[["fill",this.strokeColor]]),this.arrow2.transform.baseVal.appendItem(he.createTransform()),this.visual.appendChild(this.arrow2)},bt.prototype.pointerDown=function(Pt,It){Rt.prototype.pointerDown.call(this,Pt,It),this.state==="creating"&&this.createTips()},bt.prototype.adjustVisual=function(){if(Rt.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",he.setAttributes(this.arrow1,[["points",this.getArrowPoints(this.x1,this.y1)],["fill",this.strokeColor]]),he.setAttributes(this.arrow2,[["points",this.getArrowPoints(this.x2,this.y2)],["fill",this.strokeColor]]);var Pt=0;Math.abs(this.x1-this.x2)>.1&&(Pt=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(Pt,this.x1,this.y1),this.arrow1.transform.baseVal.replaceItem(It,0);var Yt=this.arrow2.transform.baseVal.getItem(0);Yt.setRotate(Pt+180,this.x2,this.y2),this.arrow2.transform.baseVal.replaceItem(Yt,0)}},bt.prototype.setArrowType=function(Pt){this.arrowType=Pt,this.adjustVisual(),this.stateChanged()},Object.defineProperty(bt.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel,this.arrowTypePanel]},enumerable:!1,configurable:!0}),bt.prototype.getState=function(){var Pt=Object.assign({arrowType:this.arrowType},Rt.prototype.getState.call(this));return Pt.typeName=bt.typeName,Pt},bt.prototype.restoreState=function(Pt){Rt.prototype.restoreState.call(this,Pt);var It=Pt;this.arrowType=It.arrowType,this.createTips(),this.adjustVisual()},bt.typeName="ArrowMarker",bt.title="Arrow marker",bt.icon='<svg viewBox="0 0 24 24"><path d="M19 6.41L17.59 5 7 15.59V9H5v10h10v-2H8.41L19 6.41z"/></svg>',bt}(ge),De=function(Rt){function bt(Pt,It,Yt){var Nt=Rt.call(this,Pt,It,Yt)||this;return Nt.fillColor=Yt.defaultFillColor,Nt.strokeWidth=0,Nt.fillPanel=new Lt("Color",Yt.defaultColorSet,Yt.defaultFillColor),Nt.fillPanel.onColorChanged=Nt.setFillColor,Nt}return ee(bt,Rt),Object.defineProperty(bt.prototype,"toolboxPanels",{get:function(){return[this.fillPanel]},enumerable:!1,configurable:!0}),bt.prototype.getState=function(){var Pt=Rt.prototype.getState.call(this);return Pt.typeName=bt.typeName,Pt},bt.typeName="CoverMarker",bt.title="Cover marker",bt.icon='<svg viewBox="0 0 24 24"><path d="M4 6v13h16V6H4z"/></svg>',bt}(ae),sn=function(Rt){function bt(Pt,It,Yt,Nt){var xe=Rt.call(this,Pt,Nt||'<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 xe.opacities=[],xe.opacityBoxes=[],xe.opacities=It,xe.currentOpacity=Yt,xe.setCurrentOpacity=xe.setCurrentOpacity.bind(xe),xe}return ee(bt,Rt),bt.prototype.getUi=function(){var Pt=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(Yt){var Nt=document.createElement("div");Nt.style.display="flex",Nt.style.alignItems="center",Nt.style.justifyContent="center",Nt.style.padding="5px",Nt.style.borderWidth="2px",Nt.style.borderStyle="solid",Nt.style.borderColor=Yt===Pt.currentOpacity?Pt.uiStyleSettings.toolboxAccentColor:"transparent",Nt.addEventListener("click",function(){Pt.setCurrentOpacity(Yt,Nt)}),It.appendChild(Nt);var xe=document.createElement("div");xe.innerText=100*Yt+"%",Nt.appendChild(xe),Pt.opacityBoxes.push(Nt)}),It},bt.prototype.setCurrentOpacity=function(Pt,It){var Yt=this;this.currentOpacity=Pt,this.opacityBoxes.forEach(function(Nt){Nt.style.borderColor=Nt===It?Yt.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onOpacityChanged&&this.onOpacityChanged(this.currentOpacity)},bt}(yt),cn=function(Rt){function bt(Pt,It,Yt){var Nt=Rt.call(this,Pt,It,Yt)||this;return Nt.setOpacity=Nt.setOpacity.bind(Nt),Nt.fillColor=Yt.defaultHighlightColor,Nt.strokeWidth=0,Nt.opacity=Yt.defaultHighlightOpacity,Nt.fillPanel=new Lt("Color",Yt.defaultColorSet,Nt.fillColor),Nt.fillPanel.onColorChanged=Nt.setFillColor,Nt.opacityPanel=new sn("Opacity",Yt.defaultOpacitySteps,Nt.opacity),Nt.opacityPanel.onOpacityChanged=Nt.setOpacity,Nt}return ee(bt,Rt),bt.prototype.setOpacity=function(Pt){this.opacity=Pt,this.visual&&he.setAttributes(this.visual,[["opacity",this.opacity.toString()]]),this.stateChanged()},Object.defineProperty(bt.prototype,"toolboxPanels",{get:function(){return[this.fillPanel,this.opacityPanel]},enumerable:!1,configurable:!0}),bt.prototype.getState=function(){var Pt=Rt.prototype.getState.call(this);return Pt.typeName=bt.typeName,Pt},bt.typeName="HighlightMarker",bt.title="Highlight marker",bt.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>',bt}(De),Te='<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>',en='<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>',Cn=function(Rt){function bt(Pt,It,Yt){var Nt=Rt.call(this,Pt,It,Yt)||this;return Nt.bgColor="transparent",Nt.tipPosition={x:0,y:0},Nt.tipBase1Position={x:0,y:0},Nt.tipBase2Position={x:0,y:0},Nt.tipMoving=!1,Nt.color=Yt.defaultStrokeColor,Nt.bgColor=Yt.defaultFillColor,Nt.fontFamily=Yt.defaultFontFamily,Nt.defaultSize={x:100,y:30},Nt.setBgColor=Nt.setBgColor.bind(Nt),Nt.getTipPoints=Nt.getTipPoints.bind(Nt),Nt.positionTip=Nt.positionTip.bind(Nt),Nt.setTipPoints=Nt.setTipPoints.bind(Nt),Nt.colorPanel=new Lt("Text color",Yt.defaultColorSet,Nt.color,Te),Nt.colorPanel.onColorChanged=Nt.setColor,Nt.bgColorPanel=new Lt("Fill color",Yt.defaultColorSet,Nt.bgColor,en),Nt.bgColorPanel.onColorChanged=Nt.setBgColor,Nt.fontFamilyPanel=new Ue("Font",Yt.defaultFontFamilies,Yt.defaultFontFamily),Nt.fontFamilyPanel.onFontChanged=Nt.setFont,Nt.tipGrip=new Xt,Nt.tipGrip.visual.transform.baseVal.appendItem(he.createTransform()),Nt.controlBox.appendChild(Nt.tipGrip.visual),Nt}return ee(bt,Rt),bt.prototype.ownsTarget=function(Pt){return Rt.prototype.ownsTarget.call(this,Pt)||this.tipGrip.ownsTarget(Pt)||this.tip===Pt},bt.prototype.createTip=function(){he.setAttributes(this.bgRectangle,[["fill",this.bgColor],["rx","10px"]]),this.tip=he.createPolygon(this.getTipPoints(),[["fill",this.bgColor]]),this.visual.appendChild(this.tip)},bt.prototype.pointerDown=function(Pt,It){this.state==="new"&&Rt.prototype.pointerDown.call(this,Pt,It),this.state==="creating"?this.createTip():this.tipGrip.ownsTarget(It)?(this.manipulationStartLeft=this.left,this.manipulationStartTop=this.top,this.tipMoving=!0):Rt.prototype.pointerDown.call(this,Pt,It)},bt.prototype.pointerUp=function(Pt){if(this.tipMoving)this.tipMoving=!1,this.isMoved=!0,Rt.prototype.pointerUp.call(this,Pt);else{var It=this.state==="creating";Rt.prototype.pointerUp.call(this,Pt),this.setTipPoints(It),this.positionTip()}},bt.prototype.manipulate=function(Pt){if(this.tipMoving){var It=this.unrotatePoint(Pt);this.tipPosition={x:It.x-this.manipulationStartLeft,y:It.y-this.manipulationStartTop},this.positionTip()}else Rt.prototype.manipulate.call(this,Pt)},bt.prototype.setBgColor=function(Pt){this.bgRectangle&&this.tip&&(he.setAttributes(this.bgRectangle,[["fill",Pt]]),he.setAttributes(this.tip,[["fill",Pt]])),this.bgColor=Pt,this.fillColorChanged(Pt)},bt.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},bt.prototype.setTipPoints=function(Pt){Pt===void 0&&(Pt=!1);var It=Math.min(this.height/2,15),Yt=this.height/5;Pt&&(this.tipPosition={x:It+Yt/2,y:this.height+20});var Nt=Math.atan(this.height/2/(this.width/2));this.tipPosition.x<this.width/2&&this.tipPosition.y<this.height/2?Nt<Math.atan((this.height/2-this.tipPosition.y)/(this.width/2-this.tipPosition.x))?(Yt=this.width/5,It=Math.min(this.width/2,15),this.tipBase1Position={x:It,y:0},this.tipBase2Position={x:It+Yt,y:0}):(this.tipBase1Position={x:0,y:It},this.tipBase2Position={x:0,y:It+Yt}):this.tipPosition.x>=this.width/2&&this.tipPosition.y<this.height/2?Nt<Math.atan((this.height/2-this.tipPosition.y)/(this.tipPosition.x-this.width/2))?(Yt=this.width/5,It=Math.min(this.width/2,15),this.tipBase1Position={x:this.width-It-Yt,y:0},this.tipBase2Position={x:this.width-It,y:0}):(this.tipBase1Position={x:this.width,y:It},this.tipBase2Position={x:this.width,y:It+Yt}):this.tipPosition.x>=this.width/2&&this.tipPosition.y>=this.height/2?Nt<Math.atan((this.tipPosition.y-this.height/2)/(this.tipPosition.x-this.width/2))?(Yt=this.width/5,It=Math.min(this.width/2,15),this.tipBase1Position={x:this.width-It-Yt,y:this.height},this.tipBase2Position={x:this.width-It,y:this.height}):(this.tipBase1Position={x:this.width,y:this.height-It-Yt},this.tipBase2Position={x:this.width,y:this.height-It}):Nt<Math.atan((this.tipPosition.y-this.height/2)/(this.width/2-this.tipPosition.x))?(Yt=this.width/5,It=Math.min(this.width/2,15),this.tipBase1Position={x:It,y:this.height},this.tipBase2Position={x:It+Yt,y:this.height}):(this.tipBase1Position={x:0,y:this.height-It},this.tipBase2Position={x:0,y:this.height-It-Yt})},bt.prototype.resize=function(Pt){Rt.prototype.resize.call(this,Pt),this.positionTip()},bt.prototype.positionTip=function(){he.setAttributes(this.tip,[["points",this.getTipPoints()]]);var Pt=this.tipGrip.visual.transform.baseVal.getItem(0);Pt.setTranslate(this.tipPosition.x,this.tipPosition.y),this.tipGrip.visual.transform.baseVal.replaceItem(Pt,0)},Object.defineProperty(bt.prototype,"toolboxPanels",{get:function(){return[this.colorPanel,this.bgColorPanel,this.fontFamilyPanel]},enumerable:!1,configurable:!0}),bt.prototype.select=function(){this.positionTip(),Rt.prototype.select.call(this)},bt.prototype.getState=function(){var Pt=Object.assign({bgColor:this.bgColor,tipPosition:this.tipPosition},Rt.prototype.getState.call(this));return Pt.typeName=bt.typeName,Pt},bt.prototype.restoreState=function(Pt){var It=Pt;this.bgColor=It.bgColor,this.tipPosition=It.tipPosition,Rt.prototype.restoreState.call(this,Pt),this.createTip(),this.setTipPoints()},bt.prototype.scale=function(Pt,It){Rt.prototype.scale.call(this,Pt,It),this.tipPosition={x:this.tipPosition.x*Pt,y:this.tipPosition.y*It},this.positionTip()},bt.typeName="CalloutMarker",bt.title="Callout marker",bt.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>',bt}(nn),Gn=function(Rt){function bt(Pt,It,Yt){var Nt=Rt.call(this,Pt,It,Yt)||this;return Nt.fillColor="transparent",Nt.strokeColor="transparent",Nt.strokeWidth=0,Nt.strokeDasharray="",Nt.opacity=1,Nt.strokeColor=Yt.defaultColor,Nt.strokeWidth=Yt.defaultStrokeWidth,Nt.strokeDasharray=Yt.defaultStrokeDasharray,Nt.fillColor=Yt.defaultFillColor,Nt.setStrokeColor=Nt.setStrokeColor.bind(Nt),Nt.setFillColor=Nt.setFillColor.bind(Nt),Nt.setStrokeWidth=Nt.setStrokeWidth.bind(Nt),Nt.setStrokeDasharray=Nt.setStrokeDasharray.bind(Nt),Nt.setOpacity=Nt.setOpacity.bind(Nt),Nt.createVisual=Nt.createVisual.bind(Nt),Nt.strokePanel=new Lt("Line color",de(Yt.defaultColorSet,["transparent"]),Yt.defaultColor),Nt.strokePanel.onColorChanged=Nt.setStrokeColor,Nt.fillPanel=new Lt("Fill color",de(Yt.defaultColorSet,["transparent"]),Nt.fillColor,en),Nt.fillPanel.onColorChanged=Nt.setFillColor,Nt.strokeWidthPanel=new je("Line width",Yt.defaultStrokeWidths,Yt.defaultStrokeWidth),Nt.strokeWidthPanel.onWidthChanged=Nt.setStrokeWidth,Nt.strokeStylePanel=new ne("Line style",Yt.defaultStrokeDasharrays,Yt.defaultStrokeDasharray),Nt.strokeStylePanel.onStyleChanged=Nt.setStrokeDasharray,Nt.opacityPanel=new sn("Opacity",Yt.defaultOpacitySteps,Nt.opacity),Nt.opacityPanel.onOpacityChanged=Nt.setOpacity,Nt}return ee(bt,Rt),bt.prototype.ownsTarget=function(Pt){return!(!Rt.prototype.ownsTarget.call(this,Pt)&&Pt!==this.visual)},bt.prototype.createVisual=function(){this.visual=he.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)},bt.prototype.pointerDown=function(Pt,It){Rt.prototype.pointerDown.call(this,Pt,It),this.state==="new"&&(this.createVisual(),this.moveVisual(Pt),this._state="creating")},bt.prototype.manipulate=function(Pt){Rt.prototype.manipulate.call(this,Pt)},bt.prototype.resize=function(Pt){Rt.prototype.resize.call(this,Pt),this.setSize()},bt.prototype.setSize=function(){Rt.prototype.setSize.call(this),he.setAttributes(this.visual,[["cx",(this.width/2).toString()],["cy",(this.height/2).toString()],["rx",(this.width/2).toString()],["ry",(this.height/2).toString()]])},bt.prototype.pointerUp=function(Pt){Rt.prototype.pointerUp.call(this,Pt),this.setSize()},bt.prototype.setStrokeColor=function(Pt){this.strokeColor=Pt,this.visual&&he.setAttributes(this.visual,[["stroke",this.strokeColor]]),this.colorChanged(Pt),this.stateChanged()},bt.prototype.setFillColor=function(Pt){this.fillColor=Pt,this.visual&&he.setAttributes(this.visual,[["fill",this.fillColor]]),this.fillColorChanged(Pt),this.stateChanged()},bt.prototype.setStrokeWidth=function(Pt){this.strokeWidth=Pt,this.visual&&he.setAttributes(this.visual,[["stroke-width",this.strokeWidth.toString()]]),this.stateChanged()},bt.prototype.setStrokeDasharray=function(Pt){this.strokeDasharray=Pt,this.visual&&he.setAttributes(this.visual,[["stroke-dasharray",this.strokeDasharray]]),this.stateChanged()},bt.prototype.setOpacity=function(Pt){this.opacity=Pt,this.visual&&he.setAttributes(this.visual,[["opacity",this.opacity.toString()]]),this.stateChanged()},Object.defineProperty(bt.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.fillPanel,this.strokeWidthPanel,this.strokeStylePanel,this.opacityPanel]},enumerable:!1,configurable:!0}),bt.prototype.getState=function(){var Pt=Object.assign({fillColor:this.fillColor,strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray,opacity:this.opacity},Rt.prototype.getState.call(this));return Pt.typeName=bt.typeName,Pt},bt.prototype.restoreState=function(Pt){var It=Pt;this.fillColor=It.fillColor,this.strokeColor=It.strokeColor,this.strokeWidth=It.strokeWidth,this.strokeDasharray=It.strokeDasharray,this.opacity=It.opacity,this.createVisual(),Rt.prototype.restoreState.call(this,Pt),this.setSize()},bt.prototype.scale=function(Pt,It){Rt.prototype.scale.call(this,Pt,It),this.setSize()},bt.typeName="EllipseMarker",bt.title="Ellipse marker",bt.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>',bt}(le),vn=function(Rt){function bt(Pt,It,Yt){return Rt.call(this,Pt,It,Yt)||this}return ee(bt,Rt),Object.defineProperty(bt.prototype,"tipLength",{get:function(){return 10+3*this.strokeWidth},enumerable:!1,configurable:!0}),bt.prototype.ownsTarget=function(Pt){return!(!Rt.prototype.ownsTarget.call(this,Pt)&&Pt!==this.tip1&&Pt!==this.tip2)},bt.prototype.createTips=function(){this.tip1=he.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(he.createTransform()),this.visual.appendChild(this.tip1),this.tip2=he.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(he.createTransform()),this.visual.appendChild(this.tip2)},bt.prototype.pointerDown=function(Pt,It){Rt.prototype.pointerDown.call(this,Pt,It),this.state==="creating"&&this.createTips()},bt.prototype.adjustVisual=function(){if(Rt.prototype.adjustVisual.call(this),this.tip1&&this.tip2&&(he.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()]]),he.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 Pt=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(Pt,this.x1,this.y1),this.tip1.transform.baseVal.replaceItem(It,0);var Yt=this.tip2.transform.baseVal.getItem(0);Yt.setRotate(Pt+180,this.x2,this.y2),this.tip2.transform.baseVal.replaceItem(Yt,0)}},Object.defineProperty(bt.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),bt.prototype.getState=function(){var Pt=Rt.prototype.getState.call(this);return Pt.typeName=bt.typeName,Pt},bt.prototype.restoreState=function(Pt){Rt.prototype.restoreState.call(this,Pt),this.createTips(),this.adjustVisual()},bt.typeName="MeasurementMarker",bt.title="Measurement marker",bt.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>',bt}(ge),zn=function(Rt){function bt(Pt,It,Yt){var Nt=Rt.call(this,Pt,It,Yt)||this;return Nt.strokePanel.colors=Yt.defaultColorSet,Nt.fillColor="transparent",Nt}return ee(bt,Rt),Object.defineProperty(bt.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),bt.prototype.getState=function(){var Pt=Rt.prototype.getState.call(this);return Pt.typeName=bt.typeName,Pt},bt.typeName="EllipseFrameMarker",bt.title="Ellipse frame marker",bt.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>',bt}(Gn),me=function(){function Rt(){this.undoStack=[],this.redoStack=[]}return Object.defineProperty(Rt.prototype,"isUndoPossible",{get:function(){return this.undoStack.length>0},enumerable:!1,configurable:!0}),Object.defineProperty(Rt.prototype,"isRedoPossible",{get:function(){return this.redoStack.length>0},enumerable:!1,configurable:!0}),Object.defineProperty(Rt.prototype,"undoStepCount",{get:function(){return this.undoStack.length},enumerable:!1,configurable:!0}),Object.defineProperty(Rt.prototype,"redoStepCount",{get:function(){return this.redoStack.length},enumerable:!1,configurable:!0}),Rt.prototype.addUndoStep=function(bt){this.undoStack.length!==0&&JSON.stringify(this.undoStack[this.undoStack.length-1])===JSON.stringify(bt)||(this.undoStack.push(bt),JSON.stringify(this.lastRedoStep)!==JSON.stringify(bt)&&this.redoStack.splice(0,this.redoStack.length))},Rt.prototype.replaceLastUndoStep=function(bt){this.undoStack.length>0&&(this.undoStack[this.undoStack.length-1]=bt)},Rt.prototype.getLastUndoStep=function(){return this.undoStack.length>0?this.undoStack[this.undoStack.length-1]:void 0},Rt.prototype.undo=function(){if(this.undoStack.length>1){var bt=this.undoStack.pop();return bt!==void 0&&this.redoStack.push(bt),this.undoStack.length>0?this.undoStack[this.undoStack.length-1]:void 0}},Rt.prototype.redo=function(){return this.lastRedoStep=this.redoStack.pop(),this.lastRedoStep},Rt}(),An=function(Rt){function bt(Pt,It,Yt){var Nt=Rt.call(this,Pt,It,Yt)||this;return Nt.strokeColor="transparent",Nt.strokeWidth=0,Nt.strokeDasharray="",Nt.curveX=0,Nt.curveY=0,Nt.manipulationStartCurveX=0,Nt.manipulationStartCurveY=0,Nt.setStrokeColor=Nt.setStrokeColor.bind(Nt),Nt.setStrokeWidth=Nt.setStrokeWidth.bind(Nt),Nt.setStrokeDasharray=Nt.setStrokeDasharray.bind(Nt),Nt.positionGrips=Nt.positionGrips.bind(Nt),Nt.addControlGrips=Nt.addControlGrips.bind(Nt),Nt.adjustVisual=Nt.adjustVisual.bind(Nt),Nt.setupControlBox=Nt.setupControlBox.bind(Nt),Nt.resize=Nt.resize.bind(Nt),Nt.strokeColor=Yt.defaultColor,Nt.strokeWidth=Yt.defaultStrokeWidth,Nt.strokeDasharray=Yt.defaultStrokeDasharray,Nt.strokePanel=new Lt("Line color",Yt.defaultColorSet,Yt.defaultColor),Nt.strokePanel.onColorChanged=Nt.setStrokeColor,Nt.strokeWidthPanel=new je("Line width",Yt.defaultStrokeWidths,Yt.defaultStrokeWidth),Nt.strokeWidthPanel.onWidthChanged=Nt.setStrokeWidth,Nt.strokeStylePanel=new ne("Line style",Yt.defaultStrokeDasharrays,Yt.defaultStrokeDasharray),Nt.strokeStylePanel.onStyleChanged=Nt.setStrokeDasharray,Nt}return ee(bt,Rt),bt.prototype.ownsTarget=function(Pt){return!(!Rt.prototype.ownsTarget.call(this,Pt)&&Pt!==this.visual&&Pt!==this.selectorCurve&&Pt!==this.visibleCurve&&!this.curveGrip.ownsTarget(Pt))},bt.prototype.getPathD=function(){return"M "+this.x1+" "+this.y1+" Q "+this.curveX+" "+this.curveY+", "+this.x2+" "+this.y2},bt.prototype.createVisual=function(){this.visual=he.createGroup(),this.selectorCurve=he.createPath(this.getPathD(),[["stroke","transparent"],["stroke-width",(this.strokeWidth+10).toString()],["fill","transparent"]]),this.visibleCurve=he.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)},bt.prototype.pointerDown=function(Pt,It){Rt.prototype.pointerDown.call(this,Pt,It),this.manipulationStartCurveX=this.curveX,this.manipulationStartCurveY=this.curveY,this.state==="new"&&(this.curveX=Pt.x,this.curveY=Pt.y),this.state==="new"?(this.createVisual(),this.adjustVisual(),this._state="creating"):this.curveGrip.ownsTarget(It)&&(this.activeGrip=this.curveGrip,this._state="resize")},bt.prototype.adjustVisual=function(){this.selectorCurve&&this.visibleCurve&&(this.selectorCurve.setAttribute("d",this.getPathD()),this.visibleCurve.setAttribute("d",this.getPathD()),he.setAttributes(this.visibleCurve,[["stroke",this.strokeColor]]),he.setAttributes(this.visibleCurve,[["stroke-width",this.strokeWidth.toString()]]),he.setAttributes(this.visibleCurve,[["stroke-dasharray",this.strokeDasharray.toString()]]))},bt.prototype.setupControlBox=function(){Rt.prototype.setupControlBox.call(this),this.curveControlLine1=he.createLine(this.x1,this.y1,this.curveX,this.curveY,[["stroke","black"],["stroke-width","1"],["stroke-opacity","0.5"],["stroke-dasharray","3, 2"]]),this.curveControlLine2=he.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)},bt.prototype.addControlGrips=function(){this.curveGrip=this.createGrip(),this.curveX=0,this.curveY=0,Rt.prototype.addControlGrips.call(this)},bt.prototype.positionGrips=function(){Rt.prototype.positionGrips.call(this);var Pt=this.curveGrip.GRIP_SIZE;this.positionGrip(this.curveGrip.visual,this.curveX-Pt/2,this.curveY-Pt/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()))},bt.prototype.manipulate=function(Pt){this.state==="move"&&(this.curveX=this.manipulationStartCurveX+Pt.x-this.manipulationStartX,this.curveY=this.manipulationStartCurveY+Pt.y-this.manipulationStartY),Rt.prototype.manipulate.call(this,Pt)},bt.prototype.resize=function(Pt){this.activeGrip===this.curveGrip&&(this.curveX=Pt.x,this.curveY=Pt.y),Rt.prototype.resize.call(this,Pt),this.state==="creating"&&(this.curveX=this.x1+(this.x2-this.x1)/2,this.curveY=this.y1+(this.y2-this.y1)/2)},bt.prototype.setStrokeColor=function(Pt){this.strokeColor=Pt,this.adjustVisual(),this.colorChanged(Pt)},bt.prototype.setStrokeWidth=function(Pt){this.strokeWidth=Pt,this.adjustVisual()},bt.prototype.setStrokeDasharray=function(Pt){this.strokeDasharray=Pt,this.adjustVisual()},bt.prototype.scale=function(Pt,It){this.curveX=this.curveX*Pt,this.curveY=this.curveY*It,Rt.prototype.scale.call(this,Pt,It)},Object.defineProperty(bt.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),bt.prototype.getState=function(){var Pt=Object.assign({strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray,curveX:this.curveX,curveY:this.curveY},Rt.prototype.getState.call(this));return Pt.typeName=bt.typeName,Pt},bt.prototype.restoreState=function(Pt){Rt.prototype.restoreState.call(this,Pt);var It=Pt;this.strokeColor=It.strokeColor,this.strokeWidth=It.strokeWidth,this.strokeDasharray=It.strokeDasharray,this.curveX=It.curveX,this.curveY=It.curveY,this.createVisual(),this.adjustVisual()},bt.typeName="CurveMarker",bt.title="Curve marker",bt.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>',bt}(Ee),ui=function(Rt){function bt(Pt,It,Yt){var Nt=Rt.call(this,Pt,It,Yt)||this;return Nt.fillColor="transparent",Nt.strokeColor="transparent",Nt.strokeWidth=0,Nt.strokeDasharray="",Nt.textColor="transparent",Nt.fontSize="1rem",Nt.isMoved=!1,Nt.captionText="Caption",Nt.PADDING=5,Nt.captionBoxWidth=0,Nt.captionBoxHeight=0,Nt.strokeColor=Yt.defaultColor,Nt.strokeWidth=Yt.defaultStrokeWidth,Nt.strokeDasharray=Yt.defaultStrokeDasharray,Nt.fillColor=Yt.defaultFillColor,Nt.textColor=Yt.defaultStrokeColor,Nt.fontFamily=Yt.defaultFontFamily,Nt.fontSize=Yt.defaultCaptionFontSize,Nt.captionText=Yt.defaultCaptionText,Nt.setStrokeColor=Nt.setStrokeColor.bind(Nt),Nt.setFillColor=Nt.setFillColor.bind(Nt),Nt.setStrokeWidth=Nt.setStrokeWidth.bind(Nt),Nt.setStrokeDasharray=Nt.setStrokeDasharray.bind(Nt),Nt.createVisual=Nt.createVisual.bind(Nt),Nt.sizeCaption=Nt.sizeCaption.bind(Nt),Nt.setCaptionText=Nt.setCaptionText.bind(Nt),Nt.showTextEditor=Nt.showTextEditor.bind(Nt),Nt.positionTextEditor=Nt.positionTextEditor.bind(Nt),Nt.finishTextEditing=Nt.finishTextEditing.bind(Nt),Nt.setFont=Nt.setFont.bind(Nt),Nt.setTextColor=Nt.setTextColor.bind(Nt),Nt.strokePanel=new Lt("Line color",de(Yt.defaultColorSet,["transparent"]),Nt.strokeColor),Nt.strokePanel.onColorChanged=Nt.setStrokeColor,Nt.fillPanel=new Lt("Fill color",de(Yt.defaultColorSet,["transparent"]),Nt.fillColor,en),Nt.fillPanel.onColorChanged=Nt.setFillColor,Nt.strokeWidthPanel=new je("Line width",Yt.defaultStrokeWidths,Yt.defaultStrokeWidth),Nt.strokeWidthPanel.onWidthChanged=Nt.setStrokeWidth,Nt.strokeStylePanel=new ne("Line style",Yt.defaultStrokeDasharrays,Yt.defaultStrokeDasharray),Nt.strokeStylePanel.onStyleChanged=Nt.setStrokeDasharray,Nt.fontFamilyPanel=new Ue("Font",Yt.defaultFontFamilies,Yt.defaultFontFamily),Nt.fontFamilyPanel.onFontChanged=Nt.setFont,Nt.textColorPanel=new Lt("Text color",Yt.defaultColorSet,Nt.textColor,Te),Nt.textColorPanel.onColorChanged=Nt.setTextColor,Nt}return ee(bt,Rt),bt.prototype.ownsTarget=function(Pt){return!(!Rt.prototype.ownsTarget.call(this,Pt)&&Pt!==this.visual&&Pt!==this.frame&&Pt!==this.captionBg&&Pt!==this.captionElement)},bt.prototype.createVisual=function(){this.visual=he.createGroup(),this.addMarkerVisualToContainer(this.visual),this.captionBg=he.createRect(1,1,[["fill",this.fillColor]]),this.visual.appendChild(this.captionBg),this.captionElement=he.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=he.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()},bt.prototype.setCaptionText=function(Pt){this.captionText=Pt,this.captionElement.textContent=this.captionText,this.sizeCaption()},bt.prototype.pointerDown=function(Pt,It){Rt.prototype.pointerDown.call(this,Pt,It),this.isMoved=!1,this.pointerDownPoint=Pt,this.pointerDownTimestamp=Date.now(),this.state==="new"&&(this.createVisual(),this.moveVisual(Pt),this._state="creating")},bt.prototype.manipulate=function(Pt){Rt.prototype.manipulate.call(this,Pt),this.pointerDownPoint!==void 0&&(this.isMoved=Math.abs(Pt.x-this.pointerDownPoint.x)>5||Math.abs(Pt.y-this.pointerDownPoint.y)>5)},bt.prototype.resize=function(Pt){Rt.prototype.resize.call(this,Pt),this.setSize()},bt.prototype.sizeCaption=function(){var Pt=this.captionElement.getBBox();this.captionText.trim()!==""?(this.captionBoxWidth=Pt.width+2*this.PADDING,this.captionBoxHeight=Pt.height+2*this.PADDING):(this.captionBoxWidth=0,this.captionBoxHeight=0),he.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')"]]),he.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')"]])},bt.prototype.showTextEditor=function(){var Pt=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"&&Pt.finishTextEditing(Pt.textEditBox.value)}),this.textEditBox.addEventListener("keyup",function(It){It.cancelBubble=!0}),this.textEditBox.addEventListener("blur",function(){Pt.finishTextEditing(Pt.textEditBox.value)}),this.textEditDiv.addEventListener("pointerup",function(){Pt.finishTextEditing(Pt.textEditBox.value)}),this.positionTextEditor(),this.textEditBox.focus()},bt.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"))},bt.prototype.finishTextEditing=function(Pt){this.setCaptionText(Pt.trim()),this.overlayContainer.innerHTML="",this.stateChanged()},bt.prototype.setFont=function(Pt){this.captionElement&&he.setAttributes(this.captionElement,[["font-family",Pt]]),this.fontFamily=Pt,this.textEditBox&&(this.textEditBox.style.fontFamily=this.fontFamily),this.sizeCaption(),this.stateChanged()},bt.prototype.setTextColor=function(Pt){this.captionElement&&he.setAttributes(this.captionElement,[["fill",Pt]]),this.textColor=Pt,this.textEditBox&&(this.textEditBox.style.color=this.textColor),this.stateChanged()},bt.prototype.setSize=function(){Rt.prototype.setSize.call(this),he.setAttributes(this.frame,[["width",this.width.toString()],["height",this.height.toString()]]),this.sizeCaption()},bt.prototype.pointerUp=function(Pt){Rt.prototype.pointerUp.call(this,Pt),this.setSize(),!this.isMoved&&Date.now()-this.pointerDownTimestamp>500&&this.showTextEditor(),this.pointerDownPoint=void 0},bt.prototype.dblClick=function(Pt,It){Rt.prototype.dblClick.call(this,Pt,It),this.showTextEditor()},bt.prototype.setStrokeColor=function(Pt){this.strokeColor=Pt,this.frame&&he.setAttributes(this.frame,[["stroke",this.strokeColor]]),this.colorChanged(Pt),this.stateChanged()},bt.prototype.setFillColor=function(Pt){this.fillColor=Pt,this.captionBg&&he.setAttributes(this.captionBg,[["fill",this.fillColor]]),this.fillColorChanged(Pt),this.stateChanged()},bt.prototype.setStrokeWidth=function(Pt){this.strokeWidth=Pt,this.frame&&he.setAttributes(this.frame,[["stroke-width",this.strokeWidth.toString()]]),this.stateChanged()},bt.prototype.setStrokeDasharray=function(Pt){this.strokeDasharray=Pt,this.frame&&he.setAttributes(this.frame,[["stroke-dasharray",this.strokeDasharray]]),this.stateChanged()},Object.defineProperty(bt.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.fillPanel,this.strokeWidthPanel,this.strokeStylePanel,this.fontFamilyPanel,this.textColorPanel]},enumerable:!1,configurable:!0}),bt.prototype.getState=function(){var Pt=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},Rt.prototype.getState.call(this));return Pt.typeName=this.typeName,Pt},bt.prototype.restoreState=function(Pt){var It=Pt;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(),Rt.prototype.restoreState.call(this,Pt),this.setSize()},bt.prototype.scale=function(Pt,It){Rt.prototype.scale.call(this,Pt,It),this.setSize()},bt.typeName="CaptionFrameMarker",bt.title="Caption frame marker",bt.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>',bt}(le),un=function(){function Rt(bt,Pt){Pt===void 0&&(Pt=!1),this.cancelable=!1,this._defaultPrevented=!1,this.markerArea=bt,this.cancelable=Pt}return Object.defineProperty(Rt.prototype,"defaultPrevented",{get:function(){return this._defaultPrevented},enumerable:!1,configurable:!0}),Rt.prototype.preventDefault=function(){this._defaultPrevented=!0},Rt}(),ln=function(Rt){function bt(Pt,It,Yt){var Nt=Rt.call(this,Pt,!1)||this;return Nt.dataUrl=It,Nt.state=Yt,Nt}return ee(bt,Rt),bt}(un),oi=function(Rt){function bt(Pt,It,Yt){Yt===void 0&&(Yt=!1);var Nt=Rt.call(this,Pt,Yt)||this;return Nt.marker=It,Nt}return ee(bt,Rt),bt}(un),xn=function(){function Rt(){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 Rt.prototype.addEventListener=function(bt,Pt){this[bt].push(Pt)},Rt.prototype.removeEventListener=function(bt,Pt){var It=this[bt].indexOf(Pt);It>-1&&this[bt].splice(It,1)},Rt}(),Ie=function(){function Rt(bt){this.touchPoints=0,this._availableMarkerTypes=this.DEFAULT_MARKER_TYPES,this.mode="select",this.markers=[],this.isDragging=!1,this.renderEventListeners=[],this.closeEventListeners=[],this.settings=new ue,this._isOpen=!1,this.undoRedoManager=new me,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 xn,this._silentRenderMode=!1,this._isFocused=!1,this._instanceNo=Rt.instanceCounter++,this.styles=new nt(this.instanceNo),this.uiStyleSettings=this.styles.settings,this.target=bt,this.targetRoot=document.body,this.width=bt.clientWidth,this.height=bt.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(Rt.prototype,"ALL_MARKER_TYPES",{get:function(){return[Le,_e,Jt,nn,zn,Gn,cn,Cn,vn,De,ge,An,ui]},enumerable:!1,configurable:!0}),Object.defineProperty(Rt.prototype,"DEFAULT_MARKER_TYPES",{get:function(){return[Le,_e,Jt,nn,Gn,cn,Cn]},enumerable:!1,configurable:!0}),Object.defineProperty(Rt.prototype,"BASIC_MARKER_TYPES",{get:function(){return[Le,_e,Jt,nn,cn]},enumerable:!1,configurable:!0}),Object.defineProperty(Rt.prototype,"availableMarkerTypes",{get:function(){return this._availableMarkerTypes},set:function(bt){var Pt=this;this._availableMarkerTypes.splice(0),bt.forEach(function(It){if(typeof It=="string"){var Yt=Pt.ALL_MARKER_TYPES.find(function(Nt){return Nt.typeName===It});Yt!==void 0&&Pt._availableMarkerTypes.push(Yt)}else Pt._availableMarkerTypes.push(It)})},enumerable:!1,configurable:!0}),Object.defineProperty(Rt.prototype,"currentMarker",{get:function(){return this._currentMarker},enumerable:!1,configurable:!0}),Object.defineProperty(Rt.prototype,"isOpen",{get:function(){return this._isOpen},enumerable:!1,configurable:!0}),Object.defineProperty(Rt.prototype,"isUndoPossible",{get:function(){return!(!this.undoRedoManager||!this.undoRedoManager.isUndoPossible)},enumerable:!1,configurable:!0}),Object.defineProperty(Rt.prototype,"isRedoPossible",{get:function(){return!(!this.undoRedoManager||!this.undoRedoManager.isRedoPossible)},enumerable:!1,configurable:!0}),Object.defineProperty(Rt.prototype,"zoomLevel",{get:function(){return this._zoomLevel},set:function(bt){this._zoomLevel=bt,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(Rt.prototype,"instanceNo",{get:function(){return this._instanceNo},enumerable:!1,configurable:!0}),Rt.prototype.open=function(){this.setupResizeObserver(),this.setEditingTarget(),this.setTopLeft(),this.initMarkerCanvas(),this.initOverlay(),this.attachEvents(),this.settings.displayMode==="popup"&&this.onPopupTargetResize(),Ne.isLicensed||this.addLogo(),this._isOpen=!0,this._isFocused=!0},Rt.prototype.show=function(){var bt=this;this.styles.styleSheetRoot===void 0&&kt.styleSheetRoot!==void 0&&(this.styles.styleSheetRoot=kt.styleSheetRoot),this.setWindowHeight(),this.showUI(),this.open(),this.eventListeners.show.forEach(function(Pt){return Pt(new un(bt))})},Rt.prototype.render=function(){return Fe(this,void 0,void 0,function(){var bt;return ye(this,function(Pt){switch(Pt.label){case 0:return this.setCurrentMarker(),(bt=new He).naturalSize=this.renderAtNaturalSize,bt.imageType=this.renderImageType,bt.imageQuality=this.renderImageQuality,bt.markersOnly=this.renderMarkersOnly,bt.width=this.renderWidth,bt.height=this.renderHeight,[4,bt.rasterize(this.target instanceof HTMLImageElement?this.target:null,this.markerImage,this.renderTarget)];case 1:return Pt.sent(),[4,bt.rasterize(this.target instanceof HTMLImageElement?this.target:null,this.markerImage,this.renderTarget)];case 2:return[2,Pt.sent()]}})})},Rt.prototype.close=function(bt){var Pt=this;if(bt===void 0&&(bt=!1),this.isOpen){var It=!1;bt||this.eventListeners.beforeclose.forEach(function(Yt){var Nt=new un(Pt,!0);Yt(Nt),Nt.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(Yt){return Yt(new un(Pt))}),this.detachEvents(),this._isOpen=!1)}},Rt.prototype.addMarkersToToolbar=function(){for(var bt,Pt=[],It=0;It<arguments.length;It++)Pt[It]=arguments[It];(bt=this._availableMarkerTypes).push.apply(bt,Pt)},Rt.prototype.addRenderEventListener=function(bt){this.addEventListener("render",function(Pt){bt(Pt.dataUrl,Pt.state)})},Rt.prototype.removeRenderEventListener=function(bt){},Rt.prototype.addCloseEventListener=function(bt){this.addEventListener("close",function(){bt()})},Rt.prototype.removeCloseEventListener=function(bt){},Rt.prototype.setupResizeObserver=function(){var bt=this;this.settings.displayMode==="inline"?window.ResizeObserver&&(this.targetObserver=new ResizeObserver(function(){bt.resize(bt.target.clientWidth,bt.target.clientHeight)}),this.targetObserver.observe(this.target)):this.settings.displayMode==="popup"&&(window.ResizeObserver&&(this.targetObserver=new ResizeObserver(function(){return bt.onPopupTargetResize()}),this.targetObserver.observe(this.editorCanvas)),window.addEventListener("resize",this.setWindowHeight))},Rt.prototype.onPopupTargetResize=function(){var bt=1*this.target.clientWidth/this.target.clientHeight,Pt=this.editorCanvas.clientWidth/bt>this.editorCanvas.clientHeight?this.editorCanvas.clientHeight*bt:this.editorCanvas.clientWidth,It=Pt<this.editorCanvas.clientWidth?this.editorCanvas.clientHeight:this.editorCanvas.clientWidth/bt;this.resize(Pt,It)},Rt.prototype.setWindowHeight=function(){this.windowHeight=window.innerHeight},Rt.prototype.resize=function(bt,Pt){this._isResizing=!0;var It=bt/this.imageWidth,Yt=Pt/this.imageHeight;this.imageWidth=Math.round(bt),this.imageHeight=Math.round(Pt),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,Yt),this._isResizing=!1},Rt.prototype.scaleMarkers=function(bt,Pt){var It,Yt=this;this._currentMarker&&this._currentMarker instanceof nn?this._currentMarker.scale(bt,Pt):(It=this._currentMarker,this.setCurrentMarker()),this.markers.forEach(function(Nt){Nt!==Yt._currentMarker&&Nt.scale(bt,Pt)}),It!==void 0&&this.setCurrentMarker(It)},Rt.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"},Rt.prototype.setTopLeft=function(){var bt=this.editingTarget.getBoundingClientRect(),Pt=this.editorCanvas.getBoundingClientRect();this.left=bt.left-Pt.left,this.top=bt.top-Pt.top},Rt.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)},Rt.prototype.addDefs=function(){for(var bt,Pt=[],It=0;It<arguments.length;It++)Pt[It]=arguments[It];this.defs=he.createDefs(),this.addDefsToImage(),(bt=this.defs).append.apply(bt,Pt)},Rt.prototype.addDefsToImage=function(){this.defs&&this.markerImage.insertBefore(this.defs,this.markerImage.firstChild)},Rt.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)},Rt.prototype.positionMarkerImage=function(){this.markerImageHolder.style.top=this.top/this.zoomLevel+"px",this.markerImageHolder.style.left=this.left/this.zoomLevel+"px"},Rt.prototype.attachEvents=function(){this.markerImage.addEventListener("pointerdown",this.onPointerDown),this.markerImage.addEventListener("dblclick",this.onDblClick),this.attachWindowEvents()},Rt.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)},Rt.prototype.detachEvents=function(){this.markerImage.removeEventListener("pointerdown",this.onPointerDown),this.markerImage.removeEventListener("dblclick",this.onDblClick),this.detachWindowEvents()},Rt.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)},Rt.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 bt=document.createElement("a");bt.href="https://markerjs.com/",bt.target="_blank",bt.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>',bt.title="Powered by marker.js",bt.style.display="grid",bt.style.alignItems="center",bt.style.justifyItems="center",bt.style.padding="3px",bt.style.width="20px",bt.style.height="20px",this.logoUI.appendChild(bt),this.editorCanvas.appendChild(this.logoUI),this.logoUI.style.position="absolute",this.logoUI.style.pointerEvents="all",this.positionLogo()},Rt.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")},Rt.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"},Rt.prototype.restoreOverflow=function(){document.body.style.overflow=this.bodyOverflowState,window.scroll({top:this.scrollYState,left:this.scrollXState})},Rt.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 bt=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=bt+"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 lt(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 gt(this.uiDiv,this.settings.displayMode,this.uiStyleSettings,this.styles),this.toolbox.show(this._silentRenderMode||this.uiStyleSettings.hideToolbox?"hidden":"visible")},Rt.prototype.closeUI=function(){this.settings.displayMode==="popup"&&this.restoreOverflow(),this.targetRoot.removeChild(this.coverDiv)},Rt.prototype.removeMarker=function(bt){this.markerImage.removeChild(bt.container),this.markers.indexOf(bt)>-1&&this.markers.splice(this.markers.indexOf(bt),1),bt.dispose()},Rt.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())},Rt.prototype.toolbarButtonClicked=function(bt,Pt){if(bt==="marker"&&Pt!==void 0)this.createNewMarker(Pt);else if(bt==="action")switch(Pt){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()}},Rt.prototype.deleteSelectedMarker=function(){var bt=this;if(this._currentMarker!==void 0){var Pt=!1;if(this.eventListeners.markerbeforedelete.forEach(function(Yt){var Nt=new oi(bt,bt._currentMarker,!0);Yt(Nt),Nt.defaultPrevented&&(Pt=!0)}),!Pt){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(Yt){return Yt(new oi(bt,It))})}}},Rt.prototype.clear=function(){var bt=this,Pt=!1;if(this.markers.length>0&&(this.eventListeners.markerbeforedelete.forEach(function(xe){var _n=new oi(bt,void 0,!0);xe(_n),_n.defaultPrevented&&(Pt=!0)}),!Pt)){this.setCurrentMarker();for(var It=function(xe){var _n=Yt.markers[xe];Yt.setCurrentMarker(Yt.markers[xe]),Yt._currentMarker.dispose(),Yt.markerImage.removeChild(Yt._currentMarker.container),Yt.markers.splice(Yt.markers.indexOf(Yt._currentMarker),1),Yt.eventListeners.markerdelete.forEach(function(ni){return ni(new oi(bt,_n))})},Yt=this,Nt=this.markers.length-1;Nt>=0;Nt--)It(Nt);this.addUndoStep()}},Object.defineProperty(Rt.prototype,"isNotesAreaOpen",{get:function(){return this.notesArea!==void 0},enumerable:!1,configurable:!0}),Rt.prototype.showNotesEditor=function(){var bt;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=(bt=this._currentMarker.notes)!==null&&bt!==void 0?bt:"",this.overlayContainer.appendChild(this.notesArea))},Rt.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)},Rt.prototype.selectLastMarker=function(){this.markers.length>0?this.setCurrentMarker(this.markers[this.markers.length-1]):this.setCurrentMarker()},Rt.prototype.addUndoStep=function(){var bt=this;if(this._currentMarker===void 0||this._currentMarker.state!=="edit"){var Pt=this.getState(),It=this.undoRedoManager.getLastUndoStep();if(!It||It.width===Pt.width&&It.height===Pt.height){var Yt=this.undoRedoManager.undoStepCount;this.undoRedoManager.addUndoStep(Pt),Yt<this.undoRedoManager.undoStepCount&&this.eventListeners.statechange.forEach(function(Nt){return Nt(new un(bt))})}else this.undoRedoManager.replaceLastUndoStep(Pt),this.eventListeners.statechange.forEach(function(Nt){return Nt(new un(bt))})}},Rt.prototype.undo=function(){this.switchToSelectMode(),this.addUndoStep(),this.undoStep()},Rt.prototype.undoStep=function(){var bt=this,Pt=this.undoRedoManager.undo();Pt!==void 0&&(this.restoreState(Pt),this.addDefsToImage(),this.selectLastMarker(),this.eventListeners.statechange.forEach(function(It){return It(new un(bt))}))},Rt.prototype.redo=function(){this.switchToSelectMode(),this.redoStep()},Rt.prototype.redoStep=function(){var bt=this,Pt=this.undoRedoManager.redo();Pt!==void 0&&(this.restoreState(Pt),this.addDefsToImage(),this.selectLastMarker(),this.eventListeners.statechange.forEach(function(It){return It(new un(bt))}))},Rt.prototype.stepZoom=function(){var bt=this.zoomSteps.indexOf(this.zoomLevel);this.zoomLevel=bt<this.zoomSteps.length-1?this.zoomSteps[bt+1]:this.zoomSteps[0]},Rt.prototype.panTo=function(bt){this.contentDiv.scrollBy({left:this.prevPanPoint.x-bt.x,top:this.prevPanPoint.y-bt.y}),this.prevPanPoint=bt},Rt.prototype.startRenderAndClose=function(){return Fe(this,void 0,void 0,function(){var bt,Pt,It=this;return ye(this,function(Yt){switch(Yt.label){case 0:return[4,this.render()];case 1:return bt=Yt.sent(),Pt=this.getState(),this.eventListeners.render.forEach(function(Nt){return Nt(new ln(It,bt,Pt))}),this.close(!0),[2]}})})},Rt.prototype.getState=function(bt){bt===!0&&this.setCurrentMarker();var Pt={width:this.imageWidth,height:this.imageHeight,markers:[]};return this.markers.forEach(function(It){return Pt.markers.push(It.getState())}),Pt},Rt.prototype.restoreState=function(bt){var Pt=this;for(this.markers.splice(0);this.markerImage.lastChild;)this.markerImage.removeChild(this.markerImage.lastChild);bt.markers.forEach(function(It){var Yt=Pt._availableMarkerTypes.find(function(xe){return xe.typeName===It.typeName});if(Yt!==void 0){var Nt=Pt.addNewMarker(Yt);Nt.restoreState(It),Pt.markers.push(Nt)}}),bt.width&&bt.height&&(bt.width!==this.imageWidth||bt.height!==this.imageHeight)&&this.scaleMarkers(this.imageWidth/bt.width,this.imageHeight/bt.height),this.eventListeners.restorestate.forEach(function(It){return It(new un(Pt))})},Rt.prototype.addNewMarker=function(bt){var Pt=he.createGroup();return this.markerImage.appendChild(Pt),new bt(Pt,this.overlayContainer,this.settings)},Rt.prototype.createNewMarker=function(bt){var Pt,It=this;(Pt=typeof bt=="string"?this._availableMarkerTypes.find(function(Yt){return Yt.typeName===bt}):bt)&&(this.setCurrentMarker(),this.addUndoStep(),this._currentMarker=this.addNewMarker(Pt),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(Pt.typeName),this.toolbox.setPanelButtons(this._currentMarker.toolboxPanels),this.eventListeners.markercreating.forEach(function(Yt){return Yt(new oi(It,It._currentMarker))}))},Rt.prototype.markerCreated=function(bt){var Pt=this;this.mode="select",this.markerImage.style.cursor="default",this.markers.push(bt),this.setCurrentMarker(bt),bt instanceof _e&&this.settings.newFreehandMarkerOnPointerUp?this.createNewMarker(_e):this.toolbar.setSelectMode(),this.addUndoStep(),this.eventListeners.markercreate.forEach(function(It){return It(new oi(Pt,Pt._currentMarker))})},Rt.prototype.colorChanged=function(bt){this.settings.defaultColorsFollowCurrentColors&&(this.settings.defaultColor=bt,this.settings.defaultStrokeColor=bt)},Rt.prototype.fillColorChanged=function(bt){this.settings.defaultColorsFollowCurrentColors&&(this.settings.defaultFillColor=bt)},Rt.prototype.markerStateChanged=function(bt){var Pt=this;this.eventListeners.markerchange.forEach(function(It){return It(new oi(Pt,bt))})},Rt.prototype.setCurrentMarker=function(bt){var Pt=this;this._currentMarker!==bt&&this._currentMarker!==void 0&&(this._currentMarker.deselect(),this.toolbar.setCurrentMarker(),this.toolbox.setPanelButtons([]),this._isResizing||this.eventListeners.markerdeselect.forEach(function(It){return It(new oi(Pt,Pt._currentMarker))})),this._currentMarker=bt,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 oi(Pt,Pt._currentMarker))}))},Rt.prototype.onPointerDown=function(bt){if(this._isFocused||this.focus(),this.touchPoints++,this.touchPoints===1||bt.pointerType!=="touch")if(this._currentMarker===void 0||this._currentMarker.state!=="new"&&this._currentMarker.state!=="creating"){if(this.mode==="select"){var Pt=this.markers.find(function(It){return It.ownsTarget(bt.target)});Pt!==void 0?(this.setCurrentMarker(Pt),this.isDragging=!0,this._currentMarker.pointerDown(this.clientToLocalCoordinates(bt.clientX,bt.clientY),bt.target)):(this.setCurrentMarker(),this.isDragging=!0,this.prevPanPoint={x:bt.clientX,y:bt.clientY})}}else this.isDragging=!0,this._currentMarker.pointerDown(this.clientToLocalCoordinates(bt.clientX,bt.clientY))},Rt.prototype.onDblClick=function(bt){if(this._isFocused||this.focus(),this.mode==="select"){var Pt=this.markers.find(function(It){return It.ownsTarget(bt.target)});Pt!==void 0&&Pt!==this._currentMarker&&this.setCurrentMarker(Pt),this._currentMarker!==void 0?this._currentMarker.dblClick(this.clientToLocalCoordinates(bt.clientX,bt.clientY),bt.target):this.setCurrentMarker()}},Rt.prototype.onPointerMove=function(bt){this.touchPoints!==1&&bt.pointerType==="touch"||(this._currentMarker!==void 0||this.isDragging)&&(this._currentMarker!==void 0&&this._currentMarker.state==="edit"||bt.preventDefault(),this._currentMarker!==void 0?this._currentMarker.manipulate(this.clientToLocalCoordinates(bt.clientX,bt.clientY)):this.zoomLevel>1&&this.panTo({x:bt.clientX,y:bt.clientY}))},Rt.prototype.onPointerUp=function(bt){this.touchPoints>0&&this.touchPoints--,this.touchPoints===0&&this.isDragging&&this._currentMarker!==void 0&&this._currentMarker.pointerUp(this.clientToLocalCoordinates(bt.clientX,bt.clientY)),this.isDragging=!1,this.addUndoStep()},Rt.prototype.onPointerOut=function(){this.touchPoints>0&&this.touchPoints--},Rt.prototype.onKeyUp=function(bt){this._currentMarker===void 0||this.notesArea!==void 0||bt.key!=="Delete"&&bt.key!=="Backspace"||this.deleteSelectedMarker()},Rt.prototype.clientToLocalCoordinates=function(bt,Pt){var It=this.markerImage.getBoundingClientRect();return{x:(bt-It.left)/this.zoomLevel,y:(Pt-It.top)/this.zoomLevel}},Rt.prototype.onWindowResize=function(){this.positionUI()},Rt.prototype.positionUI=function(){switch(this.setTopLeft(),this.settings.displayMode){case"inline":var bt=this.target.getClientRects().item(0).y>this.styles.settings.toolbarHeight?this.target.offsetTop-this.styles.settings.toolbarHeight:0;this.coverDiv.style.top=bt+"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()},Rt.prototype.addLicenseKey=function(bt){Ne.addKey(bt)},Rt.prototype.addEventListener=function(bt,Pt){this.eventListeners.addEventListener(bt,Pt)},Rt.prototype.removeEventListener=function(bt,Pt){this.eventListeners.removeEventListener(bt,Pt)},Rt.prototype.renderState=function(bt){this._silentRenderMode=!0,this.settings.displayMode="inline",this.isOpen||this.show(),this.restoreState(bt),this.startRenderAndClose(),this._silentRenderMode=!1},Object.defineProperty(Rt.prototype,"isFocused",{get:function(){return this._isFocused},enumerable:!1,configurable:!0}),Rt.prototype.focus=function(){var bt=this;this._isFocused||(this.attachWindowEvents(),this._isFocused=!0,this._previousCurrentMarker!==void 0&&this.setCurrentMarker(this._previousCurrentMarker),this.eventListeners.focus.forEach(function(Pt){return Pt(new un(bt))}))},Rt.prototype.blur=function(){var bt=this;this._isFocused&&(this.detachWindowEvents(),this._isFocused=!1,this._previousCurrentMarker=this._currentMarker,this.setCurrentMarker(),this.eventListeners.blur.forEach(function(Pt){return Pt(new un(bt))}))},Rt.instanceCounter=0,Rt}(),Ze=Ft(99064),Hn=Ft(955),qe=(Rt,bt,Pt)=>new Promise((It,Yt)=>{var Nt=ni=>{try{_n(Pt.next(ni))}catch(ei){Yt(ei)}},xe=ni=>{try{_n(Pt.throw(ni))}catch(ei){Yt(ei)}},_n=ni=>ni.done?It(ni.value):Promise.resolve(ni.value).then(Nt,xe);_n((Pt=Pt.apply(Rt,bt)).next())}),Pn=({data:Rt,className:bt,fullWidth:Pt,style:It={},onClose:Yt,onOk:Nt,showFullTools:xe,noAssociationId:_n})=>{const ni=(0,pt.useRef)(null),ei=(0,pt.useRef)(null),ii=(0,pt.useRef)(null),Hi=(0,pt.useRef)(null),[hi,Jn]=(0,pt.useState)(!1),[Vi,er]=(0,pt.useState)("\u6B63\u5728\u52A0\u8F7D\u4E2D");(0,pt.useEffect)(()=>(ii.current||(ii.current=document.createElement("style"),document.head.appendChild(ii.current)),Rt!=null&&Rt.visible?(document.body.setAttribute("data-custom","y-hidden"),ii.current.innerHTML=" html { overflow-y: hidden; }",Rt!=null&&Rt.src&&nr()):(document.body.removeAttribute("data-custom"),ii.current&&(document.head.removeChild(ii.current),ii.current=null)),()=>{document.body.removeAttribute("data-custom"),ii.current&&(document.head.removeChild(ii.current),ii.current=null)}),[Rt==null?void 0:Rt.visible]);const nr=()=>qe(void 0,null,function*(){Jn(!0),er("\u6B63\u5728\u52A0\u8F7D\u4E2D");const _i=yield(0,Hn.ZJ)(Rt==null?void 0:Rt.src);ni.current.src="",ni.current.src=_i,ni.current.onload=function(){or()},Jn(!1),er("")}),sr=_i=>qe(void 0,null,function*(){Jn(!0),er("\u6B63\u5728\u4FDD\u5B58\u4E2D");const gr=yield(0,Ze.ZP)("/api/attachments.json",{method:"post",body:{file_type:"base64",original_filename:Rt.title,file:_i.dataUrl}});gr!=null&&gr.id&&!_n?(yield(0,Ze.ZP)(`/api/attachments/${Rt.id}/add_subitem.json`,{method:"post",body:{subitem_id:gr==null?void 0:gr.id,settings:JSON.stringify(_i.state)}})).status===0&&Nt():gr!=null&&gr.id&&Nt(gr),Jn(!1),er("")}),kr=()=>{const _i=document.querySelector('a[href="https://markerjs.com/"]');_i&&_i.parentNode&&(_i.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(Mr=>{const Ei=document.querySelector(Mr.name);Ei&&Ei.setAttribute("title",Mr.title)})},or=()=>{ei.current=new Ie(ni.current),ei.current.targetRoot=Hi.current,ei.current.addEventListener("render",sr),ei.current.addEventListener("beforeclose",Yt),xe&&(ei.current.availableMarkerTypes=ei.current.ALL_MARKER_TYPES,ei.current.uiStyleSettings.redoButtonVisible=!0,ei.current.uiStyleSettings.notesButtonVisible=!0,ei.current.uiStyleSettings.zoomButtonVisible=!0,ei.current.uiStyleSettings.zoomOutButtonVisible=!0,ei.current.uiStyleSettings.clearButtonVisible=!0),window.markerArea=ei.current.uiStyleSettings,ei.current.show(),Rt!=null&&Rt.snapshotData&&ei.current.restoreState(Rt.snapshotData),setTimeout(()=>{window.scrollTo(0,0),kr()},300)};return pt.createElement(pt.Fragment,null,(Rt==null?void 0:Rt.visible)&&pt.createElement(Pe.Z,{spinning:hi,tip:Vi,style:{position:"absolute",width:"100vw"}},pt.createElement("div",{ref:Hi,className:Me()(Ht.imageDimensions,bt,Pt?Ht.fullWidth:""),style:It},pt.createElement("img",{className:Ht.img,ref:ni}))))}},14791:function(fn,Bn,Ft){"use strict";Ft.d(Bn,{Z:function(){return oi},$:function(){return ln}});var pt=Ft(59301),Ht={flex_box_center:"flex_box_center___ILe3s",flex_space_between:"flex_space_between___c0XhE",flex_box_vertical_center:"flex_box_vertical_center___Iusj1",flex_box_center_end:"flex_box_center_end___DIVMO",flex_box_column:"flex_box_column___x06LA",intelligentBox:"intelligentBox___M5xO7",red:"red___oyEWt",imgBox:"imgBox___DdoNI",underpin:"underpin___fwUex",row:"row___W9MrK",leftLayout:"leftLayout___MMjoZ",rightLayout:"rightLayout___EsxRX",head:"head___Q7Od8",centerBox:"centerBox___j58Ut",title:"title___rMcNx",tip:"tip___gLHFS",leftBox:"leftBox___DJ6lp",question:"question___THjM9",rightBox:"rightBox___CuMdf",error:"error___PHzCG",actionHead:"actionHead___vTHMx",edit:"edit___EaRLy",option:"option___z4UTy",active:"active___o8wNJ",fill:"fill___g760n",text:"text___L_lug",liWrap:"liWrap___LDwxe",li:"li___k4Mcf",buttonFixed:"buttonFixed___QxKdm",buttonWrap:"buttonWrap___OEep5",button:"button___b2y4h",menu:"menu___aQ4xO",tabs:"tabs___QmlP4",dotLoading:"dotLoading___zUYOu",showHide:"showHide___fHrAG"},ve=Ft(92310),Me=Ft.n(ve),Pe=Ft(78241),Ae=Ft(8591),ee=Ft(43418),Fe=Ft(5871),ye=Ft(95237),de=Ft(24905),he=Ft(38854),Ne=Ft(54580),He=Ft(3113),kt=Ft(93948),nt=Ft(19842),et=Ft(92832),ht=Ft(85057),lt=Ft(3294),gt="data:image/png;base64,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",yt="data:image/png;base64,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",Lt="data:image/png;base64,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",Dt="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAHAAAAAwCAYAAADJuP4nAAAAAXNSR0IArs4c6QAAAz5JREFUeF7tnM9PE0EUx+fN7rKlAQ6EWw3GEMSE8iPSmHjz4kE961Wjif4ZpH8DicZGjYaTclYTT1ysIbEXxYOJLRZMRSUYC0X7Y2dMiyVaKd2Zt+3s4XHtfN+bfD7Zlp2dHWD0hyYwd/P9iFWrxjwhyvZgf2FlYbyILuqzAPgcR8PaELj8RFrZp29n//7YceDTyr2pL72ARgKRlM9dW4sU5c5kaxnbkdsXYtP5ZBIEssWRcRKIpNtOYKOsA3tjMcguJeMVZJu2cRKIJHukQMaYbfFaNMKyy7fju8hWh8ZJIJJqJ4H18sBtyRxrPZOa2EK2+y9OApFE/QhstgCXf3t9d3IDACSy7UGcBCJJqgist+KW3JV2NZdJJarI1o04CURSVBXYgA6swvoq2UwqsYdsTwKxAHUENq5E2xIOk/lX9+PbmDnQFYihxxjTFdhs60p3M/3oZEH3d5EEGha4f7voFUcvzuaWroCnOh0SqEqsZTz2CmyW47YsD3hDH5YfnvilMqWGQCklJG5lbJUgjd0nMGhH3GJJTATBwwLuib7+tUxq7IffenD2xupwlcFxUfO43xCN6y4BcCuFTCrx2U8XOHN9dabmCbr6/NDq4RjO2fdLo1MfOy2Gw+mrb+Z6OC9qpUDA4fzn8ICbfb4wXm4XI4EKQE0MrS+GO8zOvXxwauew/iTQhBWNnhEhN9KLM19boyRQA6apSMS2t84fe7yRTCYPHhKTQFM2NPsCsNKfddTGYjgJ1ARpNCahOiJF9sXiTIkEGjWh3xy4lINS5EigPkPzSQlVEmheg/4MSKA+O9PJ/a/QIfoKNS1Cqz/9E6OFLRQhuo0IhQa9SdCNvB63UKRoKS0UGtQnQYvZ6sxCk/D1OIke6IbG1z8T8f1Al7ZUhE+g0paK+vRpU5O+ROObmvSnTsk6gVBsKyQV+gSCEEgbe/X5o5NYgW6/u5m+Q1vr0SJ0C+gKpJdbdIkHnNMRSK+XBSwBU05VIL3giaHdhayKQHrFugsCsCX9CKRDDrCUu5jvJJCOGeki/CBK00E/QVA0WIOO2jIIP4jW8/OSP8u/m/aksJr16LC7IMj2sEbzuEkBnmdFo+u9PG7yNxidqHC3DAxxAAAAAElFTkSuQmCC",zt=Ft(99064),Xt=Ft(57647),re=Ft(5623),le=Ft(50304),ae=Ft(59879),je=Ft(28451),ne=Ft(15342),Le=Ft.n(ne),ue=(xn,Ie,Ze)=>new Promise((Hn,qe)=>{var $e=bt=>{try{Rt(Ze.next(bt))}catch(Pt){qe(Pt)}},Pn=bt=>{try{Rt(Ze.throw(bt))}catch(Pt){qe(Pt)}},Rt=bt=>bt.done?Hn(bt.value):Promise.resolve(bt.value).then($e,Pn);Rt((Ze=Ze.apply(xn,Ie)).next())}),ge=pt.memo(({tagName:xn="div",value:Ie="",className:Ze,style:Hn={},onBlur:qe,id:$e})=>{const Pn=(0,pt.useRef)(null);(0,pt.useEffect)(()=>{if(!Pn.current)return;ue(void 0,null,function*(){const Pt=Pn.current;Pt.innerHTML="";const It=Ie==null?void 0:Ie.split(/(`?\$\$[\s\S]*?\$\$`?)/g);for(const Yt of It)if(Yt.startsWith("$$")&&Yt.endsWith("$$")||Yt.startsWith("`$$")&&Yt.endsWith("$$`")){const Nt=Yt.startsWith("`$$")?Yt.slice(3,-3):Yt.slice(2,-2),xe=document.createElement("span");xe.setAttribute("contentEditable","false"),xe.setAttribute("title",Yt),xe.className="edu_latex",Pt.appendChild(xe),Le().render(Nt,xe,{throwOnError:!1})}else{const Nt=Yt==null?void 0:Yt.replace(/<[^>]*>/g,xe=>xe.startsWith("<img")?xe:xe.replace(/</g,"&lt;"));Pt.insertAdjacentHTML("beforeend",Nt)}})},[$e]);const Rt=()=>{var bt,Pt;if(qe&&Pn.current){const Yt=Pn.current.cloneNode(!0),Nt=Yt.querySelectorAll("span.edu_latex");for(let xe of Nt){const _n=xe.getAttribute("title"),ni=document.createTextNode(_n||""),ei=xe;(Pt=(bt=ei.parentNode)==null?void 0:bt.replaceChild)==null||Pt.call(bt,ni,ei)}qe(Yt.innerHTML)}};return pt.createElement(pt.Fragment,null,pt.createElement(xn,{ref:Pn,contentEditable:!0,className:Ze,style:Hn,onBlur:Rt}))}),Ue=Ft(24065),nn=Ft(34604),_e=Ft(35339),qt=Object.defineProperty,Jt=Object.defineProperties,De=Object.getOwnPropertyDescriptors,sn=Object.getOwnPropertySymbols,cn=Object.prototype.hasOwnProperty,Te=Object.prototype.propertyIsEnumerable,en=(xn,Ie,Ze)=>Ie in xn?qt(xn,Ie,{enumerable:!0,configurable:!0,writable:!0,value:Ze}):xn[Ie]=Ze,Cn=(xn,Ie)=>{for(var Ze in Ie||(Ie={}))cn.call(Ie,Ze)&&en(xn,Ze,Ie[Ze]);if(sn)for(var Ze of sn(Ie))Te.call(Ie,Ze)&&en(xn,Ze,Ie[Ze]);return xn},Gn=(xn,Ie)=>Jt(xn,De(Ie)),vn=(xn,Ie,Ze)=>new Promise((Hn,qe)=>{var $e=bt=>{try{Rt(Ze.next(bt))}catch(Pt){qe(Pt)}},Pn=bt=>{try{Rt(Ze.throw(bt))}catch(Pt){qe(Pt)}},Rt=bt=>bt.done?Hn(bt.value):Promise.resolve(bt.value).then($e,Pn);Rt((Ze=Ze.apply(xn,Ie)).next())});const zn=xn=>{xn.preventDefault();let Ze=(xn.clipboardData||window.clipboardData).getData("Text");document.execCommand("insertText",!1,Ze)},me=xn=>{xn.key==="Enter"&&xn.preventDefault()},An=({children:xn,style:Ie})=>pt.createElement("div",{className:Ht.leftBox,style:Ie,onPaste:zn},xn),ui=({children:xn,style:Ie,className:Ze})=>pt.createElement("div",{className:Me()(Ht.rightBox,Ze),style:Ie,onPaste:zn},xn),un=({className:xn,style:Ie={},width:Ze=1200,onCancel:Hn=()=>{},onSuccess:qe=()=>{},gather:$e={},mode:Pn=1,stickyTop:Rt=0,subDisciplineId:bt=[],hideWordFeatures:Pt,dataSource:It=[],customLeftHeadNode:Yt,customRightHeadNode:Nt,customLeftContent:xe,hideRecognition:_n=!1,onExchange:ni,isSingleSelection:ei=!1,underpinBackgroundStyle:ii={},headExtraNode:Hi,isRefreshItemBank:hi=!1,okText:Jn="\u786E\u5B9A\u5BFC\u5165",onSave:Vi})=>{var er;const[nr,sr]=(0,pt.useState)(1),[kr,or]=(0,pt.useState)(0),[_i,gr]=(0,pt.useState)(""),[Mr,Ei]=(0,pt.useState)(!1),[Qr,Rn]=(0,pt.useState)([]),[Ct,zi]=(0,pt.useState)([]),[Ci,ze]=(0,pt.useState)(!1),[Yn,Xn]=(0,pt.useState)(!1),[fi,an]=(0,pt.useState)(!1),[Sn,be]=(0,pt.useState)(!1),[Ce,we]=(0,pt.useState)([]),[kn,Qn]=(0,pt.useState)(1),[ti,Xe]=(0,pt.useState)(!1),[Dn,vi]=(0,pt.useState)(!0),[$n,ki]=(0,pt.useState)(0),[pe,Tn]=(0,pt.useState)(!1),[gi]=Pe.default.useForm(),[Oi]=Pe.default.useForm(),bn=(0,pt.useRef)(null),Mn=(0,pt.useRef)(null),hn=(0,pt.useRef)(),Ji=(0,pt.useRef)(null),Li=["A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"],Si=["C","C++","Java","Python","JavaScript","Ruby"];(0,pt.useEffect)(()=>{It!=null&&It.length&&vo(It)},[It]),(0,pt.useEffect)(()=>{nr===2&&bn.current.focus()},[nr]),(0,pt.useEffect)(()=>{fi&&Mi()},[fi]);const wi=()=>{if(nr===1){Ae.ZP.warning("\u8BF7\u5148\u4E0A\u4F20\u8BD5\u9898\uFF01");return}ee.default.confirm({centered:!0,icon:null,okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",title:"\u63D0\u793A",content:"\u6E05\u7A7A\u64CD\u4F5C\u5C06\u5220\u9664\u8BD5\u9898\u7F16\u8F91\u533A\u57DF\u7684\u5168\u90E8\u5185\u5BB9\uFF0C\u786E\u5B9A\u4E00\u952E\u6E05\u7A7A\u5417\uFF1F",onOk:()=>vn(void 0,null,function*(){sr(1)})})},Mi=()=>vn(void 0,null,function*(){const $t=yield(0,zt.ZP)("/api/disciplines.json",{method:"get",params:{source:Pn===1?"new_question":"subject"}});we($t.disciplines||[])}),Er=$t=>{const Wn=[],In=(si,Ln)=>{si.length>=2&&Wn.push(si.join(""));for(let Zn=Ln;Zn<$t.length;Zn++)si.push($t[Zn]),In(si,Zn+1),si.pop()};return In([],0),Wn},ir=$t=>($t=$t||"",$t=String($t),$t=$t.replace(/\s+/g,""),$t),tr=$t=>($t=$t||"",$t=String($t),$t=$t.replace(/<div>/g,""),$t=$t.replace(/<br>/g,`
`),$t=$t.replace(/<\/div>/g,`
`),$t=to($t),$t),gn=$t=>$t.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#39;"),to=$t=>$t.replace(/&lt;/g,"<").replace(/&gt;/g,">").replace(/&amp;/g,"&").replace(/&quot;/g,'"').replace(/&#39;/g,"'"),Qi=$t=>{var Wn;const In=$t.clipboardData;if(In){const si=In.types.toString(),Ln=In.items;if(si==="Files"||In.types.indexOf("Files")>-1){$t.preventDefault();try{let Zn=Ln[1];((Wn=Ln[0])==null?void 0:Wn.kind)==="file"&&(Zn=Ln[0]);const jn=Zn.getAsFile();(0,je.I)(jn,Re=>{var Nn;if(Re.id){if(((Nn=jn==null?void 0:jn.type)==null?void 0:Nn.indexOf("image"))>-1){const bi=`<img src='${lt.Z.API_SERVER}${Re.url}'>`;document.execCommand("insertText",!1,bi)}}else(Re==null?void 0:Re.status)===401&&(document.location.href="/user/login")})}catch(Zn){Ae.ZP.warning("\u8BF7\u4F7F\u7528chrome\u6D4F\u89C8\u5668\u7C98\u8D34")}return!0}else return!0}return!0};function Or($t,Wn){return vn(this,null,function*(){if(typeof $t=="string")return yield Wn($t);if(typeof $t!="object"||$t===null)return $t;if(Array.isArray($t))return yield Promise.all($t.map(Ln=>vn(this,null,function*(){return yield Or(Ln,Wn)})));const In={};for(const si in $t)if(Object.prototype.hasOwnProperty.call($t,si)){const Ln=$t[si];typeof Ln=="string"?In[si]=yield Wn(Ln):typeof Ln=="object"?In[si]=yield Or(Ln,Wn):In[si]=Ln}return In})}const Je=()=>vn(void 0,null,function*(){var $t;Ei(!0),gr("\u5904\u7406\u4E2D"),yield new Promise(si=>setTimeout(si,1e3));let Wn=($t=Mn.current)==null?void 0:$t.querySelectorAll('[data-text="edit"]'),In="";try{Wn.forEach(function(si){var Ln,Zn,jn,Re;const Nn=si.cloneNode(!0),bi=Nn.querySelectorAll("span.edu_latex");for(let Yi of bi){const Bi=Yi.getAttribute("title"),Sr=document.createTextNode(Bi),br=Yi;(Zn=(Ln=br.parentNode)==null?void 0:Ln.replaceChild)==null||Zn.call(Ln,Sr,br)}const cr=Nn.querySelectorAll("span[style]");for(let Yi of cr)if(Yi.style.fontFamily){const Bi=Yi.innerHTML,Sr=document.createTextNode(Bi),br=Yi;(Re=(jn=br.parentNode)==null?void 0:jn.replaceChild)==null||Re.call(jn,Sr,br)}Nn==null||Nn.childNodes.forEach(function(Yi){Yi.nodeType===Node.ELEMENT_NODE&&Yi.localName!=="h5"&&Yi.localName!=="h4"?In+=`<p>${Yi.innerHTML}</p>`:Yi.nodeType===Node.TEXT_NODE&&(In+=`<p>${Yi.textContent}</p>`)})}),Oo("/api/intelligent_imports/import.json",{html:to(In)})}catch(si){console.error("\u5904\u7406\u8282\u70B9\u9519\u8BEF:",si)}}),Un=$t=>{let Wn=$t.filter(In=>!!(In!=null&&In.type));return Wn=Wn.map(In=>{var si;const Ln=(si=Dr.find(jn=>jn.id===(In==null?void 0:In.type)))==null?void 0:si.deal,Zn=Gn(Cn({},In),{id:String(Math.random()).slice(-6),knowledgePoint:ir(In==null?void 0:In.knowledgePoint)});return Ln?Ln(Zn):Zn}),Wn},Pi=()=>{if(nr===1){Ae.ZP.warning("\u672A\u8BC6\u522B\u5230\u8BD5\u9898!");return}ee.default.confirm({centered:!0,icon:null,okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",title:"\u63D0\u793A",content:"\u91CD\u65B0\u8BC6\u522B\u4F1A\u8986\u76D6\u53F3\u4FA7\u5DF2\u8BC6\u522B\u7ED3\u679C\uFF0C\u5305\u62EC\u4EBA\u5DE5\u4FEE\u6539\u7684\u5185\u5BB9\uFF0C\u786E\u5B9A\u91CD\u65B0\u8BC6\u522B\u5417?",onOk:Je})},Ni=()=>pt.createElement("div",{className:Ht.row},pt.createElement("div",{className:Ht.leftLayout},pt.createElement(An,{style:{height:675}},nr===1&&pt.createElement("div",{style:{height:"100%",display:"flex",flexDirection:"column",alignItems:"center"},onClick:()=>sr(2)},pt.createElement("div",{style:{color:"#9096A3",fontSize:12}},"1.\u672C\u529F\u80FD\u652F\u6301\u5BFC\u5165\u7684\u9898\u578B\uFF1A\u5355\u9009\u9898\u3001\u591A\u9009\u9898\u3001\u586B\u7A7A\u9898\u3001\u5224\u65AD\u9898\u3001\u7B80\u7B54\u9898\u3001 \u7EC4\u5408\u9898\u3001\u7F16\u7A0B\u9898\u3001\u7A0B\u5E8F\u586B\u7A7A\u9898\u3002",pt.createElement("br",null),"2.\u82E5\u8981\u5BFC\u5165\u7EC4\u5408\u9898\uFF0C\u8BF7\u5728\u9898\u76EE\u524D\u540E\u4F7F\u7528\u4E00\u5BF9\u201C","{{\u201D\u3001\u201C}}","\u201D\u5C06\u5185\u5BB9\u6807\u51FA\uFF1B\u5927\u9898\u9898\u5E72\u548C\u5C0F\u9898\u9898\u5E72\u4E4B\u95F4\u4E0D\u9700\u8981\u7A7A\u884C\uFF1B\u5927\u9898\u548C\u5C0F\u9898\u9898\u5E72\u90FD\u9700\u6807\u6CE8\u9898\u53F7\uFF1B\u5C0F\u9898\u7B54\u6848\u53EF\u8DDF\u5728\u5C0F\u9898\u9898\u5E72\u540E\uFF0C\u5E76\u7528\u7A7A\u683C\u4E0E\u9898\u5E72\u5185\u5BB9\u9694\u5F00\u3002\u8303\u4F8B\u53EF\u53C2\u8003\u63A8\u8350\u683C\u5F0F\u3002",pt.createElement("br",null),"3.\u5BFC\u5165\u652F\u6301\u6587\u672C\u3001\u56FE\u7247\u3001\u516C\u5F0F\u3002\u9898\u76EE\u7ED3\u6784\u652F\u6301\u8BC6\u522B\u7B54\u6848\u3001\u89E3\u6790\u3001\u96BE\u5EA6\u3001\u77E5\u8BC6\u70B9\u3002",pt.createElement("br",null),"4.\u82E5\u8BC6\u522B\u6709\u8BEF\uFF0C\u53EF\u5728\u5DE6\u4FA7\u4FEE\u6539\u9898\u76EE\u5185\u5BB9\u540E\u91CD\u65B0\u8BC6\u522B\uFF0C\u6216\u4E0B\u8F7D\u63A8\u8350\u683C\u5F0F\uFF0C\u6309\u683C\u5F0F\u4FEE\u6539\u540E\u91CD\u65B0\u5BFC\u5165\u8BC6\u522B\u3002",pt.createElement("br",null)),pt.createElement("div",{className:Ht.imgBox,style:{marginTop:75}},pt.createElement("img",{width:56,src:yt}),pt.createElement("span",null,"\u7F16\u8F91\u533A"))),nr===2&&pt.createElement("div",{"data-text":"edit",onBlur:()=>{bn.current.innerHTML||sr(1)},ref:bn,contentEditable:!0,style:{color:"#9096A3",height:"100%",overflow:"auto"}}))),pt.createElement("div",{className:Ht.rightLayout,style:{display:"flex",alignItems:"start",justifyContent:"center"}},pt.createElement("div",{className:Ht.imgBox,style:{marginTop:240}},pt.createElement("img",{width:56,src:Lt}),pt.createElement("span",null,"\u9884\u89C8\u533A")))),di=($t,Wn,In,si)=>{var Ln;console.log($t,Wn,In,si,"onDataChange\u4FEE\u6539\u6570\u503C");const Zn=JSON.parse(JSON.stringify(Ct));si===void 0?Zn[Wn][$t]=In:Zn[Wn].questions[si][$t]=In;const jn=Cn({},Zn[Wn]),Re=(Ln=Dr.find(Nn=>Nn.id===(jn==null?void 0:jn.type)))==null?void 0:Ln.deal;Zn[Wn]=Re(jn),zi(Zn)},Ii=($t,Wn,In)=>{var si;const Ln=In!==void 0,Zn=(si=Dr.find(Nn=>Nn.id===($t==null?void 0:$t.type)))==null?void 0:si.type,jn=`${Wn+1}.${In===void 0?"":In+1+"."}`,Re=`${($t==null?void 0:$t.type)==="7"?"{{":""}${jn}\u3010${Zn}\u3011${($t==null?void 0:$t.question)||""}`;return pt.createElement(pt.Fragment,null,Ln&&pt.createElement("h4",{contentEditable:!0}),pt.createElement(ge,{id:$t==null?void 0:$t.id,tagName:"div",value:Re}))},vr=($t,Wn)=>vn(void 0,null,function*(){var In;const si=yield ni($t,Wn),Ln=(In=si==null?void 0:si.data)==null?void 0:In.content;if(Ln!=null&&Ln.length){const Zn=Un(Ln)[0];Qr.splice(Wn,1,Zn),Ct.splice(Wn,1,Zn),Rn([...Qr]),zi([...Ct])}}),yr=($t,Wn,In)=>{var si;const Ln=In!==void 0,Zn=(si=Dr.find(Re=>Re.id===($t==null?void 0:$t.type)))==null?void 0:si.type,jn=`${Wn+1}.${In===void 0?"":In+1+"."}`;return Ln?pt.createElement("div",{style:{padding:"10px 18px"}},`${jn}\u3010${Zn}\u3011`,pt.createElement(ge,{id:$t==null?void 0:$t.id,tagName:"span",className:Ht.edit,onBlur:Re=>di("question",Wn,Re,In),value:($t==null?void 0:$t.question)||""})):pt.createElement(pt.Fragment,null,pt.createElement("div",{className:Ht.actionHead},pt.createElement("div",{className:"c-light-primary"},`${jn}\u3010${Zn}\u3011`),Pn!==1&&pt.createElement(Fe.Z,{disabled:($t==null?void 0:$t.type)==="7",min:0,max:100,style:{width:100,marginLeft:10},addonAfter:"\u5206",precision:1,size:"middle",onChange:Re=>di("score",Wn,Re,In),value:$t==null?void 0:$t.score}),pt.createElement(ye.Z,{align:"middle",style:{marginLeft:"auto"}},!!ni&&pt.createElement("span",{className:"current c-light-primary mr30",onClick:()=>vr($t,Wn)},pt.createElement("i",{className:"iconfont icon-huanyihuan mr5"}),"\u6362\u4E00\u6362"),pt.createElement(de.default,{onChange:Re=>di("checked",Wn,Re.target.checked,In),checked:!!($t!=null&&$t.checked)},"\u4E0D\u5BFC\u5165\u6B64\u9898"))),pt.createElement(ge,{id:$t==null?void 0:$t.id,tagName:"div",style:{padding:"10px 18px"},className:Ht.edit,onBlur:Re=>di("question",Wn,Re,In),value:$t==null?void 0:$t.question}))},pr=($t,Wn,In)=>pt.createElement(pt.Fragment,null,["0","1","2","4"].includes($t==null?void 0:$t.type)&&pt.createElement(ge,{id:$t==null?void 0:$t.id,value:`\u7B54\u6848\uFF1A${Wn||""}`,tagName:"p"}),!In&&pt.createElement(ge,{id:$t==null?void 0:$t.id,value:`\u96BE\u5EA6\uFF1A${($t==null?void 0:$t.difficulty)||""}`,tagName:"p"}),($t==null?void 0:$t.type)!=="7"&&pt.createElement(ge,{id:$t==null?void 0:$t.id,value:`\u89E3\u6790\uFF1A${($t==null?void 0:$t.analyze)||""}`,tagName:"p"}),!In&&pt.createElement(ge,{id:$t==null?void 0:$t.id,value:`\u77E5\u8BC6\u70B9\uFF1A${($t==null?void 0:$t.knowledgePoint)||""}`,tagName:"p"})),wr=($t,Wn,In,si)=>{const Ln=si!==void 0,Zn=["\u7B80\u5355","\u9002\u4E2D","\u56F0\u96BE"],jn=Ln&&!$t.last&&!$t.errorMsg?{marginBottom:10}:{},Re=Zn.map(Nn=>({key:Nn,label:Nn,onClick:()=>di("difficulty",In,Nn,si)}));return pt.createElement("div",{className:Ht.liWrap,style:jn},["4"].includes($t==null?void 0:$t.type)&&pt.createElement("div",{className:Ht.li},pt.createElement("aside",null,"\u7B54\xA0\xA0\xA0\xA0\u6848\uFF1A"),pt.createElement(ge,{id:$t==null?void 0:$t.id,tagName:"div",className:`${Ht.edit} c-black`,onBlur:Nn=>di("answer",In,[Nn],si),value:Wn})),!Ln&&pt.createElement("div",{className:Ht.li},pt.createElement("aside",null,"\u96BE\xA0\xA0\xA0\xA0\u5EA6\uFF1A"),pt.createElement("div",{className:"c-black"},pt.createElement(he.Z,{menu:{items:Re}},pt.createElement("span",{className:"c-light-primary"},$t==null?void 0:$t.difficulty,pt.createElement("i",{className:"iconfont icon-a-bianzu11 font14 ml4"}))))),($t==null?void 0:$t.type)!=="7"&&pt.createElement("div",{className:Ht.li},pt.createElement("aside",null,"\u89E3\xA0\xA0\xA0\xA0\u6790\uFF1A"),pt.createElement(ge,{id:$t==null?void 0:$t.id,tagName:"div",className:`${Ht.edit} c-grey-333`,onBlur:Nn=>di("analyze",In,Nn,si),value:$t==null?void 0:$t.analyze})),!Ln&&pt.createElement("div",{onKeyDown:me,className:Ht.li},pt.createElement("aside",null,"\u77E5\u8BC6\u70B9\uFF1A"),pt.createElement(ge,{id:$t==null?void 0:$t.id,tagName:"div",value:($t==null?void 0:$t.knowledgePoint)||"",className:`${Ht.edit} c-grey-333`,onBlur:Nn=>di("knowledgePoint",In,ir(tr(Nn)),si)})))},yn=$t=>pt.createElement(pt.Fragment,null,typeof($t==null?void 0:$t.errorMsg)=="string"&&!!($t!=null&&$t.errorMsg)&&pt.createElement("h5",{contentEditable:!1},pt.createElement("i",{className:"iconfont icon-shanchuhuanjing"}),pt.createElement("div",null,$t==null?void 0:$t.errorMsg))),Ir=$t=>pt.createElement(pt.Fragment,null,typeof($t==null?void 0:$t.errorMsg)=="string"&&!!($t!=null&&$t.errorMsg)&&pt.createElement("h5",null,pt.createElement("i",{className:"iconfont icon-shanchuhuanjing"}),pt.createElement("div",null,$t==null?void 0:$t.errorMsg))),mn=($t,Wn,In,si)=>{let Ln="flex";return(ei&&$n!==si||Ci&&!(In!=null&&In.errorMsg))&&(Ln="none"),pt.createElement("div",{className:Ht.row,style:{display:Ln}},pt.createElement("div",{className:Ht.leftLayout},xe||pt.createElement(An,null,pt.createElement("div",{"data-text":"edit",contentEditable:!0,className:Ht.question},$t))),pt.createElement("div",{className:Ht.rightLayout},pt.createElement(ui,{className:In!=null&&In.errorMsg?Ht.error:""},Wn)))},Dr=[{id:"0",type:"\u5355\u9009\u9898",element:($t,Wn,In)=>{var si,Ln;const Zn=In!==void 0;let jn=(si=$t==null?void 0:$t.answer)==null?void 0:si[0];const Re=pt.createElement(pt.Fragment,null,Ii($t,Wn,In),(Ln=$t==null?void 0:$t.options)==null?void 0:Ln.map((Yi,Bi)=>pt.createElement(ge,{id:$t==null?void 0:$t.id,key:Bi,value:`${Li[Bi]}.${Yi}`,tagName:"p"})),pr($t,jn,Zn),yn($t));let Nn=Zn?$t:Ct[Wn];const bi=Nn==null?void 0:Nn.options,cr=pt.createElement(pt.Fragment,null,yr(Nn,Wn,In),bi==null?void 0:bi.map((Yi,Bi)=>{var Sr;return pt.createElement("div",{key:Bi,className:Ht.option},pt.createElement("aside",{className:((Sr=Nn==null?void 0:Nn.answer)==null?void 0:Sr[0])===Li[Bi]?Ht.active:"",onClick:()=>di("answer",Wn,[Li[Bi]],In)},Li[Bi]),pt.createElement(ge,{id:Nn==null?void 0:Nn.id,tagName:"div",className:`${Ht.text}`,onBlur:br=>{bi[Bi]=br,di("options",Wn,bi,In)},value:Yi}))}),wr(Nn,"",Wn,In),Ir(Nn));return Zn?[Re,cr]:mn(Re,cr,Nn,Wn)},deal:$t=>{var Wn,In,si;$t.score=$t.score===void 0?2:$t.score;let Ln=ir((Wn=$t==null?void 0:$t.answer)==null?void 0:Wn[0]).toUpperCase();$t.answer=Ln?[Ln]:[];let Zn=[];if(!($t!=null&&$t.options))Zn.push("\u672A\u8BC6\u522B\u5230\u9009\u9879\u3002\u63A8\u8350\u683C\u5F0F\uFF1A\u201C A.\u9009\u9879\u4E00 B.\u9009\u9879\u4E8C C.\u9009\u9879\u4E09 \u201D");else{$t.options=(In=$t.options)==null?void 0:In.slice(0,8);const jn=$t.options.map(Nn=>Nn==null?void 0:Nn.trim().replace(/^\s+|\s+$/g,""));new Set(jn).size!==jn.length&&Zn.push("\u9009\u9879\u5185\u5BB9\u91CD\u590D")}return Ln||Zn.push("\u672A\u8BC6\u522B\u5230\u7B54\u6848\u3002\u63A8\u8350\u683C\u5F0F\uFF1A\u201C \u7B54\u6848\uFF1AA \u201D"),Ln&&(Li.slice(0,((si=$t==null?void 0:$t.options)==null?void 0:si.length)||8).includes(Ln)||Zn.push("\u6B63\u786E\u7B54\u6848\u8BBE\u7F6E\u6709\u8BEF\uFF0C\u8BF7\u91CD\u65B0\u8BBE\u7F6E\u3002\u63A8\u8350\u683C\u5F0F\uFF1A\u201C \u7B54\u6848\uFF1AA \u201D")),ir($t==null?void 0:$t.question)||Zn.push("\u672A\u8BC6\u522B\u5230\u9898\u5E72"),$t.errorMsg=Zn.join(`
`),$t}},{id:"1",type:"\u591A\u9009\u9898",element:($t,Wn,In)=>{var si,Ln;const Zn=In!==void 0;let jn=(si=$t==null?void 0:$t.answer)==null?void 0:si[0];const Re=pt.createElement(pt.Fragment,null,Ii($t,Wn,In),(Ln=$t==null?void 0:$t.options)==null?void 0:Ln.map((Yi,Bi)=>pt.createElement(ge,{id:$t==null?void 0:$t.id,key:Bi,value:`${Li[Bi]}.${Yi}`,tagName:"p"})),pr($t,jn,Zn),yn($t));let Nn=Zn?$t:Ct[Wn];const bi=Nn==null?void 0:Nn.options,cr=pt.createElement(pt.Fragment,null,yr(Nn,Wn,In),bi==null?void 0:bi.map((Yi,Bi)=>{var Sr,br;return pt.createElement("div",{key:Bi,className:Ht.option},pt.createElement("aside",{className:(br=(Sr=Nn==null?void 0:Nn.answer)==null?void 0:Sr[0])!=null&&br.includes(Li[Bi])?Ht.active:"",onClick:()=>{var ho;let Co=((ho=Nn==null?void 0:Nn.answer)==null?void 0:ho[0])||"";const wa=Li[Bi];Co.includes(wa)?Co=Co.replace(new RegExp(wa,"g"),""):Co+=wa,Co=Co.split("").sort().join(""),di("answer",Wn,[Co],In)}},Li[Bi]),pt.createElement(ge,{id:Nn==null?void 0:Nn.id,tagName:"div",className:`${Ht.text}`,onBlur:ho=>{bi[Bi]=ho,di("options",Wn,bi,In)},value:Yi}))}),wr(Nn,"",Wn,In),Ir(Nn));return Zn?[Re,cr]:mn(Re,cr,Nn,Wn)},deal:$t=>{var Wn,In,si;$t.score=$t.score===void 0?2:$t.score;let Ln=ir((Wn=$t==null?void 0:$t.answer)==null?void 0:Wn[0]).toUpperCase().split("").sort().join("");$t.answer=Ln?[Ln]:[];let Zn=[];if(!($t!=null&&$t.options))Zn.push("\u672A\u8BC6\u522B\u5230\u9009\u9879\u3002\u63A8\u8350\u683C\u5F0F\uFF1A\u201C A.\u9009\u9879\u4E00 B.\u9009\u9879\u4E8C C.\u9009\u9879\u4E09 \u201D");else{$t.options=(In=$t.options)==null?void 0:In.slice(0,8);const jn=$t.options.map(Nn=>Nn==null?void 0:Nn.trim().replace(/^\s+|\s+$/g,""));new Set(jn).size!==jn.length&&Zn.push("\u9009\u9879\u5185\u5BB9\u91CD\u590D")}if(Ln||Zn.push("\u672A\u8BC6\u522B\u5230\u7B54\u6848\u3002\u63A8\u8350\u683C\u5F0F\uFF1A\u201C \u7B54\u6848\uFF1AAB \u201D"),Ln){const jn=Li.slice(0,((si=$t==null?void 0:$t.options)==null?void 0:si.length)||8);Er(jn).includes(Ln)||Zn.push("\u6B63\u786E\u7B54\u6848\u8BBE\u7F6E\u6709\u8BEF\uFF0C\u8BF7\u91CD\u65B0\u8BBE\u7F6E\u3002\u63A8\u8350\u683C\u5F0F\uFF1A\u201C \u7B54\u6848\uFF1AAB \u201D")}return ir($t==null?void 0:$t.question)||Zn.push("\u672A\u8BC6\u522B\u5230\u9898\u5E72"),$t.errorMsg=Zn.join(`
`),$t}},{id:"2",type:"\u5224\u65AD\u9898",element:($t,Wn,In)=>{var si,Ln;const Zn=In!==void 0;let jn=(si=$t==null?void 0:$t.answer)==null?void 0:si[0];const Re=pt.createElement(pt.Fragment,null,Ii($t,Wn,In),pr($t,jn,Zn),yn($t));let Nn=Zn?$t:Ct[Wn];const bi=["\u6B63\u786E","\u9519\u8BEF"];let cr=((Ln=Nn==null?void 0:Nn.answer)==null?void 0:Ln[0])||"";["\u6B63\u786E","\u5BF9","T","True","t","true"].includes(cr)?cr="\u6B63\u786E":["\u9519\u8BEF","\u9519","T","true","t","false"].includes(cr)&&(cr="\u9519\u8BEF");const Yi=pt.createElement(pt.Fragment,null,yr(Nn,Wn,In),bi==null?void 0:bi.map((Bi,Sr)=>pt.createElement("div",{key:Sr,className:Ht.option},pt.createElement("aside",{style:{borderRadius:2},className:cr===Bi?Ht.active:"",onClick:()=>di("answer",Wn,[Bi],In)},Bi==="\u6B63\u786E"?"T":"F"),pt.createElement("div",{style:{pointerEvents:"none"},className:`${Ht.text}`},Bi))),wr(Nn,"",Wn,In),Ir(Nn));return Zn?[Re,Yi]:mn(Re,Yi,Nn,Wn)},deal:$t=>{var Wn;$t.score=$t.score===void 0?2:$t.score;let In=ir((Wn=$t==null?void 0:$t.answer)==null?void 0:Wn[0]);$t.answer=In?[In]:[];let si=[];return In||si.push("\u672A\u8BC6\u522B\u5230\u7B54\u6848\u3002\u63A8\u8350\u683C\u5F0F\uFF1A\u201C \u7B54\u6848\uFF1A\u9519\u8BEF\u201D"),In&&!["\u6B63\u786E","\u5BF9","T","True","t","true","\u9519\u8BEF","\u9519","T","true","t","false"].includes(In)&&si.push("\u6B63\u786E\u7B54\u6848\u8BBE\u7F6E\u6709\u8BEF\uFF0C\u8BF7\u91CD\u65B0\u8BBE\u7F6E\u3002\u63A8\u8350\u683C\u5F0F\uFF1A\u201C \u7B54\u6848\uFF1A\u9519\u8BEF\u201D"),ir($t==null?void 0:$t.question)||si.push("\u672A\u8BC6\u522B\u5230\u9898\u5E72"),$t.errorMsg=si.join(`
`),$t}},{id:"3",type:"\u586B\u7A7A\u9898",element:($t,Wn,In)=>{var si,Ln;const Zn=In!==void 0,jn=pt.createElement(pt.Fragment,null,Ii($t,Wn,In),(si=$t==null?void 0:$t.answer)==null?void 0:si.map((bi,cr)=>pt.createElement(ge,{id:$t==null?void 0:$t.id,key:cr,tagName:"p",value:`\u7B54\u6848${cr+1}\uFF1A${bi.text||""}`})),pr($t,"",Zn),yn($t));let Re=Zn?$t:Ct[Wn];const Nn=pt.createElement(pt.Fragment,null,yr(Re,Wn,In),(Ln=Re==null?void 0:Re.answer)==null?void 0:Ln.map((bi,cr)=>pt.createElement("div",{key:cr,className:Ht.option},pt.createElement("aside",{className:Ht.fill},"\u586B\u7A7A\u9879",cr+1),bi.model===1&&pt.createElement(ge,{id:Re==null?void 0:Re.id,tagName:"div",onBlur:Yi=>{Re.answer[cr].latex=tr(Yi),di("answer",Wn,Re.answer,In)},className:`${Ht.text}`,value:bi.latex}),bi.model===2&&pt.createElement(ae.Z,{value:bi.latex,onChange:Yi=>{Re.answer[cr].latex=Yi,di("answer",Wn,Re.answer,In)}}))),wr(Re,"",Wn,In),Ir(Re));return Zn?[jn,Nn]:mn(jn,Nn,Re,Wn)},deal:$t=>{var Wn,In,si,Ln;$t.score=$t.score===void 0?2:$t.score,$t.question=(Wn=$t.question)==null?void 0:Wn.replaceAll("\u2581","_");const Zn=(In=$t.answer)==null?void 0:In.map(Re=>{if(Object.prototype.toString.call(Re)==="[object Object]")return Re;Re=Re==null?void 0:Re.trim();const Nn={model:1,text:Re,latex:Re};return Re.startsWith("$$")&&Re.endsWith("$$")||Re.startsWith("`$$")&&Re.endsWith("$$`")?(Nn.model=2,Nn.latex=Re.slice(2,-2)):Nn.latex=tr(Re),Nn});$t.answer=Zn;let jn=[];return Zn||jn.push("\u672A\u8BC6\u522B\u5230\u7B54\u6848\u3002\u63A8\u8350\u683C\u5F0F\uFF1A\u7B54\u68481\uFF1A\u4E2D\u56FD\uFF1B\u7B54\u68482\uFF1A\u4E16\u754C"),ir($t==null?void 0:$t.question)?$t!=null&&$t.question.includes("_")?(si=$t==null?void 0:$t.answer)!=null&&si.length&&(($t==null?void 0:$t.question.match(/_+/g))||[]).length!==((Ln=$t==null?void 0:$t.answer)==null?void 0:Ln.length)&&jn.push("\u586B\u7A7A\u9879\u4E0E\u7B54\u6848\u4E2A\u6570\u4E0D\u5339\u914D\uFF0C\u8BF7\u8FDB\u884C\u8C03\u6574"):jn.push("\u586B\u7A7A\u9879\u672A\u8BBE\u7F6E\uFF0C\u8BF7\u4F7F\u7528\u82F1\u6587\u4E0B\u5212\u7EBF\u201C___\u201D\u8868\u793A\u586B\u7A7A\u9879"):jn.push("\u672A\u8BC6\u522B\u5230\u9898\u5E72"),$t.errorMsg=jn.join(`
`),$t}},{id:"4",type:"\u7B80\u7B54\u9898",element:($t,Wn,In)=>{var si,Ln;const Zn=In!==void 0;let jn=(si=$t==null?void 0:$t.answer)==null?void 0:si[0];const Re=pt.createElement(pt.Fragment,null,Ii($t,Wn,In),pr($t,jn,Zn),yn($t));let Nn=Zn?$t:Ct[Wn];const bi=pt.createElement(pt.Fragment,null,yr(Nn,Wn,In),wr(Nn,(Ln=Nn==null?void 0:Nn.answer)==null?void 0:Ln[0],Wn,In),Ir(Nn));return Zn?[Re,bi]:mn(Re,bi,Nn,Wn)},deal:$t=>{$t.score=$t.score===void 0?5:$t.score;let Wn=[];return ir($t==null?void 0:$t.question)||Wn.push("\u672A\u8BC6\u522B\u5230\u9898\u5E72"),$t.errorMsg=Wn.join(`
`),$t}},{id:"6",type:"\u7F16\u7A0B\u9898",element:($t,Wn)=>{var In,si;const Ln=Ct[Wn],Zn=Si.slice(0,4).map(jn=>({key:jn,label:jn,onClick:()=>di("platform",Wn,jn)}));return pt.createElement("div",{className:Ht.row,style:{display:Ci?Ln!=null&&Ln.errorMsg?"flex":"none":"flex"}},pt.createElement("div",{className:Ht.leftLayout},pt.createElement(An,null,pt.createElement("div",{"data-text":"edit",contentEditable:!0,className:Ht.question},Ii($t,Wn),pt.createElement(ge,{id:$t==null?void 0:$t.id,value:`\u8BD5\u9898\u63CF\u8FF0\uFF1A${($t==null?void 0:$t.description)||""}`,tagName:"p"}),pr($t),pt.createElement(ge,{id:$t==null?void 0:$t.id,value:`\u65F6\u95F4\u9650\u5236\uFF08\u79D2\uFF09\uFF1A${$t==null?void 0:$t.timeLimit}`,tagName:"p"}),pt.createElement(ge,{id:$t==null?void 0:$t.id,value:`\u7F16\u7A0B\u8BED\u8A00\uFF1A${($t==null?void 0:$t.platform)||""}`,tagName:"p"}),pt.createElement("p",{contentEditable:!0},"\u5B66\u5458\u521D\u59CB\u4EE3\u7801\uFF1A"),pt.createElement("h4",null),pt.createElement(ge,{id:$t==null?void 0:$t.id,value:($t==null?void 0:$t.code)||"",tagName:"div"}),(In=$t==null?void 0:$t.inputs)==null?void 0:In.map((jn,Re)=>{var Nn;return pt.createElement(pt.Fragment,{key:Re},pt.createElement("h4",null),pt.createElement(ge,{id:$t==null?void 0:$t.id,value:`\u6D4B\u8BD5\u7528\u4F8B(${Re+1})\u8F93\u5165\uFF1A${jn||""}`,tagName:"div"}),pt.createElement(ge,{id:$t==null?void 0:$t.id,value:`\u6D4B\u8BD5\u7528\u4F8B(${Re+1})\u8F93\u51FA\uFF1A${((Nn=$t==null?void 0:$t.outputs)==null?void 0:Nn[Re])||""}`,tagName:"div"}))}),yn($t)))),pt.createElement("div",{className:Ht.rightLayout},pt.createElement(ui,{className:Ln!=null&&Ln.errorMsg?Ht.error:""},yr(Ln,Wn),pt.createElement("div",{className:Ht.liWrap,style:{background:"transparent",marginBottom:0,padding:0}},pt.createElement("div",{className:Ht.li},pt.createElement("aside",null,"\u8BD5\u9898\u63CF\u8FF0\uFF1A"),pt.createElement(ge,{className:Ht.edit,id:Ln==null?void 0:Ln.id,value:Ln==null?void 0:Ln.description,tagName:"div",onBlur:jn=>di("description",Wn,jn)}))),wr(Ln,"",Wn),pt.createElement("div",{className:Ht.liWrap},pt.createElement("div",{className:Ht.li},pt.createElement("aside",null,"\u65F6\u95F4\u9650\u5236\uFF08\u79D2\uFF09\uFF1A"),pt.createElement(ge,{className:Ht.edit,id:Ln==null?void 0:Ln.id,value:Ln==null?void 0:Ln.timeLimit,tagName:"div",onBlur:jn=>di("timeLimit",Wn,tr(jn))})),pt.createElement("div",{className:Ht.li},pt.createElement("aside",null,"\u7F16\u7A0B\u8BED\u8A00\uFF1A"),pt.createElement("div",{className:"c-black"},pt.createElement(he.Z,{menu:{items:Zn}},pt.createElement("span",{className:"c-light-primary"},Ln==null?void 0:Ln.platform,pt.createElement("i",{className:"iconfont icon-a-bianzu11 font14 ml4"}))))),pt.createElement("div",{className:Ht.li,style:{flexDirection:"column",alignItems:"start"}},pt.createElement("aside",{className:"mb10"},"\u5B66\u5458\u521D\u59CB\u4EE3\u7801\uFF1A"),pt.createElement(ge,{className:Ht.edit,id:Ln==null?void 0:Ln.id,value:(Ln==null?void 0:Ln.code)||"",onBlur:jn=>di("code",Wn,tr(jn)),tagName:"div"}))),(si=Ln==null?void 0:Ln.inputs)==null?void 0:si.map((jn,Re)=>{var Nn;return pt.createElement("div",{className:Ht.liWrap,key:Re},pt.createElement("div",{className:Ht.li},pt.createElement("aside",null,"\u6D4B\u8BD5\u7528\u4F8B(",Re+1,")\u8F93\u5165\uFF1A"),pt.createElement(ge,{id:Ln==null?void 0:Ln.id,value:jn||"",className:Ht.edit,onBlur:bi=>{const cr=[...(Ln==null?void 0:Ln.inputs)||[]];cr[Re]=tr(bi),di("inputs",Wn,cr)},tagName:"div"})),pt.createElement("div",{className:Ht.li},pt.createElement("aside",null,"\u6D4B\u8BD5\u7528\u4F8B(",Re+1,")\u8F93\u51FA\uFF1A"),pt.createElement(ge,{id:Ln==null?void 0:Ln.id,value:((Nn=Ln==null?void 0:Ln.outputs)==null?void 0:Nn[Re])||"",className:Ht.edit,onBlur:bi=>{const cr=[...(Ln==null?void 0:Ln.outputs)||[]];cr[Re]=tr(bi),di("outputs",Wn,cr)},tagName:"div"})))}),Ir(Ln))))},deal:$t=>{var Wn,In,si;$t.score=$t.score===void 0?10:$t.score,$t.code=(Wn=$t.code)==null?void 0:Wn.trim();let Ln=[];ir($t==null?void 0:$t.question)?((In=$t==null?void 0:$t.question)==null?void 0:In.length)>60&&Ln.push("\u7F16\u7A0B\u9898\u540D\u79F0\u9650\u523660\u4E2A\u5B57\u7B26"):Ln.push("\u672A\u8BC6\u522B\u5230\u9898\u5E72"),ir($t==null?void 0:$t.description)||Ln.push("\u672A\u8BC6\u522B\u5230\u8BD5\u9898\u63CF\u8FF0");const Zn=ir(String(($t==null?void 0:$t.timeLimit)||""));if($t.timeLimit=Zn,(!Zn||Zn&&!["3","4","5","6","7","8","9","10"].includes(Zn))&&Ln.push("\u65F6\u95F4\u9650\u5236\u4E3A\u5FC5\u586B\u9879\uFF0C\u53EA\u652F\u63013-10\u7684\u6574\u6570"),$t.platform=ir($t==null?void 0:$t.platform),$t!=null&&$t.platform){const jn=["c","c++","java","python"],Re=(si=$t==null?void 0:$t.platform)==null?void 0:si.toLowerCase(),Nn=jn.findIndex(bi=>bi===Re);Nn>-1?$t.platform=Si[Nn]:Ln.push("\u7F16\u7A0B\u8BED\u8A00\u4E3A\u5FC5\u586B\u9879\uFF0C\u76EE\u524D\u53EA\u652F\u6301C\u3001C++\u3001Python\u3001Java\u8BED\u8A00")}else Ln.push("\u7F16\u7A0B\u8BED\u8A00\u4E3A\u5FC5\u586B\u9879\uFF0C\u76EE\u524D\u53EA\u652F\u6301C\u3001C++\u3001Python\u3001Java\u8BED\u8A00");if(!($t!=null&&$t.inputs)||!($t!=null&&$t.outputs))$t.inputs=[],$t.outputs=[],Ln.push("\u672A\u8BC6\u522B\u5230\u6D4B\u8BD5\u7528\u4F8B\u3002\u63A8\u8350\u683C\u5F0F\uFF1A\u6D4B\u8BD5\u7528\u4F8B(1)\u8F93\u5165\uFF1A1\uFF1B\u6D4B\u8BD5\u7528\u4F8B(1)\u8F93\u51FA\uFF1A2");else{const jn=Math.min($t.inputs.length,$t.outputs.length);$t.inputs=$t.inputs.slice(0,jn),$t.outputs=$t.outputs.slice(0,jn),$t.outputs.some(Re=>!ir(Re))&&Ln.push("\u6D4B\u8BD5\u7528\u4F8B\u8F93\u51FA\u4E3A\u5FC5\u586B\u9879")}return $t.errorMsg=Ln.join(`
`),$t}},{id:"7",type:"\u7EC4\u5408\u9898",element:($t,Wn)=>{var In,si;const Ln=Ct[Wn];return pt.createElement("div",{className:Ht.row,style:{display:Ci?Ln!=null&&Ln.errorMsg?"flex":"none":"flex"}},pt.createElement("div",{className:Ht.leftLayout},pt.createElement(An,null,pt.createElement("div",{"data-text":"edit",contentEditable:!0,className:Ht.question},Ii($t,Wn),pr($t),(In=$t==null?void 0:$t.questions)==null?void 0:In.map((Zn,jn)=>{var Re;const Nn=(Re=Dr.find(bi=>bi.id===(Zn==null?void 0:Zn.type)))==null?void 0:Re.element;return pt.createElement(pt.Fragment,{key:`left-${$t.id}-${jn}`},Nn(Zn,Wn,jn)[0])}),yn($t),pt.createElement("p",{contentEditable:!0},"}}")))),pt.createElement("div",{className:Ht.rightLayout},pt.createElement(ui,{className:Ln!=null&&Ln.errorMsg?Ht.error:""},yr(Ln,Wn),wr(Ln,"",Wn),(si=Ln==null?void 0:Ln.questions)==null?void 0:si.map((Zn,jn)=>{var Re;const Nn=(Re=Dr.find(bi=>bi.id===(Zn==null?void 0:Zn.type)))==null?void 0:Re.element;return pt.createElement(pt.Fragment,{key:`right-${Ln.id}-${jn}`},Nn(Zn,Wn,jn)[1])}),Ir(Ln))))},deal:$t=>{var Wn,In,si,Ln,Zn;const jn=Un,Re=[...Dr],Nn=Re.findIndex(Bi=>Bi.id==="0"),bi=Re.findIndex(Bi=>Bi.id==="1");if(Nn!==-1){const Bi=Re[Nn].deal;Re[Nn].deal=Sr=>{const br=Bi(Sr);return br.errorMsg&&(br.errorMsg=br.errorMsg.split(`
`).filter(ho=>ho!=="\u9009\u9879\u5185\u5BB9\u91CD\u590D").join(`
`)),br}}if(bi!==-1){const Bi=Re[bi].deal;Re[bi].deal=Sr=>{const br=Bi(Sr);return br.errorMsg&&(br.errorMsg=br.errorMsg.split(`
`).filter(ho=>ho!=="\u9009\u9879\u5185\u5BB9\u91CD\u590D").join(`
`)),br}}$t.questions=(Wn=$t.questions)!=null&&Wn.length?Un($t.questions.slice(0,20)):[],$t.questions=(In=$t.questions)==null?void 0:In.map((Bi,Sr)=>{var br;if(Bi.type==="0"||Bi.type==="1"){const ho=(br=Bi.options)==null?void 0:br.map(Co=>Co==null?void 0:Co.trim().replace(/^\s+|\s+$/g,""));ho&&new Set(ho).size!==ho.length&&(Bi.errorMsg=(Bi.errorMsg?Bi.errorMsg+`
`:"")+"\u9009\u9879\u5185\u5BB9\u91CD\u590D")}return Gn(Cn({},Bi),{last:Sr===$t.questions.length-1})});const cr=(si=$t.questions)==null?void 0:si.reduce((Bi,Sr)=>{const br=parseFloat(Sr.score);return isNaN(br)?Bi:Bi+br},0);$t.score=cr;let Yi=[];return(Ln=$t.questions)!=null&&Ln.length?$t.errorMsg=((Zn=$t.questions)==null?void 0:Zn.findIndex(Bi=>!!Bi.errorMsg))>-1:Yi.push("\u8BF7\u6DFB\u52A0\u5C0F\u9898"),ir($t==null?void 0:$t.question)||Yi.push("\u672A\u8BC6\u522B\u5230\u9898\u5E72"),Yi.length&&($t.errorMsg=Yi.join(`
`)),$t}},{id:"8",type:"\u7A0B\u5E8F\u586B\u7A7A\u9898",element:($t,Wn)=>{var In,si;const Ln=Ct[Wn],Zn=Si.map(jn=>({key:jn,label:jn,onClick:()=>di("platform",Wn,jn)}));return pt.createElement("div",{className:Ht.row,style:{display:Ci?Ln!=null&&Ln.errorMsg?"flex":"none":"flex"}},pt.createElement("div",{className:Ht.leftLayout},pt.createElement(An,null,pt.createElement("div",{"data-text":"edit",contentEditable:!0,className:Ht.question},Ii($t,Wn),pr($t),pt.createElement(ge,{id:$t==null?void 0:$t.id,value:`\u65F6\u95F4\u9650\u5236\uFF08\u79D2\uFF09\uFF1A${$t==null?void 0:$t.timeLimit}`,tagName:"p"}),pt.createElement(ge,{id:$t==null?void 0:$t.id,value:`\u7F16\u7A0B\u8BED\u8A00\uFF1A${($t==null?void 0:$t.platform)||""}`,tagName:"p"}),pt.createElement("p",{contentEditable:!0},"\u7A0B\u5E8F\u4EE3\u7801\uFF1A"),pt.createElement("h4",null),pt.createElement(ge,{id:$t==null?void 0:$t.id,value:($t==null?void 0:$t.code)||"",tagName:"div"}),pt.createElement("h4",null),pt.createElement(ge,{id:$t==null?void 0:$t.id,value:`\u6D4B\u8BD5\u7528\u4F8B\u8F93\u5165\uFF1A${($t==null?void 0:$t.input)||""}`,tagName:"p"}),pt.createElement(ge,{id:$t==null?void 0:$t.id,value:`\u6D4B\u8BD5\u7528\u4F8B\u8F93\u51FA\uFF1A${($t==null?void 0:$t.output)||""}`,tagName:"p"}),(In=$t==null?void 0:$t.answer)==null?void 0:In.map((jn,Re)=>pt.createElement(ge,{key:Re,id:$t==null?void 0:$t.id,value:`\u7B54\u6848${Re+1}\uFF1A${jn||""}`,tagName:"p"})),yn($t)))),pt.createElement("div",{className:Ht.rightLayout},pt.createElement(ui,{className:Ln!=null&&Ln.errorMsg?Ht.error:""},yr(Ln,Wn),wr(Ln,"",Wn),pt.createElement("div",{className:Ht.liWrap},pt.createElement("div",{className:Ht.li,onKeyDown:me},pt.createElement("aside",null,"\u65F6\u95F4\u9650\u5236\uFF08\u79D2\uFF09\uFF1A"),pt.createElement(ge,{className:Ht.edit,id:Ln==null?void 0:Ln.id,value:Ln==null?void 0:Ln.timeLimit,tagName:"div",onBlur:jn=>di("timeLimit",Wn,tr(jn))})),pt.createElement("div",{className:Ht.li},pt.createElement("aside",null,"\u7F16\u7A0B\u8BED\u8A00\uFF1A"),pt.createElement("div",{className:"c-black"},pt.createElement(he.Z,{menu:{items:Zn}},pt.createElement("span",{className:"c-light-primary"},Ln==null?void 0:Ln.platform,pt.createElement("i",{className:"iconfont icon-a-bianzu11 font14 ml4"}))))),pt.createElement("div",{className:Ht.li,style:{flexDirection:"column",alignItems:"start"}},pt.createElement("aside",{className:"mb10"},"\u7A0B\u5E8F\u4EE3\u7801\uFF1A"),pt.createElement(ge,{className:Ht.edit,id:Ln==null?void 0:Ln.id,value:(Ln==null?void 0:Ln.code)||"",onBlur:jn=>di("code",Wn,tr(jn)),tagName:"div"})),pt.createElement("div",{className:Ht.li},pt.createElement("aside",null,"\u6D4B\u8BD5\u7528\u4F8B\u8F93\u5165\uFF1A"),pt.createElement(ge,{className:Ht.edit,id:Ln==null?void 0:Ln.id,value:(Ln==null?void 0:Ln.input)||"",onBlur:jn=>di("input",Wn,tr(jn)),tagName:"div"})),pt.createElement("div",{className:Ht.li},pt.createElement("aside",null,"\u6D4B\u8BD5\u7528\u4F8B\u8F93\u51FA\uFF1A"),pt.createElement(ge,{className:Ht.edit,id:Ln==null?void 0:Ln.id,value:(Ln==null?void 0:Ln.output)||"",onBlur:jn=>di("output",Wn,tr(jn)),tagName:"div"}))),pt.createElement("div",{className:Ht.liWrap},(si=Ln==null?void 0:Ln.answer)==null?void 0:si.map((jn,Re)=>pt.createElement("div",{className:Ht.li,key:Re},pt.createElement("aside",null,"\u7B54\u6848",Re+1,"\uFF1A"),pt.createElement(ge,{id:Ln==null?void 0:Ln.id,value:jn||"",className:Ht.edit,onBlur:Nn=>{const bi=[...(Ln==null?void 0:Ln.answer)||[]];bi[Re]=tr(Nn),di("output",Wn,bi)},tagName:"div"})))),Ir(Ln))))},deal:$t=>{var Wn,In,si,Ln,Zn,jn,Re,Nn;$t.score=$t.score===void 0?10:$t.score,$t.code=(si=(In=(Wn=$t.code)==null?void 0:Wn.trim())==null?void 0:In.replace(/@_@/g,"@\u2581@"))==null?void 0:si.replace(/@__@/g,"@\u2581\u2581@");let bi=[];if(ir($t==null?void 0:$t.question)||bi.push("\u672A\u8BC6\u522B\u5230\u9898\u5E72"),ir($t==null?void 0:$t.code)?/@▁@|@▁▁@/.test($t==null?void 0:$t.code)?(Ln=$t==null?void 0:$t.answer)!=null&&Ln.length&&((Zn=$t==null?void 0:$t.code.match(/@▁@|@▁▁@/g))==null?void 0:Zn.length)!==((jn=$t==null?void 0:$t.answer)==null?void 0:jn.length)&&bi.push("\u586B\u7A7A\u9879\u4E0E\u7B54\u6848\u4E2A\u6570\u4E0D\u5339\u914D\uFF0C\u8BF7\u8FDB\u884C\u8C03\u6574"):bi.push("\u7A0B\u5E8F\u4EE3\u7801\u8BBE\u7F6E\u6709\u8BEF\uFF0C\u8BF7\u91CD\u65B0\u8BBE\u7F6E\u3002\u7A0B\u5E8F\u4EE3\u7801\u4E2D\u7684\u586B\u7A7A\u9879\u9700\u8981\u4F7F\u7528 @\u2581@ \u7B26\u53F7\u6807\u8BC6\u51FA\u6765"):bi.push("\u672A\u8BC6\u522B\u5230\u7A0B\u5E8F\u4EE3\u7801"),$t!=null&&$t.answer?(Re=$t.answer)!=null&&Re.some(Yi=>!ir(Yi))&&bi.push("\u7B54\u6848\u4E3A\u5FC5\u586B\u9879"):bi.push("\u672A\u8BC6\u522B\u5230\u7B54\u6848\u3002\u63A8\u8350\u683C\u5F0F\uFF1A\u7B54\u68481\uFF1AHello\uFF1B\u7B54\u68482\uFF1AWorld"),$t.platform=ir($t==null?void 0:$t.platform),$t!=null&&$t.platform){const Yi=["c","c++","java","python","javascript","ruby"],Bi=(Nn=$t==null?void 0:$t.platform)==null?void 0:Nn.toLowerCase(),Sr=Yi.findIndex(br=>br===Bi);Sr>-1?$t.platform=Si[Sr]:bi.push("\u7F16\u7A0B\u8BED\u8A00\u4E3A\u5FC5\u586B\u9879\uFF0C\u76EE\u524D\u53EA\u652F\u6301C\u3001C++\u3001Python\u3001Java\u3001JavaScript\u3001Ruby\u8BED\u8A00")}else bi.push("\u7F16\u7A0B\u8BED\u8A00\u4E3A\u5FC5\u586B\u9879\uFF0C\u76EE\u524D\u53EA\u652F\u6301C\u3001C++\u3001Python\u3001Java\u3001JavaScript\u3001Ruby\u8BED\u8A00");ir($t==null?void 0:$t.output)||bi.push("\u6D4B\u8BD5\u7528\u4F8B\u8F93\u51FA\u4E3A\u5FC5\u586B\u9879");const cr=ir(String(($t==null?void 0:$t.timeLimit)||""));return $t.timeLimit=cr,(!cr||cr&&!["3","4","5","6","7","8","9","10"].includes(cr))&&bi.push("\u65F6\u95F4\u9650\u5236\u4E3A\u5FC5\u586B\u9879\uFF0C\u53EA\u652F\u63013-10\u7684\u6574\u6570"),$t.errorMsg=bi.join(`
`),$t}}],yi=()=>pt.createElement(pt.Fragment,null,Qr.filter($t=>{var Wn;return!!((Wn=Dr.find(si=>si.id===($t==null?void 0:$t.type)))==null?void 0:Wn.element)}).map(($t,Wn)=>{var In;const si=(In=Dr.find(Ln=>Ln.id===($t==null?void 0:$t.type)))==null?void 0:In.element;return pt.createElement(pt.Fragment,{key:$t.id},si($t,Wn))})),Gt=()=>vn(void 0,null,function*(){const $t=Ct.filter(Wn=>!Wn.checked);if(nr!==3||!$t.length){Ae.ZP.warning("\u672A\u8BC6\u522B\u5230\u8BD5\u9898\uFF01");return}if(Vi){Tn(!0),yield Vi(Ct),Tn(!1);return}gi.setFieldsValue({sub_discipline_id:bt}),an(!0)}),Fo=($t,Wn=[])=>{if(typeof $t=="string")return $t.trim();if(Array.isArray($t))return $t.map(In=>Fo(In,Wn));if(typeof $t=="object"&&$t!==null){const In={};for(const si in $t)$t.hasOwnProperty(si)&&(Wn.includes(si)?In[si]=$t[si]:In[si]=Fo($t[si],Wn));return In}return $t},vo=$t=>vn(void 0,null,function*(){const Wn=Un(Fo($t));Rn(Wn),zi(JSON.parse(JSON.stringify(Wn))),sr(3),Ei(!1),ze(!1)});(0,pt.useEffect)(()=>{if(Dn)return;const $t=()=>{or(Wn=>Wn>=90?(clearInterval(hn.current),90):Wn+1)};return hn.current=setInterval($t,5e4/90),()=>clearInterval(hn.current)},[Dn]);const Oo=($t,Wn)=>{vi(!1);const In=new FormData;Object.keys(Wn).forEach(Ln=>{In.append(Ln,Wn[Ln])});const si=new window.XMLHttpRequest;si.withCredentials=!0,si.addEventListener("load",function(Ln){return vn(this,null,function*(){var Zn,jn;try{const Re=JSON.parse((Zn=Ln==null?void 0:Ln.target)==null?void 0:Zn.response);if(vi(!0),or(100),yield new Promise(Nn=>setTimeout(()=>Nn(),780)),Re.status===0){if(!((jn=Re==null?void 0:Re.data)!=null&&jn.length)){Ae.ZP.warning("\u672A\u8BC6\u522B\u5230\u8BD5\u9898!"),Ei(!1);return}vo((Re==null?void 0:Re.data)||[])}else Ei(!1),Ae.ZP.warning(Re==null?void 0:Re.message)}catch(Re){console.log("\u8BF7\u6C42\u9519\u8BEF\uFF1A",Re)}})}),si.addEventListener("error",()=>{Ei(!1)}),si.open("POST",`${lt.Z.API_SERVER}${$t}`),si.send(In)},ua=$t=>vn(void 0,null,function*(){const Wn=$t.name.split(".").slice(-1)[0].toLowerCase();return["docx"].indexOf(Wn)==-1?(Ae.ZP.error(`${$t.name}\u6587\u4EF6\u65E0\u6CD5\u4E0A\u4F20\uFF0C\u5F53\u524D\u4EC5\u9650\u652F\u6301\u683C\u5F0F\u4E3Adocx\u6587\u4EF6\uFF08Microsoft Word 2007\u4EE5\u4E0A\u7684\u7248\u672C\uFF09`),Promise.reject()):(Ei(!0),gr("\u5904\u7406\u4E2D"),Oo("/api/intelligent_imports/import.json",{file:$t}),Promise.reject())});let uo=[{key:1,label:pt.createElement(Ne.default,{showUploadList:!1,accept:".docx",maxCount:1,beforeUpload:ua},pt.createElement("div",{style:{padding:"0 5px",width:108,height:35,lineHeight:"35px"}},"\u672C\u5730\u5BFC\u5165"))}];((0,Ue.Ny)()||(0,Ue.$O)())&&uo.push({key:2,label:pt.createElement("div",{style:{padding:"0 5px"}},"\u5927\u6A21\u578B\u667A\u80FD\u51FA\u9898"),onClick:()=>{Ji.current.onClick()}});const Qo=[Ct.length,(er=Ct.filter($t=>!!($t!=null&&$t.errorMsg)))==null?void 0:er.length];return pt.createElement("div",{className:Me()(Ht.intelligentBox,"intelligent-body-curb",xn),style:Gn(Cn({},Ie),{width:Ze}),ref:Mn},pt.createElement("div",{className:Ht.underpin},pt.createElement("b",{style:ii}),pt.createElement("b",{style:ii})),pt.createElement("div",{className:Ht.head,style:{top:Rt}},pt.createElement("div",{className:Ht.leftLayout},Yt||pt.createElement(pt.Fragment,null,pt.createElement(ye.Z,{align:"middle"},pt.createElement("div",{className:Ht.title},"\u8BD5\u9898\u7F16\u8F91"),!Pt&&pt.createElement(ht.op,{href:`${lt.Z.API_SERVER}/api/intelligent_imports/download_template`,download:!0,type:"link"},"\u4E0B\u8F7DWord\u6A21\u7248",pt.createElement("i",{className:"iconfont icon-xiazai4 font14 ml10"})),pt.createElement(ht.op,{onClick:wi,shape:"default"},"\u4E00\u952E\u6E05\u7A7A"),!Pt&&pt.createElement(he.Z,{overlayClassName:Ht.menu,menu:{items:uo}},pt.createElement(ht.op,{className:"ml20",type:"primary",shape:"default"},"\u5BFC\u5165\u8BD5\u9898")),!!Hi&&Hi),pt.createElement("div",{className:Ht.tip},pt.createElement("i",{className:"iconfont icon-tishi7 font12 mr10"}),"\u63D0\u793A\uFF1A\u82E5\u8BC6\u522B\u6709\u8BEF\uFF0C\u53EF\u5728\u5DE6\u4FA7\u7F16\u8F91\u533A\u70B9\u51FB\u5BF9\u5E94\u7684\u8BD5\u9898\u6309\u683C\u5F0F\u4FEE\u6539\u540E\u91CD\u65B0\u8BC6\u522B"))),pt.createElement(ye.Z,{className:Ht.rightLayout,style:{alignItems:"start"}},Nt||pt.createElement(pt.Fragment,null,pt.createElement("div",{className:Ht.title,style:{marginRight:0}},"\u8BD5\u9898\u9884\u89C8"),[3].includes(nr)&&pt.createElement(de.default,{className:"ml20",checked:Ci,onChange:$t=>ze($t.target.checked)},"\u4EC5\u67E5\u770B\u9519\u8BEF\u8BD5\u9898"),[3].includes(nr)&&pt.createElement("div",{style:{color:"#5F6368",marginLeft:"auto"}},"\u5171\u8BC6\u522B",pt.createElement("span",{className:"ml5 mr5 c-light-primary"},Qo[0]),"\u9898\uFF0C\u5176\u4E2D\u8BC6\u522B\u6709\u8BEF",pt.createElement("span",{className:"ml5 mr5 c-red-e53"},Qo[1]),"\u9898")),ei&&pt.createElement("div",{className:Ht.tabs},Qr==null?void 0:Qr.map(($t,Wn)=>pt.createElement("div",{onClick:()=>{ki(Wn)},className:$n===Wn&&Ht.active,key:Wn},"\u65B0\u9898",Wn+1)))),pt.createElement("div",{className:Ht.centerBox},pt.createElement("img",{className:"mb10",src:Dt,width:56}),!_n&&pt.createElement(ht.op,{onClick:Pi},"\u8BC6\u522B"))),[1,2].includes(nr)&&Ni(),[3].includes(nr)&&yi(),pt.createElement("div",{className:"pb10"}),pt.createElement("div",{className:Ht.buttonFixed},pt.createElement("div",{className:Ht.buttonWrap},pt.createElement(He.ZP,{size:"middle",className:`${Ht.button} mr20`,onClick:Hn},"\u53D6\u6D88"),pt.createElement(He.ZP,{size:"middle",type:"primary",loading:pe,className:`${Ht.button}`,onClick:Gt},Jn))),pt.createElement(ee.default,{centered:!0,closable:!1,destroyOnClose:!0,open:Mr,title:null,footer:null,width:320,afterClose:()=>or(0)},pt.createElement(ye.Z,{align:"middle",style:{flexDirection:"column"}},pt.createElement("b",{style:{color:"#5F6368"},className:"font16 mb5 mt20"},_i,pt.createElement("span",{className:Ht.dotLoading},pt.createElement("span",null,"."),pt.createElement("span",null,"."),pt.createElement("span",null,"."))),pt.createElement(kt.Z,{style:{width:"auto"},size:[200,8],showInfo:!1,percent:kr}),pt.createElement("div",{style:{color:"#5F6368"},className:"mb20"},"\u6B63\u5728\u8BC6\u522B\uFF0C\u5DF2\u5B8C\u6210",pt.createElement("span",{className:"ml5 c-light-primary"},kr,"%")))),pt.createElement(ee.default,{centered:!0,open:fi,title:"\u8BD5\u9898\u5BFC\u5165\u8BBE\u7F6E",confirmLoading:Yn,width:480,onCancel:()=>an(!1),onOk:()=>gi.submit(),afterClose:()=>{gi.resetFields()}},pt.createElement(Pe.default,{style:{maxHeight:550},form:gi,layout:"horizontal",colon:!1,size:"large",onFinish:$t=>vn(void 0,null,function*(){var Wn,In,si,Ln,Zn;const jn=Ct.filter(bi=>!bi.checked&&!bi.errorMsg);Xn(!0);const Re=()=>vn(void 0,null,function*(){var bi,cr;const Yi=yield(0,zt.ZP)("/api/intelligent_imports/save.json",{method:"post",body:Gn(Cn(Cn({},$e),$t),{list:jn,mode:Pn})});Yi.status===0&&(hi&&((bi=Yi==null?void 0:Yi.data)!=null&&bi.success)&&window.location.pathname==="/problemset"&&(nn.Z.publish("refresh-item-bank",$t.group_id),yield new Promise(Bi=>setTimeout(()=>Bi(),1500))),Ae.ZP.success(`\u6210\u529F\u5BFC\u5165${(cr=Yi==null?void 0:Yi.data)==null?void 0:cr.success}\u9053\u8BD5\u9898`,3),qe(Yi),an(!1)),Xn(!1)});if(Pn!==1){yield Re();return}const Nn=yield(0,zt.ZP)("/api/intelligent_imports/is_repeated.json",{method:"post",body:{list:Ct,mode:Pn}});if(Nn.status===0){if(!((Wn=Nn==null?void 0:Nn.data)!=null&&Wn.error_size)){yield Re();return}ee.default.confirm({centered:!0,icon:null,okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",onCancel:()=>{Xn(!1)},title:"\u63D0\u793A",content:pt.createElement("div",{style:{overflow:"auto",maxHeight:500}},"\u5171",pt.createElement("span",{className:"c-light-primary ml5 mr5"},(In=Nn==null?void 0:Nn.data)==null?void 0:In.all_size),"\u9053\u8BD5\u9898\uFF0C\u5176\u4E2D",pt.createElement("span",{style:{color:"#FF9D18"},className:"ml5 mr5"},(si=Nn==null?void 0:Nn.data)==null?void 0:si.error_size),"\u9053\u8BD5\u9898\u91CD\u590D\uFF08\u7B2C",pt.createElement("span",{className:"ml5 mr5"},(Zn=(Ln=Nn==null?void 0:Nn.data)==null?void 0:Ln.index)==null?void 0:Zn.join("\u3001")),"\u9053\uFF09\uFF0C\u91CD\u590D\u8BD5\u9898\u5C06\u4F1A\u4E3A\u60A8\u81EA\u52A8\u8FC7\u6EE4\uFF0C\u786E\u5B9A\u5BFC\u5165\u5417\uFF1F"),onOk:Re})}})},pt.createElement("div",{className:"c-grey-999 mb20"},"\u63D0\u793A\uFF1A\u8BC6\u522B\u6709\u8BEF\u7684\u8BD5\u9898\u5C06\u4E0D\u4F1A\u88AB\u5BFC\u5165"),pt.createElement(Pe.default.Item,{label:"\u65B9\u5411&\u8BFE\u7A0B",name:"sub_discipline_id",labelCol:{span:5},wrapperCol:{span:19},rules:[{required:!0,message:"\u8BF7\u9009\u62E9\u65B9\u5411&\u8BFE\u7A0B"}]},pt.createElement(nt.Z,{placeholder:"\u8BF7\u9009\u62E9\u65B9\u5411&\u8BFE\u7A0B",fieldNames:{label:"name",value:"id",children:"sub_disciplines"},options:Ce})),Pn===1&&pt.createElement(Pe.default.Item,{label:pt.createElement(ye.Z,{align:"middle",style:{justifyContent:"space-between"}},pt.createElement("span",null,"\u653E\u5165\u6587\u4EF6\u5939\u76EE\u5F55"),pt.createElement("div",{onClick:()=>be(!0),style:{marginLeft:211,transform:"translateX(14px)",display:"flex",color:"#5F6368",cursor:"pointer"}},pt.createElement("img",{className:"mr5 primary-hover",src:re}),"\u65B0\u5EFA\u6587\u4EF6\u5939")),rules:[{required:!0,message:"\u8BF7\u9009\u62E9\u6587\u4EF6\u5939"}],name:"group_id",labelCol:{span:24},wrapperCol:{span:24}},pt.createElement(Xt.Z,{key:kn})))),pt.createElement(ee.default,{centered:!0,open:Sn,title:"\u65B0\u5EFA\u6587\u4EF6\u5939",destroyOnClose:!0,width:480,confirmLoading:ti,onCancel:()=>be(!1),onOk:()=>Oi.submit(),afterClose:()=>{Oi.resetFields()}},pt.createElement(Pe.default,{style:{maxHeight:550},form:Oi,layout:"horizontal",colon:!1,size:"large",onFinish:$t=>vn(void 0,null,function*(){var Wn;Xe(!0),(yield(0,zt.ZP)("/api/item_banks_groups.json",{method:"post",body:{name:$t.name,parent_id:(Wn=$t==null?void 0:$t.parent_id)==null?void 0:Wn[0]}})).status===0?(Qn(kn+1),setTimeout(()=>{Ae.ZP.success("\u64CD\u4F5C\u6210\u529F"),be(!1),Xe(!1)},1e3)):Xe(!1)})},pt.createElement(Pe.default.Item,{label:"\u6587\u4EF6\u5939\u540D\u79F0",name:"name",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u6587\u4EF6\u5939\u540D\u79F0"},{whitespace:!0,message:"\u8BF7\u52FF\u8F93\u5165\u7A7A\u683C"}]},pt.createElement(et.default,{maxLength:60,showCount:!0,placeholder:"\u8BF7\u8F93\u5165\u6587\u4EF6\u5939\u540D\u79F0"})),pt.createElement(Pe.default.Item,{label:"\u6587\u4EF6\u5939\u4F4D\u7F6E",rules:[{required:!0,message:"\u8BF7\u9009\u62E9\u6587\u4EF6\u5939"}],name:"parent_id"},pt.createElement(Xt.Z,null)))),pt.createElement(_e.Z,{onSave:$t=>{Ei(!0),gr("\u5904\u7406\u4E2D"),Oo("/api/intelligent_imports/import.json",{html:$t})},ref:Ji}))},ln=gt;var oi=un},59879:function(fn,Bn,Ft){"use strict";var pt=Ft(59301),Ht=Ft(88010),ve=Ft(48136),Me=Ft(41588),Pe=Ft(43418),Ae=Ft(59301);const ee=(0,pt.forwardRef)(({callback:Fe,width:ye,onChange:de,disabled:he,readOnly:Ne,type:He="",value:kt="",style:nt={}},et)=>{const ht=(0,pt.useRef)(),lt=(0,pt.useRef)(),[gt,yt]=(0,pt.useState)(0),[Lt,Dt]=(0,pt.useState)(0),[zt,Xt]=(0,pt.useState)(!1),re=()=>{var ne=document.createElement("div");ne.innerHTML=ht.current.getValue();var Le=ne.innerText;return Fe&&Fe(Le),Le};(0,pt.useImperativeHandle)(et,()=>({getData:re}));const le=ne=>{ne.preventDefault();const Le=ne.clientX-gt,ue=ne.clientY-Lt;document.body.onmousemove=Ee=>{let ge=Ee.clientX-Le,Ue=Ee.clientY-ue;const nn=document.getElementsByClassName("markdown-popup-form")[0],_e=window.innerWidth-nn.offsetWidth,qt=window.innerHeight-nn.offsetHeight;ge=Math.max(0,Math.min(ge,_e)),Ue=Math.max(0,Math.min(Ue,qt)),ae(Ee.clientX,Ee.clientY,Le,ue)&&(yt(ge),Dt(Ue))},document.body.onmouseup=function(){document.body.onmousemove=null}},ae=(ne,Le,ue,Ee)=>{const ge=document.body.clientHeight,Ue=document.body.clientWidth;return ne<20&&ue>ne||ne>Ue-20&&ue<ne||Le<20&&Ee>Le||Le>ge-20&&Ee<Le?(document.body.onmousemove=null,document.body.onmouseup=null,!1):!0};(0,pt.useEffect)(()=>{zt&&setTimeout(()=>{const ne=document.getElementsByClassName("markdown-popup-form")[0],Le=window.innerWidth/2-ne.offsetWidth/2,ue=window.innerHeight/2-ne.offsetHeight/2;yt(Le),Dt(ue)},0)},[zt]);const je=()=>{he||Ne||Xt(!0)};return Ae.createElement("div",{style:nt},Ae.createElement("div",{style:{width:ye||"100%",position:"relative"},className:`${Ht.Z.mathFillWrap} ${he||Ne?"cursorDefault":""}`,onClick:()=>je()},Ae.createElement("math-field",{disabled:he,locale:"zh_cn",class:`${Ht.Z.mathField} ${He}`,readOnly:Ne,placeholder:"\u8BF7\u8F93\u5165\u516C\u5F0F",ref:ht,style:{width:"100%",fontSize:kt?18:14},value:kt||""})),Ae.createElement(Pe.default,{maskClosable:!1,centered:!0,width:860,style:{position:"absolute",left:gt,top:Lt},title:Ae.createElement("div",{style:{cursor:"move"},onMouseDown:le},"\u8F93\u5165\u516C\u5F0F"),open:zt,onOk:()=>{const ne=lt.current.getData();ht.current.setValue(ne),de(ne),Xt(!1)},onCancel:()=>{Xt(!1)},destroyOnClose:!0,className:"markdown-popup-form"},Ae.createElement(Me.Z,{value:kt,ref:lt,onChange:de,showSaveButton:!1})))});Bn.Z=ee},41588:function(fn,Bn,Ft){"use strict";var pt=Ft(59301),Ht=Ft(95237),ve=Ft(43604),Me=Ft(99313),Pe=Ft(3113),Ae=Ft(85149),ee=Ft(88010),Fe=Ft(48136),ye=Ft(59301);const de=(0,pt.forwardRef)(({callback:he,showSaveButton:Ne,value:He=""},kt)=>{const nt=(0,pt.useRef)(),et=[{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 "}]}]}],ht=[{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}`}]}]}],lt=Lt=>{nt.current.setValue(nt.current.getValue()+" "+Lt.value+" ")},gt=[{key:"1",label:"\u5FEB\u6377\u6A21\u677F",children:ye.createElement(Ht.Z,{className:ee.Z.lists,gutter:[10,10]},et.map((Lt,Dt)=>ye.createElement(ve.Z,{flex:"110px",className:ee.Z.item},ye.createElement("div",null,ye.createElement(Ae.Z,{value:`$$${Lt.value}$$`}),Lt.name),ye.createElement("div",{className:ee.Z.children},Lt.children.map((zt,Xt)=>ye.createElement("div",{key:Xt},ye.createElement("h1",null,zt.name),ye.createElement(Ht.Z,{gutter:[10,10]},zt.data.map((re,le)=>ye.createElement(ve.Z,{key:le,onClick:()=>lt(re),className:ee.Z.diamond},ye.createElement(Ae.Z,{value:"`$$"+re.value+"$$`"}))))))))))},{key:"2",label:"\u516C\u5F0F\u6A21\u677F",children:ye.createElement(Ht.Z,{className:ee.Z.lists,gutter:[10,10]},ht.map((Lt,Dt)=>ye.createElement(ve.Z,{flex:"110px",className:ee.Z.item},ye.createElement("div",null,ye.createElement(Ae.Z,{value:"`$$"+Lt.value+"$$`"}),Lt.name),ye.createElement("div",{className:ee.Z.children},Lt.children.map((zt,Xt)=>ye.createElement("div",{key:Xt},zt.name&&ye.createElement("h1",null,zt.name),ye.createElement(Ht.Z,{gutter:[10,10]},zt.data.map((re,le)=>ye.createElement(ve.Z,{key:le,onClick:()=>lt(re),className:ee.Z.diamond},ye.createElement(Ae.Z,{value:"`$$"+re.value+"$$`"}))))))))))}],yt=()=>{var Lt=document.createElement("div");Lt.innerHTML=nt.current.getValue();var Dt=Lt.innerText;return he&&he(Dt),Dt};return(0,pt.useImperativeHandle)(kt,()=>({getData:yt})),ye.createElement("div",{className:ee.Z.mathWrap},ye.createElement(Me.default,{defaultActiveKey:"1",items:gt}),ye.createElement("math-field",{locale:"zh_cn",className:ee.Z.mathField,placeholder:"\u8BF7\u6253\u5F00\u952E\u76D8\uFF0C\u8F93\u5165\u516C\u5F0F",ref:nt,style:{width:800,marginTop:30,fontSize:18}},He||""),Ne&&ye.createElement("div",{className:ee.Z.button},ye.createElement(Pe.ZP,{size:"large",onClick:yt,style:{zIndex:8,marginTop:10},type:"primary"},"\u4FDD\u5B58\u5230\u7F16\u8F91\u5668")))});Bn.Z=de},87198:function(fn,Bn,Ft){"use strict";Ft.d(Bn,{Z:function(){return Ne}});var pt=Ft(59301),Ht=Ft(78241),ve=Ft(43418),Me=Ft(92832),Pe=Ft(87169),Ae=Ft(99064),ee={publicQuest:"publicQuest___iYvzo",publicQuestContent:"publicQuestContent___vgbKh",public_tips:"public_tips___UX0Dn",concat:"concat___wOfND"},Fe=Ft(86918),ye=Ft(59301),de=(He,kt,nt)=>new Promise((et,ht)=>{var lt=Lt=>{try{yt(nt.next(Lt))}catch(Dt){ht(Dt)}},gt=Lt=>{try{yt(nt.throw(Lt))}catch(Dt){ht(Dt)}},yt=Lt=>Lt.done?et(Lt.value):Promise.resolve(Lt.value).then(lt,gt);yt((nt=nt.apply(He,kt)).next())}),Ne=({type:He="subject",open:kt,onCancel:nt,onOkClick:et,subDisciplineId:ht})=>{const[lt]=Ht.default.useForm(),[gt,yt]=(0,pt.useState)([]),[Lt,Dt]=(0,pt.useState)(!1);(0,pt.useEffect)(()=>{},[]);const zt=()=>de(void 0,null,function*(){if(He){const Xt=yield(0,Ae.ZP)("/api/disciplines.json",{method:"get",params:{source:He}});yt(Xt.disciplines||[])}});return ye.createElement(ve.default,{title:ye.createElement("div",{style:{fontWeight:"bold"}},"\u65B0\u5EFA\u77E5\u8BC6\u70B9"),open:kt,width:558,centered:!0,className:ee.publicQuest,onCancel:()=>{nt(),lt.resetFields()},onOk:()=>{lt.validateFields().then(Xt=>de(void 0,null,function*(){const re=yield(0,Ae.ZP)("/api/tag_disciplines.json",{method:"post",body:{name:Xt==null?void 0:Xt.name,sub_discipline_id:ht}});(re==null?void 0:re.status)===0&&et({name:Xt==null?void 0:Xt.name,id:re==null?void 0:re.tag_discipline_id,public:!1,type:"personal"}),lt.resetFields(),nt()}))}},ye.createElement("div",{className:ee.publicQuestContent},ye.createElement("div",{className:ee.public_tips},ye.createElement(Pe.Z,{style:{color:"#FF8C29",marginRight:10,paddingTop:5}}),"\u65B0\u5EFA\u7684\u77E5\u8BC6\u70B9\u4EC5\u672C\u4EBA\u53EF\u89C1\uFF0C\u5E73\u53F0\u5BA1\u6838\u5217\u5165\u516C\u5F00\u77E5\u8BC6\u70B9\u540E\uFF0C\u5BF9\u6240\u6709\u7528\u6237\u53EF\u89C1\u3002 \u5E73\u53F0\u6709\u6743\u5220\u9664\u4E0D\u5408\u9002\u7684\u77E5\u8BC6\u70B9\uFF0C\u8BF7\u8BA4\u771F\u586B\u5199\u77E5\u8BC6\u70B9\u540D\u79F0\u3002"),ye.createElement(Ht.default,{labelAlign:"left",form:lt,colon:!1},ye.createElement(Ht.default.Item,{label:"\u77E5\u8BC6\u70B9\u540D\u79F0",name:"name",rules:[{required:!0}]},ye.createElement(Me.default,{showCount:!0,maxLength:20,placeholder:"\u8BF7\u8F93\u5165\u77E5\u8BC6\u70B9\u540D\u79F0"}))),ye.createElement(Fe.Z,{open:Lt,onCancel:()=>{Dt(!1)}})))}},8797:function(fn,Bn,Ft){"use strict";var pt=Ft(59301),Ht=Ft(93314),ve=Ft(3113),Me=Object.defineProperty,Pe=Object.defineProperties,Ae=Object.getOwnPropertyDescriptors,ee=Object.getOwnPropertySymbols,Fe=Object.prototype.hasOwnProperty,ye=Object.prototype.propertyIsEnumerable,de=(kt,nt,et)=>nt in kt?Me(kt,nt,{enumerable:!0,configurable:!0,writable:!0,value:et}):kt[nt]=et,he=(kt,nt)=>{for(var et in nt||(nt={}))Fe.call(nt,et)&&de(kt,et,nt[et]);if(ee)for(var et of ee(nt))ye.call(nt,et)&&de(kt,et,nt[et]);return kt},Ne=(kt,nt)=>Pe(kt,Ae(nt));const He=({img:kt,buttonProps:nt={},styles:et={},customText:ht,ButtonText:lt,ButtonClick:gt,Buttonclass:yt,ButtonTwo:Lt,imgStyles:Dt,loading:zt=!1,className:Xt=""})=>pt.createElement("section",{className:`tc animated fadeIn ${Xt}`,style:he({color:"#999",margin:"100px auto",visibility:zt?"hidden":"visible"},et)},pt.createElement("img",{src:kt||Ht,style:Ne(he({},Dt),{pointerEvents:"none",userSelect:"none"})}),pt.createElement("p",{className:"mt20 font14"},ht||"\u6682\u65F6\u8FD8\u6CA1\u6709\u76F8\u5173\u6570\u636E\u54E6!"),lt&&pt.createElement(ve.ZP,he({className:yt,onClick:gt},nt),lt),Lt&&Lt);Bn.Z=He},23210:function(fn,Bn,Ft){"use strict";Ft.d(Bn,{Z:function(){return yt}});var pt=Ft(59301),Ht={wrp:"wrp___dq7YK",bgBlack:"bgBlack___ARIUV",monaco:"monaco___VnZC3",darkBlue:"darkBlue___UprA9",close:"close___LKoWu",embed:"embed___hvpEJ"},ve=Ft(3113),Me=Ft(70557),Pe=Ft(23954),Ae=Ft(6848),ee=Ft(955),Fe=Ft(94941),ye=Ft(8797),de=Ft(3294),he=Ft(19381),Ne=Ft(59301),He=Object.defineProperty,kt=Object.getOwnPropertySymbols,nt=Object.prototype.hasOwnProperty,et=Object.prototype.propertyIsEnumerable,ht=(Lt,Dt,zt)=>Dt in Lt?He(Lt,Dt,{enumerable:!0,configurable:!0,writable:!0,value:zt}):Lt[Dt]=zt,lt=(Lt,Dt)=>{for(var zt in Dt||(Dt={}))nt.call(Dt,zt)&&ht(Lt,zt,Dt[zt]);if(kt)for(var zt of kt(Dt))et.call(Dt,zt)&&ht(Lt,zt,Dt[zt]);return Lt},gt=(Lt,Dt,zt)=>new Promise((Xt,re)=>{var le=ne=>{try{je(zt.next(ne))}catch(Le){re(Le)}},ae=ne=>{try{je(zt.throw(ne))}catch(Le){re(Le)}},je=ne=>ne.done?Xt(ne.value):Promise.resolve(ne.value).then(le,ae);je((zt=zt.apply(Lt,Dt)).next())}),yt=({editOffice:Lt="view",data:Dt,theme:zt,type:Xt,filename:re,monacoEditor:le,className:ae,style:je,close:ne,onClose:Le,hasMask:ue,disabledDownload:Ee,onImgDimensions:ge,showNodata:Ue,recordInfo:nn})=>{const[_e,qt]=(0,pt.useState)("https://view.officeapps.live.com/op/view.aspx?src=http://testgs.educoder.net//rails/active_storage/blobs/eyJfcmFpbHMiOnsibWVzc2FnZSI6IkJBaHBCZz09IiwiZXhwIjpudWxsLCJwdXIiOiJibG9iX2lkIn19--03541f6234b93d7ac3b2d84e7eb0e6594a952945/1.ppt"),[Jt,De]=(0,pt.useState)(""),[sn,cn]=(0,pt.useState)(),Te=window.ENV==="build"?"/react/build":"",en=location.host.startsWith("localhost")?de.Z.PROXY_SERVER:de.Z.API_SERVER,Gn=10*(1024*1024),vn=(0,pt.useRef)();Dt!=null&&Dt.startsWith("/api")&&Xt!=="txt"&&(Dt=de.Z.API_SERVER+Dt);const zn=un=>un.substring(un.lastIndexOf("/")+1).split(".").pop();re&&le&&(le.filename=re),(0,pt.useEffect)(()=>{var un,ln;const oi=(ln=(un=document.cookie)==null?void 0:un.replace(/\s/g,""))==null?void 0:ln.split(";");oi==null||oi.map(xn=>{let Ie=xn.split("=");Ie[0]==="_educoder_session"&&De(Ie[1])})},[]),(0,pt.useEffect)(()=>{Xt==="office"&&(Dt.indexOf("bigfilescdn.")>-1||Dt.indexOf("bigfiles1")>-1?cn({url:Dt,fileType:zn(Dt),model:Dt.indexOf("model=edit")?"edit":"view"}):me())},[Xt,Dt]);const me=()=>gt(void 0,null,function*(){console.log("data:",Dt);let un=Dt;Dt.startsWith("http")||(un=location.origin+un);let ln=new URL(un).pathname.split("/").pop();const oi=yield(0,Fe.gJ)({attachment_id:ln});oi.url=en+oi.url,cn(oi)}),An=()=>{if(Dt.startsWith("http")||Dt.startsWith("blob:")){ui();return}(0,ee.Sv)(re||"educoder",Dt,re)},ui=()=>{nn&&(0,he.fc)({id:nn==null?void 0:nn.id,watch_type:1,course_id:nn==null?void 0:nn.course_id}),(0,ee.Nd)(re||"educoder",decodeURIComponent(Dt))};return Ne.createElement("div",{style:lt({},je||{}),className:`${ue&&Ht.bgBlack} ${Xt?Ht.wrp:"hide"}`},ne&&Ne.createElement("div",{className:Ht.close,ref:vn},!!ge&&Ne.createElement(Ae.Z,{title:"\u70B9\u51FB\u5BF9\u56FE\u7247\u8FDB\u884C\u6279\u6CE8",getPopupContainer:()=>vn.current},Ne.createElement("span",{onClick:()=>{Le(),ge()}},Ne.createElement("i",{className:"icon-yulanpizhu"}))),!Ee&&Ne.createElement(Ae.Z,{title:"\u70B9\u51FB\u4E0B\u8F7D\u6B64\u6587\u4EF6",getPopupContainer:()=>vn.current},Ne.createElement("span",{onClick:ui},Ne.createElement("i",{className:"icon-quxiaozhiding"}))),Ne.createElement(Ae.Z,{title:"\u5173\u95ED",getPopupContainer:()=>vn.current},Ne.createElement("span",{className:"",onClick:Le},Ne.createElement("i",{className:"icon-guanbi1"})))),Ne.createElement("div",{className:`${Ht[ae]} ${ae} ${Ht.monaco} ${Xt==="txt"?"show":"hide"}`},Xt==="txt"&&Ne.createElement(Ne.Fragment,null,Ne.createElement(Pe.ZP,lt({},le)))),Xt==="audio"&&Ne.createElement("audio",{src:`${(Dt==null?void 0:Dt.indexOf("http://"))>-1||(Dt==null?void 0:Dt.indexOf("https://"))>-1?"":"data:audio/mp3;base64,"}${Dt}`,autoPlay:!0}),Xt==="video"&&Ne.createElement(Ne.Fragment,null,(Dt==null?void 0:Dt.indexOf("http"))>-1?Ne.createElement("video",{controls:!0,src:`${Dt}`,autoPlay:!0}):Ne.createElement("video",{controls:!0,src:`data:video/mp4;base64,${Dt}`,autoPlay:!0})),Xt==="office"&&sn&&Ne.createElement("iframe",{src:`${Te}/office.html?key=${sn.key}&url=${btoa(sn.url)}&callbackUrl=${en+(sn.callbackUrl||"")}&fileType=${sn.fileType}&title=${sn.title||""}&model=${Lt}&officeServer=${de.Z.ONLYOFFICE}&disabledDownload=${!!Ee}`}),Xt==="html"&&Ne.createElement("iframe",{src:Dt+"&disposition=inline"}),Xt==="pdf"&&Ne.createElement("iframe",{src:`${Te}/js/pdfview/index.html?filename=${re||"educoder.pdf"}&url=${encodeURIComponent(Dt)}&disabledDownload=${!!Ee}`}),Xt==="image"&&Ne.createElement("img",{src:`${(Dt==null?void 0:Dt.indexOf("http://"))>-1||(Dt==null?void 0:Dt.indexOf("https://"))>-1?"":"data:image/png;base64,"}${Dt}`}),(Xt==="other"||Xt==="download")&&Ne.createElement(Ne.Fragment,null,Ue?Ne.createElement(ye.Z,{customText:"\u5F53\u524D\u6587\u4EF6\u4E0D\u652F\u6301\u9884\u89C8\uFF0C\u53EF\u70B9\u51FB\u4E0B\u8F7D\u67E5\u770B",ButtonTwo:Ne.createElement(ve.ZP,{icon:Ne.createElement("i",{className:"iconfont icon-xiazai4 font14"}),type:"primary",size:"middle",onClick:An,disabled:Ee},"\u4E0B\u8F7D")}):Ne.createElement(ve.ZP,{type:"primary",size:"middle",onClick:An,disabled:Ee},Ne.createElement(Me.Z,null),"\u70B9\u51FB\u4E0B\u8F7D")))}},67248:function(fn,Bn,Ft){"use strict";Ft.d(Bn,{Q:function(){return ye},Z:function(){return he}});var pt=Ft(59301),Ht={flex_box_center:"flex_box_center___VcCAZ",flex_space_between:"flex_space_between___I3jjO",flex_box_vertical_center:"flex_box_vertical_center___Rm_54",flex_box_center_end:"flex_box_center_end___nTsdc",flex_box_column:"flex_box_column___UVpzN",tags:"tags___kRRoe",text:"text___IyyEa",tagWrap:"tagWrap___v63mB",tag:"tag___X7wE6",c:"c___mZMPq",cpp:"cpp___eaTie",java:"java___gL98T",python:"python___eNRkk",edit:"edit___tbVu0"},ve=Ft(92310),Me=Ft.n(ve),Pe=Ft(43418),Ae=Ft(8591),ee=Ft(24905),Fe=(Ne,He,kt)=>new Promise((nt,et)=>{var ht=yt=>{try{gt(kt.next(yt))}catch(Lt){et(Lt)}},lt=yt=>{try{gt(kt.throw(yt))}catch(Lt){et(Lt)}},gt=yt=>yt.done?nt(yt.value):Promise.resolve(yt.value).then(ht,lt);gt((kt=kt.apply(Ne,He)).next())});const ye=({title:Ne="\u8BBE\u7F6E\u7F16\u7A0B\u8BED\u8A00",dataSource:He=[],visible:kt,setVisible:nt,tip:et,onOk:ht})=>{const[lt,gt]=(0,pt.useState)([]),[yt,Lt]=(0,pt.useState)(!1);return(0,pt.useEffect)(()=>{kt&&gt(He)},[kt]),pt.createElement(Pe.default,{centered:!0,open:kt,title:Ne,confirmLoading:yt,width:564,onOk:()=>Fe(void 0,null,function*(){if(!lt.length){Ae.ZP.warning("\u8BF7\u9009\u62E9\u7F16\u7A0B\u8BED\u8A00");return}Lt(!0),yield ht(lt),Lt(!1)}),onCancel:()=>nt(!1)},!!et&&pt.createElement("div",{className:"c-grey-666 font16 mb10"},et),pt.createElement("div",{style:{background:"#F6F7F9",padding:"20px 20px 20px 26px"}},pt.createElement(ee.default.Group,{value:lt,options:[{label:"C\u8BED\u8A00",value:"C"},{label:"C++\u8BED\u8A00",value:"C++",style:{marginLeft:30}},{label:"Java\u8BED\u8A00",value:"Java",style:{marginLeft:30}},{label:"Python\u8BED\u8A00",value:"Python",style:{marginLeft:30}}],onChange:Dt=>{gt(Dt)}})))};var he=({title:Ne="\u5141\u8BB8\u7F16\u7A0B\u7684\u8BED\u8A00",className:He,style:kt={},onEdit:nt,dataSource:et=[]})=>{const ht={C:pt.createElement("div",{className:Ht.c},"C"),"C++":pt.createElement("div",{className:Ht.cpp},"C++"),Java:pt.createElement("div",{className:Ht.java},"Java"),Python:pt.createElement("div",{className:Ht.python},"Python")};return pt.createElement("div",{className:Me()(Ht.tags,He),style:kt},!!Ne&&pt.createElement("div",{className:Ht.text},Ne),pt.createElement("div",{className:Ht.tagWrap},et==null?void 0:et.map(lt=>pt.createElement(pt.Fragment,{key:lt},ht[lt]))),!!nt&&pt.createElement("div",{onClick:nt,className:`iconfont icon-bianji_Hover ${Ht.edit}`}))}},90502:function(fn,Bn,Ft){"use strict";Ft.d(Bn,{t:function(){return oi}});var pt=Ft(59301),Ht=Ft(92832),ve=Ft(78241),Me=Ft(43418),Pe=Ft(95237),Ae=Ft(43604),ee=Ft(5871),Fe=Ft(57809),ye=Ft(5112),de=Ft(41984),he=Ft(89070),Ne=Ft(43809),He=Ft(8591),kt=Ft(3113),nt=Ft(71418),et=Ft(24334),ht={flex_box_center:"flex_box_center___kOQ8P",flex_space_between:"flex_space_between___fY6jt",flex_box_vertical_center:"flex_box_vertical_center___bDSSI",flex_box_center_end:"flex_box_center_end___mQ6mU",flex_box_column:"flex_box_column___F15G0",result:"result___UYRo8",left:"left___TRaH5",right:"right___twp9s",box:"box___vwndt",li:"li___hRe2d"},lt=Ft(99064),gt=Ft(88264),yt=Ft(12290),Lt=Ft(56102),Dt=Ft(74440),zt=Ft(59301),Xt=Object.defineProperty,re=Object.defineProperties,le=Object.getOwnPropertyDescriptors,ae=Object.getOwnPropertySymbols,je=Object.prototype.hasOwnProperty,ne=Object.prototype.propertyIsEnumerable,Le=(xn,Ie,Ze)=>Ie in xn?Xt(xn,Ie,{enumerable:!0,configurable:!0,writable:!0,value:Ze}):xn[Ie]=Ze,ue=(xn,Ie)=>{for(var Ze in Ie||(Ie={}))je.call(Ie,Ze)&&Le(xn,Ze,Ie[Ze]);if(ae)for(var Ze of ae(Ie))ne.call(Ie,Ze)&&Le(xn,Ze,Ie[Ze]);return xn},Ee=(xn,Ie)=>re(xn,le(Ie)),ge=(xn,Ie,Ze)=>new Promise((Hn,qe)=>{var $e=bt=>{try{Rt(Ze.next(bt))}catch(Pt){qe(Pt)}},Pn=bt=>{try{Rt(Ze.throw(bt))}catch(Pt){qe(Pt)}},Rt=bt=>bt.done?Hn(bt.value):Promise.resolve(bt.value).then($e,Pn);Rt((Ze=Ze.apply(xn,Ie)).next())}),nn=({buttonProps:xn,buttonText:Ie,form:Ze,hackIdentifier:Hn="",answerKey:qe,data:$e})=>{const[Pn,Rt]=(0,pt.useState)(!1),[bt,Pt]=(0,pt.useState)(!1),[It,Yt]=(0,pt.useState)(!1),[Nt,xe]=(0,pt.useState)({}),[_n,ni]=(0,pt.useState)(""),[ei,ii]=(0,pt.useState)(""),Hi=(0,pt.useRef)(Hn),hi=(0,pt.useRef)(""),Jn=(0,pt.useRef)(!1);(0,pt.useEffect)(()=>{It&&sr()},[It]),(0,pt.useEffect)(()=>()=>{sessionStorage.removeItem("projectFill")},[]);const Vi=()=>new Date().getTime(),er=$e==null?void 0:$e.code,nr=()=>{var _i,gr;let Mr=er?$e==null?void 0:$e.code:(_i=Ze.getFieldValue("hack_codes"))==null?void 0:_i.code,Ei=er?$e==null?void 0:$e.answer_content:Ze.getFieldValue(qe),Qr=er?$e==null?void 0:$e.input:(gr=Ze.getFieldValue("hack_sets"))==null?void 0:gr.input;Ei==null||Ei.forEach(Rn=>{const Ct=Rn.value||Rn.answer_text||"";Mr=Mr.replace(/(@▁@|@▁▁@)/,Ct)}),ii(Qr),ni(Mr),xe({}),Yt(!0)},sr=()=>ge(void 0,null,function*(){var _i,gr,Mr,Ei;const Qr=Vi(),Rn=er?$e==null?void 0:$e.time_limit:(_i=Ze.getFieldsValue())==null?void 0:_i.hack.time_limit,Ct=er?(gr=$e==null?void 0:$e.answer_content)==null?void 0:gr.length:(Ei=(Mr=Ze.getFieldsValue())==null?void 0:Mr.standard_answers)==null?void 0:Ei.length;Rt(!0),yield(0,gt.bM)(hi.current,{test_hack_code:_n,test_input:ei});function zi(){return ge(this,null,function*(){const{status:Ci,data:ze}=yield(0,gt.rX)(hi.current,"submit"),Xn=Vi()-Qr>(Rn+3)*1e3*Ct;if(Jn.current){if(Xn){He.ZP.error("\u8C03\u8BD5\u4EE3\u7801\u8D85\u65F6"),Rt(!1);return}if(Ci===0){Rt(!1),xe(Ee(ue({},ze),{showText:!0}));return}setTimeout(zi,1e3)}})}zi()}),kr=()=>ge(void 0,null,function*(){var _i,gr,Mr,Ei,Qr,Rn,Ct;if(!$e){try{yield Ze.validateFields()}catch(Yn){(Mr=(gr=(_i=Yn==null?void 0:Yn.errorFields)==null?void 0:_i[0])==null?void 0:gr.name)!=null&&Mr.includes("standard_answers")?He.ZP.error("\u586B\u7A7A\u9879\u7B54\u6848\u4E0D\u80FD\u4E3A\u7A7A"):He.ZP.error(Yn.errorFields[0].errors[0]),Ze.scrollToField(Yn.errorFields[0].name,{behavior:"smooth",block:"center"});return}Pt(!0);let Ci="";const ze=Ze.getFieldsValue();Hi.current?Ci=yield(0,lt.ZP)(`/api/problems/${Hi.current}.json`,{method:"put",body:Ee(ue({},ze),{hack:Ee(ue({},ze==null?void 0:ze.hack),{sub_discipline_id:(Ct=(Rn=ze==null?void 0:ze.hack)==null?void 0:Rn.sub_discipline_id)==null?void 0:Ct[1],difficult:ze.difficulty,item_banks_group_id:ze.item_banks_group_id}),hack_codes:Ee(ue({},ze.hack_codes),{code:et.Base64.encode(ze.hack_codes.code)}),update_hack_sets:[ue({},ze.hack_sets)],is_blank:!0,item_type:"BPROGRAM"})}):(Ci=yield(0,lt.ZP)("/api/problems.json",{method:"post",body:Ee(ue({},ze),{hack:Ee(ue({},ze==null?void 0:ze.hack),{sub_discipline_id:(Qr=(Ei=ze==null?void 0:ze.hack)==null?void 0:Ei.sub_discipline_id)==null?void 0:Qr[1],difficult:ze.difficulty,item_banks_group_id:ze.item_banks_group_id}),hack_codes:Ee(ue({},ze.hack_codes),{code:et.Base64.encode(ze.hack_codes.code)}),hack_sets:[ue({},ze.hack_sets)],is_blank:!0,item_type:"BPROGRAM"})}),Hi.current=Ci==null?void 0:Ci.identifier,sessionStorage.projectFill=Ci==null?void 0:Ci.identifier)}const zi=yield(0,lt.ZP)(`/api/problems/${Hi.current}/start.json`,{method:"get"});if((zi==null?void 0:zi.status)===0){hi.current=zi==null?void 0:zi.identifier,Jn.current=!0,Pt(!1),nr();return}Pt(!1)}),or=_i=>{const{status:gr,error_msg:Mr,execute_time:Ei,output:Qr,input:Rn,expected_output:Ct}=_i;let zi=null;switch(gr){case Dt.h.OK:zi=zt.createElement(zt.Fragment,null,zt.createElement("p",null,"\u6267\u884C\u7528\u65F6\uFF1A",Ei/1e3,"\u79D2"),zt.createElement("p",null,"\u6267\u884C\u7ED3\u679C\uFF1A\u8C03\u8BD5\u901A\u8FC7"));break;case Dt.h.NOMATCH:zi=zt.createElement(zt.Fragment,null,zt.createElement("div",null,"\u8F93\u5165\uFF1A"),zt.createElement("pre",{style:{fontFamily:"initial"}},Rn),zt.createElement("div",null,"\u8F93\u51FA\uFF1A"),zt.createElement("pre",{style:{fontFamily:"initial"}},Qr&&et.Base64.decode(Qr)),zt.createElement("div",null,"\u9884\u671F\u8F93\u51FA\uFF1A"),zt.createElement("pre",{style:{fontFamily:"initial"}},Ct&&et.Base64.decode(Ct)));break;case Dt.h.EXECUTEFAILURE:zi=zt.createElement(zt.Fragment,null,zt.createElement("p",null,"\u6700\u540E\u6267\u884C\u7684\u8F93\u5165\uFF1A",zt.createElement("pre",null,Rn)),zt.createElement("p",null,"\u6267\u884C\u51FA\u9519\u4FE1\u606F\uFF1A"),zt.createElement("pre",{className:"error"},et.Base64.decode(Mr)));break;case Dt.h.COMPILEFAILURE:zi=zt.createElement(zt.Fragment,null,zt.createElement("p",null,"\u6700\u540E\u6267\u884C\u7684\u8F93\u5165\uFF1A",zt.createElement("pre",null,Rn)),zt.createElement("p",null,"\u6267\u884C\u51FA\u9519\u4FE1\u606F\uFF1A"),zt.createElement("pre",{className:"error"},et.Base64.decode(Mr)));break;case Dt.h.PODFAILURE:zi=zt.createElement("p",null,"\u521B\u5EFApod\u5931\u8D25\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5");break;case Dt.h.TIMEOUT:zi=zt.createElement("p",null,"\u8BC4\u6D4B\u8D85\u65F6\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5");break}return zt.createElement(zt.Fragment,null," ",zi," ")};return zt.createElement("div",null,zt.createElement(kt.ZP,Ee(ue({loading:bt},xn),{onClick:kr}),Ie),zt.createElement(Me.default,{open:It,title:"\u8C03\u8BD5\u4EE3\u7801",destroyOnClose:!0,width:1200,okText:"\u8FD0\u884C\u6D4B\u8BD5",confirmLoading:Pn,cancelButtonProps:{style:{display:"none"}},onOk:()=>sr(),onCancel:()=>{Jn.current=!1,Yt(!1)}},zt.createElement("div",{className:ht.result},zt.createElement("div",{className:ht.left},zt.createElement("div",{className:"mb20"},zt.createElement("span",{className:"c-black"},"\u6267\u884C\u4EE3\u7801"),!$e&&zt.createElement(Lt.CopyToClipboard,{text:_n,onCopy:()=>He.ZP.success("\u590D\u5236\u6210\u529F")},zt.createElement("span",{style:{float:"right"},className:"current c-light-primary"},zt.createElement("i",{className:"iconfont icon-fuzhi8 mr5"}),"\u590D\u5236"))),zt.createElement(yt.Z,{height:510,className:"mb0",hidetoolBar:!0,defaultValue:_n,onChange:_i=>ni(_i)})),zt.createElement("div",{className:ht.right},zt.createElement("div",{className:"c-black mb20"},"\u81EA\u5B9A\u4E49\u6D4B\u8BD5\u7528\u4F8B"),zt.createElement("div",{className:ht.box},zt.createElement("div",{className:ht.li},zt.createElement(Ht.default.TextArea,{placeholder:"\u8BF7\u8F93\u5165",value:ei,onChange:_i=>ii(_i.target.value),bordered:!1,style:{height:180}}))),zt.createElement("div",{className:"c-black mb20 mt30"},"\u4EE3\u7801\u6267\u884C\u7ED3\u679C"),zt.createElement("div",{className:ht.box},zt.createElement(nt.Z,{spinning:Pn,tip:"\u4EE3\u7801\u6267\u884C\u4E2D"},zt.createElement("div",{className:ht.li,style:{height:196,overflow:"auto",padding:10}},or(Nt))))))))},_e=Ft(87169),qt=Ft(59301),Jt=Object.defineProperty,De=Object.defineProperties,sn=Object.getOwnPropertyDescriptors,cn=Object.getOwnPropertySymbols,Te=Object.prototype.hasOwnProperty,en=Object.prototype.propertyIsEnumerable,Cn=(xn,Ie,Ze)=>Ie in xn?Jt(xn,Ie,{enumerable:!0,configurable:!0,writable:!0,value:Ze}):xn[Ie]=Ze,Gn=(xn,Ie)=>{for(var Ze in Ie||(Ie={}))Te.call(Ie,Ze)&&Cn(xn,Ze,Ie[Ze]);if(cn)for(var Ze of cn(Ie))en.call(Ie,Ze)&&Cn(xn,Ze,Ie[Ze]);return xn},vn=(xn,Ie)=>De(xn,sn(Ie)),zn=(xn,Ie)=>{var Ze={};for(var Hn in xn)Te.call(xn,Hn)&&Ie.indexOf(Hn)<0&&(Ze[Hn]=xn[Hn]);if(xn!=null&&cn)for(var Hn of cn(xn))Ie.indexOf(Hn)<0&&en.call(xn,Hn)&&(Ze[Hn]=xn[Hn]);return Ze};const{TextArea:me}=Ht.default,An=[{title:"C",key:"C"},{title:"C++",key:"C++"},{title:"Python",key:"Python"},{title:"Java",key:"Java"}],ui=({value:xn,onChange:Ie})=>qt.createElement(Switch,{checked:xn,onChange:Ze=>{Ie(Ze)}}),un="@\u2581@",ln="@\u2581\u2581@",oi=({questionTitlePlaceholder:xn,form:Ie,scoreByBlank:Ze=!1,hackidentifier:Hn,answerKey:qe})=>{const[$e,Pn]=(0,pt.useState)(!1),[Rt,bt]=(0,pt.useState)(!1),It=(0,he.useParams)().type==="edit",Yt=(hi,Jn)=>{const Vi=Jn.line;let er=0;for(let sr=0;sr<Vi;sr++)er+=hi.getLine(sr).split(un).length-1;for(let sr=0;sr<Vi;sr++)er+=hi.getLine(sr).split(ln).length-1;const nr=hi.getLine(Vi).substring(0,Jn.ch);return er+=nr.split(un).length-1,er+=nr.split(ln).length-1,er},Nt=(hi,Jn,Vi,er)=>{const nr=hi.getRange(Jn.from,Jn.to);let sr=0;if(Jn.text.forEach(kr=>{sr+=kr.split(un).length-1}),Jn.text.forEach(kr=>{sr+=kr.split(ln).length-1}),Jn.origin!=="setValue"){if(nr&&(nr.indexOf(un)!==-1||nr.indexOf(ln)!==-1)){const kr=nr.split(un).length-1+nr.split(ln).length-1,or=Yt(hi,Jn.from);if(console.log(`\u5220\u9664${kr}\u4E2A\uFF0C \u524D\u9762\u6709${or}\u4E2A\uFF0C\u65B0\u589E${sr}\u4E2A`),kr>1){const _i=Array.from({length:kr},(gr,Mr)=>or+Mr);er(_i)}else er(or)}else if(sr>0){const kr=Yt(hi,Jn.from);console.log(`\u65B0\u589E${sr}\u4E2A\uFF0C\u4E4B\u524D\u6709${kr}\u4E2A`),Vi(sr,kr)}}},xe=()=>{const hi=Ie.getFieldValue(qe);Ie.setFieldsValue({[qe]:hi==null?void 0:hi.map((Jn,Vi)=>vn(Gn({},Jn),{position:Vi+1}))})},_n=(0,pt.useRef)(),ni=(hi,Jn)=>{for(let Vi=0;Vi<hi;Vi++)_n.current({position:null,answer_text:""},Jn+Vi);xe()},ei=(0,pt.useRef)(),ii=hi=>{ei.current(hi),xe()},Hi=ve.default.useWatch(qe,Ie);return qt.createElement("div",{className:Ne.Z.wrap},qt.createElement(ve.default.Item,{label:"\u8BD5\u9898\u63CF\u8FF0",name:["hack","description"],style:{display:"table"},className:"w100",labelCol:{span:24},rules:[{required:!0}]},qt.createElement(de.h,{scrollId:"name",watch:!0,height:140})),qt.createElement("div",{className:Ne.Z.questionTitleEditorWrap},qt.createElement(ve.default.Item,{label:"\u7A0B\u5E8F\u4EE3\u7801",name:["hack_codes","code"],labelCol:{span:24},rules:[{required:!0}]},qt.createElement(de.h,{scrollId:"name",watch:!0,height:400,showNullProgramButton:!0,onChange:(hi,Jn)=>{const Vi=Ie.getFieldValue(qe);console.log("--preAnswerData",Vi,Jn),Ie.setFieldsValue({[qe]:Vi==null?void 0:Vi.map((er,nr)=>{var sr;return vn(Gn({},er),{position:nr+1,multi_line:(sr=Jn==null?void 0:Jn[nr])==null?void 0:sr.multiLine})})})},placeholder:xn,onCMBeforeChange:(hi,Jn)=>{Nt(hi,Jn,ni,ii)}}))),qt.createElement(ve.default.List,{name:qe,rules:[{validator(hi,Jn){if(!(Jn!=null&&Jn.length))return Promise.reject(new Error("\u7B54\u6848\u4E0D\u80FD\u4E3A\u7A7A"));for(const Vi of Jn){const{answer_text:er}=Vi||{};if((er==null?void 0:er.length)===0)return Promise.reject(new Error("\u586B\u7A7A\u9879\u7B54\u6848\u4E0D\u80FD\u4E3A\u7A7A"))}return Promise.resolve()}}]},(hi,{add:Jn,remove:Vi},{errors:er})=>(_n.current=Jn,ei.current=Vi,qt.createElement(qt.Fragment,null,qt.createElement("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between"}},qt.createElement(ve.default.Item,{label:"\u586B\u7A7A\u9879\u7B54\u6848",required:!0,labelCol:{span:24}}),qt.createElement("div",{onClick:()=>{Me.default.warning({title:"\u7ED9\u5206\u8BF4\u660E",icon:null,width:700,centered:!0,content:qt.createElement("div",null,qt.createElement("div",null,"1.\u5B66\u751F\u586B\u5199\u7B54\u6848\u4E4B\u540E\uFF0C\u5FC5\u987B\u63D0\u4EA4\u4EE3\u7801",qt.createElement("span",{style:{color:"#e30000"}},"\u8FDB\u884C\u8BC4\u6D4B"),"\u624D\u80FD\u5F97\u5206\u3002"),qt.createElement("div",{style:{marginTop:10}},"2.\u8BD5\u9898\u7B97\u5206\u65F6\uFF0C\u7CFB\u7EDF\u4F1A\u5C06\u7A0B\u5E8F\u91CC\u9762\u7684\u6240\u6709\u7A7A\u66FF\u6362\u6210\u5B66\u751F\u7684\u7B54\u6848\u8FDB\u884C\u8BC4\u6D4B\u3002\u8F93\u51FA\u7684\u7ED3\u679C\u4E0E\u6D4B\u8BD5\u96C6\u6BD4\u5BF9\uFF0C\u5B8C\u5168\u6B63\u786E\u5219\u5F97\u6EE1\u5206\uFF1B\u82E5\u4E0D\u5B8C\u5168\u6B63\u786E\uFF0C\u5219\u4F9D\u6B21\u5C06\u6BCF\u4E2A\u7A7A\u6362\u6210\u5B66\u751F\u63D0\u4EA4\u7684\u7B54\u6848\uFF0C\u540C\u65F6\u5C06\u5176\u4ED6\u7A7A\u66FF\u6362\u6210\u6807\u51C6\u7B54\u6848\uFF0C\u8FD0\u884C\u7A0B\u5E8F\u3002\u5982\u679C\u8FD9\u4E2A\u7A7A\u7684\u5B66\u751F\u7B54\u6848\u4E0E\u6807\u51C6\u7B54\u6848\u7ED3\u5408\u80FD\u5F97\u5230\u6B63\u786E\u8F93\u51FA\uFF0C\u5219\u8FD9\u4E2A\u7A7A\u5F97\u5230\u8BE5\u7A7A\u7684\u6EE1\u5206\uFF0C\u5426\u5219\u8BE5\u7A7A\u5F970\u5206\u3002"))})},style:{minHeight:32,color:"#3061D0",cursor:"pointer"}},qt.createElement(_e.Z,{style:{marginRight:3,color:"#3061D0"}}),qt.createElement("span",null," \u7ED9\u5206\u8BF4\u660E"))),hi.map((nr,sr)=>{var kr=nr,{key:or,name:_i}=kr,gr=zn(kr,["key","name"]),Mr,Ei;return qt.createElement(Pe.Z,{className:"mb20",key:or,align:"middle",wrap:!1},qt.createElement(Ae.Z,{flex:"0 0 auto",className:`${Ne.Z.blankIndex}`},"\u586B\u7A7A\u9879",sr+1),qt.createElement(Ae.Z,{flex:1},qt.createElement(Pe.Z,{align:"top",justify:"space-between",wrap:!1},qt.createElement(Ae.Z,null,qt.createElement(ve.default.Item,vn(Gn({},gr),{name:[_i,"answer_text"],noStyle:!0}),(Mr=Hi==null?void 0:Hi[_i])!=null&&Mr.multi_line||(Ei=Hi==null?void 0:Hi[_i])!=null&&Ei.multiLine?qt.createElement(me,{spellCheck:!1,style:{marginLeft:10,width:550}}):qt.createElement(Ht.default,{style:{marginLeft:10,width:550},className:Ne.Z.blankInput,size:"large",maxLength:1e3,onBlur:Qr=>{}}))),Ze&&qt.createElement(Ae.Z,{flex:"224px"},qt.createElement(ve.default.Item,vn(Gn({},gr),{name:[_i,"score"],label:"\u5206\u503C",rules:[{required:!0}]}),qt.createElement(ee.Z,{size:"large",className:Ne.Z.blankInput,min:.1,max:100,precision:1,style:{width:"100%"},placeholder:"\u8BF7\u8F93\u5165\u5206\u503C"}))))))})))),qt.createElement("div",{onClick:()=>Pn(!0)},qt.createElement(ve.default.Item,{name:["hack","analysis"],label:"\u9898\u76EE\u89E3\u6790",labelCol:{span:24}},qt.createElement(de.x,{placeholder:"\u8BF7\u7F16\u8F91\u9898\u76EE\u89E3\u6790\uFF08\u975E\u5FC5\u586B\uFF09",isEdit:$e}))),qt.createElement(ve.default.Item,{label:"\u7F16\u7A0B\u8BED\u8A00",style:{marginTop:30},name:["hack_codes","language"],labelCol:{span:24},rules:[{required:!0,message:"\u8BF7\u9009\u62E9\u7F16\u7A0B\u8BED\u8A00"}]},qt.createElement(Fe.default,{size:"large"},An.map(hi=>qt.createElement(Fe.default.Option,{key:hi.title,value:hi.key}," ",hi.title)))),qt.createElement(ve.default.Item,{label:"\u6700\u5927\u8BC4\u6D4B\u65F6\u957F\uFF08\u79D2\uFF09",style:{marginTop:30},labelCol:{span:24},required:!0},qt.createElement(ve.default.Item,{name:["hack","time_limit"],rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u5355\u4E2A\u6D4B\u8BD5\u96C6\u8BC4\u6D4B\u65F6\u957F\u9650\u5236"},{type:"number",min:3,message:"\u6700\u5C0F\u9650\u5236\u65F6\u95F4\u662F3\u79D2"}],noStyle:!0},qt.createElement(ee.Z,{precision:0,max:10,min:3,size:"large",style:{width:"97%"}})),qt.createElement("span",{className:"ml10 font14"},"\u79D2")),qt.createElement(ve.default.Item,{label:"\u8BC4\u6D4B\u65F6\u7A7A\u683C\u5904\u7406",style:{marginTop:30},name:["hack","submit_rule"],labelCol:{span:24},rules:[{required:!0,message:"\u8BF7\u9009\u62E9\u8BC4\u6D4B\u65F6\u7A7A\u683C\u5904\u7406"}]},qt.createElement(ye.ZP.Group,{style:{marginTop:-10}},qt.createElement(ye.ZP,{value:0},"\u4E0D\u5FFD\u7565\u7A7A\u683C"),qt.createElement(ye.ZP,{value:1},"\u5FFD\u7565\u9996\u5C3E\u7A7A\u683C"),qt.createElement(ye.ZP,{value:2},"\u5FFD\u7565\u6240\u6709\u7A7A\u683C"))),qt.createElement(ve.default.Item,{label:"\u6D4B\u8BD5\u7528\u4F8B",required:!0,style:{marginTop:30}}),qt.createElement("div",{style:{background:"#F6F7F9",padding:15}},qt.createElement(ve.default.Item,{label:"\u8F93\u5165",labelCol:{span:24},name:["hack_sets","input"]},qt.createElement(me,{rows:4})),qt.createElement(ve.default.Item,{label:"\u8F93\u51FA",labelCol:{span:24},name:["hack_sets","output"],rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u8F93\u51FA\u5185\u5BB9"}]},qt.createElement(me,{rows:4}))),qt.createElement(nn,{form:Ie,answerKey:qe,hackIdentifier:Hn,buttonText:"\u8FD0\u884C\u8C03\u8BD5",buttonProps:{ghost:!0,icon:qt.createElement("i",{className:"iconfont icon-ceshi"}),style:{background:"rgba(55,173,131,0.05)",borderRadius:19,border:"1px solid #37AD83",width:116,height:38,display:"inline-flex",fontSize:14,alignItems:"center",justifyContent:"center",marginTop:20,cursor:"pointer",color:"#37AD83"}}}))}},65357:function(fn,Bn,Ft){"use strict";Ft.d(Bn,{u:function(){return zt}});var pt=Ft(59301),Ht=Ft(95237),ve=Ft(43604),Me=Ft(6848),Pe=Ft(78241),Ae=Ft(43809),ee=Ft(32134),Fe=Ft(12893),ye=Ft(41984),de=Ft(59301),he=Object.defineProperty,Ne=Object.defineProperties,He=Object.getOwnPropertyDescriptors,kt=Object.getOwnPropertySymbols,nt=Object.prototype.hasOwnProperty,et=Object.prototype.propertyIsEnumerable,ht=(Xt,re,le)=>re in Xt?he(Xt,re,{enumerable:!0,configurable:!0,writable:!0,value:le}):Xt[re]=le,lt=(Xt,re)=>{for(var le in re||(re={}))nt.call(re,le)&&ht(Xt,le,re[le]);if(kt)for(var le of kt(re))et.call(re,le)&&ht(Xt,le,re[le]);return Xt},gt=(Xt,re)=>Ne(Xt,He(re)),yt=(Xt,re)=>{var le={};for(var ae in Xt)nt.call(Xt,ae)&&re.indexOf(ae)<0&&(le[ae]=Xt[ae]);if(Xt!=null&&kt)for(var ae of kt(Xt))re.indexOf(ae)<0&&et.call(Xt,ae)&&(le[ae]=Xt[ae]);return le};const Lt=["A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"],Dt=({value:Xt,onChange:re,choiceTextKey:le,answerKey:ae,index:je,isEdit:ne,setInputActive:Le,form:ue,choiceOptionsPath:Ee,allowChangeMode:ge,showAddIcon:Ue,addItem:nn,deleteItem:_e})=>{console.log(Xt,"value");const qt=(Xt==null?void 0:Xt[ae])===1,Jt=()=>{const sn=ue.getFieldValue(Ee);ue.setFieldValue(Ee,sn.map(cn=>gt(lt({},cn),{[ae]:0})))},De=()=>{qt?re(gt(lt({},Xt),{[ae]:0})):(ge||Jt(),re(gt(lt({},Xt),{[ae]:1})))};return de.createElement(Ht.Z,{className:Ae.Z.choiceWrap,align:"middle",wrap:!1},de.createElement(ve.Z,{onClick:De,className:`${Ae.Z.choiceIndex} ${qt?Ae.Z.activeAnswer:""}`},Lt[je]),de.createElement(ve.Z,{flex:1,className:`${Ae.Z.editorWrap} ml15`,onClick:Le},de.createElement(ye.x,{height:155,placeholder:"\u8BF7\u60A8\u8F93\u5165\u9009\u9879",isEdit:ne,value:Xt==null?void 0:Xt[le],onChange:sn=>{re(gt(lt({},Xt),{[le]:sn}))}})),de.createElement(ve.Z,{flex:"0 0 auto",className:"ml15"},de.createElement("div",{onClick:De,className:`${Ae.Z.setAnswerBtn} ${qt?Ae.Z.activeAnswer:""}`},qt?"\u6B63\u786E\u7B54\u6848":"\u8BBE\u4E3A\u7B54\u6848")),de.createElement(ve.Z,{className:Ae.Z.actionWrapper},de.createElement(Me.Z,{title:"\u65B0\u589E\u53C2\u8003\u7B54\u6848"},de.createElement(ee.Z,{className:Ae.Z.addIcon,onClick:nn,style:{visibility:Ue?"visible":"hidden"}})),de.createElement(Me.Z,{title:"\u5220\u9664"},de.createElement(Fe.Z,{className:Ae.Z.deleteIcon,onClick:_e,style:{visibility:je>1?"visible":"hidden"}}))))},zt=({questionTitlePlaceholder:Xt,titleKey:re,choiceKey:le,analysisKey:ae,choiceTextKey:je,answerKey:ne,choiceOptionsPath:Le,allowChangeMode:ue=!0,form:Ee,showAnalysis:ge=!0})=>{const[Ue,nn]=(0,pt.useState)(),[_e,qt]=(0,pt.useState)(!1);return de.createElement("div",{className:Ae.Z.wrap},de.createElement("div",{className:Ae.Z.questionTitleEditorWrap},de.createElement(Pe.default.Item,{label:"\u9898\u5E72",name:re,labelCol:{span:24},rules:[{required:!0}]},de.createElement(ye.h,{scrollId:Array.isArray(re)?re.join("_"):`${re}`,watch:!0,height:140,placeholder:Xt}))),de.createElement(Pe.default.Item,{label:"\u7B54\u6848\u9009\u9879",required:!0,labelCol:{span:24}}),de.createElement(Pe.default.List,{name:le,rules:[{validator(Jt,De){const sn=De.some(Te=>Te[ne]===1),cn=De.findIndex(Te=>{var en;return((en=Te[je])==null?void 0:en.length)<=0});return cn!==-1?Promise.reject(new Error(`\u8BF7\u5148\u8F93\u5165${Lt[cn]}\u9009\u9879\u7684\u5185\u5BB9`)):sn?Promise.resolve():Promise.reject(new Error("\u8BF7\u8BBE\u7F6E\u6B63\u786E\u7B54\u6848"))}}]},(Jt,{add:De,remove:sn})=>de.createElement("div",{id:Array.isArray(Le)?Le.join("_"):`${Le}`},Jt.map((cn,Te)=>{var en=cn,{key:Cn,name:Gn}=en,vn=yt(en,["key","name"]);const zn=Ue===Cn,me=()=>{nn(Cn)},An=Te<7&&Te===Jt.length-1,ui=()=>De({[je]:"",[ne]:0}),un=()=>sn(Gn);return de.createElement(Pe.default.Item,gt(lt({},vn),{key:Cn,name:Gn,className:Ae.Z.choiceListWrap,rules:[{validator(ln,oi){return oi!=null&&oi.choice_text?Promise.resolve():Promise.reject(new Error(`\u8BF7\u5148\u8F93\u5165${Lt[Te]}\u9009\u9879\u7684\u5185\u5BB9`))}}]}),de.createElement(Dt,{choiceTextKey:je,answerKey:ne,index:Te,isEdit:zn,setInputActive:me,form:Ee,choiceOptionsPath:Le,allowChangeMode:ue,showAddIcon:An,addItem:ui,deleteItem:un}))}),Jt.length<8&&de.createElement("div",{className:`${Ae.Z.addBtn} mb30`,onClick:()=>De({[je]:"",[ne]:0})},"\u6DFB\u52A0\u9009\u9879"))),ge&&de.createElement("div",{onClick:()=>qt(!0)},de.createElement(Pe.default.Item,{name:ae,label:"\u9898\u76EE\u89E3\u6790",labelCol:{span:24}},de.createElement(ye.x,{placeholder:"\u8BF7\u7F16\u8F91\u9898\u76EE\u89E3\u6790\uFF08\u975E\u5FC5\u586B\uFF09",isEdit:_e}))))}},70472:function(fn,Bn,Ft){"use strict";Ft.d(Bn,{u:function(){return ue}});var pt=Ft(59301),Ht=Ft(43418),ve=Ft(95237),Me=Ft(43604),Pe=Ft(92832),Ae=Ft(6848),ee=Ft(78673),Fe=Ft(78241),ye=Ft(5112),de=Ft(5871),he=Ft(41984),Ne=Ft(12893),He=Ft(61485),kt=Ft(43809),nt=Ft(59879),et=Ft(59301),ht=Object.defineProperty,lt=Object.defineProperties,gt=Object.getOwnPropertyDescriptors,yt=Object.getOwnPropertySymbols,Lt=Object.prototype.hasOwnProperty,Dt=Object.prototype.propertyIsEnumerable,zt=(Ee,ge,Ue)=>ge in Ee?ht(Ee,ge,{enumerable:!0,configurable:!0,writable:!0,value:Ue}):Ee[ge]=Ue,Xt=(Ee,ge)=>{for(var Ue in ge||(ge={}))Lt.call(ge,Ue)&&zt(Ee,Ue,ge[Ue]);if(yt)for(var Ue of yt(ge))Dt.call(ge,Ue)&&zt(Ee,Ue,ge[Ue]);return Ee},re=(Ee,ge)=>lt(Ee,gt(ge)),le=(Ee,ge)=>{var Ue={};for(var nn in Ee)Lt.call(Ee,nn)&&ge.indexOf(nn)<0&&(Ue[nn]=Ee[nn]);if(Ee!=null&&yt)for(var nn of yt(Ee))ge.indexOf(nn)<0&&Dt.call(Ee,nn)&&(Ue[nn]=Ee[nn]);return Ue};const ae=({value:Ee,onChange:ge})=>{const Ue=_e=>{Ht.default.confirm({centered:!0,okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",title:"\u63D0\u793A",content:"\u786E\u8BA4\u8981\u5220\u9664\u8FD9\u4E2A\u53C2\u8003\u7B54\u6848\u5417\uFF1F",className:kt.Z.modal,onOk:()=>{const qt=[...Ee];qt.splice(_e,1),ge(qt)}})},nn=()=>{const _e=[...Ee];_e.push(""),ge(_e)};return et.createElement(ve.Z,{className:"ml20"},et.createElement(Me.Z,{flex:1},Ee==null?void 0:Ee.map((_e,qt)=>et.createElement(ve.Z,{key:`${_e}_${qt}`,className:"mb20"},et.createElement(Pe.default.TextArea,{style:{flex:1,minHeight:44},defaultValue:_e,autoSize:{maxRows:3},maxLength:1e3,onBlur:Jt=>{const De=[...Ee],sn=Jt.target.value.trim();De[qt]=sn,ge(De)}}),et.createElement(Ae.Z,{title:"\u5220\u9664"},et.createElement(Ne.Z,{className:kt.Z.deleteIcon,style:{marginLeft:15,visibility:qt>0?"visible":"hidden"},onClick:()=>Ue(qt)}))))),et.createElement(Me.Z,null,et.createElement("div",{className:`${kt.Z.addBtn}`,onClick:()=>{nn()}},"\u65B0\u589E\u7B54\u6848")))},je=({value:Ee,onChange:ge})=>{const Ue=_e=>{Ht.default.confirm({centered:!0,okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",title:"\u63D0\u793A",content:"\u786E\u8BA4\u8981\u5220\u9664\u8FD9\u4E2A\u53C2\u8003\u7B54\u6848\u5417\uFF1F",className:kt.Z.modal,onOk:()=>{const qt=[...Ee];qt.splice(_e,1),ge(qt)}})},nn=()=>{const _e=[...Ee];_e.push(""),ge(_e)};return et.createElement(ve.Z,{className:"ml20"},et.createElement(Me.Z,{flex:1},Ee==null?void 0:Ee.map((_e,qt)=>et.createElement(ve.Z,{key:`${_e}_${qt}`,align:"middle",className:"mb20"},et.createElement(nt.Z,{value:_e,style:{flex:1},onChange:Jt=>{const De=[...Ee];De[qt]=Jt,ge(De)}}),et.createElement(Ae.Z,{title:"\u5220\u9664"},et.createElement(Ne.Z,{className:kt.Z.deleteIcon,style:{marginLeft:15,visibility:qt>0?"visible":"hidden"},onClick:()=>Ue(qt)}))))),et.createElement(Me.Z,null,et.createElement("div",{className:`${kt.Z.addBtn}`,onClick:()=>{nn()}},"\u65B0\u589E\u7B54\u6848")))},ne=({value:Ee=!0,onChange:ge})=>et.createElement(ee.Z,{checked:!Ee,onChange:Ue=>{ge(!Ue)}}),Le="\u2581",ue=({questionTitlePlaceholder:Ee,form:ge,scoreByBlank:Ue=!1,answerKey:nn})=>{const[_e,qt]=(0,pt.useState)(!1),Jt=(vn,zn)=>{const me=zn.line;let An=0;for(let un=0;un<me;un++)An+=vn.getLine(un).split(Le).length-1;const ui=vn.getLine(me).substring(0,zn.ch);return An+=ui.split(Le).length-1,An},De=(vn,zn,me,An)=>{const ui=vn.getRange(zn.from,zn.to);let un=0;if(zn.text.forEach(ln=>{un+=ln.split(Le).length-1}),zn.origin!=="setValue"){if(ui&&ui.indexOf(Le)!==-1){const ln=ui.split(Le).length-1,oi=Jt(vn,zn.from);if(console.log(`\u5220\u9664${ln}\u4E2A\uFF0C \u524D\u9762\u6709${oi}\u4E2A\uFF0C\u65B0\u589E${un}\u4E2A`),ln>1){const xn=Array.from({length:ln},(Ie,Ze)=>oi+Ze);An(xn)}else An(oi)}else if(un>0){const ln=Jt(vn,zn.from);console.log(`\u65B0\u589E${un}\u4E2A\uFF0C\u4E4B\u524D\u6709${ln}\u4E2A`),me(un,ln)}}},sn=()=>{const vn=ge.getFieldValue(nn);ge.setFieldsValue({[nn]:vn.map((zn,me)=>re(Xt({},zn),{position:me+1}))})},cn=(0,pt.useRef)(),Te=(vn,zn)=>{for(let me=0;me<vn;me++)cn.current({position:null,answer_text:[""],model:1},zn+me);sn()},en=(0,pt.useRef)(),Cn=vn=>{en.current(vn),sn()},Gn=Fe.default.useWatch(nn,ge);return et.createElement("div",{className:kt.Z.wrap},et.createElement("div",{className:kt.Z.questionTitleEditorWrap},et.createElement(Fe.default.Item,{label:"\u9898\u5E72",name:"name",labelCol:{span:24},rules:[{required:!0}]},et.createElement(he.h,{scrollId:"name",watch:!0,height:140,placeholder:Ee,showNullButton:!0,onCMBeforeChange:(vn,zn)=>{De(vn,zn,Te,Cn)}}))),et.createElement(Fe.default.List,{name:nn,rules:[{validator(vn,zn){if(!(zn!=null&&zn.length))return Promise.reject(new Error("\u8BF7\u5148\u5728\u9898\u5E72\u4E2D\u63D2\u5165\u586B\u7A7A\u9879"));for(const me of zn){const{answer_text:An}=me||{};if(An!=null&&An.some(ui=>(ui==null?void 0:ui.length)===0))return Promise.reject(new Error("\u586B\u7A7A\u9879\u7B54\u6848\u4E0D\u80FD\u4E3A\u7A7A"))}return Promise.resolve()}}]},(vn,{add:zn,remove:me},{errors:An})=>(cn.current=zn,en.current=me,et.createElement(et.Fragment,null,et.createElement(Fe.default.Item,{label:et.createElement("span",null,"\u586B\u7A7A\u9879\u7B54\u6848",!(vn!=null&&vn.length)&&et.createElement("span",{style:{color:"#E99237"}},"\uFF08\u8BF7\u5148\u5728\u9898\u5E72\u4E2D\u63D2\u5165\u586B\u7A7A\u9879\uFF09")),required:!0,labelCol:{span:24}}),vn.map((ui,un)=>{var ln=ui,{key:oi,name:xn}=ln,Ie=le(ln,["key","name"]),Ze,Hn;return et.createElement("div",{style:{marginBottom:10},key:oi},et.createElement(ve.Z,{className:"mb20",align:"middle",wrap:!1},et.createElement(Me.Z,{style:{marginRight:10},flex:"0 0 auto",className:`${kt.Z.blankIndex}`},"\u586B\u7A7A\u9879",un+1),et.createElement(Fe.default.Item,re(Xt({},Ie),{name:[xn,"model"],noStyle:!0}),et.createElement(ye.ZP.Group,{onChange:()=>{const qe=ge.getFieldValue(nn);ge.setFieldsValue({[nn]:qe.map(($e,Pn)=>re(Xt({},$e),{answer_text:xn===Pn?[""]:$e.answer_text}))})}},et.createElement(ye.ZP,{value:1},"\u6587\u672C\u6A21\u5F0F ",et.createElement(Ae.Z,{title:"\u5B66\u751F\u7B54\u9898\u65F6\uFF0C\u9700\u8981\u5728\u6587\u672C\u6846\u4E2D\u586B\u5199\u6587\u672C\u7B54\u6848"},et.createElement(He.Z,null))),et.createElement(ye.ZP,{value:2},"\u6570\u5B66\u516C\u5F0F\u6A21\u5F0F ",et.createElement(Ae.Z,{title:"\u5B66\u751F\u7B54\u9898\u65F6\uFF0C\u9700\u8981\u7F16\u5199\u6570\u5B66\u516C\u5F0F\u4F5C\u4E3A\u7B54\u6848"},et.createElement(He.Z,null)))))),et.createElement(ve.Z,{style:{marginLeft:20},align:"middle",wrap:!1},et.createElement(Me.Z,{flex:1},et.createElement(ve.Z,{align:"top",justify:"space-between",wrap:!1},et.createElement(Me.Z,{flex:1},et.createElement(Fe.default.Item,re(Xt({},Ie),{name:[xn,"answer_text"],noStyle:!0}),((Hn=(Ze=ge.getFieldValue(nn))==null?void 0:Ze[xn])==null?void 0:Hn.model)===1?et.createElement(ae,null):et.createElement(je,null))),Ue&&et.createElement(Me.Z,{flex:"224px",style:{margin:"-7px 0 0 20px"}},et.createElement(Fe.default.Item,re(Xt({},Ie),{name:[xn,"score"],label:"\u5206\u503C",rules:[{required:!0}],className:kt.Z.blankInputNumberWrapper}),et.createElement(de.Z,{min:.1,max:100,precision:1,style:{width:"100%"},placeholder:"\u8BF7\u8F93\u5165\u5206\u503C"})))),et.createElement(Fe.default.Item,re(Xt({},Ie),{name:[xn,"position"],noStyle:!0}),et.createElement(Pe.default,{type:"hidden"})))))})))),et.createElement(ve.Z,{align:"middle"},et.createElement(Fe.default.Item,{name:"downcase",valuePropName:"checked"},et.createElement(ee.Z,null)),et.createElement(Me.Z,{className:"ml10"},"\u5224\u5206\u65F6\u5FFD\u7565\u7B54\u6848\u4E2D\u7684\u5B57\u6BCD\u5927\u5C0F\u5199")),et.createElement(ve.Z,{align:"middle"},et.createElement(Fe.default.Item,{name:"no_space",valuePropName:"checked"},et.createElement(ee.Z,null)),et.createElement(Me.Z,{className:"ml10"},"\u5224\u5206\u65F6\u5FFD\u7565\u7B54\u6848\u4E2D\u7684\u7A7A\u683C")),(Gn==null?void 0:Gn.length)>1&&et.createElement(ve.Z,{align:"middle",className:(Gn==null?void 0:Gn.length)>1?"mb30":`${kt.Z.hide}`},et.createElement(Fe.default.Item,{name:"is_ordered"},et.createElement(ne,null)),et.createElement(Me.Z,{className:"ml10"},"\u5141\u8BB8\u5B66\u751F\u6BCF\u4E2A\u586B\u7A7A\u7684\u7B54\u6848\u4E0E\u6807\u51C6\u7B54\u6848\u7684\u987A\u5E8F\u4E0D\u4E00\u81F4")),et.createElement("div",{onClick:()=>qt(!0)},et.createElement(Fe.default.Item,{name:"analysis",label:"\u9898\u76EE\u89E3\u6790",labelCol:{span:24}},et.createElement(he.x,{placeholder:"\u8BF7\u7F16\u8F91\u9898\u76EE\u89E3\u6790\uFF08\u975E\u5FC5\u586B\uFF09",isEdit:_e}))))}},11832:function(fn,Bn,Ft){"use strict";Ft.d(Bn,{Z:function(){return yt}});var pt=Ft(59301),Ht=Ft(95237),ve=Ft(43604),Me=Ft(78241),Pe=Ft(43809),Ae=Ft(41984),ee=Ft(59301),Fe=Object.defineProperty,ye=Object.defineProperties,de=Object.getOwnPropertyDescriptors,he=Object.getOwnPropertySymbols,Ne=Object.prototype.hasOwnProperty,He=Object.prototype.propertyIsEnumerable,kt=(Lt,Dt,zt)=>Dt in Lt?Fe(Lt,Dt,{enumerable:!0,configurable:!0,writable:!0,value:zt}):Lt[Dt]=zt,nt=(Lt,Dt)=>{for(var zt in Dt||(Dt={}))Ne.call(Dt,zt)&&kt(Lt,zt,Dt[zt]);if(he)for(var zt of he(Dt))He.call(Dt,zt)&&kt(Lt,zt,Dt[zt]);return Lt},et=(Lt,Dt)=>ye(Lt,de(Dt)),ht=(Lt,Dt)=>{var zt={};for(var Xt in Lt)Ne.call(Lt,Xt)&&Dt.indexOf(Xt)<0&&(zt[Xt]=Lt[Xt]);if(Lt!=null&&he)for(var Xt of he(Lt))Dt.indexOf(Xt)<0&&He.call(Lt,Xt)&&(zt[Xt]=Lt[Xt]);return zt};const lt={\u6B63\u786E:"T",\u9519\u8BEF:"F"},gt=({value:Lt,onChange:Dt,form:zt})=>{const Xt=(Lt==null?void 0:Lt.is_answer)===1,re=Lt==null?void 0:Lt.choice_text,le=()=>{const ae=zt.getFieldsValue().choices.map(je=>({choice_text:je.choice_text,is_answer:0}));zt.setFieldsValue({choices:ae}),Dt(et(nt({},Lt),{is_answer:1}))};return ee.createElement(Ht.Z,{className:Pe.Z.choiceWrap,align:"middle",wrap:!1,style:{marginBottom:"20px"}},ee.createElement(ve.Z,{onClick:le,className:`${Pe.Z.choiceIndex} ${Pe.Z.judgementIndex} ${Xt?Pe.Z.activeAnswer:""}`},lt[re]),ee.createElement(ve.Z,{flex:1,className:`${Pe.Z.editorWrap} ml15`},ee.createElement("div",{className:`${Pe.Z.inputBorder} ${Pe.Z.placeholder} ${Xt?Pe.Z.activeJudgementAnswer:""}`},re)),ee.createElement(ve.Z,{flex:"0 0 auto",className:"ml15"},ee.createElement("div",{onClick:le,className:`${Pe.Z.setAnswerBtn} ${Xt?Pe.Z.activeAnswer:""}`},Xt?"\u6B63\u786E\u7B54\u6848":"\u8BBE\u4E3A\u7B54\u6848")))},yt=({questionTitlePlaceholder:Lt,choiceKey:Dt,form:zt})=>{const[Xt,re]=(0,pt.useState)(!1);return ee.createElement("div",{className:Pe.Z.wrap},ee.createElement("div",{className:Pe.Z.questionTitleEditorWrap},ee.createElement(Me.default.Item,{label:"\u9898\u5E72",name:"name",labelCol:{span:24},rules:[{required:!0}]},ee.createElement(Ae.h,{scrollId:"name",watch:!0,height:140,placeholder:Lt}))),ee.createElement(Me.default.Item,{label:"\u7B54\u6848\u9009\u9879",required:!0,labelCol:{span:24}},ee.createElement(Me.default.List,{name:"choices",rules:[{validator(le,ae){return ae.some(ne=>(ne==null?void 0:ne.is_answer)===1)?Promise.resolve():Promise.reject(new Error("\u8BF7\u8BBE\u7F6E\u6B63\u786E\u7B54\u6848"))}}]},le=>ee.createElement("div",{id:"choices"},le.map(ae=>{var je=ae,{key:ne,name:Le}=je,ue=ht(je,["key","name"]);return ee.createElement(Me.default.Item,et(nt({},ue),{key:ne,name:Le,noStyle:!0}),ee.createElement(gt,{form:zt}))})))),ee.createElement("div",{onClick:()=>re(!0)},ee.createElement(Me.default.Item,{name:"analysis",label:"\u9898\u76EE\u89E3\u6790",labelCol:{span:24}},ee.createElement(Ae.x,{placeholder:"\u8BF7\u7F16\u8F91\u9898\u76EE\u89E3\u6790\uFF08\u975E\u5FC5\u586B\uFF09",isEdit:Xt}))))}},41984:function(fn,Bn,Ft){"use strict";Ft.d(Bn,{h:function(){return nt},x:function(){return et}});var pt=Ft(12290),Ht=Ft(43809),ve=Ft(85149),Me=Ft(59301),Pe=Object.defineProperty,Ae=Object.defineProperties,ee=Object.getOwnPropertyDescriptors,Fe=Object.getOwnPropertySymbols,ye=Object.prototype.hasOwnProperty,de=Object.prototype.propertyIsEnumerable,he=(ht,lt,gt)=>lt in ht?Pe(ht,lt,{enumerable:!0,configurable:!0,writable:!0,value:gt}):ht[lt]=gt,Ne=(ht,lt)=>{for(var gt in lt||(lt={}))ye.call(lt,gt)&&he(ht,gt,lt[gt]);if(Fe)for(var gt of Fe(lt))de.call(lt,gt)&&he(ht,gt,lt[gt]);return ht},He=(ht,lt)=>Ae(ht,ee(lt)),kt=(ht,lt)=>{var gt={};for(var yt in ht)ye.call(ht,yt)&&lt.indexOf(yt)<0&&(gt[yt]=ht[yt]);if(ht!=null&&Fe)for(var yt of Fe(ht))lt.indexOf(yt)<0&&de.call(ht,yt)&&(gt[yt]=ht[yt]);return gt};const nt=ht=>{var lt=ht,{value:gt,onChange:yt,scrollId:Lt}=lt,Dt=kt(lt,["value","onChange","scrollId"]);return Me.createElement("div",{id:Lt||""},Me.createElement(pt.Z,He(Ne({},Dt),{defaultValue:gt,onChange:(zt,Xt)=>{Xt!=null&&Xt.length?yt(zt,Xt):yt(zt)}})))},et=({value:ht,onChange:lt,placeholder:gt,height:yt=140,isEdit:Lt,miniToolbar:Dt,watch:zt=!0})=>Lt?Me.createElement(pt.Z,{watch:zt,isFocus:!0,height:yt||void 0,placeholder:gt,defaultValue:ht,onChange:lt,miniToolbar:Dt}):Me.createElement("div",{style:{cursor:"pointer"}},ht?Me.createElement(ve.Z,{className:Ht.Z.inputBorder,value:ht}):Me.createElement("div",{className:`${Ht.Z.inputBorder} ${Ht.Z.placeholder} inputBorderError`},gt))},35173:function(fn,Bn,Ft){"use strict";Ft.d(Bn,{W:function(){return je}});var pt=Ft(59301),Ht=Ft(8591),ve=Ft(12563),Me=Ft(78241),Pe=Ft(78673),Ae=Ft(95237),ee=Ft(43604),Fe=Ft(6848),ye=Ft(92832),de=Ft(5871),he=Ft(43809),Ne=Ft(41984),He=Ft(12290),kt=Ft(61485),nt=Object.defineProperty,et=Object.defineProperties,ht=Object.getOwnPropertyDescriptors,lt=Object.getOwnPropertySymbols,gt=Object.prototype.hasOwnProperty,yt=Object.prototype.propertyIsEnumerable,Lt=(ne,Le,ue)=>Le in ne?nt(ne,Le,{enumerable:!0,configurable:!0,writable:!0,value:ue}):ne[Le]=ue,Dt=(ne,Le)=>{for(var ue in Le||(Le={}))gt.call(Le,ue)&&Lt(ne,ue,Le[ue]);if(lt)for(var ue of lt(Le))yt.call(Le,ue)&&Lt(ne,ue,Le[ue]);return ne},zt=(ne,Le)=>et(ne,ht(Le)),Xt=(ne,Le)=>{var ue={};for(var Ee in ne)gt.call(ne,Ee)&&Le.indexOf(Ee)<0&&(ue[Ee]=ne[Ee]);if(ne!=null&&lt)for(var Ee of lt(ne))Le.indexOf(Ee)<0&&yt.call(ne,Ee)&&(ue[Ee]=ne[Ee]);return ue};const re=ne=>{var Le=ne,{value:ue,onChange:Ee}=Le,ge=Xt(Le,["value","onChange"]);const Ue=nn=>{Ee([nn])};return pt.createElement(He.Z,zt(Dt({},ge),{defaultValue:ue==null?void 0:ue[0],onChange:Ue}))},le=ne=>{if(!ne)return!1;if(/^s*$/.test(ne)||ne.trim()===""){Ht.ZP.warning("\u5173\u952E\u8BCD\u4E0D\u80FD\u5168\u4E3A\u7A7A\u683C");return}let Le=new RegExp("[ `~!@#$^&*()={}':;,\\[\\].<>/?~\uFF01@#\uFFE5\u2026\u2026&*\uFF08\uFF09\u2014\u3010\u3011\u2018\uFF1B\uFF1A\u201D\u201C\u3002\uFF0C\u3001\uFF1F\u300C\u300D\u300E\u300F_\\+\\-\xB7%\u300A\u300B]|[\\\\/]");return ne==="|"?(Ht.ZP.warning("\u5173\u952E\u8BCD\u4E0D\u80FD\u53EA\u8F93\u5165\u4E00\u4E2A\u201C|\u201D\u5B57\u7B26\uFF01"),!1):!0},ae=({value:ne=[],onClose:Le})=>pt.createElement(ve.default,{closable:!0,onClose:Le,className:he.Z.keywordTag},pt.createElement("pre",{style:{margin:"0px",whiteSpace:"pre-wrap"}},ne.join(" \u6216 "))),je=({questionTitlePlaceholder:ne,form:Le,showKeywords:ue,isMustKeyWords:Ee=ue})=>{const[ge,Ue]=(0,pt.useState)(!1),[nn,_e]=(0,pt.useState)(""),qt=Me.default.useWatch("use_keywords",Le),Jt=Me.default.useWatch("question_score",Le);return pt.createElement("div",{className:he.Z.wrap},pt.createElement("div",{className:he.Z.questionTitleEditorWrap},pt.createElement(Me.default.Item,{label:"\u9898\u5E72",name:"name",labelCol:{span:24},rules:[{required:!0}]},pt.createElement(Ne.h,{scrollId:"name",watch:!0,height:140,placeholder:ne}))),pt.createElement(Me.default.Item,{label:"\u53C2\u8003\u7B54\u6848",name:"answer_texts",labelCol:{span:24}},pt.createElement(re,{watch:!0,height:140,placeholder:"\u8BF7\u7F16\u8F91\u53C2\u8003\u7B54\u6848\uFF08\u975E\u5FC5\u586B\uFF09"})),ue&&!Ee&&pt.createElement(Me.default.Item,{hidden:!0,name:"use_keywords",valuePropName:"checked"},pt.createElement(Pe.Z,{defaultChecked:!0})),ue&&Ee&&pt.createElement(Ae.Z,{align:"middle",className:"mb30"},pt.createElement(Me.default.Item,{name:"use_keywords",valuePropName:"checked"},pt.createElement(Pe.Z,null)),pt.createElement(ee.Z,{className:"ml10"},"\u5F00\u542F\u5173\u952E\u8BCD\u81EA\u52A8\u5224\u5206"),pt.createElement(ee.Z,null,pt.createElement(Fe.Z,{placement:"right",title:"\u9009\u4E2D\u540E\uFF0C\u9700\u8981\u8BBE\u7F6E\u6BCF\u4E2A\u5173\u952E\u8BCD\u7684\u5206\u503C\uFF0C\u7CFB\u7EDF\u4F1A\u6839\u636E\u8BBE\u7F6E\u7684\u5173\u952E\u8BCD\u8FDB\u884C\u81EA\u52A8\u5224\u5206\uFF1B \u6240\u6709\u5173\u952E\u8BCD\u5206\u503C\u4E4B\u548C\u5FC5\u987B\u5C0F\u4E8E\u7B49\u4E8E\u5C0F\u9898\u5206\u503C\u3002"},pt.createElement(kt.Z,{style:{color:"#3061D0",marginLeft:6,cursor:"pointer"}})))),(qt||!Ee)&&pt.createElement(Me.default.List,{name:"keywords",rules:[{validator(De,sn){return Ee?sn!=null&&sn.length?(sn==null?void 0:sn.reduce((Te,en)=>Te+en.score,0))>parseFloat(Jt)?Promise.reject(new Error("\u6240\u6709\u5173\u952E\u8BCD\u7684\u5206\u503C\u4E4B\u548C\u5FC5\u987B\u5C0F\u4E8E\u7B49\u4E8E\u8BE5\u5C0F\u9898\u7684\u5206\u503C")):Promise.resolve():Promise.reject(new Error("\u8BF7\u8BBE\u7F6E\u5224\u5206\u5173\u952E\u8BCD")):Promise.resolve()}}]},(De,{add:sn,remove:cn})=>pt.createElement(pt.Fragment,null,pt.createElement("div",{className:`${he.Z.title} mb10`},Ee?"\u5173\u952E\u8BCD":pt.createElement("span",{style:{color:"#9096A3"}},"\u5224\u5206\u5173\u952E\u8BCD")),pt.createElement(Ae.Z,{align:"middle",className:"font14 mb30"},pt.createElement(ee.Z,{flex:1},pt.createElement(ye.default,{value:nn,onChange:Te=>{_e(Te.target.value)},maxLength:50,allowClear:!0,onPressEnter:Te=>{var en,Cn,Gn,vn;const zn=`${(en=Te.target)==null?void 0:en.value}`,me=(Gn=(Cn=zn==null?void 0:zn.split("|"))==null?void 0:Cn.filter(un=>!!un))==null?void 0:Gn.map(un=>un==null?void 0:un.trim()),An=Le.getFieldValue("keywords"),ui=((vn=An==null?void 0:An.map(un=>un==null?void 0:un.keyword))==null?void 0:vn.flat())||[];for(const un of me)if(ui.includes(un)){Ht.ZP.error("\u4E3A\u907F\u514D\u5224\u5206\u9519\u8BEF\uFF0C\u8BF7\u52FF\u8BBE\u7F6E\u76F8\u540C\u7684\u5173\u952E\u8BCD");return}le(zn)&&(sn({keyword:me,score:1}),_e(""))},className:he.Z.inputBorder,placeholder:"\u652F\u6301\u8BBE\u7F6E\u591A\u4E2A\u5173\u952E\u8BCD\uFF1B\u5E76\u5217\u5173\u952E\u8BCD\uFF08\u6216\u7684\u5173\u7CFB\uFF09\u8BF7\u7528\u201C|\u201D\u5206\u9694\u5F00"})),pt.createElement(ee.Z,{flex:"148px",style:{textAlign:"right",color:"#e99237"}},"\u201C\u56DE\u8F66\u952E\u201D\u4FDD\u5B58\u5173\u952E\u8BCD")),De.map(Te=>{var en=Te,{key:Cn,name:Gn}=en,vn=Xt(en,["key","name"]);return pt.createElement(Ae.Z,{key:Cn,className:"mb20",style:{marginRight:148}},pt.createElement(ee.Z,{flex:1},pt.createElement(Ae.Z,{align:"middle",justify:"space-between"},pt.createElement(Me.default.Item,zt(Dt({},vn),{name:[Gn,"keyword"]}),pt.createElement(ae,{onClose:()=>cn(Gn)})),Ee&&pt.createElement(Me.default.Item,zt(Dt({},vn),{name:[Gn,"score"],label:"\u5206\u503C",rules:[{required:!0}],className:he.Z.blankInputNumberWrapper}),pt.createElement(de.Z,{className:he.Z.blankInput,min:.1,max:100,precision:1,style:{width:"100%"},placeholder:"\u8BF7\u8F93\u5165\u5173\u952E\u8BCD\u5206\u6570"})))))}))),pt.createElement("div",{onClick:()=>Ue(!0)},pt.createElement(Me.default.Item,{name:"analysis",label:"\u9898\u76EE\u89E3\u6790",labelCol:{span:24}},pt.createElement(Ne.x,{placeholder:"\u8BF7\u7F16\u8F91\u9898\u76EE\u89E3\u6790\uFF08\u975E\u5FC5\u586B\uFF09",isEdit:ge}))))}},27693:function(fn,Bn,Ft){"use strict";Ft.d(Bn,{Z:function(){return Pe}});var pt={text:"text___bQulM",sup:"sup___rX_Y3"},Ht=Ft(78241),ve=Ft(59301),Pe=({text:Ae,name:ee="question_score"})=>{const Fe=({value:ye})=>ve.createElement("div",{className:pt.text},ve.createElement("span",{className:pt.sup},"*"),ve.createElement("span",{className:"mr10"},"\u5206\u503C"),ve.createElement("span",null,ye||"--"),ve.createElement("span",{className:"c-grey-999"},Ae));return ve.createElement(Ht.default.Item,{noStyle:!0,name:ee},ve.createElement(Fe,null))}},85149:function(fn,Bn,Ft){"use strict";Ft.d(Bn,{z:function(){return Xt},Z:function(){return re}});var pt=Ft(59301),Ht=Ft(50304),ve=Ft(24768),Me=Ft(64018),Pe=Ft(65157),Ae=Ft(3294),ee=Ft(955),Fe=Ft(15342),ye=Ft(1012),de=Ft(23210),he=Ft(59301),He=({html:le})=>{const ae=(0,pt.useRef)(null),je=(0,pt.useRef)(null),ne=`.markdown-body p {
margin: 0 0 16px 0 !important;
line-height: 28px;
white-space: pre-wrap;
}
ol,
ul,
li {
list-style-type: none
}
ol,
ul,
dl {
margin-bottom: 0px;
}
.markdown-body {
-ms-text-size-adjust: 100%;
-webkit-text-size-adjust: 100%;
color: #333;
overflow: hidden;
font-family: "Microsoft YaHei", Helvetica, "Meiryo UI", "Malgun Gothic", "Segoe UI", "Trebuchet MS", "Monaco", monospace, Tahoma, STXihei, "\u534E\u6587\u7EC6\u9ED1", STHeiti, "Helvetica Neue", "Droid Sans", "wenquanyi micro hei", FreeSans, Arimo, Arial, SimSun, "\u5B8B\u4F53", Heiti, "\u9ED1\u4F53", sans-serif;
word-break: break-word;
font-size: 16px;
line-height: 1.6;
white-space: normal;
word-wrap: break-word;
position: relative;
}
.markdown-body ul>li {
list-style-type: disc;
}
.markdown-body ol>li {
list-style-type: decimal;
}
.markdown-body a {
background: transparent;
}
.markdown-body a:active,
.markdown-body a:hover {
outline: 0;
}
.markdown-body strong {
font-weight: bold;
}
.markdown-body h1 {
font-size: 2em;
margin: 0.67em 0;
}
.markdown-body img {
border: 0;
}
.markdown-body hr {
-moz-box-sizing: content-box;
box-sizing: content-box;
height: 0;
}
.markdown-body pre {
overflow: auto;
}
.markdown-body code,
.markdown-body kbd,
.markdown-body pre {
font-family: "Meiryo UI", "YaHei Consolas Hybrid", Consolas, "Malgun Gothic", "Segoe UI", "Trebuchet MS", Helvetica, monospace, monospace;
font-size: 1em;
}
.markdown-body input {
color: inherit;
font: inherit;
margin: 0;
}
.markdown-body html input[disabled] {
cursor: default;
}
.markdown-body input {
line-height: normal;
}
.markdown-body input[type="checkbox"] {
-moz-box-sizing: border-box;
box-sizing: border-box;
padding: 0;
}
.markdown-body table {
border-collapse: collapse;
border-spacing: 0;
}
.markdown-body td,
.markdown-body th {
padding: 0;
}
.markdown-body * {
-moz-box-sizing: border-box;
box-sizing: border-box;
}
.markdown-body input {
font: 13px/1.4 Helvetica, arial, freesans, clean, sans-serif, "Segoe UI Emoji", "Segoe UI Symbol";
}
.markdown-body a {
color: #4183c4;
text-decoration: none;
}
.markdown-body a:hover,
.markdown-body a:active {
text-decoration: underline;
}
.markdown-body hr {
height: 0;
margin: 15px 0;
overflow: hidden;
background: transparent;
border: 0;
border-bottom: 1px solid #ddd;
}
.markdown-body hr:before {
display: table;
content: "";
}
.markdown-body hr:after {
display: table;
clear: both;
content: "";
}
.markdown-body h1,
.markdown-body h2,
.markdown-body h3,
.markdown-body h4,
.markdown-body h5,
.markdown-body h6 {
margin-top: 15px;
margin-bottom: 15px;
line-height: 1.1;
}
.markdown-body h1 {
font-size: 30px;
}
.markdown-body h2 {
font-size: 21px;
}
.markdown-body h3 {
font-size: 16px;
}
.markdown-body h4 {
font-size: 14px;
}
.markdown-body h5 {
font-size: 12px;
}
.markdown-body h6 {
font-size: 11px;
}
.markdown-body blockquote {
margin: 0;
}
.markdown-body ul,
.markdown-body ol {
padding: 0;
margin-top: 0;
margin-bottom: 0;
}
ul.linenums,
ol.linenums {
padding: 16px 0 0 36px !important;
}
.markdown-body ul,
.markdown-body ol {
padding-left: 2em;
}
.markdown-body ol ol,
.markdown-body ul ol {
list-style-type: lower-roman;
}
.markdown-body ul ul ol,
.markdown-body ul ol ol,
.markdown-body ol ul ol,
.markdown-body ol ol ol {
list-style-type: lower-alpha;
}
.markdown-body dd {
margin-left: 0;
}
.markdown-body code {
font-family: Consolas, "Liberation Mono", Menlo, Courier, monospace;
font-size: 12px;
}
.markdown-body pre {
margin-top: 0;
margin-bottom: 0;
font: 12px Consolas, "Liberation Mono", Menlo, Courier, monospace;
}
.markdown-body .octicon {
font: normal normal 16px octicons-anchor;
line-height: 1;
display: inline-block;
text-decoration: none;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
-webkit-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
user-select: none;
}
.markdown-body .octicon-link:before {
content: '\f05c';
}
.markdown-body>*:first-child {
margin-top: 0 !important;
}
.markdown-body>*:last-child {
margin-bottom: 0 !important;
}
.markdown-body .anchor {
position: absolute;
top: 0;
left: 0;
display: block;
padding-right: 6px;
padding-left: 30px;
margin-left: -30px;
}
.markdown-body .anchor:focus {
outline: none;
}
.markdown-body h1,
.markdown-body h2,
.markdown-body h3,
.markdown-body h4,
.markdown-body h5,
.markdown-body h6 {
position: relative;
margin-top: 1em;
margin-bottom: 16px;
font-weight: bold;
line-height: 1.4;
}
.markdown-body h1 .octicon-link,
.markdown-body h2 .octicon-link,
.markdown-body h3 .octicon-link,
.markdown-body h4 .octicon-link,
.markdown-body h5 .octicon-link,
.markdown-body h6 .octicon-link {
display: none;
color: #000;
vertical-align: middle;
}
.markdown-body h1:hover .anchor,
.markdown-body h2:hover .anchor,
.markdown-body h3:hover .anchor,
.markdown-body h4:hover .anchor,
.markdown-body h5:hover .anchor,
.markdown-body h6:hover .anchor {
padding-left: 8px;
margin-left: -30px;
text-decoration: none;
}
.markdown-body h1:hover .anchor .octicon-link,
.markdown-body h2:hover .anchor .octicon-link,
.markdown-body h3:hover .anchor .octicon-link,
.markdown-body h4:hover .anchor .octicon-link,
.markdown-body h5:hover .anchor .octicon-link,
.markdown-body h6:hover .anchor .octicon-link {
display: inline-block;
}
.markdown-body h1 {
padding-bottom: 0.3em;
font-size: 2.25em;
line-height: 1.2;
border-bottom: 1px solid #eee;
}
.markdown-body h1 .anchor {
line-height: 1;
}
.markdown-body h2 {
padding-bottom: 0.3em;
font-size: 1.75em;
line-height: 1.225;
border-bottom: 1px solid #eee;
}
.markdown-body h2 .anchor {
line-height: 1;
}
.markdown-body h3 {
font-size: 1.5em;
line-height: 1.43;
}
.markdown-body h3 .anchor {
line-height: 1.2;
}
.markdown-body h4 {
font-size: 1.25em;
}
.markdown-body h4 .anchor {
line-height: 1.2;
}
.markdown-body h5 {
font-size: 1em;
}
.markdown-body h5 .anchor {
line-height: 1.1;
}
.markdown-body h6 {
font-size: 1em;
color: #777;
}
.markdown-body h6 .anchor {
line-height: 1.1;
}
.markdown-body p,
.markdown-body blockquote,
.markdown-body ul,
.markdown-body ol,
.markdown-body dl,
.markdown-body table,
.markdown-body pre {
margin-top: 0;
margin-bottom: 16px;
}
.markdown-body ul ul,
.markdown-body ul ol,
.markdown-body ol ol,
.markdown-body ol ul {
margin-top: 0;
margin-bottom: 0;
}
.markdown-body li>p {
margin-top: 16px;
}
.markdown-body dl {
padding: 0;
}
.markdown-body dl dt {
padding: 0;
margin-top: 16px;
font-size: 1em;
font-style: italic;
font-weight: bold;
}
.markdown-body dl dd {
padding: 0 16px;
margin-bottom: 16px;
}
.markdown-body blockquote {
padding: 0 15px;
color: #777;
border-left: 4px solid #ddd;
}
.markdown-body blockquote> :first-child {
margin-top: 0;
}
.markdown-body blockquote> :last-child {
margin-bottom: 0;
}
.markdown-body table {
display: block;
width: 100%;
overflow: auto;
word-break: normal;
word-break: keep-all;
}
.markdown-body table th {
font-weight: bold;
text-align: revert;
}
.markdown-body table th,
.markdown-body table td {
padding: 6px 13px;
border: 1px solid #ddd;
}
.markdown-body table tr {
background-color: #fff;
border-top: 1px solid #ccc;
}
.markdown-body table tr:nth-child(2n) {
background-color: #f8f8f8;
}
.markdown-body img {
max-width: 100%;
-moz-box-sizing: border-box;
box-sizing: border-box;
}
.markdown-body code {
padding: 0;
padding-top: 0.2em;
padding-bottom: 0.2em;
margin: 0;
font-size: 85%;
background-color: rgba(0, 0, 0, 0.04);
border-radius: 3px;
}
.markdown-body code:has(.katex) {
background-color: transparent;
}
.markdown-body code:before,
.markdown-body code:after {
letter-spacing: -0.2em;
content: "\\00a0";
}
.markdown-body pre>code {
padding: 0;
margin: 0;
font-size: 100%;
word-break: normal;
white-space: pre;
background: transparent;
border: 0;
}
.markdown-body .highlight {
margin-bottom: 16px;
}
.markdown-body .highlight pre,
.markdown-body pre {
padding: 16px;
overflow: auto;
font-size: 85%;
line-height: 1.45;
background-color: #f7f7f7;
border-radius: 3px;
}
.markdown-body .highlight pre {
margin-bottom: 0;
word-break: normal;
}
.markdown-body pre {
word-wrap: normal;
}
.markdown-body pre code {
display: inline;
max-width: initial;
padding: 0;
margin: 0;
overflow: initial;
line-height: inherit;
word-wrap: normal;
background-color: transparent;
border: 0;
}
.markdown-body pre code:before,
.markdown-body pre code:after {
content: normal;
}
.markdown-body kbd {
display: inline-block;
padding: 3px 5px;
font-size: 11px;
line-height: 10px;
color: #555;
vertical-align: middle;
background-color: #fcfcfc;
border: solid 1px #ccc;
border-bottom-color: #bbb;
border-radius: 3px;
box-shadow: inset 0 -1px 0 #bbb;
}
.markdown-body .pl-c {
color: #969896;
}
.markdown-body .pl-c1,
.markdown-body .pl-mdh,
.markdown-body .pl-mm,
.markdown-body .pl-mp,
.markdown-body .pl-mr,
.markdown-body .pl-s1 .pl-v,
.markdown-body .pl-s3,
.markdown-body .pl-sc,
.markdown-body .pl-sv {
color: #0086b3;
}
.markdown-body .pl-e,
.markdown-body .pl-en {
color: #795da3;
}
.markdown-body .pl-s1 .pl-s2,
.markdown-body .pl-smi,
.markdown-body .pl-smp,
.markdown-body .pl-stj,
.markdown-body .pl-vo,
.markdown-body .pl-vpf {
color: #333;
}
.markdown-body .pl-ent {
color: #63a35c;
}
.markdown-body .pl-k,
.markdown-body .pl-s,
.markdown-body .pl-st {
color: #a71d5d;
}
.markdown-body .pl-pds,
.markdown-body .pl-s1,
.markdown-body .pl-s1 .pl-pse .pl-s2,
.markdown-body .pl-sr,
.markdown-body .pl-sr .pl-cce,
.markdown-body .pl-sr .pl-sra,
.markdown-body .pl-sr .pl-sre,
.markdown-body .pl-src {
color: #df5000;
}
.markdown-body .pl-mo,
.markdown-body .pl-v {
color: #1d3e81;
}
.markdown-body .pl-id {
color: #b52a1d;
}
.markdown-body .pl-ii {
background-color: #b52a1d;
color: #f8f8f8;
}
.markdown-body .pl-sr .pl-cce {
color: #63a35c;
font-weight: bold;
}
.markdown-body .pl-ml {
color: #693a17;
}
.markdown-body .pl-mh,
.markdown-body .pl-mh .pl-en,
.markdown-body .pl-ms {
color: #1d3e81;
font-weight: bold;
}
.markdown-body .pl-mq {
color: #008080;
}
.markdown-body .pl-mi {
color: #333;
font-style: italic;
}
.markdown-body .pl-mb {
color: #333;
font-weight: bold;
}
.markdown-body .pl-md,
.markdown-body .pl-mdhf {
background-color: #ffecec;
color: #bd2c00;
}
.markdown-body .pl-mdht,
.markdown-body .pl-mi1 {
background-color: #eaffea;
color: #55a532;
}
.markdown-body .pl-mdr {
color: #795da3;
font-weight: bold;
}
.markdown-body kbd {
display: inline-block;
padding: 3px 5px;
font: 11px Consolas, "Liberation Mono", Menlo, Courier, monospace;
line-height: 10px;
color: #555;
vertical-align: middle;
background-color: #fcfcfc;
border: solid 1px #ccc;
border-bottom-color: #bbb;
border-radius: 3px;
box-shadow: inset 0 -1px 0 #bbb;
}
.markdown-body .task-list-item {
list-style-type: none;
}
.markdown-body .task-list-item+.task-list-item {
margin-top: 3px;
}
.markdown-body .task-list-item input {
float: left;
margin: 0.3em 0 0.25em -1.6em;
vertical-align: middle;
}
.markdown-body :checked+.radio-label {
z-index: 1;
position: relative;
border-color: #4183c4;
}
/*! Pretty printing styles. Used with prettify.js. */
/* SPAN elements with the classes below are added by prettyprint. */
.pln {
color: #000
}
/* plain text */
@media screen {
.str {
color: #080
}
/* string content */
.kwd {
color: #008
}
/* a keyword */
.com {
color: #800
}
/* a comment */
.typ {
color: #606
}
/* a type name */
.lit {
color: #066
}
/* a literal value */
/* punctuation, lisp open bracket, lisp close bracket */
.pun,
.opn,
.clo {
color: #660
}
.tag {
color: #008
}
/* a markup tag name */
.atn {
color: #606
}
/* a markup attribute name */
.atv {
color: #080
}
/* a markup attribute value */
.dec,
.var {
color: #606
}
/* a declaration; a variable name */
.fun {
color: red
}
/* a function name */
}
/* Use higher contrast and text-weight for printable form. */
@media print,
projection {
.str {
color: #060
}
.kwd {
color: #006;
font-weight: bold
}
.com {
color: #600;
font-style: italic
}
.typ {
color: #404;
font-weight: bold
}
.lit {
color: #044
}
.pun,
.opn,
.clo {
color: #440
}
.tag {
color: #006;
font-weight: bold
}
.atn {
color: #404
}
.atv {
color: #060
}
}
/* Put a border around prettyprinted code snippets. */
pre.prettyprint {
padding: 2px;
/* border: 1px solid #888 */
}
/* Specify class=linenums on a pre to get line numbering */
ol.linenums {
margin-top: 0;
margin-bottom: 0
}
/* IE indents via margin-left */
li.L0,
li.L1,
li.L2,
li.L3,
li.L5,
li.L6,
li.L7,
li.L8 {
list-style-type: none
}
/* Alternate shading for lines */
li.L1,
li.L3,
li.L5,
li.L7,
li.L9 {
background: #eee
}
.markdown-body p,
.markdown-body blockquote,
.markdown-body ul,
.markdown-body ol,
.markdown-body dl,
.markdown-body table,
.markdown-body pre {
margin-top: 0;
margin-bottom: 16px;
}`;return(0,pt.useEffect)(()=>{const Le=ae.current.attachShadow({mode:"open"});je.current=document.createElement("div"),je.current.className="markdown-body",je.current.innerHTML=le,Le.appendChild(je.current);const ue=document.createElement("style");return ue.textContent=ne,Le.appendChild(ue),()=>{Le.innerHTML=""}},[]),(0,pt.useEffect)(()=>{je.current&&(je.current.innerHTML=le)},[le]),he.createElement("div",{ref:ae})},kt=Object.defineProperty,nt=Object.getOwnPropertySymbols,et=Object.prototype.hasOwnProperty,ht=Object.prototype.propertyIsEnumerable,lt=(le,ae,je)=>ae in le?kt(le,ae,{enumerable:!0,configurable:!0,writable:!0,value:je}):le[ae]=je,gt=(le,ae)=>{for(var je in ae||(ae={}))et.call(ae,je)&&lt(le,je,ae[je]);if(nt)for(var je of nt(ae))ht.call(ae,je)&&lt(le,je,ae[je]);return le};const yt="@\u2581\u2581@",Lt="@\u2581@",Dt=/<pre[^>]*>/g;function zt(le){let ae=document.createElement("div");return ae.innerHTML=le,ae.childNodes.length===0?"":ae.childNodes[0].nodeValue}const Xt=(le,ae)=>{le=le||"";const je=/(?:https?:\/\/[^\/]+)?\/api\/attachments\/([A-Za-z0-9+/=]+)(\?.*?)?\)|(?:https?:\/\/[^\/]+)?\/api\/attachments\/([A-Za-z0-9+/=]+)(\?.*?)?|(?:https?:\/\/[^\/]+)?\/attachments\/download\/([A-Za-z0-9+/=]+)(\?.*?)?\//g,ne=/\"(?:https?:\/\/[^\/]+)?\/api\/attachments\/([A-Za-z0-9+/=]+)(\?.*?)?|\"(?:https?:\/\/[^\/]+)?\/attachments\/download\/([A-Za-z0-9+/=]+)(\?.*?)?\//g,Le=/\(\s+(?:https?:\/\/[^\/]+)?\/files\/uploads\/([A-Za-z0-9+/=]+)(\?.*?)?|\"(?:https?:\/\/[^\/]+)?\/files\/uploads\/([A-Za-z0-9+/=]+)(\?.*?)?\//g,ue=/(?:https?:\/\/[^\/]+)?\/attachments\/download\/([A-Za-z0-9+/=]+)(\?.*?)?\//g;return ae?le.replaceAll("https://www.educoder.net","").replaceAll("https://www-cdn.educoder.net","").replaceAll("//api/attachments","/api/attachments").replace(je,(Ee,ge,Ue,nn,_e,qt,Jt)=>{const De=ge||nn||qt,sn=Ue||_e||Jt||"?";return Ae.Z.API_SERVER+"/api/attachments/"+De+sn+"&t="+(0,ee.Jn)(De,Date.now())+(Ee.indexOf(")")>-1?")":"&")}).replaceAll('src="(','src="').replaceAll("src='(",'src="'):(le=le.replace(ue,(Ee,ge,Ue,nn,_e,qt,Jt)=>{const De=ge||nn||qt,sn=Ue||_e||Jt||"?";return Ae.Z.API_SERVER+"/attachments/download/"+De+sn+"&t="+(0,ee.Jn)(De,Date.now())+(Ee.indexOf(")")>-1?")":"&")}).replace(je,(Ee,ge,Ue,nn,_e,qt,Jt)=>{const De=ge||nn||qt,sn=Ue||_e||Jt||"?";return Ae.Z.API_SERVER+"/api/attachments/"+De+sn+"&t="+(0,ee.Jn)(De,Date.now())+(Ee.indexOf(")")>-1?")":"&")}).replace(ne,(Ee,ge,Ue,nn,_e)=>{const qt=ge||nn,Jt=Ue||_e||"";return'"'+Ae.Z.API_SERVER+"/api/attachments/"+qt+Jt+qt+Jt+"&t="+(0,ee.Jn)(qt,Date.now())}).replace(Le,(Ee,ge,Ue,nn,_e)=>{const qt=ge||nn,Jt=Ue||_e||"";return"("+Ae.Z.API_SERVER+"/files/uploads/"+qt+Jt+qt+Jt+"&t="+(0,ee.Jn)(qt,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,`
`),le)};var re=({value:le="",className:ae,showTextOnly:je,showLines:ne,style:Le={},stylesPrev:ue={},highlightKeywords:Ee,showProgramFill:ge,isProgramFill:Ue,disabledFill:nn=!1,programFillValue:_e,onFillChange:qt=sn=>{},onFillBlur:Jt=()=>{},onFillFocus:De=()=>{}})=>{let sn=String(le);const[cn,Te]=(0,pt.useState)(""),[en,Cn]=(0,pt.useState)("office"),[Gn,vn]=(0,pt.useState)([]),zn=(0,pt.useRef)("a"+(0,ye.Z)()),me={},An=(Rt,bt,Pt)=>{const It=document.createElement(Rt===Lt?"input":"textarea");It.style.width="100%",It.style.height=Rt===Lt?"40px":"151px",It.rows=5,It.spellcheck=!1,It.name="edu-program-fill",It.placeholder="\u8BF7\u8F93\u5165",It.dataset.id=bt;const Yt=Object.keys(me).length;return me[Yt]=It,`<span class="edu-program-fill-wrap ${Rt===Lt?"":"show"}" style="width:${Rt===Lt?"400px":"100%"}" title=${Pt||""}><span>${It.outerHTML}<span class="edu-program-fill-score" style="margin:0 6px"></span></span></span>`};function ui(Rt){return Rt=Rt.replace(/!\[.*?\]\(.*?\)/g,""),Rt=Rt.replace(/\[.*?\]\(.*?\)/g,""),Rt=Rt.replace(new RegExp("<iframe.*?<\\/iframe>","gs"),""),Rt=Rt.replace(/<embed.*?>/g,""),Rt=Rt.replace(/<img.*?>/g,""),Rt=Rt.replace(new RegExp("<video.*?>.*?<\\/video>","gs"),""),Rt=Rt.replace(new RegExp("<audio.*?>.*?<\\/audio>","gs"),""),Rt=Rt.replace(new RegExp("<style.*?>.*?<\\/style>","gs"),""),Rt=Rt.replace(new RegExp("<script.*?>.*?<\\/script>","gs"),""),Rt}const un=Rt=>Rt.replace(/<style.*?>([\s\S]+?)<\/style>/gim,function(bt,Pt){let It=Pt.replace(/(\n|\r)/g,"").split("}"),Yt=[];return It.map(Nt=>{Nt!=""&&Yt.push(`.${zn.current} ${Nt}`)}),`<style>${Yt.join("}")}</style>`}),ln=(0,pt.useMemo)(()=>{try{const It=/\(\s+\/api\/attachments\/|\(\/api\/attachments\//g,Yt=/\"\/api\/attachments\/|\"\/attachments\/download\//g,Nt=/\(\s+\/files\/uploads\/|\"\/files\/uploads\//g,xe=/\(\/attachments\/download\//g;sn=sn.replace(xe,"("+Ae.Z.API_SERVER+"/attachments/download/").replace(It,"("+Ae.Z.API_SERVER+"/api/attachments/").replace(Yt,'"'+Ae.Z.API_SERVER+"/api/attachments/").replace(Nt,'"'+Ae.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(It){}if(ge){let It=-1;return sn=sn.replaceAll("<","&lt;").replaceAll(">","&gt;").replace(/(@▁▁@|@▁@)/g,function(Yt,Nt,xe){var _n;return++It,An(Yt,It,(_n=_e==null?void 0:_e[It])==null?void 0:_n.value.replaceAll("<","&lt;").replaceAll(">","&gt;"))}),`<pre style="background:#fff;padding:4px">${un(sn||"")}</pre>`}let Rt=un(sn);Rt=(0,ve.ZP)(Rt);const bt=(0,ve.ez)();sn.match(/\[TOC\]/)&&(Rt=Rt.replace("<p>[TOC]</p>",(0,ve.Qv)()),(0,ve.Iy)()),Rt=Rt.replace(/(__special_katext_id_\d+__)/g,(It,Yt)=>{const{type:Nt,expression:xe}=bt[Yt];return(0,Fe.renderToString)(zt(xe)||"",{displayMode:Nt==="block",throwOnError:!1,output:"html"})}),Rt=Rt.replace(/▁/g,"\u2581\u2581\u2581\u2581\u2581"),(0,ve.AL)();const Pt=document.createElement("div");if(Pt.innerHTML=Rt,je)return Pt.innerText;if(Ee){const It=Ee.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");return Ze(Pt,It),Pt.innerHTML}return setTimeout(()=>$e(),500),Pt.innerHTML},[sn,Ee]);(0,pt.useEffect)(()=>{Hn.current&&Hn.current.querySelectorAll(["input","textarea"]).forEach(bt=>{bt.oninput=oi,bt.onblur=xn,bt.onfocus=Ie})},[Gn]),(0,pt.useEffect)(()=>{var Rt,bt,Pt,It,Yt;if(_e!=null&&_e.length)try{const Nt=Hn.current.querySelectorAll(".edu-program-fill-score"),xe=Hn.current.querySelectorAll('[name="edu-program-fill"]');for(const[_n,ni]of xe.entries())ni.value=((Rt=_e==null?void 0:_e[_n])==null?void 0:Rt.value)||"",((bt=_e==null?void 0:_e[_n])==null?void 0:bt.type)==="warning"?ni.className="program-fill-warning":((Pt=_e==null?void 0:_e[_n])==null?void 0:Pt.type)==="success"?ni.className="program-fill-success":ni.className="";for(const[_n,ni]of Nt.entries())ni.innerHTML=(It=_e==null?void 0:_e[_n])!=null&&It.score?`${(Yt=_e==null?void 0:_e[_n])==null?void 0:Yt.score}\u5206`:"";vn(_e)}catch(Nt){console.log(Nt,"error")}},[_e]);const oi=Rt=>{Gn[Rt.target.dataset.id]=Gn[Rt.target.dataset.id]||{},Gn[Rt.target.dataset.id].value=Rt.target.value,vn([...Gn]),qt(Gn,Rt.target.dataset.id)},xn=Rt=>{Gn[Rt.target.dataset.id]=Gn[Rt.target.dataset.id]||{},Gn[Rt.target.dataset.id].value=Rt.target.value,vn([...Gn]),Jt(Gn,Rt.target.dataset.id)},Ie=Rt=>{Gn[Rt.target.dataset.id]=Gn[Rt.target.dataset.id]||{},Gn[Rt.target.dataset.id].value=Rt.target.value,vn([...Gn]),De(Gn,Rt.target.dataset.id)};function Ze(Rt,bt){return Rt.childNodes.forEach(Pt=>{var It;if(Pt.childNodes.length>0)Ze(Pt,bt);else if(Pt.nodeName!=="IMG")if(Pt.innerHTML)Pt.innerHTML=(It=Pt.innerHTML)==null?void 0:It.replace(new RegExp(bt,"gi"),'<span style="color:#0152d9;background-color:#1890ff33">$&</span>');else{const Yt=document.createElement("span");Yt.innerHTML=Pt.textContent.replace(new RegExp(bt,"gi"),'<span style="color:#0152d9;background-color:#1890ff33">$&</span>'),Pt.replaceWith(Yt)}})}const Hn=(0,pt.useRef)();ve.jb.WebkitLineClamp=ne,ne&&(Le=gt(gt({},Le),ve.jb));function qe(Rt){let bt=Rt.target;if(bt.tagName.toUpperCase()==="A"){let Pt=bt.getAttribute("href");if(Pt.indexOf("office")>-1)Rt.preventDefault(),Te(Pt),Cn("office");else if(Pt.indexOf("application/pdf")>-1)Rt.preventDefault(),Te(Pt),Cn("pdf");else if(Pt.indexOf("text/html")>-1)Rt.preventDefault(),Te(Pt),Cn("html");else if(Pt.startsWith("#")){Rt.preventDefault();let It=document.getElementById(Pt.replace("#",""));It&&It.scrollIntoView(!0)}}}const $e=()=>{var Rt;const bt=(Rt=Hn.current)==null?void 0:Rt.querySelectorAll("video");bt==null||bt.forEach(Pt=>{if(Pt.oncontextmenu=()=>!1,Pt.src.indexOf(".m3u8")>-1&&!Pt.canPlayType("application/vnd.apple.mpegurl")){if(Pe.ZP.isSupported()){var It=new Pe.ZP;It.loadSource(Pt.src),It.attachMedia(Pt)}}})};(0,pt.useEffect)(()=>{if(Hn.current&&ln&&ln.match(Dt)&&window.PR.prettyPrint(),Hn.current)return Hn.current.addEventListener("click",qe),()=>{var Rt;(Rt=Hn.current)==null||Rt.removeEventListener("click",qe),(0,ve.AL)(),(0,ve.Iy)()}},[ln,Hn.current,qe]),(0,pt.useEffect)(()=>{var Rt;const bt=Pt=>{Pt.preventDefault(),Pt.clipboardData.setData("text",window.getSelection().toString())};return(Rt=Hn.current)==null||Rt.addEventListener("copy",bt),()=>{var Pt;(Pt=Hn.current)==null||Pt.removeEventListener("copy",bt)}},[Hn.current]);const Pn=Rt=>/<style[\s\S]*?>/i.test(Rt||"");return pt.createElement(pt.Fragment,null,je&&pt.createElement("div",{ref:Hn},ln),!je&&!Pn(ln)&&pt.createElement("div",{ref:Hn,style:gt({},Le),className:`${ae||""} ${nn?"disabled-fill":""} markdown-body ${zn.current}`,dangerouslySetInnerHTML:{__html:ln}}),!je&&Pn(ln)&&pt.createElement(He,{html:ln}),pt.createElement(de.Z,{close:!0,data:cn,type:cn!=null&&cn.length?en:"",style:gt({},ue),onClose:()=>Te("")}))}},53932:function(fn,Bn,Ft){"use strict";Ft.d(Bn,{h:function(){return Lt},Z:function(){return yt}});var pt=Ft(59301),Ht=Ft(57809),ve=Ft(78241),Me=Ft(3113),Pe=Ft(89780),Ae=Ft.n(Pe),ee=Ft(37036),Fe=Object.defineProperty,ye=Object.defineProperties,de=Object.getOwnPropertyDescriptors,he=Object.getOwnPropertySymbols,Ne=Object.prototype.hasOwnProperty,He=Object.prototype.propertyIsEnumerable,kt=(Dt,zt,Xt)=>zt in Dt?Fe(Dt,zt,{enumerable:!0,configurable:!0,writable:!0,value:Xt}):Dt[zt]=Xt,nt=(Dt,zt)=>{for(var Xt in zt||(zt={}))Ne.call(zt,Xt)&&kt(Dt,Xt,zt[Xt]);if(he)for(var Xt of he(zt))He.call(zt,Xt)&&kt(Dt,Xt,zt[Xt]);return Dt},et=(Dt,zt)=>ye(Dt,de(zt));const ht=Ht.default.Option,lt={labelCol:{span:4},wrapperCol:{span:20}},gt={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"]};var yt=({callback:Dt,onCancel:zt})=>{const[Xt,re]=(0,pt.useState)("python");function le(je){re(gt[je][1])}function ae(je){Dt(je)}return pt.createElement(ve.default,et(nt({},lt),{className:"code-block-panel",initialValues:{language:"python",content:""},onFinish:ae,style:{width:500}}),pt.createElement(ve.default.Item,{label:"\u4EE3\u7801\u8BED\u8A00",name:"language"},pt.createElement(Ht.default,{getPopupContainer:je=>je.parentNode,onChange:le},Object.keys(gt).map(je=>pt.createElement(ht,{key:je,value:je},gt[je][0])))),pt.createElement(ve.default.Item,{label:"\u4EE3\u7801\u5185\u5BB9",name:"content",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u4EE3\u7801\u5185\u5BB9"}]},pt.createElement(Lt,{mode:Xt})),pt.createElement("div",{className:"flex-container flex-end"},pt.createElement(Me.ZP,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),pt.createElement(Me.ZP,{type:"ghost",onClick:zt},"\u53D6\u6D88")))};function Lt({value:Dt,onChange:zt,mode:Xt,options:re={}}){const le=(0,pt.useRef)(),[ae,je]=(0,pt.useState)();return(0,pt.useEffect)(()=>{if(ae){let ne=function(Le){const ue=Le.getValue();zt&&zt(ue)};return ae.on("change",ne),()=>{ae.off("change",ne)}}},[ae,zt]),(0,pt.useEffect)(()=>{ae&&ae.setOption("mode",Xt)},[ae,Xt]),(0,pt.useEffect)(()=>{ae&&(Dt!==ae.getValue()||Dt==="")&&setTimeout(()=>{ae.setValue(Dt||"")},300)},[ae,Dt]),(0,pt.useEffect)(()=>{if(le.current&&!ae){const ne=Ae().fromTextArea(le.current,nt({mode:Xt,lineNumbers:!0,lineWrapping:!0,autoCloseBrackets:!0,tabSize:4,autofocus:!0,autoCloseTags:!0,matchBrackets:!0,styleActiveLine:!0},re));je(ne)}},[le.current,ae]),pt.createElement("div",{className:"my-codemirror-container"},pt.createElement("textarea",{ref:le}))}},12290:function(fn,Bn,Ft){"use strict";Ft.d(Bn,{Z:function(){return Sn}});var pt=Ft(59301),Ht=Ft(89780),ve=Ft.n(Ht),Me=Ft(76374),Pe=Ft(37036),Ae=Ft(6313),ee=Ft(25717),Fe=Ft(99498),ye=Ft(25419),de=Ft(67549),he=Ft(85149),Ne=({value:be="",className:Ce,showTextOnly:we,showLines:kn,style:Qn={}})=>{const ti=(0,pt.useMemo)(()=>"",[be]);return pt.createElement(pt.Fragment,null,pt.createElement("div",{dangerouslySetInnerHTML:{__html:ti}}))},He=Ft(59301),kt=Object.defineProperty,nt=Object.defineProperties,et=Object.getOwnPropertyDescriptors,ht=Object.getOwnPropertySymbols,lt=Object.prototype.hasOwnProperty,gt=Object.prototype.propertyIsEnumerable,yt=(be,Ce,we)=>Ce in be?kt(be,Ce,{enumerable:!0,configurable:!0,writable:!0,value:we}):be[Ce]=we,Lt=(be,Ce)=>{for(var we in Ce||(Ce={}))lt.call(Ce,we)&&yt(be,we,Ce[we]);if(ht)for(var we of ht(Ce))gt.call(Ce,we)&&yt(be,we,Ce[we]);return be},Dt=(be,Ce)=>nt(be,et(Ce));let zt=[{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 Xt({onActionCallback:be,title:Ce,icon:we,actionName:kn,className:Qn="",children:ti}){function Xe(){be(kn)}return He.createElement("a",{title:Ce,className:Qn,onClick:Xe},He.createElement("i",{className:`${we}`}),ti)}var re=({watch:be,showNullButton:Ce,showNullProgramButton:we,onActionCallback:kn,fullScreen:Qn,insertTemp:ti,hidetoolBar:Xe,extraUse:Dn})=>{const vi=[...zt,{title:`${be?"\u5173\u95ED\u5B9E\u65F6\u9884\u89C8":"\u5F00\u542F\u5B9E\u65F6\u9884\u89C8"}`,icon:`${be?"md-iconfont icon-eye-slash":"md-iconfont icon-eye"}`,actionName:"trigger-watch"}];return He.createElement("ul",{className:"markdown-toolbar-container"},!Xe&&vi.map(($n,ki)=>He.createElement("li",{key:ki},$n.actionName?He.createElement(Xt,Dt(Lt({},$n),{onActionCallback:kn})):He.createElement("span",{className:"v-line"}))),Ce?He.createElement("li",null,He.createElement(Xt,{icon:"md-iconfont icon-edit insert-blank",className:"btn-null",title:"\u589E\u52A0\u586B\u7A7A",actionName:"add-null-ch",onActionCallback:kn},He.createElement("span",{className:"fill-tip"},"\u70B9\u51FB\u63D2\u5165\b\u586B\u7A7A\u9879"))):null,we?He.createElement(He.Fragment,null,He.createElement("li",null,He.createElement(Xt,{icon:"md-iconfont icon-edit insert-blank",className:"btn-null",title:"\u589E\u52A0\u586B\u7A7A",actionName:"add-signal",onActionCallback:kn},He.createElement("span",{className:"fill-tip"},"+\u5355\u884C\u586B\u7A7A\u9879"))),He.createElement("li",null,He.createElement(Xt,{icon:"md-iconfont icon-uniE900 insert-blank",className:"btn-null",title:"\u589E\u52A0\u586B\u7A7A",actionName:"add-multiple",onActionCallback:kn},He.createElement("span",{className:"fill-tip"},"+\u591A\u884C\u586B\u7A7A\u9879")))):null,ti&&He.createElement("li",null,He.createElement(Xt,{icon:"md-iconfont icon-edit",className:"btn-null",title:"\u63D2\u5165\u6A21\u677F",actionName:`inster-template-${ti}`,onActionCallback:kn},He.createElement("span",{className:"fill-tip"},"\u63D2\u5165\u6A21\u677F"))),Dn&&He.createElement("li",null,Dn),He.createElement("li",{className:"btn-full-screen"},He.createElement(Xt,{icon:`${Qn?"md-iconfont icon-shrink":"md-iconfont icon-enlarge"}`,title:Qn?"\u5173\u95ED\u5168\u5C4F":"\u5F00\u542F\u5168\u5C4F",actionName:"trigger-full-screen",onActionCallback:kn})))},le=Ft(79346),ae=Ft(78241),je=Ft(92832),ne=Ft(3113),Le=Object.defineProperty,ue=Object.defineProperties,Ee=Object.getOwnPropertyDescriptors,ge=Object.getOwnPropertySymbols,Ue=Object.prototype.hasOwnProperty,nn=Object.prototype.propertyIsEnumerable,_e=(be,Ce,we)=>Ce in be?Le(be,Ce,{enumerable:!0,configurable:!0,writable:!0,value:we}):be[Ce]=we,qt=(be,Ce)=>{for(var we in Ce||(Ce={}))Ue.call(Ce,we)&&_e(be,we,Ce[we]);if(ge)for(var we of ge(Ce))nn.call(Ce,we)&&_e(be,we,Ce[we]);return be},Jt=(be,Ce)=>ue(be,Ee(Ce));const De={labelCol:{span:4},wrapperCol:{span:20}};var sn=({callback:be,onCancel:Ce})=>{function we(kn){be(kn)}return pt.createElement(ae.default,Jt(qt({},De),{initialValues:{link:"http://",title:""},className:"link-panel",onFinish:we,style:{width:500}}),pt.createElement(ae.default.Item,{label:"\u94FE\u63A5\u5730\u5740",name:"link",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u94FE\u63A5\u5730\u5740"}]},pt.createElement(je.default,null)),pt.createElement(ae.default.Item,{label:"\u94FE\u63A5\u6807\u9898",name:"title",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u94FE\u63A5\u6807\u9898"}]},pt.createElement(je.default,null)),pt.createElement("div",{className:"flex-container flex-end"},pt.createElement(ne.ZP,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),pt.createElement(ne.ZP,{type:"ghost",onClick:Ce},"\u53D6\u6D88")))},cn=Ft(53932),Te=Ft(28451),en=Ft(43418),Cn=Ft(95237),Gn=Ft(16406),vn=Ft(59301),zn=({callback:be,onCancel:Ce})=>{const we=document.createElement("canvas"),kn=we.getContext("2d");we.width=1e3,we.height=800,kn.fillStyle="#ffffff",kn.fillRect(0,0,we.width,we.height);const Qn=we.toDataURL("image/png");return vn.createElement(en.default,{open:!0,width:"100vw",style:{height:"100vh",top:0},footer:null,title:null,closable:!1},vn.createElement(Cn.Z,{style:{height:"100vh"}},vn.createElement(Gn.Z,{fullWidth:!0,noAssociationId:!0,showFullTools:!0,data:{src:Qn,visible:!0,title:String(Date.now())},onOk:ti=>{be({src:ti.url})},onClose:Ce})))},me=Ft(12378);function An(){go.CommandHandler.call(this),this._arrowKeyBehavior="move",this._pasteOffset=new go.Point(10,10),this._lastPasteOffset=new go.Point(0,0)}go.Diagram.inherit(An,go.CommandHandler),An.prototype.canAlignSelection=function(){var be=this.diagram;return!(be===null||be.isReadOnly||be.isModelReadOnly||be.selection.count<2)},An.prototype.alignLeft=function(){var be=this.diagram;be.startTransaction("aligning left");var Ce=1/0;be.selection.each(function(we){we instanceof go.Link||(Ce=Math.min(we.position.x,Ce))}),be.selection.each(function(we){we instanceof go.Link||we.move(new go.Point(Ce,we.position.y))}),be.commitTransaction("aligning left")},An.prototype.alignRight=function(){var be=this.diagram;be.startTransaction("aligning right");var Ce=-1/0;be.selection.each(function(we){if(!(we instanceof go.Link)){var kn=we.actualBounds.x+we.actualBounds.width;Ce=Math.max(kn,Ce)}}),be.selection.each(function(we){we instanceof go.Link||we.move(new go.Point(Ce-we.actualBounds.width,we.position.y))}),be.commitTransaction("aligning right")},An.prototype.alignTop=function(){var be=this.diagram;be.startTransaction("alignTop");var Ce=1/0;be.selection.each(function(we){we instanceof go.Link||(Ce=Math.min(we.position.y,Ce))}),be.selection.each(function(we){we instanceof go.Link||we.move(new go.Point(we.position.x,Ce))}),be.commitTransaction("alignTop")},An.prototype.alignBottom=function(){var be=this.diagram;be.startTransaction("aligning bottom");var Ce=-1/0;be.selection.each(function(we){if(!(we instanceof go.Link)){var kn=we.actualBounds.y+we.actualBounds.height;Ce=Math.max(kn,Ce)}}),be.selection.each(function(we){we instanceof go.Link||we.move(new go.Point(we.actualBounds.x,Ce-we.actualBounds.height))}),be.commitTransaction("aligning bottom")},An.prototype.alignCenterX=function(){var be=this.diagram,Ce=be.selection.first();if(Ce){be.startTransaction("aligning Center X");var we=Ce.actualBounds.x+Ce.actualBounds.width/2;be.selection.each(function(kn){kn instanceof go.Link||kn.move(new go.Point(we-kn.actualBounds.width/2,kn.actualBounds.y))}),be.commitTransaction("aligning Center X")}},An.prototype.alignCenterY=function(){var be=this.diagram,Ce=be.selection.first();if(Ce){be.startTransaction("aligning Center Y");var we=Ce.actualBounds.y+Ce.actualBounds.height/2;be.selection.each(function(kn){kn instanceof go.Link||kn.move(new go.Point(kn.actualBounds.x,we-kn.actualBounds.height/2))}),be.commitTransaction("aligning Center Y")}},An.prototype.alignColumn=function(be){var Ce=this.diagram;Ce.startTransaction("align Column"),be===void 0&&(be=0),be=parseFloat(be);var we=new Array;Ce.selection.each(function(Dn){Dn instanceof go.Link||we.push(Dn)});for(var kn=0;kn<we.length-1;kn++){var Qn=we[kn],ti=Qn.actualBounds.y+Qn.actualBounds.height+be,Xe=we[kn+1];Xe.move(new go.Point(Qn.actualBounds.x,ti))}Ce.commitTransaction("align Column")},An.prototype.alignRow=function(be){be===void 0&&(be=0),be=parseFloat(be);var Ce=this.diagram;Ce.startTransaction("align Row");var we=new Array;Ce.selection.each(function(Dn){Dn instanceof go.Link||we.push(Dn)});for(var kn=0;kn<we.length-1;kn++){var Qn=we[kn],ti=Qn.actualBounds.x+Qn.actualBounds.width+be,Xe=we[kn+1];Xe.move(new go.Point(ti,Qn.actualBounds.y))}Ce.commitTransaction("align Row")},An.prototype.canRotate=function(be){var Ce=this.diagram;return!(Ce===null||Ce.isReadOnly||Ce.isModelReadOnly||Ce.selection.count<1)},An.prototype.rotate=function(be){be===void 0&&(be=90);var Ce=this.diagram;Ce.startTransaction("rotate "+be.toString());var Ce=this.diagram;Ce.selection.each(function(we){we instanceof go.Link||we instanceof go.Group||(we.angle+=be)}),Ce.commitTransaction("rotate "+be.toString())},An.prototype.pullToFront=function(){var be=this.diagram;be.startTransaction("pullToFront");var Ce=new go.Map;be.selection.each(function(we){Ce.set(we.layer,0)}),Ce.iteratorKeys.each(function(we){var kn=0;we.parts.each(function(Qn){if(!Qn.isSelected){var ti=Qn.zOrder;isNaN(ti)?Qn.zOrder=0:kn=Math.max(kn,ti)}}),Ce.set(we,kn)}),be.selection.each(function(we){An._assignZOrder(we,Ce.get(we.layer)+1)}),be.commitTransaction("pullToFront")},An.prototype.pushToBack=function(){var be=this.diagram;be.startTransaction("pushToBack");var Ce=new go.Map;be.selection.each(function(we){Ce.set(we.layer,0)}),Ce.iteratorKeys.each(function(we){var kn=0;we.parts.each(function(Qn){if(!Qn.isSelected){var ti=Qn.zOrder;isNaN(ti)?Qn.zOrder=0:kn=Math.min(kn,ti)}}),Ce.set(we,kn)}),be.selection.each(function(we){An._assignZOrder(we,Ce.get(we.layer)-1-An._findGroupDepth(we))}),be.commitTransaction("pushToBack")},An._assignZOrder=function(be,Ce,we){we===void 0&&(we=be),be.layer===we.layer&&(be.zOrder=Ce),be instanceof go.Group&&be.memberParts.each(function(kn){An._assignZOrder(kn,Ce+1,we)})},An._findGroupDepth=function(be){if(be instanceof go.Group){var Ce=0;return be.memberParts.each(function(we){Ce=Math.max(Ce,An._findGroupDepth(we))}),Ce+1}else return 0},An.prototype.doKeyDown=function(){var be=this.diagram;if(be!==null){var Ce=be.lastInput;if(Ce.key==="Up"||Ce.key==="Down"||Ce.key==="Left"||Ce.key==="Right"){var we=this.arrowKeyBehavior;if(we==="none")return;if(we==="select"){this._arrowKeySelect();return}else if(we==="move"){this._arrowKeyMove();return}else if(we==="tree"){this._arrowKeyTree();return}}go.CommandHandler.prototype.doKeyDown.call(this)}},An.prototype._getAllParts=function(){var be=new Array;return this.diagram.nodes.each(function(Ce){be.push(Ce)}),this.diagram.parts.each(function(Ce){be.push(Ce)}),be},An.prototype._arrowKeyMove=function(){var be=this.diagram,Ce=be.lastInput,we=0,kn=0;if(Ce.control||Ce.meta)we=1,kn=1;else if(be.grid!==null){var Qn=be.grid.gridCellSize;kn=Qn.width,we=Qn.height}be.startTransaction("arrowKeyMove"),be.selection.each(function(ti){Ce.key==="Up"?ti.move(new go.Point(ti.actualBounds.x,ti.actualBounds.y-we)):Ce.key==="Down"?ti.move(new go.Point(ti.actualBounds.x,ti.actualBounds.y+we)):Ce.key==="Left"?ti.move(new go.Point(ti.actualBounds.x-kn,ti.actualBounds.y)):Ce.key==="Right"&&ti.move(new go.Point(ti.actualBounds.x+kn,ti.actualBounds.y))}),be.commitTransaction("arrowKeyMove")},An.prototype._arrowKeySelect=function(){var be=this.diagram,Ce=be.lastInput,we=null;Ce.key==="Up"?we=this._findNearestPartTowards(270):Ce.key==="Down"?we=this._findNearestPartTowards(90):Ce.key==="Left"?we=this._findNearestPartTowards(180):Ce.key==="Right"&&(we=this._findNearestPartTowards(0)),we!==null&&(Ce.shift?we.isSelected=!0:Ce.control||Ce.meta?we.isSelected=!we.isSelected:be.select(we))},An.prototype._findNearestPartTowards=function(be){var Ce=this.diagram.selection.first();if(Ce===null)return null;for(var we=Ce.actualBounds.center,kn=this._getAllParts(),Qn=1/0,ti=Ce,Xe=0;Xe<kn.length;Xe++){var Dn=kn[Xe];if(Dn!==Ce&&Dn.canSelect()){var vi=Dn.actualBounds.center,$n=we.directionPoint(vi),ki=this._angleCloseness($n,be);if(ki<=45){var pe=we.distanceSquaredPoint(vi);pe*=1+Math.sin(ki*Math.PI/180),pe<Qn&&(Qn=pe,ti=Dn)}}}return ti},An.prototype._angleCloseness=function(be,Ce){return Math.min(Math.abs(Ce-be),Math.min(Math.abs(Ce+360-be),Math.abs(Ce-360-be)))},An.prototype._arrowKeyTree=function(){var be=this.diagram,Ce=be.selection.first();if(Ce instanceof go.Node){var we=be.lastInput;if(we.key==="Right"){if(!Ce.isTreeLeaf)if(!Ce.isTreeExpanded)be.commandHandler.canExpandTree(Ce)&&be.commandHandler.expandTree(Ce);else{var kn=this._sortTreeChildrenByY(Ce).first();kn!==null&&be.select(kn)}}else if(we.key==="Left")if(!Ce.isTreeLeaf&&Ce.isTreeExpanded)be.commandHandler.canCollapseTree(Ce)&&be.commandHandler.collapseTree(Ce);else{var Qn=Ce.findTreeParentNode();Qn!==null&&be.select(Qn)}else if(we.key==="Up"){var Qn=Ce.findTreeParentNode();if(Qn!==null){var ti=this._sortTreeChildrenByY(Qn),Xe=ti.indexOf(Ce);if(Xe>0){for(var Dn=ti.elt(Xe-1);Dn!==null&&Dn.isTreeExpanded&&!Dn.isTreeLeaf;){var vi=this._sortTreeChildrenByY(Dn);Dn=vi.last()}Dn!==null&&be.select(Dn)}else be.select(Qn)}}else if(we.key==="Down")if(Ce.isTreeExpanded&&!Ce.isTreeLeaf){var kn=this._sortTreeChildrenByY(Ce).first();kn!==null&&be.select(kn)}else for(;Ce!==null;){var Qn=Ce.findTreeParentNode();if(Qn===null)break;var ti=this._sortTreeChildrenByY(Qn),Xe=ti.indexOf(Ce);if(Xe<ti.length-1){be.select(ti.elt(Xe+1));break}else Ce=Qn}var $n=be.selection.first();$n!==null&&be.scrollToRect($n.actualBounds)}},An.prototype._sortTreeChildrenByY=function(be){var Ce=new go.List().addAll(be.findTreeChildrenNodes());return Ce.sort(function(we,kn){var Qn=we.location,ti=kn.location;return Qn.y<ti.y?-1:Qn.y>ti.y?1:Qn.x<ti.x?-1:Qn.x>ti.x?1:0}),Ce},An.prototype.copyToClipboard=function(be){go.CommandHandler.prototype.copyToClipboard.call(this,be),this._lastPasteOffset.set(this.pasteOffset)},An.prototype.pasteFromClipboard=function(){var be=go.CommandHandler.prototype.pasteFromClipboard.call(this);return this.diagram.moveParts(be,this._lastPasteOffset),this._lastPasteOffset.add(this.pasteOffset),be},Object.defineProperty(An.prototype,"arrowKeyBehavior",{get:function(){return this._arrowKeyBehavior},set:function(be){if(be!=="move"&&be!=="select"&&be!=="scroll"&&be!=="tree"&&be!=="none")throw new Error('DrawCommandHandler.arrowKeyBehavior must be either "move", "select", "scroll", "tree", or "none", not: '+be);this._arrowKeyBehavior=be}}),Object.defineProperty(An.prototype,"pasteOffset",{get:function(){return this._pasteOffset},set:function(be){if(!(be instanceof go.Point))throw new Error("DrawCommandHandler.pasteOffset must be a Point, not: "+be);this._pasteOffset.set(be)}});var ui=An,un=Ft(74413),ln=Ft(43604),oi=Ft(99064),xn={myPaletteDiv:"myPaletteDiv___Xjz2I",flowChartWrp:"flowChartWrp____f45r",maxH60:"maxH60___Pd4Re"},Ie=Ft(24065),Ze=Ft(59301),Hn=(be,Ce,we)=>new Promise((kn,Qn)=>{var ti=vi=>{try{Dn(we.next(vi))}catch($n){Qn($n)}},Xe=vi=>{try{Dn(we.throw(vi))}catch($n){Qn($n)}},Dn=vi=>vi.done?kn(vi.value):Promise.resolve(vi.value).then(ti,Xe);Dn((we=we.apply(be,Ce)).next())});function qe({onCancel:be,callback:Ce}){let we=(0,pt.useRef)(),kn=(0,pt.useRef)(),Qn=(0,pt.useRef)(),ti=(0,pt.useRef)(!1);const Xe=(0,pt.useRef)(!1),[Dn,vi]=(0,pt.useState)(0);function $n(){const pe=me.bx.make,Tn={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"};we.current=new me.S0(kn.current,{padding:20,grid:pe(me.s_,"Grid",pe(me.bn,"LineH",{stroke:"lightgray",strokeWidth:.5}),pe(me.bn,"LineV",{stroke:"lightgray",strokeWidth:.5})),"draggingTool.isGridSnapEnabled":!0,handlesDragDropForTopLevelParts:!0,mouseDrop:Un=>{var Pi=Un.diagram.commandHandler.addTopLevelParts(Un.diagram.selection,!0);Pi||Un.diagram.currentTool.doCancel()},commandHandler:pe(ui),"clickCreatingTool.archetypeNodeData":{text:"\u672A\u547D\u540D",fill:null,stroke:null,borderColor:"rgba(0,0,0,0)"},PartCreated:Un=>{var Pi=Un.subject;Pi.location=Pi.location.copy().snapToGridPoint(Un.diagram.grid.gridOrigin,Un.diagram.grid.gridCellSize),setTimeout(()=>{Un.diagram.commandHandler.editTextBlock()},20)},"commandHandler.archetypeGroupData":{isGroup:!0,text:"NEW GROUP"},SelectionGrouped:Un=>{var Pi=Un.subject;setTimeout(()=>{Un.diagram.commandHandler.editTextBlock()})},LinkRelinked:Un=>{var Pi=Un.parameter.part;Pi.invalidateConnectedLinks();var Ni=Un.subject;Un.diagram.toolManager.linkingTool.isForwards?Ni.toNode.invalidateConnectedLinks():Ni.fromNode.invalidateConnectedLinks()},"undoManager.isEnabled":!0}),we.current.nodeTemplate=pe(me.NB,"Auto",{locationSpot:me.z6.Center,locationObjectName:"SHAPE",desiredSize:new me.$u(120,60),minSize:new me.$u(40,40),resizable:!0,resizeCellSize:new me.$u(10,10),rotatable:!0},new me.KX("location","loc",me.E9.parse).makeTwoWay(me.E9.stringify),new me.KX("desiredSize","size",me.$u.parse).makeTwoWay(me.$u.stringify),pe(me.bn,{name:"SHAPE",fill:Tn.white,cursor:"pointer",portId:"",fromLinkable:!0,toLinkable:!0,fromLinkableDuplicates:!0,toLinkableDuplicates:!0,fromSpot:me.z6.AllSides,toSpot:me.z6.AllSides},new me.KX("figure"),new me.KX("fill"),new me.KX("stroke","borderColor"),new me.KX("strokeWidth","thickness"),new me.KX("strokeDashArray","dash")),pe(me.bn,{width:100,height:20,strokeWidth:0,fill:"transparent"}),pe(me.al,{margin:1,textAlign:"center",overflow:me.al.OverflowEllipsis,editable:!0},new me.KX("text").makeTwoWay(),new me.KX("stroke","color"))),we.current.nodeTemplate.toolTip=pe("ToolTip",pe(me.s_,"Vertical",{maxSize:new me.$u(200,NaN)},pe(me.al,{font:"bold 10pt sans-serif",textAlign:"center"},new me.KX("text")),pe(me.al,{font:"10pt sans-serif",textAlign:"center"},new me.KX("text","details"))));function gi(Un,Pi){var Ni=(di,Ii)=>{di.handled=!0,di.diagram.model.commit(vr=>{var yr=Ii.part.adornedPart,pr=new me.E9().setRectSpot(yr.actualBounds,Un);pr.subtract(yr.location),pr.scale(2,2),pr.x+=Math.sign(pr.x)*130,pr.y+=Math.sign(pr.y)*130,pr.add(yr.location),pr.snapToGridPoint(di.diagram.grid.gridOrigin,di.diagram.grid.gridCellSize);var wr=vr.copyNodeData(yr.data);vr.setGroupKeyForNodeData(wr,vr.getGroupKeyForNodeData(yr.data)),vr.addNodeData(wr);var yn={from:yr.key,to:vr.getKeyForNodeData(wr)};vr.addLinkData(yn);var Ir=di.diagram.findNodeForData(wr);Ir.location=pr,di.diagram.select(Ir),setTimeout(()=>{di.diagram.commandHandler.editTextBlock()},20)})};return pe(me.bn,{figure:Pi,alignment:Un,alignmentFocus:Un.opposite(),width:Un.equals(me.z6.Top)||Un.equals(me.z6.Bottom)?25:18,height:Un.equals(me.z6.Top)||Un.equals(me.z6.Bottom)?18:25,fill:"orange",stroke:Tn.white,strokeWidth:4,mouseEnter:(di,Ii)=>Ii.fill="dodgerblue",mouseLeave:(di,Ii)=>Ii.fill="orange",isActionable:!0,click:Ni,contextClick:Ni})}function Oi(Un){return pe(me.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:(Pi,Ni)=>Ni.fill="dodgerblue",mouseLeave:(Pi,Ni)=>Ni.fill="orange",click:(Pi,Ni)=>{Pi.diagram.commandHandler.showContextMenu(Ni.part.adornedPart)}},Un||{})}we.current.nodeTemplate.selectionAdornmentTemplate=pe(me.uz,"Spot",pe(me.Vm,{padding:10}),gi(me.z6.Top,"TriangleUp"),gi(me.z6.Left,"TriangleLeft"),gi(me.z6.Right,"TriangleRight"),gi(me.z6.Bottom,"TriangleDown"),Oi({alignment:new me.z6(.75,0)}));function bn(Un,Pi){return(Ni,di)=>{Ni.handled=!0,Ni.diagram.model.commit(Ii=>{Ii.set(di.part.adornedPart.data,Un,Pi)})}}function Mn(Un,Pi){return Pi||(Pi="color"),pe(me.bn,{width:16,height:16,stroke:"lightgray",fill:Un,margin:1,background:"transparent",mouseEnter:(Ni,di)=>di.stroke="dodgerblue",mouseLeave:(Ni,di)=>di.stroke="lightgray",click:bn(Pi,Un),contextClick:bn(Pi,Un)})}function hn(){return[pe("ContextMenuButton",pe(me.s_,"Horizontal",Mn(Tn.white,"fill"),Mn(Tn.beige,"fill"),Mn(Tn.extralightblue,"fill"),Mn(Tn.extralightred,"fill"))),pe("ContextMenuButton",pe(me.s_,"Horizontal",Mn(Tn.lightgray,"fill"),Mn(Tn.lightgreen,"fill"),Mn(Tn.lightblue,"fill"),Mn(Tn.lightred,"fill")))]}function Ji(){return[pe("ContextMenuButton",pe(me.s_,"Horizontal",Mn(Tn.black),Mn(Tn.green),Mn(Tn.blue),Mn(Tn.red))),pe("ContextMenuButton",pe(me.s_,"Horizontal",Mn(Tn.white),Mn(Tn.magenta),Mn(Tn.purple),Mn(Tn.orange)))]}function Li(Un,Pi){return Pi||(Pi="thickness"),pe(me.bn,"LineH",{width:16,height:16,strokeWidth:Un,margin:1,background:"transparent",mouseEnter:(Ni,di)=>di.background="dodgerblue",mouseLeave:(Ni,di)=>di.background="transparent",click:bn(Pi,Un),contextClick:bn(Pi,Un)})}function Si(Un,Pi){return Pi||(Pi="dash"),pe(me.bn,"LineH",{width:24,height:16,strokeWidth:2,strokeDashArray:Un,margin:1,background:"transparent",mouseEnter:(Ni,di)=>di.background="dodgerblue",mouseLeave:(Ni,di)=>di.background="transparent",click:bn(Pi,Un),contextClick:bn(Pi,Un)})}function wi(){return[pe("ContextMenuButton",pe(me.s_,"Horizontal",Li(1),Li(2),Li(3),Li(4))),pe("ContextMenuButton",pe(me.s_,"Horizontal",Si(null),Si([2,4]),Si([4,4])))]}function Mi(Un,Pi){return Pi||(Pi="figure"),pe(me.bn,{width:32,height:32,scale:.5,fill:"lightgray",figure:Un,margin:1,background:"transparent",mouseEnter:(Ni,di)=>di.fill="dodgerblue",mouseLeave:(Ni,di)=>di.fill="lightgray",click:bn(Pi,Un),contextClick:bn(Pi,Un)})}we.current.nodeTemplate.contextMenu=pe("ContextMenu",pe("ContextMenuButton",pe(me.s_,"Horizontal",Mi("Rectangle"),Mi("RoundedRectangle"),Mi("Ellipse"),Mi("Diamond"))),pe("ContextMenuButton",pe(me.s_,"Horizontal",Mi("Parallelogram2"),Mi("ManualOperation"),Mi("Procedure"),Mi("Cylinder1"))),pe("ContextMenuButton",pe(me.s_,"Horizontal",Mi("Terminator"),Mi("CreateRequest"),Mi("Document"),Mi("TriangleDown"))),hn(),Ji(),wi()),we.current.groupTemplate=pe(me.ZA,"Spot",{layerName:"Background",ungroupable:!0,locationSpot:me.z6.Center,selectionObjectName:"BODY",computesBoundsAfterDrag:!0,handlesDragDropForMembers:!0,mouseDrop:(Un,Pi)=>{var Ni=Pi.addMembers(Pi.diagram.selection,!0);Ni||Pi.diagram.currentTool.doCancel()},avoidable:!1},new me.KX("location","loc",me.E9.parse).makeTwoWay(me.E9.stringify),pe(me.s_,"Auto",{name:"BODY"},pe(me.bn,{parameter1:10,fill:Tn.white,strokeWidth:2,cursor:"pointer",fromLinkable:!0,toLinkable:!0,fromLinkableDuplicates:!0,toLinkableDuplicates:!0,fromSpot:me.z6.AllSides,toSpot:me.z6.AllSides},new me.KX("fill"),new me.KX("stroke","color"),new me.KX("strokeWidth","thickness"),new me.KX("strokeDashArray","dash")),pe(me.Vm,{background:"transparent",margin:20})),pe(me.al,{alignment:me.z6.Top,alignmentFocus:me.z6.Bottom,font:"bold 12pt sans-serif",editable:!0},new me.KX("text"),new me.KX("stroke","color"))),we.current.groupTemplate.selectionAdornmentTemplate=pe(me.uz,"Spot",pe(me.s_,"Auto",pe(me.bn,{fill:null,stroke:"dodgerblue",strokeWidth:3}),pe(me.Vm,{margin:1.5})),Oi({alignment:me.z6.TopRight,alignmentFocus:me.z6.BottomRight})),we.current.groupTemplate.contextMenu=pe("ContextMenu",hn(),Ji(),wi()),we.current.linkTemplate=pe(me.rU,{layerName:"Foreground",routing:me.rU.AvoidsNodes,corner:10,fromShortLength:10,toShortLength:15,relinkableFrom:!0,relinkableTo:!0,reshapable:!0,resegmentable:!0},new me.KX("fromSpot","fromSpot",me.z6.parse),new me.KX("toSpot","toSpot",me.z6.parse),new me.KX("fromShortLength","dir",Un=>Un>=1?10:0),new me.KX("toShortLength","dir",Un=>Un>=1?10:0),new me.KX("points").makeTwoWay(),pe(me.bn,{strokeWidth:2},new me.KX("stroke","color"),new me.KX("strokeWidth","thickness"),new me.KX("strokeDashArray","dash")),pe(me.bn,{segmentIndex:0,segmentOffset:new me.E9(15,0),segmentOrientation:me.rU.OrientAlong,alignmentFocus:me.z6.Right,figure:"circle",width:10,strokeWidth:0},new me.KX("fill","color"),new me.KX("visible","dir",Un=>Un===1)),pe(me.bn,{segmentIndex:-1,segmentOffset:new me.E9(-10,6),segmentOrientation:me.rU.OrientPlus90,alignmentFocus:me.z6.Right,figure:"triangle",width:12,height:12,strokeWidth:0},new me.KX("fill","color"),new me.KX("visible","dir",Un=>Un>=1),new me.KX("width","thickness",Un=>7+3*Un),new me.KX("height","thickness",Un=>7+3*Un),new me.KX("segmentOffset","thickness",Un=>new me.E9(-15,4+1.5*Un))),pe(me.bn,{segmentIndex:0,segmentOffset:new me.E9(15,-6),segmentOrientation:me.rU.OrientMinus90,alignmentFocus:me.z6.Right,figure:"triangle",width:12,height:12,strokeWidth:0},new me.KX("fill","color"),new me.KX("visible","dir",Un=>Un===2),new me.KX("width","thickness",Un=>7+3*Un),new me.KX("height","thickness",Un=>7+3*Un),new me.KX("segmentOffset","thickness",Un=>new me.E9(-15,4+1.5*Un))),pe(me.al,{alignmentFocus:new me.z6(0,1,-4,0),editable:!0},new me.KX("text").makeTwoWay(),new me.KX("stroke","color"))),we.current.linkTemplate.selectionAdornmentTemplate=pe(me.uz,pe(me.bn,{isPanelMain:!0,stroke:"transparent",strokeWidth:6,pathPattern:Er(2)},new me.KX("pathPattern","thickness",Er)),Oi({alignmentFocus:new me.z6(0,0,-6,-4)}));function Er(Un){return pe(me.bn,{stroke:"dodgerblue",strokeWidth:2,strokeCap:"square",geometryString:"M0 0 M4 2 H3 M4 "+(Un+4).toString()+" H3"})}function ir(Un){var Pi="M0 0 M8 16 M0 8 L16 8 M12 11 L16 8 L12 5";return Un===0?Pi="M0 0 M16 16 M0 8 L16 8":Un===2&&(Pi="M0 0 M16 16 M0 8 L16 8 M12 11 L16 8 L12 5 M4 11 L0 8 L4 5"),pe(me.bn,{geometryString:Pi,margin:2,background:"transparent",mouseEnter:(Ni,di)=>di.background="dodgerblue",mouseLeave:(Ni,di)=>di.background="transparent",click:bn("dir",Un),contextClick:bn("dir",Un)})}function tr(Un){var Pi=(Ni,di)=>{Ni.handled=!0,Ni.diagram.model.commit(Ii=>{var vr=di.part.adornedPart;Ii.set(vr.data,Un?"toSpot":"fromSpot",me.z6.stringify(me.z6.AllSides)),(Un?vr.toNode:vr.fromNode).invalidateConnectedLinks()})};return pe(me.bn,{width:12,height:12,fill:"transparent",mouseEnter:(Ni,di)=>di.background="dodgerblue",mouseLeave:(Ni,di)=>di.background="transparent",click:Pi,contextClick:Pi})}function gn(Un,Pi){var Ni=0,di=me.z6.RightSide;Un.equals(me.z6.Top)?(Ni=270,di=me.z6.TopSide):Un.equals(me.z6.Left)?(Ni=180,di=me.z6.LeftSide):Un.equals(me.z6.Bottom)&&(Ni=90,di=me.z6.BottomSide),Pi||(Ni-=180);var Ii=(vr,yr)=>{vr.handled=!0,vr.diagram.model.commit(pr=>{var wr=yr.part.adornedPart;pr.set(wr.data,Pi?"toSpot":"fromSpot",me.z6.stringify(di)),(Pi?wr.toNode:wr.fromNode).invalidateConnectedLinks()})};return pe(me.bn,{alignment:Un,alignmentFocus:Un.opposite(),geometryString:"M0 0 M12 12 M12 6 L1 6 L4 4 M1 6 L4 8",angle:Ni,background:"transparent",mouseEnter:(vr,yr)=>yr.background="dodgerblue",mouseLeave:(vr,yr)=>yr.background="transparent",click:Ii,contextClick:Ii})}we.current.linkTemplate.contextMenu=pe("ContextMenu",Ji(),wi(),pe("ContextMenuButton",pe(me.s_,"Horizontal",ir(0),ir(1),ir(2))),pe("ContextMenuButton",pe(me.s_,"Horizontal",pe(me.s_,"Spot",tr(!1),gn(me.z6.Top,!1),gn(me.z6.Left,!1),gn(me.z6.Right,!1),gn(me.z6.Bottom,!1)),pe(me.s_,"Spot",{margin:new me.Zt(0,0,0,2)},tr(!0),gn(me.z6.Top,!0),gn(me.z6.Left,!0),gn(me.z6.Right,!0),gn(me.z6.Bottom,!0)))));const to=`{ "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 Qi=["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 Or(Un){return console.log("shapeName:",Un),Qi.indexOf(Un)>=0}var Je=new me.YI(Qn.current,{maxSelectionCount:1,linkTemplate:pe(me.rU,{locationSpot:me.z6.Center,selectionAdornmentTemplate:pe(me.uz,"Link",{locationSpot:me.z6.Center},pe(me.bn,{isPanelMain:!0,fill:null,stroke:"deepskyblue",strokeWidth:0}),pe(me.bn,{toArrow:"Standard",stroke:null}))},{routing:me.rU.AvoidsNodes,curve:me.rU.JumpOver,corner:5,toShortLength:4},new me.KX("points"),pe(me.bn,{isPanelMain:!0,strokeWidth:2}),pe(me.bn,{toArrow:"Standard",stroke:null})),model:new me.FJ([{text:"\u672A\u547D\u540D",size:"100 100",fill:null,stroke:"#000"},...me.bn.getFigureGenerators().toArray().map(Un=>({text:"\u672A\u547D\u540D",size:"100 100",figure:Un.key,fill:"white",stroke:"#666",borderColor:"#000"}))])});return we.current.addDiagramListener("TextEdited",function(Un){var Pi;const Ni=Un.subject.part;var di=(Pi=document.activeElement)==null?void 0:Pi.value;typeof di=="string"&&di.trim()===""&&we.current.model.commit(function(Ii){Ii.set(Ni.data,"text","\u672A\u547D\u540D"),we.current.commandHandler.stopCommand()},"increment")}),Je.nodeTemplate=pe(me.NB,"Auto",{locationSpot:me.z6.Center},new me.KX("location","location",me.E9.parse).makeTwoWay(me.E9.stringify),pe(me.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 me.KX("stroke").makeTwoWay(),new me.KX("fill").makeTwoWay(),new me.KX("figure")),pe(me.al,{margin:new me.Zt(5,5,3,5),font:"10pt sans-serif",minSize:new me.$u(16,16),maxSize:new me.$u(10,NaN),textAlign:"center",editable:!0},new me.KX("key").makeTwoWay())),setTimeout(()=>{we.current.grid=pe(me.s_,"Grid",pe(me.bn,"LineH",{stroke:"lightgray",strokeWidth:.5}),pe(me.bn,"LineV",{stroke:"lightgray",strokeWidth:.5})),we.current.grid.visible=!0,we.current.grid.gridCellStroke="darkgray",we.current.grid.gridCellStrokeWidth=1},300),window.myDiagrams=we.current,we.current}const ki=()=>Hn(this,null,function*(){var pe,Tn=we.current.makeImage();const gi=yield(0,oi.ZP)("/api/attachments.json",{method:"post",body:{file_type:"base64",original_filename:Date.now(),file:Tn.src,file_data:JSON.stringify({login:(pe=(0,Ie.eY)())==null?void 0:pe.login,data:JSON.parse(we.current.model.toJson())})}});Ce({src:gi.url})});return(0,pt.useEffect)(()=>(setTimeout(()=>{$n()},500),vi(Dn+1),()=>{we.current=null}),[]),Ze.createElement("div",{ref:Xe,className:ti.current?`${xn.maxH60} body-overflow-initial`:"body-overflow-initial"},Ze.createElement(en.default,{width:1200,icon:null,footer:null,closable:!0,visible:!!Dn,destroyOnClose:!0,maskClosable:!1,rootClassName:"zIndex-9999",title:Ze.createElement(Cn.Z,null,Ze.createElement(ln.Z,{flex:1},"\u63D2\u5165\u6D41\u7A0B\u56FE"),Ze.createElement(ln.Z,{onClick:()=>{var pe,Tn,gi=we.current.selection.first();if(ti.current=!ti.current,document.activeElement&&gi){let Oi=(Tn=(pe=document.activeElement)==null?void 0:pe.value)==null?void 0:Tn.trim();typeof Oi=="string"&&we.current.model.commit(function(bn){bn.set(gi.data,"text",Oi||"\u672A\u547D\u540D"),we.current.commandHandler.stopCommand()},"increment")}vi(Dn+1)}},Ze.createElement("span",{className:"current c-blue mr30",style:{fontWeight:400}},"\u5C55\u5F00/\u6536\u8D77"))),onCancel:be},Ze.createElement("div",{style:{width:"100%",height:"80vh",overflow:"hidden",position:"relative"},className:xn.flowChartWrp},Ze.createElement("div",{style:{display:"flex",height:"100%"}},Ze.createElement("div",{style:{width:"300px",height:"100%"}},Ze.createElement("div",{style:{background:"#fff",position:"relative",zIndex:12,fontSize:16,color:"#3061d0"}},"\u56FE\u5F62\u5E93"),Ze.createElement("div",{style:{height:"calc(100% - 50px)"},className:xn.myPaletteDiv,ref:Qn})),Ze.createElement("div",{style:{flex:1,position:"relative"}},Ze.createElement("div",{ref:kn,style:{height:"80vh"}}))),Ze.createElement("div",{className:"tr"},Ze.createElement(ne.ZP,{size:"large",onClick:ki,style:{position:"absolute",right:0,bottom:0,zIndex:8},type:"primary"},"\u4FDD\u5B58\u5230\u7F16\u8F91\u5668")))))}var $e=qe,Pn=Ft(5112),Rt=Ft(5871);const bt=Pn.ZP.Group,Pt={margin:"0 8px"};var It=({callback:be,onCancel:Ce})=>{function we(kn){be(kn)}return pt.createElement(ae.default,{className:"add-table-panel",initialValues:{row:3,col:2,align:"default"},onFinish:we},pt.createElement("div",{className:"flex-container",style:{alignItems:"baseline"}},pt.createElement("span",{style:Pt},"\u5355\u5143\u683C\u6570\uFF1A"),pt.createElement("span",{style:Pt},"\u884C\u6570"),pt.createElement(ae.default.Item,{name:"row",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u884C\u6570"}]},pt.createElement(Rt.Z,null)),pt.createElement("span",{style:Pt},"\u5217\u6570"),pt.createElement(ae.default.Item,{name:"col",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u5217\u6570"}]},pt.createElement(Rt.Z,null))),pt.createElement("div",{className:"flex-container",style:{marginTop:12,alignItems:"baseline"}},pt.createElement("span",{style:Pt},"\u5BF9\u9F50\u65B9\u5F0F\uFF1A"),pt.createElement(ae.default.Item,{name:"align"},pt.createElement(bt,null,pt.createElement(Pn.ZP,{value:"default"},pt.createElement("i",{className:"fa fa-align-justify"})),pt.createElement(Pn.ZP,{value:"left"},pt.createElement("i",{className:"fa fa-align-left"})),pt.createElement(Pn.ZP,{value:"center"},pt.createElement("i",{className:"fa fa-align-center"})),pt.createElement(Pn.ZP,{value:"right"},pt.createElement("i",{className:"fa fa-align-right"}))))),pt.createElement("div",{className:"flex-container flex-end"},pt.createElement(ne.ZP,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),pt.createElement(ne.ZP,{type:"ghost",onClick:Ce},"\u53D6\u6D88")))},Yt=Ft(78673),Nt=Ft(80727),xe=Ft.n(Nt),ni=(0,pt.forwardRef)(({use3d:be,width:Ce,height:we,callback:kn,showSaveButton:Qn},ti)=>{const Xe=(0,pt.useRef)(),Dn=(0,pt.useRef)(),[vi,$n]=(0,pt.useState)(!1),ki=(0,pt.useRef)({id:Xe,appName:"graphing",width:Ce||1e3,height:we||600,showToolBar:!0,showMenuBar:!0,allowStyleBar:!0,showAlgebraInput:!0,enableLabelDrags:!1,enableShiftDragZoom:!0,showToolBarHelp:!1,errorDialogsActive:!0,showTutorialLink:!0,showLogging:!0,useBrowserForJS:!1});(0,pt.useEffect)(()=>{Dn.current=new(xe())(ki.current,!0),window.onload=function(){Dn.current.inject("applet_container")}},[]);const pe=()=>{var Tn=window.ggbApplet.getPNGBase64(1,!0,72);return kn&&kn(Tn),Tn};return(0,pt.useEffect)(()=>{ki.current.appName=vi?"3D":"graphing",Dn.current.inject("applet_container")},[vi]),(0,pt.useEffect)(()=>{$n(be)},[be]),(0,pt.useImperativeHandle)(ti,()=>({getImgData:pe})),pt.createElement(pt.Fragment,null,pt.createElement("div",{style:{width:"100%",height:"100%"},id:"applet_container",ref:Xe}),pt.createElement(Cn.Z,{align:"middle"},pt.createElement(ln.Z,{flex:1},pt.createElement(Yt.Z,{size:"default",checkedChildren:"\u5173\u95ED3D\u56FE\u50CF",unCheckedChildren:"\u5F00\u542F3D\u56FE\u50CF",checked:vi,onChange:Tn=>$n(Tn)})),pt.createElement(ln.Z,null,pt.createElement(ne.ZP,{size:"large",onClick:pe,style:{zIndex:8,marginTop:10},type:"primary"},"\u4FDD\u5B58\u5230\u7F16\u8F91\u5668"))))}),ei=Ft(41588),ii=Ft(8591);const Hi="link",hi="upload-image",Jn="add-flowchart",Vi="draw-image",er="add-flowchart",nr="code-block",sr="add-table",kr="------------",or={default:kr,left:`:${kr}`,center:`:${kr}:`,right:`${kr}:`};var _i=Ft(58856);function gr(){}let Mr=0;const Ei=1e4,Qr="\u2581",Rn="@\u2581\u2581@",Ct="@\u2581@",zi=`
**\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`,Ci=["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 ze(be){return/^\d+$/.test(be)?`${be}px`:be}const Xn=navigator.platform.toUpperCase().indexOf("MAC")>=0?"Cmd":"Ctrl",fi={[Xn+"-B"]:"bold",[Xn+"-I"]:"italic"},an={[Hi]:"\u6DFB\u52A0\u94FE\u63A5",[nr]:"\u6DFB\u52A0\u4EE3\u7801\u5757",[hi]:"\u6DFB\u52A0\u56FE\u7247",[Vi]:"\u6DFB\u52A0\u753B\u56FE",[Jn]:"\u63D2\u5165\u6D41\u7A0B\u56FE",[sr]:"\u6DFB\u52A0\u8868\u683C","maths-latex":"\u6570\u5B66\u56FE\u50CF","inline-latex":"LATEX\u516C\u5F0F"};var Sn=({defaultValue:be="",onChange:Ce,width:we="100%",height:kn=400,miniToolbar:Qn=!1,isFocus:ti=!1,watch:Xe,insertTemp:Dn,mode:vi="markdown",id:$n="markdown-editor-id",showResizeBar:ki=!1,noStorage:pe=!1,showNullButton:Tn=!1,showNullProgramButton:gi=!1,hidetoolBar:Oi=!1,fullScreen:bn=!1,onBlur:Mn,onCMBeforeChange:hn,onFullScreen:Ji,className:Li="",disablePaste:Si=!1,disabled:wi=!1,disabledFill:Mi=!1,placeholder:Er="",values:ir="",extraUse:tr})=>{const[gn,to]=(0,pt.useState)(null),[Qi,Or]=(0,pt.useState)(be),[Je,Un]=(0,pt.useState)(Xe),[Pi,Ni]=(0,pt.useState)(bn),[di,Ii]=(0,pt.useState)(""),[vr,yr]=(0,pt.useState)(0),[pr,wr]=(0,pt.useState)(kn),[yn,Ir]=(0,pt.useState)(!1),[mn,Zr]=(0,pt.useState)(0),[Gr,Cr]=(0,pt.useState)(0),eo=(0,pt.useRef)(),Fr=(0,pt.useRef)(),dr=(0,pt.useRef)(),Nr=(0,pt.useRef)();(0,pt.useEffect)(()=>{const Zn=window.scrollY||window.pageYOffset;Or(ir),gn==null||gn.setValue(ir),window.scrollTo(0,Zn)},[ir]),(0,pt.useEffect)(()=>{Ji==null||Ji(Pi)},[Pi]),(0,pt.useEffect)(()=>{if(eo.current){let Zn=function(Re,Nn){var bi;if(Si){Nn.preventDefault();return}const cr=Nn.clipboardData;if(cr){const Yi=cr.types.toString(),Bi=cr.items;if(Yi==="Files"||cr.types.indexOf("Files")>-1){if(Nn.preventDefault(),vi=="stex")return;try{let Sr=Bi[1];((bi=Bi[0])==null?void 0:bi.kind)==="file"&&(Sr=Bi[0]);const br=Sr.getAsFile(),ho=br.name.split(".").pop();(0,Te.I)(br,Co=>{var wa,Ye,Go;Co.id?((wa=br==null?void 0:br.type)==null?void 0:wa.indexOf("image"))>-1?jn.replaceSelection(`<img width="100%" src="/api/attachments/${Co.id}?type=${Co.content_type})" alt="" />`):((Ye=br==null?void 0:br.type)==null?void 0:Ye.indexOf("video"))>-1?jn.replaceSelection(`<video width="100%" controls src="/api/attachments/${Co.id}"></video>`):((Go=br==null?void 0:br.type)==null?void 0:Go.indexOf("pdf"))>-1?jn.replaceSelection(`<a href="/api/attachments/${Co.id}?type=${br.type}&disposition=inline" target="_blank">${br.name}</a>`):Ci.includes(ho)?jn.replaceSelection(`<a href="/api/attachments/${Co.id}?type=office&disposition=inline" target="_blank">${br.name}</a>`):jn.replaceSelection(`[${br.name}](/api/attachments/${Co.id}?type=${Co.content_type})`):(Co==null?void 0:Co.status)===401&&(document.location.href="/user/login")})}catch(Sr){ii.ZP.warning("\u8BF7\u4F7F\u7528chrome\u6D4F\u89C8\u5668\u7C98\u8D34")}return!0}else return!0}return!0};const jn=ve().fromTextArea(eo.current,{mode:vi,lineNumbers:!Qn,lineWrapping:!0,value:be,autoCloseTags:!0,autoCloseBrackets:!0});return jn.on("keyup",function(Re,Nn){Nn.keyCode===8&&(Re.getValue()==""?jn.setOption("placeholder",Er):jn.setOption("placeholder",null))}),jn.on("keydown",function(Re,Nn){if(Nn.keyCode===8){var bi=Dr(Re);bi&&Nn.preventDefault()}}),ti&&jn.focus(),jn.on("paste",Zn),wi&&jn.on("beforeChange",function(Re,Nn){(Nn.origin==="paste"||Nn.origin==="+input")&&Nn.cancel()}),to(jn),()=>{jn.off("paste",Zn)}}},[]);const Wr=(0,pt.useCallback)(()=>{if(Fr.current)try{}catch(Zn){console.log(Zn,"---- to set md editor body height")}},[pr,Fr,Pi]);(0,pt.useEffect)(()=>{function Zn(){let jn=new Me.Z(Re=>{for(let Nn of Re)(Nn.target.offsetHeight>0||Nn.target.offsetWidth>0)&&(Wr(),gn.setSize("100%","100%"),gn.refresh())});return jn.observe(eo.current.parentElement),jn}if(gn){const jn=Zn();return()=>{var Re,Nn;(Re=eo.current)!=null&&Re.parentElement&&jn.unobserve((Nn=eo.current)==null?void 0:Nn.parentElement)}}},[gn,Wr]),(0,pt.useEffect)(()=>{if(gn){let Zn=[];for(const[jn,Re]of Object.entries(fi)){let Nn={[jn]:()=>{yi(Re)}};Zn.push(Nn),gn.addKeyMap(Nn)}return()=>{for(let jn of Zn)gn.removeKeyMap(jn)}}},[gn]),(0,pt.useEffect)(()=>{bn!==Pi&&Ni(bn)},[bn]),(0,_i.Z)(()=>{if(!pe&&vr>0){let Zn=new Date().getTime(),jn=window.sessionStorage.getItem($n);Zn>=vr+Ei&&(!jn||jn!==Qi)&&(window.sessionStorage.setItem($n,Qi),Ir(!0))}},Ei),(0,pt.useEffect)(()=>{Un(Xe)},[gn,Xe]),(0,pt.useEffect)(()=>{gn&&ti&&gn.focus()},[gn,ti]),(0,pt.useEffect)(()=>{if(Je&&gn){let Zn=function(Re){let Nn=Re.target;if(Nr.current){let bi=Nn.scrollTop/Nn.scrollHeight;Nr.current.scrollTop=Nr.current.scrollHeight*bi}};const jn=gn.getScrollerElement();return jn.addEventListener("scroll",Zn),()=>{jn.removeEventListener("scroll",Zn)}}},[gn,Je]),(0,pt.useEffect)(()=>{if(gn&&hn){let Zn=function(jn,Re){hn(jn,Re)};return gn.on("beforeChange",Zn),()=>{gn.off("beforeChange",Zn)}}},[gn,hn]),(0,pt.useEffect)(()=>{if(gn&&Mn){let Zn=function(){Mn(gn.getValue())};return gn.on("blur",Zn),()=>{gn.off("blur",Zn)}}},[gn,Mn]);function Dr(Zn,jn){var Re=Zn.getDoc(),Nn=Re.getCursor(),bi=Re.getLine(Nn.line),cr=bi.charAt(Nn.ch-1),Yi=bi.lastIndexOf("@\u2581@",Nn.ch),Bi=bi.lastIndexOf("@\u2581\u2581@",Nn.ch),Sr=Yi>Bi?Yi:Bi,br=Yi>Bi?3:4;if(Rn.indexOf(cr)===-1)return null;if(console.log("change1:",jn,Zn,bi,Nn,Sr,Yi,Bi,cr),Sr>=0&&Nn.ch-Sr<5){var ho=Sr+br;return Re.replaceRange("",{line:Nn.line,ch:Sr},{line:Nn.line,ch:ho}),{line:Nn.line,ch:ho}}return null}(0,pt.useEffect)(()=>{if(gn){let Zn=function(jn,Re){const Nn=jn.getValue();Or(Nn),yr(new Date().getTime()),jn.getScrollerElement().dispatchEvent(new CustomEvent("scroll")),Ce&&(gi?Ce(Nn,$t(Nn)):Ce(Nn))};return gn.on("change",Zn),()=>{gn.off("change",Zn)}}},[gn,Ce]),(0,pt.useEffect)(()=>{if(gn)if(be==null)gn.setValue(""),Or("");else{const Zn=window.scrollY||window.pageYOffset;be!==gn.getValue()&&(gn.setValue(be),Or(be),gn.setCursor(wi?1:gn.lineCount(),0),window.scrollTo(0,Zn))}},[gn,be]);const yi=(0,pt.useCallback)(Zn=>{const jn=gn.getCursor(),Re=gn.getSelection();let Nn=Re.split(`
`);switch(Zn){case"bold":return gn.replaceSelection("**"+Re+"**"),Re===""&&gn.setCursor(jn.line,jn.ch+2),gn.focus();case"italic":return gn.replaceSelection("*"+Re+"*"),Re===""&&gn.setCursor(jn.line,jn.ch+1),gn.focus();case"code":return gn.replaceSelection("`"+Re+"`"),Re===""&&gn.setCursor(jn.line,jn.ch+1),gn.focus();case"inline-latex":return Ii("inline-latex"),gn.focus();case"latex":return gn.replaceSelection("```latex\n"+Re+"\n```"),gn.setCursor(jn.line+1,Re.length+1),gn.focus();case"line-break":return gn.replaceSelection(`<br/>
`),gn.focus();case"list-ul":return Re===""?gn.replaceSelection("- "+Re):gn.replaceSelection(Nn.map(bi=>bi===""?"":`- ${bi}`).join(`
`)),gn.focus();case"list-ol":return Re===""?gn.replaceSelection("1. "+Re):gn.replaceSelection(Nn.map((bi,cr)=>bi===""?"":`${cr+1}. ${bi}`).join(`
`)),gn.focus();case"add-null-ch":return Re===""&&gn.setCursor(jn.line,jn.ch),gn.replaceSelection(Qr),gn.focus();case"add-signal":return Re===""&&gn.setCursor(jn.line,jn.ch),gn.replaceSelection(Ct),gn.focus();case"add-multiple":return Re===""&&gn.setCursor(jn.line,jn.ch),gn.replaceSelection(Rn),gn.focus();case"inster-template-1":return Re===""&&gn.setCursor(jn.line,jn.ch),gn.replaceSelection(zi),gn.focus();case"eraser":return gn.setValue(""),gn.focus();case"trigger-watch":return Un(!Je),gn.focus();case"trigger-full-screen":return Ni(!Pi),gn.focus();case Hi:Ii(Hi);return;case nr:Ii(nr);return;case hi:Ii(hi);return;case Vi:Ii(Vi);return;case"maths-latex":Ii("maths-latex");return;case Jn:Ii(Jn);return;case sr:Ii(sr);return;default:throw new Error}},[gn,Je,Pi]),Gt=(0,pt.useCallback)((Zn,jn)=>{var Re,Nn,bi,cr,Yi,Bi;switch(Ii(""),di){case Hi:const{title:wa,link:Ye}=Zn;return gn.replaceSelection(`[${wa}](${Ye})`),gn.focus();case nr:const{language:Go,content:Nl}=Zn;return gn.replaceSelection(["```"+Go,Nl,"```"].join(`
`)),gn.focus();case"maths-latex":for(var Sr=atob(Zn),br=new Uint8Array(Sr.length),ho=0;ho<Sr.length;ho++)br[ho]=Sr.charCodeAt(ho);var Co=new Blob([br],{type:"image/png"});(0,Te.I)(Co,Ho=>{Ho.id?gn.replaceSelection(`![,](/api/attachments/${Ho.id}?type=${Ho.content_type})`):(Ho==null?void 0:Ho.status)===401&&(document.location.href="/user/login")});break;case"inline-latex":gn.replaceSelection("`$$"+Zn+"$$`");break;case hi:case Vi:case er:const{src:Ss,alt:rl}=Zn,yo=jn,Tu=(bi=(Nn=(Re=yo==null?void 0:yo.name)==null?void 0:Re.split("."))==null?void 0:Nn.pop)==null?void 0:bi.call(Nn);return((cr=yo==null?void 0:yo.type)==null?void 0:cr.indexOf("image"))>-1||!(yo!=null&&yo.type)?yo!=null&&yo.align||yo!=null&&yo.width?gn.replaceSelection(`<p style="text-align:${yo.align||"initial"}"><img width="${yo.width?yo.width+"%":"initial"}" src="${Ss}" alt="${rl||""}" /></p>`):gn.replaceSelection(`<img width="100%" src="${Ss}" alt="${rl||""}" />`):((Yi=yo==null?void 0:yo.type)==null?void 0:Yi.indexOf("video"))>-1?gn.replaceSelection(`<video width="100%" controls src="${Ss}"></video>`):((Bi=yo==null?void 0:yo.type)==null?void 0:Bi.indexOf("pdf"))>-1?gn.replaceSelection(`<a href="${Ss}?type=${yo.type}&disposition=inline" target="_blank">${yo.name}</a>`):Ci.includes(Tu)?gn.replaceSelection(`<a href="${Ss}?type=office&disposition=inline" target="_blank">${yo.name}</a>`):gn.replaceSelection(`[${yo.name}](${Ss})`),gn.focus();case sr:const{row:ao,col:Ar,align:Vr}=Zn;let Ro=`
`;for(let Ho=0;Ho<ao;Ho++){let va=[],Po=[];for(let Di=0;Di<Ar;Di++)Ho===1&&Po.push(or[Vr]),va.push(" ");Ho===1&&(Ro+=`| ${Po.join(" | ")} |
`),Ro+=`| ${va.join(Ar===1?"":" | ")} |
`}return gn.replaceSelection(Ro+`
`),gn.focus();default:throw new Error}},[gn,di]),Fo=(0,pt.useMemo)(()=>{switch(di){case Hi:return pt.createElement(sn,{callback:Gt,onCancel:vo});case nr:return pt.createElement(cn.Z,{callback:Gt,onCancel:vo});case hi:return pt.createElement(Te.Z,{callback:Gt,onCancel:vo});case Jn:return pt.createElement($e,{callback:Gt,onCancel:vo});case sr:return pt.createElement(It,{callback:Gt,onCancel:vo});case"maths-latex":return pt.createElement(ni,{showSaveButton:!0,callback:Gt});case"inline-latex":return pt.createElement(ei.Z,{showSaveButton:!0,callback:Gt});default:return null}},[di]);function vo(){Ii("")}(0,pt.useEffect)(()=>{if(dr.current){let Zn=function(Yi){bi=!0,cr=Yi.pageY},jn=function(){bi=!1},Re=function(Yi){if(bi){let Bi=Yi.pageY-cr;Bi<0&&(Bi=0),Bi>300&&(Bi=300);let Sr=kn+Bi+"px";wr(Sr)}},Nn=dr.current,bi=!1,cr=0;return Nn.addEventListener("mousedown",Zn),document.addEventListener("mousemove",Re),document.addEventListener("mouseup",jn),()=>{Nn.removeEventListener("mousedown",Zn),document.removeEventListener("mousemove",Re),document.removeEventListener("mouseup",jn)}}},[gn,dr]),(0,pt.useEffect)(()=>{wr(kn)},[kn]);const Oo=ze(we),ua=ze(pr),uo={width:Oo,height:ua},Qo=(0,pt.useMemo)(()=>{if(vr){let Zn=new Date(vr),jn=Zn.getHours(),Re=Zn.getMinutes(),Nn=Zn.getSeconds();return jn=jn<10?"0"+jn:jn,Re=Re<10?"0"+Re:Re,Nn=Nn<10?"0"+Nn:Nn,`${jn}:${Re}:${Nn}`}return 0},[vr]),$t=Zn=>{const jn=[];if(gi){let Re=-1;Zn=Zn.replace(/(@▁▁@|@▁@)/g,function(Nn,bi,cr){jn.push({multiLine:Nn!==Ct})})}return jn};function Wn(){window.sessionStorage.removeItem($n),Ir(!1),yr(0)}function In(){Ir(!1),yr(0),gn.setValue(window.sessionStorage.getItem($n))}(0,pt.useEffect)(()=>{an[di]&&di!==Vi&&di!==Jn&&setTimeout(()=>{const Zn=document.getElementsByClassName("markdown-popup-form")[0],jn=window.innerWidth/2-Zn.offsetWidth/2,Re=window.innerHeight/2-Zn.offsetHeight/2;Zr(jn),Cr(Re)},0)},[di]);const si=Zn=>{Zn.preventDefault();const jn=Zn.clientX-mn,Re=Zn.clientY-Gr;document.body.onmousemove=Nn=>{let bi=Nn.clientX-jn,cr=Nn.clientY-Re;const Yi=document.getElementsByClassName("markdown-popup-form")[0],Bi=window.innerWidth-Yi.offsetWidth,Sr=window.innerHeight-Yi.offsetHeight;bi=Math.max(0,Math.min(bi,Bi)),cr=Math.max(0,Math.min(cr,Sr)),Ln(Nn.clientX,Nn.clientY,jn,Re)&&(Zr(bi),Cr(cr))},document.body.onmouseup=function(){document.body.onmousemove=null}},Ln=(Zn,jn,Re,Nn)=>{const bi=document.body.clientHeight,cr=document.body.clientWidth;return Zn<20&&Re>Zn||Zn>cr-20&&Re<Zn||jn<20&&Nn>jn||jn>bi-20&&Nn<jn?(document.body.onmousemove=null,document.body.onmouseup=null,!1):!0};return pt.createElement(pt.Fragment,null,pt.createElement("div",{className:"markdown-editor-wrapper",ref:Fr},pt.createElement("div",{className:`markdown-editor-container ${Li} ${Je?"on-preview":""} ${Qn?"mini":""} ${Pi?"full-screen":""}`,style:uo},pt.createElement(re,{insertTemp:Dn,watch:Je,fullScreen:Pi,showNullButton:Tn,showNullProgramButton:gi,onActionCallback:yi,hidetoolBar:Oi,extraUse:tr}),pt.createElement("div",{className:"markdown-editor-body"},pt.createElement("div",{className:"codemirror-container"},pt.createElement("textarea",{ref:eo,placeholder:Er})),Je?pt.createElement("div",{ref:Nr,className:"preview-container"},vi==="stex"&&pt.createElement(Ne,{value:Qi}),vi!=="stex"&&pt.createElement(he.Z,{disabledFill:Mi,showProgramFill:gi,value:Qi})):null))),ki?pt.createElement("a",{ref:dr,className:"editor-resize"}):null,di===Vi&&pt.createElement(zn,{callback:Gt,onCancel:vo}),di===Jn&&pt.createElement($e,{callback:Gt,onCancel:vo}),pt.createElement(le.Z,null,an[di]&&di!==Vi&&di!==Jn?pt.createElement(en.default,{maskClosable:!1,centered:!0,style:{position:"absolute",left:mn,top:Gr},title:pt.createElement("div",{style:{cursor:"move"},onMouseDown:si},an[di]),open:!0,onCancel:vo,footer:null,destroyOnClose:!0,width:di===Jn?"1200px":null,height:di===Jn?"80vh":null,className:"markdown-popup-form"},Fo):null))}},28451:function(fn,Bn,Ft){"use strict";Ft.d(Bn,{Z:function(){return zt},I:function(){return re}});var pt=Ft(78241),Ht=Ft(8591),ve=Ft(92832),Me=Ft(81327),Pe=Ft(5871),Ae=Ft(5112),ee=Ft(3113),Fe=Ft(77903),ye=Ft(59301),de=Ft(59301),he=Object.defineProperty,Ne=Object.defineProperties,He=Object.getOwnPropertyDescriptors,kt=Object.getOwnPropertySymbols,nt=Object.prototype.hasOwnProperty,et=Object.prototype.propertyIsEnumerable,ht=(le,ae,je)=>ae in le?he(le,ae,{enumerable:!0,configurable:!0,writable:!0,value:je}):le[ae]=je,lt=(le,ae)=>{for(var je in ae||(ae={}))nt.call(ae,je)&&ht(le,je,ae[je]);if(kt)for(var je of kt(ae))et.call(ae,je)&&ht(le,je,ae[je]);return le},gt=(le,ae)=>Ne(le,He(ae));const{useForm:yt}=pt.default,Lt={width:280,marginRight:10},Dt={labelCol:{span:5},wrapperCol:{span:19}};var zt=({callback:le,onCancel:ae})=>{const[je]=yt();let ne=(0,ye.useRef)();function Le(ge){ne.current.width=je.getFieldValue("width"),ne.current.align=je.getFieldValue("align"),le(ge,ne.current)}function ue(ge,Ue){if(ge.status===-1){Ht.ZP.error(ge.message);return}je.setFieldsValue({src:`/api/attachments/${ge.id}`,type:Ue.type})}function Ee(ge){let Ue=ge.target.files[0];ne.current=Ue,re(Ue,ue)}return de.createElement(pt.default,gt(lt({form:je},Dt),{className:"upload-image-panel",onFinish:Le,style:{width:470,overflow:"hidden"}}),de.createElement(pt.default.Item,{label:"\u56FE\u7247\u5730\u5740",required:!0},de.createElement("div",{className:"flex-container"},de.createElement(pt.default.Item,{noStyle:!0,name:"src",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u56FE\u7247\u5730\u5740"}]},de.createElement(ve.default,{style:Lt})),de.createElement(Xt,{onFileChange:Ee}))),de.createElement(pt.default.Item,{label:"\u56FE\u7247\u63CF\u8FF0",name:"alt"},de.createElement(ve.default,{style:{width:264}})),de.createElement(pt.default.Item,{label:"\u56FE\u7247\u5BBD\u5EA6",name:"width"},de.createElement(Me.Z,null,de.createElement(pt.default.Item,{name:"width",style:{margin:0}},de.createElement(Pe.Z,{style:{width:264}})),de.createElement("span",{className:"ml8"},"%"))),de.createElement(pt.default.Item,{label:"\u5BF9\u9F50\u65B9\u5F0F",name:"align"},de.createElement(Ae.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"}]})),de.createElement("aside",null,de.createElement(pt.default.Item,{style:{textAlign:"right",position:"relative",right:-98}},de.createElement(ee.ZP,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),de.createElement(ee.ZP,{type:"default",onClick:ae},"\u53D6\u6D88"))))};function Xt({onFileChange:le}){return de.createElement("label",{className:"upload-button",style:{cursor:"pointer"}},"\u672C\u5730\u4E0A\u4F20",de.createElement("input",{type:"file",onChange:le}))}function re(le,ae){if(!le)throw new String("\u6CA1\u6709\u6587\u4EF6");let je=new FormData;je.append("editormd-image-file",le),je.append("file_param_name","editormd-image-file"),je.append("byxhr","true");var ne=new window.XMLHttpRequest;ne.withCredentials=!0,ne.addEventListener("load",function(Le){ae(JSON.parse(Le.target.responseText),le)},!1),ne.addEventListener("error",function(Le){console.error(Le)},!1),ne.open("POST",`${Fe.KI}/api/attachments.json`),ne.send(je)}},79346:function(fn,Bn,Ft){"use strict";Ft.d(Bn,{Z:function(){return ve}});var pt=Ft(59301),Ht=Ft(4676);class ve extends pt.Component{constructor(Pe){super(Pe);const Ae=window.document;this.node=Ae.createElement("div"),Ae.body.appendChild(this.node)}render(){const{children:Pe}=this.props;return(0,Ht.createPortal)(Pe,this.node)}componentWillUnmount(){window.document.body.removeChild(this.node)}}},23954:function(fn,Bn,Ft){"use strict";Ft.d(Bn,{SV:function(){return Hn},ZP:function(){return Ze}});var pt=Ft(59301),Ht=Ft(76374);const ve={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"]},Me={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"]},Pe={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(`
`)}]},Ae={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(`
`)}]},ee={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 Fe=Ft(53184),ye=Ft.n(Fe),de=Object.defineProperty,he=Object.defineProperties,Ne=Object.getOwnPropertyDescriptors,He=Object.getOwnPropertySymbols,kt=Object.prototype.hasOwnProperty,nt=Object.prototype.propertyIsEnumerable,et=(qe,$e,Pn)=>$e in qe?de(qe,$e,{enumerable:!0,configurable:!0,writable:!0,value:Pn}):qe[$e]=Pn,ht=(qe,$e)=>{for(var Pn in $e||($e={}))kt.call($e,Pn)&&et(qe,Pn,$e[Pn]);if(He)for(var Pn of He($e))nt.call($e,Pn)&&et(qe,Pn,$e[Pn]);return qe},lt=(qe,$e)=>he(qe,Ne($e)),gt=(qe,$e,Pn)=>new Promise((Rt,bt)=>{var Pt=Nt=>{try{Yt(Pn.next(Nt))}catch(xe){bt(xe)}},It=Nt=>{try{Yt(Pn.throw(Nt))}catch(xe){bt(xe)}},Yt=Nt=>Nt.done?Rt(Nt.value):Promise.resolve(Nt.value).then(Pt,It);Yt((Pn=Pn.apply(qe,$e)).next())});const yt={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"]}},Lt=(qe,$e)=>$e.map(Pn=>({label:Pn,kind:qe.languages.CompletionItemKind.Keyword,insertText:Pn})),Dt=qe=>Object.keys(yt.tables).map($e=>({label:$e,kind:qe.languages.CompletionItemKind.Variable,insertText:$e})),zt=(qe,$e)=>{const Pn=yt.tables[qe];return Pn?Pn.map(Rt=>({label:Rt,kind:$e.languages.CompletionItemKind.Field,insertText:Rt})):[]};function Xt(qe,$e,Pn,Rt,bt){let Pt=$e.getWordUntilPosition(Pn),It={startLineNumber:Pn.lineNumber,endLineNumber:Pn.lineNumber,startColumn:Pt.startColumn,endColumn:Pt.endColumn},Yt=Rt.map(Nt=>({label:Nt,kind:qe.languages.CompletionItemKind.Keyword,insertText:Nt,insertTextRules:qe.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:It}));return bt.map(Nt=>{Yt.push(lt(ht({},Nt),{range:It}))}),Yt}var re=qe=>{yt.languages.map(bt=>(qe.languages.registerDocumentFormattingEditProvider(bt,{provideDocumentFormattingEdits(Pt,It,Yt){return gt(this,null,function*(){const Nt=ye()(Pt.getValue(),{indent_size:"2",indent_char:" ",max_preserve_newlines:"2",preserve_newlines:!0,keep_array_indentation:!0,break_chained_methods:!1,indent_scripts:"normal",brace_style:"collapse",space_before_conditional:!0,unescape_strings:!1,jslint_happy:!1,end_with_newline:!0,wrap_line_length:"0",indent_inner_html:!1,comma_first:!1,e4x:!1,indent_empty_lines:!1});return[{range:Pt.getFullModelRange(),text:Nt}]})}}),bt));const $e=Pe.quickKey.map(bt=>({label:bt.label,kind:qe.languages.CompletionItemKind.Method,insertText:bt.content,insertTextRules:qe.languages.CompletionItemInsertTextRule.InsertAsSnippet})),Pn=Ae.quickKey.map(bt=>({label:bt.label,kind:qe.languages.CompletionItemKind.Method,insertText:bt.content,insertTextRules:qe.languages.CompletionItemInsertTextRule.InsertAsSnippet})),Rt=Me.quickKey.map(bt=>({label:bt.label,kind:qe.languages.CompletionItemKind.Method,insertText:bt.content,insertTextRules:qe.languages.CompletionItemInsertTextRule.InsertAsSnippet}));qe.languages.registerCompletionItemProvider("cpp",{provideCompletionItems:function(bt,Pt){var It=bt.getWordUntilPosition(Pt),Yt={startLineNumber:Pt.lineNumber,endLineNumber:Pt.lineNumber,startColumn:It.startColumn,endColumn:It.endColumn},Nt=bt.getLineContent(Pt.lineNumber).substring(It.startColumn-2,It.endColumn);return{suggestions:[...Pe.keywords.map(xe=>({label:xe,kind:qe.languages.CompletionItemKind.Function,documentation:xe,insertText:xe,insertTextRules:qe.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:Yt})),...Pe.quickKey.map(xe=>({label:xe.label,kind:qe.languages.CompletionItemKind.Function,documentation:xe.content,insertText:Nt.startsWith("#")?xe.content.replace(/#/,""):xe.content,insertTextRules:qe.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:Yt}))]}}}),qe.languages.registerCompletionItemProvider("c",{provideCompletionItems:function(bt,Pt){var It=bt.getWordUntilPosition(Pt),Yt={startLineNumber:Pt.lineNumber,endLineNumber:Pt.lineNumber,startColumn:It.startColumn,endColumn:It.endColumn};return{suggestions:[...ve.keywords.map(Nt=>({label:Nt,kind:qe.languages.CompletionItemKind.Function,documentation:Nt,insertText:Nt,insertTextRules:qe.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:Yt}))]}}}),qe.languages.registerCompletionItemProvider("java",{provideCompletionItems:function(bt,Pt){var It=bt.getWordUntilPosition(Pt),Yt={startLineNumber:Pt.lineNumber,endLineNumber:Pt.lineNumber,startColumn:It.startColumn,endColumn:It.endColumn},Nt=bt.getLineContent(Pt.lineNumber).substring(It.startColumn-2,It.endColumn);return{suggestions:[...Me.keywords.map(xe=>({label:xe,kind:qe.languages.CompletionItemKind.Function,documentation:xe,insertText:xe,insertTextRules:qe.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:Yt})),...Me.quickKey.map(xe=>({label:xe.label,kind:qe.languages.CompletionItemKind.Function,documentation:xe.content,insertText:Nt.startsWith("#")?xe.content.replace(/#/,""):xe.content,insertTextRules:qe.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:Yt}))]}}}),qe.languages.registerCompletionItemProvider("scala",{provideCompletionItems:function(bt,Pt){var It=bt.getWordUntilPosition(Pt),Yt={startLineNumber:Pt.lineNumber,endLineNumber:Pt.lineNumber,startColumn:It.startColumn,endColumn:It.endColumn},Nt=bt.getLineContent(Pt.lineNumber).substring(It.startColumn-2,It.endColumn);return{suggestions:[...ee.keywords.map(xe=>({label:xe,kind:qe.languages.CompletionItemKind.Function,documentation:xe,insertText:xe,insertTextRules:qe.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:Yt})),...ee.quickKey.map(xe=>({label:xe.label,kind:qe.languages.CompletionItemKind.Function,documentation:xe.content,insertText:Nt.startsWith("#")?xe.content.replace(/#/,""):xe.content,insertTextRules:qe.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:Yt}))]}}}),qe.languages.registerCompletionItemProvider("python",{provideCompletionItems:function(bt,Pt){var It=bt.getWordUntilPosition(Pt),Yt={startLineNumber:Pt.lineNumber,endLineNumber:Pt.lineNumber,startColumn:It.startColumn,endColumn:It.endColumn},Nt=bt.getLineContent(Pt.lineNumber).substring(It.startColumn-2,It.endColumn);return{suggestions:[...Ae.keywords.map(xe=>({label:xe,kind:qe.languages.CompletionItemKind.Function,documentation:xe,insertText:xe,insertTextRules:qe.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:Yt})),...Ae.quickKey.map(xe=>({label:xe.label,kind:qe.languages.CompletionItemKind.Function,documentation:xe.content,insertText:Nt.startsWith("#")?xe.content.replace(/#/,""):xe.content,insertTextRules:qe.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:Yt}))]}}})};const le="\u8BE5\u4EFB\u52A1\u5173\u5361\u8BBE\u7F6E\u4E86\u7981\u6B62\u590D\u5236\u7C98\u8D34\uFF0C\u8BF7\u624B\u52A8\u8F93\u5165\u4EE3\u7801\u3002";var ae=Object.defineProperty,je=(qe,$e,Pn)=>$e in qe?ae(qe,$e,{enumerable:!0,configurable:!0,writable:!0,value:Pn}):qe[$e]=Pn,ne=(qe,$e,Pn)=>je(qe,typeof $e!="symbol"?$e+"":$e,Pn);const Le=class mx{constructor($e,Pn,Rt){this.placeholder=$e,this.editor=Pn,this.monaco=Rt,Pn.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)}};ne(Le,"ID","editor.widget.placeholderHint");var Ee=Le,ge=Ft(96236),Ue=Ft(8591),nn=Ft(6848),_e=Ft(89392),qt=Ft(34604),Jt=Ft(56102),De=Object.defineProperty,sn=Object.defineProperties,cn=Object.getOwnPropertyDescriptors,Te=Object.getOwnPropertySymbols,en=Object.prototype.hasOwnProperty,Cn=Object.prototype.propertyIsEnumerable,Gn=(qe,$e,Pn)=>$e in qe?De(qe,$e,{enumerable:!0,configurable:!0,writable:!0,value:Pn}):qe[$e]=Pn,vn=(qe,$e)=>{for(var Pn in $e||($e={}))en.call($e,Pn)&&Gn(qe,Pn,$e[Pn]);if(Te)for(var Pn of Te($e))Cn.call($e,Pn)&&Gn(qe,Pn,$e[Pn]);return qe},zn=(qe,$e)=>sn(qe,cn($e)),me=(qe,$e)=>{var Pn={};for(var Rt in qe)en.call(qe,Rt)&&$e.indexOf(Rt)<0&&(Pn[Rt]=qe[Rt]);if(qe!=null&&Te)for(var Rt of Te(qe))$e.indexOf(Rt)<0&&Cn.call(qe,Rt)&&(Pn[Rt]=qe[Rt]);return Pn},An=(qe,$e,Pn)=>new Promise((Rt,bt)=>{var Pt=Nt=>{try{Yt(Pn.next(Nt))}catch(xe){bt(xe)}},It=Nt=>{try{Yt(Pn.throw(Nt))}catch(xe){bt(xe)}},Yt=Nt=>Nt.done?Rt(Nt.value):Promise.resolve(Nt.value).then(Pt,It);Yt((Pn=Pn.apply(qe,$e)).next())});function ui(qe){return/^\d+$/.test(qe)?`${qe}px`:qe}function un(){}let ln=!1;const oi={"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 xn(qe=[]){let $e=qe;if(Array.isArray(qe)){for(let Pn=0;Pn<qe.length;Pn++){let Rt=oi[qe[Pn]];if(Rt)return Rt}return $e[0]}return oi[$e]||$e}let Ie=null;var Ze=qe=>{var $e=qe,{width:Pn="100%",height:Rt="100%",value:bt,language:Pt="javascript",style:It={},options:Yt={},overrideServices:Nt={},theme:xe="vs-dark",onEditBlur:_n,isCopy:ni=!1,onSave:ei,autoHeight:ii=!1,forbidCopy:Hi=!1,onChange:hi=un,editorDidMount:Jn=un,onFocus:Vi=un,onBreakPoint:er=un,breakPointValue:nr=[],filename:sr="educoder.txt",errorLine:kr,errorContent:or="",highlightLine:_i,openBreakPoint:gr=!1,placeholder:Mr="",showMiniMap:Ei=!0}=$e,Qr=me($e,["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 Rn=(0,pt.useRef)(),Ct=(0,pt.useRef)({}),zi=(0,pt.useRef)(),Ci=(0,pt.useRef)(),ze=(0,pt.useRef)([]),Yn=(0,pt.useRef)(!1),Xn=(0,pt.useRef)(),fi=(0,pt.useRef)(),an=(0,pt.useRef)(!1),[Sn,be]=(0,pt.useState)(!1);function Ce(){let Mn;return Rn.current&&(Mn=new Ht.Z(hn=>{for(let Ji of hn)(Ji.target.offsetHeight>0||Ji.target.offsetWidth>0)&&Ct.current.instance.layout()}),Mn.observe(Rn.current)),Mn}function we(){Ue.ZP.warning({content:decodeURIComponent(le),key:"monaco-editor-tip"})}const kn=()=>{let Mn=Ct.current.instance;if(bt!=null&&Mn&&Sn){const hn=Mn.getModel();hn&&bt!==hn.getValue()&&(ln=!0,hn.setValue(bt),Mn.layout(),ln=!1)}};(0,pt.useEffect)(()=>{const Mn=qt.Z.subscribe("formatDocument",hn=>{var Ji;let Li=Ct.current.instance;(Ji=Li==null?void 0:Li.getAction)==null||Ji.call(Li,"editor.action.formatDocument").run()});return window.updateMonacoValue=hn=>{hi(hn)},Mn},[]),(0,pt.useEffect)(()=>{var Mn;let hn=Ct.current.instance;Ci.current&&clearTimeout(Ci.current),Ci.current=setTimeout(()=>{kn()},500),bt&&(bt!=null&&bt.length)&&((Mn=hn==null?void 0:hn.updateOptions)==null||Mn.call(hn,{lineNumbersMinChars:Math.max(Math.floor(Math.log10(bt.split(/\r\n|\r|\n/g).length))+3,5)}))},[bt,Sn,Ct.current]),(0,pt.useEffect)(()=>{if(kr&&Ct.current&&Ct.current.instance){let hn=Ct.current.instance;hn.changeViewZones(function(Ji){var Li=document.createElement("div");Li.style.padding="10px 20px",Li.style.width="calc(100% - 20px)",Li.className="my-error-line-wrp",Li.innerHTML=or,Ji.addZone({afterLineNumber:kr||11,heightInLines:3,domNode:Li})});var Mn={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}};hn.addOverlayWidget(Mn),hn.revealPositionInCenter({lineNumber:20,column:1})}},[kr,Ct.current,Sn]);const Qn=(Mn="",hn)=>{if(!Mn||Mn.trim()==="")return!0;const Li=Ct.current.instance.getModel().getLineTokens(hn);let Si=!1;for(let wi=0;wi<2;wi++)Li.getStandardTokenType(wi)===1&&(Si=!0);return Si};(0,pt.useEffect)(()=>{var Mn;const hn=(Mn=Ct.current)==null?void 0:Mn.instance;if(hn&&Sn&&Hi){const Ji=hn.onDidBlurEditorWidget(()=>{an.current=!1}),Li=hn.onDidFocusEditorText(()=>{an.current=!0});return()=>{Ji.dispose(),Li.dispose()}}},[Ct.current,Sn,Hi]),(0,pt.useEffect)(()=>{var Mn;if((Mn=Ct.current)!=null&&Mn.instance&&Sn&&gr){let hn=Ct.current.instance,Ji=hn.getModel();if(!Ji)return;(()=>{var Je;let Un=[],Pi=[];const Ni=Ji.getAllDecorations();for(let Ii of Ni)Ii.options.className==="highlighted-line"&&(Un.push((Je=Ii==null?void 0:Ii.range)==null?void 0:Je.startLineNumber),Pi.push(Ii==null?void 0:Ii.id));if(_i===Un[0])return;Ji.deltaDecorations(Pi,[]);const di=Ji.getLineCount();_i&&_i<=di&&(hn.deltaDecorations([],[{range:new Ie.Range(_i,1,_i,Ji.getLineMaxColumn(_i)),options:{isWholeLine:!0,className:"highlighted-line"}}]),hn.revealLineInCenter(_i))})();const Si=(Je=!1)=>{var Un;let Pi=[],Ni=[];const di=Ji.getAllDecorations();for(let Ii of di)Ii.options.linesDecorationsClassName==="breakpoints-select"&&(Pi.push((Un=Ii==null?void 0:Ii.range)==null?void 0:Un.startLineNumber),Ni.push(Ii==null?void 0:Ii.id));if(Je)return{lines:Pi,ids:Ni};er(Pi)},wi=Je=>An(void 0,null,function*(){let Un={range:new Ie.Range(Je,1,Je,1),options:{isWholeLine:!1,linesDecorationsClassName:"breakpoints-select"}};yield Ji.deltaDecorations([],[Un]),Si()}),Mi=Je=>An(void 0,null,function*(){let Un=[];const Pi=hn.getLineDecorations(Je);for(let Ni of Pi)Ni.options.linesDecorationsClassName==="breakpoints-select"&&Un.push(Ni.id);yield Ji.deltaDecorations(Un,[]),Si()}),Er=Je=>{let Un=hn.getLineDecorations(Je);for(let Pi of Un)if(Pi.options.linesDecorationsClassName==="breakpoints-select")return!0;return!1};if(!(0,_e.isEqual)(nr,Si(!0).lines)){Ji.deltaDecorations(Si(!0).ids,[]);const Je=nr.map(Un=>({range:new Ie.Range(Un,1,Un,1),options:{isWholeLine:!1,linesDecorationsClassName:"breakpoints-select"}}));Ji.deltaDecorations([],Je)}const ir=hn.onDidChangeModelContent(Je=>{let Un=hn.getPosition();if(Un){let Pi=Un.lineNumber;clearTimeout(fi.current),fi.current=setTimeout(()=>{Qn(Ji.getLineContent(Pi),Pi)?Mi(Pi):Er(Pi)?(Mi(Pi),wi(Pi)):Si()},100)}}),tr=hn.onMouseDown(Je=>{var Un,Pi,Ni;if(Je.target.detail&&((Ni=(Pi=(Un=Je.target)==null?void 0:Un.element)==null?void 0:Pi.className)!=null&&Ni.includes("line-numbers"))){let di=Je.target.position.lineNumber;if(Qn(Ji.getLineContent(di),di))return;Er(di)?Mi(di):wi(di)}}),gn=Je=>{let Un={range:new Ie.Range(Je,1,Je,1),options:{isWholeLine:!1,linesDecorationsClassName:"breakpoints-fake"}};ze.current=hn.deltaDecorations(ze.current,[Un])},to=()=>{ze.current=hn.deltaDecorations(ze.current,[])},Qi=hn.onMouseMove(Je=>{var Un,Pi,Ni;if(to(),Je.target.detail&&((Ni=(Pi=(Un=Je.target)==null?void 0:Un.element)==null?void 0:Pi.className)!=null&&Ni.includes("line-numbers"))){let di=Je.target.position.lineNumber;if(Qn(Ji.getLineContent(di),di))return;gn(di)}}),Or=hn.onMouseLeave(()=>{to()});return()=>{ir.dispose(),tr.dispose(),Qi.dispose(),Or.dispose()}}},[Ct.current,Sn,nr,_i,gr,Pt]),(0,pt.useEffect)(()=>{var Mn;(Mn=Ct.current)!=null&&Mn.instance&&gr&&Ct.current.instance.setPosition({lineNumber:0,column:0})},[_i]);function ti(){let Mn=Ct.current.instance;if(Mn){const hn=Mn.getSelection(),Ji=Ct.current.pastePos||{},Li=new Ie.Range(Ji.startLineNumber||hn.endLineNumber,Ji.startColumn||hn.endColumn,Ji.endLineNumber||hn.endLineNumber,Ji.endColumn||hn.endColumn);setTimeout(()=>{Mn.executeEdits("",[{range:Li,text:""}])},300)}}function Xe(Mn){(window.navigator.platform.match("Mac")?Mn.metaKey:Mn.ctrlKey)&&Mn.keyCode==83&&(Mn.preventDefault(),ei())}const Dn=()=>{if(ii&&Ct.current.instance){const Mn=Ct.current.instance.getContentHeight();Oi(Mn<Rt?Rt:Mn)}else Oi(Rt)};function vi(Mn){var hn=document.createEvent("MouseEvents");hn.initMouseEvent("click",!0,!1,window,0,0,0,0,0,!1,!1,!1,!1,0,null),Mn.dispatchEvent(hn)}const $n=Mn=>{if(!an.current)return;const{keyCode:hn,ctrlKey:Ji,metaKey:Li,target:Si,type:wi}=Mn;return(wi==="paste"||(hn===67||hn===86)&&(Li||Ji))&&Si.nodeName==="TEXTAREA"&&(we(),Mn.preventDefault()),!1};function ki(Mn,hn){var Ji=window.URL||window.webkitURL||window,Li=new Blob([hn]),Si=document.createElementNS("http://www.w3.org/1999/xhtml","a");Si.href=Ji.createObjectURL(Li),Si.download=Mn,vi(Si)}(0,pt.useEffect)(()=>{Dn()},[Dn]),(0,pt.useEffect)(()=>{Rn.current&&!Sn&&Promise.all([Ft.e(8909),Ft.e(3267)]).then(Ft.bind(Ft,71448)).then(Mn=>{try{Ie=Mn,Ct.current.instance=Ie.editor.create(Rn.current,{value:bt,language:xn(Pt),theme:xe,requireConfig:{"vs/nls":{availableLanguages:{"*":"zh-cn"}}},wordWrap:!0,autoIndent:!0,contextmenu:!0,formatOnType:!0,minimap:{enabled:Ei||!1}},Nt);const hn=Ct.current.instance;let Si=[...ge.BH._menuItems].find(ir=>ir[0]._debugName=="EditorContext")[1],wi=["editor.action.clipboardCopyWithSyntaxHighlightingAction","editor.action.quickCommand","editor.action.clipboardCopyAction","editor.action.clipboardPasteAction","editor.action.clipboardCutAction"],Mi=(ir,tr)=>{var gn,to;let Qi=ir._first;do tr.includes((to=(gn=Qi.element)==null?void 0:gn.command)==null?void 0:to.id)&&ir._remove(Qi);while(Qi=Qi.next)};if(Jn(hn,Ie),setTimeout(()=>{Dn(),Ct.current.instance.addAction({id:"d123123",label:"Download File",contextMenuGroupId:"9_cutcopypaste",run:()=>{ki(sr||"educoder.txt",hn.getValue())}})},500),Ct.current.subscription=hn.onDidChangeModelContent(ir=>{Yn.current?clearTimeout(Xn.current):(Dn(),hi(hn.getValue(),ir)),Xn.current=setTimeout(()=>{Yn.current=!1},500)}),window.Monaco||re(Ie,xn(Pt)),Hi&&(Mi(Si,wi),Rn.current.classList.add("noCopyPaste"),window.removeEventListener("keydown",$n),window.removeEventListener("paste",$n),window.addEventListener("keydown",$n),window.addEventListener("paste",$n)),window.Monaco=Ie,_n&&hn.onDidBlurEditorWidget(()=>{_n(hn.getValue())}),Vi&&hn.onDidFocusEditorText(()=>{Vi(hn.getValue())}),Hi)try{hn.onDidPaste(ir=>{const tr=hn.getSelection(),gn=Ct.current.pastePos||{},to=new Ie.Range(gn.startLineNumber||tr.endLineNumber,gn.startColumn||tr.endColumn,gn.endLineNumber||tr.endLineNumber,gn.endColumn||tr.endColumn);hn.executeEdits("",[{range:ir.range,text:""}])})}catch(ir){}let Er=Ce();return Mr&&typeof Mr=="string"&&new Ee(Mr,hn,Ie),be(!0),()=>{const ir=Ct.current.instance;ir.dispose();const tr=ir.getModel();tr&&tr.dispose(),Ct.current.subscription&&Ct.current.subscription.dispose(),Er.unobserve(Rn.current)}}catch(hn){}})},[]),(0,pt.useEffect)(()=>{if(Ct.current.instance&&Sn)return document.addEventListener("keydown",Xe,!1),()=>{document.removeEventListener("keydown",Xe)}},[ei,Sn]),(0,pt.useEffect)(()=>{let Mn=Ct.current.instance;if(Mn&&Sn){let hn=xn(Pt);Ie.editor.setModelLanguage(Mn.getModel(),hn)}},[Pt,Sn]),(0,pt.useEffect)(()=>{Ct.current.instance&&Sn&&Ie.editor.setTheme(xe)},[xe,Sn]),(0,pt.useEffect)(()=>{let Mn=Ct.current.instance;zi.current=Yt,Mn&&Sn&&(Mn.updateOptions(vn({},Yt)),setTimeout(()=>{Mn.getModel().updateOptions(vn({},Yt))},200))},[JSON.stringify(Yt),Sn]),(0,pt.useEffect)(()=>{let Mn=Ct.current.instance;Mn&&Sn&&Mn.layout()},[Pn,Rt,Sn]);const[pe,Tn]=(0,pt.useState)(ui(Pn)),[gi,Oi]=(0,pt.useState)(ui(Rt)),bn=zn(vn({},It),{width:pe,height:gi,position:"relative"});return pt.createElement("div",{className:"my-monaco-editor",ref:Rn,style:bn},ni&&pt.createElement(Jt.CopyToClipboard,{text:bt,onCopy:()=>Ue.ZP.success("\u590D\u5236\u6210\u529F")},pt.createElement(nn.Z,{title:"\u590D\u5236\u4EE3\u7801"},pt.createElement("div",{style:{position:"absolute",top:0,right:10,cursor:"pointer",zIndex:10,color:"#165DFF"}},pt.createElement("i",{className:"iconfont icon-fuzhi8",style:{fontSize:14}})," \u590D\u5236\u4EE3\u7801"))))};function Hn({width:qe="100%",height:$e="100%",original:Pn,modified:Rt,language:bt,options:Pt={}}){const It=(0,pt.useRef)(),[Yt,Nt]=(0,pt.useState)(null);function xe(ii){let Hi;return It.current&&(Hi=new Ht.Z(hi=>{for(let Jn of hi)(Jn.target.offsetHeight>0||Jn.target.offsetWidth>0)&&ii.layout()}),Hi.observe(It.current)),Hi}(0,pt.useEffect)(()=>(It.current&&Promise.all([Ft.e(8909),Ft.e(9404)]).then(Ft.bind(Ft,2550)).then(ii=>{Ie=ii;const Hi=Ie.editor.createDiffEditor(It.current,zn(vn({enableSplitViewResizing:!1,scrollBeyondLastLine:!1,roundedSelection:!1,renderIndicators:!1,useShadows:!1,horizontal:"hidden",lineNumbers:"off",wordWrap:"off",ignoreTrimWhitespace:!1,"semanticHighlighting.enabled":!0,followsCaret:!0,ignoreCharChanges:!0,minimap:{enabled:!1},readOnly:!0},Pt),{wordWrap:!0}));Nt(Hi);let hi=xe(Hi);return()=>{Hi.dispose();const Jn=Hi.getModel();Jn&&Jn.dispose(),hi.unobserve(It.current)}}),()=>{window.removeEventListener("keydown",checkPaste),window.removeEventListener("paste",checkPaste)}),[]),(0,pt.useEffect)(()=>{Yt&&Yt.setModel({original:Ie.editor.createModel(Pn,bt),modified:Ie.editor.createModel(Rt,bt)})},[Pn,Rt,bt,Yt]);const _n=ui(qe),ni=ui($e),ei={width:_n,height:ni};return pt.createElement("div",{className:"my-diff-editor",ref:It,style:ei})}},85057:function(fn,Bn,Ft){"use strict";Ft.d(Bn,{jL:function(){return Pe},w9:function(){return en},QD:function(){return hi},cQ:function(){return Jt},op:function(){return xe},O5:function(){return fi},_b:function(){return kr},t7:function(){return lt},Gi:function(){return An},YG:function(){return zn},qp:function(){return he},vr:function(){return er},qE:function(){return ei},Je:function(){return Lt},wb:function(){return ge},cq:function(){return Ie},tp:function(){return kt}});var pt=Ft(59301),Ht={flex_box_center:"flex_box_center___NeSU8",flex_space_between:"flex_space_between___ImTGl",flex_box_vertical_center:"flex_box_vertical_center___BtRd9",flex_box_center_end:"flex_box_center_end___qcLe3",flex_box_column:"flex_box_column___Ze_3q",banner:"banner___PoUBO",content:"content___XoDjy",btns:"btns___Pb35j"},ve="data:image/png;base64,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",Pe=({dataSource:an=[],img:Sn,imgWidth:be=346,title:Ce,sunTitle:we,bannerExtraContent:kn})=>pt.createElement("div",{className:Ht.banner},pt.createElement("div",{className:Ht.content},pt.createElement("aside",null,pt.createElement("p",null,pt.createElement("b",null,Ce),pt.createElement("span",null,we)),an.length>0&&pt.createElement("div",{className:Ht.btns},an.map((Qn,ti)=>pt.createElement("div",{key:ti,onClick:Qn.click},Qn.name,Qn.sign?pt.createElement("img",{src:ve,width:39}):null))),kn),Sn&&pt.createElement("img",{style:{marginTop:33,marginRight:38},src:Sn,width:be}))),Ae={flex_box_center:"flex_box_center___hG6RI",flex_space_between:"flex_space_between___ss3Fh",flex_box_vertical_center:"flex_box_vertical_center___K80p9",flex_box_center_end:"flex_box_center_end___qmXX3",flex_box_column:"flex_box_column___GFV8F",row:"row___aXJjm",title:"title___HUKL0",tagsWrap:"tagsWrap___XB2W3",action:"action___VdHb1",bar:"bar___t1kKC",tag:"tag___V7Eft",name:"name___Hk1Ip",num:"num___xQpcH",active:"active___XryTX",tagsBorderWrap:"tagsBorderWrap___OMxjs"},ee=Ft(92310),Fe=Ft.n(ee),ye=Ft(89392),he=({dataSource:an=[],value:Sn,onChange:be,onTitleChange:Ce,className:we,title:kn,titleWidth:Qn=41,style:ti={},fontColor:Xe="#6A7283",showCount:Dn})=>{const[vi,$n]=(0,pt.useState)(0),[ki,pe]=(0,pt.useState)(!1),Tn=(0,pt.useRef)(null),gi=(0,pt.useRef)(null);return(0,pt.useEffect)(()=>{var Oi;an.length!==0&&(((Oi=Tn==null?void 0:Tn.current)==null?void 0:Oi.clientHeight)>97?$n(1):$n(0)),an.length===0&&$n(0),pe(!1)},[an]),pt.createElement("div",{className:Fe()(Ae.row,we),style:ti},pt.createElement("div",{onClick:(0,ye.throttle)(()=>Ce==null?void 0:Ce(),2e3),style:{width:Qn,marginTop:ki?12:4},className:`${Ae.title} ${Ce?"current":""}`},kn),pt.createElement("div",{className:ki?`${Ae.tagsWrap} ${Ae.tagsBorderWrap}`:Ae.tagsWrap},pt.createElement("div",{className:Ae.bar,ref:gi,style:vi>0?{height:vi===1?97:"auto",overflow:vi===1?"hidden":"auto",paddingRight:55}:{paddingRight:0}},pt.createElement("div",{className:Ae.tag,ref:Tn},an==null?void 0:an.map(Oi=>pt.createElement("span",{onClick:()=>be(Oi.id),key:Oi.id,style:{color:Xe},className:Sn===Oi.id?Ae.active:""},pt.createElement("span",{title:Oi.name,className:Ae.name},Oi.name),!!Dn&&pt.createElement("span",{className:Ae.num},Oi.count))))),!!vi&&pt.createElement(pt.Fragment,null,vi===1?pt.createElement("div",{onClick:()=>{var Oi;$n(2),((Oi=Tn==null?void 0:Tn.current)==null?void 0:Oi.clientHeight)>245?pe(!0):pe(!1)},className:Ae.action},"\u5C55\u5F00",pt.createElement("i",{style:{transform:"translateY(1px) scale(0.6)"},className:"iconfont icon-zhankai4"})):pt.createElement("div",{onClick:()=>{gi.current.scrollTop=0,$n(1),pe(!1)},className:Ae.action},"\u6536\u8D77",pt.createElement("i",{style:{transform:"translateY(0px) scale(0.6)"},className:"iconfont icon-shouqi3"})))))},Ne={flex_box_center:"flex_box_center___aK2n3",flex_space_between:"flex_space_between___HX0Oh",flex_box_vertical_center:"flex_box_vertical_center___LJOJr",flex_box_center_end:"flex_box_center_end___SCakF",flex_box_column:"flex_box_column___AYv4m",tabs:"tabs___GTqPV",active:"active___F26E8"},kt=({dataSource:an=[],value:Sn,onChange:be,className:Ce,style:we={}})=>pt.createElement("div",{style:we,className:Fe()(Ne.tabs,Ce)},an.map(kn=>pt.createElement("span",{onClick:()=>be(kn.id),className:Sn===kn.id?Ne.active:"",key:kn.id},kn.name))),nt={flex_box_center:"flex_box_center___yX6Oa",flex_space_between:"flex_space_between___t7oqF",flex_box_vertical_center:"flex_box_vertical_center___dEIHy",flex_box_center_end:"flex_box_center_end___taQDF",flex_box_column:"flex_box_column___xY_Lr",input:"input___PW2zI",dropdown:"dropdown___vSy8B",menu:"menu___NiyBu",text:"text___Grueu",b1:"b1___ZKryM",b2:"b2___aKyGa"},et=Ft(92832),lt=({dataSource:an=[],value:Sn="",onChange:be,onInputChange:Ce=()=>{},className:we,style:kn={},placeholder:Qn,allowClear:ti=!1})=>{var Xe;const[Dn,vi]=(0,pt.useState)(""),[$n,ki]=(0,pt.useState)("");(0,pt.useEffect)(()=>{var gi;let Oi=Sn;(gi=JSON.stringify(Sn))!=null&&gi.includes("{")&&(vi(Sn.id),Oi=Sn.value||"");try{ki(decodeURIComponent(Oi||""))}catch(bn){ki(decodeURIComponent(Oi||""))}},[Sn]);const pe=()=>{be(encodeURIComponent($n),Dn||null)},Tn=gi=>{gi!==Dn&&(vi(gi),be(encodeURIComponent($n),gi))};return pt.createElement("div",{className:Fe()(nt.input,we),style:kn},!!an.length&&pt.createElement("div",{className:nt.dropdown},pt.createElement("div",{className:nt.text},(Xe=an.find(gi=>gi.id===Dn))==null?void 0:Xe.name,pt.createElement("i",{className:"iconfont icon-zhankai4"}),pt.createElement("b",{className:nt.b1}),pt.createElement("b",{className:nt.b2})),pt.createElement("div",{className:nt.menu},an.map((gi,Oi)=>pt.createElement("div",{key:Oi,onClick:()=>Tn(gi.id)},gi.name)))),pt.createElement(et.default,{onPressEnter:pe,value:$n,onChange:gi=>{ki(gi.target.value),Ce(encodeURIComponent(gi.target.value),Dn||null)},bordered:!1,placeholder:Qn}),pt.createElement("i",{onClick:pe,className:"iconfont icon-sousuo9 font14 pl10 current"}))},gt={flex_box_center:"flex_box_center___tol8o",flex_space_between:"flex_space_between___Z235C",flex_box_vertical_center:"flex_box_vertical_center___Wq1sZ",flex_box_center_end:"flex_box_center_end___LLxom",flex_box_column:"flex_box_column___DbMSN",quickPager:"quickPager___GM30J",disabled:"disabled___Ozc8I"},Lt=({value:an,onChange:Sn,className:be,total:Ce,pageSize:we,style:kn={}})=>{const Qn=an<2,ti=an>=Math.ceil(Ce/we);return Ce<=we?pt.createElement(pt.Fragment,null):pt.createElement("div",{className:Fe()(gt.quickPager,be),style:kn},pt.createElement("div",{onClick:()=>{Qn||Sn(an-1,"prev")},className:Qn?gt.disabled:""},"\u4E0A\u4E00\u9875"),pt.createElement("div",{onClick:()=>{ti||Sn(an+1,"next")},className:ti?gt.disabled:""},"\u4E0B\u4E00\u9875"))},Dt={flex_box_center:"flex_box_center___FO7TP",flex_space_between:"flex_space_between___LotYx",flex_box_vertical_center:"flex_box_vertical_center___bWdaw",flex_box_center_end:"flex_box_center_end___mVJ1o",flex_box_column:"flex_box_column___M83Mm",list:"list___oOsiS",wrap:"wrap___G6T7F",lockWrap:"lockWrap___Rl79E",li:"li___oZZ7l",cover:"cover___b2bYW",img:"img___IQX7w",sign:"sign___HkT6C",name:"name___SsJx8",e:"e___TMqq0",tags:"tags___bcjyo",rate:"rate___YACg7"},zt=Ft(71418),Xt=Ft(6848),re=Ft(13570),le=Ft(3294),ae=Ft(955),je=Ft(96908),ne=Ft(57177),Le=Ft(81378),ue=Ft(8797),ge=({className:an,dataSource:Sn=[],col:be=4,right:Ce,bottom:we=23,precision:kn=0,wrapWidth:Qn=1200,trackEventItems:ti,loading:Xe})=>{const Dn=Math.floor((Qn-(be-1)*Ce)/be);return pt.createElement(zt.Z,{spinning:Xe},pt.createElement("div",{className:Fe()(Dt.list,an)},!!Sn.length&&Sn.map((vi,$n)=>{const{name:ki,id:pe,identifier:Tn,power:gi,cover_image_id:Oi,pic:bn}=vi;return pt.createElement("div",{className:Dt.wrap,key:pe,style:{width:Dn,marginRight:(1+$n)%be===0?0:Ce+kn,marginBottom:we}},pt.createElement("a",{target:"_blank",href:`/shixuns/${Tn}/challenges`,className:Dt.li,onClick:Mn=>{Mn.preventDefault(),ti&&(0,ae.L9)([ti]),gi&&(0,ae.xg)(`/shixuns/${Tn}/challenges`)}},pt.createElement("div",{className:Dt.img},pt.createElement("img",{className:Dt.cover,src:`${bn}`}),vi.is_jupyter&&pt.createElement("img",{className:Dt.sign,src:je}),vi.is_jupyter_lab&&pt.createElement("img",{className:Dt.sign,src:ne}),vi.is_unity_3d&&pt.createElement("img",{className:Dt.sign,src:Le})),pt.createElement("div",{className:Dt.name},pt.createElement(Xt.Z,{title:ki||"\u5B9E\u8DF5\u9879\u76EE\u540D\u79F0-\u672A\u586B\u5199"},pt.createElement("span",{className:Dt.e},ki||"\u5B9E\u8DF5\u9879\u76EE\u540D\u79F0-\u672A\u586B\u5199"))),pt.createElement("div",{className:Dt.tags},pt.createElement(Xt.Z,{placement:"bottom",title:"\u5173\u5361\u6570"},pt.createElement("span",null,pt.createElement("i",{className:"iconfont icon-shixunguanqia font14 mr2"}),pt.createElement("span",null,vi.challenges_count))),!!vi.myshixuns_count&&pt.createElement(Xt.Z,{placement:"bottom",title:"\u5B66\u4E60\u4EBA\u6570"},pt.createElement("span",null,pt.createElement("i",{className:"iconfont icon-chengyuan font14 mr2"}),pt.createElement("span",null,vi.myshixuns_count))),pt.createElement(Xt.Z,{placement:"bottom",title:"\u96BE\u5EA6\u7B49\u7EA7"},pt.createElement("span",null,pt.createElement("span",null,vi.level))),pt.createElement("div",{className:Dt.rate},pt.createElement(re.Z,{allowHalf:!0,disabled:!0,defaultValue:vi.score_info}),pt.createElement("span",null,"\xA0",vi.score_info?`${vi.score_info}\u5206`:"5\u5206")))),!gi&&pt.createElement("div",{className:Dt.lockWrap},pt.createElement("img",{src:`${le.Z.IMG_SERVER}/images/educoder/icon/lockclose.svg`}),pt.createElement("span",{className:"mt15 font16 c-white"},"\u5B9A\u5411\u5F00\u653E\u5185\u5BB9\uFF0C\u9700\u8981\u6388\u6743")))}),!Sn.length&&pt.createElement(ue.Z,null)))},Ue={flex_box_center:"flex_box_center___AQ53o",flex_space_between:"flex_space_between___i2aIa",flex_box_vertical_center:"flex_box_vertical_center___sPEKB",flex_box_center_end:"flex_box_center_end___GhSSH",flex_box_column:"flex_box_column___R9_Hb",list:"list___jb2Ay",wrap:"wrap___VsQDr",lockWrap:"lockWrap___g1k1T",li:"li___IxCLC",cover:"cover___Mu8wr",img:"img___IpFLA",movebq:"movebq___mF7wt",bq:"bq___Bil0T",sign:"sign___DXJ4d",name:"name___l7FoJ",e:"e___pXQUG",unit:"unit___wCIFR",tags:"tags___w_Mil",tag1:"tag1___dxm7r",tag2:"tag2___llZkf"},nn=Ft(24065),_e=Ft(59301),Jt=({className:an,dataSource:Sn=[],col:be=4,right:Ce,bottom:we=23,precision:kn=0,wrapWidth:Qn=1200,trackEventItems:ti,loading:Xe,onRemove:Dn=()=>{},isCurrent:vi=!0,showAlias:$n=!1})=>{const ki=Math.floor((Qn-(be-1)*Ce)/be),pe=[{name:"\u63A8\u8350\u81EA\u5B66",ptimg:"/images/tjzx.png",swimg:"/images/sw_tjzx.png"},{name:"101\u8BA1\u5212",ptimg:"/images/jh.png",swimg:"/images/sw_jh.png"},{name:"\u56FD\u5BB6\u4E00\u6D41",ptimg:"/images/gjyl.png",swimg:"/images/sw_gjyl.png"},{name:"\u7701\u7EA7\u4E00\u6D41",ptimg:"/images/sjyl.png",swimg:"/images/sw_sjyl.png"},{name:"\u7CBE\u54C1\u8BFE\u7A0B",ptimg:"/images/jpkc.png",swimg:"/images/sw_jpkc.png"},{name:"\u519B\u961F\u4E00\u6D41",ptimg:"/images/jdyl.png",swimg:"/images/sw_jdyl.png"},{name:"\u65B0\u578B\u6559\u6750",ptimg:"/images/xxjc.png",swimg:"/images/sw_xxjc.png"}];return _e.createElement(zt.Z,{spinning:Xe},_e.createElement("div",{className:Fe()(Ue.list,an)},!!(Sn!=null&&Sn.length)&&(Sn==null?void 0:Sn.map((Tn,gi)=>{var Oi;const{name:bn,id:Mn,identifier:hn,featured:Ji,school_name:Li,image_url:Si,excellent:wi,is_plan:Mi}=Tn;return _e.createElement("div",{key:Mn,className:Ue.wrap,style:{width:ki,marginRight:(1+gi)%be===0?0:Ce+kn,marginBottom:we}},_e.createElement("a",{className:Ue.li,onClick:Er=>{Er.preventDefault(),Er.stopPropagation(),ti&&(0,ae.L9)([ti]),(0,ae.xg)(`/paths/${hn}`)}},_e.createElement("div",{className:Ue.img},_e.createElement("img",{className:Ue.cover,src:`${Si}`}),vi&&(0,nn.bg)()&&(Tn==null?void 0:Tn.studying)&&_e.createElement("div",{className:`${Ue.movebq} user-path-items`,onClick:Er=>{Er.stopPropagation(),Dn(Tn)}},_e.createElement("i",{className:"iconfont icon-yichu1 mr5 c-red"}),_e.createElement("span",{className:"c-red"},"\u79FB\u9664")),(Oi=Tn==null?void 0:Tn.subject_tags)==null?void 0:Oi.map((Er,ir)=>{var tr,gn;if(ir===0){const Qi=(tr=pe.find(Or=>Or.name==Er))==null?void 0:tr.swimg;return _e.createElement("img",{className:Ue.sign,src:Qi,style:{left:"-4px"}})}const to=(gn=pe.find(Qi=>Qi.name==Er))==null?void 0:gn.ptimg;return _e.createElement("img",{className:Ue.sign,src:to,style:{left:`${48+52*(ir-1)+2*ir}px`}})}),_e.createElement("div",{style:{position:"absolute",top:"150px",left:"4px"}},(Tn==null?void 0:Tn.excellent)&&_e.createElement("div",{className:Ue.bq},"\u5F00\u653E\u8BFE\u7A0B"))),_e.createElement("div",{className:Ue.name},_e.createElement(Xt.Z,{title:$n&&(Tn!=null&&Tn.excellent_alias_name)?_e.createElement("span",null,`\u8BFE\u7A0B\u539F\u540D\uFF1A${bn}`,_e.createElement("br",null),_e.createElement("span",null,`\u8BFE\u7A0B\u522B\u540D\uFF1A${Tn==null?void 0:Tn.excellent_alias_name}`)):bn},_e.createElement("span",{className:Ue.e},$n&&(Tn==null?void 0:Tn.excellent_alias_name)||bn))),_e.createElement(Xt.Z,{title:`\u53D1\u5E03\u5355\u4F4D\uFF1A${Li}`},_e.createElement("div",{className:Ue.unit},_e.createElement("i",{className:"iconfont icon-danwei1 font14 mr3"}),Li)),_e.createElement("div",{className:Ue.tags},_e.createElement("div",null,_e.createElement(Xt.Z,{placement:"bottom",title:"\u7AE0\u8282\u6570"},_e.createElement("span",null,_e.createElement("i",{className:"iconfont icon-zhangjie1 font14 mr3"}),_e.createElement("span",null,Tn.stages_count))),_e.createElement(Xt.Z,{placement:"bottom",title:"\u5B66\u4E60\u4EBA\u6570"},_e.createElement("span",null,_e.createElement("i",{className:"iconfont icon-chengyuan font14 mr3"}),_e.createElement("span",null,Tn.members_count)))))))})),!Sn.length&&_e.createElement(ue.Z,null)))},De={flex_box_center:"flex_box_center___eMcr7",flex_space_between:"flex_space_between___HcNca",flex_box_vertical_center:"flex_box_vertical_center___ZnvVN",flex_box_center_end:"flex_box_center_end___fdgDf",flex_box_column:"flex_box_column___SEKvd",list:"list___L1hmU",wrap:"wrap___pKgcW",lockWrap:"lockWrap___SMhkK",top:"top___udHSB",sign:"sign___uwRpq",name:"name___Fpf90",img:"img___AMLhL",text:"text___KiTb7",btns:"btns___i6IuZ",bottom:"bottom____k2sh"},sn="data:image/png;base64,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",cn=Ft(59301),en=({className:an,dataSource:Sn=[],col:be=4,right:Ce,bottom:we=23,precision:kn=0,wrapWidth:Qn=1200,trackEventItems:ti,loading:Xe,handleVery:Dn=()=>!0})=>{const vi=Math.floor((Qn-(be-1)*Ce)/be);return cn.createElement(zt.Z,{spinning:Xe},cn.createElement("div",{className:Fe()(De.list,an)},!!Sn.length&&Sn.map(($n,ki)=>{const{subject_identifier:pe,id:Tn,identifier:gi,power:Oi}=$n,bn=$n.is_public!=0&&$n.is_public;return cn.createElement("div",{className:De.wrap,key:Tn,style:{width:vi,marginRight:(1+ki)%be===0?0:Ce+kn,marginBottom:we}},cn.createElement("a",{className:De.li,onClick:Mn=>{Mn.preventDefault(),Dn($n==null?void 0:$n.first_category_url)&&(ti&&(0,ae.L9)([ti]),(0,ae.xg)($n.first_category_url))}},cn.createElement("div",{className:De.top},cn.createElement(Xt.Z,{title:$n.name},cn.createElement("div",{className:De.name},$n.name)),cn.createElement("img",{className:De.img,src:le.Z.IMG_SERVER+"/images/"+$n.avatar_url}),cn.createElement("div",{className:De.text,title:$n.creator},$n.creator),pe&&cn.createElement("div",{className:De.btns},cn.createElement("div",null,"\u5F00\u653E\u8BFE\u7A0B"),cn.createElement("aside",null,"\u5F00\u653E\u8BFE\u5802")),bn&&cn.createElement("div",{className:De.sign},"\u516C\u5F00")),cn.createElement("div",{className:De.bottom},$n.visits>0&&cn.createElement(Xt.Z,{title:"\u8BBF\u95EE\u91CF",placement:"bottom"},cn.createElement("span",null,cn.createElement("i",{className:"iconfont icon-liulanyan"}),cn.createElement("span",null,$n.visits))),$n.course_members_count>0&&cn.createElement(Xt.Z,{title:"\u6210\u5458",placement:"bottom"},cn.createElement("span",null,cn.createElement("i",{className:"iconfont icon-chengyuan"}),$n.course_members_count)),$n.tasks_count>0&&cn.createElement(Xt.Z,{title:"\u4F5C\u4E1A",placement:"bottom"},cn.createElement("span",null,cn.createElement("i",{className:"iconfont icon-zuoye"}),$n.tasks_count)),$n.is_end?cn.createElement("div",{style:{color:"#6B758B"}},"\u5DF2\u7ED3\u675F"):cn.createElement("div",{style:{color:"#00B187"}},"\u8FDB\u884C\u4E2D"))),!$n.is_accessible&&cn.createElement("div",{className:De.lockWrap},cn.createElement("img",{src:`${le.Z.IMG_SERVER}/images/educoder/icon/lockclose.svg`}),cn.createElement("span",{className:"mt15 font16 c-white"},"\u975E\u8BFE\u5802\u6210\u5458\u4E0D\u53EF\u8FDB\u5165")))}),!Sn.length&&cn.createElement(ue.Z,null)))},Cn={flex_box_center:"flex_box_center___d27mZ",flex_space_between:"flex_space_between___qfRU9",flex_box_vertical_center:"flex_box_vertical_center___fCRld",flex_box_center_end:"flex_box_center_end___ORMV8",flex_box_column:"flex_box_column___PNKtZ",tabs:"tabs___alpa7",tabsWrap:"tabsWrap___aCQjw",tab:"tab___MKLr4",active:"active___nl_4v"},Gn=Ft(89070),zn=({dataSource:an=[],value:Sn,onChange:be,className:Ce,style:we={},tabBarExtraContent:kn})=>pt.createElement("div",{className:Fe()(Cn.tabs,Ce),style:we},pt.createElement("div",{className:Cn.tabsWrap},an.map((Qn,ti)=>!(Qn!=null&&Qn.hide)&&pt.createElement("aside",{className:Cn.tab,onClick:()=>{be(Qn.id),Qn.link&&Gn.history.push(Qn.link)},key:ti},pt.createElement("div",{className:Sn===Qn.id?Cn.active:""},Qn.name),(Qn==null?void 0:Qn.resetCount)==null&&(Qn==null?void 0:Qn.total)!==void 0&&pt.createElement("span",null,"\uFF08",Qn==null?void 0:Qn.total,"\uFF09"),(Qn==null?void 0:Qn.resetCount)!==void 0&&(Qn==null?void 0:Qn.total)!==void 0&&pt.createElement(Xt.Z,{title:(Qn==null?void 0:Qn.tip)!=null?Qn==null?void 0:Qn.tip:""},pt.createElement("span",{style:{color:"#9096A3"}},"\uFF08",pt.createElement("span",{style:{color:"#000"}},Qn==null?void 0:Qn.resetCount),"/",pt.createElement("span",null,Qn==null?void 0:Qn.total),"\uFF09"))))),pt.createElement("div",{className:Cn.tabBar},kn)),An=({className:an,style:Sn={},children:be})=>pt.createElement("div",{className:Fe()(an),style:Sn},be),ui={flex_box_center:"flex_box_center___e6HxQ",flex_space_between:"flex_space_between___RnXYe",flex_box_vertical_center:"flex_box_vertical_center___lVxPk",flex_box_center_end:"flex_box_center_end___bu8yv",flex_box_column:"flex_box_column___JczGj",orderWrap:"orderWrap___ZfyGX",orderIconWrap:"orderIconWrap___XTB_O",orderAsc:"orderAsc___KWHmA",orderDesc:"orderDesc___rHdbB",active:"active___a7eSP",cursorPointer:"cursorPointer___gs9kL",orderTextWrap:"orderTextWrap___teAKn"},un=Ft(38854),ln=Ft(20834);const oi=[{id:"updated_at",name:"\u6700\u65B0\u52A8\u6001"},{id:"created_at",name:"\u6700\u65B0\u521B\u5EFA"},{id:"name",name:"\u540D\u79F0\u6392\u5E8F"}];var Ie=({sortValue:an,dropValue:Sn,className:be,onSort:Ce,onDrop:we,dataSource:kn=oi})=>{var Qn;return pt.createElement("div",{className:Fe()(ui.orderWrap,be)},pt.createElement(un.Z,{dropdownRender:()=>pt.createElement(ln.default,null,kn.map((ti,Xe)=>pt.createElement(ln.default.Item,{key:Xe,onClick:()=>we(ti.id)},ti.name)))},pt.createElement("span",{className:ui.orderTextWrap},(Qn=kn.find(ti=>Sn===ti.id))==null?void 0:Qn.name)),pt.createElement("span",{className:ui.orderIconWrap},pt.createElement("span",{className:ui.orderAsc},pt.createElement("i",{className:an==="asc"?`iconfont icon-sanjiaoxing-up font12 ${ui.cursorPointer} ${ui.active}`:`iconfont icon-sanjiaoxing-up font12 ${ui.cursorPointer}`,onClick:()=>Ce(an==="asc"?"desc":"asc")})),pt.createElement("span",{className:ui.orderDesc},pt.createElement("i",{className:an==="desc"?`iconfont icon-sanjiaoxing-down font12 ${ui.cursorPointer} ${ui.active}`:`iconfont icon-sanjiaoxing-down font12 ${ui.cursorPointer}`,onClick:()=>Ce(an==="asc"?"desc":"asc")}))))},Ze={flex_box_center:"flex_box_center___LCi0B",flex_space_between:"flex_space_between___hzONe",flex_box_vertical_center:"flex_box_vertical_center___ZyQRE",flex_box_center_end:"flex_box_center_end___XKM74",flex_box_column:"flex_box_column___p8LCU",btn:"btn___In02G","mediacy-round":"mediacy-round___uveEv","mediacy-default":"mediacy-default___dDxsd",default:"default___K791v"},Hn=Ft(3113),qe=Object.defineProperty,$e=Object.getOwnPropertySymbols,Pn=Object.prototype.hasOwnProperty,Rt=Object.prototype.propertyIsEnumerable,bt=(an,Sn,be)=>Sn in an?qe(an,Sn,{enumerable:!0,configurable:!0,writable:!0,value:be}):an[Sn]=be,Pt=(an,Sn)=>{for(var be in Sn||(Sn={}))Pn.call(Sn,be)&&bt(an,be,Sn[be]);if($e)for(var be of $e(Sn))Rt.call(Sn,be)&&bt(an,be,Sn[be]);return an},It=(an,Sn)=>{var be={};for(var Ce in an)Pn.call(an,Ce)&&Sn.indexOf(Ce)<0&&(be[Ce]=an[Ce]);if(an!=null&&$e)for(var Ce of $e(an))Sn.indexOf(Ce)<0&&Rt.call(an,Ce)&&(be[Ce]=an[Ce]);return be},Yt=(an,Sn,be)=>new Promise((Ce,we)=>{var kn=Xe=>{try{ti(be.next(Xe))}catch(Dn){we(Dn)}},Qn=Xe=>{try{ti(be.throw(Xe))}catch(Dn){we(Dn)}},ti=Xe=>Xe.done?Ce(Xe.value):Promise.resolve(Xe.value).then(kn,Qn);ti((be=be.apply(an,Sn)).next())}),xe=an=>{var Sn=an,{className:be,style:Ce,children:we,loading:kn=!1,openLoading:Qn,onClick:ti=()=>{},size:Xe="middle",shape:Dn="round"}=Sn,vi=It(Sn,["className","style","children","loading","openLoading","onClick","size","shape"]);const[$n,ki]=(0,pt.useState)(!1);return pt.createElement(Hn.ZP,Pt({onClick:(0,ye.throttle)(pe=>Yt(void 0,null,function*(){Qn&&ki(!0);try{yield ti(pe)}catch(Tn){console.log("error",Tn)}Qn&&ki(!1)}),2e3,{leading:!0,trailing:!1}),className:Fe()(Ze.btn,Ze[`${Xe}-${Dn}`],be),style:Ce,size:Xe,shape:Dn,loading:$n||kn},vi),we)},_n={flex_box_center:"flex_box_center___TB7bQ",flex_space_between:"flex_space_between___oBlTb",flex_box_vertical_center:"flex_box_vertical_center___b5XbB",flex_box_center_end:"flex_box_center_end___CNhe7",flex_box_column:"flex_box_column___yHXKW",head:"head___ghH72",node:"node___mjPEy"},ei=({className:an,style:Sn,children:be=null,onClick:Ce,title:we})=>pt.createElement("div",{className:Fe()(_n.head,an),style:Sn},pt.createElement("span",{className:"primary-hover",onClick:Ce},pt.createElement("i",{className:"iconfont icon-fanhui2 font12"}),"\u8FD4\u56DE"),pt.createElement("b",{title:we},we),pt.createElement("div",{className:_n.node},be)),ii={flex_box_center:"flex_box_center___AlHuF",flex_space_between:"flex_space_between___vN2LW",flex_box_vertical_center:"flex_box_vertical_center___Ac7D2",flex_box_center_end:"flex_box_center_end___y38I7",flex_box_column:"flex_box_column___iQE6P",btns:"btns___sNgTb",confirm:"confirm___Ozirl",cancel:"cancel___aiq1I"},hi=({confirmShow:an=!0,confirmTitle:Sn,confirmClick:be,cancelShow:Ce=!0,cancelTitle:we,cancelClick:kn,className:Qn,style:ti,confirmLoading:Xe=!1})=>pt.createElement("div",{className:Fe()(ii.btns,Qn),style:ti},an&&pt.createElement(Hn.ZP,{loading:Xe,onClick:be,type:"primary",className:ii.confirm},Sn),Ce&&pt.createElement(Hn.ZP,{onClick:kn,className:ii.cancel},we)),Jn={flex_box_center:"flex_box_center___jkpdr",flex_space_between:"flex_space_between___OtsL8",flex_box_vertical_center:"flex_box_vertical_center___rbcb_",flex_box_center_end:"flex_box_center_end___zBR21",flex_box_column:"flex_box_column___nS_eP",fixedBottom:"fixedBottom___oJl7m",wrap:"wrap___A3Oq1",center:"center____VL1y"},er=({className:an,style:Sn={},LeftContent:be,children:Ce,RightContent:we})=>pt.createElement("div",{className:Fe()(Jn.fixedBottom,an),style:Sn},pt.createElement("div",{className:Jn.wrap},pt.createElement("div",{className:Jn.left},be),pt.createElement("div",{className:Jn.center},Ce),pt.createElement("div",{className:Jn.right},we))),nr={flex_box_center:"flex_box_center___tY8Yn",flex_space_between:"flex_space_between___vHdYA",flex_box_vertical_center:"flex_box_vertical_center___pa61F",flex_box_center_end:"flex_box_center_end___HyDXt",flex_box_column:"flex_box_column___UjZek",crumbs:"crumbs___V41Oe",hover:"hover___bEIVd"},kr=({className:an,style:Sn={},dataSource:be=[]})=>pt.createElement("div",{className:Fe()(nr.crumbs,an),style:Sn},be.map((Ce,we)=>we<be.length-1?pt.createElement(pt.Fragment,{key:we},Ce.path||Ce.onClick?pt.createElement("span",{className:nr.hover,onClick:Ce!=null&&Ce.onClick?Ce.onClick:()=>Gn.history.push(Ce.path)},Ce.name):pt.createElement("span",null,Ce.name),pt.createElement("span",null,"\xA0",">","\xA0")):pt.createElement("span",{key:we,style:{color:"#5F6368"}},Ce.name))),or=Ft(31797),_i=Object.defineProperty,gr=Object.defineProperties,Mr=Object.getOwnPropertyDescriptors,Ei=Object.getOwnPropertySymbols,Qr=Object.prototype.hasOwnProperty,Rn=Object.prototype.propertyIsEnumerable,Ct=(an,Sn,be)=>Sn in an?_i(an,Sn,{enumerable:!0,configurable:!0,writable:!0,value:be}):an[Sn]=be,zi=(an,Sn)=>{for(var be in Sn||(Sn={}))Qr.call(Sn,be)&&Ct(an,be,Sn[be]);if(Ei)for(var be of Ei(Sn))Rn.call(Sn,be)&&Ct(an,be,Sn[be]);return an},Ci=(an,Sn)=>gr(an,Mr(Sn)),ze=(an,Sn)=>{var be={};for(var Ce in an)Qr.call(an,Ce)&&Sn.indexOf(Ce)<0&&(be[Ce]=an[Ce]);if(an!=null&&Ei)for(var Ce of Ei(an))Sn.indexOf(Ce)<0&&Rn.call(an,Ce)&&(be[Ce]=an[Ce]);return be};const{Countdown:Yn}=or.default;var fi=an=>{var Sn=an,{onChange:be}=Sn,Ce=ze(Sn,["onChange"]);const[we,kn]=(0,pt.useState)(null);(0,pt.useEffect)(()=>{typeof we=="number"&&we>=0&&be(we)},[we]);const Qn=ti=>{const Xe=Math.floor(ti/1e3);kn(Xe)};return pt.createElement(Yn,Ci(zi({},Ce),{onChange:Qn}))}},58856:function(fn,Bn,Ft){"use strict";Ft.d(Bn,{Z:function(){return Ht}});var pt=Ft(59301);function Ht(ve,Me){const Pe=(0,pt.useRef)();(0,pt.useEffect)(()=>{Pe.current=ve}),(0,pt.useEffect)(()=>{function Ae(){Pe.current()}if(Me!==null){let ee=setInterval(Ae,Me);return()=>clearInterval(ee)}},[Me])}},42609:function(fn,Bn,Ft){"use strict";Ft.d(Bn,{Z:function(){return nt}});var pt=Ft(59301),Ht=Ft(8591),ve=Ft(43418),Me=Ft(19842),Pe=Ft(54580),Ae=Ft(3113),ee=Ft(3294),Fe=Ft(955),ye=Ft(99064),de=Ft(89070),he={customModal:"customModal___bVzUV",content:"content___oKhZq",upload:"upload___nPxEL",infoText:"infoText___gZEJF",okBtn:"okBtn___CVo2A",fileList:"fileList___tauGN",fileName:"fileName___T_8JX",selectitems:"selectitems___imW2Y"},Ne=Ft(59301),He=(et,ht,lt)=>new Promise((gt,yt)=>{var Lt=Xt=>{try{zt(lt.next(Xt))}catch(re){yt(re)}},Dt=Xt=>{try{zt(lt.throw(Xt))}catch(re){yt(re)}},zt=Xt=>Xt.done?gt(Xt.value):Promise.resolve(Xt.value).then(Lt,Dt);zt((lt=lt.apply(et,ht)).next())}),nt=({visible:et,onOk:ht,onCancel:lt,sub_discipline_id:gt=[]})=>{const[yt,Lt]=(0,pt.useState)([]),[Dt,zt]=(0,pt.useState)(!1),Xt=(0,de.useParams)(),[re,le]=(0,pt.useState)([]),[ae,je]=(0,pt.useState)([]);(0,pt.useEffect)(()=>{et?ne():(je([]),Lt([]),zt(!1))},[et]);const ne=()=>He(void 0,null,function*(){const nn=yield(0,ye.ZP)("/api/disciplines.json",{method:"get",params:{source:"subject"}});le(nn.disciplines||[]),je((gt==null?void 0:gt.length)>0?gt:[])}),Le=()=>{if((ae==null?void 0:ae.length)===0)return Ht.ZP.warning("\u8BF7\u9009\u62E9\u65B9\u5411&\u8BFE\u7A0B\uFF01");console.log("subDisciplineId",ae),zt(!0),ht(yt,ae[1],()=>{zt(!1)})},ue=()=>{lt()},Ee=()=>{const nn=`${ee.Z.API_SERVER}/api/courses/${Xt.coursesId}/exercises/down_template`;(0,Fe.Nd)(null,nn)},ge=nn=>{const _e={name:nn.name,uid:nn.uid,file:nn};return Lt([_e]),!1},Ue=()=>{Lt([])};return Ne.createElement(ve.default,{title:"\u5BFC\u5165\u8BD5\u9898",open:et,onOk:Le,centered:!0,wrapClassName:he.customModal,onCancel:ue,width:663,okText:"\u786E\u8BA4",okButtonProps:{className:he.okBtn},cancelText:"\u53D6\u6D88",confirmLoading:Dt},Ne.createElement("div",{className:he.content},Ne.createElement("aside",null,Ne.createElement("div",{style:{fontWeight:600}},"\u6B65\u9AA41"),Ne.createElement("ul",null,Ne.createElement("li",null,Ne.createElement("span",{style:{color:"#5F6367"}},"\u6839\u636E\u6A21\u677F\u8981\u6C42\u7F16\u8F91\u9700\u8981\u4E0A\u4F20\u7684\u8BD5\u9898"),Ne.createElement("span",{style:{color:"#0152d9",cursor:"pointer",marginLeft:20},onClick:Ee},"\u4E0B\u8F7D\u8003\u8BD5\u8BD5\u9898\u6A21\u677F"),Ne.createElement("i",{className:"iconfont icon-xiazai4 ml10",onClick:Ee,style:{fontSize:14,cursor:"pointer",color:"#0152d9"}})),Ne.createElement("li",{style:{color:"#FA6400"},className:"mt10"},"\u63D0\u793A"),Ne.createElement("li",{className:he.infoText},"1\u3001\u76EE\u524D\u4EC5\u652F\u6301Excel\u683C\u5F0F\u6A21\u677F\uFF1B "),Ne.createElement("li",{className:he.infoText},"2\u3001\u4E0D\u652F\u6301\u7EC4\u5408\u9898\u548C\u5B9E\u8BAD\u9898\u5BFC\u5165\uFF1B"),Ne.createElement("li",{className:he.infoText},"3\u3001\u6BCF\u6B21\u6700\u591A\u5BFC\u5165300\u9898\uFF1B"),Ne.createElement("li",{className:he.infoText},"4\u3001\u586B\u7A7A\u9898\u5BFC\u5165\u6700\u591A\u652F\u63018\u4E2A\u586B\u7A7A\u9879\u3002"))),Ne.createElement("aside",{style:{marginTop:22}},Ne.createElement("div",{style:{fontWeight:600}},"\u6B65\u9AA42"),Ne.createElement("ul",{style:{flex:1}},Ne.createElement("li",{style:{color:"#5F6367"}},"\u9009\u62E9\u65B9\u5411&\u8BFE\u7A0B\uFF0C\u4E0A\u4F20\u7F16\u8F91\u597D\u7684\u8BD5\u9898\u6587\u6863\uFF0C\u786E\u5B9A\u5BFC\u5165"),et&&Ne.createElement(Ne.Fragment,null,Ne.createElement(Me.Z,{value:ae,className:he.selectitems,expandTrigger:"hover",placeholder:"\u8BF7\u9009\u62E9\u65B9\u5411&\u8BFE\u7A0B",options:re,fieldNames:{label:"name",value:"id",children:"sub_disciplines"},onChange:(nn,_e)=>{je(nn||[])}}),Ne.createElement("br",null),Ne.createElement(Pe.default,{action:`${ee.Z.API_SERVER}/api/attachments.json`,beforeUpload:ge,onRemove:Ue,withCredentials:!0,fileList:yt,accept:".xls,.xlsx",showUploadList:!1},Ne.createElement(Ae.ZP,{className:he.upload,type:"primary",icon:Ne.createElement("i",{className:"iconfont icon-shangchuan3",style:{fontSize:14}})},"\u4E0A\u4F20\u6587\u4EF6"))),yt.map((nn,_e)=>Ne.createElement("div",{key:_e,className:he.fileList},Ne.createElement("span",{className:he.fileName},nn==null?void 0:nn.name),Ne.createElement("i",{className:"iconfont icon-shanchu12",style:{color:"#F65160",fontSize:16,cursor:"pointer"},onClick:Ue})))))))}},74440:function(fn,Bn,Ft){"use strict";Ft.d(Bn,{h:function(){return pt}});var pt=(Ht=>(Ht[Ht.NOMATCH=-1]="NOMATCH",Ht[Ht.OK=0]="OK",Ht[Ht.TIMEOUT=2]="TIMEOUT",Ht[Ht.PODFAILURE=3]="PODFAILURE",Ht[Ht.COMPILEFAILURE=4]="COMPILEFAILURE",Ht[Ht.EXECUTEFAILURE=5]="EXECUTEFAILURE",Ht[Ht.HIDE_COMPILE_STATUS=11]="HIDE_COMPILE_STATUS",Ht))(pt||{})},88264:function(fn,Bn,Ft){"use strict";Ft.d(Bn,{H7:function(){return nt},MK:function(){return kt},MU:function(){return de},X6:function(){return Ne},bM:function(){return ye},fi:function(){return et},fu:function(){return Fe},n4:function(){return ht},rX:function(){return He},vl:function(){return lt},zO:function(){return he}});var pt=Ft(99064),Ht=Object.defineProperty,ve=Object.getOwnPropertySymbols,Me=Object.prototype.hasOwnProperty,Pe=Object.prototype.propertyIsEnumerable,Ae=(gt,yt,Lt)=>yt in gt?Ht(gt,yt,{enumerable:!0,configurable:!0,writable:!0,value:Lt}):gt[yt]=Lt,ee=(gt,yt)=>{for(var Lt in yt||(yt={}))Me.call(yt,Lt)&&Ae(gt,Lt,yt[Lt]);if(ve)for(var Lt of ve(yt))Pe.call(yt,Lt)&&Ae(gt,Lt,yt[Lt]);return gt};function Fe(gt,yt){return(0,pt.U2)(`myproblems/${gt}.json`,ee({hidePopLogin:!0},yt||{}))}function ye(gt,yt){return(0,pt.v_)(`myproblems/${gt}/code_submit.json`,yt)}function de(gt,yt){return(0,pt.v_)(`myproblems/${gt}/code_debug.json`,yt)}function he(gt,yt){return yt.language&&(yt.language=encodeURIComponent(yt.language)),(0,pt.U2)(`myproblems/${gt}/submit_records.json`,yt)}function Ne(gt){return(0,pt.U2)("myproblems/record_detail.json",{id:gt})}function He(gt,yt){return(0,pt.U2)(`myproblems/${gt}/result.json`,{mode:yt})}function kt(gt,yt){return(0,pt.v_)(`myproblems/${gt}/add_notes.json`,yt)}function nt(gt,yt){return(0,pt.v_)(`myproblems/${gt}/restore_initial_code.json`,yt)}function et(gt){return(0,pt.v_)(`myproblems/${gt}/sync_code.json`)}function ht(gt,yt){return(0,pt.v_)(`myproblems/${gt}/update_code.json`,yt)}function lt(gt,yt){return(0,pt.v_)(`discusses/${gt}/plus.json`,yt)}},15730:function(fn,Bn,Ft){"use strict";var pt=Ft(59301),Ht=Ft(6848),ve=Ft(92832),Me=Ft(8591),Pe=Ft(7761),Ae=Ft(59301),ee=(ye,de,he)=>new Promise((Ne,He)=>{var kt=ht=>{try{et(he.next(ht))}catch(lt){He(lt)}},nt=ht=>{try{et(he.throw(ht))}catch(lt){He(lt)}},et=ht=>ht.done?Ne(ht.value):Promise.resolve(ht.value).then(kt,nt);et((he=he.apply(ye,de)).next())});const Fe=({defaultValue:ye,onFinish:de})=>{const[he,Ne]=(0,pt.useState)(!1),[He,kt]=(0,pt.useState)(ye);return(0,pt.useEffect)(()=>{kt(ye)},[ye]),Ae.createElement("div",null,he?Ae.createElement(ve.default,{autoFocus:!0,maxLength:60,style:{textAlign:"center",marginTop:20,marginBottom:20},value:He,onChange:nt=>{kt(nt.target.value)},onBlur:()=>ee(void 0,null,function*(){var nt;if(((nt=He==null?void 0:He.replaceAll(" ",""))==null?void 0:nt.length)<=0){Me.ZP.error("\u8BD5\u5377\u6807\u9898\u4E0D\u80FD\u4E3A\u7A7A");return}(yield de(He))&&Ne(!1)}),onPressEnter:()=>ee(void 0,null,function*(){var nt;if(((nt=He==null?void 0:He.replaceAll(" ",""))==null?void 0:nt.length)<=0){Me.ZP.error("\u8BD5\u5377\u6807\u9898\u4E0D\u80FD\u4E3A\u7A7A");return}(yield de(He))&&Ne(!1)})}):Ae.createElement("div",{className:Pe.Z.title},He,Ae.createElement(Ht.Z,{title:"\u7F16\u8F91\u8BD5\u5377\u540D\u79F0"},Ae.createElement("i",{className:`${Pe.Z.editIcon} iconfont icon-bianji_Hover`,onClick:()=>Ne(!0)}))))};Bn.Z=Fe},86918:function(fn,Bn,Ft){"use strict";Ft.d(Bn,{Z:function(){return de}});var pt=Ft(43418),Ht={ul:"ul___TdfYY"},ve=Ft(32637),Me=Ft(59301),Pe=Object.getOwnPropertySymbols,Ae=Object.prototype.hasOwnProperty,ee=Object.prototype.propertyIsEnumerable,Fe=(he,Ne)=>{var He={};for(var kt in he)Ae.call(he,kt)&&Ne.indexOf(kt)<0&&(He[kt]=he[kt]);if(he!=null&&Pe)for(var kt of Pe(he))Ne.indexOf(kt)<0&&ee.call(he,kt)&&(He[kt]=he[kt]);return He},de=he=>{var Ne=he,{open:He,onCancel:kt}=Ne,nt=Fe(Ne,["open","onCancel"]);return Me.createElement(pt.default,{centered:!0,open:He,title:Me.createElement("div",{style:{fontWeight:"bold"}},"\u8054\u7CFB\u6559\u7814\u52A9\u7406"),width:"696px",onCancel:kt,footer:null},Me.createElement("div",null,Me.createElement("div",{className:"tc"},Me.createElement("img",{className:"mt10",src:ve,width:"182px",height:"181px",style:{borderRadius:"2px",border:"1px solid #D8E3E9"}})),Me.createElement("div",{style:{color:"#191919",fontWeight:"bold"},className:"tc font16 mt10"},"\u514D\u8D39\u6559\u7814\u52A9\u7406"),Me.createElement("div",{style:{color:"#191919",fontWeight:"bold"},className:"tc font16"},"\u5FAE\u4FE1\u626B\u4E00\u626B\u6DFB\u52A0"),Me.createElement("div",{style:{color:"#333"},className:"pt30 font14"},Me.createElement("ul",{className:Ht.ul},Me.createElement("li",null,"1\u3001\u89E3\u7B54\u8001\u5E08\u7591\u60D1\u3001\u5E2E\u52A9\u8001\u5E08\u66F4\u5FEB\u719F\u6089\u548C\u4F7F\u7528\u5E73\u53F0\u6559\u5B66\u3002"),Me.createElement("li",null,"2\u3001\u534F\u52A9\u8001\u5E08\u521B\u5EFA\u8BFE\u5802\u3001\u8BFE\u7A0B\u8BBE\u8BA1\u3001\u505A\u597D\u6559\u5B66\u5DE5\u4F5C\u3002"),Me.createElement("li",null,"3\u3001\u6839\u636E\u8001\u5E08\u6559\u5B66\u65B9\u5411\uFF0C\u5206\u4EAB\u5934\u6B4C\u5E73\u53F0C9\u9662\u6821\u3001985\u9AD8\u6821\u3001211\u9AD8\u6821\u3001\u53CC\u4E00\u6D41\u9AD8\u6821\u8001\u5E08\u7ECF\u5178\u5B9E\u8DF5\u6559\u5B66\u6848\u4F8B\u3002")))))}},88918:function(fn,Bn,Ft){"use strict";Ft.d(Bn,{I:function(){return Ht}});var pt=Ft(59301);const Ht=()=>{const[ve,Me]=(0,pt.useState)("hidden");return{overflow:ve,handleMouseEnter:()=>Me("auto"),handleMouseLeave:()=>Me("hidden")}}},24768:function(fn,Bn,Ft){"use strict";Ft.d(Bn,{AL:function(){return Lt},Iy:function(){return he},Qv:function(){return kt},ez:function(){return yt},jb:function(){return Ne}});var pt=Ft(32834),Ht=Ft.n(pt),ve=Ft(11690),Me=Ft.n(ve);let Pe=1;function Ae(le,ae){const je=le.match(/^(\s+)(?:```)/);if(je===null)return ae;const ne=je[1];return ae.split(`
`).map(Le=>{const ue=Le.match(/^\s+/);if(ue===null)return Le;const[Ee]=ue;return Ee.length>=ne.length?Le.slice(ne.length):Le}).join(`
`)}let ee=[],Fe=["<ul>"];const ye=new(Ht()).Renderer,de=/^ *(#{1,6}) *([^\n]+?) *(?:#+ *)?(?:\n+|$)/;function he(){ee.length=0,Fe=["<ul>"]}const Ne={overflow:"hidden",WebkitBoxOrient:"vertical",display:"-webkit-box",WebkitLineClamp:2};function He(le,ae,je,ne){if(ae>=le.length||le[ae].level<=je)return ae;var Le=le[ae];ne.push("<li><a href='#"+Pe+Le.anchor+"'>"+Le.text+"</a>"),ae++;var ue=[];return ae=He(le,ae,Le.level,ue),ue.length>0&&(ne.push("<ul>"),ue.forEach(function(Ee){ne.push(Ee)}),ne.push("</ul>")),ne.push("</li>"),ae=He(le,ae,je,ne),ae}function kt(){return He(ee,0,0,Fe),Fe.push("</ul>"),Fe.join("")}const nt={heading(le){const ae=de.exec(le);if(Pe+=1,ae)return{type:"heading",raw:ae[0],depth:ae[1].length,text:ae[2]}},fences(le){const ae=this.rules.block.fences.exec(le);if(ae){const je=ae[0];let ne=Ae(je,ae[3]||"");const Le=ae[2]?ae[2].trim():ae[2];if(["latex","katex","math"].indexOf(Le)>=0){const ue=lt(),Ee=ne;ne=ue,gt[ue]={type:"block",expression:Ee}}return{type:"code",raw:je,lang:Le,text:ne}}}},et=/(?:\${2})([^\n`]+?)(?:\${2})/gi;let ht=0;const lt=()=>`__special_katext_id_${ht++}__`;let gt={};function yt(){return gt}function Lt(){ht=0,gt={}}function Dt(le){return le=le.replace(et,(ae,je)=>{const ne=lt();return gt[ne]={type:"inline",expression:je},ne}),le}const zt=ye.listitem;ye.listitem=function(le){return zt(Dt(le))};const Xt=ye.paragraph;ye.paragraph=function(le){return Xt(Dt(le))};const re=ye.tablecell;ye.tablecell=function(le,ae){return re(Dt(le),ae)},ye.code=function(le,ae,je){const ne=(ae||"").match(/\S*/)[0];return ne?["latex","katex","math"].indexOf(ne)>=0?`<p class='editormd-tex'>${le}</p>`:`<pre class="prettyprint linenums"><code class="language-${ae}">${je?le:(0,ve.escape)(le,!0)}</code></pre>
`:'<pre class="prettyprint linenums"><code>'+(je?le:(0,ve.escape)(le,!0))+"</code></pre>"},ye.heading=function(le,ae,je){let ne=this.options.headerPrefix+je.toLowerCase().replace(/[^\w\\u4e00-\\u9fa5]]+/g,"-");return ee.push({anchor:ne,level:ae,text:le}),"<h"+ae+' id="'+Pe+ne+'">'+le+"</h"+ae+">"},Ht().setOptions({silent:!0,gfm:!0,pedantic:!1}),Ht().use({tokenizer:nt,renderer:ye}),Bn.ZP=Ht()},77578:function(fn,Bn,Ft){"use strict";Ft.d(Bn,{Z:function(){return pt}});const pt=Ht=>Ht?typeof Ht=="function"?Ht():Ht:null},66104:function(fn,Bn,Ft){"use strict";Ft.d(Bn,{Z:function(){return Ee}});var pt=Ft(92310),Ht=Ft.n(pt),ve=Ft(11592),Me=Ft(26112),Pe=Ft(59301),Ae=Ft(92343),ee=Ft(36355),Fe=Ft(84105),ye=Ft(91857);const de=ge=>{let{children:Ue}=ge;const{getPrefixCls:nn}=Pe.useContext(ee.E_),_e=nn("breadcrumb");return Pe.createElement("li",{className:`${_e}-separator`,"aria-hidden":"true"},Ue===""?Ue:Ue||"/")};de.__ANT_BREADCRUMB_SEPARATOR=!0;var he=de,Ne=function(ge,Ue){var nn={};for(var _e in ge)Object.prototype.hasOwnProperty.call(ge,_e)&&Ue.indexOf(_e)<0&&(nn[_e]=ge[_e]);if(ge!=null&&typeof Object.getOwnPropertySymbols=="function")for(var qt=0,_e=Object.getOwnPropertySymbols(ge);qt<_e.length;qt++)Ue.indexOf(_e[qt])<0&&Object.prototype.propertyIsEnumerable.call(ge,_e[qt])&&(nn[_e[qt]]=ge[_e[qt]]);return nn};function He(ge,Ue){if(ge.title===void 0||ge.title===null)return null;const nn=Object.keys(Ue).join("|");return typeof ge.title=="object"?ge.title:String(ge.title).replace(new RegExp(`:(${nn})`,"g"),(_e,qt)=>Ue[qt]||_e)}function kt(ge,Ue,nn,_e){if(nn==null)return null;const{className:qt,onClick:Jt}=Ue,De=Ne(Ue,["className","onClick"]),sn=Object.assign(Object.assign({},(0,Me.Z)(De,{data:!0,aria:!0})),{onClick:Jt});return _e!==void 0?Pe.createElement("a",Object.assign({},sn,{className:Ht()(`${ge}-link`,qt),href:_e}),nn):Pe.createElement("span",Object.assign({},sn,{className:Ht()(`${ge}-link`,qt)}),nn)}function nt(ge,Ue){return(_e,qt,Jt,De,sn)=>{if(Ue)return Ue(_e,qt,Jt,De);const cn=He(_e,qt);return kt(ge,_e,cn,sn)}}var et=function(ge,Ue){var nn={};for(var _e in ge)Object.prototype.hasOwnProperty.call(ge,_e)&&Ue.indexOf(_e)<0&&(nn[_e]=ge[_e]);if(ge!=null&&typeof Object.getOwnPropertySymbols=="function")for(var qt=0,_e=Object.getOwnPropertySymbols(ge);qt<_e.length;qt++)Ue.indexOf(_e[qt])<0&&Object.prototype.propertyIsEnumerable.call(ge,_e[qt])&&(nn[_e[qt]]=ge[_e[qt]]);return nn};const ht=ge=>{const{prefixCls:Ue,separator:nn="/",children:_e,menu:qt,overlay:Jt,dropdownProps:De,href:sn}=ge,Te=(en=>{if(qt||Jt){const Cn=Object.assign({},De);if(qt){const Gn=qt||{},{items:vn}=Gn,zn=et(Gn,["items"]);Cn.menu=Object.assign(Object.assign({},zn),{items:vn==null?void 0:vn.map((me,An)=>{var{key:ui,title:un,label:ln,path:oi}=me,xn=et(me,["key","title","label","path"]);let Ie=ln!=null?ln:un;return oi&&(Ie=Pe.createElement("a",{href:`${sn}${oi}`},Ie)),Object.assign(Object.assign({},xn),{key:ui!=null?ui:An,label:Ie})})})}else Jt&&(Cn.overlay=Jt);return Pe.createElement(ye.Z,Object.assign({placement:"bottom"},Cn),Pe.createElement("span",{className:`${Ue}-overlay-link`},en,Pe.createElement(Fe.Z,null)))}return en})(_e);return Te!=null?Pe.createElement(Pe.Fragment,null,Pe.createElement("li",null,Te),nn&&Pe.createElement(he,null,nn)):null},lt=ge=>{const{prefixCls:Ue,children:nn,href:_e}=ge,qt=et(ge,["prefixCls","children","href"]),{getPrefixCls:Jt}=Pe.useContext(ee.E_),De=Jt("breadcrumb",Ue);return Pe.createElement(ht,Object.assign({},qt,{prefixCls:De}),kt(De,qt,nn,_e))};lt.__ANT_BREADCRUMB_ITEM=!0;var gt=lt,yt=Ft(17313),Lt=Ft(83116),Dt=Ft(37613);const zt=ge=>{const{componentCls:Ue,iconCls:nn}=ge;return{[Ue]:Object.assign(Object.assign({},(0,yt.Wf)(ge)),{color:ge.itemColor,fontSize:ge.fontSize,[nn]:{fontSize:ge.iconFontSize},ol:{display:"flex",flexWrap:"wrap",margin:0,padding:0,listStyle:"none"},a:Object.assign({color:ge.linkColor,transition:`color ${ge.motionDurationMid}`,padding:`0 ${ge.paddingXXS}px`,borderRadius:ge.borderRadiusSM,height:ge.lineHeight*ge.fontSize,display:"inline-block",marginInline:-ge.marginXXS,"&:hover":{color:ge.linkHoverColor,backgroundColor:ge.colorBgTextHover}},(0,yt.Qy)(ge)),"li:last-child":{color:ge.lastItemColor},[`${Ue}-separator`]:{marginInline:ge.separatorMargin,color:ge.separatorColor},[`${Ue}-link`]:{[`
> ${nn} + span,
> ${nn} + a
`]:{marginInlineStart:ge.marginXXS}},[`${Ue}-overlay-link`]:{borderRadius:ge.borderRadiusSM,height:ge.lineHeight*ge.fontSize,display:"inline-block",padding:`0 ${ge.paddingXXS}px`,marginInline:-ge.marginXXS,[`> ${nn}`]:{marginInlineStart:ge.marginXXS,fontSize:ge.fontSizeIcon},"&:hover":{color:ge.linkHoverColor,backgroundColor:ge.colorBgTextHover,a:{color:ge.linkHoverColor}},a:{"&:hover":{backgroundColor:"transparent"}}},[`&${ge.componentCls}-rtl`]:{direction:"rtl"}})}};var Xt=(0,Lt.Z)("Breadcrumb",ge=>{const Ue=(0,Dt.TS)(ge,{});return[zt(Ue)]},ge=>({itemColor:ge.colorTextDescription,lastItemColor:ge.colorText,iconFontSize:ge.fontSize,linkColor:ge.colorTextDescription,linkHoverColor:ge.colorText,separatorColor:ge.colorTextDescription,separatorMargin:ge.marginXS})),re=function(ge,Ue){var nn={};for(var _e in ge)Object.prototype.hasOwnProperty.call(ge,_e)&&Ue.indexOf(_e)<0&&(nn[_e]=ge[_e]);if(ge!=null&&typeof Object.getOwnPropertySymbols=="function")for(var qt=0,_e=Object.getOwnPropertySymbols(ge);qt<_e.length;qt++)Ue.indexOf(_e[qt])<0&&Object.prototype.propertyIsEnumerable.call(ge,_e[qt])&&(nn[_e[qt]]=ge[_e[qt]]);return nn};function le(ge){const{breadcrumbName:Ue,children:nn}=ge,_e=re(ge,["breadcrumbName","children"]),qt=Object.assign({title:Ue},_e);return nn&&(qt.menu={items:nn.map(Jt=>{var{breadcrumbName:De}=Jt,sn=re(Jt,["breadcrumbName"]);return Object.assign(Object.assign({},sn),{title:De})})}),qt}function ae(ge,Ue){return(0,Pe.useMemo)(()=>ge||(Ue?Ue.map(le):null),[ge,Ue])}var je=function(ge,Ue){var nn={};for(var _e in ge)Object.prototype.hasOwnProperty.call(ge,_e)&&Ue.indexOf(_e)<0&&(nn[_e]=ge[_e]);if(ge!=null&&typeof Object.getOwnPropertySymbols=="function")for(var qt=0,_e=Object.getOwnPropertySymbols(ge);qt<_e.length;qt++)Ue.indexOf(_e[qt])<0&&Object.prototype.propertyIsEnumerable.call(ge,_e[qt])&&(nn[_e[qt]]=ge[_e[qt]]);return nn};const ne=(ge,Ue)=>{if(Ue===void 0)return Ue;let nn=(Ue||"").replace(/^\//,"");return Object.keys(ge).forEach(_e=>{nn=nn.replace(`:${_e}`,ge[_e])}),nn},Le=ge=>{const{prefixCls:Ue,separator:nn="/",style:_e,className:qt,rootClassName:Jt,routes:De,items:sn,children:cn,itemRender:Te,params:en={}}=ge,Cn=je(ge,["prefixCls","separator","style","className","rootClassName","routes","items","children","itemRender","params"]),{getPrefixCls:Gn,direction:vn,breadcrumb:zn}=Pe.useContext(ee.E_);let me;const An=Gn("breadcrumb",Ue),[ui,un]=Xt(An),ln=ae(sn,De),oi=nt(An,Te);if(ln&&ln.length>0){const Ze=[],Hn=sn||De;me=ln.map((qe,$e)=>{const{path:Pn,key:Rt,type:bt,menu:Pt,overlay:It,onClick:Yt,className:Nt,separator:xe,dropdownProps:_n}=qe,ni=ne(en,Pn);ni!==void 0&&Ze.push(ni);const ei=Rt!=null?Rt:$e;if(bt==="separator")return Pe.createElement(he,{key:ei},xe);const ii={},Hi=$e===ln.length-1;Pt?ii.menu=Pt:It&&(ii.overlay=It);let{href:hi}=qe;return Ze.length&&ni!==void 0&&(hi=`#/${Ze.join("/")}`),Pe.createElement(ht,Object.assign({key:ei},ii,(0,Me.Z)(qe,{data:!0,aria:!0}),{className:Nt,dropdownProps:_n,href:hi,separator:Hi?"":nn,onClick:Yt,prefixCls:An}),oi(qe,en,Hn,Ze,hi))})}else if(cn){const Ze=(0,ve.Z)(cn).length;me=(0,ve.Z)(cn).map((Hn,qe)=>{if(!Hn)return Hn;const $e=qe===Ze-1;return(0,Ae.Tm)(Hn,{separator:$e?"":nn,key:qe})})}const xn=Ht()(An,zn==null?void 0:zn.className,{[`${An}-rtl`]:vn==="rtl"},qt,Jt,un),Ie=Object.assign(Object.assign({},zn==null?void 0:zn.style),_e);return ui(Pe.createElement("nav",Object.assign({className:xn,style:Ie},Cn),Pe.createElement("ol",null,me)))};Le.Item=gt,Le.Separator=he;var ue=Le,Ee=ue},19842:function(fn,Bn,Ft){"use strict";Ft.d(Bn,{Z:function(){return Ci}});var pt=Ft(80702),Ht=Ft(59301),ve=Ft(33853),Me=Ft(58617),Pe=Ft(38819),Ae=Ft(92310),ee=Ft.n(Ae),Fe=Ft(72308),ye=Ft(52487),de=Ft(74416),he=Ft(77861),Ne=Ft(17115),He=Ft(90782),kt=Ft(6089),nt=Ft(18929),et=Ht.createContext(null),ht=et,lt=Ft(62853),gt=Ft(49618),yt=Ft(77321),Lt="__rc_cascader_search_mark__",Dt=function(Yn,Xn,fi){var an=fi.label;return Xn.some(function(Sn){return String(Sn[an]).toLowerCase().includes(Yn.toLowerCase())})},zt=function(Yn,Xn,fi,an){return Xn.map(function(Sn){return Sn[an.label]}).join(" / ")},Xt=function(ze,Yn,Xn,fi,an,Sn){var be=an.filter,Ce=be===void 0?Dt:be,we=an.render,kn=we===void 0?zt:we,Qn=an.limit,ti=Qn===void 0?50:Qn,Xe=an.sort;return Ht.useMemo(function(){var Dn=[];if(!ze)return[];function vi($n,ki){var pe=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;$n.forEach(function(Tn){if(!(!Xe&&ti!==!1&&ti>0&&Dn.length>=ti)){var gi=[].concat((0,pt.Z)(ki),[Tn]),Oi=Tn[Xn.children],bn=pe||Tn.disabled;if((!Oi||Oi.length===0||Sn)&&Ce(ze,gi,{label:Xn.label})){var Mn;Dn.push((0,yt.Z)((0,yt.Z)({},Tn),{},(Mn={disabled:bn},(0,gt.Z)(Mn,Xn.label,kn(ze,gi,fi,Xn)),(0,gt.Z)(Mn,Lt,gi),(0,gt.Z)(Mn,Xn.children,void 0),Mn)))}Oi&&vi(Tn[Xn.children],gi,bn)}})}return vi(Yn,[]),Xe&&Dn.sort(function($n,ki){return Xe($n[Lt],ki[Lt],ze,Xn)}),ti!==!1&&ti>0?Dn.slice(0,ti):Dn},[ze,Yn,Xn,fi,kn,Sn,Ce,Xe,ti])},re="__RC_CASCADER_SPLIT__",le="SHOW_PARENT",ae="SHOW_CHILD";function je(ze){return ze.join(re)}function ne(ze){return ze.map(je)}function Le(ze){return ze.split(re)}function ue(ze){var Yn=ze||{},Xn=Yn.label,fi=Yn.value,an=Yn.children,Sn=fi||"value";return{label:Xn||"label",value:Sn,key:Sn,children:an||"children"}}function Ee(ze,Yn){var Xn,fi;return(Xn=ze.isLeaf)!==null&&Xn!==void 0?Xn:!((fi=ze[Yn.children])!==null&&fi!==void 0&&fi.length)}function ge(ze){var Yn=ze.parentElement;if(Yn){var Xn=ze.offsetTop-Yn.offsetTop;Xn-Yn.scrollTop<0?Yn.scrollTo({top:Xn}):Xn+ze.offsetHeight-Yn.scrollTop>Yn.offsetHeight&&Yn.scrollTo({top:Xn+ze.offsetHeight-Yn.offsetHeight})}}function Ue(ze,Yn){return ze.map(function(Xn){var fi;return(fi=Xn[Lt])===null||fi===void 0?void 0:fi.map(function(an){return an[Yn.value]})})}function nn(ze,Yn,Xn){var fi=new Set(ze),an=Yn();return ze.filter(function(Sn){var be=an[Sn],Ce=be?be.parent:null,we=be?be.children:null;return be&&be.node.disabled?!0:Xn===ae?!(we&&we.some(function(kn){return kn.key&&fi.has(kn.key)})):!(Ce&&!Ce.node.disabled&&fi.has(Ce.key))})}function _e(ze,Yn,Xn){for(var fi=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1,an=Yn,Sn=[],be=function(){var kn,Qn,ti,Xe=ze[Ce],Dn=(kn=an)===null||kn===void 0?void 0:kn.findIndex(function($n){var ki=$n[Xn.value];return fi?String(ki)===String(Xe):ki===Xe}),vi=Dn!==-1?(Qn=an)===null||Qn===void 0?void 0:Qn[Dn]:null;Sn.push({value:(ti=vi==null?void 0:vi[Xn.value])!==null&&ti!==void 0?ti:Xe,index:Dn,option:vi}),an=vi==null?void 0:vi[Xn.children]},Ce=0;Ce<ze.length;Ce+=1)be();return Sn}var qt=function(ze,Yn,Xn,fi,an){return Ht.useMemo(function(){var Sn=an||function(be){var Ce=fi?be.slice(-1):be,we=" / ";return Ce.every(function(kn){return["string","number"].includes((0,lt.Z)(kn))})?Ce.join(we):Ce.reduce(function(kn,Qn,ti){var Xe=Ht.isValidElement(Qn)?Ht.cloneElement(Qn,{key:ti}):Qn;return ti===0?[Xe]:[].concat((0,pt.Z)(kn),[we,Xe])},[])};return ze.map(function(be){var Ce,we,kn=_e(be,Yn,Xn),Qn=Sn(kn.map(function(Xe){var Dn,vi=Xe.option,$n=Xe.value;return(Dn=vi==null?void 0:vi[Xn.label])!==null&&Dn!==void 0?Dn:$n}),kn.map(function(Xe){var Dn=Xe.option;return Dn})),ti=je(be);return{label:Qn,value:ti,key:ti,valueCells:be,disabled:(Ce=kn[kn.length-1])===null||Ce===void 0||(we=Ce.option)===null||we===void 0?void 0:we.disabled}})},[ze,Yn,Xn,an,fi])},Jt=Ft(71430),De=function(ze,Yn){var Xn=Ht.useRef({options:null,info:null}),fi=Ht.useCallback(function(){return Xn.current.options!==ze&&(Xn.current.options=ze,Xn.current.info=(0,Jt.I8)(ze,{fieldNames:Yn,initWrapper:function(Sn){return(0,yt.Z)((0,yt.Z)({},Sn),{},{pathKeyEntities:{}})},processEntity:function(Sn,be){var Ce=Sn.nodes.map(function(we){return we[Yn.value]}).join(re);be.pathKeyEntities[Ce]=Sn,Sn.key=Ce}})),Xn.current.info.pathKeyEntities},[Yn,ze]);return fi},sn=function(ze,Yn){return Ht.useCallback(function(Xn){var fi=[],an=[];return Xn.forEach(function(Sn){var be=_e(Sn,ze,Yn);be.every(function(Ce){return Ce.option})?an.push(Sn):fi.push(Sn)}),[an,fi]},[ze,Yn])},cn=Ft(48736);function Te(ze){return Ht.useMemo(function(){if(!ze)return[!1,{}];var Yn={matchInputWidth:!0,limit:50};return ze&&(0,lt.Z)(ze)==="object"&&(Yn=(0,yt.Z)((0,yt.Z)({},Yn),ze)),Yn.limit<=0&&delete Yn.limit,[!0,Yn]},[ze])}var en=Ht.memo(function(ze){var Yn=ze.children;return Yn},function(ze,Yn){return!Yn.open}),Cn=en;function Gn(ze){var Yn,Xn=ze.prefixCls,fi=ze.checked,an=ze.halfChecked,Sn=ze.disabled,be=ze.onClick,Ce=ze.disableCheckbox,we=Ht.useContext(ht),kn=we.checkable,Qn=typeof kn!="boolean"?kn:null;return Ht.createElement("span",{className:ee()("".concat(Xn),(Yn={},(0,gt.Z)(Yn,"".concat(Xn,"-checked"),fi),(0,gt.Z)(Yn,"".concat(Xn,"-indeterminate"),!fi&&an),(0,gt.Z)(Yn,"".concat(Xn,"-disabled"),Sn||Ce),Yn)),onClick:be},Qn)}var vn="__cascader_fix_label__";function zn(ze){var Yn=ze.prefixCls,Xn=ze.multiple,fi=ze.options,an=ze.activeValue,Sn=ze.prevValuePath,be=ze.onToggleOpen,Ce=ze.onSelect,we=ze.onActive,kn=ze.checkedSet,Qn=ze.halfCheckedSet,ti=ze.loadingKeys,Xe=ze.isSelectable,Dn=ze.searchValue,vi="".concat(Yn,"-menu"),$n="".concat(Yn,"-menu-item"),ki=Ht.useContext(ht),pe=ki.fieldNames,Tn=ki.changeOnSelect,gi=ki.expandTrigger,Oi=ki.expandIcon,bn=ki.loadingIcon,Mn=ki.dropdownMenuColumnStyle,hn=gi==="hover",Ji=Ht.useMemo(function(){return fi.map(function(Li){var Si,wi=Li.disabled,Mi=Li.disableCheckbox,Er=Li[Lt],ir=(Si=Li[vn])!==null&&Si!==void 0?Si:Li[pe.label],tr=Li[pe.value],gn=Ee(Li,pe),to=Er?Er.map(function(Pi){return Pi[pe.value]}):[].concat((0,pt.Z)(Sn),[tr]),Qi=je(to),Or=ti.includes(Qi),Je=kn.has(Qi),Un=Qn.has(Qi);return{disabled:wi,label:ir,value:tr,isLeaf:gn,isLoading:Or,checked:Je,halfChecked:Un,option:Li,disableCheckbox:Mi,fullPath:to,fullPathKey:Qi}})},[fi,kn,pe,Qn,ti,Sn]);return Ht.createElement("ul",{className:vi,role:"menu"},Ji.map(function(Li){var Si,wi=Li.disabled,Mi=Li.label,Er=Li.value,ir=Li.isLeaf,tr=Li.isLoading,gn=Li.checked,to=Li.halfChecked,Qi=Li.option,Or=Li.fullPath,Je=Li.fullPathKey,Un=Li.disableCheckbox,Pi=function(){if(!(wi||Dn)){var vr=(0,pt.Z)(Or);hn&&ir&&vr.pop(),we(vr)}},Ni=function(){Xe(Qi)&&Ce(Or,ir)},di;return typeof Qi.title=="string"?di=Qi.title:typeof Mi=="string"&&(di=Mi),Ht.createElement("li",{key:Je,className:ee()($n,(Si={},(0,gt.Z)(Si,"".concat($n,"-expand"),!ir),(0,gt.Z)(Si,"".concat($n,"-active"),an===Er||an===Je),(0,gt.Z)(Si,"".concat($n,"-disabled"),wi),(0,gt.Z)(Si,"".concat($n,"-loading"),tr),Si)),style:Mn,role:"menuitemcheckbox",title:di,"aria-checked":gn,"data-path-key":Je,onClick:function(){Pi(),!Un&&(!Xn||ir)&&Ni()},onDoubleClick:function(){Tn&&be(!1)},onMouseEnter:function(){hn&&Pi()},onMouseDown:function(vr){vr.preventDefault()}},Xn&&Ht.createElement(Gn,{prefixCls:"".concat(Yn,"-checkbox"),checked:gn,halfChecked:to,disabled:wi||Un,disableCheckbox:Un,onClick:function(vr){Un||(vr.stopPropagation(),Ni())}}),Ht.createElement("div",{className:"".concat($n,"-content")},Mi),!tr&&Oi&&!ir&&Ht.createElement("div",{className:"".concat($n,"-expand-icon")},Oi),tr&&bn&&Ht.createElement("div",{className:"".concat($n,"-loading-icon")},bn))}))}var me=function(){var ze=(0,he.lk)(),Yn=ze.multiple,Xn=ze.open,fi=Ht.useContext(ht),an=fi.values,Sn=Ht.useState([]),be=(0,ye.Z)(Sn,2),Ce=be[0],we=be[1];return Ht.useEffect(function(){if(Xn&&!Yn){var kn=an[0];we(kn||[])}},[Xn]),[Ce,we]},An=Ft(10228),ui=function(ze,Yn,Xn,fi,an,Sn){var be=(0,he.lk)(),Ce=be.direction,we=be.searchValue,kn=be.toggleOpen,Qn=be.open,ti=Ce==="rtl",Xe=Ht.useMemo(function(){for(var Mn=-1,hn=Yn,Ji=[],Li=[],Si=fi.length,wi=Ue(Yn,Xn),Mi=function(Qi){var Or=hn.findIndex(function(Je,Un){return(wi[Un]?je(wi[Un]):Je[Xn.value])===fi[Qi]});if(Or===-1)return"break";Mn=Or,Ji.push(Mn),Li.push(fi[Qi]),hn=hn[Mn][Xn.children]},Er=0;Er<Si&&hn;Er+=1){var ir=Mi(Er);if(ir==="break")break}for(var tr=Yn,gn=0;gn<Ji.length-1;gn+=1)tr=tr[Ji[gn]][Xn.children];return[Li,Mn,tr,wi]},[fi,Xn,Yn]),Dn=(0,ye.Z)(Xe,4),vi=Dn[0],$n=Dn[1],ki=Dn[2],pe=Dn[3],Tn=function(hn){an(hn)},gi=function(hn){var Ji=ki.length,Li=$n;Li===-1&&hn<0&&(Li=Ji);for(var Si=0;Si<Ji;Si+=1){Li=(Li+hn+Ji)%Ji;var wi=ki[Li];if(wi&&!wi.disabled){var Mi=vi.slice(0,-1).concat(pe[Li]?je(pe[Li]):wi[Xn.value]);Tn(Mi);return}}},Oi=function(){if(vi.length>1){var hn=vi.slice(0,-1);Tn(hn)}else kn(!1)},bn=function(){var hn,Ji=((hn=ki[$n])===null||hn===void 0?void 0:hn[Xn.children])||[],Li=Ji.find(function(wi){return!wi.disabled});if(Li){var Si=[].concat((0,pt.Z)(vi),[Li[Xn.value]]);Tn(Si)}};Ht.useImperativeHandle(ze,function(){return{onKeyDown:function(hn){var Ji=hn.which;switch(Ji){case An.Z.UP:case An.Z.DOWN:{var Li=0;Ji===An.Z.UP?Li=-1:Ji===An.Z.DOWN&&(Li=1),Li!==0&&gi(Li);break}case An.Z.LEFT:{if(we)break;ti?bn():Oi();break}case An.Z.RIGHT:{if(we)break;ti?Oi():bn();break}case An.Z.BACKSPACE:{we||Oi();break}case An.Z.ENTER:{if(vi.length){var Si=ki[$n],wi=(Si==null?void 0:Si[Lt])||[];wi.length?Sn(wi.map(function(Mi){return Mi[Xn.value]}),wi[wi.length-1]):Sn(vi,ki[$n])}break}case An.Z.ESC:kn(!1),Qn&&hn.stopPropagation()}},onKeyUp:function(){}}})},un=Ht.forwardRef(function(ze,Yn){var Xn,fi,an,Sn,be=(0,he.lk)(),Ce=be.prefixCls,we=be.multiple,kn=be.searchValue,Qn=be.toggleOpen,ti=be.notFoundContent,Xe=be.direction,Dn=be.open,vi=Ht.useRef(),$n=Xe==="rtl",ki=Ht.useContext(ht),pe=ki.options,Tn=ki.values,gi=ki.halfValues,Oi=ki.fieldNames,bn=ki.changeOnSelect,Mn=ki.onSelect,hn=ki.searchOptions,Ji=ki.dropdownPrefixCls,Li=ki.loadData,Si=ki.expandTrigger,wi=Ji||Ce,Mi=Ht.useState([]),Er=(0,ye.Z)(Mi,2),ir=Er[0],tr=Er[1],gn=function(Cr){if(!(!Li||kn)){var eo=_e(Cr,pe,Oi),Fr=eo.map(function(Wr){var Dr=Wr.option;return Dr}),dr=Fr[Fr.length-1];if(dr&&!Ee(dr,Oi)){var Nr=je(Cr);tr(function(Wr){return[].concat((0,pt.Z)(Wr),[Nr])}),Li(Fr)}}};Ht.useEffect(function(){ir.length&&ir.forEach(function(Gr){var Cr=Le(Gr),eo=_e(Cr,pe,Oi,!0).map(function(dr){var Nr=dr.option;return Nr}),Fr=eo[eo.length-1];(!Fr||Fr[Oi.children]||Ee(Fr,Oi))&&tr(function(dr){return dr.filter(function(Nr){return Nr!==Gr})})})},[pe,ir,Oi]);var to=Ht.useMemo(function(){return new Set(ne(Tn))},[Tn]),Qi=Ht.useMemo(function(){return new Set(ne(gi))},[gi]),Or=me(),Je=(0,ye.Z)(Or,2),Un=Je[0],Pi=Je[1],Ni=function(Cr){Pi(Cr),gn(Cr)},di=function(Cr){var eo=Cr.disabled,Fr=Ee(Cr,Oi);return!eo&&(Fr||bn||we)},Ii=function(Cr,eo){var Fr=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;Mn(Cr),!we&&(eo||bn&&(Si==="hover"||Fr))&&Qn(!1)},vr=Ht.useMemo(function(){return kn?hn:pe},[kn,hn,pe]),yr=Ht.useMemo(function(){for(var Gr=[{options:vr}],Cr=vr,eo=Ue(Cr,Oi),Fr=function(){var Dr=Un[dr],yi=Cr.find(function(Fo,vo){return(eo[vo]?je(eo[vo]):Fo[Oi.value])===Dr}),Gt=yi==null?void 0:yi[Oi.children];if(!(Gt!=null&&Gt.length))return"break";Cr=Gt,Gr.push({options:Gt})},dr=0;dr<Un.length;dr+=1){var Nr=Fr();if(Nr==="break")break}return Gr},[vr,Un,Oi]),pr=function(Cr,eo){di(eo)&&Ii(Cr,Ee(eo,Oi),!0)};ui(Yn,vr,Oi,Un,Ni,pr),Ht.useEffect(function(){for(var Gr=0;Gr<Un.length;Gr+=1){var Cr,eo=Un.slice(0,Gr+1),Fr=je(eo),dr=(Cr=vi.current)===null||Cr===void 0?void 0:Cr.querySelector('li[data-path-key="'.concat(Fr.replace(/\\{0,2}"/g,'\\"'),'"]'));dr&&ge(dr)}},[Un]);var wr=!((Xn=yr[0])!==null&&Xn!==void 0&&(fi=Xn.options)!==null&&fi!==void 0&&fi.length),yn=[(an={},(0,gt.Z)(an,Oi.value,"__EMPTY__"),(0,gt.Z)(an,vn,ti),(0,gt.Z)(an,"disabled",!0),an)],Ir=(0,yt.Z)((0,yt.Z)({},ze),{},{multiple:!wr&&we,onSelect:Ii,onActive:Ni,onToggleOpen:Qn,checkedSet:to,halfCheckedSet:Qi,loadingKeys:ir,isSelectable:di}),mn=wr?[{options:yn}]:yr,Zr=mn.map(function(Gr,Cr){var eo=Un.slice(0,Cr),Fr=Un[Cr];return Ht.createElement(zn,(0,Fe.Z)({key:Cr},Ir,{searchValue:kn,prefixCls:wi,options:Gr.options,prevValuePath:eo,activeValue:Fr}))});return Ht.createElement(Cn,{open:Dn},Ht.createElement("div",{className:ee()("".concat(wi,"-menus"),(Sn={},(0,gt.Z)(Sn,"".concat(wi,"-menu-empty"),wr),(0,gt.Z)(Sn,"".concat(wi,"-rtl"),$n),Sn)),ref:vi},Zr))}),ln=un;function oi(ze){var Yn=ze.onPopupVisibleChange,Xn=ze.popupVisible,fi=ze.popupClassName,an=ze.popupPlacement;warning(!Yn,"`onPopupVisibleChange` is deprecated. Please use `onDropdownVisibleChange` instead."),warning(Xn===void 0,"`popupVisible` is deprecated. Please use `open` instead."),warning(fi===void 0,"`popupClassName` is deprecated. Please use `dropdownClassName` instead."),warning(an===void 0,"`popupPlacement` is deprecated. Please use `placement` instead.")}function xn(ze,Yn){if(ze){var Xn=function fi(an){for(var Sn=0;Sn<an.length;Sn++){var be=an[Sn];if(be[Yn==null?void 0:Yn.value]===null)return warning(!1,"`value` in Cascader options should not be `null`."),!0;if(Array.isArray(be[Yn==null?void 0:Yn.children])&&fi(be[Yn==null?void 0:Yn.children]))return!0}};Xn(ze)}}var Ie=null,Ze=["id","prefixCls","fieldNames","defaultValue","value","changeOnSelect","onChange","displayRender","checkable","autoClearSearchValue","searchValue","onSearch","showSearch","expandTrigger","options","dropdownPrefixCls","loadData","popupVisible","open","popupClassName","dropdownClassName","dropdownMenuColumnStyle","popupPlacement","placement","onDropdownVisibleChange","onPopupVisibleChange","expandIcon","loadingIcon","children","dropdownMatchSelectWidth","showCheckedStrategy"];function Hn(ze){return Array.isArray(ze)&&Array.isArray(ze[0])}function qe(ze){return ze?Hn(ze)?ze:(ze.length===0?[]:[ze]).map(function(Yn){return Array.isArray(Yn)?Yn:[Yn]}):[]}var $e=Ht.forwardRef(function(ze,Yn){var Xn=ze.id,fi=ze.prefixCls,an=fi===void 0?"rc-cascader":fi,Sn=ze.fieldNames,be=ze.defaultValue,Ce=ze.value,we=ze.changeOnSelect,kn=ze.onChange,Qn=ze.displayRender,ti=ze.checkable,Xe=ze.autoClearSearchValue,Dn=Xe===void 0?!0:Xe,vi=ze.searchValue,$n=ze.onSearch,ki=ze.showSearch,pe=ze.expandTrigger,Tn=ze.options,gi=ze.dropdownPrefixCls,Oi=ze.loadData,bn=ze.popupVisible,Mn=ze.open,hn=ze.popupClassName,Ji=ze.dropdownClassName,Li=ze.dropdownMenuColumnStyle,Si=ze.popupPlacement,wi=ze.placement,Mi=ze.onDropdownVisibleChange,Er=ze.onPopupVisibleChange,ir=ze.expandIcon,tr=ir===void 0?">":ir,gn=ze.loadingIcon,to=ze.children,Qi=ze.dropdownMatchSelectWidth,Or=Qi===void 0?!1:Qi,Je=ze.showCheckedStrategy,Un=Je===void 0?le:Je,Pi=(0,de.Z)(ze,Ze),Ni=(0,Ne.ZP)(Xn),di=!!ti,Ii=(0,nt.Z)(be,{value:Ce,postState:qe}),vr=(0,ye.Z)(Ii,2),yr=vr[0],pr=vr[1],wr=Ht.useMemo(function(){return ue(Sn)},[JSON.stringify(Sn)]),yn=Ht.useMemo(function(){return Tn||[]},[Tn]),Ir=De(yn,wr),mn=Ht.useCallback(function(Yi){var Bi=Ir();return Yi.map(function(Sr){var br=Bi[Sr].nodes;return br.map(function(ho){return ho[wr.value]})})},[Ir,wr]),Zr=(0,nt.Z)("",{value:vi,postState:function(Bi){return Bi||""}}),Gr=(0,ye.Z)(Zr,2),Cr=Gr[0],eo=Gr[1],Fr=function(Bi,Sr){eo(Bi),Sr.source!=="blur"&&$n&&$n(Bi)},dr=Te(ki),Nr=(0,ye.Z)(dr,2),Wr=Nr[0],Dr=Nr[1],yi=Xt(Cr,yn,wr,gi||an,Dr,we),Gt=sn(yn,wr),Fo=Ht.useMemo(function(){var Yi=Gt(yr),Bi=(0,ye.Z)(Yi,2),Sr=Bi[0],br=Bi[1];if(!di||!yr.length)return[Sr,[],br];var ho=ne(Sr),Co=Ir(),wa=(0,He.S)(ho,!0,Co),Ye=wa.checkedKeys,Go=wa.halfCheckedKeys;return[mn(Ye),mn(Go),br]},[di,yr,Ir,mn,Gt]),vo=(0,ye.Z)(Fo,3),Oo=vo[0],ua=vo[1],uo=vo[2],Qo=Ht.useMemo(function(){var Yi=ne(Oo),Bi=nn(Yi,Ir,Un);return[].concat((0,pt.Z)(uo),(0,pt.Z)(mn(Bi)))},[Oo,Ir,mn,uo,Un]),$t=qt(Qo,yn,wr,di,Qn),Wn=(0,kt.Z)(function(Yi){if(pr(Yi),kn){var Bi=qe(Yi),Sr=Bi.map(function(Co){return _e(Co,yn,wr).map(function(wa){return wa.option})}),br=di?Bi:Bi[0],ho=di?Sr:Sr[0];kn(br,ho)}}),In=(0,kt.Z)(function(Yi){if((!di||Dn)&&eo(""),!di)Wn(Yi);else{var Bi=je(Yi),Sr=ne(Oo),br=ne(ua),ho=Sr.includes(Bi),Co=uo.some(function(ao){return je(ao)===Bi}),wa=Oo,Ye=uo;if(Co&&!ho)Ye=uo.filter(function(ao){return je(ao)!==Bi});else{var Go=ho?Sr.filter(function(ao){return ao!==Bi}):[].concat((0,pt.Z)(Sr),[Bi]),Nl=Ir(),Ss;if(ho){var rl=(0,He.S)(Go,{checked:!1,halfCheckedKeys:br},Nl);Ss=rl.checkedKeys}else{var yo=(0,He.S)(Go,!0,Nl);Ss=yo.checkedKeys}var Tu=nn(Ss,Ir,Un);wa=mn(Tu)}Wn([].concat((0,pt.Z)(Ye),(0,pt.Z)(wa)))}}),si=function(Bi,Sr){if(Sr.type==="clear"){Wn([]);return}var br=Sr.values[0],ho=br.valueCells;In(ho)},Ln=Mn!==void 0?Mn:bn,Zn=Ji||hn,jn=wi||Si,Re=function(Bi){Mi==null||Mi(Bi),Er==null||Er(Bi)},Nn=Ht.useMemo(function(){return{options:yn,fieldNames:wr,values:Oo,halfValues:ua,changeOnSelect:we,onSelect:In,checkable:ti,searchOptions:yi,dropdownPrefixCls:gi,loadData:Oi,expandTrigger:pe,expandIcon:tr,loadingIcon:gn,dropdownMenuColumnStyle:Li}},[yn,wr,Oo,ua,we,In,ti,yi,gi,Oi,pe,tr,gn,Li]),bi=!(Cr?yi:yn).length,cr=Cr&&Dr.matchInputWidth||bi?{}:{minWidth:"auto"};return Ht.createElement(ht.Provider,{value:Nn},Ht.createElement(he.Ac,(0,Fe.Z)({},Pi,{ref:Yn,id:Ni,prefixCls:an,autoClearSearchValue:Dn,dropdownMatchSelectWidth:Or,dropdownStyle:cr,displayValues:$t,onDisplayValuesChange:si,mode:di?"multiple":void 0,searchValue:Cr,onSearch:Fr,showSearch:Wr,OptionList:ln,emptyOptions:bi,open:Ln,dropdownClassName:Zn,placement:jn,onDropdownVisibleChange:Re,getRawInputElement:function(){return to}})))});$e.SHOW_PARENT=le,$e.SHOW_CHILD=ae;var Pn=$e,Rt=Pn,bt=Ft(2738),Pt=Ft(62892),It=Ft(53487),Yt=Ft(19080),Nt=Ft(36355),xe=Ft(93891),_n=Ft(1684),ni=Ft(19716),ei=Ft(32441),ii=Ft(14154),Hi=Ft(58582),hi=Ft(84443),Jn=Ft(66339),Vi=Ft(33234),er=Ft(98447),nr=Ft(17313),sr=Ft(74207),kr=Ft(83116);const or=ze=>{const{prefixCls:Yn,componentCls:Xn,antCls:fi}=ze,an=`${Xn}-menu-item`,Sn=`
&${an}-expand ${an}-expand-icon,
${an}-loading-icon
`;return[{[Xn]:{width:ze.controlWidth}},{[`${Xn}-dropdown`]:[(0,er.C2)(`${Yn}-checkbox`,ze),{[`&${fi}-select-dropdown`]:{padding:0}},{[Xn]:{"&-checkbox":{top:0,marginInlineEnd:ze.paddingXS},"&-menus":{display:"flex",flexWrap:"nowrap",alignItems:"flex-start",[`&${Xn}-menu-empty`]:{[`${Xn}-menu`]:{width:"100%",height:"auto",[an]:{color:ze.colorTextDisabled}}}},"&-menu":{flexGrow:1,minWidth:ze.controlItemWidth,height:ze.dropdownHeight,margin:0,padding:ze.menuPadding,overflow:"auto",verticalAlign:"top",listStyle:"none","-ms-overflow-style":"-ms-autohiding-scrollbar","&:not(:last-child)":{borderInlineEnd:`${ze.lineWidth}px ${ze.lineType} ${ze.colorSplit}`},"&-item":Object.assign(Object.assign({},nr.vS),{display:"flex",flexWrap:"nowrap",alignItems:"center",padding:ze.optionPadding,lineHeight:ze.lineHeight,cursor:"pointer",transition:`all ${ze.motionDurationMid}`,borderRadius:ze.borderRadiusSM,"&:hover":{background:ze.controlItemBgHover},"&-disabled":{color:ze.colorTextDisabled,cursor:"not-allowed","&:hover":{background:"transparent"},[Sn]:{color:ze.colorTextDisabled}},[`&-active:not(${an}-disabled)`]:{"&, &:hover":{fontWeight:ze.optionSelectedFontWeight,backgroundColor:ze.optionSelectedBg}},"&-content":{flex:"auto"},[Sn]:{marginInlineStart:ze.paddingXXS,color:ze.colorTextDescription,fontSize:ze.fontSizeIcon},"&-keyword":{color:ze.colorHighlight}})}}}]},{[`${Xn}-dropdown-rtl`]:{direction:"rtl"}},(0,sr.c)(ze)]};var _i=(0,kr.Z)("Cascader",ze=>[or(ze)],ze=>{const Yn=Math.round((ze.controlHeight-ze.fontSize*ze.lineHeight)/2);return{controlWidth:184,controlItemWidth:111,dropdownHeight:180,optionSelectedBg:ze.controlItemBgActive,optionSelectedFontWeight:ze.fontWeightStrong,optionPadding:`${Yn}px ${ze.paddingSM}px`,menuPadding:ze.paddingXXS}}),gr=function(ze,Yn){var Xn={};for(var fi in ze)Object.prototype.hasOwnProperty.call(ze,fi)&&Yn.indexOf(fi)<0&&(Xn[fi]=ze[fi]);if(ze!=null&&typeof Object.getOwnPropertySymbols=="function")for(var an=0,fi=Object.getOwnPropertySymbols(ze);an<fi.length;an++)Yn.indexOf(fi[an])<0&&Object.prototype.propertyIsEnumerable.call(ze,fi[an])&&(Xn[fi[an]]=ze[fi[an]]);return Xn};const{SHOW_CHILD:Mr,SHOW_PARENT:Ei}=Rt;function Qr(ze,Yn,Xn){const fi=ze.toLowerCase().split(Yn).reduce((be,Ce,we)=>we===0?[Ce]:[].concat((0,pt.Z)(be),[Yn,Ce]),[]),an=[];let Sn=0;return fi.forEach((be,Ce)=>{const we=Sn+be.length;let kn=ze.slice(Sn,we);Sn=we,Ce%2===1&&(kn=Ht.createElement("span",{className:`${Xn}-menu-item-keyword`,key:`separator-${Ce}`},kn)),an.push(kn)}),an}const Rn=(ze,Yn,Xn,fi)=>{const an=[],Sn=ze.toLowerCase();return Yn.forEach((be,Ce)=>{Ce!==0&&an.push(" / ");let we=be[fi.label];const kn=typeof we;(kn==="string"||kn==="number")&&(we=Qr(String(we),Sn,Xn)),an.push(we)}),an},Ct=Ht.forwardRef((ze,Yn)=>{const{prefixCls:Xn,size:fi,disabled:an,className:Sn,rootClassName:be,multiple:Ce,bordered:we=!0,transitionName:kn,choiceTransitionName:Qn="",popupClassName:ti,dropdownClassName:Xe,expandIcon:Dn,placement:vi,showSearch:$n,allowClear:ki=!0,notFoundContent:pe,direction:Tn,getPopupContainer:gi,status:Oi,showArrow:bn,builtinPlacements:Mn,style:hn}=ze,Ji=gr(ze,["prefixCls","size","disabled","className","rootClassName","multiple","bordered","transitionName","choiceTransitionName","popupClassName","dropdownClassName","expandIcon","placement","showSearch","allowClear","notFoundContent","direction","getPopupContainer","status","showArrow","builtinPlacements","style"]),Li=(0,bt.Z)(Ji,["suffixIcon"]),{getPopupContainer:Si,getPrefixCls:wi,renderEmpty:Mi,direction:Er,popupOverflow:ir,cascader:tr}=Ht.useContext(Nt.E_),gn=Tn||Er,to=gn==="rtl",{status:Qi,hasFeedback:Or,isFormItemInput:Je,feedbackIcon:Un}=Ht.useContext(ei.aM),Pi=(0,Yt.F)(Qi,Oi),Ni=pe||(Mi==null?void 0:Mi("Cascader"))||Ht.createElement(xe.Z,{componentName:"Cascader"}),di=wi(),Ii=wi("select",Xn),vr=wi("cascader",Xn),[yr,pr]=(0,ii.Z)(Ii),[wr]=_i(vr),{compactSize:yn,compactItemClassnames:Ir}=(0,Vi.ri)(Ii,Tn),mn=ee()(ti||Xe,`${vr}-dropdown`,{[`${vr}-dropdown-rtl`]:gn==="rtl"},be,pr),Zr=Ht.useMemo(()=>{if(!$n)return $n;let uo={render:Rn};return typeof $n=="object"&&(uo=Object.assign(Object.assign({},uo),$n)),uo},[$n]),Gr=(0,ni.Z)(uo=>{var Qo;return(Qo=fi!=null?fi:yn)!==null&&Qo!==void 0?Qo:uo}),Cr=Ht.useContext(_n.Z),eo=an!=null?an:Cr;let Fr=Dn;Dn||(Fr=to?Ht.createElement(ve.Z,null):Ht.createElement(Pe.Z,null));const dr=Ht.createElement("span",{className:`${Ii}-menu-item-loading-icon`},Ht.createElement(Me.Z,{spin:!0})),Nr=Ht.useMemo(()=>Ce?Ht.createElement("span",{className:`${vr}-checkbox-inner`}):!1,[Ce]),Wr=(0,hi.Z)(ze.suffixIcon,bn),{suffixIcon:Dr,removeIcon:yi,clearIcon:Gt}=(0,Jn.Z)(Object.assign(Object.assign({},ze),{hasFeedback:Or,feedbackIcon:Un,showSuffixIcon:Wr,multiple:Ce,prefixCls:Ii,componentName:"Cascader"})),Fo=Ht.useMemo(()=>vi!==void 0?vi:to?"bottomRight":"bottomLeft",[vi,to]),vo=(0,Hi.Z)(Mn,ir),Oo=ki===!0?{clearIcon:Gt}:ki,ua=Ht.createElement(Rt,Object.assign({prefixCls:Ii,className:ee()(!Xn&&vr,{[`${Ii}-lg`]:Gr==="large",[`${Ii}-sm`]:Gr==="small",[`${Ii}-rtl`]:to,[`${Ii}-borderless`]:!we,[`${Ii}-in-form-item`]:Je},(0,Yt.Z)(Ii,Pi,Or),Ir,tr==null?void 0:tr.className,Sn,be,pr),disabled:eo,style:Object.assign(Object.assign({},tr==null?void 0:tr.style),hn)},Li,{builtinPlacements:vo,direction:gn,placement:Fo,notFoundContent:Ni,allowClear:Oo,showSearch:Zr,expandIcon:Fr,suffixIcon:Dr,removeIcon:yi,loadingIcon:dr,checkable:Nr,dropdownClassName:mn,dropdownPrefixCls:Xn||vr,choiceTransitionName:(0,Pt.m)(di,"",Qn),transitionName:(0,Pt.m)(di,"slide-up",kn),getPopupContainer:gi||Si,ref:Yn}));return wr(yr(ua))}),zi=(0,It.Z)(Ct);Ct.SHOW_PARENT=Ei,Ct.SHOW_CHILD=Mr,Ct._InternalPanelDoNotUseOrYouWillBeFired=zi;var Ci=Ct},36381:function(fn,Bn,Ft){"use strict";Ft.d(Bn,{default:function(){return ui}});var pt=Ft(38819),Ht=Ft(92310),ve=Ft.n(Ht),Me=Ft(72308),Pe=Ft(80702),Ae=Ft(52487),ee=Ft(62853),Fe=Ft(18929),ye=Ft(48736),de=Ft(59301),he=Ft(74416),Ne=Ft(11592),He=Ft(49618),kt=Ft(77900),nt=Ft(10228),et=de.forwardRef(function(un,ln){var oi=un.prefixCls,xn=un.forceRender,Ie=un.className,Ze=un.style,Hn=un.children,qe=un.isActive,$e=un.role,Pn=de.useState(qe||xn),Rt=(0,Ae.Z)(Pn,2),bt=Rt[0],Pt=Rt[1];return de.useEffect(function(){(xn||qe)&&Pt(!0)},[xn,qe]),bt?de.createElement("div",{ref:ln,className:ve()("".concat(oi,"-content"),(0,He.Z)((0,He.Z)({},"".concat(oi,"-content-active"),qe),"".concat(oi,"-content-inactive"),!qe),Ie),style:Ze,role:$e},de.createElement("div",{className:"".concat(oi,"-content-box")},Hn)):null});et.displayName="PanelContent";var ht=et,lt=["showArrow","headerClass","isActive","onItemClick","forceRender","className","prefixCls","collapsible","accordion","panelKey","extra","header","expandIcon","openMotion","destroyInactivePanel","children"],gt=de.forwardRef(function(un,ln){var oi=un.showArrow,xn=oi===void 0?!0:oi,Ie=un.headerClass,Ze=un.isActive,Hn=un.onItemClick,qe=un.forceRender,$e=un.className,Pn=un.prefixCls,Rt=un.collapsible,bt=un.accordion,Pt=un.panelKey,It=un.extra,Yt=un.header,Nt=un.expandIcon,xe=un.openMotion,_n=un.destroyInactivePanel,ni=un.children,ei=(0,he.Z)(un,lt),ii=Rt==="disabled",Hi=Rt==="header",hi=Rt==="icon",Jn=It!=null&&typeof It!="boolean",Vi=function(){Hn==null||Hn(Pt)},er=function(gr){(gr.key==="Enter"||gr.keyCode===nt.Z.ENTER||gr.which===nt.Z.ENTER)&&Vi()},nr=typeof Nt=="function"?Nt(un):de.createElement("i",{className:"arrow"});nr&&(nr=de.createElement("div",{className:"".concat(Pn,"-expand-icon"),onClick:["header","icon"].includes(Rt)?Vi:void 0},nr));var sr=ve()((0,He.Z)((0,He.Z)((0,He.Z)({},"".concat(Pn,"-item"),!0),"".concat(Pn,"-item-active"),Ze),"".concat(Pn,"-item-disabled"),ii),$e),kr=ve()(Ie,(0,He.Z)((0,He.Z)((0,He.Z)({},"".concat(Pn,"-header"),!0),"".concat(Pn,"-header-collapsible-only"),Hi),"".concat(Pn,"-icon-collapsible-only"),hi)),or={className:kr,"aria-expanded":Ze,"aria-disabled":ii,onKeyDown:er};return!Hi&&!hi&&(or.onClick=Vi,or.role=bt?"tab":"button",or.tabIndex=ii?-1:0),de.createElement("div",(0,Me.Z)({},ei,{ref:ln,className:sr}),de.createElement("div",or,xn&&nr,de.createElement("span",{className:"".concat(Pn,"-header-text"),onClick:Rt==="header"?Vi:void 0},Yt),Jn&&de.createElement("div",{className:"".concat(Pn,"-extra")},It)),de.createElement(kt.default,(0,Me.Z)({visible:Ze,leavedClassName:"".concat(Pn,"-content-hidden")},xe,{forceRender:qe,removeOnLeave:_n}),function(_i,gr){var Mr=_i.className,Ei=_i.style;return de.createElement(ht,{ref:gr,prefixCls:Pn,className:Mr,style:Ei,isActive:Ze,forceRender:qe,role:bt?"tabpanel":void 0},ni)}))}),yt=gt,Lt=["children","label","key","collapsible","onItemClick","destroyInactivePanel"],Dt=function(ln,oi){var xn=oi.prefixCls,Ie=oi.accordion,Ze=oi.collapsible,Hn=oi.destroyInactivePanel,qe=oi.onItemClick,$e=oi.activeKey,Pn=oi.openMotion,Rt=oi.expandIcon;return ln.map(function(bt,Pt){var It=bt.children,Yt=bt.label,Nt=bt.key,xe=bt.collapsible,_n=bt.onItemClick,ni=bt.destroyInactivePanel,ei=(0,he.Z)(bt,Lt),ii=String(Nt!=null?Nt:Pt),Hi=xe!=null?xe:Ze,hi=ni!=null?ni:Hn,Jn=function(nr){Hi!=="disabled"&&(qe(nr),_n==null||_n(nr))},Vi=!1;return Ie?Vi=$e[0]===ii:Vi=$e.indexOf(ii)>-1,de.createElement(yt,(0,Me.Z)({},ei,{prefixCls:xn,key:ii,panelKey:ii,isActive:Vi,accordion:Ie,openMotion:Pn,expandIcon:Rt,header:Yt,collapsible:Hi,onItemClick:Jn,destroyInactivePanel:hi}),It)})},zt=function(ln,oi,xn){if(!ln)return null;var Ie=xn.prefixCls,Ze=xn.accordion,Hn=xn.collapsible,qe=xn.destroyInactivePanel,$e=xn.onItemClick,Pn=xn.activeKey,Rt=xn.openMotion,bt=xn.expandIcon,Pt=ln.key||String(oi),It=ln.props,Yt=It.header,Nt=It.headerClass,xe=It.destroyInactivePanel,_n=It.collapsible,ni=It.onItemClick,ei=!1;Ze?ei=Pn[0]===Pt:ei=Pn.indexOf(Pt)>-1;var ii=_n!=null?_n:Hn,Hi=function(Vi){ii!=="disabled"&&($e(Vi),ni==null||ni(Vi))},hi={key:Pt,panelKey:Pt,header:Yt,headerClass:Nt,isActive:ei,prefixCls:Ie,destroyInactivePanel:xe!=null?xe:qe,openMotion:Rt,accordion:Ze,children:ln.props.children,onItemClick:Hi,expandIcon:bt,collapsible:ii};return typeof ln.type=="string"?ln:(Object.keys(hi).forEach(function(Jn){typeof hi[Jn]=="undefined"&&delete hi[Jn]}),de.cloneElement(ln,hi))};function Xt(un,ln,oi){return Array.isArray(un)?Dt(un,oi):(0,Ne.Z)(ln).map(function(xn,Ie){return zt(xn,Ie,oi)})}var re=Xt,le=Ft(26112);function ae(un){var ln=un;if(!Array.isArray(ln)){var oi=(0,ee.Z)(ln);ln=oi==="number"||oi==="string"?[ln]:[]}return ln.map(function(xn){return String(xn)})}var je=de.forwardRef(function(un,ln){var oi=un.prefixCls,xn=oi===void 0?"rc-collapse":oi,Ie=un.destroyInactivePanel,Ze=Ie===void 0?!1:Ie,Hn=un.style,qe=un.accordion,$e=un.className,Pn=un.children,Rt=un.collapsible,bt=un.openMotion,Pt=un.expandIcon,It=un.activeKey,Yt=un.defaultActiveKey,Nt=un.onChange,xe=un.items,_n=ve()(xn,$e),ni=(0,Fe.Z)([],{value:It,onChange:function(er){return Nt==null?void 0:Nt(er)},defaultValue:Yt,postState:ae}),ei=(0,Ae.Z)(ni,2),ii=ei[0],Hi=ei[1],hi=function(er){return Hi(function(){if(qe)return ii[0]===er?[]:[er];var nr=ii.indexOf(er),sr=nr>-1;return sr?ii.filter(function(kr){return kr!==er}):[].concat((0,Pe.Z)(ii),[er])})};(0,ye.ZP)(!Pn,"[rc-collapse] `children` will be removed in next major version. Please use `items` instead.");var Jn=re(xe,Pn,{prefixCls:xn,accordion:qe,openMotion:bt,expandIcon:Pt,collapsible:Rt,destroyInactivePanel:Ze,onItemClick:hi,activeKey:ii});return de.createElement("div",(0,Me.Z)({ref:ln,className:_n,style:Hn,role:qe?"tablist":void 0},(0,le.Z)(un,{aria:!0,data:!0})),Jn)}),ne=Object.assign(je,{Panel:yt}),Le=ne,ue=ne.Panel,Ee=Ft(2738),ge=Ft(62892),Ue=Ft(92343),nn=Ft(36355),_e=Ft(19716),Jt=de.forwardRef((un,ln)=>{const{getPrefixCls:oi}=de.useContext(nn.E_),{prefixCls:xn,className:Ie,showArrow:Ze=!0}=un,Hn=oi("collapse",xn),qe=ve()({[`${Hn}-no-arrow`]:!Ze},Ie);return de.createElement(Le.Panel,Object.assign({ref:ln},un,{prefixCls:Hn,className:qe}))}),De=Ft(17313),sn=Ft(8378),cn=Ft(83116),Te=Ft(37613);const en=un=>{const{componentCls:ln,contentBg:oi,padding:xn,headerBg:Ie,headerPadding:Ze,collapseHeaderPaddingSM:Hn,collapseHeaderPaddingLG:qe,collapsePanelBorderRadius:$e,lineWidth:Pn,lineType:Rt,colorBorder:bt,colorText:Pt,colorTextHeading:It,colorTextDisabled:Yt,fontSize:Nt,fontSizeLG:xe,lineHeight:_n,marginSM:ni,paddingSM:ei,paddingLG:ii,paddingXS:Hi,motionDurationSlow:hi,fontSizeIcon:Jn,contentPadding:Vi}=un,er=`${Pn}px ${Rt} ${bt}`;return{[ln]:Object.assign(Object.assign({},(0,De.Wf)(un)),{backgroundColor:Ie,border:er,borderBottom:0,borderRadius:`${$e}px`,"&-rtl":{direction:"rtl"},[`& > ${ln}-item`]:{borderBottom:er,"&:last-child":{[`
&,
& > ${ln}-header`]:{borderRadius:`0 0 ${$e}px ${$e}px`}},[`> ${ln}-header`]:{position:"relative",display:"flex",flexWrap:"nowrap",alignItems:"flex-start",padding:Ze,color:It,lineHeight:_n,cursor:"pointer",transition:`all ${hi}, visibility 0s`,[`> ${ln}-header-text`]:{flex:"auto"},"&:focus":{outline:"none"},[`${ln}-expand-icon`]:{height:Nt*_n,display:"flex",alignItems:"center",paddingInlineEnd:ni},[`${ln}-arrow`]:Object.assign(Object.assign({},(0,De.Ro)()),{fontSize:Jn,svg:{transition:`transform ${hi}`}}),[`${ln}-header-text`]:{marginInlineEnd:"auto"}},[`${ln}-header-collapsible-only`]:{cursor:"default",[`${ln}-header-text`]:{flex:"none",cursor:"pointer"}},[`${ln}-icon-collapsible-only`]:{cursor:"default",[`${ln}-expand-icon`]:{cursor:"pointer"}}},[`${ln}-content`]:{color:Pt,backgroundColor:oi,borderTop:er,[`& > ${ln}-content-box`]:{padding:Vi},"&-hidden":{display:"none"}},"&-small":{[`> ${ln}-item`]:{[`> ${ln}-header`]:{padding:Hn,paddingInlineStart:Hi,[`> ${ln}-expand-icon`]:{marginInlineStart:ei-Hi}},[`> ${ln}-content > ${ln}-content-box`]:{padding:ei}}},"&-large":{[`> ${ln}-item`]:{fontSize:xe,[`> ${ln}-header`]:{padding:qe,paddingInlineStart:xn,[`> ${ln}-expand-icon`]:{height:xe*_n,marginInlineStart:ii-xn}},[`> ${ln}-content > ${ln}-content-box`]:{padding:ii}}},[`${ln}-item:last-child`]:{[`> ${ln}-content`]:{borderRadius:`0 0 ${$e}px ${$e}px`}},[`& ${ln}-item-disabled > ${ln}-header`]:{"\n &,\n & > .arrow\n ":{color:Yt,cursor:"not-allowed"}},[`&${ln}-icon-position-end`]:{[`& > ${ln}-item`]:{[`> ${ln}-header`]:{[`${ln}-expand-icon`]:{order:1,paddingInlineEnd:0,paddingInlineStart:ni}}}}})}},Cn=un=>{const{componentCls:ln}=un,oi=`> ${ln}-item > ${ln}-header ${ln}-arrow svg`;return{[`${ln}-rtl`]:{[oi]:{transform:"rotate(180deg)"}}}},Gn=un=>{const{componentCls:ln,headerBg:oi,paddingXXS:xn,colorBorder:Ie}=un;return{[`${ln}-borderless`]:{backgroundColor:oi,border:0,[`> ${ln}-item`]:{borderBottom:`1px solid ${Ie}`},[`
> ${ln}-item:last-child,
> ${ln}-item:last-child ${ln}-header
`]:{borderRadius:0},[`> ${ln}-item:last-child`]:{borderBottom:0},[`> ${ln}-item > ${ln}-content`]:{backgroundColor:"transparent",borderTop:0},[`> ${ln}-item > ${ln}-content > ${ln}-content-box`]:{paddingTop:xn}}}},vn=un=>{const{componentCls:ln,paddingSM:oi}=un;return{[`${ln}-ghost`]:{backgroundColor:"transparent",border:0,[`> ${ln}-item`]:{borderBottom:0,[`> ${ln}-content`]:{backgroundColor:"transparent",border:0,[`> ${ln}-content-box`]:{paddingBlock:oi}}}}}};var zn=(0,cn.Z)("Collapse",un=>{const ln=(0,Te.TS)(un,{collapseHeaderPaddingSM:`${un.paddingXS}px ${un.paddingSM}px`,collapseHeaderPaddingLG:`${un.padding}px ${un.paddingLG}px`,collapsePanelBorderRadius:un.borderRadiusLG});return[en(ln),Gn(ln),vn(ln),Cn(ln),(0,sn.Z)(ln)]},un=>({headerPadding:`${un.paddingSM}px ${un.padding}px`,headerBg:un.colorFillAlter,contentPadding:`${un.padding}px 16px`,contentBg:un.colorBgContainer})),An=Object.assign(de.forwardRef((un,ln)=>{const{getPrefixCls:oi,direction:xn,collapse:Ie}=de.useContext(nn.E_),{prefixCls:Ze,className:Hn,rootClassName:qe,style:$e,bordered:Pn=!0,ghost:Rt,size:bt,expandIconPosition:Pt="start",children:It,expandIcon:Yt}=un,Nt=(0,_e.Z)(er=>{var nr;return(nr=bt!=null?bt:er)!==null&&nr!==void 0?nr:"middle"}),xe=oi("collapse",Ze),_n=oi(),[ni,ei]=zn(xe),ii=de.useMemo(()=>Pt==="left"?"start":Pt==="right"?"end":Pt,[Pt]),Hi=function(){let er=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};const nr=Yt?Yt(er):de.createElement(pt.Z,{rotate:er.isActive?90:void 0});return(0,Ue.Tm)(nr,()=>({className:ve()(nr.props.className,`${xe}-arrow`)}))},hi=ve()(`${xe}-icon-position-${ii}`,{[`${xe}-borderless`]:!Pn,[`${xe}-rtl`]:xn==="rtl",[`${xe}-ghost`]:!!Rt,[`${xe}-${Nt}`]:Nt!=="middle"},Ie==null?void 0:Ie.className,Hn,qe,ei),Jn=Object.assign(Object.assign({},(0,ge.Z)(_n)),{motionAppear:!1,leavedClassName:`${xe}-content-hidden`}),Vi=de.useMemo(()=>It?(0,Ne.Z)(It).map((er,nr)=>{var sr,kr;if(!((sr=er.props)===null||sr===void 0)&&sr.disabled){const or=(kr=er.key)!==null&&kr!==void 0?kr:String(nr),{disabled:_i,collapsible:gr}=er.props,Mr=Object.assign(Object.assign({},(0,Ee.Z)(er.props,["disabled"])),{key:or,collapsible:gr!=null?gr:_i?"disabled":void 0});return(0,Ue.Tm)(er,Mr)}return er}):null,[It]);return ni(de.createElement(Le,Object.assign({ref:ln,openMotion:Jn},(0,Ee.Z)(un,["rootClassName"]),{expandIcon:Hi,prefixCls:xe,className:hi,style:Object.assign(Object.assign({},Ie==null?void 0:Ie.style),$e)}),Vi))}),{Panel:Jt}),ui=An},39722:function(fn,Bn,Ft){"use strict";Ft.d(Bn,{t5:function(){return de}});var pt=Ft(92310),Ht=Ft.n(pt),ve=Ft(55477),Me=Ft(59301),Pe=Ft(36355),Ae=Ft(77578),ee=Ft(17356),Fe=function(Ne,He){var kt={};for(var nt in Ne)Object.prototype.hasOwnProperty.call(Ne,nt)&&He.indexOf(nt)<0&&(kt[nt]=Ne[nt]);if(Ne!=null&&typeof Object.getOwnPropertySymbols=="function")for(var et=0,nt=Object.getOwnPropertySymbols(Ne);et<nt.length;et++)He.indexOf(nt[et])<0&&Object.prototype.propertyIsEnumerable.call(Ne,nt[et])&&(kt[nt[et]]=Ne[nt[et]]);return kt};const ye=(Ne,He,kt)=>{if(!(!He&&!kt))return Me.createElement(Me.Fragment,null,He&&Me.createElement("div",{className:`${Ne}-title`},(0,Ae.Z)(He)),Me.createElement("div",{className:`${Ne}-inner-content`},(0,Ae.Z)(kt)))},de=Ne=>{const{hashId:He,prefixCls:kt,className:nt,style:et,placement:ht="top",title:lt,content:gt,children:yt}=Ne;return Me.createElement("div",{className:Ht()(He,kt,`${kt}-pure`,`${kt}-placement-${ht}`,nt),style:et},Me.createElement("div",{className:`${kt}-arrow`}),Me.createElement(ve.G,Object.assign({},Ne,{className:He,prefixCls:kt}),yt||ye(kt,lt,gt)))},he=Ne=>{const{prefixCls:He}=Ne,kt=Fe(Ne,["prefixCls"]),{getPrefixCls:nt}=Me.useContext(Pe.E_),et=nt("popover",He),[ht,lt]=(0,ee.Z)(et);return ht(Me.createElement(de,Object.assign({},kt,{prefixCls:et,hashId:lt})))};Bn.ZP=he},60324:function(fn,Bn,Ft){"use strict";var pt=Ft(92310),Ht=Ft.n(pt),ve=Ft(59301),Me=Ft(77578),Pe=Ft(62892),Ae=Ft(36355),ee=Ft(6848),Fe=Ft(39722),ye=Ft(17356),de=function(He,kt){var nt={};for(var et in He)Object.prototype.hasOwnProperty.call(He,et)&&kt.indexOf(et)<0&&(nt[et]=He[et]);if(He!=null&&typeof Object.getOwnPropertySymbols=="function")for(var ht=0,et=Object.getOwnPropertySymbols(He);ht<et.length;ht++)kt.indexOf(et[ht])<0&&Object.prototype.propertyIsEnumerable.call(He,et[ht])&&(nt[et[ht]]=He[et[ht]]);return nt};const he=He=>{let{title:kt,content:nt,prefixCls:et}=He;return ve.createElement(ve.Fragment,null,kt&&ve.createElement("div",{className:`${et}-title`},(0,Me.Z)(kt)),ve.createElement("div",{className:`${et}-inner-content`},(0,Me.Z)(nt)))},Ne=ve.forwardRef((He,kt)=>{const{prefixCls:nt,title:et,content:ht,overlayClassName:lt,placement:gt="top",trigger:yt="hover",mouseEnterDelay:Lt=.1,mouseLeaveDelay:Dt=.1,overlayStyle:zt={}}=He,Xt=de(He,["prefixCls","title","content","overlayClassName","placement","trigger","mouseEnterDelay","mouseLeaveDelay","overlayStyle"]),{getPrefixCls:re}=ve.useContext(Ae.E_),le=re("popover",nt),[ae,je]=(0,ye.Z)(le),ne=re(),Le=Ht()(lt,je);return ae(ve.createElement(ee.Z,Object.assign({placement:gt,trigger:yt,mouseEnterDelay:Lt,mouseLeaveDelay:Dt,overlayStyle:zt},Xt,{prefixCls:le,overlayClassName:Le,ref:kt,overlay:et||ht?ve.createElement(he,{prefixCls:le,title:et,content:ht}):null,transitionName:(0,Pe.m)(ne,"zoom-big",Xt.transitionName),"data-popover-inject":!0})))});Ne._InternalPanelDoNotUseOrYouWillBeFired=Fe.ZP,Bn.Z=Ne},17356:function(fn,Bn,Ft){"use strict";var pt=Ft(17313),Ht=Ft(29878),ve=Ft(19447),Me=Ft(33166),Pe=Ft(83116),Ae=Ft(37613);const ee=de=>{const{componentCls:he,popoverColor:Ne,minWidth:He,fontWeightStrong:kt,popoverPadding:nt,boxShadowSecondary:et,colorTextHeading:ht,borderRadiusLG:lt,zIndexPopup:gt,marginXS:yt,colorBgElevated:Lt,popoverBg:Dt}=de;return[{[he]:Object.assign(Object.assign({},(0,pt.Wf)(de)),{position:"absolute",top:0,left:{_skip_check_:!0,value:0},zIndex:gt,fontWeight:"normal",whiteSpace:"normal",textAlign:"start",cursor:"auto",userSelect:"text",transformOrigin:"var(--arrow-x, 50%) var(--arrow-y, 50%)","--antd-arrow-background-color":Lt,"&-rtl":{direction:"rtl"},"&-hidden":{display:"none"},[`${he}-content`]:{position:"relative"},[`${he}-inner`]:{backgroundColor:Dt,backgroundClip:"padding-box",borderRadius:lt,boxShadow:et,padding:nt},[`${he}-title`]:{minWidth:He,marginBottom:yt,color:ht,fontWeight:kt},[`${he}-inner-content`]:{color:Ne}})},(0,ve.ZP)(de,{colorBg:"var(--antd-arrow-background-color)"}),{[`${he}-pure`]:{position:"relative",maxWidth:"none",margin:de.sizePopupArrow,display:"inline-block",[`${he}-content`]:{display:"inline-block"}}}]},Fe=de=>{const{componentCls:he}=de;return{[he]:Me.i.map(Ne=>{const He=de[`${Ne}6`];return{[`&${he}-${Ne}`]:{"--antd-arrow-background-color":He,[`${he}-inner`]:{backgroundColor:He},[`${he}-arrow`]:{background:"transparent"}}}})}},ye=de=>{const{componentCls:he,lineWidth:Ne,lineType:He,colorSplit:kt,paddingSM:nt,controlHeight:et,fontSize:ht,lineHeight:lt,padding:gt}=de,yt=et-Math.round(ht*lt),Lt=yt/2,Dt=yt/2-Ne,zt=gt;return{[he]:{[`${he}-inner`]:{padding:0},[`${he}-title`]:{margin:0,padding:`${Lt}px ${zt}px ${Dt}px`,borderBottom:`${Ne}px ${He} ${kt}`},[`${he}-inner-content`]:{padding:`${nt}px ${zt}px`}}}};Bn.Z=(0,Pe.Z)("Popover",de=>{const{colorBgElevated:he,colorText:Ne,wireframe:He}=de,kt=(0,Ae.TS)(de,{popoverPadding:12,popoverBg:he,popoverColor:Ne});return[ee(kt),Fe(kt),He&&ye(kt),(0,Ht._y)(kt,"zoom-big")]},de=>({width:177,minWidth:177,zIndexPopup:de.zIndexPopupBase+30}),{resetStyle:!1,deprecatedTokens:[["width","minWidth"]]})},13570:function(fn,Bn,Ft){"use strict";Ft.d(Bn,{Z:function(){return Jt}});var pt=Ft(72308),Ht=Ft(59301),ve={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M908.1 353.1l-253.9-36.9L540.7 86.1c-3.1-6.3-8.2-11.4-14.5-14.5-15.8-7.8-35-1.3-42.9 14.5L369.8 316.2l-253.9 36.9c-7 1-13.4 4.3-18.3 9.3a32.05 32.05 0 00.6 45.3l183.7 179.1-43.4 252.9a31.95 31.95 0 0046.4 33.7L512 754l227.1 119.4c6.2 3.3 13.4 4.4 20.3 3.2 17.4-3 29.1-19.5 26.1-36.9l-43.4-252.9 183.7-179.1c5-4.9 8.3-11.3 9.3-18.3 2.7-17.5-9.5-33.7-27-36.3z"}}]},name:"star",theme:"filled"},Me=ve,Pe=Ft(7657),Ae=function(sn,cn){return Ht.createElement(Pe.Z,(0,pt.Z)({},sn,{ref:cn,icon:Me}))},ee=Ht.forwardRef(Ae),Fe=ee,ye=Ft(92310),de=Ft.n(ye),he=Ft(49618),Ne=Ft(52487),He=Ft(74416),kt=Ft(18929),nt=Ft(10228),et=Ft(26112);function ht(De,sn){var cn=De.disabled,Te=De.prefixCls,en=De.character,Cn=De.characterRender,Gn=De.index,vn=De.count,zn=De.value,me=De.allowHalf,An=De.focused,ui=De.onHover,un=De.onClick,ln=function(Pn){ui(Pn,Gn)},oi=function(Pn){un(Pn,Gn)},xn=function(Pn){Pn.keyCode===nt.Z.ENTER&&un(Pn,Gn)},Ie=Gn+1,Ze=new Set([Te]);zn===0&&Gn===0&&An?Ze.add("".concat(Te,"-focused")):me&&zn+.5>=Ie&&zn<Ie?(Ze.add("".concat(Te,"-half")),Ze.add("".concat(Te,"-active")),An&&Ze.add("".concat(Te,"-focused"))):(Ie<=zn?Ze.add("".concat(Te,"-full")):Ze.add("".concat(Te,"-zero")),Ie===zn&&An&&Ze.add("".concat(Te,"-focused")));var Hn=typeof en=="function"?en(De):en,qe=Ht.createElement("li",{className:de()(Array.from(Ze)),ref:sn},Ht.createElement("div",{onClick:cn?null:oi,onKeyDown:cn?null:xn,onMouseMove:cn?null:ln,role:"radio","aria-checked":zn>Gn?"true":"false","aria-posinset":Gn+1,"aria-setsize":vn,tabIndex:cn?-1:0},Ht.createElement("div",{className:"".concat(Te,"-first")},Hn),Ht.createElement("div",{className:"".concat(Te,"-second")},Hn)));return Cn&&(qe=Cn(qe,De)),qe}var lt=Ht.forwardRef(ht);function gt(){var De=Ht.useRef({});function sn(Te){return De.current[Te]}function cn(Te){return function(en){De.current[Te]=en}}return[sn,cn]}function yt(De){var sn=De.pageXOffset,cn="scrollLeft";if(typeof sn!="number"){var Te=De.document;sn=Te.documentElement[cn],typeof sn!="number"&&(sn=Te.body[cn])}return sn}function Lt(De){var sn,cn,Te=De.ownerDocument,en=Te.body,Cn=Te&&Te.documentElement,Gn=De.getBoundingClientRect();return sn=Gn.left,cn=Gn.top,sn-=Cn.clientLeft||en.clientLeft||0,cn-=Cn.clientTop||en.clientTop||0,{left:sn,top:cn}}function Dt(De){var sn=Lt(De),cn=De.ownerDocument,Te=cn.defaultView||cn.parentWindow;return sn.left+=yt(Te),sn.left}var zt=["prefixCls","className","defaultValue","value","count","allowHalf","allowClear","character","characterRender","disabled","direction","tabIndex","autoFocus","onHoverChange","onChange","onFocus","onBlur","onKeyDown","onMouseLeave"];function Xt(De,sn){var cn,Te=De.prefixCls,en=Te===void 0?"rc-rate":Te,Cn=De.className,Gn=De.defaultValue,vn=De.value,zn=De.count,me=zn===void 0?5:zn,An=De.allowHalf,ui=An===void 0?!1:An,un=De.allowClear,ln=un===void 0?!0:un,oi=De.character,xn=oi===void 0?"\u2605":oi,Ie=De.characterRender,Ze=De.disabled,Hn=De.direction,qe=Hn===void 0?"ltr":Hn,$e=De.tabIndex,Pn=$e===void 0?0:$e,Rt=De.autoFocus,bt=De.onHoverChange,Pt=De.onChange,It=De.onFocus,Yt=De.onBlur,Nt=De.onKeyDown,xe=De.onMouseLeave,_n=(0,He.Z)(De,zt),ni=gt(),ei=(0,Ne.Z)(ni,2),ii=ei[0],Hi=ei[1],hi=Ht.useRef(null),Jn=function(){if(!Ze){var Xe;(Xe=hi.current)===null||Xe===void 0||Xe.focus()}};Ht.useImperativeHandle(sn,function(){return{focus:Jn,blur:function(){if(!Ze){var Xe;(Xe=hi.current)===null||Xe===void 0||Xe.blur()}}}});var Vi=(0,kt.Z)(Gn||0,{value:vn}),er=(0,Ne.Z)(Vi,2),nr=er[0],sr=er[1],kr=(0,kt.Z)(null),or=(0,Ne.Z)(kr,2),_i=or[0],gr=or[1],Mr=function(Xe,Dn){var vi=qe==="rtl",$n=Xe+1;if(ui){var ki=ii(Xe),pe=Dt(ki),Tn=ki.clientWidth;(vi&&Dn-pe>Tn/2||!vi&&Dn-pe<Tn/2)&&($n-=.5)}return $n},Ei=function(Xe){sr(Xe),Pt==null||Pt(Xe)},Qr=Ht.useState(!1),Rn=(0,Ne.Z)(Qr,2),Ct=Rn[0],zi=Rn[1],Ci=function(){zi(!0),It==null||It()},ze=function(){zi(!1),Yt==null||Yt()},Yn=Ht.useState(null),Xn=(0,Ne.Z)(Yn,2),fi=Xn[0],an=Xn[1],Sn=function(Xe,Dn){var vi=Mr(Dn,Xe.pageX);vi!==_i&&(an(vi),gr(null)),bt==null||bt(vi)},be=function(Xe){Ze||(an(null),gr(null),bt==null||bt(void 0)),Xe&&(xe==null||xe(Xe))},Ce=function(Xe,Dn){var vi=Mr(Dn,Xe.pageX),$n=!1;ln&&($n=vi===nr),be(),Ei($n?0:vi),gr($n?vi:null)},we=function(Xe){var Dn=Xe.keyCode,vi=qe==="rtl",$n=nr;Dn===nt.Z.RIGHT&&$n<me&&!vi?(ui?$n+=.5:$n+=1,Ei($n),Xe.preventDefault()):Dn===nt.Z.LEFT&&$n>0&&!vi||Dn===nt.Z.RIGHT&&$n>0&&vi?(ui?$n-=.5:$n-=1,Ei($n),Xe.preventDefault()):Dn===nt.Z.LEFT&&$n<me&&vi&&(ui?$n+=.5:$n+=1,Ei($n),Xe.preventDefault()),Nt==null||Nt(Xe)};Ht.useEffect(function(){Rt&&!Ze&&Jn()},[]);var kn=new Array(me).fill(0).map(function(ti,Xe){return Ht.createElement(lt,{ref:Hi(Xe),index:Xe,count:me,disabled:Ze,prefixCls:"".concat(en,"-star"),allowHalf:ui,value:fi===null?nr:fi,onClick:Ce,onHover:Sn,key:ti||Xe,character:xn,characterRender:Ie,focused:Ct})}),Qn=de()(en,Cn,(cn={},(0,he.Z)(cn,"".concat(en,"-disabled"),Ze),(0,he.Z)(cn,"".concat(en,"-rtl"),qe==="rtl"),cn));return Ht.createElement("ul",(0,pt.Z)({className:Qn,onMouseLeave:be,tabIndex:Ze?-1:Pn,onFocus:Ze?null:Ci,onBlur:Ze?null:ze,onKeyDown:Ze?null:we,ref:hi,role:"radiogroup"},(0,et.Z)(_n,{aria:!0,data:!0,attr:!0})),kn)}var re=Ht.forwardRef(Xt),le=re,ae=Ft(36355),je=Ft(6848),ne=Ft(17313),Le=Ft(83116),ue=Ft(37613);const Ee=De=>{const{componentCls:sn}=De;return{[`${sn}-star`]:{position:"relative",display:"inline-block",color:"inherit",cursor:"pointer","&:not(:last-child)":{marginInlineEnd:De.marginXS},"> div":{transition:`all ${De.motionDurationMid}, outline 0s`,"&:hover":{transform:De.starHoverScale},"&:focus":{outline:0},"&:focus-visible":{outline:`${De.lineWidth}px dashed ${De.starColor}`,transform:De.starHoverScale}},"&-first, &-second":{color:De.starBg,transition:`all ${De.motionDurationMid}`,userSelect:"none",[De.iconCls]:{verticalAlign:"middle"}},"&-first":{position:"absolute",top:0,insetInlineStart:0,width:"50%",height:"100%",overflow:"hidden",opacity:0},[`&-half ${sn}-star-first, &-half ${sn}-star-second`]:{opacity:1},[`&-half ${sn}-star-first, &-full ${sn}-star-second`]:{color:"inherit"}}}},ge=De=>({[`&-rtl${De.componentCls}`]:{direction:"rtl"}}),Ue=De=>{const{componentCls:sn}=De;return{[sn]:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},(0,ne.Wf)(De)),{display:"inline-block",margin:0,padding:0,color:De.starColor,fontSize:De.starSize,lineHeight:"unset",listStyle:"none",outline:"none",[`&-disabled${sn} ${sn}-star`]:{cursor:"default","> div:hover":{transform:"scale(1)"}}}),Ee(De)),{[`+ ${sn}-text`]:{display:"inline-block",marginInlineStart:De.marginXS,fontSize:De.fontSize}}),ge(De))}};var nn=(0,Le.Z)("Rate",De=>{const sn=(0,ue.TS)(De,{});return[Ue(sn)]},De=>({starColor:De.yellow6,starSize:De.controlHeightLG*.5,starHoverScale:"scale(1.1)",starBg:De.colorFillContent})),_e=function(De,sn){var cn={};for(var Te in De)Object.prototype.hasOwnProperty.call(De,Te)&&sn.indexOf(Te)<0&&(cn[Te]=De[Te]);if(De!=null&&typeof Object.getOwnPropertySymbols=="function")for(var en=0,Te=Object.getOwnPropertySymbols(De);en<Te.length;en++)sn.indexOf(Te[en])<0&&Object.prototype.propertyIsEnumerable.call(De,Te[en])&&(cn[Te[en]]=De[Te[en]]);return cn},Jt=Ht.forwardRef((De,sn)=>{const{prefixCls:cn,className:Te,rootClassName:en,style:Cn,tooltips:Gn,character:vn=Ht.createElement(Fe,null)}=De,zn=_e(De,["prefixCls","className","rootClassName","style","tooltips","character"]),me=(Ze,Hn)=>{let{index:qe}=Hn;return Gn?Ht.createElement(je.Z,{title:Gn[qe]},Ze):Ze},{getPrefixCls:An,direction:ui,rate:un}=Ht.useContext(ae.E_),ln=An("rate",cn),[oi,xn]=nn(ln),Ie=Object.assign(Object.assign({},un==null?void 0:un.style),Cn);return oi(Ht.createElement(le,Object.assign({ref:sn,character:vn,characterRender:me},zn,{className:de()(Te,en,xn,un==null?void 0:un.className),style:Ie,prefixCls:ln,direction:ui})))})},61621:function(fn,Bn,Ft){"use strict";Ft.d(Bn,{Z:function(){return xn}});var pt=Ft(92310),Ht=Ft.n(pt),ve=Ft(59301),Me=Ft(36355),Pe=Ft(2738),ee=Ie=>{const{prefixCls:Ze,className:Hn,style:qe,size:$e,shape:Pn}=Ie,Rt=Ht()({[`${Ze}-lg`]:$e==="large",[`${Ze}-sm`]:$e==="small"}),bt=Ht()({[`${Ze}-circle`]:Pn==="circle",[`${Ze}-square`]:Pn==="square",[`${Ze}-round`]:Pn==="round"}),Pt=ve.useMemo(()=>typeof $e=="number"?{width:$e,height:$e,lineHeight:`${$e}px`}:{},[$e]);return ve.createElement("span",{className:Ht()(Ze,Rt,bt,Hn),style:Object.assign(Object.assign({},Pt),qe)})},Fe=Ft(93083),ye=Ft(83116),de=Ft(37613);const he=new Fe.Keyframes("ant-skeleton-loading",{"0%":{backgroundPosition:"100% 50%"},"100%":{backgroundPosition:"0 50%"}}),Ne=Ie=>({height:Ie,lineHeight:`${Ie}px`}),He=Ie=>Object.assign({width:Ie},Ne(Ie)),kt=Ie=>({background:Ie.skeletonLoadingBackground,backgroundSize:"400% 100%",animationName:he,animationDuration:Ie.skeletonLoadingMotionDuration,animationTimingFunction:"ease",animationIterationCount:"infinite"}),nt=Ie=>Object.assign({width:Ie*5,minWidth:Ie*5},Ne(Ie)),et=Ie=>{const{skeletonAvatarCls:Ze,gradientFromColor:Hn,controlHeight:qe,controlHeightLG:$e,controlHeightSM:Pn}=Ie;return{[`${Ze}`]:Object.assign({display:"inline-block",verticalAlign:"top",background:Hn},He(qe)),[`${Ze}${Ze}-circle`]:{borderRadius:"50%"},[`${Ze}${Ze}-lg`]:Object.assign({},He($e)),[`${Ze}${Ze}-sm`]:Object.assign({},He(Pn))}},ht=Ie=>{const{controlHeight:Ze,borderRadiusSM:Hn,skeletonInputCls:qe,controlHeightLG:$e,controlHeightSM:Pn,gradientFromColor:Rt}=Ie;return{[`${qe}`]:Object.assign({display:"inline-block",verticalAlign:"top",background:Rt,borderRadius:Hn},nt(Ze)),[`${qe}-lg`]:Object.assign({},nt($e)),[`${qe}-sm`]:Object.assign({},nt(Pn))}},lt=Ie=>Object.assign({width:Ie},Ne(Ie)),gt=Ie=>{const{skeletonImageCls:Ze,imageSizeBase:Hn,gradientFromColor:qe,borderRadiusSM:$e}=Ie;return{[`${Ze}`]:Object.assign(Object.assign({display:"flex",alignItems:"center",justifyContent:"center",verticalAlign:"top",background:qe,borderRadius:$e},lt(Hn*2)),{[`${Ze}-path`]:{fill:"#bfbfbf"},[`${Ze}-svg`]:Object.assign(Object.assign({},lt(Hn)),{maxWidth:Hn*4,maxHeight:Hn*4}),[`${Ze}-svg${Ze}-svg-circle`]:{borderRadius:"50%"}}),[`${Ze}${Ze}-circle`]:{borderRadius:"50%"}}},yt=(Ie,Ze,Hn)=>{const{skeletonButtonCls:qe}=Ie;return{[`${Hn}${qe}-circle`]:{width:Ze,minWidth:Ze,borderRadius:"50%"},[`${Hn}${qe}-round`]:{borderRadius:Ze}}},Lt=Ie=>Object.assign({width:Ie*2,minWidth:Ie*2},Ne(Ie)),Dt=Ie=>{const{borderRadiusSM:Ze,skeletonButtonCls:Hn,controlHeight:qe,controlHeightLG:$e,controlHeightSM:Pn,gradientFromColor:Rt}=Ie;return Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({[`${Hn}`]:Object.assign({display:"inline-block",verticalAlign:"top",background:Rt,borderRadius:Ze,width:qe*2,minWidth:qe*2},Lt(qe))},yt(Ie,qe,Hn)),{[`${Hn}-lg`]:Object.assign({},Lt($e))}),yt(Ie,$e,`${Hn}-lg`)),{[`${Hn}-sm`]:Object.assign({},Lt(Pn))}),yt(Ie,Pn,`${Hn}-sm`))},zt=Ie=>{const{componentCls:Ze,skeletonAvatarCls:Hn,skeletonTitleCls:qe,skeletonParagraphCls:$e,skeletonButtonCls:Pn,skeletonInputCls:Rt,skeletonImageCls:bt,controlHeight:Pt,controlHeightLG:It,controlHeightSM:Yt,gradientFromColor:Nt,padding:xe,marginSM:_n,borderRadius:ni,titleHeight:ei,blockRadius:ii,paragraphLiHeight:Hi,controlHeightXS:hi,paragraphMarginTop:Jn}=Ie;return{[`${Ze}`]:{display:"table",width:"100%",[`${Ze}-header`]:{display:"table-cell",paddingInlineEnd:xe,verticalAlign:"top",[`${Hn}`]:Object.assign({display:"inline-block",verticalAlign:"top",background:Nt},He(Pt)),[`${Hn}-circle`]:{borderRadius:"50%"},[`${Hn}-lg`]:Object.assign({},He(It)),[`${Hn}-sm`]:Object.assign({},He(Yt))},[`${Ze}-content`]:{display:"table-cell",width:"100%",verticalAlign:"top",[`${qe}`]:{width:"100%",height:ei,background:Nt,borderRadius:ii,[`+ ${$e}`]:{marginBlockStart:Yt}},[`${$e}`]:{padding:0,"> li":{width:"100%",height:Hi,listStyle:"none",background:Nt,borderRadius:ii,"+ li":{marginBlockStart:hi}}},[`${$e}> li:last-child:not(:first-child):not(:nth-child(2))`]:{width:"61%"}},[`&-round ${Ze}-content`]:{[`${qe}, ${$e} > li`]:{borderRadius:ni}}},[`${Ze}-with-avatar ${Ze}-content`]:{[`${qe}`]:{marginBlockStart:_n,[`+ ${$e}`]:{marginBlockStart:Jn}}},[`${Ze}${Ze}-element`]:Object.assign(Object.assign(Object.assign(Object.assign({display:"inline-block",width:"auto"},Dt(Ie)),et(Ie)),ht(Ie)),gt(Ie)),[`${Ze}${Ze}-block`]:{width:"100%",[`${Pn}`]:{width:"100%"},[`${Rt}`]:{width:"100%"}},[`${Ze}${Ze}-active`]:{[`
${qe},
${$e} > li,
${Hn},
${Pn},
${Rt},
${bt}
`]:Object.assign({},kt(Ie))}}};var Xt=(0,ye.Z)("Skeleton",Ie=>{const{componentCls:Ze}=Ie,Hn=(0,de.TS)(Ie,{skeletonAvatarCls:`${Ze}-avatar`,skeletonTitleCls:`${Ze}-title`,skeletonParagraphCls:`${Ze}-paragraph`,skeletonButtonCls:`${Ze}-button`,skeletonInputCls:`${Ze}-input`,skeletonImageCls:`${Ze}-image`,imageSizeBase:Ie.controlHeight*1.5,borderRadius:100,skeletonLoadingBackground:`linear-gradient(90deg, ${Ie.gradientFromColor} 25%, ${Ie.gradientToColor} 37%, ${Ie.gradientFromColor} 63%)`,skeletonLoadingMotionDuration:"1.4s"});return[zt(Hn)]},Ie=>{const{colorFillContent:Ze,colorFill:Hn}=Ie,qe=Ze,$e=Hn;return{color:qe,colorGradientEnd:$e,gradientFromColor:qe,gradientToColor:$e,titleHeight:Ie.controlHeight/2,blockRadius:Ie.borderRadiusSM,paragraphMarginTop:Ie.marginLG+Ie.marginXXS,paragraphLiHeight:Ie.controlHeight/2}},{deprecatedTokens:[["color","gradientFromColor"],["colorGradientEnd","gradientToColor"]]}),le=Ie=>{const{prefixCls:Ze,className:Hn,rootClassName:qe,active:$e,shape:Pn="circle",size:Rt="default"}=Ie,{getPrefixCls:bt}=ve.useContext(Me.E_),Pt=bt("skeleton",Ze),[It,Yt]=Xt(Pt),Nt=(0,Pe.Z)(Ie,["prefixCls","className"]),xe=Ht()(Pt,`${Pt}-element`,{[`${Pt}-active`]:$e},Hn,qe,Yt);return It(ve.createElement("div",{className:xe},ve.createElement(ee,Object.assign({prefixCls:`${Pt}-avatar`,shape:Pn,size:Rt},Nt))))},je=Ie=>{const{prefixCls:Ze,className:Hn,rootClassName:qe,active:$e,block:Pn=!1,size:Rt="default"}=Ie,{getPrefixCls:bt}=ve.useContext(Me.E_),Pt=bt("skeleton",Ze),[It,Yt]=Xt(Pt),Nt=(0,Pe.Z)(Ie,["prefixCls"]),xe=Ht()(Pt,`${Pt}-element`,{[`${Pt}-active`]:$e,[`${Pt}-block`]:Pn},Hn,qe,Yt);return It(ve.createElement("div",{className:xe},ve.createElement(ee,Object.assign({prefixCls:`${Pt}-button`,size:Rt},Nt))))};const ne="M365.714286 329.142857q0 45.714286-32.036571 77.677714t-77.677714 32.036571-77.677714-32.036571-32.036571-77.677714 32.036571-77.677714 77.677714-32.036571 77.677714 32.036571 32.036571 77.677714zM950.857143 548.571429l0 256-804.571429 0 0-109.714286 182.857143-182.857143 91.428571 91.428571 292.571429-292.571429zM1005.714286 146.285714l-914.285714 0q-7.460571 0-12.873143 5.412571t-5.412571 12.873143l0 694.857143q0 7.460571 5.412571 12.873143t12.873143 5.412571l914.285714 0q7.460571 0 12.873143-5.412571t5.412571-12.873143l0-694.857143q0-7.460571-5.412571-12.873143t-12.873143-5.412571zM1097.142857 164.571429l0 694.857143q0 37.741714-26.843429 64.585143t-64.585143 26.843429l-914.285714 0q-37.741714 0-64.585143-26.843429t-26.843429-64.585143l0-694.857143q0-37.741714 26.843429-64.585143t64.585143-26.843429l914.285714 0q37.741714 0 64.585143 26.843429t26.843429 64.585143z";var ue=Ie=>{const{prefixCls:Ze,className:Hn,rootClassName:qe,style:$e,active:Pn}=Ie,{getPrefixCls:Rt}=ve.useContext(Me.E_),bt=Rt("skeleton",Ze),[Pt,It]=Xt(bt),Yt=Ht()(bt,`${bt}-element`,{[`${bt}-active`]:Pn},Hn,qe,It);return Pt(ve.createElement("div",{className:Yt},ve.createElement("div",{className:Ht()(`${bt}-image`,Hn),style:$e},ve.createElement("svg",{viewBox:"0 0 1098 1024",xmlns:"http://www.w3.org/2000/svg",className:`${bt}-image-svg`},ve.createElement("path",{d:ne,className:`${bt}-image-path`})))))},ge=Ie=>{const{prefixCls:Ze,className:Hn,rootClassName:qe,active:$e,block:Pn,size:Rt="default"}=Ie,{getPrefixCls:bt}=ve.useContext(Me.E_),Pt=bt("skeleton",Ze),[It,Yt]=Xt(Pt),Nt=(0,Pe.Z)(Ie,["prefixCls"]),xe=Ht()(Pt,`${Pt}-element`,{[`${Pt}-active`]:$e,[`${Pt}-block`]:Pn},Hn,qe,Yt);return It(ve.createElement("div",{className:xe},ve.createElement(ee,Object.assign({prefixCls:`${Pt}-input`,size:Rt},Nt))))},Ue=Ft(72308),nn={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M888 792H200V168c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v688c0 4.4 3.6 8 8 8h752c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zM288 604a64 64 0 10128 0 64 64 0 10-128 0zm118-224a48 48 0 1096 0 48 48 0 10-96 0zm158 228a96 96 0 10192 0 96 96 0 10-192 0zm148-314a56 56 0 10112 0 56 56 0 10-112 0z"}}]},name:"dot-chart",theme:"outlined"},_e=nn,qt=Ft(7657),Jt=function(Ze,Hn){return ve.createElement(qt.Z,(0,Ue.Z)({},Ze,{ref:Hn,icon:_e}))},De=ve.forwardRef(Jt),sn=De,Te=Ie=>{const{prefixCls:Ze,className:Hn,rootClassName:qe,style:$e,active:Pn,children:Rt}=Ie,{getPrefixCls:bt}=ve.useContext(Me.E_),Pt=bt("skeleton",Ze),[It,Yt]=Xt(Pt),Nt=Ht()(Pt,`${Pt}-element`,{[`${Pt}-active`]:Pn},Yt,Hn,qe),xe=Rt!=null?Rt:ve.createElement(sn,null);return It(ve.createElement("div",{className:Nt},ve.createElement("div",{className:Ht()(`${Pt}-image`,Hn),style:$e},xe)))},en=Ft(80702),Gn=Ie=>{const Ze=bt=>{const{width:Pt,rows:It=2}=Ie;if(Array.isArray(Pt))return Pt[bt];if(It-1===bt)return Pt},{prefixCls:Hn,className:qe,style:$e,rows:Pn}=Ie,Rt=(0,en.Z)(Array(Pn)).map((bt,Pt)=>ve.createElement("li",{key:Pt,style:{width:Ze(Pt)}}));return ve.createElement("ul",{className:Ht()(Hn,qe),style:$e},Rt)},zn=Ie=>{let{prefixCls:Ze,className:Hn,width:qe,style:$e}=Ie;return ve.createElement("h3",{className:Ht()(Ze,Hn),style:Object.assign({width:qe},$e)})};function me(Ie){return Ie&&typeof Ie=="object"?Ie:{}}function An(Ie,Ze){return Ie&&!Ze?{size:"large",shape:"square"}:{size:"large",shape:"circle"}}function ui(Ie,Ze){return!Ie&&Ze?{width:"38%"}:Ie&&Ze?{width:"50%"}:{}}function un(Ie,Ze){const Hn={};return(!Ie||!Ze)&&(Hn.width="61%"),!Ie&&Ze?Hn.rows=3:Hn.rows=2,Hn}const ln=Ie=>{const{prefixCls:Ze,loading:Hn,className:qe,rootClassName:$e,style:Pn,children:Rt,avatar:bt=!1,title:Pt=!0,paragraph:It=!0,active:Yt,round:Nt}=Ie,{getPrefixCls:xe,direction:_n,skeleton:ni}=ve.useContext(Me.E_),ei=xe("skeleton",Ze),[ii,Hi]=Xt(ei);if(Hn||!("loading"in Ie)){const hi=!!bt,Jn=!!Pt,Vi=!!It;let er;if(hi){const kr=Object.assign(Object.assign({prefixCls:`${ei}-avatar`},An(Jn,Vi)),me(bt));er=ve.createElement("div",{className:`${ei}-header`},ve.createElement(ee,Object.assign({},kr)))}let nr;if(Jn||Vi){let kr;if(Jn){const _i=Object.assign(Object.assign({prefixCls:`${ei}-title`},ui(hi,Vi)),me(Pt));kr=ve.createElement(zn,Object.assign({},_i))}let or;if(Vi){const _i=Object.assign(Object.assign({prefixCls:`${ei}-paragraph`},un(hi,Jn)),me(It));or=ve.createElement(Gn,Object.assign({},_i))}nr=ve.createElement("div",{className:`${ei}-content`},kr,or)}const sr=Ht()(ei,{[`${ei}-with-avatar`]:hi,[`${ei}-active`]:Yt,[`${ei}-rtl`]:_n==="rtl",[`${ei}-round`]:Nt},ni==null?void 0:ni.className,qe,$e,Hi);return ii(ve.createElement("div",{className:sr,style:Object.assign(Object.assign({},ni==null?void 0:ni.style),Pn)},er,nr))}return typeof Rt!="undefined"?Rt:null};ln.Button=je,ln.Avatar=le,ln.Input=ge,ln.Image=ue,ln.Node=Te;var oi=ln,xn=oi},31797:function(fn,Bn,Ft){"use strict";Ft.d(Bn,{default:function(){return Xt}});var pt=Ft(59301),Ht=Ft(56762),ve=Ft(92343),Me=Ft(92310),Pe=Ft.n(Me),Ae=Ft(36355),ee=Ft(61621),ye=re=>{const{value:le,formatter:ae,precision:je,decimalSeparator:ne,groupSeparator:Le="",prefixCls:ue}=re;let Ee;if(typeof ae=="function")Ee=ae(le);else{const ge=String(le),Ue=ge.match(/^(-?)(\d*)(\.(\d+))?$/);if(!Ue||ge==="-")Ee=ge;else{const nn=Ue[1];let _e=Ue[2]||"0",qt=Ue[4]||"";_e=_e.replace(/\B(?=(\d{3})+(?!\d))/g,Le),typeof je=="number"&&(qt=qt.padEnd(je,"0").slice(0,je>0?je:0)),qt&&(qt=`${ne}${qt}`),Ee=[pt.createElement("span",{key:"int",className:`${ue}-content-value-int`},nn,_e),qt&&pt.createElement("span",{key:"decimal",className:`${ue}-content-value-decimal`},qt)]}}return pt.createElement("span",{className:`${ue}-content-value`},Ee)},de=Ft(17313),he=Ft(83116),Ne=Ft(37613);const He=re=>{const{componentCls:le,marginXXS:ae,padding:je,colorTextDescription:ne,titleFontSize:Le,colorTextHeading:ue,contentFontSize:Ee,fontFamily:ge}=re;return{[`${le}`]:Object.assign(Object.assign({},(0,de.Wf)(re)),{[`${le}-title`]:{marginBottom:ae,color:ne,fontSize:Le},[`${le}-skeleton`]:{paddingTop:je},[`${le}-content`]:{color:ue,fontSize:Ee,fontFamily:ge,[`${le}-content-value`]:{display:"inline-block",direction:"ltr"},[`${le}-content-prefix, ${le}-content-suffix`]:{display:"inline-block"},[`${le}-content-prefix`]:{marginInlineEnd:ae},[`${le}-content-suffix`]:{marginInlineStart:ae}}})}};var kt=(0,he.Z)("Statistic",re=>{const le=(0,Ne.TS)(re,{});return[He(le)]},re=>{const{fontSizeHeading3:le,fontSize:ae}=re;return{titleFontSize:ae,contentFontSize:le}}),et=re=>{const{prefixCls:le,className:ae,rootClassName:je,style:ne,valueStyle:Le,value:ue=0,title:Ee,valueRender:ge,prefix:Ue,suffix:nn,loading:_e=!1,onMouseEnter:qt,onMouseLeave:Jt,decimalSeparator:De=".",groupSeparator:sn=","}=re,{getPrefixCls:cn,direction:Te,statistic:en}=pt.useContext(Ae.E_),Cn=cn("statistic",le),[Gn,vn]=kt(Cn),zn=pt.createElement(ye,Object.assign({decimalSeparator:De,groupSeparator:sn,prefixCls:Cn},re,{value:ue})),me=Pe()(Cn,{[`${Cn}-rtl`]:Te==="rtl"},en==null?void 0:en.className,ae,je,vn);return Gn(pt.createElement("div",{className:me,style:Object.assign(Object.assign({},en==null?void 0:en.style),ne),onMouseEnter:qt,onMouseLeave:Jt},Ee&&pt.createElement("div",{className:`${Cn}-title`},Ee),pt.createElement(ee.Z,{paragraph:!1,loading:_e,className:`${Cn}-skeleton`},pt.createElement("div",{style:Le,className:`${Cn}-content`},Ue&&pt.createElement("span",{className:`${Cn}-content-prefix`},Ue),ge?ge(zn):zn,nn&&pt.createElement("span",{className:`${Cn}-content-suffix`},nn)))))};const ht=[["Y",1e3*60*60*24*365],["M",1e3*60*60*24*30],["D",1e3*60*60*24],["H",1e3*60*60],["m",1e3*60],["s",1e3],["S",1]];function lt(re,le){let ae=re;const je=/\[[^\]]*]/g,ne=(le.match(je)||[]).map(ge=>ge.slice(1,-1)),Le=le.replace(je,"[]"),ue=ht.reduce((ge,Ue)=>{let[nn,_e]=Ue;if(ge.includes(nn)){const qt=Math.floor(ae/_e);return ae-=qt*_e,ge.replace(new RegExp(`${nn}+`,"g"),Jt=>{const De=Jt.length;return qt.toString().padStart(De,"0")})}return ge},Le);let Ee=0;return ue.replace(je,()=>{const ge=ne[Ee];return Ee+=1,ge})}function gt(re,le){const{format:ae=""}=le,je=new Date(re).getTime(),ne=Date.now(),Le=Math.max(je-ne,0);return lt(Le,ae)}const yt=1e3/30;function Lt(re){return new Date(re).getTime()}const Dt=re=>{const{value:le,format:ae="HH:mm:ss",onChange:je,onFinish:ne}=re,Le=(0,Ht.Z)(),ue=pt.useRef(null),Ee=()=>{ne==null||ne(),ue.current&&(clearInterval(ue.current),ue.current=null)},ge=()=>{const _e=Lt(le);_e>=Date.now()&&(ue.current=setInterval(()=>{Le(),je==null||je(_e-Date.now()),_e<Date.now()&&Ee()},yt))};pt.useEffect(()=>(ge(),()=>{ue.current&&(clearInterval(ue.current),ue.current=null)}),[le]);const Ue=(_e,qt)=>gt(_e,Object.assign(Object.assign({},qt),{format:ae})),nn=_e=>(0,ve.Tm)(_e,{title:void 0});return pt.createElement(et,Object.assign({},re,{valueRender:nn,formatter:Ue}))};var zt=pt.memo(Dt);et.Countdown=zt;var Xt=et},78673:function(fn,Bn,Ft){"use strict";Ft.d(Bn,{Z:function(){return Le}});var pt=Ft(58617),Ht=Ft(92310),ve=Ft.n(Ht),Me=Ft(72308),Pe=Ft(49618),Ae=Ft(52487),ee=Ft(74416),Fe=Ft(59301),ye=Ft(18929),de=Ft(10228),he=["prefixCls","className","checked","defaultChecked","disabled","loadingIcon","checkedChildren","unCheckedChildren","onClick","onChange","onKeyDown"],Ne=Fe.forwardRef(function(ue,Ee){var ge,Ue=ue.prefixCls,nn=Ue===void 0?"rc-switch":Ue,_e=ue.className,qt=ue.checked,Jt=ue.defaultChecked,De=ue.disabled,sn=ue.loadingIcon,cn=ue.checkedChildren,Te=ue.unCheckedChildren,en=ue.onClick,Cn=ue.onChange,Gn=ue.onKeyDown,vn=(0,ee.Z)(ue,he),zn=(0,ye.Z)(!1,{value:qt,defaultValue:Jt}),me=(0,Ae.Z)(zn,2),An=me[0],ui=me[1];function un(Ie,Ze){var Hn=An;return De||(Hn=Ie,ui(Hn),Cn==null||Cn(Hn,Ze)),Hn}function ln(Ie){Ie.which===de.Z.LEFT?un(!1,Ie):Ie.which===de.Z.RIGHT&&un(!0,Ie),Gn==null||Gn(Ie)}function oi(Ie){var Ze=un(!An,Ie);en==null||en(Ze,Ie)}var xn=ve()(nn,_e,(ge={},(0,Pe.Z)(ge,"".concat(nn,"-checked"),An),(0,Pe.Z)(ge,"".concat(nn,"-disabled"),De),ge));return Fe.createElement("button",(0,Me.Z)({},vn,{type:"button",role:"switch","aria-checked":An,disabled:De,className:xn,ref:Ee,onKeyDown:ln,onClick:oi}),sn,Fe.createElement("span",{className:"".concat(nn,"-inner")},Fe.createElement("span",{className:"".concat(nn,"-inner-checked")},cn),Fe.createElement("span",{className:"".concat(nn,"-inner-unchecked")},Te)))});Ne.displayName="Switch";var He=Ne,kt=Ft(14088),nt=Ft(36355),et=Ft(1684),ht=Ft(19716),lt=Ft(64993),gt=Ft(17313),yt=Ft(83116),Lt=Ft(37613);const Dt=ue=>{const{componentCls:Ee,trackHeightSM:ge,trackPadding:Ue,trackMinWidthSM:nn,innerMinMarginSM:_e,innerMaxMarginSM:qt,handleSizeSM:Jt}=ue,De=`${Ee}-inner`;return{[Ee]:{[`&${Ee}-small`]:{minWidth:nn,height:ge,lineHeight:`${ge}px`,[`${Ee}-inner`]:{paddingInlineStart:qt,paddingInlineEnd:_e,[`${De}-checked`]:{marginInlineStart:`calc(-100% + ${Jt+Ue*2}px - ${qt*2}px)`,marginInlineEnd:`calc(100% - ${Jt+Ue*2}px + ${qt*2}px)`},[`${De}-unchecked`]:{marginTop:-ge,marginInlineStart:0,marginInlineEnd:0}},[`${Ee}-handle`]:{width:Jt,height:Jt},[`${Ee}-loading-icon`]:{top:(Jt-ue.switchLoadingIconSize)/2,fontSize:ue.switchLoadingIconSize},[`&${Ee}-checked`]:{[`${Ee}-inner`]:{paddingInlineStart:_e,paddingInlineEnd:qt,[`${De}-checked`]:{marginInlineStart:0,marginInlineEnd:0},[`${De}-unchecked`]:{marginInlineStart:`calc(100% - ${Jt+Ue*2}px + ${qt*2}px)`,marginInlineEnd:`calc(-100% + ${Jt+Ue*2}px - ${qt*2}px)`}},[`${Ee}-handle`]:{insetInlineStart:`calc(100% - ${Jt+Ue}px)`}},[`&:not(${Ee}-disabled):active`]:{[`&:not(${Ee}-checked) ${De}`]:{[`${De}-unchecked`]:{marginInlineStart:ue.marginXXS/2,marginInlineEnd:-ue.marginXXS/2}},[`&${Ee}-checked ${De}`]:{[`${De}-checked`]:{marginInlineStart:-ue.marginXXS/2,marginInlineEnd:ue.marginXXS/2}}}}}}},zt=ue=>{const{componentCls:Ee,handleSize:ge}=ue;return{[Ee]:{[`${Ee}-loading-icon${ue.iconCls}`]:{position:"relative",top:(ge-ue.fontSize)/2,color:ue.switchLoadingIconColor,verticalAlign:"top"},[`&${Ee}-checked ${Ee}-loading-icon`]:{color:ue.switchColor}}}},Xt=ue=>{const{componentCls:Ee,motion:ge,trackPadding:Ue,handleBg:nn,handleShadow:_e,handleSize:qt}=ue,Jt=`${Ee}-handle`;return{[Ee]:{[Jt]:{position:"absolute",top:Ue,insetInlineStart:Ue,width:qt,height:qt,transition:`all ${ue.switchDuration} ease-in-out`,"&::before":{position:"absolute",top:0,insetInlineEnd:0,bottom:0,insetInlineStart:0,backgroundColor:nn,borderRadius:qt/2,boxShadow:_e,transition:`all ${ue.switchDuration} ease-in-out`,content:'""'}},[`&${Ee}-checked ${Jt}`]:{insetInlineStart:`calc(100% - ${qt+Ue}px)`},[`&:not(${Ee}-disabled):active`]:ge?{[`${Jt}::before`]:{insetInlineEnd:ue.switchHandleActiveInset,insetInlineStart:0},[`&${Ee}-checked ${Jt}::before`]:{insetInlineEnd:0,insetInlineStart:ue.switchHandleActiveInset}}:{}}}},re=ue=>{const{componentCls:Ee,trackHeight:ge,trackPadding:Ue,innerMinMargin:nn,innerMaxMargin:_e,handleSize:qt}=ue,Jt=`${Ee}-inner`;return{[Ee]:{[Jt]:{display:"block",overflow:"hidden",borderRadius:100,height:"100%",paddingInlineStart:_e,paddingInlineEnd:nn,transition:`padding-inline-start ${ue.switchDuration} ease-in-out, padding-inline-end ${ue.switchDuration} ease-in-out`,[`${Jt}-checked, ${Jt}-unchecked`]:{display:"block",color:ue.colorTextLightSolid,fontSize:ue.fontSizeSM,transition:`margin-inline-start ${ue.switchDuration} ease-in-out, margin-inline-end ${ue.switchDuration} ease-in-out`,pointerEvents:"none"},[`${Jt}-checked`]:{marginInlineStart:`calc(-100% + ${qt+Ue*2}px - ${_e*2}px)`,marginInlineEnd:`calc(100% - ${qt+Ue*2}px + ${_e*2}px)`},[`${Jt}-unchecked`]:{marginTop:-ge,marginInlineStart:0,marginInlineEnd:0}},[`&${Ee}-checked ${Jt}`]:{paddingInlineStart:nn,paddingInlineEnd:_e,[`${Jt}-checked`]:{marginInlineStart:0,marginInlineEnd:0},[`${Jt}-unchecked`]:{marginInlineStart:`calc(100% - ${qt+Ue*2}px + ${_e*2}px)`,marginInlineEnd:`calc(-100% + ${qt+Ue*2}px - ${_e*2}px)`}},[`&:not(${Ee}-disabled):active`]:{[`&:not(${Ee}-checked) ${Jt}`]:{[`${Jt}-unchecked`]:{marginInlineStart:Ue*2,marginInlineEnd:-Ue*2}},[`&${Ee}-checked ${Jt}`]:{[`${Jt}-checked`]:{marginInlineStart:-Ue*2,marginInlineEnd:Ue*2}}}}}},le=ue=>{const{componentCls:Ee,trackHeight:ge,trackMinWidth:Ue}=ue;return{[Ee]:Object.assign(Object.assign(Object.assign(Object.assign({},(0,gt.Wf)(ue)),{position:"relative",display:"inline-block",boxSizing:"border-box",minWidth:Ue,height:ge,lineHeight:`${ge}px`,verticalAlign:"middle",background:ue.colorTextQuaternary,border:"0",borderRadius:100,cursor:"pointer",transition:`all ${ue.motionDurationMid}`,userSelect:"none",[`&:hover:not(${Ee}-disabled)`]:{background:ue.colorTextTertiary}}),(0,gt.Qy)(ue)),{[`&${Ee}-checked`]:{background:ue.switchColor,[`&:hover:not(${Ee}-disabled)`]:{background:ue.colorPrimaryHover}},[`&${Ee}-loading, &${Ee}-disabled`]:{cursor:"not-allowed",opacity:ue.switchDisabledOpacity,"*":{boxShadow:"none",cursor:"not-allowed"}},[`&${Ee}-rtl`]:{direction:"rtl"}})}};var ae=(0,yt.Z)("Switch",ue=>{const Ee=(0,Lt.TS)(ue,{switchDuration:ue.motionDurationMid,switchColor:ue.colorPrimary,switchDisabledOpacity:ue.opacityLoading,switchLoadingIconSize:ue.fontSizeIcon*.75,switchLoadingIconColor:`rgba(0, 0, 0, ${ue.opacityLoading})`,switchHandleActiveInset:"-30%"});return[le(Ee),re(Ee),Xt(Ee),zt(Ee),Dt(Ee)]},ue=>{const{fontSize:Ee,lineHeight:ge,controlHeight:Ue,colorWhite:nn}=ue,_e=Ee*ge,qt=Ue/2,Jt=2,De=_e-Jt*2,sn=qt-Jt*2;return{trackHeight:_e,trackHeightSM:qt,trackMinWidth:De*2+Jt*4,trackMinWidthSM:sn*2+Jt*2,trackPadding:Jt,handleBg:nn,handleSize:De,handleSizeSM:sn,handleShadow:`0 2px 4px 0 ${new lt.C("#00230b").setAlpha(.2).toRgbString()}`,innerMinMargin:De/2,innerMaxMargin:De+Jt+Jt*2,innerMinMarginSM:sn/2,innerMaxMarginSM:sn+Jt+Jt*2}}),je=function(ue,Ee){var ge={};for(var Ue in ue)Object.prototype.hasOwnProperty.call(ue,Ue)&&Ee.indexOf(Ue)<0&&(ge[Ue]=ue[Ue]);if(ue!=null&&typeof Object.getOwnPropertySymbols=="function")for(var nn=0,Ue=Object.getOwnPropertySymbols(ue);nn<Ue.length;nn++)Ee.indexOf(Ue[nn])<0&&Object.prototype.propertyIsEnumerable.call(ue,Ue[nn])&&(ge[Ue[nn]]=ue[Ue[nn]]);return ge};const ne=Fe.forwardRef((ue,Ee)=>{const{prefixCls:ge,size:Ue,disabled:nn,loading:_e,className:qt,rootClassName:Jt,style:De}=ue,sn=je(ue,["prefixCls","size","disabled","loading","className","rootClassName","style"]),{getPrefixCls:cn,direction:Te,switch:en}=Fe.useContext(nt.E_),Cn=Fe.useContext(et.Z),Gn=(nn!=null?nn:Cn)||_e,vn=cn("switch",ge),zn=Fe.createElement("div",{className:`${vn}-handle`},_e&&Fe.createElement(pt.Z,{className:`${vn}-loading-icon`})),[me,An]=ae(vn),ui=(0,ht.Z)(Ue),un=ve()(en==null?void 0:en.className,{[`${vn}-small`]:ui==="small",[`${vn}-loading`]:_e,[`${vn}-rtl`]:Te==="rtl"},qt,Jt,An),ln=Object.assign(Object.assign({},en==null?void 0:en.style),De);return me(Fe.createElement(kt.Z,{component:"Switch"},Fe.createElement(He,Object.assign({},sn,{prefixCls:vn,className:un,style:ln,disabled:Gn,ref:Ee,loadingIcon:zn}))))});ne.__ANT_SWITCH=!0;var Le=ne},12563:function(fn,Bn,Ft){"use strict";Ft.d(Bn,{default:function(){return je}});var pt=Ft(59301),Ht=Ft(99267),ve=Ft(92310),Me=Ft.n(ve),Pe=Ft(36785),Ae=Ft(47729),ee=Ft(14088),Fe=Ft(36355),ye=Ft(17313),de=Ft(37613),he=Ft(83116);const Ne=ne=>{const{paddingXXS:Le,lineWidth:ue,tagPaddingHorizontal:Ee,componentCls:ge}=ne,Ue=Ee-ue,nn=Le-ue;return{[ge]:Object.assign(Object.assign({},(0,ye.Wf)(ne)),{display:"inline-block",height:"auto",marginInlineEnd:ne.marginXS,paddingInline:Ue,fontSize:ne.tagFontSize,lineHeight:ne.tagLineHeight,whiteSpace:"nowrap",background:ne.defaultBg,border:`${ne.lineWidth}px ${ne.lineType} ${ne.colorBorder}`,borderRadius:ne.borderRadiusSM,opacity:1,transition:`all ${ne.motionDurationMid}`,textAlign:"start",position:"relative",[`&${ge}-rtl`]:{direction:"rtl"},"&, a, a:hover":{color:ne.defaultColor},[`${ge}-close-icon`]:{marginInlineStart:nn,color:ne.colorTextDescription,fontSize:ne.tagIconSize,cursor:"pointer",transition:`all ${ne.motionDurationMid}`,"&:hover":{color:ne.colorTextHeading}},[`&${ge}-has-color`]:{borderColor:"transparent",[`&, a, a:hover, ${ne.iconCls}-close, ${ne.iconCls}-close:hover`]:{color:ne.colorTextLightSolid}},"&-checkable":{backgroundColor:"transparent",borderColor:"transparent",cursor:"pointer",[`&:not(${ge}-checkable-checked):hover`]:{color:ne.colorPrimary,backgroundColor:ne.colorFillSecondary},"&:active, &-checked":{color:ne.colorTextLightSolid},"&-checked":{backgroundColor:ne.colorPrimary,"&:hover":{backgroundColor:ne.colorPrimaryHover}},"&:active":{backgroundColor:ne.colorPrimaryActive}},"&-hidden":{display:"none"},[`> ${ne.iconCls} + span, > span + ${ne.iconCls}`]:{marginInlineStart:Ue}}),[`${ge}-borderless`]:{borderColor:"transparent",background:ne.tagBorderlessBg}}},He=ne=>{const{lineWidth:Le,fontSizeIcon:ue}=ne,Ee=ne.fontSizeSM,ge=`${ne.lineHeightSM*Ee}px`;return(0,de.TS)(ne,{tagFontSize:Ee,tagLineHeight:ge,tagIconSize:ue-2*Le,tagPaddingHorizontal:8,tagBorderlessBg:ne.colorFillTertiary})},kt=ne=>({defaultBg:ne.colorFillQuaternary,defaultColor:ne.colorText});var nt=(0,he.Z)("Tag",ne=>{const Le=He(ne);return Ne(Le)},kt),et=function(ne,Le){var ue={};for(var Ee in ne)Object.prototype.hasOwnProperty.call(ne,Ee)&&Le.indexOf(Ee)<0&&(ue[Ee]=ne[Ee]);if(ne!=null&&typeof Object.getOwnPropertySymbols=="function")for(var ge=0,Ee=Object.getOwnPropertySymbols(ne);ge<Ee.length;ge++)Le.indexOf(Ee[ge])<0&&Object.prototype.propertyIsEnumerable.call(ne,Ee[ge])&&(ue[Ee[ge]]=ne[Ee[ge]]);return ue},lt=ne=>{const{prefixCls:Le,style:ue,className:Ee,checked:ge,onChange:Ue,onClick:nn}=ne,_e=et(ne,["prefixCls","style","className","checked","onChange","onClick"]),{getPrefixCls:qt,tag:Jt}=pt.useContext(Fe.E_),De=Cn=>{Ue==null||Ue(!ge),nn==null||nn(Cn)},sn=qt("tag",Le),[cn,Te]=nt(sn),en=Me()(sn,`${sn}-checkable`,{[`${sn}-checkable-checked`]:ge},Jt==null?void 0:Jt.className,Ee,Te);return cn(pt.createElement("span",Object.assign({},_e,{style:Object.assign(Object.assign({},ue),Jt==null?void 0:Jt.style),className:en,onClick:De})))},gt=Ft(45157);const yt=ne=>(0,gt.Z)(ne,(Le,ue)=>{let{textColor:Ee,lightBorderColor:ge,lightColor:Ue,darkColor:nn}=ue;return{[`${ne.componentCls}-${Le}`]:{color:Ee,background:Ue,borderColor:ge,"&-inverse":{color:ne.colorTextLightSolid,background:nn,borderColor:nn},[`&${ne.componentCls}-borderless`]:{borderColor:"transparent"}}}});var Lt=(0,he.b)(["Tag","preset"],ne=>{const Le=He(ne);return yt(Le)},kt);function Dt(ne){return typeof ne!="string"?ne:ne.charAt(0).toUpperCase()+ne.slice(1)}const zt=(ne,Le,ue)=>{const Ee=Dt(ue);return{[`${ne.componentCls}-${Le}`]:{color:ne[`color${ue}`],background:ne[`color${Ee}Bg`],borderColor:ne[`color${Ee}Border`],[`&${ne.componentCls}-borderless`]:{borderColor:"transparent"}}}};var Xt=(0,he.b)(["Tag","status"],ne=>{const Le=He(ne);return[zt(Le,"success","Success"),zt(Le,"processing","Info"),zt(Le,"error","Error"),zt(Le,"warning","Warning")]},kt),re=function(ne,Le){var ue={};for(var Ee in ne)Object.prototype.hasOwnProperty.call(ne,Ee)&&Le.indexOf(Ee)<0&&(ue[Ee]=ne[Ee]);if(ne!=null&&typeof Object.getOwnPropertySymbols=="function")for(var ge=0,Ee=Object.getOwnPropertySymbols(ne);ge<Ee.length;ge++)Le.indexOf(Ee[ge])<0&&Object.prototype.propertyIsEnumerable.call(ne,Ee[ge])&&(ue[Ee[ge]]=ne[Ee[ge]]);return ue};const le=(ne,Le)=>{const{prefixCls:ue,className:Ee,rootClassName:ge,style:Ue,children:nn,icon:_e,color:qt,onClose:Jt,closeIcon:De,closable:sn,bordered:cn=!0}=ne,Te=re(ne,["prefixCls","className","rootClassName","style","children","icon","color","onClose","closeIcon","closable","bordered"]),{getPrefixCls:en,direction:Cn,tag:Gn}=pt.useContext(Fe.E_),[vn,zn]=pt.useState(!0);pt.useEffect(()=>{"visible"in Te&&zn(Te.visible)},[Te.visible]);const me=(0,Pe.o2)(qt),An=(0,Pe.yT)(qt),ui=me||An,un=Object.assign(Object.assign({backgroundColor:qt&&!ui?qt:void 0},Gn==null?void 0:Gn.style),Ue),ln=en("tag",ue),[oi,xn]=nt(ln),Ie=Me()(ln,Gn==null?void 0:Gn.className,{[`${ln}-${qt}`]:ui,[`${ln}-has-color`]:qt&&!ui,[`${ln}-hidden`]:!vn,[`${ln}-rtl`]:Cn==="rtl",[`${ln}-borderless`]:!cn},Ee,ge,xn),Ze=bt=>{bt.stopPropagation(),Jt==null||Jt(bt),!bt.defaultPrevented&&zn(!1)},[,Hn]=(0,Ae.Z)(sn,De,bt=>bt===null?pt.createElement(Ht.Z,{className:`${ln}-close-icon`,onClick:Ze}):pt.createElement("span",{className:`${ln}-close-icon`,onClick:Ze},bt),null,!1),qe=typeof Te.onClick=="function"||nn&&nn.type==="a",$e=_e||null,Pn=$e?pt.createElement(pt.Fragment,null,$e,nn&&pt.createElement("span",null,nn)):nn,Rt=pt.createElement("span",Object.assign({},Te,{ref:Le,className:Ie,style:un}),Pn,Hn,me&&pt.createElement(Lt,{key:"preset",prefixCls:ln}),An&&pt.createElement(Xt,{key:"status",prefixCls:ln}));return oi(qe?pt.createElement(ee.Z,{component:"Tag"},Rt):Rt)},ae=pt.forwardRef(le);ae.CheckableTag=lt;var je=ae},98228:function(fn,Bn,Ft){"use strict";Ft.d(Bn,{default:function(){return Qr}});var pt=Ft(92310),Ht=Ft.n(pt),ve=Ft(72308),Me=Ft(80702),Pe=Ft(77321),Ae=Ft(52487),ee=Ft(74416),Fe=Ft(62853),ye=Ft(77861),de=Ft(17115),he=Ft(90782),Ne=Ft(18929),He=Ft(48736),kt=Ft(59301),nt=function(Rn){var Ct=kt.useRef({valueLabels:new Map});return kt.useMemo(function(){var zi=Ct.current.valueLabels,Ci=new Map,ze=Rn.map(function(Yn){var Xn,fi=Yn.value,an=(Xn=Yn.label)!==null&&Xn!==void 0?Xn:zi.get(fi);return Ci.set(fi,an),(0,Pe.Z)((0,Pe.Z)({},Yn),{},{label:an})});return Ct.current.valueLabels=Ci,[ze]},[Rn])},et=function(Rn,Ct,zi,Ci){return kt.useMemo(function(){var ze=Rn.map(function(an){var Sn=an.value;return Sn}),Yn=Ct.map(function(an){var Sn=an.value;return Sn}),Xn=ze.filter(function(an){return!Ci[an]});if(zi){var fi=(0,he.S)(ze,!0,Ci);ze=fi.checkedKeys,Yn=fi.halfCheckedKeys}return[Array.from(new Set([].concat((0,Me.Z)(Xn),(0,Me.Z)(ze)))),Yn]},[Rn,Ct,zi,Ci])},ht=Ft(71430),lt=function(Rn,Ct){return kt.useMemo(function(){var zi=(0,ht.I8)(Rn,{fieldNames:Ct,initWrapper:function(ze){return(0,Pe.Z)((0,Pe.Z)({},ze),{},{valueEntities:new Map})},processEntity:function(ze,Yn){var Xn=ze.node[Ct.value];if(0)var fi;Yn.valueEntities.set(Xn,ze)}});return zi},[Rn,Ct])},gt=Ft(49618),yt=Ft(11592),Lt=function(){return null},Dt=Lt,zt=["children","value"];function Xt(Rn){return(0,yt.Z)(Rn).map(function(Ct){if(!kt.isValidElement(Ct)||!Ct.type)return null;var zi=Ct,Ci=zi.key,ze=zi.props,Yn=ze.children,Xn=ze.value,fi=(0,ee.Z)(ze,zt),an=(0,Pe.Z)({key:Ci,value:Xn},fi),Sn=Xt(Yn);return Sn.length&&(an.children=Sn),an}).filter(function(Ct){return Ct})}function re(Rn){if(!Rn)return Rn;var Ct=(0,Pe.Z)({},Rn);return"props"in Ct||Object.defineProperty(Ct,"props",{get:function(){return(0,He.ZP)(!1,"New `rc-tree-select` not support return node instance as argument anymore. Please consider to remove `props` access."),Ct}}),Ct}function le(Rn,Ct,zi,Ci,ze,Yn){var Xn=null,fi=null;function an(){function Sn(be){var Ce=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"0",we=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;return be.map(function(kn,Qn){var ti="".concat(Ce,"-").concat(Qn),Xe=kn[Yn.value],Dn=zi.includes(Xe),vi=Sn(kn[Yn.children]||[],ti,Dn),$n=kt.createElement(Dt,kn,vi.map(function(pe){return pe.node}));if(Ct===Xe&&(Xn=$n),Dn){var ki={pos:ti,node:$n,children:vi};return we||fi.push(ki),ki}return null}).filter(function(kn){return kn})}fi||(fi=[],Sn(Ci),fi.sort(function(be,Ce){var we=be.node.props.value,kn=Ce.node.props.value,Qn=zi.indexOf(we),ti=zi.indexOf(kn);return Qn-ti}))}Object.defineProperty(Rn,"triggerNode",{get:function(){return(0,He.ZP)(!1,"`triggerNode` is deprecated. Please consider decoupling data with node."),an(),Xn}}),Object.defineProperty(Rn,"allCheckedNodes",{get:function(){return(0,He.ZP)(!1,"`allCheckedNodes` is deprecated. Please consider decoupling data with node."),an(),ze?fi:fi.map(function(be){var Ce=be.node;return Ce})}})}var ae=function(Rn,Ct,zi){var Ci=zi.treeNodeFilterProp,ze=zi.filterTreeNode,Yn=zi.fieldNames,Xn=Yn.children;return kt.useMemo(function(){if(!Ct||ze===!1)return Rn;var fi;if(typeof ze=="function")fi=ze;else{var an=Ct.toUpperCase();fi=function(Ce,we){var kn=we[Ci];return String(kn).toUpperCase().includes(an)}}function Sn(be){var Ce=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;return be.reduce(function(we,kn){var Qn=kn[Xn],ti=Ce||fi(Ct,re(kn)),Xe=Sn(Qn||[],ti);return(ti||Xe.length)&&we.push((0,Pe.Z)((0,Pe.Z)({},kn),{},(0,gt.Z)({isLeaf:void 0},Xn,Xe))),we},[])}return Sn(Rn)},[Rn,Ct,Xn,Ci,ze])};function je(Rn){var Ct=kt.useRef();Ct.current=Rn;var zi=kt.useCallback(function(){return Ct.current.apply(Ct,arguments)},[]);return zi}function ne(Rn,Ct){var zi=Ct.id,Ci=Ct.pId,ze=Ct.rootPId,Yn={},Xn=[],fi=Rn.map(function(an){var Sn=(0,Pe.Z)({},an),be=Sn[zi];return Yn[be]=Sn,Sn.key=Sn.key||be,Sn});return fi.forEach(function(an){var Sn=an[Ci],be=Yn[Sn];be&&(be.children=be.children||[],be.children.push(an)),(Sn===ze||!be&&ze===null)&&Xn.push(an)}),Xn}function Le(Rn,Ct,zi){return kt.useMemo(function(){return Rn?zi?ne(Rn,(0,Pe.Z)({id:"id",pId:"pId",rootPId:null},zi!==!0?zi:{})):Rn:Xt(Ct)},[Ct,zi,Rn])}var ue=kt.createContext(null),Ee=ue,ge=Ft(10228),Ue=Ft(80547),nn=Ft(54844),_e=kt.createContext(null),qt=_e;function Jt(Rn){return Array.isArray(Rn)?Rn:Rn!==void 0?[Rn]:[]}function De(Rn){var Ct=Rn||{},zi=Ct.label,Ci=Ct.value,ze=Ct.children,Yn=Ci||"value";return{_title:zi?[zi]:["title","label"],value:Yn,key:Yn,children:ze||"children"}}function sn(Rn){return!Rn||Rn.disabled||Rn.disableCheckbox||Rn.checkable===!1}function cn(Rn,Ct){var zi=[];function Ci(ze){ze.forEach(function(Yn){var Xn=Yn[Ct.children];Xn&&(zi.push(Yn[Ct.value]),Ci(Xn))})}return Ci(Rn),zi}function Te(Rn){return Rn==null}var en={width:0,height:0,display:"flex",overflow:"hidden",opacity:0,border:0,padding:0,margin:0},Cn=function(Ct,zi){var Ci=(0,ye.lk)(),ze=Ci.prefixCls,Yn=Ci.multiple,Xn=Ci.searchValue,fi=Ci.toggleOpen,an=Ci.open,Sn=Ci.notFoundContent,be=kt.useContext(qt),Ce=be.virtual,we=be.listHeight,kn=be.listItemHeight,Qn=be.treeData,ti=be.fieldNames,Xe=be.onSelect,Dn=be.dropdownMatchSelectWidth,vi=be.treeExpandAction,$n=kt.useContext(Ee),ki=$n.checkable,pe=$n.checkedKeys,Tn=$n.halfCheckedKeys,gi=$n.treeExpandedKeys,Oi=$n.treeDefaultExpandAll,bn=$n.treeDefaultExpandedKeys,Mn=$n.onTreeExpand,hn=$n.treeIcon,Ji=$n.showTreeIcon,Li=$n.switcherIcon,Si=$n.treeLine,wi=$n.treeNodeFilterProp,Mi=$n.loadData,Er=$n.treeLoadedKeys,ir=$n.treeMotion,tr=$n.onTreeLoad,gn=$n.keyEntities,to=kt.useRef(),Qi=(0,Ue.Z)(function(){return Qn},[an,Qn],function(Wr,Dr){return Dr[0]&&Wr[1]!==Dr[1]}),Or=kt.useState(null),Je=(0,Ae.Z)(Or,2),Un=Je[0],Pi=Je[1],Ni=gn[Un],di=kt.useMemo(function(){return ki?{checked:pe,halfChecked:Tn}:null},[ki,pe,Tn]);kt.useEffect(function(){if(an&&!Yn&&pe.length){var Wr;(Wr=to.current)===null||Wr===void 0||Wr.scrollTo({key:pe[0]}),Pi(pe[0])}},[an]);var Ii=String(Xn).toLowerCase(),vr=function(Dr){return Ii?String(Dr[wi]).toLowerCase().includes(Ii):!1},yr=kt.useState(bn),pr=(0,Ae.Z)(yr,2),wr=pr[0],yn=pr[1],Ir=kt.useState(null),mn=(0,Ae.Z)(Ir,2),Zr=mn[0],Gr=mn[1],Cr=kt.useMemo(function(){return gi?(0,Me.Z)(gi):Xn?Zr:wr},[wr,Zr,gi,Xn]);kt.useEffect(function(){Xn&&Gr(cn(Qn,ti))},[Xn]);var eo=function(Dr){yn(Dr),Gr(Dr),Mn&&Mn(Dr)},Fr=function(Dr){Dr.preventDefault()},dr=function(Dr,yi){var Gt=yi.node;ki&&sn(Gt)||(Xe(Gt.key,{selected:!pe.includes(Gt.key)}),Yn||fi(!1))};if(kt.useImperativeHandle(zi,function(){var Wr;return{scrollTo:(Wr=to.current)===null||Wr===void 0?void 0:Wr.scrollTo,onKeyDown:function(yi){var Gt,Fo=yi.which;switch(Fo){case ge.Z.UP:case ge.Z.DOWN:case ge.Z.LEFT:case ge.Z.RIGHT:(Gt=to.current)===null||Gt===void 0||Gt.onKeyDown(yi);break;case ge.Z.ENTER:{if(Ni){var vo=(Ni==null?void 0:Ni.node)||{},Oo=vo.selectable,ua=vo.value;Oo!==!1&&dr(null,{node:{key:Un},selected:!pe.includes(ua)})}break}case ge.Z.ESC:fi(!1)}},onKeyUp:function(){}}}),Qi.length===0)return kt.createElement("div",{role:"listbox",className:"".concat(ze,"-empty"),onMouseDown:Fr},Sn);var Nr={fieldNames:ti};return Er&&(Nr.loadedKeys=Er),Cr&&(Nr.expandedKeys=Cr),kt.createElement("div",{onMouseDown:Fr},Ni&&an&&kt.createElement("span",{style:en,"aria-live":"assertive"},Ni.node.value),kt.createElement(nn.Z,(0,ve.Z)({ref:to,focusable:!1,prefixCls:"".concat(ze,"-tree"),treeData:Qi,height:we,itemHeight:kn,virtual:Ce!==!1&&Dn!==!1,multiple:Yn,icon:hn,showIcon:Ji,switcherIcon:Li,showLine:Si,loadData:Xn?null:Mi,motion:ir,activeKey:Un,checkable:ki,checkStrictly:!0,checkedKeys:di,selectedKeys:ki?[]:pe,defaultExpandAll:Oi},Nr,{onActiveChange:Pi,onSelect:dr,onCheck:dr,onExpand:eo,onLoad:tr,filterTreeNode:vr,expandAction:vi})))},Gn=kt.forwardRef(Cn);Gn.displayName="OptionList";var vn=Gn,zn="SHOW_ALL",me="SHOW_PARENT",An="SHOW_CHILD";function ui(Rn,Ct,zi,Ci){var ze=new Set(Rn);return Ct===An?Rn.filter(function(Yn){var Xn=zi[Yn];return!(Xn&&Xn.children&&Xn.children.some(function(fi){var an=fi.node;return ze.has(an[Ci.value])})&&Xn.children.every(function(fi){var an=fi.node;return sn(an)||ze.has(an[Ci.value])}))}):Ct===me?Rn.filter(function(Yn){var Xn=zi[Yn],fi=Xn?Xn.parent:null;return!(fi&&!sn(fi.node)&&ze.has(fi.key))}):Rn}function un(Rn){var Ct=Rn.searchPlaceholder,zi=Rn.treeCheckStrictly,Ci=Rn.treeCheckable,ze=Rn.labelInValue,Yn=Rn.value,Xn=Rn.multiple;warning(!Ct,"`searchPlaceholder` has been removed."),zi&&ze===!1&&warning(!1,"`treeCheckStrictly` will force set `labelInValue` to `true`."),(ze||zi)&&warning(toArray(Yn).every(function(fi){return fi&&_typeof(fi)==="object"&&"value"in fi}),"Invalid prop `value` supplied to `TreeSelect`. You should use { label: string, value: string | number } or [{ label: string, value: string | number }] instead."),zi||Xn||Ci?warning(!Yn||Array.isArray(Yn),"`value` should be an array when `TreeSelect` is checkable or multiple."):warning(!Array.isArray(Yn),"`value` should not be array when `TreeSelect` is single mode.")}var ln=null,oi=["id","prefixCls","value","defaultValue","onChange","onSelect","onDeselect","searchValue","inputValue","onSearch","autoClearSearchValue","filterTreeNode","treeNodeFilterProp","showCheckedStrategy","treeNodeLabelProp","multiple","treeCheckable","treeCheckStrictly","labelInValue","fieldNames","treeDataSimpleMode","treeData","children","loadData","treeLoadedKeys","onTreeLoad","treeDefaultExpandAll","treeExpandedKeys","treeDefaultExpandedKeys","onTreeExpand","treeExpandAction","virtual","listHeight","listItemHeight","onDropdownVisibleChange","dropdownMatchSelectWidth","treeLine","treeIcon","showTreeIcon","switcherIcon","treeMotion"];function xn(Rn){return!Rn||(0,Fe.Z)(Rn)!=="object"}var Ie=kt.forwardRef(function(Rn,Ct){var zi=Rn.id,Ci=Rn.prefixCls,ze=Ci===void 0?"rc-tree-select":Ci,Yn=Rn.value,Xn=Rn.defaultValue,fi=Rn.onChange,an=Rn.onSelect,Sn=Rn.onDeselect,be=Rn.searchValue,Ce=Rn.inputValue,we=Rn.onSearch,kn=Rn.autoClearSearchValue,Qn=kn===void 0?!0:kn,ti=Rn.filterTreeNode,Xe=Rn.treeNodeFilterProp,Dn=Xe===void 0?"value":Xe,vi=Rn.showCheckedStrategy,$n=Rn.treeNodeLabelProp,ki=Rn.multiple,pe=Rn.treeCheckable,Tn=Rn.treeCheckStrictly,gi=Rn.labelInValue,Oi=Rn.fieldNames,bn=Rn.treeDataSimpleMode,Mn=Rn.treeData,hn=Rn.children,Ji=Rn.loadData,Li=Rn.treeLoadedKeys,Si=Rn.onTreeLoad,wi=Rn.treeDefaultExpandAll,Mi=Rn.treeExpandedKeys,Er=Rn.treeDefaultExpandedKeys,ir=Rn.onTreeExpand,tr=Rn.treeExpandAction,gn=Rn.virtual,to=Rn.listHeight,Qi=to===void 0?200:to,Or=Rn.listItemHeight,Je=Or===void 0?20:Or,Un=Rn.onDropdownVisibleChange,Pi=Rn.dropdownMatchSelectWidth,Ni=Pi===void 0?!0:Pi,di=Rn.treeLine,Ii=Rn.treeIcon,vr=Rn.showTreeIcon,yr=Rn.switcherIcon,pr=Rn.treeMotion,wr=(0,ee.Z)(Rn,oi),yn=(0,de.ZP)(zi),Ir=pe&&!Tn,mn=pe||Tn,Zr=Tn||gi,Gr=mn||ki,Cr=(0,Ne.Z)(Xn,{value:Yn}),eo=(0,Ae.Z)(Cr,2),Fr=eo[0],dr=eo[1],Nr=kt.useMemo(function(){return pe?vi||An:zn},[vi,pe]),Wr=kt.useMemo(function(){return De(Oi)},[JSON.stringify(Oi)]),Dr=(0,Ne.Z)("",{value:be!==void 0?be:Ce,postState:function(Ar){return Ar||""}}),yi=(0,Ae.Z)(Dr,2),Gt=yi[0],Fo=yi[1],vo=function(Ar){Fo(Ar),we==null||we(Ar)},Oo=Le(Mn,hn,bn),ua=lt(Oo,Wr),uo=ua.keyEntities,Qo=ua.valueEntities,$t=kt.useCallback(function(ao){var Ar=[],Vr=[];return ao.forEach(function(Ro){Qo.has(Ro)?Vr.push(Ro):Ar.push(Ro)}),{missingRawValues:Ar,existRawValues:Vr}},[Qo]),Wn=ae(Oo,Gt,{fieldNames:Wr,treeNodeFilterProp:Dn,filterTreeNode:ti}),In=kt.useCallback(function(ao){if(ao){if($n)return ao[$n];for(var Ar=Wr._title,Vr=0;Vr<Ar.length;Vr+=1){var Ro=ao[Ar[Vr]];if(Ro!==void 0)return Ro}}},[Wr,$n]),si=kt.useCallback(function(ao){var Ar=Jt(ao);return Ar.map(function(Vr){return xn(Vr)?{value:Vr}:Vr})},[]),Ln=kt.useCallback(function(ao){var Ar=si(ao);return Ar.map(function(Vr){var Ro=Vr.label,Ho=Vr.value,va=Vr.halfChecked,Po,Di=Qo.get(Ho);if(Di){var Va;Ro=(Va=Ro)!==null&&Va!==void 0?Va:In(Di.node),Po=Di.node.disabled}else if(Ro===void 0){var yl=si(Fr).find(function(xs){return xs.value===Ho});Ro=yl.label}return{label:Ro,value:Ho,halfChecked:va,disabled:Po}})},[Qo,In,si,Fr]),Zn=kt.useMemo(function(){return si(Fr)},[si,Fr]),jn=kt.useMemo(function(){var ao=[],Ar=[];return Zn.forEach(function(Vr){Vr.halfChecked?Ar.push(Vr):ao.push(Vr)}),[ao,Ar]},[Zn]),Re=(0,Ae.Z)(jn,2),Nn=Re[0],bi=Re[1],cr=kt.useMemo(function(){return Nn.map(function(ao){return ao.value})},[Nn]),Yi=et(Nn,bi,Ir,uo),Bi=(0,Ae.Z)(Yi,2),Sr=Bi[0],br=Bi[1],ho=kt.useMemo(function(){var ao=ui(Sr,Nr,uo,Wr),Ar=ao.map(function(va){var Po,Di,Va;return(Po=(Di=uo[va])===null||Di===void 0||(Va=Di.node)===null||Va===void 0?void 0:Va[Wr.value])!==null&&Po!==void 0?Po:va}),Vr=Ar.map(function(va){var Po=Nn.find(function(Di){return Di.value===va});return{value:va,label:Po==null?void 0:Po.label}}),Ro=Ln(Vr),Ho=Ro[0];return!Gr&&Ho&&Te(Ho.value)&&Te(Ho.label)?[]:Ro.map(function(va){var Po;return(0,Pe.Z)((0,Pe.Z)({},va),{},{label:(Po=va.label)!==null&&Po!==void 0?Po:va.value})})},[Wr,Gr,Sr,Nn,Ln,Nr,uo]),Co=nt(ho),wa=(0,Ae.Z)(Co,1),Ye=wa[0],Go=je(function(ao,Ar,Vr){var Ro=Ln(ao);if(dr(Ro),Qn&&Fo(""),fi){var Ho=ao;if(Ir){var va=ui(ao,Nr,uo,Wr);Ho=va.map(function(wo){var Ta=Qo.get(wo);return Ta?Ta.node[Wr.value]:wo})}var Po=Ar||{triggerValue:void 0,selected:void 0},Di=Po.triggerValue,Va=Po.selected,yl=Ho;if(Tn){var xs=bi.filter(function(wo){return!Ho.includes(wo.value)});yl=[].concat((0,Me.Z)(yl),(0,Me.Z)(xs))}var Dl=Ln(yl),Tl={preValue:Nn,triggerValue:Di},pi=!0;(Tn||Vr==="selection"&&!Va)&&(pi=!1),le(Tl,Di,ao,Oo,pi,Wr),mn?Tl.checked=Va:Tl.selected=Va;var No=Zr?Dl:Dl.map(function(wo){return wo.value});fi(Gr?No:No[0],Zr?null:Dl.map(function(wo){return wo.label}),Tl)}}),Nl=kt.useCallback(function(ao,Ar){var Vr,Ro=Ar.selected,Ho=Ar.source,va=uo[ao],Po=va==null?void 0:va.node,Di=(Vr=Po==null?void 0:Po[Wr.value])!==null&&Vr!==void 0?Vr:ao;if(!Gr)Go([Di],{selected:!0,triggerValue:Di},"option");else{var Va=Ro?[].concat((0,Me.Z)(cr),[Di]):Sr.filter(function(Ta){return Ta!==Di});if(Ir){var yl=$t(Va),xs=yl.missingRawValues,Dl=yl.existRawValues,Tl=Dl.map(function(Ta){return Qo.get(Ta).key}),pi;if(Ro){var No=(0,he.S)(Tl,!0,uo);pi=No.checkedKeys}else{var wo=(0,he.S)(Tl,{checked:!1,halfCheckedKeys:br},uo);pi=wo.checkedKeys}Va=[].concat((0,Me.Z)(xs),(0,Me.Z)(pi.map(function(Ta){return uo[Ta].node[Wr.value]})))}Go(Va,{selected:Ro,triggerValue:Di},Ho||"option")}Ro||!Gr?an==null||an(Di,re(Po)):Sn==null||Sn(Di,re(Po))},[$t,Qo,uo,Wr,Gr,cr,Go,Ir,an,Sn,Sr,br]),Ss=kt.useCallback(function(ao){if(Un){var Ar={};Object.defineProperty(Ar,"documentClickClose",{get:function(){return(0,He.ZP)(!1,"Second param of `onDropdownVisibleChange` has been removed."),!1}}),Un(ao,Ar)}},[Un]),rl=je(function(ao,Ar){var Vr=ao.map(function(Ro){return Ro.value});if(Ar.type==="clear"){Go(Vr,{},"selection");return}Ar.values.length&&Nl(Ar.values[0].value,{selected:!1,source:"selection"})}),yo=kt.useMemo(function(){return{virtual:gn,dropdownMatchSelectWidth:Ni,listHeight:Qi,listItemHeight:Je,treeData:Wn,fieldNames:Wr,onSelect:Nl,treeExpandAction:tr}},[gn,Ni,Qi,Je,Wn,Wr,Nl,tr]),Tu=kt.useMemo(function(){return{checkable:mn,loadData:Ji,treeLoadedKeys:Li,onTreeLoad:Si,checkedKeys:Sr,halfCheckedKeys:br,treeDefaultExpandAll:wi,treeExpandedKeys:Mi,treeDefaultExpandedKeys:Er,onTreeExpand:ir,treeIcon:Ii,treeMotion:pr,showTreeIcon:vr,switcherIcon:yr,treeLine:di,treeNodeFilterProp:Dn,keyEntities:uo}},[mn,Ji,Li,Si,Sr,br,wi,Mi,Er,ir,Ii,pr,vr,yr,di,Dn,uo]);return kt.createElement(qt.Provider,{value:yo},kt.createElement(Ee.Provider,{value:Tu},kt.createElement(ye.Ac,(0,ve.Z)({ref:Ct},wr,{id:yn,prefixCls:ze,mode:Gr?"multiple":void 0,displayValues:Ye,onDisplayValuesChange:rl,searchValue:Gt,onSearch:vo,OptionList:vn,emptyOptions:!Oo.length,onDropdownVisibleChange:Ss,dropdownMatchSelectWidth:Ni}))))}),Ze=Ie;Ze.TreeNode=Dt,Ze.SHOW_ALL=zn,Ze.SHOW_PARENT=me,Ze.SHOW_CHILD=An;var Hn=Ze,qe=Hn,$e=Ft(2738),Pn=Ft(53487),Rt=Ft(62892),bt=Ft(19080),Pt=Ft(36355),It=Ft(1684),Yt=Ft(93891),Nt=Ft(19716),xe=Ft(32441),_n=Ft(14154),ni=Ft(58582),ei=Ft(84443),ii=Ft(66339),Hi=Ft(33234),hi=Ft(71997),Jn=Ft(98447),Vi=Ft(37613),er=Ft(83116),nr=Ft(20648);const sr=Rn=>{const{componentCls:Ct,treePrefixCls:zi,colorBgElevated:Ci}=Rn,ze=`.${zi}`;return[{[`${Ct}-dropdown`]:[{padding:`${Rn.paddingXS}px ${Rn.paddingXS/2}px`},(0,nr.Yk)(zi,(0,Vi.TS)(Rn,{colorBgContainer:Ci})),{[ze]:{borderRadius:0,[`${ze}-list-holder-inner`]:{alignItems:"stretch",[`${ze}-treenode`]:{[`${ze}-node-content-wrapper`]:{flex:"auto"}}}}},(0,Jn.C2)(`${zi}-checkbox`,Rn),{"&-rtl":{direction:"rtl",[`${ze}-switcher${ze}-switcher_close`]:{[`${ze}-switcher-icon svg`]:{transform:"rotate(90deg)"}}}}]}]};function kr(Rn,Ct){return(0,er.Z)("TreeSelect",zi=>{const Ci=(0,Vi.TS)(zi,{treePrefixCls:Ct});return[sr(Ci)]},nr.TM)(Rn)}var or=function(Rn,Ct){var zi={};for(var Ci in Rn)Object.prototype.hasOwnProperty.call(Rn,Ci)&&Ct.indexOf(Ci)<0&&(zi[Ci]=Rn[Ci]);if(Rn!=null&&typeof Object.getOwnPropertySymbols=="function")for(var ze=0,Ci=Object.getOwnPropertySymbols(Rn);ze<Ci.length;ze++)Ct.indexOf(Ci[ze])<0&&Object.prototype.propertyIsEnumerable.call(Rn,Ci[ze])&&(zi[Ci[ze]]=Rn[Ci[ze]]);return zi};const _i=(Rn,Ct)=>{var zi,{prefixCls:Ci,size:ze,disabled:Yn,bordered:Xn=!0,className:fi,rootClassName:an,treeCheckable:Sn,multiple:be,listHeight:Ce=256,listItemHeight:we=26,placement:kn,notFoundContent:Qn,switcherIcon:ti,treeLine:Xe,getPopupContainer:Dn,popupClassName:vi,dropdownClassName:$n,treeIcon:ki=!1,transitionName:pe,choiceTransitionName:Tn="",status:gi,treeExpandAction:Oi,builtinPlacements:bn,dropdownMatchSelectWidth:Mn,popupMatchSelectWidth:hn,allowClear:Ji}=Rn,Li=or(Rn,["prefixCls","size","disabled","bordered","className","rootClassName","treeCheckable","multiple","listHeight","listItemHeight","placement","notFoundContent","switcherIcon","treeLine","getPopupContainer","popupClassName","dropdownClassName","treeIcon","transitionName","choiceTransitionName","status","treeExpandAction","builtinPlacements","dropdownMatchSelectWidth","popupMatchSelectWidth","allowClear"]);const{getPopupContainer:Si,getPrefixCls:wi,renderEmpty:Mi,direction:Er,virtual:ir,popupMatchSelectWidth:tr,popupOverflow:gn}=kt.useContext(Pt.E_),to=wi(),Qi=wi("select",Ci),Or=wi("select-tree",Ci),Je=wi("tree-select",Ci),{compactSize:Un,compactItemClassnames:Pi}=(0,Hi.ri)(Qi,Er),[Ni,di]=(0,_n.Z)(Qi),[Ii]=kr(Je,Or),vr=Ht()(vi||$n,`${Je}-dropdown`,{[`${Je}-dropdown-rtl`]:Er==="rtl"},an,di),yr=!!(Sn||be),pr=(0,ei.Z)(Li.suffixIcon,Li.showArrow),wr=(zi=hn!=null?hn:Mn)!==null&&zi!==void 0?zi:tr,{status:yn,hasFeedback:Ir,isFormItemInput:mn,feedbackIcon:Zr}=kt.useContext(xe.aM),Gr=(0,bt.F)(yn,gi),{suffixIcon:Cr,removeIcon:eo,clearIcon:Fr}=(0,ii.Z)(Object.assign(Object.assign({},Li),{multiple:yr,showSuffixIcon:pr,hasFeedback:Ir,feedbackIcon:Zr,prefixCls:Qi,componentName:"TreeSelect"})),dr=Ji===!0?{clearIcon:Fr}:Ji;let Nr;Qn!==void 0?Nr=Qn:Nr=(Mi==null?void 0:Mi("Select"))||kt.createElement(Yt.Z,{componentName:"Select"});const Wr=(0,$e.Z)(Li,["suffixIcon","itemIcon","removeIcon","clearIcon","switcherIcon"]),Dr=kt.useMemo(()=>kn!==void 0?kn:Er==="rtl"?"bottomRight":"bottomLeft",[kn,Er]),yi=(0,ni.Z)(bn,gn),Gt=(0,Nt.Z)(Qo=>{var $t;return($t=ze!=null?ze:Un)!==null&&$t!==void 0?$t:Qo}),Fo=kt.useContext(It.Z),vo=Yn!=null?Yn:Fo,Oo=Ht()(!Ci&&Je,{[`${Qi}-lg`]:Gt==="large",[`${Qi}-sm`]:Gt==="small",[`${Qi}-rtl`]:Er==="rtl",[`${Qi}-borderless`]:!Xn,[`${Qi}-in-form-item`]:mn},(0,bt.Z)(Qi,Gr,Ir),Pi,fi,an,di),ua=Qo=>kt.createElement(hi.Z,{prefixCls:Or,switcherIcon:ti,treeNodeProps:Qo,showLine:Xe}),uo=kt.createElement(qe,Object.assign({virtual:ir,disabled:vo},Wr,{dropdownMatchSelectWidth:wr,builtinPlacements:yi,ref:Ct,prefixCls:Qi,className:Oo,listHeight:Ce,listItemHeight:we,treeCheckable:Sn&&kt.createElement("span",{className:`${Qi}-tree-checkbox-inner`}),treeLine:!!Xe,suffixIcon:Cr,multiple:yr,placement:Dr,removeIcon:eo,allowClear:dr,switcherIcon:ua,showTreeIcon:ki,notFoundContent:Nr,getPopupContainer:Dn||Si,treeMotion:null,dropdownClassName:vr,choiceTransitionName:(0,Rt.m)(to,"",Tn),transitionName:(0,Rt.m)(to,"slide-up",pe),treeExpandAction:Oi}));return Ni(Ii(uo))},Mr=kt.forwardRef(_i),Ei=(0,Pn.Z)(Mr);Mr.TreeNode=Dt,Mr.SHOW_ALL=zn,Mr.SHOW_PARENT=me,Mr.SHOW_CHILD=An,Mr._InternalPanelDoNotUseOrYouWillBeFired=Ei;var Qr=Mr},99498:function(fn,Bn,Ft){(function(pt){pt(Ft(89780))})(function(pt){pt.defineOption("placeholder","",function(Fe,ye,de){var he=de&&de!=pt.Init;if(ye&&!he)Fe.on("blur",Pe),Fe.on("change",Ae),Fe.on("swapDoc",Ae),pt.on(Fe.getInputField(),"compositionupdate",Fe.state.placeholderCompose=function(){Me(Fe)}),Ae(Fe);else if(!ye&&he){Fe.off("blur",Pe),Fe.off("change",Ae),Fe.off("swapDoc",Ae),pt.off(Fe.getInputField(),"compositionupdate",Fe.state.placeholderCompose),Ht(Fe);var Ne=Fe.getWrapperElement();Ne.className=Ne.className.replace(" CodeMirror-empty","")}ye&&!Fe.hasFocus()&&Pe(Fe)});function Ht(Fe){Fe.state.placeholder&&(Fe.state.placeholder.parentNode.removeChild(Fe.state.placeholder),Fe.state.placeholder=null)}function ve(Fe){Ht(Fe);var ye=Fe.state.placeholder=document.createElement("pre");ye.style.cssText="height: 0; overflow: visible",ye.style.direction=Fe.getOption("direction"),ye.className="CodeMirror-placeholder CodeMirror-line-like";var de=Fe.getOption("placeholder");typeof de=="string"&&(de=document.createTextNode(de)),ye.appendChild(de),Fe.display.lineSpace.insertBefore(ye,Fe.display.lineSpace.firstChild)}function Me(Fe){setTimeout(function(){var ye=!1,de=Fe.getInputField();de.nodeName=="TEXTAREA"?ye=!de.value:Fe.lineCount()==1&&(ye=!/[^\u200b]/.test(de.querySelector(".CodeMirror-line").textContent)),ye?ve(Fe):Ht(Fe)},20)}function Pe(Fe){ee(Fe)&&ve(Fe)}function Ae(Fe){var ye=Fe.getWrapperElement(),de=ee(Fe);ye.className=ye.className.replace(" CodeMirror-empty","")+(de?" CodeMirror-empty":""),de?ve(Fe):Ht(Fe)}function ee(Fe){return Fe.lineCount()===1&&Fe.getLine(0)===""}})},25717:function(fn,Bn,Ft){(function(pt){pt(Ft(89780))})(function(pt){var Ht={pairs:`()[]{}''""`,closeBefore:`)]}'":;>`,triples:"",explode:"[]{}"},ve=pt.Pos;pt.defineOption("autoCloseBrackets",!1,function(nt,et,ht){ht&&ht!=pt.Init&&(nt.removeKeyMap(Pe),nt.state.closeBrackets=null),et&&(Ae(Me(et,"pairs")),nt.state.closeBrackets=et,nt.addKeyMap(Pe))});function Me(nt,et){return et=="pairs"&&typeof nt=="string"?nt:typeof nt=="object"&&nt[et]!=null?nt[et]:Ht[et]}var Pe={Backspace:ye,Enter:de};function Ae(nt){for(var et=0;et<nt.length;et++){var ht=nt.charAt(et),lt="'"+ht+"'";Pe[lt]||(Pe[lt]=ee(ht))}}Ae(Ht.pairs+"`");function ee(nt){return function(et){return Ne(et,nt)}}function Fe(nt){var et=nt.state.closeBrackets;if(!et||et.override)return et;var ht=nt.getModeAt(nt.getCursor());return ht.closeBrackets||et}function ye(nt){var et=Fe(nt);if(!et||nt.getOption("disableInput"))return pt.Pass;for(var ht=Me(et,"pairs"),lt=nt.listSelections(),gt=0;gt<lt.length;gt++){if(!lt[gt].empty())return pt.Pass;var yt=He(nt,lt[gt].head);if(!yt||ht.indexOf(yt)%2!=0)return pt.Pass}for(var gt=lt.length-1;gt>=0;gt--){var Lt=lt[gt].head;nt.replaceRange("",ve(Lt.line,Lt.ch-1),ve(Lt.line,Lt.ch+1),"+delete")}}function de(nt){var et=Fe(nt),ht=et&&Me(et,"explode");if(!ht||nt.getOption("disableInput"))return pt.Pass;for(var lt=nt.listSelections(),gt=0;gt<lt.length;gt++){if(!lt[gt].empty())return pt.Pass;var yt=He(nt,lt[gt].head);if(!yt||ht.indexOf(yt)%2!=0)return pt.Pass}nt.operation(function(){var Lt=nt.lineSeparator()||`
`;nt.replaceSelection(Lt+Lt,null),nt.execCommand("goCharLeft"),lt=nt.listSelections();for(var Dt=0;Dt<lt.length;Dt++){var zt=lt[Dt].head.line;nt.indentLine(zt,null,!0),nt.indentLine(zt+1,null,!0)}})}function he(nt){var et=pt.cmpPos(nt.anchor,nt.head)>0;return{anchor:new ve(nt.anchor.line,nt.anchor.ch+(et?-1:1)),head:new ve(nt.head.line,nt.head.ch+(et?1:-1))}}function Ne(nt,et){var ht=Fe(nt);if(!ht||nt.getOption("disableInput"))return pt.Pass;var lt=Me(ht,"pairs"),gt=lt.indexOf(et);if(gt==-1)return pt.Pass;for(var yt=Me(ht,"closeBefore"),Lt=Me(ht,"triples"),Dt=lt.charAt(gt+1)==et,zt=nt.listSelections(),Xt=gt%2==0,re,le=0;le<zt.length;le++){var ae=zt[le],je=ae.head,ne,Le=nt.getRange(je,ve(je.line,je.ch+1));if(Xt&&!ae.empty())ne="surround";else if((Dt||!Xt)&&Le==et)Dt&&kt(nt,je)?ne="both":Lt.indexOf(et)>=0&&nt.getRange(je,ve(je.line,je.ch+3))==et+et+et?ne="skipThree":ne="skip";else if(Dt&&je.ch>1&&Lt.indexOf(et)>=0&&nt.getRange(ve(je.line,je.ch-2),je)==et+et){if(je.ch>2&&/\bstring/.test(nt.getTokenTypeAt(ve(je.line,je.ch-2))))return pt.Pass;ne="addFour"}else if(Dt){var ue=je.ch==0?" ":nt.getRange(ve(je.line,je.ch-1),je);if(!pt.isWordChar(Le)&&ue!=et&&!pt.isWordChar(ue))ne="both";else return pt.Pass}else if(Xt&&(Le.length===0||/\s/.test(Le)||yt.indexOf(Le)>-1))ne="both";else return pt.Pass;if(!re)re=ne;else if(re!=ne)return pt.Pass}var Ee=gt%2?lt.charAt(gt-1):et,ge=gt%2?et:lt.charAt(gt+1);nt.operation(function(){if(re=="skip")nt.execCommand("goCharRight");else if(re=="skipThree")for(var Ue=0;Ue<3;Ue++)nt.execCommand("goCharRight");else if(re=="surround"){for(var nn=nt.getSelections(),Ue=0;Ue<nn.length;Ue++)nn[Ue]=Ee+nn[Ue]+ge;nt.replaceSelections(nn,"around"),nn=nt.listSelections().slice();for(var Ue=0;Ue<nn.length;Ue++)nn[Ue]=he(nn[Ue]);nt.setSelections(nn)}else re=="both"?(nt.replaceSelection(Ee+ge,null),nt.triggerElectric(Ee+ge),nt.execCommand("goCharLeft")):re=="addFour"&&(nt.replaceSelection(Ee+Ee+Ee+Ee,"before"),nt.execCommand("goCharRight"))})}function He(nt,et){var ht=nt.getRange(ve(et.line,et.ch-1),ve(et.line,et.ch+1));return ht.length==2?ht:null}function kt(nt,et){var ht=nt.getTokenAt(ve(et.line,et.ch+1));return/\bstring/.test(ht.type)&&ht.start==et.ch&&(et.ch==0||!/\bstring/.test(nt.getTokenTypeAt(et)))}})},6313:function(fn,Bn,Ft){(function(pt){pt(Ft(89780),Ft(32855))})(function(pt){pt.defineOption("autoCloseTags",!1,function(ye,de,he){if(he!=pt.Init&&he&&ye.removeKeyMap("autoCloseTags"),!!de){var Ne={name:"autoCloseTags"};(typeof de!="object"||de.whenClosing!==!1)&&(Ne["'/'"]=function(He){return Ae(He)}),(typeof de!="object"||de.whenOpening!==!1)&&(Ne["'>'"]=function(He){return Me(He)}),ye.addKeyMap(Ne)}});var Ht=["area","base","br","col","command","embed","hr","img","input","keygen","link","meta","param","source","track","wbr"],ve=["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 Me(ye){if(ye.getOption("disableInput"))return pt.Pass;for(var de=ye.listSelections(),he=[],Ne=ye.getOption("autoCloseTags"),He=0;He<de.length;He++){if(!de[He].empty())return pt.Pass;var kt=de[He].head,nt=ye.getTokenAt(kt),et=pt.innerMode(ye.getMode(),nt.state),ht=et.state,lt=et.mode.xmlCurrentTag&&et.mode.xmlCurrentTag(ht),gt=lt&&lt.name;if(!gt)return pt.Pass;var yt=et.mode.configuration=="html",Lt=typeof Ne=="object"&&Ne.dontCloseTags||yt&&Ht,Dt=typeof Ne=="object"&&Ne.indentTags||yt&&ve;nt.end>kt.ch&&(gt=gt.slice(0,gt.length-nt.end+kt.ch));var zt=gt.toLowerCase();if(!gt||nt.type=="string"&&(nt.end!=kt.ch||!/[\"\']/.test(nt.string.charAt(nt.string.length-1))||nt.string.length==1)||nt.type=="tag"&&lt.close||nt.string.indexOf("/")==kt.ch-nt.start-1||Lt&&ee(Lt,zt)>-1||Fe(ye,et.mode.xmlCurrentContext&&et.mode.xmlCurrentContext(ht)||[],gt,kt,!0))return pt.Pass;var Xt=typeof Ne=="object"&&Ne.emptyTags;if(Xt&&ee(Xt,gt)>-1){he[He]={text:"/>",newPos:pt.Pos(kt.line,kt.ch+2)};continue}var re=Dt&&ee(Dt,zt)>-1;he[He]={indent:re,text:">"+(re?`
`:"")+"</"+gt+">",newPos:re?pt.Pos(kt.line+1,0):pt.Pos(kt.line,kt.ch+1)}}for(var le=typeof Ne=="object"&&Ne.dontIndentOnAutoClose,He=de.length-1;He>=0;He--){var ae=he[He];ye.replaceRange(ae.text,de[He].head,de[He].anchor,"+insert");var je=ye.listSelections().slice(0);je[He]={head:ae.newPos,anchor:ae.newPos},ye.setSelections(je),!le&&ae.indent&&(ye.indentLine(ae.newPos.line,null,!0),ye.indentLine(ae.newPos.line+1,null,!0))}}function Pe(ye,de){for(var he=ye.listSelections(),Ne=[],He=de?"/":"</",kt=ye.getOption("autoCloseTags"),nt=typeof kt=="object"&&kt.dontIndentOnSlash,et=0;et<he.length;et++){if(!he[et].empty())return pt.Pass;var ht=he[et].head,lt=ye.getTokenAt(ht),gt=pt.innerMode(ye.getMode(),lt.state),yt=gt.state;if(de&&(lt.type=="string"||lt.string.charAt(0)!="<"||lt.start!=ht.ch-1))return pt.Pass;var Lt,Dt=gt.mode.name!="xml"&&ye.getMode().name=="htmlmixed";if(Dt&&gt.mode.name=="javascript")Lt=He+"script";else if(Dt&&gt.mode.name=="css")Lt=He+"style";else{var zt=gt.mode.xmlCurrentContext&&gt.mode.xmlCurrentContext(yt);if(!zt||zt.length&&Fe(ye,zt,zt[zt.length-1],ht))return pt.Pass;Lt=He+zt[zt.length-1]}ye.getLine(ht.line).charAt(lt.end)!=">"&&(Lt+=">"),Ne[et]=Lt}if(ye.replaceSelections(Ne),he=ye.listSelections(),!nt)for(var et=0;et<he.length;et++)(et==he.length-1||he[et].head.line<he[et+1].head.line)&&ye.indentLine(he[et].head.line)}function Ae(ye){return ye.getOption("disableInput")?pt.Pass:Pe(ye,!0)}pt.commands.closeTag=function(ye){return Pe(ye)};function ee(ye,de){if(ye.indexOf)return ye.indexOf(de);for(var he=0,Ne=ye.length;he<Ne;++he)if(ye[he]==de)return he;return-1}function Fe(ye,de,he,Ne,He){if(!pt.scanForClosingTag)return!1;var kt=Math.min(ye.lastLine()+1,Ne.line+500),nt=pt.scanForClosingTag(ye,Ne,null,kt);if(!nt||nt.tag!=he)return!1;for(var et=He?1:0,ht=de.length-1;ht>=0&&de[ht]==he;ht--)++et;Ne=nt.to;for(var ht=1;ht<et;ht++){var lt=pt.scanForClosingTag(ye,Ne,null,kt);if(!lt||lt.tag!=he)return!1;Ne=lt.to}return!0}})},32855:function(fn,Bn,Ft){(function(pt){pt(Ft(89780))})(function(pt){"use strict";var Ht=pt.Pos;function ve(ht,lt){return ht.line-lt.line||ht.ch-lt.ch}var Me="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",Pe=Me+"-:.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040",Ae=new RegExp("<(/?)(["+Me+"]["+Pe+"]*)","g");function ee(ht,lt,gt,yt){this.line=lt,this.ch=gt,this.cm=ht,this.text=ht.getLine(lt),this.min=yt?Math.max(yt.from,ht.firstLine()):ht.firstLine(),this.max=yt?Math.min(yt.to-1,ht.lastLine()):ht.lastLine()}function Fe(ht,lt){var gt=ht.cm.getTokenTypeAt(Ht(ht.line,lt));return gt&&/\btag\b/.test(gt)}function ye(ht){if(!(ht.line>=ht.max))return ht.ch=0,ht.text=ht.cm.getLine(++ht.line),!0}function de(ht){if(!(ht.line<=ht.min))return ht.text=ht.cm.getLine(--ht.line),ht.ch=ht.text.length,!0}function he(ht){for(;;){var lt=ht.text.indexOf(">",ht.ch);if(lt==-1){if(ye(ht))continue;return}if(!Fe(ht,lt+1)){ht.ch=lt+1;continue}var gt=ht.text.lastIndexOf("/",lt),yt=gt>-1&&!/\S/.test(ht.text.slice(gt+1,lt));return ht.ch=lt+1,yt?"selfClose":"regular"}}function Ne(ht){for(;;){var lt=ht.ch?ht.text.lastIndexOf("<",ht.ch-1):-1;if(lt==-1){if(de(ht))continue;return}if(!Fe(ht,lt+1)){ht.ch=lt;continue}Ae.lastIndex=lt,ht.ch=lt;var gt=Ae.exec(ht.text);if(gt&&gt.index==lt)return gt}}function He(ht){for(;;){Ae.lastIndex=ht.ch;var lt=Ae.exec(ht.text);if(!lt){if(ye(ht))continue;return}if(!Fe(ht,lt.index+1)){ht.ch=lt.index+1;continue}return ht.ch=lt.index+lt[0].length,lt}}function kt(ht){for(;;){var lt=ht.ch?ht.text.lastIndexOf(">",ht.ch-1):-1;if(lt==-1){if(de(ht))continue;return}if(!Fe(ht,lt+1)){ht.ch=lt;continue}var gt=ht.text.lastIndexOf("/",lt),yt=gt>-1&&!/\S/.test(ht.text.slice(gt+1,lt));return ht.ch=lt+1,yt?"selfClose":"regular"}}function nt(ht,lt){for(var gt=[];;){var yt=He(ht),Lt,Dt=ht.line,zt=ht.ch-(yt?yt[0].length:0);if(!yt||!(Lt=he(ht)))return;if(Lt!="selfClose")if(yt[1]){for(var Xt=gt.length-1;Xt>=0;--Xt)if(gt[Xt]==yt[2]){gt.length=Xt;break}if(Xt<0&&(!lt||lt==yt[2]))return{tag:yt[2],from:Ht(Dt,zt),to:Ht(ht.line,ht.ch)}}else gt.push(yt[2])}}function et(ht,lt){for(var gt=[];;){var yt=kt(ht);if(!yt)return;if(yt=="selfClose"){Ne(ht);continue}var Lt=ht.line,Dt=ht.ch,zt=Ne(ht);if(!zt)return;if(zt[1])gt.push(zt[2]);else{for(var Xt=gt.length-1;Xt>=0;--Xt)if(gt[Xt]==zt[2]){gt.length=Xt;break}if(Xt<0&&(!lt||lt==zt[2]))return{tag:zt[2],from:Ht(ht.line,ht.ch),to:Ht(Lt,Dt)}}}}pt.registerHelper("fold","xml",function(ht,lt){for(var gt=new ee(ht,lt.line,0);;){var yt=He(gt);if(!yt||gt.line!=lt.line)return;var Lt=he(gt);if(!Lt)return;if(!yt[1]&&Lt!="selfClose"){var Dt=Ht(gt.line,gt.ch),zt=nt(gt,yt[2]);return zt&&ve(zt.from,Dt)>0?{from:Dt,to:zt.from}:null}}}),pt.findMatchingTag=function(ht,lt,gt){var yt=new ee(ht,lt.line,lt.ch,gt);if(!(yt.text.indexOf(">")==-1&&yt.text.indexOf("<")==-1)){var Lt=he(yt),Dt=Lt&&Ht(yt.line,yt.ch),zt=Lt&&Ne(yt);if(!(!Lt||!zt||ve(yt,lt)>0)){var Xt={from:Ht(yt.line,yt.ch),to:Dt,tag:zt[2]};return Lt=="selfClose"?{open:Xt,close:null,at:"open"}:zt[1]?{open:et(yt,zt[2]),close:Xt,at:"close"}:(yt=new ee(ht,Dt.line,Dt.ch,gt),{open:Xt,close:nt(yt,zt[2]),at:"open"})}}},pt.findEnclosingTag=function(ht,lt,gt,yt){for(var Lt=new ee(ht,lt.line,lt.ch,gt);;){var Dt=et(Lt,yt);if(!Dt)break;var zt=new ee(ht,lt.line,lt.ch,gt),Xt=nt(zt,Dt.tag);if(Xt)return{open:Dt,close:Xt}}},pt.scanForClosingTag=function(ht,lt,gt,yt){var Lt=new ee(ht,lt.line,lt.ch,yt?{from:0,to:yt}:null);return nt(Lt,gt)}})},89780:function(fn){(function(Bn,Ft){fn.exports=Ft()})(this,function(){"use strict";var Bn=navigator.userAgent,Ft=navigator.platform,pt=/gecko\/\d/i.test(Bn),Ht=/MSIE \d/.test(Bn),ve=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(Bn),Me=/Edge\/(\d+)/.exec(Bn),Pe=Ht||ve||Me,Ae=Pe&&(Ht?document.documentMode||6:+(Me||ve)[1]),ee=!Me&&/WebKit\//.test(Bn),Fe=ee&&/Qt\/\d+\.\d+/.test(Bn),ye=!Me&&/Chrome\//.test(Bn),de=/Opera\//.test(Bn),he=/Apple Computer/.test(navigator.vendor),Ne=/Mac OS X 1\d\D([8-9]|\d\d)\D/.test(Bn),He=/PhantomJS/.test(Bn),kt=!Me&&/AppleWebKit/.test(Bn)&&/Mobile\/\w+/.test(Bn),nt=/Android/.test(Bn),et=kt||nt||/webOS|BlackBerry|Opera Mini|Opera Mobi|IEMobile/i.test(Bn),ht=kt||/Mac/.test(Ft),lt=/\bCrOS\b/.test(Bn),gt=/win/i.test(Ft),yt=de&&Bn.match(/Version\/(\d*\.\d*)/);yt&&(yt=Number(yt[1])),yt&&yt>=15&&(de=!1,ee=!0);var Lt=ht&&(Fe||de&&(yt==null||yt<12.11)),Dt=pt||Pe&&Ae>=9;function zt(it){return new RegExp("(^|\\s)"+it+"(?:$|\\s)\\s*")}var Xt=function(it,at){var ct=it.className,dt=zt(at).exec(ct);if(dt){var mt=ct.slice(dt.index+dt[0].length);it.className=ct.slice(0,dt.index)+(mt?dt[1]+mt:"")}};function re(it){for(var at=it.childNodes.length;at>0;--at)it.removeChild(it.firstChild);return it}function le(it,at){return re(it).appendChild(at)}function ae(it,at,ct,dt){var mt=document.createElement(it);if(ct&&(mt.className=ct),dt&&(mt.style.cssText=dt),typeof at=="string")mt.appendChild(document.createTextNode(at));else if(at)for(var At=0;At<at.length;++At)mt.appendChild(at[At]);return mt}function je(it,at,ct,dt){var mt=ae(it,at,ct,dt);return mt.setAttribute("role","presentation"),mt}var ne;document.createRange?ne=function(it,at,ct,dt){var mt=document.createRange();return mt.setEnd(dt||it,ct),mt.setStart(it,at),mt}:ne=function(it,at,ct){var dt=document.body.createTextRange();try{dt.moveToElementText(it.parentNode)}catch(mt){return dt}return dt.collapse(!0),dt.moveEnd("character",ct),dt.moveStart("character",at),dt};function Le(it,at){if(at.nodeType==3&&(at=at.parentNode),it.contains)return it.contains(at);do if(at.nodeType==11&&(at=at.host),at==it)return!0;while(at=at.parentNode)}function ue(){var it;try{it=document.activeElement}catch(at){it=document.body||null}for(;it&&it.shadowRoot&&it.shadowRoot.activeElement;)it=it.shadowRoot.activeElement;return it}function Ee(it,at){var ct=it.className;zt(at).test(ct)||(it.className+=(ct?" ":"")+at)}function ge(it,at){for(var ct=it.split(" "),dt=0;dt<ct.length;dt++)ct[dt]&&!zt(ct[dt]).test(at)&&(at+=" "+ct[dt]);return at}var Ue=function(it){it.select()};kt?Ue=function(it){it.selectionStart=0,it.selectionEnd=it.value.length}:Pe&&(Ue=function(it){try{it.select()}catch(at){}});function nn(it){var at=Array.prototype.slice.call(arguments,1);return function(){return it.apply(null,at)}}function _e(it,at,ct){at||(at={});for(var dt in it)it.hasOwnProperty(dt)&&(ct!==!1||!at.hasOwnProperty(dt))&&(at[dt]=it[dt]);return at}function qt(it,at,ct,dt,mt){at==null&&(at=it.search(/[^\s\u00a0]/),at==-1&&(at=it.length));for(var At=dt||0,Ot=mt||0;;){var Ut=it.indexOf(" ",At);if(Ut<0||Ut>=at)return Ot+(at-At);Ot+=Ut-At,Ot+=ct-Ot%ct,At=Ut+1}}var Jt=function(){this.id=null,this.f=null,this.time=0,this.handler=nn(this.onTimeout,this)};Jt.prototype.onTimeout=function(it){it.id=0,it.time<=+new Date?it.f():setTimeout(it.handler,it.time-+new Date)},Jt.prototype.set=function(it,at){this.f=at;var ct=+new Date+it;(!this.id||ct<this.time)&&(clearTimeout(this.id),this.id=setTimeout(this.handler,it),this.time=ct)};function De(it,at){for(var ct=0;ct<it.length;++ct)if(it[ct]==at)return ct;return-1}var sn=50,cn={toString:function(){return"CodeMirror.Pass"}},Te={scroll:!1},en={origin:"*mouse"},Cn={origin:"+move"};function Gn(it,at,ct){for(var dt=0,mt=0;;){var At=it.indexOf(" ",dt);At==-1&&(At=it.length);var Ot=At-dt;if(At==it.length||mt+Ot>=at)return dt+Math.min(Ot,at-mt);if(mt+=At-dt,mt+=ct-mt%ct,dt=At+1,mt>=at)return dt}}var vn=[""];function zn(it){for(;vn.length<=it;)vn.push(me(vn)+" ");return vn[it]}function me(it){return it[it.length-1]}function An(it,at){for(var ct=[],dt=0;dt<it.length;dt++)ct[dt]=at(it[dt],dt);return ct}function ui(it,at,ct){for(var dt=0,mt=ct(at);dt<it.length&&ct(it[dt])<=mt;)dt++;it.splice(dt,0,at)}function un(){}function ln(it,at){var ct;return Object.create?ct=Object.create(it):(un.prototype=it,ct=new un),at&&_e(at,ct),ct}var oi=/[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/;function xn(it){return/\w/.test(it)||it>"\x80"&&(it.toUpperCase()!=it.toLowerCase()||oi.test(it))}function Ie(it,at){return at?at.source.indexOf("\\w")>-1&&xn(it)?!0:at.test(it):xn(it)}function Ze(it){for(var at in it)if(it.hasOwnProperty(at)&&it[at])return!1;return!0}var Hn=/[\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 qe(it){return it.charCodeAt(0)>=768&&Hn.test(it)}function $e(it,at,ct){for(;(ct<0?at>0:at<it.length)&&qe(it.charAt(at));)at+=ct;return at}function Pn(it,at,ct){for(var dt=at>ct?-1:1;;){if(at==ct)return at;var mt=(at+ct)/2,At=dt<0?Math.ceil(mt):Math.floor(mt);if(At==at)return it(At)?at:ct;it(At)?ct=At:at=At+dt}}function Rt(it,at,ct,dt){if(!it)return dt(at,ct,"ltr",0);for(var mt=!1,At=0;At<it.length;++At){var Ot=it[At];(Ot.from<ct&&Ot.to>at||at==ct&&Ot.to==at)&&(dt(Math.max(Ot.from,at),Math.min(Ot.to,ct),Ot.level==1?"rtl":"ltr",At),mt=!0)}mt||dt(at,ct,"ltr")}var bt=null;function Pt(it,at,ct){var dt;bt=null;for(var mt=0;mt<it.length;++mt){var At=it[mt];if(At.from<at&&At.to>at)return mt;At.to==at&&(At.from!=At.to&&ct=="before"?dt=mt:bt=mt),At.from==at&&(At.from!=At.to&&ct!="before"?dt=mt:bt=mt)}return dt!=null?dt:bt}var It=function(){var it="bbbbbbbbbtstwsbbbbbbbbbbbbbbssstwNN%%%NNNNNN,N,N1111111111NNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNbbbbbbsbbbbbbbbbbbbbbbbbbbbbbbbbb,N%%%%NNNNLNNNNN%%11NLNNN1LNNNNNLLLLLLLLLLLLLLLLLLLLLLLNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLN",at="nnnnnnNNr%%r,rNNmmmmmmmmmmmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmmmmmmmmnnnnnnnnnn%nnrrrmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmnNmmmmmmrrmmNmmmmrr1111111111";function ct(oe){return oe<=247?it.charAt(oe):1424<=oe&&oe<=1524?"R":1536<=oe&&oe<=1785?at.charAt(oe-1536):1774<=oe&&oe<=2220?"r":8192<=oe&&oe<=8203?"w":oe==8204?"b":"L"}var dt=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/,mt=/[stwN]/,At=/[LRr]/,Ot=/[Lb1n]/,Ut=/[1n]/;function Wt(oe,Ve,fe){this.level=oe,this.from=Ve,this.to=fe}return function(oe,Ve){var fe=Ve=="ltr"?"L":"R";if(oe.length==0||Ve=="ltr"&&!dt.test(oe))return!1;for(var dn=oe.length,on=[],ai=0;ai<dn;++ai)on.push(ct(oe.charCodeAt(ai)));for(var ci=0,xi=fe;ci<dn;++ci){var Ri=on[ci];Ri=="m"?on[ci]=xi:xi=Ri}for(var rr=0,Ki=fe;rr<dn;++rr){var lr=on[rr];lr=="1"&&Ki=="r"?on[rr]="n":At.test(lr)&&(Ki=lr,lr=="r"&&(on[rr]="R"))}for(var Rr=1,Zi=on[0];Rr<dn-1;++Rr){var Jr=on[Rr];Jr=="+"&&Zi=="1"&&on[Rr+1]=="1"?on[Rr]="1":Jr==","&&Zi==on[Rr+1]&&(Zi=="1"||Zi=="n")&&(on[Rr]=Zi),Zi=Jr}for(var Wo=0;Wo<dn;++Wo){var Da=on[Wo];if(Da==",")on[Wo]="N";else if(Da=="%"){var $o=void 0;for($o=Wo+1;$o<dn&&on[$o]=="%";++$o);for(var As=Wo&&on[Wo-1]=="!"||$o<dn&&on[$o]=="1"?"1":"N",ts=Wo;ts<$o;++ts)on[ts]=As;Wo=$o-1}}for(var Ea=0,Fs=fe;Ea<dn;++Ea){var Ya=on[Ea];Fs=="L"&&Ya=="1"?on[Ea]="L":At.test(Ya)&&(Fs=Ya)}for(var ba=0;ba<dn;++ba)if(mt.test(on[ba])){var fo=void 0;for(fo=ba+1;fo<dn&&mt.test(on[fo]);++fo);for(var ta=(ba?on[ba-1]:fe)=="L",Ha=(fo<dn?on[fo]:fe)=="L",Xa=ta==Ha?ta?"L":"R":fe,El=ba;El<fo;++El)on[El]=Xa;ba=fo-1}for(var ea=[],qs,vt=0;vt<dn;)if(Ot.test(on[vt])){var xt=vt;for(++vt;vt<dn&&Ot.test(on[vt]);++vt);ea.push(new Wt(0,xt,vt))}else{var Mt=vt,Tt=ea.length,Zt=Ve=="rtl"?1:0;for(++vt;vt<dn&&on[vt]!="L";++vt);for(var Kt=Mt;Kt<vt;)if(Ut.test(on[Kt])){Mt<Kt&&(ea.splice(Tt,0,new Wt(1,Mt,Kt)),Tt+=Zt);var te=Kt;for(++Kt;Kt<vt&&Ut.test(on[Kt]);++Kt);ea.splice(Tt,0,new Wt(2,te,Kt)),Tt+=Zt,Mt=Kt}else++Kt;Mt<vt&&ea.splice(Tt,0,new Wt(1,Mt,vt))}return Ve=="ltr"&&(ea[0].level==1&&(qs=oe.match(/^\s+/))&&(ea[0].from=qs[0].length,ea.unshift(new Wt(0,0,qs[0].length))),me(ea).level==1&&(qs=oe.match(/\s+$/))&&(me(ea).to-=qs[0].length,ea.push(new Wt(0,dn-qs[0].length,dn)))),Ve=="rtl"?ea.reverse():ea}}();function Yt(it,at){var ct=it.order;return ct==null&&(ct=it.order=It(it.text,at)),ct}var Nt=[],xe=function(it,at,ct){if(it.addEventListener)it.addEventListener(at,ct,!1);else if(it.attachEvent)it.attachEvent("on"+at,ct);else{var dt=it._handlers||(it._handlers={});dt[at]=(dt[at]||Nt).concat(ct)}};function _n(it,at){return it._handlers&&it._handlers[at]||Nt}function ni(it,at,ct){if(it.removeEventListener)it.removeEventListener(at,ct,!1);else if(it.detachEvent)it.detachEvent("on"+at,ct);else{var dt=it._handlers,mt=dt&&dt[at];if(mt){var At=De(mt,ct);At>-1&&(dt[at]=mt.slice(0,At).concat(mt.slice(At+1)))}}}function ei(it,at){var ct=_n(it,at);if(ct.length)for(var dt=Array.prototype.slice.call(arguments,2),mt=0;mt<ct.length;++mt)ct[mt].apply(null,dt)}function ii(it,at,ct){return typeof at=="string"&&(at={type:at,preventDefault:function(){this.defaultPrevented=!0}}),ei(it,ct||at.type,it,at),nr(at)||at.codemirrorIgnore}function Hi(it){var at=it._handlers&&it._handlers.cursorActivity;if(at)for(var ct=it.curOp.cursorActivityHandlers||(it.curOp.cursorActivityHandlers=[]),dt=0;dt<at.length;++dt)De(ct,at[dt])==-1&&ct.push(at[dt])}function hi(it,at){return _n(it,at).length>0}function Jn(it){it.prototype.on=function(at,ct){xe(this,at,ct)},it.prototype.off=function(at,ct){ni(this,at,ct)}}function Vi(it){it.preventDefault?it.preventDefault():it.returnValue=!1}function er(it){it.stopPropagation?it.stopPropagation():it.cancelBubble=!0}function nr(it){return it.defaultPrevented!=null?it.defaultPrevented:it.returnValue==!1}function sr(it){Vi(it),er(it)}function kr(it){return it.target||it.srcElement}function or(it){var at=it.which;return at==null&&(it.button&1?at=1:it.button&2?at=3:it.button&4&&(at=2)),ht&&it.ctrlKey&&at==1&&(at=3),at}var _i=function(){if(Pe&&Ae<9)return!1;var it=ae("div");return"draggable"in it||"dragDrop"in it}(),gr;function Mr(it){if(gr==null){var at=ae("span","\u200B");le(it,ae("span",[at,document.createTextNode("x")])),it.firstChild.offsetHeight!=0&&(gr=at.offsetWidth<=1&&at.offsetHeight>2&&!(Pe&&Ae<8))}var ct=gr?ae("span","\u200B"):ae("span","\xA0",null,"display: inline-block; width: 1px; margin-right: -1px");return ct.setAttribute("cm-text",""),ct}var Ei;function Qr(it){if(Ei!=null)return Ei;var at=le(it,document.createTextNode("A\u062EA")),ct=ne(at,0,1).getBoundingClientRect(),dt=ne(at,1,2).getBoundingClientRect();return re(it),!ct||ct.left==ct.right?!1:Ei=dt.right-ct.right<3}var Rn=`
b`.split(/\n/).length!=3?function(it){for(var at=0,ct=[],dt=it.length;at<=dt;){var mt=it.indexOf(`
`,at);mt==-1&&(mt=it.length);var At=it.slice(at,it.charAt(mt-1)=="\r"?mt-1:mt),Ot=At.indexOf("\r");Ot!=-1?(ct.push(At.slice(0,Ot)),at+=Ot+1):(ct.push(At),at=mt+1)}return ct}:function(it){return it.split(/\r\n?|\n/)},Ct=window.getSelection?function(it){try{return it.selectionStart!=it.selectionEnd}catch(at){return!1}}:function(it){var at;try{at=it.ownerDocument.selection.createRange()}catch(ct){}return!at||at.parentElement()!=it?!1:at.compareEndPoints("StartToEnd",at)!=0},zi=function(){var it=ae("div");return"oncopy"in it?!0:(it.setAttribute("oncopy","return;"),typeof it.oncopy=="function")}(),Ci=null;function ze(it){if(Ci!=null)return Ci;var at=le(it,ae("span","x")),ct=at.getBoundingClientRect(),dt=ne(at,0,1).getBoundingClientRect();return Ci=Math.abs(ct.left-dt.left)>1}var Yn={},Xn={};function fi(it,at){arguments.length>2&&(at.dependencies=Array.prototype.slice.call(arguments,2)),Yn[it]=at}function an(it,at){Xn[it]=at}function Sn(it){if(typeof it=="string"&&Xn.hasOwnProperty(it))it=Xn[it];else if(it&&typeof it.name=="string"&&Xn.hasOwnProperty(it.name)){var at=Xn[it.name];typeof at=="string"&&(at={name:at}),it=ln(at,it),it.name=at.name}else{if(typeof it=="string"&&/^[\w\-]+\/[\w\-]+\+xml$/.test(it))return Sn("application/xml");if(typeof it=="string"&&/^[\w\-]+\/[\w\-]+\+json$/.test(it))return Sn("application/json")}return typeof it=="string"?{name:it}:it||{name:"null"}}function be(it,at){at=Sn(at);var ct=Yn[at.name];if(!ct)return be(it,"text/plain");var dt=ct(it,at);if(Ce.hasOwnProperty(at.name)){var mt=Ce[at.name];for(var At in mt)mt.hasOwnProperty(At)&&(dt.hasOwnProperty(At)&&(dt["_"+At]=dt[At]),dt[At]=mt[At])}if(dt.name=at.name,at.helperType&&(dt.helperType=at.helperType),at.modeProps)for(var Ot in at.modeProps)dt[Ot]=at.modeProps[Ot];return dt}var Ce={};function we(it,at){var ct=Ce.hasOwnProperty(it)?Ce[it]:Ce[it]={};_e(at,ct)}function kn(it,at){if(at===!0)return at;if(it.copyState)return it.copyState(at);var ct={};for(var dt in at){var mt=at[dt];mt instanceof Array&&(mt=mt.concat([])),ct[dt]=mt}return ct}function Qn(it,at){for(var ct;it.innerMode&&(ct=it.innerMode(at),!(!ct||ct.mode==it));)at=ct.state,it=ct.mode;return ct||{mode:it,state:at}}function ti(it,at,ct){return it.startState?it.startState(at,ct):!0}var Xe=function(it,at,ct){this.pos=this.start=0,this.string=it,this.tabSize=at||8,this.lastColumnPos=this.lastColumnValue=0,this.lineStart=0,this.lineOracle=ct};Xe.prototype.eol=function(){return this.pos>=this.string.length},Xe.prototype.sol=function(){return this.pos==this.lineStart},Xe.prototype.peek=function(){return this.string.charAt(this.pos)||void 0},Xe.prototype.next=function(){if(this.pos<this.string.length)return this.string.charAt(this.pos++)},Xe.prototype.eat=function(it){var at=this.string.charAt(this.pos),ct;if(typeof it=="string"?ct=at==it:ct=at&&(it.test?it.test(at):it(at)),ct)return++this.pos,at},Xe.prototype.eatWhile=function(it){for(var at=this.pos;this.eat(it););return this.pos>at},Xe.prototype.eatSpace=function(){for(var it=this.pos;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++this.pos;return this.pos>it},Xe.prototype.skipToEnd=function(){this.pos=this.string.length},Xe.prototype.skipTo=function(it){var at=this.string.indexOf(it,this.pos);if(at>-1)return this.pos=at,!0},Xe.prototype.backUp=function(it){this.pos-=it},Xe.prototype.column=function(){return this.lastColumnPos<this.start&&(this.lastColumnValue=qt(this.string,this.start,this.tabSize,this.lastColumnPos,this.lastColumnValue),this.lastColumnPos=this.start),this.lastColumnValue-(this.lineStart?qt(this.string,this.lineStart,this.tabSize):0)},Xe.prototype.indentation=function(){return qt(this.string,null,this.tabSize)-(this.lineStart?qt(this.string,this.lineStart,this.tabSize):0)},Xe.prototype.match=function(it,at,ct){if(typeof it=="string"){var dt=function(Ot){return ct?Ot.toLowerCase():Ot},mt=this.string.substr(this.pos,it.length);if(dt(mt)==dt(it))return at!==!1&&(this.pos+=it.length),!0}else{var At=this.string.slice(this.pos).match(it);return At&&At.index>0?null:(At&&at!==!1&&(this.pos+=At[0].length),At)}},Xe.prototype.current=function(){return this.string.slice(this.start,this.pos)},Xe.prototype.hideFirstChars=function(it,at){this.lineStart+=it;try{return at()}finally{this.lineStart-=it}},Xe.prototype.lookAhead=function(it){var at=this.lineOracle;return at&&at.lookAhead(it)},Xe.prototype.baseToken=function(){var it=this.lineOracle;return it&&it.baseToken(this.pos)};function Dn(it,at){if(at-=it.first,at<0||at>=it.size)throw new Error("There is no line "+(at+it.first)+" in the document.");for(var ct=it;!ct.lines;)for(var dt=0;;++dt){var mt=ct.children[dt],At=mt.chunkSize();if(at<At){ct=mt;break}at-=At}return ct.lines[at]}function vi(it,at,ct){var dt=[],mt=at.line;return it.iter(at.line,ct.line+1,function(At){var Ot=At.text;mt==ct.line&&(Ot=Ot.slice(0,ct.ch)),mt==at.line&&(Ot=Ot.slice(at.ch)),dt.push(Ot),++mt}),dt}function $n(it,at,ct){var dt=[];return it.iter(at,ct,function(mt){dt.push(mt.text)}),dt}function ki(it,at){var ct=at-it.height;if(ct)for(var dt=it;dt;dt=dt.parent)dt.height+=ct}function pe(it){if(it.parent==null)return null;for(var at=it.parent,ct=De(at.lines,it),dt=at.parent;dt;at=dt,dt=dt.parent)for(var mt=0;dt.children[mt]!=at;++mt)ct+=dt.children[mt].chunkSize();return ct+at.first}function Tn(it,at){var ct=it.first;t:do{for(var dt=0;dt<it.children.length;++dt){var mt=it.children[dt],At=mt.height;if(at<At){it=mt;continue t}at-=At,ct+=mt.chunkSize()}return ct}while(!it.lines);for(var Ot=0;Ot<it.lines.length;++Ot){var Ut=it.lines[Ot],Wt=Ut.height;if(at<Wt)break;at-=Wt}return ct+Ot}function gi(it,at){return at>=it.first&&at<it.first+it.size}function Oi(it,at){return String(it.lineNumberFormatter(at+it.firstLineNumber))}function bn(it,at,ct){if(ct===void 0&&(ct=null),!(this instanceof bn))return new bn(it,at,ct);this.line=it,this.ch=at,this.sticky=ct}function Mn(it,at){return it.line-at.line||it.ch-at.ch}function hn(it,at){return it.sticky==at.sticky&&Mn(it,at)==0}function Ji(it){return bn(it.line,it.ch)}function Li(it,at){return Mn(it,at)<0?at:it}function Si(it,at){return Mn(it,at)<0?it:at}function wi(it,at){return Math.max(it.first,Math.min(at,it.first+it.size-1))}function Mi(it,at){if(at.line<it.first)return bn(it.first,0);var ct=it.first+it.size-1;return at.line>ct?bn(ct,Dn(it,ct).text.length):Er(at,Dn(it,at.line).text.length)}function Er(it,at){var ct=it.ch;return ct==null||ct>at?bn(it.line,at):ct<0?bn(it.line,0):it}function ir(it,at){for(var ct=[],dt=0;dt<at.length;dt++)ct[dt]=Mi(it,at[dt]);return ct}var tr=function(it,at){this.state=it,this.lookAhead=at},gn=function(it,at,ct,dt){this.state=at,this.doc=it,this.line=ct,this.maxLookAhead=dt||0,this.baseTokens=null,this.baseTokenPos=1};gn.prototype.lookAhead=function(it){var at=this.doc.getLine(this.line+it);return at!=null&&it>this.maxLookAhead&&(this.maxLookAhead=it),at},gn.prototype.baseToken=function(it){if(!this.baseTokens)return null;for(;this.baseTokens[this.baseTokenPos]<=it;)this.baseTokenPos+=2;var at=this.baseTokens[this.baseTokenPos+1];return{type:at&&at.replace(/( |^)overlay .*/,""),size:this.baseTokens[this.baseTokenPos]-it}},gn.prototype.nextLine=function(){this.line++,this.maxLookAhead>0&&this.maxLookAhead--},gn.fromSaved=function(it,at,ct){return at instanceof tr?new gn(it,kn(it.mode,at.state),ct,at.lookAhead):new gn(it,kn(it.mode,at),ct)},gn.prototype.save=function(it){var at=it!==!1?kn(this.doc.mode,this.state):this.state;return this.maxLookAhead>0?new tr(at,this.maxLookAhead):at};function to(it,at,ct,dt){var mt=[it.state.modeGen],At={};vr(it,at.text,it.doc.mode,ct,function(oe,Ve){return mt.push(oe,Ve)},At,dt);for(var Ot=ct.state,Ut=function(oe){ct.baseTokens=mt;var Ve=it.state.overlays[oe],fe=1,dn=0;ct.state=!0,vr(it,at.text,Ve.mode,ct,function(on,ai){for(var ci=fe;dn<on;){var xi=mt[fe];xi>on&&mt.splice(fe,1,on,mt[fe+1],xi),fe+=2,dn=Math.min(on,xi)}if(ai)if(Ve.opaque)mt.splice(ci,fe-ci,on,"overlay "+ai),fe=ci+2;else for(;ci<fe;ci+=2){var Ri=mt[ci+1];mt[ci+1]=(Ri?Ri+" ":"")+"overlay "+ai}},At),ct.state=Ot,ct.baseTokens=null,ct.baseTokenPos=1},Wt=0;Wt<it.state.overlays.length;++Wt)Ut(Wt);return{styles:mt,classes:At.bgClass||At.textClass?At:null}}function Qi(it,at,ct){if(!at.styles||at.styles[0]!=it.state.modeGen){var dt=Or(it,pe(at)),mt=at.text.length>it.options.maxHighlightLength&&kn(it.doc.mode,dt.state),At=to(it,at,dt);mt&&(dt.state=mt),at.stateAfter=dt.save(!mt),at.styles=At.styles,At.classes?at.styleClasses=At.classes:at.styleClasses&&(at.styleClasses=null),ct===it.doc.highlightFrontier&&(it.doc.modeFrontier=Math.max(it.doc.modeFrontier,++it.doc.highlightFrontier))}return at.styles}function Or(it,at,ct){var dt=it.doc,mt=it.display;if(!dt.mode.startState)return new gn(dt,!0,at);var At=yr(it,at,ct),Ot=At>dt.first&&Dn(dt,At-1).stateAfter,Ut=Ot?gn.fromSaved(dt,Ot,At):new gn(dt,ti(dt.mode),At);return dt.iter(At,at,function(Wt){Je(it,Wt.text,Ut);var oe=Ut.line;Wt.stateAfter=oe==at-1||oe%5==0||oe>=mt.viewFrom&&oe<mt.viewTo?Ut.save():null,Ut.nextLine()}),ct&&(dt.modeFrontier=Ut.line),Ut}function Je(it,at,ct,dt){var mt=it.doc.mode,At=new Xe(at,it.options.tabSize,ct);for(At.start=At.pos=dt||0,at==""&&Un(mt,ct.state);!At.eol();)Pi(mt,At,ct.state),At.start=At.pos}function Un(it,at){if(it.blankLine)return it.blankLine(at);if(it.innerMode){var ct=Qn(it,at);if(ct.mode.blankLine)return ct.mode.blankLine(ct.state)}}function Pi(it,at,ct,dt){for(var mt=0;mt<10;mt++){dt&&(dt[0]=Qn(it,ct).mode);var At=it.token(at,ct);if(at.pos>at.start)return At}throw new Error("Mode "+it.name+" failed to advance stream.")}var Ni=function(it,at,ct){this.start=it.start,this.end=it.pos,this.string=it.current(),this.type=at||null,this.state=ct};function di(it,at,ct,dt){var mt=it.doc,At=mt.mode,Ot;at=Mi(mt,at);var Ut=Dn(mt,at.line),Wt=Or(it,at.line,ct),oe=new Xe(Ut.text,it.options.tabSize,Wt),Ve;for(dt&&(Ve=[]);(dt||oe.pos<at.ch)&&!oe.eol();)oe.start=oe.pos,Ot=Pi(At,oe,Wt.state),dt&&Ve.push(new Ni(oe,Ot,kn(mt.mode,Wt.state)));return dt?Ve:new Ni(oe,Ot,Wt.state)}function Ii(it,at){if(it)for(;;){var ct=it.match(/(?:^|\s+)line-(background-)?(\S+)/);if(!ct)break;it=it.slice(0,ct.index)+it.slice(ct.index+ct[0].length);var dt=ct[1]?"bgClass":"textClass";at[dt]==null?at[dt]=ct[2]:new RegExp("(?:^|\\s)"+ct[2]+"(?:$|\\s)").test(at[dt])||(at[dt]+=" "+ct[2])}return it}function vr(it,at,ct,dt,mt,At,Ot){var Ut=ct.flattenSpans;Ut==null&&(Ut=it.options.flattenSpans);var Wt=0,oe=null,Ve=new Xe(at,it.options.tabSize,dt),fe,dn=it.options.addModeClass&&[null];for(at==""&&Ii(Un(ct,dt.state),At);!Ve.eol();){if(Ve.pos>it.options.maxHighlightLength?(Ut=!1,Ot&&Je(it,at,dt,Ve.pos),Ve.pos=at.length,fe=null):fe=Ii(Pi(ct,Ve,dt.state,dn),At),dn){var on=dn[0].name;on&&(fe="m-"+(fe?on+" "+fe:on))}if(!Ut||oe!=fe){for(;Wt<Ve.start;)Wt=Math.min(Ve.start,Wt+5e3),mt(Wt,oe);oe=fe}Ve.start=Ve.pos}for(;Wt<Ve.pos;){var ai=Math.min(Ve.pos,Wt+5e3);mt(ai,oe),Wt=ai}}function yr(it,at,ct){for(var dt,mt,At=it.doc,Ot=ct?-1:at-(it.doc.mode.innerMode?1e3:100),Ut=at;Ut>Ot;--Ut){if(Ut<=At.first)return At.first;var Wt=Dn(At,Ut-1),oe=Wt.stateAfter;if(oe&&(!ct||Ut+(oe instanceof tr?oe.lookAhead:0)<=At.modeFrontier))return Ut;var Ve=qt(Wt.text,null,it.options.tabSize);(mt==null||dt>Ve)&&(mt=Ut-1,dt=Ve)}return mt}function pr(it,at){if(it.modeFrontier=Math.min(it.modeFrontier,at),!(it.highlightFrontier<at-10)){for(var ct=it.first,dt=at-1;dt>ct;dt--){var mt=Dn(it,dt).stateAfter;if(mt&&(!(mt instanceof tr)||dt+mt.lookAhead<at)){ct=dt+1;break}}it.highlightFrontier=Math.min(it.highlightFrontier,ct)}}var wr=!1,yn=!1;function Ir(){wr=!0}function mn(){yn=!0}function Zr(it,at,ct){this.marker=it,this.from=at,this.to=ct}function Gr(it,at){if(it)for(var ct=0;ct<it.length;++ct){var dt=it[ct];if(dt.marker==at)return dt}}function Cr(it,at){for(var ct,dt=0;dt<it.length;++dt)it[dt]!=at&&(ct||(ct=[])).push(it[dt]);return ct}function eo(it,at){it.markedSpans=it.markedSpans?it.markedSpans.concat([at]):[at],at.marker.attachLine(it)}function Fr(it,at,ct){var dt;if(it)for(var mt=0;mt<it.length;++mt){var At=it[mt],Ot=At.marker,Ut=At.from==null||(Ot.inclusiveLeft?At.from<=at:At.from<at);if(Ut||At.from==at&&Ot.type=="bookmark"&&(!ct||!At.marker.insertLeft)){var Wt=At.to==null||(Ot.inclusiveRight?At.to>=at:At.to>at);(dt||(dt=[])).push(new Zr(Ot,At.from,Wt?null:At.to))}}return dt}function dr(it,at,ct){var dt;if(it)for(var mt=0;mt<it.length;++mt){var At=it[mt],Ot=At.marker,Ut=At.to==null||(Ot.inclusiveRight?At.to>=at:At.to>at);if(Ut||At.from==at&&Ot.type=="bookmark"&&(!ct||At.marker.insertLeft)){var Wt=At.from==null||(Ot.inclusiveLeft?At.from<=at:At.from<at);(dt||(dt=[])).push(new Zr(Ot,Wt?null:At.from-at,At.to==null?null:At.to-at))}}return dt}function Nr(it,at){if(at.full)return null;var ct=gi(it,at.from.line)&&Dn(it,at.from.line).markedSpans,dt=gi(it,at.to.line)&&Dn(it,at.to.line).markedSpans;if(!ct&&!dt)return null;var mt=at.from.ch,At=at.to.ch,Ot=Mn(at.from,at.to)==0,Ut=Fr(ct,mt,Ot),Wt=dr(dt,At,Ot),oe=at.text.length==1,Ve=me(at.text).length+(oe?mt:0);if(Ut)for(var fe=0;fe<Ut.length;++fe){var dn=Ut[fe];if(dn.to==null){var on=Gr(Wt,dn.marker);on?oe&&(dn.to=on.to==null?null:on.to+Ve):dn.to=mt}}if(Wt)for(var ai=0;ai<Wt.length;++ai){var ci=Wt[ai];if(ci.to!=null&&(ci.to+=Ve),ci.from==null){var xi=Gr(Ut,ci.marker);xi||(ci.from=Ve,oe&&(Ut||(Ut=[])).push(ci))}else ci.from+=Ve,oe&&(Ut||(Ut=[])).push(ci)}Ut&&(Ut=Wr(Ut)),Wt&&Wt!=Ut&&(Wt=Wr(Wt));var Ri=[Ut];if(!oe){var rr=at.text.length-2,Ki;if(rr>0&&Ut)for(var lr=0;lr<Ut.length;++lr)Ut[lr].to==null&&(Ki||(Ki=[])).push(new Zr(Ut[lr].marker,null,null));for(var Rr=0;Rr<rr;++Rr)Ri.push(Ki);Ri.push(Wt)}return Ri}function Wr(it){for(var at=0;at<it.length;++at){var ct=it[at];ct.from!=null&&ct.from==ct.to&&ct.marker.clearWhenEmpty!==!1&&it.splice(at--,1)}return it.length?it:null}function Dr(it,at,ct){var dt=null;if(it.iter(at.line,ct.line+1,function(on){if(on.markedSpans)for(var ai=0;ai<on.markedSpans.length;++ai){var ci=on.markedSpans[ai].marker;ci.readOnly&&(!dt||De(dt,ci)==-1)&&(dt||(dt=[])).push(ci)}}),!dt)return null;for(var mt=[{from:at,to:ct}],At=0;At<dt.length;++At)for(var Ot=dt[At],Ut=Ot.find(0),Wt=0;Wt<mt.length;++Wt){var oe=mt[Wt];if(!(Mn(oe.to,Ut.from)<0||Mn(oe.from,Ut.to)>0)){var Ve=[Wt,1],fe=Mn(oe.from,Ut.from),dn=Mn(oe.to,Ut.to);(fe<0||!Ot.inclusiveLeft&&!fe)&&Ve.push({from:oe.from,to:Ut.from}),(dn>0||!Ot.inclusiveRight&&!dn)&&Ve.push({from:Ut.to,to:oe.to}),mt.splice.apply(mt,Ve),Wt+=Ve.length-3}}return mt}function yi(it){var at=it.markedSpans;if(at){for(var ct=0;ct<at.length;++ct)at[ct].marker.detachLine(it);it.markedSpans=null}}function Gt(it,at){if(at){for(var ct=0;ct<at.length;++ct)at[ct].marker.attachLine(it);it.markedSpans=at}}function Fo(it){return it.inclusiveLeft?-1:0}function vo(it){return it.inclusiveRight?1:0}function Oo(it,at){var ct=it.lines.length-at.lines.length;if(ct!=0)return ct;var dt=it.find(),mt=at.find(),At=Mn(dt.from,mt.from)||Fo(it)-Fo(at);if(At)return-At;var Ot=Mn(dt.to,mt.to)||vo(it)-vo(at);return Ot||at.id-it.id}function ua(it,at){var ct=yn&&it.markedSpans,dt;if(ct)for(var mt=void 0,At=0;At<ct.length;++At)mt=ct[At],mt.marker.collapsed&&(at?mt.from:mt.to)==null&&(!dt||Oo(dt,mt.marker)<0)&&(dt=mt.marker);return dt}function uo(it){return ua(it,!0)}function Qo(it){return ua(it,!1)}function $t(it,at){var ct=yn&&it.markedSpans,dt;if(ct)for(var mt=0;mt<ct.length;++mt){var At=ct[mt];At.marker.collapsed&&(At.from==null||At.from<at)&&(At.to==null||At.to>at)&&(!dt||Oo(dt,At.marker)<0)&&(dt=At.marker)}return dt}function Wn(it,at,ct,dt,mt){var At=Dn(it,at),Ot=yn&&At.markedSpans;if(Ot)for(var Ut=0;Ut<Ot.length;++Ut){var Wt=Ot[Ut];if(Wt.marker.collapsed){var oe=Wt.marker.find(0),Ve=Mn(oe.from,ct)||Fo(Wt.marker)-Fo(mt),fe=Mn(oe.to,dt)||vo(Wt.marker)-vo(mt);if(!(Ve>=0&&fe<=0||Ve<=0&&fe>=0)&&(Ve<=0&&(Wt.marker.inclusiveRight&&mt.inclusiveLeft?Mn(oe.to,ct)>=0:Mn(oe.to,ct)>0)||Ve>=0&&(Wt.marker.inclusiveRight&&mt.inclusiveLeft?Mn(oe.from,dt)<=0:Mn(oe.from,dt)<0)))return!0}}}function In(it){for(var at;at=uo(it);)it=at.find(-1,!0).line;return it}function si(it){for(var at;at=Qo(it);)it=at.find(1,!0).line;return it}function Ln(it){for(var at,ct;at=Qo(it);)it=at.find(1,!0).line,(ct||(ct=[])).push(it);return ct}function Zn(it,at){var ct=Dn(it,at),dt=In(ct);return ct==dt?at:pe(dt)}function jn(it,at){if(at>it.lastLine())return at;var ct=Dn(it,at),dt;if(!Re(it,ct))return at;for(;dt=Qo(ct);)ct=dt.find(1,!0).line;return pe(ct)+1}function Re(it,at){var ct=yn&&at.markedSpans;if(ct){for(var dt=void 0,mt=0;mt<ct.length;++mt)if(dt=ct[mt],!!dt.marker.collapsed){if(dt.from==null)return!0;if(!dt.marker.widgetNode&&dt.from==0&&dt.marker.inclusiveLeft&&Nn(it,at,dt))return!0}}}function Nn(it,at,ct){if(ct.to==null){var dt=ct.marker.find(1,!0);return Nn(it,dt.line,Gr(dt.line.markedSpans,ct.marker))}if(ct.marker.inclusiveRight&&ct.to==at.text.length)return!0;for(var mt=void 0,At=0;At<at.markedSpans.length;++At)if(mt=at.markedSpans[At],mt.marker.collapsed&&!mt.marker.widgetNode&&mt.from==ct.to&&(mt.to==null||mt.to!=ct.from)&&(mt.marker.inclusiveLeft||ct.marker.inclusiveRight)&&Nn(it,at,mt))return!0}function bi(it){it=In(it);for(var at=0,ct=it.parent,dt=0;dt<ct.lines.length;++dt){var mt=ct.lines[dt];if(mt==it)break;at+=mt.height}for(var At=ct.parent;At;ct=At,At=ct.parent)for(var Ot=0;Ot<At.children.length;++Ot){var Ut=At.children[Ot];if(Ut==ct)break;at+=Ut.height}return at}function cr(it){if(it.height==0)return 0;for(var at=it.text.length,ct,dt=it;ct=uo(dt);){var mt=ct.find(0,!0);dt=mt.from.line,at+=mt.from.ch-mt.to.ch}for(dt=it;ct=Qo(dt);){var At=ct.find(0,!0);at-=dt.text.length-At.from.ch,dt=At.to.line,at+=dt.text.length-At.to.ch}return at}function Yi(it){var at=it.display,ct=it.doc;at.maxLine=Dn(ct,ct.first),at.maxLineLength=cr(at.maxLine),at.maxLineChanged=!0,ct.iter(function(dt){var mt=cr(dt);mt>at.maxLineLength&&(at.maxLineLength=mt,at.maxLine=dt)})}var Bi=function(it,at,ct){this.text=it,Gt(this,at),this.height=ct?ct(this):1};Bi.prototype.lineNo=function(){return pe(this)},Jn(Bi);function Sr(it,at,ct,dt){it.text=at,it.stateAfter&&(it.stateAfter=null),it.styles&&(it.styles=null),it.order!=null&&(it.order=null),yi(it),Gt(it,ct);var mt=dt?dt(it):1;mt!=it.height&&ki(it,mt)}function br(it){it.parent=null,yi(it)}var ho={},Co={};function wa(it,at){if(!it||/^\s*$/.test(it))return null;var ct=at.addModeClass?Co:ho;return ct[it]||(ct[it]=it.replace(/\S+/g,"cm-$&"))}function Ye(it,at){var ct=je("span",null,null,ee?"padding-right: .1px":null),dt={pre:je("pre",[ct],"CodeMirror-line"),content:ct,col:0,pos:0,cm:it,trailingSpace:!1,splitSpaces:it.getOption("lineWrapping")};at.measure={};for(var mt=0;mt<=(at.rest?at.rest.length:0);mt++){var At=mt?at.rest[mt-1]:at.line,Ot=void 0;dt.pos=0,dt.addToken=Nl,Qr(it.display.measure)&&(Ot=Yt(At,it.doc.direction))&&(dt.addToken=rl(dt.addToken,Ot)),dt.map=[];var Ut=at!=it.display.externalMeasured&&pe(At);Tu(At,dt,Qi(it,At,Ut)),At.styleClasses&&(At.styleClasses.bgClass&&(dt.bgClass=ge(At.styleClasses.bgClass,dt.bgClass||"")),At.styleClasses.textClass&&(dt.textClass=ge(At.styleClasses.textClass,dt.textClass||""))),dt.map.length==0&&dt.map.push(0,0,dt.content.appendChild(Mr(it.display.measure))),mt==0?(at.measure.map=dt.map,at.measure.cache={}):((at.measure.maps||(at.measure.maps=[])).push(dt.map),(at.measure.caches||(at.measure.caches=[])).push({}))}if(ee){var Wt=dt.content.lastChild;(/\bcm-tab\b/.test(Wt.className)||Wt.querySelector&&Wt.querySelector(".cm-tab"))&&(dt.content.className="cm-tab-wrap-hack")}return ei(it,"renderLine",it,at.line,dt.pre),dt.pre.className&&(dt.textClass=ge(dt.pre.className,dt.textClass||"")),dt}function Go(it){var at=ae("span","\u2022","cm-invalidchar");return at.title="\\u"+it.charCodeAt(0).toString(16),at.setAttribute("aria-label",at.title),at}function Nl(it,at,ct,dt,mt,At,Ot){if(at){var Ut=it.splitSpaces?Ss(at,it.trailingSpace):at,Wt=it.cm.state.specialChars,oe=!1,Ve;if(!Wt.test(at))it.col+=at.length,Ve=document.createTextNode(Ut),it.map.push(it.pos,it.pos+at.length,Ve),Pe&&Ae<9&&(oe=!0),it.pos+=at.length;else{Ve=document.createDocumentFragment();for(var fe=0;;){Wt.lastIndex=fe;var dn=Wt.exec(at),on=dn?dn.index-fe:at.length-fe;if(on){var ai=document.createTextNode(Ut.slice(fe,fe+on));Pe&&Ae<9?Ve.appendChild(ae("span",[ai])):Ve.appendChild(ai),it.map.push(it.pos,it.pos+on,ai),it.col+=on,it.pos+=on}if(!dn)break;fe+=on+1;var ci=void 0;if(dn[0]==" "){var xi=it.cm.options.tabSize,Ri=xi-it.col%xi;ci=Ve.appendChild(ae("span",zn(Ri),"cm-tab")),ci.setAttribute("role","presentation"),ci.setAttribute("cm-text"," "),it.col+=Ri}else dn[0]=="\r"||dn[0]==`
`?(ci=Ve.appendChild(ae("span",dn[0]=="\r"?"\u240D":"\u2424","cm-invalidchar")),ci.setAttribute("cm-text",dn[0]),it.col+=1):(ci=it.cm.options.specialCharPlaceholder(dn[0]),ci.setAttribute("cm-text",dn[0]),Pe&&Ae<9?Ve.appendChild(ae("span",[ci])):Ve.appendChild(ci),it.col+=1);it.map.push(it.pos,it.pos+1,ci),it.pos++}}if(it.trailingSpace=Ut.charCodeAt(at.length-1)==32,ct||dt||mt||oe||At||Ot){var rr=ct||"";dt&&(rr+=dt),mt&&(rr+=mt);var Ki=ae("span",[Ve],rr,At);if(Ot)for(var lr in Ot)Ot.hasOwnProperty(lr)&&lr!="style"&&lr!="class"&&Ki.setAttribute(lr,Ot[lr]);return it.content.appendChild(Ki)}it.content.appendChild(Ve)}}function Ss(it,at){if(it.length>1&&!/ /.test(it))return it;for(var ct=at,dt="",mt=0;mt<it.length;mt++){var At=it.charAt(mt);At==" "&&ct&&(mt==it.length-1||it.charCodeAt(mt+1)==32)&&(At="\xA0"),dt+=At,ct=At==" "}return dt}function rl(it,at){return function(ct,dt,mt,At,Ot,Ut,Wt){mt=mt?mt+" cm-force-border":"cm-force-border";for(var oe=ct.pos,Ve=oe+dt.length;;){for(var fe=void 0,dn=0;dn<at.length&&(fe=at[dn],!(fe.to>oe&&fe.from<=oe));dn++);if(fe.to>=Ve)return it(ct,dt,mt,At,Ot,Ut,Wt);it(ct,dt.slice(0,fe.to-oe),mt,At,null,Ut,Wt),At=null,dt=dt.slice(fe.to-oe),oe=fe.to}}}function yo(it,at,ct,dt){var mt=!dt&&ct.widgetNode;mt&&it.map.push(it.pos,it.pos+at,mt),!dt&&it.cm.display.input.needsContentAttribute&&(mt||(mt=it.content.appendChild(document.createElement("span"))),mt.setAttribute("cm-marker",ct.id)),mt&&(it.cm.display.input.setUneditable(mt),it.content.appendChild(mt)),it.pos+=at,it.trailingSpace=!1}function Tu(it,at,ct){var dt=it.markedSpans,mt=it.text,At=0;if(!dt){for(var Ot=1;Ot<ct.length;Ot+=2)at.addToken(at,mt.slice(At,At=ct[Ot]),wa(ct[Ot+1],at.cm.options));return}for(var Ut=mt.length,Wt=0,oe=1,Ve="",fe,dn,on=0,ai,ci,xi,Ri,rr;;){if(on==Wt){ai=ci=xi=dn="",rr=null,Ri=null,on=1/0;for(var Ki=[],lr=void 0,Rr=0;Rr<dt.length;++Rr){var Zi=dt[Rr],Jr=Zi.marker;if(Jr.type=="bookmark"&&Zi.from==Wt&&Jr.widgetNode)Ki.push(Jr);else if(Zi.from<=Wt&&(Zi.to==null||Zi.to>Wt||Jr.collapsed&&Zi.to==Wt&&Zi.from==Wt)){if(Zi.to!=null&&Zi.to!=Wt&&on>Zi.to&&(on=Zi.to,ci=""),Jr.className&&(ai+=" "+Jr.className),Jr.css&&(dn=(dn?dn+";":"")+Jr.css),Jr.startStyle&&Zi.from==Wt&&(xi+=" "+Jr.startStyle),Jr.endStyle&&Zi.to==on&&(lr||(lr=[])).push(Jr.endStyle,Zi.to),Jr.title&&((rr||(rr={})).title=Jr.title),Jr.attributes)for(var Wo in Jr.attributes)(rr||(rr={}))[Wo]=Jr.attributes[Wo];Jr.collapsed&&(!Ri||Oo(Ri.marker,Jr)<0)&&(Ri=Zi)}else Zi.from>Wt&&on>Zi.from&&(on=Zi.from)}if(lr)for(var Da=0;Da<lr.length;Da+=2)lr[Da+1]==on&&(ci+=" "+lr[Da]);if(!Ri||Ri.from==Wt)for(var $o=0;$o<Ki.length;++$o)yo(at,0,Ki[$o]);if(Ri&&(Ri.from||0)==Wt){if(yo(at,(Ri.to==null?Ut+1:Ri.to)-Wt,Ri.marker,Ri.from==null),Ri.to==null)return;Ri.to==Wt&&(Ri=!1)}}if(Wt>=Ut)break;for(var As=Math.min(Ut,on);;){if(Ve){var ts=Wt+Ve.length;if(!Ri){var Ea=ts>As?Ve.slice(0,As-Wt):Ve;at.addToken(at,Ea,fe?fe+ai:ai,xi,Wt+Ea.length==on?ci:"",dn,rr)}if(ts>=As){Ve=Ve.slice(As-Wt),Wt=As;break}Wt=ts,xi=""}Ve=mt.slice(At,At=ct[oe++]),fe=wa(ct[oe++],at.cm.options)}}}function ao(it,at,ct){this.line=at,this.rest=Ln(at),this.size=this.rest?pe(me(this.rest))-ct+1:1,this.node=this.text=null,this.hidden=Re(it,at)}function Ar(it,at,ct){for(var dt=[],mt,At=at;At<ct;At=mt){var Ot=new ao(it.doc,Dn(it.doc,At),At);mt=At+Ot.size,dt.push(Ot)}return dt}var Vr=null;function Ro(it){Vr?Vr.ops.push(it):it.ownsGroup=Vr={ops:[it],delayedCallbacks:[]}}function Ho(it){var at=it.delayedCallbacks,ct=0;do{for(;ct<at.length;ct++)at[ct].call(null);for(var dt=0;dt<it.ops.length;dt++){var mt=it.ops[dt];if(mt.cursorActivityHandlers)for(;mt.cursorActivityCalled<mt.cursorActivityHandlers.length;)mt.cursorActivityHandlers[mt.cursorActivityCalled++].call(null,mt.cm)}}while(ct<at.length)}function va(it,at){var ct=it.ownsGroup;if(ct)try{Ho(ct)}finally{Vr=null,at(ct)}}var Po=null;function Di(it,at){var ct=_n(it,at);if(ct.length){var dt=Array.prototype.slice.call(arguments,2),mt;Vr?mt=Vr.delayedCallbacks:Po?mt=Po:(mt=Po=[],setTimeout(Va,0));for(var At=function(Ut){mt.push(function(){return ct[Ut].apply(null,dt)})},Ot=0;Ot<ct.length;++Ot)At(Ot)}}function Va(){var it=Po;Po=null;for(var at=0;at<it.length;++at)it[at]()}function yl(it,at,ct,dt){for(var mt=0;mt<at.changes.length;mt++){var At=at.changes[mt];At=="text"?pi(it,at):At=="gutter"?wo(it,at,ct,dt):At=="class"?No(it,at):At=="widget"&&Ta(it,at,dt)}at.changes=null}function xs(it){return it.node==it.text&&(it.node=ae("div",null,null,"position: relative"),it.text.parentNode&&it.text.parentNode.replaceChild(it.node,it.text),it.node.appendChild(it.text),Pe&&Ae<8&&(it.node.style.zIndex=2)),it.node}function Dl(it,at){var ct=at.bgClass?at.bgClass+" "+(at.line.bgClass||""):at.line.bgClass;if(ct&&(ct+=" CodeMirror-linebackground"),at.background)ct?at.background.className=ct:(at.background.parentNode.removeChild(at.background),at.background=null);else if(ct){var dt=xs(at);at.background=dt.insertBefore(ae("div",null,ct),dt.firstChild),it.display.input.setUneditable(at.background)}}function Tl(it,at){var ct=it.display.externalMeasured;return ct&&ct.line==at.line?(it.display.externalMeasured=null,at.measure=ct.measure,ct.built):Ye(it,at)}function pi(it,at){var ct=at.text.className,dt=Tl(it,at);at.text==at.node&&(at.node=dt.pre),at.text.parentNode.replaceChild(dt.pre,at.text),at.text=dt.pre,dt.bgClass!=at.bgClass||dt.textClass!=at.textClass?(at.bgClass=dt.bgClass,at.textClass=dt.textClass,No(it,at)):ct&&(at.text.className=ct)}function No(it,at){Dl(it,at),at.line.wrapClass?xs(at).className=at.line.wrapClass:at.node!=at.text&&(at.node.className="");var ct=at.textClass?at.textClass+" "+(at.line.textClass||""):at.line.textClass;at.text.className=ct||""}function wo(it,at,ct,dt){if(at.gutter&&(at.node.removeChild(at.gutter),at.gutter=null),at.gutterBackground&&(at.node.removeChild(at.gutterBackground),at.gutterBackground=null),at.line.gutterClass){var mt=xs(at);at.gutterBackground=ae("div",null,"CodeMirror-gutter-background "+at.line.gutterClass,"left: "+(it.options.fixedGutter?dt.fixedPos:-dt.gutterTotalWidth)+"px; width: "+dt.gutterTotalWidth+"px"),it.display.input.setUneditable(at.gutterBackground),mt.insertBefore(at.gutterBackground,at.text)}var At=at.line.gutterMarkers;if(it.options.lineNumbers||At){var Ot=xs(at),Ut=at.gutter=ae("div",null,"CodeMirror-gutter-wrapper","left: "+(it.options.fixedGutter?dt.fixedPos:-dt.gutterTotalWidth)+"px");if(it.display.input.setUneditable(Ut),Ot.insertBefore(Ut,at.text),at.line.gutterClass&&(Ut.className+=" "+at.line.gutterClass),it.options.lineNumbers&&(!At||!At["CodeMirror-linenumbers"])&&(at.lineNumber=Ut.appendChild(ae("div",Oi(it.options,ct),"CodeMirror-linenumber CodeMirror-gutter-elt","left: "+dt.gutterLeft["CodeMirror-linenumbers"]+"px; width: "+it.display.lineNumInnerWidth+"px"))),At)for(var Wt=0;Wt<it.display.gutterSpecs.length;++Wt){var oe=it.display.gutterSpecs[Wt].className,Ve=At.hasOwnProperty(oe)&&At[oe];Ve&&Ut.appendChild(ae("div",[Ve],"CodeMirror-gutter-elt","left: "+dt.gutterLeft[oe]+"px; width: "+dt.gutterWidth[oe]+"px"))}}}function Ta(it,at,ct){at.alignable&&(at.alignable=null);for(var dt=zt("CodeMirror-linewidget"),mt=at.node.firstChild,At=void 0;mt;mt=At)At=mt.nextSibling,dt.test(mt.className)&&at.node.removeChild(mt);_h(it,at,ct)}function Xh(it,at,ct,dt){var mt=Tl(it,at);return at.text=at.node=mt.pre,mt.bgClass&&(at.bgClass=mt.bgClass),mt.textClass&&(at.textClass=mt.textClass),No(it,at),wo(it,at,ct,dt),_h(it,at,dt),at.node}function _h(it,at,ct){if(Br(it,at.line,at,ct,!0),at.rest)for(var dt=0;dt<at.rest.length;dt++)Br(it,at.rest[dt],at,ct,!1)}function Br(it,at,ct,dt,mt){if(at.widgets)for(var At=xs(ct),Ot=0,Ut=at.widgets;Ot<Ut.length;++Ot){var Wt=Ut[Ot],oe=ae("div",[Wt.node],"CodeMirror-linewidget"+(Wt.className?" "+Wt.className:""));Wt.handleMouseEvents||oe.setAttribute("cm-ignore-events","true"),Jh(Wt,oe,ct,dt),it.display.input.setUneditable(oe),mt&&Wt.above?At.insertBefore(oe,ct.gutter||ct.text):At.appendChild(oe),Di(Wt,"redraw")}}function Jh(it,at,ct,dt){if(it.noHScroll){(ct.alignable||(ct.alignable=[])).push(at);var mt=dt.wrapperWidth;at.style.left=dt.fixedPos+"px",it.coverGutter||(mt-=dt.gutterTotalWidth,at.style.paddingLeft=dt.gutterTotalWidth+"px"),at.style.width=mt+"px"}it.coverGutter&&(at.style.zIndex=5,at.style.position="relative",it.noHScroll||(at.style.marginLeft=-dt.gutterTotalWidth+"px"))}function Ql(it){if(it.height!=null)return it.height;var at=it.doc.cm;if(!at)return 0;if(!Le(document.body,it.node)){var ct="position: relative;";it.coverGutter&&(ct+="margin-left: -"+at.display.gutters.offsetWidth+"px;"),it.noHScroll&&(ct+="width: "+at.display.wrapper.clientWidth+"px;"),le(at.display.measure,ae("div",[it.node],null,ct))}return it.height=it.node.parentNode.offsetHeight}function Ko(it,at){for(var ct=kr(at);ct!=it.wrapper;ct=ct.parentNode)if(!ct||ct.nodeType==1&&ct.getAttribute("cm-ignore-events")=="true"||ct.parentNode==it.sizer&&ct!=it.mover)return!0}function Rs(it){return it.lineSpace.offsetTop}function Pu(it){return it.mover.offsetHeight-it.lineSpace.offsetHeight}function gh(it){if(it.cachedPaddingH)return it.cachedPaddingH;var at=le(it.measure,ae("pre","x","CodeMirror-line-like")),ct=window.getComputedStyle?window.getComputedStyle(at):at.currentStyle,dt={left:parseInt(ct.paddingLeft),right:parseInt(ct.paddingRight)};return!isNaN(dt.left)&&!isNaN(dt.right)&&(it.cachedPaddingH=dt),dt}function js(it){return sn-it.display.nativeBarWidth}function Ps(it){return it.display.scroller.clientWidth-js(it)-it.display.barWidth}function jd(it){return it.display.scroller.clientHeight-js(it)-it.display.barHeight}function Dc(it,at,ct){var dt=it.options.lineWrapping,mt=dt&&Ps(it);if(!at.measure.heights||dt&&at.measure.width!=mt){var At=at.measure.heights=[];if(dt){at.measure.width=mt;for(var Ot=at.text.firstChild.getClientRects(),Ut=0;Ut<Ot.length-1;Ut++){var Wt=Ot[Ut],oe=Ot[Ut+1];Math.abs(Wt.bottom-oe.bottom)>2&&At.push((Wt.bottom+oe.top)/2-ct.top)}}At.push(ct.bottom-ct.top)}}function zd(it,at,ct){if(it.line==at)return{map:it.measure.map,cache:it.measure.cache};for(var dt=0;dt<it.rest.length;dt++)if(it.rest[dt]==at)return{map:it.measure.maps[dt],cache:it.measure.caches[dt]};for(var mt=0;mt<it.rest.length;mt++)if(pe(it.rest[mt])>ct)return{map:it.measure.maps[mt],cache:it.measure.caches[mt],before:!0}}function Nf(it,at){at=In(at);var ct=pe(at),dt=it.display.externalMeasured=new ao(it.doc,at,ct);dt.lineN=ct;var mt=dt.built=Ye(it,dt);return dt.text=mt.pre,le(it.display.lineMeasure,mt.pre),dt}function Tc(it,at,ct,dt){return Sl(it,Ia(it,at),ct,dt)}function Gd(it,at){if(at>=it.display.viewFrom&&at<it.display.viewTo)return it.display.view[ws(it,at)];var ct=it.display.externalMeasured;if(ct&&at>=ct.lineN&&at<ct.lineN+ct.size)return ct}function Ia(it,at){var ct=pe(at),dt=Gd(it,ct);dt&&!dt.text?dt=null:dt&&dt.changes&&(yl(it,dt,ct,Hc(it)),it.curOp.forceUpdate=!0),dt||(dt=Nf(it,at));var mt=zd(dt,at,ct);return{line:at,view:dt,rect:null,map:mt.map,cache:mt.cache,before:mt.before,hasHeights:!1}}function Sl(it,at,ct,dt,mt){at.before&&(ct=-1);var At=ct+(dt||""),Ot;return at.cache.hasOwnProperty(At)?Ot=at.cache[At]:(at.rect||(at.rect=at.view.text.getBoundingClientRect()),at.hasHeights||(Dc(it,at.view,at.rect),at.hasHeights=!0),Ot=ha(it,at,ct,dt),Ot.bogus||(at.cache[At]=Ot)),{left:Ot.left,right:Ot.right,top:mt?Ot.rtop:Ot.top,bottom:mt?Ot.rbottom:Ot.bottom}}var Ic={left:0,right:0,top:0,bottom:0};function ql(it,at,ct){for(var dt,mt,At,Ot,Ut,Wt,oe=0;oe<it.length;oe+=3)if(Ut=it[oe],Wt=it[oe+1],at<Ut?(mt=0,At=1,Ot="left"):at<Wt?(mt=at-Ut,At=mt+1):(oe==it.length-3||at==Wt&&it[oe+3]>at)&&(At=Wt-Ut,mt=At-1,at>=Wt&&(Ot="right")),mt!=null){if(dt=it[oe+2],Ut==Wt&&ct==(dt.insertLeft?"left":"right")&&(Ot=ct),ct=="left"&&mt==0)for(;oe&&it[oe-2]==it[oe-3]&&it[oe-1].insertLeft;)dt=it[(oe-=3)+2],Ot="left";if(ct=="right"&&mt==Wt-Ut)for(;oe<it.length-3&&it[oe+3]==it[oe+4]&&!it[oe+5].insertLeft;)dt=it[(oe+=3)+2],Ot="right";break}return{node:dt,start:mt,end:At,collapse:Ot,coverStart:Ut,coverEnd:Wt}}function Oc(it,at){var ct=Ic;if(at=="left")for(var dt=0;dt<it.length&&(ct=it[dt]).left==ct.right;dt++);else for(var mt=it.length-1;mt>=0&&(ct=it[mt]).left==ct.right;mt--);return ct}function ha(it,at,ct,dt){var mt=ql(at.map,ct,dt),At=mt.node,Ot=mt.start,Ut=mt.end,Wt=mt.collapse,oe;if(At.nodeType==3){for(var Ve=0;Ve<4;Ve++){for(;Ot&&qe(at.line.text.charAt(mt.coverStart+Ot));)--Ot;for(;mt.coverStart+Ut<mt.coverEnd&&qe(at.line.text.charAt(mt.coverStart+Ut));)++Ut;if(Pe&&Ae<9&&Ot==0&&Ut==mt.coverEnd-mt.coverStart?oe=At.parentNode.getBoundingClientRect():oe=Oc(ne(At,Ot,Ut).getClientRects(),dt),oe.left||oe.right||Ot==0)break;Ut=Ot,Ot=Ot-1,Wt="right"}Pe&&Ae<11&&(oe=Tg(it.display.measure,oe))}else{Ot>0&&(Wt=dt="right");var fe;it.options.lineWrapping&&(fe=At.getClientRects()).length>1?oe=fe[dt=="right"?fe.length-1:0]:oe=At.getBoundingClientRect()}if(Pe&&Ae<9&&!Ot&&(!oe||!oe.left&&!oe.right)){var dn=At.parentNode.getClientRects()[0];dn?oe={left:dn.left,right:dn.left+Il(it.display),top:dn.top,bottom:dn.bottom}:oe=Ic}for(var on=oe.top-at.rect.top,ai=oe.bottom-at.rect.top,ci=(on+ai)/2,xi=at.view.measure.heights,Ri=0;Ri<xi.length-1&&!(ci<xi[Ri]);Ri++);var rr=Ri?xi[Ri-1]:0,Ki=xi[Ri],lr={left:(Wt=="right"?oe.right:oe.left)-at.rect.left,right:(Wt=="left"?oe.left:oe.right)-at.rect.left,top:rr,bottom:Ki};return!oe.left&&!oe.right&&(lr.bogus=!0),it.options.singleCursorHeightPerLine||(lr.rtop=on,lr.rbottom=ai),lr}function Tg(it,at){if(!window.screen||screen.logicalXDPI==null||screen.logicalXDPI==screen.deviceXDPI||!ze(it))return at;var ct=screen.logicalXDPI/screen.deviceXDPI,dt=screen.logicalYDPI/screen.deviceYDPI;return{left:at.left*ct,right:at.right*ct,top:at.top*dt,bottom:at.bottom*dt}}function Df(it){if(it.measure&&(it.measure.cache={},it.measure.heights=null,it.rest))for(var at=0;at<it.rest.length;at++)it.measure.caches[at]={}}function Qh(it){it.display.externalMeasure=null,re(it.display.lineMeasure);for(var at=0;at<it.display.view.length;at++)Df(it.display.view[at])}function qh(it){Qh(it),it.display.cachedCharWidth=it.display.cachedTextHeight=it.display.cachedPaddingH=null,it.options.lineWrapping||(it.display.maxLineChanged=!0),it.display.lineNumChars=null}function $a(){return ye&&nt?-(document.body.getBoundingClientRect().left-parseInt(getComputedStyle(document.body).marginLeft)):window.pageXOffset||(document.documentElement||document.body).scrollLeft}function us(){return ye&&nt?-(document.body.getBoundingClientRect().top-parseInt(getComputedStyle(document.body).marginTop)):window.pageYOffset||(document.documentElement||document.body).scrollTop}function Aa(it){var at=0;if(it.widgets)for(var ct=0;ct<it.widgets.length;++ct)it.widgets[ct].above&&(at+=Ql(it.widgets[ct]));return at}function Ua(it,at,ct,dt,mt){if(!mt){var At=Aa(at);ct.top+=At,ct.bottom+=At}if(dt=="line")return ct;dt||(dt="local");var Ot=bi(at);if(dt=="local"?Ot+=Rs(it.display):Ot-=it.display.viewOffset,dt=="page"||dt=="window"){var Ut=it.display.lineSpace.getBoundingClientRect();Ot+=Ut.top+(dt=="window"?0:us());var Wt=Ut.left+(dt=="window"?0:$a());ct.left+=Wt,ct.right+=Wt}return ct.top+=Ot,ct.bottom+=Ot,ct}function Rc(it,at,ct){if(ct=="div")return at;var dt=at.left,mt=at.top;if(ct=="page")dt-=$a(),mt-=us();else if(ct=="local"||!ct){var At=it.display.sizer.getBoundingClientRect();dt+=At.left,mt+=At.top}var Ot=it.display.lineSpace.getBoundingClientRect();return{left:dt-Ot.left,top:mt-Ot.top}}function $h(it,at,ct,dt,mt){return dt||(dt=Dn(it.doc,at.line)),Ua(it,dt,Tc(it,dt,at.ch,mt),ct)}function Zo(it,at,ct,dt,mt,At){dt=dt||Dn(it.doc,at.line),mt||(mt=Ia(it,dt));function Ot(ai,ci){var xi=Sl(it,mt,ai,ci?"right":"left",At);return ci?xi.left=xi.right:xi.right=xi.left,Ua(it,dt,xi,ct)}var Ut=Yt(dt,it.doc.direction),Wt=at.ch,oe=at.sticky;if(Wt>=dt.text.length?(Wt=dt.text.length,oe="before"):Wt<=0&&(Wt=0,oe="after"),!Ut)return Ot(oe=="before"?Wt-1:Wt,oe=="before");function Ve(ai,ci,xi){var Ri=Ut[ci],rr=Ri.level==1;return Ot(xi?ai-1:ai,rr!=xi)}var fe=Pt(Ut,Wt,oe),dn=bt,on=Ve(Wt,fe,oe=="before");return dn!=null&&(on.other=Ve(Wt,dn,oe!="before")),on}function jc(it,at){var ct=0;at=Mi(it.doc,at),it.options.lineWrapping||(ct=Il(it.display)*at.ch);var dt=Dn(it.doc,at.line),mt=bi(dt)+Rs(it.display);return{left:ct,right:ct,top:mt,bottom:mt+dt.height}}function zc(it,at,ct,dt,mt){var At=bn(it,at,ct);return At.xRel=mt,dt&&(At.outside=dt),At}function Iu(it,at,ct){var dt=it.doc;if(ct+=it.display.viewOffset,ct<0)return zc(dt.first,0,null,-1,-1);var mt=Tn(dt,ct),At=dt.first+dt.size-1;if(mt>At)return zc(dt.first+dt.size-1,Dn(dt,At).text.length,null,1,1);at<0&&(at=0);for(var Ot=Dn(dt,mt);;){var Ut=Fn(it,Ot,mt,at,ct),Wt=$t(Ot,Ut.ch+(Ut.xRel>0||Ut.outside>0?1:0));if(!Wt)return Ut;var oe=Wt.find(1);if(oe.line==mt)return oe;Ot=Dn(dt,mt=oe.line)}}function Xi(it,at,ct,dt){dt-=Aa(at);var mt=at.text.length,At=Pn(function(Ot){return Sl(it,ct,Ot-1).bottom<=dt},mt,0);return mt=Pn(function(Ot){return Sl(it,ct,Ot).top>dt},At,mt),{begin:At,end:mt}}function Gc(it,at,ct,dt){ct||(ct=Ia(it,at));var mt=Ua(it,at,Sl(it,ct,dt),"line").top;return Xi(it,at,ct,mt)}function Se(it,at,ct,dt){return it.bottom<=ct?!1:it.top>ct?!0:(dt?it.left:it.right)>at}function Fn(it,at,ct,dt,mt){mt-=bi(at);var At=Ia(it,at),Ot=Aa(at),Ut=0,Wt=at.text.length,oe=!0,Ve=Yt(at,it.doc.direction);if(Ve){var fe=(it.options.lineWrapping?Tf:Ig)(it,at,ct,At,Ve,dt,mt);oe=fe.level!=1,Ut=oe?fe.from:fe.to-1,Wt=oe?fe.to:fe.from-1}var dn=null,on=null,ai=Pn(function(Rr){var Zi=Sl(it,At,Rr);return Zi.top+=Ot,Zi.bottom+=Ot,Se(Zi,dt,mt,!1)?(Zi.top<=mt&&Zi.left<=dt&&(dn=Rr,on=Zi),!0):!1},Ut,Wt),ci,xi,Ri=!1;if(on){var rr=dt-on.left<on.right-dt,Ki=rr==oe;ai=dn+(Ki?0:1),xi=Ki?"after":"before",ci=rr?on.left:on.right}else{!oe&&(ai==Wt||ai==Ut)&&ai++,xi=ai==0?"after":ai==at.text.length?"before":Sl(it,At,ai-(oe?1:0)).bottom+Ot<=mt==oe?"after":"before";var lr=Zo(it,bn(ct,ai,xi),"line",at,At);ci=lr.left,Ri=mt<lr.top?-1:mt>=lr.bottom?1:0}return ai=$e(at.text,ai,1),zc(ct,ai,xi,Ri,dt-ci)}function Ig(it,at,ct,dt,mt,At,Ot){var Ut=Pn(function(fe){var dn=mt[fe],on=dn.level!=1;return Se(Zo(it,bn(ct,on?dn.to:dn.from,on?"before":"after"),"line",at,dt),At,Ot,!0)},0,mt.length-1),Wt=mt[Ut];if(Ut>0){var oe=Wt.level!=1,Ve=Zo(it,bn(ct,oe?Wt.from:Wt.to,oe?"after":"before"),"line",at,dt);Se(Ve,At,Ot,!0)&&Ve.top>Ot&&(Wt=mt[Ut-1])}return Wt}function Tf(it,at,ct,dt,mt,At,Ot){var Ut=Xi(it,at,dt,Ot),Wt=Ut.begin,oe=Ut.end;/\s/.test(at.text.charAt(oe-1))&&oe--;for(var Ve=null,fe=null,dn=0;dn<mt.length;dn++){var on=mt[dn];if(!(on.from>=oe||on.to<=Wt)){var ai=on.level!=1,ci=Sl(it,dt,ai?Math.min(oe,on.to)-1:Math.max(Wt,on.from)).right,xi=ci<At?At-ci+1e9:ci-At;(!Ve||fe>xi)&&(Ve=on,fe=xi)}}return Ve||(Ve=mt[mt.length-1]),Ve.from<Wt&&(Ve={from:Wt,to:Ve.to,level:Ve.level}),Ve.to>oe&&(Ve={from:Ve.from,to:oe,level:Ve.level}),Ve}var wu;function ol(it){if(it.cachedTextHeight!=null)return it.cachedTextHeight;if(wu==null){wu=ae("pre",null,"CodeMirror-line-like");for(var at=0;at<49;++at)wu.appendChild(document.createTextNode("x")),wu.appendChild(ae("br"));wu.appendChild(document.createTextNode("x"))}le(it.measure,wu);var ct=wu.offsetHeight/50;return ct>3&&(it.cachedTextHeight=ct),re(it.measure),ct||1}function Il(it){if(it.cachedCharWidth!=null)return it.cachedCharWidth;var at=ae("span","xxxxxxxxxx"),ct=ae("pre",[at],"CodeMirror-line-like");le(it.measure,ct);var dt=at.getBoundingClientRect(),mt=(dt.right-dt.left)/10;return mt>2&&(it.cachedCharWidth=mt),mt||10}function Hc(it){for(var at=it.display,ct={},dt={},mt=at.gutters.clientLeft,At=at.gutters.firstChild,Ot=0;At;At=At.nextSibling,++Ot){var Ut=it.display.gutterSpecs[Ot].className;ct[Ut]=At.offsetLeft+At.clientLeft+mt,dt[Ut]=At.clientWidth}return{fixedPos:Hd(at),gutterTotalWidth:at.gutters.offsetWidth,gutterLeft:ct,gutterWidth:dt,wrapperWidth:at.wrapper.clientWidth}}function Hd(it){return it.scroller.getBoundingClientRect().left-it.sizer.getBoundingClientRect().left}function Yo(it){var at=ol(it.display),ct=it.options.lineWrapping,dt=ct&&Math.max(5,it.display.scroller.clientWidth/Il(it.display)-3);return function(mt){if(Re(it.doc,mt))return 0;var At=0;if(mt.widgets)for(var Ot=0;Ot<mt.widgets.length;Ot++)mt.widgets[Ot].height&&(At+=mt.widgets[Ot].height);return ct?At+(Math.ceil(mt.text.length/dt)||1)*at:At+at}}function xr(it){var at=it.doc,ct=Yo(it);at.iter(function(dt){var mt=ct(dt);mt!=dt.height&&ki(dt,mt)})}function Ka(it,at,ct,dt){var mt=it.display;if(!ct&&kr(at).getAttribute("cm-not-content")=="true")return null;var At,Ot,Ut=mt.lineSpace.getBoundingClientRect();try{At=at.clientX-Ut.left,Ot=at.clientY-Ut.top}catch(fe){return null}var Wt=Iu(it,At,Ot),oe;if(dt&&Wt.xRel>0&&(oe=Dn(it.doc,Wt.line).text).length==Wt.ch){var Ve=qt(oe,oe.length,it.options.tabSize)-oe.length;Wt=bn(Wt.line,Math.max(0,Math.round((At-gh(it.display).left)/Il(it.display))-Ve))}return Wt}function ws(it,at){if(at>=it.display.viewTo||(at-=it.display.viewFrom,at<0))return null;for(var ct=it.display.view,dt=0;dt<ct.length;dt++)if(at-=ct[dt].size,at<0)return dt}function jo(it,at,ct,dt){at==null&&(at=it.doc.first),ct==null&&(ct=it.doc.first+it.doc.size),dt||(dt=0);var mt=it.display;if(dt&&ct<mt.viewTo&&(mt.updateLineNumbers==null||mt.updateLineNumbers>at)&&(mt.updateLineNumbers=at),it.curOp.viewChanged=!0,at>=mt.viewTo)yn&&Zn(it.doc,at)<mt.viewTo&&da(it);else if(ct<=mt.viewFrom)yn&&jn(it.doc,ct+dt)>mt.viewFrom?da(it):(mt.viewFrom+=dt,mt.viewTo+=dt);else if(at<=mt.viewFrom&&ct>=mt.viewTo)da(it);else if(at<=mt.viewFrom){var At=Cs(it,ct,ct+dt,1);At?(mt.view=mt.view.slice(At.index),mt.viewFrom=At.lineN,mt.viewTo+=dt):da(it)}else if(ct>=mt.viewTo){var Ot=Cs(it,at,at,-1);Ot?(mt.view=mt.view.slice(0,Ot.index),mt.viewTo=Ot.lineN):da(it)}else{var Ut=Cs(it,at,at,-1),Wt=Cs(it,ct,ct+dt,1);Ut&&Wt?(mt.view=mt.view.slice(0,Ut.index).concat(Ar(it,Ut.lineN,Wt.lineN)).concat(mt.view.slice(Wt.index)),mt.viewTo+=dt):da(it)}var oe=mt.externalMeasured;oe&&(ct<oe.lineN?oe.lineN+=dt:at<oe.lineN+oe.size&&(mt.externalMeasured=null))}function Ur(it,at,ct){it.curOp.viewChanged=!0;var dt=it.display,mt=it.display.externalMeasured;if(mt&&at>=mt.lineN&&at<mt.lineN+mt.size&&(dt.externalMeasured=null),!(at<dt.viewFrom||at>=dt.viewTo)){var At=dt.view[ws(it,at)];if(At.node!=null){var Ot=At.changes||(At.changes=[]);De(Ot,ct)==-1&&Ot.push(ct)}}}function da(it){it.display.viewFrom=it.display.viewTo=it.doc.first,it.display.view=[],it.display.viewOffset=0}function Cs(it,at,ct,dt){var mt=ws(it,at),At,Ot=it.display.view;if(!yn||ct==it.doc.first+it.doc.size)return{index:mt,lineN:ct};for(var Ut=it.display.viewFrom,Wt=0;Wt<mt;Wt++)Ut+=Ot[Wt].size;if(Ut!=at){if(dt>0){if(mt==Ot.length-1)return null;At=Ut+Ot[mt].size-at,mt++}else At=Ut-at;at+=At,ct+=At}for(;Zn(it.doc,ct)!=ct;){if(mt==(dt<0?0:Ot.length-1))return null;ct+=dt*Ot[mt-(dt<0?1:0)].size,mt+=dt}return{index:mt,lineN:ct}}function Bo(it,at,ct){var dt=it.display,mt=dt.view;mt.length==0||at>=dt.viewTo||ct<=dt.viewFrom?(dt.view=Ar(it,at,ct),dt.viewFrom=at):(dt.viewFrom>at?dt.view=Ar(it,at,dt.viewFrom).concat(dt.view):dt.viewFrom<at&&(dt.view=dt.view.slice(ws(it,at))),dt.viewFrom=at,dt.viewTo<ct?dt.view=dt.view.concat(Ar(it,dt.viewTo,ct)):dt.viewTo>ct&&(dt.view=dt.view.slice(0,ws(it,ct)))),dt.viewTo=ct}function zs(it){for(var at=it.display.view,ct=0,dt=0;dt<at.length;dt++){var mt=at[dt];!mt.hidden&&(!mt.node||mt.changes)&&++ct}return ct}function Fa(it){it.display.input.showSelection(it.display.input.prepareSelection())}function Ou(it,at){at===void 0&&(at=!0);for(var ct=it.doc,dt={},mt=dt.cursors=document.createDocumentFragment(),At=dt.selection=document.createDocumentFragment(),Ot=0;Ot<ct.sel.ranges.length;Ot++)if(!(!at&&Ot==ct.sel.primIndex)){var Ut=ct.sel.ranges[Ot];if(!(Ut.from().line>=it.display.viewTo||Ut.to().line<it.display.viewFrom)){var Wt=Ut.empty();(Wt||it.options.showCursorWhenSelecting)&&oo(it,Ut.head,mt),Wt||io(it,Ut,At)}}return dt}function oo(it,at,ct){var dt=Zo(it,at,"div",null,null,!it.options.singleCursorHeightPerLine),mt=ct.appendChild(ae("div","\xA0","CodeMirror-cursor"));if(mt.style.left=dt.left+"px",mt.style.top=dt.top+"px",mt.style.height=Math.max(0,dt.bottom-dt.top)*it.options.cursorHeight+"px",dt.other){var At=ct.appendChild(ae("div","\xA0","CodeMirror-cursor CodeMirror-secondarycursor"));At.style.display="",At.style.left=dt.other.left+"px",At.style.top=dt.other.top+"px",At.style.height=(dt.other.bottom-dt.other.top)*.85+"px"}}function hs(it,at){return it.top-at.top||it.left-at.left}function io(it,at,ct){var dt=it.display,mt=it.doc,At=document.createDocumentFragment(),Ot=gh(it.display),Ut=Ot.left,Wt=Math.max(dt.sizerWidth,Ps(it)-dt.sizer.offsetLeft)-Ot.right,oe=mt.direction=="ltr";function Ve(Ki,lr,Rr,Zi){lr<0&&(lr=0),lr=Math.round(lr),Zi=Math.round(Zi),At.appendChild(ae("div",null,"CodeMirror-selected","position: absolute; left: "+Ki+`px;
top: `+lr+"px; width: "+(Rr==null?Wt-Ki:Rr)+`px;
height: `+(Zi-lr)+"px"))}function fe(Ki,lr,Rr){var Zi=Dn(mt,Ki),Jr=Zi.text.length,Wo,Da;function $o(Ea,Fs){return $h(it,bn(Ki,Ea),"div",Zi,Fs)}function As(Ea,Fs,Ya){var ba=Gc(it,Zi,null,Ea),fo=Fs=="ltr"==(Ya=="after")?"left":"right",ta=Ya=="after"?ba.begin:ba.end-(/\s/.test(Zi.text.charAt(ba.end-1))?2:1);return $o(ta,fo)[fo]}var ts=Yt(Zi,mt.direction);return Rt(ts,lr||0,Rr==null?Jr:Rr,function(Ea,Fs,Ya,ba){var fo=Ya=="ltr",ta=$o(Ea,fo?"left":"right"),Ha=$o(Fs-1,fo?"right":"left"),Xa=lr==null&&Ea==0,El=Rr==null&&Fs==Jr,ea=ba==0,qs=!ts||ba==ts.length-1;if(Ha.top-ta.top<=3){var vt=(oe?Xa:El)&&ea,xt=(oe?El:Xa)&&qs,Mt=vt?Ut:(fo?ta:Ha).left,Tt=xt?Wt:(fo?Ha:ta).right;Ve(Mt,ta.top,Tt-Mt,ta.bottom)}else{var Zt,Kt,te,se;fo?(Zt=oe&&Xa&&ea?Ut:ta.left,Kt=oe?Wt:As(Ea,Ya,"before"),te=oe?Ut:As(Fs,Ya,"after"),se=oe&&El&&qs?Wt:Ha.right):(Zt=oe?As(Ea,Ya,"before"):Ut,Kt=!oe&&Xa&&ea?Wt:ta.right,te=!oe&&El&&qs?Ut:Ha.left,se=oe?As(Fs,Ya,"after"):Wt),Ve(Zt,ta.top,Kt-Zt,ta.bottom),ta.bottom<Ha.top&&Ve(Ut,ta.bottom,null,Ha.top),Ve(te,Ha.top,se-te,Ha.bottom)}(!Wo||hs(ta,Wo)<0)&&(Wo=ta),hs(Ha,Wo)<0&&(Wo=Ha),(!Da||hs(ta,Da)<0)&&(Da=ta),hs(Ha,Da)<0&&(Da=Ha)}),{start:Wo,end:Da}}var dn=at.from(),on=at.to();if(dn.line==on.line)fe(dn.line,dn.ch,on.ch);else{var ai=Dn(mt,dn.line),ci=Dn(mt,on.line),xi=In(ai)==In(ci),Ri=fe(dn.line,dn.ch,xi?ai.text.length+1:null).end,rr=fe(on.line,xi?0:null,on.ch).start;xi&&(Ri.top<rr.top-2?(Ve(Ri.right,Ri.top,null,Ri.bottom),Ve(Ut,rr.top,rr.left,rr.bottom)):Ve(Ri.right,Ri.top,rr.left-Ri.right,Ri.bottom)),Ri.bottom<rr.top&&Ve(Ut,Ri.bottom,null,rr.top)}ct.appendChild(At)}function Eo(it){if(it.state.focused){var at=it.display;clearInterval(at.blinker);var ct=!0;at.cursorDiv.style.visibility="",it.options.cursorBlinkRate>0?at.blinker=setInterval(function(){it.hasFocus()||ph(it),at.cursorDiv.style.visibility=(ct=!ct)?"":"hidden"},it.options.cursorBlinkRate):it.options.cursorBlinkRate<0&&(at.cursorDiv.style.visibility="hidden")}}function zo(it){it.state.focused||(it.display.input.focus(),so(it))}function Jo(it){it.state.delayingBlurEvent=!0,setTimeout(function(){it.state.delayingBlurEvent&&(it.state.delayingBlurEvent=!1,ph(it))},100)}function so(it,at){it.state.delayingBlurEvent&&(it.state.delayingBlurEvent=!1),it.options.readOnly!="nocursor"&&(it.state.focused||(ei(it,"focus",it,at),it.state.focused=!0,Ee(it.display.wrapper,"CodeMirror-focused"),!it.curOp&&it.display.selForContextMenu!=it.doc.sel&&(it.display.input.reset(),ee&&setTimeout(function(){return it.display.input.reset(!0)},20)),it.display.input.receivedFocus()),Eo(it))}function ph(it,at){it.state.delayingBlurEvent||(it.state.focused&&(ei(it,"blur",it,at),it.state.focused=!1,Xt(it.display.wrapper,"CodeMirror-focused")),clearInterval(it.display.blinker),setTimeout(function(){it.state.focused||(it.display.shift=!1)},150))}function fr(it){for(var at=it.display,ct=at.lineDiv.offsetTop,dt=0;dt<at.view.length;dt++){var mt=at.view[dt],At=it.options.lineWrapping,Ot=void 0,Ut=0;if(!mt.hidden){if(Pe&&Ae<8){var Wt=mt.node.offsetTop+mt.node.offsetHeight;Ot=Wt-ct,ct=Wt}else{var oe=mt.node.getBoundingClientRect();Ot=oe.bottom-oe.top,!At&&mt.text.firstChild&&(Ut=mt.text.firstChild.getBoundingClientRect().right-oe.left-1)}var Ve=mt.line.height-Ot;if((Ve>.005||Ve<-.005)&&(ki(mt.line,Ot),Og(mt.line),mt.rest))for(var fe=0;fe<mt.rest.length;fe++)Og(mt.rest[fe]);if(Ut>it.display.sizerWidth){var dn=Math.ceil(Ut/Il(it.display));dn>it.display.maxLineLength&&(it.display.maxLineLength=dn,it.display.maxLine=mt.line,it.display.maxLineChanged=!0)}}}}function Og(it){if(it.widgets)for(var at=0;at<it.widgets.length;++at){var ct=it.widgets[at],dt=ct.node.parentNode;dt&&(ct.height=dt.offsetHeight)}}function qr(it,at,ct){var dt=ct&&ct.top!=null?Math.max(0,ct.top):it.scroller.scrollTop;dt=Math.floor(dt-Rs(it));var mt=ct&&ct.bottom!=null?ct.bottom:dt+it.wrapper.clientHeight,At=Tn(at,dt),Ot=Tn(at,mt);if(ct&&ct.ensure){var Ut=ct.ensure.from.line,Wt=ct.ensure.to.line;Ut<At?(At=Ut,Ot=Tn(at,bi(Dn(at,Ut))+it.wrapper.clientHeight)):Math.min(Wt,at.lastLine())>=Ot&&(At=Tn(at,bi(Dn(at,Wt))-it.wrapper.clientHeight),Ot=Wt)}return{from:At,to:Math.max(Ot,At+1)}}function Rg(it,at){if(!ii(it,"scrollCursorIntoView")){var ct=it.display,dt=ct.sizer.getBoundingClientRect(),mt=null;if(at.top+dt.top<0?mt=!0:at.bottom+dt.top>(window.innerHeight||document.documentElement.clientHeight)&&(mt=!1),mt!=null&&!He){var At=ae("div","\u200B",null,`position: absolute;
top: `+(at.top-ct.viewOffset-Rs(it.display))+`px;
height: `+(at.bottom-at.top+js(it)+ct.barHeight)+`px;
left: `+at.left+"px; width: "+Math.max(2,at.right-at.left)+"px;");it.display.lineSpace.appendChild(At),At.scrollIntoView(mt),it.display.lineSpace.removeChild(At)}}}function Ru(it,at,ct,dt){dt==null&&(dt=0);var mt;!it.options.lineWrapping&&at==ct&&(at=at.ch?bn(at.line,at.sticky=="before"?at.ch-1:at.ch,"after"):at,ct=at.sticky=="before"?bn(at.line,at.ch+1,"before"):at);for(var At=0;At<5;At++){var Ot=!1,Ut=Zo(it,at),Wt=!ct||ct==at?Ut:Zo(it,ct);mt={left:Math.min(Ut.left,Wt.left),top:Math.min(Ut.top,Wt.top)-dt,right:Math.max(Ut.left,Wt.left),bottom:Math.max(Ut.bottom,Wt.bottom)+dt};var oe=If(it,mt),Ve=it.doc.scrollTop,fe=it.doc.scrollLeft;if(oe.scrollTop!=null&&(Ol(it,oe.scrollTop),Math.abs(it.doc.scrollTop-Ve)>1&&(Ot=!0)),oe.scrollLeft!=null&&(Gs(it,oe.scrollLeft),Math.abs(it.doc.scrollLeft-fe)>1&&(Ot=!0)),!Ot)break}return mt}function td(it,at){var ct=If(it,at);ct.scrollTop!=null&&Ol(it,ct.scrollTop),ct.scrollLeft!=null&&Gs(it,ct.scrollLeft)}function If(it,at){var ct=it.display,dt=ol(it.display);at.top<0&&(at.top=0);var mt=it.curOp&&it.curOp.scrollTop!=null?it.curOp.scrollTop:ct.scroller.scrollTop,At=jd(it),Ot={};at.bottom-at.top>At&&(at.bottom=at.top+At);var Ut=it.doc.height+Pu(ct),Wt=at.top<dt,oe=at.bottom>Ut-dt;if(at.top<mt)Ot.scrollTop=Wt?0:at.top;else if(at.bottom>mt+At){var Ve=Math.min(at.top,(oe?Ut:at.bottom)-At);Ve!=mt&&(Ot.scrollTop=Ve)}var fe=it.options.fixedGutter?0:ct.gutters.offsetWidth,dn=it.curOp&&it.curOp.scrollLeft!=null?it.curOp.scrollLeft:ct.scroller.scrollLeft-fe,on=Ps(it)-ct.gutters.offsetWidth,ai=at.right-at.left>on;return ai&&(at.right=at.left+on),at.left<10?Ot.scrollLeft=0:at.left<dn?Ot.scrollLeft=Math.max(0,at.left+fe-(ai?0:10)):at.right>on+dn-3&&(Ot.scrollLeft=at.right+(ai?0:10)-on),Ot}function Wd(it,at){at!=null&&($l(it),it.curOp.scrollTop=(it.curOp.scrollTop==null?it.doc.scrollTop:it.curOp.scrollTop)+at)}function ju(it){$l(it);var at=it.getCursor();it.curOp.scrollToPos={from:at,to:at,margin:it.options.cursorScrollMargin}}function mh(it,at,ct){(at!=null||ct!=null)&&$l(it),at!=null&&(it.curOp.scrollLeft=at),ct!=null&&(it.curOp.scrollTop=ct)}function lo(it,at){$l(it),it.curOp.scrollToPos=at}function $l(it){var at=it.curOp.scrollToPos;if(at){it.curOp.scrollToPos=null;var ct=jc(it,at.from),dt=jc(it,at.to);ed(it,ct,dt,at.margin)}}function ed(it,at,ct,dt){var mt=If(it,{left:Math.min(at.left,ct.left),top:Math.min(at.top,ct.top)-dt,right:Math.max(at.right,ct.right),bottom:Math.max(at.bottom,ct.bottom)+dt});mh(it,mt.scrollLeft,mt.scrollTop)}function Ol(it,at){Math.abs(it.doc.scrollTop-at)<2||(pt||Wu(it,{top:at}),Vd(it,at,!0),pt&&Wu(it),nd(it,100))}function Vd(it,at,ct){at=Math.max(0,Math.min(it.display.scroller.scrollHeight-it.display.scroller.clientHeight,at)),!(it.display.scroller.scrollTop==at&&!ct)&&(it.doc.scrollTop=at,it.display.scrollbars.setScrollTop(at),it.display.scroller.scrollTop!=at&&(it.display.scroller.scrollTop=at))}function Gs(it,at,ct,dt){at=Math.max(0,Math.min(at,it.display.scroller.scrollWidth-it.display.scroller.clientWidth)),!((ct?at==it.doc.scrollLeft:Math.abs(it.doc.scrollLeft-at)<2)&&!dt)&&(it.doc.scrollLeft=at,Kc(it),it.display.scroller.scrollLeft!=at&&(it.display.scroller.scrollLeft=at),it.display.scrollbars.setScrollLeft(at))}function ds(it){var at=it.display,ct=at.gutters.offsetWidth,dt=Math.round(it.doc.height+Pu(it.display));return{clientHeight:at.scroller.clientHeight,viewHeight:at.wrapper.clientHeight,scrollWidth:at.scroller.scrollWidth,clientWidth:at.scroller.clientWidth,viewWidth:at.wrapper.clientWidth,barLeft:it.options.fixedGutter?ct:0,docHeight:dt,scrollHeight:dt+js(it)+at.barHeight,nativeBarWidth:at.nativeBarWidth,gutterWidth:ct}}var Cu=function(it,at,ct){this.cm=ct;var dt=this.vert=ae("div",[ae("div",null,null,"min-width: 1px")],"CodeMirror-vscrollbar"),mt=this.horiz=ae("div",[ae("div",null,null,"height: 100%; min-height: 1px")],"CodeMirror-hscrollbar");dt.tabIndex=mt.tabIndex=-1,it(dt),it(mt),xe(dt,"scroll",function(){dt.clientHeight&&at(dt.scrollTop,"vertical")}),xe(mt,"scroll",function(){mt.clientWidth&&at(mt.scrollLeft,"horizontal")}),this.checkedZeroWidth=!1,Pe&&Ae<8&&(this.horiz.style.minHeight=this.vert.style.minWidth="18px")};Cu.prototype.update=function(it){var at=it.scrollWidth>it.clientWidth+1,ct=it.scrollHeight>it.clientHeight+1,dt=it.nativeBarWidth;if(ct){this.vert.style.display="block",this.vert.style.bottom=at?dt+"px":"0";var mt=it.viewHeight-(at?dt:0);this.vert.firstChild.style.height=Math.max(0,it.scrollHeight-it.clientHeight+mt)+"px"}else this.vert.style.display="",this.vert.firstChild.style.height="0";if(at){this.horiz.style.display="block",this.horiz.style.right=ct?dt+"px":"0",this.horiz.style.left=it.barLeft+"px";var At=it.viewWidth-it.barLeft-(ct?dt:0);this.horiz.firstChild.style.width=Math.max(0,it.scrollWidth-it.clientWidth+At)+"px"}else this.horiz.style.display="",this.horiz.firstChild.style.width="0";return!this.checkedZeroWidth&&it.clientHeight>0&&(dt==0&&this.zeroWidthHack(),this.checkedZeroWidth=!0),{right:ct?dt:0,bottom:at?dt:0}},Cu.prototype.setScrollLeft=function(it){this.horiz.scrollLeft!=it&&(this.horiz.scrollLeft=it),this.disableHoriz&&this.enableZeroWidthBar(this.horiz,this.disableHoriz,"horiz")},Cu.prototype.setScrollTop=function(it){this.vert.scrollTop!=it&&(this.vert.scrollTop=it),this.disableVert&&this.enableZeroWidthBar(this.vert,this.disableVert,"vert")},Cu.prototype.zeroWidthHack=function(){var it=ht&&!Ne?"12px":"18px";this.horiz.style.height=this.vert.style.width=it,this.horiz.style.pointerEvents=this.vert.style.pointerEvents="none",this.disableHoriz=new Jt,this.disableVert=new Jt},Cu.prototype.enableZeroWidthBar=function(it,at,ct){it.style.pointerEvents="auto";function dt(){var mt=it.getBoundingClientRect(),At=ct=="vert"?document.elementFromPoint(mt.right-1,(mt.top+mt.bottom)/2):document.elementFromPoint((mt.right+mt.left)/2,mt.bottom-1);At!=it?it.style.pointerEvents="none":at.set(1e3,dt)}at.set(1e3,dt)},Cu.prototype.clear=function(){var it=this.horiz.parentNode;it.removeChild(this.horiz),it.removeChild(this.vert)};var al=function(){};al.prototype.update=function(){return{bottom:0,right:0}},al.prototype.setScrollLeft=function(){},al.prototype.setScrollTop=function(){},al.prototype.clear=function(){};function tu(it,at){at||(at=ds(it));var ct=it.display.barWidth,dt=it.display.barHeight;Ud(it,at);for(var mt=0;mt<4&&ct!=it.display.barWidth||dt!=it.display.barHeight;mt++)ct!=it.display.barWidth&&it.options.lineWrapping&&fr(it),Ud(it,ds(it)),ct=it.display.barWidth,dt=it.display.barHeight}function Ud(it,at){var ct=it.display,dt=ct.scrollbars.update(at);ct.sizer.style.paddingRight=(ct.barWidth=dt.right)+"px",ct.sizer.style.paddingBottom=(ct.barHeight=dt.bottom)+"px",ct.heightForcer.style.borderBottom=dt.bottom+"px solid transparent",dt.right&&dt.bottom?(ct.scrollbarFiller.style.display="block",ct.scrollbarFiller.style.height=dt.bottom+"px",ct.scrollbarFiller.style.width=dt.right+"px"):ct.scrollbarFiller.style.display="",dt.bottom&&it.options.coverGutterNextToScrollbar&&it.options.fixedGutter?(ct.gutterFiller.style.display="block",ct.gutterFiller.style.height=dt.bottom+"px",ct.gutterFiller.style.width=at.gutterWidth+"px"):ct.gutterFiller.style.display=""}var Of={native:Cu,null:al};function Wc(it){it.display.scrollbars&&(it.display.scrollbars.clear(),it.display.scrollbars.addClass&&Xt(it.display.wrapper,it.display.scrollbars.addClass)),it.display.scrollbars=new Of[it.options.scrollbarStyle](function(at){it.display.wrapper.insertBefore(at,it.display.scrollbarFiller),xe(at,"mousedown",function(){it.state.focused&&setTimeout(function(){return it.display.input.focus()},0)}),at.setAttribute("cm-not-content","true")},function(at,ct){ct=="horizontal"?Gs(it,at):Ol(it,at)},it),it.display.scrollbars.addClass&&Ee(it.display.wrapper,it.display.scrollbars.addClass)}var jg=0;function zu(it){it.curOp={cm:it,viewChanged:!1,startHeight:it.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:++jg},Ro(it.curOp)}function Gu(it){var at=it.curOp;at&&va(at,function(ct){for(var dt=0;dt<ct.ops.length;dt++)ct.ops[dt].cm.curOp=null;jp(ct)})}function jp(it){for(var at=it.ops,ct=0;ct<at.length;ct++)zp(at[ct]);for(var dt=0;dt<at.length;dt++)zg(at[dt]);for(var mt=0;mt<at.length;mt++)Gg(at[mt]);for(var At=0;At<at.length;At++)ra(at[At]);for(var Ot=0;Ot<at.length;Ot++)Hu(at[Ot])}function zp(it){var at=it.cm,ct=at.display;Kd(at),it.updateMaxLine&&Yi(at),it.mustUpdate=it.viewChanged||it.forceUpdate||it.scrollTop!=null||it.scrollToPos&&(it.scrollToPos.from.line<ct.viewFrom||it.scrollToPos.to.line>=ct.viewTo)||ct.maxLineChanged&&at.options.lineWrapping,it.update=it.mustUpdate&&new Rl(at,it.mustUpdate&&{top:it.scrollTop,ensure:it.scrollToPos},it.forceUpdate)}function zg(it){it.updatedDisplay=it.mustUpdate&&Uc(it.cm,it.update)}function Gg(it){var at=it.cm,ct=at.display;it.updatedDisplay&&fr(at),it.barMeasure=ds(at),ct.maxLineChanged&&!at.options.lineWrapping&&(it.adjustWidthTo=Tc(at,ct.maxLine,ct.maxLine.text.length).left+3,at.display.sizerWidth=it.adjustWidthTo,it.barMeasure.scrollWidth=Math.max(ct.scroller.clientWidth,ct.sizer.offsetLeft+it.adjustWidthTo+js(at)+at.display.barWidth),it.maxScrollLeft=Math.max(0,ct.sizer.offsetLeft+it.adjustWidthTo-Ps(at))),(it.updatedDisplay||it.selectionChanged)&&(it.preparedSelection=ct.input.prepareSelection())}function ra(it){var at=it.cm;it.adjustWidthTo!=null&&(at.display.sizer.style.minWidth=it.adjustWidthTo+"px",it.maxScrollLeft<at.doc.scrollLeft&&Gs(at,Math.min(at.display.scroller.scrollLeft,it.maxScrollLeft),!0),at.display.maxLineChanged=!1);var ct=it.focus&&it.focus==ue();it.preparedSelection&&at.display.input.showSelection(it.preparedSelection,ct),(it.updatedDisplay||it.startHeight!=at.doc.height)&&tu(at,it.barMeasure),it.updatedDisplay&&Uu(at,it.barMeasure),it.selectionChanged&&Eo(at),at.state.focused&&it.updateInput&&at.display.input.reset(it.typing),ct&&zo(it.cm)}function Hu(it){var at=it.cm,ct=at.display,dt=at.doc;if(it.updatedDisplay&&Mo(at,it.update),ct.wheelStartX!=null&&(it.scrollTop!=null||it.scrollLeft!=null||it.scrollToPos)&&(ct.wheelStartX=ct.wheelStartY=null),it.scrollTop!=null&&Vd(at,it.scrollTop,it.forceScroll),it.scrollLeft!=null&&Gs(at,it.scrollLeft,!0,!0),it.scrollToPos){var mt=Ru(at,Mi(dt,it.scrollToPos.from),Mi(dt,it.scrollToPos.to),it.scrollToPos.margin);Rg(at,mt)}var At=it.maybeHiddenMarkers,Ot=it.maybeUnhiddenMarkers;if(At)for(var Ut=0;Ut<At.length;++Ut)At[Ut].lines.length||ei(At[Ut],"hide");if(Ot)for(var Wt=0;Wt<Ot.length;++Wt)Ot[Wt].lines.length&&ei(Ot[Wt],"unhide");ct.wrapper.offsetHeight&&(dt.scrollTop=at.display.scroller.scrollTop),it.changeObjs&&ei(at,"changes",at,it.changeObjs),it.update&&it.update.finish()}function xo(it,at){if(it.curOp)return at();zu(it);try{return at()}finally{Gu(it)}}function Ba(it,at){return function(){if(it.curOp)return at.apply(it,arguments);zu(it);try{return at.apply(it,arguments)}finally{Gu(it)}}}function Oa(it){return function(){if(this.curOp)return it.apply(this,arguments);zu(this);try{return it.apply(this,arguments)}finally{Gu(this)}}}function Ra(it){return function(){var at=this.cm;if(!at||at.curOp)return it.apply(this,arguments);zu(at);try{return it.apply(this,arguments)}finally{Gu(at)}}}function nd(it,at){it.doc.highlightFrontier<it.display.viewTo&&it.state.highlight.set(at,nn(ja,it))}function ja(it){var at=it.doc;if(!(at.highlightFrontier>=it.display.viewTo)){var ct=+new Date+it.options.workTime,dt=Or(it,at.highlightFrontier),mt=[];at.iter(dt.line,Math.min(at.first+at.size,it.display.viewTo+500),function(At){if(dt.line>=it.display.viewFrom){var Ot=At.styles,Ut=At.text.length>it.options.maxHighlightLength?kn(at.mode,dt.state):null,Wt=to(it,At,dt,!0);Ut&&(dt.state=Ut),At.styles=Wt.styles;var oe=At.styleClasses,Ve=Wt.classes;Ve?At.styleClasses=Ve:oe&&(At.styleClasses=null);for(var fe=!Ot||Ot.length!=At.styles.length||oe!=Ve&&(!oe||!Ve||oe.bgClass!=Ve.bgClass||oe.textClass!=Ve.textClass),dn=0;!fe&&dn<Ot.length;++dn)fe=Ot[dn]!=At.styles[dn];fe&&mt.push(dt.line),At.stateAfter=dt.save(),dt.nextLine()}else At.text.length<=it.options.maxHighlightLength&&Je(it,At.text,dt),At.stateAfter=dt.line%5==0?dt.save():null,dt.nextLine();if(+new Date>ct)return nd(it,it.options.workDelay),!0}),at.highlightFrontier=dt.line,at.modeFrontier=Math.max(at.modeFrontier,dt.line),mt.length&&xo(it,function(){for(var At=0;At<mt.length;At++)Ur(it,mt[At],"text")})}}var Rl=function(it,at,ct){var dt=it.display;this.viewport=at,this.visible=qr(dt,it.doc,at),this.editorIsHidden=!dt.wrapper.offsetWidth,this.wrapperHeight=dt.wrapper.clientHeight,this.wrapperWidth=dt.wrapper.clientWidth,this.oldDisplayWidth=Ps(it),this.force=ct,this.dims=Hc(it),this.events=[]};Rl.prototype.signal=function(it,at){hi(it,at)&&this.events.push(arguments)},Rl.prototype.finish=function(){for(var it=0;it<this.events.length;it++)ei.apply(null,this.events[it])};function Kd(it){var at=it.display;!at.scrollbarsClipped&&at.scroller.offsetWidth&&(at.nativeBarWidth=at.scroller.offsetWidth-at.scroller.clientWidth,at.heightForcer.style.height=js(it)+"px",at.sizer.style.marginBottom=-at.nativeBarWidth+"px",at.sizer.style.borderRightWidth=js(it)+"px",at.scrollbarsClipped=!0)}function Vc(it){if(it.hasFocus())return null;var at=ue();if(!at||!Le(it.display.lineDiv,at))return null;var ct={activeElt:at};if(window.getSelection){var dt=window.getSelection();dt.anchorNode&&dt.extend&&Le(it.display.lineDiv,dt.anchorNode)&&(ct.anchorNode=dt.anchorNode,ct.anchorOffset=dt.anchorOffset,ct.focusNode=dt.focusNode,ct.focusOffset=dt.focusOffset)}return ct}function Es(it){if(!(!it||!it.activeElt||it.activeElt==ue())&&(it.activeElt.focus(),!/^(INPUT|TEXTAREA)$/.test(it.activeElt.nodeName)&&it.anchorNode&&Le(document.body,it.anchorNode)&&Le(document.body,it.focusNode))){var at=window.getSelection(),ct=document.createRange();ct.setEnd(it.anchorNode,it.anchorOffset),ct.collapse(!1),at.removeAllRanges(),at.addRange(ct),at.extend(it.focusNode,it.focusOffset)}}function Uc(it,at){var ct=it.display,dt=it.doc;if(at.editorIsHidden)return da(it),!1;if(!at.force&&at.visible.from>=ct.viewFrom&&at.visible.to<=ct.viewTo&&(ct.updateLineNumbers==null||ct.updateLineNumbers>=ct.viewTo)&&ct.renderedView==ct.view&&zs(it)==0)return!1;ya(it)&&(da(it),at.dims=Hc(it));var mt=dt.first+dt.size,At=Math.max(at.visible.from-it.options.viewportMargin,dt.first),Ot=Math.min(mt,at.visible.to+it.options.viewportMargin);ct.viewFrom<At&&At-ct.viewFrom<20&&(At=Math.max(dt.first,ct.viewFrom)),ct.viewTo>Ot&&ct.viewTo-Ot<20&&(Ot=Math.min(mt,ct.viewTo)),yn&&(At=Zn(it.doc,At),Ot=jn(it.doc,Ot));var Ut=At!=ct.viewFrom||Ot!=ct.viewTo||ct.lastWrapHeight!=at.wrapperHeight||ct.lastWrapWidth!=at.wrapperWidth;Bo(it,At,Ot),ct.viewOffset=bi(Dn(it.doc,ct.viewFrom)),it.display.mover.style.top=ct.viewOffset+"px";var Wt=zs(it);if(!Ut&&Wt==0&&!at.force&&ct.renderedView==ct.view&&(ct.updateLineNumbers==null||ct.updateLineNumbers>=ct.viewTo))return!1;var oe=Vc(it);return Wt>4&&(ct.lineDiv.style.display="none"),Rf(it,ct.updateLineNumbers,at.dims),Wt>4&&(ct.lineDiv.style.display=""),ct.renderedView=ct.view,Es(oe),re(ct.cursorDiv),re(ct.selectionDiv),ct.gutters.style.height=ct.sizer.style.minHeight=0,Ut&&(ct.lastWrapHeight=at.wrapperHeight,ct.lastWrapWidth=at.wrapperWidth,nd(it,400)),ct.updateLineNumbers=null,!0}function Mo(it,at){for(var ct=at.viewport,dt=!0;;dt=!1){if(!dt||!it.options.lineWrapping||at.oldDisplayWidth==Ps(it)){if(ct&&ct.top!=null&&(ct={top:Math.min(it.doc.height+Pu(it.display)-jd(it),ct.top)}),at.visible=qr(it.display,it.doc,ct),at.visible.from>=it.display.viewFrom&&at.visible.to<=it.display.viewTo)break}else dt&&(at.visible=qr(it.display,it.doc,ct));if(!Uc(it,at))break;fr(it);var mt=ds(it);Fa(it),tu(it,mt),Uu(it,mt),at.force=!1}at.signal(it,"update",it),(it.display.viewFrom!=it.display.reportedViewFrom||it.display.viewTo!=it.display.reportedViewTo)&&(at.signal(it,"viewportChange",it,it.display.viewFrom,it.display.viewTo),it.display.reportedViewFrom=it.display.viewFrom,it.display.reportedViewTo=it.display.viewTo)}function Wu(it,at){var ct=new Rl(it,at);if(Uc(it,ct)){fr(it),Mo(it,ct);var dt=ds(it);Fa(it),tu(it,dt),Uu(it,dt),ct.finish()}}function Rf(it,at,ct){var dt=it.display,mt=it.options.lineNumbers,At=dt.lineDiv,Ot=At.firstChild;function Ut(ai){var ci=ai.nextSibling;return ee&&ht&&it.display.currentWheelTarget==ai?ai.style.display="none":ai.parentNode.removeChild(ai),ci}for(var Wt=dt.view,oe=dt.viewFrom,Ve=0;Ve<Wt.length;Ve++){var fe=Wt[Ve];if(!fe.hidden)if(!fe.node||fe.node.parentNode!=At){var dn=Xh(it,fe,oe,ct);At.insertBefore(dn,Ot)}else{for(;Ot!=fe.node;)Ot=Ut(Ot);var on=mt&&at!=null&&at<=oe&&fe.lineNumber;fe.changes&&(De(fe.changes,"gutter")>-1&&(on=!1),yl(it,fe,oe,ct)),on&&(re(fe.lineNumber),fe.lineNumber.appendChild(document.createTextNode(Oi(it.options,oe)))),Ot=fe.node.nextSibling}oe+=fe.size}for(;Ot;)Ot=Ut(Ot)}function Vu(it){var at=it.gutters.offsetWidth;it.sizer.style.marginLeft=at+"px"}function Uu(it,at){it.display.sizer.style.minHeight=at.docHeight+"px",it.display.heightForcer.style.top=at.docHeight+"px",it.display.gutters.style.height=at.docHeight+it.display.barHeight+js(it)+"px"}function Kc(it){var at=it.display,ct=at.view;if(!(!at.alignWidgets&&(!at.gutters.firstChild||!it.options.fixedGutter))){for(var dt=Hd(at)-at.scroller.scrollLeft+it.doc.scrollLeft,mt=at.gutters.offsetWidth,At=dt+"px",Ot=0;Ot<ct.length;Ot++)if(!ct[Ot].hidden){it.options.fixedGutter&&(ct[Ot].gutter&&(ct[Ot].gutter.style.left=At),ct[Ot].gutterBackground&&(ct[Ot].gutterBackground.style.left=At));var Ut=ct[Ot].alignable;if(Ut)for(var Wt=0;Wt<Ut.length;Wt++)Ut[Wt].style.left=At}it.options.fixedGutter&&(at.gutters.style.left=dt+mt+"px")}}function ya(it){if(!it.options.lineNumbers)return!1;var at=it.doc,ct=Oi(it.options,at.first+at.size-1),dt=it.display;if(ct.length!=dt.lineNumChars){var mt=dt.measure.appendChild(ae("div",[ae("div",ct)],"CodeMirror-linenumber CodeMirror-gutter-elt")),At=mt.firstChild.offsetWidth,Ot=mt.offsetWidth-At;return dt.lineGutter.style.width="",dt.lineNumInnerWidth=Math.max(At,dt.lineGutter.offsetWidth-Ot)+1,dt.lineNumWidth=dt.lineNumInnerWidth+Ot,dt.lineNumChars=dt.lineNumInnerWidth?ct.length:-1,dt.lineGutter.style.width=dt.lineNumWidth+"px",Vu(it.display),!0}return!1}function za(it,at){for(var ct=[],dt=!1,mt=0;mt<it.length;mt++){var At=it[mt],Ot=null;if(typeof At!="string"&&(Ot=At.style,At=At.className),At=="CodeMirror-linenumbers")if(at)dt=!0;else continue;ct.push({className:At,style:Ot})}return at&&!dt&&ct.push({className:"CodeMirror-linenumbers",style:null}),ct}function vh(it){var at=it.gutters,ct=it.gutterSpecs;re(at),it.lineGutter=null;for(var dt=0;dt<ct.length;++dt){var mt=ct[dt],At=mt.className,Ot=mt.style,Ut=at.appendChild(ae("div",null,"CodeMirror-gutter "+At));Ot&&(Ut.style.cssText=Ot),At=="CodeMirror-linenumbers"&&(it.lineGutter=Ut,Ut.style.width=(it.lineNumWidth||1)+"px")}at.style.display=ct.length?"":"none",Vu(it)}function bs(it){vh(it.display),jo(it),Kc(it)}function Ku(it,at,ct,dt){var mt=this;this.input=ct,mt.scrollbarFiller=ae("div",null,"CodeMirror-scrollbar-filler"),mt.scrollbarFiller.setAttribute("cm-not-content","true"),mt.gutterFiller=ae("div",null,"CodeMirror-gutter-filler"),mt.gutterFiller.setAttribute("cm-not-content","true"),mt.lineDiv=je("div",null,"CodeMirror-code"),mt.selectionDiv=ae("div",null,null,"position: relative; z-index: 1"),mt.cursorDiv=ae("div",null,"CodeMirror-cursors"),mt.measure=ae("div",null,"CodeMirror-measure"),mt.lineMeasure=ae("div",null,"CodeMirror-measure"),mt.lineSpace=je("div",[mt.measure,mt.lineMeasure,mt.selectionDiv,mt.cursorDiv,mt.lineDiv],null,"position: relative; outline: none");var At=je("div",[mt.lineSpace],"CodeMirror-lines");mt.mover=ae("div",[At],null,"position: relative"),mt.sizer=ae("div",[mt.mover],"CodeMirror-sizer"),mt.sizerWidth=null,mt.heightForcer=ae("div",null,null,"position: absolute; height: "+sn+"px; width: 1px;"),mt.gutters=ae("div",null,"CodeMirror-gutters"),mt.lineGutter=null,mt.scroller=ae("div",[mt.sizer,mt.heightForcer,mt.gutters],"CodeMirror-scroll"),mt.scroller.setAttribute("tabIndex","-1"),mt.wrapper=ae("div",[mt.scrollbarFiller,mt.gutterFiller,mt.scroller],"CodeMirror"),Pe&&Ae<8&&(mt.gutters.style.zIndex=-1,mt.scroller.style.paddingRight=0),!ee&&!(pt&&et)&&(mt.scroller.draggable=!0),it&&(it.appendChild?it.appendChild(mt.wrapper):it(mt.wrapper)),mt.viewFrom=mt.viewTo=at.first,mt.reportedViewFrom=mt.reportedViewTo=at.first,mt.view=[],mt.renderedView=null,mt.externalMeasured=null,mt.viewOffset=0,mt.lastWrapHeight=mt.lastWrapWidth=0,mt.updateLineNumbers=null,mt.nativeBarWidth=mt.barHeight=mt.barWidth=0,mt.scrollbarsClipped=!1,mt.lineNumWidth=mt.lineNumInnerWidth=mt.lineNumChars=null,mt.alignWidgets=!1,mt.cachedCharWidth=mt.cachedTextHeight=mt.cachedPaddingH=null,mt.maxLine=null,mt.maxLineLength=0,mt.maxLineChanged=!1,mt.wheelDX=mt.wheelDY=mt.wheelStartX=mt.wheelStartY=null,mt.shift=!1,mt.selForContextMenu=null,mt.activeTouch=null,mt.gutterSpecs=za(dt.gutters,dt.lineNumbers),vh(mt),ct.init(mt)}var Ls=0,sa=null;Pe?sa=-.53:pt?sa=15:ye?sa=-.7:he&&(sa=-1/3);function xl(it){var at=it.wheelDeltaX,ct=it.wheelDeltaY;return at==null&&it.detail&&it.axis==it.HORIZONTAL_AXIS&&(at=it.detail),ct==null&&it.detail&&it.axis==it.VERTICAL_AXIS?ct=it.detail:ct==null&&(ct=it.wheelDelta),{x:at,y:ct}}function Xs(it){var at=xl(it);return at.x*=sa,at.y*=sa,at}function Ga(it,at){var ct=xl(at),dt=ct.x,mt=ct.y,At=it.display,Ot=At.scroller,Ut=Ot.scrollWidth>Ot.clientWidth,Wt=Ot.scrollHeight>Ot.clientHeight;if(dt&&Ut||mt&&Wt){if(mt&&ht&&ee){t:for(var oe=at.target,Ve=At.view;oe!=Ot;oe=oe.parentNode)for(var fe=0;fe<Ve.length;fe++)if(Ve[fe].node==oe){it.display.currentWheelTarget=oe;break t}}if(dt&&!pt&&!de&&sa!=null){mt&&Wt&&Ol(it,Math.max(0,Ot.scrollTop+mt*sa)),Gs(it,Math.max(0,Ot.scrollLeft+dt*sa)),(!mt||mt&&Wt)&&Vi(at),At.wheelStartX=null;return}if(mt&&sa!=null){var dn=mt*sa,on=it.doc.scrollTop,ai=on+At.wrapper.clientHeight;dn<0?on=Math.max(0,on+dn-50):ai=Math.min(it.doc.height,ai+dn+50),Wu(it,{top:on,bottom:ai})}Ls<20&&(At.wheelStartX==null?(At.wheelStartX=Ot.scrollLeft,At.wheelStartY=Ot.scrollTop,At.wheelDX=dt,At.wheelDY=mt,setTimeout(function(){if(At.wheelStartX!=null){var ci=Ot.scrollLeft-At.wheelStartX,xi=Ot.scrollTop-At.wheelStartY,Ri=xi&&At.wheelDY&&xi/At.wheelDY||ci&&At.wheelDX&&ci/At.wheelDX;At.wheelStartX=At.wheelStartY=null,Ri&&(sa=(sa*Ls+Ri)/(Ls+1),++Ls)}},200)):(At.wheelDX+=dt,At.wheelDY+=mt))}}var _s=function(it,at){this.ranges=it,this.primIndex=at};_s.prototype.primary=function(){return this.ranges[this.primIndex]},_s.prototype.equals=function(it){if(it==this)return!0;if(it.primIndex!=this.primIndex||it.ranges.length!=this.ranges.length)return!1;for(var at=0;at<this.ranges.length;at++){var ct=this.ranges[at],dt=it.ranges[at];if(!hn(ct.anchor,dt.anchor)||!hn(ct.head,dt.head))return!1}return!0},_s.prototype.deepCopy=function(){for(var it=[],at=0;at<this.ranges.length;at++)it[at]=new Ao(Ji(this.ranges[at].anchor),Ji(this.ranges[at].head));return new _s(it,this.primIndex)},_s.prototype.somethingSelected=function(){for(var it=0;it<this.ranges.length;it++)if(!this.ranges[it].empty())return!0;return!1},_s.prototype.contains=function(it,at){at||(at=it);for(var ct=0;ct<this.ranges.length;ct++){var dt=this.ranges[ct];if(Mn(at,dt.from())>=0&&Mn(it,dt.to())<=0)return ct}return-1};var Ao=function(it,at){this.anchor=it,this.head=at};Ao.prototype.from=function(){return Si(this.anchor,this.head)},Ao.prototype.to=function(){return Li(this.anchor,this.head)},Ao.prototype.empty=function(){return this.head.line==this.anchor.line&&this.head.ch==this.anchor.ch};function sl(it,at,ct){var dt=it&&it.options.selectionsMayTouch,mt=at[ct];at.sort(function(dn,on){return Mn(dn.from(),on.from())}),ct=De(at,mt);for(var At=1;At<at.length;At++){var Ot=at[At],Ut=at[At-1],Wt=Mn(Ut.to(),Ot.from());if(dt&&!Ot.empty()?Wt>0:Wt>=0){var oe=Si(Ut.from(),Ot.from()),Ve=Li(Ut.to(),Ot.to()),fe=Ut.empty()?Ot.from()==Ot.head:Ut.from()==Ut.head;At<=ct&&--ct,at.splice(--At,2,new Ao(fe?Ve:oe,fe?oe:Ve))}}return new _s(at,ct)}function Eu(it,at){return new _s([new Ao(it,at||it)],0)}function Zu(it){return it.text?bn(it.from.line+it.text.length-1,me(it.text).length+(it.text.length==1?it.from.ch:0)):it.to}function yh(it,at){if(Mn(it,at.from)<0)return it;if(Mn(it,at.to)<=0)return Zu(at);var ct=it.line+at.text.length-(at.to.line-at.from.line)-1,dt=it.ch;return it.line==at.to.line&&(dt+=Zu(at).ch-at.to.ch),bn(ct,dt)}function Zd(it,at){for(var ct=[],dt=0;dt<it.sel.ranges.length;dt++){var mt=it.sel.ranges[dt];ct.push(new Ao(yh(mt.anchor,at),yh(mt.head,at)))}return sl(it.cm,ct,it.sel.primIndex)}function ll(it,at,ct){return it.line==at.line?bn(ct.line,it.ch-at.ch+ct.ch):bn(ct.line+(it.line-at.line),it.ch)}function Yd(it,at,ct){for(var dt=[],mt=bn(it.first,0),At=mt,Ot=0;Ot<at.length;Ot++){var Ut=at[Ot],Wt=ll(Ut.from,mt,At),oe=ll(Zu(Ut),mt,At);if(mt=Ut.to,At=oe,ct=="around"){var Ve=it.sel.ranges[Ot],fe=Mn(Ve.head,Ve.anchor)<0;dt[Ot]=new Ao(fe?oe:Wt,fe?Wt:oe)}else dt[Ot]=new Ao(Wt,Wt)}return new _s(dt,it.sel.primIndex)}function Yr(it){it.doc.mode=be(it.options,it.doc.modeOption),Sh(it)}function Sh(it){it.doc.iter(function(at){at.stateAfter&&(at.stateAfter=null),at.styles&&(at.styles=null)}),it.doc.modeFrontier=it.doc.highlightFrontier=it.doc.first,nd(it,100),it.state.modeGen++,it.curOp&&jo(it)}function jf(it,at){return at.from.ch==0&&at.to.ch==0&&me(at.text)==""&&(!it.cm||it.cm.options.wholeLineUpdateBefore)}function Xd(it,at,ct,dt){function mt(rr){return ct?ct[rr]:null}function At(rr,Ki,lr){Sr(rr,Ki,lr,dt),Di(rr,"change",rr,at)}function Ot(rr,Ki){for(var lr=[],Rr=rr;Rr<Ki;++Rr)lr.push(new Bi(oe[Rr],mt(Rr),dt));return lr}var Ut=at.from,Wt=at.to,oe=at.text,Ve=Dn(it,Ut.line),fe=Dn(it,Wt.line),dn=me(oe),on=mt(oe.length-1),ai=Wt.line-Ut.line;if(at.full)it.insert(0,Ot(0,oe.length)),it.remove(oe.length,it.size-oe.length);else if(jf(it,at)){var ci=Ot(0,oe.length-1);At(fe,fe.text,on),ai&&it.remove(Ut.line,ai),ci.length&&it.insert(Ut.line,ci)}else if(Ve==fe)if(oe.length==1)At(Ve,Ve.text.slice(0,Ut.ch)+dn+Ve.text.slice(Wt.ch),on);else{var xi=Ot(1,oe.length-1);xi.push(new Bi(dn+Ve.text.slice(Wt.ch),on,dt)),At(Ve,Ve.text.slice(0,Ut.ch)+oe[0],mt(0)),it.insert(Ut.line+1,xi)}else if(oe.length==1)At(Ve,Ve.text.slice(0,Ut.ch)+oe[0]+fe.text.slice(Wt.ch),mt(0)),it.remove(Ut.line+1,ai);else{At(Ve,Ve.text.slice(0,Ut.ch)+oe[0],mt(0)),At(fe,dn+fe.text.slice(Wt.ch),on);var Ri=Ot(1,oe.length-1);ai>1&&it.remove(Ut.line+1,ai-1),it.insert(Ut.line+1,Ri)}Di(it,"change",it,at)}function Pl(it,at,ct){function dt(mt,At,Ot){if(mt.linked)for(var Ut=0;Ut<mt.linked.length;++Ut){var Wt=mt.linked[Ut];if(Wt.doc!=At){var oe=Ot&&Wt.sharedHist;ct&&!oe||(at(Wt.doc,oe),dt(Wt.doc,mt,oe))}}}dt(it,null,!0)}function Zc(it,at){if(at.cm)throw new Error("This document is already in use.");it.doc=at,at.cm=it,xr(it),Yr(it),id(it),it.options.lineWrapping||Yi(it),it.options.mode=at.modeOption,jo(it)}function id(it){(it.doc.direction=="rtl"?Ee:Xt)(it.display.lineDiv,"CodeMirror-rtl")}function Hg(it){xo(it,function(){id(it),jo(it)})}function rd(it){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=it||1}function Yc(it,at){var ct={from:Ji(at.from),to:Zu(at),text:vi(it,at.from,at.to)};return eu(it,ct,at.from.line,at.to.line+1),Pl(it,function(dt){return eu(dt,ct,at.from.line,at.to.line+1)},!0),ct}function xh(it){for(;it.length;){var at=me(it);if(at.ranges)it.pop();else break}}function _d(it,at){if(at)return xh(it.done),me(it.done);if(it.done.length&&!me(it.done).ranges)return me(it.done);if(it.done.length>1&&!it.done[it.done.length-2].ranges)return it.done.pop(),me(it.done)}function Ph(it,at,ct,dt){var mt=it.history;mt.undone.length=0;var At=+new Date,Ot,Ut;if((mt.lastOp==dt||mt.lastOrigin==at.origin&&at.origin&&(at.origin.charAt(0)=="+"&&mt.lastModTime>At-(it.cm?it.cm.options.historyEventDelay:500)||at.origin.charAt(0)=="*"))&&(Ot=_d(mt,mt.lastOp==dt)))Ut=me(Ot.changes),Mn(at.from,at.to)==0&&Mn(at.from,Ut.to)==0?Ut.to=Zu(at):Ot.changes.push(Yc(it,at));else{var Wt=me(mt.done);for((!Wt||!Wt.ranges)&&od(it.sel,mt.done),Ot={changes:[Yc(it,at)],generation:mt.generation},mt.done.push(Ot);mt.done.length>mt.undoDepth;)mt.done.shift(),mt.done[0].ranges||mt.done.shift()}mt.done.push(ct),mt.generation=++mt.maxGeneration,mt.lastModTime=mt.lastSelTime=At,mt.lastOp=mt.lastSelOp=dt,mt.lastOrigin=mt.lastSelOrigin=at.origin,Ut||ei(it,"historyAdded")}function Xc(it,at,ct,dt){var mt=at.charAt(0);return mt=="*"||mt=="+"&&ct.ranges.length==dt.ranges.length&&ct.somethingSelected()==dt.somethingSelected()&&new Date-it.history.lastSelTime<=(it.cm?it.cm.options.historyEventDelay:500)}function wh(it,at,ct,dt){var mt=it.history,At=dt&&dt.origin;ct==mt.lastSelOp||At&&mt.lastSelOrigin==At&&(mt.lastModTime==mt.lastSelTime&&mt.lastOrigin==At||Xc(it,At,me(mt.done),at))?mt.done[mt.done.length-1]=at:od(at,mt.done),mt.lastSelTime=+new Date,mt.lastSelOrigin=At,mt.lastSelOp=ct,dt&&dt.clearRedo!==!1&&xh(mt.undone)}function od(it,at){var ct=me(at);ct&&ct.ranges&&ct.equals(it)||at.push(it)}function eu(it,at,ct,dt){var mt=at["spans_"+it.id],At=0;it.iter(Math.max(it.first,ct),Math.min(it.first+it.size,dt),function(Ot){Ot.markedSpans&&((mt||(mt=at["spans_"+it.id]={}))[At]=Ot.markedSpans),++At})}function cs(it){if(!it)return null;for(var at,ct=0;ct<it.length;++ct)it[ct].marker.explicitlyCleared?at||(at=it.slice(0,ct)):at&&at.push(it[ct]);return at?at.length?at:null:it}function nu(it,at){var ct=at["spans_"+it.id];if(!ct)return null;for(var dt=[],mt=0;mt<at.text.length;++mt)dt.push(cs(ct[mt]));return dt}function _c(it,at){var ct=nu(it,at),dt=Nr(it,at);if(!ct)return dt;if(!dt)return ct;for(var mt=0;mt<ct.length;++mt){var At=ct[mt],Ot=dt[mt];if(At&&Ot)t:for(var Ut=0;Ut<Ot.length;++Ut){for(var Wt=Ot[Ut],oe=0;oe<At.length;++oe)if(At[oe].marker==Wt.marker)continue t;At.push(Wt)}else Ot&&(ct[mt]=Ot)}return ct}function iu(it,at,ct){for(var dt=[],mt=0;mt<it.length;++mt){var At=it[mt];if(At.ranges){dt.push(ct?_s.prototype.deepCopy.call(At):At);continue}var Ot=At.changes,Ut=[];dt.push({changes:Ut});for(var Wt=0;Wt<Ot.length;++Wt){var oe=Ot[Wt],Ve=void 0;if(Ut.push({from:oe.from,to:oe.to,text:oe.text}),at)for(var fe in oe)(Ve=fe.match(/^spans_(\d+)$/))&&De(at,Number(Ve[1]))>-1&&(me(Ut)[fe]=oe[fe],delete oe[fe])}}return dt}function Jc(it,at,ct,dt){if(dt){var mt=it.anchor;if(ct){var At=Mn(at,mt)<0;At!=Mn(ct,mt)<0?(mt=at,at=ct):At!=Mn(at,ct)<0&&(at=ct)}return new Ao(mt,at)}else return new Ao(ct||at,at)}function Qc(it,at,ct,dt,mt){mt==null&&(mt=it.cm&&(it.cm.display.shift||it.extend)),Za(it,new _s([Jc(it.sel.primary(),at,ct,mt)],0),dt)}function Wg(it,at,ct){for(var dt=[],mt=it.cm&&(it.cm.display.shift||it.extend),At=0;At<it.sel.ranges.length;At++)dt[At]=Jc(it.sel.ranges[At],at[At],null,mt);var Ot=sl(it.cm,dt,it.sel.primIndex);Za(it,Ot,ct)}function ul(it,at,ct,dt){var mt=it.sel.ranges.slice(0);mt[at]=ct,Za(it,sl(it.cm,mt,it.sel.primIndex),dt)}function wl(it,at,ct,dt){Za(it,Eu(at,ct),dt)}function qc(it,at,ct){var dt={ranges:at.ranges,update:function(mt){this.ranges=[];for(var At=0;At<mt.length;At++)this.ranges[At]=new Ao(Mi(it,mt[At].anchor),Mi(it,mt[At].head))},origin:ct&&ct.origin};return ei(it,"beforeSelectionChange",it,dt),it.cm&&ei(it.cm,"beforeSelectionChange",it.cm,dt),dt.ranges!=at.ranges?sl(it.cm,dt.ranges,dt.ranges.length-1):at}function $c(it,at,ct){var dt=it.history.done,mt=me(dt);mt&&mt.ranges?(dt[dt.length-1]=at,Ch(it,at,ct)):Za(it,at,ct)}function Za(it,at,ct){Ch(it,at,ct),wh(it,it.sel,it.cm?it.cm.curOp.id:NaN,ct)}function Ch(it,at,ct){(hi(it,"beforeSelectionChange")||it.cm&&hi(it.cm,"beforeSelectionChange"))&&(at=qc(it,at,ct));var dt=ct&&ct.bias||(Mn(at.primary().head,it.sel.primary().head)<0?-1:1);Eh(it,Qd(it,at,dt,!0)),!(ct&&ct.scroll===!1)&&it.cm&&ju(it.cm)}function Eh(it,at){at.equals(it.sel)||(it.sel=at,it.cm&&(it.cm.curOp.updateInput=1,it.cm.curOp.selectionChanged=!0,Hi(it.cm)),Di(it,"cursorActivity",it))}function Jd(it){Eh(it,Qd(it,it.sel,null,!1))}function Qd(it,at,ct,dt){for(var mt,At=0;At<at.ranges.length;At++){var Ot=at.ranges[At],Ut=at.ranges.length==it.sel.ranges.length&&it.sel.ranges[At],Wt=bh(it,Ot.anchor,Ut&&Ut.anchor,ct,dt),oe=bh(it,Ot.head,Ut&&Ut.head,ct,dt);(mt||Wt!=Ot.anchor||oe!=Ot.head)&&(mt||(mt=at.ranges.slice(0,At)),mt[At]=new Ao(Wt,oe))}return mt?sl(it.cm,mt,at.primIndex):at}function ka(it,at,ct,dt,mt){var At=Dn(it,at.line);if(At.markedSpans)for(var Ot=0;Ot<At.markedSpans.length;++Ot){var Ut=At.markedSpans[Ot],Wt=Ut.marker,oe="selectLeft"in Wt?!Wt.selectLeft:Wt.inclusiveLeft,Ve="selectRight"in Wt?!Wt.selectRight:Wt.inclusiveRight;if((Ut.from==null||(oe?Ut.from<=at.ch:Ut.from<at.ch))&&(Ut.to==null||(Ve?Ut.to>=at.ch:Ut.to>at.ch))){if(mt&&(ei(Wt,"beforeCursorEnter"),Wt.explicitlyCleared))if(At.markedSpans){--Ot;continue}else break;if(!Wt.atomic)continue;if(ct){var fe=Wt.find(dt<0?1:-1),dn=void 0;if((dt<0?Ve:oe)&&(fe=tf(it,fe,-dt,fe&&fe.line==at.line?At:null)),fe&&fe.line==at.line&&(dn=Mn(fe,ct))&&(dt<0?dn<0:dn>0))return ka(it,fe,at,dt,mt)}var on=Wt.find(dt<0?-1:1);return(dt<0?oe:Ve)&&(on=tf(it,on,dt,on.line==at.line?At:null)),on?ka(it,on,at,dt,mt):null}}return at}function bh(it,at,ct,dt,mt){var At=dt||1,Ot=ka(it,at,ct,At,mt)||!mt&&ka(it,at,ct,At,!0)||ka(it,at,ct,-At,mt)||!mt&&ka(it,at,ct,-At,!0);return Ot||(it.cantEdit=!0,bn(it.first,0))}function tf(it,at,ct,dt){return ct<0&&at.ch==0?at.line>it.first?Mi(it,bn(at.line-1)):null:ct>0&&at.ch==(dt||Dn(it,at.line)).text.length?at.line<it.first+it.size-1?bn(at.line+1,0):null:new bn(at.line,at.ch+ct)}function ca(it){it.setSelection(bn(it.firstLine(),0),bn(it.lastLine()),Te)}function ad(it,at,ct){var dt={canceled:!1,from:at.from,to:at.to,text:at.text,origin:at.origin,cancel:function(){return dt.canceled=!0}};return ct&&(dt.update=function(mt,At,Ot,Ut){mt&&(dt.from=Mi(it,mt)),At&&(dt.to=Mi(it,At)),Ot&&(dt.text=Ot),Ut!==void 0&&(dt.origin=Ut)}),ei(it,"beforeChange",it,dt),it.cm&&ei(it.cm,"beforeChange",it.cm,dt),dt.canceled?(it.cm&&(it.cm.curOp.updateInput=2),null):{from:dt.from,to:dt.to,text:dt.text,origin:dt.origin}}function Cl(it,at,ct){if(it.cm){if(!it.cm.curOp)return Ba(it.cm,Cl)(it,at,ct);if(it.cm.state.suppressEdits)return}if(!((hi(it,"beforeChange")||it.cm&&hi(it.cm,"beforeChange"))&&(at=ad(it,at,!0),!at))){var dt=wr&&!ct&&Dr(it,at.from,at.to);if(dt)for(var mt=dt.length-1;mt>=0;--mt)Yu(it,{from:dt[mt].from,to:dt[mt].to,text:mt?[""]:at.text,origin:at.origin});else Yu(it,at)}}function Yu(it,at){if(!(at.text.length==1&&at.text[0]==""&&Mn(at.from,at.to)==0)){var ct=Zd(it,at);Ph(it,at,ct,it.cm?it.cm.curOp.id:NaN),sd(it,at,ct,Nr(it,at));var dt=[];Pl(it,function(mt,At){!At&&De(dt,mt.history)==-1&&(Gf(mt.history,at),dt.push(mt.history)),sd(mt,at,null,Nr(mt,at))})}}function qd(it,at,ct){var dt=it.cm&&it.cm.state.suppressEdits;if(!(dt&&!ct)){for(var mt=it.history,At,Ot=it.sel,Ut=at=="undo"?mt.done:mt.undone,Wt=at=="undo"?mt.undone:mt.done,oe=0;oe<Ut.length&&(At=Ut[oe],!(ct?At.ranges&&!At.equals(it.sel):!At.ranges));oe++);if(oe!=Ut.length){for(mt.lastOrigin=mt.lastSelOrigin=null;;)if(At=Ut.pop(),At.ranges){if(od(At,Wt),ct&&!At.equals(it.sel)){Za(it,At,{clearRedo:!1});return}Ot=At}else if(dt){Ut.push(At);return}else break;var Ve=[];od(Ot,Wt),Wt.push({changes:Ve,generation:mt.generation}),mt.generation=At.generation||++mt.maxGeneration;for(var fe=hi(it,"beforeChange")||it.cm&&hi(it.cm,"beforeChange"),dn=function(ci){var xi=At.changes[ci];if(xi.origin=at,fe&&!ad(it,xi,!1))return Ut.length=0,{};Ve.push(Yc(it,xi));var Ri=ci?Zd(it,xi):me(Ut);sd(it,xi,Ri,_c(it,xi)),!ci&&it.cm&&it.cm.scrollIntoView({from:xi.from,to:Zu(xi)});var rr=[];Pl(it,function(Ki,lr){!lr&&De(rr,Ki.history)==-1&&(Gf(Ki.history,xi),rr.push(Ki.history)),sd(Ki,xi,null,_c(Ki,xi))})},on=At.changes.length-1;on>=0;--on){var ai=dn(on);if(ai)return ai.v}}}}function zf(it,at){if(at!=0&&(it.first+=at,it.sel=new _s(An(it.sel.ranges,function(mt){return new Ao(bn(mt.anchor.line+at,mt.anchor.ch),bn(mt.head.line+at,mt.head.ch))}),it.sel.primIndex),it.cm)){jo(it.cm,it.first,it.first-at,at);for(var ct=it.cm.display,dt=ct.viewFrom;dt<ct.viewTo;dt++)Ur(it.cm,dt,"gutter")}}function sd(it,at,ct,dt){if(it.cm&&!it.cm.curOp)return Ba(it.cm,sd)(it,at,ct,dt);if(at.to.line<it.first){zf(it,at.text.length-1-(at.to.line-at.from.line));return}if(!(at.from.line>it.lastLine())){if(at.from.line<it.first){var mt=at.text.length-1-(it.first-at.from.line);zf(it,mt),at={from:bn(it.first,0),to:bn(at.to.line+mt,at.to.ch),text:[me(at.text)],origin:at.origin}}var At=it.lastLine();at.to.line>At&&(at={from:at.from,to:bn(At,Dn(it,At).text.length),text:[at.text[0]],origin:at.origin}),at.removed=vi(it,at.from,at.to),ct||(ct=Zd(it,at)),it.cm?ef(it.cm,at,dt):Xd(it,at,dt),Ch(it,ct,Te),it.cantEdit&&bh(it,bn(it.firstLine(),0))&&(it.cantEdit=!1)}}function ef(it,at,ct){var dt=it.doc,mt=it.display,At=at.from,Ot=at.to,Ut=!1,Wt=At.line;it.options.lineWrapping||(Wt=pe(In(Dn(dt,At.line))),dt.iter(Wt,Ot.line+1,function(on){if(on==mt.maxLine)return Ut=!0,!0})),dt.sel.contains(at.from,at.to)>-1&&Hi(it),Xd(dt,at,ct,Yo(it)),it.options.lineWrapping||(dt.iter(Wt,At.line+at.text.length,function(on){var ai=cr(on);ai>mt.maxLineLength&&(mt.maxLine=on,mt.maxLineLength=ai,mt.maxLineChanged=!0,Ut=!1)}),Ut&&(it.curOp.updateMaxLine=!0)),pr(dt,At.line),nd(it,400);var oe=at.text.length-(Ot.line-At.line)-1;at.full?jo(it):At.line==Ot.line&&at.text.length==1&&!jf(it.doc,at)?Ur(it,At.line,"text"):jo(it,At.line,Ot.line+1,oe);var Ve=hi(it,"changes"),fe=hi(it,"change");if(fe||Ve){var dn={from:At,to:Ot,text:at.text,removed:at.removed,origin:at.origin};fe&&Di(it,"change",it,dn),Ve&&(it.curOp.changeObjs||(it.curOp.changeObjs=[])).push(dn)}it.display.selForContextMenu=null}function jl(it,at,ct,dt,mt){var At;dt||(dt=ct),Mn(dt,ct)<0&&(At=[dt,ct],ct=At[0],dt=At[1]),typeof at=="string"&&(at=it.splitLines(at)),Cl(it,{from:ct,to:dt,text:at,origin:mt})}function hl(it,at,ct,dt){ct<it.line?it.line+=dt:at<it.line&&(it.line=at,it.ch=0)}function Vg(it,at,ct,dt){for(var mt=0;mt<it.length;++mt){var At=it[mt],Ot=!0;if(At.ranges){At.copied||(At=it[mt]=At.deepCopy(),At.copied=!0);for(var Ut=0;Ut<At.ranges.length;Ut++)hl(At.ranges[Ut].anchor,at,ct,dt),hl(At.ranges[Ut].head,at,ct,dt);continue}for(var Wt=0;Wt<At.changes.length;++Wt){var oe=At.changes[Wt];if(ct<oe.from.line)oe.from=bn(oe.from.line+dt,oe.from.ch),oe.to=bn(oe.to.line+dt,oe.to.ch);else if(at<=oe.to.line){Ot=!1;break}}Ot||(it.splice(0,mt+1),mt=0)}}function Gf(it,at){var ct=at.from.line,dt=at.to.line,mt=at.text.length-(dt-ct)-1;Vg(it.done,ct,dt,mt),Vg(it.undone,ct,dt,mt)}function Xu(it,at,ct,dt){var mt=at,At=at;return typeof at=="number"?At=Dn(it,wi(it,at)):mt=pe(at),mt==null?null:(dt(At,mt)&&it.cm&&Ur(it.cm,mt,ct),At)}function ld(it){this.lines=it,this.parent=null;for(var at=0,ct=0;ct<it.length;++ct)it[ct].parent=this,at+=it[ct].height;this.height=at}ld.prototype={chunkSize:function(){return this.lines.length},removeInner:function(it,at){for(var ct=it,dt=it+at;ct<dt;++ct){var mt=this.lines[ct];this.height-=mt.height,br(mt),Di(mt,"delete")}this.lines.splice(it,at)},collapse:function(it){it.push.apply(it,this.lines)},insertInner:function(it,at,ct){this.height+=ct,this.lines=this.lines.slice(0,it).concat(at).concat(this.lines.slice(it));for(var dt=0;dt<at.length;++dt)at[dt].parent=this},iterN:function(it,at,ct){for(var dt=it+at;it<dt;++it)if(ct(this.lines[it]))return!0}};function qo(it){this.children=it;for(var at=0,ct=0,dt=0;dt<it.length;++dt){var mt=it[dt];at+=mt.chunkSize(),ct+=mt.height,mt.parent=this}this.size=at,this.height=ct,this.parent=null}qo.prototype={chunkSize:function(){return this.size},removeInner:function(it,at){this.size-=at;for(var ct=0;ct<this.children.length;++ct){var dt=this.children[ct],mt=dt.chunkSize();if(it<mt){var At=Math.min(at,mt-it),Ot=dt.height;if(dt.removeInner(it,At),this.height-=Ot-dt.height,mt==At&&(this.children.splice(ct--,1),dt.parent=null),(at-=At)==0)break;it=0}else it-=mt}if(this.size-at<25&&(this.children.length>1||!(this.children[0]instanceof ld))){var Ut=[];this.collapse(Ut),this.children=[new ld(Ut)],this.children[0].parent=this}},collapse:function(it){for(var at=0;at<this.children.length;++at)this.children[at].collapse(it)},insertInner:function(it,at,ct){this.size+=at.length,this.height+=ct;for(var dt=0;dt<this.children.length;++dt){var mt=this.children[dt],At=mt.chunkSize();if(it<=At){if(mt.insertInner(it,at,ct),mt.lines&&mt.lines.length>50){for(var Ot=mt.lines.length%25+25,Ut=Ot;Ut<mt.lines.length;){var Wt=new ld(mt.lines.slice(Ut,Ut+=25));mt.height-=Wt.height,this.children.splice(++dt,0,Wt),Wt.parent=this}mt.lines=mt.lines.slice(0,Ot),this.maybeSpill()}break}it-=At}},maybeSpill:function(){if(!(this.children.length<=10)){var it=this;do{var at=it.children.splice(it.children.length-5,5),ct=new qo(at);if(it.parent){it.size-=ct.size,it.height-=ct.height;var mt=De(it.parent.children,it);it.parent.children.splice(mt+1,0,ct)}else{var dt=new qo(it.children);dt.parent=it,it.children=[dt,ct],it=dt}ct.parent=it.parent}while(it.children.length>10);it.parent.maybeSpill()}},iterN:function(it,at,ct){for(var dt=0;dt<this.children.length;++dt){var mt=this.children[dt],At=mt.chunkSize();if(it<At){var Ot=Math.min(at,At-it);if(mt.iterN(it,Ot,ct))return!0;if((at-=Ot)==0)break;it=0}else it-=At}}};var zl=function(it,at,ct){if(ct)for(var dt in ct)ct.hasOwnProperty(dt)&&(this[dt]=ct[dt]);this.doc=it,this.node=at};zl.prototype.clear=function(){var it=this.doc.cm,at=this.line.widgets,ct=this.line,dt=pe(ct);if(!(dt==null||!at)){for(var mt=0;mt<at.length;++mt)at[mt]==this&&at.splice(mt--,1);at.length||(ct.widgets=null);var At=Ql(this);ki(ct,Math.max(0,ct.height-At)),it&&(xo(it,function(){Ug(it,ct,-At),Ur(it,dt,"widget")}),Di(it,"lineWidgetCleared",it,this,dt))}},zl.prototype.changed=function(){var it=this,at=this.height,ct=this.doc.cm,dt=this.line;this.height=null;var mt=Ql(this)-at;mt&&(Re(this.doc,dt)||ki(dt,dt.height+mt),ct&&xo(ct,function(){ct.curOp.forceUpdate=!0,Ug(ct,dt,mt),Di(ct,"lineWidgetChanged",ct,it,pe(dt))}))},Jn(zl);function Ug(it,at,ct){bi(at)<(it.curOp&&it.curOp.scrollTop||it.doc.scrollTop)&&Wd(it,ct)}function nf(it,at,ct,dt){var mt=new zl(it,ct,dt),At=it.cm;return At&&mt.noHScroll&&(At.display.alignWidgets=!0),Xu(it,at,"widget",function(Ot){var Ut=Ot.widgets||(Ot.widgets=[]);if(mt.insertAt==null?Ut.push(mt):Ut.splice(Math.min(Ut.length-1,Math.max(0,mt.insertAt)),0,mt),mt.line=Ot,At&&!Re(it,Ot)){var Wt=bi(Ot)<it.scrollTop;ki(Ot,Ot.height+Ql(mt)),Wt&&Wd(At,mt.height),At.curOp.forceUpdate=!0}return!0}),At&&Di(At,"lineWidgetAdded",At,mt,typeof at=="number"?at:pe(at)),mt}var $d=0,Be=function(it,at){this.lines=[],this.type=at,this.doc=it,this.id=++$d};Be.prototype.clear=function(){if(!this.explicitlyCleared){var it=this.doc.cm,at=it&&!it.curOp;if(at&&zu(it),hi(this,"clear")){var ct=this.find();ct&&Di(this,"clear",ct.from,ct.to)}for(var dt=null,mt=null,At=0;At<this.lines.length;++At){var Ot=this.lines[At],Ut=Gr(Ot.markedSpans,this);it&&!this.collapsed?Ur(it,pe(Ot),"text"):it&&(Ut.to!=null&&(mt=pe(Ot)),Ut.from!=null&&(dt=pe(Ot))),Ot.markedSpans=Cr(Ot.markedSpans,Ut),Ut.from==null&&this.collapsed&&!Re(this.doc,Ot)&&it&&ki(Ot,ol(it.display))}if(it&&this.collapsed&&!it.options.lineWrapping)for(var Wt=0;Wt<this.lines.length;++Wt){var oe=In(this.lines[Wt]),Ve=cr(oe);Ve>it.display.maxLineLength&&(it.display.maxLine=oe,it.display.maxLineLength=Ve,it.display.maxLineChanged=!0)}dt!=null&&it&&this.collapsed&&jo(it,dt,mt+1),this.lines.length=0,this.explicitlyCleared=!0,this.atomic&&this.doc.cantEdit&&(this.doc.cantEdit=!1,it&&Jd(it.doc)),it&&Di(it,"markerCleared",it,this,dt,mt),at&&Gu(it),this.parent&&this.parent.clear()}},Be.prototype.find=function(it,at){it==null&&this.type=="bookmark"&&(it=1);for(var ct,dt,mt=0;mt<this.lines.length;++mt){var At=this.lines[mt],Ot=Gr(At.markedSpans,this);if(Ot.from!=null&&(ct=bn(at?At:pe(At),Ot.from),it==-1))return ct;if(Ot.to!=null&&(dt=bn(at?At:pe(At),Ot.to),it==1))return dt}return ct&&{from:ct,to:dt}},Be.prototype.changed=function(){var it=this,at=this.find(-1,!0),ct=this,dt=this.doc.cm;!at||!dt||xo(dt,function(){var mt=at.line,At=pe(at.line),Ot=Gd(dt,At);if(Ot&&(Df(Ot),dt.curOp.selectionChanged=dt.curOp.forceUpdate=!0),dt.curOp.updateMaxLine=!0,!Re(ct.doc,mt)&&ct.height!=null){var Ut=ct.height;ct.height=null;var Wt=Ql(ct)-Ut;Wt&&ki(mt,mt.height+Wt)}Di(dt,"markerChanged",dt,it)})},Be.prototype.attachLine=function(it){if(!this.lines.length&&this.doc.cm){var at=this.doc.cm.curOp;(!at.maybeHiddenMarkers||De(at.maybeHiddenMarkers,this)==-1)&&(at.maybeUnhiddenMarkers||(at.maybeUnhiddenMarkers=[])).push(this)}this.lines.push(it)},Be.prototype.detachLine=function(it){if(this.lines.splice(De(this.lines,it),1),!this.lines.length&&this.doc.cm){var at=this.doc.cm.curOp;(at.maybeHiddenMarkers||(at.maybeHiddenMarkers=[])).push(this)}},Jn(Be);function Lh(it,at,ct,dt,mt){if(dt&&dt.shared)return Kg(it,at,ct,dt,mt);if(it.cm&&!it.cm.curOp)return Ba(it.cm,Lh)(it,at,ct,dt,mt);var At=new Be(it,mt),Ot=Mn(at,ct);if(dt&&_e(dt,At,!1),Ot>0||Ot==0&&At.clearWhenEmpty!==!1)return At;if(At.replacedWith&&(At.collapsed=!0,At.widgetNode=je("span",[At.replacedWith],"CodeMirror-widget"),dt.handleMouseEvents||At.widgetNode.setAttribute("cm-ignore-events","true"),dt.insertLeft&&(At.widgetNode.insertLeft=!0)),At.collapsed){if(Wn(it,at.line,at,ct,At)||at.line!=ct.line&&Wn(it,ct.line,at,ct,At))throw new Error("Inserting collapsed marker partially overlapping an existing one");mn()}At.addToHistory&&Ph(it,{from:at,to:ct,origin:"markText"},it.sel,NaN);var Ut=at.line,Wt=it.cm,oe;if(it.iter(Ut,ct.line+1,function(fe){Wt&&At.collapsed&&!Wt.options.lineWrapping&&In(fe)==Wt.display.maxLine&&(oe=!0),At.collapsed&&Ut!=at.line&&ki(fe,0),eo(fe,new Zr(At,Ut==at.line?at.ch:null,Ut==ct.line?ct.ch:null)),++Ut}),At.collapsed&&it.iter(at.line,ct.line+1,function(fe){Re(it,fe)&&ki(fe,0)}),At.clearOnEnter&&xe(At,"beforeCursorEnter",function(){return At.clear()}),At.readOnly&&(Ir(),(it.history.done.length||it.history.undone.length)&&it.clearHistory()),At.collapsed&&(At.id=++$d,At.atomic=!0),Wt){if(oe&&(Wt.curOp.updateMaxLine=!0),At.collapsed)jo(Wt,at.line,ct.line+1);else if(At.className||At.startStyle||At.endStyle||At.css||At.attributes||At.title)for(var Ve=at.line;Ve<=ct.line;Ve++)Ur(Wt,Ve,"text");At.atomic&&Jd(Wt.doc),Di(Wt,"markerAdded",Wt,At)}return At}var Gl=function(it,at){this.markers=it,this.primary=at;for(var ct=0;ct<it.length;++ct)it[ct].parent=this};Gl.prototype.clear=function(){if(!this.explicitlyCleared){this.explicitlyCleared=!0;for(var it=0;it<this.markers.length;++it)this.markers[it].clear();Di(this,"clear")}},Gl.prototype.find=function(it,at){return this.primary.find(it,at)},Jn(Gl);function Kg(it,at,ct,dt,mt){dt=_e(dt),dt.shared=!1;var At=[Lh(it,at,ct,dt,mt)],Ot=At[0],Ut=dt.widgetNode;return Pl(it,function(Wt){Ut&&(dt.widgetNode=Ut.cloneNode(!0)),At.push(Lh(Wt,Mi(Wt,at),Mi(Wt,ct),dt,mt));for(var oe=0;oe<Wt.linked.length;++oe)if(Wt.linked[oe].isParent)return;Ot=me(At)}),new Gl(At,Ot)}function Hf(it){return it.findMarks(bn(it.first,0),it.clipPos(bn(it.lastLine())),function(at){return at.parent})}function Gp(it,at){for(var ct=0;ct<at.length;ct++){var dt=at[ct],mt=dt.find(),At=it.clipPos(mt.from),Ot=it.clipPos(mt.to);if(Mn(At,Ot)){var Ut=Lh(it,At,Ot,dt.primary,dt.primary.type);dt.markers.push(Ut),Ut.parent=dt}}}function Wf(it){for(var at=function(dt){var mt=it[dt],At=[mt.primary.doc];Pl(mt.primary.doc,function(Wt){return At.push(Wt)});for(var Ot=0;Ot<mt.markers.length;Ot++){var Ut=mt.markers[Ot];De(At,Ut.doc)==-1&&(Ut.parent=null,mt.markers.splice(Ot--,1))}},ct=0;ct<it.length;ct++)at(ct)}var Rm=0,Sa=function(it,at,ct,dt,mt){if(!(this instanceof Sa))return new Sa(it,at,ct,dt,mt);ct==null&&(ct=0),qo.call(this,[new ld([new Bi("",null)])]),this.first=ct,this.scrollTop=this.scrollLeft=0,this.cantEdit=!1,this.cleanGeneration=1,this.modeFrontier=this.highlightFrontier=ct;var At=bn(ct,0);this.sel=Eu(At),this.history=new rd(null),this.id=++Rm,this.modeOption=at,this.lineSep=dt,this.direction=mt=="rtl"?"rtl":"ltr",this.extend=!1,typeof it=="string"&&(it=this.splitLines(it)),Xd(this,{from:At,to:At,text:it}),Za(this,Eu(At),Te)};Sa.prototype=ln(qo.prototype,{constructor:Sa,iter:function(it,at,ct){ct?this.iterN(it-this.first,at-it,ct):this.iterN(this.first,this.first+this.size,it)},insert:function(it,at){for(var ct=0,dt=0;dt<at.length;++dt)ct+=at[dt].height;this.insertInner(it-this.first,at,ct)},remove:function(it,at){this.removeInner(it-this.first,at)},getValue:function(it){var at=$n(this,this.first,this.first+this.size);return it===!1?at:at.join(it||this.lineSeparator())},setValue:Ra(function(it){var at=bn(this.first,0),ct=this.first+this.size-1;Cl(this,{from:at,to:bn(ct,Dn(this,ct).text.length),text:this.splitLines(it),origin:"setValue",full:!0},!0),this.cm&&mh(this.cm,0,0),Za(this,Eu(at),Te)}),replaceRange:function(it,at,ct,dt){at=Mi(this,at),ct=ct?Mi(this,ct):at,jl(this,it,at,ct,dt)},getRange:function(it,at,ct){var dt=vi(this,Mi(this,it),Mi(this,at));return ct===!1?dt:dt.join(ct||this.lineSeparator())},getLine:function(it){var at=this.getLineHandle(it);return at&&at.text},getLineHandle:function(it){if(gi(this,it))return Dn(this,it)},getLineNumber:function(it){return pe(it)},getLineHandleVisualStart:function(it){return typeof it=="number"&&(it=Dn(this,it)),In(it)},lineCount:function(){return this.size},firstLine:function(){return this.first},lastLine:function(){return this.first+this.size-1},clipPos:function(it){return Mi(this,it)},getCursor:function(it){var at=this.sel.primary(),ct;return it==null||it=="head"?ct=at.head:it=="anchor"?ct=at.anchor:it=="end"||it=="to"||it===!1?ct=at.to():ct=at.from(),ct},listSelections:function(){return this.sel.ranges},somethingSelected:function(){return this.sel.somethingSelected()},setCursor:Ra(function(it,at,ct){wl(this,Mi(this,typeof it=="number"?bn(it,at||0):it),null,ct)}),setSelection:Ra(function(it,at,ct){wl(this,Mi(this,it),Mi(this,at||it),ct)}),extendSelection:Ra(function(it,at,ct){Qc(this,Mi(this,it),at&&Mi(this,at),ct)}),extendSelections:Ra(function(it,at){Wg(this,ir(this,it),at)}),extendSelectionsBy:Ra(function(it,at){var ct=An(this.sel.ranges,it);Wg(this,ir(this,ct),at)}),setSelections:Ra(function(it,at,ct){if(it.length){for(var dt=[],mt=0;mt<it.length;mt++)dt[mt]=new Ao(Mi(this,it[mt].anchor),Mi(this,it[mt].head));at==null&&(at=Math.min(it.length-1,this.sel.primIndex)),Za(this,sl(this.cm,dt,at),ct)}}),addSelection:Ra(function(it,at,ct){var dt=this.sel.ranges.slice(0);dt.push(new Ao(Mi(this,it),Mi(this,at||it))),Za(this,sl(this.cm,dt,dt.length-1),ct)}),getSelection:function(it){for(var at=this.sel.ranges,ct,dt=0;dt<at.length;dt++){var mt=vi(this,at[dt].from(),at[dt].to());ct=ct?ct.concat(mt):mt}return it===!1?ct:ct.join(it||this.lineSeparator())},getSelections:function(it){for(var at=[],ct=this.sel.ranges,dt=0;dt<ct.length;dt++){var mt=vi(this,ct[dt].from(),ct[dt].to());it!==!1&&(mt=mt.join(it||this.lineSeparator())),at[dt]=mt}return at},replaceSelection:function(it,at,ct){for(var dt=[],mt=0;mt<this.sel.ranges.length;mt++)dt[mt]=it;this.replaceSelections(dt,at,ct||"+input")},replaceSelections:Ra(function(it,at,ct){for(var dt=[],mt=this.sel,At=0;At<mt.ranges.length;At++){var Ot=mt.ranges[At];dt[At]={from:Ot.from(),to:Ot.to(),text:this.splitLines(it[At]),origin:ct}}for(var Ut=at&&at!="end"&&Yd(this,dt,at),Wt=dt.length-1;Wt>=0;Wt--)Cl(this,dt[Wt]);Ut?$c(this,Ut):this.cm&&ju(this.cm)}),undo:Ra(function(){qd(this,"undo")}),redo:Ra(function(){qd(this,"redo")}),undoSelection:Ra(function(){qd(this,"undo",!0)}),redoSelection:Ra(function(){qd(this,"redo",!0)}),setExtending:function(it){this.extend=it},getExtending:function(){return this.extend},historySize:function(){for(var it=this.history,at=0,ct=0,dt=0;dt<it.done.length;dt++)it.done[dt].ranges||++at;for(var mt=0;mt<it.undone.length;mt++)it.undone[mt].ranges||++ct;return{undo:at,redo:ct}},clearHistory:function(){var it=this;this.history=new rd(this.history.maxGeneration),Pl(this,function(at){return at.history=it.history},!0)},markClean:function(){this.cleanGeneration=this.changeGeneration(!0)},changeGeneration:function(it){return it&&(this.history.lastOp=this.history.lastSelOp=this.history.lastOrigin=null),this.history.generation},isClean:function(it){return this.history.generation==(it||this.cleanGeneration)},getHistory:function(){return{done:iu(this.history.done),undone:iu(this.history.undone)}},setHistory:function(it){var at=this.history=new rd(this.history.maxGeneration);at.done=iu(it.done.slice(0),null,!0),at.undone=iu(it.undone.slice(0),null,!0)},setGutterMarker:Ra(function(it,at,ct){return Xu(this,it,"gutter",function(dt){var mt=dt.gutterMarkers||(dt.gutterMarkers={});return mt[at]=ct,!ct&&Ze(mt)&&(dt.gutterMarkers=null),!0})}),clearGutter:Ra(function(it){var at=this;this.iter(function(ct){ct.gutterMarkers&&ct.gutterMarkers[it]&&Xu(at,ct,"gutter",function(){return ct.gutterMarkers[it]=null,Ze(ct.gutterMarkers)&&(ct.gutterMarkers=null),!0})})}),lineInfo:function(it){var at;if(typeof it=="number"){if(!gi(this,it)||(at=it,it=Dn(this,it),!it))return null}else if(at=pe(it),at==null)return null;return{line:at,handle:it,text:it.text,gutterMarkers:it.gutterMarkers,textClass:it.textClass,bgClass:it.bgClass,wrapClass:it.wrapClass,widgets:it.widgets}},addLineClass:Ra(function(it,at,ct){return Xu(this,it,at=="gutter"?"gutter":"class",function(dt){var mt=at=="text"?"textClass":at=="background"?"bgClass":at=="gutter"?"gutterClass":"wrapClass";if(!dt[mt])dt[mt]=ct;else{if(zt(ct).test(dt[mt]))return!1;dt[mt]+=" "+ct}return!0})}),removeLineClass:Ra(function(it,at,ct){return Xu(this,it,at=="gutter"?"gutter":"class",function(dt){var mt=at=="text"?"textClass":at=="background"?"bgClass":at=="gutter"?"gutterClass":"wrapClass",At=dt[mt];if(At)if(ct==null)dt[mt]=null;else{var Ot=At.match(zt(ct));if(!Ot)return!1;var Ut=Ot.index+Ot[0].length;dt[mt]=At.slice(0,Ot.index)+(!Ot.index||Ut==At.length?"":" ")+At.slice(Ut)||null}else return!1;return!0})}),addLineWidget:Ra(function(it,at,ct){return nf(this,it,at,ct)}),removeLineWidget:function(it){it.clear()},markText:function(it,at,ct){return Lh(this,Mi(this,it),Mi(this,at),ct,ct&&ct.type||"range")},setBookmark:function(it,at){var ct={replacedWith:at&&(at.nodeType==null?at.widget:at),insertLeft:at&&at.insertLeft,clearWhenEmpty:!1,shared:at&&at.shared,handleMouseEvents:at&&at.handleMouseEvents};return it=Mi(this,it),Lh(this,it,it,ct,"bookmark")},findMarksAt:function(it){it=Mi(this,it);var at=[],ct=Dn(this,it.line).markedSpans;if(ct)for(var dt=0;dt<ct.length;++dt){var mt=ct[dt];(mt.from==null||mt.from<=it.ch)&&(mt.to==null||mt.to>=it.ch)&&at.push(mt.marker.parent||mt.marker)}return at},findMarks:function(it,at,ct){it=Mi(this,it),at=Mi(this,at);var dt=[],mt=it.line;return this.iter(it.line,at.line+1,function(At){var Ot=At.markedSpans;if(Ot)for(var Ut=0;Ut<Ot.length;Ut++){var Wt=Ot[Ut];!(Wt.to!=null&&mt==it.line&&it.ch>=Wt.to||Wt.from==null&&mt!=it.line||Wt.from!=null&&mt==at.line&&Wt.from>=at.ch)&&(!ct||ct(Wt.marker))&&dt.push(Wt.marker.parent||Wt.marker)}++mt}),dt},getAllMarks:function(){var it=[];return this.iter(function(at){var ct=at.markedSpans;if(ct)for(var dt=0;dt<ct.length;++dt)ct[dt].from!=null&&it.push(ct[dt].marker)}),it},posFromIndex:function(it){var at,ct=this.first,dt=this.lineSeparator().length;return this.iter(function(mt){var At=mt.text.length+dt;if(At>it)return at=it,!0;it-=At,++ct}),Mi(this,bn(ct,at))},indexFromPos:function(it){it=Mi(this,it);var at=it.ch;if(it.line<this.first||it.ch<0)return 0;var ct=this.lineSeparator().length;return this.iter(this.first,it.line,function(dt){at+=dt.text.length+ct}),at},copy:function(it){var at=new Sa($n(this,this.first,this.first+this.size),this.modeOption,this.first,this.lineSep,this.direction);return at.scrollTop=this.scrollTop,at.scrollLeft=this.scrollLeft,at.sel=this.sel,at.extend=!1,it&&(at.history.undoDepth=this.history.undoDepth,at.setHistory(this.getHistory())),at},linkedDoc:function(it){it||(it={});var at=this.first,ct=this.first+this.size;it.from!=null&&it.from>at&&(at=it.from),it.to!=null&&it.to<ct&&(ct=it.to);var dt=new Sa($n(this,at,ct),it.mode||this.modeOption,at,this.lineSep,this.direction);return it.sharedHist&&(dt.history=this.history),(this.linked||(this.linked=[])).push({doc:dt,sharedHist:it.sharedHist}),dt.linked=[{doc:this,isParent:!0,sharedHist:it.sharedHist}],Gp(dt,Hf(this)),dt},unlinkDoc:function(it){if(it instanceof co&&(it=it.doc),this.linked)for(var at=0;at<this.linked.length;++at){var ct=this.linked[at];if(ct.doc==it){this.linked.splice(at,1),it.unlinkDoc(this),Wf(Hf(this));break}}if(it.history==this.history){var dt=[it.id];Pl(it,function(mt){return dt.push(mt.id)},!0),it.history=new rd(null),it.history.done=iu(this.history.done,dt),it.history.undone=iu(this.history.undone,dt)}},iterLinkedDocs:function(it){Pl(this,it)},getMode:function(){return this.mode},getEditor:function(){return this.cm},splitLines:function(it){return this.lineSep?it.split(this.lineSep):Rn(it)},lineSeparator:function(){return this.lineSep||`
`},setDirection:Ra(function(it){it!="rtl"&&(it="ltr"),it!=this.direction&&(this.direction=it,this.iter(function(at){return at.order=null}),this.cm&&Hg(this.cm))})}),Sa.prototype.eachLine=Sa.prototype.iter;var tc=0;function ec(it){var at=this;if(Xg(at),!(ii(at,it)||Ko(at.display,it))){Vi(it),Pe&&(tc=+new Date);var ct=Ka(at,it,!0),dt=it.dataTransfer.files;if(!(!ct||at.isReadOnly()))if(dt&&dt.length&&window.FileReader&&window.File)for(var mt=dt.length,At=Array(mt),Ot=0,Ut=function(){++Ot==mt&&Ba(at,function(){ct=Mi(at.doc,ct);var on={from:ct,to:ct,text:at.doc.splitLines(At.filter(function(ai){return ai!=null}).join(at.doc.lineSeparator())),origin:"paste"};Cl(at.doc,on),$c(at.doc,Eu(Mi(at.doc,ct),Mi(at.doc,Zu(on))))})()},Wt=function(on,ai){if(at.options.allowDropFileTypes&&De(at.options.allowDropFileTypes,on.type)==-1){Ut();return}var ci=new FileReader;ci.onerror=function(){return Ut()},ci.onload=function(){var xi=ci.result;if(/[\x00-\x08\x0e-\x1f]{2}/.test(xi)){Ut();return}At[ai]=xi,Ut()},ci.readAsText(on)},oe=0;oe<dt.length;oe++)Wt(dt[oe],oe);else{if(at.state.draggingText&&at.doc.sel.contains(ct)>-1){at.state.draggingText(it),setTimeout(function(){return at.display.input.focus()},20);return}try{var Ve=it.dataTransfer.getData("Text");if(Ve){var fe;if(at.state.draggingText&&!at.state.draggingText.copy&&(fe=at.listSelections()),Ch(at.doc,Eu(ct,ct)),fe)for(var dn=0;dn<fe.length;++dn)jl(at.doc,"",fe[dn].anchor,fe[dn].head,"drag");at.replaceSelection(Ve,"around","paste"),at.display.input.focus()}}catch(on){}}}}function Zg(it,at){if(Pe&&(!it.state.draggingText||+new Date-tc<100)){sr(at);return}if(!(ii(it,at)||Ko(it.display,at))&&(at.dataTransfer.setData("Text",it.getSelection()),at.dataTransfer.effectAllowed="copyMove",at.dataTransfer.setDragImage&&!he)){var ct=ae("img",null,null,"position: fixed; left: 0; top: 0;");ct.src="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==",de&&(ct.width=ct.height=1,it.display.wrapper.appendChild(ct),ct._top=ct.offsetTop),at.dataTransfer.setDragImage(ct,0,0),de&&ct.parentNode.removeChild(ct)}}function Yg(it,at){var ct=Ka(it,at);if(ct){var dt=document.createDocumentFragment();oo(it,ct,dt),it.display.dragCursor||(it.display.dragCursor=ae("div",null,"CodeMirror-cursors CodeMirror-dragcursors"),it.display.lineSpace.insertBefore(it.display.dragCursor,it.display.cursorDiv)),le(it.display.dragCursor,dt)}}function Xg(it){it.display.dragCursor&&(it.display.lineSpace.removeChild(it.display.dragCursor),it.display.dragCursor=null)}function rf(it){if(document.getElementsByClassName){for(var at=document.getElementsByClassName("CodeMirror"),ct=[],dt=0;dt<at.length;dt++){var mt=at[dt].CodeMirror;mt&&ct.push(mt)}ct.length&&ct[0].operation(function(){for(var At=0;At<ct.length;At++)it(ct[At])})}}var of=!1;function Js(){of||(ud(),of=!0)}function ud(){var it;xe(window,"resize",function(){it==null&&(it=setTimeout(function(){it=null,rf(Vf)},100))}),xe(window,"blur",function(){return rf(ph)})}function Vf(it){var at=it.display;at.cachedCharWidth=at.cachedTextHeight=at.cachedPaddingH=null,at.scrollbarsClipped=!1,it.setSize()}for(var ru={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"},nc=0;nc<10;nc++)ru[nc+48]=ru[nc+96]=String(nc);for(var af=65;af<=90;af++)ru[af]=String.fromCharCode(af);for(var ic=1;ic<=12;ic++)ru[ic+111]=ru[ic+63235]="F"+ic;var Hs={};Hs.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"},Hs.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"},Hs.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"},Hs.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"]},Hs.default=ht?Hs.macDefault:Hs.pcDefault;function hd(it){var at=it.split(/-(?!$)/);it=at[at.length-1];for(var ct,dt,mt,At,Ot=0;Ot<at.length-1;Ot++){var Ut=at[Ot];if(/^(cmd|meta|m)$/i.test(Ut))At=!0;else if(/^a(lt)?$/i.test(Ut))ct=!0;else if(/^(c|ctrl|control)$/i.test(Ut))dt=!0;else if(/^s(hift)?$/i.test(Ut))mt=!0;else throw new Error("Unrecognized modifier name: "+Ut)}return ct&&(it="Alt-"+it),dt&&(it="Ctrl-"+it),At&&(it="Cmd-"+it),mt&&(it="Shift-"+it),it}function Uf(it){var at={};for(var ct in it)if(it.hasOwnProperty(ct)){var dt=it[ct];if(/^(name|fallthrough|(de|at)tach)$/.test(ct))continue;if(dt=="..."){delete it[ct];continue}for(var mt=An(ct.split(" "),hd),At=0;At<mt.length;At++){var Ot=void 0,Ut=void 0;At==mt.length-1?(Ut=mt.join(" "),Ot=dt):(Ut=mt.slice(0,At+1).join(" "),Ot="...");var Wt=at[Ut];if(!Wt)at[Ut]=Ot;else if(Wt!=Ot)throw new Error("Inconsistent bindings for "+Ut)}delete it[ct]}for(var oe in at)it[oe]=at[oe];return it}function Qs(it,at,ct,dt){at=Mh(at);var mt=at.call?at.call(it,dt):at[it];if(mt===!1)return"nothing";if(mt==="...")return"multi";if(mt!=null&&ct(mt))return"handled";if(at.fallthrough){if(Object.prototype.toString.call(at.fallthrough)!="[object Array]")return Qs(it,at.fallthrough,ct,dt);for(var At=0;At<at.fallthrough.length;At++){var Ot=Qs(it,at.fallthrough[At],ct,dt);if(Ot)return Ot}}}function bu(it){var at=typeof it=="string"?it:ru[it.keyCode];return at=="Ctrl"||at=="Alt"||at=="Shift"||at=="Mod"}function sf(it,at,ct){var dt=it;return at.altKey&&dt!="Alt"&&(it="Alt-"+it),(Lt?at.metaKey:at.ctrlKey)&&dt!="Ctrl"&&(it="Ctrl-"+it),(Lt?at.ctrlKey:at.metaKey)&&dt!="Mod"&&(it="Cmd-"+it),!ct&&at.shiftKey&&dt!="Shift"&&(it="Shift-"+it),it}function Kf(it,at){if(de&&it.keyCode==34&&it.char)return!1;var ct=ru[it.keyCode];return ct==null||it.altGraphKey?!1:(it.keyCode==3&&it.code&&(ct=it.code),sf(ct,it,at))}function Mh(it){return typeof it=="string"?Hs[it]:it}function Ms(it,at){for(var ct=it.doc.sel.ranges,dt=[],mt=0;mt<ct.length;mt++){for(var At=at(ct[mt]);dt.length&&Mn(At.from,me(dt).to)<=0;){var Ot=dt.pop();if(Mn(Ot.from,At.from)<0){At.from=Ot.from;break}}dt.push(At)}xo(it,function(){for(var Ut=dt.length-1;Ut>=0;Ut--)jl(it.doc,"",dt[Ut].from,dt[Ut].to,"+delete");ju(it)})}function Zf(it,at,ct){var dt=$e(it.text,at+ct,ct);return dt<0||dt>it.text.length?null:dt}function fa(it,at,ct){var dt=Zf(it,at.ch,ct);return dt==null?null:new bn(at.line,dt,ct<0?"after":"before")}function ou(it,at,ct,dt,mt){if(it){at.doc.direction=="rtl"&&(mt=-mt);var At=Yt(ct,at.doc.direction);if(At){var Ot=mt<0?me(At):At[0],Ut=mt<0==(Ot.level==1),Wt=Ut?"after":"before",oe;if(Ot.level>0||at.doc.direction=="rtl"){var Ve=Ia(at,ct);oe=mt<0?ct.text.length-1:0;var fe=Sl(at,Ve,oe).top;oe=Pn(function(dn){return Sl(at,Ve,dn).top==fe},mt<0==(Ot.level==1)?Ot.from:Ot.to-1,oe),Wt=="before"&&(oe=Zf(ct,oe,1))}else oe=mt<0?Ot.to:Ot.from;return new bn(dt,oe,Wt)}}return new bn(dt,mt<0?ct.text.length:0,mt<0?"before":"after")}function lf(it,at,ct,dt){var mt=Yt(at,it.doc.direction);if(!mt)return fa(at,ct,dt);ct.ch>=at.text.length?(ct.ch=at.text.length,ct.sticky="before"):ct.ch<=0&&(ct.ch=0,ct.sticky="after");var At=Pt(mt,ct.ch,ct.sticky),Ot=mt[At];if(it.doc.direction=="ltr"&&Ot.level%2==0&&(dt>0?Ot.to>ct.ch:Ot.from<ct.ch))return fa(at,ct,dt);var Ut=function(Ri,rr){return Zf(at,Ri instanceof bn?Ri.ch:Ri,rr)},Wt,oe=function(Ri){return it.options.lineWrapping?(Wt=Wt||Ia(it,at),Gc(it,at,Wt,Ri)):{begin:0,end:at.text.length}},Ve=oe(ct.sticky=="before"?Ut(ct,-1):ct.ch);if(it.doc.direction=="rtl"||Ot.level==1){var fe=Ot.level==1==dt<0,dn=Ut(ct,fe?1:-1);if(dn!=null&&(fe?dn<=Ot.to&&dn<=Ve.end:dn>=Ot.from&&dn>=Ve.begin)){var on=fe?"before":"after";return new bn(ct.line,dn,on)}}var ai=function(Ri,rr,Ki){for(var lr=function(Wo,Da){return Da?new bn(ct.line,Ut(Wo,1),"before"):new bn(ct.line,Wo,"after")};Ri>=0&&Ri<mt.length;Ri+=rr){var Rr=mt[Ri],Zi=rr>0==(Rr.level!=1),Jr=Zi?Ki.begin:Ut(Ki.end,-1);if(Rr.from<=Jr&&Jr<Rr.to||(Jr=Zi?Rr.from:Ut(Rr.to,-1),Ki.begin<=Jr&&Jr<Ki.end))return lr(Jr,Zi)}},ci=ai(At+dt,dt,Ve);if(ci)return ci;var xi=dt>0?Ve.end:Ut(Ve.begin,-1);return xi!=null&&!(dt>0&&xi==at.text.length)&&(ci=ai(dt>0?0:mt.length-1,dt,oe(xi)),ci)?ci:null}var _u={selectAll:ca,singleSelection:function(it){return it.setSelection(it.getCursor("anchor"),it.getCursor("head"),Te)},killLine:function(it){return Ms(it,function(at){if(at.empty()){var ct=Dn(it.doc,at.head.line).text.length;return at.head.ch==ct&&at.head.line<it.lastLine()?{from:at.head,to:bn(at.head.line+1,0)}:{from:at.head,to:bn(at.head.line,ct)}}else return{from:at.from(),to:at.to()}})},deleteLine:function(it){return Ms(it,function(at){return{from:bn(at.from().line,0),to:Mi(it.doc,bn(at.to().line+1,0))}})},delLineLeft:function(it){return Ms(it,function(at){return{from:bn(at.from().line,0),to:at.from()}})},delWrappedLineLeft:function(it){return Ms(it,function(at){var ct=it.charCoords(at.head,"div").top+5,dt=it.coordsChar({left:0,top:ct},"div");return{from:dt,to:at.from()}})},delWrappedLineRight:function(it){return Ms(it,function(at){var ct=it.charCoords(at.head,"div").top+5,dt=it.coordsChar({left:it.display.lineDiv.offsetWidth+100,top:ct},"div");return{from:at.from(),to:dt}})},undo:function(it){return it.undo()},redo:function(it){return it.redo()},undoSelection:function(it){return it.undoSelection()},redoSelection:function(it){return it.redoSelection()},goDocStart:function(it){return it.extendSelection(bn(it.firstLine(),0))},goDocEnd:function(it){return it.extendSelection(bn(it.lastLine()))},goLineStart:function(it){return it.extendSelectionsBy(function(at){return dd(it,at.head.line)},{origin:"+move",bias:1})},goLineStartSmart:function(it){return it.extendSelectionsBy(function(at){return rc(it,at.head)},{origin:"+move",bias:1})},goLineEnd:function(it){return it.extendSelectionsBy(function(at){return cd(it,at.head.line)},{origin:"+move",bias:-1})},goLineRight:function(it){return it.extendSelectionsBy(function(at){var ct=it.cursorCoords(at.head,"div").top+5;return it.coordsChar({left:it.display.lineDiv.offsetWidth+100,top:ct},"div")},Cn)},goLineLeft:function(it){return it.extendSelectionsBy(function(at){var ct=it.cursorCoords(at.head,"div").top+5;return it.coordsChar({left:0,top:ct},"div")},Cn)},goLineLeftSmart:function(it){return it.extendSelectionsBy(function(at){var ct=it.cursorCoords(at.head,"div").top+5,dt=it.coordsChar({left:0,top:ct},"div");return dt.ch<it.getLine(dt.line).search(/\S/)?rc(it,at.head):dt},Cn)},goLineUp:function(it){return it.moveV(-1,"line")},goLineDown:function(it){return it.moveV(1,"line")},goPageUp:function(it){return it.moveV(-1,"page")},goPageDown:function(it){return it.moveV(1,"page")},goCharLeft:function(it){return it.moveH(-1,"char")},goCharRight:function(it){return it.moveH(1,"char")},goColumnLeft:function(it){return it.moveH(-1,"column")},goColumnRight:function(it){return it.moveH(1,"column")},goWordLeft:function(it){return it.moveH(-1,"word")},goGroupRight:function(it){return it.moveH(1,"group")},goGroupLeft:function(it){return it.moveH(-1,"group")},goWordRight:function(it){return it.moveH(1,"word")},delCharBefore:function(it){return it.deleteH(-1,"codepoint")},delCharAfter:function(it){return it.deleteH(1,"char")},delWordBefore:function(it){return it.deleteH(-1,"word")},delWordAfter:function(it){return it.deleteH(1,"word")},delGroupBefore:function(it){return it.deleteH(-1,"group")},delGroupAfter:function(it){return it.deleteH(1,"group")},indentAuto:function(it){return it.indentSelection("smart")},indentMore:function(it){return it.indentSelection("add")},indentLess:function(it){return it.indentSelection("subtract")},insertTab:function(it){return it.replaceSelection(" ")},insertSoftTab:function(it){for(var at=[],ct=it.listSelections(),dt=it.options.tabSize,mt=0;mt<ct.length;mt++){var At=ct[mt].from(),Ot=qt(it.getLine(At.line),At.ch,dt);at.push(zn(dt-Ot%dt))}it.replaceSelections(at)},defaultTab:function(it){it.somethingSelected()?it.indentSelection("add"):it.execCommand("insertTab")},transposeChars:function(it){return xo(it,function(){for(var at=it.listSelections(),ct=[],dt=0;dt<at.length;dt++)if(at[dt].empty()){var mt=at[dt].head,At=Dn(it.doc,mt.line).text;if(At){if(mt.ch==At.length&&(mt=new bn(mt.line,mt.ch-1)),mt.ch>0)mt=new bn(mt.line,mt.ch+1),it.replaceRange(At.charAt(mt.ch-1)+At.charAt(mt.ch-2),bn(mt.line,mt.ch-2),mt,"+transpose");else if(mt.line>it.doc.first){var Ot=Dn(it.doc,mt.line-1).text;Ot&&(mt=new bn(mt.line,1),it.replaceRange(At.charAt(0)+it.doc.lineSeparator()+Ot.charAt(Ot.length-1),bn(mt.line-1,Ot.length-1),mt,"+transpose"))}}ct.push(new Ao(mt,mt))}it.setSelections(ct)})},newlineAndIndent:function(it){return xo(it,function(){for(var at=it.listSelections(),ct=at.length-1;ct>=0;ct--)it.replaceRange(it.doc.lineSeparator(),at[ct].anchor,at[ct].head,"+input");at=it.listSelections();for(var dt=0;dt<at.length;dt++)it.indentLine(at[dt].from().line,null,!0);ju(it)})},openLine:function(it){return it.replaceSelection(`
`,"start")},toggleOverwrite:function(it){return it.toggleOverwrite()}};function dd(it,at){var ct=Dn(it.doc,at),dt=In(ct);return dt!=ct&&(at=pe(dt)),ou(!0,it,dt,at,1)}function cd(it,at){var ct=Dn(it.doc,at),dt=si(ct);return dt!=ct&&(at=pe(dt)),ou(!0,it,ct,at,-1)}function rc(it,at){var ct=dd(it,at.line),dt=Dn(it.doc,ct.line),mt=Yt(dt,it.doc.direction);if(!mt||mt[0].level==0){var At=Math.max(ct.ch,dt.text.search(/\S/)),Ot=at.line==ct.line&&at.ch<=At&&at.ch;return bn(ct.line,Ot?0:At,ct.sticky)}return ct}function fd(it,at,ct){if(typeof at=="string"&&(at=_u[at],!at))return!1;it.display.input.ensurePolled();var dt=it.display.shift,mt=!1;try{it.isReadOnly()&&(it.state.suppressEdits=!0),ct&&(it.display.shift=!1),mt=at(it)!=cn}finally{it.display.shift=dt,it.state.suppressEdits=!1}return mt}function Yf(it,at,ct){for(var dt=0;dt<it.state.keyMaps.length;dt++){var mt=Qs(at,it.state.keyMaps[dt],ct,it);if(mt)return mt}return it.options.extraKeys&&Qs(at,it.options.extraKeys,ct,it)||Qs(at,it.options.keyMap,ct,it)}var au=new Jt;function Ah(it,at,ct,dt){var mt=it.state.keySeq;if(mt){if(bu(at))return"handled";if(/\'$/.test(at)?it.state.keySeq=null:au.set(50,function(){it.state.keySeq==mt&&(it.state.keySeq=null,it.display.input.reset())}),uf(it,mt+" "+at,ct,dt))return!0}return uf(it,at,ct,dt)}function uf(it,at,ct,dt){var mt=Yf(it,at,dt);return mt=="multi"&&(it.state.keySeq=at),mt=="handled"&&Di(it,"keyHandled",it,at,ct),(mt=="handled"||mt=="multi")&&(Vi(ct),Eo(it)),!!mt}function hf(it,at){var ct=Kf(at,!0);return ct?at.shiftKey&&!it.state.keySeq?Ah(it,"Shift-"+ct,at,function(dt){return fd(it,dt,!0)})||Ah(it,ct,at,function(dt){if(typeof dt=="string"?/^go[A-Z]/.test(dt):dt.motion)return fd(it,dt)}):Ah(it,ct,at,function(dt){return fd(it,dt)}):!1}function df(it,at,ct){return Ah(it,"'"+ct+"'",at,function(dt){return fd(it,dt,!0)})}var Ju=null;function Xf(it){var at=this;if(!(it.target&&it.target!=at.display.input.getField())&&(at.curOp.focus=ue(),!ii(at,it))){Pe&&Ae<11&&it.keyCode==27&&(it.returnValue=!1);var ct=it.keyCode;at.display.shift=ct==16||it.shiftKey;var dt=hf(at,it);de&&(Ju=dt?ct:null,!dt&&ct==88&&!zi&&(ht?it.metaKey:it.ctrlKey)&&at.replaceSelection("",null,"cut")),pt&&!ht&&!dt&&ct==46&&it.shiftKey&&!it.ctrlKey&&document.execCommand&&document.execCommand("cut"),ct==18&&!/\bCodeMirror-crosshair\b/.test(at.display.lineDiv.className)&&_f(at)}}function _f(it){var at=it.display.lineDiv;Ee(at,"CodeMirror-crosshair");function ct(dt){(dt.keyCode==18||!dt.altKey)&&(Xt(at,"CodeMirror-crosshair"),ni(document,"keyup",ct),ni(document,"mouseover",ct))}xe(document,"keyup",ct),xe(document,"mouseover",ct)}function Jf(it){it.keyCode==16&&(this.doc.sel.shift=!1),ii(this,it)}function Hl(it){var at=this;if(!(it.target&&it.target!=at.display.input.getField())&&!(Ko(at.display,it)||ii(at,it)||it.ctrlKey&&!it.altKey||ht&&it.metaKey)){var ct=it.keyCode,dt=it.charCode;if(de&&ct==Ju){Ju=null,Vi(it);return}if(!(de&&(!it.which||it.which<10)&&hf(at,it))){var mt=String.fromCharCode(dt==null?ct:dt);mt!="\b"&&(df(at,it,mt)||at.display.input.onKeyPress(it))}}}var Qf=400,qf=function(it,at,ct){this.time=it,this.pos=at,this.button=ct};qf.prototype.compare=function(it,at,ct){return this.time+Qf>it&&Mn(at,this.pos)==0&&ct==this.button};var gd,Fh;function $f(it,at){var ct=+new Date;return Fh&&Fh.compare(ct,it,at)?(gd=Fh=null,"triple"):gd&&gd.compare(ct,it,at)?(Fh=new qf(ct,it,at),gd=null,"double"):(gd=new qf(ct,it,at),Fh=null,"single")}function Wl(it){var at=this,ct=at.display;if(!(ii(at,it)||ct.activeTouch&&ct.input.supportsTouch())){if(ct.input.ensurePolled(),ct.shift=it.shiftKey,Ko(ct,it)){ee||(ct.scroller.draggable=!1,setTimeout(function(){return ct.scroller.draggable=!0},100));return}if(!cf(at,it)){var dt=Ka(at,it),mt=or(it),At=dt?$f(dt,mt):"single";window.focus(),mt==1&&at.state.selectingText&&at.state.selectingText(it),!(dt&&tg(at,mt,dt,At,it))&&(mt==1?dt?eg(at,dt,At,it):kr(it)==ct.scroller&&Vi(it):mt==2?(dt&&Qc(at.doc,dt),setTimeout(function(){return ct.input.focus()},20)):mt==3&&(Dt?at.display.input.onContextMenu(it):Jo(at)))}}}function tg(it,at,ct,dt,mt){var At="Click";return dt=="double"?At="Double"+At:dt=="triple"&&(At="Triple"+At),At=(at==1?"Left":at==2?"Middle":"Right")+At,Ah(it,sf(At,mt),mt,function(Ot){if(typeof Ot=="string"&&(Ot=_u[Ot]),!Ot)return!1;var Ut=!1;try{it.isReadOnly()&&(it.state.suppressEdits=!0),Ut=Ot(it,ct)!=cn}finally{it.state.suppressEdits=!1}return Ut})}function Bh(it,at,ct){var dt=it.getOption("configureMouse"),mt=dt?dt(it,at,ct):{};if(mt.unit==null){var At=lt?ct.shiftKey&&ct.metaKey:ct.altKey;mt.unit=At?"rectangle":at=="single"?"char":at=="double"?"word":"line"}return(mt.extend==null||it.doc.extend)&&(mt.extend=it.doc.extend||ct.shiftKey),mt.addNew==null&&(mt.addNew=ht?ct.metaKey:ct.ctrlKey),mt.moveOnDrag==null&&(mt.moveOnDrag=!(ht?ct.altKey:ct.ctrlKey)),mt}function eg(it,at,ct,dt){Pe?setTimeout(nn(zo,it),0):it.curOp.focus=ue();var mt=Bh(it,ct,dt),At=it.doc.sel,Ot;it.options.dragDrop&&_i&&!it.isReadOnly()&&ct=="single"&&(Ot=At.contains(at))>-1&&(Mn((Ot=At.ranges[Ot]).from(),at)<0||at.xRel>0)&&(Mn(Ot.to(),at)>0||at.xRel<0)?ng(it,dt,at,mt):Hp(it,dt,at,mt)}function ng(it,at,ct,dt){var mt=it.display,At=!1,Ot=Ba(it,function(oe){ee&&(mt.scroller.draggable=!1),it.state.draggingText=!1,ni(mt.wrapper.ownerDocument,"mouseup",Ot),ni(mt.wrapper.ownerDocument,"mousemove",Ut),ni(mt.scroller,"dragstart",Wt),ni(mt.scroller,"drop",Ot),At||(Vi(oe),dt.addNew||Qc(it.doc,ct,null,null,dt.extend),ee&&!he||Pe&&Ae==9?setTimeout(function(){mt.wrapper.ownerDocument.body.focus({preventScroll:!0}),mt.input.focus()},20):mt.input.focus())}),Ut=function(oe){At=At||Math.abs(at.clientX-oe.clientX)+Math.abs(at.clientY-oe.clientY)>=10},Wt=function(){return At=!0};ee&&(mt.scroller.draggable=!0),it.state.draggingText=Ot,Ot.copy=!dt.moveOnDrag,mt.scroller.dragDrop&&mt.scroller.dragDrop(),xe(mt.wrapper.ownerDocument,"mouseup",Ot),xe(mt.wrapper.ownerDocument,"mousemove",Ut),xe(mt.scroller,"dragstart",Wt),xe(mt.scroller,"drop",Ot),Jo(it),setTimeout(function(){return mt.input.focus()},20)}function ig(it,at,ct){if(ct=="char")return new Ao(at,at);if(ct=="word")return it.findWordAt(at);if(ct=="line")return new Ao(bn(at.line,0),Mi(it.doc,bn(at.line+1,0)));var dt=ct(it,at);return new Ao(dt.from,dt.to)}function Hp(it,at,ct,dt){var mt=it.display,At=it.doc;Vi(at);var Ot,Ut,Wt=At.sel,oe=Wt.ranges;if(dt.addNew&&!dt.extend?(Ut=At.sel.contains(ct),Ut>-1?Ot=oe[Ut]:Ot=new Ao(ct,ct)):(Ot=At.sel.primary(),Ut=At.sel.primIndex),dt.unit=="rectangle")dt.addNew||(Ot=new Ao(ct,ct)),ct=Ka(it,at,!0,!0),Ut=-1;else{var Ve=ig(it,ct,dt.unit);dt.extend?Ot=Jc(Ot,Ve.anchor,Ve.head,dt.extend):Ot=Ve}dt.addNew?Ut==-1?(Ut=oe.length,Za(At,sl(it,oe.concat([Ot]),Ut),{scroll:!1,origin:"*mouse"})):oe.length>1&&oe[Ut].empty()&&dt.unit=="char"&&!dt.extend?(Za(At,sl(it,oe.slice(0,Ut).concat(oe.slice(Ut+1)),0),{scroll:!1,origin:"*mouse"}),Wt=At.sel):ul(At,Ut,Ot,en):(Ut=0,Za(At,new _s([Ot],0),en),Wt=At.sel);var fe=ct;function dn(Ki){if(Mn(fe,Ki)!=0)if(fe=Ki,dt.unit=="rectangle"){for(var lr=[],Rr=it.options.tabSize,Zi=qt(Dn(At,ct.line).text,ct.ch,Rr),Jr=qt(Dn(At,Ki.line).text,Ki.ch,Rr),Wo=Math.min(Zi,Jr),Da=Math.max(Zi,Jr),$o=Math.min(ct.line,Ki.line),As=Math.min(it.lastLine(),Math.max(ct.line,Ki.line));$o<=As;$o++){var ts=Dn(At,$o).text,Ea=Gn(ts,Wo,Rr);Wo==Da?lr.push(new Ao(bn($o,Ea),bn($o,Ea))):ts.length>Ea&&lr.push(new Ao(bn($o,Ea),bn($o,Gn(ts,Da,Rr))))}lr.length||lr.push(new Ao(ct,ct)),Za(At,sl(it,Wt.ranges.slice(0,Ut).concat(lr),Ut),{origin:"*mouse",scroll:!1}),it.scrollIntoView(Ki)}else{var Fs=Ot,Ya=ig(it,Ki,dt.unit),ba=Fs.anchor,fo;Mn(Ya.anchor,ba)>0?(fo=Ya.head,ba=Si(Fs.from(),Ya.anchor)):(fo=Ya.anchor,ba=Li(Fs.to(),Ya.head));var ta=Wt.ranges.slice(0);ta[Ut]=_g(it,new Ao(Mi(At,ba),fo)),Za(At,sl(it,ta,Ut),en)}}var on=mt.wrapper.getBoundingClientRect(),ai=0;function ci(Ki){var lr=++ai,Rr=Ka(it,Ki,!0,dt.unit=="rectangle");if(Rr)if(Mn(Rr,fe)!=0){it.curOp.focus=ue(),dn(Rr);var Zi=qr(mt,At);(Rr.line>=Zi.to||Rr.line<Zi.from)&&setTimeout(Ba(it,function(){ai==lr&&ci(Ki)}),150)}else{var Jr=Ki.clientY<on.top?-20:Ki.clientY>on.bottom?20:0;Jr&&setTimeout(Ba(it,function(){ai==lr&&(mt.scroller.scrollTop+=Jr,ci(Ki))}),50)}}function xi(Ki){it.state.selectingText=!1,ai=1/0,Ki&&(Vi(Ki),mt.input.focus()),ni(mt.wrapper.ownerDocument,"mousemove",Ri),ni(mt.wrapper.ownerDocument,"mouseup",rr),At.history.lastSelOrigin=null}var Ri=Ba(it,function(Ki){Ki.buttons===0||!or(Ki)?xi(Ki):ci(Ki)}),rr=Ba(it,xi);it.state.selectingText=rr,xe(mt.wrapper.ownerDocument,"mousemove",Ri),xe(mt.wrapper.ownerDocument,"mouseup",rr)}function _g(it,at){var ct=at.anchor,dt=at.head,mt=Dn(it.doc,ct.line);if(Mn(ct,dt)==0&&ct.sticky==dt.sticky)return at;var At=Yt(mt);if(!At)return at;var Ot=Pt(At,ct.ch,ct.sticky),Ut=At[Ot];if(Ut.from!=ct.ch&&Ut.to!=ct.ch)return at;var Wt=Ot+(Ut.from==ct.ch==(Ut.level!=1)?0:1);if(Wt==0||Wt==At.length)return at;var oe;if(dt.line!=ct.line)oe=(dt.line-ct.line)*(it.doc.direction=="ltr"?1:-1)>0;else{var Ve=Pt(At,dt.ch,dt.sticky),fe=Ve-Ot||(dt.ch-ct.ch)*(Ut.level==1?-1:1);Ve==Wt-1||Ve==Wt?oe=fe<0:oe=fe>0}var dn=At[Wt+(oe?-1:0)],on=oe==(dn.level==1),ai=on?dn.from:dn.to,ci=on?"after":"before";return ct.ch==ai&&ct.sticky==ci?at:new Ao(new bn(ct.line,ai,ci),dt)}function Qu(it,at,ct,dt){var mt,At;if(at.touches)mt=at.touches[0].clientX,At=at.touches[0].clientY;else try{mt=at.clientX,At=at.clientY}catch(dn){return!1}if(mt>=Math.floor(it.display.gutters.getBoundingClientRect().right))return!1;dt&&Vi(at);var Ot=it.display,Ut=Ot.lineDiv.getBoundingClientRect();if(At>Ut.bottom||!hi(it,ct))return nr(at);At-=Ut.top-Ot.viewOffset;for(var Wt=0;Wt<it.display.gutterSpecs.length;++Wt){var oe=Ot.gutters.childNodes[Wt];if(oe&&oe.getBoundingClientRect().right>=mt){var Ve=Tn(it.doc,At),fe=it.display.gutterSpecs[Wt];return ei(it,ct,it,Ve,fe.className,at),nr(at)}}}function cf(it,at){return Qu(it,at,"gutterClick",!0)}function oc(it,at){Ko(it.display,at)||Jg(it,at)||ii(it,at,"contextmenu")||Dt||it.display.input.onContextMenu(at)}function Jg(it,at){return hi(it,"gutterContextMenu")?Qu(it,at,"gutterContextMenu",!1):!1}function ff(it){it.display.wrapper.className=it.display.wrapper.className.replace(/\s*cm-s-\S+/g,"")+it.options.theme.replace(/(^|\s)\s*/g," cm-s-"),qh(it)}var kh={toString:function(){return"CodeMirror.Init"}},rg={},Nh={};function Qg(it){var at=it.optionHandlers;function ct(dt,mt,At,Ot){it.defaults[dt]=mt,At&&(at[dt]=Ot?function(Ut,Wt,oe){oe!=kh&&At(Ut,Wt,oe)}:At)}it.defineOption=ct,it.Init=kh,ct("value","",function(dt,mt){return dt.setValue(mt)},!0),ct("mode",null,function(dt,mt){dt.doc.modeOption=mt,Yr(dt)},!0),ct("indentUnit",2,Yr,!0),ct("indentWithTabs",!1),ct("smartIndent",!0),ct("tabSize",4,function(dt){Sh(dt),qh(dt),jo(dt)},!0),ct("lineSeparator",null,function(dt,mt){if(dt.doc.lineSep=mt,!!mt){var At=[],Ot=dt.doc.first;dt.doc.iter(function(Wt){for(var oe=0;;){var Ve=Wt.text.indexOf(mt,oe);if(Ve==-1)break;oe=Ve+mt.length,At.push(bn(Ot,Ve))}Ot++});for(var Ut=At.length-1;Ut>=0;Ut--)jl(dt.doc,mt,At[Ut],bn(At[Ut].line,At[Ut].ch+mt.length))}}),ct("specialChars",/[\u0000-\u001f\u007f-\u009f\u00ad\u061c\u200b-\u200c\u200e\u200f\u2028\u2029\ufeff\ufff9-\ufffc]/g,function(dt,mt,At){dt.state.specialChars=new RegExp(mt.source+(mt.test(" ")?"":"| "),"g"),At!=kh&&dt.refresh()}),ct("specialCharPlaceholder",Go,function(dt){return dt.refresh()},!0),ct("electricChars",!0),ct("inputStyle",et?"contenteditable":"textarea",function(){throw new Error("inputStyle can not (yet) be changed in a running editor")},!0),ct("spellcheck",!1,function(dt,mt){return dt.getInputField().spellcheck=mt},!0),ct("autocorrect",!1,function(dt,mt){return dt.getInputField().autocorrect=mt},!0),ct("autocapitalize",!1,function(dt,mt){return dt.getInputField().autocapitalize=mt},!0),ct("rtlMoveVisually",!gt),ct("wholeLineUpdateBefore",!0),ct("theme","default",function(dt){ff(dt),bs(dt)},!0),ct("keyMap","default",function(dt,mt,At){var Ot=Mh(mt),Ut=At!=kh&&Mh(At);Ut&&Ut.detach&&Ut.detach(dt,Ot),Ot.attach&&Ot.attach(dt,Ut||null)}),ct("extraKeys",null),ct("configureMouse",null),ct("lineWrapping",!1,qg,!0),ct("gutters",[],function(dt,mt){dt.display.gutterSpecs=za(mt,dt.options.lineNumbers),bs(dt)},!0),ct("fixedGutter",!0,function(dt,mt){dt.display.gutters.style.left=mt?Hd(dt.display)+"px":"0",dt.refresh()},!0),ct("coverGutterNextToScrollbar",!1,function(dt){return tu(dt)},!0),ct("scrollbarStyle","native",function(dt){Wc(dt),tu(dt),dt.display.scrollbars.setScrollTop(dt.doc.scrollTop),dt.display.scrollbars.setScrollLeft(dt.doc.scrollLeft)},!0),ct("lineNumbers",!1,function(dt,mt){dt.display.gutterSpecs=za(dt.options.gutters,mt),bs(dt)},!0),ct("firstLineNumber",1,bs,!0),ct("lineNumberFormatter",function(dt){return dt},bs,!0),ct("showCursorWhenSelecting",!1,Fa,!0),ct("resetSelectionOnContextMenu",!0),ct("lineWiseCopyCut",!0),ct("pasteLinesPerSelection",!0),ct("selectionsMayTouch",!1),ct("readOnly",!1,function(dt,mt){mt=="nocursor"&&(ph(dt),dt.display.input.blur()),dt.display.input.readOnlyChanged(mt)}),ct("screenReaderLabel",null,function(dt,mt){mt=mt===""?null:mt,dt.display.input.screenReaderLabelChanged(mt)}),ct("disableInput",!1,function(dt,mt){mt||dt.display.input.reset()},!0),ct("dragDrop",!0,gf),ct("allowDropFileTypes",null),ct("cursorBlinkRate",530),ct("cursorScrollMargin",0),ct("cursorHeight",1,Fa,!0),ct("singleCursorHeightPerLine",!0,Fa,!0),ct("workTime",100),ct("workDelay",100),ct("flattenSpans",!0,Sh,!0),ct("addModeClass",!1,Sh,!0),ct("pollInterval",100),ct("undoDepth",200,function(dt,mt){return dt.doc.history.undoDepth=mt}),ct("historyEventDelay",1250),ct("viewportMargin",10,function(dt){return dt.refresh()},!0),ct("maxHighlightLength",1e4,Sh,!0),ct("moveInputWithCursor",!0,function(dt,mt){mt||dt.display.input.resetPosition()}),ct("tabindex",null,function(dt,mt){return dt.display.input.getField().tabIndex=mt||""}),ct("autofocus",null),ct("direction","ltr",function(dt,mt){return dt.doc.setDirection(mt)},!0),ct("phrases",null)}function gf(it,at,ct){var dt=ct&&ct!=kh;if(!at!=!dt){var mt=it.display.dragFunctions,At=at?xe:ni;At(it.display.scroller,"dragstart",mt.start),At(it.display.scroller,"dragenter",mt.enter),At(it.display.scroller,"dragover",mt.over),At(it.display.scroller,"dragleave",mt.leave),At(it.display.scroller,"drop",mt.drop)}}function qg(it){it.options.lineWrapping?(Ee(it.display.wrapper,"CodeMirror-wrap"),it.display.sizer.style.minWidth="",it.display.sizerWidth=null):(Xt(it.display.wrapper,"CodeMirror-wrap"),Yi(it)),xr(it),jo(it),qh(it),setTimeout(function(){return tu(it)},100)}function co(it,at){var ct=this;if(!(this instanceof co))return new co(it,at);this.options=at=at?_e(at):{},_e(rg,at,!1);var dt=at.value;typeof dt=="string"?dt=new Sa(dt,at.mode,null,at.lineSeparator,at.direction):at.mode&&(dt.modeOption=at.mode),this.doc=dt;var mt=new co.inputStyles[at.inputStyle](this),At=this.display=new Ku(it,dt,mt,at);At.wrapper.CodeMirror=this,ff(this),at.lineWrapping&&(this.display.wrapper.className+=" CodeMirror-wrap"),Wc(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 Jt,keySeq:null,specialChars:null},at.autofocus&&!et&&At.input.focus(),Pe&&Ae<11&&setTimeout(function(){return ct.display.input.reset(!0)},20),pd(this),Js(),zu(this),this.curOp.forceUpdate=!0,Zc(this,dt),at.autofocus&&!et||this.hasFocus()?setTimeout(function(){ct.hasFocus()&&!ct.state.focused&&so(ct)},20):ph(this);for(var Ot in Nh)Nh.hasOwnProperty(Ot)&&Nh[Ot](this,at[Ot],kh);ya(this),at.finishInit&&at.finishInit(this);for(var Ut=0;Ut<qu.length;++Ut)qu[Ut](this);Gu(this),ee&&at.lineWrapping&&getComputedStyle(At.lineDiv).textRendering=="optimizelegibility"&&(At.lineDiv.style.textRendering="auto")}co.defaults=rg,co.optionHandlers=Nh;function pd(it){var at=it.display;xe(at.scroller,"mousedown",Ba(it,Wl)),Pe&&Ae<11?xe(at.scroller,"dblclick",Ba(it,function(Wt){if(!ii(it,Wt)){var oe=Ka(it,Wt);if(!(!oe||cf(it,Wt)||Ko(it.display,Wt))){Vi(Wt);var Ve=it.findWordAt(oe);Qc(it.doc,Ve.anchor,Ve.head)}}})):xe(at.scroller,"dblclick",function(Wt){return ii(it,Wt)||Vi(Wt)}),xe(at.scroller,"contextmenu",function(Wt){return oc(it,Wt)}),xe(at.input.getField(),"contextmenu",function(Wt){at.scroller.contains(Wt.target)||oc(it,Wt)});var ct,dt={end:0};function mt(){at.activeTouch&&(ct=setTimeout(function(){return at.activeTouch=null},1e3),dt=at.activeTouch,dt.end=+new Date)}function At(Wt){if(Wt.touches.length!=1)return!1;var oe=Wt.touches[0];return oe.radiusX<=1&&oe.radiusY<=1}function Ot(Wt,oe){if(oe.left==null)return!0;var Ve=oe.left-Wt.left,fe=oe.top-Wt.top;return Ve*Ve+fe*fe>20*20}xe(at.scroller,"touchstart",function(Wt){if(!ii(it,Wt)&&!At(Wt)&&!cf(it,Wt)){at.input.ensurePolled(),clearTimeout(ct);var oe=+new Date;at.activeTouch={start:oe,moved:!1,prev:oe-dt.end<=300?dt:null},Wt.touches.length==1&&(at.activeTouch.left=Wt.touches[0].pageX,at.activeTouch.top=Wt.touches[0].pageY)}}),xe(at.scroller,"touchmove",function(){at.activeTouch&&(at.activeTouch.moved=!0)}),xe(at.scroller,"touchend",function(Wt){var oe=at.activeTouch;if(oe&&!Ko(at,Wt)&&oe.left!=null&&!oe.moved&&new Date-oe.start<300){var Ve=it.coordsChar(at.activeTouch,"page"),fe;!oe.prev||Ot(oe,oe.prev)?fe=new Ao(Ve,Ve):!oe.prev.prev||Ot(oe,oe.prev.prev)?fe=it.findWordAt(Ve):fe=new Ao(bn(Ve.line,0),Mi(it.doc,bn(Ve.line+1,0))),it.setSelection(fe.anchor,fe.head),it.focus(),Vi(Wt)}mt()}),xe(at.scroller,"touchcancel",mt),xe(at.scroller,"scroll",function(){at.scroller.clientHeight&&(Ol(it,at.scroller.scrollTop),Gs(it,at.scroller.scrollLeft,!0),ei(it,"scroll",it))}),xe(at.scroller,"mousewheel",function(Wt){return Ga(it,Wt)}),xe(at.scroller,"DOMMouseScroll",function(Wt){return Ga(it,Wt)}),xe(at.wrapper,"scroll",function(){return at.wrapper.scrollTop=at.wrapper.scrollLeft=0}),at.dragFunctions={enter:function(Wt){ii(it,Wt)||sr(Wt)},over:function(Wt){ii(it,Wt)||(Yg(it,Wt),sr(Wt))},start:function(Wt){return Zg(it,Wt)},drop:Ba(it,ec),leave:function(Wt){ii(it,Wt)||Xg(it)}};var Ut=at.input.getField();xe(Ut,"keyup",function(Wt){return Jf.call(it,Wt)}),xe(Ut,"keydown",Ba(it,Xf)),xe(Ut,"keypress",Ba(it,Hl)),xe(Ut,"focus",function(Wt){return so(it,Wt)}),xe(Ut,"blur",function(Wt){return ph(it,Wt)})}var qu=[];co.defineInitHook=function(it){return qu.push(it)};function Na(it,at,ct,dt){var mt=it.doc,At;ct==null&&(ct="add"),ct=="smart"&&(mt.mode.indent?At=Or(it,at).state:ct="prev");var Ot=it.options.tabSize,Ut=Dn(mt,at),Wt=qt(Ut.text,null,Ot);Ut.stateAfter&&(Ut.stateAfter=null);var oe=Ut.text.match(/^\s*/)[0],Ve;if(!dt&&!/\S/.test(Ut.text))Ve=0,ct="not";else if(ct=="smart"&&(Ve=mt.mode.indent(At,Ut.text.slice(oe.length),Ut.text),Ve==cn||Ve>150)){if(!dt)return;ct="prev"}ct=="prev"?at>mt.first?Ve=qt(Dn(mt,at-1).text,null,Ot):Ve=0:ct=="add"?Ve=Wt+it.options.indentUnit:ct=="subtract"?Ve=Wt-it.options.indentUnit:typeof ct=="number"&&(Ve=Wt+ct),Ve=Math.max(0,Ve);var fe="",dn=0;if(it.options.indentWithTabs)for(var on=Math.floor(Ve/Ot);on;--on)dn+=Ot,fe+=" ";if(dn<Ve&&(fe+=zn(Ve-dn)),fe!=oe)return jl(mt,fe,bn(at,0),bn(at,oe.length),"+input"),Ut.stateAfter=null,!0;for(var ai=0;ai<mt.sel.ranges.length;ai++){var ci=mt.sel.ranges[ai];if(ci.head.line==at&&ci.head.ch<oe.length){var xi=bn(at,oe.length);ul(mt,ai,new Ao(xi,xi));break}}}var fs=null;function md(it){fs=it}function Dh(it,at,ct,dt,mt){var At=it.doc;it.display.shift=!1,dt||(dt=At.sel);var Ot=+new Date-200,Ut=mt=="paste"||it.state.pasteIncoming>Ot,Wt=Rn(at),oe=null;if(Ut&&dt.ranges.length>1)if(fs&&fs.text.join(`
`)==at){if(dt.ranges.length%fs.text.length==0){oe=[];for(var Ve=0;Ve<fs.text.length;Ve++)oe.push(At.splitLines(fs.text[Ve]))}}else Wt.length==dt.ranges.length&&it.options.pasteLinesPerSelection&&(oe=An(Wt,function(Ri){return[Ri]}));for(var fe=it.curOp.updateInput,dn=dt.ranges.length-1;dn>=0;dn--){var on=dt.ranges[dn],ai=on.from(),ci=on.to();on.empty()&&(ct&&ct>0?ai=bn(ai.line,ai.ch-ct):it.state.overwrite&&!Ut?ci=bn(ci.line,Math.min(Dn(At,ci.line).text.length,ci.ch+me(Wt).length)):Ut&&fs&&fs.lineWise&&fs.text.join(`
`)==Wt.join(`
`)&&(ai=ci=bn(ai.line,0)));var xi={from:ai,to:ci,text:oe?oe[dn%oe.length]:Wt,origin:mt||(Ut?"paste":it.state.cutIncoming>Ot?"cut":"+input")};Cl(it.doc,xi),Di(it,"inputRead",it,xi)}at&&!Ut&&ag(it,at),ju(it),it.curOp.updateInput<2&&(it.curOp.updateInput=fe),it.curOp.typing=!0,it.state.pasteIncoming=it.state.cutIncoming=-1}function og(it,at){var ct=it.clipboardData&&it.clipboardData.getData("Text");if(ct)return it.preventDefault(),!at.isReadOnly()&&!at.options.disableInput&&xo(at,function(){return Dh(at,ct,0,null,"paste")}),!0}function ag(it,at){if(!(!it.options.electricChars||!it.options.smartIndent))for(var ct=it.doc.sel,dt=ct.ranges.length-1;dt>=0;dt--){var mt=ct.ranges[dt];if(!(mt.head.ch>100||dt&&ct.ranges[dt-1].head.line==mt.head.line)){var At=it.getModeAt(mt.head),Ot=!1;if(At.electricChars){for(var Ut=0;Ut<At.electricChars.length;Ut++)if(at.indexOf(At.electricChars.charAt(Ut))>-1){Ot=Na(it,mt.head.line,"smart");break}}else At.electricInput&&At.electricInput.test(Dn(it.doc,mt.head.line).text.slice(0,mt.head.ch))&&(Ot=Na(it,mt.head.line,"smart"));Ot&&Di(it,"electricInput",it,mt.head.line)}}}function sg(it){for(var at=[],ct=[],dt=0;dt<it.doc.sel.ranges.length;dt++){var mt=it.doc.sel.ranges[dt].head.line,At={anchor:bn(mt,0),head:bn(mt+1,0)};ct.push(At),at.push(it.getRange(At.anchor,At.head))}return{text:at,ranges:ct}}function lg(it,at,ct,dt){it.setAttribute("autocorrect",ct?"":"off"),it.setAttribute("autocapitalize",dt?"":"off"),it.setAttribute("spellcheck",!!at)}function ug(){var it=ae("textarea",null,null,"position: absolute; bottom: -1em; padding: 0; width: 1px; height: 1em; outline: none"),at=ae("div",[it],null,"overflow: hidden; position: relative; width: 3px; height: 0px;");return ee?it.style.width="1000px":it.setAttribute("wrap","off"),kt&&(it.style.border="1px solid black"),lg(it),at}function $u(it){var at=it.optionHandlers,ct=it.helpers={};it.prototype={constructor:it,focus:function(){window.focus(),this.display.input.focus()},setOption:function(dt,mt){var At=this.options,Ot=At[dt];At[dt]==mt&&dt!="mode"||(At[dt]=mt,at.hasOwnProperty(dt)&&Ba(this,at[dt])(this,mt,Ot),ei(this,"optionChange",this,dt))},getOption:function(dt){return this.options[dt]},getDoc:function(){return this.doc},addKeyMap:function(dt,mt){this.state.keyMaps[mt?"push":"unshift"](Mh(dt))},removeKeyMap:function(dt){for(var mt=this.state.keyMaps,At=0;At<mt.length;++At)if(mt[At]==dt||mt[At].name==dt)return mt.splice(At,1),!0},addOverlay:Oa(function(dt,mt){var At=dt.token?dt:it.getMode(this.options,dt);if(At.startState)throw new Error("Overlays may not be stateful.");ui(this.state.overlays,{mode:At,modeSpec:dt,opaque:mt&&mt.opaque,priority:mt&&mt.priority||0},function(Ot){return Ot.priority}),this.state.modeGen++,jo(this)}),removeOverlay:Oa(function(dt){for(var mt=this.state.overlays,At=0;At<mt.length;++At){var Ot=mt[At].modeSpec;if(Ot==dt||typeof dt=="string"&&Ot.name==dt){mt.splice(At,1),this.state.modeGen++,jo(this);return}}}),indentLine:Oa(function(dt,mt,At){typeof mt!="string"&&typeof mt!="number"&&(mt==null?mt=this.options.smartIndent?"smart":"prev":mt=mt?"add":"subtract"),gi(this.doc,dt)&&Na(this,dt,mt,At)}),indentSelection:Oa(function(dt){for(var mt=this.doc.sel.ranges,At=-1,Ot=0;Ot<mt.length;Ot++){var Ut=mt[Ot];if(Ut.empty())Ut.head.line>At&&(Na(this,Ut.head.line,dt,!0),At=Ut.head.line,Ot==this.doc.sel.primIndex&&ju(this));else{var Wt=Ut.from(),oe=Ut.to(),Ve=Math.max(At,Wt.line);At=Math.min(this.lastLine(),oe.line-(oe.ch?0:1))+1;for(var fe=Ve;fe<At;++fe)Na(this,fe,dt);var dn=this.doc.sel.ranges;Wt.ch==0&&mt.length==dn.length&&dn[Ot].from().ch>0&&ul(this.doc,Ot,new Ao(Wt,dn[Ot].to()),Te)}}}),getTokenAt:function(dt,mt){return di(this,dt,mt)},getLineTokens:function(dt,mt){return di(this,bn(dt),mt,!0)},getTokenTypeAt:function(dt){dt=Mi(this.doc,dt);var mt=Qi(this,Dn(this.doc,dt.line)),At=0,Ot=(mt.length-1)/2,Ut=dt.ch,Wt;if(Ut==0)Wt=mt[2];else for(;;){var oe=At+Ot>>1;if((oe?mt[oe*2-1]:0)>=Ut)Ot=oe;else if(mt[oe*2+1]<Ut)At=oe+1;else{Wt=mt[oe*2+2];break}}var Ve=Wt?Wt.indexOf("overlay "):-1;return Ve<0?Wt:Ve==0?null:Wt.slice(0,Ve-1)},getModeAt:function(dt){var mt=this.doc.mode;return mt.innerMode?it.innerMode(mt,this.getTokenAt(dt).state).mode:mt},getHelper:function(dt,mt){return this.getHelpers(dt,mt)[0]},getHelpers:function(dt,mt){var At=[];if(!ct.hasOwnProperty(mt))return At;var Ot=ct[mt],Ut=this.getModeAt(dt);if(typeof Ut[mt]=="string")Ot[Ut[mt]]&&At.push(Ot[Ut[mt]]);else if(Ut[mt])for(var Wt=0;Wt<Ut[mt].length;Wt++){var oe=Ot[Ut[mt][Wt]];oe&&At.push(oe)}else Ut.helperType&&Ot[Ut.helperType]?At.push(Ot[Ut.helperType]):Ot[Ut.name]&&At.push(Ot[Ut.name]);for(var Ve=0;Ve<Ot._global.length;Ve++){var fe=Ot._global[Ve];fe.pred(Ut,this)&&De(At,fe.val)==-1&&At.push(fe.val)}return At},getStateAfter:function(dt,mt){var At=this.doc;return dt=wi(At,dt==null?At.first+At.size-1:dt),Or(this,dt+1,mt).state},cursorCoords:function(dt,mt){var At,Ot=this.doc.sel.primary();return dt==null?At=Ot.head:typeof dt=="object"?At=Mi(this.doc,dt):At=dt?Ot.from():Ot.to(),Zo(this,At,mt||"page")},charCoords:function(dt,mt){return $h(this,Mi(this.doc,dt),mt||"page")},coordsChar:function(dt,mt){return dt=Rc(this,dt,mt||"page"),Iu(this,dt.left,dt.top)},lineAtHeight:function(dt,mt){return dt=Rc(this,{top:dt,left:0},mt||"page").top,Tn(this.doc,dt+this.display.viewOffset)},heightAtLine:function(dt,mt,At){var Ot=!1,Ut;if(typeof dt=="number"){var Wt=this.doc.first+this.doc.size-1;dt<this.doc.first?dt=this.doc.first:dt>Wt&&(dt=Wt,Ot=!0),Ut=Dn(this.doc,dt)}else Ut=dt;return Ua(this,Ut,{top:0,left:0},mt||"page",At||Ot).top+(Ot?this.doc.height-bi(Ut):0)},defaultTextHeight:function(){return ol(this.display)},defaultCharWidth:function(){return Il(this.display)},getViewport:function(){return{from:this.display.viewFrom,to:this.display.viewTo}},addWidget:function(dt,mt,At,Ot,Ut){var Wt=this.display;dt=Zo(this,Mi(this.doc,dt));var oe=dt.bottom,Ve=dt.left;if(mt.style.position="absolute",mt.setAttribute("cm-ignore-events","true"),this.display.input.setUneditable(mt),Wt.sizer.appendChild(mt),Ot=="over")oe=dt.top;else if(Ot=="above"||Ot=="near"){var fe=Math.max(Wt.wrapper.clientHeight,this.doc.height),dn=Math.max(Wt.sizer.clientWidth,Wt.lineSpace.clientWidth);(Ot=="above"||dt.bottom+mt.offsetHeight>fe)&&dt.top>mt.offsetHeight?oe=dt.top-mt.offsetHeight:dt.bottom+mt.offsetHeight<=fe&&(oe=dt.bottom),Ve+mt.offsetWidth>dn&&(Ve=dn-mt.offsetWidth)}mt.style.top=oe+"px",mt.style.left=mt.style.right="",Ut=="right"?(Ve=Wt.sizer.clientWidth-mt.offsetWidth,mt.style.right="0px"):(Ut=="left"?Ve=0:Ut=="middle"&&(Ve=(Wt.sizer.clientWidth-mt.offsetWidth)/2),mt.style.left=Ve+"px"),At&&td(this,{left:Ve,top:oe,right:Ve+mt.offsetWidth,bottom:oe+mt.offsetHeight})},triggerOnKeyDown:Oa(Xf),triggerOnKeyPress:Oa(Hl),triggerOnKeyUp:Jf,triggerOnMouseDown:Oa(Wl),execCommand:function(dt){if(_u.hasOwnProperty(dt))return _u[dt].call(null,this)},triggerElectric:Oa(function(dt){ag(this,dt)}),findPosH:function(dt,mt,At,Ot){var Ut=1;mt<0&&(Ut=-1,mt=-mt);for(var Wt=Mi(this.doc,dt),oe=0;oe<mt&&(Wt=ac(this.doc,Wt,Ut,At,Ot),!Wt.hitSide);++oe);return Wt},moveH:Oa(function(dt,mt){var At=this;this.extendSelectionsBy(function(Ot){return At.display.shift||At.doc.extend||Ot.empty()?ac(At.doc,Ot.head,dt,mt,At.options.rtlMoveVisually):dt<0?Ot.from():Ot.to()},Cn)}),deleteH:Oa(function(dt,mt){var At=this.doc.sel,Ot=this.doc;At.somethingSelected()?Ot.replaceSelection("",null,"+delete"):Ms(this,function(Ut){var Wt=ac(Ot,Ut.head,dt,mt,!1);return dt<0?{from:Wt,to:Ut.head}:{from:Ut.head,to:Wt}})}),findPosV:function(dt,mt,At,Ot){var Ut=1,Wt=Ot;mt<0&&(Ut=-1,mt=-mt);for(var oe=Mi(this.doc,dt),Ve=0;Ve<mt;++Ve){var fe=Zo(this,oe,"div");if(Wt==null?Wt=fe.left:fe.left=Wt,oe=Lu(this,fe,Ut,At),oe.hitSide)break}return oe},moveV:Oa(function(dt,mt){var At=this,Ot=this.doc,Ut=[],Wt=!this.display.shift&&!Ot.extend&&Ot.sel.somethingSelected();if(Ot.extendSelectionsBy(function(Ve){if(Wt)return dt<0?Ve.from():Ve.to();var fe=Zo(At,Ve.head,"div");Ve.goalColumn!=null&&(fe.left=Ve.goalColumn),Ut.push(fe.left);var dn=Lu(At,fe,dt,mt);return mt=="page"&&Ve==Ot.sel.primary()&&Wd(At,$h(At,dn,"div").top-fe.top),dn},Cn),Ut.length)for(var oe=0;oe<Ot.sel.ranges.length;oe++)Ot.sel.ranges[oe].goalColumn=Ut[oe]}),findWordAt:function(dt){var mt=this.doc,At=Dn(mt,dt.line).text,Ot=dt.ch,Ut=dt.ch;if(At){var Wt=this.getHelper(dt,"wordChars");(dt.sticky=="before"||Ut==At.length)&&Ot?--Ot:++Ut;for(var oe=At.charAt(Ot),Ve=Ie(oe,Wt)?function(fe){return Ie(fe,Wt)}:/\s/.test(oe)?function(fe){return/\s/.test(fe)}:function(fe){return!/\s/.test(fe)&&!Ie(fe)};Ot>0&&Ve(At.charAt(Ot-1));)--Ot;for(;Ut<At.length&&Ve(At.charAt(Ut));)++Ut}return new Ao(bn(dt.line,Ot),bn(dt.line,Ut))},toggleOverwrite:function(dt){dt!=null&&dt==this.state.overwrite||((this.state.overwrite=!this.state.overwrite)?Ee(this.display.cursorDiv,"CodeMirror-overwrite"):Xt(this.display.cursorDiv,"CodeMirror-overwrite"),ei(this,"overwriteToggle",this,this.state.overwrite))},hasFocus:function(){return this.display.input.getField()==ue()},isReadOnly:function(){return!!(this.options.readOnly||this.doc.cantEdit)},scrollTo:Oa(function(dt,mt){mh(this,dt,mt)}),getScrollInfo:function(){var dt=this.display.scroller;return{left:dt.scrollLeft,top:dt.scrollTop,height:dt.scrollHeight-js(this)-this.display.barHeight,width:dt.scrollWidth-js(this)-this.display.barWidth,clientHeight:jd(this),clientWidth:Ps(this)}},scrollIntoView:Oa(function(dt,mt){dt==null?(dt={from:this.doc.sel.primary().head,to:null},mt==null&&(mt=this.options.cursorScrollMargin)):typeof dt=="number"?dt={from:bn(dt,0),to:null}:dt.from==null&&(dt={from:dt,to:null}),dt.to||(dt.to=dt.from),dt.margin=mt||0,dt.from.line!=null?lo(this,dt):ed(this,dt.from,dt.to,dt.margin)}),setSize:Oa(function(dt,mt){var At=this,Ot=function(Wt){return typeof Wt=="number"||/^\d+$/.test(String(Wt))?Wt+"px":Wt};dt!=null&&(this.display.wrapper.style.width=Ot(dt)),mt!=null&&(this.display.wrapper.style.height=Ot(mt)),this.options.lineWrapping&&Qh(this);var Ut=this.display.viewFrom;this.doc.iter(Ut,this.display.viewTo,function(Wt){if(Wt.widgets){for(var oe=0;oe<Wt.widgets.length;oe++)if(Wt.widgets[oe].noHScroll){Ur(At,Ut,"widget");break}}++Ut}),this.curOp.forceUpdate=!0,ei(this,"refresh",this)}),operation:function(dt){return xo(this,dt)},startOperation:function(){return zu(this)},endOperation:function(){return Gu(this)},refresh:Oa(function(){var dt=this.display.cachedTextHeight;jo(this),this.curOp.forceUpdate=!0,qh(this),mh(this,this.doc.scrollLeft,this.doc.scrollTop),Vu(this.display),(dt==null||Math.abs(dt-ol(this.display))>.5||this.options.lineWrapping)&&xr(this),ei(this,"refresh",this)}),swapDoc:Oa(function(dt){var mt=this.doc;return mt.cm=null,this.state.selectingText&&this.state.selectingText(),Zc(this,dt),qh(this),this.display.input.reset(),mh(this,dt.scrollLeft,dt.scrollTop),this.curOp.forceScroll=!0,Di(this,"swapDoc",this,mt),mt}),phrase:function(dt){var mt=this.options.phrases;return mt&&Object.prototype.hasOwnProperty.call(mt,dt)?mt[dt]:dt},getInputField:function(){return this.display.input.getField()},getWrapperElement:function(){return this.display.wrapper},getScrollerElement:function(){return this.display.scroller},getGutterElement:function(){return this.display.gutters}},Jn(it),it.registerHelper=function(dt,mt,At){ct.hasOwnProperty(dt)||(ct[dt]=it[dt]={_global:[]}),ct[dt][mt]=At},it.registerGlobalHelper=function(dt,mt,At,Ot){it.registerHelper(dt,mt,Ot),ct[dt]._global.push({pred:At,val:Ot})}}function ac(it,at,ct,dt,mt){var At=at,Ot=ct,Ut=Dn(it,at.line),Wt=mt&&it.direction=="rtl"?-ct:ct;function oe(){var rr=at.line+Wt;return rr<it.first||rr>=it.first+it.size?!1:(at=new bn(rr,at.ch,at.sticky),Ut=Dn(it,rr))}function Ve(rr){var Ki;if(dt=="codepoint"){var lr=Ut.text.charCodeAt(at.ch+(dt>0?0:-1));isNaN(lr)?Ki=null:Ki=new bn(at.line,Math.max(0,Math.min(Ut.text.length,at.ch+ct*(lr>=55296&&lr<56320?2:1))),-ct)}else mt?Ki=lf(it.cm,Ut,at,ct):Ki=fa(Ut,at,ct);if(Ki==null)if(!rr&&oe())at=ou(mt,it.cm,Ut,at.line,Wt);else return!1;else at=Ki;return!0}if(dt=="char"||dt=="codepoint")Ve();else if(dt=="column")Ve(!0);else if(dt=="word"||dt=="group")for(var fe=null,dn=dt=="group",on=it.cm&&it.cm.getHelper(at,"wordChars"),ai=!0;!(ct<0&&!Ve(!ai));ai=!1){var ci=Ut.text.charAt(at.ch)||`
`,xi=Ie(ci,on)?"w":dn&&ci==`
`?"n":!dn||/\s/.test(ci)?null:"p";if(dn&&!ai&&!xi&&(xi="s"),fe&&fe!=xi){ct<0&&(ct=1,Ve(),at.sticky="after");break}if(xi&&(fe=xi),ct>0&&!Ve(!ai))break}var Ri=bh(it,at,At,Ot,!0);return hn(At,Ri)&&(Ri.hitSide=!0),Ri}function Lu(it,at,ct,dt){var mt=it.doc,At=at.left,Ot;if(dt=="page"){var Ut=Math.min(it.display.wrapper.clientHeight,window.innerHeight||document.documentElement.clientHeight),Wt=Math.max(Ut-.5*ol(it.display),3);Ot=(ct>0?at.bottom:at.top)+ct*Wt}else dt=="line"&&(Ot=ct>0?at.bottom+3:at.top-3);for(var oe;oe=Iu(it,At,Ot),!!oe.outside;){if(ct<0?Ot<=0:Ot>=mt.height){oe.hitSide=!0;break}Ot+=ct*5}return oe}var bo=function(it){this.cm=it,this.lastAnchorNode=this.lastAnchorOffset=this.lastFocusNode=this.lastFocusOffset=null,this.polling=new Jt,this.composing=null,this.gracePeriod=!1,this.readDOMTimeout=null};bo.prototype.init=function(it){var at=this,ct=this,dt=ct.cm,mt=ct.div=it.lineDiv;lg(mt,dt.options.spellcheck,dt.options.autocorrect,dt.options.autocapitalize);function At(Ut){for(var Wt=Ut.target;Wt;Wt=Wt.parentNode){if(Wt==mt)return!0;if(/\bCodeMirror-(?:line)?widget\b/.test(Wt.className))break}return!1}xe(mt,"paste",function(Ut){!At(Ut)||ii(dt,Ut)||og(Ut,dt)||Ae<=11&&setTimeout(Ba(dt,function(){return at.updateFromDOM()}),20)}),xe(mt,"compositionstart",function(Ut){at.composing={data:Ut.data,done:!1}}),xe(mt,"compositionupdate",function(Ut){at.composing||(at.composing={data:Ut.data,done:!1})}),xe(mt,"compositionend",function(Ut){at.composing&&(Ut.data!=at.composing.data&&at.readFromDOMSoon(),at.composing.done=!0)}),xe(mt,"touchstart",function(){return ct.forceCompositionEnd()}),xe(mt,"input",function(){at.composing||at.readFromDOMSoon()});function Ot(Ut){if(!(!At(Ut)||ii(dt,Ut))){if(dt.somethingSelected())md({lineWise:!1,text:dt.getSelections()}),Ut.type=="cut"&&dt.replaceSelection("",null,"cut");else if(dt.options.lineWiseCopyCut){var Wt=sg(dt);md({lineWise:!0,text:Wt.text}),Ut.type=="cut"&&dt.operation(function(){dt.setSelections(Wt.ranges,0,Te),dt.replaceSelection("",null,"cut")})}else return;if(Ut.clipboardData){Ut.clipboardData.clearData();var oe=fs.text.join(`
`);if(Ut.clipboardData.setData("Text",oe),Ut.clipboardData.getData("Text")==oe){Ut.preventDefault();return}}var Ve=ug(),fe=Ve.firstChild;dt.display.lineSpace.insertBefore(Ve,dt.display.lineSpace.firstChild),fe.value=fs.text.join(`
`);var dn=document.activeElement;Ue(fe),setTimeout(function(){dt.display.lineSpace.removeChild(Ve),dn.focus(),dn==mt&&ct.showPrimarySelection()},50)}}xe(mt,"copy",Ot),xe(mt,"cut",Ot)},bo.prototype.screenReaderLabelChanged=function(it){it?this.div.setAttribute("aria-label",it):this.div.removeAttribute("aria-label")},bo.prototype.prepareSelection=function(){var it=Ou(this.cm,!1);return it.focus=document.activeElement==this.div,it},bo.prototype.showSelection=function(it,at){!it||!this.cm.display.view.length||((it.focus||at)&&this.showPrimarySelection(),this.showMultipleSelections(it))},bo.prototype.getSelection=function(){return this.cm.display.wrapper.ownerDocument.getSelection()},bo.prototype.showPrimarySelection=function(){var it=this.getSelection(),at=this.cm,ct=at.doc.sel.primary(),dt=ct.from(),mt=ct.to();if(at.display.viewTo==at.display.viewFrom||dt.line>=at.display.viewTo||mt.line<at.display.viewFrom){it.removeAllRanges();return}var At=sc(at,it.anchorNode,it.anchorOffset),Ot=sc(at,it.focusNode,it.focusOffset);if(!(At&&!At.bad&&Ot&&!Ot.bad&&Mn(Si(At,Ot),dt)==0&&Mn(Li(At,Ot),mt)==0)){var Ut=at.display.view,Wt=dt.line>=at.display.viewFrom&&Th(at,dt)||{node:Ut[0].measure.map[2],offset:0},oe=mt.line<at.display.viewTo&&Th(at,mt);if(!oe){var Ve=Ut[Ut.length-1].measure,fe=Ve.maps?Ve.maps[Ve.maps.length-1]:Ve.map;oe={node:fe[fe.length-1],offset:fe[fe.length-2]-fe[fe.length-3]}}if(!Wt||!oe){it.removeAllRanges();return}var dn=it.rangeCount&&it.getRangeAt(0),on;try{on=ne(Wt.node,Wt.offset,oe.offset,oe.node)}catch(ai){}on&&(!pt&&at.state.focused?(it.collapse(Wt.node,Wt.offset),on.collapsed||(it.removeAllRanges(),it.addRange(on))):(it.removeAllRanges(),it.addRange(on)),dn&&it.anchorNode==null?it.addRange(dn):pt&&this.startGracePeriod()),this.rememberSelection()}},bo.prototype.startGracePeriod=function(){var it=this;clearTimeout(this.gracePeriod),this.gracePeriod=setTimeout(function(){it.gracePeriod=!1,it.selectionChanged()&&it.cm.operation(function(){return it.cm.curOp.selectionChanged=!0})},20)},bo.prototype.showMultipleSelections=function(it){le(this.cm.display.cursorDiv,it.cursors),le(this.cm.display.selectionDiv,it.selection)},bo.prototype.rememberSelection=function(){var it=this.getSelection();this.lastAnchorNode=it.anchorNode,this.lastAnchorOffset=it.anchorOffset,this.lastFocusNode=it.focusNode,this.lastFocusOffset=it.focusOffset},bo.prototype.selectionInEditor=function(){var it=this.getSelection();if(!it.rangeCount)return!1;var at=it.getRangeAt(0).commonAncestorContainer;return Le(this.div,at)},bo.prototype.focus=function(){this.cm.options.readOnly!="nocursor"&&((!this.selectionInEditor()||document.activeElement!=this.div)&&this.showSelection(this.prepareSelection(),!0),this.div.focus())},bo.prototype.blur=function(){this.div.blur()},bo.prototype.getField=function(){return this.div},bo.prototype.supportsTouch=function(){return!0},bo.prototype.receivedFocus=function(){var it=this;this.selectionInEditor()?this.pollSelection():xo(this.cm,function(){return it.cm.curOp.selectionChanged=!0});function at(){it.cm.state.focused&&(it.pollSelection(),it.polling.set(it.cm.options.pollInterval,at))}this.polling.set(this.cm.options.pollInterval,at)},bo.prototype.selectionChanged=function(){var it=this.getSelection();return it.anchorNode!=this.lastAnchorNode||it.anchorOffset!=this.lastAnchorOffset||it.focusNode!=this.lastFocusNode||it.focusOffset!=this.lastFocusOffset},bo.prototype.pollSelection=function(){if(!(this.readDOMTimeout!=null||this.gracePeriod||!this.selectionChanged())){var it=this.getSelection(),at=this.cm;if(nt&&ye&&this.cm.display.gutterSpecs.length&&hg(it.anchorNode)){this.cm.triggerOnKeyDown({type:"keydown",keyCode:8,preventDefault:Math.abs}),this.blur(),this.focus();return}if(!this.composing){this.rememberSelection();var ct=sc(at,it.anchorNode,it.anchorOffset),dt=sc(at,it.focusNode,it.focusOffset);ct&&dt&&xo(at,function(){Za(at.doc,Eu(ct,dt),Te),(ct.bad||dt.bad)&&(at.curOp.selectionChanged=!0)})}}},bo.prototype.pollContent=function(){this.readDOMTimeout!=null&&(clearTimeout(this.readDOMTimeout),this.readDOMTimeout=null);var it=this.cm,at=it.display,ct=it.doc.sel.primary(),dt=ct.from(),mt=ct.to();if(dt.ch==0&&dt.line>it.firstLine()&&(dt=bn(dt.line-1,Dn(it.doc,dt.line-1).length)),mt.ch==Dn(it.doc,mt.line).text.length&&mt.line<it.lastLine()&&(mt=bn(mt.line+1,0)),dt.line<at.viewFrom||mt.line>at.viewTo-1)return!1;var At,Ot,Ut;dt.line==at.viewFrom||(At=ws(it,dt.line))==0?(Ot=pe(at.view[0].line),Ut=at.view[0].node):(Ot=pe(at.view[At].line),Ut=at.view[At-1].node.nextSibling);var Wt=ws(it,mt.line),oe,Ve;if(Wt==at.view.length-1?(oe=at.viewTo-1,Ve=at.lineDiv.lastChild):(oe=pe(at.view[Wt+1].line)-1,Ve=at.view[Wt+1].node.previousSibling),!Ut)return!1;for(var fe=it.doc.splitLines(Ih(it,Ut,Ve,Ot,oe)),dn=vi(it.doc,bn(Ot,0),bn(oe,Dn(it.doc,oe).text.length));fe.length>1&&dn.length>1;)if(me(fe)==me(dn))fe.pop(),dn.pop(),oe--;else if(fe[0]==dn[0])fe.shift(),dn.shift(),Ot++;else break;for(var on=0,ai=0,ci=fe[0],xi=dn[0],Ri=Math.min(ci.length,xi.length);on<Ri&&ci.charCodeAt(on)==xi.charCodeAt(on);)++on;for(var rr=me(fe),Ki=me(dn),lr=Math.min(rr.length-(fe.length==1?on:0),Ki.length-(dn.length==1?on:0));ai<lr&&rr.charCodeAt(rr.length-ai-1)==Ki.charCodeAt(Ki.length-ai-1);)++ai;if(fe.length==1&&dn.length==1&&Ot==dt.line)for(;on&&on>dt.ch&&rr.charCodeAt(rr.length-ai-1)==Ki.charCodeAt(Ki.length-ai-1);)on--,ai++;fe[fe.length-1]=rr.slice(0,rr.length-ai).replace(/^\u200b+/,""),fe[0]=fe[0].slice(on).replace(/\u200b+$/,"");var Rr=bn(Ot,on),Zi=bn(oe,dn.length?me(dn).length-ai:0);if(fe.length>1||fe[0]||Mn(Rr,Zi))return jl(it.doc,fe,Rr,Zi,"+input"),!0},bo.prototype.ensurePolled=function(){this.forceCompositionEnd()},bo.prototype.reset=function(){this.forceCompositionEnd()},bo.prototype.forceCompositionEnd=function(){this.composing&&(clearTimeout(this.readDOMTimeout),this.composing=null,this.updateFromDOM(),this.div.blur(),this.div.focus())},bo.prototype.readFromDOMSoon=function(){var it=this;this.readDOMTimeout==null&&(this.readDOMTimeout=setTimeout(function(){if(it.readDOMTimeout=null,it.composing)if(it.composing.done)it.composing=null;else return;it.updateFromDOM()},80))},bo.prototype.updateFromDOM=function(){var it=this;(this.cm.isReadOnly()||!this.pollContent())&&xo(this.cm,function(){return jo(it.cm)})},bo.prototype.setUneditable=function(it){it.contentEditable="false"},bo.prototype.onKeyPress=function(it){it.charCode==0||this.composing||(it.preventDefault(),this.cm.isReadOnly()||Ba(this.cm,Dh)(this.cm,String.fromCharCode(it.charCode==null?it.keyCode:it.charCode),0))},bo.prototype.readOnlyChanged=function(it){this.div.contentEditable=String(it!="nocursor")},bo.prototype.onContextMenu=function(){},bo.prototype.resetPosition=function(){},bo.prototype.needsContentAttribute=!0;function Th(it,at){var ct=Gd(it,at.line);if(!ct||ct.hidden)return null;var dt=Dn(it.doc,at.line),mt=zd(ct,dt,at.line),At=Yt(dt,it.doc.direction),Ot="left";if(At){var Ut=Pt(At,at.ch);Ot=Ut%2?"right":"left"}var Wt=ql(mt.map,at.ch,Ot);return Wt.offset=Wt.collapse=="right"?Wt.end:Wt.start,Wt}function hg(it){for(var at=it;at;at=at.parentNode)if(/CodeMirror-gutter-wrapper/.test(at.className))return!0;return!1}function th(it,at){return at&&(it.bad=!0),it}function Ih(it,at,ct,dt,mt){var At="",Ot=!1,Ut=it.doc.lineSeparator(),Wt=!1;function oe(on){return function(ai){return ai.id==on}}function Ve(){Ot&&(At+=Ut,Wt&&(At+=Ut),Ot=Wt=!1)}function fe(on){on&&(Ve(),At+=on)}function dn(on){if(on.nodeType==1){var ai=on.getAttribute("cm-text");if(ai){fe(ai);return}var ci=on.getAttribute("cm-marker"),xi;if(ci){var Ri=it.findMarks(bn(dt,0),bn(mt+1,0),oe(+ci));Ri.length&&(xi=Ri[0].find(0))&&fe(vi(it.doc,xi.from,xi.to).join(Ut));return}if(on.getAttribute("contenteditable")=="false")return;var rr=/^(pre|div|p|li|table|br)$/i.test(on.nodeName);if(!/^br$/i.test(on.nodeName)&&on.textContent.length==0)return;rr&&Ve();for(var Ki=0;Ki<on.childNodes.length;Ki++)dn(on.childNodes[Ki]);/^(pre|p)$/i.test(on.nodeName)&&(Wt=!0),rr&&(Ot=!0)}else on.nodeType==3&&fe(on.nodeValue.replace(/\u200b/g,"").replace(/\u00a0/g," "))}for(;dn(at),at!=ct;)at=at.nextSibling,Wt=!1;return At}function sc(it,at,ct){var dt;if(at==it.display.lineDiv){if(dt=it.display.lineDiv.childNodes[ct],!dt)return th(it.clipPos(bn(it.display.viewTo-1)),!0);at=null,ct=0}else for(dt=at;;dt=dt.parentNode){if(!dt||dt==it.display.lineDiv)return null;if(dt.parentNode&&dt.parentNode==it.display.lineDiv)break}for(var mt=0;mt<it.display.view.length;mt++){var At=it.display.view[mt];if(At.node==dt)return $g(At,at,ct)}}function $g(it,at,ct){var dt=it.text.firstChild,mt=!1;if(!at||!Le(dt,at))return th(bn(pe(it.line),0),!0);if(at==dt&&(mt=!0,at=dt.childNodes[ct],ct=0,!at)){var At=it.rest?me(it.rest):it.line;return th(bn(pe(At),At.text.length),mt)}var Ot=at.nodeType==3?at:null,Ut=at;for(!Ot&&at.childNodes.length==1&&at.firstChild.nodeType==3&&(Ot=at.firstChild,ct&&(ct=Ot.nodeValue.length));Ut.parentNode!=dt;)Ut=Ut.parentNode;var Wt=it.measure,oe=Wt.maps;function Ve(xi,Ri,rr){for(var Ki=-1;Ki<(oe?oe.length:0);Ki++)for(var lr=Ki<0?Wt.map:oe[Ki],Rr=0;Rr<lr.length;Rr+=3){var Zi=lr[Rr+2];if(Zi==xi||Zi==Ri){var Jr=pe(Ki<0?it.line:it.rest[Ki]),Wo=lr[Rr]+rr;return(rr<0||Zi!=xi)&&(Wo=lr[Rr+(rr?1:0)]),bn(Jr,Wo)}}}var fe=Ve(Ot,Ut,ct);if(fe)return th(fe,mt);for(var dn=Ut.nextSibling,on=Ot?Ot.nodeValue.length-ct:0;dn;dn=dn.nextSibling){if(fe=Ve(dn,dn.firstChild,0),fe)return th(bn(fe.line,fe.ch-on),mt);on+=dn.textContent.length}for(var ai=Ut.previousSibling,ci=ct;ai;ai=ai.previousSibling){if(fe=Ve(ai,ai.firstChild,-1),fe)return th(bn(fe.line,fe.ch+ci),mt);ci+=ai.textContent.length}}var Ca=function(it){this.cm=it,this.prevInput="",this.pollingFast=!1,this.polling=new Jt,this.hasSelection=!1,this.composing=null};Ca.prototype.init=function(it){var at=this,ct=this,dt=this.cm;this.createField(it);var mt=this.textarea;it.wrapper.insertBefore(this.wrapper,it.wrapper.firstChild),kt&&(mt.style.width="0px"),xe(mt,"input",function(){Pe&&Ae>=9&&at.hasSelection&&(at.hasSelection=null),ct.poll()}),xe(mt,"paste",function(Ot){ii(dt,Ot)||og(Ot,dt)||(dt.state.pasteIncoming=+new Date,ct.fastPoll())});function At(Ot){if(!ii(dt,Ot)){if(dt.somethingSelected())md({lineWise:!1,text:dt.getSelections()});else if(dt.options.lineWiseCopyCut){var Ut=sg(dt);md({lineWise:!0,text:Ut.text}),Ot.type=="cut"?dt.setSelections(Ut.ranges,null,Te):(ct.prevInput="",mt.value=Ut.text.join(`
`),Ue(mt))}else return;Ot.type=="cut"&&(dt.state.cutIncoming=+new Date)}}xe(mt,"cut",At),xe(mt,"copy",At),xe(it.scroller,"paste",function(Ot){if(!(Ko(it,Ot)||ii(dt,Ot))){if(!mt.dispatchEvent){dt.state.pasteIncoming=+new Date,ct.focus();return}var Ut=new Event("paste");Ut.clipboardData=Ot.clipboardData,mt.dispatchEvent(Ut)}}),xe(it.lineSpace,"selectstart",function(Ot){Ko(it,Ot)||Vi(Ot)}),xe(mt,"compositionstart",function(){var Ot=dt.getCursor("from");ct.composing&&ct.composing.range.clear(),ct.composing={start:Ot,range:dt.markText(Ot,dt.getCursor("to"),{className:"CodeMirror-composing"})}}),xe(mt,"compositionend",function(){ct.composing&&(ct.poll(),ct.composing.range.clear(),ct.composing=null)})},Ca.prototype.createField=function(it){this.wrapper=ug(),this.textarea=this.wrapper.firstChild},Ca.prototype.screenReaderLabelChanged=function(it){it?this.textarea.setAttribute("aria-label",it):this.textarea.removeAttribute("aria-label")},Ca.prototype.prepareSelection=function(){var it=this.cm,at=it.display,ct=it.doc,dt=Ou(it);if(it.options.moveInputWithCursor){var mt=Zo(it,ct.sel.primary().head,"div"),At=at.wrapper.getBoundingClientRect(),Ot=at.lineDiv.getBoundingClientRect();dt.teTop=Math.max(0,Math.min(at.wrapper.clientHeight-10,mt.top+Ot.top-At.top)),dt.teLeft=Math.max(0,Math.min(at.wrapper.clientWidth-10,mt.left+Ot.left-At.left))}return dt},Ca.prototype.showSelection=function(it){var at=this.cm,ct=at.display;le(ct.cursorDiv,it.cursors),le(ct.selectionDiv,it.selection),it.teTop!=null&&(this.wrapper.style.top=it.teTop+"px",this.wrapper.style.left=it.teLeft+"px")},Ca.prototype.reset=function(it){if(!(this.contextMenuPending||this.composing)){var at=this.cm;if(at.somethingSelected()){this.prevInput="";var ct=at.getSelection();this.textarea.value=ct,at.state.focused&&Ue(this.textarea),Pe&&Ae>=9&&(this.hasSelection=ct)}else it||(this.prevInput=this.textarea.value="",Pe&&Ae>=9&&(this.hasSelection=null))}},Ca.prototype.getField=function(){return this.textarea},Ca.prototype.supportsTouch=function(){return!1},Ca.prototype.focus=function(){if(this.cm.options.readOnly!="nocursor"&&(!et||ue()!=this.textarea))try{this.textarea.focus()}catch(it){}},Ca.prototype.blur=function(){this.textarea.blur()},Ca.prototype.resetPosition=function(){this.wrapper.style.top=this.wrapper.style.left=0},Ca.prototype.receivedFocus=function(){this.slowPoll()},Ca.prototype.slowPoll=function(){var it=this;this.pollingFast||this.polling.set(this.cm.options.pollInterval,function(){it.poll(),it.cm.state.focused&&it.slowPoll()})},Ca.prototype.fastPoll=function(){var it=!1,at=this;at.pollingFast=!0;function ct(){var dt=at.poll();!dt&&!it?(it=!0,at.polling.set(60,ct)):(at.pollingFast=!1,at.slowPoll())}at.polling.set(20,ct)},Ca.prototype.poll=function(){var it=this,at=this.cm,ct=this.textarea,dt=this.prevInput;if(this.contextMenuPending||!at.state.focused||Ct(ct)&&!dt&&!this.composing||at.isReadOnly()||at.options.disableInput||at.state.keySeq)return!1;var mt=ct.value;if(mt==dt&&!at.somethingSelected())return!1;if(Pe&&Ae>=9&&this.hasSelection===mt||ht&&/[\uf700-\uf7ff]/.test(mt))return at.display.input.reset(),!1;if(at.doc.sel==at.display.selForContextMenu){var At=mt.charCodeAt(0);if(At==8203&&!dt&&(dt="\u200B"),At==8666)return this.reset(),this.cm.execCommand("undo")}for(var Ot=0,Ut=Math.min(dt.length,mt.length);Ot<Ut&&dt.charCodeAt(Ot)==mt.charCodeAt(Ot);)++Ot;return xo(at,function(){Dh(at,mt.slice(Ot),dt.length-Ot,null,it.composing?"*compose":null),mt.length>1e3||mt.indexOf(`
`)>-1?ct.value=it.prevInput="":it.prevInput=mt,it.composing&&(it.composing.range.clear(),it.composing.range=at.markText(it.composing.start,at.getCursor("to"),{className:"CodeMirror-composing"}))}),!0},Ca.prototype.ensurePolled=function(){this.pollingFast&&this.poll()&&(this.pollingFast=!1)},Ca.prototype.onKeyPress=function(){Pe&&Ae>=9&&(this.hasSelection=null),this.fastPoll()},Ca.prototype.onContextMenu=function(it){var at=this,ct=at.cm,dt=ct.display,mt=at.textarea;at.contextMenuPending&&at.contextMenuPending();var At=Ka(ct,it),Ot=dt.scroller.scrollTop;if(!At||de)return;var Ut=ct.options.resetSelectionOnContextMenu;Ut&&ct.doc.sel.contains(At)==-1&&Ba(ct,Za)(ct.doc,Eu(At),Te);var Wt=mt.style.cssText,oe=at.wrapper.style.cssText,Ve=at.wrapper.offsetParent.getBoundingClientRect();at.wrapper.style.cssText="position: static",mt.style.cssText=`position: absolute; width: 30px; height: 30px;
top: `+(it.clientY-Ve.top-5)+"px; left: "+(it.clientX-Ve.left-5)+`px;
z-index: 1000; background: `+(Pe?"rgba(255, 255, 255, .05)":"transparent")+`;
outline: none; border-width: 0; outline: none; overflow: hidden; opacity: .05; filter: alpha(opacity=5);`;var fe;ee&&(fe=window.scrollY),dt.input.focus(),ee&&window.scrollTo(null,fe),dt.input.reset(),ct.somethingSelected()||(mt.value=at.prevInput=" "),at.contextMenuPending=on,dt.selForContextMenu=ct.doc.sel,clearTimeout(dt.detectingSelectAll);function dn(){if(mt.selectionStart!=null){var ci=ct.somethingSelected(),xi="\u200B"+(ci?mt.value:"");mt.value="\u21DA",mt.value=xi,at.prevInput=ci?"":"\u200B",mt.selectionStart=1,mt.selectionEnd=xi.length,dt.selForContextMenu=ct.doc.sel}}function on(){if(at.contextMenuPending==on&&(at.contextMenuPending=!1,at.wrapper.style.cssText=oe,mt.style.cssText=Wt,Pe&&Ae<9&&dt.scrollbars.setScrollTop(dt.scroller.scrollTop=Ot),mt.selectionStart!=null)){(!Pe||Pe&&Ae<9)&&dn();var ci=0,xi=function(){dt.selForContextMenu==ct.doc.sel&&mt.selectionStart==0&&mt.selectionEnd>0&&at.prevInput=="\u200B"?Ba(ct,ca)(ct):ci++<10?dt.detectingSelectAll=setTimeout(xi,500):(dt.selForContextMenu=null,dt.input.reset())};dt.detectingSelectAll=setTimeout(xi,200)}}if(Pe&&Ae>=9&&dn(),Dt){sr(it);var ai=function(){ni(window,"mouseup",ai),setTimeout(on,20)};xe(window,"mouseup",ai)}else setTimeout(on,50)},Ca.prototype.readOnlyChanged=function(it){it||this.reset(),this.textarea.disabled=it=="nocursor",this.textarea.readOnly=!!it},Ca.prototype.setUneditable=function(){},Ca.prototype.needsContentAttribute=!1;function tp(it,at){if(at=at?_e(at):{},at.value=it.value,!at.tabindex&&it.tabIndex&&(at.tabindex=it.tabIndex),!at.placeholder&&it.placeholder&&(at.placeholder=it.placeholder),at.autofocus==null){var ct=ue();at.autofocus=ct==it||it.getAttribute("autofocus")!=null&&ct==document.body}function dt(){it.value=Ut.getValue()}var mt;if(it.form&&(xe(it.form,"submit",dt),!at.leaveSubmitMethodAlone)){var At=it.form;mt=At.submit;try{var Ot=At.submit=function(){dt(),At.submit=mt,At.submit(),At.submit=Ot}}catch(Wt){}}at.finishInit=function(Wt){Wt.save=dt,Wt.getTextArea=function(){return it},Wt.toTextArea=function(){Wt.toTextArea=isNaN,dt(),it.parentNode.removeChild(Wt.getWrapperElement()),it.style.display="",it.form&&(ni(it.form,"submit",dt),!at.leaveSubmitMethodAlone&&typeof it.form.submit=="function"&&(it.form.submit=mt))}},it.style.display="none";var Ut=co(function(Wt){return it.parentNode.insertBefore(Wt,it.nextSibling)},at);return Ut}function eh(it){it.off=ni,it.on=xe,it.wheelEventPixels=Xs,it.Doc=Sa,it.splitLines=Rn,it.countColumn=qt,it.findColumn=Gn,it.isWordChar=xn,it.Pass=cn,it.signal=ei,it.Line=Bi,it.changeEnd=Zu,it.scrollbarModel=Of,it.Pos=bn,it.cmpPos=Mn,it.modes=Yn,it.mimeModes=Xn,it.resolveMode=Sn,it.getMode=be,it.modeExtensions=Ce,it.extendMode=we,it.copyState=kn,it.startState=ti,it.innerMode=Qn,it.commands=_u,it.keyMap=Hs,it.keyName=Kf,it.isModifierKey=bu,it.lookupKey=Qs,it.normalizeKeyMap=Uf,it.StringStream=Xe,it.SharedTextMarker=Gl,it.TextMarker=Be,it.LineWidget=zl,it.e_preventDefault=Vi,it.e_stopPropagation=er,it.e_stop=sr,it.addClass=Ee,it.contains=Le,it.rmClass=Xt,it.keyNames=ru}Qg(co),$u(co);var su="iter insert remove copy getEditor constructor".split(" ");for(var Oh in Sa.prototype)Sa.prototype.hasOwnProperty(Oh)&&De(su,Oh)<0&&(co.prototype[Oh]=function(it){return function(){return it.apply(this.doc,arguments)}}(Sa.prototype[Oh]));return Jn(Sa),co.inputStyles={textarea:Ca,contenteditable:bo},co.defineMode=function(it){!co.defaults.mode&&it!="null"&&(co.defaults.mode=it),fi.apply(this,arguments)},co.defineMIME=an,co.defineMode("null",function(){return{token:function(it){return it.skipToEnd()}}}),co.defineMIME("text/plain","null"),co.defineExtension=function(it,at){co.prototype[it]=at},co.defineDocExtension=function(it,at){Sa.prototype[it]=at},co.fromTextArea=tp,eh(co),co.version="5.58.2",co})},25419:function(fn,Bn,Ft){(function(pt){pt(Ft(89780),Ft(15525),Ft(98101))})(function(pt){"use strict";pt.defineMode("markdown",function(Ht,ve){var Me=pt.getMode(Ht,"text/html"),Pe=Me.name=="null";function Ae(qt){if(pt.findModeByName){var Jt=pt.findModeByName(qt);Jt&&(qt=Jt.mime||Jt.mimes[0])}var De=pt.getMode(Ht,qt);return De.name=="null"?null:De}ve.highlightFormatting===void 0&&(ve.highlightFormatting=!1),ve.maxBlockquoteDepth===void 0&&(ve.maxBlockquoteDepth=0),ve.taskLists===void 0&&(ve.taskLists=!1),ve.strikethrough===void 0&&(ve.strikethrough=!1),ve.emoji===void 0&&(ve.emoji=!1),ve.fencedCodeBlockHighlighting===void 0&&(ve.fencedCodeBlockHighlighting=!0),ve.fencedCodeBlockDefaultMode===void 0&&(ve.fencedCodeBlockDefaultMode="text/plain"),ve.xml===void 0&&(ve.xml=!0),ve.tokenTypeOverrides===void 0&&(ve.tokenTypeOverrides={});var ee={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 Fe in ee)ee.hasOwnProperty(Fe)&&ve.tokenTypeOverrides[Fe]&&(ee[Fe]=ve.tokenTypeOverrides[Fe]);var ye=/^([*\-_])(?:\s*\1){2,}\s*$/,de=/^(?:[*\-+]|^[0-9]+([.)]))\s+/,he=/^\[(x| )\](?=\s)/i,Ne=ve.allowAtxHeaderWithoutSpace?/^(#+)/:/^(#+)(?: |$)/,He=/^ {0,3}(?:\={1,}|-{2,})\s*$/,kt=/^[^#!\[\]*_\\<>` "'(~:]+/,nt=/^(~~~+|```+)[ \t]*([\w\/+#-]*)[^\n`]*$/,et=/^\s*\[[^\]]+?\]:.*$/,ht=/[!"#$%&'()*+,\-.\/:;<=>?@\[\\\]^_`{|}~\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]/,lt=" ";function gt(qt,Jt,De){return Jt.f=Jt.inline=De,De(qt,Jt)}function yt(qt,Jt,De){return Jt.f=Jt.block=De,De(qt,Jt)}function Lt(qt){return!qt||!/\S/.test(qt.string)}function Dt(qt){if(qt.linkTitle=!1,qt.linkHref=!1,qt.linkText=!1,qt.em=!1,qt.strong=!1,qt.strikethrough=!1,qt.quote=0,qt.indentedCode=!1,qt.f==Xt){var Jt=Pe;if(!Jt){var De=pt.innerMode(Me,qt.htmlState);Jt=De.mode.name=="xml"&&De.state.tagStart===null&&!De.state.context&&De.state.tokenize.isInText}Jt&&(qt.f=je,qt.block=zt,qt.htmlState=null)}return qt.trailingSpace=0,qt.trailingSpaceNewLine=!1,qt.prevLine=qt.thisLine,qt.thisLine={stream:null},null}function zt(qt,Jt){var De=qt.column()===Jt.indentation,sn=Lt(Jt.prevLine.stream),cn=Jt.indentedCode,Te=Jt.prevLine.hr,en=Jt.list!==!1,Cn=(Jt.listStack[Jt.listStack.length-1]||0)+3;Jt.indentedCode=!1;var Gn=Jt.indentation;if(Jt.indentationDiff===null&&(Jt.indentationDiff=Jt.indentation,en)){for(Jt.list=null;Gn<Jt.listStack[Jt.listStack.length-1];)Jt.listStack.pop(),Jt.listStack.length?Jt.indentation=Jt.listStack[Jt.listStack.length-1]:Jt.list=!1;Jt.list!==!1&&(Jt.indentationDiff=Gn-Jt.listStack[Jt.listStack.length-1])}var vn=!sn&&!Te&&!Jt.prevLine.header&&(!en||!cn)&&!Jt.prevLine.fencedCodeEnd,zn=(Jt.list===!1||Te||sn)&&Jt.indentation<=Cn&&qt.match(ye),me=null;if(Jt.indentationDiff>=4&&(cn||Jt.prevLine.fencedCodeEnd||Jt.prevLine.header||sn))return qt.skipToEnd(),Jt.indentedCode=!0,ee.code;if(qt.eatSpace())return null;if(De&&Jt.indentation<=Cn&&(me=qt.match(Ne))&&me[1].length<=6)return Jt.quote=0,Jt.header=me[1].length,Jt.thisLine.header=!0,ve.highlightFormatting&&(Jt.formatting="header"),Jt.f=Jt.inline,le(Jt);if(Jt.indentation<=Cn&&qt.eat(">"))return Jt.quote=De?1:Jt.quote+1,ve.highlightFormatting&&(Jt.formatting="quote"),qt.eatSpace(),le(Jt);if(!zn&&!Jt.setext&&De&&Jt.indentation<=Cn&&(me=qt.match(de))){var An=me[1]?"ol":"ul";return Jt.indentation=Gn+qt.current().length,Jt.list=!0,Jt.quote=0,Jt.listStack.push(Jt.indentation),Jt.em=!1,Jt.strong=!1,Jt.code=!1,Jt.strikethrough=!1,ve.taskLists&&qt.match(he,!1)&&(Jt.taskList=!0),Jt.f=Jt.inline,ve.highlightFormatting&&(Jt.formatting=["list","list-"+An]),le(Jt)}else{if(De&&Jt.indentation<=Cn&&(me=qt.match(nt,!0)))return Jt.quote=0,Jt.fencedEndRE=new RegExp(me[1]+"+ *$"),Jt.localMode=ve.fencedCodeBlockHighlighting&&Ae(me[2]||ve.fencedCodeBlockDefaultMode),Jt.localMode&&(Jt.localState=pt.startState(Jt.localMode)),Jt.f=Jt.block=re,ve.highlightFormatting&&(Jt.formatting="code-block"),Jt.code=-1,le(Jt);if(Jt.setext||(!vn||!en)&&!Jt.quote&&Jt.list===!1&&!Jt.code&&!zn&&!et.test(qt.string)&&(me=qt.lookAhead(1))&&(me=me.match(He)))return Jt.setext?(Jt.header=Jt.setext,Jt.setext=0,qt.skipToEnd(),ve.highlightFormatting&&(Jt.formatting="header")):(Jt.header=me[0].charAt(0)=="="?1:2,Jt.setext=Jt.header),Jt.thisLine.header=!0,Jt.f=Jt.inline,le(Jt);if(zn)return qt.skipToEnd(),Jt.hr=!0,Jt.thisLine.hr=!0,ee.hr;if(qt.peek()==="[")return gt(qt,Jt,ge)}return gt(qt,Jt,Jt.inline)}function Xt(qt,Jt){var De=Me.token(qt,Jt.htmlState);if(!Pe){var sn=pt.innerMode(Me,Jt.htmlState);(sn.mode.name=="xml"&&sn.state.tagStart===null&&!sn.state.context&&sn.state.tokenize.isInText||Jt.md_inside&&qt.current().indexOf(">")>-1)&&(Jt.f=je,Jt.block=zt,Jt.htmlState=null)}return De}function re(qt,Jt){var De=Jt.listStack[Jt.listStack.length-1]||0,sn=Jt.indentation<De,cn=De+3;if(Jt.fencedEndRE&&Jt.indentation<=cn&&(sn||qt.match(Jt.fencedEndRE))){ve.highlightFormatting&&(Jt.formatting="code-block");var Te;return sn||(Te=le(Jt)),Jt.localMode=Jt.localState=null,Jt.block=zt,Jt.f=je,Jt.fencedEndRE=null,Jt.code=0,Jt.thisLine.fencedCodeEnd=!0,sn?yt(qt,Jt,Jt.block):Te}else return Jt.localMode?Jt.localMode.token(qt,Jt.localState):(qt.skipToEnd(),ee.code)}function le(qt){var Jt=[];if(qt.formatting){Jt.push(ee.formatting),typeof qt.formatting=="string"&&(qt.formatting=[qt.formatting]);for(var De=0;De<qt.formatting.length;De++)Jt.push(ee.formatting+"-"+qt.formatting[De]),qt.formatting[De]==="header"&&Jt.push(ee.formatting+"-"+qt.formatting[De]+"-"+qt.header),qt.formatting[De]==="quote"&&(!ve.maxBlockquoteDepth||ve.maxBlockquoteDepth>=qt.quote?Jt.push(ee.formatting+"-"+qt.formatting[De]+"-"+qt.quote):Jt.push("error"))}if(qt.taskOpen)return Jt.push("meta"),Jt.length?Jt.join(" "):null;if(qt.taskClosed)return Jt.push("property"),Jt.length?Jt.join(" "):null;if(qt.linkHref?Jt.push(ee.linkHref,"url"):(qt.strong&&Jt.push(ee.strong),qt.em&&Jt.push(ee.em),qt.strikethrough&&Jt.push(ee.strikethrough),qt.emoji&&Jt.push(ee.emoji),qt.linkText&&Jt.push(ee.linkText),qt.code&&Jt.push(ee.code),qt.image&&Jt.push(ee.image),qt.imageAltText&&Jt.push(ee.imageAltText,"link"),qt.imageMarker&&Jt.push(ee.imageMarker)),qt.header&&Jt.push(ee.header,ee.header+"-"+qt.header),qt.quote&&(Jt.push(ee.quote),!ve.maxBlockquoteDepth||ve.maxBlockquoteDepth>=qt.quote?Jt.push(ee.quote+"-"+qt.quote):Jt.push(ee.quote+"-"+ve.maxBlockquoteDepth)),qt.list!==!1){var sn=(qt.listStack.length-1)%3;sn?sn===1?Jt.push(ee.list2):Jt.push(ee.list3):Jt.push(ee.list1)}return qt.trailingSpaceNewLine?Jt.push("trailing-space-new-line"):qt.trailingSpace&&Jt.push("trailing-space-"+(qt.trailingSpace%2?"a":"b")),Jt.length?Jt.join(" "):null}function ae(qt,Jt){if(qt.match(kt,!0))return le(Jt)}function je(qt,Jt){var De=Jt.text(qt,Jt);if(typeof De!="undefined")return De;if(Jt.list)return Jt.list=null,le(Jt);if(Jt.taskList){var sn=qt.match(he,!0)[1]===" ";return sn?Jt.taskOpen=!0:Jt.taskClosed=!0,ve.highlightFormatting&&(Jt.formatting="task"),Jt.taskList=!1,le(Jt)}if(Jt.taskOpen=!1,Jt.taskClosed=!1,Jt.header&&qt.match(/^#+$/,!0))return ve.highlightFormatting&&(Jt.formatting="header"),le(Jt);var cn=qt.next();if(Jt.linkTitle){Jt.linkTitle=!1;var Te=cn;cn==="("&&(Te=")"),Te=(Te+"").replace(/([.?*+^\[\]\\(){}|-])/g,"\\$1");var en="^\\s*(?:[^"+Te+"\\\\]+|\\\\\\\\|\\\\.)"+Te;if(qt.match(new RegExp(en),!0))return ee.linkHref}if(cn==="`"){var Cn=Jt.formatting;ve.highlightFormatting&&(Jt.formatting="code"),qt.eatWhile("`");var Gn=qt.current().length;if(Jt.code==0&&(!Jt.quote||Gn==1))return Jt.code=Gn,le(Jt);if(Gn==Jt.code){var vn=le(Jt);return Jt.code=0,vn}else return Jt.formatting=Cn,le(Jt)}else if(Jt.code)return le(Jt);if(cn==="\\"&&(qt.next(),ve.highlightFormatting)){var zn=le(Jt),me=ee.formatting+"-escape";return zn?zn+" "+me:me}if(cn==="!"&&qt.match(/\[[^\]]*\] ?(?:\(|\[)/,!1))return Jt.imageMarker=!0,Jt.image=!0,ve.highlightFormatting&&(Jt.formatting="image"),le(Jt);if(cn==="["&&Jt.imageMarker&&qt.match(/[^\]]*\](\(.*?\)| ?\[.*?\])/,!1))return Jt.imageMarker=!1,Jt.imageAltText=!0,ve.highlightFormatting&&(Jt.formatting="image"),le(Jt);if(cn==="]"&&Jt.imageAltText){ve.highlightFormatting&&(Jt.formatting="image");var zn=le(Jt);return Jt.imageAltText=!1,Jt.image=!1,Jt.inline=Jt.f=Le,zn}if(cn==="["&&!Jt.image)return Jt.linkText&&qt.match(/^.*?\]/)||(Jt.linkText=!0,ve.highlightFormatting&&(Jt.formatting="link")),le(Jt);if(cn==="]"&&Jt.linkText){ve.highlightFormatting&&(Jt.formatting="link");var zn=le(Jt);return Jt.linkText=!1,Jt.inline=Jt.f=qt.match(/\(.*?\)| ?\[.*?\]/,!1)?Le:je,zn}if(cn==="<"&&qt.match(/^(https?|ftps?):\/\/(?:[^\\>]|\\.)+>/,!1)){Jt.f=Jt.inline=ne,ve.highlightFormatting&&(Jt.formatting="link");var zn=le(Jt);return zn?zn+=" ":zn="",zn+ee.linkInline}if(cn==="<"&&qt.match(/^[^> \\]+@(?:[^\\>]|\\.)+>/,!1)){Jt.f=Jt.inline=ne,ve.highlightFormatting&&(Jt.formatting="link");var zn=le(Jt);return zn?zn+=" ":zn="",zn+ee.linkEmail}if(ve.xml&&cn==="<"&&qt.match(/^(!--|\?|!\[CDATA\[|[a-z][a-z0-9-]*(?:\s+[a-z_:.\-]+(?:\s*=\s*[^>]+)?)*\s*(?:>|$))/i,!1)){var An=qt.string.indexOf(">",qt.pos);if(An!=-1){var ui=qt.string.substring(qt.start,An);/markdown\s*=\s*('|"){0,1}1('|"){0,1}/.test(ui)&&(Jt.md_inside=!0)}return qt.backUp(1),Jt.htmlState=pt.startState(Me),yt(qt,Jt,Xt)}if(ve.xml&&cn==="<"&&qt.match(/^\/\w*?>/))return Jt.md_inside=!1,"tag";if(cn==="*"||cn==="_"){for(var un=1,ln=qt.pos==1?" ":qt.string.charAt(qt.pos-2);un<3&&qt.eat(cn);)un++;var oi=qt.peek()||" ",xn=!/\s/.test(oi)&&(!ht.test(oi)||/\s/.test(ln)||ht.test(ln)),Ie=!/\s/.test(ln)&&(!ht.test(ln)||/\s/.test(oi)||ht.test(oi)),Ze=null,Hn=null;if(un%2&&(!Jt.em&&xn&&(cn==="*"||!Ie||ht.test(ln))?Ze=!0:Jt.em==cn&&Ie&&(cn==="*"||!xn||ht.test(oi))&&(Ze=!1)),un>1&&(!Jt.strong&&xn&&(cn==="*"||!Ie||ht.test(ln))?Hn=!0:Jt.strong==cn&&Ie&&(cn==="*"||!xn||ht.test(oi))&&(Hn=!1)),Hn!=null||Ze!=null){ve.highlightFormatting&&(Jt.formatting=Ze==null?"strong":Hn==null?"em":"strong em"),Ze===!0&&(Jt.em=cn),Hn===!0&&(Jt.strong=cn);var vn=le(Jt);return Ze===!1&&(Jt.em=!1),Hn===!1&&(Jt.strong=!1),vn}}else if(cn===" "&&(qt.eat("*")||qt.eat("_"))){if(qt.peek()===" ")return le(Jt);qt.backUp(1)}if(ve.strikethrough){if(cn==="~"&&qt.eatWhile(cn)){if(Jt.strikethrough){ve.highlightFormatting&&(Jt.formatting="strikethrough");var vn=le(Jt);return Jt.strikethrough=!1,vn}else if(qt.match(/^[^\s]/,!1))return Jt.strikethrough=!0,ve.highlightFormatting&&(Jt.formatting="strikethrough"),le(Jt)}else if(cn===" "&&qt.match(/^~~/,!0)){if(qt.peek()===" ")return le(Jt);qt.backUp(2)}}if(ve.emoji&&cn===":"&&qt.match(/^(?:[a-z_\d+][a-z_\d+-]*|\-[a-z_\d+][a-z_\d+-]*):/)){Jt.emoji=!0,ve.highlightFormatting&&(Jt.formatting="emoji");var qe=le(Jt);return Jt.emoji=!1,qe}return cn===" "&&(qt.match(/^ +$/,!1)?Jt.trailingSpace++:Jt.trailingSpace&&(Jt.trailingSpaceNewLine=!0)),le(Jt)}function ne(qt,Jt){var De=qt.next();if(De===">"){Jt.f=Jt.inline=je,ve.highlightFormatting&&(Jt.formatting="link");var sn=le(Jt);return sn?sn+=" ":sn="",sn+ee.linkInline}return qt.match(/^[^>]+/,!0),ee.linkInline}function Le(qt,Jt){if(qt.eatSpace())return null;var De=qt.next();return De==="("||De==="["?(Jt.f=Jt.inline=Ee(De==="("?")":"]"),ve.highlightFormatting&&(Jt.formatting="link-string"),Jt.linkHref=!0,le(Jt)):"error"}var ue={")":/^(?:[^\\\(\)]|\\.|\((?:[^\\\(\)]|\\.)*\))*?(?=\))/,"]":/^(?:[^\\\[\]]|\\.|\[(?:[^\\\[\]]|\\.)*\])*?(?=\])/};function Ee(qt){return function(Jt,De){var sn=Jt.next();if(sn===qt){De.f=De.inline=je,ve.highlightFormatting&&(De.formatting="link-string");var cn=le(De);return De.linkHref=!1,cn}return Jt.match(ue[qt]),De.linkHref=!0,le(De)}}function ge(qt,Jt){return qt.match(/^([^\]\\]|\\.)*\]:/,!1)?(Jt.f=Ue,qt.next(),ve.highlightFormatting&&(Jt.formatting="link"),Jt.linkText=!0,le(Jt)):gt(qt,Jt,je)}function Ue(qt,Jt){if(qt.match(/^\]:/,!0)){Jt.f=Jt.inline=nn,ve.highlightFormatting&&(Jt.formatting="link");var De=le(Jt);return Jt.linkText=!1,De}return qt.match(/^([^\]\\]|\\.)+/,!0),ee.linkText}function nn(qt,Jt){return qt.eatSpace()?null:(qt.match(/^[^\s]+/,!0),qt.peek()===void 0?Jt.linkTitle=!0:qt.match(/^(?:\s+(?:"(?:[^"\\]|\\\\|\\.)+"|'(?:[^'\\]|\\\\|\\.)+'|\((?:[^)\\]|\\\\|\\.)+\)))?/,!0),Jt.f=Jt.inline=je,ee.linkHref+" url")}var _e={startState:function(){return{f:zt,prevLine:{stream:null},thisLine:{stream:null},block:zt,htmlState:null,indentation:0,inline:je,text:ae,formatting:!1,linkText:!1,linkHref:!1,linkTitle:!1,code:0,em:!1,strong:!1,header:0,setext:0,hr:!1,taskList:!1,list:!1,listStack:[],quote:0,trailingSpace:0,trailingSpaceNewLine:!1,strikethrough:!1,emoji:!1,fencedEndRE:null}},copyState:function(qt){return{f:qt.f,prevLine:qt.prevLine,thisLine:qt.thisLine,block:qt.block,htmlState:qt.htmlState&&pt.copyState(Me,qt.htmlState),indentation:qt.indentation,localMode:qt.localMode,localState:qt.localMode?pt.copyState(qt.localMode,qt.localState):null,inline:qt.inline,text:qt.text,formatting:!1,linkText:qt.linkText,linkTitle:qt.linkTitle,linkHref:qt.linkHref,code:qt.code,em:qt.em,strong:qt.strong,strikethrough:qt.strikethrough,emoji:qt.emoji,header:qt.header,setext:qt.setext,hr:qt.hr,taskList:qt.taskList,list:qt.list,listStack:qt.listStack.slice(0),quote:qt.quote,indentedCode:qt.indentedCode,trailingSpace:qt.trailingSpace,trailingSpaceNewLine:qt.trailingSpaceNewLine,md_inside:qt.md_inside,fencedEndRE:qt.fencedEndRE}},token:function(qt,Jt){if(Jt.formatting=!1,qt!=Jt.thisLine.stream){if(Jt.header=0,Jt.hr=!1,qt.match(/^\s*$/,!0))return Dt(Jt),null;if(Jt.prevLine=Jt.thisLine,Jt.thisLine={stream:qt},Jt.taskList=!1,Jt.trailingSpace=0,Jt.trailingSpaceNewLine=!1,!Jt.localState&&(Jt.f=Jt.block,Jt.f!=Xt)){var De=qt.match(/^\s*/,!0)[0].replace(/\t/g,lt).length;if(Jt.indentation=De,Jt.indentationDiff=null,De>0)return null}}return Jt.f(qt,Jt)},innerMode:function(qt){return qt.block==Xt?{state:qt.htmlState,mode:Me}:qt.localState?{state:qt.localState,mode:qt.localMode}:{state:qt,mode:_e}},indent:function(qt,Jt,De){return qt.block==Xt&&Me.indent?Me.indent(qt.htmlState,Jt,De):qt.localState&&qt.localMode.indent?qt.localMode.indent(qt.localState,Jt,De):pt.Pass},blankLine:Dt,getType:le,blockCommentStart:"<!--",blockCommentEnd:"-->",closeBrackets:"()[]{}''\"\"``",fold:"markdown"};return _e},"xml"),pt.defineMIME("text/markdown","markdown"),pt.defineMIME("text/x-markdown","markdown")})},98101:function(fn,Bn,Ft){(function(pt){pt(Ft(89780))})(function(pt){"use strict";pt.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 Ht=0;Ht<pt.modeInfo.length;Ht++){var ve=pt.modeInfo[Ht];ve.mimes&&(ve.mime=ve.mimes[0])}pt.findModeByMIME=function(Me){Me=Me.toLowerCase();for(var Pe=0;Pe<pt.modeInfo.length;Pe++){var Ae=pt.modeInfo[Pe];if(Ae.mime==Me)return Ae;if(Ae.mimes){for(var ee=0;ee<Ae.mimes.length;ee++)if(Ae.mimes[ee]==Me)return Ae}}if(/\+xml$/.test(Me))return pt.findModeByMIME("application/xml");if(/\+json$/.test(Me))return pt.findModeByMIME("application/json")},pt.findModeByExtension=function(Me){Me=Me.toLowerCase();for(var Pe=0;Pe<pt.modeInfo.length;Pe++){var Ae=pt.modeInfo[Pe];if(Ae.ext){for(var ee=0;ee<Ae.ext.length;ee++)if(Ae.ext[ee]==Me)return Ae}}},pt.findModeByFileName=function(Me){for(var Pe=0;Pe<pt.modeInfo.length;Pe++){var Ae=pt.modeInfo[Pe];if(Ae.file&&Ae.file.test(Me))return Ae}var ee=Me.lastIndexOf("."),Fe=ee>-1&&Me.substring(ee+1,Me.length);if(Fe)return pt.findModeByExtension(Fe)},pt.findModeByName=function(Me){Me=Me.toLowerCase();for(var Pe=0;Pe<pt.modeInfo.length;Pe++){var Ae=pt.modeInfo[Pe];if(Ae.name.toLowerCase()==Me)return Ae;if(Ae.alias){for(var ee=0;ee<Ae.alias.length;ee++)if(Ae.alias[ee].toLowerCase()==Me)return Ae}}}})},67549:function(fn,Bn,Ft){(function(pt){pt(Ft(89780))})(function(pt){"use strict";pt.defineMode("stex",function(Ht,ve){"use strict";function Me(kt,nt){kt.cmdState.push(nt)}function Pe(kt){return kt.cmdState.length>0?kt.cmdState[kt.cmdState.length-1]:null}function Ae(kt){var nt=kt.cmdState.pop();nt&&nt.closeBracket()}function ee(kt){for(var nt=kt.cmdState,et=nt.length-1;et>=0;et--){var ht=nt[et];if(ht.name!="DEFAULT")return ht}return{styleIdentifier:function(){return null}}}function Fe(kt,nt,et){return function(){this.name=kt,this.bracketNo=0,this.style=nt,this.styles=et,this.argument=null,this.styleIdentifier=function(){return this.styles[this.bracketNo-1]||null},this.openBracket=function(){return this.bracketNo++,"bracket"},this.closeBracket=function(){}}}var ye={};ye.importmodule=Fe("importmodule","tag",["string","builtin"]),ye.documentclass=Fe("documentclass","tag",["","atom"]),ye.usepackage=Fe("usepackage","tag",["atom"]),ye.begin=Fe("begin","tag",["atom"]),ye.end=Fe("end","tag",["atom"]),ye.label=Fe("label","tag",["atom"]),ye.ref=Fe("ref","tag",["atom"]),ye.eqref=Fe("eqref","tag",["atom"]),ye.cite=Fe("cite","tag",["atom"]),ye.bibitem=Fe("bibitem","tag",["atom"]),ye.Bibitem=Fe("Bibitem","tag",["atom"]),ye.RBibitem=Fe("RBibitem","tag",["atom"]),ye.DEFAULT=function(){this.name="DEFAULT",this.style="tag",this.styleIdentifier=this.openBracket=this.closeBracket=function(){}};function de(kt,nt){kt.f=nt}function he(kt,nt){var et;if(kt.match(/^\\[a-zA-Z@]+/)){var ht=kt.current().slice(1);return et=ye.hasOwnProperty(ht)?ye[ht]:ye.DEFAULT,et=new et,Me(nt,et),de(nt,He),et.style}if(kt.match(/^\\[$&%#{}_]/)||kt.match(/^\\[,;!\/\\]/))return"tag";if(kt.match("\\["))return de(nt,function(gt,yt){return Ne(gt,yt,"\\]")}),"keyword";if(kt.match("\\("))return de(nt,function(gt,yt){return Ne(gt,yt,"\\)")}),"keyword";if(kt.match("$$"))return de(nt,function(gt,yt){return Ne(gt,yt,"$$")}),"keyword";if(kt.match("$"))return de(nt,function(gt,yt){return Ne(gt,yt,"$")}),"keyword";var lt=kt.next();if(lt=="%")return kt.skipToEnd(),"comment";if(lt=="}"||lt=="]"){if(et=Pe(nt),et)et.closeBracket(lt),de(nt,He);else return"error";return"bracket"}else return lt=="{"||lt=="["?(et=ye.DEFAULT,et=new et,Me(nt,et),"bracket"):/\d/.test(lt)?(kt.eatWhile(/[\w.%]/),"atom"):(kt.eatWhile(/[\w\-_]/),et=ee(nt),et.name=="begin"&&(et.argument=kt.current()),et.styleIdentifier())}function Ne(kt,nt,et){if(kt.eatSpace())return null;if(et&&kt.match(et))return de(nt,he),"keyword";if(kt.match(/^\\[a-zA-Z@]+/))return"tag";if(kt.match(/^[a-zA-Z]+/))return"variable-2";if(kt.match(/^\\[$&%#{}_]/)||kt.match(/^\\[,;!\/]/)||kt.match(/^[\^_&]/))return"tag";if(kt.match(/^[+\-<>|=,\/@!*:;'"`~#?]/))return null;if(kt.match(/^(\d+\.\d*|\d*\.\d+|\d+)/))return"number";var ht=kt.next();return ht=="{"||ht=="}"||ht=="["||ht=="]"||ht=="("||ht==")"?"bracket":ht=="%"?(kt.skipToEnd(),"comment"):"error"}function He(kt,nt){var et=kt.peek(),ht;return et=="{"||et=="["?(ht=Pe(nt),ht.openBracket(et),kt.eat(et),de(nt,he),"bracket"):/[ \t\r]/.test(et)?(kt.eat(et),null):(de(nt,he),Ae(nt),he(kt,nt))}return{startState:function(){var kt=ve.inMathMode?function(nt,et){return Ne(nt,et)}:he;return{cmdState:[],f:kt}},copyState:function(kt){return{cmdState:kt.cmdState.slice(),f:kt.f}},token:function(kt,nt){return nt.f(kt,nt)},blankLine:function(kt){kt.f=he,kt.cmdState.length=0},lineComment:"%"}}),pt.defineMIME("text/x-stex","stex"),pt.defineMIME("text/x-latex","stex")})},15525:function(fn,Bn,Ft){(function(pt){pt(Ft(89780))})(function(pt){"use strict";var Ht={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},ve={autoSelfClosers:{},implicitlyClosed:{},contextGrabbers:{},doNotIndent:{},allowUnquoted:!1,allowMissing:!1,allowMissingTagName:!1,caseFold:!1};pt.defineMode("xml",function(Me,Pe){var Ae=Me.indentUnit,ee={},Fe=Pe.htmlMode?Ht:ve;for(var ye in Fe)ee[ye]=Fe[ye];for(var ye in Pe)ee[ye]=Pe[ye];var de,he;function Ne(ne,Le){function ue(Ue){return Le.tokenize=Ue,Ue(ne,Le)}var Ee=ne.next();if(Ee=="<")return ne.eat("!")?ne.eat("[")?ne.match("CDATA[")?ue(nt("atom","]]>")):null:ne.match("--")?ue(nt("comment","-->")):ne.match("DOCTYPE",!0,!0)?(ne.eatWhile(/[\w\._\-]/),ue(et(1))):null:ne.eat("?")?(ne.eatWhile(/[\w\._\-]/),Le.tokenize=nt("meta","?>"),"meta"):(de=ne.eat("/")?"closeTag":"openTag",Le.tokenize=He,"tag bracket");if(Ee=="&"){var ge;return ne.eat("#")?ne.eat("x")?ge=ne.eatWhile(/[a-fA-F\d]/)&&ne.eat(";"):ge=ne.eatWhile(/[\d]/)&&ne.eat(";"):ge=ne.eatWhile(/[\w\.\-:]/)&&ne.eat(";"),ge?"atom":"error"}else return ne.eatWhile(/[^&<]/),null}Ne.isInText=!0;function He(ne,Le){var ue=ne.next();if(ue==">"||ue=="/"&&ne.eat(">"))return Le.tokenize=Ne,de=ue==">"?"endTag":"selfcloseTag","tag bracket";if(ue=="=")return de="equals",null;if(ue=="<"){Le.tokenize=Ne,Le.state=yt,Le.tagName=Le.tagStart=null;var Ee=Le.tokenize(ne,Le);return Ee?Ee+" tag error":"tag error"}else return/[\'\"]/.test(ue)?(Le.tokenize=kt(ue),Le.stringStartCol=ne.column(),Le.tokenize(ne,Le)):(ne.match(/^[^\s\u00a0=<>\"\']*[^\s\u00a0=<>\"\'\/]/),"word")}function kt(ne){var Le=function(ue,Ee){for(;!ue.eol();)if(ue.next()==ne){Ee.tokenize=He;break}return"string"};return Le.isInAttribute=!0,Le}function nt(ne,Le){return function(ue,Ee){for(;!ue.eol();){if(ue.match(Le)){Ee.tokenize=Ne;break}ue.next()}return ne}}function et(ne){return function(Le,ue){for(var Ee;(Ee=Le.next())!=null;){if(Ee=="<")return ue.tokenize=et(ne+1),ue.tokenize(Le,ue);if(Ee==">")if(ne==1){ue.tokenize=Ne;break}else return ue.tokenize=et(ne-1),ue.tokenize(Le,ue)}return"meta"}}function ht(ne,Le,ue){this.prev=ne.context,this.tagName=Le,this.indent=ne.indented,this.startOfLine=ue,(ee.doNotIndent.hasOwnProperty(Le)||ne.context&&ne.context.noIndent)&&(this.noIndent=!0)}function lt(ne){ne.context&&(ne.context=ne.context.prev)}function gt(ne,Le){for(var ue;;){if(!ne.context||(ue=ne.context.tagName,!ee.contextGrabbers.hasOwnProperty(ue)||!ee.contextGrabbers[ue].hasOwnProperty(Le)))return;lt(ne)}}function yt(ne,Le,ue){return ne=="openTag"?(ue.tagStart=Le.column(),Lt):ne=="closeTag"?Dt:yt}function Lt(ne,Le,ue){return ne=="word"?(ue.tagName=Le.current(),he="tag",re):ee.allowMissingTagName&&ne=="endTag"?(he="tag bracket",re(ne,Le,ue)):(he="error",Lt)}function Dt(ne,Le,ue){if(ne=="word"){var Ee=Le.current();return ue.context&&ue.context.tagName!=Ee&&ee.implicitlyClosed.hasOwnProperty(ue.context.tagName)&&lt(ue),ue.context&&ue.context.tagName==Ee||ee.matchClosing===!1?(he="tag",zt):(he="tag error",Xt)}else return ee.allowMissingTagName&&ne=="endTag"?(he="tag bracket",zt(ne,Le,ue)):(he="error",Xt)}function zt(ne,Le,ue){return ne!="endTag"?(he="error",zt):(lt(ue),yt)}function Xt(ne,Le,ue){return he="error",zt(ne,Le,ue)}function re(ne,Le,ue){if(ne=="word")return he="attribute",le;if(ne=="endTag"||ne=="selfcloseTag"){var Ee=ue.tagName,ge=ue.tagStart;return ue.tagName=ue.tagStart=null,ne=="selfcloseTag"||ee.autoSelfClosers.hasOwnProperty(Ee)?gt(ue,Ee):(gt(ue,Ee),ue.context=new ht(ue,Ee,ge==ue.indented)),yt}return he="error",re}function le(ne,Le,ue){return ne=="equals"?ae:(ee.allowMissing||(he="error"),re(ne,Le,ue))}function ae(ne,Le,ue){return ne=="string"?je:ne=="word"&&ee.allowUnquoted?(he="string",re):(he="error",re(ne,Le,ue))}function je(ne,Le,ue){return ne=="string"?je:re(ne,Le,ue)}return{startState:function(ne){var Le={tokenize:Ne,state:yt,indented:ne||0,tagName:null,tagStart:null,context:null};return ne!=null&&(Le.baseIndent=ne),Le},token:function(ne,Le){if(!Le.tagName&&ne.sol()&&(Le.indented=ne.indentation()),ne.eatSpace())return null;de=null;var ue=Le.tokenize(ne,Le);return(ue||de)&&ue!="comment"&&(he=null,Le.state=Le.state(de||ue,ne,Le),he&&(ue=he=="error"?ue+" error":he)),ue},indent:function(ne,Le,ue){var Ee=ne.context;if(ne.tokenize.isInAttribute)return ne.tagStart==ne.indented?ne.stringStartCol+1:ne.indented+Ae;if(Ee&&Ee.noIndent)return pt.Pass;if(ne.tokenize!=He&&ne.tokenize!=Ne)return ue?ue.match(/^(\s*)/)[0].length:0;if(ne.tagName)return ee.multilineTagIndentPastTag!==!1?ne.tagStart+ne.tagName.length+2:ne.tagStart+Ae*(ee.multilineTagIndentFactor||1);if(ee.alignCDATA&&/<!\[CDATA\[/.test(Le))return 0;var ge=Le&&/^<(\/)?([\w_:\.-]*)/.exec(Le);if(ge&&ge[1])for(;Ee;)if(Ee.tagName==ge[2]){Ee=Ee.prev;break}else if(ee.implicitlyClosed.hasOwnProperty(Ee.tagName))Ee=Ee.prev;else break;else if(ge)for(;Ee;){var Ue=ee.contextGrabbers[Ee.tagName];if(Ue&&Ue.hasOwnProperty(ge[2]))Ee=Ee.prev;else break}for(;Ee&&Ee.prev&&!Ee.startOfLine;)Ee=Ee.prev;return Ee?Ee.indent+Ae:ne.baseIndent||0},electricInput:/<\/[\s\w:]+>$/,blockCommentStart:"<!--",blockCommentEnd:"-->",configuration:ee.htmlMode?"html":"xml",helperType:ee.htmlMode?"html":"xml",skipAttribute:function(ne){ne.state==ae&&(ne.state=re)},xmlCurrentTag:function(ne){return ne.tagName?{name:ne.tagName,close:ne.type=="closeTag"}:null},xmlCurrentContext:function(ne){for(var Le=[],ue=ne.context;ue;ue=ue.prev)ue.tagName&&Le.push(ue.tagName);return Le.reverse()}}}),pt.defineMIME("text/xml","xml"),pt.defineMIME("application/xml","xml"),pt.mimeModes.hasOwnProperty("text/html")||pt.defineMIME("text/html",{name:"xml",htmlMode:!0})})},12378:function(fn,Bn,Ft){"use strict";Ft.d(Bn,{$u:function(){return ye},BD:function(){return un},E9:function(){return Fe},FF:function(){return gr},FJ:function(){return yt},Hn:function(){return gt},KX:function(){return Dt},NB:function(){return Rt},S0:function(){return me},UL:function(){return de},Vk:function(){return lt},Vm:function(){return Pt},YI:function(){return An},ZA:function(){return ve},Zt:function(){return he},al:function(){return Ze},bn:function(){return Ie},bx:function(){return ln},g2:function(){return ui},h1:function(){return ae},hD:function(){return Jn},l4:function(){return Ae},rU:function(){return bt},s_:function(){return oi},uz:function(){return Pn},z6:function(){return Ne}}),fn=Ft.hmd(fn),function(){var Ct;function zi(a){var y=0;return function(){return y<a.length?{done:!1,value:a[y++]}:{done:!0}}}function Ci(a){var y=typeof Symbol!="undefined"&&Symbol.iterator&&a[Symbol.iterator];return y?y.call(a):{next:zi(a)}}function ze(a){for(var y,x=[];!(y=a.next()).done;)x.push(y.value);return x}var Yn=typeof Object.create=="function"?Object.create:function(a){function y(){}return y.prototype=a,new y},Xn;if(typeof Object.setPrototypeOf=="function")Xn=Object.setPrototypeOf;else{var fi;t:{var an={a:!0},Sn={};try{Sn.__proto__=an,fi=Sn.a;break t}catch(a){}fi=!1}Xn=fi?function(a,y){if(a.__proto__=y,a.__proto__!==y)throw new TypeError(a+" is not extensible");return a}:null}var be=Xn;function Ce(a,y){if(a.prototype=Yn(y.prototype),a.prototype.constructor=a,be)be(a,y);else for(var x in y)if(x!="prototype")if(Object.defineProperties){var E=Object.getOwnPropertyDescriptor(y,x);E&&Object.defineProperty(a,x,E)}else a[x]=y[x];a.QA=y.prototype}var we=typeof Ft.g!="undefined"&&Ft.g!=null?Ft.g:self,kn=typeof Object.assign=="function"?Object.assign:function(a,y){for(var x=1;x<arguments.length;x++){var E=arguments[x];if(E)for(var b in E)Object.prototype.hasOwnProperty.call(E,b)&&(a[b]=E[b])}return a},Qn=typeof Object.defineProperties=="function"?Object.defineProperty:function(a,y,x){a!=Array.prototype&&a!=Object.prototype&&(a[y]=x.value)};function ti(a,y){if(y){var x=we;a=a.split(".");for(var E=0;E<a.length-1;E++){var b=a[E];b in x||(x[b]={}),x=x[b]}a=a[a.length-1],E=x[a],y=y(E),y!=E&&y!=null&&Qn(x,a,{writable:!0,value:y})}}ti("Object.assign",function(a){return a||kn}),ti("Array.prototype.fill",function(a){return a||function(y,x,E){var b=this.length||0;for(0>x&&(x=Math.max(0,b+x)),(E==null||E>b)&&(E=b),E=Number(E),0>E&&(E=Math.max(0,b+E)),x=Number(x||0);x<E;x++)this[x]=y;return this}});var Xe=typeof globalThis=="object"&&globalThis||typeof Ft.g=="object"&&Ft.g.global===Ft.g&&Ft.g||typeof self=="object"&&self.self===self&&self||{};Xe.requestAnimationFrame===void 0&&(Xe.setImmediate===void 0?Xe.requestAnimationFrame=function(a){Xe.setTimeout(a,0)}:Xe.requestAnimationFrame=Xe.setImmediate);function Dn(){}function vi(a,y){var x=-1;return function(){var E=this,b=arguments;x!==-1&&Xe.clearTimeout(x),x=$n(function(){x=-1,a.apply(E,b)},y)}}function $n(a,y){return Xe.setTimeout(a,y)}function ki(a){return Xe.document.createElement(a)}function pe(a){throw Error(a)}function Tn(a,y){a="The object is frozen, so its properties cannot be set: "+a.toString(),y!==void 0&&(a+=" to value: "+y),pe(a)}function gi(a,y,x,E){x=x===null?"*":typeof x=="string"?x:typeof x=="function"&&typeof x.className=="string"?x.className:"",E!==void 0&&(x+="."+E),pe(x+" is not in the range "+y+": "+a)}function Oi(a){Xe.console&&Xe.console.log(a)}function bn(a){return typeof a=="object"&&a!==null}function Mn(a){return Array.isArray(a)||Xe.NodeList&&a instanceof Xe.NodeList||Xe.HTMLCollection&&a instanceof Xe.HTMLCollection}function hn(a){return Array.prototype.slice.call(a)}function Ji(a,y,x){Array.isArray(a)?y>=a.length?a.push(x):a.splice(y,0,x):pe("Cannot insert an object into an HTMLCollection or NodeList: "+x+" at "+y)}function Li(a,y){Array.isArray(a)?y>=a.length?a.pop():a.splice(y,1):pe("Cannot remove an object from an HTMLCollection or NodeList at "+y)}function Si(){var a=Or.pop();return a===void 0?[]:a}function wi(a){a.length=0,Or.push(a)}function Mi(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(bn(a)&&a.constructor)return Mi(a.constructor);return typeof a}function Er(a){var y=a;return bn(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 ir(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 tr(a,y,x){Object.defineProperty(qr.prototype,a,{get:y,set:x})}function gn(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 E=0,b=0;b<a.length;b+=2)x[E++]=y[a.substr(b,2)];for(a=x.join(""),a=a===""?"0":a,y=[],x=0;256>x;x++)y[x]=x;for(x=E=0;256>x;x++)E=(E+y[x]+119)%256,b=y[x],y[x]=y[E],y[E]=b;E=x=0;for(var z="",tt=0;tt<a.length;tt++)x=(x+1)%256,E=(E+y[x])%256,b=y[x],y[x]=y[E],y[E]=b,z+=String.fromCharCode(a.charCodeAt(tt)^y[(y[x]+y[E])%256]);return z.indexOf("GoJS 2.1 evaluation")>-1||z.indexOf("\xA9 1998-2021 Northwoods Software")>-1||z.indexOf("Not for distribution or production use")>-1||z.indexOf("gojs.net")>-1?"":z}var to=Xe.navigator!==void 0&&0<Xe.navigator.userAgent.indexOf("Trident/7"),Qi=Xe.navigator!==void 0&&Xe.navigator.platform!==void 0&&Xe.navigator.platform.match(/(iPhone|iPod|iPad|Mac)/i)!==null,Or=[];Object.freeze([]),Dn.className="Util",Dn.Dx="32ab5ff3b26f42dc0ed90f21472913b5",Dn.adym="gojs.net",Dn.vfo="28e645fdb266",Dn.className="Util";function Je(a,y,x){Zr(this),this.j=a,this.xa=y,this.o=x}Je.prototype.toString=function(){return"EnumValue."+this.xa};function Un(a,y){return y==null||y===""?null:a[y]}we.Object.defineProperties(Je.prototype,{classType:{get:function(){return this.j}},name:{get:function(){return this.xa}},value:{get:function(){return this.o}}}),Je.className="EnumValue";function Pi(){this.ew=[]}Pi.prototype.toString=function(){return this.ew.join("")},Pi.prototype.add=function(a){a!==""&&this.ew.push(a)},Pi.className="StringBuilder";function Ni(){}Ni.className="PropertyCollection";var di={EA:!1,JA:!1,GA:!1,IA:!1,NA:!1,LA:!1,nx:!1,FA:null,trace:function(a){Xe.console&&Xe.console.log(a)},HA:function(a,y,x,E){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(E.left,E.top+20),a.lineTo(E.left,E.top),a.lineTo(E.left+20,E.top),a.moveTo(E.right,E.bottom-20),a.lineTo(E.right,E.bottom),a.lineTo(E.right-20,E.bottom),a.stroke(),a.fillText("DB: "+Math.round(E.x)+", "+Math.round(E.y)+", "+Math.round(E.width)+", "+Math.round(E.height),E.left,E.top-5)},DA:function(a){var y={},x;for(x in a){if(y.x=x,y.x!=="licenseKey"){var E=a[y.x];if(E.prototype!==void 0){y.Zl=Object.getOwnPropertyNames(E.prototype);for(var b={Tj:0};b.Tj<y.Zl.length;b={Tj:b.Tj},b.Tj++){var z=Object.getOwnPropertyDescriptor(E.prototype,y.Zl[b.Tj]);z.get!==void 0&&z.set===void 0&&Object.defineProperty(E.prototype,y.Zl[b.Tj],{set:function(tt,rt){return function(){throw Error("Property "+tt.Zl[rt.Tj]+" of "+tt.x+" is read-only.")}}(y,b)})}}}y={Zl:y.Zl,x:y.x}}}};function Ii(){}Ii.prototype.reset=function(){},Ii.prototype.next=function(){return!1},Ii.prototype.Ad=function(){return!1},Ii.prototype.first=function(){return null},Ii.prototype.any=function(){return!1},Ii.prototype.all=function(){return!0},Ii.prototype.each=function(){return this},Ii.prototype.map=function(){return this},Ii.prototype.filter=function(){return this},Ii.prototype.de=function(){},Ii.prototype.toString=function(){return"EmptyIterator"},we.Object.defineProperties(Ii.prototype,{iterator:{get:function(){return this}},count:{get:function(){return 0}}}),Ii.prototype.first=Ii.prototype.first,Ii.prototype.hasNext=Ii.prototype.Ad,Ii.prototype.next=Ii.prototype.next,Ii.prototype.reset=Ii.prototype.reset;var vr=null;Ii.className="EmptyIterator",vr=new Ii;function yr(a){this.key=-1,this.value=a}yr.prototype.reset=function(){this.key=-1},yr.prototype.next=function(){return this.key===-1?(this.key=0,!0):!1},yr.prototype.Ad=function(){return this.next()},yr.prototype.first=function(){return this.key=0,this.value},yr.prototype.any=function(a){return this.key=-1,a(this.value)},yr.prototype.all=function(a){return this.key=-1,a(this.value)},yr.prototype.each=function(a){return this.key=-1,a(this.value),this},yr.prototype.map=function(a){return new yr(a(this.value))},yr.prototype.filter=function(a){return a(this.value)?new yr(this.value):vr},yr.prototype.de=function(){this.value=null},yr.prototype.toString=function(){return"SingletonIterator("+this.value+")"},we.Object.defineProperties(yr.prototype,{iterator:{get:function(){return this}},count:{get:function(){return 1}}}),yr.prototype.first=yr.prototype.first,yr.prototype.hasNext=yr.prototype.Ad,yr.prototype.next=yr.prototype.next,yr.prototype.reset=yr.prototype.reset,yr.className="SingletonIterator";function pr(a){this.Bb=a,this.qf=null,a.Sa=null,this.qa=a.Ja,this.Za=-1}pr.prototype.reset=function(){var a=this.Bb;a.Sa=null,this.qa=a.Ja,this.Za=-1},pr.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,E=this.qf;if(E!==null)for(;x<y;){var b=a[x];if(E(b))return this.key=this.Za=x,this.value=b,!0;x++}else{if(x<y)return this.key=x,this.value=a[x],!0;this.de()}return!1},pr.prototype.Ad=function(){return this.next()},pr.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 E=0;E<y;){var b=a[E];if(x(b))return this.key=this.Za=E,this.value=b;E++}return null}return 0<y?(a=a[0],this.key=0,this.value=a):null},pr.prototype.any=function(a){var y=this.Bb;y.Sa=null,this.Za=-1,y=y.s;for(var x=y.length,E=this.qf,b=0;b<x;b++){var z=y[b];if((E===null||E(z))&&a(z))return!0}return!1},pr.prototype.all=function(a){var y=this.Bb;y.Sa=null,this.Za=-1,y=y.s;for(var x=y.length,E=this.qf,b=0;b<x;b++){var z=y[b];if((E===null||E(z))&&!a(z))return!1}return!0},pr.prototype.each=function(a){var y=this.Bb;y.Sa=null,this.Za=-1,y=y.s;for(var x=y.length,E=this.qf,b=0;b<x;b++){var z=y[b];(E===null||E(z))&&a(z)}return this},pr.prototype.map=function(a){var y=this.Bb;y.Sa=null,this.Za=-1;var x=[];y=y.s;for(var E=y.length,b=this.qf,z=0;z<E;z++){var tt=y[z];(b===null||b(tt))&&x.push(a(tt))}return a=new yn,a.s=x,a.xb(),a.iterator},pr.prototype.filter=function(a){var y=this.Bb;y.Sa=null,this.Za=-1;var x=[];y=y.s;for(var E=y.length,b=this.qf,z=0;z<E;z++){var tt=y[z];(b===null||b(tt))&&a(tt)&&x.push(tt)}return a=new yn,a.s=x,a.xb(),a.iterator},pr.prototype.de=function(){this.key=-1,this.value=null,this.qa=-1,this.qf=null,this.Bb.Sa=this},pr.prototype.toString=function(){return"ListIterator@"+this.Za+"/"+this.Bb.count},we.Object.defineProperties(pr.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,E=x.length,b=0;b<E;b++)a(x[b])&&y++;return y}return this.Bb.s.length}}}),pr.prototype.first=pr.prototype.first,pr.prototype.hasNext=pr.prototype.Ad,pr.prototype.next=pr.prototype.next,pr.prototype.reset=pr.prototype.reset,pr.className="ListIterator";function wr(a){this.Bb=a,a.Hg=null,this.qa=a.Ja,this.Za=a.s.length}wr.prototype.reset=function(){var a=this.Bb;a.Hg=null,this.qa=a.Ja,this.Za=a.s.length},wr.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)},wr.prototype.Ad=function(){return this.next()},wr.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},wr.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},wr.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},wr.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},wr.prototype.map=function(a){var y=this.Bb;y.Hg=null;var x=[];y=y.s;var E=y.length;for(this.Za=E,--E;0<=E;E--)x.push(a(y[E]));return a=new yn,a.s=x,a.xb(),a.iterator},wr.prototype.filter=function(a){var y=this.Bb;y.Hg=null;var x=[];y=y.s;var E=y.length;for(this.Za=E,--E;0<=E;E--){var b=y[E];a(b)&&x.push(b)}return a=new yn,a.s=x,a.xb(),a.iterator},wr.prototype.de=function(){this.key=-1,this.value=null,this.qa=-1,this.Bb.Hg=this},wr.prototype.toString=function(){return"ListIteratorBackwards("+this.Za+"/"+this.Bb.count+")"},we.Object.defineProperties(wr.prototype,{iterator:{get:function(){return this}},count:{get:function(){return this.Bb.s.length}}}),wr.prototype.first=wr.prototype.first,wr.prototype.hasNext=wr.prototype.Ad,wr.prototype.next=wr.prototype.next,wr.prototype.reset=wr.prototype.reset,wr.className="ListIteratorBackwards";function yn(a){Zr(this),this._isFrozen=!1,this.s=[],this.Ja=0,this.Hg=this.Sa=null,typeof a=="string"&&pe("Error: Since 2.0 List/Map/Set constructors no longer take an argument that enforces type."),a!==void 0&&this.addAll(a)}Ct=yn.prototype,Ct.xb=function(){var a=this.Ja;a++,999999999<a&&(a=0),this.Ja=a},Ct.freeze=function(){return this._isFrozen=!0,this},Ct.ka=function(){return this._isFrozen=!1,this},Ct.toString=function(){return"List()#"+Cr(this)},Ct.add=function(a){return a===null?this:(this._isFrozen&&Tn(this,a),this.s.push(a),this.xb(),this)},Ct.push=function(a){this.add(a)},Ct.addAll=function(a){if(a===null)return this;this._isFrozen&&Tn(this);var y=this.s;if(Mn(a))for(var x=a.length,E=0;E<x;E++)y.push(a[E]);else for(a=a.iterator;a.next();)y.push(a.value);return this.xb(),this},Ct.clear=function(){this._isFrozen&&Tn(this),this.s.length=0,this.xb()},Ct.contains=function(a){return a===null?!1:this.s.indexOf(a)!==-1},Ct.has=function(a){return this.contains(a)},Ct.indexOf=function(a){return a===null?-1:this.s.indexOf(a)},Ct.M=function(a){var y=this.s;return(0>a||a>=y.length)&&gi(a,"0 <= i < length",yn,"elt:i"),y[a]},Ct.get=function(a){return this.M(a)},Ct.cd=function(a,y){var x=this.s;(0>a||a>=x.length)&&gi(a,"0 <= i < length",yn,"setElt:i"),this._isFrozen&&Tn(this,a),x[a]=y},Ct.set=function(a,y){this.cd(a,y)},Ct.first=function(){var a=this.s;return a.length===0?null:a[0]},Ct.jc=function(){var a=this.s,y=a.length;return 0<y?a[y-1]:null},Ct.pop=function(){this._isFrozen&&Tn(this);var a=this.s;return 0<a.length?a.pop():null},yn.prototype.any=function(a){for(var y=this.s,x=y.length,E=0;E<x;E++)if(a(y[E]))return!0;return!1},yn.prototype.all=function(a){for(var y=this.s,x=y.length,E=0;E<x;E++)if(!a(y[E]))return!1;return!0},yn.prototype.each=function(a){for(var y=this.s,x=y.length,E=0;E<x;E++)a(y[E]);return this},yn.prototype.map=function(a){for(var y=new yn,x=[],E=this.s,b=E.length,z=0;z<b;z++)x.push(a(E[z]));return y.s=x,y.xb(),y},yn.prototype.filter=function(a){for(var y=new yn,x=[],E=this.s,b=E.length,z=0;z<b;z++){var tt=E[z];a(tt)&&x.push(tt)}return y.s=x,y.xb(),y},Ct=yn.prototype,Ct.Gb=function(a,y){0>a&&gi(a,">= 0",yn,"insertAt:i"),this._isFrozen&&Tn(this,a);var x=this.s;a>=x.length?x.push(y):x.splice(a,0,y),this.xb()},Ct.remove=function(a){if(a===null)return!1;this._isFrozen&&Tn(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)},Ct.delete=function(a){return this.remove(a)},Ct.mb=function(a){var y=this.s;(0>a||a>=y.length)&&gi(a,"0 <= i < length",yn,"removeAt:i"),this._isFrozen&&Tn(this,a),a===y.length-1?y.pop():y.splice(a,1),this.xb()},Ct.removeRange=function(a,y){var x=this.s,E=x.length;if(0>a)a=0;else if(a>=E)return this;if(0>y)return this;if(y>=E&&(y=E-1),a>y)return this;this._isFrozen&&Tn(this);for(var b=a,z=y+1;z<E;)x[b++]=x[z++];return x.length=E-(y-a+1),this.xb(),this},yn.prototype.copy=function(){var a=new yn,y=this.s;return 0<y.length&&(a.s=Array.prototype.slice.call(y)),a},Ct=yn.prototype,Ct.Fa=function(){for(var a=this.s,y=this.count,x=Array(y),E=0;E<y;E++)x[E]=a[E];return x},Ct.Iv=function(){for(var a=new mn,y=this.s,x=this.count,E=0;E<x;E++)a.add(y[E]);return a},Ct.sort=function(a){return this._isFrozen&&Tn(this),this.s.sort(a),this.xb(),this},Ct.zi=function(a,y,x){var E=this.s,b=E.length;y===void 0&&(y=0),x===void 0&&(x=b),this._isFrozen&&Tn(this);var z=x-y;if(1>=z)return this;if((0>y||y>=b-1)&&gi(y,"0 <= from < length",yn,"sortRange:from"),z===2)return x=E[y],b=E[y+1],0<a(x,b)&&(E[y]=b,E[y+1]=x,this.xb()),this;if(y===0)if(x>=b)E.sort(a);else for(y=E.slice(0,x),y.sort(a),a=0;a<x;a++)E[a]=y[a];else if(x>=b)for(x=E.slice(y),x.sort(a),a=y;a<b;a++)E[a]=x[a-y];else for(b=E.slice(y,x),b.sort(a),a=y;a<x;a++)E[a]=b[a-y];return this.xb(),this},Ct.reverse=function(){return this._isFrozen&&Tn(this),this.s.reverse(),this.xb(),this},we.Object.defineProperties(yn.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 vr;var a=this.Sa;return a!==null?(a.reset(),a):new pr(this)}},iteratorBackwards:{get:function(){if(0>=this.s.length)return vr;var a=this.Hg;return a!==null?(a.reset(),a):new wr(this)}}}),yn.prototype.reverse=yn.prototype.reverse,yn.prototype.sortRange=yn.prototype.zi,yn.prototype.sort=yn.prototype.sort,yn.prototype.toSet=yn.prototype.Iv,yn.prototype.toArray=yn.prototype.Fa,yn.prototype.removeRange=yn.prototype.removeRange,yn.prototype.removeAt=yn.prototype.mb,yn.prototype.delete=yn.prototype.delete,yn.prototype.remove=yn.prototype.remove,yn.prototype.insertAt=yn.prototype.Gb,yn.prototype.pop=yn.prototype.pop,yn.prototype.last=yn.prototype.jc,yn.prototype.first=yn.prototype.first,yn.prototype.set=yn.prototype.set,yn.prototype.setElt=yn.prototype.cd,yn.prototype.get=yn.prototype.get,yn.prototype.elt=yn.prototype.M,yn.prototype.indexOf=yn.prototype.indexOf,yn.prototype.has=yn.prototype.has,yn.prototype.contains=yn.prototype.contains,yn.prototype.clear=yn.prototype.clear,yn.prototype.addAll=yn.prototype.addAll,yn.prototype.push=yn.prototype.push,yn.prototype.add=yn.prototype.add,yn.prototype.thaw=yn.prototype.ka,yn.prototype.freeze=yn.prototype.freeze,yn.className="List";function Ir(a){this.eg=a,a.Sa=null,this.qa=a.Ja,this.sa=null}Ir.prototype.reset=function(){var a=this.eg;a.Sa=null,this.qa=a.Ja,this.sa=null},Ir.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)},Ir.prototype.Ad=function(){return this.next()},Ir.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},Ir.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},Ir.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},Ir.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},Ir.prototype.map=function(a){var y=this.eg;y.Sa=null;var x=new yn;for(y=y.ea;y!==null;)x.add(a(y.value)),y=y.va;return x.iterator},Ir.prototype.filter=function(a){var y=this.eg;y.Sa=null;var x=new yn;for(y=y.ea;y!==null;){var E=y.value;a(E)&&x.add(E),y=y.va}return x.iterator},Ir.prototype.de=function(){this.value=this.key=null,this.qa=-1,this.eg.Sa=this},Ir.prototype.toString=function(){return this.sa!==null?"SetIterator@"+this.sa.value:"SetIterator"},we.Object.defineProperties(Ir.prototype,{iterator:{get:function(){return this}},count:{get:function(){return this.eg.Sb}}}),Ir.prototype.first=Ir.prototype.first,Ir.prototype.hasNext=Ir.prototype.Ad,Ir.prototype.next=Ir.prototype.next,Ir.prototype.reset=Ir.prototype.reset,Ir.className="SetIterator";function mn(a){Zr(this),this._isFrozen=!1,this.Tb={},this.Sb=0,this.Sa=null,this.Ja=0,this.kf=this.ea=null,typeof a=="string"&&pe("Error: Since 2.0 List/Map/Set constructors no longer take an argument that enforces type."),a!==void 0&&this.addAll(a)}Ct=mn.prototype,Ct.xb=function(){var a=this.Ja;a++,999999999<a&&(a=0),this.Ja=a},Ct.freeze=function(){return this._isFrozen=!0,this},Ct.ka=function(){return this._isFrozen=!1,this},Ct.toString=function(){return"Set()#"+Cr(this)},Ct.add=function(a){if(a===null)return this;this._isFrozen&&Tn(this,a);var y=a;return bn(a)&&(y=Gr(a)),this.Tb[y]===void 0&&(this.Sb++,a=new Wr(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},Ct.addAll=function(a){if(a===null)return this;if(this._isFrozen&&Tn(this),Mn(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},Ct.contains=function(a){if(a===null)return!1;var y=a;return bn(a)&&(y=Cr(a),y===void 0)?!1:this.Tb[y]!==void 0},Ct.has=function(a){return this.contains(a)},Ct.Sy=function(a){if(a===null)return!0;for(a=a.iterator;a.next();)if(!this.contains(a.value))return!1;return!0},Ct.Ty=function(a){if(a===null)return!0;for(a=a.iterator;a.next();)if(this.contains(a.value))return!0;return!1},Ct.first=function(){var a=this.ea;return a===null?null:a.value},mn.prototype.any=function(a){for(var y=this.ea;y!==null;){if(a(y.value))return!0;y=y.va}return!1},mn.prototype.all=function(a){for(var y=this.ea;y!==null;){if(!a(y.value))return!1;y=y.va}return!0},mn.prototype.each=function(a){for(var y=this.ea;y!==null;)a(y.value),y=y.va;return this},mn.prototype.map=function(a){for(var y=new mn,x=this.ea;x!==null;)y.add(a(x.value)),x=x.va;return y},mn.prototype.filter=function(a){for(var y=new mn,x=this.ea;x!==null;){var E=x.value;a(E)&&y.add(E),x=x.va}return y},Ct=mn.prototype,Ct.remove=function(a){if(a===null)return!1;this._isFrozen&&Tn(this,a);var y=a;if(bn(a)&&(y=Cr(a),y===void 0)||(a=this.Tb[y],a===void 0))return!1;var x=a.va,E=a.ll;return x!==null&&(x.ll=E),E!==null&&(E.va=x),this.ea===a&&(this.ea=x),this.kf===a&&(this.kf=E),delete this.Tb[y],this.Sb--,this.xb(),!0},Ct.delete=function(a){return this.remove(a)},Ct.hp=function(a){if(a===null)return this;if(this._isFrozen&&Tn(this),Mn(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},Ct.pA=function(a){if(a===null||this.count===0)return this;this._isFrozen&&Tn(this);var y=new mn;y.addAll(a),a=[];for(var x=this.iterator;x.next();){var E=x.value;y.contains(E)||a.push(E)}return this.hp(a),this},Ct.clear=function(){this._isFrozen&&Tn(this),this.Tb={},this.Sb=0,this.Sa!==null&&this.Sa.reset(),this.kf=this.ea=null,this.xb()},mn.prototype.copy=function(){var a=new mn,y=this.Tb,x;for(x in y)a.add(y[x].value);return a},mn.prototype.Fa=function(){var a=Array(this.Sb),y=this.Tb,x=0,E;for(E in y)a[x]=y[E].value,x++;return a},mn.prototype.Hv=function(){var a=new yn,y=this.Tb,x;for(x in y)a.add(y[x].value);return a};function Zr(a){a.__gohashid=eo++}function Gr(a){var y=a.__gohashid;return y===void 0&&(y=eo++,a.__gohashid=y),y}function Cr(a){return a.__gohashid}we.Object.defineProperties(mn.prototype,{count:{get:function(){return this.Sb}},size:{get:function(){return this.Sb}},iterator:{get:function(){if(0>=this.Sb)return vr;var a=this.Sa;return a!==null?(a.reset(),a):new Ir(this)}}}),mn.prototype.toList=mn.prototype.Hv,mn.prototype.toArray=mn.prototype.Fa,mn.prototype.clear=mn.prototype.clear,mn.prototype.retainAll=mn.prototype.pA,mn.prototype.removeAll=mn.prototype.hp,mn.prototype.delete=mn.prototype.delete,mn.prototype.remove=mn.prototype.remove,mn.prototype.first=mn.prototype.first,mn.prototype.containsAny=mn.prototype.Ty,mn.prototype.containsAll=mn.prototype.Sy,mn.prototype.has=mn.prototype.has,mn.prototype.contains=mn.prototype.contains,mn.prototype.addAll=mn.prototype.addAll,mn.prototype.add=mn.prototype.add,mn.prototype.thaw=mn.prototype.ka,mn.prototype.freeze=mn.prototype.freeze;var eo=1;mn.className="Set",mn.uniqueHash=Zr,mn.hashIdUnique=Gr,mn.hashId=Cr;function Fr(a){this.ma=a,this.qa=a.Ja,this.sa=null}Fr.prototype.reset=function(){this.qa=this.ma.Ja,this.sa=null},Fr.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)},Fr.prototype.Ad=function(){return this.next()},Fr.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},Fr.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},Fr.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},Fr.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},Fr.prototype.map=function(a){var y=this.ma;this.sa=null;var x=new yn;for(y=y.ea;y!==null;)x.add(a(y.key)),y=y.va;return x.iterator},Fr.prototype.filter=function(a){var y=this.ma;this.sa=null;var x=new yn;for(y=y.ea;y!==null;){var E=y.key;a(E)&&x.add(E),y=y.va}return x.iterator},Fr.prototype.de=function(){this.value=this.key=null,this.qa=-1},Fr.prototype.toString=function(){return this.sa!==null?"MapKeySetIterator@"+this.sa.value:"MapKeySetIterator"},we.Object.defineProperties(Fr.prototype,{iterator:{get:function(){return this}},count:{get:function(){return this.ma.Sb}}}),Fr.prototype.first=Fr.prototype.first,Fr.prototype.hasNext=Fr.prototype.Ad,Fr.prototype.next=Fr.prototype.next,Fr.prototype.reset=Fr.prototype.reset,Fr.className="MapKeySetIterator";function dr(a){mn.call(this),Zr(this),this._isFrozen=!0,this.ma=a}Ce(dr,mn),Ct=dr.prototype,Ct.freeze=function(){return this},Ct.ka=function(){return this},Ct.toString=function(){return"MapKeySet("+this.ma.toString()+")"},Ct.add=function(){pe("This Set is read-only: "+this.toString())},Ct.contains=function(a){return this.ma.contains(a)},Ct.has=function(a){return this.contains(a)},Ct.remove=function(){pe("This Set is read-only: "+this.toString())},Ct.delete=function(a){return this.remove(a)},Ct.clear=function(){pe("This Set is read-only: "+this.toString())},Ct.first=function(){var a=this.ma.ea;return a!==null?a.key:null},dr.prototype.any=function(a){for(var y=this.ma.ea;y!==null;){if(a(y.key))return!0;y=y.va}return!1},dr.prototype.all=function(a){for(var y=this.ma.ea;y!==null;){if(!a(y.key))return!1;y=y.va}return!0},dr.prototype.each=function(a){for(var y=this.ma.ea;y!==null;)a(y.key),y=y.va;return this},dr.prototype.map=function(a){for(var y=new mn,x=this.ma.ea;x!==null;)y.add(a(x.key)),x=x.va;return y},dr.prototype.filter=function(a){for(var y=new mn,x=this.ma.ea;x!==null;){var E=x.key;a(E)&&y.add(E),x=x.va}return y},dr.prototype.copy=function(){return new dr(this.ma)},dr.prototype.Iv=function(){var a=new mn,y=this.ma.Tb,x;for(x in y)a.add(y[x].key);return a},dr.prototype.Fa=function(){var a=this.ma.Tb,y=Array(this.ma.Sb),x=0,E;for(E in a)y[x]=a[E].key,x++;return y},dr.prototype.Hv=function(){var a=new yn,y=this.ma.Tb,x;for(x in y)a.add(y[x].key);return a},we.Object.defineProperties(dr.prototype,{count:{get:function(){return this.ma.Sb}},size:{get:function(){return this.ma.Sb}},iterator:{get:function(){return 0>=this.ma.Sb?vr:new Fr(this.ma)}}}),dr.prototype.toList=dr.prototype.Hv,dr.prototype.toArray=dr.prototype.Fa,dr.prototype.toSet=dr.prototype.Iv,dr.prototype.first=dr.prototype.first,dr.prototype.clear=dr.prototype.clear,dr.prototype.delete=dr.prototype.delete,dr.prototype.remove=dr.prototype.remove,dr.prototype.has=dr.prototype.has,dr.prototype.contains=dr.prototype.contains,dr.prototype.add=dr.prototype.add,dr.prototype.thaw=dr.prototype.ka,dr.prototype.freeze=dr.prototype.freeze,dr.className="MapKeySet";function Nr(a){this.ma=a,a.jf=null,this.qa=a.Ja,this.sa=null}Nr.prototype.reset=function(){var a=this.ma;a.jf=null,this.qa=a.Ja,this.sa=null},Nr.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)},Nr.prototype.Ad=function(){return this.next()},Nr.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},Nr.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},Nr.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},Nr.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},Nr.prototype.map=function(a){var y=this.ma;this.sa=y.jf=null;var x=new yn;for(y=y.ea;y!==null;)x.add(a(y.value)),y=y.va;return x.iterator},Nr.prototype.filter=function(a){var y=this.ma;this.sa=y.jf=null;var x=new yn;for(y=y.ea;y!==null;){var E=y.value;a(E)&&x.add(E),y=y.va}return x.iterator},Nr.prototype.de=function(){this.value=this.key=null,this.qa=-1,this.ma.jf=this},Nr.prototype.toString=function(){return this.sa!==null?"MapValueSetIterator@"+this.sa.value:"MapValueSetIterator"},we.Object.defineProperties(Nr.prototype,{iterator:{get:function(){return this}},count:{get:function(){return this.ma.Sb}}}),Nr.prototype.first=Nr.prototype.first,Nr.prototype.hasNext=Nr.prototype.Ad,Nr.prototype.next=Nr.prototype.next,Nr.prototype.reset=Nr.prototype.reset,Nr.className="MapValueSetIterator";function Wr(a,y){this.key=a,this.value=y,this.ll=this.va=null}Wr.prototype.toString=function(){return"{"+this.key+":"+this.value+"}"},Wr.className="KeyValuePair";function Dr(a){this.ma=a,a.Sa=null,this.qa=a.Ja,this.sa=null}Dr.prototype.reset=function(){var a=this.ma;a.Sa=null,this.qa=a.Ja,this.sa=null},Dr.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)},Dr.prototype.Ad=function(){return this.next()},Dr.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},Dr.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},Dr.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},Dr.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},Dr.prototype.map=function(a){var y=this.ma;this.sa=y.Sa=null;var x=new yn;for(y=y.ea;y!==null;)x.add(a(y)),y=y.va;return x.iterator},Dr.prototype.filter=function(a){var y=this.ma;this.sa=y.Sa=null;var x=new yn;for(y=y.ea;y!==null;)a(y)&&x.add(y),y=y.va;return x.iterator},Dr.prototype.de=function(){this.value=this.key=null,this.qa=-1,this.ma.Sa=this},Dr.prototype.toString=function(){return this.sa!==null?"MapIterator@"+this.sa:"MapIterator"},we.Object.defineProperties(Dr.prototype,{iterator:{get:function(){return this}},count:{get:function(){return this.ma.Sb}}}),Dr.prototype.first=Dr.prototype.first,Dr.prototype.hasNext=Dr.prototype.Ad,Dr.prototype.next=Dr.prototype.next,Dr.prototype.reset=Dr.prototype.reset,Dr.className="MapIterator";function yi(a){Zr(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"&&pe("Error: Since 2.0 List/Map/Set constructors no longer take an argument that enforces type."),a!==void 0&&this.addAll(a)}Ct=yi.prototype,Ct.xb=function(){var a=this.Ja;a++,999999999<a&&(a=0),this.Ja=a},Ct.freeze=function(){return this._isFrozen=!0,this},Ct.ka=function(){return this._isFrozen=!1,this},Ct.toString=function(){return"Map()#"+Cr(this)},Ct.add=function(a,y){this._isFrozen&&Tn(this,a);var x=a;bn(a)&&(x=Gr(a));var E=this.Tb[x];return E===void 0?(this.Sb++,a=new Wr(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()):E.value=y,this},Ct.set=function(a,y){return this.add(a,y)},Ct.addAll=function(a){if(a===null)return this;if(Mn(a))for(var y=a.length,x=0;x<y;x++){var E=a[x];this.add(E.key,E.value)}else if(a instanceof yi)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},Ct.first=function(){return this.ea},yi.prototype.any=function(a){for(var y=this.ea;y!==null;){if(a(y))return!0;y=y.va}return!1},yi.prototype.all=function(a){for(var y=this.ea;y!==null;){if(!a(y))return!1;y=y.va}return!0},yi.prototype.each=function(a){for(var y=this.ea;y!==null;)a(y),y=y.va;return this},yi.prototype.map=function(a){for(var y=new yi,x=this.ea;x!==null;)y.add(x.key,a(x)),x=x.va;return y},yi.prototype.filter=function(a){for(var y=new yi,x=this.ea;x!==null;)a(x)&&y.add(x.key,x.value),x=x.va;return y},Ct=yi.prototype,Ct.contains=function(a){var y=a;return bn(a)&&(y=Cr(a),y===void 0)?!1:this.Tb[y]!==void 0},Ct.has=function(a){return this.contains(a)},Ct.I=function(a){var y=a;return bn(a)&&(y=Cr(a),y===void 0)?null:(a=this.Tb[y],a===void 0?null:a.value)},Ct.get=function(a){return this.I(a)},Ct.remove=function(a){if(a===null)return!1;this._isFrozen&&Tn(this,a);var y=a;if(bn(a)&&(y=Cr(a),y===void 0)||(a=this.Tb[y],a===void 0))return!1;var x=a.va,E=a.ll;return x!==null&&(x.ll=E),E!==null&&(E.va=x),this.ea===a&&(this.ea=x),this.kf===a&&(this.kf=E),delete this.Tb[y],this.Sb--,this.xb(),!0},Ct.delete=function(a){return this.remove(a)},Ct.clear=function(){this._isFrozen&&Tn(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()},yi.prototype.copy=function(){var a=new yi,y=this.Tb,x;for(x in y){var E=y[x];a.add(E.key,E.value)}return a},yi.prototype.Fa=function(){var a=this.Tb,y=Array(this.Sb),x=0,E;for(E in a){var b=a[E];y[x]=new Wr(b.key,b.value),x++}return y},yi.prototype.Lf=function(){return new dr(this)},we.Object.defineProperties(yi.prototype,{count:{get:function(){return this.Sb}},size:{get:function(){return this.Sb}},iterator:{get:function(){if(0>=this.count)return vr;var a=this.Sa;return a!==null?(a.reset(),a):new Dr(this)}},iteratorKeys:{get:function(){return 0>=this.count?vr:new Fr(this)}},iteratorValues:{get:function(){if(0>=this.count)return vr;var a=this.jf;return a!==null?(a.reset(),a):new Nr(this)}}}),yi.prototype.toKeySet=yi.prototype.Lf,yi.prototype.toArray=yi.prototype.Fa,yi.prototype.clear=yi.prototype.clear,yi.prototype.delete=yi.prototype.delete,yi.prototype.remove=yi.prototype.remove,yi.prototype.get=yi.prototype.get,yi.prototype.getValue=yi.prototype.I,yi.prototype.has=yi.prototype.has,yi.prototype.contains=yi.prototype.contains,yi.prototype.first=yi.prototype.first,yi.prototype.addAll=yi.prototype.addAll,yi.prototype.set=yi.prototype.set,yi.prototype.add=yi.prototype.add,yi.prototype.thaw=yi.prototype.ka,yi.prototype.freeze=yi.prototype.freeze,yi.className="Map";function Gt(a,y){a===void 0?this.y=this.x=0:typeof a=="number"&&typeof y=="number"?(this.x=a,this.y=y):pe("Invalid arguments to Point constructor: "+a+", "+y),this._isFrozen=!1}var Fo,vo,Oo,ua,uo;Gt.prototype.assign=function(a){return this.x=a.x,this.y=a.y,this},Gt.prototype.h=function(a,y){return this.x=a,this.y=y,this},Gt.prototype.sg=function(a,y){return this.x=a,this.y=y,this},Gt.prototype.set=function(a){return this.x=a.x,this.y=a.y,this},Gt.prototype.copy=function(){var a=new Gt;return a.x=this.x,a.y=this.y,a},Ct=Gt.prototype,Ct.ja=function(){return this._isFrozen=!0,Object.freeze(this),this},Ct.J=function(){return this._isFrozen||Object.isFrozen(this)?this:this.copy().freeze()},Ct.freeze=function(){return this._isFrozen=!0,this},Ct.ka=function(){return Object.isFrozen(this)&&pe("cannot thaw constant: "+this),this._isFrozen=!1,this};function Qo(a){if(typeof a=="string"){a=a.split(" ");for(var y=0,x=0;a[y]==="";)y++;var E=a[y++];E&&(x=parseFloat(E));for(var b=0;a[y]==="";)y++;return(E=a[y++])&&(b=parseFloat(E)),new Gt(x,b)}return new Gt}function $t(a){return a.x.toString()+" "+a.y.toString()}Ct.toString=function(){return"Point("+this.x+","+this.y+")"},Ct.D=function(a){return a instanceof Gt?this.x===a.x&&this.y===a.y:!1},Ct.hi=function(a,y){return this.x===a&&this.y===y},Ct.Xa=function(a){return Se.B(this.x,a.x)&&Se.B(this.y,a.y)},Ct.add=function(a){return this.x+=a.x,this.y+=a.y,this},Ct.re=function(a){return this.x-=a.x,this.y-=a.y,this},Ct.offset=function(a,y){return this.x+=a,this.y+=y,this},Gt.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 E=1}else a===180?(a=-1,E=0):a===270?(a=0,E=-1):(E=a*Math.PI/180,a=Math.cos(E),E=Math.sin(E));return this.x=a*y-E*x,this.y=E*y+a*x,this},Ct=Gt.prototype,Ct.scale=function(a,y){return this.x*=a,this.y*=y,this},Ct.Bf=function(a){var y=a.x-this.x;return a=a.y-this.y,y*y+a*a},Ct.zd=function(a,y){return a-=this.x,y-=this.y,a*a+y*y},Ct.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},Ct.ab=function(a){return Wn(a.x-this.x,a.y-this.y)},Ct.direction=function(a,y){return Wn(a-this.x,y-this.y)};function Wn(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}Ct.Ry=function(a,y){return Se.Fl(a.x,a.y,y.x,y.y,this.x,this.y)},Ct.fA=function(a,y,x,E){return Se.qh(a,y,x,E,this.x,this.y,this),this},Ct.gA=function(a,y){return Se.qh(a.x,a.y,y.x,y.y,this.x,this.y,this),this},Ct.uA=function(a,y,x,E){return Se.No(this.x,this.y,a,y,x,E,this),this},Ct.vA=function(a,y){return Se.No(this.x,this.y,a.x,a.y,y.width,y.height,this),this},Ct.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},Ct.yi=function(a,y,x,E,b){return this.x=a+b.x*x+b.offsetX,this.y=y+b.y*E+b.offsetY,this},Ct.transform=function(a){return a.Ga(this),this};function In(a,y){return y.Cd(a),a}function si(a,y,x,E,b,z){var tt=b-x,rt=z-E,ot=tt*tt+rt*rt;x-=a,E-=y;var st=-x*tt-E*rt;return 0>=st||st>=ot?(tt=b-a,rt=z-y,Math.min(x*x+E*E,tt*tt+rt*rt)):(a=tt*E-rt*x,a*a/ot)}function Ln(a,y,x,E){return a=x-a,y=E-y,a*a+y*y}function Zn(a,y,x,E){return a=x-a,y=E-y,a===0?0<y?90:0>y?270:0:y===0?0<a?0:180:isNaN(a)||isNaN(y)?0:(E=180*Math.atan(Math.abs(y/a))/Math.PI,0>a?E=0>y?E+180:180-E:0>y&&(E=360-E),E)}Ct.w=function(){return isFinite(this.x)&&isFinite(this.y)},Gt.alloc=function(){var a=jn.pop();return a===void 0?new Gt:a},Gt.allocAt=function(a,y){var x=jn.pop();return x===void 0?new Gt(a,y):(x.x=a,x.y=y,x)},Gt.free=function(a){jn.push(a)},Gt.prototype.isReal=Gt.prototype.w,Gt.prototype.setSpot=Gt.prototype.yi,Gt.prototype.setRectSpot=Gt.prototype.xi,Gt.prototype.snapToGridPoint=Gt.prototype.vA,Gt.prototype.snapToGrid=Gt.prototype.uA,Gt.prototype.projectOntoLineSegmentPoint=Gt.prototype.gA,Gt.prototype.projectOntoLineSegment=Gt.prototype.fA,Gt.intersectingLineSegments=function(a,y,x,E,b,z,tt,rt){return Se.Rl(a,y,x,E,b,z,tt,rt)},Gt.prototype.compareWithLineSegmentPoint=Gt.prototype.Ry,Gt.compareWithLineSegment=function(a,y,x,E,b,z){return Se.Fl(a,y,x,E,b,z)},Gt.prototype.direction=Gt.prototype.direction,Gt.prototype.directionPoint=Gt.prototype.ab,Gt.prototype.normalize=Gt.prototype.normalize,Gt.prototype.distanceSquared=Gt.prototype.zd,Gt.prototype.distanceSquaredPoint=Gt.prototype.Bf,Gt.prototype.scale=Gt.prototype.scale,Gt.prototype.rotate=Gt.prototype.rotate,Gt.prototype.offset=Gt.prototype.offset,Gt.prototype.subtract=Gt.prototype.re,Gt.prototype.add=Gt.prototype.add,Gt.prototype.equalsApprox=Gt.prototype.Xa,Gt.prototype.equalTo=Gt.prototype.hi,Gt.prototype.equals=Gt.prototype.D,Gt.prototype.set=Gt.prototype.set,Gt.prototype.setTo=Gt.prototype.sg;var jn=[];Gt.className="Point",Gt.parse=Qo,Gt.stringify=$t,Gt.distanceLineSegmentSquared=si,Gt.distanceSquared=Ln,Gt.direction=Zn,Gt.Origin=Fo=new Gt(0,0).ja(),Gt.InfiniteTopLeft=vo=new Gt(-1/0,-1/0).ja(),Gt.InfiniteBottomRight=Oo=new Gt(1/0,1/0).ja(),Gt.SixPoint=ua=new Gt(6,6).ja(),Gt.NoPoint=uo=new Gt(NaN,NaN).ja(),Gt.parse=Qo,Gt.stringify=$t,Gt.distanceLineSegmentSquared=si,Gt.distanceSquared=Ln,Gt.direction=Zn;function Re(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):pe("Invalid arguments to Size constructor: "+a+", "+y),this._isFrozen=!1}var Nn,bi,cr,Yi,Bi,Sr,br;Re.prototype.assign=function(a){return this.width=a.width,this.height=a.height,this},Re.prototype.h=function(a,y){return this.width=a,this.height=y,this},Re.prototype.sg=function(a,y){return this.width=a,this.height=y,this},Re.prototype.set=function(a){return this.width=a.width,this.height=a.height,this},Re.prototype.copy=function(){var a=new Re;return a.width=this.width,a.height=this.height,a},Ct=Re.prototype,Ct.ja=function(){return this._isFrozen=!0,Object.freeze(this),this},Ct.J=function(){return this._isFrozen||Object.isFrozen(this)?this:this.copy().freeze()},Ct.freeze=function(){return this._isFrozen=!0,this},Ct.ka=function(){return Object.isFrozen(this)&&pe("cannot thaw constant: "+this),this._isFrozen=!1,this};function ho(a){if(typeof a=="string"){a=a.split(" ");for(var y=0,x=0;a[y]==="";)y++;var E=a[y++];E&&(x=parseFloat(E));for(var b=0;a[y]==="";)y++;return(E=a[y++])&&(b=parseFloat(E)),new Re(x,b)}return new Re}function Co(a){return a.width.toString()+" "+a.height.toString()}Ct.toString=function(){return"Size("+this.width+","+this.height+")"},Ct.D=function(a){return a instanceof Re?this.width===a.width&&this.height===a.height:!1},Ct.hi=function(a,y){return this.width===a&&this.height===y},Ct.Xa=function(a){return Se.B(this.width,a.width)&&Se.B(this.height,a.height)},Ct.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},Ct.w=function(){return isFinite(this.width)&&isFinite(this.height)},Re.alloc=function(){var a=wa.pop();return a===void 0?new Re:a},Re.free=function(a){wa.push(a)},Re.prototype.isReal=Re.prototype.w,Re.prototype.inflate=Re.prototype.Bc,Re.prototype.equalsApprox=Re.prototype.Xa,Re.prototype.equalTo=Re.prototype.hi,Re.prototype.equals=Re.prototype.D,Re.prototype.set=Re.prototype.set,Re.prototype.setTo=Re.prototype.sg;var wa=[];Re.className="Size",Re.parse=ho,Re.stringify=Co,Re.ZeroSize=Nn=new Re(0,0).ja(),Re.OneSize=bi=new Re(1,1).ja(),Re.SixSize=cr=new Re(6,6).ja(),Re.EightSize=Yi=new Re(8,8).ja(),Re.TenSize=Bi=new Re(10,10).ja(),Re.InfiniteSize=Sr=new Re(1/0,1/0).ja(),Re.NoSize=br=new Re(NaN,NaN).ja(),Re.parse=ho,Re.stringify=Co;function Ye(a,y,x,E){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 E=="number"&&(0<=E||isNaN(E))?(this.x=a,this.y=y,this.width=x,this.height=E):a instanceof Gt?(x=a.x,a=a.y,y instanceof Gt?(E=y.x,y=y.y,this.x=Math.min(x,E),this.y=Math.min(a,y),this.width=Math.abs(x-E),this.height=Math.abs(a-y)):y instanceof Re?(this.x=x,this.y=a,this.width=y.width,this.height=y.height):pe("Incorrect second argument supplied to Rect constructor "+y)):pe("Invalid arguments to Rect constructor: "+a+", "+y+", "+x+", "+E),this._isFrozen=!1}Ct=Ye.prototype,Ct.assign=function(a){return this.x=a.x,this.y=a.y,this.width=a.width,this.height=a.height,this},Ct.h=function(a,y,x,E){return this.x=a,this.y=y,this.width=x,this.height=E,this};function Go(a,y,x){a.width=y,a.height=x}Ct.sg=function(a,y,x,E){return this.x=a,this.y=y,this.width=x,this.height=E,this},Ct.set=function(a){return this.x=a.x,this.y=a.y,this.width=a.width,this.height=a.height,this},Ct.dd=function(a){return this.x=a.x,this.y=a.y,this},Ct.tA=function(a){return this.width=a.width,this.height=a.height,this},Ye.prototype.copy=function(){var a=new Ye;return a.x=this.x,a.y=this.y,a.width=this.width,a.height=this.height,a},Ct=Ye.prototype,Ct.ja=function(){return this._isFrozen=!0,Object.freeze(this),this},Ct.J=function(){return this._isFrozen||Object.isFrozen(this)?this:this.copy().freeze()},Ct.freeze=function(){return this._isFrozen=!0,this},Ct.ka=function(){return Object.isFrozen(this)&&pe("cannot thaw constant: "+this),this._isFrozen=!1,this};function Nl(a){if(typeof a=="string"){a=a.split(" ");for(var y=0,x=0;a[y]==="";)y++;var E=a[y++];E&&(x=parseFloat(E));for(var b=0;a[y]==="";)y++;(E=a[y++])&&(b=parseFloat(E));for(var z=0;a[y]==="";)y++;(E=a[y++])&&(z=parseFloat(E));for(var tt=0;a[y]==="";)y++;return(E=a[y++])&&(tt=parseFloat(E)),new Ye(x,b,z,tt)}return new Ye}function Ss(a){return a.x.toString()+" "+a.y.toString()+" "+a.width.toString()+" "+a.height.toString()}Ct.toString=function(){return"Rect("+this.x+","+this.y+","+this.width+","+this.height+")"},Ct.D=function(a){return a instanceof Ye?this.x===a.x&&this.y===a.y&&this.width===a.width&&this.height===a.height:!1},Ct.hi=function(a,y,x,E){return this.x===a&&this.y===y&&this.width===x&&this.height===E},Ct.Xa=function(a){return Se.B(this.x,a.x)&&Se.B(this.y,a.y)&&Se.B(this.width,a.width)&&Se.B(this.height,a.height)};function rl(a,y){return Se.$(a.x,y.x)&&Se.$(a.y,y.y)&&Se.$(a.width,y.width)&&Se.$(a.height,y.height)}Ct.ca=function(a){return this.x<=a.x&&this.x+this.width>=a.x&&this.y<=a.y&&this.y+this.height>=a.y},Ct.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},Ct.contains=function(a,y,x,E){return x===void 0&&(x=0),E===void 0&&(E=0),this.x<=a&&a+x<=this.x+this.width&&this.y<=y&&y+E<=this.y+this.height},Ct.offset=function(a,y){return this.x+=a,this.y+=y,this},Ct.Bc=function(a,y){return yo(this,y,a,y,a)},Ct.Co=function(a){return yo(this,a.top,a.right,a.bottom,a.left)},Ct.Fv=function(a){return yo(this,-a.top,-a.right,-a.bottom,-a.left)},Ct.Hz=function(a,y,x,E){return yo(this,a,y,x,E)};function yo(a,y,x,E,b){var z=a.width;return x+b<=-z?(a.x+=z/2,a.width=0):(a.x-=b,a.width+=x+b),x=a.height,y+E<=-x?(a.y+=x/2,a.height=0):(a.y-=y,a.height+=y+E),a}Ct.Ex=function(a){return Tu(this,a.x,a.y,a.width,a.height)},Ct.Uu=function(a,y,x,E){return Tu(this,a,y,x,E)};function Tu(a,y,x,E,b){var z=Math.max(a.x,y),tt=Math.max(a.y,x);return y=Math.min(a.x+a.width,y+E),x=Math.min(a.y+a.height,x+b),a.x=z,a.y=tt,a.width=Math.max(0,y-z),a.height=Math.max(0,x-tt),a}Ct.Yc=function(a){return this.Vu(a.x,a.y,a.width,a.height)},Ct.Vu=function(a,y,x,E){var b=this.width,z=this.x;return b!==1/0&&x!==1/0&&(b+=z,x+=a,isNaN(x)||isNaN(b)||z>x||a>b)?!1:(a=this.height,x=this.y,!(a!==1/0&&E!==1/0&&(a+=x,E+=y,isNaN(E)||isNaN(a)||x>E||y>a)))};function ao(a,y){var x=a.width,E=a.x,b=y.x-10;return E>y.width+10+10+b||b>x+E?!1:(x=a.height,a=a.y,E=y.y-10,!(a>y.height+10+10+E||E>x+a))}Ct.Ye=function(a){return Ar(this,a.x,a.y,0,0)},Ct.ed=function(a){return Ar(this,a.x,a.y,a.width,a.height)},Ct.Kv=function(a,y,x,E){return x===void 0&&(x=0),E===void 0&&(E=0),Ar(this,a,y,x,E)};function Ar(a,y,x,E,b){var z=Math.min(a.x,y),tt=Math.min(a.y,x);return y=Math.max(a.x+a.width,y+E),x=Math.max(a.y+a.height,x+b),a.x=z,a.y=tt,a.width=y-z,a.height=x-tt,a}Ct.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 Vr(a,y,x,E,b,z,tt,rt){return tt===void 0&&(tt=0),rt===void 0&&(rt=0),a<=b&&b+tt<=a+x&&y<=z&&z+rt<=y+E}function Ro(a,y,x,E,b,z,tt,rt){return a>tt+b||b>x+a?!1:!(y>rt+z||z>E+y)}Ct.w=function(){return isFinite(this.x)&&isFinite(this.y)&&isFinite(this.width)&&isFinite(this.height)},Ct.Mz=function(){return this.width===0&&this.height===0},Ye.alloc=function(){var a=Po.pop();return a===void 0?new Ye:a},Ye.allocAt=function(a,y,x,E){var b=Po.pop();return b===void 0?new Ye(a,y,x,E):b.h(a,y,x,E)},Ye.free=function(a){Po.push(a)},we.Object.defineProperties(Ye.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 Gt(this.x,this.y)},set:function(a){this.x=a.x,this.y=a.y}},size:{get:function(){return new Re(this.width,this.height)},set:function(a){this.width=a.width,this.height=a.height}},center:{get:function(){return new Gt(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}}}),Ye.prototype.isEmpty=Ye.prototype.Mz,Ye.prototype.isReal=Ye.prototype.w,Ye.intersectsLineSegment=function(a,y,x,E,b,z,tt,rt){return Se.Fx(a,y,x,E,b,z,tt,rt)},Ye.prototype.setSpot=Ye.prototype.yi,Ye.prototype.union=Ye.prototype.Kv,Ye.prototype.unionRect=Ye.prototype.ed,Ye.prototype.unionPoint=Ye.prototype.Ye,Ye.prototype.intersects=Ye.prototype.Vu,Ye.prototype.intersectsRect=Ye.prototype.Yc,Ye.prototype.intersect=Ye.prototype.Uu,Ye.prototype.intersectRect=Ye.prototype.Ex,Ye.prototype.grow=Ye.prototype.Hz,Ye.prototype.subtractMargin=Ye.prototype.Fv,Ye.prototype.addMargin=Ye.prototype.Co,Ye.prototype.inflate=Ye.prototype.Bc,Ye.prototype.offset=Ye.prototype.offset,Ye.prototype.contains=Ye.prototype.contains,Ye.prototype.containsRect=Ye.prototype.Re,Ye.prototype.containsPoint=Ye.prototype.ca,Ye.prototype.equalsApprox=Ye.prototype.Xa,Ye.prototype.equalTo=Ye.prototype.hi,Ye.prototype.equals=Ye.prototype.D,Ye.prototype.setSize=Ye.prototype.tA,Ye.prototype.setPoint=Ye.prototype.dd,Ye.prototype.set=Ye.prototype.set,Ye.prototype.setTo=Ye.prototype.sg;var Ho=null,va=null,Po=[];Ye.className="Rect",Ye.parse=Nl,Ye.stringify=Ss,Ye.contains=Vr,Ye.intersects=Ro,Ye.ZeroRect=Ho=new Ye(0,0,0,0).ja(),Ye.NoRect=va=new Ye(NaN,NaN,NaN,NaN).ja(),Ye.parse=Nl,Ye.stringify=Ss,Ye.contains=Vr,Ye.intersects=Ro;function Di(a,y,x,E){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):E!==void 0?(this.top=a,this.right=y,this.bottom=x,this.left=E):pe("Invalid arguments to Margin constructor: "+a+", "+y+", "+x+", "+E),this._isFrozen=!1}Di.prototype.assign=function(a){return this.top=a.top,this.right=a.right,this.bottom=a.bottom,this.left=a.left,this},Di.prototype.sg=function(a,y,x,E){return this.top=a,this.right=y,this.bottom=x,this.left=E,this},Di.prototype.set=function(a){return this.top=a.top,this.right=a.right,this.bottom=a.bottom,this.left=a.left,this},Di.prototype.copy=function(){var a=new Di;return a.top=this.top,a.right=this.right,a.bottom=this.bottom,a.left=this.left,a},Ct=Di.prototype,Ct.ja=function(){return this._isFrozen=!0,Object.freeze(this),this},Ct.J=function(){return this._isFrozen||Object.isFrozen(this)?this:this.copy().freeze()},Ct.freeze=function(){return this._isFrozen=!0,this},Ct.ka=function(){return Object.isFrozen(this)&&pe("cannot thaw constant: "+this),this._isFrozen=!1,this};function Va(a){if(typeof a=="string"){a=a.split(" ");for(var y=0,x=NaN;a[y]==="";)y++;var E=a[y++];if(E&&(x=parseFloat(E)),isNaN(x))return new Di;for(var b=NaN;a[y]==="";)y++;if((E=a[y++])&&(b=parseFloat(E)),isNaN(b))return new Di(x);for(var z=NaN;a[y]==="";)y++;if((E=a[y++])&&(z=parseFloat(E)),isNaN(z))return new Di(x,b);for(var tt=NaN;a[y]==="";)y++;return(E=a[y++])&&(tt=parseFloat(E)),isNaN(tt)?new Di(x,b):new Di(x,b,z,tt)}return new Di}function yl(a){return a.top.toString()+" "+a.right.toString()+" "+a.bottom.toString()+" "+a.left.toString()}Ct.toString=function(){return"Margin("+this.top+","+this.right+","+this.bottom+","+this.left+")"},Ct.D=function(a){return a instanceof Di?this.top===a.top&&this.right===a.right&&this.bottom===a.bottom&&this.left===a.left:!1},Ct.hi=function(a,y,x,E){return this.top===a&&this.right===y&&this.bottom===x&&this.left===E},Ct.Xa=function(a){return Se.B(this.top,a.top)&&Se.B(this.right,a.right)&&Se.B(this.bottom,a.bottom)&&Se.B(this.left,a.left)},Ct.w=function(){return isFinite(this.top)&&isFinite(this.right)&&isFinite(this.bottom)&&isFinite(this.left)},Di.alloc=function(){var a=Tl.pop();return a===void 0?new Di:a},Di.free=function(a){Tl.push(a)},Di.prototype.isReal=Di.prototype.w,Di.prototype.equalsApprox=Di.prototype.Xa,Di.prototype.equalTo=Di.prototype.hi,Di.prototype.equals=Di.prototype.D,Di.prototype.set=Di.prototype.set,Di.prototype.setTo=Di.prototype.sg;var xs=null,Dl=null,Tl=[];Di.className="Margin",Di.parse=Va,Di.stringify=yl,Di.ZeroMargin=xs=new Di(0,0,0,0).ja(),Di.TwoMargin=Dl=new Di(2,2,2,2).ja(),Di.parse=Va,Di.stringify=yl;function pi(a,y,x,E){a===void 0?this.offsetY=this.offsetX=this.y=this.x=0:(y===void 0&&(y=0),x===void 0&&(x=0),E===void 0&&(E=0),this.x=a,this.y=y,this.offsetX=x,this.offsetY=E),this._isFrozen=!1}var No,wo,Ta,Xh,_h,Br,Jh,Ql,Ko,Rs,Pu,gh,js,Ps,jd,Dc,zd,Nf,Tc,Gd,Ia,Sl,Ic,ql,Oc,ha,Tg,Df,Qh,qh,$a,us,Aa,Ua,Rc,$h;pi.prototype.assign=function(a){return this.x=a.x,this.y=a.y,this.offsetX=a.offsetX,this.offsetY=a.offsetY,this},pi.prototype.sg=function(a,y,x,E){return this.x=a,this.y=y,this.offsetX=x,this.offsetY=E,this},pi.prototype.set=function(a){return this.x=a.x,this.y=a.y,this.offsetX=a.offsetX,this.offsetY=a.offsetY,this},pi.prototype.copy=function(){var a=new pi;return a.x=this.x,a.y=this.y,a.offsetX=this.offsetX,a.offsetY=this.offsetY,a},Ct=pi.prototype,Ct.ja=function(){return this._isFrozen=!0,Object.freeze(this),this},Ct.J=function(){return this._isFrozen||Object.isFrozen(this)?this:this.copy().freeze()},Ct.freeze=function(){return this._isFrozen=!0,this},Ct.ka=function(){return Object.isFrozen(this)&&pe("cannot thaw constant: "+this),this._isFrozen=!1,this};function Zo(a,y){return a.x=NaN,a.y=NaN,a.offsetX=y,a}function jc(a){if(typeof a=="string"){if(a=a.trim(),a==="None")return No;if(a==="TopLeft")return wo;if(a==="Top"||a==="TopCenter"||a==="MiddleTop")return Ta;if(a==="TopRight")return Xh;if(a==="Left"||a==="LeftCenter"||a==="MiddleLeft")return _h;if(a==="Center")return Br;if(a==="Right"||a==="RightCenter"||a==="MiddleRight")return Jh;if(a==="BottomLeft")return Ql;if(a==="Bottom"||a==="BottomCenter"||a==="MiddleBottom")return Ko;if(a==="BottomRight")return Rs;if(a==="TopSide")return Pu;if(a==="LeftSide")return gh;if(a==="RightSide")return js;if(a==="BottomSide")return Ps;if(a==="TopBottomSides")return jd;if(a==="LeftRightSides")return Dc;if(a==="TopLeftSides")return zd;if(a==="TopRightSides")return Nf;if(a==="BottomLeftSides")return Tc;if(a==="BottomRightSides")return Gd;if(a==="NotTopSide")return Ia;if(a==="NotLeftSide")return Sl;if(a==="NotRightSide")return Ic;if(a==="NotBottomSide")return ql;if(a==="AllSides")return Oc;if(a==="Default")return ha;a=a.split(" ");for(var y=0,x=0;a[y]==="";)y++;var E=a[y++];E!==void 0&&0<E.length&&(x=parseFloat(E));for(var b=0;a[y]==="";)y++;E=a[y++],E!==void 0&&0<E.length&&(b=parseFloat(E));for(var z=0;a[y]==="";)y++;E=a[y++],E!==void 0&&0<E.length&&(z=parseFloat(E));for(var tt=0;a[y]==="";)y++;return E=a[y++],E!==void 0&&0<E.length&&(tt=parseFloat(E)),new pi(x,b,z,tt)}return new pi}function zc(a){return a.sb()?a.x.toString()+" "+a.y.toString()+" "+a.offsetX.toString()+" "+a.offsetY.toString():a.toString()}Ct.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(No)?"None":this.D(wo)?"TopLeft":this.D(Ta)?"Top":this.D(Xh)?"TopRight":this.D(_h)?"Left":this.D(Br)?"Center":this.D(Jh)?"Right":this.D(Ql)?"BottomLeft":this.D(Ko)?"Bottom":this.D(Rs)?"BottomRight":this.D(Pu)?"TopSide":this.D(gh)?"LeftSide":this.D(js)?"RightSide":this.D(Ps)?"BottomSide":this.D(jd)?"TopBottomSides":this.D(Dc)?"LeftRightSides":this.D(zd)?"TopLeftSides":this.D(Nf)?"TopRightSides":this.D(Tc)?"BottomLeftSides":this.D(Gd)?"BottomRightSides":this.D(Ia)?"NotTopSide":this.D(Sl)?"NotLeftSide":this.D(Ic)?"NotRightSide":this.D(ql)?"NotBottomSide":this.D(Oc)?"AllSides":this.D(ha)?"Default":"None"},Ct.D=function(a){return a instanceof pi?(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},Ct.gv=function(){return new pi(.5-(this.x-.5),.5-(this.y-.5),-this.offsetX,-this.offsetY)},Ct.Hf=function(a){if(!this.$c())return!1;if(!a.$c())if(a.D(Tg))a=gh;else if(a.D(Df))a=js;else if(a.D(Qh))a=Pu;else if(a.D(qh))a=Ps;else return!1;return a=a.offsetY,(this.offsetY&a)===a},Ct.sb=function(){return!isNaN(this.x)&&!isNaN(this.y)},Ct.Mc=function(){return isNaN(this.x)||isNaN(this.y)},Ct.$c=function(){return isNaN(this.x)&&isNaN(this.y)&&this.offsetX===1&&this.offsetY!==0},Ct.ys=function(){return isNaN(this.x)&&isNaN(this.y)&&this.offsetX===0&&this.offsetY===0},Ct.Xb=function(){return isNaN(this.x)&&isNaN(this.y)&&this.offsetX===-1&&this.offsetY===0},pi.alloc=function(){var a=Iu.pop();return a===void 0?new pi:a},pi.free=function(a){Iu.push(a)},pi.prototype.isDefault=pi.prototype.Xb,pi.prototype.isNone=pi.prototype.ys,pi.prototype.isSide=pi.prototype.$c,pi.prototype.isNoSpot=pi.prototype.Mc,pi.prototype.isSpot=pi.prototype.sb,pi.prototype.includesSide=pi.prototype.Hf,pi.prototype.opposite=pi.prototype.gv,pi.prototype.equals=pi.prototype.D,pi.prototype.set=pi.prototype.set,pi.prototype.setTo=pi.prototype.sg;var Iu=[];pi.className="Spot",pi.parse=jc,pi.stringify=zc,pi.None=No=Zo(new pi(0,0,0,0),0).ja(),pi.Default=ha=Zo(new pi(0,0,-1,0),-1).ja(),pi.TopLeft=wo=new pi(0,0,0,0).ja(),pi.TopCenter=Ta=new pi(.5,0,0,0).ja(),pi.TopRight=Xh=new pi(1,0,0,0).ja(),pi.LeftCenter=_h=new pi(0,.5,0,0).ja(),pi.Center=Br=new pi(.5,.5,0,0).ja(),pi.RightCenter=Jh=new pi(1,.5,0,0).ja(),pi.BottomLeft=Ql=new pi(0,1,0,0).ja(),pi.BottomCenter=Ko=new pi(.5,1,0,0).ja(),pi.BottomRight=Rs=new pi(1,1,0,0).ja(),pi.MiddleTop=$a=Ta,pi.MiddleLeft=us=_h,pi.MiddleRight=Aa=Jh,pi.MiddleBottom=Ua=Ko,pi.Top=Qh=Ta,pi.Left=Tg=_h,pi.Right=Df=Jh,pi.Bottom=qh=Ko,pi.TopSide=Pu=Zo(new pi(0,0,1,1),1).ja(),pi.LeftSide=gh=Zo(new pi(0,0,1,2),1).ja(),pi.RightSide=js=Zo(new pi(0,0,1,4),1).ja(),pi.BottomSide=Ps=Zo(new pi(0,0,1,8),1).ja(),pi.TopBottomSides=jd=Zo(new pi(0,0,1,9),1).ja(),pi.LeftRightSides=Dc=Zo(new pi(0,0,1,6),1).ja(),pi.TopLeftSides=zd=Zo(new pi(0,0,1,3),1).ja(),pi.TopRightSides=Nf=Zo(new pi(0,0,1,5),1).ja(),pi.BottomLeftSides=Tc=Zo(new pi(0,0,1,10),1).ja(),pi.BottomRightSides=Gd=Zo(new pi(0,0,1,12),1).ja(),pi.NotTopSide=Ia=Zo(new pi(0,0,1,14),1).ja(),pi.NotLeftSide=Sl=Zo(new pi(0,0,1,13),1).ja(),pi.NotRightSide=Ic=Zo(new pi(0,0,1,11),1).ja(),pi.NotBottomSide=ql=Zo(new pi(0,0,1,7),1).ja(),pi.AllSides=Oc=Zo(new pi(0,0,1,15),1).ja(),Rc=new pi(.156,.156).ja(),$h=new pi(.844,.844).ja(),pi.parse=jc,pi.stringify=zc;function Xi(){this.m11=1,this.m21=this.m12=0,this.m22=1,this.dy=this.dx=0}Xi.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},Xi.prototype.setTransform=function(a,y,x,E,b,z){return this.m11=a,this.m12=y,this.m21=x,this.m22=E,this.dx=b,this.dy=z,this},Xi.prototype.copy=function(){var a=new Xi;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},Xi.prototype.toString=function(){return"Transform("+this.m11+","+this.m12+","+this.m21+","+this.m22+","+this.dx+","+this.dy+")"},Xi.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},Xi.prototype.ws=function(){return this.dx===0&&this.dy===0&&this.m11===1&&this.m12===0&&this.m21===0&&this.m22===1},Xi.prototype.reset=function(){return this.m11=1,this.m21=this.m12=0,this.m22=1,this.dy=this.dx=0,this},Xi.prototype.multiply=function(a){var y=this.m11*a.m11+this.m21*a.m12,x=this.m12*a.m11+this.m22*a.m12,E=this.m11*a.m21+this.m21*a.m22,b=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=E,this.m22=b,this},Xi.prototype.bv=function(a){var y=1/(a.m11*a.m22-a.m12*a.m21),x=a.m22*y,E=-a.m12*y,b=-a.m21*y,z=a.m11*y,tt=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*E,x=this.m12*x+this.m22*E,E=this.m11*b+this.m21*z,b=this.m12*b+this.m22*z,this.dx=this.m11*tt+this.m21*a+this.dx,this.dy=this.m12*tt+this.m22*a+this.dy,this.m11=y,this.m12=x,this.m21=E,this.m22=b,this},Xi.prototype.Vj=function(){var a=1/(this.m11*this.m22-this.m12*this.m21),y=-this.m12*a,x=-this.m21*a,E=this.m11*a,b=a*(this.m21*this.dy-this.m22*this.dx),z=a*(this.m12*this.dx-this.m11*this.dy);return this.m11=this.m22*a,this.m12=y,this.m21=x,this.m22=E,this.dx=b,this.dy=z,this},Xi.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 E=1}else a===180?(a=-1,E=0):a===270?(a=0,E=-1):(E=a*Math.PI/180,a=Math.cos(E),E=Math.sin(E));var b=this.m12*a+this.m22*E,z=this.m11*-E+this.m21*a,tt=this.m12*-E+this.m22*a;return this.m11=this.m11*a+this.m21*E,this.m12=b,this.m21=z,this.m22=tt,this.translate(-y,-x),this},Ct=Xi.prototype,Ct.translate=function(a,y){return this.dx+=this.m11*a+this.m21*y,this.dy+=this.m12*a+this.m22*y,this},Ct.scale=function(a,y){return y===void 0&&(y=a),this.m11*=a,this.m12*=a,this.m21*=y,this.m22*=y,this},Ct.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)},Ct.Cd=function(a){var y=1/(this.m11*this.m22-this.m12*this.m21),x=a.x,E=a.y;return a.h(x*this.m22*y+E*-this.m21*y+y*(this.m21*this.dy-this.m22*this.dx),x*-this.m12*y+E*this.m11*y+y*(this.m12*this.dx-this.m11*this.dy))},Ct.Eu=function(a){var y=1/(this.m11*this.m22-this.m12*this.m21),x=1.25*a.x,E=1.2*a.y;return a.h(x*this.m22*y+E*-this.m21*y+y*(this.m21*this.dy-this.m22*this.dx),x*-this.m12*y+E*this.m11*y+y*(this.m12*this.dx-this.m11*this.dy))},Ct.pp=function(a){var y=a.x,x=a.y,E=y+a.width,b=x+a.height,z=this.m11,tt=this.m12,rt=this.m21,ot=this.m22,st=this.dx,ut=this.dy,ft=y*z+x*rt+st,St=y*tt+x*ot+ut,wt=E*z+x*rt+st,Et=E*tt+x*ot+ut;return x=y*z+b*rt+st,y=y*tt+b*ot+ut,z=E*z+b*rt+st,E=E*tt+b*ot+ut,b=Math.min(ft,wt),ft=Math.max(ft,wt),wt=Math.min(St,Et),St=Math.max(St,Et),b=Math.min(b,x),ft=Math.max(ft,x),wt=Math.min(wt,y),St=Math.max(St,y),b=Math.min(b,z),ft=Math.max(ft,z),wt=Math.min(wt,E),St=Math.max(St,E),a.h(b,wt,ft-b,St-wt),a},Xi.alloc=function(){var a=Gc.pop();return a===void 0?new Xi:a},Xi.free=function(a){Gc.push(a)},Xi.prototype.transformRect=Xi.prototype.pp,Xi.prototype.transformPoint=Xi.prototype.Ga,Xi.prototype.scale=Xi.prototype.scale,Xi.prototype.translate=Xi.prototype.translate,Xi.prototype.rotate=Xi.prototype.rotate,Xi.prototype.invert=Xi.prototype.Vj,Xi.prototype.multiplyInverted=Xi.prototype.bv,Xi.prototype.multiply=Xi.prototype.multiply,Xi.prototype.reset=Xi.prototype.reset,Xi.prototype.isIdentity=Xi.prototype.ws,Xi.prototype.equals=Xi.prototype.D,Xi.prototype.setTransform=Xi.prototype.setTransform,Xi.prototype.set=Xi.prototype.set;var Gc=[];Xi.className="Transform",Xi.xF="54a702f3e53909c447824c6706603faf4c";var Se={AA:"7da71ca0ad381e90",wg:(Math.sqrt(2)-1)/3*4,Uv:null,sqrt:function(a){if(0>=a)return 0;var y=Se.Uv;if(y===null){y=[];for(var x=0;2e3>=x;x++)y[x]=Math.sqrt(x);Se.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,E,b,z,tt){if(0>=b&&(b=1e-6),a<x)var rt=a,ot=x;else rt=x,ot=a;if(y<E)var st=y,ut=E;else st=E,ut=y;if(a===x)return st<=tt&&tt<=ut&&a-b<=z&&z<=a+b;if(y===E)return rt<=z&&z<=ot&&y-b<=tt&&tt<=y+b;if(ot+=b,rt-=b,rt<=z&&z<=ot&&(ut+=b,st-=b,st<=tt&&tt<=ut))if(ot-rt>ut-st)if(a-x>b||x-a>b){if(z=(E-y)/(x-a)*(z-a)+y,z-b<=tt&&tt<=z+b)return!0}else return!0;else if(y-E>b||E-y>b){if(tt=(x-a)/(E-y)*(tt-y)+a,tt-b<=z&&z<=tt+b)return!0}else return!0;return!1},cs:function(a,y,x,E,b,z,tt,rt,ot,st,ut,ft){if(Se.Yb(a,y,tt,rt,ft,x,E)&&Se.Yb(a,y,tt,rt,ft,b,z))return Se.Yb(a,y,tt,rt,ft,st,ut);var St=(a+x)/2,wt=(y+E)/2,Et=(x+b)/2,Bt=(E+z)/2;b=(b+tt)/2,z=(z+rt)/2,E=(St+Et)/2,x=(wt+Bt)/2,Et=(Et+b)/2,Bt=(Bt+z)/2;var Vt=(E+Et)/2,jt=(x+Bt)/2;return Se.cs(a,y,St,wt,E,x,Vt,jt,ot,st,ut,ft)||Se.cs(Vt,jt,Et,Bt,b,z,tt,rt,ot,st,ut,ft)},ax:function(a,y,x,E,b,z,tt,rt,ot){var st=(x+b)/2,ut=(E+z)/2;return ot.h((((a+x)/2+st)/2+(st+(b+tt)/2)/2)/2,(((y+E)/2+ut)/2+(ut+(z+rt)/2)/2)/2),ot},My:function(a,y,x,E,b,z,tt,rt){var ot=(x+b)/2,st=(E+z)/2;return Zn(((a+x)/2+ot)/2,((y+E)/2+st)/2,(ot+(b+tt)/2)/2,(st+(z+rt)/2)/2)},Dl:function(a,y,x,E,b,z,tt,rt,ot,st){if(Se.Yb(a,y,tt,rt,ot,x,E)&&Se.Yb(a,y,tt,rt,ot,b,z))Ar(st,a,y,0,0),Ar(st,tt,rt,0,0);else{var ut=(a+x)/2,ft=(y+E)/2,St=(x+b)/2,wt=(E+z)/2;b=(b+tt)/2,z=(z+rt)/2,E=(ut+St)/2,x=(ft+wt)/2,St=(St+b)/2,wt=(wt+z)/2;var Et=(E+St)/2,Bt=(x+wt)/2;Se.Dl(a,y,ut,ft,E,x,Et,Bt,ot,st),Se.Dl(Et,Bt,St,wt,b,z,tt,rt,ot,st)}return st},Qe:function(a,y,x,E,b,z,tt,rt,ot,st){if(Se.Yb(a,y,tt,rt,ot,x,E)&&Se.Yb(a,y,tt,rt,ot,b,z))st.length===0&&(st.push(a),st.push(y)),st.push(tt),st.push(rt);else{var ut=(a+x)/2,ft=(y+E)/2,St=(x+b)/2,wt=(E+z)/2;b=(b+tt)/2,z=(z+rt)/2,E=(ut+St)/2,x=(ft+wt)/2,St=(St+b)/2,wt=(wt+z)/2;var Et=(E+St)/2,Bt=(x+wt)/2;Se.Qe(a,y,ut,ft,E,x,Et,Bt,ot,st),Se.Qe(Et,Bt,St,wt,b,z,tt,rt,ot,st)}return st},jv:function(a,y,x,E,b,z,tt,rt,ot,st){if(Se.Yb(a,y,b,z,st,x,E))return Se.Yb(a,y,b,z,st,rt,ot);var ut=(a+x)/2,ft=(y+E)/2;x=(x+b)/2,E=(E+z)/2;var St=(ut+x)/2,wt=(ft+E)/2;return Se.jv(a,y,ut,ft,St,wt,tt,rt,ot,st)||Se.jv(St,wt,x,E,b,z,tt,rt,ot,st)},OA:function(a,y,x,E,b,z,tt){return tt.h(((a+x)/2+(x+b)/2)/2,((y+E)/2+(E+z)/2)/2),tt},iv:function(a,y,x,E,b,z,tt,rt){if(Se.Yb(a,y,b,z,tt,x,E))Ar(rt,a,y,0,0),Ar(rt,b,z,0,0);else{var ot=(a+x)/2,st=(y+E)/2;x=(x+b)/2,E=(E+z)/2;var ut=(ot+x)/2,ft=(st+E)/2;Se.iv(a,y,ot,st,ut,ft,tt,rt),Se.iv(ut,ft,x,E,b,z,tt,rt)}return rt},ep:function(a,y,x,E,b,z,tt,rt){if(Se.Yb(a,y,b,z,tt,x,E))rt.length===0&&(rt.push(a),rt.push(y)),rt.push(b),rt.push(z);else{var ot=(a+x)/2,st=(y+E)/2;x=(x+b)/2,E=(E+z)/2;var ut=(ot+x)/2,ft=(st+E)/2;Se.ep(a,y,ot,st,ut,ft,tt,rt),Se.ep(ut,ft,x,E,b,z,tt,rt)}return rt},Eo:function(a,y,x,E,b,z,tt,rt,ot,st,ut,ft,St,wt){if(Se.Yb(a,y,tt,rt,St,x,E)&&Se.Yb(a,y,tt,rt,St,b,z))return!Se.Rl(a,y,tt,rt,ot,st,ut,ft)||(St=(a-tt)*(st-ft)-(y-rt)*(ot-ut),St===0)?!1:(wt.h(((a*rt-y*tt)*(ot-ut)-(a-tt)*(ot*ft-st*ut))/St,((a*rt-y*tt)*(st-ft)-(y-rt)*(ot*ft-st*ut))/St),!0);var Et=(a+x)/2,Bt=(y+E)/2,Vt=(x+b)/2,jt=(E+z)/2;b=(b+tt)/2,z=(z+rt)/2,E=(Et+Vt)/2,x=(Bt+jt)/2,Vt=(Vt+b)/2,jt=(jt+z)/2;var _t=(E+Vt)/2,Qt=(x+jt)/2,ie=1/0,ce=!1,ke=0,On=0;return Se.Eo(a,y,Et,Bt,E,x,_t,Qt,ot,st,ut,ft,St,wt)&&(a=(wt.x-ot)*(wt.x-ot)+(wt.y-st)*(wt.y-st),a<ie&&(ie=a,ce=!0,ke=wt.x,On=wt.y)),Se.Eo(_t,Qt,Vt,jt,b,z,tt,rt,ot,st,ut,ft,St,wt)&&(wt.x-ot)*(wt.x-ot)+(wt.y-st)*(wt.y-st)<ie&&(ce=!0,ke=wt.x,On=wt.y),ce&&(wt.x=ke,wt.y=On),ce},Fo:function(a,y,x,E,b,z,tt,rt,ot,st,ut,ft,St){var wt=0;if(Se.Yb(a,y,tt,rt,St,x,E)&&Se.Yb(a,y,tt,rt,St,b,z)){if(St=(a-tt)*(st-ft)-(y-rt)*(ot-ut),St===0)return wt;var Et=((a*rt-y*tt)*(ot-ut)-(a-tt)*(ot*ft-st*ut))/St,Bt=((a*rt-y*tt)*(st-ft)-(y-rt)*(ot*ft-st*ut))/St;if(Et>=ut)return wt;if((ot>ut?ot-ut:ut-ot)<(st>ft?st-ft:ft-st)){if(y<rt?(ot=y,a=rt):(ot=rt,a=y),Bt<ot||Bt>a)return wt}else if(a<tt?(ot=a,a=tt):ot=tt,Et<ot||Et>a)return wt;0<St?wt++:0>St&&wt--}else{Et=(a+x)/2,Bt=(y+E)/2;var Vt=(x+b)/2,jt=(E+z)/2;b=(b+tt)/2,z=(z+rt)/2,E=(Et+Vt)/2,x=(Bt+jt)/2,Vt=(Vt+b)/2,jt=(jt+z)/2;var _t=(E+Vt)/2,Qt=(x+jt)/2;wt+=Se.Fo(a,y,Et,Bt,E,x,_t,Qt,ot,st,ut,ft,St),wt+=Se.Fo(_t,Qt,Vt,jt,b,z,tt,rt,ot,st,ut,ft,St)}return wt},qh:function(a,y,x,E,b,z,tt){return Se.$(a,x)?(y<E?(x=y,y=E):x=E,z<x?(tt.h(a,x),!1):z>y?(tt.h(a,y),!1):(tt.h(a,z),!0)):Se.$(y,E)?(a<x?(E=a,a=x):E=x,b<E?(tt.h(E,y),!1):b>a?(tt.h(a,y),!1):(tt.h(b,y),!0)):(b=((a-b)*(a-x)+(y-z)*(y-E))/((x-a)*(x-a)+(E-y)*(E-y)),-5e-6>b?(tt.h(a,y),!1):1.000005<b?(tt.h(x,E),!1):(tt.h(a+b*(x-a),y+b*(E-y)),!0))},Ve:function(a,y,x,E,b,z,tt,rt,ot){return Se.B(a,x)&&Se.B(y,E)?(ot.h(a,y),!1):Se.$(b,tt)?Se.$(a,x)?(Se.qh(a,y,x,E,b,z,ot),!1):Se.qh(a,y,x,E,b,(E-y)/(x-a)*(b-a)+y,ot):(rt=(rt-z)/(tt-b),Se.$(a,x)?(x=rt*(a-b)+z,y<E?(b=y,y=E):b=E,x<b?(ot.h(a,b),!1):x>y?(ot.h(a,y),!1):(ot.h(a,x),!0)):(tt=(E-y)/(x-a),Se.$(rt,tt)?(Se.qh(a,y,x,E,b,z,ot),!1):(b=(tt*a-rt*b+z-y)/(tt-rt),Se.$(tt,0)?(a<x?(E=a,a=x):E=x,b<E?(ot.h(E,y),!1):b>a?(ot.h(a,y),!1):(ot.h(b,y),!0)):Se.qh(a,y,x,E,b,tt*(b-a)+y,ot))))},MA:function(a,y,x,E,b){return Se.Ve(x.x,x.y,E.x,E.y,a.x,a.y,y.x,y.y,b)},KA:function(a,y,x,E,b,z,tt,rt,ot,st){function ut(Vt,jt){var _t=(Vt-a)*(Vt-a)+(jt-y)*(jt-y);_t<ft&&(ft=_t,ot.h(Vt,jt))}var ft=1/0;ut(ot.x,ot.y);var St=0,wt=0,Et=0,Bt=0;if(b<tt?(St=b,wt=tt):(St=tt,wt=b),z<rt?(Et=b,Bt=tt):(Et=tt,Bt=b),St=(wt-St)/2+st,st=(Bt-Et)/2+st,b=(b+tt)/2,z=(z+rt)/2,St===0||st===0)return ot;if(.5>(x>a?x-a:a-x)){if(St=1-(x-b)*(x-b)/(St*St),0>St)return ot;St=Math.sqrt(St),E=-st*St+z,ut(x,st*St+z),ut(x,E)}else{if(x=(E-y)/(x-a),E=1/(St*St)+x*x/(st*st),rt=2*x*(y-x*a)/(st*st)-2*x*z/(st*st)-2*b/(St*St),St=rt*rt-4*E*(2*x*a*z/(st*st)-2*y*z/(st*st)+z*z/(st*st)+b*b/(St*St)-1+(y-x*a)*(y-x*a)/(st*st)),0>St)return ot;St=Math.sqrt(St),st=(-rt+St)/(2*E),ut(st,x*st-x*a+y),St=(-rt-St)/(2*E),ut(St,x*St-x*a+y)}return ot},Ff:function(a,y,x,E,b,z,tt,rt,ot){var st=1e21,ut=a,ft=y;if(Se.Ve(a,y,a,E,b,z,tt,rt,ot)){var St=(ot.x-b)*(ot.x-b)+(ot.y-z)*(ot.y-z);St<st&&(st=St,ut=ot.x,ft=ot.y)}return Se.Ve(x,y,x,E,b,z,tt,rt,ot)&&(St=(ot.x-b)*(ot.x-b)+(ot.y-z)*(ot.y-z),St<st&&(st=St,ut=ot.x,ft=ot.y)),Se.Ve(a,y,x,y,b,z,tt,rt,ot)&&(y=(ot.x-b)*(ot.x-b)+(ot.y-z)*(ot.y-z),y<st&&(st=y,ut=ot.x,ft=ot.y)),Se.Ve(a,E,x,E,b,z,tt,rt,ot)&&(a=(ot.x-b)*(ot.x-b)+(ot.y-z)*(ot.y-z),a<st&&(st=a,ut=ot.x,ft=ot.y)),ot.h(ut,ft),1e21>st},us:function(a,y,x){return Se.Fx(a.x,a.y,a.width,a.height,y.x,y.y,x.x,x.y)},Fx:function(a,y,x,E,b,z,tt,rt){var ot=a+x,st=y+E;return b===tt?(z<rt?(tt=z,z=rt):tt=rt,a<=b&&b<=ot&&tt<=st&&z>=y):z===rt?(b<tt?(rt=b,b=tt):rt=tt,y<=z&&z<=st&&rt<=ot&&b>=a):!!(Vr(a,y,x,E,b,z)||Vr(a,y,x,E,tt,rt)||Se.Rl(a,y,ot,y,b,z,tt,rt)||Se.Rl(ot,y,ot,st,b,z,tt,rt)||Se.Rl(ot,st,a,st,b,z,tt,rt)||Se.Rl(a,st,a,y,b,z,tt,rt))},Rl:function(a,y,x,E,b,z,tt,rt){return a===x&&y===E&&b===tt&&z===rt?a===b&&y===z:0>=Se.Fl(a,y,x,E,b,z)*Se.Fl(a,y,x,E,tt,rt)&&0>=Se.Fl(b,z,tt,rt,a,y)*Se.Fl(b,z,tt,rt,x,E)},Fl:function(a,y,x,E,b,z){return x-=a,E-=y,a=b-a,y=z-y,z=a*E-y*x,z===0&&(z=a*x+y*E,0<z&&(z=(a-x)*x+(y-E)*E,0>z&&(z=0))),z},bp:function(a){return 0>a&&(a+=360),360<=a&&(a-=360),a},jx:function(a,y,x,E,b,z){var tt=Math.PI;z||(E*=tt/180,b*=tt/180);var rt=E>b?-1:1;z=[];var ot=tt/2,st=E;if(E=Math.min(2*tt,Math.abs(b-E)),1e-5>E)return ot=st+rt*Math.min(E,ot),rt=a+x*Math.cos(st),st=y+x*Math.sin(st),a+=x*Math.cos(ot),y+=x*Math.sin(ot),x=(rt+a)/2,ot=(st+y)/2,z.push([rt,st,x,ot,x,ot,a,y]),z;for(;1e-5<E;)b=st+rt*Math.min(E,ot),z.push(Se.Vy(x,st,b,a,y)),E-=Math.abs(b-st),st=b;return z},Vy:function(a,y,x,E,b){var z=(x-y)/2,tt=a*Math.cos(z),rt=a*Math.sin(z),ot=-rt,st=tt*tt+ot*ot,ut=st+tt*tt+ot*rt;return st=4/3*(Math.sqrt(2*st*ut)-ut)/(tt*rt-ot*tt),rt=tt-st*ot,tt=ot+st*tt,ot=-tt,st=z+y,z=Math.cos(st),st=Math.sin(st),[E+a*Math.cos(y),b+a*Math.sin(y),E+rt*z-tt*st,b+rt*st+tt*z,E+rt*z-ot*st,b+rt*st+ot*z,E+a*Math.cos(x),b+a*Math.sin(x)]},No:function(a,y,x,E,b,z,tt){x=Math.floor((a-x)/b)*b+x,E=Math.floor((y-E)/z)*z+E;var rt=x;return x+b-a<b/2&&(rt=x+b),a=E,E+z-y<z/2&&(a=E+z),tt.h(rt,a),tt},vx:function(a,y){var x=Math.max(a,y);a=Math.min(a,y);var E;do y=x%a,x=E=a,a=y;while(0<y);return E},$y:function(a,y,x,E){var b=0>x,z=0>E;if(a<y)var tt=1,rt=0;else tt=0,rt=1;var ot=tt===0?a:y,st=tt===0?x:E;return(tt===0?b:z)&&(st=-st),tt=rt,x=tt===0?x:E,(tt===0?b:z)&&(x=-x),Se.az(ot,tt===0?a:y,st,x,0,0)},az:function(a,y,x,E,b,z){if(0<E)if(0<x){b=a*a,z=y*y,a*=x;var tt=y*E,rt=-z+tt,ot=-z+Math.sqrt(a*a+tt*tt);y=rt;for(var st=0;9999999999>st&&(y=.5*(rt+ot),!(y===rt||y===ot));++st){var ut=a/(y+b),ft=tt/(y+z);if(ut=ut*ut+ft*ft-1,0<ut)rt=y;else if(0>ut)ot=y;else break}x=b*x/(y+b)-x,E=z*E/(y+z)-E,x=Math.sqrt(x*x+E*E)}else x=Math.abs(E-y);else E=a*a-y*y,z=a*x,z<E?(E=z/E,z=y*Math.sqrt(Math.abs(1-E*E)),x=a*E-x,x=Math.sqrt(x*x+z*z)):x=Math.abs(x-a);return x},Ze:new Ni,um:new Ni,Mf:new Ni,Nf:0,vm:100};Se.za=Se.AA;function Fn(a){Zr(this),this.l=2,a===void 0&&(a=Fn.o),this.na=a,this.Ec=this.Dc=this.pd=this.od=0,a===Fn.o?this.ee=new yn:(Fn.V===null&&(Fn.V=new yn().freeze()),this.ee=Fn.V),this.aq=this.ee.Ja,this.Ip=new Ye().freeze(),this.ym=this.tk=null,this.zm=NaN,this.fg=wo,this.gg=Rs,this.Rk=this.Sk=NaN,this.Uf=dn}Fn.prototype.copy=function(){var a=new Fn;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===Fn.o){for(var y=this.ee.s,x=a.ee,E=0;E<y.length;E++)x.add(y[E].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},Fn.prototype.ja=function(){return this.freeze(),Object.freeze(this),this},Fn.prototype.freeze=function(){if(this._isFrozen=!0,this.type!==Fn.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},Fn.prototype.ka=function(){if(Object.isFrozen(this)&&pe("cannot thaw constant: "+this),this._isFrozen=!1,this.type!==Fn.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},Fn.prototype.Xa=function(a){if(!(a instanceof Fn))return!1;if(this.type!==a.type)return this.type===Fn.j&&a.type===Fn.o?Ig(this,a):a.type===Fn.j&&this.type===Fn.o?Ig(a,this):!1;if(this.type===Fn.o){var y=this.figures.s;a=a.figures.s;var x=y.length;if(x!==a.length)return!1;for(var E=0;E<x;E++)if(!y[E].Xa(a[E]))return!1;return!0}return Se.B(this.startX,a.startX)&&Se.B(this.startY,a.startY)&&Se.B(this.endX,a.endX)&&Se.B(this.endY,a.endY)};function Ig(a,y){return a.type!==Fn.j||y.type!==Fn.o?!1:!!(y.figures.count===1&&(y=y.figures.M(0),y.segments.count===1&&Se.B(a.startX,y.startX)&&Se.B(a.startY,y.startY)&&(y=y.segments.M(0),y.type===Ur&&Se.B(a.endX,y.endX)&&Se.B(a.endY,y.endY))))}Fn.ia=function(a){return a.toString()},Fn.prototype.qb=function(a){a.classType===Fn&&(this.type=a)},Fn.prototype.toString=function(a){switch(a===void 0&&(a=-1),this.type){case Fn.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 Fn.u:var y=new Ye(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 Fn.F:if(y=new Ye(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 Fn.o:y="",x=this.figures.s;for(var E=x.length,b=0;b<E;b++){var z=x[b];0<b&&(y+=" x "),z.isFilled&&(y+="F "),y+=z.toString(a)}return y;default:return this.type.toString()}},Fn.nb=function(a){a=a.split(/[Xx]/);for(var y=a.length,x="",E=0;E<y;E++){var b=a[E];x=b.match(/[Ff]/)!==null?E===0?x+b:x+("X"+(b[0]===" "?"":" ")+b):x+((E===0?"":"X ")+"F"+(b[0]===" "?"":" ")+b)}return x},Fn.parse=function(a,y){function x(){return Bt>=ie-1?!0:st[Bt+1].match(ce)!==null}function E(){return Bt++,st[Bt]}function b(ji){var Fi=parseFloat(E()),Lr=parseFloat(E());Vt===Vt.toLowerCase()&&(Fi=Qt.x+Fi,Lr=Qt.y+Lr),ji.h(Fi,Lr)}function z(){return b(Qt),Qt}function tt(){return b(_t),_t}function rt(){var ji=jt.toLowerCase();return ji!=="c"&&ji!=="s"&&ji!=="q"&&ji!=="t"?Qt:new Gt(2*Qt.x-_t.x,2*Qt.y-_t.y)}y===void 0&&(y=!1);var ot=/([UuBbMmZzLlHhVvCcSsQqTtAaFfXx])([UuBbMmZzLlHhVvCcSsQqTtAaFfXx])/gm;a=a.replace(/,/gm," "),a=a.replace(ot,"$1 $2"),a=a.replace(ot,"$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 st=a.split(" ");for(a=0;a<st.length;a++){var ut=st[a];if(ut.match(/(\.[0-9]*)(\.)/gm)!==null){ot=Si();for(var ft="",St=!1,wt=0;wt<ut.length;wt++){var Et=ut[wt];Et!=="."||St?Et==="."?(ot.push(ft),ft="."):ft+=Et:(St=!0,ft+=Et)}for(ot.push(ft),st.splice(a,1),ut=0;ut<ot.length;ut++)st.splice(a+ut,0,ot[ut]);a+=ot.length-1,wi(ot)}}var Bt=-1,Vt="",jt="";ot=new Gt(0,0);var _t=new Gt(0,0),Qt=new Gt(0,0),ie=st.length;a=k1(null),St=ft=ut=!1,wt=!0,Et=null;for(var ce=/[UuBbMmZzLlHhVvCcSsQqTtAaFfXx]/;!(Bt>=ie-1);)if(jt=Vt,Vt=E(),Vt!=="")switch(Vt.toUpperCase()){case"X":wt=!0,ft=ut=!1;break;case"M":for(Et=z(),a.mc===null||wt===!0?(dp(a,Et.x,Et.y,ut,!ft,St),wt=!1):a.moveTo(Et.x,Et.y),ot.assign(Qt);!x();)Et=z(),a.lineTo(Et.x,Et.y);break;case"L":for(;!x();)Et=z(),a.lineTo(Et.x,Et.y);break;case"H":for(;!x();)Qt=new Gt((Vt===Vt.toLowerCase()?Qt.x:0)+parseFloat(E()),Qt.y),a.lineTo(Qt.x,Qt.y);break;case"V":for(;!x();)Qt=new Gt(Qt.x,(Vt===Vt.toLowerCase()?Qt.y:0)+parseFloat(E())),a.lineTo(Qt.x,Qt.y);break;case"C":for(;!x();){Et=new Gt,b(Et);var ke=tt(),On=z();xd(a,Et.x,Et.y,ke.x,ke.y,On.x,On.y)}break;case"S":for(;!x();)Et=rt(),ke=tt(),On=z(),xd(a,Et.x,Et.y,ke.x,ke.y,On.x,On.y);break;case"Q":for(;!x();)Et=tt(),ke=z(),u0(a,Et.x,Et.y,ke.x,ke.y);break;case"T":for(;!x();)_t=Et=rt(),ke=z(),u0(a,Et.x,Et.y,ke.x,ke.y);break;case"B":for(;!x();){Et=parseFloat(E()),ke=parseFloat(E()),On=parseFloat(E());var ri=parseFloat(E()),qn=parseFloat(E()),wn=qn,tn=!1;x()||(wn=parseFloat(E()),x()||(tn=parseFloat(E())!==0)),Vt===Vt.toLowerCase()&&(On+=Qt.x,ri+=Qt.y),a.arcTo(Et,ke,On,ri,qn,wn,tn)}break;case"A":for(;!x();)Et=Math.abs(parseFloat(E())),ke=Math.abs(parseFloat(E())),On=parseFloat(E()),qn=ri=!1,tn=wn=0,wn=E(),wn.length===1?(ri=!!parseFloat(wn),qn=!!parseFloat(E()),wn=parseFloat(E())):wn.length===2?(ri=!!parseFloat(wn[0]),qn=!!parseFloat(wn[1]),wn=parseFloat(E())):(ri=!!parseFloat(wn[0]),qn=!!parseFloat(wn[1]),wn=parseFloat(wn.slice(2))),tn=parseFloat(E()),Vt===Vt.toLowerCase()&&(wn=Qt.x+wn,tn=Qt.y+tn),Qt.h(wn,tn),wx(a,Et,ke,On,ri,qn,wn,tn);break;case"Z":Px(a),Qt.assign(ot);break;case"F":for(Et="",ke=1;st[Bt+ke];)if(st[Bt+ke]==="0")St=!0,ke++;else if(st[Bt+ke].match(/[Uu]/)!==null)ke++;else if(st[Bt+ke].match(ce)===null)ke++;else{Et=st[Bt+ke];break}Et.match(/[Mm]/)?ut=!0:0<a.mc.segments.length&&(a.mc.isFilled=!0);break;case"U":for(Et="",ke=1;st[Bt+ke];)if(st[Bt+ke].match(/[Ff]/)!==null)ke++;else if(st[Bt+ke].match(ce)===null)ke++;else{Et=st[Bt+ke];break}Et.match(/[Mm]/)?ft=!0:a.mc.isShadowed=!1}if(ot=a.os,h0=a,y)for(y=ot.figures.iterator;y.next();)y.value.isFilled=!0;return ot},Fn.Ha=function(a,y){for(var x=a.length,E=Gt.alloc(),b=0;b<x;b++){var z=a[b];E.x=z[0],E.y=z[1],y.Ga(E),z[0]=E.x,z[1]=E.y,E.x=z[2],E.y=z[3],y.Ga(E),z[2]=E.x,z[3]=E.y,E.x=z[4],E.y=z[5],y.Ga(E),z[4]=E.x,z[5]=E.y,E.x=z[6],E.y=z[7],y.Ga(E),z[6]=E.x,z[7]=E.y}Gt.free(E)},Fn.prototype.Zu=function(){if(this._isInvalidBounds)return!0;if(this.type===Fn.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},Fn.prototype.computeBounds=function(){if(this._isInvalidBounds=!1,this.ym=this.tk=null,this.zm=NaN,this.type===Fn.o){this.aq=this.figures.Ja;for(var a=this.figures.s,y=a.length,x=0;x<y;x++){var E=a[x];E._isInvalidBounds=!1;var b=E.segments;E.sr=b.Ja,E=b.s,b=E.length;for(var z=0;z<b;z++){var tt=E[z];tt._isInvalidBounds=!1,tt.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),Tf(this,a,!1),Ar(a,0,0,0,0),a.freeze()},Fn.prototype.ix=function(){var a=new Ye;return Tf(this,a,!0),a};function Tf(a,y,x){switch(a.type){case Fn.j:case Fn.u:case Fn.F:x?y.h(a.od,a.pd,0,0):Ar(y,a.od,a.pd,0,0),Ar(y,a.Dc,a.Ec,0,0);break;case Fn.o:var E=a.figures;a=E.s,E=E.length;for(var b=0;b<E;b++){var z=a[b];x&&b===0?y.h(z.startX,z.startY,0,0):Ar(y,z.startX,z.startY,0,0);for(var tt=z.segments.s,rt=tt.length,ot=z.startX,st=z.startY,ut=0;ut<rt;ut++){var ft=tt[ut];switch(ft.type){case Ur:case jo:ot=ft.endX,st=ft.endY,Ar(y,ot,st,0,0);break;case da:Se.Dl(ot,st,ft.point1X,ft.point1Y,ft.point2X,ft.point2Y,ft.endX,ft.endY,.5,y),ot=ft.endX,st=ft.endY;break;case Cs:Se.iv(ot,st,ft.point1X,ft.point1Y,ft.endX,ft.endY,.5,y),ot=ft.endX,st=ft.endY;break;case Bo:case zs:var St=ft.type===Bo?Ka(ft,z):ws(ft,z,ot,st),wt=St.length;if(wt===0){ot=ft.type===Bo?ft.centerX:ft.endX,st=ft.type===Bo?ft.centerY:ft.endY,Ar(y,ot,st,0,0);break}ft=null;for(var Et=0;Et<wt;Et++)ft=St[Et],Se.Dl(ft[0],ft[1],ft[2],ft[3],ft[4],ft[5],ft[6],ft[7],.5,y);ft!==null&&(ot=ft[6],st=ft[7]);break;default:pe("Unknown Segment type: "+ft.type)}}}break;default:pe("Unknown Geometry type: "+a.type)}}Fn.prototype.normalize=function(){this._isFrozen&&Tn(this);var a=this.ix();return this.offset(-a.x,-a.y),new Gt(-a.x,-a.y)},Fn.prototype.offset=function(a,y){return this._isFrozen&&Tn(this),this.transform(1,0,0,1,a,y),this},Fn.prototype.scale=function(a,y){return this._isFrozen&&Tn(this),this.transform(a,0,0,y,0,0),this},Fn.prototype.rotate=function(a,y,x){this._isFrozen&&Tn(this),y===void 0&&(y=0),x===void 0&&(x=0);var E=Xi.alloc();return E.reset(),E.rotate(a,y,x),this.transform(E.m11,E.m12,E.m21,E.m22,E.dx,E.dy),Xi.free(E),this},Ct=Fn.prototype,Ct.transform=function(a,y,x,E,b,z){switch(this.type){case Fn.j:case Fn.u:case Fn.F:var tt=this.od,rt=this.pd;this.od=tt*a+rt*x+b,this.pd=tt*y+rt*E+z,tt=this.Dc,rt=this.Ec,this.Dc=tt*a+rt*x+b,this.Ec=tt*y+rt*E+z;break;case Fn.o:for(var ot=this.figures.s,st=ot.length,ut=0;ut<st;ut++){var ft=ot[ut];tt=ft.startX,rt=ft.startY,ft.startX=tt*a+rt*x+b,ft.startY=tt*y+rt*E+z,ft=ft.segments.s;for(var St=ft.length,wt=0;wt<St;wt++){var Et=ft[wt];switch(Et.type){case Ur:case jo:tt=Et.endX,rt=Et.endY,Et.endX=tt*a+rt*x+b,Et.endY=tt*y+rt*E+z;break;case da:tt=Et.point1X,rt=Et.point1Y,Et.point1X=tt*a+rt*x+b,Et.point1Y=tt*y+rt*E+z,tt=Et.point2X,rt=Et.point2Y,Et.point2X=tt*a+rt*x+b,Et.point2Y=tt*y+rt*E+z,tt=Et.endX,rt=Et.endY,Et.endX=tt*a+rt*x+b,Et.endY=tt*y+rt*E+z;break;case Cs:tt=Et.point1X,rt=Et.point1Y,Et.point1X=tt*a+rt*x+b,Et.point1Y=tt*y+rt*E+z,tt=Et.endX,rt=Et.endY,Et.endX=tt*a+rt*x+b,Et.endY=tt*y+rt*E+z;break;case Bo:tt=Et.centerX,rt=Et.centerY,Et.centerX=tt*a+rt*x+b,Et.centerY=tt*y+rt*E+z,y!==0&&(tt=180*Math.atan2(y,a)/Math.PI,0>tt&&(tt+=360),Et.startAngle+=tt),0>a&&(Et.startAngle=180-Et.startAngle,Et.sweepAngle=-Et.sweepAngle),0>E&&(Et.startAngle=-Et.startAngle,Et.sweepAngle=-Et.sweepAngle),Et.radiusX*=Math.sqrt(a*a+x*x),Et.radiusY!==void 0&&(Et.radiusY*=Math.sqrt(y*y+E*E));break;case zs:if(tt=Et.endX,rt=Et.endY,Et.endX=tt*a+rt*x+b,Et.endY=tt*y+rt*E+z,Et.radiusX===0||Et.radiusY===0)break;y!==0&&(tt=180*Math.atan2(y,a)/Math.PI,0>tt&&(tt+=360),Et.xAxisRotation+=tt),0>a&&(Et.xAxisRotation=180-Et.xAxisRotation,Et.isClockwiseArc=!Et.isClockwiseArc),0>E&&(Et.xAxisRotation=-Et.xAxisRotation,Et.isClockwiseArc=!Et.isClockwiseArc),Et.radiusX*=Math.sqrt(a*a+x*x),Et.radiusY*=Math.sqrt(y*y+E*E);break;default:pe("Unknown Segment type: "+Et.type)}}}}return this._isInvalidBounds=!0,this},Ct.ca=function(a,y){y===void 0&&(y=0);var x=this.od,E=this.pd,b=this.Dc,z=this.Ec;switch(this.type){case Fn.j:return Se.Yb(x,E,b,z,y,a.x,a.y);case Fn.u:var tt=Ye.allocAt(Math.min(x,b)-y,Math.min(E,z)-y,Math.abs(b-x)+2*y,Math.abs(z-E)+2*y);return a=tt.ca(a),Ye.free(tt),a;case Fn.F:tt=Math.min(x,b)-y;var rt=Math.min(E,z)-y;return x=(Math.abs(b-x)+2*y)/2,y=(Math.abs(z-E)+2*y)/2,0>=x||0>=y?!1:(tt=a.x-(tt+x),rt=a.y-(rt+y),1>=tt*tt/(x*x)+rt*rt/(y*y));case Fn.o:return wu(this,a,y,!0,!1);default:return!1}};function wu(a,y,x,E,b){var z=y.x;y=y.y;for(var tt=a.bounds.x-20,rt=0,ot,st,ut,ft,St=a.figures.s,wt=St.length,Et=0;Et<wt;Et++){var Bt=St[Et],Vt=!Bt.isEvenOdd;if(Bt.isFilled){if(E&&Bt.ca(z,y,x))return!0;var jt=Bt.segments;ot=Bt.startX,st=Bt.startY;for(var _t=ot,Qt=st,ie=jt.s,ce=0;ce<=jt.length;ce++){var ke=void 0;if(ce!==jt.length){ke=ie[ce];var On=ke.type;a=ke.endX,ft=ke.endY}else On=Ur,a=_t,ft=Qt;switch(On){case jo:if(_t=ol(z,y,tt,y,ot,st,_t,Qt),isNaN(_t))return!0;rt+=_t,_t=a,Qt=ft;break;case Ur:if(ot=ol(z,y,tt,y,ot,st,a,ft),isNaN(ot))return!0;rt+=ot;break;case da:ut=Se.Fo(ot,st,ke.point1X,ke.point1Y,ke.point2X,ke.point2Y,a,ft,tt,y,z,y,.5),rt+=ut;break;case Cs:ut=Se.Fo(ot,st,(ot+2*ke.point1X)/3,(st+2*ke.point1Y)/3,(2*ke.point1X+a)/3,(2*ke.point1Y+ft)/3,a,ft,tt,y,z,y,.5),rt+=ut;break;case Bo:case zs:On=ke.type===Bo?Ka(ke,Bt):ws(ke,Bt,ot,st);var ri=On.length;if(ri===0){if(ot=ol(z,y,tt,y,ot,st,ke.type===Bo?ke.centerX:ke.endX,ke.type===Bo?ke.centerY:ke.endY),isNaN(ot))return!0;rt+=ot;break}ke=null;for(var qn=0;qn<ri;qn++){if(ke=On[qn],qn===0){if(ut=ol(z,y,tt,y,ot,st,ke[0],ke[1]),isNaN(ut))return!0;rt+=ut}ut=Se.Fo(ke[0],ke[1],ke[2],ke[3],ke[4],ke[5],ke[6],ke[7],tt,y,z,y,.5),rt+=ut}ke!==null&&(a=ke[6],ft=ke[7]);break;default:pe("Unknown Segment type: "+ke.type)}ot=a,st=ft}if(Vt){if(rt!==0)return!0}else if(rt%2!==0)return!0;rt=0}else if(Bt.ca(z,y,b?x:x+2))return!0}return!1}function ol(a,y,x,E,b,z,tt,rt){if(Se.Yb(b,z,tt,rt,.05,a,y))return NaN;var ot=(a-x)*(z-rt);if(ot===0)return 0;var st=((a*E-y*x)*(b-tt)-(a-x)*(b*rt-z*tt))/ot;if(y=(a*E-y*x)*(z-rt)/ot,st>=a)return 0;if((b>tt?b-tt:tt-b)<(z>rt?z-rt:rt-z)){if(z<rt){if(y<z||y>rt)return 0}else if(y<rt||y>z)return 0}else if(b<tt){if(st<b||st>tt)return 0}else if(st<tt||st>b)return 0;return 0<ot?1:-1}function Il(a,y,x,E){a=a.figures.s;for(var b=a.length,z=0;z<b;z++)if(a[z].ca(y,x,E))return!0;return!1}Ct.Pu=function(a,y){if(0>a?a=0:1<a&&(a=1),y===void 0&&(y=new Gt),this.type===Fn.j)return y.h(this.startX+a*(this.endX-this.startX),this.startY+a*(this.endY-this.startY)),y;for(var x=this.flattenedSegments,E=this.flattenedLengths,b=x.length,z=this.flattenedTotalLength*a,tt=0,rt=0;rt<b;rt++){var ot=E[rt],st=ot.length;for(a=0;a<st;a++){var ut=ot[a];if(tt+ut>=z)return E=z-tt,E=ut===0?0:E/ut,x=x[rt],rt=x[2*a],b=x[2*a+1],y.h(rt+(x[2*a+2]-rt)*E,b+(x[2*a+3]-b)*E),y;tt+=ut}}return y},Ct.wx=function(a){if(0>a?a=0:1<a&&(a=1),this.type===Fn.j)return 180*Math.atan2(this.endY-this.startY,this.endX-this.startX)/Math.PI;for(var y=this.flattenedSegments,x=this.flattenedLengths,E=y.length,b=this.flattenedTotalLength*a,z=0,tt=0;tt<E;tt++){var rt=x[tt],ot=rt.length;for(a=0;a<ot;a++){var st=rt[a];if(z+st>=b)return b=y[tt],y=b[2*a],x=b[2*a+1],E=b[2*a+2],a=b[2*a+3],1>Math.abs(E-y)&&1>Math.abs(a-x)?0:1>Math.abs(E-y)?0<=a-x?90:270:1>Math.abs(a-x)?0<=E-y?0:180:180*Math.atan2(a-x,E-y)/Math.PI;z+=st}}return NaN},Ct.Qu=function(a,y){if(0>a?a=0:1<a&&(a=1),y===void 0&&(y=[]),y.length=3,this.type===Fn.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,E=this.flattenedLengths,b=x.length,z=this.flattenedTotalLength*a,tt=0,rt=0;rt<b;rt++){var ot=E[rt],st=ot.length;for(a=0;a<st;a++){var ut=ot[a];if(tt+ut>=z)return E=z-tt,E=ut===0?0:E/ut,ut=x[rt],x=ut[2*a],rt=ut[2*a+1],b=ut[2*a+2],a=ut[2*a+3],y[0]=x+(b-x)*E,y[1]=rt+(a-rt)*E,y[2]=1>Math.abs(b-x)&&1>Math.abs(a-rt)?0:1>Math.abs(b-x)?0<=a-rt?90:270:1>Math.abs(a-rt)?0<=b-x?0:180:180*Math.atan2(a-rt,b-x)/Math.PI,y;tt+=ut}}return y},Ct.xx=function(a){if(this.type===Fn.j){var y=this.startX,x=this.startY,E=this.endX,b=this.endY;if(y!==E||x!==b){var z=a.x;if(a=a.y,y===E){if(x<b){var tt=x;E=b}else tt=b,E=x;return a<=tt?tt===x?0:1:a>=E?E===x?0:1:Math.abs(a-x)/(E-tt)}if(x===b)return y<E?tt=y:(tt=E,E=y),z<=tt?tt===y?0:1:z>=E?E===y?0:1:Math.abs(z-y)/(E-tt);tt=(E-y)*(E-y)+(b-x)*(b-x);var rt=Gt.alloc();return Se.qh(y,x,E,b,z,a,rt),a=rt.x,z=rt.y,Gt.free(rt),Math.sqrt(((a-y)*(a-y)+(z-x)*(z-x))/tt)}}else if(this.type===Fn.u){tt=this.startX,rt=this.startY;var ot=this.endX;if(b=this.endY,tt!==ot||rt!==b){y=ot-tt,x=b-rt,z=2*y+2*x,E=a.x,a=a.y,E=Math.min(Math.max(E,tt),ot),a=Math.min(Math.max(a,rt),b),tt=Math.abs(E-tt),ot=Math.abs(E-ot),rt=Math.abs(a-rt),b=Math.abs(a-b);var st=Math.min(tt,ot,rt,b);if(st===rt)return E/z;if(st===ot)return(y+a)/z;if(st===b)return(2*y+x-E)/z;if(st===tt)return(2*y+2*x-a)/z}}else{y=this.flattenedSegments,x=this.flattenedLengths,z=this.flattenedTotalLength,E=Gt.alloc(),b=1/0,rt=tt=0,ot=y.length;for(var ut=st=0,ft=0;ft<ot;ft++)for(var St=y[ft],wt=x[ft],Et=St.length,Bt=0;Bt<Et;Bt+=2){var Vt=St[Bt],jt=St[Bt+1];if(Bt!==0){Se.qh(st,ut,Vt,jt,a.x,a.y,E);var _t=(E.x-a.x)*(E.x-a.x)+(E.y-a.y)*(E.y-a.y);_t<b&&(b=_t,tt=rt,tt+=Math.sqrt((E.x-st)*(E.x-st)+(E.y-ut)*(E.y-ut))),rt+=wt[(Bt-2)/2]}st=Vt,ut=jt}return Gt.free(E),a=tt/z,0>a?0:1<a?1:a}return 0};function Hc(a){if(a.tk===null){var y=a.tk=[],x=a.ym=[],E=[],b=[];if(a.type===Fn.j)E.push(a.startX),E.push(a.startY),E.push(a.endX),E.push(a.endY),y.push(E),b.push(Math.sqrt((a.startX-a.endX)*(a.startX-a.endX)+(a.startY-a.endY)*(a.startY-a.endY))),x.push(b);else if(a.type===Fn.u)E.push(a.startX),E.push(a.startY),E.push(a.endX),E.push(a.startY),E.push(a.endX),E.push(a.endY),E.push(a.startX),E.push(a.endY),E.push(a.startX),E.push(a.startY),y.push(E),b.push(Math.abs(a.startX-a.endX)),b.push(Math.abs(a.startY-a.endY)),b.push(Math.abs(a.startX-a.endX)),b.push(Math.abs(a.startY-a.endY)),x.push(b);else if(a.type===Fn.F){var z=new Yo;z.startX=a.endX,z.startY=(a.startY+a.endY)/2;var tt=new xr(Bo);if(tt.startAngle=0,tt.sweepAngle=360,tt.centerX=(a.startX+a.endX)/2,tt.centerY=(a.startY+a.endY)/2,tt.radiusX=Math.abs(a.startX-a.endX)/2,tt.radiusY=Math.abs(a.startY-a.endY)/2,z.add(tt),a=Ka(tt,z),b=a.length,b===0)E.push(tt.centerX),E.push(tt.centerY);else{tt=z.startX,z=z.startY;for(var rt=0;rt<b;rt++){var ot=a[rt];Se.Qe(tt,z,ot[2],ot[3],ot[4],ot[5],ot[6],ot[7],.5,E),tt=ot[6],z=ot[7]}}y.push(E),x.push(Hd(E))}else for(a=a.figures.iterator;a.next();){b=a.value,E=[],E.push(b.startX),E.push(b.startY),tt=b.startX,z=b.startY,rt=tt,ot=z;for(var st=b.segments.s,ut=st.length,ft=0;ft<ut;ft++){var St=st[ft];switch(St.type){case jo:4<=E.length&&(y.push(E),x.push(Hd(E))),E=[],E.push(St.endX),E.push(St.endY),tt=St.endX,z=St.endY,rt=tt,ot=z;break;case Ur:E.push(St.endX),E.push(St.endY),tt=St.endX,z=St.endY;break;case da:Se.Qe(tt,z,St.point1X,St.point1Y,St.point2X,St.point2Y,St.endX,St.endY,.5,E),tt=St.endX,z=St.endY;break;case Cs:Se.ep(tt,z,St.point1X,St.point1Y,St.endX,St.endY,.5,E),tt=St.endX,z=St.endY;break;case Bo:var wt=Ka(St,b),Et=wt.length;if(Et===0){E.push(St.centerX),E.push(St.centerY),tt=St.centerX,z=St.centerY;break}for(var Bt=0;Bt<Et;Bt++){var Vt=wt[Bt];Se.Qe(tt,z,Vt[2],Vt[3],Vt[4],Vt[5],Vt[6],Vt[7],.5,E),tt=Vt[6],z=Vt[7]}break;case zs:if(wt=ws(St,b,tt,z),Et=wt.length,Bt=St.endX,Vt=St.endY,Et===0){E.push(Bt),E.push(Vt),tt=Bt,z=Vt;break}for(Bt=0;Bt<Et;Bt++)Vt=wt[Bt],Se.Qe(tt,z,Vt[2],Vt[3],Vt[4],Vt[5],Vt[6],Vt[7],.5,E),tt=Vt[6],z=Vt[7];break;default:pe("Segment not of valid type: "+St.type)}St.isClosed&&(E.push(rt),E.push(ot))}4<=E.length&&(y.push(E),x.push(Hd(E)))}}}function Hd(a){for(var y=[],x=0,E=0,b=a.length,z=0;z<b;z+=2){var tt=a[z],rt=a[z+1];z!==0&&y.push(Math.sqrt(Ln(x,E,tt,rt))),x=tt,E=rt}return y}Ct.add=function(a){return this.ee.add(a),this},Ct.pm=function(a,y,x,E,b,z,tt,rt){return this._isFrozen&&Tn(this),this.fg=new pi(a,y,b,z).freeze(),this.gg=new pi(x,E,tt,rt).freeze(),this},we.Object.defineProperties(Fn.prototype,{_isFrozen:{get:function(){return(this.l&1)!==0},set:function(a){this.l=a?this.l|1:this.l&-2}},_isInvalidBounds:{get:function(){return(this.l&2)!==0},set:function(a){this.l=a?this.l|2:this.l&-3}},flattenedSegments:{get:function(){return Hc(this),this.tk}},flattenedLengths:{get:function(){return Hc(this),this.ym}},flattenedTotalLength:{get:function(){var a=this.zm;if(isNaN(a)){if(this.type===Fn.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===Fn.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,E=a=0;E<x;E++)for(var b=y[E],z=b.length,tt=0;tt<z;tt++)a+=b[tt]}this.zm=a}return a}},type:{get:function(){return this.na},set:function(a){this.na!==a&&(this._isFrozen&&Tn(this,a),this.na=a,a===Fn.o?this.ee=new yn:(Fn.V===null&&(Fn.V=new yn().freeze()),this.ee=Fn.V),this._isInvalidBounds=!0)}},startX:{get:function(){return this.od},set:function(a){this.od!==a&&(this._isFrozen&&Tn(this,a),this.od=a,this._isInvalidBounds=!0)}},startY:{get:function(){return this.pd},set:function(a){this.pd!==a&&(this._isFrozen&&Tn(this,a),this.pd=a,this._isInvalidBounds=!0)}},endX:{get:function(){return this.Dc},set:function(a){this.Dc!==a&&(this._isFrozen&&Tn(this,a),this.Dc=a,this._isInvalidBounds=!0)}},endY:{get:function(){return this.Ec},set:function(a){this.Ec!==a&&(this._isFrozen&&Tn(this,a),this.Ec=a,this._isInvalidBounds=!0)}},figures:{get:function(){return this.ee},set:function(a){this.ee!==a&&(this._isFrozen&&Tn(this,a),this.ee=a,this._isInvalidBounds=!0)}},spot1:{get:function(){return this.fg},set:function(a){this._isFrozen&&Tn(this,a),this.fg=a.J()}},spot2:{get:function(){return this.gg},set:function(a){this._isFrozen&&Tn(this,a),this.gg=a.J()}},defaultStretch:{get:function(){return this.Uf},set:function(a){this._isFrozen&&Tn(this,a),this.Uf=a}},bounds:{get:function(){return this.Zu()&&this.computeBounds(),this.Ip}}}),Fn.prototype.setSpots=Fn.prototype.pm,Fn.prototype.add=Fn.prototype.add,Fn.prototype.getFractionForPoint=Fn.prototype.xx,Fn.prototype.getPointAndAngleAlongPath=Fn.prototype.Qu,Fn.prototype.getAngleAlongPath=Fn.prototype.wx,Fn.prototype.getPointAlongPath=Fn.prototype.Pu,Fn.prototype.containsPoint=Fn.prototype.ca,Fn.prototype.transform=Fn.prototype.transform,Fn.prototype.rotate=Fn.prototype.rotate,Fn.prototype.scale=Fn.prototype.scale,Fn.prototype.offset=Fn.prototype.offset,Fn.prototype.normalize=Fn.prototype.normalize,Fn.prototype.computeBoundsWithoutOrigin=Fn.prototype.ix,Fn.prototype.equalsApprox=Fn.prototype.Xa,Fn.className="Geometry",Fn.j=new Je(Fn,"Line",0),Fn.u=new Je(Fn,"Rectangle",1),Fn.F=new Je(Fn,"Ellipse",2),Fn.o=new Je(Fn,"Path",3),Fn.V=null,Fn.hb="UuBbMmZzLlHhVvCcSsQqTtAaFfXx",Fn.className="Geometry",Fn.stringify=Fn.ia,Fn.fillPath=Fn.nb,Fn.parse=Fn.parse,Fn.Line=Fn.j,Fn.Rectangle=Fn.u,Fn.Ellipse=Fn.F,Fn.Path=Fn.o;function Yo(a,y,x,E,b){Zr(this),x===void 0&&(x=!0),E===void 0&&(E=!0),b===void 0&&(b=!1),this.l=2|(x?4:0)|(E?8:0)|(b?16:0),a!==void 0?this.od=a:this.od=0,y!==void 0?this.pd=y:this.pd=0,this.pl=new yn,this.sr=this.pl.Ja,this.fw=null}Yo.prototype.copy=function(){var a=new Yo;a.l=this.l&-2,a.od=this.od,a.pd=this.pd;for(var y=this.pl.s,x=y.length,E=a.pl,b=0;b<x;b++){var z=y[b].copy();E.add(z)}return a.sr=this.sr,a.fw=this.fw,a},Ct=Yo.prototype,Ct.Xa=function(a){if(!(a instanceof Yo&&Se.B(this.startX,a.startX)&&Se.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 E=0;E<x;E++)if(!y[E].Xa(a[E]))return!1;return!0},Ct.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,E=x.length,b=0;b<E;b++)y+=" "+x[b].toString(a);return y},Ct.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},Ct.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},Ct.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},Ct.add=function(a){return this.pl.add(a),this},Ct.ca=function(a,y,x){for(var E=this.startX,b=this.startY,z=E,tt=b,rt=this.segments.s,ot=rt.length,st=0;st<ot;st++){var ut=rt[st];switch(ut.type){case jo:z=ut.endX,tt=ut.endY,E=ut.endX,b=ut.endY;break;case Ur:if(Se.Yb(E,b,ut.endX,ut.endY,x,a,y))return!0;E=ut.endX,b=ut.endY;break;case da:if(Se.cs(E,b,ut.point1X,ut.point1Y,ut.point2X,ut.point2Y,ut.endX,ut.endY,.5,a,y,x))return!0;E=ut.endX,b=ut.endY;break;case Cs:if(Se.jv(E,b,ut.point1X,ut.point1Y,ut.endX,ut.endY,.5,a,y,x))return!0;E=ut.endX,b=ut.endY;break;case Bo:case zs:var ft=ut.type===Bo?Ka(ut,this):ws(ut,this,E,b),St=ft.length,wt=ut.type===Bo?ut.centerX:ut.endX,Et=ut.type===Bo?ut.centerY:ut.endY;if(St===0){if(Se.Yb(E,b,wt,Et,x,a,y))return!0;E=wt,b=Et;break}for(wt=null,Et=0;Et<St;Et++)if(wt=ft[Et],Et===0&&Se.Yb(E,b,wt[0],wt[1],x,a,y)||Se.cs(wt[0],wt[1],wt[2],wt[3],wt[4],wt[5],wt[6],wt[7],.5,a,y,x))return!0;wt!==null&&(E=wt[6],b=wt[7]);break;default:pe("Unknown Segment type: "+ut.type)}if(ut.isClosed&&(E!==z||b!==tt)&&Se.Yb(E,b,z,tt,x,a,y))return!0}return!1},we.Object.defineProperties(Yo.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&&Tn(this,a),this.l=a?this.l|4:this.l&-5}},isShadowed:{get:function(){return(this.l&8)!==0},set:function(a){this._isFrozen&&Tn(this,a),this.l=a?this.l|8:this.l&-9}},isEvenOdd:{get:function(){return(this.l&16)!==0},set:function(a){this._isFrozen&&Tn(this,a),this.l=a?this.l|16:this.l&-17}},startX:{get:function(){return this.od},set:function(a){this._isFrozen&&Tn(this,a),this.od=a,this._isInvalidBounds=!0}},startY:{get:function(){return this.pd},set:function(a){this._isFrozen&&Tn(this,a),this.pd=a,this._isInvalidBounds=!0}},segments:{get:function(){return this.pl},set:function(a){this._isFrozen&&Tn(this,a),this.pl=a,this._isInvalidBounds=!0}}}),Yo.prototype.add=Yo.prototype.add,Yo.prototype.equalsApprox=Yo.prototype.Xa,Yo.className="PathFigure";function xr(a,y,x,E,b,z,tt,rt){Zr(this),a===void 0&&(a=Ur),this.na=a,this.l=2,y!==void 0?this.Dc=y:this.Dc=0,x!==void 0?this.Ec=x:this.Ec=0,E===void 0&&(E=0),b===void 0&&(b=0),z===void 0&&(z=0),tt===void 0&&(tt=0),a===zs?(a=z%360,0>a&&(a+=360),this.Ne=a,this.Vh=0,this.Wh=Math.max(E,0),this.Pg=Math.max(b,0),typeof tt=="boolean"?tt&&(this.isLargeArc=!0):typeof tt=="number"&&tt&&(this.isLargeArc=!0),rt&&(this.isClockwiseArc=!0)):(this.Ne=E,this.Vh=b,a===Bo&&(z=Math.max(z,0)),this.Wh=z,typeof tt=="number"?(a===Bo&&(tt=Math.max(tt,0)),this.Pg=tt):this.Pg=0),this.ae=null}xr.prototype.copy=function(){var a=new xr;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},Ct=xr.prototype,Ct.Xa=function(a){if(!(a instanceof xr)||this.type!==a.type||this.isClosed!==a.isClosed)return!1;switch(this.type){case jo:case Ur:return Se.B(this.endX,a.endX)&&Se.B(this.endY,a.endY);case da:return Se.B(this.endX,a.endX)&&Se.B(this.endY,a.endY)&&Se.B(this.point1X,a.point1X)&&Se.B(this.point1Y,a.point1Y)&&Se.B(this.point2X,a.point2X)&&Se.B(this.point2Y,a.point2Y);case Cs:return Se.B(this.endX,a.endX)&&Se.B(this.endY,a.endY)&&Se.B(this.point1X,a.point1X)&&Se.B(this.point1Y,a.point1Y);case Bo:return Se.B(this.startAngle,a.startAngle)&&Se.B(this.sweepAngle,a.sweepAngle)&&Se.B(this.centerX,a.centerX)&&Se.B(this.centerY,a.centerY)&&Se.B(this.radiusX,a.radiusX)&&Se.B(this.radiusY,a.radiusY);case zs:return this.isClockwiseArc===a.isClockwiseArc&&this.isLargeArc===a.isLargeArc&&Se.B(this.xAxisRotation,a.xAxisRotation)&&Se.B(this.endX,a.endX)&&Se.B(this.endY,a.endY)&&Se.B(this.radiusX,a.radiusX)&&Se.B(this.radiusY,a.radiusY);default:return!1}},Ct.qb=function(a){a.classType===xr&&(this.type=a)},Ct.toString=function(a){switch(a===void 0&&(a=-1),this.type){case jo:a=0>a?"M"+this.endX.toString()+" "+this.endY.toString():"M"+this.endX.toFixed(a)+" "+this.endY.toFixed(a);break;case Ur:a=0>a?"L"+this.endX.toString()+" "+this.endY.toString():"L"+this.endX.toFixed(a)+" "+this.endY.toFixed(a);break;case da: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 Cs: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 Bo: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 zs: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":"")},Ct.freeze=function(){return this._isFrozen=!0,this},Ct.ka=function(){return this._isFrozen=!1,this},Ct.close=function(){return this.isClosed=!0,this};function Ka(a,y){if(a.ae!==null&&y._isInvalidBounds===!1)return a.ae;var x=a.radiusX,E=a.radiusY;if(E===void 0&&(E=x),x===0||E===0)return a.ae=[],a.ae;y=a.Ne;var b=a.Vh,z=Se.jx(0,0,x<E?x:E,a.startAngle,a.startAngle+a.sweepAngle,!1);if(x!==E){var tt=Xi.alloc();tt.reset(),x<E?tt.scale(1,E/x):tt.scale(x/E,1),Fn.Ha(z,tt),Xi.free(tt)}for(x=z.length,E=0;E<x;E++)tt=z[E],tt[0]+=y,tt[1]+=b,tt[2]+=y,tt[3]+=b,tt[4]+=y,tt[5]+=b,tt[6]+=y,tt[7]+=b;return a.ae=z,a.ae}function ws(a,y,x,E){function b(Bt,Vt,jt,_t){return(Bt*_t<Vt*jt?-1:1)*Math.acos((Bt*jt+Vt*_t)/(Math.sqrt(Bt*Bt+Vt*Vt)*Math.sqrt(jt*jt+_t*_t)))}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 z=a.Pg;y===0&&(y=1e-4),z===0&&(z=1e-4);var tt=Math.PI/180*a.Ne,rt=a.isLargeArc,ot=a.isClockwiseArc,st=a.Dc,ut=a.Ec,ft=Math.cos(tt),St=Math.sin(tt),wt=ft*(x-st)/2+St*(E-ut)/2;tt=-St*(x-st)/2+ft*(E-ut)/2;var Et=wt*wt/(y*y)+tt*tt/(z*z);return 1<Et&&(y*=Math.sqrt(Et),z*=Math.sqrt(Et)),Et=(rt===ot?-1:1)*Math.sqrt((y*y*z*z-y*y*tt*tt-z*z*wt*wt)/(y*y*tt*tt+z*z*wt*wt)),isNaN(Et)&&(Et=0),rt=Et*y*tt/z,Et=Et*-z*wt/y,isNaN(rt)&&(rt=0),isNaN(Et)&&(Et=0),x=(x+st)/2+ft*rt-St*Et,E=(E+ut)/2+St*rt+ft*Et,ut=b(1,0,(wt-rt)/y,(tt-Et)/z),ft=(wt-rt)/y,st=(tt-Et)/z,wt=(-wt-rt)/y,rt=(-tt-Et)/z,tt=b(ft,st,wt,rt),wt=(ft*wt+st*rt)/(Math.sqrt(ft*ft+st*st)*Math.sqrt(wt*wt+rt*rt)),-1>=wt?tt=Math.PI:1<=wt&&(tt=0),!ot&&0<tt&&(tt-=2*Math.PI),ot&&0>tt&&(tt+=2*Math.PI),ot=y>z?1:y/z,wt=y>z?z/y:1,y=Se.jx(0,0,y>z?y:z,ut,ut+tt,!0),z=Xi.alloc(),z.reset(),z.translate(x,E),z.rotate(a.Ne,0,0),z.scale(ot,wt),Fn.Ha(y,z),Xi.free(z),a.ae=y,a.ae}we.Object.defineProperties(xr.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&&Tn(this,a),this.na=a,this._isInvalidBounds=!0}},endX:{get:function(){return this.Dc},set:function(a){this._isFrozen&&Tn(this,a),this.Dc=a,this._isInvalidBounds=!0}},endY:{get:function(){return this.Ec},set:function(a){this._isFrozen&&Tn(this,a),this.Ec=a,this._isInvalidBounds=!0}},point1X:{get:function(){return this.Ne},set:function(a){this._isFrozen&&Tn(this,a),this.Ne=a,this._isInvalidBounds=!0}},point1Y:{get:function(){return this.Vh},set:function(a){this._isFrozen&&Tn(this,a),this.Vh=a,this._isInvalidBounds=!0}},point2X:{get:function(){return this.Wh},set:function(a){this._isFrozen&&Tn(this,a),this.Wh=a,this._isInvalidBounds=!0}},point2Y:{get:function(){return this.Pg},set:function(a){this._isFrozen&&Tn(this,a),this.Pg=a,this._isInvalidBounds=!0}},centerX:{get:function(){return this.Ne},set:function(a){this._isFrozen&&Tn(this,a),this.Ne=a,this._isInvalidBounds=!0}},centerY:{get:function(){return this.Vh},set:function(a){this._isFrozen&&Tn(this,a),this.Vh=a,this._isInvalidBounds=!0}},radiusX:{get:function(){return this.Wh},set:function(a){0>a&&gi(a,">= zero",xr,"radiusX"),this._isFrozen&&Tn(this,a),this.Wh=a,this._isInvalidBounds=!0}},radiusY:{get:function(){return this.Pg},set:function(a){0>a&&gi(a,">= zero",xr,"radiusY"),this._isFrozen&&Tn(this,a),this.Pg=a,this._isInvalidBounds=!0}},startAngle:{get:function(){return this.Dc},set:function(a){this._isFrozen&&Tn(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&&Tn(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&&Tn(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&&Tn(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&&Tn(this,a),a%=360,0>a&&(a+=360),this.Ne=a,this._isInvalidBounds=!0}}}),xr.prototype.equalsApprox=xr.prototype.Xa;var jo=new Je(xr,"Move",0),Ur=new Je(xr,"Line",1),da=new Je(xr,"Bezier",2),Cs=new Je(xr,"QuadraticBezier",3),Bo=new Je(xr,"Arc",4),zs=new Je(xr,"SvgArc",4);xr.className="PathSegment",xr.Move=jo,xr.Line=Ur,xr.Bezier=da,xr.QuadraticBezier=Cs,xr.Arc=Bo,xr.SvgArc=zs;function Fa(){this.H=null,this.xu=new Gt(0,0).freeze(),this.mt=new Gt(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}Fa.prototype.copy=function(){var a=new Fa;return this.clone(a)},Fa.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},Fa.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},Fa.prototype.So=function(a,y){var x=this.diagram;return x===null||sf(x,a,y),y},Fa.prototype.Bz=function(a,y){var x=this.diagram;return x===null||(sf(x,a,y),y.assign(x.Ps(y))),y},we.Object.defineProperties(Fa.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}}}),Fa.prototype.getMultiTouchDocumentPoint=Fa.prototype.Bz,Fa.prototype.getMultiTouchViewPoint=Fa.prototype.So,Fa.className="InputEvent";function Ou(){this.H=null,this.xa="",this.ar=this.Lr=null}Ou.prototype.copy=function(){var a=new Ou;return a.H=this.H,a.xa=this.xa,a.Lr=this.Lr,a.ar=this.ar,a},Ou.prototype.toString=function(){var a="*"+this.name;return this.subject!==null&&(a+=":"+this.subject.toString()),this.parameter!==null&&(a+="("+this.parameter.toString()+")"),a},we.Object.defineProperties(Ou.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}}}),Ou.className="DiagramEvent";function oo(){this.Fm=io,this.rf=this.Qq="",this.Ln=this.Mn=this.Rn=this.Sn=this.Qn=this.H=this.cc=null}oo.prototype.clear=function(){this.Ln=this.Mn=this.Rn=this.Sn=this.Qn=this.H=this.cc=null},oo.prototype.copy=function(){var a=new oo;a.Fm=this.Fm,a.Qq=this.Qq,a.rf=this.rf,a.cc=this.cc,a.H=this.H,a.Qn=this.Qn;var y=this.Sn;return a.Sn=bn(y)&&typeof y.J=="function"?y.J():y,y=this.Rn,a.Rn=bn(y)&&typeof y.J=="function"?y.J():y,y=this.Mn,a.Mn=bn(y)&&typeof y.J=="function"?y.J():y,y=this.Ln,a.Ln=bn(y)&&typeof y.J=="function"?y.J():y,a},oo.prototype.qb=function(a){a.classType===oo&&(this.change=a)},oo.prototype.toString=function(){var a="";return a=this.change===hs?a+"* ":this.change===io?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===hs?this.oldValue!==null&&(a+=" "+this.oldValue):(this.object!==null&&(a+=Er(this.object)),this.oldValue!==null&&(a+=" old: "+Er(this.oldValue)),this.oldParam!==null&&(a+=" "+this.oldParam),this.newValue!==null&&(a+=" new: "+Er(this.newValue)),this.newParam!==null&&(a+=" "+this.newParam)),a},oo.prototype.I=function(a){return a?this.oldValue:this.newValue},oo.prototype.Dz=function(a){return a?this.oldParam:this.newParam},oo.prototype.canUndo=function(){return this.model!==null||this.diagram!==null},oo.prototype.undo=function(){this.canUndo()&&(this.model!==null?this.model.changeState(this,!0):this.diagram!==null&&this.diagram.changeState(this,!0))},oo.prototype.canRedo=function(){return this.model!==null||this.diagram!==null},oo.prototype.redo=function(){this.canRedo()&&(this.model!==null?this.model.changeState(this,!1):this.diagram!==null&&this.diagram.changeState(this,!1))},we.Object.defineProperties(oo.prototype,{model:{get:function(){return this.cc},set:function(a){this.cc=a}},diagram:{get:function(){return this.H},set:function(a){this.H=a}},change:{get:function(){return this.Fm},set:function(a){this.Fm=a}},modelChange:{get:function(){return this.Qq},set:function(a){this.Qq=a}},propertyName:{get:function(){return this.rf},set:function(a){this.rf=a}},isTransactionFinished:{get:function(){return this.Fm===hs&&(this.rf==="CommittedTransaction"||this.rf==="FinishedUndo"||this.rf==="FinishedRedo")}},object:{get:function(){return this.Qn},set:function(a){this.Qn=a}},oldValue:{get:function(){return this.Sn},set:function(a){this.Sn=a}},oldParam:{get:function(){return this.Rn},set:function(a){this.Rn=a}},newValue:{get:function(){return this.Mn},set:function(a){this.Mn=a}},newParam:{get:function(){return this.Ln},set:function(a){this.Ln=a}}}),oo.prototype.redo=oo.prototype.redo,oo.prototype.canRedo=oo.prototype.canRedo,oo.prototype.undo=oo.prototype.undo,oo.prototype.canUndo=oo.prototype.canUndo,oo.prototype.getParam=oo.prototype.Dz,oo.prototype.getValue=oo.prototype.I,oo.prototype.clear=oo.prototype.clear;var hs=new Je(oo,"Transaction",-1),io=new Je(oo,"Property",0),Eo=new Je(oo,"Insert",1),zo=new Je(oo,"Remove",2);oo.className="ChangedEvent",oo.Transaction=hs,oo.Property=io,oo.Insert=Eo,oo.Remove=zo;function Jo(){this.o=new yn().freeze(),this.xa="",this.j=!1}Jo.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 E=this.changes.M(x);E!==null&&(y+=`
`+E.toString())}}return y},Jo.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()},Jo.prototype.canUndo=function(){return this.isComplete},Jo.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()}},Jo.prototype.canRedo=function(){return this.isComplete},Jo.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()}},Jo.prototype.ak=function(){if(this.isComplete){var a=this.changes;a.ka();for(var y=new yi,x=0;x<a.count;x++){var E=a.M(x);if(E!==null&&E.change===io&&E.object){var b=y.get(E.object);b||(b=new yi,y.set(E.object,b));var z=b.get(E.propertyName);z===null?b.set(E.propertyName,-1):(0<z&&a.cd(z,null),b.set(E.propertyName,x))}}for(x=y=0;x<a.count;x++)E=a.M(x),E!==null&&(x>y&&a.cd(y,E),y++);for(;a.length>y;)a.pop();a.freeze()}},we.Object.defineProperties(Jo.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}}}),Jo.prototype.optimize=Jo.prototype.ak,Jo.prototype.redo=Jo.prototype.redo,Jo.prototype.canRedo=Jo.prototype.canRedo,Jo.prototype.undo=Jo.prototype.undo,Jo.prototype.canUndo=Jo.prototype.canUndo,Jo.prototype.clear=Jo.prototype.clear,Jo.className="Transaction";function so(){this.Pt=new mn,this.Jd=!1,this.u=new yn().freeze(),this.Ce=-1,this.o=999,this.Fe=!1,this.Np=null,this.bi=0,this.j=!1,this.Ie=new yn().freeze(),this.hl=new yn,this.tt=!0,this.Dt=this.rq=this.Gt=this.Ft=!1}so.prototype.toString=function(a){var y="UndoManager "+this.historyIndex+"<"+this.history.count+"<="+this.maxHistoryLength;y+="[";for(var x=this.nestedTransactionNames.count,E=0;E<x;E++)0<E&&(y+=" "),y+=this.nestedTransactionNames.M(E);if(y+="]",a!==void 0&&0<a)for(x=this.history.count,E=0;E<x;E++)y+=`
`+this.history.M(E).toString(a-1);return y},so.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},so.prototype.copyProperties=function(a){this.isEnabled=a.isEnabled,this.maxHistoryLength=a.maxHistoryLength,this.checksTransactionLevel=a.checksTransactionLevel},Ct=so.prototype,Ct.Xw=function(a){this.Pt.add(a)},Ct.Rx=function(a){this.Pt.remove(a)},Ct.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},Ct.eb=function(a){return a===void 0&&(a=""),ph(this,!0,a)},Ct.Kf=function(){return ph(this,!1,"")};function ph(a,y,x){if(a.isUndoingRedoing)return!1;a.checksTransactionLevel&&1>a.transactionLevel&&Oi("Ending transaction without having started a transaction: "+x);var E=a.transactionLevel===1,b=a.currentTransaction;E&&y&&(a.isInternalTransaction||a.Ob("CommittingTransaction",x,b));var z=0;if(0<a.transactionLevel&&(a.bi--,a.isEnabled)){var tt=a.Ie.count;0<tt&&(x===""&&(x=a.Ie.M(0)),a.Ie.ka(),a.Ie.mb(tt-1),a.Ie.freeze()),tt=a.hl.count,0<tt&&(z=a.hl.M(tt-1),a.hl.mb(tt-1))}if(E){if(y)a.rq=!1,b===null&&x!==""&&(b=a.currentTransaction),a.isEnabled&&b!==null&&(b.isComplete||(b.isComplete=!0,b.name=x),a.lx(),y=a.history,y.ka(),E=a.maxHistoryLength,0<=E&&(E===0?y.clear():y.count>=E&&(z=y.M(0),z!==null&&z.clear(),y.mb(0),a.Ce--)),E===0||y.count!==0&&y.get(y.count-1)===b||(y.add(b),a.Ce++),y.freeze()),a.isInternalTransaction||a.Ob("CommittedTransaction",x,b);else{a.Fe=!0;try{a.isEnabled&&b!==null&&(b.isComplete=!0,b.undo())}finally{a.isInternalTransaction||a.Ob("RolledBackTransaction",x,b),a.Fe=!1}b!==null&&b.clear()}return a.Np=null,a.isPendingClear&&a.clear(),a.isPendingClear=!1,a.isPendingUnmodified=!1,!0}if(a.isEnabled&&!y&&b!==null){for(a=z,x=b.changes,b=x.count-1;b>=a;b--)y=x.M(b),y!==null&&y.undo(),x.ka(),x.mb(b);x.freeze()}return!1}Ct.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()}},so.prototype.canUndo=function(){if(!this.isEnabled||0<this.transactionLevel)return!1;var a=this.transactionToUndo;return!!(a!==null&&a.canUndo())},so.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){Oi("undo error: "+y.toString())}finally{this.Ob("FinishedUndo","Undo",a),this.Fe=!1}}},so.prototype.canRedo=function(){if(!this.isEnabled||0<this.transactionLevel)return!1;var a=this.transactionToRedo;return!!(a!==null&&a.canRedo())},so.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){Oi("redo error: "+y.toString())}finally{this.Ob("FinishedRedo","Redo",a),this.Fe=!1}}},so.prototype.Ob=function(a,y,x){x===void 0&&(x=null);var E=new oo;for(E.change=hs,E.propertyName=a,E.object=x,E.oldValue=y,a=this.models;a.next();)y=a.value,E.model=y,y.ds(E)},so.prototype.Tu=function(a){if(this.isEnabled&&!this.isUndoingRedoing&&!this.skipsEvent(a)){var y=this.currentTransaction;y===null&&(this.Np=y=new Jo);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||Oi("Change not within a transaction: "+x.toString()))}},so.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},we.Object.defineProperties(so.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}}}),so.prototype.handleChanged=so.prototype.Tu,so.prototype.redo=so.prototype.redo,so.prototype.undo=so.prototype.undo,so.prototype.canUndo=so.prototype.canUndo,so.prototype.discardHistoryAfterIndex=so.prototype.lx,so.prototype.rollbackTransaction=so.prototype.Kf,so.prototype.commitTransaction=so.prototype.eb,so.prototype.startTransaction=so.prototype.Ea,so.prototype.removeModel=so.prototype.Rx,so.prototype.addModel=so.prototype.Xw,so.prototype.clear=so.prototype.clear,so.className="UndoManager";function fr(){Zr(this),this.H=Gl,this.xa="",this.Jd=!0,this.nb=!1,this.wm=null,this.yy=new Fa,this.Zr=-1}fr.prototype.toString=function(){return this.name!==""?this.name+" Tool":Mi(this.constructor)},fr.prototype.updateAdornments=function(){},fr.prototype.canStart=function(){return this.isEnabled},fr.prototype.doStart=function(){},fr.prototype.doActivate=function(){this.isActive=!0},fr.prototype.doDeactivate=function(){this.isActive=!1},fr.prototype.doStop=function(){},fr.prototype.doCancel=function(){this.transactionResult=null,this.stopTool()},fr.prototype.stopTool=function(){var a=this.diagram;a.currentTool===this&&(a.currentTool=null,a.currentCursor="")},fr.prototype.doMouseDown=function(){!this.isActive&&this.canStart()&&this.doActivate()},fr.prototype.doMouseMove=function(){},fr.prototype.doMouseUp=function(){this.stopTool()},fr.prototype.doMouseWheel=function(){},fr.prototype.canStartMultiTouch=function(){return!0},fr.prototype.standardPinchZoomStart=function(){var a=this.diagram,y=a.lastInput,x=y.So(0,Gt.allocAt(NaN,NaN)),E=y.So(1,Gt.allocAt(NaN,NaN));if(x.w()&&E.w()&&(this.doCancel(),a.Ql("hasGestureZoom"))){a.Bw=a.scale;var b=E.x-x.x,z=E.y-x.y;a.Jw=Math.sqrt(b*b+z*z),y.bubbles=!1}Gt.free(x),Gt.free(E)},fr.prototype.standardPinchZoomMove=function(){var a=this.diagram,y=a.lastInput,x=y.So(0,Gt.allocAt(NaN,NaN)),E=y.So(1,Gt.allocAt(NaN,NaN));if(x.w()&&E.w()&&(this.doCancel(),a.Ql("hasGestureZoom"))){var b=E.x-x.x,z=E.y-x.y;z=Math.sqrt(b*b+z*z)/a.Jw,b=new Gt((Math.min(E.x,x.x)+Math.max(E.x,x.x))/2,(Math.min(E.y,x.y)+Math.max(E.y,x.y))/2),z*=a.Bw;var tt=a.commandHandler;if(z!==a.scale&&tt.canResetZoom(z)){var rt=a.zoomPoint;a.zoomPoint=b,tt.resetZoom(z),a.zoomPoint=rt}y.bubbles=!1}Gt.free(x),Gt.free(E)},fr.prototype.doKeyDown=function(){this.diagram.lastInput.key==="Esc"&&this.doCancel()},fr.prototype.doKeyUp=function(){},fr.prototype.Ea=function(a){return a===void 0&&(a=this.name),this.transactionResult=null,this.diagram.Ea(a)},fr.prototype.stopTransaction=function(){var a=this.diagram;return this.transactionResult===null?a.Kf():a.eb(this.transactionResult)},fr.prototype.standardMouseSelect=function(){var a=this.diagram;if(a.allowSelect){var y=a.lastInput,x=a.Ol(y.documentPoint,!1);if(x!==null){if(Qi?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||(Qi?y.meta:y.control)||y.shift||a.clearSelection()}},fr.prototype.standardMouseClick=function(a,y){a===void 0&&(a=null),y===void 0&&(y=function(b){return!b.layer.isTemporary});var x=this.diagram,E=x.lastInput;return a=x.ic(E.documentPoint,a,y),E.targetObject=a,Og(a,E,x),E.handled};function Og(a,y,x){if(y.handled=!1,a===null||a.If()){var E=0;y.left?E=y.clickCount===1?1:y.clickCount===2?2:1:y.right&&y.clickCount===1&&(E=3);var b="ObjectSingleClicked";if(a!==null){switch(E){case 1:b="ObjectSingleClicked";break;case 2:b="ObjectDoubleClicked";break;case 3:b="ObjectContextClicked"}E!==0&&x.R(b,a)}else{switch(E){case 1:b="BackgroundSingleClicked";break;case 2:b="BackgroundDoubleClicked";break;case 3:b="BackgroundContextClicked"}E!==0&&x.R(b)}if(a!==null)for(;a!==null;){switch(x=null,E){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,E){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)}}}fr.prototype.standardMouseOver=function(){var a=this.diagram,y=a.lastInput;if(a.animationManager.zb!==!0){var x=a.skipsUndoManager;a.skipsUndoManager=!0;var E=a.viewportBounds.ca(y.documentPoint)?a.ic(y.documentPoint,null,null):null;!y.event||y.event.type!=="pointercancel"&&y.event.type!=="pointerout"||(E=null),y.targetObject=E;var b=!1;if(E!==a.Ck){var z=a.Ck,tt=z;for(a.Ck=E,this.doCurrentObjectChanged(z,E),y.handled=!1;z!==null;){var rt=z.mouseLeave;if(rt!==null&&(E===z||E!==null&&E.rg(z)||(rt(y,z,E),b=!0,y.handled)))break;z=z.panel}for(z=tt,y.handled=!1;E!==null&&(tt=E.mouseEnter,!(tt!==null&&(z===E||z!==null&&z.rg(E)||(tt(y,E,z),b=!0,y.handled))));)E=E.panel;E=a.Ck}if(E!==null){for(z=E,tt="";z!==null&&(tt=z.cursor,tt==="");)z=z.panel;for(a.currentCursor=tt,y.handled=!1,z=E;z!==null&&(E=z.mouseOver,!(E!==null&&(E(y,z),b=!0,y.handled)));)z=z.panel}else this.doUpdateCursor(null),E=a.mouseOver,E!==null&&(E(y),b=!0);b&&a.$b(),a.skipsUndoManager=x}},fr.prototype.doUpdateCursor=function(){var a=this.diagram;a&&(a.currentCursor="")},fr.prototype.doCurrentObjectChanged=function(){},fr.prototype.standardMouseWheel=function(){var a=this.diagram,y=a.lastInput,x=y.delta;if(x!==0&&a.documentBounds.w()){var E=a.commandHandler,b=a.toolManager.mouseWheelBehavior;if(E!==null&&(b===td&&!y.shift||b===Ru&&y.control))(0<x?E.canIncreaseZoom():E.canDecreaseZoom())&&(b=a.zoomPoint,a.zoomPoint=y.viewPoint,0<x?E.increaseZoom():E.decreaseZoom(),a.zoomPoint=b),y.bubbles=!1;else if(b===td&&y.shift||b===Ru&&!y.control){E=a.position.copy();var z=y.event;b=z.deltaMode;var tt=z.deltaX;z=z.deltaY;var rt="pixel";if(tt===0&&z===0||y.shift)!y.shift&&a.allowVerticalScroll?(x=3*x*a.scrollVerticalLineChange,a.scroll(rt,0<x?"up":"down",Math.abs(x))):y.shift&&a.allowHorizontalScroll&&(x=3*x*a.scrollHorizontalLineChange,a.scroll(rt,0<x?"left":"right",Math.abs(x)));else{switch(b){case 0:rt="pixel";break;case 1:rt="line";break;case 2:rt="page"}tt!==0&&a.allowHorizontalScroll&&(tt*=a.scrollHorizontalLineChange/16,a.scroll(rt,0<tt?"right":"left",Math.abs(tt))),z!==0&&a.allowVerticalScroll&&(z*=a.scrollVerticalLineChange/16,a.scroll(rt,0<z?"down":"up",Math.abs(z)))}this.doWheelChange(a,E,y)}}},fr.prototype.doWheelChange=function(a,y,x){a.position.D(y)&&x.event.wheelDeltaX===0||(x.bubbles=!1)},fr.prototype.standardWaitAfter=function(a,y){y===void 0&&(y=this.diagram.lastInput),this.cancelWaitAfter();var x=this,E=y.clone(this.yy);this.Zr=$n(function(){x.doWaitAfter(E)},a)},fr.prototype.cancelWaitAfter=function(){this.Zr!==-1&&Xe.clearTimeout(this.Zr),this.Zr=-1},fr.prototype.doWaitAfter=function(){},fr.prototype.findToolHandleAt=function(a,y){return a=this.diagram.ic(a,function(x){for(;x!==null&&!(x.panel instanceof Pr);)x=x.panel;return x}),a===null?null:a.part.category===y?a:null},fr.prototype.isBeyondDragSize=function(a,y){var x=this.diagram;a===void 0&&(a=x.firstInput.viewPoint),y===void 0&&(y=x.lastInput.viewPoint);var E=x.toolManager.dragSize,b=E.width;return E=E.height,x.firstInput.isTouchEvent&&(b+=6,E+=6),Math.abs(y.x-a.x)>b||Math.abs(y.y-a.y)>E},we.Object.defineProperties(fr.prototype,{diagram:{get:function(){return this.H},set:function(a){a instanceof Be&&(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}}}),fr.prototype.startTransaction=fr.prototype.Ea,fr.className="Tool";function qr(){fr.call(this),this.name="ToolManager",this.hb=new yn,this.ob=new yn,this.Hb=new yn,this.F=this.V=850,this.o=new Re(2,2).ja(),this.Ha=5e3,this.ia=Ru,this.u=Wd,this.Mp=this.j=null,this.zj=-1}Ce(qr,fr),qr.prototype.initializeStandardTools=function(){},qr.prototype.updateAdornments=function(a){var y=this.currentToolTip;if(y instanceof Pr&&this.Mp===a){var x=y.adornedObject;(a!==null?x.part===a:x===null)?this.showToolTip(y,x):this.hideToolTip()}},qr.prototype.doMouseDown=function(){var a=this.diagram,y=a.lastInput;if(y.isTouchEvent&&this.gestureBehavior===ju&&(y.bubbles=!1),y.isMultiTouch){if(this.cancelWaitAfter(),this.gestureBehavior===mh){y.bubbles=!0;return}if(this.gestureBehavior===ju)return;if(a.currentTool.canStartMultiTouch()){a.currentTool.standardPinchZoomStart();return}}for(var x=this.mouseDownTools.length,E=0;E<x;E++){var b=this.mouseDownTools.M(E);if(b.diagram=this.diagram,b.canStart()){a.doFocus(),a.currentTool=b,a.currentTool===b&&(b.isActive||b.doActivate(),b.doMouseDown());return}}a.lastInput.button===1&&(this.mouseWheelBehavior===Ru?this.mouseWheelBehavior=td:this.mouseWheelBehavior===td&&(this.mouseWheelBehavior=Ru)),this.doActivate(),this.standardWaitAfter(this.holdDelay,y)},qr.prototype.doMouseMove=function(){var a=this.diagram,y=a.lastInput;if(y.isMultiTouch){if(this.gestureBehavior===mh){y.bubbles=!0;return}if(this.gestureBehavior===ju)return;if(a.currentTool.canStartMultiTouch()){a.currentTool.standardPinchZoomMove();return}}if(this.isActive)for(var x=this.mouseMoveTools.length,E=0;E<x;E++){var b=this.mouseMoveTools.M(E);if(b.diagram=this.diagram,b.canStart()){a.doFocus(),a.currentTool=b,a.currentTool===b&&(b.isActive||b.doActivate(),b.doMouseMove());return}}Rg(this,a),a=y.event,a===null||a.type!=="pointermove"&&a.cancelable||(y.bubbles=!0)};function Rg(a,y){a.standardMouseOver(),a.isBeyondDragSize()&&a.standardWaitAfter(a.isActive?a.holdDelay:a.hoverDelay,y.lastInput)}qr.prototype.doCurrentObjectChanged=function(a,y){a=this.currentToolTip,a===null||y!==null&&a instanceof Pr&&(y===a||y.rg(a))||this.hideToolTip()},qr.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()))},qr.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)},qr.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 Pr)||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()},qr.prototype.showToolTip=function(a,y){var x=this.diagram;if(a!==this.currentToolTip&&this.hideToolTip(),a instanceof Pr){a.layerName="Tool",a.selectable=!1,a.scale=1/x.scale,a.category="ToolTip",a.placeholder!==null&&(a.placeholder.scale=x.scale);var E=a.diagram;E!==null&&E!==x&&E.remove(a),x.add(a),y!==null?a.adornedObject=y:a.data=x.model,a.Va(),this.positionToolTip(a,y)}else a instanceof xl&&a!==this.currentToolTip&&a.show(y,x,this);if(this.currentToolTip=a,this.zj!==-1&&(Xe.clearTimeout(this.zj),this.zj=-1),a=this.toolTipDuration,0<a&&a!==1/0){var b=this;this.zj=$n(function(){b.hideToolTip()},a)}},qr.prototype.positionToolTip=function(a){if(a.placeholder===null){var y=this.diagram,x=y.lastInput.documentPoint.copy(),E=a.measuredBounds,b=y.viewportBounds;y.lastInput.isTouchEvent&&(x.x-=E.width),x.x+E.width>b.right&&(x.x-=E.width+5/y.scale),x.x<b.x&&(x.x=b.x),x.y=x.y+20/y.scale+E.height>b.bottom?x.y-(E.height+5/y.scale):x.y+20/y.scale,x.y<b.y&&(x.y=b.y),a.position=x}},qr.prototype.hideToolTip=function(){this.zj!==-1&&(Xe.clearTimeout(this.zj),this.zj=-1);var a=this.diagram,y=this.currentToolTip;y!==null&&(y instanceof Pr?(a.remove(y),this.Mp!==null&&this.Mp.Jf(y.category),y.data=null,y.adornedObject=null):y instanceof xl&&y.hide!==null&&y.hide(a,this),this.currentToolTip=null)},qr.prototype.doMouseUp=function(){this.cancelWaitAfter();var a=this.diagram;if(this.isActive)for(var y=this.mouseUpTools.length,x=0;x<y;x++){var E=this.mouseUpTools.M(x);if(E.diagram=this.diagram,E.canStart()){a.doFocus(),a.currentTool=E,a.currentTool===E&&(E.isActive||E.doActivate(),E.doMouseUp());return}}a.doFocus(),this.doDeactivate()},qr.prototype.doMouseWheel=function(){this.standardMouseWheel()},qr.prototype.doKeyDown=function(){var a=this.diagram;a.commandHandler!==null&&a.commandHandler.doKeyDown()},qr.prototype.doKeyUp=function(){var a=this.diagram;a.commandHandler!==null&&a.commandHandler.doKeyUp()},qr.prototype.findTool=function(a){for(var y=this.mouseDownTools.length,x=0;x<y;x++){var E=this.mouseDownTools.M(x);if(E.name===a)return E}for(y=this.mouseMoveTools.length,x=0;x<y;x++)if(E=this.mouseMoveTools.M(x),E.name===a)return E;for(y=this.mouseUpTools.length,x=0;x<y;x++)if(E=this.mouseUpTools.M(x),E.name===a)return E;return null},qr.prototype.replaceTool=function(a,y){y!==null&&(y.diagram=this.diagram);for(var x=this.mouseDownTools.length,E=0;E<x;E++){var b=this.mouseDownTools.M(E);if(b.name===a)return y!==null?this.mouseDownTools.cd(E,y):this.mouseDownTools.mb(E),b}for(x=this.mouseMoveTools.length,E=0;E<x;E++)if(b=this.mouseMoveTools.M(E),b.name===a)return y!==null?this.mouseMoveTools.cd(E,y):this.mouseMoveTools.mb(E),b;for(x=this.mouseUpTools.length,E=0;E<x;E++)if(b=this.mouseUpTools.M(E),b.name===a)return y!==null?this.mouseUpTools.cd(E,y):this.mouseUpTools.mb(E),b;return null},qr.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)},we.Object.defineProperties(qr.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 Pr?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}}}),qr.prototype.replaceStandardTool=qr.prototype.gb;var Ru=new Je(qr,"WheelScroll",0),td=new Je(qr,"WheelZoom",1),If=new Je(qr,"WheelNone",2),Wd=new Je(qr,"GestureZoom",3),ju=new Je(qr,"GestureCancel",4),mh=new Je(qr,"GestureNone",5);qr.className="ToolManager",qr.WheelScroll=Ru,qr.WheelZoom=td,qr.WheelNone=If,qr.GestureZoom=Wd,qr.GestureCancel=ju,qr.GestureNone=mh;function lo(){fr.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 Gt(NaN,NaN),this.Fr=new Gt,this.hb=!0,this.Ik=100,this.Cg=[],this.te=new mn().freeze(),this.ia=new at,this.Bn=null,this.F="copy",this.Oc="",this.Pc="no-drop"}var $l;Ce(lo,fr),lo.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},lo.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},lo.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,(Qi?y.meta:y.control)||y.shift||a.clearSelection(!0),this.currentPart.isSelected=!0,a.R("ChangedSelection",a.selection))}}},lo.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),ra=null,this.isActive=!0,this.tl.set(a.position),ed(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&&Sa(a),df(a,this.draggedParts),this.Ea("Drag"),this.startPoint=a.firstInput.documentPoint,a.isMouseCaptured=!0,a.allowDragOut&&(this.isDragOutStarted=!0,this.Ym=!1,ra=this,Hu=this.diagram,this.doSimulatedDragOut()))};function ed(a,y){if(a.dragsLink){var x=a.diagram;x.allowRelink&&(x.model.Wj()&&y.count===1&&y.first()instanceof En?(a.draggedLink=y.first(),a.draggedLink.canRelinkFrom()&&a.draggedLink.canRelinkTo()&&a.draggedLink.Ej(),a.Oe=x.toolManager.findTool("Relinking"),a.Oe===null&&(a.Oe=new Es,a.Oe.diagram=x),a.Oe.originalLink=a.draggedLink):(a.draggedLink=null,a.Oe=null))}}lo.prototype.computeEffectiveCollection=function(a,y){return this.diagram.commandHandler.computeEffectiveCollection(a,y)},lo.prototype.Pd=function(a){return a===void 0?new su(Fo):this.isGridSnapEnabled?new su(new Gt(Math.round(1e3*a.x)/1e3,Math.round(1e3*a.y)/1e3)):new su(a.copy())},lo.prototype.doDeactivate=function(){this.isActive=!1;var a=this.diagram;if(this.diagram.layout.isRealtime=this.Sw,a.Fu(!1),a.ug(),Ol(this),Ju(a,this.draggedParts),this.draggedParts=this.currentPart=this.Bn=null,this.Ym=this.isDragOutStarted=!1,0<$l.count){for(var y=$l,x=y.length,E=0;E<x;E++){var b=y.M(E);Cu(b),ds(b),Ol(b),b.diagram.ug()}y.clear()}Cu(this),this.tl.h(NaN,NaN),Hu!==null&&(Hu.currentCursor=""),ra=Hu=null,ds(this),a.isMouseCaptured=!1,a.currentCursor="",a.Ns=!1,this.stopTransaction(),tc(a,!0)},lo.prototype.stopTransaction=function(){var a=this.diagram,y=fr.prototype.stopTransaction.call(this);return y&&a.undoManager.transactionToUndo!==null&&a.undoManager.transactionToUndo.ak(),y};function Ol(a){var y=a.diagram,x=y.skipsUndoManager;y.skipsUndoManager=!0,Of(a,y.lastInput,null),y.skipsUndoManager=x,a.Cg.length=0}function Vd(){var a=ra;ds(a),tu(a);var y=a.diagram;a.tl.w()&&(y.position=a.tl),y.ug()}lo.prototype.doCancel=function(){ds(this),tu(this);var a=this.diagram;this.tl.w()&&(a.position=this.tl),this.stopTool()},lo.prototype.doKeyDown=function(){var a=this.diagram,y=a.lastInput;this.isActive&&(y.key==="Esc"?this.doCancel():y.key!==a.previousInput.key&&this.doMouseMove())},lo.prototype.doKeyUp=function(){this.isActive&&this.doMouseMove()};function Gs(a,y){if(a.copiedParts===null){var x=a.diagram;if((!y||!x.isReadOnly&&!x.isModelReadOnly)&&a.draggedParts!==null){var E=x.undoManager;for(E.isEnabled&&E.isInTransaction?E.currentTransaction!==null&&0<E.currentTransaction.changes.count&&(x.undoManager.Kf(),x.Ea("Drag")):tu(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 yi,E=a.draggedParts.iterator;E.next();){var b=E.key;if(b.Zc()&&b.canCopy()){var z=y.I(b);z!==null&&(z.location=b.location,z.Va(),x.add(z,a.Pd(z.location)))}}for(y=y.iterator;y.next();)E=y.value,E instanceof En&&E.canCopy()&&x.add(E,a.Pd());a.copiedParts=x,ed(a,x.Lf()),a.draggedLink!==null&&(x=a.draggedLink,y=x.routeBounds,Cd(x,a.startPoint.x-(y.x+y.width/2),a.startPoint.y-(y.y+y.height/2))),a.doUpdateCursor(null)}}}function ds(a){var y=a.diagram;if(a.copiedParts!==null){if(y.Is(a.copiedParts.Lf(),!1),a.copiedParts=null,a.draggedParts!==null)for(var x=a.draggedParts.iterator;x.next();)x.key instanceof En&&(x.value.point=new Gt(0,0));a.doUpdateCursor(null)}y.skipsUndoManager=!1,y.partManager.addsToTemporaryLayer=!1,a.startPoint=y.firstInput.documentPoint}function Cu(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 al(a,y,x){var E=a.diagram,b=a.startPoint,z=Gt.alloc();z.assign(E.lastInput.documentPoint),a.moveParts(y,z.re(b),x),Gt.free(z),E.Gf("temporaryPixelRatio")===!0&&E.Yh===null&&30<E.$w&&(Sa(E),E.hk())}lo.prototype.moveParts=function(a,y,x){x===void 0&&(x=!1);var E=this.diagram;E!==null&&Ah(E,a,y,this.dragOptions,x)};function tu(a){if(a.draggedParts!==null){for(var y=a.diagram,x=a.draggedParts.iterator;x.next();){var E=x.key;E.Zc()&&(E.location=x.value.point)}for(x=a.draggedParts.iterator;x.next();)if(E=x.key,E instanceof En&&E.suspendsRouting){var b=x.value.point;a.draggedParts.add(E,a.Pd()),Cd(E,-b.x,-b.y)}y.bd()}}function Ud(a,y){var x=a.diagram;a.dragsLink&&(a.draggedLink!==null&&(a.draggedLink.fromNode=null,a.draggedLink.toNode=null),zu(a,!1));var E=a.findDragOverObject(y),b=x.lastInput;b.targetObject=E,a.doUpdateCursor(E);var z=x.skipsUndoManager,tt=!1;try{if(x.skipsUndoManager=!0,tt=Of(a,b,E),!a.isActive&&ra===null)return;var rt=E!==null?E.part:null;if(rt===null||x.handlesDragDropForTopLevelParts&&rt.isTopLevel&&!(rt instanceof Gi)){var ot=x.mouseDragOver;ot!==null&&(ot(b),tt=!0)}if(!a.isActive&&ra===null||(a.doDragOver(y,E),!a.isActive&&ra===null))return}finally{x.skipsUndoManager=z,tt&&x.bd()}a.Bn=E,x.isReadOnly||!x.allowMove&&!x.allowCopy||!x.allowHorizontalScroll&&!x.allowVerticalScroll||x.gs(b.viewPoint)}lo.prototype.findDragOverObject=function(a){var y=this;return ru(this.diagram,a,null,function(x){return x===null?x=!0:(x=x.part,x=!!(x===null||x instanceof Pr||x.layer.isTemporary||y.draggedParts&&y.draggedParts.contains(x)||y.copiedParts&&y.copiedParts.contains(x))),!x})},lo.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 Of(a,y,x){var E=!1,b=a.Cg.length,z=0<b?a.Cg[0]:null;if(x===z)return!1;y.handled=!1;for(var tt=0;tt<b;tt++){var rt=a.Cg[tt],ot=rt.mouseDragLeave;if(ot!==null&&(ot(y,rt,x),E=!0,y.handled))break}if(a.Cg.length=0,!a.isActive&&ra===null||x===null)return E;for(y.handled=!1,b=x;b!==null;)a.Cg.push(b),b=Wc(b);for(b=a.Cg.length,x=0;x<b&&(tt=a.Cg[x],rt=tt.mouseDragEnter,rt===null||(rt(y,tt,z),E=!0,!y.handled));x++);return E}function Wc(a){var y=a.panel;return y!==null?y:a instanceof mi&&!(a instanceof Gi)&&(a=a.containingGroup,a!==null&&a.handlesDragDropForMembers)?a:null}function jg(a,y,x){var E=a.Oe;if(E===null)return null;var b=a.diagram.og(y,E.portGravity,function(st){return E.findValidLinkablePort(st,x)});a=Gt.alloc();var z=1/0,tt=null;for(b=b.iterator;b.next();){var rt=b.value;if(rt.part!==null){var ot=rt.ga(Br,a);ot=y.Bf(ot),ot<z&&(tt=rt,z=ot)}}return Gt.free(a),tt}function zu(a,y){var x=a.draggedLink;if(x!==null&&!(2>x.pointsCount)){var E=a.diagram;if(!E.isReadOnly){var b=a.Oe;if(b!==null){var z=null,tt=null;x.fromNode===null&&(z=jg(a,x.i(0),!1),z!==null&&(tt=z.part));var rt=null,ot=null;x.toNode===null&&(rt=jg(a,x.i(x.pointsCount-1),!0),rt!==null&&(ot=rt.part)),b.isValidLink(tt,z,ot,rt)?y?(x.defaultFromPoint=x.i(0),x.defaultToPoint=x.i(x.pointsCount-1),x.suspendsRouting=!1,x.fromNode=tt,z!==null&&(x.fromPortId=z.portId),x.toNode=ot,rt!==null&&(x.toPortId=rt.portId),x.fromPort!==E.Mx&&E.R("LinkRelinked",x,E.Mx),x.toPort!==E.Nx&&E.R("LinkRelinked",x,E.Nx)):Uc(b,tt,z,ot,rt):Uc(b,null,null,null,null)}}}}lo.prototype.doDragOver=function(){};function Gu(a,y){var x=a.diagram;a.dragsLink&&zu(a,!0),Ol(a);var E=a.findDragOverObject(y),b=x.lastInput;if(b.targetObject=E,E!==null){b.handled=!1;for(var z=E;z!==null;){var tt=z.mouseDrop;if(tt!==null&&(tt(b,z),b.handled))break;jp(a,b,z),z=Wc(z)}}else z=x.mouseDrop,z!==null&&z(b);if(a.isActive||ra!==null){for(b=(a.copiedParts||a.draggedParts).iterator;b.next();)z=b.key,z instanceof Vn&&z.linksConnected.each(function(rt){rt.suspendsRouting=!1});if(a.doDropOnto(y,E),a.isActive||ra!==null){for(a=Ye.alloc(),y=x.selection.iterator;y.next();)E=y.value,E instanceof Vn&&zp(x,E,a);Ye.free(a)}}}function jp(a,y,x){a=a.diagram,x=x.part,!a.handlesDragDropForTopLevelParts||!x.isTopLevel||x instanceof Gi||(x=a.mouseDrop,x!==null&&x(y))}function zp(a,y,x){var E=!1;if(x=y.getAvoidableRect(x),a.viewportBounds.Re(x)&&(E=!0),a=a.Nu(x,function(b){return b.part},function(b){return b instanceof En},!0,function(b){return b instanceof En},E),a.count!==0)for(a=a.iterator;a.next();)x=a.value,!x.Td(y)&&x.isAvoiding&&x.bb()}lo.prototype.doDropOnto=function(){},lo.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()?(Gs(this,!1),df(a,this.copiedParts),al(this,this.copiedParts,!1),Ju(a,this.copiedParts)):this.mayMove()?(ds(this),al(this,this.draggedParts,!0)):this.mayDragOut()?(Gs(this,!1),al(this,this.copiedParts,!1)):ds(this),Ud(this,a.lastInput.documentPoint))}},lo.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?(ds(this),Gs(this,!0),df(a,this.copiedParts),al(this,this.copiedParts,!1),Ju(a,this.copiedParts),this.copiedParts!==null&&(a.R("ChangingSelection",a.selection),a.clearSelection(!0),this.copiedParts.iteratorKeys.each(function(b){b.isSelected=!0}))):(y=!0,ds(this),this.mayMove()&&(al(this,this.draggedParts,!0),Ud(this,a.lastInput.documentPoint))),this.Ym=!0,Gu(this,a.lastInput.documentPoint),this.isActive){var E=x?this.copiedParts.Lf():this.draggedParts.Lf();this.copiedParts=null,y&&zg(this),a.Ya(),Ju(a,this.draggedParts),this.transactionResult=x?"Copy":"Move",a.R(x?"SelectionCopied":"SelectionMoved",E)}this.stopTool(),x&&a.R("ChangedSelection",a.selection)}}},lo.prototype.simulatedMouseMove=function(a,y,x){if(ra===null)return!1;var E=ra.diagram;x instanceof Be||(x=null);var b=Hu;return x!==b&&(b!==null&&b!==E&&(b.ug(),ra.isDragOutStarted=!1,b=b.toolManager.findTool("Dragging"),b!==null&&b.doSimulatedDragLeave()),Hu=x,x!==null&&x!==E&&(Vd(),b=x.toolManager.findTool("Dragging"),b!==null&&($l.contains(b)||$l.add(b),b.doSimulatedDragEnter())),this.doUpdateCursor(null)),x===null||x===E||!x.allowDrop||x.isReadOnly||!x.allowInsert?!1:(E=x.toolManager.findTool("Dragging"),E!==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,E.doSimulatedDragOver()),!0)},lo.prototype.simulatedMouseUp=function(a,y,x){if(ra===null)return!1;var E=Hu,b=ra.diagram;if(x===null)return ra.doCancel(),!0;if(x!==E){var z=E.toolManager.findTool("Dragging");if(E!==null&&E!==b&&z!==null)return E.ug(),ra.isDragOutStarted=!1,z.doSimulatedDragLeave(),!1;Hu=x,E=x.toolManager.findTool("Dragging"),E!==null&&(Vd(),$l.contains(E)||$l.add(E),E.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 Gt),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=ra,a!==null&&(x=a.mayCopy(),a.transactionResult=x?"Copy":"Move",a.stopTool()),!0):!1};function zg(a){if(a.draggedParts!==null)for(var y=a.draggedParts.iterator;y.next();){var x=y.key;x instanceof Vn&&(x=x.containingGroup,x===null||x.placeholder===null||a.draggedParts.contains(x)||x.placeholder.v())}}lo.prototype.mayCopy=function(){if(!this.isCopyEnabled)return!1;var a=this.diagram;if(a.isReadOnly||a.isModelReadOnly||!a.allowInsert||!a.allowCopy||(Qi?!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())},lo.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())},lo.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())},lo.prototype.computeBorder=function(a,y,x){return this.Ym||this.draggedParts===null||this.draggedParts.contains(a)?null:x.assign(y)},lo.prototype.Az=function(){return ra},lo.prototype.mayDragIn=function(){var a=this.diagram;if(!a.allowDrop||a.isReadOnly||a.isModelReadOnly||!a.allowInsert)return!1;var y=ra;return!(y===null||y.diagram.model.dataFormat!==a.model.dataFormat)},lo.prototype.doSimulatedDragEnter=function(){if(this.mayDragIn()){var a=this.diagram;a.animationManager.Cc(),Ms(a),a.animationManager.Cc(),a=ra,a!==null&&(a.diagram.Ns=!1),this.doUpdateCursor(null)}},lo.prototype.doSimulatedDragLeave=function(){var a=ra;a!==null&&a.doSimulatedDragOut(),this.doCancel()},lo.prototype.doSimulatedDragOver=function(){var a=this.diagram;a.animationManager.Dm=!0;var y=ra;if(y!==null&&y.draggedParts!==null){if(!this.mayDragIn())return;Gg(this,y.draggedParts.Lf(),!1,a.firstInput),al(this,this.copiedParts,!1),Ud(this,a.lastInput.documentPoint)}a.animationManager.Dm=!1},lo.prototype.doSimulatedDrop=function(){var a=this.diagram,y=ra;if(y!==null){var x=y.diagram;if(y.Ym=!0,ds(this),!this.mayDragIn())return;a.animationManager.Dm=!0,a.R("ChangingSelection",a.selection),this.Ea("Drop"),Gg(this,y.draggedParts.Lf(),!0,a.lastInput),al(this,this.copiedParts,!1);var E=new mn;this.copiedParts!==null&&(a.clearSelection(!0),this.copiedParts.iteratorKeys.each(function(b){b.isSelected=!0,E.add(b)})),Gu(this,a.lastInput.documentPoint),a.Ya(),this.copiedParts!==null&&(this.transactionResult="ExternalCopy"),this.copiedParts=null,a.doFocus(),a.R("ExternalObjectsDropped",E,x),this.stopTransaction(),a.R("ChangedSelection",a.selection)}a.animationManager.Dm=!1};function Gg(a,y,x,E){if(a.copiedParts===null){var b=a.diagram;if(!b.isReadOnly&&!b.isModelReadOnly){b.skipsUndoManager=!x,b.partManager.addsToTemporaryLayer=!x,a.startPoint=E.documentPoint,x=b.Kj(y,b,!0);var z=Ye.alloc();b=E=1/0;for(var tt=-1/0,rt=-1/0,ot=y.iterator;ot.next();){var st=ot.value;if(st.isVisible()){var ut=st.location;st=ut.x,ut=ut.y,isNaN(st)||isNaN(ut)||(st<E&&(E=st),ut<b&&(b=ut),st>tt&&(tt=st),ut>rt&&(rt=ut))}}for(E===1/0?z.h(0,0,0,0):z.h(E,b,tt-E,rt-b),E=z.x+z.width/2,b=z.y+z.height/2,Ye.free(z),z=a.Fr,tt=new yi,rt=Gt.alloc(),ot=y.iterator;ot.next();)st=ot.value,st instanceof En&&st.canCopy()&&(ut=x.I(st),ut!==null&&(ut.points=st.points,Cd(ut,z.x-E,z.y-b),ut.suspendsRouting=!0,tt.add(ut,a.Pd())));for(y=y.iterator;y.next();)st=y.value,st.Zc()&&st.canCopy()&&(ot=x.I(st),ot!==null&&(st=st.location,rt.h(z.x-(E-st.x),z.y-(b-st.y)),ot.location=rt,ot.Va(),tt.add(ot,a.Pd(rt))));Gt.free(rt),a.copiedParts=tt,ed(a,tt.Lf()),a.draggedLink!==null&&(x=a.draggedLink,y=x.routeBounds,Cd(x,a.startPoint.x-(y.x+y.width/2),a.startPoint.y-(y.y+y.height/2))),a.doUpdateCursor(null)}}}lo.prototype.doSimulatedDragOut=function(){var a=this.diagram;a.Ns=!1,this.mayCopy()||this.mayMove()?a.currentCursor="":a.currentCursor=this.nodropCursor,this.Bn=null},lo.prototype.computeMove=function(a,y,x,E){return x=this.diagram,x!==null?x.computeMove(a,y,this.dragOptions,E):new Gt},we.Object.defineProperties(lo.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}}}),lo.prototype.getDraggingSource=lo.prototype.Az;var ra=null,Hu=null;lo.className="DraggingTool",$l=new yn,tr("draggingTool",function(){return this.findTool("Dragging")},function(a){this.gb("Dragging",a,this.mouseMoveTools)}),qr.prototype.doCancel=function(){ra!==null&&ra.doCancel(),fr.prototype.doCancel.call(this)};function xo(){fr.call(this),this.te=100,this.Ha=!1,this.u="pointer";var a=new En,y=new Ui;y.isPanelMain=!0,y.stroke="blue",a.add(y),y=new Ui,y.toArrow="Standard",y.fill="blue",y.stroke="blue",a.add(y),a.layerName="Tool",this.Ci=a,a=new Vn,y=new Ui,y.portId="",y.figure="Rectangle",y.fill=null,y.stroke="magenta",y.strokeWidth=2,y.desiredSize=bi,a.add(y),a.selectable=!1,a.layerName="Tool",this.Bi=a,this.j=y,a=new Vn,y=new Ui,y.portId="",y.figure="Rectangle",y.fill=null,y.stroke="magenta",y.strokeWidth=2,y.desiredSize=bi,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 yi,this.Of=this.gj=this.Pf=null}Ce(xo,fr),xo.prototype.doStop=function(){this.diagram.ug(),this.originalToPort=this.originalToNode=this.originalFromPort=this.originalFromNode=this.originalLink=null,this.validPortsCache.clear(),this.targetPort=null},xo.prototype.copyPortProperties=function(a,y,x,E,b){if(a!==null&&y!==null&&x!==null&&E!==null){var z=y.Df(),tt=Re.alloc();tt.width=y.naturalBounds.width*z,tt.height=y.naturalBounds.height*z,E.desiredSize=tt,Re.free(tt),b?(E.toSpot=y.toSpot,E.toEndSegmentLength=y.toEndSegmentLength):(E.fromSpot=y.fromSpot,E.fromEndSegmentLength=y.fromEndSegmentLength),x.locationSpot=Br,z=Gt.alloc(),x.location=y.ga(Br,z),Gt.free(z),E.angle=y.li(),this.portTargeted!==null&&this.portTargeted(a,y,x,E,b)}},xo.prototype.setNoTargetPortProperties=function(a,y,x){y!==null&&(y.desiredSize=bi,y.fromSpot=No,y.toSpot=No),a!==null&&(a.location=this.diagram.lastInput.documentPoint),this.portTargeted!==null&&this.portTargeted(null,null,a,y,x)},xo.prototype.doMouseDown=function(){this.isActive&&this.doMouseMove()},xo.prototype.doMouseMove=function(){if(this.isActive){var a=this.diagram;if(this.targetPort=this.findTargetPort(this.isForwards),this.targetPort!==null&&this.targetPort.part instanceof Vn){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)}},xo.prototype.findValidLinkablePort=function(a,y){if(a===null)return null;var x=a.part;if(!(x instanceof Vn))return null;for(;a!==null;){var E=y?a.toLinkable:a.fromLinkable;if(E===!0&&(a.portId!==null||a instanceof Vn)&&(y?this.isValidTo(x,a):this.isValidFrom(x,a)))return a;if(E===!1)break;a=a.panel}return null},xo.prototype.findTargetPort=function(a){var y=this.diagram,x=y.lastInput.documentPoint,E=this.portGravity;0>=E&&(E=.1);var b=this,z=y.og(x,E,function(ft){return b.findValidLinkablePort(ft,a)},null,!0);for(E=1/0,y=null,z=z.iterator;z.next();){var tt=z.value,rt=tt.part;if(rt instanceof Vn){var ot=tt.ga(Br,Gt.alloc()),st=x.x-ot.x,ut=x.y-ot.y;Gt.free(ot),ot=st*st+ut*ut,ot<E&&(st=this.validPortsCache.I(tt),st!==null?st&&(y=tt,E=ot):a&&this.isValidLink(this.originalFromNode,this.originalFromPort,rt,tt)||!a&&this.isValidLink(rt,tt,this.originalToNode,this.originalToPort)?(this.validPortsCache.add(tt,!0),y=tt,E=ot):this.validPortsCache.add(tt,!1))}}return y!==null&&(x=y.part,x instanceof Vn&&(x.layer===null||x.layer.allowLink))?y:null},xo.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},xo.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},xo.prototype.isInSameNode=function(a,y){return a===null||y===null?!1:a===y?!0:(a=a.part,y=y.part,a!==null&&a===y)},xo.prototype.isLinked=function(a,y){if(a===null||y===null)return!1;var x=a.part;if(!(x instanceof Vn))return!1;a=a.portId,a===null&&(a="");var E=y.part;if(!(E instanceof Vn))return!1;for(y=y.portId,y===null&&(y=""),y=E.Sd(y);y.next();)if(E=y.value,E.fromNode===x&&E.fromPortId===a)return!0;return!1},xo.prototype.isValidLink=function(a,y,x,E){if(!this.isValidFrom(a,y)||!this.isValidTo(x,E)||!(y===null||E===null||(y.fromLinkableSelfNode&&E.toLinkableSelfNode||!this.isInSameNode(y,E))&&(y.fromLinkableDuplicates&&E.toLinkableDuplicates||!this.isLinked(y,E)))||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 b=a.linkValidation;if(b!==null&&!b(a,y,x,E,this.originalLink))return!1}return x!==null&&(b=x.linkValidation,b!==null&&!b(a,y,x,E,this.originalLink))?!1:(b=this.linkValidation,b!==null?b(a,y,x,E,this.originalLink):!0)},xo.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 E=new mn;return E.add(a),Ba(this,x,y,E)};function Ba(a,y,x,E){if(y===x)return!0;var b=y.fromNode;return b!==null&&b.isLinkLabel&&(E.add(b),Ba(a,b.labeledLink,x,E))?!0:(y=y.toNode,!!(y!==null&&y.isLinkLabel&&(E.add(y),Ba(a,y.labeledLink,x,E))))}xo.prototype.isValidCycle=function(a,y,x){if(x===void 0&&(x=null),a===null||y===null)return this.isUnconnectedLinkValid;var E=this.diagram.validCycle;if(E!==Dh){if(E===lg){if(E=x||this.temporaryLink,E!==null&&!E.isTreeLink)return!0;for(E=y.linksConnected;E.next();){var b=E.value;if(b!==x&&b.isTreeLink&&b.toNode===y)return!1}return!Oa(this,a,y,x,!0)}if(E===ug){if(E=x||this.temporaryLink,E!==null&&!E.isTreeLink)return!0;for(E=a.linksConnected;E.next();)if(b=E.value,b!==x&&b.isTreeLink&&b.fromNode===a)return!1;return!Oa(this,a,y,x,!0)}if(E===og)return a===y?a=!0:(E=new mn,E.add(y),a=Ra(this,E,a,y,x)),!a;if(E===ag)return!Oa(this,a,y,x,!1);if(E===sg)return a===y?a=!0:(E=new mn,E.add(y),a=nd(this,E,a,y,x)),!a}return!0};function Oa(a,y,x,E,b){if(y===x)return!0;if(y===null||x===null)return!1;for(var z=y.linksConnected;z.next();){var tt=z.value;if(tt!==E&&(!b||tt.isTreeLink)&&tt.toNode===y&&(tt=tt.fromNode,tt!==y&&Oa(a,tt,x,E,b)))return!0}return!1}function Ra(a,y,x,E,b){if(x===E)return!0;if(x===null||E===null||y.contains(x))return!1;y.add(x);for(var z=x.linksConnected;z.next();){var tt=z.value;if(tt!==b&&tt.toNode===x&&(tt=tt.fromNode,tt!==x&&Ra(a,y,tt,E,b)))return!0}return!1}function nd(a,y,x,E,b){if(x===E)return!0;if(x===null||E===null||y.contains(x))return!1;y.add(x);for(var z=x.linksConnected;z.next();){var tt=z.value;if(tt!==b){var rt=tt.fromNode;if(tt=tt.toNode,rt=rt===x?tt:rt,rt!==x&&nd(a,y,rt,E,b))return!0}}return!1}we.Object.defineProperties(xo.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}}}),xo.className="LinkingBaseTool";function ja(){xo.call(this),this.name="Linking",this.V={},this.F=null,this.K=Rl,this.Xd=null}Ce(ja,xo),ja.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},ja.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 Vn)))return null;var x=this.direction;if(x===Rl||x===Kd){var E=this.findValidLinkablePort(y,!1);if(E!==null||this.startObject===a&&(E=a.port,this.findValidLinkablePort(E,!1)))return this.isForwards=!0,E}return(x===Rl||x===Vc)&&(y=this.findValidLinkablePort(y,!0),y!==null||this.startObject===a&&(y=a.port,this.findValidLinkablePort(y,!0)))?(this.isForwards=!1,y):null},ja.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 Vn&&(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 Vn&&(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)},ja.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()},ja.prototype.doStop=function(){xo.prototype.doStop.call(this),this.startObject=null},ja.prototype.doMouseUp=function(){if(this.isActive){var a=this.diagram,y=this.transactionResult=null,x=null,E=null,b=null,z=null;try{var tt=this.targetPort=this.findTargetPort(this.isForwards);if(tt!==null){var rt=tt.part;rt instanceof Vn&&(this.isForwards?(this.originalFromNode!==null&&(y=this.originalFromNode,x=this.originalFromPort),E=rt,b=tt):(y=rt,x=tt,this.originalToNode!==null&&(E=this.originalToNode,b=this.originalToPort)))}else this.isForwards?this.originalFromNode!==null&&this.isUnconnectedLinkValid&&(y=this.originalFromNode,x=this.originalFromPort):this.originalToNode!==null&&this.isUnconnectedLinkValid&&(E=this.originalToNode,b=this.originalToPort);y!==null||E!==null?(z=this.insertLink(y,x,E,b),z!==null?(tt===null&&(this.isForwards?z.defaultToPoint=a.lastInput.documentPoint:z.defaultFromPoint=a.lastInput.documentPoint),a.allowSelect&&(a.R("ChangingSelection",a.selection),a.clearSelection(!0),z.isSelected=!0),this.transactionResult=this.name,a.R("LinkDrawn",z)):this.doNoLink(y,x,E,b)):this.isForwards?this.doNoLink(this.originalFromNode,this.originalFromPort,null,null):this.doNoLink(null,null,this.originalToNode,this.originalToPort)}finally{this.stopTool(),z&&a.allowSelect&&a.R("ChangedSelection",a.selection)}}},ja.prototype.isNewTreeLink=function(){var a=this.archetypeLinkData;if(a===null)return!0;if(a instanceof En)return a.isTreeLink;var y=this.diagram;return y===null?!0:(a=y.partManager.getLinkCategoryForData(a),y=y.partManager.findLinkTemplateForCategory(a),y!==null?y.isTreeLink:!0)},ja.prototype.insertLink=function(a,y,x,E){return this.diagram.partManager.insertLink(a,y,x,E)},ja.prototype.doNoLink=function(){},we.Object.defineProperties(ja.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 Rl=new Je(ja,"Either",0),Kd=new Je(ja,"ForwardsOnly",0),Vc=new Je(ja,"BackwardsOnly",0);ja.className="LinkingTool",ja.Either=Rl,ja.ForwardsOnly=Kd,ja.BackwardsOnly=Vc;function Es(){xo.call(this),this.name="Relinking";var a=new Ui;a.figure="Diamond",a.desiredSize=Yi,a.fill="lightblue",a.stroke="dodgerblue",a.cursor=this.linkingCursor,a.segmentIndex=0,this.V=a,a=new Ui,a.figure="Diamond",a.desiredSize=Yi,a.fill="lightblue",a.stroke="dodgerblue",a.cursor=this.linkingCursor,a.segmentIndex=-1,this.Xd=a,this.F=null,this.Ew=new Ye}Ce(Es,xo),Es.prototype.updateAdornments=function(a){if(a!==null&&a instanceof En){var y="RelinkFrom",x=null;if(a.isSelected&&!this.diagram.isReadOnly){var E=a.selectionObject;E!==null&&a.canRelinkFrom()&&a.actualBounds.w()&&a.isVisible()&&E.actualBounds.w()&&E.Ed()&&(x=a.Pj(y),x===null&&(x=this.makeAdornment(E,!1),a.bh(y,x)))}x===null&&a.Jf(y),y="RelinkTo",x=null,a.isSelected&&!this.diagram.isReadOnly&&(E=a.selectionObject,E!==null&&a.canRelinkTo()&&a.actualBounds.w()&&a.isVisible()&&E.actualBounds.w()&&E.Ed()&&(x=a.Pj(y),x===null?(x=this.makeAdornment(E,!0),a.bh(y,x)):x.v())),x===null&&a.Jf(y)}},Es.prototype.makeAdornment=function(a,y){var x=new Pr;return x.type=pn.Link,y=y?this.toHandleArchetype:this.fromHandleArchetype,y!==null&&x.add(y.copy()),x.adornedObject=a,x},Es.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},Es.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 Pr&&x.adornedPart instanceof En))return;this.handle=y,this.isForwards=x===null||x.category==="RelinkTo",this.originalLink=x.adornedPart}this.Ea(this.name),a.isMouseCaptured=!0,a.currentCursor=this.linkingCursor,this.originalFromPort=this.originalLink.fromPort,this.originalFromNode=this.originalLink.fromNode,this.originalToPort=this.originalLink.toPort,this.originalToNode=this.originalLink.toNode,this.Ew.set(this.originalLink.actualBounds),this.originalLink!==null&&0<this.originalLink.pointsCount&&(this.originalLink.fromNode===null&&(this.temporaryFromPort!==null&&(this.temporaryFromPort.desiredSize=Nn),this.temporaryFromNode!==null&&(this.temporaryFromNode.location=this.originalLink.i(0))),this.originalLink.toNode===null&&(this.temporaryToPort!==null&&(this.temporaryToPort.desiredSize=Nn),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},Es.prototype.copyLinkProperties=function(a,y){if(a!==null&&y!==null){y.adjusting=a.adjusting,y.corner=a.corner;var x=a.curve;(x===gp||x===Ed)&&(x=ns),y.curve=x,y.curviness=a.curviness,y.isTreeLink=a.isTreeLink,y.points=a.points,y.routing=a.routing,y.smoothness=a.smoothness,y.fromSpot=a.fromSpot,y.fromEndSegmentLength=a.fromEndSegmentLength,y.fromShortLength=a.fromShortLength,y.toSpot=a.toSpot,y.toEndSegmentLength=a.toEndSegmentLength,y.toShortLength=a.toShortLength}},Es.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()},Es.prototype.doStop=function(){xo.prototype.doStop.call(this),this.handle=null},Es.prototype.doMouseUp=function(){if(this.isActive){var a=this.diagram;this.transactionResult=null;var y=this.originalFromNode,x=this.originalFromPort,E=this.originalToNode,b=this.originalToPort,z=this.originalLink;try{if(this.targetPort=this.findTargetPort(this.isForwards),this.targetPort!==null){var tt=this.targetPort.part;tt instanceof Vn&&(this.isForwards?(E=tt,b=this.targetPort):(y=tt,x=this.targetPort))}else this.isUnconnectedLinkValid?this.isForwards?b=E=null:x=y=null:z=null;z!==null?(this.reconnectLink(z,this.isForwards?E:y,this.isForwards?b:x,this.isForwards),this.targetPort===null&&(this.isForwards?z.defaultToPoint=a.lastInput.documentPoint:z.defaultFromPoint=a.lastInput.documentPoint,z.bb()),this.transactionResult=this.name,a.R("LinkRelinked",z,this.isForwards?this.originalToPort:this.originalFromPort)):this.doNoRelink(this.originalLink,this.isForwards),this.originalLink.Xo(this.Ew)}finally{this.stopTool()}}},Es.prototype.reconnectLink=function(a,y,x,E){return x=x!==null&&x.portId!==null?x.portId:"",E?(a.toNode=y,a.toPortId=x):(a.fromNode=y,a.fromPortId=x),!0},Es.prototype.doNoRelink=function(){};function Uc(a,y,x,E,b){y!==null?(a.copyPortProperties(y,x,a.temporaryFromNode,a.temporaryFromPort,!1),a.diagram.add(a.temporaryFromNode)):a.diagram.remove(a.temporaryFromNode),E!==null?(a.copyPortProperties(E,b,a.temporaryToNode,a.temporaryToPort,!0),a.diagram.add(a.temporaryToNode)):a.diagram.remove(a.temporaryToNode)}we.Object.defineProperties(Es.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 Pr))throw Error("new handle is not in an Adornment: "+a);this.F=a}}}),Es.className="RelinkingTool",tr("linkingTool",function(){return this.findTool("Linking")},function(a){this.gb("Linking",a,this.mouseMoveTools)}),tr("relinkingTool",function(){return this.findTool("Relinking")},function(a){this.gb("Relinking",a,this.mouseDownTools)});function Mo(){fr.call(this),this.name="LinkReshaping";var a=new Ui;a.figure="Rectangle",a.desiredSize=cr,a.fill="lightblue",a.stroke="dodgerblue",this.o=a,a=new Ui,a.figure="Diamond",a.desiredSize=Yi,a.fill="lightblue",a.stroke="dodgerblue",a.cursor="move",this.u=a,this.F=3,this.Ts=this.j=null,this.Fw=new Gt,this.Yq=new yn}Ce(Mo,fr),Mo.prototype.Ru=function(a){return a&&a.reshapingBehavior.value!==0?a.reshapingBehavior:Rf},Mo.prototype.om=function(a,y){a.reshapingBehavior=y},Mo.prototype.updateAdornments=function(a){if(a!==null&&a instanceof En){var y=null;if(a.isSelected&&!this.diagram.isReadOnly){var x=a.path;x!==null&&a.canReshape()&&a.actualBounds.w()&&a.isVisible()&&x.actualBounds.w()&&x.Ed()&&(y=a.Pj(this.name),y===null||y.Aw!==a.pointsCount||y.Uw!==a.resegmentable)&&(y=this.makeAdornment(x),y!==null&&(y.Aw=a.pointsCount,y.Uw=a.resegmentable,a.bh(this.name,y)))}y===null&&a.Jf(this.name)}},Mo.prototype.makeAdornment=function(a){var y=a.part,x=y.pointsCount,E=y.isOrthogonal,b=null;if(y.points!==null&&1<x){b=new Pr,b.type=pn.Link,x=y.firstPickIndex;var z=y.lastPickIndex,tt=E?1:0;if(y.resegmentable&&y.computeCurve()!==el)for(var rt=x+tt;rt<z-tt;rt++){var ot=this.makeResegmentHandle(a,rt);ot!==null&&(ot.segmentIndex=rt,ot.segmentFraction=.5,ot.fromMaxLinks=999,b.add(ot))}for(tt=x+1;tt<z;tt++)if(rt=this.makeHandle(a,tt),rt!==null){if(rt.segmentIndex=tt,tt!==x)if(tt===x+1&&E){ot=y.i(x);var st=y.i(x+1);Se.B(ot.x,st.x)&&Se.B(ot.y,st.y)&&(st=y.i(x-1)),Se.B(ot.x,st.x)?(this.om(rt,Uu),rt.cursor="n-resize"):Se.B(ot.y,st.y)&&(this.om(rt,Vu),rt.cursor="w-resize")}else tt===z-1&&E?(ot=y.i(z-1),st=y.i(z),Se.B(ot.x,st.x)&&Se.B(ot.y,st.y)&&(ot=y.i(z+1)),Se.B(ot.x,st.x)?(this.om(rt,Uu),rt.cursor="n-resize"):Se.B(ot.y,st.y)&&(this.om(rt,Vu),rt.cursor="w-resize")):tt!==z&&(this.om(rt,Kc),rt.cursor="move");b.add(rt)}b.adornedObject=a}return b},Mo.prototype.makeHandle=function(){var a=this.handleArchetype;return a===null?null:a.copy()},Mo.prototype.makeResegmentHandle=function(){var a=this.midHandleArchetype;return a===null?null:a.copy()},Mo.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},Mo.prototype.doActivate=function(){var a=this.diagram;if(this.handle===null&&(this.handle=this.findToolHandleAt(a.firstInput.documentPoint,this.name)),this.handle!==null){var y=this.handle.part.adornedPart;if(y instanceof En){if(this.Ts=y,a.isMouseCaptured=!0,this.Ea(this.name),y.resegmentable&&this.handle.fromMaxLinks===999){var x=y.points.copy(),E=this.getResegmentingPoint();if(x.Gb(this.handle.segmentIndex+1,E),y.isOrthogonal&&x.Gb(this.handle.segmentIndex+1,E),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}}},Mo.prototype.doDeactivate=function(){this.stopTransaction(),this.Ts=this.handle=null,this.isActive=this.diagram.isMouseCaptured=!1},Mo.prototype.stopTransaction=function(){var a=this.diagram,y=fr.prototype.stopTransaction.call(this);return y&&a.undoManager.transactionToUndo!==null&&a.undoManager.transactionToUndo.ak(),y},Mo.prototype.doCancel=function(){var a=this.adornedLink;a!==null&&(a.points=this.Yq),this.stopTool()},Mo.prototype.getResegmentingPoint=function(){return this.handle.ga(Br)},Mo.prototype.doMouseMove=function(){var a=this.diagram;this.isActive&&(a=this.computeReshape(a.lastInput.documentPoint),this.reshape(a))},Mo.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,E=y.i(x-1),b=y.i(x),z=y.i(x+1);if(y.isOrthogonal){if(x>y.firstPickIndex+1&&x<y.lastPickIndex-1){var tt=y.i(x-2);if(Math.abs(E.x-b.x)<this.resegmentingDistance&&Math.abs(E.y-b.y)<this.resegmentingDistance&&(Wu(this,tt,E,b,z,!0)||Wu(this,tt,E,b,z,!1))){var rt=y.points.copy();Wu(this,tt,E,b,z,!0)?(rt.cd(x-2,new Gt(tt.x,(z.y+tt.y)/2)),rt.cd(x+1,new Gt(z.x,(z.y+tt.y)/2))):(rt.cd(x-2,new Gt((z.x+tt.x)/2,tt.y)),rt.cd(x+1,new Gt((z.x+tt.x)/2,z.y))),rt.mb(x),rt.mb(x-1),y.points=rt,y.Wb()}else tt=y.i(x+2),Math.abs(b.x-z.x)<this.resegmentingDistance&&Math.abs(b.y-z.y)<this.resegmentingDistance&&(Wu(this,E,b,z,tt,!0)||Wu(this,E,b,z,tt,!1))&&(rt=y.points.copy(),Wu(this,E,b,z,tt,!0)?(rt.cd(x-1,new Gt(E.x,(E.y+tt.y)/2)),rt.cd(x+2,new Gt(tt.x,(E.y+tt.y)/2))):(rt.cd(x-1,new Gt((E.x+tt.x)/2,E.y)),rt.cd(x+2,new Gt((E.x+tt.x)/2,tt.y))),rt.mb(x+1),rt.mb(x),y.points=rt,y.Wb())}}else tt=Gt.alloc(),Se.qh(E.x,E.y,z.x,z.y,b.x,b.y,tt)&&tt.Bf(b)<this.resegmentingDistance*this.resegmentingDistance&&(E=y.points.copy(),E.mb(x),y.points=E,y.Wb()),Gt.free(tt)}a.Ya(),this.transactionResult=this.name,a.R("LinkReshaped",this.adornedLink,this.Yq)}this.stopTool()};function Wu(a,y,x,E,b,z){return z?Math.abs(y.y-x.y)<a.resegmentingDistance&&Math.abs(x.y-E.y)<a.resegmentingDistance&&Math.abs(E.y-b.y)<a.resegmentingDistance:Math.abs(y.x-x.x)<a.resegmentingDistance&&Math.abs(x.x-E.x)<a.resegmentingDistance&&Math.abs(E.x-b.x)<a.resegmentingDistance}Mo.prototype.reshape=function(a){var y=this.adornedLink;y.uh();var x=this.handle.segmentIndex,E=this.Ru(this.handle);if(y.isOrthogonal)if(x===y.firstPickIndex+1)x=y.firstPickIndex+1,E===Uu?(y.L(x,y.i(x-1).x,a.y),y.L(x+1,y.i(x+2).x,a.y)):E===Vu&&(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,E===Uu?(y.L(x-1,y.i(x-2).x,a.y),y.L(x,y.i(x+1).x,a.y)):E===Vu&&(y.L(x-1,a.x,y.i(x-2).y),y.L(x,a.x,y.i(x+1).y));else{E=x;var b=y.i(E),z=y.i(E-1),tt=y.i(E+1);Se.B(z.x,b.x)&&Se.B(b.y,tt.y)?(Se.B(z.x,y.i(E-2).x)&&!Se.B(z.y,y.i(E-2).y)?(y.m(E,a.x,z.y),x++,E++):y.L(E-1,a.x,z.y),Se.B(tt.y,y.i(E+2).y)&&!Se.B(tt.x,y.i(E+2).x)?y.m(E+1,tt.x,a.y):y.L(E+1,tt.x,a.y)):Se.B(z.y,b.y)&&Se.B(b.x,tt.x)?(Se.B(z.y,y.i(E-2).y)&&!Se.B(z.x,y.i(E-2).x)?(y.m(E,z.x,a.y),x++,E++):y.L(E-1,z.x,a.y),Se.B(tt.x,y.i(E+2).x)&&!Se.B(tt.y,y.i(E+2).y)?y.m(E+1,a.x,tt.y):y.L(E+1,a.x,tt.y)):Se.B(z.x,b.x)&&Se.B(b.x,tt.x)?(Se.B(z.x,y.i(E-2).x)&&!Se.B(z.y,y.i(E-2).y)?(y.m(E,a.x,z.y),x++,E++):y.L(E-1,a.x,z.y),Se.B(tt.x,y.i(E+2).x)&&!Se.B(tt.y,y.i(E+2).y)?y.m(E+1,a.x,tt.y):y.L(E+1,a.x,tt.y)):Se.B(z.y,b.y)&&Se.B(b.y,tt.y)&&(Se.B(z.y,y.i(E-2).y)&&!Se.B(z.x,y.i(E-2).x)?(y.m(E,z.x,a.y),x++,E++):y.L(E-1,z.x,a.y),Se.B(tt.y,y.i(E+2).y)&&!Se.B(tt.x,y.i(E+2).x)?y.m(E+1,tt.x,a.y):y.L(E+1,tt.x,a.y)),y.L(x,a.x,a.y)}else y.L(x,a.x,a.y),E=y.fromNode,b=y.fromPort,E!==null&&(z=E.findVisibleNode(),z!==null&&z!==E&&(E=z,b=E.port)),x===1&&y.computeSpot(!0,b).Mc()&&(z=b.ga(Br,Gt.alloc()),E=y.getLinkPointFromPoint(E,b,z,a,!0,Gt.alloc()),y.L(0,E.x,E.y),Gt.free(z),Gt.free(E)),E=y.toNode,b=y.toPort,E!==null&&(z=E.findVisibleNode(),z!==null&&z!==E&&(E=z,b=E.port)),x===y.pointsCount-2&&y.computeSpot(!1,b).Mc()&&(x=b.ga(Br,Gt.alloc()),a=y.getLinkPointFromPoint(E,b,x,a,!1,Gt.alloc()),y.L(y.pointsCount-1,a.x,a.y),Gt.free(x),Gt.free(a));y.zf()},Mo.prototype.computeReshape=function(a){var y=this.adornedLink,x=this.handle.segmentIndex;switch(this.Ru(this.handle)){case Kc:return a;case Uu:return new Gt(y.i(x).x,a.y);case Vu:return new Gt(a.x,y.i(x).y);default:case Rf:return y.i(x)}},we.Object.defineProperties(Mo.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 Pr))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}}}),Mo.prototype.setReshapingBehavior=Mo.prototype.om,Mo.prototype.getReshapingBehavior=Mo.prototype.Ru;var Rf=new Je(Mo,"None",0),Vu=new Je(Mo,"Horizontal",1),Uu=new Je(Mo,"Vertical",2),Kc=new Je(Mo,"All",3);Mo.className="LinkReshapingTool",Mo.None=Rf,Mo.Horizontal=Vu,Mo.Vertical=Uu,Mo.All=Kc,tr("linkReshapingTool",function(){return this.findTool("LinkReshaping")},function(a){this.gb("LinkReshaping",a,this.mouseDownTools)});function ya(){fr.call(this),this.name="Resizing",this.o=new Re(1,1).freeze(),this.j=new Re(9999,9999).freeze(),this.yg=new Re(NaN,NaN).freeze(),this.V=!1,this.ia=!0,this.ue=null;var a=new Ui;a.alignmentFocus=Br,a.figure="Rectangle",a.desiredSize=cr,a.fill="lightblue",a.stroke="dodgerblue",a.strokeWidth=1,a.cursor="pointer",this.F=a,this.u=null,this.Xq=new Gt,this.Dw=new Re,this.Tn=new Gt,this.rt=new Re(0,0),this.qt=new Re(1/0,1/0),this.pt=new Re(1,1)}Ce(ya,fr),ya.prototype.updateAdornments=function(a){if(!(a===null||a instanceof En)){if(a.isSelected&&!this.diagram.isReadOnly){var y=a.resizeObject,x=a.Pj(this.name);if(y!==null&&a.canResize()&&a.actualBounds.w()&&a.isVisible()&&y.actualBounds.w()&&y.Ed()&&((x===null||x.adornedObject!==y)&&(x=this.makeAdornment(y)),x!==null)){y=y.li(),fc(a)&&this.updateResizeHandles(x,y),a.bh(this.name,x);return}}a.Jf(this.name)}},ya.prototype.makeAdornment=function(a){var y=a.part.resizeAdornmentTemplate;if(y===null){y=new Pr,y.type=pn.Spot,y.locationSpot=Br;var x=new es;x.isPanelMain=!0,y.add(x),y.add(this.makeHandle(a,wo)),y.add(this.makeHandle(a,Xh)),y.add(this.makeHandle(a,Rs)),y.add(this.makeHandle(a,Ql)),y.add(this.makeHandle(a,$a)),y.add(this.makeHandle(a,Aa)),y.add(this.makeHandle(a,Ua)),y.add(this.makeHandle(a,us))}else if(Ll(y),y=y.copy(),y===null)return null;return y.adornedObject=a,y},ya.prototype.makeHandle=function(a,y){return a=this.handleArchetype,a===null?null:(a=a.copy(),a.alignment=y,a)},ya.prototype.updateResizeHandles=function(a,y){if(a!==null){if(!a.alignment.Xb()&&(a.cursor==="pointer"||0<a.cursor.indexOf("resize")))t:{var x=a.alignment;if(x.Mc()&&(x=Br),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 t;0>y?y+=360:360<=y&&(y-=360),a.cursor=22.5>y?"e-resize":67.5>y?"se-resize":112.5>y?"s-resize":157.5>y?"sw-resize":202.5>y?"w-resize":247.5>y?"nw-resize":292.5>y?"n-resize":337.5>y?"ne-resize":"e-resize"}else if(a instanceof pn)for(a=a.elements;a.next();)this.updateResizeHandles(a.value,y)}},ya.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},ya.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))},ya.prototype.doDeactivate=function(){var a=this.diagram;this.stopTransaction(),this.ue=this.handle=null,this.isActive=a.isMouseCaptured=!1},ya.prototype.stopTransaction=function(){var a=this.diagram,y=fr.prototype.stopTransaction.call(this);return y&&a.undoManager.transactionToUndo!==null&&a.undoManager.transactionToUndo.ak(),y},ya.prototype.doCancel=function(){this.adornedObject!==null&&(this.adornedObject.desiredSize=this.originalDesiredSize,this.adornedObject.part.location=this.originalLocation),this.stopTool()},ya.prototype.doMouseMove=function(){var a=this.diagram;if(this.isActive){var y=this.rt,x=this.qt,E=this.pt,b=this.adornedObject.qs(a.lastInput.documentPoint,Gt.alloc()),z=this.computeReshape();y=this.computeResize(b,this.handle.alignment,y,x,E,z),this.resize(y),a.bd(),Gt.free(b)}},ya.prototype.doMouseUp=function(){var a=this.diagram;if(this.isActive){var y=this.rt,x=this.qt,E=this.pt,b=this.adornedObject.qs(a.lastInput.documentPoint,Gt.alloc()),z=this.computeReshape();y=this.computeResize(b,this.handle.alignment,y,x,E,z),this.resize(y),Gt.free(b),a.Ya(),this.transactionResult=this.name,a.R("PartResized",this.adornedObject,this.originalDesiredSize)}this.stopTool()},ya.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 Gi){var E=new yn;if(E.add(a),!this.dragsMembers&&a.placeholder===null){var b=new at;b.dragsMembers=!1}y.moveParts(E,this.oppositePoint.copy().re(x),!0,b)}else a.location=a.location.copy().re(x).add(this.oppositePoint);y.bd()}},ya.prototype.computeResize=function(a,y,x,E,b,z){y.Mc()&&(y=Br);var tt=this.adornedObject.naturalBounds,rt=tt.x,ot=tt.y,st=tt.x+tt.width,ut=tt.y+tt.height,ft=1;if(!z){ft=tt.width;var St=tt.height;0>=ft&&(ft=1),0>=St&&(St=1),ft=St/ft}return St=Gt.alloc(),Se.No(a.x,a.y,rt,ot,b.width,b.height,St),a=tt.copy(),0>=y.x?0>=y.y?(a.x=Math.max(St.x,st-E.width),a.x=Math.min(a.x,st-x.width),a.width=Math.max(st-a.x,x.width),a.y=Math.max(St.y,ut-E.height),a.y=Math.min(a.y,ut-x.height),a.height=Math.max(ut-a.y,x.height),z||(1<=a.height/a.width?(a.height=Math.max(Math.min(ft*a.width,E.height),x.height),a.width=a.height/ft):(a.width=Math.max(Math.min(a.height/ft,E.width),x.width),a.height=ft*a.width),a.x=st-a.width,a.y=ut-a.height)):1<=y.y?(a.x=Math.max(St.x,st-E.width),a.x=Math.min(a.x,st-x.width),a.width=Math.max(st-a.x,x.width),a.height=Math.max(Math.min(St.y-ot,E.height),x.height),z||(1<=a.height/a.width?(a.height=Math.max(Math.min(ft*a.width,E.height),x.height),a.width=a.height/ft):(a.width=Math.max(Math.min(a.height/ft,E.width),x.width),a.height=ft*a.width),a.x=st-a.width)):(a.x=Math.max(St.x,st-E.width),a.x=Math.min(a.x,st-x.width),a.width=st-a.x,z||(a.height=Math.max(Math.min(ft*a.width,E.height),x.height),a.width=a.height/ft,a.y=ot+.5*(ut-ot-a.height))):1<=y.x?0>=y.y?(a.width=Math.max(Math.min(St.x-rt,E.width),x.width),a.y=Math.max(St.y,ut-E.height),a.y=Math.min(a.y,ut-x.height),a.height=Math.max(ut-a.y,x.height),z||(1<=a.height/a.width?(a.height=Math.max(Math.min(ft*a.width,E.height),x.height),a.width=a.height/ft):(a.width=Math.max(Math.min(a.height/ft,E.width),x.width),a.height=ft*a.width),a.y=ut-a.height)):1<=y.y?(a.width=Math.max(Math.min(St.x-rt,E.width),x.width),a.height=Math.max(Math.min(St.y-ot,E.height),x.height),z||(1<=a.height/a.width?(a.height=Math.max(Math.min(ft*a.width,E.height),x.height),a.width=a.height/ft):(a.width=Math.max(Math.min(a.height/ft,E.width),x.width),a.height=ft*a.width))):(a.width=Math.max(Math.min(St.x-rt,E.width),x.width),z||(a.height=Math.max(Math.min(ft*a.width,E.height),x.height),a.width=a.height/ft,a.y=ot+.5*(ut-ot-a.height))):0>=y.y?(a.y=Math.max(St.y,ut-E.height),a.y=Math.min(a.y,ut-x.height),a.height=ut-a.y,z||(a.width=Math.max(Math.min(a.height/ft,E.width),x.width),a.height=ft*a.width,a.x=rt+.5*(st-rt-a.width))):1<=y.y&&(a.height=Math.max(Math.min(St.y-ot,E.height),x.height),z||(a.width=Math.max(Math.min(a.height/ft,E.width),x.width),a.height=ft*a.width,a.x=rt+.5*(st-rt-a.width))),Gt.free(St),a},ya.prototype.computeReshape=function(){var a=on;return this.adornedObject instanceof Ui&&(a=Tv(this.adornedObject)),!(a===ai||this.diagram.lastInput.shift)},ya.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},ya.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},ya.prototype.computeCellSize=function(){var a=new Re(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},we.Object.defineProperties(ya.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 Pr))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 Pr)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}}}),ya.className="ResizingTool",tr("resizingTool",function(){return this.findTool("Resizing")},function(a){this.gb("Resizing",a,this.mouseDownTools)});function za(){fr.call(this),this.name="Rotating",this.ia=45,this.V=2,this.Tn=new Gt,this.ue=null;var a=new Ui;a.figure="Ellipse",a.desiredSize=Yi,a.fill="lightblue",a.stroke="dodgerblue",a.strokeWidth=1,a.cursor="pointer",this.o=a,this.j=null,this.Cw=0,this.kr=new Gt(NaN,NaN),this.u=0,this.F=50}Ce(za,fr),za.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)}},za.prototype.makeAdornment=function(a){var y=a.part.rotateAdornmentTemplate;if(y===null){y=new Pr,y.type=pn.Position,y.locationSpot=Br;var x=this.handleArchetype;x!==null&&y.add(x.copy())}else if(Ll(y),y=y.copy(),y===null)return null;return y.adornedObject=a,y},za.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},za.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)},za.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(Br)},za.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 E=this.handleDistance;return x===0?y.x=a.naturalBounds.width+E:x===45?(y.x=a.naturalBounds.width+E,y.y=a.naturalBounds.height+E):x===90?y.y=a.naturalBounds.height+E:x===135?(y.x=-E,y.y=a.naturalBounds.height+E):x===180?y.x=-E:x===225?(y.x=-E,y.y=-E):x===270?y.y=-E:x===315&&(y.x=a.naturalBounds.width+E,y.y=-E),a.ga(y)},za.prototype.doDeactivate=function(){var a=this.diagram;this.stopTransaction(),this.ue=this.handle=null,this.kr=new Gt(NaN,NaN),this.isActive=a.isMouseCaptured=!1},za.prototype.stopTransaction=function(){var a=this.diagram,y=fr.prototype.stopTransaction.call(this);return y&&a.undoManager.transactionToUndo!==null&&a.undoManager.transactionToUndo.ak(),y},za.prototype.doCancel=function(){this.diagram.delaysLayout=!1,this.rotate(this.originalAngle),this.stopTool()},za.prototype.doMouseMove=function(){var a=this.diagram;this.isActive&&(a=this.computeRotate(a.lastInput.documentPoint),this.rotate(a))},za.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()},za.prototype.rotate=function(a){var y=this.adornedObject;if(y!==null){y.angle=a,y=y.part,y.Va();var x=y.locationObject,E=y.rotateObject;(x===E||x.rg(E))&&(x=this.Tn.copy(),y.location=x.re(this.rotationPoint).rotate(a-this.originalAngle).add(this.rotationPoint)),this.diagram.bd()}},za.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},we.Object.defineProperties(za.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 Pr))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 Pr)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}}}),za.className="RotatingTool",tr("rotatingTool",function(){return this.findTool("Rotating")},function(a){this.gb("Rotating",a,this.mouseDownTools)});function vh(){fr.call(this),this.name="ClickSelecting"}Ce(vh,fr),vh.prototype.canStart=function(){return!(!this.isEnabled||this.isBeyondDragSize())},vh.prototype.doMouseUp=function(){this.isActive&&(this.standardMouseSelect(),!this.standardMouseClick()&&this.diagram.lastInput.isTouchEvent&&this.diagram.toolManager.doToolTip()),this.stopTool()},vh.className="ClickSelectingTool";function bs(){fr.call(this),this.name="Action",this.pk=null}Ce(bs,fr),bs.prototype.canStart=function(){if(!this.isEnabled)return!1;var a=this.diagram,y=a.lastInput,x=a.ic(y.documentPoint,function(E){for(;E.panel!==null&&!E.isActionable;)E=E.panel;return E});return x!==null&&x.isActionable?(this.pk=x,a.Ck=a.ic(y.documentPoint,null,null),!0):!1},bs.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()},bs.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))}},bs.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()},bs.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())},bs.prototype.doStop=function(){this.pk=null},bs.className="ActionTool";function Ku(){fr.call(this),this.name="ClickCreating",this.Ri=null,this.o=!0,this.j=!1,this.mw=new Gt(0,0)}Ce(Ku,fr),Ku.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)},Ku.prototype.doMouseUp=function(){var a=this.diagram;this.isActive&&this.insertPart(a.lastInput.documentPoint),this.stopTool()},Ku.prototype.insertPart=function(a){var y=this.diagram,x=this.archetypeNodeData;if(x===null)return null;var E=null;try{if(y.R("ChangingSelection",y.selection),this.Ea(this.name),x instanceof mi)x.Zc()&&(Ll(x),E=x.copy(),E!==null&&y.add(E));else if(x!==null){var b=y.model.copyNodeData(x);bn(b)&&(y.model.xf(b),E=y.Lc(b))}if(E!==null){var z=Gt.allocAt(a.x,a.y);this.isGridSnapEnabled&&hf(this.diagram,E,a,z),E.location=z,y.allowSelect&&(y.clearSelection(!0),E.isSelected=!0),Gt.free(z)}y.Ya(),this.transactionResult=this.name,y.R("PartCreated",E)}finally{this.stopTransaction(),y.R("ChangedSelection",y.selection)}return E},we.Object.defineProperties(Ku.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}}}),Ku.className="ClickCreatingTool";function Ls(){fr.call(this),this.name="DragSelecting",this.Ik=175,this.o=!1;var a=new mi;a.layerName="Tool",a.selectable=!1;var y=new Ui;y.name="SHAPE",y.figure="Rectangle",y.fill=null,y.stroke="magenta",a.add(y),this.j=a}Ce(Ls,fr),Ls.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))},Ls.prototype.doActivate=function(){var a=this.diagram;this.isActive=!0,a.isMouseCaptured=!0,a.skipsUndoManager=!0,a.add(this.box),this.doMouseMove()},Ls.prototype.doDeactivate=function(){var a=this.diagram;a.ug(),a.remove(this.box),a.skipsUndoManager=!1,this.isActive=a.isMouseCaptured=!1},Ls.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 E=Re.alloc().h(y.width,y.height);x.desiredSize=E,this.box.mm(y.x,y.y,!1),Re.free(E),(a.allowHorizontalScroll||a.allowVerticalScroll)&&a.gs(a.lastInput.viewPoint)}},Ls.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()},Ls.prototype.computeBoxBounds=function(){var a=this.diagram;return new Ye(a.firstInput.documentPoint,a.lastInput.documentPoint)},Ls.prototype.selectInRect=function(a){var y=this.diagram,x=y.lastInput;if(a=y.ux(a,this.isPartialInclusion),Qi?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 yn,y=y.selection.iterator;y.next();){var E=y.value;a.contains(E)||x.add(E)}for(y=x.iterator;y.next();)y.value.isSelected=!1;for(a=a.iterator;a.next();)y=a.value,y.isSelected||(y.isSelected=!0)}},we.Object.defineProperties(Ls.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}}}),Ls.className="DragSelectingTool";function sa(){fr.call(this),this.name="Panning",this.Xt=new Gt,this.xy=new Gt,this.xg=!1;var a=this;this.Kw=function(){var y=a.diagram;y!==null&&y.removeEventListener(Xe.document,"scroll",a.Kw,!1),a.stopTool()}}Ce(sa,fr),sa.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())},sa.prototype.doActivate=function(){var a=this.diagram;this.xg?(a.lastInput.bubbles=!0,a.addEventListener(Xe.document,"scroll",this.Kw,!1)):(a.currentCursor="move",a.isMouseCaptured=!0,this.Xt.assign(a.position)),this.isActive=!0},sa.prototype.doDeactivate=function(){var a=this.diagram;a.currentCursor="",this.isActive=a.isMouseCaptured=!1},sa.prototype.doCancel=function(){var a=this.diagram;a.position=this.Xt,a.isMouseCaptured=!1,this.stopTool()},sa.prototype.doMouseMove=function(){this.move()},sa.prototype.doMouseUp=function(){this.move(),this.stopTool()},sa.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,E=a.lastInput.documentPoint,b=y.x+x.x-E.x;x=y.y+x.y-E.y,a.allowHorizontalScroll||(b=y.x),a.allowVerticalScroll||(x=y.y),a.position=this.xy.h(b,x)}},we.Object.defineProperties(sa.prototype,{bubbles:{get:function(){return this.xg},set:function(a){this.xg=a}},originalPosition:{get:function(){return this.Xt}}}),sa.className="PanningTool",tr("clickCreatingTool",function(){return this.findTool("ClickCreating")},function(a){this.gb("ClickCreating",a,this.mouseUpTools)}),tr("clickSelectingTool",function(){return this.findTool("ClickSelecting")},function(a){this.gb("ClickSelecting",a,this.mouseUpTools)}),tr("panningTool",function(){return this.findTool("Panning")},function(a){this.gb("Panning",a,this.mouseMoveTools)}),tr("dragSelectingTool",function(){return this.findTool("DragSelecting")},function(a){this.gb("DragSelecting",a,this.mouseMoveTools)}),tr("actionTool",function(){return this.findTool("Action")},function(a){this.gb("Action",a,this.mouseDownTools)});function xl(){this.F=this.u=this.j=this.o=null}we.Object.defineProperties(xl.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}}}),xl.className="HTMLInfo";function Xs(a,y,x){this.text=a,this.hx=y,this.visible=x}Xs.className="ContextMenuButtonInfo";function Ga(){fr.call(this),this.name="ContextMenu",this.o=this.ht=this.j=null,this.yw=new Gt,this.jt=null,this.Et=!1;var a=this;this.tu=function(){a.stopTool()}}Ce(Ga,fr);function _s(a){var y=new xl;y.show=function(b,z,tt){tt.showDefaultContextMenu()},y.hide=function(b,z){z.hideDefaultContextMenu()},yh=y,a.tu=function(){a.stopTool()},y=ki("div");var x=ki("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 E=ki("style");Xe.document.getElementsByTagName("head")[0].appendChild(E),E.sheet.insertRule(".goCXul { list-style: none; }",0),E.sheet.insertRule(".goCXli {font:700 1.5em Helvetica, Arial, sans-serif;position: relative;min-width: 60px; }",0),E.sheet.insertRule(".goCXa {color: #444;display: inline-block;padding: 4px;text-decoration: none;margin: 2px;border: 1px solid gray;border-radius: 10px; }",0),E=a.diagram,E!==null&&(E.addEventListener(y,"contextmenu",Ao,!1),E.addEventListener(y,"selectstart",Ao,!1),E.addEventListener(x,"contextmenu",Ao,!1)),y.className="goCXforeground",x.className="goCXbackground",Xe.document.body&&(Xe.document.body.appendChild(y),Xe.document.body.appendChild(x)),Yd=y,ll=x,Zd=!0}function Ao(a){return a.preventDefault(),!1}Ga.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)},Ga.prototype.doStart=function(){this.yw.set(this.diagram.firstInput.documentPoint)},Ga.prototype.doStop=function(){this.hideContextMenu(),this.currentObject=null},Ga.prototype.findObjectWithContextMenu=function(a){a===void 0&&(a=null);var y=this.diagram,x=y.lastInput,E=null;if(a instanceof Be||(a instanceof fe?E=a:E=y.ic(x.documentPoint,null,function(b){return!b.layer.isTemporary})),E!==null){for(a=E;a!==null;){if(a.contextMenu!==null)return a;a=a.panel}if(y.lastInput.isTouchEvent&&this.defaultTouchContextMenu)return E.part}else if(y.contextMenu!==null)return y;return null},Ga.prototype.doActivate=function(){},Ga.prototype.doMouseDown=function(){if(fr.prototype.doMouseDown.call(this),this.isActive&&this.currentContextMenu instanceof Pr){var a=this.diagram.toolManager.findTool("Action");a!==null&&a.canStart()&&(a.doActivate(),a.doMouseDown(),a.doDeactivate())}this.diagram.toolManager.mouseDownTools.contains(this)&&sl(this)},Ga.prototype.doMouseUp=function(){if(this.isActive&&this.currentContextMenu instanceof Pr){var a=this.diagram.toolManager.findTool("Action");a!==null&&a.canStart()&&(a.doActivate(),a.doCancel(),a.doDeactivate())}sl(this)};function sl(a){var y=a.diagram;if(a.isActive){var x=a.currentContextMenu;if(x!==null){var E=null;x instanceof xl||(E=y.ic(y.lastInput.documentPoint,null,null),E!==null&&E.rg(x)&&a.standardMouseClick(null,null)),a.maybeStopTool(E)}}else a.canStart()&&(Eu(a,!0),a.isActive||a.stopTool())}Ga.prototype.maybeStopTool=function(){this.stopTool(),this.canStart()&&(this.diagram.currentTool=this,this.doMouseUp())};function Eu(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=yh,x===null&&(x=a.findObjectWithContextMenu()),x!==null){var E=x.contextMenu;E!==null?(a.currentObject=x instanceof fe?x:null,a.showContextMenu(E,a.currentObject)):y!==null&&a.showContextMenu(y,a.currentObject)}else y!==null&&a.showContextMenu(y,null);a.currentContextMenu instanceof Pr&&!a.currentContextMenu.visible&&a.stopTool()}}Ga.prototype.doMouseMove=function(){var a=this.diagram.toolManager.findTool("Action");a!==null&&a.doMouseMove(),this.isActive&&this.diagram.toolManager.doMouseMove()},Ga.prototype.showContextMenu=function(a,y){var x=this.diagram;if(a!==this.currentContextMenu&&this.hideContextMenu(),a instanceof Pr){a.layerName="Tool",a.selectable=!1,a.scale=1/x.scale,a.category=this.name,a.placeholder!==null&&(a.placeholder.scale=x.scale);var E=a.diagram;E!==null&&E!==x&&E.remove(a),x.add(a),y!==null?a.adornedObject=y:a.data=x.model,a.Va(),this.positionContextMenu(a,y)}else a instanceof xl&&a.show(y,x,this);this.currentContextMenu=a},Ga.prototype.positionContextMenu=function(a){if(a.placeholder===null){var y=this.diagram,x=y.lastInput.documentPoint.copy(),E=a.measuredBounds,b=y.viewportBounds;y.lastInput.isTouchEvent&&(x.x-=E.width),x.x+E.width>b.right&&(x.x-=E.width+5/y.scale),x.x<b.x&&(x.x=b.x),x.y+E.height>b.bottom&&(x.y-=E.height+5/y.scale),x.y<b.y&&(x.y=b.y),a.position=x}},Ga.prototype.hideContextMenu=function(){var a=this.diagram,y=this.currentContextMenu;y!==null&&(y instanceof Pr?(a.remove(y),this.ht!==null&&this.ht.Jf(y.category),y.data=null,y.adornedObject=null):y instanceof xl&&(y.hide!==null?y.hide(a,this):y.mainElement!==null&&(y.mainElement.style.display="none")),this.currentContextMenu=null,this.standardMouseOver())};function Zu(a){var y=new yn;return y.add(new Xs("Copy",function(x){x.commandHandler.copySelection()},function(x){return x.commandHandler.canCopySelection()})),y.add(new Xs("Cut",function(x){x.commandHandler.cutSelection()},function(x){return x.commandHandler.canCutSelection()})),y.add(new Xs("Delete",function(x){x.commandHandler.deleteSelection()},function(x){return x.commandHandler.canDeleteSelection()})),y.add(new Xs("Paste",function(x){x.commandHandler.pasteSelection(a.mouseDownPoint)},function(x){return x.commandHandler.canPasteSelection(a.mouseDownPoint)})),y.add(new Xs("Select All",function(x){x.commandHandler.selectAll()},function(x){return x.commandHandler.canSelectAll()})),y.add(new Xs("Undo",function(x){x.commandHandler.undo()},function(x){return x.commandHandler.canUndo()})),y.add(new Xs("Redo",function(x){x.commandHandler.redo()},function(x){return x.commandHandler.canRedo()})),y.add(new Xs("Scroll To Part",function(x){x.commandHandler.scrollToPart()},function(x){return x.commandHandler.canScrollToPart()})),y.add(new Xs("Zoom To Fit",function(x){x.commandHandler.zoomToFit()},function(x){return x.commandHandler.canZoomToFit()})),y.add(new Xs("Reset Zoom",function(x){x.commandHandler.resetZoom()},function(x){return x.commandHandler.canResetZoom()})),y.add(new Xs("Group Selection",function(x){x.commandHandler.groupSelection()},function(x){return x.commandHandler.canGroupSelection()})),y.add(new Xs("Ungroup Selection",function(x){x.commandHandler.ungroupSelection()},function(x){return x.commandHandler.canUngroupSelection()})),y.add(new Xs("Edit Text",function(x){x.commandHandler.editTextBlock()},function(x){return x.commandHandler.canEditTextBlock()})),y}Ga.prototype.showDefaultContextMenu=function(){var a=this.diagram;this.jt===null&&(this.jt=Zu(this)),Yd.innerHTML="",ll.addEventListener("pointerdown",this.tu,!1);var y=this,x=ki("ul");x.className="goCXul",Yd.appendChild(x),x.innerHTML="";for(var E=this.jt.iterator;E.next();){var b=E.value,z=b.visible;if(typeof b.hx=="function"&&(typeof z!="function"||z(a))){z=ki("li"),z.className="goCXli";var tt=ki("a");tt.className="goCXa",tt.href="#",tt.ky=b.hx,tt.addEventListener("pointerdown",function(rt){return this.ky(a),y.stopTool(),rt.preventDefault(),!1},!1),tt.textContent=b.text,z.appendChild(tt),x.appendChild(z)}}Yd.style.display="block",ll.style.display="block"},Ga.prototype.hideDefaultContextMenu=function(){if(this.currentContextMenu!==null&&this.currentContextMenu===yh){Yd.style.display="none",ll.style.display="none";var a=this.diagram;a!==null&&a.removeEventListener(ll,"pointerdown",this.tu,!1),this.currentContextMenu=null}},we.Object.defineProperties(Ga.prototype,{currentContextMenu:{get:function(){return this.j},set:function(a){this.j=a,this.ht=a instanceof Pr?a.adornedPart:null}},defaultTouchContextMenu:{get:function(){return Zd===!1&&yh===null&&co&&_s(this),yh},set:function(a){a===null&&(Zd=!0),yh=a}},currentObject:{get:function(){return this.o},set:function(a){this.o=a}},mouseDownPoint:{get:function(){return this.yw}}});var yh=null,Zd=!1,ll=null,Yd=null;Ga.className="ContextMenuTool",tr("contextMenuTool",function(){return this.findTool("ContextMenu")},function(a){this.gb("ContextMenu",a,this.mouseUpTools)});function Yr(){fr.call(this),this.name="TextEditing",this.Zh=new Xr,this.ia=null,this.V=rd,this.vj=null,this.qa=xh,this.u=1,this.F=!0,this.o=null,this.j=new xl,this.kt=null,Sh(this,this.j)}Ce(Yr,fr);function Sh(a,y){if(co){var x=ki("textarea");a.kt=x,x.addEventListener("input",function(){if(a.textBlock!==null){var E=a.Lx(this.value);this.style.width=20+E.measuredBounds.width*this.wA+"px",this.rows=E.lineCount}},!1),x.addEventListener("keydown",function(E){if(!E.isComposing&&a.textBlock!==null){var b=E.key;b==="Enter"?(a.textBlock.isMultiline===!1&&E.preventDefault(),a.acceptText(id)):b==="Tab"?(a.acceptText(Zc),E.preventDefault()):b==="Escape"&&(a.doCancel(),a.diagram!==null&&a.diagram.doFocus())}},!1),x.addEventListener("focus",function(){if(a.currentTextEditor!==null&&a.state!==xh){var E=a.kt;a.qa===_d&&(a.qa=Ph),typeof E.select=="function"&&a.selectsTextOnActivate&&(E.select(),E.setSelectionRange(0,9999))}},!1),x.addEventListener("blur",function(){if(a.currentTextEditor!==null&&a.state!==xh){var E=a.kt;typeof E.focus=="function"&&E.focus(),typeof E.select=="function"&&a.selectsTextOnActivate&&(E.select(),E.setSelectionRange(0,9999))}},!1),y.valueFunction=function(){return x.value},y.mainElement=x,y.show=function(E,b,z){if(E instanceof Xr&&z instanceof Yr)if(z.state===wh)x.style.border="3px solid red",x.focus();else{var tt=E.ga(Br),rt=b.position,ot=b.scale,st=E.Df()*ot;st<z.minimumEditorScale&&(st=z.minimumEditorScale);var ut=E.naturalBounds.width*st+6,ft=E.naturalBounds.height*st+2,St=(tt.x-rt.x)*ot;tt=(tt.y-rt.y)*ot,rt=E.verticalAlignment,ot=(E.lineHeight+E.spacingAbove+E.spacingBelow)*E.lineCount*st,ft=rt.y*ft-rt.y*ot+rt.offsetY-(.5*ft-.5*ot)-ot/2,x.value=E.text,b.div.style.font=E.font,x.style.position="absolute",x.style.zIndex="100",x.style.font="inherit",x.style.fontSize=100*st+"%",x.style.lineHeight="normal",x.style.width=ut+"px",x.style.left=(St-ut/2|0)-1+"px",x.style.top=(tt+ft|0)-1+"px",x.style.textAlign=E.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=E.lineCount,x.wA=st,x.className="goTXarea",b.div.appendChild(x),x.focus(),z.selectsTextOnActivate&&(x.select(),x.setSelectionRange(0,9999))}},y.hide=function(E){E.div.removeChild(x)}}}Yr.prototype.canStart=function(){if(!this.isEnabled)return!1;var a=this.diagram;if(a===null||a.isReadOnly||eu&&eu!==this&&(eu.acceptText(Pl),eu&&eu!==this)||!a.lastInput.left||this.isBeyondDragSize())return!1;var y=a.ic(a.lastInput.documentPoint);return y!==null&&y instanceof Xr&&y.editable&&y.part.canEdit()?(y=y.part,!(y===null||this.starting===rd&&!y.isSelected||this.starting===Yc&&2>a.lastInput.clickCount)):!1},Yr.prototype.doStart=function(){eu=this,this.textBlock!==null&&this.doActivate()},Yr.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 Xr&&(this.textBlock=y,y.part!==null)){a.animationManager.Cc(),this.isActive=!0,this.qa=_d;var x=this.defaultTextEditor;y.textEditor!==null&&(x=y.textEditor),this.Zh=this.textBlock.copy();var E=new Ye(this.textBlock.ga(wo),this.textBlock.ga(Rs));a.tv(E),x.show(y,a,this),this.currentTextEditor=x}}}},Yr.prototype.doCancel=function(){this.stopTool()},Yr.prototype.doMouseUp=function(){this.canStart()&&this.doActivate()},Yr.prototype.doMouseDown=function(){this.isActive&&this.acceptText(Pl)},Yr.prototype.acceptText=function(a){switch(a){case Pl:this.qa===od?this.currentTextEditor instanceof HTMLElement&&this.currentTextEditor.focus():(this.qa===_d||this.qa===wh||this.qa===Ph)&&(this.qa=Xc,jf(this));break;case Xd:case id:case Zc:(id!==a||this.textBlock.isMultiline!==!0)&&(this.qa===_d||this.qa===wh||this.qa===Ph)&&(this.qa=Xc,jf(this))}};function jf(a){var y=a.textBlock,x=a.diagram,E=a.currentTextEditor;if(y!==null&&E!==null){var b=y.text,z="";E.valueFunction!==null&&(z=E.valueFunction()),a.isValidText(y,b,z)?(a.Ea(a.name),a.qa=od,a.transactionResult=a.name,y.text=z,a.doSuccess(b,z),x!==null&&x.R("TextEdited",y,b),a.stopTransaction(),a.stopTool(),x!==null&&x.doFocus()):(a.qa=wh,a.doError(b,z))}}Yr.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)},Yr.prototype.doSuccess=function(a,y){var x=this.textBlock;x.textEdited!==null&&x.textEdited(x,a,y)},Yr.prototype.doDeactivate=function(){var a=this.diagram;a!==null&&(this.qa=xh,this.currentTextEditor!==null&&this.currentTextEditor.hide(a,this),this.textBlock=null,this.isActive=!1)},Yr.prototype.doStop=function(){eu=null},Yr.prototype.isValidText=function(a,y,x){var E=this.textValidation;return E!==null&&!E(a,y,x)?!1:(E=a.textValidation,!!(E===null||E(a,y,x)))},Yr.prototype.Lx=function(a){var y=this.Zh;return y.text=a,y.measure(this.textBlock.Ih,1/0),y},we.Object.defineProperties(Yr.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)}}}),Yr.prototype.measureTemporaryTextBlock=Yr.prototype.Lx;var Xd=new Je(Yr,"LostFocus",0),Pl=new Je(Yr,"MouseDown",1),Zc=new Je(Yr,"Tab",2),id=new Je(Yr,"Enter",3),Hg=new Je(Yr,"SingleClick",0),rd=new Je(Yr,"SingleClickSelected",1),Yc=new Je(Yr,"DoubleClick",2),xh=new Je(Yr,"StateNone",0),_d=new Je(Yr,"StateActive",1),Ph=new Je(Yr,"StateEditing",2),Xc=new Je(Yr,"StateValidating",3),wh=new Je(Yr,"StateInvalid",4),od=new Je(Yr,"StateValidated",5),eu=null;Yr.className="TextEditingTool",Yr.LostFocus=Xd,Yr.MouseDown=Pl,Yr.Tab=Zc,Yr.Enter=id,Yr.SingleClick=Hg,Yr.SingleClickSelected=rd,Yr.DoubleClick=Yc,Yr.StateNone=xh,Yr.StateActive=_d,Yr.StateEditing=Ph,Yr.StateValidating=Xc,Yr.StateInvalid=wh,Yr.StateValidated=od,tr("textEditingTool",function(){return this.findTool("TextEditing")},function(a){this.gb("TextEditing",a,this.mouseUpTools)});function cs(a){Qd||(Eh(),Qd=!0),this.H=Gl,this.Ok=this.zb=this.vq=this.bc=!1,this.Qw=!0,this.Pk=ka,this.Dm=!1,this.Gh=this.Jd=!0,this.Dg=600,this.cw=this.Ow=!1,this.Zd=new mn,this.ce=new ca,this.ce.Yd=this,this.Ei=new mn,this.pu=new mn,this.Sr=new mn,this.pr=new mn,a&&Object.assign(this,a)}cs.prototype.Xe=function(a){this.H=a},cs.prototype.canStart=function(){return!0};function nu(a,y){a.Jd&&a.canStart(y)&&(a.Zd.add(y),a.defaultAnimation.isAnimating&&a.Cc(),fa(a.H),a.zb=!0)}function _c(a){if(a.Jd&&a.zb){var y=a.ce,x=a.H,E=a.Zd.contains("Model");E&&(a.Ok=!0,a.Pk===ka?(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===tf&&y.vc.clear(),a.Qw=!!(a.Pk===bh&&x.du.D(x.pa)),x.R("InitialAnimationStarting",a)),E&&!a.Gh||y.vc.count===0?(a.Zd.clear(),a.zb=!1,y.vc.clear(),ad(y,x),a.Ok=!1,x.N()):(a.Zd.clear(),x.kg=!1,E=y.vc.get(x),x.autoScale!==Na&&E!==null&&(delete E.start.scale,delete E.end.scale),Xe.requestAnimationFrame(function(){a.zb===!1||y.bc||(x.Gf("temporaryPixelRatio")&&Sa(x),ec(x),a.zb=!1,y.start(),y.bc&&(ul(a),x.Ya(),zf(y,0),Ms(x,!0),wl(a),x.R("AnimationStarting",a)))}))}}function iu(a){return a.Zd.contains("Trigger")&&a.Zd.count===1}function Jc(a,y,x,E){a.isTicking||iu(a)||y instanceof En&&(y.fromNode!==null||y.toNode!==null)||a.ce.add(y,"position",x,E,!1)}Ct=cs.prototype,Ct.fv=function(a){return this.ce.fv(a)},Ct.Xu=function(a){return this.ce.Xu(a)};function Qc(a,y){function x(){if(0<b.Sr.count&&(E.addAll(b.Sr),b.Sr.clear(),b.bc=!0),b.bc!==!1&&E.count!==0){b.pu.addAll(E);for(var z=b.pu.iterator;z.next();){var tt=z.value;if(tt.bc!==!1){t:if(0<tt.yl.count)var rt=!0;else{for(rt=tt.vc.iterator;rt.next();){var ot=rt.key;if(ot instanceof fe&&ot.diagram!==null||ot instanceof Be){rt=!0;break t}}rt=!1}rt?qd(tt,!1):tt.Xk=!0}}b.pu.clear(),b.bc!==!1&&(ul(b),Ms(b.H),wl(b)),Xe.requestAnimationFrame(x)}}var E=a.Ei,b=a;a.bc?a.Sr.add(y):(a.bc=!0,E.add(y),Xe.requestAnimationFrame(function(){x()}))}function Wg(a){for(a=a.Ei.iterator;a.next();)a.value.Xk=!1}function ul(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 wl(a){var y=a.H;y.skipsUndoManager=a.Ow,y.skipsModelSourceBindings=a.cw,a.vq=!1}Ct.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(),ad(y,null),a===!0)for(a=this.Ei.Fa(),y=0;y<a.length;y++)a[y].Ml(!0)}else y.vc.clear(),ad(y,this.H)},Ct.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))},Ct.Cj=function(a,y){this.zb&&(this.Zd.contains("Expand Tree")||this.Zd.contains("Expand SubGraph"))&&(this.ce.Cj(a,y),Za(this,a))},Ct.Aj=function(a,y){this.zb&&(this.Zd.contains("Collapse Tree")||this.Zd.contains("Collapse SubGraph"))&&(this.ce.Aj(a,y),Cl(this.ce,y,"position",y.position,y.position),Za(this,a))};function qc(a,y,x){!a.zb||y.D(x)||iu(a)||(a.H.pi||(y=x.copy()),Cl(a.ce,a.H,"position",y,x))}function $c(a,y,x){y.fd&&(y.Tg=x,a.pr.add(y))}function Za(a,y){for(y=y.findLinksConnected();y.next();){var x=y.value;x.fd&&(x.Tg=x.points.copy(),a.pr.add(x))}}function Ch(a,y,x,E,b){a===null&&(a=[0,0,0,0]),y===null&&(y=[0,0,0,0]);var z=a[0],tt=a[1],rt=a[2];a=a[3];var ot=y[0],st=y[1],ut=y[2];return y=y[3],rt===0||rt===100?(z=ot,tt=st):(ut===0||ut===100)&&(ot=z,st=tt),180<Math.abs(ot-z)&&(ot>z?z+=360:ot+=360),z=b(x,z,ot-z,E)%360,tt=b(x,tt,st-tt,E),rt=b(x,rt,ut-rt,E),x=b(x,a,y-a,E),"hsla("+z+", "+tt+"%, "+rt+"%, "+x+")"}function Eh(){function a(x,E,b,z,tt,rt){x.position=new Gt(z(tt,E.x,b.x-E.x,rt),z(tt,E.y,b.y-E.y,rt))}var y=new yi;y.add("position:diagram",a),y.add("position",a),y.add("position:part",function(x,E,b,z,tt,rt){tt<rt?x.mm(z(tt,E.x,b.x-E.x,rt),z(tt,E.y,b.y-E.y,rt),!1):x.position=new Gt(z(tt,E.x,b.x-E.x,rt),z(tt,E.y,b.y-E.y,rt))}),y.add("location",function(x,E,b,z,tt,rt){tt<rt?x.mm(z(tt,E.x,b.x-E.x,rt),z(tt,E.y,b.y-E.y,rt),!0):x.location=new Gt(z(tt,E.x,b.x-E.x,rt),z(tt,E.y,b.y-E.y,rt))}),y.add("position:placeholder",function(x,E,b,z,tt,rt){tt<rt?x.mm(z(tt,E.x,b.x-E.x,rt),z(tt,E.y,b.y-E.y,rt),!1):x.position=new Gt(z(tt,E.x,b.x-E.x,rt),z(tt,E.y,b.y-E.y,rt))}),y.add("position:nodeCollapse",function(x,E,b,z,tt,rt){var ot=x.actualBounds,st=b.actualBounds;b=st.x+st.width/2-ot.width/2,ot=st.y+st.height/2-ot.height/2,tt<rt?x.mm(z(tt,E.x,b-E.x,rt),z(tt,E.y,ot-E.y,rt),!1):x.position=new Gt(z(tt,E.x,b-E.x,rt),z(tt,E.y,ot-E.y,rt))}),y.add("desiredSize",function(x,E,b,z,tt,rt){x.desiredSize=new Ye(z(tt,E.width,b.width-E.width,rt),z(tt,E.height,b.height-E.height,rt))}),y.add("width",function(x,E,b,z,tt,rt){x.width=z(tt,E,b-E,rt)}),y.add("height",function(x,E,b,z,tt,rt){x.height=z(tt,E,b-E,rt)}),y.add("fill",function(x,E,b,z,tt,rt){x.fill=Ch(E,b,tt,rt,z)}),y.add("stroke",function(x,E,b,z,tt,rt){x.stroke=Ch(E,b,tt,rt,z)}),y.add("strokeWidth",function(x,E,b,z,tt,rt){x.strokeWidth=z(tt,E,b-E,rt)}),y.add("strokeDashOffset",function(x,E,b,z,tt,rt){x.strokeDashOffset=z(tt,E,b-E,rt)}),y.add("background",function(x,E,b,z,tt,rt){x.background=Ch(E,b,tt,rt,z)}),y.add("areaBackground",function(x,E,b,z,tt,rt){x.areaBackground=Ch(E,b,tt,rt,z)}),y.add("opacity",function(x,E,b,z,tt,rt){x.opacity=z(tt,E,b-E,rt)}),y.add("scale",function(x,E,b,z,tt,rt){x.scale=z(tt,E,b-E,rt)}),y.add("angle",function(x,E,b,z,tt,rt){x.angle=z(tt,E,b-E,rt)}),Jd=y}we.Object.defineProperties(cs.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&&gi(a,">= 1",cs,"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}}}),cs.prototype.stopAnimation=cs.prototype.Cc;var Jd=null,Qd=!1,ka=new Je(cs,"Default",1),bh=new Je(cs,"AnimateLocations",2),tf=new Je(cs,"None",3);cs.className="AnimationManager",cs.defineAnimationEffect=function(a,y){Qd||(Eh(),Qd=!0),Jd.add(a,y)},cs.Default=ka,cs.AnimateLocations=bh,cs.None=tf;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=sd,this.Wk=this.ho=!1,this.cu=1,this.au=0,this.Gd=this.Dg=NaN,this.gw=0,this.dn=null,this.o=Fo,this.vc=new yi,this.Tt=new yi,this.yl=new mn,this.Ut=new mn,this.dw=$u,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,qd(this,!0),ul(this.Yd),Ms(this.H),wl(this.Yd),this.H.redraw()};function ad(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}Ct=ca.prototype,Ct.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 Be?a=x:x instanceof fe&&(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===ka&&this===y.defaultAnimation&&(this.Lp=ef,this.Gd=isNaN(this.Dg)?y.duration===600?900:y.duration:this.Dg),this.dw=a.scrollMode,this.isViewportUnconstrained&&(a.sj=ac),ul(y),this.yl.each(function(E){E.data=null,a.add(E)}),wl(y),this.bc=!0,this.Qd=+new Date,this.cn=this.Qd+this.Gd,Qc(y,this),this)},Ct.Iy=function(a,y){return a.Zc()?(this.yl.add(a),this.H=y,this):this},Ct.add=function(a,y,x,E,b){if(y==="position"&&x.Xa(E))return this;if(this.H===null&&(a instanceof Be?this.H=a:a instanceof fe&&a.diagram!==null&&(this.H=a.diagram)),a instanceof mi){if(!a.isAnimated)return this;y==="position"&&(y="position:part")}return Cl(this,a,y,x,E,b),this};function Cl(a,y,x,E,b,z){var tt=a.vc;if(y instanceof Be&&x==="position"&&(x="position:diagram"),(x==="fill"||x==="stroke"||x==="background"||x==="areaBackground")&&(tl(E),pf(),E=[ks.j,ks.u,ks.o,ks.F],tl(b),pf(),b=[ks.j,ks.u,ks.o,ks.F]),tt.contains(y)){var rt=tt.I(y),ot=rt.start,st=rt.end;ot[x]===void 0&&(ot[x]=Yu(E)),st[x]=Yu(b)}else ot={},st={},ot[x]=Yu(E),st[x]=Yu(b),rt=ot.position,y instanceof fe&&rt instanceof Gt&&!rt.w()&&y.diagram.animationManager.Zd.contains("Expand SubGraph")&&rt.assign(st.position),rt=new jl(ot,st,z),tt.add(y,rt);tt=ot[x],tt instanceof Gt&&!tt.w()&&tt.assign(a.o),z&&x.indexOf("position:")===0&&y instanceof mi?rt.Ku.location=Yu(y.location):z&&(rt.Ku[x]=Yu(E))}function Yu(a){return a instanceof Gt||a instanceof Re?a.copy():a}Ct.fv=function(a){return this.bc?(a=this.vc.I(a),a!==null&&a.nv):!1},Ct.Xu=function(a){return this.bc?(a=this.vc.I(a),a!==null&&(a.start.position||a.start.location)):!1};function qd(a,y){if(!a.Xk||y){var x=a.Yd;if(a.bc!==!1){var E=+new Date,b=E>a.cn?a.Gd:E-a.Qd;y&&(b=a.gw,b<a.Gd?(a.Qd=+new Date-b,a.cn=a.Qd+a.Gd):b=a.Gd),ul(x),zf(a,b),Ms(a.H,!0),wl(x),E>a.cn&&(a.ho&&!a.Wk?(a.Qd=+new Date,a.cn=a.Qd+a.Gd,a.Wk=!0):a.Ml(!1))}}}function zf(a,y){for(var x=a.Gd,E=a.vc.iterator,b=a.Wk;E.next();){var z=E.key;if(!(z instanceof fe&&z.diagram===null)){var tt=E.value,rt=b?tt.end:tt.start;tt=b?tt.start:tt.end;var ot=Jd,st;for(st in tt)st==="position"&&(tt["position:placeholder"]||tt["position:nodeCollapse"])||ot.get(st)===null||ot.get(st)(z,rt[st],tt[st],a.Lp,y,x,a)}}}Ct.stop=function(){return this.bc?(this.Ml(!0),this):this},Ct.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,ul(x);for(var E=this.vc,b=this.yl.iterator;b.next();)y.remove(b.value);for(b=this.Ut.iterator;b.next();)b.value.v();b=this.ho,E=E.iterator;for(var z=Jd;E.next();){var tt=E.key,rt=E.value,ot=b?rt.end:rt.start,st=b?rt.start:rt.end,ut=rt.Ku,ft;for(ft in st)if(z.get(ft)!==null){var St=ft;!rt.Hu||St!=="position:nodeCollapse"&&St!=="position:placeholder"||(St="position"),z.get(St)(tt,ot[ft],ut[ft]!==void 0?ut[ft]:rt.Hu?ot[ft]:st[ft],this.Lp,this.Gd,this.Gd,this)}rt.Hu&&ut.location!==void 0&&tt instanceof mi&&(tt.location=ut.location),rt.nv&&tt instanceof mi&&tt.Zb(!1)}if(y.As.clear(),tc(y,!1),y.Ya(),y.N(),Ms(y,!0),x.defaultAnimation===this){for(ft=x.pr.iterator;ft.next();)b=ft.value,b.Tg!==null&&(b.points=b.Tg,b.Tg=null);x.pr.clear()}Ms(y,!0),this.isViewportUnconstrained&&(y.scrollMode=this.dw),wl(x),this.au++,!a&&this.cu>this.au?(this.Wk=!1,this.start()):(this.dn&&this.dn(this),ad(this,null),x.Ml(this),y.$b())}},Ct.Cj=function(a,y){var x=y.actualBounds,E=null;if(y instanceof Gi&&(E=y.placeholder),E!==null?(x=E.ga(wo),E=E.padding,x.x+=E.left,x.y+=E.top,this.add(a,"position",x,a.position,!1)):this.add(a,"position",new Gt(x.x+x.width/2,x.y+x.height/2),a.position,!1),this.add(a,"scale",.01,a.scale,!1),a instanceof Gi)for(a=a.memberParts;a.next();)E=a.value,E instanceof Vn&&this.Cj(E,y)},Ct.Aj=function(a,y){if(a.isVisible()){var x=null;if(y instanceof Gi&&(x=y.placeholder),x!==null){var E=x.ga(wo);x=x.padding,E.x+=x.left,E.y+=x.top,this.add(a,"position:placeholder",a.position,E,!0)}else this.add(a,"position:nodeCollapse",a.position,y,!0);if(this.add(a,"scale",a.scale,.01,!0),E=this.vc,E.contains(a)&&(E.I(a).nv=!0),a instanceof Gi)for(a=a.memberParts;a.next();)E=a.value,E instanceof Vn&&this.Aj(E,y)}},Ct.Ez=function(a){var y=this.Tt.get(a);return y===null&&(y={},this.Tt.add(a,y)),y},we.Object.defineProperties(ca.prototype,{duration:{get:function(){return this.Dg},set:function(a){1>a&&gi(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:pe("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 sd(a,y,x,E){return a/=E/2,1>a?x/2*a*a+y:-x/2*(--a*(a-2)-1)+y}function ef(a,y,x,E){return a===E?y+x:x*(-Math.pow(2,-10*a/E)+1)+y}ca.className="Animation",ca.EaseLinear=function(a,y,x,E){return x*a/E+y},ca.EaseInOutQuad=sd,ca.EaseInQuad=function(a,y,x,E){return x*(a/=E)*a+y},ca.EaseOutQuad=function(a,y,x,E){return-x*(a/=E)*(a-2)+y},ca.EaseInExpo=function(a,y,x,E){return a===0?y:x*Math.pow(2,10*(a/E-1))+y},ca.EaseOutExpo=ef;function jl(a,y,x){this.start=a,this.end=y,this.Ku={},this.Hu=x,this.nv=!1}jl.className="AnimationState";function hl(a,y,x){this.xd=null,this.rf=a,this.so=x||Gf,this.uk=null,y!==void 0&&(this.uk=y,x===void 0&&(this.so=Xu))}hl.prototype.copy=function(){var a=new hl(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 Vg(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))}we.Object.defineProperties(hl.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 Gf=new Je(hl,"Default",1),Xu=new Je(hl,"Immediate",2),ld=new Je(hl,"Bundled",3);hl.className="AnimationTrigger",hl.Default=Gf,hl.Immediate=Xu,hl.Bundled=ld;function qo(a){Zr(this),this.H=null,this.Pa=new yn,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)}Ct=qo.prototype,Ct.clear=function(){for(var a=this.Pa,y=0;y<a.length;y++){var x=a.s[y];x.Ig=null,ba(x)}a.clear(),this.Zq.length=0},Ct.Xe=function(a){this.H=a},Ct.toString=function(a){a===void 0&&(a=0);var y='Layer "'+this.name+'"';if(0>=a)return y;for(var x=0,E=0,b=0,z=0,tt=0,rt=this.Pa.iterator;rt.next();){var ot=rt.value;ot instanceof Gi?b++:ot instanceof Vn?E++:ot instanceof En?z++:ot instanceof Pr?tt++:x++}if(rt="",0<x&&(rt+=x+" Parts "),0<E&&(rt+=E+" Nodes "),0<b&&(rt+=b+" Groups "),0<z&&(rt+=z+" Links "),0<tt&&(rt+=tt+" Adornments "),1<a)for(a=this.Pa.iterator;a.next();)x=a.value,rt+=`
`+x.toString(),E=x.data,E!==null&&Cr(E)&&(rt+=" #"+Cr(E)),x instanceof Vn?rt+=" "+Er(E):x instanceof En&&(rt+=" "+Er(x.fromNode)+" "+Er(x.toNode));return y+" "+this.Pa.count+": "+rt},Ct.ic=function(a,y,x){if(y===void 0&&(y=null),x===void 0&&(x=null),this.Uh===!1)return null;var E=!1;this.diagram!==null&&this.diagram.viewportBounds.ca(a)&&(E=!0);for(var b=Gt.alloc(),z=this.Pa.s,tt=z.length;tt--;){var rt=z[tt];if((E!==!0||fc(rt)!==!1)&&rt.isVisible()&&(b.assign(a),In(b,rt.oe),rt=rt.ic(b,y,x),rt!==null&&(y!==null&&(rt=y(rt)),rt!==null&&(x===null||x(rt)))))return Gt.free(b),rt}return Gt.free(b),null},Ct.ji=function(a,y,x,E){if(y===void 0&&(y=null),x===void 0&&(x=null),E instanceof yn||E instanceof mn||(E=new mn),this.Uh===!1)return E;var b=!1;this.diagram!==null&&this.diagram.viewportBounds.ca(a)&&(b=!0);for(var z=Gt.alloc(),tt=this.Pa.s,rt=tt.length;rt--;){var ot=tt[rt];if((b!==!0||fc(ot)!==!1)&&ot.isVisible()){z.assign(a),In(z,ot.oe);var st=ot;ot.ji(z,y,x,E)&&(y!==null&&(st=y(st)),st===null||x!==null&&!x(st)||E.add(st))}}return Gt.free(z),E},Ct.Cf=function(a,y,x,E,b){if(y===void 0&&(y=null),x===void 0&&(x=null),E===void 0&&(E=!1),b instanceof yn||b instanceof mn||(b=new mn),this.Uh===!1)return b;var z=!1;this.diagram!==null&&this.diagram.viewportBounds.Re(a)&&(z=!0);for(var tt=this.Pa.s,rt=tt.length;rt--;){var ot=tt[rt];if((z!==!0||fc(ot)!==!1)&&ot.isVisible()){var st=ot;ot.Cf(a,y,x,E,b)&&(y!==null&&(st=y(st)),st===null||x!==null&&!x(st)||b.add(st))}}return b},Ct.Nu=function(a,y,x,E,b,z,tt){if(this.Uh===!1)return b;for(var rt=this.Pa.s,ot=rt.length;ot--;){var st=rt[ot];if((tt!==!0||fc(st)!==!1)&&z(st)&&st.isVisible()){var ut=st;st.Cf(a,y,x,E,b)&&(y!==null&&(ut=y(ut)),ut===null||x!==null&&!x(ut)||b.add(ut))}}return b},Ct.og=function(a,y,x,E,b,z){if(x===void 0&&(x=null),E===void 0&&(E=null),b===void 0&&(b=!0),b!==!1&&b!==!0&&((b instanceof yn||b instanceof mn)&&(z=b),b=!0),z instanceof yn||z instanceof mn||(z=new mn),this.Uh===!1)return z;var tt=!1;this.diagram!==null&&this.diagram.viewportBounds.ca(a)&&(tt=!0);for(var rt=Gt.alloc(),ot=Gt.alloc(),st=this.Pa.s,ut=st.length;ut--;){var ft=st[ut];if((tt!==!0||fc(ft)!==!1)&&ft.isVisible()){rt.assign(a),In(rt,ft.oe),ot.h(a.x+y,a.y),In(ot,ft.oe);var St=ft;ft.og(rt,ot,x,E,b,z)&&(x!==null&&(St=x(St)),St===null||E!==null&&!E(St)||z.add(St))}}return Gt.free(rt),Gt.free(ot),z},Ct.Fd=function(a,y){if(this.visible){var x=this.Pa.s,E=x.length;if(E!==0){a=Si();for(var b=Si(),z=0;z<E;z++){var tt=x[z];if(tt.vw=z,tt instanceof En){if(tt.fd===!1)continue}else if(tt instanceof Pr&&tt.adornedPart!==null)continue;var rt=tt.actualBounds;tt.isVisible()&&ao(rt,y)?(tt.Fd(!0),a.push(tt)):(tt.Fd(!1),tt.adornments!==null&&0<tt.adornments.count&&b.push(tt))}for(y=0;y<a.length;y++)for(x=a[y],Kv(x),x=x.adornments;x.next();)E=x.value,E.measure(1/0,1/0),E.arrange(),E.Fd(!0);for(y=0;y<b.length;y++)Kv(b[y]);wi(a),wi(b)}}};function zl(a,y){var x=1;return a.pb!==1&&(x=y.globalAlpha,y.globalAlpha=x*a.pb),x}Ct.gc=function(a,y,x){if(this.visible&&this.pb!==0&&(x===void 0&&(x=!0),x||!this.isTemporary)){x=this.Pa.s;var E=x.length;if(E!==0){if(a.isTemporary)for(var b=0;b<E;b++)x[b].Gj();b=zl(this,a);var z=this.Zq;z.length=0;for(var tt=y.scale,rt=Ye.alloc(),ot=0;ot<E;ot++)this.Oj(a,x[ot],y,z,tt,rt,!0);if(Ye.free(rt),a.isTemporary)for(y=0;y<E;y++)x[y].Gj();a.globalAlpha=b}}};function Ug(a,y,x,E,b){if(a.visible&&a.pb!==0&&(b||!a.isTemporary)){b=a.Pa.s;var z=b.length;if(z!==0){var tt=zl(a,y),rt=a.Zq;rt.length=0;for(var ot=x.scale,st=Ye.alloc(),ut=0;ut<z;ut++){var ft=b[ut];E.contains(ft)&&a.Oj(y,ft,x,rt,ot,st,!1)}Ye.free(st),y.globalAlpha=tt}}}Ct.Oj=function(a,y,x,E,b,z,tt){if(tt&&!fc(y))a.Hs(y);else{if(E!==null&&y instanceof En&&(y.isOrthogonal&&E.push(y),y.fd===!1)){a.Hs(y);return}for(tt=!1,E=y.containingGroup;E!==null;)tt?E.tb!==null&&z.Ex(E.tb):E.tb!==null&&(tt=!0,z.assign(E.tb)),E=E.containingGroup;var rt=y.actualBounds;if(E=!1,tt&&y.isVisible()){if(!z.Yc(rt)){a.Hs(y);return}E=!z.Re(rt)}E&&(a.save(),a instanceof Tr?a.bk=z.copy():(a.beginPath(),a.rect(z.x,z.y,z.width,z.height),a.clip())),rt.width*b>x.Oq||rt.height*b>x.Oq?y.gc(a,x):(b=y.actualBounds,z=y.naturalBounds,b.width===0||b.height===0||isNaN(b.x)||isNaN(b.y)||!y.isVisible()||(x=y.transform,y.areaBackground!==null&&(fo(y,a,y.areaBackground,!0,!0,z,b),a.fillRect(b.x,b.y,b.width,b.height)),y.areaBackground===null&&y.background===null&&(fo(y,a,"rgba(0,0,0,0.3)",!0,!1,z,b),a.fillRect(b.x,b.y,b.width,b.height)),y.background!==null&&(a.transform(x.m11,x.m12,x.m21,x.m22,x.dx,x.dy),fo(y,a,y.background,!0,!1,z,b),a.fillRect(0,0,z.width/2,z.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)))))),E&&(a.restore(),a.Vc(!0))}},Ct.g=function(a,y,x,E,b){var z=this.diagram;z!==null&&z.cb(io,a,this,y,x,E,b)},Ct.oi=function(a,y,x){var E=this.Pa;if(y.Ig=this,this===null&&ba(y),a>=E.count)a=E.count;else if(E.M(a)===y)return-1;return E.Gb(a,y),y.Vo(x),E=this.diagram,E!==null&&(x?E.N():E.oi(y)),nf(this,a,y),a},Ct.pc=function(a,y,x){if(!x&&y.layer!==this&&y.layer!==null)return y.layer.pc(a,y,x);var E=this.Pa;if(0>a||a>=E.length){if(a=E.indexOf(y),0>a)return-1}else if(E.M(a)!==y&&(a=E.indexOf(y),0>a))return-1;return y.Wo(x),E.mb(a),E=this.diagram,E!==null&&(x?E.N():E.pc(y)),y.Ig=null,ba(y),a};function nf(a,y,x){if(y=$d(a,y,x),x instanceof Gi&&x!==null&&isNaN(x.zOrder)){if(x.memberParts.count!==0){for(var E=-1,b=a.Pa.s,z=b.length,tt=0;tt<z;tt++){var rt=b[tt];if(rt===x&&(y=tt,0<=E)||0>E&&rt.containingGroup===x&&(E=tt,0<=y))break}!(0>E)&&E<y&&(b=a.Pa,b.mb(y),b.Gb(E,x))}y=x.containingGroup,y!==null&&nf(a,-1,y)}x.svg!==null&&x.svg.remove()}function $d(a,y,x){var E=x.zOrder;if(isNaN(E))return y;a=a.Pa;var b=a.count;if(1>=b)return y;if(0>y&&(y=a.indexOf(x)),0>y)return-1;for(var z=y-1,tt=NaN;0<=z&&(tt=a.M(z).zOrder,!!isNaN(tt));)z--;for(var rt=y+1,ot=NaN;rt<b&&(ot=a.M(rt).zOrder,!!isNaN(ot));)rt++;if(!isNaN(tt)&&tt>E)for(;;){if(z===-1||tt<=E){if(z++,z===y)break;return a.mb(y),a.Gb(z,x),z}for(tt=NaN;0<=--z&&(tt=a.M(z).zOrder,isNaN(tt)););}else if(!isNaN(ot)&&ot<E)for(;;){if(rt===b||ot>=E){if(rt--,rt===y)break;return a.mb(y),a.Gb(rt,x),rt}for(ot=NaN;++rt<b&&(ot=a.M(rt).zOrder,isNaN(ot)););}return y}we.Object.defineProperties(qo.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===""&&pe("Cannot rename default Layer to: "+a),x=x.layers;x.next();)x.value.name===a&&pe("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)&&gi(a,"0 <= value <= 1",qo,"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))}}}),qo.prototype.findObjectsNear=qo.prototype.og,qo.prototype.findObjectsIn=qo.prototype.Cf,qo.prototype.findObjectsAt=qo.prototype.ji,qo.prototype.findObjectAt=qo.prototype.ic,qo.className="Layer";function Be(a,y){if($g||(Ca(),$g=!0),Zr(this),Gl=this,this.vb=!0,this.Ka=null,this.ya=this.Aa=0,this.ta=null,co){var x=this,E=function(){x.removeEventListener(Xe.document,"DOMContentLoaded",E,!1),x.setRTL()};Xe.document.body!==null?this.setRTL():x.addEventListener(Xe.document,"DOMContentLoaded",E,!1)}this.ol=null,gf.add("Model",jr);var b=this;return this.Hb=function(z){var tt=b.partManager;if(z.model===tt.diagram.model&&tt.diagram.aa){tt.diagram.aa=!1;try{var rt=z.change;z.modelChange===""&&rt===io&&tt.updateDataBindings(z.object,z.propertyName)}finally{tt.diagram.aa=!0}}},this.Oc=function(z){b.partManager.doModelChanged(z)},this.hu=this.ku=null,Kg(this),this.model=xy(),this.Wg=!0,Zg(this),this.layout=new ro,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 tp,a!==void 0&&(typeof a=="string"||Xe.Element&&a instanceof Element?Wf(this,a):y=a),this.vb=!1,y&&this.nm(y),this}var Lh,Gl;function Kg(a){a.Yd=new cs,a.Yd.Xe(a),a.Db=17,a.Gw=!1,a.tn=!1,a.bu="default",a.Wa=new yn,a.pj=new yi,a.nl="default",a.Tx(),a.Sx(),a.pb=1,a.pa=new Gt(NaN,NaN).freeze(),a.du=new Gt(NaN,NaN),a.Ca=1,a.Pp=1,a.zt=new Gt(NaN,NaN).freeze(),a.At=NaN,a.Ot=1e-4,a.Mt=100,a.Ab=new Xi,a.zu=new Gt(NaN,NaN).freeze(),a.ut=new Ye(NaN,NaN,NaN,NaN).freeze(),a.rj=new Di(0,0,0,0).freeze(),a.sj=$u,a.nu=!1,a.Zt=null,a.fu=null,a.yh=Na,a.zk=ha,a.Fg=Na,a.pq=ha,a.yt=wo,a.Bt=wo,a.Fc=!0,a.pn=!1,a.De=new mn,a.Eh=new yi,a.Xm=!0,a.vp=250,a.vk=-1,a.xp=new Di(16,16,16,16).freeze(),a.kg=!1,a.Jk=!1,a.fn=!0,a.bq=new Fa,a.bq.diagram=a,a.Qg=new Fa,a.Qg.diagram=a,a.cj=new Fa,a.cj.diagram=a,a.zg=null,a.pf=null,a.qu=!1,Hp(a),a.ai=new mn,a.Ht=!0,a.uu=Lu,a.pw=!1,a.wu=Dh,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 yi,a.Xn=new yn,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 Di(5).freeze(),a.Hw=new mn().freeze(),a.Nt=999999999,a.nw=new mn().freeze(),a.Zi=!0,a.Ee=!0,a.vd=!0,a.Be=!1,a.gf=!1,a.xh=!0,a.hf=!1,a.sy=new mn,a.ow=new mn,a.Xh=null,a.aw=new Re(8,8),a.bw=999,a.Bw=1,a.Jw=0,a.fc={scale:1,position:new Gt,bounds:new Ye,Py:new Re,bA:new Re,Oz:!1},a.fc.canvasSize=a.fc.Py,a.fc.newCanvasSize=a.fc.bA,a.fc.isScroll=!1,a.Rw=new Ye(NaN,NaN,NaN,NaN).freeze(),a.wo=new Re(NaN,NaN).freeze(),a.Sp=new Ye(NaN,NaN,NaN,NaN).freeze(),a.It=!1,a.Lg=new yi;var y=new Vn,x=new Xr;x.bind(new Do("text","",Er)),y.add(x),a.ny=y,a.Lg.add("",y),y=new Vn,x=new Xr,x.stroke="brown",x.bind(new Do("text","",Er)),y.add(x),a.Lg.add("Comment",y),y=new Vn,y.selectable=!1,y.avoidable=!1,x=new Ui,x.figure="Ellipse",x.fill="black",x.stroke=null,x.desiredSize=new Re(3,3).ja(),y.add(x),a.Lg.add("LinkLabel",y),a.Yi=new yi,y=new Gi,y.selectionObjectName="GROUPPANEL",y.type=pn.Vertical,x=new Xr,x.font="bold 12pt sans-serif",x.bind(new Do("text","",Er)),y.add(x),x=new pn(pn.Auto),x.name="GROUPPANEL";var E=new Ui;E.figure="Rectangle",E.fill="rgba(128,128,128,0.2)",E.stroke="black",x.add(E),E=new es,E.padding=new Di(5,5,5,5).ja(),x.add(E),y.add(x),a.ly=y,a.Yi.add("",y),a.Kh=new yi,y=new En,x=new Ui,x.isPanelMain=!0,y.add(x),x=new Ui,x.toArrow="Standard",x.fill="black",x.stroke=null,x.strokeWidth=0,y.add(x),a.my=y,a.Kh.add("",y),y=new En,x=new Ui,x.isPanelMain=!0,x.stroke="brown",y.add(x),a.Kh.add("Comment",y),y=new Pr,y.type=pn.Auto,x=new Ui,x.fill=null,x.stroke="dodgerblue",x.strokeWidth=3,y.add(x),x=new es,x.margin=new Di(1.5,1.5,1.5,1.5).ja(),y.add(x),a.St=y,a.wt=y,y=new Pr,y.type=pn.Link,x=new Ui,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 jr,a.toolManager=new qr,a.toolManager.initializeStandardTools(),a.defaultTool=a.toolManager,a.currentTool=a.defaultTool,a.nt=null,a.Wm=new at,a.Vt=null,a.Wt=null,a.Mr=!1,a.commandHandler=Gp(),a.eq=null,a.fq=uo,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 Gt,a.zy=500,a.wp=new Gt,a.wq=!1}Be.prototype.clear=function(){this.animationManager.Cc(),this.model.clear(),pd=null,qu="",Hf(this,!1),this.Xn.clear(),up(),this.Og.clear(),this.Xh=null,this.Ya(),this.Va(),this.N()};function Hf(a,y){a.animationManager.Cc(!0),a.Hw=new mn().freeze(),a.nw=new mn().freeze();var x=a.skipsUndoManager,E=a.cc!==null&&a.cc!==void 0;E&&(a.skipsUndoManager=!0);var b=null;a.fe!==null&&(b=a.fe.part,b!==null&&a.remove(b));var z=[],tt=a.Wa.length;if(y){for(y=0;y<tt;y++)for(var rt=a.Wa.s[y].parts;rt.next();){var ot=rt.value;ot!==b&&ot.data===null&&z.push(ot)}for(y=0;y<z.length;y++)a.remove(z[y])}for(y=0;y<tt;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(),up(),a.Og.clear(),Or=[],b!==null&&(a.add(b),a.partManager.parts.remove(b)),E&&(a.skipsUndoManager=x),z}function Gp(){return null}Be.prototype.reset=function(){this.clear(),this.vb=!0,Kg(this),Wl(this),this.Wg=!0,Zg(this),this.layout=new ro,this.Wg=!1,this.model=xy(),this.model.undoManager=new so,this.vb=this.rn=!1,this.N()},Be.prototype.setRTL=function(a){a=a===void 0?this.div:a,a===null&&(a=Xe.document.body);var y=ki("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},Be.prototype.setScrollWidth=function(a){a=a===void 0?this.div:a,a===null&&(a=Xe.document.body);var y=0;if(co){var x=qg;y=Lh,x===null&&(x=qg=ki("p"),x.style.width="100%",x.style.height="200px",x.style.boxSizing="content-box",y=Lh=ki("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 E=x.offsetWidth;y.style.overflow="scroll",x=x.offsetWidth,E===x&&(x=y.clientWidth),a.removeChild(y),y=E-x,y!==0||Qi||(y=11)}this.Db=y,this.Gw=!0},Be.prototype.qb=function(a){a.classType===Be&&(this.autoScale=a)},Be.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 Wf(a,y){if(co){if(y!=null||pe("Diagram setup requires an argument DIV."),a.Ka!==null&&pe("Diagram has already completed setup."),typeof y=="string"?a.Ka=Xe.document.getElementById(y):y instanceof HTMLDivElement?a.Ka=y:pe("No DIV or DIV id supplied: "+y),a.Ka===null&&pe("Invalid DIV id; could not get element with id: "+y),a.Ka.H!==void 0&&pe("Invalid div id; div already has a Diagram associated with it."),!a.ol&&Xe.ResizeObserver){var x=vi(function(){a.$b()},250);a.ol=new Xe.ResizeObserver(function(){x()}),a.ol.observe(a.Ka)}Xe.getComputedStyle(a.Ka,null).position==="static"&&(a.Ka.style.position="relative"),y=5;var E="rgba(2"+y+"5, 255, 255, 0)";y--,a.Ka.style["-webkit-tap-highlight-color"]=E,a.Ka.innerHTML="",a.Ka.H=a,a.Ka.goDiagram=a,a.Ka.go=Xe.go;var b=new Pa(a);if(b.style!==void 0&&(b.style.position="absolute",b.style.top="0px",b.style.left="0px",Xe.getComputedStyle(a.Ka,null).getPropertyValue("direction")==="rtl"&&(a.tn=!0),b.style.zIndex="2",b.style.userSelect="none",b.style.MozUserSelect="none",b.style.touchAction="none",b.style.letterSpacing="normal !important",b.style.wordSpacing="normal !important"),a.ta=b,a.ib=b.context,E=a.ib,a.Mb=a.computePixelRatio(),a.viewSize.w()||(a.Aa=a.Ka.clientWidth||1,a.ya=a.Ka.clientHeight||1),rc(a,a.Aa,a.ya),a.Ka.insertBefore(b.Oa,a.Ka.firstChild),b=new Pa(null),b.width=1,b.height=1,a.jw=b,a.oy=b.context,co){b=ki("div");var z=ki("div");b.style.position="absolute",b.style.overflow="auto",b.style.width=a.Aa+"px",b.style.height=a.ya+"px",b.style.zIndex="1",z.style.position="absolute",z.style.width="1px",z.style.height="1px",a.Ka.appendChild(b),b.appendChild(z),b.onscroll=Xg,b.addEventListener("pointerdown",rf),b.H=a,b.uy=!0,b.vy=!0,a.ku=b,a.hu=z}a.hk=vi(function(){a.Yh=null,a.N()},300),a.Ov=vi(function(){ec(a)},250),a.preventDefault=function(tt){return tt.preventDefault(),!1},a.$j=function(tt){if(a.isEnabled){var rt=Hs(a,tt,!0);rt.bubbles=!0;var ot=0,st=0;rt.delta=0,tt.deltaX!==void 0?(tt.deltaX!==0&&(ot=0<tt.deltaX?1:-1),tt.deltaY!==0&&(st=0<tt.deltaY?1:-1),rt.delta=Math.abs(tt.deltaX)>Math.abs(tt.deltaY)?-ot:-st):tt.wheelDeltaX!==void 0?(tt.wheelDeltaX!==0&&(ot=0<tt.wheelDeltaX?-1:1),tt.wheelDeltaY!==0&&(st=0<tt.wheelDeltaY?-1:1),rt.delta=Math.abs(tt.wheelDeltaX)>Math.abs(tt.wheelDeltaY)?-ot:-st):tt.wheelDelta!==void 0&&tt.wheelDelta!==0&&(rt.delta=0<tt.wheelDelta?1:-1),a.doMouseWheel(),Qs(rt,tt)}},a.aA=function(tt){a.isEnabled&&(a.Vk=!1,Hs(a,tt,!0),tt=a.currentTool,tt.cancelWaitAfter(),tt.standardMouseOver())},a.ui=function(tt){if(a.isEnabled){a.Vk=!0;var rt=a.Yt;rt[tt.pointerId]===void 0&&(rt[tt.pointerId]=tt),rt=a.oj;var ot=!1;if(rt[0]===null||rt[0].pointerId!==tt.pointerId&&rt[0].pointerType===tt.pointerType)if(rt[1]!==null&&rt[1].pointerId===tt.pointerId)rt[1]=tt,ot=!0;else if(rt[0]===null)rt[0]=tt;else if(rt[1]===null)rt[1]=tt,ot=!0;else{tt.preventDefault();return}else rt[0]=tt;(rt=tt.pointerType==="touch"||tt.pointerType==="pen")&&(a.qu=!1,a.wq=!0);var st=ot;ot=Uf(a,tt,!0,!1,!0,st),bu(a,tt,ot),ot.targetDiagram=hd(tt,tt.target),ot.targetObject=null,st||ot.clone(a.bq),st=a.uw,rt=rt?25:10,tt.timeStamp-a.tw<a.zy&&!(Math.abs(st.x-tt.screenX)>rt||Math.abs(st.y-tt.screenY)>rt)?a.yq++:a.yq=1,ot.clickCount=a.yq,a.tw=tt.timeStamp,a.uw.sg(tt.screenX,tt.screenY),a.doMouseDown(),tt.button===1?tt.preventDefault():Qs(ot,tt)}},a.dk=function(tt){if(a.isEnabled){a.Vk=!0;var rt=a.oj;if(rt[0]===null||rt[0].pointerId!==tt.pointerId&&rt[0].pointerType===tt.pointerType){if(rt[1]!==null&&rt[1].pointerId===tt.pointerId){rt[1]=tt;return}if(rt[0]===null)rt[0]=tt;else return}else rt[0]=tt;if(rt[0].pointerId===tt.pointerId){rt=Uf(a,tt,!1,!1,!1,rt[1]!==null);var ot=Xe.document.elementFromPoint(tt.clientX,tt.clientY)||null;ot!==null&&ot.shadowRoot!==void 0&&ot.shadowRoot!==null&&(ot=ot.shadowRoot.elementFromPoint(tt.clientX,tt.clientY));var st=a,ut=tt;ot&&ot.H&&(ut=tt,st=ot.H),rt.targetDiagram=st,bu(a,ut,rt),rt.targetObject=null,a.doMouseMove(),Qs(rt,tt)}}},a.fk=function(tt){if(a.isEnabled){a.Vk=!0;var rt=tt.pointerType==="touch"||tt.pointerType==="pen",ot=a.Yt;if(rt&&a.qu)delete ot[tt.pointerId],tt.preventDefault();else if(ot=a.oj,ot[0]===null||ot[0].pointerId!==tt.pointerId&&ot[0].pointerType===tt.pointerType)ot[1]!==null&&ot[1].pointerId===tt.pointerId&&(ot[1]=null);else{ot[0]=null,ot=Uf(a,tt,!1,!0,!0,!1);var st=Xe.document.elementFromPoint(tt.clientX,tt.clientY)||null;st!==null&&st.shadowRoot!==void 0&&st.shadowRoot!==null&&(st=st.shadowRoot.elementFromPoint(tt.clientX,tt.clientY)),st!==null&&st.H instanceof Be&&st.H!==a&&bu(st.H,tt,ot),st===null&&(st=tt.target),bu(a,tt,ot),ot.clickCount=a.yq,ot.targetDiagram=hd(tt,st),ot.targetObject=null,a.doMouseUp(),Qs(ot,tt),rt&&(a.wq=!1)}}},a.ek=function(tt){if(a.isEnabled){a.Vk=!1;var rt=a.Yt;rt[tt.pointerId]&&delete rt[tt.pointerId],rt=a.oj,rt[0]!==null&&rt[0].pointerId===tt.pointerId&&(rt[0]=null),rt[1]!==null&&rt[1].pointerId===tt.pointerId&&(rt[1]=null),tt.pointerType!=="touch"&&tt.pointerType!=="pen"&&(tt=a.currentTool,tt.cancelWaitAfter(),tt.standardMouseOver())}},a.ck=function(tt){var rt=a.oj;rt[0]!==null&&rt[0].pointerId===tt.pointerId?(rt[0]=null,a.wq=!1):rt[1]!==null&&rt[1].pointerId===tt.pointerId&&(rt[1]=null)},a.Vp=E.Z["d"+Oh[1]+Oh[2]+"wI"+Ih.slice(1,5)]["b"+Nx.slice(1,y)](E.Z,sc,y,y),E.Vc(!0),Rm(a),a.nl==="svg"&&(y=a.pj.get("svg"),a.Ka.appendChild(y.Oa),a.ib=y.context)}}Be.prototype.addEventListener=function(a,y,x,E){a.addEventListener(y,x,{capture:E,passive:!1})},Be.prototype.removeEventListener=function(a,y,x,E){a.removeEventListener(y,x,{capture:E})};function Rm(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(Xe,"resize",a.Ov,!1)}function Sa(a){30<a.Sq&&(a.Yh=1)}function tc(a,y){a.Yh!==null&&(a.Yh=null,y&&a.hk(),di&&di.nx||(a.Sq=0,a.zw=[0,0,0,0,0],a.Tq=0))}Be.prototype.computePixelRatio=function(){return this.Yh!==null?this.Yh:Xe.devicePixelRatio||1},Be.prototype.doMouseMove=function(){this.currentTool.doMouseMove()},Be.prototype.doMouseDown=function(){this.currentTool.doMouseDown()},Be.prototype.doMouseUp=function(){this.currentTool.doMouseUp()},Be.prototype.doMouseWheel=function(){this.currentTool.doMouseWheel()},Be.prototype.doKeyDown=function(){this.currentTool.doKeyDown()},Be.prototype.doKeyUp=function(){this.currentTool.doKeyUp()},Be.prototype.doFocus=function(){this.focus()},Be.prototype.focus=function(){if(this.ta)if(this.scrollsPageOnFocus)this.ta.focus();else{var a=Xe.scrollX||Xe.pageXOffset,y=Xe.scrollY||Xe.pageYOffset;this.ta.focus(),Xe.scrollTo(a,y)}},Be.prototype.Oy=function(){this.H.R("GainedFocus")},Be.prototype.Ny=function(){this.H.R("LostFocus")};function ec(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,E=a.Be?a.Db:0,b=a.Mb;a.Mb=a.computePixelRatio(),a.Mb!==b&&(a.pn=!0,a.$b()),(y.clientWidth!==a.Aa+x||y.clientHeight!==a.ya+E)&&(a.Ee=!0,a.Fc=!0,y=a.layout,y!==null&&y.isViewportSized&&a.autoScale===Na&&(a.Jk=!0,y.C()),a.ld||a.$b())}}}function Zg(a){var y=new qo;y.name="Background",a.Al(y),y=new qo,y.name="",a.Al(y),y=new qo,y.name="Foreground",a.Al(y),y=new qo,y.name="Adornment",y.isTemporary=!0,y.isInDocumentBounds=!1,a.Al(y),y=new qo,y.name="Tool",y.isTemporary=!0,y.isInDocumentBounds=!0,a.Al(y),y=new qo,y.name="Grid",y.allowSelect=!1,y.pickable=!1,y.isTemporary=!0,y.isInDocumentBounds=!1,a.Ww(y,a.Qj("Background"))}function Yg(a){var y=new pn(pn.Grid);y.name="GRID";var x=new Ui;return x.figure="LineH",x.stroke="lightgray",x.strokeWidth=.5,x.interval=1,y.add(x),x=new Ui,x.figure="LineH",x.stroke="gray",x.strokeWidth=.5,x.interval=5,y.add(x),x=new Ui,x.figure="LineH",x.stroke="gray",x.strokeWidth=1,x.interval=10,y.add(x),x=new Ui,x.figure="LineV",x.stroke="lightgray",x.strokeWidth=.5,x.interval=1,y.add(x),x=new Ui,x.figure="LineV",x.stroke="gray",x.strokeWidth=.5,x.interval=5,y.add(x),x=new Ui,x.figure="LineV",x.stroke="gray",x.strokeWidth=1,x.interval=10,y.add(x),x=new mi,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 Xg(){this.H.gu?this.H.gu=!1:this.H.isEnabled?this.H.kx(this):fd(this.H)}function rf(a){this.H.isEnabled?(this.H.lu=a.target.scrollTop,this.H.ju=a.target.scrollLeft):fd(this.H)}Be.prototype.kx=function(a){if(this.ta!==null){var y=this.ku,x=this.hu;this.qr=!0;var E=this.documentBounds,b=this.viewportBounds,z=this.rj,tt=E.x-z.left,rt=E.y-z.top,ot=E.width+z.left+z.right,st=E.height+z.top+z.bottom,ut=E.right+z.right;z=E.bottom+z.bottom;var ft=b.x;E=b.y;var St=b.width,wt=b.height,Et=b.right,Bt=b.bottom;b=this.scale;var Vt=a.scrollLeft;if(this.tn)switch(this.bu){case"negative":Vt=Vt+a.scrollWidth-a.clientWidth;break;case"reverse":Vt=a.scrollWidth-Vt-a.clientWidth}var jt=Vt;St<ot||wt<st?(Vt=Gt.allocAt(this.position.x,this.position.y),this.allowHorizontalScroll&&this.ju!==jt&&(Vt.x=jt/b+tt,this.ju=jt),this.allowVerticalScroll&&this.lu!==a.scrollTop&&(Vt.y=a.scrollTop/b+rt,this.lu=a.scrollTop),this.position=Vt,Gt.free(Vt),this.Ee=this.qr=!1):(Vt=Gt.alloc(),a.uy&&this.allowHorizontalScroll&&(tt<ft&&(this.position=Vt.h(jt+tt,this.position.y)),ut>Et&&(this.position=Vt.h(-(y.scrollWidth-this.Aa)+jt-this.Aa/b+ut,this.position.y))),a.vy&&this.allowVerticalScroll&&(rt<E&&(this.position=Vt.h(this.position.x,a.scrollTop+rt)),z>Bt&&(this.position=Vt.h(this.position.x,-(y.scrollHeight-this.ya)+a.scrollTop-this.ya/b+z))),Gt.free(Vt),this.vd=!0,this.Ee=this.qr=!1,E=this.documentBounds,b=this.viewportBounds,ut=E.right,Et=b.right,z=E.bottom,Bt=b.bottom,tt=E.x,ft=b.x,rt=E.y,E=b.y,St>=ot&&tt>=ft&&ut<=Et&&(x.style.width="1px"),wt>=st&&rt>=E&&z<=Bt&&(x.style.height="1px"))}},Be.prototype.computeBounds=function(a){return a===void 0&&(a=new Ye),fa(this),of(this,a)};function of(a,y){if(a.fixedBounds.w())return y.assign(a.fixedBounds),y.Co(a.yb),y;for(var x=!0,E=a.Wa.s,b=E.length,z=0;z<b;z++){var tt=E[z];if(tt.visible&&tt.isInDocumentBounds){tt=tt.Pa.s;for(var rt=tt.length,ot=0;ot<rt;ot++){var st=tt[ot];st.isInDocumentBounds&&st.isVisible()&&(st=st.actualBounds,st.w()&&(x?(x=!1,y.assign(st)):y.ed(st)))}}}return x&&y.h(0,0,0,0),y.Co(a.yb),y}Be.prototype.computePartsBounds=function(a,y){y===void 0&&(y=!1);var x=null;if(Mn(a))for(var E=0;E<a.length;E++){var b=a[E];!y&&b instanceof En||(b.Va(),x===null?x=b.actualBounds.copy():x.ed(b.actualBounds))}else for(a=a.iterator;a.next();)E=a.value,!y&&E instanceof En||(E.Va(),x===null?x=E.actualBounds.copy():x.ed(E.actualBounds));return x===null?new Ye(NaN,NaN,0,0):x};function Js(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=Gt.alloc(),x.xi(a.documentBounds,a.initialDocumentSpot);var E=a.viewportBounds;E=Ye.allocAt(0,0,E.width,E.height);var b=Gt.alloc();b.xi(E,a.initialViewportSpot),b.h(x.x-b.x,x.y-b.y),a.position=b,Ye.free(E),Gt.free(b),Gt.free(x)}x=a.yh,y&&a.Fg!==Na&&(x=a.Fg);var z=x!==Na?ud(a,x):a.scale;x=a.pa.x,E=a.pa.y,b=a.Aa/z;var tt=a.ya/z,rt=a.zk,ot=a.pq;y&&!rt.sb()&&(ot.sb()||ot.Xb())&&(rt=ot.Xb()?Br:ot),Vf(a,a.documentBounds,b,tt,rt,y),y=a.scale,a.scale=z,a.vb=!1,z=a.viewportBounds,Se.B(z.x,x)&&Se.B(z.y,E)&&Se.B(z.width,b)&&Se.B(z.height,tt)||a.onViewportBoundsChanged(new Ye(x,E,b,tt),z,y,!1)}}function ud(a,y){var x=a.Pp;if(a.ta===null)return x;a.Va();var E=a.documentBounds;if(!E.w())return x;var b=E.width;E=E.height;var z=a.Aa+(a.gf?a.Db:0),tt=a.ya+(a.Be?a.Db:0),rt=z/b,ot=tt/E;return y===fs?(y=Math.min(ot,rt),y>x&&(y=x),y<a.minScale&&(y=a.minScale),y>a.maxScale&&(y=a.maxScale),y):y===md?(y=ot>rt?(tt-a.Db)/E:(z-a.Db)/b,y>x&&(y=x),y<a.minScale&&(y=a.minScale),y>a.maxScale&&(y=a.maxScale),y):a.scale}Be.prototype.zoomToFit=function(){var a=this.sj;this.sj=$u,this.scale=ud(this,fs),a!==$u&&(Js(this,!1),Vf(this,this.documentBounds,this.Aa/this.Ca,this.ya/this.Ca,this.zk,!1)),this.sj=a},Ct=Be.prototype,Ct.BA=function(a,y){y===void 0&&(y=fs);var x=a.width,E=a.height;if(!(x===0||E===0||isNaN(x)&&isNaN(E))){var b=1;if(y===fs||y===md)if(isNaN(x))b=this.viewportBounds.height*this.scale/E;else if(isNaN(E))b=this.viewportBounds.width*this.scale/x;else{b=this.Aa;var z=this.ya;b=y===md?z/E>b/x?(z-(this.Be?this.Db:0))/E:(b-(this.gf?this.Db:0))/x:Math.min(z/E,b/x)}this.scale=b,this.position=new Gt(a.x,a.y)}},Ct.Jy=function(a,y){this.Va();var x=this.documentBounds,E=this.viewportBounds;this.position=new Gt(x.x+(a.x*x.width+a.offsetX)-(y.x*E.width-y.offsetX),x.y+(a.y*x.height+a.offsetY)-(y.y*E.height-y.offsetY))},Ct.zz=function(a){if(a instanceof fe){this.eq=a;var y=Gt.alloc();this.fq=this.op(a.ga(wo,y)),Gt.free(y)}else this.eq=null,this.fq=uo};function Vf(a,y,x,E,b,z){var tt=Gt.allocAt(a.pa.x,a.pa.y),rt=tt.x,ot=tt.y;if(a.eq!==null){var st=Gt.alloc();st=a.eq.ga(wo,st),rt=st.x-a.fq.x/a.scale,ot=st.y-a.fq.y/a.scale,b=No,Gt.free(st)}(z||a.scrollMode===$u)&&(b.sb()&&(x>y.width&&(rt=y.x+(b.x*y.width+b.offsetX)-(b.x*x-b.offsetX)),E>y.height&&(ot=y.y+(b.y*y.height+b.offsetY)-(b.y*E-b.offsetY))),b=a.rj,z=x-y.width,x<y.width+b.left+b.right?(rt=Math.min(rt+x/2,y.right+Math.max(z,b.right)-x/2),rt=Math.max(rt,y.left-Math.max(z,b.left)+x/2),rt-=x/2):rt>y.left?rt=y.left:rt<y.right-x&&(rt=y.right-x),x=E-y.height,E<y.height+b.top+b.bottom?(ot=Math.min(ot+E/2,y.bottom+Math.max(x,b.bottom)-E/2),ot=Math.max(ot,y.top-Math.max(x,b.top)+E/2),ot-=E/2):ot>y.top?ot=y.top:ot<y.bottom-E&&(ot=y.bottom-E)),tt.x=isFinite(rt)?rt:-a.yb.left,tt.y=isFinite(ot)?ot:-a.yb.top,a.positionComputation!==null&&(y=a.positionComputation(a,tt),tt.x=y.x,tt.y=y.y),qc(a.Yd,a.pa,tt),a.pa.h(tt.x,tt.y),Wl(a),Gt.free(tt)}Ct.Ol=function(a,y){if(y===void 0&&(y=!0),y){if(a=ru(this,a,function(x){return x.part},function(x){return x.canSelect()}),a instanceof mi)return a}else if(a=ru(this,a,function(x){return x.part}),a instanceof mi)return a;return null},Ct.ic=function(a,y,x){y===void 0&&(y=null),x===void 0&&(x=null),fa(this);for(var E=this.Wa.iteratorBackwards;E.next();){var b=E.value;if(b.visible&&(b=b.ic(a,y,x),b!==null))return b}return null};function ru(a,y,x,E){for(x===void 0&&(x=null),E===void 0&&(E=null),fa(a),a=a.Wa.iteratorBackwards;a.next();){var b=a.value;if(b.visible&&!b.isTemporary&&(b=b.ic(y,x,E),b!==null))return b}return null}Ct.lz=function(a,y,x){return y===void 0&&(y=!0),nc(this,a,function(E){return E.part},y?function(E){return E instanceof mi&&E.canSelect()}:null,x)};function nc(a,y,x,E,b){for(x===void 0&&(x=null),E===void 0&&(E=null),b instanceof yn||b instanceof mn||(b=new mn),fa(a),a=a.Wa.iteratorBackwards;a.next();){var z=a.value;z.visible&&!z.isTemporary&&z.ji(y,x,E,b)}return b}Ct.ji=function(a,y,x,E){y===void 0&&(y=null),x===void 0&&(x=null),E instanceof yn||E instanceof mn||(E=new mn),fa(this);for(var b=this.Wa.iteratorBackwards;b.next();){var z=b.value;z.visible&&z.ji(a,y,x,E)}return E},Ct.ux=function(a,y,x,E){return y===void 0&&(y=!1),x===void 0&&(x=!0),af(this,a,function(b){return b instanceof mi&&(!x||b.canSelect())},y,E)},Ct.Cf=function(a,y,x,E,b){y===void 0&&(y=null),x===void 0&&(x=null),E===void 0&&(E=!1),b instanceof yn||b instanceof mn||(b=new mn),fa(this);for(var z=this.Wa.iteratorBackwards;z.next();){var tt=z.value;tt.visible&&tt.Cf(a,y,x,E,b)}return b},Ct.Nu=function(a,y,x,E,b,z){var tt=new mn;fa(this);for(var rt=this.Wa.iteratorBackwards;rt.next();){var ot=rt.value;ot.visible&&ot.Nu(a,y,x,E,tt,b,z)}return tt};function af(a,y,x,E,b){var z=null;for(z===void 0&&(z=null),x===void 0&&(x=null),E===void 0&&(E=!1),b instanceof yn||b instanceof mn||(b=new mn),fa(a),a=a.Wa.iteratorBackwards;a.next();){var tt=a.value;tt.visible&&!tt.isTemporary&&tt.Cf(y,z,x,E,b)}return b}Ct.mz=function(a,y,x,E,b){return x===void 0&&(x=!0),E===void 0&&(E=!0),ic(this,a,y,function(z){return z instanceof mi&&(!E||z.canSelect())},x,b)},Ct.og=function(a,y,x,E,b,z){x===void 0&&(x=null),E===void 0&&(E=null),b===void 0&&(b=!0),b!==!1&&b!==!0&&((b instanceof yn||b instanceof mn)&&(z=b),b=!0),z instanceof yn||z instanceof mn||(z=new mn),fa(this);for(var tt=this.Wa.iteratorBackwards;tt.next();){var rt=tt.value;rt.visible&&rt.og(a,y,x,E,b,z)}return z};function ic(a,y,x,E,b,z){var tt=null;for(tt===void 0&&(tt=null),E===void 0&&(E=null),b===void 0&&(b=!0),b!==!1&&b!==!0&&((b instanceof yn||b instanceof mn)&&(z=b),b=!0),z instanceof yn||z instanceof mn||(z=new mn),fa(a),a=a.Wa.iteratorBackwards;a.next();){var rt=a.value;rt.visible&&!rt.isTemporary&&rt.og(y,x,tt,E,b,z)}return z}Be.prototype.acceptEvent=function(a){return Hs(this,a,a instanceof MouseEvent)};function Hs(a,y,x){var E=a.Qg;return a.Qg=a.cj,a.cj=E,E.diagram=a,E.event=y,x?bu(a,y,E):(E.viewPoint=a.Qg.viewPoint,E.documentPoint=a.Qg.documentPoint),a=0,y.ctrlKey&&(a+=1),y.altKey&&(a+=2),y.shiftKey&&(a+=4),y.metaKey&&(a+=8),E.modifiers=a,E.button=y.button,y.buttons!==void 0&&(E.buttons=y.buttons),Qi&&y.button===0&&y.ctrlKey&&(E.button=2),E.down=!1,E.up=!1,E.clickCount=1,E.delta=0,E.handled=!1,E.bubbles=!1,E.timestamp=y.timeStamp,E.isMultiTouch=!1,E.targetDiagram=hd(y,y.target),E.targetObject=null,E}function hd(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 Uf(a,y,x,E,b,z){var tt=a.Qg;return a.Qg=a.cj,a.cj=tt,tt.diagram=a,tt.clickCount=1,a=tt.delta=0,y.ctrlKey&&(a+=1),y.altKey&&(a+=2),y.shiftKey&&(a+=4),y.metaKey&&(a+=8),tt.modifiers=a,tt.event=y,tt.timestamp=y.timeStamp,tt.button=y.button,tt.buttons=y.buttons,Qi&&y.button===0&&y.ctrlKey&&(tt.button=2),tt.down=x,tt.up=E,tt.handled=!1,tt.bubbles=b,tt.isMultiTouch=z,tt}function Qs(a,y){return a.bubbles?!0:(y.stopPropagation!==void 0&&y.stopPropagation(),y.cancelable!==!1&&y.preventDefault(),y.cancelBubble=!0,!1)}Be.prototype.Qz=function(a){var y=this.H;if(!this.H.isEnabled)return!1;var x=Hs(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(),Qs(x,a)},Be.prototype.Rz=function(a){var y=this.H;if(!y.isEnabled)return!1;var x=Hs(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(),Qs(x,a)},Be.prototype.bz=function(a){var y=this.H;if(!y.isEnabled)return!1;var x=Hs(y,a,!0);return y.mouseEnter!==null&&y.mouseEnter(x),y.currentTool.standardMouseOver(),Qs(x,a)},Be.prototype.cz=function(a){var y=this.H;if(!y.isEnabled)return!1;var x=Hs(y,a,!0);return y.mouseLeave!==null&&y.mouseLeave(x),Qs(x,a)},Be.prototype.getMouse=function(a){var y=this.ta;if(y===null)return new Gt(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?In(new Gt(y,a),this.Ab):new Gt(y,a)};function bu(a,y,x){var E=a.ta,b=a.Aa,z=a.ya,tt=0,rt=0;E!==null&&(E=E.getBoundingClientRect(),tt=y.clientX-b/E.width*E.left,rt=y.clientY-z/E.height*E.top),x.viewPoint.h(tt,rt),a.Ab!==null?(y=Gt.allocAt(tt,rt),a.Ab.Cd(y),x.documentPoint.assign(y),Gt.free(y)):x.documentPoint.h(tt,rt)}function sf(a,y,x){if(a.oj[0]!==null){y=a.oj[y];var E=a.ta;E!==null&&(E=E.getBoundingClientRect(),x.h(y.clientX-a.Aa/E.width*E.left,y.clientY-a.ya/E.height*E.top))}}Be.prototype.Ya=function(){this.Zi||(this.Zi=!0,this.$b(!1))};function Kf(a){a.ld||fa(a),a.Va()}Be.prototype.redraw=function(){this.vb||this.ld||(this.N(),this.bd())},Ct=Be.prototype,Ct.Pz=function(){return this.kg},Ct.Xy=function(a){a===void 0&&(a=null);var y=this.animationManager,x=y.isEnabled;y.Cc(),y.isEnabled=!1,Ms(this),this.hf=!1,this.du=new Gt(NaN,NaN),y.isEnabled=x,this.ld=!0;var E=this;a!==null&&$n(function(){E.ld=!1,nu(y,"Model"),a(E)},1)},Ct.$b=function(a){if(a===void 0&&(a=!1),this.kg!==!0&&!(this.vb||a===!1&&this.ld)){this.kg=!0;var y=this;Xe.requestAnimationFrame(function(){y.kg&&y.bd()})}},Ct.bd=function(){(!this.fn||this.kg)&&(this.fn&&(this.fn=!1),Ms(this))};function Mh(a,y,x){!a.Ee||a.vb||a.animationManager.defaultAnimation.isAnimating||fd(a)||(y&&fa(a),x&&Js(a,!1))}function Ms(a,y){if(!a.ld&&(a.kg=!1,a.Ka!==null||a.wo.w())){a.ld=!0;var x=a.animationManager,E=a.Xn;if(!x.isAnimating&&E.length!==0){for(var b=E.s,z=b.length,tt=0;tt<z;tt++){var rt=b[tt];Kt(rt,!1),rt.v()}E.clear()}E=a.ow,0<E.count&&(E.each(function(ot){ot.Nv()}),E.clear()),b=E=!1,x.defaultAnimation.isAnimating&&(b=!0,E=a.skipsUndoManager,a.skipsUndoManager=!0),x.zb||ec(a),Mh(a,!1,!0),a.fe!==null&&(a.fe.visible&&!a.mq&&(Hl(a),a.mq=!0),!a.fe.visible&&a.mq&&(a.mq=!1)),fa(a),z=!1,(!a.hf||a.xh)&&(a.hf?ng(a,!a.Jk):(a.Ea("Initial Layout"),x.isEnabled===!1&&x.Cc(),ng(a,!1)),z=!0),a.Jk=!1,fa(a),a.ou||Kf(a),Mh(a,!0,!1),tt=!1,z?(x=Ye.alloc(),x.assign(a.viewportBounds),a.hf||(tt=a.hf=!0,a.skipsUndoManager||(a.undoManager.isPendingClear=!0),a.undoManager.isPendingUnmodified=!0,Zf(a)),a.R("LayoutCompleted"),Mh(a,!0,!1),Ye.free(x)):x.Ok&&x.Qw&&(a.Fg!==Na?a.scale=ud(a,a.Fg):a.yh!==Na?a.scale=ud(a,a.yh):(x=a.initialScale,isFinite(x)&&0<x&&(a.scale=x)),Js(a,!0)),z&&tt&&a.eb("Initial Layout"),fa(a),y||a.gc(a.ib),b&&(a.skipsUndoManager=E),a.ld=!1}}function Zf(a){if(a.Fg!==Na)a.scale=ud(a,a.Fg);else if(a.yh!==Na)a.scale=ud(a,a.yh);else{var y=a.initialScale;isFinite(y)&&0<y&&(a.scale=y)}Js(a,!0),y=a.Wa.s,a.Fd(y,y.length,a,a.viewportBounds),a.R("InitialLayoutCompleted"),a.du.assign(a.pa),Hl(a)}function fa(a){if(a.De.count!==0&&(a.ld||!a.animationManager.isTicking)){for(var y=0;23>y;y++){var x=a.De.iterator;if(x===null||a.De.count===0)break;a.De=new mn,a.Nv(x,a.De)}a.nodes.each(function(E){E instanceof Gi&&E.U&65536&&(E.U=E.U^65536)})}}Ct.Nv=function(a,y){for(a.reset();a.next();){var x=a.value;!x.Zc()||x instanceof Gi||(x.si()?(x.measure(1/0,1/0),x.arrange()):y.add(x))}for(a.reset();a.next();)x=a.value,x instanceof Gi&&x.isVisible()&&ou(this,x);for(a.reset();a.next();)x=a.value,x instanceof En&&x.isVisible()&&(x.si()?(x.measure(1/0,1/0),x.arrange()):y.add(x));for(a.reset();a.next();)x=a.value,x instanceof Pr&&x.isVisible()&&(x.si()?(x.measure(1/0,1/0),x.arrange()):y.add(x))};function ou(a,y){for(var x=Si(),E=Si(),b=y.memberParts;b.next();){var z=b.value;z.isVisible()&&(z instanceof Gi?(Zt(z)||te(z)||cc(z))&&ou(a,z):z instanceof En?z.fromNode===y||z.toNode===y?E.push(z):x.push(z):(z.measure(1/0,1/0),z.arrange()))}for(a=x.length,b=0;b<a;b++)z=x[b],z.measure(1/0,1/0),z.arrange();for(wi(x),y.measure(1/0,1/0),y.arrange(),a=E.length,y=0;y<a;y++)x=E[y],x.measure(1/0,1/0),x.arrange();wi(E)}Ct.Fd=function(a,y,x,E){if(this.vd||this.animationManager.isAnimating)for(var b=0;b<y;b++)a[b].Fd(x,E)},Ct.gc=function(a){if(this.Ka!==null){if(this.ta===null&&pe("No canvas specified"),this.nl==="svg"){if(this.Ka!==null){var y=this.animationManager;if(!y.zb&&(!y.isAnimating||y.isTicking)){cd(this);var x=this.Aa,E=this.ya;if(a.Gv.resize(x,E,x,E),x=this.Wa.s,E=x.length,this.Fd(x,E,this,this.viewportBounds),this.Fc||y.isAnimating){y=this.pa;var b=this.Ca,z=Math.round(y.x*b)/b,tt=Math.round(y.y*b)/b,rt=this.Ab;for(rt.reset(),b!==1&&rt.scale(b),y.x===0&&y.y===0||rt.translate(-z,-tt),a.ti=null,$r(a,rt.m11,rt.m12,rt.m21,rt.m22,rt.dx,rt.dy),this.pb!==1&&(a.globalAlpha=this.pb),_u(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<E;y++)x[y].gc(a,this);a=!1,this.Yf?eh(this.Yf,this)&&(a=this.Vp()):a=!0,a&&(Xi.prototype.Cd=Xi.prototype.Eu),this.Fc=this.vd=!1}}}}else t:if(z=this.animationManager,!z.zb&&(!z.isAnimating||z.isTicking)&&(x=new Date,cd(this),this.Ka.style.opacity!=="0")){if(E=a!==this.ib,y=this.Wa.s,b=y.length,this.Fd(y,b,this,this.viewportBounds),E)a.Vc(!0),this.vd=!0;else if(!this.Fc&&!z.isAnimating)break t;z=this.Ab,z.reset(),tt=this.Mb,rt=this.pa;var ot=this.Ca,st=Math.round(rt.x*ot)/ot,ut=Math.round(rt.y*ot)/ot;for(ot!==1&&z.scale(ot),rt.x===0&&rt.y===0||z.translate(-st,-ut),a.setTransform(tt,0,0,tt,0,0),a.clearRect(0,0,this.Aa,this.ya),this.pb!==1&&(a.globalAlpha=this.pb),_u(this,a),rt=0;rt<b;rt++)a.setTransform(tt,0,0,tt,0,0),a.transform(z.m11,z.m12,z.m21,z.m22,z.dx,z.dy),a.yc(),y[rt].gc(a,this);if(y=!1,this.Yf?eh(this.Yf,this)&&(y=this.Vp()):y=!0,y&&(Xi.prototype.Cd=Xi.prototype.Eu),E?(this.ib.Vc(!0),this.vd=!0):this.Fc=this.vd=!1,y=+new Date-+x,E=di&&di.nx,x=this.zw,E||this.Yh===null){for(x[this.Tq]=y,this.Tq=(this.Tq+1)%x.length,b=y=0;b<x.length;b++)y+=x[b];this.Sq=y/x.length}if(this.pb!==1&&(a.globalAlpha=1),E)for(a.setTransform(1,0,0,1,0,0),E=0;E<x.length;E++)a.fillText(x[E].toString(),20,150+ +(20*E))}}};function lf(a,y,x,E,b,z,tt,rt,ot,st){if(a.Ka!==null){a.ta===null&&pe("No canvas specified"),tt===void 0&&(tt=null),rt===void 0&&(rt=null),ot===void 0&&(ot=!1),st===void 0&&(st=!1),cd(a),a.ib.Vc(!0),a.vd=!0,a.$i=!0;var ut=a.Ca;a.Ca=b;var ft=a.Wa.s,St=ft.length;try{var wt=new Ye(z.x,z.y,E.width/b,E.height/b),Et=wt.copy();Et.Co(x),Hl(a,Et),fa(a),a.Fd(ft,St,a,wt),y.setTransform(1,0,0,1,0,0),y.clearRect(0,0,E.width,E.height),rt!==null&&rt!==""&&(y.fillStyle=rt,y.ox(0,0,E.width,E.height));var Bt=a.Mb;y.scale(Bt,Bt);var Vt=Xi.alloc();Vt.reset(),Vt.translate(x.left,x.top),Vt.scale(b),z.x===0&&z.y===0||Vt.translate(-z.x,-z.y),y.setTransform(Vt.m11,Vt.m12,Vt.m21,Vt.m22,Vt.dx,Vt.dy),y.yc(),y instanceof Tr&&$r(y,Vt.m11,Vt.m12,Vt.m21,Vt.m22,Vt.dx,Vt.dy),Xi.free(Vt),_u(a,y),y.globalAlpha=a.pb;var jt=a.Qj("Grid");if(tt){var _t=new mn,Qt=tt.iterator;for(Qt.reset();Qt.next();){var ie=Qt.value;ie instanceof mi&&(st||ie.layer!==jt)&&(ie.Gj(),_t.add(ie))}for(st=0;st<St;st++)Ug(ft[st],y,a,_t,ot);_t.each(function(ke){return ke.Gj()})}else for(_t=0;_t<St;_t++){var ce=ft[_t];ce===jt?st&&ce.gc(y,a,!0):ce.gc(y,a,ot)}a.$i=!1,a.Yf&&eh(a.Yf,a)&&a.Vp()}finally{a.Ca=ut,a.ib.Vc(!0),a.vd=!0,a.Fd(ft,St,a,a.viewportBounds),Hl(a),a.ib instanceof Tr&&(a.ib.Nj.PA(),a.redraw())}}}Ct.Gf=function(a){return this.Rg[a]},Ct.Xx=function(a,y){a==="minDrawingLength"&&(this.Oq=y),this.Rg[a]=y,this.redraw()},Ct.Tx=function(){this.Rg=new Ni,this.Rg.drawShadows=!0,this.Rg.textGreeking=!0,this.Rg.viewportOptimizations=!(Qi||to),this.Rg.temporaryPixelRatio=!0,this.Rg.pictureRatioOptimization=!0,this.Oq=this.Rg.minDrawingLength=1};function _u(a,y){a=a.Rg,a!==null&&(a.imageSmoothingEnabled!==void 0&&y.Wx(!!a.imageSmoothingEnabled),a=a.defaultFont,a!=null&&(y.font=a))}Ct.Ql=function(a){return this.on[a]},Ct.sA=function(a,y){this.on[a]=y},Ct.Sx=function(){this.on=new Ni,this.on.extraTouchArea=10,this.on.extraTouchThreshold=10,this.on.hasGestureZoom=!0},Ct.set=function(a){return Object.assign(this,a),this},Ct.Du=function(a){return this.nm(a)},Ct.nm=function(a){return dd(this,a),this};function dd(a,y){var x=a instanceof pn,E=a instanceof Be,b;for(b in y){b===""&&pe("Setting properties requires non-empty property names");var z=a,tt=b;if(x||E){var rt=b.indexOf(".");if(0<rt){var ot=b.substring(0,rt);x?z=a.fb(ot):(z=a[ot],z==null&&(z=a.toolManager[ot])),bn(z)?tt=b.substr(rt+1):pe("Unable to find object named: "+ot+" in "+a.toString()+" when trying to set property: "+b)}}if(tt[0]!=="_"&&!ir(z,tt))if(E&&tt==="ModelChanged"){a.Yw(y[tt]);continue}else if(E&&tt==="Changed"){a.Pe(y[tt]);continue}else if(E&&ir(a.toolManager,tt))z=a.toolManager;else if(E&&_g(a,tt)){a.Bj(tt,y[tt]);continue}else if(a instanceof li&&tt==="Changed"){a.Pe(y[tt]);continue}else pe('Trying to set undefined property "'+tt+'" on object: '+z.toString());z[tt]=y[b],tt[0]==="_"&&z instanceof fe&&z.Vw(tt)}}Ct.bx=function(){if(this.Eh.count!==0&&!(1<this.undoManager.transactionLevel)){for(;0<this.Eh.count;){var a=this.Eh;for(this.Eh=new yi,a=a.iterator;a.next();){var y=a.key;y.Xo(a.value),y.qc()}}this.N()}},Ct.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")},Be.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!==ac&&this.rj.hi(0,0,0,0)&&y.width===a.width&&y.height===a.height){var E=this.scale,b=Math.max(a.y,y.y),z=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))*E&&0<Math.max(0,z-b)*E){if(!(this.ld||(this.kg=!1,this.Ka===null||(this.ld=!0,this.documentBounds.w()||(E=Ye.alloc(),tg(this,this.computeBounds(E)),Ye.free(E)),E=this.ta,E===null||E instanceof ar)))){var tt=this.Mb;b=this.Aa*tt;var rt=this.ya*tt,ot=this.scale*tt;z=Math.round(Math.round(y.x*ot)-Math.round(a.x*ot)),y=Math.round(Math.round(y.y*ot)-Math.round(a.y*ot)),ot=this.jw,a=this.oy,ot.width!==b&&(ot.width=b),ot.height!==rt&&(ot.height=rt),a.clearRect(0,0,b,rt),ot=190*tt;var st=70*tt,ut=Math.max(z,0),ft=Math.max(y,0),St=Math.floor(b-ut),wt=Math.floor(rt-ft);a.drawImage(E.Oa,ut,ft,St,wt,0,0,St,wt),eh(this.Yf,this)&&a.clearRect(0,0,ot,st),E=Si(),a=Si(),wt=Math.abs(z),St=Math.abs(y);var Et=ut===0?0:b-wt;ut=Gt.allocAt(Et,0),wt=Gt.allocAt(wt+Et,rt),a.push(new Ye(Math.min(ut.x,wt.x),Math.min(ut.y,wt.y),Math.abs(ut.x-wt.x),Math.abs(ut.y-wt.y)));var Bt=this.Ab;if(Bt.reset(),Bt.scale(tt,tt),this.Ca!==1&&Bt.scale(this.Ca),tt=this.pa,(tt.x!==0||tt.y!==0)&&isFinite(tt.x)&&isFinite(tt.y)&&Bt.translate(-tt.x,-tt.y),In(ut,Bt),In(wt,Bt),E.push(new Ye(Math.min(ut.x,wt.x),Math.min(ut.y,wt.y),Math.abs(ut.x-wt.x),Math.abs(ut.y-wt.y))),Et=ft===0?0:rt-St,ut.h(0,Et),wt.h(b,St+Et),a.push(new Ye(Math.min(ut.x,wt.x),Math.min(ut.y,wt.y),Math.abs(ut.x-wt.x),Math.abs(ut.y-wt.y))),In(ut,Bt),In(wt,Bt),E.push(new Ye(Math.min(ut.x,wt.x),Math.min(ut.y,wt.y),Math.abs(ut.x-wt.x),Math.abs(ut.y-wt.y))),eh(this.Yf,this)&&(b=0<z?0:-z,rt=0<y?0:-y,ut.h(b,rt),wt.h(ot+b,st+rt),a.push(new Ye(Math.min(ut.x,wt.x),Math.min(ut.y,wt.y),Math.abs(ut.x-wt.x),Math.abs(ut.y-wt.y))),In(ut,Bt),In(wt,Bt),E.push(new Ye(Math.min(ut.x,wt.x),Math.min(ut.y,wt.y),Math.abs(ut.x-wt.x),Math.abs(ut.y-wt.y)))),Gt.free(ut),Gt.free(wt),Mh(this,!1,!0),this.Ka===null&&pe("No div specified"),this.ta===null&&pe("No canvas specified"),!this.animationManager.zb&&(b=this.ib,this.Fc)){for(cd(this),rt=this.Mb,b.setTransform(1,0,0,1,0,0),b.clearRect(0,0,this.Aa*rt,this.ya*rt),b.drawImage(this.jw.Oa,0<z?0:Math.round(-z),0<y?0:Math.round(-y)),z=this.pa,tt=this.Ca,ot=Math.round(z.x*tt)/tt,st=Math.round(z.y*tt)/tt,y=this.Ab,y.reset(),tt!==1&&y.scale(tt),z.x===0&&z.y===0||y.translate(-ot,-st),b.save(),b.beginPath(),z=a.length,tt=0;tt<z;tt++)ot=a[tt],ot.width!==0&&ot.height!==0&&b.rect(Math.floor(ot.x),Math.floor(ot.y),Math.ceil(ot.width),Math.ceil(ot.height));for(b.clip(),b.setTransform(rt,0,0,rt,0,0),b.transform(y.m11,y.m12,y.m21,y.m22,y.dx,y.dy),b.yc(),y=this.Wa.s,z=y.length,this.Fd(y,z,this,this.viewportBounds),_u(this,b),b.globalAlpha=this.pb,rt=0;rt<z;rt++)if(tt=y[rt],ot=E,tt.visible&&tt.pb!==0){st=zl(tt,b),ft=tt.Zq,ft.length=0,ut=this.scale,St=Ye.alloc(),wt=tt.Pa.s,Bt=wt.length,Et=ot.length;for(var Vt=0;Vt<Bt;Vt++){var jt=wt[Vt],_t=xf(jt,jt.actualBounds);t:{for(var Qt=2/ut,ie=4/ut,ce=0;ce<Et;ce++){var ke=ot[ce];if(ke.width!==0&&ke.height!==0&&_t.Vu(ke.x-Qt,ke.y-Qt,ke.width+ie,ke.height+ie)){_t=!0;break t}}_t=!1}_t&&tt.Oj(b,jt,this,ft,ut,St,!0)}Ye.free(St),b.globalAlpha=st}b.restore(),b.Vc(!0),this.Yf&&eh(this.Yf,this)&&this.Vp(),this.Fc=this.vd=!1,this.hk()}wi(E),wi(a),this.ld=!1}}else this.bd();x&&(Sa(this),this.bd(),tc(this,!0))}else x?(Sa(this),this.bd(),tc(this,!0)):this.bd()}};function cd(a){a.pn!==!1&&(a.pn=!1,rc(a,a.Aa,a.ya))}function rc(a,y,x){Wl(a);var E=a.Mb;a.ta.resize(y*E,x*E,y,x)&&(a.Fc=!0,a.ib.Vc(!0))}function fd(a){var y=a.ta;if(y===null||a.wo.w())return!0;var x=a.Aa,E=a.ya,b=a.Ka,z=!1,tt=a.gf?a.Db:0,rt=a.Be?a.Db:0,ot=b.clientWidth||x+tt,st=b.clientHeight||E+rt,ut=a.viewportBounds;b=ut.x;var ft=ut.y,St=ut.width,wt=ut.height;if((ot!==x+tt||st!==E+rt)&&(a.gf=!1,a.Be=!1,rt=tt=0,a.Aa=ot,a.ya=st,z=a.pn=!0,Wl(a)),!a.hf||!a.viewportBounds.w())return!0;var Et=a.ku,Bt=a.hu;if(a.Ee=!1,!(z||a.gf||a.Be||a.mn||a.nn))return!0;var Vt=a.documentBounds,jt=0,_t=0,Qt=0,ie=0,ce=ut.width,ke=ut.height,On=a.rj;a.contentAlignment.sb()?(Vt.width>ce&&(jt=On.left,_t=On.right),Vt.height>ke&&(Qt=On.top,ie=On.bottom)):(jt=On.left,_t=On.right,Qt=On.top,ie=On.bottom);var ri=Vt.width+jt+_t,qn=Vt.height+Qt+ie;On=a.scale;var wn=ri>ot/On,tn=qn>st/On;if(!(z||a.gf||a.Be||wn||tn))return!0;jt=Vt.x-jt,ot=ut.x,_t=Vt.right+_t,st=ut.right+tt,Qt=Vt.y-Qt;var ji=ut.y;Vt=Vt.bottom+ie,ut=ut.bottom+rt;var Fi="1px";if(ie="1px",a.scrollMode===$u&&(wn||tn)&&(wn&&a.hasHorizontalScrollbar&&a.allowHorizontalScroll&&(wn=1,jt+1<ot&&(wn=Math.max((ot-jt)*On+a.Aa,wn)),_t>st+1&&(wn=Math.max((_t-st)*On+a.Aa,wn)),ce+tt+1<ri&&(wn=Math.max((ri-ce)*On+a.Aa,wn)),Fi=wn.toString()+"px"),tn&&a.hasVerticalScrollbar&&a.allowVerticalScroll&&(wn=1,Qt+1<ji&&(wn=Math.max((ji-Qt)*On+a.ya,wn)),Vt>ut+1&&(wn=Math.max((Vt-ut)*On+a.ya,wn)),ke+rt+1<qn&&(wn=Math.max((qn-ke)*On+a.ya,wn)),ie=wn.toString()+"px")),wn=Fi!=="1px",tn=ie!=="1px",wn&&tn||!wn&&!tn||(tn&&(st-=a.Db),wn&&(ut-=a.Db),ri<ce+tt||!a.hasHorizontalScrollbar||!a.allowHorizontalScroll||(tt=1,jt+1<ot&&(tt=Math.max((ot-jt)*On+a.Aa,tt)),_t>st+1&&(tt=Math.max((_t-st)*On+a.Aa,tt)),ce+1<ri&&(tt=Math.max((ri-ce)*On+a.Aa,tt)),Fi=tt.toString()+"px"),wn=Fi!=="1px",tt=a.ya,wn!==a.Be&&(tt=wn?a.ya-a.Db:a.ya+a.Db),qn<ke+rt||!a.hasVerticalScrollbar||!a.allowVerticalScroll||(rt=1,Qt+1<ji&&(rt=Math.max((ji-Qt)*On+tt,rt)),Vt>ut+1&&(rt=Math.max((Vt-ut)*On+tt,rt)),ke+1<qn&&(rt=Math.max((qn-ke)*On+tt,rt)),ie=rt.toString()+"px"),tn=ie!=="1px"),a.qr&&wn===a.Be&&tn===a.gf)return x===a.Aa&&E===a.ya||a.bd(),!1;if(wn!==a.Be&&(Fi==="1px"?a.ya=a.ya+a.Db:a.ya=Math.max(a.ya-a.Db,1),z=!0),a.Be=wn,Bt.style.width=Fi,tn!==a.gf&&(ie==="1px"?a.Aa=a.Aa+a.Db:a.Aa=Math.max(a.Aa-a.Db,1),z=!0,a.tn&&(rt=Gt.alloc(),tn?(y.style.left=a.Db+"px",a.position=rt.h(a.pa.x+a.Db/a.scale,a.pa.y)):(y.style.left="0px",a.position=rt.h(a.pa.x-a.Db/a.scale,a.pa.y)),Gt.free(rt))),z&&Wl(a),a.gf=tn,Bt.style.height=ie,a.gu=!0,z&&(a.pn=!0),y=Et.scrollLeft,a.hasHorizontalScrollbar&&a.allowHorizontalScroll&&(ce+1<ri?y=(a.position.x-jt)*On:jt+1<ot?y=Et.scrollWidth-Et.clientWidth:_t>st+1&&(y=a.position.x*On)),a.tn)switch(a.bu){case"negative":y=-(Et.scrollWidth-y-Et.clientWidth);break;case"reverse":y=Et.scrollWidth-y-Et.clientWidth}return Et.scrollLeft=y,a.hasVerticalScrollbar&&a.allowVerticalScroll&&(ke+1<qn?Et.scrollTop=(a.position.y-Qt)*On:Qt+1<ji?Et.scrollTop=Et.scrollHeight-Et.clientHeight:Vt>ut+1&&(Et.scrollTop=a.position.y*On)),ot=a.Aa,st=a.ya,Et.style.width=ot+(a.gf?a.Db:0)+"px",Et.style.height=st+(a.Be?a.Db:0)+"px",x!==ot||E!==st||a.animationManager.zb?(x=Ye.allocAt(b,ft,St,wt),a.onViewportBoundsChanged(x,a.viewportBounds,On,z),Ye.free(x),!1):!0}Ct=Be.prototype,Ct.add=function(a){var y=a.diagram;if(y!==this&&(y!==null&&pe("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&&pe('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(Eo,"parts",y,null,a,null,x),y.isTemporary||this.Ya(),a.C(1),x=a.layerChanged,x!==null&&x(a,null,y)}},Ct.oi=function(a){this.partManager.oi(a);var y=this;vf(a,function(x){gd(y,x)}),(a instanceof Pr||a instanceof Gi&&a.placeholder!==null)&&a.v(),a.data!==null&&vf(a,function(x){vy(y.partManager,x)}),te(a)!==!0&&cc(a)!==!0||this.De.add(a),j1(a,!0,this),G1(a)?(a.actualBounds.w()&&this.N(xf(a,a.actualBounds)),this.Ya()):a.isVisible()&&a.actualBounds.w()&&this.N(xf(a,a.actualBounds)),this.$b()},Ct.pc=function(a){a.Ej(),this.partManager.pc(a);var y=this;a.data!==null&&vf(a,function(x){yy(y.partManager,x,y)}),this.De.remove(a),G1(a)?(a.actualBounds.w()&&this.N(xf(a,a.actualBounds)),this.Ya()):a.isVisible()&&a.actualBounds.w()&&this.N(xf(a,a.actualBounds)),this.$b()},Ct.remove=function(a){Yf(this,a,!0)};function Yf(a,y,x){var E=y.layer;E!==null&&E.diagram===a&&(y.isSelected=!1,y.isHighlighted=!1,y.C(2),x&&y.Lj(),x=E.pc(-1,y,!1),0<=x&&a.cb(zo,"parts",E,y,null,x,null),a=y.layerChanged,a!==null&&a(y,E,null))}Ct.Is=function(a,y){if(y===void 0&&(y=!1),Mn(a))for(var x=a.length,E=0;E<x;E++){var b=a[E];y&&!b.canDelete()||this.remove(b)}else for(x=new mn,x.addAll(a),a=x.iterator;a.next();)x=a.value,y&&!x.canDelete()||this.remove(x)},Ct.Kj=function(a,y,x){return x===void 0&&(x=!1),this.partManager.Kj(a,y,x)},Be.prototype.moveParts=function(a,y,x,E){if(x===void 0&&(x=!1),E===void 0&&(E=uf(this)),this.toolManager!==null){var b=new yi;if(a!==null)if(Mn(a))for(var z=0;z<a.length;z++)au(this,b,a[z],x,E);else for(a=a.iterator;a.next();)au(this,b,a.value,x,E);else{for(a=this.parts;a.next();)au(this,b,a.value,x,E);for(a=this.nodes;a.next();)au(this,b,a.value,x,E);for(a=this.links;a.next();)au(this,b,a.value,x,E)}Ah(this,b,y,E,x)}};function au(a,y,x,E,b,z){if(!y.contains(x)&&(z===void 0&&(z=!1),!E||z||x.canMove()||x.canCopy()))if(b===void 0&&(b=uf(a)),x instanceof Vn){if(y.add(x,a.Pd(b,x,x.location)),x instanceof Gi&&(x.placeholder!==null||b.dragsMembers))for(z=x.memberParts;z.next();)au(a,y,z.value,E,b,b.groupsAlwaysMove);for(z=x.linksConnected;z.next();){var tt=z.value;if(!y.contains(tt)){var rt=tt.fromNode,ot=tt.toNode;rt!==null&&y.contains(rt)&&ot!==null&&y.contains(ot)&&au(a,y,tt,E,b)}}if(b.dragsTree)for(x=x.Ou();x.next();)au(a,y,x.value,E,b)}else if(x instanceof En)for(y.add(x,a.Pd(b,x)),x=x.labelNodes;x.next();)au(a,y,x.value,E,b);else x instanceof Pr||y.add(x,a.Pd(b,x,x.location))}function Ah(a,y,x,E,b){if(y!==null&&y.count!==0){var z=Gt.alloc(),tt=Gt.alloc();tt.assign(x),isNaN(tt.x)&&(tt.x=0),isNaN(tt.y)&&(tt.y=0),(x=a.Mr)||df(a,y);for(var rt=Si(),ot=Si(),st=y.iterator,ut=Gt.alloc();st.next();){var ft=st.key,St=st.value;if(ft.Zc()){var wt=Xf(a,ft,y);wt!==null?rt.push(new it(ft,St,wt)):(!b||ft.canMove())&&(wt=St.point,z.assign(wt),a.computeMove(ft,z.add(tt),E,ut),ft.location=ut,St.shifted===void 0&&(St.shifted=new Gt),St.shifted.assign(ut.re(wt)))}else st.key instanceof En&&ot.push(st.sa)}for(Gt.free(ut),b=rt.length,st=0;st<b;st++)ft=rt[st],z.assign(ft.info.point),ft.Su.shifted===void 0&&(ft.Su.shifted=new Gt),ft.node.location=z.add(ft.Su.shifted);for(b=Gt.alloc(),st=Gt.alloc(),ft=ot.length,St=0;St<ft;St++){var Et=ot[St];if(wt=Et.key,wt instanceof En)if(wt.suspendsRouting){wt.Tg=null,ut=wt.fromNode;var Bt=wt.toNode;if(a.draggedLink!==null&&E.dragsLink)if(Bt=Et.value.point,wt.dragComputation===null)y.add(wt,a.Pd(E,wt,tt)),Cd(wt,tt.x-Bt.x,tt.y-Bt.y);else{Et=Gt.allocAt(0,0),(ut=wt.i(0))&&ut.w()&&Et.assign(ut);var Vt=ut=Gt.alloc().assign(Et).add(tt);E.isGridSnapEnabled&&(E.isGridSnapRealtime||a.lastInput.up)&&(Vt=Gt.alloc(),hf(a,wt,ut,Vt,E)),ut.assign(wt.dragComputation(wt,ut,Vt)).re(Et),y.add(wt,a.Pd(E,wt,ut)),Cd(wt,ut.x-Bt.x,ut.y-Bt.y),Gt.free(Et),Gt.free(ut),Vt!==ut&&Gt.free(Vt)}else ut!==null&&(b.assign(ut.location),Vt=y.I(ut),Vt!==null&&b.re(Vt.point)),Bt!==null&&(st.assign(Bt.location),Vt=y.I(Bt),Vt!==null&&st.re(Vt.point)),ut!==null&&Bt!==null?b.Xa(st)?(ut=Et.value.point,Bt=z,Bt.assign(b),Bt.re(ut),y.add(wt,a.Pd(E,wt,b)),Cd(wt,Bt.x,Bt.y)):(wt.suspendsRouting=!1,wt.bb()):(Et=Et.value.point,ut=ut!==null?b:Bt!==null?st:tt,y.add(wt,a.Pd(E,wt,ut)),Cd(wt,ut.x-Et.x,ut.y-Et.y))}else(wt.fromNode===null||wt.toNode===null)&&(ut=Et.value.point,y.add(wt,a.Pd(E,wt,tt)),Cd(wt,tt.x-ut.x,tt.y-ut.y))}Gt.free(z),Gt.free(tt),Gt.free(b),Gt.free(st),wi(rt),wi(ot),x||(fa(a),Ju(a,y))}}Be.prototype.computeMove=function(a,y,x,E){if(E===void 0&&(E=new Gt),E.assign(y),a===null)return E;var b=y,z=x.isGridSnapEnabled;z&&(x.isGridSnapRealtime||this.lastInput.up)&&(b=Gt.alloc(),hf(this,a,y,b,x)),x=a.dragComputation!==null?a.dragComputation(a,y,b):b;var tt=a.minLocation,rt=tt.x;isNaN(rt)&&(rt=z?Math.round(1e3*a.location.x)/1e3:a.location.x),tt=tt.y,isNaN(tt)&&(tt=z?Math.round(1e3*a.location.y)/1e3:a.location.y);var ot=a.maxLocation,st=ot.x;return isNaN(st)&&(st=z?Math.round(1e3*a.location.x)/1e3:a.location.x),ot=ot.y,isNaN(ot)&&(ot=z?Math.round(1e3*a.location.y)/1e3:a.location.y),E.h(Math.max(rt,Math.min(x.x,st)),Math.max(tt,Math.min(x.y,ot))),b!==y&&Gt.free(b),E};function uf(a){var y=a.toolManager.findTool("Dragging");return y!==null?y.dragOptions:a.Wm}function hf(a,y,x,E,b){if(b===void 0&&(b=uf(a)),E.assign(x),y!==null){var z=a.grid;y=b.gridSnapCellSize,a=y.width,y=y.height;var tt=b.gridSnapOrigin,rt=tt.x;if(tt=tt.y,b=b.gridSnapCellSpot,z!==null){var ot=z.gridCellSize;isNaN(a)&&(a=ot.width),isNaN(y)&&(y=ot.height),z=z.gridOrigin,isNaN(rt)&&(rt=z.x),isNaN(tt)&&(tt=z.y)}z=Gt.allocAt(0,0),z.yi(0,0,a,y,b),Se.No(x.x,x.y,rt+z.x,tt+z.y,a,y,E),Gt.free(z)}}function df(a,y){if(y!==null)for(a.Mr=!0,a=y.iterator;a.next();)y=a.key,y instanceof En&&(y.suspendsRouting=!0)}function Ju(a,y){if(y!==null){for(y=y.iterator;y.next();){var x=y.key;x instanceof En&&(x.suspendsRouting=!1,iy(x)&&x.bb())}a.Mr=!1}}function Xf(a,y,x){return y=y.containingGroup,y!==null&&(a=Xf(a,y,x),a!==null||(a=x.I(y),a!==null))?a:null}Ct=Be.prototype,Ct.Pd=function(a,y,x){if(x===void 0)return new su(Fo);var E=a.isGridSnapEnabled;return a.groupsSnapMembers||y.containingGroup===null||(E=!1),E?new su(new Gt(Math.round(1e3*x.x)/1e3,Math.round(1e3*x.y)/1e3)):new su(x.copy())};function _f(a,y,x){if(y.diagram!==null&&y.diagram!==a&&pe("Cannot share a Layer with another Diagram: "+y+" of "+y.diagram),x===null?y.diagram!==null&&pe("Cannot add an existing Layer to this Diagram again: "+y):(x.diagram!==a&&pe("Existing Layer must be in this Diagram: "+x+" not in "+x.diagram),y===x&&pe("Cannot move a Layer before or after itself: "+y)),y.diagram!==a){y=y.name,a=a.Wa,x=a.count;for(var E=0;E<x;E++)a.M(E).name===y&&pe("Cannot add Layer with the name '"+y+"'; a Layer with the same name is already present in this Diagram.")}}Ct.Al=function(a){_f(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(Eo,"layers",this,null,a,null,x+1),this.N(),this.Ya(),this},Ct.Ww=function(a,y){_f(this,a,y),a.Xe(this);var x=this.Wa,E=x.indexOf(a);0<=E&&(x.remove(a),this.cc!==null&&this.cb(zo,"layers",this,a,null,E,null));var b=x.count,z;for(z=0;z<b;z++)if(x.M(z)===y){x.Gb(z,a);break}return this.cc!==null&&this.cb(Eo,"layers",this,null,a,null,z),this.N(),0>E&&this.Ya(),this},Ct.Cy=function(a,y){_f(this,a,y),a.Xe(this);var x=this.Wa,E=x.indexOf(a);0<=E&&(x.remove(a),this.cc!==null&&this.cb(zo,"layers",this,a,null,E,null));var b=x.count,z;for(z=0;z<b;z++)if(x.M(z)===y){x.Gb(z+1,a);break}return this.cc!==null&&this.cb(Eo,"layers",this,null,a,null,z+1),this.N(),0>E&&this.Ya(),this},Ct.kA=function(a){if(a.diagram!==this&&pe("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 E=y.value,b=E.layerName;b!==a.name?E.layerName=b:E.layerName=""}this.cc!==null&&this.cb(zo,"layers",this,a,null,x,null),this.N(),this.Ya()}}},Ct.Qj=function(a){for(var y=this.layers;y.next();){var x=y.value;if(x.name===a)return x}return null},Ct.Yw=function(a){return this.pf===null&&(this.pf=new yn),this.pf.add(a),this.model.Pe(a),this},Ct.mA=function(a){this.pf!==null&&(this.pf.remove(a),this.pf.count===0&&(this.pf=null)),this.model.ik(a)},Ct.Pe=function(a){return this.zg===null&&(this.zg=new yn),this.zg.add(a),this},Ct.ik=function(a){this.zg!==null&&(this.zg.remove(a),this.zg.count===0&&(this.zg=null))},Ct.ds=function(a){if(this.skipsUndoManager||this.model.skipsUndoManager||this.model.undoManager.Tu(a),a.change!==hs&&(this.isModified=!0),this.zg!==null)for(var y=this.zg,x=y.length,E=0;E<x;E++)y.M(E)(a)},Ct.cb=function(a,y,x,E,b,z,tt){z===void 0&&(z=null),tt===void 0&&(tt=null);var rt=new oo;rt.diagram=this,rt.change=a,rt.propertyName=y,rt.object=x,rt.oldValue=E,rt.oldParam=z,rt.newValue=b,rt.newParam=tt,this.ds(rt)},Ct.g=function(a,y,x,E,b){this.cb(io,a,this,y,x,E,b)},Be.prototype.changeState=function(a,y){if(a!==null&&a.diagram===this){var x=this.skipsModelSourceBindings;try{this.skipsModelSourceBindings=!0;var E=a.change;if(E===io){var b=a.object;if(no(b,a.propertyName,a.I(y)),b instanceof fe){var z=b.part;z!==null&&z.Wb()}this.isModified=!0}else if(E===Eo){var tt=a.object,rt=a.newParam,ot=a.newValue;if(tt instanceof pn)if(typeof rt=="number"&&ot instanceof fe){y?tt.pc(rt):tt.Gb(rt,ot);var st=tt.part;st!==null&&st.Wb()}else typeof rt=="number"&&ot instanceof Vo&&(ot.isRow?d1(tt,rt,y?void 0:ot):c1(tt,rt,y?void 0:ot));else if(tt instanceof qo){var ut=a.oldParam===!0;typeof rt=="number"&&ot instanceof mi&&(y?(ot.isSelected=!1,ot.isHighlighted=!1,ot.Wb(),tt.pc(ut?rt:-1,ot,ut)):tt.oi(rt,ot,ut))}else tt instanceof Be?typeof rt=="number"&&ot instanceof qo&&(y?this.Wa.mb(rt):(ot.Xe(this),this.Wa.Gb(rt,ot))):pe("unknown ChangedEvent.Insert object: "+a.toString());this.isModified=!0}else if(E===zo){var ft=a.object,St=a.oldParam,wt=a.oldValue;if(ft instanceof pn)typeof St=="number"&&wt instanceof fe?y?ft.Gb(St,wt):ft.pc(St):typeof St=="number"&&wt instanceof Vo&&(wt.isRow?d1(ft,St,y?wt:void 0):c1(ft,St,y?wt:void 0));else if(ft instanceof qo){var Et=a.newParam===!0;typeof St=="number"&&wt instanceof mi&&(y?0>ft.Pa.indexOf(wt)&&ft.oi(St,wt,Et):(wt.isSelected=!1,wt.isHighlighted=!1,wt.Wb(),ft.pc(Et?St:-1,wt,Et)))}else ft instanceof Be?typeof St=="number"&&wt instanceof qo&&(y?(wt.Xe(this),this.Wa.Gb(St,wt)):this.Wa.mb(St)):pe("unknown ChangedEvent.Remove object: "+a.toString());this.isModified=!0}else E!==hs&&pe("unknown ChangedEvent: "+a.toString())}finally{this.skipsModelSourceBindings=x}}},Be.prototype.Ea=function(a){return this.undoManager.Ea(a)},Be.prototype.eb=function(a){return this.undoManager.eb(a)},Be.prototype.Kf=function(){return this.undoManager.Kf()},Be.prototype.commit=function(a,y){y===void 0&&(y="");var x=this.skipsUndoManager;y===null&&(this.skipsUndoManager=!0,y=""),this.undoManager.Ea(y);var E=!1;try{a(this),E=!0}finally{E?this.undoManager.eb(y):this.undoManager.Kf(),this.skipsUndoManager=x}},Be.prototype.updateAllTargetBindings=function(a){this.partManager.updateAllTargetBindings(a)},Be.prototype.rp=function(){this.partManager.rp()};function Jf(a,y,x){var E=a.animationManager;if(a.vb||a.ld)a.Ca=x,Wl(a),a.N(),a.Ee=!0,E.zb&&(iu(E)||E.ce.add(E.H,"scale",y,a.Ca));else if(a.ta===null)a.Ca=x,Wl(a);else{a.vb=!0;var b=a.viewportBounds.copy(),z=a.Aa,tt=a.ya,rt=a.zoomPoint.x,ot=a.zoomPoint.y,st=a.contentAlignment;isNaN(rt)&&(st.$c()?st.Hf(gh)?rt=0:st.Hf(js)&&(rt=z-1):rt=st.sb()?st.x*(z-1):z/2),isNaN(ot)&&(st.$c()?st.Hf(Pu)?ot=0:st.Hf(Ps)&&(ot=tt-1):ot=st.sb()?st.y*(tt-1):tt/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),z=Gt.allocAt(a.pa.x+rt/y-rt/x,a.pa.y+ot/y-ot/x),a.position=z,Gt.free(z),a.Ca=x,Wl(a),a.vb=!1,a.onViewportBoundsChanged(b,a.viewportBounds,y,!1),Js(a,!1),E.zb&&(iu(E)||E.ce.add(E.H,"scale",y,a.Ca))}}Be.prototype.onViewportBoundsChanged=function(a,y,x,E){if(!a.D(y)){E===void 0&&(E=!1),E||(this.Ee=!0),this.vd=!0;var b=this.layout;b===null||!b.isViewportSized||this.autoScale!==Na||a.width===y.width&&a.height===y.height||b.C(),b=this.currentTool,this.Vk===!0&&b instanceof qr&&(this.lastInput.documentPoint=this.Ps(this.lastInput.viewPoint),Rg(b,this)),this.vb||this.invalidateViewport(a,y),Hl(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=E,this.R("ViewportBoundsChanged",this.fc,a),this.isVirtualized&&this.links.each(function(z){z.isAvoiding&&z.actualBounds.Yc(y)&&z.bb()})}};function Hl(a,y){var x=a.fe;if(x!==null&&x.visible){for(var E=Re.alloc(),b=1,z=1,tt=x.O.s,rt=tt.length,ot=0;ot<rt;ot++){var st=tt[ot],ut=Math.abs(st.interval);2>ut||(bv(st.figure)?z=z*ut/Se.vx(z,ut):b=b*ut/Se.vx(b,ut))}if(tt=x.gridCellSize,E.h(z*tt.width,b*tt.height),y!==void 0)b=y.width,z=y.height,a=y.x,tt=y.y;else{if(y=Ye.alloc(),a=a.viewportBounds,y.h(a.x,a.y,a.width,a.height),!y.w()){Ye.free(y);return}b=y.width,z=y.height,a=y.x,tt=y.y,Ye.free(y)}x.width=b+2*E.width,x.height=z+2*E.height,y=Gt.alloc(),Se.No(a,tt,0,0,E.width,E.height,y),y.offset(-E.width,-E.height),Re.free(E),x.part.location=y,Gt.free(y)}}Be.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(),E=x.length,b=0;b<E;b++)x[b].isSelected=!1;y.ka(),y.clear(),y.freeze(),a||this.R("ChangedSelection",y)}},Be.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))},Be.prototype.rA=function(a){if(this.R("ChangingSelection",this.selection),this.clearSelection(!0),Mn(a))for(var y=a.length,x=0;x<y;x++){var E=a[x];E instanceof mi||pe("Diagram.selectCollection given something that is not a Part: "+E),E.isSelected=!0}else for(a=a.iterator;a.next();)y=a.value,y instanceof mi||pe("Diagram.selectCollection given something that is not a Part: "+y),y.isSelected=!0;this.R("ChangedSelection",this.selection)},Be.prototype.clearHighlighteds=function(){var a=this.highlighteds;if(0<a.count){for(var y=a.Fa(),x=y.length,E=0;E<x;E++)y[E].isHighlighted=!1;a.ka(),a.clear(),a.freeze()}},Ct=Be.prototype,Ct.Iz=function(a){a!==null&&a.diagram===this&&(!a.isHighlighted||1<this.highlighteds.count)&&(this.clearHighlighteds(),a.isHighlighted=!0)},Ct.Jz=function(a){a=new mn().addAll(a);for(var y=this.highlighteds.copy().hp(a).iterator;y.next();)y.value.isHighlighted=!1;for(a=a.iterator;a.next();)y=a.value,y instanceof mi||pe("Diagram.highlightCollection given something that is not a Part: "+y),y.isHighlighted=!0},Ct.scroll=function(a,y,x){x===void 0&&(x=1);var E=y==="up"||y==="down",b=0,z=Gt.alloc();if(a==="pixel")b=x;else if(a==="line")b=x*(E?this.scrollVerticalLineChange:this.scrollHorizontalLineChange);else if(a==="page")a=E?this.viewportBounds.height:this.viewportBounds.width,a*=this.scale,a!==0&&(b=x*Math.max(a-(E?this.scrollVerticalLineChange:this.scrollHorizontalLineChange),0));else{if(a==="document"){b=this.documentBounds,x=this.viewportBounds,y==="up"?this.position=z.h(x.x,b.y):y==="left"?this.position=z.h(b.x,x.y):y==="down"?this.position=z.h(x.x,b.bottom-x.height):y==="right"&&(this.position=z.h(b.right-x.width,x.y)),Gt.free(z);return}pe("scrolling unit must be 'pixel', 'line', 'page', or 'document', not: "+a)}b/=this.scale,x=this.position,y==="up"?this.position=z.h(x.x,x.y-b):y==="down"?this.position=z.h(x.x,x.y+b):y==="left"?this.position=z.h(x.x-b,x.y):y==="right"?this.position=z.h(x.x+b,x.y):pe("scrolling direction must be 'up', 'down', 'left', or 'right', not: "+y),Gt.free(z)},Ct.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)},Ct.es=function(a){var y=this.viewportBounds;a=a.center,a.x-=y.width/2,a.y-=y.height/2,this.position=a},Ct.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)},Ct.zA=function(a){var y=this.Ab,x=a.x,E=a.y,b=x+a.width,z=E+a.height,tt=y.m11,rt=y.m12,ot=y.m21,st=y.m22,ut=y.dx,ft=y.dy,St=x*tt+E*ot+ut;y=x*rt+E*st+ft;var wt=b*tt+E*ot+ut;return a=b*rt+E*st+ft,E=x*tt+z*ot+ut,x=x*rt+z*st+ft,tt=b*tt+z*ot+ut,b=b*rt+z*st+ft,z=Math.min(St,wt),St=Math.max(St,wt),wt=Math.min(y,a),y=Math.max(y,a),z=Math.min(z,E),St=Math.max(St,E),wt=Math.min(wt,x),y=Math.max(y,x),z=Math.min(z,tt),St=Math.max(St,tt),wt=Math.min(wt,b),y=Math.max(y,b),new Ye(z,wt,St-z,y-wt)},Ct.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),In(a.copy(),this.Ab)};function Qf(a){var y=a.isModified;a.Tw!==y&&(a.Tw=y,a.R("Modified"))}function qf(a){return a=gf.get(a),a!==null?new a:new jr}Be.prototype.doModelChanged=function(a){var y=this;if(a.model===this.model){var x=a.change,E=a.propertyName;if(x===hs&&E[0]==="S")if(E==="StartingFirstTransaction"){var b=this;a=this.toolManager,a.mouseDownTools.each(function(ot){return ot.diagram=b}),a.mouseMoveTools.each(function(ot){return ot.diagram=b}),a.mouseUpTools.each(function(ot){return ot.diagram=b}),this.ld||this.hf||(this.Jk=!0,this.fn&&(this.kg=!0))}else E==="StartingUndo"||E==="StartingRedo"?(a=this.animationManager,a.defaultAnimation.isAnimating&&!this.skipsUndoManager&&a.Cc(),this.R("ChangingSelection",this.selection)):E==="StartedTransaction"&&(a=this.animationManager,a.defaultAnimation.isAnimating&&!this.skipsUndoManager&&a.Cc());else if(this.aa){this.aa=!1;try{if(a.modelChange===""&&x===hs){(E==="FinishedUndo"||E==="FinishedRedo")&&(this.R("ChangedSelection",this.selection),fa(this));var z=this.animationManager;E==="RolledBackTransaction"&&z.Cc(),this.bx(),this.Jk=!0,this.bd(),this.undoManager.transactionLevel!==0&&this.undoManager.transactionLevel!==1||_c(z),E==="CommittedTransaction"&&this.undoManager.isJustDiscarded&&(this.Ce=Math.min(this.Ce,this.undoManager.historyIndex-1)),E!=="CommittedTransaction"&&E!=="RolledBackTransaction"||!this.undoManager.isPendingUnmodified||setTimeout(function(){y.isModified=!1},1);var tt=a.isTransactionFinished;if(tt&&(Qf(this),this.As.clear(),Wg(this.animationManager)),!this.Rt&&tt&&this.lastInput.targetDiagram){this.Rt=!0;var rt=this;$n(function(){rt.currentTool.standardMouseOver(),rt.Rt=!1},10)}}}finally{this.aa=!0}}}};function gd(a,y){y=y.O.s;for(var x=y.length,E=0;E<x;E++)Fh(a,y[E])}function Fh(a,y){if(y instanceof ms){var x=y.element;if(x!==null&&x instanceof HTMLImageElement){x.Bg instanceof mn&&x.Bg.add(a);var E=y.Eg;if(E!==null&&E.sq===!0&&y.diagram!==null&&y.diagram.Xn.add(y),x.hn)if(x=x.getAttribute("src")||"",E=a.Og.I(x),E===null)E=[],E.push(y),a.Og.add(x,E);else{for(a=0;a<E.length;a++)if(E[a]===y)return;E.push(y)}}}}function $f(a,y){if(y instanceof ms){var x=y.element;if(x!==null&&x instanceof HTMLImageElement&&x.hn){var E=x.getAttribute("src")||"",b=a.Og.I(E);if(b!==null){for(var z=0;z<b.length;z++)if(b[z]===y){b.splice(z,1),b.length===0&&(a.Og.remove(E),x.Fq&&x.removeEventListener("load",x.Fq),x.Yp&&x.removeEventListener("error",x.Yp),delete x.Fq,delete x.Yp,x.Bg instanceof mn&&x.Bg.remove(a),up(E));break}}}}}Be.prototype.Wd=function(){this.partManager.Wd()},Be.prototype.Aj=function(a,y){this.Yd.Aj(a,y)},Be.prototype.Cj=function(a,y){this.Yd.Cj(a,y)},Be.prototype.findPartForKey=function(a){return this.partManager.findPartForKey(a)},Be.prototype.Vb=function(a){return this.partManager.Vb(a)},Be.prototype.findLinkForKey=function(a){return this.partManager.findLinkForKey(a)},Ct=Be.prototype,Ct.Lc=function(a){return this.partManager.Lc(a)},Ct.ii=function(a){return this.partManager.ii(a)},Ct.Kc=function(a){return this.partManager.Kc(a)},Ct.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:ze(Ci(y)))},Ct.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:ze(Ci(y)))};function Wl(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 tg(a,y){a.Zi=!1;var x=a.Sp;x.D(y)||(x=x.copy(),a.Sp.assign(y),Js(a,!1),a.R("DocumentBoundsChanged",void 0,x),a.Ee=!0,a.N())}Ct.Va=function(){if(this.Zi){var a=Ye.alloc();tg(this,this.computeBounds(a)),Ye.free(a)}},Ct.rz=function(){for(var a=new mn,y=this.nodes;y.next();){var x=y.value;x.isTopLevel&&a.add(x)}for(y=this.links;y.next();)x=y.value,x.isTopLevel&&a.add(x);return a.iterator},Ct.qz=function(){return this.ai.iterator},Ct.Uz=function(a){fa(this),a&&Bh(this,!0),this.ld?ng(this,!1):(this.Jk=!0,Ms(this))};function Bh(a,y){for(var x=a.ai.iterator;x.next();)eg(a,x.value,y);a.layout&&(y?a.layout.isValidLayout=!1:a.layout.C())}function eg(a,y,x){if(y!==null){for(var E=y.gl.iterator;E.next();)eg(a,E.value,x);y.layout!==null&&(x?y.layout.isValidLayout=!1:y.layout.C())}}function ng(a,y){if(a.xh&&!a.lt){var x=a.aa;a.aa=!0;var E=a.undoManager.transactionLevel,b=a.layout,z=a.animationManager;try{E===0&&(a.undoManager.isInternalTransaction=!0,a.Ea("Layout")),1>=E&&!z.defaultAnimation.isAnimating&&!z.zb&&(y||nu(z,"Layout")),a.xh=!1;for(var tt=a.ai.iterator;tt.next();)ig(a,tt.value,y,E);b.isValidLayout||(!y||b.isRealtime||b.isRealtime===null||E===0?(b.doLayout(a),fa(a),b.isValidLayout=!0):a.xh=!0)}finally{y=a.undoManager.isInternalTransaction,E===0&&(a.eb("Layout"),a.undoManager.isInternalTransaction=!1),!y||E!==0&&E!==1||_c(z),a.aa=x}}}function ig(a,y,x,E){if(y!==null){for(var b=y.gl.iterator;b.next();)ig(a,b.value,x,E);b=y.layout,b===null||b.isValidLayout||(!x||b.isRealtime||E===0?(y.rh=!y.location.w(),b.doLayout(y),y.C(32),ou(a,y),b.isValidLayout=!0):a.xh=!0)}}Ct.yz=function(){for(var a=new yn,y=this.nodes;y.next();){var x=y.value;x.isTopLevel&&x.kh()===null&&a.add(x)}return a.iterator};function Hp(a){function y(b){var z=b.toLowerCase(),tt=new yn;x.add(b,tt),x.add(z,tt),E.add(b,b),E.add(z,b)}var x=new yi,E=new yi;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=E}function _g(a,y){var x=a.hw.I(y);return x!==null?x:a.hw.I(y.toLowerCase())}function Qu(a,y){var x=a.iw.I(y);if(x!==null||(x=a.iw.I(y.toLowerCase()),x!==null))return x;pe("Unknown DiagramEvent name: "+y)}Ct.Bj=function(a,y){return a=Qu(this,a),a!==null&&a.add(y),this},Ct.am=function(a,y){a=Qu(this,a),a!==null&&a.remove(y)},Ct.R=function(a,y,x){var E=Qu(this,a),b=new Ou;if(b.diagram=this,a=_g(this,a),a!==null&&(b.name=a),y!==void 0&&(b.subject=y),x!==void 0&&(b.parameter=x),y=E.length,y===1)E.M(0)(b);else if(y!==0)for(E=E.Fa(),x=0;x<y;x++)(0,E[x])(b)};function cf(a){if(a.animationManager.isTicking)return!1;var y=a.currentTool;return y===a.toolManager.findTool("Dragging")?!a.Mr||y.isComplexRoutingRealtime:!0}Ct.Yj=function(a,y){return oc(this,!1,null,y||null).Yj(a.x,a.y,a.width,a.height)},Be.prototype.computeOccupiedArea=function(a){return this.isVirtualized?this.viewportBounds.copy():this.Zi?of(this,a):a.assign(this.documentBounds)};function oc(a,y,x,E){var b=a.Xh;if(b===null&&(a.Xh=b=new sm(a.avoidanceCellSize)),b.vs||b.group!==x||b.Yx!==E){if(b.Hx=Math.max(b.Os+1,Math.floor(a.avoidanceLimit/a.avoidanceCellSize.width)),b.Ix=Math.max(b.Os+1,Math.floor(a.avoidanceLimit/a.avoidanceCellSize.height)),x!==null&&(x=Jg(a,x)),x===null){y=Ye.alloc(),a.computeOccupiedArea(y),y.Bc(100,100),b.initialize(y);for(var z=a.nodes;z.next();){var tt=z.value,rt=tt.layer;rt!==null&&rt.visible&&!rt.isTemporary&&ff(a,tt,E,y)}Ye.free(y)}else{for(0<x.memberParts.count&&(y=a.computePartsBounds(x.memberParts,!1),y.Bc(20,20),b.initialize(y)),y=Ye.alloc(),z=x.memberParts;z.next();)tt=z.value,tt instanceof Vn&&ff(a,tt,E,y);Ye.free(y)}b.group=x,b.Yx=E,b.vs=!1}else y&&oS(b);return b}function Jg(a,y){return y.avoidable&&!y.isLinkLabel?y:y.containingGroup!==null?Jg(a,y.containingGroup):null}function ff(a,y,x,E){if(y!==x&&y.isVisible()){if(y.avoidable&&!y.isLinkLabel){y=y.getAvoidableRect(E),a=a.Xh;var b=y.x,z=y.y;if(pp(a,b,z))for(x=(z-a.Od)/a.sc|0,E=Math.min((b+y.width-a.Nd)/a.rc|0,a.di),y=Math.min((z+y.height-a.Od)/a.sc|0,a.ei),b=(b-a.Nd)/a.rc|0;b<=E;b++)if(z=a.ac[b],z.fill)z.fill(bd,x,y+1);else for(var tt=x;tt<=y;tt++)z[tt]=bd}else if(y instanceof Gi)for(y=y.memberParts;y.next();)b=y.value,b instanceof Vn&&ff(a,b,x,E)}}function kh(a,y){a.Xh===null||a.Xh.vs||y!==void 0&&(!y.avoidable||y.isLinkLabel)||(a.Xh.vs=!0)}Be.prototype.gs=function(a){this.wp.assign(a),this.computeAutoScrollPosition(this.wp).Xa(this.position)?this.ug():rg(this)};function rg(a){a.vk===-1&&(a.vk=$n(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=Ye.alloc(),a.computeBounds(y),y.ed(a.documentBounds),tg(a,y),Ye.free(y),a.Fc=!0,a.bd(),rg(a))}},a.vp))}Be.prototype.ug=function(){this.vk!==-1&&(Xe.clearTimeout(this.vk),this.vk=-1)},Be.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 E=this.viewportBounds,b=this.scale;E=Ye.allocAt(0,0,E.width*b,E.height*b);var z=Gt.allocAt(0,0);if(a.x>=E.x&&a.x<E.x+x.left&&this.allowHorizontalScroll){var tt=Math.max(this.scrollHorizontalLineChange,1);tt|=0,z.x-=tt,a.x<E.x+x.left/2&&(z.x-=tt),a.x<E.x+x.left/4&&(z.x-=4*tt)}else a.x<=E.x+E.width&&a.x>E.x+E.width-x.right&&this.allowHorizontalScroll&&(tt=Math.max(this.scrollHorizontalLineChange,1),tt|=0,z.x+=tt,a.x>E.x+E.width-x.right/2&&(z.x+=tt),a.x>E.x+E.width-x.right/4&&(z.x+=4*tt));return a.y>=E.y&&a.y<E.y+x.top&&this.allowVerticalScroll?(tt=Math.max(this.scrollVerticalLineChange,1),tt|=0,z.y-=tt,a.y<E.y+x.top/2&&(z.y-=tt),a.y<E.y+x.top/4&&(z.y-=4*tt)):a.y<=E.y+E.height&&a.y>E.y+E.height-x.bottom&&this.allowVerticalScroll&&(tt=Math.max(this.scrollVerticalLineChange,1),tt|=0,z.y+=tt,a.y>E.y+E.height-x.bottom/2&&(z.y+=tt),a.y>E.y+E.height-x.bottom/4&&(z.y+=4*tt)),z.Xa(Fo)||(y=new Gt(y.x+z.x/b,y.y+z.y/b)),Ye.free(E),Gt.free(z),y},Ct=Be.prototype,Ct.Cs=function(){return null},Ct.av=function(){return null},Ct.bs=function(a,y){this.pj.add(a,y)},Ct.Fu=function(a){(this.Pw=a)||this.nodes.each(function(y){y instanceof Gi&&(y.$p=null)})};function Nh(a,y,x){function E(){var ut=+new Date;for(z=!0,tt.reset();tt.next();)if(!tt.value[0].al){z=!1;break}z||ut-st>ot?y(x,b,rt):Xe.requestAnimationFrame(E)}for(var b=x.callback,z=!0,tt=a.Og.iterator;tt.next();)if(!tt.value[0].al){z=!1;break}if(typeof b!="function"||z)return y(x,b,a);var rt=a,ot=x.callbackTimeout||300,st=+new Date;return Xe.requestAnimationFrame(function(){E()}),null}Ct.Wz=function(a){return co?(a===void 0&&(a={}),a.returnType="Image",this.Jx(a)):null},Ct.Jx=function(a){return a===void 0&&(a={}),Nh(this,this.Xz,a)},Ct.Xz=function(a,y,x){var E=Qg(x,a,"canvas",null);if(E===null)return null;x=E.Z.canvas;var b=null;if(x!==null)switch(b=a.returnType,b===void 0?b="string":b=b.toLowerCase(),b){case Ih+"data":b=E.getImageData(0,0,x.width,x.height);break;case Ih:E=(a.document||document).createElement("img"),E.src=x.toDataURL(a.type,a.details),b=E;break;case"blob":return typeof y!="function"&&pe('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:b=x.toDataURL(a.type,a.details)}return typeof y=="function"?(y(b),null):b};function Qg(a,y,x,E){if(a.animationManager.Cc(),a.bd(),a.ta===null)return null;typeof y!="object"&&pe("properties argument must be an Object.");var b=y.size||null,z=y.scale||null;y.scale!==void 0&&isNaN(y.scale)&&(z="NaN");var tt=y.maxSize;y.maxSize===void 0&&(tt=x==="SVG"?new Re(1/0,1/0):new Re(2e3,2e3));var rt=y.position||null,ot=y.parts||null,st=y.padding===void 0?1:y.padding,ut=y.background||null,ft=y.omitTemporary;ft===void 0&&(ft=!0);var St=y.document||document,wt=y.elementFinished||null,Et=y.showTemporary;Et===void 0&&(Et=!ft),y=y.showGrid,y===void 0&&(y=Et),b!==null&&isNaN(b.width)&&isNaN(b.height)&&(b=null),typeof st=="number"?st=new Di(st):st instanceof Di||pe("MakeImage padding must be a Margin or a number."),st.left=Math.max(st.left,0),st.right=Math.max(st.right,0),st.top=Math.max(st.top,0),st.bottom=Math.max(st.bottom,0),a.ib.Vc(!0),ft=new Pa(null,St,void 0,!0);var Bt=ft.context;if(!(b||z||ot||rt))return ft.width=a.Aa+Math.ceil(st.left+st.right),ft.height=a.ya+Math.ceil(st.top+st.bottom),x==="SVG"?E===null?null:(E.resize(ft.width,ft.height,ft.width,ft.height),E.ownerDocument=St,E.hs=wt,lf(a,E.context,st,new Re(ft.width,ft.height),a.Ca,a.pa,ot,ut,Et,y),E.context):(a.Xm=!1,lf(a,Bt,st,new Re(ft.width,ft.height),a.Ca,a.pa,ot,ut,Et,y),a.Xm=!0,ft.context);var Vt=a.Pp,jt=a.documentBounds.copy();if(jt.Fv(a.yb),Et)for(var _t=a.Wa.s,Qt=_t.length,ie=0;ie<Qt;ie++){var ce=_t[ie];if(ce.visible&&ce.isTemporary){ce=ce.Pa.s;for(var ke=ce.length,On=0;On<ke;On++){var ri=ce[On];ri.isInDocumentBounds&&ri.isVisible()&&(ri=ri.actualBounds,ri.w()&&jt.ed(ri))}}}if(_t=new Gt(jt.x,jt.y),ot!==null){for(Qt=new Ye(0,0,0,0),ie=!0,ce=ot.iterator,ce.reset();ce.next();)ke=ce.value,ke instanceof mi&&(On=ke.layer,On!==null&&!On.visible||On!==null&&!Et&&On.isTemporary||!ke.isVisible()||(ke=ke.actualBounds,ke.w()&&(ie?(ie=!1,Qt.assign(ke)):Qt.ed(ke))));jt.width=Qt.width,jt.height=Qt.height,_t.x=Qt.x,_t.y=Qt.y}return rt!==null&&rt.w()&&(_t=rt,z||(z=Vt)),Qt=rt=0,st!==null&&(rt=st.left+st.right,Qt=st.top+st.bottom),ie=ce=0,b!==null&&(ce=b.width,ie=b.height,isFinite(ce)&&(ce=Math.max(0,ce-rt)),isFinite(ie)&&(ie=Math.max(0,ie-Qt))),b!==null&&z!==null?(z==="NaN"&&(z=Vt),b.w()?(b=ce,jt=ie):isNaN(ie)?(b=ce,jt=jt.height*z):(b=jt.width*z,jt=ie)):b!==null?b.w()?(z=Math.min(ce/jt.width,ie/jt.height),b=ce,jt=ie):isNaN(ie)?(z=ce/jt.width,b=ce,jt=jt.height*z):(z=ie/jt.height,b=jt.width*z,jt=ie):z!==null?z==="NaN"&&tt.w()?(z=Math.min((tt.width-rt)/jt.width,(tt.height-Qt)/jt.height),z>Vt?(z=Vt,b=jt.width,jt=jt.height):(b=tt.width,jt=tt.height)):(b=jt.width*z,jt=jt.height*z):(z=Vt,b=jt.width,jt=jt.height),st!==null?(b+=rt,jt+=Qt):st=new Di(0),tt!==null&&(Vt=tt.width,tt=tt.height,isNaN(Vt)&&(Vt=2e3),isNaN(tt)&&(tt=2e3),isFinite(Vt)&&(b=Math.min(b,Vt)),isFinite(tt)&&(jt=Math.min(jt,tt))),ft.width=Math.ceil(b),ft.height=Math.ceil(jt),x==="SVG"?E===null?null:(E.resize(ft.width,ft.height,ft.width,ft.height),E.ownerDocument=St,E.hs=wt,lf(a,E.context,st,new Re(Math.ceil(b),Math.ceil(jt)),z,_t,ot,ut,Et,y),E.context):(a.Xm=!1,lf(a,Bt,st,new Re(Math.ceil(b),Math.ceil(jt)),z,_t,ot,ut,Et,y),a.Xm=!0,ft.context)}we.Object.defineProperties(Be.prototype,{renderer:{get:function(){return this.nl},set:function(a){this instanceof mt||(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 ar(this,Xe.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 ar(this,Xe.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(Xe,"resize",this.Ov,!1),this.removeEventListener(Xe,"wheel",this.$j,!0),Gl===this&&(Gl=null)):this.ui===null&&(this.hf=!1),this.Ka=null,a!==null&&((y=a.H)&&(y.div=null),Wf(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)&&gi(a,"0 <= value <= 1",Be,"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),Js(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),Js(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),Js(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),Js(this,!1))}},scrollHorizontalLineChange:{get:function(){return this.iu},set:function(a){var y=this.iu;y!==a&&(0>a&&gi(a,">= 0",Be,"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&&gi(a,">= 0",Be,"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 E=y.style.cursor;y.style.cursor=a,x.style.cursor=a,y.style.cursor===E&&(y.style.cursor="-webkit-"+a,x.style.cursor="-webkit-"+a,y.style.cursor===E&&(y.style.cursor="-moz-"+a,x.style.cursor="-moz-"+a,y.style.cursor===E&&(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 gi(a,">= 0",Be,"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||Qf(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&&pe("Do not replace a Diagram.model while a transaction is in progress."),this.animationManager.Cc(!0);var x=Hf(this,!0);this.hf=!1,this.fn=!0,this.Ce=-2,this.kg=!1;var E=this.vb;this.vb=!0,nu(this.animationManager,"Model"),y&&(this.pf!==null&&this.pf.each(function(z){return y.ik(z)}),y.ik(this.Oc)),this.cc=a,this.partManager=qf(this.cc.type);for(var b=0;b<x.length;b++)this.add(x[b]);a.Pe(this.Hb),this.partManager.addAllModeledParts(),a.ik(this.Hb),a.Pe(this.Oc),this.pf!==null&&this.pf.each(function(z){return a.Pe(z)}),this.vb=E,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(Xe,"pointermove",this.dk,!0),this.addEventListener(Xe,"pointerdown",this.ui,!0),this.addEventListener(Xe,"pointerup",this.fk,!0),this.addEventListener(Xe,"pointerout",this.ek,!0),this.addEventListener(Xe,"pointercancel",this.ck,!0),this.removeEventListener(y,"wheel",this.$j,!1),this.addEventListener(Xe,"wheel",this.$j,!0),this.addEventListener(Xe,"selectstart",this.preventDefault,!1)):(this.removeEventListener(Xe,"pointermove",this.dk,!0),this.removeEventListener(Xe,"pointerdown",this.ui,!0),this.removeEventListener(Xe,"pointerup",this.fk,!0),this.removeEventListener(Xe,"pointerout",this.ek,!0),this.removeEventListener(Xe,"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(Xe,"wheel",this.$j,!0),this.removeEventListener(Xe,"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=Gt.alloc().assign(this.pa);if(!y.D(a)){var x=this.viewportBounds.copy();this.pa.assign(a),qc(this.animationManager,y,this.pa),this.vb||this.ta===null&&!this.wo.w()?Wl(this):(this.vb=!0,a=this.scale,Vf(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)}Gt.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=Yg(this)),this.fe},set:function(a){var y=this.fe;if(y!==a){y===null&&(y=this.fe=Yg(this)),a.type!==pn.Grid&&pe("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),Hl(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),Wl(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||pe("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 Di(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===$u&&Js(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,Js(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,Jf(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&&Jf(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!==Na&&Js(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()||pe("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()||pe("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)):gi(a,"> 0",Be,"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)):gi(a,"> 0",Be,"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),Js(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 Di(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&&pe("Cannot share PartManagers between Diagrams: "+a.toString()),y&&y.Xe(null),this.Pc=a,a.Xe(this))}},nodes:{get:function(){return this.partManager.nodes.iterator}},links:{get:function(){return this.partManager.links.iterator}},parts:{get:function(){return this.partManager.parts.iterator}},layout:{get:function(){return this.Sc},set:function(a){var y=this.Sc;y!==a&&(this.Sc=a,a.diagram=this,a.group=null,this.xh=!0,this.g("layout",y,a),this.$b())}},isTreePathToChildren:{get:function(){return this.Ht},set:function(a){var y=this.Ht;if(y!==a&&(this.Ht=a,this.g("isTreePathToChildren",y,a),!this.undoManager.isUndoingRedoing))for(a=this.nodes;a.next();)Qp(a.value)}},treeCollapsePolicy:{get:function(){return this.uu},set:function(a){var y=this.uu;y!==a&&(a!==Lu&&a!==bo&&a!==Th&&pe("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 Re(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 Di(a));var y=this.xp;y.D(a)||(this.xp=a=a.J(),this.Ya(),this.g("autoScrollRegion",y,a))}}}),we.Object.defineProperties(Be,{licenseKey:{get:function(){return hg.jc()},set:function(a){hg.add(a.replace(/\s/g,""))}},version:{get:function(){return th}}}),Be.prototype.makeImageData=Be.prototype.Jx,Be.prototype.makeImage=Be.prototype.Wz,Be.prototype.cacheGroupExternalLinks=Be.prototype.Fu,Be.prototype.addRenderer=Be.prototype.bs,Be.prototype.makeSVG=Be.prototype.av,Be.prototype.makeSvg=Be.prototype.Cs,Be.prototype.stopAutoScroll=Be.prototype.ug,Be.prototype.doAutoScroll=Be.prototype.gs,Be.prototype.isUnoccupied=Be.prototype.Yj,Be.prototype.raiseDiagramEvent=Be.prototype.R,Be.prototype.removeDiagramListener=Be.prototype.am,Be.prototype.addDiagramListener=Be.prototype.Bj,Be.prototype.findTreeRoots=Be.prototype.yz,Be.prototype.layoutDiagram=Be.prototype.Uz,Be.prototype.findTopLevelGroups=Be.prototype.qz,Be.prototype.findTopLevelNodesAndLinks=Be.prototype.rz,Be.prototype.ensureBounds=Be.prototype.Va,Be.prototype.findLinksByExample=Be.prototype.ls,Be.prototype.findNodesByExample=Be.prototype.ms,Be.prototype.findLinkForData=Be.prototype.Kc,Be.prototype.findNodeForData=Be.prototype.ii,Be.prototype.findPartForData=Be.prototype.Lc,Be.prototype.findLinkForKey=Be.prototype.findLinkForKey,Be.prototype.findNodeForKey=Be.prototype.Vb,Be.prototype.findPartForKey=Be.prototype.findPartForKey,Be.prototype.rebuildParts=Be.prototype.Wd,Be.prototype.transformViewToDoc=Be.prototype.Ps,Be.prototype.transformRectDocToView=Be.prototype.zA,Be.prototype.transformDocToView=Be.prototype.op,Be.prototype.centerRect=Be.prototype.es,Be.prototype.scrollToRect=Be.prototype.tv,Be.prototype.scroll=Be.prototype.scroll,Be.prototype.highlightCollection=Be.prototype.Jz,Be.prototype.highlight=Be.prototype.Iz,Be.prototype.selectCollection=Be.prototype.rA,Be.prototype.select=Be.prototype.select,Be.prototype.updateAllRelationshipsFromData=Be.prototype.rp,Be.prototype.updateAllTargetBindings=Be.prototype.updateAllTargetBindings,Be.prototype.commit=Be.prototype.commit,Be.prototype.rollbackTransaction=Be.prototype.Kf,Be.prototype.commitTransaction=Be.prototype.eb,Be.prototype.startTransaction=Be.prototype.Ea,Be.prototype.raiseChanged=Be.prototype.g,Be.prototype.raiseChangedEvent=Be.prototype.cb,Be.prototype.removeChangedListener=Be.prototype.ik,Be.prototype.addChangedListener=Be.prototype.Pe,Be.prototype.removeModelChangedListener=Be.prototype.mA,Be.prototype.addModelChangedListener=Be.prototype.Yw,Be.prototype.findLayer=Be.prototype.Qj,Be.prototype.removeLayer=Be.prototype.kA,Be.prototype.addLayerAfter=Be.prototype.Cy,Be.prototype.addLayerBefore=Be.prototype.Ww,Be.prototype.addLayer=Be.prototype.Al,Be.prototype.moveParts=Be.prototype.moveParts,Be.prototype.copyParts=Be.prototype.Kj,Be.prototype.removeParts=Be.prototype.Is,Be.prototype.remove=Be.prototype.remove,Be.prototype.add=Be.prototype.add,Be.prototype.clearDelayedGeometries=Be.prototype.bx,Be.prototype.setProperties=Be.prototype.nm,Be.prototype.attach=Be.prototype.Du,Be.prototype.set=Be.prototype.set,Be.prototype.resetInputOptions=Be.prototype.Sx,Be.prototype.setInputOption=Be.prototype.sA,Be.prototype.getInputOption=Be.prototype.Ql,Be.prototype.resetRenderingHints=Be.prototype.Tx,Be.prototype.setRenderingHint=Be.prototype.Xx,Be.prototype.getRenderingHint=Be.prototype.Gf,Be.prototype.maybeUpdate=Be.prototype.bd,Be.prototype.requestUpdate=Be.prototype.$b,Be.prototype.delayInitialization=Be.prototype.Xy,Be.prototype.isUpdateRequested=Be.prototype.Pz,Be.prototype.invalidateDocumentBounds=Be.prototype.Ya,Be.prototype.findObjectsNear=Be.prototype.og,Be.prototype.findPartsNear=Be.prototype.mz,Be.prototype.findObjectsIn=Be.prototype.Cf,Be.prototype.findPartsIn=Be.prototype.ux,Be.prototype.findObjectsAt=Be.prototype.ji,Be.prototype.findPartsAt=Be.prototype.lz,Be.prototype.findObjectAt=Be.prototype.ic,Be.prototype.findPartAt=Be.prototype.Ol,Be.prototype.focusObject=Be.prototype.zz,Be.prototype.alignDocument=Be.prototype.Jy,Be.prototype.zoomToRect=Be.prototype.BA,Be.prototype.zoomToFit=Be.prototype.zoomToFit,Be.prototype.diagramScroll=Be.prototype.kx,Be.prototype.focus=Be.prototype.focus;var gf=new yi,qg=null,co=Xe.document!==void 0,pd=null,qu="",Na=new Je(Be,"None",0),fs=new Je(Be,"Uniform",1),md=new Je(Be,"UniformToFill",2),Dh=new Je(Be,"CycleAll",10),og=new Je(Be,"CycleNotDirected",11),ag=new Je(Be,"CycleNotDirectedFast",12),sg=new Je(Be,"CycleNotUndirected",13),lg=new Je(Be,"CycleDestinationTree",14),ug=new Je(Be,"CycleSourceTree",15),$u=new Je(Be,"DocumentScroll",1),ac=new Je(Be,"InfiniteScroll",2),Lu=new Je(Be,"TreeParentCollapsed",21),bo=new Je(Be,"AllParentsCollapsed",22),Th=new Je(Be,"AnyParentsCollapsed",23),hg=new yn,th="2.3.10",Ih="image",sc=null,$g=!1;function Ca(){if(co){var a=Xe.document.createElement("canvas"),y=a.getContext("2d"),x=gn("7ca11abfd022028846");y[x]=gn("398c3597c01238");for(var E=["5da73c80a36455d7038e4972187c3cae51fd22",Dn.Dx+"4ae6247590da4bb21c324ba3a84e385776",Xi.xF+"fb236cdfda5de14c134ba1a95a2d4c7cc6f93c1387",Se.za],b=1;5>b;b++)y[gn("7ca11abfd7330390")](gn(E[b-1]),10,15*b);for(y[x]=gn("39f046ebb36e4b"),x=1;5>x;x++)y[gn("7ca11abfd7330390")](gn(E[x-1]),10,15*x);(E.length!==4||E[0][0]!=="5"||E[3][0]!=="7")&&(Xi.prototype.Cd=Xi.prototype.Eu),sc=a}}Be.className="Diagram",Be.fromDiv=function(a){var y=a;return typeof a=="string"&&(y=Xe.document.getElementById(a)),y instanceof HTMLDivElement&&y.H instanceof Be?y.H:null},Be.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},Be.useDOM=function(a){co=a?Xe.document!==void 0:!1},Be.isUsingDOM=function(){return co},Be.None=Na,Be.Uniform=fs,Be.UniformToFill=md,Be.CycleAll=Dh,Be.CycleNotDirected=og,Be.CycleNotDirectedFast=ag,Be.CycleNotUndirected=sg,Be.CycleDestinationTree=lg,Be.CycleSourceTree=ug,Be.DocumentScroll=$u,Be.InfiniteScroll=ac,Be.TreeParentCollapsed=Lu,Be.AllParentsCollapsed=bo,Be.AnyParentsCollapsed=Th;function tp(){this.wy=null,this.j="zz@orderNum",this._tk==="63ad05bbe23a1786468a4c741b6d2"?this.Rc=this.j=!0:this.Rc=null}function eh(a,y){if(y.ib.setTransform(y.Mb,0,0,y.Mb,0,0),y.ib.yc(),a.Rc===null)t:{y="f";var x=Xe[gn("76a715b2f73f148a")][gn("72ba13b5")]||"";if(a.Rc=!0,co){var E=Be[gn("76a115b6ed251eaf4692")];if(E)for(var b=hg.iterator;b.next()&&(E=b.value,E=gn(E).split(gn("39e9")),!(6>E.length));){var z=gn(E[1]).split(".");if(E[4]!=="7da71ca0")break;var tt=gn(Dn[gn("6cae19")]).split(".");if(z[0]>tt[0]||z[0]===tt[0]&&z[1]>=tt[1]){var rt=Xe[gn("74a900bae4370f8b51")][gn("6fbb13a1c2311e8a57")].toLowerCase();if(tt=rt[gn("73a612b6fb191d")](gn("3aad1ab6e022098b4dc4")),z=gn(E[2]),-1<tt&&(rt=rt[gn("73a612b6fb191d")](z.toLowerCase()+"/"),a.Rc=!(-1<rt&&rt<tt),!a.Rc))break;for(tt=x[gn("76ad18b4f73e")],rt=x[gn("73a612b6fb191d")](gn("35e7"))+2;rt<tt;rt++)y+=x[rt];if(tt=y[gn("73a612b6fb191d")](z),0>tt&&z!==gn("7da71ca0ad381e90")&&(tt=y[gn("73a612b6fb191d")](gn("76a715b2ef3e149757"))),0>tt&&(tt=y[gn("73a612b6fb191d")](gn("76a715b2ef3e149757"))),0>tt&&(tt=y[gn("73a612b6fb191d")](gn("2bfa41fdb3784bca12"))),0>tt&&(tt=x[gn("73a612b6fb191d")](gn("7baa19a6f76c1988428554"))),a.Rc=!(0<=tt&&tt<y[gn("73a612b6fb191d")](gn("35"))||y[gn("73a612b6fb191d")](gn("35"))===-1),!a.Rc||x[gn("73a612b6fb191d")](gn("7fb002b6ed25128b4da25b2e"))&&(a.Rc=!(-1<x[gn("73a612b6fb191d")](z)),!a.Rc)||(tt=Xe[gn("76a715b2f73f148a")][gn("69ad17a1e03e")],rt=tt[gn("73a612b6fb191d")](gn("7fb002b6ed25128b4da25b2e")),-1<rt&&(a.Rc=!(tt[gn("73a612b6fb191d")](z)>rt),!a.Rc)))break;if(z[0]==="#"){tt=Xe.document.createElement("div");for(var ot=E[0].replace(/[A-Za-z]/g,"");4>ot.length;)ot+="9";if(rt=ot,ot=ot.substr(ot.length-4),E="",E+=["gsh","gsf"][parseInt(ot.substr(0,1),10)%2],E+=["Header","Background","Display","Feedback"][parseInt(ot.substr(0,1),10)%4],tt[gn("79a417a0f0181a8946")]=E,Xe.document[gn("78a712aa")]){Xe.document[gn("78a712aa")][gn("7bb806b6ed32388c4a875b")](tt),ot=Xe.getComputedStyle(tt).getPropertyValue(gn("78a704b7e62456904c9b12701b6532a8"));var st=Xe.getComputedStyle(tt).getPropertyValue(gn("75b817b0ea2202"));if(Xe.document[gn("78a712aa")][gn("68ad1bbcf533388c4a875b")](tt),ot){if(tt=Xe[gn("77a902b0eb1b1e804a8a")],st==="0."+parseInt(rt,10)%100||ot.indexOf(parseInt(z[1]+z[2],16))!==-1&&ot.indexOf(parseInt(z[3]+z[4],16))!==-1){a.Rc=!1;break}else if(tt&&tt(gn("32ae19a1e0331fc94084537c067a67fa59f1386b89d006")).matches)for(E="."+E,z=0;z<document.styleSheets.length;z++){tt=document.styleSheets[z].rules||document.styleSheets[z].cssRules;for(var ut in tt)if(E===tt[ut].selectorText){a.Rc=!1;break t}}}}else a.Rc=null,a.Rc=!1}}}else{for(ut=x[gn("76ad18b4f73e")],b=x[gn("73a612b6fb191d")](gn("35e7"))+2;b<ut;b++)y+=x[b];x=y[gn("73a612b6fb191d")](gn("7da71ca0ad381e90")),a.Rc=!(0<=x&&x<y[gn("73a612b6fb191d")](gn("35")))}}}return 0<a.Rc&&a!==a.wy}tp.className="DiagramHelper";function su(a){this.j=a===void 0?new Gt:a,this.o=new Gt}we.Object.defineProperties(su.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 Oh="DraggingInfo";su.className="DraggingInfo";function it(a,y,x){this.node=a,this.info=y,this.Su=x}it.className="DraggingNodeInfoPair";function at(){this.reset()}at.prototype.reset=function(){this.isGridSnapEnabled=!1,this.isGridSnapRealtime=!0,this.gridSnapCellSize=new Re(NaN,NaN).freeze(),this.gridSnapCellSpot=wo,this.gridSnapOrigin=new Gt(NaN,NaN).freeze(),this.groupsSnapMembers=this.dragsTree=this.dragsLink=!1,this.dragsMembers=this.groupsAlwaysMove=!0},at.className="DraggingOptions";function ct(a,y){if(typeof a=="string"||Xe.Element&&a instanceof Element)var x=Be.call(this,a)||this;else x=Be.call(this)||this,y=a;return dt(x),y&&x.nm(y),x}Ce(ct,Be);function dt(a){a.allowDragOut=!0,a.allowMove=!1,a.isReadOnly=!0,a.contentAlignment=Ta,a.layout=new pa}ct.prototype.reset=function(){Be.prototype.reset.call(this),dt(this)},ct.className="Palette";function mt(a,y){if(typeof a=="string"||Xe.Element&&a instanceof Element)var x=Be.call(this,a)||this;else x=Be.call(this)||this,y=a;var E=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 mi;var b=new Ui;return b.stroke="magenta",b.strokeWidth=2,b.fill="transparent",b.name="BOXSHAPE",a.selectable=!0,a.selectionAdorned=!1,a.selectionObjectName="BOXSHAPE",a.locationObjectName="BOXSHAPE",a.resizeObjectName="BOXSHAPE",a.cursor="move",a.add(b),x.j=a,x.allowCopy=!1,x.allowDelete=!1,x.allowSelect=!0,x.autoScrollRegion=new Di(0,0,0,0),x.pa.h(0,0),x.toolManager.gb("Dragging",new Ut,x.toolManager.mouseMoveTools),x.click=function(){var z=E.observed;if(z!==null){var tt=z.viewportBounds,rt=E.lastInput.documentPoint;z.position=new Gt(rt.x-tt.width/2,rt.y-tt.height/2)}},x.Pf=function(){E.Ya(),Ot(E)},x.Xd=function(){E.observed!==null&&(E.Ya(),E.N())},x.Ha=function(){1>E.updateDelay?E.N():E.o||(E.o=!0,setTimeout(function(){return E.redraw()},E.updateDelay))},x.Of=function(){E.observed!==null&&Ot(E)},x.autoScale=fs,x.vb=!1,y&&Object.assign(x,y),x}Ce(mt,Be),mt.prototype.computePixelRatio=function(){return 1},mt.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(cd(this),this.ql===null){var x=new Pa(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),At(this)}finally{this.ta=a,this.ib=y}}}Be.prototype.redraw.call(this)},mt.prototype.gc=function(){if(this.Ka===null&&pe("No div specified"),this.ta===null&&pe("No canvas specified"),!(this.ta instanceof ar)&&(Kv(this.box),this.Fc)){var a=this.observed;if(a!==null&&!a.animationManager.defaultAnimation.isAnimating&&a.pi){cd(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?At(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,E=0;E<x;E++)y[E].gc(a,this);this.Fc=this.vd=!1}}};function At(a){var y=a.observed;if(y!==null){var x=a.drawsTemporaryLayers,E=a.drawsGrid&&x,b=y.grid;E&&b!==null&&b.visible&&!isNaN(b.width)&&!isNaN(b.height)&&(b=Ye.alloc().assign(a.viewportBounds).ed(y.viewportBounds),Hl(y,b),Ye.free(b),fa(y));var z=a.Ab;z.reset(),a.scale!==1&&z.scale(a.scale),a.position.x===0&&a.position.y===0||z.translate(-a.position.x,-a.position.y),b=a.ib,b.scale(a.Mb,a.Mb),b.transform(z.m11,z.m12,z.m21,z.m22,z.dx,z.dy),b.yc(),y=y.Wa.s,z=y.length;for(var tt=0;tt<z;tt++){var rt=y[tt],ot=a;if(rt.visible&&rt.opacity!==0){var st=rt.diagram.grid.part;if(!x&&rt.isTemporary)E&&st.layer===rt&&(rt=zl(rt,b),st.gc(b,ot),b.globalAlpha=rt);else{for(var ut=zl(rt,b),ft=ot.scale,St=Ye.alloc(),wt=rt.Pa.s,Et=wt.length,Bt=0;Bt<Et;Bt++){var Vt=wt[Bt];(E||Vt!==st)&&rt.Oj(b,Vt,ot,null,ft,St,!1)}Ye.free(St),b.globalAlpha=ut}}}}}function Ot(a){var y=a.box;if(y!==null){var x=a.observed;if(x!==null){a.Fc=!0,x=x.viewportBounds;var E=y.selectionObject,b=Re.alloc();b.h(x.width,x.height),E.desiredSize=b,Re.free(b),a=2/a.scale,E instanceof Ui&&(E.strokeWidth=a),y.location=new Gt(x.x-a/2,x.y-a/2),y.isSelected=!0}}}mt.prototype.computeBounds=function(){var a=this.observed;if(a===null)return Ho;var y=a.documentBounds.copy();return y.ed(a.viewportBounds),y},mt.prototype.invalidateViewport=function(){this.Fc!==!0&&(this.Fc=!0,this.$b())},mt.prototype.onViewportBoundsChanged=function(a,y,x,E){this.vb||(this.vd=!0,this.N(),this.Ee=!0,this.Ya(),Ot(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=E,this.R("ViewportBoundsChanged",this.fc,a))},we.Object.defineProperties(mt.prototype,{observed:{get:function(){return this.V},set:function(a){var y=this.V;if(a instanceof mt&&pe("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,E=this.ib;x&&E&&(E.setTransform(1,0,0,1,0,0),E.clearRect(0,0,x.width,x.height))}else this.Ha(null),Ot(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),Ot(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)}}}),mt.className="Overview";function Ut(){lo.call(this),this.j=null}Ce(Ut,lo),Ut.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 Gt(x.width/2,x.height/2),a=a.firstInput.documentPoint,y.position=new Gt(a.x-this.j.x,a.y-this.j.y)),!0)},Ut.prototype.doActivate=function(){this.j=null,lo.prototype.doActivate.call(this)},Ut.prototype.doUpdateCursor=function(){var a=this.diagram,y=a.box;y!==null&&y.cursor&&(a.currentCursor=y.cursor)},Ut.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 E=a.firstInput.documentPoint;x=x.location,this.j=new Gt(E.x-x.x,E.y-x.y)}a=a.lastInput.documentPoint,y.position=new Gt(a.x-this.j.x,a.y-this.j.y)}}},Ut.className="OverviewDraggingTool";function Wt(){Zr(this),this.H=Gl,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=Ho,this.hb=!0,this.cg=null,this.ob=200}Wt.prototype.toString=function(){return"CommandHandler"},Wt.prototype.Xe=function(a){this.H=a},Wt.prototype.doKeyDown=function(){var a=this.diagram,y=a.lastInput,x=Qi?y.meta:y.control,E=y.shift,b=y.alt,z=y.key;!x||z!=="C"&&z!=="Insert"?x&&z==="X"||E&&z==="Del"?this.canCutSelection()&&this.cutSelection():x&&z==="V"||E&&z==="Insert"?this.canPasteSelection()&&this.pasteSelection():x&&z==="Y"||b&&E&&z==="Backspace"?this.canRedo()&&this.redo():x&&z==="Z"||b&&z==="Backspace"?this.canUndo()&&this.undo():z==="Del"||z==="Backspace"?this.canDeleteSelection()&&this.deleteSelection():x&&z==="A"?this.canSelectAll()&&this.selectAll():z==="Esc"?this.canStopCommand()&&this.stopCommand():z==="Up"?a.allowVerticalScroll&&(x?a.scroll("pixel","up"):a.scroll("line","up")):z==="Down"?a.allowVerticalScroll&&(x?a.scroll("pixel","down"):a.scroll("line","down")):z==="Left"?a.allowHorizontalScroll&&(x?a.scroll("pixel","left"):a.scroll("line","left")):z==="Right"?a.allowHorizontalScroll&&(x?a.scroll("pixel","right"):a.scroll("line","right")):z==="PageUp"?E&&a.allowHorizontalScroll?a.scroll("page","left"):a.allowVerticalScroll&&a.scroll("page","up"):z==="PageDown"?E&&a.allowHorizontalScroll?a.scroll("page","right"):a.allowVerticalScroll&&a.scroll("page","down"):z==="Home"?x&&a.allowVerticalScroll?a.scroll("document","up"):!x&&a.allowHorizontalScroll&&a.scroll("document","left"):z==="End"?x&&a.allowVerticalScroll?a.scroll("document","down"):!x&&a.allowHorizontalScroll&&a.scroll("document","right"):z===" "?this.canScrollToPart()&&this.scrollToPart():z==="Subtract"?this.canDecreaseZoom()&&this.decreaseZoom():z==="Add"?this.canIncreaseZoom()&&this.increaseZoom():x&&z==="0"?this.canResetZoom()&&this.resetZoom():E&&z==="Z"?this.canZoomToFit()&&this.zoomToFit():x&&!E&&z==="G"?this.canGroupSelection()&&this.groupSelection():x&&E&&z==="G"?this.canUngroupSelection()&&this.ungroupSelection():z==="F2"||y.event&&y.event.key==="F2"?this.canEditTextBlock()&&this.editTextBlock():z==="ContextMenu"||y.event&&y.event.key==="ContextMenu"?this.canShowContextMenu()&&this.showContextMenu():y.bubbles=!0:this.canCopySelection()&&this.copySelection()},Wt.prototype.doKeyUp=function(){this.diagram.lastInput.bubbles=!0},Wt.prototype.stopCommand=function(){var a=this.diagram,y=a.currentTool;y instanceof qr&&a.allowSelect&&a.clearSelection(),y!==null&&y.doCancel()},Wt.prototype.canStopCommand=function(){return!0},Wt.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 E=a.links;E.next();)E.value.isSelected=!0}finally{a.R("ChangedSelection",a.selection),a.currentCursor=""}},Wt.prototype.canSelectAll=function(){return this.diagram.allowSelect},Wt.prototype.deleteSelection=function(){var a=this.diagram;try{a.currentCursor="wait",a.R("ChangingSelection",a.selection),a.Ea("Delete"),a.R("SelectionDeleting",a.selection);for(var y=new mn,x=a.selection.iterator;x.next();)gc(y,x.value,!0,this.deletesTree?1/0:0,this.deletesConnectedLinks?null:!1,function(E){return E.canDelete()});a.Is(y,!0),a.R("SelectionDeleted",y)}finally{a.eb("Delete"),a.R("ChangedSelection",a.selection),a.currentCursor=""}},Wt.prototype.canDeleteSelection=function(){var a=this.diagram;return!(a.isReadOnly||a.isModelReadOnly||!a.allowDelete||a.selection.count===0)},Wt.prototype.copySelection=function(){var a=this.diagram,y=new mn;for(a=a.selection.iterator;a.next();)gc(y,a.value,!0,this.copiesTree?1/0:0,this.copiesConnectedLinks,function(x){return x.canCopy()});this.copyToClipboard(y)},Wt.prototype.canCopySelection=function(){var a=this.diagram;return!!(a.allowCopy&&a.allowClipboard&&a.selection.count!==0)},Wt.prototype.cutSelection=function(){this.copySelection(),this.deleteSelection()},Wt.prototype.canCutSelection=function(){var a=this.diagram;return!!(!a.isReadOnly&&!a.isModelReadOnly&&a.allowCopy&&a.allowDelete&&a.allowClipboard&&a.selection.count!==0)},Wt.prototype.copyToClipboard=function(a){var y=this.diagram,x=null;if(a===null)pd=null,qu="";else{x=y.model;var E=!1,b=!1,z=null;try{x.Tl()&&(E=x.Jj,x.Jj=this.copiesParentKey),x.Wj()&&(b=x.Ij,x.Ij=this.copiesGroupKey),z=y.Kj(a,null,!0)}finally{x.Tl()&&(x.Jj=E),x.Wj()&&(x.Ij=b),x=new yn,x.addAll(z),pd=x,qu=y.model.dataFormat}}y.R("ClipboardChanged",x)},Wt.prototype.pasteFromClipboard=function(){var a=new mn,y=pd;if(y===null)return a;var x=this.diagram;if(qu!==x.model.dataFormat)return a;var E=x.model,b=!1,z=!1,tt=null;try{E.Tl()&&(b=E.Jj,E.Jj=this.copiesParentKey),E.Wj()&&(z=E.Ij,E.Ij=this.copiesGroupKey),tt=x.Kj(y,x,!1)}finally{for(E.Tl()&&(E.Jj=b),E.Wj()&&(E.Ij=z),y=tt.iterator;y.next();)x=y.value,E=y.key,x.location.w()||(E.location.w()?x.location=E.location:!x.position.w()&&E.position.w()&&(x.position=E.position)),a.add(x)}return a},Wt.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 E=x.iterator;E.next();)E.value.isSelected=!0;if(a!==null){var b=y.computePartsBounds(y.selection);if(b.w()){var z=this.computeEffectiveCollection(y.selection,y.Wm);Ah(y,z,new Gt(a.x-b.centerX,a.y-b.centerY),y.Wm,!1)}}y.R("ClipboardPasted",x)}finally{y.eb("Paste"),y.R("ChangedSelection",y.selection),y.currentCursor=""}},Wt.prototype.canPasteSelection=function(){var a=this.diagram;return!(a.isReadOnly||a.isModelReadOnly||!a.allowInsert||!a.allowClipboard||pd===null||pd.count===0||qu!==a.model.dataFormat)},Wt.prototype.undo=function(){this.diagram.undoManager.undo()},Wt.prototype.canUndo=function(){var a=this.diagram;return a.isReadOnly||a.isModelReadOnly?!1:a.allowUndo&&a.undoManager.canUndo()},Wt.prototype.redo=function(){this.diagram.undoManager.redo()},Wt.prototype.canRedo=function(){var a=this.diagram;return a.isReadOnly||a.isModelReadOnly?!1:a.allowUndo&&a.undoManager.canRedo()},Wt.prototype.decreaseZoom=function(a){a===void 0&&(a=1/this.zoomFactor);var y=this.diagram;y.autoScale===Na&&(a=y.scale*a,a<y.minScale||a>y.maxScale||(y.scale=a))},Wt.prototype.canDecreaseZoom=function(a){a===void 0&&(a=1/this.zoomFactor);var y=this.diagram;return y.autoScale!==Na?!1:(a=y.scale*a,a<y.minScale||a>y.maxScale?!1:y.allowZoom)},Wt.prototype.increaseZoom=function(a){a===void 0&&(a=this.zoomFactor);var y=this.diagram;y.autoScale===Na&&(a=y.scale*a,a<y.minScale||a>y.maxScale||(y.scale=a))},Wt.prototype.canIncreaseZoom=function(a){a===void 0&&(a=this.zoomFactor);var y=this.diagram;return y.autoScale!==Na?!1:(a=y.scale*a,a<y.minScale||a>y.maxScale?!1:y.allowZoom)},Wt.prototype.resetZoom=function(a){a===void 0&&(a=this.defaultScale);var y=this.diagram;a<y.minScale||a>y.maxScale||(y.scale=a)},Wt.prototype.canResetZoom=function(a){a===void 0&&(a=this.defaultScale);var y=this.diagram;return a<y.minScale||a>y.maxScale?!1:y.allowZoom},Wt.prototype.zoomToFit=function(){var a=this.diagram,y=a.animationManager;y.Cc(),a.redraw();var x=a.position,E=a.scale;nu(y,"Zoom To Fit"),this.isZoomToFitRestoreEnabled&&E===this.Au&&!isNaN(this.Jt)&&a.documentBounds.D(this.yu)?(a.scale=this.Jt,a.position=this.sw,this.Au=NaN,this.yu=Ho):(this.Jt=E,this.sw=x.copy(),a.zoomToFit(),this.Au=a.scale,this.yu=a.documentBounds.copy()),_c(y)},Wt.prototype.canZoomToFit=function(){return this.diagram.allowZoom},Wt.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(ot){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;nu(x,"Scroll To Part");var E=this.scrollToPartPause;if(0<E){var b=oe(this,a,[a]);if(b.length===1)y.Ea(),y.es(a.actualBounds),y.eb("Scroll To Part");else{var z=function(){y.Ea();for(var ot=b.pop();0<b.length&&ot instanceof Vn&&ot.isTreeExpanded&&(!(ot instanceof Gi)||ot.isSubGraphExpanded);)ot=b.pop();0<b.length?(ot instanceof mi&&y.tv(ot.actualBounds),ot instanceof Vn&&!ot.isTreeExpanded&&(ot.isTreeExpanded=!0),ot instanceof Gi&&!ot.isSubGraphExpanded&&(ot.isSubGraphExpanded=!0)):(ot instanceof mi&&y.es(ot.actualBounds),y.am("LayoutCompleted",tt)),y.eb("Scroll To Part")},tt=function(){$n(z,(x.isEnabled?x.duration:0)+E)};y.Bj("LayoutCompleted",tt),z()}}else{var rt=y.position.copy();y.es(a.actualBounds),rt.Xa(y.position)&&x.Cc()}}};function oe(a,y,x){if(y.isVisible())return x;if(y instanceof Pr)oe(a,y.adornedPart,x);else if(y instanceof En){var E=y.fromNode;E!==null&&oe(a,E,x),y=y.toNode,y!==null&&oe(a,y,x)}else y instanceof Vn&&(E=y.labeledLink,E!==null&&oe(a,E,x),E=y.pg(),E!==null&&(E.isTreeExpanded||E.wasTreeExpanded||x.push(E),oe(a,E,x))),y=y.containingGroup,y!==null&&(y.isSubGraphExpanded||y.wasSubGraphExpanded||x.push(y),oe(a,y,x));return x}Wt.prototype.canScrollToPart=function(a){return a===void 0&&(a=null),a!==null&&!(a instanceof mi)?!1:(a=this.diagram,a.selection.count===0&&a.highlighteds.count===0?!1:a.allowHorizontalScroll&&a.allowVerticalScroll)},Wt.prototype.collapseTree=function(a){a===void 0&&(a=null);var y=this.diagram;try{y.Ea("Collapse Tree"),nu(y.animationManager,"Collapse Tree");var x=new yn;if(a!==null&&a.isTreeExpanded)a.collapseTree(),x.add(a);else if(a===null)for(var E=y.selection.iterator;E.next();){var b=E.value;b instanceof Vn&&b.isTreeExpanded&&(b.collapseTree(),x.add(b))}y.R("TreeCollapsed",x)}finally{y.eb("Collapse Tree")}},Wt.prototype.canCollapseTree=function(a){a===void 0&&(a=null);var y=this.diagram;if(y.isReadOnly)return!1;if(a!==null){if(!(a instanceof Vn&&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 Vn&&y.isTreeExpanded&&0<y.Qo().count)return!0;return!1},Wt.prototype.expandTree=function(a){a===void 0&&(a=null);var y=this.diagram;try{y.Ea("Expand Tree"),nu(y.animationManager,"Expand Tree");var x=new yn;if(a!==null&&!a.isTreeExpanded)a.expandTree(),x.add(a);else if(a===null)for(var E=y.selection.iterator;E.next();){var b=E.value;b instanceof Vn&&!b.isTreeExpanded&&(b.expandTree(),x.add(b))}y.R("TreeExpanded",x)}finally{y.eb("Expand Tree")}},Wt.prototype.canExpandTree=function(a){a===void 0&&(a=null);var y=this.diagram;if(y.isReadOnly)return!1;if(a!==null){if(!(a instanceof Vn)||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 Vn&&!y.isTreeExpanded&&0<y.Qo().count)return!0;return!1},Wt.prototype.groupSelection=function(){var a=this.diagram,y=a.model;if(y.Xj()){var x=this.archetypeGroupData;if(x!==null){var E=null;try{a.currentCursor="wait",a.R("ChangingSelection",a.selection),a.Ea("Group");for(var b=new yn,z=a.selection.iterator;z.next();){var tt=z.value;tt.Zc()&&tt.canGroup()&&b.add(tt)}for(var rt=new yn,ot=b.iterator;ot.next();){var st=ot.value;z=!1;for(var ut=b.iterator;ut.next();)if(st.Td(ut.value)){z=!0;break}z||rt.add(st)}if(0<rt.count){var ft=rt.first().containingGroup;if(ft!==null)for(;ft!==null;){b=!1;for(var St=rt.iterator;St.next();)if(!St.value.Td(ft)){b=!0;break}if(b)ft=ft.containingGroup;else break}if(x instanceof Gi)Ll(x),E=x.copy(),E!==null&&a.add(E);else if(y.Yu(x)){var wt=y.copyNodeData(x);bn(wt)&&(y.xf(wt),E=a.ii(wt))}if(E!==null){ft!==null&&this.isValidMember(ft,E)&&(E.containingGroup=ft);for(var Et=rt.iterator;Et.next();){var Bt=Et.value;this.isValidMember(E,Bt)&&(Bt.containingGroup=E)}a.clearSelection(!0),E.isSelected=!0}}a.R("SelectionGrouped",E)}finally{a.eb("Group"),a.R("ChangedSelection",a.selection),a.currentCursor=""}}}},Wt.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 Ve(a){var y=Si();for(a=a.iterator;a.next();){var x=a.value;x instanceof En||y.push(x)}a=new mn,x=y.length;for(var E=0;E<x;E++){for(var b=y[E],z=!0,tt=0;tt<x;tt++)if(b.Td(y[tt])){z=!1;break}z&&a.add(b)}return wi(y),a}Wt.prototype.isValidMember=function(a,y){if(y===null||a===y||y instanceof En)return!1;if(a!==null){if(a===y||a.Td(y))return!1;var x=a.memberValidation;if(x!==null&&!x(a,y)||a.data===null&&y.data!==null||a.data!==null&&y.data===null)return!1}return x=this.memberValidation,x!==null?x(a,y):!0},Wt.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 E=new yn;if(a!==null)E.add(a);else for(var b=y.selection.iterator;b.next();){var z=b.value;z instanceof Gi&&z.canUngroup()&&E.add(z)}var tt=new yn;if(0<E.count){y.clearSelection(!0);for(var rt=E.iterator;rt.next();){var ot=rt.value;ot.expandSubGraph();var st=ot.containingGroup,ut=st!==null&&st.data!==null?x.wa(st.data):void 0;tt.addAll(ot.memberParts);for(var ft=tt.iterator;ft.next();){var St=ft.value;if(St.isSelected=!0,!(St instanceof En)){var wt=St.data;wt!==null?x.mp(wt,ut):St.containingGroup=st}}y.remove(ot)}}y.R("SelectionUngrouped",E,tt)}finally{y.eb("Ungroup"),y.R("ChangedSelection",y.selection),y.currentCursor=""}},Wt.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 Gi))return!1;if(a.canUngroup())return!0}else for(a=y.selection.iterator;a.next();)if(y=a.value,y instanceof Gi&&y.canUngroup())return!0;return!1},Wt.prototype.addTopLevelParts=function(a,y){var x=!0;for(a=Ve(a).iterator;a.next();){var E=a.value;E.containingGroup!==null&&(!y||this.isValidMember(null,E)?E.containingGroup=null:x=!1)}return x},Wt.prototype.collapseSubGraph=function(a){a===void 0&&(a=null);var y=this.diagram;try{y.Ea("Collapse SubGraph"),nu(y.animationManager,"Collapse SubGraph");var x=new yn;if(a!==null&&a.isSubGraphExpanded)a.collapseSubGraph(),x.add(a);else if(a===null)for(var E=y.selection.iterator;E.next();){var b=E.value;b instanceof Gi&&b.isSubGraphExpanded&&(b.collapseSubGraph(),x.add(b))}y.R("SubGraphCollapsed",x)}finally{y.eb("Collapse SubGraph")}},Wt.prototype.canCollapseSubGraph=function(a){a===void 0&&(a=null);var y=this.diagram;if(y.isReadOnly)return!1;if(a!==null)return!!(a instanceof Gi&&a.isSubGraphExpanded);for(a=y.selection.iterator;a.next();)if(y=a.value,y instanceof Gi&&y.isSubGraphExpanded)return!0;return!1},Wt.prototype.expandSubGraph=function(a){a===void 0&&(a=null);var y=this.diagram;try{y.Ea("Expand SubGraph"),nu(y.animationManager,"Expand SubGraph");var x=new yn;if(a!==null&&!a.isSubGraphExpanded)a.expandSubGraph(),x.add(a);else if(a===null)for(var E=y.selection.iterator;E.next();){var b=E.value;b instanceof Gi&&!b.isSubGraphExpanded&&(b.expandSubGraph(),x.add(b))}y.R("SubGraphExpanded",x)}finally{y.eb("Expand SubGraph")}},Wt.prototype.canExpandSubGraph=function(a){a===void 0&&(a=null);var y=this.diagram;if(y.isReadOnly)return!1;if(a!==null)return a instanceof Gi&&!a.isSubGraphExpanded;for(a=y.selection.iterator;a.next();)if(y=a.value,y instanceof Gi&&!y.isSubGraphExpanded)return!0;return!1},Wt.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 E=y.selection.iterator;E.next();){var b=E.value;if(b.canEdit()){a=b;break}}if(a===null)return;a=a.Nl(function(z){return z instanceof Xr&&z.editable})}a!==null&&(y.currentTool=null,x.textBlock=a,y.currentTool=x)}},Wt.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 Xr))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 Xr&&x.editable}),a!==null))return!0;return!1},Wt.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 E=y.lastInput,b=null;a instanceof fe?b=a.ga(Br):y.viewportBounds.ca(E.documentPoint)||(b=y.viewportBounds,b=new Gt(b.x+b.width/2,b.y+b.height/2)),b!==null&&(E.viewPoint=y.op(b),E.documentPoint=b,E.left=!1,E.right=!0,E.up=!0),y.currentTool=x,Eu(x,!1,a)}},Wt.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)},Wt.prototype.computeEffectiveCollection=function(a,y){var x=this.diagram,E=x.toolManager.findTool("Dragging"),b=x.currentTool===E;if(y===void 0&&(y=b?E.dragOptions:x.Wm),E=new yi,a===null)return E;for(var z=a.iterator;z.next();)au(x,E,z.value,b,y);if(x.draggedLink!==null&&y.dragsLink)return E;for(z=a.iterator;z.next();)a=z.value,a instanceof En&&(y=a.fromNode,y===null||E.contains(y)?(y=a.toNode,y===null||E.contains(y)||E.remove(a)):E.remove(a));return E},we.Object.defineProperties(Wt.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||pe("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}}}),Wt.className="CommandHandler",Gp=function(){return new Wt};function fe(){Zr(this),this.l=30723,this.pb=1,this.bn="",this.Ma=this.Me=null,this.pa=new Gt(NaN,NaN).freeze(),this.jd=br,this.Ab=new Xi,this.wh=new Xi,this.Lb=null,this.Ca=this.Kk=1,this.Kb=0,this.Kg=xs,this.uc=new Ye(NaN,NaN,NaN,NaN).freeze(),this.Ib=new Ye(NaN,NaN,NaN,NaN).freeze(),this.dc=new Ye(0,0,NaN,NaN).freeze(),this.ba=this.Yn=this.Zn=null,this.sk=this.Jb=ha,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 dn,on,ai,ci,xi,Ri,rr,Ki,lr,Rr;fe.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=hn(this.Dh)),this.tb!==null&&(a.tb=this.tb.copy())},fe.prototype.Vw=function(a){var y=this.Dh;if(Mn(y)){for(var x=0;x<y.length;x++)if(y[x]===a)return}else this.Dh=y=[];y.push(a)},fe.prototype.Af=function(a){a.Zn=null,a.Ng=null,a.v()},fe.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},fe.prototype.copy=function(){return this.clone()},Ct=fe.prototype,Ct.qb=function(a){a.classType===En?a.name.indexOf("Orient")===0?this.segmentOrientation=a:pe("Unknown Link enum value for GraphObject.segmentOrientation property: "+a):a.classType===fe&&(this.stretch=a)},Ct.toString=function(){return Mi(this.constructor)+"#"+Cr(this)},Ct.th=function(){this.A!==null&&(this.A.nc=!0)};function Zi(a){a.A===null?a.A=new Ai:a.A.nc&&(a.A=a.A.copy())}Ct.Xc=function(){if(this.ba===null){var a=new Wi;a.Xi=No,a.yj=No,a.Vi=10,a.wj=10,a.Wi=0,a.xj=0,this.ba=a}},Ct.cb=function(a,y,x,E,b,z,tt){var rt=this.part;if(rt!==null&&(rt.gk(a,y,x,E,b,z,tt),x===this&&a===io&&vt(this)&&Jr(this,rt,y),z=this.diagram,this.animationTriggers===null||z===null||!z.pi||z.undoManager.isUndoingRedoing||z.animationManager.Dm||(a=this.animationTriggers.get(y),a!==null&&z.animationManager.isEnabled&&!z.animationManager.isTicking&&(this.jo===null&&(this.jo=new yi),tt=z.undoManager.transactionLevel===0,a.startCondition===Xu?tt=!0:a.startCondition===ld&&(tt=!1),tt?(z=new ca,Vg(a,z),tt=this.jo.get(a),tt!==null&&tt.stop(),this.jo.add(a,z),z.vu=this,z.Nw=a,z.add(this,y,E,b),z.start()):(nu(z.animationManager,"Trigger"),z.animationManager.defaultAnimation.add(this,y,E,b)))),this instanceof pn&&x===rt&&(rt.l&16777216)!==0&&rt.data!==null))for(x=this.O.s,E=x.length,b=0;b<E;b++)rt=x[b],rt instanceof pn&&vf(rt,function(ot){ot.data!==null&&ot.l&16777216&&ot.La(y)})};function Jr(a,y,x){var E=a.ih();if(E!==null)for(var b=a.localBindings.iterator;b.next();){var z=b.value,tt=null;if(z.sourceName!==null){if(tt=MS(z,E,a),tt===null)continue;z.sp(a,tt,x,null)}else if(z.isToModel){var rt=y.diagram;rt===null||rt.skipsModelSourceBindings||z.sp(a,rt.model.modelData,x,E)}else{if(rt=E.data,rt===null)continue;var ot=y.diagram;ot===null||ot.skipsModelSourceBindings||z.sp(a,rt,x,E)}tt===a&&(rt=E.ks(z.Ai),rt!==null&&z.Mv(rt,tt,x))}}Ct.ks=function(a){return this.bindingId===a?this:null},Ct.g=function(a,y,x){this.cb(io,a,this,y,x)},Ct.Ge=function(a,y,x,E){var b=this.uc;if(b.h(a,y,x,E),this.Ca!==1||this.Kb!==0){this.Lb===null&&(this.Lb=new Xi);var z=this.Lb;z.reset(),this.no(z,a,y,x,E),z.pp(b)}};function Wo(a,y,x,E){return a.pickable===!1?!1:(E.multiply(a.transform),x?a.Yc(y,E):a.fh(y,E))}Ct.tx=function(a,y,x){if(this.pickable===!1)return!1;var E=this.naturalBounds;return y=a.Bf(y),x?si(a.x,a.y,0,0,0,E.height)<=y||si(a.x,a.y,0,E.height,E.width,E.height)<=y||si(a.x,a.y,E.width,E.height,E.width,0)<=y||si(a.x,a.y,E.width,0,0,0)<=y:a.zd(0,0)<=y&&a.zd(0,E.height)<=y&&a.zd(E.width,0)<=y&&a.zd(E.width,E.height)<=y},Ct.se=function(){return!0},Ct.ca=function(a){var y=Gt.alloc();y.assign(a),this.transform.Ga(y);var x=this.actualBounds;if(!x.w())return Gt.free(y),!1;var E=this.diagram;if(E!==null&&E.wq){var b=E.Ql("extraTouchThreshold"),z=E.Ql("extraTouchArea"),tt=z/2,rt=this.naturalBounds;E=this.Df()*E.scale;var ot=1/E;if(rt.width*E<b&&rt.height*E<b)return a=Vr(x.x-tt*ot,x.y-tt*ot,x.width+z*ot,x.height+z*ot,y.x,y.y),Gt.free(y),a}return b=!1,(this instanceof Pr||this instanceof Ui?Vr(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)?b=!1:this.areaBackground!==null&&x.ca(y)||this.Ma!==null&&this.dc.ca(a)?b=!0:b=this.gh(a)),Gt.free(y),b},Ct.gh=function(a){var y=this.naturalBounds;return Vr(0,0,y.width,y.height,a.x,a.y)},Ct.Re=function(a){if(this.angle===0)return this.actualBounds.Re(a);var y=this.naturalBounds;y=Ye.allocAt(0,0,y.width,y.height);var x=this.transform,E=!1,b=Gt.allocAt(a.x,a.y);return y.ca(x.Cd(b))&&(b.h(a.x,a.bottom),y.ca(x.Cd(b))&&(b.h(a.right,a.bottom),y.ca(x.Cd(b))&&(b.h(a.right,a.y),y.ca(x.Cd(b))&&(E=!0)))),Gt.free(b),Ye.free(y),E},Ct.fh=function(a,y){if(y===void 0)return a.Re(this.actualBounds);var x=this.naturalBounds,E=!1,b=Gt.allocAt(0,0);return a.ca(y.Ga(b))&&(b.h(0,x.height),a.ca(y.Ga(b))&&(b.h(x.width,x.height),a.ca(y.Ga(b))&&(b.h(x.width,0),a.ca(y.Ga(b))&&(E=!0)))),Gt.free(b),E},Ct.Yc=function(a,y){if(y===void 0&&(y=this.transform,this.angle===0))return a.Yc(this.actualBounds);var x=this.naturalBounds,E=Gt.allocAt(0,0),b=Gt.allocAt(0,x.height),z=Gt.allocAt(x.width,x.height),tt=Gt.allocAt(x.width,0),rt=!1;if(a.ca(y.Ga(E))||a.ca(y.Ga(b))||a.ca(y.Ga(z))||a.ca(y.Ga(tt)))rt=!0;else{x=Ye.allocAt(0,0,x.width,x.height);var ot=Gt.allocAt(a.x,a.y);x.ca(y.Cd(ot))?rt=!0:(ot.h(a.x,a.bottom),x.ca(y.Cd(ot))?rt=!0:(ot.h(a.right,a.bottom),x.ca(y.Cd(ot))?rt=!0:(ot.h(a.right,a.y),x.ca(y.Cd(ot))&&(rt=!0)))),Gt.free(ot),Ye.free(x),!rt&&(Se.us(a,E,b)||Se.us(a,b,z)||Se.us(a,z,tt)||Se.us(a,tt,E))&&(rt=!0)}return Gt.free(E),Gt.free(b),Gt.free(z),Gt.free(tt),rt},Ct.ga=function(a,y){if(y===void 0&&(y=new Gt),a instanceof pi){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},Ct.mi=function(a){a===void 0&&(a=new Ye);var y=this.naturalBounds,x=this.oe,E=Gt.allocAt(0,0).transform(x);return a.h(E.x,E.y,0,0),E.h(y.width,0).transform(x),Ar(a,E.x,E.y,0,0),E.h(y.width,y.height).transform(x),Ar(a,E.x,E.y,0,0),E.h(0,y.height).transform(x),Ar(a,E.x,E.y,0,0),Gt.free(E),a},Ct.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},Ct.Df=function(){if(!(this.l&4096))return this.Kk;var a=this.Ca;return this.panel!==null?a*this.panel.Df():a},Ct.qs=function(a,y){return y===void 0&&(y=new Gt),y.assign(a),this.oe.Cd(y),y},Ct.rs=function(a,y,x){return this.Sj(a.x,a.y,y.x,y.y,x)},Ct.Sj=function(a,y,x,E,b){var z=this.transform,tt=1/(z.m11*z.m22-z.m12*z.m21),rt=z.m22*tt,ot=-z.m12*tt,st=-z.m21*tt,ut=z.m11*tt,ft=tt*(z.m21*z.dy-z.m22*z.dx),St=tt*(z.m12*z.dx-z.m11*z.dy);return this.areaBackground!==null?(z=this.actualBounds,Se.Ff(z.left,z.top,z.right,z.bottom,a,y,x,E,b)):(tt=a*rt+y*st+ft,a=a*ot+y*ut+St,y=x*rt+E*st+ft,x=x*ot+E*ut+St,b.h(0,0),E=this.naturalBounds,x=Se.Ff(0,0,E.width,E.height,tt,a,y,x,b),b.transform(z),x)},fe.prototype.measure=function(a,y,x,E){if(Zt(this)!==!1){var b=this.Kg,z=b.right+b.left;b=b.top+b.bottom,a=Math.max(a-z,0),y=Math.max(y-b,0),x=Math.max((x||0)-z,0),E=Math.max((E||0)-b,0),z=this.angle,b=this.desiredSize;var tt=this.kq();z===90||z===270?(a=isFinite(b.height)?b.height+tt:a,y=isFinite(b.width)?b.width+tt:y):(a=isFinite(b.width)?b.width+tt:a,y=isFinite(b.height)?b.height+tt:y),b=x||0,tt=E||0;var rt=this instanceof pn;switch(Xa(this,!0)){case on:tt=b=0,rt&&(y=a=1/0);break;case dn:isFinite(a)&&a>x&&(b=a),isFinite(y)&&y>E&&(tt=y);break;case ci:isFinite(a)&&a>x&&(b=a),tt=0,rt&&(y=1/0);break;case xi:isFinite(y)&&y>E&&(tt=y),b=0,rt&&(a=1/0)}rt=this.maxSize;var ot=this.minSize;b>rt.width&&ot.width<rt.width&&(b=rt.width),tt>rt.height&&ot.height<rt.height&&(tt=rt.height),x=Math.max(b,ot.width),E=Math.max(tt,ot.height),rt.width<x&&(x=Math.min(ot.width,x)),rt.height<E&&(E=Math.min(ot.height,E)),a=Math.min(rt.width,a),y=Math.min(rt.height,y),a=Math.max(x,a),y=Math.max(E,y),(z===90||z===270)&&(z=a,a=y,y=z,z=x,x=E,E=z),this.uc.ka(),this.Wl(a,y,x,E),this.uc.freeze(),this.uc.w()||pe("Non-real measuredBounds has been set. Object "+this+", measuredBounds: "+this.uc.toString()),Kt(this,!1)}},fe.prototype.Wl=function(){},fe.prototype.Dd=function(){return!1},fe.prototype.arrange=function(a,y,x,E,b){this.Uk();var z=Ye.alloc();z.assign(this.Ib),this.Ib.ka(),te(this)===!1?this.Ib.h(a,y,x,E):this.eh(a,y,x,E),this.Ib.freeze(),b===void 0?this.tb=null:this.tb=b,x=!1,b!==void 0?x=!0:(b=this.panel,b!==null&&Sd(b)&&(b=b.panel),b!==null&&(b=b.dc,E=this.measuredBounds,this.areaBackground!==null&&(E=this.Ib),x=y+E.height,E=a+E.width,x=!(0<=a+.05&&E<=b.width+.05&&0<=y+.05&&x<=b.height+.05),this instanceof Xr&&(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()||pe("Non-real actualBounds has been set. Object "+this+", actualBounds: "+this.Ib.toString()),this.Xl(z,this.Ib),se(this,!1),Ye.free(z)},Ct=fe.prototype,Ct.eh=function(){};function Da(a,y,x,E,b){if(a.Ib.h(y,x,E,b),!a.desiredSize.w()){var z=a.uc;x=a.Kg,y=x.right+x.left;var tt=x.top+x.bottom;switch(x=z.width+y,z=z.height+tt,E+=y,b+=tt,y=Xa(a,!0),x===E&&z===b&&(y=on),y){case on:(x>E||z>b)&&(Kt(a,!0),a.measure(x>E?E:x,z>b?b:z,0,0));break;case dn:Kt(a,!0),a.measure(E,b,0,0);break;case ci:Kt(a,!0),a.measure(E,z,0,0);break;case xi:Kt(a,!0),a.measure(x,b,0,0)}}}Ct.Xl=function(a,y){var x=this.part;x!==null&&x.diagram!==null&&(x.selectionObject!==this&&x.resizeObject!==this&&x.rotateObject!==this||Xv(x,!0),this.N(),rl(a,y)||(x.oh(),this.Pn(x)))},Ct.Pn=function(a){this.portId!==null&&(Xv(a,!0),a instanceof Vn&&U1(a,this))},Ct.gc=function(a,y){if(!Fs(this,a,y)&&this.visible){var x=this.opacity;if(x!==0){var E=1;x!==1&&(E=a.globalAlpha,a.globalAlpha=E*x);var b="";this.filter!==""&&(b=a.filter,a.filter=this.filter);var z=this instanceof pn&&Sd(this),tt=this.Ib;if(z){var rt=this.Ib,ot=this.dc,st=this.areaBackground,ut=this.Ma;st===null&&ut===null||a.yc(),st!==null&&(fo(this,a,st,!0,!0,ot,rt),st instanceof mr&&st.type===cl?(a.beginPath(),a.rect(rt.x,rt.y,rt.width,rt.height),a.ng(st)):a.fillRect(rt.x,rt.y,rt.width,rt.height)),ut!==null&&(fo(this,a,ut,!0,!1,ot,rt),ut instanceof mr&&ut.type===cl?(a.beginPath(),a.rect(rt.x,rt.y,rt.width,rt.height),a.ng(ut)):a.fillRect(rt.x,rt.y,rt.width,rt.height)),this.hh(a,y)}if(!z&&(z||tt.width!==0&&tt.height!==0&&!isNaN(tt.x)&&!isNaN(tt.y))){z=this.transform,rt=this.panel,this.l&4096&&ta(this),st=this.part,ot=!1;var ft=0;st&&y.Gf("drawShadows")&&(ot=st.isShadowed)&&(ut=st.shadowOffset,ft=Math.max(ut.y,ut.x)*y.scale*y.Mb),ut=this.Dd();var St;if(!(St=y.$i||!ut)){var wt=this.naturalBounds;St=this.wh;var Et=St.m11,Bt=St.m21,Vt=St.dx,jt=St.m12,_t=St.m22,Qt=St.dy,ie,ce=ie=0;St=ie*Et+ce*Bt+Vt;var ke=ie*jt+ce*_t+Qt;ie=wt.width+ft,ce=0;var On=ie*Et+ce*Bt+Vt;ie=ie*jt+ce*_t+Qt,ce=Math.min(St,On);var ri=Math.min(ke,ie),qn=Math.max(St+0,On)-ce,wn=Math.max(ke+0,ie)-ri;St=ce,ke=ri,ie=wt.width+ft,ce=wt.height+ft,On=ie*Et+ce*Bt+Vt,ie=ie*jt+ce*_t+Qt,ce=Math.min(St,On),ri=Math.min(ke,ie),qn=Math.max(St+qn,On)-ce,wn=Math.max(ke+wn,ie)-ri,St=ce,ke=ri,ie=0,ce=wt.height+ft,On=ie*Et+ce*Bt+Vt,ie=ie*jt+ce*_t+Qt,ce=Math.min(St,On),ri=Math.min(ke,ie),qn=Math.max(St+qn,On)-ce,wn=Math.max(ke+wn,ie)-ri,St=ce,ke=ri,ft=y.viewportBounds,wt=ft.x,Et=ft.y,St=!(St>ft.width+wt||wt>qn+St||ke>ft.height+Et||Et>wn+ke)}if(St){if(St=(this.l&256)!==0,a.clipInsteadOfFill&&(St=!1),this instanceof Xr&&(a.font=this.font),St){if(ke=rt.se()?rt.naturalBounds:rt.actualBounds,qn=Math.max(tt.x,ke.x),wn=Math.max(tt.y,ke.y),ft=Math.min(tt.right,ke.right)-qn,wt=Math.min(tt.bottom,ke.bottom)-wn,Et=this.tb,Et!==null&&(qn=Et.x,wn=Et.y,ft=Et.width,wt=Et.height),qn>tt.width+tt.x||tt.x>ke.width+ke.x){x!==1&&(a.globalAlpha=E),this.filter!==""&&(a.filter=b);return}a.save(),a.beginPath(),a.rect(qn,wn,ft,wt),a.clip()}if(ut){if(!st.isVisible()){x!==1&&(a.globalAlpha=E),this.filter!==""&&(a.filter=b);return}ot&&(ke=st.shadowOffset,a.Ev(ke.x*y.scale*this.scale*y.Mb,ke.y*y.scale*this.scale*y.Mb,st.shadowBlur),la(a),a.shadowColor=st.shadowColor)}ot&&this.shadowVisible===!0?la(a):ot&&this.shadowVisible===!1&&_a(a),st=this.naturalBounds,this.areaBackground!==null&&(a.yc(),As(this,a,st,tt)),a.transform(z.m11,z.m12,z.m21,z.m22,z.dx,z.dy),ot&&$o(this,rt)&&this.shadowVisible===null&&_a(a),this.Ma!==null&&(a.yc(),ts(this,a,st,tt)),ot&&(this.Ma!==null||this.areaBackground!==null||$o(this,rt))?(qs(this,!0),this.shadowVisible===null&&_a(a)):qs(this,!1),this.hh(a,y),ot&&this.l&512&&la(a),ut&&ot&&_a(a),St&&(a.restore(),a.Vc(this instanceof pn)),z.ws()||(y=1/(z.m11*z.m22-z.m12*z.m21),a.transform(z.m22*y,-z.m12*y,-z.m21*y,z.m11*y,y*(z.m21*z.dy-z.m22*z.dx),y*(z.m12*z.dx-z.m11*z.dy)))}}x!==1&&(a.globalAlpha=E),this.filter!==""&&(a.filter=b)}}};function $o(a,y){return y===null?!1:(Sd(y)&&(y=y.panel),(y.l&512)!==0||(y.type===pn.Auto||y.type===pn.Spot)&&y.Pb()!==a)}Ct.Dv=function(){};function As(a,y,x,E){fo(a,y,a.areaBackground,!0,!0,x,E),a.areaBackground instanceof mr&&a.areaBackground.type===cl?(y.beginPath(),y.rect(E.x,E.y,E.width,E.height),y.ng(a.areaBackground)):y.fillRect(E.x,E.y,E.width,E.height)}function ts(a,y,x,E){var b=a.kq(),z=x.x,tt=x.y,rt=x.width+b,ot=x.height+b;fo(a,y,a.Ma,!0,!1,x,E),a.Ma instanceof mr&&a.Ma.type===cl?(y.beginPath(),y.rect(z-b/2,tt-b/2,rt,ot),y.ng(a.Ma)):y.fillRect(z-b/2,tt-b/2,rt,ot)}function Ea(a,y,x){for(var E=y.O.s,b=E.length,z=-1,tt=0;tt<b;tt++)if(E[tt]===a){z=tt;break}if(a=z,a!==-1)if(a===0)y.svg.gd?y.svg.gd.after(x):y.svg.Ma?y.svg.Ma.after(x):y.type===pn.Table?(y=y.svg.getElementsByClassName("gojs-ts"),y=y.length!==0?y[0]:null,y!==null&&y.after(x)):y.svg.prepend(x);else{for(;a!==0&&!y.M(a-1).Ed();)a--;a===0?y.svg.prepend(x):(a=y.M(a-1).svg,a!==null?a.after(x):y.svg.appendChild(x))}}function Fs(a,y,x){if(!(y instanceof Tr))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 E=a.panel,b=a.nk(y);if(a.kk(y,x,b))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):E&&Ea(a,E,a.svg),!0);if(a.Dd()&&a.isShadowed){var z=a.shadowOffset;y.Ev(z.x*x.scale*a.scale*x.Mb,z.y*x.scale*a.scale*x.Mb,a.shadowBlur),la(y),y.shadowColor=a.shadowColor}a instanceof Xr&&(y.font=a.font),y.yd=null;var tt=a.transform;z=a instanceof pn;var rt=a instanceof pn?Sd(a):!1;a.l&4096&&ta(a);var ot=a.Ib;if(y.rb.ha=[1,0,0,1,0,0],y.o=!1,b&&(y.o=!0,z&&rt?(dl(y,1,0,0,1,0,0),a.svg=y.ad):z?(dl(y,tt.m11,tt.m12,tt.m21,tt.m22,tt.dx,tt.dy),a.svg=y.ad):dl(y,1,0,0,1,0,0)),b=a.naturalBounds,a.areaBackground!==null){var st=tt.copy().Vj();y.rb.ha=[st.m11,st.m12,st.m21,st.m22,st.dx,st.dy],As(a,y,b,ot),y.rb.ha=[1,0,0,1,0,0],y.yd.gd=y.ad,y.yd.prepend(y.ad)}return z||(y.rb.ha=[tt.m11,tt.m12,tt.m21,tt.m22,tt.dx,tt.dy]),a.background!==null&&(z?(rt&&(y.rb.ha=[tt.m11,tt.m12,tt.m21,tt.m22,tt.dx,tt.dy]),ts(a,y,b,ot),rt&&(y.rb.ha=[1,0,0,1,0,0])):(y.rb.ha=[tt.m11,tt.m12,tt.m21,tt.m22,tt.dx,tt.dy],ts(a,y,b,ot)),y.yd.Ma=y.ad,y.yd.prepend(y.ad)),tt=y.yd,b=a.part,rt=!1,b&&x.Gf("drawShadows")&&(rt=b.isShadowed),y.clipInsteadOfFill&&(rt=!1),a.Dd()&&rt&&la(y),rt&&a.shadowVisible===!0?la(y):rt&&a.shadowVisible===!1&&_a(y),b=a.panel,rt&&$o(a,b)&&a.shadowVisible===null&&_a(y),y.Il&&(st=x.computePixelRatio(),st="drop-shadow("+y.shadowOffsetX/st+"px "+y.shadowOffsetY/st+"px "+y.shadowBlur/st/2+"px "+y.shadowColor+")",a.background!==null&&tt.Ma.setAttributeNS(null,"filter",st),a.areaBackground!==null&&tt.gd.setAttributeNS(null,"filter",st)),rt&&(a.Ma!==null||a.areaBackground!==null||$o(a,b))?(qs(a,!0),a.shadowVisible===null&&_a(y)):qs(a,!1),b=rt,a.hh(y,x),z&&y.nh.pop(),y.o&&y.nh.pop(),tt=y.Gv.hs,rt=z?a.svg:y.yd,st=a.svg,!z&&st!==null&&rt!==st&&st.parentNode===a.panel.svg?(a.svg.replaceWith(rt),a.svg=rt,rt!==null&&a.$o(y,E,ot,rt),Ya(y,st),!0):(a.svg=rt,tt!==null&&rt===null&&($s(y),y.nh.pop()),rt===null||(a.$o(y,E,ot,rt),y.Il&&(x=x.computePixelRatio(),a.Dv(rt,"drop-shadow("+y.shadowOffsetX/x+"px "+y.shadowOffsetY/x+"px "+y.shadowBlur/x/2+"px "+y.shadowColor+")")),b&&a.l&512&&la(y),a.Dd()&&_a(y),x=a.Dd()?a.opacity*y.globalAlpha:a.opacity,x!==1&&rt.setAttributeNS(null,"opacity",x.toString()),a.filter!==""&&rt.setAttributeNS(null,"filter",a.filter),a.Dd()?(y.ti?y.ti.after(rt):y.Nj.prepend(rt),y.ti=rt):E!==null&&Ea(a,E,rt),tt!==null&&tt(a,rt)),!0)}Ct.$o=function(a,y,x,E){var b=(this.l&256)!==0;if(a.clipInsteadOfFill&&(b=!1),b){var z=y.se()?y.naturalBounds:y.actualBounds;y=Math.max(x.x,z.x),b=Math.max(x.y,z.y);var tt=Math.min(x.right,z.right)-y;x=Math.min(x.bottom,z.bottom)-b,z=this.tb,z!==null&&(y=z.x,b=z.y,tt=z.width,x=z.height),z=E.getAttribute("clip-path");var rt=null;z!==null&&(rt=a.svg.getElementById(z.split("#")[1].slice(0,-1))),rt===null?(z="CLIP"+eo++,rt=a.Ud("clipPath",{id:z}),y=a.Ud("rect",{x:y,y:b,width:tt,height:x}),this instanceof pn&&(b=this.transform.copy().Vj(),y.setAttribute("transform","matrix("+b.m11+", "+b.m12+", "+b.m21+", "+b.m22+", "+b.dx+", "+b.dy+")")),rt.appendChild(y),a.svg.appendChild(rt),E.setAttributeNS(null,"clip-path","url(#"+z+")")):(a=rt.firstElementChild,a.setAttribute("x",y.toString()),a.setAttribute("y",b.toString()),a.setAttribute("width",tt.toString()),a.setAttribute("height",x.toString()))}else E.removeAttributeNS(null,"clip-path"),Ya(a,E)};function Ya(a,y){y=y.getAttribute("clip-path"),y!==null&&(a=a.svg.getElementById(y.split("#")[1].slice(0,-1)),a!==null&&a.remove())}function ba(a){if(a.svg!==null){var y=a.svg.innerHTML.match(/url\(#((CLIP|GRAD).+?)\)/g),x=a.svg.ownerDocument;if(y!==null){y=Ci(y);for(var E=y.next();!E.done;E=y.next())E=x.getElementById(E.value.split("#")[1].slice(0,-1)),E!==null&&E.remove()}a.svg.remove()}}Ct.hh=function(){},Ct.lv=function(){this.Uc=!0},Ct.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 E=this.transform,b=this instanceof pn?Sd(this):!1;if(!(this instanceof pn&&b))if(this instanceof ms){var z=this.bt;a.rb.ha=[E.m11,E.m12,E.m21,E.m22,E.dx,E.dy],z!==null&&So(a,z[0],z[1],z[2],z[3],z[4],z[5],z[6],z[7]),x?y.lastElementChild.setAttributeNS(null,"transform",La(a)):y.setAttributeNS(null,"transform",La(a))}else if(!x||this instanceof pn)y.setAttributeNS(null,"transform","matrix("+E.m11+", "+E.m12+", "+E.m21+", "+E.m22+", "+E.dx+", "+E.dy+")");else if(this instanceof Ui){z=y.getElementsByTagName("path");for(var tt=0;tt<z.length;tt++)z[tt].setAttributeNS(null,"transform","matrix("+E.m11+", "+E.m12+", "+E.m21+", "+E.m22+", "+E.dx+", "+E.dy+")")}else y.lastElementChild.setAttributeNS(null,"transform","matrix("+E.m11+", "+E.m12+", "+E.m21+", "+E.m22+", "+E.dx+", "+E.dy+")");return z=this.Dd()?this.opacity*a.globalAlpha:this.opacity,z===1?y.removeAttribute("opacity"):y.setAttributeNS(null,"opacity",z.toString()),a.rb.ha=[1,0,0,1,0,0],(this.areaBackground!==null||y.gd!==void 0)&&(z=y.gd,this.areaBackground===null?(y.gd.remove(),y.gd=void 0):(tt=E.copy().Vj(),a.rb.ha=[tt.m11,tt.m12,tt.m21,tt.m22,tt.dx,tt.dy],As(this,a,this.naturalBounds,this.actualBounds),a.rb.ha=[1,0,0,1,0,0],y.gd?(tt=y.gd.getAttribute("filter"),tt!==null&&a.ad.setAttribute("filter",tt),y.gd.replaceWith(a.ad)):y.prepend(a.ad),y.gd=a.ad),z&&Mu(a,z)),(this.background!==null||y.Ma!==void 0)&&(z=y.Ma,this.background===null?(Mu(a,y.Ma),y.Ma.remove(),y.Ma=void 0):((b||x&&!(this instanceof pn))&&(a.rb.ha=[E.m11,E.m12,E.m21,E.m22,E.dx,E.dy]),ts(this,a,this.naturalBounds,this.actualBounds),y.Ma?(Mu(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),z&&Mu(a,z)),this.$o(a,this.panel,this.actualBounds,y),!0},Ct.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 fo(a,y,x,E,b,z,tt){if(x!==null){var rt=1,ot=1;if(typeof x=="string")E?y.fillStyle=x:y.strokeStyle=x;else if(x.type===yd)E?y.fillStyle=x.color:y.strokeStyle=x.color;else{var st=a.kq();if(rt=z.width,ot=z.height,b?(rt=tt.width,ot=tt.height):E||(rt+=st,ot+=st),(z=y instanceof uu)&&x.xe&&(x.type===rp||x.yk===rt&&x.ft===ot))var ut=x.xe;else{var ft=0,St=0,wt=0,Et=0,Bt=0,Vt=0;if(Vt=Bt=0,b?(Bt=tt.x,Vt=tt.y):E||(Bt-=st/2,Vt-=st/2),ft=x.start.x*rt+x.start.offsetX,St=x.start.y*ot+x.start.offsetY,wt=x.end.x*rt+x.end.offsetX,Et=x.end.y*ot+x.end.offsetY,ft+=Bt,wt+=Bt,St+=Vt,Et+=Vt,x.type===jh)ut=y.createLinearGradient(ft,St,wt,Et);else if(x.type===cl)Vt=isNaN(x.endRadius)?Math.max(rt,ot)/2:x.endRadius,isNaN(x.startRadius)?(Bt=0,Vt=Math.max(rt,ot)/2):Bt=x.startRadius,ut=y.createRadialGradient(ft,St,Bt,wt,Et,Vt);else if(x.type===rp)try{ut=y.createPattern(x.pattern,"repeat")}catch(_t){ut=null}if(x.type!==rp&&(b=x.colorStops,b!==null))for(b=b.iterator;b.next();)ut.addColorStop(b.key,b.value);if(z&&(x.xe=ut,ut!==null&&(x.yk=rt,x.ft=ot),ut===null&&x.type===rp&&x.yk!==-1)){x.yk=-1;var jt=a.diagram;jt!==null&&x.yk===-1&&$n(function(){jt.redraw()},600)}}E?y.fillStyle=ut:y.strokeStyle=ut}}}Ct.rg=function(a){if(a instanceof pn)t:{if(this!==a&&a!==null)for(var y=this.panel;y!==null;){if(y===a){a=!0;break t}y=y.panel}a=!1}else a=!1;return a},Ct.Ed=function(){if(!this.visible)return!1;var a=this.panel;return a!==null?a.Ed():!0},Ct.If=function(){for(var a=this instanceof pn?this:this.panel;a!==null&&a.isEnabled;)a=a.panel;return a===null};function ta(a){if(a.l&2048){var y=a.Ab;if(y.reset(),!a.Ib.w()||!a.uc.w()){Mt(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)}Mt(a,!1),Tt(a,!0)}a.l&4096&&(y=a.panel,y===null?(a.wh.set(a.Ab),a.Kk=a.scale,Tt(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,Tt(a,!1)))}Ct.no=function(a,y,x,E,b){if(this.Ca!==1&&a.scale(this.Ca),this.Kb!==0){var z=Gt.alloc();z.yi(y,x,E,b,Br),a.rotate(this.Kb,z.x,z.y),Gt.free(z)}},Ct.v=function(a){if(!Zt(this)){a===void 0&&(a=!1),Kt(this,!0),se(this,!0);var y=this.panel;y===null||a||y.v()}},Ct.Uj=function(){Zt(this)||(Kt(this,!0),se(this,!0))};function Ha(a){if(!te(a)){var y=a.panel;y!==null?y.v():a.Dd()&&(y=a.diagram,y!==null&&(y.De.add(a),a instanceof Vn&&a.Bd(),y.$b())),se(a,!0)}}Ct.Uk=function(){!(this.l&2048)&&(Mt(this,!0),Tt(this,!0))},Ct.Wu=function(){Tt(this,!0)},Ct.N=function(){var a=this.part;a!==null&&a.N()};function Xa(a,y){var x=a.stretch,E=a.panel;return E!==null&&E.type===pn.Table?El(a,E.Fb(a.row),E.Eb(a.column),y):E!==null&&E.type===pn.Auto&&E.Pb()===a?ea(a,dn,y):x===Ri?E!==null?E.type===pn.Spot&&E.Pb()===a?ea(a,dn,y):(x=E.defaultStretch,x===Ri?ea(a,on,y):ea(a,x,y)):ea(a,on,y):ea(a,x,y)}function El(a,y,x,E){var b=a.stretch;if(b!==Ri)return ea(a,b,E);var z=b=null;switch(y.stretch){case xi:z=!0;break;case dn:z=!0}switch(x.stretch){case ci:b=!0;break;case dn:b=!0}return y=a.panel.defaultStretch,b===null&&(b=y===ci||y===dn),z===null&&(z=y===xi||y===dn),b===!0&&z===!0?ea(a,dn,E):b===!0?ea(a,ci,E):z===!0?ea(a,xi,E):ea(a,on,E)}function ea(a,y,x){if(x)return y;if(y===on||(x=a.desiredSize,x.w()))return on;if(a=a.angle,!isNaN(x.width))if(a!==90&&a!==270){if(y===ci)return on;if(y===dn)return xi}else{if(y===xi)return on;if(y===dn)return ci}if(!isNaN(x.height))if(a!==90&&a!==270){if(y===xi)return on;if(y===dn)return ci}else{if(y===ci)return on;if(y===dn)return xi}return y}function qs(a,y){a.l=y?a.l|512:a.l&-513}function vt(a){return(a.l&1024)!==0}function xt(a,y){a.l=y?a.l|1024:a.l&-1025}function Mt(a,y){a.l=y?a.l|2048:a.l&-2049}function Tt(a,y){a.l=y?a.l|4096:a.l&-4097}function Zt(a){return(a.l&8192)!==0}function Kt(a,y){a.l=y?a.l|8192:a.l&-8193}function te(a){return(a.l&16384)!==0}function se(a,y){a.l=y?a.l|16384:a.l&-16385}Ct.Gj=function(){this.svg=null},Ct.wi=function(a){this.Me=a,this.svg!==null&&this.svg.remove()},Ct.Av=function(){},Ct.zv=function(a){return this.pa=a,Ha(this),!0},Ct.mm=function(a,y){(this.pa.x!==a||this.pa.y!==y)&&(this.pa.h(a,y),this.Uk())},Ct.kq=function(){return 0};function Oe(a){var y=a.part;if(y instanceof Vn&&(a.portId!==null||a===y.port)){var x=y.diagram;x===null||x.undoManager.isUndoingRedoing||U1(y,a)}}function Qe(a){var y=a.diagram;y===null||y.undoManager.isUndoingRedoing||(a instanceof pn?a instanceof Vn?a.Bd():a.qm(a,function(x){Oe(x)}):Oe(a))}Ct.bind=function(a,y,x,E){var b=null;return typeof a=="string"?b=new Do(a,y,x,E):b=a,b.xd=this,a=this.ih(),a!==null&&f1(a)&&pe("Cannot add a Binding to a template that has already been copied: "+b),this.localBindings===null&&(this.localBindings=new yn),this.localBindings.add(b),this},Ct.set=function(a){return Object.assign(this,a),this},Ct.Du=function(a){return We(this,a),this},Ct.apply=function(a){return a(this),this},Ct.nm=function(a){return dd(this,a),this},Ct.pz=function(){return this.ih()},Ct.ih=function(){for(var a=this instanceof pn?this:this.panel;a!==null;){if(a.allBindings!==null)return a;a=a.panel}return null},Ct.Jv=function(a){return a.xd=this,this.animationTriggers===null&&(this.animationTriggers=new yi),this.animationTriggers.add(a.propertyName,a),this};function Ke(a,y){for(var x=1;x<arguments.length;++x);x=arguments;var E=null,b=null;if(typeof a=="function")b=a;else if(typeof a=="string"){var z=Kn.I(a);typeof z=="function"?(x=hn(arguments),E=z(x),bn(E)||pe('GraphObject.make invoked object builder "'+a+'", but it did not return an Object')):b=Xe.go[a]}if(E===null&&(b!=null&&b.constructor||pe("GraphObject.make requires a class function or GoJS class name or name of an object builder, not: "+a),E=new b),b=1,E instanceof Be&&1<x.length){z=E;var tt=x[1];(typeof tt=="string"||tt instanceof HTMLDivElement)&&(Wf(z,tt),b++)}for(;b<x.length;b++)z=x[b],z===void 0?pe("Undefined value at argument "+b+" for object being constructed by GraphObject.make: "+E):We(E,z);return E}function We(a,y){if(typeof y=="string")if(a instanceof Xr)a.text=y;else if(a instanceof Ui)a.figure=y;else if(a instanceof ms)a.source=y;else if(a instanceof pn)y=Vl.I(y),y!==null&&(a.type=y);else if(a instanceof mr){var x=Un(mr,y);x!==null?a.type=x:pe("Unknown Brush type as an argument to GraphObject.make: "+y)}else a instanceof Fn?(y=Un(Fn,y),y!==null&&(a.type=y)):a instanceof xr&&(y=Un(xr,y),y!==null&&(a.type=y));else if(y instanceof fe)a instanceof pn||pe("A GraphObject can only be added to a Panel, not to: "+a),a.add(y);else if(y instanceof Vo){var E;y.isRow&&typeof a.getRowDefinition=="function"?E=a.getRowDefinition(y.index):y.isRow||typeof a.getColumnDefinition!="function"||(E=a.getColumnDefinition(y.index)),E instanceof Vo?qm(E,y):pe("A RowColumnDefinition can only be added to an object that implements getRowDefinition/getColumnDefinition, not to: "+a)}else if(y instanceof Je)typeof a.qb=="function"&&a.qb(y);else if(y instanceof Xo)a.type=y;else if(y instanceof Do)a instanceof fe||a instanceof Vo?a.bind(y):pe("A Binding can only be applied to a GraphObject or RowColumnDefinition, not to: "+a);else if(y instanceof hl)a instanceof fe?a.Jv(y):pe("An AnimationTrigger can only be applied to a GraphObject, not to: "+a);else if(y instanceof Yo)a instanceof Fn&&a.type===Fn.o?a.figures.add(y):pe("A PathFigure can only be added to a Path Geometry, not to: "+a);else if(y instanceof xr)a instanceof Yo?a.segments.add(y):pe("A PathSegment can only be added to a PathFigure, not to: "+a);else if(y instanceof ro)a instanceof Be||a instanceof Gi?a.layout=y:pe("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++)We(a,y[x]);else if(typeof y=="object"&&y!==null)if(a instanceof mr){x=new Ni;for(var b in y)E=parseFloat(b),isNaN(E)?x[b]=y[b]:a.addColorStop(E,y[b]);dd(a,x)}else if(a instanceof Vo){y.row!==void 0?(b=y.row,(b==null||b===1/0||isNaN(b)||0>b)&&pe("Must specify non-negative integer row for RowColumnDefinition "+y+", not: "+b),a.isRow=!0,a.index=b):y.column!==void 0&&(b=y.column,(b==null||b===1/0||isNaN(b)||0>b)&&pe("Must specify non-negative integer column for RowColumnDefinition "+y+", not: "+b),a.isRow=!1,a.index=b),b=new Ni;for(x in y)x!=="row"&&x!=="column"&&(b[x]=y[x]);dd(a,b)}else dd(a,y);else pe('Unknown initializer "'+y+'" for object being constructed by GraphObject.make: '+a)}function Ge(a,y){Kn.add(a,y)}function rn(a,y,x){x===void 0&&(x=null);var E=a[1];if(typeof x=="function"?x(E):typeof E=="string")return a.splice(1,1),E;if(y===void 0)throw Error("no "+(typeof x=="function"?"satisfactory":"string")+" argument for GraphObject builder "+a[0]);return y}we.Object.defineProperties(fe.prototype,{bindingId:{get:function(){return this.A!==null?this.A.zp:-1},set:function(a){this.bindingId!==a&&(this.A===null&&(this.A=new Ai),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 Ai),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 Ai),this.A.wm=a)}},shadowVisible:{get:function(){return this.A!==null?this.A.Ci:null},set:function(a){var y=this.shadowVisible;y!==a&&(Zi(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&&(Zi(this),this.A.Hb=a,this.g("enabledChanged",y,a))}},segmentOrientation:{get:function(){return this.Ua!==null?this.Ua.rr:ns},set:function(a){var y=this.segmentOrientation;y!==a&&(this.Ua===null&&(this.Ua=new Ti),this.Ua.rr=a,this.v(),this.g("segmentOrientation",y,a),a===ns&&(this.angle=0))}},segmentIndex:{get:function(){return this.Ua!==null?this.Ua.u:-1/0},set:function(a){a=Math.round(a);var y=this.segmentIndex;y!==a&&(this.Ua===null&&(this.Ua=new Ti),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 Ti),this.Ua.o=a,this.v(),this.g("segmentFraction",y,a))}},segmentOffset:{get:function(){return this.Ua!==null?this.Ua.F:Fo},set:function(a){var y=this.segmentOffset;y.D(a)||(a=a.J(),this.Ua===null&&(this.Ua=new Ti),this.Ua.F=a,this.v(),this.g("segmentOffset",y,a))}},stretch:{get:function(){return this.A!==null?this.A.hg:Ri},set:function(a){var y=this.stretch;y!==a&&(Zi(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&&(Zi(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)&&gi(a,"0 <= value <= 1",fe,"opacity"),this.pb=a,this.g("opacity",y,a),a=this.diagram,y=this.part,a!==null&&y!==null&&a.N(xf(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(xf(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(),Qe(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&&uc(a,"GraphObject.areaBackground"),a instanceof mr&&a.freeze(),Zi(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&&uc(a,"GraphObject.background"),a instanceof mr&&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 mi)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,E=this.pa,b=E.x;E=E.y,(b===y||isNaN(b)&&isNaN(y))&&(E===x||isNaN(E)&&isNaN(x))?this.Av():(a=a.copy(),this.zv(a,b,E)&&this.g("position",new Gt(b,E),a))}},actualBounds:{get:function(){return this.Ib}},scale:{get:function(){return this.Ca},set:function(a){var y=this.Ca;y!==a&&(0>=a&&pe("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,Qe(this),this.v(),this.g("angle",y,a)))}},desiredSize:{get:function(){return this.jd},set:function(a){var y=a.width,x=a.height,E=this.jd,b=E.width,z=E.height;(b===y||isNaN(b)&&isNaN(y))&&(z===x||isNaN(z)&&isNaN(x))||(this.jd=a=a.J(),this.v(),this instanceof Ui&&this.qc(),this.g("desiredSize",E,a),vt(this)&&(a=this.part,a!==null&&(Jr(this,a,"width"),Jr(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 Re(a,this.jd.height).freeze(),this.v(),this instanceof Ui&&this.qc(),this.g("desiredSize",y,a),vt(this)&&(a=this.part,a!==null&&Jr(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 Re(this.jd.width,a).freeze(),this.v(),this instanceof Ui&&this.qc(),this.g("desiredSize",y,a),vt(this)&&(a=this.part,a!==null&&Jr(this,a,"height")))}},minSize:{get:function(){return this.A!==null?this.A.u:Nn},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(),Zi(this),this.A.u=a,this.v(),this.g("minSize",y,a))}},maxSize:{get:function(){return this.A!==null?this.A.o:Sr},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(),Zi(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 Di(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&&ta(this),this.Ab}},oe:{get:function(){return this.l&4096&&ta(this),this.wh}},animationTriggers:{get:function(){return this.A!==null?this.A.hb:null},set:function(a){this.animationTriggers!==a&&(Zi(this),this.A.hb=a)}},reshapingBehavior:{get:function(){return this.A!==null?this.A.Pf:on},set:function(a){this.reshapingBehavior!==a&&(Zi(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()&&pe("GraphObject.alignment for "+this+" must be a real Spot or Spot.Default, not: "+a),this.Jb=a=a.J(),Ha(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&&gi(a,">= 0",fe,"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&&gi(a,">= 1",fe,"columnSpan"),Zi(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&&gi(a,">= 0",fe,"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&&gi(a,">= 1",fe,"rowSpan"),Zi(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&&(Zi(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 Vn||pe("Cannot set portID on a Link: "+a),y!==null&&x!==null&&qv(x,this),this.Yn=a,a!==null&&x!==null&&(x.Te=!0,Y1(x,this)),this.g("portId",y,a)}}},toSpot:{get:function(){return this.ba!==null?this.ba.yj:No},set:function(a){var y=this.toSpot;y.D(a)||(a=a.J(),this.Xc(),this.ba.yj=a,this.g("toSpot",y,a),Oe(this))}},toEndSegmentLength:{get:function(){return this.ba!==null?this.ba.wj:10},set:function(a){var y=this.toEndSegmentLength;y!==a&&(0>a&&gi(a,">= 0",fe,"toEndSegmentLength"),this.Xc(),this.ba.wj=a,this.g("toEndSegmentLength",y,a),Oe(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),Oe(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&&gi(a,">= 0",fe,"toMaxLinks"),this.Xc(),this.ba.Ur=a,this.g("toMaxLinks",y,a))}},fromSpot:{get:function(){return this.ba!==null?this.ba.Xi:No},set:function(a){var y=this.fromSpot;y.D(a)||(a=a.J(),this.Xc(),this.ba.Xi=a,this.g("fromSpot",y,a),Oe(this))}},fromEndSegmentLength:{get:function(){return this.ba!==null?this.ba.Vi:10},set:function(a){var y=this.fromEndSegmentLength;y!==a&&(0>a&&gi(a,">= 0",fe,"fromEndSegmentLength"),this.Xc(),this.ba.Vi=a,this.g("fromEndSegmentLength",y,a),Oe(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),Oe(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&&gi(a,">= 0",fe,"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&&(Zi(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&&(Zi(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&&(Zi(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&&(Zi(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&&(Zi(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&&(Zi(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&&(Zi(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&&(Zi(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&&(Zi(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&&(Zi(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&&(Zi(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&&(Zi(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&&(Zi(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&&(Zi(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&&(Zi(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&&(Zi(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&&(Zi(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&&(Zi(this),this.A.Ch=a,this.g("contextMenu",y,a))}}}),fe.prototype.trigger=fe.prototype.Jv,fe.prototype.findBindingPanel=fe.prototype.ih,fe.prototype.findTemplateBinder=fe.prototype.pz,fe.prototype.setProperties=fe.prototype.nm,fe.prototype.apply=fe.prototype.apply,fe.prototype.attach=fe.prototype.Du,fe.prototype.set=fe.prototype.set,fe.prototype.isEnabledObject=fe.prototype.If,fe.prototype.isVisibleObject=fe.prototype.Ed,fe.prototype.isContainedBy=fe.prototype.rg,fe.prototype.getNearestIntersectionPoint=fe.prototype.rs,fe.prototype.getLocalPoint=fe.prototype.qs,fe.prototype.getDocumentScale=fe.prototype.Df,fe.prototype.getDocumentAngle=fe.prototype.li,fe.prototype.getDocumentBounds=fe.prototype.mi,fe.prototype.getDocumentPoint=fe.prototype.ga,fe.prototype.intersectsRect=fe.prototype.Yc,fe.prototype.containedInRect=fe.prototype.fh,fe.prototype.containsRect=fe.prototype.Re,fe.prototype.containsPoint=fe.prototype.ca,fe.prototype.raiseChanged=fe.prototype.g,fe.prototype.raiseChangedEvent=fe.prototype.cb,fe.prototype.addCopyProperty=fe.prototype.Vw;var Kn=null;fe.className="GraphObject",Kn=new yi,Ge("Button",function(){function a(x,E){return x.diagram.ic(x.documentPoint,function(b){for(;b.panel!==null&&!b.isActionable;)b=b.panel;return b},function(b){return b===E})!==null}var y=Ke(pn,pn.Auto,{isActionable:!0,enabledChanged:function(x,E){if(x instanceof pn){var b=x.fb("ButtonBorder");b!==null&&(b.fill=E?x._buttonFillNormal:x._buttonFillDisabled)}},cursor:"pointer",_buttonFillNormal:"#F5F5F5",_buttonStrokeNormal:"#BDBDBD",_buttonFillOver:"#E0E0E0",_buttonStrokeOver:"#9E9E9E",_buttonFillPressed:"#BDBDBD",_buttonStrokePressed:"#9E9E9E",_buttonFillDisabled:"#E5E5E5"},Ke(Ui,{name:"ButtonBorder",figure:"RoundedRectangle",spot1:new pi(0,0,2.76142374915397,2.761423749153969),spot2:new pi(1,1,-2.76142374915397,-2.761423749153969),parameter1:2,parameter2:2,fill:"#F5F5F5",stroke:"#BDBDBD"}));return y.mouseEnter=function(x,E){if(E.If()&&E instanceof pn&&(x=E.fb("ButtonBorder"),x instanceof Ui)){var b=E._buttonFillOver;E._buttonFillNormal=x.fill,x.fill=b,b=E._buttonStrokeOver,E._buttonStrokeNormal=x.stroke,x.stroke=b}},y.mouseLeave=function(x,E){E.If()&&E instanceof pn&&(x=E.fb("ButtonBorder"),x instanceof Ui&&(x.fill=E._buttonFillNormal,x.stroke=E._buttonStrokeNormal))},y.actionDown=function(x,E){if(E.If()&&E instanceof pn&&E._buttonFillPressed!==null&&x.button===0){var b=E.fb("ButtonBorder");if(b instanceof Ui){x=x.diagram;var z=x.skipsUndoManager;x.skipsUndoManager=!0;var tt=E._buttonFillPressed;E._buttonFillOver=b.fill,b.fill=tt,tt=E._buttonStrokePressed,E._buttonStrokeOver=b.stroke,b.stroke=tt,x.skipsUndoManager=z}}},y.actionUp=function(x,E){if(E.If()&&E instanceof pn&&E._buttonFillPressed!==null&&x.button===0){var b=E.fb("ButtonBorder");if(b instanceof Ui){var z=x.diagram,tt=z.skipsUndoManager;z.skipsUndoManager=!0,a(x,E)?(b.fill=E._buttonFillOver,b.stroke=E._buttonStrokeOver):(b.fill=E._buttonFillNormal,b.stroke=E._buttonStrokeNormal),z.skipsUndoManager=tt}}},y.actionCancel=function(x,E){if(E.If()&&E instanceof pn&&E._buttonFillPressed!==null){var b=E.fb("ButtonBorder");if(b instanceof Ui){var z=x.diagram,tt=z.skipsUndoManager;z.skipsUndoManager=!0,a(x,E)?(b.fill=E._buttonFillOver,b.stroke=E._buttonStrokeOver):(b.fill=E._buttonFillNormal,b.stroke=E._buttonStrokeNormal),z.skipsUndoManager=tt}}},y.actionMove=function(x,E){if(E.If()&&E instanceof pn&&E._buttonFillPressed!==null){var b=x.diagram;if(b.firstInput.button===0&&(b.currentTool.standardMouseOver(),a(x,E)&&(x=E.fb("ButtonBorder"),x instanceof Ui))){var z=b.skipsUndoManager;b.skipsUndoManager=!0;var tt=E._buttonFillPressed;x.fill!==tt&&(x.fill=tt),tt=E._buttonStrokePressed,x.stroke!==tt&&(x.stroke=tt),b.skipsUndoManager=z}}},y}),Ge("TreeExpanderButton",function(){var a=Ke("Button",{_treeExpandedFigure:"MinusLine",_treeCollapsedFigure:"PlusLine"},Ke(Ui,{name:"ButtonIcon",figure:"MinusLine",stroke:"#424242",strokeWidth:2,desiredSize:Yi},new Do("figure","isTreeExpanded",function(y,x){return x=x.panel,y?x._treeExpandedFigure:x._treeCollapsedFigure}).cp()),{visible:!1},new Do("visible","isTreeLeaf",function(y){return!y}).cp());return a.click=function(y,x){if(x=x.part,x instanceof Pr&&(x=x.adornedPart),x instanceof Vn){var E=x.diagram;if(E!==null){if(E=E.commandHandler,x.isTreeExpanded){if(!E.canCollapseTree(x))return}else if(!E.canExpandTree(x))return;y.handled=!0,x.isTreeExpanded?E.collapseTree(x):E.expandTree(x)}}},a}),Ge("SubGraphExpanderButton",function(){var a=Ke("Button",{_subGraphExpandedFigure:"MinusLine",_subGraphCollapsedFigure:"PlusLine"},Ke(Ui,{name:"ButtonIcon",figure:"MinusLine",stroke:"#424242",strokeWidth:2,desiredSize:Yi},new Do("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 Pr&&(x=x.adornedPart),x instanceof Gi){var E=x.diagram;if(E!==null){if(E=E.commandHandler,x.isSubGraphExpanded){if(!E.canCollapseSubGraph(x))return}else if(!E.canExpandSubGraph(x))return;y.handled=!0,x.isSubGraphExpanded?E.collapseSubGraph(x):E.expandSubGraph(x)}}},a}),Ge("ToolTip",function(){return Ke(Pr,pn.Auto,{isShadowed:!0,shadowColor:"rgba(0, 0, 0, .4)",shadowOffset:new Gt(0,3),shadowBlur:5},Ke(Ui,{name:"Border",figure:"RoundedRectangle",parameter1:1,parameter2:1,fill:"#F5F5F5",stroke:"#F0F0F0",spot1:new pi(0,0,4,6),spot2:new pi(1,1,-4,-4)}))}),Ge("ContextMenu",function(){return Ke(Pr,pn.Vertical,{background:"#F5F5F5",isShadowed:!0,shadowColor:"rgba(0, 0, 0, .4)",shadowOffset:new Gt(0,3),shadowBlur:5},new Do("background","",function(a){return a.adornedPart!==null&&a.placeholder!==null?null:"#F5F5F5"}))}),Ge("ContextMenuButton",function(){var a=Ke("Button");a.stretch=ci;var y=a.fb("ButtonBorder");return y instanceof Ui&&(y.figure="Rectangle",y.strokeWidth=0,y.spot1=new pi(0,0,2,3),y.spot2=new pi(1,1,-2,-2)),a}),Ge("PanelExpanderButton",function(a){var y=rn(a,"COLLAPSIBLE"),x=Ke("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},Ke(Ui,{name:"ButtonIcon",strokeWidth:2},new Do("geometryString","visible",function(E){return E?x._buttonExpandedFigure:x._buttonCollapsedFigure}).cp(y)));return a=x.fb("ButtonBorder"),a instanceof Ui&&(a.stroke=null,a.fill="rgba(0, 0, 0, 0)"),x.click=function(E,b){var z=b.diagram;if(z!==null&&!z.isReadOnly){var tt=b.ih();tt===null&&(tt=b.part),tt!==null&&(b=tt.fb(y),b!==null&&(E.handled=!0,z.Ea("Collapse/Expand Panel"),b.visible=!b.visible,z.eb("Collapse/Expand Panel")))}},x}),Ge("CheckBoxButton",function(a){var y=rn(a);return a=Ke("Button",{desiredSize:new Re(14,14)},Ke(Ui,{name:"ButtonIcon",geometryString:"M0 0 M0 8.85 L4.9 13.75 16.2 2.45 M16.2 16.2",strokeWidth:2,stretch:dn,geometryStretch:ai,visible:!1},y!==""?new Do("visible",y).Kx():[])),a.click=function(x,E){if(E instanceof pn){var b=x.diagram;if(!(b===null||b.isReadOnly||y!==""&&b.model.isReadOnly)){x.handled=!0;var z=E.fb("ButtonIcon");b.Ea("checkbox"),z.visible=!z.visible,typeof E._doClick=="function"&&E._doClick(x,E),b.eb("checkbox")}}},a}),Ge("CheckBox",function(a){a=rn(a),a=Ke("CheckBoxButton",a,{name:"Button",isActionable:!1,margin:new Di(0,1,0,0)});var y=Ke(pn,"Horizontal",a,{isActionable:!0,cursor:a.cursor,margin:new Di(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}),fe.None=on=new Je(fe,"None",0),fe.Default=Ri=new Je(fe,"Default",0),fe.Vertical=xi=new Je(fe,"Vertical",4),fe.Horizontal=ci=new Je(fe,"Horizontal",5),fe.Fill=dn=new Je(fe,"Fill",3),fe.Uniform=ai=new Je(fe,"Uniform",1),fe.UniformToFill=rr=new Je(fe,"UniformToFill",2),fe.FlipVertical=Ki=new Je(fe,"FlipVertical",1),fe.FlipHorizontal=lr=new Je(fe,"FlipHorizontal",2),fe.FlipBoth=Rr=new Je(fe,"FlipBoth",3),fe.make=Ke,fe.getBuilders=function(){var a=new yi,y;for(y in Kn)if(y!==y.toLowerCase()){var x=Kn.I(y);typeof x=="function"&&a.add(y,x)}return a.freeze(),a},fe.defineBuilder=Ge,fe.build=function(a,y,x){for(var E=[],b=2;b<arguments.length;++b)E[b-2]=arguments[b];if(b=Kn.I(a),typeof b=="function"&&(E=b([a].concat(E)),E instanceof fe))return y&&E.set(y),E;pe('GraphObject.build invoked object builder "'+a+'", but it did not return an Object')},fe.takeBuilderArgument=rn;function Ai(){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=Nn,this.o=Sr,this.hg=Ri,this.ob=this.Bi=1,this.Pf=on,this.Pc=this.Ci=this.gd=null,this.Oc="category"}Ai.prototype.copy=function(){var a=new Ai;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 Ti(){this.u=-1/0,this.o=0,this.F=Fo,this.rr=ns,this.j=this.V="None"}Ti.prototype.copy=function(){var a=new Ti;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},Ti.className="LinkElementSettings";function Wi(){this.yj=this.Xi=ha,this.xj=this.Wi=this.wj=this.Vi=NaN,this.Tr=this.hq=null,this.Ur=this.iq=1/0}Wi.prototype.copy=function(){var a=new Wi;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},Wi.className="LinkSettings";function qi(){this.ha=[1,0,0,1,0,0]}qi.prototype.copy=function(){var a=new qi;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},qi.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},qi.prototype.scale=function(a,y){this.ha[0]*=a,this.ha[1]*=a,this.ha[2]*=y,this.ha[3]*=y},qi.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 E=1}else a===180?(a=-1,E=0):a===270?(a=0,E=-1):(E=a*Math.PI/180,a=Math.cos(E),E=Math.sin(E));var b=this.ha[1]*a+this.ha[3]*E,z=this.ha[0]*-E+this.ha[2]*a,tt=this.ha[1]*-E+this.ha[3]*a;this.ha[0]=this.ha[0]*a+this.ha[2]*E,this.ha[1]=b,this.ha[2]=z,this.ha[3]=tt,this.translate(-y,-x)}},qi.className="STransform";function ur(a){this.type=a,this.r2=this.y2=this.x2=this.r1=this.y1=this.x1=0,this.gx=[],this.pattern=null}ur.prototype.addColorStop=function(a,y){this.gx.push({offset:a,color:y})},ur.className="SGradient";function ar(a,y,x){this.ownerDocument=a=y===void 0?Xe.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 Tr(this,x)}ar.prototype.resize=function(a,y,x,E){return this.width!==a||this.height!==y?(this.width=a,this.height=y,this.style.width=x+"px",this.style.height=E+"px",this.Oa.setAttributeNS(null,"width",x+"px"),this.Oa.setAttributeNS(null,"height",E+"px"),this.Oa.setAttributeNS(null,"viewBox","0 0 "+x+" "+E),this.context.ww.firstElementChild.setAttributeNS(null,"width",x+"px"),this.context.ww.firstElementChild.setAttributeNS(null,"height",E+"px"),!0):!1},ar.prototype.Ud=function(a,y,x){if(a=this.ownerDocument.createElementNS(this.cA,a),bn(y))for(var E in y)a.setAttributeNS(E==="href"?"http://www.w3.org/1999/xlink":"",E,y[E]);return x!==void 0&&(a.textContent=x),a},ar.prototype.getBoundingClientRect=function(){return this.Oa.getBoundingClientRect()},ar.prototype.focus=function(){this.Oa.focus()},ar.prototype.mx=function(){this.ownerDocument=null},we.Object.defineProperties(ar.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}}}),ar.className="SVGSurface";function Tr(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 qi,this.j=$s(this),this.Nj=$s(this,"gojs-diagram"),this.Hl=this.ti=null;var x=eo++,E=this.Ud("clipPath",{id:"mainClip"+x});E.appendChild(this.Ud("rect",{x:0,y:0,width:a.width,height:a.height})),this.ww=E,this.svg.appendChild(this.j),this.j.appendChild(this.Nj),this.svg.appendChild(E),this.j.setAttributeNS(null,"clip-path","url(#mainClip"+x+")"),this.eA={},this.isTemporary=!!y,this.filter="",this.bk=null}function $r(a,y,x,E,b,z,tt){a.Nj===void 0?dl(a,y,x,E,b,z,tt):a.Nj.setAttribute("transform","matrix("+y+", "+x+", "+E+", "+b+", "+z+", "+tt+")")}Ct=Tr.prototype,Ct.arc=function(a,y,x,E,b,z,tt,rt){var ot=2*Math.PI,st=ot-1e-6,ut=x*Math.cos(E),ft=x*Math.sin(E),St=a+ut,wt=y+ft,Et=z?0:1;E=z?E-b:b-E,(1e-6<Math.abs(tt-St)||1e-6<Math.abs(rt-wt))&&this.path.push(["L",St,+wt]),0>E&&(E=E%ot+ot),E>st?(this.path.push(["A",x,x,0,1,Et,a-ut,y-ft]),this.path.push(["A",x,x,0,1,Et,St,wt])):1e-6<E&&this.path.push(["A",x,x,0,+(E>=Math.PI),Et,a+x*Math.cos(b),y+x*Math.sin(b)])},Ct.beginPath=function(){this.path=[],this.Yl={stroke:"none",fill:"none"}},Ct.Se=function(a){this.addPath(this.path,this.rb,a||0)},Ct.bezierCurveTo=function(a,y,x,E,b,z){this.path.push(["C",a,y,x,E,b,z])},Ct.clearRect=function(){},Ct.clip=function(){this.Yl.clipPath=!0},Ct.closePath=function(){this.path.push(["z"])},Ct.createLinearGradient=function(a,y,x,E){var b=new ur("linear");return b.x1=a,b.y1=y,b.x2=x,b.y2=E,b},Ct.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 E="PATTERN"+eo++,b={x:0,y:0,width:a.width,height:a.height,href:y};return a=this.Ud("pattern",{width:a.width,height:a.height,id:E,patternUnits:"userSpaceOnUse"}),a.appendChild(this.Ud(Ih,b)),this.svg.appendChild(a),x[y]=E,"url(#"+E+")"},Ct.createRadialGradient=function(a,y,x,E,b,z){var tt=new ur("radial");return tt.x1=a,tt.y1=y,tt.r1=x,tt.x2=E,tt.y2=b,tt.r2=z,tt};function So(a,y,x,E,b,z,tt,rt,ot){E=rt/E,b=ot/b,z===0&&tt===0||a.rb.translate(z,tt),E===1&&b===1||a.rb.scale(E,b),y===0&&x===0||a.rb.translate(-y,-x)}Ct.drawImage=function(a,y,x,E,b,z,tt,rt,ot){var st="";a instanceof HTMLCanvasElement&&(st=a.toDataURL()),a instanceof HTMLImageElement&&(st=a.getAttribute("src"));var ut=a instanceof HTMLImageElement?a.naturalWidth:a.width;a=a instanceof HTMLImageElement?a.naturalHeight:a.height,E===void 0&&(z=y,tt=x,rt=E=ut,ot=b=a),E=E||0,b=b||0,rt=rt||0,ot=ot||0,So(this,y,x,E,b,z||0,tt||0,rt,ot),z={x:0,y:0,width:ut||E,height:a||b,href:st},Se.$(E,rt)&&Se.$(b,ot)?st.toLowerCase().indexOf(".svg")===-1&&st.toLowerCase().indexOf("data:image/svg")===-1&&(z.preserveAspectRatio="xMidYMid slice"):z.preserveAspectRatio="none",(y!==0||x!==0||E!==ut||b!==a)&&(E+=y,b+=x,z["clip-path"]="path('M "+y+","+x+" L "+E+" "+x+" L "+E+" "+b+" L "+y+" "+b+" z')"),po(this,Ih,z,this.rb),this.addElement(Ih,z)},Ct.fill=function(a){a&&(this.Yl["fill-rule"]="evenodd"),xa(this,this.Yl)},Ct.ng=function(a,y){this.clipInsteadOfFill?this.clip():this.fill(y)},Ct.fillRect=function(a,y,x,E){a=[a,y,x,E],a={x:a[0],y:a[1],width:a[2],height:a[3]},po(this,"fill",a,this.rb),this.addElement("rect",a)},Ct.ox=function(a,y,x,E){a={x:a,y,width:x,height:E},po(this,"fill",a,this.rb),xa(this,a),this.svg.prepend(this.Ud("rect",a))},Ct.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},po(this,"fill",y,this.rb),this.addElement("text",y,a[0])},Ct.lineTo=function(a,y){this.path.push(["L",a,y])},Ct.moveTo=function(a,y){this.path.push(["M",a,y])},Ct.quadraticCurveTo=function(a,y,x,E){this.path.push(["Q",a,y,x,E])},Ct.rect=function(a,y,x,E){this.path.push(["M",a,y],["L",a+x,y],["L",a+x,y+E],["L",a,y+E],["z"])},Ct.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},Ct.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())},Ct.setTransform=function(a,y,x,E,b,z){a===1&&y===0&&x===0&&E===1&&b===0&&z===0||dl(this,a,y,x,E,b,z)};function La(a){return a=a.rb.ha,"matrix("+a[0]+", "+a[1]+", "+a[2]+", "+a[3]+", "+a[4]+", "+a[5]+")"}Ct.scale=function(a,y){this.rb.scale(a,y)},Ct.translate=function(a,y){this.rb.translate(a,y)},Ct.transform=function(){},Ct.yc=function(){},Ct.stroke=function(){Bs(this,this.Yl)},Ct.jk=function(){this.clipInsteadOfFill||this.stroke()},Ct.Ud=function(a,y,x){return this.Gv.Ud(a,y,x)},Ct.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 po(a,y,x,E){y==="fill"?xa(a,x):y==="stroke"&&Bs(a,x),E!==null&&(a=E.ha,x.transform="matrix("+a[0]+", "+a[1]+", "+a[2]+", "+a[3]+", "+a[4]+", "+a[5]+")")}function xa(a,y){a.fillStyle instanceof ur?y.fill=lu(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 gs(a,y,x){x=x?"fill":"stroke",a.fillStyle instanceof ur?y.setAttributeNS(null,"fill",lu(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 Bs(a,y){if(a.strokeStyle instanceof ur)y.stroke=lu(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 lu(a,y,x){var E="";if(E=a.Hl!==null?a.Hl.getAttribute(x?"fill":"stroke"):null,E!==null&&E.indexOf("GRAD")!==-1?(E=E.split("#")[1].slice(0,-1),x=a.svg.getElementById(E),x!==null&&x.remove()):E="GRAD"+eo++,y.type==="linear")x=a.Ud("linearGradient",{x1:y.x1,x2:y.x2,y1:y.y1,y2:y.y2,id:E,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:E});else throw Error("invalid gradient");var b=y.gx;y=b.length;for(var z=[],tt=0;tt<y;tt++){var rt=b[tt],ot=rt.color;rt={offset:rt.offset,"stop-color":ot},/^rgba\(/.test(ot)&&(ot=/^\s*rgba\s*\(([^,\s]+)\s*,\s*([^,\s]+)\s*,\s*([^,\s]+)\s*,\s*([^,\s]+)\)\s*$/i.exec(ot),rt["stop-color"]="rgb("+ot[1]+","+ot[2]+","+ot[3]+")",rt["stop-opacity"]=ot[4]),z.push(rt)}for(z.sort(function(st,ut){return st.offset>ut.offset?1:-1}),b=0;b<y;b++)x.appendChild(a.Ud("stop",z[b]));return a.svg.appendChild(x),"url(#"+E+")"}Ct.addPath=function(a,y,x){for(var E=[],b=0;b<a.length;b++){var z=hn(a[b]),tt=[z.shift()];if(tt[0]==="A")tt.push(z.shift()+","+z.shift(),z.shift(),z.shift()+","+z.shift(),z.shift()+","+z.shift());else for(;z.length;)tt.push(z.shift()+","+z.shift());E.push(tt.join(" "))}if(E=E.join(" "),a=this.Yl,a.clipPath)0<this.nh.length&&this.nh[this.nh.length-1].setAttributeNS(null,"clip-path",'path("'+E+'")');else if(a.d=E,po(this,"",a,y),this.Hl!==null)if(y=this.Hl,y.nodeName!=="g")for(var rt in a)rt!=="transform"&&y.setAttributeNS(null,rt,a[rt]);else{rt=y.getElementsByTagName("path");for(var ot in a)ot!=="transform"&&rt[x].setAttributeNS(null,ot,a[ot])}else this.addElement("path",a)};function dl(a,y,x,E,b,z,tt){var rt=new qi;rt.ha=[y,x,E,b,z,tt],y={},po(a,"g",y,rt),rt=a.addElement("g",y),a.nh.push(rt)}function $s(a,y){var x={};return y&&(x.class=y),y=a.addElement("g",x),a.nh.push(y),y}Ct.Ev=function(a,y,x){this.Ar=a,this.Br=y,this.Vg=x};function _a(a){a.Il=!1,a.shadowOffsetX=0,a.shadowOffsetY=0,a.shadowBlur=0}function la(a){a.Il=!0,a.shadowOffsetX=a.Ar,a.shadowOffsetY=a.Br,a.shadowBlur=a.Vg}Ct.js=function(a,y){this.Ct=!0,this.Yg=a,this.uj=y},Ct.fs=function(){this.Ct=!1},Ct.Vc=function(){},Ct.Wx=function(){},Tr.prototype.rotate=function(a){this.rb.rotate(57.2958*a,0,0)},Tr.prototype.getImageData=function(){return null},Tr.prototype.measureText=function(){return null};function Mu(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()))}Tr.prototype.Hs=function(a){a.svg!==null&&a.svg.parentNode===this.Nj&&a.svg.remove()},Tr.className="SVGContext",Be.prototype.Cs=function(a){this.pj.contains("SVG")||this.bs("SVG",new ar(this,Xe.document));var y=new ar(this,Xe.document,!0);a===void 0&&(a=new Ni);var x=this;return Nh(this,function(E,b){return E=Qg(x,E,"SVG",y),E=E!==null?E.svg:null,typeof b=="function"?(b(E),null):E},a)},Be.prototype.makeSvg=Be.prototype.Cs,Be.prototype.av=function(a){return this.Cs(a)},Be.prototype.makeSVG=Be.prototype.av;function Pa(a,y,x,E){this.ownerDocument=y=y===void 0?Xe.document:y,this.hs=null,y=y.createElement("canvas"),y.tabIndex=0,this.Oa=y,this.context=new uu(y,x,E),y.H=a}Pa.prototype.resize=function(a,y,x,E){return this.width!==a||this.height!==y?(this.width=a,this.height=y,this.style.width=x+"px",this.style.height=E+"px",!0):!1},Pa.prototype.toDataURL=function(a,y){return this.Oa.toDataURL(a,y)},Pa.prototype.getBoundingClientRect=function(){return this.Oa.getBoundingClientRect()},Pa.prototype.focus=function(){this.Oa.focus()},Pa.prototype.mx=function(){this.ownerDocument=this.Oa.H=null},we.Object.defineProperties(Pa.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}}}),Pa.className="CanvasSurface";function uu(a,y,x){this.Z=a.getContext?a.getContext("2d",y):null,this.Z===null&&pe("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 Xi,this.isTemporary=!!x}Ct=uu.prototype,Ct.Wx=function(a){this.Z.imageSmoothingEnabled=a},Ct.arc=function(a,y,x,E,b,z){this.Z.arc(a,y,x,E,b,z)},Ct.beginPath=function(){this.Z.beginPath()},Ct.Se=function(){},Ct.bezierCurveTo=function(a,y,x,E,b,z){this.Z.bezierCurveTo(a,y,x,E,b,z)},Ct.clearRect=function(a,y,x,E){this.yc(),this.Z.clearRect(a,y,x,E)},Ct.clip=function(){this.Z.clip()},Ct.closePath=function(){this.Z.closePath()},Ct.createLinearGradient=function(a,y,x,E){return this.Z.createLinearGradient(a,y,x,E)},Ct.createPattern=function(a,y){return this.Z.createPattern(a,y)},Ct.createRadialGradient=function(a,y,x,E,b,z){return this.Z.createRadialGradient(a,y,x,E,b,z)},Ct.drawImage=function(a,y,x,E,b,z,tt,rt,ot){E===void 0?this.Z.drawImage(a,y,x):this.Z.drawImage(a,y,x,E,b,z,tt,rt,ot)},Ct.fill=function(a){this.Z.fill(a?"evenodd":"nonzero")},Ct.fillRect=function(a,y,x,E){this.Z.fillRect(a,y,x,E)},Ct.ox=function(a,y,x,E){this.Z.fillRect(a,y,x,E)},Ct.fillText=function(a,y,x){this.Z.fillText(a,y,x)},Ct.getImageData=function(a,y,x,E){return this.Z.getImageData(a,y,x,E)},Ct.lineTo=function(a,y){this.Z.lineTo(a,y)},Ct.measureText=function(a){return this.Z.measureText(a)},Ct.moveTo=function(a,y){this.Z.moveTo(a,y)},Ct.quadraticCurveTo=function(a,y,x,E){this.Z.quadraticCurveTo(a,y,x,E)},Ct.rect=function(a,y,x,E){this.Z.rect(a,y,x,E)},Ct.restore=function(){this.Z.restore()},Ct.save=function(){this.yc(),this.Z.save()},uu.prototype.rotate=function(a){this.El.rotate(57.2958*a,0,0)},Ct=uu.prototype,Ct.setTransform=function(a,y,x,E,b,z){this.El.setTransform(a,y,x,E,b,z)},Ct.scale=function(a,y){this.El.scale(a,y)},Ct.translate=function(a,y){this.El.translate(a,y)},Ct.stroke=function(){this.Z.stroke()},Ct.transform=function(a,y,x,E,b,z){if(a!==1||y!==0||x!==0||E!==1||b!==0||z!==0){var tt=this.El,rt=tt.m11*a+tt.m21*y;a=tt.m12*a+tt.m22*y,y=tt.m11*x+tt.m21*E,x=tt.m12*x+tt.m22*E,tt.dx=tt.m11*b+tt.m21*z+tt.dx,tt.dy=tt.m12*b+tt.m22*z+tt.dy,tt.m11=rt,tt.m12=a,tt.m21=y,tt.m22=x}},Ct.yc=function(){var a=this.El;this.Z.setTransform(a.m11,a.m12,a.m21,a.m22,a.dx,a.dy)},Ct.ng=function(a,y){if(a instanceof mr&&a.type===cl){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)},Ct.jk=function(){this.Hm||this.stroke()},Ct.Ev=function(a,y,x){this.Ar=a,this.Br=y,this.Vg=x},Ct.js=function(a,y){var x=this.Z;x.setLineDash!==void 0&&(x.setLineDash(a),x.lineDashOffset=y)},Ct.fs=function(){var a=this.Z;a.setLineDash!==void 0&&(a.setLineDash(lc),a.lineDashOffset=0)},Ct.Vc=function(a){a&&(this.dt=""),this.ct=this.et=""},Ct.Hs=function(){},we.Object.defineProperties(uu.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 lc=Object.freeze([]);uu.className="CanvasSurfaceContext";function hu(){this.F=this.o=this.u=this.j=0}hu.className="ColorNumbers";function mr(a,y){ip||(np(),ip=!0),Zr(this),this._isFrozen=!1,a===void 0?(this.na=yd,this.xk="black"):typeof a=="string"?(this.na=yd,this.xk=a):(this.na=a,this.xk="black"),a=this.na,a===jh?(this.Qd=Ta,this.Lk=Ko):this.Lk=a===cl?this.Qd=Br:this.Qd=No,this.Gr=0,this.Xp=NaN,this.xe=this.cr=this.we=null,this.ft=this.yk=0,y&&Object.assign(this,y)}mr.prototype.copy=function(){var a=new mr;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},Ct=mr.prototype,Ct.freeze=function(){return this._isFrozen=!0,this.we!==null&&this.we.freeze(),this},Ct.ka=function(){return Object.isFrozen(this)&&pe("cannot thaw constant: "+this),this._isFrozen=!1,this.we!==null&&this.we.ka(),this},Ct.qb=function(a){a.classType===mr&&(this.type=a)},Ct.toString=function(){var a="Brush(";if(this.type===yd)a+=this.color;else if(a=this.type===jh?a+"Linear ":this.type===cl?a+"Radial ":this.type===rp?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+")"},Ct.addColorStop=function(a,y){return this._isFrozen&&Tn(this),(typeof a!="number"||!isFinite(a)||1<a||0>a)&&gi(a,"0 <= loc <= 1",mr,"addColorStop:loc"),this.we===null&&(this.we=new yi),this.we.add(a,y),this.na===yd&&(this.type=jh),this.xe=null,this},Ct.Vz=function(a,y){if(this._isFrozen&&Tn(this),a=a===void 0||typeof a!="number"?.2:a,y=y===void 0?op:y,this.type===yd)tl(this.color),this.color=Rh(a,y);else if((this.type===jh||this.type===cl)&&this.colorStops!==null)for(var x=this.colorStops.iterator;x.next();)tl(x.value),this.addColorStop(x.key,Rh(a,y));return this};function vd(a,y,x){return y=y===void 0||typeof y!="number"?.2:y,x=x===void 0?op:x,tl(a),Rh(y,x)}Ct.Wy=function(a,y){if(this._isFrozen&&Tn(this),a=a===void 0||typeof a!="number"?.2:a,y=y===void 0?op:y,this.type===yd)tl(this.color),this.color=Rh(-a,y);else if((this.type===jh||this.type===cl)&&this.colorStops!==null)for(var x=this.colorStops.iterator;x.next();)tl(x.value),this.addColorStop(x.key,Rh(-a,y));return this};function dg(a,y,x){return y=y===void 0||typeof y!="number"?.2:y,x=x===void 0?op:x,tl(a),Rh(-y,x)}function du(a,y,x){tl(a),a=Hr.j;var E=Hr.u,b=Hr.o,z=Hr.F;return tl(y),x===void 0&&(x=.5),"rgba("+Math.round((Hr.j-a)*x+a)+", "+Math.round((Hr.u-E)*x+E)+", "+Math.round((Hr.o-b)*x+b)+", "+Math.round((Hr.F-z)*x+z)+")"}Ct.Gx=function(){if(this.type===yd)return nh(this.color);if((this.type===jh||this.type===cl)&&this.colorStops!==null){var a=this.colorStops;if(this.type===cl)return nh(a.first().value);if(a.get(.5)!==null)return nh(a.get(.5));if(a.count===2)return a=a.Fa(),nh(du(a[0].value,a[1].value));for(var y=a.iterator,x=-1,E=-1,b=1,z=1;y.next();){var tt=y.key,rt=Math.abs(.5-y.key);b>z&&rt<b?(x=tt,b=rt):z>=b&&rt<z&&(E=tt,z=rt)}return x>E&&(z=x,x=E,E=z,z=b),b=E-x,nh(du(a.get(x),a.get(E),1-z/b))}return!1};function nh(a){return a?a instanceof mr?a.Gx():(tl(a),128>(299*Hr.j+587*Hr.u+114*Hr.o)/1e3):!1}function Rh(a,y){switch(y){case op:y=100*mf(Hr.j);var x=100*mf(Hr.u),E=100*mf(Hr.o);return ga.j=.4124564*y+.3575761*x+.1804375*E,ga.u=.2126729*y+.7151522*x+.072175*E,ga.o=.0193339*y+.119192*x+.9503041*E,ga.F=Hr.F,y=Wp(ga.j/dc[0]),x=Wp(ga.u/dc[1]),E=Wp(ga.o/dc[2]),bl.j=116*x-16,bl.u=500*(y-x),bl.o=200*(x-E),bl.F=ga.F,bl.j=Math.min(100,Math.max(0,bl.j+100*a)),a=(bl.j+16)/116,y=a-bl.o/200,ga.j=dc[0]*cg(bl.u/500+a),ga.u=dc[1]*(bl.j>hc*fg?Math.pow(a,3):bl.j/hc),ga.o=dc[2]*cg(y),ga.F=bl.F,a=-.969266*ga.j+1.8760108*ga.u+.041556*ga.o,y=.0556434*ga.j+-.2040259*ga.u+1.0572252*ga.o,Hr.j=255*ep((3.2404542*ga.j+-1.5371385*ga.u+-.4985314*ga.o)/100),Hr.u=255*ep(a/100),Hr.o=255*ep(y/100),Hr.F=ga.F,Hr.j=Math.round(Hr.j),255<Hr.j?Hr.j=255:0>Hr.j&&(Hr.j=0),Hr.u=Math.round(Hr.u),255<Hr.u?Hr.u=255:0>Hr.u&&(Hr.u=0),Hr.o=Math.round(Hr.o),255<Hr.o?Hr.o=255:0>Hr.o&&(Hr.o=0),"rgba("+Hr.j+", "+Hr.u+", "+Hr.o+", "+Hr.F+")";case i1:return pf(),ks.o=Math.min(100,Math.max(0,ks.o+100*a)),"hsla("+ks.j+", "+ks.u+"%, "+ks.o+"%, "+ks.F+")";default:pe("Unknown color space: "+y)}}function tl(a){ip||(np(),ip=!0);var y=gg;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,Hr.j=a[0],Hr.u=a[1],Hr.o=a[2],Hr.F=a[3]/255):(y.fillStyle="#FFFFFF",y.fillStyle=a,Hr.j=0,Hr.u=0,Hr.o=0,Hr.F=1)}}function pf(){var a=Hr.j/255,y=Hr.u/255,x=Hr.o/255,E=Math.max(a,y,x),b=Math.min(a,y,x),z=E-b;if(b=(E+b)/2,z===0)var tt=a=0;else{switch(E){case a:tt=(y-x)/z%6;break;case y:tt=(x-a)/z+2;break;case x:tt=(a-y)/z+4}tt*=60,0>tt&&(tt+=360),a=z/(1-Math.abs(2*b-1))}ks.j=Math.round(tt),ks.u=Math.round(100*a),ks.o=Math.round(100*b),ks.F=Hr.F}function mf(a){return a/=255,.04045>=a?a/12.92:Math.pow((a+.055)/1.055,2.4)}function ep(a){return .0031308>=a?12.92*a:1.055*Math.pow(a,1/2.4)-.055}function Wp(a){return a>fg?Math.pow(a,1/3):(hc*a+16)/116}function cg(a){var y=a*a*a;return y>fg?y:(116*a-16)/hc}function uc(a,y){typeof a!="string"&&(a instanceof mr||pe("Value for "+y+" must be a color string or a Brush, not "+a))}function np(){gg=co?new Pa(null,void 0,{willReadFrequently:!0}).context:null}we.Object.defineProperties(mr.prototype,{type:{get:function(){return this.na},set:function(a){this._isFrozen&&Tn(this,a),this.na=a,this.start.Mc()&&(a===jh?this.start=Ta:a===cl&&(this.start=Br)),this.end.Mc()&&(a===jh?this.end=Ko:a===cl&&(this.end=Br)),this.xe=null}},color:{get:function(){return this.xk},set:function(a){this._isFrozen&&Tn(this,a),this.xk=a,this.xe=null}},start:{get:function(){return this.Qd},set:function(a){this._isFrozen&&Tn(this,a),this.Qd=a.J(),this.xe=null}},end:{get:function(){return this.Lk},set:function(a){this._isFrozen&&Tn(this,a),this.Lk=a.J(),this.xe=null}},startRadius:{get:function(){return this.Gr},set:function(a){this._isFrozen&&Tn(this,a),0>a&&gi(a,">= zero",mr,"startRadius"),this.Gr=a,this.xe=null}},endRadius:{get:function(){return this.Xp},set:function(a){this._isFrozen&&Tn(this,a),0>a&&gi(a,">= zero",mr,"endRadius"),this.Xp=a,this.xe=null}},colorStops:{get:function(){return this.we},set:function(a){this._isFrozen&&Tn(this,a),this.we=a,this.xe=null}},pattern:{get:function(){return this.cr},set:function(a){this._isFrozen&&Tn(this,a),this.cr=a,this.xe=null}}}),mr.prototype.isDark=mr.prototype.Gx,mr.prototype.darkenBy=mr.prototype.Wy,mr.prototype.lightenBy=mr.prototype.Vz,mr.prototype.addColorStop=mr.prototype.addColorStop;var fg=216/24389,hc=24389/27,dc=[95.047,100,108.883],gg=null,Hr=new hu,ks=new hu,ga=new hu,bl=new hu,ip=!1;mr.className="Brush";var yd;mr.Solid=yd=new Je(mr,"Solid",0);var jh;mr.Linear=jh=new Je(mr,"Linear",1);var cl;mr.Radial=cl=new Je(mr,"Radial",2);var rp;mr.Pattern=rp=new Je(mr,"Pattern",4);var op;mr.Lab=op=new Je(mr,"Lab",5);var i1;mr.HSL=i1=new Je(mr,"HSL",6),mr.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 E=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>E.length&&(E="0"+E),2>a.length&&(a="0"+a),"#"+y+E+a},mr.isValidColor=function(a){if(a==="black")return!0;if(a==="")return!1;ip||(np(),ip=!0);var y=gg;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)},mr.lighten=function(a){return vd(a)},mr.lightenBy=vd,mr.darken=function(a){return dg(a)},mr.darkenBy=dg,mr.mix=du,mr.isDark=nh;function Xo(){this.xa="Base"}Xo.prototype.measure=function(){},Xo.prototype.Yz=function(a,y,x,E,b){a.measure(y,x,E,b)},Xo.prototype.arrange=function(){},Xo.prototype.Ly=function(a,y,x,E,b,z){a.arrange(y,x,E,b,z)},Xo.prototype.iA=function(a){a.Uj()},Xo.prototype.gc=function(){},we.Object.defineProperties(Xo.prototype,{name:{get:function(){return this.xa},set:function(a){this.xa=a}},classType:{get:function(){return pn}}}),Xo.prototype.remeasureObject=Xo.prototype.iA,Xo.prototype.arrangeElement=Xo.prototype.Ly,Xo.prototype.measureElement=Xo.prototype.Yz,Xo.className="PanelLayout";function jm(){this.xa="Base"}Ce(jm,Xo),jm.prototype.measure=function(a,y,x,E,b,z,tt){var rt=E.length;a=zh(a);for(var ot=0;ot<rt;ot++){var st=E[ot];if(st.visible||st===a){var ut=st.margin,ft=ut.right+ut.left;ut=ut.top+ut.bottom,st.measure(y,x,z,tt);var St=st.measuredBounds;ft=Math.max(St.width+ft,0),ut=Math.max(St.height+ut,0),St=st.position.x;var wt=st.position.y;isFinite(St)||(St=0),isFinite(wt)||(wt=0),st instanceof Ui&&st.isGeometryPositioned&&(st=st.strokeWidth/2,St-=st,wt-=st),Ar(b,St,wt,ft,ut)}}},jm.prototype.arrange=function(a,y,x){var E=y.length,b=a.padding;for(a=x.x-b.left,x=x.y-b.top,b=0;b<E;b++){var z=y[b],tt=z.measuredBounds,rt=z.margin,ot=z.position.x,st=z.position.y;if(ot=isNaN(ot)?-a:ot-a,st=isNaN(st)?-x:st-x,z instanceof Ui&&z.isGeometryPositioned){var ut=z.strokeWidth/2;ot-=ut,st-=ut}z.visible&&z.arrange(ot+rt.left,st+rt.top,tt.width,tt.height)}};function zm(){this.xa="Base"}Ce(zm,Xo),zm.prototype.measure=function(a,y,x,E,b,z,tt){var rt=E.length;y=Si(),z=zh(a);for(var ot=0;ot<rt;ot++){var st=E[ot];if(st.visible||st===z){var ut=Xa(st,!1);if(ut!==on&&ut!==ci)y.push(st);else{st.measure(1/0,x,0,tt),ut=st.margin,st=st.measuredBounds;var ft=Math.max(st.height+ut.top+ut.bottom,0);b.width+=Math.max(st.width+ut.right+ut.left,0),b.height=Math.max(b.height,ft)}}}for(E=y.length,a.desiredSize.height?x=Math.min(a.desiredSize.height,a.maxSize.height):b.height!==0&&(x=Math.min(b.height,a.maxSize.height)),a=0;a<E;a++)ot=y[a],(ot.visible||ot===z)&&(ut=ot.margin,rt=ut.right+ut.left,ut=ut.top+ut.bottom,ot.measure(1/0,x,0,tt),ot=ot.measuredBounds,ut=Math.max(ot.height+ut,0),b.width+=Math.max(ot.width+rt,0),b.height=Math.max(b.height,ut));wi(y)},zm.prototype.arrange=function(a,y,x){for(var E=y.length,b=a.padding,z=b.top,tt=a.isOpposite,rt=tt?x.width:b.left,ot=0;ot<E;ot++){var st=z,ut=y[ot];if(ut.visible){var ft=ut.measuredBounds,St=ut.margin,wt=St.top+St.bottom,Et=z+b.bottom,Bt=ft.height,Vt=Xa(ut,!1);(isNaN(ut.desiredSize.height)&&Vt===dn||Vt===xi)&&(Bt=Math.max(x.height-wt-Et,0)),wt=Bt+wt+Et,Et=ut.alignment,Et.Xb()&&(Et=a.defaultAlignment),Et.sb()||(Et=Br),tt&&(rt-=ft.width+St.left+St.right),ut.arrange(rt+Et.offsetX+St.left,st+Et.offsetY+St.top+(x.height*Et.y-wt*Et.y),ft.width,Bt),tt||(rt+=ft.width+St.left+St.right)}}};function Gm(){this.xa="Base"}Ce(Gm,Xo),Gm.prototype.measure=function(a,y,x,E,b,z){var tt=E.length;x=Si();for(var rt=zh(a),ot=0;ot<tt;ot++){var st=E[ot];if(st.visible||st===rt){var ut=Xa(st,!1);if(ut!==on&&ut!==xi)x.push(st);else{var ft=st.margin;ut=ft.right+ft.left,ft=ft.top+ft.bottom,st.measure(y,1/0,z,0),st=st.measuredBounds,Go(b,Math.max(b.width,Math.max(st.width+ut,0)),b.height+Math.max(st.height+ft,0))}}}if(E=x.length,E!==0){for(a.desiredSize.width?y=Math.min(a.desiredSize.width,a.maxSize.width):b.width!==0&&(y=Math.min(b.width,a.maxSize.width)),a=0;a<E;a++)ot=x[a],(ot.visible||ot===rt)&&(st=ot.margin,tt=st.right+st.left,st=st.top+st.bottom,ot.measure(y,1/0,z,0),ot=ot.measuredBounds,st=Math.max(ot.height+st,0),b.width=Math.max(b.width,Math.max(ot.width+tt,0)),b.height+=st);wi(x)}},Gm.prototype.arrange=function(a,y,x){for(var E=y.length,b=a.padding,z=b.left,tt=a.isOpposite,rt=tt?x.height:b.top,ot=0;ot<E;ot++){var st=z,ut=y[ot];if(ut.visible){var ft=ut.measuredBounds,St=ut.margin,wt=St.left+St.right,Et=z+b.right,Bt=ft.width,Vt=Xa(ut,!1);(isNaN(ut.desiredSize.width)&&Vt===dn||Vt===ci)&&(Bt=Math.max(x.width-wt-Et,0)),wt=Bt+wt+Et,Et=ut.alignment,Et.Xb()&&(Et=a.defaultAlignment),Et.sb()||(Et=Br),tt&&(rt-=ft.height+St.bottom+St.top),ut.arrange(st+Et.offsetX+St.left+(x.width*Et.x-wt*Et.x),rt+Et.offsetY+St.top,Bt,ft.height),tt||(rt+=ft.height+St.bottom+St.top)}}};function Hm(){this.xa="Base"}Ce(Hm,Xo),Hm.prototype.measure=function(a,y,x,E,b,z,tt){var rt=E.length,ot=a.Pb(),st=ot.margin,ut=st.right+st.left,ft=st.top+st.bottom;ot.measure(y,x,z,tt);var St=ot.measuredBounds;z=St.width,tt=St.height;var wt=Math.max(z+ut,0),Et=Math.max(tt+ft,0),Bt=a.isClipping,Vt=Ye.allocAt(-st.left,-st.top,wt,Et),jt=Ye.allocAt(0,0,z,tt);Cv(ot,jt,!0),z=jt.width,tt=jt.height;for(var _t=!0,Qt=zh(a),ie=0;ie<rt;ie++){var ce=E[ie];St=y;var ke=x;if(ce!==ot&&(ce.visible||ce===Qt)){st=ce.margin;var On=st.left,ri=st.top;switch(wt=st.right+st.left,Et=st.top+st.bottom,st=Xa(ce,!1),st){case dn:St=z,ke=tt,ri=On=Et=wt=0;break;case ci:St=z,On=wt=0;break;case xi:ke=tt,ri=Et=0}ce.measure(St,ke,0,0),St=ce.measuredBounds,wt=Math.max(St.width+wt,0),Et=Math.max(St.height+Et,0),st=ce.alignment,st.Xb()&&(st=a.defaultAlignment),st.sb()||(st=Br);var qn=ce.alignmentFocus;if(qn.Xb()&&(qn=Br),ke=null,ce instanceof pn&&ce.$e!==""&&(ke=ce.fb(ce.$e),ke===ce&&(ke=null)),On=jt.x-On,ri=jt.y-ri,ke!==null){for(ce.arrange(0,0,St.width,St.height),St=ke.actualBounds,St=Gt.allocAt(St.x+(qn.x*St.width-qn.offsetX),St.y+(qn.y*St.height-qn.offsetY)),ke=ke.panel;ke!==ce;)ke.transform.Ga(St),ke=ke.panel;On+=st.x*z+st.offsetX-St.x,ri+=st.y*tt+st.offsetY-St.y,Gt.free(St)}else On+=st.x*z+st.offsetX-(qn.x*St.width+qn.offsetX),ri+=st.y*tt+st.offsetY-(qn.y*St.height+qn.offsetY);_t?(_t=!1,b.h(On,ri,wt,Et)):Ar(b,On,ri,wt,Et)}}switch(_t?b.assign(Vt):Bt?b.Uu(jt.x,jt.y,jt.width,jt.height):Ar(b,Vt.x,Vt.y,Vt.width,Vt.height),Ye.free(Vt),Ye.free(jt),st=ot.stretch,st===Ri&&(st=Xa(ot,!1)),st){case on:return;case dn:if(!isFinite(y)&&!isFinite(x))return;break;case ci:if(!isFinite(y))return;break;case xi:if(!isFinite(x))return}for(St=ot.measuredBounds,z=St.width,tt=St.height,wt=Math.max(z+ut,0),Et=Math.max(tt+ft,0),st=ot.margin,jt=Ye.allocAt(-st.left,-st.top,wt,Et),Cv(ot,jt,!0),z=jt.width,tt=jt.height,y=0;y<rt;y++)x=E[y],x===ot||!x.visible&&x!==Qt||(st=x.margin,wt=st.right+st.left,Et=st.top+st.bottom,St=x.measuredBounds,wt=Math.max(St.width+wt,0),Et=Math.max(St.height+Et,0),ut=x.alignment,ut.Xb()&&(ut=a.defaultAlignment),ut.sb()||(ut=Br),x=x.alignmentFocus,x.Xb()&&(x=Br),_t?(_t=!1,b.h(ut.x*z+ut.offsetX-(x.x*St.width+x.offsetX)-st.left,ut.y*tt+ut.offsetY-(x.y*St.height+x.offsetY)-st.top,wt,Et)):Ar(b,ut.x*z+ut.offsetX-(x.x*St.width+x.offsetX)-st.left,ut.y*tt+ut.offsetY-(x.y*St.height+x.offsetY)-st.top,wt,Et));_t?b.assign(Vt):Bt?b.Uu(jt.x,jt.y,jt.width,jt.height):Ar(b,Vt.x,Vt.y,Vt.width,Vt.height),Ye.free(jt)},Hm.prototype.arrange=function(a,y,x){var E=y.length,b=a.Pb(),z=b.measuredBounds,tt=z.width,rt=z.height,ot=a.padding;z=ot.left,ot=ot.top;var st=z-x.x,ut=ot-x.y;for(b.arrange(st,ut,tt,rt),tt=Ye.allocAt(0,0,tt,rt),Cv(b,tt,!1),rt=0;rt<E;rt++){var ft=y[rt];if(ft!==b){st=ft.measuredBounds;var St=st.width,wt=st.height;ut=ft.alignment,ut.Xb()&&(ut=a.defaultAlignment),ut.sb()||(ut=Br);var Et=ft.alignmentFocus;if(Et.Xb()&&(Et=Br),st=null,ft instanceof pn&&ft.$e!==""&&(st=ft.fb(ft.$e),st===ft&&(st=null)),st!==null){var Bt=st.actualBounds;for(Et=Gt.allocAt(Bt.x+(Et.x*Bt.width-Et.offsetX),Bt.y+(Et.y*Bt.height-Et.offsetY)),st=st.panel;st!==ft;)st.transform.Ga(Et),st=st.panel;st=ut.x*tt.width+ut.offsetX-Et.x,ut=ut.y*tt.height+ut.offsetY-Et.y,Gt.free(Et)}else st=ut.x*tt.width+ut.offsetX-(Et.x*St+Et.offsetX),ut=ut.y*tt.height+ut.offsetY-(Et.y*wt+Et.offsetY);st+=tt.x-x.x,ut+=tt.y-x.y,ft.visible&&ft.arrange(z+st,ot+ut,St,wt)}}Ye.free(tt)};function Cv(a,y,x){var E=null;if(a instanceof pn&&a.$e!==""&&(E=a.fb(a.$e),E===a&&(E=null)),E!==null)for(x&&a.arrange(0,0,y.width,y.height),y.assign(E.actualBounds),E=E.panel;E!==a;)E.transform.pp(y),E=E.panel}function Wm(){this.xa="Base"}Ce(Wm,Xo),Wm.prototype.measure=function(a,y,x,E,b,z,tt){var rt=E.length,ot=a.Pb(),st=ot.margin,ut=y,ft=x,St=st.right+st.left,wt=st.top+st.bottom;ot.measure(y,x,z,tt),st=ot.measuredBounds;var Et=0,Bt=null;ot instanceof Ui&&(Bt=ot,Et=Bt.strokeWidth*Bt.scale);var Vt=Math.max(st.width+St,0);st=Math.max(st.height+wt,0);var jt=Mv(ot),_t=jt.x*Vt+jt.offsetX;jt=jt.y*st+jt.offsetY;var Qt=Av(ot),ie=Qt.x*Vt+Qt.offsetX;for(Qt=Qt.y*st+Qt.offsetY,isFinite(y)&&(ut=Math.max(Math.abs(_t-ie)-Et,0)),isFinite(x)&&(ft=Math.max(Math.abs(jt-Qt)-Et,0)),Et=Re.alloc(),Et.h(0,0),a=zh(a),Qt=0;Qt<rt;Qt++)jt=E[Qt],jt===ot||!jt.visible&&jt!==a||(st=jt.margin,Vt=st.right+st.left,_t=st.top+st.bottom,jt.measure(ut,ft,0,0),st=jt.measuredBounds,Vt=Math.max(st.width+Vt,0),st=Math.max(st.height+_t,0),Et.h(Math.max(Vt,Et.width),Math.max(st,Et.height)));if(rt===1)b.width=Vt,b.height=st,Re.free(Et);else{switch(jt=Mv(ot),Qt=Av(ot),rt=E=0,Qt.x!==jt.x&&Qt.y!==jt.y&&(E=Et.width/Math.abs(Qt.x-jt.x),rt=Et.height/Math.abs(Qt.y-jt.y)),Re.free(Et),Et=0,Bt!==null&&(Et=Bt.strokeWidth*Bt.scale,Tv(Bt)===ai&&(E=rt=Math.max(E,rt))),E+=Math.abs(jt.offsetX)+Math.abs(Qt.offsetX)+Et,rt+=Math.abs(jt.offsetY)+Math.abs(Qt.offsetY)+Et,Bt=ot.stretch,Bt===Ri&&(Bt=Xa(ot,!1)),Bt){case on:tt=z=0;break;case dn:isFinite(y)&&(E=y),isFinite(x)&&(rt=x);break;case ci:isFinite(y)&&(E=y),tt=0;break;case xi:z=0,isFinite(x)&&(rt=x)}ot.Uj(),ot.measure(E,rt,z,tt),b.width=ot.measuredBounds.width+St,b.height=ot.measuredBounds.height+wt}},Wm.prototype.arrange=function(a,y){var x=y.length,E=a.Pb(),b=E.measuredBounds,z=Ye.alloc();z.h(0,0,1,1);var tt=E.margin,rt=tt.left;tt=tt.top;var ot=a.padding,st=ot.left;ot=ot.top,E.arrange(st+rt,ot+tt,b.width,b.height);var ut=Mv(E),ft=Av(E),St=ut.y*b.height+ut.offsetY,wt=ft.x*b.width+ft.offsetX;for(ft=ft.y*b.height+ft.offsetY,z.x=ut.x*b.width+ut.offsetX,z.y=St,Ar(z,wt,ft,0,0),z.x+=rt+st,z.y+=tt+ot,b=0;b<x;b++)rt=y[b],rt!==E&&(st=rt.measuredBounds,tt=rt.margin,ot=Math.max(st.width+tt.right+tt.left,0),ut=Math.max(st.height+tt.top+tt.bottom,0),St=rt.alignment,St.Xb()&&(St=a.defaultAlignment),St.sb()||(St=Br),ot=z.width*St.x+St.offsetX-ot*St.x+tt.left+z.x,tt=z.height*St.y+St.offsetY-ut*St.y+tt.top+z.y,rt.visible&&(Vr(z.x,z.y,z.width,z.height,ot,tt,st.width,st.height)?rt.arrange(ot,tt,st.width,st.height):rt.arrange(ot,tt,st.width,st.height,new Ye(z.x,z.y,z.width,z.height))));Ye.free(z)};function Vm(){this.xa="Base",this.name="Table"}Ce(Vm,Xo),Vm.prototype.measure=function(a,y,x,E,b){for(var z=E.length,tt=Si(),rt=Si(),ot=0;ot<z;ot++){var st=E[ot],ut=st instanceof pn?st:null;if(ut!==null&&Sd(ut)&&st.visible){rt.push(ut);for(var ft=ut.O.s,St=ft.length,wt=0;wt<St;wt++){var Et=ft[wt];ut.type===pn.TableRow?Et.row=st.row:ut.type===pn.TableColumn&&(Et.column=st.column),tt.push(Et)}}else tt.push(st)}z=tt.length,z===0&&(a.Fb(0),a.Eb(0));for(var Bt=[],Vt=0;Vt<z;Vt++){var jt=tt[Vt];jt.visible&&(Kt(jt,!0),se(jt,!0),Bt[jt.row]||(Bt[jt.row]=[]),Bt[jt.row][jt.column]||(Bt[jt.row][jt.column]=[]),Bt[jt.row][jt.column].push(jt))}wi(tt);var _t=Si(),Qt=Si(),ie=Si(),ce={count:0},ke={count:0},On=y,ri=x,qn=a.rowDefs,wn=a.colDefs,tn=null;z=qn.length;for(var ji=0;ji<z;ji++)tn=qn[ji],tn!==void 0&&(tn.actual=0);z=wn.length;for(var Fi=0;Fi<z;Fi++)tn=wn[Fi],tn!==void 0&&(tn.actual=0);for(var Lr=Bt.length,Kr=0,na=0;na<Lr;na++)Bt[na]&&(Kr=Math.max(Kr,Bt[na].length));var aa=Math.min(a.topIndex,Lr-1),Ja=Math.min(a.leftIndex,Kr-1),ia=0;Lr=Bt.length;for(var Fd=zh(a),To=0;To<Lr;To++)if(Bt[To]){Kr=Bt[To].length;var mu=a.Fb(To);mu.actual=0;for(var Qa=mu.oc=0;Qa<Kr;Qa++)if(Bt[To][Qa]){var Bd=a.Eb(Qa);_t[Qa]===void 0&&(Bd.actual=0,Bd.oc=0,_t[Qa]=!0);for(var il=Bt[To][Qa],Fl=il.length,Us=0;Us<Fl;Us++){var Ds=il[Us];if(Ds.visible||Ds===Fd){var bc=1<Ds.rowSpan||1<Ds.columnSpan;bc&&(To<aa||Qa<Ja||Qt.push(Ds));var vu=Ds.margin,Ap=vu.right+vu.left,Ks=vu.top+vu.bottom,qa=El(Ds,mu,Bd,!1),Fm=Ds.desiredSize,Lg=!isNaN(Fm.height),Bu=!isNaN(Fm.width)&&Lg;if(bc||qa===on||Bu||To<aa||Qa<Ja||(ce[Qa]!==void 0||qa!==dn&&qa!==ci||(ce[Qa]=-1,ce.count++),ke[To]!==void 0||qa!==dn&&qa!==xi||(ke[To]=-1,ke.count++),ie.push(Ds)),Ds.measure(1/0,1/0,0,0),!(To<aa||Qa<Ja)){var Ts=Ds.measuredBounds,bf=Math.max(Ts.width+Ap,0),Zs=Math.max(Ts.height+Ks,0);if(Ds.rowSpan===1&&(qa===on||qa===ci)){tn=a.Fb(To);var Lc=tn.Wc();ia=Math.max(Zs-tn.actual,0),ia+Lc>ri&&(ia=Math.max(ri-Lc,0));var cv=tn.oa===0;tn.oc=tn.oc+ia,tn.actual=tn.oa+ia,ri=Math.max(ri-(ia+(cv?Lc:0)),0)}if(Ds.columnSpan===1&&(qa===on||qa===xi)){tn=a.Eb(Qa);var Bm=tn.Wc();ia=Math.max(bf-tn.actual,0),ia+Bm>On&&(ia=Math.max(On-Bm,0));var Jy=tn.oa===0;tn.oc=tn.oc+ia,tn.actual=tn.oa+ia,On=Math.max(On-(ia+(Jy?Bm:0)),0)}bc&&Ds.Uj()}}}}}wi(_t);var dh=0,Wh=0;z=a.columnCount;for(var Mg=0;Mg<z;Mg++){var Mc=wn[Mg];Mc!==void 0&&(dh+=isNaN(Mc.Hc)?Mc.oc:Mc.Hc,Mc.oc!==0&&(dh+=Mc.Wc()))}z=a.rowCount;for(var Fp=0;Fp<z;Fp++){var Ac=qn[Fp];Ac!==void 0&&(Wh+=isNaN(Ac.Hc)?Ac.oc:Ac.Hc,Ac.oc!==0&&(Wh+=Ac.Wc()))}On=Math.max(y-dh,0);var ch=ri=Math.max(x-Wh,0),kd=On;z=ie.length;for(var Is=0;Is<z;Is++){var ku=ie[Is],fv=a.Fb(ku.row),Vh=a.Eb(ku.column),Bp=ku.measuredBounds,yu=ku.margin,Lf=yu.right+yu.left,Nu=yu.top+yu.bottom;ce[ku.column]=Vh.oc===0&&ce[ku.column]!==void 0?Math.max(Bp.width+Lf,ce[ku.column]):null,ke[ku.row]=fv.oc===0&&ke[ku.row]!==void 0?Math.max(Bp.height+Nu,ke[ku.row]):null}var Ag=0,kp=0,_l;for(_l in ke)_l!=="count"&&(Ag+=ke[_l]);for(_l in ce)_l!=="count"&&(kp+=ce[_l]);for(var ma=Re.alloc(),km=0;km<z;km++){var ss=ie[km];if(ss.visible||ss===Fd){var Io=a.Fb(ss.row),ls=a.Eb(ss.column),Uh=0;isFinite(ls.width)?Uh=ls.width:(isFinite(On)&&ce[ss.column]!==null?kp===0?Uh=ls.actual+On:Uh=ce[ss.column]/kp*kd:ce[ss.column]!==null?Uh=On:Uh=ls.actual||On,Uh=Math.max(0,Uh-ls.Wc()));var Nd=0;switch(isFinite(Io.height)?Nd=Io.height:(isFinite(ri)&&ke[ss.row]!==null?Ag===0?Nd=Io.actual+ri:Nd=ke[ss.row]/Ag*ch:ke[ss.row]!==null?Nd=ri:Nd=Io.actual||ri,Nd=Math.max(0,Nd-Io.Wc())),ma.h(Math.max(ls.minimum,Math.min(Uh,ls.maximum)),Math.max(Io.minimum,Math.min(Nd,Io.maximum))),qa=El(ss,Io,ls,!1),qa){case ci:ma.height=Math.max(ma.height,Io.actual+ri);break;case xi:ma.width=Math.max(ma.width,ls.actual+On)}var Mf=ss.margin,Qy=Mf.right+Mf.left,gv=Mf.top+Mf.bottom;ss.Uj(),ss.measure(ma.width,ma.height,ls.minimum,Io.minimum);var Np=ss.measuredBounds,Af=Math.max(Np.width+Qy,0),Fg=Math.max(Np.height+gv,0);isFinite(On)&&(Af=Math.min(Af,ma.width)),isFinite(ri)&&(Fg=Math.min(Fg,ma.height));var Os=0;Os=Io.actual,Io.actual=Math.max(Io.actual,Fg),Io.oc=Math.max(Io.oc,Fg),ia=Io.actual-Os,ri=Math.max(ri-ia,0),ke[ss.row]===null&&(ch=Math.max(ch-ia,0)),Os=ls.actual,ls.actual=Math.max(ls.actual,Af),ls.oc=Math.max(ls.oc,Af),ia=ls.actual-Os,On=Math.max(On-ia,0),ce[ss.column]===null&&(kd=Math.max(kd-ia,0))}}wi(ie);var Kh=Re.alloc(),Su=Si(),vl=Si();if(z=Qt.length,z!==0){for(var Fc=0;Fc<Lr;Fc++)if(Bt[Fc]){Kr=Bt[Fc].length;var Dp=a.Fb(Fc);Su[Fc]=Dp.actual;for(var Bc=0;Bc<Kr;Bc++)if(Bt[Fc][Bc]){var pv=a.Eb(Bc);vl[Bc]=pv.actual}}}for(var Tp=0;Tp<z;Tp++){var Lo=Qt[Tp];if(Lo.visible||Lo===Fd){var Jl=a.Fb(Lo.row),Bl=a.Eb(Lo.column);switch(ma.h(Math.max(Bl.minimum,Math.min(y,Bl.maximum)),Math.max(Jl.minimum,Math.min(x,Jl.maximum))),qa=El(Lo,Jl,Bl,!1),qa){case dn:vl[Bl.index]!==0&&(ma.width=Math.min(ma.width,vl[Bl.index])),Su[Jl.index]!==0&&(ma.height=Math.min(ma.height,Su[Jl.index]));break;case ci:vl[Bl.index]!==0&&(ma.width=Math.min(ma.width,vl[Bl.index]));break;case xi:Su[Jl.index]!==0&&(ma.height=Math.min(ma.height,Su[Jl.index]))}isFinite(Bl.width)&&(ma.width=Bl.width),isFinite(Jl.height)&&(ma.height=Jl.height),Kh.h(0,0);for(var mv=Bl.minimum,Ys=Jl.minimum,Dd=1;Dd<Lo.rowSpan&&!(Lo.row+Dd>=a.rowCount);Dd++)tn=a.Fb(Lo.row+Dd),ia=0,ia=qa===dn||qa===xi?Math.max(tn.minimum,Su[Lo.row+Dd]===0?tn.maximum:Math.min(Su[Lo.row+Dd],tn.maximum)):Math.max(tn.minimum,isNaN(tn.Hc)?tn.maximum:Math.min(tn.Hc,tn.maximum)),Kh.height+=ia,Ys+=tn.minimum;for(var kl=1;kl<Lo.columnSpan&&!(Lo.column+kl>=a.columnCount);kl++)tn=a.Eb(Lo.column+kl),ia=0,ia=qa===dn||qa===ci?Math.max(tn.minimum,vl[Lo.column+kl]===0?tn.maximum:Math.min(vl[Lo.column+kl],tn.maximum)):Math.max(tn.minimum,isNaN(tn.Hc)?tn.maximum:Math.min(tn.Hc,tn.maximum)),Kh.width+=ia,mv+=tn.minimum;ma.width+=Kh.width,ma.height+=Kh.height;var Ip=Lo.margin,kc=Ip.right+Ip.left,Nm=Ip.top+Ip.bottom;Lo.measure(ma.width,ma.height,mv,Ys);for(var Op=Lo.measuredBounds,Du=Math.max(Op.width+kc,0),Ff=Math.max(Op.height+Nm,0),Nc=0,Rp=0;Rp<Lo.rowSpan&&!(Lo.row+Rp>=a.rowCount);Rp++)tn=a.Fb(Lo.row+Rp),Nc+=tn.total||0;if(Nc<Ff){var Td=Ff-Nc,fh=Ff-Nc;if(Lo.spanAllocation!==null)for(var Id=Lo.spanAllocation,Zh=0;Zh<Lo.rowSpan&&!(0>=Td)&&!(Lo.row+Zh>=a.rowCount);Zh++){tn=a.Fb(Lo.row+Zh);var Od=tn.oa||0,Bf=Id(Lo,tn,fh);tn.actual=Math.min(tn.maximum,Od+Bf),tn.oa!==Od&&(Td-=tn.oa-Od)}for(;0<Td;){var xu=tn.oa||0;if(isNaN(tn.height)&&tn.maximum>xu&&(tn.actual=Math.min(tn.maximum,xu+Td),tn.oa!==xu&&(Td-=tn.oa-xu)),tn.index===0)break;tn=a.Fb(tn.index-1)}}for(var Bg=0,Rd=0;Rd<Lo.columnSpan&&!(Lo.column+Rd>=a.columnCount);Rd++)tn=a.Eb(Lo.column+Rd),Bg+=tn.total||0;if(Bg<Du){var kg=Du-Bg,qy=Du-Bg;if(Lo.spanAllocation!==null)for(var Yh=Lo.spanAllocation,kf=0;kf<Lo.columnSpan&&!(0>=kg)&&!(Lo.column+kf>=a.columnCount);kf++){tn=a.Eb(Lo.column+kf);var Dm=tn.oa||0,$y=Yh(Lo,tn,qy);tn.actual=Math.min(tn.maximum,Dm+$y),tn.oa!==Dm&&(kg-=tn.oa-Dm)}for(;0<kg;){var vv=tn.oa||0;if(isNaN(tn.width)&&tn.maximum>vv&&(tn.actual=Math.min(tn.maximum,vv+kg),tn.oa!==vv&&(kg-=tn.oa-vv)),tn.index===0)break;tn=a.Eb(tn.index-1)}}}}wi(Qt),Re.free(Kh),Re.free(ma),Su!==void 0&&wi(Su),vl!==void 0&&wi(vl);var Ng=0,Dg=0,yv=a.desiredSize,px=a.maxSize;qa=Xa(a,!0);var Tm=Wh=dh=0,Im=0;z=a.columnCount;for(var Sv=0;Sv<z;Sv++)wn[Sv]!==void 0&&(tn=a.Eb(Sv),isFinite(tn.width)?(Tm+=tn.width,Tm+=tn.Wc()):$m(tn)===Zp?(Tm+=tn.oa,Tm+=tn.Wc()):tn.oa!==0&&(dh+=tn.oa,dh+=tn.Wc()));isFinite(yv.width)?Ng=Math.min(yv.width,px.width):Ng=qa!==on&&isFinite(y)?y:dh,Ng=Math.max(Ng,a.minSize.width),Ng=Math.max(Ng-Tm,0);for(var Qx=dh===0?1:Math.max(Ng/dh,1),xv=0;xv<z;xv++)wn[xv]!==void 0&&(tn=a.Eb(xv),isFinite(tn.width)||$m(tn)===Zp||(tn.actual=tn.oa*Qx),tn.position=b.width,tn.oa!==0&&(b.width+=tn.oa,b.width+=tn.Wc()));z=a.rowCount;for(var Pv=0;Pv<z;Pv++)qn[Pv]!==void 0&&(tn=a.Fb(Pv),isFinite(tn.height)?(Im+=tn.height,Im+=tn.Wc()):$m(tn)===Zp?(Im+=tn.oa,Im+=tn.Wc()):tn.oa!==0&&(Wh+=tn.oa,Wh+=tn.Wc()));isFinite(yv.height)?Dg=Math.min(yv.height,px.height):Dg=qa!==on&&isFinite(x)?x:Wh,Dg=Math.max(Dg,a.minSize.height),Dg=Math.max(Dg-Im,0);for(var qx=Wh===0?1:Math.max(Dg/Wh,1),wv=0;wv<z;wv++)qn[wv]!==void 0&&(tn=a.Fb(wv),isFinite(tn.height)||$m(tn)===Zp||(tn.actual=tn.oa*qx),tn.position=b.height,tn.oa!==0&&(b.height+=tn.oa,b.height+=tn.Wc()));z=rt.length;for(var t1=0;t1<z;t1++){var Om=rt[t1],e1=0,n1=0;Om.type===pn.TableRow?(e1=b.width,tn=a.Fb(Om.row),n1=tn.actual):(tn=a.Eb(Om.column),e1=tn.actual,n1=b.height),Om.measuredBounds.h(0,0,e1,n1),Kt(Om,!1)}wi(rt),a.inRowsCols=Bt},Vm.prototype.arrange=function(a,y,x){var E=y.length,b=a.padding,z=b.left;b=b.top;var tt=a.inRowsCols;if(tt!==null){for(var rt,ot,st=tt.length,ut=0,ft=0;ft<st;ft++)tt[ft]&&(ut=Math.max(ut,tt[ft].length));ot=a.rowDefs,rt=a.colDefs;var St=ft=0,wt=Math.min(a.topIndex,st-1);if(0<ot.length){for(;wt!==st&&(ot[wt]===void 0||ot[wt].oa===0);)wt++;wt=Math.max(Math.min(wt,st-1),0),ft=-ot[wt].position}var Et=Math.min(a.leftIndex,ut-1);if(0<rt.length){for(;Et!==ut&&(rt[Et]===void 0||rt[Et].oa===0);)Et++;Et=Math.max(Math.min(Et,ut-1),0),St=-rt[Et].position}for(var Bt=0,Vt=0;Bt!==st&&ot[Bt]===void 0;)Bt++;for(;Vt!==st&&rt[Vt]===void 0;)Vt++;ut=a.part,a.Fb(Bt),a.Eb(Vt);for(var jt=0;jt<y.length;jt++){var _t=y[jt];if(_t instanceof pn&&_t.visible&&Sd(_t)){if(_t.type===pn.TableRow){rt=a.Fb(_t.row);var Qt=a.Eb(Vt)}else rt=a.Fb(Bt),Qt=a.Eb(_t.column);ot=rt.position+ft+b,rt.oa!==0&&(ot+=rt.Io(Math.max(Bt,wt))),rt=Qt.position+St+z,Qt.oa!==0&&(rt+=Qt.Io(Math.max(Vt,Et))),Qt=_t.measuredBounds,_t.Uk(),_t.actualBounds.ka();var ie=_t.actualBounds,ce=Ye.allocAt(ie.x,ie.y,ie.width,ie.height);ie.x=_t.type===pn.TableRow?z:rt,ie.y=_t.type===pn.TableColumn?b:ot,ie.width=Qt.width,ie.height=Qt.height,_t.actualBounds.freeze(),se(_t,!1),rl(ce,ie)||ut===null||(ut.oh(),_t.Pn(ut)),Ye.free(ce)}}for(jt=Re.alloc(),_t=0;_t<st;_t++)if(tt[_t]){for(ut=tt[_t].length,Qt=a.Fb(_t),ot=Qt.position+ft+b,Qt.oa!==0&&(ot+=Qt.Io(Math.max(Bt,wt))),ie=0;ie<ut;ie++)if(tt[_t][ie]){ce=a.Eb(ie),rt=ce.position+St+z,ce.oa!==0&&(rt+=ce.Io(Math.max(Vt,Et)));for(var ke=tt[_t][ie],On=ke.length,ri=0;ri<On;ri++){var qn=ke[ri],wn=qn.measuredBounds;jt.h(0,0);for(var tn=1;tn<qn.rowSpan&&!(_t+tn>=a.rowCount);tn++){var ji=a.Fb(_t+tn);ji.oa!==0&&(jt.height+=ji.total)}for(tn=1;tn<qn.columnSpan&&!(ie+tn>=a.columnCount);tn++)ji=a.Eb(ie+tn),ji.oa!==0&&(jt.width+=ji.total);var Fi=ce.oa+jt.width,Lr=Qt.oa+jt.height;tn=rt,ji=ot;var Kr=Fi,na=Lr,aa=rt,Ja=ot,ia=Fi,Fd=Lr;rt+Fi>x.width&&(ia=Math.max(x.width-rt,0)),ot+Lr>x.height&&(Fd=Math.max(x.height-ot,0));var To=qn.alignment;if(To.Xb()){To=a.defaultAlignment,To.sb()||(To=Br);var mu=To.x,Qa=To.y,Bd=To.offsetX;To=To.offsetY;var il=ce.alignment,Fl=Qt.alignment;il.sb()&&(mu=il.x,Bd=il.offsetX),Fl.sb()&&(Qa=Fl.y,To=Fl.offsetY)}else mu=To.x,Qa=To.y,Bd=To.offsetX,To=To.offsetY;(isNaN(mu)||isNaN(Qa))&&(Qa=mu=.5,To=Bd=0),il=wn.width,Fl=wn.height;var Us=qn.margin,Ds=Us.left+Us.right,bc=Us.top+Us.bottom,vu=El(qn,Qt,ce,!1);!isNaN(qn.desiredSize.width)||vu!==dn&&vu!==ci||(il=Math.max(Fi-Ds,0)),!isNaN(qn.desiredSize.height)||vu!==dn&&vu!==xi||(Fl=Math.max(Lr-bc,0)),Fi=qn.maxSize,Lr=qn.minSize,il=Math.min(Fi.width,il),Fl=Math.min(Fi.height,Fl),il=Math.max(Lr.width,il),Fl=Math.max(Lr.height,Fl),Fi=Fl+bc,tn+=Kr*mu-(il+Ds)*mu+Bd+Us.left,ji+=na*Qa-Fi*Qa+To+Us.top,qn.visible&&(Vr(aa,Ja,ia,Fd,tn,ji,wn.width,wn.height)?qn.arrange(tn,ji,il,Fl):qn.arrange(tn,ji,il,Fl,new Ye(aa,Ja,ia,Fd)))}}}for(Re.free(jt),a=0;a<E;a++)x=y[a],z=x instanceof pn?x:null,z!==null&&Sd(z)&&(z=x.actualBounds,x.naturalBounds.ka(),x.naturalBounds.h(0,0,z.width,z.height),x.naturalBounds.freeze())}};function Um(){this.xa="Base"}Ce(Um,Xo),Um.prototype.measure=function(){},Um.prototype.arrange=function(){};function Km(){this.xa="Base"}Ce(Km,Xo),Km.prototype.measure=function(){},Km.prototype.arrange=function(){};function Zm(){this.xa="Base"}Ce(Zm,Xo),Zm.prototype.measure=function(a,y,x,E,b,z,tt){1<E.length&&pe("Viewbox Panel cannot contain more than one GraphObject."),E=E[0],E.Ca=1,E.Uj(),E.measure(1/0,1/0,z,tt);var rt=E.measuredBounds,ot=E.margin,st=ot.right+ot.left;if(ot=ot.top+ot.bottom,isFinite(y)||isFinite(x)){var ut=E.scale,ft=rt.width;rt=rt.height;var St=Math.max(y-st,0),wt=Math.max(x-ot,0),Et=1;a.viewboxStretch===ai?ft!==0&&rt!==0&&(Et=Math.min(St/ft,wt/rt)):ft!==0&&rt!==0&&(Et=Math.max(St/ft,wt/rt)),Et===0&&(Et=1e-4),E.Ca*=Et,ut!==E.scale&&(Kt(E,!0),E.measure(1/0,1/0,z,tt))}rt=E.measuredBounds,b.width=isFinite(y)?y:Math.max(rt.width+st,0),b.height=isFinite(x)?x:Math.max(rt.height+ot,0)},Zm.prototype.arrange=function(a,y,x){y=y[0];var E=y.measuredBounds,b=y.margin,z=Math.max(E.width+(b.right+b.left),0);b=Math.max(E.height+(b.top+b.bottom),0);var tt=y.alignment;tt.Xb()&&(tt=a.defaultAlignment),tt.sb()||(tt=Br),y.arrange(x.width*tt.x-z*tt.x+tt.offsetX,x.height*tt.y-b*tt.y+tt.offsetY,E.width,E.height)};function Vp(){this.xa="Base"}Ce(Vp,Xo),Vp.prototype.measure=function(){},Vp.prototype.arrange=function(){},Vp.prototype.gc=function(a,y,x){x=a.Df()*x.scale,0>=x&&(x=1);var E=a.gridCellSize,b=E.width;E=E.height;var z=a.naturalBounds,tt=a.actualBounds,rt=z.width,ot=z.height,st=Math.ceil(rt/b),ut=Math.ceil(ot/E),ft=a.gridOrigin,St=ft.x;ft=ft.y,y.save(),y.beginPath(),y.rect(0,0,rt,ot),y.clip(),y.Se();for(var wt=[],Et=a.O.s,Bt=Et.length,Vt=0;Vt<Bt;Vt++){var jt=Et[Vt],_t=[];if(wt.push(_t),jt.visible){var Qt=jt.interval;if(!(0>Qt)){jt=bv(jt.figure);for(var ie=0;ie<Bt;ie++)if(ie!==Vt){var ce=Et[ie];ce.visible&&bv(ce.figure)===jt&&(ce=ce.interval,ce>Qt&&_t.push(ce))}}}}for(Et=a.O.s,Bt=Et.length,Vt=0;Vt<Bt;Vt++){var ke=Et[Vt];if(ke.visible&&(_t=ke.interval||1,jt=Math.abs(_t),!(2>b*jt*x))){if(Qt=ke.segmentIndex,(!isFinite(Qt)||isNaN(Qt))&&(Qt=0),0>Qt&&(Qt=jt-Math.min(-Qt,jt)),Qt=Math.round(Qt%jt),jt=ke.opacity,ie=1,jt!==1){if(jt===0)continue;ie=y.globalAlpha,y.globalAlpha=ie*jt}ce=wt[Vt];var On=!1,ri=ke.strokeDashArray;if(ri!==null&&(On=!0,y.js(ri,ke.strokeDashOffset)),ke.figure==="LineV"&&ke.stroke!==null&&0<ke.strokeWidth){for(y.lineWidth=ke.strokeWidth,fo(a,y,ke.stroke,!1,!1,z,tt),y.beginPath(),ri=ke=Math.floor((St-b)/b);ri<=ke+st;ri++){var qn=ri*b+St;0<=qn&&qn<=rt&&Ym(ri,_t,Qt,ce)&&(y.moveTo(qn,0),y.lineTo(qn,ot))}y.stroke(),y.Se()}else if(ke.figure==="LineH"&&ke.stroke!==null&&0<ke.strokeWidth){for(y.lineWidth=ke.strokeWidth,fo(a,y,ke.stroke,!1,!1,z,tt),y.beginPath(),ri=ke=Math.floor((ft-E)/E);ri<=ke+ut;ri++)qn=ri*E+ft,0<=qn&&qn<=ot&&Ym(ri,_t,Qt,ce)&&(y.moveTo(0,qn),y.lineTo(rt,qn));y.stroke(),y.Se()}else if(ke.figure==="BarV"&&ke.fill!==null)for(fo(a,y,ke.fill,!0,!1,z,tt),ke=ke.width,isNaN(ke)&&(ke=b),qn=ri=Math.floor((St-b)/b);qn<=ri+st;qn++){var wn=qn*b+St;0<=wn+ke&&wn<=rt&&Ym(qn,_t,Qt,ce)&&y.fillRect(wn,0,ke,ot)}else if(ke.figure==="BarH"&&ke.fill!==null)for(fo(a,y,ke.fill,!0,!1,z,tt),ke=ke.height,isNaN(ke)&&(ke=E),qn=ri=Math.floor((ft-E)/E);qn<=ri+ut;qn++)wn=qn*E+ft,0<=wn+ke&&wn<=ot&&Ym(qn,_t,Qt,ce)&&y.fillRect(0,wn,rt,ke);On&&y.fs(),jt!==1&&(y.globalAlpha=ie)}}y.restore(),y.Vc(!1)};function Ym(a,y,x,E){if(0>y)return a%y===x;if(a%y!==x)return!1;y=E.length;for(var b=0;b<y;b++)if(a%E[b]===x)return!1;return!0}function Xm(){this.xa="Base"}Ce(Xm,Xo),Xm.prototype.measure=function(a,y,x,E,b){var z=E.length;if(a instanceof Pr||a instanceof En){var tt=null,rt=null;if(a instanceof En&&(tt=a),a instanceof Pr&&(rt=a,tt=rt.adornedPart,a.j===null&&(a.j=[])),tt instanceof En){var ot=tt;if(z===0)Go(a.naturalBounds,0,0),a.measuredBounds.h(0,0,0,0);else{var st=a instanceof Pr?null:tt.path;y=tt.routeBounds,x=a.jg,x.h(0,0,y.width,y.height);var ut=ot.points,ft=tt.pointsCount;rt!==null?rt.Ul(!1):tt!==null&&tt.Ul(!1),rt=y.width;var St=y.height,wt=a.j;if(wt.length=0,st!==null){r1(a,rt,St,st);var Et=st.measuredBounds;x.ed(Et),wt.push(Et)}Et=Xi.alloc();for(var Bt=Gt.alloc(),Vt=Gt.alloc(),jt=0;jt<z;jt++){var _t=E[jt];if(_t!==st)if(_t.isPanelMain&&_t instanceof Ui){r1(a,rt,St,_t);var Qt=_t.measuredBounds;x.ed(Qt),wt.push(Qt)}else if(2>ft)_t.measure(1/0,1/0,0,0),Qt=_t.measuredBounds,x.ed(Qt),wt.push(Qt);else{var ie=_t.segmentIndex,ce=_t.segmentFraction,ke=_t.alignmentFocus;ke.Mc()&&(ke=Br);var On=_t.segmentOrientation,ri=_t.segmentOffset;if(isNaN(ie)){var qn=ot.ua;Qt=Si(),qn.Qu(ce,Qt);var wn=Gt.allocAt(Qt[0],Qt[1]);if(wn.add(ot.i(0)),qn.type===Fn.j?wn.offset(-qn.startX,-qn.startY):(qn=qn.figures.first(),qn!==null&&wn.offset(-qn.startX,-qn.startY)),qn=Qt[2],On!==ns){var tn=ot.computeAngle(_t,On,qn);_t.Kb=tn}tn=wn.x-y.x;var ji=wn.y-y.y;Gt.free(wn),wi(Qt)}else if(ie<-ft||ie>=ft)Qt=Gt.alloc(),ot.vg(),ot.computeMidPoint(Qt),qn=ot.midAngle,On!==ns&&(tn=ot.computeAngle(_t,On,qn),_t.Kb=tn),tn=Qt.x-y.x,ji=Qt.y-y.y,Gt.free(Qt);else{if(tn=0,0<=ie?(ji=ut.M(ie),Qt=ie<ft-1?ut.M(ie+1):ji):(tn=ft+ie,ji=ut.M(tn),Qt=0<tn?ut.M(tn-1):ji),ji.Xa(Qt)){0<=ie?(qn=0<ie?ut.M(ie-1):ji,tn=ie<ft-2?ut.M(ie+2):Qt):(qn=tn<ft-1?ut.M(tn+1):ji,tn=1<tn?ut.M(tn-2):Qt),wn=qn.Bf(ji);var Fi=Qt.Bf(tn);qn=wn>Fi+10?0<=ie?qn.ab(ji):ji.ab(qn):Fi>wn+10?0<=ie?Qt.ab(tn):tn.ab(Qt):0<=ie?qn.ab(tn):tn.ab(qn)}else qn=0<=ie?ji.ab(Qt):Qt.ab(ji);On!==ns&&(tn=ot.computeAngle(_t,On,qn),_t.Kb=tn),tn=ji.x+(Qt.x-ji.x)*ce-y.x,ji=ji.y+(Qt.y-ji.y)*ce-y.y}_t.measure(1/0,1/0,0,0),Qt=_t.measuredBounds,wn=_t.naturalBounds;var Lr=0;_t instanceof Ui&&(Lr=_t.strokeWidth),Fi=wn.width+Lr;var Kr=wn.height+Lr;Et.reset(),Et.translate(-Qt.x,-Qt.y),Et.scale(_t.scale,_t.scale),Et.rotate(On===ns?_t.angle:qn,Fi/2,Kr/2),On!==nm&&On!==rm||Et.rotate(90,Fi/2,Kr/2),On!==im&&On!==om||Et.rotate(-90,Fi/2,Kr/2),On===E0&&(45<qn&&135>qn||225<qn&&315>qn)&&Et.rotate(-qn,Fi/2,Kr/2),wn=new Ye(0,0,Fi,Kr),Bt.xi(wn,ke),Et.Ga(Bt),ke=-Bt.x+Lr/2*_t.scale,_t=-Bt.y+Lr/2*_t.scale,Vt.assign(ri),Lr=isNaN(ri.x);var na=isNaN(ri.y);if(Lr||na){Fi=Fi/2+3,Kr=Kr/2+3;var aa=45<=qn&&135>=qn,Ja=225<=qn&&315>=qn;On===ns&&(aa||Ja)?(Vt.x=na?Fi:ri.y,Vt.y=Lr?Kr:ri.x,aa?0<=ie||isNaN(ie)&&.5>ce||!Lr||(Vt.y=-Kr):Ja&&((0<=ie||isNaN(ie)&&.5>ce)&&Lr&&(Vt.y=-Kr),na&&(Vt.x=-Fi))):(Lr&&(Vt.x=0<=ie||isNaN(ie)&&.5>ce?Fi:-Fi),na&&(Vt.y=-Kr),Vt.rotate(qn))}else Vt.rotate(qn);tn+=Vt.x,ji+=Vt.y,wn.set(Qt),wn.h(tn+ke,ji+_t,Qt.width,Qt.height),wt.push(wn),x.ed(wn)}}if(tt!==null)for(E=tt.labelNodes;E.next();)E.value.measure(1/0,1/0);a.jg=x,a.position.h(y.x+x.x,y.y+x.y),Go(b,x.width||0,x.height||0),Xi.free(Et),Gt.free(Bt),Gt.free(Vt)}}}},Xm.prototype.arrange=function(a,y){var x=y.length;if(a instanceof Pr||a instanceof En){var E=a,b=null;a instanceof Pr&&(b=a,E=b.adornedPart);var z=a instanceof Pr?null:E.path,tt=a.j;if(tt.length!==0){var rt=0;if(z!==null&&rt<tt.length){var ot=tt[rt];rt++,z.arrange(ot.x-a.jg.x,ot.y-a.jg.y,ot.width,ot.height)}for(ot=0;ot<x;ot++){var st=y[ot];if(st!==z&&rt<tt.length){var ut=tt[rt];rt++,st.arrange(ut.x-a.jg.x,ut.y-a.jg.y,ut.width,ut.height)}}}if(y=E.points,x=y.count,2<=x&&a instanceof En)for(z=a.labelNodes;z.next();){var ft=a;tt=z.value,rt=tt.segmentIndex,ot=tt.segmentFraction;var St=tt.alignmentFocus;if(st=tt.segmentOrientation,ut=tt.segmentOffset,isNaN(rt)){var wt=ft.ua,Et=Si();wt.Qu(ot,Et);var Bt=Gt.allocAt(Et[0],Et[1]);Bt.add(ft.i(0)),wt.type===Fn.j||(wt=wt.figures.first()),Bt.offset(-wt.startX,-wt.startY),wt=Et[2],st!==ns&&(ft=ft.computeAngle(tt,st,wt),tt.angle=ft),ft=Bt.x;var Vt=Bt.y;Gt.free(Bt),wi(Et)}else if(rt<-x||rt>=x)Et=Gt.alloc(),wt=ft,Vt=Et,wt.vg(),wt.computeMidPoint(Vt),wt=ft.midAngle,st!==ns&&(ft=ft.computeAngle(tt,st,wt),tt.angle=ft),ft=Et.x,Vt=Et.y,Gt.free(Et);else{if(Bt=0,0<=rt?(Et=y.s[rt],Vt=rt<x-1?y.s[rt+1]:Et):(Bt=x+rt,Et=y.s[Bt],Vt=0<Bt?y.s[Bt-1]:Et),Et.Xa(Vt)){0<=rt?(wt=0<rt?y.s[rt-1]:Et,Bt=rt<x-2?y.s[rt+2]:Vt):(wt=Bt<x-1?y.s[Bt+1]:Et,Bt=1<Bt?y.s[Bt-2]:Vt);var jt=wt.Bf(Et),_t=Vt.Bf(Bt);wt=jt>_t+10?0<=rt?wt.ab(Et):Et.ab(wt):_t>jt+10?0<=rt?Vt.ab(Bt):Bt.ab(Vt):0<=rt?wt.ab(Bt):Bt.ab(wt)}else wt=0<=rt?Et.ab(Vt):Vt.ab(Et);st!==ns&&(ft=ft.computeAngle(tt,st,wt),tt.angle=ft),ft=Et.x+(Vt.x-Et.x)*ot,Vt=Et.y+(Vt.y-Et.y)*ot}if(St.ys())tt.location=new Gt(ft,Vt);else{St.Mc()&&(St=Br),Et=Xi.alloc(),Et.reset(),Et.scale(tt.scale,tt.scale),Et.rotate(tt.angle,0,0);var Qt=tt.naturalBounds;Bt=Ye.allocAt(0,0,Qt.width,Qt.height),jt=Gt.alloc(),jt.xi(Bt,St),Et.Ga(jt),St=-jt.x,_t=-jt.y;var ie=Qt.width,ce=Qt.height;Qt=Gt.alloc(),Qt.assign(ut);var ke=isNaN(ut.x),On=isNaN(ut.y);if(ke||On){ie=ie/2+3,ce=ce/2+3;var ri=45<=wt&&135>=wt,qn=225<=wt&&315>=wt;st===ns&&(ri||qn)?(Qt.x=On?ie:ut.y,Qt.y=ke?ce:ut.x,ri?0<=rt||isNaN(rt)&&.5>ot||!ke||(Qt.y=-ce):qn&&((0<=rt||isNaN(rt)&&.5>ot)&&ke&&(Qt.y=-ce),On&&(Qt.x=-ie))):(ke&&(Qt.x=0<=rt||isNaN(rt)&&.5>ot?ie:-ie),On&&(Qt.y=-ce),Qt.rotate(wt))}else Qt.rotate(wt);ft+=Qt.x,Vt+=Qt.y,Et.pp(Bt),St+=Bt.x,_t+=Bt.y,rt=Gt.allocAt(ft+St,Vt+_t),tt.move(rt),Gt.free(rt),Gt.free(Qt),Gt.free(jt),Ye.free(Bt),Xi.free(Et)}}b!==null?b.Ul(!1):E.Ul(!1),E=D1(a),a.location.h(a.position.x+E.x,a.position.y+E.y),Gt.free(E)}};function r1(a,y,x,E){if(Zt(E)!==!1){var b=E.strokeWidth;b===0&&a instanceof Pr&&a.type===pn.Link&&a.adornedObject instanceof Ui&&(b=a.adornedObject.strokeWidth),b*=E.Ca,a instanceof En&&a.ua!==null?(a=a.geometry.bounds,E.Ge(a.x-b/2,a.y-b/2,a.width+b,a.height+b)):a instanceof Pr&&a.adornedPart.ua!==null?(a=a.adornedPart.ua.bounds,E.Ge(a.x-b/2,a.y-b/2,a.width+b,a.height+b)):E.Ge(-(b/2),-(b/2),y+b,x+b),b=E.desiredSize,b.w()||E.ua===null?E.dc.h(0,0,b.width,b.height):E.dc.assign(E.ua.bounds),Kt(E,!1)}}function Up(){this.xa="Base"}Ce(Up,Xo),Up.prototype.measure=function(a,y,x,E,b,z,tt){var rt=a.Pb();a.graduatedBounds=[];var ot=rt.margin,st=ot.right+ot.left,ut=ot.top+ot.bottom;rt.measure(y,x,z,tt);var ft=rt.measuredBounds,St=new Ye(-ot.left,-ot.top,Math.max(ft.width+st,0),Math.max(ft.height+ut,0));a.graduatedBounds.push(St),b.assign(St);for(var wt=rt.geometry,Et=rt.strokeWidth,Bt=wt.flattenedSegments,Vt=wt.flattenedLengths,jt=wt.flattenedTotalLength,_t=Bt.length,Qt=0,ie=0,ce=Si(),ke=0;ke<_t;ke++){var On=Bt[ke],ri=[];ie=Qt=0;for(var qn=On.length,wn=0;wn<qn;wn+=2){var tn=On[wn],ji=On[wn+1];if(wn!==0){var Fi=180*Math.atan2(ji-ie,tn-Qt)/Math.PI;0>Fi&&(Fi+=360),ri.push(Fi)}Qt=tn,ie=ji}ce.push(ri)}if(a.graduatedIntervals===null){for(var Lr=[],Kr=a.O.s,na=Kr.length,aa=0;aa<na;aa++){var Ja=Kr[aa],ia=[];if(Lr.push(ia),Ja.visible){var Fd=Ja.interval;if(!(0>Fd)){for(var To=0;To<na;To++)if(To!==aa){var mu=Kr[To];if(mu.visible&&Ja.constructor===mu.constructor){var Qa=mu.interval;Qa>Fd&&ia.push(Qa)}}}}}a.graduatedIntervals=Lr}var Bd=a.graduatedIntervals,il=a.O.s,Fl=il.length,Us=0,Ds=0,bc=jt;a.graduatedMarks=[];for(var vu,Ap=0;Ap<Fl;Ap++){var Ks=il[Ap];if(vu=[],Ks.visible&&Ks!==rt){var qa=Math.abs(Ks.interval),Fm=a.graduatedTickUnit;if(!(2>Fm*qa*jt/a.graduatedRange&&Ks.graduatedSkip===null)){var Lg=Vt[0][0],Bu=0,Ts=0;Ds=jt*Ks.graduatedStart-1e-4,bc=jt*Ks.graduatedEnd+1e-4;var bf=Fm*qa,Zs=a.graduatedTickBase;if(Zs<a.graduatedMin){var Lc=(a.graduatedMin-Zs)/bf;Lc=Lc%1===0?Lc:Math.floor(Lc+1),Zs+=Lc*bf}else Zs>a.graduatedMin+bf&&(Zs-=Math.floor((Zs-a.graduatedMin)/bf)*bf);for(var cv=Bd[Ap],Bm=Zs,Jy=1e-6*a.graduatedMax,dh=1;Zs<=a.graduatedMax+Jy;dh++){t:{for(var Wh=cv.length,Mg=0;Mg<Wh;Mg++){var Mc=(Zs-a.graduatedTickBase)%(cv[Mg]*a.graduatedTickUnit),Fp=1e-6*a.graduatedTickUnit;if(Mc<Fp&&Mc>-Fp){var Ac=!1;break t}}Ac=!0}if(Ac&&(Zs>a.graduatedMax&&(Zs=a.graduatedMax),Ks.graduatedSkip===null||Ks instanceof Xr&&!Ks.graduatedSkip(Zs,Ks)||Ks instanceof Ui&&!Ks.graduatedSkip(Zs,Ks))&&(Us=(Zs-a.graduatedMin)*jt/a.graduatedRange,Us>jt&&(Us=jt),Ds<=Us&&Us<=bc)){for(var ch=ce[Bu][Ts],kd=Vt[Bu][Ts];Bu<Vt.length;){for(;Us>Lg&&Ts<Vt[Bu].length-1;)Ts++,ch=ce[Bu][Ts],kd=Vt[Bu][Ts],Lg+=kd;if(Us<=Lg)break;Bu++,Ts=0,ch=ce[Bu][Ts],kd=Vt[Bu][Ts],Lg+=kd}var Is=Bt[Bu],ku=Is[2*Ts],fv=Is[2*Ts+1],Vh=(Us-(Lg-kd))/kd,Bp=new Gt(ku+(Is[2*Ts+2]-ku)*Vh+Et/2-wt.bounds.x,fv+(Is[2*Ts+3]-fv)*Vh+Et/2-wt.bounds.y);Bp.scale(rt.scale,rt.scale);t:{var yu=ch,Lf=ce[Bu];if(!(.5005>Vh&&.4995<Vh)){var Nu=yu;if(.5>Vh?0<Ts?Nu=Lf[Ts-1]:Se.$(Is[0],Is[Is.length-2])&&Se.$(Is[1],Is[Is.length-1])&&(Nu=Lf[Lf.length-1]):.5<Vh&&(Ts+1<Lf.length?Nu=Lf[Ts+1]:Se.$(Is[0],Is[Is.length-2])&&Se.$(Is[1],Is[Is.length-1])&&(Nu=Lf[0])),yu!==Nu){var Ag=Math.abs(yu-Nu);if(180<Ag&&(yu<Nu?yu+=360:Nu+=360,Ag=Math.abs(yu-Nu)),5e-4>Vh||.9995<Vh){ch=(yu+Nu)/2%360;break t}if(10>Ag){var kp=1-Math.abs(.5-Vh);ch=(yu*kp+Nu*(1-kp))%360;break t}}}ch=yu}if(Ks instanceof Xr){var _l="";Ks.graduatedFunction!==null?(_l=Ks.graduatedFunction(Zs,Ks),_l=_l!=null?_l.toString():""):_l=(+Zs.toFixed(2)).toString(),_l!==""&&vu.push({$l:Bp,angle:ch,text:_l})}else vu.push({$l:Bp,angle:ch})}Zs=Bm+dh*bf}}}a.graduatedMarks.push(vu)}wi(ce);var ma=a.graduatedMarks;if(ma!==null)for(var km=E.length,ss=0;ss<km;ss++){var Io=E[ss],ls=ma[ss];if(Io.visible&&Io!==rt&&ls.length!==0){if(Io instanceof Ui){var Uh=a,Nd=b,Mf=Io.alignmentFocus;Mf.Mc()&&(Mf=Ta);var Qy=Io.angle;Io.Kb=0,Io.measure(1/0,1/0,0,0),Io.Kb=Qy;var gv=Io.measuredBounds,Np=gv.width,Af=gv.height,Fg=Ye.allocAt(0,0,Np,Af),Os=Gt.alloc();Os.xi(Fg,Mf),Ye.free(Fg);for(var Kh=-Os.x,Su=-Os.y,vl=new Ye,Fc=ls.length,Dp=0;Dp<Fc;Dp++)for(var Bc=ls[Dp],pv=Bc.$l.x,Tp=Bc.$l.y,Lo=Bc.angle,Jl=0;4>Jl;Jl++){switch(Jl){case 0:Os.h(Kh,Su);break;case 1:Os.h(Kh+Np,Su);break;case 2:Os.h(Kh,Su+Af);break;case 3:Os.h(Kh+Np,Su+Af)}Os.rotate(Lo+Io.angle),Os.offset(pv,Tp),Dp===0&&Jl===0?vl.h(Os.x,Os.y,0,0):vl.Ye(Os),Os.offset(-pv,-Tp),Os.rotate(-Lo-Io.angle)}Gt.free(Os),Uh.graduatedBounds!==null&&Uh.graduatedBounds.push(vl),Ar(Nd,vl.x,vl.y,vl.width,vl.height)}else if(Io instanceof Xr){var Bl=a,mv=b;Bl.temporaryTextBlock===null&&(Bl.temporaryTextBlock=new Xr);var Ys=Bl.temporaryTextBlock;S1(Ys,Io);var Dd=Io.alignmentFocus;Dd.Mc()&&(Dd=Ta);for(var kl=Io.segmentOrientation,Ip=Io.segmentOffset,kc=new Ye,Nm=0,Op=0,Du=0,Ff=0,Nc=0,Rp=ls.length,Td=0;Td<Rp;Td++){var fh=ls[Td];Nm=fh.$l.x,Op=fh.$l.y,Du=fh.angle,Nc=Ff=Io.angle,kl!==ns&&(Nc=kl===em||kl===C0?Du+Io.angle:Du,Ff=En.computeAngle(kl,Nc)),Ys.Kb=Ff,Ys.text=fh.text||"",Ys.measure(1/0,1/0,0,0);var Id=Ys.measuredBounds,Zh=Ys.naturalBounds,Od=Zh.width,Bf=Zh.height,xu=Xi.alloc();xu.reset(),xu.translate(-Id.x,-Id.y),xu.scale(Ys.scale,Ys.scale),xu.rotate(Nc,Od/2,Bf/2),kl!==nm&&kl!==rm||xu.rotate(90,Od/2,Bf/2),kl!==im&&kl!==om||xu.rotate(-90,Od/2,Bf/2),kl===E0&&(45<Du&&135>Du||225<Du&&315>Du)&&xu.rotate(-Du,Od/2,Bf/2);var Bg=Ye.allocAt(0,0,Od,Bf),Rd=Gt.alloc();Rd.xi(Bg,Dd),xu.Ga(Rd);var kg=-Rd.x,qy=-Rd.y,Yh=Gt.alloc();Yh.assign(Ip),isNaN(Yh.x)&&(Yh.x=Od/2+3),isNaN(Yh.y)&&(Yh.y=-(Bf/2+3)),Yh.rotate(Du),Nm+=Yh.x+kg,Op+=Yh.y+qy;var kf=new Ye(Nm,Op,Id.width,Id.height),Dm=new Ye(Id.x,Id.y,Id.width,Id.height),$y=new Ye(Zh.x,Zh.y,Zh.width,Zh.height);fh.Sz=Ff,fh.lineCount=Ys.lineCount,fh.lines=[Ys.Cb,Ys.Ih,Ys.df,Ys.Le,Ys.Qc,Ys.Qb,Ys.ze],fh.actualBounds=kf,fh.measuredBounds=Dm,fh.naturalBounds=$y,Td===0?kc.assign(kf):kc.ed(kf),Gt.free(Yh),Gt.free(Rd),Ye.free(Bg),Xi.free(xu)}Bl.graduatedBounds!==null&&Bl.graduatedBounds.push(kc),Ar(mv,kc.x,kc.y,kc.width,kc.height)}Kt(Io,!1)}}},Up.prototype.arrange=function(a,y,x){if(a.graduatedBounds!==null){var E=a.Pb(),b=a.graduatedMarks;if(b!==null){var z=a.graduatedBounds,tt=0,rt=z[tt];tt++,E!==null&&E.arrange(rt.x-x.x,rt.y-x.y,rt.width,rt.height);for(var ot=y.length,st=0;st<ot;st++){var ut=y[st];rt=b[st],ut.visible&&ut!==E&&rt.length!==0&&(rt=z[tt],tt++,ut.arrange(rt.x-x.x,rt.y-x.y,rt.width,rt.height))}a.graduatedBounds=null}}},Up.prototype.gc=function(a,y,x){var E=x.$i;x.$i=!0;var b=a.naturalBounds,z=b.width,tt=b.height;b=y instanceof Tr,y.save(),y.beginPath(),y.rect(-1,-1,z+1,tt+1),y.clip(),y.Se(),z=a.Pb(),z.gc(y,x),tt=a.Df()*x.scale,0>=tt&&(tt=1);for(var rt=z.actualBounds,ot=a.O.s,st=a.graduatedMarks,ut=ot.length,ft=0;ft<ut;ft++){var St=ot[ft],wt=st[ft],Et=wt.length;if(St.visible&&St!==z&&wt.length!==0){if(St instanceof Ui){if(!(2>a.graduatedTickUnit*St.interval*z.geometry.flattenedTotalLength/a.graduatedRange*tt&&St.graduatedSkip===null)){var Bt=St.measuredBounds,Vt=St.strokeWidth*St.scale,jt=St.alignmentFocus;jt.Mc()&&(jt=Ta);for(var _t=0;_t<Et;_t++){var Qt=wt[_t].$l,ie=wt[_t].angle,ce=jt,ke=St.Ab;ke.reset(),ke.translate(Qt.x+rt.x,Qt.y+rt.y),ke.rotate(ie+St.angle,0,0),ke.translate(-Bt.width*ce.x+ce.offsetX+Vt/2,-Bt.height*ce.y+ce.offsetY+Vt/2),ke.scale(St.scale,St.scale),Mt(St,!1),St.wh.set(St.Ab),St.Kk=St.scale,Tt(St,!1),St.gc(y,x),b&&(a.svg.appendChild(St.svg),St.svg=null),St.Ab.reset()}}}else if(St instanceof Xr)for(a.temporaryTextBlock===null&&(a.temporaryTextBlock=new Xr),Bt=a.temporaryTextBlock,S1(Bt,St),Vt=0;Vt<Et;Vt++)jt=wt[Vt],jt.actualBounds&&jt.measuredBounds&&jt.naturalBounds&&(Bt.ec=jt.text||"",Bt.Kb=jt.Sz||0,Bt.Gc=jt.lineCount||0,_t=jt.lines,_t!==void 0&&(Bt.Cb=_t[0],Bt.Ih=_t[1],Bt.df=_t[2],Bt.Le=_t[3],Bt.Qc=_t[4],Bt.Qb=_t[5],Bt.ze=_t[6]),jt.naturalBounds&&(Bt.dc=jt.naturalBounds),jt.actualBounds&&(_t=jt.actualBounds,Bt.arrange(_t.x,_t.y,_t.width,_t.height)),_t=jt.actualBounds,Bt.arrange(_t.x,_t.y,_t.width,_t.height),Qt=jt.measuredBounds,jt=jt.naturalBounds,ie=Bt.Ab,ie.reset(),ie.translate(_t.x+rt.x,_t.y+rt.y),ie.translate(-Qt.x,-Qt.y),Bt.no(ie,jt.x,jt.y,jt.width,jt.height),Mt(Bt,!1),Bt.wh.set(Bt.Ab),Bt.Kk=Bt.scale,Tt(Bt,!1),Bt.Ng=St.part,Bt.Me=St.panel,Bt.gc(y,x),Bt.Me=null,Bt.Ng=null,b&&(a.svg.appendChild(Bt.svg),Bt.svg=null))}}x.$i=E,y.restore(),y.Vc(!0)};function pn(a,y){if(fe.call(this),this.na=null,a===void 0)this.na=pn.Position;else if(typeof a=="string"){var x=Vl.I(a);x!==null&&(this.na=x)}else a instanceof Xo?this.na=a:a&&(this.na=pn.Position,y=a);this.na===null&&pe("Panel type not specified or PanelLayout not loaded: "+a),this.l=this.l|4194304|(this.na===pn.Grid?1048576:0),this.O=new yn,this.yb=xs,this.Tm=ha,this.Uf=Ri,this.$g=null,this.$e="",this.jg=new Ye(NaN,NaN,NaN,NaN),this.T=this.F=null,this.xo=ai,this.jn=Bi,this.kn=Fo,this.ub=this.ra=null,this.zn=NaN,this.ge=this.Hh=null,y&&Object.assign(this,y)}Ce(pn,fe),pn.prototype.cloneProtected=function(a){fe.prototype.cloneProtected.call(this,a),a.na=this.na,a.yb=this.yb.J(),a.Tm=this.Tm.J(),a.Uf=this.Uf,a.$e=this.$e,a.jg.assign(this.jg),this.T!==null&&(a.T=this.T.copy(a)),a.xo=this.xo,a.jn=this.jn.J(),a.kn=this.kn.J(),this.ra!==null&&(a.ra=this.ra.copy()),a.ub=this.ub,a.zn=this.zn,a.Hh=this.Hh},pn.prototype.Af=function(a){fe.prototype.Af.call(this,a),a.O=this.O;for(var y=a.O.s,x=y.length,E=0;E<x;E++)y[E].Me=a;a.$g=null},pn.prototype.copy=function(){var a=fe.prototype.copy.call(this);if(a!==null){for(var y=this.O.s,x=y.length,E=0;E<x;E++){var b=y[E].copy();b.wi(a),b.Ng=null;var z=a.O,tt=z.count;if(z.Gb(tt,b),z=a.part,z!==null){z.Rh=null,b.portId!==null&&z instanceof Vn&&(z.Te=!0);var rt=a.diagram;rt!==null&&rt.undoManager.isUndoingRedoing||z.cb(Eo,"elements",a,null,b,null,tt)}}return a}return null},Ct=pn.prototype,Ct.toString=function(){return"Panel("+this.type.name+")#"+Cr(this)},Ct.Pn=function(a){fe.prototype.Pn.call(this,a);for(var y=this.O.s,x=y.length,E=0;E<x;E++)y[E].Pn(a)},Ct.hh=function(a,y){if(this.na===pn.Grid)a.yc(),this.na.gc(this,a,y);else if(this.na===pn.Graduated)a.yc(),this.na.gc(this,a,y);else{if(this.na===pn.Table)if(a.yc(),a instanceof Tr){var x=a.yd;a.yd=$s(a,"gojs-ts"),Ev(this,a),a.nh.pop(),a.yd=x}else Ev(this,a);(x=this.isClipping&&this.na===pn.Spot)&&a.save();for(var E=this.Pb(),b=this.O.s,z=b.length,tt=0;tt<z;tt++){var rt=b[tt];x&&rt===E&&(a.clipInsteadOfFill=!0),rt.gc(a,y),x&&rt===E&&(a.clipInsteadOfFill=!1)}x&&(a.restore(),a.Vc(!0))}};function Ev(a,y){y.lineCap="butt";var x=0<a.rowCount?a.rowDefs:null,E=0<a.columnCount?a.colDefs:null;x!==null&&_m(a,y,!0,x,!0),E!==null&&_m(a,y,!1,E,!0),x!==null&&o1(a,y,!0,x),E!==null&&o1(a,y,!1,E),x!==null&&_m(a,y,!0,x,!1),E!==null&&_m(a,y,!1,E,!1)}function o1(a,y,x,E){for(var b=E.length,z=a.actualBounds,tt=a.naturalBounds,rt=!0,ot=0;ot<b;ot++){var st=E[ot];if(st!==void 0&&st.actual!==0)if(rt)rt=!1;else{if(x){if(st.position>tt.height)continue}else if(st.position>tt.width)continue;var ut=st.separatorStrokeWidth;isNaN(ut)&&(ut=x?a.defaultRowSeparatorStrokeWidth:a.defaultColumnSeparatorStrokeWidth);var ft=st.separatorStroke;if(ft===null&&(ft=x?a.defaultRowSeparatorStroke:a.defaultColumnSeparatorStroke),ut!==0&&ft!==null){fo(a,y,ft,!1,!1,tt,z),ft=!1;var St=st.separatorDashArray;St===null&&(St=x?a.defaultRowSeparatorDashArray:a.defaultColumnSeparatorDashArray),St!==null&&(ft=!0,y.js(St,0)),y.beginPath(),St=st.position+ut,x?St>tt.height&&(ut-=St-tt.height):St>tt.width&&(ut-=St-tt.width),st=st.position+ut/2,y.lineWidth=ut,ut=a.yb,x?(st+=ut.top,St=tt.width-ut.right,y.moveTo(ut.left,st),y.lineTo(St,st)):(st+=ut.left,St=tt.height-ut.bottom,y.moveTo(st,ut.top),y.lineTo(st,St)),y.stroke(),y.Se(),ft&&y.fs()}}}}function _m(a,y,x,E,b){for(var z=E.length,tt=a.actualBounds,rt=a.naturalBounds,ot=a1(a,!0),st=a1(a,!1),ut=0;ut<z;ut++){var ft=E[ut];if(ft!==void 0&&ft.background!==null&&ft.coversSeparators!==b&&ft.actual!==0){var St=x?tt.height:tt.width;if(!(ft.position>St)){var wt=ft.Wc(),Et=ft.separatorStrokeWidth;isNaN(Et)&&(Et=x?a.defaultRowSeparatorStrokeWidth:a.defaultColumnSeparatorStrokeWidth);var Bt=ft.separatorStroke;Bt===null&&(Bt=x?a.defaultRowSeparatorStroke:a.defaultColumnSeparatorStroke),(Bt===null||ft.index===(x?ot:st))&&(Et=0),wt-=Et,Et=ft.position+Et,wt+=ft.actual,Et+wt>St&&(wt=St-Et),0>=wt||(St=a.yb,fo(a,y,ft.background,!0,!1,rt,tt),x?y.fillRect(St.left,Et+St.top,tt.width-(St.left+St.right),wt):y.fillRect(Et+St.left,St.top,wt,tt.height-(St.top+St.bottom)))}}}}function a1(a,y){for(var x=y?a.rowCount:a.columnCount,E=0;E<x;E++){var b=y?a.rowDefs[E]:a.colDefs[E];if(b!==void 0)return b.index}return 0}function bv(a){return a==="LineV"||a==="BarV"}Ct.lv=function(){for(var a=this.O.s,y=a.length,x=0;x<y;x++)a[x].lv();this.Uc=!0},Ct.kk=function(a,y,x){if(!fe.prototype.kk.call(this,a,y,x))return!1;if(this.type===pn.Table)x=this.svg.getElementsByClassName("gojs-ts"),x=x.length!==0?x[0]:null,x!==null&&(x.innerHTML=""),a.yd=x,Ev(this,a),a.yd=null;else if(this.na===pn.Grid||this.na===pn.Graduated)return this.svg.innerHTML="",this.svg.remove(),!1;x=this.O.s;for(var E=x.length,b=0;b<E;b++)x[b].gc(a,y);return!0},Ct.nk=function(){return!0},Ct.$o=function(a,y,x,E){if(!this.isClipping)if(this.Dd()&&a.bk!==null){a=a.bk,y=this.O.s;for(var b=0,z=0,tt=0;tt<y.length;tt++)if(y[tt].Ed()){var rt=y[tt].actualBounds;b=tt===0?rt.x:Math.min(rt.x,b),z=tt===0?rt.y:Math.min(rt.y,z)}E.setAttributeNS(null,"clip-path","path('M "+(a.x-x.x-b)+","+(a.y-x.y-z)+" l "+a.width+" 0 l 0 "+a.height+" l -"+a.width+" 0 z')")}else fe.prototype.$o.call(this,a,y,x,E)},Ct.Sj=function(a,y,x,E,b){var z=this.se(),tt=this.transform,rt=1/(tt.m11*tt.m22-tt.m12*tt.m21),ot=tt.m22*rt,st=-tt.m12*rt,ut=-tt.m21*rt,ft=tt.m11*rt,St=rt*(tt.m21*tt.dy-tt.m22*tt.dx),wt=rt*(tt.m12*tt.dx-tt.m11*tt.dy);if(this.areaBackground!==null)return tt=this.actualBounds,Se.Ff(tt.left,tt.top,tt.right,tt.bottom,a,y,x,E,b);if(this.background!==null)return z=a*ot+y*ut+St,rt=a*st+y*ft+wt,a=x*ot+E*ut+St,ot=x*st+E*ft+wt,b.h(0,0),x=this.naturalBounds,z=Se.Ff(0,0,x.width,x.height,z,rt,a,ot,b),b.transform(tt),z;z||(ot=1,ut=st=0,ft=1,wt=St=0),rt=a*ot+y*ut+St,a=a*st+y*ft+wt,ot=x*ot+E*ut+St,x=x*st+E*ft+wt,b.h(ot,x),E=(ot-rt)*(ot-rt)+(x-a)*(x-a),st=!1,ft=this.O.s,wt=ft.length,ut=Gt.alloc(),St=null,y=1/0;var Et=null,Bt=this.isClipping&&this.na===pn.Spot;Bt&&(Et=Gt.alloc(),St=this.Pb(),(st=St.Sj(rt,a,ot,x,Et))&&(y=(rt-Et.x)*(rt-Et.x)+(a-Et.y)*(a-Et.y)));for(var Vt=0;Vt<wt;Vt++){var jt=ft[Vt];jt.visible&&jt!==St&&jt.Sj(rt,a,ot,x,ut)&&(st=!0,jt=(rt-ut.x)*(rt-ut.x)+(a-ut.y)*(a-ut.y),jt<E&&(E=jt,b.set(ut)))}return Bt&&(y>E&&b.set(Et),Gt.free(Et)),Gt.free(ut),z&&b.transform(tt),st},Ct.Gj=function(){for(var a=this.O.s,y=a.length,x=0;x<y;x++)a[x].Gj();fe.prototype.Gj.call(this)},Ct.v=function(a){if(!Zt(this)){fe.prototype.v.call(this,a),a=null,(this.na===pn.Auto||this.na===pn.Link)&&(a=this.Pb());for(var y=this.O.s,x=y.length,E=0;E<x;E++){var b=y[E];if((b===a||b.isPanelMain)&&b.v(!0),!b.desiredSize.w()){var z=Xa(b,!1);(b instanceof es||b instanceof pn||b instanceof Xr||z!==on)&&b.v(!0)}}}},Ct.Uj=function(){if(!Zt(this)){Kt(this,!0),se(this,!0);for(var a=this.O.s,y=a.length,x=0;x<y;x++)a[x].Uj()}},Ct.Uk=function(){if(!(this.l&2048)){Mt(this,!0),Tt(this,!0);for(var a=this.O.s,y=a.length,x=0;x<y;x++)a[x].Wu()}},Ct.Wu=function(){Tt(this,!0);for(var a=this.O.s,y=a.length,x=0;x<y;x++)a[x].Wu()},Ct.Wl=function(a,y,x,E){var b=this.jg;b.h(0,0,0,0);var z=this.desiredSize,tt=this.minSize;x===void 0&&(x=tt.width,E=tt.height),x=Math.max(x,tt.width),E=Math.max(E,tt.height);var rt=this.maxSize;isNaN(z.width)||(a=Math.min(z.width,rt.width)),isNaN(z.height)||(y=Math.min(z.height,rt.height)),a=Math.max(x,a),y=Math.max(E,y);var ot=this.yb;a=Math.max(a-ot.left-ot.right,0),y=Math.max(y-ot.top-ot.bottom,0);var st=this.O.s;st.length!==0&&this.na.measure(this,a,y,st,b,x,E),a=b.width+ot.left+ot.right,ot=b.height+ot.top+ot.bottom,isFinite(z.width)&&(a=z.width),isFinite(z.height)&&(ot=z.height),a=Math.min(rt.width,a),ot=Math.min(rt.height,ot),a=Math.max(tt.width,a),ot=Math.max(tt.height,ot),a=Math.max(x,a),ot=Math.max(E,ot),Go(b,a,ot),Go(this.naturalBounds,a,ot),this.Ge(0,0,a,ot)},Ct.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 E=a[x];if(E.isPanelMain===!0)return this.$g=E}this.$g=a[0]}return this.$g};function zh(a){return a.part!==null?a.part.locationObject:null}Ct.eh=function(a,y,x,E){var b=this.O.s;if(this.actualBounds.h(a,y,x,E),b.length!==0){if(!this.desiredSize.w()){a=Xa(this,!0);var z=this.measuredBounds;y=z.width,z=z.height;var tt=this.Kg,rt=tt.left+tt.right;switch(tt=tt.top+tt.bottom,y===x&&z===E&&(a=on),a){case on:(y>x||z>E)&&(this.v(),this.measure(y>x?x:y,z>E?E:z,0,0));break;case dn:this.v(!0),this.measure(x+rt,E+tt,0,0);break;case ci:this.v(!0),this.measure(x+rt,z+tt,0,0);break;case xi:this.v(!0),this.measure(y+rt,E+tt,0,0)}}this.na.arrange(this,b,this.jg)}},Ct.gh=function(a){var y=this.naturalBounds,x=zh(this);if(Vr(0,0,y.width,y.height,a.x,a.y)){y=this.O.s;for(var E=y.length,b=Gt.allocAt(0,0);E--;){var z=y[E];if((z.visible||z===x)&&(In(b.set(a),z.transform),z.ca(b)))return Gt.free(b),!0}return Gt.free(b),!(this.Ma===null&&this.areaBackground===null)}return!1},Ct.ks=function(a){if(this.bindingId===a)return this;for(var y=this.O.s,x=y.length,E=0;E<x;E++){var b=y[E].ks(a);if(b!==null)return b}return null},Ct.qm=function(a,y){if(y(this,a),a instanceof pn){a=a.O.s;for(var x=a.length,E=0;E<x;E++)this.qm(a[E],y)}};function vf(a,y){s1(a,a,y)}function s1(a,y,x){x(y),y=y.O.s;for(var E=y.length,b=0;b<E;b++){var z=y[b];z instanceof pn&&s1(a,z,x)}}function vx(a,y){l1(a,a,y)}function l1(a,y,x){if(x(y),y instanceof pn){y=y.O.s;for(var E=y.length,b=0;b<E;b++)l1(a,y[b],x)}}Ct.Nl=function(a){return u1(this,this,a)};function u1(a,y,x){if(x(y))return y;if(y instanceof pn){y=y.O.s;for(var E=y.length,b=0;b<E;b++){var z=u1(a,y[b],x);if(z!==null)return z}}return null}Ct.fb=function(a){if(this.name===a)return this;var y=this.O.s,x=y.length;this.Hh===null&&this.itemTemplateMap===null||(x=Kp(this));for(var E=0;E<x;E++){var b=y[E];if(b instanceof pn){var z=b.fb(a);if(z!==null)return z}if(b.name===a)return b}return null};function h1(a){a=a.O.s;for(var y=a.length,x=0,E=0;E<y;E++){var b=a[E];b instanceof pn?x=Math.max(x,h1(b)):b instanceof Ui&&(x=Math.max(x,b.ig/2*b.strokeMiterLimit*b.Df()))}return x}Ct.se=function(){return!(this.type===pn.TableRow||this.type===pn.TableColumn)};function Sd(a){return a.type===pn.TableRow||a.type===pn.TableColumn}Ct.ic=function(a,y,x){if(this.pickable===!1||(y===void 0&&(y=null),x===void 0&&(x=null),te(this)))return null;var E=this.naturalBounds,b=1/this.Df(),z=this.se(),tt=z?a:In(Gt.allocAt(a.x,a.y),this.transform),rt=this.diagram,ot=10,st=5;if(rt!==null&&(ot=rt.Ql("extraTouchArea"),st=ot/2),Vr(-(st*b),-(st*b),E.width+ot*b,E.height+ot*b,tt.x,tt.y)){if(!this.isAtomic){b=this.O.s;var ut=b.length;if(rt=Gt.alloc(),st=(ot=this.isClipping&&this.na===pn.Spot)?this.Pb():null,ot&&(st.se()?In(rt.set(a),st.transform):rt.set(a),!st.ca(rt)))return Gt.free(rt),z||Gt.free(tt),null;for(var ft=zh(this);ut--;){var St=b[ut];if((St.visible||St===ft)&&(St.se()?In(rt.set(a),St.transform):rt.set(a),!ot||St!==st)){var wt=null;if(St instanceof pn?wt=St.ic(rt,y,x):St.pickable===!0&&St.ca(rt)&&(wt=St),wt!==null&&(y!==null&&(wt=y(wt)),wt!==null&&(x===null||x(wt))))return Gt.free(rt),z||Gt.free(tt),wt}}Gt.free(rt)}return this.background===null&&this.areaBackground===null?(z||Gt.free(tt),null):(a=Vr(0,0,E.width,E.height,tt.x,tt.y)?this:null,z||Gt.free(tt),a)}return z||Gt.free(tt),null},Ct.ji=function(a,y,x,E){if(this.pickable===!1)return!1;y===void 0&&(y=null),x===void 0&&(x=null);var b=this.naturalBounds,z=this.se(),tt=z?a:In(Gt.allocAt(a.x,a.y),this.transform);if(b=Vr(0,0,b.width,b.height,tt.x,tt.y),Sd(this)||b){if(!this.isAtomic){for(var rt=this.O.s,ot=rt.length,st=Gt.alloc(),ut=zh(this);ot--;){var ft=rt[ot];if(ft.visible||ft===ut){ft.se()?In(st.set(a),ft.transform):st.set(a);var St=ft;ft=ft instanceof pn?ft:null,(ft!==null?ft.ji(st,y,x,E):St.ca(st))&&St.pickable!==!1&&(y!==null&&(St=y(St)),St===null||x!==null&&!x(St)||E.add(St))}}Gt.free(st)}return z||Gt.free(tt),b&&(this.background!==null||this.areaBackground!==null)}return z||Gt.free(tt),!1},Ct.Cf=function(a,y,x,E,b,z){if(this.pickable===!1)return!1;y===void 0&&(y=null),x===void 0&&(x=null);var tt=z;if(z===void 0&&(tt=Xi.alloc(),tt.reset()),tt.multiply(this.transform),this.fh(a,tt))return Lv(this,y,x,b),z===void 0&&Xi.free(tt),!0;if(this.Yc(a,tt)){if(!this.isAtomic)for(var rt=zh(this),ot=this.O.s,st=ot.length;st--;){var ut=ot[st];if(ut.visible||ut===rt){var ft=ut.actualBounds,St=this.naturalBounds;ft.x>St.width||ft.y>St.height||0>ft.x+ft.width||0>ft.y+ft.height||(ft=ut,ut=ut instanceof pn?ut:null,St=Xi.alloc(),St.set(tt),(ut!==null?ut.Cf(a,y,x,E,b,St):Wo(ft,a,E,St))&&(y!==null&&(ft=y(ft)),ft===null||x!==null&&!x(ft)||b.add(ft)),Xi.free(St))}}return z===void 0&&Xi.free(tt),E}return z===void 0&&Xi.free(tt),!1};function Lv(a,y,x,E){for(var b=a.O.s,z=b.length;z--;){var tt=b[z];if(tt.visible){var rt=tt.actualBounds,ot=a.naturalBounds;rt.x>ot.width||rt.y>ot.height||0>rt.x+rt.width||0>rt.y+rt.height||(tt instanceof pn&&Lv(tt,y,x,E),y!==null&&(tt=y(tt)),tt===null||x!==null&&!x(tt)||E.add(tt))}}}Ct.og=function(a,y,x,E,b,z){if(this.pickable===!1)return!1;x===void 0&&(x=null),E===void 0&&(E=null);var tt=this.naturalBounds,rt=this.se(),ot=rt?a:In(Gt.allocAt(a.x,a.y),this.transform),st=rt?y:In(Gt.allocAt(y.x,y.y),this.transform),ut=ot.Bf(st),ft=0<ot.x&&ot.x<tt.width&&0<ot.y&&ot.y<tt.height||si(ot.x,ot.y,0,0,0,tt.height)<=ut||si(ot.x,ot.y,0,tt.height,tt.width,tt.height)<=ut||si(ot.x,ot.y,tt.width,tt.height,tt.width,0)<=ut||si(ot.x,ot.y,tt.width,0,0,0)<=ut;if(tt=ot.zd(0,0)<=ut&&ot.zd(0,tt.height)<=ut&&ot.zd(tt.width,0)<=ut&&ot.zd(tt.width,tt.height)<=ut,rt||(Gt.free(ot),Gt.free(st)),ft){if(!this.isAtomic){ot=Gt.alloc(),st=Gt.alloc(),ut=zh(this);for(var St=this.O.s,wt=St.length;wt--;){var Et=St[wt];if(Et.visible||Et===ut){var Bt=Et.actualBounds,Vt=this.naturalBounds;(!rt||!(Bt.x>Vt.width||Bt.y>Vt.height||0>Bt.x+Bt.width||0>Bt.y+Bt.height))&&(Et.se()?(Bt=Et.transform,In(ot.set(a),Bt),In(st.set(y),Bt)):(ot.set(a),st.set(y)),Bt=Et,Et=Et instanceof pn?Et:null,(Et!==null?Et.og(ot,st,x,E,b,z):Bt.tx(ot,st,b))&&(x!==null&&(Bt=x(Bt)),Bt===null||E!==null&&!E(Bt)||z.add(Bt)))}}Gt.free(ot),Gt.free(st)}return b?ft:tt}return!1};function Mv(a){var y=null;return a instanceof Ui&&(y=a.spot1,y===ha&&(y=null),a=a.geometry,a!==null&&y===null&&(y=a.spot1)),y===null&&(y=wo),y}function Av(a){var y=null;return a instanceof Ui&&(y=a.spot2,y===ha&&(y=null),a=a.geometry,a!==null&&y===null&&(y=a.spot2)),y===null&&(y=Rs),y}Ct.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},Ct.M=function(a){return this.O.M(a)},Ct.Gb=function(a,y){y instanceof mi&&pe("Cannot add a Part to a Panel: "+y+"; use a Panel instead"),(this===y||this.rg(y))&&(this===y&&pe("Cannot make a Panel contain itself: "+this.toString()),pe("Cannot make a Panel indirectly contain itself: "+this.toString()+" already contains "+y.toString()));var x=y.panel;if(x!==null&&x!==this&&pe("Cannot add a GraphObject that already belongs to another Panel to this Panel: "+y.toString()+", already contained by "+x.toString()+", cannot be shared by this Panel: "+this.toString()),this.na!==pn.Grid||y instanceof Ui||pe("Can only add Shapes to a Grid Panel, not: "+y),this.na!==pn.Graduated||y instanceof Ui||y instanceof Xr||pe("Can only add Shapes or TextBlocks to a Graduated Panel, not: "+y),y.wi(this),y.Ng=null,this.itemArray!==null){var E=y.data;E!==null&&typeof E=="object"&&(this.ge===null&&(this.ge=new yi),this.ge.add(E,y))}var b=this.O;if(E=-1,x===this){for(var z=-1,tt=this.O.s,rt=tt.length,ot=0;ot<rt;ot++)if(tt[ot]===y){z=ot;break}if(z!==-1){if(z===a||z+1>=b.count&&a>=b.count)return;b.mb(z),E=z}else pe("element "+y.toString()+" has panel "+x.toString()+" but is not contained by it.")}(0>a||a>b.count)&&(a=b.count),b.Gb(a,y),(a===0||y.isPanelMain)&&(this.$g=null),Zt(this)||this.v(),y.v(!1),y.portId!==null?this.Te=!0:y instanceof pn&&y.Te===!0&&(this.Te=!0),this.graduatedIntervals=null,this.If()||Qm(this,y,!1),x=this.part,x!==null&&(x.Rh=null,x.ag=NaN,this.Te&&x instanceof Vn&&(x.Te=!0),x.Te&&x instanceof Vn&&(x.wc=null),b=this.diagram,b!==null&&b.undoManager.isUndoingRedoing||(E!==-1&&x.cb(zo,"elements",this,y,null,E,null),x.cb(Eo,"elements",this,null,y,null,a)))};function Fv(a,y){a.l=y?a.l|16777216:a.l&-16777217}Ct.remove=function(a){for(var y=this.O.s,x=y.length,E=-1,b=0;b<x;b++)if(y[b]===a){E=b;break}E!==-1&&this.pc(E,!0)},Ct.mb=function(a){0<=a&&this.pc(a,!0)},Ct.pc=function(a,y){var x=this.O,E=x.M(a);if(E.Ng=null,E.wi(null),this.ge!==null){var b=E.data;typeof b=="object"&&this.ge.remove(b)}x.mb(a),Kt(this,!1),this.v(),this.$g===E&&(this.$g=null),this.graduatedIntervals=null;var z=this.part;z!==null&&(z.Rh=null,z.ag=NaN,z.Wb(),z instanceof Vn&&(E instanceof pn?E.qm(E,function(tt,rt){qv(z,rt,y)}):qv(z,E,y)),x=this.diagram,x!==null&&x.undoManager.isUndoingRedoing||z.cb(zo,"elements",this,E,null,a,null))},Ct.Fb=function(a){0>a&&gi(a,">= 0",pn,"getRowDefinition:idx"),a=Math.round(a);var y=this.rowDefs;if(y[a]===void 0){var x=new Vo;x.wi(this),x.isRow=!0,x.index=a,y[a]=x,this.cb(Eo,"rowdefs",this,null,x,null,a)}return y[a]},Ct.oA=function(a){if(0>a&&gi(a,">= 0",pn,"removeRowDefinition:idx"),this.rowCount!==0){a=Math.round(a);var y=this.rowDefs,x=y[a];if(x){y[a]=void 0;for(var E=y.length-1;0<=E&&y[E--]===void 0;)y.length--;this.cb(zo,"rowdefs",this,x,null,a,null),this.v()}}};function d1(a,y,x){var E=a.rowDefs;if(!(0>y)){if(E[y]=x instanceof Vo?x:void 0,!x)for(y=E.length-1;0<=y&&E[y--]===void 0;)E.length--;a.v()}}Ct.Eb=function(a){0>a&&gi(a,">= 0",pn,"getColumnDefinition:idx"),a=Math.round(a);var y=this.colDefs;if(y[a]===void 0){var x=new Vo;x.wi(this),x.isRow=!1,x.index=a,y[a]=x,this.cb(Eo,"coldefs",this,null,x,null,a)}return y[a]},Ct.jA=function(a){if(0>a&&gi(a,">= 0",pn,"removeColumnDefinition:idx"),this.columnCount!==0){a=Math.round(a);var y=this.colDefs,x=y[a];if(x){y[a]=void 0;for(var E=y.length-1;0<=E&&y[E--]===void 0;)y.length--;this.cb(zo,"coldefs",this,x,null,a,null),this.v()}}};function c1(a,y,x){var E=a.colDefs;if(!(0>y)){if(E[y]=x instanceof Vo?x:void 0,!x)for(y=E.length-1;0<=y&&E[y--]===void 0;)E.length--;a.v()}}Ct.Gy=function(a){var y=null;return a.isRow?y=this.Fb(a.index):a.isRow||(y=this.Eb(a.index)),y&&qm(y,a),this},Ct.Hy=function(a,y){return(a=this.Fb(a))&&qm(a,new Vo(y)),this},Ct.By=function(a,y){return(a=this.Eb(a))&&qm(a,new Vo(y)),this},Ct.nz=function(a){if(0>a||this.type!==pn.Table||this.rowCount===0)return-1;for(var y=0,x=this.rowDefs,E=x.length,b=this.topIndex;b<E;b++){var z=x[b];if(z!==void 0&&(y+=z.total,a<y))break}return b},Ct.fz=function(a){if(0>a||this.type!==pn.Table||this.columnCount===0)return-1;for(var y=0,x=this.colDefs,E=x.length,b=this.leftIndex;b<E;b++){var z=x[b];if(z!==void 0&&(y+=z.total,a<y))break}return b},Ct.Fz=function(a,y){if(y===void 0&&(y=new Gt(NaN,NaN)),this.type!==pn.Graduated)return y.h(NaN,NaN),y;a=Math.min(Math.max(a,this.graduatedMin),this.graduatedMax);var x=this.Pb();return x.geometry.Pu((a-this.graduatedMin)/this.graduatedRange,y),x.transform.Ga(y)},Ct.Gz=function(a){if(this.type!==pn.Graduated)return NaN;var y=this.Pb();return y.transform.Cd(a),y.geometry.xx(a)*this.graduatedRange+this.graduatedMin};function f1(a){return a=a.allBindings,a!==null&&a._isFrozen}function Ll(a){var y=a.allBindings;if(y===null)a.data!==null&&pe("Template cannot have .data be non-null: "+a),a.allBindings=y=new yn;else if(y._isFrozen)return;var x=new yn;Fv(a,!1),a.qm(a,function(st,ut){ut.th();var ft=ut.localBindings;if(ft!==null)for(xt(ut,!1),ft=ft.iterator;ft.next();){var St=ft.value;St.mode===fm&&xt(ut,!0);var wt=St.sourceName;wt!==null&&(wt==="/"&&Fv(st,!0),wt=MS(St,st,ut),wt!==null&&(x.add(wt),wt.srcBindings===null&&(wt.srcBindings=new yn),wt.srcBindings.add(St))),y.add(St)}if(ut instanceof pn&&ut.type===pn.Table){if(0<ut.rowCount){for(st=ut.rowDefs,ft=st.length,St=0;St<ft;St++)if(wt=st[St],wt!==void 0&&wt.be!==null)for(var Et=wt.be.iterator;Et.next();){var Bt=Et.value;Bt.xd=wt,Bt.to=2,Bt.wl=wt.index,y.add(Bt)}}if(0<ut.columnCount){for(ut=ut.colDefs,st=ut.length,ft=0;ft<st;ft++)if(St=ut[ft],St!==void 0&&St.be!==null)for(wt=St.be.iterator;wt.next();)Et=wt.value,Et.xd=St,Et.to=1,Et.wl=St.index,y.add(Et)}}});for(var E=x.iterator;E.next();){var b=E.value;if(b.srcBindings!==null){xt(b,!0);for(var z=b.srcBindings.iterator;z.next();){var tt=z.value;b.localBindings===null&&(b.localBindings=new yn),b.localBindings.add(tt)}}b.srcBindings=null}for(E=y.iterator;E.next();)if(b=E.value,z=b.xd,z!==null){b.xd=null;var rt=b.targetProperty,ot=rt.indexOf(".");0<ot&&z instanceof pn&&(tt=rt.substring(0,ot),rt=rt.substr(ot+1),ot=z.fb(tt),ot!==null?(z=ot,b.targetProperty=rt):Oi('Warning: unable to find GraphObject named "'+tt+'" for Binding: '+b.toString())),z instanceof Vo?(tt=Cr(z.panel),b.Ai=tt===void 0?-1:tt,z.panel.bindingId=b.Ai):z instanceof fe?(tt=Cr(z),b.Ai=tt===void 0?-1:tt,z.bindingId=b.Ai):pe("Unknown type of binding target: "+z)}y.freeze(),a instanceof mi&&a.Zc()&&a.Va()}Ct.Uy=function(a){a===void 0&&(a=!1);var y=this.copy();return vx(y,function(x){x instanceof pn&&(x.allBindings=null,x.ub=null);var E=x.localBindings;E!==null&&(x.localBindings=null,E.each(function(b){x.bind(b.copy())})),E=x.animationTriggers,E!==null&&(x.animationTriggers=null,E.each(function(b){x.Jv(b.value.copy())}))}),a&&Ll(y),y},Ct.La=function(a){var y=this.allBindings;if(y!==null)for(a===void 0&&(a=""),y=y.iterator;y.next();){var x=y.value,E=x.sourceProperty;if((a===""||E===""||E===a)&&(E=x.targetProperty,x.converter!==null||E!=="")){E=this.data;var b=x.sourceName;if(b!==null){if(b==="")E=this;else if(b==="/")E=this;else if(b===".")E=this;else if(b==="..")E=this;else if(E=this.fb(b),E===null)continue}else if(x.isToModel)if(E=this.diagram,E!==null)E=E.model.modelData;else continue;var z=this,tt=x.Ai;if(tt!==-1){if(z=this.ks(tt),z===null)continue}else x.xd!==null&&(z=x.xd);if(b==="/"?E=z.part:b==="."?E=z:b===".."&&(E=z.panel),b=x.to,b!==0){if(!(z instanceof pn))continue;b===1?z=z.Eb(x.wl):b===2&&(z=z.Fb(x.wl))}z!==void 0&&x.Mv(z,E)}}},Ct.sx=function(a){return a==null||this.ge===null?null:this.ge.I(a)};function yx(a,y){a=a.O.s;for(var x=a.length,E=y.length,b=0,z=null;b<x&&(z=a[b],!(z instanceof pn&&z.data!==null));)b++,z=a[b];if(x-b!==E)return!0;if(z===null)return 0<E;for(var tt=0;b<x&&tt<E;){if(z=a[b],!(z instanceof pn)||z.data!==y[tt])return!0;b++,tt++}return!1}function Kp(a){if(a.type===pn.Spot||a.type===pn.Auto)return Math.min(a.O.length,1);if(a.type===pn.Link){a=a.O;for(var y=a.length,x=0;x<y;x++){var E=a.M(x);if(!(E instanceof Ui&&E.isPanelMain))break}return x}return a.type===pn.Table&&0<a.O.length&&(a=a.O.M(0),a.isPanelMain&&a instanceof pn&&Sd(a))?1:0}Ct.mv=function(){for(var a=Kp(this);this.O.length>a;)this.pc(this.O.length-1,!1);g1(this,this.itemArray)};function g1(a,y){var x=Kp(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 E=0;E<x;E++)Jm(a,y[E],E,!0)}else{E=x;for(var b=0;b<y.length;b++,E++){var z=y[b],tt=E<a.O.length?a.O.M(E):null;if(tt instanceof pn){if(tt.data!==z){var rt=kv(a,tt.data),ot=kv(a,z),st=ot!==rt;st||(rt=Nv(a,rt),st=Nv(a,ot)!==rt),st?(a.pc(E,!1),Jm(a,z,b,!1)):tt.data=z}}else Jm(a,z,b,!1)}for(;E<a.O.length;)a.pc(E,!1);a.$g=null,Bv(a,x,0),Zt(a)||a.v(),a.graduatedIntervals=null,a.If()||Qm(a,a,!1),y=a.part,y!==null&&(y.Rh=null,y.ag=NaN,a.Te&&y instanceof Vn&&(y.Te=!0),y.Te&&y instanceof Vn&&(y.wc=null))}}function Jm(a,y,x,E){if(!(y==null||0>x)){var b=kv(a,y);if(b=Nv(a,b),b!==null){if(Ll(b),b=b.copy(),b.l&16777216){var z=a.ih();z!==null&&Fv(z,!0)}typeof y=="object"&&(a.ge===null&&(a.ge=new yi),a.ge.add(y,b)),z=x+Kp(a),a.Gb(z,b),E&&(b.ub=y,Bv(a,z,x),b.ub=null),b.data=y}}}function Bv(a,y,x){for(a=a.O;y<a.length;){var E=a.M(y);if(E instanceof pn){var b=y,z=x;E.type===pn.TableRow?E.row=b:E.type===pn.TableColumn&&(E.column=b),E.itemIndex=z}y++,x++}}function kv(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=ko(y,a)}else return"";if(a===void 0)return"";if(typeof a=="string")return a;pe("Panel.getCategoryForItemData found a non-string category for "+y+": "+a)}function Nv(a,y){var x=a.itemTemplateMap,E=null;return x!==null&&(E=x.I(y)),E===null&&(x!==null&&(E=x.I("")),E===null&&(p1||(p1=!0,Oi('No item template Panel found for category "'+y+'" on '+a),Oi(" Using default item template."),a=new pn,y=new Xr,y.bind(new Do("text","",Er)),a.add(y),m1=a),E=m1)),E}function Qm(a,y,x){var E=y.enabledChanged;if(E!==null&&E(y,x),y instanceof pn){y=y.O.s,E=y.length;for(var b=0;b<E;b++){var z=y[b];x&&z instanceof pn&&!z.isEnabled||Qm(a,z,x)}}}function Au(a,y){y.name=a,Vl.add(a,y)}we.Object.defineProperties(pn.prototype,{type:{get:function(){return this.na},set:function(a){var y=this.na;y!==a&&(this.na=a,this.isAtomic=this.na===pn.Grid,this.v(),this.g("type",y,a))}},elements:{get:function(){return this.O.iterator}},naturalBounds:{get:function(){return this.dc}},padding:{get:function(){return this.yb},set:function(a){typeof a=="number"?(0>a&&gi(a,">= 0",pn,"padding"),a=new Di(a)):(0>a.left&&gi(a.left,">= 0",pn,"padding:value.left"),0>a.right&&gi(a.right,">= 0",pn,"padding:value.right"),0>a.top&&gi(a.top,">= 0",pn,"padding:value.top"),0>a.bottom&&gi(a.bottom,">= 0",pn,"padding:value.bottom"));var y=this.yb;y.D(a)||(this.yb=a=a.J(),this.v(),this.g("padding",y,a))}},defaultAlignment:{get:function(){return this.Tm},set:function(a){var y=this.Tm;y.D(a)||(this.Tm=a=a.J(),this.v(),this.g("defaultAlignment",y,a))}},defaultStretch:{get:function(){return this.Uf},set:function(a){var y=this.Uf;y!==a&&(this.Uf=a,this.v(),this.g("defaultStretch",y,a))}},defaultSeparatorPadding:{get:function(){return this.T!==null?this.T.Qp:xs},set:function(a){typeof a=="number"&&(a=new Di(a));var y=this.defaultSeparatorPadding;y.D(a)||(a=a.J(),this.T===null&&(this.T=new fl),this.T.Qp=a,this.v(),this.g("defaultSeparatorPadding",y,a))}},defaultRowSeparatorStroke:{get:function(){return this.T!==null?this.T.ia:null},set:function(a){var y=this.defaultRowSeparatorStroke;y!==a&&(a===null||typeof a=="string"||a instanceof mr)&&(a instanceof mr&&a.freeze(),this.T===null&&(this.T=new fl),this.T.ia=a,this.N(),this.g("defaultRowSeparatorStroke",y,a))}},defaultRowSeparatorStrokeWidth:{get:function(){return this.T!==null?this.T.Ha:1},set:function(a){var y=this.defaultRowSeparatorStrokeWidth;y!==a&&isFinite(a)&&0<=a&&(this.T===null&&(this.T=new fl),this.T.Ha=a,this.v(),this.g("defaultRowSeparatorStrokeWidth",y,a))}},defaultRowSeparatorDashArray:{get:function(){return this.T!==null?this.T.V:null},set:function(a){var y=this.defaultRowSeparatorDashArray;if(y!==a){if(a!==null){for(var x=a.length,E=0,b=0;b<x;b++){var z=a[b];typeof z=="number"&&0<=z&&isFinite(z)||pe("defaultRowSeparatorDashArray value "+z+" at index "+b+" must be a positive number or zero."),E+=z}if(E===0){if(y===null)return;a=null}}this.T===null&&(this.T=new fl),this.T.V=a,this.N(),this.g("defaultRowSeparatorDashArray",y,a)}}},defaultColumnSeparatorStroke:{get:function(){return this.T!==null?this.T.u:null},set:function(a){var y=this.defaultColumnSeparatorStroke;y!==a&&(a===null||typeof a=="string"||a instanceof mr)&&(a instanceof mr&&a.freeze(),this.T===null&&(this.T=new fl),this.T.u=a,this.N(),this.g("defaultColumnSeparatorStroke",y,a))}},defaultColumnSeparatorStrokeWidth:{get:function(){return this.T!==null?this.T.F:1},set:function(a){var y=this.defaultColumnSeparatorStrokeWidth;y!==a&&isFinite(a)&&0<=a&&(this.T===null&&(this.T=new fl),this.T.F=a,this.v(),this.g("defaultColumnSeparatorStrokeWidth",y,a))}},defaultColumnSeparatorDashArray:{get:function(){return this.T!==null?this.T.o:null},set:function(a){var y=this.defaultColumnSeparatorDashArray;if(y!==a){if(a!==null){for(var x=a.length,E=0,b=0;b<x;b++){var z=a[b];typeof z=="number"&&0<=z&&isFinite(z)||pe("defaultColumnSeparatorDashArray value "+z+" at index "+b+" must be a positive number or zero."),E+=z}if(E===0){if(y===null)return;a=null}}this.T===null&&(this.T=new fl),this.T.o=a,this.N(),this.g("defaultColumnSeparatorDashArray",y,a)}}},inRowsCols:{get:function(){return this.T!==null?this.T.nb:null},set:function(a){this.T===null&&(this.T=new fl),this.T.nb=a}},viewboxStretch:{get:function(){return this.xo},set:function(a){var y=this.xo;y!==a&&(this.xo=a,this.v(),this.g("viewboxStretch",y,a))}},gridCellSize:{get:function(){return this.jn},set:function(a){var y=this.jn;if(!y.D(a)){a.w()&&a.width!==0&&a.height!==0||pe("Invalid Panel.gridCellSize: "+a),this.jn=a.J();var x=this.diagram;x!==null&&this===x.grid&&Hl(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()||pe("Invalid Panel.gridOrigin: "+a),this.kn=a.J();var x=this.diagram;x!==null&&this===x.grid&&Hl(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 Gh),this.ra.lq=a,this.v(),this.g("graduatedMin",y,a),vt(this)&&(a=this.part,a!==null&&Jr(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 Gh),this.ra.F=a,this.v(),this.g("graduatedMax",y,a),vt(this)&&(a=this.part,a!==null&&Jr(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 Gh),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 Gh),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 Gh,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 Gh,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 Gh,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 Gh,this.ra.Zh=a)}},panelLayoutState:{get:function(){return this.F},set:function(a){this.F=a}},Te:{get:function(){return(this.l&8388608)!==0},set:function(a){(this.l&8388608)!==0!==a&&(this.l^=8388608)}},rowDefs:{get:function(){return this.T===null&&(this.T=new fl),this.T.Pc}},rowCount:{get:function(){return this.T===null?0:this.rowDefs.length}},colDefs:{get:function(){return this.T===null&&(this.T=new fl),this.T.Oc}},columnCount:{get:function(){return this.T===null?0:this.colDefs.length}},rowSizing:{get:function(){return this.T!==null?this.T.ob:t0},set:function(a){var y=this.rowSizing;y!==a&&(this.T===null&&(this.T=new fl),this.T.ob=a,this.v(),this.g("rowSizing",y,a))}},columnSizing:{get:function(){return this.T!==null?this.T.j:t0},set:function(a){var y=this.columnSizing;y!==a&&(this.T===null&&(this.T=new fl),this.T.j=a,this.v(),this.g("columnSizing",y,a))}},topIndex:{get:function(){return this.T!==null?this.T.Hb:0},set:function(a){var y=this.topIndex;y!==a&&((!isFinite(a)||0>a)&&pe("Panel.topIndex must be greater than zero and a real number, not: "+a),this.T===null&&(this.T=new fl),this.T.Hb=a,this.v(),this.g("topIndex",y,a))}},leftIndex:{get:function(){return this.T!==null?this.T.hb:0},set:function(a){var y=this.leftIndex;y!==a&&((!isFinite(a)||0>a)&&pe("Panel.leftIndex must be greater than zero and a real number, not: "+a),this.T===null&&(this.T=new fl),this.T.hb=a,this.v(),this.g("leftIndex",y,a))}},data:{get:function(){return this.ub},set:function(a){var y=this.ub;if(y!==a){var x=this instanceof mi&&!(this instanceof Pr);Ll(this),this.ub=a;var E=this.diagram;E!==null&&(x?(x=E.partManager,this instanceof En?(y!==null&&x.bf.remove(y),a!==null&&x.bf.add(a,this)):this instanceof mi&&(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),E!==null&&E.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 Ai),this.A.nb=a)}},itemArray:{get:function(){return this.Hh},set:function(a){var y=this.Hh;if(y!==a||a!==null&&yx(this,a)){var x=this.diagram;y!==a&&(x!==null&&y!==null&&yy(x.partManager,this,x),this.Hh=a,x!==null&&a!==null&&vy(x.partManager,this)),this.g("itemArray",y,a),x!==null&&x.undoManager.isUndoingRedoing||g1(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 yi}var y=this.itemTemplateMap.I("");y!==a&&((a instanceof mi||a.isPanelMain)&&pe("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(););Zi(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&&(Zi(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 Gi&&(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&&Qm(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))}}}),we.Object.defineProperties(pn,{Position:{get:function(){return Vl.I("Position")}},Horizontal:{get:function(){return Vl.I("Horizontal")}},Vertical:{get:function(){return Vl.I("Vertical")}},Spot:{get:function(){return Vl.I("Spot")}},Auto:{get:function(){return Vl.I("Auto")}},Table:{get:function(){return Vl.I("Table")}},Viewbox:{get:function(){return Vl.I("Viewbox")}},TableRow:{get:function(){return Vl.I("TableRow")}},TableColumn:{get:function(){return Vl.I("TableColumn")}},Link:{get:function(){return Vl.I("Link")}},Grid:{get:function(){return Vl.I("Grid")}},Graduated:{get:function(){return Vl.I("Graduated")}}}),pn.prototype.rebuildItemElements=pn.prototype.mv,pn.prototype.findItemPanelForData=pn.prototype.sx,pn.prototype.updateTargetBindings=pn.prototype.La,pn.prototype.copyTemplate=pn.prototype.Uy,pn.prototype.graduatedValueForPoint=pn.prototype.Gz,pn.prototype.graduatedPointForValue=pn.prototype.Fz,pn.prototype.findColumnForLocalX=pn.prototype.fz,pn.prototype.findRowForLocalY=pn.prototype.nz,pn.prototype.addColumnDefinition=pn.prototype.By,pn.prototype.addRowDefinition=pn.prototype.Hy,pn.prototype.addRowColumnDefinition=pn.prototype.Gy,pn.prototype.removeColumnDefinition=pn.prototype.jA,pn.prototype.getColumnDefinition=pn.prototype.Eb,pn.prototype.removeRowDefinition=pn.prototype.oA,pn.prototype.getRowDefinition=pn.prototype.Fb,pn.prototype.removeAt=pn.prototype.mb,pn.prototype.remove=pn.prototype.remove,pn.prototype.insertAt=pn.prototype.Gb,pn.prototype.elt=pn.prototype.M,pn.prototype.add=pn.prototype.add,pn.prototype.findObject=pn.prototype.fb,pn.prototype.findInVisualTree=pn.prototype.Nl,pn.prototype.walkVisualTreeFrom=pn.prototype.qm,pn.prototype.findMainElement=pn.prototype.Pb;var p1=!1,m1=null,Vl=new yi;pn.className="Panel",pn.definePanelLayout=Au,Au("Position",new jm),Au("Vertical",new Gm),Au("Auto",new Wm),Au("Link",new Xm);function Gh(){this.lq=0,this.F=100,this.ia=10,this.V=0,this.Zh=this.o=this.j=this.u=null}Gh.prototype.copy=function(){var a=new Gh;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},Gh.className="GradPanelSettings";function fl(){this.Pc=[],this.Oc=[],this.j=this.ob=t0,this.hb=this.Hb=0,this.Qp=xs,this.Ha=1,this.V=this.ia=null,this.F=1,this.nb=this.o=this.u=null}fl.prototype.copy=function(a){for(var y=new fl,x=this.Pc,E=x.length,b=y.Pc,z=0;z<E;z++)if(x[z]!==void 0){var tt=x[z].copy();tt.wi(a),b[z]=tt}for(x=this.Oc,E=x.length,b=y.Oc,z=0;z<E;z++)x[z]!==void 0&&(tt=x[z].copy(),tt.wi(a),b[z]=tt);return y.ob=this.ob,y.j=this.j,y.Hb=this.Hb,y.hb=this.hb,y.Qp=this.Qp.J(),y.Ha=this.Ha,y.ia=this.ia,y.V=this.V,y.F=this.F,y.u=this.u,y.o=this.o,y.nb=this.nb,y},fl.className="TablePanelSettings";function Vo(a){Zr(this),this.Me=null,this.uq=!0,this.Za=0,this.Hc=NaN,this.jj=0,this.hj=1/0,this.Jb=ha,this.pa=this.oc=this.oa=0,this.be=null,this.oo=Dv,this.hg=Ri,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))}Vo.prototype.copy=function(){var a=new Vo;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=hn(this.separatorDashArray)),a.Ma=this.Ma,a.Pm=this.Pm,a.be=this.be,a};function qm(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=hn(y.separatorDashArray)),a.background=y.background,a.coversSeparators=y.coversSeparators,a.be=y.be}Ct=Vo.prototype,Ct.qb=function(a){a.classType===Vo&&(this.sizing=a)},Ct.toString=function(){return"RowColumnDefinition "+(this.isRow?"(Row ":"(Column ")+this.index+") #"+Cr(this)},Ct.wi=function(a){this.Me=a},Ct.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)},Ct.Wc=function(){var a=0,y=this.Me,x=0,E=this.isRow;if(y!==null&&y.type===pn.Table)for(var b=E?y.rowDefs.length:y.colDefs.length,z=0;z<b;z++){var tt=E?y.rowDefs[z]:y.colDefs[z];if(tt!==void 0&&tt.oa!==0){x=tt.index;break}}if(this.index!==x&&(x=this.separatorStroke,x===null&&y!==null&&(x=E?y.defaultRowSeparatorStroke:y.defaultColumnSeparatorStroke),x!==null&&(a=this.separatorStrokeWidth,isNaN(a)&&(y!==null?a=E?y.defaultRowSeparatorStrokeWidth:y.defaultColumnSeparatorStrokeWidth:a=0))),E=this.dg,E===null)if(y!==null)E=y.defaultSeparatorPadding;else return a;return a+(this.isRow?E.top+E.bottom:E.left+E.right)},Ct.Ob=function(a,y,x){var E=this.Me;if(E!==null&&(E.cb(io,a,this,y,x,void 0,void 0),this.be!==null&&(y=E.diagram,y!==null&&!y.skipsModelSourceBindings&&(E=E.ih(),E!==null&&(y=E.data,y!==null)))))for(x=this.be.iterator;x.next();)x.value.sp(this,y,a,E)};function $m(a){if(a.sizing===Dv){var y=a.Me;return a.isRow?y.rowSizing:y.columnSizing}return a.sizing}Ct.bind=function(a,y,x,E){var b=null;return typeof a=="string"?b=new Do(a,y,x,E):b=a,b.xd=this,a=this.panel,a!==null&&(y=a.ih(),y!==null&&f1(y)&&pe("Cannot add a Binding to a RowColumnDefinition that is already frozen: "+b+" on "+a)),this.be===null&&(this.be=new yn),this.be.add(b),this},we.Object.defineProperties(Vo.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&&gi(a,">= 0",Vo,"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&&gi(a,">= 0",Vo,"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))&&gi(a,">= 0",Vo,"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&&gi(a,">= 0",Vo,"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 Di(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&&uc(a,"RowColumnDefinition.separatorStroke"),a instanceof mr&&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,E=0,b=0;b<x;b++){var z=a[b];typeof z=="number"&&0<=z&&isFinite(z)||pe("separatorDashArray value "+z+" at index "+b+" must be a positive number or zero."),E+=z}if(E===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&&uc(a,"RowColumnDefinition.background"),a instanceof mr&&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}}}),Vo.prototype.computeEffectiveSpacing=Vo.prototype.Wc,Vo.prototype.computeEffectiveSpacingTop=Vo.prototype.Io;var Dv=new Je(Vo,"Default",0),Zp=new Je(Vo,"None",1),t0=new Je(Vo,"ProportionalExtra",2);Vo.className="RowColumnDefinition",Vo.Default=Dv,Vo.None=Zp,Vo.ProportionalExtra=t0;function Ui(a,y){fe.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)}Ce(Ui,fe),Ui.prototype.cloneProtected=function(a){fe.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=hn(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 yf(a){a.Na===null?a.Na=new Ov:a.Na.nc&&(a.Na=a.Na.copy())}Ct=Ui.prototype,Ct.th=function(){fe.prototype.th.call(this),this.Na!==null&&(this.Na.nc=!0)},Ct.qb=function(a){a===on||a===ai||a===rr||a===Ri?this.geometryStretch=a:fe.prototype.qb.call(this,a)},Ct.toString=function(){return"Shape("+(this.figure!=="None"?this.figure:this.toArrow!=="None"?this.toArrow:this.fromArrow)+")#"+Cr(this)};function ap(a,y,x,E){var b=x.length;if(!(4>b)){var z=E.measuredBounds,tt=Math.max(1,z.width);z=z.height;for(var rt=x[0],ot=x[1],st,ut,ft,St,wt,Et,Bt=0,Vt=Si(),jt=2;jt<b;jt+=2)st=x[jt],ut=x[jt+1],ft=st-rt,rt=ut-ot,ft===0&&(ft=.001),St=rt/ft,wt=Math.atan2(rt,ft),Et=Math.sqrt(ft*ft+rt*rt),Vt.push([ft,wt,St,Et]),Bt+=Et,rt=st,ot=ut;rt=x[0],ot=x[1],ft=E.measuredBounds.width,E instanceof Ui&&(ft-=E.strokeWidth),1>ft&&(ft=1),b=x=ft,st=tt/2,ut=st!==0,jt=0,Et=Vt[jt],ft=Et[0],wt=Et[1],St=Et[2],Et=Et[3];for(var _t=0;.1<=Bt;){if(_t===0&&(ut?(b=x,b-=st,Bt-=st,ut=!1):b=x,b===0&&(b=1)),b>Bt){wi(Vt);return}b>Et?(_t=b-Et,b=Et):_t=0;var Qt=Math.sqrt(b*b/(1+St*St));if(0>ft&&(Qt=-Qt),rt+=Qt,ot+=St*Qt,a.translate(rt,ot),a.rotate(wt),a.translate(-(tt/2),-(z/2)),_t===0&&E.hh(a,y),a.translate(tt/2,z/2),a.rotate(-wt),a.translate(-rt,-ot),Bt-=b,Et-=b,_t!==0){if(jt++,jt===Vt.length){wi(Vt);return}Et=Vt[jt],ft=Et[0],wt=Et[1],St=Et[2],Et=Et[3],b=_t}}wi(Vt)}}Ct.hh=function(a,y){var x=this.xc,E=this.Ui;if(x!==null||E!==null){var b=this.ua;if(b!==null){a.yc();var z=this.actualBounds,tt=this.naturalBounds;E!==null&&fo(this,a,E,!0,!1,tt,z);var rt=this.part,ot=this.ig;if(x===null||ot!==0||rt===null||!this.isPanelMain&&rt.Pb()!==this||(ot=rt.type===pn.Link&&rt instanceof Pr&&rt.category==="Selection"&&rt.adornedObject instanceof Ui&&rt.adornedPart.Pb()===rt.adornedObject?rt.adornedObject.strokeWidth:0),ot===0&&(x=null),x!==null&&ot!==0&&(fo(this,a,x,!1,!1,tt,z),a.lineWidth=ot,a.lineJoin=this.strokeJoin,a.lineCap=this.strokeCap,a.miterLimit=this.strokeMiterLimit),z=!1,rt&&y.Gf("drawShadows")&&(z=rt.isShadowed),a.Il===!1&&(z=!1),rt=!0,x===null||E!==null&&E!=="transparent"||(rt=!1),tt=!1,ot=this.strokeDashArray,ot!==null&&(tt=!0,a.js(ot,this.strokeDashOffset)),b.type===Fn.j)a.beginPath(),a.moveTo(b.startX,b.startY),a.lineTo(b.endX,b.endY),x!==null&&a.jk(),a.Se();else if(b.type===Fn.u){var st=b.startX;ot=b.startY;var ut=b.endX,ft=b.endY;b=Math.min(st,ut);var St=Math.min(ot,ft);st=Math.abs(ut-st),ot=Math.abs(ft-ot),a.beginPath(),a.rect(b,St,st,ot),E!==null&&a.ng(E),x!==null&&(rt&&z&&_a(a),a.jk(),rt&&z&&la(a)),a.Se()}else if(b.type===Fn.F)st=b.startX,ot=b.startY,ut=b.endX,ft=b.endY,b=Math.abs(ut-st)/2,St=Math.abs(ft-ot)/2,st=Math.min(st,ut)+b,ot=Math.min(ot,ft)+St,a.beginPath(),a.moveTo(st,ot-St),a.bezierCurveTo(st+Se.wg*b,ot-St,st+b,ot-Se.wg*St,st+b,ot),a.bezierCurveTo(st+b,ot+Se.wg*St,st+Se.wg*b,ot+St,st,ot+St),a.bezierCurveTo(st-Se.wg*b,ot+St,st-b,ot+Se.wg*St,st-b,ot),a.bezierCurveTo(st-b,ot-Se.wg*St,st-Se.wg*b,ot-St,st,ot-St),a.closePath(),E!==null&&a.ng(E),x!==null&&(rt&&z&&_a(a),a.jk(),rt&&z&&la(a)),a.Se();else if(b.type===Fn.o)for(b=b.figures,ot=b.length,St=0;St<ot;St++){st=b.s[St],a.beginPath(),a.moveTo(st.startX,st.startY),ut=st.segments.s,ft=ut.length;for(var wt=null,Et=0;Et<ft;Et++){var Bt=ut[Et];switch(Bt.type){case jo:a.moveTo(Bt.endX,Bt.endY);break;case Ur:a.lineTo(Bt.endX,Bt.endY);break;case da:a.bezierCurveTo(Bt.point1X,Bt.point1Y,Bt.point2X,Bt.point2Y,Bt.endX,Bt.endY);break;case Cs:a.quadraticCurveTo(Bt.point1X,Bt.point1Y,Bt.endX,Bt.endY);break;case Bo:if(Bt.radiusX===Bt.radiusY){var Vt=Math.PI/180;a.arc(Bt.point1X,Bt.point1Y,Bt.radiusX,Bt.startAngle*Vt,(Bt.startAngle+Bt.sweepAngle)*Vt,0>Bt.sweepAngle,wt!==null?wt.endX:st.startX,wt!==null?wt.endY:st.startY)}else if(wt=Ka(Bt,st),Vt=wt.length,Vt===0)a.lineTo(Bt.centerX,Bt.centerY);else for(var jt=0;jt<Vt;jt++){var _t=wt[jt];jt===0&&a.lineTo(_t[0],_t[1]),a.bezierCurveTo(_t[2],_t[3],_t[4],_t[5],_t[6],_t[7])}break;case zs:if(jt=Vt=0,wt!==null&&wt.type===Bo){if(wt=Ka(wt,st),_t=wt.length,_t===0){a.lineTo(Bt.endX,Bt.endY);break}wt=wt[_t-1]||null,wt!==null&&(Vt=wt[6],jt=wt[7])}else Vt=wt!==null?wt.endX:st.startX,jt=wt!==null?wt.endY:st.startY;if(wt=ws(Bt,st,Vt,jt),Vt=wt.length,Vt===0){a.lineTo(Bt.endX,Bt.endY);break}for(jt=0;jt<Vt;jt++)_t=wt[jt],a.bezierCurveTo(_t[2],_t[3],_t[4],_t[5],_t[6],_t[7]);break;default:pe("Segment not of valid type: "+Bt.type)}Bt.isClosed&&a.closePath(),wt=Bt}ut=st.isFilled,z?st.isShadowed?(ut===!0&&E!=="transparent"&&E!==null&&a.ng(E,st.isEvenOdd),x!==null&&(ut&&rt&&_a(a),a.jk(),ut&&rt&&la(a))):(_a(a),ut&&E!=="transparent"&&E!==null&&a.ng(E,st.isEvenOdd),x!==null&&a.jk(),la(a)):(ut&&E!==null&&a.ng(E,st.isEvenOdd),x!==null&&a.jk()),a.Se(St)}if(tt&&a.fs(),this.pathPattern!==null){if(x=this.pathPattern,x.measure(1/0,1/0),E=x.measuredBounds,x.arrange(0,0,E.width,E.height),z=this.geometry,a.save(),a.beginPath(),E=Si(),z.type===Fn.j)E.push(z.startX),E.push(z.startY),E.push(z.endX),E.push(z.endY),ap(a,y,E,x);else if(z.type===Fn.o)for(z=z.figures.iterator;z.next();){for(rt=z.value,E.length=0,E.push(rt.startX),E.push(rt.startY),tt=rt.startX,b=rt.startY,ot=tt,St=b,st=rt.segments.s,ut=st.length,ft=0;ft<ut;ft++){switch(Et=st[ft],Et.type){case jo:ap(a,y,E,x),E.length=0,E.push(Et.endX),E.push(Et.endY),tt=Et.endX,b=Et.endY,ot=tt,St=b;break;case Ur:E.push(Et.endX),E.push(Et.endY),tt=Et.endX,b=Et.endY;break;case da:Se.Qe(tt,b,Et.point1X,Et.point1Y,Et.point2X,Et.point2Y,Et.endX,Et.endY,.5,E),tt=Et.endX,b=Et.endY;break;case Cs:Se.ep(tt,b,Et.point1X,Et.point1Y,Et.endX,Et.endY,.5,E),tt=Et.endX,b=Et.endY;break;case Bo:if(Bt=Ka(Et,rt),wt=Bt.length,wt===0){E.push(Et.centerX),E.push(Et.centerY),tt=Et.centerX,b=Et.centerY;break}for(Vt=0;Vt<wt;Vt++)jt=Bt[Vt],Se.Qe(tt,b,jt[2],jt[3],jt[4],jt[5],jt[6],jt[7],.5,E),tt=jt[6],b=jt[7];break;case zs:if(Bt=ws(Et,rt,tt,b),wt=Bt.length,wt===0){E.push(Et.endX),E.push(Et.endY),tt=Et.endX,b=Et.endY;break}for(Vt=0;Vt<wt;Vt++)jt=Bt[Vt],Se.Qe(tt,b,jt[2],jt[3],jt[4],jt[5],jt[6],jt[7],.5,E),tt=jt[6],b=jt[7];break;default:pe("Segment not of valid type: "+Et.type)}Et.isClosed&&(E.push(ot),E.push(St),ap(a,y,E,x))}ap(a,y,E,x)}else if(z.type===Fn.u)E.push(z.startX),E.push(z.startY),E.push(z.endX),E.push(z.startY),E.push(z.endX),E.push(z.endY),E.push(z.startX),E.push(z.endY),E.push(z.startX),E.push(z.startY),ap(a,y,E,x);else if(z.type===Fn.F){if(b=new Yo,b.startX=z.endX,b.startY=(z.startY+z.endY)/2,tt=new xr(Bo),tt.startAngle=0,tt.sweepAngle=360,tt.centerX=(z.startX+z.endX)/2,tt.centerY=(z.startY+z.endY)/2,tt.radiusX=Math.abs(z.startX-z.endX)/2,tt.radiusY=Math.abs(z.startY-z.endY)/2,b.add(tt),z=Ka(tt,b),rt=z.length,rt===0)E.push(tt.centerX),E.push(tt.centerY);else for(tt=b.startX,b=b.startY,ot=0;ot<rt;ot++)St=z[ot],Se.Qe(tt,b,St[2],St[3],St[4],St[5],St[6],St[7],.5,E),tt=St[6],b=St[7];ap(a,y,E,x)}wi(E),a.restore(),a.Vc(!1)}}}},Ct.kk=function(a,y,x){return!fe.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)},Ct.nk=function(a){return this.geometry!==null&&1<this.geometry.figures.length||this.pathPattern!==null?!0:fe.prototype.nk.call(this,a)},Ct.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)}},Ct.ga=function(a,y){if(y===void 0&&(y=new Gt),a instanceof pi){a.Mc()&&pe("getDocumentPoint Spot must be a real, specific Spot, not: "+a.toString());var x=this.naturalBounds,E=this.strokeWidth;y.h(a.x*(x.width+E)-E/2+x.x+a.offsetX,a.y*(x.height+E)-E/2+x.y+a.offsetY)}else y.set(a);return this.oe.Ga(y),y},Ct.mi=function(a){a===void 0&&(a=new Ye);var y=this.naturalBounds,x=this.oe;y=Ye.allocAt(y.x,y.y,y.width,y.height);var E=this.strokeWidth;return y.Bc(E/2,E/2),E=Gt.allocAt(y.x,y.y).transform(x),a.h(E.x,E.y,0,0),E.h(y.right,y.y).transform(x),Ar(a,E.x,E.y,0,0),E.h(y.right,y.bottom).transform(x),Ar(a,E.x,E.y,0,0),E.h(y.x,y.bottom).transform(x),Ar(a,E.x,E.y,0,0),Ye.free(y),Gt.free(E),a},Ct.gh=function(a,y){var x=this.geometry;if(x===null||this.fill===null&&this.stroke===null)return!1;var E=x.bounds,b=this.strokeWidth/2;x.type!==Fn.j||y||(b+=2);var z=Ye.alloc();if(z.assign(E),z.Bc(b+2,b+2),!z.ca(a))return Ye.free(z),!1;if(E=b+1e-4,x.type===Fn.j)return this.stroke===null||(E=(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>E)?!1:(Ye.free(z),Se.Yb(x.startX,x.startY,x.endX,x.endY,b,a.x,a.y));if(x.type===Fn.u){y=x.startX;var tt=x.startY,rt=x.endX;if(x=x.endY,z.x=Math.min(y,rt),z.y=Math.min(tt,x),z.width=Math.abs(rt-y),z.height=Math.abs(x-tt),this.fill===null){if(z.Bc(-E,-E),z.ca(a))return Ye.free(z),!1;z.Bc(E,E)}return this.stroke!==null&&z.Bc(b,b),a=z.ca(a),Ye.free(z),a}if(x.type===Fn.F){tt=x.startX,b=x.startY,rt=x.endX;var ot=x.endY;if(x=Math.min(tt,rt),y=Math.min(b,ot),tt=Math.abs(rt-tt)/2,b=Math.abs(ot-b)/2,x=a.x-(x+tt),y=a.y-(y+b),this.fill===null){if(tt-=E,b-=E,0>=tt||0>=b||1>=x*x/(tt*tt)+y*y/(b*b))return Ye.free(z),!1;tt+=E,b+=E}return this.stroke!==null&&(tt+=E,b+=E),Ye.free(z),0>=tt||0>=b?!1:1>=x*x/(tt*tt)+y*y/(b*b)}if(x.type===Fn.o)return Ye.free(z),this.fill===null?Il(x,a.x,a.y,b):wu(x,a,b,1<this.strokeWidth,y);pe("Unknown Geometry type: "+x.type)},Ct.Wl=function(a,y,x,E){var b=this.desiredSize,z=this.ig;if(a=Math.max(a,0),y=Math.max(y,0),this.Rd!==null)var tt=this.geometry.bounds;else{var rt=this.figure,ot=Iv[rt];if(ot===void 0){var st=Se.Ze[rt];typeof st=="string"&&(st=Se.Ze[st]),typeof st=="function"?(ot=st(null,100,100),Iv[rt]=ot):pe("Unsupported Figure: "+rt)}tt=ot.bounds}rt=tt.width,ot=tt.height,st=tt.width;var ut=tt.height;switch(Xa(this,!0)){case on:E=x=0;break;case dn:st=Math.max(a-z,0),ut=Math.max(y-z,0);break;case ci:st=Math.max(a-z,0),E=0;break;case xi:x=0,ut=Math.max(y-z,0)}isFinite(b.width)&&(st=b.width),isFinite(b.height)&&(ut=b.height);var ft=this.maxSize,St=this.minSize;switch(x=Math.max(x-z,St.width),E=Math.max(E-z,St.height),st=Math.min(ft.width,st),ut=Math.min(ft.height,ut),st=isFinite(st)?Math.max(x,st):Math.max(rt,x),ut=isFinite(ut)?Math.max(E,ut):Math.max(ot,E),x=Tv(this),x){case on:break;case dn:rt=st,ot=ut;break;case ai:x=Math.min(st/rt,ut/ot),isFinite(x)||(x=1),rt*=x,ot*=x;break;default:pe(x+" is not a valid geometryStretch.")}this.Rd!==null?(rt===0&&(rt=.001),ot===0&&(ot=.001),x=this.Rd!==null?this.Rd:this.ua,tt=x.bounds,E=rt/tt.width,tt=ot/tt.height,isFinite(E)||(E=1),isFinite(tt)||(tt=1),this.ua=E===1&&tt===1?x:x.copy().scale(E,tt)):this.ua!==null&&Se.$(this.ua.Sk,a-z)&&Se.$(this.ua.Rk,y-z)||(this.ua=Ui.makeGeometry(this,rt,ot)),tt=this.ua.bounds,a===1/0||y===1/0?this.Ge(tt.x-z/2,tt.y-z/2,a===0&&rt===0?0:tt.width+z,y===0&&ot===0?0:tt.height+z):this.Ge(-(z/2),-(z/2),st+z,ut+z),b.w()?(st=b.width,ut=b.height,st=Math.min(ft.width,st),ut=Math.min(ft.height,ut),st=Math.max(St.width,st),ut=Math.max(St.height,ut),this.dc.h(0,0,st,ut)):this.dc.assign(tt)};function Tv(a){var y=a.geometryStretch;return a.Rd!==null?y===Ri?dn:y:y===Ri?Iv[a.figure].defaultStretch:y}Ct.eh=function(a,y,x,E){Da(this,a,y,x,E)},Ct.rs=function(a,y,x){return this.Sj(a.x,a.y,y.x,y.y,x)},Ct.Sj=function(a,y,x,E,b){var z=this.transform,tt=1/(z.m11*z.m22-z.m12*z.m21),rt=z.m22*tt,ot=-z.m12*tt,st=-z.m21*tt,ut=z.m11*tt,ft=tt*(z.m21*z.dy-z.m22*z.dx),St=tt*(z.m12*z.dx-z.m11*z.dy);z=a*rt+y*st+ft,tt=a*ot+y*ut+St,rt=x*rt+E*st+ft,ot=x*ot+E*ut+St,ft=this.ig/2,st=this.ua,st===null&&(this.measure(1/0,1/0),st=this.ua);var wt=st.bounds;if(ut=!1,st.type===Fn.j)if(1.5>=this.strokeWidth)ut=Se.Ve(st.startX,st.startY,st.endX,st.endY,z,tt,rt,ot,b);else{if(st.startX===st.endX?(E=ft,ut=0):(y=(st.endY-st.startY)/(st.endX-st.startX),ut=ft/Math.sqrt(1+y*y),E=ut*y),y=Si(),a=new Gt,Se.Ve(st.startX+E,st.startY+ut,st.endX+E,st.endY+ut,z,tt,rt,ot,a)&&y.push(a),a=new Gt,Se.Ve(st.startX-E,st.startY-ut,st.endX-E,st.endY-ut,z,tt,rt,ot,a)&&y.push(a),a=new Gt,Se.Ve(st.startX+E,st.startY+ut,st.startX-E,st.startY-ut,z,tt,rt,ot,a)&&y.push(a),a=new Gt,Se.Ve(st.endX+E,st.endY+ut,st.endX-E,st.endY-ut,z,tt,rt,ot,a)&&y.push(a),rt=y.length,rt===0)return wi(y),!1;for(ut=!0,ot=1/0,E=0;E<rt;E++)a=y[E],x=(a.x-z)*(a.x-z)+(a.y-tt)*(a.y-tt),x<ot&&(ot=x,b.x=a.x,b.y=a.y);wi(y)}else if(st.type===Fn.u)ut=Se.Ff(wt.x-ft,wt.y-ft,wt.x+wt.width+ft,wt.y+wt.height+ft,z,tt,rt,ot,b);else if(st.type===Fn.F){y=Ye.allocAt(wt.x,wt.y,wt.width,wt.height).Bc(ft,ft);t:if(y.width===0)ut=Se.Ve(y.x,y.y,y.x,y.y+y.height,z,tt,rt,ot,b);else if(y.height===0)ut=Se.Ve(y.x,y.y,y.x+y.width,y.y,z,tt,rt,ot,b);else{if(a=y.width/2,st=y.height/2,E=y.x+a,ut=y.y+st,x=9999,z!==rt&&(x=(tt-ot)/(z-rt)),9999>Math.abs(x)){if(ot=tt-ut-x*(z-E),0>a*a*x*x+st*st-ot*ot){b.x=NaN,b.y=NaN,ut=!1;break t}ft=Math.sqrt(a*a*x*x+st*st-ot*ot),rt=(-(a*a*x*ot)+a*st*ft)/(st*st+a*a*x*x)+E,a=(-(a*a*x*ot)-a*st*ft)/(st*st+a*a*x*x)+E,st=x*(rt-E)+ot+ut,ot=x*(a-E)+ot+ut,Math.abs((z-rt)*(z-rt))+Math.abs((tt-st)*(tt-st))<Math.abs((z-a)*(z-a))+Math.abs((tt-ot)*(tt-ot))?(b.x=rt,b.y=st):(b.x=a,b.y=ot)}else{if(rt=st*st,ot=z-E,rt-=rt/(a*a)*ot*ot,0>rt){b.x=NaN,b.y=NaN,ut=!1;break t}ot=Math.sqrt(rt),rt=ut+ot,ot=ut-ot,Math.abs(rt-tt)<Math.abs(ot-tt)?(b.x=z,b.y=rt):(b.x=z,b.y=ot)}ut=!0}Ye.free(y)}else if(st.type===Fn.o){St=Gt.alloc();var Et=rt-z,Bt=ot-tt,Vt=Et*Et+Bt*Bt,jt=z,_t=tt;if(0<Vt&&wt.contains(jt,_t)&&(St.x=jt,St.y=_t,this.ca(St)))for(Et!==0&&.5>Math.abs(Et)?(Bt*=.5/Et,Et=.5):Bt!==0&&.5>Math.abs(Bt)&&(Et*=.5/Bt,Bt=.5),jt-=Et,_t-=Bt;wt.contains(jt,_t);)jt-=Et,_t-=Bt;for(b.x=rt,b.y=ot,Bt=0;Bt<st.figures.count;Bt++){var Qt=st.figures.s[Bt],ie=Qt.isFilled?jt:z,ce=Qt.isFilled?_t:tt,ke=Qt.segments;wt=Qt.startX,Et=Qt.startY;for(var On=wt,ri=Et,qn=0;qn<ke.count;qn++){var wn=ke.s[qn],tn=wn.type,ji=wn.endX,Fi=wn.endY,Lr=!1;switch(tn){case jo:On=ji,ri=Fi;break;case Ur:Lr=n0(wt,Et,ji,Fi,ie,ce,rt,ot,St);break;case da:Lr=Se.Eo(wt,Et,wn.point1X,wn.point1Y,wn.point2X,wn.point2Y,ji,Fi,ie,ce,rt,ot,.6,St);break;case Cs:Lr=Se.Eo(wt,Et,wt+2/3*(wn.point1X-wt),Et+2/3*(wn.point1Y-Et),ji+2/3*(wn.point1X-ji),Fi+2/3*(wn.point1Y-Fi),ji,Fi,ie,ce,rt,ot,.6,St);break;case Bo:case zs:tn=wn.type===Bo?Ka(wn,Qt):ws(wn,Qt,wt,Et);var Kr=tn.length;if(Kr===0){Lr=n0(wt,Et,wn.type===Bo?wn.centerX:wn.endX,wn.type===Bo?wn.centerY:wn.endY,ie,ce,rt,ot,St);break}for(Fi=null,ji=0;ji<Kr;ji++){if(Fi=tn[ji],ji===0&&n0(wt,Et,Fi[0],Fi[1],ie,ce,rt,ot,St)){var na=e0(ie,ce,St,Vt,b);na<Vt&&(Vt=na,ut=!0)}Se.Eo(Fi[0],Fi[1],Fi[2],Fi[3],Fi[4],Fi[5],Fi[6],Fi[7],ie,ce,rt,ot,.6,St)&&(na=e0(ie,ce,St,Vt,b),na<Vt&&(Vt=na,ut=!0))}ji=Fi[6],Fi=Fi[7];break;default:pe("Unknown Segment type: "+tn)}wt=ji,Et=Fi,Lr&&(Lr=e0(ie,ce,St,Vt,b),Lr<Vt&&(Vt=Lr,ut=!0)),wn.isClosed&&(ji=On,Fi=ri,n0(wt,Et,ji,Fi,ie,ce,rt,ot,St)&&(wn=e0(ie,ce,St,Vt,b),wn<Vt&&(Vt=wn,ut=!0)))}}z=x-a,tt=E-y,rt=Math.sqrt(z*z+tt*tt),rt!==0&&(z/=rt,tt/=rt),b.x-=z*ft,b.y-=tt*ft,Gt.free(St)}else pe("Unknown Geometry type: "+st.type);return ut?(this.transform.Ga(b),!0):!1};function e0(a,y,x,E,b){return a=x.x-a,y=x.y-y,y=a*a+y*y,y<E?(b.x=x.x,b.y=x.y,y):E}function n0(a,y,x,E,b,z,tt,rt,ot){if(Se.$(a,x)&&Se.$(y,E)||Se.$(b,tt)&&Se.$(z,rt))return!1;var st=!1,ut=(b-tt)*(y-E)-(z-rt)*(a-x);return ut===0?!1:(ot.x=((b*rt-z*tt)*(a-x)-(b-tt)*(a*E-y*x))/ut,ot.y=((b*rt-z*tt)*(y-E)-(z-rt)*(a*E-y*x))/ut,(a>x?a-x:x-a)<(y>E?y-E:E-y)?(a=y<E?y:E,y=y<E?E:y,(ot.y>a||Se.$(ot.y,a))&&(ot.y<y||Se.$(ot.y,y))&&(st=!0)):(y=a<x?a:x,a=a<x?x:a,(ot.x>y||Se.$(ot.x,y))&&(ot.x<a||Se.$(ot.x,a))&&(st=!0)),st)}Ct.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 E=this.strokeWidth/2,b=!1,z=Gt.alloc();return z.h(x.x-E,x.y-E),a.ca(y.Ga(z))&&(z.h(x.x-E,x.bottom+E),a.ca(y.Ga(z))&&(z.h(x.right+E,x.bottom+E),a.ca(y.Ga(z))&&(z.h(x.right+E,x.y-E),a.ca(y.Ga(z))&&(b=!0)))),Gt.free(z),b},Ct.Yc=function(a,y){if(this.fh(a,y)||y===void 0&&(y=this.transform,a.Re(this.actualBounds)))return!0;var x=Xi.alloc();x.set(y),x.Vj();var E=a.left,b=a.right,z=a.top;a=a.bottom;var tt=Gt.alloc();if(tt.h(E,z),x.Ga(tt),this.gh(tt,!0)||(tt.h(b,z),x.Ga(tt),this.gh(tt,!0))||(tt.h(E,a),x.Ga(tt),this.gh(tt,!0))||(tt.h(b,a),x.Ga(tt),this.gh(tt,!0)))return Gt.free(tt),!0;var rt=Gt.alloc(),ot=Gt.alloc();return x.set(y),x.bv(this.transform),x.Vj(),rt.x=b,rt.y=z,rt.transform(x),tt.x=E,tt.y=z,tt.transform(x),y=!1,Sf(this,tt,rt,ot)?y=!0:(tt.x=b,tt.y=a,tt.transform(x),Sf(this,tt,rt,ot)?y=!0:(rt.x=E,rt.y=a,rt.transform(x),Sf(this,tt,rt,ot)?y=!0:(tt.x=E,tt.y=z,tt.transform(x),Sf(this,tt,rt,ot)&&(y=!0)))),Gt.free(tt),Xi.free(x),Gt.free(rt),Gt.free(ot),y};function Sf(a,y,x,E){if(!a.rs(y,x,E))return!1;a=y.x,y=y.y;var b=x.x,z=x.y;return x=E.x,E=E.y,a===b?(y<z?(a=y,y=z):a=z,E>=a&&E<=y):(a<b?(E=a,a=b):E=b,x>=E&&x<=a)}Ct.tx=function(a,y,x){function E(Vt,jt){for(var _t=Vt.length,Qt=0;Qt<_t;Qt+=2)if(jt.zd(Vt[Qt],Vt[Qt+1])>b)return!0;return!1}if(x&&this.fill!==null&&this.gh(a,!0))return!0;var b=a.Bf(y),z=b;if(1.5<this.strokeWidth&&(b=this.strokeWidth/2+Math.sqrt(b),b*=b),y=this.ua,y===null&&(this.measure(1/0,1/0),y=this.ua,y===null))return!1;if(!x){var tt=y.bounds,rt=tt.x,ot=tt.y,st=tt.x+tt.width;if(tt=tt.y+tt.height,Ln(a.x,a.y,rt,ot)<=b&&Ln(a.x,a.y,st,ot)<=b&&Ln(a.x,a.y,rt,tt)<=b&&Ln(a.x,a.y,st,tt)<=b)return!0}if(rt=y.startX,ot=y.startY,st=y.endX,tt=y.endY,y.type===Fn.j){if(x=(rt-st)*(a.x-st)+(ot-tt)*(a.y-tt),si(a.x,a.y,rt,ot,st,tt)<=(0<=(st-rt)*(a.x-rt)+(tt-ot)*(a.y-ot)&&0<=x?b:z))return!0}else{if(y.type===Fn.u)return y=!1,x&&(y=si(a.x,a.y,rt,ot,rt,tt)<=b||si(a.x,a.y,rt,ot,st,ot)<=b||si(a.x,a.y,st,ot,st,tt)<=b||si(a.x,a.y,rt,tt,st,tt)<=b),y;if(y.type===Fn.F){y=a.x-(rt+st)/2,z=a.y-(ot+tt)/2;var ut=Math.abs(st-rt)/2,ft=Math.abs(tt-ot)/2;if(ut===0||ft===0)return si(a.x,a.y,rt,ot,st,tt)<=b;if(x){if(a=Se.$y(ut,ft,y,z),a*a<=b)return!0}else return!(Ln(y,z,-ut,0)>=b||Ln(y,z,0,-ft)>=b||Ln(y,z,0,ft)>=b||Ln(y,z,ut,0)>=b)}else if(y.type===Fn.o){if(st=y.bounds,z=st.x,rt=st.y,ot=st.x+st.width,st=st.y+st.height,a.x>ot&&a.x<z&&a.y>st&&a.y<rt&&si(a.x,a.y,z,rt,z,st)>b&&si(a.x,a.y,z,rt,ot,rt)>b&&si(a.x,a.y,ot,st,z,st)>b&&si(a.x,a.y,ot,st,ot,rt)>b)return!1;if(z=Math.sqrt(b),x){if(this.fill===null?Il(y,a.x,a.y,z):wu(y,a,z,!0,!1))return!0}else{for(x=y.figures,y=0;y<x.count;y++){if(z=x.s[y],tt=z.startX,ut=z.startY,a.zd(tt,ut)>b)return!1;for(rt=z.segments.s,ot=rt.length,st=0;st<ot;st++)switch(ft=rt[st],ft.type){case jo:case Ur:if(tt=ft.endX,ut=ft.endY,a.zd(tt,ut)>b)return!1;break;case da:var St=Si();if(Se.Qe(tt,ut,ft.point1X,ft.point1Y,ft.point2X,ft.point2Y,ft.endX,ft.endY,.8,St),tt=E(St,a),wi(St),tt||(tt=ft.endX,ut=ft.endY,a.zd(tt,ut)>b))return!1;break;case Cs:if(St=Si(),Se.ep(tt,ut,ft.point1X,ft.point1Y,ft.endX,ft.endY,.8,St),tt=E(St,a),wi(St),tt||(tt=ft.endX,ut=ft.endY,a.zd(tt,ut)>b))return!1;break;case Bo:case zs:St=ft.type===Bo?Ka(ft,z):ws(ft,z,tt,ut);var wt=St.length;if(wt===0){if(tt=ft.type===Bo?ft.centerX:ft.endX,ut=ft.type===Bo?ft.centerY:ft.endY,a.zd(tt,ut)>b)return!1;break}ft=null;for(var Et=Si(),Bt=0;Bt<wt;Bt++)if(ft=St[Bt],Et.length=0,Se.Qe(ft[0],ft[1],ft[2],ft[3],ft[4],ft[5],ft[6],ft[7],.8,Et),E(Et,a))return wi(Et),!1;wi(Et),ft!==null&&(tt=ft[6],ut=ft[7]);break;default:pe("Unknown Segment type: "+ft.type)}}return!0}}}return!1},Ct.qc=function(){this.ua=null},Ct.kq=function(){return this.ig};function v1(a){var y=a.diagram;y!==null&&y.undoManager.isUndoingRedoing||(a.segmentOrientation=em,a.toArrow!=="None"?(a.segmentIndex=-1,a.alignmentFocus=Aa):a.fromArrow!=="None"&&(a.segmentIndex=0,a.alignmentFocus=new pi(1-Aa.x,Aa.y)))}Ui.makeGeometry=function(a,y,x){if(a.toArrow!=="None")var E=ih[a.toArrow];else a.fromArrow!=="None"?E=ih[a.fromArrow]:(E=Se.Ze[a.figure],typeof E=="string"&&(E=Se.Ze[E]),E===void 0&&pe("Unknown Shape.figure: "+a.figure),E=E(a,y,x),E.Sk=y,E.Rk=x);if(E===null){var b=Se.Ze.Rectangle;typeof b=="function"&&(E=b(a,y,x))}return E};function y1(a){var y=ih[a];if(y===void 0){var x=a.toLowerCase();if(x==="none")return"None";if(y=ih[x],y===void 0){var E=null,b;for(b in Se.um)if(b.toLowerCase()===x){E=b;break}if(E!==null)return a=Fn.parse(Se.um[E],!1),ih[E]=a,x!==E&&(ih[x]=E),E}}return typeof y=="string"?y:y instanceof Fn?a:null}we.Object.defineProperties(Ui.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 E=this.part;E!==null&&(E.ag=NaN),this.v(),this.g("geometry",y||x,a),vt(this)&&(a=this.part,a!==null&&Jr(this,a,"geometryString"))}}},geometryString:{get:function(){return this.geometry===null?"":this.geometry.toString()},set:function(a){a=Fn.parse(a);var y=a.normalize();this.geometry=a,this.position=a=Gt.allocAt(-y.x,-y.y),Gt.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&&uc(a,"Shape.fill"),a instanceof mr&&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&&uc(a,"Shape.stroke"),a instanceof mr&&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 gi(a,"value >= 0",Ui,"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"?gi(a,'"butt", "round", or "square"',Ui,"strokeCap"):(yf(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"?gi(a,'"miter", "bevel", or "round"',Ui,"strokeJoin"):(yf(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){yf(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,E=0,b=0;b<x;b++){var z=a[b];0<=z&&isFinite(z)||pe("strokeDashArray:value "+z+" at index "+b+" must be a positive number or zero."),E+=z}if(E===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&&(yf(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=Se.Ze[a];typeof x=="function"?x=a:(x=Se.Ze[a.toLowerCase()])||pe("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?pe("Unknown Shape.toArrow: "+a):y!==x&&(this.Ua===null&&(this.Ua=new Ti),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?pe("Unknown Shape.fromArrow: "+a):y!==x&&(this.Ua===null&&(this.Ua=new Ti),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:ha},set:function(a){var y=this.spot1;y.D(a)||(a=a.J(),yf(this),this.Na.fg=a,this.v(),this.g("spot1",y,a))}},spot2:{get:function(){return this.Na!==null?this.Na.gg:ha},set:function(a){var y=this.spot2;y.D(a)||(a=a.J(),yf(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&&(yf(this),this.Na.br=a,this.N(),this.g("pathPattern",y,a))}},geometryStretch:{get:function(){return this.Na!==null?this.Na.jq:Ri},set:function(a){var y=this.geometryStretch;y!==a&&(yf(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 rh),this.fa.Tk=a;var x=this.diagram;x!==null&&this.panel===x.grid&&Hl(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 rh),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 rh),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 rh),this.fa.o=a,this.v(),this.g("graduatedSkip",y,a))}}}),Ui.prototype.intersectsRect=Ui.prototype.Yc,Ui.prototype.containedInRect=Ui.prototype.fh,Ui.prototype.getNearestIntersectionPoint=Ui.prototype.rs,Ui.prototype.getDocumentBounds=Ui.prototype.mi,Ui.prototype.getDocumentPoint=Ui.prototype.ga;var ih=new Ni,Iv=new Ni;Ui.className="Shape",Ui.getFigureGenerators=function(){var a=new yi,y;for(y in Se.Ze)y!==y.toLowerCase()&&a.add(y,Se.Ze[y]);return a.freeze(),a},Ui.defineFigureGenerator=function(a,y){var x=a.toLowerCase(),E=Se.Ze;E[a]=y,E[x]=a},Ui.getArrowheadGeometries=function(){var a=new yi;for(E in Se.um)if(ih[E]===void 0){var y=Fn.parse(Se.um[E],!1);ih[E]=y,y=E.toLowerCase(),y!==E&&(ih[y]=E)}for(var x in ih)if(x!==x.toLowerCase()){var E=ih[x];E instanceof Fn&&a.add(x,E)}return a.freeze(),a},Ui.defineArrowheadGeometry=function(a,y){var x=null;typeof y=="string"?x=Fn.parse(y,!1):x=y,y=a.toLowerCase(),y!=="none"&&a!==y||pe("Shape.defineArrowheadGeometry name must not be empty or None or all-lower-case: "+a);var E=ih;E[a]=x,E[y]=a};function Ov(){this.nc=!1,this.Hr="butt",this.Ir="miter",this.Jr=10,this.uj=0,this.br=null,this.jq=Ri,this.gg=this.fg=ha}Ov.prototype.copy=function(){var a=new Ov;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 Xr(a,y){return fe.call(this),s0||(ps=co?new Pa(null).context:null,s0=!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}Ce(Xr,fe),Xr.prototype.cloneProtected=function(a){fe.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 Fu(a){a.da===null?a.da=new Vv:a.da.nc&&(a.da=a.da.copy())}Ct=Xr.prototype,Ct.th=function(){fe.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}Ct.qb=function(a){a.classType===Xr?this.wrap=a:fe.prototype.qb.call(this,a)},Ct.toString=function(){return 22<this.ec.length?'TextBlock("'+this.ec.substring(0,20)+'"...)':'TextBlock("'+this.ec+'")'},Ct.v=function(){fe.prototype.v.call(this)},Ct.hh=function(a,y){if(this.xc!==null&&this.ec.length!==0&&this.Ae!==null){var x=this.naturalBounds,E=this.actualBounds,b=x.width,z=x.height,tt=Xp(this),rt=a.textAlign=this.textAlign,ot=y.tn;rt==="start"?rt=ot?"right":"left":rt==="end"&&(rt=ot?"left":"right"),ot=this.isUnderline;var st=this.isStrikethrough;fo(this,a,this.xc,!0,!1,x,E),(ot||st)&&fo(this,a,this.xc,!1,!1,x,E),E=0,x=!1;var ut=this.oe,ft=ut.dx-(tt*ut.m21+ut.dx);ut=ut.dy-(tt*ut.m22+ut.dy);var St=y.scale;switch(8>(ft*ft+ut*ut)*St*St&&(x=!0),y.ib!==a&&(x=!1),y.ib instanceof Tr&&(x=!1),y.Gf("textGreeking")===!1&&(x=!1),y=this.spacingAbove,ft=this.spacingBelow,this.flip){case lr:a.translate(b,0),a.scale(-1,1);break;case Ki:a.translate(0,z),a.scale(1,-1);break;case Rr:a.translate(b,z),a.scale(-1,-1)}if(a.yc(),ut=this.Gc,St=(y+tt+ft)*ut,z>St&&(E=this.verticalAlignment,E=E.y*z-E.y*St+E.offsetY),ut===1&&this.ze!==null)ft=this.Cb,ft>b&&(ft=b),this.Oj(this.ze,a,0,E+y,b,tt,ft,x,rt,ot,st);else if(this.Qc!==null&&this.Qb!==null)for(St=0;St<ut;St++){var wt=this.Qc[St];wt>b&&(wt=b),E+=y,this.Oj(this.Qb[St],a,0,E,b,tt,wt,x,rt,ot,st),E+=tt+ft}switch(this.flip){case lr:a.scale(-1,1),a.translate(-b,0);break;case Ki:a.scale(1,-1),a.translate(0,-z);break;case Rr:a.scale(-1,-1),a.translate(-b,-z)}}},Ct.Oj=function(a,y,x,E,b,z,tt,rt,ot,st,ut){var ft=0;if(rt)ot==="left"?ft=0:ot==="right"?ft=b-tt:ot==="center"&&(ft=(b-tt)/2),y.fillRect(x+ft,E+.25*z,tt,1);else{if(ot==="left"?ft=0:ot==="right"?ft=b:ot==="center"&&(ft=b/2),b=i0!==null?i0(this,z):.75*z,y.fillText(a,x+ft,E+b),a=z/20|0,a===0&&(a=1),ot==="right"?ft-=tt:ot==="center"&&(ft-=tt/2),st){rt=r0!==null?r0(this,z):.8*z,ot=x+ft,st=E+rt,b=x+ft+tt,rt=E+rt;var St=a;y.beginPath(),y.lineWidth=St,y.moveTo(ot,st),y.lineTo(b,rt),y.stroke(),y.Se(),y instanceof Tr&&y.ad.classList.add("gojs-td")}ut&&(ut=E+z-z/2.2|0,a%2!==0&&(ut+=.5),E=x+ft,z=ut,x=x+ft+tt,tt=ut,ft=a,y.beginPath(),y.lineWidth=ft,y.moveTo(E,z),y.lineTo(x,tt),y.stroke(),y.Se(),y instanceof Tr&&y.ad.classList.add("gojs-td"))}},Ct.kk=function(a,y,x){if(!fe.prototype.kk.call(this,a,y,x))return!1;if(fo(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++)gs(a,y[x],!1)}else y=this.svg,y.innerHTML=this.text,gs(a,y,!0);return!0},Ct.nk=function(a){return 1<this.lineCount||this.isUnderline||this.isStrikethrough?!0:fe.prototype.nk.call(this,a)},Ct.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)}},Ct.Wl=function(a,y,x,E){var b=this.Gc;this.Ih=a,this.l&=-16777217;var z=this.Ae;ps!==null&&L1!==z&&(L1=ps.font=z),this.Cb=this.Le=0,this.ze=this.Qb=this.Qc=this.df=null;var tt;if(isNaN(this.desiredSize.width)){if(z=this.ec.replace(/\r\n/g,`
`).replace(/\r/g,`
`),z.length===0)z=8;else if(this.isMultiline){for(var rt=tt=0,ot=!1;!ot;){var st=z.indexOf(`
`,rt);st===-1&&(st=z.length,ot=!0),rt=z.substr(rt,st-rt),this.formatting===_p&&(rt=rt.trim()),tt=Math.max(tt,Ul(rt)),rt=st+1}z=tt}else tt=z.indexOf(`
`,0),0<=tt&&(z=z.substr(0,tt)),z=Ul(z);z=Math.min(z,a/this.scale)}else z=this.desiredSize.width;if(this.panel!==null&&(z=Math.min(z,this.panel.maxSize.width)),tt=P1(this,z),isNaN(this.desiredSize.height)?tt=Math.min(tt,y/this.scale):tt=this.desiredSize.height,ot=tt,this.Cb!==0&&this.Qc!==null&&this.Qb!==null&&this.overflow===o0&&(y=this.Ae,y=this.overflow===o0?x1(y):0,st=this.spacingAbove+this.spacingBelow,st=Math.max(0,Xp(this)+st),ot=Math.min(this.maxLines-1,Math.max(Math.floor(ot/st+.01)-1,0)),!(ot+1>=this.Qb.length))){for(this.l|=16777216,st=this.Qb[ot],y=Math.max(1,a-y);Ul(st)>y&&1<st.length;)st=st.substr(0,st.length-1);st+=Jp,y=Ul(st),this.Qb[ot]=st,this.Qb=this.Qb.slice(0,ot+1),this.Qc[ot]=y,this.Qc=this.Qc.slice(0,ot+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===w1||isNaN(this.desiredSize.width))&&(z=isNaN(a)?this.Cb:Math.min(a,this.Cb)),z=Math.max(x,z),tt=Math.max(E,tt),Go(this.dc,z,tt),this.Ge(0,0,z,tt),this.svg!==null&&b!==this.Gc&&(this.Uc=!0)},Ct.eh=function(a,y,x,E){Da(this,a,y,x,E)};function Yp(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 Rv(a,y,x,E){var b=a.formatting===_p;b&&(y=y.trim());var z=0,tt=a.Ae,rt=a.spacingAbove+a.spacingBelow;rt=Math.max(0,Xp(a)+rt);var ot=a.overflow===o0?x1(tt):0;if(a.Gc>=a.maxLines)E!==null&&E.h(0,rt);else if(tt=y,a.wrap===jv){a.Le=1;var st=Ul(y);if(ot===0||st<=x)a.Cb=Math.max(a.Cb,st),Yp(a,y,a.Cb),E!==null&&E.h(st,rt);else{for(z=sp(a,tt),tt=tt.substr(z.length),y=sp(a,tt),st=Ul(z+y);0<y.length&&st<=x;)z+=y,tt=tt.substr(y.length),y=sp(a,tt),st=z+y,b&&(st=st.trim()),st=Ul(st);for(b&&(y=y.trim()),z+=y,x=Math.max(1,x-ot);Ul(z)>x&&1<z.length;)z=z.substr(0,z.length-1);a.l|=16777216,z+=Jp;var ut=Ul(z);a.Cb=ut,Yp(a,z,ut),E!==null&&E.h(ut,rt)}}else{for(ot=0,tt.length===0&&(ot=1,Yp(a,tt,0));0<tt.length;){for(y=sp(a,tt),tt=tt.substr(y.length);Ul(y)>x;){var ft=1;for(st=Ul(y.substr(0,ft)),ut=0;st<=x;)ft++,ut=st,st=Ul(y.substr(0,ft));if(ft===1){var St=st;z=Math.max(z,st)}else St=ut,z=Math.max(z,ut);if(ft--,1>ft&&(ft=1),Yp(a,y.substr(0,ft),St),ot++,y=y.substr(ft),a.Gc+ot>a.maxLines)break}for(ut=sp(a,tt),st=Ul(y+ut);0<ut.length&&st<=x;)y+=ut,tt=tt.substr(ut.length),ut=sp(a,tt),st=y+ut,b&&(st=st.trim()),st=Ul(st);if(b&&(y=y.trim()),y!==""&&(y[y.length-1]==="\xAD"&&(y=y.substring(0,y.length-1)+"\u2010"),ut.length===0?(ft=st,z=Math.max(z,st)):(ft=ut=Ul(y),z=Math.max(z,ut)),Yp(a,y,ft),ot++,a.Gc+ot>a.maxLines))break}a.Le=Math.min(a.maxLines,ot),a.Cb=Math.max(a.Cb,z),E!==null&&E.h(a.Cb,rt*a.Le)}}function sp(a,y){if(a.wrap===C1)return y.substr(0,1);for(var x=y.length,E=0,b=Sx;E<x&&!b.test(y.charAt(E));)E++;for(a.formatting===E1&&(x=Math.min(x,E+1));E<x&&b.test(y.charAt(E));)E++;return E>=y.length?y:y.substr(0,E)}function Ul(a){return ps===null?8*a.length:ps.measureText(a).width}function Xp(a){if(a.df!==null)return a.df;var y=a.Ae;if(ps===null){var x=16;return a.df=x}return Hv[y]!==void 0&&5e3>b1?x=Hv[y]:(x=1.3*ps.measureText("M").width,Hv[y]=x,b1++),a.df=x}function x1(a){if(ps===null)return 6;if(a0[a]!==void 0&&5e3>Wv)var y=a0[a];else y=ps.measureText(Jp).width,a0[a]=y,Wv++;return y}function P1(a,y){var x=a.ec.replace(/\r\n/g,`
`).replace(/\r/g,`
`),E=a.spacingAbove+a.spacingBelow;if(E=Math.max(0,Xp(a)+E),x.length===0)return a.Cb=0,a.Gc=1,E;if(!a.isMultiline){var b=x.indexOf(`
`,0);0<=b&&(x=x.substr(0,b))}b=0;for(var z=a.Gc=0,tt,rt=!1;!rt;){if(tt=x.indexOf(`
`,z),tt===-1&&(tt=x.length,rt=!0),z<=tt){if(z=x.substr(z,tt-z),a.wrap!==jv){a.Le=0;var ot=Re.alloc();Rv(a,z,y,ot),b+=ot.height,Re.free(ot),a.Gc+=a.Le}else Rv(a,z,y,null),b+=E,a.Gc++;a.Gc===a.maxLines&&(rt=!0)}z=tt+1}return a.Lq=b}we.Object.defineProperties(Xr.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"||(Fu(this),this.da.Or=a,this.N(),this.g("textAlign",y,a))}},flip:{get:function(){return this.da!==null?this.da.Xf:on},set:function(a){var y=this.flip;y!==a&&(Fu(this),this.da.Xf=a,this.N(),this.g("flip",y,a))}},verticalAlignment:{get:function(){return this.da!==null?this.da.Yr:Qh},set:function(a){var y=this.verticalAlignment;y.D(a)||(a=a.J(),Fu(this),this.da.Yr=a,Ha(this),this.g("verticalAlignment",y,a))}},naturalBounds:{get:function(){if(!this.dc.w()){var a=Re.alloc();Rv(this,this.ec,999999,a);var y=a.width;Re.free(a),a=P1(this,y);var x=this.desiredSize;isNaN(x.width)||(y=x.width),isNaN(x.height)||(a=x.height),Go(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:zv},set:function(a){var y=this.wrap;y!==a&&(Fu(this),this.da.$r=a,this.v(),this.g("wrap",y,a))}},overflow:{get:function(){return this.da!==null?this.da.$q:Gv},set:function(a){var y=this.overflow;y!==a&&(Fu(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&&uc(a,"TextBlock.stroke"),a instanceof mr&&a.freeze(),this.xc=a,this.N(),this.g("stroke",y,a))}},lineCount:{get:function(){return this.Gc}},lineHeight:{get:function(){return Xp(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&&(Fu(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&&(Fu(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 rh),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 rh),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 rh),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 rh),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 rh),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&&(Fu(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&&(Fu(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&&(Fu(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&&(Fu(this),this.da.Er=a,this.v(),this.g("spacingBelow",y,a))}},formatting:{get:function(){return this.da!==null?this.da.gq:_p},set:function(a){var y=this.formatting;y!==a&&(Fu(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&&gi(a,"> 0",Xr,"maxLines"),Fu(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 i0=null,r0=null,jv=new Je(Xr,"None",0),w1=new Je(Xr,"WrapFit",1),zv=new Je(Xr,"WrapDesiredSize",2),C1=new Je(Xr,"WrapBreakAll",3),Gv=new Je(Xr,"OverflowClip",0),o0=new Je(Xr,"OverflowEllipsis",1),_p=new Je(Xr,"FormatTrim",0),E1=new Je(Xr,"FormatNone",0),Sx=/[ \u200b\u00ad]/,Hv=new Ni,b1=0,a0=new Ni,Wv=0,Jp="...",L1="",ps=null,s0=!1;Xr.className="TextBlock";function Vv(){this.nc=!1,this.Hd=null,this.Xf=on,this.gq=_p,this.Jq=1/0,this.$q=Gv,this.Er=this.Dr=0,this.Or="start",this.vj=this.Qr=this.Pr=null,this.Yr=Qh,this.$r=zv}Vv.prototype.copy=function(){var a=new Vv;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},Xr.getEllipsis=function(){return Jp},Xr.setEllipsis=function(a){Jp=a,a0=new Ni,Wv=0},Xr.getBaseline=function(){return i0},Xr.setBaseline=function(a){i0=a},Xr.getUnderline=function(){return r0},Xr.setUnderline=function(a){r0=a},Xr.isValidFont=function(a){if(s0||(ps=co?new Pa(null).context:null,s0=!0),ps===null)return!0;var y=ps.font;if(a===y||a==="10px sans-serif")return!0;ps.font="10px sans-serif",ps.font=a;var x=ps.font;if(x!=="10px sans-serif")return ps.font=y,!0;ps.font="19px serif";var E=ps.font;return ps.font=a,x=ps.font,ps.font=y,x!==E},Xr.FormatNone=E1,Xr.FormatTrim=_p,Xr.None=jv,Xr.OverflowClip=Gv,Xr.OverflowEllipsis=o0,Xr.WrapBreakAll=C1,Xr.WrapDesiredSize=zv,Xr.WrapFit=w1;function rh(){this.Tk=1,this.u=0,this.j=1,this.o=this.F=null}rh.prototype.copy=function(){var a=new rh;return a.Tk=this.Tk,a.u=this.u,a.j=this.j,a.F=this.F,a.o=this.o,a},rh.className="GradElementSettings";function ms(a,y){fe.call(this),this.Eg=null,this.qo="",this.Xg=va,this.Nk=dn,this.Zg=this.Hd=null,this.Mk=Br,this.Xf=on,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 lp;Ce(ms,fe),ms.prototype.cloneProtected=function(a){fe.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},ms.prototype.qb=function(a){a===on||a===ai||a===rr?this.imageStretch=a:fe.prototype.qb.call(this,a)},ms.prototype.toString=function(){return"Picture("+this.source+")#"+Cr(this)};function up(a){a===void 0&&(a=""),a!==""?lp[a]&&(delete lp[a],l0--):(lp=new Ni,l0=0)}function M1(a,y){y.qy||(y.Fq=function(x){y.sq=!0,y.ln=!1;var E=y.Bg.copy();if(E!=null){for(E=E.iterator;E.next();){var b=E.value;b.N();var z=y.getAttribute("src")||"",tt=b.Og.I(z);if(tt!==null)for(var rt=tt.length,ot=0;ot<rt;ot++)z=tt[ot],b.Xn.add(z),z.Uc=!0,b.$b(),y.hn&&(y.eu===void 0&&(y.eu=x),z.Zg!==null&&z.Zg(z,x))}y.Bg.clear()}a.desiredSize.w()||(Kt(a,!1),a.v())},y.Yp=function(x){y.ln=x;var E=y.Bg.copy();if(E!=null){for(E=E.iterator;E.next();){var b=E.value,z=y.getAttribute("src")||"",tt=b.Og.I(z);if(tt!==null){b=tt.length,z=Si();for(var rt=0;rt<b;rt++)z.push(tt[rt]);if(y.hn)for(rt=0;rt<b;rt++)tt=z[rt],tt.Hd!==null&&tt.Hd(tt,x);wi(z)}}y.Bg.clear()}},y.addEventListener("load",y.Fq),y.addEventListener("error",y.Yp),y.qy=!0)}ms.prototype.hA=function(){if(this.source!==""){up(this.source);var a=this.source;this.source="",this.source=a}},ms.prototype.redraw=function(){this.N(),this.Uc=!0},ms.prototype.hh=function(a,y){var x=this.Eg;if(x!==null){var E=x.getAttribute("src");if(!(x instanceof HTMLImageElement&&(E===null||E==="")||x.ln instanceof Event&&a instanceof uu)){var b=a instanceof Tr;E=this.naturalBounds;var z=0,tt=0,rt=this.qn,ot=rt?+x.width:x.naturalWidth;if(rt=rt?+x.height:x.naturalHeight,ot===void 0&&x.videoWidth&&(ot=x.videoWidth),rt===void 0&&x.videoHeight&&(rt=x.videoHeight),ot=ot||E.width,rt=rt||E.height,ot!==0&&rt!==0){var st=ot,ut=rt;this.sourceRect.w()&&(z=this.Xg.x,tt=this.Xg.y,ot=this.Xg.width,rt=this.Xg.height);var ft=ot,St=rt,wt=this.Nk,Et=this.Mk;switch(wt){case on:if(this.sourceRect.w())break;ft>=E.width&&(z=z+Et.offsetX+(ft*Et.x-E.width*Et.x)),St>=E.height&&(tt=tt+Et.offsetY+(St*Et.y-E.height*Et.y)),ot=Math.min(E.width,ft),rt=Math.min(E.height,St);break;case dn:ft=E.width,St=E.height;break;case ai:case rr:wt===ai?(wt=Math.min(E.height/St,E.width/ft),ft*=wt,St*=wt):wt===rr&&(wt=Math.max(E.height/St,E.width/ft),ft*=wt,St*=wt,ft>=E.width&&(z=(z+Et.offsetX+(ft*Et.x-E.width*Et.x)/ft)*ot),St>=E.height&&(tt=(tt+Et.offsetY+(St*Et.y-E.height*Et.y)/St)*rt),ot*=1/(ft/E.width),rt*=1/(St/E.height),ft=E.width,St=E.height)}wt=this.Df()*y.scale;var Bt=ft*wt*St*wt,Vt=ot*rt/Bt,jt=x.__goCache;wt=null;var _t=xx;if(!b){if(x.sq&&jt!==void 0&&4<Bt&&Vt>_t*_t)for(jt.gi===null&&(F1(jt,4,st,ut,x),F1(jt,16,st,ut,x)),b=jt.gi,st=b.length,ut=0;ut<st&&b[ut].ratio*b[ut].ratio<Vt;ut++)wt=b[ut];if(!y.Xm){if(this.vl===null)if(this.Eg===null)this.vl=!1;else{b=new Pa(null).context;try{b.drawImage(this.Eg,0,0)}catch(Qt){this.en=!1}try{b.getImageData(0,0,1,1).data[3]&&(this.vl=!1),this.vl=!1}catch(Qt){this.vl=!0}}if(this.vl)return}}switch(b=ft<E.width?Et.offsetX+(E.width*Et.x-ft*Et.x):0,Et=St<E.height?Et.offsetY+(E.height*Et.y-St*Et.y):0,this.flip){case lr:a.translate(Math.min(E.width,ft),0),a.scale(-1,1);break;case Ki:a.translate(0,Math.min(E.height,St)),a.scale(1,-1);break;case Rr:a.translate(Math.min(E.width,ft),Math.min(E.height,St)),a.scale(-1,-1)}if(a.yc(),y.Gf("pictureRatioOptimization")&&!y.$i&&jt!==void 0&&wt!==null&&wt.ratio!==1){a.save(),y=wt.ratio;try{a.drawImage(wt.source,z/y,tt/y,Math.min(wt.source.width,ot/y),Math.min(wt.source.height,rt/y),b,Et,Math.min(E.width,ft),Math.min(E.height,St)),a instanceof Tr&&(this.bt=[z/y,tt/y,Math.min(wt.source.width,ot/y),Math.min(wt.source.height,rt/y),b,Et,Math.min(E.width,ft),Math.min(E.height,St)])}catch(Qt){this.en=!1}a.restore()}else try{a.drawImage(x,z,tt,ot,rt,b,Et,Math.min(E.width,ft),Math.min(E.height,St)),a instanceof Tr&&(this.bt=[z,tt,ot,rt,b,Et,Math.min(E.width,ft),Math.min(E.height,St)])}catch(Qt){this.en=!1}switch(this.flip){case lr:a.scale(-1,1),a.translate(-Math.min(E.width,ft),0);break;case Ki:a.scale(1,-1),a.translate(0,-Math.min(E.height,St));break;case Rr:a.scale(-1,-1),a.translate(-Math.min(E.width,ft),-Math.min(E.height,St))}}}}},ms.prototype.Wl=function(a,y,x,E){var b=this.desiredSize,z=Xa(this,!0),tt=this.Eg,rt=this.qn,ot=0,st=0;(rt||!this.al&&tt&&tt.complete)&&(this.al=!0),tt===null?(isFinite(b.width)||(a=0),isFinite(b.height)||(y=0)):(ot=rt?+tt.width:tt.naturalWidth,st=rt?+tt.height:tt.naturalHeight),isFinite(b.width)||z===dn||z===ci?(isFinite(a)||(this.sourceRect.w()?a=this.sourceRect.width:tt!==null&&(a=ot)),x=0):tt!==null&&this.al!==!1&&(a=this.sourceRect.w()?this.sourceRect.width:ot),isFinite(b.height)||z===dn||z===xi?(isFinite(y)||(this.sourceRect.w()?y=this.sourceRect.height:tt!==null&&(y=st)),E=0):tt!==null&&this.al!==!1&&(y=this.sourceRect.w()?this.sourceRect.height:st),isFinite(b.width)&&(a=b.width),isFinite(b.height)&&(y=b.height),b=this.maxSize,z=this.minSize,x=Math.max(x||0,z.width),E=Math.max(E||0,z.height),a=Math.min(b.width,a),y=Math.min(b.height,y),a=Math.max(x,a),y=Math.max(E,y),tt===null||tt.complete||(isFinite(a)||(a=0),isFinite(y)||(y=0)),Go(this.dc,a,y),this.Ge(0,0,a,y)},ms.prototype.eh=function(a,y,x,E){Da(this,a,y,x,E)},we.Object.defineProperties(ms.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||pe("Picture.element must be an instance of Image, Canvas, or Video, not: "+a);var E=this.diagram;E!==null&&$f(E,this),this.Eg=a,a!==null&&x&&a.Bg===void 0&&(a.Bg=new mn),E!==null&&x&&Fh(E,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()||(Kt(this,!1),this.v())):x&&M1(this,a)),this.g("element",y,a),this.N()}}},source:{get:function(){return this.qo},set:function(a){var y=this.qo;if(y!==a){this.Uc=!0,this.qo=a;var x=lp;if(co){var E=null;if(x[a]!==void 0)E=x[a];else if(a!==""){30<l0&&(up(),x=lp),E=ki("img"),E.hn=!0,M1(this,E);var b=this.rl;b!==null&&(E.crossOrigin=b(this)),E.src=a,x[a]=E,l0++}this.element=E,E!==null&&E.__goCache===void 0&&(E.__goCache=new A1),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}}}),ms.prototype.redraw=ms.prototype.redraw,ms.prototype.reloadSource=ms.prototype.hA;var l0=0,xx=4;ms.className="Picture",lp=new Ni,ms.clearCache=up;function A1(){this.gi=null}function F1(a,y,x,E,b){a.gi===null&&(a.gi=[]);var z=new Pa(null),tt=z.context,rt=1/y;z.width=x/y,z.height=E/y,z.width!==0&&z.height!==0&&(y=new B1(z.Oa,y),x=1,0<a.gi.length&&(x=a.gi[a.gi.length-1],b=x.source,x=x.ratio),tt.setTransform(rt*x,0,0,rt*x,0,0),tt.yc(),tt.drawImage(b,0,0),a.gi.push(y))}A1.className="PictureCacheArray";function B1(a,y){this.source=a,this.ratio=y}B1.className="PictureCacheInstance";function hp(){this.os=new Fn,this.mc=null}hp.prototype.reset=function(a){a!==null?(a.ka(),this.os=a,a.figures.clear()):this.os=new Fn,this.mc=null};function dp(a,y,x,E,b,z){a.mc=new Yo,a.mc.startX=y,a.mc.startY=x,a.mc.isFilled=E,a.mc.isEvenOdd=z||!1,a.os.figures.add(a.mc),b!==void 0&&(a.mc.isShadowed=b)}function Px(a){var y=a.mc.segments.length;0<y&&a.mc.segments.M(y-1).close()}hp.prototype.moveTo=function(a,y,x){x===void 0&&(x=!1);var E=new xr(jo);E.endX=a,E.endY=y,x&&E.close(),this.mc.segments.add(E)},hp.prototype.lineTo=function(a,y,x){x===void 0&&(x=!1);var E=new xr(Ur);E.endX=a,E.endY=y,x&&E.close(),this.mc.segments.add(E)};function xd(a,y,x,E,b,z,tt){var rt;rt===void 0&&(rt=!1);var ot=new xr(da);ot.point1X=y,ot.point1Y=x,ot.point2X=E,ot.point2Y=b,ot.endX=z,ot.endY=tt,rt&&ot.close(),a.mc.segments.add(ot)}function u0(a,y,x,E,b){var z;z===void 0&&(z=!1);var tt=new xr(Cs);tt.point1X=y,tt.point1Y=x,tt.endX=E,tt.endY=b,z&&tt.close(),a.mc.segments.add(tt)}hp.prototype.arcTo=function(a,y,x,E,b,z,tt){z===void 0&&(z=0),tt===void 0&&(tt=!1);var rt=new xr(Bo);rt.startAngle=a,rt.sweepAngle=y,rt.centerX=x,rt.centerY=E,rt.radiusX=b,rt.radiusY=z!==0?z:b,tt&&rt.close(),this.mc.segments.add(rt)};function wx(a,y,x,E,b,z,tt,rt){var ot;ot===void 0&&(ot=!1),y=new xr(zs,tt,rt,y,x,E,b,z),ot&&y.close(),a.mc.segments.add(y)}function k1(a){var y=h0;return y!==null?(h0=null,y.reset(a),y):(y=new hp,y.reset(a),y)}var h0=null;hp.className="StreamGeometryContext";function Wa(a,y){var x=a.toLowerCase(),E=Se.Ze;E[a]=y,E[x]=a}Wa("Rectangle",function(a,y,x){a="r"+y+","+x;var E=Se.Mf[a];return E!==void 0||(E=new Fn(Fn.u),E.endX=y,E.endY=x,Se.Nf<Se.vm&&(Se.Mf[a]=E,Se.Nf++)),E}),Wa("Square",function(a,y,x){a="s"+y+","+x;var E=Se.Mf[a];return E!==void 0||(E=new Fn(Fn.u),E.endX=y,E.endY=x,E.defaultStretch=ai,Se.Nf<Se.vm&&(Se.Mf[a]=E,Se.Nf++)),E}),Wa("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 E="rr"+y+","+x+","+a,b=Se.Mf[E];if(b!==void 0)return b;var z=a*Se.wg;return b=new Fn().add(new Yo(a,0,!0).add(new xr(Ur,y-a,0)).add(new xr(da,y,a,y-z,0,y,z)).add(new xr(Ur,y,x-a)).add(new xr(da,y-a,x,y,x-z,y-z,x)).add(new xr(Ur,a,x)).add(new xr(da,0,x-a,z,x,0,x-z)).add(new xr(Ur,0,a)).add(new xr(da,a,0,0,z,z,0).close())),1<z&&(b.spot1=new pi(0,0,z,z),b.spot2=new pi(1,1,-z,-z)),Se.Nf<Se.vm&&(Se.Mf[E]=b,Se.Nf++),b}),Wa("Border","RoundedRectangle"),Wa("Ellipse",function(a,y,x){a="e"+y+","+x;var E=Se.Mf[a];return E!==void 0||(E=new Fn(Fn.F),E.endX=y,E.endY=x,E.spot1=Rc,E.spot2=$h,Se.Nf<Se.vm&&(Se.Mf[a]=E,Se.Nf++)),E}),Wa("Circle",function(a,y,x){a="c"+y+","+x;var E=Se.Mf[a];return E!==void 0||(E=new Fn(Fn.F),E.endX=y,E.endY=x,E.spot1=Rc,E.spot2=$h,E.defaultStretch=ai,Se.Nf<Se.vm&&(Se.Mf[a]=E,Se.Nf++)),E}),Wa("TriangleRight",function(a,y,x){return new Fn().add(new Yo(0,0).add(new xr(Ur,y,.5*x)).add(new xr(Ur,0,x).close())).pm(0,.25,.5,.75)}),Wa("TriangleDown",function(a,y,x){return new Fn().add(new Yo(0,0).add(new xr(Ur,y,0)).add(new xr(Ur,.5*y,x).close())).pm(.25,0,.75,.5)}),Wa("TriangleLeft",function(a,y,x){return new Fn().add(new Yo(y,x).add(new xr(Ur,0,.5*x)).add(new xr(Ur,y,0).close())).pm(.5,.25,1,.75)}),Wa("TriangleUp",function(a,y,x){return new Fn().add(new Yo(y,x).add(new xr(Ur,0,x)).add(new xr(Ur,.5*y,0).close())).pm(.25,.5,.75,1)}),Wa("Triangle","TriangleUp"),Wa("Diamond",function(a,y,x){return new Fn().add(new Yo(.5*y,0).add(new xr(Ur,0,.5*x)).add(new xr(Ur,.5*y,x)).add(new xr(Ur,y,.5*x).close())).pm(.25,.25,.75,.75)}),Wa("LineH",function(a,y,x){return a=new Fn(Fn.j),a.startX=0,a.startY=x/2,a.endX=y,a.endY=x/2,a}),Wa("LineV",function(a,y,x){return a=new Fn(Fn.j),a.startX=y/2,a.startY=0,a.endX=y/2,a.endY=x,a}),Wa("None","Rectangle"),Wa("BarH","Rectangle"),Wa("BarV","Rectangle"),Wa("MinusLine","LineH"),Wa("PlusLine",function(a,y,x){return new Fn().add(new Yo(0,x/2,!1).add(new xr(Ur,y,x/2)).add(new xr(jo,y/2,0)).add(new xr(Ur,y/2,x)))}),Wa("XLine",function(a,y,x){return new Fn().add(new Yo(0,x,!1).add(new xr(Ur,y,0)).add(new xr(jo,0,0)).add(new xr(Ur,y,x)))}),Wa("LineRight",function(a,y,x){return new Fn().add(new Yo(.25*y,0,!1).add(new xr(Ur,.75*y,.5*x)).add(new xr(Ur,.25*y,x)))}),Wa("LineDown",function(a,y,x){return new Fn().add(new Yo(0,.25*x,!1).add(new xr(Ur,.5*y,.75*x)).add(new xr(Ur,y,.25*x)))}),Wa("LineLeft",function(a,y,x){return new Fn().add(new Yo(.75*y,0,!1).add(new xr(Ur,.25*y,.5*x)).add(new xr(Ur,.75*y,x)))}),Wa("LineUp",function(a,y,x){return new Fn().add(new Yo(0,.75*x,!1).add(new xr(Ur,.5*y,.25*x)).add(new xr(Ur,y,.75*x)))}),Se.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 Uv(){this.nc=!1,this.tr=this.Kp=this.zq=null,this.vr="",this.fr=this.oq=this.ur=null,this.hr="",this.gr=br,this.ir=null,this.jr="",this.lr=ha,this.Gq="",this.Hq=wo,this.Pq=vo,this.Kq=Oo,this.Up=null,this.Cq=127,this.zr=ua,this.yr="gray",this.Vg=4}Uv.prototype.copy=function(){var a=new Uv;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 mi(a,y){a===void 0||a instanceof Xo||typeof a=="string"?pn.call(this,a):(pn.call(this),a&&(y=a)),this.G=2408959,this.Tf="",this.P=null,this.Jg="",this.Qf=this.Ug=null,this.ec="",this.Ah=this.Ig=null,this.ke=new Gt(NaN,NaN).freeze(),this.nf=null,this.Ao=NaN,this.vw=-1,this.py=new Ye,this.Rh=null,this.ag=NaN,y&&Object.assign(this,y)}Ce(mi,pn),mi.prototype.cloneProtected=function(a){pn.prototype.cloneProtected.call(this,a),a.G=this.G&-4097|49152,a.Tf=this.Tf,this.P!==null&&(a.P=this.P.nc?this.P:this.P.copy()),a.Jg=this.Jg,a.Qf=null,a.ec=this.ec,a.ke.assign(this.ke),a.Ao=this.Ao},Ct=mi.prototype,Ct.Af=function(a){pn.prototype.Af.call(this,a),a.oh(),a.Ug=null,a.nf=null,a.Rh=null},Ct.toString=function(){var a=Mi(this.constructor)+"#"+Cr(this);return this.data!==null&&(a+="("+Er(this.data)+")"),a};function vs(a){a.P===null?a.P=new Uv:a.P.nc&&(a.P=a.P.copy())}Ct.th=function(){pn.prototype.th.call(this),this.P!==null&&(this.P.nc=!0)},Ct.gk=function(a,y,x,E,b,z,tt){var rt=this.diagram;rt!==null&&(a===Eo&&y==="elements"?b instanceof pn?vf(b,function(ot){vy(rt.partManager,ot),gd(rt,ot)}):Fh(rt,b):a===zo&&y==="elements"&&(b instanceof pn?vf(b,function(ot){yy(rt.partManager,ot,rt)}):$f(rt,b)),rt.cb(a,y,x,E,b,z,tt))},Ct.La=function(a){if(pn.prototype.La.call(this,a),this.data!==null){for(var y=this.O.s,x=y.length,E=0;E<x;E++){var b=y[E];b instanceof pn&&vf(b,function(z){z.data!==null&&z.La()})}for(y=this.adornments;y.next();)y.value.La(a)}},mi.prototype.updateRelationshipsFromData=function(){var a;this.data!==null&&((a=this.diagram)===null||a===void 0||a.partManager.updateRelationshipsFromData(this))},mi.prototype.Pj=function(a){var y=this.Qf;return y===null?null:y.I(a)},mi.prototype.bh=function(a,y){if(y!==null){var x=null,E=this.Qf;if(E!==null&&(x=E.I(a)),x!==y){if(x!==null){var b=x.diagram;b!==null&&b.remove(x)}E===null&&(this.Qf=E=new yi),y.Tf!==a&&(y.category=a),E.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)))}}},mi.prototype.Jf=function(a){var y=this.Qf;if(y!==null){var x=y.I(a);if(x!==null){var E=x.diagram;E!==null&&E.remove(x)}y.remove(a),y.count===0&&(this.Qf=null)}},mi.prototype.Ej=function(){var a=this.Qf;if(a!==null){var y=Si();for(a=a.iterator;a.next();)y.push(a.key);a=y.length;for(var x=0;x<a;x++)this.Jf(y[x]);wi(y)}},mi.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()}t:{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 Gi?a.groupSelectionAdornmentTemplate:a.nodeSelectionAdornmentTemplate),!(x instanceof Pr))break t;Ll(x),x=x.copy(),x!==null&&(this.ph()&&this.selectionObject===this.path&&(x.type=pn.Link),x.adornedObject=y)}if(x!==null){x.type===pn.Link&&x.v(),this.bh("Selection",x);break t}}this.Jf("Selection")}for(Cx(this,a),y=this.adornments;y.next();)y.value.La()}},mi.prototype.Wb=function(){var a=this.diagram;a!==null&&(a.vd=!0,!(this.G&16384)&&(this.G|=16384))};function Kv(a){a.G&16384&&(a.updateAdornments(),a.G&=-16385)}function Cx(a,y){y.toolManager.mouseDownTools.each(function(x){x.isEnabled&&x.updateAdornments(a)}),y.toolManager.updateAdornments(a)}function d0(a){if(cc(a)===!1){Yv(a,!0),a.Uk();var y=a.diagram;y!==null&&(y.De.add(a),y.$b())}}function N1(a){if(a.G|=2097152,cc(a)!==!1){var y=a.position,x=a.location;x.w()&&y.w()||I1(a,y,x),x=a.Ib;var E=Ye.alloc().assign(x);x.ka(),x.x=y.x,x.y=y.y,x.freeze(),a.Xl(E,x),Ye.free(E),Yv(a,!1)}}mi.prototype.Ge=function(a,y,x,E){var b=this.uc;b.h(a,y,x,E),this.Lb===null&&(this.Lb=new Xi);var z=this.Lb;z.reset(),this.no(z,a,y,x,E),this.Lb=z,z.ws()||z.pp(b)},mi.prototype.no=function(a,y,x,E,b){if(this.Ca!==1&&a.scale(this.Ca),this.Kb!==0){var z=Br;this.locationSpot.sb()&&(z=this.locationSpot);var tt=Gt.alloc();if(this.locationObject!==this)for(y=this.locationObject,x=y.naturalBounds,tt.yi(x.x,x.y,x.width,x.height,z),y.Lb!==null&&y.Lb.Ga(tt),tt.offset(-y.measuredBounds.x,-y.measuredBounds.y),z=y.panel;z!==null&&z!==this;)z.Lb!==null&&z.Lb.Ga(tt),tt.offset(-z.measuredBounds.x,-z.measuredBounds.y),z=z.panel;else tt.yi(y,x,E,b,z);a.rotate(this.Kb,tt.x,tt.y),Gt.free(tt)}},mi.prototype.move=function(a,y){y===!0?this.location=a:this.position=a},mi.prototype.moveTo=function(a,y,x){a=Gt.allocAt(a,y),this.move(a,x),Gt.free(a)},mi.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())},mi.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())},mi.prototype.fb=function(a){if(this.name===a)return this;var y=this.Rh;if(y===null&&(this.Rh=y=new yi),y.I(a)!==null)return y.I(a);var x=pn.prototype.fb.call(this,a);return x!==null?(y.set(a,x),x):(y.set(a,null),null)};function Pd(a,y,x,E){E===void 0&&(E=new Gt),x=x.Mc()?Br:x;var b=y.naturalBounds;if(E.h(b.width*x.x+x.offsetX,b.height*x.y+x.offsetY),y===null||y===a)return E;for(y.transform.Ga(E),y=y.panel;y!==null&&y!==a;)y.transform.Ga(E),y=y.panel;return a.Lb!==null&&a.Lb.Ga(E),E.offset(-a.uc.x,-a.uc.y),E}mi.prototype.mi=function(a){return a===void 0&&(a=new Ye),a.assign(this.actualBounds)},mi.prototype.Va=function(){this.measure(1/0,1/0),this.arrange()};function D1(a){var y=Gt.alloc(),x=a.locationObject,E=x.naturalBounds,b=x instanceof Ui?x.strokeWidth:0;if(y.yi(0,0,E.width+b,E.height+b,a.locationSpot),x!==a)for(y.offset(-b/2,-b/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 xf(a,y){var x=a.py;isNaN(a.ag)&&(a.ag=h1(a));var E=a.ag,b=2*E;if(!a.isShadowed)return x.h(y.x-1-E,y.y-1-E,y.width+2+b,y.height+2+b),x;E=y.x,b=y.y;var z=y.width;y=y.height;var tt=a.shadowBlur;return a=a.shadowOffset,z+=tt,y+=tt,E-=tt/2,b-=tt/2,0<a.x?z+=a.x:(E+=a.x,z-=a.x),0<a.y?y+=a.y:(b+=a.y,y-=a.y),x.h(E-1,b-1,z+2,y+2),x}mi.prototype.arrange=function(){if(te(this)===!1)N1(this);else{se(this,!1);var a=this.Ib,y=Ye.alloc();y.assign(a);var x=fc(this);this.eh(0,0,this.uc.width,this.uc.height);var E=this.position;I1(this,E,this.location),a.ka(),a.x=E.x,a.y=E.y,a.freeze(),this.Xl(y,a),y.D(a)?this.Fd(x):!this.Zc()||Se.B(y.width,a.width)&&Se.B(y.height,a.height)||0<=this.vw&&this.C(16),Ye.free(y),Yv(this,!1)}},Ct=mi.prototype,Ct.Xl=function(a,y){var x=this.diagram;if(x!==null){var E=!1;if(x.Zi===!1&&a.w()){var b=Ye.alloc();b.assign(x.documentBounds),b.Fv(x.padding),a.x>b.x&&a.y>b.y&&a.right<b.right&&a.bottom<b.bottom&&y.x>b.x&&y.y>b.y&&y.right<b.right&&y.bottom<b.bottom&&(E=!0),Ye.free(b)}!(this.G&65536)&&a.D(y)||j1(this,E,x),x.N(),!a.w()&&!y.w()||rl(a,y)||(this instanceof Vn&&!x.undoManager.isUndoingRedoing&&this.Bd(),this.oh())}},Ct.zv=function(a,y,x){if(this.ph()||!a.w())return!1;var E=this.diagram;return E!==null&&T1(this,E,a,y,x),this.pa=a,this.G&=-2097153,!this.ke.w()||E!==null&&!E.animationManager.isTicking&&E.undoManager.isUndoingRedoing||(E=this.ke,this.ke=new Gt(E.x+(a.x-y),E.y+(a.y-x)),this.g("location",E,this.ke.copy())),cc(this)===!1&&te(this)===!1&&(d0(this),N1(this)),!0};function T1(a,y,x,E,b){y===null||a instanceof Pr||(y=y.animationManager,y.zb&&Jc(y,a,new Gt(E,b),x))}Ct.mm=function(a,y,x){var E=this.ke,b=this.pa;if(x){if(E.x===a&&E.y===y)return;cc(this)||te(this)?b.h(NaN,NaN):b.h(b.x+a-E.x,b.y+y-E.y),E.h(a,y)}else{if(b.x===a&&b.y===y)return;E.h(E.x+a-b.x,E.y+y-b.y),b.h(a,y)}d0(this)},Ct.Av=function(){this.G&=-2097153,d0(this)};function I1(a,y,x){var E=D1(a),b=a.diagram,z=x.w(),tt=y.w();z&&tt?a.G&2097152?O1(a,y,x,b,E):R1(a,y,x,b,E):z?O1(a,y,x,b,E):tt&&R1(a,y,x,b,E),a.G|=2097152,Gt.free(E),a.Uk()}function O1(a,y,x,E,b){var z=y.x,tt=y.y;y.h(x.x-b.x,x.y-b.y),E!==null&&(x=E.animationManager,(E=x.defaultAnimation.isAnimating)||!x.zb||a instanceof Pr||Jc(x,a,new Gt(z,tt),y),E||y.x===z&&y.y===tt||a.g("position",new Gt(z,tt),y.copy()))}function R1(a,y,x,E,b){var z=x.copy();x.h(y.x+b.x,y.y+b.y),x.D(z)||E===null||a.g("location",z,x.copy())}function j1(a,y,x){Xv(a,!1),a instanceof Vn&&kh(x,a),a.layer.isTemporary||y||x.Ya(),y=a.Ib;var E=x.viewportBounds;E.w()?fc(a)?(ao(y,E)||a.Fd(!1),a.updateAdornments()):a.isVisible()&&y.Yc(E)?(a.Fd(!0),a.updateAdornments()):a.Wb():x.vd=!0}Ct.si=function(){return!0},Ct.Zc=function(){return!0},Ct.ph=function(){return!1},Ct.Dd=function(){return!0};function Zv(a,y,x,E){y.constructor===a.constructor||H1||(H1=!0,Oi('Should not change the class of the Part when changing category from "'+x+'" to "'+E+'"'),Oi(" Old class: "+Mi(a.constructor)+", new class: "+Mi(y.constructor)+", part: "+a.toString())),a.Ej();var b=a.data;x=a.layerName;var z=a.isSelected,tt=a.isHighlighted,rt=!0,ot=!0,st=!1;a instanceof Vn&&(rt=a.isTreeLeaf,ot=a.isTreeExpanded,st=a.wasTreeExpanded),y.Af(a),y.cloneProtected(a),a.Tf=E,a.svg!==null&&(a.svg.remove(),a.svg=null,a.Uc=!0),a.v(),a.N(),y=a.diagram,E=!0,y!==null&&(E=y.skipsUndoManager,y.skipsUndoManager=!0),a.ub=b,a.G=z?a.G|4096:a.G&-4097,a.G=tt?a.G|524288:a.G&-524289,a instanceof Vn&&(a.U=rt?a.U|4:a.U&-5,a.U=ot?a.U|1:a.U&-2,a.U=st?a.U|2:a.U&-3),b!==null&&a.La(),b=a.layerName,b!==x&&(a.Jg=x,a.layerName=b),y!==null&&(y.skipsUndoManager=E),a.Zc()&&a.C(64)}mi.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},mi.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},mi.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},mi.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},mi.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},mi.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},mi.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},mi.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},mi.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 cc(a){return(a.G&32768)!==0}function Yv(a,y){a.G=y?a.G|32768:a.G&-32769}function Xv(a,y){a.G=y?a.G|65536:a.G&-65537}function fc(a){return(a.G&131072)!==0}Ct=mi.prototype,Ct.Fd=function(a){this.G=a?this.G|131072:this.G&-131073};function c0(a,y){a.G=y?a.G|1048576:a.G&-1048577}Ct.oh=function(){var a=this.containingGroup;a!==null&&(a.v(),a.placeholder!==null&&a.placeholder.v(),a.Bd())},Ct.N=function(){var a=this.diagram;a!==null&&!te(this)&&!cc(this)&&this.isVisible()&&this.Ib.w()&&a.N(xf(this,this.Ib))},Ct.v=function(){pn.prototype.v.call(this);var a=this.diagram;a!==null&&(a.De.add(this),this instanceof Vn&&this.labeledLink!==null&&Ha(this.labeledLink),a.$b(!0))},Ct.Vo=function(a){a||(a=this.Ah,a!==null&&ty(a,this))},Ct.Wo=function(a){a||(a=this.Ah,a!==null&&ey(a,this))},Ct.Lj=function(){var a=this.data;if(a!==null){var y=this.diagram;y!==null&&(y=y.model,y!==null&&y.cm(a))}},Ct.oz=function(){return _v(this,this)};function _v(a,y){var x=y.containingGroup;return x!==null?1+_v(a,x):y instanceof Vn&&(y=y.labeledLink,y!==null)?_v(a,y):0}Ct.sz=function(){return z1(this,this)};function z1(a,y){var x=y.containingGroup;return x!==null||y instanceof Vn&&(x=y.labeledLink,x!==null)?z1(a,x):y}Ct.Td=function(a){return a instanceof Gi?Jv(this,this,a):!1};function Jv(a,y,x){if(y===x||x===null)return!1;var E=y.containingGroup;return E===null||E!==x&&!Jv(a,E,x)?y instanceof Vn&&(y=y.labeledLink,y!==null)?Jv(a,y,x):!1:!0}Ct.px=function(a){if(a===null)return null;if(this===a)return this.containingGroup;for(var y=this;y!==null;){if(y instanceof Gi&&c0(y,!0),y instanceof Vn){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 Vn&&(a=y.labeledLink,a!==null&&(y=a)),y=y.containingGroup}for(y=this;y!==null;)y instanceof Gi&&c0(y,!1),y instanceof Vn&&(a=y.labeledLink,a!==null&&(y=a)),y=y.containingGroup;return x},mi.prototype.canLayout=function(){if(!this.isLayoutPositioned||!this.isVisible())return!1;var a=this.layer;return!(a!==null&&a.isTemporary||this instanceof Vn&&this.isLinkLabel)},mi.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 Vn&&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 G1(a){return a.isVisible()?(a=a.layer,!(a!==null&&a.isTemporary)):!1}function gc(a,y,x,E,b,z){if(z===void 0&&(z=null),!(a.contains(y)||z!==null&&!z(y)||y instanceof Pr)){if(a.add(y),y instanceof Vn){if(x&&y instanceof Gi)for(var tt=y.memberParts;tt.next();)gc(a,tt.value,x,E,b,z);if(b!==!1)for(tt=y.linksConnected;tt.next();){var rt=tt.value;if(!a.contains(rt)){var ot=rt.fromNode,st=rt.toNode;ot=ot===null||a.contains(ot),st=st===null||a.contains(st),(b?ot&&st:ot||st)&&gc(a,rt,x,E,b,z)}}if(1<E)for(y=y.Ou();y.next();)gc(a,y.value,x,E-1,b,z)}else if(y instanceof En)for(y=y.labelNodes;y.next();)gc(a,y.value,x,E,b,z)}}we.Object.defineProperties(mi.prototype,{key:{get:function(){var a=this.diagram;if(a!==null)return a.model.wa(this.data)}},adornments:{get:function(){return this.Qf===null?vr: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 E=y.pc(-1,this,!0);if(0<=E&&x.cb(zo,"parts",y,this,null,E,!0),E=a.oi(99999999,this,!0),y.visible!==a.visible&&this.Zb(a.visible),0<=E&&x.cb(Eo,"parts",a,null,this,!0,E),E=this.layerChanged,E!==null){var b=x.aa;x.aa=!0,E(this,y,a),x.aa=b}}}}},layerChanged:{get:function(){return this.P!==null?this.P.zq:null},set:function(a){var y=this.layerChanged;y!==a&&(vs(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&&nf(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 Pr?this.type!==pn.Link&&this.placeholder!==null?this.nf=this.placeholder:this.nf=this:this.nf=this}return this.nf.visible?this.nf:this}},minLocation:{get:function(){return this.P!==null?this.P.Pq:vo},set:function(a){var y=this.minLocation;y.D(a)||(a=a.J(),vs(this),this.P.Pq=a,this.g("minLocation",y,a))}},maxLocation:{get:function(){return this.P!==null?this.P.Kq:Oo},set:function(a){var y=this.maxLocation;y.D(a)||(a=a.J(),vs(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&&(vs(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:wo},set:function(a){var y=this.locationSpot;y.D(a)||(a=a.J(),vs(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,E=this.ke;if(!(E.x===y||isNaN(E.x)&&isNaN(y))||!(E.y===x||isNaN(E.y)&&isNaN(x))){if(a=a.copy(),y=a,this.ph())y=!1;else{if(this.ke=y,this.G|=2097152,te(this)===!1&&(d0(this),x=this.pa,x.w())){var b=this.diagram;if(b===null||b.animationManager.isTicking||!b.undoManager.isUndoingRedoing){var z=x.copy();x.h(x.x+(y.x-E.x),x.y+(y.y-E.y)),T1(this,b,x,z.x,z.y),this.g("position",z,x.copy())}}y=!0}y&&this.g("location",E,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,E=this.data,b=null;if(x!==null&&E!==null&&!(this instanceof Pr)){var z=x.model.undoManager;z.isEnabled&&!z.isUndoingRedoing&&(b=this.clone(),b.O.addAll(this.O))}this.Tf=a,this.g("category",y,a),x===null||E===null||this instanceof Pr?this instanceof Pr&&(b=this.adornedPart,b!==null&&(a=b.Qf,a!==null&&a.remove(y),b.bh(this.category,this))):(z=x.model,z.undoManager.isUndoingRedoing||(this.ph()?(x.partManager.setLinkCategoryForData(E,a),x=x.partManager.findLinkTemplateForCategory(a),x!==null&&(Ll(x),x=x.copy(),x!==null&&Zv(this,x,y,a))):(z!==null&&z.jm(E,a),x=cS(x.partManager,E,a),x!==null&&(Ll(x),x=x.copy(),x===null||x instanceof En||(E=this.location.copy(),Zv(this,x,y,a),this.location.w()||(this.location=E)))),b!==null&&(y=this.clone(),y.O.addAll(this.O),this.g("self",b,y))))}}},self:{get:function(){return this},set:function(a){Zv(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 E=!1;if(x!==null){E=x.skipsUndoManager,x.skipsUndoManager=!0;var b=x.selection;b.ka(),a?b.add(this):b.remove(this),b.freeze()}this.g("isSelected",y,a),this.Wb(),a=this.selectionChanged,a!==null&&a(this),x!==null&&(x.$b(),x.skipsUndoManager=E)}}}},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&&(vs(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&&(vs(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&&(vs(this),this.P.tr=a,this.g("selectionAdornmentTemplate",y,a))}},selectionObject:{get:function(){if(this.Ug===null){var a=this.selectionObjectName;a!==null&&a!==""?(a=this.fb(a),a!==null?this.Ug=a:this.Ug=this):this instanceof En?(a=this.path,a!==null?this.Ug=a:this.Ug=this):this.Ug=this}return this.Ug}},selectionChanged:{get:function(){return this.P!==null?this.P.ur:null},set:function(a){var y=this.selectionChanged;y!==a&&(vs(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&&(vs(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&&(vs(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:br},set:function(a){var y=this.resizeCellSize;y.D(a)||(a=a.J(),vs(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&&(vs(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&&(vs(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:ha},set:function(a){var y=this.rotationSpot;y.D(a)||(a=a.J(),vs(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&&pe("Cannot make a Group a member of itself: "+this.toString()),pe("Cannot make a Group indirectly contain itself: "+this.toString()+" already contains "+a.toString())),this.C(2);var x=this.diagram;if(y!==null?ey(y,this):this instanceof Gi&&x!==null&&x.ai.remove(this),this.Ah=a,a!==null?ty(a,this):this instanceof Gi&&x!==null&&x.ai.add(this),this.C(1),x!==null&&x.aa){var E=this.data,b=x.model;if(E!==null&&b.Xj()){var z=b.wa(a!==null?a.data:null);b.mp(E,z)}}if(E=this.containingGroupChanged,E!==null&&(b=!0,x!==null&&(b=x.aa,x.aa=!0),E(this,y,a),x!==null&&(x.aa=b)),this instanceof Gi){for(x=new mn,gc(x,this,!0,0,!0),x=x.iterator;x.next();)if(E=x.value,E instanceof Vn)for(E=E.linksConnected;E.next();)cp(E.value)}if(this instanceof Vn){for(x=this.linksConnected;x.next();)cp(x.value);x=this.labeledLink,x!==null&&cp(x)}this.g("containingGroup",y,a),a!==null&&(y=a.layer,y!==null&&nf(y,-1,a))}}else pe("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&&(vs(this),this.P.Kp=a,this.g("containingGroupChanged",y,a))}},isTopLevel:{get:function(){return!(this.containingGroup!==null||this instanceof Vn&&this.labeledLink!==null)}},layoutConditions:{get:function(){return this.P!==null?this.P.Cq:127},set:function(a){var y=this.layoutConditions;y!==a&&(vs(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&&(vs(this),this.P.Up=a,this.g("dragComputation",y,a))}},shadowOffset:{get:function(){return this.P!==null?this.P.zr:ua},set:function(a){var y=this.shadowOffset;y.D(a)||(a=a.J(),vs(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&&(vs(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&&(vs(this),this.P.Vg=a,this.N(),this.g("shadowBlur",y,a))}}}),mi.prototype.invalidateLayout=mi.prototype.C,mi.prototype.findCommonContainingGroup=mi.prototype.px,mi.prototype.isMemberOf=mi.prototype.Td,mi.prototype.findTopLevelPart=mi.prototype.sz,mi.prototype.findSubGraphLevel=mi.prototype.oz,mi.prototype.ensureBounds=mi.prototype.Va,mi.prototype.getDocumentBounds=mi.prototype.mi,mi.prototype.findObject=mi.prototype.fb,mi.prototype.moveTo=mi.prototype.moveTo,mi.prototype.invalidateAdornments=mi.prototype.Wb,mi.prototype.clearAdornments=mi.prototype.Ej,mi.prototype.removeAdornment=mi.prototype.Jf,mi.prototype.addAdornment=mi.prototype.bh,mi.prototype.findAdornment=mi.prototype.Pj,mi.prototype.updateTargetBindings=mi.prototype.La;var H1=!1;mi.className="Part",mi.LayoutNone=0,mi.LayoutAdded=1,mi.LayoutRemoved=2,mi.LayoutShown=4,mi.LayoutHidden=8,mi.LayoutNodeSized=16,mi.LayoutGroupLayout=32,mi.LayoutNodeReplaced=64,mi.LayoutStandard=127,mi.LayoutAll=16777215;function Pr(a,y){a===void 0||a instanceof Xo||typeof a=="string"?mi.call(this,a):(mi.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)}Ce(Pr,mi),Pr.prototype.toString=function(){var a=this.adornedPart;return"Adornment("+this.category+")"+(a!==null?a.toString():"")},Pr.prototype.updateRelationshipsFromData=function(){},Pr.prototype.Ul=function(a){var y=this.adornedObject,x=y==null?void 0:y.part;if(x instanceof En&&y instanceof Ui){y=x.path,x.Ul(a),a=y.geometry,x=this.O.s,y=x.length;for(var E=0;E<y;E++){var b=x[E];b.isPanelMain&&b instanceof Ui&&(b.ua=a)}}},Pr.prototype.si=function(){var a=this.ue;return a===null?!0:(a=a.part,a===null||!te(a))},Pr.prototype.Zc=function(){return!1},Pr.prototype.gk=function(a,y,x,E,b,z,tt){if(a===Eo&&y==="elements"){if(b instanceof es)this.$a===null&&(this.$a=b);else if(b instanceof pn){var rt=b.Nl(function(ot){return ot instanceof es});rt instanceof es&&this.$a===null&&(this.$a=rt)}}else a===zo&&y==="elements"&&this.$a!==null&&(E===this.$a?this.$a=null:E instanceof pn&&this.$a.rg(E)&&(this.$a=null));mi.prototype.gk.call(this,a,y,x,E,b,z,tt)},Pr.prototype.updateAdornments=function(){},Pr.prototype.Lj=function(){},we.Object.defineProperties(Pr.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}}}),Pr.className="Adornment";function Qv(){this.nc=!1,this.Vr=this.gj=this.Eq=this.Dq=null,this.yp=Dl,this.er=p0,this.Kr=this.ij=this.Nq=this.Mq=null}Qv.prototype.copy=function(){var a=new Qv;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 Vn(a,y){a===void 0||a instanceof Xo||typeof a=="string"?mi.call(this,a):(mi.call(this),a&&(y=a)),this.U=13,this.Ba=null,this.jb=new yn,this.wc=this.af=this.Yk=null,this.ci=!1,y&&Object.assign(this,y)}Ce(Vn,mi),Vn.prototype.cloneProtected=function(a){mi.prototype.cloneProtected.call(this,a),a.U=this.U,this.Ba!==null&&(a.Ba=this.Ba.nc?this.Ba:this.Ba.copy())},Ct=Vn.prototype,Ct.Af=function(a){mi.prototype.Af.call(this,a),a.Bd(),a.af=this.af,a.wc=null};function wd(a){a.Ba===null?a.Ba=new Qv:a.Ba.nc&&(a.Ba=a.Ba.copy())}Ct.th=function(){mi.prototype.th.call(this),this.Ba!==null&&(this.Ba.nc=!0)};function W1(a,y){y!==null&&(a.af===null&&(a.af=new mn),a.af.add(y))}function V1(a,y,x,E){if(y===null||a.af===null)return null;for(var b=a.af.iterator;b.next();){var z=b.value;if(z.Ds===a&&z.cv===y&&z.Ox===x&&z.Px===E||z.Ds===y&&z.cv===a&&z.Ox===E&&z.Px===x)return z}return null}Ct.Lz=function(a,y,x){y==null&&(y=""),x==null&&(x=""),a=V1(this,a,y,x),a!==null&&a.Sl()},Ct.gk=function(a,y,x,E,b,z,tt){a===Eo&&y==="elements"?this.wc=null:a===zo&&y==="elements"&&(this.wc=null),mi.prototype.gk.call(this,a,y,x,E,b,z,tt)},Ct.Bd=function(a){for(var y=this.linksConnected;y.next();){var x=y.value;a!==void 0&&a.contains(x)||(Ws(x.fromPort),Ws(x.toPort),x.bb())}};function U1(a,y){for(a=a.linksConnected;a.next();){var x=a.value;(x.fromPort===y||x.toPort===y)&&(Ws(x.fromPort),Ws(x.toPort),x.bb())}}function Ws(a){if(a!==null){var y=a.Zn;y!==null&&y.Sl(),a=a.part,y=a.containingGroup,y===null||a.isVisible()||Ws(y.port)}}Ct.si=function(){return!0},Vn.prototype.getAvoidableRect=function(a){return a.set(this.actualBounds),a.Co(this.avoidableMargin),a},Vn.prototype.findVisibleNode=function(){for(var a=this;a!==null&&!a.isVisible();)a=a.containingGroup;return a},Vn.prototype.isVisible=function(){if(!mi.prototype.isVisible.call(this))return!1;var a=!0,y=Lu,x=this.diagram;if(x!==null&&(a=x.isTreePathToChildren,y=x.treeCollapsePolicy),y===Lu){if(a=this.pg(),a!==null&&!a.isTreeExpanded)return!1}else if(y===bo){if(a=a?this.Oo():this.Po(),0<a.count&&a.all(function(E){return!E.isTreeExpanded}))return!1}else if(y===Th&&(a=a?this.Oo():this.Po(),0<a.count&&a.any(function(E){return!E.isTreeExpanded})))return!1;return a=this.labeledLink,a!==null?a.isVisible():!0},Vn.prototype.Zb=function(a){mi.prototype.Zb.call(this,a);for(var y=this.linksConnected;y.next();){var x=y.value;if(a&&this.containingGroup!==null){var E=x.To(this);E===null||E.Td(this.containingGroup)||x.bb()}x.Zb(a)}},Vn.prototype.qx=function(){var a=new mn,y=new mn;return K1(this,this,a,y),y.iterator};function K1(a,y,x,E){if(y!==null&&!x.has(y)){x.add(y);var b=!0,z=a.diagram;z!==null&&(b=z.isTreePathToChildren),y.linksConnected.each(function(tt){tt.isTreeLink?(b?tt.fromNode===y:tt.toNode===y)&&K1(a,b?tt.toNode:tt.fromNode,x,E):E.add(tt)})}}Vn.prototype.findLinksConnected=function(a){if(a===void 0&&(a=null),a===null)return this.jb.iterator;var y=new pr(this.jb),x=this;return y.predicate=function(E){return E.fromNode===x&&E.fromPortId===a||E.toNode===x&&E.toPortId===a},y},Ct=Vn.prototype,Ct.Mo=function(a){a===void 0&&(a=null);var y=new pr(this.jb),x=this;return y.predicate=function(E){return E.fromNode!==x?!1:a===null?!0:E.fromPortId===a},y},Ct.Sd=function(a){a===void 0&&(a=null);var y=new pr(this.jb),x=this;return y.predicate=function(E){return E.toNode!==x?!1:a===null?!0:E.toPortId===a},y},Ct.Mu=function(a){a===void 0&&(a=null);for(var y=null,x=null,E=this.jb.iterator;E.next();){var b=E.value;b.fromNode===this?(a===null||b.fromPortId===a)&&(b=b.toNode,y!==null?y.add(b):x!==null&&x!==b?(y=new mn,y.add(x),y.add(b)):x=b):b.toNode!==this||a!==null&&b.toPortId!==a||(b=b.fromNode,y!==null?y.add(b):x!==null&&x!==b?(y=new mn,y.add(x),y.add(b)):x=b)}return y!==null?y.iterator:x!==null?new yr(x):vr},Ct.Po=function(a){a===void 0&&(a=null);for(var y=null,x=null,E=this.jb.iterator;E.next();){var b=E.value;b.fromNode!==this||a!==null&&b.fromPortId!==a||(b=b.toNode,y!==null?y.add(b):x!==null&&x!==b?(y=new mn,y.add(x),y.add(b)):x=b)}return y!==null?y.iterator:x!==null?new yr(x):vr},Ct.Oo=function(a){a===void 0&&(a=null);for(var y=null,x=null,E=this.jb.iterator;E.next();){var b=E.value;b.toNode!==this||a!==null&&b.toPortId!==a||(b=b.fromNode,y!==null?y.add(b):x!==null&&x!==b?(y=new mn,y.add(x),y.add(b)):x=b)}return y!==null?y.iterator:x!==null?new yr(x):vr},Ct.jz=function(a,y,x){y===void 0&&(y=null),x===void 0&&(x=null);var E=new pr(this.jb),b=this;return E.predicate=function(z){return!((z.fromNode!==b||z.toNode!==a||y!==null&&z.fromPortId!==y||x!==null&&z.toPortId!==x)&&(z.fromNode!==a||z.toNode!==b||x!==null&&z.fromPortId!==x||y!==null&&z.toPortId!==y))},E},Ct.kz=function(a,y,x){y===void 0&&(y=null),x===void 0&&(x=null);var E=new pr(this.jb),b=this;return E.predicate=function(z){return!(z.fromNode!==b||z.toNode!==a||y!==null&&z.fromPortId!==y||x!==null&&z.toPortId!==x)},E};function f0(a,y,x){Ws(x);var E=a.jb.contains(y);if(E||a.jb.add(y),!E||y.fromNode===y.toNode){var b=a.linkConnected;if(b!==null){var z=!0,tt=a.diagram;tt!==null&&(z=tt.aa,tt.aa=!0),b(a,y,x),tt!==null&&(tt.aa=z)}}!E&&y.isTreeLink&&(x=y.fromNode,y=y.toNode,x!==null&&y!==null&&x!==y&&(E=!0,a=a.diagram,a!==null&&(E=a.isTreePathToChildren),b=E?y:x,z=E?x:y,b.ci||(b.ci=z),!z.isTreeLeaf||a!==null&&a.undoManager.isUndoingRedoing||(E?x===z&&(z.isTreeLeaf=!1):y===z&&(z.isTreeLeaf=!1))))}function g0(a,y,x){Ws(x);var E=a.jb.remove(y),b=null;if(E||y.toNode===y.fromNode){var z=a.linkDisconnected;if(b=a.diagram,z!==null){var tt=!0;b!==null&&(tt=b.aa,b.aa=!0),z(a,y,x),b!==null&&(b.aa=tt)}}E&&y.isTreeLink&&(x=!0,b!==null&&(x=b.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,b!==null&&b.undoManager.isUndoingRedoing||(y.isTreeLeaf=!0)):Qp(y)))}function Qp(a){if(a.ci=!1,a.jb.count!==0){var y=!0,x=a.diagram;if(x===null||!x.undoManager.isUndoingRedoing){for(x!==null&&(y=x.isTreePathToChildren),x=a.jb.iterator;x.next();){var E=x.value;if(E.isTreeLink){if(y){if(E.fromNode===a){a.isTreeLeaf=!1;return}}else if(E.toNode===a){a.isTreeLeaf=!1;return}}}a.isTreeLeaf=!0}}}Vn.prototype.updateRelationshipsFromData=function(){var a=this.diagram;a!==null&&a.partManager.updateRelationshipsFromData(this)},Ct=Vn.prototype,Ct.Vo=function(a){mi.prototype.Vo.call(this,a),a||(Qp(this),a=this.Yk,a!==null&&tS(a,this))},Ct.Wo=function(a){mi.prototype.Wo.call(this,a),a||(a=this.Yk,a!==null&&a.wd!==null&&(a.wd.remove(this),a.v()))},Ct.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 E=x.value;y?a.remove(E):(E.fromNode===this&&(E.fromNode=null),E.toNode===this&&(E.toNode=null))}}this.labeledLink=null,mi.prototype.Lj.call(this)},Ct.ns=function(a){if(this.wc===null){if(a===""&&this.Te===!1)return this;Z1(this)}var y=this.wc.I(a);return y!==null||a!==""&&(y=this.wc.I(""),y!==null)?y:this};function Z1(a){a.wc===null?a.wc=new yi:a.wc.clear(),a.qm(a,function(y,x){Y1(y,x)}),a.wc.count===0&&a.wc.add("",a)}function Y1(a,y){var x=y.portId;x!==null&&a.wc!==null&&a.wc.add(x,y)}function qv(a,y,x){var E=y.portId;if(E!==null&&(a.wc!==null&&a.wc.remove(E),y=a.diagram,y!==null&&x)){for(x=null,a=a.findLinksConnected(E);a.next();)E=a.value,x===null&&(x=Si()),x.push(E);if(x!==null){for(a=0;a<x.length;a++)y.remove(x[a]);wi(x)}}}Ct.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 E=x.jb.iterator;E.next();){var b=E.value;if(b.isTreeLink&&(y=b.fromNode,y!==x&&y!==this))break}if(y===this||y===null||y===x)return!1;x=y}else for(;x!==a;){for(y=null,E=x.jb.iterator;E.next()&&(b=E.value,!b.isTreeLink||(y=b.toNode,y===x||y===this)););if(y===this||y===null||y===x)return!1;x=y}return!0},Ct.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 E=x.value;if(E.isTreeLink&&(a=E.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()&&(E=x.value,!E.isTreeLink||(a=E.toNode,a===y||a===this)););if(a===this)return this;if(a===null||a===y)return y;y=a}},Ct.gz=function(a){if(a===null)return null;if(this===a)return this;for(var y=this;y!==null;)c0(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;)c0(y,!1),y=y.pg();return x},Ct.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},Ct.pg=function(){var a=this.ci;if(a===null)return null;if(a instanceof Vn)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},Ct.vz=function(){function a(x,E){E.add(x);var b=x.kh();b!==null&&(E.add(b),x=x.pg(),x!==null&&a(x,E))}var y=new mn;return a(this,y),y},Ct.uz=function(){return X1(this,this)};function X1(a,y){return y=y.pg(),y===null?0:1+X1(a,y)}Ct.Qo=function(){var a=!0,y=this.diagram;y!==null&&(a=y.isTreePathToChildren),y=new pr(this.jb);var x=this;return y.predicate=a?function(E){return!!(E.isTreeLink&&E.fromNode===x)}:function(E){return!!(E.isTreeLink&&E.toNode===x)},y},Ct.Ou=function(){var a=!0,y=this.diagram;y!==null&&(a=y.isTreePathToChildren);var x=y=null,E=this.jb.iterator;if(a)for(;E.next();)a=E.value,a.isTreeLink&&a.fromNode===this&&(a=a.toNode,y!==null?y.add(a):x!==null&&x!==a?(y=new yn,y.add(x),y.add(a)):x=a);else for(;E.next();)a=E.value,a.isTreeLink&&a.toNode===this&&(a=a.fromNode,y!==null?y.add(a):x!==null&&x!==a?(y=new yn,y.add(x),y.add(a)):x=a);return y!==null?y.iterator:x!==null?new yr(x):vr},Ct.wz=function(a){a===void 0&&(a=1/0);var y=new mn;return gc(y,this,!1,a,!0),y},Vn.prototype.collapseTree=function(a){a===void 0&&(a=1),1>a&&(a=1);var y=this.diagram;if(y!==null&&!y.Ue){y.Ue=!0;var x=new mn;x.add(this),_1(this,x,y.isTreePathToChildren,a,y,this,y.treeCollapsePolicy===Lu),y.Ue=!1}};function _1(a,y,x,E,b,z,tt){if(1<E)for(var rt=x?a.Mo():a.Sd();rt.next();){var ot=rt.value;ot.isTreeLink&&(ot=ot.To(a),ot===null||ot===a||y.contains(ot)||(y.add(ot),_1(ot,y,x,E-1,b,z,tt)))}else J1(a,y,x,b,z,tt)}function J1(a,y,x,E,b,z){for(var tt=b===a?!0:a.isTreeExpanded,rt=x?a.Mo():a.Sd(),ot={};rt.next();){var st=rt.value;if(st.isTreeLink&&(st=st.To(a),st!==null&&st!==a)){var ut=y.contains(st);if(ut||y.add(st),tt){var ft=x?st.Oo():st.Po();ot.uv=a,ft.all(function(St){return function(wt){return wt===St.uv||!wt.isTreeExpanded}}(ot))&&E.Aj(st,b),st.oh(),st.Zb(!1)}st.isTreeExpanded&&(st.wasTreeExpanded=st.isTreeExpanded,ut||J1(st,y,x,E,b,z))}ot={uv:ot.uv}}a.isTreeExpanded=!1}Vn.prototype.expandTree=function(a){a===void 0&&(a=2),2>a&&(a=2);var y=this.diagram;if(y!==null&&!y.Ue){y.Ue=!0;var x=new mn;x.add(this),Q1(this,x,y.isTreePathToChildren,a,y,this,y.treeCollapsePolicy===Lu),y.Ue=!1}};function Q1(a,y,x,E,b,z,tt){for(var rt=z===a?!1:a.isTreeExpanded,ot=x?a.Mo():a.Sd(),st={};ot.next();){var ut=ot.value;if(ut.isTreeLink&&(rt||ut.fd||ut.bb(),ut=ut.To(a),ut!==null&&ut!==a&&!y.contains(ut))){if(y.add(ut),!rt){ut.Zb(!0),ut.oh();var ft=x?ut.Oo():ut.Po();st.vv=a,ft.all(function(St){return function(wt){return wt===St.vv||!wt.isTreeExpanded}}(st))&&b.Cj(ut,z)}(2<E||ut.wasTreeExpanded)&&(ut.wasTreeExpanded=!1,Q1(ut,y,x,E-1,b,z,tt))}st={vv:st.vv}}a.isTreeExpanded=!0}we.Object.defineProperties(Vn.prototype,{portSpreading:{get:function(){return this.Ba!==null?this.Ba.er:p0},set:function(a){var y=this.portSpreading;y!==a&&(wd(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:Dl},set:function(a){typeof a=="number"&&(a=new Di(a));var y=this.avoidableMargin;if(!y.D(a)){a=a.J(),wd(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&&(wd(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&&(wd(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&&(wd(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,E=this.data;if(y!==null){if(y.wd!==null&&(y.wd.remove(this),y.v()),x!==null&&E!==null&&!x.undoManager.isUndoingRedoing){var b=y.data,z=x.model;if(b!==null&&z.ri()){var tt=z.wa(E);tt!==void 0&&z.Qx(b,tt)}}this.containingGroup=null}this.Yk=a,a!==null&&(tS(a,this),x===null||E===null||x.undoManager.isUndoingRedoing||(b=a.data,x=x.model,b!==null&&x.ri()&&(E=x.wa(E),E!==void 0&&x.Bu(b,E))),this.containingGroup=a.containingGroup),Ha(this),this.g("labeledLink",y,a)}}},port:{get:function(){return this.ns("")}},ports:{get:function(){return this.wc===null&&Z1(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 E=!0;x!==null&&(E=x.aa,x.aa=!0),y(this),x!==null&&(x.aa=E)}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&&(wd(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))}}}),Vn.prototype.expandTree=Vn.prototype.expandTree,Vn.prototype.collapseTree=Vn.prototype.collapseTree,Vn.prototype.findTreeParts=Vn.prototype.wz,Vn.prototype.findTreeChildrenNodes=Vn.prototype.Ou,Vn.prototype.findTreeChildrenLinks=Vn.prototype.Qo,Vn.prototype.findTreeLevel=Vn.prototype.uz,Vn.prototype.findTreeParentChain=Vn.prototype.vz,Vn.prototype.findTreeParentNode=Vn.prototype.pg,Vn.prototype.findTreeParentLink=Vn.prototype.kh,Vn.prototype.findCommonTreeParent=Vn.prototype.gz,Vn.prototype.findTreeRoot=Vn.prototype.xz,Vn.prototype.isInTreeOf=Vn.prototype.Nz,Vn.prototype.findPort=Vn.prototype.ns,Vn.prototype.findLinksTo=Vn.prototype.kz,Vn.prototype.findLinksBetween=Vn.prototype.jz,Vn.prototype.findNodesInto=Vn.prototype.Oo,Vn.prototype.findNodesOutOf=Vn.prototype.Po,Vn.prototype.findNodesConnected=Vn.prototype.Mu,Vn.prototype.findLinksInto=Vn.prototype.Sd,Vn.prototype.findLinksOutOf=Vn.prototype.Mo,Vn.prototype.findExternalTreeLinksConnected=Vn.prototype.qx,Vn.prototype.invalidateConnectedLinks=Vn.prototype.Bd,Vn.prototype.invalidateLinkBundle=Vn.prototype.Lz;var Ex=new Je(Vn,"SpreadingNone",10),p0=new Je(Vn,"SpreadingEvenly",11),$v=new Je(Vn,"SpreadingPacked",12);Vn.className="Node",Vn.SpreadingNone=Ex,Vn.SpreadingEvenly=p0,Vn.SpreadingPacked=$v;function Gi(a,y){a===void 0||a instanceof Xo||typeof a=="string"?Vn.call(this,a):(Vn.call(this),a&&(y=a)),this.U|=4608,this.Gn=new mn,this.$a=null,this.Sc=new ro,this.Sc.group=this,this.gl=new mn,this.tb=this.$p=null,y&&Object.assign(this,y)}Ce(Gi,Vn),Gi.prototype.cloneProtected=function(a){Vn.prototype.cloneProtected.call(this,a),this.U=this.U&-32769;var y=a.Nl(function(x){return x instanceof es});y instanceof es?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())},Ct=Gi.prototype,Ct.Af=function(a){Vn.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 Vn)x.Bd(y);else if(x instanceof En)for(x=x.labelNodes;x.next();)x.value.Bd(y)}},Ct.gk=function(a,y,x,E,b,z,tt){if(a===Eo&&y==="elements"){if(b instanceof es)this.$a===null?this.$a=b:this.$a!==b&&pe("Cannot insert a second Placeholder into the visual tree of a Group.");else if(b instanceof pn){var rt=b.Nl(function(ot){return ot instanceof es});rt instanceof es&&(this.$a===null?this.$a=rt:this.$a!==rt&&pe("Cannot insert a second Placeholder into the visual tree of a Group."))}}else a===zo&&y==="elements"&&this.$a!==null&&(E===this.$a?this.$a=null:E instanceof pn&&this.$a.rg(E)&&(this.$a=null));Vn.prototype.gk.call(this,a,y,x,E,b,z,tt)},Ct.Xl=function(a,y){Vn.prototype.Xl.call(this,a,y),this.isClipping&&this.type!==pn.Spot&&this.isSubGraphExpanded&&(a=this.resizeObject,a instanceof pn&&(a=a.Pb()),this.tb===null&&(this.tb=new Ye),a.mi(this.tb),a instanceof Ui&&this.tb.Bc(-a.strokeWidth,-a.strokeWidth))},Ct.eh=function(a,y,x,E){this.nf=this.$a,Vn.prototype.eh.call(this,a,y,x,E)},Ct.Va=function(){var a=this;a.isSubGraphExpanded&&this.memberParts.each(function(y){!a.computesBoundsIncludingLinks&&y instanceof En||y.Va()}),Vn.prototype.Va.call(this)},Ct.si=function(){if(!Vn.prototype.si.call(this))return!1;for(var a=this.memberParts;a.next();){var y=a.value;if(y instanceof Vn){if(y.isVisible()&&te(y))return!1}else if(y instanceof En&&y.isVisible()&&te(y)&&y.fromNode!==this&&y.toNode!==this)return!1}return!0};function ty(a,y){if(a.Gn.add(y)){y instanceof Gi&&a.gl.add(y);var x=a.memberAdded;if(x!==null){var E=!0,b=a.diagram;b!==null&&(E=b.aa,b.aa=!0),x(a,y),b!==null&&(b.aa=E)}a.isVisible()&&a.isSubGraphExpanded||y.Zb(!1)}y instanceof En&&!a.computesBoundsIncludingLinks||(y=a.$a,y===null&&(y=a),y.v())}function ey(a,y){if(a.Gn.remove(y)){y instanceof Gi&&a.gl.remove(y);var x=a.memberRemoved;if(x!==null){var E=!0,b=a.diagram;b!==null&&(E=b.aa,b.aa=!0),x(a,y),b!==null&&(b.aa=E)}a.isVisible()&&a.isSubGraphExpanded||y.Zb(!0)}y instanceof En&&!a.computesBoundsIncludingLinks||(y=a.$a,y===null&&(y=a),y.v())}Ct.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)}Vn.prototype.Lj.call(this)},Gi.prototype.canAddMembers=function(a){var y=this.diagram;if(y===null)return!1;for(y=y.commandHandler,a=Ve(a).iterator;a.next();)if(!y.isValidMember(this,a.value))return!1;return!0},Gi.prototype.addMembers=function(a,y){var x=this.diagram;if(x===null)return!1;x=x.commandHandler;var E=!0;for(a=Ve(a).iterator;a.next();){var b=a.value;!y||x.isValidMember(this,b)?b.containingGroup=this:E=!1}return E},Gi.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))},Ct=Gi.prototype,Ct.Bd=function(a){var y=(this.U&65536)!==0;if(Vn.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 E=x.fromNode;E!==null&&E!==this&&E.Td(this)&&!E.isVisible()?(Ws(x.fromPort),Ws(x.toPort),x.bb()):(E=x.toNode,E!==null&&E!==this&&E.Td(this)&&!E.isVisible()&&(Ws(x.fromPort),Ws(x.toPort),x.bb()))}}},Ct.Lu=function(){var a=this.diagram!==null&&this.diagram.Pw;if(a&&this.$p!==null)return this.$p.iterator;var y=this.Rj();y.add(this);for(var x=new mn,E=y.iterator;E.next();){var b=E.value;if(b instanceof Vn)for(b=b.linksConnected;b.next();){var z=b.value;y.contains(z)||x.add(z)}}return a&&(this.$p=x),x.iterator},Ct.iz=function(){var a=this.Rj();a.add(this);for(var y=new mn,x=a.iterator;x.next();){var E=x.value;if(E instanceof Vn)for(E=E.linksConnected;E.next();){var b=E.value,z=b.fromNode;z===null||a.contains(z)&&z!==this||y.add(z),b=b.toNode,b===null||a.contains(b)&&b!==this||y.add(b)}}return y.iterator},Ct.hz=function(){function a(x,E){x!==null&&(E.add(x),a(x.containingGroup,E))}var y=new mn;return a(this,y),y},Ct.Rj=function(){var a=new mn;return gc(a,this,!0,0,!0),a.remove(this),a},Ct.Zb=function(a){Vn.prototype.Zb.call(this,a);for(var y=this.memberParts;y.next();)y.value.Zb(a)},Gi.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,E){for(var b=a.memberParts;b.next();){var z=b.value;if(z.Zb(!1),z instanceof Gi&&z.isSubGraphExpanded&&(z.wasSubGraphExpanded=z.isSubGraphExpanded,q1(z,y,x,E)),z instanceof Vn)z.Bd(y),x.Aj(z,E);else if(z instanceof En)for(z=z.labelNodes;z.next();)z.value.Bd(y)}a.isSubGraphExpanded=!1}Gi.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,E){for(var b=a.memberParts;b.next();){var z=b.value;if(z.Zb(!0),z instanceof Gi&&z.wasSubGraphExpanded&&(z.wasSubGraphExpanded=!1,$1(z,y,x,E)),z instanceof Vn)z.Bd(y),x.Cj(z,E);else if(z instanceof En)for(z=z.labelNodes;z.next();)z.value.Bd(y)}a.isSubGraphExpanded=!0}Gi.prototype.move=function(a,y){y===void 0&&(y=!1);var x=y?this.location:this.position,E=x.x;x=x.y;var b=a.x,z=a.y;if(!(E===b||isNaN(E)&&isNaN(b))||!(x===z||isNaN(x)&&isNaN(z))){for(E=b-(isNaN(E)?0:E),x=z-(isNaN(x)?0:x),z=Gt.alloc(),Vn.prototype.move.call(this,a,y),a=new mn,y=this.Rj().iterator;y.next();)b=y.value,b instanceof En&&(b.suspendsRouting&&a.add(b),b.fd||b.fromNode!==this&&b.toNode!==this)&&(b.suspendsRouting=!0);for(y.reset();y.next();)if(b=y.value,!(b.ph()||b instanceof Vn&&b.isLinkLabel)){var tt=b.position,rt=b.location;tt.w()?(z.x=tt.x+E,z.y=tt.y+x,b.position=z):rt.w()&&(z.x=rt.x+E,z.y=rt.y+x,b.location=z)}for(y.reset();y.next();)b=y.value,b instanceof En&&(b.suspendsRouting=a.contains(b),b.fd||b.fromNode!==this&&b.toNode!==this)&&(tt=b.position,z.x=tt.x+E,z.y=tt.y+x,z.w()?b.move(z):b.bb(),iy(b)&&b.bb());Gt.free(z)}},we.Object.defineProperties(Gi.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&&pe("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&&(wd(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&&(wd(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&&(wd(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 E=!0;x!==null&&(E=x.aa,x.aa=!0),y(this),x!==null&&(x.aa=E)}x!==null&&x.undoManager.isUndoingRedoing?(this.$a!==null&&this.$a.v(),this.memberParts.each(function(b){b.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&&(wd(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)}}}),Gi.prototype.expandSubGraph=Gi.prototype.expandSubGraph,Gi.prototype.collapseSubGraph=Gi.prototype.collapseSubGraph,Gi.prototype.findSubGraphParts=Gi.prototype.Rj,Gi.prototype.findContainingGroupChain=Gi.prototype.hz,Gi.prototype.findExternalNodesConnected=Gi.prototype.iz,Gi.prototype.findExternalLinksConnected=Gi.prototype.Lu,Gi.prototype.ensureBounds=Gi.prototype.Va,Gi.className="Group";function es(a){fe.call(this),this.yb=xs,this.ko=new Ye(NaN,NaN,NaN,NaN),a&&Object.assign(this,a)}Ce(es,fe),es.prototype.cloneProtected=function(a){fe.prototype.cloneProtected.call(this,a),a.yb=this.yb.J(),a.ko=this.ko.copy()},es.prototype.gh=function(a){if(this.background===null&&this.areaBackground===null)return!1;var y=this.naturalBounds;return Vr(0,0,y.width,y.height,a.x,a.y)},es.prototype.Wl=function(){var a=this.part;if(a!==null&&(a instanceof Gi||a instanceof Pr)||pe("Placeholder is not inside a Group or Adornment."),a instanceof Gi){var y=this.computeBorder(this.ko),x=this.minSize,E=this.dc;for(Go(E,(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,E.width,E.height),E=a.memberParts,x=!1;E.next();)if(E.value.isVisible()){x=!0;break}E=a.diagram,!x||E===null||E.animationManager.Xu(a)||isNaN(y.x)||isNaN(y.y)||(x=Gt.alloc(),x.xi(y,a.locationSpot),x.D(a.location)||(a.location=x),Gt.free(x))}else{y=this.dc,x=this.yb,E=x.left+x.right;var b=x.top+x.bottom,z=a.adornedObject;a.angle=z.li();var tt=0;z instanceof Ui&&(tt=z.strokeWidth);var rt=z.Df(),ot=z.naturalBounds,st=(ot.width+tt)*rt;tt=(ot.height+tt)*rt,a.type!==pn.Link&&(rt=z.ga(a.category==="Selection"?wo:a.locationSpot,Gt.alloc()),a.location=rt,Gt.free(rt)),isNaN(st)||isNaN(tt)?(a=z.ga(wo,Gt.alloc()),st=Ye.allocAt(a.x,a.y,0,0),st.Ye(z.ga(Rs,a)),st.Ye(z.ga(Xh,a)),st.Ye(z.ga(Ql,a)),Go(y,st.width+E||0,st.height+b||0),this.Ge(-x.left,-x.top,y.width,y.height),Gt.free(a),Ye.free(st)):(Go(y,st+E||0,tt+b||0),this.Ge(-x.left,-x.top,y.width,y.height))}},es.prototype.eh=function(a,y,x,E){this.actualBounds.h(a,y,x,E)},es.prototype.computeBorder=function(a){var y=this.part,x=y.diagram,E=x===null||!x.animationManager.isAnimating;if(x!==null&&y instanceof Gi&&!y.layer.isTemporary&&y.computesBoundsAfterDrag&&this.ko.w()){var b=x.toolManager.findTool("Dragging");if(b===x.currentTool&&(x=b.computeBorder(y,this.ko,a),x!==null))return x}x=Ye.alloc(),b=this.computeMemberBounds(x);var z=this.yb;return y instanceof Gi&&!y.isSubGraphExpanded?a.h(b.x-z.left,b.y-z.top,0,0):a.h(b.x-z.left,b.y-z.top,Math.max(b.width+z.left+z.right,0),Math.max(b.height+z.top+z.bottom,0)),Ye.free(x),E&&y instanceof Gi&&y.computesBoundsIncludingLocation&&y.location.w()&&a.Ye(y.location),a},es.prototype.computeMemberBounds=function(a){if(!(this.part instanceof Gi))return a.h(0,0,0,0),a;for(var y=this.part,x=1/0,E=1/0,b=-1/0,z=-1/0,tt=y.memberParts;tt.next();){var rt=tt.value;if(rt.isVisible()){if(rt instanceof En&&(!y.computesBoundsIncludingLinks||Zt(rt)||rt.fromNode===y||rt.toNode===y))continue;rt=rt.actualBounds,rt.left<x&&(x=rt.left),rt.top<E&&(E=rt.top),rt.right>b&&(b=rt.right),rt.bottom>z&&(z=rt.bottom)}}return isFinite(x)&&isFinite(E)?a.h(x,E,b-x,z-E):(y=y.location,a.h(y.x,y.y,0,0)),a},we.Object.defineProperties(es.prototype,{padding:{get:function(){return this.yb},set:function(a){typeof a=="number"&&(a=new Di(a));var y=this.yb;y.D(a)||(this.yb=a=a.J(),this.g("padding",y,a),this.v())}}}),es.className="Placeholder";function En(a){mi.call(this,pn.Link),this.Qa=8,this.ef=null,this.ff="",this.uf=this.gn=null,this.vf="",this.uo=null,this.qk=ns,this.Om=0,this.Qm=ns,this.Rm=NaN,this.qj=ay,this.po=.5,this.wd=null,this.Nb=new yn().freeze(),this.Tg=this.Mg=null,this.ml=new Ye,this.ua=new Fn,this.u=this.o=this.Sf=this.Wf=null,this.su=new Gt,this.cq=this.Mw=this.Lw=null,this.vt=NaN,this.ba=null,this.j=[],a&&Object.assign(this,a)}Ce(En,mi),En.prototype.cloneProtected=function(a){mi.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())},Ct=En.prototype,Ct.Af=function(a){mi.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&&Ws(y),a=a.toPort,a!==null&&Ws(a)},Ct.qb=function(a){a.classType===En?(a.value&2)===2?this.routing=a:a===el||a===Ed||a===gp?this.curve=a:a===tm||a===P0||a===w0?this.adjusting=a:a!==ay&&a!==ns&&pe("Unknown Link enum value for a Link property: "+a):mi.prototype.qb.call(this,a)},Ct.Xc=function(){this.ba===null&&(this.ba=new Wi)},Ct.si=function(){var a=this.fromNode;if(a!==null){var y=a.findVisibleNode();if(y!==null&&(a=y),te(a)||cc(a))return!1}return a=this.toNode,!(a!==null&&(y=a.findVisibleNode(),y!==null&&(a=y),te(a)||cc(a)))},Ct.zv=function(){return!1},Ct.Av=function(){},Ct.Zc=function(){return!1},En.prototype.computeAngle=function(a,y,x){return En.computeAngle(y,x)},En.computeAngle=function(a,y){switch(a){default:case ns:a=0;break;case em:a=y;break;case nm:a=y+90;break;case im:a=y-90;break;case sy:a=y+180;break;case C0:a=Se.bp(y),90<a&&270>a&&(a-=180);break;case rm:a=Se.bp(y+90),90<a&&270>a&&(a-=180);break;case om:a=Se.bp(y-90),90<a&&270>a&&(a-=180);break;case E0:if(a=Se.bp(y),45<a&&135>a||225<a&&315>a)return 0;90<a&&270>a&&(a-=180)}return Se.bp(a)};function cp(a){var y=a.fromNode,x=a.toNode,E=null;if(y!==null?E=x!==null?y.px(x):y.containingGroup:x!==null?E=x.containingGroup:E=null,y=E,x=a.Ah,x!==y){x!==null&&ey(x,a),a.Ah=y,y!==null&&ty(y,a);var b=a.containingGroupChanged;if(b!==null){var z=!0,tt=a.diagram;tt!==null&&(z=tt.aa,tt.aa=!0),b(a,x,y),tt!==null&&(tt.aa=z)}!a.fd||a.Lw!==x&&a.Mw!==x||a.bb()}if(a.isLabeledLink)for(a=a.labelNodes;a.next();)a.value.containingGroup=E}Ct=En.prototype,Ct.oh=function(){var a=this.containingGroup;a!==null&&this.fromNode!==a&&this.toNode!==a&&a.computesBoundsIncludingLinks&&mi.prototype.oh.call(this)},Ct.To=function(a){var y=this.fromNode;return a===y?this.toNode:y},Ct.Cz=function(a){var y=this.fromPort;return a===y?this.toPort:y};function tS(a,y){a.wd===null&&(a.wd=new mn),a.wd.add(y),a.v()}Ct.Vo=function(a){if(mi.prototype.Vo.call(this,a),Pf(this)&&this.Xo(this.actualBounds),!a){a=this.ef;var y=null;a!==null&&(y=this.fromPort,f0(a,this,y));var x=this.uf;if(x!==null){var E=this.toPort;x===a&&E===y||f0(x,this,E)}qp(this)}},Ct.Wo=function(a){if(mi.prototype.Wo.call(this,a),Pf(this)&&this.Xo(this.actualBounds),!a){a=this.ef;var y=null;a!==null&&(y=this.fromPort,g0(a,this,y));var x=this.uf;if(x!==null){var E=this.toPort;x===a&&E===y||g0(x,this,E)}$p(this)}},Ct.Lj=function(){if(this.fd=!0,this.wd!==null){var a=this.diagram;if(a!==null)for(var y=this.wd.copy().iterator;y.next();)a.remove(y.value)}this.data!==null&&(a=this.diagram,a!==null&&a.partManager.removeDataForLink(this))},En.prototype.updateRelationshipsFromData=function(){if(this.data!==null){var a=this.diagram;a!==null&&a.partManager.updateRelationshipsFromData(this)}},En.prototype.move=function(a,y){var x=y?this.location:this.position,E=x.x;isNaN(E)&&(E=0);var b=x.y;for(isNaN(b)&&(b=0),E=a.x-E,b=a.y-b,y===!0?mi.prototype.move.call(this,a,!1):(a=Gt.allocAt(x.x+E,x.y+b),mi.prototype.move.call(this,a,!1),Gt.free(a)),Cd(this,E,b),a=this.labelNodes;a.next();)y=a.value,x=y.position,y.moveTo(x.x+E,x.y+b)},En.prototype.canRelinkFrom=function(){if(!this.relinkableFrom)return!1;var a=this.layer;return a===null?!0:a.allowRelink?(a=a.diagram,!!(a===null||a.allowRelink)):!1},En.prototype.canRelinkTo=function(){if(!this.relinkableTo)return!1;var a=this.layer;return a===null?!0:a.allowRelink?(a=a.diagram,!!(a===null||a.allowRelink)):!1},En.prototype.computeMidPoint=function(a){var y=this.pointsCount;if(y===0)return a.assign(uo),a;if(y===1)return a.assign(this.i(0)),a;if(y===2){var x=this.i(0),E=this.i(1);return a.h((x.x+E.x)/2,(x.y+E.y)/2),a}if(this.isOrthogonal&&(15<=this.computeCorner()||this.computeCurve()===el))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()===el){if(y===3){x=this.i(0),E=this.i(1);var b=this.i(2);return Se.ax(x.x,x.y,E.x,E.y,E.x,E.y,b.x,b.y,a),a}if(E=(y-1)/3|0,x=3*(E/2|0),E%2===1){E=this.i(x),b=this.i(x+1);var z=this.i(x+2);x=this.i(x+3),Se.ax(E.x,E.y,b.x,b.y,z.x,z.y,x.x,x.y,a)}else a.assign(this.i(x));return a}var tt=this.flattenedLengths;for(x=this.flattenedTotalLength,b=z=E=0;E<x/2&&z<y&&(b=tt[z],!(E+b>x/2));)E+=b,z++;return y=this.i(z),z=this.i(z+1),1>Math.abs(y.x-z.x)?y.y>z.y?a.h(y.x,y.y-(x/2-E)):a.h(y.x,y.y+(x/2-E)):1>Math.abs(y.y-z.y)?y.x>z.x?a.h(y.x-(x/2-E),y.y):a.h(y.x+(x/2-E),y.y):(x=(x/2-E)/b,a.h(y.x+x*(z.x-y.x),y.y+x*(z.y-y.y))),a},En.prototype.computeMidAngle=function(){var a=this.pointsCount;if(2>a)return NaN;if(a===2)return this.i(0).ab(this.i(1));if(this.isOrthogonal&&(15<=this.computeCorner()||this.computeCurve()===el))return this.ua.wx(.5);if(this.computeCurve()===el&&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 E=this.i(x+2);return x=this.i(x+3),Se.My(a.x,a.y,y.x,y.y,E.x,E.y,x.x,x.y)}if(0<x&&x+1<a)return this.i(x-1).ab(this.i(x+1))}y=this.flattenedLengths,E=this.flattenedTotalLength;var b=0;x=0;for(var z;b<E/2&&x<a&&(z=y[x],!(b+z>E/2));)b+=z,x++;if(y=this.i(x),E=this.i(x+1),1>Math.abs(y.x-E.x)&&1>Math.abs(y.y-E.y)){if(0<x&&x+2<a)return this.i(x-1).ab(this.i(x+2))}else{if(1>Math.abs(y.x-E.x))return y.y>E.y?270:90;if(1>Math.abs(y.y-E.y))return y.x>E.x?180:0}return y.ab(E)},Ct=En.prototype,Ct.i=function(a){return this.Nb.s[a]},Ct.dd=function(a,y){this.Nb.cd(a,y)},Ct.L=function(a,y,x){this.Nb.cd(a,new Gt(y,x))},Ct.Kz=function(a,y){this.Nb.Gb(a,y)},Ct.m=function(a,y,x){this.Nb.Gb(a,new Gt(y,x))},Ct.ne=function(a){this.Nb.add(a)},Ct.yf=function(a,y){this.Nb.add(new Gt(a,y))},Ct.pv=function(a){this.Nb.mb(a)},Ct.Fj=function(){this.Nb.clear()};function Cd(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 E=a.fd,b=new yn,z=a.Nb.iterator;z.next();){var tt=z.value;b.add(new Gt(tt.x+y,tt.y+x).freeze())}b.freeze(),z=a.Nb,a.Nb=b,tt=a.diagram,isNaN(y)||isNaN(x)||tt!==null&&tt.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),Ha(a)),E?m0(a):(a.defaultFromPoint&&(a.defaultFromPoint=a.i(0)),a.defaultToPoint&&(a.defaultToPoint=a.i(a.pointsCount-1))),tt!==null&&tt.animationManager.zb&&$c(tt.animationManager,a,b),a.g("points",z,b)}}Ct.uh=function(){this.Mg===null&&(this.Mg=this.Nb,this.Nb=this.Nb.copy())},Ct.zf=function(){if(this.Mg!==null){for(var a=this.Mg,y=this.Nb,x=1/0,E=1/0,b=a.s,z=b.length,tt=0;tt<z;tt++){var rt=b[tt];x=Math.min(rt.x,x),E=Math.min(rt.y,E)}rt=tt=1/0;for(var ot=y.s,st=ot.length,ut=0;ut<st;ut++){var ft=ot[ut];tt=Math.min(ft.x,tt),rt=Math.min(ft.y,rt),ft.freeze()}if(y.freeze(),st===z){for(z=0;z<st;z++)if(ut=b[z],ft=ot[z],ut.x-x!==ft.x-tt||ut.y-E!==ft.y-rt){this.qc();break}}else this.qc();this.Mg=null,x=this.diagram,x!==null&&x.animationManager.zb&&$c(x.animationManager,this,y),m0(this),this.g("points",a,y)}},Ct.rv=function(){this.Mg!==null&&(this.Nb=this.Mg,this.Mg=null)};function m0(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),x0(a,!1))}Ct.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())}},Ct.vg=function(){if(!this.fd&&!this.computingPoints){var a=!0;try{this.computingPoints=!0,this.uh(),a=this.computePoints()}catch(y){this.computingPoints=!1,this.rv()}finally{this.computingPoints=!1,a?this.zf():this.rv()}}},En.prototype.computePoints=function(){if(this.diagram===null)return!1;var a=this.fromNode,y=null;if(a===null?(vg||(vg=new Vn,vg.desiredSize=Nn,vg.Va()),this.defaultFromPoint&&(vg.location=this.defaultFromPoint,vg.Va(),y=a=vg)):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 E=this.toNode,b=null;if(E===null?(yg||(yg=new Vn,yg.desiredSize=Nn,yg.Va()),this.defaultToPoint&&(yg.location=this.defaultToPoint,yg.Va(),b=E=yg)):b=this.toPort,b===null||E.isVisible()||(x=E.findVisibleNode(),x!==null&&x!==E?(E=x,b=x.port):E=x),this.Mw=E,E===null||!E.location.w())return!1;for(;!(b===null||b.actualBounds.w()&&b.Ed());)b=b.panel;if(b===null)return!1;var z=this.pointsCount,tt=this.computeSpot(!0,y);x=this.computeSpot(!1,b);var rt=fp(tt),ot=fp(x),st=y===b&&y!==null,ut=this.isOrthogonal,ft=this.curve===el;this.Wf=st&&!ut?ft=!0:!1;var St=this.computeAdjusting()===ns||st;if(!ut&&!st&&rt&&ot){if(rt=!1,!St&&3<=z&&(St=this.getLinkPoint(a,y,tt,!0,!1,E,b),ot=this.getLinkPoint(E,b,x,!1,!1,a,y),rt=this.adjustPoints(0,St,z-1,ot))&&(St=this.getLinkPoint(a,y,tt,!0,!1,E,b),ot=this.getLinkPoint(E,b,x,!1,!1,a,y),this.adjustPoints(0,St,z-1,ot)),!rt)if(this.Fj(),ft){z=this.getLinkPoint(a,y,tt,!0,!1,E,b),St=this.getLinkPoint(E,b,x,!1,!1,a,y),rt=St.x-z.x,ot=St.y-z.y,st=this.computeCurviness(),ft=ut=0;var wt=z.x+rt/3,Et=z.y+ot/3,Bt=wt,Vt=Et;Se.B(ot,0)?Vt=0<rt?Vt-st:Vt+st:(ut=-rt/ot,ft=Math.sqrt(st*st/(ut*ut+1)),0>st&&(ft=-ft),Bt=(0>ot?-1:1)*ft+wt,Vt=ut*(Bt-wt)+Et),wt=z.x+2*rt/3,Et=z.y+2*ot/3;var jt=wt,_t=Et;Se.B(ot,0)?_t=0<rt?_t-st:_t+st:(jt=(0>ot?-1:1)*ft+wt,_t=ut*(jt-wt)+Et),this.Fj(),this.ne(z),this.yf(Bt,Vt),this.yf(jt,_t),this.ne(St),this.dd(0,this.getLinkPoint(a,y,tt,!0,!1,E,b)),this.dd(3,this.getLinkPoint(E,b,x,!1,!1,a,y))}else z=E,St=b,E=this.getLinkPoint(a,y,tt,!0,!1,z,St),b=this.getLinkPoint(z,St,x,!1,!1,a,y),this.hasCurviness()?(St=b.x-E.x,x=b.y-E.y,tt=this.computeCurviness(),a=E.x+St/2,y=E.y+x/2,z=a,rt=y,Se.B(x,0)?rt=0<St?rt-tt:rt+tt:(St=-St/x,z=Math.sqrt(tt*tt/(St*St+1)),0>tt&&(z=-z),z=(0>x?-1:1)*z+a,rt=St*(z-a)+y),this.ne(E),this.yf(z,rt),this.ne(b)):(this.ne(E),this.ne(b),rt=Ye.alloc(),y.mi(rt),ot=rt.ca(b),St.mi(rt),st=rt.ca(E),(ot||st)&&(tt=y.ga(y0(tt),new Gt),this.dd(0,this.getLinkPointFromPoint(a,y,tt,b,!0,tt)),x=St.ga(y0(x),new Gt),this.dd(1,this.getLinkPointFromPoint(z,St,x,E,!1,x))),Ye.free(rt))}else{ft=this.isAvoiding,St&&(ut&&ft||st)&&this.Fj();var Qt=st?this.computeCurviness():0;ft=this.getLinkPoint(a,y,tt,!0,ut,E,b),wt=Bt=Et=0,(ut||!rt||st)&&(Vt=this.computeEndSegmentLength(a,y,tt,!0),wt=this.getLinkDirection(a,y,ft,tt,!0,ut,E,b),st&&(rt||tt.D(x)||!ut&&tt.x+x.x===1&&tt.y+x.y===1)&&(wt-=ut?90:30,0>Qt&&(wt-=180)),0>wt?wt+=360:360<=wt&&(wt-=360),st&&(Vt+=Math.abs(Qt)*(ut?1:2)),wt===0?Et=Vt:wt===90?Bt=Vt:wt===180?Et=-Vt:wt===270?Bt=-Vt:(Et=Vt*Math.cos(wt*Math.PI/180),Bt=Vt*Math.sin(wt*Math.PI/180)),tt.Mc()&&st&&(Vt=y.ga(Br,Gt.alloc()),jt=Gt.allocAt(Vt.x+1e3*Et,Vt.y+1e3*Bt),this.getLinkPointFromPoint(a,y,Vt,jt,!0,ft),Gt.free(Vt),Gt.free(jt))),Vt=this.getLinkPoint(E,b,x,!1,ut,a,y);var ie=_t=jt=0;if(ut||!ot||st){var ce=this.computeEndSegmentLength(E,b,x,!1);ie=this.getLinkDirection(E,b,Vt,x,!1,ut,a,y),st&&(ot||tt.D(x)||!ut&&tt.x+x.x===1&&tt.y+x.y===1)&&(ie+=ut?0:30,0>Qt&&(ie+=180)),0>ie?ie+=360:360<=ie&&(ie-=360),st&&(ce+=Math.abs(Qt)*(ut?1:2)),ie===0?jt=ce:ie===90?_t=ce:ie===180?jt=-ce:ie===270?_t=-ce:(jt=ce*Math.cos(ie*Math.PI/180),_t=ce*Math.sin(ie*Math.PI/180)),x.Mc()&&st&&(x=b.ga(Br,Gt.alloc()),tt=Gt.allocAt(x.x+1e3*jt,x.y+1e3*_t),this.getLinkPointFromPoint(E,b,x,tt,!1,Vt),Gt.free(x),Gt.free(tt))}x=ft,(ut||!rt||st)&&(x=new Gt(ft.x+Et,ft.y+Bt)),tt=Vt,(ut||!ot||st)&&(tt=new Gt(Vt.x+jt,Vt.y+_t)),!St&&!ut&&rt&&3<z&&this.adjustPoints(0,ft,z-2,tt)?this.dd(z-1,Vt):!St&&!ut&&ot&&3<z&&this.adjustPoints(1,x,z-1,Vt)?this.dd(0,ft):!St&&(ut?6<=z:4<z)&&this.adjustPoints(1,x,z-2,tt)?(this.dd(0,ft),this.dd(z-1,Vt)):(this.Fj(),this.ne(ft),(ut||!rt||st)&&this.ne(x),ut&&this.addOrthoPoints(x,wt,tt,ie,a,E),(ut||!ot||st)&&this.ne(tt),this.ne(Vt))}return!0};function ny(a,y){return Math.abs(y.x-a.x)>Math.abs(y.y-a.y)?(y.x>=a.x?y.x=a.x+9e9:y.x=a.x-9e9,y.y=a.y):(y.y>=a.y?y.y=a.y+9e9:y.y=a.y-9e9,y.x=a.x),y}En.prototype.getLinkPointFromPoint=function(a,y,x,E,b,z){if(z===void 0&&(z=new Gt),a===null||y===null)return z.assign(x),z;if(a.isVisible()||(b=a.findVisibleNode(),b!==null&&b!==a&&(y=b.port)),a=null,b=y.panel,b===null||b.se()||(b=b.panel),b===null){b=E.x,E=E.y;var tt=x.x;x=x.y}else{a=b.oe,b=1/(a.m11*a.m22-a.m12*a.m21),tt=a.m22*b;var rt=-a.m12*b,ot=-a.m21*b,st=a.m11*b,ut=b*(a.m21*a.dy-a.m22*a.dx),ft=b*(a.m12*a.dx-a.m11*a.dy);b=E.x*tt+E.y*ot+ut,E=E.x*rt+E.y*st+ft,tt=x.x*tt+x.y*ot+ut,x=x.x*rt+x.y*st+ft}return y.Sj(b,E,tt,x,z),a!==null&&z.transform(a),z};function v0(a,y){var x=y.Zn;return x===null&&(x=new Sg,x.port=y,x.node=y.part,y.Zn=x),lS(x,a)}En.prototype.getLinkPoint=function(a,y,x,E,b,z,tt,rt){if(rt===void 0&&(rt=new Gt),x.sb()&&!fp(x))return y.ga(x,rt),rt;if(x.$c()){var ot=v0(this,y);if(ot!==null){if(rt.assign(ot.Zo),b&&this.routing===nS){var st=v0(this,tt);if(st!==null&&ot.Gl<st.Gl){ot=Gt.alloc(),st=Gt.alloc();var ut=new Ye(y.ga(wo,ot),y.ga(Rs,st)),ft=this.computeSpot(!E,tt);a=this.getLinkPoint(z,tt,ft,!E,b,a,y,st),(x.Hf(gh)||x.Hf(js))&&a.y>=ut.y&&a.y<=ut.y+ut.height?rt.y=a.y:(x.Hf(Pu)||x.Hf(Ps))&&a.x>=ut.x&&a.x<=ut.x+ut.width&&(rt.x=a.x),Gt.free(ot),Gt.free(st)}}return rt}}return x=y.ga(y0(x),Gt.alloc()),this.pointsCount>(b?6:2)?(tt=E?this.i(1):this.i(this.pointsCount-2),b&&(tt=ny(x,tt.copy()))):(ot=this.computeSpot(!E,tt),z=Gt.alloc(),tt=tt.ga(y0(ot),z),b&&(tt=ny(x,tt)),Gt.free(z)),this.getLinkPointFromPoint(a,y,x,tt,E,rt),Gt.free(x),rt},En.prototype.getLinkDirection=function(a,y,x,E,b,z,tt,rt){t:if(E.sb())var ot=E.x>E.y?E.x>1-E.y?0:E.x<1-E.y?270:315:E.x<E.y?E.x>1-E.y?90:E.x<1-E.y?180:135:.5>E.x?225:.5<E.x?45:0;else{if(E.$c()&&(ot=v0(this,y),ot!==null))switch(ot.Nc){case 1:ot=270;break t;case 2:ot=180;break t;default:case 4:ot=0;break t;case 8:ot=90;break t}ot=y.ga(Br,Gt.alloc()),this.pointsCount>(z?6:2)?(rt=b?this.i(1):this.i(this.pointsCount-2),rt=z?ny(ot,rt.copy()):x):(x=Gt.alloc(),rt=rt.ga(Br,x),Gt.free(x)),x=Math.abs(rt.x-ot.x)>Math.abs(rt.y-ot.y)?rt.x>=ot.x?0:180:rt.y>=ot.y?90:270,Gt.free(ot),ot=x}return E.Mc()&&tt.Td(a)&&(ot+=180,360<=ot&&(ot-=360)),fp(E)||(a=y.li(),a===0)||(45<=a&&135>a?ot+=90:135<=a&&225>a?ot+=180:225<=a&&315>a&&(ot+=270),360<=ot&&(ot-=360)),ot},En.prototype.computeEndSegmentLength=function(a,y,x,E){return y!==null&&x.$c()&&(a=v0(this,y),a!==null)?a.Ju:(a=E?this.fromEndSegmentLength:this.toEndSegmentLength,y!==null&&isNaN(a)&&(a=E?y.fromEndSegmentLength:y.toEndSegmentLength),isNaN(a)&&(a=10),a)},En.prototype.computeSpot=function(a,y){return y===void 0&&(y=null),a?(a=y||this.fromPort,a===null?a=Br:(y=this.fromSpot,y.Xb()&&(y=a.fromSpot),a=y===ha?No:y)):(a=y||this.toPort,a===null?a=Br:(y=this.toSpot,y.Xb()&&(y=a.toSpot),a=y===ha?No:y)),a};function fp(a){return a===No||a.x===.5&&a.y===.5}function y0(a){return a.x===.5&&a.y===.5?a:Br}En.prototype.computeOtherPoint=function(a,y){return this.computeAdjusting()!==ns&&4<this.pointsCount?this.computeMidPoint(new Gt):(a=y.Zn,a=a!==null?lS(a,this):null,a!==null?a.Zo:y.ga(Br))},En.prototype.computeShortLength=function(a){if(a){if(a=this.fromShortLength,isNaN(a)){var y=this.fromPort;y!==null&&(a=y.fromShortLength)}return isNaN(a)?0:a}return a=this.toShortLength,isNaN(a)&&(y=this.toPort,y!==null&&(a=y.toShortLength)),isNaN(a)?0:a},En.prototype.Cf=function(a,y,x,E,b,z){if(this.pickable===!1)return!1;y===void 0&&(y=null),x===void 0&&(x=null);var tt=z;if(z===void 0&&(tt=Xi.alloc(),tt.reset()),tt.multiply(this.transform),this.fh(a,tt))return Lv(this,y,x,b),z===void 0&&Xi.free(tt),!0;if(this.Yc(a,tt)){var rt=!1;if(!this.isAtomic)for(var ot=this.O.s,st=ot.length;st--;){var ut=ot[st];if(ut.visible||ut===this.locationObject){var ft=ut.actualBounds,St=this.naturalBounds;if(!(ft.x>St.width||ft.y>St.height||0>ft.x+ft.width||0>ft.y+ft.height)){if(ft=Xi.alloc(),ft.set(tt),ut instanceof pn)rt=ut.Cf(a,y,x,E,b,ft);else if(this.path===ut){if(ut instanceof Ui)if(rt=a,St=E,ut.pickable===!1)rt=!1;else if(ft.multiply(ut.transform),St)t:{var wt=rt,Et=ft;if(ut.fh(wt,Et))rt=!0;else{if(Et===void 0&&(Et=ut.transform,wt.Re(ut.actualBounds))){rt=!0;break t}rt=wt.left,St=wt.right;var Bt=wt.top;wt=wt.bottom;var Vt=Gt.alloc(),jt=Gt.alloc(),_t=Gt.alloc(),Qt=Xi.alloc();Qt.set(Et),Qt.bv(ut.transform),Qt.Vj(),jt.x=St,jt.y=Bt,jt.transform(Qt),Vt.x=rt,Vt.y=Bt,Vt.transform(Qt),Et=!1,Sf(ut,Vt,jt,_t)?Et=!0:(Vt.x=St,Vt.y=wt,Vt.transform(Qt),Sf(ut,Vt,jt,_t)?Et=!0:(jt.x=rt,jt.y=wt,jt.transform(Qt),Sf(ut,Vt,jt,_t)?Et=!0:(Vt.x=rt,Vt.y=Bt,Vt.transform(Qt),Sf(ut,Vt,jt,_t)&&(Et=!0)))),Xi.free(Qt),Gt.free(Vt),Gt.free(jt),Gt.free(_t),rt=Et}}else rt=ut.fh(rt,ft)}else rt=Wo(ut,a,E,ft);rt&&(St=ut,y!==null&&(St=y(ut)),St&&(x===null||x(St))&&b.add(St)),Xi.free(ft)}}}return z===void 0&&Xi.free(tt),rt||this.background!==null||this.areaBackground!==null}return z===void 0&&Xi.free(tt),!1},En.prototype.computeCurve=function(){if(this.Wf===null){var a=this.fromPort,y=this.isOrthogonal;this.Wf=a!==null&&a===this.toPort&&!y}return this.Wf?el:this.curve},En.prototype.computeCorner=function(){if(this.curve===el)return 0;var a=this.corner;return(isNaN(a)||0>a)&&(a=10),a},En.prototype.findMidLabel=function(){for(var a=this.path,y=this.O.s,x=y.length,E=0;E<x;E++){var b=y[E];if(b!==a&&!b.isPanelMain&&(b.segmentIndex===-1/0||isNaN(b.segmentIndex)))return b}for(a=this.labelNodes;a.next();)if(y=a.value,y.segmentIndex===-1/0||isNaN(y.segmentIndex))return y;return null},En.prototype.computeSpacing=function(){if(!this.isVisible())return 0;var a=rS;a=Math.max(a,this.computeThickness());var y=this.fromPort,x=this.toPort;if(y!==null&&x!==null){var E=this.findMidLabel();if(E!==null){var b=E.naturalBounds,z=E.margin,tt=isNaN(b.width)?30:b.width*E.scale+z.left+z.right;b=isNaN(b.height)?14:b.height*E.scale+z.top+z.bottom,E=E.segmentOrientation,E===em||E===C0||E===sy?a=Math.max(a,b):E===im||E===om||E===nm||E===rm?a=Math.max(a,tt):(y=y.ga(Br).ab(x.ga(Br))/180*Math.PI,a=Math.max(a,Math.abs(Math.sin(y)*tt)+Math.abs(Math.cos(y)*b)+1)),this.curve===el&&(a*=1.333)}}return a},En.prototype.arrangeBundledLinks=function(a,y){if(y)for(y=0;y<a.length;y++){var x=a[y];x.computeAdjusting()===ns&&x.bb()}},En.prototype.computeCurviness=function(){var a=this.curviness;if(isNaN(a)){a=iS;var y=this.Sf;if(y!==null){for(var x=Si(),E=0,b=y.links,z=0;z<b.length;z++){var tt=b[z].computeSpacing();x.push(tt),E+=tt}for(E=-E/2,z=0;z<b.length;z++){if(b[z]===this){a=E+x[z]/2;break}E+=x[z]}y.Ds===this.fromNode&&(a=-a),wi(x)}}return a},En.prototype.computeThickness=function(){if(!this.isVisible())return 0;var a=this.path;return a!==null?Math.max(a.strokeWidth,1):1},En.prototype.hasCurviness=function(){return!isNaN(this.curviness)||this.Sf!==null},En.prototype.adjustPoints=function(a,y,x,E){var b=this.computeAdjusting();if(this.isOrthogonal){if(b===P0)return!1;b===w0&&(b=tm)}switch(b){case P0:var z=this.i(a),tt=this.i(x);if(!z.Xa(y)||!tt.Xa(E)){b=z.x,z=z.y;var rt=tt.x-b,ot=tt.y-z,st=Math.sqrt(rt*rt+ot*ot);if(!Se.$(st,0)){if(Se.$(rt,0))var ut=0>ot?-Math.PI/2:Math.PI/2;else ut=Math.atan(ot/Math.abs(rt)),0>rt&&(ut=Math.PI-ut);tt=y.x;var ft=y.y;rt=E.x-tt;var St=E.y-ft;for(ot=Math.sqrt(rt*rt+St*St),Se.$(rt,0)?St=0>St?-Math.PI/2:Math.PI/2:(St=Math.atan(St/Math.abs(rt)),0>rt&&(St=Math.PI-St)),st=ot/st,ut=St-ut,this.dd(a,y),a+=1;a<x;a++)y=this.i(a),rt=y.x-b,ot=y.y-z,y=Math.sqrt(rt*rt+ot*ot),Se.$(y,0)||(Se.$(rt,0)?ot=0>ot?-Math.PI/2:Math.PI/2:(ot=Math.atan(ot/Math.abs(rt)),0>rt&&(ot=Math.PI-ot)),rt=ot+ut,y*=st,this.L(a,tt+y*Math.cos(rt),ft+y*Math.sin(rt)));this.dd(x,E)}}return!0;case w0:if(z=this.i(a),ft=this.i(x),!z.Xa(y)||!ft.Xa(E)){b=z.x,z=z.y,tt=ft.x,ft=ft.y,st=(tt-b)*(tt-b)+(ft-z)*(ft-z),rt=y.x,ut=y.y,ot=E.x,St=E.y;var wt=1;if(ot-rt!==0){var Et=(St-ut)/(ot-rt);wt=Math.sqrt(1+1/(Et*Et))}else Et=9e9;for(this.dd(a,y),a+=1;a<x;a++){y=this.i(a);var Bt=y.x,Vt=y.y,jt=.5;st!==0&&(jt=((b-Bt)*(b-tt)+(z-Vt)*(z-ft))/st);var _t=b+jt*(tt-b),Qt=z+jt*(ft-z);y=Math.sqrt((Bt-_t)*(Bt-_t)+(Vt-Qt)*(Vt-Qt)),Vt<Et*(Bt-_t)+Qt&&(y=-y),0<Et&&(y=-y),Bt=rt+jt*(ot-rt),jt=ut+jt*(St-ut),Et!==0?(y=Bt+y/wt,this.L(a,y,jt-(y-Bt)/Et)):this.L(a,Bt,jt+y)}this.dd(x,E)}return!0;case tm:t:{if(this.isOrthogonal&&(b=this.i(a),z=this.i(a+1),tt=this.i(a+2),rt=z.x,ut=z.y,ft=rt,st=ut,Se.B(b.y,z.y)?Se.B(z.x,tt.x)?ut=y.y:Se.B(z.y,tt.y)&&(rt=y.x):Se.B(b.x,z.x)&&(Se.B(z.y,tt.y)?rt=y.x:Se.B(z.x,tt.x)&&(ut=y.y)),this.L(a+1,rt,ut),b=this.i(x),z=this.i(x-1),tt=this.i(x-2),rt=z.x,ut=z.y,ot=rt,St=ut,Se.B(b.y,z.y)?Se.B(z.x,tt.x)?ut=E.y:Se.B(z.y,tt.y)&&(rt=E.x):Se.B(b.x,z.x)&&(Se.B(z.y,tt.y)?rt=E.x:Se.B(z.x,tt.x)&&(ut=E.y)),this.L(x-1,rt,ut),iy(this))){this.L(a+1,ft,st),this.L(x-1,ot,St),x=!1;break t}this.dd(a,y),this.dd(x,E),x=!0}return x;default:return!1}},En.prototype.addOrthoPoints=function(a,y,x,E,b,z){0>y?y+=360:360<=y&&(y-=360),0>E?E+=360:360<=E&&(E-=360);var tt=E;y=315<=y||45>y?0:45<=y&&135>y?90:135<=y&&225>y?180:270,E=315<=E||45>E?0:45<=E&&135>E?90:135<=E&&225>E?180:270;var rt=b.actualBounds.copy(),ot=z.actualBounds.copy();if(rt.w()&&ot.w()){rt.Bc(am,am),ot.Bc(am,am),rt.Ye(a),ot.Ye(x);var st=Gt.alloc(),ut=Gt.alloc();y===0?x.x>a.x||E===270&&x.y<a.y&&ot.right>a.x||E===90&&x.y>a.y&&ot.right>a.x?(st.h(x.x,a.y),ut.h(x.x,(a.y+x.y)/2),E===180?(st.x=this.computeMidOrthoPosition(a.x,a.y,x.x,x.y,!1),ut.x=st.x,ut.y=x.y):E===270&&x.y<a.y||E===90&&x.y>a.y?(st.x=a.x<ot.left?this.computeMidOrthoPosition(a.x,a.y,ot.left,x.y,!1):a.x<ot.right&&(E===270&&a.y<ot.top||E===90&&a.y>ot.bottom)?this.computeMidOrthoPosition(a.x,a.y,x.x,x.y,!1):ot.right,ut.x=st.x,ut.y=x.y):E===0&&a.x<ot.left&&a.y>ot.top&&a.y<ot.bottom&&(st.x=a.x,st.y=a.y<x.y?Math.min(x.y,ot.top):Math.max(x.y,ot.bottom),ut.y=st.y)):(st.h(a.x,x.y),ut.h((a.x+x.x)/2,x.y),(E===180||E===90&&x.y<rt.top||E===270&&x.y>rt.bottom)&&(E===180&&(ot.ca(a)||rt.ca(x))?st.y=this.computeMidOrthoPosition(a.x,a.y,x.x,x.y,!0):x.y<a.y&&(E===180||E===90)?st.y=this.computeMidOrthoPosition(a.x,rt.top,x.x,Math.max(x.y,ot.bottom),!0):x.y>a.y&&(E===180||E===270)&&(st.y=this.computeMidOrthoPosition(a.x,rt.bottom,x.x,Math.min(x.y,ot.top),!0)),ut.x=x.x,ut.y=st.y),st.y>rt.top&&st.y<rt.bottom&&(x.x>=rt.left&&x.x<=a.x||a.x<=ot.right&&a.x>=x.x?(E===90||E===270)&&(st.h(Math.max((a.x+x.x)/2,a.x),a.y),ut.h(st.x,x.y)):(st.y=E===270||(E===0||E===180)&&x.y<a.y?Math.min(x.y,E===0?rt.top:Math.min(rt.top,ot.top)):Math.max(x.y,E===0?rt.bottom:Math.max(rt.bottom,ot.bottom)),ut.x=x.x,ut.y=st.y))):y===180?x.x<a.x||E===270&&x.y<a.y&&ot.left<a.x||E===90&&x.y>a.y&&ot.left<a.x?(st.h(x.x,a.y),ut.h(x.x,(a.y+x.y)/2),E===0?(st.x=this.computeMidOrthoPosition(a.x,a.y,x.x,x.y,!1),ut.x=st.x,ut.y=x.y):E===270&&x.y<a.y||E===90&&x.y>a.y?(st.x=a.x>ot.right?this.computeMidOrthoPosition(a.x,a.y,ot.right,x.y,!1):a.x>ot.left&&(E===270&&a.y<ot.top||E===90&&a.y>ot.bottom)?this.computeMidOrthoPosition(a.x,a.y,x.x,x.y,!1):ot.left,ut.x=st.x,ut.y=x.y):E===180&&a.x>ot.right&&a.y>ot.top&&a.y<ot.bottom&&(st.x=a.x,st.y=a.y<x.y?Math.min(x.y,ot.top):Math.max(x.y,ot.bottom),ut.y=st.y)):(st.h(a.x,x.y),ut.h((a.x+x.x)/2,x.y),(E===0||E===90&&x.y<rt.top||E===270&&x.y>rt.bottom)&&(E===0&&(ot.ca(a)||rt.ca(x))?st.y=this.computeMidOrthoPosition(a.x,a.y,x.x,x.y,!0):x.y<a.y&&(E===0||E===90)?st.y=this.computeMidOrthoPosition(a.x,rt.top,x.x,Math.max(x.y,ot.bottom),!0):x.y>a.y&&(E===0||E===270)&&(st.y=this.computeMidOrthoPosition(a.x,rt.bottom,x.x,Math.min(x.y,ot.top),!0)),ut.x=x.x,ut.y=st.y),st.y>rt.top&&st.y<rt.bottom&&(x.x<=rt.right&&x.x>=a.x||a.x>=ot.left&&a.x<=x.x?(E===90||E===270)&&(st.h(Math.min((a.x+x.x)/2,a.x),a.y),ut.h(st.x,x.y)):(st.y=E===270||(E===0||E===180)&&x.y<a.y?Math.min(x.y,E===180?rt.top:Math.min(rt.top,ot.top)):Math.max(x.y,E===180?rt.bottom:Math.max(rt.bottom,ot.bottom)),ut.x=x.x,ut.y=st.y))):y===90?x.y>a.y||E===180&&x.x<a.x&&ot.bottom>a.y||E===0&&x.x>a.x&&ot.bottom>a.y?(st.h(a.x,x.y),ut.h((a.x+x.x)/2,x.y),E===270?(st.y=this.computeMidOrthoPosition(a.x,a.y,x.x,x.y,!0),ut.x=x.x,ut.y=st.y):E===180&&x.x<a.x||E===0&&x.x>a.x?(st.y=a.y<ot.top?this.computeMidOrthoPosition(a.x,a.y,x.x,ot.top,!0):a.y<ot.bottom&&(E===180&&a.x<ot.left||E===0&&a.x>ot.right)?this.computeMidOrthoPosition(a.x,a.y,x.x,x.y,!0):ot.bottom,ut.x=x.x,ut.y=st.y):E===90&&a.y<ot.top&&a.x>ot.left&&a.x<ot.right&&(st.x=a.x<x.x?Math.min(x.x,ot.left):Math.max(x.x,ot.right),st.y=a.y,ut.x=st.x)):(st.h(x.x,a.y),ut.h(x.x,(a.y+x.y)/2),(E===270||E===0&&x.x<rt.left||E===180&&x.x>rt.right)&&(E===270&&(ot.ca(a)||rt.ca(x))?st.x=this.computeMidOrthoPosition(a.x,a.y,x.x,x.y,!1):x.x<a.x&&(E===270||E===0)?st.x=this.computeMidOrthoPosition(rt.left,a.y,Math.max(x.x,ot.right),x.y,!1):x.x>a.x&&(E===270||E===180)&&(st.x=this.computeMidOrthoPosition(rt.right,a.y,Math.min(x.x,ot.left),x.y,!1)),ut.x=st.x,ut.y=x.y),st.x>rt.left&&st.x<rt.right&&(x.y>=rt.top&&x.y<=a.y||a.y<=ot.bottom&&a.y>=x.y?(E===0||E===180)&&(st.h(a.x,Math.max((a.y+x.y)/2,a.y)),ut.h(x.x,st.y)):(st.x=E===180||(E===90||E===270)&&x.x<a.x?Math.min(x.x,E===90?rt.left:Math.min(rt.left,ot.left)):Math.max(x.x,E===90?rt.right:Math.max(rt.right,ot.right)),ut.x=st.x,ut.y=x.y))):x.y<a.y||E===180&&x.x<a.x&&ot.top<a.y||E===0&&x.x>a.x&&ot.top<a.y?(st.h(a.x,x.y),ut.h((a.x+x.x)/2,x.y),E===90?(st.y=this.computeMidOrthoPosition(a.x,a.y,x.x,x.y,!0),ut.x=x.x,ut.y=st.y):E===180&&x.x<a.x||E===0&&x.x>=a.x?(st.y=a.y>ot.bottom?this.computeMidOrthoPosition(a.x,a.y,x.x,ot.bottom,!0):a.y>ot.top&&(E===180&&a.x<ot.left||E===0&&a.x>ot.right)?this.computeMidOrthoPosition(a.x,a.y,x.x,x.y,!0):ot.top,ut.x=x.x,ut.y=st.y):E===270&&a.y>ot.bottom&&a.x>ot.left&&a.x<ot.right&&(st.x=a.x<x.x?Math.min(x.x,ot.left):Math.max(x.x,ot.right),st.y=a.y,ut.x=st.x)):(st.h(x.x,a.y),ut.h(x.x,(a.y+x.y)/2),(E===90||E===0&&x.x<rt.left||E===180&&x.x>rt.right)&&(E===90&&(ot.ca(a)||rt.ca(x))?st.x=this.computeMidOrthoPosition(a.x,a.y,x.x,x.y,!1):x.x<a.x&&(E===90||E===0)?st.x=this.computeMidOrthoPosition(rt.left,a.y,Math.max(x.x,ot.right),x.y,!1):x.x>a.x&&(E===90||E===180)&&(st.x=this.computeMidOrthoPosition(rt.right,a.y,Math.min(x.x,ot.left),x.y,!1)),ut.x=st.x,ut.y=x.y),st.x>rt.left&&st.x<rt.right&&(x.y<=rt.bottom&&x.y>=a.y||a.y>=ot.top&&a.y<=x.y?(E===0||E===180)&&(st.h(a.x,Math.min((a.y+x.y)/2,a.y)),ut.h(x.x,st.y)):(st.x=E===180||(E===90||E===270)&&x.x<a.x?Math.min(x.x,E===270?rt.left:Math.min(rt.left,ot.left)):Math.max(x.x,E===270?rt.right:Math.max(rt.right,ot.right)),ut.x=st.x,ut.y=x.y)));var ft=x;if(this.isAvoiding){var St=this.diagram;if(St===null||b===z||this.layer.isTemporary||!cf(St)||rt.ca(ft)&&!z.Td(b)||ot.ca(a)&&!b.Td(z))y=!1;else{var wt=oc(St,!0,this.containingGroup,null);if(this.segmentIndex!==17&&wt.Yj(Math.min(a.x,st.x),Math.min(a.y,st.y),Math.abs(a.x-st.x),Math.abs(a.y-st.y))&&wt.Yj(Math.min(st.x,ut.x),Math.min(st.y,ut.y),Math.abs(st.x-ut.x),Math.abs(st.y-ut.y))&&wt.Yj(Math.min(ut.x,ft.x),Math.min(ut.y,ft.y),Math.abs(ut.x-ft.x),Math.abs(ut.y-ft.y)))y=!1;else{b=a,z=ft;var Et=x=null;if(St.isVirtualized){St=wt.bounds.copy(),St.Bc(-wt.Ho,-wt.Go);var Bt=Gt.alloc();pp(wt,a.x,a.y)||(Se.Ff(St.x,St.y,St.x+St.width,St.y+St.height,a.x,a.y,st.x,st.y,Bt)?(x=a=Bt.copy(),y=Bt.ab(st)):Se.Ff(St.x,St.y,St.x+St.width,St.y+St.height,st.x,st.y,ut.x,ut.y,Bt)?(x=a=Bt.copy(),y=Bt.ab(ut)):Se.Ff(St.x,St.y,St.x+St.width,St.y+St.height,ut.x,ut.y,ft.x,ft.y,Bt)&&(x=a=Bt.copy(),y=Bt.ab(ft))),pp(wt,ft.x,ft.y)||(Se.Ff(St.x,St.y,St.x+St.width,St.y+St.height,ft.x,ft.y,ut.x,ut.y,Bt)?(Et=ft=Bt.copy(),E=ut.ab(Bt)):Se.Ff(St.x,St.y,St.x+St.width,St.y+St.height,ut.x,ut.y,st.x,st.y,Bt)?(Et=ft=Bt.copy(),E=st.ab(Bt)):Se.Ff(St.x,St.y,St.x+St.width,St.y+St.height,st.x,st.y,a.x,a.y,Bt)&&(Et=ft=Bt.copy(),E=a.ab(Bt))),Gt.free(Bt)}rt=rt.copy().ed(ot),rt.Bc(wt.Ho*wt.Os,wt.Go*wt.Os),aS(wt,a,y,ft,E,rt,!0),ot=oh(wt,ft.x,ft.y),!wt.abort&&ot>=mp&&(oS(wt),rt.Bc(wt.Ho*wt.Hx,wt.Go*wt.Ix),aS(wt,a,y,ft,E,rt,!1),ot=oh(wt,ft.x,ft.y)),!wt.abort&&ot<mp&&oh(wt,ft.x,ft.y)!==bd?(ry(this,wt,ft.x,ft.y,E,!0,tt),rt=this.i(2),4>this.pointsCount?(y===0||y===180?(rt.x=a.x,rt.y=ft.y):(rt.x=ft.x,rt.y=a.y),this.L(2,rt.x,rt.y),this.m(3,rt.x,rt.y)):(tt=this.i(3),y===0||y===180?Se.B(rt.x,tt.x)?(rt=y===0?Math.max(rt.x,a.x):Math.min(rt.x,a.x),this.L(2,rt,a.y),this.L(3,rt,tt.y)):Se.B(rt.y,tt.y)?(Math.abs(a.y-rt.y)<=wt.Go/2&&(this.L(2,rt.x,a.y),this.L(3,tt.x,a.y)),this.m(2,rt.x,a.y)):this.L(2,a.x,rt.y):(y===90||y===270)&&(Se.B(rt.y,tt.y)?(rt=y===90?Math.max(rt.y,a.y):Math.min(rt.y,a.y),this.L(2,a.x,rt),this.L(3,tt.x,rt)):Se.B(rt.x,tt.x)?(Math.abs(a.x-rt.x)<=wt.Ho/2&&(this.L(2,a.x,rt.y),this.L(3,a.x,tt.y)),this.m(2,a.x,rt.y)):this.L(2,rt.x,a.y))),x!==null&&(a=this.i(1),tt=this.i(2),a.x!==tt.x&&a.y!==tt.y?y===0||y===180?this.m(2,a.x,tt.y):this.m(2,tt.x,a.y):y===0||y===180?this.m(2,b.x,x.y):this.m(2,x.x,b.y)),Et!==null&&(E===0||E===180?this.yf(z.x,Et.y):this.yf(Et.x,z.y)),y=!0):y=!1}}}else y=!1;y||(this.ne(st.copy()),this.ne(ut.copy())),Gt.free(st),Gt.free(ut)}},En.prototype.computeMidOrthoPosition=function(a,y,x,E,b){var z=0;return!this.hasCurviness()||this.computeSpot(!0,this.fromPort).$c()||this.computeSpot(!1,this.toPort).$c()||(z=this.computeCurviness()),b?(y+E)/2+z:(a+x)/2+z};function iy(a){if(a.diagram===null||!a.isAvoiding||!cf(a.diagram))return!1;var y=a.points.s,x=y.length;if(4>x)return!1;a=oc(a.diagram,!0,a.containingGroup,null);for(var E=1;E<x-2;E++){var b=y[E],z=y[E+1];if(!a.Yj(Math.min(b.x,z.x),Math.min(b.y,z.y),Math.abs(b.x-z.x),Math.abs(b.y-z.y)))return!0}return!1}function ry(a,y,x,E,b,z,tt){var rt=y.Ho,ot=y.Go,st=oh(y,x,E),ut=x,ft=E;for(b===0?ut+=rt:b===90?ft+=ot:b===180?ut-=rt:ft-=ot,b!==tt&&st>wf&&oh(y,ut,ft)!==st-1&&(oh(y,x-rt,E)===st-1?(b=180,ut=x-rt,ft=E):oh(y,x+rt,E)===st-1?(b=0,ut=x+rt,ft=E):oh(y,x,E-ot)===st-1?(b=270,ut=x,ft=E-ot):oh(y,x,E+ot)===st-1&&(b=90,ut=x,ft=E+ot));st>wf&&oh(y,ut,ft)===st-1;)x=ut,E=ft,b===0?ut+=rt:b===90?ft+=ot:b===180?ut-=rt:ft-=ot,--st;z?st>wf&&(b===180||b===0?x=Math.floor(x/rt)*rt+rt/2:(b===90||b===270)&&(E=Math.floor(E/ot)*ot+ot/2)):(x=Math.floor(x/rt)*rt+rt/2,E=Math.floor(E/ot)*ot+ot/2),st>wf&&(z=b,tt=x,ut=E,b===0?(z=90,ut+=ot):b===90?(z=180,tt-=rt):b===180?(z=270,ut-=ot):b===270&&(z=0,tt+=rt),oh(y,tt,ut)===st-1?ry(a,y,tt,ut,z,!1,z):(tt=x,ut=E,b===0?(z=270,ut-=ot):b===90?(z=0,tt+=rt):b===180?(z=90,ut+=ot):b===270&&(z=180,tt-=rt),oh(y,tt,ut)===st-1&&ry(a,y,tt,ut,z,!1,z))),a.yf(x,E)}En.prototype.ez=function(a){var y=a.x;a=a.y;for(var x=this.i(0),E=this.i(1),b=si(y,a,x.x,x.y,E.x,E.y),z=0,tt=1;tt<this.pointsCount-1;tt++){x=this.i(tt+1);var rt=si(y,a,E.x,E.y,x.x,x.y);E=x,rt<b&&(z=tt,b=rt)}return z},En.prototype.qc=function(){this.lk=!1,this.v()},En.prototype.Ul=function(a){if(!(!a&&(this.fd===!1||(a=this.Pb(),this.lk&&(a===null||a.geometry!==null))))&&(2>this.pointsCount?this.lk=!0:this.ua=this.makeGeometry(),a=this.path,a!==null)){a.ua=this.ua;for(var y=this.O.s,x=y.length,E=0;E<x;E++){var b=y[E];b!==a&&b.isPanelMain&&b instanceof Ui&&(b.ua=this.ua)}}},En.prototype.makeGeometry=function(){var a=this.ua,y=this.pointsCount,x=!1,E=this.diagram;E!==null&&Pf(this)&&E.Eh.contains(this)&&(this.ml.width!==0||this.ml.height!==0)&&(E.animationManager.isAnimating||E.currentTool!==E.toolManager)&&(x=!0);var b=this.i(0).copy(),z=b.copy();E=this.Nb.s;var tt=this.computeCurve();if(tt===el&&3<=y&&!Se.$(this.smoothness,0))if(y===3){var rt=this.i(1);E=Math.min(b.x,rt.x);var ot=Math.min(b.y,rt.y);rt=this.i(2),E=Math.min(E,rt.x),ot=Math.min(ot,rt.y)}else{if(this.isOrthogonal)for(ot=0;ot<y;ot++)rt=E[ot],z.x=Math.min(rt.x,z.x),z.y=Math.min(rt.y,z.y);else for(E=3;E<y;E+=3)E+3>=y&&(E=y-1),ot=this.i(E),z.x=Math.min(ot.x,z.x),z.y=Math.min(ot.y,z.y);E=z.x,ot=z.y}else{for(ot=0;ot<y;ot++)rt=E[ot],z.x=Math.min(rt.x,z.x),z.y=Math.min(rt.y,z.y);E=z.x,ot=z.y}if(E-=this.su.x,ot-=this.su.y,b.x-=E,b.y-=ot,y!==2||Pf(this)){if(a.type=Fn.o,rt=k1(a),this.computeShortLength(!0)!==0&&(b=pg(this,b,!0,z)),dp(rt,b.x,b.y,!1),tt===el&&3<=y&&!Se.$(this.smoothness,0))if(y===3)x=this.i(1),y=x.x-E,x=x.y-ot,b=this.i(2).copy(),b.x-=E,b.y-=ot,this.computeShortLength(!1)!==0&&(b=pg(this,b,!1,z)),xd(rt,y,x,y,x,b.x,b.y);else if(this.isOrthogonal){y=Gt.allocAt(E,ot),x=Gt.alloc(),x.assign(this.i(1)),z=Gt.allocAt(E,ot),b=Gt.allocAt(E,ot),tt=this.i(0);for(var st,ut=this.smoothness/3,ft=1;ft<this.pointsCount-1;ft++){st=this.i(ft);var St=tt,wt=st,Et=this.i(oy(this,st,ft,!1));if((!Se.$(St.x,wt.x)||!Se.$(wt.x,Et.x))&&(!Se.$(St.y,wt.y)||!Se.$(wt.y,Et.y))){var Bt=ut;isNaN(Bt)&&(Bt=this.smoothness/3);var Vt=St.x;St=St.y;var jt=wt.x;wt=wt.y;var _t=Et.x;Et=Et.y;var Qt=Bt*S0(Vt,St,jt,wt);Bt*=S0(jt,wt,_t,Et),Se.$(St,wt)&&Se.$(jt,_t)&&(jt>Vt?Et>wt?(z.x=jt-Qt,z.y=wt-Qt,b.x=jt+Bt,b.y=wt+Bt):(z.x=jt-Qt,z.y=wt+Qt,b.x=jt+Bt,b.y=wt-Bt):Et>wt?(z.x=jt+Qt,z.y=wt-Qt,b.x=jt-Bt,b.y=wt+Bt):(z.x=jt+Qt,z.y=wt+Qt,b.x=jt-Bt,b.y=wt-Bt)),Se.$(Vt,jt)&&Se.$(wt,Et)&&(wt>St?(_t>jt?(z.x=jt-Qt,z.y=wt-Qt,b.x=jt+Bt):(z.x=jt+Qt,z.y=wt-Qt,b.x=jt-Bt),b.y=wt+Bt):(_t>jt?(z.x=jt-Qt,z.y=wt+Qt,b.x=jt+Bt):(z.x=jt+Qt,z.y=wt+Qt,b.x=jt-Bt),b.y=wt-Bt)),(Se.$(Vt,jt)&&Se.$(jt,_t)||Se.$(St,wt)&&Se.$(wt,Et))&&(Vt=.5*(Vt+_t),St=.5*(St+Et),z.x=Vt,z.y=St,b.x=Vt,b.y=St),(ft===1||ft===2&&Se.$(tt.x,this.i(0).x)&&Se.$(tt.y,this.i(0).y))&&(x.x=.5*(tt.x+st.x),x.y=.5*(tt.y+st.y)),xd(rt,x.x-E,x.y-ot,z.x-E,z.y-ot,st.x-E,st.y-ot),y.set(z),x.set(b),tt=st}}st=tt.x,tt=tt.y,ut=this.i(this.pointsCount-1),this.computeShortLength(!1)!==0&&(ut=pg(this,ut.copy(),!1,Fo)),st=.5*(st+ut.x),tt=.5*(tt+ut.y),xd(rt,b.x-E,b.y-ot,st-E,tt-ot,ut.x-E,ut.y-ot),Gt.free(y),Gt.free(x),Gt.free(z),Gt.free(b)}else for(x=3;x<y;x+=3)z=this.i(x-2),x+3>=y&&(x=y-1),b=this.i(x-1),tt=this.i(x),x===y-1&&this.computeShortLength(!1)!==0&&(tt=pg(this,tt.copy(),!1,Fo)),xd(rt,z.x-E,z.y-ot,b.x-E,b.y-ot,tt.x-E,tt.y-ot);else{for(z=Gt.alloc(),z.assign(this.i(0)),b=Gt.alloc(),b.assign(z),tt=this.computeCorner(),ft=1,st=0;ft<y;){if(ft=oy(this,z,ft,1<ft),ut=this.i(ft),ft>=y-1){if(!z.D(ut))this.computeShortLength(!1)!==0&&(ut=pg(this,ut.copy(),!1,Fo)),mg(this,rt,-E,-ot,z,ut,x);else if(st===0)for(ft=1;ft<y;)b.assign(z),ut=this.i(ft++),mg(this,rt,-E,-ot,z,ut,x),z.assign(ut);break}if(st=oy(this,ut,ft+1,ft<y-3),ft=-E,Vt=-ot,St=ut,jt=this.i(st),Bt=x,Se.B(z.y,St.y)&&Se.B(St.x,jt.x))if(Et=Math.min(tt,Math.abs(St.x-b.x)/2),Et=Qt=Math.min(Et,Math.abs(jt.y-St.y)/2),Se.B(Et,0))mg(this,rt,ft,Vt,z,St,Bt),z.assign(St);else{var ie=St.x,ce=St.y;wt=ie,_t=ce,St.x>z.x?ie=St.x-Et:ie=St.x+Et,jt.y>St.y?_t=St.y+Qt:_t=St.y-Qt,jt=Gt.allocAt(ie,ce),mg(this,rt,ft,Vt,z,jt,Bt),Gt.free(jt),u0(rt,St.x+ft,St.y+Vt,wt+ft,_t+Vt),z.h(wt,_t)}else Se.B(z.x,St.x)&&Se.B(St.y,jt.y)?(Et=Math.min(tt,Math.abs(St.y-b.y)/2),Et=Qt=Math.min(Et,Math.abs(jt.x-St.x)/2),Se.B(Qt,0)?(mg(this,rt,ft,Vt,z,St,Bt),z.assign(St)):(ie=St.x,ce=St.y,wt=ie,_t=ce,St.y>z.y?ce=St.y-Et:ce=St.y+Et,jt.x>St.x?wt=St.x+Qt:wt=St.x-Qt,jt=Gt.allocAt(ie,ce),mg(this,rt,ft,Vt,z,jt,Bt),Gt.free(jt),u0(rt,St.x+ft,St.y+Vt,wt+ft,_t+Vt),z.h(wt,_t))):(mg(this,rt,ft,Vt,z,St,Bt),z.assign(St));b.assign(ut),ft=st}Gt.free(z)}h0=rt}else rt=this.i(1).copy(),rt.x-=E,rt.y-=ot,this.computeShortLength(!0)!==0&&(b=pg(this,b,!0,z)),this.computeShortLength(!1)!==0&&(rt=pg(this,rt,!1,z)),a.type=Fn.j,a.startX=b.x,a.startY=b.y,a.endX=rt.x,a.endY=rt.y;return this.lk=!0,a};function S0(a,y,x,E){return a=x-a,isNaN(a)||a===1/0||a===-1/0?NaN:(0>a&&(a=-a),y=E-y,isNaN(y)||y===1/0||y===-1/0?NaN:(0>y&&(y=-y),Se.$(a,0)?y:Se.$(y,0)?a:Math.sqrt(a*a+y*y)))}function pg(a,y,x,E){var b=a.pointsCount;if(2>b)return y;if(x){var z=a.i(1);if(x=z.x-E.x,z=z.y-E.y,E=S0(y.x,y.y,x,z),E===0)return y;b=b===2?.5*E:E,a=a.computeShortLength(!0),a>b&&(a=b),b=a*(z-y.y)/E,y.x+=a*(x-y.x)/E,y.y+=b}else{if(z=a.i(b-2),x=z.x-E.x,z=z.y-E.y,E=S0(y.x,y.y,x,z),E===0)return y;b=b===2?.5*E:E,a=a.computeShortLength(!1),a>b&&(a=b),b=a*(y.y-z)/E,y.x-=a*(y.x-x)/E,y.y-=b}return y}function oy(a,y,x,E){for(var b=a.pointsCount,z=y;Se.$(y.x,z.x)&&Se.$(y.y,z.y);){if(x>=b)return b-1;z=a.i(x++)}if(!Se.$(y.x,z.x)&&!Se.$(y.y,z.y))return x-1;for(var tt=z;Se.$(y.x,z.x)&&Se.$(z.x,tt.x)&&(!E||(y.y>=z.y?z.y>=tt.y:z.y<=tt.y))||Se.$(y.y,z.y)&&Se.$(z.y,tt.y)&&(!E||(y.x>=z.x?z.x>=tt.x:z.x<=tt.x));){if(x>=b)return b-1;tt=a.i(x++)}return x-2}En.prototype.computeJumpLength=function(){return 10};function mg(a,y,x,E,b,z,tt){if(!tt&&Pf(a)){tt=a.computeJumpLength();var rt=tt/2,ot=[],st=0;if(a.isVisible()&&(st=bx(a,b,z,ot)),0<st){if(Se.B(b.y,z.y))if(b.x<z.x)for(var ut=0;ut<st;){var ft=Math.max(b.x,Math.min(ot[ut++]-rt,z.x-tt));y.lineTo(ft+x,z.y+E);for(var St=ft+x,wt=Math.min(ft+tt,z.x);ut<st&&(ft=ot[ut],ft<wt+tt);)ut++,wt=Math.min(ft+rt,z.x);ft=z.y-tt+E,wt+=x;var Et=z.y+E;a.curve===Ed?dp(y,wt,Et,!1):xd(y,St,ft,wt,ft,wt,Et)}else for(--st;0<=st;){for(ut=Math.min(b.x,Math.max(ot[st--]+rt,z.x+tt)),y.lineTo(ut+x,z.y+E),St=ut+x,ft=Math.max(ut-tt,z.x);0<=st&&(ut=ot[st],ut>ft-tt);)st--,ft=Math.max(ut-rt,z.x);ut=z.y-tt+E,ft+=x,wt=z.y+E,a.curve===Ed?dp(y,ft,wt,!1):xd(y,St,ut,ft,ut,ft,wt)}else if(Se.B(b.x,z.x))if(b.y<z.y)for(ut=0;ut<st;){for(ft=Math.max(b.y,Math.min(ot[ut++]-rt,z.y-tt)),y.lineTo(z.x+x,ft+E),St=ft+E,ft=Math.min(ft+tt,z.y);ut<st&&(wt=ot[ut],wt<ft+tt);)ut++,ft=Math.min(wt+rt,z.y);wt=z.x-tt+x,Et=z.x+x,ft+=E,a.curve===Ed?dp(y,Et,ft,!1):xd(y,wt,St,wt,ft,Et,ft)}else for(--st;0<=st;){for(ut=Math.min(b.y,Math.max(ot[st--]+rt,z.y+tt)),y.lineTo(z.x+x,ut+E),St=ut+E,ut=Math.max(ut-tt,z.y);0<=st&&(ft=ot[st],ft>ut-tt);)st--,ut=Math.max(ft-rt,z.y);ft=z.x-tt+x,wt=z.x+x,ut+=E,a.curve===Ed?dp(y,wt,ut,!1):xd(y,ft,St,ft,ut,wt,ut)}}}y.lineTo(z.x+x,z.y+E)}function bx(a,y,x,E){var b=a.diagram;if(b===null||y.D(x))return 0;for(b=b.layers;b.next();){var z=b.value;if(z!==null&&z.visible){z=z.Pa.s;for(var tt=z.length,rt=0;rt<tt;rt++){var ot=z[rt];if(ot instanceof En){if(ot===a)return 0<E.length&&E.sort(function(ut,ft){return ut-ft}),E.length;if(ot.isVisible()&&Pf(ot)){var st=ot.routeBounds;st.w()&&a.routeBounds.Yc(st)&&!a.usesSamePort(ot)&&(st=ot.path,st!==null&&st.Ed()&&Lx(y,x,E,ot))}}}}}return 0<E.length&&E.sort(function(ut,ft){return ut-ft}),E.length}function Lx(a,y,x,E){for(var b=Se.B(a.y,y.y),z=E.pointsCount,tt=E.i(0),rt=Gt.alloc(),ot=1;ot<z;ot++){var st=E.i(ot);if(ot<z-1){var ut=E.i(ot+1);if(tt.y===st.y&&st.y===ut.y){if(st.x>tt.x&&ut.x>=st.x||st.x<tt.x&&ut.x<=st.x)continue}else if(tt.x===st.x&&st.x===ut.x&&(st.y>tt.y&&ut.y>=st.y||st.y<tt.y&&ut.y<=st.y))continue}t:{ut=a.x;var ft=a.y,St=y.x,wt=y.y,Et=tt.x;tt=tt.y;var Bt=st.x,Vt=st.y;if(Se.B(ut,St)){if(!Se.B(ft,wt)&&Se.B(tt,Vt)&&Math.min(ft,wt)<tt&&Math.max(ft,wt)>tt&&Math.min(Et,Bt)<ut&&Math.max(Et,Bt)>ut&&!Se.B(Et,Bt)){rt.x=ut,rt.y=tt,ut=!0;break t}}else if(Se.B(ft,wt)&&Se.B(Et,Bt)&&Math.min(ut,St)<Et&&Math.max(ut,St)>Et&&Math.min(tt,Vt)<ft&&Math.max(tt,Vt)>ft&&!Se.B(tt,Vt)){rt.x=Et,rt.y=ft,ut=!0;break t}rt.x=0,rt.y=0,ut=!1}ut&&(b?x.push(rt.x):x.push(rt.y)),tt=st}Gt.free(rt)}function Pf(a){return a=a.curve,a===gp||a===Ed}function x0(a,y){(y||Pf(a))&&(y=a.diagram,y===null||y.animationManager.isTicking||y.Eh.contains(a)||a.ml.width===0&&a.ml.height===0||y.Eh.add(a,a.ml.copy()))}En.prototype.Xo=function(a){var y=this.layer;if(y!==null&&y.visible&&!y.isTemporary){var x=y.diagram;if(x!==null&&!x.animationManager.isTicking){var E=!1;for(x=x.layers;x.next();){var b=x.value;if(b.visible){if(b===y){E=!0;var z=!1;b=b.Pa.s;for(var tt=b.length,rt=0;rt<tt;rt++){var ot=b[rt];ot instanceof En&&(ot===this?z=!0:z&&eS(this,ot,a))}}else if(E)for(z=b.Pa.s,b=z.length,tt=0;tt<b;tt++)rt=z[tt],rt instanceof En&&eS(this,rt,a)}}}}};function eS(a,y,x){if(y!==null&&y.lk&&y.fd&&Pf(y)){var E=y.routeBounds;E.w()&&(a.routeBounds.Yc(E)||x.Yc(E))&&(a.usesSamePort(y)||y.qc())}}En.prototype.usesSamePort=function(a){var y=this.pointsCount,x=a.pointsCount;if(0<y&&0<x){var E=this.i(0),b=a.i(0);if(E.Xa(b)||(y=this.i(y-1),a=a.i(x-1),y.Xa(a)||E.Xa(a)||y.Xa(b)))return!0}else if(this.fromNode===a.fromNode||this.toNode===a.toNode||this.fromNode===a.toNode||this.toNode===a.fromNode)return!0;return!1},En.prototype.isVisible=function(){if(!mi.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 E=x;E!==null;){if(E.labeledLink===this)return!0;E=E.containingGroup}if(x=x.findVisibleNode(),x===null||x===a)return!1}if(x=this.toNode,x!==null){if(this.isTreeLink&&!y&&!x.isTreeExpanded)return!1;if(x===a)return!0;for(y=x;y!==null;){if(y.labeledLink===this)return!0;y=y.containingGroup}if(y=x.findVisibleNode(),y===null||y===a)return!1}return!0},En.prototype.Zb=function(a){if(mi.prototype.Zb.call(this,a),a&&x0(this,!1),this.Sf!==null&&this.Sf.Sl(),this.wd!==null)for(var y=this.wd.iterator;y.next();)y.value.Zb(a)},En.prototype.computeAdjusting=function(){return this.isAvoiding&&this.diagram!==null&&this.diagram.animationManager.defaultAnimation.isAnimating?tm:this.qk};function qp(a){var y=a.ef;if(y!==null){var x=a.uf;if(x!==null&&isNaN(a.curviness)){for(var E=a.ff,b=a.vf,z=a=null,tt=y.jb.s,rt=tt.length,ot=0;ot<rt;ot++){var st=tt[ot];(st.ef===y&&st.ff===E&&st.uf===x&&st.vf===b||st.ef===x&&st.ff===b&&st.uf===y&&st.vf===E)&&(z===null?z=st:(a===null&&(a=[],a.push(z)),a.push(st)))}if(a!==null){for(z=V1(y,x,E,b),z===null&&(z=new b0(y,E,x,b),W1(y,z),W1(x,z)),z.links=a,y=0;y<a.length;y++)a[y].Sf=z;z.Sl()}}}}function $p(a){var y=a.Sf;y!==null&&isNaN(a.curviness)&&(a.Sf=null,a=y.links.indexOf(a),0<=a&&(Li(y.links,a),y.Sl()))}En.prototype.ph=function(){return!0},we.Object.defineProperties(En.prototype,{fromNode:{get:function(){return this.ef},set:function(a){var y=this.ef;if(y!==a){var x=this.fromPort;y!==null&&(this.uf!==y&&g0(y,this,x),$p(this),this.C(2)),this.ef=a,a!==null&&this.Zb(a.isVisible()),this.Wf=null,this.bb();var E=this.diagram;E!==null&&E.aa&&E.partManager.setFromNodeForLink(this,a,y);var b=this.fromPort,z=this.fromPortChanged;if(z!==null){var tt=!0;E!==null&&(tt=E.aa,E.aa=!0),z(this,x,b),E!==null&&(E.aa=tt)}a!==null&&(this.uf!==a&&f0(a,this,b),qp(this),this.C(1)),this.g("fromNode",y,a),cp(this)}}},fromPortId:{get:function(){return this.ff},set:function(a){var y=this.ff;if(y!==a){var x=this.fromPort;x!==null&&Ws(x),$p(this),this.ff=a;var E=this.fromPort;E!==null&&Ws(E);var b=this.diagram;if(b!==null){var z=this.data,tt=b.model;z!==null&&tt.ri()&&tt.xv(z,a)}x!==E&&(this.Wf=null,this.bb(),z=this.fromPortChanged,z!==null&&(tt=!0,b!==null&&(tt=b.aa,b.aa=!0),z(this,x,E),b!==null&&(b.aa=tt))),qp(this),this.g("fromPortId",y,a)}}},fromPort:{get:function(){var a=this.ef;return a===null?null:a.ns(this.ff)}},fromPortChanged:{get:function(){return this.gn},set:function(a){var y=this.gn;y!==a&&(this.gn=a,this.g("fromPortChanged",y,a))}},toNode:{get:function(){return this.uf},set:function(a){var y=this.uf;if(y!==a){var x=this.toPort;y!==null&&(this.ef!==y&&g0(y,this,x),$p(this),this.C(2)),this.uf=a,a!==null&&this.Zb(a.isVisible()),this.Wf=null,this.bb();var E=this.diagram;E!==null&&E.aa&&E.partManager.setToNodeForLink(this,a,y);var b=this.toPort,z=this.toPortChanged;if(z!==null){var tt=!0;E!==null&&(tt=E.aa,E.aa=!0),z(this,x,b),E!==null&&(E.aa=tt)}a!==null&&(this.ef!==a&&f0(a,this,b),qp(this),this.C(1)),this.g("toNode",y,a),cp(this)}}},toPortId:{get:function(){return this.vf},set:function(a){var y=this.vf;if(y!==a){var x=this.toPort;x!==null&&Ws(x),$p(this),this.vf=a;var E=this.toPort;E!==null&&Ws(E);var b=this.diagram;if(b!==null){var z=this.data,tt=b.model;z!==null&&tt.ri()&&tt.Cv(z,a)}x!==E&&(this.Wf=null,this.bb(),z=this.toPortChanged,z!==null&&(tt=!0,b!==null&&(tt=b.aa,b.aa=!0),z(this,x,E),b!==null&&(b.aa=tt))),qp(this),this.g("toPortId",y,a)}}},toPort:{get:function(){var a=this.uf;return a===null?null:a.ns(this.vf)}},toPortChanged:{get:function(){return this.uo},set:function(a){var y=this.uo;y!==a&&(this.uo=a,this.g("toPortChanged",y,a))}},fromSpot:{get:function(){return this.ba!==null?this.ba.Xi:ha},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&&Ws(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&&gi(a,">= 0",En,"fromEndSegmentLength"),this.Xc(),this.ba.Vi=a,this.g("fromEndSegmentLength",y,a),this.bb())}},fromShortLength:{get:function(){return this.ba!==null?this.ba.Wi:NaN},set:function(a){var y=this.fromShortLength;y!==a&&(this.Xc(),this.ba.Wi=a,this.qc(),this.g("fromShortLength",y,a))}},toSpot:{get:function(){return this.ba!==null?this.ba.yj:ha},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&&Ws(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&&gi(a,">= 0",En,"toEndSegmentLength"),this.Xc(),this.ba.wj=a,this.g("toEndSegmentLength",y,a),this.bb())}},toShortLength:{get:function(){return this.ba!==null?this.ba.xj:NaN},set:function(a){var y=this.toShortLength;y!==a&&(this.Xc(),this.ba.xj=a,this.qc(),this.g("toShortLength",y,a))}},isLabeledLink:{get:function(){return this.wd===null?!1:0<this.wd.count}},labelNodes:{get:function(){return this.wd===null?vr:this.wd.iterator}},relinkableFrom:{get:function(){return(this.Qa&1)!==0},set:function(a){var y=(this.Qa&1)!==0;y!==a&&(this.Qa^=1,this.g("relinkableFrom",y,a),this.Wb())}},relinkableTo:{get:function(){return(this.Qa&2)!==0},set:function(a){var y=(this.Qa&2)!==0;y!==a&&(this.Qa^=2,this.g("relinkableTo",y,a),this.Wb())}},resegmentable:{get:function(){return(this.Qa&4)!==0},set:function(a){var y=(this.Qa&4)!==0;y!==a&&(this.Qa^=4,this.g("resegmentable",y,a),this.Wb())}},isTreeLink:{get:function(){return(this.Qa&8)!==0},set:function(a){var y=(this.Qa&8)!==0;y!==a&&(this.Qa^=8,this.g("isTreeLink",y,a),this.fromNode!==null&&Qp(this.fromNode),this.toNode!==null&&Qp(this.toNode))}},path:{get:function(){var a=this.Pb();return a instanceof Ui?a:null}},routeBounds:{get:function(){this.vg();var a=this.ml,y=1/0,x=1/0,E=this.pointsCount;if(E===0)a.h(NaN,NaN,0,0);else{if(E===1)E=this.i(0),y=Math.min(E.x,y),x=Math.min(E.y,x),a.h(E.x,E.y,0,0);else if(E===2){E=this.i(0);var b=this.i(1);y=Math.min(E.x,b.x),x=Math.min(E.y,b.y),a.h(E.x,E.y,0,0),a.Ye(b)}else if(this.computeCurve()===el&&3<=E&&!this.isOrthogonal)if(b=this.i(0),y=b.x,x=b.y,a.h(y,x,0,0),E===3){E=this.i(1),y=Math.min(E.x,y),x=Math.min(E.y,x);var z=this.i(2);y=Math.min(z.x,y),x=Math.min(z.y,x),Se.Dl(b.x,b.y,E.x,E.y,E.x,E.y,z.x,z.y,.5,a)}else for(z=3;z<E;z+=3){var tt=this.i(z-2);z+3>=E&&(z=E-1);var rt=this.i(z-1),ot=this.i(z);Se.Dl(b.x,b.y,tt.x,tt.y,rt.x,rt.y,ot.x,ot.y,.5,a),y=Math.min(ot.x,y),x=Math.min(ot.y,x),b=ot}else for(b=this.i(0),z=this.i(1),y=Math.min(b.x,z.x),x=Math.min(b.y,z.y),a.h(b.x,b.y,0,0),a.Ye(z),b=2;b<E;b++)z=this.i(b),y=Math.min(z.x,y),x=Math.min(z.y,x),a.Ye(z);this.su.h(y-a.x,x-a.y)}return a}},midPoint:{get:function(){return this.vg(),this.computeMidPoint(new Gt)}},midAngle:{get:function(){return this.vg(),this.computeMidAngle()}},flattenedLengths:{get:function(){if(this.cq===null){this.fd||m0(this);for(var a=this.cq=[],y=this.pointsCount,x=0;x<y-1;x++){var E=this.i(x),b=this.i(x+1);Se.$(E.x,b.x)?(E=b.y-E.y,0>E&&(E=-E)):Se.$(E.y,b.y)?(E=b.x-E.x,0>E&&(E=-E)):E=Math.sqrt(E.Bf(b)),a.push(E)}}return this.cq}},flattenedTotalLength:{get:function(){var a=this.vt;if(isNaN(a)){for(var y=this.flattenedLengths,x=y.length,E=a=0;E<x;E++)a+=y[E];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 E=a.length%2===0;if(E){for(var b=0;b<a.length;b++)if(typeof a[b]!="number"||isNaN(a[b])){E=!1;break}}if(E)for(x=new yn,E=0;E<a.length/2;E++)b=new Gt(a[2*E],a[2*E+1]).freeze(),x.add(b);else{for(E=!0,b=0;b<a.length;b++){var z=a[b];if(!bn(z)||typeof z.x!="number"||isNaN(z.x)||typeof z.y!="number"||isNaN(z.y)){E=!1;break}}if(E)for(x=new yn,E=0;E<a.length;E++)b=a[E],x.add(new Gt(b.x,b.y).freeze())}}else if(a instanceof yn)for(x=a.copy(),a=x.iterator;a.next();)a.value.freeze();else pe("Link.points value is not an instance of List or Array: "+a);x.freeze(),this.Nb=x,this.qc(),m0(this),a=this.diagram,a!==null&&(a.pi||a.undoManager.isUndoingRedoing||a.As.add(this),a.animationManager.zb&&$c(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||!fp(this.computeSpot(!0))?1:0}},lastPickIndex:{get:function(){var a=this.pointsCount;return a===0?0:2>=a?a-1:this.isOrthogonal||!fp(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(),x0(this,y===Ed||y===gp||a===Ed||a===gp),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(),x0(this,(y.value&2)===2||(a.value&2)===2),this.g("routing",y,a))}},smoothness:{get:function(){return this.po},set:function(a){var y=this.po;y!==a&&(this.po=a,this.qc(),this.g("smoothness",y,a))}},key:{get:function(){var a=this.diagram;if(a!==null&&a.model.ri())return a.model.Ac(this.data)}}}),En.prototype.invalidateOtherJumpOvers=En.prototype.Xo,En.prototype.findClosestSegment=En.prototype.ez,En.prototype.updateRoute=En.prototype.vg,En.prototype.invalidateRoute=En.prototype.bb,En.prototype.rollbackRoute=En.prototype.rv,En.prototype.commitRoute=En.prototype.zf,En.prototype.startRoute=En.prototype.uh,En.prototype.clearPoints=En.prototype.Fj,En.prototype.removePoint=En.prototype.pv,En.prototype.addPointAt=En.prototype.yf,En.prototype.addPoint=En.prototype.ne,En.prototype.insertPointAt=En.prototype.m,En.prototype.insertPoint=En.prototype.Kz,En.prototype.setPointAt=En.prototype.L,En.prototype.setPoint=En.prototype.dd,En.prototype.getPoint=En.prototype.i,En.prototype.getOtherPort=En.prototype.Cz,En.prototype.getOtherNode=En.prototype.To;var vg=null,yg=null,ay=new Je(En,"Normal",1),Mx=new Je(En,"Orthogonal",2),Ax=new Je(En,"AvoidsNodes",6),nS=new Je(En,"AvoidsNodesStraight",7),ns=new Je(En,"None",0),el=new Je(En,"Bezier",9),Ed=new Je(En,"JumpGap",10),gp=new Je(En,"JumpOver",11),tm=new Je(En,"End",17),P0=new Je(En,"Scale",18),w0=new Je(En,"Stretch",19),em=new Je(En,"OrientAlong",21),nm=new Je(En,"OrientPlus90",22),im=new Je(En,"OrientMinus90",23),sy=new Je(En,"OrientOpposite",24),C0=new Je(En,"OrientUpright",25),rm=new Je(En,"OrientPlus90Upright",26),om=new Je(En,"OrientMinus90Upright",27),E0=new Je(En,"OrientUpright45",28),iS=16,rS=14,am=8;En.className="Link",En.Normal=ay,En.Orthogonal=Mx,En.AvoidsNodes=Ax,En.AvoidsNodesStraight=nS,En.None=ns,En.Bezier=el,En.JumpGap=Ed,En.JumpOver=gp,En.End=tm,En.Scale=P0,En.Stretch=w0,En.OrientAlong=em,En.OrientPlus90=nm,En.OrientMinus90=im,En.OrientOpposite=sy,En.OrientUpright=C0,En.OrientPlus90Upright=rm,En.OrientMinus90Upright=om,En.OrientUpright45=E0,En.EndSegmentStep=8,En.CurvinessStart=iS,En.SpacingMin=rS,En.OrthoShortCut=am;function b0(a,y,x,E){Zr(this),this.Fe=this.qq=!1,this.Ds=a,this.Ox=y,this.cv=x,this.Px=E,this.links=[]}b0.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},b0.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))}},b0.className="LinkBundle";function sm(a){Zr(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}sm.prototype.initialize=function(a){if(!(0>=a.width||0>=a.height)){var y=a.y,x=a.x+a.width,E=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((E+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=[],E=0;E<=a;E++)x[E]=new Uint32Array(y);this.ac=x,this.di=a-1,this.ei=y-1}if(a=ly,this.ac!==null)for(y=0;y<=this.di;y++)if(x=this.ac[y],x.fill)x.fill(a);else for(E=0;E<=this.ei;E++)x[E]=a}};function pp(a,y,x){return a.Nd<=y&&y<=a.En&&a.Od<=x&&x<=a.Fn}function oh(a,y,x){return pp(a,y,x)?(y-=a.Nd,y/=a.rc,x-=a.Od,x/=a.sc,a.ac[y|0][x|0]):ly}function oS(a){if(a.ac!==null)for(var y=0;y<=a.di;y++)for(var x=a.ac[y],E=0;E<=a.ei;E++)x[E]>=wf&&(x[E]=ly)}sm.prototype.Yj=function(a,y,x,E){if(a>this.En||a+x<this.Nd||y>this.Fn||y+E<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 b=Math.max(0,E)/this.sc+1|0;if(0>a&&(x+=a,a=0),0>y&&(b+=y,y=0),0>x||0>b)return!0;for(E=Math.min(a+x-1,this.di)|0,x=Math.min(y+b-1,this.ei)|0;a<=E;a++){b=this.ac[a];for(var z=y;z<=x;z++)if(b[z]===bd)return!1}return!0};function ah(a,y,x,E,b,z,tt,rt,ot){if(!(y<z||y>tt||x<rt||x>ot)){var st=y|0,ut=x|0,ft=a.ac[st][ut];if(ft>=wf&&ft<mp)for(b?ut+=E:st+=E,ft+=1;z<=st&&st<=tt&&rt<=ut&&ut<=ot&&!(ft>=a.ac[st][ut]);)a.ac[st][ut]=ft,ft+=1,b?ut+=E:st+=E;if(st=b?ut:st,b)if(0<E)for(x+=E;x<st;x+=E)ah(a,y,x,1,!b,z,tt,rt,ot),ah(a,y,x,-1,!b,z,tt,rt,ot);else for(x+=E;x>st;x+=E)ah(a,y,x,1,!b,z,tt,rt,ot),ah(a,y,x,-1,!b,z,tt,rt,ot);else if(0<E)for(y+=E;y<st;y+=E)ah(a,y,x,1,!b,z,tt,rt,ot),ah(a,y,x,-1,!b,z,tt,rt,ot);else for(y+=E;y>st;y+=E)ah(a,y,x,1,!b,z,tt,rt,ot),ah(a,y,x,-1,!b,z,tt,rt,ot)}}function L0(a,y,x,E,b,z,tt,rt,ot){y|=0,x|=0;var st=bd,ut=wf;for(a.ac[y][x]=ut;st===bd&&y>z&&y<tt&&x>rt&&x<ot;)ut+=1,a.ac[y][x]=ut,b?x+=E:y+=E,st=a.ac[y][x]}function M0(a,y,x,E,b,z,tt,rt,ot){y|=0,x|=0;var st=bd,ut=mp;for(a.ac[y][x]=ut;st===bd&&y>z&&y<tt&&x>rt&&x<ot;)a.ac[y][x]=ut,b?x+=E:y+=E,st=a.ac[y][x]}function aS(a,y,x,E,b,z,tt){if(a.ac!==null){a.abort=!1;var rt=y.x,ot=y.y;if(pp(a,rt,ot)){rt-=a.Nd,rt/=a.rc,ot-=a.Od,ot/=a.sc;var st=E.x,ut=E.y;if(pp(a,st,ut))if(st-=a.Nd,st/=a.rc,ut-=a.Od,ut/=a.sc,1>=Math.abs(rt-st)&&1>=Math.abs(ot-ut))a.abort=!0;else{var ft=z.x;E=z.y,y=z.x+z.width;var St=z.y+z.height;ft-=a.Nd,ft/=a.rc,E-=a.Od,E/=a.sc,y-=a.Nd,y/=a.rc,St-=a.Od,St/=a.sc,z=Math.max(0,Math.min(a.di,ft|0)),y=Math.min(a.di,Math.max(0,y|0)),ft=Math.max(0,Math.min(a.ei,E|0)),St=Math.min(a.ei,Math.max(0,St|0)),E=a.ac,rt|=0,ot|=0,st|=0,ut|=0;var wt=x===0||x===90?1:-1;if(x=x===90||x===270,E[rt][ot]===bd?(L0(a,rt,ot,wt,x,z,y,ft,St),L0(a,rt,ot,1,!x,z,y,ft,St),L0(a,rt,ot,-1,!x,z,y,ft,St)):L0(a,rt,ot,wt,x,rt,ot,rt,ot),E[st][ut]===bd?(M0(a,st,ut,b===0||b===90?1:-1,b===90||b===270,z,y,ft,St),M0(a,st,ut,1,!(b===90||b===270),z,y,ft,St),M0(a,st,ut,-1,!(b===90||b===270),z,y,ft,St)):M0(a,st,ut,wt,x,st,ut,st,ut),x=Si(),tt&&sS(a,st,ut,b,rt,ot,x))for((x[0]!==st||x[1]!==ut)&&(x.unshift(ut),x.unshift(st)),(x[x.length-2]!==rt||x[x.length-1]!==ot)&&(x.push(rt),x.push(ot)),a=wf,b=x[x.length-2],tt=x[x.length-1],E[b][tt]=a++,z=x.length-4;0<=z;z-=2)for(b=x[z+2],tt=x[z+3],y=x[z],st=x[z+1];y>b?b++:y<b?b--:st>tt?tt++:st<tt&&tt--,E[b][tt]=a++,b!==y||tt!==st;);else ah(a,rt,ot,1,!1,z,y,ft,St),ah(a,rt,ot,-1,!1,z,y,ft,St),ah(a,rt,ot,1,!0,z,y,ft,St),ah(a,rt,ot,-1,!0,z,y,ft,St);wi(x)}}}}function sS(a,y,x,E,b,z,tt){for(var rt=a.ac,ot=y,st=x;;){if(ot===b&&st===z)return!0;var ut=ot,ft=st;if(E===0)if(ut<b)ut++;else break;else if(E===90)if(ft<z)ft++;else break;else if(E===180)if(ut>b)ut--;else break;else if(ft>z)ft--;else break;var St=rt[ut][ft];if(St===0||St===uy)break;ot=ut,st=ft}for(;;){if(ut=E,ft=ot,St=st,E===0?St<z?(ut=90,St++):St>z&&(ut=270,St--):E===90?ft<b?(ut=0,ft++):ft>b&&(ut=180,ft--):E===180?St<z?(ut=90,St++):St>z&&(ut=270,St--):ft<b?(ut=0,ft++):ft>b&&(ut=180,ft--),ft=rt[ft][St],ut!==E&&ft!==0&&ft!==uy){if(tt.push(ot),tt.push(st),sS(a,ot,st,ut,b,z,tt))return!0;tt.pop(),tt.pop()}if(rt[ot][st]=uy,E===0){if(ot===y)return!1;ot--}else if(E===90){if(st===x)return!1;st--}else if(E===180){if(ot===y)return!1;ot++}else{if(st===x)return!1;st++}}}we.Object.defineProperties(sm.prototype,{bounds:{get:function(){return new Ye(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 bd=0,wf=1,mp=999999,ly=mp+1,uy=mp+2;sm.className="PositionArray";function Sg(){Zr(this),this.port=this.node=null,this.pe=[],this.ap=!1}Sg.prototype.toString=function(){for(var a=this.pe,y=this.node.toString()+" "+a.length.toString()+":",x=0;x<a.length;x++){var E=a[x];E!==null&&(y+=`
`+E.toString())}return y};function Fx(a,y,x,E){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 E&&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}Sg.prototype.Sl=function(){this.pe.length=0};function lS(a,y){var x=a.pe;if(x.length===0){t:if(!a.ap){x=a.ap,a.ap=!0;var E=null,b=a.node,z=b instanceof Gi?b:null;if(z===null||z.isSubGraphExpanded)var tt=b.isTreeExpanded?b.findLinksConnected(a.port.portId):b.qx();else{if(!z.actualBounds.w()){a.ap=x;break t}E=z,tt=E.Lu()}z=a.pe.length=0;var rt=a.port.ga(wo,Gt.alloc()),ot=a.port.ga(Rs,Gt.alloc());for(b=Ye.allocAt(rt.x,rt.y,0,0),b.Ye(ot),Gt.free(rt),Gt.free(ot),rt=Gt.allocAt(b.x+b.width/2,b.y+b.height/2),ot=a.port.li(),tt=tt.iterator;tt.next();){var st=tt.value;if(st.isVisible()&&st.fromPort!==st.toPort){var ut=st.fromPort===a.port||st.fromNode!==null&&st.fromNode.Td(E),ft=st.computeSpot(ut,a.port);if(ft.$c()&&(ut=ut?st.toPort:st.fromPort,ut!==null)){var St=ut.part;if(St!==null){var wt=St.findVisibleNode();wt!==null&&wt!==St&&(St=wt,ut=St.port),ut=st.computeOtherPoint(St,ut),St=rt.ab(ut),St-=ot,0>St?St+=360:360<=St&&(St-=360),ft=Fx(b,ft,St,st.isOrthogonal),ft===0?(ft=4,180<St&&(St-=360)):ft===90?(ft=8,270<St&&(St-=360)):ft===180?ft=2:(ft=1,90>St&&(St+=360)),wt=a.pe[z],wt===void 0?(wt=new hy(st,St,ft),a.pe[z]=wt):(wt.link=st,wt.angle=St,wt.Nc=ft),wt.hv.set(ut),z++}}}}for(Gt.free(rt),a.pe.sort(Sg.prototype.j),ot=a.pe.length,E=-1,z=rt=0;z<ot;z++)tt=a.pe[z],tt!==void 0&&(tt.Nc!==E&&(E=tt.Nc,rt=0),tt.Uo=rt,rt++);for(E=-1,rt=0,z=ot-1;0<=z;z--)ot=a.pe[z],ot!==void 0&&(ot.Nc!==E&&(E=ot.Nc,rt=ot.Uo+1),ot.Gl=rt);if(z=a.pe,ft=a.port,E=a.node.portSpreading,rt=Gt.alloc(),ot=Gt.alloc(),tt=Gt.alloc(),st=Gt.alloc(),ft.ga(wo,rt),ft.ga(Xh,ot),ft.ga(Rs,tt),ft.ga(Ql,st),wt=St=ut=ft=0,E===$v)for(var Et=0;Et<z.length;Et++){var Bt=z[Et];if(Bt!==null){var Vt=Bt.link.computeThickness();switch(Bt.Nc){case 8:St+=Vt;break;case 2:wt+=Vt;break;case 1:ft+=Vt;break;default:case 4:ut+=Vt}}}var jt=Et=0,_t=1,Qt=Bt=0;for(Vt=0;Vt<z.length;Vt++){var ie=z[Vt];if(ie!==null){if(Et!==ie.Nc){switch(Et=ie.Nc,Et){case 8:var ce=tt;jt=st;break;case 2:ce=st,jt=rt;break;case 1:ce=rt,jt=ot;break;default:case 4:ce=ot,jt=tt}switch(Bt=jt.x-ce.x,Qt=jt.y-ce.y,Et){case 8:St>Math.abs(Bt)?(_t=Math.abs(Bt)/St,St=Math.abs(Bt)):_t=1;break;case 2:wt>Math.abs(Qt)?(_t=Math.abs(Qt)/wt,wt=Math.abs(Qt)):_t=1;break;case 1:ft>Math.abs(Bt)?(_t=Math.abs(Bt)/ft,ft=Math.abs(Bt)):_t=1;break;default:case 4:ut>Math.abs(Qt)?(_t=Math.abs(Qt)/ut,ut=Math.abs(Qt)):_t=1}jt=0}var ke=ie.Zo;if(E===$v){switch(ie=ie.link.computeThickness(),ie*=_t,ke.set(ce),Et){case 8:ke.x=ce.x+Bt/2+St/2-jt-ie/2;break;case 2:ke.y=ce.y+Qt/2+wt/2-jt-ie/2;break;case 1:ke.x=ce.x+Bt/2-ft/2+jt+ie/2;break;default:case 4:ke.y=ce.y+Qt/2-ut/2+jt+ie/2}jt+=ie}else{var On=.5;E===p0&&(On=(ie.Uo+1)/(ie.Gl+1)),ke.x=ce.x+Bt*On,ke.y=ce.y+Qt*On}}}for(Gt.free(rt),Gt.free(ot),Gt.free(tt),Gt.free(st),ce=a.pe,z=0;z<ce.length;z++)E=ce[z],E!==null&&(E.Ju=a.computeEndSegmentLength(E));a.ap=x,Ye.free(b)}x=a.pe}for(a=0;a<x.length;a++)if(b=x[a],b!==null&&b.link===y)return b;return null}Sg.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},Sg.prototype.computeEndSegmentLength=function(a){var y=a.link,x=y.computeEndSegmentLength(this.node,this.port,No,y.fromPort===this.port),E=a.Uo;if(0>E)return x;var b=a.Gl;if(1>=b||!y.isOrthogonal)return x;y=a.hv;var z=a.Zo;return(a.Nc===2||a.Nc===8)&&(E=b-1-E),((a=a.Nc===2||a.Nc===4)?y.y<z.y:y.x<z.x)?x+8*E:(a?y.y===z.y:y.x===z.x)?x:x+8*(b-1-E)},Sg.className="Knot";function hy(a,y,x){this.link=a,this.angle=y,this.Nc=x,this.hv=new Gt,this.Gl=this.Uo=0,this.Zo=new Gt,this.Ju=0}hy.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()},hy.className="LinkInfo";function ro(a){Zr(this),this.o=this.H=null,this.Gh=this.sn=!0,this.yn=!1,this.Am=new Gt(0,0).freeze(),this.vn=!0,this.Em=this.un=null,this.xn=!1,this.j=null,a&&Object.assign(this,a)}ro.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},ro.prototype.copy=function(){var a=new this.constructor;return this.cloneProtected(a),a},ro.prototype.qb=function(){},ro.prototype.toString=function(){var a=Mi(this.constructor);return a+="(",this.group!==null&&(a+=" in "+this.group),this.diagram!==null&&(a+=" for "+this.diagram),a+")"},ro.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())}}},ro.prototype.createNetwork=function(){return new _r(this)},ro.prototype.makeNetwork=function(a){var y=this.createNetwork();return a instanceof Be?(y.lg(a.nodes,!0),y.lg(a.links,!0)):a instanceof Gi?y.lg(a.memberParts):y.lg(a.iterator),y},ro.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")}},ro.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()}},ro.prototype.doLayout=function(a){var y=new mn;a instanceof Be?(pc(this,y,a.nodes,!0,this.rh,!0,!1,!0),pc(this,y,a.parts,!0,this.rh,!0,!1,!0)):a instanceof Gi?pc(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},ro.prototype.doMinimalNoNetworkLayout=function(a){var y=Math.ceil(Math.sqrt(a.count));this.arrangementOrigin=this.initialOrigin(this.arrangementOrigin);var x=this.arrangementOrigin.x,E=x,b=this.arrangementOrigin.y,z=0,tt=0;for(a=a.iterator;a.next();){var rt=a.value;lm(rt);var ot=rt.measuredBounds,st=ot.width;ot=ot.height,rt.moveTo(E,b),rt instanceof Gi&&(rt.rh=!1),E+=Math.max(st,50)+20,tt=Math.max(tt,Math.max(ot,50)),z>=y-1?(z=0,E=x,b+=tt+20,tt=0):z++}},ro.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,E=this.arrangementOrigin.y,b=0,z=0,tt=this.network.vertexes.iterator;tt.next();){var rt=tt.value.node;if(!(rt===null||rt instanceof En)&&(lm(rt),this.rh(rt))){var ot=rt.measuredBounds,st=ot.width;ot=ot.height,rt.moveTo(x,E),rt instanceof Gi&&(rt.rh=!1),x+=Math.max(st,50)+20,z=Math.max(z,Math.max(ot,50)),b>=a-1?(b=0,x=y,E+=z+20,z=0):b++}}},ro.prototype.rh=function(a){return!!(!a.location.w()||a instanceof Gi&&a.rh)};function pc(a,y,x,E,b,z,tt,rt){for(x=x.iterator;x.next();){var ot=x.value;E&&!ot.isTopLevel||b!==null&&!b(ot)||!ot.canLayout()||(z&&ot instanceof Vn?ot.isLinkLabel||(ot instanceof Gi&&ot.layout===null?pc(a,y,ot.memberParts,!1,b,z,tt,rt):(lm(ot),y.add(ot))):tt&&ot instanceof En?y.add(ot):!rt||!ot.Zc()||ot instanceof Vn||(lm(ot),y.add(ot)))}}function lm(a){var y=a.actualBounds;(y.width===0||y.height===0||isNaN(y.width)||isNaN(y.height))&&a.Va()}ro.prototype.ni=function(a,y){var x=this.boundsComputation;return x!==null?(y||(y=new Ye),x(a,this,y)):y?(y.set(a.actualBounds),y):a.actualBounds},ro.prototype.ex=function(a){var y=new mn;return a instanceof Be?(pc(this,y,a.nodes,!0,null,!0,!0,!0),pc(this,y,a.links,!0,null,!0,!0,!0),pc(this,y,a.parts,!0,null,!0,!0,!0)):a instanceof Gi?pc(this,y,a.memberParts,!1,null,!0,!0,!0):pc(this,y,a.iterator,!1,null,!0,!0,!0),y},ro.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(wo),(isNaN(x.x)||isNaN(x.y))&&x.set(a),a=y.padding,x.x+=a.left,x.y+=a.top),x}return a},we.Object.defineProperties(ro.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())}}}),ro.prototype.collectParts=ro.prototype.ex,ro.prototype.getLayoutBounds=ro.prototype.ni,ro.prototype.invalidateLayout=ro.prototype.C,ro.className="Layout";function _r(a){Zr(this),this.Sc=a,this.wf=new mn,this.ye=new mn,this.Es=new yi,this.zs=new yi}_r.prototype.clear=function(){if(this.wf)for(var a=this.wf.iterator;a.next();)a.value.clear();if(this.ye)for(a=this.ye.iterator;a.next();)a.value.clear();this.wf=new mn,this.ye=new mn,this.Es=new yi,this.zs=new yi},_r.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},_r.prototype.createVertex=function(){return new _o(this)},_r.prototype.createEdge=function(){return new Vs(this)},_r.prototype.lg=function(a,y,x){if(a!==null){for(y===void 0&&(y=!1),x===void 0&&(x=null),x===null&&(x=function(tt){if(tt instanceof Vn)return!tt.isLinkLabel;if(tt instanceof En){var rt=tt.fromNode;return rt===null||rt.isLinkLabel?!1:(tt=tt.toNode,!(tt===null||tt.isLinkLabel))}return!1}),a=a.iterator;a.next();){var E=a.value;if(E instanceof Vn&&(!y||E.isTopLevel)&&E.canLayout()&&x(E)){if(E instanceof Gi&&E.layout===null)this.lg(E.memberParts,!1);else if(this.ki(E)===null){var b=this.createVertex();b.node=E,this.dh(b)}}}for(a.reset();a.next();)if(E=a.value,E instanceof En&&(!y||E.isTopLevel)&&E.canLayout()&&x(E)&&this.Lo(E)===null){var z=E.fromNode;b=E.toNode,z!==null&&b!==null&&z!==b&&(z=this.findGroupVertex(z),b=this.findGroupVertex(b),z!==null&&b!==null&&this.Zj(z,b,E))}}},_r.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},Ct=_r.prototype,Ct.dh=function(a){if(a!==null){this.wf.add(a);var y=a.node;y!==null&&this.Es.add(y,a),a.network=this}},Ct.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},Ct.Iu=function(a){if(a!==null&&uS(this,a)){for(var y=a.tg,x=y.count-1;0<=x;x--){var E=y.M(x);this.Mj(E)}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}Ct.Zy=function(a){a!==null&&(a=this.ki(a),a!==null&&this.Iu(a))},Ct.ki=function(a){return a===null?null:this.Es.I(a)},Ct.Bo=function(a){if(a!==null){dy(this,a);var y=a.toVertex;y!==null&&y.Cl(a),y=a.fromVertex,y!==null&&y.zl(a)}};function dy(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}}Ct.Dy=function(a){if(a===null)return null;var y=a.fromNode,x=a.toNode,E=this.Lo(a);return E===null?(E=this.createEdge(),E.link=a,y!==null&&(E.fromVertex=this.Bl(y)),x!==null&&(E.toVertex=this.Bl(x)),this.Bo(E)):(y!==null?E.fromVertex=this.Bl(y):E.fromVertex=null,x!==null?E.toVertex=this.Bl(x):E.toVertex=null),E},Ct.Mj=function(a){if(a!==null){var y=a.toVertex;y!==null&&y.Kl(a),y=a.fromVertex,y!==null&&y.Jl(a),cy(this,a)}};function cy(a,y){y!==null&&a.ye.remove(y)&&(y=y.link,y!==null&&a.zs.remove(y))}Ct.Yy=function(a){a!==null&&(a=this.Lo(a),a!==null&&this.Mj(a))},Ct.Lo=function(a){return a===null?null:this.zs.I(a)},Ct.Zj=function(a,y,x){if(a===null||y===null)return null;if(a.network===this&&y.network===this){var E=this.createEdge();return E.link=x,E.fromVertex=a,E.toVertex=y,this.Bo(E),E}return null},Ct.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))}},Ct.Ko=function(){for(var a=Si(),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]);wi(a)},_r.prototype.deleteArtificialVertexes=function(){for(var a=Si(),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=Si(),x=this.ye.iterator;x.next();){var E=x.value;E.link===null&&E.data===null&&y.push(E)}for(x=y.length,E=0;E<x;E++)this.Mj(y[E]);wi(a),wi(y)};function Bx(a){for(var y=Si(),x=a.ye.iterator;x.next();){var E=x.value;E.fromVertex!==null&&E.toVertex!==null||y.push(E)}for(x=y.length,E=0;E<x;E++)a.Mj(y[E]);wi(y)}_r.prototype.Zx=function(a){a===void 0&&(a=!0),a&&(this.deleteArtificialVertexes(),Bx(this),this.Ko()),a=new yn;for(var y=!0;y;){y=!1;for(var x=this.wf.iterator;x.next();){var E=x.value;if(0<E.tg.count||0<E.mg.count){y=this.layout.createNetwork(),a.add(y),fy(this,y,E),y=!0;break}}}return a.sort(function(b,z){return b===null||z===null||b===z?0:z.vertexes.count-b.vertexes.count}),a};function fy(a,y,x){if(x!==null&&x.network!==y){uS(a,x),y.dh(x);for(var E=x.sourceEdges;E.next();){var b=E.value;b.network!==y&&(cy(a,b),dy(y,b),fy(a,y,b.fromVertex))}for(E=x.destinationEdges;E.next();)x=E.value,x.network!==y&&(cy(a,x),dy(y,x),fy(a,y,x.toVertex))}}_r.prototype.dz=function(){for(var a=new mn,y=this.wf.iterator;y.next();)a.add(y.value.node);for(y=this.ye.iterator;y.next();)a.add(y.value.link);return a},we.Object.defineProperties(_r.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}}}),_r.prototype.findAllParts=_r.prototype.dz,_r.prototype.splitIntoSubNetworks=_r.prototype.Zx,_r.prototype.deleteSelfEdges=_r.prototype.Ko,_r.prototype.reverseEdge=_r.prototype.gm,_r.prototype.linkVertexes=_r.prototype.Zj,_r.prototype.findEdge=_r.prototype.Lo,_r.prototype.deleteLink=_r.prototype.Yy,_r.prototype.deleteEdge=_r.prototype.Mj,_r.prototype.addLink=_r.prototype.Dy,_r.prototype.addEdge=_r.prototype.Bo,_r.prototype.findVertex=_r.prototype.ki,_r.prototype.deleteNode=_r.prototype.Zy,_r.prototype.deleteVertex=_r.prototype.Iu,_r.prototype.addNode=_r.prototype.Bl,_r.prototype.addVertex=_r.prototype.dh,_r.prototype.addParts=_r.prototype.lg,_r.className="LayoutNetwork";function _o(a){Zr(this),this.ob=a,this.j=new Ye(0,0,10,10).freeze(),this.o=new Gt(5,5).freeze(),this.Sh=this.ub=null,this.tg=new yn,this.mg=new yn}_o.prototype.clear=function(){this.Sh=this.ub=null,this.tg=new yn,this.mg=new yn},_o.prototype.toString=function(a){a===void 0&&(a=0);var y="LayoutVertex#"+Cr(this);if(0<a&&(y+=this.node!==null?"("+this.node.toString()+")":"",1<a)){a="";for(var x=!0,E=this.tg.iterator;E.next();){var b=E.value;x?x=!1:a+=",",a+=b.toString(0)}for(b="",x=!0,E=this.mg.iterator;E.next();){var z=E.value;x?x=!1:b+=",",b+=z.toString(0)}y+=" sources: "+a+" destinations: "+b}return y},_o.prototype.commit=function(){var a=this.ub;if(a!==null){var y=this.bounds,x=a.bounds;bn(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 Gi)){x=Ye.alloc(),a.Va();var E=this.network.layout.ni(a,x),b=a.locationObject.ga(Br);if(E.w()&&b.w()){a.moveTo(y.x+this.focusX-(b.x-E.x),y.y+this.focusY-(b.y-E.y)),Ye.free(x);return}Ye.free(x)}a.moveTo(y.x,y.y)}},_o.prototype.Cl=function(a){a!==null&&(this.tg.contains(a)||this.tg.add(a))},_o.prototype.Kl=function(a){a!==null&&this.tg.remove(a)},_o.prototype.zl=function(a){a!==null&&(this.mg.contains(a)||this.mg.add(a))},_o.prototype.Jl=function(a){a!==null&&this.mg.remove(a)};function gy(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}we.Object.defineProperties(_o.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,E=y.width;y=y.height,this.o.h(E/2,y/2),this.j.h(a,x,E,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=Ye.alloc(),E=y.ni(a,x);y=E.x;var b=E.y,z=E.width;if(E=E.height,isNaN(y)&&(y=0),isNaN(b)&&(b=0),this.j.h(y,b,z,E),Ye.free(x),!(a instanceof Gi)&&(a=a.locationObject.ga(Br),a.w())){this.o.h(a.x-y,a.y-b);return}this.o.h(z/2,E/2)}}},bounds:{get:function(){return this.j},set:function(a){this.j.D(a)||this.j.assign(a)}},focus:{get:function(){return this.o},set:function(a){this.o.D(a)||this.o.assign(a)}},centerX:{get:function(){return this.j.x+this.o.x},set:function(a){var y=this.j;y.x+this.o.x!==a&&(y.ka(),y.x=a-this.o.x,y.freeze())}},centerY:{get:function(){return this.j.y+this.o.y},set:function(a){var y=this.j;y.y+this.o.y!==a&&(y.ka(),y.y=a-this.o.y,y.freeze())}},focusX:{get:function(){return this.o.x},set:function(a){var y=this.o;y.x!==a&&(y.ka(),y.x=a,y.freeze())}},focusY:{get:function(){return this.o.y},set:function(a){var y=this.o;y.y!==a&&(y.ka(),y.y=a,y.freeze())}},x:{get:function(){return this.j.x},set:function(a){var y=this.j;y.x!==a&&(y.ka(),y.x=a,y.freeze())}},y:{get:function(){return this.j.y},set:function(a){var y=this.j;y.y!==a&&(y.ka(),y.y=a,y.freeze())}},width:{get:function(){return this.j.width},set:function(a){var y=this.j;y.width!==a&&(y.ka(),y.width=a,y.freeze())}},height:{get:function(){return this.j.height},set:function(a){var y=this.j;y.height!==a&&(y.ka(),y.height=a,y.freeze())}},network:{get:function(){return this.ob},set:function(a){this.ob=a}},sourceVertexes:{get:function(){for(var a=new mn,y=this.sourceEdges;y.next();)a.add(y.value.fromVertex);return a.iterator}},destinationVertexes:{get:function(){for(var a=new mn,y=this.destinationEdges;y.next();)a.add(y.value.toVertex);return a.iterator}},vertexes:{get:function(){for(var a=new mn,y=this.sourceEdges;y.next();)a.add(y.value.fromVertex);for(y=this.destinationEdges;y.next();)a.add(y.value.toVertex);return a.iterator}},sourceEdges:{get:function(){return this.tg.iterator}},destinationEdges:{get:function(){return this.mg.iterator}},edges:{get:function(){for(var a=new yn,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}}}),_o.prototype.deleteDestinationEdge=_o.prototype.Jl,_o.prototype.addDestinationEdge=_o.prototype.zl,_o.prototype.deleteSourceEdge=_o.prototype.Kl,_o.prototype.addSourceEdge=_o.prototype.Cl,_o.className="LayoutVertex",_o.standardComparer=gy,_o.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 E=parseFloat(y[x]),b=parseFloat(a[x]);if(isNaN(E))if(isNaN(b)){if(y[x].localeCompare(a[x])!==0)return y[x].localeCompare(a[x])}else return 1;else{if(isNaN(b))return-1;if(E-b!==0)return E-b}}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 Vs(a){Zr(this),this.nb=a,this.qd=this.kd=this.$k=this.ub=null}Vs.prototype.clear=function(){this.qd=this.kd=this.$k=this.ub=null},Vs.prototype.toString=function(a){a===void 0&&(a=0);var y="LayoutEdge#"+Cr(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},Vs.prototype.gm=function(){var a=this.kd;this.kd=this.qd,this.qd=a},Vs.prototype.commit=function(){},Vs.prototype.Ax=function(a){return this.qd===a?this.kd:this.kd===a?this.qd:null},we.Object.defineProperties(Vs.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)}}}),Vs.prototype.getOtherVertex=Vs.prototype.Ax,Vs.className="LayoutEdge";function pa(a){ro.call(this),this.isViewportSized=!0,this.yo=this.zo=NaN,this.yg=new Re(NaN,NaN).freeze(),this.tf=new Re(10,10).freeze(),this.Jb=um,this.Rb=F0,this.nd=hm,this.hd=hS,a&&Object.assign(this,a)}Ce(pa,ro),pa.prototype.cloneProtected=function(a){ro.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},pa.prototype.qb=function(a){a.classType===pa?a===hm||a===k0||a===py||a===B0?this.sorting=a:a===F0||a===cu?this.arrangement=a:a===um||a===A0?this.alignment=a:pe("Unknown enum value: "+a):ro.prototype.qb.call(this,a)},pa.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 E=x.value;if(!E.ph()||E.fromNode===null&&E.toNode===null){if(E.Va(),E instanceof Gi)for(E=E.memberParts;E.next();)y.remove(E.value)}else y.remove(E)}var b=y.Fa();if(b.length!==0){switch(this.sorting){case B0:b.reverse();break;case hm:b.sort(this.comparer);break;case k0:b.sort(this.comparer),b.reverse()}var z=this.wrappingColumn;isNaN(z)&&(z=0);var tt=this.wrappingWidth;switch(isNaN(tt)&&a!==null?(y=a.padding,tt=Math.max(a.viewportBounds.width-y.left-y.right,0)):tt=Math.max(this.wrappingWidth,0),0>=z&&0>=tt&&(z=1),y=this.spacing.width,isFinite(y)||(y=0),x=this.spacing.height,isFinite(x)||(x=0),a!==null&&a.Ea("Layout"),E=[],this.alignment){case A0:var rt=y,ot=x,st=Ye.alloc(),ut=Math.max(this.cellSize.width,1);if(!isFinite(ut))for(var ft=ut=0;ft<b.length;ft++){var St=this.ni(b[ft],st);ut=Math.max(ut,St.width)}if(ut=Math.max(ut+rt,1),ft=Math.max(this.cellSize.height,1),!isFinite(ft))for(St=ft=0;St<b.length;St++){var wt=this.ni(b[St],st);ft=Math.max(ft,wt.height)}ft=Math.max(ft+ot,1),St=this.arrangement;for(var Et=wt=this.arrangementOrigin.x,Bt=this.arrangementOrigin.y,Vt=0,jt=0,_t=0;_t<b.length;_t++){var Qt=b[_t],ie=this.ni(Qt,st),ce=Math.ceil((ie.width+rt)/ut)*ut,ke=Math.ceil((ie.height+ot)/ft)*ft;switch(St){case cu:var On=Math.abs(Et-ie.width);break;default:On=Et+ie.width}switch((0<z&&Vt>z-1||0<tt&&0<Vt&&On-wt>tt)&&(E.push(new Ye(0,Bt,tt+rt,jt)),Vt=0,Et=wt,Bt+=jt,jt=0),jt=Math.max(jt,ke),St){case cu:ie=-ie.width;break;default:ie=0}switch(Qt.moveTo(Et+ie,Bt),St){case cu:Et-=ce;break;default:Et+=ce}Vt++}E.push(new Ye(0,Bt,tt+rt,jt)),Ye.free(st);break;case um:for(ot=tt,ut=z,ft=y,St=x,tt=Ye.alloc(),wt=Math.max(this.cellSize.width,1),z=Bt=st=0,rt=Gt.alloc(),Et=0;Et<b.length;Et++)jt=b[Et],Vt=this.ni(jt,tt),jt=Pd(jt,jt.locationObject,jt.locationSpot,rt),st=Math.max(st,jt.x),Bt=Math.max(Bt,Vt.width-jt.x),z=Math.max(z,jt.y);switch(Et=this.arrangement,Et){case cu:st+=ft;break;default:Bt+=ft}wt=isFinite(wt)?Math.max(wt+ft,1):Math.max(st+Bt,1);var ri=jt=this.arrangementOrigin.x;for(_t=this.arrangementOrigin.y,Bt=0,ot>=st&&(ot-=st),st=Qt=0,ce=Math.max(this.cellSize.height,1),ie=z=0,ke=!0,Vt=Gt.alloc(),On=0;On<b.length;On++){var qn=b[On],wn=this.ni(qn,tt),tn=Pd(qn,qn.locationObject,qn.locationSpot,rt);if(0<Bt)switch(Et){case cu:ri=(ri-jt-(wn.width-tn.x))/wt,ri=Se.$(Math.round(ri),ri)?Math.round(ri):Math.floor(ri),ri=ri*wt+jt;break;default:ri=(ri-jt+tn.x)/wt,ri=Se.$(Math.round(ri),ri)?Math.round(ri):Math.ceil(ri),ri=ri*wt+jt}else switch(Et){case cu:Qt=ri+tn.x+wn.width;break;default:Qt=ri-tn.x}switch(Et){case cu:var ji=-(ri+tn.x)+Qt;break;default:ji=ri+wn.width-tn.x-Qt}if(0<ut&&Bt>ut-1||0<ot&&0<Bt&&ji>ot){for(E.push(new Ye(0,ke?_t-z:_t,ot+ft,ie+z+St)),ri=0;ri<Bt&&On!==Bt;ri++){ji=b[On-Bt+ri];var Fi=Pd(ji,ji.locationObject,ji.locationSpot,Vt);ji.moveTo(ji.position.x,ji.position.y+z-Fi.y)}ie+=St,_t=ke?_t+ie:_t+(ie+z),Bt=ie=z=0,ri=jt,ke=!1}switch(ri===jt&&(st=Et===cu?Math.max(st,wn.width-tn.x):Math.min(st,-tn.x)),z=Math.max(z,tn.y),ie=Math.max(ie,wn.height-tn.y),isFinite(ce)&&(ie=Math.max(ie,Math.max(wn.height,ce)-tn.y)),ke?qn.moveTo(ri-tn.x,_t-tn.y):qn.moveTo(ri-tn.x,_t),Et){case cu:ri-=tn.x+ft;break;default:ri+=wn.width-tn.x+ft}Bt++}if(E.push(new Ye(0,_t,ot+ft,(ke?ie:ie+z)+St)),b.length!==Bt)for(ot=0;ot<Bt;ot++)ut=b[b.length-Bt+ot],ft=Pd(ut,ut.locationObject,ut.locationSpot,rt),ut.moveTo(ut.position.x,ut.position.y+z-ft.y);if(Gt.free(rt),Gt.free(Vt),Et===cu)for(b=0;b<E.length;b++)z=E[b],z.width+=st,z.x-=st;else for(b=0;b<E.length;b++)z=E[b],z.x>st&&(z.width+=z.x-st,z.x=st);Ye.free(tt)}for(rt=z=tt=b=0;rt<E.length;rt++)ot=E[rt],b=Math.min(b,ot.x),tt=Math.min(tt,ot.y),z=Math.max(z,ot.x+ot.width);this.arrangement===cu?this.commitLayers(E,new Gt(b+y/2-(z+b),tt-x/2)):this.commitLayers(E,new Gt(b-y/2,tt-x/2)),a!==null&&a.eb("Layout"),this.isValidLayout=!0}},pa.prototype.commitLayers=function(){};function hS(a,y){return a=a.text,y=y.text,a<y?-1:a>y?1:0}we.Object.defineProperties(pa.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!==um&&a!==A0||(this.Jb=a,this.C())}},arrangement:{get:function(){return this.Rb},set:function(a){this.Rb===a||a!==F0&&a!==cu||(this.Rb=a,this.C())}},sorting:{get:function(){return this.nd},set:function(a){this.nd===a||a!==py&&a!==B0&&a!==hm&&a!==k0||(this.nd=a,this.C())}},comparer:{get:function(){return this.hd},set:function(a){this.hd!==a&&(this.hd=a,this.C())}}});var A0=new Je(pa,"Position",0),um=new Je(pa,"Location",1),F0=new Je(pa,"LeftToRight",2),cu=new Je(pa,"RightToLeft",3),py=new Je(pa,"Forward",4),B0=new Je(pa,"Reverse",5),hm=new Je(pa,"Ascending",6),k0=new Je(pa,"Descending",7);pa.className="GridLayout",pa.standardComparer=hS,pa.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 E=parseFloat(a[x]),b=parseFloat(y[x]);if(isNaN(E))if(isNaN(b)){if(a[x].localeCompare(y[x])!==0)return a[x].localeCompare(y[x])}else return 1;else{if(isNaN(b))return-1;if(E-b!==0)return E-b}}else if(a[x]!=="")return 1;return y[x]!==""&&y[x]!==void 0?-1:0}return 1}return y!==null?-1:0},pa.Position=A0,pa.Location=um,pa.LeftToRight=F0,pa.RightToLeft=cu,pa.Forward=py,pa.Reverse=B0,pa.Ascending=hm,pa.Descending=k0;function jr(){this.On=new mn,this.Dn=new mn,this.Pa=new mn,this.cf=new yi,this.bf=new yi,this.aj=new yi,this.H=null,this.tp=!1}Ct=jr.prototype,Ct.clear=function(){this.On.clear(),this.Dn.clear(),this.Pa.clear(),this.cf.clear(),this.bf.clear(),this.aj.clear()},Ct.Xe=function(a){this.H=a},Ct.oi=function(a){if(a instanceof Vn){if(this.On.add(a),a instanceof Gi){var y=a.containingGroup;y===null?this.H.ai.add(a):y.gl.add(a),y=a.layout,y!==null&&(y.diagram=this.H)}}else a instanceof En?this.Dn.add(a):a instanceof Pr||this.Pa.add(a);y=a.data,y===null||a instanceof Pr||(a instanceof En?this.bf.add(y,a):this.cf.add(y,a))},Ct.pc=function(a){if(a.Ej(),a instanceof Vn){if(this.On.remove(a),a instanceof Gi){var y=a.containingGroup;y===null?this.H.ai.remove(a):y.gl.remove(a),y=a.layout,y!==null&&(y.diagram=null)}}else a instanceof En?this.Dn.remove(a):a instanceof Pr||this.Pa.remove(a);y=a.data,y===null||a instanceof Pr||(a instanceof En?this.bf.remove(y):this.cf.remove(y))},Ct.Wd=function(){var a=this.H;if(a!==null){for(var y=a.nodeTemplateMap.iterator;y.next();){var x=y.value,E=y.key;(!x.Zc()||x instanceof Gi)&&pe('Invalid node template in Diagram.nodeTemplateMap: template for "'+E+'" must be a Node or a simple Part, not a Group or Link: '+x)}for(y=a.groupTemplateMap.iterator;y.next();)x=y.value,E=y.key,x instanceof Gi||pe('Invalid group template in Diagram.groupTemplateMap: template for "'+E+'" must be a Group, not a normal Node or Link: '+x);for(y=a.linkTemplateMap.iterator;y.next();)x=y.value,E=y.key,x instanceof En||pe('Invalid link template in Diagram.linkTemplateMap: template for "'+E+'" must be a Link, not a normal Node or simple Part: '+x);for(y=Si(),x=a.selection.iterator;x.next();)(E=x.value.data)&&y.push(E);for(x=Si(),a=a.highlighteds.iterator;a.next();)(E=a.value.data)&&x.push(E);for(a=Si(),E=this.nodes.iterator;E.next();){var b=E.value;b.data!==null&&(a.push(b.data),a.push(b.location))}for(E=this.links.iterator;E.next();)b=E.value,b.data!==null&&(a.push(b.data),a.push(b.location));for(E=this.parts.iterator;E.next();)b=E.value,b.data!==null&&(a.push(b.data),a.push(b.location));for(this.removeAllModeledParts(),this.addAllModeledParts(),E=0;E<y.length;E++)b=this.Lc(y[E]),b!==null&&(b.isSelected=!0);for(E=0;E<x.length;E++)b=this.Lc(x[E]),b!==null&&(b.isHighlighted=!0);for(E=0;E<a.length;E+=2)b=this.Lc(a[E]),b!==null&&(b.location=a[E+1]);wi(y),wi(x),wi(a)}},jr.prototype.addAllModeledParts=function(){this.addModeledParts(this.diagram.model.nodeDataArray)},jr.prototype.addModeledParts=function(a,y){var x=this,E=this.diagram.model;a.forEach(function(b){E.lb(b)&&dS(x,b,!1)}),a.forEach(function(b){E.lb(b)&&x.resolveReferencesForData(b)}),y!==!1&&Bh(this.diagram,!1)};function dS(a,y,x){if(y!=null&&!a.diagram.undoManager.isUndoingRedoing&&!a.cf.contains(y)){x===void 0&&(x=!0);t:{if(y!=null&&!a.H.undoManager.isUndoingRedoing&&!a.cf.contains(y)){var E=a.Ro(y),b=cS(a,y,E);if(b!==null&&(Ll(b),b=b.copy(),b!==null)){var z=a.diagram.skipsModelSourceBindings;a.diagram.skipsModelSourceBindings=!0,b.Tf=E,b.ub=y,a.tp&&(b.Jg="Tool"),a.diagram.add(b),b.ub=null,b.data=y,a.diagram.skipsModelSourceBindings=z,E=b;break t}}E=null}E!==null&&x&&a.resolveReferencesForData(y)}}jr.prototype.insertLink=function(){return null},jr.prototype.resolveReferencesForData=function(){},jr.prototype.Ro=function(a){return this.H.model.Ro(a)};function cS(a,y,x){a=a.H;var E=a.model;return E.Xj()&&E.Yu(y)?(y=a.groupTemplateMap.I(x),y===null&&(y=a.groupTemplateMap.I(""),y===null&&(pS||(pS=!0,Oi('No Group template found for category "'+x+'"'),Oi(" Using default group template")),y=a.ly))):(y=a.nodeTemplateMap.I(x),y===null&&(y=a.nodeTemplateMap.I(""),y===null&&(gS||(gS=!0,Oi('No Node template found for category "'+x+'"'),Oi(" Using default node template")),y=a.ny))),y}jr.prototype.getLinkCategoryForData=function(){return""},jr.prototype.setLinkCategoryForData=function(){},jr.prototype.setFromNodeForLink=function(){},jr.prototype.setToNodeForLink=function(){},jr.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,Oi('No Link template found for category "'+a+'"'),Oi(" Using default link template")),x=y.my)),x},jr.prototype.removeAllModeledParts=function(){this.Gs(this.diagram.model.nodeDataArray)},jr.prototype.Gs=function(a){var y=this;a.forEach(function(x){y.ip(x)})},jr.prototype.ip=function(a){a=this.Lc(a),a!==null&&(Yf(this.diagram,a,!1),this.unresolveReferencesForPart(a))},jr.prototype.unresolveReferencesForPart=function(){},jr.prototype.removeDataForLink=function(){},jr.prototype.findPartForKey=function(a){return a==null?null:(a=this.H.model.hc(a),a!==null?this.cf.I(a):null)},jr.prototype.Vb=function(a){return a==null||(a=this.H.model.hc(a),a===null)?null:(a=this.cf.I(a),a instanceof Vn?a:null)},jr.prototype.findLinkForKey=function(){return null},Ct=jr.prototype,Ct.Lc=function(a){if(a===null)return null;var y=this.cf.I(a);return y!==null?y:y=this.bf.I(a)},Ct.ii=function(a){return a===null?null:(a=this.cf.I(a),a instanceof Vn?a:null)},Ct.Kc=function(a){return a===null?null:this.bf.I(a)},Ct.ms=function(a){for(var y=0;y<arguments.length;++y);y=new mn;for(var x=this.On.iterator;x.next();){var E=x.value,b=E.data;if(b!==null)for(var z=0;z<arguments.length;z++){var tt=arguments[z];if(bn(tt)&&my(this,b,tt)){y.add(E);break}}}return y.iterator},Ct.ls=function(a){for(var y=0;y<arguments.length;++y);y=new mn;for(var x=this.Dn.iterator;x.next();){var E=x.value,b=E.data;if(b!==null)for(var z=0;z<arguments.length;z++){var tt=arguments[z];if(bn(tt)&&my(this,b,tt)){y.add(E);break}}}return y.iterator};function my(a,y,x){for(var E in x){var b=y[E],z=x[E];if(Mn(z)){if(!Mn(b)||b.length<z.length)return!1;for(var tt=0;tt<b.length;tt++){var rt=z[tt];if(rt!==void 0&&!fS(a,b[tt],rt))return!1}}else if(!fS(a,b,z))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(bn(y)&&bn(x)){if(!my(a,y,x))return!1}else if(y!==x)return!1;return!0}jr.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 E=a.modelChange;if(E!=="")if(x===io){if(E==="nodeCategory"){var b=this.Lc(a.object),z=a.newValue;b!==null&&typeof z=="string"&&(b.category=z)}else E==="nodeDataArray"&&(this.Gs(a.oldValue),this.addModeledParts(a.newValue));y.isModified=!0}else if(x===Eo){var tt=a.newValue;E==="nodeDataArray"&&bn(tt)&&dS(this,tt),y.isModified=!0}else if(x===zo){var rt=a.oldValue;E==="nodeDataArray"&&bn(rt)&&this.ip(rt),y.isModified=!0}else x===hs&&(E==="SourceChanged"?a.object!==null?this.updateDataBindings(a.object,a.propertyName):(this.rp(),this.updateAllTargetBindings()):E==="ModelDisplaced"&&this.Wd());else if(x===io){var ot=a.propertyName,st=a.object;st===y.model?(ot==="nodeKeyProperty"||ot==="nodeCategoryProperty")&&(y.undoManager.isUndoingRedoing||this.Wd()):this.updateDataBindings(st,ot),y.isModified=!0}else if(x===Eo||x===zo){var ut=a.change===Eo,ft=ut?a.newParam:a.oldParam,St=ut?a.newValue:a.oldValue,wt=this.aj.I(a.object);if(Array.isArray(wt))for(a=0;a<wt.length;a++){var Et=wt[a];if(ut)Jm(Et,St,ft,!0);else if(!(0>ft)){var Bt=ft+Kp(Et);Et.pc(Bt,!0),Bv(Et,Bt,ft)}}y.isModified=!0}}finally{y.aa=!0}}}}},jr.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)},jr.prototype.rp=function(){for(var a=this.H.model,y=new mn,x=a.nodeDataArray,E=0;E<x.length;E++)y.add(x[E]);var b=[];for(this.nodes.each(function(tt){tt.data===null||y.contains(tt.data)||b.push(tt.data)}),this.parts.each(function(tt){tt.data===null||y.contains(tt.data)||b.push(tt.data)}),b.forEach(function(tt){bS(a,tt,!1)}),E=0;E<x.length;E++){var z=x[E];this.Lc(z)===null&&ES(a,z,!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()},jr.prototype.refreshDataBoundLinks=function(){},jr.prototype.updateRelationshipsFromData=function(){},jr.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 E=this.aj.iterator;E.next();){for(var b=E.value,z=0;z<b.length;z++){var tt=b[z].sx(a);tt!==null&&(x===null&&(x=Si()),x.push(tt))}if(x!==null)break}if(x!==null){for(E=0;E<x.length;E++)x[E].La(y);wi(x)}}a===this.diagram.model.modelData&&this.updateAllTargetBindings(y)}};function vy(a,y){var x=y.Hh;if(Mn(x)){var E=a.aj.I(x);if(E===null)E=[],E.push(y),a.aj.add(x,E);else{for(a=0;a<E.length;a++)if(E[a]===y)return;E.push(y)}}}function yy(a,y,x){vf(y,function(tt){tt=tt.O.s;for(var rt=tt.length,ot=0;ot<rt;ot++)$f(x,tt[ot])});var E=y.Hh;if(Mn(E)){var b=a.aj.I(E);if(b!==null){for(var z=0;z<b.length;z++)if(b[z]===y){b.splice(z,1),b.length===0&&a.aj.remove(E);break}}}}jr.prototype.Kj=function(a,y,x){x===void 0&&(x=!1);var E=new yi;if(Mn(a))for(var b=0;b<a.length;b++)N0(this,a[b],y,E,x);else for(a=a.iterator;a.next();)N0(this,a.value,y,E,x);if(y!==null){x=y.model,a=y.toolManager.findTool("Dragging"),a=a!==null?a.dragOptions.dragsLink:y.Wm.dragsLink,b=new mn;for(var z=new yi,tt=E.iterator;tt.next();){var rt=tt.value;if(rt instanceof En)a||rt.fromNode!==null&&rt.toNode!==null||b.add(rt);else if(rt instanceof Vn&&rt.data!==null&&x.Tl()){var ot=rt;rt=tt.key;var st=rt.pg();st!==null&&(st=E.I(st),st!==null?(x.qe(ot.data,x.wa(st.data)),ot=y.Kc(ot.data),rt=rt.kh(),rt!==null&&ot!==null&&z.add(rt,ot)):x.qe(ot.data,void 0))}}if(0<b.count&&y.Is(b,!1),0<z.count)for(x=z.iterator;x.next();)E.add(x.key,x.value)}if(y!==null&&this.H!==null&&(y=y.model,x=y.afterCopyFunction,x!==null)){var ut=new yi;E.each(function(ft){ft.key.data!==null&&ut.add(ft.key.data,ft.value.data)}),x(ut,y,this.H.model)}for(y=E.iterator;y.next();)y.value.La();return E};function N0(a,y,x,E,b){if(y===null||b&&!y.canCopy())return null;if(E.contains(y))return E.I(y);var z=a.copyPartData(y,x);if(!(z instanceof mi))return null;if(z.isSelected=!1,z.isHighlighted=!1,E.add(y,z),y instanceof Vn){for(var tt=y.linksConnected;tt.next();){var rt=tt.value;if(rt.fromNode===y){var ot=E.I(rt);ot!==null&&(ot.fromNode=z)}rt.toNode===y&&(rt=E.I(rt),rt!==null&&(rt.toNode=z))}if(y instanceof Gi&&z instanceof Gi)for(y=y.memberParts;y.next();)tt=N0(a,y.value,x,E,b),tt instanceof En||tt===null||(tt.containingGroup=z)}else if(y instanceof En&&z instanceof En)for(tt=y.fromNode,tt!==null&&(tt=E.I(tt),tt!==null&&(z.fromNode=tt)),tt=y.toNode,tt!==null&&(tt=E.I(tt),tt!==null&&(z.toNode=tt)),y=y.labelNodes;y.next();)tt=N0(a,y.value,x,E,b),tt!==null&&tt instanceof Vn&&(tt.labeledLink=z);return z}jr.prototype.copyPartData=function(a,y){var x=null,E=a.data;if(E!==null&&y!==null){var b=y.model;a instanceof En||(E=b.copyNodeData(E),bn(E)&&(b.xf(E),x=y.Lc(E)))}else Ll(a),x=a.copy(),x!==null&&(b=this.H,y!==null?y.add(x):E!==null&&b!==null&&b.commandHandler!==null&&b.commandHandler.copiesClipboardData&&(y=b.model,b=null,x instanceof En||(b=y.copyNodeData(E)),bn(b)&&(x.data=b)));return x},we.Object.defineProperties(jr.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}}}),jr.prototype.updateAllRelationshipsFromData=jr.prototype.rp,jr.prototype.findLinksByExample=jr.prototype.ls,jr.prototype.findNodesByExample=jr.prototype.ms,jr.prototype.findLinkForData=jr.prototype.Kc,jr.prototype.findNodeForData=jr.prototype.ii,jr.prototype.findPartForData=jr.prototype.Lc,jr.prototype.findNodeForKey=jr.prototype.Vb,jr.prototype.removeModeledPart=jr.prototype.ip,jr.prototype.removeModeledParts=jr.prototype.Gs,jr.prototype.rebuildParts=jr.prototype.Wd;var gS=!1,pS=!1,mS=!1;jr.className="PartManager";function oa(a){jr.apply(this,arguments)}Ce(oa,jr),oa.prototype.addAllModeledParts=function(){var a=this.diagram.model;this.addModeledParts(a.nodeDataArray),vS(this,a.linkDataArray)},oa.prototype.addModeledParts=function(a){for(jr.prototype.addModeledParts.call(this,a,!1),a=this.links.iterator;a.next();)cp(a.value);Bh(this.diagram,!1)};function vS(a,y){y.forEach(function(x){yS(a,x)}),Bh(a.diagram,!1)}function yS(a,y){if(y!=null&&!a.diagram.undoManager.isUndoingRedoing&&!a.bf.contains(y)){var x=a.getLinkCategoryForData(y),E=a.findLinkTemplateForCategory(x);if(E!==null){Ll(E);var b=E.copy();if(b!==null){E=a.diagram.skipsModelSourceBindings,a.diagram.skipsModelSourceBindings=!0,b.Tf=x,b.ub=y,x=a.diagram.model;var z=O0(x,y,!0);z!==""&&(b.fromPortId=z),z=nl(x,y,!0),z!==void 0&&(z=a.Vb(z),z instanceof Vn&&(b.fromNode=z)),z=O0(x,y,!1),z!==""&&(b.toPortId=z),z=nl(x,y,!1),z!==void 0&&(z=a.Vb(z),z instanceof Vn&&(b.toNode=z)),x=x.Ef(y),Array.isArray(x)&&x.forEach(function(tt){tt=a.Vb(tt),tt!==null&&(tt.labeledLink=b)}),a.tp&&(b.Jg="Tool"),a.diagram.add(b),b.ub=null,b.data=y,a.diagram.skipsModelSourceBindings=E}}}}oa.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)})}oa.prototype.getLinkCategoryForData=function(a){return this.diagram.model.ps(a)},oa.prototype.setLinkCategoryForData=function(a,y){return this.diagram.model.lp(a,y)},oa.prototype.setFromNodeForLink=function(a,y){var x=this.diagram.model;x.wv(a.data,x.wa(y!==null?y.data:null))},oa.prototype.setToNodeForLink=function(a,y){var x=this.diagram.model;x.Bv(a.data,x.wa(y!==null?y.data:null))},oa.prototype.removeDataForLink=function(a){this.diagram.model.bm(a.data)},oa.prototype.findPartForKey=function(a){var y=jr.prototype.findPartForKey.call(this,a);return y===null&&(a=this.diagram.model.jh(a),a!==null)?this.bf.I(a):y},oa.prototype.findLinkForKey=function(a){return a==null?null:(a=this.diagram.model.jh(a),a!==null?this.bf.I(a):null)},oa.prototype.doModelChanged=function(a){var y=this;if(jr.prototype.doModelChanged.call(this,a),this.diagram){var x=this.diagram;if(a.model===x.model){var E=a.change;if(x.aa){x.aa=!1;try{var b=a.modelChange;if(b!==""){if(E===io){if(b==="linkFromKey"){var z=this.Kc(a.object);if(z!==null){var tt=this.Vb(a.newValue);z.fromNode=tt}}else if(b==="linkToKey"){var rt=this.Kc(a.object);if(rt!==null){var ot=this.Vb(a.newValue);rt.toNode=ot}}else if(b==="linkFromPortId"){var st=this.Kc(a.object);if(st!==null){var ut=a.newValue;typeof ut=="string"&&(st.fromPortId=ut)}}else if(b==="linkToPortId"){var ft=this.Kc(a.object);if(ft!==null){var St=a.newValue;typeof St=="string"&&(ft.toPortId=St)}}else if(b==="nodeGroupKey"){var wt=this.Lc(a.object);if(wt!==null){var Et=a.newValue;if(Et!==void 0){var Bt=this.Vb(Et);Bt instanceof Gi?wt.containingGroup=Bt:wt.containingGroup=null}else wt.containingGroup=null}}else if(b==="linkLabelKeys"){var Vt=this.Kc(a.object);if(Vt!==null){var jt=a.oldValue,_t=a.newValue;Array.isArray(jt)&&jt.forEach(function(tn){0<=_t.indexOf(tn)||(tn=y.Vb(tn),tn!==null&&(tn.labeledLink=null))}),Array.isArray(_t)&&_t.forEach(function(tn){tn=y.Vb(tn),tn!==null&&(tn.labeledLink=Vt)})}}else if(b==="linkCategory"){var Qt=this.Kc(a.object),ie=a.newValue;Qt!==null&&typeof ie=="string"&&(Qt.category=ie)}else b==="linkDataArray"&&(SS(this,a.oldValue),vS(this,a.newValue));x.isModified=!0}else if(E===Eo){var ce=a.newValue;if(b==="linkDataArray"&&typeof ce=="object"&&ce!==null)yS(this,ce);else if(b==="linkLabelKeys"&&vc(ce)){var ke=this.Kc(a.object),On=this.Vb(ce);ke!==null&&On!==null&&(On.labeledLink=ke)}x.isModified=!0}else if(E===zo){var ri=a.oldValue;if(b==="linkDataArray"&&typeof ri=="object"&&ri!==null)this.ip(ri);else if(b==="linkLabelKeys"&&vc(ri)){var qn=this.Vb(ri);qn!==null&&(qn.labeledLink=null)}x.isModified=!0}}else if(E===io){var wn=a.propertyName;a.object!==x.model||wn!=="linkFromKeyProperty"&&wn!=="linkToKeyProperty"&&wn!=="linkFromPortIdProperty"&&wn!=="linkToPortIdProperty"&&wn!=="linkLabelKeysProperty"&&wn!=="nodeIsGroupProperty"&&wn!=="nodeGroupKeyProperty"&&wn!=="linkCategoryProperty"||x.undoManager.isUndoingRedoing||this.Wd(),x.isModified=!0}}finally{x.aa=!0}}}}},oa.prototype.refreshDataBoundLinks=function(){var a=this,y=this.diagram.model,x=new mn,E=y.linkDataArray;E.forEach(function(z){x.add(z)});var b=[];this.links.each(function(z){z.data===null||x.contains(z.data)||b.push(z.data)}),b.forEach(function(z){kS(y,z,!1)}),E.forEach(function(z){a.Kc(z)===null&&BS(y,z,!1)})},oa.prototype.updateRelationshipsFromData=function(a){var y=a.data;if(y!==null){var x=a.diagram;if(x!==null){var E=x.model;if(a instanceof En){var b=nl(E,y,!0);if(b=x.Vb(b),a.fromNode=b,b=nl(E,y,!1),b=x.Vb(b),a.toNode=b,y=E.Ef(y),0<y.length||0<a.labelNodes.count){if(y.length===1&&a.labelNodes.count===1){b=y[0];var z=a.labelNodes.first();if(E.wa(z.data)===b)return}b=new mn().addAll(y);var tt=new mn;a.labelNodes.each(function(rt){rt.data!==null&&(rt=E.wa(rt.data),rt!==void 0&&tt.add(rt))}),y=tt.copy(),y.hp(b),b=b.copy(),b.hp(tt),(0<y.count||0<b.count)&&(y.each(function(rt){rt=x.Vb(rt),rt!==null&&rt.labeledLink===a&&(rt.labeledLink=null)}),b.each(function(rt){rt=x.Vb(rt),rt!==null&&rt.labeledLink!==a&&(rt.labeledLink=a)}))}}else!(a instanceof Pr)&&(y=E.lh(y),y=x.findPartForKey(y),y===null||y instanceof Gi)&&(a.containingGroup=y)}}},oa.prototype.resolveReferencesForData=function(a){var y=this.diagram.model,x=y.wa(a);if(x!==void 0){var E=dm(y,x),b=this.Lc(a);if(E!==null&&b!==null){E=E.iterator;for(var z={};E.next();){var tt=E.value;y.lb(tt)?b instanceof Gi&&y.lh(tt)===x&&(tt=this.Lc(tt),tt!==null&&(tt.containingGroup=b)):(z.link=this.Kc(tt),z.link!==null&&b instanceof Vn&&(nl(y,tt,!0)===x&&(z.link.fromNode=b),nl(y,tt,!1)===x&&(z.link.toNode=b),tt=y.Ef(tt),Array.isArray(tt)&&tt.some(function(rt){return function(ot){return ot===x?(b.labeledLink=rt.link,!0):!1}}(z)))),z={link:z.link}}gu(y,x)}a=y.lh(a),a!==void 0&&(a=this.Vb(a),a instanceof Gi&&(b.containingGroup=a))}},oa.prototype.unresolveReferencesForPart=function(a){var y=this.diagram.model;if(a instanceof Vn){var x=y.wa(a.data);if(x!==void 0){for(var E=a.linksConnected;E.next();)fu(y,x,E.value.data);if(a.isLinkLabel&&(E=a.labeledLink,E!==null&&fu(y,x,E.data)),a instanceof Gi)for(a=a.memberParts;a.next();)E=a.value.data,y.lb(E)&&fu(y,x,E)}}},oa.prototype.copyPartData=function(a,y){var x=jr.prototype.copyPartData.call(this,a,y);if(a instanceof En)if(a=a.data,a!==null&&y!==null){var E=y.model;a=E.Jo(a),typeof a=="object"&&a!==null&&(E.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},oa.prototype.insertLink=function(a,y,x,E){var b=this.diagram,z=b.model,tt=b.toolManager.findTool("Linking"),rt="";if(a!==null&&(y===null&&(y=a),rt=y.portId,rt===null&&(rt="")),y="",x!==null&&(E===null&&(E=x),y=E.portId,y===null&&(y="")),E=tt.archetypeLinkData,E instanceof En){if(Ll(E),z=E.copy(),z!==null)return z.fromNode=a,z.fromPortId=rt,z.toNode=x,z.toPortId=y,b.add(z),a=tt.archetypeLabelNodeData,a instanceof Vn&&(Ll(a),a=a.copy(),a!==null&&(a.labeledLink=z,b.add(a))),z}else if(E!==null&&(E=z.Jo(E),typeof E=="object"&&E!==null))return a!==null&&yp(z,E,z.wa(a.data),!0),Sp(z,E,rt,!0),x!==null&&yp(z,E,z.wa(x.data),!1),Sp(z,E,y,!1),z.fi(E),a=tt.archetypeLabelNodeData,a===null||a instanceof Vn||(a=z.copyNodeData(a),typeof a=="object"&&a!==null&&(z.xf(a),a=z.wa(a),a!==void 0&&z.Bu(E,a))),b.Kc(E);return null},oa.prototype.findLinkForKey=oa.prototype.findLinkForKey,oa.prototype.findPartForKey=oa.prototype.findPartForKey,oa.prototype.removeAllModeledParts=oa.prototype.removeAllModeledParts,oa.prototype.addModeledParts=oa.prototype.addModeledParts,oa.prototype.addAllModeledParts=oa.prototype.addAllModeledParts,oa.className="GraphLinksPartManager";function gl(){jr.apply(this,arguments),this.Sg=null}Ce(gl,jr);function D0(a,y,x){if(y!==null&&x!==null&&x.kh()===null){var E=a.diagram.toolManager.findTool("Linking"),b=y,z=x;if(a.diagram.isTreePathToChildren||(b=x,z=y),(E===null||!Oa(E,b,z,null,!0))&&(y=a.getLinkCategoryForData(x.data),E=a.findLinkTemplateForCategory(y),E!==null&&(Ll(E),E=E.copy(),E!==null))){var tt=a.diagram.skipsModelSourceBindings;a.diagram.skipsModelSourceBindings=!0,E.Tf=y,E.ub=x.data,E.fromNode=b,E.toNode=z,a.diagram.add(E),E.ub=null,E.data=x.data,a.diagram.skipsModelSourceBindings=tt}}}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 E=this.diagram.model;if(x===void 0&&(x=null),y=y!==null?y.data:null,this.diagram.isTreePathToChildren)E.qe(a.data,E.wa(y));else{var b=this.Sg;this.Sg=a,x!==null&&E.qe(x.data,void 0),E.qe(y,E.wa(a.toNode!==null?a.toNode.data:null)),this.Sg=b}},gl.prototype.setToNodeForLink=function(a,y,x){var E=this.diagram.model;if(x===void 0&&(x=null),y=y!==null?y.data:null,this.diagram.isTreePathToChildren){var b=this.Sg;this.Sg=a,x!==null&&E.qe(x.data,void 0),E.qe(y,E.wa(a.fromNode!==null?a.fromNode.data:null)),this.Sg=b}else E.qe(a.data,E.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(jr.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 E=a.modelChange;if(E!==""){if(x===io){if(E==="nodeParentKey"){var b=a.object,z=this.Vb(a.newValue),tt=this.ii(b);if(this.Sg!==null)z!==null&&(this.Sg.data=b,this.Sg.category=this.getLinkCategoryForData(b));else if(tt!==null){var rt=tt.kh();rt!==null?z===null?y.remove(rt):y.isTreePathToChildren?rt.fromNode=z:rt.toNode=z:D0(this,z,tt)}}else if(E==="parentLinkCategory"){var ot=this.ii(a.object),st=a.newValue;if(ot!==null&&typeof st=="string"){var ut=ot.kh();ut!==null&&(ut.category=st)}}y.isModified=!0}}else if(x===io){var ft=a.propertyName;a.object===y.model&&ft==="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 E=x.model;a instanceof Vn&&(y=E.mh(y),y=x.Vb(y),E=a.pg(),y!==E&&(E=a.kh(),y!==null?E!==null?x.isTreePathToChildren?E.fromNode=y:E.toNode=y:D0(this,y,a):E!==null&&Yf(x,E,!1)))}}},gl.prototype.updateDataBindings=function(a,y){jr.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 E=dm(y,x),b=this.Lc(a);if(E!==null&&b!==null){for(E=E.iterator;E.next();){var z=E.value;y.lb(z)&&b instanceof Vn&&y.mh(z)===x&&D0(this,b,this.ii(z))}gu(y,x)}a=y.mh(a),a!==void 0&&b instanceof Vn&&(a=this.Vb(a),D0(this,a,b))}},gl.prototype.unresolveReferencesForPart=function(a){var y=this.diagram.model;if(a instanceof Vn){var x=y.wa(a.data),E=this.Kc(a.data);if(E!==null){E.isSelected=!1,E.isHighlighted=!1;var b=E.layer;if(b!==null){var z=b.pc(-1,E,!1);0<=z&&this.diagram.cb(zo,"parts",b,E,null,z,null),z=E.layerChanged,z!==null&&z(E,b,null)}}for(E=this.diagram.isTreePathToChildren,a=a.linksConnected;a.next();)b=a.value,b=(E?b.toNode:b.fromNode).data,y.lb(b)&&fu(y,x,b)}},gl.prototype.insertLink=function(a,y,x){y=this.diagram.model;var E=a,b=x;return this.diagram.isTreePathToChildren||(E=x,b=a),E!==null&&b!==null?(y.qe(b.data,y.wa(E.data)),b.kh()):null},gl.prototype.findLinkForKey=gl.prototype.findLinkForKey,gl.className="TreePartManager";function li(a,y){this.kl=new mn,this.il=new mn,this.Wv=`,
"insertedNodeKeys": `,this.jy=`,
"modifiedNodeData": `,this.Yv=`,
"removedNodeKeys": `,this.vh=null,Zr(this),this.Sm=this.xa="",this.Gg=!1,this.j={},this.Tc=[],this.kb=new yi,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 yi,this.Lt=new yn,this.Wg=!1,this.o=null,this.undoManager=new so,a!==void 0&&(Mn(a)?this.nodeDataArray=a:y=a),y&&(Object.assign(this,y),a=y.Changed)&&(delete this.Changed,this.Pe(a))}li.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},li.prototype.copy=function(){var a=new this.constructor;return this.cloneProtected(a),a},li.prototype.clear=function(){this.Tc=[],this.kb.clear(),this.Vf.clear(),this.undoManager.clear()},li.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,E=0;E<x;E++){var b=a[E];y+=" "+this.wa(b)+":"+Er(b)}}return y},li.prototype.xA=function(a){a.change!==hs&&pe("Model.toIncrementalData argument is not a Transaction ChangedEvent:"+a.toString());var y=a.object;return a.isTransactionFinished&&y instanceof Jo?(PS(this,y),a=this.Qv(y,a.propertyName==="FinishedUndo"),this.vh=null,a):null},li.prototype.Qv=function(a,y){var x=this,E=!1,b=new mn,z=new mn,tt=new mn,rt=this.vh;a.changes.each(function(ft){ft.model===x&&(ft.modelChange==="nodeDataArray"?ft.change===Eo?b.add(ft.newValue):ft.change===zo&&tt.add(ft.oldValue):x.lb(ft.object)?z.add(ft.object):ft.change!==io||x.modelData!==ft.object&&ft.propertyName!=="modelData"?ft.object!==null&&(rt&&rt.contains(ft.object)?rt.get(ft.object).each(function(St){x.lb(St)&&z.add(St)}):ft.object instanceof li||x.ri()&&x.Jc(ft.object)||wS(x,ft.object).each(function(St){z.add(St)})):E=!0)});var ot=this.il;ot.clear(),b.each(function(ft){ot.add(x.wa(ft)),y||z.add(ft)});var st=this.kl;st.clear(),tt.each(function(ft){st.add(x.wa(ft)),y&&z.add(ft)}),a=x.cloneDeep(z.Fa());var ut=null;return E&&(ut===null&&(ut={}),ut.modelData=this.cloneDeep(this.modelData)),0<ot.count&&(ut===null&&(ut={}),y?ut.removedNodeKeys=ot.Fa():ut.insertedNodeKeys=ot.Fa()),0<a.length&&(ut===null&&(ut={}),ut.modifiedNodeData=a),0<st.count&&(ut===null&&(ut={}),y?ut.insertedNodeKeys=st.Fa():ut.removedNodeKeys=st.Fa()),st.clear(),ot.clear(),ut},li.prototype.cloneDeep=function(a){return vp(this,a,!0)};function vp(a,y,x,E,b,z){function tt(ft,St){rt?(ft.__gohashid===void 0&&z.push(ft),E.set(ft,St)):(ft=eo++,E.set(ft,St),b.set(ft,y))}if(!bn(y))return y;z||(z=[]);var rt=Object.isExtensible(y);if(E||(E=new yi),rt){var ot=E.get(y);if(ot)return ot}else for(b||(b=new yi),ot=b.iterator;ot.next();){var st=ot.key;if(ot.value===y&&(st=E.get(st)))return st}if(Array.isArray(y)){ot=[],tt(y,ot);for(var ut=0;ut<y.length;ut++)ot.push(vp(a,y[ut],!1,E,b,z))}else if(y instanceof Gt||y instanceof Re||y instanceof Ye||y instanceof Di||y instanceof pi)ot=y.copy(),tt(y,ot);else{if(y instanceof mr||y instanceof Fn||y instanceof Je)return y;if(y instanceof yn)ot=new yn().addAll(vp(a,y.Fa(),!1,E,b,z)),tt(y,ot);else if(y instanceof mn)ot=new mn().addAll(vp(a,y.Fa(),!1,E,b,z)),tt(y,ot);else if(y instanceof yi)ot=new yi().addAll(vp(a,y.Fa(),!1,E,b,z)),tt(y,ot);else if(y instanceof Date)ot=new Date(y.getTime()),tt(y,ot);else if(y instanceof RegExp)ot=new RegExp(y),tt(y,ot),ot.lastIndex=y.lastIndex;else if(typeof y.copy=="function")ot=y.copy(),tt(y,ot);else for(ut in ot={},tt(y,ot),y)ut!=="__gohashid"&&(ot[ut]=vp(a,y[ut],!1,E,b,z))}return x&&z.forEach(function(ft){delete ft.__gohashid}),ot}Ct=li.prototype,Ct.quote=function(a){return JSON.stringify(a).replace(/[\u007F-\uFFFF]/g,function(y){return"\\u"+("0000"+y.charCodeAt(0).toString(16)).substr(-4)})},Ct.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},Ct.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,bn(y)&&(a.dm(y),a.modelData=y)}Ct.Rv=function(){var a=this.modelData,y=!1,x;for(x in a)if(!CS(x,a[x])){y=!0;break}return a="",y&&(a=`,
"modelData": `+Sy(this,this.modelData)),a+`,
"nodeDataArray": `+mc(this,this.nodeDataArray,!0)},Ct.kv=function(a){xS(this,a),a=a.nodeDataArray,Mn(a)&&(this.dm(a),this.nodeDataArray=a)};function PS(a,y){function x(b,z){if((z=z.part)&&(z=z.data,b!==z)){var tt=E.get(b);tt===null?(tt=new mn,tt.add(z),E.add(b,tt)):tt.add(z)}}var E=a.vh;E===null&&(E=new yi,y.changes.each(function(b){if(b.diagram!==null){var z=b.change;z===io?(b=b.object.panel)&&(z=b.data)&&x(z,b):(z===Eo||z===zo)&&(b=b.object,(z=b.itemArray)&&x(z,b))}}),a.vh=E)}function wS(a,y){for(var x=new mn,E=0;E<a.nodeDataArray.length;E++){var b=a.nodeDataArray[E];T0(a,y,b,b,x)}return x}function T0(a,y,x,E,b){if(Array.isArray(x))for(var z=0;z<x.length;z++){var tt=x[z];if(tt===y)return b.add(E),!0;if(T0(a,y,tt,E,b))return!0}else if(bn(x)&&Object.getPrototypeOf(x)===Object.prototype)for(z in x){if(tt=x[z],tt===y)return b.add(E),!0;if(T0(a,y,tt,E,b))return!0}return!1}Ct.Pv=function(a,y){var x=this,E=!1,b=new mn,z=new mn,tt=new mn,rt=this.vh;a.changes.each(function(ut){ut.model===x&&(ut.modelChange==="nodeDataArray"?ut.change===Eo?b.add(ut.newValue):ut.change===zo&&tt.add(ut.oldValue):x.lb(ut.object)?z.add(ut.object):ut.change!==io||x.modelData!==ut.object&&ut.propertyName!=="modelData"?ut.object!==null&&(rt&&rt.contains(ut.object)?rt.get(ut.object).each(function(ft){x.lb(ft)&&z.add(ft)}):ut.object instanceof li||x.ri()&&x.Jc(ut.object)||wS(x,ut.object).each(function(ft){z.add(ft)})):E=!0)});var ot=this.il;ot.clear(),b.each(function(ut){ot.add(x.wa(ut)),y||z.add(ut)});var st=this.kl;return st.clear(),tt.each(function(ut){st.add(x.wa(ut)),y&&z.add(ut)}),a="",E&&(a+=`,
"modelData": `+Sy(this,this.modelData)),0<ot.count&&(a+=(y?this.Yv:this.Wv)+mc(this,ot.Fa(),!0)),0<z.count&&(a+=this.jy+mc(this,z.Fa(),!0)),0<st.count&&(a+=(y?this.Wv:this.Yv)+mc(this,st.Fa(),!0)),st.clear(),ot.clear(),a},Ct.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)&&pe("applyIncrementalJson cannot change Model properties"),xS(this,a);var y=a.insertedNodeKeys,x=a.modifiedNodeData,E=new yi;if(Array.isArray(x))for(var b=0;b<x.length;b++){var z=x[b],tt=this.wa(z);tt!=null&&E.set(tt,z)}if(Array.isArray(y))for(b=y.length,z=0;z<b;z++){tt=y[z];var rt=this.hc(tt);rt===null&&(rt=(rt=E.get(tt))?rt:this.copyNodeData({}),this.km(rt,tt),this.xf(rt))}if(Array.isArray(x)){for(y=x.length,E=0;E<y;E++)if(b=x[E],z=this.wa(b),z=this.hc(z),z!==null){for(var ot in b)ot==="__gohashid"||ot===this.nodeKeyProperty||this.Wj()&&ot===this.nodeIsGroupProperty||this.setDataProperty(z,ot,b[ot]);this.lm(b,z)}}if(a=a.removedNodeKeys,Array.isArray(a))for(x=a.length,ot=0;ot<x;ot++)y=this.hc(a[ot]),y!==null&&this.cm(y)},Ct.$x=function(a,y){a.change!==hs&&pe("Model.toIncrementalJson argument is not a Transaction ChangedEvent:"+a.toString());var x=a.object;return a.isTransactionFinished&&x instanceof Jo?(y===void 0&&(y=cm(this,this)),PS(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 }'},Ct.yA=function(a,y){return this.$x(a,y)},Ct.np=function(a){return a===void 0&&(a=cm(this,this)),'{ "class": '+this.quote(a)+this.rm()+this.Rv()+"}"},Ct.toJSON=function(a){return this.np(a)},Ct.Zw=function(a){var y=null;if(typeof a=="string")try{y=Xe.JSON.parse(a)}catch(E){}else typeof a=="object"?y=a:pe("Unable to modify a Model from: "+a);var x=y.incremental;typeof x!="number"&&pe("Unable to apply non-incremental changes to Model: "+a),x!==0&&(this.Ea("applyIncrementalJson"),this.fp(y),this.eb("applyIncrementalJson"))},Ct.Ky=function(a){return this.Zw(a)},li.constructGraphLinksModel=function(){return new li},Ct=li.prototype,Ct.dm=function(a){if(Mn(a))for(var y=a.length,x=0;x<y;x++){var E=a[x];if(bn(E)){var b=x;E=this.dm(E),Array.isArray(a)?a[b]=E:pe("Cannot replace an object in an HTMLCollection or NodeList at "+b)}}else if(bn(a)){for(y in a)if(x=a[y],bn(x)&&(x=this.dm(x),a[y]=x,y==="points"&&Array.isArray(x))){for(b=x.length%2===0,E=0;E<x.length;E++)if(typeof x[E]!="number"){b=!1;break}if(b){for(b=new yn,E=0;E<x.length/2;E++)b.add(new Gt(x[2*E],x[2*E+1]));b.freeze(),a[y]=b}}return kx(a)}return a},Ct.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()):Mn(a)?mc(this,a):bn(a)?Sy(this,a):typeof a=="function"?"null":a.toString()};function mc(a,y,x){x===void 0&&(x=!1);var E=y.length;if(0>=E)return"[]";var b=new Pi;b.add("["),x&&1<E&&b.add(`
`);for(var z=0;z<E;z++){var tt=y[z];tt!==void 0&&(0<z&&(b.add(","),x&&b.add(`
`)),b.add(a.sm(tt)))}return x&&1<E&&b.add(`
`),b.add("]"),b.toString()}function CS(a,y){return y===void 0||a==="__gohashid"||a[0]==="_"||typeof y=="function"}function is(a){return isNaN(a)?"NaN":a===1/0?"9e9999":a===-1/0?"-9e9999":a}function Sy(a,y){var x=y;if(x instanceof Gt)y={class:"go.Point",x:is(x.x),y:is(x.y)};else if(x instanceof Re)y={class:"go.Size",width:is(x.width),height:is(x.height)};else if(x instanceof Ye)y={class:"go.Rect",x:is(x.x),y:is(x.y),width:is(x.width),height:is(x.height)};else if(x instanceof Di)y={class:"go.Margin",top:is(x.top),right:is(x.right),bottom:is(x.bottom),left:is(x.left)};else if(x instanceof pi)x.sb()?y={class:"go.Spot",x:is(x.x),y:is(x.y),offsetX:is(x.offsetX),offsetY:is(x.offsetY)}:y={class:"go.Spot",enum:x.toString()};else if(x instanceof mr){if(y={class:"go.Brush",type:x.type.name},x.type===yd?y.color=x.color:(x.type===jh||x.type===cl)&&(y.start=x.start,y.end=x.end,x.type===cl&&(x.startRadius!==0&&(y.startRadius=is(x.startRadius)),isNaN(x.endRadius)||(y.endRadius=is(x.endRadius)))),x.colorStops!==null){var E={};for(x=x.colorStops.iterator;x.next();)E[x.key]=x.value;y.colorStops=E}}else x instanceof Fn?(y={class:"go.Geometry",type:x.type.name},x.startX!==0&&(y.startX=is(x.startX)),x.startY!==0&&(y.startY=is(x.startY)),x.endX!==0&&(y.endX=is(x.endX)),x.endY!==0&&(y.endY=is(x.endY)),x.spot1.D(wo)||(y.spot1=x.spot1),x.spot2.D(Rs)||(y.spot2=x.spot2),x.type===Fn.o&&(y.path=Fn.ia(x))):x instanceof Je&&(y={class:"go.EnumValue",classType:cm(a,x.classType),name:x.name});E="{",x=!0;for(var b in y){var z=ko(y,b);if(!CS(b,z))if(x?x=!1:E+=",",E+=a.quote(b)+":",b==="points"&&z instanceof yn){var tt="[";for(z=z.iterator;z.next();){var rt=z.value;1<tt.length&&(tt+=","),tt+=a.sm(rt.x),tt+=",",tt+=a.sm(rt.y)}tt+="]",E+=tt}else E+=a.sm(z)}return E+"}"}function rs(a){return typeof a=="number"?a:a==="NaN"?NaN:a==="9e9999"?1/0:a==="-9e9999"?-1/0:parseFloat(a)}function kx(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 Gt(rs(a.x),rs(a.y));else if(y==="Size")x=new Re(rs(a.width),rs(a.height));else if(y==="Rect")x=new Ye(rs(a.x),rs(a.y),rs(a.width),rs(a.height));else if(y==="Margin")x=new Di(rs(a.top),rs(a.right),rs(a.bottom),rs(a.left));else if(y==="Spot")typeof a.enum=="string"?x=jc(a.enum):x=new pi(rs(a.x),rs(a.y),rs(a.offsetX),rs(a.offsetY));else if(y==="Brush"){if(x=new mr,x.type=Un(mr,a.type),typeof a.color=="string"&&(x.color=a.color),a.start instanceof pi&&(x.start=a.start),a.end instanceof pi&&(x.end=a.end),typeof a.startRadius=="number"&&(x.startRadius=rs(a.startRadius)),typeof a.endRadius=="number"&&(x.endRadius=rs(a.endRadius)),a=a.colorStops,bn(a))for(var E in a)x.addColorStop(parseFloat(E),a[E])}else y==="Geometry"?(x=null,typeof a.path=="string"?x=Fn.parse(a.path):x=new Fn,x.type=Un(Fn,a.type),typeof a.startX=="number"&&(x.startX=rs(a.startX)),typeof a.startY=="number"&&(x.startY=rs(a.startY)),typeof a.endX=="number"&&(x.endX=rs(a.endX)),typeof a.endY=="number"&&(x.endY=rs(a.endY)),a.spot1 instanceof pi&&(x.spot1=a.spot1),a.spot2 instanceof pi&&(x.spot2=a.spot2)):y==="EnumValue"&&(E=a.classType,E.indexOf("go.")===0&&(E=E.substr(3)),E=Py(E),typeof E=="function"&&(x=Un(E,a.name)));return x}Ct.Pe=function(a){return this.Lt.add(a),this},Ct.ik=function(a){this.Lt.remove(a)},Ct.ds=function(a){this.skipsUndoManager||this.undoManager.Tu(a);for(var y=this.Lt,x=y.length,E=0;E<x;E++)y.M(E)(a)},Ct.cb=function(a,y,x,E,b,z,tt){Uo(this,"",a,y,x,E,b,z,tt)},Ct.g=function(a,y,x,E,b){Uo(this,"",io,a,this,y,x,E,b)},Ct.Fs=function(a,y,x,E,b,z){Uo(this,"",io,y,a,x,E,b,z)};function Uo(a,y,x,E,b,z,tt,rt,ot){rt===void 0&&(rt=null),ot===void 0&&(ot=null);var st=new oo;st.model=a,st.change=x,st.modelChange=y,st.propertyName=E,st.object=b,st.oldValue=z,st.oldParam=rt,st.newValue=tt,st.newParam=ot,a.ds(st)}li.prototype.changeState=function(a,y){if(a!==null&&a.model===this)if(a.change===io){var x=a.object,E=a.propertyName,b=a.I(y);E===this.nodeKeyProperty&&this.lb(x)&&(y=a.I(!y),y!==void 0&&this.kb.remove(y),b!==void 0&&this.kb.add(b,x)),no(x,E,b)}else a.change===Eo?(x=a.newParam,a.modelChange==="nodeDataArray"?(a=a.newValue,bn(a)&&typeof x=="number"&&(E=this.wa(a),y?(this.Tc[x]===a&&Li(this.Tc,x),E!==void 0&&this.kb.remove(E)):(this.Tc[x]!==a&&Ji(this.Tc,x,a),E!==void 0&&this.kb.add(E,a)))):a.modelChange===""?((E=a.object)&&!Mn(E)&&a.propertyName&&(E=ko(a.object,a.propertyName)),Mn(E)&&typeof x=="number"&&(a=a.newValue,y?Li(E,x):Ji(E,x,a))):pe("unknown ChangedEvent.Insert modelChange: "+a.toString())):a.change===zo?(x=a.oldParam,a.modelChange==="nodeDataArray"?(a=a.oldValue,bn(a)&&typeof x=="number"&&(E=this.wa(a),y?(this.Tc[x]!==a&&Ji(this.Tc,x,a),E!==void 0&&this.kb.add(E,a)):(this.Tc[x]===a&&Li(this.Tc,x),E!==void 0&&this.kb.remove(E)))):a.modelChange===""?((E=a.object)&&!Mn(E)&&a.propertyName&&(E=ko(a.object,a.propertyName)),Mn(E)&&typeof x=="number"&&(a=a.oldValue,y?Ji(E,x,a):Li(E,x))):pe("unknown ChangedEvent.Remove modelChange: "+a.toString())):a.change!==hs&&pe("unknown ChangedEvent: "+a.toString())},li.prototype.Ea=function(a){return this.undoManager.Ea(a)},li.prototype.eb=function(a){return this.undoManager.eb(a)},li.prototype.Kf=function(){return this.undoManager.Kf()},li.prototype.commit=function(a,y){y===void 0&&(y="");var x=this.skipsUndoManager;y===null&&(this.skipsUndoManager=!0,y=""),this.undoManager.Ea(y);var E=!1;try{a(this),E=!0}finally{E?this.undoManager.eb(y):this.undoManager.Kf(),this.skipsUndoManager=x}},Ct=li.prototype,Ct.La=function(a,y){y===void 0&&(y=""),Uo(this,"SourceChanged",hs,y,a,null,null)},Ct.wa=function(a){if(a!==null){var y=this.Th;if(y!==""&&(y=ko(a,y),y!==void 0)){if(vc(y))return y;pe("Key value for node data "+a+" is not a number or a string: "+y)}}},Ct.km=function(a,y){if(a!==null){var x=this.Th;if(x!=="")if(this.lb(a)){var E=ko(a,x);E!==y&&this.hc(y)===null&&(no(a,x,y),E!==void 0&&this.kb.remove(E),this.kb.add(y,a),Uo(this,"nodeKey",io,x,a,E,y),typeof x=="string"&&this.La(a,x),this.jp(E,y))}else no(a,x,y)}};function vc(a){return typeof a=="number"||typeof a=="string"}Ct.lb=function(a){var y=this.wa(a);return y===void 0?!1:this.kb.I(y)===a},Ct.hc=function(a){return a===null&&pe("Model.findNodeDataForKey:key must not be null"),a!==void 0&&vc(a)?this.kb.I(a):null},Ct.$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 E=this.bl;if(E!==null&&(x=E(this,a),x!=null&&!this.kb.contains(x))){no(a,y,x);return}if(typeof x=="string"){for(E=2;this.kb.contains(x+E);)E++;no(a,y,x+E)}else if(x===void 0||typeof x=="number"){for(x=-this.kb.count-1;this.kb.contains(x);)x--;no(a,y,x)}}}}},Ct.xf=function(a){a!==null&&(Gr(a),this.lb(a)||ES(this,a,!0))};function ES(a,y,x){var E=a.wa(y);(E===void 0||a.kb.I(E)!==y)&&(a.$u(y),E=a.wa(y),E===void 0&&pe("Model.makeNodeDataKeyUnique failed on "+y+". Data not added to Model."),a.kb.add(E,y),E=null,x&&(E=a.Tc.length,Ji(a.Tc,E,y)),Uo(a,"nodeDataArray",Eo,"nodeDataArray",a,null,y,null,E),a.fm(y),a.em(y))}Ct.Fy=function(a){if(Mn(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)},Ct.cm=function(a){a!==null&&bS(this,a,!0)};function bS(a,y,x){var E=a.wa(y);if(E!==void 0&&a.kb.remove(E),E=null,x){t:if(x=a.Tc,Array.isArray(x))E=x.indexOf(y);else{E=x.length;for(var b=0;b<E;b++)if(x[b]===y){E=b;break t}E=-1}if(0>E)return;Li(a.Tc,E)}Uo(a,"nodeDataArray",zo,"nodeDataArray",a,y,null,E,null),a.qp(y)}Ct.nA=function(a){if(Mn(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)},Ct.$z=function(a){if(a!==this.nodeDataArray&&Mn(a)){var y=this.kl;y.clear(),y.addAll(this.kb.iteratorKeys);var x=this.il;x.clear();for(var E=a.length,b=0;b<E;b++){var z=a[b],tt=this.wa(z);if(tt!==void 0){x.add(tt);var rt=this.hc(tt);rt!==z&&(rt!==null?(this.Do(rt,z),this.lm(z,rt)):(z=this.cloneDeep(z),this.km(z,tt),this.xf(z)))}else tt=this.cloneDeep(z),this.xf(tt),x.add(this.wa(tt))}for(a=y.iterator;a.next();)E=a.value,x.contains(E)||(E=this.hc(E))&&this.cm(E);y.clear(),x.clear()}},Ct.jp=function(a,y){y!==void 0&&(a=dm(this,a),a instanceof mn&&this.Vf.add(y,a))},Ct.Lv=function(){},Ct.fm=function(){},Ct.em=function(){},Ct.qp=function(){};function fu(a,y,x){if(y!==void 0){var E=a.Vf.I(y);E===null&&(E=new mn,a.Vf.add(y,E)),E.add(x)}}function gu(a,y,x){if(y!==void 0){var E=a.Vf.I(y);E instanceof mn&&(x==null?a.Vf.remove(y):(E.remove(x),E.count===0&&a.Vf.remove(y)))}}function dm(a,y){return y===void 0?null:(a=a.Vf.I(y),a instanceof mn?a:null)}Ct.Qy=function(a){a===void 0?this.Vf.clear():this.Vf.remove(a)},li.prototype.copyNodeData=function(a){if(a===null)return null;var y=this.Bk;return a=y!==null?y(a,this):I0(this,a,!0),bn(a)&&Zr(a),a};function I0(a,y,x){if(a.copiesArrays&&Array.isArray(y)){var E=[];for(x=0;x<y.length;x++){var b=I0(a,y[x],a.copiesArrayObjects);E.push(b)}return Zr(E),E}if(x&&bn(y)){x=(x=y.constructor)?new x:{},b=a.copiesKey||typeof a.nodeKeyProperty!="string"?null:a.nodeKeyProperty;for(E in y)if(E==="__gohashid")x.__gohashid=void 0;else if(E===b)x[b]=void 0;else{var z=ko(y,E),tt=cm(a,z);tt==="GraphObject"||tt==="Diagram"||tt==="Layer"||tt==="RowColumnDefinition"||tt==="AnimationManager"||tt==="Tool"||tt==="CommandHandler"||tt==="Layout"||tt==="InputEvent"||tt==="DiagramEvent"||z instanceof li||z instanceof so||z instanceof Jo||z instanceof oo||(z=I0(a,z,!1)),no(x,E,z)}return Zr(x),x}return y instanceof Gt||y instanceof Re||y instanceof Ye||y instanceof pi||y instanceof Di?y.copy():y}li.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!LS&&a instanceof fe&&(LS=!0,Oi('Model.setDataProperty is modifying a GraphObject, "'+a.toString()+'"'),Oi(" Is that really your intent?"));var E=ko(a,y);E!==x&&(no(a,y,x),this.Fs(a,y,E,x))},Ct=li.prototype,Ct.set=function(a,y,x){this.setDataProperty(a,y,x)},Ct.Do=function(a,y){if(y){var x=this.lb(a),E;for(E in y)E==="__gohashid"||x&&E===this.nodeKeyProperty||this.setDataProperty(a,E,y[E])}},Ct.Ay=function(a,y){this.ts(a,-1,y)},Ct.ts=function(a,y,x){0>y&&(y=a.length),Ji(a,y,x),Uo(this,"",Eo,"",a,null,x,null,y)},Ct.ov=function(a,y){y===void 0&&(y=-1),a===this.Tc&&pe("Model.removeArrayItem should not be called on the Model.nodeDataArray"),y===-1&&(y=a.length-1);var x=a[y];Li(a,y),Uo(this,"",zo,"",a,x,null,y,null)},Ct.Ro=function(a){if(a===null)return"";var y=this.lj;if(y===""||(y=ko(a,y),y===void 0))return"";if(typeof y=="string")return y;pe("getCategoryForNodeData found a non-string category for "+a+": "+y)},Ct.jm=function(a,y){if(a!==null){var x=this.lj;if(x!=="")if(this.lb(a)){var E=ko(a,x);E===void 0&&(E=""),E!==y&&(no(a,x,y),Uo(this,"nodeCategory",io,x,a,E,y))}else no(a,x,y)}},Ct.lm=function(a,y){this.jm(y,this.Ro(a))},Ct.Tl=function(){return!1},Ct.Wj=function(){return!1},Ct.ri=function(){return!1},Ct.xs=function(){return!1},Ct.Xj=function(){return!1};function xy(){return new li}function cm(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 cm(a,y.constructor);return typeof y}function Py(a){return Kl[a]?Kl[a]:Xe.go!==void 0&&Xe.go[a]?Xe.go[a]:null}function ko(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(E){}return x}function no(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(E){}}we.Object.defineProperties(li.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===""&&pe("Model.nodeKeyProperty may not be the empty string"),0<this.kb.count&&pe("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,E=0;E<x;E++){var b=a[E];bn(b)||pe("Model.nodeDataArray must only contain Objects, not: "+b),Gr(b)}for(this.Tc=a,E=new yn,b=0;b<x;b++){var z=a[b],tt=this.wa(z);tt===void 0||this.kb.I(tt)!==null?E.add(z):this.kb.add(tt,z)}for(E=E.iterator;E.next();)b=E.value,this.$u(b),z=this.wa(b),z!==void 0&&this.kb.add(z,b);for(Uo(this,"nodeDataArray",io,"nodeDataArray",this,y,a),y=0;y<x;y++)E=a[y],this.fm(E),this.em(E);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"}}}),li.prototype.setCategoryForNodeData=li.prototype.jm,li.prototype.getCategoryForNodeData=li.prototype.Ro,li.prototype.removeArrayItem=li.prototype.ov,li.prototype.insertArrayItem=li.prototype.ts,li.prototype.addArrayItem=li.prototype.Ay,li.prototype.assignAllDataProperties=li.prototype.Do,li.prototype.set=li.prototype.set,li.prototype.clearUnresolvedReferences=li.prototype.Qy,li.prototype.mergeNodeDataArray=li.prototype.$z,li.prototype.removeNodeDataCollection=li.prototype.nA,li.prototype.removeNodeData=li.prototype.cm,li.prototype.addNodeDataCollection=li.prototype.Fy,li.prototype.addNodeData=li.prototype.xf,li.prototype.makeNodeDataKeyUnique=li.prototype.$u,li.prototype.findNodeDataForKey=li.prototype.hc,li.prototype.containsNodeData=li.prototype.lb,li.prototype.setKeyForNodeData=li.prototype.km,li.prototype.getKeyForNodeData=li.prototype.wa,li.prototype.updateTargetBindings=li.prototype.La,li.prototype.commit=li.prototype.commit,li.prototype.rollbackTransaction=li.prototype.Kf,li.prototype.commitTransaction=li.prototype.eb,li.prototype.startTransaction=li.prototype.Ea,li.prototype.raiseDataChanged=li.prototype.Fs,li.prototype.raiseChanged=li.prototype.g,li.prototype.raiseChangedEvent=li.prototype.cb,li.prototype.removeChangedListener=li.prototype.ik,li.prototype.addChangedListener=li.prototype.Pe,li.prototype.writeJsonValue=li.prototype.sm,li.prototype.replaceJsonObjects=li.prototype.dm,li.prototype.applyIncrementalJSON=li.prototype.Ky,li.prototype.applyIncrementalJson=li.prototype.Zw,li.prototype.toJSON=li.prototype.toJSON,li.prototype.toJson=li.prototype.np,li.prototype.toIncrementalJSON=li.prototype.yA,li.prototype.toIncrementalJson=li.prototype.$x,li.prototype.toIncrementalData=li.prototype.xA,li.prototype.clear=li.prototype.clear;var LS=!1,Kl={};li.className="Model",li.fromJSON=li.fromJson=function(a,y){y===void 0&&(y=null);var x=null;if(typeof a=="string")try{x=Xe.JSON.parse(a)}catch(z){}else typeof a=="object"?x=a:pe("Unable to construct a Model from: "+a);if(y===null){a=null;var E=x.class;if(typeof E=="string")try{var b=null;E.indexOf("go.")===0?(E=E.substr(3),b=Py(E)):(b=Py(E),b===null&&(b=Xe[E])),typeof b=="function"&&(a=new b)}catch(z){}a===null||a instanceof li?y=a:pe("Unable to construct a Model of declared class: "+x.class)}return y===null&&(y=li.constructGraphLinksModel()),y.gp(x),y.kv(x),y},li.safePropertyValue=ko,li.safePropertySet=no,Kl.Brush=mr,Kl.ChangedEvent=oo,Kl.Geometry=Fn,Kl.Margin=Di,Kl.Panel=pn,Kl.Point=Gt,Kl.Rect=Ye,Kl.Size=Re,Kl.Spot=pi,Kl.Transaction=Jo,Kl.UndoManager=so;function Do(a,y,x,E){Zr(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,E===void 0?(this.el=AS,this.wk=null):(this.el=fm,this.wk=E),this.st=new mn}Do.prototype.copy=function(){var a=new Do;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},Ct=Do.prototype,Ct.qb=function(a){a.classType===Do&&(this.mode=a)},Ct.toString=function(){return"Binding("+this.targetProperty+":"+this.sourceProperty+(this.Ai!==-1?" "+this.Ai:"")+" "+this.mode.name+")"},Ct.freeze=function(){return this._isFrozen=!0,this},Ct.ka=function(){return this._isFrozen=!1,this},Ct.Kx=function(a){return a===void 0&&(a=null),this.mode=fm,this.backConverter=a,this},Ct.cp=function(a){return a===void 0&&(a=""),this.sourceName=a,this.isToModel=!1,this},Ct.dA=function(){return this.sourceName=null,this.isToModel=!0,this};function MS(a,y,x){return a=a.sourceName,a===null||a===""?y:a==="/"?x.part:a==="."?x:a===".."?x.panel:y.fb(a)}Ct.Mv=function(a,y,x){var E=this.sl;if(x===void 0||E===""||E===x){x=this.xl;var b=this.Im;if(b===null&&x==="")Oi("Binding error: target property is the empty string: "+this.toString());else{var z=y;if(E!==""&&(z=ko(y,E)),z!==void 0)if(b===null)x!==""&&no(a,x,z);else try{if(x!==""){var tt=b(z,a);no(a,x,tt)}else b(z,a)}catch(rt){}}}},Ct.sp=function(a,y,x,E){if(this.el===fm){var b=this.xl;if(x===void 0||b===x){x=this.sl;var z=this.wk,tt=a;if(b!==""&&(tt=ko(a,b)),tt!==void 0&&!this.st.contains(a))try{this.st.add(a);var rt=E!==null?E.diagram:null,ot=rt!==null?rt.model:null;if(z===null){if(x!=="")ot!==null?ot.setDataProperty(y,x,tt):no(y,x,tt);else if(ot!==null&&E!==null&&0<=E.itemIndex&&E.panel!==null&&Array.isArray(E.panel.itemArray)){var st=E.itemIndex,ut=E.panel.itemArray;ot.ov(ut,st),ot.ts(ut,st,tt)}}else try{if(x!==""){var ft=z(tt,y,ot);ot!==null?ot.setDataProperty(y,x,ft):no(y,x,ft)}else{var St=z(tt,y,ot);if(St!==void 0&&ot!==null&&E!==null&&0<=E.itemIndex&&E.panel!==null&&Array.isArray(E.panel.itemArray)){var wt=E.itemIndex,Et=E.panel.itemArray;ot.ov(Et,wt),ot.ts(Et,wt,St)}}}catch(Bt){}}finally{this.st.remove(a)}}}},we.Object.defineProperties(Do.prototype,{Ai:{get:function(){return this.j},set:function(a){this._isFrozen&&Tn(this),this.j=a}},targetProperty:{get:function(){return this.xl},set:function(a){this._isFrozen&&Tn(this),this.xl=a}},sourceName:{get:function(){return this.Cr},set:function(a){this._isFrozen&&Tn(this),this.Cr=a,a!==null&&(this.wn=!1)}},isToModel:{get:function(){return this.wn},set:function(a){this._isFrozen&&Tn(this),this.wn=a}},sourceProperty:{get:function(){return this.sl},set:function(a){this._isFrozen&&Tn(this),this.sl=a}},converter:{get:function(){return this.Im},set:function(a){this._isFrozen&&Tn(this),this.Im=a}},backConverter:{get:function(){return this.wk},set:function(a){this._isFrozen&&Tn(this),this.wk=a}},mode:{get:function(){return this.el},set:function(a){this._isFrozen&&Tn(this),this.el=a}}}),Do.prototype.updateSource=Do.prototype.sp,Do.prototype.updateTarget=Do.prototype.Mv,Do.prototype.ofModel=Do.prototype.dA,Do.prototype.ofObject=Do.prototype.cp,Do.prototype.makeTwoWay=Do.prototype.Kx;var Nx="Binding",AS=new Je(Do,"OneWay",1),fm=new Je(Do,"TwoWay",2);Do.className="Binding",Do.parseEnum=function(a,y){return function(x){return x=Un(a,x),x===null?y:x}},Do.toString=Er,Do.OneWay=AS,Do.TwoWay=fm;function hr(a,y,x){li.call(this),this.Vv=`,
"insertedLinkKeys": `,this.iy=`,
"modifiedLinkData": `,this.Xv=`,
"removedLinkKeys": `,this.md=[],this.$f=new mn,this.wb=new yi,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&&(Mn(a)?this.nodeDataArray=a:x=a),x&&(Object.assign(this,x),a=x.Changed)&&(delete this.Changed,this.Pe(a))}Ce(hr,li),hr.constructGraphLinksModel=li.constructGraphLinksModel,hr.prototype.cloneProtected=function(a){li.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},Ct=hr.prototype,Ct.clear=function(){li.prototype.clear.call(this),this.md=[],this.wb.clear(),this.$f.clear()},Ct.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,E;for(E=0;E<x;E++){var b=a[E];y+=" "+this.wa(b)+":"+Er(b)}for(y+=`
link data:`,a=this.linkDataArray,x=a.length,E=0;E<x;E++)b=a[E],y+=" "+nl(this,b,!0)+"-->"+nl(this,b,!1)}return y},Ct.Qv=function(a,y){this.linkKeyProperty===""&&pe("GraphLinksModel.linkKeyProperty must not be an empty string for .toIncrementalData() to succeed.");var x=li.prototype.Qv.call(this,a,y),E=this,b=new mn,z=new mn,tt=new mn,rt=this.vh;a.changes.each(function(ut){ut.model===E&&(ut.modelChange==="linkDataArray"?ut.change===Eo?b.add(ut.newValue):ut.change===zo&&tt.add(ut.oldValue):E.Jc(ut.object)?z.add(ut.object):ut.object!==null&&(ut.object!==null&&rt&&rt.contains(ut.object)?rt.get(ut.object).each(function(ft){E.Jc(ft)&&z.add(ft)}):ut.object instanceof li||E.lb(ut.object)||FS(E,ut.object).each(function(ft){z.add(ft)})))});var ot=this.il;ot.clear(),b.each(function(ut){ot.add(E.Ac(ut)),y||z.add(ut)});var st=this.kl;return st.clear(),tt.each(function(ut){st.add(E.Ac(ut)),y&&z.add(ut)}),a=E.cloneDeep(z.Fa()),0<ot.count&&(x===null&&(x={}),y?x.removedLinkKeys=ot.Fa():x.insertedLinkKeys=ot.Fa()),0<a.length&&(x===null&&(x={}),x.modifiedLinkData=a),0<st.count&&(x===null&&(x={}),y?x.insertedLinkKeys=st.Fa():x.removedLinkKeys=st.Fa()),st.clear(),ot.clear(),x},Ct.rm=function(){var a=li.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},Ct.gp=function(a){li.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)},Ct.Rv=function(){var a=li.prototype.Rv.call(this),y=`,
"linkDataArray": `+mc(this,this.linkDataArray,!0);return a+y},Ct.kv=function(a){li.prototype.kv.call(this,a),a=a.linkDataArray,Array.isArray(a)&&(this.dm(a),this.linkDataArray=a)};function FS(a,y){for(var x=new mn,E=0;E<a.linkDataArray.length;E++){var b=a.linkDataArray[E];T0(a,y,b,b,x)}return x}Ct.Pv=function(a,y){this.linkKeyProperty===""&&pe("GraphLinksModel.linkKeyProperty must not be an empty string for .toIncrementalJson() to succeed.");var x=li.prototype.Pv.call(this,a,y),E=this,b=new mn,z=new mn,tt=new mn,rt=this.vh;a.changes.each(function(ut){ut.model===E&&(ut.modelChange==="linkDataArray"?ut.change===Eo?b.add(ut.newValue):ut.change===zo&&tt.add(ut.oldValue):E.Jc(ut.object)?z.add(ut.object):ut.object!==null&&(ut.object!==null&&rt&&rt.contains(ut.object)?rt.get(ut.object).each(function(ft){E.Jc(ft)&&z.add(ft)}):ut.object instanceof li||E.lb(ut.object)||FS(E,ut.object).each(function(ft){z.add(ft)})))});var ot=this.il;ot.clear(),b.each(function(ut){ot.add(E.Ac(ut)),y||z.add(ut)});var st=this.kl;return st.clear(),tt.each(function(ut){st.add(E.Ac(ut)),y&&z.add(ut)}),a=x,0<ot.count&&(a+=(y?this.Xv:this.Vv)+mc(this,ot.Fa(),!0)),0<z.count&&(a+=this.iy+mc(this,z.Fa(),!0)),0<st.count&&(a+=(y?this.Vv:this.Xv)+mc(this,st.Fa(),!0)),st.clear(),ot.clear(),a},Ct.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)&&pe("applyIncrementalJson cannot change Model properties"),li.prototype.fp.call(this,a);var y=a.insertedLinkKeys;if(Array.isArray(y))for(var x=y.length,E=0;E<x;E++){var b=y[E],z=this.jh(b);z===null&&(z=this.Jo({}),this.Ks(z,b),this.fi(z))}if(y=a.modifiedLinkData,Array.isArray(y)){for(x=y.length,E=0;E<x;E++)if(b=y[E],z=this.Ac(b),z=this.jh(z),z!==null){for(var tt in b)tt!=="__gohashid"&&tt!==this.linkKeyProperty&&this.setDataProperty(z,tt,b[tt]);NS(this,b,z)}}if(a=a.removedLinkKeys,Array.isArray(a))for(tt=a.length,y=0;y<tt;y++)x=this.jh(a[y]),x!==null&&this.bm(x)},hr.prototype.changeState=function(a,y){if(a!==null&&a.model===this){if(a.change===io){var x=a.object,E=a.propertyName;if(E===this.linkKeyProperty&&this.Jc(x)){var b=a.I(y);y=a.I(!y),y!==void 0&&this.wb.remove(y),b!==void 0&&this.wb.add(b,x),no(x,E,b);return}}else if(a.change===Eo){if(x=a.newParam,a.modelChange==="linkDataArray"){a=a.newValue,bn(a)&&typeof x=="number"&&(E=this.Ac(a),y?(this.$f.remove(a),this.md[x]===a&&this.md.splice(x,1),E!==void 0&&this.wb.remove(E)):(this.$f.add(a),this.md[x]!==a&&this.md.splice(x,0,a),E!==void 0&&this.wb.add(E,a)));return}if(a.modelChange==="linkLabelKeys"){E=this.Ef(a.object),Array.isArray(E)&&typeof x=="number"&&(y?(x=E.indexOf(a.newValue),0<=x&&E.splice(x,1)):0>E.indexOf(a.newValue)&&E.splice(x,0,a.newValue));return}}else if(a.change===zo){if(x=a.oldParam,a.modelChange==="linkDataArray"){a=a.oldValue,bn(a)&&typeof x=="number"&&(E=this.Ac(a),y?(this.$f.add(a),this.md[x]!==a&&this.md.splice(x,0,a),E!==void 0&&this.wb.add(E,a)):(this.$f.remove(a),this.md[x]===a&&this.md.splice(x,1),E!==void 0&&this.wb.remove(E)));return}if(a.modelChange==="linkLabelKeys"){E=this.Ef(a.object),Array.isArray(E)&&typeof x=="number"&&(y?0>E.indexOf(a.newValue)&&E.splice(x,0,a.newValue):(x=E.indexOf(a.newValue),0<=x&&E.splice(x,1)));return}}li.prototype.changeState.call(this,a,y)}},Ct=hr.prototype,Ct.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),no(x,this.nodeKeyProperty,a),this.xf(x))}return a}},Ct.yx=function(a){return nl(this,a,!0)},Ct.wv=function(a,y){yp(this,a,y,!0)},Ct.Bx=function(a){return nl(this,a,!1)},Ct.Bv=function(a,y){yp(this,a,y,!1)};function nl(a,y,x){if(y!==null&&(a=x?a.lf:a.mf,a!==""&&(a=ko(y,a),a!==void 0))){if(vc(a))return a;pe((x?"FromKey":"ToKey")+" value for link data "+y+" is not a number or a string: "+a)}}function yp(a,y,x,E){if(x===null&&(x=void 0),y!==null){var b=E?a.lf:a.mf;if(b!=="")if(x=a.Vl(x),a.Jc(y)){var z=ko(y,b);z!==x&&(gu(a,z,y),no(y,b,x),a.hc(x)===null&&fu(a,x,y),Uo(a,E?"linkFromKey":"linkToKey",io,b,y,z,x),typeof b=="string"&&a.La(y,b))}else no(y,b,x)}}Ct.zx=function(a){return O0(this,a,!0)},Ct.xv=function(a,y){Sp(this,a,y,!0)},Ct.Cx=function(a){return O0(this,a,!1)},Ct.Cv=function(a,y){Sp(this,a,y,!1)};function O0(a,y,x){return y===null||(a=x?a.ej:a.fj,a==="")?"":(y=ko(y,a),y===void 0?"":y)}function Sp(a,y,x,E){if(y!==null){var b=E?a.ej:a.fj;if(b!=="")if(a.Jc(y)){var z=ko(y,b);z===void 0&&(z=""),z!==x&&(no(y,b,x),Uo(a,E?"linkFromPortId":"linkToPortId",io,b,y,z,x),typeof b=="string"&&a.La(y,b))}else no(y,b,x)}}Ct.Ef=function(a){if(a===null)return R0;var y=this.je;return y===""?R0:(a=ko(a,y),a===void 0?R0:a)},Ct.Ls=function(a,y){if(a!==null){var x=this.je;if(x!=="")if(this.Jc(a)){var E=ko(a,x);if(E===void 0&&(E=R0),E!==y){if(Array.isArray(E))for(var b=E.length,z=0;z<b;z++)gu(this,E[z],a);for(no(a,x,y),b=y.length,z=0;z<b;z++){var tt=y[z];this.hc(tt)===null&&fu(this,tt,a)}Uo(this,"linkLabelKeys",io,x,a,E,y),typeof x=="string"&&this.La(a,x)}}else no(a,x,y)}},Ct.Bu=function(a,y){if(y!=null&&a!==null){var x=this.je;if(x!==""){var E=ko(a,x);if(E===void 0)x=[],x.push(y),this.Ls(a,x);else if(Array.isArray(E)){var b=E.indexOf(y);0<=b||(b=E.length,E.push(y),this.Jc(a)&&(this.hc(y)===null&&fu(this,y,a),Uo(this,"linkLabelKeys",Eo,x,a,null,y,null,b)))}else pe(x+" property is not an Array; cannot addLabelKeyForLinkData: "+a)}}},Ct.Qx=function(a,y){if(y!=null&&a!==null){var x=this.je;if(x!==""){var E=ko(a,x);if(Array.isArray(E)){var b=E.indexOf(y);0>b||(E.splice(b,1),this.Jc(a)&&(gu(this,y,a),Uo(this,"linkLabelKeys",zo,x,a,y,null,b,null)))}else E!==void 0&&pe(x+" property is not an Array; cannot removeLabelKeyforLinkData: "+a)}}},Ct.Ac=function(a){if(a!==null){var y=this.Jh;if(y!==""&&(y=ko(a,y),y!==void 0)){if(vc(y))return y;pe("Key value for link data "+a+" is not a number or a string: "+y)}}},Ct.Ks=function(a,y){if(a!==null){var x=this.Jh;if(x!=="")if(this.Jc(a)){var E=ko(a,x);E!==y&&this.jh(y)===null&&(no(a,x,y),E!==void 0&&this.wb.remove(E),this.wb.add(y,a),Uo(this,"linkKey",io,x,a,E,y),typeof x=="string"&&this.La(a,x))}else no(a,x,y)}},Ct.jh=function(a){return a===null&&pe("GraphLinksModel.findLinkDataForKey:key must not be null"),a!==void 0&&vc(a)?this.wb.I(a):null},Ct.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 E=this.cl;if(E!==null&&(x=E(this,a),x!=null&&!this.wb.contains(x))){no(a,y,x);return}if(typeof x=="string"){for(E=2;this.wb.contains(x+E);)E++;no(a,y,x+E)}else if(x===void 0||typeof x=="number"){for(x=-this.wb.count-1;this.wb.contains(x);)x--;no(a,y,x)}}}}},Ct.Jc=function(a){return a===null?!1:this.$f.contains(a)},Ct.fi=function(a){a!==null&&(Gr(a),this.Jc(a)||BS(this,a,!0))};function BS(a,y,x){if(a.linkKeyProperty!==""){var E=a.Ac(y);if(E!==void 0&&a.wb.I(E)===y)return;a.Bs(y),E=a.Ac(y),E===void 0&&pe("GraphLinksModel.makeLinkDataKeyUnique failed on "+y+". Data not added to model."),a.wb.add(E,y)}a.$f.add(y),E=null,x&&(E=a.md.length,a.md.splice(E,0,y)),Uo(a,"linkDataArray",Eo,"linkDataArray",a,null,y,null,E),wy(a,y)}Ct.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)},Ct.bm=function(a){a!==null&&kS(this,a,!0)};function kS(a,y,x){a.$f.remove(y);var E=a.Ac(y);if(E!==void 0&&a.wb.remove(E),E=null,x){if(E=a.md.indexOf(y),0>E)return;a.md.splice(E,1)}if(Uo(a,"linkDataArray",zo,"linkDataArray",a,y,null,E,null),x=nl(a,y,!0),gu(a,x,y),x=nl(a,y,!1),gu(a,x,y),E=a.Ef(y),Array.isArray(E))for(var b=E.length,z=0;z<b;z++)x=E[z],gu(a,x,y)}Ct.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)},Ct.Zz=function(a){if(this.linkKeyProperty===""&&pe("GraphLinksModel.linkKeyProperty must not be an empty string for .mergeLinkDataArray() to succeed."),a!==this.linkDataArray&&Mn(a)){var y=this.kl;y.clear(),y.addAll(this.wb.iteratorKeys);var x=this.il;x.clear();for(var E=a.length,b=0;b<E;b++){var z=a[b],tt=this.Ac(z);if(tt!==void 0){x.add(tt);var rt=this.jh(tt);rt!==z&&(rt!==null?(this.Do(rt,z),NS(this,z,rt)):(z=this.cloneDeep(z),this.Ks(z,tt),this.fi(z)))}else tt=this.cloneDeep(z),this.fi(tt),x.add(this.Ac(tt))}for(a=y.iterator;a.next();)E=a.value,x.contains(E)||(E=this.jh(E))&&this.bm(E);y.clear(),x.clear()}};function wy(a,y){var x=nl(a,y,!0);x=a.Vl(x),a.hc(x)===null&&fu(a,x,y),x=nl(a,y,!1),x=a.Vl(x),a.hc(x)===null&&fu(a,x,y);var E=a.Ef(y);if(Array.isArray(E))for(var b=E.length,z=0;z<b;z++)x=E[z],a.hc(x)===null&&fu(a,x,y)}Ct.Jo=function(a){if(a===null)return null;var y=this.Ak;return a=y!==null?y(a,this):I0(this,a,!0),bn(a)&&(Zr(a),this.lf!==""&&no(a,this.lf,void 0),this.mf!==""&&no(a,this.mf,void 0),this.je!==""&&no(a,this.je,[])),a},Ct.Yu=function(a){if(a===null)return!1;var y=this.jl;return y===""?!1:!!ko(a,y)},Ct.lh=function(a){if(a!==null){var y=this.Je;if(y!==""&&(y=ko(a,y),y!==void 0)){if(vc(y))return y;pe("GroupKey value for node data "+a+" is not a number or a string: "+y)}}},Ct.mp=function(a,y){if(y===null&&(y=void 0),a!==null){var x=this.Je;if(x!=="")if(this.lb(a)){var E=ko(a,x);E!==y&&(gu(this,E,a),no(a,x,y),this.hc(y)===null&&fu(this,y,a),Uo(this,"nodeGroupKey",io,x,a,E,y),typeof x=="string"&&this.La(a,x))}else no(a,x,y)}},hr.prototype.copyNodeData=function(a){return a===null?null:(a=li.prototype.copyNodeData.call(this,a),this.Ij||this.Je===""||ko(a,this.Je)===void 0||no(a,this.Je,void 0),a)},hr.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){yp(this,a,x,!0);return}if(y===this.linkToKeyProperty){yp(this,a,x,!1);return}if(y===this.linkFromPortIdProperty){Sp(this,a,x,!0);return}if(y===this.linkToPortIdProperty){Sp(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 E=ko(a,y);E!==x&&(no(a,y,x),this.Fs(a,y,E,x))},Ct=hr.prototype,Ct.Do=function(a,y){if(y){var x=this.lb(a),E=this.Jc(a),b;for(b in y)b==="__gohashid"||x&&b===this.nodeKeyProperty||x&&b===this.nodeIsGroupProperty&&ko(a,b)===y[b]||E&&b===this.linkKeyProperty||this.setDataProperty(a,b,y[b])}},Ct.jp=function(a,y){li.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 E=x.value,b=a,z=y;if(nl(this,E,!0)===b){var tt=this.lf;no(E,tt,z),Uo(this,"linkFromKey",io,tt,E,b,z),typeof tt=="string"&&this.La(E,tt)}if(nl(this,E,!1)===b&&(tt=this.mf,no(E,tt,z),Uo(this,"linkToKey",io,tt,E,b,z),typeof tt=="string"&&this.La(E,tt)),tt=this.Ef(E),Array.isArray(tt))for(var rt=tt.length,ot=this.je,st=0;st<rt;st++)tt[st]===b&&(tt[st]=z,Uo(this,"linkLabelKeys",Eo,ot,E,b,z,st,st))}},Ct.qv=function(a,y,x){if(this.lh(a)===y){var E=this.Je;no(a,E,x),Uo(this,"nodeGroupKey",io,E,a,y,x),typeof E=="string"&&this.La(a,E)}},Ct.Lv=function(){li.prototype.Lv.call(this);for(var a=this.linkDataArray,y=a.length,x=0;x<y;x++)wy(this,a[x])},Ct.fm=function(a){li.prototype.fm.call(this,a),a=this.wa(a);var y=dm(this,a);if(y!==null){var x=Si();for(y=y.iterator;y.next();){var E=y.value;if(this.lb(E)){if(this.lh(E)===a){var b=this.Je;Uo(this,"nodeGroupKey",io,b,E,a,a),typeof b=="string"&&this.La(E,b),x.push(E)}}else if(nl(this,E,!0)===a&&(b=this.lf,Uo(this,"linkFromKey",io,b,E,a,a),typeof b=="string"&&this.La(E,b),x.push(E)),nl(this,E,!1)===a&&(b=this.mf,Uo(this,"linkToKey",io,b,E,a,a),typeof b=="string"&&this.La(E,b),x.push(E)),b=this.Ef(E),Array.isArray(b))for(var z=b.length,tt=this.je,rt=0;rt<z;rt++)b[rt]===a&&(Uo(this,"linkLabelKeys",Eo,tt,E,a,a,rt,rt),x.push(E))}for(y=0;y<x.length;y++)gu(this,a,x[y]);wi(x)}},Ct.em=function(a){li.prototype.em.call(this,a);var y=this.lh(a);this.hc(y)===null&&fu(this,y,a)},Ct.qp=function(a){li.prototype.qp.call(this,a);var y=this.lh(a);gu(this,y,a)},Ct.ps=function(a){if(a===null)return"";var y=this.dj;if(y===""||(y=ko(a,y),y===void 0))return"";if(typeof y=="string")return y;pe("getCategoryForLinkData found a non-string category for "+a+": "+y)},hr.prototype.getLinkCategoryForData=function(a){return this.ps(a)},hr.prototype.lp=function(a,y){if(a!==null){var x=this.dj;if(x!=="")if(this.Jc(a)){var E=ko(a,x);E===void 0&&(E=""),E!==y&&(no(a,x,y),Uo(this,"linkCategory",io,x,a,E,y),typeof x=="string"&&this.La(a,x))}else no(a,x,y)}},hr.prototype.setLinkCategoryForData=function(a,y){this.lp(a,y)},Ct=hr.prototype,Ct.lm=function(a,y){li.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))}Ct.Wj=function(){return!0},Ct.ri=function(){return!0},Ct.xs=function(){return!0},Ct.Xj=function(){return!0},we.Object.defineProperties(hr.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,E=0;E<x;E++){var b=a[E];bn(b)||pe("GraphLinksModel.linkDataArray must only contain Objects, not: "+b),Gr(b)}if(this.md=a,this.linkKeyProperty!==""){for(E=new yn,b=0;b<x;b++){var z=a[b],tt=this.Ac(z);tt===void 0||this.wb.I(tt)!==null?E.add(z):this.wb.add(tt,z)}for(E=E.iterator;E.next();)b=E.value,this.Bs(b),z=this.Ac(b),z!==void 0&&this.wb.add(z,b)}for(E=new mn,b=0;b<x;b++)E.add(a[b]);for(this.$f=E,Uo(this,"linkDataArray",io,"linkDataArray",this,y,a),y=0;y<x;y++)wy(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,E=0;E<x;E++){var b=this.linkDataArray[E],z=this.Ac(b);z===void 0&&(this.Bs(b),z=this.Ac(b)),z!==void 0&&this.wb.add(z,b)}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"}}}),hr.prototype.setCategoryForLinkData=hr.prototype.lp,hr.prototype.getCategoryForLinkData=hr.prototype.ps,hr.prototype.assignAllDataProperties=hr.prototype.Do,hr.prototype.setGroupKeyForNodeData=hr.prototype.mp,hr.prototype.getGroupKeyForNodeData=hr.prototype.lh,hr.prototype.isGroupForNodeData=hr.prototype.Yu,hr.prototype.copyLinkData=hr.prototype.Jo,hr.prototype.mergeLinkDataArray=hr.prototype.Zz,hr.prototype.removeLinkDataCollection=hr.prototype.lA,hr.prototype.removeLinkData=hr.prototype.bm,hr.prototype.addLinkDataCollection=hr.prototype.Ey,hr.prototype.addLinkData=hr.prototype.fi,hr.prototype.containsLinkData=hr.prototype.Jc,hr.prototype.makeLinkDataKeyUnique=hr.prototype.Bs,hr.prototype.findLinkDataForKey=hr.prototype.jh,hr.prototype.setKeyForLinkData=hr.prototype.Ks,hr.prototype.getKeyForLinkData=hr.prototype.Ac,hr.prototype.removeLabelKeyForLinkData=hr.prototype.Qx,hr.prototype.addLabelKeyForLinkData=hr.prototype.Bu,hr.prototype.setLabelKeysForLinkData=hr.prototype.Ls,hr.prototype.getLabelKeysForLinkData=hr.prototype.Ef,hr.prototype.setToPortIdForLinkData=hr.prototype.Cv,hr.prototype.getToPortIdForLinkData=hr.prototype.Cx,hr.prototype.setFromPortIdForLinkData=hr.prototype.xv,hr.prototype.getFromPortIdForLinkData=hr.prototype.zx,hr.prototype.setToKeyForLinkData=hr.prototype.Bv,hr.prototype.getToKeyForLinkData=hr.prototype.Bx,hr.prototype.setFromKeyForLinkData=hr.prototype.wv,hr.prototype.getFromKeyForLinkData=hr.prototype.yx,hr.prototype.clear=hr.prototype.clear;var R0=Object.freeze([]);hr.className="GraphLinksModel",Kl.GraphLinksModel=hr,li.constructGraphLinksModel=li.constructGraphLinksModel=function(){return new hr},li.initDiagramModel=xy=function(){return new hr};function os(a,y){li.call(this),this.Ke="parent",this.Nm=!1,this.nj="parentLinkCategory",a!==void 0&&(Mn(a)?this.nodeDataArray=a:y=a),y&&(Object.assign(this,y),a=y.Changed)&&(delete this.Changed,this.Pe(a))}Ce(os,li),os.constructGraphLinksModel=li.constructGraphLinksModel,os.prototype.cloneProtected=function(a){li.prototype.cloneProtected.call(this,a),a.Ke=this.Ke,a.Nm=this.Nm,a.nj=this.nj},Ct=os.prototype,Ct.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,E=0;E<x;E++){var b=a[E];y+=" "+this.wa(b)+":"+Er(b)}}return y},Ct.rm=function(){var a=li.prototype.rm.call(this),y="";return this.nodeParentKeyProperty!=="parent"&&typeof this.nodeParentKeyProperty=="string"&&(y+=`,
"nodeParentKeyProperty": `+this.quote(this.nodeParentKeyProperty)),a+y},Ct.gp=function(a){li.prototype.gp.call(this,a),a.nodeParentKeyProperty&&(this.nodeParentKeyProperty=a.nodeParentKeyProperty)},Ct.fp=function(a){a.nodeParentKeyProperty!==void 0&&a.nodeParentKeyProperty!==this.nodeParentKeyProperty&&pe("applyIncrementalJson cannot change Model properties"),li.prototype.fp.call(this,a)},Ct.Vl=function(a){return a},Ct.mh=function(a){if(a!==null){var y=this.Ke;if(y!==""&&(y=ko(a,y),y!==void 0)){if(vc(y))return y;pe("ParentKey value for node data "+a+" is not a number or a string: "+y)}}},Ct.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 E=ko(a,x);E!==y&&(gu(this,E,a),no(a,x,y),this.hc(y)===null&&fu(this,y,a),Uo(this,"nodeParentKey",io,x,a,E,y),typeof x=="string"&&this.La(a,x))}else no(a,x,y)}},Ct.ss=function(a){if(a===null)return"";var y=this.nj;return y===""||(y=ko(a,y),y===void 0)?"":typeof y=="string"?y:(pe("getParentLinkCategoryForNodeData found a non-string category for "+a+": "+y),"")},os.prototype.getLinkCategoryForData=function(a){return this.ss(a)},os.prototype.Ms=function(a,y){if(a!==null){var x=this.nj;if(x!=="")if(this.lb(a)){var E=ko(a,x);E===void 0&&(E=""),E!==y&&(no(a,x,y),Uo(this,"parentLinkCategory",io,x,a,E,y),typeof x=="string"&&this.La(a,x))}else no(a,x,y)}},os.prototype.setLinkCategoryForData=function(a,y){this.Ms(a,y)},os.prototype.copyNodeData=function(a){return a===null?null:(a=li.prototype.copyNodeData.call(this,a),this.Jj||this.Ke===""||ko(a,this.Ke)===void 0||no(a,this.Ke,void 0),a)},os.prototype.setDataProperty=function(a,y,x){if(this.lb(a)){if(y===this.nodeKeyProperty){this.km(a,x);return}if(y===this.nodeCategoryProperty){this.jm(a,x);return}if(y===this.nodeParentKeyProperty){this.qe(a,x);return}}var E=ko(a,y);E!==x&&(no(a,y,x),this.Fs(a,y,E,x))},Ct=os.prototype,Ct.jp=function(a,y){li.prototype.jp.call(this,a,y);for(var x=this.kb.iterator;x.next();)this.qv(x.value,a,y)},Ct.qv=function(a,y,x){if(this.mh(a)===y){var E=this.Ke;no(a,E,x),Uo(this,"nodeParentKey",io,E,a,y,x),typeof E=="string"&&this.La(a,E)}},Ct.fm=function(a){li.prototype.fm.call(this,a),a=this.wa(a);var y=dm(this,a);if(y!==null){var x=Si();for(y=y.iterator;y.next();){var E=y.value;if(this.lb(E)&&this.mh(E)===a){var b=this.Ke;Uo(this,"nodeParentKey",io,b,E,a,a),typeof b=="string"&&this.La(E,b),x.push(E)}}for(y=0;y<x.length;y++)gu(this,a,x[y]);wi(x)}},Ct.em=function(a){li.prototype.em.call(this,a);var y=this.mh(a);y=this.Vl(y),this.hc(y)===null&&fu(this,y,a)},Ct.qp=function(a){li.prototype.qp.call(this,a);var y=this.mh(a);gu(this,y,a)},Ct.lm=function(a,y){li.prototype.lm.call(this,a,y),this.Ms(y,this.ss(a)),this.qe(y,this.mh(a))},Ct.Tl=function(){return!0},Ct.xs=function(){return!0},we.Object.defineProperties(os.prototype,{nodeParentKeyProperty:{get:function(){return this.Ke},set:function(a){var y=this.Ke;y!==a&&(this.Ke=a,this.g("nodeParentKeyProperty",y,a))}},Jj:{get:function(){return this.Nm},set:function(a){this.Nm!==a&&(this.Nm=a)}},parentLinkCategoryProperty:{get:function(){return this.nj},set:function(a){var y=this.nj;y!==a&&(this.nj=a,this.g("parentLinkCategoryProperty",y,a))}},linkCategoryProperty:{get:function(){return this.parentLinkCategoryProperty},set:function(a){this.parentLinkCategoryProperty=a}},type:{get:function(){return"TreeModel"}}}),os.prototype.setParentLinkCategoryForNodeData=os.prototype.Ms,os.prototype.getParentLinkCategoryForNodeData=os.prototype.ss,os.prototype.setParentKeyForNodeData=os.prototype.qe,os.prototype.getParentKeyForNodeData=os.prototype.mh,os.className="TreeModel",Kl.TreeModel=os;function mo(a){ro.call(this),this.lw=this.Zm=this.lc=0,this.Wp=360,this.kw=Zl,this.Ti=0,this.Zv=new Gt,this.Jp=this.me=0,this.Xr=new vm,this.gt=this.mj=0,this.ty=600,this.eo=NaN,this.Cm=1,this.ro=0,this.ul=360,this.Rb=Zl,this.K=as,this.nd=Pp,this.hd=gy,this.tf=6,this.Nn=U0,a&&Object.assign(this,a)}Ce(mo,ro),mo.prototype.cloneProtected=function(a){ro.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},mo.prototype.qb=function(a){a.classType===mo?a===W0||a===V0||a===G0||a===H0||a===Pp?this.sorting=a:a===Cf||a===xp||a===as||a===Sc?this.direction=a:a===Ld||a===yc||a===Zl||a===Yl?this.arrangement=a:(a===xg||a===U0)&&(this.nodeDiameterFormula=a):ro.prototype.qb.call(this,a)},mo.prototype.createNetwork=function(){return new wp(this)},mo.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 yn;y.addAll(a.iterator),a=new yn;var x=new yn,E=this.sort(y),b,z,tt=this.Jp,rt=this.arrangement,ot=this.nodeDiameterFormula,st=this.radius;(!isFinite(st)||0>=st)&&(st=NaN);var ut=this.aspectRatio;(!isFinite(ut)||0>=ut)&&(ut=1);var ft=this.startAngle;isFinite(ft)||(ft=0);var St=this.sweepAngle;if((!isFinite(St)||360<St||1>St)&&(St=360),y=this.spacing,isFinite(y)||(y=NaN),rt===Yl&&ot===xg?rt=Zl:rt===Yl&&ot!==xg&&(rt=this.arrangement),(this.direction===Cf||this.direction===xp)&&this.sorting!==Pp){for(ot=0;!(ot>=E.length)&&(a.add(E.M(ot)),!(ot+1>=E.length));ot+=2)x.add(E.M(ot+1));this.direction===Cf?(this.arrangement===Yl&&a.reverse(),E=new yn,E.addAll(a),E.addAll(x)):(this.arrangement===Yl&&x.reverse(),E=new yn,E.addAll(x),E.addAll(a))}ot=E.length;for(var wt=z=b=0;wt<E.length;wt++){var Et=ft+St*z*(this.direction===as?1:-1)/ot,Bt=E.M(wt).diameter;isNaN(Bt)&&(Bt=xc(E.M(wt),Et)),360>St&&(wt===0||wt===E.length-1)&&(Bt/=2),b+=Bt,z++}if(isNaN(st)||rt===Yl){if(isNaN(y)&&(y=6),rt!==Zl&&rt!==Yl){for(z=-1/0,tt=0;tt<ot;tt++)wt=E.M(tt),b=E.M(tt===ot-1?0:tt+1),isNaN(wt.diameter)&&xc(wt,0),isNaN(b.diameter)&&xc(b,0),z=Math.max(z,(wt.diameter+b.diameter)/2);tt=z+y,rt===Ld?st=(z+y)/(2*Math.PI/ot):st=j0(this,tt*(360<=St?ot:ot-1),ut,ft*Math.PI/180,St*Math.PI/180)}else st=j0(this,b+(360<=St?ot:ot-1)*(rt!==Yl?y:1.6*y),ut,ft*Math.PI/180,St*Math.PI/180);z=st*ut}else if(z=st*ut,wt=Cy(this,st,z,ft*Math.PI/180,St*Math.PI/180),isNaN(y))(rt===Zl||rt===Yl)&&(y=(wt-b)/(360<=St?ot:ot-1));else if(rt===Zl||rt===Yl)wt=(wt-b)/(360<=St?ot:ot-1),wt<y?(st=j0(this,b+y*(360<=St?ot:ot-1),ut,ft*Math.PI/180,St*Math.PI/180),z=st*ut):y=wt;else{for(tt=-1/0,b=0;b<ot;b++)Et=E.M(b),Bt=E.M(b===ot-1?0:b+1),isNaN(Et.diameter)&&xc(Et,0),isNaN(Bt.diameter)&&xc(Bt,0),tt=Math.max(tt,(Et.diameter+Bt.diameter)/2);tt+=y,b=j0(this,tt*(360<=St?ot:ot-1),ut,ft*Math.PI/180,St*Math.PI/180),b>st?(st=b,z=st*ut):tt=wt/(360<=St?ot:ot-1)}if(this.kw=rt,this.lc=st,this.Zm=ut,this.lw=ft,this.Wp=St,this.Ti=y,this.me=z,this.Jp=tt,y=E,E=this.kw,rt=this.lc,st=this.lw,ut=this.Wp,ft=this.Ti,St=this.me,ot=this.Jp,this.direction!==Cf&&this.direction!==xp||E!==Yl)if(this.direction===Cf||this.direction===xp){switch(tt=0,E){case yc:tt=180*z0(this,rt,St,st,ot)/Math.PI;break;case Zl:ot=y=0,tt=a.first(),tt!==null&&(y=xc(tt,Math.PI/2)),tt=x.first(),tt!==null&&(ot=xc(tt,Math.PI/2)),tt=180*z0(this,rt,St,st,ft+(y+ot)/2)/Math.PI;break;case Ld:tt=ut/y.length}if(this.direction===Cf){switch(E){case yc:mm(this,a,st,Sc);break;case Zl:pm(this,a,st,Sc);break;case Ld:gm(this,a,ut/2,st,Sc)}switch(E){case yc:mm(this,x,st+tt,as);break;case Zl:pm(this,x,st+tt,as);break;case Ld:gm(this,x,ut/2,st+tt,as)}}else{switch(E){case yc:mm(this,x,st,Sc);break;case Zl:pm(this,x,st,Sc);break;case Ld:gm(this,x,ut/2,st,Sc)}switch(E){case yc:mm(this,a,st+tt,as);break;case Zl:pm(this,a,st+tt,as);break;case Ld:gm(this,a,ut/2,st+tt,as)}}}else switch(E){case yc:mm(this,y,st,this.direction);break;case Zl:pm(this,y,st,this.direction);break;case Ld:gm(this,y,ut,st,this.direction);break;case Yl:DS(this,y,ut,st,this.direction)}else DS(this,y,ut,st-ut/2,as)}this.updateParts(),this.network=null,this.isValidLayout=!0};function gm(a,y,x,E,b){var z=a.Wp,tt=a.lc;a=a.me,E=E*Math.PI/180,x=x*Math.PI/180;for(var rt=y.length,ot=0;ot<rt;ot++){var st=E+(b===as?ot*x/(360<=z?rt:rt-1):-(ot*x)/rt),ut=y.M(ot),ft=tt*Math.tan(st)/a;ft=Math.sqrt((tt*tt+a*a*ft*ft)/(1+ft*ft)),ut.centerX=ft*Math.cos(st),ut.centerY=ft*Math.sin(st),ut.actualAngle=180*st/Math.PI}}function pm(a,y,x,E){var b=a.lc,z=a.me,tt=a.Ti;x=x*Math.PI/180;for(var rt=y.length,ot=0;ot<rt;ot++){var st=y.M(ot),ut=y.M(ot===rt-1?0:ot+1),ft=z*Math.sin(x);st.centerX=b*Math.cos(x),st.centerY=ft,st.actualAngle=180*x/Math.PI,isNaN(st.diameter)&&xc(st,0),isNaN(ut.diameter)&&xc(ut,0),st=z0(a,b,z,E===as?x:-x,(st.diameter+ut.diameter)/2+tt),x+=E===as?st:-st}}function mm(a,y,x,E){var b=a.lc,z=a.me,tt=a.Jp;x=x*Math.PI/180;for(var rt=y.length,ot=0;ot<rt;ot++){var st=y.M(ot);st.centerX=b*Math.cos(x),st.centerY=z*Math.sin(x),st.actualAngle=180*x/Math.PI,st=z0(a,b,z,E===as?x:-x,tt),x+=E===as?st:-st}}function DS(a,y,x,E,b){var z=a.Wp;if(a.mj=0,a.Xr=new vm,360>x){for(z=E+(b===as?z:-z);0>z;)z+=360;z%=360,180<z&&(z-=360),z*=Math.PI/180,a.gt=z,IS(a,y,x,E,b)}else TS(a,y,x,E,b);a.Xr.commit(y)}function TS(a,y,x,E,b){var z=a.lc,tt=a.Ti,rt=a.Zm,ot=z*Math.cos(E*Math.PI/180),st=a.me*Math.sin(E*Math.PI/180),ut=y.Fa();if(ut.length===3)ut[0].centerX=z,ut[0].centerY=0,ut[1].centerX=ut[0].centerX-ut[0].width/2-ut[1].width/2-tt,ut[1].y=ut[0].y,ut[2].centerX=(ut[0].centerX+ut[1].centerX)/2,ut[2].y=ut[0].y-ut[2].height-tt;else if(ut.length===4)ut[0].centerX=z,ut[0].centerY=0,ut[2].centerX=-ut[0].centerX,ut[2].centerY=ut[0].centerY,ut[1].centerX=0,ut[1].y=Math.min(ut[0].y,ut[2].y)-ut[1].height-tt,ut[3].centerX=0,ut[3].y=Math.max(ut[0].y+ut[0].height+tt,ut[2].y+ut[2].height+tt);else{z=Gt.alloc();for(var ft=0;ft<ut.length&&(ut[ft].centerX=ot,ut[ft].centerY=st,!(ft>=ut.length-1));ft++)OS(a,ot,st,ut,ft,b,z)||RS(a,ot,st,ut,ft,b,z),ot=z.x,st=z.y;if(Gt.free(z),a.mj++,!(23<a.mj)){ot=ut[0].centerX,st=ut[0].centerY,z=ut[ut.length-1].centerX,ft=ut[ut.length-1].centerY;var St=Math.abs(ot-z)-((ut[0].width+ut[ut.length-1].width)/2+tt),wt=Math.abs(st-ft)-((ut[0].height+ut[ut.length-1].height)/2+tt);tt=0,1>Math.abs(wt)?Math.abs(ot-z)<(ut[0].width+ut[ut.length-1].width)/2&&(tt=0):tt=0<wt?wt:1>Math.abs(St)?0:St,ot=Math.abs(z)>Math.abs(ft)?0<z!=st>ft:0<ft!=ot<z,(ot=b===as?ot:!ot)&&(tt=-Math.abs(tt),tt=Math.min(tt,-ut[ut.length-1].width),tt=Math.min(tt,-ut[ut.length-1].height)),a.Xr.compare(tt,ut),1<Math.abs(tt)&&(a.lc=8>a.mj?a.lc-tt/(2*Math.PI):5>ut.length&&10<tt?a.lc/2:a.lc-(0<tt?1.7:-2.3),a.me=a.lc*rt,TS(a,y,x,E,b))}}}function IS(a,y,x,E,b){for(var z=a.lc,tt=a.me,rt=a.Zm,ot=z*Math.cos(E*Math.PI/180),st=tt*Math.sin(E*Math.PI/180),ut=Gt.alloc(),ft=y.Fa(),St=0;St<ft.length&&(ft[St].centerX=ot,ft[St].centerY=st,!(St>=ft.length-1));St++)OS(a,ot,st,ft,St,b,ut)||RS(a,ot,st,ft,St,b,ut),ot=ut.x,st=ut.y;if(Gt.free(ut),a.mj++,!(23<a.mj)){if(ot=Math.atan2(st,ot),ot=b===as?a.gt-ot:ot-a.gt,ot=Math.abs(ot)<Math.abs(ot-2*Math.PI)?ot:ot-2*Math.PI,z=ot*(z+tt)/2,tt=a.Xr,Math.abs(z)<Math.abs(tt.Pl))for(tt.Pl=z,tt.mk=[],tt.tm=[],ot=0;ot<ft.length;ot++)tt.mk[ot]=ft[ot].bounds.x,tt.tm[ot]=ft[ot].bounds.y;1<Math.abs(z)&&(a.lc=8>a.mj?a.lc-z/(2*Math.PI):a.lc-(0<z?1.7:-2.3),a.me=a.lc*rt,IS(a,y,x,E,b))}}function OS(a,y,x,E,b,z,tt){var rt=a.lc,ot=a.me,st=0;a=(E[b].width+E[b+1].width)/2+a.Ti;var ut=!1;if(0<=x!=(z===as)){if(z=y+a,z>rt){if(z=y-a,z<-rt)return tt.x=z,tt.y=st,!1;ut=!0}}else if(z=y-a,z<-rt){if(z=y+a,z>rt)return tt.x=z,tt.y=st,!1;ut=!0}return st=Math.sqrt(1-Math.min(1,z*z/(rt*rt)))*ot,0>x!==ut&&(st=-st),Math.abs(x-st)>(E[b].height+E[b+1].height)/2?(tt.x=z,tt.y=st,!1):(tt.x=z,tt.y=st,!0)}function RS(a,y,x,E,b,z,tt){var rt=a.lc,ot=a.me,st=0;if(a=(E[b].height+E[b+1].height)/2+a.Ti,E=!1,0<=y!=(z===as)){if(z=x-a,z<-ot){if(z=x+a,z>ot){tt.x=st,tt.y=z;return}E=!0}}else if(z=x+a,z>ot){if(z=x-a,z<-ot){tt.x=st,tt.y=z;return}E=!0}st=Math.sqrt(1-Math.min(1,z*z/(ot*ot)))*rt,0>y!==E&&(st=-st),tt.x=st,tt.y=z}mo.prototype.commitLayout=function(){this.commitNodes(),this.isRouting&&this.commitLinks()},mo.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 Gt(0,0):(x.x=this.arrangementOrigin.x+this.lc,x.y=this.arrangementOrigin.y+this.me);for(var E=this.network.vertexes.iterator;E.next();){var b=E.value;b.x+=x.x,b.y+=x.y,b.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))},mo.prototype.commitLinks=function(){for(var a=this.network.edges.iterator;a.next();)a.value.commit()};function Cy(a,y,x,E,b){var z=a.ty;if(.001>Math.abs(a.Zm-1))return E!==void 0&&b!==void 0?b*y:2*Math.PI*y;a=y>x?Math.sqrt(y*y-x*x)/y:Math.sqrt(x*x-y*y)/x;for(var tt=0,rt=E!==void 0&&b!==void 0?b/(z+1):Math.PI/(2*(z+1)),ot=0,st=0;st<=z;st++){E!==void 0&&b!==void 0?ot=E+st*b/z:ot=st*Math.PI/(2*z);var ut=Math.sin(ot);tt+=Math.sqrt(1-a*a*ut*ut)*rt}return E!==void 0&&b!==void 0?(y>x?y:x)*tt:4*(y>x?y:x)*tt}function j0(a,y,x,E,b){return y/(E!==void 0&&b!==void 0?Cy(a,1,x,E,b):Cy(a,1,x))}function z0(a,y,x,E,b){if(.001>Math.abs(a.Zm-1))return b/y;var z=y>x?Math.sqrt(y*y-x*x)/y:Math.sqrt(x*x-y*y)/x,tt=0;a=2*Math.PI/(700*a.network.vertexes.count),y>x&&(E+=Math.PI/2);for(var rt=0;;rt++){var ot=Math.sin(E+rt*a);if(tt+=(y>x?y:x)*Math.sqrt(1-z*z*ot*ot)*a,tt>=b)return rt*a}}mo.prototype.sort=function(a){switch(this.sorting){case G0:break;case H0:a.reverse();break;case W0:a.sort(this.comparer);break;case V0:a.sort(this.comparer),a.reverse();break;case Pp:return this.ak(Dx(a));default:pe("Invalid sorting type.")}return a};function Dx(a){for(var y=[],x=0;x<a.length;x++)y.push(0);x=new yn;for(var E=0;E<a.length;E++){var b=-1,z=-1;if(E===0)for(var tt=0;tt<a.length;tt++){var rt=a.M(tt).edgesCount;rt>b&&(b=rt,z=tt)}else for(tt=0;tt<a.length;tt++)rt=y[tt],rt>b&&(b=rt,z=tt);for(x.add(a.M(z)),y[z]=-1,z=a.M(z),tt=z.sourceEdges;tt.next();)b=a.indexOf(tt.value.fromVertex),0>b||0<=y[b]&&y[b]++;for(z=z.destinationEdges;z.next();)b=a.indexOf(z.value.toVertex),0>b||0<=y[b]&&y[b]++}return x}mo.prototype.ak=function(a){for(var y=[],x=0;x<a.length;x++){var E=a.M(x);y[x]=[];for(var b,z=E.destinationEdges;z.next();)b=a.indexOf(z.value.toVertex),b!==x&&0>y[x].indexOf(b)&&y[x].push(b);for(E=E.sourceEdges;E.next();)b=a.indexOf(E.value.fromVertex),b!==x&&0>y[x].indexOf(b)&&y[x].push(b)}for(z=[],x=0;x<y.length;x++)z[x]=0;x=[];var tt=[],rt=[];E=[],b=new yn;for(var ot=0,st=0;st<y.length;st++){var ut=y[st].length;if(ut===1)E.push(st);else if(ut===0)b.add(a.M(st));else{if(ot===0)x.push(st);else{for(var ft=ut=1/0,St=-1,wt=[],Et=0;Et<x.length;Et++)0>y[x[Et]].indexOf(x[Et===x.length-1?0:Et+1])&&wt.push(Et===x.length-1?0:Et+1);if(wt.length===0)for(Et=0;Et<x.length;Et++)wt.push(Et);for(Et=0;Et<wt.length;Et++){for(var Bt=wt[Et],Vt=y[st],jt=0,_t=0;_t<tt.length;_t++){var Qt=z[tt[_t]],ie=z[rt[_t]];if(Qt<ie){var ce=Qt;Qt=ie}else ce=ie;if(ce<Bt&&Bt<=Qt)for(ie=0;ie<Vt.length;ie++){var ke=Vt[ie];0>x.indexOf(ke)||ce<z[ke]&&z[ke]<Qt||ce===z[ke]||Qt===z[ke]||jt++}else for(ie=0;ie<Vt.length;ie++)ke=Vt[ie],0>x.indexOf(ke)||ce<z[ke]&&z[ke]<Qt&&ce!==z[ke]&&Qt!==z[ke]&&jt++}for(Vt=jt,_t=jt=0;_t<y[st].length;_t++)ce=x.indexOf(y[st][_t]),0<=ce&&(ce=Math.abs(Bt-(ce>=Bt?ce+1:ce)),jt+=ce<x.length+1-ce?ce:x.length+1-ce);for(_t=0;_t<tt.length;_t++)ce=z[tt[_t]],Qt=z[rt[_t]],ce>=Bt&&ce++,Qt>=Bt&&Qt++,ce>Qt&&(ie=Qt,Qt=ce,ce=ie),Qt-ce<(x.length+2)/2==(ce<Bt&&Bt<=Qt)&&jt++;(Vt<ut||Vt===ut&&jt<ft)&&(ut=Vt,ft=jt,St=Bt)}for(x.splice(St,0,st),ut=0;ut<x.length;ut++)z[x[ut]]=ut;for(ut=0;ut<y[st].length;ut++)ft=y[st][ut],0<=x.indexOf(ft)&&(tt.push(st),rt.push(ft))}ot++}}for(tt=x.length;;){for(z=!0,rt=0;rt<E.length;rt++)if(ot=E[rt],st=y[ot][0],ut=x.indexOf(st),0<=ut){for(St=ft=0;St<y[st].length;St++)wt=x.indexOf(y[st][St]),0>wt||wt===ut||(Et=wt>ut?wt-ut:ut-wt,ft+=wt<ut!=Et>tt-Et?1:-1);x.splice(0>ft?ut:ut+1,0,ot),E.splice(rt,1),rt--}else z=!1;if(z)break;x.push(E[0]),E.splice(0,1)}for(y=0;y<x.length;y++)b.add(a.M(x[y]));return b},we.Object.defineProperties(mo.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!==Yl&&a!==Zl&&a!==yc&&a!==Ld||(this.Rb=a,this.C())}},direction:{get:function(){return this.K},set:function(a){this.K===a||a!==as&&a!==Sc&&a!==Cf&&a!==xp||(this.K=a,this.C())}},sorting:{get:function(){return this.nd},set:function(a){this.nd===a||a!==G0&&a!==H0&&a!==W0&&!V0&&a!==Pp||(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!==U0&&a!==xg||(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 Zl=new Je(mo,"ConstantSpacing",0),yc=new Je(mo,"ConstantDistance",1),Ld=new Je(mo,"ConstantAngle",2),Yl=new Je(mo,"Packed",3),as=new Je(mo,"Clockwise",4),Sc=new Je(mo,"Counterclockwise",5),Cf=new Je(mo,"BidirectionalLeft",6),xp=new Je(mo,"BidirectionalRight",7),G0=new Je(mo,"Forwards",8),H0=new Je(mo,"Reverse",9),W0=new Je(mo,"Ascending",10),V0=new Je(mo,"Descending",11),Pp=new Je(mo,"Optimized",12),U0=new Je(mo,"Pythagorean",13),xg=new Je(mo,"Circular",14);mo.className="CircularLayout",mo.ConstantSpacing=Zl,mo.ConstantDistance=yc,mo.ConstantAngle=Ld,mo.Packed=Yl,mo.Clockwise=as,mo.Counterclockwise=Sc,mo.BidirectionalLeft=Cf,mo.BidirectionalRight=xp,mo.Forwards=G0,mo.Reverse=H0,mo.Ascending=W0,mo.Descending=V0,mo.Optimized=Pp,mo.Pythagorean=U0,mo.Circular=xg;function vm(){this.Pl=-1/0,this.tm=this.mk=null}vm.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},vm.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]}},vm.className="VertexArrangement";function wp(a){_r.call(this,a)}Ce(wp,_r),wp.prototype.createVertex=function(){return new ym(this)},wp.prototype.createEdge=function(){return new K0(this)},wp.className="CircularNetwork";function ym(a){_o.call(this,a),this.u=this.Si=NaN}Ce(ym,_o);function xc(a,y){var x=a.network;if(x===null)return NaN;if(x=x.layout,x===null)return NaN;if(x.arrangement===Yl)if(x.nodeDiameterFormula===xg)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===xg?Math.max(a.width,a.height):Math.sqrt(a.width*a.width+a.height*a.height);return a.Si}we.Object.defineProperties(ym.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)}}}),ym.className="CircularVertex";function K0(a){Vs.call(this,a)}Ce(K0,Vs),K0.className="CircularEdge";function Ma(a){ro.call(this),this.ah=null,this.An=0,this.$d=new Re(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)}Ce(Ma,ro),Ma.prototype.cloneProtected=function(a){ro.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},Ma.prototype.createNetwork=function(){return new Pg(this)},Ma.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 E=x.iterator;E.next();){this.network=E.value;for(var b=this.network.vertexes.iterator;b.next();){var z=b.value;z.Vd=z.vertexes.count,z.sh=1,z.Hj=null,z.We=null}jS(this,0,a)}this.network=y;var tt=E=x.iterator;E=this.arrangementSpacing;var rt=tt.count,ot=!0;z=b=0;for(var st=Si(),ut=0;ut<rt+y.vertexes.count+2;ut++)st[ut]=null;rt=0,tt.reset();for(var ft=Ye.alloc();tt.next();)if(ut=tt.value,this.computeBounds(ut,ft),ot)ot=!1,b=ft.x+ft.width/2,z=ft.y+ft.height/2,st[0]=new Gt(ft.x+ft.width+E.width,ft.y),st[1]=new Gt(ft.x,ft.y+ft.height+E.height),rt=2;else{var St=zS(st,rt,b,z,ft.width,ft.height,E),wt=st[St],Et=new Gt(wt.x+ft.width+E.width,wt.y),Bt=new Gt(wt.x,wt.y+ft.height+E.height);for(St+1<rt&&st.splice(St+1,0,null),st[St]=Et,st[St+1]=Bt,rt++,St=wt.x-ft.x,wt=wt.y-ft.y,ut=ut.vertexes.iterator;ut.next();)Et=ut.value,Et.centerX+=St,Et.centerY+=wt}for(Ye.free(ft),ut=y.vertexes.iterator;ut.next();)tt=ut.value,St=tt.bounds,2>rt?(b=St.x+St.width/2,z=St.y+St.height/2,st[0]=new Gt(St.x+St.width+E.width,St.y),st[1]=new Gt(St.x,St.y+St.height+E.height),rt=2):(ot=zS(st,rt,b,z,St.width,St.height,E),ft=st[ot],wt=new Gt(ft.x+St.width+E.width,ft.y),St=new Gt(ft.x,ft.y+St.height+E.height),ot+1<rt&&st.splice(ot+1,0,null),st[ot]=wt,st[ot+1]=St,rt++,tt.centerX=ft.x+tt.width/2,tt.centerY=ft.y+tt.height/2);for(wi(st),E=x.iterator;E.next();){for(x=E.value,b=x.vertexes.iterator;b.next();)y.dh(b.value);for(x=x.edges.iterator;x.next();)y.Bo(x.value)}}HS(this,a),this.updateParts()}this.dl=a,this.network=null,this.isValidLayout=!0},Ma.prototype.needsClusterLayout=function(){if(3>this.network.vertexes.count)return!1;for(var a=0,y=0,x=this.network.vertexes.first().bounds,E=this.network.vertexes.iterator;E.next();){if(E.value.bounds.Yc(x)&&(a++,2<a))return!0;if(10<y)break;y++}return!1},Ma.prototype.computeBounds=function(a,y){var x=!0;for(a=a.vertexes.iterator;a.next();){var E=a.value;x?(x=!1,y.set(E.bounds)):y.ed(E.bounds)}return y};function jS(a,y,x){if(Tx(a,y)){var E=a.Zf;a.Zf*=1+1/(y+1);var b=Ix(a,y),z=Math.max(0,Math.max(Math.min(a.network.vertexes.count,x*(y+1)/11),10));for(a.maxIterations+=z,jS(a,y+1,x),HS(a,z),Ox(a,b),y=b.vertexes.Fa(),y.sort(function(tt,rt){return tt===null||rt===null||tt===rt?0:rt.Vd-tt.Vd}),x=0;x<y.length;x++)Rx(a,y[x]);a.Zf=E}}function Tx(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,E){return x===null||E===null||x===E?0:E.Vd-x.Vd}),y=a.length-1;0<=y&&1>=a[y].Vd;)y--;return 1<a.length-y}function Ix(a,y){for(var x=a.network,E=new Pg(a),b=0;b<a.ah.length;b++){var z=a.ah[b];if(1<z.Vd){E.dh(z);var tt=new WS;tt.Rs=z.Vd,tt.Ss=z.width,tt.Qs=z.height,tt.Sv=z.focus.x,tt.Tv=z.focus.y,z.We===null&&(z.We=new yn),z.We.add(tt),z.sv=z.We.count-1}else break}for(z=x.edges.iterator;z.next();){var rt=z.value;b=rt.fromVertex,tt=rt.toVertex,b.network===E&&tt.network===E?E.Bo(rt):b.network===E?(rt=b.Hj,rt===null&&(rt=new yn,b.Hj=rt),rt.add(tt),b.Vd--,b.sh+=tt.sh):tt.network===E&&(rt=tt.Hj,rt===null&&(rt=new yn,tt.Hj=rt),rt.add(b),tt.Vd--,tt.sh+=b.sh)}for(b=E.edges.iterator;b.next();)z=b.value,z.length*=Math.max(1,Se.sqrt((z.fromVertex.sh+z.toVertex.sh)/(4*y+1)));for(y=E.vertexes.iterator;y.next();){b=y.value;var ot=b.Hj;if(ot!==null&&0<ot.count&&(tt=b.We.M(b.We.count-1).Rs-b.Vd,!(0>=tt))){for(var st=rt=0,ut=ot.count-tt;ut<ot.count;ut++){var ft=ot.M(ut),St=null;for(z=ft.edges.iterator;z.next();){var wt=z.value;if(wt.Ax(ft)===b){St=wt;break}}St!==null&&(st+=St.length,rt+=ft.width*ft.height)}z=b.centerX,ot=b.centerY,ut=b.width,ft=b.height,St=b.focus,wt=ut*ft,1>wt&&(wt=1),rt=Se.sqrt((rt+wt+st*st*4/(tt*tt))/wt),tt=(rt-1)*ut/2,rt=(rt-1)*ft/2,b.bounds=new Ye(z-St.x-tt,ot-St.y-rt,ut+2*tt,ft+2*rt),b.focus=new Gt(St.x+tt,St.y+rt)}}return a.network=E,x}function Ox(a,y){for(var x=a.network.vertexes.iterator;x.next();){var E=x.value;if(E.network=y,E.We!==null){var b=E.We.M(E.sv);E.Vd=b.Rs;var z=b.Sv,tt=b.Tv;E.bounds=new Ye(E.centerX-z,E.centerY-tt,b.Ss,b.Qs),E.focus=new Gt(z,tt),E.sv--}}for(x=a.network.edges.iterator;x.next();)x.value.network=y;a.network=y}function Rx(a,y){var x=y.Hj;if(x!==null&&x.count!==0){var E=y.centerX,b=y.centerY,z=y.width,tt=y.height;y.We!==null&&0<y.We.count&&(tt=y.We.M(0),z=tt.Ss,tt=tt.Qs),z=Se.sqrt(z*z+tt*tt)/2;for(var rt=!1,ot=tt=0,st=0,ut=y.vertexes.iterator;ut.next();){var ft=ut.value;1>=ft.Vd?ot++:(rt=!0,st++,tt+=Math.atan2(y.centerY-ft.centerY,y.centerX-ft.centerX))}if(ot!==0){for(0<st&&(tt/=st),st=y=0,y=rt?2*Math.PI/(ot+1):2*Math.PI/ot,ot%2===0&&(st=y/2),1<x.count&&x.sort(function(wt,Et){return wt===null||Et===null||wt===Et?0:Et.width*Et.height-wt.width*wt.height}),rt=ot%2===0?0:1,x=x.iterator;x.next();)if(ot=x.value,!(1<ot.Vd||a.isFixed(ot))){for(ut=null,ft=ot.edges.iterator;ft.next();){ut=ft.value;break}ft=ot.width;var St=ot.height;ft=Se.sqrt(ft*ft+St*St)/2,ut=z+ut.length+ft,ft=tt+(y*(rt/2>>1)+st)*(rt%2===0?1:-1),ot.centerX=E+ut*Math.cos(ft),ot.centerY=b+ut*Math.sin(ft),rt++}}}}function zS(a,y,x,E,b,z,tt){var rt=9e19,ot=-1,st=0;t:for(;st<y;st++){var ut=a[st],ft=ut.x-x,St=ut.y-E;if(ft=ft*ft+St*St,ft<rt){for(St=st-1;0<=St;St--)if(a[St].y>ut.y&&a[St].x-ut.x<b+tt.width)continue t;for(St=st+1;St<y;St++)if(a[St].x>ut.x&&a[St].y-ut.y<z+tt.height)continue t;ot=st,rt=ft}}return ot}Ma.prototype.Cu=function(){if(this.comments)for(var a=this.network.vertexes.iterator;a.next();)this.addComments(a.value)},Ma.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 E=this.network.ki(x);E===null&&(E=this.network.Bl(x)),E.charge=this.defaultCommentElectricalCharge,x=null;for(var b=E.destinationEdges;b.next();){var z=b.value;if(z.toVertex===a){x=z;break}}if(x===null){for(b=E.sourceEdges;b.next();)if(z=b.value,z.fromVertex===a){x=z;break}}x===null&&(x=this.network.Zj(a,E,null)),x.length=this.defaultCommentSpringLength}}};function GS(a,y){var x=a.bounds,E=x.x;a=x.y;var b=x.width;x=x.height;var z=y.bounds,tt=z.x;y=z.y;var rt=z.width;return z=z.height,E+b<tt?a>y+z?(x=E+b-tt,a=a-y-z,Se.sqrt(x*x+a*a)):a+x<y?(E=E+b-tt,a=a+x-y,Se.sqrt(E*E+a*a)):tt-(E+b):E>tt+rt?a>y+z?(x=E-tt-rt,a=a-y-z,Se.sqrt(x*x+a*a)):a+x<y?(E=E-tt-rt,a=a+x-y,Se.sqrt(E*E+a*a)):E-(tt+rt):a>y+z?a-(y+z):a+x<y?y-(a+x):.1}function HS(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 E=x.centerX,b=E,z=x=x.centerY,tt=1;tt<y.length;tt++){var rt=y[tt];rt.forceX=0,rt.forceY=0;var ot=rt.centerX;rt=rt.centerY,E=Math.min(E,ot),b=Math.max(b,ot),x=Math.min(x,rt),z=Math.max(z,rt)}(b=b-E>z-x)?y.sort(function(Bt,Vt){return Bt===null||Vt===null||Bt===Vt?0:Bt.centerX-Vt.centerX}):y.sort(function(Bt,Vt){return Bt===null||Vt===null||Bt===Vt?0:Bt.centerY-Vt.centerY}),x=a.Zf;var st=E=rt=0;for(z=0;z<y.length;z++){tt=y[z],E=tt.bounds,rt=tt.focus,ot=E.x+rt.x;var ut=E.y+rt.y;E=tt.charge*a.electricalFieldX(ot,ut),st=tt.charge*a.electricalFieldY(ot,ut),E+=tt.mass*a.gravitationalFieldX(ot,ut),st+=tt.mass*a.gravitationalFieldY(ot,ut),tt.forceX+=E,tt.forceY+=st;for(var ft=z+1;ft<y.length;ft++){var St=y[ft];if(St!==tt){E=St.bounds,rt=St.focus,st=E.x+rt.x;var wt=E.y+rt.y;if(ot-st>x||st-ot>x){if(b)break}else if(ut-wt>x||wt-ut>x){if(!b)break}else{var Et=GS(tt,St);1>Et?(E=a.randomNumberGenerator,E===null&&(a.randomNumberGenerator=E=new Z0),Et=E.random(),rt=E.random(),ot>st?(E=Math.abs(St.bounds.right-tt.bounds.x),E=(1+E)*Et):ot<st?(E=Math.abs(St.bounds.x-tt.bounds.right),E=-(1+E)*Et):(E=Math.max(St.width,tt.width),E=(1+E)*Et-E/2),ut>wt?(st=Math.abs(St.bounds.bottom-tt.bounds.y),st=(1+st)*rt):ot<st?(st=Math.abs(St.bounds.y-tt.bounds.bottom),st=-(1+st)*rt):(st=Math.max(St.height,tt.height),st=(1+st)*rt-st/2)):(rt=-(tt.charge*St.charge)/(Et*Et),E=(st-ot)/Et*rt,st=(wt-ut)/Et*rt),tt.forceX+=E,tt.forceY+=st,St.forceX-=E,St.forceY-=st}}}}for(b=a.network.edges.iterator;b.next();)rt=b.value,x=rt.fromVertex,z=rt.toVertex,tt=x.bounds,ot=x.focus,E=tt.x+ot.x,tt=tt.y+ot.y,ut=z.bounds,ft=z.focus,ot=ut.x+ft.x,ut=ut.y+ft.y,ft=GS(x,z),1>ft?(ft=a.randomNumberGenerator,ft===null&&(a.randomNumberGenerator=ft=new Z0),rt=ft.random(),ft=ft.random(),E=(E>ot?1:-1)*(1+(z.width>x.width?z.width:x.width))*rt,st=(tt>ut?1:-1)*(1+(z.height>x.height?z.height:x.height))*ft):(rt=rt.stiffness*(ft-rt.length),E=(ot-E)/ft*rt,st=(ut-tt)/ft*rt),x.forceX+=E,x.forceY+=st,z.forceX-=E,z.forceY-=st;for(b=E=0;b<y.length;b++)x=y[b],a.isFixed(x)?a.moveFixedVertex(x):E=Math.max(E,a.moveVertex(x)||0);return E>a.epsilonDistance*a.epsilonDistance}Ma.prototype.moveVertex=function(a){var y=a.forceX,x=a.forceY,E=this.moveLimit;return y<-E?y=-E:y>E&&(y=E),x<-E?x=-E:x>E&&(x=E),a.centerX+=y,a.centerY+=x,y*y+x*x},Ma.prototype.moveFixedVertex=function(){},Ma.prototype.commitLayout=function(){this.yv(),this.commitNodes(),this.isRouting&&this.commitLinks()},Ma.prototype.yv=function(){if(this.setsPortSpots)for(var a=this.network.edges.iterator;a.next();){var y=a.value.link;y!==null&&(y.fromSpot=ha,y.toSpot=ha)}},Ma.prototype.commitNodes=function(){var a=0,y=0;if(this.arrangesToOrigin){var x=Ye.alloc();this.computeBounds(this.network,x),y=this.arrangementOrigin,a=y.x-x.x,y=y.y-x.y,Ye.free(x)}x=Ye.alloc();for(var E=this.network.vertexes.iterator;E.next();){var b=E.value;(a!==0||y!==0)&&(x.assign(b.bounds),x.x+=a,x.y+=y,b.bounds=x),b.commit()}Ye.free(x)},Ma.prototype.commitLinks=function(){for(var a=this.network.edges.iterator;a.next();)a.value.commit()},Ma.prototype.springStiffness=function(a){return a=a.stiffness,isNaN(a)?this.Hk:a},Ma.prototype.springLength=function(a){return a=a.length,isNaN(a)?this.Gk:a},Ma.prototype.electricalCharge=function(a){return a=a.charge,isNaN(a)?this.Ek:a},Ma.prototype.electricalFieldX=function(){return 0},Ma.prototype.electricalFieldY=function(){return 0},Ma.prototype.gravitationalMass=function(a){return a=a.mass,isNaN(a)?this.Fk:a},Ma.prototype.gravitationalFieldX=function(){return 0},Ma.prototype.gravitationalFieldY=function(){return 0},Ma.prototype.isFixed=function(a){return a.isFixed},we.Object.defineProperties(Ma.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"&&pe('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())}}}),Ma.className="ForceDirectedLayout";function WS(){this.Tv=this.Sv=this.Qs=this.Ss=this.Rs=0}WS.className="ForceDirectedSubnet";function Pg(a){_r.call(this,a)}Ce(Pg,_r),Pg.prototype.createVertex=function(){return new Sm(this)},Pg.prototype.createEdge=function(){return new xm(this)},Pg.className="ForceDirectedNetwork";function Sm(a){_o.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}Ce(Sm,_o),we.Object.defineProperties(Sm.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)}}}),Sm.className="ForceDirectedVertex";function xm(a){Vs.call(this,a),this.j=this.o=NaN}Ce(xm,Vs),we.Object.defineProperties(xm.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)}}}),xm.className="ForceDirectedEdge";function Z0(){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()}Z0.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},Z0.className="RandomNumberGenerator";function zr(a){ro.call(this),this.kc=this.ie=25,this.K=0,this.Dk=Q0,this.Zk=q0,this.Qk=$0,this.bj=4,this.rk=tv,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 Gt,this.He=[],this.He.length=100,this.xw=this.ve=0,a&&Object.assign(this,a)}Ce(zr,ro),zr.prototype.cloneProtected=function(a){ro.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},zr.prototype.qb=function(a){a.classType===zr?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:pe("Unknown enum value: "+a):ro.prototype.qb.call(this,a)},zr.prototype.createNetwork=function(){return new Ep(this)},zr.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!==wm&&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===wm&&this.removeCycles(),a=this.network;for(var y=[],x=a.edges.iterator;x.next();){var E=x.value;E.valid=!1,y.push(E)}for(x=0;x<y.length;x++){E=y[x];var b=E.fromVertex,z=E.toVertex;if(!(E.valid||(b.node===null&&b.data===null||z.node===null&&z.data===null)&&b.layer===z.layer)){var tt=0,rt=0,ot=0,st=0;if(E.link!==null){if(rt=E.link,rt===null)continue;var ut=b.node;if(tt=z.node,ut===null||tt===null)continue;var ft=rt.fromNode;ot=rt.toNode;for(var St=rt.fromPort;St!==null&&!St.Ed();)St=St.panel;for(rt=rt.toPort;rt!==null&&!rt.Ed();)rt=rt.panel;if(E.rev){st=ft;var wt=St;ft=ot,St=rt,ot=st,rt=wt}var Et=b.focus;st=z.focus;var Bt=E.rev?z.bounds:b.bounds;wt=Gt.alloc(),ut!==ft?Bt.w()&&ft.isVisible()?ft.actualBounds.w()?(Pd(ft,St,Br,wt),wt.x+=ft.actualBounds.x-Bt.x,wt.y+=ft.actualBounds.y-Bt.y):(Pd(ft,St,Br,wt),wt.w()||wt.assign(Et)):wt.assign(Et):Bt.w()?(Pd(ft,St,Br,wt),wt.w()||wt.assign(Et)):wt.assign(Et),ft=E.rev?b.bounds:z.bounds,ut=Gt.alloc(),tt!==ot?ft.w()&&ot.isVisible()?ot.actualBounds.w()?(Pd(ot,rt,Br,ut),ut.x+=ot.actualBounds.x-ft.x,ut.y+=ot.actualBounds.y-ft.y):(Pd(ot,rt,Br,ut),ut.w()||ut.assign(st)):ut.assign(st):ft.w()?(Pd(ot,rt,Br,ut),ut.w()||ut.assign(st)):ut.assign(st),this.K===90||this.K===270?(tt=Math.round((wt.x-Et.x)/this.kc),ot=wt.x,rt=Math.round((ut.x-st.x)/this.kc),st=ut.x):(tt=Math.round((wt.y-Et.y)/this.kc),ot=wt.y,rt=Math.round((ut.y-st.y)/this.kc),st=ut.y),Gt.free(wt),Gt.free(ut),E.portFromColOffset=tt,E.portFromPos=ot,E.portToColOffset=rt,E.portToPos=st}else E.portFromColOffset=0,E.portFromPos=0,E.portToColOffset=0,E.portToPos=0;if(wt=b.layer,ut=z.layer,ft=0,Bt=E.link,Bt!==null){var Vt=Bt.fromPort,jt=Bt.toPort;if(Vt!==null&&jt!==null){var _t=Bt.fromNode;if(St=Bt.toNode,_t!==null&&St!==null){var Qt=J0(this,!0),ie=J0(this,!1),ce=this.setsPortSpots?Qt:Bt.computeSpot(!0,Vt);Et=this.setsPortSpots?ie:Bt.computeSpot(!1,jt);var ke=Bt.isOrthogonal;ce.$c()&&ce.Hf(ie)&&Et.$c()&&Et.Hf(Qt)?ft=0:(Qt=Bt.getLinkPoint(_t,Vt,ce,!0,ke,St,jt,Gt.alloc()),ie=Bt.getLinkDirection(_t,Vt,Qt,ce,!0,ke,St,jt),Gt.free(Qt),ce.ys()||ie!==QS(this,E,!0)?this.setsPortSpots&&_t!==null&&_t.ports.count===1&&E.rev&&(ft+=1):ft+=1,ce=Bt.getLinkPoint(St,jt,Et,!1,ke,_t,Vt,Gt.alloc()),Bt=Bt.getLinkDirection(St,jt,ce,Et,!1,ke,_t,Vt),Gt.free(ce),Et.ys()||Bt!==QS(this,E,!1)?this.setsPortSpots&&St!==null&&St.ports.count===1&&E.rev&&(ft+=2):ft+=2)}}}if(St=ft,ft=St===1||St===3,(St=St===2||St===3)&&(Et=a.createVertex(),Et.node=null,Et.Dj=1,Et.layer=wt,Et.near=b,a.dh(Et),b=a.Zj(b,Et,E.link),b.valid=!1,b.rev=E.rev,b.portFromColOffset=tt,b.portToColOffset=0,b.portFromPos=ot,b.portToPos=0,b=Et),Bt=1,ft&&Bt--,wt-ut>Bt&&0<wt){for(E.valid=!1,Et=a.createVertex(),Et.node=null,Et.Dj=2,Et.layer=wt-1,a.dh(Et),b=a.Zj(b,Et,E.link),b.valid=!0,b.rev=E.rev,b.portFromColOffset=St?0:tt,b.portToColOffset=0,b.portFromPos=St?0:ot,b.portToPos=0,b=Et,wt--;wt-ut>Bt&&0<wt;)Et=a.createVertex(),Et.node=null,Et.Dj=3,Et.layer=wt-1,a.dh(Et),b=a.Zj(b,Et,E.link),b.valid=!0,b.rev=E.rev,b.portFromColOffset=0,b.portToColOffset=0,b.portFromPos=0,b.portToPos=0,b=Et,wt--;b=a.Zj(Et,z,E.link),b.valid=!ft,ft&&(Et.near=z),b.rev=E.rev,b.portFromColOffset=0,b.portToColOffset=rt,b.portFromPos=0,b.portToPos=st}else E.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=Pc(this,a),x=0,E=this.tc[a],z=0;z<E;z++)b=y[z],x+=this.nodeMinColumnSpace(b,!0),b.column=x,x+=1,x+=this.nodeMinColumnSpace(b,!1);this.Ra=Math.max(this.Ra,x-1),wc(this,a,y)}this.reduceCrossings(),this.straightenAndPack(),this.updateParts()}this.network=null,this.isValidLayout=!0},zr.prototype.linkMinLength=function(){return 1};function Ey(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}zr.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},zr.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 ys(a){a.kj===null&&(a.kj=[]);for(var y=0,x=a.network.vertexes.iterator;x.next();){var E=x.value;a.kj[y]=E.layer,y++,a.kj[y]=E.column,y++,a.kj[y]=E.index,y++}return a.kj}function pl(a,y){var x=0;for(a=a.network.vertexes.iterator;a.next();){var E=a.value;E.layer=y[x],x++,E.column=y[x],x++,E.index=y[x],x++}}function VS(a,y,x){var E=Pc(a,y),b=a.tc[y];(a.Jn===null||a.Jn.length<b*b)&&(a.Jn=[]);for(var z=a.Jn,tt=0;tt<b;tt++){var rt=0,ot=E[tt],st=ot.near;if(st!==null&&st.layer===ot.layer)if(ot=st.index,ot>tt)for(var ut=tt+1;ut<ot;ut++){var ft=E[ut];ft.near===st&&ft.Dj===st.Dj||rt++}else for(ut=tt-1;ut>ot;ut--)ft=E[ut],ft.near===st&&ft.Dj===st.Dj||rt++;var St;if(0<=x)for(ot=E[tt].sourceEdgesArrayAccess,st=0;st<ot.length;st++){var wt=ot[st];if(wt.valid&&wt.fromVertex.layer!==y)for(ft=wt.fromVertex.index,ut=wt.portToPos,wt=wt.portFromPos,St=st+1;St<ot.length;St++){var Et=ot[St];if(Et.valid&&Et.fromVertex.layer!==y){var Bt=Et.fromVertex.index,Vt=Et.portToPos;Et=Et.portFromPos,ut<Vt&&(ft>Bt||ft===Bt&&wt>Et)&&rt++,Vt<ut&&(Bt>ft||Bt===ft&&Et>wt)&&rt++}}}if(0>=x){for(ot=E[tt].destinationEdgesArrayAccess,st=0;st<ot.length;st++)if(wt=ot[st],wt.valid&&wt.toVertex.layer!==y)for(ft=wt.toVertex.index,ut=wt.portToPos,wt=wt.portFromPos,St=st+1;St<ot.length;St++)Et=ot[St],Et.valid&&Et.toVertex.layer!==y&&(Bt=Et.toVertex.index,Vt=Et.portToPos,Et=Et.portFromPos,wt<Et&&(ft>Bt||ft===Bt&&ut>Vt)&&rt++,Et<wt&&(Bt>ft||Bt===ft&&Vt>ut)&&rt++)}for(z[tt*b+tt]=rt,ot=tt+1;ot<b;ot++){var jt=0,_t=0;if(0<=x){rt=E[tt].sourceEdgesArrayAccess;var Qt=E[ot].sourceEdgesArrayAccess;for(st=0;st<rt.length;st++)if(wt=rt[st],wt.valid&&wt.fromVertex.layer!==y)for(ft=wt.fromVertex.index,wt=wt.portFromPos,St=0;St<Qt.length;St++)Et=Qt[St],Et.valid&&Et.fromVertex.layer!==y&&(Bt=Et.fromVertex.index,Et=Et.portFromPos,(ft<Bt||ft===Bt&&wt<Et)&&_t++,(Bt<ft||Bt===ft&&Et<wt)&&jt++)}if(0>=x){for(rt=E[tt].destinationEdgesArrayAccess,Qt=E[ot].destinationEdgesArrayAccess,st=0;st<rt.length;st++)if(wt=rt[st],wt.valid&&wt.toVertex.layer!==y)for(ft=wt.toVertex.index,ut=wt.portToPos,St=0;St<Qt.length;St++)Et=Qt[St],Et.valid&&Et.toVertex.layer!==y&&(Bt=Et.toVertex.index,Vt=Et.portToPos,(ft<Bt||ft===Bt&&ut<Vt)&&_t++,(Bt<ft||Bt===ft&&Vt<ut)&&jt++)}z[tt*b+ot]=jt,z[ot*b+tt]=_t}}return wc(a,y,E),z}zr.prototype.countCrossings=function(){for(var a=0,y=0;y<=this.Ia;y++)for(var x=VS(this,y,1),E=this.tc[y],b=0;b<E;b++)for(var z=b;z<E;z++)a+=x[b*E+z];return a};function Y0(a){for(var y=0,x=0;x<=a.Ia;x++){for(var E=a,b=x,z=Pc(E,b),tt=E.tc[b],rt=0,ot=0;ot<tt;ot++){var st=z[ot].destinationEdgesArrayAccess;if(st!==null)for(var ut=0;ut<st.length;ut++){var ft=st[ut];if(ft.valid&&ft.toVertex.layer!==b){var St=ft.fromVertex.column+ft.portFromColOffset,wt=ft.toVertex.column+ft.portToColOffset;rt+=(Math.abs(St-wt)+1)*Ey(ft)}}}wc(E,b,z),y+=rt}return y}zr.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 by(a,y,x){for(var E=Pc(a,y),b=a.tc[y],z=[],tt=0;tt<b;tt++){var rt=E[tt],ot=null;0>=x&&(ot=rt.sourceEdgesArrayAccess);var st=null;0<=x&&(st=rt.destinationEdgesArrayAccess);var ut=0,ft=0,St=rt.near;if(St!==null&&St.layer===rt.layer&&(ut+=St.column-1,ft++),ot!==null)for(St=0;St<ot.length;St++){rt=ot[St];var wt=rt.fromVertex;rt.valid&&!rt.rev&&wt.layer!==y&&(ut+=wt.column,ft++)}if(st!==null)for(ot=0;ot<st.length;ot++)rt=st[ot],St=rt.toVertex,rt.valid&&!rt.rev&&St.layer!==y&&(ut+=St.column,ft++);z[tt]=ft===0?-1:ut/ft}return wc(a,y,E),z}function US(a,y,x){for(var E=Pc(a,y),b=a.tc[y],z=[],tt=0;tt<b;tt++){var rt=E[tt],ot=null;0>=x&&(ot=rt.sourceEdgesArrayAccess);var st=null;0<=x&&(st=rt.destinationEdgesArrayAccess);var ut=0,ft=[],St=rt.near;if(St!==null&&St.layer===rt.layer&&(ft[ut]=St.column-1,ut++),rt=void 0,ot!==null)for(St=0;St<ot.length;St++){rt=ot[St];var wt=rt.fromVertex;rt.valid&&!rt.rev&&wt.layer!==y&&(ft[ut]=wt.column+rt.portFromColOffset,ut++)}if(st!==null)for(ot=0;ot<st.length;ot++)rt=st[ot],St=rt.toVertex,rt.valid&&!rt.rev&&St.layer!==y&&(ft[ut]=St.column+rt.portToColOffset,ut++);ut===0?z[tt]=-1:(ft.sort(function(Et,Bt){return Et-Bt}),st=ut>>1,z[tt]=ut&1?ft[st]:ft[st-1]+ft[st]>>1)}return wc(a,y,E),z}function Pm(a,y,x,E,b,z){if(y.component===E){if(y.component=x,b)for(var tt=y.destinationEdges;tt.next();){var rt=tt.value,ot=rt.toVertex,st=y.layer-ot.layer;rt=a.linkMinLength(rt),st===rt&&Pm(a,ot,x,E,b,z)}if(z)for(tt=y.sourceEdges;tt.next();)rt=tt.value,ot=rt.fromVertex,st=ot.layer-y.layer,rt=a.linkMinLength(rt),st===rt&&Pm(a,ot,x,E,b,z)}}function Ly(a,y,x,E,b,z){if(y.component===E){if(y.component=x,b)for(var tt=y.destinationEdges;tt.next();)Ly(a,tt.value.toVertex,x,E,b,z);if(z)for(y=y.sourceEdges;y.next();)Ly(a,y.value.fromVertex,x,E,b,z)}}zr.prototype.removeCycles=function(){for(var a=this.network.edges.iterator;a.next();)a.value.rev=!1;switch(this.Dk){default:case Fy:a=this.network;var y=0,x=a.vertexes.count-1,E=[];E.length=x+1;for(var b=a.vertexes.iterator;b.next();)b.value.valid=!0;for(;zx(a)!==null;){for(b=KS(a);b!==null;)E[x]=b,x--,b.valid=!1,b=KS(a);for(b=ZS(a);b!==null;)E[y]=b,y++,b.valid=!1,b=ZS(a);b=null;for(var z=0,tt=this.network.vertexes.iterator;tt.next();){var rt=tt.value;if(rt.valid){for(var ot=0,st=rt.destinationEdges;st.next();)st.value.toVertex.valid&&ot++;st=0;for(var ut=rt.sourceEdges;ut.next();)ut.value.fromVertex.valid&&st++;(b===null||z<ot-st)&&(b=rt,z=ot-st)}}b!==null&&(E[y]=b,y++,b.valid=!1)}for(y=0;y<a.vertexes.count;y++)E[y].index=y;for(E=a.edges.iterator;E.next();)y=E.value,y.fromVertex.index>y.toVertex.index&&(a.gm(y),y.rev=!0);break;case Q0:for(E=this.network.vertexes.iterator;E.next();)a=E.value,a.Ll=-1,a.finish=-1;for(a=this.network.edges.iterator;a.next();)a.value.forest=!1;for(this.Kn=0,E.reset();E.next();)y=E.value,y.sourceEdges.count===0&&My(this,y);for(E.reset();E.next();)y=E.value,y.Ll===-1&&My(this,y);for(a.reset();a.next();)E=a.value,E.forest||(y=E.fromVertex,x=y.finish,b=E.toVertex,z=b.finish,b.Ll<y.Ll&&x<z&&(this.network.gm(E),E.rev=!0));break;case wm:for(a=this.network,y=a.vertexes.iterator,E=1/0;y.next();)E=Math.min(E,y.value.layer);if(1/0>E){if(0>E)for(y.reset();y.next();)y.value.layer-=E;for(E=[],y.reset();y.next();)x=y.value,b=E[x.layer],b===void 0?E[x.layer]=[x]:b.push(x);for(x=y=0;x<E.length;x++)if(b=E[x],!b||b.length===0)y++;else if(0<x)for(z=0;z<b.length;z++)b[z].layer-=y;for(E=a.edges.iterator;E.next();)y=E.value,y.fromVertex.layer<y.toVertex.layer&&(a.gm(y),y.rev=!0)}}};function zx(a){for(a=a.vertexes.iterator;a.next();){var y=a.value;if(y.valid)return y}return null}function KS(a){for(a=a.vertexes.iterator;a.next();){var y=a.value;if(y.valid){for(var x=!0,E=y.destinationEdges;E.next();)if(E.value.toVertex.valid){x=!1;break}if(x)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,E=y.sourceEdges;E.next();)if(E.value.fromVertex.valid){x=!1;break}if(x)return y}}return null}function My(a,y){y.Ll=a.Kn,a.Kn++;for(var x=y.destinationEdges;x.next();){var E=x.value,b=E.toVertex;b.Ll===-1&&(E.forest=!0,My(a,b))}y.finish=a.Kn,a.Kn++}zr.prototype.assignLayers=function(){switch(this.Zk){case By:YS(this);break;case ky:for(var a,y=this.network.vertexes.iterator;y.next();)a=_S(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 q0:for(YS(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 YS(a){for(var y=a.network.vertexes.iterator;y.next();){var x=XS(a,y.value);a.Ia=Math.max(x,a.Ia)}}function XS(a,y){var x=0;if(y.layer===-1){for(var E=y.destinationEdges;E.next();){var b=E.value,z=b.toVertex;b=a.linkMinLength(b),x=Math.max(x,XS(a,z)+b)}y.layer=x}else x=y.layer;return x}function _S(a,y){var x=0;if(y.layer===-1){for(var E=y.sourceEdges;E.next();){var b=E.value,z=b.fromVertex;b=a.linkMinLength(b),x=Math.max(x,_S(a,z)+b)}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 E=y.sourceEdgesArrayAccess,b=E.length,z=0;z<b;z++){var tt=E[z],rt=tt.fromVertex,ot=tt.toVertex;tt=a.linkMinLength(tt),rt.layer-ot.layer>tt&&Pm(a,rt,0,-1,!0,!1)}for(Pm(a,y,1,-1,!0,!0);y.component!==0;){for(z=0,E=1/0,rt=0,ot=null,tt=a.network.vertexes.iterator;tt.next();){var st=tt.value;if(st.component===1){var ut=0,ft=!1,St=st.sourceEdgesArrayAccess;b=St.length;for(var wt=0;wt<b;wt++){var Et=St[wt],Bt=Et.fromVertex;ut+=1,Bt.component!==1&&(z+=1,Bt=Bt.layer-st.layer,Et=a.linkMinLength(Et),E=Math.min(E,Bt-Et))}for(St=st.destinationEdgesArrayAccess,b=St.length,wt=0;wt<b;wt++)Et=St[wt].toVertex,--ut,Et.component!==1?--z:ft=!0;(ot===null||ut<rt)&&!ft&&(ot=st,rt=ut)}}if(0<z){for(x.reset();x.next();)b=x.value,b.component===1&&(b.layer+=E);y.component=0}else ot.component=0}for(x=a.network.vertexes.iterator;x.next();)x.value.component=-1;for(Pm(a,y,1,-1,!0,!1);y.component!==0;){for(E=0,b=1/0,z=0,rt=null,ot=a.network.vertexes.iterator;ot.next();)if(tt=ot.value,tt.component===1){for(st=0,ut=!1,St=tt.sourceEdgesArrayAccess,ft=St.length,wt=0;wt<ft;wt++)Et=St[wt].fromVertex,st+=1,Et.component!==1?E+=1:ut=!0;for(St=tt.destinationEdgesArrayAccess,ft=St.length,wt=0;wt<ft;wt++)Et=St[wt],Bt=Et.toVertex,--st,Bt.component!==1&&(--E,Bt=tt.layer-Bt.layer,Et=a.linkMinLength(Et),b=Math.min(b,Bt-Et));(rt===null||st>z)&&!ut&&(rt=tt,z=st)}if(0>E){for(x.reset();x.next();)E=x.value,E.component===1&&(E.layer-=b);y.component=0}else rt.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}zr.prototype.initializeIndices=function(){switch(this.Qk){default:case Dy: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 $0: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 Ny: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 E=0;E<y.length-1;E++){var b=y[E],z=y[E+1];b.portFromColOffset>z.portFromColOffset&&(x=!0,y[E]=z,y[E+1]=b)}}for(x=0;x<y.length;x++)E=y[x],E.valid&&(E=E.toVertex,E.index===-1&&qS(a,E))}function $S(a,y){var x=y.layer;y.index=a.tc[x],a.tc[x]++,y=y.sourceEdgesArrayAccess;for(var E=!0;E;)for(E=!1,x=0;x<y.length-1;x++){var b=y[x],z=y[x+1];b.portToColOffset>z.portToColOffset&&(E=!0,y[x]=z,y[x+1]=b)}for(x=0;x<y.length;x++)E=y[x],E.valid&&(E=E.fromVertex,E.index===-1&&$S(a,E))}zr.prototype.reduceCrossings=function(){var a=this.countCrossings(),y=ys(this),x,E;for(x=0;x<this.bj;x++){for(E=0;E<=this.Ia;E++)X0(this,E,1),Ml(this,E,1);var b=this.countCrossings();for(b<a&&(a=b,y=ys(this)),E=this.Ia;0<=E;E--)X0(this,E,-1),Ml(this,E,-1);b=this.countCrossings(),b<a&&(a=b,y=ys(this))}for(pl(this,y),x=0;x<this.bj;x++){for(E=0;E<=this.Ia;E++)X0(this,E,0),Ml(this,E,0);for(b=this.countCrossings(),b<a&&(a=b,y=ys(this)),E=this.Ia;0<=E;E--)X0(this,E,0),Ml(this,E,0);b=this.countCrossings(),b<a&&(a=b,y=ys(this))}pl(this,y);var z,tt,rt;switch(this.rk){case Ty:break;case Iy:for(rt=a+1;(E=this.countCrossings())<rt;)for(rt=E,x=this.Ia;0<=x;x--)for(tt=0;tt<=x;tt++){for(z=!0;z;)for(z=!1,E=x;E>=tt;E--)z=Ml(this,E,-1)||z;for(b=this.countCrossings(),b>=a?pl(this,y):(a=b,y=ys(this)),z=!0;z;)for(z=!1,E=x;E>=tt;E--)z=Ml(this,E,1)||z;for(b=this.countCrossings(),b>=a?pl(this,y):(a=b,y=ys(this)),z=!0;z;)for(z=!1,E=tt;E<=x;E++)z=Ml(this,E,1)||z;for(b>=a?pl(this,y):(a=b,y=ys(this)),z=!0;z;)for(z=!1,E=tt;E<=x;E++)z=Ml(this,E,-1)||z;for(b>=a?pl(this,y):(a=b,y=ys(this)),z=!0;z;)for(z=!1,E=x;E>=tt;E--)z=Ml(this,E,0)||z;for(b>=a?pl(this,y):(a=b,y=ys(this)),z=!0;z;)for(z=!1,E=tt;E<=x;E++)z=Ml(this,E,0)||z;b>=a?pl(this,y):(a=b,y=ys(this))}break;default:case tv:for(x=this.Ia,tt=0,rt=a+1;(E=this.countCrossings())<rt;){for(rt=E,z=!0;z;)for(z=!1,E=x;E>=tt;E--)z=Ml(this,E,-1)||z;for(b=this.countCrossings(),b>=a?pl(this,y):(a=b,y=ys(this)),z=!0;z;)for(z=!1,E=x;E>=tt;E--)z=Ml(this,E,1)||z;for(b=this.countCrossings(),b>=a?pl(this,y):(a=b,y=ys(this)),z=!0;z;)for(z=!1,E=tt;E<=x;E++)z=Ml(this,E,1)||z;for(b>=a?pl(this,y):(a=b,y=ys(this)),z=!0;z;)for(z=!1,E=tt;E<=x;E++)z=Ml(this,E,-1)||z;for(b>=a?pl(this,y):(a=b,y=ys(this)),z=!0;z;)for(z=!1,E=x;E>=tt;E--)z=Ml(this,E,0)||z;for(b>=a?pl(this,y):(a=b,y=ys(this)),z=!0;z;)for(z=!1,E=tt;E<=x;E++)z=Ml(this,E,0)||z;b>=a?pl(this,y):(a=b,y=ys(this))}}pl(this,y)};function X0(a,y,x){var E=Pc(a,y),b=a.tc[y],z=US(a,y,x),tt=by(a,y,x);for(x=0;x<b;x++)tt[x]===-1&&(tt[x]=E[x].column),z[x]===-1&&(z[x]=E[x].column);for(var rt=!0,ot;rt;)for(rt=!1,x=0;x<b-1;x++)(z[x+1]<z[x]||z[x+1]===z[x]&&tt[x+1]<tt[x])&&(rt=!0,ot=z[x],z[x]=z[x+1],z[x+1]=ot,ot=tt[x],tt[x]=tt[x+1],tt[x+1]=ot,ot=E[x],E[x]=E[x+1],E[x+1]=ot);for(x=z=0;x<b;x++)ot=E[x],ot.index=x,z+=a.nodeMinColumnSpace(ot,!0),ot.column=z,z+=1,z+=a.nodeMinColumnSpace(ot,!1);wc(a,y,E)}function Ml(a,y,x){var E=Pc(a,y),b=a.tc[y];x=VS(a,y,x);var z,tt=[];for(z=0;z<b;z++)tt[z]=-1;var rt=[];for(z=0;z<b;z++)rt[z]=-1;for(var ot=!1,st=!0;st;)for(st=!1,z=0;z<b-1;z++){var ut=x[E[z].index*b+E[z+1].index],ft=x[E[z+1].index*b+E[z].index],St=0,wt=0,Et=E[z].column,Bt=E[z+1].column,Vt=a.nodeMinColumnSpace(E[z],!0),jt=a.nodeMinColumnSpace(E[z],!1),_t=a.nodeMinColumnSpace(E[z+1],!0),Qt=a.nodeMinColumnSpace(E[z+1],!1);Vt=Et-Vt+_t,jt=Bt-jt+Qt;var ie=E[z].sourceEdges.iterator;for(ie.reset();ie.next();)if(_t=ie.value,Qt=_t.fromVertex,_t.valid&&Qt.layer===y){for(_t=0;E[_t]!==Qt;)_t++;_t<z&&(St+=2*(z-_t),wt+=2*(z+1-_t)),_t===z+1&&(St+=1),_t>z+1&&(St+=4*(_t-z),wt+=4*(_t-(z+1)))}for(ie=E[z].destinationEdges.iterator,ie.reset();ie.next();)if(_t=ie.value,Qt=_t.toVertex,_t.valid&&Qt.layer===y){for(_t=0;E[_t]!==Qt;)_t++;_t===z+1&&(wt+=1)}for(ie=E[z+1].sourceEdges.iterator,ie.reset();ie.next();)if(_t=ie.value,Qt=_t.fromVertex,_t.valid&&Qt.layer===y){for(_t=0;E[_t]!==Qt;)_t++;_t<z&&(St+=2*(z+1-_t),wt+=2*(z-_t)),_t===z&&(wt+=1),_t>z+1&&(St+=4*(_t-(z+1)),wt+=4*(_t-z))}for(ie=E[z+1].destinationEdges.iterator,ie.reset();ie.next();)if(_t=ie.value,Qt=_t.toVertex,_t.valid&&Qt.layer===y){for(_t=0;E[_t]!==Qt;)_t++;_t===z&&(St+=1)}_t=Qt=0,ie=tt[E[z].index];var ce=rt[E[z].index],ke=tt[E[z+1].index],On=rt[E[z+1].index];ie!==-1&&(Qt+=Math.abs(ie-Et),_t+=Math.abs(ie-jt)),ce!==-1&&(Qt+=Math.abs(ce-Et),_t+=Math.abs(ce-jt)),ke!==-1&&(Qt+=Math.abs(ke-Bt),_t+=Math.abs(ke-Vt)),On!==-1&&(Qt+=Math.abs(On-Bt),_t+=Math.abs(On-Vt)),(wt<St-.5||wt===St&&ft<ut-.5||wt===St&&ft===ut&&_t<Qt-.5)&&(st=ot=!0,E[z].column=jt,E[z+1].column=Vt,ut=E[z],E[z]=E[z+1],E[z+1]=ut)}for(z=0;z<b;z++)E[z].index=z;return wc(a,y,E),ot}zr.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 E,b=this.network.vertexes.iterator;b.next();){var z=b.value;y=z.layer,E=z.column,z=this.nodeMinColumnSpace(z,!1),x[y]=Math.max(x[y],E+z)}for(b.reset();b.next();)z=b.value,y=z.layer,E=z.column,z.column=(8*(this.Ra-x[y])>>1)+8*E;this.Ra*=8}if(this.bg&2)for(x=!0;x;){for(x=!1,y=this.Md+1;y<=this.Ia;y++)x=Cp(this,y,1)||x;for(y=this.Md-1;0<=y;y--)x=Cp(this,y,-1)||x;x=Cp(this,this.Md,0)||x}if(this.bg&4){for(y=this.Md+1;y<=this.Ia;y++)Ay(this,y,1);for(y=this.Md-1;0<=y;y--)Ay(this,y,-1);Ay(this,this.Md,0)}if(a&&(tx(this,-1),tx(this,1)),this.bg&2)for(x=!0;x;){for(x=!1,x=Cp(this,this.Md,0)||x,y=this.Md+1;y<=this.Ia;y++)x=Cp(this,y,0)||x;for(y=this.Md-1;0<=y;y--)x=Cp(this,y,0)||x}}else Vx(this)};function Cp(a,y,x){for(var E=!1;Gx(a,y,x);)E=!0;return E}function Gx(a,y,x){var E,b=Pc(a,y),z=a.tc[y],tt=by(a,y,-1);if(0<x)for(E=0;E<z;E++)tt[E]=-1;var rt=by(a,y,1);if(0>x)for(E=0;E<z;E++)rt[E]=-1;for(var ot=!1,st=!0;st;)for(st=!1,E=0;E<z;E++){var ut=b[E].column,ft=a.nodeMinColumnSpace(b[E],!0),St=a.nodeMinColumnSpace(b[E],!1),wt=0;0>E-1||ut-b[E-1].column-1>ft+a.nodeMinColumnSpace(b[E-1],!1)?wt=ut-1:wt=ut,ft=E+1>=z||b[E+1].column-ut-1>St+a.nodeMinColumnSpace(b[E+1],!0)?ut+1:ut;var Et=St=0,Bt=0;if(0>=x)for(var Vt=b[E].sourceEdges.iterator;Vt.next();){var jt=Vt.value,_t=jt.fromVertex;if(jt.valid&&_t.layer!==y){var Qt=Ey(jt),ie=jt.portFromColOffset;jt=jt.portToColOffset,_t=_t.column,St+=(Math.abs(ut+jt-(_t+ie))+1)*Qt,Et+=(Math.abs(wt+jt-(_t+ie))+1)*Qt,Bt+=(Math.abs(ft+jt-(_t+ie))+1)*Qt}}if(0<=x)for(Vt=b[E].destinationEdges.iterator;Vt.next();)jt=Vt.value,_t=jt.toVertex,jt.valid&&_t.layer!==y&&(Qt=Ey(jt),ie=jt.portFromColOffset,jt=jt.portToColOffset,_t=_t.column,St+=(Math.abs(ut+ie-(_t+jt))+1)*Qt,Et+=(Math.abs(wt+ie-(_t+jt))+1)*Qt,Bt+=(Math.abs(ft+ie-(_t+jt))+1)*Qt);jt=ie=Qt=0,Vt=tt[b[E].index],_t=rt[b[E].index],Vt!==-1&&(Qt+=Math.abs(Vt-ut),ie+=Math.abs(Vt-wt),jt+=Math.abs(Vt-ft)),_t!==-1&&(Qt+=Math.abs(_t-ut),ie+=Math.abs(_t-wt),jt+=Math.abs(_t-ft)),Et<St||Et===St&&ie<Qt?(st=ot=!0,b[E].column=wt):(Bt<St||Bt===St&&jt<Qt)&&(st=ot=!0,b[E].column=ft)}return wc(a,y,b),a.normalize(),ot}function Ay(a,y,x){var E=Pc(a,y),b=a.tc[y],z=US(a,y,x),tt=[];for(x=0;x<b;x++)tt[x]=z[x];for(z=!0;z;)for(z=!1,x=0;x<b;x++){var rt=E[x].column,ot=a.nodeMinColumnSpace(E[x],!0),st=a.nodeMinColumnSpace(E[x],!1),ut=0;if(tt[x]===-1)if(x===0&&x===b-1)ut=rt;else if(x===0){var ft=E[x+1].column;ft-rt===st+a.nodeMinColumnSpace(E[x+1],!0)?ut=rt-1:ut=rt}else x===b-1?(ft=E[x-1].column,ut=rt-ft===ot+a.nodeMinColumnSpace(E[x-1],!1)?rt+1:rt):(ft=E[x-1].column,ot=ft+a.nodeMinColumnSpace(E[x-1],!1)+ot+1,ft=E[x+1].column,st=ft-a.nodeMinColumnSpace(E[x+1],!0)-st-1,ut=(ot+st)/2|0);else x===0&&x===b-1?ut=tt[x]:x===0?(ft=E[x+1].column,st=ft-a.nodeMinColumnSpace(E[x+1],!0)-st-1,ut=Math.min(tt[x],st)):x===b-1?(ft=E[x-1].column,ot=ft+a.nodeMinColumnSpace(E[x-1],!1)+ot+1,ut=Math.max(tt[x],ot)):(ft=E[x-1].column,ot=ft+a.nodeMinColumnSpace(E[x-1],!1)+ot+1,ft=E[x+1].column,st=ft-a.nodeMinColumnSpace(E[x+1],!0)-st-1,ot<tt[x]&&tt[x]<st?ut=tt[x]:ot>=tt[x]?ut=ot:st<=tt[x]&&(ut=st));ut!==rt&&(z=!0,E[x].column=ut)}wc(a,y,E),a.normalize()}function Hx(a,y){for(var x=!0,E=a.network.vertexes.iterator;E.next();){var b=E.value,z=a.nodeMinColumnSpace(b,!0),tt=a.nodeMinColumnSpace(b,!1);if(b.column-z<=y&&b.column+tt>=y){x=!1;break}}if(a=!1,x)for(E.reset();E.next();)x=E.value,x.column>y&&(--x.column,a=!0);return a}function Wx(a,y){var x=y+1,E,b=[],z=[];for(E=0;E<=a.Ia;E++)b[E]=!1,z[E]=!1;for(var tt=a.network.vertexes.iterator;tt.next();){E=tt.value;var rt=E.column-a.nodeMinColumnSpace(E,!0),ot=E.column+a.nodeMinColumnSpace(E,!1);rt<=y&&ot>=y&&(b[E.layer]=!0),rt<=x&&ot>=x&&(z[E.layer]=!0)}for(rt=!0,x=!1,E=0;E<=a.Ia;E++)rt=rt&&!(b[E]&&z[E]);if(rt)for(tt.reset();tt.next();)a=tt.value,a.column>y&&(--a.column,x=!0);return x}function tx(a,y){for(var x=0;x<=a.Ra;x++)for(;Hx(a,x););for(a.normalize(),x=0;x<a.Ra;x++)for(;Wx(a,x););a.normalize();var E;if(0<y)for(x=0;x<=a.Ra;x++){var b=ys(a),z=Y0(a);for(E=z+1;z<E;){E=z,ex(a,x,1);var tt=Y0(a);tt>z?pl(a,b):tt<z&&(z=tt,b=ys(a))}}if(0>y)for(x=a.Ra;0<=x;x--)for(b=ys(a),z=Y0(a),E=z+1;z<E;)E=z,ex(a,x,-1),tt=Y0(a),tt>z?pl(a,b):tt<z&&(z=tt,b=ys(a));a.normalize()}function ex(a,y,x){a.le=0;for(var E=a.network.vertexes.iterator;E.next();)E.value.component=-1;if(0<x)for(E.reset();E.next();){var b=E.value;b.column-a.nodeMinColumnSpace(b,!0)<=y&&(b.component=a.le)}if(0>x)for(E.reset();E.next();)b=E.value,b.column+a.nodeMinColumnSpace(b,!1)>=y&&(b.component=a.le);for(a.le++,E.reset();E.next();)y=E.value,y.component===-1&&(Ly(a,y,a.le,-1,!0,!0),a.le++);var z;for(y=[],z=0;z<a.le*a.le;z++)y[z]=!1;for(b=[],z=0;z<(a.Ia+1)*(a.Ra+1);z++)b[z]=-1;for(E.reset();E.next();){z=E.value;for(var tt=z.layer,rt=Math.max(0,z.column-a.nodeMinColumnSpace(z,!0)),ot=Math.min(a.Ra,z.column+a.nodeMinColumnSpace(z,!1));rt<=ot;rt++)b[tt*(a.Ra+1)+rt]=z.component}for(z=0;z<=a.Ia;z++){if(0<x)for(tt=0;tt<a.Ra;tt++)b[z*(a.Ra+1)+tt]!==-1&&b[z*(a.Ra+1)+tt+1]!==-1&&b[z*(a.Ra+1)+tt]!==b[z*(a.Ra+1)+tt+1]&&(y[b[z*(a.Ra+1)+tt]*a.le+b[z*(a.Ra+1)+tt+1]]=!0);if(0>x)for(tt=a.Ra;0<tt;tt--)b[z*(a.Ra+1)+tt]!==-1&&b[z*(a.Ra+1)+tt-1]!==-1&&b[z*(a.Ra+1)+tt]!==b[z*(a.Ra+1)+tt-1]&&(y[b[z*(a.Ra+1)+tt]*a.le+b[z*(a.Ra+1)+tt-1]]=!0)}for(b=[],z=0;z<a.le;z++)b[z]=!0;for(tt=[],tt.push(0);tt.length!==0;)if(ot=tt[tt.length-1],tt.pop(),b[ot])for(b[ot]=!1,z=0;z<a.le;z++)y[ot*a.le+z]&&tt.splice(0,0,z);if(0<x)for(E.reset();E.next();)a=E.value,b[a.component]&&--a.column;if(0>x)for(E.reset();E.next();)x=E.value,b[x.component]&&(x.column+=1)}function Vx(a){for(var y=Si(),x=a.fl.length,E=0;E<=x;E++)y[E]=[];for(E=a.network.vertexes.iterator;E.next();){var b=E.value;y[x-b.layer][b.index]=b}x=new mn,Ux(y,x);var z=null,tt=null,rt=null,ot=null,st=(a.ve&1)!==0,ut=(a.ve&2)!==0,ft=(a.ve&4)!==0,St=(a.ve&8)!==0;for(st&&(a.verticalAlignment(y,x,!0),z=_0(a,y,!0,!1)),y.reverse(),ft&&(a.verticalAlignment(y,x,!1),rt=_0(a,y,!1,!1)),E=Ci(y),b=E.next();!b.done;b=E.next())b.value.reverse();St&&(a.verticalAlignment(y,x,!1),ot=_0(a,y,!1,!0)),y.reverse(),ut&&(a.verticalAlignment(y,x,!0),tt=_0(a,y,!0,!0)),wi(y),a.u(z,tt,rt,ot),a.network.vertexes.each(function(wt){var Et=Si();st&&Et.push(z.get(wt)),ut&&Et.push(tt.get(wt)),ft&&Et.push(rt.get(wt)),St&&Et.push(ot.get(wt)),Et.sort(function(Vt,jt){return Vt-jt});var Bt=Et.length;Bt=(Et[Math.floor((Bt-1)/2)]+Et[Math.ceil((Bt-1)/2)])/2,wi(Et),wt.zc=Bt})}function Ux(a,y){for(var x=a.length,E=1;E<x-1;E++)for(var b=0,z=0,tt=a[E],rt=a[E+1],ot=0;z<rt.length;ot++){var st=rt[ot];t:{if(st.node===null){var ut=Oy(st);if(0<ut.length){ut=ut[0].node===null;break t}}ut=!1}var ft=ut;if(ot===rt.length-1||ft){for(ut=tt.length-1,ft&&(ut=Oy(st)[0].index);z<=ot;){if(st=rt[z],!st.bo){ft=[];for(var St=Ci(st.sourceEdgesArrayAccess),wt=St.next();!wt.done;wt=St.next())wt=wt.value,wt.valid&&ft.push(wt);st.bo=ft}for(st=Ci(st.bo),ft=st.next();!ft.done;ft=st.next())ft=ft.value,St=ft.fromVertex.index,(St<b||St>ut)&&y.add(ft);z++}b=ut}}}zr.prototype.verticalAlignment=function(a,y,x){Kx(a),a=Ci(a);for(var E=a.next();!E.done;E=a.next()){var b=-1;E=Ci(E.value);for(var z=E.next();!z.done;z=E.next()){z=z.value;var tt=x?Oy(z):Xx(z),rt=tt.length;if(0<rt){tt.sort(function(ft,St){return ft.vi-St.vi});var ot=(rt-1)/2;for(rt=Math.floor(ot),ot=Math.ceil(ot);rt<=ot;rt++)if(z.align===z){var st=tt[rt],ut=void 0;ut=x?ev(st,z):ev(z,st),!y.contains(ut)&&b<st.vi&&(st.align=z,z.root=st.root,z.align=st.root,b=st.vi)}}}}};function Kx(a){for(var y=0;y<a.length;y++)for(var x=a[y],E=0;E<x.length;E++){var b=x[E];b.root=b,b.align=b,b.Tz=y,b.vi=E}}function _0(a,y,x,E){for(var b=a.K===90||a.K===270,z=Ci(y),tt=z.next();!tt.done;tt=z.next()){var rt=Ci(tt.value);for(tt=rt.next();!tt.done;tt=rt.next())tt=tt.value,tt.sd=tt,tt.shift=1/0,tt.zc=NaN,tt.qg=0}for(tt=a.K===90||a.K===270,z=Ci(y),rt=z.next();!rt.done;rt=z.next()){rt=Ci(rt.value);for(var ot=rt.next();!ot.done;ot=rt.next())if(ot=ot.value,ot.root===ot){for(var st=0,ut=ot;ut.align!==ot;){var ft=ut.align,St=tt?ut.width:ut.height,wt=tt?ft.width:ft.height;if(x){var Et=ev(ut,ft),Bt=Et.portFromPos,Vt=Et.portToPos;Et.link!==null&&(ut.node&&ut.node!==Et.link.fromNode&&(Bt=tt?ut.focusX:ut.focusY),ft.node&&ft.node!==Et.link.toNode&&(Vt=tt?ft.focusX:ft.focusY))}else Et=ev(ft,ut),Bt=Et.portToPos,Vt=Et.portFromPos,Et.link!==null&&(ut.node&&ut.node!==Et.link.toNode&&(Bt=tt?ut.focusX:ut.focusY),ft.node&&ft.node!==Et.link.fromNode&&(Vt=tt?ft.focusX:ft.focusY));St=E?ut.qg+(St-Bt)-(wt-Vt):ut.qg+Bt-Vt,ft.qg=St,st=Math.min(st,St),ut=ut.align}ut=ot;do ut.qg=ut.qg-st,ut=ut.align;while(ut!==ot)}}for(x=Ci(y),tt=x.next();!tt.done;tt=x.next())for(z=Ci(tt.value),tt=z.next();!tt.done;tt=z.next())tt=tt.value,tt.root===tt&&nx(a,tt,y);for(x=0;x<y.length;x++)if(!(0>=y[x].length)&&(tt=y[x][0],tt.sd===tt)){tt.sd.shift===1/0&&(tt.sd.shift=0),tt=x,rt=0;do{for(z=y[tt][rt];z.align!==z.root;)z=z.align,tt++,0<z.vi&&(rt=ix(z,y),rt.sd.shift=Math.min(rt.sd.shift,z.sd.shift+z.zc+z.qg-(rt.zc+rt.qg+(b?rt.width:rt.height)+a.columnSpacing)));rt=z.vi+1}while(tt<y.length&&rt<y[tt].length&&z.sd===y[tt][rt].sd)}for(a=new yi,y=Ci(y),tt=y.next();!tt.done;tt=y.next())for(x=Ci(tt.value),tt=x.next();!tt.done;tt=x.next())tt=tt.value,tt.zc=tt.zc+tt.sd.shift+tt.qg,z=b?tt.width:tt.height,a.add(tt,E?-tt.zc-z:tt.zc);return a}function nx(a,y,x){if(isNaN(y.zc)){y.zc=0;var E=y;do{if(0<E.vi){var b=ix(E,x),z=b.root;nx(a,z,x),y.sd===y&&(y.sd=z.sd);var tt=a.K===90||a.K===270?b.width:b.height;y.sd===z.sd&&(y.zc=Math.max(y.zc,z.zc+b.qg+tt-E.qg+a.columnSpacing))}E=E.align}while(E!==y);for(;E.align!==y;)E=E.align,E.zc=y.zc,E.sd=y.sd}}function ix(a,y){var x=a.Tz;return a=a.vi,1>a&&pe("Could not determine previous vertex in layer"),y[x][a-1]}zr.prototype.u=function(a){for(var y=[],x=0;x<arguments.length;++x)y[x]=arguments[x];x=-1;for(var E=Si(),b=Si(),z=1/0,tt=0;4>tt;tt++)if(y[tt]){var rt=Zx(this,y[tt],E,b,tt);rt<z&&(x=tt,z=rt)}for(z={},tt=0;4>tt;z={delta:z.delta},tt++)y[tt]&&(z.delta=tt===0||tt===2?E[x]-E[tt]:b[x]-b[tt],z.delta!==0&&y[tt].each(function(ot){return function(st){st.value+=ot.delta}}(z)));wi(E),wi(b)};function Zx(a,y,x,E,b){if(!y||y.count===0)return x[b]=0,E[b]=0,1/0;var z=1/0,tt=-1/0;return y.each(function(rt){var ot=rt.key;rt=rt.value,ot=a.K===90||a.K===270?ot.width:ot.height,rt<z&&(z=rt),rt+ot>tt&&(tt=rt+ot)}),x[b]=z,E[b]=tt,tt-z}zr.prototype.commitLayout=function(){if(this.setsPortSpots)for(var a=J0(this,!0),y=J0(this,!1),x=this.network.edges.iterator;x.next();){var E=x.value.link;E!==null&&(E.fromSpot=a,E.toSpot=y)}this.commitNodes(),this.Gu(),this.isRouting&&this.commitLinks()};function J0(a,y){return a.K===270?y?$a:Ua:a.K===90?y?Ua:$a:a.K===180?y?us:Aa:y?Aa:us}zr.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 E=0;E<=this.Ia;E++){var b=x;0>=this.he[E]+this.Ld[E]&&(b=0),0<E&&(y+=b/2),this.K===90||this.K===0?(y+=this.Ld[E],this.Kd[E]=y,y+=this.he[E]):(y+=this.he[E],this.Kd[E]=y,y+=this.Ld[E]),E<this.Ia&&(y+=b/2),this.Ta[E]=y}for(x=y,y=this.arrangementOrigin,E=0;E<=this.Ia;E++)this.K===270?this.Kd[E]=y.y+this.Kd[E]:this.K===90?(this.Kd[E]=y.y+x-this.Kd[E],this.Ta[E]=x-this.Ta[E]):this.K===180?this.Kd[E]=y.x+this.Kd[E]:(this.Kd[E]=y.x+x-this.Kd[E],this.Ta[E]=x-this.Ta[E]);x=this.ve!==0,a.reset(),E=this.K===270||this.K===90;for(var z=1/0,tt=b=1/0,rt=-1/0;a.next();){var ot=a.value,st=ot.layer,ut=ot.column|0;E?(tt=y.x+this.kc*ut,st=this.Kd[st]):(tt=this.Kd[st],st=y.y+this.kc*ut),ot.centerX=tt,ot.centerY=st,x&&isFinite(ot.zc)&&(E?ot.node?ot.x=y.x+ot.zc:ot.centerX=y.x+ot.zc:ot.node?ot.y=y.y+ot.zc:ot.centerY=y.y+ot.zc),z=Math.min(ot.x,z),b=Math.min(ot.y,b),E?(tt=z,rt=Math.max(rt,ot.bounds.right)):(tt=b,rt=Math.max(rt,ot.bounds.bottom))}for(this.xw=rt-tt,z=y.x-z,y=y.y-b,this.Rf=new Gt(x&&E?0:z,x&&!E?0:y),a.reset();a.next();)x=a.value,x.x+=z,x.y+=y,x.commit()},zr.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 E=this.maxLayer;0<=E;E--)this.K===270?E===0?y.push(new Ye(0,0,x,Math.abs(this.Ta[0]))):y.push(new Ye(0,this.Ta[E-1],x,Math.abs(this.Ta[E-1]-this.Ta[E]))):this.K===90?E===0?y.push(new Ye(0,this.Ta[0],x,Math.abs(this.Ta[0]-a))):y.push(new Ye(0,this.Ta[E],x,Math.abs(this.Ta[E-1]-this.Ta[E]))):this.K===180?E===0?y.push(new Ye(0,0,Math.abs(this.Ta[0]),x)):y.push(new Ye(this.Ta[E-1],0,Math.abs(this.Ta[E-1]-this.Ta[E]),x)):E===0?y.push(new Ye(this.Ta[0],0,Math.abs(this.Ta[0]-a),x)):y.push(new Ye(this.Ta[E],0,Math.abs(this.Ta[E-1]-this.Ta[E]),x));this.commitLayers(y,this.Rf)},zr.prototype.commitLayers=function(){},zr.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 E=y,b=E.fromNode,z=E.toNode,tt=E.fromPort,rt=E.toPort;if(b!==null){var ot=b.findVisibleNode();ot!==null&&ot!==b&&(b=ot,tt=ot.port)}z!==null&&(ot=z.findVisibleNode(),ot!==null&&ot!==z&&(z=ot,rt=ot.port));var st=y.computeSpot(!0,tt);ot=y.computeSpot(!1,rt);var ut=x.fromVertex,ft=x.toVertex;if(x.valid)y.curve===el&&y.pointsCount===4&&(ut.column===ft.column&&this.alignOption===0?(x=y.getLinkPoint(b,tt,st,!0,!1,z,rt),rt=y.getLinkPoint(z,rt,ot,!1,!1,b,tt),x.w()||x.set(b.actualBounds.center),rt.w()||rt.set(z.actualBounds.center),y.Fj(),y.yf(x.x,x.y),y.yf((2*x.x+rt.x)/3,(2*x.y+rt.y)/3),y.yf((x.x+2*rt.x)/3,(x.y+2*rt.y)/3),y.yf(rt.x,rt.y)):(x=E=!1,tt!==null&&st===No&&(E=!0),rt!==null&&ot===No&&(x=!0),(E||x)&&(ot=null,E&&(ot=y.getLinkPointFromPoint(b,tt,tt.ga(Br),y.i(3),!0),ot.w()||ot.set(b.actualBounds.center),y.L(0,ot.x,ot.y)),b=null,x&&(b=y.getLinkPointFromPoint(z,rt,rt.ga(Br),y.i(0),!1),b.w()||b.set(z.actualBounds.center),y.L(3,b.x,b.y)),ot&&(z=y.i(2),y.L(1,(2*ot.x+z.x)/3,(2*ot.y+z.y)/3)),b&&(z=y.i(1),y.L(2,(2*b.x+z.x)/3,(2*b.y+z.y)/3))))),y.zf();else if(ut.layer===ft.layer)y.zf();else{var St=!1,wt=!1,Et=this.ie,Bt=y.firstPickIndex+1;if(y.isOrthogonal){wt=!0;var Vt=y.pointsCount;4<Vt&&y.points.removeRange(2,Vt-3)}else if(y.curve===el)St=!0,Vt=y.pointsCount,4<Vt&&y.points.removeRange(2,Vt-3),Vt===4&&(Bt=2);else{Vt=y.pointsCount;var jt=st===No,_t=ot===No;2<Vt&&jt&&_t?y.points.removeRange(1,Vt-2):3<Vt&&jt&&!_t?y.points.removeRange(1,Vt-3):3<Vt&&!jt&&_t?y.points.removeRange(2,Vt-2):4<Vt&&!jt&&!_t&&y.points.removeRange(2,Vt-3)}if(x.rev){for(;ft!==null&&ut!==ft;){var Qt=Vt=null;for(jt=ft.sourceEdges.iterator;jt.next()&&(_t=jt.value,_t.link!==x.link||(Vt=_t.fromVertex,Qt=_t.toVertex,Vt.node!==null)););if(Vt===null)break;if(Vt!==ut){jt=y.i(Bt-1).x,_t=y.i(Bt-1).y;var ie=Vt.centerX,ce=Vt.centerY;if(wt)this.K===180||this.K===0?Bt===y.firstPickIndex+1?(y.m(Bt++,jt,_t),y.m(Bt++,jt,ce)):(Qt!==null?Qt.centerY:_t)!==ce&&(Qt=this.Ta[Vt.layer-1]+this.Rf.x,y.m(Bt++,Qt,_t),y.m(Bt++,Qt,ce)):Bt===y.firstPickIndex+1?(y.m(Bt++,jt,_t),y.m(Bt++,ie,_t)):(Qt!==null?Qt.centerX:jt)!==ie&&(Qt=this.Ta[Vt.layer-1]+this.Rf.y,y.m(Bt++,jt,Qt),y.m(Bt++,ie,Qt));else if(Bt===y.firstPickIndex+1){Qt=Math.max(10,this.he[ft.layer]);var ke=Math.max(10,this.Ld[ft.layer]);if(St)this.K===180?ie<=ft.bounds.x?(ft=ft.bounds.x,y.m(Bt++,ft-Qt,ce),y.m(Bt++,ft,ce),y.m(Bt++,ft+ke,ce)):(y.m(Bt++,ie-Qt,ce),y.m(Bt++,ie,ce),y.m(Bt++,ie+ke,ce)):this.K===90?ce>=ft.bounds.bottom?(ft=ft.bounds.y+ft.bounds.height,y.m(Bt++,ie,ft+ke),y.m(Bt++,ie,ft),y.m(Bt++,ie,ft-Qt)):(y.m(Bt++,ie,ce+ke),y.m(Bt++,ie,ce),y.m(Bt++,ie,ce-Qt)):this.K===270?ce<=ft.bounds.y?(ft=ft.bounds.y,y.m(Bt++,ie,ft-Qt),y.m(Bt++,ie,ft),y.m(Bt++,ie,ft+ke)):(y.m(Bt++,ie,ce-Qt),y.m(Bt++,ie,ce),y.m(Bt++,ie,ce+ke)):this.K===0&&(ie>=ft.bounds.right?(ft=ft.bounds.x+ft.bounds.width,y.m(Bt++,ft+ke,ce),y.m(Bt++,ft,ce),y.m(Bt++,ft-Qt,ce)):(y.m(Bt++,ie+ke,ce),y.m(Bt++,ie,ce),y.m(Bt++,ie-Qt,ce)));else{y.m(Bt++,jt,_t);var On=0;this.K===180||this.K===0?((this.K===180?ie>=ft.bounds.right:ie<=ft.bounds.x)&&(On=(this.K===0?-Qt:ke)/2),y.m(Bt++,jt+On,ce)):((this.K===270?ce>=ft.bounds.bottom:ce<=ft.bounds.y)&&(On=(this.K===90?-Qt:ke)/2),y.m(Bt++,ie,_t+On)),y.m(Bt++,ie,ce)}}else Qt=Math.max(10,this.he[Vt.layer]),ke=Math.max(10,this.Ld[Vt.layer]),St?this.K===180?(y.m(Bt++,ie-Qt-Et,ce),y.m(Bt++,Math.min(ie-Qt+Et/2,ie),ce),y.m(Bt++,ie,ce),y.m(Bt++,ie,ce),y.m(Bt++,Math.max(ie+ke-Et/2,ie),ce),y.m(Bt++,ie+ke+Et,ce)):this.K===90?(y.m(Bt++,ie,ce+ke+Et),y.m(Bt++,ie,Math.max(ce+ke-Et/2,ce)),y.m(Bt++,ie,ce),y.m(Bt++,ie,ce),y.m(Bt++,ie,Math.min(ce-Qt+Et/2,ce)),y.m(Bt++,ie,ce-Qt-Et)):this.K===270?(y.m(Bt++,ie,ce-Qt-Et),y.m(Bt++,ie,Math.min(ce-Qt+Et/2,ce)),y.m(Bt++,ie,ce),y.m(Bt++,ie,ce),y.m(Bt++,ie,Math.max(ce+ke-Et/2,ce)),y.m(Bt++,ie,ce+ke+Et)):(y.m(Bt++,ie+ke+Et,ce),y.m(Bt++,Math.max(ie+ke-Et/2,ie),ce),y.m(Bt++,ie,ce),y.m(Bt++,ie,ce),y.m(Bt++,Math.min(ie-Qt+Et/2,ie),ce),y.m(Bt++,ie-Qt-Et,ce)):y.m(Bt++,ie,ce)}ft=Vt}(rt===null||st!==No||wt)&&(jt=y.i(Bt-1).x,_t=y.i(Bt-1).y,ie=y.i(Bt).x,ce=y.i(Bt).y,wt?(Et=this.Ld[ut.layer],this.K===180||this.K===0?(wt=_t,wt>=ut.bounds.y&&wt<=ut.bounds.bottom&&(this.K===180?ie>=ut.bounds.x:ie<=ut.bounds.right)&&(ft=ut.centerX+(this.K===180?-Et:Et),wt<ut.bounds.y+ut.bounds.height/2?wt=ut.bounds.y-this.kc/2:wt=ut.bounds.bottom+this.kc/2,y.m(Bt++,ft,_t),y.m(Bt++,ft,wt)),y.m(Bt++,ie,wt)):(wt=jt,wt>=ut.bounds.x&&wt<=ut.bounds.right&&(this.K===270?ce>=ut.bounds.y:ce<=ut.bounds.bottom)&&(ft=ut.centerY+(this.K===270?-Et:Et),wt<ut.bounds.x+ut.bounds.width/2?wt=ut.bounds.x-this.kc/2:wt=ut.bounds.right+this.kc/2,y.m(Bt++,jt,ft),y.m(Bt++,wt,ft)),y.m(Bt++,wt,ce)),y.m(Bt++,ie,ce)):St?(Qt=Math.max(10,this.he[ut.layer]),ke=Math.max(10,this.Ld[ut.layer]),this.K===180&&ie>=ut.bounds.x?(ft=ut.bounds.x+ut.bounds.width,y.L(Bt-2,ft,_t),y.L(Bt-1,ft+ke,_t)):this.K===90&&ce<=ut.bounds.bottom?(ft=ut.bounds.y,y.L(Bt-2,jt,ft),y.L(Bt-1,jt,ft-Qt)):this.K===270&&ce>=ut.bounds.y?(ft=ut.bounds.y+ut.bounds.height,y.L(Bt-2,jt,ft),y.L(Bt-1,jt,ft+ke)):this.K===0&&ie<=ut.bounds.right&&(ft=ut.bounds.x,y.L(Bt-2,ft,_t),y.L(Bt-1,ft-Qt,_t))):(Qt=Math.max(10,this.he[ut.layer]),ke=Math.max(10,this.Ld[ut.layer]),wt=0,this.K===180||this.K===0?((this.K===180?ie<=ut.bounds.x:ie>=ut.bounds.right)&&(wt=(this.K===0?ke:-Qt)/2),y.m(Bt++,ie+wt,_t)):((this.K===270?ce<=ut.bounds.y:ce>=ut.bounds.bottom)&&(wt=(this.K===90?ke:-Qt)/2),y.m(Bt++,jt,ce+wt)),y.m(Bt++,ie,ce)))}else{for(;ut!==null&&ut!==ft;){for(Qt=Vt=null,ut=ut.destinationEdges.iterator;ut.next()&&(jt=ut.value,jt.link!==x.link||(Vt=jt.toVertex,Qt=jt.fromVertex,Qt.node!==null&&(Qt=null),Vt.node!==null)););if(Vt===null)break;Vt!==ft&&(jt=y.i(Bt-1).x,_t=y.i(Bt-1).y,ie=Vt.centerX,ce=Vt.centerY,wt?this.K===180||this.K===0?(Qt!==null?Qt.centerY:_t)!==ce&&(Qt=this.Ta[Vt.layer]+this.Rf.x,Bt===y.firstPickIndex+1&&(Qt=this.K===0?Math.max(Qt,jt):Math.min(Qt,jt)),y.m(Bt++,Qt,_t),y.m(Bt++,Qt,ce)):(Qt!==null?Qt.centerX:jt)!==ie&&(Qt=this.Ta[Vt.layer]+this.Rf.y,Bt===y.firstPickIndex+1&&(Qt=this.K===90?Math.max(Qt,_t):Math.min(Qt,_t)),y.m(Bt++,jt,Qt),y.m(Bt++,ie,Qt)):(Qt=Math.max(10,this.he[Vt.layer]),ke=Math.max(10,this.Ld[Vt.layer]),St?this.K===180?(y.m(Bt++,ie+ke+Et,ce),y.m(Bt++,Math.max(ie+ke-Et/2,ie),ce),y.m(Bt++,ie,ce),y.m(Bt++,ie,ce),y.m(Bt++,Math.min(ie-Qt+Et/2,ie),ce),y.m(Bt++,ie-Qt-Et,ce)):this.K===90?(y.m(Bt++,ie,ce-Qt-Et),y.m(Bt++,ie,Math.min(ce-Qt+Et/2,ce)),y.m(Bt++,ie,ce),y.m(Bt++,ie,ce),y.m(Bt++,ie,Math.max(ce+ke-Et/2,ce)),y.m(Bt++,ie,ce+ke+Et)):this.K===270?(y.m(Bt++,ie,ce+ke+Et),y.m(Bt++,ie,Math.max(ce+ke-Et/2,ce)),y.m(Bt++,ie,ce),y.m(Bt++,ie,ce),y.m(Bt++,ie,Math.min(ce-Qt+Et/2,ce)),y.m(Bt++,ie,ce-Qt-Et)):(y.m(Bt++,ie-Qt-Et,ce),y.m(Bt++,Math.min(ie-Qt+Et/2,ie),ce),y.m(Bt++,ie,ce),y.m(Bt++,ie,ce),y.m(Bt++,Math.max(ie+ke-Et/2,ie),ce),y.m(Bt++,ie+ke+Et,ce)):this.K===180?(y.m(Bt++,ie+ke,ce),y.m(Bt++,ie-Qt,ce)):this.K===90?(y.m(Bt++,ie,ce-Qt),y.m(Bt++,ie,ce+ke)):this.K===270?(y.m(Bt++,ie,ce+ke),y.m(Bt++,ie,ce-Qt)):(y.m(Bt++,ie-Qt,ce),y.m(Bt++,ie+ke,ce)))),ut=Vt}wt&&(jt=y.i(Bt-1).x,_t=y.i(Bt-1).y,ie=y.i(Bt).x,ce=y.i(Bt).y,this.K===180||this.K===0?_t!==ce&&(Qt=this.K===0?Math.min(Math.max((ie+jt)/2,this.Ta[ft.layer]+this.Rf.x),ie):Math.max(Math.min((ie+jt)/2,this.Ta[ft.layer]+this.Rf.x),ie),y.m(Bt++,Qt,_t),y.m(Bt++,Qt,ce)):jt!==ie&&(Qt=this.K===90?Math.min(Math.max((ce+_t)/2,this.Ta[ft.layer]+this.Rf.y),ce):Math.max(Math.min((ce+_t)/2,this.Ta[ft.layer]+this.Rf.y),ce),y.m(Bt++,jt,Qt),y.m(Bt++,ie,Qt)))}E!==null&&St&&4<=y.pointsCount&&(tt!==null&&(tt=st===No?y.getLinkPointFromPoint(b,tt,tt.ga(Br),y.i(3),!0):y.i(0),st===No&&(st=y.i(2),E=y.i(3),this.direction===90||this.direction===270?(y.L(1,(tt.x+st.x)/2,st.y),y.L(2,E.x,(st.y+E.y)/2)):(y.L(1,st.x,(tt.y+st.y)/2),y.L(2,(st.x+E.x)/2,E.y))),tt.w()||tt.set(b.actualBounds.center),y.L(0,tt.x,tt.y)),rt!==null&&(b=ot===No?y.getLinkPointFromPoint(z,rt,rt.ga(Br),y.i(y.pointsCount-4),!1):y.i(y.pointsCount-1),ot===No&&(rt=y.i(y.pointsCount-3),ot=y.i(y.pointsCount-4),this.direction===90||this.direction===270?(y.L(y.pointsCount-2,(b.x+rt.x)/2,rt.y),y.L(y.pointsCount-2,ot.x,(rt.y+ot.y)/2)):(y.L(y.pointsCount-2,rt.x,(b.y+rt.y)/2),y.L(y.pointsCount-3,(rt.x+ot.x)/2,ot.y))),b.w()||b.set(z.actualBounds.center),y.L(y.pointsCount-1,b.x,b.y))),y.zf(),x.commit()}}}this.avoidOrthogonalOverlaps()},zr.prototype.avoidOrthogonalOverlaps=function(){if(!(0>=this.linkSpacing)){for(var a=new yn,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 E=a.value;if(E!==null&&E.isOrthogonal)for(var b=2;b<E.pointsCount-3;b++){var z=E.i(b),tt=E.i(b+1);if(this.B(z.y,tt.y)&&!this.B(z.x,tt.x)){var rt=new Cc;rt.layer=Math.floor(z.y/2);var ot=E.i(0),st=E.i(E.pointsCount-1);if(rt.first=ot.x*ot.x+ot.y,rt.jc=st.x*st.x+st.y,rt.rd=Math.min(z.x,tt.x),rt.Ic=Math.max(z.x,tt.x),rt.index=b,rt.link=E,b+2<E.pointsCount){ot=E.i(b-1),st=E.i(b+2);var ut=0;ot.y<z.y?ut=st.y<z.y?3:z.x<tt.x?2:1:ot.y>z.y&&(ut=st.y>z.y?0:tt.x<z.x?2:1),rt.j=ut}x.push(rt)}}}if(1<x.length)for(x.sort(this.Vx),a=0;a<x.length;){for(z=x[a].layer,E=a+1;E<x.length&&x[E].layer===z;)E++;if(1<E-a)for(z=a;z<E;){for(tt=x[z].Ic,b=a+1;b<E&&x[b].rd<tt;)tt=Math.max(tt,x[b].Ic),b++;if(tt=b-z,1<tt){for(this.zi(x,this.Js,z,z+tt),ut=1,rt=x[z].jc,ot=z;ot<b;ot++)st=x[ot],st.jc!==rt&&(ut++,rt=st.jc);this.zi(x,this.Ux,z,z+tt);var ft=1;for(rt=x[z].first,ot=z;ot<b;ot++)st=x[ot],st.first!==rt&&(ft++,rt=st.first);for(ot=!0,st=ft,ut<ft?(ot=!1,st=ut,rt=x[z].jc,this.zi(x,this.Js,z,z+tt)):rt=x[z].first,ut=0,ft=z;ft<b;ft++){var St=x[ft];(ot?St.first:St.jc)!==rt&&(ut++,rt=ot?St.first:St.jc);var wt=St.link;z=wt.i(St.index),tt=wt.i(St.index+1);var Et=this.linkSpacing*(ut-(st-1)/2);y++,wt.uh(),wt.L(St.index,z.x,z.y+Et),wt.L(St.index+1,tt.x,tt.y+Et),wt.zf()}}z=b}a=E}}else{for(y=0,x=[],a=a.iterator;a.next();)if(E=a.value,E!==null&&E.isOrthogonal)for(b=2;b<E.pointsCount-3;b++)z=E.i(b),tt=E.i(b+1),this.B(z.x,tt.x)&&!this.B(z.y,tt.y)&&(rt=new Cc,rt.layer=Math.floor(z.x/2),ot=E.i(0),st=E.i(E.pointsCount-1),rt.first=ot.x+ot.y*ot.y,rt.jc=st.x+st.y*st.y,rt.rd=Math.min(z.y,tt.y),rt.Ic=Math.max(z.y,tt.y),rt.index=b,rt.link=E,b+2<E.pointsCount&&(ot=E.i(b-1),st=E.i(b+2),ut=0,ot.x<z.x?ut=st.x<z.x?3:z.y<tt.y?2:1:ot.x>z.x&&(ut=st.x>z.x?0:tt.y<z.y?2:1),rt.j=ut),x.push(rt));if(1<x.length)for(x.sort(this.Vx),a=0;a<x.length;){for(z=x[a].layer,E=a+1;E<x.length&&x[E].layer===z;)E++;if(1<E-a)for(z=a;z<E;){for(tt=x[z].Ic,b=a+1;b<E&&x[b].rd<tt;)tt=Math.max(tt,x[b].Ic),b++;if(tt=b-z,1<tt){for(this.zi(x,this.Js,z,z+tt),ut=1,rt=x[z].jc,ot=z;ot<b;ot++)st=x[ot],st.jc!==rt&&(ut++,rt=st.jc);for(this.zi(x,this.Ux,z,z+tt),ft=1,rt=x[z].first,ot=z;ot<b;ot++)st=x[ot],st.first!==rt&&(ft++,rt=st.first);for(ot=!0,st=ft,ut<ft?(ot=!1,st=ut,rt=x[z].jc,this.zi(x,this.Js,z,z+tt)):rt=x[z].first,ut=0,ft=z;ft<b;ft++)St=x[ft],(ot?St.first:St.jc)!==rt&&(ut++,rt=ot?St.first:St.jc),wt=St.link,z=wt.i(St.index),tt=wt.i(St.index+1),Et=this.linkSpacing*(ut-(st-1)/2),y++,wt.uh(),wt.L(St.index,z.x+Et,z.y),wt.L(St.index+1,tt.x+Et,tt.y),wt.zf()}z=b}a=E}}}},Ct=zr.prototype,Ct.Vx=function(a,y){return a instanceof Cc&&y instanceof Cc&&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},Ct.Ux=function(a,y){return a instanceof Cc&&y instanceof Cc&&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},Ct.Js=function(a,y){return a instanceof Cc&&y instanceof Cc&&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},Ct.B=function(a,y){return a-=y,-1<a&&1>a},Ct.zi=function(a,y,x,E){var b=a.length,z=E-x;if(!(1>=z))if((0>x||x>=b-1)&&pe("not in range 0 <= from < length: "+x),z===2)E=a[x],b=a[x+1],0<y(E,b)&&(a[x]=b,a[x+1]=E);else if(x===0)if(E>=b)a.sort(y);else for(x=a.slice(0,E),x.sort(y),y=0;y<E;y++)a[y]=x[y];else if(E>=b)for(E=a.slice(x),E.sort(y),y=x;y<b;y++)a[y]=E[y-x];else for(b=a.slice(x,E),b.sort(y),y=x;y<E;y++)a[y]=b[y-x]};function Pc(a,y){var x=a.tc[y];if(x>=a.He.length){for(var E=[],b=0;b<a.He.length;b++)E[b]=a.He[b];a.He=E}for(a.He[x]===void 0||a.He[x]===null?E=[]:(E=a.He[x],a.He[x]=null),a=a.fl[y],y=0;y<a.length;y++)x=a[y],E[x.index]=x;return E}function wc(a,y,x){a.He[a.tc[y]]=x}we.Object.defineProperties(zr.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()):pe("LayeredDigraphLayout.direction must be 0, 90, 180, or 270"))}},cycleRemoveOption:{get:function(){return this.Dk},set:function(a){this.Dk===a||a!==Fy&&a!==Q0&&a!==wm||(this.Dk=a,this.C())}},layeringOption:{get:function(){return this.Zk},set:function(a){this.Zk===a||a!==q0&&a!==By&&a!==ky||(this.Zk=a,this.C())}},initializeOption:{get:function(){return this.Qk},set:function(a){this.Qk===a||a!==$0&&a!==Ny&&a!==Dy||(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!==Ty&&a!==tv&&a!==Iy||(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 Q0=new Je(zr,"CycleDepthFirst",0),Fy=new Je(zr,"CycleGreedy",1),wm=new Je(zr,"CycleFromLayers",2),q0=new Je(zr,"LayerOptimalLinkLength",0),By=new Je(zr,"LayerLongestPathSink",1),ky=new Je(zr,"LayerLongestPathSource",2),$0=new Je(zr,"InitDepthFirstOut",0),Ny=new Je(zr,"InitDepthFirstIn",1),Dy=new Je(zr,"InitNaive",2),Ty=new Je(zr,"AggressiveNone",0),tv=new Je(zr,"AggressiveLess",1),Iy=new Je(zr,"AggressiveMore",2),Yx=8;zr.className="LayeredDigraphLayout",zr.CycleDepthFirst=Q0,zr.CycleGreedy=Fy,zr.CycleFromLayers=wm,zr.LayerOptimalLinkLength=q0,zr.LayerLongestPathSink=By,zr.LayerLongestPathSource=ky,zr.InitDepthFirstOut=$0,zr.InitDepthFirstIn=Ny,zr.InitNaive=Dy,zr.AggressiveNone=Ty,zr.AggressiveLess=tv,zr.AggressiveMore=Iy,zr.PackNone=0,zr.PackExpand=1,zr.PackStraighten=2,zr.PackMedian=4,zr.PackAll=15,zr.AlignNone=0,zr.AlignUpperLeft=1,zr.AlignUpperRight=2,zr.AlignLowerLeft=4,zr.AlignLowerRight=8,zr.AlignAll=15;function Cc(){this.index=this.Ic=this.rd=this.jc=this.first=this.layer=0,this.link=null,this.j=0}Cc.className="SegInfo";function Ep(a){_r.call(this,a)}Ce(Ep,_r),Ep.prototype.createVertex=function(){return new ml(this)},Ep.prototype.createEdge=function(){return new Cm(this)},Ep.className="LayeredDigraphNetwork";function ml(a){_o.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}Ce(ml,_o);function rx(a,y){return a.index-y.index}function ev(a,y){if(!a.$n){for(var x=[],E=Ci(a.destinationEdgesArrayAccess),b=E.next();!b.done;b=E.next())b=b.value,b.valid&&x.push(b);a.$n=x}for(a=Ci(a.$n),x=a.next();!x.done;x=a.next())if(x=x.value,x.toVertex===y)return x;pe("Unable to find destination edge to given vertex")}function Oy(a){if(!a.co){for(var y=[],x=Ci(a.sourceEdgesArrayAccess),E=x.next();!E.done;E=x.next())E=E.value,E.valid&&y.push(E.fromVertex);y.sort(rx),a.co=y}return a.co}function Xx(a){if(!a.ao){for(var y=[],x=Ci(a.destinationEdgesArrayAccess),E=x.next();!E.done;E=x.next())E=E.value,E.valid&&y.push(E.toVertex);y.sort(rx),a.ao=y}return a.ao}ml.prototype.Cl=function(a){_o.prototype.Cl.call(this,a),this.bo=this.co=null},ml.prototype.Kl=function(a){_o.prototype.Kl.call(this,a),this.bo=this.co=null},ml.prototype.zl=function(a){_o.prototype.zl.call(this,a),this.$n=this.ao=null},ml.prototype.Jl=function(a){_o.prototype.Jl.call(this,a),this.$n=this.ao=null},we.Object.defineProperties(ml.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)}}}),ml.prototype.deleteDestinationEdge=ml.prototype.Jl,ml.prototype.addDestinationEdge=ml.prototype.zl,ml.prototype.deleteSourceEdge=ml.prototype.Kl,ml.prototype.addSourceEdge=ml.prototype.Cl,ml.className="LayeredDigraphVertex";function Cm(a){Vs.call(this,a),this.j=this.ia=this.Ha=!1,this.V=this.u=NaN,this.F=this.o=0}Ce(Cm,Vs),we.Object.defineProperties(Cm.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)}}}),Cm.className="LayeredDigraphEdge";function $i(a){ro.call(this),this.Ub=new mn,this.Wn=ov,this.ud=sh,this.vo=sv,this.Bq=Yy,this.$v=[],this.td=!0,this.Rb=lv,this.$d=new Re(10,10).freeze();var y=new bg(this);this.W=new Al(y),this.Y=new Al(y),this.ru=[],a&&Object.assign(this,a)}Ce($i,ro),$i.prototype.cloneProtected=function(a){ro.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)},$i.prototype.qb=function(a){a.classType===$i?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:pe("Unknown enum value: "+a):ro.prototype.qb.call(this,a)},$i.prototype.createNetwork=function(){return new bg(this)},$i.prototype.makeNetwork=function(a){function y(E){if(E instanceof Vn)return!E.isLinkLabel&&E.category!=="Comment";if(E instanceof En){var b=E.fromNode;return b===null||b.isLinkLabel||b.category==="Comment"?!1:(E=E.toNode,!(E===null||E.isLinkLabel||E.category==="Comment"))}return!1}var x=this.createNetwork();return a instanceof Be?(x.lg(a.nodes,!0,y),x.lg(a.links,!0,y)):a instanceof Gi?x.lg(a.memberParts,!1,y):x.lg(a.iterator,!1,y),x},$i.prototype.doLayout=function(a){this.network===null&&(this.network=this.makeNetwork(a)),this.arrangement!==uv&&(this.arrangementOrigin=this.initialOrigin(this.arrangementOrigin));var y=this.diagram;if(y===null&&a instanceof Be&&(y=a),this.path===ov&&y!==null?this.ud=y.isTreePathToChildren?sh:Cg:this.ud=this.path===ov?sh:this.path,0<this.network.vertexes.count){for(this.network.Ko(),a=this.network.vertexes.iterator;a.next();)y=a.value,y.initialized=!1,y.level=0,y.parent=null,y.children=[];if(0<this.Ub.count){for(a=new mn,y=this.Ub.iterator;y.next();){var x=y.value;x instanceof Vn?(x=this.network.ki(x),x!==null&&a.add(x)):x instanceof Al&&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,Ry(this,y));for(y=this.network.vertexes,a=null;a=_x(y),0<a.count;)y=ox(this,a),y!==null&&this.Ub.add(y),y.initialized=!0,Ry(this,y),y=a;for(a=this.Ub.iterator;a.next();)y=a.value,y instanceof Al&&sx(this,y);for(a=this.Ub.iterator;a.next();)y=a.value,y instanceof Al&&lx(this,y);for(a=this.Ub.iterator;a.next();)y=a.value,y instanceof Al&&ux(this,y);if(this.Cu(),this.layerStyle===hv){for(a=[],y=this.network.vertexes.iterator;y.next();){x=y.value;var E=x.parent;E===null&&(E=x),E=E.angle===0||E.angle===180;var b=a[x.level];b===void 0&&(b=0),a[x.level]=Math.max(b,E?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,E=x.parent,E===null&&(E=x),E.angle===0||E.angle===180?(E.angle===180&&(x.focusX+=a[x.level]-x.width),x.width=a[x.level]):(E.angle===270&&(x.focusY+=a[x.level]-x.height),x.height=a[x.level])}else if(this.layerStyle===Xy)for(a=this.network.vertexes.iterator;a.next();){for(y=a.value,x=y.angle===0||y.angle===180,E=-1,b=0;b<y.children.length;b++){var z=y.children[b];E=Math.max(E,x?z.width:z.height)}if(0<=E)for(b=0;b<y.children.length;b++)z=y.children[b],x?(y.angle===180&&(z.focusX+=E-z.width),z.width=E):(y.angle===270&&(z.focusY+=E-z.height),z.height=E)}for(a=this.Ub.iterator;a.next();)y=a.value,y instanceof Al&&this.layoutTree(y);this.arrangeTrees(),this.updateParts()}this.network=null,this.Ub=new mn,this.isValidLayout=!0};function _x(a){var y=new mn;for(a=a.iterator;a.next();){var x=a.value;x.initialized||y.add(x)}return y}$i.prototype.findRoots=function(){for(var a=this.network.vertexes,y=a.iterator;y.next();){var x=y.value;switch(this.ud){case sh:x.sourceEdges.count===0&&this.Ub.add(x);break;case Cg:x.destinationEdges.count===0&&this.Ub.add(x);break;default:pe("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,E=null;for(y=y.iterator;y.next();){var b=y.value;switch(a.ud){case sh:b.sourceEdges.count<x&&(x=b.sourceEdges.count,E=b);break;case Cg:b.destinationEdges.count<x&&(x=b.destinationEdges.count,E=b);break;default:pe("Unhandled path value "+a.ud.toString())}}return E}function Ry(a,y){if(y!==null){switch(a.ud){case sh:if(0<y.destinationEdges.count){for(var x=new yn,E=y.destinationVertexes;E.next();){var b=E.value;ax(a,y,b)&&x.add(b)}0<x.count&&(y.children=x.Fa())}break;case Cg:if(0<y.sourceEdges.count){for(x=new yn,E=y.sourceVertexes;E.next();)b=E.value,ax(a,y,b)&&x.add(b);0<x.count&&(y.children=x.Fa())}break;default:pe("Unhandled path value"+a.ud.toString())}for(x=y.children,E=x.length,b=0;b<E;b++){var z=x[b];z.initialized=!0,z.level=y.level+1,z.parent=y,a.Ub.remove(z)}for(y=0;y<E;y++)Ry(a,x[y])}}function ax(a,y,x){if(x.initialized){if(y===null)var E=!1;else{for(E=y.parent;E!==null&&E!==x;)E=E.parent;E=E===x}if(E||x.level>y.level)return!1;a.removeChild(x.parent,x)}return!0}$i.prototype.removeChild=function(a,y){if(a!==null&&y!==null){for(var x=a.children,E=0,b=0;b<x.length;b++)x[b]===y&&E++;if(0<E){E=Array(x.length-E);for(var z=b=0;z<x.length;z++)x[z]!==y&&(E[b++]=x[z]);a.children=E}}};function sx(a,y){if(y!==null){a.initializeTreeVertexValues(y),y.alignment===hh&&a.sortTreeVertexChildren(y);for(var x=0,E=y.childrenCount,b=0,z=y.children,tt=z.length,rt=0;rt<tt;rt++){var ot=z[rt];sx(a,ot),x+=ot.descendantCount+1,E=Math.max(E,ot.maxChildrenCount),b=Math.max(b,ot.maxGenerationCount)}y.descendantCount=x,y.maxChildrenCount=E,y.maxGenerationCount=0<E?b+1:0}}function Jx(a,y){switch(a.vo){default:case sv:return y.parent!==null?y.parent:a.W;case Ky:return y.parent===null?a.W:y.parent.parent===null?a.Y:y.parent;case Uy:return y.parent!==null?y.parent.parent!==null?y.parent.parent:a.Y:a.W;case Vy:var x=!0;if(y.childrenCount===0)x=!1;else for(var E=y.children,b=E.length,z=0;z<b;z++)if(0<E[z].childrenCount){x=!1;break}return x&&y.parent!==null?a.Y:y.parent!==null?y.parent:a.W}}$i.prototype.initializeTreeVertexValues=function(a){if(a.copyInheritedPropertiesFrom(Jx(this,a)),a.parent!==null&&a.parent.alignment===hh){for(var y=a.angle,x=a.parent.children,E=0;E<x.length&&a!==x[E];)E++;E%2===0?E!==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,E=0;E<x;E++)lx(a,y[E])}}$i.prototype.assignTreeVertexValues=function(){};function ux(a,y){if(y!==null){y.alignment!==hh&&a.sortTreeVertexChildren(y),y=y.children;for(var x=y.length,E=0;E<x;E++)ux(a,y[E])}}$i.prototype.sortTreeVertexChildren=function(a){switch(a.sorting){case bp:break;case bm:a.children.reverse();break;case Lm:a.children.sort(a.comparer);break;case Mm:a.children.sort(a.comparer),a.children.reverse();break;default:pe("Unhandled sorting value "+a.sorting.toString())}},$i.prototype.Cu=function(){if(this.comments)for(var a=this.network.vertexes.iterator;a.next();)this.addComments(a.value)},$i.prototype.addComments=function(a){var y=a.angle,x=a.parent,E=0,b=!1;x!==null&&(E=x.angle,b=x.alignment,b=Ec(b)),y=y===90||y===270,E=E===90||E===270,x=a.childrenCount===0;var z=0,tt=0,rt=0,ot=a.commentSpacing;if(a.node!==null)for(var st=a.node.Mu();st.next();){var ut=st.value;ut.category==="Comment"&&ut.canLayout()&&(a.comments===null&&(a.comments=[]),a.comments.push(ut),ut.Va(),ut=ut.measuredBounds,y&&!x||!b&&!E&&x||b&&E&&x?(z=Math.max(z,ut.width),tt+=ut.height+Math.abs(rt)):(z+=ut.width+Math.abs(rt),tt=Math.max(tt,ut.height)),rt=ot)}a.comments!==null&&(y&&!x||!b&&!E&&x||b&&E&&x?(z+=Math.abs(a.commentMargin),tt=Math.max(0,tt-a.height)):(tt+=Math.abs(a.commentMargin),z=Math.max(0,z-a.width)),b=Ye.allocAt(0,0,a.bounds.width+z,a.bounds.height+tt),a.bounds=b,Ye.free(b))};function Ec(a){return a===Md||a===hh||a===Ad||a===Hh}function Em(a){return a===Md||a===hh}function jy(a){var y=a.parent;if(y!==null){var x=y.alignment;if(Ec(x)){if(Em(x)){for(y=y.children,x=0;x<y.length&&a!==y[x];)x++;return x%2===0}if(x===Ad)return!0}}return!1}$i.prototype.layoutComments=function(a){if(a.comments!==null){var y=a.node.measuredBounds,x=a.parent,E=a.angle,b=0,z=!1;x!==null&&(b=x.angle,z=x.alignment,z=Ec(z)),E=E===90||E===270,x=b===90||b===270;for(var tt=a.childrenCount===0,rt=jy(a),ot=0,st=a.comments,ut=st.length,ft=Gt.alloc(),St=0;St<ut;St++){var wt=st[St],Et=wt.measuredBounds;if(E&&!tt||!z&&!x&&tt||z&&x&&tt){if(135<b&&!z||x&&rt)if(0<=a.commentMargin)for(ft.h(a.bounds.x-a.commentMargin-Et.width,a.bounds.y+ot),wt.move(ft),wt=wt.Sd();wt.next();){var Bt=wt.value;Bt.fromSpot=us,Bt.toSpot=Aa}else for(ft.h(a.bounds.x+2*a.focus.x-a.commentMargin,a.bounds.y+ot),wt.move(ft),wt=wt.Sd();wt.next();)Bt=wt.value,Bt.fromSpot=Aa,Bt.toSpot=us;else if(0<=a.commentMargin)for(ft.h(a.bounds.x+2*a.focus.x+a.commentMargin,a.bounds.y+ot),wt.move(ft),wt=wt.Sd();wt.next();)Bt=wt.value,Bt.fromSpot=Aa,Bt.toSpot=us;else for(ft.h(a.bounds.x+a.commentMargin-Et.width,a.bounds.y+ot),wt.move(ft),wt=wt.Sd();wt.next();)Bt=wt.value,Bt.fromSpot=us,Bt.toSpot=Aa;ot=0<=a.commentSpacing?ot+(Et.height+a.commentSpacing):ot+(a.commentSpacing-Et.height)}else{if(135<b&&!z||!x&&rt)if(0<=a.commentMargin)for(ft.h(a.bounds.x+ot,a.bounds.y-a.commentMargin-Et.height),wt.move(ft),wt=wt.Sd();wt.next();)Bt=wt.value,Bt.fromSpot=$a,Bt.toSpot=Ua;else for(ft.h(a.bounds.x+ot,a.bounds.y+2*a.focus.y-a.commentMargin),wt.move(ft),wt=wt.Sd();wt.next();)Bt=wt.value,Bt.fromSpot=Ua,Bt.toSpot=$a;else if(0<=a.commentMargin)for(ft.h(a.bounds.x+ot,a.bounds.y+2*a.focus.y+a.commentMargin),wt.move(ft),wt=wt.Sd();wt.next();)Bt=wt.value,Bt.fromSpot=Ua,Bt.toSpot=$a;else for(ft.h(a.bounds.x+ot,a.bounds.y+a.commentMargin-Et.height),wt.move(ft),wt=wt.Sd();wt.next();)Bt=wt.value,Bt.fromSpot=$a,Bt.toSpot=Ua;ot=0<=a.commentSpacing?ot+(Et.width+a.commentSpacing):ot+(a.commentSpacing-Et.width)}}if(Gt.free(ft),y=ot-a.commentSpacing-(E?y.height:y.width),this.ud===sh)for(a=a.destinationEdges;a.next();)b=a.value.link,b===null||b.isAvoiding||(b.fromEndSegmentLength=0<y?y:NaN);else for(a=a.sourceEdges;a.next();)b=a.value.link,b===null||b.isAvoiding||(b.toEndSegmentLength=0<y?y:NaN)}},$i.prototype.layoutTree=function(a){if(a!==null){for(var y=a.children,x=y.length,E=0;E<x;E++)this.layoutTree(y[E]);switch(a.compaction){case av:hx(this,a);break;case Am:if(a.alignment===hh)hx(this,a);else if(a.childrenCount===0)E=a.parent,x=!1,y=0,E!==null&&(y=E.angle,x=E.alignment,x=Ec(x)),E=jy(a),a.S.h(0,0),a.Da.h(a.width,a.height),a.parent===null||a.comments===null||(y!==180&&y!==270||x)&&!E?a.la.h(0,0):y===180&&!x||(y===90||y===270)&&E?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 b=Xl(a);y=b===90||b===270;var z=0,tt=a.children,rt=tt.length;for(x=0;x<rt;x++)E=tt[x],z=Math.max(z,y?E.Da.width:E.Da.height);var ot=a.alignment;E=ot===lh;var st=ot===uh,ut=Ec(ot),ft=Math.max(0,a.breadthLimit);x=this.computeLayerSpacing(a);var St=a.nodeSpacing,wt=this.computeNodeIndent(a),Et=a.rowSpacing,Bt=0;(E||st||a.hm||a.im&&a.maxGenerationCount===1)&&(Bt=Math.max(0,a.rowIndent)),E=a.width;var Vt=a.height,jt=0,_t=0,Qt=0,ie=null,ce=null,ke=0,On=0,ri=0,qn=0,wn=0,tn=0,ji=0,Fi=0;if(ut&&!Em(ot)&&135<b&&tt.reverse(),Em(ot))if(1<rt)for(var Lr=0;Lr<rt;Lr++)Lr%2===0&&Lr!==rt-1&&(Fi=Math.max(Fi,y?tt[Lr].Da.width:tt[Lr].Da.height));else rt===1&&(Fi=y?tt[0].Da.width:tt[0].Da.height);if(ut){switch(ot){case Md:_t=135>b?dx(this,a,tt,Fi,jt,_t):cx(this,a,tt,Fi,jt,_t),Fi=_t.x,jt=_t.width,_t=_t.height;break;case Ad:for(ie=0;ie<rt;ie++)ce=tt[ie],ft=ce.Da,Qt=tn===0?0:Et,y?(ce.S.h(z-ft.width,qn+Qt),jt=Math.max(jt,ft.width),_t=Math.max(_t,qn+Qt+ft.height),qn+=Qt+ft.height):(ce.S.h(ri+Qt,z-ft.height),jt=Math.max(jt,ri+Qt+ft.width),_t=Math.max(_t,ft.height),ri+=Qt+ft.width),tn++;break;case Hh:for(ie=0;ie<rt;ie++)ce=tt[ie],z=ce.Da,ft=tn===0?0:Et,y?(ce.S.h(St/2+a.focus.x,qn+ft),jt=Math.max(jt,z.width),_t=Math.max(_t,qn+ft+z.height),qn+=ft+z.height):(ce.S.h(ri+ft,St/2+a.focus.y),jt=Math.max(jt,ri+ft+z.width),_t=Math.max(_t,z.height),ri+=ft+z.width),tn++}ie=Ns(this,2),ce=Ns(this,2),y?(ie[0].h(0,0),ie[1].h(0,_t),ce[0].h(jt,0)):(ie[0].h(0,0),ie[1].h(jt,0),ce[0].h(0,_t)),ce[1].h(jt,_t)}else for(Lr=0;Lr<rt;Lr++){var Kr=tt[Lr],na=Kr.Da;if(y){0<ft&&0<tn&&ri+St+na.width>ft&&(ri<z&&Ef(a,ot,z-ri,0,ji,Lr-1),wn++,tn=0,ji=Lr,Qt=_t,ri=0,qn=135<b?-_t-Et:_t+Et),iv(this,Kr,0,qn);var aa=0;if(tn===0)ie=Kr.Yo,ce=Kr.kp,ke=na.width,On=na.height,(ie===null||ce===null||b!==Xl(Kr))&&(ie=Ns(this,2),ce=Ns(this,2),ie[0].h(0,0),ie[1].h(0,On),ce[0].h(ke,0),ce[1].h(ke,On));else{var Ja=Si();On=fx(this,a,Kr,ie,ce,ke,On,Ja),aa=On.x,ie=Ja[0],ce=Ja[1],ke=On.width,On=On.height,wi(Ja),ri<na.width&&0>aa&&(wg(a,-aa,0,ji,Lr-1),rv(ie,-aa,0),rv(ce,-aa,0),aa=0)}Kr.S.h(aa,qn),jt=Math.max(jt,ke),_t=Math.max(_t,Qt+(wn===0?0:Et)+na.height),ri=ke}else 0<ft&&0<tn&&qn+St+na.height>ft&&(qn<z&&Ef(a,ot,0,z-qn,ji,Lr-1),wn++,tn=0,ji=Lr,Qt=jt,qn=0,ri=135<b?-jt-Et:jt+Et),iv(this,Kr,ri,0),aa=0,tn===0?(ie=Kr.Yo,ce=Kr.kp,ke=na.width,On=na.height,(ie===null||ce===null||b!==Xl(Kr))&&(ie=Ns(this,2),ce=Ns(this,2),ie[0].h(0,0),ie[1].h(ke,0),ce[0].h(0,On),ce[1].h(ke,On))):(Ja=Si(),On=fx(this,a,Kr,ie,ce,ke,On,Ja),aa=On.x,ie=Ja[0],ce=Ja[1],ke=On.width,On=On.height,wi(Ja),qn<na.height&&0>aa&&(wg(a,0,-aa,ji,Lr-1),rv(ie,0,-aa),rv(ce,0,-aa),aa=0)),Kr.S.h(ri,aa),_t=Math.max(_t,On),jt=Math.max(jt,Qt+(wn===0?0:Et)+na.width),qn=On;tn++}switch(0<wn&&(y?(_t+=Math.max(0,x),ri<jt&&Ef(a,ot,jt-ri,0,ji,rt-1),0<Bt&&(st||wg(a,Bt,0,0,rt-1),jt+=Bt)):(jt+=Math.max(0,x),qn<_t&&Ef(a,ot,0,_t-qn,ji,rt-1),0<Bt&&(st||wg(a,0,Bt,0,rt-1),_t+=Bt))),Bt=st=0,ot){case Lp:y?st+=jt/2-a.focus.x-wt/2:Bt+=_t/2-a.focus.y-wt/2;break;case Eg:0<wn?y?st+=jt/2-a.focus.x-wt/2:Bt+=_t/2-a.focus.y-wt/2:y?(Fi=tt[0].S.x+tt[0].la.x,st+=Fi+(tt[rt-1].S.x+tt[rt-1].la.x+2*tt[rt-1].focus.x-Fi)/2-a.focus.x-wt/2):(Fi=tt[0].S.y+tt[0].la.y,Bt+=Fi+(tt[rt-1].S.y+tt[rt-1].la.y+2*tt[rt-1].focus.y-Fi)/2-a.focus.y-wt/2);break;case lh:y?(st-=wt,jt+=wt):(Bt-=wt,_t+=wt);break;case uh:y?(st+=jt-a.width+wt,jt+=wt):(Bt+=_t-a.height+wt,_t+=wt);break;case Md:y?1<rt?st+=Fi+St/2-a.focus.x:st+=tt[0].focus.x-a.focus.x+tt[0].la.x:1<rt?Bt+=Fi+St/2-a.focus.y:Bt+=tt[0].focus.y-a.focus.y+tt[0].la.y;break;case Ad:y?st+=jt+St/2-a.focus.x:Bt+=_t+St/2-a.focus.y;break;case Hh:break;default:_t=this.customAlignment(a,st,Bt,jt,_t),st=_t[0],Bt=_t[1],jt=_t[2],_t=_t[3]}for(wt=0;wt<rt;wt++)Fi=tt[wt],y?Fi.S.h(Fi.S.x+Fi.la.x-st,Fi.S.y+(135<b?(ut?-_t:-Fi.Da.height)+Fi.la.y-x:Vt+x+Fi.la.y)):Fi.S.h(Fi.S.x+(135<b?(ut?-jt:-Fi.Da.width)+Fi.la.x-x:E+x+Fi.la.x),Fi.S.y+Fi.la.y-Bt);if(rt=tt=0,ut?y?(jt=zy(a,jt,st),0>st&&(st=0),135<b&&(Bt+=_t+x),_t+=Vt+x,ot===Hh&&(tt+=St/2+a.focus.x),rt+=Vt+x):(135<b&&(st+=jt+x),jt+=E+x,_t=Gy(a,_t,Bt),0>Bt&&(Bt=0),ot===Hh&&(rt+=St/2+a.focus.y),tt+=E+x):y?(a.comments===null?E>jt&&(jt=Hy(ot,E-jt,0),tt=jt.x,rt=jt.y,jt=E,st=0):jt=zy(a,jt,st),0>st&&(tt-=st,st=0),135<b&&(Bt+=_t+x),_t=Math.max(Math.max(_t,Vt),_t+Vt+x),rt+=Vt+x):(135<b&&(st+=jt+x),jt=Math.max(Math.max(jt,E),jt+E+x),a.comments===null?Vt>_t&&(_t=Hy(ot,0,Vt-_t),tt=_t.x,rt=_t.y,_t=Vt,Bt=0):_t=Gy(a,_t,Bt),0>Bt&&(rt-=Bt,Bt=0),tt+=E+x),0<wn)b=Ns(this,4),wn=Ns(this,4),y?(b[2].h(0,Vt+x),b[3].h(b[2].x,_t),wn[2].h(jt,b[2].y),wn[3].h(wn[2].x,b[3].y)):(b[2].h(E+x,0),b[3].h(jt,b[2].y),wn[2].h(b[2].x,_t),wn[3].h(b[3].x,wn[2].y));else{for(b=Ns(this,ie.length+2),wn=Ns(this,ce.length+2),ot=0;ot<ie.length;ot++)ut=ie[ot],b[ot+2].h(ut.x+tt,ut.y+rt);for(ot=0;ot<ce.length;ot++)ut=ce[ot],wn[ot+2].h(ut.x+tt,ut.y+rt)}y?(b[0].h(st,0),b[1].h(b[0].x,Vt),b[2].y<b[1].y&&(b[2].x>b[0].x?b[2].assign(b[1]):b[1].assign(b[2])),b[3].y<b[2].y&&(b[3].x>b[0].x?b[3].assign(b[2]):b[2].assign(b[3])),wn[0].h(st+E,0),wn[1].h(wn[0].x,Vt),wn[2].y<wn[1].y&&(wn[2].x<wn[0].x?wn[2].assign(wn[1]):wn[1].assign(wn[2])),wn[3].y<wn[2].y&&(wn[3].x<wn[0].x?wn[3].assign(wn[2]):wn[2].assign(wn[3])),b[2].y-=x/2,wn[2].y-=x/2):(b[0].h(0,Bt),b[1].h(E,b[0].y),b[2].x<b[1].x&&(b[2].y>b[0].y?b[2].assign(b[1]):b[1].assign(b[2])),b[3].x<b[2].x&&(b[3].y>b[0].y?b[3].assign(b[2]):b[2].assign(b[3])),wn[0].h(0,Bt+Vt),wn[1].h(E,wn[0].y),wn[2].x<wn[1].x&&(wn[2].y<wn[0].y?wn[2].assign(wn[1]):wn[1].assign(wn[2])),wn[3].x<wn[2].x&&(wn[3].y<wn[0].y?wn[3].assign(wn[2]):wn[2].assign(wn[3])),b[2].x-=x/2,wn[2].x-=x/2),pu(this,ie),pu(this,ce),a.Yo=b,a.kp=wn,a.la.h(st,Bt),a.Da.h(jt,_t)}break;default:pe("Unhandled compaction value "+a.compaction.toString())}}};function hx(a,y){if(y.childrenCount===0){var x=!1,E=0;y.parent!==null&&(E=y.parent.angle,x=y.parent.alignment,x=Ec(x));var b=jy(y);y.S.h(0,0),y.Da.h(y.width,y.height),y.parent===null||y.comments===null||(E!==180&&E!==270||x)&&!b?y.la.h(0,0):E===180&&!x||(E===90||E===270)&&b?y.la.h(y.width-2*y.focus.x,0):y.la.h(0,y.height-2*y.focus.y)}else{E=Xl(y),x=E===90||E===270;var z=0;b=y.children;for(var tt=b.length,rt=0;rt<tt;rt++){var ot=b[rt];z=Math.max(z,x?ot.Da.width:ot.Da.height)}var st=y.alignment,ut=st===lh,ft=st===uh;rt=Ec(st);var St=Math.max(0,y.breadthLimit);ot=a.computeLayerSpacing(y);var wt=y.nodeSpacing,Et=a.computeNodeIndent(y),Bt=ut||ft?0:Et/2,Vt=y.rowSpacing,jt=0;(ut||ft||y.hm||y.im&&y.maxGenerationCount===1)&&(jt=Math.max(0,y.rowIndent)),ut=y.width;var _t=y.height,Qt=0,ie=0,ce=0,ke=0,On=0,ri=0,qn=0,wn=0,tn=0,ji=0;if(rt&&!Em(st)&&135<E&&b.reverse(),Em(st))if(1<tt)for(var Fi=0;Fi<tt;Fi++){var Lr=b[Fi],Kr=Lr.Da;Fi%2===0&&Fi!==tt-1?tn=Math.max(tn,(x?Kr.width:Kr.height)+a.computeBusNodeSpacing(Lr)-wt):Fi%2!==0&&(ji=Math.max(ji,(x?Kr.width:Kr.height)+a.computeBusNodeSpacing(Lr)-wt))}else tt===1&&(tn=x?b[0].Da.width:b[0].Da.height);if(rt)switch(st){case Md:case hh:ie=135>E?dx(a,y,b,tn,Qt,ie):cx(a,y,b,tn,Qt,ie),tn=ie.x,Qt=ie.width,ie=ie.height;break;case Ad:for(St=0;St<tt;St++)Bt=b[St],ce=Bt.Da,ji=qn===0?0:Vt,x?(Bt.S.h(z-ce.width,On+ji),Qt=Math.max(Qt,ce.width),ie=Math.max(ie,On+ji+ce.height),On+=ji+ce.height):(Bt.S.h(ke+ji,z-ce.height),Qt=Math.max(Qt,ke+ji+ce.width),ie=Math.max(ie,ce.height),ke+=ji+ce.width),qn++;break;case Hh:for(z=0;z<tt;z++)St=b[z],Bt=St.Da,ce=qn===0?0:Vt,x?(St.S.h(wt/2+y.focus.x,On+ce),Qt=Math.max(Qt,Bt.width),ie=Math.max(ie,On+ce+Bt.height),On+=ce+Bt.height):(St.S.h(ke+ce,wt/2+y.focus.y),Qt=Math.max(Qt,ke+ce+Bt.width),ie=Math.max(ie,Bt.height),ke+=ce+Bt.width),qn++}else for(ji=0;ji<tt;ji++)Fi=b[ji],Lr=Fi.Da,x?(0<St&&0<qn&&ke+wt+Lr.width>St&&(ke<z&&Ef(y,st,z-ke,0,wn,ji-1),ri++,qn=0,wn=ji,ce=ie,ke=0,On=135<E?-ie-Vt:ie+Vt),Kr=qn===0?Bt:wt,iv(a,Fi,0,On),Fi.S.h(ke+Kr,On),Qt=Math.max(Qt,ke+Kr+Lr.width),ie=Math.max(ie,ce+(ri===0?0:Vt)+Lr.height),ke+=Kr+Lr.width):(0<St&&0<qn&&On+wt+Lr.height>St&&(On<z&&Ef(y,st,0,z-On,wn,ji-1),ri++,qn=0,wn=ji,ce=Qt,On=0,ke=135<E?-Qt-Vt:Qt+Vt),Kr=qn===0?Bt:wt,iv(a,Fi,ke,0),Fi.S.h(ke,On+Kr),ie=Math.max(ie,On+Kr+Lr.height),Qt=Math.max(Qt,ce+(ri===0?0:Vt)+Lr.width),On+=Kr+Lr.height),qn++;switch(0<ri&&(x?(ie+=Math.max(0,ot),ke<Qt&&Ef(y,st,Qt-ke,0,wn,tt-1),0<jt&&(ft||wg(y,jt,0,0,tt-1),Qt+=jt)):(Qt+=Math.max(0,ot),On<ie&&Ef(y,st,0,ie-On,wn,tt-1),0<jt&&(ft||wg(y,0,jt,0,tt-1),ie+=jt))),jt=ft=0,st){case Lp:x?ft+=Qt/2-y.focus.x-Et/2:jt+=ie/2-y.focus.y-Et/2;break;case Eg:0<ri?x?ft+=Qt/2-y.focus.x-Et/2:jt+=ie/2-y.focus.y-Et/2:x?(a=b[0].S.x+b[0].la.x,ft+=a+(b[tt-1].S.x+b[tt-1].la.x+2*b[tt-1].focus.x-a)/2-y.focus.x-Et/2):(a=b[0].S.y+b[0].la.y,jt+=a+(b[tt-1].S.y+b[tt-1].la.y+2*b[tt-1].focus.y-a)/2-y.focus.y-Et/2);break;case lh:x?(ft-=Et,Qt+=Et):(jt-=Et,ie+=Et);break;case uh:x?(ft+=Qt-y.width+Et,Qt+=Et):(jt+=ie-y.height+Et,ie+=Et);break;case Md:case hh:x?1<tt?ft+=tn+wt/2-y.focus.x:ft+=b[0].focus.x-y.focus.x+b[0].la.x:1<tt?jt+=tn+wt/2-y.focus.y:jt+=b[0].focus.y-y.focus.y+b[0].la.y;break;case Ad:x?ft+=Qt+wt/2-y.focus.x:jt+=ie+wt/2-y.focus.y;break;case Hh:break;default:a=a.customAlignment(y,ft,jt,Qt,ie),ft=a[0],jt=a[1],Qt=a[2],ie=a[3]}for(a=0;a<tt;a++)Et=b[a],x?Et.S.h(Et.S.x+Et.la.x-ft,Et.S.y+(135<E?(rt?-ie:-Et.Da.height)+Et.la.y-ot:_t+ot+Et.la.y)):Et.S.h(Et.S.x+(135<E?(rt?-Qt:-Et.Da.width)+Et.la.x-ot:ut+ot+Et.la.x),Et.S.y+Et.la.y-jt);x?(Qt=zy(y,Qt,ft),0>ft&&(ft=0),135<E&&(jt+=ie+ot),ie=Math.max(Math.max(ie,_t),ie+_t+ot)):(135<E&&(ft+=Qt+ot),Qt=Math.max(Math.max(Qt,ut),Qt+ut+ot),ie=Gy(y,ie,jt),0>jt&&(jt=0)),y.la.h(ft,jt),y.Da.h(Qt,ie)}}$i.prototype.customAlignment=function(a,y,x,E,b){return[y,x,E,b]};function dx(a,y,x,E,b,z){var tt=x.length;if(tt===0)return new Ye(E,0,b,z);if(tt===1)return y=x[0],b=y.Da.width,z=y.Da.height,new Ye(E,0,b,z);for(var rt=y.nodeSpacing,ot=y.rowSpacing,st=Xl(y)===90,ut=0,ft=0,St=0,wt=0;wt<tt;wt++)if(!(wt%2!==0||1<tt&&wt===tt-1)){var Et=x[wt],Bt=Et.Da,Vt=ut===0?0:ot;if(st){var jt=a.computeBusNodeSpacing(Et)-rt;Et.S.h(E-(Bt.width+jt),St+Vt),b=Math.max(b,Bt.width+jt),z=Math.max(z,St+Vt+Bt.height),St+=Vt+Bt.height}else jt=a.computeBusNodeSpacing(Et)-rt,Et.S.h(ft+Vt,E-(Bt.height+jt)),z=Math.max(z,Bt.height+jt),b=Math.max(b,ft+Vt+Bt.width),ft+=Vt+Bt.width;ut++}for(ut=0,Et=ft,wt=St,st?(ft=E+rt,St=0):(ft=0,St=E+rt),Bt=0;Bt<tt;Bt++)if(Bt%2!==0){Vt=x[Bt],jt=Vt.Da;var _t=ut===0?0:ot;if(st){var Qt=a.computeBusNodeSpacing(Vt)-rt;Vt.S.h(ft+Qt,St+_t),b=Math.max(b,ft+jt.width+Qt),z=Math.max(z,St+_t+jt.height),St+=_t+jt.height}else Qt=a.computeBusNodeSpacing(Vt)-rt,Vt.S.h(ft+_t,St+Qt),b=Math.max(b,ft+_t+jt.width),z=Math.max(z,St+jt.height+Qt),ft+=_t+jt.width;ut++}return 1<tt&&tt%2===1&&(x=x[tt-1],tt=x.Da,a=a.computeBusLastRowSpacing(x,st?Math.max(Math.abs(wt),Math.abs(St)):Math.max(Math.abs(Et),Math.abs(ft))),st?(x.S.h(E+rt/2-x.focus.x-x.la.x,z+a),st=E+rt/2-x.focus.x-x.la.x,b=Math.max(b,st+tt.width),0>st&&(b-=st),z=Math.max(z,Math.max(wt,St)+a+tt.height),0>x.S.x&&(E=nv(y,x.S.x,!1,E,rt))):(x.S.h(b+a,E+rt/2-x.focus.y-x.la.y),b=Math.max(b,Math.max(Et,ft)+a+tt.width),St=E+rt/2-x.focus.y-x.la.y,z=Math.max(z,St+tt.height),0>St&&(z-=St),0>x.S.y&&(E=nv(y,x.S.y,!0,E,rt)))),new Ye(E,0,b,z)}function cx(a,y,x,E,b,z){var tt=x.length;if(tt===0)return new Ye(E,0,b,z);if(tt===1)return x=x[0],b=x.Da.width,z=x.Da.height,new Ye(E,0,b,z);for(var rt=y.nodeSpacing,ot=y.rowSpacing,st=Xl(y)===270,ut=0,ft=0,St=0,wt=0;wt<tt;wt++)if(!(wt%2!==0||1<tt&&wt===tt-1)){var Et=x[wt],Bt=Et.Da,Vt=ut===0?0:ot;if(st){var jt=a.computeBusNodeSpacing(Et)-rt;St-=Vt+Bt.height,Et.S.h(E-(Bt.width+jt),St),b=Math.max(b,Bt.width+jt),z=Math.max(z,Math.abs(St))}else jt=a.computeBusNodeSpacing(Et)-rt,ft-=Vt+Bt.width,Et.S.h(ft,E-(Bt.height+jt)),z=Math.max(z,Bt.height+jt),b=Math.max(b,Math.abs(ft));ut++}for(ut=0,Et=ft,wt=St,st?(ft=E+rt,St=0):(ft=0,St=E+rt),Bt=0;Bt<tt;Bt++)if(Bt%2!==0){Vt=x[Bt],jt=Vt.Da;var _t=ut===0?0:ot;if(st){var Qt=a.computeBusNodeSpacing(Vt)-rt;St-=_t+jt.height,Vt.S.h(ft+Qt,St),b=Math.max(b,ft+jt.width+Qt),z=Math.max(z,Math.abs(St))}else Qt=a.computeBusNodeSpacing(Vt)-rt,ft-=_t+jt.width,Vt.S.h(ft,St+Qt),z=Math.max(z,St+jt.height+Qt),b=Math.max(b,Math.abs(ft));ut++}for(1<tt&&tt%2===1&&(ot=x[tt-1],ut=ot.Da,a=a.computeBusLastRowSpacing(ot,st?Math.max(Math.abs(wt),Math.abs(St)):Math.max(Math.abs(Et),Math.abs(ft))),st?(ot.S.h(E+rt/2-ot.focus.x-ot.la.x,-z-ut.height-a),ft=E+rt/2-ot.focus.x-ot.la.x,b=Math.max(b,ft+ut.width),0>ft&&(b-=ft),z=Math.max(z,Math.abs(Math.min(wt,St))+a+ut.height),0>ot.S.x&&(E=nv(y,ot.S.x,!1,E,rt))):(ot.S.h(-b-ut.width-a,E+rt/2-ot.focus.y-ot.la.y),b=Math.max(b,Math.abs(Math.min(Et,ft))+a+ut.width),St=E+rt/2-ot.focus.y-ot.la.y,z=Math.max(z,St+ut.height),0>St&&(z-=St),0>ot.S.y&&(E=nv(y,ot.S.y,!0,E,rt)))),y=0;y<tt;y++)rt=x[y],st?rt.S.h(rt.S.x,rt.S.y+z):rt.S.h(rt.S.x+b,rt.S.y);return new Ye(E,0,b,z)}$i.prototype.computeBusNodeSpacing=function(a){return a.parent===null?0:a.parent.nodeSpacing},$i.prototype.computeBusLastRowSpacing=function(a){return a.parent===null?0:a.parent.rowSpacing};function nv(a,y,x,E,b){a=a.children;for(var z=a.length,tt=0;tt<z;tt++)x?a[tt].S.h(a[tt].S.x,a[tt].S.y-y):a[tt].S.h(a[tt].S.x-y,a[tt].S.y);return y=a[z-1],Math.max(E,x?y.la.y+y.focus.y-b/2:y.la.x+y.focus.x-b/2)}function zy(a,y,x){switch(a.alignment){case Eg:case Lp:return x+a.width>y&&(y=x+a.width),0>x&&(y-=x),y;case lh:return a.width>y?a.width:y;case uh:return 2*a.focus.x>y?a.width:y+a.width-2*a.focus.x;case Md:case hh:return Math.max(a.width,Math.max(y,x+a.width)-Math.min(0,x));case Ad:return a.width-a.focus.x+a.nodeSpacing/2+y;case Hh:return Math.max(a.width,a.focus.x+a.nodeSpacing/2+y);default:return y}}function Gy(a,y,x){switch(a.alignment){case Eg:case Lp:return x+a.height>y&&(y=x+a.height),0>x&&(y-=x),y;case lh:return a.height>y?a.height:y;case uh:return 2*a.focus.y>y?a.height:y+a.height-2*a.focus.y;case Md:case hh:return Math.max(a.height,Math.max(y,x+a.height)-Math.min(0,x));case Ad:return a.height-a.focus.y+a.nodeSpacing/2+y;case Hh:return Math.max(a.height,a.focus.y+a.nodeSpacing/2+y);default:return y}}function Hy(a,y,x){switch(a){case Lp:y/=2,x/=2;break;case Eg:y/=2,x/=2;break;case lh:x=y=0;break;case uh:break;default:pe("Unhandled alignment value "+a.toString())}return new Gt(y,x)}function Ef(a,y,x,E,b,z){y=Hy(y,x,E),wg(a,y.x,y.y,b,z)}function wg(a,y,x,E,b){if(y!==0||x!==0)for(a=a.children;E<=b;E++){var z=a[E].S;z.x+=y,z.y+=x}}function iv(a,y,x,E){var b=y.parent;switch(a.ud){case sh:for(a=y.sourceEdges;a.next();)y=a.value,y.fromVertex===b&&y.relativePoint.h(x,E);break;case Cg:for(a=y.destinationEdges;a.next();)y=a.value,y.toVertex===b&&y.relativePoint.h(x,E);break;default:pe("Unhandled path value "+a.ud.toString())}}function rv(a,y,x){for(var E=0;E<a.length;E++){var b=a[E];b.x+=y,b.y+=x}}function fx(a,y,x,E,b,z,tt,rt){var ot=Xl(y),st=ot===90||ot===270,ut=y.nodeSpacing;y=E;var ft=b;E=z;var St=tt,wt=x.Yo,Et=x.kp;tt=x.Da;var Bt=st?Math.max(St,tt.height):Math.max(E,tt.width);if((wt===null||ot!==Xl(x))&&(wt=Ns(a,2),Et=Ns(a,2),st?(wt[0].h(0,0),wt[1].h(0,tt.height),Et[0].h(tt.width,0),Et[1].h(Et[0].x,wt[1].y)):(wt[0].h(0,0),wt[1].h(tt.width,0),Et[0].h(0,tt.height),Et[1].h(wt[1].x,Et[0].y))),st){if(St=9999999,!(ft===null||2>ft.length||wt===null||2>wt.length))for(b=x=0;x<ft.length&&b<wt.length;){z=ft[x];var Vt=wt[b];ot=Vt.x,st=Vt.y,ot+=E;var jt=z;x+1<ft.length&&(jt=ft[x+1]);var _t=Vt;Vt=_t.x,_t=_t.y,b+1<wt.length&&(_t=wt[b+1],Vt=_t.x,_t=_t.y,Vt+=E);var Qt=St;z.y===st?Qt=ot-z.x:z.y>st&&z.y<_t?Qt=ot+(z.y-st)/(_t-st)*(Vt-ot)-z.x:st>z.y&&st<jt.y&&(Qt=ot-(z.x+(st-z.y)/(jt.y-z.y)*(jt.x-z.x))),Qt<St&&(St=Qt),jt.y<=z.y?x++:_t<=st?b++:(jt.y<=_t&&x++,_t<=jt.y&&b++)}if(St=E-St,St+=ut,x=wt,b=St,y===null||2>y.length||x===null||2>x.length)E=null;else{for(ut=Ns(a,y.length+x.length),E=z=ot=0;z<x.length&&x[z].y<y[0].y;)st=x[z++],ut[E++].h(st.x+b,st.y);for(;ot<y.length;)st=y[ot++],ut[E++].h(st.x,st.y);for(ot=y[y.length-1].y;z<x.length&&x[z].y<=ot;)z++;for(;z<x.length&&x[z].y>ot;)st=x[z++],ut[E++].h(st.x+b,st.y);for(x=Ns(a,E),ot=0;ot<E;ot++)x[ot].assign(ut[ot]);pu(a,ut),E=x}if(z=Et,ot=St,ft===null||2>ft.length||z===null||2>z.length)b=null;else{for(ut=Ns(a,ft.length+z.length),b=st=x=0;x<ft.length&&ft[x].y<z[0].y;)jt=ft[x++],ut[b++].h(jt.x,jt.y);for(;st<z.length;)jt=z[st++],ut[b++].h(jt.x+ot,jt.y);for(z=z[z.length-1].y;x<ft.length&&ft[x].y<=z;)x++;for(;x<ft.length&&ft[x].y>z;)ot=ft[x++],ut[b++].h(ot.x,ot.y);for(z=Ns(a,b),x=0;x<b;x++)z[x].assign(ut[x]);pu(a,ut),b=z}return z=Math.max(0,St)+tt.width,tt=Bt,pu(a,y),pu(a,wt),pu(a,ft),pu(a,Et),rt[0]=E,rt[1]=b,new Ye(St,0,z,tt)}if(E=9999999,!(ft===null||2>ft.length||wt===null||2>wt.length))for(b=x=0;x<ft.length&&b<wt.length;)z=ft[x],Vt=wt[b],ot=Vt.x,st=Vt.y,st+=St,jt=z,x+1<ft.length&&(jt=ft[x+1]),_t=Vt,Vt=_t.x,_t=_t.y,b+1<wt.length&&(_t=wt[b+1],Vt=_t.x,_t=_t.y,_t+=St),Qt=E,z.x===ot?Qt=st-z.y:z.x>ot&&z.x<Vt?Qt=st+(z.x-ot)/(Vt-ot)*(_t-st)-z.y:ot>z.x&&ot<jt.x&&(Qt=st-(z.y+(ot-z.x)/(jt.x-z.x)*(jt.y-z.y))),Qt<E&&(E=Qt),jt.x<=z.x?x++:Vt<=ot?b++:(jt.x<=Vt&&x++,Vt<=jt.x&&b++);if(St-=E,St+=ut,x=wt,b=St,y===null||2>y.length||x===null||2>x.length)E=null;else{for(ut=Ns(a,y.length+x.length),E=z=ot=0;z<x.length&&x[z].x<y[0].x;)st=x[z++],ut[E++].h(st.x,st.y+b);for(;ot<y.length;)st=y[ot++],ut[E++].h(st.x,st.y);for(ot=y[y.length-1].x;z<x.length&&x[z].x<=ot;)z++;for(;z<x.length&&x[z].x>ot;)st=x[z++],ut[E++].h(st.x,st.y+b);for(x=Ns(a,E),ot=0;ot<E;ot++)x[ot].assign(ut[ot]);pu(a,ut),E=x}if(z=Et,ot=St,ft===null||2>ft.length||z===null||2>z.length)b=null;else{for(ut=Ns(a,ft.length+z.length),b=st=x=0;x<ft.length&&ft[x].x<z[0].x;)jt=ft[x++],ut[b++].h(jt.x,jt.y);for(;st<z.length;)jt=z[st++],ut[b++].h(jt.x,jt.y+ot);for(z=z[z.length-1].x;x<ft.length&&ft[x].x<=z;)x++;for(;x<ft.length&&ft[x].x>z;)ot=ft[x++],ut[b++].h(ot.x,ot.y);for(z=Ns(a,b),x=0;x<b;x++)z[x].assign(ut[x]);pu(a,ut),b=z}return z=Bt,tt=Math.max(0,St)+tt.height,pu(a,y),pu(a,wt),pu(a,ft),pu(a,Et),rt[0]=E,rt[1]=b,new Ye(St,0,z,tt)}function Ns(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 Gt;return a}function pu(a,y){var x=y.length,E=a.ru[x];E===void 0&&(E=[],a.ru[x]=E),E.push(y)}$i.prototype.arrangeTrees=function(){if(this.Rb===uv)for(var a=this.Ub.iterator;a.next();){var y=a.value;if(y instanceof Al){var x=y.node;if(x!==null){var E=x.position;x=E.x,E=E.y,isFinite(x)||(x=0),isFinite(E)||(E=0),Wy(this,y,x,E)}}}else{for(a=[],y=this.Ub.iterator;y.next();)x=y.value,x instanceof Al&&a.push(x);switch(this.sorting){case bp:break;case bm:a.reverse();break;case Lm:a.sort(this.comparer);break;case Mm:a.sort(this.comparer),a.reverse();break;default:pe("Unhandled sorting value "+this.sorting.toString())}for(x=this.arrangementOrigin,y=x.x,x=x.y,E=0;E<a.length;E++){var b=a[E];switch(Wy(this,b,y+b.la.x,x+b.la.y),this.Rb){case lv:x+=b.Da.height+this.$d.height;break;case Zy:y+=b.Da.width+this.$d.width;break;default:pe("Unhandled arrangement value "+this.Rb.toString())}}}};function Wy(a,y,x,E){if(y!==null){y.x=x,y.y=E,y=y.children;for(var b=y.length,z=0;z<b;z++){var tt=y[z];Wy(a,tt,x+tt.S.x,E+tt.S.y)}}}$i.prototype.commitLayout=function(){this.yv(),this.commitNodes(),this.Gu(),this.isRouting&&this.commitLinks()},$i.prototype.commitNodes=function(){for(var a=this.network.vertexes.iterator;a.next();)a.value.commit();for(a.reset();a.next();)this.layoutComments(a.value)},$i.prototype.Gu=function(){if(this.layerStyle===hv){for(var a=this.$v,y=[],x=null,E=this.network.vertexes.iterator;E.next();){var b=E.value;x===null?x=b.bounds.copy():x.ed(b.bounds);var z=y[b.level];z===void 0?z=this.computeLayerSpacing(b):z=Math.max(z,this.computeLayerSpacing(b)),y[b.level]=z}for(E=0;E<y.length;E++)y[E]===void 0&&(y[E]=0);if(this.angle===90||this.angle===270?(x.Bc(this.nodeSpacing/2,this.layerSpacing),E=new Gt(-this.nodeSpacing/2,-this.layerSpacing/2)):(x.Bc(this.layerSpacing,this.nodeSpacing/2),E=new Gt(-this.layerSpacing/2,-this.nodeSpacing/2)),b=[],x=this.angle===90||this.angle===270?x.width:x.height,z=0,this.angle===180||this.angle===270)for(var tt=0;tt<a.length;tt++)z+=a[tt]+y[tt];for(tt=0;tt<a.length;tt++){var rt=a[tt]+y[tt];this.angle===270?(z-=rt,b.push(new Ye(0,z,x,rt))):this.angle===90?(b.push(new Ye(0,z,x,rt)),z+=rt):this.angle===180?(z-=rt,b.push(new Ye(z,0,rt,x))):(b.push(new Ye(z,0,rt,x)),z+=rt)}this.commitLayers(b,E)}},$i.prototype.commitLayers=function(){},$i.prototype.commitLinks=function(){for(var a=this.network.edges.iterator;a.next();)a.value.commit()},$i.prototype.yv=function(){for(var a=this.Ub.iterator;a.next();){var y=a.value;y instanceof Al&&gx(this,y)}};function gx(a,y){if(y!==null){a.setPortSpots(y),y=y.children;for(var x=y.length,E=0;E<x;E++)gx(a,y[E])}}$i.prototype.setPortSpots=function(a){var y=a.alignment;if(Ec(y)){var x=this.ud===sh,E=Xl(a);switch(E){case 0:var b=Aa;break;case 90:b=Ua;break;case 180:b=us;break;default:b=$a}var z=a.children,tt=z.length;switch(y){case Md:case hh:for(y=0;y<tt;y++){var rt=z[y];if(rt=(x?rt.sourceEdges:rt.destinationEdges).first(),rt!==null&&(rt=rt.link,rt!==null)){var ot=E===90||E===270?us:$a;if(tt===1||y===tt-1&&tt%2===1)switch(E){case 0:ot=us;break;case 90:ot=$a;break;case 180:ot=Aa;break;default:ot=Ua}else y%2===0&&(ot=E===90||E===270?Aa:Ua);x?(a.setsPortSpot&&(rt.fromSpot=b),a.setsChildPortSpot&&(rt.toSpot=ot)):(a.setsPortSpot&&(rt.fromSpot=ot),a.setsChildPortSpot&&(rt.toSpot=b))}}break;case Ad:for(E=E===90||E===270?Aa:Ua,z=x?a.destinationEdges:a.sourceEdges;z.next();)tt=z.value.link,tt!==null&&(x?(a.setsPortSpot&&(tt.fromSpot=b),a.setsChildPortSpot&&(tt.toSpot=E)):(a.setsPortSpot&&(tt.fromSpot=E),a.setsChildPortSpot&&(tt.toSpot=b)));break;case Hh:for(E=E===90||E===270?us:$a,z=x?a.destinationEdges:a.sourceEdges;z.next();)tt=z.value.link,tt!==null&&(x?(a.setsPortSpot&&(tt.fromSpot=b),a.setsChildPortSpot&&(tt.toSpot=E)):(a.setsPortSpot&&(tt.fromSpot=E),a.setsChildPortSpot&&(tt.toSpot=b)))}}else if(x=Xl(a),this.ud===sh){for(b=a.destinationEdges;b.next();)if(E=b.value.link,E!==null){if(a.setsPortSpot)if(a.portSpot.Xb())switch(x){case 0:E.fromSpot=Aa;break;case 90:E.fromSpot=Ua;break;case 180:E.fromSpot=us;break;default:E.fromSpot=$a}else E.fromSpot=a.portSpot;if(a.setsChildPortSpot)if(a.childPortSpot.Xb())switch(x){case 0:E.toSpot=us;break;case 90:E.toSpot=$a;break;case 180:E.toSpot=Aa;break;default:E.toSpot=Ua}else E.toSpot=a.childPortSpot}}else for(b=a.sourceEdges;b.next();)if(E=b.value.link,E!==null){if(a.setsPortSpot)if(a.portSpot.Xb())switch(x){case 0:E.toSpot=Aa;break;case 90:E.toSpot=Ua;break;case 180:E.toSpot=us;break;default:E.toSpot=$a}else E.toSpot=a.portSpot;if(a.setsChildPortSpot)if(a.childPortSpot.Xb())switch(x){case 0:E.fromSpot=us;break;case 90:E.fromSpot=$a;break;case 180:E.fromSpot=Aa;break;default:E.fromSpot=Ua}else E.fromSpot=a.childPortSpot}};function Xl(a){return a=a.angle,45>=a?0:135>=a?90:225>=a?180:315>=a?270:0}$i.prototype.computeLayerSpacing=function(a){var y=Xl(a);y=y===90||y===270;var x=a.layerSpacing;if(0<a.layerSpacingParentOverlap){var E=Math.min(1,a.layerSpacingParentOverlap);x-=y?a.height*E:a.width*E}return x<(y?-a.height:-a.width)&&(x=y?-a.height:-a.width),x},$i.prototype.computeNodeIndent=function(a){var y=Xl(a),x=a.nodeIndent;if(0<a.nodeIndentPastParent){var E=Math.min(1,a.nodeIndentPastParent);x+=y===90||y===270?a.width*E:a.height*E}return x=Math.max(0,x)},we.Object.defineProperties($i.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!==sv&&a!==Uy&&a!==Vy&&a!==Ky||(this.vo=a,this.C())}},layerStyle:{get:function(){return this.Bq},set:function(a){this.Rb===a||a!==Yy&&a!==Xy&&a!==hv||(this.Bq=a,this.C())}},comments:{get:function(){return this.td},set:function(a){this.td!==a&&(this.td=a,this.C())}},arrangement:{get:function(){return this.Rb},set:function(a){this.Rb===a||a!==lv&&a!==Zy&&a!==uv||(this.Rb=a,this.C())}},arrangementSpacing:{get:function(){return this.$d},set:function(a){this.$d.D(a)||(this.$d.assign(a),this.C())}},rootDefaults:{get:function(){return this.W},set:function(a){this.W!==a&&(this.W=a,this.C())}},alternateDefaults:{get:function(){return this.Y},set:function(a){this.Y!==a&&(this.Y=a,this.C())}},sorting:{get:function(){return this.W.sorting},set:function(a){this.W.sorting===a||a!==bp&&a!==bm&&a!==Lm&&!Mm||(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()):pe("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!==av&&a!==Am||(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!==bp&&a!==bm&&a!==Lm&&!Mm||(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!==av&&a!==Am||(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 ov=new Je($i,"PathDefault",-1),sh=new Je($i,"PathDestination",0),Cg=new Je($i,"PathSource",1),bp=new Je($i,"SortingForwards",10),bm=new Je($i,"SortingReverse",11),Lm=new Je($i,"SortingAscending",12),Mm=new Je($i,"SortingDescending",13),Lp=new Je($i,"AlignmentCenterSubtrees",20),Eg=new Je($i,"AlignmentCenterChildren",21),lh=new Je($i,"AlignmentStart",22),uh=new Je($i,"AlignmentEnd",23),Md=new Je($i,"AlignmentBus",24),hh=new Je($i,"AlignmentBusBranching",25),Ad=new Je($i,"AlignmentTopLeftBus",26),Hh=new Je($i,"AlignmentBottomRightBus",27),av=new Je($i,"CompactionNone",30),Am=new Je($i,"CompactionBlock",31),sv=new Je($i,"StyleLayered",40),Vy=new Je($i,"StyleLastParents",41),Uy=new Je($i,"StyleAlternating",42),Ky=new Je($i,"StyleRootOnly",43),lv=new Je($i,"ArrangementVertical",50),Zy=new Je($i,"ArrangementHorizontal",51),uv=new Je($i,"ArrangementFixedRoots",52),Yy=new Je($i,"LayerIndividual",60),Xy=new Je($i,"LayerSiblings",61),hv=new Je($i,"LayerUniform",62);$i.className="TreeLayout",$i.PathDefault=ov,$i.PathDestination=sh,$i.PathSource=Cg,$i.SortingForwards=bp,$i.SortingReverse=bm,$i.SortingAscending=Lm,$i.SortingDescending=Mm,$i.AlignmentCenterSubtrees=Lp,$i.AlignmentCenterChildren=Eg,$i.AlignmentStart=lh,$i.AlignmentEnd=uh,$i.AlignmentBus=Md,$i.AlignmentBusBranching=hh,$i.AlignmentTopLeftBus=Ad,$i.AlignmentBottomRightBus=Hh,$i.CompactionNone=av,$i.CompactionBlock=Am,$i.StyleLayered=sv,$i.StyleLastParents=Vy,$i.StyleAlternating=Uy,$i.StyleRootOnly=Ky,$i.ArrangementVertical=lv,$i.ArrangementHorizontal=Zy,$i.ArrangementFixedRoots=uv,$i.LayerIndividual=Yy,$i.LayerSiblings=Xy,$i.LayerUniform=hv;function bg(a){_r.call(this,a)}Ce(bg,_r),bg.prototype.createVertex=function(){return new Al(this)},bg.prototype.createEdge=function(){return new Mp(this)},bg.className="TreeNetwork";function Al(a){_o.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 Gt(0,0),this.Da=new Re(0,0),this.la=new Gt(0,0),this.im=this.hm=this.qA=!1,this.kp=this.Yo=null,this.nd=bp,this.hd=gy,this.Kb=0,this.Jb=Eg,this.Vq=this.Uq=0,this.Wq=20,this.ie=50,this.Aq=0,this.Hp=Am,this.Ap=0,this.nr=25,this.Gp=this.mr=10,this.Fp=20,this.xr=!0,this.dr=ha,this.wr=!0,this.Dp=ha}Ce(Al,_o),Al.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)},we.Object.defineProperties(Al.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)}}}),Al.className="TreeVertex";function Mp(a){Vs.call(this,a),this.$t=new Gt(0,0)}Ce(Mp,Vs),Mp.prototype.commit=function(){var a=this.link;if(a!==null&&!a.isAvoiding){var y=this.network.layout,x=null,E=null;switch(y.ud){case sh:x=this.fromVertex,E=this.toVertex;break;case Cg:x=this.toVertex,E=this.fromVertex;break;default:pe("Unhandled path value "+y.ud.toString())}if(x!==null&&E!==null){var b=this.$t;if(b.x!==0||b.y!==0||x.qA){E=x.bounds;var z=Xl(x),tt=y.computeLayerSpacing(x),rt=x.rowSpacing;a.vg();var ot=a.curve===el,st=a.isOrthogonal,ut;if(a.uh(),st||ot){for(ut=2;4<a.pointsCount;)a.pv(2);var ft=a.i(1),St=a.i(2)}else{for(ut=1;3<a.pointsCount;)a.pv(1);ft=a.i(0),St=a.i(a.pointsCount-1)}var wt=a.i(a.pointsCount-1);z===0?(x.alignment===uh?(z=E.bottom+b.y,b.y===0&&ft.y>wt.y+x.rowIndent&&(z=Math.min(z,Math.max(ft.y,z-y.computeNodeIndent(x))))):x.alignment===lh?(z=E.top+b.y,b.y===0&&ft.y<wt.y-x.rowIndent&&(z=Math.max(z,Math.min(ft.y,z+y.computeNodeIndent(x))))):z=x.hm||x.im&&x.maxGenerationCount===1?E.top-x.la.y+b.y:E.y+E.height/2+b.y,ot?(a.m(ut,ft.x,z),ut++,a.m(ut,E.right+tt,z),ut++,a.m(ut,E.right+tt+(b.x-rt)/3,z),ut++,a.m(ut,E.right+tt+2*(b.x-rt)/3,z),ut++,a.m(ut,E.right+tt+(b.x-rt),z),ut++,a.m(ut,St.x,z)):(st&&(a.m(ut,E.right+tt/2,ft.y),ut++),a.m(ut,E.right+tt/2,z),ut++,a.m(ut,E.right+tt+b.x-(st?rt/2:rt),z),ut++,st&&a.m(ut,a.i(ut-1).x,St.y))):z===90?(x.alignment===uh?(z=E.right+b.x,b.x===0&&ft.x>wt.x+x.rowIndent&&(z=Math.min(z,Math.max(ft.x,z-y.computeNodeIndent(x))))):x.alignment===lh?(z=E.left+b.x,b.x===0&&ft.x<wt.x-x.rowIndent&&(z=Math.max(z,Math.min(ft.x,z+y.computeNodeIndent(x))))):z=x.hm||x.im&&x.maxGenerationCount===1?E.left-x.la.x+b.x:E.x+E.width/2+b.x,ot?(a.m(ut,z,ft.y),ut++,a.m(ut,z,E.bottom+tt),ut++,a.m(ut,z,E.bottom+tt+(b.y-rt)/3),ut++,a.m(ut,z,E.bottom+tt+2*(b.y-rt)/3),ut++,a.m(ut,z,E.bottom+tt+(b.y-rt)),ut++,a.m(ut,z,St.y)):(st&&(a.m(ut,ft.x,E.bottom+tt/2),ut++),a.m(ut,z,E.bottom+tt/2),ut++,a.m(ut,z,E.bottom+tt+b.y-(st?rt/2:rt)),ut++,st&&a.m(ut,St.x,a.i(ut-1).y))):z===180?(x.alignment===uh?(z=E.bottom+b.y,b.y===0&&ft.y>wt.y+x.rowIndent&&(z=Math.min(z,Math.max(ft.y,z-y.computeNodeIndent(x))))):x.alignment===lh?(z=E.top+b.y,b.y===0&&ft.y<wt.y-x.rowIndent&&(z=Math.max(z,Math.min(ft.y,z+y.computeNodeIndent(x))))):z=x.hm||x.im&&x.maxGenerationCount===1?E.top-x.la.y+b.y:E.y+E.height/2+b.y,ot?(a.m(ut,ft.x,z),ut++,a.m(ut,E.left-tt,z),ut++,a.m(ut,E.left-tt+(b.x+rt)/3,z),ut++,a.m(ut,E.left-tt+2*(b.x+rt)/3,z),ut++,a.m(ut,E.left-tt+(b.x+rt),z),ut++,a.m(ut,St.x,z)):(st&&(a.m(ut,E.left-tt/2,ft.y),ut++),a.m(ut,E.left-tt/2,z),ut++,a.m(ut,E.left-tt+b.x+(st?rt/2:rt),z),ut++,st&&a.m(ut,a.i(ut-1).x,St.y))):z===270?(x.alignment===uh?(z=E.right+b.x,b.x===0&&ft.x>wt.x+x.rowIndent&&(z=Math.min(z,Math.max(ft.x,z-y.computeNodeIndent(x))))):x.alignment===lh?(z=E.left+b.x,b.x===0&&ft.x<wt.x-x.rowIndent&&(z=Math.max(z,Math.min(ft.x,z+y.computeNodeIndent(x))))):z=x.hm||x.im&&x.maxGenerationCount===1?E.left-x.la.x+b.x:E.x+E.width/2+b.x,ot?(a.m(ut,z,ft.y),ut++,a.m(ut,z,E.top-tt),ut++,a.m(ut,z,E.top-tt+(b.y+rt)/3),ut++,a.m(ut,z,E.top-tt+2*(b.y+rt)/3),ut++,a.m(ut,z,E.top-tt+(b.y+rt)),ut++,a.m(ut,z,St.y)):(st&&(a.m(ut,ft.x,E.top-tt/2),ut++),a.m(ut,z,E.top-tt/2),ut++,a.m(ut,z,E.top-tt+b.y+(st?rt/2:rt)),ut++,st&&a.m(ut,St.x,a.i(ut-1).y))):pe("Invalid angle "+z),a.zf()}else b=E,a=this.link,E=this.network.layout,y=Xl(x),y!==Xl(b)&&(tt=E.computeLayerSpacing(x),rt=x.bounds,x=b.bounds,y===0&&x.left-rt.right<tt+1||y===90&&x.top-rt.bottom<tt+1||y===180&&rt.left-x.right<tt+1||y===270&&rt.top-x.bottom<tt+1||(a.vg(),x=a.curve===el,b=a.isOrthogonal,E=Ec(this.fromVertex.alignment),a.uh(),y===0?(y=rt.right+tt/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)):b?E?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=rt.bottom+tt/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)):b?E?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=rt.left-tt/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)):b?E?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=rt.top-tt/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)):b?E?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()))}}},we.Object.defineProperties(Mp.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)}}}),Mp.className="TreeEdge",qr.prototype.initializeStandardTools=function(){this.gb("Action",new bs,this.mouseDownTools),this.gb("Relinking",new Es,this.mouseDownTools),this.gb("LinkReshaping",new Mo,this.mouseDownTools),this.gb("Rotating",new za,this.mouseDownTools),this.gb("Resizing",new ya,this.mouseDownTools),this.gb("Linking",new ja,this.mouseMoveTools),this.gb("Dragging",new lo,this.mouseMoveTools),this.gb("DragSelecting",new Ls,this.mouseMoveTools),this.gb("Panning",new sa,this.mouseMoveTools),this.gb("ContextMenu",new Ga,this.mouseUpTools),this.gb("TextEditing",new Yr,this.mouseUpTools),this.gb("ClickCreating",new Ku,this.mouseUpTools),this.gb("ClickSelecting",new vh,this.mouseUpTools)},Au("Horizontal",new zm),Au("Spot",new Hm),Au("Table",new Vm),Au("Viewbox",new Zm),Au("TableRow",new Um),Au("TableColumn",new Km),Au("Graduated",new Up),Au("Grid",new Vp),gf.add("GraphLinksModel",oa),gf.add("TreeModel",gl);var dv=Xe.go,_y={get licenseKey(){return Be.licenseKey},set licenseKey(a){Be.licenseKey=a},get version(){return Be.version},Group:Gi,EnumValue:Je,List:yn,Set:mn,Map:yi,Point:Gt,Size:Re,Rect:Ye,Margin:Di,Spot:pi,Geometry:Fn,PathFigure:Yo,PathSegment:xr,InputEvent:Fa,DiagramEvent:Ou,ChangedEvent:oo,Model:li,GraphLinksModel:hr,TreeModel:os,Binding:Do,Transaction:Jo,UndoManager:so,CommandHandler:Wt,Tool:fr,DraggingTool:lo,DraggingInfo:su,DraggingOptions:at,LinkingBaseTool:xo,LinkingTool:ja,RelinkingTool:Es,LinkReshapingTool:Mo,ResizingTool:ya,RotatingTool:za,ClickSelectingTool:vh,ActionTool:bs,ClickCreatingTool:Ku,HTMLInfo:xl,ContextMenuTool:Ga,DragSelectingTool:Ls,PanningTool:sa,TextEditingTool:Yr,ToolManager:qr,Animation:ca,AnimationManager:cs,AnimationTrigger:hl,Layer:qo,Diagram:Be,Palette:ct,Overview:mt,Brush:mr,GraphObject:fe,Panel:pn,RowColumnDefinition:Vo,Shape:Ui,TextBlock:Xr,Picture:ms,Part:mi,Adornment:Pr,Node:Vn,Link:En,Placeholder:es,Layout:ro,LayoutNetwork:_r,LayoutVertex:_o,LayoutEdge:Vs,GridLayout:pa,PanelLayout:Xo,CircularLayout:mo,CircularNetwork:wp,CircularVertex:ym,CircularEdge:K0,ForceDirectedLayout:Ma,ForceDirectedNetwork:Pg,ForceDirectedVertex:Sm,ForceDirectedEdge:xm,LayeredDigraphLayout:zr,LayeredDigraphNetwork:Ep,LayeredDigraphVertex:ml,LayeredDigraphEdge:Cm,TreeLayout:$i,TreeNetwork:bg,TreeVertex:Al,TreeEdge:Mp};typeof dv=="object"&&dv.version&&Oi("WARNING: a `go` object on the root object is already defined. "+("Debug"in dv?"debug ":"")+"version: "+dv.version+", replaced with version: "+_y.version),Be.prototype.go=_y,Xe.go=_y,typeof fn.exports=="object"&&(fn.exports=typeof Ft.g!="undefined"?Ft.g.go:self.go)}();var pt=typeof Ft.g!="undefined"?Ft.g.go:self.go;const Ht=typeof Ft.g!="undefined"?Ft.g.go:self.go,ve=Ht.Group,Me=Ht.EnumValue,Pe=Ht.List,Ae=Ht.Set,ee=Ht.Map,Fe=Ht.Point,ye=Ht.Size,de=Ht.Rect,he=Ht.Margin,Ne=Ht.Spot,He=Ht.Geometry,kt=Ht.PathFigure,nt=Ht.PathSegment,et=Ht.InputEvent,ht=Ht.DiagramEvent,lt=Ht.ChangedEvent,gt=Ht.Model,yt=Ht.GraphLinksModel,Lt=Ht.TreeModel,Dt=Ht.Binding,zt=Ht.Transaction,Xt=Ht.UndoManager,re=Ht.CommandHandler,le=Ht.Tool,ae=Ht.DraggingTool,je=Ht.DraggingInfo,ne=Ht.LinkingBaseTool,Le=Ht.LinkingTool,ue=Ht.RelinkingTool,Ee=Ht.LinkReshapingTool,ge=Ht.ResizingTool,Ue=Ht.RotatingTool,nn=Ht.ClickSelectingTool,_e=Ht.ActionTool,qt=Ht.ClickCreatingTool,Jt=Ht.HTMLInfo,De=Ht.ContextMenuTool,sn=Ht.DragSelectingTool,cn=Ht.PanningTool,Te=Ht.TextEditingTool,en=Ht.ToolManager,Cn=Ht.Animation,Gn=Ht.AnimationManager,vn=Ht.AnimationTrigger,zn=Ht.Layer,me=Ht.Diagram,An=Ht.Palette,ui=Ht.Overview,un=Ht.Brush,ln=Ht.GraphObject,oi=Ht.Panel,xn=Ht.RowColumnDefinition,Ie=Ht.Shape,Ze=Ht.TextBlock,Hn=Ht.TextBlockMetrics,qe=Ht.Picture,$e=Ht.Part,Pn=Ht.Adornment,Rt=Ht.Node,bt=Ht.Link,Pt=Ht.Placeholder,It=Ht.Layout,Yt=Ht.LayoutNetwork,Nt=Ht.LayoutVertex,xe=Ht.LayoutEdge,_n=Ht.GridLayout,ni=Ht.PanelLayout,ei=Ht.CircularLayout,ii=Ht.CircularNetwork,Hi=Ht.CircularVertex,hi=Ht.CircularEdge,Jn=Ht.ForceDirectedLayout,Vi=Ht.ForceDirectedNetwork,er=Ht.ForceDirectedVertex,nr=Ht.ForceDirectedEdge,sr=Ht.LayeredDigraphLayout,kr=Ht.LayeredDigraphNetwork,or=Ht.LayeredDigraphVertex,_i=Ht.LayeredDigraphEdge,gr=Ht.TreeLayout,Mr=Ht.TreeNetwork,Ei=Ht.TreeVertex,Qr=Ht.TreeEdge,Rn=Ht.version},24334:function(fn,Bn,Ft){var pt,Ht;(function(ve,Me){fn.exports=Me(ve)})(typeof self!="undefined"?self:typeof window!="undefined"?window:typeof Ft.g!="undefined"?Ft.g:this,function(ve){"use strict";ve=ve||{};var Me=ve.Base64,Pe="2.6.4",Ae="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",ee=function(ue){for(var Ee={},ge=0,Ue=ue.length;ge<Ue;ge++)Ee[ue.charAt(ge)]=ge;return Ee}(Ae),Fe=String.fromCharCode,ye=function(ue){if(ue.length<2){var Ee=ue.charCodeAt(0);return Ee<128?ue:Ee<2048?Fe(192|Ee>>>6)+Fe(128|Ee&63):Fe(224|Ee>>>12&15)+Fe(128|Ee>>>6&63)+Fe(128|Ee&63)}else{var Ee=65536+(ue.charCodeAt(0)-55296)*1024+(ue.charCodeAt(1)-56320);return Fe(240|Ee>>>18&7)+Fe(128|Ee>>>12&63)+Fe(128|Ee>>>6&63)+Fe(128|Ee&63)}},de=/[\uD800-\uDBFF][\uDC00-\uDFFFF]|[^\x00-\x7F]/g,he=function(ue){return ue.replace(de,ye)},Ne=function(ue){var Ee=[0,2,1][ue.length%3],ge=ue.charCodeAt(0)<<16|(ue.length>1?ue.charCodeAt(1):0)<<8|(ue.length>2?ue.charCodeAt(2):0),Ue=[Ae.charAt(ge>>>18),Ae.charAt(ge>>>12&63),Ee>=2?"=":Ae.charAt(ge>>>6&63),Ee>=1?"=":Ae.charAt(ge&63)];return Ue.join("")},He=ve.btoa&&typeof ve.btoa=="function"?function(ue){return ve.btoa(ue)}:function(ue){if(ue.match(/[^\x00-\xFF]/))throw new RangeError("The string contains invalid characters.");return ue.replace(/[\s\S]{1,3}/g,Ne)},kt=function(ue){return He(he(String(ue)))},nt=function(ue){return ue.replace(/[+\/]/g,function(Ee){return Ee=="+"?"-":"_"}).replace(/=/g,"")},et=function(ue,Ee){return Ee?nt(kt(ue)):kt(ue)},ht=function(ue){return et(ue,!0)},lt;ve.Uint8Array&&(lt=function(ue,Ee){for(var ge="",Ue=0,nn=ue.length;Ue<nn;Ue+=3){var _e=ue[Ue],qt=ue[Ue+1],Jt=ue[Ue+2],De=_e<<16|qt<<8|Jt;ge+=Ae.charAt(De>>>18)+Ae.charAt(De>>>12&63)+(typeof qt!="undefined"?Ae.charAt(De>>>6&63):"=")+(typeof Jt!="undefined"?Ae.charAt(De&63):"=")}return Ee?nt(ge):ge});var gt=/[\xC0-\xDF][\x80-\xBF]|[\xE0-\xEF][\x80-\xBF]{2}|[\xF0-\xF7][\x80-\xBF]{3}/g,yt=function(ue){switch(ue.length){case 4:var Ee=(7&ue.charCodeAt(0))<<18|(63&ue.charCodeAt(1))<<12|(63&ue.charCodeAt(2))<<6|63&ue.charCodeAt(3),ge=Ee-65536;return Fe((ge>>>10)+55296)+Fe((ge&1023)+56320);case 3:return Fe((15&ue.charCodeAt(0))<<12|(63&ue.charCodeAt(1))<<6|63&ue.charCodeAt(2));default:return Fe((31&ue.charCodeAt(0))<<6|63&ue.charCodeAt(1))}},Lt=function(ue){return ue.replace(gt,yt)},Dt=function(ue){var Ee=ue.length,ge=Ee%4,Ue=(Ee>0?ee[ue.charAt(0)]<<18:0)|(Ee>1?ee[ue.charAt(1)]<<12:0)|(Ee>2?ee[ue.charAt(2)]<<6:0)|(Ee>3?ee[ue.charAt(3)]:0),nn=[Fe(Ue>>>16),Fe(Ue>>>8&255),Fe(Ue&255)];return nn.length-=[0,0,2,1][ge],nn.join("")},zt=ve.atob&&typeof ve.atob=="function"?function(ue){return ve.atob(ue)}:function(ue){return ue.replace(/\S{1,4}/g,Dt)},Xt=function(ue){return zt(String(ue).replace(/[^A-Za-z0-9\+\/]/g,""))},re=function(ue){return Lt(zt(ue))},le=function(ue){return String(ue).replace(/[-_]/g,function(Ee){return Ee=="-"?"+":"/"}).replace(/[^A-Za-z0-9\+\/]/g,"")},ae=function(ue){return re(le(ue))},je;ve.Uint8Array&&(je=function(ue){return Uint8Array.from(Xt(le(ue)),function(Ee){return Ee.charCodeAt(0)})});var ne=function(){var ue=ve.Base64;return ve.Base64=Me,ue};if(ve.Base64={VERSION:Pe,atob:Xt,btoa:He,fromBase64:ae,toBase64:et,utob:he,encode:et,encodeURI:ht,btou:Lt,decode:ae,noConflict:ne,fromUint8Array:lt,toUint8Array:je},typeof Object.defineProperty=="function"){var Le=function(ue){return{value:ue,enumerable:!1,writable:!0,configurable:!0}};ve.Base64.extendString=function(){Object.defineProperty(String.prototype,"fromBase64",Le(function(){return ae(this)})),Object.defineProperty(String.prototype,"toBase64",Le(function(ue){return et(this,ue)})),Object.defineProperty(String.prototype,"toBase64URI",Le(function(){return et(this,!0)}))}}return ve.Meteor&&(Base64=ve.Base64),fn.exports?fn.exports.Base64=ve.Base64:(pt=[],Ht=function(){return ve.Base64}.apply(Bn,pt),Ht!==void 0&&(fn.exports=Ht)),{Base64:ve.Base64}})},12921:function(fn,Bn,Ft){"use strict";Ft.d(Bn,{Z5:function(){return rg},_l:function(){return Ya},bK:function(){return qs}});var pt=Ft(59301),Ht=Ft(60039);function ve(vt,xt){vt.prototype=Object.create(xt.prototype),vt.prototype.constructor=vt,(0,Ht.Z)(vt,xt)}var Me=Ft(72308),Pe=Ft(59781),Ae=pt.createContext(null),ee=null;function Fe(vt){vt()}var ye=Fe,de=function(xt){return ye=xt},he=function(){return ye};function Ne(){var vt=he(),xt=null,Mt=null;return{clear:function(){xt=null,Mt=null},notify:function(){vt(function(){for(var Zt=xt;Zt;)Zt.callback(),Zt=Zt.next})},get:function(){for(var Zt=[],Kt=xt;Kt;)Zt.push(Kt),Kt=Kt.next;return Zt},subscribe:function(Zt){var Kt=!0,te=Mt={callback:Zt,next:null,prev:Mt};return te.prev?te.prev.next=te:xt=te,function(){!Kt||xt===null||(Kt=!1,te.next?te.next.prev=te.prev:Mt=te.prev,te.prev?te.prev.next=te.next:xt=te.next)}}}}var He={notify:function(){},get:function(){return[]}};function kt(vt,xt){var Mt,Tt=He;function Zt(We){return Oe(),Tt.subscribe(We)}function Kt(){Tt.notify()}function te(){Ke.onStateChange&&Ke.onStateChange()}function se(){return!!Mt}function Oe(){Mt||(Mt=xt?xt.addNestedSub(te):vt.subscribe(te),Tt=Ne())}function Qe(){Mt&&(Mt(),Mt=void 0,Tt.clear(),Tt=He)}var Ke={addNestedSub:Zt,notifyNestedSubs:Kt,handleChangeWrapper:te,isSubscribed:se,trySubscribe:Oe,tryUnsubscribe:Qe,getListeners:function(){return Tt}};return Ke}var nt=typeof window!="undefined"&&typeof window.document!="undefined"&&typeof window.document.createElement!="undefined"?pt.useLayoutEffect:pt.useEffect;function et(vt){var xt=vt.store,Mt=vt.context,Tt=vt.children,Zt=(0,pt.useMemo)(function(){var se=kt(xt);return{store:xt,subscription:se}},[xt]),Kt=(0,pt.useMemo)(function(){return xt.getState()},[xt]);nt(function(){var se=Zt.subscription;return se.onStateChange=se.notifyNestedSubs,se.trySubscribe(),Kt!==xt.getState()&&se.notifyNestedSubs(),function(){se.tryUnsubscribe(),se.onStateChange=null}},[Zt,Kt]);var te=Mt||Ae;return pt.createElement(te.Provider,{value:Zt},Tt)}var ht=et,lt=Ft(87488),gt=Ft(94266),yt=Ft.n(gt),Lt=Ft(53410),Dt=["getDisplayName","methodName","renderCountProp","shouldHandleStateChanges","storeKey","withRef","forwardRef","context"],zt=["reactReduxForwardedRef"],Xt=[],re=[null,null],le=function(xt){try{return JSON.stringify(xt)}catch(Mt){return String(xt)}};function ae(vt,xt){var Mt=vt[1];return[xt.payload,Mt+1]}function je(vt,xt,Mt){nt(function(){return vt.apply(void 0,xt)},Mt)}function ne(vt,xt,Mt,Tt,Zt,Kt,te){vt.current=Tt,xt.current=Zt,Mt.current=!1,Kt.current&&(Kt.current=null,te())}function Le(vt,xt,Mt,Tt,Zt,Kt,te,se,Oe,Qe){if(vt){var Ke=!1,We=null,Ge=function(){if(!Ke){var Ai=xt.getState(),Ti,Wi;try{Ti=Tt(Ai,Zt.current)}catch(qi){Wi=qi,We=qi}Wi||(We=null),Ti===Kt.current?te.current||Oe():(Kt.current=Ti,se.current=Ti,te.current=!0,Qe({type:"STORE_UPDATED",payload:{error:Wi}}))}};Mt.onStateChange=Ge,Mt.trySubscribe(),Ge();var rn=function(){if(Ke=!0,Mt.tryUnsubscribe(),Mt.onStateChange=null,We)throw We};return rn}}var ue=function(){return[null,0]};function Ee(vt,xt){xt===void 0&&(xt={});var Mt=xt,Tt=Mt.getDisplayName,Zt=Tt===void 0?function($r){return"ConnectAdvanced("+$r+")"}:Tt,Kt=Mt.methodName,te=Kt===void 0?"connectAdvanced":Kt,se=Mt.renderCountProp,Oe=se===void 0?void 0:se,Qe=Mt.shouldHandleStateChanges,Ke=Qe===void 0?!0:Qe,We=Mt.storeKey,Ge=We===void 0?"store":We,rn=Mt.withRef,Kn=rn===void 0?!1:rn,Ai=Mt.forwardRef,Ti=Ai===void 0?!1:Ai,Wi=Mt.context,qi=Wi===void 0?Ae:Wi,ur=(0,lt.Z)(Mt,Dt);if(0)var ar;var Tr=qi;return function(So){var La=So.displayName||So.name||"Component",po=Zt(La),xa=(0,Me.Z)({},ur,{getDisplayName:Zt,methodName:te,renderCountProp:Oe,shouldHandleStateChanges:Ke,storeKey:Ge,displayName:po,wrappedComponentName:La,WrappedComponent:So}),gs=ur.pure;function Bs(la){return vt(la.dispatch,xa)}var lu=gs?pt.useMemo:function(la){return la()};function dl(la){var Mu=(0,pt.useMemo)(function(){var ga=la.reactReduxForwardedRef,bl=(0,lt.Z)(la,zt);return[la.context,ga,bl]},[la]),Pa=Mu[0],uu=Mu[1],lc=Mu[2],hu=(0,pt.useMemo)(function(){return Pa&&Pa.Consumer&&(0,Lt.isContextConsumer)(pt.createElement(Pa.Consumer,null))?Pa:Tr},[Pa,Tr]),mr=(0,pt.useContext)(hu),vd=!!la.store&&!!la.store.getState&&!!la.store.dispatch,dg=!!mr&&!!mr.store,du=vd?la.store:mr.store,nh=(0,pt.useMemo)(function(){return Bs(du)},[du]),Rh=(0,pt.useMemo)(function(){if(!Ke)return re;var ga=kt(du,vd?null:mr.subscription),bl=ga.notifyNestedSubs.bind(ga);return[ga,bl]},[du,vd,mr]),tl=Rh[0],pf=Rh[1],mf=(0,pt.useMemo)(function(){return vd?mr:(0,Me.Z)({},mr,{subscription:tl})},[vd,mr,tl]),ep=(0,pt.useReducer)(ae,Xt,ue),Wp=ep[0],cg=Wp[0],uc=ep[1];if(cg&&cg.error)throw cg.error;var np=(0,pt.useRef)(),fg=(0,pt.useRef)(lc),hc=(0,pt.useRef)(),dc=(0,pt.useRef)(!1),gg=lu(function(){return hc.current&&lc===fg.current?hc.current:nh(du.getState(),lc)},[du,cg,lc]);je(ne,[fg,np,dc,lc,gg,hc,pf]),je(Le,[Ke,du,tl,nh,fg,np,dc,hc,pf,uc],[du,tl,nh]);var Hr=(0,pt.useMemo)(function(){return pt.createElement(So,(0,Me.Z)({},gg,{ref:uu}))},[uu,So,gg]),ks=(0,pt.useMemo)(function(){return Ke?pt.createElement(hu.Provider,{value:mf},Hr):Hr},[hu,Hr,mf]);return ks}var $s=gs?pt.memo(dl):dl;if($s.WrappedComponent=So,$s.displayName=dl.displayName=po,Ti){var _a=pt.forwardRef(function(Mu,Pa){return pt.createElement($s,(0,Me.Z)({},Mu,{reactReduxForwardedRef:Pa}))});return _a.displayName=po,_a.WrappedComponent=So,yt()(_a,So)}return yt()($s,So)}}function ge(vt,xt){return vt===xt?vt!==0||xt!==0||1/vt===1/xt:vt!==vt&&xt!==xt}function Ue(vt,xt){if(ge(vt,xt))return!0;if(typeof vt!="object"||vt===null||typeof xt!="object"||xt===null)return!1;var Mt=Object.keys(vt),Tt=Object.keys(xt);if(Mt.length!==Tt.length)return!1;for(var Zt=0;Zt<Mt.length;Zt++)if(!Object.prototype.hasOwnProperty.call(xt,Mt[Zt])||!ge(vt[Mt[Zt]],xt[Mt[Zt]]))return!1;return!0}function nn(vt,xt){var Mt={},Tt=function(te){var se=vt[te];typeof se=="function"&&(Mt[te]=function(){return xt(se.apply(void 0,arguments))})};for(var Zt in vt)Tt(Zt);return Mt}function _e(vt){return function(Mt,Tt){var Zt=vt(Mt,Tt);function Kt(){return Zt}return Kt.dependsOnOwnProps=!1,Kt}}function qt(vt){return vt.dependsOnOwnProps!==null&&vt.dependsOnOwnProps!==void 0?!!vt.dependsOnOwnProps:vt.length!==1}function Jt(vt,xt){return function(Tt,Zt){var Kt=Zt.displayName,te=function(Oe,Qe){return te.dependsOnOwnProps?te.mapToProps(Oe,Qe):te.mapToProps(Oe)};return te.dependsOnOwnProps=!0,te.mapToProps=function(Oe,Qe){te.mapToProps=vt,te.dependsOnOwnProps=qt(vt);var Ke=te(Oe,Qe);return typeof Ke=="function"&&(te.mapToProps=Ke,te.dependsOnOwnProps=qt(Ke),Ke=te(Oe,Qe)),Ke},te}}function De(vt){return typeof vt=="function"?Jt(vt,"mapDispatchToProps"):void 0}function sn(vt){return vt?void 0:_e(function(xt){return{dispatch:xt}})}function cn(vt){return vt&&typeof vt=="object"?_e(function(xt){return nn(vt,xt)}):void 0}var Te=[De,sn,cn];function en(vt){return typeof vt=="function"?Jt(vt,"mapStateToProps"):void 0}function Cn(vt){return vt?void 0:_e(function(){return{}})}var Gn=[en,Cn];function vn(vt,xt,Mt){return(0,Me.Z)({},Mt,vt,xt)}function zn(vt){return function(Mt,Tt){var Zt=Tt.displayName,Kt=Tt.pure,te=Tt.areMergedPropsEqual,se=!1,Oe;return function(Ke,We,Ge){var rn=vt(Ke,We,Ge);return se?(!Kt||!te(rn,Oe))&&(Oe=rn):(se=!0,Oe=rn),Oe}}}function me(vt){return typeof vt=="function"?zn(vt):void 0}function An(vt){return vt?void 0:function(){return vn}}var ui=[me,An],un=["initMapStateToProps","initMapDispatchToProps","initMergeProps"];function ln(vt,xt,Mt,Tt){return function(Kt,te){return Mt(vt(Kt,te),xt(Tt,te),te)}}function oi(vt,xt,Mt,Tt,Zt){var Kt=Zt.areStatesEqual,te=Zt.areOwnPropsEqual,se=Zt.areStatePropsEqual,Oe=!1,Qe,Ke,We,Ge,rn;function Kn(ur,ar){return Qe=ur,Ke=ar,We=vt(Qe,Ke),Ge=xt(Tt,Ke),rn=Mt(We,Ge,Ke),Oe=!0,rn}function Ai(){return We=vt(Qe,Ke),xt.dependsOnOwnProps&&(Ge=xt(Tt,Ke)),rn=Mt(We,Ge,Ke),rn}function Ti(){return vt.dependsOnOwnProps&&(We=vt(Qe,Ke)),xt.dependsOnOwnProps&&(Ge=xt(Tt,Ke)),rn=Mt(We,Ge,Ke),rn}function Wi(){var ur=vt(Qe,Ke),ar=!se(ur,We);return We=ur,ar&&(rn=Mt(We,Ge,Ke)),rn}function qi(ur,ar){var Tr=!te(ar,Ke),$r=!Kt(ur,Qe,ar,Ke);return Qe=ur,Ke=ar,Tr&&$r?Ai():Tr?Ti():$r?Wi():rn}return function(ar,Tr){return Oe?qi(ar,Tr):Kn(ar,Tr)}}function xn(vt,xt){var Mt=xt.initMapStateToProps,Tt=xt.initMapDispatchToProps,Zt=xt.initMergeProps,Kt=(0,lt.Z)(xt,un),te=Mt(vt,Kt),se=Tt(vt,Kt),Oe=Zt(vt,Kt),Qe=Kt.pure?oi:ln;return Qe(te,se,Oe,vt,Kt)}var Ie=["pure","areStatesEqual","areOwnPropsEqual","areStatePropsEqual","areMergedPropsEqual"];function Ze(vt,xt,Mt){for(var Tt=xt.length-1;Tt>=0;Tt--){var Zt=xt[Tt](vt);if(Zt)return Zt}return function(Kt,te){throw new Error("Invalid value of type "+typeof vt+" for "+Mt+" argument when connecting component "+te.wrappedComponentName+".")}}function Hn(vt,xt){return vt===xt}function qe(vt){var xt=vt===void 0?{}:vt,Mt=xt.connectHOC,Tt=Mt===void 0?Ee:Mt,Zt=xt.mapStateToPropsFactories,Kt=Zt===void 0?Gn:Zt,te=xt.mapDispatchToPropsFactories,se=te===void 0?Te:te,Oe=xt.mergePropsFactories,Qe=Oe===void 0?ui:Oe,Ke=xt.selectorFactory,We=Ke===void 0?xn:Ke;return function(rn,Kn,Ai,Ti){Ti===void 0&&(Ti={});var Wi=Ti,qi=Wi.pure,ur=qi===void 0?!0:qi,ar=Wi.areStatesEqual,Tr=ar===void 0?Hn:ar,$r=Wi.areOwnPropsEqual,So=$r===void 0?Ue:$r,La=Wi.areStatePropsEqual,po=La===void 0?Ue:La,xa=Wi.areMergedPropsEqual,gs=xa===void 0?Ue:xa,Bs=(0,lt.Z)(Wi,Ie),lu=Ze(rn,Kt,"mapStateToProps"),dl=Ze(Kn,se,"mapDispatchToProps"),$s=Ze(Ai,Qe,"mergeProps");return Tt(We,(0,Me.Z)({methodName:"connect",getDisplayName:function(la){return"Connect("+la+")"},shouldHandleStateChanges:!!rn,initMapStateToProps:lu,initMapDispatchToProps:dl,initMergeProps:$s,pure:ur,areStatesEqual:Tr,areOwnPropsEqual:So,areStatePropsEqual:po,areMergedPropsEqual:gs},Bs))}}var $e=qe();function Pn(){var vt=useContext(ReactReduxContext);return vt}function Rt(vt){vt===void 0&&(vt=ReactReduxContext);var xt=vt===ReactReduxContext?useDefaultReduxContext:function(){return useContext(vt)};return function(){var Tt=xt(),Zt=Tt.store;return Zt}}var bt=null;function Pt(vt){vt===void 0&&(vt=ReactReduxContext);var xt=vt===ReactReduxContext?useDefaultStore:createStoreHook(vt);return function(){var Tt=xt();return Tt.dispatch}}var It=null,Yt=function(xt,Mt){return xt===Mt};function Nt(vt,xt,Mt,Tt){var Zt=useReducer(function(Kn){return Kn+1},0),Kt=Zt[1],te=useMemo(function(){return createSubscription(Mt,Tt)},[Mt,Tt]),se=useRef(),Oe=useRef(),Qe=useRef(),Ke=useRef(),We=Mt.getState(),Ge;try{if(vt!==Oe.current||We!==Qe.current||se.current){var rn=vt(We);Ke.current===void 0||!xt(rn,Ke.current)?Ge=rn:Ge=Ke.current}else Ge=Ke.current}catch(Kn){throw se.current&&(Kn.message+=`
The error may be correlated with this previous error:
`+se.current.stack+`
`),Kn}return useIsomorphicLayoutEffect(function(){Oe.current=vt,Qe.current=We,Ke.current=Ge,se.current=void 0}),useIsomorphicLayoutEffect(function(){function Kn(){try{var Ai=Mt.getState();if(Ai===Qe.current)return;var Ti=Oe.current(Ai);if(xt(Ti,Ke.current))return;Ke.current=Ti,Qe.current=Ai}catch(Wi){se.current=Wi}Kt()}return te.onStateChange=Kn,te.trySubscribe(),Kn(),function(){return te.tryUnsubscribe()}},[Mt,te]),Ge}function xe(vt){vt===void 0&&(vt=ReactReduxContext);var xt=vt===ReactReduxContext?useDefaultReduxContext:function(){return useContext(vt)};return function(Tt,Zt){Zt===void 0&&(Zt=Yt);var Kt=xt(),te=Kt.store,se=Kt.subscription,Oe=Nt(Tt,Zt,te,se);return useDebugValue(Oe),Oe}}var _n=null,ni=Ft(4676);de(ni.unstable_batchedUpdates);function ei(vt,xt){if(vt.length!==xt.length)return!1;for(var Mt=0;Mt<vt.length;Mt++)if(vt[Mt]!==xt[Mt])return!1;return!0}function ii(vt,xt){var Mt=(0,pt.useState)(function(){return{inputs:xt,result:vt()}})[0],Tt=(0,pt.useRef)(!0),Zt=(0,pt.useRef)(Mt),Kt=Tt.current||!!(xt&&Zt.current.inputs&&ei(xt,Zt.current.inputs)),te=Kt?Zt.current:{inputs:xt,result:vt()};return(0,pt.useEffect)(function(){Tt.current=!1,Zt.current=te},[te]),te.result}function Hi(vt,xt){return ii(function(){return vt},xt)}var hi=ii,Jn=Hi,Vi=!0,er="Invariant failed";function nr(vt,xt){if(!vt){if(Vi)throw new Error(er);var Mt=typeof xt=="function"?xt():xt,Tt=Mt?"".concat(er,": ").concat(Mt):er;throw new Error(Tt)}}var sr=function(xt){var Mt=xt.top,Tt=xt.right,Zt=xt.bottom,Kt=xt.left,te=Tt-Kt,se=Zt-Mt,Oe={top:Mt,right:Tt,bottom:Zt,left:Kt,width:te,height:se,x:Kt,y:Mt,center:{x:(Tt+Kt)/2,y:(Zt+Mt)/2}};return Oe},kr=function(xt,Mt){return{top:xt.top-Mt.top,left:xt.left-Mt.left,bottom:xt.bottom+Mt.bottom,right:xt.right+Mt.right}},or=function(xt,Mt){return{top:xt.top+Mt.top,left:xt.left+Mt.left,bottom:xt.bottom-Mt.bottom,right:xt.right-Mt.right}},_i=function(xt,Mt){return{top:xt.top+Mt.y,left:xt.left+Mt.x,bottom:xt.bottom+Mt.y,right:xt.right+Mt.x}},gr={top:0,right:0,bottom:0,left:0},Mr=function(xt){var Mt=xt.borderBox,Tt=xt.margin,Zt=Tt===void 0?gr:Tt,Kt=xt.border,te=Kt===void 0?gr:Kt,se=xt.padding,Oe=se===void 0?gr:se,Qe=sr(kr(Mt,Zt)),Ke=sr(or(Mt,te)),We=sr(or(Ke,Oe));return{marginBox:Qe,borderBox:sr(Mt),paddingBox:Ke,contentBox:We,margin:Zt,border:te,padding:Oe}},Ei=function(xt){var Mt=xt.slice(0,-2),Tt=xt.slice(-2);if(Tt!=="px")return 0;var Zt=Number(Mt);return isNaN(Zt)&&nr(!1),Zt},Qr=function(){return{x:window.pageXOffset,y:window.pageYOffset}},Rn=function(xt,Mt){var Tt=xt.borderBox,Zt=xt.border,Kt=xt.margin,te=xt.padding,se=_i(Tt,Mt);return Mr({borderBox:se,border:Zt,margin:Kt,padding:te})},Ct=function(xt,Mt){return Mt===void 0&&(Mt=Qr()),Rn(xt,Mt)},zi=function(xt,Mt){var Tt={top:Ei(Mt.marginTop),right:Ei(Mt.marginRight),bottom:Ei(Mt.marginBottom),left:Ei(Mt.marginLeft)},Zt={top:Ei(Mt.paddingTop),right:Ei(Mt.paddingRight),bottom:Ei(Mt.paddingBottom),left:Ei(Mt.paddingLeft)},Kt={top:Ei(Mt.borderTopWidth),right:Ei(Mt.borderRightWidth),bottom:Ei(Mt.borderBottomWidth),left:Ei(Mt.borderLeftWidth)};return Mr({borderBox:xt,margin:Tt,padding:Zt,border:Kt})},Ci=function(xt){var Mt=xt.getBoundingClientRect(),Tt=window.getComputedStyle(xt);return zi(Mt,Tt)},ze=Number.isNaN||function(xt){return typeof xt=="number"&&xt!==xt};function Yn(vt,xt){return!!(vt===xt||ze(vt)&&ze(xt))}function Xn(vt,xt){if(vt.length!==xt.length)return!1;for(var Mt=0;Mt<vt.length;Mt++)if(!Yn(vt[Mt],xt[Mt]))return!1;return!0}function fi(vt,xt){xt===void 0&&(xt=Xn);var Mt,Tt=[],Zt,Kt=!1;function te(){for(var se=[],Oe=0;Oe<arguments.length;Oe++)se[Oe]=arguments[Oe];return Kt&&Mt===this&&xt(se,Tt)||(Zt=vt.apply(this,se),Kt=!0,Mt=this,Tt=se),Zt}return te}var an=fi,Sn=function(xt){var Mt=[],Tt=null,Zt=function(){for(var te=arguments.length,se=new Array(te),Oe=0;Oe<te;Oe++)se[Oe]=arguments[Oe];Mt=se,!Tt&&(Tt=requestAnimationFrame(function(){Tt=null,xt.apply(void 0,Mt)}))};return Zt.cancel=function(){Tt&&(cancelAnimationFrame(Tt),Tt=null)},Zt},be=Sn,Ce=!0,we=/[ \t]{2,}/g,kn=/^[ \t]*/gm,Qn=function(xt){return xt.replace(we," ").replace(kn,"").trim()},ti=function(xt){return Qn(`
%creact-beautiful-dnd
%c`+Qn(xt)+`
%c\u{1F477}\u200D This is a development only message. It will be removed in production builds.
`)},Xe=function(xt){return[ti(xt),"color: #00C584; font-size: 1.2em; font-weight: bold;","line-height: 1.5","color: #723874;"]},Dn="__react-beautiful-dnd-disable-dev-warnings";function vi(vt,xt){var Mt;Ce||typeof window!="undefined"&&window[Dn]||(Mt=console)[vt].apply(Mt,Xe(xt))}var $n=vi.bind(null,"warn"),ki=vi.bind(null,"error");function pe(){}function Tn(vt,xt){return(0,Me.Z)({},vt,{},xt)}function gi(vt,xt,Mt){var Tt=xt.map(function(Zt){var Kt=Tn(Mt,Zt.options);return vt.addEventListener(Zt.eventName,Zt.fn,Kt),function(){vt.removeEventListener(Zt.eventName,Zt.fn,Kt)}});return function(){Tt.forEach(function(Kt){Kt()})}}var Oi=!0,bn="Invariant failed";function Mn(vt){this.message=vt}Mn.prototype.toString=function(){return this.message};function hn(vt,xt){if(!vt)throw Oi?new Mn(bn):new Mn(bn+": "+(xt||""))}var Ji=function(vt){ve(xt,vt);function xt(){for(var Tt,Zt=arguments.length,Kt=new Array(Zt),te=0;te<Zt;te++)Kt[te]=arguments[te];return Tt=vt.call.apply(vt,[this].concat(Kt))||this,Tt.callbacks=null,Tt.unbind=pe,Tt.onWindowError=function(se){var Oe=Tt.getCallbacks();Oe.isDragging()&&Oe.tryAbort();var Qe=se.error;Qe instanceof Mn&&se.preventDefault()},Tt.getCallbacks=function(){if(!Tt.callbacks)throw new Error("Unable to find AppCallbacks in <ErrorBoundary/>");return Tt.callbacks},Tt.setCallbacks=function(se){Tt.callbacks=se},Tt}var Mt=xt.prototype;return Mt.componentDidMount=function(){this.unbind=gi(window,[{eventName:"error",fn:this.onWindowError}])},Mt.componentWillUnmount=function(){this.unbind()},Mt.componentDidCatch=function(Zt){if(Zt instanceof Mn){this.setState({});return}throw Zt},Mt.render=function(){return this.props.children(this.setCallbacks)},xt}(pt.Component),Li=`
Press space bar to start a drag.
When dragging you can use the arrow keys to move the item around and escape to cancel.
Some screen readers may require you to be in focus mode or to use your pass through key
`,Si=function(xt){return xt+1},wi=function(xt){return`
You have lifted an item in position `+Si(xt.source.index)+`
`},Mi=function(xt,Mt){var Tt=xt.droppableId===Mt.droppableId,Zt=Si(xt.index),Kt=Si(Mt.index);return Tt?`
You have moved the item from position `+Zt+`
to position `+Kt+`
`:`
You have moved the item from position `+Zt+`
in list `+xt.droppableId+`
to list `+Mt.droppableId+`
in position `+Kt+`
`},Er=function(xt,Mt,Tt){var Zt=Mt.droppableId===Tt.droppableId;return Zt?`
The item `+xt+`
has been combined with `+Tt.draggableId:`
The item `+xt+`
in list `+Mt.droppableId+`
has been combined with `+Tt.draggableId+`
in list `+Tt.droppableId+`
`},ir=function(xt){var Mt=xt.destination;if(Mt)return Mi(xt.source,Mt);var Tt=xt.combine;return Tt?Er(xt.draggableId,xt.source,Tt):"You are over an area that cannot be dropped on"},tr=function(xt){return`
The item has returned to its starting position
of `+Si(xt.index)+`
`},gn=function(xt){if(xt.reason==="CANCEL")return`
Movement cancelled.
`+tr(xt.source)+`
`;var Mt=xt.destination,Tt=xt.combine;return Mt?`
You have dropped the item.
`+Mi(xt.source,Mt)+`
`:Tt?`
You have dropped the item.
`+Er(xt.draggableId,xt.source,Tt)+`
`:`
The item has been dropped while not over a drop area.
`+tr(xt.source)+`
`},to={dragHandleUsageInstructions:Li,onDragStart:wi,onDragUpdate:ir,onDragEnd:gn},Qi={x:0,y:0},Or=function(xt,Mt){return{x:xt.x+Mt.x,y:xt.y+Mt.y}},Je=function(xt,Mt){return{x:xt.x-Mt.x,y:xt.y-Mt.y}},Un=function(xt,Mt){return xt.x===Mt.x&&xt.y===Mt.y},Pi=function(xt){return{x:xt.x!==0?-xt.x:0,y:xt.y!==0?-xt.y:0}},Ni=function(xt,Mt,Tt){var Zt;return Tt===void 0&&(Tt=0),Zt={},Zt[xt]=Mt,Zt[xt==="x"?"y":"x"]=Tt,Zt},di=function(xt,Mt){return Math.sqrt(Math.pow(Mt.x-xt.x,2)+Math.pow(Mt.y-xt.y,2))},Ii=function(xt,Mt){return Math.min.apply(Math,Mt.map(function(Tt){return di(xt,Tt)}))},vr=function(xt){return function(Mt){return{x:xt(Mt.x),y:xt(Mt.y)}}},yr=function(vt,xt){var Mt=sr({top:Math.max(xt.top,vt.top),right:Math.min(xt.right,vt.right),bottom:Math.min(xt.bottom,vt.bottom),left:Math.max(xt.left,vt.left)});return Mt.width<=0||Mt.height<=0?null:Mt},pr=function(xt,Mt){return{top:xt.top+Mt.y,left:xt.left+Mt.x,bottom:xt.bottom+Mt.y,right:xt.right+Mt.x}},wr=function(xt){return[{x:xt.left,y:xt.top},{x:xt.right,y:xt.top},{x:xt.left,y:xt.bottom},{x:xt.right,y:xt.bottom}]},yn={top:0,right:0,bottom:0,left:0},Ir=function(xt,Mt){return Mt?pr(xt,Mt.scroll.diff.displacement):xt},mn=function(xt,Mt,Tt){if(Tt&&Tt.increasedBy){var Zt;return(0,Me.Z)({},xt,(Zt={},Zt[Mt.end]=xt[Mt.end]+Tt.increasedBy[Mt.line],Zt))}return xt},Zr=function(xt,Mt){return Mt&&Mt.shouldClipSubject?yr(Mt.pageMarginBox,xt):sr(xt)},Gr=function(vt){var xt=vt.page,Mt=vt.withPlaceholder,Tt=vt.axis,Zt=vt.frame,Kt=Ir(xt.marginBox,Zt),te=mn(Kt,Tt,Mt),se=Zr(te,Zt);return{page:xt,withPlaceholder:Mt,active:se}},Cr=function(vt,xt){vt.frame||hn(!1);var Mt=vt.frame,Tt=Je(xt,Mt.scroll.initial),Zt=Pi(Tt),Kt=(0,Me.Z)({},Mt,{scroll:{initial:Mt.scroll.initial,current:xt,diff:{value:Tt,displacement:Zt},max:Mt.scroll.max}}),te=Gr({page:vt.subject.page,withPlaceholder:vt.subject.withPlaceholder,axis:vt.axis,frame:Kt}),se=(0,Me.Z)({},vt,{frame:Kt,subject:te});return se};function eo(vt){return Number.isInteger?Number.isInteger(vt):typeof vt=="number"&&isFinite(vt)&&Math.floor(vt)===vt}function Fr(vt){return Object.values?Object.values(vt):Object.keys(vt).map(function(xt){return vt[xt]})}function dr(vt,xt){if(vt.findIndex)return vt.findIndex(xt);for(var Mt=0;Mt<vt.length;Mt++)if(xt(vt[Mt]))return Mt;return-1}function Nr(vt,xt){if(vt.find)return vt.find(xt);var Mt=dr(vt,xt);if(Mt!==-1)return vt[Mt]}function Wr(vt){return Array.prototype.slice.call(vt)}var Dr=an(function(vt){return vt.reduce(function(xt,Mt){return xt[Mt.descriptor.id]=Mt,xt},{})}),yi=an(function(vt){return vt.reduce(function(xt,Mt){return xt[Mt.descriptor.id]=Mt,xt},{})}),Gt=an(function(vt){return Fr(vt)}),Fo=an(function(vt){return Fr(vt)}),vo=an(function(vt,xt){var Mt=Fo(xt).filter(function(Tt){return vt===Tt.descriptor.droppableId}).sort(function(Tt,Zt){return Tt.descriptor.index-Zt.descriptor.index});return Mt});function Oo(vt){return vt.at&&vt.at.type==="REORDER"?vt.at.destination:null}function ua(vt){return vt.at&&vt.at.type==="COMBINE"?vt.at.combine:null}var uo=an(function(vt,xt){return xt.filter(function(Mt){return Mt.descriptor.id!==vt.descriptor.id})}),Qo=function(vt){var xt=vt.isMovingForward,Mt=vt.draggable,Tt=vt.destination,Zt=vt.insideDestination,Kt=vt.previousImpact;if(!Tt.isCombineEnabled)return null;var te=Oo(Kt);if(!te)return null;function se(Ai){var Ti={type:"COMBINE",combine:{draggableId:Ai,droppableId:Tt.descriptor.id}};return(0,Me.Z)({},Kt,{at:Ti})}var Oe=Kt.displaced.all,Qe=Oe.length?Oe[0]:null;if(xt)return Qe?se(Qe):null;var Ke=uo(Mt,Zt);if(!Qe){if(!Ke.length)return null;var We=Ke[Ke.length-1];return se(We.descriptor.id)}var Ge=dr(Ke,function(Ai){return Ai.descriptor.id===Qe});Ge===-1&&hn(!1);var rn=Ge-1;if(rn<0)return null;var Kn=Ke[rn];return se(Kn.descriptor.id)},$t=function(vt,xt){return vt.descriptor.droppableId===xt.descriptor.id},Wn={point:Qi,value:0},In={invisible:{},visible:{},all:[]},si={displaced:In,displacedBy:Wn,at:null},Ln=function(vt,xt){return function(Mt){return vt<=Mt&&Mt<=xt}},Zn=function(vt){var xt=Ln(vt.top,vt.bottom),Mt=Ln(vt.left,vt.right);return function(Tt){var Zt=xt(Tt.top)&&xt(Tt.bottom)&&Mt(Tt.left)&&Mt(Tt.right);if(Zt)return!0;var Kt=xt(Tt.top)||xt(Tt.bottom),te=Mt(Tt.left)||Mt(Tt.right),se=Kt&&te;if(se)return!0;var Oe=Tt.top<vt.top&&Tt.bottom>vt.bottom,Qe=Tt.left<vt.left&&Tt.right>vt.right,Ke=Oe&&Qe;if(Ke)return!0;var We=Oe&&te||Qe&&Kt;return We}},jn=function(vt){var xt=Ln(vt.top,vt.bottom),Mt=Ln(vt.left,vt.right);return function(Tt){var Zt=xt(Tt.top)&&xt(Tt.bottom)&&Mt(Tt.left)&&Mt(Tt.right);return Zt}},Re={direction:"vertical",line:"y",crossAxisLine:"x",start:"top",end:"bottom",size:"height",crossAxisStart:"left",crossAxisEnd:"right",crossAxisSize:"width"},Nn={direction:"horizontal",line:"x",crossAxisLine:"y",start:"left",end:"right",size:"width",crossAxisStart:"top",crossAxisEnd:"bottom",crossAxisSize:"height"},bi=function(vt){return function(xt){var Mt=Ln(xt.top,xt.bottom),Tt=Ln(xt.left,xt.right);return function(Zt){return vt===Re?Mt(Zt.top)&&Mt(Zt.bottom):Tt(Zt.left)&&Tt(Zt.right)}}},cr=function(xt,Mt){var Tt=Mt.frame?Mt.frame.scroll.diff.displacement:Qi;return pr(xt,Tt)},Yi=function(xt,Mt,Tt){return Mt.subject.active?Tt(Mt.subject.active)(xt):!1},Bi=function(xt,Mt,Tt){return Tt(Mt)(xt)},Sr=function(xt){var Mt=xt.target,Tt=xt.destination,Zt=xt.viewport,Kt=xt.withDroppableDisplacement,te=xt.isVisibleThroughFrameFn,se=Kt?cr(Mt,Tt):Mt;return Yi(se,Tt,te)&&Bi(se,Zt,te)},br=function(xt){return Sr((0,Me.Z)({},xt,{isVisibleThroughFrameFn:Zn}))},ho=function(xt){return Sr((0,Me.Z)({},xt,{isVisibleThroughFrameFn:jn}))},Co=function(xt){return Sr((0,Me.Z)({},xt,{isVisibleThroughFrameFn:bi(xt.destination.axis)}))},wa=function(xt,Mt,Tt){if(typeof Tt=="boolean")return Tt;if(!Mt)return!0;var Zt=Mt.invisible,Kt=Mt.visible;if(Zt[xt])return!1;var te=Kt[xt];return te?te.shouldAnimate:!0};function Ye(vt,xt){var Mt=vt.page.marginBox,Tt={top:xt.point.y,right:0,bottom:0,left:xt.point.x};return sr(kr(Mt,Tt))}function Go(vt){var xt=vt.afterDragging,Mt=vt.destination,Tt=vt.displacedBy,Zt=vt.viewport,Kt=vt.forceShouldAnimate,te=vt.last;return xt.reduce(function(Oe,Qe){var Ke=Ye(Qe,Tt),We=Qe.descriptor.id;Oe.all.push(We);var Ge=br({target:Ke,destination:Mt,viewport:Zt,withDroppableDisplacement:!0});if(!Ge)return Oe.invisible[Qe.descriptor.id]=!0,Oe;var rn=wa(We,te,Kt),Kn={draggableId:We,shouldAnimate:rn};return Oe.visible[We]=Kn,Oe},{all:[],visible:{},invisible:{}})}function Nl(vt,xt){if(!vt.length)return 0;var Mt=vt[vt.length-1].descriptor.index;return xt.inHomeList?Mt:Mt+1}function Ss(vt){var xt=vt.insideDestination,Mt=vt.inHomeList,Tt=vt.displacedBy,Zt=vt.destination,Kt=Nl(xt,{inHomeList:Mt});return{displaced:In,displacedBy:Tt,at:{type:"REORDER",destination:{droppableId:Zt.descriptor.id,index:Kt}}}}function rl(vt){var xt=vt.draggable,Mt=vt.insideDestination,Tt=vt.destination,Zt=vt.viewport,Kt=vt.displacedBy,te=vt.last,se=vt.index,Oe=vt.forceShouldAnimate,Qe=$t(xt,Tt);if(se==null)return Ss({insideDestination:Mt,inHomeList:Qe,displacedBy:Kt,destination:Tt});var Ke=Nr(Mt,function(Ai){return Ai.descriptor.index===se});if(!Ke)return Ss({insideDestination:Mt,inHomeList:Qe,displacedBy:Kt,destination:Tt});var We=uo(xt,Mt),Ge=Mt.indexOf(Ke),rn=We.slice(Ge),Kn=Go({afterDragging:rn,destination:Tt,displacedBy:Kt,last:te,viewport:Zt.frame,forceShouldAnimate:Oe});return{displaced:Kn,displacedBy:Kt,at:{type:"REORDER",destination:{droppableId:Tt.descriptor.id,index:se}}}}function yo(vt,xt){return!!xt.effected[vt]}var Tu=function(vt){var xt=vt.isMovingForward,Mt=vt.destination,Tt=vt.draggables,Zt=vt.combine,Kt=vt.afterCritical;if(!Mt.isCombineEnabled)return null;var te=Zt.draggableId,se=Tt[te],Oe=se.descriptor.index,Qe=yo(te,Kt);return Qe?xt?Oe:Oe-1:xt?Oe+1:Oe},ao=function(vt){var xt=vt.isMovingForward,Mt=vt.isInHomeList,Tt=vt.insideDestination,Zt=vt.location;if(!Tt.length)return null;var Kt=Zt.index,te=xt?Kt+1:Kt-1,se=Tt[0].descriptor.index,Oe=Tt[Tt.length-1].descriptor.index,Qe=Mt?Oe:Oe+1;return te<se||te>Qe?null:te},Ar=function(vt){var xt=vt.isMovingForward,Mt=vt.isInHomeList,Tt=vt.draggable,Zt=vt.draggables,Kt=vt.destination,te=vt.insideDestination,se=vt.previousImpact,Oe=vt.viewport,Qe=vt.afterCritical,Ke=se.at;if(Ke||hn(!1),Ke.type==="REORDER"){var We=ao({isMovingForward:xt,isInHomeList:Mt,location:Ke.destination,insideDestination:te});return We==null?null:rl({draggable:Tt,insideDestination:te,destination:Kt,viewport:Oe,last:se.displaced,displacedBy:se.displacedBy,index:We})}var Ge=Tu({isMovingForward:xt,destination:Kt,displaced:se.displaced,draggables:Zt,combine:Ke.combine,afterCritical:Qe});return Ge==null?null:rl({draggable:Tt,insideDestination:te,destination:Kt,viewport:Oe,last:se.displaced,displacedBy:se.displacedBy,index:Ge})},Vr=function(vt){var xt=vt.displaced,Mt=vt.afterCritical,Tt=vt.combineWith,Zt=vt.displacedBy,Kt=!!(xt.visible[Tt]||xt.invisible[Tt]);return yo(Tt,Mt)?Kt?Qi:Pi(Zt.point):Kt?Zt.point:Qi},Ro=function(vt){var xt=vt.afterCritical,Mt=vt.impact,Tt=vt.draggables,Zt=ua(Mt);Zt||hn(!1);var Kt=Zt.draggableId,te=Tt[Kt].page.borderBox.center,se=Vr({displaced:Mt.displaced,afterCritical:xt,combineWith:Kt,displacedBy:Mt.displacedBy});return Or(te,se)},Ho=function(xt,Mt){return Mt.margin[xt.start]+Mt.borderBox[xt.size]/2},va=function(xt,Mt){return Mt.margin[xt.end]+Mt.borderBox[xt.size]/2},Po=function(xt,Mt,Tt){return Mt[xt.crossAxisStart]+Tt.margin[xt.crossAxisStart]+Tt.borderBox[xt.crossAxisSize]/2},Di=function(xt){var Mt=xt.axis,Tt=xt.moveRelativeTo,Zt=xt.isMoving;return Ni(Mt.line,Tt.marginBox[Mt.end]+Ho(Mt,Zt),Po(Mt,Tt.marginBox,Zt))},Va=function(xt){var Mt=xt.axis,Tt=xt.moveRelativeTo,Zt=xt.isMoving;return Ni(Mt.line,Tt.marginBox[Mt.start]-va(Mt,Zt),Po(Mt,Tt.marginBox,Zt))},yl=function(xt){var Mt=xt.axis,Tt=xt.moveInto,Zt=xt.isMoving;return Ni(Mt.line,Tt.contentBox[Mt.start]+Ho(Mt,Zt),Po(Mt,Tt.contentBox,Zt))},xs=function(vt){var xt=vt.impact,Mt=vt.draggable,Tt=vt.draggables,Zt=vt.droppable,Kt=vt.afterCritical,te=vo(Zt.descriptor.id,Tt),se=Mt.page,Oe=Zt.axis;if(!te.length)return yl({axis:Oe,moveInto:Zt.page,isMoving:se});var Qe=xt.displaced,Ke=xt.displacedBy,We=Qe.all[0];if(We){var Ge=Tt[We];if(yo(We,Kt))return Va({axis:Oe,moveRelativeTo:Ge.page,isMoving:se});var rn=Rn(Ge.page,Ke.point);return Va({axis:Oe,moveRelativeTo:rn,isMoving:se})}var Kn=te[te.length-1];if(Kn.descriptor.id===Mt.descriptor.id)return se.borderBox.center;if(yo(Kn.descriptor.id,Kt)){var Ai=Rn(Kn.page,Pi(Kt.displacedBy.point));return Di({axis:Oe,moveRelativeTo:Ai,isMoving:se})}return Di({axis:Oe,moveRelativeTo:Kn.page,isMoving:se})},Dl=function(vt,xt){var Mt=vt.frame;return Mt?Or(xt,Mt.scroll.diff.displacement):xt},Tl=function(xt){var Mt=xt.impact,Tt=xt.draggable,Zt=xt.droppable,Kt=xt.draggables,te=xt.afterCritical,se=Tt.page.borderBox.center,Oe=Mt.at;return!Zt||!Oe?se:Oe.type==="REORDER"?xs({impact:Mt,draggable:Tt,draggables:Kt,droppable:Zt,afterCritical:te}):Ro({impact:Mt,draggables:Kt,afterCritical:te})},pi=function(vt){var xt=Tl(vt),Mt=vt.droppable,Tt=Mt?Dl(Mt,xt):xt;return Tt},No=function(vt,xt){var Mt=Je(xt,vt.scroll.initial),Tt=Pi(Mt),Zt=sr({top:xt.y,bottom:xt.y+vt.frame.height,left:xt.x,right:xt.x+vt.frame.width}),Kt={frame:Zt,scroll:{initial:vt.scroll.initial,max:vt.scroll.max,current:xt,diff:{value:Mt,displacement:Tt}}};return Kt};function wo(vt,xt){return vt.map(function(Mt){return xt[Mt]})}function Ta(vt,xt){for(var Mt=0;Mt<xt.length;Mt++){var Tt=xt[Mt].visible[vt];if(Tt)return Tt}return null}var Xh=function(vt){var xt=vt.impact,Mt=vt.viewport,Tt=vt.destination,Zt=vt.draggables,Kt=vt.maxScrollChange,te=No(Mt,Or(Mt.scroll.current,Kt)),se=Tt.frame?Cr(Tt,Or(Tt.frame.scroll.current,Kt)):Tt,Oe=xt.displaced,Qe=Go({afterDragging:wo(Oe.all,Zt),destination:Tt,displacedBy:xt.displacedBy,viewport:te.frame,last:Oe,forceShouldAnimate:!1}),Ke=Go({afterDragging:wo(Oe.all,Zt),destination:se,displacedBy:xt.displacedBy,viewport:Mt.frame,last:Oe,forceShouldAnimate:!1}),We={},Ge={},rn=[Oe,Qe,Ke];Oe.all.forEach(function(Ai){var Ti=Ta(Ai,rn);if(Ti){Ge[Ai]=Ti;return}We[Ai]=!0});var Kn=(0,Me.Z)({},xt,{displaced:{all:Oe.all,invisible:We,visible:Ge}});return Kn},_h=function(vt,xt){return Or(vt.scroll.diff.displacement,xt)},Br=function(vt){var xt=vt.pageBorderBoxCenter,Mt=vt.draggable,Tt=vt.viewport,Zt=_h(Tt,xt),Kt=Je(Zt,Mt.page.borderBox.center);return Or(Mt.client.borderBox.center,Kt)},Jh=function(vt){var xt=vt.draggable,Mt=vt.destination,Tt=vt.newPageBorderBoxCenter,Zt=vt.viewport,Kt=vt.withDroppableDisplacement,te=vt.onlyOnMainAxis,se=te===void 0?!1:te,Oe=Je(Tt,xt.page.borderBox.center),Qe=pr(xt.page.borderBox,Oe),Ke={target:Qe,destination:Mt,withDroppableDisplacement:Kt,viewport:Zt};return se?Co(Ke):ho(Ke)},Ql=function(vt){var xt=vt.isMovingForward,Mt=vt.draggable,Tt=vt.destination,Zt=vt.draggables,Kt=vt.previousImpact,te=vt.viewport,se=vt.previousPageBorderBoxCenter,Oe=vt.previousClientSelection,Qe=vt.afterCritical;if(!Tt.isEnabled)return null;var Ke=vo(Tt.descriptor.id,Zt),We=$t(Mt,Tt),Ge=Qo({isMovingForward:xt,draggable:Mt,destination:Tt,insideDestination:Ke,previousImpact:Kt})||Ar({isMovingForward:xt,isInHomeList:We,draggable:Mt,draggables:Zt,destination:Tt,insideDestination:Ke,previousImpact:Kt,viewport:te,afterCritical:Qe});if(!Ge)return null;var rn=pi({impact:Ge,draggable:Mt,droppable:Tt,draggables:Zt,afterCritical:Qe}),Kn=Jh({draggable:Mt,destination:Tt,newPageBorderBoxCenter:rn,viewport:te.frame,withDroppableDisplacement:!1,onlyOnMainAxis:!0});if(Kn){var Ai=Br({pageBorderBoxCenter:rn,draggable:Mt,viewport:te});return{clientSelection:Ai,impact:Ge,scrollJumpRequest:null}}var Ti=Je(rn,se),Wi=Xh({impact:Ge,viewport:te,destination:Tt,draggables:Zt,maxScrollChange:Ti});return{clientSelection:Oe,impact:Wi,scrollJumpRequest:Ti}},Ko=function(xt){var Mt=xt.subject.active;return Mt||hn(!1),Mt},Rs=function(vt){var xt=vt.isMovingForward,Mt=vt.pageBorderBoxCenter,Tt=vt.source,Zt=vt.droppables,Kt=vt.viewport,te=Tt.subject.active;if(!te)return null;var se=Tt.axis,Oe=Ln(te[se.start],te[se.end]),Qe=Gt(Zt).filter(function(We){return We!==Tt}).filter(function(We){return We.isEnabled}).filter(function(We){return!!We.subject.active}).filter(function(We){return Zn(Kt.frame)(Ko(We))}).filter(function(We){var Ge=Ko(We);return xt?te[se.crossAxisEnd]<Ge[se.crossAxisEnd]:Ge[se.crossAxisStart]<te[se.crossAxisStart]}).filter(function(We){var Ge=Ko(We),rn=Ln(Ge[se.start],Ge[se.end]);return Oe(Ge[se.start])||Oe(Ge[se.end])||rn(te[se.start])||rn(te[se.end])}).sort(function(We,Ge){var rn=Ko(We)[se.crossAxisStart],Kn=Ko(Ge)[se.crossAxisStart];return xt?rn-Kn:Kn-rn}).filter(function(We,Ge,rn){return Ko(We)[se.crossAxisStart]===Ko(rn[0])[se.crossAxisStart]});if(!Qe.length)return null;if(Qe.length===1)return Qe[0];var Ke=Qe.filter(function(We){var Ge=Ln(Ko(We)[se.start],Ko(We)[se.end]);return Ge(Mt[se.line])});return Ke.length===1?Ke[0]:Ke.length>1?Ke.sort(function(We,Ge){return Ko(We)[se.start]-Ko(Ge)[se.start]})[0]:Qe.sort(function(We,Ge){var rn=Ii(Mt,wr(Ko(We))),Kn=Ii(Mt,wr(Ko(Ge)));return rn!==Kn?rn-Kn:Ko(We)[se.start]-Ko(Ge)[se.start]})[0]},Pu=function(xt,Mt){var Tt=xt.page.borderBox.center;return yo(xt.descriptor.id,Mt)?Je(Tt,Mt.displacedBy.point):Tt},gh=function(xt,Mt){var Tt=xt.page.borderBox;return yo(xt.descriptor.id,Mt)?pr(Tt,Pi(Mt.displacedBy.point)):Tt},js=function(vt){var xt=vt.pageBorderBoxCenter,Mt=vt.viewport,Tt=vt.destination,Zt=vt.insideDestination,Kt=vt.afterCritical,te=Zt.filter(function(se){return ho({target:gh(se,Kt),destination:Tt,viewport:Mt.frame,withDroppableDisplacement:!0})}).sort(function(se,Oe){var Qe=di(xt,Dl(Tt,Pu(se,Kt))),Ke=di(xt,Dl(Tt,Pu(Oe,Kt)));return Qe<Ke?-1:Ke<Qe?1:se.descriptor.index-Oe.descriptor.index});return te[0]||null},Ps=an(function(xt,Mt){var Tt=Mt[xt.line];return{value:Tt,point:Ni(xt.line,Tt)}}),jd=function(xt,Mt,Tt){var Zt=xt.axis;if(xt.descriptor.mode==="virtual")return Ni(Zt.line,Mt[Zt.line]);var Kt=xt.subject.page.contentBox[Zt.size],te=vo(xt.descriptor.id,Tt),se=te.reduce(function(Ke,We){return Ke+We.client.marginBox[Zt.size]},0),Oe=se+Mt[Zt.line],Qe=Oe-Kt;return Qe<=0?null:Ni(Zt.line,Qe)},Dc=function(xt,Mt){return(0,Me.Z)({},xt,{scroll:(0,Me.Z)({},xt.scroll,{max:Mt})})},zd=function(xt,Mt,Tt){var Zt=xt.frame;$t(Mt,xt)&&hn(!1),xt.subject.withPlaceholder&&hn(!1);var Kt=Ps(xt.axis,Mt.displaceBy).point,te=jd(xt,Kt,Tt),se={placeholderSize:Kt,increasedBy:te,oldFrameMaxScroll:xt.frame?xt.frame.scroll.max:null};if(!Zt){var Oe=Gr({page:xt.subject.page,withPlaceholder:se,axis:xt.axis,frame:xt.frame});return(0,Me.Z)({},xt,{subject:Oe})}var Qe=te?Or(Zt.scroll.max,te):Zt.scroll.max,Ke=Dc(Zt,Qe),We=Gr({page:xt.subject.page,withPlaceholder:se,axis:xt.axis,frame:Ke});return(0,Me.Z)({},xt,{subject:We,frame:Ke})},Nf=function(xt){var Mt=xt.subject.withPlaceholder;Mt||hn(!1);var Tt=xt.frame;if(!Tt){var Zt=Gr({page:xt.subject.page,axis:xt.axis,frame:null,withPlaceholder:null});return(0,Me.Z)({},xt,{subject:Zt})}var Kt=Mt.oldFrameMaxScroll;Kt||hn(!1);var te=Dc(Tt,Kt),se=Gr({page:xt.subject.page,axis:xt.axis,frame:te,withPlaceholder:null});return(0,Me.Z)({},xt,{subject:se,frame:te})},Tc=function(vt){var xt=vt.previousPageBorderBoxCenter,Mt=vt.moveRelativeTo,Tt=vt.insideDestination,Zt=vt.draggable,Kt=vt.draggables,te=vt.destination,se=vt.viewport,Oe=vt.afterCritical;if(!Mt){if(Tt.length)return null;var Qe={displaced:In,displacedBy:Wn,at:{type:"REORDER",destination:{droppableId:te.descriptor.id,index:0}}},Ke=pi({impact:Qe,draggable:Zt,droppable:te,draggables:Kt,afterCritical:Oe}),We=$t(Zt,te)?te:zd(te,Zt,Kt),Ge=Jh({draggable:Zt,destination:We,newPageBorderBoxCenter:Ke,viewport:se.frame,withDroppableDisplacement:!1,onlyOnMainAxis:!0});return Ge?Qe:null}var rn=xt[te.axis.line]<=Mt.page.borderBox.center[te.axis.line],Kn=function(){var Ti=Mt.descriptor.index;return Mt.descriptor.id===Zt.descriptor.id||rn?Ti:Ti+1}(),Ai=Ps(te.axis,Zt.displaceBy);return rl({draggable:Zt,insideDestination:Tt,destination:te,viewport:se,displacedBy:Ai,last:In,index:Kn})},Gd=function(vt){var xt=vt.isMovingForward,Mt=vt.previousPageBorderBoxCenter,Tt=vt.draggable,Zt=vt.isOver,Kt=vt.draggables,te=vt.droppables,se=vt.viewport,Oe=vt.afterCritical,Qe=Rs({isMovingForward:xt,pageBorderBoxCenter:Mt,source:Zt,droppables:te,viewport:se});if(!Qe)return null;var Ke=vo(Qe.descriptor.id,Kt),We=js({pageBorderBoxCenter:Mt,viewport:se,destination:Qe,insideDestination:Ke,afterCritical:Oe}),Ge=Tc({previousPageBorderBoxCenter:Mt,destination:Qe,draggable:Tt,draggables:Kt,moveRelativeTo:We,insideDestination:Ke,viewport:se,afterCritical:Oe});if(!Ge)return null;var rn=pi({impact:Ge,draggable:Tt,droppable:Qe,draggables:Kt,afterCritical:Oe}),Kn=Br({pageBorderBoxCenter:rn,draggable:Tt,viewport:se});return{clientSelection:Kn,impact:Ge,scrollJumpRequest:null}},Ia=function(vt){var xt=vt.at;return xt?xt.type==="REORDER"?xt.destination.droppableId:xt.combine.droppableId:null},Sl=function(xt,Mt){var Tt=Ia(xt);return Tt?Mt[Tt]:null},Ic=function(vt){var xt=vt.state,Mt=vt.type,Tt=Sl(xt.impact,xt.dimensions.droppables),Zt=!!Tt,Kt=xt.dimensions.droppables[xt.critical.droppable.id],te=Tt||Kt,se=te.axis.direction,Oe=se==="vertical"&&(Mt==="MOVE_UP"||Mt==="MOVE_DOWN")||se==="horizontal"&&(Mt==="MOVE_LEFT"||Mt==="MOVE_RIGHT");if(Oe&&!Zt)return null;var Qe=Mt==="MOVE_DOWN"||Mt==="MOVE_RIGHT",Ke=xt.dimensions.draggables[xt.critical.draggable.id],We=xt.current.page.borderBoxCenter,Ge=xt.dimensions,rn=Ge.draggables,Kn=Ge.droppables;return Oe?Ql({isMovingForward:Qe,previousPageBorderBoxCenter:We,draggable:Ke,destination:te,draggables:rn,viewport:xt.viewport,previousClientSelection:xt.current.client.selection,previousImpact:xt.impact,afterCritical:xt.afterCritical}):Gd({isMovingForward:Qe,previousPageBorderBoxCenter:We,draggable:Ke,isOver:te,draggables:rn,droppables:Kn,viewport:xt.viewport,afterCritical:xt.afterCritical})};function ql(vt){return vt.phase==="DRAGGING"||vt.phase==="COLLECTING"}function Oc(vt){var xt=Ln(vt.top,vt.bottom),Mt=Ln(vt.left,vt.right);return function(Zt){return xt(Zt.y)&&Mt(Zt.x)}}function ha(vt,xt){return vt.left<xt.right&&vt.right>xt.left&&vt.top<xt.bottom&&vt.bottom>xt.top}function Tg(vt){var xt=vt.pageBorderBox,Mt=vt.draggable,Tt=vt.candidates,Zt=Mt.page.borderBox.center,Kt=Tt.map(function(te){var se=te.axis,Oe=Ni(te.axis.line,xt.center[se.line],te.page.borderBox.center[se.crossAxisLine]);return{id:te.descriptor.id,distance:di(Zt,Oe)}}).sort(function(te,se){return se.distance-te.distance});return Kt[0]?Kt[0].id:null}function Df(vt){var xt=vt.pageBorderBox,Mt=vt.draggable,Tt=vt.droppables,Zt=Gt(Tt).filter(function(Kt){if(!Kt.isEnabled)return!1;var te=Kt.subject.active;if(!te||!ha(xt,te))return!1;if(Oc(te)(xt.center))return!0;var se=Kt.axis,Oe=te.center[se.crossAxisLine],Qe=xt[se.crossAxisStart],Ke=xt[se.crossAxisEnd],We=Ln(te[se.crossAxisStart],te[se.crossAxisEnd]),Ge=We(Qe),rn=We(Ke);return!Ge&&!rn?!0:Ge?Qe<Oe:Ke>Oe});return Zt.length?Zt.length===1?Zt[0].descriptor.id:Tg({pageBorderBox:xt,draggable:Mt,candidates:Zt}):null}var Qh=function(xt,Mt){return sr(pr(xt,Mt))},qh=function(vt,xt){var Mt=vt.frame;return Mt?Qh(xt,Mt.scroll.diff.value):xt};function $a(vt){var xt=vt.displaced,Mt=vt.id;return!!(xt.visible[Mt]||xt.invisible[Mt])}function us(vt){var xt=vt.draggable,Mt=vt.closest,Tt=vt.inHomeList;return Mt?Tt&&Mt.descriptor.index>xt.descriptor.index?Mt.descriptor.index-1:Mt.descriptor.index:null}var Aa=function(vt){var xt=vt.pageBorderBoxWithDroppableScroll,Mt=vt.draggable,Tt=vt.destination,Zt=vt.insideDestination,Kt=vt.last,te=vt.viewport,se=vt.afterCritical,Oe=Tt.axis,Qe=Ps(Tt.axis,Mt.displaceBy),Ke=Qe.value,We=xt[Oe.start],Ge=xt[Oe.end],rn=uo(Mt,Zt),Kn=Nr(rn,function(Ti){var Wi=Ti.descriptor.id,qi=Ti.page.borderBox.center[Oe.line],ur=yo(Wi,se),ar=$a({displaced:Kt,id:Wi});return ur?ar?Ge<=qi:We<qi-Ke:ar?Ge<=qi+Ke:We<qi}),Ai=us({draggable:Mt,closest:Kn,inHomeList:$t(Mt,Tt)});return rl({draggable:Mt,insideDestination:Zt,destination:Tt,viewport:te,last:Kt,displacedBy:Qe,index:Ai})},Ua=4,Rc=function(vt){var xt=vt.draggable,Mt=vt.pageBorderBoxWithDroppableScroll,Tt=vt.previousImpact,Zt=vt.destination,Kt=vt.insideDestination,te=vt.afterCritical;if(!Zt.isCombineEnabled)return null;var se=Zt.axis,Oe=Ps(Zt.axis,xt.displaceBy),Qe=Oe.value,Ke=Mt[se.start],We=Mt[se.end],Ge=uo(xt,Kt),rn=Nr(Ge,function(Ai){var Ti=Ai.descriptor.id,Wi=Ai.page.borderBox,qi=Wi[se.size],ur=qi/Ua,ar=yo(Ti,te),Tr=$a({displaced:Tt.displaced,id:Ti});return ar?Tr?We>Wi[se.start]+ur&&We<Wi[se.end]-ur:Ke>Wi[se.start]-Qe+ur&&Ke<Wi[se.end]-Qe-ur:Tr?We>Wi[se.start]+Qe+ur&&We<Wi[se.end]+Qe-ur:Ke>Wi[se.start]+ur&&Ke<Wi[se.end]-ur});if(!rn)return null;var Kn={displacedBy:Oe,displaced:Tt.displaced,at:{type:"COMBINE",combine:{draggableId:rn.descriptor.id,droppableId:Zt.descriptor.id}}};return Kn},$h=function(vt){var xt=vt.pageOffset,Mt=vt.draggable,Tt=vt.draggables,Zt=vt.droppables,Kt=vt.previousImpact,te=vt.viewport,se=vt.afterCritical,Oe=Qh(Mt.page.borderBox,xt),Qe=Df({pageBorderBox:Oe,draggable:Mt,droppables:Zt});if(!Qe)return si;var Ke=Zt[Qe],We=vo(Ke.descriptor.id,Tt),Ge=qh(Ke,Oe);return Rc({pageBorderBoxWithDroppableScroll:Ge,draggable:Mt,previousImpact:Kt,destination:Ke,insideDestination:We,afterCritical:se})||Aa({pageBorderBoxWithDroppableScroll:Ge,draggable:Mt,destination:Ke,insideDestination:We,last:Kt.displaced,viewport:te,afterCritical:se})},Zo=function(vt,xt){var Mt;return(0,Me.Z)({},vt,(Mt={},Mt[xt.descriptor.id]=xt,Mt))},jc=function(xt){var Mt=xt.previousImpact,Tt=xt.impact,Zt=xt.droppables,Kt=Ia(Mt),te=Ia(Tt);if(!Kt||Kt===te)return Zt;var se=Zt[Kt];if(!se.subject.withPlaceholder)return Zt;var Oe=Nf(se);return Zo(Zt,Oe)},zc=function(vt){var xt=vt.draggable,Mt=vt.draggables,Tt=vt.droppables,Zt=vt.previousImpact,Kt=vt.impact,te=jc({previousImpact:Zt,impact:Kt,droppables:Tt}),se=Ia(Kt);if(!se)return te;var Oe=Tt[se];if($t(xt,Oe)||Oe.subject.withPlaceholder)return te;var Qe=zd(Oe,xt,Mt);return Zo(te,Qe)},Iu=function(vt){var xt=vt.state,Mt=vt.clientSelection,Tt=vt.dimensions,Zt=vt.viewport,Kt=vt.impact,te=vt.scrollJumpRequest,se=Zt||xt.viewport,Oe=Tt||xt.dimensions,Qe=Mt||xt.current.client.selection,Ke=Je(Qe,xt.initial.client.selection),We={offset:Ke,selection:Qe,borderBoxCenter:Or(xt.initial.client.borderBoxCenter,Ke)},Ge={selection:Or(We.selection,se.scroll.current),borderBoxCenter:Or(We.borderBoxCenter,se.scroll.current),offset:Or(We.offset,se.scroll.diff.value)},rn={client:We,page:Ge};if(xt.phase==="COLLECTING")return(0,Me.Z)({phase:"COLLECTING"},xt,{dimensions:Oe,viewport:se,current:rn});var Kn=Oe.draggables[xt.critical.draggable.id],Ai=Kt||$h({pageOffset:Ge.offset,draggable:Kn,draggables:Oe.draggables,droppables:Oe.droppables,previousImpact:xt.impact,viewport:se,afterCritical:xt.afterCritical}),Ti=zc({draggable:Kn,impact:Ai,previousImpact:xt.impact,draggables:Oe.draggables,droppables:Oe.droppables}),Wi=(0,Me.Z)({},xt,{current:rn,dimensions:{draggables:Oe.draggables,droppables:Ti},impact:Ai,viewport:se,scrollJumpRequest:te||null,forceShouldAnimate:te?!1:null});return Wi};function Xi(vt,xt){return vt.map(function(Mt){return xt[Mt]})}var Gc=function(vt){var xt=vt.impact,Mt=vt.viewport,Tt=vt.draggables,Zt=vt.destination,Kt=vt.forceShouldAnimate,te=xt.displaced,se=Xi(te.all,Tt),Oe=Go({afterDragging:se,destination:Zt,displacedBy:xt.displacedBy,viewport:Mt.frame,forceShouldAnimate:Kt,last:te});return(0,Me.Z)({},xt,{displaced:Oe})},Se=function(vt){var xt=vt.impact,Mt=vt.draggable,Tt=vt.droppable,Zt=vt.draggables,Kt=vt.viewport,te=vt.afterCritical,se=pi({impact:xt,draggable:Mt,draggables:Zt,droppable:Tt,afterCritical:te});return Br({pageBorderBoxCenter:se,draggable:Mt,viewport:Kt})},Fn=function(vt){var xt=vt.state,Mt=vt.dimensions,Tt=vt.viewport;xt.movementMode!=="SNAP"&&hn(!1);var Zt=xt.impact,Kt=Tt||xt.viewport,te=Mt||xt.dimensions,se=te.draggables,Oe=te.droppables,Qe=se[xt.critical.draggable.id],Ke=Ia(Zt);Ke||hn(!1);var We=Oe[Ke],Ge=Gc({impact:Zt,viewport:Kt,destination:We,draggables:se}),rn=Se({impact:Ge,draggable:Qe,droppable:We,draggables:se,viewport:Kt,afterCritical:xt.afterCritical});return Iu({impact:Ge,clientSelection:rn,state:xt,dimensions:te,viewport:Kt})},Ig=function(vt){return{index:vt.index,droppableId:vt.droppableId}},Tf=function(vt){var xt=vt.draggable,Mt=vt.home,Tt=vt.draggables,Zt=vt.viewport,Kt=Ps(Mt.axis,xt.displaceBy),te=vo(Mt.descriptor.id,Tt),se=te.indexOf(xt);se===-1&&hn(!1);var Oe=te.slice(se+1),Qe=Oe.reduce(function(rn,Kn){return rn[Kn.descriptor.id]=!0,rn},{}),Ke={inVirtualList:Mt.descriptor.mode==="virtual",displacedBy:Kt,effected:Qe},We=Go({afterDragging:Oe,destination:Mt,displacedBy:Kt,last:null,viewport:Zt.frame,forceShouldAnimate:!1}),Ge={displaced:We,displacedBy:Kt,at:{type:"REORDER",destination:Ig(xt.descriptor)}};return{impact:Ge,afterCritical:Ke}},wu=function(vt,xt){return{draggables:vt.draggables,droppables:Zo(vt.droppables,xt)}},ol=function(xt){},Il=function(xt){},Hc=function(vt){var xt=vt.draggable,Mt=vt.offset,Tt=vt.initialWindowScroll,Zt=Rn(xt.client,Mt),Kt=Ct(Zt,Tt),te=(0,Me.Z)({},xt,{placeholder:(0,Me.Z)({},xt.placeholder,{client:Zt}),client:Zt,page:Kt});return te},Hd=function(vt){var xt=vt.frame;return xt||hn(!1),xt},Yo=function(vt){var xt=vt.additions,Mt=vt.updatedDroppables,Tt=vt.viewport,Zt=Tt.scroll.diff.value;return xt.map(function(Kt){var te=Kt.descriptor.droppableId,se=Mt[te],Oe=Hd(se),Qe=Oe.scroll.diff.value,Ke=Or(Zt,Qe),We=Hc({draggable:Kt,offset:Ke,initialWindowScroll:Tt.scroll.initial});return We})},xr=function(vt){var xt=vt.state,Mt=vt.published;ol();var Tt=Mt.modified.map(function(ur){var ar=xt.dimensions.droppables[ur.droppableId],Tr=Cr(ar,ur.scroll);return Tr}),Zt=(0,Me.Z)({},xt.dimensions.droppables,{},Dr(Tt)),Kt=yi(Yo({additions:Mt.additions,updatedDroppables:Zt,viewport:xt.viewport})),te=(0,Me.Z)({},xt.dimensions.draggables,{},Kt);Mt.removals.forEach(function(ur){delete te[ur]});var se={droppables:Zt,draggables:te},Oe=Ia(xt.impact),Qe=Oe?se.droppables[Oe]:null,Ke=se.draggables[xt.critical.draggable.id],We=se.droppables[xt.critical.droppable.id],Ge=Tf({draggable:Ke,home:We,draggables:te,viewport:xt.viewport}),rn=Ge.impact,Kn=Ge.afterCritical,Ai=Qe&&Qe.isCombineEnabled?xt.impact:rn,Ti=$h({pageOffset:xt.current.page.offset,draggable:se.draggables[xt.critical.draggable.id],draggables:se.draggables,droppables:se.droppables,previousImpact:Ai,viewport:xt.viewport,afterCritical:Kn});Il();var Wi=(0,Me.Z)({phase:"DRAGGING"},xt,{phase:"DRAGGING",impact:Ti,onLiftImpact:rn,dimensions:se,afterCritical:Kn,forceShouldAnimate:!1});if(xt.phase==="COLLECTING")return Wi;var qi=(0,Me.Z)({phase:"DROP_PENDING"},Wi,{phase:"DROP_PENDING",reason:xt.reason,isWaiting:!1});return qi},Ka=function(xt){return xt.movementMode==="SNAP"},ws=function(xt,Mt,Tt){var Zt=wu(xt.dimensions,Mt);return!Ka(xt)||Tt?Iu({state:xt,dimensions:Zt}):Fn({state:xt,dimensions:Zt})};function jo(vt){return vt.isDragging&&vt.movementMode==="SNAP"?(0,Me.Z)({phase:"DRAGGING"},vt,{scrollJumpRequest:null}):vt}var Ur={phase:"IDLE",completed:null,shouldFlush:!1},da=function(vt,xt){if(vt===void 0&&(vt=Ur),xt.type==="FLUSH")return(0,Me.Z)({},Ur,{shouldFlush:!0});if(xt.type==="INITIAL_PUBLISH"){vt.phase!=="IDLE"&&hn(!1);var Mt=xt.payload,Tt=Mt.critical,Zt=Mt.clientSelection,Kt=Mt.viewport,te=Mt.dimensions,se=Mt.movementMode,Oe=te.draggables[Tt.draggable.id],Qe=te.droppables[Tt.droppable.id],Ke={selection:Zt,borderBoxCenter:Oe.client.borderBox.center,offset:Qi},We={client:Ke,page:{selection:Or(Ke.selection,Kt.scroll.initial),borderBoxCenter:Or(Ke.selection,Kt.scroll.initial),offset:Or(Ke.selection,Kt.scroll.diff.value)}},Ge=Gt(te.droppables).every(function(mf){return!mf.isFixedOnPage}),rn=Tf({draggable:Oe,home:Qe,draggables:te.draggables,viewport:Kt}),Kn=rn.impact,Ai=rn.afterCritical,Ti={phase:"DRAGGING",isDragging:!0,critical:Tt,movementMode:se,dimensions:te,initial:We,current:We,isWindowScrollAllowed:Ge,impact:Kn,afterCritical:Ai,onLiftImpact:Kn,viewport:Kt,scrollJumpRequest:null,forceShouldAnimate:null};return Ti}if(xt.type==="COLLECTION_STARTING"){if(vt.phase==="COLLECTING"||vt.phase==="DROP_PENDING")return vt;vt.phase!=="DRAGGING"&&hn(!1);var Wi=(0,Me.Z)({phase:"COLLECTING"},vt,{phase:"COLLECTING"});return Wi}if(xt.type==="PUBLISH_WHILE_DRAGGING")return vt.phase==="COLLECTING"||vt.phase==="DROP_PENDING"||hn(!1),xr({state:vt,published:xt.payload});if(xt.type==="MOVE"){if(vt.phase==="DROP_PENDING")return vt;ql(vt)||hn(!1);var qi=xt.payload.client;return Un(qi,vt.current.client.selection)?vt:Iu({state:vt,clientSelection:qi,impact:Ka(vt)?vt.impact:null})}if(xt.type==="UPDATE_DROPPABLE_SCROLL"){if(vt.phase==="DROP_PENDING"||vt.phase==="COLLECTING")return jo(vt);ql(vt)||hn(!1);var ur=xt.payload,ar=ur.id,Tr=ur.newScroll,$r=vt.dimensions.droppables[ar];if(!$r)return vt;var So=Cr($r,Tr);return ws(vt,So,!1)}if(xt.type==="UPDATE_DROPPABLE_IS_ENABLED"){if(vt.phase==="DROP_PENDING")return vt;ql(vt)||hn(!1);var La=xt.payload,po=La.id,xa=La.isEnabled,gs=vt.dimensions.droppables[po];gs||hn(!1),gs.isEnabled===xa&&hn(!1);var Bs=(0,Me.Z)({},gs,{isEnabled:xa});return ws(vt,Bs,!0)}if(xt.type==="UPDATE_DROPPABLE_IS_COMBINE_ENABLED"){if(vt.phase==="DROP_PENDING")return vt;ql(vt)||hn(!1);var lu=xt.payload,dl=lu.id,$s=lu.isCombineEnabled,_a=vt.dimensions.droppables[dl];_a||hn(!1),_a.isCombineEnabled===$s&&hn(!1);var la=(0,Me.Z)({},_a,{isCombineEnabled:$s});return ws(vt,la,!0)}if(xt.type==="MOVE_BY_WINDOW_SCROLL"){if(vt.phase==="DROP_PENDING"||vt.phase==="DROP_ANIMATING")return vt;ql(vt)||hn(!1),vt.isWindowScrollAllowed||hn(!1);var Mu=xt.payload.newScroll;if(Un(vt.viewport.scroll.current,Mu))return jo(vt);var Pa=No(vt.viewport,Mu);return Ka(vt)?Fn({state:vt,viewport:Pa}):Iu({state:vt,viewport:Pa})}if(xt.type==="UPDATE_VIEWPORT_MAX_SCROLL"){if(!ql(vt))return vt;var uu=xt.payload.maxScroll;if(Un(uu,vt.viewport.scroll.max))return vt;var lc=(0,Me.Z)({},vt.viewport,{scroll:(0,Me.Z)({},vt.viewport.scroll,{max:uu})});return(0,Me.Z)({phase:"DRAGGING"},vt,{viewport:lc})}if(xt.type==="MOVE_UP"||xt.type==="MOVE_DOWN"||xt.type==="MOVE_LEFT"||xt.type==="MOVE_RIGHT"){if(vt.phase==="COLLECTING"||vt.phase==="DROP_PENDING")return vt;vt.phase!=="DRAGGING"&&hn(!1);var hu=Ic({state:vt,type:xt.type});return hu?Iu({state:vt,impact:hu.impact,clientSelection:hu.clientSelection,scrollJumpRequest:hu.scrollJumpRequest}):vt}if(xt.type==="DROP_PENDING"){var mr=xt.payload.reason;vt.phase!=="COLLECTING"&&hn(!1);var vd=(0,Me.Z)({phase:"DROP_PENDING"},vt,{phase:"DROP_PENDING",isWaiting:!0,reason:mr});return vd}if(xt.type==="DROP_ANIMATE"){var dg=xt.payload,du=dg.completed,nh=dg.dropDuration,Rh=dg.newHomeClientOffset;vt.phase==="DRAGGING"||vt.phase==="DROP_PENDING"||hn(!1);var tl={phase:"DROP_ANIMATING",completed:du,dropDuration:nh,newHomeClientOffset:Rh,dimensions:vt.dimensions};return tl}if(xt.type==="DROP_COMPLETE"){var pf=xt.payload.completed;return{phase:"IDLE",completed:pf,shouldFlush:!1}}return vt},Cs=function(xt){return{type:"BEFORE_INITIAL_CAPTURE",payload:xt}},Bo=function(xt){return{type:"LIFT",payload:xt}},zs=function(xt){return{type:"INITIAL_PUBLISH",payload:xt}},Fa=function(xt){return{type:"PUBLISH_WHILE_DRAGGING",payload:xt}},Ou=function(){return{type:"COLLECTION_STARTING",payload:null}},oo=function(xt){return{type:"UPDATE_DROPPABLE_SCROLL",payload:xt}},hs=function(xt){return{type:"UPDATE_DROPPABLE_IS_ENABLED",payload:xt}},io=function(xt){return{type:"UPDATE_DROPPABLE_IS_COMBINE_ENABLED",payload:xt}},Eo=function(xt){return{type:"MOVE",payload:xt}},zo=function(xt){return{type:"MOVE_BY_WINDOW_SCROLL",payload:xt}},Jo=function(xt){return{type:"UPDATE_VIEWPORT_MAX_SCROLL",payload:xt}},so=function(){return{type:"MOVE_UP",payload:null}},ph=function(){return{type:"MOVE_DOWN",payload:null}},fr=function(){return{type:"MOVE_RIGHT",payload:null}},Og=function(){return{type:"MOVE_LEFT",payload:null}},qr=function(){return{type:"FLUSH",payload:null}},Rg=function(xt){return{type:"DROP_ANIMATE",payload:xt}},Ru=function(xt){return{type:"DROP_COMPLETE",payload:xt}},td=function(xt){return{type:"DROP",payload:xt}},If=function(xt){return{type:"DROP_PENDING",payload:xt}},Wd=function(){return{type:"DROP_ANIMATION_FINISHED",payload:null}};function ju(vt){if(!(vt.length<=1)){for(var xt=vt.map(function(se){return se.descriptor.index}),Mt={},Tt=1;Tt<xt.length;Tt++){var Zt=xt[Tt],Kt=xt[Tt-1];Zt!==Kt+1&&(Mt[Zt]=!0)}if(Object.keys(Mt).length)var te=xt.map(function(se){var Oe=!!Mt[se];return Oe?"[\u{1F525}"+se+"]":""+se}).join(", ")}}function mh(vt,xt){if(0)var Mt}var lo=function(vt){return function(xt){var Mt=xt.getState,Tt=xt.dispatch;return function(Zt){return function(Kt){if(Kt.type!=="LIFT"){Zt(Kt);return}var te=Kt.payload,se=te.id,Oe=te.clientSelection,Qe=te.movementMode,Ke=Mt();Ke.phase==="DROP_ANIMATING"&&Tt(Ru({completed:Ke.completed})),Mt().phase!=="IDLE"&&hn(!1),Tt(qr()),Tt(Cs({draggableId:se,movementMode:Qe}));var We={shouldPublishImmediately:Qe==="SNAP"},Ge={draggableId:se,scrollOptions:We},rn=vt.startPublishing(Ge),Kn=rn.critical,Ai=rn.dimensions,Ti=rn.viewport;mh(Kn,Ai),Tt(zs({critical:Kn,dimensions:Ai,clientSelection:Oe,movementMode:Qe,viewport:Ti}))}}}},$l=function(vt){return function(){return function(xt){return function(Mt){Mt.type==="INITIAL_PUBLISH"&&vt.dragging(),Mt.type==="DROP_ANIMATE"&&vt.dropping(Mt.payload.completed.result.reason),(Mt.type==="FLUSH"||Mt.type==="DROP_COMPLETE")&&vt.resting(),xt(Mt)}}}},ed={outOfTheWay:"cubic-bezier(0.2, 0, 0, 1)",drop:"cubic-bezier(.2,1,.1,1)"},Ol={opacity:{drop:0,combining:.7},scale:{drop:.75}},Vd={outOfTheWay:.2,minDropTime:.33,maxDropTime:.55},Gs=Vd.outOfTheWay+"s "+ed.outOfTheWay,ds={fluid:"opacity "+Gs,snap:"transform "+Gs+", opacity "+Gs,drop:function(xt){var Mt=xt+"s "+ed.drop;return"transform "+Mt+", opacity "+Mt},outOfTheWay:"transform "+Gs,placeholder:"height "+Gs+", width "+Gs+", margin "+Gs},Cu=function(xt){return Un(xt,Qi)?null:"translate("+xt.x+"px, "+xt.y+"px)"},al={moveTo:Cu,drop:function(xt,Mt){var Tt=Cu(xt);return Tt?Mt?Tt+" scale("+Ol.scale.drop+")":Tt:null}},tu=Vd.minDropTime,Ud=Vd.maxDropTime,Of=Ud-tu,Wc=1500,jg=.6,zu=function(vt){var xt=vt.current,Mt=vt.destination,Tt=vt.reason,Zt=di(xt,Mt);if(Zt<=0)return tu;if(Zt>=Wc)return Ud;var Kt=Zt/Wc,te=tu+Of*Kt,se=Tt==="CANCEL"?te*jg:te;return Number(se.toFixed(2))},Gu=function(vt){var xt=vt.impact,Mt=vt.draggable,Tt=vt.dimensions,Zt=vt.viewport,Kt=vt.afterCritical,te=Tt.draggables,se=Tt.droppables,Oe=Ia(xt),Qe=Oe?se[Oe]:null,Ke=se[Mt.descriptor.droppableId],We=Se({impact:xt,draggable:Mt,draggables:te,afterCritical:Kt,droppable:Qe||Ke,viewport:Zt}),Ge=Je(We,Mt.client.borderBox.center);return Ge},jp=function(vt){var xt=vt.draggables,Mt=vt.reason,Tt=vt.lastImpact,Zt=vt.home,Kt=vt.viewport,te=vt.onLiftImpact;if(!Tt.at||Mt!=="DROP"){var se=Gc({draggables:xt,impact:te,destination:Zt,viewport:Kt,forceShouldAnimate:!0});return{impact:se,didDropInsideDroppable:!1}}if(Tt.at.type==="REORDER")return{impact:Tt,didDropInsideDroppable:!0};var Oe=(0,Me.Z)({},Tt,{displaced:In});return{impact:Oe,didDropInsideDroppable:!0}},zp=function(vt){var xt=vt.getState,Mt=vt.dispatch;return function(Tt){return function(Zt){if(Zt.type!=="DROP"){Tt(Zt);return}var Kt=xt(),te=Zt.payload.reason;if(Kt.phase==="COLLECTING"){Mt(If({reason:te}));return}if(Kt.phase!=="IDLE"){var se=Kt.phase==="DROP_PENDING"&&Kt.isWaiting;se&&hn(!1),Kt.phase==="DRAGGING"||Kt.phase==="DROP_PENDING"||hn(!1);var Oe=Kt.critical,Qe=Kt.dimensions,Ke=Qe.draggables[Kt.critical.draggable.id],We=jp({reason:te,lastImpact:Kt.impact,afterCritical:Kt.afterCritical,onLiftImpact:Kt.onLiftImpact,home:Kt.dimensions.droppables[Kt.critical.droppable.id],viewport:Kt.viewport,draggables:Kt.dimensions.draggables}),Ge=We.impact,rn=We.didDropInsideDroppable,Kn=rn?Oo(Ge):null,Ai=rn?ua(Ge):null,Ti={index:Oe.draggable.index,droppableId:Oe.droppable.id},Wi={draggableId:Ke.descriptor.id,type:Ke.descriptor.type,source:Ti,reason:te,mode:Kt.movementMode,destination:Kn,combine:Ai},qi=Gu({impact:Ge,draggable:Ke,dimensions:Qe,viewport:Kt.viewport,afterCritical:Kt.afterCritical}),ur={critical:Kt.critical,afterCritical:Kt.afterCritical,result:Wi,impact:Ge},ar=!Un(Kt.current.client.offset,qi)||!!Wi.combine;if(!ar){Mt(Ru({completed:ur}));return}var Tr=zu({current:Kt.current.client.offset,destination:qi,reason:te}),$r={newHomeClientOffset:qi,dropDuration:Tr,completed:ur};Mt(Rg($r))}}}},zg=function(){return{x:window.pageXOffset,y:window.pageYOffset}};function Gg(vt){return{eventName:"scroll",options:{passive:!0,capture:!1},fn:function(Mt){Mt.target!==window&&Mt.target!==window.document||vt()}}}function ra(vt){var xt=vt.onWindowScroll;function Mt(){xt(zg())}var Tt=be(Mt),Zt=Gg(Tt),Kt=pe;function te(){return Kt!==pe}function se(){te()&&hn(!1),Kt=gi(window,[Zt])}function Oe(){te()||hn(!1),Tt.cancel(),Kt(),Kt=pe}return{start:se,stop:Oe,isActive:te}}var Hu=function(xt){return xt.type==="DROP_COMPLETE"||xt.type==="DROP_ANIMATE"||xt.type==="FLUSH"},xo=function(vt){var xt=ra({onWindowScroll:function(Tt){vt.dispatch(zo({newScroll:Tt}))}});return function(Mt){return function(Tt){!xt.isActive()&&Tt.type==="INITIAL_PUBLISH"&&xt.start(),xt.isActive()&&Hu(Tt)&&xt.stop(),Mt(Tt)}}},Ba=function(vt){var xt=!1,Mt=!1,Tt=setTimeout(function(){Mt=!0}),Zt=function(te){xt||Mt||(xt=!0,vt(te),clearTimeout(Tt))};return Zt.wasCalled=function(){return xt},Zt},Oa=function(){var vt=[],xt=function(Kt){var te=dr(vt,function(Qe){return Qe.timerId===Kt});te===-1&&hn(!1);var se=vt.splice(te,1),Oe=se[0];Oe.callback()},Mt=function(Kt){var te=setTimeout(function(){return xt(te)}),se={timerId:te,callback:Kt};vt.push(se)},Tt=function(){if(vt.length){var Kt=[].concat(vt);vt.length=0,Kt.forEach(function(te){clearTimeout(te.timerId),te.callback()})}};return{add:Mt,flush:Tt}},Ra=function(xt,Mt){return xt==null&&Mt==null?!0:xt==null||Mt==null?!1:xt.droppableId===Mt.droppableId&&xt.index===Mt.index},nd=function(xt,Mt){return xt==null&&Mt==null?!0:xt==null||Mt==null?!1:xt.draggableId===Mt.draggableId&&xt.droppableId===Mt.droppableId},ja=function(xt,Mt){if(xt===Mt)return!0;var Tt=xt.draggable.id===Mt.draggable.id&&xt.draggable.droppableId===Mt.draggable.droppableId&&xt.draggable.type===Mt.draggable.type&&xt.draggable.index===Mt.draggable.index,Zt=xt.droppable.id===Mt.droppable.id&&xt.droppable.type===Mt.droppable.type;return Tt&&Zt},Rl=function(xt,Mt){ol(),Mt(),Il()},Kd=function(xt,Mt){return{draggableId:xt.draggable.id,type:xt.droppable.type,source:{droppableId:xt.droppable.id,index:xt.draggable.index},mode:Mt}},Vc=function(xt,Mt,Tt,Zt){if(!xt){Tt(Zt(Mt));return}var Kt=Ba(Tt),te={announce:Kt};xt(Mt,te),Kt.wasCalled()||Tt(Zt(Mt))},Es=function(vt,xt){var Mt=Oa(),Tt=null,Zt=function(Ge,rn){Tt&&hn(!1),Rl("onBeforeCapture",function(){var Kn=vt().onBeforeCapture;if(Kn){var Ai={draggableId:Ge,mode:rn};Kn(Ai)}})},Kt=function(Ge,rn){Tt&&hn(!1),Rl("onBeforeDragStart",function(){var Kn=vt().onBeforeDragStart;Kn&&Kn(Kd(Ge,rn))})},te=function(Ge,rn){Tt&&hn(!1);var Kn=Kd(Ge,rn);Tt={mode:rn,lastCritical:Ge,lastLocation:Kn.source,lastCombine:null},Mt.add(function(){Rl("onDragStart",function(){return Vc(vt().onDragStart,Kn,xt,to.onDragStart)})})},se=function(Ge,rn){var Kn=Oo(rn),Ai=ua(rn);Tt||hn(!1);var Ti=!ja(Ge,Tt.lastCritical);Ti&&(Tt.lastCritical=Ge);var Wi=!Ra(Tt.lastLocation,Kn);Wi&&(Tt.lastLocation=Kn);var qi=!nd(Tt.lastCombine,Ai);if(qi&&(Tt.lastCombine=Ai),!(!Ti&&!Wi&&!qi)){var ur=(0,Me.Z)({},Kd(Ge,Tt.mode),{combine:Ai,destination:Kn});Mt.add(function(){Rl("onDragUpdate",function(){return Vc(vt().onDragUpdate,ur,xt,to.onDragUpdate)})})}},Oe=function(){Tt||hn(!1),Mt.flush()},Qe=function(Ge){Tt||hn(!1),Tt=null,Rl("onDragEnd",function(){return Vc(vt().onDragEnd,Ge,xt,to.onDragEnd)})},Ke=function(){if(Tt){var Ge=(0,Me.Z)({},Kd(Tt.lastCritical,Tt.mode),{combine:null,destination:null,reason:"CANCEL"});Qe(Ge)}};return{beforeCapture:Zt,beforeStart:Kt,start:te,update:se,flush:Oe,drop:Qe,abort:Ke}},Uc=function(vt,xt){var Mt=Es(vt,xt);return function(Tt){return function(Zt){return function(Kt){if(Kt.type==="BEFORE_INITIAL_CAPTURE"){Mt.beforeCapture(Kt.payload.draggableId,Kt.payload.movementMode);return}if(Kt.type==="INITIAL_PUBLISH"){var te=Kt.payload.critical;Mt.beforeStart(te,Kt.payload.movementMode),Zt(Kt),Mt.start(te,Kt.payload.movementMode);return}if(Kt.type==="DROP_COMPLETE"){var se=Kt.payload.completed.result;Mt.flush(),Zt(Kt),Mt.drop(se);return}if(Zt(Kt),Kt.type==="FLUSH"){Mt.abort();return}var Oe=Tt.getState();Oe.phase==="DRAGGING"&&Mt.update(Oe.critical,Oe.impact)}}}},Mo=function(vt){return function(xt){return function(Mt){if(Mt.type!=="DROP_ANIMATION_FINISHED"){xt(Mt);return}var Tt=vt.getState();Tt.phase!=="DROP_ANIMATING"&&hn(!1),vt.dispatch(Ru({completed:Tt.completed}))}}},Wu=function(vt){var xt=null,Mt=null;function Tt(){Mt&&(cancelAnimationFrame(Mt),Mt=null),xt&&(xt(),xt=null)}return function(Zt){return function(Kt){if((Kt.type==="FLUSH"||Kt.type==="DROP_COMPLETE"||Kt.type==="DROP_ANIMATION_FINISHED")&&Tt(),Zt(Kt),Kt.type==="DROP_ANIMATE"){var te={eventName:"scroll",options:{capture:!0,passive:!1,once:!0},fn:function(){var Oe=vt.getState();Oe.phase==="DROP_ANIMATING"&&vt.dispatch(Wd())}};Mt=requestAnimationFrame(function(){Mt=null,xt=gi(window,[te])})}}}},Rf=function(vt){return function(){return function(xt){return function(Mt){(Mt.type==="DROP_COMPLETE"||Mt.type==="FLUSH"||Mt.type==="DROP_ANIMATE")&&vt.stopPublishing(),xt(Mt)}}}},Vu=function(vt){var xt=!1;return function(){return function(Mt){return function(Tt){if(Tt.type==="INITIAL_PUBLISH"){xt=!0,vt.tryRecordFocus(Tt.payload.critical.draggable.id),Mt(Tt),vt.tryRestoreFocusRecorded();return}if(Mt(Tt),!!xt){if(Tt.type==="FLUSH"){xt=!1,vt.tryRestoreFocusRecorded();return}if(Tt.type==="DROP_COMPLETE"){xt=!1;var Zt=Tt.payload.completed.result;Zt.combine&&vt.tryShiftRecord(Zt.draggableId,Zt.combine.draggableId),vt.tryRestoreFocusRecorded()}}}}}},Uu=function(xt){return xt.type==="DROP_COMPLETE"||xt.type==="DROP_ANIMATE"||xt.type==="FLUSH"},Kc=function(vt){return function(xt){return function(Mt){return function(Tt){if(Uu(Tt)){vt.stop(),Mt(Tt);return}if(Tt.type==="INITIAL_PUBLISH"){Mt(Tt);var Zt=xt.getState();Zt.phase!=="DRAGGING"&&hn(!1),vt.start(Zt);return}Mt(Tt),vt.scroll(xt.getState())}}}},ya=function(vt){return function(xt){return function(Mt){if(xt(Mt),Mt.type==="PUBLISH_WHILE_DRAGGING"){var Tt=vt.getState();Tt.phase==="DROP_PENDING"&&(Tt.isWaiting||vt.dispatch(td({reason:Tt.reason})))}}}},za=Pe.qC,vh=function(vt){var xt=vt.dimensionMarshal,Mt=vt.focusMarshal,Tt=vt.styleMarshal,Zt=vt.getResponders,Kt=vt.announce,te=vt.autoScroller;return(0,Pe.MT)(da,za((0,Pe.md)($l(Tt),Rf(xt),lo(xt),zp,Mo,Wu,ya,Kc(te),xo,Vu(Mt),Uc(Zt,Kt))))},bs=function(){return{additions:{},removals:{},modified:{}}};function Ku(vt){var xt=vt.registry,Mt=vt.callbacks,Tt=bs(),Zt=null,Kt=function(){Zt||(Mt.collectionStarting(),Zt=requestAnimationFrame(function(){Zt=null,ol();var Ke=Tt,We=Ke.additions,Ge=Ke.removals,rn=Ke.modified,Kn=Object.keys(We).map(function(Wi){return xt.draggable.getById(Wi).getDimension(Qi)}).sort(function(Wi,qi){return Wi.descriptor.index-qi.descriptor.index}),Ai=Object.keys(rn).map(function(Wi){var qi=xt.droppable.getById(Wi),ur=qi.callbacks.getScrollWhileDragging();return{droppableId:Wi,scroll:ur}}),Ti={additions:Kn,removals:Object.keys(Ge),modified:Ai};Tt=bs(),Il(),Mt.publish(Ti)}))},te=function(Ke){var We=Ke.descriptor.id;Tt.additions[We]=Ke,Tt.modified[Ke.descriptor.droppableId]=!0,Tt.removals[We]&&delete Tt.removals[We],Kt()},se=function(Ke){var We=Ke.descriptor;Tt.removals[We.id]=!0,Tt.modified[We.droppableId]=!0,Tt.additions[We.id]&&delete Tt.additions[We.id],Kt()},Oe=function(){Zt&&(cancelAnimationFrame(Zt),Zt=null,Tt=bs())};return{add:te,remove:se,stop:Oe}}var Ls=function(vt){var xt=vt.scrollHeight,Mt=vt.scrollWidth,Tt=vt.height,Zt=vt.width,Kt=Je({x:Mt,y:xt},{x:Zt,y:Tt}),te={x:Math.max(0,Kt.x),y:Math.max(0,Kt.y)};return te},sa=function(){var vt=document.documentElement;return vt||hn(!1),vt},xl=function(){var vt=sa(),xt=Ls({scrollHeight:vt.scrollHeight,scrollWidth:vt.scrollWidth,width:vt.clientWidth,height:vt.clientHeight});return xt},Xs=function(){var vt=zg(),xt=xl(),Mt=vt.y,Tt=vt.x,Zt=sa(),Kt=Zt.clientWidth,te=Zt.clientHeight,se=Tt+Kt,Oe=Mt+te,Qe=sr({top:Mt,left:Tt,right:se,bottom:Oe}),Ke={frame:Qe,scroll:{initial:vt,current:vt,max:xt,diff:{value:Qi,displacement:Qi}}};return Ke},Ga=function(vt){var xt=vt.critical,Mt=vt.scrollOptions,Tt=vt.registry;ol();var Zt=Xs(),Kt=Zt.scroll.current,te=xt.droppable,se=Tt.droppable.getAllByType(te.type).map(function(We){return We.callbacks.getDimensionAndWatchScroll(Kt,Mt)}),Oe=Tt.draggable.getAllByType(xt.draggable.type).map(function(We){return We.getDimension(Kt)}),Qe={draggables:yi(Oe),droppables:Dr(se)};Il();var Ke={dimensions:Qe,critical:xt,viewport:Zt};return Ke};function _s(vt,xt,Mt){if(Mt.descriptor.id===xt.id||Mt.descriptor.type!==xt.type)return!1;var Tt=vt.droppable.getById(Mt.descriptor.droppableId);return Tt.descriptor.mode==="virtual"}var Ao=function(vt,xt){var Mt=null,Tt=Ku({callbacks:{publish:xt.publishWhileDragging,collectionStarting:xt.collectionStarting},registry:vt}),Zt=function(rn,Kn){vt.droppable.exists(rn)||hn(!1),Mt&&xt.updateDroppableIsEnabled({id:rn,isEnabled:Kn})},Kt=function(rn,Kn){Mt&&(vt.droppable.exists(rn)||hn(!1),xt.updateDroppableIsCombineEnabled({id:rn,isCombineEnabled:Kn}))},te=function(rn,Kn){Mt&&(vt.droppable.exists(rn)||hn(!1),xt.updateDroppableScroll({id:rn,newScroll:Kn}))},se=function(rn,Kn){Mt&&vt.droppable.getById(rn).callbacks.scroll(Kn)},Oe=function(){if(Mt){Tt.stop();var rn=Mt.critical.droppable;vt.droppable.getAllByType(rn.type).forEach(function(Kn){return Kn.callbacks.dragStopped()}),Mt.unsubscribe(),Mt=null}},Qe=function(rn){Mt||hn(!1);var Kn=Mt.critical.draggable;rn.type==="ADDITION"&&_s(vt,Kn,rn.value)&&Tt.add(rn.value),rn.type==="REMOVAL"&&_s(vt,Kn,rn.value)&&Tt.remove(rn.value)},Ke=function(rn){Mt&&hn(!1);var Kn=vt.draggable.getById(rn.draggableId),Ai=vt.droppable.getById(Kn.descriptor.droppableId),Ti={draggable:Kn.descriptor,droppable:Ai.descriptor},Wi=vt.subscribe(Qe);return Mt={critical:Ti,unsubscribe:Wi},Ga({critical:Ti,registry:vt,scrollOptions:rn.scrollOptions})},We={updateDroppableIsEnabled:Zt,updateDroppableIsCombineEnabled:Kt,scrollDroppable:se,updateDroppableScroll:te,startPublishing:Ke,stopPublishing:Oe};return We},sl=function(vt,xt){return vt.phase==="IDLE"?!0:vt.phase!=="DROP_ANIMATING"||vt.completed.result.draggableId===xt?!1:vt.completed.result.reason==="DROP"},Eu=function(vt){window.scrollBy(vt.x,vt.y)},Zu=an(function(vt){return Gt(vt).filter(function(xt){return!(!xt.isEnabled||!xt.frame)})}),yh=function(xt,Mt){var Tt=Nr(Zu(Mt),function(Zt){return Zt.frame||hn(!1),Oc(Zt.frame.pageMarginBox)(xt)});return Tt},Zd=function(vt){var xt=vt.center,Mt=vt.destination,Tt=vt.droppables;if(Mt){var Zt=Tt[Mt];return Zt.frame?Zt:null}var Kt=yh(xt,Tt);return Kt},ll={startFromPercentage:.25,maxScrollAtPercentage:.05,maxPixelScroll:28,ease:function(xt){return Math.pow(xt,2)},durationDampening:{stopDampeningAt:1200,accelerateAt:360}},Yd=function(vt,xt){var Mt=vt[xt.size]*ll.startFromPercentage,Tt=vt[xt.size]*ll.maxScrollAtPercentage,Zt={startScrollingFrom:Mt,maxScrollValueAt:Tt};return Zt},Yr=function(vt){var xt=vt.startOfRange,Mt=vt.endOfRange,Tt=vt.current,Zt=Mt-xt;if(Zt===0)return 0;var Kt=Tt-xt,te=Kt/Zt;return te},Sh=1,jf=function(vt,xt){if(vt>xt.startScrollingFrom)return 0;if(vt<=xt.maxScrollValueAt)return ll.maxPixelScroll;if(vt===xt.startScrollingFrom)return Sh;var Mt=Yr({startOfRange:xt.maxScrollValueAt,endOfRange:xt.startScrollingFrom,current:vt}),Tt=1-Mt,Zt=ll.maxPixelScroll*ll.ease(Tt);return Math.ceil(Zt)},Xd=ll.durationDampening.accelerateAt,Pl=ll.durationDampening.stopDampeningAt,Zc=function(vt,xt){var Mt=xt,Tt=Pl,Zt=Date.now(),Kt=Zt-Mt;if(Kt>=Pl)return vt;if(Kt<Xd)return Sh;var te=Yr({startOfRange:Xd,endOfRange:Tt,current:Kt}),se=vt*ll.ease(te);return Math.ceil(se)},id=function(vt){var xt=vt.distanceToEdge,Mt=vt.thresholds,Tt=vt.dragStartTime,Zt=vt.shouldUseTimeDampening,Kt=jf(xt,Mt);return Kt===0?0:Zt?Math.max(Zc(Kt,Tt),Sh):Kt},Hg=function(vt){var xt=vt.container,Mt=vt.distanceToEdges,Tt=vt.dragStartTime,Zt=vt.axis,Kt=vt.shouldUseTimeDampening,te=Yd(xt,Zt),se=Mt[Zt.end]<Mt[Zt.start];return se?id({distanceToEdge:Mt[Zt.end],thresholds:te,dragStartTime:Tt,shouldUseTimeDampening:Kt}):-1*id({distanceToEdge:Mt[Zt.start],thresholds:te,dragStartTime:Tt,shouldUseTimeDampening:Kt})},rd=function(vt){var xt=vt.container,Mt=vt.subject,Tt=vt.proposedScroll,Zt=Mt.height>xt.height,Kt=Mt.width>xt.width;return!Kt&&!Zt?Tt:Kt&&Zt?null:{x:Kt?0:Tt.x,y:Zt?0:Tt.y}},Yc=vr(function(vt){return vt===0?0:vt}),xh=function(vt){var xt=vt.dragStartTime,Mt=vt.container,Tt=vt.subject,Zt=vt.center,Kt=vt.shouldUseTimeDampening,te={top:Zt.y-Mt.top,right:Mt.right-Zt.x,bottom:Mt.bottom-Zt.y,left:Zt.x-Mt.left},se=Hg({container:Mt,distanceToEdges:te,dragStartTime:xt,axis:Re,shouldUseTimeDampening:Kt}),Oe=Hg({container:Mt,distanceToEdges:te,dragStartTime:xt,axis:Nn,shouldUseTimeDampening:Kt}),Qe=Yc({x:Oe,y:se});if(Un(Qe,Qi))return null;var Ke=rd({container:Mt,subject:Tt,proposedScroll:Qe});return Ke?Un(Ke,Qi)?null:Ke:null},_d=vr(function(vt){return vt===0?0:vt>0?1:-1}),Ph=function(){var vt=function(Mt,Tt){return Mt<0?Mt:Mt>Tt?Mt-Tt:0};return function(xt){var Mt=xt.current,Tt=xt.max,Zt=xt.change,Kt=Or(Mt,Zt),te={x:vt(Kt.x,Tt.x),y:vt(Kt.y,Tt.y)};return Un(te,Qi)?null:te}}(),Xc=function(xt){var Mt=xt.max,Tt=xt.current,Zt=xt.change,Kt={x:Math.max(Tt.x,Mt.x),y:Math.max(Tt.y,Mt.y)},te=_d(Zt),se=Ph({max:Kt,current:Tt,change:te});return!se||te.x!==0&&se.x===0||te.y!==0&&se.y===0},wh=function(xt,Mt){return Xc({current:xt.scroll.current,max:xt.scroll.max,change:Mt})},od=function(xt,Mt){if(!wh(xt,Mt))return null;var Tt=xt.scroll.max,Zt=xt.scroll.current;return Ph({current:Zt,max:Tt,change:Mt})},eu=function(xt,Mt){var Tt=xt.frame;return Tt?Xc({current:Tt.scroll.current,max:Tt.scroll.max,change:Mt}):!1},cs=function(xt,Mt){var Tt=xt.frame;return!Tt||!eu(xt,Mt)?null:Ph({current:Tt.scroll.current,max:Tt.scroll.max,change:Mt})},nu=function(vt){var xt=vt.viewport,Mt=vt.subject,Tt=vt.center,Zt=vt.dragStartTime,Kt=vt.shouldUseTimeDampening,te=xh({dragStartTime:Zt,container:xt.frame,subject:Mt,center:Tt,shouldUseTimeDampening:Kt});return te&&wh(xt,te)?te:null},_c=function(vt){var xt=vt.droppable,Mt=vt.subject,Tt=vt.center,Zt=vt.dragStartTime,Kt=vt.shouldUseTimeDampening,te=xt.frame;if(!te)return null;var se=xh({dragStartTime:Zt,container:te.pageMarginBox,subject:Mt,center:Tt,shouldUseTimeDampening:Kt});return se&&eu(xt,se)?se:null},iu=function(vt){var xt=vt.state,Mt=vt.dragStartTime,Tt=vt.shouldUseTimeDampening,Zt=vt.scrollWindow,Kt=vt.scrollDroppable,te=xt.current.page.borderBoxCenter,se=xt.dimensions.draggables[xt.critical.draggable.id],Oe=se.page.marginBox;if(xt.isWindowScrollAllowed){var Qe=xt.viewport,Ke=nu({dragStartTime:Mt,viewport:Qe,subject:Oe,center:te,shouldUseTimeDampening:Tt});if(Ke){Zt(Ke);return}}var We=Zd({center:te,destination:Ia(xt.impact),droppables:xt.dimensions.droppables});if(We){var Ge=_c({dragStartTime:Mt,droppable:We,subject:Oe,center:te,shouldUseTimeDampening:Tt});Ge&&Kt(We.descriptor.id,Ge)}},Jc=function(vt){var xt=vt.scrollWindow,Mt=vt.scrollDroppable,Tt=be(xt),Zt=be(Mt),Kt=null,te=function(Ke){Kt||hn(!1);var We=Kt,Ge=We.shouldUseTimeDampening,rn=We.dragStartTime;iu({state:Ke,scrollWindow:Tt,scrollDroppable:Zt,dragStartTime:rn,shouldUseTimeDampening:Ge})},se=function(Ke){ol(),Kt&&hn(!1);var We=Date.now(),Ge=!1,rn=function(){Ge=!0};iu({state:Ke,dragStartTime:0,shouldUseTimeDampening:!1,scrollWindow:rn,scrollDroppable:rn}),Kt={dragStartTime:We,shouldUseTimeDampening:Ge},Il(),Ge&&te(Ke)},Oe=function(){Kt&&(Tt.cancel(),Zt.cancel(),Kt=null)};return{start:se,stop:Oe,scroll:te}},Qc=function(vt){var xt=vt.move,Mt=vt.scrollDroppable,Tt=vt.scrollWindow,Zt=function(Qe,Ke){var We=Or(Qe.current.client.selection,Ke);xt({client:We})},Kt=function(Qe,Ke){if(!eu(Qe,Ke))return Ke;var We=cs(Qe,Ke);if(!We)return Mt(Qe.descriptor.id,Ke),null;var Ge=Je(Ke,We);Mt(Qe.descriptor.id,Ge);var rn=Je(Ke,Ge);return rn},te=function(Qe,Ke,We){if(!Qe||!wh(Ke,We))return We;var Ge=od(Ke,We);if(!Ge)return Tt(We),null;var rn=Je(We,Ge);Tt(rn);var Kn=Je(We,rn);return Kn},se=function(Qe){var Ke=Qe.scrollJumpRequest;if(Ke){var We=Ia(Qe.impact);We||hn(!1);var Ge=Kt(Qe.dimensions.droppables[We],Ke);if(Ge){var rn=Qe.viewport,Kn=te(Qe.isWindowScrollAllowed,rn,Ge);Kn&&Zt(Qe,Kn)}}};return se},Wg=function(vt){var xt=vt.scrollDroppable,Mt=vt.scrollWindow,Tt=vt.move,Zt=Jc({scrollWindow:Mt,scrollDroppable:xt}),Kt=Qc({move:Tt,scrollWindow:Mt,scrollDroppable:xt}),te=function(Qe){if(Qe.phase==="DRAGGING"){if(Qe.movementMode==="FLUID"){Zt.scroll(Qe);return}Qe.scrollJumpRequest&&Kt(Qe)}},se={scroll:te,start:Zt.start,stop:Zt.stop};return se},ul="data-rbd",wl=function(){var vt=ul+"-drag-handle";return{base:vt,draggableId:vt+"-draggable-id",contextId:vt+"-context-id"}}(),qc=function(){var vt=ul+"-draggable";return{base:vt,contextId:vt+"-context-id",id:vt+"-id"}}(),$c=function(){var vt=ul+"-droppable";return{base:vt,contextId:vt+"-context-id",id:vt+"-id"}}(),Za={contextId:ul+"-scroll-container-context-id"},Ch=function(xt){return function(Mt){return"["+Mt+'="'+xt+'"]'}},Eh=function(xt,Mt){return xt.map(function(Tt){var Zt=Tt.styles[Mt];return Zt?Tt.selector+" { "+Zt+" }":""}).join(" ")},Jd="pointer-events: none;",Qd=function(vt){var xt=Ch(vt),Mt=function(){var se=`
cursor: -webkit-grab;
cursor: grab;
`;return{selector:xt(wl.contextId),styles:{always:`
-webkit-touch-callout: none;
-webkit-tap-highlight-color: rgba(0,0,0,0);
touch-action: manipulation;
`,resting:se,dragging:Jd,dropAnimating:se}}}(),Tt=function(){var se=`
transition: `+ds.outOfTheWay+`;
`;return{selector:xt(qc.contextId),styles:{dragging:se,dropAnimating:se,userCancel:se}}}(),Zt={selector:xt($c.contextId),styles:{always:"overflow-anchor: none;"}},Kt={selector:"body",styles:{dragging:`
cursor: grabbing;
cursor: -webkit-grabbing;
user-select: none;
-webkit-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
overflow-anchor: none;
`}},te=[Tt,Mt,Zt,Kt];return{always:Eh(te,"always"),resting:Eh(te,"resting"),dragging:Eh(te,"dragging"),dropAnimating:Eh(te,"dropAnimating"),userCancel:Eh(te,"userCancel")}},ka=typeof window!="undefined"&&typeof window.document!="undefined"&&typeof window.document.createElement!="undefined"?pt.useLayoutEffect:pt.useEffect,bh=function(){var xt=document.querySelector("head");return xt||hn(!1),xt},tf=function(xt){var Mt=document.createElement("style");return xt&&Mt.setAttribute("nonce",xt),Mt.type="text/css",Mt};function ca(vt,xt){var Mt=hi(function(){return Qd(vt)},[vt]),Tt=(0,pt.useRef)(null),Zt=(0,pt.useRef)(null),Kt=Jn(an(function(We){var Ge=Zt.current;Ge||hn(!1),Ge.textContent=We}),[]),te=Jn(function(We){var Ge=Tt.current;Ge||hn(!1),Ge.textContent=We},[]);ka(function(){!Tt.current&&!Zt.current||hn(!1);var We=tf(xt),Ge=tf(xt);return Tt.current=We,Zt.current=Ge,We.setAttribute(ul+"-always",vt),Ge.setAttribute(ul+"-dynamic",vt),bh().appendChild(We),bh().appendChild(Ge),te(Mt.always),Kt(Mt.resting),function(){var rn=function(Ai){var Ti=Ai.current;Ti||hn(!1),bh().removeChild(Ti),Ai.current=null};rn(Tt),rn(Zt)}},[xt,te,Kt,Mt.always,Mt.resting,vt]);var se=Jn(function(){return Kt(Mt.dragging)},[Kt,Mt.dragging]),Oe=Jn(function(We){if(We==="DROP"){Kt(Mt.dropAnimating);return}Kt(Mt.userCancel)},[Kt,Mt.dropAnimating,Mt.userCancel]),Qe=Jn(function(){Zt.current&&Kt(Mt.resting)},[Kt,Mt.resting]),Ke=hi(function(){return{dragging:se,dropping:Oe,resting:Qe}},[se,Oe,Qe]);return Ke}var ad=function(vt){return vt&&vt.ownerDocument?vt.ownerDocument.defaultView:window};function Cl(vt){return vt instanceof ad(vt).HTMLElement}function Yu(vt,xt){var Mt="["+wl.contextId+'="'+vt+'"]',Tt=Wr(document.querySelectorAll(Mt));if(!Tt.length)return null;var Zt=Nr(Tt,function(Kt){return Kt.getAttribute(wl.draggableId)===xt});return!Zt||!Cl(Zt)?null:Zt}function qd(vt){var xt=(0,pt.useRef)({}),Mt=(0,pt.useRef)(null),Tt=(0,pt.useRef)(null),Zt=(0,pt.useRef)(!1),Kt=Jn(function(Ge,rn){var Kn={id:Ge,focus:rn};return xt.current[Ge]=Kn,function(){var Ti=xt.current,Wi=Ti[Ge];Wi!==Kn&&delete Ti[Ge]}},[]),te=Jn(function(Ge){var rn=Yu(vt,Ge);rn&&rn!==document.activeElement&&rn.focus()},[vt]),se=Jn(function(Ge,rn){Mt.current===Ge&&(Mt.current=rn)},[]),Oe=Jn(function(){Tt.current||Zt.current&&(Tt.current=requestAnimationFrame(function(){Tt.current=null;var Ge=Mt.current;Ge&&te(Ge)}))},[te]),Qe=Jn(function(Ge){Mt.current=null;var rn=document.activeElement;rn&&rn.getAttribute(wl.draggableId)===Ge&&(Mt.current=Ge)},[]);ka(function(){return Zt.current=!0,function(){Zt.current=!1;var Ge=Tt.current;Ge&&cancelAnimationFrame(Ge)}},[]);var Ke=hi(function(){return{register:Kt,tryRecordFocus:Qe,tryRestoreFocusRecorded:Oe,tryShiftRecord:se}},[Kt,Qe,Oe,se]);return Ke}function zf(){var vt={draggables:{},droppables:{}},xt=[];function Mt(We){return xt.push(We),function(){var rn=xt.indexOf(We);rn!==-1&&xt.splice(rn,1)}}function Tt(We){xt.length&&xt.forEach(function(Ge){return Ge(We)})}function Zt(We){return vt.draggables[We]||null}function Kt(We){var Ge=Zt(We);return Ge||hn(!1),Ge}var te={register:function(Ge){vt.draggables[Ge.descriptor.id]=Ge,Tt({type:"ADDITION",value:Ge})},update:function(Ge,rn){var Kn=vt.draggables[rn.descriptor.id];Kn&&Kn.uniqueId===Ge.uniqueId&&(delete vt.draggables[rn.descriptor.id],vt.draggables[Ge.descriptor.id]=Ge)},unregister:function(Ge){var rn=Ge.descriptor.id,Kn=Zt(rn);Kn&&Ge.uniqueId===Kn.uniqueId&&(delete vt.draggables[rn],Tt({type:"REMOVAL",value:Ge}))},getById:Kt,findById:Zt,exists:function(Ge){return!!Zt(Ge)},getAllByType:function(Ge){return Fr(vt.draggables).filter(function(rn){return rn.descriptor.type===Ge})}};function se(We){return vt.droppables[We]||null}function Oe(We){var Ge=se(We);return Ge||hn(!1),Ge}var Qe={register:function(Ge){vt.droppables[Ge.descriptor.id]=Ge},unregister:function(Ge){var rn=se(Ge.descriptor.id);rn&&Ge.uniqueId===rn.uniqueId&&delete vt.droppables[Ge.descriptor.id]},getById:Oe,findById:se,exists:function(Ge){return!!se(Ge)},getAllByType:function(Ge){return Fr(vt.droppables).filter(function(rn){return rn.descriptor.type===Ge})}};function Ke(){vt.draggables={},vt.droppables={},xt.length=0}return{draggable:te,droppable:Qe,subscribe:Mt,clean:Ke}}function sd(){var vt=hi(zf,[]);return(0,pt.useEffect)(function(){return function(){requestAnimationFrame(vt.clean)}},[vt]),vt}var ef=pt.createContext(null),jl=function(){var vt=document.body;return vt||hn(!1),vt},hl={position:"absolute",width:"1px",height:"1px",margin:"-1px",border:"0",padding:"0",overflow:"hidden",clip:"rect(0 0 0 0)","clip-path":"inset(100%)"},Vg=function(xt){return"rbd-announcement-"+xt};function Gf(vt){var xt=hi(function(){return Vg(vt)},[vt]),Mt=(0,pt.useRef)(null);(0,pt.useEffect)(function(){var Kt=document.createElement("div");return Mt.current=Kt,Kt.id=xt,Kt.setAttribute("aria-live","assertive"),Kt.setAttribute("aria-atomic","true"),(0,Me.Z)(Kt.style,hl),jl().appendChild(Kt),function(){setTimeout(function(){var Oe=jl();Oe.contains(Kt)&&Oe.removeChild(Kt),Kt===Mt.current&&(Mt.current=null)})}},[xt]);var Tt=Jn(function(Zt){var Kt=Mt.current;if(Kt){Kt.textContent=Zt;return}},[]);return Tt}var Xu=0,ld={separator:"::"};function qo(){Xu=0}function zl(vt,xt){return xt===void 0&&(xt=ld),hi(function(){return""+vt+xt.separator+Xu++},[xt.separator,vt])}function Ug(vt){var xt=vt.contextId,Mt=vt.uniqueId;return"rbd-hidden-text-"+xt+"-"+Mt}function nf(vt){var xt=vt.contextId,Mt=vt.text,Tt=zl("hidden-text",{separator:"-"}),Zt=hi(function(){return Ug({contextId:xt,uniqueId:Tt})},[Tt,xt]);return(0,pt.useEffect)(function(){var te=document.createElement("div");return te.id=Zt,te.textContent=Mt,te.style.display="none",jl().appendChild(te),function(){var Oe=jl();Oe.contains(te)&&Oe.removeChild(te)}},[Zt,Mt]),Zt}var $d=pt.createContext(null),Be={react:"^16.8.5","react-dom":"^16.8.5"},Lh=/(\d+)\.(\d+)\.(\d+)/,Gl=function(xt){var Mt=Lh.exec(xt);Mt==null&&hn(!1);var Tt=Number(Mt[1]),Zt=Number(Mt[2]),Kt=Number(Mt[3]);return{major:Tt,minor:Zt,patch:Kt,raw:xt}},Kg=function(xt,Mt){return Mt.major>xt.major?!0:Mt.major<xt.major?!1:Mt.minor>xt.minor?!0:Mt.minor<xt.minor?!1:Mt.patch>=xt.patch},Hf=function(vt,xt){var Mt=Gl(vt),Tt=Gl(xt);Kg(Mt,Tt)},Gp=`
We expect a html5 doctype: <!doctype html>
This is to ensure consistent browser layout and measurement
More information: https://github.com/atlassian/react-beautiful-dnd/blob/master/docs/guides/doctype.md
`,Wf=function(vt){var xt=vt.doctype;xt&&(xt.name.toLowerCase(),xt.publicId)};function Rm(vt){}function Sa(vt,xt){}function tc(){Sa(function(){Hf(Be.react,pt.version),Wf(document)},[])}function ec(vt){var xt=(0,pt.useRef)(vt);return(0,pt.useEffect)(function(){xt.current=vt}),xt}function Zg(){var vt=null;function xt(){return!!vt}function Mt(te){return te===vt}function Tt(te){vt&&hn(!1);var se={abandon:te};return vt=se,se}function Zt(){vt||hn(!1),vt=null}function Kt(){vt&&(vt.abandon(),Zt())}return{isClaimed:xt,isActive:Mt,claim:Tt,release:Zt,tryAbandon:Kt}}var Yg=9,Xg=13,rf=27,of=32,Js=33,ud=34,Vf=35,ru=36,nc=37,af=38,ic=39,Hs=40,hd,Uf=(hd={},hd[Xg]=!0,hd[Yg]=!0,hd),Qs=function(vt){Uf[vt.keyCode]&&vt.preventDefault()},bu=function(){var vt="visibilitychange";if(typeof document=="undefined")return vt;var xt=[vt,"ms"+vt,"webkit"+vt,"moz"+vt,"o"+vt],Mt=Nr(xt,function(Tt){return"on"+Tt in document});return Mt||vt}(),sf=0,Kf=5;function Mh(vt,xt){return Math.abs(xt.x-vt.x)>=Kf||Math.abs(xt.y-vt.y)>=Kf}var Ms={type:"IDLE"};function Zf(vt){var xt=vt.cancel,Mt=vt.completed,Tt=vt.getPhase,Zt=vt.setPhase;return[{eventName:"mousemove",fn:function(te){var se=te.button,Oe=te.clientX,Qe=te.clientY;if(se===sf){var Ke={x:Oe,y:Qe},We=Tt();if(We.type==="DRAGGING"){te.preventDefault(),We.actions.move(Ke);return}We.type!=="PENDING"&&hn(!1);var Ge=We.point;if(Mh(Ge,Ke)){te.preventDefault();var rn=We.actions.fluidLift(Ke);Zt({type:"DRAGGING",actions:rn})}}}},{eventName:"mouseup",fn:function(te){var se=Tt();if(se.type!=="DRAGGING"){xt();return}te.preventDefault(),se.actions.drop({shouldBlockNextClick:!0}),Mt()}},{eventName:"mousedown",fn:function(te){Tt().type==="DRAGGING"&&te.preventDefault(),xt()}},{eventName:"keydown",fn:function(te){var se=Tt();if(se.type==="PENDING"){xt();return}if(te.keyCode===rf){te.preventDefault(),xt();return}Qs(te)}},{eventName:"resize",fn:xt},{eventName:"scroll",options:{passive:!0,capture:!1},fn:function(){Tt().type==="PENDING"&&xt()}},{eventName:"webkitmouseforcedown",fn:function(te){var se=Tt();if(se.type==="IDLE"&&hn(!1),se.actions.shouldRespectForcePress()){xt();return}te.preventDefault()}},{eventName:bu,fn:xt}]}function fa(vt){var xt=(0,pt.useRef)(Ms),Mt=(0,pt.useRef)(pe),Tt=hi(function(){return{eventName:"mousedown",fn:function(We){if(!We.defaultPrevented&&We.button===sf&&!(We.ctrlKey||We.metaKey||We.shiftKey||We.altKey)){var Ge=vt.findClosestDraggableId(We);if(Ge){var rn=vt.tryGetLock(Ge,te,{sourceEvent:We});if(rn){We.preventDefault();var Kn={x:We.clientX,y:We.clientY};Mt.current(),Qe(rn,Kn)}}}}}},[vt]),Zt=hi(function(){return{eventName:"webkitmouseforcewillbegin",fn:function(We){if(!We.defaultPrevented){var Ge=vt.findClosestDraggableId(We);if(Ge){var rn=vt.findOptionsForDraggable(Ge);rn&&(rn.shouldRespectForcePress||vt.canGetLock(Ge)&&We.preventDefault())}}}}},[vt]),Kt=Jn(function(){var We={passive:!1,capture:!0};Mt.current=gi(window,[Zt,Tt],We)},[Zt,Tt]),te=Jn(function(){var Ke=xt.current;Ke.type!=="IDLE"&&(xt.current=Ms,Mt.current(),Kt())},[Kt]),se=Jn(function(){var Ke=xt.current;te(),Ke.type==="DRAGGING"&&Ke.actions.cancel({shouldBlockNextClick:!0}),Ke.type==="PENDING"&&Ke.actions.abort()},[te]),Oe=Jn(function(){var We={capture:!0,passive:!1},Ge=Zf({cancel:se,completed:te,getPhase:function(){return xt.current},setPhase:function(Kn){xt.current=Kn}});Mt.current=gi(window,Ge,We)},[se,te]),Qe=Jn(function(We,Ge){xt.current.type!=="IDLE"&&hn(!1),xt.current={type:"PENDING",point:Ge,actions:We},Oe()},[Oe]);ka(function(){return Kt(),function(){Mt.current()}},[Kt])}var ou;function lf(){}var _u=(ou={},ou[ud]=!0,ou[Js]=!0,ou[ru]=!0,ou[Vf]=!0,ou);function dd(vt,xt){function Mt(){xt(),vt.cancel()}function Tt(){xt(),vt.drop()}return[{eventName:"keydown",fn:function(Kt){if(Kt.keyCode===rf){Kt.preventDefault(),Mt();return}if(Kt.keyCode===of){Kt.preventDefault(),Tt();return}if(Kt.keyCode===Hs){Kt.preventDefault(),vt.moveDown();return}if(Kt.keyCode===af){Kt.preventDefault(),vt.moveUp();return}if(Kt.keyCode===ic){Kt.preventDefault(),vt.moveRight();return}if(Kt.keyCode===nc){Kt.preventDefault(),vt.moveLeft();return}if(_u[Kt.keyCode]){Kt.preventDefault();return}Qs(Kt)}},{eventName:"mousedown",fn:Mt},{eventName:"mouseup",fn:Mt},{eventName:"click",fn:Mt},{eventName:"touchstart",fn:Mt},{eventName:"resize",fn:Mt},{eventName:"wheel",fn:Mt,options:{passive:!0}},{eventName:bu,fn:Mt}]}function cd(vt){var xt=(0,pt.useRef)(lf),Mt=hi(function(){return{eventName:"keydown",fn:function(Kt){if(Kt.defaultPrevented||Kt.keyCode!==of)return;var te=vt.findClosestDraggableId(Kt);if(!te)return;var se=vt.tryGetLock(te,Ke,{sourceEvent:Kt});if(!se)return;Kt.preventDefault();var Oe=!0,Qe=se.snapLift();xt.current();function Ke(){Oe||hn(!1),Oe=!1,xt.current(),Tt()}xt.current=gi(window,dd(Qe,Ke),{capture:!0,passive:!1})}}},[vt]),Tt=Jn(function(){var Kt={passive:!1,capture:!0};xt.current=gi(window,[Mt],Kt)},[Mt]);ka(function(){return Tt(),function(){xt.current()}},[Tt])}var rc={type:"IDLE"},fd=120,Yf=.15;function au(vt){var xt=vt.cancel,Mt=vt.getPhase;return[{eventName:"orientationchange",fn:xt},{eventName:"resize",fn:xt},{eventName:"contextmenu",fn:function(Zt){Zt.preventDefault()}},{eventName:"keydown",fn:function(Zt){if(Mt().type!=="DRAGGING"){xt();return}Zt.keyCode===rf&&Zt.preventDefault(),xt()}},{eventName:bu,fn:xt}]}function Ah(vt){var xt=vt.cancel,Mt=vt.completed,Tt=vt.getPhase;return[{eventName:"touchmove",options:{capture:!1},fn:function(Kt){var te=Tt();if(te.type!=="DRAGGING"){xt();return}te.hasMoved=!0;var se=Kt.touches[0],Oe=se.clientX,Qe=se.clientY,Ke={x:Oe,y:Qe};Kt.preventDefault(),te.actions.move(Ke)}},{eventName:"touchend",fn:function(Kt){var te=Tt();if(te.type!=="DRAGGING"){xt();return}Kt.preventDefault(),te.actions.drop({shouldBlockNextClick:!0}),Mt()}},{eventName:"touchcancel",fn:function(Kt){if(Tt().type!=="DRAGGING"){xt();return}Kt.preventDefault(),xt()}},{eventName:"touchforcechange",fn:function(Kt){var te=Tt();te.type==="IDLE"&&hn(!1);var se=Kt.touches[0];if(se){var Oe=se.force>=Yf;if(Oe){var Qe=te.actions.shouldRespectForcePress();if(te.type==="PENDING"){Qe&&xt();return}if(Qe){if(te.hasMoved){Kt.preventDefault();return}xt();return}Kt.preventDefault()}}}},{eventName:bu,fn:xt}]}function uf(vt){var xt=(0,pt.useRef)(rc),Mt=(0,pt.useRef)(pe),Tt=Jn(function(){return xt.current},[]),Zt=Jn(function(rn){xt.current=rn},[]),Kt=hi(function(){return{eventName:"touchstart",fn:function(rn){if(!rn.defaultPrevented){var Kn=vt.findClosestDraggableId(rn);if(Kn){var Ai=vt.tryGetLock(Kn,se,{sourceEvent:rn});if(Ai){var Ti=rn.touches[0],Wi=Ti.clientX,qi=Ti.clientY,ur={x:Wi,y:qi};Mt.current(),We(Ai,ur)}}}}}},[vt]),te=Jn(function(){var rn={capture:!0,passive:!1};Mt.current=gi(window,[Kt],rn)},[Kt]),se=Jn(function(){var Ge=xt.current;Ge.type!=="IDLE"&&(Ge.type==="PENDING"&&clearTimeout(Ge.longPressTimerId),Zt(rc),Mt.current(),te())},[te,Zt]),Oe=Jn(function(){var Ge=xt.current;se(),Ge.type==="DRAGGING"&&Ge.actions.cancel({shouldBlockNextClick:!0}),Ge.type==="PENDING"&&Ge.actions.abort()},[se]),Qe=Jn(function(){var rn={capture:!0,passive:!1},Kn={cancel:Oe,completed:se,getPhase:Tt},Ai=gi(window,Ah(Kn),rn),Ti=gi(window,au(Kn),rn);Mt.current=function(){Ai(),Ti()}},[Oe,Tt,se]),Ke=Jn(function(){var rn=Tt();rn.type!=="PENDING"&&hn(!1);var Kn=rn.actions.fluidLift(rn.point);Zt({type:"DRAGGING",actions:Kn,hasMoved:!1})},[Tt,Zt]),We=Jn(function(rn,Kn){Tt().type!=="IDLE"&&hn(!1);var Ai=setTimeout(Ke,fd);Zt({type:"PENDING",point:Kn,actions:rn,longPressTimerId:Ai}),Qe()},[Qe,Tt,Zt,Ke]);ka(function(){return te(),function(){Mt.current();var Kn=Tt();Kn.type==="PENDING"&&(clearTimeout(Kn.longPressTimerId),Zt(rc))}},[Tt,te,Zt]),ka(function(){var rn=gi(window,[{eventName:"touchmove",fn:function(){},options:{capture:!1,passive:!1}}]);return rn},[])}function hf(vt){}var df={input:!0,button:!0,textarea:!0,select:!0,option:!0,optgroup:!0,video:!0,audio:!0};function Ju(vt,xt){if(xt==null)return!1;var Mt=!!df[xt.tagName.toLowerCase()];if(Mt)return!0;var Tt=xt.getAttribute("contenteditable");return Tt==="true"||Tt===""?!0:xt===vt?!1:Ju(vt,xt.parentElement)}function Xf(vt,xt){var Mt=xt.target;return Cl(Mt)?Ju(vt,Mt):!1}var _f=function(vt){return sr(vt.getBoundingClientRect()).center};function Jf(vt){return vt instanceof ad(vt).Element}var Hl=function(){var vt="matches";if(typeof document=="undefined")return vt;var xt=[vt,"msMatchesSelector","webkitMatchesSelector"],Mt=Nr(xt,function(Tt){return Tt in Element.prototype});return Mt||vt}();function Qf(vt,xt){return vt==null?null:vt[Hl](xt)?vt:Qf(vt.parentElement,xt)}function qf(vt,xt){return vt.closest?vt.closest(xt):Qf(vt,xt)}function gd(vt){return"["+wl.contextId+'="'+vt+'"]'}function Fh(vt,xt){var Mt=xt.target;if(!Jf(Mt))return null;var Tt=gd(vt),Zt=qf(Mt,Tt);return!Zt||!Cl(Zt)?null:Zt}function $f(vt,xt){var Mt=Fh(vt,xt);return Mt?Mt.getAttribute(wl.draggableId):null}function Wl(vt,xt){var Mt="["+qc.contextId+'="'+vt+'"]',Tt=Wr(document.querySelectorAll(Mt)),Zt=Nr(Tt,function(Kt){return Kt.getAttribute(qc.id)===xt});return!Zt||!Cl(Zt)?null:Zt}function tg(vt){vt.preventDefault()}function Bh(vt){var xt=vt.expected,Mt=vt.phase,Tt=vt.isLockActive,Zt=vt.shouldWarn;return!(!Tt()||xt!==Mt)}function eg(vt){var xt=vt.lockAPI,Mt=vt.store,Tt=vt.registry,Zt=vt.draggableId;if(xt.isClaimed())return!1;var Kt=Tt.draggable.findById(Zt);return!(!Kt||!Kt.options.isEnabled||!sl(Mt.getState(),Zt))}function ng(vt){var xt=vt.lockAPI,Mt=vt.contextId,Tt=vt.store,Zt=vt.registry,Kt=vt.draggableId,te=vt.forceSensorStop,se=vt.sourceEvent,Oe=eg({lockAPI:xt,store:Tt,registry:Zt,draggableId:Kt});if(!Oe)return null;var Qe=Zt.draggable.getById(Kt),Ke=Wl(Mt,Qe.descriptor.id);if(!Ke||se&&!Qe.options.canDragInteractiveElements&&Xf(Ke,se))return null;var We=xt.claim(te||pe),Ge="PRE_DRAG";function rn(){return Qe.options.shouldRespectForcePress}function Kn(){return xt.isActive(We)}function Ai($r,So){Bh({expected:$r,phase:Ge,isLockActive:Kn,shouldWarn:!0})&&Tt.dispatch(So())}var Ti=Ai.bind(null,"DRAGGING");function Wi($r){function So(){xt.release(),Ge="COMPLETED"}Ge!=="PRE_DRAG"&&(So(),Ge!=="PRE_DRAG"&&hn(!1)),Tt.dispatch(Bo($r.liftActionArgs)),Ge="DRAGGING";function La(po,xa){if(xa===void 0&&(xa={shouldBlockNextClick:!1}),$r.cleanup(),xa.shouldBlockNextClick){var gs=gi(window,[{eventName:"click",fn:tg,options:{once:!0,passive:!1,capture:!0}}]);setTimeout(gs)}So(),Tt.dispatch(td({reason:po}))}return(0,Me.Z)({isActive:function(){return Bh({expected:"DRAGGING",phase:Ge,isLockActive:Kn,shouldWarn:!1})},shouldRespectForcePress:rn,drop:function(xa){return La("DROP",xa)},cancel:function(xa){return La("CANCEL",xa)}},$r.actions)}function qi($r){var So=be(function(po){Ti(function(){return Eo({client:po})})}),La=Wi({liftActionArgs:{id:Kt,clientSelection:$r,movementMode:"FLUID"},cleanup:function(){return So.cancel()},actions:{move:So}});return(0,Me.Z)({},La,{move:So})}function ur(){var $r={moveUp:function(){return Ti(so)},moveRight:function(){return Ti(fr)},moveDown:function(){return Ti(ph)},moveLeft:function(){return Ti(Og)}};return Wi({liftActionArgs:{id:Kt,clientSelection:_f(Ke),movementMode:"SNAP"},cleanup:pe,actions:$r})}function ar(){var $r=Bh({expected:"PRE_DRAG",phase:Ge,isLockActive:Kn,shouldWarn:!0});$r&&xt.release()}var Tr={isActive:function(){return Bh({expected:"PRE_DRAG",phase:Ge,isLockActive:Kn,shouldWarn:!1})},shouldRespectForcePress:rn,fluidLift:qi,snapLift:ur,abort:ar};return Tr}var ig=[fa,cd,uf];function Hp(vt){var xt=vt.contextId,Mt=vt.store,Tt=vt.registry,Zt=vt.customSensors,Kt=vt.enableDefaultSensors,te=[].concat(Kt?ig:[],Zt||[]),se=(0,pt.useState)(function(){return Zg()})[0],Oe=Jn(function(qi,ur){qi.isDragging&&!ur.isDragging&&se.tryAbandon()},[se]);ka(function(){var qi=Mt.getState(),ur=Mt.subscribe(function(){var ar=Mt.getState();Oe(qi,ar),qi=ar});return ur},[se,Mt,Oe]),ka(function(){return se.tryAbandon},[se.tryAbandon]);var Qe=Jn(function(Wi){return eg({lockAPI:se,registry:Tt,store:Mt,draggableId:Wi})},[se,Tt,Mt]),Ke=Jn(function(Wi,qi,ur){return ng({lockAPI:se,registry:Tt,contextId:xt,store:Mt,draggableId:Wi,forceSensorStop:qi,sourceEvent:ur&&ur.sourceEvent?ur.sourceEvent:null})},[xt,se,Tt,Mt]),We=Jn(function(Wi){return $f(xt,Wi)},[xt]),Ge=Jn(function(Wi){var qi=Tt.draggable.findById(Wi);return qi?qi.options:null},[Tt.draggable]),rn=Jn(function(){se.isClaimed()&&(se.tryAbandon(),Mt.getState().phase!=="IDLE"&&Mt.dispatch(qr()))},[se,Mt]),Kn=Jn(se.isClaimed,[se]),Ai=hi(function(){return{canGetLock:Qe,tryGetLock:Ke,findClosestDraggableId:We,findOptionsForDraggable:Ge,tryReleaseLock:rn,isLockClaimed:Kn}},[Qe,Ke,We,Ge,rn,Kn]);hf(te);for(var Ti=0;Ti<te.length;Ti++)te[Ti](Ai)}var _g=function(xt){return{onBeforeCapture:xt.onBeforeCapture,onBeforeDragStart:xt.onBeforeDragStart,onDragStart:xt.onDragStart,onDragEnd:xt.onDragEnd,onDragUpdate:xt.onDragUpdate}};function Qu(vt){return vt.current||hn(!1),vt.current}function cf(vt){var xt=vt.contextId,Mt=vt.setCallbacks,Tt=vt.sensors,Zt=vt.nonce,Kt=vt.dragHandleUsageInstructions,te=(0,pt.useRef)(null);tc();var se=ec(vt),Oe=Jn(function(){return _g(se.current)},[se]),Qe=Gf(xt),Ke=nf({contextId:xt,text:Kt}),We=ca(xt,Zt),Ge=Jn(function(po){Qu(te).dispatch(po)},[]),rn=hi(function(){return(0,Pe.DE)({publishWhileDragging:Fa,updateDroppableScroll:oo,updateDroppableIsEnabled:hs,updateDroppableIsCombineEnabled:io,collectionStarting:Ou},Ge)},[Ge]),Kn=sd(),Ai=hi(function(){return Ao(Kn,rn)},[Kn,rn]),Ti=hi(function(){return Wg((0,Me.Z)({scrollWindow:Eu,scrollDroppable:Ai.scrollDroppable},(0,Pe.DE)({move:Eo},Ge)))},[Ai.scrollDroppable,Ge]),Wi=qd(xt),qi=hi(function(){return vh({announce:Qe,autoScroller:Ti,dimensionMarshal:Ai,focusMarshal:Wi,getResponders:Oe,styleMarshal:We})},[Qe,Ti,Ai,Wi,Oe,We]);te.current=qi;var ur=Jn(function(){var po=Qu(te),xa=po.getState();xa.phase!=="IDLE"&&po.dispatch(qr())},[]),ar=Jn(function(){var po=Qu(te).getState();return po.isDragging||po.phase==="DROP_ANIMATING"},[]),Tr=hi(function(){return{isDragging:ar,tryAbort:ur}},[ar,ur]);Mt(Tr);var $r=Jn(function(po){return sl(Qu(te).getState(),po)},[]),So=Jn(function(){return ql(Qu(te).getState())},[]),La=hi(function(){return{marshal:Ai,focus:Wi,contextId:xt,canLift:$r,isMovementAllowed:So,dragHandleUsageInstructionsId:Ke,registry:Kn}},[xt,Ai,Ke,Wi,$r,So,Kn]);return Hp({contextId:xt,store:qi,registry:Kn,customSensors:Tt,enableDefaultSensors:vt.enableDefaultSensors!==!1}),(0,pt.useEffect)(function(){return ur},[ur]),pt.createElement($d.Provider,{value:La},pt.createElement(ht,{context:ef,store:qi},vt.children))}var oc=0;function Jg(){oc=0}function ff(){return hi(function(){return""+oc++},[])}function kh(){Jg(),qo()}function rg(vt){var xt=ff(),Mt=vt.dragHandleUsageInstructions||to.dragHandleUsageInstructions;return pt.createElement(Ji,null,function(Tt){return pt.createElement(cf,{nonce:vt.nonce,contextId:xt,setCallbacks:Tt,dragHandleUsageInstructions:Mt,enableDefaultSensors:vt.enableDefaultSensors,sensors:vt.sensors,onBeforeCapture:vt.onBeforeCapture,onBeforeDragStart:vt.onBeforeDragStart,onDragStart:vt.onDragStart,onDragUpdate:vt.onDragUpdate,onDragEnd:vt.onDragEnd},vt.children)})}var Nh=function(xt){return function(Mt){return xt===Mt}},Qg=Nh("scroll"),gf=Nh("auto"),qg=Nh("visible"),co=function(xt,Mt){return Mt(xt.overflowX)||Mt(xt.overflowY)},pd=function(xt,Mt){return Mt(xt.overflowX)&&Mt(xt.overflowY)},qu=function(xt){var Mt=window.getComputedStyle(xt),Tt={overflowX:Mt.overflowX,overflowY:Mt.overflowY};return co(Tt,Qg)||co(Tt,gf)},Na=function(){return!1;var xt,Mt,Tt,Zt},fs=function vt(xt){return xt==null?null:xt===document.body?Na()?xt:null:xt===document.documentElement?null:qu(xt)?xt:vt(xt.parentElement)},md=function(vt){if(vt)var xt=fs(vt.parentElement)},Dh=function(vt){return{x:vt.scrollLeft,y:vt.scrollTop}},og=function vt(xt){if(!xt)return!1;var Mt=window.getComputedStyle(xt);return Mt.position==="fixed"?!0:vt(xt.parentElement)},ag=function(vt){var xt=fs(vt),Mt=og(vt);return{closestScrollable:xt,isFixedOnPage:Mt}},sg=function(vt){var xt=vt.descriptor,Mt=vt.isEnabled,Tt=vt.isCombineEnabled,Zt=vt.isFixedOnPage,Kt=vt.direction,te=vt.client,se=vt.page,Oe=vt.closest,Qe=function(){if(!Oe)return null;var rn=Oe.scrollSize,Kn=Oe.client,Ai=Ls({scrollHeight:rn.scrollHeight,scrollWidth:rn.scrollWidth,height:Kn.paddingBox.height,width:Kn.paddingBox.width});return{pageMarginBox:Oe.page.marginBox,frameClient:Kn,scrollSize:rn,shouldClipSubject:Oe.shouldClipSubject,scroll:{initial:Oe.scroll,current:Oe.scroll,max:Ai,diff:{value:Qi,displacement:Qi}}}}(),Ke=Kt==="vertical"?Re:Nn,We=Gr({page:se,withPlaceholder:null,axis:Ke,frame:Qe}),Ge={descriptor:xt,isCombineEnabled:Tt,isFixedOnPage:Zt,axis:Ke,isEnabled:Mt,client:te,page:se,frame:Qe,subject:We};return Ge},lg=function(xt,Mt){var Tt=Ci(xt);if(!Mt||xt!==Mt)return Tt;var Zt=Tt.paddingBox.top-Mt.scrollTop,Kt=Tt.paddingBox.left-Mt.scrollLeft,te=Zt+Mt.scrollHeight,se=Kt+Mt.scrollWidth,Oe={top:Zt,right:se,bottom:te,left:Kt},Qe=kr(Oe,Tt.border),Ke=Mr({borderBox:Qe,margin:Tt.margin,border:Tt.border,padding:Tt.padding});return Ke},ug=function(vt){var xt=vt.ref,Mt=vt.descriptor,Tt=vt.env,Zt=vt.windowScroll,Kt=vt.direction,te=vt.isDropDisabled,se=vt.isCombineEnabled,Oe=vt.shouldClipSubject,Qe=Tt.closestScrollable,Ke=lg(xt,Qe),We=Ct(Ke,Zt),Ge=function(){if(!Qe)return null;var Kn=Ci(Qe),Ai={scrollHeight:Qe.scrollHeight,scrollWidth:Qe.scrollWidth};return{client:Kn,page:Ct(Kn,Zt),scroll:Dh(Qe),scrollSize:Ai,shouldClipSubject:Oe}}(),rn=sg({descriptor:Mt,isEnabled:!te,isCombineEnabled:se,isFixedOnPage:Tt.isFixedOnPage,direction:Kt,client:Ke,page:We,closest:Ge});return rn},$u={passive:!1},ac={passive:!0},Lu=function(vt){return vt.shouldPublishImmediately?$u:ac};function bo(vt){var xt=(0,pt.useContext)(vt);return xt||hn(!1),xt}var Th=function(xt){return xt&&xt.env.closestScrollable||null};function hg(vt){var xt=(0,pt.useRef)(null),Mt=bo($d),Tt=zl("droppable"),Zt=Mt.registry,Kt=Mt.marshal,te=ec(vt),se=hi(function(){return{id:vt.droppableId,type:vt.type,mode:vt.mode}},[vt.droppableId,vt.mode,vt.type]),Oe=(0,pt.useRef)(se),Qe=hi(function(){return an(function(ar,Tr){xt.current||hn(!1);var $r={x:ar,y:Tr};Kt.updateDroppableScroll(se.id,$r)})},[se.id,Kt]),Ke=Jn(function(){var ar=xt.current;return!ar||!ar.env.closestScrollable?Qi:Dh(ar.env.closestScrollable)},[]),We=Jn(function(){var ar=Ke();Qe(ar.x,ar.y)},[Ke,Qe]),Ge=hi(function(){return be(We)},[We]),rn=Jn(function(){var ar=xt.current,Tr=Th(ar);ar&&Tr||hn(!1);var $r=ar.scrollOptions;if($r.shouldPublishImmediately){We();return}Ge()},[Ge,We]),Kn=Jn(function(ar,Tr){xt.current&&hn(!1);var $r=te.current,So=$r.getDroppableRef();So||hn(!1);var La=ag(So),po={ref:So,descriptor:se,env:La,scrollOptions:Tr};xt.current=po;var xa=ug({ref:So,descriptor:se,env:La,windowScroll:ar,direction:$r.direction,isDropDisabled:$r.isDropDisabled,isCombineEnabled:$r.isCombineEnabled,shouldClipSubject:!$r.ignoreContainerClipping}),gs=La.closestScrollable;return gs&&(gs.setAttribute(Za.contextId,Mt.contextId),gs.addEventListener("scroll",rn,Lu(po.scrollOptions))),xa},[Mt.contextId,se,rn,te]),Ai=Jn(function(){var ar=xt.current,Tr=Th(ar);return ar&&Tr||hn(!1),Dh(Tr)},[]),Ti=Jn(function(){var ar=xt.current;ar||hn(!1);var Tr=Th(ar);xt.current=null,Tr&&(Ge.cancel(),Tr.removeAttribute(Za.contextId),Tr.removeEventListener("scroll",rn,Lu(ar.scrollOptions)))},[rn,Ge]),Wi=Jn(function(ar){var Tr=xt.current;Tr||hn(!1);var $r=Th(Tr);$r||hn(!1),$r.scrollTop+=ar.y,$r.scrollLeft+=ar.x},[]),qi=hi(function(){return{getDimensionAndWatchScroll:Kn,getScrollWhileDragging:Ai,dragStopped:Ti,scroll:Wi}},[Ti,Kn,Ai,Wi]),ur=hi(function(){return{uniqueId:Tt,descriptor:se,callbacks:qi}},[qi,se,Tt]);ka(function(){return Oe.current=ur.descriptor,Zt.droppable.register(ur),function(){xt.current&&Ti(),Zt.droppable.unregister(ur)}},[qi,se,Ti,ur,Kt,Zt.droppable]),ka(function(){xt.current&&Kt.updateDroppableIsEnabled(Oe.current.id,!vt.isDropDisabled)},[vt.isDropDisabled,Kt]),ka(function(){xt.current&&Kt.updateDroppableIsCombineEnabled(Oe.current.id,vt.isCombineEnabled)},[vt.isCombineEnabled,Kt])}function th(){}var Ih={width:0,height:0,margin:yn},sc=function(xt){var Mt=xt.isAnimatingOpenOnMount,Tt=xt.placeholder,Zt=xt.animate;return Mt||Zt==="close"?Ih:{height:Tt.client.borderBox.height,width:Tt.client.borderBox.width,margin:Tt.client.margin}},$g=function(xt){var Mt=xt.isAnimatingOpenOnMount,Tt=xt.placeholder,Zt=xt.animate,Kt=sc({isAnimatingOpenOnMount:Mt,placeholder:Tt,animate:Zt});return{display:Tt.display,boxSizing:"border-box",width:Kt.width,height:Kt.height,marginTop:Kt.margin.top,marginRight:Kt.margin.right,marginBottom:Kt.margin.bottom,marginLeft:Kt.margin.left,flexShrink:"0",flexGrow:"0",pointerEvents:"none",transition:Zt!=="none"?ds.placeholder:null}};function Ca(vt){var xt=(0,pt.useRef)(null),Mt=Jn(function(){xt.current&&(clearTimeout(xt.current),xt.current=null)},[]),Tt=vt.animate,Zt=vt.onTransitionEnd,Kt=vt.onClose,te=vt.contextId,se=(0,pt.useState)(vt.animate==="open"),Oe=se[0],Qe=se[1];(0,pt.useEffect)(function(){return Oe?Tt!=="open"?(Mt(),Qe(!1),th):xt.current?th:(xt.current=setTimeout(function(){xt.current=null,Qe(!1)}),Mt):th},[Tt,Oe,Mt]);var Ke=Jn(function(Ge){Ge.propertyName==="height"&&(Zt(),Tt==="close"&&Kt())},[Tt,Kt,Zt]),We=$g({isAnimatingOpenOnMount:Oe,animate:vt.animate,placeholder:vt.placeholder});return pt.createElement(vt.placeholder.tagName,{style:We,"data-rbd-placeholder-context-id":te,onTransitionEnd:Ke,ref:vt.innerRef})}var tp=pt.memo(Ca),eh=pt.createContext(null);function su(vt){vt&&Cl(vt)||hn(!1)}function Oh(vt){return typeof vt=="boolean"}function it(vt,xt){xt.forEach(function(Mt){return Mt(vt)})}var at=[function(xt){var Mt=xt.props;Mt.droppableId||hn(!1),typeof Mt.droppableId!="string"&&hn(!1)},function(xt){var Mt=xt.props;Oh(Mt.isDropDisabled)||hn(!1),Oh(Mt.isCombineEnabled)||hn(!1),Oh(Mt.ignoreContainerClipping)||hn(!1)},function(xt){var Mt=xt.getDroppableRef;su(Mt())}],ct=[function(xt){var Mt=xt.props,Tt=xt.getPlaceholderRef;if(Mt.placeholder)var Zt=Tt()}],dt=[function(xt){var Mt=xt.props;Mt.renderClone||hn(!1)},function(xt){var Mt=xt.getPlaceholderRef;Mt()&&hn(!1)}];function mt(vt){Sa(function(){it(vt,at),vt.props.mode==="standard"&&it(vt,ct),vt.props.mode==="virtual"&&it(vt,dt)})}var At=function(vt){ve(xt,vt);function xt(){for(var Tt,Zt=arguments.length,Kt=new Array(Zt),te=0;te<Zt;te++)Kt[te]=arguments[te];return Tt=vt.call.apply(vt,[this].concat(Kt))||this,Tt.state={isVisible:!!Tt.props.on,data:Tt.props.on,animate:Tt.props.shouldAnimate&&Tt.props.on?"open":"none"},Tt.onClose=function(){Tt.state.animate==="close"&&Tt.setState({isVisible:!1})},Tt}xt.getDerivedStateFromProps=function(Zt,Kt){return Zt.shouldAnimate?Zt.on?{isVisible:!0,data:Zt.on,animate:"open"}:Kt.isVisible?{isVisible:!0,data:Kt.data,animate:"close"}:{isVisible:!1,animate:"close",data:null}:{isVisible:!!Zt.on,data:Zt.on,animate:"none"}};var Mt=xt.prototype;return Mt.render=function(){if(!this.state.isVisible)return null;var Zt={onClose:this.onClose,data:this.state.data,animate:this.state.animate};return this.props.children(Zt)},xt}(pt.PureComponent),Ot={dragging:5e3,dropAnimating:4500},Ut=function(xt,Mt){return Mt?ds.drop(Mt.duration):xt?ds.snap:ds.fluid},Wt=function(xt,Mt){return xt?Mt?Ol.opacity.drop:Ol.opacity.combining:null},oe=function(xt){return xt.forceShouldAnimate!=null?xt.forceShouldAnimate:xt.mode==="SNAP"};function Ve(vt){var xt=vt.dimension,Mt=xt.client,Tt=vt.offset,Zt=vt.combineWith,Kt=vt.dropping,te=!!Zt,se=oe(vt),Oe=!!Kt,Qe=Oe?al.drop(Tt,te):al.moveTo(Tt),Ke={position:"fixed",top:Mt.marginBox.top,left:Mt.marginBox.left,boxSizing:"border-box",width:Mt.borderBox.width,height:Mt.borderBox.height,transition:Ut(se,Kt),transform:Qe,opacity:Wt(te,Oe),zIndex:Oe?Ot.dropAnimating:Ot.dragging,pointerEvents:"none"};return Ke}function fe(vt){return{transform:al.moveTo(vt.offset),transition:vt.shouldAnimateDisplacement?null:"none"}}function dn(vt){return vt.type==="DRAGGING"?Ve(vt):fe(vt)}function on(vt,xt,Mt){Mt===void 0&&(Mt=Qi);var Tt=window.getComputedStyle(xt),Zt=xt.getBoundingClientRect(),Kt=zi(Zt,Tt),te=Ct(Kt,Mt),se={client:Kt,tagName:xt.tagName.toLowerCase(),display:Tt.display},Oe={x:Kt.marginBox.width,y:Kt.marginBox.height},Qe={descriptor:vt,placeholder:se,displaceBy:Oe,client:Kt,page:te};return Qe}function ai(vt){var xt=zl("draggable"),Mt=vt.descriptor,Tt=vt.registry,Zt=vt.getDraggableRef,Kt=vt.canDragInteractiveElements,te=vt.shouldRespectForcePress,se=vt.isEnabled,Oe=hi(function(){return{canDragInteractiveElements:Kt,shouldRespectForcePress:te,isEnabled:se}},[Kt,se,te]),Qe=Jn(function(rn){var Kn=Zt();return Kn||hn(!1),on(Mt,Kn,rn)},[Mt,Zt]),Ke=hi(function(){return{uniqueId:xt,descriptor:Mt,options:Oe,getDimension:Qe}},[Mt,Qe,Oe,xt]),We=(0,pt.useRef)(Ke),Ge=(0,pt.useRef)(!0);ka(function(){return Tt.draggable.register(We.current),function(){return Tt.draggable.unregister(We.current)}},[Tt.draggable]),ka(function(){if(Ge.current){Ge.current=!1;return}var rn=We.current;We.current=Ke,Tt.draggable.update(Ke,rn)},[Ke,Tt.draggable])}function ci(vt,xt,Mt){Sa(function(){function Tt(Kt){return"Draggable[id: "+Kt+"]: "}var Zt=vt.draggableId;Zt||hn(!1),typeof Zt!="string"&&hn(!1),eo(vt.index)||hn(!1),vt.mapped.type!=="DRAGGING"&&(su(Mt()),vt.isEnabled&&(Yu(xt,Zt)||hn(!1)))})}function xi(vt){}function Ri(vt){vt.preventDefault()}function rr(vt){var xt=(0,pt.useRef)(null),Mt=Jn(function(po){xt.current=po},[]),Tt=Jn(function(){return xt.current},[]),Zt=bo($d),Kt=Zt.contextId,te=Zt.dragHandleUsageInstructionsId,se=Zt.registry,Oe=bo(eh),Qe=Oe.type,Ke=Oe.droppableId,We=hi(function(){return{id:vt.draggableId,index:vt.index,type:Qe,droppableId:Ke}},[vt.draggableId,vt.index,Qe,Ke]),Ge=vt.children,rn=vt.draggableId,Kn=vt.isEnabled,Ai=vt.shouldRespectForcePress,Ti=vt.canDragInteractiveElements,Wi=vt.isClone,qi=vt.mapped,ur=vt.dropAnimationFinished;if(ci(vt,Kt,Tt),xi(Wi),!Wi){var ar=hi(function(){return{descriptor:We,registry:se,getDraggableRef:Tt,canDragInteractiveElements:Ti,shouldRespectForcePress:Ai,isEnabled:Kn}},[We,se,Tt,Ti,Ai,Kn]);ai(ar)}var Tr=hi(function(){return Kn?{tabIndex:0,role:"button","aria-describedby":te,"data-rbd-drag-handle-draggable-id":rn,"data-rbd-drag-handle-context-id":Kt,draggable:!1,onDragStart:Ri}:null},[Kt,te,rn,Kn]),$r=Jn(function(po){qi.type==="DRAGGING"&&qi.dropping&&po.propertyName==="transform"&&ur()},[ur,qi]),So=hi(function(){var po=dn(qi),xa=qi.type==="DRAGGING"&&qi.dropping?$r:null,gs={innerRef:Mt,draggableProps:{"data-rbd-draggable-context-id":Kt,"data-rbd-draggable-id":rn,style:po,onTransitionEnd:xa},dragHandleProps:Tr};return gs},[Kt,Tr,rn,qi,$r,Mt]),La=hi(function(){return{draggableId:We.id,type:We.type,source:{index:We.index,droppableId:We.droppableId}}},[We.droppableId,We.id,We.index,We.type]);return Ge(So,qi.snapshot,La)}var Ki=function(vt,xt){return vt===xt},lr=function(vt){var xt=vt.combine,Mt=vt.destination;return Mt?Mt.droppableId:xt?xt.droppableId:null},Rr=function(xt){return xt.combine?xt.combine.draggableId:null},Zi=function(xt){return xt.at&&xt.at.type==="COMBINE"?xt.at.combine.draggableId:null};function Jr(){var vt=an(function(Zt,Kt){return{x:Zt,y:Kt}}),xt=an(function(Zt,Kt,te,se,Oe){return{isDragging:!0,isClone:Kt,isDropAnimating:!!Oe,dropAnimation:Oe,mode:Zt,draggingOver:te,combineWith:se,combineTargetFor:null}}),Mt=an(function(Zt,Kt,te,se,Oe,Qe,Ke){return{mapped:{type:"DRAGGING",dropping:null,draggingOver:Oe,combineWith:Qe,mode:Kt,offset:Zt,dimension:te,forceShouldAnimate:Ke,snapshot:xt(Kt,se,Oe,Qe,null)}}}),Tt=function(Kt,te){if(Kt.isDragging){if(Kt.critical.draggable.id!==te.draggableId)return null;var se=Kt.current.client.offset,Oe=Kt.dimensions.draggables[te.draggableId],Qe=Ia(Kt.impact),Ke=Zi(Kt.impact),We=Kt.forceShouldAnimate;return Mt(vt(se.x,se.y),Kt.movementMode,Oe,te.isClone,Qe,Ke,We)}if(Kt.phase==="DROP_ANIMATING"){var Ge=Kt.completed;if(Ge.result.draggableId!==te.draggableId)return null;var rn=te.isClone,Kn=Kt.dimensions.draggables[te.draggableId],Ai=Ge.result,Ti=Ai.mode,Wi=lr(Ai),qi=Rr(Ai),ur=Kt.dropDuration,ar={duration:ur,curve:ed.drop,moveTo:Kt.newHomeClientOffset,opacity:qi?Ol.opacity.drop:null,scale:qi?Ol.scale.drop:null};return{mapped:{type:"DRAGGING",offset:Kt.newHomeClientOffset,dimension:Kn,dropping:ar,draggingOver:Wi,combineWith:qi,mode:Ti,forceShouldAnimate:null,snapshot:xt(Ti,rn,Wi,qi,ar)}}}return null};return Tt}function Wo(vt){return{isDragging:!1,isDropAnimating:!1,isClone:!1,dropAnimation:null,mode:null,draggingOver:null,combineTargetFor:vt,combineWith:null}}var Da={mapped:{type:"SECONDARY",offset:Qi,combineTargetFor:null,shouldAnimateDisplacement:!0,snapshot:Wo(null)}};function $o(){var vt=an(function(te,se){return{x:te,y:se}}),xt=an(Wo),Mt=an(function(te,se,Oe){return se===void 0&&(se=null),{mapped:{type:"SECONDARY",offset:te,combineTargetFor:se,shouldAnimateDisplacement:Oe,snapshot:xt(se)}}}),Tt=function(se){return se?Mt(Qi,se,!0):null},Zt=function(se,Oe,Qe,Ke){var We=Qe.displaced.visible[se],Ge=!!(Ke.inVirtualList&&Ke.effected[se]),rn=ua(Qe),Kn=rn&&rn.draggableId===se?Oe:null;if(!We){if(!Ge)return Tt(Kn);if(Qe.displaced.invisible[se])return null;var Ai=Pi(Ke.displacedBy.point),Ti=vt(Ai.x,Ai.y);return Mt(Ti,Kn,!0)}if(Ge)return Tt(Kn);var Wi=Qe.displacedBy.point,qi=vt(Wi.x,Wi.y);return Mt(qi,Kn,We.shouldAnimate)},Kt=function(se,Oe){if(se.isDragging)return se.critical.draggable.id===Oe.draggableId?null:Zt(Oe.draggableId,se.critical.draggable.id,se.impact,se.afterCritical);if(se.phase==="DROP_ANIMATING"){var Qe=se.completed;return Qe.result.draggableId===Oe.draggableId?null:Zt(Oe.draggableId,Qe.result.draggableId,Qe.impact,Qe.afterCritical)}return null};return Kt}var As=function(){var xt=Jr(),Mt=$o(),Tt=function(Kt,te){return xt(Kt,te)||Mt(Kt,te)||Da};return Tt},ts={dropAnimationFinished:Wd},Ea=$e(As,ts,null,{context:ef,pure:!0,areStatePropsEqual:Ki})(rr);function Fs(vt){var xt=bo(eh),Mt=xt.isUsingCloneFor;return Mt===vt.draggableId&&!vt.isClone?null:pt.createElement(Ea,vt)}function Ya(vt){var xt=typeof vt.isDragDisabled=="boolean"?!vt.isDragDisabled:!0,Mt=!!vt.disableInteractiveElementBlocking,Tt=!!vt.shouldRespectForcePress;return pt.createElement(Fs,(0,Me.Z)({},vt,{isClone:!1,isEnabled:xt,canDragInteractiveElements:Mt,shouldRespectForcePress:Tt}))}function ba(vt){var xt=(0,pt.useContext)($d);xt||hn(!1);var Mt=xt.contextId,Tt=xt.isMovementAllowed,Zt=(0,pt.useRef)(null),Kt=(0,pt.useRef)(null),te=vt.children,se=vt.droppableId,Oe=vt.type,Qe=vt.mode,Ke=vt.direction,We=vt.ignoreContainerClipping,Ge=vt.isDropDisabled,rn=vt.isCombineEnabled,Kn=vt.snapshot,Ai=vt.useClone,Ti=vt.updateViewportMaxScroll,Wi=vt.getContainerForClone,qi=Jn(function(){return Zt.current},[]),ur=Jn(function(Bs){Zt.current=Bs},[]),ar=Jn(function(){return Kt.current},[]),Tr=Jn(function(Bs){Kt.current=Bs},[]);mt({props:vt,getDroppableRef:qi,getPlaceholderRef:ar});var $r=Jn(function(){Tt()&&Ti({maxScroll:xl()})},[Tt,Ti]);hg({droppableId:se,type:Oe,mode:Qe,direction:Ke,isDropDisabled:Ge,isCombineEnabled:rn,ignoreContainerClipping:We,getDroppableRef:qi});var So=pt.createElement(At,{on:vt.placeholder,shouldAnimate:vt.shouldAnimatePlaceholder},function(Bs){var lu=Bs.onClose,dl=Bs.data,$s=Bs.animate;return pt.createElement(tp,{placeholder:dl,onClose:lu,innerRef:Tr,animate:$s,contextId:Mt,onTransitionEnd:$r})}),La=hi(function(){return{innerRef:ur,placeholder:So,droppableProps:{"data-rbd-droppable-id":se,"data-rbd-droppable-context-id":Mt}}},[Mt,se,So,ur]),po=Ai?Ai.dragging.draggableId:null,xa=hi(function(){return{droppableId:se,type:Oe,isUsingCloneFor:po}},[se,po,Oe]);function gs(){if(!Ai)return null;var Bs=Ai.dragging,lu=Ai.render,dl=pt.createElement(Fs,{draggableId:Bs.draggableId,index:Bs.source.index,isClone:!0,isEnabled:!0,shouldRespectForcePress:!1,canDragInteractiveElements:!0},function($s,_a){return lu($s,_a,Bs)});return ni.createPortal(dl,Wi())}return pt.createElement(eh.Provider,{value:xa},te(La,Kn),gs())}var fo=function(xt,Mt){return xt===Mt.droppable.type},ta=function(xt,Mt){return Mt.draggables[xt.draggable.id]},Ha=function(){var xt={placeholder:null,shouldAnimatePlaceholder:!0,snapshot:{isDraggingOver:!1,draggingOverWith:null,draggingFromThisWith:null,isUsingPlaceholder:!1},useClone:null},Mt=(0,Me.Z)({},xt,{shouldAnimatePlaceholder:!1}),Tt=an(function(te){return{draggableId:te.id,type:te.type,source:{index:te.index,droppableId:te.droppableId}}}),Zt=an(function(te,se,Oe,Qe,Ke,We){var Ge=Ke.descriptor.id,rn=Ke.descriptor.droppableId===te;if(rn){var Kn=We?{render:We,dragging:Tt(Ke.descriptor)}:null,Ai={isDraggingOver:Oe,draggingOverWith:Oe?Ge:null,draggingFromThisWith:Ge,isUsingPlaceholder:!0};return{placeholder:Ke.placeholder,shouldAnimatePlaceholder:!1,snapshot:Ai,useClone:Kn}}if(!se)return Mt;if(!Qe)return xt;var Ti={isDraggingOver:Oe,draggingOverWith:Ge,draggingFromThisWith:null,isUsingPlaceholder:!0};return{placeholder:Ke.placeholder,shouldAnimatePlaceholder:!0,snapshot:Ti,useClone:null}}),Kt=function(se,Oe){var Qe=Oe.droppableId,Ke=Oe.type,We=!Oe.isDropDisabled,Ge=Oe.renderClone;if(se.isDragging){var rn=se.critical;if(!fo(Ke,rn))return Mt;var Kn=ta(rn,se.dimensions),Ai=Ia(se.impact)===Qe;return Zt(Qe,We,Ai,Ai,Kn,Ge)}if(se.phase==="DROP_ANIMATING"){var Ti=se.completed;if(!fo(Ke,Ti.critical))return Mt;var Wi=ta(Ti.critical,se.dimensions);return Zt(Qe,We,lr(Ti.result)===Qe,Ia(Ti.impact)===Qe,Wi,Ge)}if(se.phase==="IDLE"&&se.completed&&!se.shouldFlush){var qi=se.completed;if(!fo(Ke,qi.critical))return Mt;var ur=Ia(qi.impact)===Qe,ar=!!(qi.impact.at&&qi.impact.at.type==="COMBINE"),Tr=qi.critical.droppable.id===Qe;return ur?ar?xt:Mt:Tr?xt:Mt}return Mt};return Kt},Xa={updateViewportMaxScroll:Jo};function El(){return document.body||hn(!1),document.body}var ea={mode:"standard",type:"DEFAULT",direction:"vertical",isDropDisabled:!1,isCombineEnabled:!1,ignoreContainerClipping:!1,renderClone:null,getContainerForClone:El},qs=$e(Ha,Xa,null,{context:ef,pure:!0,areStatePropsEqual:Ki})(ba);qs.defaultProps=ea},38486:function(fn,Bn){"use strict";var Ft;var pt=60103,Ht=60106,ve=60107,Me=60108,Pe=60114,Ae=60109,ee=60110,Fe=60112,ye=60113,de=60120,he=60115,Ne=60116,He=60121,kt=60122,nt=60117,et=60129,ht=60131;if(typeof Symbol=="function"&&Symbol.for){var lt=Symbol.for;pt=lt("react.element"),Ht=lt("react.portal"),ve=lt("react.fragment"),Me=lt("react.strict_mode"),Pe=lt("react.profiler"),Ae=lt("react.provider"),ee=lt("react.context"),Fe=lt("react.forward_ref"),ye=lt("react.suspense"),de=lt("react.suspense_list"),he=lt("react.memo"),Ne=lt("react.lazy"),He=lt("react.block"),kt=lt("react.server.block"),nt=lt("react.fundamental"),et=lt("react.debug_trace_mode"),ht=lt("react.legacy_hidden")}function gt(Le){if(typeof Le=="object"&&Le!==null){var ue=Le.$$typeof;switch(ue){case pt:switch(Le=Le.type,Le){case ve:case Pe:case Me:case ye:case de:return Le;default:switch(Le=Le&&Le.$$typeof,Le){case ee:case Fe:case Ne:case he:case Ae:return Le;default:return ue}}case Ht:return ue}}}var yt=Ae,Lt=pt,Dt=Fe,zt=ve,Xt=Ne,re=he,le=Ht,ae=Pe,je=Me,ne=ye;Ft=ee,Ft=yt,Ft=Lt,Ft=Dt,Ft=zt,Ft=Xt,Ft=re,Ft=le,Ft=ae,Ft=je,Ft=ne,Ft=function(){return!1},Ft=function(){return!1},Bn.isContextConsumer=function(Le){return gt(Le)===ee},Ft=function(Le){return gt(Le)===Ae},Ft=function(Le){return typeof Le=="object"&&Le!==null&&Le.$$typeof===pt},Ft=function(Le){return gt(Le)===Fe},Ft=function(Le){return gt(Le)===ve},Ft=function(Le){return gt(Le)===Ne},Ft=function(Le){return gt(Le)===he},Ft=function(Le){return gt(Le)===Ht},Ft=function(Le){return gt(Le)===Pe},Ft=function(Le){return gt(Le)===Me},Ft=function(Le){return gt(Le)===ye},Ft=function(Le){return typeof Le=="string"||typeof Le=="function"||Le===ve||Le===Pe||Le===et||Le===Me||Le===ye||Le===de||Le===ht||typeof Le=="object"&&Le!==null&&(Le.$$typeof===Ne||Le.$$typeof===he||Le.$$typeof===Ae||Le.$$typeof===ee||Le.$$typeof===Fe||Le.$$typeof===nt||Le.$$typeof===He||Le[0]===kt)},Ft=gt},53410:function(fn,Bn,Ft){"use strict";fn.exports=Ft(38486)},32637:function(fn,Bn,Ft){"use strict";fn.exports=Ft.p+"static/AssistantCode3.a8740efb.jpeg"},93314:function(fn){"use strict";fn.exports="data:image/png;base64,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"},73631:function(fn){"use strict";fn.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYAAACNiR0NAAAAAXNSR0IArs4c6QAAAZxJREFUOBGtlL1Ow0AMgH2XUIkOLFXVASgTsDHxBIAEzAwMPBQjT8AATGVBgEBCYmHmFcICYmBogCbNYSe52HUTVZWwFJ3PP599Z+WMcy6Af5SwYkWnLYifTyBzq5XNK8YNwbbvYP381ZuaVlN1+HJwAc4d1QYaA+gDsHYANrhGHTdCMtSDMILtwSMDn7ZiANPKwyjeQ0Reo4r1gEoEwRkDb7spdPcBeocMk1Cv00oii5L+fgPwcR/zHfb3AJY2sEpUVLOUhB/l+w7I1iS9TYDFrM3AzhqGDstPZ3li2Z12U2WLvk4fGJh+F0elYN8ZrbWiA7igAP4WR6sFzDAKPgPHP0VnlMsFS5IyyIGoeAamCKybYI5UQLWVE2fgGI/s72wqQXRd9jyxiHgGJtihFxGQm8Qd5XvtF3fEQOrQH9mDm1Z9hyJuEphXIq9uSWSQqv8a4RbAUTFdcs7gifwplYGjT3wzbPFz6Q70EZv8WZoxMP66ApMc86inirNBA8njcFIuvOTXhowPyzuQJiukzi3hQgS7b+I9nJtQn/AHsLGsvlcPPWsAAAAASUVORK5CYII="},5623:function(fn){"use strict";fn.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYAAACNiR0NAAAAAXNSR0IArs4c6QAAAedJREFUOBGtVDtLA0EQ/jY5z7dgEBVJLHyAitpYWQqKjVZa5BfEKpWlWPgrLG0UEdTexkILRUQiSBBBCAhGUINFHia53Dm7ufXcvfgIOHA3O69vvtnbPeY4ThD/KIF/xBJQhg/wbmkZtj0KMKbEGNIweg4xuPmq+DWDKSOfz2/AqaxpOVWzip8HC2xTsydfjoMHhMd2VMDjkSswTPqSucOhh3PmupaIediBOnL52UTLENC7QCV1bC9vkjkF3i4WVUDeORIF2sf5ymOk7mY1pr87hoHEhekHDLYQOfck8c6c6OeYfPHN3LyOxEB2KwQru0LrBvTPdaGRipj7ISUzqUWJ/moiRyc1tUXAQP42Tsa6sEIRCtwDRXqESDYS8RuG5iyRMEWFAat4CbvsAmgFmukmeYofJYeSAimab0L4DfQNHiF1laFAyMv840o2zN3Q1FMuIOIWStF9OtAxH4xkIC8NZyN9SnIOsNISkLRd3EWlFBP0lQJtDzVTyc8mBKB3U65nUnBYmDaFAr98BFGqvYKtwOMZHRsp1vsedVxV8bQRJXu5BbKWa6sAmK1lj2FiOoLcS5LYNX/N+3ktp+GapFJMeoDccdI9gEJ2nW5HhJjKuXmktih7yjJoC8VVwNpldXnr+KX8DfcD09mnwzz7SXEAAAAASUVORK5CYII="},36413:function(fn){"use strict";fn.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABYAAAAYCAYAAAD+vg1LAAAAAXNSR0IArs4c6QAABPRJREFUSEudlXtQVGUYxp/vnLOcXcDltsACCyjesAypbMbQEpsxCyfDZtbyMqOMgZPSaDOYXUaGSzhoNXkBBbRGpXEGCx1Xa1KsTDTJQcUQyJ3RVEA22GUX3N2zl3POV7sMTCuE1Tdz5vzxvuf3fs97OwSPOHNnL13IgDwDyGGUIY0XLh8/9ahvfHYyllNmZibnHVDHcAo2WZZpLQX5DKAaAuQDZAeFHBYTOr0qLbhAhDPaVnSOuB7mBIC3Lul+kiX0iV96y3Ps3q7M8W42M2ItolXpvrv9wbBcWtFxbe/f/UfAW7PvP01k6bKCJ0yXcAbtJsM/cgkhKN/2MVKmJOHkPis6b4pLSk4knBwTXPhq59IXVqiPzV+mxoBtEPVHv4Xb7QEowPMKhE4IgSY6EnEJsZg4KREqldLPqdtuQdsl1+rSE7rDo8CUFjHNX8Qd6JX0OVm5Ef+mNiM+hr1WXDnt2FRiSNw1Gnw97wPT/diyxtaN0G+OGrG3OgUwf91qBs9DFGWIXgmiKEH0ypAkGZrYCThbO4gL9Q+KSwyJRQFgem3dVBDaNmANUxxrKEBOWQw6rS4MDnqQO9gDQ+pk9LWbQGmgEF+epz6mRdMpJxoODu4qMeg2BYKv5+0AxeYHt8Nx6Ow7yK/U4mynFfmmblQlJSEzVg1bvwM+EMcx4BQsOI4Fy/m0AFcaHDhZYTtcbNCtDgS35HUASB1o1KCq6S1s+VIHd3sbhPgUqNVKMMyYrT7C6GgScGrP3UvvHpmR8TDYCUBlqdeh5sYKFOxUQDp/BsqVayGDwOT1Ij5IEZAHX1pkWfaruNfuwffVV7E271A2Sas+MexIaEuuXXYzIea6ZBztXoycV65CMWkipLR52Gs1Q6VgsYzwGLQJkCQKWRoqnO9oYtWgHhW+Kr2B/LeruhHmmUImHfRPIaEtea1eS9BM6zfx6I9MQnKcDfZFeuyyufCDy4HGp1Jh67PDYXeDZZmhh2PAsAxCQnl4nAxqNhpRsHmnb0GsJ7Nq9g2Br62rdHcp1zuaE6BKVIHRxoN9MRtnuqwID+KQkRA2bl97PRTly+9ga2G5D3eRpFfPGwK35ma4jKEXxZ5ksEoWTFwC+Kyl/2lISvXdeP+9beA40QurMZgsOCf6S24/+OFPjKh93h+J56Fc+SYoCKhM8bnZgteiwhHBsP7hkHyDIsqQRMkfPDwyBEUbbmHVikpMDnWAqBBNpteYh8AV2xcyyuDTw2tUuSoXl/pcMDpdOEcEVGq1uHvLPEpFG3qxgzmPZnun35ZCZPQwrF6Y8+nXI03q3P9JBQi/gRIWwWvWoe6OBRU2CwzTUjCBZzFgdfqLNjwcRq8Zczv2wCF7AgKqGI4Kkpgd0P2m3ZV1XnWyXrd6MZEl6pccxLNj5vsNYy3qzC0Bttej0rE9eTEmXi37bdRY/XzkZuGzy6cVP6p6SVdKkaqMQXyQGof6mrEmejY+SnoZL7Xvxw3BNPrXRCnVADjvETxcz21ximAnxOOS4RYoPC4KjyD73zmJlVBGAE1pG1Hb2wy9ZhYWtlXD6OoDQOm4i+C7svq4O1265fYH6jkRkf0z1Go7r1QKMpXZW4Xpv4a0RFnmL4uaheLERcjqOIDf3f3DQhvG3zDj5ePHTeEIYi4AeDzQjVrAkYz/D/bRmreEwePdAoosACwILkISt+G53ff+BFCGCYWbZ5SAAAAAAElFTkSuQmCC"},96908:function(fn){"use strict";fn.exports="data:image/png;base64,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"},57177:function(fn){"use strict";fn.exports="data:image/png;base64,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"},81378:function(fn){"use strict";fn.exports="data:image/png;base64,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"}}]);