!(function(){var mS=Object.defineProperty,vS=Object.defineProperties;var yS=Object.getOwnPropertyDescriptors;var fv=Object.getOwnPropertySymbols;var N1=Object.prototype.hasOwnProperty,R1=Object.prototype.propertyIsEnumerable;var I1=Math.pow,k1=(Ie,Z,b)=>Z in Ie?mS(Ie,Z,{enumerable:!0,configurable:!0,writable:!0,value:b}):Ie[Z]=b,ls=(Ie,Z)=>{for(var b in Z||(Z={}))N1.call(Z,b)&&k1(Ie,b,Z[b]);if(fv)for(var b of fv(Z))R1.call(Z,b)&&k1(Ie,b,Z[b]);return Ie},Vh=(Ie,Z)=>vS(Ie,yS(Z));var o0=(Ie,Z)=>{var b={};for(var B in Ie)N1.call(Ie,B)&&Z.indexOf(B)<0&&(b[B]=Ie[B]);if(Ie!=null&&fv)for(var B of fv(Ie))Z.indexOf(B)<0&&R1.call(Ie,B)&&(b[B]=Ie[B]);return b};var O1=(Ie,Z,b)=>new Promise((B,Y)=>{var s=u=>{try{I(b.next(u))}catch(d){Y(d)}},E=u=>{try{I(b.throw(u))}catch(d){Y(d)}},I=u=>u.done?B(u.value):Promise.resolve(u.value).then(s,E);I((b=b.apply(Ie,Z)).next())});(self.webpackChunk=self.webpackChunk||[]).push([[2993],{45420:function(Ie,Z,b){"use strict";b.d(Z,{Z:function(){return ct}});var B=b(1413),Y=b(87462),s=b(71002),E=b(97685),I=b(45987),u=b(67294),d=b.t(u,2),g=b(73935),y=b(98924),S=b(80334),v=b(42550),c=u.createContext(null),h=c,m=b(74902),x=b(8410),T=[];function _(St,_t){var At=u.useState(function(){if(!(0,y.Z)())return null;var Gn=document.createElement("div");return Gn}),ht=(0,E.Z)(At,1),wt=ht[0],jt=u.useRef(!1),st=u.useContext(h),ge=u.useState(T),on=(0,E.Z)(ge,2),mn=on[0],Mt=on[1],On=st||(jt.current?void 0:function(Gn){Mt(function(sn){var xt=[Gn].concat((0,m.Z)(sn));return xt})});function Vn(){wt.parentElement||document.body.appendChild(wt),jt.current=!0}function Fn(){var Gn;(Gn=wt.parentElement)===null||Gn===void 0||Gn.removeChild(wt),jt.current=!1}return(0,x.Z)(function(){return St?st?st(Vn):Vn():Fn(),Fn},[St]),(0,x.Z)(function(){mn.length&&(mn.forEach(function(Gn){return Gn()}),Mt(T))},[mn]),[wt,On]}var R=b(48981),A=b(74204);function N(){return document.body.scrollHeight>(window.innerHeight||document.documentElement.clientHeight)&&window.innerWidth>document.body.offsetWidth}var L="rc-util-locker-".concat(Date.now()),M=0;function F(St){var _t=!!St,At=u.useState(function(){return M+=1,"".concat(L,"_").concat(M)}),ht=(0,E.Z)(At,1),wt=ht[0];(0,x.Z)(function(){if(_t){var jt=(0,A.o)(document.body).width,st=N();(0,R.hq)(` html body { overflow-y: hidden; `.concat(st?"width: calc(100% - ".concat(jt,"px);"):"",` }`),wt)}else(0,R.jL)(wt);return function(){(0,R.jL)(wt)}},[_t,wt])}var H=!1;function P(St){return typeof St=="boolean"&&(H=St),H}var V=function(_t){return _t===!1?!1:!(0,y.Z)()||!_t?null:typeof _t=="string"?document.querySelector(_t):typeof _t=="function"?_t():_t},G=u.forwardRef(function(St,_t){var At=St.open,ht=St.autoLock,wt=St.getContainer,jt=St.debug,st=St.autoDestroy,ge=st===void 0?!0:st,on=St.children,mn=u.useState(At),Mt=(0,E.Z)(mn,2),On=Mt[0],Vn=Mt[1],Fn=On||At;u.useEffect(function(){(ge||At)&&Vn(At)},[At,ge]);var Gn=u.useState(function(){return V(wt)}),sn=(0,E.Z)(Gn,2),xt=sn[0],gr=sn[1];u.useEffect(function(){var ir=V(wt);gr(ir!=null?ir:null)});var Pr=_(Fn&&!xt,jt),tr=(0,E.Z)(Pr,2),ii=tr[0],Ar=tr[1],Kt=xt!=null?xt:ii;F(ht&&At&&(0,y.Z)()&&(Kt===ii||Kt===document.body));var ye=null;if(on&&(0,v.Yr)(on)&&_t){var Vt=on;ye=Vt.ref}var rn=(0,v.x1)(ye,_t);if(!Fn||!(0,y.Z)()||xt===void 0)return null;var Xn=Kt===!1||P(),Zn=on;return _t&&(Zn=u.cloneElement(on,{ref:rn})),u.createElement(h.Provider,{value:Ar},Xn?Zn:(0,g.createPortal)(Zn,Kt))}),Q=G,ne=Q,ue=b(98280),ae=b(94184),he=b.n(ae),ce=b(21770);function we(St){return St!==null&&(0,s.Z)(St)==="object"}function me(St,_t,At){if(St===!1||_t===!1&&(!we(St)||!St.closeIcon))return null;var ht=typeof _t!="boolean"?_t:void 0;if(we(St)){var wt;return(0,B.Z)((0,B.Z)({},St),{},{closeIcon:(wt=St.closeIcon)!==null&&wt!==void 0?wt:ht})}return At||St||_t?{closeIcon:ht}:"empty"}function Le(St,_t,At,ht){return u.useMemo(function(){var wt=me(St,_t,!1),jt=me(At,ht,!0);return wt!=="empty"?wt:jt},[At,ht,St,_t])}var ee=b(66680);function se(St){var _t=window.innerWidth||document.documentElement.clientWidth,At=window.innerHeight||document.documentElement.clientHeight,ht=St.getBoundingClientRect(),wt=ht.top,jt=ht.right,st=ht.bottom,ge=ht.left;return wt>=0&&ge>=0&&jt<=_t&&st<=At}function le(St,_t,At){var ht;return(ht=At!=null?At:_t)!==null&&ht!==void 0?ht:St===null?"center":"bottom"}function ke(St){return typeof St=="number"&&!Number.isNaN(St)}function De(St,_t,At,ht){var wt=(0,u.useState)(void 0),jt=(0,E.Z)(wt,2),st=jt[0],ge=jt[1];(0,x.Z)(function(){var sn=typeof St=="function"?St():St;ge(sn||null)});var on=(0,u.useState)(null),mn=(0,E.Z)(on,2),Mt=mn[0],On=mn[1],Vn=(0,ee.Z)(function(){if(st){!se(st)&&_t&&st.scrollIntoView(ht);var sn=st.getBoundingClientRect(),xt=sn.left,gr=sn.top,Pr=sn.width,tr=sn.height,ii={left:xt,top:gr,width:Pr,height:tr,radius:0};On(function(Ar){return JSON.stringify(Ar)!==JSON.stringify(ii)?ii:Ar})}else On(null)}),Fn=function(xt){var gr;return(gr=Array.isArray(At==null?void 0:At.offset)?At==null?void 0:At.offset[xt]:At==null?void 0:At.offset)!==null&&gr!==void 0?gr:6};(0,x.Z)(function(){return Vn(),window.addEventListener("resize",Vn),function(){window.removeEventListener("resize",Vn)}},[st,_t,Vn]);var Gn=(0,u.useMemo)(function(){if(!Mt)return Mt;var sn=Fn(0),xt=Fn(1),gr=ke(At==null?void 0:At.radius)?At==null?void 0:At.radius:2;return{left:Mt.left-sn,top:Mt.top-xt,width:Mt.width+sn*2,height:Mt.height+xt*2,radius:gr}},[Mt,At]);return[Gn,st]}function Be(){var St=(0,B.Z)({},d);return St.useId}var He=0;function Fe(){}function Je(St){var _t=u.useState("ssr-id"),At=(0,E.Z)(_t,2),ht=At[0],wt=At[1],jt=Be(),st=jt==null?void 0:jt();return u.useEffect(function(){if(!jt){var ge=He;He+=1,wt("rc_unique_".concat(ge))}},[]),St||st||ht}var Me={fill:"transparent",pointerEvents:"auto"},lt=function(_t){var At=_t.prefixCls,ht=_t.rootClassName,wt=_t.pos,jt=_t.showMask,st=_t.style,ge=st===void 0?{}:st,on=_t.fill,mn=on===void 0?"rgba(0,0,0,0.5)":on,Mt=_t.open,On=_t.animated,Vn=_t.zIndex,Fn=_t.disabledInteraction,Gn=Je(),sn="".concat(At,"-mask-").concat(Gn),xt=(0,s.Z)(On)==="object"?On==null?void 0:On.placeholder:On,gr=typeof navigator!="undefined"&&/^((?!chrome|android).)*safari/i.test(navigator.userAgent),Pr=gr?{width:"100%",height:"100%"}:{width:"100vw",height:"100vh"};return u.createElement(ne,{open:Mt,autoLock:!0},u.createElement("div",{className:he()("".concat(At,"-mask"),ht),style:(0,B.Z)({position:"fixed",left:0,right:0,top:0,bottom:0,zIndex:Vn,pointerEvents:wt&&!Fn?"none":"auto"},ge)},jt?u.createElement("svg",{style:{width:"100%",height:"100%"}},u.createElement("defs",null,u.createElement("mask",{id:sn},u.createElement("rect",(0,Y.Z)({x:"0",y:"0"},Pr,{fill:"white"})),wt&&u.createElement("rect",{x:wt.left,y:wt.top,rx:wt.radius,width:wt.width,height:wt.height,fill:"black",className:xt?"".concat(At,"-placeholder-animated"):""}))),u.createElement("rect",{x:"0",y:"0",width:"100%",height:"100%",fill:mn,mask:"url(#".concat(sn,")")}),wt&&u.createElement(u.Fragment,null,u.createElement("rect",(0,Y.Z)({},Me,{x:"0",y:"0",width:"100%",height:wt.top})),u.createElement("rect",(0,Y.Z)({},Me,{x:"0",y:"0",width:wt.left,height:"100%"})),u.createElement("rect",(0,Y.Z)({},Me,{x:"0",y:wt.top+wt.height,width:"100%",height:"calc(100vh - ".concat(wt.top+wt.height,"px)")})),u.createElement("rect",(0,Y.Z)({},Me,{x:wt.left+wt.width,y:"0",width:"calc(100vw - ".concat(wt.left+wt.width,"px)"),height:"100%"})))):null))},Re=lt,Oe={adjustX:1,adjustY:1},pe=[0,0],fe={left:{points:["cr","cl"],offset:[-8,0]},right:{points:["cl","cr"],offset:[8,0]},top:{points:["bc","tc"],offset:[0,-8]},bottom:{points:["tc","bc"],offset:[0,8]},topLeft:{points:["bl","tl"],offset:[0,-8]},leftTop:{points:["tr","tl"],offset:[-8,0]},topRight:{points:["br","tr"],offset:[0,-8]},rightTop:{points:["tl","tr"],offset:[8,0]},bottomRight:{points:["tr","br"],offset:[0,8]},rightBottom:{points:["bl","br"],offset:[8,0]},bottomLeft:{points:["tl","bl"],offset:[0,8]},leftBottom:{points:["br","bl"],offset:[-8,0]}};function z(){var St=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1,_t={};return Object.keys(fe).forEach(function(At){_t[At]=(0,B.Z)((0,B.Z)({},fe[At]),{},{autoArrow:St,targetOffset:pe})}),_t}var J=z(),be=b(64217);function _e(St){var _t,At=St.prefixCls,ht=St.current,wt=St.total,jt=St.title,st=St.description,ge=St.onClose,on=St.onPrev,mn=St.onNext,Mt=St.onFinish,On=St.className,Vn=St.closable,Fn=(0,be.Z)(Vn||{},!0),Gn=(_t=Vn==null?void 0:Vn.closeIcon)!==null&&_t!==void 0?_t:u.createElement("span",{className:"".concat(At,"-close-x")},"\xD7"),sn=!!Vn;return u.createElement("div",{className:he()("".concat(At,"-content"),On)},u.createElement("div",{className:"".concat(At,"-inner")},sn&&u.createElement("button",(0,Y.Z)({type:"button",onClick:ge,"aria-label":"Close"},Fn,{className:"".concat(At,"-close")}),Gn),u.createElement("div",{className:"".concat(At,"-header")},u.createElement("div",{className:"".concat(At,"-title")},jt)),u.createElement("div",{className:"".concat(At,"-description")},st),u.createElement("div",{className:"".concat(At,"-footer")},u.createElement("div",{className:"".concat(At,"-sliders")},wt>1?(0,m.Z)(Array.from({length:wt}).keys()).map(function(xt,gr){return u.createElement("span",{key:xt,className:gr===ht?"active":""})}):null),u.createElement("div",{className:"".concat(At,"-buttons")},ht!==0?u.createElement("button",{className:"".concat(At,"-prev-btn"),onClick:on},"Prev"):null,ht===wt-1?u.createElement("button",{className:"".concat(At,"-finish-btn"),onClick:Mt},"Finish"):u.createElement("button",{className:"".concat(At,"-next-btn"),onClick:mn},"Next")))))}var oe=function(_t){var At=_t.current,ht=_t.renderPanel;return u.createElement(u.Fragment,null,typeof ht=="function"?ht(_t,At):u.createElement(_e,_t))},ie=oe,ve=["prefixCls","steps","defaultCurrent","current","onChange","onClose","onFinish","open","mask","arrow","rootClassName","placement","renderPanel","gap","animated","scrollIntoViewOptions","zIndex","closeIcon","closable","builtinPlacements","disabledInteraction"],Ne={left:"50%",top:"50%",width:1,height:1},ze={block:"center",inline:"center"},Ve=function(_t){var At=_t.prefixCls,ht=At===void 0?"rc-tour":At,wt=_t.steps,jt=wt===void 0?[]:wt,st=_t.defaultCurrent,ge=_t.current,on=_t.onChange,mn=_t.onClose,Mt=_t.onFinish,On=_t.open,Vn=_t.mask,Fn=Vn===void 0?!0:Vn,Gn=_t.arrow,sn=Gn===void 0?!0:Gn,xt=_t.rootClassName,gr=_t.placement,Pr=_t.renderPanel,tr=_t.gap,ii=_t.animated,Ar=_t.scrollIntoViewOptions,Kt=Ar===void 0?ze:Ar,ye=_t.zIndex,Vt=ye===void 0?1001:ye,rn=_t.closeIcon,Xn=_t.closable,Zn=_t.builtinPlacements,ir=_t.disabledInteraction,Dr=(0,I.Z)(_t,ve),ai=u.useRef(),li=(0,ce.Z)(0,{value:ge,defaultValue:st}),Zr=(0,E.Z)(li,2),Tn=Zr[0],kn=Zr[1],Vr=(0,ce.Z)(void 0,{value:On,postState:function(_i){return Tn<0||Tn>=jt.length?!1:_i!=null?_i:!0}}),di=(0,E.Z)(Vr,2),nr=di[0],vn=di[1],Jn=u.useState(nr),bi=(0,E.Z)(Jn,2),gi=bi[0],mi=bi[1],Lt=u.useRef(nr);(0,x.Z)(function(){nr&&(Lt.current||kn(0),mi(!0)),Lt.current=nr},[nr]);var Yn=jt[Tn]||{},hr=Yn.target,zi=Yn.placement,bn=Yn.style,or=Yn.arrow,Ei=Yn.className,Co=Yn.mask,ki=Yn.scrollIntoViewOptions,yr=ki===void 0?ze:ki,Mr=Yn.closeIcon,Fr=Yn.closable,Di=Le(Fr,Mr,Xn,rn),so=nr&&(Co!=null?Co:Fn),Gi=yr!=null?yr:Kt,sr=De(hr,On,tr,Gi),ys=(0,E.Z)(sr,2),Wo=ys[0],Ro=ys[1],hn=le(Ro,gr,zi),us=Ro?typeof or=="undefined"?sn:or:!1,cs=(0,s.Z)(us)==="object"?us.pointAtCenter:!1;(0,x.Z)(function(){var tn;(tn=ai.current)===null||tn===void 0||tn.forceAlign()},[cs,Tn]);var yo=function(_i){kn(_i),on==null||on(_i)},Bs=(0,u.useMemo)(function(){return Zn?typeof Zn=="function"?Zn({arrowPointAtCenter:cs}):Zn:z(cs)},[Zn,cs]);if(Ro===void 0||!gi)return null;var Yi=function(){vn(!1),mn==null||mn(Tn)},eo=function(){return u.createElement(ie,(0,Y.Z)({arrow:us,key:"content",prefixCls:ht,total:jt.length,renderPanel:Pr,onPrev:function(){yo(Tn-1)},onNext:function(){yo(Tn+1)},onClose:Yi,current:Tn,onFinish:function(){Yi(),Mt==null||Mt()}},jt[Tn],{closable:Di}))},Oi=typeof so=="boolean"?so:!!so,hi=typeof so=="boolean"?void 0:so,Ni=function(_i){return _i||Ro||document.body};return u.createElement(u.Fragment,null,u.createElement(Re,{zIndex:Vt,prefixCls:ht,pos:Wo,showMask:Oi,style:hi==null?void 0:hi.style,fill:hi==null?void 0:hi.color,open:nr,animated:ii,rootClassName:xt,disabledInteraction:ir}),u.createElement(ue.Z,(0,Y.Z)({},Dr,{builtinPlacements:Bs,ref:ai,popupStyle:bn,popupPlacement:hn,popupVisible:nr,popupClassName:he()(xt,Ei),prefixCls:ht,popup:eo,forceRender:!1,destroyPopupOnHide:!0,zIndex:Vt,getTriggerDOMNode:Ni,arrow:!!us}),u.createElement(ne,{open:nr,autoLock:!0},u.createElement("div",{className:he()(xt,"".concat(ht,"-target-placeholder")),style:(0,B.Z)((0,B.Z)({},Wo||Ne),{},{position:"fixed",pointerEvents:"none"})}))))},yt=Ve,ct=yt},71749:function(){"use strict"},30483:function(){"use strict"},56448:function(Ie){(function(Z){(function(b){if(1)Ie.exports=b();else var B})(function(){var b,B,Y;return function(){function s(E,I,u){function d(S,v){if(!I[S]){if(!E[S]){var c=void 0;if(!v&&c)return require(S,!0);if(g)return g(S,!0);var h=new Error("Cannot find module '"+S+"'");throw h.code="MODULE_NOT_FOUND",h}var m=I[S]={exports:{}};E[S][0].call(m.exports,function(x){var T=E[S][1][x];return d(T||x)},m,m.exports,s,E,I,u)}return I[S].exports}for(var g=void 0,y=0;y `.concat(R,` `),A&&(M+="".concat(A,` `)),M+=` `,L.content=M,L.mime="xml",L.successStatuses=[200],P.next=9,this.request(L);case 9:return F=P.sent,P.abrupt("return",{res:F.res});case 11:case"end":return P.stop()}},_,this)}));function T(_,R,A){return x.apply(this,arguments)}return T}(),c.getBucketLogging=function(){var x=(0,g.default)(d.default.mark(function _(R,A){var N,L,M;return d.default.wrap(function(H){for(;;)switch(H.prev=H.next){case 0:return N=this._bucketRequestParams("GET",R,"logging",A),N.successStatuses=[200],N.xmlResponse=!0,H.next=5,this.request(N);case 5:return L=H.sent,M=L.data.LoggingEnabled,H.abrupt("return",{enable:!!M,prefix:M&&M.TargetPrefix||null,res:L.res});case 8:case"end":return H.stop()}},_,this)}));function T(_,R){return x.apply(this,arguments)}return T}(),c.deleteBucketLogging=function(){var x=(0,g.default)(d.default.mark(function _(R,A){var N,L;return d.default.wrap(function(F){for(;;)switch(F.prev=F.next){case 0:return N=this._bucketRequestParams("DELETE",R,"logging",A),N.successStatuses=[204,200],F.next=4,this.request(N);case 4:return L=F.sent,F.abrupt("return",{res:L.res});case 6:case"end":return F.stop()}},_,this)}));function T(_,R){return x.apply(this,arguments)}return T}(),c.putBucketCORS=function(){var x=(0,g.default)(d.default.mark(function _(R,A,N){var L,M,F,H,P,V,G,Q,ne,ue;return d.default.wrap(function(he){for(;;)switch(he.prev=he.next){case 0:for(A=A||[],y(A.length,"rules is required"),A.forEach(function(ce){y(ce.allowedOrigin,"allowedOrigin is required"),y(ce.allowedMethod,"allowedMethod is required")}),L=this._bucketRequestParams("PUT",R,"cors",N),M=` `,F=function(we){M+="".concat(we,"")},H=function(we){M+="".concat(we,"")},P=function(we){M+="".concat(we,"")},V=function(we){M+="".concat(we,"")},G=0,Q=A.length;G",m(ne.allowedOrigin).forEach(F),m(ne.allowedMethod).forEach(H),m(ne.allowedHeader).forEach(P),m(ne.exposeHeader).forEach(V),ne.maxAgeSeconds&&(M+="".concat(ne.maxAgeSeconds,"")),M+="";return M+="",L.content=M,L.mime="xml",L.successStatuses=[200],he.next=16,this.request(L);case 16:return ue=he.sent,he.abrupt("return",{res:ue.res});case 18:case"end":return he.stop()}},_,this)}));function T(_,R,A){return x.apply(this,arguments)}return T}(),c.getBucketCORS=function(){var x=(0,g.default)(d.default.mark(function _(R,A){var N,L,M,F;return d.default.wrap(function(P){for(;;)switch(P.prev=P.next){case 0:return N=this._bucketRequestParams("GET",R,"cors",A),N.successStatuses=[200],N.xmlResponse=!0,P.next=5,this.request(N);case 5:return L=P.sent,M=[],L.data&&L.data.CORSRule&&(F=L.data.CORSRule,h(F)||(F=[F]),F.forEach(function(V){var G={};Object.keys(V).forEach(function(Q){G[Q.slice(0,1).toLowerCase()+Q.slice(1,Q.length)]=V[Q]}),M.push(G)})),P.abrupt("return",{rules:M,res:L.res});case 9:case"end":return P.stop()}},_,this)}));function T(_,R){return x.apply(this,arguments)}return T}(),c.deleteBucketCORS=function(){var x=(0,g.default)(d.default.mark(function _(R,A){var N,L;return d.default.wrap(function(F){for(;;)switch(F.prev=F.next){case 0:return N=this._bucketRequestParams("DELETE",R,"cors",A),N.successStatuses=[204],F.next=4,this.request(N);case 4:return L=F.sent,F.abrupt("return",{res:L.res});case 6:case"end":return F.stop()}},_,this)}));function T(_,R){return x.apply(this,arguments)}return T}(),c.putBucketReferer=function(){var x=(0,g.default)(d.default.mark(function _(R,A,N,L){var M,F,H,P;return d.default.wrap(function(G){for(;;)switch(G.prev=G.next){case 0:if(M=this._bucketRequestParams("PUT",R,"referer",L),F=` `,F+=" ".concat(A?"true":"false",` `),N&&N.length>0){for(F+=` `,H=0;H".concat(N[H],` `);F+=` `}else F+=` `;return F+="",M.content=F,M.mime="xml",M.successStatuses=[200],G.next=10,this.request(M);case 10:return P=G.sent,G.abrupt("return",{res:P.res});case 12:case"end":return G.stop()}},_,this)}));function T(_,R,A,N){return x.apply(this,arguments)}return T}(),c.getBucketReferer=function(){var x=(0,g.default)(d.default.mark(function _(R,A){var N,L,M;return d.default.wrap(function(H){for(;;)switch(H.prev=H.next){case 0:return N=this._bucketRequestParams("GET",R,"referer",A),N.successStatuses=[200],N.xmlResponse=!0,H.next=5,this.request(N);case 5:return L=H.sent,M=L.data.RefererList.Referer||null,M&&(h(M)||(M=[M])),H.abrupt("return",{allowEmpty:L.data.AllowEmptyReferer==="true",referers:M,res:L.res});case 9:case"end":return H.stop()}},_,this)}));function T(_,R){return x.apply(this,arguments)}return T}(),c.deleteBucketReferer=function(){var x=(0,g.default)(d.default.mark(function _(R,A){return d.default.wrap(function(L){for(;;)switch(L.prev=L.next){case 0:return L.next=2,this.putBucketReferer(R,!0,null,A);case 2:return L.abrupt("return",L.sent);case 3:case"end":return L.stop()}},_,this)}));function T(_,R){return x.apply(this,arguments)}return T}(),c._bucketRequestParams=function(T,_,R,A){return{method:T,bucket:_,subres:R,timeout:A&&A.timeout,ctx:A&&A.ctx}}},{"../common/utils/checkBucketName":51,"@babel/runtime/helpers/asyncToGenerator":77,"@babel/runtime/helpers/interopRequireDefault":78,"@babel/runtime/regenerator":80,assert:82,"core-js/modules/es.array.slice.js":281,"core-js/modules/es.object.keys.js":290,"core-js/modules/es.object.to-string.js":291,"core-js/modules/web.dom-collections.for-each.js":339}],3:[function(s,E,I){(function(u,d){(function(){"use strict";var g=s("@babel/runtime/helpers/interopRequireDefault"),y=g(s("@babel/runtime/regenerator")),S=g(s("@babel/runtime/helpers/asyncToGenerator"));s("core-js/modules/es.function.name.js"),s("core-js/modules/es.regexp.exec.js"),s("core-js/modules/es.string.split.js"),s("core-js/modules/es.object.assign.js"),s("core-js/modules/es.array.includes.js"),s("core-js/modules/es.string.replace.js"),s("core-js/modules/es.array.concat.js"),s("core-js/modules/es.symbol.js"),s("core-js/modules/es.symbol.description.js"),s("core-js/modules/es.array.slice.js"),s("core-js/modules/es.object.to-string.js"),s("core-js/modules/es.promise.js"),s("core-js/modules/es.regexp.to-string.js");var v=s("debug")("ali-oss"),c=s("xml2js"),h=s("agentkeepalive"),m=s("merge-descriptors"),x=s("platform"),T=s("utility"),_=s("urllib"),R=s("./version"),A=s("bowser"),N=s("../common/signUtils"),L=s("../common/client/initOptions"),M=s("../common/utils/createRequest"),F=M.createRequest,H=s("../common/utils/encoder"),P=H.encoder,V=s("../common/client/getReqUrl"),G=V.getReqUrl,Q=s("../common/utils/setSTSToken"),ne=Q.setSTSToken,ue=s("../common/utils/retry"),ae=ue.retry,he=s("../common/utils/isFunction"),ce=he.isFunction,we=new h;function me(){var De=x.name,Be=x.version;De&&De.toLowerCase&&De.toLowerCase()==="ie"&&Be.split(".")[0]<10&&console.warn("ali-oss does not support the current browser")}function Le(){return location&&location.protocol==="https:"}function ee(De,Be){if(me(),!(this instanceof ee))return new ee(De,Be);De&&De.inited?this.options=De:this.options=ee.initOptions(De),this.options.cancelFlag=!1,this.options.urllib?this.urllib=this.options.urllib:(this.urllib=_,this.agent=this.options.agent||we),this.ctx=Be,this.userAgent=this._getUserAgent(),this.stsTokenFreshTime=new Date,this.options.amendTimeSkewed=0}E.exports=ee,ee.initOptions=function(Be){Be.stsToken||console.warn("Please use STS Token for safety, see more details at https://help.aliyun.com/document_detail/32077.html");var He=Object.assign({secure:Le(),useFetch:!1},Be);return L(He)};var se=ee.prototype;se.debug=v,m(se,s("./object")),m(se,s("./bucket")),m(se,s("../common/bucket/getBucketWebsite")),m(se,s("../common/bucket/putBucketWebsite")),m(se,s("../common/bucket/deleteBucketWebsite")),m(se,s("../common/bucket/getBucketLifecycle")),m(se,s("../common/bucket/putBucketLifecycle")),m(se,s("../common/bucket/deleteBucketLifecycle")),m(se,s("../common/bucket/putBucketVersioning")),m(se,s("../common/bucket/getBucketVersioning")),m(se,s("../common/bucket/getBucketInventory")),m(se,s("../common/bucket/deleteBucketInventory")),m(se,s("../common/bucket/listBucketInventory")),m(se,s("../common/bucket/putBucketInventory")),m(se,s("../common/bucket/abortBucketWorm")),m(se,s("../common/bucket/completeBucketWorm")),m(se,s("../common/bucket/extendBucketWorm")),m(se,s("../common/bucket/getBucketWorm")),m(se,s("../common/bucket/initiateBucketWorm")),m(se,s("./managed-upload")),m(se,s("../common/multipart-copy")),m(se,s("../common/multipart")),m(se,s("../common/parallel")),se.signature=function(Be){return this.debug("authorization stringToSign: %s",Be,"info"),N.computeSignature(this.options.accessKeySecret,Be,this.options.headerEncoding)},se._getReqUrl=G,se.authorization=function(Be,He,Fe,Je){var Me=N.buildCanonicalString(Be.toUpperCase(),He,{headers:Je,parameters:Fe});return N.authorization(this.options.accessKeyId,this.options.accessKeySecret,Me,this.options.headerEncoding)},se.request=function(){var De=(0,S.default)(y.default.mark(function Be(He){var Fe=this;return y.default.wrap(function(Me){for(;;)switch(Me.prev=Me.next){case 0:if(!this.options.retryMax){Me.next=6;break}return Me.next=3,ae(le.bind(this),this.options.retryMax,{errorHandler:function(Re){var Oe=function(fe){if(He.stream)return!1;var z=[-1,-2].includes(fe.status),J=Fe.options.requestErrorRetryHandle||function(){return!0};return z&&J(fe)};return!!Oe(Re)}})(He);case 3:return Me.abrupt("return",Me.sent);case 6:return Me.abrupt("return",le.call(this,He));case 7:case"end":return Me.stop()}},Be,this)}));return function(Be){return De.apply(this,arguments)}}();function le(De){return ke.apply(this,arguments)}function ke(){return ke=(0,S.default)(y.default.mark(function De(Be){var He,Fe,Je,Me,lt,Re;return y.default.wrap(function(pe){for(;;)switch(pe.prev=pe.next){case 0:if(!(this.options.stsToken&&ce(this.options.refreshSTSToken))){pe.next=3;break}return pe.next=3,ne.call(this);case 3:return He=F.call(this,Be),this.options.useFetch||(He.params.mode="disable-fetch"),Me=!!Be.stream,pe.prev=6,pe.next=9,this.urllib.request(He.url,He.params);case 9:Fe=pe.sent,this.debug("response %s %s, got %s, headers: %j",Be.method,He.url,Fe.status,Fe.headers,"info"),pe.next=16;break;case 13:pe.prev=13,pe.t0=pe.catch(6),Je=pe.t0;case 16:if(!(Fe&&Be.successStatuses&&Be.successStatuses.indexOf(Fe.status)===-1)){pe.next=28;break}return pe.next=19,this.requestError(Fe);case 19:if(lt=pe.sent,!(lt.code==="RequestTimeTooSkewed"&&!Me)){pe.next=25;break}return this.options.amendTimeSkewed=+new Date(lt.serverTime)-new Date,pe.next=24,this.request(Be);case 24:return pe.abrupt("return",pe.sent);case 25:lt.params=Be,pe.next=32;break;case 28:if(!Je){pe.next=32;break}return pe.next=31,this.requestError(Je);case 31:lt=pe.sent;case 32:if(!lt){pe.next=34;break}throw lt;case 34:if(!Be.xmlResponse){pe.next=39;break}return pe.next=37,this.parseXML(Fe.data);case 37:Re=pe.sent,Fe.data=Re;case 39:return pe.abrupt("return",Fe);case 40:case"end":return pe.stop()}},De,this,[[6,13]])})),ke.apply(this,arguments)}se._getResource=function(Be){var He="/";return Be.bucket&&(He+="".concat(Be.bucket,"/")),Be.object&&(He+=P(Be.object,this.options.headerEncoding)),He},se._escape=function(Be){return T.encodeURIComponent(Be).replace(/%2F/g,"/")},se._getUserAgent=function(){var Be=d&&d.browser?"js":"nodejs",He="aliyun-sdk-".concat(Be,"/").concat(R.version),Fe=x.description;return!Fe&&d&&(Fe="Node.js ".concat(d.version.slice(1)," on ").concat(d.platform," ").concat(d.arch)),this._checkUserAgent("".concat(He," ").concat(Fe))},se._checkUserAgent=function(Be){var He=Be.replace(/\u03b1/,"alpha").replace(/\u03b2/,"beta");return He},se.checkBrowserAndVersion=function(Be,He){return A.name===Be&&A.version.split(".")[0]===He},se.parseXML=function(Be){return new Promise(function(He,Fe){u.isBuffer(Be)&&(Be=Be.toString()),c.parseString(Be,{explicitRoot:!1,explicitArray:!1},function(Je,Me){Je?Fe(Je):He(Me)})})},se.requestError=function(){var De=(0,S.default)(y.default.mark(function He(Fe){var Je,Me,lt,Re;return y.default.wrap(function(pe){for(;;)switch(pe.prev=pe.next){case 0:if(Je=null,!(!Fe.data||!Fe.data.length)){pe.next=5;break}Fe.status===-1||Fe.status===-2?(Je=new Error(Fe.message),Je.name=Fe.name,Je.status=Fe.status,Je.code=Fe.name):(Fe.status===404?(Je=new Error("Object not exists"),Je.name="NoSuchKeyError",Je.status=404,Je.code="NoSuchKey"):Fe.status===412?(Je=new Error("Pre condition failed"),Je.name="PreconditionFailedError",Je.status=412,Je.code="PreconditionFailed"):(Je=new Error("Unknow error, status: ".concat(Fe.status)),Je.name="UnknownError",Je.status=Fe.status),Je.requestId=Fe.headers["x-oss-request-id"],Je.host=""),pe.next=32;break;case 5:return Me=String(Fe.data),this.debug("request response error data: %s",Me,"error"),pe.prev=7,pe.next=10,this.parseXML(Me);case 10:if(pe.t0=pe.sent,pe.t0){pe.next=13;break}pe.t0={};case 13:lt=pe.t0,pe.next=23;break;case 16:return pe.prev=16,pe.t1=pe.catch(7),this.debug(Me,"error"),pe.t1.message+=` raw xml: `.concat(Me),pe.t1.status=Fe.status,pe.t1.requestId=Fe.headers["x-oss-request-id"],pe.abrupt("return",pe.t1);case 23:Re=lt.Message||"unknow request error, status: ".concat(Fe.status),lt.Condition&&(Re+=" (condition: ".concat(lt.Condition,")")),Je=new Error(Re),Je.name=lt.Code?"".concat(lt.Code,"Error"):"UnknownError",Je.status=Fe.status,Je.code=lt.Code,Je.requestId=lt.RequestId,Je.hostId=lt.HostId,Je.serverTime=lt.ServerTime;case 32:return this.debug("generate error %j",Je,"error"),pe.abrupt("return",Je);case 34:case"end":return pe.stop()}},He,this,[[7,16]])}));function Be(He){return De.apply(this,arguments)}return Be}()}).call(this)}).call(this,{isBuffer:s("../../node_modules/is-buffer/index.js")},s("_process"))},{"../../node_modules/is-buffer/index.js":366,"../common/bucket/abortBucketWorm":7,"../common/bucket/completeBucketWorm":8,"../common/bucket/deleteBucketInventory":9,"../common/bucket/deleteBucketLifecycle":10,"../common/bucket/deleteBucketWebsite":11,"../common/bucket/extendBucketWorm":12,"../common/bucket/getBucketInventory":13,"../common/bucket/getBucketLifecycle":14,"../common/bucket/getBucketVersioning":15,"../common/bucket/getBucketWebsite":16,"../common/bucket/getBucketWorm":17,"../common/bucket/initiateBucketWorm":18,"../common/bucket/listBucketInventory":19,"../common/bucket/putBucketInventory":20,"../common/bucket/putBucketLifecycle":21,"../common/bucket/putBucketVersioning":22,"../common/bucket/putBucketWebsite":23,"../common/client/getReqUrl":25,"../common/client/initOptions":26,"../common/multipart":30,"../common/multipart-copy":29,"../common/parallel":49,"../common/signUtils":50,"../common/utils/createRequest":56,"../common/utils/encoder":59,"../common/utils/isFunction":68,"../common/utils/retry":74,"../common/utils/setSTSToken":76,"./bucket":2,"./managed-upload":4,"./object":5,"./version":6,"@babel/runtime/helpers/asyncToGenerator":77,"@babel/runtime/helpers/interopRequireDefault":78,"@babel/runtime/regenerator":80,_process:467,agentkeepalive:81,bowser:88,"core-js/modules/es.array.concat.js":272,"core-js/modules/es.array.includes.js":277,"core-js/modules/es.array.slice.js":281,"core-js/modules/es.function.name.js":284,"core-js/modules/es.object.assign.js":287,"core-js/modules/es.object.to-string.js":291,"core-js/modules/es.promise.js":295,"core-js/modules/es.regexp.exec.js":300,"core-js/modules/es.regexp.to-string.js":301,"core-js/modules/es.string.replace.js":305,"core-js/modules/es.string.split.js":307,"core-js/modules/es.symbol.description.js":310,"core-js/modules/es.symbol.js":313,debug:465,"merge-descriptors":372,platform:379,urllib:475,utility:474,xml2js:426}],4:[function(s,E,I){(function(u){(function(){"use strict";var d=s("@babel/runtime/helpers/interopRequireDefault"),g=d(s("@babel/runtime/regenerator"));s("core-js/modules/es.function.name.js"),s("core-js/modules/es.object.to-string.js"),s("core-js/modules/es.promise.js"),s("core-js/modules/es.array.from.js"),s("core-js/modules/es.string.iterator.js"),s("core-js/modules/es.array.map.js"),s("core-js/modules/es.array.filter.js"),s("core-js/modules/es.array.find.js"),s("core-js/modules/es.array.concat.js"),s("core-js/modules/es.regexp.to-string.js"),s("core-js/modules/es.array.slice.js"),s("core-js/modules/es.array.iterator.js"),s("core-js/modules/es.array-buffer.slice.js"),s("core-js/modules/es.typed-array.uint8-array.js"),s("core-js/modules/es.typed-array.copy-within.js"),s("core-js/modules/es.typed-array.every.js"),s("core-js/modules/es.typed-array.fill.js"),s("core-js/modules/es.typed-array.filter.js"),s("core-js/modules/es.typed-array.find.js"),s("core-js/modules/es.typed-array.find-index.js"),s("core-js/modules/es.typed-array.for-each.js"),s("core-js/modules/es.typed-array.includes.js"),s("core-js/modules/es.typed-array.index-of.js"),s("core-js/modules/es.typed-array.iterator.js"),s("core-js/modules/es.typed-array.join.js"),s("core-js/modules/es.typed-array.last-index-of.js"),s("core-js/modules/es.typed-array.map.js"),s("core-js/modules/es.typed-array.reduce.js"),s("core-js/modules/es.typed-array.reduce-right.js"),s("core-js/modules/es.typed-array.reverse.js"),s("core-js/modules/es.typed-array.set.js"),s("core-js/modules/es.typed-array.slice.js"),s("core-js/modules/es.typed-array.some.js"),s("core-js/modules/es.typed-array.sort.js"),s("core-js/modules/es.typed-array.subarray.js"),s("core-js/modules/es.typed-array.to-locale-string.js"),s("core-js/modules/es.typed-array.to-string.js");var y=d(s("@babel/runtime/helpers/asyncToGenerator")),S=s("util"),v=s("path"),c=s("mime"),h=s("copy-to"),m=s("../common/utils/isBlob"),x=m.isBlob,T=s("../common/utils/isFile"),_=T.isFile,R=s("../common/utils/isBuffer"),A=R.isBuffer,N=I;N.multipartUpload=function(){var P=(0,y.default)(g.default.mark(function G(Q,ne){var ue,ae,he,ce,we,me,Le,ee,se,le=arguments;return g.default.wrap(function(De){for(;;)switch(De.prev=De.next){case 0:if(ue=le.length>2&&le[2]!==void 0?le[2]:{},this.resetCancelFlag(),ue.disabledMD5=ue.disabledMD5===void 0?!0:!!ue.disabledMD5,!(ue.checkpoint&&ue.checkpoint.uploadId)){De.next=8;break}return ne&&_(ne)&&(ue.checkpoint.file=ne),De.next=7,this._resumeMultipart(ue.checkpoint,ue);case 7:return De.abrupt("return",De.sent);case 8:return ae=102400,ue.mime||(_(ne)?ue.mime=c.getType(v.extname(ne.name)):x(ne)?ue.mime=ne.type:A(ne)?ue.mime="":ue.mime=c.getType(v.extname(ne))),ue.headers=ue.headers||{},this._convertMetaToHeaders(ue.meta,ue.headers),De.next=14,this._getFileSize(ne);case 14:if(he=De.sent,!(he0&&h(me).to(ee),se=this._divideParts(he,ce),le=se.length,ke=!1,De=function(z,J){return new Promise(function(){var be=(0,y.default)(g.default.mark(function _e(oe,ie){var ve,Ne,ze,Ve,yt;return g.default.wrap(function(St){for(;;)switch(St.prev=St.next){case 0:if(St.prev=0,z.isCancel()){St.next=29;break}return ve=se[J-1],St.next=5,z._createBuffer(ae,ve.start,ve.end);case 5:return Ne=St.sent,ze={content:Ne,size:ve.end-ve.start},St.prev=7,St.next=10,z._uploadPart(Le,we,J,ze,ne);case 10:Ve=St.sent,St.next=18;break;case 13:if(St.prev=13,St.t0=St.catch(7),St.t0.status!==404){St.next=17;break}throw z._makeAbortEvent();case 17:throw St.t0;case 18:if(!(!z.isCancel()&&!ke)){St.next=26;break}if(Q.doneParts.push({number:J,etag:Ve.res.headers.etag}),!ne.progress){St.next=23;break}return St.next=23,ne.progress(me.length/(le+1),Q,Ve.res);case 23:oe({number:J,etag:Ve.res.headers.etag}),St.next=27;break;case 26:oe();case 27:St.next=30;break;case 29:oe();case 30:St.next=41;break;case 32:St.prev=32,St.t1=St.catch(0),yt=new Error,yt.name=St.t1.name,yt.message=St.t1.message,yt.stack=St.t1.stack,yt.partNum=J,h(St.t1).to(yt),ie(yt);case 41:case"end":return St.stop()}},_e,null,[[0,32],[7,13]])}));return function(_e,oe){return be.apply(this,arguments)}}())},Be=Array.from(new Array(le),function(fe,z){return z+1}),He=ee.map(function(fe){return fe.number}),Fe=Be.filter(function(fe){return He.indexOf(fe)<0}),Je=5,Me=ne.parallel||Je,pe.next=17,this._parallel(Fe,Me,function(fe){return new Promise(function(z,J){De(ue,fe).then(function(be){be&&ee.push(be),z()}).catch(function(be){J(be)})})});case 17:if(lt=pe.sent,ke=!0,Re=lt.find(function(fe){return fe.name==="abort"}),!Re){pe.next=22;break}throw Re;case 22:if(!this.isCancel()){pe.next=25;break}throw De=null,this._makeCancelEvent();case 25:if(!(lt&<.length>0)){pe.next=28;break}throw lt[0].message="Failed to upload some parts with error: ".concat(lt[0].toString()," part_num: ").concat(lt[0].partNum),lt[0];case 28:return pe.next=30,this.completeMultipartUpload(Le,we,ee,ne);case 30:return pe.abrupt("return",pe.sent);case 31:case"end":return pe.stop()}},G,this)}));function V(G,Q){return P.apply(this,arguments)}return V}(),N._getFileSize=function(){var P=(0,y.default)(g.default.mark(function G(Q){return g.default.wrap(function(ue){for(;;)switch(ue.prev=ue.next){case 0:if(!A(Q)){ue.next=4;break}return ue.abrupt("return",Q.length);case 4:if(!(x(Q)||_(Q))){ue.next=6;break}return ue.abrupt("return",Q.size);case 6:throw new Error("_getFileSize requires Buffer/File/Blob.");case 7:case"end":return ue.stop()}},G)}));function V(G){return P.apply(this,arguments)}return V}();var L=s("stream"),M=L.Readable;function F(P,V){if(!(this instanceof F))return new F(P,V);M.call(this,V),this.file=P,this.reader=new FileReader,this.start=0,this.finish=!1,this.fileBuffer=null}S.inherits(F,M),F.prototype.readFileAndPush=function(V){if(this.fileBuffer)for(var G=!0;G&&this.fileBuffer&&this.startthis.fileBuffer.length?this.fileBuffer.length:ne,this.start=ne,G=this.push(this.fileBuffer.slice(Q,ne))}},F.prototype._read=function(V){if(this.file&&this.start>=this.file.size||this.fileBuffer&&this.start>=this.fileBuffer.length||this.finish||this.start===0&&!this.file){this.finish||(this.fileBuffer=null,this.finish=!0),this.push(null);return}var G=16*1024;V=V||G;var Q=this;this.reader.onload=function(ue){Q.fileBuffer=u.from(new Uint8Array(ue.target.result)),Q.file=null,Q.readFileAndPush(V)},this.start===0?this.reader.readAsArrayBuffer(this.file):this.readFileAndPush(V)};function H(P){return P.arrayBuffer?P.arrayBuffer():new Promise(function(V,G){var Q=new FileReader;Q.onload=function(ne){V(ne.target.result)},Q.onerror=function(ne){G(ne)},Q.readAsArrayBuffer(P)})}N._createBuffer=function(){var P=(0,y.default)(g.default.mark(function G(Q,ne,ue){var ae,he;return g.default.wrap(function(we){for(;;)switch(we.prev=we.next){case 0:if(!(x(Q)||_(Q))){we.next=8;break}return ae=Q.slice(ne,ue),we.next=4,H(ae);case 4:return he=we.sent,we.abrupt("return",u.from(he));case 8:if(!A(Q)){we.next=12;break}return we.abrupt("return",Q.subarray(ne,ue));case 12:throw new Error("_createBuffer requires File/Blob/Buffer.");case 13:case"end":return we.stop()}},G)}));function V(G,Q,ne){return P.apply(this,arguments)}return V}(),N._getPartSize=function(V,G){var Q=1e4,ne=1*1024*1024;G||(G=ne);var ue=Math.ceil(V/Q);return G1&&me[1]!==void 0?me[1]:{},ne=G["continuation-token"]||G.continuationToken,ne&&(Q.subres=Object.assign({"continuation-token":ne},Q.subres)),ue=this._objectRequestParams("GET","",Q),ue.query=Object.assign({"list-type":2},G),delete ue.query["continuation-token"],delete ue.query.continuationToken,ue.xmlResponse=!0,ue.successStatuses=[200],ee.next=11,this.request(ue);case 11:return ae=ee.sent,he=ae.data.Contents||[],ce=this,he&&(Array.isArray(he)||(he=[he]),he=he.map(function(se){var le=null;return se.Owner&&(le={id:se.Owner.ID,displayName:se.Owner.DisplayName}),{name:se.Key,url:ce._objectUrl(se.Key),lastModified:se.LastModified,etag:se.ETag,type:se.Type,size:Number(se.Size),storageClass:se.StorageClass,owner:le}})),we=ae.data.CommonPrefixes||null,we&&(Array.isArray(we)||(we=[we]),we=we.map(function(se){return se.Prefix})),ee.abrupt("return",{res:ae.res,objects:he,prefixes:we,isTruncated:ae.data.IsTruncated==="true",keyCount:+ae.data.KeyCount,continuationToken:ae.data.ContinuationToken||null,nextContinuationToken:ae.data.NextContinuationToken||null});case 18:case"end":return ee.stop()}},V,this)}));function P(V){return H.apply(this,arguments)}return P}(),F.restore=function(){var H=(0,g.default)(d.default.mark(function V(G){var Q,ne,ue,ae,he=arguments;return d.default.wrap(function(we){for(;;)switch(we.prev=we.next){case 0:return Q=he.length>1&&he[1]!==void 0?he[1]:{type:"Archive"},Q=Q||{},Q.subres=Object.assign({restore:""},Q.subres),Q.versionId&&(Q.subres.versionId=Q.versionId),ne=this._objectRequestParams("POST",G,Q),Q.type==="ColdArchive"&&(ue={RestoreRequest:{Days:Q.Days?Q.Days:2,JobParameters:{Tier:Q.JobParameters?Q.JobParameters:"Standard"}}},ne.content=M(ue,{headers:!0}),ne.mime="xml"),ne.successStatuses=[202],we.next=9,this.request(ne);case 9:return ae=we.sent,we.abrupt("return",{res:ae.res});case 11:case"end":return we.stop()}},V,this)}));function P(V){return H.apply(this,arguments)}return P}(),F._objectUrl=function(P){return this._getReqUrl({bucket:this.options.bucket,object:P})},F._objectRequestParams=function(P,V,G){if(!this.options.bucket&&!this.options.cname)throw new Error("Please create a bucket first");G=G||{},V=this._objectName(V);var Q={object:V,bucket:this.options.bucket,method:P,subres:G&&G.subres,timeout:G&&G.timeout,ctx:G&&G.ctx};return G.headers&&(Q.headers={},S(G.headers).to(Q.headers)),Q},F._objectName=function(P){return P.replace(/^\/+/,"")},F._convertMetaToHeaders=function(P,V){P&&Object.keys(P).forEach(function(G){V["x-oss-meta-".concat(G)]=P[G]})},F._deleteFileSafe=function(P){var V=this;return new Promise(function(G){y.exists(P,function(Q){Q?y.unlink(P,function(ne){ne&&V.debug("unlink %j error: %s",P,ne,"error"),G()}):G()})})}},{"../common/callback":24,"../common/image":27,"../common/object/asyncSignatureUrl":31,"../common/object/copyObject":32,"../common/object/delete":33,"../common/object/deleteMulti":34,"../common/object/deleteObjectTagging":35,"../common/object/generateObjectUrl":36,"../common/object/get":37,"../common/object/getACL":38,"../common/object/getBucketVersions":39,"../common/object/getObjectMeta":40,"../common/object/getObjectTagging":41,"../common/object/getObjectUrl":42,"../common/object/getSymlink":43,"../common/object/head":44,"../common/object/putACL":45,"../common/object/putObjectTagging":46,"../common/object/putSymlink":47,"../common/object/signatureUrl":48,"../common/utils/isBlob":64,"../common/utils/isBuffer":65,"../common/utils/isFile":67,"../common/utils/obj2xml":72,"@babel/runtime/helpers/asyncToGenerator":77,"@babel/runtime/helpers/interopRequireDefault":78,"@babel/runtime/regenerator":80,"copy-to":94,"core-js/modules/es.array.map.js":280,"core-js/modules/es.function.name.js":284,"core-js/modules/es.number.constructor.js":286,"core-js/modules/es.object.assign.js":287,"core-js/modules/es.object.keys.js":290,"core-js/modules/es.object.to-string.js":291,"core-js/modules/es.promise.js":295,"core-js/modules/es.regexp.exec.js":300,"core-js/modules/es.regexp.to-string.js":301,"core-js/modules/es.string.replace.js":305,"core-js/modules/web.dom-collections.for-each.js":339,fs:89,"merge-descriptors":372,mime:374,path:378}],6:[function(s,E,I){"use strict";I.version="6.18.1"},{}],7:[function(s,E,I){"use strict";var u=s("@babel/runtime/helpers/interopRequireDefault"),d=u(s("@babel/runtime/regenerator")),g=u(s("@babel/runtime/helpers/asyncToGenerator"));Object.defineProperty(I,"__esModule",{value:!0}),I.abortBucketWorm=void 0;var y=s("../utils/checkBucketName");function S(c,h){return v.apply(this,arguments)}function v(){return v=(0,g.default)(d.default.mark(function c(h,m){var x,T;return d.default.wrap(function(R){for(;;)switch(R.prev=R.next){case 0:return y.checkBucketName(h),x=this._bucketRequestParams("DELETE",h,"worm",m),R.next=4,this.request(x);case 4:return T=R.sent,R.abrupt("return",{res:T.res,status:T.status});case 6:case"end":return R.stop()}},c,this)})),v.apply(this,arguments)}I.abortBucketWorm=S},{"../utils/checkBucketName":51,"@babel/runtime/helpers/asyncToGenerator":77,"@babel/runtime/helpers/interopRequireDefault":78,"@babel/runtime/regenerator":80}],8:[function(s,E,I){"use strict";var u=s("@babel/runtime/helpers/interopRequireDefault"),d=u(s("@babel/runtime/regenerator")),g=u(s("@babel/runtime/helpers/asyncToGenerator"));Object.defineProperty(I,"__esModule",{value:!0}),I.completeBucketWorm=void 0;var y=s("../utils/checkBucketName");function S(c,h,m){return v.apply(this,arguments)}function v(){return v=(0,g.default)(d.default.mark(function c(h,m,x){var T,_;return d.default.wrap(function(A){for(;;)switch(A.prev=A.next){case 0:return y.checkBucketName(h),T=this._bucketRequestParams("POST",h,{wormId:m},x),A.next=4,this.request(T);case 4:return _=A.sent,A.abrupt("return",{res:_.res,status:_.status});case 6:case"end":return A.stop()}},c,this)})),v.apply(this,arguments)}I.completeBucketWorm=S},{"../utils/checkBucketName":51,"@babel/runtime/helpers/asyncToGenerator":77,"@babel/runtime/helpers/interopRequireDefault":78,"@babel/runtime/regenerator":80}],9:[function(s,E,I){"use strict";var u=s("@babel/runtime/helpers/interopRequireDefault"),d=u(s("@babel/runtime/regenerator"));s("core-js/modules/es.object.assign.js");var g=u(s("@babel/runtime/helpers/asyncToGenerator"));Object.defineProperty(I,"__esModule",{value:!0}),I.deleteBucketInventory=void 0;var y=s("../utils/checkBucketName");function S(c,h){return v.apply(this,arguments)}function v(){return v=(0,g.default)(d.default.mark(function c(h,m){var x,T,_,R,A=arguments;return d.default.wrap(function(L){for(;;)switch(L.prev=L.next){case 0:return x=A.length>2&&A[2]!==void 0?A[2]:{},T=Object.assign({inventory:"",inventoryId:m},x.subres),y.checkBucketName(h),_=this._bucketRequestParams("DELETE",h,T,x),_.successStatuses=[204],L.next=7,this.request(_);case 7:return R=L.sent,L.abrupt("return",{status:R.status,res:R.res});case 9:case"end":return L.stop()}},c,this)})),v.apply(this,arguments)}I.deleteBucketInventory=S},{"../utils/checkBucketName":51,"@babel/runtime/helpers/asyncToGenerator":77,"@babel/runtime/helpers/interopRequireDefault":78,"@babel/runtime/regenerator":80,"core-js/modules/es.object.assign.js":287}],10:[function(s,E,I){"use strict";var u=s("@babel/runtime/helpers/interopRequireDefault"),d=u(s("@babel/runtime/regenerator")),g=u(s("@babel/runtime/helpers/asyncToGenerator")),y=s("../utils/checkBucketName"),S=y.checkBucketName,v=I;v.deleteBucketLifecycle=function(){var c=(0,g.default)(d.default.mark(function m(x,T){var _,R;return d.default.wrap(function(N){for(;;)switch(N.prev=N.next){case 0:return S(x),_=this._bucketRequestParams("DELETE",x,"lifecycle",T),_.successStatuses=[204],N.next=5,this.request(_);case 5:return R=N.sent,N.abrupt("return",{res:R.res});case 7:case"end":return N.stop()}},m,this)}));function h(m,x){return c.apply(this,arguments)}return h}()},{"../utils/checkBucketName":51,"@babel/runtime/helpers/asyncToGenerator":77,"@babel/runtime/helpers/interopRequireDefault":78,"@babel/runtime/regenerator":80}],11:[function(s,E,I){"use strict";var u=s("@babel/runtime/helpers/interopRequireDefault"),d=u(s("@babel/runtime/regenerator")),g=u(s("@babel/runtime/helpers/asyncToGenerator")),y=s("../utils/checkBucketName"),S=y.checkBucketName,v=I;v.deleteBucketWebsite=function(){var c=(0,g.default)(d.default.mark(function m(x,T){var _,R;return d.default.wrap(function(N){for(;;)switch(N.prev=N.next){case 0:return S(x),_=this._bucketRequestParams("DELETE",x,"website",T),_.successStatuses=[204],N.next=5,this.request(_);case 5:return R=N.sent,N.abrupt("return",{res:R.res});case 7:case"end":return N.stop()}},m,this)}));function h(m,x){return c.apply(this,arguments)}return h}()},{"../utils/checkBucketName":51,"@babel/runtime/helpers/asyncToGenerator":77,"@babel/runtime/helpers/interopRequireDefault":78,"@babel/runtime/regenerator":80}],12:[function(s,E,I){"use strict";var u=s("@babel/runtime/helpers/interopRequireDefault"),d=u(s("@babel/runtime/regenerator")),g=u(s("@babel/runtime/helpers/asyncToGenerator"));Object.defineProperty(I,"__esModule",{value:!0}),I.extendBucketWorm=void 0;var y=s("../utils/checkBucketName"),S=s("../utils/obj2xml");function v(h,m,x,T){return c.apply(this,arguments)}function c(){return c=(0,g.default)(d.default.mark(function h(m,x,T,_){var R,A,N;return d.default.wrap(function(M){for(;;)switch(M.prev=M.next){case 0:return y.checkBucketName(m),R=this._bucketRequestParams("POST",m,{wormExtend:"",wormId:x},_),A={ExtendWormConfiguration:{RetentionPeriodInDays:T}},R.mime="xml",R.content=S.obj2xml(A,{headers:!0}),R.successStatuses=[200],M.next=8,this.request(R);case 8:return N=M.sent,M.abrupt("return",{res:N.res,status:N.status});case 10:case"end":return M.stop()}},h,this)})),c.apply(this,arguments)}I.extendBucketWorm=v},{"../utils/checkBucketName":51,"../utils/obj2xml":72,"@babel/runtime/helpers/asyncToGenerator":77,"@babel/runtime/helpers/interopRequireDefault":78,"@babel/runtime/regenerator":80}],13:[function(s,E,I){"use strict";var u=s("@babel/runtime/helpers/interopRequireDefault"),d=u(s("@babel/runtime/regenerator"));s("core-js/modules/es.object.assign.js");var g=u(s("@babel/runtime/helpers/asyncToGenerator"));Object.defineProperty(I,"__esModule",{value:!0}),I.getBucketInventory=void 0;var y=s("../utils/checkBucketName"),S=s("../utils/formatInventoryConfig");function v(h,m){return c.apply(this,arguments)}function c(){return c=(0,g.default)(d.default.mark(function h(m,x){var T,_,R,A,N=arguments;return d.default.wrap(function(M){for(;;)switch(M.prev=M.next){case 0:return T=N.length>2&&N[2]!==void 0?N[2]:{},_=Object.assign({inventory:"",inventoryId:x},T.subres),y.checkBucketName(m),R=this._bucketRequestParams("GET",m,_,T),R.successStatuses=[200],R.xmlResponse=!0,M.next=8,this.request(R);case 8:return A=M.sent,M.abrupt("return",{status:A.status,res:A.res,inventory:S.formatInventoryConfig(A.data)});case 10:case"end":return M.stop()}},h,this)})),c.apply(this,arguments)}I.getBucketInventory=v},{"../utils/checkBucketName":51,"../utils/formatInventoryConfig":60,"@babel/runtime/helpers/asyncToGenerator":77,"@babel/runtime/helpers/interopRequireDefault":78,"@babel/runtime/regenerator":80,"core-js/modules/es.object.assign.js":287}],14:[function(s,E,I){"use strict";var u=s("@babel/runtime/helpers/interopRequireDefault"),d=u(s("@babel/runtime/regenerator"));s("core-js/modules/es.array.map.js");var g=u(s("@babel/runtime/helpers/asyncToGenerator")),y=s("../utils/checkBucketName"),S=y.checkBucketName,v=s("../utils/isArray"),c=v.isArray,h=s("../utils/formatObjKey"),m=h.formatObjKey,x=I;x.getBucketLifecycle=function(){var T=(0,g.default)(d.default.mark(function R(A,N){var L,M,F;return d.default.wrap(function(P){for(;;)switch(P.prev=P.next){case 0:return S(A),L=this._bucketRequestParams("GET",A,"lifecycle",N),L.successStatuses=[200],L.xmlResponse=!0,P.next=6,this.request(L);case 6:return M=P.sent,F=M.data.Rule||null,F&&(c(F)||(F=[F]),F=F.map(function(V){return V.ID&&(V.id=V.ID,delete V.ID),V.Tag&&!c(V.Tag)&&(V.Tag=[V.Tag]),m(V,"firstLowerCase")})),P.abrupt("return",{rules:F,res:M.res});case 10:case"end":return P.stop()}},R,this)}));function _(R,A){return T.apply(this,arguments)}return _}()},{"../utils/checkBucketName":51,"../utils/formatObjKey":61,"../utils/isArray":63,"@babel/runtime/helpers/asyncToGenerator":77,"@babel/runtime/helpers/interopRequireDefault":78,"@babel/runtime/regenerator":80,"core-js/modules/es.array.map.js":280}],15:[function(s,E,I){"use strict";var u=s("@babel/runtime/helpers/interopRequireDefault"),d=u(s("@babel/runtime/regenerator")),g=u(s("@babel/runtime/helpers/asyncToGenerator")),y=s("../utils/checkBucketName"),S=y.checkBucketName,v=I;v.getBucketVersioning=function(){var c=(0,g.default)(d.default.mark(function m(x,T){var _,R,A;return d.default.wrap(function(L){for(;;)switch(L.prev=L.next){case 0:return S(x),_=this._bucketRequestParams("GET",x,"versioning",T),_.xmlResponse=!0,_.successStatuses=[200],L.next=6,this.request(_);case 6:return R=L.sent,A=R.data.Status,L.abrupt("return",{status:R.status,versionStatus:A,res:R.res});case 9:case"end":return L.stop()}},m,this)}));function h(m,x){return c.apply(this,arguments)}return h}()},{"../utils/checkBucketName":51,"@babel/runtime/helpers/asyncToGenerator":77,"@babel/runtime/helpers/interopRequireDefault":78,"@babel/runtime/regenerator":80}],16:[function(s,E,I){"use strict";var u=s("@babel/runtime/helpers/interopRequireDefault"),d=u(s("@babel/runtime/regenerator")),g=u(s("@babel/runtime/helpers/asyncToGenerator")),y=s("../utils/checkBucketName"),S=y.checkBucketName,v=s("../utils/isObject"),c=v.isObject,h=I;h.getBucketWebsite=function(){var m=(0,g.default)(d.default.mark(function T(_,R){var A,N,L;return d.default.wrap(function(F){for(;;)switch(F.prev=F.next){case 0:return S(_),A=this._bucketRequestParams("GET",_,"website",R),A.successStatuses=[200],A.xmlResponse=!0,F.next=6,this.request(A);case 6:return N=F.sent,L=[],N.data.RoutingRules&&N.data.RoutingRules.RoutingRule&&(c(N.data.RoutingRules.RoutingRule)?L=[N.data.RoutingRules.RoutingRule]:L=N.data.RoutingRules.RoutingRule),F.abrupt("return",{index:N.data.IndexDocument&&N.data.IndexDocument.Suffix||"",supportSubDir:N.data.IndexDocument&&N.data.IndexDocument.SupportSubDir||"false",type:N.data.IndexDocument&&N.data.IndexDocument.Type,routingRules:L,error:N.data.ErrorDocument&&N.data.ErrorDocument.Key||null,res:N.res});case 10:case"end":return F.stop()}},T,this)}));function x(T,_){return m.apply(this,arguments)}return x}()},{"../utils/checkBucketName":51,"../utils/isObject":70,"@babel/runtime/helpers/asyncToGenerator":77,"@babel/runtime/helpers/interopRequireDefault":78,"@babel/runtime/regenerator":80}],17:[function(s,E,I){"use strict";var u=s("@babel/runtime/helpers/interopRequireDefault"),d=u(s("@babel/runtime/regenerator"));s("core-js/modules/es.object.assign.js");var g=u(s("@babel/runtime/helpers/asyncToGenerator"));Object.defineProperty(I,"__esModule",{value:!0}),I.getBucketWorm=void 0;var y=s("../utils/checkBucketName"),S=s("../utils/dataFix");function v(h,m){return c.apply(this,arguments)}function c(){return c=(0,g.default)(d.default.mark(function h(m,x){var T,_;return d.default.wrap(function(A){for(;;)switch(A.prev=A.next){case 0:return y.checkBucketName(m),T=this._bucketRequestParams("GET",m,"worm",x),T.successStatuses=[200],T.xmlResponse=!0,A.next=6,this.request(T);case 6:return _=A.sent,S.dataFix(_.data,{lowerFirst:!0,rename:{RetentionPeriodInDays:"days"}}),A.abrupt("return",Object.assign(Object.assign({},_.data),{res:_.res,status:_.status}));case 9:case"end":return A.stop()}},h,this)})),c.apply(this,arguments)}I.getBucketWorm=v},{"../utils/checkBucketName":51,"../utils/dataFix":57,"@babel/runtime/helpers/asyncToGenerator":77,"@babel/runtime/helpers/interopRequireDefault":78,"@babel/runtime/regenerator":80,"core-js/modules/es.object.assign.js":287}],18:[function(s,E,I){"use strict";var u=s("@babel/runtime/helpers/interopRequireDefault"),d=u(s("@babel/runtime/regenerator")),g=u(s("@babel/runtime/helpers/asyncToGenerator"));Object.defineProperty(I,"__esModule",{value:!0}),I.initiateBucketWorm=void 0;var y=s("../utils/obj2xml"),S=s("../utils/checkBucketName");function v(h,m,x){return c.apply(this,arguments)}function c(){return c=(0,g.default)(d.default.mark(function h(m,x,T){var _,R,A;return d.default.wrap(function(L){for(;;)switch(L.prev=L.next){case 0:return S.checkBucketName(m),_=this._bucketRequestParams("POST",m,"worm",T),R={InitiateWormConfiguration:{RetentionPeriodInDays:x}},_.mime="xml",_.content=y.obj2xml(R,{headers:!0}),_.successStatuses=[200],L.next=8,this.request(_);case 8:return A=L.sent,L.abrupt("return",{res:A.res,wormId:A.res.headers["x-oss-worm-id"],status:A.status});case 10:case"end":return L.stop()}},h,this)})),c.apply(this,arguments)}I.initiateBucketWorm=v},{"../utils/checkBucketName":51,"../utils/obj2xml":72,"@babel/runtime/helpers/asyncToGenerator":77,"@babel/runtime/helpers/interopRequireDefault":78,"@babel/runtime/regenerator":80}],19:[function(s,E,I){"use strict";var u=s("@babel/runtime/helpers/interopRequireDefault"),d=u(s("@babel/runtime/regenerator"));s("core-js/modules/es.object.assign.js");var g=u(s("@babel/runtime/helpers/asyncToGenerator"));Object.defineProperty(I,"__esModule",{value:!0}),I.listBucketInventory=void 0;var y=s("../utils/checkBucketName"),S=s("../utils/formatInventoryConfig");function v(h){return c.apply(this,arguments)}function c(){return c=(0,g.default)(d.default.mark(function h(m){var x,T,_,R,A,N,L,M,F=arguments;return d.default.wrap(function(P){for(;;)switch(P.prev=P.next){case 0:return x=F.length>1&&F[1]!==void 0?F[1]:{},T=x.continuationToken,_=Object.assign({inventory:""},T&&{"continuation-token":T},x.subres),y.checkBucketName(m),R=this._bucketRequestParams("GET",m,_,x),R.successStatuses=[200],R.xmlResponse=!0,P.next=9,this.request(R);case 9:return A=P.sent,N=A.data,L=A.res,M=A.status,P.abrupt("return",{isTruncated:N.IsTruncated==="true",nextContinuationToken:N.NextContinuationToken,inventoryList:S.formatInventoryConfig(N.InventoryConfiguration,!0),status:M,res:L});case 12:case"end":return P.stop()}},h,this)})),c.apply(this,arguments)}I.listBucketInventory=v},{"../utils/checkBucketName":51,"../utils/formatInventoryConfig":60,"@babel/runtime/helpers/asyncToGenerator":77,"@babel/runtime/helpers/interopRequireDefault":78,"@babel/runtime/regenerator":80,"core-js/modules/es.object.assign.js":287}],20:[function(s,E,I){"use strict";var u=s("@babel/runtime/helpers/interopRequireDefault"),d=u(s("@babel/runtime/regenerator"));s("core-js/modules/es.object.assign.js"),s("core-js/modules/es.array.concat.js");var g=u(s("@babel/runtime/helpers/asyncToGenerator"));Object.defineProperty(I,"__esModule",{value:!0}),I.putBucketInventory=void 0;var y=s("../utils/checkBucketName"),S=s("../utils/obj2xml");function v(h,m){return c.apply(this,arguments)}function c(){return c=(0,g.default)(d.default.mark(function h(m,x){var T,_,R,A,N,L,M,F,H,P,V,G=arguments;return d.default.wrap(function(ne){for(;;)switch(ne.prev=ne.next){case 0:return T=G.length>2&&G[2]!==void 0?G[2]:{},_=Object.assign({inventory:"",inventoryId:x.id},T.subres),y.checkBucketName(m),R=x.OSSBucketDestination,A=x.optionalFields,N=x.includedObjectVersions,L="acs:oss:::",M="acs:ram::".concat(R.accountId,":role/"),F={InventoryConfiguration:{Id:x.id,IsEnabled:x.isEnabled,Filter:{Prefix:x.prefix||""},Destination:{OSSBucketDestination:{Format:R.format,AccountId:R.accountId,RoleArn:"".concat(M).concat(R.rolename),Bucket:"".concat(L).concat(R.bucket),Prefix:R.prefix||"",Encryption:R.encryption||""}},Schedule:{Frequency:x.frequency},IncludedObjectVersions:N,OptionalFields:{Field:(A==null?void 0:A.field)||[]}}},H=S.obj2xml(F,{headers:!0,firstUpperCase:!0}),P=this._bucketRequestParams("PUT",m,_,T),P.successStatuses=[200],P.mime="xml",P.content=H,ne.next=14,this.request(P);case 14:return V=ne.sent,ne.abrupt("return",{status:V.status,res:V.res});case 16:case"end":return ne.stop()}},h,this)})),c.apply(this,arguments)}I.putBucketInventory=v},{"../utils/checkBucketName":51,"../utils/obj2xml":72,"@babel/runtime/helpers/asyncToGenerator":77,"@babel/runtime/helpers/interopRequireDefault":78,"@babel/runtime/regenerator":80,"core-js/modules/es.array.concat.js":272,"core-js/modules/es.object.assign.js":287}],21:[function(s,E,I){"use strict";var u=s("@babel/runtime/helpers/interopRequireDefault"),d=u(s("@babel/runtime/regenerator"));s("core-js/modules/es.object.to-string.js"),s("core-js/modules/web.dom-collections.for-each.js"),s("core-js/modules/es.regexp.exec.js"),s("core-js/modules/es.array.includes.js");var g=u(s("@babel/runtime/helpers/asyncToGenerator")),y=s("../utils/checkBucketName"),S=y.checkBucketName,v=s("../utils/isArray"),c=v.isArray,h=s("../utils/deepCopy"),m=h.deepCopy,x=s("../utils/isObject"),T=x.isObject,_=s("../utils/obj2xml"),R=_.obj2xml,A=s("../utils/checkObjectTag"),N=A.checkObjectTag,L=s("../utils/getStrBytesCount"),M=L.getStrBytesCount,F=I;F.putBucketLifecycle=function(){var Q=(0,g.default)(d.default.mark(function ue(ae,he,ce){var we,me,Le,ee,se;return d.default.wrap(function(ke){for(;;)switch(ke.prev=ke.next){case 0:if(S(ae),c(he)){ke.next=3;break}throw new Error("rules must be Array");case 3:return we=this._bucketRequestParams("PUT",ae,"lifecycle",ce),me=[],Le={LifecycleConfiguration:{Rule:me}},he.forEach(function(De){H(De),G(De),De.id&&(De.ID=De.id,delete De.id),me.push(De)}),ee=R(Le,{headers:!0,firstUpperCase:!0}),we.content=ee,we.mime="xml",we.successStatuses=[200],ke.next=13,this.request(we);case 13:return se=ke.sent,ke.abrupt("return",{res:se.res});case 15:case"end":return ke.stop()}},ue,this)}));function ne(ue,ae,he){return Q.apply(this,arguments)}return ne}();function H(Q){Q.days&&(Q.expiration={days:Q.days}),Q.date&&(Q.expiration={createdBeforeDate:Q.date})}function P(Q,ne){var ue=Q.days,ae=Q.createdBeforeDate;if(!ue&&!ae)throw new Error("".concat(ne," must includes days or createdBeforeDate"));if(ue&&!/^[1-9][0-9]*$/.test(ue))throw new Error("days must be a positive integer");if(ae&&!/\d{4}-\d{2}-\d{2}T00:00:00.000Z/.test(ae))throw new Error("createdBeforeDate must be date and conform to iso8601 format")}function V(Q){if(!c(Q)&&!T(Q))throw new Error("tag must be Object or Array");Q=T(Q)?[Q]:Q;var ne={},ue=m(Q);ue.forEach(function(ae){ne[ae.key]=ae.value}),N(ne)}function G(Q){if(Q.id&&M(Q.id)>255)throw new Error("ID is composed of 255 bytes at most");if(Q.prefix===void 0)throw new Error("Rule must includes prefix");if(!["Enabled","Disabled"].includes(Q.status))throw new Error("Status must be Enabled or Disabled");if(Q.transition){if(!["IA","Archive"].includes(Q.transition.storageClass))throw new Error("StorageClass must be IA or Archive");P(Q.transition,"Transition")}if(Q.expiration){if(!Q.expiration.expiredObjectDeleteMarker)P(Q.expiration,"Expiration");else if(Q.expiration.days||Q.expiration.createdBeforeDate)throw new Error("expiredObjectDeleteMarker cannot be used with days or createdBeforeDate")}if(Q.abortMultipartUpload&&P(Q.abortMultipartUpload,"AbortMultipartUpload"),!Q.expiration&&!Q.abortMultipartUpload&&!Q.transition&&!Q.noncurrentVersionTransition)throw new Error("Rule must includes expiration or abortMultipartUpload or transition or noncurrentVersionTransition");if(Q.tag){if(Q.abortMultipartUpload)throw new Error("Tag cannot be used with abortMultipartUpload");V(Q.tag)}}},{"../utils/checkBucketName":51,"../utils/checkObjectTag":54,"../utils/deepCopy":58,"../utils/getStrBytesCount":62,"../utils/isArray":63,"../utils/isObject":70,"../utils/obj2xml":72,"@babel/runtime/helpers/asyncToGenerator":77,"@babel/runtime/helpers/interopRequireDefault":78,"@babel/runtime/regenerator":80,"core-js/modules/es.array.includes.js":277,"core-js/modules/es.object.to-string.js":291,"core-js/modules/es.regexp.exec.js":300,"core-js/modules/web.dom-collections.for-each.js":339}],22:[function(s,E,I){"use strict";var u=s("@babel/runtime/helpers/interopRequireDefault"),d=u(s("@babel/runtime/regenerator"));s("core-js/modules/es.array.includes.js");var g=u(s("@babel/runtime/helpers/asyncToGenerator")),y=s("../utils/checkBucketName"),S=y.checkBucketName,v=s("../utils/obj2xml"),c=v.obj2xml,h=I;h.putBucketVersioning=function(){var m=(0,g.default)(d.default.mark(function T(_,R){var A,N,L,M,F=arguments;return d.default.wrap(function(P){for(;;)switch(P.prev=P.next){case 0:if(A=F.length>2&&F[2]!==void 0?F[2]:{},S(_),["Enabled","Suspended"].includes(R)){P.next=4;break}throw new Error("status must be Enabled or Suspended");case 4:return N=this._bucketRequestParams("PUT",_,"versioning",A),L={VersioningConfiguration:{Status:R}},N.mime="xml",N.content=c(L,{headers:!0}),P.next=10,this.request(N);case 10:return M=P.sent,P.abrupt("return",{res:M.res,status:M.status});case 12:case"end":return P.stop()}},T,this)}));function x(T,_){return m.apply(this,arguments)}return x}()},{"../utils/checkBucketName":51,"../utils/obj2xml":72,"@babel/runtime/helpers/asyncToGenerator":77,"@babel/runtime/helpers/interopRequireDefault":78,"@babel/runtime/regenerator":80,"core-js/modules/es.array.includes.js":277}],23:[function(s,E,I){"use strict";var u=s("@babel/runtime/helpers/interopRequireDefault"),d=u(s("@babel/runtime/regenerator")),g=u(s("@babel/runtime/helpers/asyncToGenerator")),y=s("../utils/checkBucketName"),S=y.checkBucketName,v=s("../utils/obj2xml"),c=v.obj2xml,h=s("../utils/isArray"),m=h.isArray,x=I;x.putBucketWebsite=function(){var T=(0,g.default)(d.default.mark(function R(A){var N,L,M,F,H,P,V,G=arguments;return d.default.wrap(function(ne){for(;;)switch(ne.prev=ne.next){case 0:if(N=G.length>1&&G[1]!==void 0?G[1]:{},L=G.length>2?G[2]:void 0,S(A),M=this._bucketRequestParams("PUT",A,"website",L),F={Suffix:N.index||"index.html"},H={IndexDocument:F},P={WebsiteConfiguration:H},N.supportSubDir&&(F.SupportSubDir=N.supportSubDir),N.type&&(F.Type=N.type),N.error&&(H.ErrorDocument={Key:N.error}),N.routingRules===void 0){ne.next=14;break}if(m(N.routingRules)){ne.next=13;break}throw new Error("RoutingRules must be Array");case 13:H.RoutingRules={RoutingRule:N.routingRules};case 14:return P=c(P),M.content=P,M.mime="xml",M.successStatuses=[200],ne.next=20,this.request(M);case 20:return V=ne.sent,ne.abrupt("return",{res:V.res});case 22:case"end":return ne.stop()}},R,this)}));function _(R){return T.apply(this,arguments)}return _}()},{"../utils/checkBucketName":51,"../utils/isArray":63,"../utils/obj2xml":72,"@babel/runtime/helpers/asyncToGenerator":77,"@babel/runtime/helpers/interopRequireDefault":78,"@babel/runtime/regenerator":80}],24:[function(s,E,I){(function(u){(function(){"use strict";s("core-js/modules/es.object.to-string.js"),s("core-js/modules/es.regexp.to-string.js"),s("core-js/modules/web.dom-collections.for-each.js"),s("core-js/modules/es.object.keys.js"),I.encodeCallback=function(g,y){if(g.headers=g.headers||{},!Object.prototype.hasOwnProperty.call(g.headers,"x-oss-callback")&&y.callback){var S={callbackUrl:encodeURI(y.callback.url),callbackBody:y.callback.body};y.callback.host&&(S.callbackHost=y.callback.host),y.callback.contentType&&(S.callbackBodyType=y.callback.contentType);var v=u.from(JSON.stringify(S)).toString("base64");if(g.headers["x-oss-callback"]=v,y.callback.customValue){var c={};Object.keys(y.callback.customValue).forEach(function(h){c["x:".concat(h)]=y.callback.customValue[h].toString()}),g.headers["x-oss-callback-var"]=u.from(JSON.stringify(c)).toString("base64")}}}}).call(this)}).call(this,s("buffer").Buffer)},{buffer:90,"core-js/modules/es.object.keys.js":290,"core-js/modules/es.object.to-string.js":291,"core-js/modules/es.regexp.to-string.js":301,"core-js/modules/web.dom-collections.for-each.js":339}],25:[function(s,E,I){"use strict";s("core-js/modules/es.array.concat.js"),s("core-js/modules/es.regexp.exec.js"),s("core-js/modules/es.string.replace.js"),s("core-js/modules/es.object.to-string.js"),s("core-js/modules/web.dom-collections.for-each.js");var u=function(m){return m&&m.__esModule?m:{default:m}};Object.defineProperty(I,"__esModule",{value:!0}),I.getReqUrl=void 0;var d=u(s("copy-to")),g=u(s("url")),y=u(s("merge-descriptors")),S=u(s("is-type-of")),v=s("../utils/isIP"),c=s("../utils/checkConfigValid");function h(m){var x={},T=this.options.cname;c.checkConfigValid(this.options.endpoint,"endpoint"),d.default(this.options.endpoint,!1).to(x),m.bucket&&!T&&!v.isIP(x.hostname)&&!this.options.sldEnable&&(x.host="".concat(m.bucket,".").concat(x.host));var _="/";m.bucket&&this.options.sldEnable&&(_+="".concat(m.bucket,"/")),m.object&&(_+=this._escape(m.object).replace(/\+/g,"%2B")),x.pathname=_;var R={};if(m.query&&y.default(R,m.query),m.subres){var A={};S.default.string(m.subres)?A[m.subres]="":S.default.array(m.subres)?m.subres.forEach(function(N){A[N]=""}):A=m.subres,y.default(R,A)}return x.query=R,g.default.format(x)}I.getReqUrl=h},{"../utils/checkConfigValid":52,"../utils/isIP":69,"copy-to":94,"core-js/modules/es.array.concat.js":272,"core-js/modules/es.object.to-string.js":291,"core-js/modules/es.regexp.exec.js":300,"core-js/modules/es.string.replace.js":305,"core-js/modules/web.dom-collections.for-each.js":339,"is-type-of":466,"merge-descriptors":372,url:472}],26:[function(s,E,I){"use strict";s("core-js/modules/es.array.concat.js"),s("core-js/modules/es.object.assign.js"),s("core-js/modules/es.string.trim.js");var u=s("humanize-ms"),d=s("url"),g=s("../utils/checkBucketName"),y=g.checkBucketName,S=s("../utils/setRegion"),v=S.setRegion,c=s("../utils/checkConfigValid"),h=c.checkConfigValid;function m(x,T){h(x,"endpoint");var _=d.parse(x);if(_.protocol||(_=d.parse("http".concat(T?"s":"","://").concat(x))),_.protocol!=="http:"&&_.protocol!=="https:")throw new Error("Endpoint protocol must be http or https.");return _}E.exports=function(x){if(!x||!x.accessKeyId||!x.accessKeySecret)throw new Error("require accessKeyId, accessKeySecret");x.stsToken&&!x.refreshSTSToken&&!x.refreshSTSTokenInterval&&console.warn("It's recommended to set 'refreshSTSToken' and 'refreshSTSTokenInterval' to refresh stsToken\u3001accessKeyId\u3001accessKeySecret automatically when sts token has expired"),x.bucket&&y(x.bucket);var T=Object.assign({region:"oss-cn-hangzhou",internal:!1,secure:!1,timeout:6e4,bucket:null,endpoint:null,cname:!1,isRequestPay:!1,sldEnable:!1,headerEncoding:"utf-8",refreshSTSToken:null,refreshSTSTokenInterval:6e4*5,retryMax:0},x);if(T.accessKeyId=T.accessKeyId.trim(),T.accessKeySecret=T.accessKeySecret.trim(),T.timeout&&(T.timeout=u(T.timeout)),T.endpoint)T.endpoint=m(T.endpoint,T.secure);else if(T.region)T.endpoint=v(T.region,T.internal,T.secure);else throw new Error("require options.endpoint or options.region");return T.inited=!0,T}},{"../utils/checkBucketName":51,"../utils/checkConfigValid":52,"../utils/setRegion":75,"core-js/modules/es.array.concat.js":272,"core-js/modules/es.object.assign.js":287,"core-js/modules/es.string.trim.js":308,"humanize-ms":356,url:472}],27:[function(s,E,I){"use strict";var u=s("merge-descriptors"),d=I;u(d,s("./processObjectSave"))},{"./processObjectSave":28,"merge-descriptors":372}],28:[function(s,E,I){"use strict";var u=s("@babel/runtime/helpers/interopRequireDefault"),d=u(s("@babel/runtime/regenerator"));s("core-js/modules/es.array.concat.js");var g=u(s("@babel/runtime/helpers/asyncToGenerator")),y=s("../utils/checkBucketName"),S=y.checkBucketName,v=s("querystring"),c=s("js-base64"),h=c.Base64.encode,m=I;m.processObjectSave=function(){var T=(0,g.default)(d.default.mark(function R(A,N,L,M){var F,H,P,V;return d.default.wrap(function(Q){for(;;)switch(Q.prev=Q.next){case 0:return x(A,"sourceObject"),x(N,"targetObject"),x(L,"process"),N=this._objectName(N),M&&S(M),F=this._objectRequestParams("POST",A,{subres:"x-oss-process"}),H=M?",b_".concat(h(M)):"",N=h(N),P={"x-oss-process":"".concat(L,"|sys/saveas,o_").concat(N).concat(H)},F.content=v.stringify(P),Q.next=12,this.request(F);case 12:return V=Q.sent,Q.abrupt("return",{res:V.res,status:V.res.status});case 14:case"end":return Q.stop()}},R,this)}));function _(R,A,N,L){return T.apply(this,arguments)}return _}();function x(T,_){if(!T)throw new Error("".concat(_," is required"));if(typeof T!="string")throw new Error("".concat(_," must be String"))}},{"../utils/checkBucketName":51,"@babel/runtime/helpers/asyncToGenerator":77,"@babel/runtime/helpers/interopRequireDefault":78,"@babel/runtime/regenerator":80,"core-js/modules/es.array.concat.js":272,"js-base64":371,querystring:385}],29:[function(s,E,I){"use strict";var u=s("@babel/runtime/helpers/interopRequireDefault"),d=u(s("@babel/runtime/regenerator"));s("core-js/modules/es.array.concat.js"),s("core-js/modules/es.function.name.js"),s("core-js/modules/es.object.to-string.js"),s("core-js/modules/es.promise.js"),s("core-js/modules/es.array.from.js"),s("core-js/modules/es.string.iterator.js"),s("core-js/modules/es.array.map.js"),s("core-js/modules/es.array.filter.js"),s("core-js/modules/es.array.find.js"),s("core-js/modules/es.regexp.to-string.js");var g=u(s("@babel/runtime/helpers/asyncToGenerator")),y=s("debug")("ali-oss:multipart-copy"),S=s("copy-to"),v=I;v.uploadPartCopy=function(){var c=(0,g.default)(d.default.mark(function m(x,T,_,R,A){var N,L,M,F,H,P=arguments;return d.default.wrap(function(G){for(;;)switch(G.prev=G.next){case 0:return N=P.length>5&&P[5]!==void 0?P[5]:{},N.headers=N.headers||{},L=N.versionId||N.subres&&N.subres.versionId||null,L?M="/".concat(A.sourceBucketName,"/").concat(encodeURIComponent(A.sourceKey),"?versionId=").concat(L):M="/".concat(A.sourceBucketName,"/").concat(encodeURIComponent(A.sourceKey)),N.headers["x-oss-copy-source"]=M,R&&(N.headers["x-oss-copy-source-range"]="bytes=".concat(R)),N.subres={partNumber:_,uploadId:T},F=this._objectRequestParams("PUT",x,N),F.mime=N.mime,F.successStatuses=[200],G.next=12,this.request(F);case 12:return H=G.sent,G.abrupt("return",{name:x,etag:H.res.headers.etag,res:H.res});case 14:case"end":return G.stop()}},m,this)}));function h(m,x,T,_,R){return c.apply(this,arguments)}return h}(),v.multipartUploadCopy=function(){var c=(0,g.default)(d.default.mark(function m(x,T){var _,R,A,N,L,M,F,H,P,V,G,Q,ne=arguments;return d.default.wrap(function(ae){for(;;)switch(ae.prev=ae.next){case 0:return _=ne.length>2&&ne[2]!==void 0?ne[2]:{},this.resetCancelFlag(),R=_.versionId,A=R===void 0?null:R,N={versionId:A},ae.next=6,this._getObjectMeta(T.sourceBucketName,T.sourceKey,N);case 6:if(L=ae.sent,M=L.res.headers["content-length"],T.startOffset=T.startOffset||0,T.endOffset=T.endOffset||M,!(_.checkpoint&&_.checkpoint.uploadId)){ae.next=14;break}return ae.next=13,this._resumeMultipartCopy(_.checkpoint,T,_);case 13:return ae.abrupt("return",ae.sent);case 14:if(F=102400,H=T.endOffset-T.startOffset,!(H0)){ke.next=40;break}throw se=Le[0],se.message="Failed to copy some parts with error: ".concat(se.toString()," part_num: ").concat(se.partNum),se;case 40:return ke.next=42,this.completeMultipartUpload(P,F,H,_);case 42:return ke.abrupt("return",ke.sent);case 43:case"end":return ke.stop()}},m,this)}));function h(m,x,T){return c.apply(this,arguments)}return h}(),v._divideMultipartCopyParts=function(h,m,x){for(var T=Math.ceil(h/m),_=[],R=0;R `,Q=0;Q `,G+="".concat(ne.number,` `),G+="".concat(ne.etag,` `),G+=` `;return G+="",P=P||{},ue={},ue=h(P,function(Le){if(x(Le))return null}),ue.subres={uploadId:F},ue.headers=_(ue.headers,["x-oss-server-side-encryption","x-oss-storage-class"]),ae=this._objectRequestParams("POST",M,ue),v.encodeCallback(ae,ue),ae.mime="xml",ae.content=G,ae.headers&&ae.headers["x-oss-callback"]||(ae.xmlResponse=!0),ae.successStatuses=[200],me.next=17,this.request(ae);case 17:if(he=me.sent,!P.progress){me.next=21;break}return me.next=21,P.progress(1,null,he.res);case 21:return ce={res:he.res,bucket:ae.bucket,name:M,etag:he.res.headers.etag},ae.headers&&ae.headers["x-oss-callback"]&&(ce.data=JSON.parse(he.data.toString())),me.abrupt("return",ce);case 24:case"end":return me.stop()}},L,this)}));function N(L,M,F,H){return A.apply(this,arguments)}return N}(),R._uploadPart=function(){var A=(0,y.default)(g.default.mark(function L(M,F,H,P,V){var G,Q,ne,ue;return g.default.wrap(function(he){for(;;)switch(he.prev=he.next){case 0:return V=V||{},G={},S(V).to(G),G.headers=G.headers||{},G.headers["Content-Length"]=P.size,G.headers=_(G.headers,["x-oss-server-side-encryption"]),G.subres={partNumber:H,uploadId:F},Q=this._objectRequestParams("PUT",M,G),Q.mime=G.mime,ne=u&&u.browser,ne?Q.content=P.content:Q.stream=P.stream,Q.successStatuses=[200],Q.disabledMD5=V.disabledMD5,he.next=15,this.request(Q);case 15:if(ue=he.sent,ue.res.headers.etag){he.next=18;break}throw new Error(`Please set the etag of expose-headers in OSS https://help.aliyun.com/document_detail/32069.html`);case 18:return P.stream&&(P.stream=null,Q.stream=null),he.abrupt("return",{name:M,etag:ue.res.headers.etag,res:ue.res});case 20:case"end":return he.stop()}},L,this)}));function N(L,M,F,H,P){return A.apply(this,arguments)}return N}()}).call(this)}).call(this,s("_process"))},{"./callback":24,"./utils/deepCopy":58,"./utils/isBuffer":65,"./utils/omit":73,"@babel/runtime/helpers/asyncToGenerator":77,"@babel/runtime/helpers/interopRequireDefault":78,"@babel/runtime/regenerator":80,_process:467,"copy-to":94,"core-js/modules/es.array.concat.js":272,"core-js/modules/es.array.filter.js":274,"core-js/modules/es.array.map.js":280,"core-js/modules/es.array.sort.js":282,"core-js/modules/es.object.to-string.js":291,"core-js/modules/es.regexp.to-string.js":301}],31:[function(s,E,I){"use strict";var u=s("@babel/runtime/helpers/interopRequireDefault"),d=u(s("@babel/runtime/regenerator")),g=u(s("@babel/runtime/helpers/asyncToGenerator")),y=s("url"),S=s("utility"),v=s("copy-to"),c=s("../../common/signUtils"),h=s("../utils/isIP"),m=h.isIP,x=s("../utils/setSTSToken"),T=x.setSTSToken,_=s("../utils/isFunction"),R=_.isFunction,A=I;A.asyncSignatureUrl=function(){var N=(0,g.default)(d.default.mark(function M(F,H){var P,V,G,Q,ne;return d.default.wrap(function(ae){for(;;)switch(ae.prev=ae.next){case 0:if(!m(this.options.endpoint.hostname)){ae.next=2;break}throw new Error("can not get the object URL when endpoint is IP");case 2:if(H=H||{},F=this._objectName(F),H.method=H.method||"GET",P=S.timestamp()+(H.expires||1800),V={bucket:this.options.bucket,object:F},G=this._getResource(V),!(this.options.stsToken&&R(this.options.refreshSTSToken))){ae.next=11;break}return ae.next=11,T.call(this);case 11:return this.options.stsToken&&(H["security-token"]=this.options.stsToken),Q=c._signatureForURL(this.options.accessKeySecret,H,G,P),ne=y.parse(this._getReqUrl(V)),ne.query={OSSAccessKeyId:this.options.accessKeyId,Expires:P,Signature:Q.Signature},v(Q.subResource).to(ne.query),ae.abrupt("return",ne.format());case 17:case"end":return ae.stop()}},M,this)}));function L(M,F){return N.apply(this,arguments)}return L}()},{"../../common/signUtils":50,"../utils/isFunction":68,"../utils/isIP":69,"../utils/setSTSToken":76,"@babel/runtime/helpers/asyncToGenerator":77,"@babel/runtime/helpers/interopRequireDefault":78,"@babel/runtime/regenerator":80,"copy-to":94,url:472,utility:474}],32:[function(s,E,I){"use strict";var u=s("@babel/runtime/helpers/interopRequireDefault"),d=u(s("@babel/runtime/regenerator"));s("core-js/modules/es.object.to-string.js"),s("core-js/modules/web.dom-collections.for-each.js"),s("core-js/modules/es.object.keys.js"),s("core-js/modules/es.array.find.js"),s("core-js/modules/es.array.includes.js"),s("core-js/modules/es.array.concat.js"),s("core-js/modules/es.regexp.exec.js"),s("core-js/modules/es.string.replace.js");var g=u(s("@babel/runtime/helpers/typeof")),y=u(s("@babel/runtime/helpers/asyncToGenerator")),S=s("../utils/checkBucketName"),v=S.checkBucketName,c=I,h=["content-type","content-encoding","content-language","content-disposition","cache-control","expires"];c.copy=function(){var m=(0,y.default)(d.default.mark(function T(_,R,A,N){var L,M,F;return d.default.wrap(function(P){for(;;)switch(P.prev=P.next){case 0:return(0,g.default)(A)==="object"&&(N=A),N=N||{},N.headers=N.headers||{},Object.keys(N.headers).forEach(function(V){N.headers["x-oss-copy-source-".concat(V.toLowerCase())]=N.headers[V]}),(N.meta||Object.keys(N.headers).find(function(V){return h.includes(V.toLowerCase())}))&&(N.headers["x-oss-metadata-directive"]="REPLACE"),this._convertMetaToHeaders(N.meta,N.headers),R=this._getSourceName(R,A),N.versionId&&(R="".concat(R,"?versionId=").concat(N.versionId)),N.headers["x-oss-copy-source"]=R,L=this._objectRequestParams("PUT",_,N),L.xmlResponse=!0,L.successStatuses=[200,304],P.next=14,this.request(L);case 14:return M=P.sent,F=M.data,F&&(F={etag:F.ETag,lastModified:F.LastModified}),P.abrupt("return",{data:F,res:M.res});case 18:case"end":return P.stop()}},T,this)}));function x(T,_,R,A){return m.apply(this,arguments)}return x}(),c._getSourceName=function(x,T){return typeof T=="string"?x=this._objectName(x):x[0]!=="/"?T=this.options.bucket:(T=x.replace(/\/(.+?)(\/.*)/,"$1"),x=x.replace(/(\/.+?\/)(.*)/,"$2")),v(T),x=encodeURIComponent(x),x="/".concat(T,"/").concat(x),x}},{"../utils/checkBucketName":51,"@babel/runtime/helpers/asyncToGenerator":77,"@babel/runtime/helpers/interopRequireDefault":78,"@babel/runtime/helpers/typeof":79,"@babel/runtime/regenerator":80,"core-js/modules/es.array.concat.js":272,"core-js/modules/es.array.find.js":275,"core-js/modules/es.array.includes.js":277,"core-js/modules/es.object.keys.js":290,"core-js/modules/es.object.to-string.js":291,"core-js/modules/es.regexp.exec.js":300,"core-js/modules/es.string.replace.js":305,"core-js/modules/web.dom-collections.for-each.js":339}],33:[function(s,E,I){"use strict";var u=s("@babel/runtime/helpers/interopRequireDefault"),d=u(s("@babel/runtime/regenerator"));s("core-js/modules/es.object.assign.js");var g=u(s("@babel/runtime/helpers/asyncToGenerator")),y=I;y.delete=function(){var S=(0,g.default)(d.default.mark(function c(h){var m,x,T,_=arguments;return d.default.wrap(function(A){for(;;)switch(A.prev=A.next){case 0:return m=_.length>1&&_[1]!==void 0?_[1]:{},m.subres=Object.assign({},m.subres),m.versionId&&(m.subres.versionId=m.versionId),x=this._objectRequestParams("DELETE",h,m),x.successStatuses=[204],A.next=7,this.request(x);case 7:return T=A.sent,A.abrupt("return",{res:T.res});case 9:case"end":return A.stop()}},c,this)}));function v(c){return S.apply(this,arguments)}return v}()},{"@babel/runtime/helpers/asyncToGenerator":77,"@babel/runtime/helpers/interopRequireDefault":78,"@babel/runtime/regenerator":80,"core-js/modules/es.object.assign.js":287}],34:[function(s,E,I){"use strict";var u=s("@babel/runtime/helpers/interopRequireDefault"),d=u(s("@babel/runtime/regenerator"));s("core-js/modules/es.object.assign.js");var g=u(s("@babel/runtime/helpers/asyncToGenerator")),y=s("utility"),S=s("../utils/obj2xml"),v=S.obj2xml,c=I;c.deleteMulti=function(){var h=(0,g.default)(d.default.mark(function x(T){var _,R,A,N,L,M,F,H,P,V,G,Q,ne,ue=arguments;return d.default.wrap(function(he){for(;;)switch(he.prev=he.next){case 0:if(_=ue.length>1&&ue[1]!==void 0?ue[1]:{},R=[],!(!T||!T.length)){he.next=4;break}throw new Error("names is required");case 4:for(A=0;A1&&_[1]!==void 0?_[1]:{},m.subres=Object.assign({tagging:""},m.subres),m.versionId&&(m.subres.versionId=m.versionId),h=this._objectName(h),x=this._objectRequestParams("DELETE",h,m),x.successStatuses=[204],A.next=8,this.request(x);case 8:return T=A.sent,A.abrupt("return",{status:T.status,res:T.res});case 10:case"end":return A.stop()}},c,this)}));function v(c){return S.apply(this,arguments)}return v}()},{"@babel/runtime/helpers/asyncToGenerator":77,"@babel/runtime/helpers/interopRequireDefault":78,"@babel/runtime/regenerator":80,"core-js/modules/es.object.assign.js":287}],36:[function(s,E,I){"use strict";s("core-js/modules/es.array.concat.js");var u=s("url"),d=s("../utils/isIP"),g=d.isIP,y=I;y.generateObjectUrl=function(v,c){if(g(this.options.endpoint.hostname))throw new Error("can not get the object URL when endpoint is IP");if(c)c[c.length-1]!=="/"&&(c+="/");else{c=this.options.endpoint.format();var h=u.parse(c),m=this.options.bucket;h.hostname="".concat(m,".").concat(h.hostname),h.host="".concat(m,".").concat(h.host),c=h.format()}return c+this._escape(this._objectName(v))}},{"../utils/isIP":69,"core-js/modules/es.array.concat.js":272,url:472}],37:[function(s,E,I){(function(u){(function(){"use strict";var d=s("@babel/runtime/helpers/interopRequireDefault"),g=d(s("@babel/runtime/regenerator"));s("core-js/modules/es.object.assign.js");var y=d(s("@babel/runtime/helpers/asyncToGenerator")),S=s("fs"),v=s("is-type-of"),c=I;c.get=function(){var h=(0,y.default)(g.default.mark(function x(T,_){var R,A,N,L,M,F,H,P,V=arguments;return g.default.wrap(function(Q){for(;;)switch(Q.prev=Q.next){case 0:return R=V.length>2&&V[2]!==void 0?V[2]:{},A=null,N=!1,v.writableStream(_)?A=_:v.string(_)?(A=S.createWriteStream(_),N=!0):R=_,R=R||{},L=u&&u.browser,M=R.responseCacheControl===null?"":"no-cache",F=L&&M?{"response-cache-control":M}:{},R.subres=Object.assign(F,R.subres),R.versionId&&(R.subres.versionId=R.versionId),R.process&&(R.subres["x-oss-process"]=R.process),Q.prev=11,P=this._objectRequestParams("GET",T,R),P.writeStream=A,P.successStatuses=[200,206,304],Q.next=17,this.request(P);case 17:H=Q.sent,N&&A.destroy(),Q.next=28;break;case 21:if(Q.prev=21,Q.t0=Q.catch(11),!N){Q.next=27;break}return A.destroy(),Q.next=27,this._deleteFileSafe(_);case 27:throw Q.t0;case 28:return Q.abrupt("return",{res:H.res,content:H.data});case 29:case"end":return Q.stop()}},x,this,[[11,21]])}));function m(x,T){return h.apply(this,arguments)}return m}()}).call(this)}).call(this,s("_process"))},{"@babel/runtime/helpers/asyncToGenerator":77,"@babel/runtime/helpers/interopRequireDefault":78,"@babel/runtime/regenerator":80,_process:467,"core-js/modules/es.object.assign.js":287,fs:89,"is-type-of":466}],38:[function(s,E,I){"use strict";var u=s("@babel/runtime/helpers/interopRequireDefault"),d=u(s("@babel/runtime/regenerator"));s("core-js/modules/es.object.assign.js");var g=u(s("@babel/runtime/helpers/asyncToGenerator")),y=I;y.getACL=function(){var S=(0,g.default)(d.default.mark(function c(h){var m,x,T,_=arguments;return d.default.wrap(function(A){for(;;)switch(A.prev=A.next){case 0:return m=_.length>1&&_[1]!==void 0?_[1]:{},m.subres=Object.assign({acl:""},m.subres),m.versionId&&(m.subres.versionId=m.versionId),h=this._objectName(h),x=this._objectRequestParams("GET",h,m),x.successStatuses=[200],x.xmlResponse=!0,A.next=9,this.request(x);case 9:return T=A.sent,A.abrupt("return",{acl:T.data.AccessControlList.Grant,owner:{id:T.data.Owner.ID,displayName:T.data.Owner.DisplayName},res:T.res});case 11:case"end":return A.stop()}},c,this)}));function v(c){return S.apply(this,arguments)}return v}()},{"@babel/runtime/helpers/asyncToGenerator":77,"@babel/runtime/helpers/interopRequireDefault":78,"@babel/runtime/regenerator":80,"core-js/modules/es.object.assign.js":287}],39:[function(s,E,I){"use strict";var u=s("@babel/runtime/helpers/interopRequireDefault"),d=u(s("@babel/runtime/regenerator"));s("core-js/modules/es.regexp.exec.js"),s("core-js/modules/es.string.replace.js"),s("core-js/modules/es.object.to-string.js"),s("core-js/modules/web.dom-collections.for-each.js"),s("core-js/modules/es.object.keys.js"),s("core-js/modules/es.object.assign.js"),s("core-js/modules/es.array.map.js"),s("core-js/modules/es.number.constructor.js");var g=u(s("@babel/runtime/helpers/asyncToGenerator")),y=I,S=s("../utils/isObject"),v=S.isObject,c=s("../utils/isArray"),h=c.isArray;y.getBucketVersions=m,y.listObjectVersions=m;function m(){return x.apply(this,arguments)}function x(){return x=(0,g.default)(d.default.mark(function R(){var A,N,L,M,F,H,P,V,G=arguments;return d.default.wrap(function(ne){for(;;)switch(ne.prev=ne.next){case 0:if(A=G.length>0&&G[0]!==void 0?G[0]:{},N=G.length>1&&G[1]!==void 0?G[1]:{},!(A.versionIdMarker&&A.keyMarker===void 0)){ne.next=4;break}throw new Error("A version-id marker cannot be specified without a key marker");case 4:return N.subres=Object.assign({versions:""},N.subres),N.versionId&&(N.subres.versionId=N.versionId),L=this._objectRequestParams("GET","",N),L.xmlResponse=!0,L.successStatuses=[200],L.query=_(A),ne.next=12,this.request(L);case 12:return M=ne.sent,F=M.data.Version||[],H=M.data.DeleteMarker||[],P=this,F&&(Array.isArray(F)||(F=[F]),F=F.map(function(ue){return{name:ue.Key,url:P._objectUrl(ue.Key),lastModified:ue.LastModified,isLatest:ue.IsLatest==="true",versionId:ue.VersionId,etag:ue.ETag,type:ue.Type,size:Number(ue.Size),storageClass:ue.StorageClass,owner:{id:ue.Owner.ID,displayName:ue.Owner.DisplayName}}})),H&&(h(H)||(H=[H]),H=H.map(function(ue){return{name:ue.Key,lastModified:ue.LastModified,versionId:ue.VersionId,owner:{id:ue.Owner.ID,displayName:ue.Owner.DisplayName}}})),V=M.data.CommonPrefixes||null,V&&(h(V)||(V=[V]),V=V.map(function(ue){return ue.Prefix})),ne.abrupt("return",{res:M.res,objects:F,deleteMarker:H,prefixes:V,nextMarker:M.data.NextKeyMarker||null,NextVersionIdMarker:M.data.NextVersionIdMarker||null,nextKeyMarker:M.data.NextKeyMarker||null,nextVersionIdMarker:M.data.NextVersionIdMarker||null,isTruncated:M.data.IsTruncated==="true"});case 21:case"end":return ne.stop()}},R,this)})),x.apply(this,arguments)}function T(R){return R.replace(/([A-Z])/g,"-$1").toLowerCase()}function _(){var R=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},A={};return v(R)&&Object.keys(R).forEach(function(N){A[T(N)]=R[N]}),A}},{"../utils/isArray":63,"../utils/isObject":70,"@babel/runtime/helpers/asyncToGenerator":77,"@babel/runtime/helpers/interopRequireDefault":78,"@babel/runtime/regenerator":80,"core-js/modules/es.array.map.js":280,"core-js/modules/es.number.constructor.js":286,"core-js/modules/es.object.assign.js":287,"core-js/modules/es.object.keys.js":290,"core-js/modules/es.object.to-string.js":291,"core-js/modules/es.regexp.exec.js":300,"core-js/modules/es.string.replace.js":305,"core-js/modules/web.dom-collections.for-each.js":339}],40:[function(s,E,I){"use strict";var u=s("@babel/runtime/helpers/interopRequireDefault"),d=u(s("@babel/runtime/regenerator"));s("core-js/modules/es.object.assign.js");var g=u(s("@babel/runtime/helpers/asyncToGenerator")),y=I;y.getObjectMeta=function(){var S=(0,g.default)(d.default.mark(function c(h,m){var x,T;return d.default.wrap(function(R){for(;;)switch(R.prev=R.next){case 0:return m=m||{},h=this._objectName(h),m.subres=Object.assign({objectMeta:""},m.subres),m.versionId&&(m.subres.versionId=m.versionId),x=this._objectRequestParams("HEAD",h,m),x.successStatuses=[200],R.next=8,this.request(x);case 8:return T=R.sent,R.abrupt("return",{status:T.status,res:T.res});case 10:case"end":return R.stop()}},c,this)}));function v(c,h){return S.apply(this,arguments)}return v}()},{"@babel/runtime/helpers/asyncToGenerator":77,"@babel/runtime/helpers/interopRequireDefault":78,"@babel/runtime/regenerator":80,"core-js/modules/es.object.assign.js":287}],41:[function(s,E,I){"use strict";var u=s("@babel/runtime/helpers/interopRequireDefault"),d=u(s("@babel/runtime/regenerator"));s("core-js/modules/es.object.assign.js"),s("core-js/modules/es.object.to-string.js"),s("core-js/modules/web.dom-collections.for-each.js");var g=u(s("@babel/runtime/helpers/asyncToGenerator")),y=I,S=s("../utils/isObject"),v=S.isObject;y.getObjectTagging=function(){var c=(0,g.default)(d.default.mark(function m(x){var T,_,R,A,N,L,M=arguments;return d.default.wrap(function(H){for(;;)switch(H.prev=H.next){case 0:return T=M.length>1&&M[1]!==void 0?M[1]:{},T.subres=Object.assign({tagging:""},T.subres),T.versionId&&(T.subres.versionId=T.versionId),x=this._objectName(x),_=this._objectRequestParams("GET",x,T),_.successStatuses=[200],H.next=8,this.request(_);case 8:return R=H.sent,H.next=11,this.parseXML(R.data);case 11:return A=H.sent,N=A.TagSet.Tag,N=N&&v(N)?[N]:N||[],L={},N.forEach(function(P){L[P.Key]=P.Value}),H.abrupt("return",{status:R.status,res:R.res,tag:L});case 17:case"end":return H.stop()}},m,this)}));function h(m){return c.apply(this,arguments)}return h}()},{"../utils/isObject":70,"@babel/runtime/helpers/asyncToGenerator":77,"@babel/runtime/helpers/interopRequireDefault":78,"@babel/runtime/regenerator":80,"core-js/modules/es.object.assign.js":287,"core-js/modules/es.object.to-string.js":291,"core-js/modules/web.dom-collections.for-each.js":339}],42:[function(s,E,I){"use strict";var u=s("../utils/isIP"),d=u.isIP,g=I;g.getObjectUrl=function(S,v){if(d(this.options.endpoint.hostname))throw new Error("can not get the object URL when endpoint is IP");return v?v[v.length-1]!=="/"&&(v+="/"):v=this.options.endpoint.format(),v+this._escape(this._objectName(S))}},{"../utils/isIP":69}],43:[function(s,E,I){"use strict";var u=s("@babel/runtime/helpers/interopRequireDefault"),d=u(s("@babel/runtime/regenerator"));s("core-js/modules/es.object.assign.js");var g=u(s("@babel/runtime/helpers/asyncToGenerator")),y=I;y.getSymlink=function(){var S=(0,g.default)(d.default.mark(function c(h){var m,x,T,_,R=arguments;return d.default.wrap(function(N){for(;;)switch(N.prev=N.next){case 0:return m=R.length>1&&R[1]!==void 0?R[1]:{},m.subres=Object.assign({symlink:""},m.subres),m.versionId&&(m.subres.versionId=m.versionId),h=this._objectName(h),x=this._objectRequestParams("GET",h,m),x.successStatuses=[200],N.next=8,this.request(x);case 8:return T=N.sent,_=T.res.headers["x-oss-symlink-target"],N.abrupt("return",{targetName:decodeURIComponent(_),res:T.res});case 11:case"end":return N.stop()}},c,this)}));function v(c){return S.apply(this,arguments)}return v}()},{"@babel/runtime/helpers/asyncToGenerator":77,"@babel/runtime/helpers/interopRequireDefault":78,"@babel/runtime/regenerator":80,"core-js/modules/es.object.assign.js":287}],44:[function(s,E,I){"use strict";var u=s("@babel/runtime/helpers/interopRequireDefault"),d=u(s("@babel/runtime/regenerator"));s("core-js/modules/es.object.assign.js"),s("core-js/modules/es.object.to-string.js"),s("core-js/modules/web.dom-collections.for-each.js"),s("core-js/modules/es.object.keys.js");var g=u(s("@babel/runtime/helpers/asyncToGenerator")),y=s("../utils/checkEnv"),S=y.checkEnv,v=I;v.head=function(){var c=(0,g.default)(d.default.mark(function m(x){var T,_,R,A,N=arguments;return d.default.wrap(function(M){for(;;)switch(M.prev=M.next){case 0:return T=N.length>1&&N[1]!==void 0?N[1]:{},S("Because HeadObject has gzip enabled, head cannot get the file size correctly. If you need to get the file size, please use getObjectMeta"),T.subres=Object.assign({},T.subres),T.versionId&&(T.subres.versionId=T.versionId),_=this._objectRequestParams("HEAD",x,T),_.successStatuses=[200,304],M.next=8,this.request(_);case 8:return R=M.sent,A={meta:null,res:R.res,status:R.status},R.status===200&&Object.keys(R.headers).forEach(function(F){F.indexOf("x-oss-meta-")===0&&(A.meta||(A.meta={}),A.meta[F.substring(11)]=R.headers[F])}),M.abrupt("return",A);case 12:case"end":return M.stop()}},m,this)}));function h(m){return c.apply(this,arguments)}return h}()},{"../utils/checkEnv":53,"@babel/runtime/helpers/asyncToGenerator":77,"@babel/runtime/helpers/interopRequireDefault":78,"@babel/runtime/regenerator":80,"core-js/modules/es.object.assign.js":287,"core-js/modules/es.object.keys.js":290,"core-js/modules/es.object.to-string.js":291,"core-js/modules/web.dom-collections.for-each.js":339}],45:[function(s,E,I){"use strict";var u=s("@babel/runtime/helpers/interopRequireDefault"),d=u(s("@babel/runtime/regenerator"));s("core-js/modules/es.object.assign.js");var g=u(s("@babel/runtime/helpers/asyncToGenerator")),y=I;y.putACL=function(){var S=(0,g.default)(d.default.mark(function c(h,m,x){var T,_;return d.default.wrap(function(A){for(;;)switch(A.prev=A.next){case 0:return x=x||{},x.subres=Object.assign({acl:""},x.subres),x.versionId&&(x.subres.versionId=x.versionId),x.headers=x.headers||{},x.headers["x-oss-object-acl"]=m,h=this._objectName(h),T=this._objectRequestParams("PUT",h,x),T.successStatuses=[200],A.next=10,this.request(T);case 10:return _=A.sent,A.abrupt("return",{res:_.res});case 12:case"end":return A.stop()}},c,this)}));function v(c,h,m){return S.apply(this,arguments)}return v}()},{"@babel/runtime/helpers/asyncToGenerator":77,"@babel/runtime/helpers/interopRequireDefault":78,"@babel/runtime/regenerator":80,"core-js/modules/es.object.assign.js":287}],46:[function(s,E,I){"use strict";var u=s("@babel/runtime/helpers/interopRequireDefault"),d=u(s("@babel/runtime/regenerator"));s("core-js/modules/es.object.assign.js"),s("core-js/modules/es.array.map.js"),s("core-js/modules/es.object.keys.js");var g=u(s("@babel/runtime/helpers/asyncToGenerator")),y=s("../utils/obj2xml"),S=y.obj2xml,v=s("../utils/checkObjectTag"),c=v.checkObjectTag,h=I;h.putObjectTagging=function(){var m=(0,g.default)(d.default.mark(function T(_,R){var A,N,L,M,F=arguments;return d.default.wrap(function(P){for(;;)switch(P.prev=P.next){case 0:return A=F.length>2&&F[2]!==void 0?F[2]:{},c(R),A.subres=Object.assign({tagging:""},A.subres),A.versionId&&(A.subres.versionId=A.versionId),_=this._objectName(_),N=this._objectRequestParams("PUT",_,A),N.successStatuses=[200],R=Object.keys(R).map(function(V){return{Key:V,Value:R[V]}}),L={Tagging:{TagSet:{Tag:R}}},N.mime="xml",N.content=S(L),P.next=13,this.request(N);case 13:return M=P.sent,P.abrupt("return",{res:M.res,status:M.status});case 15:case"end":return P.stop()}},T,this)}));function x(T,_){return m.apply(this,arguments)}return x}()},{"../utils/checkObjectTag":54,"../utils/obj2xml":72,"@babel/runtime/helpers/asyncToGenerator":77,"@babel/runtime/helpers/interopRequireDefault":78,"@babel/runtime/regenerator":80,"core-js/modules/es.array.map.js":280,"core-js/modules/es.object.assign.js":287,"core-js/modules/es.object.keys.js":290}],47:[function(s,E,I){"use strict";var u=s("@babel/runtime/helpers/interopRequireDefault"),d=u(s("@babel/runtime/regenerator"));s("core-js/modules/es.object.assign.js");var g=u(s("@babel/runtime/helpers/asyncToGenerator")),y=I;y.putSymlink=function(){var S=(0,g.default)(d.default.mark(function c(h,m,x){var T,_;return d.default.wrap(function(A){for(;;)switch(A.prev=A.next){case 0:return x=x||{},x.headers=x.headers||{},m=this._escape(this._objectName(m)),this._convertMetaToHeaders(x.meta,x.headers),x.headers["x-oss-symlink-target"]=m,x.subres=Object.assign({symlink:""},x.subres),x.versionId&&(x.subres.versionId=x.versionId),x.storageClass&&(x.headers["x-oss-storage-class"]=x.storageClass),h=this._objectName(h),T=this._objectRequestParams("PUT",h,x),T.successStatuses=[200],A.next=13,this.request(T);case 13:return _=A.sent,A.abrupt("return",{res:_.res});case 15:case"end":return A.stop()}},c,this)}));function v(c,h,m){return S.apply(this,arguments)}return v}()},{"@babel/runtime/helpers/asyncToGenerator":77,"@babel/runtime/helpers/interopRequireDefault":78,"@babel/runtime/regenerator":80,"core-js/modules/es.object.assign.js":287}],48:[function(s,E,I){"use strict";var u=s("url"),d=s("utility"),g=s("copy-to"),y=s("../../common/signUtils"),S=s("../utils/isIP"),v=S.isIP,c=I;c.signatureUrl=function(m,x){if(v(this.options.endpoint.hostname))throw new Error("can not get the object URL when endpoint is IP");x=x||{},m=this._objectName(m),x.method=x.method||"GET";var T=d.timestamp()+(x.expires||1800),_={bucket:this.options.bucket,object:m},R=this._getResource(_);this.options.stsToken&&(x["security-token"]=this.options.stsToken);var A=y._signatureForURL(this.options.accessKeySecret,x,R,T),N=u.parse(this._getReqUrl(_));return N.query={OSSAccessKeyId:this.options.accessKeyId,Expires:T,Signature:A.Signature},g(A.subResource).to(N.query),N.format()}},{"../../common/signUtils":50,"../utils/isIP":69,"copy-to":94,url:472,utility:474}],49:[function(s,E,I){"use strict";var u=s("@babel/runtime/helpers/interopRequireDefault"),d=u(s("@babel/runtime/regenerator"));s("core-js/modules/es.array.iterator.js"),s("core-js/modules/es.object.to-string.js"),s("core-js/modules/es.promise.js"),s("core-js/modules/es.string.iterator.js"),s("core-js/modules/web.dom-collections.iterator.js"),s("core-js/modules/web.dom-collections.for-each.js"),s("core-js/modules/es.function.name.js");var g=u(s("@babel/runtime/helpers/asyncToGenerator")),y=s("./utils/isArray"),S=y.isArray,v=I;v._parallelNode=function(){var c=(0,g.default)(d.default.mark(function m(x,T,_,R){var A,N,L,M,F,H,P,V;return d.default.wrap(function(Q){for(;;)switch(Q.prev=Q.next){case 0:A=this,N=[],L=[],M=x.length/T,F=x.length%T,H=F===0?M:(x.length-F)/T+1,P=1,V=0;case 8:if(!(V0){M=!0,F<=0&&_(R);return}F+=1,V(Q.value,A(P))}H=!1}G()})},v.cancel=function(h){this.options.cancelFlag=!0,S(this.multipartUploadStreams)&&this.multipartUploadStreams.forEach(function(m){if(m.destroyed===!1){var x={name:"cancel",message:"cancel"};m.destroy(x)}}),this.multipartUploadStreams=[],h&&this.abortMultipartUpload(h.name,h.uploadId,h.options)},v.isCancel=function(){return this.options.cancelFlag},v.resetCancelFlag=function(){this.options.cancelFlag=!1},v._stop=function(){this.options.cancelFlag=!0},v._makeCancelEvent=function(){var h={status:0,name:"cancel"};return h},v._makeAbortEvent=function(){var h={status:0,name:"abort",message:"upload task has been abort"};return h}},{"./utils/isArray":63,"@babel/runtime/helpers/asyncToGenerator":77,"@babel/runtime/helpers/interopRequireDefault":78,"@babel/runtime/regenerator":80,"core-js/modules/es.array.iterator.js":278,"core-js/modules/es.function.name.js":284,"core-js/modules/es.object.to-string.js":291,"core-js/modules/es.promise.js":295,"core-js/modules/es.string.iterator.js":303,"core-js/modules/web.dom-collections.for-each.js":339,"core-js/modules/web.dom-collections.iterator.js":340}],50:[function(s,E,I){(function(u){(function(){"use strict";s("core-js/modules/es.string.trim.js"),s("core-js/modules/es.array.sort.js"),s("core-js/modules/es.array.join.js"),s("core-js/modules/es.object.to-string.js"),s("core-js/modules/web.dom-collections.for-each.js"),s("core-js/modules/es.object.keys.js"),s("core-js/modules/es.array.concat.js"),s("core-js/modules/es.regexp.to-string.js");var d=s("./../../shims/crypto/crypto.js"),g=s("is-type-of"),y=s("./utils/lowercaseKeyHeader"),S=y.lowercaseKeyHeader;I.buildCanonicalizedResource=function(c,h){var m="".concat(c),x="?";if(g.string(h)&&h.trim()!=="")m+=x+h;else if(g.array(h))h.sort(),m+=x+h.join("&");else if(h){var T=function(A,N){return A[0]>N[0]?1:A[0]2&&arguments[2]!==void 0?arguments[2]:"utf-8",x=d.createHmac("sha1",c);return x.update(u.from(h,m)).digest("base64")},I.authorization=function(c,h,m,x){return"OSS ".concat(c,":").concat(this.computeSignature(h,m,x))},I._signatureForURL=function(c){var h=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},m=arguments.length>2?arguments[2]:void 0,x=arguments.length>3?arguments[3]:void 0,T=arguments.length>4?arguments[4]:void 0,_={},R=h.subResource,A=R===void 0?{}:R;if(h.process){var N="x-oss-process";A[N]=h.process}if(h.trafficLimit){var L="x-oss-traffic-limit";A[L]=h.trafficLimit}if(h.response&&Object.keys(h.response).forEach(function(P){var V="response-".concat(P.toLowerCase());A[V]=h.response[P]}),Object.keys(h).forEach(function(P){var V=P.toLowerCase(),G=h[P];V.indexOf("x-oss-")===0?_[V]=G:(V.indexOf("content-md5")===0||V.indexOf("content-type")===0)&&(_[P]=G)}),Object.prototype.hasOwnProperty.call(h,"security-token")&&(A["security-token"]=h["security-token"]),Object.prototype.hasOwnProperty.call(h,"callback")){var M={callbackUrl:encodeURI(h.callback.url),callbackBody:h.callback.body};if(h.callback.host&&(M.callbackHost=h.callback.host),h.callback.contentType&&(M.callbackBodyType=h.callback.contentType),A.callback=u.from(JSON.stringify(M)).toString("base64"),h.callback.customValue){var F={};Object.keys(h.callback.customValue).forEach(function(P){F["x:".concat(P)]=h.callback.customValue[P]}),A["callback-var"]=u.from(JSON.stringify(F)).toString("base64")}}var H=this.buildCanonicalString(h.method,m,{headers:_,parameters:A},x.toString());return{Signature:this.computeSignature(c,H,T),subResource:A}}}).call(this)}).call(this,s("buffer").Buffer)},{"./../../shims/crypto/crypto.js":461,"./utils/lowercaseKeyHeader":71,buffer:90,"core-js/modules/es.array.concat.js":272,"core-js/modules/es.array.join.js":279,"core-js/modules/es.array.sort.js":282,"core-js/modules/es.object.keys.js":290,"core-js/modules/es.object.to-string.js":291,"core-js/modules/es.regexp.to-string.js":301,"core-js/modules/es.string.trim.js":308,"core-js/modules/web.dom-collections.for-each.js":339,"is-type-of":466}],51:[function(s,E,I){"use strict";s("core-js/modules/es.regexp.exec.js"),Object.defineProperty(I,"__esModule",{value:!0}),I.checkBucketName=void 0,I.checkBucketName=function(u){var d=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,g=d?/^[a-z0-9][a-z0-9-]{1,61}[a-z0-9]$/:/^[a-z0-9_][a-z0-9-_]{1,61}[a-z0-9_]$/;if(!g.test(u))throw new Error("The bucket must be conform to the specifications")}},{"core-js/modules/es.regexp.exec.js":300}],52:[function(s,E,I){"use strict";s("core-js/modules/es.regexp.exec.js"),Object.defineProperty(I,"__esModule",{value:!0}),I.checkConfigValid=void 0;var u={endpoint:d,region:/^[a-zA-Z0-9\-_]+$/};function d(g){return typeof g=="string"?/^[a-zA-Z0-9._:/-]+$/.test(g):g.host?/^[a-zA-Z0-9._:/-]+$/.test(g.host):!1}I.checkConfigValid=function(g,y){if(u[y]){var S=!0;if(u[y]instanceof Function?S=u[y](g):S=u[y].test(g),!S)throw new Error("The ".concat(y," must be conform to the specifications"))}}},{"core-js/modules/es.regexp.exec.js":300}],53:[function(s,E,I){(function(u){(function(){"use strict";Object.defineProperty(I,"__esModule",{value:!0}),I.checkEnv=void 0;function d(g){u.browser&&console.warn(g)}I.checkEnv=d}).call(this)}).call(this,s("_process"))},{_process:467}],54:[function(s,E,I){"use strict";s("core-js/modules/es.array.concat.js"),s("core-js/modules/es.object.entries.js"),s("core-js/modules/es.object.to-string.js"),s("core-js/modules/web.dom-collections.for-each.js"),Object.defineProperty(I,"__esModule",{value:!0}),I.checkObjectTag=void 0;var u=s("./checkValid"),d=u.checkValid,g=s("./isObject"),y=g.isObject,S=[{validator:function(m){if(typeof m!="string")throw new Error("the key and value of the tag must be String")}},{pattern:/^[a-zA-Z0-9 +-=._:/]+$/,msg:"tag can contain letters, numbers, spaces, and the following symbols: plus sign (+), hyphen (-), equal sign (=), period (.), underscore (_), colon (:), and forward slash (/)"}],v={key:[].concat(S,[{pattern:/^.{1,128}$/,msg:"tag key can be a maximum of 128 bytes in length"}]),value:[].concat(S,[{pattern:/^.{0,256}$/,msg:"tag value can be a maximum of 256 bytes in length"}])};function c(h){if(!y(h))throw new Error("tag must be Object");var m=Object.entries(h);if(m.length>10)throw new Error("maximum of 10 tags for a object");var x=["key","value"];m.forEach(function(T){T.forEach(function(_,R){d(_,v[x[R]])})})}I.checkObjectTag=c},{"./checkValid":55,"./isObject":70,"core-js/modules/es.array.concat.js":272,"core-js/modules/es.object.entries.js":288,"core-js/modules/es.object.to-string.js":291,"core-js/modules/web.dom-collections.for-each.js":339}],55:[function(s,E,I){"use strict";s("core-js/modules/es.object.to-string.js"),s("core-js/modules/web.dom-collections.for-each.js"),s("core-js/modules/es.regexp.exec.js"),Object.defineProperty(I,"__esModule",{value:!0}),I.checkValid=void 0;function u(d,g){g.forEach(function(y){if(y.validator)y.validator(d);else if(y.pattern&&!y.pattern.test(d))throw new Error(y.msg)})}I.checkValid=u},{"core-js/modules/es.object.to-string.js":291,"core-js/modules/es.regexp.exec.js":300,"core-js/modules/web.dom-collections.for-each.js":339}],56:[function(s,E,I){(function(u){(function(){"use strict";s("core-js/modules/es.array.includes.js"),s("core-js/modules/es.string.includes.js"),s("core-js/modules/es.object.assign.js"),s("core-js/modules/es.array.concat.js"),Object.defineProperty(I,"__esModule",{value:!0}),I.createRequest=void 0;var d=s("./../../../shims/crypto/crypto.js"),g=s("debug")("ali-oss"),y=s("mime"),S=s("dateformat"),v=s("copy-to"),c=s("path"),h=s("./encoder"),m=h.encoder,x=s("./isIP"),T=x.isIP,_=s("./setRegion"),R=_.setRegion,A=s("../client/getReqUrl"),N=A.getReqUrl,L=s("./isDingTalk"),M=L.isDingTalk;function F(V,G){return V[G]||V[G.toLowerCase()]}function H(V,G){delete V[G],delete V[G.toLowerCase()]}function P(V){var G=new Date;this.options.amendTimeSkewed&&(G=+new Date+this.options.amendTimeSkewed);var Q={"x-oss-date":S(G,"UTC:ddd, dd mmm yyyy HH:MM:ss 'GMT'")};typeof window!="undefined"&&(Q["x-oss-user-agent"]=this.userAgent),this.userAgent.includes("nodejs")&&(Q["User-Agent"]=this.userAgent),this.options.isRequestPay&&Object.assign(Q,{"x-oss-request-payer":"requester"}),this.options.stsToken&&(Q["x-oss-security-token"]=this.options.stsToken),v(V.headers).to(Q),F(Q,"Content-Type")||(V.mime&&V.mime.indexOf("/")>0?Q["Content-Type"]=V.mime:M()?Q["Content-Type"]="application/octet-stream":Q["Content-Type"]=y.getType(V.mime||c.extname(V.object||""))),F(Q,"Content-Type")||H(Q,"Content-Type"),V.content&&(V.disabledMD5||(!V.headers||!V.headers["Content-MD5"]?Q["Content-MD5"]=d.createHash("md5").update(u.from(V.content,"utf8")).digest("base64"):Q["Content-MD5"]=V.headers["Content-MD5"]),Q["Content-Length"]||(Q["Content-Length"]=V.content.length));var ne=Object.prototype.hasOwnProperty;for(var ue in Q)Q[ue]&&ne.call(Q,ue)&&(Q[ue]=m(String(Q[ue]),this.options.headerEncoding));var ae=this._getResource(V);if(Q.authorization=this.authorization(V.method,ae,V.subres,Q,this.options.headerEncoding),T(this.options.endpoint.hostname)){var he=this.options,ce=he.region,we=he.internal,me=he.secure,Le=R(ce,we,me);Q.host="".concat(V.bucket,".").concat(Le.host)}var ee=N.bind(this)(V);g("request %s %s, with headers %j, !!stream: %s",V.method,ee,Q,!!V.stream);var se=V.timeout||this.options.timeout,le={method:V.method,content:V.content,stream:V.stream,headers:Q,timeout:se,writeStream:V.writeStream,customResponse:V.customResponse,ctx:V.ctx||this.ctx};return this.agent&&(le.agent=this.agent),this.httpsAgent&&(le.httpsAgent=this.httpsAgent),le.enableProxy=!!this.options.enableProxy,le.proxy=this.options.proxy?this.options.proxy:null,{url:ee,params:le}}I.createRequest=P}).call(this)}).call(this,s("buffer").Buffer)},{"../client/getReqUrl":25,"./../../../shims/crypto/crypto.js":461,"./encoder":59,"./isDingTalk":66,"./isIP":69,"./setRegion":75,buffer:90,"copy-to":94,"core-js/modules/es.array.concat.js":272,"core-js/modules/es.array.includes.js":277,"core-js/modules/es.object.assign.js":287,"core-js/modules/es.string.includes.js":302,dateformat:342,debug:465,mime:374,path:378}],57:[function(s,E,I){"use strict";s("core-js/modules/es.object.to-string.js"),s("core-js/modules/web.dom-collections.for-each.js"),s("core-js/modules/es.object.entries.js"),s("core-js/modules/es.regexp.exec.js"),s("core-js/modules/es.string.replace.js"),s("core-js/modules/es.array.includes.js"),s("core-js/modules/es.object.keys.js"),Object.defineProperty(I,"__esModule",{value:!0}),I.dataFix=void 0;var u=s("./isObject"),d=["true","TRUE","1",1],g=["false","FALSE","0",0];function y(c,h,m){if(u.isObject(c)){var x=h.remove,T=x===void 0?[]:x,_=h.rename,R=_===void 0?{}:_,A=h.camel,N=A===void 0?[]:A,L=h.bool,M=L===void 0?[]:L,F=h.lowerFirst,H=F===void 0?!1:F;return T.forEach(function(P){return delete c[P]}),Object.entries(R).forEach(function(P){c[P[0]]&&(c[P[1]]||(c[P[1]]=c[P[0]],delete c[P[0]]))}),N.forEach(function(P){if(c[P]){var V=P.replace(/^(.)/,function(G){return G.toLowerCase()}).replace(/-(\w)/g,function(G,Q){return Q.toUpperCase()});c[V]||(c[V]=c[P])}}),M.forEach(function(P){c[P]=S(c[P])}),typeof m=="function"&&m(c),v(c,H),y}}I.dataFix=y;function S(c){return c?d.includes(c)?!0:g.includes(c)?!1:c:!1}function v(c,h){h&&Object.keys(c).forEach(function(m){var x=m.replace(/^\w/,function(T){return T.toLowerCase()});typeof c[x]=="undefined"&&(c[x]=c[m],delete c[m])})}},{"./isObject":70,"core-js/modules/es.array.includes.js":277,"core-js/modules/es.object.entries.js":288,"core-js/modules/es.object.keys.js":290,"core-js/modules/es.object.to-string.js":291,"core-js/modules/es.regexp.exec.js":300,"core-js/modules/es.string.replace.js":305,"core-js/modules/web.dom-collections.for-each.js":339}],58:[function(s,E,I){"use strict";var u=s("@babel/runtime/helpers/interopRequireDefault");s("core-js/modules/es.array.slice.js"),s("core-js/modules/es.object.to-string.js"),s("core-js/modules/web.dom-collections.for-each.js"),s("core-js/modules/es.object.keys.js");var d=u(s("@babel/runtime/helpers/typeof"));Object.defineProperty(I,"__esModule",{value:!0}),I.deepCopyWith=I.deepCopy=void 0;var g=s("./isBuffer");I.deepCopy=function(y){if(y===null||(0,d.default)(y)!=="object")return y;if(g.isBuffer(y))return y.slice();var S=Array.isArray(y)?[]:{};return Object.keys(y).forEach(function(v){S[v]=I.deepCopy(y[v])}),S},I.deepCopyWith=function(y,S){function v(c,h,m){var x=S(c,h,m);if(x!==void 0)return x;if(c===null||(0,d.default)(c)!=="object")return c;if(g.isBuffer(c))return c.slice();var T=Array.isArray(c)?[]:{};return Object.keys(c).forEach(function(_){T[_]=v(c[_],_,c)}),T}return S?v(y,"",null):I.deepCopy(y)}},{"./isBuffer":65,"@babel/runtime/helpers/interopRequireDefault":78,"@babel/runtime/helpers/typeof":79,"core-js/modules/es.array.slice.js":281,"core-js/modules/es.object.keys.js":290,"core-js/modules/es.object.to-string.js":291,"core-js/modules/web.dom-collections.for-each.js":339}],59:[function(s,E,I){(function(u){(function(){"use strict";s("core-js/modules/es.object.to-string.js"),s("core-js/modules/es.regexp.to-string.js"),Object.defineProperty(I,"__esModule",{value:!0}),I.encoder=void 0;function d(g){var y=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"utf-8";return y==="utf-8"?g:u.from(g).toString("latin1")}I.encoder=d}).call(this)}).call(this,s("buffer").Buffer)},{buffer:90,"core-js/modules/es.object.to-string.js":291,"core-js/modules/es.regexp.to-string.js":301}],60:[function(s,E,I){"use strict";s("core-js/modules/es.array.map.js"),s("core-js/modules/es.regexp.exec.js"),s("core-js/modules/es.string.replace.js"),Object.defineProperty(I,"__esModule",{value:!0}),I.formatInventoryConfig=void 0;var u=s("../utils/dataFix"),d=s("../utils/isObject"),g=s("../utils/isArray"),y=s("../utils/formatObjKey");function S(c){var h=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;return h&&d.isObject(c)&&(c=[c]),g.isArray(c)?c=c.map(v):c=v(c),c}I.formatInventoryConfig=S;function v(c){return u.dataFix(c,{bool:["IsEnabled"]},function(h){var m,x;h.prefix=h.Filter.Prefix,delete h.Filter,h.OSSBucketDestination=h.Destination.OSSBucketDestination,h.OSSBucketDestination.rolename=h.OSSBucketDestination.RoleArn.replace(/.*\//,""),delete h.OSSBucketDestination.RoleArn,h.OSSBucketDestination.bucket=h.OSSBucketDestination.Bucket.replace(/.*:::/,""),delete h.OSSBucketDestination.Bucket,delete h.Destination,h.frequency=h.Schedule.Frequency,delete h.Schedule.Frequency,!((m=h==null?void 0:h.OptionalFields)===null||m===void 0)&&m.Field&&!g.isArray((x=h.OptionalFields)===null||x===void 0?void 0:x.Field)&&(h.OptionalFields.Field=[h.OptionalFields.Field])}),c=y.formatObjKey(c,"firstLowerCase",{exclude:["OSSBucketDestination","SSE-OSS","SSE-KMS"]}),c}},{"../utils/dataFix":57,"../utils/formatObjKey":61,"../utils/isArray":63,"../utils/isObject":70,"core-js/modules/es.array.map.js":280,"core-js/modules/es.regexp.exec.js":300,"core-js/modules/es.string.replace.js":305}],61:[function(s,E,I){"use strict";var u=s("@babel/runtime/helpers/interopRequireDefault");s("core-js/modules/es.object.to-string.js"),s("core-js/modules/web.dom-collections.for-each.js"),s("core-js/modules/es.object.keys.js"),s("core-js/modules/es.array.includes.js"),s("core-js/modules/es.string.includes.js"),s("core-js/modules/es.regexp.exec.js"),s("core-js/modules/es.string.replace.js");var d=u(s("@babel/runtime/helpers/typeof"));Object.defineProperty(I,"__esModule",{value:!0}),I.formatObjKey=void 0;function g(S,v,c){if(S===null||(0,d.default)(S)!=="object")return S;var h;if(Array.isArray(S)){h=[];for(var m=0;m `),S&&S.firstUpperCase&&(y=u.formatObjKey(y,"firstUpperCase")),d(y)==="object"?Object.keys(y).forEach(function(c){d(y[c])!=="undefined"&&d(y[c])!=="null"&&(d(y[c])==="string"||d(y[c])==="number"?v+="<".concat(c,">").concat(y[c],""):d(y[c])==="object"?v+="<".concat(c,">").concat(g(y[c]),""):d(y[c])==="array"?v+=y[c].map(function(h){return"<".concat(c,">").concat(g(h),"")}).join(""):v+="<".concat(c,">").concat(y[c].toString(),""))}):v+=y.toString(),v}I.obj2xml=g},{"./formatObjKey":61,"core-js/modules/es.array.concat.js":272,"core-js/modules/es.array.join.js":279,"core-js/modules/es.array.map.js":280,"core-js/modules/es.object.keys.js":290,"core-js/modules/es.object.to-string.js":291,"core-js/modules/es.regexp.exec.js":300,"core-js/modules/es.regexp.to-string.js":301,"core-js/modules/es.string.replace.js":305,"core-js/modules/web.dom-collections.for-each.js":339}],73:[function(s,E,I){"use strict";s("core-js/modules/es.array.slice.js"),s("core-js/modules/es.object.to-string.js"),s("core-js/modules/es.function.name.js"),s("core-js/modules/es.array.from.js"),s("core-js/modules/es.string.iterator.js"),s("core-js/modules/es.regexp.exec.js"),s("core-js/modules/es.symbol.js"),s("core-js/modules/es.symbol.description.js"),s("core-js/modules/es.symbol.iterator.js"),s("core-js/modules/es.array.iterator.js"),s("core-js/modules/web.dom-collections.iterator.js"),s("core-js/modules/es.object.assign.js");function u(S,v){var c=typeof Symbol!="undefined"&&S[Symbol.iterator]||S["@@iterator"];if(!c){if(Array.isArray(S)||(c=d(S))||v&&S&&typeof S.length=="number"){c&&(S=c);var h=0,m=function(){};return{s:m,n:function(){return h>=S.length?{done:!0}:{done:!1,value:S[h++]}},e:function(A){throw A},f:m}}throw new TypeError(`Invalid attempt to iterate non-iterable instance. In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var x=!0,T=!1,_;return{s:function(){c=c.call(S)},n:function(){var A=c.next();return x=A.done,A},e:function(A){T=!0,_=A},f:function(){try{!x&&c.return!=null&&c.return()}finally{if(T)throw _}}}}function d(S,v){if(S){if(typeof S=="string")return g(S,v);var c=Object.prototype.toString.call(S).slice(8,-1);if(c==="Object"&&S.constructor&&(c=S.constructor.name),c==="Map"||c==="Set")return Array.from(S);if(c==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(c))return g(S,v)}}function g(S,v){(v==null||v>S.length)&&(v=S.length);for(var c=0,h=new Array(v);c2&&arguments[2]!==void 0?arguments[2]:{},S=0,v=y.retryDelay,c=v===void 0?500:v,h=y.errorHandler,m=h===void 0?function(){return!0}:h,x=function T(){for(var _=arguments.length,R=new Array(_),A=0;A<_;A++)R[A]=arguments[A];return new Promise(function(N,L){d.apply(void 0,R).then(function(M){S=0,N(M)}).catch(function(M){S1&&arguments[1]!==void 0?arguments[1]:!1,c=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;g.checkConfigValid(S,"region");var h=c?"https://":"http://",m=v?"-internal.aliyuncs.com":".aliyuncs.com",x="vpc100-oss-cn-";return S.substr(0,x.length)===x&&(m=".aliyuncs.com"),d.default.parse(h+S+m)}I.setRegion=y},{"./checkConfigValid":52,url:472}],76:[function(s,E,I){"use strict";var u=s("@babel/runtime/helpers/interopRequireDefault"),d=u(s("@babel/runtime/regenerator"));s("core-js/modules/es.object.keys.js"),s("core-js/modules/es.object.to-string.js"),s("core-js/modules/es.array.find.js"),s("core-js/modules/es.object.assign.js");var g=u(s("@babel/runtime/helpers/asyncToGenerator"));Object.defineProperty(I,"__esModule",{value:!0}),I.checkCredentials=I.setSTSToken=void 0;var y=s("./formatObjKey");function S(){return v.apply(this,arguments)}function v(){return v=(0,g.default)(d.default.mark(function h(){var m,x;return d.default.wrap(function(_){for(;;)switch(_.prev=_.next){case 0:if(this.options||(this.options={}),m=new Date,!this.stsTokenFreshTime){_.next=14;break}if(!(+m-this.stsTokenFreshTime>=this.options.refreshSTSTokenInterval)){_.next=12;break}return this.stsTokenFreshTime=m,_.next=7,this.options.refreshSTSToken();case 7:x=_.sent,x=y.formatObjKey(x,"firstLowerCase"),x.securityToken&&(x.stsToken=x.securityToken),c(x),Object.assign(this.options,x);case 12:_.next=15;break;case 14:this.stsTokenFreshTime=m;case 15:return _.abrupt("return",null);case 16:case"end":return _.stop()}},h,this)})),v.apply(this,arguments)}I.setSTSToken=S;function c(h){var m=["accessKeySecret","accessKeyId","stsToken"],x=Object.keys(h);m.forEach(function(T){if(!x.find(function(_){return _===T}))throw Error("refreshSTSToken must return contains ".concat(T))})}I.checkCredentials=c},{"./formatObjKey":61,"@babel/runtime/helpers/asyncToGenerator":77,"@babel/runtime/helpers/interopRequireDefault":78,"@babel/runtime/regenerator":80,"core-js/modules/es.array.find.js":275,"core-js/modules/es.object.assign.js":287,"core-js/modules/es.object.keys.js":290,"core-js/modules/es.object.to-string.js":291}],77:[function(s,E,I){function u(g,y,S,v,c,h,m){try{var x=g[h](m),T=x.value}catch(_){S(_);return}x.done?y(T):Promise.resolve(T).then(v,c)}function d(g){return function(){var y=this,S=arguments;return new Promise(function(v,c){var h=g.apply(y,S);function m(T){u(h,v,c,m,x,"next",T)}function x(T){u(h,v,c,m,x,"throw",T)}m(void 0)})}}E.exports=d,E.exports.__esModule=!0,E.exports.default=E.exports},{}],78:[function(s,E,I){function u(d){return d&&d.__esModule?d:{default:d}}E.exports=u,E.exports.__esModule=!0,E.exports.default=E.exports},{}],79:[function(s,E,I){function u(d){"@babel/helpers - typeof";return E.exports=u=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(g){return typeof g}:function(g){return g&&typeof Symbol=="function"&&g.constructor===Symbol&&g!==Symbol.prototype?"symbol":typeof g},E.exports.__esModule=!0,E.exports.default=E.exports,u(d)}E.exports=u,E.exports.__esModule=!0,E.exports.default=E.exports},{}],80:[function(s,E,I){E.exports=s("regenerator-runtime")},{"regenerator-runtime":395}],81:[function(s,E,I){E.exports=u,E.exports.HttpsAgent=u;function u(){}},{}],82:[function(s,E,I){(function(u){(function(){"use strict";var d=s("object-assign");function g(ce,we){if(ce===we)return 0;for(var me=ce.length,Le=we.length,ee=0,se=Math.min(me,Le);ee=0){var ke=ee.indexOf(` `,le+1);ee=ee.substring(ke+1)}this.stack=ee}}},S.inherits(T.AssertionError,Error);function A(ce,we){return typeof ce=="string"?ce.length=0;Be--)if(le[Be]!==ke[Be])return!1;for(Be=le.length-1;Be>=0;Be--)if(De=le[Be],!H(ce[De],we[De],me,Le))return!1;return!0}T.notDeepEqual=function(we,me,Le){H(we,me,!1)&&M(we,me,Le,"notDeepEqual",T.notDeepEqual)},T.notDeepStrictEqual=G;function G(ce,we,me){H(ce,we,!0)&&M(ce,we,me,"notDeepStrictEqual",G)}T.strictEqual=function(we,me,Le){we!==me&&M(we,me,Le,"===",T.strictEqual)},T.notStrictEqual=function(we,me,Le){we===me&&M(we,me,Le,"!==",T.notStrictEqual)};function Q(ce,we){if(!ce||!we)return!1;if(Object.prototype.toString.call(we)=="[object RegExp]")return we.test(ce);try{if(ce instanceof we)return!0}catch(me){}return Error.isPrototypeOf(we)?!1:we.call({},ce)===!0}function ne(ce){var we;try{ce()}catch(me){we=me}return we}function ue(ce,we,me,Le){var ee;if(typeof we!="function")throw new TypeError('"block" argument must be a function');typeof me=="string"&&(Le=me,me=null),ee=ne(we),Le=(me&&me.name?" ("+me.name+").":".")+(Le?" "+Le:"."),ce&&!ee&&M(ee,me,"Missing expected exception"+Le);var se=typeof Le=="string",le=!ce&&S.isError(ee),ke=!ce&&ee&&!me;if((le&&se&&Q(ee,me)||ke)&&M(ee,me,"Got unwanted exception"+Le),ce&&ee&&me&&!Q(ee,me)||!ce&&ee)throw ee}T.throws=function(ce,we,me){ue(!0,ce,we,me)},T.doesNotThrow=function(ce,we,me){ue(!1,ce,we,me)},T.ifError=function(ce){if(ce)throw ce};function ae(ce,we){ce||M(ce,!0,we,"==",ae)}T.strict=d(ae,T,{equal:T.strictEqual,deepEqual:T.deepStrictEqual,notEqual:T.notStrictEqual,notDeepEqual:T.notDeepStrictEqual}),T.strict.strict=T.strict;var he=Object.keys||function(ce){var we=[];for(var me in ce)v.call(ce,me)&&we.push(me);return we}}).call(this)}).call(this,typeof Z!="undefined"?Z:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{"object-assign":377,"util/":85}],83:[function(s,E,I){typeof Object.create=="function"?E.exports=function(d,g){d.super_=g,d.prototype=Object.create(g.prototype,{constructor:{value:d,enumerable:!1,writable:!0,configurable:!0}})}:E.exports=function(d,g){d.super_=g;var y=function(){};y.prototype=g.prototype,d.prototype=new y,d.prototype.constructor=d}},{}],84:[function(s,E,I){E.exports=function(d){return d&&typeof d=="object"&&typeof d.copy=="function"&&typeof d.fill=="function"&&typeof d.readUInt8=="function"}},{}],85:[function(s,E,I){(function(u,d){(function(){var g=/%[sdj%]/g;I.format=function(ke){if(!V(ke)){for(var De=[],Be=0;Be=Fe)return lt;switch(lt){case"%s":return String(He[Be++]);case"%d":return Number(He[Be++]);case"%j":try{return JSON.stringify(He[Be++])}catch(Re){return"[Circular]"}default:return lt}}),Me=He[Be];Be=3&&(Be.depth=arguments[2]),arguments.length>=4&&(Be.colors=arguments[3]),M(De)?Be.showHidden=De:De&&I._extend(Be,De),Q(Be.showHidden)&&(Be.showHidden=!1),Q(Be.depth)&&(Be.depth=2),Q(Be.colors)&&(Be.colors=!1),Q(Be.customInspect)&&(Be.customInspect=!0),Be.colors&&(Be.stylize=c),x(Be,ke,Be.depth)}I.inspect=v,v.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},v.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"};function c(ke,De){var Be=v.styles[De];return Be?"\x1B["+v.colors[Be][0]+"m"+ke+"\x1B["+v.colors[Be][1]+"m":ke}function h(ke,De){return ke}function m(ke){var De={};return ke.forEach(function(Be,He){De[Be]=!0}),De}function x(ke,De,Be){if(ke.customInspect&&De&&ce(De.inspect)&&De.inspect!==I.inspect&&!(De.constructor&&De.constructor.prototype===De)){var He=De.inspect(Be,ke);return V(He)||(He=x(ke,He,Be)),He}var Fe=T(ke,De);if(Fe)return Fe;var Je=Object.keys(De),Me=m(Je);if(ke.showHidden&&(Je=Object.getOwnPropertyNames(De)),he(De)&&(Je.indexOf("message")>=0||Je.indexOf("description")>=0))return _(De);if(Je.length===0){if(ce(De)){var lt=De.name?": "+De.name:"";return ke.stylize("[Function"+lt+"]","special")}if(ne(De))return ke.stylize(RegExp.prototype.toString.call(De),"regexp");if(ae(De))return ke.stylize(Date.prototype.toString.call(De),"date");if(he(De))return _(De)}var Re="",Oe=!1,pe=["{","}"];if(L(De)&&(Oe=!0,pe=["[","]"]),ce(De)){var fe=De.name?": "+De.name:"";Re=" [Function"+fe+"]"}if(ne(De)&&(Re=" "+RegExp.prototype.toString.call(De)),ae(De)&&(Re=" "+Date.prototype.toUTCString.call(De)),he(De)&&(Re=" "+_(De)),Je.length===0&&(!Oe||De.length==0))return pe[0]+Re+pe[1];if(Be<0)return ne(De)?ke.stylize(RegExp.prototype.toString.call(De),"regexp"):ke.stylize("[Object]","special");ke.seen.push(De);var z;return Oe?z=R(ke,De,Be,Me,Je):z=Je.map(function(J){return A(ke,De,Be,Me,J,Oe)}),ke.seen.pop(),N(z,Re,pe)}function T(ke,De){if(Q(De))return ke.stylize("undefined","undefined");if(V(De)){var Be="'"+JSON.stringify(De).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return ke.stylize(Be,"string")}if(P(De))return ke.stylize(""+De,"number");if(M(De))return ke.stylize(""+De,"boolean");if(F(De))return ke.stylize("null","null")}function _(ke){return"["+Error.prototype.toString.call(ke)+"]"}function R(ke,De,Be,He,Fe){for(var Je=[],Me=0,lt=De.length;Me-1&&(Je?lt=lt.split(` `).map(function(Oe){return" "+Oe}).join(` `).substr(2):lt=` `+lt.split(` `).map(function(Oe){return" "+Oe}).join(` `))):lt=ke.stylize("[Circular]","special")),Q(Me)){if(Je&&Fe.match(/^\d+$/))return lt;Me=JSON.stringify(""+Fe),Me.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(Me=Me.substr(1,Me.length-2),Me=ke.stylize(Me,"name")):(Me=Me.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),Me=ke.stylize(Me,"string"))}return Me+": "+lt}function N(ke,De,Be){var He=0,Fe=ke.reduce(function(Je,Me){return He++,Me.indexOf(` `)>=0&&He++,Je+Me.replace(/\u001b\[\d\d?m/g,"").length+1},0);return Fe>60?Be[0]+(De===""?"":De+` `)+" "+ke.join(`, `)+" "+Be[1]:Be[0]+De+" "+ke.join(", ")+" "+Be[1]}function L(ke){return Array.isArray(ke)}I.isArray=L;function M(ke){return typeof ke=="boolean"}I.isBoolean=M;function F(ke){return ke===null}I.isNull=F;function H(ke){return ke==null}I.isNullOrUndefined=H;function P(ke){return typeof ke=="number"}I.isNumber=P;function V(ke){return typeof ke=="string"}I.isString=V;function G(ke){return typeof ke=="symbol"}I.isSymbol=G;function Q(ke){return ke===void 0}I.isUndefined=Q;function ne(ke){return ue(ke)&&me(ke)==="[object RegExp]"}I.isRegExp=ne;function ue(ke){return typeof ke=="object"&&ke!==null}I.isObject=ue;function ae(ke){return ue(ke)&&me(ke)==="[object Date]"}I.isDate=ae;function he(ke){return ue(ke)&&(me(ke)==="[object Error]"||ke instanceof Error)}I.isError=he;function ce(ke){return typeof ke=="function"}I.isFunction=ce;function we(ke){return ke===null||typeof ke=="boolean"||typeof ke=="number"||typeof ke=="string"||typeof ke=="symbol"||typeof ke=="undefined"}I.isPrimitive=we,I.isBuffer=s("./support/isBuffer");function me(ke){return Object.prototype.toString.call(ke)}function Le(ke){return ke<10?"0"+ke.toString(10):ke.toString(10)}var ee=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function se(){var ke=new Date,De=[Le(ke.getHours()),Le(ke.getMinutes()),Le(ke.getSeconds())].join(":");return[ke.getDate(),ee[ke.getMonth()],De].join(" ")}I.log=function(){console.log("%s - %s",se(),I.format.apply(I,arguments))},I.inherits=s("inherits"),I._extend=function(ke,De){if(!De||!ue(De))return ke;for(var Be=Object.keys(De),He=Be.length;He--;)ke[Be[He]]=De[Be[He]];return ke};function le(ke,De){return Object.prototype.hasOwnProperty.call(ke,De)}}).call(this)}).call(this,s("_process"),typeof Z!="undefined"?Z:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{"./support/isBuffer":84,_process:467,inherits:83}],86:[function(s,E,I){(function(u){(function(){"use strict";var d=["BigInt64Array","BigUint64Array","Float32Array","Float64Array","Int16Array","Int32Array","Int8Array","Uint16Array","Uint32Array","Uint8Array","Uint8ClampedArray"],g=typeof globalThis=="undefined"?u:globalThis;E.exports=function(){for(var S=[],v=0;v0)throw new Error("Invalid string. Length must be a multiple of 4");var L=A.indexOf("=");L===-1&&(L=N);var M=L===N?0:4-L%4;return[L,M]}function h(A){var N=c(A),L=N[0],M=N[1];return(L+M)*3/4-M}function m(A,N,L){return(N+L)*3/4-L}function x(A){var N,L=c(A),M=L[0],F=L[1],H=new g(m(A,M,F)),P=0,V=F>0?M-4:M,G;for(G=0;G>16&255,H[P++]=N>>8&255,H[P++]=N&255;return F===2&&(N=d[A.charCodeAt(G)]<<2|d[A.charCodeAt(G+1)]>>4,H[P++]=N&255),F===1&&(N=d[A.charCodeAt(G)]<<10|d[A.charCodeAt(G+1)]<<4|d[A.charCodeAt(G+2)]>>2,H[P++]=N>>8&255,H[P++]=N&255),H}function T(A){return u[A>>18&63]+u[A>>12&63]+u[A>>6&63]+u[A&63]}function _(A,N,L){for(var M,F=[],H=N;HV?V:P+H));return M===1?(N=A[L-1],F.push(u[N>>2]+u[N<<4&63]+"==")):M===2&&(N=(A[L-2]<<8)+A[L-1],F.push(u[N>>10]+u[N>>4&63]+u[N<<2&63]+"=")),F.join("")}},{}],88:[function(s,E,I){(function(u,d,g){typeof E!="undefined"&&E.exports?E.exports=g():typeof b=="function"&&b.amd?b(d,g):u[d]=g()})(this,"bowser",function(){var u=!0;function d(m){function x(De){var Be=m.match(De);return Be&&Be.length>1&&Be[1]||""}function T(De){var Be=m.match(De);return Be&&Be.length>1&&Be[2]||""}var _=x(/(ipod|iphone|ipad)/i).toLowerCase(),R=/like android/i.test(m),A=!R&&/android/i.test(m),N=/nexus\s*[0-6]\s*/i.test(m),L=!N&&/nexus\s*[0-9]+/i.test(m),M=/CrOS/.test(m),F=/silk/i.test(m),H=/sailfish/i.test(m),P=/tizen/i.test(m),V=/(web|hpw)(o|0)s/i.test(m),G=/windows phone/i.test(m),Q=/SamsungBrowser/i.test(m),ne=!G&&/windows/i.test(m),ue=!_&&!F&&/macintosh/i.test(m),ae=!A&&!H&&!P&&!V&&/linux/i.test(m),he=T(/edg([ea]|ios)\/(\d+(\.\d+)?)/i),ce=x(/version\/(\d+(\.\d+)?)/i),we=/tablet/i.test(m)&&!/tablet pc/i.test(m),me=!we&&/[^-]mobi/i.test(m),Le=/xbox/i.test(m),ee;/opera/i.test(m)?ee={name:"Opera",opera:u,version:ce||x(/(?:opera|opr|opios)[\s\/](\d+(\.\d+)?)/i)}:/opr\/|opios/i.test(m)?ee={name:"Opera",opera:u,version:x(/(?:opr|opios)[\s\/](\d+(\.\d+)?)/i)||ce}:/SamsungBrowser/i.test(m)?ee={name:"Samsung Internet for Android",samsungBrowser:u,version:ce||x(/(?:SamsungBrowser)[\s\/](\d+(\.\d+)?)/i)}:/Whale/i.test(m)?ee={name:"NAVER Whale browser",whale:u,version:x(/(?:whale)[\s\/](\d+(?:\.\d+)+)/i)}:/MZBrowser/i.test(m)?ee={name:"MZ Browser",mzbrowser:u,version:x(/(?:MZBrowser)[\s\/](\d+(?:\.\d+)+)/i)}:/coast/i.test(m)?ee={name:"Opera Coast",coast:u,version:ce||x(/(?:coast)[\s\/](\d+(\.\d+)?)/i)}:/focus/i.test(m)?ee={name:"Focus",focus:u,version:x(/(?:focus)[\s\/](\d+(?:\.\d+)+)/i)}:/yabrowser/i.test(m)?ee={name:"Yandex Browser",yandexbrowser:u,version:ce||x(/(?:yabrowser)[\s\/](\d+(\.\d+)?)/i)}:/ucbrowser/i.test(m)?ee={name:"UC Browser",ucbrowser:u,version:x(/(?:ucbrowser)[\s\/](\d+(?:\.\d+)+)/i)}:/mxios/i.test(m)?ee={name:"Maxthon",maxthon:u,version:x(/(?:mxios)[\s\/](\d+(?:\.\d+)+)/i)}:/epiphany/i.test(m)?ee={name:"Epiphany",epiphany:u,version:x(/(?:epiphany)[\s\/](\d+(?:\.\d+)+)/i)}:/puffin/i.test(m)?ee={name:"Puffin",puffin:u,version:x(/(?:puffin)[\s\/](\d+(?:\.\d+)?)/i)}:/sleipnir/i.test(m)?ee={name:"Sleipnir",sleipnir:u,version:x(/(?:sleipnir)[\s\/](\d+(?:\.\d+)+)/i)}:/k-meleon/i.test(m)?ee={name:"K-Meleon",kMeleon:u,version:x(/(?:k-meleon)[\s\/](\d+(?:\.\d+)+)/i)}:G?(ee={name:"Windows Phone",osname:"Windows Phone",windowsphone:u},he?(ee.msedge=u,ee.version=he):(ee.msie=u,ee.version=x(/iemobile\/(\d+(\.\d+)?)/i))):/msie|trident/i.test(m)?ee={name:"Internet Explorer",msie:u,version:x(/(?:msie |rv:)(\d+(\.\d+)?)/i)}:M?ee={name:"Chrome",osname:"Chrome OS",chromeos:u,chromeBook:u,chrome:u,version:x(/(?:chrome|crios|crmo)\/(\d+(\.\d+)?)/i)}:/edg([ea]|ios)/i.test(m)?ee={name:"Microsoft Edge",msedge:u,version:he}:/vivaldi/i.test(m)?ee={name:"Vivaldi",vivaldi:u,version:x(/vivaldi\/(\d+(\.\d+)?)/i)||ce}:H?ee={name:"Sailfish",osname:"Sailfish OS",sailfish:u,version:x(/sailfish\s?browser\/(\d+(\.\d+)?)/i)}:/seamonkey\//i.test(m)?ee={name:"SeaMonkey",seamonkey:u,version:x(/seamonkey\/(\d+(\.\d+)?)/i)}:/firefox|iceweasel|fxios/i.test(m)?(ee={name:"Firefox",firefox:u,version:x(/(?:firefox|iceweasel|fxios)[ \/](\d+(\.\d+)?)/i)},/\((mobile|tablet);[^\)]*rv:[\d\.]+\)/i.test(m)&&(ee.firefoxos=u,ee.osname="Firefox OS")):F?ee={name:"Amazon Silk",silk:u,version:x(/silk\/(\d+(\.\d+)?)/i)}:/phantom/i.test(m)?ee={name:"PhantomJS",phantom:u,version:x(/phantomjs\/(\d+(\.\d+)?)/i)}:/slimerjs/i.test(m)?ee={name:"SlimerJS",slimer:u,version:x(/slimerjs\/(\d+(\.\d+)?)/i)}:/blackberry|\bbb\d+/i.test(m)||/rim\stablet/i.test(m)?ee={name:"BlackBerry",osname:"BlackBerry OS",blackberry:u,version:ce||x(/blackberry[\d]+\/(\d+(\.\d+)?)/i)}:V?(ee={name:"WebOS",osname:"WebOS",webos:u,version:ce||x(/w(?:eb)?osbrowser\/(\d+(\.\d+)?)/i)},/touchpad\//i.test(m)&&(ee.touchpad=u)):/bada/i.test(m)?ee={name:"Bada",osname:"Bada",bada:u,version:x(/dolfin\/(\d+(\.\d+)?)/i)}:P?ee={name:"Tizen",osname:"Tizen",tizen:u,version:x(/(?:tizen\s?)?browser\/(\d+(\.\d+)?)/i)||ce}:/qupzilla/i.test(m)?ee={name:"QupZilla",qupzilla:u,version:x(/(?:qupzilla)[\s\/](\d+(?:\.\d+)+)/i)||ce}:/chromium/i.test(m)?ee={name:"Chromium",chromium:u,version:x(/(?:chromium)[\s\/](\d+(?:\.\d+)?)/i)||ce}:/chrome|crios|crmo/i.test(m)?ee={name:"Chrome",chrome:u,version:x(/(?:chrome|crios|crmo)\/(\d+(\.\d+)?)/i)}:A?ee={name:"Android",version:ce}:/safari|applewebkit/i.test(m)?(ee={name:"Safari",safari:u},ce&&(ee.version=ce)):_?(ee={name:_=="iphone"?"iPhone":_=="ipad"?"iPad":"iPod"},ce&&(ee.version=ce)):/googlebot/i.test(m)?ee={name:"Googlebot",googlebot:u,version:x(/googlebot\/(\d+(\.\d+))/i)||ce}:ee={name:x(/^(.*)\/(.*) /),version:T(/^(.*)\/(.*) /)},!ee.msedge&&/(apple)?webkit/i.test(m)?(/(apple)?webkit\/537\.36/i.test(m)?(ee.name=ee.name||"Blink",ee.blink=u):(ee.name=ee.name||"Webkit",ee.webkit=u),!ee.version&&ce&&(ee.version=ce)):!ee.opera&&/gecko\//i.test(m)&&(ee.name=ee.name||"Gecko",ee.gecko=u,ee.version=ee.version||x(/gecko\/(\d+(\.\d+)?)/i)),!ee.windowsphone&&(A||ee.silk)?(ee.android=u,ee.osname="Android"):!ee.windowsphone&&_?(ee[_]=u,ee.ios=u,ee.osname="iOS"):ue?(ee.mac=u,ee.osname="macOS"):Le?(ee.xbox=u,ee.osname="Xbox"):ne?(ee.windows=u,ee.osname="Windows"):ae&&(ee.linux=u,ee.osname="Linux");function se(De){switch(De){case"NT":return"NT";case"XP":return"XP";case"NT 5.0":return"2000";case"NT 5.1":return"XP";case"NT 5.2":return"2003";case"NT 6.0":return"Vista";case"NT 6.1":return"7";case"NT 6.2":return"8";case"NT 6.3":return"8.1";case"NT 10.0":return"10";default:return}}var le="";ee.windows?le=se(x(/Windows ((NT|XP)( \d\d?.\d)?)/i)):ee.windowsphone?le=x(/windows phone (?:os)?\s?(\d+(\.\d+)*)/i):ee.mac?(le=x(/Mac OS X (\d+([_\.\s]\d+)*)/i),le=le.replace(/[_\s]/g,".")):_?(le=x(/os (\d+([_\s]\d+)*) like mac os x/i),le=le.replace(/[_\s]/g,".")):A?le=x(/android[ \/-](\d+(\.\d+)*)/i):ee.webos?le=x(/(?:web|hpw)os\/(\d+(\.\d+)*)/i):ee.blackberry?le=x(/rim\stablet\sos\s(\d+(\.\d+)*)/i):ee.bada?le=x(/bada\/(\d+(\.\d+)*)/i):ee.tizen&&(le=x(/tizen[\/\s](\d+(\.\d+)*)/i)),le&&(ee.osversion=le);var ke=!ee.windows&&le.split(".")[0];return we||L||_=="ipad"||A&&(ke==3||ke>=4&&!me)||ee.silk?ee.tablet=u:(me||_=="iphone"||_=="ipod"||A||N||ee.blackberry||ee.webos||ee.bada)&&(ee.mobile=u),ee.msedge||ee.msie&&ee.version>=10||ee.yandexbrowser&&ee.version>=15||ee.vivaldi&&ee.version>=1||ee.chrome&&ee.version>=20||ee.samsungBrowser&&ee.version>=4||ee.whale&&v([ee.version,"1.0"])===1||ee.mzbrowser&&v([ee.version,"6.0"])===1||ee.focus&&v([ee.version,"1.0"])===1||ee.firefox&&ee.version>=20||ee.safari&&ee.version>=6||ee.opera&&ee.version>=10||ee.ios&&ee.osversion&&ee.osversion.split(".")[0]>=6||ee.blackberry&&ee.version>=10.1||ee.chromium&&ee.version>=20?ee.a=u:ee.msie&&ee.version<10||ee.chrome&&ee.version<20||ee.firefox&&ee.version<20||ee.safari&&ee.version<6||ee.opera&&ee.version<10||ee.ios&&ee.osversion&&ee.osversion.split(".")[0]<6||ee.chromium&&ee.version<20?ee.c=u:ee.x=u,ee}var g=d(typeof navigator!="undefined"&&navigator.userAgent||"");g.test=function(m){for(var x=0;x=0;){if(T[0][x]>T[1][x])return 1;if(T[0][x]===T[1][x]){if(x===0)return 0}else return-1}}function c(m,x,T){var _=g;typeof x=="string"&&(T=x,x=void 0),x===void 0&&(x=!1),T&&(_=d(T));var R=""+_.version;for(var A in m)if(m.hasOwnProperty(A)&&_[A]){if(typeof m[A]!="string")throw new Error("Browser version in the minVersion map should be a string: "+A+": "+String(m));return v([R,m[A]])<0}return x}function h(m,x,T){return!c(m,x,T)}return g.isUnsupportedBrowser=c,g.compareVersions=v,g.check=h,g._detect=d,g.detect=d,g})},{}],89:[function(s,E,I){},{}],90:[function(s,E,I){(function(u){(function(){"use strict";var d=s("base64-js"),g=s("ieee754");I.Buffer=c,I.SlowBuffer=M,I.INSPECT_MAX_BYTES=50;var y=2147483647;I.kMaxLength=y,c.TYPED_ARRAY_SUPPORT=S(),!c.TYPED_ARRAY_SUPPORT&&typeof console!="undefined"&&typeof console.error=="function"&&console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support.");function S(){try{var ie=new Uint8Array(1);return ie.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},ie.foo()===42}catch(ve){return!1}}Object.defineProperty(c.prototype,"parent",{enumerable:!0,get:function(){if(c.isBuffer(this))return this.buffer}}),Object.defineProperty(c.prototype,"offset",{enumerable:!0,get:function(){if(c.isBuffer(this))return this.byteOffset}});function v(ie){if(ie>y)throw new RangeError('The value "'+ie+'" is invalid for option "size"');var ve=new Uint8Array(ie);return ve.__proto__=c.prototype,ve}function c(ie,ve,Ne){if(typeof ie=="number"){if(typeof ve=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return T(ie)}return h(ie,ve,Ne)}typeof Symbol!="undefined"&&Symbol.species!=null&&c[Symbol.species]===c&&Object.defineProperty(c,Symbol.species,{value:null,configurable:!0,enumerable:!1,writable:!1}),c.poolSize=8192;function h(ie,ve,Ne){if(typeof ie=="string")return _(ie,ve);if(ArrayBuffer.isView(ie))return R(ie);if(ie==null)throw TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof ie);if(_e(ie,ArrayBuffer)||ie&&_e(ie.buffer,ArrayBuffer))return A(ie,ve,Ne);if(typeof ie=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');var ze=ie.valueOf&&ie.valueOf();if(ze!=null&&ze!==ie)return c.from(ze,ve,Ne);var Ve=N(ie);if(Ve)return Ve;if(typeof Symbol!="undefined"&&Symbol.toPrimitive!=null&&typeof ie[Symbol.toPrimitive]=="function")return c.from(ie[Symbol.toPrimitive]("string"),ve,Ne);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof ie)}c.from=function(ie,ve,Ne){return h(ie,ve,Ne)},c.prototype.__proto__=Uint8Array.prototype,c.__proto__=Uint8Array;function m(ie){if(typeof ie!="number")throw new TypeError('"size" argument must be of type number');if(ie<0)throw new RangeError('The value "'+ie+'" is invalid for option "size"')}function x(ie,ve,Ne){return m(ie),ie<=0?v(ie):ve!==void 0?typeof Ne=="string"?v(ie).fill(ve,Ne):v(ie).fill(ve):v(ie)}c.alloc=function(ie,ve,Ne){return x(ie,ve,Ne)};function T(ie){return m(ie),v(ie<0?0:L(ie)|0)}c.allocUnsafe=function(ie){return T(ie)},c.allocUnsafeSlow=function(ie){return T(ie)};function _(ie,ve){if((typeof ve!="string"||ve==="")&&(ve="utf8"),!c.isEncoding(ve))throw new TypeError("Unknown encoding: "+ve);var Ne=F(ie,ve)|0,ze=v(Ne),Ve=ze.write(ie,ve);return Ve!==Ne&&(ze=ze.slice(0,Ve)),ze}function R(ie){for(var ve=ie.length<0?0:L(ie.length)|0,Ne=v(ve),ze=0;ze=y)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+y.toString(16)+" bytes");return ie|0}function M(ie){return+ie!=ie&&(ie=0),c.alloc(+ie)}c.isBuffer=function(ve){return ve!=null&&ve._isBuffer===!0&&ve!==c.prototype},c.compare=function(ve,Ne){if(_e(ve,Uint8Array)&&(ve=c.from(ve,ve.offset,ve.byteLength)),_e(Ne,Uint8Array)&&(Ne=c.from(Ne,Ne.offset,Ne.byteLength)),!c.isBuffer(ve)||!c.isBuffer(Ne))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(ve===Ne)return 0;for(var ze=ve.length,Ve=Ne.length,yt=0,ct=Math.min(ze,Ve);yt2&&arguments[2]===!0;if(!ze&&Ne===0)return 0;for(var Ve=!1;;)switch(ve){case"ascii":case"latin1":case"binary":return Ne;case"utf8":case"utf-8":return pe(ie).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return Ne*2;case"hex":return Ne>>>1;case"base64":return J(ie).length;default:if(Ve)return ze?-1:pe(ie).length;ve=(""+ve).toLowerCase(),Ve=!0}}c.byteLength=F;function H(ie,ve,Ne){var ze=!1;if((ve===void 0||ve<0)&&(ve=0),ve>this.length||((Ne===void 0||Ne>this.length)&&(Ne=this.length),Ne<=0)||(Ne>>>=0,ve>>>=0,Ne<=ve))return"";for(ie||(ie="utf8");;)switch(ie){case"hex":return ke(this,ve,Ne);case"utf8":case"utf-8":return me(this,ve,Ne);case"ascii":return se(this,ve,Ne);case"latin1":case"binary":return le(this,ve,Ne);case"base64":return we(this,ve,Ne);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return De(this,ve,Ne);default:if(ze)throw new TypeError("Unknown encoding: "+ie);ie=(ie+"").toLowerCase(),ze=!0}}c.prototype._isBuffer=!0;function P(ie,ve,Ne){var ze=ie[ve];ie[ve]=ie[Ne],ie[Ne]=ze}c.prototype.swap16=function(){var ve=this.length;if(ve%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var Ne=0;NeNe&&(ve+=" ... "),""},c.prototype.compare=function(ve,Ne,ze,Ve,yt){if(_e(ve,Uint8Array)&&(ve=c.from(ve,ve.offset,ve.byteLength)),!c.isBuffer(ve))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof ve);if(Ne===void 0&&(Ne=0),ze===void 0&&(ze=ve?ve.length:0),Ve===void 0&&(Ve=0),yt===void 0&&(yt=this.length),Ne<0||ze>ve.length||Ve<0||yt>this.length)throw new RangeError("out of range index");if(Ve>=yt&&Ne>=ze)return 0;if(Ve>=yt)return-1;if(Ne>=ze)return 1;if(Ne>>>=0,ze>>>=0,Ve>>>=0,yt>>>=0,this===ve)return 0;for(var ct=yt-Ve,St=ze-Ne,_t=Math.min(ct,St),At=this.slice(Ve,yt),ht=ve.slice(Ne,ze),wt=0;wt<_t;++wt)if(At[wt]!==ht[wt]){ct=At[wt],St=ht[wt];break}return ct2147483647?Ne=2147483647:Ne<-2147483648&&(Ne=-2147483648),Ne=+Ne,oe(Ne)&&(Ne=Ve?0:ie.length-1),Ne<0&&(Ne=ie.length+Ne),Ne>=ie.length){if(Ve)return-1;Ne=ie.length-1}else if(Ne<0)if(Ve)Ne=0;else return-1;if(typeof ve=="string"&&(ve=c.from(ve,ze)),c.isBuffer(ve))return ve.length===0?-1:G(ie,ve,Ne,ze,Ve);if(typeof ve=="number")return ve=ve&255,typeof Uint8Array.prototype.indexOf=="function"?Ve?Uint8Array.prototype.indexOf.call(ie,ve,Ne):Uint8Array.prototype.lastIndexOf.call(ie,ve,Ne):G(ie,[ve],Ne,ze,Ve);throw new TypeError("val must be string, number or Buffer")}function G(ie,ve,Ne,ze,Ve){var yt=1,ct=ie.length,St=ve.length;if(ze!==void 0&&(ze=String(ze).toLowerCase(),ze==="ucs2"||ze==="ucs-2"||ze==="utf16le"||ze==="utf-16le")){if(ie.length<2||ve.length<2)return-1;yt=2,ct/=2,St/=2,Ne/=2}function _t(st,ge){return yt===1?st[ge]:st.readUInt16BE(ge*yt)}var At;if(Ve){var ht=-1;for(At=Ne;Atct&&(Ne=ct-St),At=Ne;At>=0;At--){for(var wt=!0,jt=0;jtVe&&(ze=Ve)):ze=Ve;var yt=ve.length;ze>yt/2&&(ze=yt/2);for(var ct=0;ct>>0,isFinite(ze)?(ze=ze>>>0,Ve===void 0&&(Ve="utf8")):(Ve=ze,ze=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");var yt=this.length-Ne;if((ze===void 0||ze>yt)&&(ze=yt),ve.length>0&&(ze<0||Ne<0)||Ne>this.length)throw new RangeError("Attempt to write outside buffer bounds");Ve||(Ve="utf8");for(var ct=!1;;)switch(Ve){case"hex":return Q(this,ve,Ne,ze);case"utf8":case"utf-8":return ne(this,ve,Ne,ze);case"ascii":return ue(this,ve,Ne,ze);case"latin1":case"binary":return ae(this,ve,Ne,ze);case"base64":return he(this,ve,Ne,ze);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return ce(this,ve,Ne,ze);default:if(ct)throw new TypeError("Unknown encoding: "+Ve);Ve=(""+Ve).toLowerCase(),ct=!0}},c.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function we(ie,ve,Ne){return ve===0&&Ne===ie.length?d.fromByteArray(ie):d.fromByteArray(ie.slice(ve,Ne))}function me(ie,ve,Ne){Ne=Math.min(ie.length,Ne);for(var ze=[],Ve=ve;Ve239?4:yt>223?3:yt>191?2:1;if(Ve+St<=Ne){var _t,At,ht,wt;switch(St){case 1:yt<128&&(ct=yt);break;case 2:_t=ie[Ve+1],(_t&192)===128&&(wt=(yt&31)<<6|_t&63,wt>127&&(ct=wt));break;case 3:_t=ie[Ve+1],At=ie[Ve+2],(_t&192)===128&&(At&192)===128&&(wt=(yt&15)<<12|(_t&63)<<6|At&63,wt>2047&&(wt<55296||wt>57343)&&(ct=wt));break;case 4:_t=ie[Ve+1],At=ie[Ve+2],ht=ie[Ve+3],(_t&192)===128&&(At&192)===128&&(ht&192)===128&&(wt=(yt&15)<<18|(_t&63)<<12|(At&63)<<6|ht&63,wt>65535&&wt<1114112&&(ct=wt))}}ct===null?(ct=65533,St=1):ct>65535&&(ct-=65536,ze.push(ct>>>10&1023|55296),ct=56320|ct&1023),ze.push(ct),Ve+=St}return ee(ze)}var Le=4096;function ee(ie){var ve=ie.length;if(ve<=Le)return String.fromCharCode.apply(String,ie);for(var Ne="",ze=0;zeze)&&(Ne=ze);for(var Ve="",yt=ve;ytze&&(ve=ze),Ne<0?(Ne+=ze,Ne<0&&(Ne=0)):Ne>ze&&(Ne=ze),NeNe)throw new RangeError("Trying to access beyond buffer length")}c.prototype.readUIntLE=function(ve,Ne,ze){ve=ve>>>0,Ne=Ne>>>0,ze||Be(ve,Ne,this.length);for(var Ve=this[ve],yt=1,ct=0;++ct>>0,Ne=Ne>>>0,ze||Be(ve,Ne,this.length);for(var Ve=this[ve+--Ne],yt=1;Ne>0&&(yt*=256);)Ve+=this[ve+--Ne]*yt;return Ve},c.prototype.readUInt8=function(ve,Ne){return ve=ve>>>0,Ne||Be(ve,1,this.length),this[ve]},c.prototype.readUInt16LE=function(ve,Ne){return ve=ve>>>0,Ne||Be(ve,2,this.length),this[ve]|this[ve+1]<<8},c.prototype.readUInt16BE=function(ve,Ne){return ve=ve>>>0,Ne||Be(ve,2,this.length),this[ve]<<8|this[ve+1]},c.prototype.readUInt32LE=function(ve,Ne){return ve=ve>>>0,Ne||Be(ve,4,this.length),(this[ve]|this[ve+1]<<8|this[ve+2]<<16)+this[ve+3]*16777216},c.prototype.readUInt32BE=function(ve,Ne){return ve=ve>>>0,Ne||Be(ve,4,this.length),this[ve]*16777216+(this[ve+1]<<16|this[ve+2]<<8|this[ve+3])},c.prototype.readIntLE=function(ve,Ne,ze){ve=ve>>>0,Ne=Ne>>>0,ze||Be(ve,Ne,this.length);for(var Ve=this[ve],yt=1,ct=0;++ct=yt&&(Ve-=Math.pow(2,8*Ne)),Ve},c.prototype.readIntBE=function(ve,Ne,ze){ve=ve>>>0,Ne=Ne>>>0,ze||Be(ve,Ne,this.length);for(var Ve=Ne,yt=1,ct=this[ve+--Ve];Ve>0&&(yt*=256);)ct+=this[ve+--Ve]*yt;return yt*=128,ct>=yt&&(ct-=Math.pow(2,8*Ne)),ct},c.prototype.readInt8=function(ve,Ne){return ve=ve>>>0,Ne||Be(ve,1,this.length),this[ve]&128?(255-this[ve]+1)*-1:this[ve]},c.prototype.readInt16LE=function(ve,Ne){ve=ve>>>0,Ne||Be(ve,2,this.length);var ze=this[ve]|this[ve+1]<<8;return ze&32768?ze|4294901760:ze},c.prototype.readInt16BE=function(ve,Ne){ve=ve>>>0,Ne||Be(ve,2,this.length);var ze=this[ve+1]|this[ve]<<8;return ze&32768?ze|4294901760:ze},c.prototype.readInt32LE=function(ve,Ne){return ve=ve>>>0,Ne||Be(ve,4,this.length),this[ve]|this[ve+1]<<8|this[ve+2]<<16|this[ve+3]<<24},c.prototype.readInt32BE=function(ve,Ne){return ve=ve>>>0,Ne||Be(ve,4,this.length),this[ve]<<24|this[ve+1]<<16|this[ve+2]<<8|this[ve+3]},c.prototype.readFloatLE=function(ve,Ne){return ve=ve>>>0,Ne||Be(ve,4,this.length),g.read(this,ve,!0,23,4)},c.prototype.readFloatBE=function(ve,Ne){return ve=ve>>>0,Ne||Be(ve,4,this.length),g.read(this,ve,!1,23,4)},c.prototype.readDoubleLE=function(ve,Ne){return ve=ve>>>0,Ne||Be(ve,8,this.length),g.read(this,ve,!0,52,8)},c.prototype.readDoubleBE=function(ve,Ne){return ve=ve>>>0,Ne||Be(ve,8,this.length),g.read(this,ve,!1,52,8)};function He(ie,ve,Ne,ze,Ve,yt){if(!c.isBuffer(ie))throw new TypeError('"buffer" argument must be a Buffer instance');if(ve>Ve||veie.length)throw new RangeError("Index out of range")}c.prototype.writeUIntLE=function(ve,Ne,ze,Ve){if(ve=+ve,Ne=Ne>>>0,ze=ze>>>0,!Ve){var yt=Math.pow(2,8*ze)-1;He(this,ve,Ne,ze,yt,0)}var ct=1,St=0;for(this[Ne]=ve&255;++St>>0,ze=ze>>>0,!Ve){var yt=Math.pow(2,8*ze)-1;He(this,ve,Ne,ze,yt,0)}var ct=ze-1,St=1;for(this[Ne+ct]=ve&255;--ct>=0&&(St*=256);)this[Ne+ct]=ve/St&255;return Ne+ze},c.prototype.writeUInt8=function(ve,Ne,ze){return ve=+ve,Ne=Ne>>>0,ze||He(this,ve,Ne,1,255,0),this[Ne]=ve&255,Ne+1},c.prototype.writeUInt16LE=function(ve,Ne,ze){return ve=+ve,Ne=Ne>>>0,ze||He(this,ve,Ne,2,65535,0),this[Ne]=ve&255,this[Ne+1]=ve>>>8,Ne+2},c.prototype.writeUInt16BE=function(ve,Ne,ze){return ve=+ve,Ne=Ne>>>0,ze||He(this,ve,Ne,2,65535,0),this[Ne]=ve>>>8,this[Ne+1]=ve&255,Ne+2},c.prototype.writeUInt32LE=function(ve,Ne,ze){return ve=+ve,Ne=Ne>>>0,ze||He(this,ve,Ne,4,4294967295,0),this[Ne+3]=ve>>>24,this[Ne+2]=ve>>>16,this[Ne+1]=ve>>>8,this[Ne]=ve&255,Ne+4},c.prototype.writeUInt32BE=function(ve,Ne,ze){return ve=+ve,Ne=Ne>>>0,ze||He(this,ve,Ne,4,4294967295,0),this[Ne]=ve>>>24,this[Ne+1]=ve>>>16,this[Ne+2]=ve>>>8,this[Ne+3]=ve&255,Ne+4},c.prototype.writeIntLE=function(ve,Ne,ze,Ve){if(ve=+ve,Ne=Ne>>>0,!Ve){var yt=Math.pow(2,8*ze-1);He(this,ve,Ne,ze,yt-1,-yt)}var ct=0,St=1,_t=0;for(this[Ne]=ve&255;++ct>0)-_t&255;return Ne+ze},c.prototype.writeIntBE=function(ve,Ne,ze,Ve){if(ve=+ve,Ne=Ne>>>0,!Ve){var yt=Math.pow(2,8*ze-1);He(this,ve,Ne,ze,yt-1,-yt)}var ct=ze-1,St=1,_t=0;for(this[Ne+ct]=ve&255;--ct>=0&&(St*=256);)ve<0&&_t===0&&this[Ne+ct+1]!==0&&(_t=1),this[Ne+ct]=(ve/St>>0)-_t&255;return Ne+ze},c.prototype.writeInt8=function(ve,Ne,ze){return ve=+ve,Ne=Ne>>>0,ze||He(this,ve,Ne,1,127,-128),ve<0&&(ve=255+ve+1),this[Ne]=ve&255,Ne+1},c.prototype.writeInt16LE=function(ve,Ne,ze){return ve=+ve,Ne=Ne>>>0,ze||He(this,ve,Ne,2,32767,-32768),this[Ne]=ve&255,this[Ne+1]=ve>>>8,Ne+2},c.prototype.writeInt16BE=function(ve,Ne,ze){return ve=+ve,Ne=Ne>>>0,ze||He(this,ve,Ne,2,32767,-32768),this[Ne]=ve>>>8,this[Ne+1]=ve&255,Ne+2},c.prototype.writeInt32LE=function(ve,Ne,ze){return ve=+ve,Ne=Ne>>>0,ze||He(this,ve,Ne,4,2147483647,-2147483648),this[Ne]=ve&255,this[Ne+1]=ve>>>8,this[Ne+2]=ve>>>16,this[Ne+3]=ve>>>24,Ne+4},c.prototype.writeInt32BE=function(ve,Ne,ze){return ve=+ve,Ne=Ne>>>0,ze||He(this,ve,Ne,4,2147483647,-2147483648),ve<0&&(ve=4294967295+ve+1),this[Ne]=ve>>>24,this[Ne+1]=ve>>>16,this[Ne+2]=ve>>>8,this[Ne+3]=ve&255,Ne+4};function Fe(ie,ve,Ne,ze,Ve,yt){if(Ne+ze>ie.length)throw new RangeError("Index out of range");if(Ne<0)throw new RangeError("Index out of range")}function Je(ie,ve,Ne,ze,Ve){return ve=+ve,Ne=Ne>>>0,Ve||Fe(ie,ve,Ne,4,34028234663852886e22,-34028234663852886e22),g.write(ie,ve,Ne,ze,23,4),Ne+4}c.prototype.writeFloatLE=function(ve,Ne,ze){return Je(this,ve,Ne,!0,ze)},c.prototype.writeFloatBE=function(ve,Ne,ze){return Je(this,ve,Ne,!1,ze)};function Me(ie,ve,Ne,ze,Ve){return ve=+ve,Ne=Ne>>>0,Ve||Fe(ie,ve,Ne,8,17976931348623157e292,-17976931348623157e292),g.write(ie,ve,Ne,ze,52,8),Ne+8}c.prototype.writeDoubleLE=function(ve,Ne,ze){return Me(this,ve,Ne,!0,ze)},c.prototype.writeDoubleBE=function(ve,Ne,ze){return Me(this,ve,Ne,!1,ze)},c.prototype.copy=function(ve,Ne,ze,Ve){if(!c.isBuffer(ve))throw new TypeError("argument should be a Buffer");if(ze||(ze=0),!Ve&&Ve!==0&&(Ve=this.length),Ne>=ve.length&&(Ne=ve.length),Ne||(Ne=0),Ve>0&&Ve=this.length)throw new RangeError("Index out of range");if(Ve<0)throw new RangeError("sourceEnd out of bounds");Ve>this.length&&(Ve=this.length),ve.length-Ne=0;--ct)ve[ct+Ne]=this[ct+ze];else Uint8Array.prototype.set.call(ve,this.subarray(ze,Ve),Ne);return yt},c.prototype.fill=function(ve,Ne,ze,Ve){if(typeof ve=="string"){if(typeof Ne=="string"?(Ve=Ne,Ne=0,ze=this.length):typeof ze=="string"&&(Ve=ze,ze=this.length),Ve!==void 0&&typeof Ve!="string")throw new TypeError("encoding must be a string");if(typeof Ve=="string"&&!c.isEncoding(Ve))throw new TypeError("Unknown encoding: "+Ve);if(ve.length===1){var yt=ve.charCodeAt(0);(Ve==="utf8"&&yt<128||Ve==="latin1")&&(ve=yt)}}else typeof ve=="number"&&(ve=ve&255);if(Ne<0||this.length>>0,ze=ze===void 0?this.length:ze>>>0,ve||(ve=0);var ct;if(typeof ve=="number")for(ct=Ne;ct55295&&Ne<57344){if(!Ve){if(Ne>56319){(ve-=3)>-1&&yt.push(239,191,189);continue}else if(ct+1===ze){(ve-=3)>-1&&yt.push(239,191,189);continue}Ve=Ne;continue}if(Ne<56320){(ve-=3)>-1&&yt.push(239,191,189),Ve=Ne;continue}Ne=(Ve-55296<<10|Ne-56320)+65536}else Ve&&(ve-=3)>-1&&yt.push(239,191,189);if(Ve=null,Ne<128){if((ve-=1)<0)break;yt.push(Ne)}else if(Ne<2048){if((ve-=2)<0)break;yt.push(Ne>>6|192,Ne&63|128)}else if(Ne<65536){if((ve-=3)<0)break;yt.push(Ne>>12|224,Ne>>6&63|128,Ne&63|128)}else if(Ne<1114112){if((ve-=4)<0)break;yt.push(Ne>>18|240,Ne>>12&63|128,Ne>>6&63|128,Ne&63|128)}else throw new Error("Invalid code point")}return yt}function fe(ie){for(var ve=[],Ne=0;Ne>8,Ve=Ne%256,yt.push(Ve),yt.push(ze);return yt}function J(ie){return d.toByteArray(Re(ie))}function be(ie,ve,Ne,ze){for(var Ve=0;Ve=ve.length||Ve>=ie.length);++Ve)ve[Ve+Ne]=ie[Ve];return Ve}function _e(ie,ve){return ie instanceof ve||ie!=null&&ie.constructor!=null&&ie.constructor.name!=null&&ie.constructor.name===ve.name}function oe(ie){return ie!==ie}}).call(this)}).call(this,s("buffer").Buffer)},{"base64-js":87,buffer:90,ieee754:357}],91:[function(s,E,I){E.exports={100:"Continue",101:"Switching Protocols",102:"Processing",200:"OK",201:"Created",202:"Accepted",203:"Non-Authoritative Information",204:"No Content",205:"Reset Content",206:"Partial Content",207:"Multi-Status",208:"Already Reported",226:"IM Used",300:"Multiple Choices",301:"Moved Permanently",302:"Found",303:"See Other",304:"Not Modified",305:"Use Proxy",307:"Temporary Redirect",308:"Permanent Redirect",400:"Bad Request",401:"Unauthorized",402:"Payment Required",403:"Forbidden",404:"Not Found",405:"Method Not Allowed",406:"Not Acceptable",407:"Proxy Authentication Required",408:"Request Timeout",409:"Conflict",410:"Gone",411:"Length Required",412:"Precondition Failed",413:"Payload Too Large",414:"URI Too Long",415:"Unsupported Media Type",416:"Range Not Satisfiable",417:"Expectation Failed",418:"I'm a teapot",421:"Misdirected Request",422:"Unprocessable Entity",423:"Locked",424:"Failed Dependency",425:"Unordered Collection",426:"Upgrade Required",428:"Precondition Required",429:"Too Many Requests",431:"Request Header Fields Too Large",451:"Unavailable For Legal Reasons",500:"Internal Server Error",501:"Not Implemented",502:"Bad Gateway",503:"Service Unavailable",504:"Gateway Timeout",505:"HTTP Version Not Supported",506:"Variant Also Negotiates",507:"Insufficient Storage",508:"Loop Detected",509:"Bandwidth Limit Exceeded",510:"Not Extended",511:"Network Authentication Required"}},{}],92:[function(s,E,I){"use strict";var u=s("get-intrinsic"),d=s("./"),g=d(u("String.prototype.indexOf"));E.exports=function(S,v){var c=u(S,!!v);return typeof c=="function"&&g(S,".prototype.")>-1?d(c):c}},{"./":93,"get-intrinsic":348}],93:[function(s,E,I){"use strict";var u=s("function-bind"),d=s("get-intrinsic"),g=d("%Function.prototype.apply%"),y=d("%Function.prototype.call%"),S=d("%Reflect.apply%",!0)||u.call(y,g),v=d("%Object.getOwnPropertyDescriptor%",!0),c=d("%Object.defineProperty%",!0),h=d("%Math.max%");if(c)try{c({},"a",{value:1})}catch(x){c=null}E.exports=function(T){var _=S(u,y,arguments);if(v&&c){var R=v(_,"length");R.configurable&&c(_,"length",{value:1+h(0,T.length-(arguments.length-1))})}return _};var m=function(){return S(u,g,arguments)};c?c(E.exports,"apply",{value:m}):E.exports.apply=m},{"function-bind":347,"get-intrinsic":348}],94:[function(s,E,I){"use strict";var u=Array.prototype.slice;E.exports=d;function d(y,S){if(!(this instanceof d))return new d(y,S);this.src=y,this._withAccess=S}d.prototype.withAccess=function(y){return this._withAccess=y!==!1,this},d.prototype.pick=function(y){return Array.isArray(y)||(y=u.call(arguments)),y.length&&(this.keys=y),this},d.prototype.to=function(y){if(y=y||{},!this.src)return y;var S=this.keys||Object.keys(this.src);if(!this._withAccess){for(var v=0;v>8&255]},pe=function(ct){return[ct&255,ct>>8&255,ct>>16&255,ct>>24&255]},fe=function(ct){return ct[3]<<24|ct[2]<<16|ct[1]<<8|ct[0]},z=function(ct){return Me(ct,23,4)},J=function(ct){return Me(ct,52,8)},be=function(ct,St){M(ct[ce],St,{get:function(){return ne(this)[St]}})},_e=function(ct,St,_t,At){var ht=_(_t),wt=ne(ct);if(ht+St>wt.byteLength)throw He(me);var jt=ne(wt.buffer).bytes,st=ht+wt.byteOffset,ge=H(jt,st,st+St);return At?ge:Je(ge)},oe=function(ct,St,_t,At,ht,wt){var jt=_(_t),st=ne(ct);if(jt+St>st.byteLength)throw He(me);for(var ge=ne(st.buffer).bytes,on=jt+st.byteOffset,mn=At(+ht),Mt=0;Mtht)throw He("Wrong offset");if(At=At===void 0?ht-wt:T(At),wt+At>ht)throw He(we);ue(this,{buffer:St,byteLength:At,byteOffset:wt}),g||(this.buffer=St,this.byteLength=At,this.byteOffset=wt)},ke=le[ce],g&&(be(ee,"byteLength"),be(le,"buffer"),be(le,"byteLength"),be(le,"byteOffset")),c(ke,{getInt8:function(St){return _e(this,1,St)[0]<<24>>24},getUint8:function(St){return _e(this,1,St)[0]},getInt16:function(St){var _t=_e(this,2,St,arguments.length>1?arguments[1]:void 0);return(_t[1]<<8|_t[0])<<16>>16},getUint16:function(St){var _t=_e(this,2,St,arguments.length>1?arguments[1]:void 0);return _t[1]<<8|_t[0]},getInt32:function(St){return fe(_e(this,4,St,arguments.length>1?arguments[1]:void 0))},getUint32:function(St){return fe(_e(this,4,St,arguments.length>1?arguments[1]:void 0))>>>0},getFloat32:function(St){return lt(_e(this,4,St,arguments.length>1?arguments[1]:void 0),23)},getFloat64:function(St){return lt(_e(this,8,St,arguments.length>1?arguments[1]:void 0),52)},setInt8:function(St,_t){oe(this,1,St,Re,_t)},setUint8:function(St,_t){oe(this,1,St,Re,_t)},setInt16:function(St,_t){oe(this,2,St,Oe,_t,arguments.length>2?arguments[2]:void 0)},setUint16:function(St,_t){oe(this,2,St,Oe,_t,arguments.length>2?arguments[2]:void 0)},setInt32:function(St,_t){oe(this,4,St,pe,_t,arguments.length>2?arguments[2]:void 0)},setUint32:function(St,_t){oe(this,4,St,pe,_t,arguments.length>2?arguments[2]:void 0)},setFloat32:function(St,_t){oe(this,4,St,z,_t,arguments.length>2?arguments[2]:void 0)},setFloat64:function(St,_t){oe(this,8,St,J,_t,arguments.length>2?arguments[2]:void 0)}});else{var ie=G&&Le.name!==ae;if(!h(function(){Le(1)})||!h(function(){new Le(-1)})||h(function(){return new Le,new Le(1.5),new Le(NaN),ie&&!Q})){ee=function(St){return m(this,se),new Le(_(St))},ee[ce]=se;for(var ve=L(Le),Ne=0,ze;ve.length>Ne;)(ze=ve[Ne++])in ee||v(ee,ze,Le[ze]);se.constructor=ee}else ie&&Q&&v(Le,"name",ae);N&&A(ke)!==De&&N(ke,De);var Ve=new le(new ee(2)),yt=d(ke.setInt8);Ve.setInt8(0,2147483648),Ve.setInt8(1,2147483649),(Ve.getInt8(0)||!Ve.getInt8(1))&&c(ke,{setInt8:function(St,_t){yt(this,St,_t<<24>>24)},setUint8:function(St,_t){yt(this,St,_t<<24>>24)}},{unsafe:!0})}P(ee,ae),P(le,he),E.exports={ArrayBuffer:ee,DataView:le}},{"../internals/an-instance":100,"../internals/array-buffer-native":102,"../internals/array-fill":106,"../internals/array-slice-simple":116,"../internals/create-non-enumerable-property":129,"../internals/descriptors":134,"../internals/fails":150,"../internals/function-name":156,"../internals/function-uncurry-this":157,"../internals/global":163,"../internals/ieee754":169,"../internals/internal-state":173,"../internals/object-define-property":198,"../internals/object-get-own-property-names":201,"../internals/object-get-prototype-of":203,"../internals/object-set-prototype-of":208,"../internals/redefine-all":221,"../internals/set-to-string-tag":234,"../internals/to-index":246,"../internals/to-integer-or-infinity":248,"../internals/to-length":249}],105:[function(s,E,I){"use strict";var u=s("../internals/to-object"),d=s("../internals/to-absolute-index"),g=s("../internals/length-of-array-like"),y=Math.min;E.exports=[].copyWithin||function(v,c){var h=u(this),m=g(h),x=d(v,m),T=d(c,m),_=arguments.length>2?arguments[2]:void 0,R=y((_===void 0?m:d(_,m))-T,m-x),A=1;for(T0;)T in h?h[x]=h[T]:delete h[x],x+=A,T+=A;return h}},{"../internals/length-of-array-like":188,"../internals/to-absolute-index":245,"../internals/to-object":250}],106:[function(s,E,I){"use strict";var u=s("../internals/to-object"),d=s("../internals/to-absolute-index"),g=s("../internals/length-of-array-like");E.exports=function(S){for(var v=u(this),c=g(v),h=arguments.length,m=d(h>1?arguments[1]:void 0,c),x=h>2?arguments[2]:void 0,T=x===void 0?c:d(x,c);T>m;)v[m++]=S;return v}},{"../internals/length-of-array-like":188,"../internals/to-absolute-index":245,"../internals/to-object":250}],107:[function(s,E,I){"use strict";var u=s("../internals/array-iteration").forEach,d=s("../internals/array-method-is-strict"),g=d("forEach");E.exports=g?[].forEach:function(S){return u(this,S,arguments.length>1?arguments[1]:void 0)}},{"../internals/array-iteration":111,"../internals/array-method-is-strict":114}],108:[function(s,E,I){var u=s("../internals/length-of-array-like");E.exports=function(d,g){for(var y=0,S=u(g),v=new d(S);S>y;)v[y]=g[y++];return v}},{"../internals/length-of-array-like":188}],109:[function(s,E,I){"use strict";var u=s("../internals/global"),d=s("../internals/function-bind-context"),g=s("../internals/function-call"),y=s("../internals/to-object"),S=s("../internals/call-with-safe-iteration-closing"),v=s("../internals/is-array-iterator-method"),c=s("../internals/is-constructor"),h=s("../internals/length-of-array-like"),m=s("../internals/create-property"),x=s("../internals/get-iterator"),T=s("../internals/get-iterator-method"),_=u.Array;E.exports=function(A){var N=y(A),L=c(this),M=arguments.length,F=M>1?arguments[1]:void 0,H=F!==void 0;H&&(F=d(F,M>2?arguments[2]:void 0));var P=T(N),V=0,G,Q,ne,ue,ae,he;if(P&&!(this==_&&v(P)))for(ue=x(N,P),ae=ue.next,Q=L?new this:[];!(ne=g(ae,ue)).done;V++)he=H?S(ue,F,[ne.value,V],!0):ne.value,m(Q,V,he);else for(G=h(N),Q=L?new this(G):_(G);G>V;V++)he=H?F(N[V],V):N[V],m(Q,V,he);return Q.length=V,Q}},{"../internals/call-with-safe-iteration-closing":121,"../internals/create-property":131,"../internals/function-bind-context":153,"../internals/function-call":155,"../internals/get-iterator":160,"../internals/get-iterator-method":159,"../internals/global":163,"../internals/is-array-iterator-method":174,"../internals/is-constructor":177,"../internals/length-of-array-like":188,"../internals/to-object":250}],110:[function(s,E,I){var u=s("../internals/to-indexed-object"),d=s("../internals/to-absolute-index"),g=s("../internals/length-of-array-like"),y=function(S){return function(v,c,h){var m=u(v),x=g(m),T=d(h,x),_;if(S&&c!=c){for(;x>T;)if(_=m[T++],_!=_)return!0}else for(;x>T;T++)if((S||T in m)&&m[T]===c)return S||T||0;return!S&&-1}};E.exports={includes:y(!0),indexOf:y(!1)}},{"../internals/length-of-array-like":188,"../internals/to-absolute-index":245,"../internals/to-indexed-object":247}],111:[function(s,E,I){var u=s("../internals/function-bind-context"),d=s("../internals/function-uncurry-this"),g=s("../internals/indexed-object"),y=s("../internals/to-object"),S=s("../internals/length-of-array-like"),v=s("../internals/array-species-create"),c=d([].push),h=function(m){var x=m==1,T=m==2,_=m==3,R=m==4,A=m==6,N=m==7,L=m==5||A;return function(M,F,H,P){for(var V=y(M),G=g(V),Q=u(F,H),ne=S(G),ue=0,ae=P||v,he=x?ae(M,ne):T||N?ae(M,0):void 0,ce,we;ne>ue;ue++)if((L||ue in G)&&(ce=G[ue],we=Q(ce,ue,V),m))if(x)he[ue]=we;else if(we)switch(m){case 3:return!0;case 5:return ce;case 6:return ue;case 2:c(he,ce)}else switch(m){case 4:return!1;case 7:c(he,ce)}return A?-1:_||R?R:he}};E.exports={forEach:h(0),map:h(1),filter:h(2),some:h(3),every:h(4),find:h(5),findIndex:h(6),filterReject:h(7)}},{"../internals/array-species-create":120,"../internals/function-bind-context":153,"../internals/function-uncurry-this":157,"../internals/indexed-object":170,"../internals/length-of-array-like":188,"../internals/to-object":250}],112:[function(s,E,I){"use strict";var u=s("../internals/function-apply"),d=s("../internals/to-indexed-object"),g=s("../internals/to-integer-or-infinity"),y=s("../internals/length-of-array-like"),S=s("../internals/array-method-is-strict"),v=Math.min,c=[].lastIndexOf,h=!!c&&1/[1].lastIndexOf(1,-0)<0,m=S("lastIndexOf"),x=h||!m;E.exports=x?function(_){if(h)return u(c,this,arguments)||0;var R=d(this),A=y(R),N=A-1;for(arguments.length>1&&(N=v(N,g(arguments[1]))),N<0&&(N=A+N);N>=0;N--)if(N in R&&R[N]===_)return N||0;return-1}:c},{"../internals/array-method-is-strict":114,"../internals/function-apply":152,"../internals/length-of-array-like":188,"../internals/to-indexed-object":247,"../internals/to-integer-or-infinity":248}],113:[function(s,E,I){var u=s("../internals/fails"),d=s("../internals/well-known-symbol"),g=s("../internals/engine-v8-version"),y=d("species");E.exports=function(S){return g>=51||!u(function(){var v=[],c=v.constructor={};return c[y]=function(){return{foo:1}},v[S](Boolean).foo!==1})}},{"../internals/engine-v8-version":146,"../internals/fails":150,"../internals/well-known-symbol":268}],114:[function(s,E,I){"use strict";var u=s("../internals/fails");E.exports=function(d,g){var y=[][d];return!!y&&u(function(){y.call(null,g||function(){return 1},1)})}},{"../internals/fails":150}],115:[function(s,E,I){var u=s("../internals/global"),d=s("../internals/a-callable"),g=s("../internals/to-object"),y=s("../internals/indexed-object"),S=s("../internals/length-of-array-like"),v=u.TypeError,c=function(h){return function(m,x,T,_){d(x);var R=g(m),A=y(R),N=S(R),L=h?N-1:0,M=h?-1:1;if(T<2)for(;;){if(L in A){_=A[L],L+=M;break}if(L+=M,h?L<0:N<=L)throw v("Reduce of empty array with no initial value")}for(;h?L>=0:N>L;L+=M)L in A&&(_=x(_,A[L],L,R));return _}};E.exports={left:c(!1),right:c(!0)}},{"../internals/a-callable":95,"../internals/global":163,"../internals/indexed-object":170,"../internals/length-of-array-like":188,"../internals/to-object":250}],116:[function(s,E,I){var u=s("../internals/global"),d=s("../internals/to-absolute-index"),g=s("../internals/length-of-array-like"),y=s("../internals/create-property"),S=u.Array,v=Math.max;E.exports=function(c,h,m){for(var x=g(c),T=d(h,x),_=d(m===void 0?x:m,x),R=S(v(_-T,0)),A=0;T<_;T++,A++)y(R,A,c[T]);return R.length=A,R}},{"../internals/create-property":131,"../internals/global":163,"../internals/length-of-array-like":188,"../internals/to-absolute-index":245}],117:[function(s,E,I){var u=s("../internals/function-uncurry-this");E.exports=u([].slice)},{"../internals/function-uncurry-this":157}],118:[function(s,E,I){var u=s("../internals/array-slice-simple"),d=Math.floor,g=function(v,c){var h=v.length,m=d(h/2);return h<8?y(v,c):S(v,g(u(v,0,m),c),g(u(v,m),c),c)},y=function(v,c){for(var h=v.length,m=1,x,T;m0;)v[T]=v[--T];T!==m++&&(v[T]=x)}return v},S=function(v,c,h,m){for(var x=c.length,T=h.length,_=0,R=0;_0&&c[0]<4?1:+(c[0]+c[1])),!h&&d&&(c=d.match(/Edge\/(\d+)/),(!c||c[1]>=74)&&(c=d.match(/Chrome\/(\d+)/),c&&(h=+c[1]))),E.exports=h},{"../internals/engine-user-agent":145,"../internals/global":163}],147:[function(s,E,I){var u=s("../internals/engine-user-agent"),d=u.match(/AppleWebKit\/(\d+)\./);E.exports=!!d&&+d[1]},{"../internals/engine-user-agent":145}],148:[function(s,E,I){E.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]},{}],149:[function(s,E,I){var u=s("../internals/global"),d=s("../internals/object-get-own-property-descriptor").f,g=s("../internals/create-non-enumerable-property"),y=s("../internals/redefine"),S=s("../internals/set-global"),v=s("../internals/copy-constructor-properties"),c=s("../internals/is-forced");E.exports=function(h,m){var x=h.target,T=h.global,_=h.stat,R,A,N,L,M,F;if(T?A=u:_?A=u[x]||S(x,{}):A=(u[x]||{}).prototype,A)for(N in m){if(M=m[N],h.noTargetGet?(F=d(A,N),L=F&&F.value):L=A[N],R=c(T?N:x+(_?".":"#")+N,h.forced),!R&&L!==void 0){if(typeof M==typeof L)continue;v(M,L)}(h.sham||L&&L.sham)&&g(M,"sham",!0),y(A,N,M,h)}}},{"../internals/copy-constructor-properties":125,"../internals/create-non-enumerable-property":129,"../internals/global":163,"../internals/is-forced":178,"../internals/object-get-own-property-descriptor":199,"../internals/redefine":222,"../internals/set-global":232}],150:[function(s,E,I){E.exports=function(u){try{return!!u()}catch(d){return!0}}},{}],151:[function(s,E,I){"use strict";s("../modules/es.regexp.exec");var u=s("../internals/function-uncurry-this"),d=s("../internals/redefine"),g=s("../internals/regexp-exec"),y=s("../internals/fails"),S=s("../internals/well-known-symbol"),v=s("../internals/create-non-enumerable-property"),c=S("species"),h=RegExp.prototype;E.exports=function(m,x,T,_){var R=S(m),A=!y(function(){var F={};return F[R]=function(){return 7},""[m](F)!=7}),N=A&&!y(function(){var F=!1,H=/a/;return m==="split"&&(H={},H.constructor={},H.constructor[c]=function(){return H},H.flags="",H[R]=/./[R]),H.exec=function(){return F=!0,null},H[R](""),!F});if(!A||!N||T){var L=u(/./[R]),M=x(R,""[m],function(F,H,P,V,G){var Q=u(F),ne=H.exec;return ne===g||ne===h.exec?A&&!G?{done:!0,value:L(H,P,V)}:{done:!0,value:Q(P,H,V)}:{done:!1}});d(String.prototype,m,M[0]),d(h,R,M[1])}_&&v(h[R],"sham",!0)}},{"../internals/create-non-enumerable-property":129,"../internals/fails":150,"../internals/function-uncurry-this":157,"../internals/redefine":222,"../internals/regexp-exec":224,"../internals/well-known-symbol":268,"../modules/es.regexp.exec":300}],152:[function(s,E,I){var u=s("../internals/function-bind-native"),d=Function.prototype,g=d.apply,y=d.call;E.exports=typeof Reflect=="object"&&Reflect.apply||(u?y.bind(g):function(){return y.apply(g,arguments)})},{"../internals/function-bind-native":154}],153:[function(s,E,I){var u=s("../internals/function-uncurry-this"),d=s("../internals/a-callable"),g=s("../internals/function-bind-native"),y=u(u.bind);E.exports=function(S,v){return d(S),v===void 0?S:g?y(S,v):function(){return S.apply(v,arguments)}}},{"../internals/a-callable":95,"../internals/function-bind-native":154,"../internals/function-uncurry-this":157}],154:[function(s,E,I){var u=s("../internals/fails");E.exports=!u(function(){var d=function(){}.bind();return typeof d!="function"||d.hasOwnProperty("prototype")})},{"../internals/fails":150}],155:[function(s,E,I){var u=s("../internals/function-bind-native"),d=Function.prototype.call;E.exports=u?d.bind(d):function(){return d.apply(d,arguments)}},{"../internals/function-bind-native":154}],156:[function(s,E,I){var u=s("../internals/descriptors"),d=s("../internals/has-own-property"),g=Function.prototype,y=u&&Object.getOwnPropertyDescriptor,S=d(g,"name"),v=S&&function(){}.name==="something",c=S&&(!u||u&&y(g,"name").configurable);E.exports={EXISTS:S,PROPER:v,CONFIGURABLE:c}},{"../internals/descriptors":134,"../internals/has-own-property":164}],157:[function(s,E,I){var u=s("../internals/function-bind-native"),d=Function.prototype,g=d.bind,y=d.call,S=u&&g.bind(y,y);E.exports=u?function(v){return v&&S(v)}:function(v){return v&&function(){return y.apply(v,arguments)}}},{"../internals/function-bind-native":154}],158:[function(s,E,I){var u=s("../internals/global"),d=s("../internals/is-callable"),g=function(y){return d(y)?y:void 0};E.exports=function(y,S){return arguments.length<2?g(u[y]):u[y]&&u[y][S]}},{"../internals/global":163,"../internals/is-callable":176}],159:[function(s,E,I){var u=s("../internals/classof"),d=s("../internals/get-method"),g=s("../internals/iterators"),y=s("../internals/well-known-symbol"),S=y("iterator");E.exports=function(v){if(v!=null)return d(v,S)||d(v,"@@iterator")||g[u(v)]}},{"../internals/classof":124,"../internals/get-method":161,"../internals/iterators":187,"../internals/well-known-symbol":268}],160:[function(s,E,I){var u=s("../internals/global"),d=s("../internals/function-call"),g=s("../internals/a-callable"),y=s("../internals/an-object"),S=s("../internals/try-to-string"),v=s("../internals/get-iterator-method"),c=u.TypeError;E.exports=function(h,m){var x=arguments.length<2?v(h):m;if(g(x))return y(d(x,h));throw c(S(h)+" is not iterable")}},{"../internals/a-callable":95,"../internals/an-object":101,"../internals/function-call":155,"../internals/get-iterator-method":159,"../internals/global":163,"../internals/try-to-string":257}],161:[function(s,E,I){var u=s("../internals/a-callable");E.exports=function(d,g){var y=d[g];return y==null?void 0:u(y)}},{"../internals/a-callable":95}],162:[function(s,E,I){var u=s("../internals/function-uncurry-this"),d=s("../internals/to-object"),g=Math.floor,y=u("".charAt),S=u("".replace),v=u("".slice),c=/\$([$&'`]|\d{1,2}|<[^>]*>)/g,h=/\$([$&'`]|\d{1,2})/g;E.exports=function(m,x,T,_,R,A){var N=T+m.length,L=_.length,M=h;return R!==void 0&&(R=d(R),M=c),S(A,M,function(F,H){var P;switch(y(H,0)){case"$":return"$";case"&":return m;case"`":return v(x,0,T);case"'":return v(x,N);case"<":P=R[v(H,1,-1)];break;default:var V=+H;if(V===0)return F;if(V>L){var G=g(V/10);return G===0?F:G<=L?_[G-1]===void 0?y(H,1):_[G-1]+y(H,1):F}P=_[V-1]}return P===void 0?"":P})}},{"../internals/function-uncurry-this":157,"../internals/to-object":250}],163:[function(s,E,I){(function(u){(function(){var d=function(g){return g&&g.Math==Math&&g};E.exports=d(typeof globalThis=="object"&&globalThis)||d(typeof window=="object"&&window)||d(typeof self=="object"&&self)||d(typeof u=="object"&&u)||function(){return this}()||Function("return this")()}).call(this)}).call(this,typeof Z!="undefined"?Z:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{}],164:[function(s,E,I){var u=s("../internals/function-uncurry-this"),d=s("../internals/to-object"),g=u({}.hasOwnProperty);E.exports=Object.hasOwn||function(S,v){return g(d(S),v)}},{"../internals/function-uncurry-this":157,"../internals/to-object":250}],165:[function(s,E,I){E.exports={}},{}],166:[function(s,E,I){var u=s("../internals/global");E.exports=function(d,g){var y=u.console;y&&y.error&&(arguments.length==1?y.error(d):y.error(d,g))}},{"../internals/global":163}],167:[function(s,E,I){var u=s("../internals/get-built-in");E.exports=u("document","documentElement")},{"../internals/get-built-in":158}],168:[function(s,E,I){var u=s("../internals/descriptors"),d=s("../internals/fails"),g=s("../internals/document-create-element");E.exports=!u&&!d(function(){return Object.defineProperty(g("div"),"a",{get:function(){return 7}}).a!=7})},{"../internals/descriptors":134,"../internals/document-create-element":135,"../internals/fails":150}],169:[function(s,E,I){var u=s("../internals/global"),d=u.Array,g=Math.abs,y=Math.pow,S=Math.floor,v=Math.log,c=Math.LN2,h=function(x,T,_){var R=d(_),A=_*8-T-1,N=(1<>1,M=T===23?y(2,-24)-y(2,-77):0,F=x<0||x===0&&1/x<0?1:0,H=0,P,V,G;for(x=g(x),x!=x||x===1/0?(V=x!=x?1:0,P=N):(P=S(v(x)/c),G=y(2,-P),x*G<1&&(P--,G*=2),P+L>=1?x+=M/G:x+=M*y(2,1-L),x*G>=2&&(P++,G/=2),P+L>=N?(V=0,P=N):P+L>=1?(V=(x*G-1)*y(2,T),P=P+L):(V=x*y(2,L-1)*y(2,T),P=0));T>=8;)R[H++]=V&255,V/=256,T-=8;for(P=P<0;)R[H++]=P&255,P/=256,A-=8;return R[--H]|=F*128,R},m=function(x,T){var _=x.length,R=_*8-T-1,A=(1<>1,L=R-7,M=_-1,F=x[M--],H=F&127,P;for(F>>=7;L>0;)H=H*256+x[M--],L-=8;for(P=H&(1<<-L)-1,H>>=-L,L+=T;L>0;)P=P*256+x[M--],L-=8;if(H===0)H=1-N;else{if(H===A)return P?NaN:F?-1/0:1/0;P=P+y(2,T),H=H-N}return(F?-1:1)*P*y(2,H-T)};E.exports={pack:h,unpack:m}},{"../internals/global":163}],170:[function(s,E,I){var u=s("../internals/global"),d=s("../internals/function-uncurry-this"),g=s("../internals/fails"),y=s("../internals/classof-raw"),S=u.Object,v=d("".split);E.exports=g(function(){return!S("z").propertyIsEnumerable(0)})?function(c){return y(c)=="String"?v(c,""):S(c)}:S},{"../internals/classof-raw":123,"../internals/fails":150,"../internals/function-uncurry-this":157,"../internals/global":163}],171:[function(s,E,I){var u=s("../internals/is-callable"),d=s("../internals/is-object"),g=s("../internals/object-set-prototype-of");E.exports=function(y,S,v){var c,h;return g&&u(c=S.constructor)&&c!==v&&d(h=c.prototype)&&h!==v.prototype&&g(y,h),y}},{"../internals/is-callable":176,"../internals/is-object":180,"../internals/object-set-prototype-of":208}],172:[function(s,E,I){var u=s("../internals/function-uncurry-this"),d=s("../internals/is-callable"),g=s("../internals/shared-store"),y=u(Function.toString);d(g.inspectSource)||(g.inspectSource=function(S){return y(S)}),E.exports=g.inspectSource},{"../internals/function-uncurry-this":157,"../internals/is-callable":176,"../internals/shared-store":236}],173:[function(s,E,I){var u=s("../internals/native-weak-map"),d=s("../internals/global"),g=s("../internals/function-uncurry-this"),y=s("../internals/is-object"),S=s("../internals/create-non-enumerable-property"),v=s("../internals/has-own-property"),c=s("../internals/shared-store"),h=s("../internals/shared-key"),m=s("../internals/hidden-keys"),x="Object already initialized",T=d.TypeError,_=d.WeakMap,R,A,N,L=function(Q){return N(Q)?A(Q):R(Q,{})},M=function(Q){return function(ne){var ue;if(!y(ne)||(ue=A(ne)).type!==Q)throw T("Incompatible receiver, "+Q+" required");return ue}};if(u||c.state){var F=c.state||(c.state=new _),H=g(F.get),P=g(F.has),V=g(F.set);R=function(Q,ne){if(P(F,Q))throw new T(x);return ne.facade=Q,V(F,Q,ne),ne},A=function(Q){return H(F,Q)||{}},N=function(Q){return P(F,Q)}}else{var G=h("state");m[G]=!0,R=function(Q,ne){if(v(Q,G))throw new T(x);return ne.facade=Q,S(Q,G,ne),ne},A=function(Q){return v(Q,G)?Q[G]:{}},N=function(Q){return v(Q,G)}}E.exports={set:R,get:A,has:N,enforce:L,getterFor:M}},{"../internals/create-non-enumerable-property":129,"../internals/function-uncurry-this":157,"../internals/global":163,"../internals/has-own-property":164,"../internals/hidden-keys":165,"../internals/is-object":180,"../internals/native-weak-map":192,"../internals/shared-key":235,"../internals/shared-store":236}],174:[function(s,E,I){var u=s("../internals/well-known-symbol"),d=s("../internals/iterators"),g=u("iterator"),y=Array.prototype;E.exports=function(S){return S!==void 0&&(d.Array===S||y[g]===S)}},{"../internals/iterators":187,"../internals/well-known-symbol":268}],175:[function(s,E,I){var u=s("../internals/classof-raw");E.exports=Array.isArray||function(g){return u(g)=="Array"}},{"../internals/classof-raw":123}],176:[function(s,E,I){E.exports=function(u){return typeof u=="function"}},{}],177:[function(s,E,I){var u=s("../internals/function-uncurry-this"),d=s("../internals/fails"),g=s("../internals/is-callable"),y=s("../internals/classof"),S=s("../internals/get-built-in"),v=s("../internals/inspect-source"),c=function(){},h=[],m=S("Reflect","construct"),x=/^\s*(?:class|function)\b/,T=u(x.exec),_=!x.exec(c),R=function(L){if(!g(L))return!1;try{return m(c,h,L),!0}catch(M){return!1}},A=function(L){if(!g(L))return!1;switch(y(L)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return _||!!T(x,v(L))}catch(M){return!0}};A.sham=!0,E.exports=!m||d(function(){var N;return R(R.call)||!R(Object)||!R(function(){N=!0})||N})?A:R},{"../internals/classof":124,"../internals/fails":150,"../internals/function-uncurry-this":157,"../internals/get-built-in":158,"../internals/inspect-source":172,"../internals/is-callable":176}],178:[function(s,E,I){var u=s("../internals/fails"),d=s("../internals/is-callable"),g=/#|\.prototype\./,y=function(m,x){var T=v[S(m)];return T==h?!0:T==c?!1:d(x)?u(x):!!x},S=y.normalize=function(m){return String(m).replace(g,".").toLowerCase()},v=y.data={},c=y.NATIVE="N",h=y.POLYFILL="P";E.exports=y},{"../internals/fails":150,"../internals/is-callable":176}],179:[function(s,E,I){var u=s("../internals/is-object"),d=Math.floor;E.exports=Number.isInteger||function(y){return!u(y)&&isFinite(y)&&d(y)===y}},{"../internals/is-object":180}],180:[function(s,E,I){var u=s("../internals/is-callable");E.exports=function(d){return typeof d=="object"?d!==null:u(d)}},{"../internals/is-callable":176}],181:[function(s,E,I){E.exports=!1},{}],182:[function(s,E,I){var u=s("../internals/is-object"),d=s("../internals/classof-raw"),g=s("../internals/well-known-symbol"),y=g("match");E.exports=function(S){var v;return u(S)&&((v=S[y])!==void 0?!!v:d(S)=="RegExp")}},{"../internals/classof-raw":123,"../internals/is-object":180,"../internals/well-known-symbol":268}],183:[function(s,E,I){var u=s("../internals/global"),d=s("../internals/get-built-in"),g=s("../internals/is-callable"),y=s("../internals/object-is-prototype-of"),S=s("../internals/use-symbol-as-uid"),v=u.Object;E.exports=S?function(c){return typeof c=="symbol"}:function(c){var h=d("Symbol");return g(h)&&y(h.prototype,v(c))}},{"../internals/get-built-in":158,"../internals/global":163,"../internals/is-callable":176,"../internals/object-is-prototype-of":204,"../internals/use-symbol-as-uid":264}],184:[function(s,E,I){var u=s("../internals/global"),d=s("../internals/function-bind-context"),g=s("../internals/function-call"),y=s("../internals/an-object"),S=s("../internals/try-to-string"),v=s("../internals/is-array-iterator-method"),c=s("../internals/length-of-array-like"),h=s("../internals/object-is-prototype-of"),m=s("../internals/get-iterator"),x=s("../internals/get-iterator-method"),T=s("../internals/iterator-close"),_=u.TypeError,R=function(N,L){this.stopped=N,this.result=L},A=R.prototype;E.exports=function(N,L,M){var F=M&&M.that,H=!!(M&&M.AS_ENTRIES),P=!!(M&&M.IS_ITERATOR),V=!!(M&&M.INTERRUPTED),G=d(L,F),Q,ne,ue,ae,he,ce,we,me=function(ee){return Q&&T(Q,"normal",ee),new R(!0,ee)},Le=function(ee){return H?(y(ee),V?G(ee[0],ee[1],me):G(ee[0],ee[1])):V?G(ee,me):G(ee)};if(P)Q=N;else{if(ne=x(N),!ne)throw _(S(N)+" is not iterable");if(v(ne)){for(ue=0,ae=c(N);ae>ue;ue++)if(he=Le(N[ue]),he&&h(A,he))return he;return new R(!1)}Q=m(N,ne)}for(ce=Q.next;!(we=g(ce,Q)).done;){try{he=Le(we.value)}catch(ee){T(Q,"throw",ee)}if(typeof he=="object"&&he&&h(A,he))return he}return new R(!1)}},{"../internals/an-object":101,"../internals/function-bind-context":153,"../internals/function-call":155,"../internals/get-iterator":160,"../internals/get-iterator-method":159,"../internals/global":163,"../internals/is-array-iterator-method":174,"../internals/iterator-close":185,"../internals/length-of-array-like":188,"../internals/object-is-prototype-of":204,"../internals/try-to-string":257}],185:[function(s,E,I){var u=s("../internals/function-call"),d=s("../internals/an-object"),g=s("../internals/get-method");E.exports=function(y,S,v){var c,h;d(y);try{if(c=g(y,"return"),!c){if(S==="throw")throw v;return v}c=u(c,y)}catch(m){h=!0,c=m}if(S==="throw")throw v;if(h)throw c;return d(c),v}},{"../internals/an-object":101,"../internals/function-call":155,"../internals/get-method":161}],186:[function(s,E,I){"use strict";var u=s("../internals/fails"),d=s("../internals/is-callable"),g=s("../internals/object-create"),y=s("../internals/object-get-prototype-of"),S=s("../internals/redefine"),v=s("../internals/well-known-symbol"),c=s("../internals/is-pure"),h=v("iterator"),m=!1,x,T,_;[].keys&&(_=[].keys(),"next"in _?(T=y(y(_)),T!==Object.prototype&&(x=T)):m=!0);var R=x==null||u(function(){var A={};return x[h].call(A)!==A});R?x={}:c&&(x=g(x)),d(x[h])||S(x,h,function(){return this}),E.exports={IteratorPrototype:x,BUGGY_SAFARI_ITERATORS:m}},{"../internals/fails":150,"../internals/is-callable":176,"../internals/is-pure":181,"../internals/object-create":196,"../internals/object-get-prototype-of":203,"../internals/redefine":222,"../internals/well-known-symbol":268}],187:[function(s,E,I){arguments[4][165][0].apply(I,arguments)},{dup:165}],188:[function(s,E,I){var u=s("../internals/to-length");E.exports=function(d){return u(d.length)}},{"../internals/to-length":249}],189:[function(s,E,I){var u=s("../internals/global"),d=s("../internals/function-bind-context"),g=s("../internals/object-get-own-property-descriptor").f,y=s("../internals/task").set,S=s("../internals/engine-is-ios"),v=s("../internals/engine-is-ios-pebble"),c=s("../internals/engine-is-webos-webkit"),h=s("../internals/engine-is-node"),m=u.MutationObserver||u.WebKitMutationObserver,x=u.document,T=u.process,_=u.Promise,R=g(u,"queueMicrotask"),A=R&&R.value,N,L,M,F,H,P,V,G;A||(N=function(){var Q,ne;for(h&&(Q=T.domain)&&Q.exit();L;){ne=L.fn,L=L.next;try{ne()}catch(ue){throw L?F():M=void 0,ue}}M=void 0,Q&&Q.enter()},!S&&!h&&!c&&m&&x?(H=!0,P=x.createTextNode(""),new m(N).observe(P,{characterData:!0}),F=function(){P.data=H=!H}):!v&&_&&_.resolve?(V=_.resolve(void 0),V.constructor=_,G=d(V.then,V),F=function(){G(N)}):h?F=function(){T.nextTick(N)}:(y=d(y,u),F=function(){y(N)})),E.exports=A||function(Q){var ne={fn:Q,next:void 0};M&&(M.next=ne),L||(L=ne,F()),M=ne}},{"../internals/engine-is-ios":142,"../internals/engine-is-ios-pebble":141,"../internals/engine-is-node":143,"../internals/engine-is-webos-webkit":144,"../internals/function-bind-context":153,"../internals/global":163,"../internals/object-get-own-property-descriptor":199,"../internals/task":243}],190:[function(s,E,I){var u=s("../internals/native-symbol");E.exports=u&&!!Symbol.for&&!!Symbol.keyFor},{"../internals/native-symbol":191}],191:[function(s,E,I){var u=s("../internals/engine-v8-version"),d=s("../internals/fails");E.exports=!!Object.getOwnPropertySymbols&&!d(function(){var g=Symbol();return!String(g)||!(Object(g)instanceof Symbol)||!Symbol.sham&&u&&u<41})},{"../internals/engine-v8-version":146,"../internals/fails":150}],192:[function(s,E,I){var u=s("../internals/global"),d=s("../internals/is-callable"),g=s("../internals/inspect-source"),y=u.WeakMap;E.exports=d(y)&&/native code/.test(g(y))},{"../internals/global":163,"../internals/inspect-source":172,"../internals/is-callable":176}],193:[function(s,E,I){"use strict";var u=s("../internals/a-callable"),d=function(g){var y,S;this.promise=new g(function(v,c){if(y!==void 0||S!==void 0)throw TypeError("Bad Promise constructor");y=v,S=c}),this.resolve=u(y),this.reject=u(S)};E.exports.f=function(g){return new d(g)}},{"../internals/a-callable":95}],194:[function(s,E,I){var u=s("../internals/global"),d=s("../internals/is-regexp"),g=u.TypeError;E.exports=function(y){if(d(y))throw g("The method doesn't accept regular expressions");return y}},{"../internals/global":163,"../internals/is-regexp":182}],195:[function(s,E,I){"use strict";var u=s("../internals/descriptors"),d=s("../internals/function-uncurry-this"),g=s("../internals/function-call"),y=s("../internals/fails"),S=s("../internals/object-keys"),v=s("../internals/object-get-own-property-symbols"),c=s("../internals/object-property-is-enumerable"),h=s("../internals/to-object"),m=s("../internals/indexed-object"),x=Object.assign,T=Object.defineProperty,_=d([].concat);E.exports=!x||y(function(){if(u&&x({b:1},x(T({},"a",{enumerable:!0,get:function(){T(this,"b",{value:3,enumerable:!1})}}),{b:2})).b!==1)return!0;var R={},A={},N=Symbol(),L="abcdefghijklmnopqrst";return R[N]=7,L.split("").forEach(function(M){A[M]=M}),x({},R)[N]!=7||S(x({},A)).join("")!=L})?function(A,N){for(var L=h(A),M=arguments.length,F=1,H=v.f,P=c.f;M>F;)for(var V=m(arguments[F++]),G=H?_(S(V),H(V)):S(V),Q=G.length,ne=0,ue;Q>ne;)ue=G[ne++],(!u||g(P,V,ue))&&(L[ue]=V[ue]);return L}:x},{"../internals/descriptors":134,"../internals/fails":150,"../internals/function-call":155,"../internals/function-uncurry-this":157,"../internals/indexed-object":170,"../internals/object-get-own-property-symbols":202,"../internals/object-keys":206,"../internals/object-property-is-enumerable":207,"../internals/to-object":250}],196:[function(s,E,I){var u=s("../internals/an-object"),d=s("../internals/object-define-properties"),g=s("../internals/enum-bug-keys"),y=s("../internals/hidden-keys"),S=s("../internals/html"),v=s("../internals/document-create-element"),c=s("../internals/shared-key"),h=">",m="<",x="prototype",T="script",_=c("IE_PROTO"),R=function(){},A=function(H){return m+T+h+H+m+"/"+T+h},N=function(H){H.write(A("")),H.close();var P=H.parentWindow.Object;return H=null,P},L=function(){var H=v("iframe"),P="java"+T+":",V;return H.style.display="none",S.appendChild(H),H.src=String(P),V=H.contentWindow.document,V.open(),V.write(A("document.F=Object")),V.close(),V.F},M,F=function(){try{M=new ActiveXObject("htmlfile")}catch(P){}F=typeof document!="undefined"?document.domain&&M?N(M):L():N(M);for(var H=g.length;H--;)delete F[x][g[H]];return F()};y[_]=!0,E.exports=Object.create||function(P,V){var G;return P!==null?(R[x]=u(P),G=new R,R[x]=null,G[_]=P):G=F(),V===void 0?G:d.f(G,V)}},{"../internals/an-object":101,"../internals/document-create-element":135,"../internals/enum-bug-keys":148,"../internals/hidden-keys":165,"../internals/html":167,"../internals/object-define-properties":197,"../internals/shared-key":235}],197:[function(s,E,I){var u=s("../internals/descriptors"),d=s("../internals/v8-prototype-define-bug"),g=s("../internals/object-define-property"),y=s("../internals/an-object"),S=s("../internals/to-indexed-object"),v=s("../internals/object-keys");I.f=u&&!d?Object.defineProperties:function(h,m){y(h);for(var x=S(m),T=v(m),_=T.length,R=0,A;_>R;)g.f(h,A=T[R++],x[A]);return h}},{"../internals/an-object":101,"../internals/descriptors":134,"../internals/object-define-property":198,"../internals/object-keys":206,"../internals/to-indexed-object":247,"../internals/v8-prototype-define-bug":265}],198:[function(s,E,I){var u=s("../internals/global"),d=s("../internals/descriptors"),g=s("../internals/ie8-dom-define"),y=s("../internals/v8-prototype-define-bug"),S=s("../internals/an-object"),v=s("../internals/to-property-key"),c=u.TypeError,h=Object.defineProperty,m=Object.getOwnPropertyDescriptor,x="enumerable",T="configurable",_="writable";I.f=d?y?function(A,N,L){if(S(A),N=v(N),S(L),typeof A=="function"&&N==="prototype"&&"value"in L&&_ in L&&!L[_]){var M=m(A,N);M&&M[_]&&(A[N]=L.value,L={configurable:T in L?L[T]:M[T],enumerable:x in L?L[x]:M[x],writable:!1})}return h(A,N,L)}:h:function(A,N,L){if(S(A),N=v(N),S(L),g)try{return h(A,N,L)}catch(M){}if("get"in L||"set"in L)throw c("Accessors not supported");return"value"in L&&(A[N]=L.value),A}},{"../internals/an-object":101,"../internals/descriptors":134,"../internals/global":163,"../internals/ie8-dom-define":168,"../internals/to-property-key":254,"../internals/v8-prototype-define-bug":265}],199:[function(s,E,I){var u=s("../internals/descriptors"),d=s("../internals/function-call"),g=s("../internals/object-property-is-enumerable"),y=s("../internals/create-property-descriptor"),S=s("../internals/to-indexed-object"),v=s("../internals/to-property-key"),c=s("../internals/has-own-property"),h=s("../internals/ie8-dom-define"),m=Object.getOwnPropertyDescriptor;I.f=u?m:function(T,_){if(T=S(T),_=v(_),h)try{return m(T,_)}catch(R){}if(c(T,_))return y(!d(g.f,T,_),T[_])}},{"../internals/create-property-descriptor":130,"../internals/descriptors":134,"../internals/function-call":155,"../internals/has-own-property":164,"../internals/ie8-dom-define":168,"../internals/object-property-is-enumerable":207,"../internals/to-indexed-object":247,"../internals/to-property-key":254}],200:[function(s,E,I){var u=s("../internals/classof-raw"),d=s("../internals/to-indexed-object"),g=s("../internals/object-get-own-property-names").f,y=s("../internals/array-slice-simple"),S=typeof window=="object"&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],v=function(c){try{return g(c)}catch(h){return y(S)}};E.exports.f=function(h){return S&&u(h)=="Window"?v(h):g(d(h))}},{"../internals/array-slice-simple":116,"../internals/classof-raw":123,"../internals/object-get-own-property-names":201,"../internals/to-indexed-object":247}],201:[function(s,E,I){var u=s("../internals/object-keys-internal"),d=s("../internals/enum-bug-keys"),g=d.concat("length","prototype");I.f=Object.getOwnPropertyNames||function(S){return u(S,g)}},{"../internals/enum-bug-keys":148,"../internals/object-keys-internal":205}],202:[function(s,E,I){I.f=Object.getOwnPropertySymbols},{}],203:[function(s,E,I){var u=s("../internals/global"),d=s("../internals/has-own-property"),g=s("../internals/is-callable"),y=s("../internals/to-object"),S=s("../internals/shared-key"),v=s("../internals/correct-prototype-getter"),c=S("IE_PROTO"),h=u.Object,m=h.prototype;E.exports=v?h.getPrototypeOf:function(x){var T=y(x);if(d(T,c))return T[c];var _=T.constructor;return g(_)&&T instanceof _?_.prototype:T instanceof h?m:null}},{"../internals/correct-prototype-getter":127,"../internals/global":163,"../internals/has-own-property":164,"../internals/is-callable":176,"../internals/shared-key":235,"../internals/to-object":250}],204:[function(s,E,I){var u=s("../internals/function-uncurry-this");E.exports=u({}.isPrototypeOf)},{"../internals/function-uncurry-this":157}],205:[function(s,E,I){var u=s("../internals/function-uncurry-this"),d=s("../internals/has-own-property"),g=s("../internals/to-indexed-object"),y=s("../internals/array-includes").indexOf,S=s("../internals/hidden-keys"),v=u([].push);E.exports=function(c,h){var m=g(c),x=0,T=[],_;for(_ in m)!d(S,_)&&d(m,_)&&v(T,_);for(;h.length>x;)d(m,_=h[x++])&&(~y(T,_)||v(T,_));return T}},{"../internals/array-includes":110,"../internals/function-uncurry-this":157,"../internals/has-own-property":164,"../internals/hidden-keys":165,"../internals/to-indexed-object":247}],206:[function(s,E,I){var u=s("../internals/object-keys-internal"),d=s("../internals/enum-bug-keys");E.exports=Object.keys||function(y){return u(y,d)}},{"../internals/enum-bug-keys":148,"../internals/object-keys-internal":205}],207:[function(s,E,I){"use strict";var u={}.propertyIsEnumerable,d=Object.getOwnPropertyDescriptor,g=d&&!u.call({1:2},1);I.f=g?function(S){var v=d(this,S);return!!v&&v.enumerable}:u},{}],208:[function(s,E,I){var u=s("../internals/function-uncurry-this"),d=s("../internals/an-object"),g=s("../internals/a-possible-prototype");E.exports=Object.setPrototypeOf||("__proto__"in{}?function(){var y=!1,S={},v;try{v=u(Object.getOwnPropertyDescriptor(Object.prototype,"__proto__").set),v(S,[]),y=S instanceof Array}catch(c){}return function(h,m){return d(h),g(m),y?v(h,m):h.__proto__=m,h}}():void 0)},{"../internals/a-possible-prototype":97,"../internals/an-object":101,"../internals/function-uncurry-this":157}],209:[function(s,E,I){var u=s("../internals/descriptors"),d=s("../internals/function-uncurry-this"),g=s("../internals/object-keys"),y=s("../internals/to-indexed-object"),S=s("../internals/object-property-is-enumerable").f,v=d(S),c=d([].push),h=function(m){return function(x){for(var T=y(x),_=g(T),R=_.length,A=0,N=[],L;R>A;)L=_[A++],(!u||v(T,L))&&c(N,m?[L,T[L]]:T[L]);return N}};E.exports={entries:h(!0),values:h(!1)}},{"../internals/descriptors":134,"../internals/function-uncurry-this":157,"../internals/object-keys":206,"../internals/object-property-is-enumerable":207,"../internals/to-indexed-object":247}],210:[function(s,E,I){"use strict";var u=s("../internals/to-string-tag-support"),d=s("../internals/classof");E.exports=u?{}.toString:function(){return"[object "+d(this)+"]"}},{"../internals/classof":124,"../internals/to-string-tag-support":255}],211:[function(s,E,I){var u=s("../internals/global"),d=s("../internals/function-call"),g=s("../internals/is-callable"),y=s("../internals/is-object"),S=u.TypeError;E.exports=function(v,c){var h,m;if(c==="string"&&g(h=v.toString)&&!y(m=d(h,v))||g(h=v.valueOf)&&!y(m=d(h,v))||c!=="string"&&g(h=v.toString)&&!y(m=d(h,v)))return m;throw S("Can't convert object to primitive value")}},{"../internals/function-call":155,"../internals/global":163,"../internals/is-callable":176,"../internals/is-object":180}],212:[function(s,E,I){var u=s("../internals/get-built-in"),d=s("../internals/function-uncurry-this"),g=s("../internals/object-get-own-property-names"),y=s("../internals/object-get-own-property-symbols"),S=s("../internals/an-object"),v=d([].concat);E.exports=u("Reflect","ownKeys")||function(h){var m=g.f(S(h)),x=y.f;return x?v(m,x(h)):m}},{"../internals/an-object":101,"../internals/function-uncurry-this":157,"../internals/get-built-in":158,"../internals/object-get-own-property-names":201,"../internals/object-get-own-property-symbols":202}],213:[function(s,E,I){var u=s("../internals/global");E.exports=u},{"../internals/global":163}],214:[function(s,E,I){E.exports=function(u){try{return{error:!1,value:u()}}catch(d){return{error:!0,value:d}}}},{}],215:[function(s,E,I){var u=s("../internals/global"),d=s("../internals/promise-native-constructor"),g=s("../internals/is-callable"),y=s("../internals/is-forced"),S=s("../internals/inspect-source"),v=s("../internals/well-known-symbol"),c=s("../internals/engine-is-browser"),h=s("../internals/is-pure"),m=s("../internals/engine-v8-version"),x=d&&d.prototype,T=v("species"),_=!1,R=g(u.PromiseRejectionEvent),A=y("Promise",function(){var N=S(d),L=N!==String(d);if(!L&&m===66||h&&!(x.catch&&x.finally))return!0;if(m>=51&&/native code/.test(N))return!1;var M=new d(function(P){P(1)}),F=function(P){P(function(){},function(){})},H=M.constructor={};return H[T]=F,_=M.then(function(){})instanceof F,_?!L&&c&&!R:!0});E.exports={CONSTRUCTOR:A,REJECTION_EVENT:R,SUBCLASSING:_}},{"../internals/engine-is-browser":139,"../internals/engine-v8-version":146,"../internals/global":163,"../internals/inspect-source":172,"../internals/is-callable":176,"../internals/is-forced":178,"../internals/is-pure":181,"../internals/promise-native-constructor":216,"../internals/well-known-symbol":268}],216:[function(s,E,I){var u=s("../internals/global");E.exports=u.Promise},{"../internals/global":163}],217:[function(s,E,I){var u=s("../internals/an-object"),d=s("../internals/is-object"),g=s("../internals/new-promise-capability");E.exports=function(y,S){if(u(y),d(S)&&S.constructor===y)return S;var v=g.f(y),c=v.resolve;return c(S),v.promise}},{"../internals/an-object":101,"../internals/is-object":180,"../internals/new-promise-capability":193}],218:[function(s,E,I){var u=s("../internals/promise-native-constructor"),d=s("../internals/check-correctness-of-iteration"),g=s("../internals/promise-constructor-detection").CONSTRUCTOR;E.exports=g||!d(function(y){u.all(y).then(void 0,function(){})})},{"../internals/check-correctness-of-iteration":122,"../internals/promise-constructor-detection":215,"../internals/promise-native-constructor":216}],219:[function(s,E,I){var u=s("../internals/object-define-property").f;E.exports=function(d,g,y){y in d||u(d,y,{configurable:!0,get:function(){return g[y]},set:function(S){g[y]=S}})}},{"../internals/object-define-property":198}],220:[function(s,E,I){var u=function(){this.head=null,this.tail=null};u.prototype={add:function(d){var g={item:d,next:null};this.head?this.tail.next=g:this.head=g,this.tail=g},get:function(){var d=this.head;if(d)return this.head=d.next,this.tail===d&&(this.tail=null),d.item}},E.exports=u},{}],221:[function(s,E,I){var u=s("../internals/redefine");E.exports=function(d,g,y){for(var S in g)u(d,S,g[S],y);return d}},{"../internals/redefine":222}],222:[function(s,E,I){var u=s("../internals/global"),d=s("../internals/is-callable"),g=s("../internals/has-own-property"),y=s("../internals/create-non-enumerable-property"),S=s("../internals/set-global"),v=s("../internals/inspect-source"),c=s("../internals/internal-state"),h=s("../internals/function-name").CONFIGURABLE,m=c.get,x=c.enforce,T=String(String).split("String");(E.exports=function(_,R,A,N){var L=N?!!N.unsafe:!1,M=N?!!N.enumerable:!1,F=N?!!N.noTargetGet:!1,H=N&&N.name!==void 0?N.name:R,P;if(d(A)&&(String(H).slice(0,7)==="Symbol("&&(H="["+String(H).replace(/^Symbol\(([^)]*)\)/,"$1")+"]"),(!g(A,"name")||h&&A.name!==H)&&y(A,"name",H),P=x(A),P.source||(P.source=T.join(typeof H=="string"?H:""))),_===u){M?_[R]=A:S(R,A);return}else L?!F&&_[R]&&(M=!0):delete _[R];M?_[R]=A:y(_,R,A)})(Function.prototype,"toString",function(){return d(this)&&m(this).source||v(this)})},{"../internals/create-non-enumerable-property":129,"../internals/function-name":156,"../internals/global":163,"../internals/has-own-property":164,"../internals/inspect-source":172,"../internals/internal-state":173,"../internals/is-callable":176,"../internals/set-global":232}],223:[function(s,E,I){var u=s("../internals/global"),d=s("../internals/function-call"),g=s("../internals/an-object"),y=s("../internals/is-callable"),S=s("../internals/classof-raw"),v=s("../internals/regexp-exec"),c=u.TypeError;E.exports=function(h,m){var x=h.exec;if(y(x)){var T=d(x,h,m);return T!==null&&g(T),T}if(S(h)==="RegExp")return d(v,h,m);throw c("RegExp#exec called on incompatible receiver")}},{"../internals/an-object":101,"../internals/classof-raw":123,"../internals/function-call":155,"../internals/global":163,"../internals/is-callable":176,"../internals/regexp-exec":224}],224:[function(s,E,I){"use strict";var u=s("../internals/function-call"),d=s("../internals/function-uncurry-this"),g=s("../internals/to-string"),y=s("../internals/regexp-flags"),S=s("../internals/regexp-sticky-helpers"),v=s("../internals/shared"),c=s("../internals/object-create"),h=s("../internals/internal-state").get,m=s("../internals/regexp-unsupported-dot-all"),x=s("../internals/regexp-unsupported-ncg"),T=v("native-string-replace",String.prototype.replace),_=RegExp.prototype.exec,R=_,A=d("".charAt),N=d("".indexOf),L=d("".replace),M=d("".slice),F=function(){var G=/a/,Q=/b*/g;return u(_,G,"a"),u(_,Q,"a"),G.lastIndex!==0||Q.lastIndex!==0}(),H=S.BROKEN_CARET,P=/()??/.exec("")[1]!==void 0,V=F||P||H||m||x;V&&(R=function(Q){var ne=this,ue=h(ne),ae=g(Q),he=ue.raw,ce,we,me,Le,ee,se,le;if(he)return he.lastIndex=ne.lastIndex,ce=u(R,he,ae),ne.lastIndex=he.lastIndex,ce;var ke=ue.groups,De=H&&ne.sticky,Be=u(y,ne),He=ne.source,Fe=0,Je=ae;if(De&&(Be=L(Be,"y",""),N(Be,"g")===-1&&(Be+="g"),Je=M(ae,ne.lastIndex),ne.lastIndex>0&&(!ne.multiline||ne.multiline&&A(ae,ne.lastIndex-1)!==` `)&&(He="(?: "+He+")",Je=" "+Je,Fe++),we=new RegExp("^(?:"+He+")",Be)),P&&(we=new RegExp("^"+He+"$(?!\\s)",Be)),F&&(me=ne.lastIndex),Le=u(_,De?we:ne,Je),De?Le?(Le.input=M(Le.input,Fe),Le[0]=M(Le[0],Fe),Le.index=ne.lastIndex,ne.lastIndex+=Le[0].length):ne.lastIndex=0:F&&Le&&(ne.lastIndex=ne.global?Le.index+Le[0].length:me),P&&Le&&Le.length>1&&u(T,Le[0],we,function(){for(ee=1;eeb)","g");return y.exec("b").groups.a!=="b"||"b".replace(y,"$c")!=="bc"})},{"../internals/fails":150,"../internals/global":163}],230:[function(s,E,I){var u=s("../internals/global"),d=u.TypeError;E.exports=function(g){if(g==null)throw d("Can't call method on "+g);return g}},{"../internals/global":163}],231:[function(s,E,I){E.exports=Object.is||function(d,g){return d===g?d!==0||1/d===1/g:d!=d&&g!=g}},{}],232:[function(s,E,I){var u=s("../internals/global"),d=Object.defineProperty;E.exports=function(g,y){try{d(u,g,{value:y,configurable:!0,writable:!0})}catch(S){u[g]=y}return y}},{"../internals/global":163}],233:[function(s,E,I){"use strict";var u=s("../internals/get-built-in"),d=s("../internals/object-define-property"),g=s("../internals/well-known-symbol"),y=s("../internals/descriptors"),S=g("species");E.exports=function(v){var c=u(v),h=d.f;y&&c&&!c[S]&&h(c,S,{configurable:!0,get:function(){return this}})}},{"../internals/descriptors":134,"../internals/get-built-in":158,"../internals/object-define-property":198,"../internals/well-known-symbol":268}],234:[function(s,E,I){var u=s("../internals/object-define-property").f,d=s("../internals/has-own-property"),g=s("../internals/well-known-symbol"),y=g("toStringTag");E.exports=function(S,v,c){S&&!c&&(S=S.prototype),S&&!d(S,y)&&u(S,y,{configurable:!0,value:v})}},{"../internals/has-own-property":164,"../internals/object-define-property":198,"../internals/well-known-symbol":268}],235:[function(s,E,I){var u=s("../internals/shared"),d=s("../internals/uid"),g=u("keys");E.exports=function(y){return g[y]||(g[y]=d(y))}},{"../internals/shared":237,"../internals/uid":263}],236:[function(s,E,I){var u=s("../internals/global"),d=s("../internals/set-global"),g="__core-js_shared__",y=u[g]||d(g,{});E.exports=y},{"../internals/global":163,"../internals/set-global":232}],237:[function(s,E,I){var u=s("../internals/is-pure"),d=s("../internals/shared-store");(E.exports=function(g,y){return d[g]||(d[g]=y!==void 0?y:{})})("versions",[]).push({version:"3.22.1",mode:u?"pure":"global",copyright:"\xA9 2014-2022 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.22.1/LICENSE",source:"https://github.com/zloirock/core-js"})},{"../internals/is-pure":181,"../internals/shared-store":236}],238:[function(s,E,I){var u=s("../internals/an-object"),d=s("../internals/a-constructor"),g=s("../internals/well-known-symbol"),y=g("species");E.exports=function(S,v){var c=u(S).constructor,h;return c===void 0||(h=u(c)[y])==null?v:d(h)}},{"../internals/a-constructor":96,"../internals/an-object":101,"../internals/well-known-symbol":268}],239:[function(s,E,I){var u=s("../internals/function-uncurry-this"),d=s("../internals/to-integer-or-infinity"),g=s("../internals/to-string"),y=s("../internals/require-object-coercible"),S=u("".charAt),v=u("".charCodeAt),c=u("".slice),h=function(m){return function(x,T){var _=g(y(x)),R=d(T),A=_.length,N,L;return R<0||R>=A?m?"":void 0:(N=v(_,R),N<55296||N>56319||R+1===A||(L=v(_,R+1))<56320||L>57343?m?S(_,R):N:m?c(_,R,R+2):(N-55296<<10)+(L-56320)+65536)}};E.exports={codeAt:h(!1),charAt:h(!0)}},{"../internals/function-uncurry-this":157,"../internals/require-object-coercible":230,"../internals/to-integer-or-infinity":248,"../internals/to-string":256}],240:[function(s,E,I){var u=s("../internals/function-name").PROPER,d=s("../internals/fails"),g=s("../internals/whitespaces"),y="\u200B\x85\u180E";E.exports=function(S){return d(function(){return!!g[S]()||y[S]()!==y||u&&g[S].name!==S})}},{"../internals/fails":150,"../internals/function-name":156,"../internals/whitespaces":269}],241:[function(s,E,I){var u=s("../internals/function-uncurry-this"),d=s("../internals/require-object-coercible"),g=s("../internals/to-string"),y=s("../internals/whitespaces"),S=u("".replace),v="["+y+"]",c=RegExp("^"+v+v+"*"),h=RegExp(v+v+"*$"),m=function(x){return function(T){var _=g(d(T));return x&1&&(_=S(_,c,"")),x&2&&(_=S(_,h,"")),_}};E.exports={start:m(1),end:m(2),trim:m(3)}},{"../internals/function-uncurry-this":157,"../internals/require-object-coercible":230,"../internals/to-string":256,"../internals/whitespaces":269}],242:[function(s,E,I){var u=s("../internals/function-call"),d=s("../internals/get-built-in"),g=s("../internals/well-known-symbol"),y=s("../internals/redefine");E.exports=function(){var S=d("Symbol"),v=S&&S.prototype,c=v&&v.valueOf,h=g("toPrimitive");v&&!v[h]&&y(v,h,function(m){return u(c,this)})}},{"../internals/function-call":155,"../internals/get-built-in":158,"../internals/redefine":222,"../internals/well-known-symbol":268}],243:[function(s,E,I){var u=s("../internals/global"),d=s("../internals/function-apply"),g=s("../internals/function-bind-context"),y=s("../internals/is-callable"),S=s("../internals/has-own-property"),v=s("../internals/fails"),c=s("../internals/html"),h=s("../internals/array-slice"),m=s("../internals/document-create-element"),x=s("../internals/validate-arguments-length"),T=s("../internals/engine-is-ios"),_=s("../internals/engine-is-node"),R=u.setImmediate,A=u.clearImmediate,N=u.process,L=u.Dispatch,M=u.Function,F=u.MessageChannel,H=u.String,P=0,V={},G="onreadystatechange",Q,ne,ue,ae;try{Q=u.location}catch(Le){}var he=function(Le){if(S(V,Le)){var ee=V[Le];delete V[Le],ee()}},ce=function(Le){return function(){he(Le)}},we=function(Le){he(Le.data)},me=function(Le){u.postMessage(H(Le),Q.protocol+"//"+Q.host)};(!R||!A)&&(R=function(ee){x(arguments.length,1);var se=y(ee)?ee:M(ee),le=h(arguments,1);return V[++P]=function(){d(se,void 0,le)},ne(P),P},A=function(ee){delete V[ee]},_?ne=function(Le){N.nextTick(ce(Le))}:L&&L.now?ne=function(Le){L.now(ce(Le))}:F&&!T?(ue=new F,ae=ue.port2,ue.port1.onmessage=we,ne=g(ae.postMessage,ae)):u.addEventListener&&y(u.postMessage)&&!u.importScripts&&Q&&Q.protocol!=="file:"&&!v(me)?(ne=me,u.addEventListener("message",we,!1)):G in m("script")?ne=function(Le){c.appendChild(m("script"))[G]=function(){c.removeChild(this),he(Le)}}:ne=function(Le){setTimeout(ce(Le),0)}),E.exports={set:R,clear:A}},{"../internals/array-slice":117,"../internals/document-create-element":135,"../internals/engine-is-ios":142,"../internals/engine-is-node":143,"../internals/fails":150,"../internals/function-apply":152,"../internals/function-bind-context":153,"../internals/global":163,"../internals/has-own-property":164,"../internals/html":167,"../internals/is-callable":176,"../internals/validate-arguments-length":266}],244:[function(s,E,I){var u=s("../internals/function-uncurry-this");E.exports=u(1 .valueOf)},{"../internals/function-uncurry-this":157}],245:[function(s,E,I){var u=s("../internals/to-integer-or-infinity"),d=Math.max,g=Math.min;E.exports=function(y,S){var v=u(y);return v<0?d(v+S,0):g(v,S)}},{"../internals/to-integer-or-infinity":248}],246:[function(s,E,I){var u=s("../internals/global"),d=s("../internals/to-integer-or-infinity"),g=s("../internals/to-length"),y=u.RangeError;E.exports=function(S){if(S===void 0)return 0;var v=d(S),c=g(v);if(v!==c)throw y("Wrong length or index");return c}},{"../internals/global":163,"../internals/to-integer-or-infinity":248,"../internals/to-length":249}],247:[function(s,E,I){var u=s("../internals/indexed-object"),d=s("../internals/require-object-coercible");E.exports=function(g){return u(d(g))}},{"../internals/indexed-object":170,"../internals/require-object-coercible":230}],248:[function(s,E,I){var u=Math.ceil,d=Math.floor;E.exports=function(g){var y=+g;return y!==y||y===0?0:(y>0?d:u)(y)}},{}],249:[function(s,E,I){var u=s("../internals/to-integer-or-infinity"),d=Math.min;E.exports=function(g){return g>0?d(u(g),9007199254740991):0}},{"../internals/to-integer-or-infinity":248}],250:[function(s,E,I){var u=s("../internals/global"),d=s("../internals/require-object-coercible"),g=u.Object;E.exports=function(y){return g(d(y))}},{"../internals/global":163,"../internals/require-object-coercible":230}],251:[function(s,E,I){var u=s("../internals/global"),d=s("../internals/to-positive-integer"),g=u.RangeError;E.exports=function(y,S){var v=d(y);if(v%S)throw g("Wrong offset");return v}},{"../internals/global":163,"../internals/to-positive-integer":252}],252:[function(s,E,I){var u=s("../internals/global"),d=s("../internals/to-integer-or-infinity"),g=u.RangeError;E.exports=function(y){var S=d(y);if(S<0)throw g("The argument can't be less than 0");return S}},{"../internals/global":163,"../internals/to-integer-or-infinity":248}],253:[function(s,E,I){var u=s("../internals/global"),d=s("../internals/function-call"),g=s("../internals/is-object"),y=s("../internals/is-symbol"),S=s("../internals/get-method"),v=s("../internals/ordinary-to-primitive"),c=s("../internals/well-known-symbol"),h=u.TypeError,m=c("toPrimitive");E.exports=function(x,T){if(!g(x)||y(x))return x;var _=S(x,m),R;if(_){if(T===void 0&&(T="default"),R=d(_,x,T),!g(R)||y(R))return R;throw h("Can't convert object to primitive value")}return T===void 0&&(T="number"),v(x,T)}},{"../internals/function-call":155,"../internals/get-method":161,"../internals/global":163,"../internals/is-object":180,"../internals/is-symbol":183,"../internals/ordinary-to-primitive":211,"../internals/well-known-symbol":268}],254:[function(s,E,I){var u=s("../internals/to-primitive"),d=s("../internals/is-symbol");E.exports=function(g){var y=u(g,"string");return d(y)?y:y+""}},{"../internals/is-symbol":183,"../internals/to-primitive":253}],255:[function(s,E,I){var u=s("../internals/well-known-symbol"),d=u("toStringTag"),g={};g[d]="z",E.exports=String(g)==="[object z]"},{"../internals/well-known-symbol":268}],256:[function(s,E,I){var u=s("../internals/global"),d=s("../internals/classof"),g=u.String;E.exports=function(y){if(d(y)==="Symbol")throw TypeError("Cannot convert a Symbol value to a string");return g(y)}},{"../internals/classof":124,"../internals/global":163}],257:[function(s,E,I){var u=s("../internals/global"),d=u.String;E.exports=function(g){try{return d(g)}catch(y){return"Object"}}},{"../internals/global":163}],258:[function(s,E,I){"use strict";var u=s("../internals/export"),d=s("../internals/global"),g=s("../internals/function-call"),y=s("../internals/descriptors"),S=s("../internals/typed-array-constructors-require-wrappers"),v=s("../internals/array-buffer-view-core"),c=s("../internals/array-buffer"),h=s("../internals/an-instance"),m=s("../internals/create-property-descriptor"),x=s("../internals/create-non-enumerable-property"),T=s("../internals/is-integral-number"),_=s("../internals/to-length"),R=s("../internals/to-index"),A=s("../internals/to-offset"),N=s("../internals/to-property-key"),L=s("../internals/has-own-property"),M=s("../internals/classof"),F=s("../internals/is-object"),H=s("../internals/is-symbol"),P=s("../internals/object-create"),V=s("../internals/object-is-prototype-of"),G=s("../internals/object-set-prototype-of"),Q=s("../internals/object-get-own-property-names").f,ne=s("../internals/typed-array-from"),ue=s("../internals/array-iteration").forEach,ae=s("../internals/set-species"),he=s("../internals/object-define-property"),ce=s("../internals/object-get-own-property-descriptor"),we=s("../internals/internal-state"),me=s("../internals/inherit-if-required"),Le=we.get,ee=we.set,se=he.f,le=ce.f,ke=Math.round,De=d.RangeError,Be=c.ArrayBuffer,He=Be.prototype,Fe=c.DataView,Je=v.NATIVE_ARRAY_BUFFER_VIEWS,Me=v.TYPED_ARRAY_CONSTRUCTOR,lt=v.TYPED_ARRAY_TAG,Re=v.TypedArray,Oe=v.TypedArrayPrototype,pe=v.aTypedArrayConstructor,fe=v.isTypedArray,z="BYTES_PER_ELEMENT",J="Wrong length",be=function(ze,Ve){pe(ze);for(var yt=0,ct=Ve.length,St=new ze(ct);ct>yt;)St[yt]=Ve[yt++];return St},_e=function(ze,Ve){se(ze,Ve,{get:function(){return Le(this)[Ve]}})},oe=function(ze){var Ve;return V(He,ze)||(Ve=M(ze))=="ArrayBuffer"||Ve=="SharedArrayBuffer"},ie=function(ze,Ve){return fe(ze)&&!H(Ve)&&Ve in ze&&T(+Ve)&&Ve>=0},ve=function(Ve,yt){return yt=N(yt),ie(Ve,yt)?m(2,Ve[yt]):le(Ve,yt)},Ne=function(Ve,yt,ct){return yt=N(yt),ie(Ve,yt)&&F(ct)&&L(ct,"value")&&!L(ct,"get")&&!L(ct,"set")&&!ct.configurable&&(!L(ct,"writable")||ct.writable)&&(!L(ct,"enumerable")||ct.enumerable)?(Ve[yt]=ct.value,Ve):se(Ve,yt,ct)};y?(Je||(ce.f=ve,he.f=Ne,_e(Oe,"buffer"),_e(Oe,"byteOffset"),_e(Oe,"byteLength"),_e(Oe,"length")),u({target:"Object",stat:!0,forced:!Je},{getOwnPropertyDescriptor:ve,defineProperty:Ne}),E.exports=function(ze,Ve,yt){var ct=ze.match(/\d+$/)[0]/8,St=ze+(yt?"Clamped":"")+"Array",_t="get"+ze,At="set"+ze,ht=d[St],wt=ht,jt=wt&&wt.prototype,st={},ge=function(Mt,On){var Vn=Le(Mt);return Vn.view[_t](On*ct+Vn.byteOffset,!0)},on=function(Mt,On,Vn){var Fn=Le(Mt);yt&&(Vn=(Vn=ke(Vn))<0?0:Vn>255?255:Vn&255),Fn.view[At](On*ct+Fn.byteOffset,Vn,!0)},mn=function(Mt,On){se(Mt,On,{get:function(){return ge(this,On)},set:function(Vn){return on(this,On,Vn)},enumerable:!0})};Je?S&&(wt=Ve(function(Mt,On,Vn,Fn){return h(Mt,jt),me(function(){return F(On)?oe(On)?Fn!==void 0?new ht(On,A(Vn,ct),Fn):Vn!==void 0?new ht(On,A(Vn,ct)):new ht(On):fe(On)?be(wt,On):g(ne,wt,On):new ht(R(On))}(),Mt,wt)}),G&&G(wt,Re),ue(Q(ht),function(Mt){Mt in wt||x(wt,Mt,ht[Mt])}),wt.prototype=jt):(wt=Ve(function(Mt,On,Vn,Fn){h(Mt,jt);var Gn=0,sn=0,xt,gr,Pr;if(!F(On))Pr=R(On),gr=Pr*ct,xt=new Be(gr);else if(oe(On)){xt=On,sn=A(Vn,ct);var tr=On.byteLength;if(Fn===void 0){if(tr%ct||(gr=tr-sn,gr<0))throw De(J)}else if(gr=_(Fn)*ct,gr+sn>tr)throw De(J);Pr=gr/ct}else return fe(On)?be(wt,On):g(ne,wt,On);for(ee(Mt,{buffer:xt,byteOffset:sn,byteLength:gr,length:Pr,view:new Fe(xt)});Gn1?arguments[1]:void 0,L=N!==void 0,M=c(R),F,H,P,V,G,Q;if(M&&!h(M))for(G=v(R,M),Q=G.next,R=[];!(V=d(Q,G)).done;)R.push(V.value);for(L&&A>2&&(N=u(N,arguments[2])),H=S(R),P=new(m(_))(H),F=0;H>F;F++)P[F]=L?N(R[F],F):R[F];return P}},{"../internals/a-constructor":96,"../internals/array-buffer-view-core":103,"../internals/function-bind-context":153,"../internals/function-call":155,"../internals/get-iterator":160,"../internals/get-iterator-method":159,"../internals/is-array-iterator-method":174,"../internals/length-of-array-like":188,"../internals/to-object":250}],262:[function(s,E,I){var u=s("../internals/array-buffer-view-core"),d=s("../internals/species-constructor"),g=u.TYPED_ARRAY_CONSTRUCTOR,y=u.aTypedArrayConstructor;E.exports=function(S){return y(d(S,S[g]))}},{"../internals/array-buffer-view-core":103,"../internals/species-constructor":238}],263:[function(s,E,I){var u=s("../internals/function-uncurry-this"),d=0,g=Math.random(),y=u(1 .toString);E.exports=function(S){return"Symbol("+(S===void 0?"":S)+")_"+y(++d+g,36)}},{"../internals/function-uncurry-this":157}],264:[function(s,E,I){var u=s("../internals/native-symbol");E.exports=u&&!Symbol.sham&&typeof Symbol.iterator=="symbol"},{"../internals/native-symbol":191}],265:[function(s,E,I){var u=s("../internals/descriptors"),d=s("../internals/fails");E.exports=u&&d(function(){return Object.defineProperty(function(){},"prototype",{value:42,writable:!1}).prototype!=42})},{"../internals/descriptors":134,"../internals/fails":150}],266:[function(s,E,I){var u=s("../internals/global"),d=u.TypeError;E.exports=function(g,y){if(g=51||!g(function(){var V=[];return V[R]=!1,V.concat()[0]!==V}),F=x("concat"),H=function(V){if(!S(V))return!1;var G=V[R];return G!==void 0?!!G:y(V)},P=!M||!F;u({target:"Array",proto:!0,forced:P},{concat:function(G){var Q=v(this),ne=m(Q,0),ue=0,ae,he,ce,we,me;for(ae=-1,ce=arguments.length;aeA)throw L(N);for(he=0;he=A)throw L(N);h(ne,ue++,me)}return ne.length=ue,ne}})},{"../internals/array-method-has-species-support":113,"../internals/array-species-create":120,"../internals/create-property":131,"../internals/engine-v8-version":146,"../internals/export":149,"../internals/fails":150,"../internals/global":163,"../internals/is-array":175,"../internals/is-object":180,"../internals/length-of-array-like":188,"../internals/to-object":250,"../internals/well-known-symbol":268}],273:[function(s,E,I){var u=s("../internals/export"),d=s("../internals/array-fill"),g=s("../internals/add-to-unscopables");u({target:"Array",proto:!0},{fill:d}),g("fill")},{"../internals/add-to-unscopables":98,"../internals/array-fill":106,"../internals/export":149}],274:[function(s,E,I){"use strict";var u=s("../internals/export"),d=s("../internals/array-iteration").filter,g=s("../internals/array-method-has-species-support"),y=g("filter");u({target:"Array",proto:!0,forced:!y},{filter:function(v){return d(this,v,arguments.length>1?arguments[1]:void 0)}})},{"../internals/array-iteration":111,"../internals/array-method-has-species-support":113,"../internals/export":149}],275:[function(s,E,I){"use strict";var u=s("../internals/export"),d=s("../internals/array-iteration").find,g=s("../internals/add-to-unscopables"),y="find",S=!0;y in[]&&Array(1)[y](function(){S=!1}),u({target:"Array",proto:!0,forced:S},{find:function(c){return d(this,c,arguments.length>1?arguments[1]:void 0)}}),g(y)},{"../internals/add-to-unscopables":98,"../internals/array-iteration":111,"../internals/export":149}],276:[function(s,E,I){var u=s("../internals/export"),d=s("../internals/array-from"),g=s("../internals/check-correctness-of-iteration"),y=!g(function(S){Array.from(S)});u({target:"Array",stat:!0,forced:y},{from:d})},{"../internals/array-from":109,"../internals/check-correctness-of-iteration":122,"../internals/export":149}],277:[function(s,E,I){"use strict";var u=s("../internals/export"),d=s("../internals/array-includes").includes,g=s("../internals/add-to-unscopables");u({target:"Array",proto:!0},{includes:function(S){return d(this,S,arguments.length>1?arguments[1]:void 0)}}),g("includes")},{"../internals/add-to-unscopables":98,"../internals/array-includes":110,"../internals/export":149}],278:[function(s,E,I){"use strict";var u=s("../internals/to-indexed-object"),d=s("../internals/add-to-unscopables"),g=s("../internals/iterators"),y=s("../internals/internal-state"),S=s("../internals/object-define-property").f,v=s("../internals/define-iterator"),c=s("../internals/is-pure"),h=s("../internals/descriptors"),m="Array Iterator",x=y.set,T=y.getterFor(m);E.exports=v(Array,"Array",function(R,A){x(this,{type:m,target:u(R),index:0,kind:A})},function(){var R=T(this),A=R.target,N=R.kind,L=R.index++;return!A||L>=A.length?(R.target=void 0,{value:void 0,done:!0}):N=="keys"?{value:L,done:!1}:N=="values"?{value:A[L],done:!1}:{value:[L,A[L]],done:!1}},"values");var _=g.Arguments=g.Array;if(d("keys"),d("values"),d("entries"),!c&&h&&_.name!=="values")try{S(_,"name",{value:"values"})}catch(R){}},{"../internals/add-to-unscopables":98,"../internals/define-iterator":132,"../internals/descriptors":134,"../internals/internal-state":173,"../internals/is-pure":181,"../internals/iterators":187,"../internals/object-define-property":198,"../internals/to-indexed-object":247}],279:[function(s,E,I){"use strict";var u=s("../internals/export"),d=s("../internals/function-uncurry-this"),g=s("../internals/indexed-object"),y=s("../internals/to-indexed-object"),S=s("../internals/array-method-is-strict"),v=d([].join),c=g!=Object,h=S("join",",");u({target:"Array",proto:!0,forced:c||!h},{join:function(x){return v(y(this),x===void 0?",":x)}})},{"../internals/array-method-is-strict":114,"../internals/export":149,"../internals/function-uncurry-this":157,"../internals/indexed-object":170,"../internals/to-indexed-object":247}],280:[function(s,E,I){"use strict";var u=s("../internals/export"),d=s("../internals/array-iteration").map,g=s("../internals/array-method-has-species-support"),y=g("map");u({target:"Array",proto:!0,forced:!y},{map:function(v){return d(this,v,arguments.length>1?arguments[1]:void 0)}})},{"../internals/array-iteration":111,"../internals/array-method-has-species-support":113,"../internals/export":149}],281:[function(s,E,I){"use strict";var u=s("../internals/export"),d=s("../internals/global"),g=s("../internals/is-array"),y=s("../internals/is-constructor"),S=s("../internals/is-object"),v=s("../internals/to-absolute-index"),c=s("../internals/length-of-array-like"),h=s("../internals/to-indexed-object"),m=s("../internals/create-property"),x=s("../internals/well-known-symbol"),T=s("../internals/array-method-has-species-support"),_=s("../internals/array-slice"),R=T("slice"),A=x("species"),N=d.Array,L=Math.max;u({target:"Array",proto:!0,forced:!R},{slice:function(F,H){var P=h(this),V=c(P),G=v(F,V),Q=v(H===void 0?V:H,V),ne,ue,ae;if(g(P)&&(ne=P.constructor,y(ne)&&(ne===N||g(ne.prototype))?ne=void 0:S(ne)&&(ne=ne[A],ne===null&&(ne=void 0)),ne===N||ne===void 0))return _(P,G,Q);for(ue=new(ne===void 0?N:ne)(L(Q-G,0)),ae=0;G3)){if(T)return!0;if(R)return R<603;var Q="",ne,ue,ae,he;for(ne=65;ne<76;ne++){switch(ue=String.fromCharCode(ne),ne){case 66:case 69:case 70:case 72:ae=3;break;case 68:case 71:ae=4;break;default:ae=2}for(he=0;he<47;he++)A.push({k:ue+he,v:ae})}for(A.sort(function(ce,we){return we.v-ce.v}),he=0;hev(ue)?1:-1}};u({target:"Array",proto:!0,forced:V},{sort:function(ne){ne!==void 0&&g(ne);var ue=y(this);if(P)return ne===void 0?N(ue):N(ue,ne);var ae=[],he=S(ue),ce,we;for(we=0;weA)throw T(N);for(ue=c(H,ne),ae=0;aeP-ne+Q;ae--)delete H[ae-1]}else if(Q>ne)for(ae=P-ne;ae>V;ae--)he=ae+ne-1,ce=ae+Q-1,he in H?H[ce]=H[he]:delete H[ce];for(ae=0;ae2){if(me=L(me),Le=G(me,0),Le===43||Le===45){if(ee=G(me,2),ee===88||ee===120)return NaN}else if(Le===48){switch(G(me,1)){case 66:case 98:se=2,le=49;break;case 79:case 111:se=8,le=55;break;default:return+me}for(ke=V(me,2),De=ke.length,Be=0;Bele)return NaN;return parseInt(ke,se)}}return+me};if(y(M,!F(" 0o1")||!F("0b1")||F("+0x1"))){for(var ue=function(me){var Le=arguments.length<1?0:F(Q(me)),ee=this;return h(H,ee)&&T(function(){N(ee)})?c(Object(Le),ee,ue):Le},ae=u?_(F):"MAX_VALUE,MIN_VALUE,NaN,NEGATIVE_INFINITY,POSITIVE_INFINITY,EPSILON,MAX_SAFE_INTEGER,MIN_SAFE_INTEGER,isFinite,isInteger,isNaN,isSafeInteger,parseFloat,parseInt,fromString,range".split(","),he=0,ce;ae.length>he;he++)v(F,ce=ae[he])&&!v(ue,ce)&&A(ue,ce,R(F,ce));ue.prototype=H,H.constructor=ue,S(d,M,ue)}},{"../internals/descriptors":134,"../internals/fails":150,"../internals/function-uncurry-this":157,"../internals/global":163,"../internals/has-own-property":164,"../internals/inherit-if-required":171,"../internals/is-forced":178,"../internals/is-symbol":183,"../internals/object-define-property":198,"../internals/object-get-own-property-descriptor":199,"../internals/object-get-own-property-names":201,"../internals/object-is-prototype-of":204,"../internals/redefine":222,"../internals/string-trim":241,"../internals/this-number-value":244,"../internals/to-primitive":253}],287:[function(s,E,I){var u=s("../internals/export"),d=s("../internals/object-assign");u({target:"Object",stat:!0,forced:Object.assign!==d},{assign:d})},{"../internals/export":149,"../internals/object-assign":195}],288:[function(s,E,I){var u=s("../internals/export"),d=s("../internals/object-to-array").entries;u({target:"Object",stat:!0},{entries:function(y){return d(y)}})},{"../internals/export":149,"../internals/object-to-array":209}],289:[function(s,E,I){var u=s("../internals/export"),d=s("../internals/native-symbol"),g=s("../internals/fails"),y=s("../internals/object-get-own-property-symbols"),S=s("../internals/to-object"),v=!d||g(function(){y.f(1)});u({target:"Object",stat:!0,forced:v},{getOwnPropertySymbols:function(h){var m=y.f;return m?m(S(h)):[]}})},{"../internals/export":149,"../internals/fails":150,"../internals/native-symbol":191,"../internals/object-get-own-property-symbols":202,"../internals/to-object":250}],290:[function(s,E,I){var u=s("../internals/export"),d=s("../internals/to-object"),g=s("../internals/object-keys"),y=s("../internals/fails"),S=y(function(){g(1)});u({target:"Object",stat:!0,forced:S},{keys:function(c){return g(d(c))}})},{"../internals/export":149,"../internals/fails":150,"../internals/object-keys":206,"../internals/to-object":250}],291:[function(s,E,I){var u=s("../internals/to-string-tag-support"),d=s("../internals/redefine"),g=s("../internals/object-to-string");u||d(Object.prototype,"toString",g,{unsafe:!0})},{"../internals/object-to-string":210,"../internals/redefine":222,"../internals/to-string-tag-support":255}],292:[function(s,E,I){"use strict";var u=s("../internals/export"),d=s("../internals/function-call"),g=s("../internals/a-callable"),y=s("../internals/new-promise-capability"),S=s("../internals/perform"),v=s("../internals/iterate"),c=s("../internals/promise-statics-incorrect-iteration");u({target:"Promise",stat:!0,forced:c},{all:function(m){var x=this,T=y.f(x),_=T.resolve,R=T.reject,A=S(function(){var N=g(x.resolve),L=[],M=0,F=1;v(m,function(H){var P=M++,V=!1;F++,d(N,x,H).then(function(G){V||(V=!0,L[P]=G,--F||_(L))},R)}),--F||_(L)});return A.error&&R(A.value),T.promise}})},{"../internals/a-callable":95,"../internals/export":149,"../internals/function-call":155,"../internals/iterate":184,"../internals/new-promise-capability":193,"../internals/perform":214,"../internals/promise-statics-incorrect-iteration":218}],293:[function(s,E,I){"use strict";var u=s("../internals/export"),d=s("../internals/is-pure"),g=s("../internals/promise-constructor-detection").CONSTRUCTOR,y=s("../internals/promise-native-constructor"),S=s("../internals/get-built-in"),v=s("../internals/is-callable"),c=s("../internals/redefine"),h=y&&y.prototype;if(u({target:"Promise",proto:!0,forced:g,real:!0},{catch:function(x){return this.then(void 0,x)}}),!d&&v(y)){var m=S("Promise").prototype.catch;h.catch!==m&&c(h,"catch",m,{unsafe:!0})}},{"../internals/export":149,"../internals/get-built-in":158,"../internals/is-callable":176,"../internals/is-pure":181,"../internals/promise-constructor-detection":215,"../internals/promise-native-constructor":216,"../internals/redefine":222}],294:[function(s,E,I){"use strict";var u=s("../internals/export"),d=s("../internals/is-pure"),g=s("../internals/engine-is-node"),y=s("../internals/global"),S=s("../internals/function-call"),v=s("../internals/redefine"),c=s("../internals/redefine-all"),h=s("../internals/object-set-prototype-of"),m=s("../internals/set-to-string-tag"),x=s("../internals/set-species"),T=s("../internals/a-callable"),_=s("../internals/is-callable"),R=s("../internals/is-object"),A=s("../internals/an-instance"),N=s("../internals/species-constructor"),L=s("../internals/task").set,M=s("../internals/microtask"),F=s("../internals/host-report-errors"),H=s("../internals/perform"),P=s("../internals/queue"),V=s("../internals/internal-state"),G=s("../internals/promise-native-constructor"),Q=s("../internals/promise-constructor-detection"),ne=s("../internals/new-promise-capability"),ue="Promise",ae=Q.CONSTRUCTOR,he=Q.REJECTION_EVENT,ce=Q.SUBCLASSING,we=V.getterFor(ue),me=V.set,Le=G&&G.prototype,ee=G,se=Le,le=y.TypeError,ke=y.document,De=y.process,Be=ne.f,He=Be,Fe=!!(ke&&ke.createEvent&&y.dispatchEvent),Je="unhandledrejection",Me="rejectionhandled",lt=0,Re=1,Oe=2,pe=1,fe=2,z,J,be,_e,oe=function(At){var ht;return R(At)&&_(ht=At.then)?ht:!1},ie=function(At,ht){var wt=ht.value,jt=ht.state==Re,st=jt?At.ok:At.fail,ge=At.resolve,on=At.reject,mn=At.domain,Mt,On,Vn;try{st?(jt||(ht.rejection===fe&&yt(ht),ht.rejection=pe),st===!0?Mt=wt:(mn&&mn.enter(),Mt=st(wt),mn&&(mn.exit(),Vn=!0)),Mt===At.promise?on(le("Promise-chain cycle")):(On=oe(Mt))?S(On,Mt,ge,on):ge(Mt)):on(wt)}catch(Fn){mn&&!Vn&&mn.exit(),on(Fn)}},ve=function(At,ht){At.notified||(At.notified=!0,M(function(){for(var wt=At.reactions,jt;jt=wt.get();)ie(jt,At);At.notified=!1,ht&&!At.rejection&&ze(At)}))},Ne=function(At,ht,wt){var jt,st;Fe?(jt=ke.createEvent("Event"),jt.promise=ht,jt.reason=wt,jt.initEvent(At,!1,!0),y.dispatchEvent(jt)):jt={promise:ht,reason:wt},!he&&(st=y["on"+At])?st(jt):At===Je&&F("Unhandled promise rejection",wt)},ze=function(At){S(L,y,function(){var ht=At.facade,wt=At.value,jt=Ve(At),st;if(jt&&(st=H(function(){g?De.emit("unhandledRejection",wt,ht):Ne(Je,ht,wt)}),At.rejection=g||Ve(At)?fe:pe,st.error))throw st.value})},Ve=function(At){return At.rejection!==pe&&!At.parent},yt=function(At){S(L,y,function(){var ht=At.facade;g?De.emit("rejectionHandled",ht):Ne(Me,ht,At.value)})},ct=function(At,ht,wt){return function(jt){At(ht,jt,wt)}},St=function(At,ht,wt){At.done||(At.done=!0,wt&&(At=wt),At.value=ht,At.state=Oe,ve(At,!0))},_t=function(At,ht,wt){if(!At.done){At.done=!0,wt&&(At=wt);try{if(At.facade===ht)throw le("Promise can't be resolved itself");var jt=oe(ht);jt?M(function(){var st={done:!1};try{S(jt,ht,ct(_t,st,At),ct(St,st,At))}catch(ge){St(st,ge,At)}}):(At.value=ht,At.state=Re,ve(At,!1))}catch(st){St({done:!1},st,At)}}};if(ae&&(ee=function(ht){A(this,se),T(ht),S(z,this);var wt=we(this);try{ht(ct(_t,wt),ct(St,wt))}catch(jt){St(wt,jt)}},se=ee.prototype,z=function(ht){me(this,{type:ue,done:!1,notified:!1,parent:!1,reactions:new P,rejection:!1,state:lt,value:void 0})},z.prototype=c(se,{then:function(ht,wt){var jt=we(this),st=Be(N(this,ee));return jt.parent=!0,st.ok=_(ht)?ht:!0,st.fail=_(wt)&&wt,st.domain=g?De.domain:void 0,jt.state==lt?jt.reactions.add(st):M(function(){ie(st,jt)}),st.promise}}),J=function(){var At=new z,ht=we(At);this.promise=At,this.resolve=ct(_t,ht),this.reject=ct(St,ht)},ne.f=Be=function(At){return At===ee||At===be?new J(At):He(At)},!d&&_(G)&&Le!==Object.prototype)){_e=Le.then,ce||v(Le,"then",function(ht,wt){var jt=this;return new ee(function(st,ge){S(_e,jt,st,ge)}).then(ht,wt)},{unsafe:!0});try{delete Le.constructor}catch(At){}h&&h(Le,se)}u({global:!0,wrap:!0,forced:ae},{Promise:ee}),m(ee,ue,!1,!0),x(ue)},{"../internals/a-callable":95,"../internals/an-instance":100,"../internals/engine-is-node":143,"../internals/export":149,"../internals/function-call":155,"../internals/global":163,"../internals/host-report-errors":166,"../internals/internal-state":173,"../internals/is-callable":176,"../internals/is-object":180,"../internals/is-pure":181,"../internals/microtask":189,"../internals/new-promise-capability":193,"../internals/object-set-prototype-of":208,"../internals/perform":214,"../internals/promise-constructor-detection":215,"../internals/promise-native-constructor":216,"../internals/queue":220,"../internals/redefine":222,"../internals/redefine-all":221,"../internals/set-species":233,"../internals/set-to-string-tag":234,"../internals/species-constructor":238,"../internals/task":243}],295:[function(s,E,I){s("../modules/es.promise.constructor"),s("../modules/es.promise.all"),s("../modules/es.promise.catch"),s("../modules/es.promise.race"),s("../modules/es.promise.reject"),s("../modules/es.promise.resolve")},{"../modules/es.promise.all":292,"../modules/es.promise.catch":293,"../modules/es.promise.constructor":294,"../modules/es.promise.race":296,"../modules/es.promise.reject":297,"../modules/es.promise.resolve":298}],296:[function(s,E,I){"use strict";var u=s("../internals/export"),d=s("../internals/function-call"),g=s("../internals/a-callable"),y=s("../internals/new-promise-capability"),S=s("../internals/perform"),v=s("../internals/iterate"),c=s("../internals/promise-statics-incorrect-iteration");u({target:"Promise",stat:!0,forced:c},{race:function(m){var x=this,T=y.f(x),_=T.reject,R=S(function(){var A=g(x.resolve);v(m,function(N){d(A,x,N).then(T.resolve,_)})});return R.error&&_(R.value),T.promise}})},{"../internals/a-callable":95,"../internals/export":149,"../internals/function-call":155,"../internals/iterate":184,"../internals/new-promise-capability":193,"../internals/perform":214,"../internals/promise-statics-incorrect-iteration":218}],297:[function(s,E,I){"use strict";var u=s("../internals/export"),d=s("../internals/function-call"),g=s("../internals/new-promise-capability"),y=s("../internals/promise-constructor-detection").CONSTRUCTOR;u({target:"Promise",stat:!0,forced:y},{reject:function(v){var c=g.f(this);return d(c.reject,void 0,v),c.promise}})},{"../internals/export":149,"../internals/function-call":155,"../internals/new-promise-capability":193,"../internals/promise-constructor-detection":215}],298:[function(s,E,I){"use strict";var u=s("../internals/export"),d=s("../internals/get-built-in"),g=s("../internals/is-pure"),y=s("../internals/promise-native-constructor"),S=s("../internals/promise-constructor-detection").CONSTRUCTOR,v=s("../internals/promise-resolve"),c=d("Promise"),h=g&&!S;u({target:"Promise",stat:!0,forced:g||S},{resolve:function(x){return v(h&&this===c?y:this,x)}})},{"../internals/export":149,"../internals/get-built-in":158,"../internals/is-pure":181,"../internals/promise-constructor-detection":215,"../internals/promise-native-constructor":216,"../internals/promise-resolve":217}],299:[function(s,E,I){var u=s("../internals/descriptors"),d=s("../internals/global"),g=s("../internals/function-uncurry-this"),y=s("../internals/is-forced"),S=s("../internals/inherit-if-required"),v=s("../internals/create-non-enumerable-property"),c=s("../internals/object-get-own-property-names").f,h=s("../internals/object-is-prototype-of"),m=s("../internals/is-regexp"),x=s("../internals/to-string"),T=s("../internals/regexp-get-flags"),_=s("../internals/regexp-sticky-helpers"),R=s("../internals/proxy-accessor"),A=s("../internals/redefine"),N=s("../internals/fails"),L=s("../internals/has-own-property"),M=s("../internals/internal-state").enforce,F=s("../internals/set-species"),H=s("../internals/well-known-symbol"),P=s("../internals/regexp-unsupported-dot-all"),V=s("../internals/regexp-unsupported-ncg"),G=H("match"),Q=d.RegExp,ne=Q.prototype,ue=d.SyntaxError,ae=g(ne.exec),he=g("".charAt),ce=g("".replace),we=g("".indexOf),me=g("".slice),Le=/^\?<[^\s\d!#%&*+<=>@^][^\s!#%&*+<=>@^]*>/,ee=/a/g,se=/a/g,le=new Q(ee)!==ee,ke=_.MISSED_STICKY,De=_.UNSUPPORTED_Y,Be=u&&(!le||ke||P||V||N(function(){return se[G]=!1,Q(ee)!=ee||Q(se)==se||Q(ee,"i")!="/a/i"})),He=function(Re){for(var Oe=Re.length,pe=0,fe="",z=!1,J;pe<=Oe;pe++){if(J=he(Re,pe),J==="\\"){fe+=J+he(Re,++pe);continue}!z&&J==="."?fe+="[\\s\\S]":(J==="["?z=!0:J==="]"&&(z=!1),fe+=J)}return fe},Fe=function(Re){for(var Oe=Re.length,pe=0,fe="",z=[],J={},be=!1,_e=!1,oe=0,ie="",ve;pe<=Oe;pe++){if(ve=he(Re,pe),ve==="\\")ve=ve+he(Re,++pe);else if(ve==="]")be=!1;else if(!be)switch(!0){case ve==="[":be=!0;break;case ve==="(":ae(Le,me(Re,pe+1))&&(pe+=2,_e=!0),fe+=ve,oe++;continue;case(ve===">"&&_e):if(ie===""||L(J,ie))throw new ue("Invalid capture group name");J[ie]=!0,z[z.length]=[ie,oe],_e=!1,ie="";continue}_e?ie+=ve:fe+=ve}return[fe,z]};if(y("RegExp",Be)){for(var Je=function(Oe,pe){var fe=h(ne,this),z=m(Oe),J=pe===void 0,be=[],_e=Oe,oe,ie,ve,Ne,ze,Ve;if(!fe&&z&&J&&Oe.constructor===Je)return Oe;if((z||h(ne,Oe))&&(Oe=Oe.source,J&&(pe=T(_e))),Oe=Oe===void 0?"":x(Oe),pe=pe===void 0?"":x(pe),_e=Oe,P&&"dotAll"in ee&&(ie=!!pe&&we(pe,"s")>-1,ie&&(pe=ce(pe,/s/g,""))),oe=pe,ke&&"sticky"in ee&&(ve=!!pe&&we(pe,"y")>-1,ve&&De&&(pe=ce(pe,/y/g,""))),V&&(Ne=Fe(Oe),Oe=Ne[0],be=Ne[1]),ze=S(Q(Oe,pe),fe?this:ne,Je),(ie||ve||be.length)&&(Ve=M(ze),ie&&(Ve.dotAll=!0,Ve.raw=Je(He(Oe),oe)),ve&&(Ve.sticky=!0),be.length&&(Ve.groups=be)),Oe!==_e)try{v(ze,"source",_e===""?"(?:)":_e)}catch(yt){}return ze},Me=c(Q),lt=0;Me.length>lt;)R(Je,Q,Me[lt++]);ne.constructor=Je,Je.prototype=ne,A(d,"RegExp",Je)}F("RegExp")},{"../internals/create-non-enumerable-property":129,"../internals/descriptors":134,"../internals/fails":150,"../internals/function-uncurry-this":157,"../internals/global":163,"../internals/has-own-property":164,"../internals/inherit-if-required":171,"../internals/internal-state":173,"../internals/is-forced":178,"../internals/is-regexp":182,"../internals/object-get-own-property-names":201,"../internals/object-is-prototype-of":204,"../internals/proxy-accessor":219,"../internals/redefine":222,"../internals/regexp-get-flags":226,"../internals/regexp-sticky-helpers":227,"../internals/regexp-unsupported-dot-all":228,"../internals/regexp-unsupported-ncg":229,"../internals/set-species":233,"../internals/to-string":256,"../internals/well-known-symbol":268}],300:[function(s,E,I){"use strict";var u=s("../internals/export"),d=s("../internals/regexp-exec");u({target:"RegExp",proto:!0,forced:/./.exec!==d},{exec:d})},{"../internals/export":149,"../internals/regexp-exec":224}],301:[function(s,E,I){"use strict";var u=s("../internals/function-name").PROPER,d=s("../internals/redefine"),g=s("../internals/an-object"),y=s("../internals/to-string"),S=s("../internals/fails"),v=s("../internals/regexp-get-flags"),c="toString",h=RegExp.prototype,m=h[c],x=S(function(){return m.call({source:"a",flags:"b"})!="/a/b"}),T=u&&m.name!=c;(x||T)&&d(RegExp.prototype,c,function(){var R=g(this),A=y(R.source),N=y(v(R));return"/"+A+"/"+N},{unsafe:!0})},{"../internals/an-object":101,"../internals/fails":150,"../internals/function-name":156,"../internals/redefine":222,"../internals/regexp-get-flags":226,"../internals/to-string":256}],302:[function(s,E,I){"use strict";var u=s("../internals/export"),d=s("../internals/function-uncurry-this"),g=s("../internals/not-a-regexp"),y=s("../internals/require-object-coercible"),S=s("../internals/to-string"),v=s("../internals/correct-is-regexp-logic"),c=d("".indexOf);u({target:"String",proto:!0,forced:!v("includes")},{includes:function(m){return!!~c(S(y(this)),S(g(m)),arguments.length>1?arguments[1]:void 0)}})},{"../internals/correct-is-regexp-logic":126,"../internals/export":149,"../internals/function-uncurry-this":157,"../internals/not-a-regexp":194,"../internals/require-object-coercible":230,"../internals/to-string":256}],303:[function(s,E,I){"use strict";var u=s("../internals/string-multibyte").charAt,d=s("../internals/to-string"),g=s("../internals/internal-state"),y=s("../internals/define-iterator"),S="String Iterator",v=g.set,c=g.getterFor(S);y(String,"String",function(h){v(this,{type:S,string:d(h),index:0})},function(){var m=c(this),x=m.string,T=m.index,_;return T>=x.length?{value:void 0,done:!0}:(_=u(x,T),m.index+=_.length,{value:_,done:!1})})},{"../internals/define-iterator":132,"../internals/internal-state":173,"../internals/string-multibyte":239,"../internals/to-string":256}],304:[function(s,E,I){"use strict";var u=s("../internals/function-call"),d=s("../internals/fix-regexp-well-known-symbol-logic"),g=s("../internals/an-object"),y=s("../internals/to-length"),S=s("../internals/to-string"),v=s("../internals/require-object-coercible"),c=s("../internals/get-method"),h=s("../internals/advance-string-index"),m=s("../internals/regexp-exec-abstract");d("match",function(x,T,_){return[function(A){var N=v(this),L=A==null?void 0:c(A,x);return L?u(L,A,N):new RegExp(A)[x](S(N))},function(R){var A=g(this),N=S(R),L=_(T,A,N);if(L.done)return L.value;if(!A.global)return m(A,N);var M=A.unicode;A.lastIndex=0;for(var F=[],H=0,P;(P=m(A,N))!==null;){var V=S(P[0]);F[H]=V,V===""&&(A.lastIndex=h(N,y(A.lastIndex),M)),H++}return H===0?null:F}]})},{"../internals/advance-string-index":99,"../internals/an-object":101,"../internals/fix-regexp-well-known-symbol-logic":151,"../internals/function-call":155,"../internals/get-method":161,"../internals/regexp-exec-abstract":223,"../internals/require-object-coercible":230,"../internals/to-length":249,"../internals/to-string":256}],305:[function(s,E,I){"use strict";var u=s("../internals/function-apply"),d=s("../internals/function-call"),g=s("../internals/function-uncurry-this"),y=s("../internals/fix-regexp-well-known-symbol-logic"),S=s("../internals/fails"),v=s("../internals/an-object"),c=s("../internals/is-callable"),h=s("../internals/to-integer-or-infinity"),m=s("../internals/to-length"),x=s("../internals/to-string"),T=s("../internals/require-object-coercible"),_=s("../internals/advance-string-index"),R=s("../internals/get-method"),A=s("../internals/get-substitution"),N=s("../internals/regexp-exec-abstract"),L=s("../internals/well-known-symbol"),M=L("replace"),F=Math.max,H=Math.min,P=g([].concat),V=g([].push),G=g("".indexOf),Q=g("".slice),ne=function(ce){return ce===void 0?ce:String(ce)},ue=function(){return"a".replace(/./,"$0")==="$0"}(),ae=function(){return/./[M]?/./[M]("a","$0")==="":!1}(),he=!S(function(){var ce=/./;return ce.exec=function(){var we=[];return we.groups={a:"7"},we},"".replace(ce,"$")!=="7"});y("replace",function(ce,we,me){var Le=ae?"$":"$0";return[function(se,le){var ke=T(this),De=se==null?void 0:R(se,M);return De?d(De,se,ke,le):d(we,x(ke),se,le)},function(ee,se){var le=v(this),ke=x(ee);if(typeof se=="string"&&G(se,Le)===-1&&G(se,"$<")===-1){var De=me(we,le,ke,se);if(De.done)return De.value}var Be=c(se);Be||(se=x(se));var He=le.global;if(He){var Fe=le.unicode;le.lastIndex=0}for(var Je=[];;){var Me=N(le,ke);if(Me===null||(V(Je,Me),!He))break;var lt=x(Me[0]);lt===""&&(le.lastIndex=_(ke,m(le.lastIndex),Fe))}for(var Re="",Oe=0,pe=0;pe=Oe&&(Re+=Q(ke,Oe,z)+ie,Oe=z+fe.length)}return Re+Q(ke,Oe)}]},!he||!ue||ae)},{"../internals/advance-string-index":99,"../internals/an-object":101,"../internals/fails":150,"../internals/fix-regexp-well-known-symbol-logic":151,"../internals/function-apply":152,"../internals/function-call":155,"../internals/function-uncurry-this":157,"../internals/get-method":161,"../internals/get-substitution":162,"../internals/is-callable":176,"../internals/regexp-exec-abstract":223,"../internals/require-object-coercible":230,"../internals/to-integer-or-infinity":248,"../internals/to-length":249,"../internals/to-string":256,"../internals/well-known-symbol":268}],306:[function(s,E,I){"use strict";var u=s("../internals/function-call"),d=s("../internals/fix-regexp-well-known-symbol-logic"),g=s("../internals/an-object"),y=s("../internals/require-object-coercible"),S=s("../internals/same-value"),v=s("../internals/to-string"),c=s("../internals/get-method"),h=s("../internals/regexp-exec-abstract");d("search",function(m,x,T){return[function(R){var A=y(this),N=R==null?void 0:c(R,m);return N?u(N,R,A):new RegExp(R)[m](v(A))},function(_){var R=g(this),A=v(_),N=T(x,R,A);if(N.done)return N.value;var L=R.lastIndex;S(L,0)||(R.lastIndex=0);var M=h(R,A);return S(R.lastIndex,L)||(R.lastIndex=L),M===null?-1:M.index}]})},{"../internals/an-object":101,"../internals/fix-regexp-well-known-symbol-logic":151,"../internals/function-call":155,"../internals/get-method":161,"../internals/regexp-exec-abstract":223,"../internals/require-object-coercible":230,"../internals/same-value":231,"../internals/to-string":256}],307:[function(s,E,I){"use strict";var u=s("../internals/function-apply"),d=s("../internals/function-call"),g=s("../internals/function-uncurry-this"),y=s("../internals/fix-regexp-well-known-symbol-logic"),S=s("../internals/is-regexp"),v=s("../internals/an-object"),c=s("../internals/require-object-coercible"),h=s("../internals/species-constructor"),m=s("../internals/advance-string-index"),x=s("../internals/to-length"),T=s("../internals/to-string"),_=s("../internals/get-method"),R=s("../internals/array-slice-simple"),A=s("../internals/regexp-exec-abstract"),N=s("../internals/regexp-exec"),L=s("../internals/regexp-sticky-helpers"),M=s("../internals/fails"),F=L.UNSUPPORTED_Y,H=4294967295,P=Math.min,V=[].push,G=g(/./.exec),Q=g(V),ne=g("".slice),ue=!M(function(){var ae=/(?:)/,he=ae.exec;ae.exec=function(){return he.apply(this,arguments)};var ce="ab".split(ae);return ce.length!==2||ce[0]!=="a"||ce[1]!=="b"});y("split",function(ae,he,ce){var we;return"abbc".split(/(b)*/)[1]=="c"||"test".split(/(?:)/,-1).length!=4||"ab".split(/(?:ab)*/).length!=2||".".split(/(.?)(.?)/).length!=4||".".split(/()()/).length>1||"".split(/.?/).length?we=function(me,Le){var ee=T(c(this)),se=Le===void 0?H:Le>>>0;if(se===0)return[];if(me===void 0)return[ee];if(!S(me))return d(he,ee,me,se);for(var le=[],ke=(me.ignoreCase?"i":"")+(me.multiline?"m":"")+(me.unicode?"u":"")+(me.sticky?"y":""),De=0,Be=new RegExp(me.source,ke+"g"),He,Fe,Je;(He=d(N,Be,ee))&&(Fe=Be.lastIndex,!(Fe>De&&(Q(le,ne(ee,De,He.index)),He.length>1&&He.index=se)));)Be.lastIndex===He.index&&Be.lastIndex++;return De===ee.length?(Je||!G(Be,""))&&Q(le,""):Q(le,ne(ee,De)),le.length>se?R(le,0,se):le}:"0".split(void 0,0).length?we=function(me,Le){return me===void 0&&Le===0?[]:d(he,this,me,Le)}:we=he,[function(Le,ee){var se=c(this),le=Le==null?void 0:_(Le,ae);return le?d(le,Le,se,ee):d(we,T(se),Le,ee)},function(me,Le){var ee=v(this),se=T(me),le=ce(we,ee,se,Le,we!==he);if(le.done)return le.value;var ke=h(ee,RegExp),De=ee.unicode,Be=(ee.ignoreCase?"i":"")+(ee.multiline?"m":"")+(ee.unicode?"u":"")+(F?"g":"y"),He=new ke(F?"^(?:"+ee.source+")":ee,Be),Fe=Le===void 0?H:Le>>>0;if(Fe===0)return[];if(se.length===0)return A(He,se)===null?[se]:[];for(var Je=0,Me=0,lt=[];Me2?arguments[2]:void 0)})},{"../internals/array-buffer-view-core":103,"../internals/array-copy-within":105,"../internals/function-uncurry-this":157}],316:[function(s,E,I){"use strict";var u=s("../internals/array-buffer-view-core"),d=s("../internals/array-iteration").every,g=u.aTypedArray,y=u.exportTypedArrayMethod;y("every",function(v){return d(g(this),v,arguments.length>1?arguments[1]:void 0)})},{"../internals/array-buffer-view-core":103,"../internals/array-iteration":111}],317:[function(s,E,I){"use strict";var u=s("../internals/array-buffer-view-core"),d=s("../internals/function-call"),g=s("../internals/array-fill"),y=u.aTypedArray,S=u.exportTypedArrayMethod;S("fill",function(c){var h=arguments.length;return d(g,y(this),c,h>1?arguments[1]:void 0,h>2?arguments[2]:void 0)})},{"../internals/array-buffer-view-core":103,"../internals/array-fill":106,"../internals/function-call":155}],318:[function(s,E,I){"use strict";var u=s("../internals/array-buffer-view-core"),d=s("../internals/array-iteration").filter,g=s("../internals/typed-array-from-species-and-list"),y=u.aTypedArray,S=u.exportTypedArrayMethod;S("filter",function(c){var h=d(y(this),c,arguments.length>1?arguments[1]:void 0);return g(this,h)})},{"../internals/array-buffer-view-core":103,"../internals/array-iteration":111,"../internals/typed-array-from-species-and-list":260}],319:[function(s,E,I){"use strict";var u=s("../internals/array-buffer-view-core"),d=s("../internals/array-iteration").findIndex,g=u.aTypedArray,y=u.exportTypedArrayMethod;y("findIndex",function(v){return d(g(this),v,arguments.length>1?arguments[1]:void 0)})},{"../internals/array-buffer-view-core":103,"../internals/array-iteration":111}],320:[function(s,E,I){"use strict";var u=s("../internals/array-buffer-view-core"),d=s("../internals/array-iteration").find,g=u.aTypedArray,y=u.exportTypedArrayMethod;y("find",function(v){return d(g(this),v,arguments.length>1?arguments[1]:void 0)})},{"../internals/array-buffer-view-core":103,"../internals/array-iteration":111}],321:[function(s,E,I){"use strict";var u=s("../internals/array-buffer-view-core"),d=s("../internals/array-iteration").forEach,g=u.aTypedArray,y=u.exportTypedArrayMethod;y("forEach",function(v){d(g(this),v,arguments.length>1?arguments[1]:void 0)})},{"../internals/array-buffer-view-core":103,"../internals/array-iteration":111}],322:[function(s,E,I){"use strict";var u=s("../internals/array-buffer-view-core"),d=s("../internals/array-includes").includes,g=u.aTypedArray,y=u.exportTypedArrayMethod;y("includes",function(v){return d(g(this),v,arguments.length>1?arguments[1]:void 0)})},{"../internals/array-buffer-view-core":103,"../internals/array-includes":110}],323:[function(s,E,I){"use strict";var u=s("../internals/array-buffer-view-core"),d=s("../internals/array-includes").indexOf,g=u.aTypedArray,y=u.exportTypedArrayMethod;y("indexOf",function(v){return d(g(this),v,arguments.length>1?arguments[1]:void 0)})},{"../internals/array-buffer-view-core":103,"../internals/array-includes":110}],324:[function(s,E,I){"use strict";var u=s("../internals/global"),d=s("../internals/fails"),g=s("../internals/function-uncurry-this"),y=s("../internals/array-buffer-view-core"),S=s("../modules/es.array.iterator"),v=s("../internals/well-known-symbol"),c=v("iterator"),h=u.Uint8Array,m=g(S.values),x=g(S.keys),T=g(S.entries),_=y.aTypedArray,R=y.exportTypedArrayMethod,A=h&&h.prototype,N=!d(function(){A[c].call([1])}),L=!!A&&A.values&&A[c]===A.values&&A.values.name==="values",M=function(){return m(_(this))};R("entries",function(){return T(_(this))},N),R("keys",function(){return x(_(this))},N),R("values",M,N||!L,{name:"values"}),R(c,M,N||!L,{name:"values"})},{"../internals/array-buffer-view-core":103,"../internals/fails":150,"../internals/function-uncurry-this":157,"../internals/global":163,"../internals/well-known-symbol":268,"../modules/es.array.iterator":278}],325:[function(s,E,I){"use strict";var u=s("../internals/array-buffer-view-core"),d=s("../internals/function-uncurry-this"),g=u.aTypedArray,y=u.exportTypedArrayMethod,S=d([].join);y("join",function(c){return S(g(this),c)})},{"../internals/array-buffer-view-core":103,"../internals/function-uncurry-this":157}],326:[function(s,E,I){"use strict";var u=s("../internals/array-buffer-view-core"),d=s("../internals/function-apply"),g=s("../internals/array-last-index-of"),y=u.aTypedArray,S=u.exportTypedArrayMethod;S("lastIndexOf",function(c){var h=arguments.length;return d(g,y(this),h>1?[c,arguments[1]]:[c])})},{"../internals/array-buffer-view-core":103,"../internals/array-last-index-of":112,"../internals/function-apply":152}],327:[function(s,E,I){"use strict";var u=s("../internals/array-buffer-view-core"),d=s("../internals/array-iteration").map,g=s("../internals/typed-array-species-constructor"),y=u.aTypedArray,S=u.exportTypedArrayMethod;S("map",function(c){return d(y(this),c,arguments.length>1?arguments[1]:void 0,function(h,m){return new(g(h))(m)})})},{"../internals/array-buffer-view-core":103,"../internals/array-iteration":111,"../internals/typed-array-species-constructor":262}],328:[function(s,E,I){"use strict";var u=s("../internals/array-buffer-view-core"),d=s("../internals/array-reduce").right,g=u.aTypedArray,y=u.exportTypedArrayMethod;y("reduceRight",function(v){var c=arguments.length;return d(g(this),v,c,c>1?arguments[1]:void 0)})},{"../internals/array-buffer-view-core":103,"../internals/array-reduce":115}],329:[function(s,E,I){"use strict";var u=s("../internals/array-buffer-view-core"),d=s("../internals/array-reduce").left,g=u.aTypedArray,y=u.exportTypedArrayMethod;y("reduce",function(v){var c=arguments.length;return d(g(this),v,c,c>1?arguments[1]:void 0)})},{"../internals/array-buffer-view-core":103,"../internals/array-reduce":115}],330:[function(s,E,I){"use strict";var u=s("../internals/array-buffer-view-core"),d=u.aTypedArray,g=u.exportTypedArrayMethod,y=Math.floor;g("reverse",function(){for(var v=this,c=d(v).length,h=y(c/2),m=0,x;m1?arguments[1]:void 0,1),H=v(M);if(A)return d(T,this,H,F);var P=this.length,V=y(H),G=0;if(V+F>P)throw h("Wrong length");for(;GR;)N[R]=T[R++];return N},c)},{"../internals/array-buffer-view-core":103,"../internals/array-slice":117,"../internals/fails":150,"../internals/typed-array-species-constructor":262}],333:[function(s,E,I){"use strict";var u=s("../internals/array-buffer-view-core"),d=s("../internals/array-iteration").some,g=u.aTypedArray,y=u.exportTypedArrayMethod;y("some",function(v){return d(g(this),v,arguments.length>1?arguments[1]:void 0)})},{"../internals/array-buffer-view-core":103,"../internals/array-iteration":111}],334:[function(s,E,I){"use strict";var u=s("../internals/global"),d=s("../internals/function-uncurry-this"),g=s("../internals/fails"),y=s("../internals/a-callable"),S=s("../internals/array-sort"),v=s("../internals/array-buffer-view-core"),c=s("../internals/engine-ff-version"),h=s("../internals/engine-is-ie-or-edge"),m=s("../internals/engine-v8-version"),x=s("../internals/engine-webkit-version"),T=v.aTypedArray,_=v.exportTypedArrayMethod,R=u.Uint16Array,A=R&&d(R.prototype.sort),N=!!A&&!(g(function(){A(new R(2),null)})&&g(function(){A(new R(2),{})})),L=!!A&&!g(function(){if(m)return m<74;if(c)return c<67;if(h)return!0;if(x)return x<602;var F=new R(516),H=Array(516),P,V;for(P=0;P<516;P++)V=P%4,F[P]=515-P,H[P]=P-2*V+3;for(A(F,function(G,Q){return(G/4|0)-(Q/4|0)}),P=0;P<516;P++)if(F[P]!==H[P])return!0}),M=function(F){return function(H,P){return F!==void 0?+F(H,P)||0:P!==P?-1:H!==H?1:H===0&&P===0?1/H>0&&1/P<0?1:-1:H>P}};_("sort",function(H){return H!==void 0&&y(H),L?A(this,H):S(T(this),M(H))},!L||N)},{"../internals/a-callable":95,"../internals/array-buffer-view-core":103,"../internals/array-sort":118,"../internals/engine-ff-version":138,"../internals/engine-is-ie-or-edge":140,"../internals/engine-v8-version":146,"../internals/engine-webkit-version":147,"../internals/fails":150,"../internals/function-uncurry-this":157,"../internals/global":163}],335:[function(s,E,I){"use strict";var u=s("../internals/array-buffer-view-core"),d=s("../internals/to-length"),g=s("../internals/to-absolute-index"),y=s("../internals/typed-array-species-constructor"),S=u.aTypedArray,v=u.exportTypedArrayMethod;v("subarray",function(h,m){var x=S(this),T=x.length,_=g(h,T),R=y(x);return new R(x.buffer,x.byteOffset+_*x.BYTES_PER_ELEMENT,d((m===void 0?T:g(m,T))-_))})},{"../internals/array-buffer-view-core":103,"../internals/to-absolute-index":245,"../internals/to-length":249,"../internals/typed-array-species-constructor":262}],336:[function(s,E,I){"use strict";var u=s("../internals/global"),d=s("../internals/function-apply"),g=s("../internals/array-buffer-view-core"),y=s("../internals/fails"),S=s("../internals/array-slice"),v=u.Int8Array,c=g.aTypedArray,h=g.exportTypedArrayMethod,m=[].toLocaleString,x=!!v&&y(function(){m.call(new v(1))}),T=y(function(){return[1,2].toLocaleString()!=new v([1,2]).toLocaleString()})||!y(function(){v.prototype.toLocaleString.call([1,2])});h("toLocaleString",function(){return d(m,x?S(c(this)):c(this),S(arguments))},T)},{"../internals/array-buffer-view-core":103,"../internals/array-slice":117,"../internals/fails":150,"../internals/function-apply":152,"../internals/global":163}],337:[function(s,E,I){"use strict";var u=s("../internals/array-buffer-view-core").exportTypedArrayMethod,d=s("../internals/fails"),g=s("../internals/global"),y=s("../internals/function-uncurry-this"),S=g.Uint8Array,v=S&&S.prototype||{},c=[].toString,h=y([].join);d(function(){c.call({})})&&(c=function(){return h(this)});var m=v.toString!=c;u("toString",c,m)},{"../internals/array-buffer-view-core":103,"../internals/fails":150,"../internals/function-uncurry-this":157,"../internals/global":163}],338:[function(s,E,I){var u=s("../internals/typed-array-constructor");u("Uint8",function(d){return function(y,S,v){return d(this,y,S,v)}})},{"../internals/typed-array-constructor":258}],339:[function(s,E,I){var u=s("../internals/global"),d=s("../internals/dom-iterables"),g=s("../internals/dom-token-list-prototype"),y=s("../internals/array-for-each"),S=s("../internals/create-non-enumerable-property"),v=function(h){if(h&&h.forEach!==y)try{S(h,"forEach",y)}catch(m){h.forEach=y}};for(var c in d)d[c]&&v(u[c]&&u[c].prototype);v(g)},{"../internals/array-for-each":107,"../internals/create-non-enumerable-property":129,"../internals/dom-iterables":136,"../internals/dom-token-list-prototype":137,"../internals/global":163}],340:[function(s,E,I){var u=s("../internals/global"),d=s("../internals/dom-iterables"),g=s("../internals/dom-token-list-prototype"),y=s("../modules/es.array.iterator"),S=s("../internals/create-non-enumerable-property"),v=s("../internals/well-known-symbol"),c=v("iterator"),h=v("toStringTag"),m=y.values,x=function(_,R){if(_){if(_[c]!==m)try{S(_,c,m)}catch(N){_[c]=m}if(_[h]||S(_,h,R),d[R]){for(var A in y)if(_[A]!==y[A])try{S(_,A,y[A])}catch(N){_[A]=y[A]}}}};for(var T in d)x(u[T]&&u[T].prototype,T);x(g,"DOMTokenList")},{"../internals/create-non-enumerable-property":129,"../internals/dom-iterables":136,"../internals/dom-token-list-prototype":137,"../internals/global":163,"../internals/well-known-symbol":268,"../modules/es.array.iterator":278}],341:[function(s,E,I){function u(L){return Array.isArray?Array.isArray(L):N(L)==="[object Array]"}I.isArray=u;function d(L){return typeof L=="boolean"}I.isBoolean=d;function g(L){return L===null}I.isNull=g;function y(L){return L==null}I.isNullOrUndefined=y;function S(L){return typeof L=="number"}I.isNumber=S;function v(L){return typeof L=="string"}I.isString=v;function c(L){return typeof L=="symbol"}I.isSymbol=c;function h(L){return L===void 0}I.isUndefined=h;function m(L){return N(L)==="[object RegExp]"}I.isRegExp=m;function x(L){return typeof L=="object"&&L!==null}I.isObject=x;function T(L){return N(L)==="[object Date]"}I.isDate=T;function _(L){return N(L)==="[object Error]"||L instanceof Error}I.isError=_;function R(L){return typeof L=="function"}I.isFunction=R;function A(L){return L===null||typeof L=="boolean"||typeof L=="number"||typeof L=="string"||typeof L=="symbol"||typeof L=="undefined"}I.isPrimitive=A,I.isBuffer=s("buffer").Buffer.isBuffer;function N(L){return Object.prototype.toString.call(L)}},{buffer:90}],342:[function(s,E,I){(function(u){"use strict";var d=function(){var c=/d{1,4}|m{1,4}|yy(?:yy)?|([HhMsTt])\1?|[LloSZWN]|'[^']*'|'[^']*'/g,h=/\b(?:[PMCEA][SDP]T|(?:Pacific|Mountain|Central|Eastern|Atlantic) (?:Standard|Daylight|Prevailing) Time|(?:GMT|UTC)(?:[-+]\d{4})?)\b/g,m=/[^-+\dA-Z]/g;return function(x,T,_,R){if(arguments.length===1&&v(x)==="string"&&!/\d/.test(x)&&(T=x,x=void 0),x=x||new Date,x instanceof Date||(x=new Date(x)),isNaN(x))throw TypeError("Invalid date");T=String(d.masks[T]||T||d.masks.default);var A=T.slice(0,4);(A==="UTC:"||A==="GMT:")&&(T=T.slice(4),_=!0,A==="GMT:"&&(R=!0));var N=_?"getUTC":"get",L=x[N+"Date"](),M=x[N+"Day"](),F=x[N+"Month"](),H=x[N+"FullYear"](),P=x[N+"Hours"](),V=x[N+"Minutes"](),G=x[N+"Seconds"](),Q=x[N+"Milliseconds"](),ne=_?0:x.getTimezoneOffset(),ue=y(x),ae=S(x),he={d:L,dd:g(L),ddd:d.i18n.dayNames[M],dddd:d.i18n.dayNames[M+7],m:F+1,mm:g(F+1),mmm:d.i18n.monthNames[F],mmmm:d.i18n.monthNames[F+12],yy:String(H).slice(2),yyyy:H,h:P%12||12,hh:g(P%12||12),H:P,HH:g(P),M:V,MM:g(V),s:G,ss:g(G),l:g(Q,3),L:g(Math.round(Q/10)),t:P<12?"a":"p",tt:P<12?"am":"pm",T:P<12?"A":"P",TT:P<12?"AM":"PM",Z:R?"GMT":_?"UTC":(String(x).match(h)||[""]).pop().replace(m,""),o:(ne>0?"-":"+")+g(Math.floor(Math.abs(ne)/60)*100+Math.abs(ne)%60,4),S:["th","st","nd","rd"][L%10>3?0:(L%100-L%10!=10)*L%10],W:ue,N:ae};return T.replace(c,function(ce){return ce in he?he[ce]:ce.slice(1,ce.length-1)})}}();d.masks={default:"ddd mmm dd yyyy HH:MM:ss",shortDate:"m/d/yy",mediumDate:"mmm d, yyyy",longDate:"mmmm d, yyyy",fullDate:"dddd, mmmm d, yyyy",shortTime:"h:MM TT",mediumTime:"h:MM:ss TT",longTime:"h:MM:ss TT Z",isoDate:"yyyy-mm-dd",isoTime:"HH:MM:ss",isoDateTime:"yyyy-mm-dd'T'HH:MM:sso",isoUtcDateTime:"UTC:yyyy-mm-dd'T'HH:MM:ss'Z'",expiresHeaderFormat:"ddd, dd mmm yyyy HH:MM:ss Z"},d.i18n={dayNames:["Sun","Mon","Tue","Wed","Thu","Fri","Sat","Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],monthNames:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec","January","February","March","April","May","June","July","August","September","October","November","December"]};function g(c,h){for(c=String(c),h=h||2;c.length]/;E.exports=d;function d(g){var y=""+g,S=u.exec(y);if(!S)return y;var v,c="",h=0,m=0;for(h=S.index;h0&&(he=Q[0]),he instanceof Error)throw he;var ce=new Error("Unhandled error."+(he?" ("+he.message+")":""));throw ce.context=he,ce}var we=ae[G];if(we===void 0)return!1;if(typeof we=="function")d(we,this,Q);else for(var me=we.length,Le=N(we,me),ne=0;ne0&&he.length>ue&&!he.warned){he.warned=!0;var ce=new Error("Possible EventEmitter memory leak detected. "+he.length+" "+String(G)+" listeners added. Use emitter.setMaxListeners() to increase limit");ce.name="MaxListenersExceededWarning",ce.emitter=V,ce.type=G,ce.count=he.length,y(ce)}return V}v.prototype.addListener=function(G,Q){return x(this,G,Q,!1)},v.prototype.on=v.prototype.addListener,v.prototype.prependListener=function(G,Q){return x(this,G,Q,!0)};function T(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,arguments.length===0?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function _(V,G,Q){var ne={fired:!1,wrapFn:void 0,target:V,type:G,listener:Q},ue=T.bind(ne);return ue.listener=Q,ne.wrapFn=ue,ue}v.prototype.once=function(G,Q){return h(Q),this.on(G,_(this,G,Q)),this},v.prototype.prependOnceListener=function(G,Q){return h(Q),this.prependListener(G,_(this,G,Q)),this},v.prototype.removeListener=function(G,Q){var ne,ue,ae,he,ce;if(h(Q),ue=this._events,ue===void 0)return this;if(ne=ue[G],ne===void 0)return this;if(ne===Q||ne.listener===Q)--this._eventsCount===0?this._events=Object.create(null):(delete ue[G],ue.removeListener&&this.emit("removeListener",G,ne.listener||Q));else if(typeof ne!="function"){for(ae=-1,he=ne.length-1;he>=0;he--)if(ne[he]===Q||ne[he].listener===Q){ce=ne[he].listener,ae=he;break}if(ae<0)return this;ae===0?ne.shift():L(ne,ae),ne.length===1&&(ue[G]=ne[0]),ue.removeListener!==void 0&&this.emit("removeListener",G,ce||Q)}return this},v.prototype.off=v.prototype.removeListener,v.prototype.removeAllListeners=function(G){var Q,ne,ue;if(ne=this._events,ne===void 0)return this;if(ne.removeListener===void 0)return arguments.length===0?(this._events=Object.create(null),this._eventsCount=0):ne[G]!==void 0&&(--this._eventsCount===0?this._events=Object.create(null):delete ne[G]),this;if(arguments.length===0){var ae=Object.keys(ne),he;for(ue=0;ue=0;ue--)this.removeListener(G,Q[ue]);return this};function R(V,G,Q){var ne=V._events;if(ne===void 0)return[];var ue=ne[G];return ue===void 0?[]:typeof ue=="function"?Q?[ue.listener||ue]:[ue]:Q?M(ue):N(ue,ue.length)}v.prototype.listeners=function(G){return R(this,G,!0)},v.prototype.rawListeners=function(G){return R(this,G,!1)},v.listenerCount=function(V,G){return typeof V.listenerCount=="function"?V.listenerCount(G):A.call(V,G)},v.prototype.listenerCount=A;function A(V){var G=this._events;if(G!==void 0){var Q=G[V];if(typeof Q=="function")return 1;if(Q!==void 0)return Q.length}return 0}v.prototype.eventNames=function(){return this._eventsCount>0?g(this._events):[]};function N(V,G){for(var Q=new Array(G),ne=0;ne=3&&(_=T),d.call(m)==="[object Array]"?y(m,x,_):typeof m=="string"?S(m,x,_):v(m,x,_)};E.exports=c},{"is-callable":367}],346:[function(s,E,I){"use strict";var u="Function.prototype.bind called on incompatible ",d=Array.prototype.slice,g=Object.prototype.toString,y="[object Function]";E.exports=function(v){var c=this;if(typeof c!="function"||g.call(c)!==y)throw new TypeError(u+c);for(var h=d.call(arguments,1),m,x=function(){if(this instanceof m){var N=c.apply(this,h.concat(d.call(arguments)));return Object(N)===N?N:this}else return c.apply(v,h.concat(d.call(arguments)))},T=Math.max(0,c.length-h.length),_=[],R=0;R1&&typeof Le!="boolean")throw new y('"allowMissing" argument must be a boolean');if(ne(/^%?[^%]*%?$/,me)===null)throw new d("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var ee=he(me),se=ee.length>0?ee[0]:"",le=ce("%"+se+"%",Le),ke=le.name,De=le.value,Be=!1,He=le.alias;He&&(se=He[0],V(ee,P([0,1],He)));for(var Fe=1,Je=!0;Fe=ee.length){var Oe=v(De,Me);Je=!!Oe,Je&&"get"in Oe&&!("originalValue"in Oe.get)?De=Oe.get:De=De[Me]}else Je=H(De,Me),De=De[Me];Je&&!Be&&(A[ke]=De)}}return De}},{"function-bind":347,has:354,"has-proto":350,"has-symbols":351}],349:[function(s,E,I){"use strict";var u=s("get-intrinsic"),d=u("%Object.getOwnPropertyDescriptor%",!0);if(d)try{d([],"length")}catch(g){d=null}E.exports=d},{"get-intrinsic":348}],350:[function(s,E,I){"use strict";var u={foo:{}},d=Object;E.exports=function(){return{__proto__:u}.foo===u.foo&&!({__proto__:null}instanceof d)}},{}],351:[function(s,E,I){"use strict";var u=typeof Symbol!="undefined"&&Symbol,d=s("./shams");E.exports=function(){return typeof u!="function"||typeof Symbol!="function"||typeof u("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:d()}},{"./shams":352}],352:[function(s,E,I){"use strict";E.exports=function(){if(typeof Symbol!="function"||typeof Object.getOwnPropertySymbols!="function")return!1;if(typeof Symbol.iterator=="symbol")return!0;var d={},g=Symbol("test"),y=Object(g);if(typeof g=="string"||Object.prototype.toString.call(g)!=="[object Symbol]"||Object.prototype.toString.call(y)!=="[object Symbol]")return!1;var S=42;d[g]=S;for(g in d)return!1;if(typeof Object.keys=="function"&&Object.keys(d).length!==0||typeof Object.getOwnPropertyNames=="function"&&Object.getOwnPropertyNames(d).length!==0)return!1;var v=Object.getOwnPropertySymbols(d);if(v.length!==1||v[0]!==g||!Object.prototype.propertyIsEnumerable.call(d,g))return!1;if(typeof Object.getOwnPropertyDescriptor=="function"){var c=Object.getOwnPropertyDescriptor(d,g);if(c.value!==S||c.enumerable!==!0)return!1}return!0}},{}],353:[function(s,E,I){"use strict";var u=s("has-symbols/shams");E.exports=function(){return u()&&!!Symbol.toStringTag}},{"has-symbols/shams":352}],354:[function(s,E,I){"use strict";var u=s("function-bind");E.exports=u.call(Function.call,Object.prototype.hasOwnProperty)},{"function-bind":347}],355:[function(s,E,I){var u=s("http"),d=s("url"),g=E.exports;for(var y in u)u.hasOwnProperty(y)&&(g[y]=u[y]);g.request=function(v,c){return v=S(v),u.request.call(this,v,c)},g.get=function(v,c){return v=S(v),u.get.call(this,v,c)};function S(v){if(typeof v=="string"&&(v=d.parse(v)),v.protocol||(v.protocol="https:"),v.protocol!=="https:")throw new Error('Protocol "'+v.protocol+'" not supported. Expected "https:"');return v}},{http:468,url:472}],356:[function(s,E,I){"use strict";var u=s("util"),d=s("ms");E.exports=function(g){if(typeof g=="number")return g;var y=d(g);if(y===void 0){var S=new Error(u.format("humanize-ms(%j) result undefined",g));console.warn(S.stack)}return y}},{ms:376,util:419}],357:[function(s,E,I){I.read=function(u,d,g,y,S){var v,c,h=S*8-y-1,m=(1<>1,T=-7,_=g?S-1:0,R=g?-1:1,A=u[d+_];for(_+=R,v=A&(1<<-T)-1,A>>=-T,T+=h;T>0;v=v*256+u[d+_],_+=R,T-=8);for(c=v&(1<<-T)-1,v>>=-T,T+=y;T>0;c=c*256+u[d+_],_+=R,T-=8);if(v===0)v=1-x;else{if(v===m)return c?NaN:(A?-1:1)*(1/0);c=c+Math.pow(2,y),v=v-x}return(A?-1:1)*c*Math.pow(2,v-y)},I.write=function(u,d,g,y,S,v){var c,h,m,x=v*8-S-1,T=(1<>1,R=S===23?Math.pow(2,-24)-Math.pow(2,-77):0,A=y?0:v-1,N=y?1:-1,L=d<0||d===0&&1/d<0?1:0;for(d=Math.abs(d),isNaN(d)||d===1/0?(h=isNaN(d)?1:0,c=T):(c=Math.floor(Math.log(d)/Math.LN2),d*(m=Math.pow(2,-c))<1&&(c--,m*=2),c+_>=1?d+=R/m:d+=R*Math.pow(2,1-_),d*m>=2&&(c++,m/=2),c+_>=T?(h=0,c=T):c+_>=1?(h=(d*m-1)*Math.pow(2,S),c=c+_):(h=d*Math.pow(2,_-1)*Math.pow(2,S),c=0));S>=8;u[g+A]=h&255,A+=N,h/=256,S-=8);for(c=c<0;u[g+A]=c&255,A+=N,c/=256,x-=8);u[g+A-N]|=L*128}},{}],358:[function(s,E,I){"use strict";var u=[s("./nextTick"),s("./queueMicrotask"),s("./mutation.js"),s("./messageChannel"),s("./stateChange"),s("./timeout")],d,g,y=-1,S=[],v=!1;function c(){!d||!g||(d=!1,g.length?S=g.concat(S):y=-1,S.length&&h())}function h(){if(!d){v=!1,d=!0;for(var A=S.length,N=setTimeout(c);A;){for(g=S,S=[];g&&++y1)for(var L=1;L=0&&g(h)!=="[object Array]"&&g(h.callee)==="[object Function]"},v=function(){return y(arguments)}();y.isLegacyArguments=S,E.exports=v?y:S},{"call-bind/callBound":92,"has-tostringtag/shams":353}],366:[function(s,E,I){E.exports=function(g){return g!=null&&(u(g)||d(g)||!!g._isBuffer)};function u(g){return!!g.constructor&&typeof g.constructor.isBuffer=="function"&&g.constructor.isBuffer(g)}function d(g){return typeof g.readFloatLE=="function"&&typeof g.slice=="function"&&u(g.slice(0,0))}},{}],367:[function(s,E,I){"use strict";var u=Function.prototype.toString,d=typeof Reflect=="object"&&Reflect!==null&&Reflect.apply,g,y;if(typeof d=="function"&&typeof Object.defineProperty=="function")try{g=Object.defineProperty({},"length",{get:function(){throw y}}),y={},d(function(){throw 42},null,g)}catch(H){H!==y&&(d=null)}else d=null;var S=/^\s*class\b/,v=function(P){try{var V=u.call(P);return S.test(V)}catch(G){return!1}},c=function(P){try{return v(P)?!1:(u.call(P),!0)}catch(V){return!1}},h=Object.prototype.toString,m="[object Object]",x="[object Function]",T="[object GeneratorFunction]",_="[object HTMLAllCollection]",R="[object HTML document.all class]",A="[object HTMLCollection]",N=typeof Symbol=="function"&&!!Symbol.toStringTag,L=!(0 in[,]),M=function(){return!1};if(typeof document=="object"){var F=document.all;h.call(F)===h.call(document.all)&&(M=function(P){if((L||!P)&&(typeof P=="undefined"||typeof P=="object"))try{var V=h.call(P);return(V===_||V===R||V===A||V===m)&&P("")==null}catch(G){}return!1})}E.exports=d?function(P){if(M(P))return!0;if(!P||typeof P!="function"&&typeof P!="object")return!1;try{d(P,null,g)}catch(V){if(V!==y)return!1}return!v(P)&&c(P)}:function(P){if(M(P))return!0;if(!P||typeof P!="function"&&typeof P!="object")return!1;if(N)return c(P);if(v(P))return!1;var V=h.call(P);return V!==x&&V!==T&&!/^\[object HTML/.test(V)?!1:c(P)}},{}],368:[function(s,E,I){"use strict";var u=Object.prototype.toString,d=Function.prototype.toString,g=/^\s*(?:function)?\*/,y=s("has-tostringtag/shams")(),S=Object.getPrototypeOf,v=function(){if(!y)return!1;try{return Function("return function*() {}")()}catch(h){}},c;E.exports=function(m){if(typeof m!="function")return!1;if(g.test(d.call(m)))return!0;if(!y){var x=u.call(m);return x==="[object GeneratorFunction]"}if(!S)return!1;if(typeof c=="undefined"){var T=v();c=T?S(T):!1}return S(m)===c}},{"has-tostringtag/shams":353}],369:[function(s,E,I){"use strict";var u=s("which-typed-array");E.exports=function(g){return!!u(g)}},{"which-typed-array":420}],370:[function(s,E,I){var u={}.toString;E.exports=Array.isArray||function(d){return u.call(d)=="[object Array]"}},{}],371:[function(s,E,I){(function(u){(function(){(function(d,g){typeof I=="object"&&typeof E!="undefined"?E.exports=g(d):typeof b=="function"&&b.amd?b(g):g(d)})(typeof self!="undefined"?self:typeof window!="undefined"?window:typeof u!="undefined"?u:this,function(d){"use strict";d=d||{};var g=d.Base64,y="2.6.4",S="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",v=function(me){for(var Le={},ee=0,se=me.length;ee>>6)+c(128|Le&63):c(224|Le>>>12&15)+c(128|Le>>>6&63)+c(128|Le&63)}else{var Le=65536+(me.charCodeAt(0)-55296)*1024+(me.charCodeAt(1)-56320);return c(240|Le>>>18&7)+c(128|Le>>>12&63)+c(128|Le>>>6&63)+c(128|Le&63)}},m=/[\uD800-\uDBFF][\uDC00-\uDFFFF]|[^\x00-\x7F]/g,x=function(me){return me.replace(m,h)},T=function(me){var Le=[0,2,1][me.length%3],ee=me.charCodeAt(0)<<16|(me.length>1?me.charCodeAt(1):0)<<8|(me.length>2?me.charCodeAt(2):0),se=[S.charAt(ee>>>18),S.charAt(ee>>>12&63),Le>=2?"=":S.charAt(ee>>>6&63),Le>=1?"=":S.charAt(ee&63)];return se.join("")},_=d.btoa&&typeof d.btoa=="function"?function(me){return d.btoa(me)}:function(me){if(me.match(/[^\x00-\xFF]/))throw new RangeError("The string contains invalid characters.");return me.replace(/[\s\S]{1,3}/g,T)},R=function(me){return _(x(String(me)))},A=function(me){return me.replace(/[+\/]/g,function(Le){return Le=="+"?"-":"_"}).replace(/=/g,"")},N=function(me,Le){return Le?A(R(me)):R(me)},L=function(me){return N(me,!0)},M;d.Uint8Array&&(M=function(me,Le){for(var ee="",se=0,le=me.length;se>>18)+S.charAt(He>>>12&63)+(typeof De!="undefined"?S.charAt(He>>>6&63):"=")+(typeof Be!="undefined"?S.charAt(He&63):"=")}return Le?A(ee):ee});var F=/[\xC0-\xDF][\x80-\xBF]|[\xE0-\xEF][\x80-\xBF]{2}|[\xF0-\xF7][\x80-\xBF]{3}/g,H=function(me){switch(me.length){case 4:var Le=(7&me.charCodeAt(0))<<18|(63&me.charCodeAt(1))<<12|(63&me.charCodeAt(2))<<6|63&me.charCodeAt(3),ee=Le-65536;return c((ee>>>10)+55296)+c((ee&1023)+56320);case 3:return c((15&me.charCodeAt(0))<<12|(63&me.charCodeAt(1))<<6|63&me.charCodeAt(2));default:return c((31&me.charCodeAt(0))<<6|63&me.charCodeAt(1))}},P=function(me){return me.replace(F,H)},V=function(me){var Le=me.length,ee=Le%4,se=(Le>0?v[me.charAt(0)]<<18:0)|(Le>1?v[me.charAt(1)]<<12:0)|(Le>2?v[me.charAt(2)]<<6:0)|(Le>3?v[me.charAt(3)]:0),le=[c(se>>>16),c(se>>>8&255),c(se&255)];return le.length-=[0,0,2,1][ee],le.join("")},G=d.atob&&typeof d.atob=="function"?function(me){return d.atob(me)}:function(me){return me.replace(/\S{1,4}/g,V)},Q=function(me){return G(String(me).replace(/[^A-Za-z0-9\+\/]/g,""))},ne=function(me){return P(G(me))},ue=function(me){return String(me).replace(/[-_]/g,function(Le){return Le=="-"?"+":"/"}).replace(/[^A-Za-z0-9\+\/]/g,"")},ae=function(me){return ne(ue(me))},he;d.Uint8Array&&(he=function(me){return Uint8Array.from(Q(ue(me)),function(Le){return Le.charCodeAt(0)})});var ce=function(){var me=d.Base64;return d.Base64=g,me};if(d.Base64={VERSION:y,atob:Q,btoa:_,fromBase64:ae,toBase64:N,utob:x,encode:N,encodeURI:L,btou:P,decode:ae,noConflict:ce,fromUint8Array:M,toUint8Array:he},typeof Object.defineProperty=="function"){var we=function(me){return{value:me,enumerable:!1,writable:!0,configurable:!0}};d.Base64.extendString=function(){Object.defineProperty(String.prototype,"fromBase64",we(function(){return ae(this)})),Object.defineProperty(String.prototype,"toBase64",we(function(me){return N(this,me)})),Object.defineProperty(String.prototype,"toBase64URI",we(function(){return N(this,!0)}))}}return d.Meteor&&(Base64=d.Base64),typeof E!="undefined"&&E.exports?E.exports.Base64=d.Base64:typeof b=="function"&&b.amd&&b([],function(){return d.Base64}),{Base64:d.Base64}})}).call(this)}).call(this,typeof Z!="undefined"?Z:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{}],372:[function(s,E,I){"use strict";E.exports=d;var u=Object.prototype.hasOwnProperty;function d(g,y,S){if(!g)throw new TypeError("argument dest is required");if(!y)throw new TypeError("argument src is required");return S===void 0&&(S=!0),Object.getOwnPropertyNames(y).forEach(function(c){if(!(!S&&u.call(g,c))){var h=Object.getOwnPropertyDescriptor(y,c);Object.defineProperty(g,c,h)}}),g}},{}],373:[function(s,E,I){"use strict";s("core-js/modules/es.array.map.js"),s("core-js/modules/es.regexp.exec.js"),s("core-js/modules/es.string.replace.js"),s("core-js/modules/es.regexp.constructor.js"),s("core-js/modules/es.regexp.to-string.js");function u(){this._types=Object.create(null),this._extensions=Object.create(null);for(var d=0;d0)return c(T);if(R==="number"&&isFinite(T))return _.long?m(T):h(T);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(T))};function c(T){if(T=String(T),!(T.length>100)){var _=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(T);if(_){var R=parseFloat(_[1]),A=(_[2]||"ms").toLowerCase();switch(A){case"years":case"year":case"yrs":case"yr":case"y":return R*v;case"weeks":case"week":case"w":return R*S;case"days":case"day":case"d":return R*y;case"hours":case"hour":case"hrs":case"hr":case"h":return R*g;case"minutes":case"minute":case"mins":case"min":case"m":return R*d;case"seconds":case"second":case"secs":case"sec":case"s":return R*u;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return R;default:return}}}}function h(T){var _=Math.abs(T);return _>=y?Math.round(T/y)+"d":_>=g?Math.round(T/g)+"h":_>=d?Math.round(T/d)+"m":_>=u?Math.round(T/u)+"s":T+"ms"}function m(T){var _=Math.abs(T);return _>=y?x(T,_,y,"day"):_>=g?x(T,_,g,"hour"):_>=d?x(T,_,d,"minute"):_>=u?x(T,_,u,"second"):T+" ms"}function x(T,_,R,A){var N=_>=R*1.5;return Math.round(T/R)+" "+A+(N?"s":"")}},{}],377:[function(s,E,I){"use strict";var u=Object.getOwnPropertySymbols,d=Object.prototype.hasOwnProperty,g=Object.prototype.propertyIsEnumerable;function y(v){if(v==null)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(v)}function S(){try{if(!Object.assign)return!1;var v=new String("abc");if(v[5]="de",Object.getOwnPropertyNames(v)[0]==="5")return!1;for(var c={},h=0;h<10;h++)c["_"+String.fromCharCode(h)]=h;var m=Object.getOwnPropertyNames(c).map(function(T){return c[T]});if(m.join("")!=="0123456789")return!1;var x={};return"abcdefghijklmnopqrst".split("").forEach(function(T){x[T]=T}),Object.keys(Object.assign({},x)).join("")==="abcdefghijklmnopqrst"}catch(T){return!1}}E.exports=S()?Object.assign:function(v,c){for(var h,m=y(v),x,T=1;T2){var A=h.lastIndexOf("/");if(A!==h.length-1){A===-1?(h="",m=0):(h=h.slice(0,A),m=h.length-1-h.lastIndexOf("/")),x=R,T=0;continue}}else if(h.length===2||h.length===1){h="",m=0,x=R,T=0;continue}}c&&(h.length>0?h+="/..":h="..",m=2)}else h.length>0?h+="/"+v.slice(x+1,R):h=v.slice(x+1,R),m=R-x-1;x=R,T=0}else _===46&&T!==-1?++T:T=-1}return h}function y(v,c){var h=c.dir||c.root,m=c.base||(c.name||"")+(c.ext||"");return h?h===c.root?h+m:h+v+m:m}var S={resolve:function(){for(var c="",h=!1,m,x=arguments.length-1;x>=-1&&!h;x--){var T;x>=0?T=arguments[x]:(m===void 0&&(m=u.cwd()),T=m),d(T),T.length!==0&&(c=T+"/"+c,h=T.charCodeAt(0)===47)}return c=g(c,!h),h?c.length>0?"/"+c:"/":c.length>0?c:"."},normalize:function(c){if(d(c),c.length===0)return".";var h=c.charCodeAt(0)===47,m=c.charCodeAt(c.length-1)===47;return c=g(c,!h),c.length===0&&!h&&(c="."),c.length>0&&m&&(c+="/"),h?"/"+c:c},isAbsolute:function(c){return d(c),c.length>0&&c.charCodeAt(0)===47},join:function(){if(arguments.length===0)return".";for(var c,h=0;h0&&(c===void 0?c=m:c+="/"+m)}return c===void 0?".":S.normalize(c)},relative:function(c,h){if(d(c),d(h),c===h||(c=S.resolve(c),h=S.resolve(h),c===h))return"";for(var m=1;mN){if(h.charCodeAt(_+M)===47)return h.slice(_+M+1);if(M===0)return h.slice(_+M)}else T>N&&(c.charCodeAt(m+M)===47?L=M:M===0&&(L=0));break}var F=c.charCodeAt(m+M),H=h.charCodeAt(_+M);if(F!==H)break;F===47&&(L=M)}var P="";for(M=m+L+1;M<=x;++M)(M===x||c.charCodeAt(M)===47)&&(P.length===0?P+="..":P+="/..");return P.length>0?P+h.slice(_+L):(_+=L,h.charCodeAt(_)===47&&++_,h.slice(_))},_makeLong:function(c){return c},dirname:function(c){if(d(c),c.length===0)return".";for(var h=c.charCodeAt(0),m=h===47,x=-1,T=!0,_=c.length-1;_>=1;--_)if(h=c.charCodeAt(_),h===47){if(!T){x=_;break}}else T=!1;return x===-1?m?"/":".":m&&x===1?"//":c.slice(0,x)},basename:function(c,h){if(h!==void 0&&typeof h!="string")throw new TypeError('"ext" argument must be a string');d(c);var m=0,x=-1,T=!0,_;if(h!==void 0&&h.length>0&&h.length<=c.length){if(h.length===c.length&&h===c)return"";var R=h.length-1,A=-1;for(_=c.length-1;_>=0;--_){var N=c.charCodeAt(_);if(N===47){if(!T){m=_+1;break}}else A===-1&&(T=!1,A=_+1),R>=0&&(N===h.charCodeAt(R)?--R===-1&&(x=_):(R=-1,x=A))}return m===x?x=A:x===-1&&(x=c.length),c.slice(m,x)}else{for(_=c.length-1;_>=0;--_)if(c.charCodeAt(_)===47){if(!T){m=_+1;break}}else x===-1&&(T=!1,x=_+1);return x===-1?"":c.slice(m,x)}},extname:function(c){d(c);for(var h=-1,m=0,x=-1,T=!0,_=0,R=c.length-1;R>=0;--R){var A=c.charCodeAt(R);if(A===47){if(!T){m=R+1;break}continue}x===-1&&(T=!1,x=R+1),A===46?h===-1?h=R:_!==1&&(_=1):h!==-1&&(_=-1)}return h===-1||x===-1||_===0||_===1&&h===x-1&&h===m+1?"":c.slice(h,x)},format:function(c){if(c===null||typeof c!="object")throw new TypeError('The "pathObject" argument must be of type Object. Received type '+typeof c);return y("/",c)},parse:function(c){d(c);var h={root:"",dir:"",base:"",ext:"",name:""};if(c.length===0)return h;var m=c.charCodeAt(0),x=m===47,T;x?(h.root="/",T=1):T=0;for(var _=-1,R=0,A=-1,N=!0,L=c.length-1,M=0;L>=T;--L){if(m=c.charCodeAt(L),m===47){if(!N){R=L+1;break}continue}A===-1&&(N=!1,A=L+1),m===46?_===-1?_=L:M!==1&&(M=1):_!==-1&&(M=-1)}return _===-1||A===-1||M===0||M===1&&_===A-1&&_===R+1?A!==-1&&(R===0&&x?h.base=h.name=c.slice(1,A):h.base=h.name=c.slice(R,A)):(R===0&&x?(h.name=c.slice(1,_),h.base=c.slice(1,A)):(h.name=c.slice(R,_),h.base=c.slice(R,A)),h.ext=c.slice(_,A)),R>0?h.dir=c.slice(0,R-1):x&&(h.dir="/"),h},sep:"/",delimiter:":",win32:null,posix:null};S.posix=S,E.exports=S}).call(this)}).call(this,s("_process"))},{_process:467}],379:[function(s,E,I){(function(u){(function(){(function(){"use strict";var d={function:!0,object:!0},g=d[typeof window]&&window||this,y=g,S=d[typeof I]&&I,v=d[typeof E]&&E&&!E.nodeType&&E,c=S&&v&&typeof u=="object"&&u;c&&(c.global===c||c.window===c||c.self===c)&&(g=c);var h=Math.pow(2,53)-1,m=/\bOpera/,x=this,T=Object.prototype,_=T.hasOwnProperty,R=T.toString;function A(ae){return ae=String(ae),ae.charAt(0).toUpperCase()+ae.slice(1)}function N(ae,he,ce){var we={"10.0":"10","6.4":"10 Technical Preview","6.3":"8.1","6.2":"8","6.1":"Server 2008 R2 / 7","6.0":"Server 2008 / Vista","5.2":"Server 2003 / XP 64-bit","5.1":"XP","5.01":"2000 SP1","5.0":"2000","4.0":"NT","4.90":"ME"};return he&&ce&&/^Win/i.test(ae)&&!/^Windows Phone /i.test(ae)&&(we=we[/[\d.]+$/.exec(ae)])&&(ae="Windows "+we),ae=String(ae),he&&ce&&(ae=ae.replace(RegExp(he,"i"),ce)),ae=M(ae.replace(/ ce$/i," CE").replace(/\bhpw/i,"web").replace(/\bMacintosh\b/,"Mac OS").replace(/_PowerPC\b/i," OS").replace(/\b(OS X) [^ \d]+/i,"$1").replace(/\bMac (OS X)\b/,"$1").replace(/\/(\d)/," $1").replace(/_/g,".").replace(/(?: BePC|[ .]*fc[ \d.]+)$/i,"").replace(/\bx86\.64\b/gi,"x86_64").replace(/\b(Windows Phone) OS\b/,"$1").replace(/\b(Chrome OS \w+) [\d.]+\b/,"$1").split(" on ")[0]),ae}function L(ae,he){var ce=-1,we=ae?ae.length:0;if(typeof we=="number"&&we>-1&&we<=h)for(;++ce3&&"WebKit"||/\bOpera\b/.test(ve)&&(/\bOPR\b/.test(ae)?"Blink":"Presto")||/\b(?:Midori|Nook|Safari)\b/i.test(ae)&&!/^(?:Trident|EdgeHTML)$/.test(ie)&&"WebKit"||!ie&&/\bMSIE\b/i.test(ae)&&(Ve=="Mac OS"?"Tasman":"Trident")||ie=="WebKit"&&/\bPlayStation\b(?! Vita\b)/i.test(ve)&&"NetFront")&&(ie=[pe]),ve=="IE"&&(pe=(/; *(?:XBLWP|ZuneWP)(\d+)/i.exec(ae)||0)[1])?(ve+=" Mobile",Ve="Windows Phone "+(/\+$/.test(pe)?pe:pe+".x"),z.unshift("desktop mode")):/\bWPDesktop\b/i.test(ae)?(ve="IE Mobile",Ve="Windows Phone 8.x",z.unshift("desktop mode"),_e||(_e=(/\brv:([\d.]+)/.exec(ae)||0)[1])):ve!="IE"&&ie=="Trident"&&(pe=/\brv:([\d.]+)/.exec(ae))&&(ve&&z.push("identifying as "+ve+(_e?" "+_e:"")),ve="IE",_e=pe[1]),be){if(P(he,"global"))if(He&&(pe=He.lang.System,fe=pe.getProperty("os.arch"),Ve=Ve||pe.getProperty("os.name")+" "+pe.getProperty("os.version")),Fe){try{_e=he.require("ringo/engine").version.join("."),ve="RingoJS"}catch(st){(pe=he.system)&&pe.global.system==he.system&&(ve="Narwhal",Ve||(Ve=pe[0].os||null))}ve||(ve="Rhino")}else typeof he.process=="object"&&!he.process.browser&&(pe=he.process)&&(typeof pe.versions=="object"&&(typeof pe.versions.electron=="string"?(z.push("Node "+pe.versions.node),ve="Electron",_e=pe.versions.electron):typeof pe.versions.nw=="string"&&(z.push("Chromium "+_e,"Node "+pe.versions.node),ve="NW.js",_e=pe.versions.nw)),ve||(ve="Node.js",fe=pe.arch,Ve=pe.platform,_e=/[\d.]+/.exec(pe.version),_e=_e?_e[0]:null));else H(pe=he.runtime)==le?(ve="Adobe AIR",Ve=pe.flash.system.Capabilities.os):H(pe=he.phantom)==Be?(ve="PhantomJS",_e=(pe=pe.version||null)&&pe.major+"."+pe.minor+"."+pe.patch):typeof lt.documentMode=="number"&&(pe=/\bTrident\/(\d+)/i.exec(ae))?(_e=[_e,lt.documentMode],(pe=+pe[1]+4)!=_e[1]&&(z.push("IE "+_e[1]+" mode"),ie&&(ie[1]=""),_e[1]=pe),_e=ve=="IE"?String(_e[1].toFixed(1)):_e[0]):typeof lt.documentMode=="number"&&/^(?:Chrome|Firefox)\b/.test(ve)&&(z.push("masking as "+ve+" "+_e),ve="IE",_e="11.0",ie=["Trident"],Ve="Windows");Ve=Ve&&M(Ve)}if(_e&&(pe=/(?:[ab]|dp|pre|[ab]\d+pre)(?:\d+\+?)?$/i.exec(_e)||/(?:alpha|beta)(?: ?\d)?/i.exec(ae+";"+(be&&we.appMinorVersion))||/\bMinefield\b/i.test(ae)&&"a")&&(J=/b/i.test(pe)?"beta":"alpha",_e=_e.replace(RegExp(pe+"\\+?$"),"")+(J=="beta"?Me:Je)+(/\d+\+?/.exec(pe)||"")),ve=="Fennec"||ve=="Firefox"&&/\b(?:Android|Firefox OS|KaiOS)\b/.test(Ve))ve="Firefox Mobile";else if(ve=="Maxthon"&&_e)_e=_e.replace(/\.[\d.]+/,".x");else if(/\bXbox\b/i.test(Ne))Ne=="Xbox 360"&&(Ve=null),Ne=="Xbox 360"&&/\bIEMobile\b/.test(ae)&&z.unshift("mobile mode");else if((/^(?:Chrome|IE|Opera)$/.test(ve)||ve&&!Ne&&!/Browser|Mobi/.test(ve))&&(Ve=="Windows CE"||/Mobi/i.test(ae)))ve+=" Mobile";else if(ve=="IE"&&be)try{he.external===null&&z.unshift("platform preview")}catch(st){z.unshift("embedded")}else(/\bBlackBerry\b/.test(Ne)||/\bBB10\b/.test(ae))&&(pe=(RegExp(Ne.replace(/ +/g," *")+"/([.\\d]+)","i").exec(ae)||0)[1]||_e)?(pe=[pe,/BB10/.test(ae)],Ve=(pe[1]?(Ne=null,ze="BlackBerry"):"Device Software")+" "+pe[0],_e=null):this!=F&&Ne!="Wii"&&(be&&Re||/Opera/.test(ve)&&/\b(?:MSIE|Firefox)\b/i.test(ae)||ve=="Firefox"&&/\bOS X (?:\d+\.){2,}/.test(Ve)||ve=="IE"&&(Ve&&!/^Win/.test(Ve)&&_e>5.5||/\bWindows XP\b/.test(Ve)&&_e>8||_e==8&&!/\bTrident\b/.test(ae)))&&!m.test(pe=ne.call(F,ae.replace(m,"")+";"))&&pe.name&&(pe="ing as "+pe.name+((pe=pe.version)?" "+pe:""),m.test(ve)?(/\bIE\b/.test(pe)&&Ve=="Mac OS"&&(Ve=null),pe="identify"+pe):(pe="mask"+pe,Oe?ve=M(Oe.replace(/([a-z])([A-Z])/g,"$1 $2")):ve="Opera",/\bIE\b/.test(pe)&&(Ve=null),be||(_e=null)),ie=["Presto"],z.push(pe));(pe=(/\bAppleWebKit\/([\d.]+\+?)/i.exec(ae)||0)[1])&&(pe=[parseFloat(pe.replace(/\.(\d)$/,".0$1")),pe],ve=="Safari"&&pe[1].slice(-1)=="+"?(ve="WebKit Nightly",J="alpha",_e=pe[1].slice(0,-1)):(_e==pe[1]||_e==(pe[2]=(/\bSafari\/([\d.]+\+?)/i.exec(ae)||0)[1]))&&(_e=null),pe[1]=(/\b(?:Headless)?Chrome\/([\d.]+)/i.exec(ae)||0)[1],pe[0]==537.36&&pe[2]==537.36&&parseFloat(pe[1])>=28&&ie=="WebKit"&&(ie=["Blink"]),!be||!ee&&!pe[1]?(ie&&(ie[1]="like Safari"),pe=(pe=pe[0],pe<400?1:pe<500?2:pe<526?3:pe<533?4:pe<534?"4+":pe<535?5:pe<537?6:pe<538?7:pe<601?8:pe<602?9:pe<604?10:pe<606?11:pe<608?12:"12")):(ie&&(ie[1]="like Chrome"),pe=pe[1]||(pe=pe[0],pe<530?1:pe<532?2:pe<532.05?3:pe<533?4:pe<534.03?5:pe<534.07?6:pe<534.1?7:pe<534.13?8:pe<534.16?9:pe<534.24?10:pe<534.3?11:pe<535.01?12:pe<535.02?"13+":pe<535.07?15:pe<535.11?16:pe<535.19?17:pe<536.05?18:pe<536.1?19:pe<537.01?20:pe<537.11?"21+":pe<537.13?23:pe<537.18?24:pe<537.24?25:pe<537.36?26:ie!="Blink"?"27":"28")),ie&&(ie[1]+=" "+(pe+=typeof pe=="number"?".x":/[.+]/.test(pe)?"":"+")),ve=="Safari"&&(!_e||parseInt(_e)>45)?_e=pe:ve=="Chrome"&&/\bHeadlessChrome/i.test(ae)&&z.unshift("headless")),ve=="Opera"&&(pe=/\bzbov|zvav$/.exec(Ve))?(ve+=" ",z.unshift("desktop mode"),pe=="zvav"?(ve+="Mini",_e=null):ve+="Mobile",Ve=Ve.replace(RegExp(" *"+pe+"$"),"")):ve=="Safari"&&/\bChrome\b/.exec(ie&&ie[1])?(z.unshift("desktop mode"),ve="Chrome Mobile",_e=null,/\bOS X\b/.test(Ve)?(ze="Apple",Ve="iOS 4.3+"):Ve=null):/\bSRWare Iron\b/.test(ve)&&!_e&&(_e=ht("Chrome")),_e&&_e.indexOf(pe=/[\d.]+$/.exec(Ve))==0&&ae.indexOf("/"+pe+"-")>-1&&(Ve=Q(Ve.replace(pe,""))),Ve&&Ve.indexOf(ve)!=-1&&!RegExp(ve+" OS").test(Ve)&&(Ve=Ve.replace(RegExp(" *"+V(ve)+" *"),"")),ie&&!/\b(?:Avant|Nook)\b/.test(ve)&&(/Browser|Lunascape|Maxthon/.test(ve)||ve!="Safari"&&/^iOS/.test(Ve)&&/\bSafari\b/.test(ie[1])||/^(?:Adobe|Arora|Breach|Midori|Opera|Phantom|Rekonq|Rock|Samsung Internet|Sleipnir|SRWare Iron|Vivaldi|Web)/.test(ve)&&ie[1])&&(pe=ie[ie.length-1])&&z.push(pe),z.length&&(z=["("+z.join("; ")+")"]),ze&&Ne&&Ne.indexOf(ze)<0&&z.push("on "+ze),Ne&&z.push((/^on /.test(z[z.length-1])?"":"on ")+Ne),Ve&&(pe=/ ([\d.+]+)$/.exec(Ve),oe=pe&&Ve.charAt(Ve.length-pe[0].length-1)=="/",Ve={architecture:32,family:pe&&!oe?Ve.replace(pe[0],""):Ve,version:pe?pe[1]:null,toString:function(){var st=this.version;return this.family+(st&&!oe?" "+st:"")+(this.architecture==64?" 64-bit":"")}}),(pe=/\b(?:AMD|IA|Win|WOW|x86_|x)64\b/i.exec(fe))&&!/\bi686\b/i.test(fe)?(Ve&&(Ve.architecture=64,Ve.family=Ve.family.replace(RegExp(" *"+pe),"")),ve&&(/\bWOW64\b/i.test(ae)||be&&/\w(?:86|32)$/.test(we.cpuClass||we.platform)&&!/\bWin64; x64\b/i.test(ae))&&z.unshift("32-bit")):Ve&&/^OS X/.test(Ve.family)&&ve=="Chrome"&&parseFloat(_e)>=39&&(Ve.architecture=64),ae||(ae=null);var jt={};return jt.description=ae,jt.layout=ie&&ie[0],jt.manufacturer=ze,jt.name=ve,jt.prerelease=J,jt.product=Ne,jt.ua=ae,jt.version=ve&&_e,jt.os=Ve||{architecture:null,family:null,version:null,toString:function(){return"null"}},jt.parse=ne,jt.toString=wt,jt.version&&z.unshift(_e),jt.name&&z.unshift(ve),Ve&&ve&&!(Ve==String(Ve).split(" ")[0]&&(Ve==ve.split(" ")[0]||Ne))&&z.push(Ne?"("+Ve+")":"on "+Ve),z.length&&(jt.description=z.join(" ")),jt}var ue=ne();typeof b=="function"&&typeof b.amd=="object"&&b.amd?(g.platform=ue,b(function(){return ue})):S&&v?F(ue,function(ae,he){S[he]=ae}):g.platform=ue}).call(this)}).call(this)}).call(this,typeof Z!="undefined"?Z:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{}],380:[function(s,E,I){(function(u){(function(){"use strict";typeof u=="undefined"||!u.version||u.version.indexOf("v0.")===0||u.version.indexOf("v1.")===0&&u.version.indexOf("v1.8.")!==0?E.exports={nextTick:d}:E.exports=u;function d(g,y,S,v){if(typeof g!="function")throw new TypeError('"callback" argument must be a function');var c=arguments.length,h,m;switch(c){case 0:case 1:return u.nextTick(g);case 2:return u.nextTick(function(){g.call(null,y)});case 3:return u.nextTick(function(){g.call(null,y,S)});case 4:return u.nextTick(function(){g.call(null,y,S,v)});default:for(h=new Array(c-1),m=0;m1)for(var F=1;F= 0x80 (not a basic code point)","invalid-input":"Invalid input"},P=h-m,V=Math.floor,G=String.fromCharCode,Q;function ne(De){throw new RangeError(H[De])}function ue(De,Be){for(var He=De.length,Fe=[];He--;)Fe[He]=Be(De[He]);return Fe}function ae(De,Be){var He=De.split("@"),Fe="";He.length>1&&(Fe=He[0]+"@",De=He[1]),De=De.replace(F,".");var Je=De.split("."),Me=ue(Je,Be).join(".");return Fe+Me}function he(De){for(var Be=[],He=0,Fe=De.length,Je,Me;He=55296&&Je<=56319&&He65535&&(Be-=65536,He+=G(Be>>>10&1023|55296),Be=56320|Be&1023),He+=G(Be),He}).join("")}function we(De){return De-48<10?De-22:De-65<26?De-65:De-97<26?De-97:h}function me(De,Be){return De+22+75*(De<26)-((Be!=0)<<5)}function Le(De,Be,He){var Fe=0;for(De=He?V(De/_):De>>1,De+=V(De/Be);De>P*x>>1;Fe+=h)De=V(De/P);return V(Fe+(P+1)*De/(De+T))}function ee(De){var Be=[],He=De.length,Fe,Je=0,Me=A,lt=R,Re,Oe,pe,fe,z,J,be,_e,oe;for(Re=De.lastIndexOf(N),Re<0&&(Re=0),Oe=0;Oe=128&&ne("not-basic"),Be.push(De.charCodeAt(Oe));for(pe=Re>0?Re+1:0;pe=He&&ne("invalid-input"),be=we(De.charCodeAt(pe++)),(be>=h||be>V((c-Je)/z))&&ne("overflow"),Je+=be*z,_e=J<=lt?m:J>=lt+x?x:J-lt,!(be<_e);J+=h)oe=h-_e,z>V(c/oe)&&ne("overflow"),z*=oe;Fe=Be.length+1,lt=Le(Je-fe,Fe,fe==0),V(Je/Fe)>c-Me&&ne("overflow"),Me+=V(Je/Fe),Je%=Fe,Be.splice(Je++,0,Me)}return ce(Be)}function se(De){var Be,He,Fe,Je,Me,lt,Re,Oe,pe,fe,z,J=[],be,_e,oe,ie;for(De=he(De),be=De.length,Be=A,He=0,Me=R,lt=0;lt=Be&&zV((c-He)/_e)&&ne("overflow"),He+=(Re-Be)*_e,Be=Re,lt=0;ltc&&ne("overflow"),z==Be){for(Oe=He,pe=h;fe=pe<=Me?m:pe>=Me+x?x:pe-Me,!(Oe0&&x>m&&(x=m);for(var T=0;T=0?(A=_.substr(0,R),N=_.substr(R+1)):(A=_,N=""),L=decodeURIComponent(A),M=decodeURIComponent(N),u(c,L)?d(c[L])?c[L].push(M):c[L]=[c[L],M]:c[L]=M}return c};var d=Array.isArray||function(g){return Object.prototype.toString.call(g)==="[object Array]"}},{}],384:[function(s,E,I){"use strict";var u=function(S){switch(typeof S){case"string":return S;case"boolean":return S?"true":"false";case"number":return isFinite(S)?S:"";default:return""}};E.exports=function(S,v,c,h){return v=v||"&",c=c||"=",S===null&&(S=void 0),typeof S=="object"?g(y(S),function(m){var x=encodeURIComponent(u(m))+c;return d(S[m])?g(S[m],function(T){return x+encodeURIComponent(u(T))}).join(v):x+encodeURIComponent(u(S[m]))}).join(v):h?encodeURIComponent(u(h))+c+encodeURIComponent(u(S)):""};var d=Array.isArray||function(S){return Object.prototype.toString.call(S)==="[object Array]"};function g(S,v){if(S.map)return S.map(v);for(var c=[],h=0;h0?(typeof J!="string"&&!ie.objectMode&&Object.getPrototypeOf(J)!==m.prototype&&(J=T(J)),_e?ie.endEmitted?z.emit("error",new Error("stream.unshift() after end event")):ne(z,ie,J,!0):ie.ended?z.emit("error",new Error("stream.push() after EOF")):(ie.reading=!1,ie.decoder&&!be?(J=ie.decoder.write(J),ie.objectMode||J.length!==0?ne(z,ie,J,!1):se(z,ie)):ne(z,ie,J,!1))):_e||(ie.reading=!1)}return ae(ie)}function ne(z,J,be,_e){J.flowing&&J.length===0&&!J.sync?(z.emit("data",be),z.read(0)):(J.length+=J.objectMode?1:be.length,_e?J.buffer.unshift(be):J.buffer.push(be),J.needReadable&&Le(z)),se(z,J)}function ue(z,J){var be;return!_(J)&&typeof J!="string"&&J!==void 0&&!z.objectMode&&(be=new TypeError("Invalid non-string/buffer chunk")),be}function ae(z){return!z.ended&&(z.needReadable||z.length=he?z=he:(z--,z|=z>>>1,z|=z>>>2,z|=z>>>4,z|=z>>>8,z|=z>>>16,z++),z}function we(z,J){return z<=0||J.length===0&&J.ended?0:J.objectMode?1:z!==z?J.flowing&&J.length?J.buffer.head.data.length:J.length:(z>J.highWaterMark&&(J.highWaterMark=ce(z)),z<=J.length?z:J.ended?J.length:(J.needReadable=!0,0))}G.prototype.read=function(z){N("read",z),z=parseInt(z,10);var J=this._readableState,be=z;if(z!==0&&(J.emittedReadable=!1),z===0&&J.needReadable&&(J.length>=J.highWaterMark||J.ended))return N("read: emitReadable",J.length,J.ended),J.length===0&&J.ended?Oe(this):Le(this),null;if(z=we(z,J),z===0&&J.ended)return J.length===0&&Oe(this),null;var _e=J.needReadable;N("need readable",_e),(J.length===0||J.length-z0?oe=Je(z,J):oe=null,oe===null?(J.needReadable=!0,z=0):J.length-=z,J.length===0&&(J.ended||(J.needReadable=!0),be!==z&&J.ended&&Oe(this)),oe!==null&&this.emit("data",oe),oe};function me(z,J){if(!J.ended){if(J.decoder){var be=J.decoder.end();be&&be.length&&(J.buffer.push(be),J.length+=J.objectMode?1:be.length)}J.ended=!0,Le(z)}}function Le(z){var J=z._readableState;J.needReadable=!1,J.emittedReadable||(N("emitReadable",J.flowing),J.emittedReadable=!0,J.sync?g.nextTick(ee,z):ee(z))}function ee(z){N("emit readable"),z.emit("readable"),Fe(z)}function se(z,J){J.readingMore||(J.readingMore=!0,g.nextTick(le,z,J))}function le(z,J){for(var be=J.length;!J.reading&&!J.flowing&&!J.ended&&J.length1&&fe(_e.pipes,z)!==-1)&&!Ve&&(N("false write response, pause",be._readableState.awaitDrain),be._readableState.awaitDrain++,ct=!0),be.pause())}function _t(jt){N("onerror",jt),wt(),z.removeListener("error",_t),c(z,"error")===0&&z.emit("error",jt)}P(z,"error",_t);function At(){z.removeListener("finish",ht),wt()}z.once("close",At);function ht(){N("onfinish"),z.removeListener("close",At),wt()}z.once("finish",ht);function wt(){N("unpipe"),be.unpipe(z)}return z.emit("pipe",be),_e.flowing||(N("pipe resume"),be.resume()),z};function ke(z){return function(){var J=z._readableState;N("pipeOnDrain",J.awaitDrain),J.awaitDrain&&J.awaitDrain--,J.awaitDrain===0&&c(z,"data")&&(J.flowing=!0,Fe(z))}}G.prototype.unpipe=function(z){var J=this._readableState,be={hasUnpiped:!1};if(J.pipesCount===0)return this;if(J.pipesCount===1)return z&&z!==J.pipes?this:(z||(z=J.pipes),J.pipes=null,J.pipesCount=0,J.flowing=!1,z&&z.emit("unpipe",this,be),this);if(!z){var _e=J.pipes,oe=J.pipesCount;J.pipes=null,J.pipesCount=0,J.flowing=!1;for(var ie=0;ie=J.length?(J.decoder?be=J.buffer.join(""):J.buffer.length===1?be=J.buffer.head.data:be=J.buffer.concat(J.length),J.buffer.clear()):be=Me(z,J.buffer,J.decoder),be}function Me(z,J,be){var _e;return zie.length?ie.length:z;if(ve===ie.length?oe+=ie:oe+=ie.slice(0,z),z-=ve,z===0){ve===ie.length?(++_e,be.next?J.head=be.next:J.head=J.tail=null):(J.head=be,be.data=ie.slice(ve));break}++_e}return J.length-=_e,oe}function Re(z,J){var be=m.allocUnsafe(z),_e=J.head,oe=1;for(_e.data.copy(be),z-=_e.data.length;_e=_e.next;){var ie=_e.data,ve=z>ie.length?ie.length:z;if(ie.copy(be,be.length-z,0,ve),z-=ve,z===0){ve===ie.length?(++oe,_e.next?J.head=_e.next:J.head=J.tail=null):(J.head=_e,_e.data=ie.slice(ve));break}++oe}return J.length-=oe,be}function Oe(z){var J=z._readableState;if(J.length>0)throw new Error('"endReadable()" called on non-empty stream');J.endEmitted||(J.ended=!0,g.nextTick(pe,J,z))}function pe(z,J){!z.endEmitted&&z.length===0&&(z.endEmitted=!0,J.readable=!1,J.emit("end"))}function fe(z,J){for(var be=0,_e=z.length;be<_e;be++)if(z[be]===J)return be;return-1}}).call(this)}).call(this,s("_process"),typeof Z!="undefined"?Z:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{"./_stream_duplex":386,"./internal/streams/BufferList":391,"./internal/streams/destroy":392,"./internal/streams/stream":393,_process:467,"core-util-is":341,events:344,inherits:364,isarray:370,"process-nextick-args":380,"safe-buffer":396,"string_decoder/":413,util:89}],389:[function(s,E,I){"use strict";E.exports=y;var u=s("./_stream_duplex"),d=Object.create(s("core-util-is"));d.inherits=s("inherits"),d.inherits(y,u);function g(c,h){var m=this._transformState;m.transforming=!1;var x=m.writecb;if(!x)return this.emit("error",new Error("write callback called multiple times"));m.writechunk=null,m.writecb=null,h!=null&&this.push(h),x(c);var T=this._readableState;T.reading=!1,(T.needReadable||T.length-1?g:y.nextTick,h;P.WritableState=F;var m=Object.create(s("core-util-is"));m.inherits=s("inherits");var x={deprecate:s("util-deprecate")},T=s("./internal/streams/stream"),_=s("safe-buffer").Buffer,R=d.Uint8Array||function(){};function A(He){return _.from(He)}function N(He){return _.isBuffer(He)||He instanceof R}var L=s("./internal/streams/destroy");m.inherits(P,T);function M(){}function F(He,Fe){h=h||s("./_stream_duplex"),He=He||{};var Je=Fe instanceof h;this.objectMode=!!He.objectMode,Je&&(this.objectMode=this.objectMode||!!He.writableObjectMode);var Me=He.highWaterMark,lt=He.writableHighWaterMark,Re=this.objectMode?16:16*1024;Me||Me===0?this.highWaterMark=Me:Je&&(lt||lt===0)?this.highWaterMark=lt:this.highWaterMark=Re,this.highWaterMark=Math.floor(this.highWaterMark),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var Oe=He.decodeStrings===!1;this.decodeStrings=!Oe,this.defaultEncoding=He.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(pe){ce(Fe,pe)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.bufferedRequestCount=0,this.corkedRequestsFree=new v(this)}F.prototype.getBuffer=function(){for(var Fe=this.bufferedRequest,Je=[];Fe;)Je.push(Fe),Fe=Fe.next;return Je},function(){try{Object.defineProperty(F.prototype,"buffer",{get:x.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch(He){}}();var H;typeof Symbol=="function"&&Symbol.hasInstance&&typeof Function.prototype[Symbol.hasInstance]=="function"?(H=Function.prototype[Symbol.hasInstance],Object.defineProperty(P,Symbol.hasInstance,{value:function(He){return H.call(this,He)?!0:this!==P?!1:He&&He._writableState instanceof F}})):H=function(He){return He instanceof this};function P(He){if(h=h||s("./_stream_duplex"),!H.call(P,this)&&!(this instanceof h))return new P(He);this._writableState=new F(He,this),this.writable=!0,He&&(typeof He.write=="function"&&(this._write=He.write),typeof He.writev=="function"&&(this._writev=He.writev),typeof He.destroy=="function"&&(this._destroy=He.destroy),typeof He.final=="function"&&(this._final=He.final)),T.call(this)}P.prototype.pipe=function(){this.emit("error",new Error("Cannot pipe, not readable"))};function V(He,Fe){var Je=new Error("write after end");He.emit("error",Je),y.nextTick(Fe,Je)}function G(He,Fe,Je,Me){var lt=!0,Re=!1;return Je===null?Re=new TypeError("May not write null values to stream"):typeof Je!="string"&&Je!==void 0&&!Fe.objectMode&&(Re=new TypeError("Invalid non-string/buffer chunk")),Re&&(He.emit("error",Re),y.nextTick(Me,Re),lt=!1),lt}P.prototype.write=function(He,Fe,Je){var Me=this._writableState,lt=!1,Re=!Me.objectMode&&N(He);return Re&&!_.isBuffer(He)&&(He=A(He)),typeof Fe=="function"&&(Je=Fe,Fe=null),Re?Fe="buffer":Fe||(Fe=Me.defaultEncoding),typeof Je!="function"&&(Je=M),Me.ended?V(this,Je):(Re||G(this,Me,He,Je))&&(Me.pendingcb++,lt=ne(this,Me,Re,He,Fe,Je)),lt},P.prototype.cork=function(){var He=this._writableState;He.corked++},P.prototype.uncork=function(){var He=this._writableState;He.corked&&(He.corked--,!He.writing&&!He.corked&&!He.finished&&!He.bufferProcessing&&He.bufferedRequest&&Le(this,He))},P.prototype.setDefaultEncoding=function(Fe){if(typeof Fe=="string"&&(Fe=Fe.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((Fe+"").toLowerCase())>-1))throw new TypeError("Unknown encoding: "+Fe);return this._writableState.defaultEncoding=Fe,this};function Q(He,Fe,Je){return!He.objectMode&&He.decodeStrings!==!1&&typeof Fe=="string"&&(Fe=_.from(Fe,Je)),Fe}Object.defineProperty(P.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});function ne(He,Fe,Je,Me,lt,Re){if(!Je){var Oe=Q(Fe,Me,lt);Me!==Oe&&(Je=!0,lt="buffer",Me=Oe)}var pe=Fe.objectMode?1:Me.length;Fe.length+=pe;var fe=Fe.length0?this.tail.next=h:this.head=h,this.tail=h,++this.length},S.prototype.unshift=function(c){var h={data:c,next:this.head};this.length===0&&(this.tail=h),this.head=h,++this.length},S.prototype.shift=function(){if(this.length!==0){var c=this.head.data;return this.length===1?this.head=this.tail=null:this.head=this.head.next,--this.length,c}},S.prototype.clear=function(){this.head=this.tail=null,this.length=0},S.prototype.join=function(c){if(this.length===0)return"";for(var h=this.head,m=""+h.data;h=h.next;)m+=c+h.data;return m},S.prototype.concat=function(c){if(this.length===0)return d.alloc(0);if(this.length===1)return this.head.data;for(var h=d.allocUnsafe(c>>>0),m=this.head,x=0;m;)y(m.data,h,x),x+=m.data.length,m=m.next;return h},S}(),g&&g.inspect&&g.inspect.custom&&(E.exports.prototype[g.inspect.custom]=function(){var S=g.inspect({length:this.length});return this.constructor.name+" "+S})},{"safe-buffer":396,util:89}],392:[function(s,E,I){"use strict";var u=s("process-nextick-args");function d(S,v){var c=this,h=this._readableState&&this._readableState.destroyed,m=this._writableState&&this._writableState.destroyed;return h||m?(v?v(S):S&&(!this._writableState||!this._writableState.errorEmitted)&&u.nextTick(y,this,S),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(S||null,function(x){!v&&x?(u.nextTick(y,c,x),c._writableState&&(c._writableState.errorEmitted=!0)):v&&v(x)}),this)}function g(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)}function y(S,v){S.emit("error",v)}E.exports={destroy:d,undestroy:g}},{"process-nextick-args":380}],393:[function(s,E,I){E.exports=s("events").EventEmitter},{events:344}],394:[function(s,E,I){I=E.exports=s("./lib/_stream_readable.js"),I.Stream=I,I.Readable=I,I.Writable=s("./lib/_stream_writable.js"),I.Duplex=s("./lib/_stream_duplex.js"),I.Transform=s("./lib/_stream_transform.js"),I.PassThrough=s("./lib/_stream_passthrough.js")},{"./lib/_stream_duplex.js":386,"./lib/_stream_passthrough.js":387,"./lib/_stream_readable.js":388,"./lib/_stream_transform.js":389,"./lib/_stream_writable.js":390}],395:[function(s,E,I){var u=function(d){"use strict";var g=Object.prototype,y=g.hasOwnProperty,S,v=typeof Symbol=="function"?Symbol:{},c=v.iterator||"@@iterator",h=v.asyncIterator||"@@asyncIterator",m=v.toStringTag||"@@toStringTag";function x(le,ke,De){return Object.defineProperty(le,ke,{value:De,enumerable:!0,configurable:!0,writable:!0}),le[ke]}try{x({},"")}catch(le){x=function(ke,De,Be){return ke[De]=Be}}function T(le,ke,De,Be){var He=ke&&ke.prototype instanceof F?ke:F,Fe=Object.create(He.prototype),Je=new Le(Be||[]);return Fe._invoke=he(le,De,Je),Fe}d.wrap=T;function _(le,ke,De){try{return{type:"normal",arg:le.call(ke,De)}}catch(Be){return{type:"throw",arg:Be}}}var R="suspendedStart",A="suspendedYield",N="executing",L="completed",M={};function F(){}function H(){}function P(){}var V={};x(V,c,function(){return this});var G=Object.getPrototypeOf,Q=G&&G(G(ee([])));Q&&Q!==g&&y.call(Q,c)&&(V=Q);var ne=P.prototype=F.prototype=Object.create(V);H.prototype=P,x(ne,"constructor",P),x(P,"constructor",H),H.displayName=x(P,m,"GeneratorFunction");function ue(le){["next","throw","return"].forEach(function(ke){x(le,ke,function(De){return this._invoke(ke,De)})})}d.isGeneratorFunction=function(le){var ke=typeof le=="function"&&le.constructor;return ke?ke===H||(ke.displayName||ke.name)==="GeneratorFunction":!1},d.mark=function(le){return Object.setPrototypeOf?Object.setPrototypeOf(le,P):(le.__proto__=P,x(le,m,"GeneratorFunction")),le.prototype=Object.create(ne),le},d.awrap=function(le){return{__await:le}};function ae(le,ke){function De(Fe,Je,Me,lt){var Re=_(le[Fe],le,Je);if(Re.type==="throw")lt(Re.arg);else{var Oe=Re.arg,pe=Oe.value;return pe&&typeof pe=="object"&&y.call(pe,"__await")?ke.resolve(pe.__await).then(function(fe){De("next",fe,Me,lt)},function(fe){De("throw",fe,Me,lt)}):ke.resolve(pe).then(function(fe){Oe.value=fe,Me(Oe)},function(fe){return De("throw",fe,Me,lt)})}}var Be;function He(Fe,Je){function Me(){return new ke(function(lt,Re){De(Fe,Je,lt,Re)})}return Be=Be?Be.then(Me,Me):Me()}this._invoke=He}ue(ae.prototype),x(ae.prototype,h,function(){return this}),d.AsyncIterator=ae,d.async=function(le,ke,De,Be,He){He===void 0&&(He=Promise);var Fe=new ae(T(le,ke,De,Be),He);return d.isGeneratorFunction(ke)?Fe:Fe.next().then(function(Je){return Je.done?Je.value:Fe.next()})};function he(le,ke,De){var Be=R;return function(Fe,Je){if(Be===N)throw new Error("Generator is already running");if(Be===L){if(Fe==="throw")throw Je;return se()}for(De.method=Fe,De.arg=Je;;){var Me=De.delegate;if(Me){var lt=ce(Me,De);if(lt){if(lt===M)continue;return lt}}if(De.method==="next")De.sent=De._sent=De.arg;else if(De.method==="throw"){if(Be===R)throw Be=L,De.arg;De.dispatchException(De.arg)}else De.method==="return"&&De.abrupt("return",De.arg);Be=N;var Re=_(le,ke,De);if(Re.type==="normal"){if(Be=De.done?L:A,Re.arg===M)continue;return{value:Re.arg,done:De.done}}else Re.type==="throw"&&(Be=L,De.method="throw",De.arg=Re.arg)}}}function ce(le,ke){var De=le.iterator[ke.method];if(De===S){if(ke.delegate=null,ke.method==="throw"){if(le.iterator.return&&(ke.method="return",ke.arg=S,ce(le,ke),ke.method==="throw"))return M;ke.method="throw",ke.arg=new TypeError("The iterator does not provide a 'throw' method")}return M}var Be=_(De,le.iterator,ke.arg);if(Be.type==="throw")return ke.method="throw",ke.arg=Be.arg,ke.delegate=null,M;var He=Be.arg;if(!He)return ke.method="throw",ke.arg=new TypeError("iterator result is not an object"),ke.delegate=null,M;if(He.done)ke[le.resultName]=He.value,ke.next=le.nextLoc,ke.method!=="return"&&(ke.method="next",ke.arg=S);else return He;return ke.delegate=null,M}ue(ne),x(ne,m,"Generator"),x(ne,c,function(){return this}),x(ne,"toString",function(){return"[object Generator]"});function we(le){var ke={tryLoc:le[0]};1 in le&&(ke.catchLoc=le[1]),2 in le&&(ke.finallyLoc=le[2],ke.afterLoc=le[3]),this.tryEntries.push(ke)}function me(le){var ke=le.completion||{};ke.type="normal",delete ke.arg,le.completion=ke}function Le(le){this.tryEntries=[{tryLoc:"root"}],le.forEach(we,this),this.reset(!0)}d.keys=function(le){var ke=[];for(var De in le)ke.push(De);return ke.reverse(),function Be(){for(;ke.length;){var He=ke.pop();if(He in le)return Be.value=He,Be.done=!1,Be}return Be.done=!0,Be}};function ee(le){if(le){var ke=le[c];if(ke)return ke.call(le);if(typeof le.next=="function")return le;if(!isNaN(le.length)){var De=-1,Be=function He(){for(;++De=0;--Be){var He=this.tryEntries[Be],Fe=He.completion;if(He.tryLoc==="root")return De("end");if(He.tryLoc<=this.prev){var Je=y.call(He,"catchLoc"),Me=y.call(He,"finallyLoc");if(Je&&Me){if(this.prev=0;--De){var Be=this.tryEntries[De];if(Be.tryLoc<=this.prev&&y.call(Be,"finallyLoc")&&this.prev=0;--ke){var De=this.tryEntries[ke];if(De.finallyLoc===le)return this.complete(De.completion,De.afterLoc),me(De),M}},catch:function(le){for(var ke=this.tryEntries.length-1;ke>=0;--ke){var De=this.tryEntries[ke];if(De.tryLoc===le){var Be=De.completion;if(Be.type==="throw"){var He=Be.arg;me(De)}return He}}throw new Error("illegal catch attempt")},delegateYield:function(le,ke,De){return this.delegate={iterator:ee(le),resultName:ke,nextLoc:De},this.method==="next"&&(this.arg=S),M}},d}(typeof E=="object"?E.exports:{});try{regeneratorRuntime=u}catch(d){typeof globalThis=="object"?globalThis.regeneratorRuntime=u:Function("r","regeneratorRuntime = r")(u)}},{}],396:[function(s,E,I){var u=s("buffer"),d=u.Buffer;function g(S,v){for(var c in S)v[c]=S[c]}d.from&&d.alloc&&d.allocUnsafe&&d.allocUnsafeSlow?E.exports=u:(g(u,I),I.Buffer=y);function y(S,v,c){return d(S,v,c)}g(d,y),y.from=function(S,v,c){if(typeof S=="number")throw new TypeError("Argument must not be a number");return d(S,v,c)},y.alloc=function(S,v,c){if(typeof S!="number")throw new TypeError("Argument must be a number");var h=d(S);return v!==void 0?typeof c=="string"?h.fill(v,c):h.fill(v):h.fill(0),h},y.allocUnsafe=function(S){if(typeof S!="number")throw new TypeError("Argument must be a number");return d(S)},y.allocUnsafeSlow=function(S){if(typeof S!="number")throw new TypeError("Argument must be a number");return u.SlowBuffer(S)}},{buffer:90}],397:[function(s,E,I){(function(u){(function(){(function(d){d.parser=function(Oe,pe){return new y(Oe,pe)},d.SAXParser=y,d.SAXStream=T,d.createStream=x,d.MAX_BUFFER_LENGTH=64*1024;var g=["comment","sgmlDecl","textNode","tagName","doctype","procInstName","procInstBody","entity","attribName","attribValue","cdata","script"];d.EVENTS=["text","processinginstruction","sgmldeclaration","doctype","comment","opentagstart","attribute","opentag","closetag","opencdata","cdata","closecdata","error","end","ready","script","opennamespace","closenamespace"];function y(Oe,pe){if(!(this instanceof y))return new y(Oe,pe);var fe=this;v(fe),fe.q=fe.c="",fe.bufferCheckPosition=d.MAX_BUFFER_LENGTH,fe.opt=pe||{},fe.opt.lowercase=fe.opt.lowercase||fe.opt.lowercasetags,fe.looseCase=fe.opt.lowercase?"toLowerCase":"toUpperCase",fe.tags=[],fe.closed=fe.closedRoot=fe.sawRoot=!1,fe.tag=fe.error=null,fe.strict=!!Oe,fe.noscript=!!(Oe||fe.opt.noscript),fe.state=ae.BEGIN,fe.strictEntities=fe.opt.strictEntities,fe.ENTITIES=fe.strictEntities?Object.create(d.XML_ENTITIES):Object.create(d.ENTITIES),fe.attribList=[],fe.opt.xmlns&&(fe.ns=Object.create(L)),fe.trackPosition=fe.opt.position!==!1,fe.trackPosition&&(fe.position=fe.line=fe.column=0),ce(fe,"onready")}Object.create||(Object.create=function(Oe){function pe(){}pe.prototype=Oe;var fe=new pe;return fe}),Object.keys||(Object.keys=function(Oe){var pe=[];for(var fe in Oe)Oe.hasOwnProperty(fe)&&pe.push(fe);return pe});function S(Oe){for(var pe=Math.max(d.MAX_BUFFER_LENGTH,10),fe=0,z=0,J=g.length;zpe)switch(g[z]){case"textNode":me(Oe);break;case"cdata":we(Oe,"oncdata",Oe.cdata),Oe.cdata="";break;case"script":we(Oe,"onscript",Oe.script),Oe.script="";break;default:ee(Oe,"Max buffer length exceeded: "+g[z])}fe=Math.max(fe,be)}var _e=d.MAX_BUFFER_LENGTH-fe;Oe.bufferCheckPosition=_e+Oe.position}function v(Oe){for(var pe=0,fe=g.length;pe"||V(Oe)}function ne(Oe,pe){return Oe.test(pe)}function ue(Oe,pe){return!ne(Oe,pe)}var ae=0;d.STATE={BEGIN:ae++,BEGIN_WHITESPACE:ae++,TEXT:ae++,TEXT_ENTITY:ae++,OPEN_WAKA:ae++,SGML_DECL:ae++,SGML_DECL_QUOTED:ae++,DOCTYPE:ae++,DOCTYPE_QUOTED:ae++,DOCTYPE_DTD:ae++,DOCTYPE_DTD_QUOTED:ae++,COMMENT_STARTING:ae++,COMMENT:ae++,COMMENT_ENDING:ae++,COMMENT_ENDED:ae++,CDATA:ae++,CDATA_ENDING:ae++,CDATA_ENDING_2:ae++,PROC_INST:ae++,PROC_INST_BODY:ae++,PROC_INST_ENDING:ae++,OPEN_TAG:ae++,OPEN_TAG_SLASH:ae++,ATTRIB:ae++,ATTRIB_NAME:ae++,ATTRIB_NAME_SAW_WHITE:ae++,ATTRIB_VALUE:ae++,ATTRIB_VALUE_QUOTED:ae++,ATTRIB_VALUE_CLOSED:ae++,ATTRIB_VALUE_UNQUOTED:ae++,ATTRIB_VALUE_ENTITY_Q:ae++,ATTRIB_VALUE_ENTITY_U:ae++,CLOSE_TAG:ae++,CLOSE_TAG_SAW_WHITE:ae++,SCRIPT:ae++,SCRIPT_ENDING:ae++},d.XML_ENTITIES={amp:"&",gt:">",lt:"<",quot:'"',apos:"'"},d.ENTITIES={amp:"&",gt:">",lt:"<",quot:'"',apos:"'",AElig:198,Aacute:193,Acirc:194,Agrave:192,Aring:197,Atilde:195,Auml:196,Ccedil:199,ETH:208,Eacute:201,Ecirc:202,Egrave:200,Euml:203,Iacute:205,Icirc:206,Igrave:204,Iuml:207,Ntilde:209,Oacute:211,Ocirc:212,Ograve:210,Oslash:216,Otilde:213,Ouml:214,THORN:222,Uacute:218,Ucirc:219,Ugrave:217,Uuml:220,Yacute:221,aacute:225,acirc:226,aelig:230,agrave:224,aring:229,atilde:227,auml:228,ccedil:231,eacute:233,ecirc:234,egrave:232,eth:240,euml:235,iacute:237,icirc:238,igrave:236,iuml:239,ntilde:241,oacute:243,ocirc:244,ograve:242,oslash:248,otilde:245,ouml:246,szlig:223,thorn:254,uacute:250,ucirc:251,ugrave:249,uuml:252,yacute:253,yuml:255,copy:169,reg:174,nbsp:160,iexcl:161,cent:162,pound:163,curren:164,yen:165,brvbar:166,sect:167,uml:168,ordf:170,laquo:171,not:172,shy:173,macr:175,deg:176,plusmn:177,sup1:185,sup2:178,sup3:179,acute:180,micro:181,para:182,middot:183,cedil:184,ordm:186,raquo:187,frac14:188,frac12:189,frac34:190,iquest:191,times:215,divide:247,OElig:338,oelig:339,Scaron:352,scaron:353,Yuml:376,fnof:402,circ:710,tilde:732,Alpha:913,Beta:914,Gamma:915,Delta:916,Epsilon:917,Zeta:918,Eta:919,Theta:920,Iota:921,Kappa:922,Lambda:923,Mu:924,Nu:925,Xi:926,Omicron:927,Pi:928,Rho:929,Sigma:931,Tau:932,Upsilon:933,Phi:934,Chi:935,Psi:936,Omega:937,alpha:945,beta:946,gamma:947,delta:948,epsilon:949,zeta:950,eta:951,theta:952,iota:953,kappa:954,lambda:955,mu:956,nu:957,xi:958,omicron:959,pi:960,rho:961,sigmaf:962,sigma:963,tau:964,upsilon:965,phi:966,chi:967,psi:968,omega:969,thetasym:977,upsih:978,piv:982,ensp:8194,emsp:8195,thinsp:8201,zwnj:8204,zwj:8205,lrm:8206,rlm:8207,ndash:8211,mdash:8212,lsquo:8216,rsquo:8217,sbquo:8218,ldquo:8220,rdquo:8221,bdquo:8222,dagger:8224,Dagger:8225,bull:8226,hellip:8230,permil:8240,prime:8242,Prime:8243,lsaquo:8249,rsaquo:8250,oline:8254,frasl:8260,euro:8364,image:8465,weierp:8472,real:8476,trade:8482,alefsym:8501,larr:8592,uarr:8593,rarr:8594,darr:8595,harr:8596,crarr:8629,lArr:8656,uArr:8657,rArr:8658,dArr:8659,hArr:8660,forall:8704,part:8706,exist:8707,empty:8709,nabla:8711,isin:8712,notin:8713,ni:8715,prod:8719,sum:8721,minus:8722,lowast:8727,radic:8730,prop:8733,infin:8734,ang:8736,and:8743,or:8744,cap:8745,cup:8746,int:8747,there4:8756,sim:8764,cong:8773,asymp:8776,ne:8800,equiv:8801,le:8804,ge:8805,sub:8834,sup:8835,nsub:8836,sube:8838,supe:8839,oplus:8853,otimes:8855,perp:8869,sdot:8901,lceil:8968,rceil:8969,lfloor:8970,rfloor:8971,lang:9001,rang:9002,loz:9674,spades:9824,clubs:9827,hearts:9829,diams:9830},Object.keys(d.ENTITIES).forEach(function(Oe){var pe=d.ENTITIES[Oe],fe=typeof pe=="number"?String.fromCharCode(pe):pe;d.ENTITIES[Oe]=fe});for(var he in d.STATE)d.STATE[d.STATE[he]]=he;ae=d.STATE;function ce(Oe,pe,fe){Oe[pe]&&Oe[pe](fe)}function we(Oe,pe,fe){Oe.textNode&&me(Oe),ce(Oe,pe,fe)}function me(Oe){Oe.textNode=Le(Oe.opt,Oe.textNode),Oe.textNode&&ce(Oe,"ontext",Oe.textNode),Oe.textNode=""}function Le(Oe,pe){return Oe.trim&&(pe=pe.trim()),Oe.normalize&&(pe=pe.replace(/\s+/g," ")),pe}function ee(Oe,pe){return me(Oe),Oe.trackPosition&&(pe+=` Line: `+Oe.line+` Column: `+Oe.column+` Char: `+Oe.c),pe=new Error(pe),Oe.error=pe,ce(Oe,"onerror",pe),Oe}function se(Oe){return Oe.sawRoot&&!Oe.closedRoot&&le(Oe,"Unclosed root tag"),Oe.state!==ae.BEGIN&&Oe.state!==ae.BEGIN_WHITESPACE&&Oe.state!==ae.TEXT&&ee(Oe,"Unexpected end"),me(Oe),Oe.c="",Oe.closed=!0,ce(Oe,"onend"),y.call(Oe,Oe.strict,Oe.opt),Oe}function le(Oe,pe){if(typeof Oe!="object"||!(Oe instanceof y))throw new Error("bad call to strictFail");Oe.strict&&ee(Oe,pe)}function ke(Oe){Oe.strict||(Oe.tagName=Oe.tagName[Oe.looseCase]());var pe=Oe.tags[Oe.tags.length-1]||Oe,fe=Oe.tag={name:Oe.tagName,attributes:{}};Oe.opt.xmlns&&(fe.ns=pe.ns),Oe.attribList.length=0,we(Oe,"onopentagstart",fe)}function De(Oe,pe){var fe=Oe.indexOf(":"),z=fe<0?["",Oe]:Oe.split(":"),J=z[0],be=z[1];return pe&&Oe==="xmlns"&&(J="xmlns",be=""),{prefix:J,local:be}}function Be(Oe){if(Oe.strict||(Oe.attribName=Oe.attribName[Oe.looseCase]()),Oe.attribList.indexOf(Oe.attribName)!==-1||Oe.tag.attributes.hasOwnProperty(Oe.attribName)){Oe.attribName=Oe.attribValue="";return}if(Oe.opt.xmlns){var pe=De(Oe.attribName,!0),fe=pe.prefix,z=pe.local;if(fe==="xmlns")if(z==="xml"&&Oe.attribValue!==A)le(Oe,"xml: prefix must be bound to "+A+` Actual: `+Oe.attribValue);else if(z==="xmlns"&&Oe.attribValue!==N)le(Oe,"xmlns: prefix must be bound to "+N+` Actual: `+Oe.attribValue);else{var J=Oe.tag,be=Oe.tags[Oe.tags.length-1]||Oe;J.ns===be.ns&&(J.ns=Object.create(be.ns)),J.ns[z]=Oe.attribValue}Oe.attribList.push([Oe.attribName,Oe.attribValue])}else Oe.tag.attributes[Oe.attribName]=Oe.attribValue,we(Oe,"onattribute",{name:Oe.attribName,value:Oe.attribValue});Oe.attribName=Oe.attribValue=""}function He(Oe,pe){if(Oe.opt.xmlns){var fe=Oe.tag,z=De(Oe.tagName);fe.prefix=z.prefix,fe.local=z.local,fe.uri=fe.ns[z.prefix]||"",fe.prefix&&!fe.uri&&(le(Oe,"Unbound namespace prefix: "+JSON.stringify(Oe.tagName)),fe.uri=z.prefix);var J=Oe.tags[Oe.tags.length-1]||Oe;fe.ns&&J.ns!==fe.ns&&Object.keys(fe.ns).forEach(function(St){we(Oe,"onopennamespace",{prefix:St,uri:fe.ns[St]})});for(var be=0,_e=Oe.attribList.length;be<_e;be++){var oe=Oe.attribList[be],ie=oe[0],ve=oe[1],Ne=De(ie,!0),ze=Ne.prefix,Ve=Ne.local,yt=ze===""?"":fe.ns[ze]||"",ct={name:ie,value:ve,prefix:ze,local:Ve,uri:yt};ze&&ze!=="xmlns"&&!yt&&(le(Oe,"Unbound namespace prefix: "+JSON.stringify(ze)),ct.uri=ze),Oe.tag.attributes[ie]=ct,we(Oe,"onattribute",ct)}Oe.attribList.length=0}Oe.tag.isSelfClosing=!!pe,Oe.sawRoot=!0,Oe.tags.push(Oe.tag),we(Oe,"onopentag",Oe.tag),pe||(!Oe.noscript&&Oe.tagName.toLowerCase()==="script"?Oe.state=ae.SCRIPT:Oe.state=ae.TEXT,Oe.tag=null,Oe.tagName=""),Oe.attribName=Oe.attribValue="",Oe.attribList.length=0}function Fe(Oe){if(!Oe.tagName){le(Oe,"Weird empty close tag."),Oe.textNode+="",Oe.state=ae.TEXT;return}if(Oe.script){if(Oe.tagName!=="script"){Oe.script+="",Oe.tagName="",Oe.state=ae.SCRIPT;return}we(Oe,"onscript",Oe.script),Oe.script=""}var pe=Oe.tags.length,fe=Oe.tagName;Oe.strict||(fe=fe[Oe.looseCase]());for(var z=fe;pe--;){var J=Oe.tags[pe];if(J.name!==z)le(Oe,"Unexpected close tag");else break}if(pe<0){le(Oe,"Unmatched closing tag: "+Oe.tagName),Oe.textNode+="",Oe.state=ae.TEXT;return}Oe.tagName=fe;for(var be=Oe.tags.length;be-- >pe;){var _e=Oe.tag=Oe.tags.pop();Oe.tagName=Oe.tag.name,we(Oe,"onclosetag",Oe.tagName);var oe={};for(var ie in _e.ns)oe[ie]=_e.ns[ie];var ve=Oe.tags[Oe.tags.length-1]||Oe;Oe.opt.xmlns&&_e.ns!==ve.ns&&Object.keys(_e.ns).forEach(function(Ne){var ze=_e.ns[Ne];we(Oe,"onclosenamespace",{prefix:Ne,uri:ze})})}pe===0&&(Oe.closedRoot=!0),Oe.tagName=Oe.attribValue=Oe.attribName="",Oe.attribList.length=0,Oe.state=ae.TEXT}function Je(Oe){var pe=Oe.entity,fe=pe.toLowerCase(),z,J="";return Oe.ENTITIES[pe]?Oe.ENTITIES[pe]:Oe.ENTITIES[fe]?Oe.ENTITIES[fe]:(pe=fe,pe.charAt(0)==="#"&&(pe.charAt(1)==="x"?(pe=pe.slice(2),z=parseInt(pe,16),J=z.toString(16)):(pe=pe.slice(1),z=parseInt(pe,10),J=z.toString(10))),pe=pe.replace(/^0+/,""),isNaN(z)||J.toLowerCase()!==pe?(le(Oe,"Invalid character entity"),"&"+Oe.entity+";"):String.fromCodePoint(z))}function Me(Oe,pe){pe==="<"?(Oe.state=ae.OPEN_WAKA,Oe.startTagPosition=Oe.position):V(pe)||(le(Oe,"Non-whitespace before first tag."),Oe.textNode=pe,Oe.state=ae.TEXT)}function lt(Oe,pe){var fe="";return pe"?(we(pe,"onsgmldeclaration",pe.sgmlDecl),pe.sgmlDecl="",pe.state=ae.TEXT):(G(z)&&(pe.state=ae.SGML_DECL_QUOTED),pe.sgmlDecl+=z);continue;case ae.SGML_DECL_QUOTED:z===pe.q&&(pe.state=ae.SGML_DECL,pe.q=""),pe.sgmlDecl+=z;continue;case ae.DOCTYPE:z===">"?(pe.state=ae.TEXT,we(pe,"ondoctype",pe.doctype),pe.doctype=!0):(pe.doctype+=z,z==="["?pe.state=ae.DOCTYPE_DTD:G(z)&&(pe.state=ae.DOCTYPE_QUOTED,pe.q=z));continue;case ae.DOCTYPE_QUOTED:pe.doctype+=z,z===pe.q&&(pe.q="",pe.state=ae.DOCTYPE);continue;case ae.DOCTYPE_DTD:pe.doctype+=z,z==="]"?pe.state=ae.DOCTYPE:G(z)&&(pe.state=ae.DOCTYPE_DTD_QUOTED,pe.q=z);continue;case ae.DOCTYPE_DTD_QUOTED:pe.doctype+=z,z===pe.q&&(pe.state=ae.DOCTYPE_DTD,pe.q="");continue;case ae.COMMENT:z==="-"?pe.state=ae.COMMENT_ENDING:pe.comment+=z;continue;case ae.COMMENT_ENDING:z==="-"?(pe.state=ae.COMMENT_ENDED,pe.comment=Le(pe.opt,pe.comment),pe.comment&&we(pe,"oncomment",pe.comment),pe.comment=""):(pe.comment+="-"+z,pe.state=ae.COMMENT);continue;case ae.COMMENT_ENDED:z!==">"?(le(pe,"Malformed comment"),pe.comment+="--"+z,pe.state=ae.COMMENT):pe.state=ae.TEXT;continue;case ae.CDATA:z==="]"?pe.state=ae.CDATA_ENDING:pe.cdata+=z;continue;case ae.CDATA_ENDING:z==="]"?pe.state=ae.CDATA_ENDING_2:(pe.cdata+="]"+z,pe.state=ae.CDATA);continue;case ae.CDATA_ENDING_2:z===">"?(pe.cdata&&we(pe,"oncdata",pe.cdata),we(pe,"onclosecdata"),pe.cdata="",pe.state=ae.TEXT):z==="]"?pe.cdata+="]":(pe.cdata+="]]"+z,pe.state=ae.CDATA);continue;case ae.PROC_INST:z==="?"?pe.state=ae.PROC_INST_ENDING:V(z)?pe.state=ae.PROC_INST_BODY:pe.procInstName+=z;continue;case ae.PROC_INST_BODY:if(!pe.procInstBody&&V(z))continue;z==="?"?pe.state=ae.PROC_INST_ENDING:pe.procInstBody+=z;continue;case ae.PROC_INST_ENDING:z===">"?(we(pe,"onprocessinginstruction",{name:pe.procInstName,body:pe.procInstBody}),pe.procInstName=pe.procInstBody="",pe.state=ae.TEXT):(pe.procInstBody+="?"+z,pe.state=ae.PROC_INST_BODY);continue;case ae.OPEN_TAG:ne(F,z)?pe.tagName+=z:(ke(pe),z===">"?He(pe):z==="/"?pe.state=ae.OPEN_TAG_SLASH:(V(z)||le(pe,"Invalid character in tag name"),pe.state=ae.ATTRIB));continue;case ae.OPEN_TAG_SLASH:z===">"?(He(pe,!0),Fe(pe)):(le(pe,"Forward-slash in opening tag not followed by >"),pe.state=ae.ATTRIB);continue;case ae.ATTRIB:if(V(z))continue;z===">"?He(pe):z==="/"?pe.state=ae.OPEN_TAG_SLASH:ne(M,z)?(pe.attribName=z,pe.attribValue="",pe.state=ae.ATTRIB_NAME):le(pe,"Invalid attribute name");continue;case ae.ATTRIB_NAME:z==="="?pe.state=ae.ATTRIB_VALUE:z===">"?(le(pe,"Attribute without value"),pe.attribValue=pe.attribName,Be(pe),He(pe)):V(z)?pe.state=ae.ATTRIB_NAME_SAW_WHITE:ne(F,z)?pe.attribName+=z:le(pe,"Invalid attribute name");continue;case ae.ATTRIB_NAME_SAW_WHITE:if(z==="=")pe.state=ae.ATTRIB_VALUE;else{if(V(z))continue;le(pe,"Attribute without value"),pe.tag.attributes[pe.attribName]="",pe.attribValue="",we(pe,"onattribute",{name:pe.attribName,value:""}),pe.attribName="",z===">"?He(pe):ne(M,z)?(pe.attribName=z,pe.state=ae.ATTRIB_NAME):(le(pe,"Invalid attribute name"),pe.state=ae.ATTRIB)}continue;case ae.ATTRIB_VALUE:if(V(z))continue;G(z)?(pe.q=z,pe.state=ae.ATTRIB_VALUE_QUOTED):(le(pe,"Unquoted attribute value"),pe.state=ae.ATTRIB_VALUE_UNQUOTED,pe.attribValue=z);continue;case ae.ATTRIB_VALUE_QUOTED:if(z!==pe.q){z==="&"?pe.state=ae.ATTRIB_VALUE_ENTITY_Q:pe.attribValue+=z;continue}Be(pe),pe.q="",pe.state=ae.ATTRIB_VALUE_CLOSED;continue;case ae.ATTRIB_VALUE_CLOSED:V(z)?pe.state=ae.ATTRIB:z===">"?He(pe):z==="/"?pe.state=ae.OPEN_TAG_SLASH:ne(M,z)?(le(pe,"No whitespace between attributes"),pe.attribName=z,pe.attribValue="",pe.state=ae.ATTRIB_NAME):le(pe,"Invalid attribute name");continue;case ae.ATTRIB_VALUE_UNQUOTED:if(!Q(z)){z==="&"?pe.state=ae.ATTRIB_VALUE_ENTITY_U:pe.attribValue+=z;continue}Be(pe),z===">"?He(pe):pe.state=ae.ATTRIB;continue;case ae.CLOSE_TAG:if(pe.tagName)z===">"?Fe(pe):ne(F,z)?pe.tagName+=z:pe.script?(pe.script+=""?Fe(pe):le(pe,"Invalid characters in closing tag");continue;case ae.TEXT_ENTITY:case ae.ATTRIB_VALUE_ENTITY_Q:case ae.ATTRIB_VALUE_ENTITY_U:var _e,oe;switch(pe.state){case ae.TEXT_ENTITY:_e=ae.TEXT,oe="textNode";break;case ae.ATTRIB_VALUE_ENTITY_Q:_e=ae.ATTRIB_VALUE_QUOTED,oe="attribValue";break;case ae.ATTRIB_VALUE_ENTITY_U:_e=ae.ATTRIB_VALUE_UNQUOTED,oe="attribValue";break}z===";"?(pe[oe]+=Je(pe),pe.entity="",pe.state=_e):ne(pe.entity.length?P:H,z)?pe.entity+=z:(le(pe,"Invalid character in entity name"),pe[oe]+="&"+pe.entity+z,pe.entity="",pe.state=_e);continue;default:throw new Error(pe,"Unknown state: "+pe.state)}return pe.position>=pe.bufferCheckPosition&&S(pe),pe}String.fromCodePoint||function(){var Oe=String.fromCharCode,pe=Math.floor,fe=function(){var z=16384,J=[],be,_e,oe=-1,ie=arguments.length;if(!ie)return"";for(var ve="";++oe1114111||pe(Ne)!==Ne)throw RangeError("Invalid code point: "+Ne);Ne<=65535?J.push(Ne):(Ne-=65536,be=(Ne>>10)+55296,_e=Ne%1024+56320,J.push(be,_e)),(oe+1===ie||J.length>z)&&(ve+=Oe.apply(null,J),J.length=0)}return ve};Object.defineProperty?Object.defineProperty(String,"fromCodePoint",{value:fe,configurable:!0,writable:!0}):String.fromCodePoint=fe}()})(typeof I=="undefined"?this.sax={}:I)}).call(this)}).call(this,s("buffer").Buffer)},{buffer:90,stream:398,string_decoder:413}],398:[function(s,E,I){E.exports=g;var u=s("events").EventEmitter,d=s("inherits");d(g,u),g.Readable=s("readable-stream/lib/_stream_readable.js"),g.Writable=s("readable-stream/lib/_stream_writable.js"),g.Duplex=s("readable-stream/lib/_stream_duplex.js"),g.Transform=s("readable-stream/lib/_stream_transform.js"),g.PassThrough=s("readable-stream/lib/_stream_passthrough.js"),g.finished=s("readable-stream/lib/internal/streams/end-of-stream.js"),g.pipeline=s("readable-stream/lib/internal/streams/pipeline.js"),g.Stream=g;function g(){u.call(this)}g.prototype.pipe=function(y,S){var v=this;function c(A){y.writable&&y.write(A)===!1&&v.pause&&v.pause()}v.on("data",c);function h(){v.readable&&v.resume&&v.resume()}y.on("drain",h),!y._isStdio&&(!S||S.end!==!1)&&(v.on("end",x),v.on("close",T));var m=!1;function x(){m||(m=!0,y.end())}function T(){m||(m=!0,typeof y.destroy=="function"&&y.destroy())}function _(A){if(R(),u.listenerCount(this,"error")===0)throw A}v.on("error",_),y.on("error",_);function R(){v.removeListener("data",c),y.removeListener("drain",h),v.removeListener("end",x),v.removeListener("close",T),v.removeListener("error",_),y.removeListener("error",_),v.removeListener("end",R),v.removeListener("close",R),y.removeListener("close",R)}return v.on("end",R),v.on("close",R),y.on("close",R),y.emit("pipe",v),y}},{events:344,inherits:364,"readable-stream/lib/_stream_duplex.js":400,"readable-stream/lib/_stream_passthrough.js":401,"readable-stream/lib/_stream_readable.js":402,"readable-stream/lib/_stream_transform.js":403,"readable-stream/lib/_stream_writable.js":404,"readable-stream/lib/internal/streams/end-of-stream.js":408,"readable-stream/lib/internal/streams/pipeline.js":410}],399:[function(s,E,I){"use strict";function u(h,m){h.prototype=Object.create(m.prototype),h.prototype.constructor=h,h.__proto__=m}var d={};function g(h,m,x){x||(x=Error);function T(R,A,N){return typeof m=="string"?m:m(R,A,N)}var _=function(R){u(A,R);function A(N,L,M){return R.call(this,T(N,L,M))||this}return A}(x);_.prototype.name=x.name,_.prototype.code=h,d[h]=_}function y(h,m){if(Array.isArray(h)){var x=h.length;return h=h.map(function(T){return String(T)}),x>2?"one of ".concat(m," ").concat(h.slice(0,x-1).join(", "),", or ")+h[x-1]:x===2?"one of ".concat(m," ").concat(h[0]," or ").concat(h[1]):"of ".concat(m," ").concat(h[0])}else return"of ".concat(m," ").concat(String(h))}function S(h,m,x){return h.substr(!x||x<0?0:+x,m.length)===m}function v(h,m,x){return(x===void 0||x>h.length)&&(x=h.length),h.substring(x-m.length,x)===m}function c(h,m,x){return typeof x!="number"&&(x=0),x+m.length>h.length?!1:h.indexOf(m,x)!==-1}g("ERR_INVALID_OPT_VALUE",function(h,m){return'The value "'+m+'" is invalid for option "'+h+'"'},TypeError),g("ERR_INVALID_ARG_TYPE",function(h,m,x){var T;typeof m=="string"&&S(m,"not ")?(T="must not be",m=m.replace(/^not /,"")):T="must be";var _;if(v(h," argument"))_="The ".concat(h," ").concat(T," ").concat(y(m,"type"));else{var R=c(h,".")?"property":"argument";_='The "'.concat(h,'" ').concat(R," ").concat(T," ").concat(y(m,"type"))}return _+=". Received type ".concat(typeof x),_},TypeError),g("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF"),g("ERR_METHOD_NOT_IMPLEMENTED",function(h){return"The "+h+" method is not implemented"}),g("ERR_STREAM_PREMATURE_CLOSE","Premature close"),g("ERR_STREAM_DESTROYED",function(h){return"Cannot call "+h+" after a stream was destroyed"}),g("ERR_MULTIPLE_CALLBACK","Callback called multiple times"),g("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable"),g("ERR_STREAM_WRITE_AFTER_END","write after end"),g("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError),g("ERR_UNKNOWN_ENCODING",function(h){return"Unknown encoding: "+h},TypeError),g("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event"),E.exports.codes=d},{}],400:[function(s,E,I){(function(u){(function(){"use strict";var d=Object.keys||function(T){var _=[];for(var R in T)_.push(R);return _};E.exports=h;var g=s("./_stream_readable"),y=s("./_stream_writable");s("inherits")(h,g);for(var S=d(y.prototype),v=0;v0)if(typeof ie!="string"&&!Ve.objectMode&&Object.getPrototypeOf(ie)!==c.prototype&&(ie=m(ie)),Ne)Ve.endEmitted?ue(oe,new V):Le(oe,Ve,ie,!0);else if(Ve.ended)ue(oe,new H);else{if(Ve.destroyed)return!1;Ve.reading=!1,Ve.decoder&&!ve?(ie=Ve.decoder.write(ie),Ve.objectMode||ie.length!==0?Le(oe,Ve,ie,!1):Fe(oe,Ve)):Le(oe,Ve,ie,!1)}else Ne||(Ve.reading=!1,Fe(oe,Ve))}return!Ve.ended&&(Ve.length=se?oe=se:(oe--,oe|=oe>>>1,oe|=oe>>>2,oe|=oe>>>4,oe|=oe>>>8,oe|=oe>>>16,oe++),oe}function ke(oe,ie){return oe<=0||ie.length===0&&ie.ended?0:ie.objectMode?1:oe!==oe?ie.flowing&&ie.length?ie.buffer.head.data.length:ie.length:(oe>ie.highWaterMark&&(ie.highWaterMark=le(oe)),oe<=ie.length?oe:ie.ended?ie.length:(ie.needReadable=!0,0))}we.prototype.read=function(oe){_("read",oe),oe=parseInt(oe,10);var ie=this._readableState,ve=oe;if(oe!==0&&(ie.emittedReadable=!1),oe===0&&ie.needReadable&&((ie.highWaterMark!==0?ie.length>=ie.highWaterMark:ie.length>0)||ie.ended))return _("read: emitReadable",ie.length,ie.ended),ie.length===0&&ie.ended?J(this):Be(this),null;if(oe=ke(oe,ie),oe===0&&ie.ended)return ie.length===0&&J(this),null;var Ne=ie.needReadable;_("need readable",Ne),(ie.length===0||ie.length-oe0?ze=z(oe,ie):ze=null,ze===null?(ie.needReadable=ie.length<=ie.highWaterMark,oe=0):(ie.length-=oe,ie.awaitDrain=0),ie.length===0&&(ie.ended||(ie.needReadable=!0),ve!==oe&&ie.ended&&J(this)),ze!==null&&this.emit("data",ze),ze};function De(oe,ie){if(_("onEofChunk"),!ie.ended){if(ie.decoder){var ve=ie.decoder.end();ve&&ve.length&&(ie.buffer.push(ve),ie.length+=ie.objectMode?1:ve.length)}ie.ended=!0,ie.sync?Be(oe):(ie.needReadable=!1,ie.emittedReadable||(ie.emittedReadable=!0,He(oe)))}}function Be(oe){var ie=oe._readableState;_("emitReadable",ie.needReadable,ie.emittedReadable),ie.needReadable=!1,ie.emittedReadable||(_("emitReadable",ie.flowing),ie.emittedReadable=!0,u.nextTick(He,oe))}function He(oe){var ie=oe._readableState;_("emitReadable_",ie.destroyed,ie.length,ie.ended),!ie.destroyed&&(ie.length||ie.ended)&&(oe.emit("readable"),ie.emittedReadable=!1),ie.needReadable=!ie.flowing&&!ie.ended&&ie.length<=ie.highWaterMark,fe(oe)}function Fe(oe,ie){ie.readingMore||(ie.readingMore=!0,u.nextTick(Je,oe,ie))}function Je(oe,ie){for(;!ie.reading&&!ie.ended&&(ie.length1&&_e(Ne.pipes,oe)!==-1)&&!_t&&(_("false write response, pause",Ne.awaitDrain),Ne.awaitDrain++),ve.pause())}function wt(on){_("onerror",on),ge(),oe.removeListener("error",wt),S(oe,"error")===0&&ue(oe,on)}he(oe,"error",wt);function jt(){oe.removeListener("finish",st),ge()}oe.once("close",jt);function st(){_("onfinish"),oe.removeListener("close",jt),ge()}oe.once("finish",st);function ge(){_("unpipe"),ve.unpipe(oe)}return oe.emit("pipe",ve),Ne.flowing||(_("pipe resume"),ve.resume()),oe};function Me(oe){return function(){var ve=oe._readableState;_("pipeOnDrain",ve.awaitDrain),ve.awaitDrain&&ve.awaitDrain--,ve.awaitDrain===0&&S(oe,"data")&&(ve.flowing=!0,fe(oe))}}we.prototype.unpipe=function(oe){var ie=this._readableState,ve={hasUnpiped:!1};if(ie.pipesCount===0)return this;if(ie.pipesCount===1)return oe&&oe!==ie.pipes?this:(oe||(oe=ie.pipes),ie.pipes=null,ie.pipesCount=0,ie.flowing=!1,oe&&oe.emit("unpipe",this,ve),this);if(!oe){var Ne=ie.pipes,ze=ie.pipesCount;ie.pipes=null,ie.pipesCount=0,ie.flowing=!1;for(var Ve=0;Ve0,Ne.flowing!==!1&&this.resume()):oe==="readable"&&!Ne.endEmitted&&!Ne.readableListening&&(Ne.readableListening=Ne.needReadable=!0,Ne.flowing=!1,Ne.emittedReadable=!1,_("on readable",Ne.length,Ne.reading),Ne.length?Be(this):Ne.reading||u.nextTick(Re,this)),ve},we.prototype.addListener=we.prototype.on,we.prototype.removeListener=function(oe,ie){var ve=v.prototype.removeListener.call(this,oe,ie);return oe==="readable"&&u.nextTick(lt,this),ve},we.prototype.removeAllListeners=function(oe){var ie=v.prototype.removeAllListeners.apply(this,arguments);return(oe==="readable"||oe===void 0)&&u.nextTick(lt,this),ie};function lt(oe){var ie=oe._readableState;ie.readableListening=oe.listenerCount("readable")>0,ie.resumeScheduled&&!ie.paused?ie.flowing=!0:oe.listenerCount("data")>0&&oe.resume()}function Re(oe){_("readable nexttick read 0"),oe.read(0)}we.prototype.resume=function(){var oe=this._readableState;return oe.flowing||(_("resume"),oe.flowing=!oe.readableListening,Oe(this,oe)),oe.paused=!1,this};function Oe(oe,ie){ie.resumeScheduled||(ie.resumeScheduled=!0,u.nextTick(pe,oe,ie))}function pe(oe,ie){_("resume",ie.reading),ie.reading||oe.read(0),ie.resumeScheduled=!1,oe.emit("resume"),fe(oe),ie.flowing&&!ie.reading&&oe.read(0)}we.prototype.pause=function(){return _("call pause flowing=%j",this._readableState.flowing),this._readableState.flowing!==!1&&(_("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState.paused=!0,this};function fe(oe){var ie=oe._readableState;for(_("flow",ie.flowing);ie.flowing&&oe.read()!==null;);}we.prototype.wrap=function(oe){var ie=this,ve=this._readableState,Ne=!1;oe.on("end",function(){if(_("wrapped end"),ve.decoder&&!ve.ended){var yt=ve.decoder.end();yt&&yt.length&&ie.push(yt)}ie.push(null)}),oe.on("data",function(yt){if(_("wrapped data"),ve.decoder&&(yt=ve.decoder.write(yt)),!(ve.objectMode&&yt==null)&&!(!ve.objectMode&&(!yt||!yt.length))){var ct=ie.push(yt);ct||(Ne=!0,oe.pause())}});for(var ze in oe)this[ze]===void 0&&typeof oe[ze]=="function"&&(this[ze]=function(ct){return function(){return oe[ct].apply(oe,arguments)}}(ze));for(var Ve=0;Ve=ie.length?(ie.decoder?ve=ie.buffer.join(""):ie.buffer.length===1?ve=ie.buffer.first():ve=ie.buffer.concat(ie.length),ie.buffer.clear()):ve=ie.buffer.consume(oe,ie.decoder),ve}function J(oe){var ie=oe._readableState;_("endReadable",ie.endEmitted),ie.endEmitted||(ie.ended=!0,u.nextTick(be,ie,oe))}function be(oe,ie){if(_("endReadableNT",oe.endEmitted,oe.length),!oe.endEmitted&&oe.length===0&&(oe.endEmitted=!0,ie.readable=!1,ie.emit("end"),oe.autoDestroy)){var ve=ie._writableState;(!ve||ve.autoDestroy&&ve.finished)&&ie.destroy()}}typeof Symbol=="function"&&(we.from=function(oe,ie){return ne===void 0&&(ne=s("./internal/streams/from")),ne(we,oe,ie)});function _e(oe,ie){for(var ve=0,Ne=oe.length;ve-1))throw new Q(z);return this._writableState.defaultEncoding=z,this},Object.defineProperty(ce.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}});function Le(fe,z,J){return!fe.objectMode&&fe.decodeStrings!==!1&&typeof z=="string"&&(z=h.from(z,J)),z}Object.defineProperty(ce.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});function ee(fe,z,J,be,_e,oe){if(!J){var ie=Le(z,be,_e);be!==ie&&(J=!0,_e="buffer",be=ie)}var ve=z.objectMode?1:be.length;z.length+=ve;var Ne=z.length0?this.tail.next=F:this.head=F,this.tail=F,++this.length}},{key:"unshift",value:function(M){var F={data:M,next:this.head};this.length===0&&(this.tail=F),this.head=F,++this.length}},{key:"shift",value:function(){if(this.length!==0){var M=this.head.data;return this.length===1?this.head=this.tail=null:this.head=this.head.next,--this.length,M}}},{key:"clear",value:function(){this.head=this.tail=null,this.length=0}},{key:"join",value:function(M){if(this.length===0)return"";for(var F=this.head,H=""+F.data;F=F.next;)H+=M+F.data;return H}},{key:"concat",value:function(M){if(this.length===0)return x.alloc(0);for(var F=x.allocUnsafe(M>>>0),H=this.head,P=0;H;)A(H.data,F,P),P+=H.data.length,H=H.next;return F}},{key:"consume",value:function(M,F){var H;return MV.length?V.length:M;if(G===V.length?P+=V:P+=V.slice(0,M),M-=G,M===0){G===V.length?(++H,F.next?this.head=F.next:this.head=this.tail=null):(this.head=F,F.data=V.slice(G));break}++H}return this.length-=H,P}},{key:"_getBuffer",value:function(M){var F=x.allocUnsafe(M),H=this.head,P=1;for(H.data.copy(F),M-=H.data.length;H=H.next;){var V=H.data,G=M>V.length?V.length:M;if(V.copy(F,F.length-M,0,G),M-=G,M===0){G===V.length?(++P,H.next?this.head=H.next:this.head=this.tail=null):(this.head=H,H.data=V.slice(G));break}++P}return this.length-=P,F}},{key:R,value:function(M,F){return _(this,d(d({},F),{},{depth:0,customInspect:!1}))}}]),N}()},{buffer:90,util:89}],407:[function(s,E,I){(function(u){(function(){"use strict";function d(h,m){var x=this,T=this._readableState&&this._readableState.destroyed,_=this._writableState&&this._writableState.destroyed;return T||_?(m?m(h):h&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,u.nextTick(v,this,h)):u.nextTick(v,this,h)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(h||null,function(R){!m&&R?x._writableState?x._writableState.errorEmitted?u.nextTick(y,x):(x._writableState.errorEmitted=!0,u.nextTick(g,x,R)):u.nextTick(g,x,R):m?(u.nextTick(y,x),m(R)):u.nextTick(y,x)}),this)}function g(h,m){v(h,m),y(h)}function y(h){h._writableState&&!h._writableState.emitClose||h._readableState&&!h._readableState.emitClose||h.emit("close")}function S(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finalCalled=!1,this._writableState.prefinished=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)}function v(h,m){h.emit("error",m)}function c(h,m){var x=h._readableState,T=h._writableState;x&&x.autoDestroy||T&&T.autoDestroy?h.destroy(m):h.emit("error",m)}E.exports={destroy:d,undestroy:S,errorOrDestroy:c}}).call(this)}).call(this,s("_process"))},{_process:467}],408:[function(s,E,I){"use strict";var u=s("../../../errors").codes.ERR_STREAM_PREMATURE_CLOSE;function d(v){var c=!1;return function(){if(!c){c=!0;for(var h=arguments.length,m=new Array(h),x=0;x0;return h(H,V,G,function(Q){M||(M=Q),Q&&F.forEach(m),!V&&(F.forEach(m),L(M))})});return A.reduce(x)}E.exports=_},{"../../../errors":399,"./end-of-stream":408}],411:[function(s,E,I){"use strict";var u=s("../../../errors").codes.ERR_INVALID_OPT_VALUE;function d(y,S,v){return y.highWaterMark!=null?y.highWaterMark:S?y[v]:null}function g(y,S,v,c){var h=d(S,c,v);if(h!=null){if(!(isFinite(h)&&Math.floor(h)===h)||h<0){var m=c?v:"highWaterMark";throw new u(m,h)}return Math.floor(h)}return y.objectMode?16:16*1024}E.exports={getHighWaterMark:g}},{"../../../errors":399}],412:[function(s,E,I){arguments[4][393][0].apply(I,arguments)},{dup:393,events:344}],413:[function(s,E,I){"use strict";var u=s("safe-buffer").Buffer,d=u.isEncoding||function(F){switch(F=""+F,F&&F.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};function g(F){if(!F)return"utf8";for(var H;;)switch(F){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return F;default:if(H)return;F=(""+F).toLowerCase(),H=!0}}function y(F){var H=g(F);if(typeof H!="string"&&(u.isEncoding===d||!d(F)))throw new Error("Unknown encoding: "+F);return H||F}I.StringDecoder=S;function S(F){this.encoding=y(F);var H;switch(this.encoding){case"utf16le":this.text=_,this.end=R,H=4;break;case"utf8":this.fillLast=m,H=4;break;case"base64":this.text=A,this.end=N,H=3;break;default:this.write=L,this.end=M;return}this.lastNeed=0,this.lastTotal=0,this.lastChar=u.allocUnsafe(H)}S.prototype.write=function(F){if(F.length===0)return"";var H,P;if(this.lastNeed){if(H=this.fillLast(F),H===void 0)return"";P=this.lastNeed,this.lastNeed=0}else P=0;return P>5===6?2:F>>4===14?3:F>>3===30?4:F>>6===2?-1:-2}function c(F,H,P){var V=H.length-1;if(V=0?(G>0&&(F.lastNeed=G-1),G):--V=0?(G>0&&(F.lastNeed=G-2),G):--V=0?(G>0&&(G===2?G=0:F.lastNeed=G-3),G):0))}function h(F,H,P){if((H[0]&192)!==128)return F.lastNeed=0,"\uFFFD";if(F.lastNeed>1&&H.length>1){if((H[1]&192)!==128)return F.lastNeed=1,"\uFFFD";if(F.lastNeed>2&&H.length>2&&(H[2]&192)!==128)return F.lastNeed=2,"\uFFFD"}}function m(F){var H=this.lastTotal-this.lastNeed,P=h(this,F,H);if(P!==void 0)return P;if(this.lastNeed<=F.length)return F.copy(this.lastChar,H,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);F.copy(this.lastChar,H,0,F.length),this.lastNeed-=F.length}function x(F,H){var P=c(this,F,H);if(!this.lastNeed)return F.toString("utf8",H);this.lastTotal=P;var V=F.length-(P-this.lastNeed);return F.copy(this.lastChar,0,V),F.toString("utf8",H,V)}function T(F){var H=F&&F.length?this.write(F):"";return this.lastNeed?H+"\uFFFD":H}function _(F,H){if((F.length-H)%2===0){var P=F.toString("utf16le",H);if(P){var V=P.charCodeAt(P.length-1);if(V>=55296&&V<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=F[F.length-2],this.lastChar[1]=F[F.length-1],P.slice(0,-1)}return P}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=F[F.length-1],F.toString("utf16le",H,F.length-1)}function R(F){var H=F&&F.length?this.write(F):"";if(this.lastNeed){var P=this.lastTotal-this.lastNeed;return H+this.lastChar.toString("utf16le",0,P)}return H}function A(F,H){var P=(F.length-H)%3;return P===0?F.toString("base64",H):(this.lastNeed=3-P,this.lastTotal=3,P===1?this.lastChar[0]=F[F.length-1]:(this.lastChar[0]=F[F.length-2],this.lastChar[1]=F[F.length-1]),F.toString("base64",H,F.length-P))}function N(F){var H=F&&F.length?this.write(F):"";return this.lastNeed?H+this.lastChar.toString("base64",0,3-this.lastNeed):H}function L(F){return F.toString(this.encoding)}function M(F){return F&&F.length?this.write(F):""}},{"safe-buffer":396}],414:[function(s,E,I){(function(u,d){(function(){var g=s("process/browser.js").nextTick,y=Function.prototype.apply,S=Array.prototype.slice,v={},c=0;I.setTimeout=function(){return new h(y.call(setTimeout,window,arguments),clearTimeout)},I.setInterval=function(){return new h(y.call(setInterval,window,arguments),clearInterval)},I.clearTimeout=I.clearInterval=function(m){m.close()};function h(m,x){this._id=m,this._clearFn=x}h.prototype.unref=h.prototype.ref=function(){},h.prototype.close=function(){this._clearFn.call(window,this._id)},I.enroll=function(m,x){clearTimeout(m._idleTimeoutId),m._idleTimeout=x},I.unenroll=function(m){clearTimeout(m._idleTimeoutId),m._idleTimeout=-1},I._unrefActive=I.active=function(m){clearTimeout(m._idleTimeoutId);var x=m._idleTimeout;x>=0&&(m._idleTimeoutId=setTimeout(function(){m._onTimeout&&m._onTimeout()},x))},I.setImmediate=typeof u=="function"?u:function(m){var x=c++,T=arguments.length<2?!1:S.call(arguments,1);return v[x]=!0,g(function(){v[x]&&(T?m.apply(null,T):m.call(null),I.clearImmediate(x))}),x},I.clearImmediate=typeof d=="function"?d:function(m){delete v[m]}}).call(this)}).call(this,s("timers").setImmediate,s("timers").clearImmediate)},{"process/browser.js":381,timers:414}],415:[function(s,E,I){var u=s("buffer").Buffer;E.exports=function(d){if(d instanceof Uint8Array){if(d.byteOffset===0&&d.byteLength===d.buffer.byteLength)return d.buffer;if(typeof d.buffer.slice=="function")return d.buffer.slice(d.byteOffset,d.byteOffset+d.byteLength)}if(u.isBuffer(d)){for(var g=new Uint8Array(d.length),y=d.length,S=0;S=Re)return fe;switch(fe){case"%s":return String(lt[Me++]);case"%d":return Number(lt[Me++]);case"%j":try{return JSON.stringify(lt[Me++])}catch(z){return"[Circular]"}default:return fe}}),pe=lt[Me];Me=3&&(Me.depth=arguments[2]),arguments.length>=4&&(Me.colors=arguments[3]),F(Je)?Me.showHidden=Je:Je&&I._extend(Me,Je),ne(Me.showHidden)&&(Me.showHidden=!1),ne(Me.depth)&&(Me.depth=2),ne(Me.colors)&&(Me.colors=!1),ne(Me.customInspect)&&(Me.customInspect=!0),Me.colors&&(Me.stylize=h),T(Me,Fe,Me.depth)}I.inspect=c,c.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},c.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"};function h(Fe,Je){var Me=c.styles[Je];return Me?"\x1B["+c.colors[Me][0]+"m"+Fe+"\x1B["+c.colors[Me][1]+"m":Fe}function m(Fe,Je){return Fe}function x(Fe){var Je={};return Fe.forEach(function(Me,lt){Je[Me]=!0}),Je}function T(Fe,Je,Me){if(Fe.customInspect&&Je&&we(Je.inspect)&&Je.inspect!==I.inspect&&!(Je.constructor&&Je.constructor.prototype===Je)){var lt=Je.inspect(Me,Fe);return G(lt)||(lt=T(Fe,lt,Me)),lt}var Re=_(Fe,Je);if(Re)return Re;var Oe=Object.keys(Je),pe=x(Oe);if(Fe.showHidden&&(Oe=Object.getOwnPropertyNames(Je)),ce(Je)&&(Oe.indexOf("message")>=0||Oe.indexOf("description")>=0))return R(Je);if(Oe.length===0){if(we(Je)){var fe=Je.name?": "+Je.name:"";return Fe.stylize("[Function"+fe+"]","special")}if(ue(Je))return Fe.stylize(RegExp.prototype.toString.call(Je),"regexp");if(he(Je))return Fe.stylize(Date.prototype.toString.call(Je),"date");if(ce(Je))return R(Je)}var z="",J=!1,be=["{","}"];if(M(Je)&&(J=!0,be=["[","]"]),we(Je)){var _e=Je.name?": "+Je.name:"";z=" [Function"+_e+"]"}if(ue(Je)&&(z=" "+RegExp.prototype.toString.call(Je)),he(Je)&&(z=" "+Date.prototype.toUTCString.call(Je)),ce(Je)&&(z=" "+R(Je)),Oe.length===0&&(!J||Je.length==0))return be[0]+z+be[1];if(Me<0)return ue(Je)?Fe.stylize(RegExp.prototype.toString.call(Je),"regexp"):Fe.stylize("[Object]","special");Fe.seen.push(Je);var oe;return J?oe=A(Fe,Je,Me,pe,Oe):oe=Oe.map(function(ie){return N(Fe,Je,Me,pe,ie,J)}),Fe.seen.pop(),L(oe,z,be)}function _(Fe,Je){if(ne(Je))return Fe.stylize("undefined","undefined");if(G(Je)){var Me="'"+JSON.stringify(Je).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return Fe.stylize(Me,"string")}if(V(Je))return Fe.stylize(""+Je,"number");if(F(Je))return Fe.stylize(""+Je,"boolean");if(H(Je))return Fe.stylize("null","null")}function R(Fe){return"["+Error.prototype.toString.call(Fe)+"]"}function A(Fe,Je,Me,lt,Re){for(var Oe=[],pe=0,fe=Je.length;pe-1&&(Oe?fe=fe.split(` `).map(function(J){return" "+J}).join(` `).slice(2):fe=` `+fe.split(` `).map(function(J){return" "+J}).join(` `))):fe=Fe.stylize("[Circular]","special")),ne(pe)){if(Oe&&Re.match(/^\d+$/))return fe;pe=JSON.stringify(""+Re),pe.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(pe=pe.slice(1,-1),pe=Fe.stylize(pe,"name")):(pe=pe.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),pe=Fe.stylize(pe,"string"))}return pe+": "+fe}function L(Fe,Je,Me){var lt=0,Re=Fe.reduce(function(Oe,pe){return lt++,pe.indexOf(` `)>=0&<++,Oe+pe.replace(/\u001b\[\d\d?m/g,"").length+1},0);return Re>60?Me[0]+(Je===""?"":Je+` `)+" "+Fe.join(`, `)+" "+Me[1]:Me[0]+Je+" "+Fe.join(", ")+" "+Me[1]}I.types=s("./support/types");function M(Fe){return Array.isArray(Fe)}I.isArray=M;function F(Fe){return typeof Fe=="boolean"}I.isBoolean=F;function H(Fe){return Fe===null}I.isNull=H;function P(Fe){return Fe==null}I.isNullOrUndefined=P;function V(Fe){return typeof Fe=="number"}I.isNumber=V;function G(Fe){return typeof Fe=="string"}I.isString=G;function Q(Fe){return typeof Fe=="symbol"}I.isSymbol=Q;function ne(Fe){return Fe===void 0}I.isUndefined=ne;function ue(Fe){return ae(Fe)&&Le(Fe)==="[object RegExp]"}I.isRegExp=ue,I.types.isRegExp=ue;function ae(Fe){return typeof Fe=="object"&&Fe!==null}I.isObject=ae;function he(Fe){return ae(Fe)&&Le(Fe)==="[object Date]"}I.isDate=he,I.types.isDate=he;function ce(Fe){return ae(Fe)&&(Le(Fe)==="[object Error]"||Fe instanceof Error)}I.isError=ce,I.types.isNativeError=ce;function we(Fe){return typeof Fe=="function"}I.isFunction=we;function me(Fe){return Fe===null||typeof Fe=="boolean"||typeof Fe=="number"||typeof Fe=="string"||typeof Fe=="symbol"||typeof Fe=="undefined"}I.isPrimitive=me,I.isBuffer=s("./support/isBuffer");function Le(Fe){return Object.prototype.toString.call(Fe)}function ee(Fe){return Fe<10?"0"+Fe.toString(10):Fe.toString(10)}var se=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function le(){var Fe=new Date,Je=[ee(Fe.getHours()),ee(Fe.getMinutes()),ee(Fe.getSeconds())].join(":");return[Fe.getDate(),se[Fe.getMonth()],Je].join(" ")}I.log=function(){console.log("%s - %s",le(),I.format.apply(I,arguments))},I.inherits=s("inherits"),I._extend=function(Fe,Je){if(!Je||!ae(Je))return Fe;for(var Me=Object.keys(Je),lt=Me.length;lt--;)Fe[Me[lt]]=Je[Me[lt]];return Fe};function ke(Fe,Je){return Object.prototype.hasOwnProperty.call(Fe,Je)}var De=typeof Symbol!="undefined"?Symbol("util.promisify.custom"):void 0;I.promisify=function(Je){if(typeof Je!="function")throw new TypeError('The "original" argument must be of type Function');if(De&&Je[De]){var Me=Je[De];if(typeof Me!="function")throw new TypeError('The "util.promisify.custom" argument must be of type Function');return Object.defineProperty(Me,De,{value:Me,enumerable:!1,writable:!1,configurable:!0}),Me}function Me(){for(var lt,Re,Oe=new Promise(function(z,J){lt=z,Re=J}),pe=[],fe=0;fe-1?H:H!=="Object"?!1:L(F)}return v?N(F):null}}).call(this)}).call(this,typeof Z!="undefined"?Z:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{"available-typed-arrays":86,"call-bind":93,"call-bind/callBound":92,"for-each":345,gopd:349,"has-tostringtag/shams":353}],421:[function(s,E,I){(function(){"use strict";I.stripBOM=function(u){return u[0]==="\uFEFF"?u.substring(1):u}}).call(this)},{}],422:[function(s,E,I){(function(){"use strict";var u,d,g,y,S,v={}.hasOwnProperty;u=s("xmlbuilder"),d=s("./defaults").defaults,y=function(c){return typeof c=="string"&&(c.indexOf("&")>=0||c.indexOf(">")>=0||c.indexOf("<")>=0)},S=function(c){return""},g=function(c){return c.replace("]]>","]]]]>")},I.Builder=function(){function c(h){var m,x,T;this.options={},x=d["0.2"];for(m in x)v.call(x,m)&&(T=x[m],this.options[m]=T);for(m in h)v.call(h,m)&&(T=h[m],this.options[m]=T)}return c.prototype.buildObject=function(h){var m,x,T,_,R;return m=this.options.attrkey,x=this.options.charkey,Object.keys(h).length===1&&this.options.rootName===d["0.2"].rootName?(R=Object.keys(h)[0],h=h[R]):R=this.options.rootName,T=function(A){return function(N,L){var M,F,H,P,V,G;if(typeof L!="object")A.options.cdata&&y(L)?N.raw(S(L)):N.txt(L);else if(Array.isArray(L)){for(P in L)if(v.call(L,P)){F=L[P];for(V in F)H=F[V],N=T(N.ele(V),H).up()}}else for(V in L)if(v.call(L,V))if(F=L[V],V===m){if(typeof F=="object")for(M in F)G=F[M],N=N.att(M,G)}else if(V===x)A.options.cdata&&y(F)?N=N.raw(S(F)):N=N.txt(F);else if(Array.isArray(F))for(P in F)v.call(F,P)&&(H=F[P],typeof H=="string"?A.options.cdata&&y(H)?N=N.ele(V).raw(S(H)).up():N=N.ele(V,H).up():N=T(N.ele(V),H).up());else typeof F=="object"?N=T(N.ele(V),F).up():typeof F=="string"&&A.options.cdata&&y(F)?N=N.ele(V).raw(S(F)).up():(F==null&&(F=""),N=N.ele(V,F.toString()).up());return N}}(this),_=u.create(R,this.options.xmldec,this.options.doctype,{headless:this.options.headless,allowSurrogateChars:this.options.allowSurrogateChars}),T(_,h).end(this.options.renderOpts)},c}()}).call(this)},{"./defaults":423,xmlbuilder:459}],423:[function(s,E,I){(function(){I.defaults={"0.1":{explicitCharkey:!1,trim:!0,normalize:!0,normalizeTags:!1,attrkey:"@",charkey:"#",explicitArray:!1,ignoreAttrs:!1,mergeAttrs:!1,explicitRoot:!1,validator:null,xmlns:!1,explicitChildren:!1,childkey:"@@",charsAsChildren:!1,includeWhiteChars:!1,async:!1,strict:!0,attrNameProcessors:null,attrValueProcessors:null,tagNameProcessors:null,valueProcessors:null,emptyTag:""},"0.2":{explicitCharkey:!1,trim:!1,normalize:!1,normalizeTags:!1,attrkey:"$",charkey:"_",explicitArray:!0,ignoreAttrs:!1,mergeAttrs:!1,explicitRoot:!0,validator:null,xmlns:!1,explicitChildren:!1,preserveChildrenOrder:!1,childkey:"$$",charsAsChildren:!1,includeWhiteChars:!1,async:!1,strict:!0,attrNameProcessors:null,attrValueProcessors:null,tagNameProcessors:null,valueProcessors:null,rootName:"root",xmldec:{version:"1.0",encoding:"UTF-8",standalone:!0},doctype:null,renderOpts:{pretty:!0,indent:" ",newline:` `},headless:!1,chunkSize:1e4,emptyTag:"",cdata:!1}}}).call(this)},{}],424:[function(s,E,I){(function(){"use strict";var u,d,g,y,S,v,c,h,m,x=function(R,A){return function(){return R.apply(A,arguments)}},T=function(R,A){for(var N in A)_.call(A,N)&&(R[N]=A[N]);function L(){this.constructor=R}return L.prototype=A.prototype,R.prototype=new L,R.__super__=A.prototype,R},_={}.hasOwnProperty;h=s("sax"),y=s("events"),u=s("./bom"),c=s("./processors"),m=s("timers").setImmediate,d=s("./defaults").defaults,S=function(R){return typeof R=="object"&&R!=null&&Object.keys(R).length===0},v=function(R,A,N){var L,M,F;for(L=0,M=R.length;L0&&(Q[H.options.childkey]=ue),ue=Q;else if(ce){ce[H.options.childkey]=ce[H.options.childkey]||[],ae={};for(G in ue)_.call(ue,G)&&g(ae,G,ue[G]);ce[H.options.childkey].push(ae),delete ue["#name"],Object.keys(ue).length===1&&L in ue&&!H.EXPLICIT_CHARKEY&&(ue=ue[L])}}return F.length>0?H.assignOrPush(ce,ne,ue):(H.options.explicitRoot&&(he=ue,ue={},g(ue,ne,he)),H.resultObject=ue,H.saxParser.ended=!0,H.emit("end",H.resultObject))}}(this),M=function(H){return function(P){var V,G;if(G=F[F.length-1],G)return G[L]+=P,H.options.explicitChildren&&H.options.preserveChildrenOrder&&H.options.charsAsChildren&&(H.options.includeWhiteChars||P.replace(/\\n/g,"").trim()!=="")&&(G[H.options.childkey]=G[H.options.childkey]||[],V={"#name":"__text__"},V[L]=P,H.options.normalize&&(V[L]=V[L].replace(/\s{2,}/g," ").trim()),G[H.options.childkey].push(V)),G}}(this),this.saxParser.ontext=M,this.saxParser.oncdata=function(H){return function(P){var V;if(V=M(P),V)return V.cdata=!0}}(this)},A.prototype.parseString=function(N,L){var M;L!=null&&typeof L=="function"&&(this.on("end",function(F){return this.reset(),L(null,F)}),this.on("error",function(F){return this.reset(),L(F)}));try{return N=N.toString(),N.trim()===""?(this.emit("end",null),!0):(N=u.stripBOM(N),this.options.async?(this.remaining=N,m(this.processAsync),this.saxParser):this.saxParser.write(N).close())}catch(F){if(M=F,this.saxParser.errThrown||this.saxParser.ended){if(this.saxParser.ended)throw M}else return this.emit("error",M),this.saxParser.errThrown=!0}},A.prototype.parseStringPromise=function(N){return new Promise(function(L){return function(M,F){return L.parseString(N,function(H,P){return H?F(H):M(P)})}}(this))},A}(y),I.parseString=function(R,A,N){var L,M,F;return N!=null?(typeof N=="function"&&(L=N),typeof A=="object"&&(M=A)):(typeof A=="function"&&(L=A),M={}),F=new I.Parser(M),F.parseString(R,L)},I.parseStringPromise=function(R,A){var N,L;return typeof A=="object"&&(N=A),L=new I.Parser(N),L.parseStringPromise(R)}}).call(this)},{"./bom":421,"./defaults":423,"./processors":425,events:344,sax:397,timers:414}],425:[function(s,E,I){(function(){"use strict";var u;u=new RegExp(/(?!xmlns)^.*:/),I.normalize=function(d){return d.toLowerCase()},I.firstCharLowerCase=function(d){return d.charAt(0).toLowerCase()+d.slice(1)},I.stripPrefix=function(d){return d.replace(u,"")},I.parseNumbers=function(d){return isNaN(d)||(d=d%1===0?parseInt(d,10):parseFloat(d)),d},I.parseBooleans=function(d){return/^(?:true|false)$/i.test(d)&&(d=d.toLowerCase()==="true"),d}}).call(this)},{}],426:[function(s,E,I){(function(){"use strict";var u,d,g,y,S=function(c,h){for(var m in h)v.call(h,m)&&(c[m]=h[m]);function x(){this.constructor=c}return x.prototype=h.prototype,c.prototype=new x,c.__super__=h.prototype,c},v={}.hasOwnProperty;d=s("./defaults"),u=s("./builder"),g=s("./parser"),y=s("./processors"),I.defaults=d.defaults,I.processors=y,I.ValidationError=function(c){S(h,c);function h(m){this.message=m}return h}(Error),I.Builder=u.Builder,I.Parser=g.Parser,I.parseString=g.parseString,I.parseStringPromise=g.parseStringPromise}).call(this)},{"./builder":422,"./defaults":423,"./parser":424,"./processors":425}],427:[function(s,E,I){(function(){E.exports={Disconnected:1,Preceding:2,Following:4,Contains:8,ContainedBy:16,ImplementationSpecific:32}}).call(this)},{}],428:[function(s,E,I){(function(){E.exports={Element:1,Attribute:2,Text:3,CData:4,EntityReference:5,EntityDeclaration:6,ProcessingInstruction:7,Comment:8,Document:9,DocType:10,DocumentFragment:11,NotationDeclaration:12,Declaration:201,Raw:202,AttributeDeclaration:203,ElementDeclaration:204,Dummy:205}}).call(this)},{}],429:[function(s,E,I){(function(){var u,d,g,y,S,v,c,h=[].slice,m={}.hasOwnProperty;u=function(){var x,T,_,R,A,N;if(N=arguments[0],A=2<=arguments.length?h.call(arguments,1):[],S(Object.assign))Object.assign.apply(null,arguments);else for(x=0,_=A.length;x<_;x++)if(R=A[x],R!=null)for(T in R)m.call(R,T)&&(N[T]=R[T]);return N},S=function(x){return!!x&&Object.prototype.toString.call(x)==="[object Function]"},v=function(x){var T;return!!x&&((T=typeof x)=="function"||T==="object")},g=function(x){return S(Array.isArray)?Array.isArray(x):Object.prototype.toString.call(x)==="[object Array]"},y=function(x){var T;if(g(x))return!x.length;for(T in x)if(m.call(x,T))return!1;return!0},c=function(x){var T,_;return v(x)&&(_=Object.getPrototypeOf(x))&&(T=_.constructor)&&typeof T=="function"&&T instanceof T&&Function.prototype.toString.call(T)===Function.prototype.toString.call(Object)},d=function(x){return S(x.valueOf)?x.valueOf():x},E.exports.assign=u,E.exports.isFunction=S,E.exports.isObject=v,E.exports.isArray=g,E.exports.isEmpty=y,E.exports.isPlainObject=c,E.exports.getValue=d}).call(this)},{}],430:[function(s,E,I){(function(){E.exports={None:0,OpenTag:1,InsideTag:2,CloseTag:3}}).call(this)},{}],431:[function(s,E,I){(function(){var u,d,g;u=s("./NodeType"),g=s("./XMLNode"),E.exports=d=function(){function y(S,v,c){if(this.parent=S,this.parent&&(this.options=this.parent.options,this.stringify=this.parent.stringify),v==null)throw new Error("Missing attribute name. "+this.debugInfo(v));this.name=this.stringify.name(v),this.value=this.stringify.attValue(c),this.type=u.Attribute,this.isId=!1,this.schemaTypeInfo=null}return Object.defineProperty(y.prototype,"nodeType",{get:function(){return this.type}}),Object.defineProperty(y.prototype,"ownerElement",{get:function(){return this.parent}}),Object.defineProperty(y.prototype,"textContent",{get:function(){return this.value},set:function(S){return this.value=S||""}}),Object.defineProperty(y.prototype,"namespaceURI",{get:function(){return""}}),Object.defineProperty(y.prototype,"prefix",{get:function(){return""}}),Object.defineProperty(y.prototype,"localName",{get:function(){return this.name}}),Object.defineProperty(y.prototype,"specified",{get:function(){return!0}}),y.prototype.clone=function(){return Object.create(this)},y.prototype.toString=function(S){return this.options.writer.attribute(this,this.options.writer.filterOptions(S))},y.prototype.debugInfo=function(S){return S=S||this.name,S==null?"parent: <"+this.parent.name+">":"attribute: {"+S+"}, parent: <"+this.parent.name+">"},y.prototype.isEqualNode=function(S){return!(S.namespaceURI!==this.namespaceURI||S.prefix!==this.prefix||S.localName!==this.localName||S.value!==this.value)},y}()}).call(this)},{"./NodeType":428,"./XMLNode":450}],432:[function(s,E,I){(function(){var u,d,g,y=function(v,c){for(var h in c)S.call(c,h)&&(v[h]=c[h]);function m(){this.constructor=v}return m.prototype=c.prototype,v.prototype=new m,v.__super__=c.prototype,v},S={}.hasOwnProperty;u=s("./NodeType"),g=s("./XMLCharacterData"),E.exports=d=function(v){y(c,v);function c(h,m){if(c.__super__.constructor.call(this,h),m==null)throw new Error("Missing CDATA text. "+this.debugInfo());this.name="#cdata-section",this.type=u.CData,this.value=this.stringify.cdata(m)}return c.prototype.clone=function(){return Object.create(this)},c.prototype.toString=function(h){return this.options.writer.cdata(this,this.options.writer.filterOptions(h))},c}(g)}).call(this)},{"./NodeType":428,"./XMLCharacterData":433}],433:[function(s,E,I){(function(){var u,d,g=function(S,v){for(var c in v)y.call(v,c)&&(S[c]=v[c]);function h(){this.constructor=S}return h.prototype=v.prototype,S.prototype=new h,S.__super__=v.prototype,S},y={}.hasOwnProperty;d=s("./XMLNode"),E.exports=u=function(S){g(v,S);function v(c){v.__super__.constructor.call(this,c),this.value=""}return Object.defineProperty(v.prototype,"data",{get:function(){return this.value},set:function(c){return this.value=c||""}}),Object.defineProperty(v.prototype,"length",{get:function(){return this.value.length}}),Object.defineProperty(v.prototype,"textContent",{get:function(){return this.value},set:function(c){return this.value=c||""}}),v.prototype.clone=function(){return Object.create(this)},v.prototype.substringData=function(c,h){throw new Error("This DOM method is not implemented."+this.debugInfo())},v.prototype.appendData=function(c){throw new Error("This DOM method is not implemented."+this.debugInfo())},v.prototype.insertData=function(c,h){throw new Error("This DOM method is not implemented."+this.debugInfo())},v.prototype.deleteData=function(c,h){throw new Error("This DOM method is not implemented."+this.debugInfo())},v.prototype.replaceData=function(c,h,m){throw new Error("This DOM method is not implemented."+this.debugInfo())},v.prototype.isEqualNode=function(c){return!(!v.__super__.isEqualNode.apply(this,arguments).isEqualNode(c)||c.data!==this.data)},v}(d)}).call(this)},{"./XMLNode":450}],434:[function(s,E,I){(function(){var u,d,g,y=function(v,c){for(var h in c)S.call(c,h)&&(v[h]=c[h]);function m(){this.constructor=v}return m.prototype=c.prototype,v.prototype=new m,v.__super__=c.prototype,v},S={}.hasOwnProperty;u=s("./NodeType"),d=s("./XMLCharacterData"),E.exports=g=function(v){y(c,v);function c(h,m){if(c.__super__.constructor.call(this,h),m==null)throw new Error("Missing comment text. "+this.debugInfo());this.name="#comment",this.type=u.Comment,this.value=this.stringify.comment(m)}return c.prototype.clone=function(){return Object.create(this)},c.prototype.toString=function(h){return this.options.writer.comment(this,this.options.writer.filterOptions(h))},c}(d)}).call(this)},{"./NodeType":428,"./XMLCharacterData":433}],435:[function(s,E,I){(function(){var u,d,g;d=s("./XMLDOMErrorHandler"),g=s("./XMLDOMStringList"),E.exports=u=function(){function y(){var S;this.defaultParams={"canonical-form":!1,"cdata-sections":!1,comments:!1,"datatype-normalization":!1,"element-content-whitespace":!0,entities:!0,"error-handler":new d,infoset:!0,"validate-if-schema":!1,namespaces:!0,"namespace-declarations":!0,"normalize-characters":!1,"schema-location":"","schema-type":"","split-cdata-sections":!0,validate:!1,"well-formed":!0},this.params=S=Object.create(this.defaultParams)}return Object.defineProperty(y.prototype,"parameterNames",{get:function(){return new g(Object.keys(this.defaultParams))}}),y.prototype.getParameter=function(S){return this.params.hasOwnProperty(S)?this.params[S]:null},y.prototype.canSetParameter=function(S,v){return!0},y.prototype.setParameter=function(S,v){return v!=null?this.params[S]=v:delete this.params[S]},y}()}).call(this)},{"./XMLDOMErrorHandler":436,"./XMLDOMStringList":438}],436:[function(s,E,I){(function(){var u;E.exports=u=function(){function d(){}return d.prototype.handleError=function(g){throw new Error(g)},d}()}).call(this)},{}],437:[function(s,E,I){(function(){var u;E.exports=u=function(){function d(){}return d.prototype.hasFeature=function(g,y){return!0},d.prototype.createDocumentType=function(g,y,S){throw new Error("This DOM method is not implemented.")},d.prototype.createDocument=function(g,y,S){throw new Error("This DOM method is not implemented.")},d.prototype.createHTMLDocument=function(g){throw new Error("This DOM method is not implemented.")},d.prototype.getFeature=function(g,y){throw new Error("This DOM method is not implemented.")},d}()}).call(this)},{}],438:[function(s,E,I){(function(){var u;E.exports=u=function(){function d(g){this.arr=g||[]}return Object.defineProperty(d.prototype,"length",{get:function(){return this.arr.length}}),d.prototype.item=function(g){return this.arr[g]||null},d.prototype.contains=function(g){return this.arr.indexOf(g)!==-1},d}()}).call(this)},{}],439:[function(s,E,I){(function(){var u,d,g,y=function(v,c){for(var h in c)S.call(c,h)&&(v[h]=c[h]);function m(){this.constructor=v}return m.prototype=c.prototype,v.prototype=new m,v.__super__=c.prototype,v},S={}.hasOwnProperty;g=s("./XMLNode"),u=s("./NodeType"),E.exports=d=function(v){y(c,v);function c(h,m,x,T,_,R){if(c.__super__.constructor.call(this,h),m==null)throw new Error("Missing DTD element name. "+this.debugInfo());if(x==null)throw new Error("Missing DTD attribute name. "+this.debugInfo(m));if(!T)throw new Error("Missing DTD attribute type. "+this.debugInfo(m));if(!_)throw new Error("Missing DTD attribute default. "+this.debugInfo(m));if(_.indexOf("#")!==0&&(_="#"+_),!_.match(/^(#REQUIRED|#IMPLIED|#FIXED|#DEFAULT)$/))throw new Error("Invalid default value type; expected: #REQUIRED, #IMPLIED, #FIXED or #DEFAULT. "+this.debugInfo(m));if(R&&!_.match(/^(#FIXED|#DEFAULT)$/))throw new Error("Default value only applies to #FIXED or #DEFAULT. "+this.debugInfo(m));this.elementName=this.stringify.name(m),this.type=u.AttributeDeclaration,this.attributeName=this.stringify.name(x),this.attributeType=this.stringify.dtdAttType(T),R&&(this.defaultValue=this.stringify.dtdAttDefault(R)),this.defaultValueType=_}return c.prototype.toString=function(h){return this.options.writer.dtdAttList(this,this.options.writer.filterOptions(h))},c}(g)}).call(this)},{"./NodeType":428,"./XMLNode":450}],440:[function(s,E,I){(function(){var u,d,g,y=function(v,c){for(var h in c)S.call(c,h)&&(v[h]=c[h]);function m(){this.constructor=v}return m.prototype=c.prototype,v.prototype=new m,v.__super__=c.prototype,v},S={}.hasOwnProperty;g=s("./XMLNode"),u=s("./NodeType"),E.exports=d=function(v){y(c,v);function c(h,m,x){if(c.__super__.constructor.call(this,h),m==null)throw new Error("Missing DTD element name. "+this.debugInfo());x||(x="(#PCDATA)"),Array.isArray(x)&&(x="("+x.join(",")+")"),this.name=this.stringify.name(m),this.type=u.ElementDeclaration,this.value=this.stringify.dtdElementValue(x)}return c.prototype.toString=function(h){return this.options.writer.dtdElement(this,this.options.writer.filterOptions(h))},c}(g)}).call(this)},{"./NodeType":428,"./XMLNode":450}],441:[function(s,E,I){(function(){var u,d,g,y,S=function(c,h){for(var m in h)v.call(h,m)&&(c[m]=h[m]);function x(){this.constructor=c}return x.prototype=h.prototype,c.prototype=new x,c.__super__=h.prototype,c},v={}.hasOwnProperty;y=s("./Utility").isObject,g=s("./XMLNode"),u=s("./NodeType"),E.exports=d=function(c){S(h,c);function h(m,x,T,_){if(h.__super__.constructor.call(this,m),T==null)throw new Error("Missing DTD entity name. "+this.debugInfo(T));if(_==null)throw new Error("Missing DTD entity value. "+this.debugInfo(T));if(this.pe=!!x,this.name=this.stringify.name(T),this.type=u.EntityDeclaration,!y(_))this.value=this.stringify.dtdEntityValue(_),this.internal=!0;else{if(!_.pubID&&!_.sysID)throw new Error("Public and/or system identifiers are required for an external entity. "+this.debugInfo(T));if(_.pubID&&!_.sysID)throw new Error("System identifier is required for a public external entity. "+this.debugInfo(T));if(this.internal=!1,_.pubID!=null&&(this.pubID=this.stringify.dtdPubID(_.pubID)),_.sysID!=null&&(this.sysID=this.stringify.dtdSysID(_.sysID)),_.nData!=null&&(this.nData=this.stringify.dtdNData(_.nData)),this.pe&&this.nData)throw new Error("Notation declaration is not allowed in a parameter entity. "+this.debugInfo(T))}}return Object.defineProperty(h.prototype,"publicId",{get:function(){return this.pubID}}),Object.defineProperty(h.prototype,"systemId",{get:function(){return this.sysID}}),Object.defineProperty(h.prototype,"notationName",{get:function(){return this.nData||null}}),Object.defineProperty(h.prototype,"inputEncoding",{get:function(){return null}}),Object.defineProperty(h.prototype,"xmlEncoding",{get:function(){return null}}),Object.defineProperty(h.prototype,"xmlVersion",{get:function(){return null}}),h.prototype.toString=function(m){return this.options.writer.dtdEntity(this,this.options.writer.filterOptions(m))},h}(g)}).call(this)},{"./NodeType":428,"./Utility":429,"./XMLNode":450}],442:[function(s,E,I){(function(){var u,d,g,y=function(v,c){for(var h in c)S.call(c,h)&&(v[h]=c[h]);function m(){this.constructor=v}return m.prototype=c.prototype,v.prototype=new m,v.__super__=c.prototype,v},S={}.hasOwnProperty;g=s("./XMLNode"),u=s("./NodeType"),E.exports=d=function(v){y(c,v);function c(h,m,x){if(c.__super__.constructor.call(this,h),m==null)throw new Error("Missing DTD notation name. "+this.debugInfo(m));if(!x.pubID&&!x.sysID)throw new Error("Public or system identifiers are required for an external entity. "+this.debugInfo(m));this.name=this.stringify.name(m),this.type=u.NotationDeclaration,x.pubID!=null&&(this.pubID=this.stringify.dtdPubID(x.pubID)),x.sysID!=null&&(this.sysID=this.stringify.dtdSysID(x.sysID))}return Object.defineProperty(c.prototype,"publicId",{get:function(){return this.pubID}}),Object.defineProperty(c.prototype,"systemId",{get:function(){return this.sysID}}),c.prototype.toString=function(h){return this.options.writer.dtdNotation(this,this.options.writer.filterOptions(h))},c}(g)}).call(this)},{"./NodeType":428,"./XMLNode":450}],443:[function(s,E,I){(function(){var u,d,g,y,S=function(c,h){for(var m in h)v.call(h,m)&&(c[m]=h[m]);function x(){this.constructor=c}return x.prototype=h.prototype,c.prototype=new x,c.__super__=h.prototype,c},v={}.hasOwnProperty;y=s("./Utility").isObject,g=s("./XMLNode"),u=s("./NodeType"),E.exports=d=function(c){S(h,c);function h(m,x,T,_){var R;h.__super__.constructor.call(this,m),y(x)&&(R=x,x=R.version,T=R.encoding,_=R.standalone),x||(x="1.0"),this.type=u.Declaration,this.version=this.stringify.xmlVersion(x),T!=null&&(this.encoding=this.stringify.xmlEncoding(T)),_!=null&&(this.standalone=this.stringify.xmlStandalone(_))}return h.prototype.toString=function(m){return this.options.writer.declaration(this,this.options.writer.filterOptions(m))},h}(g)}).call(this)},{"./NodeType":428,"./Utility":429,"./XMLNode":450}],444:[function(s,E,I){(function(){var u,d,g,y,S,v,c,h,m,x=function(_,R){for(var A in R)T.call(R,A)&&(_[A]=R[A]);function N(){this.constructor=_}return N.prototype=R.prototype,_.prototype=new N,_.__super__=R.prototype,_},T={}.hasOwnProperty;m=s("./Utility").isObject,h=s("./XMLNode"),u=s("./NodeType"),d=s("./XMLDTDAttList"),y=s("./XMLDTDEntity"),g=s("./XMLDTDElement"),S=s("./XMLDTDNotation"),c=s("./XMLNamedNodeMap"),E.exports=v=function(_){x(R,_);function R(A,N,L){var M,F,H,P,V,G;if(R.__super__.constructor.call(this,A),this.type=u.DocType,A.children){for(P=A.children,F=0,H=P.length;F=0;)this.up();return this.onEnd()},ae.prototype.openCurrent=function(){if(this.currentNode)return this.currentNode.children=!0,this.openNode(this.currentNode)},ae.prototype.openNode=function(he){var ce,we,me,Le;if(!he.isOpen){if(!this.root&&this.currentLevel===0&&he.type===u.Element&&(this.root=he),we="",he.type===u.Element){this.writerOptions.state=d.OpenTag,we=this.writer.indent(he,this.writerOptions,this.currentLevel)+"<"+he.name,Le=he.attribs;for(me in Le)ue.call(Le,me)&&(ce=Le[me],we+=this.writer.attribute(ce,this.writerOptions,this.currentLevel));we+=(he.children?">":"/>")+this.writer.endline(he,this.writerOptions,this.currentLevel),this.writerOptions.state=d.InsideTag}else this.writerOptions.state=d.OpenTag,we=this.writer.indent(he,this.writerOptions,this.currentLevel)+""),we+=this.writer.endline(he,this.writerOptions,this.currentLevel);return this.onData(we,this.currentLevel),he.isOpen=!0}},ae.prototype.closeNode=function(he){var ce;if(!he.isClosed)return ce="",this.writerOptions.state=d.CloseTag,he.type===u.Element?ce=this.writer.indent(he,this.writerOptions,this.currentLevel)+""+this.writer.endline(he,this.writerOptions,this.currentLevel):ce=this.writer.indent(he,this.writerOptions,this.currentLevel)+"]>"+this.writer.endline(he,this.writerOptions,this.currentLevel),this.writerOptions.state=d.None,this.onData(ce,this.currentLevel),he.isClosed=!0},ae.prototype.onData=function(he,ce){return this.documentStarted=!0,this.onDataCallback(he,ce+1)},ae.prototype.onEnd=function(){return this.documentCompleted=!0,this.onEndCallback()},ae.prototype.debugInfo=function(he){return he==null?"":"node: <"+he+">"},ae.prototype.ele=function(){return this.element.apply(this,arguments)},ae.prototype.nod=function(he,ce,we){return this.node(he,ce,we)},ae.prototype.txt=function(he){return this.text(he)},ae.prototype.dat=function(he){return this.cdata(he)},ae.prototype.com=function(he){return this.comment(he)},ae.prototype.ins=function(he,ce){return this.instruction(he,ce)},ae.prototype.dec=function(he,ce,we){return this.declaration(he,ce,we)},ae.prototype.dtd=function(he,ce,we){return this.doctype(he,ce,we)},ae.prototype.e=function(he,ce,we){return this.element(he,ce,we)},ae.prototype.n=function(he,ce,we){return this.node(he,ce,we)},ae.prototype.t=function(he){return this.text(he)},ae.prototype.d=function(he){return this.cdata(he)},ae.prototype.c=function(he){return this.comment(he)},ae.prototype.r=function(he){return this.raw(he)},ae.prototype.i=function(he,ce){return this.instruction(he,ce)},ae.prototype.att=function(){return this.currentNode&&this.currentNode.type===u.DocType?this.attList.apply(this,arguments):this.attribute.apply(this,arguments)},ae.prototype.a=function(){return this.currentNode&&this.currentNode.type===u.DocType?this.attList.apply(this,arguments):this.attribute.apply(this,arguments)},ae.prototype.ent=function(he,ce){return this.entity(he,ce)},ae.prototype.pent=function(he,ce){return this.pEntity(he,ce)},ae.prototype.not=function(he,ce){return this.notation(he,ce)},ae}()}).call(this)},{"./NodeType":428,"./Utility":429,"./WriterState":430,"./XMLAttribute":431,"./XMLCData":432,"./XMLComment":434,"./XMLDTDAttList":439,"./XMLDTDElement":440,"./XMLDTDEntity":441,"./XMLDTDNotation":442,"./XMLDeclaration":443,"./XMLDocType":444,"./XMLDocument":445,"./XMLElement":448,"./XMLProcessingInstruction":452,"./XMLRaw":453,"./XMLStringWriter":455,"./XMLStringifier":456,"./XMLText":457}],447:[function(s,E,I){(function(){var u,d,g,y=function(v,c){for(var h in c)S.call(c,h)&&(v[h]=c[h]);function m(){this.constructor=v}return m.prototype=c.prototype,v.prototype=new m,v.__super__=c.prototype,v},S={}.hasOwnProperty;g=s("./XMLNode"),u=s("./NodeType"),E.exports=d=function(v){y(c,v);function c(h){c.__super__.constructor.call(this,h),this.type=u.Dummy}return c.prototype.clone=function(){return Object.create(this)},c.prototype.toString=function(h){return""},c}(g)}).call(this)},{"./NodeType":428,"./XMLNode":450}],448:[function(s,E,I){(function(){var u,d,g,y,S,v,c,h,m,x=function(_,R){for(var A in R)T.call(R,A)&&(_[A]=R[A]);function N(){this.constructor=_}return N.prototype=R.prototype,_.prototype=new N,_.__super__=R.prototype,_},T={}.hasOwnProperty;m=s("./Utility"),h=m.isObject,c=m.isFunction,v=m.getValue,S=s("./XMLNode"),u=s("./NodeType"),d=s("./XMLAttribute"),y=s("./XMLNamedNodeMap"),E.exports=g=function(_){x(R,_);function R(A,N,L){var M,F,H,P;if(R.__super__.constructor.call(this,A),N==null)throw new Error("Missing element name. "+this.debugInfo());if(this.name=this.stringify.name(N),this.type=u.Element,this.attribs={},this.schemaTypeInfo=null,L!=null&&this.attribute(L),A.type===u.Document&&(this.isRoot=!0,this.documentObject=A,A.rootObject=this,A.children)){for(P=A.children,F=0,H=P.length;F=M;N=0<=M?++L:--L)if(!this.attribs[N].isEqualNode(A.attribs[N]))return!1;return!0},R}(S)}).call(this)},{"./NodeType":428,"./Utility":429,"./XMLAttribute":431,"./XMLNamedNodeMap":449,"./XMLNode":450}],449:[function(s,E,I){(function(){var u;E.exports=u=function(){function d(g){this.nodes=g}return Object.defineProperty(d.prototype,"length",{get:function(){return Object.keys(this.nodes).length||0}}),d.prototype.clone=function(){return this.nodes=null},d.prototype.getNamedItem=function(g){return this.nodes[g]},d.prototype.setNamedItem=function(g){var y;return y=this.nodes[g.nodeName],this.nodes[g.nodeName]=g,y||null},d.prototype.removeNamedItem=function(g){var y;return y=this.nodes[g],delete this.nodes[g],y||null},d.prototype.item=function(g){return this.nodes[Object.keys(this.nodes)[g]]||null},d.prototype.getNamedItemNS=function(g,y){throw new Error("This DOM method is not implemented.")},d.prototype.setNamedItemNS=function(g){throw new Error("This DOM method is not implemented.")},d.prototype.removeNamedItemNS=function(g,y){throw new Error("This DOM method is not implemented.")},d}()}).call(this)},{}],450:[function(s,E,I){(function(){var u,d,g,y,S,v,c,h,m,x,T,_,R,A,N,L,M,F,H,P={}.hasOwnProperty;H=s("./Utility"),F=H.isObject,M=H.isFunction,L=H.isEmpty,N=H.getValue,h=null,g=null,y=null,S=null,v=null,R=null,A=null,_=null,c=null,d=null,T=null,m=null,u=null,E.exports=x=function(){function V(G){this.parent=G,this.parent&&(this.options=this.parent.options,this.stringify=this.parent.stringify),this.value=null,this.children=[],this.baseURI=null,h||(h=s("./XMLElement"),g=s("./XMLCData"),y=s("./XMLComment"),S=s("./XMLDeclaration"),v=s("./XMLDocType"),R=s("./XMLRaw"),A=s("./XMLText"),_=s("./XMLProcessingInstruction"),c=s("./XMLDummy"),d=s("./NodeType"),T=s("./XMLNodeList"),m=s("./XMLNamedNodeMap"),u=s("./DocumentPosition"))}return Object.defineProperty(V.prototype,"nodeName",{get:function(){return this.name}}),Object.defineProperty(V.prototype,"nodeType",{get:function(){return this.type}}),Object.defineProperty(V.prototype,"nodeValue",{get:function(){return this.value}}),Object.defineProperty(V.prototype,"parentNode",{get:function(){return this.parent}}),Object.defineProperty(V.prototype,"childNodes",{get:function(){return(!this.childNodeList||!this.childNodeList.nodes)&&(this.childNodeList=new T(this.children)),this.childNodeList}}),Object.defineProperty(V.prototype,"firstChild",{get:function(){return this.children[0]||null}}),Object.defineProperty(V.prototype,"lastChild",{get:function(){return this.children[this.children.length-1]||null}}),Object.defineProperty(V.prototype,"previousSibling",{get:function(){var G;return G=this.parent.children.indexOf(this),this.parent.children[G-1]||null}}),Object.defineProperty(V.prototype,"nextSibling",{get:function(){var G;return G=this.parent.children.indexOf(this),this.parent.children[G+1]||null}}),Object.defineProperty(V.prototype,"ownerDocument",{get:function(){return this.document()||null}}),Object.defineProperty(V.prototype,"textContent",{get:function(){var G,Q,ne,ue,ae;if(this.nodeType===d.Element||this.nodeType===d.DocumentFragment){for(ae="",ue=this.children,Q=0,ne=ue.length;Q":(ne=this.parent)!=null&&ne.name?"node: <"+G+">, parent: <"+this.parent.name+">":"node: <"+G+">"},V.prototype.ele=function(G,Q,ne){return this.element(G,Q,ne)},V.prototype.nod=function(G,Q,ne){return this.node(G,Q,ne)},V.prototype.txt=function(G){return this.text(G)},V.prototype.dat=function(G){return this.cdata(G)},V.prototype.com=function(G){return this.comment(G)},V.prototype.ins=function(G,Q){return this.instruction(G,Q)},V.prototype.doc=function(){return this.document()},V.prototype.dec=function(G,Q,ne){return this.declaration(G,Q,ne)},V.prototype.e=function(G,Q,ne){return this.element(G,Q,ne)},V.prototype.n=function(G,Q,ne){return this.node(G,Q,ne)},V.prototype.t=function(G){return this.text(G)},V.prototype.d=function(G){return this.cdata(G)},V.prototype.c=function(G){return this.comment(G)},V.prototype.r=function(G){return this.raw(G)},V.prototype.i=function(G,Q){return this.instruction(G,Q)},V.prototype.u=function(){return this.up()},V.prototype.importXMLBuilder=function(G){return this.importDocument(G)},V.prototype.replaceChild=function(G,Q){throw new Error("This DOM method is not implemented."+this.debugInfo())},V.prototype.removeChild=function(G){throw new Error("This DOM method is not implemented."+this.debugInfo())},V.prototype.appendChild=function(G){throw new Error("This DOM method is not implemented."+this.debugInfo())},V.prototype.hasChildNodes=function(){return this.children.length!==0},V.prototype.cloneNode=function(G){throw new Error("This DOM method is not implemented."+this.debugInfo())},V.prototype.normalize=function(){throw new Error("This DOM method is not implemented."+this.debugInfo())},V.prototype.isSupported=function(G,Q){return!0},V.prototype.hasAttributes=function(){return this.attribs.length!==0},V.prototype.compareDocumentPosition=function(G){var Q,ne;return Q=this,Q===G?0:this.document()!==G.document()?(ne=u.Disconnected|u.ImplementationSpecific,Math.random()<.5?ne|=u.Preceding:ne|=u.Following,ne):Q.isAncestor(G)?u.Contains|u.Preceding:Q.isDescendant(G)?u.Contains|u.Following:Q.isPreceding(G)?u.Preceding:u.Following},V.prototype.isSameNode=function(G){throw new Error("This DOM method is not implemented."+this.debugInfo())},V.prototype.lookupPrefix=function(G){throw new Error("This DOM method is not implemented."+this.debugInfo())},V.prototype.isDefaultNamespace=function(G){throw new Error("This DOM method is not implemented."+this.debugInfo())},V.prototype.lookupNamespaceURI=function(G){throw new Error("This DOM method is not implemented."+this.debugInfo())},V.prototype.isEqualNode=function(G){var Q,ne,ue;if(G.nodeType!==this.nodeType||G.children.length!==this.children.length)return!1;for(Q=ne=0,ue=this.children.length-1;0<=ue?ne<=ue:ne>=ue;Q=0<=ue?++ne:--ne)if(!this.children[Q].isEqualNode(G.children[Q]))return!1;return!0},V.prototype.getFeature=function(G,Q){throw new Error("This DOM method is not implemented."+this.debugInfo())},V.prototype.setUserData=function(G,Q,ne){throw new Error("This DOM method is not implemented."+this.debugInfo())},V.prototype.getUserData=function(G){throw new Error("This DOM method is not implemented."+this.debugInfo())},V.prototype.contains=function(G){return G?G===this||this.isDescendant(G):!1},V.prototype.isDescendant=function(G){var Q,ne,ue,ae,he;for(he=this.children,ue=0,ae=he.length;uene},V.prototype.treePosition=function(G){var Q,ne;return ne=0,Q=!1,this.foreachTreeNode(this.document(),function(ue){if(ne++,!Q&&ue===G)return Q=!0}),Q?ne:-1},V.prototype.foreachTreeNode=function(G,Q){var ne,ue,ae,he,ce;for(G||(G=this.document()),he=G.children,ue=0,ae=he.length;ue0){for(this.stream.write(" ["),this.stream.write(this.endline(m,x,T)),x.state=d.InsideTag,N=m.children,R=0,A=N.length;R"),this.stream.write(this.endline(m,x,T)),x.state=d.None,this.closeNode(m,x,T)},h.prototype.element=function(m,x,T){var _,R,A,N,L,M,F,H,P,V;T||(T=0),this.openNode(m,x,T),x.state=d.OpenTag,this.stream.write(this.indent(m,x,T)+"<"+m.name),P=m.attribs;for(F in P)v.call(P,F)&&(_=P[F],this.attribute(_,x,T));if(A=m.children.length,N=A===0?null:m.children[0],A===0||m.children.every(function(G){return(G.type===u.Text||G.type===u.Raw)&&G.value===""}))x.allowEmpty?(this.stream.write(">"),x.state=d.CloseTag,this.stream.write("")):(x.state=d.CloseTag,this.stream.write(x.spaceBeforeSlash+"/>"));else if(x.pretty&&A===1&&(N.type===u.Text||N.type===u.Raw)&&N.value!=null)this.stream.write(">"),x.state=d.InsideTag,x.suppressPrettyCount++,H=!0,this.writeChildNode(N,x,T+1),x.suppressPrettyCount--,H=!1,x.state=d.CloseTag,this.stream.write("");else{for(this.stream.write(">"+this.endline(m,x,T)),x.state=d.InsideTag,V=m.children,L=0,M=V.length;L")}return this.stream.write(this.endline(m,x,T)),x.state=d.None,this.closeNode(m,x,T)},h.prototype.processingInstruction=function(m,x,T){return this.stream.write(h.__super__.processingInstruction.call(this,m,x,T))},h.prototype.raw=function(m,x,T){return this.stream.write(h.__super__.raw.call(this,m,x,T))},h.prototype.text=function(m,x,T){return this.stream.write(h.__super__.text.call(this,m,x,T))},h.prototype.dtdAttList=function(m,x,T){return this.stream.write(h.__super__.dtdAttList.call(this,m,x,T))},h.prototype.dtdElement=function(m,x,T){return this.stream.write(h.__super__.dtdElement.call(this,m,x,T))},h.prototype.dtdEntity=function(m,x,T){return this.stream.write(h.__super__.dtdEntity.call(this,m,x,T))},h.prototype.dtdNotation=function(m,x,T){return this.stream.write(h.__super__.dtdNotation.call(this,m,x,T))},h}(y)}).call(this)},{"./NodeType":428,"./WriterState":430,"./XMLWriterBase":458}],455:[function(s,E,I){(function(){var u,d,g=function(S,v){for(var c in v)y.call(v,c)&&(S[c]=v[c]);function h(){this.constructor=S}return h.prototype=v.prototype,S.prototype=new h,S.__super__=v.prototype,S},y={}.hasOwnProperty;d=s("./XMLWriterBase"),E.exports=u=function(S){g(v,S);function v(c){v.__super__.constructor.call(this,c)}return v.prototype.document=function(c,h){var m,x,T,_,R;for(h=this.filterOptions(h),_="",R=c.children,x=0,T=R.length;x","]]]]>"),this.assertLegalChar(S))},y.prototype.comment=function(S){if(this.options.noValidation)return S;if(S=""+S||"",S.match(/--/))throw new Error("Comment text cannot contain double-hypen: "+S);return this.assertLegalChar(S)},y.prototype.raw=function(S){return this.options.noValidation?S:""+S||""},y.prototype.attValue=function(S){return this.options.noValidation?S:this.assertLegalChar(this.attEscape(S=""+S||""))},y.prototype.insTarget=function(S){return this.options.noValidation?S:this.assertLegalChar(""+S||"")},y.prototype.insValue=function(S){if(this.options.noValidation)return S;if(S=""+S||"",S.match(/\?>/))throw new Error("Invalid processing instruction value: "+S);return this.assertLegalChar(S)},y.prototype.xmlVersion=function(S){if(this.options.noValidation)return S;if(S=""+S||"",!S.match(/1\.[0-9]+/))throw new Error("Invalid version number: "+S);return S},y.prototype.xmlEncoding=function(S){if(this.options.noValidation)return S;if(S=""+S||"",!S.match(/^[A-Za-z](?:[A-Za-z0-9._-])*$/))throw new Error("Invalid encoding: "+S);return this.assertLegalChar(S)},y.prototype.xmlStandalone=function(S){return this.options.noValidation?S:S?"yes":"no"},y.prototype.dtdPubID=function(S){return this.options.noValidation?S:this.assertLegalChar(""+S||"")},y.prototype.dtdSysID=function(S){return this.options.noValidation?S:this.assertLegalChar(""+S||"")},y.prototype.dtdElementValue=function(S){return this.options.noValidation?S:this.assertLegalChar(""+S||"")},y.prototype.dtdAttType=function(S){return this.options.noValidation?S:this.assertLegalChar(""+S||"")},y.prototype.dtdAttDefault=function(S){return this.options.noValidation?S:this.assertLegalChar(""+S||"")},y.prototype.dtdEntityValue=function(S){return this.options.noValidation?S:this.assertLegalChar(""+S||"")},y.prototype.dtdNData=function(S){return this.options.noValidation?S:this.assertLegalChar(""+S||"")},y.prototype.convertAttKey="@",y.prototype.convertPIKey="?",y.prototype.convertTextKey="#text",y.prototype.convertCDataKey="#cdata",y.prototype.convertCommentKey="#comment",y.prototype.convertRawKey="#raw",y.prototype.assertLegalChar=function(S){var v,c;if(this.options.noValidation)return S;if(v="",this.options.version==="1.0"){if(v=/[\0-\x08\x0B\f\x0E-\x1F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,c=S.match(v))throw new Error("Invalid character in string: "+S+" at index "+c.index)}else if(this.options.version==="1.1"&&(v=/[\0\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,c=S.match(v)))throw new Error("Invalid character in string: "+S+" at index "+c.index);return S},y.prototype.assertLegalName=function(S){var v;if(this.options.noValidation)return S;if(this.assertLegalChar(S),v=/^([:A-Z_a-z\xC0-\xD6\xD8-\xF6\xF8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]|[\uD800-\uDB7F][\uDC00-\uDFFF])([\x2D\.0-:A-Z_a-z\xB7\xC0-\xD6\xD8-\xF6\xF8-\u037D\u037F-\u1FFF\u200C\u200D\u203F\u2040\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]|[\uD800-\uDB7F][\uDC00-\uDFFF])*$/,!S.match(v))throw new Error("Invalid character in name");return S},y.prototype.textEscape=function(S){var v;return this.options.noValidation?S:(v=this.options.noDoubleEncoding?/(?!&\S+;)&/g:/&/g,S.replace(v,"&").replace(//g,">").replace(/\r/g," "))},y.prototype.attEscape=function(S){var v;return this.options.noValidation?S:(v=this.options.noDoubleEncoding?/(?!&\S+;)&/g:/&/g,S.replace(v,"&").replace(/0)?new Array(Q).join(V.indent):""},H.prototype.endline=function(P,V,G){return!V.pretty||V.suppressPrettyCount?"":V.newline},H.prototype.attribute=function(P,V,G){var Q;return this.openAttribute(P,V,G),Q=" "+P.name+'="'+P.value+'"',this.closeAttribute(P,V,G),Q},H.prototype.cdata=function(P,V,G){var Q;return this.openNode(P,V,G),V.state=d.OpenTag,Q=this.indent(P,V,G)+""+this.endline(P,V,G),V.state=d.None,this.closeNode(P,V,G),Q},H.prototype.comment=function(P,V,G){var Q;return this.openNode(P,V,G),V.state=d.OpenTag,Q=this.indent(P,V,G)+""+this.endline(P,V,G),V.state=d.None,this.closeNode(P,V,G),Q},H.prototype.declaration=function(P,V,G){var Q;return this.openNode(P,V,G),V.state=d.OpenTag,Q=this.indent(P,V,G)+"",Q+=this.endline(P,V,G),V.state=d.None,this.closeNode(P,V,G),Q},H.prototype.docType=function(P,V,G){var Q,ne,ue,ae,he;if(G||(G=0),this.openNode(P,V,G),V.state=d.OpenTag,ae=this.indent(P,V,G),ae+="0){for(ae+=" [",ae+=this.endline(P,V,G),V.state=d.InsideTag,he=P.children,ne=0,ue=he.length;ne",ae+=this.endline(P,V,G),V.state=d.None,this.closeNode(P,V,G),ae},H.prototype.element=function(P,V,G){var Q,ne,ue,ae,he,ce,we,me,Le,ee,se,le,ke,De;G||(G=0),ee=!1,se="",this.openNode(P,V,G),V.state=d.OpenTag,se+=this.indent(P,V,G)+"<"+P.name,le=P.attribs;for(Le in le)F.call(le,Le)&&(Q=le[Le],se+=this.attribute(Q,V,G));if(ue=P.children.length,ae=ue===0?null:P.children[0],ue===0||P.children.every(function(Be){return(Be.type===u.Text||Be.type===u.Raw)&&Be.value===""}))V.allowEmpty?(se+=">",V.state=d.CloseTag,se+=""+this.endline(P,V,G)):(V.state=d.CloseTag,se+=V.spaceBeforeSlash+"/>"+this.endline(P,V,G));else if(V.pretty&&ue===1&&(ae.type===u.Text||ae.type===u.Raw)&&ae.value!=null)se+=">",V.state=d.InsideTag,V.suppressPrettyCount++,ee=!0,se+=this.writeChildNode(ae,V,G+1),V.suppressPrettyCount--,ee=!1,V.state=d.CloseTag,se+=""+this.endline(P,V,G);else{if(V.dontPrettyTextNodes){for(ke=P.children,he=0,we=ke.length;he"+this.endline(P,V,G),V.state=d.InsideTag,De=P.children,ce=0,me=De.length;ce",ee&&V.suppressPrettyCount--,se+=this.endline(P,V,G),V.state=d.None}return this.closeNode(P,V,G),se},H.prototype.writeChildNode=function(P,V,G){switch(P.type){case u.CData:return this.cdata(P,V,G);case u.Comment:return this.comment(P,V,G);case u.Element:return this.element(P,V,G);case u.Raw:return this.raw(P,V,G);case u.Text:return this.text(P,V,G);case u.ProcessingInstruction:return this.processingInstruction(P,V,G);case u.Dummy:return"";case u.Declaration:return this.declaration(P,V,G);case u.DocType:return this.docType(P,V,G);case u.AttributeDeclaration:return this.dtdAttList(P,V,G);case u.ElementDeclaration:return this.dtdElement(P,V,G);case u.EntityDeclaration:return this.dtdEntity(P,V,G);case u.NotationDeclaration:return this.dtdNotation(P,V,G);default:throw new Error("Unknown XML node type: "+P.constructor.name)}},H.prototype.processingInstruction=function(P,V,G){var Q;return this.openNode(P,V,G),V.state=d.OpenTag,Q=this.indent(P,V,G)+"",Q+=this.endline(P,V,G),V.state=d.None,this.closeNode(P,V,G),Q},H.prototype.raw=function(P,V,G){var Q;return this.openNode(P,V,G),V.state=d.OpenTag,Q=this.indent(P,V,G),V.state=d.InsideTag,Q+=P.value,V.state=d.CloseTag,Q+=this.endline(P,V,G),V.state=d.None,this.closeNode(P,V,G),Q},H.prototype.text=function(P,V,G){var Q;return this.openNode(P,V,G),V.state=d.OpenTag,Q=this.indent(P,V,G),V.state=d.InsideTag,Q+=P.value,V.state=d.CloseTag,Q+=this.endline(P,V,G),V.state=d.None,this.closeNode(P,V,G),Q},H.prototype.dtdAttList=function(P,V,G){var Q;return this.openNode(P,V,G),V.state=d.OpenTag,Q=this.indent(P,V,G)+""+this.endline(P,V,G),V.state=d.None,this.closeNode(P,V,G),Q},H.prototype.dtdElement=function(P,V,G){var Q;return this.openNode(P,V,G),V.state=d.OpenTag,Q=this.indent(P,V,G)+""+this.endline(P,V,G),V.state=d.None,this.closeNode(P,V,G),Q},H.prototype.dtdEntity=function(P,V,G){var Q;return this.openNode(P,V,G),V.state=d.OpenTag,Q=this.indent(P,V,G)+""+this.endline(P,V,G),V.state=d.None,this.closeNode(P,V,G),Q},H.prototype.dtdNotation=function(P,V,G){var Q;return this.openNode(P,V,G),V.state=d.OpenTag,Q=this.indent(P,V,G)+""+this.endline(P,V,G),V.state=d.None,this.closeNode(P,V,G),Q},H.prototype.openNode=function(P,V,G){},H.prototype.closeNode=function(P,V,G){},H.prototype.openAttribute=function(P,V,G){},H.prototype.closeAttribute=function(P,V,G){},H}()}).call(this)},{"./NodeType":428,"./Utility":429,"./WriterState":430,"./XMLCData":432,"./XMLComment":434,"./XMLDTDAttList":439,"./XMLDTDElement":440,"./XMLDTDEntity":441,"./XMLDTDNotation":442,"./XMLDeclaration":443,"./XMLDocType":444,"./XMLDummy":447,"./XMLElement":448,"./XMLProcessingInstruction":452,"./XMLRaw":453,"./XMLText":457}],459:[function(s,E,I){(function(){var u,d,g,y,S,v,c,h,m,x;x=s("./Utility"),h=x.assign,m=x.isFunction,g=s("./XMLDOMImplementation"),y=s("./XMLDocument"),S=s("./XMLDocumentCB"),c=s("./XMLStringWriter"),v=s("./XMLStreamWriter"),u=s("./NodeType"),d=s("./WriterState"),E.exports.create=function(T,_,R,A){var N,L;if(T==null)throw new Error("Root element needs a name.");return A=h({},_,R,A),N=new y(A),L=N.element(T),A.headless||(N.declaration(A),(A.pubID!=null||A.sysID!=null)&&N.dtd(A)),L},E.exports.begin=function(T,_,R){var A;return m(T)&&(A=[T,_],_=A[0],R=A[1],T={}),_?new S(T,_,R):new y(T)},E.exports.stringWriter=function(T){return new c(T)},E.exports.streamWriter=function(T,_){return new v(T,_)},E.exports.implementation=new g,E.exports.nodeType=u,E.exports.writerState=d}).call(this)},{"./NodeType":428,"./Utility":429,"./WriterState":430,"./XMLDOMImplementation":437,"./XMLDocument":445,"./XMLDocumentCB":446,"./XMLStreamWriter":454,"./XMLStringWriter":455}],460:[function(s,E,I){E.exports=d;var u=Object.prototype.hasOwnProperty;function d(){for(var g={},y=0;yS?T=x(T):T.length>5]|=128<<_%32,T[(_+64>>>9<<4)+14]=_;for(var R=1732584193,A=-271733879,N=-1732584194,L=271733878,M=0;M>16)+(_>>16)+(R>>16);return A<<16|R&65535}function x(T,_){return T<<_|T>>>32-_}E.exports=function(_){return u.hash(_,g,16)}},{"./helpers":462}],464:[function(s,E,I){"use strict";var u=s("./helpers");function d(c,h){c[h>>5]|=128<<24-h%32,c[(h+64>>9<<4)+15]=h;for(var m=Array(80),x=1732584193,T=-271733879,_=-1732584194,R=271733878,A=-1009589776,N=0;N>16)+(h>>16)+(m>>16);return x<<16|m&65535}function v(c,h){return c<>>32-h}E.exports=function(h){return u.hash(h,d,20,!0)}},{"./helpers":462}],465:[function(s,E,I){"use strict";E.exports=function(){return function(){}}},{}],466:[function(s,E,I){(function(u){(function(){"use strict";var d=s("@babel/runtime/helpers/interopRequireDefault"),g=d(s("@babel/runtime/helpers/typeof")),y=s("stream"),S=y.Stream,v=s("../lib/common/utils/isArray"),c=v.isArray;E.exports.string=function(x){return typeof x=="string"},E.exports.array=c,E.exports.buffer=u.isBuffer;function h(m){return m instanceof S}E.exports.writableStream=function(x){return h(x)&&typeof x._write=="function"&&(0,g.default)(x._writableState)==="object"}}).call(this)}).call(this,{isBuffer:s("../node_modules/is-buffer/index.js")})},{"../lib/common/utils/isArray":63,"../node_modules/is-buffer/index.js":366,"@babel/runtime/helpers/interopRequireDefault":78,"@babel/runtime/helpers/typeof":79,stream:398}],467:[function(s,E,I){"use strict";var u=s("immediate"),d=E.exports={};d.nextTick=u,d.title="browser",d.browser=!0,d.env={},d.argv=[],d.version="",d.versions={};function g(){}d.on=g,d.addListener=g,d.once=g,d.off=g,d.removeListener=g,d.removeAllListeners=g,d.emit=g,d.prependListener=g,d.prependOnceListener=g,d.listeners=function(y){return[]},d.binding=function(y){throw new Error("process.binding is not supported")},d.cwd=function(){return"/"},d.chdir=function(y){throw new Error("process.chdir is not supported")},d.umask=function(){return 0}},{immediate:358}],468:[function(s,E,I){(function(u){(function(){"use strict";s("core-js/modules/es.regexp.exec.js"),s("core-js/modules/es.string.search.js");var d=s("./lib/request"),g=s("./lib/response"),y=s("xtend"),S=s("builtin-status-codes"),v=s("url"),c=I;c.request=function(h,m){typeof h=="string"?h=v.parse(h):h=y(h);var x=u.location.protocol.search(/^https?:$/)===-1?"http:":"",T=h.protocol||x,_=h.hostname||h.host,R=h.port,A=h.path||"/";_&&_.indexOf(":")!==-1&&(_="["+_+"]"),h.url=(_?T+"//"+_:"")+(R?":"+R:"")+A,h.method=(h.method||"GET").toUpperCase(),h.headers=h.headers||{};var N=new d(h);return m&&N.on("response",m),N},c.get=function(m,x){var T=c.request(m,x);return T.end(),T},c.ClientRequest=d,c.IncomingMessage=g.IncomingMessage,c.Agent=function(){},c.Agent.defaultMaxSockets=4,c.globalAgent=new c.Agent,c.STATUS_CODES=S,c.METHODS=["CHECKOUT","CONNECT","COPY","DELETE","GET","HEAD","LOCK","M-SEARCH","MERGE","MKACTIVITY","MKCOL","MOVE","NOTIFY","OPTIONS","PATCH","POST","PROPFIND","PROPPATCH","PURGE","PUT","REPORT","SEARCH","SUBSCRIBE","TRACE","UNLOCK","UNSUBSCRIBE"]}).call(this)}).call(this,typeof Z!="undefined"?Z:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{"./lib/request":470,"./lib/response":471,"builtin-status-codes":91,"core-js/modules/es.regexp.exec.js":300,"core-js/modules/es.string.search.js":306,url:472,xtend:460}],469:[function(s,E,I){(function(u){(function(){"use strict";s("core-js/modules/es.object.to-string.js"),s("core-js/modules/es.promise.js"),s("core-js/modules/es.array-buffer.constructor.js"),s("core-js/modules/es.array-buffer.slice.js"),s("core-js/modules/es.array.slice.js"),I.fetch=c(u.fetch)&&c(u.ReadableStream),I.writableStream=c(u.WritableStream),I.abortController=c(u.AbortController),I.blobConstructor=!1;try{new Blob([new ArrayBuffer(1)]),I.blobConstructor=!0}catch(h){}var d;function g(){if(d!==void 0)return d;if(u.XMLHttpRequest){d=new u.XMLHttpRequest;try{d.open("GET",u.XDomainRequest?"/":"https://example.com")}catch(h){d=null}}else d=null;return d}function y(h){var m=g();if(!m)return!1;try{return m.responseType=h,m.responseType===h}catch(x){}return!1}var S=typeof u.ArrayBuffer!="undefined",v=S&&c(u.ArrayBuffer.prototype.slice);I.arraybuffer=I.fetch||S&&y("arraybuffer"),I.msstream=!I.fetch&&v&&y("ms-stream"),I.mozchunkedarraybuffer=!I.fetch&&S&&y("moz-chunked-arraybuffer"),I.overrideMimeType=I.fetch||(g()?c(g().overrideMimeType):!1),I.vbArray=c(u.VBArray);function c(h){return typeof h=="function"}d=null}).call(this)}).call(this,typeof Z!="undefined"?Z:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{"core-js/modules/es.array-buffer.constructor.js":270,"core-js/modules/es.array-buffer.slice.js":271,"core-js/modules/es.array.slice.js":281,"core-js/modules/es.object.to-string.js":291,"core-js/modules/es.promise.js":295}],470:[function(s,E,I){(function(u,d,g){(function(){"use strict";s("core-js/modules/es.object.to-string.js"),s("core-js/modules/es.regexp.to-string.js"),s("core-js/modules/web.dom-collections.for-each.js"),s("core-js/modules/es.object.keys.js"),s("core-js/modules/es.array.concat.js"),s("core-js/modules/es.array.map.js"),s("core-js/modules/es.function.name.js"),s("core-js/modules/es.promise.js"),s("core-js/modules/es.regexp.exec.js"),s("core-js/modules/es.string.split.js");var y=s("./capability"),S=s("inherits"),v=s("./response"),c=s("readable-stream"),h=s("to-arraybuffer"),m=v.IncomingMessage,x=v.readyStates;function T(N,L){return y.fetch&&L?"fetch":y.mozchunkedarraybuffer?"moz-chunked-arraybuffer":y.msstream?"ms-stream":y.arraybuffer&&N?"arraybuffer":y.vbArray&&N?"text:vbarray":"text"}var _=E.exports=function(N){var L=this;c.Writable.call(L),L._opts=N,L._body=[],L._headers={},N.auth&&L.setHeader("Authorization","Basic "+new g(N.auth).toString("base64")),Object.keys(N.headers).forEach(function(H){L.setHeader(H,N.headers[H])});var M,F=!0;if(N.mode==="disable-fetch"||"requestTimeout"in N&&!y.abortController)F=!1,M=!0;else if(N.mode==="prefer-streaming")M=!1;else if(N.mode==="allow-wrong-content-type")M=!y.overrideMimeType;else if(!N.mode||N.mode==="default"||N.mode==="prefer-fast")M=!0;else throw new Error("Invalid value for opts.mode");L._mode=T(M,F),L._fetchTimer=null,L.on("finish",function(){L._onFinish()})};S(_,c.Writable),_.prototype.setHeader=function(N,L){var M=this,F=N.toLowerCase();A.indexOf(F)===-1&&(M._headers[F]={name:N,value:L})},_.prototype.getHeader=function(N){var L=this._headers[N.toLowerCase()];return L?L.value:null},_.prototype.removeHeader=function(N){var L=this;delete L._headers[N.toLowerCase()]},_.prototype._onFinish=function(){var N=this;if(!N._destroyed){var L=N._opts,M=N._headers,F=null;L.method!=="GET"&&L.method!=="HEAD"&&(y.arraybuffer?F=h(g.concat(N._body)):y.blobConstructor?F=new d.Blob(N._body.map(function(ne){return h(ne)}),{type:(M["content-type"]||{}).value||""}):F=g.concat(N._body).toString());var H=[];if(Object.keys(M).forEach(function(ne){var ue=M[ne].name,ae=M[ne].value;Array.isArray(ae)?ae.forEach(function(he){H.push([ue,he])}):H.push([ue,ae])}),N._mode==="fetch"){var P=null,V=null;if(y.abortController){var G=new AbortController;P=G.signal,N._fetchAbortController=G,"requestTimeout"in L&&L.requestTimeout!==0&&(N._fetchTimer=d.setTimeout(function(){N.emit("requestTimeout"),N._fetchAbortController&&N._fetchAbortController.abort()},L.requestTimeout))}d.fetch(N._opts.url,{method:N._opts.method,headers:H,body:F||void 0,mode:"cors",credentials:L.withCredentials?"include":"same-origin",signal:P}).then(function(ne){N._fetchResponse=ne,N._connect()},function(ne){d.clearTimeout(N._fetchTimer),N._destroyed||N.emit("error",ne)})}else{var Q=N._xhr=new d.XMLHttpRequest;try{Q.open(N._opts.method,N._opts.url,!0)}catch(ne){u.nextTick(function(){N.emit("error",ne)});return}"responseType"in Q&&(Q.responseType=N._mode.split(":")[0]),"withCredentials"in Q&&(Q.withCredentials=!!L.withCredentials),N._mode==="text"&&"overrideMimeType"in Q&&Q.overrideMimeType("text/plain; charset=x-user-defined"),"requestTimeout"in L&&(Q.timeout=L.requestTimeout,Q.ontimeout=function(){N.emit("requestTimeout")}),H.forEach(function(ne){Q.setRequestHeader(ne[0],ne[1])}),N._response=null,Q.onreadystatechange=function(){switch(Q.readyState){case x.LOADING:case x.DONE:N._onXHRProgress();break}},N._mode==="moz-chunked-arraybuffer"&&(Q.onprogress=function(){N._onXHRProgress()}),Q.onerror=function(){N._destroyed||N.emit("error",new Error("XHR error"))};try{Q.send(F)}catch(ne){u.nextTick(function(){N.emit("error",ne)});return}}}};function R(N){try{var L=N.status;return L!==null&&L!==0}catch(M){return!1}}_.prototype._onXHRProgress=function(){var N=this;!R(N._xhr)||N._destroyed||(N._response||N._connect(),N._response._onXHRProgress())},_.prototype._connect=function(){var N=this;N._destroyed||(N._response=new m(N._xhr,N._fetchResponse,N._mode,N._fetchTimer),N._response.on("error",function(L){N.emit("error",L)}),N.emit("response",N._response))},_.prototype._write=function(N,L,M){var F=this;F._body.push(N),M()},_.prototype.abort=_.prototype.destroy=function(){var N=this;N._destroyed=!0,d.clearTimeout(N._fetchTimer),N._response&&(N._response._destroyed=!0),N._xhr?N._xhr.abort():N._fetchAbortController&&N._fetchAbortController.abort()},_.prototype.end=function(N,L,M){var F=this;typeof N=="function"&&(M=N,N=void 0),c.Writable.prototype.end.call(F,N,L,M)},_.prototype.flushHeaders=function(){},_.prototype.setTimeout=function(){},_.prototype.setNoDelay=function(){},_.prototype.setSocketKeepAlive=function(){};var A=["accept-charset","accept-encoding","access-control-request-headers","access-control-request-method","connection","content-length","cookie","cookie2","date","dnt","expect","host","keep-alive","origin","referer","te","trailer","transfer-encoding","upgrade","user-agent","via"]}).call(this)}).call(this,s("_process"),typeof Z!="undefined"?Z:typeof self!="undefined"?self:typeof window!="undefined"?window:{},s("buffer").Buffer)},{"./capability":469,"./response":471,_process:467,buffer:90,"core-js/modules/es.array.concat.js":272,"core-js/modules/es.array.map.js":280,"core-js/modules/es.function.name.js":284,"core-js/modules/es.object.keys.js":290,"core-js/modules/es.object.to-string.js":291,"core-js/modules/es.promise.js":295,"core-js/modules/es.regexp.exec.js":300,"core-js/modules/es.regexp.to-string.js":301,"core-js/modules/es.string.split.js":307,"core-js/modules/web.dom-collections.for-each.js":339,inherits:364,"readable-stream":394,"to-arraybuffer":415}],471:[function(s,E,I){(function(u,d,g){(function(){"use strict";s("core-js/modules/es.object.to-string.js"),s("core-js/modules/web.dom-collections.for-each.js"),s("core-js/modules/es.promise.js"),s("core-js/modules/es.regexp.exec.js"),s("core-js/modules/es.string.split.js"),s("core-js/modules/es.string.match.js"),s("core-js/modules/es.array.iterator.js"),s("core-js/modules/es.array-buffer.slice.js"),s("core-js/modules/es.typed-array.uint8-array.js"),s("core-js/modules/es.typed-array.copy-within.js"),s("core-js/modules/es.typed-array.every.js"),s("core-js/modules/es.typed-array.fill.js"),s("core-js/modules/es.typed-array.filter.js"),s("core-js/modules/es.typed-array.find.js"),s("core-js/modules/es.typed-array.find-index.js"),s("core-js/modules/es.typed-array.for-each.js"),s("core-js/modules/es.typed-array.includes.js"),s("core-js/modules/es.typed-array.index-of.js"),s("core-js/modules/es.typed-array.iterator.js"),s("core-js/modules/es.typed-array.join.js"),s("core-js/modules/es.typed-array.last-index-of.js"),s("core-js/modules/es.typed-array.map.js"),s("core-js/modules/es.typed-array.reduce.js"),s("core-js/modules/es.typed-array.reduce-right.js"),s("core-js/modules/es.typed-array.reverse.js"),s("core-js/modules/es.typed-array.set.js"),s("core-js/modules/es.typed-array.slice.js"),s("core-js/modules/es.typed-array.some.js"),s("core-js/modules/es.typed-array.sort.js"),s("core-js/modules/es.typed-array.subarray.js"),s("core-js/modules/es.typed-array.to-locale-string.js"),s("core-js/modules/es.typed-array.to-string.js"),s("core-js/modules/es.array.slice.js");var y=s("./capability"),S=s("inherits"),v=s("readable-stream"),c=I.readyStates={UNSENT:0,OPENED:1,HEADERS_RECEIVED:2,LOADING:3,DONE:4},h=I.IncomingMessage=function(m,x,T,_){var R=this;if(v.Readable.call(R),R._mode=T,R.headers={},R.rawHeaders=[],R.trailers={},R.rawTrailers=[],R.on("end",function(){u.nextTick(function(){R.emit("close")})}),T==="fetch"){var A=function P(){L.read().then(function(V){if(!R._destroyed){if(V.done){d.clearTimeout(_),R.push(null);return}R.push(new g(V.value)),P()}}).catch(function(V){d.clearTimeout(_),R._destroyed||R.emit("error",V)})};if(R._fetchResponse=x,R.url=x.url,R.statusCode=x.status,R.statusMessage=x.statusText,x.headers.forEach(function(P,V){R.headers[V.toLowerCase()]=P,R.rawHeaders.push(V,P)}),y.writableStream){var N=new WritableStream({write:function(V){return new Promise(function(G,Q){R._destroyed?Q():R.push(new g(V))?G():R._resumeFetch=G})},close:function(){d.clearTimeout(_),R._destroyed||R.push(null)},abort:function(V){R._destroyed||R.emit("error",V)}});try{x.body.pipeTo(N).catch(function(P){d.clearTimeout(_),R._destroyed||R.emit("error",P)});return}catch(P){}}var L=x.body.getReader();A()}else{R._xhr=m,R._pos=0,R.url=m.responseURL,R.statusCode=m.status,R.statusMessage=m.statusText;var M=m.getAllResponseHeaders().split(/\r?\n/);if(M.forEach(function(P){var V=P.match(/^([^:]+):\s*(.*)/);if(V){var G=V[1].toLowerCase();G==="set-cookie"?(R.headers[G]===void 0&&(R.headers[G]=[]),R.headers[G].push(V[2])):R.headers[G]!==void 0?R.headers[G]+=", "+V[2]:R.headers[G]=V[2],R.rawHeaders.push(V[1],V[2])}}),R._charset="x-user-defined",!y.overrideMimeType){var F=R.rawHeaders["mime-type"];if(F){var H=F.match(/;\s*charset=([^;])(;|$)/);H&&(R._charset=H[1].toLowerCase())}R._charset||(R._charset="utf-8")}}};S(h,v.Readable),h.prototype._read=function(){var m=this,x=m._resumeFetch;x&&(m._resumeFetch=null,x())},h.prototype._onXHRProgress=function(){var m=this,x=m._xhr,T=null;switch(m._mode){case"text:vbarray":if(x.readyState!==c.DONE)break;try{T=new d.VBArray(x.responseBody).toArray()}catch(L){}if(T!==null){m.push(new g(T));break}case"text":try{T=x.responseText}catch(L){m._mode="text:vbarray";break}if(T.length>m._pos){var _=T.substr(m._pos);if(m._charset==="x-user-defined"){for(var R=new g(_.length),A=0;A<_.length;A++)R[A]=_.charCodeAt(A)&255;m.push(R)}else m.push(_,m._charset);m._pos=T.length}break;case"arraybuffer":if(x.readyState!==c.DONE||!x.response)break;T=x.response,m.push(new g(new Uint8Array(T)));break;case"moz-chunked-arraybuffer":if(T=x.response,x.readyState!==c.LOADING||!T)break;m.push(new g(new Uint8Array(T)));break;case"ms-stream":if(T=x.response,x.readyState!==c.LOADING)break;var N=new d.MSStreamReader;N.onprogress=function(){N.result.byteLength>m._pos&&(m.push(new g(new Uint8Array(N.result.slice(m._pos)))),m._pos=N.result.byteLength)},N.onload=function(){m.push(null)},N.readAsArrayBuffer(T);break}m._xhr.readyState===c.DONE&&m._mode!=="ms-stream"&&m.push(null)}}).call(this)}).call(this,s("_process"),typeof Z!="undefined"?Z:typeof self!="undefined"?self:typeof window!="undefined"?window:{},s("buffer").Buffer)},{"./capability":469,_process:467,buffer:90,"core-js/modules/es.array-buffer.slice.js":271,"core-js/modules/es.array.iterator.js":278,"core-js/modules/es.array.slice.js":281,"core-js/modules/es.object.to-string.js":291,"core-js/modules/es.promise.js":295,"core-js/modules/es.regexp.exec.js":300,"core-js/modules/es.string.match.js":304,"core-js/modules/es.string.split.js":307,"core-js/modules/es.typed-array.copy-within.js":315,"core-js/modules/es.typed-array.every.js":316,"core-js/modules/es.typed-array.fill.js":317,"core-js/modules/es.typed-array.filter.js":318,"core-js/modules/es.typed-array.find-index.js":319,"core-js/modules/es.typed-array.find.js":320,"core-js/modules/es.typed-array.for-each.js":321,"core-js/modules/es.typed-array.includes.js":322,"core-js/modules/es.typed-array.index-of.js":323,"core-js/modules/es.typed-array.iterator.js":324,"core-js/modules/es.typed-array.join.js":325,"core-js/modules/es.typed-array.last-index-of.js":326,"core-js/modules/es.typed-array.map.js":327,"core-js/modules/es.typed-array.reduce-right.js":328,"core-js/modules/es.typed-array.reduce.js":329,"core-js/modules/es.typed-array.reverse.js":330,"core-js/modules/es.typed-array.set.js":331,"core-js/modules/es.typed-array.slice.js":332,"core-js/modules/es.typed-array.some.js":333,"core-js/modules/es.typed-array.sort.js":334,"core-js/modules/es.typed-array.subarray.js":335,"core-js/modules/es.typed-array.to-locale-string.js":336,"core-js/modules/es.typed-array.to-string.js":337,"core-js/modules/es.typed-array.uint8-array.js":338,"core-js/modules/web.dom-collections.for-each.js":339,inherits:364,"readable-stream":394}],472:[function(s,E,I){"use strict";var u=s("@babel/runtime/helpers/interopRequireDefault"),d=u(s("@babel/runtime/helpers/typeof"));s("core-js/modules/es.regexp.exec.js"),s("core-js/modules/es.string.search.js"),s("core-js/modules/es.array.concat.js"),s("core-js/modules/es.string.split.js"),s("core-js/modules/es.string.replace.js"),s("core-js/modules/es.array.join.js"),s("core-js/modules/es.string.trim.js"),s("core-js/modules/es.string.match.js"),s("core-js/modules/es.array.slice.js"),s("core-js/modules/es.object.keys.js"),s("core-js/modules/es.array.splice.js");var g=s("punycode"),y=s("./util");I.parse=V,I.resolve=Q,I.resolveObject=ne,I.format=G,I.Url=S;function S(){this.protocol=null,this.slashes=null,this.auth=null,this.host=null,this.port=null,this.hostname=null,this.hash=null,this.search=null,this.query=null,this.pathname=null,this.path=null,this.href=null}var v=/^([a-z0-9.+-]+:)/i,c=/:[0-9]*$/,h=/^(\/\/?(?!\/)[^\?\s]*)(\?[^\s]*)?$/,m=["<",">",'"',"`"," ","\r",` `," "],x=["{","}","|","\\","^","`"].concat(m),T=["'"].concat(x),_=["%","/","?",";","#"].concat(T),R=["/","?","#"],A=255,N=/^[+a-z0-9A-Z_-]{0,63}$/,L=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,M={javascript:!0,"javascript:":!0},F={javascript:!0,"javascript:":!0},H={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0},P=s("querystring");function V(ue,ae,he){if(ue&&y.isObject(ue)&&ue instanceof S)return ue;var ce=new S;return ce.parse(ue,ae,he),ce}S.prototype.parse=function(ue,ae,he){if(!y.isString(ue))throw new TypeError("Parameter 'url' must be a string, not "+(0,d.default)(ue));var ce=ue.indexOf("?"),we=ce!==-1&&ce127?fe+="x":fe+=pe[z];if(!fe.match(N)){var be=Re.slice(0,He),_e=Re.slice(He+1),oe=pe.match(L);oe&&(be.push(oe[1]),_e.unshift(oe[2])),_e.length&&(ee="/"+_e.join(".")+ee),this.hostname=be.join(".");break}}}this.hostname.length>A?this.hostname="":this.hostname=this.hostname.toLowerCase(),lt||(this.hostname=g.toASCII(this.hostname));var ie=this.port?":"+this.port:"",ve=this.hostname||"";this.host=ve+ie,this.href+=this.host,lt&&(this.hostname=this.hostname.substr(1,this.hostname.length-2),ee[0]!=="/"&&(ee="/"+ee))}if(!M[ke])for(var He=0,Oe=T.length;He0?he.host.split("@"):!1;fe&&(he.auth=fe.shift(),he.host=he.hostname=fe.shift())}return he.search=ue.search,he.query=ue.query,(!y.isNull(he.pathname)||!y.isNull(he.search))&&(he.path=(he.pathname?he.pathname:"")+(he.search?he.search:"")),he.href=he.format(),he}if(!Re.length)return he.pathname=null,he.search?he.path="/"+he.search:he.path=null,he.href=he.format(),he;for(var z=Re.slice(-1)[0],J=(he.host||ue.host||Re.length>1)&&(z==="."||z==="..")||z==="",be=0,_e=Re.length;_e>=0;_e--)z=Re[_e],z==="."?Re.splice(_e,1):z===".."?(Re.splice(_e,1),be++):be&&(Re.splice(_e,1),be--);if(!Me&&!lt)for(;be--;be)Re.unshift("..");Me&&Re[0]!==""&&(!Re[0]||Re[0].charAt(0)!=="/")&&Re.unshift(""),J&&Re.join("/").substr(-1)!=="/"&&Re.push("");var oe=Re[0]===""||Re[0]&&Re[0].charAt(0)==="/";if(pe){he.hostname=he.host=oe?"":Re.length?Re.shift():"";var fe=he.host&&he.host.indexOf("@")>0?he.host.split("@"):!1;fe&&(he.auth=fe.shift(),he.host=he.hostname=fe.shift())}return Me=Me||he.host&&Re.length,Me&&!oe&&Re.unshift(""),Re.length?he.pathname=Re.join("/"):(he.pathname=null,he.path=null),(!y.isNull(he.pathname)||!y.isNull(he.search))&&(he.path=(he.pathname?he.pathname:"")+(he.search?he.search:"")),he.auth=ue.auth||he.auth,he.slashes=he.slashes||ue.slashes,he.href=he.format(),he},S.prototype.parseHost=function(){var ue=this.host,ae=c.exec(ue);ae&&(ae=ae[0],ae!==":"&&(this.port=ae.substr(1)),ue=ue.substr(0,ue.length-ae.length)),ue&&(this.hostname=ue)}},{"./util":473,"@babel/runtime/helpers/interopRequireDefault":78,"@babel/runtime/helpers/typeof":79,"core-js/modules/es.array.concat.js":272,"core-js/modules/es.array.join.js":279,"core-js/modules/es.array.slice.js":281,"core-js/modules/es.array.splice.js":283,"core-js/modules/es.object.keys.js":290,"core-js/modules/es.regexp.exec.js":300,"core-js/modules/es.string.match.js":304,"core-js/modules/es.string.replace.js":305,"core-js/modules/es.string.search.js":306,"core-js/modules/es.string.split.js":307,"core-js/modules/es.string.trim.js":308,punycode:382,querystring:385}],473:[function(s,E,I){"use strict";var u=s("@babel/runtime/helpers/interopRequireDefault"),d=u(s("@babel/runtime/helpers/typeof"));E.exports={isString:function(y){return typeof y=="string"},isObject:function(y){return(0,d.default)(y)==="object"&&y!==null},isNull:function(y){return y===null},isNullOrUndefined:function(y){return y==null}}},{"@babel/runtime/helpers/interopRequireDefault":78,"@babel/runtime/helpers/typeof":79}],474:[function(s,E,I){"use strict";s("core-js/modules/es.number.constructor.js"),I.encodeURIComponent=function(u){try{return encodeURIComponent(u)}catch(d){return u}},I.escape=s("escape-html"),I.timestamp=function(d){if(d){var g=d;return typeof g=="string"&&(g=Number(g)),String(d).length===10&&(g*=1e3),new Date(g)}return Math.round(Date.now()/1e3)}},{"core-js/modules/es.number.constructor.js":286,"escape-html":343}],475:[function(s,E,I){(function(u,d){(function(){"use strict";var g=s("@babel/runtime/helpers/interopRequireDefault"),y=g(s("@babel/runtime/helpers/typeof"));s("core-js/modules/es.string.trim.js"),s("core-js/modules/es.regexp.exec.js"),s("core-js/modules/es.string.split.js"),s("core-js/modules/es.object.to-string.js"),s("core-js/modules/es.promise.js"),s("core-js/modules/es.function.name.js"),s("core-js/modules/es.array.concat.js");var S=s("util"),v=s("url"),c=s("http"),h=s("https"),m=s("debug")("urllib"),x=s("humanize-ms"),T=0,_=Math.pow(2,31)-10,R=/^https?:\/\//i;function A(F,H){return F===void 0?H:F}function N(F){return F?F.split(";")[0].trim().toLowerCase():""}function L(F,H){return function(P,V,G){if(P)return H(P);F({data:V,status:G.statusCode,headers:G.headers,res:G})}}I.TIMEOUTS=[x("300s"),x("300s")];var M=["json","text"];I.request=function(H,P,V){return arguments.length===2&&typeof P=="function"&&(V=P,P=null),typeof V=="function"?I.requestWithCallback(H,P,V):new Promise(function(G,Q){I.requestWithCallback(H,P,L(G,Q))})},I.requestWithCallback=function(H,P,V){if(!H||typeof H!="string"&&(0,y.default)(H)!=="object"){var G=S.format("expect request url to be a string or a http request options, but got %j",H);throw new Error(G)}arguments.length===2&&typeof P=="function"&&(V=P,P=null),P=P||{},T>=_&&(T=0);var Q=++T;P.requestUrls=P.requestUrls||[];var ne={requestId:Q,url:H,args:P,ctx:P.ctx};P.emitter&&P.emitter.emit("request",ne),P.timeout=P.timeout||I.TIMEOUTS,P.maxRedirects=P.maxRedirects||10,P.streaming=P.streaming||P.customResponse;var ue=Date.now(),ae;typeof H=="string"?(R.test(H)||(H="https://"+H),ae=v.parse(H)):ae=H;var he=(P.type||P.method||ae.method||"GET").toUpperCase(),ce=ae.port||80,we=c,me=A(P.agent,I.agent),Le=P.fixJSONCtlChars;ae.protocol==="https:"&&(we=h,me=A(P.httpsAgent,I.httpsAgent),ae.port||(ce=443));var ee={host:ae.hostname||ae.host||"localhost",path:ae.path||"/",method:he,port:ce,agent:me,headers:P.headers||{},lookup:P.lookup};Array.isArray(P.timeout)?ee.requestTimeout=P.timeout[P.timeout.length-1]:typeof P.timeout!="undefined"&&(ee.requestTimeout=P.timeout);var se=P.auth||ae.auth;se&&(ee.auth=se);var le=P.content||P.data,ke=he==="GET"||he==="HEAD"||P.dataAsQueryString;if(!P.content&&le&&!(typeof le=="string"||d.isBuffer(le)))if(ke)le=P.nestedQuerystring?qs.stringify(le):querystring.stringify(le);else{var De=ee.headers["Content-Type"]||ee.headers["content-type"];De||(P.contentType==="json"?De="application/json":De="application/x-www-form-urlencoded",ee.headers["Content-Type"]=De),N(De)==="application/json"?le=JSON.stringify(le):le=P.nestedQuerystring?qs.stringify(le):querystring.stringify(le)}ke&&le&&(ee.path+=(ae.query?"&":"?")+le,le=null);var Be=0;if(le){var He=le.length;d.isBuffer(le)||(He=d.byteLength(le)),Be=ee.headers["Content-Length"]=He}P.dataType==="json"&&(ee.headers.Accept="application/json"),typeof P.beforeRequest=="function"&&P.beforeRequest(ee);var Fe=null,Je=null,Me=null,lt=!1,Re=!1,Oe=0,pe=-1,fe=!1,z="",J="",be=null;P.timing&&(be={queuing:0,dnslookup:0,connected:0,requestSent:0,waiting:0,contentDownload:0});function _e(){Fe&&(clearTimeout(Fe),Fe=null)}function oe(){Je&&(clearTimeout(Je),Je=null)}function ie(wt,jt,st){if(oe(),!V){console.warn("[urllib:warn] [%s] [%s] [worker:%s] %s %s callback twice!!!",Date(),Q,u.pid,ee.method,H),wt&&console.warn(`[urllib:warn] [%s] [%s] [worker:%s] %s: %s stack: %s`,Date(),Q,u.pid,wt.name,wt.message,wt.stack);return}var ge=V;V=null;var on={};st&&(pe=st.statusCode,on=st.headers);var mn=Date.now()-ue;be&&(be.contentDownload=mn),m("[%sms] done, %s bytes HTTP %s %s %s %s, keepAliveSocket: %s, timing: %j",mn,Oe,pe,ee.method,ee.host,ee.path,Re,be);var Mt={status:pe,statusCode:pe,headers:on,size:Oe,aborted:fe,rt:mn,keepAliveSocket:Re,data:jt,requestUrls:P.requestUrls,timing:be,remoteAddress:z,remotePort:J};if(wt){var On="";me&&typeof me.getCurrentStatus=="function"&&(On=", agent status: "+JSON.stringify(me.getCurrentStatus())),wt.message+=", "+ee.method+" "+H+" "+pe+" (connected: "+lt+", keepalive socket: "+Re+On+`) headers: `+JSON.stringify(on),wt.data=jt,wt.path=ee.path,wt.status=pe,wt.headers=on,wt.res=Mt}ge(wt,jt,P.streaming?st:Mt),P.emitter&&(ne.url=H,ne.socket=At&&At.connection,ne.options=ee,ne.size=Be,P.emitter.emit("response",{requestId:Q,error:wt,ctx:P.ctx,req:ne,res:Mt}))}function ve(wt){var jt=null;if(P.followRedirect&&statuses.redirect[wt.statusCode]){P._followRedirectCount=(P._followRedirectCount||0)+1;var st=wt.headers.location;if(!st)jt=new Error("Got statusCode "+wt.statusCode+" but cannot resolve next location from headers"),jt.name="FollowRedirectError";else if(P._followRedirectCount>P.maxRedirects)jt=new Error("Exceeded maxRedirects. Probably stuck in a redirect loop "+H),jt.name="MaxRedirectError";else{var ge=P.formatRedirectUrl?P.formatRedirectUrl(H,st):v.resolve(H,st);m("Request#%d %s: `redirected` from %s to %s",Q,ee.path,H,ge),oe(),P.headers&&P.headers.Host&&R.test(st)&&(P.headers.Host=null);var on=V;return V=null,I.requestWithCallback(ge,P,on),{redirect:!0,error:null}}}return{redirect:!1,error:jt}}P.gzip&&!ee.headers["Accept-Encoding"]&&!ee.headers["accept-encoding"]&&(ee.headers["Accept-Encoding"]="gzip");function Ne(wt,jt,st){var ge=wt.headers["content-encoding"];return st(null,jt,ge)}var ze=P.writeStream;m("Request#%d %s %s with headers %j, options.path: %s",Q,he,H,ee.headers,ee.path),P.requestUrls.push(H);function Ve(wt){if(be&&(be.waiting=Date.now()-ue),m("Request#%d %s `req response` event emit: status %d, headers: %j",Q,H,wt.statusCode,wt.headers),P.streaming){var jt=ve(wt);if(jt.redirect){wt.resume();return}return jt.error?(wt.resume(),ie(jt.error,null,wt)):ie(null,null,wt)}if(wt.on("close",function(){m("Request#%d %s: `res close` event emit, total size %d",Q,H,Oe)}),wt.on("error",function(){m("Request#%d %s: `res error` event emit, total size %d",Q,H,Oe)}),wt.on("aborted",function(){fe=!0,m("Request#%d %s: `res aborted` event emit, total size %d",Q,H,Oe)}),ze){var st=ve(wt);if(st.redirect){wt.resume();return}return st.error?(wt.resume(),ze.end(),ie(st.error,null,wt)):(P.consumeWriteStream===!1?wt.on("end",ie.bind(null,null,null,wt)):ze.on("close",function(){m("Request#%d %s: writeStream close event emitted",Q,H),ie(Me||null,null,wt)}),wt.pipe(ze))}var ge=[];wt.on("data",function(on){m("Request#%d %s: `res data` event emit, size %d",Q,H,on.length),Oe+=on.length,ge.push(on)}),wt.on("end",function(){var on=d.concat(ge,Oe);if(m("Request#%d %s: `res end` event emit, total size %d, _dumped: %s",Q,H,Oe,wt._dumped),Me)return ie(Me,on,wt);var mn=ve(wt);if(mn.error)return ie(mn.error,on,wt);mn.redirect||Ne(wt,on,function(Mt,On,Vn){if(Mt)return ie(Mt,on,wt);if(!Vn&&M.indexOf(P.dataType)>=0){try{On=decodeBodyByCharset(On,wt)}catch(Gn){return m("decodeBodyByCharset error: %s",Gn),ie(null,On,wt)}if(P.dataType==="json")if(Oe===0)On=null;else{var Fn=parseJSON(On,Le);Fn.error?Mt=Fn.error:On=Fn.data}}fe&&m("Request#%d %s: Remote socket was terminated before `response.end()` was called",Q,H),ie(Mt,On,wt)})})}var yt,ct;Array.isArray(P.timeout)?(yt=x(P.timeout[0]),ct=x(P.timeout[1])):yt=ct=x(P.timeout),m("ConnectTimeout: %d, ResponseTimeout: %d",yt,ct);function St(){m("Connect timer ticking, timeout: %d",yt),Fe=setTimeout(function(){Fe=null,pe===-1&&(pe=-2);var wt="Connect timeout for "+yt+"ms",jt="ConnectionTimeoutError";At.socket||(jt="SocketAssignTimeoutError",wt+=", working sockets is full"),Me=new Error(wt),Me.name=jt,Me.requestId=Q,m("ConnectTimeout: Request#%d %s %s: %s, connected: %s",Q,H,Me.name,wt,lt),ht()},yt)}function _t(){m("Response timer ticking, timeout: %d",ct),Je=setTimeout(function(){Je=null;var wt="Response timeout for "+ct+"ms",jt="ResponseTimeoutError";Me=new Error(wt),Me.name=jt,Me.requestId=Q,m("ResponseTimeout: Request#%d %s %s: %s, connected: %s",Q,H,Me.name,wt,lt),ht()},ct)}var At;ee.mode=P.mode?P.mode:"";try{At=we.request(ee,Ve)}catch(wt){return ie(wt)}typeof window=="undefined"?St():At.on("requestTimeout",function(){pe===-1&&(pe=-2);var wt="Connect timeout for "+yt+"ms",jt="ConnectionTimeoutError";Me=new Error(wt),Me.name=jt,Me.requestId=Q,ht()});function ht(){m("Request#%d %s abort, connected: %s",Q,H,lt),At.socket||(Me.noSocket=!0,ie(Me)),At.abort()}return be&&At.on("finish",function(){be.requestSent=Date.now()-ue}),At.once("socket",function(wt){be&&(be.queuing=Date.now()-ue);var jt=wt.readyState;if(jt==="opening"){wt.once("lookup",function(st,ge,on){m("Request#%d %s lookup: %s, %s, %s",Q,H,st,ge,on),be&&(be.dnslookup=Date.now()-ue),ge&&(z=ge)}),wt.once("connect",function(){be&&(be.connected=Date.now()-ue),_e(),_t(),m("Request#%d %s new socket connected",Q,H),lt=!0,z||(z=wt.remoteAddress),J=wt.remotePort});return}m("Request#%d %s reuse socket connected, readyState: %s",Q,H,jt),lt=!0,Re=!0,z||(z=wt.remoteAddress),J=wt.remotePort,_e(),_t()}),At.on("error",function(wt){(wt.name==="Error"||wt.name==="TypeError")&&(wt.name=lt?"ResponseError":"RequestError"),wt.message+=' (req "error")',m("Request#%d %s `req error` event emit, %s: %s",Q,H,wt.name,wt.message),ie(Me||wt)}),ze&&ze.once("error",function(wt){wt.message+=' (writeStream "error")',Me=wt,m("Request#%d %s `writeStream error` event emit, %s: %s",Q,H,wt.name,wt.message),ht()}),P.stream?(P.stream.pipe(At),P.stream.once("error",function(wt){wt.message+=' (stream "error")',Me=wt,m("Request#%d %s `readStream error` event emit, %s: %s",Q,H,wt.name,wt.message),ht()})):At.end(le),At.requestId=Q,At}}).call(this)}).call(this,s("_process"),s("buffer").Buffer)},{"@babel/runtime/helpers/interopRequireDefault":78,"@babel/runtime/helpers/typeof":79,_process:467,buffer:90,"core-js/modules/es.array.concat.js":272,"core-js/modules/es.function.name.js":284,"core-js/modules/es.object.to-string.js":291,"core-js/modules/es.promise.js":295,"core-js/modules/es.regexp.exec.js":300,"core-js/modules/es.string.split.js":307,"core-js/modules/es.string.trim.js":308,debug:465,http:468,https:355,"humanize-ms":356,url:472,util:419}]},{},[1])(1)})})(window)},86010:function(Ie,Z,b){"use strict";b.r(Z),b.d(Z,{clsx:function(){return Y}});function B(s){var E,I,u="";if(typeof s=="string"||typeof s=="number")u+=s;else if(typeof s=="object")if(Array.isArray(s))for(E=0;E`,triples:"",explode:"[]{}"},s=B.Pos;B.defineOption("autoCloseBrackets",!1,function(x,T,_){_&&_!=B.Init&&(x.removeKeyMap(I),x.state.closeBrackets=null),T&&(u(E(T,"pairs")),x.state.closeBrackets=T,x.addKeyMap(I))});function E(x,T){return T=="pairs"&&typeof x=="string"?x:typeof x=="object"&&x[T]!=null?x[T]:Y[T]}var I={Backspace:y,Enter:S};function u(x){for(var T=0;T=0;A--){var L=R[A].head;x.replaceRange("",s(L.line,L.ch-1),s(L.line,L.ch+1),"+delete")}}function S(x){var T=g(x),_=T&&E(T,"explode");if(!_||x.getOption("disableInput"))return B.Pass;for(var R=x.listSelections(),A=0;A0;return{anchor:new s(x.anchor.line,x.anchor.ch+(T?-1:1)),head:new s(x.head.line,x.head.ch+(T?1:-1))}}function c(x,T){var _=g(x);if(!_||x.getOption("disableInput"))return B.Pass;var R=E(_,"pairs"),A=R.indexOf(T);if(A==-1)return B.Pass;for(var N=E(_,"closeBefore"),L=E(_,"triples"),M=R.charAt(A+1)==T,F=x.listSelections(),H=A%2==0,P,V=0;V=0&&x.getRange(Q,s(Q.line,Q.ch+3))==T+T+T?ne="skipThree":ne="skip";else if(M&&Q.ch>1&&L.indexOf(T)>=0&&x.getRange(s(Q.line,Q.ch-2),Q)==T+T){if(Q.ch>2&&/\bstring/.test(x.getTokenTypeAt(s(Q.line,Q.ch-2))))return B.Pass;ne="addFour"}else if(M){var ae=Q.ch==0?" ":x.getRange(s(Q.line,Q.ch-1),Q);if(!B.isWordChar(ue)&&ae!=T&&!B.isWordChar(ae))ne="both";else return B.Pass}else if(H&&(ue.length===0||/\s/.test(ue)||N.indexOf(ue)>-1))ne="both";else return B.Pass;if(!P)P=ne;else if(P!=ne)return B.Pass}var he=A%2?R.charAt(A-1):T,ce=A%2?T:R.charAt(A+1);x.operation(function(){if(P=="skip")x.execCommand("goCharRight");else if(P=="skipThree")for(var we=0;we<3;we++)x.execCommand("goCharRight");else if(P=="surround"){for(var me=x.getSelections(),we=0;we'"]=function(h){return E(h)}),y.addKeyMap(c)}});var Y=["area","base","br","col","command","embed","hr","img","input","keygen","link","meta","param","source","track","wbr"],s=["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 E(y){if(y.getOption("disableInput"))return B.Pass;for(var S=y.listSelections(),v=[],c=y.getOption("autoCloseTags"),h=0;hm.ch&&(A=A.slice(0,A.length-x.end+m.ch));var F=A.toLowerCase();if(!A||x.type=="string"&&(x.end!=m.ch||!/[\"\']/.test(x.string.charAt(x.string.length-1))||x.string.length==1)||x.type=="tag"&&R.close||x.string.indexOf("/")==m.ch-x.start-1||L&&d(L,F)>-1||g(y,T.mode.xmlCurrentContext&&T.mode.xmlCurrentContext(_)||[],A,m,!0))return B.Pass;var H=typeof c=="object"&&c.emptyTags;if(H&&d(H,A)>-1){v[h]={text:"/>",newPos:B.Pos(m.line,m.ch+2)};continue}var P=M&&d(M,F)>-1;v[h]={indent:P,text:">"+(P?` `:"")+"",newPos:P?B.Pos(m.line+1,0):B.Pos(m.line,m.ch+1)}}for(var V=typeof c=="object"&&c.dontIndentOnAutoClose,h=S.length-1;h>=0;h--){var G=v[h];y.replaceRange(G.text,S[h].head,S[h].anchor,"+insert");var Q=y.listSelections().slice(0);Q[h]={head:G.newPos,anchor:G.newPos},y.setSelections(Q),!V&&G.indent&&(y.indentLine(G.newPos.line,null,!0),y.indentLine(G.newPos.line+1,null,!0))}}function I(y,S){for(var v=y.listSelections(),c=[],h=S?"/":""&&(L+=">"),c[T]=L}if(y.replaceSelections(c),v=y.listSelections(),!x)for(var T=0;T=0&&S[_]==v;_--)++T;c=x.to;for(var _=1;_=_.max))return _.ch=0,_.text=_.cm.getLine(++_.line),!0}function S(_){if(!(_.line<=_.min))return _.text=_.cm.getLine(--_.line),_.ch=_.text.length,!0}function v(_){for(;;){var R=_.text.indexOf(">",_.ch);if(R==-1){if(y(_))continue;return}if(!g(_,R+1)){_.ch=R+1;continue}var A=_.text.lastIndexOf("/",R),N=A>-1&&!/\S/.test(_.text.slice(A+1,R));return _.ch=R+1,N?"selfClose":"regular"}}function c(_){for(;;){var R=_.ch?_.text.lastIndexOf("<",_.ch-1):-1;if(R==-1){if(S(_))continue;return}if(!g(_,R+1)){_.ch=R;continue}u.lastIndex=R,_.ch=R;var A=u.exec(_.text);if(A&&A.index==R)return A}}function h(_){for(;;){u.lastIndex=_.ch;var R=u.exec(_.text);if(!R){if(y(_))continue;return}if(!g(_,R.index+1)){_.ch=R.index+1;continue}return _.ch=R.index+R[0].length,R}}function m(_){for(;;){var R=_.ch?_.text.lastIndexOf(">",_.ch-1):-1;if(R==-1){if(S(_))continue;return}if(!g(_,R+1)){_.ch=R;continue}var A=_.text.lastIndexOf("/",R),N=A>-1&&!/\S/.test(_.text.slice(A+1,R));return _.ch=R+1,N?"selfClose":"regular"}}function x(_,R){for(var A=[];;){var N=h(_),L,M=_.line,F=_.ch-(N?N[0].length:0);if(!N||!(L=v(_)))return;if(L!="selfClose")if(N[1]){for(var H=A.length-1;H>=0;--H)if(A[H]==N[2]){A.length=H;break}if(H<0&&(!R||R==N[2]))return{tag:N[2],from:Y(M,F),to:Y(_.line,_.ch)}}else A.push(N[2])}}function T(_,R){for(var A=[];;){var N=m(_);if(!N)return;if(N=="selfClose"){c(_);continue}var L=_.line,M=_.ch,F=c(_);if(!F)return;if(F[1])A.push(F[2]);else{for(var H=A.length-1;H>=0;--H)if(A[H]==F[2]){A.length=H;break}if(H<0&&(!R||R==F[2]))return{tag:F[2],from:Y(_.line,_.ch),to:Y(L,M)}}}}B.registerHelper("fold","xml",function(_,R){for(var A=new d(_,R.line,0);;){var N=h(A);if(!N||A.line!=R.line)return;var L=v(A);if(!L)return;if(!N[1]&&L!="selfClose"){var M=Y(A.line,A.ch),F=x(A,N[2]);return F&&s(F.from,M)>0?{from:M,to:F.from}:null}}}),B.findMatchingTag=function(_,R,A){var N=new d(_,R.line,R.ch,A);if(!(N.text.indexOf(">")==-1&&N.text.indexOf("<")==-1)){var L=v(N),M=L&&Y(N.line,N.ch),F=L&&c(N);if(!(!L||!F||s(N,R)>0)){var H={from:Y(N.line,N.ch),to:M,tag:F[2]};return L=="selfClose"?{open:H,close:null,at:"open"}:F[1]?{open:T(N,F[2]),close:H,at:"close"}:(N=new d(_,M.line,M.ch,A),{open:H,close:x(N,F[2]),at:"open"})}}},B.findEnclosingTag=function(_,R,A,N){for(var L=new d(_,R.line,R.ch,A);;){var M=T(L,N);if(!M)break;var F=new d(_,R.line,R.ch,A),H=x(F,M.tag);if(H)return{open:M,close:H}}},B.scanForClosingTag=function(_,R,A,N){var L=new d(_,R.line,R.ch,N?{from:0,to:N}:null);return x(L,A)}})},4631:function(Ie){(function(Z,b){Ie.exports=b()})(this,function(){"use strict";var Z=navigator.userAgent,b=navigator.platform,B=/gecko\/\d/i.test(Z),Y=/MSIE \d/.test(Z),s=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(Z),E=/Edge\/(\d+)/.exec(Z),I=Y||s||E,u=I&&(Y?document.documentMode||6:+(E||s)[1]),d=!E&&/WebKit\//.test(Z),g=d&&/Qt\/\d+\.\d+/.test(Z),y=!E&&/Chrome\//.test(Z),S=/Opera\//.test(Z),v=/Apple Computer/.test(navigator.vendor),c=/Mac OS X 1\d\D([8-9]|\d\d)\D/.test(Z),h=/PhantomJS/.test(Z),m=!E&&/AppleWebKit/.test(Z)&&/Mobile\/\w+/.test(Z),x=/Android/.test(Z),T=m||x||/webOS|BlackBerry|Opera Mini|Opera Mobi|IEMobile/i.test(Z),_=m||/Mac/.test(b),R=/\bCrOS\b/.test(Z),A=/win/i.test(b),N=S&&Z.match(/Version\/(\d*\.\d*)/);N&&(N=Number(N[1])),N&&N>=15&&(S=!1,d=!0);var L=_&&(g||S&&(N==null||N<12.11)),M=B||I&&u>=9;function F(l){return new RegExp("(^|\\s)"+l+"(?:$|\\s)\\s*")}var H=function(l,C){var K=l.className,W=F(C).exec(K);if(W){var q=K.slice(W.index+W[0].length);l.className=K.slice(0,W.index)+(q?W[1]+q:"")}};function P(l){for(var C=l.childNodes.length;C>0;--C)l.removeChild(l.firstChild);return l}function V(l,C){return P(l).appendChild(C)}function G(l,C,K,W){var q=document.createElement(l);if(K&&(q.className=K),W&&(q.style.cssText=W),typeof C=="string")q.appendChild(document.createTextNode(C));else if(C)for(var xe=0;xe=C)return je+(C-xe);je+=Ze-xe,je+=K-je%K,xe=Ze+1}}var se=function(){this.id=null,this.f=null,this.time=0,this.handler=me(this.onTimeout,this)};se.prototype.onTimeout=function(l){l.id=0,l.time<=+new Date?l.f():setTimeout(l.handler,l.time-+new Date)},se.prototype.set=function(l,C){this.f=C;var K=+new Date+l;(!this.id||K=C)return W+Math.min(je,C-q);if(q+=xe-W,q+=K-q%K,W=xe+1,q>=C)return W}}var Me=[""];function lt(l){for(;Me.length<=l;)Me.push(Re(Me)+" ");return Me[l]}function Re(l){return l[l.length-1]}function Oe(l,C){for(var K=[],W=0;W"\x80"&&(l.toUpperCase()!=l.toLowerCase()||J.test(l))}function _e(l,C){return C?C.source.indexOf("\\w")>-1&&be(l)?!0:C.test(l):be(l)}function oe(l){for(var C in l)if(l.hasOwnProperty(C)&&l[C])return!1;return!0}var ie=/[\u0300-\u036f\u0483-\u0489\u0591-\u05bd\u05bf\u05c1\u05c2\u05c4\u05c5\u05c7\u0610-\u061a\u064b-\u065e\u0670\u06d6-\u06dc\u06de-\u06e4\u06e7\u06e8\u06ea-\u06ed\u0711\u0730-\u074a\u07a6-\u07b0\u07eb-\u07f3\u0816-\u0819\u081b-\u0823\u0825-\u0827\u0829-\u082d\u0900-\u0902\u093c\u0941-\u0948\u094d\u0951-\u0955\u0962\u0963\u0981\u09bc\u09be\u09c1-\u09c4\u09cd\u09d7\u09e2\u09e3\u0a01\u0a02\u0a3c\u0a41\u0a42\u0a47\u0a48\u0a4b-\u0a4d\u0a51\u0a70\u0a71\u0a75\u0a81\u0a82\u0abc\u0ac1-\u0ac5\u0ac7\u0ac8\u0acd\u0ae2\u0ae3\u0b01\u0b3c\u0b3e\u0b3f\u0b41-\u0b44\u0b4d\u0b56\u0b57\u0b62\u0b63\u0b82\u0bbe\u0bc0\u0bcd\u0bd7\u0c3e-\u0c40\u0c46-\u0c48\u0c4a-\u0c4d\u0c55\u0c56\u0c62\u0c63\u0cbc\u0cbf\u0cc2\u0cc6\u0ccc\u0ccd\u0cd5\u0cd6\u0ce2\u0ce3\u0d3e\u0d41-\u0d44\u0d4d\u0d57\u0d62\u0d63\u0dca\u0dcf\u0dd2-\u0dd4\u0dd6\u0ddf\u0e31\u0e34-\u0e3a\u0e47-\u0e4e\u0eb1\u0eb4-\u0eb9\u0ebb\u0ebc\u0ec8-\u0ecd\u0f18\u0f19\u0f35\u0f37\u0f39\u0f71-\u0f7e\u0f80-\u0f84\u0f86\u0f87\u0f90-\u0f97\u0f99-\u0fbc\u0fc6\u102d-\u1030\u1032-\u1037\u1039\u103a\u103d\u103e\u1058\u1059\u105e-\u1060\u1071-\u1074\u1082\u1085\u1086\u108d\u109d\u135f\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17b7-\u17bd\u17c6\u17c9-\u17d3\u17dd\u180b-\u180d\u18a9\u1920-\u1922\u1927\u1928\u1932\u1939-\u193b\u1a17\u1a18\u1a56\u1a58-\u1a5e\u1a60\u1a62\u1a65-\u1a6c\u1a73-\u1a7c\u1a7f\u1b00-\u1b03\u1b34\u1b36-\u1b3a\u1b3c\u1b42\u1b6b-\u1b73\u1b80\u1b81\u1ba2-\u1ba5\u1ba8\u1ba9\u1c2c-\u1c33\u1c36\u1c37\u1cd0-\u1cd2\u1cd4-\u1ce0\u1ce2-\u1ce8\u1ced\u1dc0-\u1de6\u1dfd-\u1dff\u200c\u200d\u20d0-\u20f0\u2cef-\u2cf1\u2de0-\u2dff\u302a-\u302f\u3099\u309a\ua66f-\ua672\ua67c\ua67d\ua6f0\ua6f1\ua802\ua806\ua80b\ua825\ua826\ua8c4\ua8e0-\ua8f1\ua926-\ua92d\ua947-\ua951\ua980-\ua982\ua9b3\ua9b6-\ua9b9\ua9bc\uaa29-\uaa2e\uaa31\uaa32\uaa35\uaa36\uaa43\uaa4c\uaab0\uaab2-\uaab4\uaab7\uaab8\uaabe\uaabf\uaac1\uabe5\uabe8\uabed\udc00-\udfff\ufb1e\ufe00-\ufe0f\ufe20-\ufe26\uff9e\uff9f]/;function ve(l){return l.charCodeAt(0)>=768&&ie.test(l)}function Ne(l,C,K){for(;(K<0?C>0:CK?-1:1;;){if(C==K)return C;var q=(C+K)/2,xe=W<0?Math.ceil(q):Math.floor(q);if(xe==C)return l(xe)?C:K;l(xe)?K=xe:C=xe+W}}function Ve(l,C,K,W){if(!l)return W(C,K,"ltr",0);for(var q=!1,xe=0;xeC||C==K&&je.to==C)&&(W(Math.max(je.from,C),Math.min(je.to,K),je.level==1?"rtl":"ltr",xe),q=!0)}q||W(C,K,"ltr")}var yt=null;function ct(l,C,K){var W;yt=null;for(var q=0;qC)return q;xe.to==C&&(xe.from!=xe.to&&K=="before"?W=q:yt=q),xe.from==C&&(xe.from!=xe.to&&K!="before"?W=q:yt=q)}return W!=null?W:yt}var St=function(){var l="bbbbbbbbbtstwsbbbbbbbbbbbbbbssstwNN%%%NNNNNN,N,N1111111111NNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNbbbbbbsbbbbbbbbbbbbbbbbbbbbbbbbbb,N%%%%NNNNLNNNNN%%11NLNNN1LNNNNNLLLLLLLLLLLLLLLLLLLLLLLNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLN",C="nnnnnnNNr%%r,rNNmmmmmmmmmmmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmmmmmmmmnnnnnnnnnn%nnrrrmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmnNmmmmmmrrmmNmmmmrr1111111111";function K(ot){return ot<=247?l.charAt(ot):1424<=ot&&ot<=1524?"R":1536<=ot&&ot<=1785?C.charAt(ot-1536):1774<=ot&&ot<=2220?"r":8192<=ot&&ot<=8203?"w":ot==8204?"b":"L"}var W=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/,q=/[stwN]/,xe=/[LRr]/,je=/[Lb1n]/,Ze=/[1n]/;function $e(ot,Ot,gt){this.level=ot,this.from=Ot,this.to=gt}return function(ot,Ot){var gt=Ot=="ltr"?"L":"R";if(ot.length==0||Ot=="ltr"&&!W.test(ot))return!1;for(var Xt=ot.length,Wt=[],Dn=0;Dn-1&&(W[C]=q.slice(0,xe).concat(q.slice(xe+1)))}}}function st(l,C){var K=wt(l,C);if(K.length)for(var W=Array.prototype.slice.call(arguments,2),q=0;q0}function Mt(l){l.prototype.on=function(C,K){ht(this,C,K)},l.prototype.off=function(C,K){jt(this,C,K)}}function On(l){l.preventDefault?l.preventDefault():l.returnValue=!1}function Vn(l){l.stopPropagation?l.stopPropagation():l.cancelBubble=!0}function Fn(l){return l.defaultPrevented!=null?l.defaultPrevented:l.returnValue==!1}function Gn(l){On(l),Vn(l)}function sn(l){return l.target||l.srcElement}function xt(l){var C=l.which;return C==null&&(l.button&1?C=1:l.button&2?C=3:l.button&4&&(C=2)),_&&l.ctrlKey&&C==1&&(C=3),C}var gr=function(){if(I&&u<9)return!1;var l=G("div");return"draggable"in l||"dragDrop"in l}(),Pr;function tr(l){if(Pr==null){var C=G("span","\u200B");V(l,G("span",[C,document.createTextNode("x")])),l.firstChild.offsetHeight!=0&&(Pr=C.offsetWidth<=1&&C.offsetHeight>2&&!(I&&u<8))}var K=Pr?G("span","\u200B"):G("span","\xA0",null,"display: inline-block; width: 1px; margin-right: -1px");return K.setAttribute("cm-text",""),K}var ii;function Ar(l){if(ii!=null)return ii;var C=V(l,document.createTextNode("A\u062EA")),K=ne(C,0,1).getBoundingClientRect(),W=ne(C,1,2).getBoundingClientRect();return P(l),!K||K.left==K.right?!1:ii=W.right-K.right<3}var Kt=` b`.split(/\n/).length!=3?function(l){for(var C=0,K=[],W=l.length;C<=W;){var q=l.indexOf(` `,C);q==-1&&(q=l.length);var xe=l.slice(C,l.charAt(q-1)=="\r"?q-1:q),je=xe.indexOf("\r");je!=-1?(K.push(xe.slice(0,je)),C+=je+1):(K.push(xe),C=q+1)}return K}:function(l){return l.split(/\r\n?|\n/)},ye=window.getSelection?function(l){try{return l.selectionStart!=l.selectionEnd}catch(C){return!1}}:function(l){var C;try{C=l.ownerDocument.selection.createRange()}catch(K){}return!C||C.parentElement()!=l?!1:C.compareEndPoints("StartToEnd",C)!=0},Vt=function(){var l=G("div");return"oncopy"in l?!0:(l.setAttribute("oncopy","return;"),typeof l.oncopy=="function")}(),rn=null;function Xn(l){if(rn!=null)return rn;var C=V(l,G("span","x")),K=C.getBoundingClientRect(),W=ne(C,0,1).getBoundingClientRect();return rn=Math.abs(K.left-W.left)>1}var Zn={},ir={};function Dr(l,C){arguments.length>2&&(C.dependencies=Array.prototype.slice.call(arguments,2)),Zn[l]=C}function ai(l,C){ir[l]=C}function li(l){if(typeof l=="string"&&ir.hasOwnProperty(l))l=ir[l];else if(l&&typeof l.name=="string"&&ir.hasOwnProperty(l.name)){var C=ir[l.name];typeof C=="string"&&(C={name:C}),l=z(C,l),l.name=C.name}else{if(typeof l=="string"&&/^[\w\-]+\/[\w\-]+\+xml$/.test(l))return li("application/xml");if(typeof l=="string"&&/^[\w\-]+\/[\w\-]+\+json$/.test(l))return li("application/json")}return typeof l=="string"?{name:l}:l||{name:"null"}}function Zr(l,C){C=li(C);var K=Zn[C.name];if(!K)return Zr(l,"text/plain");var W=K(l,C);if(Tn.hasOwnProperty(C.name)){var q=Tn[C.name];for(var xe in q)q.hasOwnProperty(xe)&&(W.hasOwnProperty(xe)&&(W["_"+xe]=W[xe]),W[xe]=q[xe])}if(W.name=C.name,C.helperType&&(W.helperType=C.helperType),C.modeProps)for(var je in C.modeProps)W[je]=C.modeProps[je];return W}var Tn={};function kn(l,C){var K=Tn.hasOwnProperty(l)?Tn[l]:Tn[l]={};Le(C,K)}function Vr(l,C){if(C===!0)return C;if(l.copyState)return l.copyState(C);var K={};for(var W in C){var q=C[W];q instanceof Array&&(q=q.concat([])),K[W]=q}return K}function di(l,C){for(var K;l.innerMode&&(K=l.innerMode(C),!(!K||K.mode==l));)C=K.state,l=K.mode;return K||{mode:l,state:C}}function nr(l,C,K){return l.startState?l.startState(C,K):!0}var vn=function(l,C,K){this.pos=this.start=0,this.string=l,this.tabSize=C||8,this.lastColumnPos=this.lastColumnValue=0,this.lineStart=0,this.lineOracle=K};vn.prototype.eol=function(){return this.pos>=this.string.length},vn.prototype.sol=function(){return this.pos==this.lineStart},vn.prototype.peek=function(){return this.string.charAt(this.pos)||void 0},vn.prototype.next=function(){if(this.posC},vn.prototype.eatSpace=function(){for(var l=this.pos;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++this.pos;return this.pos>l},vn.prototype.skipToEnd=function(){this.pos=this.string.length},vn.prototype.skipTo=function(l){var C=this.string.indexOf(l,this.pos);if(C>-1)return this.pos=C,!0},vn.prototype.backUp=function(l){this.pos-=l},vn.prototype.column=function(){return this.lastColumnPos0?null:(xe&&C!==!1&&(this.pos+=xe[0].length),xe)}},vn.prototype.current=function(){return this.string.slice(this.start,this.pos)},vn.prototype.hideFirstChars=function(l,C){this.lineStart+=l;try{return C()}finally{this.lineStart-=l}},vn.prototype.lookAhead=function(l){var C=this.lineOracle;return C&&C.lookAhead(l)},vn.prototype.baseToken=function(){var l=this.lineOracle;return l&&l.baseToken(this.pos)};function Jn(l,C){if(C-=l.first,C<0||C>=l.size)throw new Error("There is no line "+(C+l.first)+" in the document.");for(var K=l;!K.lines;)for(var W=0;;++W){var q=K.children[W],xe=q.chunkSize();if(C=l.first&&CK?bn(K,Jn(l,K).text.length):Di(C,Jn(l,C.line).text.length)}function Di(l,C){var K=l.ch;return K==null||K>C?bn(l.line,C):K<0?bn(l.line,0):l}function so(l,C){for(var K=[],W=0;Wthis.maxLookAhead&&(this.maxLookAhead=l),C},sr.prototype.baseToken=function(l){if(!this.baseTokens)return null;for(;this.baseTokens[this.baseTokenPos]<=l;)this.baseTokenPos+=2;var C=this.baseTokens[this.baseTokenPos+1];return{type:C&&C.replace(/( |^)overlay .*/,""),size:this.baseTokens[this.baseTokenPos]-l}},sr.prototype.nextLine=function(){this.line++,this.maxLookAhead>0&&this.maxLookAhead--},sr.fromSaved=function(l,C,K){return C instanceof Gi?new sr(l,Vr(l.mode,C.state),K,C.lookAhead):new sr(l,Vr(l.mode,C),K)},sr.prototype.save=function(l){var C=l!==!1?Vr(this.doc.mode,this.state):this.state;return this.maxLookAhead>0?new Gi(C,this.maxLookAhead):C};function ys(l,C,K,W){var q=[l.state.modeGen],xe={};eo(l,C.text,l.doc.mode,K,function(ot,Ot){return q.push(ot,Ot)},xe,W);for(var je=K.state,Ze=function(ot){K.baseTokens=q;var Ot=l.state.overlays[ot],gt=1,Xt=0;K.state=!0,eo(l,C.text,Ot.mode,K,function(Wt,Dn){for(var Bn=gt;XtWt&&q.splice(gt,1,Wt,q[gt+1],Kn),gt+=2,Xt=Math.min(Wt,Kn)}if(Dn)if(Ot.opaque)q.splice(Bn,gt-Bn,Wt,"overlay "+Dn),gt=Bn+2;else for(;Bnl.options.maxHighlightLength&&Vr(l.doc.mode,W.state),xe=ys(l,C,W);q&&(W.state=q),C.stateAfter=W.save(!q),C.styles=xe.styles,xe.classes?C.styleClasses=xe.classes:C.styleClasses&&(C.styleClasses=null),K===l.doc.highlightFrontier&&(l.doc.modeFrontier=Math.max(l.doc.modeFrontier,++l.doc.highlightFrontier))}return C.styles}function Ro(l,C,K){var W=l.doc,q=l.display;if(!W.mode.startState)return new sr(W,!0,C);var xe=Oi(l,C,K),je=xe>W.first&&Jn(W,xe-1).stateAfter,Ze=je?sr.fromSaved(W,je,xe):new sr(W,nr(W.mode),xe);return W.iter(xe,C,function($e){hn(l,$e.text,Ze);var ot=Ze.line;$e.stateAfter=ot==C-1||ot%5==0||ot>=q.viewFrom&&otC.start)return xe}throw new Error("Mode "+l.name+" failed to advance stream.")}var yo=function(l,C,K){this.start=l.start,this.end=l.pos,this.string=l.current(),this.type=C||null,this.state=K};function Bs(l,C,K,W){var q=l.doc,xe=q.mode,je;C=Fr(q,C);var Ze=Jn(q,C.line),$e=Ro(l,C.line,K),ot=new vn(Ze.text,l.options.tabSize,$e),Ot;for(W&&(Ot=[]);(W||ot.posl.options.maxHighlightLength?(Ze=!1,je&&hn(l,C,W,Ot.pos),Ot.pos=C.length,gt=null):gt=Yi(cs(K,Ot,W.state,Xt),xe),Xt){var Wt=Xt[0].name;Wt&&(gt="m-"+(gt?Wt+" "+gt:Wt))}if(!Ze||ot!=gt){for(;$eje;--Ze){if(Ze<=xe.first)return xe.first;var $e=Jn(xe,Ze-1),ot=$e.stateAfter;if(ot&&(!K||Ze+(ot instanceof Gi?ot.lookAhead:0)<=xe.modeFrontier))return Ze;var Ot=ee($e.text,null,l.options.tabSize);(q==null||W>Ot)&&(q=Ze-1,W=Ot)}return q}function hi(l,C){if(l.modeFrontier=Math.min(l.modeFrontier,C),!(l.highlightFrontierK;W--){var q=Jn(l,W).stateAfter;if(q&&(!(q instanceof Gi)||W+q.lookAhead=C:xe.to>C);(W||(W=[])).push(new Ge(je,xe.from,$e?null:xe.to))}}return W}function Dt(l,C,K){var W;if(l)for(var q=0;q=C:xe.to>C);if(Ze||xe.from==C&&je.type=="bookmark"&&(!K||xe.marker.insertLeft)){var $e=xe.from==null||(je.inclusiveLeft?xe.from<=C:xe.from0&&Ze)for(var Kr=0;Kr0)){var Ot=[$e,1],gt=or(ot.from,Ze.from),Xt=or(ot.to,Ze.to);(gt<0||!je.inclusiveLeft&&!gt)&&Ot.push({from:ot.from,to:Ze.from}),(Xt>0||!je.inclusiveRight&&!Xt)&&Ot.push({from:Ze.to,to:ot.to}),q.splice.apply(q,Ot),$e+=Ot.length-3}}return q}function nn(l){var C=l.markedSpans;if(C){for(var K=0;KC)&&(!W||ei(W,xe.marker)<0)&&(W=xe.marker)}return W}function ri(l,C,K,W,q){var xe=Jn(l,C),je=tn&&xe.markedSpans;if(je)for(var Ze=0;Ze=0&><=0||Ot<=0&>>=0)&&(Ot<=0&&($e.marker.inclusiveRight&&q.inclusiveLeft?or(ot.to,K)>=0:or(ot.to,K)>0)||Ot>=0&&($e.marker.inclusiveRight&&q.inclusiveLeft?or(ot.from,W)<=0:or(ot.from,W)<0)))return!0}}}function wr(l){for(var C;C=Jr(l);)l=C.find(-1,!0).line;return l}function rr(l){for(var C;C=Wr(l);)l=C.find(1,!0).line;return l}function Ir(l){for(var C,K;C=Wr(l);)l=C.find(1,!0).line,(K||(K=[])).push(l);return K}function Nr(l,C){var K=Jn(l,C),W=wr(K);return K==W?C:Lt(W)}function $r(l,C){if(C>l.lastLine())return C;var K=Jn(l,C),W;if(!Yt(l,K))return C;for(;W=Wr(K);)K=W.find(1,!0).line;return Lt(K)+1}function Yt(l,C){var K=tn&&C.markedSpans;if(K){for(var W=void 0,q=0;qC.maxLineLength&&(C.maxLineLength=q,C.maxLine=W)})}var Ai=function(l,C,K){this.text=l,Ue(this,C),this.height=K?K(this):1};Ai.prototype.lineNo=function(){return Lt(this)},Mt(Ai);function Ji(l,C,K,W){l.text=C,l.stateAfter&&(l.stateAfter=null),l.styles&&(l.styles=null),l.order!=null&&(l.order=null),nn(l),Ue(l,K);var q=W?W(l):1;q!=l.height&&mi(l,q)}function To(l){l.parent=null,nn(l)}var _o={},bo={};function Vo(l,C){if(!l||/^\s*$/.test(l))return null;var K=C.addModeClass?bo:_o;return K[l]||(K[l]=l.replace(/\S+/g,"cm-$&"))}function Nt(l,C){var K=Q("span",null,null,d?"padding-right: .1px":null),W={pre:Q("pre",[K],"CodeMirror-line"),content:K,col:0,pos:0,cm:l,trailingSpace:!1,splitSpaces:l.getOption("lineWrapping")};C.measure={};for(var q=0;q<=(C.rest?C.rest.length:0);q++){var xe=q?C.rest[q-1]:C.line,je=void 0;W.pos=0,W.addToken=Fo,Ar(l.display.measure)&&(je=_t(xe,l.doc.direction))&&(W.addToken=ho(W.addToken,je)),W.map=[];var Ze=C!=l.display.externalMeasured&&Lt(xe);ko(xe,W,Wo(l,xe,Ze)),xe.styleClasses&&(xe.styleClasses.bgClass&&(W.bgClass=ce(xe.styleClasses.bgClass,W.bgClass||"")),xe.styleClasses.textClass&&(W.textClass=ce(xe.styleClasses.textClass,W.textClass||""))),W.map.length==0&&W.map.push(0,0,W.content.appendChild(tr(l.display.measure))),q==0?(C.measure.map=W.map,C.measure.cache={}):((C.measure.maps||(C.measure.maps=[])).push(W.map),(C.measure.caches||(C.measure.caches=[])).push({}))}if(d){var $e=W.content.lastChild;(/\bcm-tab\b/.test($e.className)||$e.querySelector&&$e.querySelector(".cm-tab"))&&(W.content.className="cm-tab-wrap-hack")}return st(l,"renderLine",l,C.line,W.pre),W.pre.className&&(W.textClass=ce(W.pre.className,W.textClass||"")),W}function no(l){var C=G("span","\u2022","cm-invalidchar");return C.title="\\u"+l.charCodeAt(0).toString(16),C.setAttribute("aria-label",C.title),C}function Fo(l,C,K,W,q,xe,je){if(C){var Ze=l.splitSpaces?Xo(C,l.trailingSpace):C,$e=l.cm.state.specialChars,ot=!1,Ot;if(!$e.test(C))l.col+=C.length,Ot=document.createTextNode(Ze),l.map.push(l.pos,l.pos+C.length,Ot),I&&u<9&&(ot=!0),l.pos+=C.length;else{Ot=document.createDocumentFragment();for(var gt=0;;){$e.lastIndex=gt;var Xt=$e.exec(C),Wt=Xt?Xt.index-gt:C.length-gt;if(Wt){var Dn=document.createTextNode(Ze.slice(gt,gt+Wt));I&&u<9?Ot.appendChild(G("span",[Dn])):Ot.appendChild(Dn),l.map.push(l.pos,l.pos+Wt,Dn),l.col+=Wt,l.pos+=Wt}if(!Xt)break;gt+=Wt+1;var Bn=void 0;if(Xt[0]==" "){var Kn=l.cm.options.tabSize,cr=Kn-l.col%Kn;Bn=Ot.appendChild(G("span",lt(cr),"cm-tab")),Bn.setAttribute("role","presentation"),Bn.setAttribute("cm-text"," "),l.col+=cr}else Xt[0]=="\r"||Xt[0]==` `?(Bn=Ot.appendChild(G("span",Xt[0]=="\r"?"\u240D":"\u2424","cm-invalidchar")),Bn.setAttribute("cm-text",Xt[0]),l.col+=1):(Bn=l.cm.options.specialCharPlaceholder(Xt[0]),Bn.setAttribute("cm-text",Xt[0]),I&&u<9?Ot.appendChild(G("span",[Bn])):Ot.appendChild(Bn),l.col+=1);l.map.push(l.pos,l.pos+1,Bn),l.pos++}}if(l.trailingSpace=Ze.charCodeAt(C.length-1)==32,K||W||q||ot||xe||je){var Hr=K||"";W&&(Hr+=W),q&&(Hr+=q);var Er=G("span",[Ot],Hr,xe);if(je)for(var Kr in je)je.hasOwnProperty(Kr)&&Kr!="style"&&Kr!="class"&&Er.setAttribute(Kr,je[Kr]);return l.content.appendChild(Er)}l.content.appendChild(Ot)}}function Xo(l,C){if(l.length>1&&!/ /.test(l))return l;for(var K=C,W="",q=0;qot&>.from<=ot));Xt++);if(gt.to>=Ot)return l(K,W,q,xe,je,Ze,$e);l(K,W.slice(0,gt.to-ot),q,xe,null,Ze,$e),xe=null,W=W.slice(gt.to-ot),ot=gt.to}}}function Zo(l,C,K,W){var q=!W&&K.widgetNode;q&&l.map.push(l.pos,l.pos+C,q),!W&&l.cm.display.input.needsContentAttribute&&(q||(q=l.content.appendChild(document.createElement("span"))),q.setAttribute("cm-marker",K.id)),q&&(l.cm.display.input.setUneditable(q),l.content.appendChild(q)),l.pos+=C,l.trailingSpace=!1}function ko(l,C,K){var W=l.markedSpans,q=l.text,xe=0;if(!W){for(var je=1;je$e||to.collapsed&&br.to==$e&&br.from==$e)){if(br.to!=null&&br.to!=$e&&Wt>br.to&&(Wt=br.to,Bn=""),to.className&&(Dn+=" "+to.className),to.css&&(Xt=(Xt?Xt+";":"")+to.css),to.startStyle&&br.from==$e&&(Kn+=" "+to.startStyle),to.endStyle&&br.to==Wt&&(Kr||(Kr=[])).push(to.endStyle,br.to),to.title&&((Hr||(Hr={})).title=to.title),to.attributes)for(var Ts in to.attributes)(Hr||(Hr={}))[Ts]=to.attributes[Ts];to.collapsed&&(!cr||ei(cr.marker,to)<0)&&(cr=br)}else br.from>$e&&Wt>br.from&&(Wt=br.from)}if(Kr)for(var ga=0;ga=Ze)break;for(var xl=Math.min(Ze,Wt);;){if(Ot){var Xa=$e+Ot.length;if(!cr){var aa=Xa>xl?Ot.slice(0,xl-$e):Ot;C.addToken(C,aa,gt?gt+Dn:Dn,Kn,$e+aa.length==Wt?Bn:"",Xt,Hr)}if(Xa>=xl){Ot=Ot.slice(xl-$e),$e=xl;break}$e=Xa,Kn=""}Ot=q.slice(xe,xe=K[ot++]),gt=Vo(K[ot++],C.cm.options)}}}function hs(l,C,K){this.line=C,this.rest=Ir(C),this.size=this.rest?Lt(Re(this.rest))-K+1:1,this.node=this.text=null,this.hidden=Yt(l,C)}function fi(l,C,K){for(var W=[],q,xe=C;xe2&&xe.push(($e.bottom+ot.top)/2-K.top)}}xe.push(K.bottom-K.top)}}function su(l,C,K){if(l.line==C)return{map:l.measure.map,cache:l.measure.cache};for(var W=0;WK)return{map:l.measure.maps[q],cache:l.measure.caches[q],before:!0}}function Al(l,C){C=wr(C);var K=Lt(C),W=l.display.externalMeasured=new hs(l.doc,C,K);W.lineN=K;var q=W.built=Nt(l,W);return W.text=q.pre,V(l.display.lineMeasure,q.pre),W}function Js(l,C,K,W){return nl(l,Da(l,C),K,W)}function Ns(l,C){if(C>=l.display.viewFrom&&C=K.lineN&&CC)&&(xe=$e-Ze,q=xe-1,C>=$e&&(je="right")),q!=null){if(W=l[ot+2],Ze==$e&&K==(W.insertLeft?"left":"right")&&(je=K),K=="left"&&q==0)for(;ot&&l[ot-2]==l[ot-3]&&l[ot-1].insertLeft;)W=l[(ot-=3)+2],je="left";if(K=="right"&&q==$e-Ze)for(;ot=0&&(K=l[q]).left==K.right;q--);return K}function is(l,C,K,W){var q=Fu(C.map,K,W),xe=q.node,je=q.start,Ze=q.end,$e=q.collapse,ot;if(xe.nodeType==3){for(var Ot=0;Ot<4;Ot++){for(;je&&ve(C.line.text.charAt(q.coverStart+je));)--je;for(;q.coverStart+Ze0&&($e=W="right");var gt;l.options.lineWrapping&&(gt=xe.getClientRects()).length>1?ot=gt[W=="right"?gt.length-1:0]:ot=xe.getBoundingClientRect()}if(I&&u<9&&!je&&(!ot||!ot.left&&!ot.right)){var Xt=xe.parentNode.getClientRects()[0];Xt?ot={left:Xt.left,right:Xt.left+Vl(l.display),top:Xt.top,bottom:Xt.bottom}:ot=Pu}for(var Wt=ot.top-C.rect.top,Dn=ot.bottom-C.rect.top,Bn=(Wt+Dn)/2,Kn=C.view.measure.heights,cr=0;cr=W.text.length?($e=W.text.length,ot="before"):$e<=0&&($e=0,ot="after"),!Ze)return je(ot=="before"?$e-1:$e,ot=="before");function Ot(Dn,Bn,Kn){var cr=Ze[Bn],Hr=cr.level==1;return je(Kn?Dn-1:Dn,Hr!=Kn)}var gt=ct(Ze,$e,ot),Xt=yt,Wt=Ot($e,gt,ot=="before");return Xt!=null&&(Wt.other=Ot($e,Xt,ot!="before")),Wt}function Uu(l,C){var K=0;C=Fr(l.doc,C),l.options.lineWrapping||(K=Vl(l.display)*C.ch);var W=Jn(l.doc,C.line),q=fr(W)+ks(l.display);return{left:K,right:K,top:q,bottom:q+W.height}}function dl(l,C,K,W,q){var xe=bn(l,C,K);return xe.xRel=q,W&&(xe.outside=W),xe}function Wl(l,C,K){var W=l.doc;if(K+=l.display.viewOffset,K<0)return dl(W.first,0,null,-1,-1);var q=Yn(W,K),xe=W.first+W.size-1;if(q>xe)return dl(W.first+W.size-1,Jn(W,xe).text.length,null,1,1);C<0&&(C=0);for(var je=Jn(W,q);;){var Ze=un(l,je,q,C,K),$e=Ri(je,Ze.ch+(Ze.xRel>0||Ze.outside>0?1:0));if(!$e)return Ze;var ot=$e.find(1);if(ot.line==q)return ot;je=Jn(W,q=ot.line)}}function dr(l,C,K,W){W-=ws(C);var q=C.text.length,xe=ze(function(je){return nl(l,K,je-1).bottom<=W},q,0);return q=ze(function(je){return nl(l,K,je).top>W},xe,q),{begin:xe,end:q}}function nc(l,C,K,W){K||(K=Da(l,C));var q=js(l,C,nl(l,K,W),"line").top;return dr(l,C,K,q)}function vt(l,C,K,W){return l.bottom<=K?!1:l.top>K?!0:(W?l.left:l.right)>C}function un(l,C,K,W,q){q-=fr(C);var xe=Da(l,C),je=ws(C),Ze=0,$e=C.text.length,ot=!0,Ot=_t(C,l.doc.direction);if(Ot){var gt=(l.options.lineWrapping?Sc:bc)(l,C,K,xe,Ot,W,q);ot=gt.level!=1,Ze=ot?gt.from:gt.to-1,$e=ot?gt.to:gt.from-1}var Xt=null,Wt=null,Dn=ze(function(Ti){var br=nl(l,xe,Ti);return br.top+=je,br.bottom+=je,vt(br,W,q,!1)?(br.top<=q&&br.left<=W&&(Xt=Ti,Wt=br),!0):!1},Ze,$e),Bn,Kn,cr=!1;if(Wt){var Hr=W-Wt.left=Kr.bottom?1:0}return Dn=Ne(C.text,Dn,1),dl(K,Dn,Kn,cr,W-Bn)}function bc(l,C,K,W,q,xe,je){var Ze=ze(function(gt){var Xt=q[gt],Wt=Xt.level!=1;return vt(os(l,bn(K,Wt?Xt.to:Xt.from,Wt?"before":"after"),"line",C,W),xe,je,!0)},0,q.length-1),$e=q[Ze];if(Ze>0){var ot=$e.level!=1,Ot=os(l,bn(K,ot?$e.from:$e.to,ot?"after":"before"),"line",C,W);vt(Ot,xe,je,!0)&&Ot.top>je&&($e=q[Ze-1])}return $e}function Sc(l,C,K,W,q,xe,je){var Ze=dr(l,C,W,je),$e=Ze.begin,ot=Ze.end;/\s/.test(C.text.charAt(ot-1))&&ot--;for(var Ot=null,gt=null,Xt=0;Xt=ot||Wt.to<=$e)){var Dn=Wt.level!=1,Bn=nl(l,W,Dn?Math.min(ot,Wt.to)-1:Math.max($e,Wt.from)).right,Kn=BnKn)&&(Ot=Wt,gt=Kn)}}return Ot||(Ot=q[q.length-1]),Ot.from<$e&&(Ot={from:$e,to:Ot.to,level:Ot.level}),Ot.to>ot&&(Ot={from:Ot.from,to:ot,level:Ot.level}),Ot}var Nl;function Ga(l){if(l.cachedTextHeight!=null)return l.cachedTextHeight;if(Nl==null){Nl=G("pre",null,"CodeMirror-line-like");for(var C=0;C<49;++C)Nl.appendChild(document.createTextNode("x")),Nl.appendChild(G("br"));Nl.appendChild(document.createTextNode("x"))}V(l.measure,Nl);var K=Nl.offsetHeight/50;return K>3&&(l.cachedTextHeight=K),P(l.measure),K||1}function Vl(l){if(l.cachedCharWidth!=null)return l.cachedCharWidth;var C=G("span","xxxxxxxxxx"),K=G("pre",[C],"CodeMirror-line-like");V(l.measure,K);var W=C.getBoundingClientRect(),q=(W.right-W.left)/10;return q>2&&(l.cachedCharWidth=q),q||10}function Rl(l){for(var C=l.display,K={},W={},q=C.gutters.clientLeft,xe=C.gutters.firstChild,je=0;xe;xe=xe.nextSibling,++je){var Ze=l.display.gutterSpecs[je].className;K[Ze]=xe.offsetLeft+xe.clientLeft+q,W[Ze]=xe.clientWidth}return{fixedPos:pl(C),gutterTotalWidth:C.gutters.offsetWidth,gutterLeft:K,gutterWidth:W,wrapperWidth:C.wrapper.clientWidth}}function pl(l){return l.scroller.getBoundingClientRect().left-l.sizer.getBoundingClientRect().left}function jo(l){var C=Ga(l.display),K=l.options.lineWrapping,W=K&&Math.max(5,l.display.scroller.clientWidth/Vl(l.display)-3);return function(q){if(Yt(l.doc,q))return 0;var xe=0;if(q.widgets)for(var je=0;je0&&(ot=Jn(l.doc,$e.line).text).length==$e.ch){var Ot=ee(ot,ot.length,l.options.tabSize)-ot.length;$e=bn($e.line,Math.max(0,Math.round((xe-tl(l.display).left)/Vl(l.display))-Ot))}return $e}function Sa(l,C){if(C>=l.display.viewTo||(C-=l.display.viewFrom,C<0))return null;for(var K=l.display.view,W=0;WC)&&(q.updateLineNumbers=C),l.curOp.viewChanged=!0,C>=q.viewTo)tn&&Nr(l.doc,C)q.viewFrom?ds(l):(q.viewFrom+=W,q.viewTo+=W);else if(C<=q.viewFrom&&K>=q.viewTo)ds(l);else if(C<=q.viewFrom){var xe=na(l,K,K+W,1);xe?(q.view=q.view.slice(xe.index),q.viewFrom=xe.lineN,q.viewTo+=W):ds(l)}else if(K>=q.viewTo){var je=na(l,C,C,-1);je?(q.view=q.view.slice(0,je.index),q.viewTo=je.lineN):ds(l)}else{var Ze=na(l,C,C,-1),$e=na(l,K,K+W,1);Ze&&$e?(q.view=q.view.slice(0,Ze.index).concat(fi(l,Ze.lineN,$e.lineN)).concat(q.view.slice($e.index)),q.viewTo+=W):ds(l)}var ot=q.externalMeasured;ot&&(K=q.lineN&&C=W.viewTo)){var xe=W.view[Sa(l,C)];if(xe.node!=null){var je=xe.changes||(xe.changes=[]);le(je,K)==-1&&je.push(K)}}}function ds(l){l.display.viewFrom=l.display.viewTo=l.doc.first,l.display.view=[],l.display.viewOffset=0}function na(l,C,K,W){var q=Sa(l,C),xe,je=l.display.view;if(!tn||K==l.doc.first+l.doc.size)return{index:q,lineN:K};for(var Ze=l.display.viewFrom,$e=0;$e0){if(q==je.length-1)return null;xe=Ze+je[q].size-C,q++}else xe=Ze-C;C+=xe,K+=xe}for(;Nr(l.doc,K)!=K;){if(q==(W<0?0:je.length-1))return null;K+=W*je[q-(W<0?1:0)].size,q+=W}return{index:q,lineN:K}}function Oo(l,C,K){var W=l.display,q=W.view;q.length==0||C>=W.viewTo||K<=W.viewFrom?(W.view=fi(l,C,K),W.viewFrom=C):(W.viewFrom>C?W.view=fi(l,C,W.viewFrom).concat(W.view):W.viewFromK&&(W.view=W.view.slice(0,Sa(l,K)))),W.viewTo=K}function ca(l){for(var C=l.display.view,K=0,W=0;W=l.display.viewTo||Ze.to().line0?C.blinker=setInterval(function(){l.hasFocus()||au(l),C.cursorDiv.style.visibility=(K=!K)?"":"hidden"},l.options.cursorBlinkRate):l.options.cursorBlinkRate<0&&(C.cursorDiv.style.visibility="hidden")}}function Lo(l){l.state.focused||(l.display.input.focus(),ro(l))}function Go(l){l.state.delayingBlurEvent=!0,setTimeout(function(){l.state.delayingBlurEvent&&(l.state.delayingBlurEvent=!1,au(l))},100)}function ro(l,C){l.state.delayingBlurEvent&&(l.state.delayingBlurEvent=!1),l.options.readOnly!="nocursor"&&(l.state.focused||(st(l,"focus",l,C),l.state.focused=!0,he(l.display.wrapper,"CodeMirror-focused"),!l.curOp&&l.display.selForContextMenu!=l.doc.sel&&(l.display.input.reset(),d&&setTimeout(function(){return l.display.input.reset(!0)},20)),l.display.input.receivedFocus()),xo(l))}function au(l,C){l.state.delayingBlurEvent||(l.state.focused&&(st(l,"blur",l,C),l.state.focused=!1,H(l.display.wrapper,"CodeMirror-focused")),clearInterval(l.display.blinker),setTimeout(function(){l.state.focused||(l.display.shift=!1)},150))}function xr(l){for(var C=l.display,K=C.lineDiv.offsetTop,W=0;W.005||Ot<-.005)&&(mi(q.line,je),Hc(q.line),q.rest))for(var gt=0;gtl.display.sizerWidth){var Xt=Math.ceil(Ze/Vl(l.display));Xt>l.display.maxLineLength&&(l.display.maxLineLength=Xt,l.display.maxLine=q.line,l.display.maxLineChanged=!0)}}}}function Hc(l){if(l.widgets)for(var C=0;C=je&&(xe=Yn(C,fr(Jn(C,$e))-l.wrapper.clientHeight),je=$e)}return{from:xe,to:Math.max(je,xe+1)}}function zc(l,C){if(!ge(l,"scrollCursorIntoView")){var K=l.display,W=K.sizer.getBoundingClientRect(),q=null;if(C.top+W.top<0?q=!0:C.bottom+W.top>(window.innerHeight||document.documentElement.clientHeight)&&(q=!1),q!=null&&!h){var xe=G("div","\u200B",null,`position: absolute; top: `+(C.top-K.viewOffset-ks(l.display))+`px; height: `+(C.bottom-C.top+rs(l)+K.barHeight)+`px; left: `+C.left+"px; width: "+Math.max(2,C.right-C.left)+"px;");l.display.lineSpace.appendChild(xe),xe.scrollIntoView(q),l.display.lineSpace.removeChild(xe)}}}function lu(l,C,K,W){W==null&&(W=0);var q;!l.options.lineWrapping&&C==K&&(C=C.ch?bn(C.line,C.sticky=="before"?C.ch-1:C.ch,"after"):C,K=C.sticky=="before"?bn(C.line,C.ch+1,"before"):C);for(var xe=0;xe<5;xe++){var je=!1,Ze=os(l,C),$e=!K||K==C?Ze:os(l,K);q={left:Math.min(Ze.left,$e.left),top:Math.min(Ze.top,$e.top)-W,right:Math.max(Ze.left,$e.left),bottom:Math.max(Ze.bottom,$e.bottom)+W};var ot=xc(l,q),Ot=l.doc.scrollTop,gt=l.doc.scrollLeft;if(ot.scrollTop!=null&&(at(l,ot.scrollTop),Math.abs(l.doc.scrollTop-Ot)>1&&(je=!0)),ot.scrollLeft!=null&&(mt(l,ot.scrollLeft),Math.abs(l.doc.scrollLeft-gt)>1&&(je=!0)),!je)break}return q}function Hu(l,C){var K=xc(l,C);K.scrollTop!=null&&at(l,K.scrollTop),K.scrollLeft!=null&&mt(l,K.scrollLeft)}function xc(l,C){var K=l.display,W=Ga(l.display);C.top<0&&(C.top=0);var q=l.curOp&&l.curOp.scrollTop!=null?l.curOp.scrollTop:K.scroller.scrollTop,xe=ou(l),je={};C.bottom-C.top>xe&&(C.bottom=C.top+xe);var Ze=l.doc.height+Ma(K),$e=C.topZe-W;if(C.topq+xe){var Ot=Math.min(C.top,(ot?Ze:C.bottom)-xe);Ot!=q&&(je.scrollTop=Ot)}var gt=l.options.fixedGutter?0:K.gutters.offsetWidth,Xt=l.curOp&&l.curOp.scrollLeft!=null?l.curOp.scrollLeft:K.scroller.scrollLeft-gt,Wt=Bo(l)-K.gutters.offsetWidth,Dn=C.right-C.left>Wt;return Dn&&(C.right=C.left+Wt),C.left<10?je.scrollLeft=0:C.leftWt+Xt-3&&(je.scrollLeft=C.right+(Dn?0:10)-Wt),je}function Il(l,C){C!=null&&(Yl(l),l.curOp.scrollTop=(l.curOp.scrollTop==null?l.doc.scrollTop:l.curOp.scrollTop)+C)}function ml(l){Yl(l);var C=l.getCursor();l.curOp.scrollToPos={from:C,to:C,margin:l.options.cursorScrollMargin}}function Kl(l,C,K){(C!=null||K!=null)&&Yl(l),C!=null&&(l.curOp.scrollLeft=C),K!=null&&(l.curOp.scrollTop=K)}function io(l,C){Yl(l),l.curOp.scrollToPos=C}function Yl(l){var C=l.curOp.scrollToPos;if(C){l.curOp.scrollToPos=null;var K=Uu(l,C.from),W=Uu(l,C.to);Ke(l,K,W,C.margin)}}function Ke(l,C,K,W){var q=xc(l,{left:Math.min(C.left,K.left),top:Math.min(C.top,K.top)-W,right:Math.max(C.right,K.right),bottom:Math.max(C.bottom,K.bottom)+W});Kl(l,q.scrollLeft,q.scrollTop)}function at(l,C){Math.abs(l.doc.scrollTop-C)<2||(B||Qe(l,{top:C}),pt(l,C,!0),B&&Qe(l),wi(l,100))}function pt(l,C,K){C=Math.max(0,Math.min(l.display.scroller.scrollHeight-l.display.scroller.clientHeight,C)),!(l.display.scroller.scrollTop==C&&!K)&&(l.doc.scrollTop=C,l.display.scrollbars.setScrollTop(C),l.display.scroller.scrollTop!=C&&(l.display.scroller.scrollTop=C))}function mt(l,C,K,W){C=Math.max(0,Math.min(C,l.display.scroller.scrollWidth-l.display.scroller.clientWidth)),!((K?C==l.doc.scrollLeft:Math.abs(l.doc.scrollLeft-C)<2)&&!W)&&(l.doc.scrollLeft=C,Bt(l),l.display.scroller.scrollLeft!=C&&(l.display.scroller.scrollLeft=C),l.display.scrollbars.setScrollLeft(C))}function kt(l){var C=l.display,K=C.gutters.offsetWidth,W=Math.round(l.doc.height+Ma(l.display));return{clientHeight:C.scroller.clientHeight,viewHeight:C.wrapper.clientHeight,scrollWidth:C.scroller.scrollWidth,clientWidth:C.scroller.clientWidth,viewWidth:C.wrapper.clientWidth,barLeft:l.options.fixedGutter?K:0,docHeight:W,scrollHeight:W+rs(l)+C.barHeight,nativeBarWidth:C.nativeBarWidth,gutterWidth:K}}var Pt=function(l,C,K){this.cm=K;var W=this.vert=G("div",[G("div",null,null,"min-width: 1px")],"CodeMirror-vscrollbar"),q=this.horiz=G("div",[G("div",null,null,"height: 100%; min-height: 1px")],"CodeMirror-hscrollbar");W.tabIndex=q.tabIndex=-1,l(W),l(q),ht(W,"scroll",function(){W.clientHeight&&C(W.scrollTop,"vertical")}),ht(q,"scroll",function(){q.clientWidth&&C(q.scrollLeft,"horizontal")}),this.checkedZeroWidth=!1,I&&u<8&&(this.horiz.style.minHeight=this.vert.style.minWidth="18px")};Pt.prototype.update=function(l){var C=l.scrollWidth>l.clientWidth+1,K=l.scrollHeight>l.clientHeight+1,W=l.nativeBarWidth;if(K){this.vert.style.display="block",this.vert.style.bottom=C?W+"px":"0";var q=l.viewHeight-(C?W:0);this.vert.firstChild.style.height=Math.max(0,l.scrollHeight-l.clientHeight+q)+"px"}else this.vert.style.display="",this.vert.firstChild.style.height="0";if(C){this.horiz.style.display="block",this.horiz.style.right=K?W+"px":"0",this.horiz.style.left=l.barLeft+"px";var xe=l.viewWidth-l.barLeft-(K?W:0);this.horiz.firstChild.style.width=Math.max(0,l.scrollWidth-l.clientWidth+xe)+"px"}else this.horiz.style.display="",this.horiz.firstChild.style.width="0";return!this.checkedZeroWidth&&l.clientHeight>0&&(W==0&&this.zeroWidthHack(),this.checkedZeroWidth=!0),{right:K?W:0,bottom:C?W:0}},Pt.prototype.setScrollLeft=function(l){this.horiz.scrollLeft!=l&&(this.horiz.scrollLeft=l),this.disableHoriz&&this.enableZeroWidthBar(this.horiz,this.disableHoriz,"horiz")},Pt.prototype.setScrollTop=function(l){this.vert.scrollTop!=l&&(this.vert.scrollTop=l),this.disableVert&&this.enableZeroWidthBar(this.vert,this.disableVert,"vert")},Pt.prototype.zeroWidthHack=function(){var l=_&&!c?"12px":"18px";this.horiz.style.height=this.vert.style.width=l,this.horiz.style.pointerEvents=this.vert.style.pointerEvents="none",this.disableHoriz=new se,this.disableVert=new se},Pt.prototype.enableZeroWidthBar=function(l,C,K){l.style.pointerEvents="auto";function W(){var q=l.getBoundingClientRect(),xe=K=="vert"?document.elementFromPoint(q.right-1,(q.top+q.bottom)/2):document.elementFromPoint((q.right+q.left)/2,q.bottom-1);xe!=l?l.style.pointerEvents="none":C.set(1e3,W)}C.set(1e3,W)},Pt.prototype.clear=function(){var l=this.horiz.parentNode;l.removeChild(this.horiz),l.removeChild(this.vert)};var Ht=function(){};Ht.prototype.update=function(){return{bottom:0,right:0}},Ht.prototype.setScrollLeft=function(){},Ht.prototype.setScrollTop=function(){},Ht.prototype.clear=function(){};function Qt(l,C){C||(C=kt(l));var K=l.display.barWidth,W=l.display.barHeight;xn(l,C);for(var q=0;q<4&&K!=l.display.barWidth||W!=l.display.barHeight;q++)K!=l.display.barWidth&&l.options.lineWrapping&&xr(l),xn(l,kt(l)),K=l.display.barWidth,W=l.display.barHeight}function xn(l,C){var K=l.display,W=K.scrollbars.update(C);K.sizer.style.paddingRight=(K.barWidth=W.right)+"px",K.sizer.style.paddingBottom=(K.barHeight=W.bottom)+"px",K.heightForcer.style.borderBottom=W.bottom+"px solid transparent",W.right&&W.bottom?(K.scrollbarFiller.style.display="block",K.scrollbarFiller.style.height=W.bottom+"px",K.scrollbarFiller.style.width=W.right+"px"):K.scrollbarFiller.style.display="",W.bottom&&l.options.coverGutterNextToScrollbar&&l.options.fixedGutter?(K.gutterFiller.style.display="block",K.gutterFiller.style.height=W.bottom+"px",K.gutterFiller.style.width=C.gutterWidth+"px"):K.gutterFiller.style.display=""}var dn={native:Pt,null:Ht};function Ln(l){l.display.scrollbars&&(l.display.scrollbars.clear(),l.display.scrollbars.addClass&&H(l.display.wrapper,l.display.scrollbars.addClass)),l.display.scrollbars=new dn[l.options.scrollbarStyle](function(C){l.display.wrapper.insertBefore(C,l.display.scrollbarFiller),ht(C,"mousedown",function(){l.state.focused&&setTimeout(function(){return l.display.input.focus()},0)}),C.setAttribute("cm-not-content","true")},function(C,K){K=="horizontal"?mt(l,C):at(l,C)},l),l.display.scrollbars.addClass&&he(l.display.wrapper,l.display.scrollbars.addClass)}var yn=0;function An(l){l.curOp={cm:l,viewChanged:!1,startHeight:l.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:++yn},Rr(l.curOp)}function Cn(l){var C=l.curOp;C&&ui(C,function(K){for(var W=0;W=K.viewTo)||K.maxLineChanged&&C.options.lineWrapping,l.update=l.mustUpdate&&new Bi(C,l.mustUpdate&&{top:l.scrollTop,ensure:l.scrollToPos},l.forceUpdate)}function mr(l){l.updatedDisplay=l.mustUpdate&&Pe(l.cm,l.update)}function Or(l){var C=l.cm,K=C.display;l.updatedDisplay&&xr(C),l.barMeasure=kt(C),K.maxLineChanged&&!C.options.lineWrapping&&(l.adjustWidthTo=Js(C,K.maxLine,K.maxLine.text.length).left+3,C.display.sizerWidth=l.adjustWidthTo,l.barMeasure.scrollWidth=Math.max(K.scroller.clientWidth,K.sizer.offsetLeft+l.adjustWidthTo+rs(C)+C.display.barWidth),l.maxScrollLeft=Math.max(0,K.sizer.offsetLeft+l.adjustWidthTo-Bo(C))),(l.updatedDisplay||l.selectionChanged)&&(l.preparedSelection=K.input.prepareSelection())}function Hn(l){var C=l.cm;l.adjustWidthTo!=null&&(C.display.sizer.style.minWidth=l.adjustWidthTo+"px",l.maxScrollLeft=l.display.viewTo)){var K=+new Date+l.options.workTime,W=Ro(l,C.highlightFrontier),q=[];C.iter(W.line,Math.min(C.first+C.size,l.display.viewTo+500),function(xe){if(W.line>=l.display.viewFrom){var je=xe.styles,Ze=xe.text.length>l.options.maxHighlightLength?Vr(C.mode,W.state):null,$e=ys(l,xe,W,!0);Ze&&(W.state=Ze),xe.styles=$e.styles;var ot=xe.styleClasses,Ot=$e.classes;Ot?xe.styleClasses=Ot:ot&&(xe.styleClasses=null);for(var gt=!je||je.length!=xe.styles.length||ot!=Ot&&(!ot||!Ot||ot.bgClass!=Ot.bgClass||ot.textClass!=Ot.textClass),Xt=0;!gt&&XtK)return wi(l,l.options.workDelay),!0}),C.highlightFrontier=W.line,C.modeFrontier=Math.max(C.modeFrontier,W.line),q.length&&Qn(l,function(){for(var xe=0;xe=K.viewFrom&&C.visible.to<=K.viewTo&&(K.updateLineNumbers==null||K.updateLineNumbers>=K.viewTo)&&K.renderedView==K.view&&ca(l)==0)return!1;Rt(l)&&(ds(l),C.dims=Rl(l));var q=W.first+W.size,xe=Math.max(C.visible.from-l.options.viewportMargin,W.first),je=Math.min(q,C.visible.to+l.options.viewportMargin);K.viewFromje&&K.viewTo-je<20&&(je=Math.min(q,K.viewTo)),tn&&(xe=Nr(l.doc,xe),je=$r(l.doc,je));var Ze=xe!=K.viewFrom||je!=K.viewTo||K.lastWrapHeight!=C.wrapperHeight||K.lastWrapWidth!=C.wrapperWidth;Oo(l,xe,je),K.viewOffset=fr(Jn(l.doc,K.viewFrom)),l.display.mover.style.top=K.viewOffset+"px";var $e=ca(l);if(!Ze&&$e==0&&!C.force&&K.renderedView==K.view&&(K.updateLineNumbers==null||K.updateLineNumbers>=K.viewTo))return!1;var ot=Ee(l);return $e>4&&(K.lineDiv.style.display="none"),nt(l,K.updateLineNumbers,C.dims),$e>4&&(K.lineDiv.style.display=""),K.renderedView=K.view,Ae(ot),P(K.cursorDiv),P(K.selectionDiv),K.gutters.style.height=K.sizer.style.minHeight=0,Ze&&(K.lastWrapHeight=C.wrapperHeight,K.lastWrapWidth=C.wrapperWidth,wi(l,400)),K.updateLineNumbers=null,!0}function Ye(l,C){for(var K=C.viewport,W=!0;;W=!1){if(!W||!l.options.lineWrapping||C.oldDisplayWidth==Bo(l)){if(K&&K.top!=null&&(K={top:Math.min(l.doc.height+Ma(l.display)-ou(l),K.top)}),C.visible=Wi(l.display,l.doc,K),C.visible.from>=l.display.viewFrom&&C.visible.to<=l.display.viewTo)break}else W&&(C.visible=Wi(l.display,l.doc,K));if(!Pe(l,C))break;xr(l);var q=kt(l);Ds(l),Qt(l,q),Ft(l,q),C.force=!1}C.signal(l,"update",l),(l.display.viewFrom!=l.display.reportedViewFrom||l.display.viewTo!=l.display.reportedViewTo)&&(C.signal(l,"viewportChange",l,l.display.viewFrom,l.display.viewTo),l.display.reportedViewFrom=l.display.viewFrom,l.display.reportedViewTo=l.display.viewTo)}function Qe(l,C){var K=new Bi(l,C);if(Pe(l,K)){xr(l),Ye(l,K);var W=kt(l);Ds(l),Qt(l,W),Ft(l,W),K.finish()}}function nt(l,C,K){var W=l.display,q=l.options.lineNumbers,xe=W.lineDiv,je=xe.firstChild;function Ze(Dn){var Bn=Dn.nextSibling;return d&&_&&l.display.currentWheelTarget==Dn?Dn.style.display="none":Dn.parentNode.removeChild(Dn),Bn}for(var $e=W.view,ot=W.viewFrom,Ot=0;Ot<$e.length;Ot++){var gt=$e[Ot];if(!gt.hidden)if(!gt.node||gt.node.parentNode!=xe){var Xt=go(l,gt,ot,K);xe.insertBefore(Xt,je)}else{for(;je!=gt.node;)je=Ze(je);var Wt=q&&C!=null&&C<=ot&>.lineNumber;gt.changes&&(le(gt.changes,"gutter")>-1&&(Wt=!1),ao(l,gt,ot,K)),Wt&&(P(gt.lineNumber),gt.lineNumber.appendChild(document.createTextNode(zi(l.options,ot)))),je=gt.node.nextSibling}ot+=gt.size}for(;je;)je=Ze(je)}function bt(l){var C=l.gutters.offsetWidth;l.sizer.style.marginLeft=C+"px"}function Ft(l,C){l.display.sizer.style.minHeight=C.docHeight+"px",l.display.heightForcer.style.top=C.docHeight+"px",l.display.gutters.style.height=C.docHeight+l.display.barHeight+rs(l)+"px"}function Bt(l){var C=l.display,K=C.view;if(!(!C.alignWidgets&&(!C.gutters.firstChild||!l.options.fixedGutter))){for(var W=pl(C)-C.scroller.scrollLeft+l.doc.scrollLeft,q=C.gutters.offsetWidth,xe=W+"px",je=0;jeje.clientWidth,$e=je.scrollHeight>je.clientHeight;if(W&&Ze||q&&$e){if(q&&_&&d){e:for(var ot=C.target,Ot=xe.view;ot!=je;ot=ot.parentNode)for(var gt=0;gt=0&&or(l,W.to())<=0)return K}return-1};var wn=function(l,C){this.anchor=l,this.head=C};wn.prototype.from=function(){return yr(this.anchor,this.head)},wn.prototype.to=function(){return ki(this.anchor,this.head)},wn.prototype.empty=function(){return this.head.line==this.anchor.line&&this.head.ch==this.anchor.ch};function fn(l,C,K){var W=l&&l.options.selectionsMayTouch,q=C[K];C.sort(function(Xt,Wt){return or(Xt.from(),Wt.from())}),K=le(C,q);for(var xe=1;xe0:$e>=0){var ot=yr(Ze.from(),je.from()),Ot=ki(Ze.to(),je.to()),gt=Ze.empty()?je.from()==je.head:Ze.from()==Ze.head;xe<=K&&--K,C.splice(--xe,2,new wn(gt?Ot:ot,gt?ot:Ot))}}return new pn(C,K)}function Tr(l,C){return new pn([new wn(l,C||l)],0)}function Li(l){return l.text?bn(l.from.line+l.text.length-1,Re(l.text).length+(l.text.length==1?l.from.ch:0)):l.to}function ci(l,C){if(or(l,C.from)<0)return l;if(or(l,C.to)<=0)return Li(C);var K=l.line+C.text.length-(C.to.line-C.from.line)-1,W=l.ch;return l.line==C.to.line&&(W+=Li(C).ch-C.to.ch),bn(K,W)}function qi(l,C){for(var K=[],W=0;W1&&l.remove(Ze.line+1,Dn-1),l.insert(Ze.line+1,cr)}Wn(l,"change",l,C)}function Eo(l,C,K){function W(q,xe,je){if(q.linked)for(var Ze=0;Ze1&&!l.done[l.done.length-2].ranges)return l.done.pop(),Re(l.done)}function Wa(l,C,K,W){var q=l.history;q.undone.length=0;var xe=+new Date,je,Ze;if((q.lastOp==W||q.lastOrigin==C.origin&&C.origin&&(C.origin.charAt(0)=="+"&&q.lastModTime>xe-(l.cm?l.cm.options.historyEventDelay:500)||C.origin.charAt(0)=="*"))&&(je=Is(q,q.lastOp==W)))Ze=Re(je.changes),or(C.from,C.to)==0&&or(C.from,Ze.to)==0?Ze.to=Li(C):je.changes.push(Ao(l,C));else{var $e=Re(q.done);for((!$e||!$e.ranges)&&Do(l.sel,q.done),je={changes:[Ao(l,C)],generation:q.generation},q.done.push(je);q.done.length>q.undoDepth;)q.done.shift(),q.done[0].ranges||q.done.shift()}q.done.push(K),q.generation=++q.maxGeneration,q.lastModTime=q.lastSelTime=xe,q.lastOp=q.lastSelOp=W,q.lastOrigin=q.lastSelOrigin=C.origin,Ze||st(l,"historyAdded")}function wu(l,C,K,W){var q=C.charAt(0);return q=="*"||q=="+"&&K.ranges.length==W.ranges.length&&K.somethingSelected()==W.somethingSelected()&&new Date-l.history.lastSelTime<=(l.cm?l.cm.options.historyEventDelay:500)}function Ol(l,C,K,W){var q=l.history,xe=W&&W.origin;K==q.lastSelOp||xe&&q.lastSelOrigin==xe&&(q.lastModTime==q.lastSelTime&&q.lastOrigin==xe||wu(l,xe,Re(q.done),C))?q.done[q.done.length-1]=C:Do(C,q.done),q.lastSelTime=+new Date,q.lastSelOrigin=xe,q.lastSelOp=K,W&&W.clearRedo!==!1&&en(q.undone)}function Do(l,C){var K=Re(C);K&&K.ranges&&K.equals(l)||C.push(l)}function Va(l,C,K,W){var q=C["spans_"+l.id],xe=0;l.iter(Math.max(l.first,K),Math.min(l.first+l.size,W),function(je){je.markedSpans&&((q||(q=C["spans_"+l.id]={}))[xe]=je.markedSpans),++xe})}function ss(l){if(!l)return null;for(var C,K=0;K-1&&(Re(Ze)[gt]=ot[gt],delete ot[gt])}}return W}function Cu(l,C,K,W){if(W){var q=l.anchor;if(K){var xe=or(C,q)<0;xe!=or(K,q)<0?(q=C,C=K):xe!=or(C,K)<0&&(C=K)}return new wn(q,C)}else return new wn(K||C,C)}function uu(l,C,K,W,q){q==null&&(q=l.cm&&(l.cm.display.shift||l.extend)),Ko(l,new pn([Cu(l.sel.primary(),C,K,q)],0),W)}function zu(l,C,K){for(var W=[],q=l.cm&&(l.cm.display.shift||l.extend),xe=0;xe=C.ch:Ze.to>C.ch))){if(q&&(st($e,"beforeCursorEnter"),$e.explicitlyCleared))if(xe.markedSpans){--je;continue}else break;if(!$e.atomic)continue;if(K){var gt=$e.find(W<0?1:-1),Xt=void 0;if((W<0?Ot:ot)&&(gt=po(l,gt,-W,gt&>.line==C.line?xe:null)),gt&>.line==C.line&&(Xt=or(gt,K))&&(W<0?Xt<0:Xt>0))return pr(l,gt,C,W,q)}var Wt=$e.find(W<0?-1:1);return(W<0?ot:Ot)&&(Wt=po(l,Wt,W,Wt.line==C.line?xe:null)),Wt?pr(l,Wt,C,W,q):null}}return C}function Ui(l,C,K,W,q){var xe=W||1,je=pr(l,C,K,xe,q)||!q&&pr(l,C,K,xe,!0)||pr(l,C,K,-xe,q)||!q&&pr(l,C,K,-xe,!0);return je||(l.cantEdit=!0,bn(l.first,0))}function po(l,C,K,W){return K<0&&C.ch==0?C.line>l.first?Fr(l,bn(C.line-1)):null:K>0&&C.ch==(W||Jn(l,C.line)).text.length?C.line=0;--q)as(l,{from:W[q].from,to:W[q].to,text:q?[""]:C.text,origin:C.origin});else as(l,C)}}function as(l,C){if(!(C.text.length==1&&C.text[0]==""&&or(C.from,C.to)==0)){var K=qi(l,C);Wa(l,C,K,l.cm?l.cm.curOp.id:NaN),Os(l,C,K,gn(l,C));var W=[];Eo(l,function(q,xe){!xe&&le(W,q.history)==-1&&(Gc(q.history,C),W.push(q.history)),Os(q,C,null,gn(q,C))})}}function xa(l,C,K){var W=l.cm&&l.cm.state.suppressEdits;if(!(W&&!K)){for(var q=l.history,xe,je=l.sel,Ze=C=="undo"?q.done:q.undone,$e=C=="undo"?q.undone:q.done,ot=0;ot=0;--Wt){var Dn=Xt(Wt);if(Dn)return Dn.v}}}}function yl(l,C){if(C!=0&&(l.first+=C,l.sel=new pn(Oe(l.sel.ranges,function(q){return new wn(bn(q.anchor.line+C,q.anchor.ch),bn(q.head.line+C,q.head.ch))}),l.sel.primIndex),l.cm)){Io(l.cm,l.first,l.first-C,C);for(var K=l.cm.display,W=K.viewFrom;Wl.lastLine())){if(C.from.linexe&&(C={from:C.from,to:bn(xe,Jn(l,xe).text.length),text:[C.text[0]],origin:C.origin}),C.removed=bi(l,C.from,C.to),K||(K=qi(l,C)),l.cm?Ml(l.cm,C,W):uo(l,C,W),ia(l,K,Be),l.cantEdit&&Ui(l,bn(l.firstLine(),0))&&(l.cantEdit=!1)}}function Ml(l,C,K){var W=l.doc,q=l.display,xe=C.from,je=C.to,Ze=!1,$e=xe.line;l.options.lineWrapping||($e=Lt(wr(Jn(W,xe.line))),W.iter($e,je.line+1,function(Wt){if(Wt==q.maxLine)return Ze=!0,!0})),W.sel.contains(C.from,C.to)>-1&&on(l),uo(W,C,K,jo(l)),l.options.lineWrapping||(W.iter($e,xe.line+C.text.length,function(Wt){var Dn=pi(Wt);Dn>q.maxLineLength&&(q.maxLine=Wt,q.maxLineLength=Dn,q.maxLineChanged=!0,Ze=!1)}),Ze&&(l.curOp.updateMaxLine=!0)),hi(W,xe.line),wi(l,400);var ot=C.text.length-(je.line-xe.line)-1;C.full?Io(l):xe.line==je.line&&C.text.length==1&&!Ur(l.doc,C)?Ci(l,xe.line,"text"):Io(l,xe.line,je.line+1,ot);var Ot=mn(l,"changes"),gt=mn(l,"change");if(gt||Ot){var Xt={from:xe,to:je,text:C.text,removed:C.removed,origin:C.origin};gt&&Wn(l,"change",l,Xt),Ot&&(l.curOp.changeObjs||(l.curOp.changeObjs=[])).push(Xt)}l.display.selForContextMenu=null}function oa(l,C,K,W,q){var xe;W||(W=K),or(W,K)<0&&(xe=[W,K],K=xe[0],W=xe[1]),typeof C=="string"&&(C=l.splitLines(C)),fa(l,{from:K,to:W,text:C,origin:q})}function il(l,C,K,W){K1||!(this.children[0]instanceof oi))){var Ze=[];this.collapse(Ze),this.children=[new oi(Ze)],this.children[0].parent=this}},collapse:function(l){for(var C=0;C50){for(var je=q.lines.length%25+25,Ze=je;Ze10);l.parent.maybeSpill()}},iterN:function(l,C,K){for(var W=0;Wl.display.maxLineLength&&(l.display.maxLine=ot,l.display.maxLineLength=Ot,l.display.maxLineChanged=!0)}W!=null&&l&&this.collapsed&&Io(l,W,q+1),this.lines.length=0,this.explicitlyCleared=!0,this.atomic&&this.doc.cantEdit&&(this.doc.cantEdit=!1,l&&Ll(l.doc)),l&&Wn(l,"markerCleared",l,this,W,q),C&&Cn(l),this.parent&&this.parent.clear()}},Ct.prototype.find=function(l,C){l==null&&this.type=="bookmark"&&(l=1);for(var K,W,q=0;q0||je==0&&xe.clearWhenEmpty!==!1)return xe;if(xe.replacedWith&&(xe.collapsed=!0,xe.widgetNode=Q("span",[xe.replacedWith],"CodeMirror-widget"),W.handleMouseEvents||xe.widgetNode.setAttribute("cm-ignore-events","true"),W.insertLeft&&(xe.widgetNode.insertLeft=!0)),xe.collapsed){if(ri(l,C.line,C,K,xe)||C.line!=K.line&&ri(l,K.line,C,K,xe))throw new Error("Inserting collapsed marker partially overlapping an existing one");ut()}xe.addToHistory&&Wa(l,{from:C,to:K,origin:"markText"},l.sel,NaN);var Ze=C.line,$e=l.cm,ot;if(l.iter(Ze,K.line+1,function(gt){$e&&xe.collapsed&&!$e.options.lineWrapping&&wr(gt)==$e.display.maxLine&&(ot=!0),xe.collapsed&&Ze!=C.line&&mi(gt,0),dt(gt,new Ge(xe,Ze==C.line?C.ch:null,Ze==K.line?K.ch:null)),++Ze}),xe.collapsed&&l.iter(C.line,K.line+1,function(gt){Yt(l,gt)&&mi(gt,0)}),xe.clearOnEnter&&ht(xe,"beforeCursorEnter",function(){return xe.clear()}),xe.readOnly&&(_i(),(l.history.done.length||l.history.undone.length)&&l.clearHistory()),xe.collapsed&&(xe.id=++hu,xe.atomic=!0),$e){if(ot&&($e.curOp.updateMaxLine=!0),xe.collapsed)Io($e,C.line,K.line+1);else if(xe.className||xe.startStyle||xe.endStyle||xe.css||xe.attributes||xe.title)for(var Ot=C.line;Ot<=K.line;Ot++)Ci($e,Ot,"text");xe.atomic&&Ll($e.doc),Wn($e,"markerAdded",$e,xe)}return xe}var Ya=function(l,C){this.markers=l,this.primary=C;for(var K=0;K=0;$e--)fa(this,W[$e]);Ze?Xl(this,Ze):this.cm&&ml(this.cm)}),undo:Cr(function(){xa(this,"undo")}),redo:Cr(function(){xa(this,"redo")}),undoSelection:Cr(function(){xa(this,"undo",!0)}),redoSelection:Cr(function(){xa(this,"redo",!0)}),setExtending:function(l){this.extend=l},getExtending:function(){return this.extend},historySize:function(){for(var l=this.history,C=0,K=0,W=0;W=l.ch)&&C.push(q.marker.parent||q.marker)}return C},findMarks:function(l,C,K){l=Fr(this,l),C=Fr(this,C);var W=[],q=l.line;return this.iter(l.line,C.line+1,function(xe){var je=xe.markedSpans;if(je)for(var Ze=0;Ze=$e.to||$e.from==null&&q!=l.line||$e.from!=null&&q==C.line&&$e.from>=C.ch)&&(!K||K($e.marker))&&W.push($e.marker.parent||$e.marker)}++q}),W},getAllMarks:function(){var l=[];return this.iter(function(C){var K=C.markedSpans;if(K)for(var W=0;Wl)return C=l,!0;l-=xe,++K}),Fr(this,bn(K,C))},indexFromPos:function(l){l=Fr(this,l);var C=l.ch;if(l.lineC&&(C=l.from),l.to!=null&&l.to-1){C.state.draggingText(l),setTimeout(function(){return C.display.input.focus()},20);return}try{var Ot=l.dataTransfer.getData("Text");if(Ot){var gt;if(C.state.draggingText&&!C.state.draggingText.copy&&(gt=C.listSelections()),ia(C.doc,Tr(K,K)),gt)for(var Xt=0;Xt=0;Ze--)oa(l.doc,"",W[Ze].from,W[Ze].to,"+delete");ml(l)})}function Vu(l,C,K){var W=Ne(l.text,C+K,K);return W<0||W>l.text.length?null:W}function Cs(l,C,K){var W=Vu(l,C.ch,K);return W==null?null:new bn(C.line,W,K<0?"after":"before")}function _c(l,C,K,W,q){if(l){C.doc.direction=="rtl"&&(q=-q);var xe=_t(K,C.doc.direction);if(xe){var je=q<0?Re(xe):xe[0],Ze=q<0==(je.level==1),$e=Ze?"after":"before",ot;if(je.level>0||C.doc.direction=="rtl"){var Ot=Da(C,K);ot=q<0?K.text.length-1:0;var gt=nl(C,Ot,ot).top;ot=ze(function(Xt){return nl(C,Ot,Xt).top==gt},q<0==(je.level==1)?je.from:je.to-1,ot),$e=="before"&&(ot=Vu(K,ot,1))}else ot=q<0?je.to:je.from;return new bn(W,ot,$e)}}return new bn(W,q<0?K.text.length:0,q<0?"before":"after")}function rd(l,C,K,W){var q=_t(C,l.doc.direction);if(!q)return Cs(C,K,W);K.ch>=C.text.length?(K.ch=C.text.length,K.sticky="before"):K.ch<=0&&(K.ch=0,K.sticky="after");var xe=ct(q,K.ch,K.sticky),je=q[xe];if(l.doc.direction=="ltr"&&je.level%2==0&&(W>0?je.to>K.ch:je.from=je.from&&Xt>=Ot.begin)){var Wt=gt?"before":"after";return new bn(K.line,Xt,Wt)}}var Dn=function(cr,Hr,Er){for(var Kr=function(Ts,ga){return ga?new bn(K.line,Ze(Ts,1),"before"):new bn(K.line,Ts,"after")};cr>=0&&cr0==(Ti.level!=1),to=br?Er.begin:Ze(Er.end,-1);if(Ti.from<=to&&to0?Ot.end:Ze(Ot.begin,-1);return Kn!=null&&!(W>0&&Kn==C.text.length)&&(Bn=Dn(W>0?0:q.length-1,W,ot(Kn)),Bn)?Bn:null}var Wc={selectAll:Ii,singleSelection:function(l){return l.setSelection(l.getCursor("anchor"),l.getCursor("head"),Be)},killLine:function(l){return ta(l,function(C){if(C.empty()){var K=Jn(l.doc,C.head.line).text.length;return C.head.ch==K&&C.head.line0)q=new bn(q.line,q.ch+1),l.replaceRange(xe.charAt(q.ch-1)+xe.charAt(q.ch-2),bn(q.line,q.ch-2),q,"+transpose");else if(q.line>l.doc.first){var je=Jn(l.doc,q.line-1).text;je&&(q=new bn(q.line,1),l.replaceRange(xe.charAt(0)+l.doc.lineSeparator()+je.charAt(je.length-1),bn(q.line-1,je.length-1),q,"+transpose"))}}K.push(new wn(q,q))}l.setSelections(K)})},newlineAndIndent:function(l){return Qn(l,function(){for(var C=l.listSelections(),K=C.length-1;K>=0;K--)l.replaceRange(l.doc.lineSeparator(),C[K].anchor,C[K].head,"+input");C=l.listSelections();for(var W=0;Wl&&or(C,this.pos)==0&&K==this.button};var ef,Sh;function ap(l,C){var K=+new Date;return Sh&&Sh.compare(K,l,C)?(ef=Sh=null,"triple"):ef&&ef.compare(K,l,C)?(Sh=new sp(K,l,C),ef=null,"double"):(ef=new sp(K,l,C),Sh=null,"single")}function Yu(l){var C=this,K=C.display;if(!(ge(C,l)||K.activeTouch&&K.input.supportsTouch())){if(K.input.ensurePolled(),K.shift=l.shiftKey,Qo(K,l)){d||(K.scroller.draggable=!1,setTimeout(function(){return K.scroller.draggable=!0},100));return}if(!ud(C,l)){var W=Ys(C,l),q=xt(l),xe=W?ap(W,q):"single";window.focus(),q==1&&C.state.selectingText&&C.state.selectingText(l),!(W&&lp(C,q,W,xe,l))&&(q==1?W?mg(C,W,xe,l):sn(l)==K.scroller&&On(l):q==2?(W&&uu(C.doc,W),setTimeout(function(){return K.input.focus()},20)):q==3&&(M?C.display.input.onContextMenu(l):Go(C)))}}}function lp(l,C,K,W,q){var xe="Click";return W=="double"?xe="Double"+xe:W=="triple"&&(xe="Triple"+xe),xe=(C==1?"Left":C==2?"Middle":"Right")+xe,yh(l,bl(xe,q),q,function(je){if(typeof je=="string"&&(je=Wc[je]),!je)return!1;var Ze=!1;try{l.isReadOnly()&&(l.state.suppressEdits=!0),Ze=je(l,K)!=De}finally{l.state.suppressEdits=!1}return Ze})}function ad(l,C,K){var W=l.getOption("configureMouse"),q=W?W(l,C,K):{};if(q.unit==null){var xe=R?K.shiftKey&&K.metaKey:K.altKey;q.unit=xe?"rectangle":C=="single"?"char":C=="double"?"word":"line"}return(q.extend==null||l.doc.extend)&&(q.extend=l.doc.extend||K.shiftKey),q.addNew==null&&(q.addNew=_?K.metaKey:K.ctrlKey),q.moveOnDrag==null&&(q.moveOnDrag=!(_?K.altKey:K.ctrlKey)),q}function mg(l,C,K,W){I?setTimeout(me(Lo,l),0):l.curOp.focus=ae();var q=ad(l,K,W),xe=l.doc.sel,je;l.options.dragDrop&&gr&&!l.isReadOnly()&&K=="single"&&(je=xe.contains(C))>-1&&(or((je=xe.ranges[je]).from(),C)<0||C.xRel>0)&&(or(je.to(),C)>0||C.xRel<0)?up(l,W,C,q):dv(l,W,C,q)}function up(l,C,K,W){var q=l.display,xe=!1,je=_r(l,function(ot){d&&(q.scroller.draggable=!1),l.state.draggingText=!1,jt(q.wrapper.ownerDocument,"mouseup",je),jt(q.wrapper.ownerDocument,"mousemove",Ze),jt(q.scroller,"dragstart",$e),jt(q.scroller,"drop",je),xe||(On(ot),W.addNew||uu(l.doc,K,null,null,W.extend),d&&!v||I&&u==9?setTimeout(function(){q.wrapper.ownerDocument.body.focus({preventScroll:!0}),q.input.focus()},20):q.input.focus())}),Ze=function(ot){xe=xe||Math.abs(C.clientX-ot.clientX)+Math.abs(C.clientY-ot.clientY)>=10},$e=function(){return xe=!0};d&&(q.scroller.draggable=!0),l.state.draggingText=je,je.copy=!W.moveOnDrag,q.scroller.dragDrop&&q.scroller.dragDrop(),ht(q.wrapper.ownerDocument,"mouseup",je),ht(q.wrapper.ownerDocument,"mousemove",Ze),ht(q.scroller,"dragstart",$e),ht(q.scroller,"drop",je),Go(l),setTimeout(function(){return q.input.focus()},20)}function cp(l,C,K){if(K=="char")return new wn(C,C);if(K=="word")return l.findWordAt(C);if(K=="line")return new wn(bn(C.line,0),Fr(l.doc,bn(C.line+1,0)));var W=K(l,C);return new wn(W.from,W.to)}function dv(l,C,K,W){var q=l.display,xe=l.doc;On(C);var je,Ze,$e=xe.sel,ot=$e.ranges;if(W.addNew&&!W.extend?(Ze=xe.sel.contains(K),Ze>-1?je=ot[Ze]:je=new wn(K,K)):(je=xe.sel.primary(),Ze=xe.sel.primIndex),W.unit=="rectangle")W.addNew||(je=new wn(K,K)),K=Ys(l,C,!0,!0),Ze=-1;else{var Ot=cp(l,K,W.unit);W.extend?je=Cu(je,Ot.anchor,Ot.head,W.extend):je=Ot}W.addNew?Ze==-1?(Ze=ot.length,Ko(xe,fn(l,ot.concat([je]),Ze),{scroll:!1,origin:"*mouse"})):ot.length>1&&ot[Ze].empty()&&W.unit=="char"&&!W.extend?(Ko(xe,fn(l,ot.slice(0,Ze).concat(ot.slice(Ze+1)),0),{scroll:!1,origin:"*mouse"}),$e=xe.sel):$l(xe,Ze,je,He):(Ze=0,Ko(xe,new pn([je],0),He),$e=xe.sel);var gt=K;function Xt(Er){if(or(gt,Er)!=0)if(gt=Er,W.unit=="rectangle"){for(var Kr=[],Ti=l.options.tabSize,br=ee(Jn(xe,K.line).text,K.ch,Ti),to=ee(Jn(xe,Er.line).text,Er.ch,Ti),Ts=Math.min(br,to),ga=Math.max(br,to),Ps=Math.min(K.line,Er.line),xl=Math.min(l.lastLine(),Math.max(K.line,Er.line));Ps<=xl;Ps++){var Xa=Jn(xe,Ps).text,aa=Je(Xa,Ts,Ti);Ts==ga?Kr.push(new wn(bn(Ps,aa),bn(Ps,aa))):Xa.length>aa&&Kr.push(new wn(bn(Ps,aa),bn(Ps,Je(Xa,ga,Ti))))}Kr.length||Kr.push(new wn(K,K)),Ko(xe,fn(l,$e.ranges.slice(0,Ze).concat(Kr),Ze),{origin:"*mouse",scroll:!1}),l.scrollIntoView(Er)}else{var Dl=je,Fa=cp(l,Er,W.unit),la=Dl.anchor,Ho;or(Fa.anchor,la)>0?(Ho=Fa.head,la=yr(Dl.from(),Fa.anchor)):(Ho=Fa.anchor,la=ki(Dl.to(),Fa.head));var Us=$e.ranges.slice(0);Us[Ze]=vg(l,new wn(Fr(xe,la),Ho)),Ko(xe,fn(l,Us,Ze),He)}}var Wt=q.wrapper.getBoundingClientRect(),Dn=0;function Bn(Er){var Kr=++Dn,Ti=Ys(l,Er,!0,W.unit=="rectangle");if(Ti)if(or(Ti,gt)!=0){l.curOp.focus=ae(),Xt(Ti);var br=Wi(q,xe);(Ti.line>=br.to||Ti.lineWt.bottom?20:0;to&&setTimeout(_r(l,function(){Dn==Kr&&(q.scroller.scrollTop+=to,Bn(Er))}),50)}}function Kn(Er){l.state.selectingText=!1,Dn=1/0,Er&&(On(Er),q.input.focus()),jt(q.wrapper.ownerDocument,"mousemove",cr),jt(q.wrapper.ownerDocument,"mouseup",Hr),xe.history.lastSelOrigin=null}var cr=_r(l,function(Er){Er.buttons===0||!xt(Er)?Kn(Er):Bn(Er)}),Hr=_r(l,Kn);l.state.selectingText=Hr,ht(q.wrapper.ownerDocument,"mousemove",cr),ht(q.wrapper.ownerDocument,"mouseup",Hr)}function vg(l,C){var K=C.anchor,W=C.head,q=Jn(l.doc,K.line);if(or(K,W)==0&&K.sticky==W.sticky)return C;var xe=_t(q);if(!xe)return C;var je=ct(xe,K.ch,K.sticky),Ze=xe[je];if(Ze.from!=K.ch&&Ze.to!=K.ch)return C;var $e=je+(Ze.from==K.ch==(Ze.level!=1)?0:1);if($e==0||$e==xe.length)return C;var ot;if(W.line!=K.line)ot=(W.line-K.line)*(l.doc.direction=="ltr"?1:-1)>0;else{var Ot=ct(xe,W.ch,W.sticky),gt=Ot-je||(W.ch-K.ch)*(Ze.level==1?-1:1);Ot==$e-1||Ot==$e?ot=gt<0:ot=gt>0}var Xt=xe[$e+(ot?-1:0)],Wt=ot==(Xt.level==1),Dn=Wt?Xt.from:Xt.to,Bn=Wt?"after":"before";return K.ch==Dn&&K.sticky==Bn?C:new wn(new bn(K.line,Dn,Bn),W)}function ld(l,C,K,W){var q,xe;if(C.touches)q=C.touches[0].clientX,xe=C.touches[0].clientY;else try{q=C.clientX,xe=C.clientY}catch(Xt){return!1}if(q>=Math.floor(l.display.gutters.getBoundingClientRect().right))return!1;W&&On(C);var je=l.display,Ze=je.lineDiv.getBoundingClientRect();if(xe>Ze.bottom||!mn(l,K))return Fn(C);xe-=Ze.top-je.viewOffset;for(var $e=0;$e=q){var Ot=Yn(l.doc,xe),gt=l.display.gutterSpecs[$e];return st(l,K,l,Ot,gt.className,C),Fn(C)}}}function ud(l,C){return ld(l,C,"gutterClick",!0)}function cd(l,C){Qo(l.display,C)||yg(l,C)||ge(l,C,"contextmenu")||M||l.display.input.onContextMenu(C)}function yg(l,C){return mn(l,"gutterContextMenu")?ld(l,C,"gutterContextMenu",!1):!1}function hd(l){l.display.wrapper.className=l.display.wrapper.className.replace(/\s*cm-s-\S+/g,"")+l.options.theme.replace(/(^|\s)\s*/g," cm-s-"),kl(l)}var Vc={toString:function(){return"CodeMirror.Init"}},hp={},Nf={};function bg(l){var C=l.optionHandlers;function K(W,q,xe,je){l.defaults[W]=q,xe&&(C[W]=je?function(Ze,$e,ot){ot!=Vc&&xe(Ze,$e,ot)}:xe)}l.defineOption=K,l.Init=Vc,K("value","",function(W,q){return W.setValue(q)},!0),K("mode",null,function(W,q){W.doc.modeOption=q,$n(W)},!0),K("indentUnit",2,$n,!0),K("indentWithTabs",!1),K("smartIndent",!0),K("tabSize",4,function(W){Mi(W),kl(W),Io(W)},!0),K("lineSeparator",null,function(W,q){if(W.doc.lineSep=q,!!q){var xe=[],je=W.doc.first;W.doc.iter(function($e){for(var ot=0;;){var Ot=$e.text.indexOf(q,ot);if(Ot==-1)break;ot=Ot+q.length,xe.push(bn(je,Ot))}je++});for(var Ze=xe.length-1;Ze>=0;Ze--)oa(W.doc,q,xe[Ze],bn(xe[Ze].line,xe[Ze].ch+q.length))}}),K("specialChars",/[\u0000-\u001f\u007f-\u009f\u00ad\u061c\u200b-\u200c\u200e\u200f\u2028\u2029\ufeff\ufff9-\ufffc]/g,function(W,q,xe){W.state.specialChars=new RegExp(q.source+(q.test(" ")?"":"| "),"g"),xe!=Vc&&W.refresh()}),K("specialCharPlaceholder",no,function(W){return W.refresh()},!0),K("electricChars",!0),K("inputStyle",T?"contenteditable":"textarea",function(){throw new Error("inputStyle can not (yet) be changed in a running editor")},!0),K("spellcheck",!1,function(W,q){return W.getInputField().spellcheck=q},!0),K("autocorrect",!1,function(W,q){return W.getInputField().autocorrect=q},!0),K("autocapitalize",!1,function(W,q){return W.getInputField().autocapitalize=q},!0),K("rtlMoveVisually",!A),K("wholeLineUpdateBefore",!0),K("theme","default",function(W){hd(W),zt(W)},!0),K("keyMap","default",function(W,q,xe){var je=Zl(q),Ze=xe!=Vc&&Zl(xe);Ze&&Ze.detach&&Ze.detach(W,je),je.attach&&je.attach(W,Ze||null)}),K("extraKeys",null),K("configureMouse",null),K("lineWrapping",!1,Sg,!0),K("gutters",[],function(W,q){W.display.gutterSpecs=Zt(q,W.options.lineNumbers),zt(W)},!0),K("fixedGutter",!0,function(W,q){W.display.gutters.style.left=q?pl(W.display)+"px":"0",W.refresh()},!0),K("coverGutterNextToScrollbar",!1,function(W){return Qt(W)},!0),K("scrollbarStyle","native",function(W){Ln(W),Qt(W),W.display.scrollbars.setScrollTop(W.doc.scrollTop),W.display.scrollbars.setScrollLeft(W.doc.scrollLeft)},!0),K("lineNumbers",!1,function(W,q){W.display.gutterSpecs=Zt(W.options.gutters,q),zt(W)},!0),K("firstLineNumber",1,zt,!0),K("lineNumberFormatter",function(W){return W},zt,!0),K("showCursorWhenSelecting",!1,Ds,!0),K("resetSelectionOnContextMenu",!0),K("lineWiseCopyCut",!0),K("pasteLinesPerSelection",!0),K("selectionsMayTouch",!1),K("readOnly",!1,function(W,q){q=="nocursor"&&(au(W),W.display.input.blur()),W.display.input.readOnlyChanged(q)}),K("screenReaderLabel",null,function(W,q){q=q===""?null:q,W.display.input.screenReaderLabelChanged(q)}),K("disableInput",!1,function(W,q){q||W.display.input.reset()},!0),K("dragDrop",!0,fd),K("allowDropFileTypes",null),K("cursorBlinkRate",530),K("cursorScrollMargin",0),K("cursorHeight",1,Ds,!0),K("singleCursorHeightPerLine",!0,Ds,!0),K("workTime",100),K("workDelay",100),K("flattenSpans",!0,Mi,!0),K("addModeClass",!1,Mi,!0),K("pollInterval",100),K("undoDepth",200,function(W,q){return W.doc.history.undoDepth=q}),K("historyEventDelay",1250),K("viewportMargin",10,function(W){return W.refresh()},!0),K("maxHighlightLength",1e4,Mi,!0),K("moveInputWithCursor",!0,function(W,q){q||W.display.input.resetPosition()}),K("tabindex",null,function(W,q){return W.display.input.getField().tabIndex=q||""}),K("autofocus",null),K("direction","ltr",function(W,q){return W.doc.setDirection(q)},!0),K("phrases",null)}function fd(l,C,K){var W=K&&K!=Vc;if(!C!=!W){var q=l.display.dragFunctions,xe=C?ht:jt;xe(l.display.scroller,"dragstart",q.start),xe(l.display.scroller,"dragenter",q.enter),xe(l.display.scroller,"dragover",q.over),xe(l.display.scroller,"dragleave",q.leave),xe(l.display.scroller,"drop",q.drop)}}function Sg(l){l.options.lineWrapping?(he(l.display.wrapper,"CodeMirror-wrap"),l.display.sizer.style.minWidth="",l.display.sizerWidth=null):(H(l.display.wrapper,"CodeMirror-wrap"),Pi(l)),zr(l),Io(l),kl(l),setTimeout(function(){return Qt(l)},100)}function Po(l,C){var K=this;if(!(this instanceof Po))return new Po(l,C);this.options=C=C?Le(C):{},Le(hp,C,!1);var W=C.value;typeof W=="string"?W=new da(W,C.mode,null,C.lineSeparator,C.direction):C.mode&&(W.modeOption=C.mode),this.doc=W;var q=new Po.inputStyles[C.inputStyle](this),xe=this.display=new k(l,W,q,C);xe.wrapper.CodeMirror=this,hd(this),C.lineWrapping&&(this.display.wrapper.className+=" CodeMirror-wrap"),Ln(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 se,keySeq:null,specialChars:null},C.autofocus&&!T&&xe.input.focus(),I&&u<11&&setTimeout(function(){return K.display.input.reset(!0)},20),tf(this),ol(),An(this),this.curOp.forceUpdate=!0,Mo(this,W),C.autofocus&&!T||this.hasFocus()?setTimeout(function(){K.hasFocus()&&!K.state.focused&&ro(K)},20):au(this);for(var je in Nf)Nf.hasOwnProperty(je)&&Nf[je](this,C[je],Vc);Rt(this),C.finishInit&&C.finishInit(this);for(var Ze=0;Ze20*20}ht(C.scroller,"touchstart",function($e){if(!ge(l,$e)&&!xe($e)&&!ud(l,$e)){C.input.ensurePolled(),clearTimeout(K);var ot=+new Date;C.activeTouch={start:ot,moved:!1,prev:ot-W.end<=300?W:null},$e.touches.length==1&&(C.activeTouch.left=$e.touches[0].pageX,C.activeTouch.top=$e.touches[0].pageY)}}),ht(C.scroller,"touchmove",function(){C.activeTouch&&(C.activeTouch.moved=!0)}),ht(C.scroller,"touchend",function($e){var ot=C.activeTouch;if(ot&&!Qo(C,$e)&&ot.left!=null&&!ot.moved&&new Date-ot.start<300){var Ot=l.coordsChar(C.activeTouch,"page"),gt;!ot.prev||je(ot,ot.prev)?gt=new wn(Ot,Ot):!ot.prev.prev||je(ot,ot.prev.prev)?gt=l.findWordAt(Ot):gt=new wn(bn(Ot.line,0),Fr(l.doc,bn(Ot.line+1,0))),l.setSelection(gt.anchor,gt.head),l.focus(),On($e)}q()}),ht(C.scroller,"touchcancel",q),ht(C.scroller,"scroll",function(){C.scroller.clientHeight&&(at(l,C.scroller.scrollTop),mt(l,C.scroller.scrollLeft,!0),st(l,"scroll",l))}),ht(C.scroller,"mousewheel",function($e){return Ut(l,$e)}),ht(C.scroller,"DOMMouseScroll",function($e){return Ut(l,$e)}),ht(C.wrapper,"scroll",function(){return C.wrapper.scrollTop=C.wrapper.scrollLeft=0}),C.dragFunctions={enter:function($e){ge(l,$e)||Gn($e)},over:function($e){ge(l,$e)||($h(l,$e),Gn($e))},start:function($e){return mh(l,$e)},drop:_r(l,Yh),leave:function($e){ge(l,$e)||Xh(l)}};var Ze=C.input.getField();ht(Ze,"keyup",function($e){return op.call(l,$e)}),ht(Ze,"keydown",_r(l,rp)),ht(Ze,"keypress",_r(l,Ku)),ht(Ze,"focus",function($e){return ro(l,$e)}),ht(Ze,"blur",function($e){return au(l,$e)})}var xh=[];Po.defineInitHook=function(l){return xh.push(l)};function pa(l,C,K,W){var q=l.doc,xe;K==null&&(K="add"),K=="smart"&&(q.mode.indent?xe=Ro(l,C).state:K="prev");var je=l.options.tabSize,Ze=Jn(q,C),$e=ee(Ze.text,null,je);Ze.stateAfter&&(Ze.stateAfter=null);var ot=Ze.text.match(/^\s*/)[0],Ot;if(!W&&!/\S/.test(Ze.text))Ot=0,K="not";else if(K=="smart"&&(Ot=q.mode.indent(xe,Ze.text.slice(ot.length),Ze.text),Ot==De||Ot>150)){if(!W)return;K="prev"}K=="prev"?C>q.first?Ot=ee(Jn(q,C-1).text,null,je):Ot=0:K=="add"?Ot=$e+l.options.indentUnit:K=="subtract"?Ot=$e-l.options.indentUnit:typeof K=="number"&&(Ot=$e+K),Ot=Math.max(0,Ot);var gt="",Xt=0;if(l.options.indentWithTabs)for(var Wt=Math.floor(Ot/je);Wt;--Wt)Xt+=je,gt+=" ";if(Xtje,$e=Kt(C),ot=null;if(Ze&&W.ranges.length>1)if(Sl&&Sl.text.join(` `)==C){if(W.ranges.length%Sl.text.length==0){ot=[];for(var Ot=0;Ot=0;Xt--){var Wt=W.ranges[Xt],Dn=Wt.from(),Bn=Wt.to();Wt.empty()&&(K&&K>0?Dn=bn(Dn.line,Dn.ch-K):l.state.overwrite&&!Ze?Bn=bn(Bn.line,Math.min(Jn(xe,Bn.line).text.length,Bn.ch+Re($e).length)):Ze&&Sl&&Sl.lineWise&&Sl.text.join(` `)==$e.join(` `)&&(Dn=Bn=bn(Dn.line,0)));var Kn={from:Dn,to:Bn,text:ot?ot[Xt%ot.length]:$e,origin:q||(Ze?"paste":l.state.cutIncoming>je?"cut":"+input")};fa(l.doc,Kn),Wn(l,"inputRead",l,Kn)}C&&!Ze&&dp(l,C),ml(l),l.curOp.updateInput<2&&(l.curOp.updateInput=gt),l.curOp.typing=!0,l.state.pasteIncoming=l.state.cutIncoming=-1}function fp(l,C){var K=l.clipboardData&&l.clipboardData.getData("Text");if(K)return l.preventDefault(),!C.isReadOnly()&&!C.options.disableInput&&Qn(C,function(){return Rf(C,K,0,null,"paste")}),!0}function dp(l,C){if(!(!l.options.electricChars||!l.options.smartIndent))for(var K=l.doc.sel,W=K.ranges.length-1;W>=0;W--){var q=K.ranges[W];if(!(q.head.ch>100||W&&K.ranges[W-1].head.line==q.head.line)){var xe=l.getModeAt(q.head),je=!1;if(xe.electricChars){for(var Ze=0;Ze-1){je=pa(l,q.head.line,"smart");break}}else xe.electricInput&&xe.electricInput.test(Jn(l.doc,q.head.line).text.slice(0,q.head.ch))&&(je=pa(l,q.head.line,"smart"));je&&Wn(l,"electricInput",l,q.head.line)}}}function pp(l){for(var C=[],K=[],W=0;Wxe&&(pa(this,Ze.head.line,W,!0),xe=Ze.head.line,je==this.doc.sel.primIndex&&ml(this));else{var $e=Ze.from(),ot=Ze.to(),Ot=Math.max(xe,$e.line);xe=Math.min(this.lastLine(),ot.line-(ot.ch?0:1))+1;for(var gt=Ot;gt0&&$l(this.doc,je,new wn($e,Xt[je].to()),Be)}}}),getTokenAt:function(W,q){return Bs(this,W,q)},getLineTokens:function(W,q){return Bs(this,bn(W),q,!0)},getTokenTypeAt:function(W){W=Fr(this.doc,W);var q=Wo(this,Jn(this.doc,W.line)),xe=0,je=(q.length-1)/2,Ze=W.ch,$e;if(Ze==0)$e=q[2];else for(;;){var ot=xe+je>>1;if((ot?q[ot*2-1]:0)>=Ze)je=ot;else if(q[ot*2+1]$e&&(W=$e,je=!0),Ze=Jn(this.doc,W)}else Ze=W;return js(this,Ze,{top:0,left:0},q||"page",xe||je).top+(je?this.doc.height-fr(Ze):0)},defaultTextHeight:function(){return Ga(this.display)},defaultCharWidth:function(){return Vl(this.display)},getViewport:function(){return{from:this.display.viewFrom,to:this.display.viewTo}},addWidget:function(W,q,xe,je,Ze){var $e=this.display;W=os(this,Fr(this.doc,W));var ot=W.bottom,Ot=W.left;if(q.style.position="absolute",q.setAttribute("cm-ignore-events","true"),this.display.input.setUneditable(q),$e.sizer.appendChild(q),je=="over")ot=W.top;else if(je=="above"||je=="near"){var gt=Math.max($e.wrapper.clientHeight,this.doc.height),Xt=Math.max($e.sizer.clientWidth,$e.lineSpace.clientWidth);(je=="above"||W.bottom+q.offsetHeight>gt)&&W.top>q.offsetHeight?ot=W.top-q.offsetHeight:W.bottom+q.offsetHeight<=gt&&(ot=W.bottom),Ot+q.offsetWidth>Xt&&(Ot=Xt-q.offsetWidth)}q.style.top=ot+"px",q.style.left=q.style.right="",Ze=="right"?(Ot=$e.sizer.clientWidth-q.offsetWidth,q.style.right="0px"):(Ze=="left"?Ot=0:Ze=="middle"&&(Ot=($e.sizer.clientWidth-q.offsetWidth)/2),q.style.left=Ot+"px"),xe&&Hu(this,{left:Ot,top:ot,right:Ot+q.offsetWidth,bottom:ot+q.offsetHeight})},triggerOnKeyDown:Xr(rp),triggerOnKeyPress:Xr(Ku),triggerOnKeyUp:op,triggerOnMouseDown:Xr(Yu),execCommand:function(W){if(Wc.hasOwnProperty(W))return Wc[W].call(null,this)},triggerElectric:Xr(function(W){dp(this,W)}),findPosH:function(W,q,xe,je){var Ze=1;q<0&&(Ze=-1,q=-q);for(var $e=Fr(this.doc,W),ot=0;ot0&&Ot(xe.charAt(je-1));)--je;for(;Ze.5||this.options.lineWrapping)&&zr(this),st(this,"refresh",this)}),swapDoc:Xr(function(W){var q=this.doc;return q.cm=null,this.state.selectingText&&this.state.selectingText(),Mo(this,W),kl(this),this.display.input.reset(),Kl(this,W.scrollLeft,W.scrollTop),this.curOp.forceScroll=!0,Wn(this,"swapDoc",this,q),q}),phrase:function(W){var q=this.options.phrases;return q&&Object.prototype.hasOwnProperty.call(q,W)?q[W]:W},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}},Mt(l),l.registerHelper=function(W,q,xe){K.hasOwnProperty(W)||(K[W]=l[W]={_global:[]}),K[W][q]=xe},l.registerGlobalHelper=function(W,q,xe,je){l.registerHelper(W,q,je),K[W]._global.push({pred:xe,val:je})}}function If(l,C,K,W,q){var xe=C,je=K,Ze=Jn(l,C.line),$e=q&&l.direction=="rtl"?-K:K;function ot(){var Hr=C.line+$e;return Hr=l.first+l.size?!1:(C=new bn(Hr,C.ch,C.sticky),Ze=Jn(l,Hr))}function Ot(Hr){var Er;if(W=="codepoint"){var Kr=Ze.text.charCodeAt(C.ch+(W>0?0:-1));isNaN(Kr)?Er=null:Er=new bn(C.line,Math.max(0,Math.min(Ze.text.length,C.ch+K*(Kr>=55296&&Kr<56320?2:1))),-K)}else q?Er=rd(l.cm,Ze,C,K):Er=Cs(Ze,C,K);if(Er==null)if(!Hr&&ot())C=_c(q,l.cm,Ze,C.line,$e);else return!1;else C=Er;return!0}if(W=="char"||W=="codepoint")Ot();else if(W=="column")Ot(!0);else if(W=="word"||W=="group")for(var gt=null,Xt=W=="group",Wt=l.cm&&l.cm.getHelper(C,"wordChars"),Dn=!0;!(K<0&&!Ot(!Dn));Dn=!1){var Bn=Ze.text.charAt(C.ch)||` `,Kn=_e(Bn,Wt)?"w":Xt&&Bn==` `?"n":!Xt||/\s/.test(Bn)?null:"p";if(Xt&&!Dn&&!Kn&&(Kn="s"),gt&>!=Kn){K<0&&(K=1,Ot(),C.sticky="after");break}if(Kn&&(gt=Kn),K>0&&!Ot(!Dn))break}var cr=Ui(l,C,xe,je,!0);return Ei(xe,cr)&&(cr.hitSide=!0),cr}function Yc(l,C,K,W){var q=l.doc,xe=C.left,je;if(W=="page"){var Ze=Math.min(l.display.wrapper.clientHeight,window.innerHeight||document.documentElement.clientHeight),$e=Math.max(Ze-.5*Ga(l.display),3);je=(K>0?C.bottom:C.top)+K*$e}else W=="line"&&(je=K>0?C.bottom+3:C.top-3);for(var ot;ot=Wl(l,xe,je),!!ot.outside;){if(K<0?je<=0:je>=q.height){ot.hitSide=!0;break}je+=K*5}return ot}var ps=function(l){this.cm=l,this.lastAnchorNode=this.lastAnchorOffset=this.lastFocusNode=this.lastFocusOffset=null,this.polling=new se,this.composing=null,this.gracePeriod=!1,this.readDOMTimeout=null};ps.prototype.init=function(l){var C=this,K=this,W=K.cm,q=K.div=l.lineDiv;gp(q,W.options.spellcheck,W.options.autocorrect,W.options.autocapitalize);function xe(Ze){for(var $e=Ze.target;$e;$e=$e.parentNode){if($e==q)return!0;if(/\bCodeMirror-(?:line)?widget\b/.test($e.className))break}return!1}ht(q,"paste",function(Ze){!xe(Ze)||ge(W,Ze)||fp(Ze,W)||u<=11&&setTimeout(_r(W,function(){return C.updateFromDOM()}),20)}),ht(q,"compositionstart",function(Ze){C.composing={data:Ze.data,done:!1}}),ht(q,"compositionupdate",function(Ze){C.composing||(C.composing={data:Ze.data,done:!1})}),ht(q,"compositionend",function(Ze){C.composing&&(Ze.data!=C.composing.data&&C.readFromDOMSoon(),C.composing.done=!0)}),ht(q,"touchstart",function(){return K.forceCompositionEnd()}),ht(q,"input",function(){C.composing||C.readFromDOMSoon()});function je(Ze){if(!(!xe(Ze)||ge(W,Ze))){if(W.somethingSelected())Eh({lineWise:!1,text:W.getSelections()}),Ze.type=="cut"&&W.replaceSelection("",null,"cut");else if(W.options.lineWiseCopyCut){var $e=pp(W);Eh({lineWise:!0,text:$e.text}),Ze.type=="cut"&&W.operation(function(){W.setSelections($e.ranges,0,Be),W.replaceSelection("",null,"cut")})}else return;if(Ze.clipboardData){Ze.clipboardData.clearData();var ot=Sl.text.join(` `);if(Ze.clipboardData.setData("Text",ot),Ze.clipboardData.getData("Text")==ot){Ze.preventDefault();return}}var Ot=mp(),gt=Ot.firstChild;W.display.lineSpace.insertBefore(Ot,W.display.lineSpace.firstChild),gt.value=Sl.text.join(` `);var Xt=document.activeElement;we(gt),setTimeout(function(){W.display.lineSpace.removeChild(Ot),Xt.focus(),Xt==q&&K.showPrimarySelection()},50)}}ht(q,"copy",je),ht(q,"cut",je)},ps.prototype.screenReaderLabelChanged=function(l){l?this.div.setAttribute("aria-label",l):this.div.removeAttribute("aria-label")},ps.prototype.prepareSelection=function(){var l=gl(this.cm,!1);return l.focus=document.activeElement==this.div,l},ps.prototype.showSelection=function(l,C){!l||!this.cm.display.view.length||((l.focus||C)&&this.showPrimarySelection(),this.showMultipleSelections(l))},ps.prototype.getSelection=function(){return this.cm.display.wrapper.ownerDocument.getSelection()},ps.prototype.showPrimarySelection=function(){var l=this.getSelection(),C=this.cm,K=C.doc.sel.primary(),W=K.from(),q=K.to();if(C.display.viewTo==C.display.viewFrom||W.line>=C.display.viewTo||q.line=C.display.viewFrom&&dd(C,W)||{node:Ze[0].measure.map[2],offset:0},ot=q.linel.firstLine()&&(W=bn(W.line-1,Jn(l.doc,W.line-1).length)),q.ch==Jn(l.doc,q.line).text.length&&q.lineC.viewTo-1)return!1;var xe,je,Ze;W.line==C.viewFrom||(xe=Sa(l,W.line))==0?(je=Lt(C.view[0].line),Ze=C.view[0].node):(je=Lt(C.view[xe].line),Ze=C.view[xe-1].node.nextSibling);var $e=Sa(l,q.line),ot,Ot;if($e==C.view.length-1?(ot=C.viewTo-1,Ot=C.lineDiv.lastChild):(ot=Lt(C.view[$e+1].line)-1,Ot=C.view[$e+1].node.previousSibling),!Ze)return!1;for(var gt=l.doc.splitLines(rf(l,Ze,Ot,je,ot)),Xt=bi(l.doc,bn(je,0),bn(ot,Jn(l.doc,ot).text.length));gt.length>1&&Xt.length>1;)if(Re(gt)==Re(Xt))gt.pop(),Xt.pop(),ot--;else if(gt[0]==Xt[0])gt.shift(),Xt.shift(),je++;else break;for(var Wt=0,Dn=0,Bn=gt[0],Kn=Xt[0],cr=Math.min(Bn.length,Kn.length);WtW.ch&&Hr.charCodeAt(Hr.length-Dn-1)==Er.charCodeAt(Er.length-Dn-1);)Wt--,Dn++;gt[gt.length-1]=Hr.slice(0,Hr.length-Dn).replace(/^\u200b+/,""),gt[0]=gt[0].slice(Wt).replace(/\u200b+$/,"");var Ti=bn(je,Wt),br=bn(ot,Xt.length?Re(Xt).length-Dn:0);if(gt.length>1||gt[0]||or(Ti,br))return oa(l.doc,gt,Ti,br,"+input"),!0},ps.prototype.ensurePolled=function(){this.forceCompositionEnd()},ps.prototype.reset=function(){this.forceCompositionEnd()},ps.prototype.forceCompositionEnd=function(){this.composing&&(clearTimeout(this.readDOMTimeout),this.composing=null,this.updateFromDOM(),this.div.blur(),this.div.focus())},ps.prototype.readFromDOMSoon=function(){var l=this;this.readDOMTimeout==null&&(this.readDOMTimeout=setTimeout(function(){if(l.readDOMTimeout=null,l.composing)if(l.composing.done)l.composing=null;else return;l.updateFromDOM()},80))},ps.prototype.updateFromDOM=function(){var l=this;(this.cm.isReadOnly()||!this.pollContent())&&Qn(this.cm,function(){return Io(l.cm)})},ps.prototype.setUneditable=function(l){l.contentEditable="false"},ps.prototype.onKeyPress=function(l){l.charCode==0||this.composing||(l.preventDefault(),this.cm.isReadOnly()||_r(this.cm,Rf)(this.cm,String.fromCharCode(l.charCode==null?l.keyCode:l.charCode),0))},ps.prototype.readOnlyChanged=function(l){this.div.contentEditable=String(l!="nocursor")},ps.prototype.onContextMenu=function(){},ps.prototype.resetPosition=function(){},ps.prototype.needsContentAttribute=!0;function dd(l,C){var K=Ns(l,C.line);if(!K||K.hidden)return null;var W=Jn(l.doc,C.line),q=su(K,W,C.line),xe=_t(W,l.doc.direction),je="left";if(xe){var Ze=ct(xe,C.ch);je=Ze%2?"right":"left"}var $e=Fu(q.map,C.ch,je);return $e.offset=$e.collapse=="right"?$e.end:$e.start,$e}function vp(l){for(var C=l;C;C=C.parentNode)if(/CodeMirror-gutter-wrapper/.test(C.className))return!0;return!1}function nf(l,C){return C&&(l.bad=!0),l}function rf(l,C,K,W,q){var xe="",je=!1,Ze=l.doc.lineSeparator(),$e=!1;function ot(Wt){return function(Dn){return Dn.id==Wt}}function Ot(){je&&(xe+=Ze,$e&&(xe+=Ze),je=$e=!1)}function gt(Wt){Wt&&(Ot(),xe+=Wt)}function Xt(Wt){if(Wt.nodeType==1){var Dn=Wt.getAttribute("cm-text");if(Dn){gt(Dn);return}var Bn=Wt.getAttribute("cm-marker"),Kn;if(Bn){var cr=l.findMarks(bn(W,0),bn(q+1,0),ot(+Bn));cr.length&&(Kn=cr[0].find(0))&>(bi(l.doc,Kn.from,Kn.to).join(Ze));return}if(Wt.getAttribute("contenteditable")=="false")return;var Hr=/^(pre|div|p|li|table|br)$/i.test(Wt.nodeName);if(!/^br$/i.test(Wt.nodeName)&&Wt.textContent.length==0)return;Hr&&Ot();for(var Er=0;Er=9&&C.hasSelection&&(C.hasSelection=null),K.poll()}),ht(q,"paste",function(je){ge(W,je)||fp(je,W)||(W.state.pasteIncoming=+new Date,K.fastPoll())});function xe(je){if(!ge(W,je)){if(W.somethingSelected())Eh({lineWise:!1,text:W.getSelections()});else if(W.options.lineWiseCopyCut){var Ze=pp(W);Eh({lineWise:!0,text:Ze.text}),je.type=="cut"?W.setSelections(Ze.ranges,null,Be):(K.prevInput="",q.value=Ze.text.join(` `),we(q))}else return;je.type=="cut"&&(W.state.cutIncoming=+new Date)}}ht(q,"cut",xe),ht(q,"copy",xe),ht(l.scroller,"paste",function(je){if(!(Qo(l,je)||ge(W,je))){if(!q.dispatchEvent){W.state.pasteIncoming=+new Date,K.focus();return}var Ze=new Event("paste");Ze.clipboardData=je.clipboardData,q.dispatchEvent(Ze)}}),ht(l.lineSpace,"selectstart",function(je){Qo(l,je)||On(je)}),ht(q,"compositionstart",function(){var je=W.getCursor("from");K.composing&&K.composing.range.clear(),K.composing={start:je,range:W.markText(je,W.getCursor("to"),{className:"CodeMirror-composing"})}}),ht(q,"compositionend",function(){K.composing&&(K.poll(),K.composing.range.clear(),K.composing=null)})},sa.prototype.createField=function(l){this.wrapper=mp(),this.textarea=this.wrapper.firstChild},sa.prototype.screenReaderLabelChanged=function(l){l?this.textarea.setAttribute("aria-label",l):this.textarea.removeAttribute("aria-label")},sa.prototype.prepareSelection=function(){var l=this.cm,C=l.display,K=l.doc,W=gl(l);if(l.options.moveInputWithCursor){var q=os(l,K.sel.primary().head,"div"),xe=C.wrapper.getBoundingClientRect(),je=C.lineDiv.getBoundingClientRect();W.teTop=Math.max(0,Math.min(C.wrapper.clientHeight-10,q.top+je.top-xe.top)),W.teLeft=Math.max(0,Math.min(C.wrapper.clientWidth-10,q.left+je.left-xe.left))}return W},sa.prototype.showSelection=function(l){var C=this.cm,K=C.display;V(K.cursorDiv,l.cursors),V(K.selectionDiv,l.selection),l.teTop!=null&&(this.wrapper.style.top=l.teTop+"px",this.wrapper.style.left=l.teLeft+"px")},sa.prototype.reset=function(l){if(!(this.contextMenuPending||this.composing)){var C=this.cm;if(C.somethingSelected()){this.prevInput="";var K=C.getSelection();this.textarea.value=K,C.state.focused&&we(this.textarea),I&&u>=9&&(this.hasSelection=K)}else l||(this.prevInput=this.textarea.value="",I&&u>=9&&(this.hasSelection=null))}},sa.prototype.getField=function(){return this.textarea},sa.prototype.supportsTouch=function(){return!1},sa.prototype.focus=function(){if(this.cm.options.readOnly!="nocursor"&&(!T||ae()!=this.textarea))try{this.textarea.focus()}catch(l){}},sa.prototype.blur=function(){this.textarea.blur()},sa.prototype.resetPosition=function(){this.wrapper.style.top=this.wrapper.style.left=0},sa.prototype.receivedFocus=function(){this.slowPoll()},sa.prototype.slowPoll=function(){var l=this;this.pollingFast||this.polling.set(this.cm.options.pollInterval,function(){l.poll(),l.cm.state.focused&&l.slowPoll()})},sa.prototype.fastPoll=function(){var l=!1,C=this;C.pollingFast=!0;function K(){var W=C.poll();!W&&!l?(l=!0,C.polling.set(60,K)):(C.pollingFast=!1,C.slowPoll())}C.polling.set(20,K)},sa.prototype.poll=function(){var l=this,C=this.cm,K=this.textarea,W=this.prevInput;if(this.contextMenuPending||!C.state.focused||ye(K)&&!W&&!this.composing||C.isReadOnly()||C.options.disableInput||C.state.keySeq)return!1;var q=K.value;if(q==W&&!C.somethingSelected())return!1;if(I&&u>=9&&this.hasSelection===q||_&&/[\uf700-\uf7ff]/.test(q))return C.display.input.reset(),!1;if(C.doc.sel==C.display.selForContextMenu){var xe=q.charCodeAt(0);if(xe==8203&&!W&&(W="\u200B"),xe==8666)return this.reset(),this.cm.execCommand("undo")}for(var je=0,Ze=Math.min(W.length,q.length);je1e3||q.indexOf(` `)>-1?K.value=l.prevInput="":l.prevInput=q,l.composing&&(l.composing.range.clear(),l.composing.range=C.markText(l.composing.start,C.getCursor("to"),{className:"CodeMirror-composing"}))}),!0},sa.prototype.ensurePolled=function(){this.pollingFast&&this.poll()&&(this.pollingFast=!1)},sa.prototype.onKeyPress=function(){I&&u>=9&&(this.hasSelection=null),this.fastPoll()},sa.prototype.onContextMenu=function(l){var C=this,K=C.cm,W=K.display,q=C.textarea;C.contextMenuPending&&C.contextMenuPending();var xe=Ys(K,l),je=W.scroller.scrollTop;if(!xe||S)return;var Ze=K.options.resetSelectionOnContextMenu;Ze&&K.doc.sel.contains(xe)==-1&&_r(K,Ko)(K.doc,Tr(xe),Be);var $e=q.style.cssText,ot=C.wrapper.style.cssText,Ot=C.wrapper.offsetParent.getBoundingClientRect();C.wrapper.style.cssText="position: static",q.style.cssText=`position: absolute; width: 30px; height: 30px; top: `+(l.clientY-Ot.top-5)+"px; left: "+(l.clientX-Ot.left-5)+`px; z-index: 1000; background: `+(I?"rgba(255, 255, 255, .05)":"transparent")+`; outline: none; border-width: 0; outline: none; overflow: hidden; opacity: .05; filter: alpha(opacity=5);`;var gt;d&&(gt=window.scrollY),W.input.focus(),d&&window.scrollTo(null,gt),W.input.reset(),K.somethingSelected()||(q.value=C.prevInput=" "),C.contextMenuPending=Wt,W.selForContextMenu=K.doc.sel,clearTimeout(W.detectingSelectAll);function Xt(){if(q.selectionStart!=null){var Bn=K.somethingSelected(),Kn="\u200B"+(Bn?q.value:"");q.value="\u21DA",q.value=Kn,C.prevInput=Bn?"":"\u200B",q.selectionStart=1,q.selectionEnd=Kn.length,W.selForContextMenu=K.doc.sel}}function Wt(){if(C.contextMenuPending==Wt&&(C.contextMenuPending=!1,C.wrapper.style.cssText=ot,q.style.cssText=$e,I&&u<9&&W.scrollbars.setScrollTop(W.scroller.scrollTop=je),q.selectionStart!=null)){(!I||I&&u<9)&&Xt();var Bn=0,Kn=function(){W.selForContextMenu==K.doc.sel&&q.selectionStart==0&&q.selectionEnd>0&&C.prevInput=="\u200B"?_r(K,Ii)(K):Bn++<10?W.detectingSelectAll=setTimeout(Kn,500):(W.selForContextMenu=null,W.input.reset())};W.detectingSelectAll=setTimeout(Kn,200)}}if(I&&u>=9&&Xt(),M){Gn(l);var Dn=function(){jt(window,"mouseup",Dn),setTimeout(Wt,20)};ht(window,"mouseup",Dn)}else setTimeout(Wt,50)},sa.prototype.readOnlyChanged=function(l){l||this.reset(),this.textarea.disabled=l=="nocursor",this.textarea.readOnly=!!l},sa.prototype.setUneditable=function(){},sa.prototype.needsContentAttribute=!1;function Eg(l,C){if(C=C?Le(C):{},C.value=l.value,!C.tabindex&&l.tabIndex&&(C.tabindex=l.tabIndex),!C.placeholder&&l.placeholder&&(C.placeholder=l.placeholder),C.autofocus==null){var K=ae();C.autofocus=K==l||l.getAttribute("autofocus")!=null&&K==document.body}function W(){l.value=Ze.getValue()}var q;if(l.form&&(ht(l.form,"submit",W),!C.leaveSubmitMethodAlone)){var xe=l.form;q=xe.submit;try{var je=xe.submit=function(){W(),xe.submit=q,xe.submit(),xe.submit=je}}catch($e){}}C.finishInit=function($e){$e.save=W,$e.getTextArea=function(){return l},$e.toTextArea=function(){$e.toTextArea=isNaN,W(),l.parentNode.removeChild($e.getWrapperElement()),l.style.display="",l.form&&(jt(l.form,"submit",W),!C.leaveSubmitMethodAlone&&typeof l.form.submit=="function"&&(l.form.submit=q))}},l.style.display="none";var Ze=Po(function($e){return l.parentNode.insertBefore($e,l.nextSibling)},C);return Ze}function of(l){l.off=jt,l.on=ht,l.wheelEventPixels=It,l.Doc=da,l.splitLines=Kt,l.countColumn=ee,l.findColumn=Je,l.isWordChar=be,l.Pass=De,l.signal=st,l.Line=Ai,l.changeEnd=Li,l.scrollbarModel=dn,l.Pos=bn,l.cmpPos=or,l.modes=Zn,l.mimeModes=ir,l.resolveMode=li,l.getMode=Zr,l.modeExtensions=Tn,l.extendMode=kn,l.copyState=Vr,l.startState=nr,l.innerMode=di,l.commands=Wc,l.keyMap=$a,l.keyName=Ea,l.isModifierKey=$s,l.lookupKey=Xi,l.normalizeKeyMap=vo,l.StringStream=vn,l.SharedTextMarker=Ya,l.TextMarker=Ct,l.LineWidget=Yo,l.e_preventDefault=On,l.e_stopPropagation=Vn,l.e_stop=Gn,l.addClass=he,l.contains=ue,l.rmClass=H,l.keyNames=fu}bg(Po),Kc(Po);var Ac="iter insert remove copy getEditor constructor".split(" ");for(var Lf in da.prototype)da.prototype.hasOwnProperty(Lf)&&le(Ac,Lf)<0&&(Po.prototype[Lf]=function(l){return function(){return l.apply(this.doc,arguments)}}(da.prototype[Lf]));return Mt(da),Po.inputStyles={textarea:sa,contenteditable:ps},Po.defineMode=function(l){!Po.defaults.mode&&l!="null"&&(Po.defaults.mode=l),Dr.apply(this,arguments)},Po.defineMIME=ai,Po.defineMode("null",function(){return{token:function(l){return l.skipToEnd()}}}),Po.defineMIME("text/plain","null"),Po.defineExtension=function(l,C){Po.prototype[l]=C},Po.defineDocExtension=function(l,C){da.prototype[l]=C},Po.fromTextArea=Eg,of(Po),Po.version="5.58.2",Po})},49047:function(Ie,Z,b){(function(B){B(b(4631),b(29589),b(52539))})(function(B){"use strict";B.defineMode("markdown",function(Y,s){var E=B.getMode(Y,"text/html"),I=E.name=="null";function u(ee){if(B.findModeByName){var se=B.findModeByName(ee);se&&(ee=se.mime||se.mimes[0])}var le=B.getMode(Y,ee);return le.name=="null"?null:le}s.highlightFormatting===void 0&&(s.highlightFormatting=!1),s.maxBlockquoteDepth===void 0&&(s.maxBlockquoteDepth=0),s.taskLists===void 0&&(s.taskLists=!1),s.strikethrough===void 0&&(s.strikethrough=!1),s.emoji===void 0&&(s.emoji=!1),s.fencedCodeBlockHighlighting===void 0&&(s.fencedCodeBlockHighlighting=!0),s.fencedCodeBlockDefaultMode===void 0&&(s.fencedCodeBlockDefaultMode="text/plain"),s.xml===void 0&&(s.xml=!0),s.tokenTypeOverrides===void 0&&(s.tokenTypeOverrides={});var d={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 g in d)d.hasOwnProperty(g)&&s.tokenTypeOverrides[g]&&(d[g]=s.tokenTypeOverrides[g]);var y=/^([*\-_])(?:\s*\1){2,}\s*$/,S=/^(?:[*\-+]|^[0-9]+([.)]))\s+/,v=/^\[(x| )\](?=\s)/i,c=s.allowAtxHeaderWithoutSpace?/^(#+)/:/^(#+)(?: |$)/,h=/^ {0,3}(?:\={1,}|-{2,})\s*$/,m=/^[^#!\[\]*_\\<>` "'(~:]+/,x=/^(~~~+|```+)[ \t]*([\w\/+#-]*)[^\n`]*$/,T=/^\s*\[[^\]]+?\]:.*$/,_=/[!"#$%&'()*+,\-.\/:;<=>?@\[\\\]^_`{|}~\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]/,R=" ";function A(ee,se,le){return se.f=se.inline=le,le(ee,se)}function N(ee,se,le){return se.f=se.block=le,le(ee,se)}function L(ee){return!ee||!/\S/.test(ee.string)}function M(ee){if(ee.linkTitle=!1,ee.linkHref=!1,ee.linkText=!1,ee.em=!1,ee.strong=!1,ee.strikethrough=!1,ee.quote=0,ee.indentedCode=!1,ee.f==H){var se=I;if(!se){var le=B.innerMode(E,ee.htmlState);se=le.mode.name=="xml"&&le.state.tagStart===null&&!le.state.context&&le.state.tokenize.isInText}se&&(ee.f=Q,ee.block=F,ee.htmlState=null)}return ee.trailingSpace=0,ee.trailingSpaceNewLine=!1,ee.prevLine=ee.thisLine,ee.thisLine={stream:null},null}function F(ee,se){var le=ee.column()===se.indentation,ke=L(se.prevLine.stream),De=se.indentedCode,Be=se.prevLine.hr,He=se.list!==!1,Fe=(se.listStack[se.listStack.length-1]||0)+3;se.indentedCode=!1;var Je=se.indentation;if(se.indentationDiff===null&&(se.indentationDiff=se.indentation,He)){for(se.list=null;Je=4&&(De||se.prevLine.fencedCodeEnd||se.prevLine.header||ke))return ee.skipToEnd(),se.indentedCode=!0,d.code;if(ee.eatSpace())return null;if(le&&se.indentation<=Fe&&(Re=ee.match(c))&&Re[1].length<=6)return se.quote=0,se.header=Re[1].length,se.thisLine.header=!0,s.highlightFormatting&&(se.formatting="header"),se.f=se.inline,V(se);if(se.indentation<=Fe&&ee.eat(">"))return se.quote=le?1:se.quote+1,s.highlightFormatting&&(se.formatting="quote"),ee.eatSpace(),V(se);if(!lt&&!se.setext&&le&&se.indentation<=Fe&&(Re=ee.match(S))){var Oe=Re[1]?"ol":"ul";return se.indentation=Je+ee.current().length,se.list=!0,se.quote=0,se.listStack.push(se.indentation),se.em=!1,se.strong=!1,se.code=!1,se.strikethrough=!1,s.taskLists&&ee.match(v,!1)&&(se.taskList=!0),se.f=se.inline,s.highlightFormatting&&(se.formatting=["list","list-"+Oe]),V(se)}else{if(le&&se.indentation<=Fe&&(Re=ee.match(x,!0)))return se.quote=0,se.fencedEndRE=new RegExp(Re[1]+"+ *$"),se.localMode=s.fencedCodeBlockHighlighting&&u(Re[2]||s.fencedCodeBlockDefaultMode),se.localMode&&(se.localState=B.startState(se.localMode)),se.f=se.block=P,s.highlightFormatting&&(se.formatting="code-block"),se.code=-1,V(se);if(se.setext||(!Me||!He)&&!se.quote&&se.list===!1&&!se.code&&!lt&&!T.test(ee.string)&&(Re=ee.lookAhead(1))&&(Re=Re.match(h)))return se.setext?(se.header=se.setext,se.setext=0,ee.skipToEnd(),s.highlightFormatting&&(se.formatting="header")):(se.header=Re[0].charAt(0)=="="?1:2,se.setext=se.header),se.thisLine.header=!0,se.f=se.inline,V(se);if(lt)return ee.skipToEnd(),se.hr=!0,se.thisLine.hr=!0,d.hr;if(ee.peek()==="[")return A(ee,se,ce)}return A(ee,se,se.inline)}function H(ee,se){var le=E.token(ee,se.htmlState);if(!I){var ke=B.innerMode(E,se.htmlState);(ke.mode.name=="xml"&&ke.state.tagStart===null&&!ke.state.context&&ke.state.tokenize.isInText||se.md_inside&&ee.current().indexOf(">")>-1)&&(se.f=Q,se.block=F,se.htmlState=null)}return le}function P(ee,se){var le=se.listStack[se.listStack.length-1]||0,ke=se.indentation=ee.quote?se.push(d.formatting+"-"+ee.formatting[le]+"-"+ee.quote):se.push("error"))}if(ee.taskOpen)return se.push("meta"),se.length?se.join(" "):null;if(ee.taskClosed)return se.push("property"),se.length?se.join(" "):null;if(ee.linkHref?se.push(d.linkHref,"url"):(ee.strong&&se.push(d.strong),ee.em&&se.push(d.em),ee.strikethrough&&se.push(d.strikethrough),ee.emoji&&se.push(d.emoji),ee.linkText&&se.push(d.linkText),ee.code&&se.push(d.code),ee.image&&se.push(d.image),ee.imageAltText&&se.push(d.imageAltText,"link"),ee.imageMarker&&se.push(d.imageMarker)),ee.header&&se.push(d.header,d.header+"-"+ee.header),ee.quote&&(se.push(d.quote),!s.maxBlockquoteDepth||s.maxBlockquoteDepth>=ee.quote?se.push(d.quote+"-"+ee.quote):se.push(d.quote+"-"+s.maxBlockquoteDepth)),ee.list!==!1){var ke=(ee.listStack.length-1)%3;ke?ke===1?se.push(d.list2):se.push(d.list3):se.push(d.list1)}return ee.trailingSpaceNewLine?se.push("trailing-space-new-line"):ee.trailingSpace&&se.push("trailing-space-"+(ee.trailingSpace%2?"a":"b")),se.length?se.join(" "):null}function G(ee,se){if(ee.match(m,!0))return V(se)}function Q(ee,se){var le=se.text(ee,se);if(typeof le!="undefined")return le;if(se.list)return se.list=null,V(se);if(se.taskList){var ke=ee.match(v,!0)[1]===" ";return ke?se.taskOpen=!0:se.taskClosed=!0,s.highlightFormatting&&(se.formatting="task"),se.taskList=!1,V(se)}if(se.taskOpen=!1,se.taskClosed=!1,se.header&&ee.match(/^#+$/,!0))return s.highlightFormatting&&(se.formatting="header"),V(se);var De=ee.next();if(se.linkTitle){se.linkTitle=!1;var Be=De;De==="("&&(Be=")"),Be=(Be+"").replace(/([.?*+^\[\]\\(){}|-])/g,"\\$1");var He="^\\s*(?:[^"+Be+"\\\\]+|\\\\\\\\|\\\\.)"+Be;if(ee.match(new RegExp(He),!0))return d.linkHref}if(De==="`"){var Fe=se.formatting;s.highlightFormatting&&(se.formatting="code"),ee.eatWhile("`");var Je=ee.current().length;if(se.code==0&&(!se.quote||Je==1))return se.code=Je,V(se);if(Je==se.code){var Me=V(se);return se.code=0,Me}else return se.formatting=Fe,V(se)}else if(se.code)return V(se);if(De==="\\"&&(ee.next(),s.highlightFormatting)){var lt=V(se),Re=d.formatting+"-escape";return lt?lt+" "+Re:Re}if(De==="!"&&ee.match(/\[[^\]]*\] ?(?:\(|\[)/,!1))return se.imageMarker=!0,se.image=!0,s.highlightFormatting&&(se.formatting="image"),V(se);if(De==="["&&se.imageMarker&&ee.match(/[^\]]*\](\(.*?\)| ?\[.*?\])/,!1))return se.imageMarker=!1,se.imageAltText=!0,s.highlightFormatting&&(se.formatting="image"),V(se);if(De==="]"&&se.imageAltText){s.highlightFormatting&&(se.formatting="image");var lt=V(se);return se.imageAltText=!1,se.image=!1,se.inline=se.f=ue,lt}if(De==="["&&!se.image)return se.linkText&&ee.match(/^.*?\]/)||(se.linkText=!0,s.highlightFormatting&&(se.formatting="link")),V(se);if(De==="]"&&se.linkText){s.highlightFormatting&&(se.formatting="link");var lt=V(se);return se.linkText=!1,se.inline=se.f=ee.match(/\(.*?\)| ?\[.*?\]/,!1)?ue:Q,lt}if(De==="<"&&ee.match(/^(https?|ftps?):\/\/(?:[^\\>]|\\.)+>/,!1)){se.f=se.inline=ne,s.highlightFormatting&&(se.formatting="link");var lt=V(se);return lt?lt+=" ":lt="",lt+d.linkInline}if(De==="<"&&ee.match(/^[^> \\]+@(?:[^\\>]|\\.)+>/,!1)){se.f=se.inline=ne,s.highlightFormatting&&(se.formatting="link");var lt=V(se);return lt?lt+=" ":lt="",lt+d.linkEmail}if(s.xml&&De==="<"&&ee.match(/^(!--|\?|!\[CDATA\[|[a-z][a-z0-9-]*(?:\s+[a-z_:.\-]+(?:\s*=\s*[^>]+)?)*\s*(?:>|$))/i,!1)){var Oe=ee.string.indexOf(">",ee.pos);if(Oe!=-1){var pe=ee.string.substring(ee.start,Oe);/markdown\s*=\s*('|"){0,1}1('|"){0,1}/.test(pe)&&(se.md_inside=!0)}return ee.backUp(1),se.htmlState=B.startState(E),N(ee,se,H)}if(s.xml&&De==="<"&&ee.match(/^\/\w*?>/))return se.md_inside=!1,"tag";if(De==="*"||De==="_"){for(var fe=1,z=ee.pos==1?" ":ee.string.charAt(ee.pos-2);fe<3&&ee.eat(De);)fe++;var J=ee.peek()||" ",be=!/\s/.test(J)&&(!_.test(J)||/\s/.test(z)||_.test(z)),_e=!/\s/.test(z)&&(!_.test(z)||/\s/.test(J)||_.test(J)),oe=null,ie=null;if(fe%2&&(!se.em&&be&&(De==="*"||!_e||_.test(z))?oe=!0:se.em==De&&_e&&(De==="*"||!be||_.test(J))&&(oe=!1)),fe>1&&(!se.strong&&be&&(De==="*"||!_e||_.test(z))?ie=!0:se.strong==De&&_e&&(De==="*"||!be||_.test(J))&&(ie=!1)),ie!=null||oe!=null){s.highlightFormatting&&(se.formatting=oe==null?"strong":ie==null?"em":"strong em"),oe===!0&&(se.em=De),ie===!0&&(se.strong=De);var Me=V(se);return oe===!1&&(se.em=!1),ie===!1&&(se.strong=!1),Me}}else if(De===" "&&(ee.eat("*")||ee.eat("_"))){if(ee.peek()===" ")return V(se);ee.backUp(1)}if(s.strikethrough){if(De==="~"&&ee.eatWhile(De)){if(se.strikethrough){s.highlightFormatting&&(se.formatting="strikethrough");var Me=V(se);return se.strikethrough=!1,Me}else if(ee.match(/^[^\s]/,!1))return se.strikethrough=!0,s.highlightFormatting&&(se.formatting="strikethrough"),V(se)}else if(De===" "&&ee.match(/^~~/,!0)){if(ee.peek()===" ")return V(se);ee.backUp(2)}}if(s.emoji&&De===":"&&ee.match(/^(?:[a-z_\d+][a-z_\d+-]*|\-[a-z_\d+][a-z_\d+-]*):/)){se.emoji=!0,s.highlightFormatting&&(se.formatting="emoji");var ve=V(se);return se.emoji=!1,ve}return De===" "&&(ee.match(/^ +$/,!1)?se.trailingSpace++:se.trailingSpace&&(se.trailingSpaceNewLine=!0)),V(se)}function ne(ee,se){var le=ee.next();if(le===">"){se.f=se.inline=Q,s.highlightFormatting&&(se.formatting="link");var ke=V(se);return ke?ke+=" ":ke="",ke+d.linkInline}return ee.match(/^[^>]+/,!0),d.linkInline}function ue(ee,se){if(ee.eatSpace())return null;var le=ee.next();return le==="("||le==="["?(se.f=se.inline=he(le==="("?")":"]"),s.highlightFormatting&&(se.formatting="link-string"),se.linkHref=!0,V(se)):"error"}var ae={")":/^(?:[^\\\(\)]|\\.|\((?:[^\\\(\)]|\\.)*\))*?(?=\))/,"]":/^(?:[^\\\[\]]|\\.|\[(?:[^\\\[\]]|\\.)*\])*?(?=\])/};function he(ee){return function(se,le){var ke=se.next();if(ke===ee){le.f=le.inline=Q,s.highlightFormatting&&(le.formatting="link-string");var De=V(le);return le.linkHref=!1,De}return se.match(ae[ee]),le.linkHref=!0,V(le)}}function ce(ee,se){return ee.match(/^([^\]\\]|\\.)*\]:/,!1)?(se.f=we,ee.next(),s.highlightFormatting&&(se.formatting="link"),se.linkText=!0,V(se)):A(ee,se,Q)}function we(ee,se){if(ee.match(/^\]:/,!0)){se.f=se.inline=me,s.highlightFormatting&&(se.formatting="link");var le=V(se);return se.linkText=!1,le}return ee.match(/^([^\]\\]|\\.)+/,!0),d.linkText}function me(ee,se){return ee.eatSpace()?null:(ee.match(/^[^\s]+/,!0),ee.peek()===void 0?se.linkTitle=!0:ee.match(/^(?:\s+(?:"(?:[^"\\]|\\\\|\\.)+"|'(?:[^'\\]|\\\\|\\.)+'|\((?:[^)\\]|\\\\|\\.)+\)))?/,!0),se.f=se.inline=Q,d.linkHref+" url")}var Le={startState:function(){return{f:F,prevLine:{stream:null},thisLine:{stream:null},block:F,htmlState:null,indentation:0,inline:Q,text:G,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(ee){return{f:ee.f,prevLine:ee.prevLine,thisLine:ee.thisLine,block:ee.block,htmlState:ee.htmlState&&B.copyState(E,ee.htmlState),indentation:ee.indentation,localMode:ee.localMode,localState:ee.localMode?B.copyState(ee.localMode,ee.localState):null,inline:ee.inline,text:ee.text,formatting:!1,linkText:ee.linkText,linkTitle:ee.linkTitle,linkHref:ee.linkHref,code:ee.code,em:ee.em,strong:ee.strong,strikethrough:ee.strikethrough,emoji:ee.emoji,header:ee.header,setext:ee.setext,hr:ee.hr,taskList:ee.taskList,list:ee.list,listStack:ee.listStack.slice(0),quote:ee.quote,indentedCode:ee.indentedCode,trailingSpace:ee.trailingSpace,trailingSpaceNewLine:ee.trailingSpaceNewLine,md_inside:ee.md_inside,fencedEndRE:ee.fencedEndRE}},token:function(ee,se){if(se.formatting=!1,ee!=se.thisLine.stream){if(se.header=0,se.hr=!1,ee.match(/^\s*$/,!0))return M(se),null;if(se.prevLine=se.thisLine,se.thisLine={stream:ee},se.taskList=!1,se.trailingSpace=0,se.trailingSpaceNewLine=!1,!se.localState&&(se.f=se.block,se.f!=H)){var le=ee.match(/^\s*/,!0)[0].replace(/\t/g,R).length;if(se.indentation=le,se.indentationDiff=null,le>0)return null}}return se.f(ee,se)},innerMode:function(ee){return ee.block==H?{state:ee.htmlState,mode:E}:ee.localState?{state:ee.localState,mode:ee.localMode}:{state:ee,mode:Le}},indent:function(ee,se,le){return ee.block==H&&E.indent?E.indent(ee.htmlState,se,le):ee.localState&&ee.localMode.indent?ee.localMode.indent(ee.localState,se,le):B.Pass},blankLine:M,getType:V,blockCommentStart:"",closeBrackets:"()[]{}''\"\"``",fold:"markdown"};return Le},"xml"),B.defineMIME("text/markdown","markdown"),B.defineMIME("text/x-markdown","markdown")})},52539:function(Ie,Z,b){(function(B){B(b(4631))})(function(B){"use strict";B.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 Y=0;Y-1&&E.substring(d+1,E.length);if(g)return B.findModeByExtension(g)},B.findModeByName=function(E){E=E.toLowerCase();for(var I=0;I0?m.cmdState[m.cmdState.length-1]:null}function u(m){var x=m.cmdState.pop();x&&x.closeBracket()}function d(m){for(var x=m.cmdState,T=x.length-1;T>=0;T--){var _=x[T];if(_.name!="DEFAULT")return _}return{styleIdentifier:function(){return null}}}function g(m,x,T){return function(){this.name=m,this.bracketNo=0,this.style=x,this.styles=T,this.argument=null,this.styleIdentifier=function(){return this.styles[this.bracketNo-1]||null},this.openBracket=function(){return this.bracketNo++,"bracket"},this.closeBracket=function(){}}}var y={};y.importmodule=g("importmodule","tag",["string","builtin"]),y.documentclass=g("documentclass","tag",["","atom"]),y.usepackage=g("usepackage","tag",["atom"]),y.begin=g("begin","tag",["atom"]),y.end=g("end","tag",["atom"]),y.label=g("label","tag",["atom"]),y.ref=g("ref","tag",["atom"]),y.eqref=g("eqref","tag",["atom"]),y.cite=g("cite","tag",["atom"]),y.bibitem=g("bibitem","tag",["atom"]),y.Bibitem=g("Bibitem","tag",["atom"]),y.RBibitem=g("RBibitem","tag",["atom"]),y.DEFAULT=function(){this.name="DEFAULT",this.style="tag",this.styleIdentifier=this.openBracket=this.closeBracket=function(){}};function S(m,x){m.f=x}function v(m,x){var T;if(m.match(/^\\[a-zA-Z@]+/)){var _=m.current().slice(1);return T=y.hasOwnProperty(_)?y[_]:y.DEFAULT,T=new T,E(x,T),S(x,h),T.style}if(m.match(/^\\[$&%#{}_]/)||m.match(/^\\[,;!\/\\]/))return"tag";if(m.match("\\["))return S(x,function(A,N){return c(A,N,"\\]")}),"keyword";if(m.match("\\("))return S(x,function(A,N){return c(A,N,"\\)")}),"keyword";if(m.match("$$"))return S(x,function(A,N){return c(A,N,"$$")}),"keyword";if(m.match("$"))return S(x,function(A,N){return c(A,N,"$")}),"keyword";var R=m.next();if(R=="%")return m.skipToEnd(),"comment";if(R=="}"||R=="]"){if(T=I(x),T)T.closeBracket(R),S(x,h);else return"error";return"bracket"}else return R=="{"||R=="["?(T=y.DEFAULT,T=new T,E(x,T),"bracket"):/\d/.test(R)?(m.eatWhile(/[\w.%]/),"atom"):(m.eatWhile(/[\w\-_]/),T=d(x),T.name=="begin"&&(T.argument=m.current()),T.styleIdentifier())}function c(m,x,T){if(m.eatSpace())return null;if(T&&m.match(T))return S(x,v),"keyword";if(m.match(/^\\[a-zA-Z@]+/))return"tag";if(m.match(/^[a-zA-Z]+/))return"variable-2";if(m.match(/^\\[$&%#{}_]/)||m.match(/^\\[,;!\/]/)||m.match(/^[\^_&]/))return"tag";if(m.match(/^[+\-<>|=,\/@!*:;'"`~#?]/))return null;if(m.match(/^(\d+\.\d*|\d*\.\d+|\d+)/))return"number";var _=m.next();return _=="{"||_=="}"||_=="["||_=="]"||_=="("||_==")"?"bracket":_=="%"?(m.skipToEnd(),"comment"):"error"}function h(m,x){var T=m.peek(),_;return T=="{"||T=="["?(_=I(x),_.openBracket(T),m.eat(T),S(x,v),"bracket"):/[ \t\r]/.test(T)?(m.eat(T),null):(S(x,v),u(x),v(m,x))}return{startState:function(){var m=s.inMathMode?function(x,T){return c(x,T)}:v;return{cmdState:[],f:m}},copyState:function(m){return{cmdState:m.cmdState.slice(),f:m.f}},token:function(m,x){return x.f(m,x)},blankLine:function(m){m.f=v,m.cmdState.length=0},lineComment:"%"}}),B.defineMIME("text/x-stex","stex"),B.defineMIME("text/x-latex","stex")})},29589:function(Ie,Z,b){(function(B){B(b(4631))})(function(B){"use strict";var Y={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},s={autoSelfClosers:{},implicitlyClosed:{},contextGrabbers:{},doNotIndent:{},allowUnquoted:!1,allowMissing:!1,allowMissingTagName:!1,caseFold:!1};B.defineMode("xml",function(E,I){var u=E.indentUnit,d={},g=I.htmlMode?Y:s;for(var y in g)d[y]=g[y];for(var y in I)d[y]=I[y];var S,v;function c(ne,ue){function ae(we){return ue.tokenize=we,we(ne,ue)}var he=ne.next();if(he=="<")return ne.eat("!")?ne.eat("[")?ne.match("CDATA[")?ae(x("atom","]]>")):null:ne.match("--")?ae(x("comment","-->")):ne.match("DOCTYPE",!0,!0)?(ne.eatWhile(/[\w\._\-]/),ae(T(1))):null:ne.eat("?")?(ne.eatWhile(/[\w\._\-]/),ue.tokenize=x("meta","?>"),"meta"):(S=ne.eat("/")?"closeTag":"openTag",ue.tokenize=h,"tag bracket");if(he=="&"){var ce;return ne.eat("#")?ne.eat("x")?ce=ne.eatWhile(/[a-fA-F\d]/)&&ne.eat(";"):ce=ne.eatWhile(/[\d]/)&&ne.eat(";"):ce=ne.eatWhile(/[\w\.\-:]/)&&ne.eat(";"),ce?"atom":"error"}else return ne.eatWhile(/[^&<]/),null}c.isInText=!0;function h(ne,ue){var ae=ne.next();if(ae==">"||ae=="/"&&ne.eat(">"))return ue.tokenize=c,S=ae==">"?"endTag":"selfcloseTag","tag bracket";if(ae=="=")return S="equals",null;if(ae=="<"){ue.tokenize=c,ue.state=N,ue.tagName=ue.tagStart=null;var he=ue.tokenize(ne,ue);return he?he+" tag error":"tag error"}else return/[\'\"]/.test(ae)?(ue.tokenize=m(ae),ue.stringStartCol=ne.column(),ue.tokenize(ne,ue)):(ne.match(/^[^\s\u00a0=<>\"\']*[^\s\u00a0=<>\"\'\/]/),"word")}function m(ne){var ue=function(ae,he){for(;!ae.eol();)if(ae.next()==ne){he.tokenize=h;break}return"string"};return ue.isInAttribute=!0,ue}function x(ne,ue){return function(ae,he){for(;!ae.eol();){if(ae.match(ue)){he.tokenize=c;break}ae.next()}return ne}}function T(ne){return function(ue,ae){for(var he;(he=ue.next())!=null;){if(he=="<")return ae.tokenize=T(ne+1),ae.tokenize(ue,ae);if(he==">")if(ne==1){ae.tokenize=c;break}else return ae.tokenize=T(ne-1),ae.tokenize(ue,ae)}return"meta"}}function _(ne,ue,ae){this.prev=ne.context,this.tagName=ue,this.indent=ne.indented,this.startOfLine=ae,(d.doNotIndent.hasOwnProperty(ue)||ne.context&&ne.context.noIndent)&&(this.noIndent=!0)}function R(ne){ne.context&&(ne.context=ne.context.prev)}function A(ne,ue){for(var ae;;){if(!ne.context||(ae=ne.context.tagName,!d.contextGrabbers.hasOwnProperty(ae)||!d.contextGrabbers[ae].hasOwnProperty(ue)))return;R(ne)}}function N(ne,ue,ae){return ne=="openTag"?(ae.tagStart=ue.column(),L):ne=="closeTag"?M:N}function L(ne,ue,ae){return ne=="word"?(ae.tagName=ue.current(),v="tag",P):d.allowMissingTagName&&ne=="endTag"?(v="tag bracket",P(ne,ue,ae)):(v="error",L)}function M(ne,ue,ae){if(ne=="word"){var he=ue.current();return ae.context&&ae.context.tagName!=he&&d.implicitlyClosed.hasOwnProperty(ae.context.tagName)&&R(ae),ae.context&&ae.context.tagName==he||d.matchClosing===!1?(v="tag",F):(v="tag error",H)}else return d.allowMissingTagName&&ne=="endTag"?(v="tag bracket",F(ne,ue,ae)):(v="error",H)}function F(ne,ue,ae){return ne!="endTag"?(v="error",F):(R(ae),N)}function H(ne,ue,ae){return v="error",F(ne,ue,ae)}function P(ne,ue,ae){if(ne=="word")return v="attribute",V;if(ne=="endTag"||ne=="selfcloseTag"){var he=ae.tagName,ce=ae.tagStart;return ae.tagName=ae.tagStart=null,ne=="selfcloseTag"||d.autoSelfClosers.hasOwnProperty(he)?A(ae,he):(A(ae,he),ae.context=new _(ae,he,ce==ae.indented)),N}return v="error",P}function V(ne,ue,ae){return ne=="equals"?G:(d.allowMissing||(v="error"),P(ne,ue,ae))}function G(ne,ue,ae){return ne=="string"?Q:ne=="word"&&d.allowUnquoted?(v="string",P):(v="error",P(ne,ue,ae))}function Q(ne,ue,ae){return ne=="string"?Q:P(ne,ue,ae)}return{startState:function(ne){var ue={tokenize:c,state:N,indented:ne||0,tagName:null,tagStart:null,context:null};return ne!=null&&(ue.baseIndent=ne),ue},token:function(ne,ue){if(!ue.tagName&&ne.sol()&&(ue.indented=ne.indentation()),ne.eatSpace())return null;S=null;var ae=ue.tokenize(ne,ue);return(ae||S)&&ae!="comment"&&(v=null,ue.state=ue.state(S||ae,ne,ue),v&&(ae=v=="error"?ae+" error":v)),ae},indent:function(ne,ue,ae){var he=ne.context;if(ne.tokenize.isInAttribute)return ne.tagStart==ne.indented?ne.stringStartCol+1:ne.indented+u;if(he&&he.noIndent)return B.Pass;if(ne.tokenize!=h&&ne.tokenize!=c)return ae?ae.match(/^(\s*)/)[0].length:0;if(ne.tagName)return d.multilineTagIndentPastTag!==!1?ne.tagStart+ne.tagName.length+2:ne.tagStart+u*(d.multilineTagIndentFactor||1);if(d.alignCDATA&&/$/,blockCommentStart:"",configuration:d.htmlMode?"html":"xml",helperType:d.htmlMode?"html":"xml",skipAttribute:function(ne){ne.state==G&&(ne.state=P)},xmlCurrentTag:function(ne){return ne.tagName?{name:ne.tagName,close:ne.type=="closeTag"}:null},xmlCurrentContext:function(ne){for(var ue=[],ae=ne.context;ae;ae=ae.prev)ae.tagName&&ue.push(ae.tagName);return ue.reverse()}}}),B.defineMIME("text/xml","xml"),B.defineMIME("application/xml","xml"),B.mimeModes.hasOwnProperty("text/html")||B.defineMIME("text/html",{name:"xml",htmlMode:!0})})},17187:function(Ie){"use strict";var Z=typeof Reflect=="object"?Reflect:null,b=Z&&typeof Z.apply=="function"?Z.apply:function(N,L,M){return Function.prototype.apply.call(N,L,M)},B;Z&&typeof Z.ownKeys=="function"?B=Z.ownKeys:Object.getOwnPropertySymbols?B=function(N){return Object.getOwnPropertyNames(N).concat(Object.getOwnPropertySymbols(N))}:B=function(N){return Object.getOwnPropertyNames(N)};function Y(A){console&&console.warn&&console.warn(A)}var s=Number.isNaN||function(N){return N!==N};function E(){E.init.call(this)}Ie.exports=E,Ie.exports.once=T,E.EventEmitter=E,E.prototype._events=void 0,E.prototype._eventsCount=0,E.prototype._maxListeners=void 0;var I=10;function u(A){if(typeof A!="function")throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof A)}Object.defineProperty(E,"defaultMaxListeners",{enumerable:!0,get:function(){return I},set:function(A){if(typeof A!="number"||A<0||s(A))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+A+".");I=A}}),E.init=function(){(this._events===void 0||this._events===Object.getPrototypeOf(this)._events)&&(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},E.prototype.setMaxListeners=function(N){if(typeof N!="number"||N<0||s(N))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+N+".");return this._maxListeners=N,this};function d(A){return A._maxListeners===void 0?E.defaultMaxListeners:A._maxListeners}E.prototype.getMaxListeners=function(){return d(this)},E.prototype.emit=function(N){for(var L=[],M=1;M0&&(P=L[0]),P instanceof Error)throw P;var V=new Error("Unhandled error."+(P?" ("+P.message+")":""));throw V.context=P,V}var G=H[N];if(G===void 0)return!1;if(typeof G=="function")b(G,this,L);else for(var Q=G.length,ne=h(G,Q),M=0;M0&&P.length>F&&!P.warned){P.warned=!0;var V=new Error("Possible EventEmitter memory leak detected. "+P.length+" "+String(N)+" listeners added. Use emitter.setMaxListeners() to increase limit");V.name="MaxListenersExceededWarning",V.emitter=A,V.type=N,V.count=P.length,Y(V)}return A}E.prototype.addListener=function(N,L){return g(this,N,L,!1)},E.prototype.on=E.prototype.addListener,E.prototype.prependListener=function(N,L){return g(this,N,L,!0)};function y(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,arguments.length===0?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function S(A,N,L){var M={fired:!1,wrapFn:void 0,target:A,type:N,listener:L},F=y.bind(M);return F.listener=L,M.wrapFn=F,F}E.prototype.once=function(N,L){return u(L),this.on(N,S(this,N,L)),this},E.prototype.prependOnceListener=function(N,L){return u(L),this.prependListener(N,S(this,N,L)),this},E.prototype.removeListener=function(N,L){var M,F,H,P,V;if(u(L),F=this._events,F===void 0)return this;if(M=F[N],M===void 0)return this;if(M===L||M.listener===L)--this._eventsCount===0?this._events=Object.create(null):(delete F[N],F.removeListener&&this.emit("removeListener",N,M.listener||L));else if(typeof M!="function"){for(H=-1,P=M.length-1;P>=0;P--)if(M[P]===L||M[P].listener===L){V=M[P].listener,H=P;break}if(H<0)return this;H===0?M.shift():m(M,H),M.length===1&&(F[N]=M[0]),F.removeListener!==void 0&&this.emit("removeListener",N,V||L)}return this},E.prototype.off=E.prototype.removeListener,E.prototype.removeAllListeners=function(N){var L,M,F;if(M=this._events,M===void 0)return this;if(M.removeListener===void 0)return arguments.length===0?(this._events=Object.create(null),this._eventsCount=0):M[N]!==void 0&&(--this._eventsCount===0?this._events=Object.create(null):delete M[N]),this;if(arguments.length===0){var H=Object.keys(M),P;for(F=0;F=0;F--)this.removeListener(N,L[F]);return this};function v(A,N,L){var M=A._events;if(M===void 0)return[];var F=M[N];return F===void 0?[]:typeof F=="function"?L?[F.listener||F]:[F]:L?x(F):h(F,F.length)}E.prototype.listeners=function(N){return v(this,N,!0)},E.prototype.rawListeners=function(N){return v(this,N,!1)},E.listenerCount=function(A,N){return typeof A.listenerCount=="function"?A.listenerCount(N):c.call(A,N)},E.prototype.listenerCount=c;function c(A){var N=this._events;if(N!==void 0){var L=N[A];if(typeof L=="function")return 1;if(L!==void 0)return L.length}return 0}E.prototype.eventNames=function(){return this._eventsCount>0?B(this._events):[]};function h(A,N){for(var L=new Array(N),M=0;Mn&&(n=Math.max(0,i+n)),(r==null||r>i)&&(r=i),r=Number(r),0>r&&(r=Math.max(0,i+r)),n=Number(n||0);n=e.length?e.push(n):e.splice(t,0,n):Lt("Cannot insert an object into an HTMLCollection or NodeList: "+n+" at "+t)}function ki(e,t){Array.isArray(e)?t>=e.length?e.pop():e.splice(t,1):Lt("Cannot remove an object from an HTMLCollection or NodeList at "+t)}function yr(){var e=Ro.pop();return e===void 0?[]:e}function Mr(e){e.length=0,Ro.push(e)}function Fr(e){if(typeof e=="function"){if(e.className)return e.className;if(e.name)return e.name;var t=e.toString();if(t=t.substring(9,t.indexOf("(")).trim(),t!=="")return e._className=t}else if(bn(e)&&e.constructor)return Fr(e.constructor);return typeof e}function Di(e){var t=e;return bn(e)&&(e.text?t=e.text:e.name?t=e.name:e.key!==void 0?t=e.key:e.id!==void 0?t=e.id:e.constructor===Object&&(e.Text?t=e.Text:e.Name?t=e.Name:e.Key!==void 0?t=e.Key:e.Id!==void 0?t=e.Id:e.ID!==void 0&&(t=e.ID))),t===void 0?"undefined":t===null?"null":t.toString()}function so(e,t){if(e.hasOwnProperty(t))return!0;for(e=Object.getPrototypeOf(e);e&&e!==Function;){if(e.hasOwnProperty(t))return!0;var n=e.CA;if(n&&n[t])return!0;e=Object.getPrototypeOf(e)}return!1}function Gi(e,t,n){Object.defineProperty(Wi.prototype,e,{get:t,set:n})}function sr(e){for(var t=[],n=0;256>n;n++)t["0123456789abcdef".charAt(n>>4)+"0123456789abcdef".charAt(n&15)]=String.fromCharCode(n);e.length%2&&(e="0"+e),n=[];for(var r=0,i=0;in;n++)t[n]=n;for(n=r=0;256>n;n++)r=(r+t[n]+119)%256,i=t[n],t[n]=t[r],t[r]=i;r=n=0;for(var o="",a=0;a-1||o.indexOf("\xA9 1998-2021 Northwoods Software")>-1||o.indexOf("Not for distribution or production use")>-1||o.indexOf("gojs.net")>-1?"":o}var ys=vn.navigator!==void 0&&0this.key)return!1;e=e.s;var t=e.length,n=++this.Za,r=this.qf;if(r!==null)for(;nthis.key)return!1;var t=--this.Za;return 0<=t?(this.key=t,this.value=e.s[t],!0):(this.de(),!1)},Ni.prototype.Ad=function(){return this.next()},Ni.prototype.first=function(){var e=this.Bb;this.qa=e.Ja;var t=e.s;return this.Za=e=t.length-1,0<=e?(t=t[e],this.key=e,this.value=t):null},Ni.prototype.any=function(e){var t=this.Bb;t.Hg=null,t=t.s;var n=t.length;for(this.Za=n,--n;0<=n;n--)if(e(t[n]))return!0;return!1},Ni.prototype.all=function(e){var t=this.Bb;t.Hg=null,t=t.s;var n=t.length;for(this.Za=n,--n;0<=n;n--)if(!e(t[n]))return!1;return!0},Ni.prototype.each=function(e){var t=this.Bb;t.Hg=null,t=t.s;var n=t.length;for(this.Za=n,--n;0<=n;n--)e(t[n]);return this},Ni.prototype.map=function(e){var t=this.Bb;t.Hg=null;var n=[];t=t.s;var r=t.length;for(this.Za=r,--r;0<=r;r--)n.push(e(t[r]));return e=new tn,e.s=n,e.xb(),e.iterator},Ni.prototype.filter=function(e){var t=this.Bb;t.Hg=null;var n=[];t=t.s;var r=t.length;for(this.Za=r,--r;0<=r;r--){var i=t[r];e(i)&&n.push(i)}return e=new tn,e.s=n,e.xb(),e.iterator},Ni.prototype.de=function(){this.key=-1,this.value=null,this.qa=-1,this.Bb.Hg=this},Ni.prototype.toString=function(){return"ListIteratorBackwards("+this.Za+"/"+this.Bb.count+")"},kn.Object.defineProperties(Ni.prototype,{iterator:{get:function(){return this}},count:{get:function(){return this.Bb.s.length}}}),Ni.prototype.first=Ni.prototype.first,Ni.prototype.hasNext=Ni.prototype.Ad,Ni.prototype.next=Ni.prototype.next,Ni.prototype.reset=Ni.prototype.reset,Ni.className="ListIteratorBackwards";function tn(e){Ge(this),this._isFrozen=!1,this.s=[],this.Ja=0,this.Hg=this.Sa=null,typeof e=="string"&&Lt("Error: Since 2.0 List/Map/Set constructors no longer take an argument that enforces type."),e!==void 0&&this.addAll(e)}ye=tn.prototype,ye.xb=function(){var e=this.Ja;e++,999999999e||e>=t.length)&&hr(e,"0 <= i < length",tn,"elt:i"),t[e]},ye.get=function(e){return this.M(e)},ye.cd=function(e,t){var n=this.s;(0>e||e>=n.length)&&hr(e,"0 <= i < length",tn,"setElt:i"),this._isFrozen&&Yn(this,e),n[e]=t},ye.set=function(e,t){this.cd(e,t)},ye.first=function(){var e=this.s;return e.length===0?null:e[0]},ye.jc=function(){var e=this.s,t=e.length;return 0e&&hr(e,">= 0",tn,"insertAt:i"),this._isFrozen&&Yn(this,e);var n=this.s;e>=n.length?n.push(t):n.splice(e,0,t),this.xb()},ye.remove=function(e){if(e===null)return!1;this._isFrozen&&Yn(this,e);var t=this.s;return e=t.indexOf(e),e===-1?!1:(e===t.length-1?t.pop():t.splice(e,1),this.xb(),!0)},ye.delete=function(e){return this.remove(e)},ye.mb=function(e){var t=this.s;(0>e||e>=t.length)&&hr(e,"0 <= i < length",tn,"removeAt:i"),this._isFrozen&&Yn(this,e),e===t.length-1?t.pop():t.splice(e,1),this.xb()},ye.removeRange=function(e,t){var n=this.s,r=n.length;if(0>e)e=0;else if(e>=r)return this;if(0>t)return this;if(t>=r&&(t=r-1),e>t)return this;this._isFrozen&&Yn(this);for(var i=e,o=t+1;o=o)return this;if((0>t||t>=i-1)&&hr(t,"0 <= from < length",tn,"sortRange:from"),o===2)return n=r[t],i=r[t+1],0=i)r.sort(e);else for(t=r.slice(0,n),t.sort(e),e=0;e=i)for(n=r.slice(t),n.sort(e),e=t;e=this.s.length)return eo;var e=this.Sa;return e!==null?(e.reset(),e):new hi(this)}},iteratorBackwards:{get:function(){if(0>=this.s.length)return eo;var e=this.Hg;return e!==null?(e.reset(),e):new Ni(this)}}}),tn.prototype.reverse=tn.prototype.reverse,tn.prototype.sortRange=tn.prototype.zi,tn.prototype.sort=tn.prototype.sort,tn.prototype.toSet=tn.prototype.Iv,tn.prototype.toArray=tn.prototype.Fa,tn.prototype.removeRange=tn.prototype.removeRange,tn.prototype.removeAt=tn.prototype.mb,tn.prototype.delete=tn.prototype.delete,tn.prototype.remove=tn.prototype.remove,tn.prototype.insertAt=tn.prototype.Gb,tn.prototype.pop=tn.prototype.pop,tn.prototype.last=tn.prototype.jc,tn.prototype.first=tn.prototype.first,tn.prototype.set=tn.prototype.set,tn.prototype.setElt=tn.prototype.cd,tn.prototype.get=tn.prototype.get,tn.prototype.elt=tn.prototype.M,tn.prototype.indexOf=tn.prototype.indexOf,tn.prototype.has=tn.prototype.has,tn.prototype.contains=tn.prototype.contains,tn.prototype.clear=tn.prototype.clear,tn.prototype.addAll=tn.prototype.addAll,tn.prototype.push=tn.prototype.push,tn.prototype.add=tn.prototype.add,tn.prototype.thaw=tn.prototype.ka,tn.prototype.freeze=tn.prototype.freeze,tn.className="List";function _i(e){this.eg=e,e.Sa=null,this.qa=e.Ja,this.sa=null}_i.prototype.reset=function(){var e=this.eg;e.Sa=null,this.qa=e.Ja,this.sa=null},_i.prototype.next=function(){var e=this.eg;if(e.Ja!==this.qa&&this.key===null)return!1;var t=this.sa;return t=t===null?e.ea:t.va,t!==null?(this.sa=t,this.value=t.value,this.key=t.key,!0):(this.de(),!1)},_i.prototype.Ad=function(){return this.next()},_i.prototype.first=function(){var e=this.eg;if(this.qa=e.Ja,e=e.ea,e!==null){this.sa=e;var t=e.value;return this.key=e.key,this.value=t}return null},_i.prototype.any=function(e){var t=this.eg;for(this.sa=t.Sa=null,t=t.ea;t!==null;){if(e(t.value))return!0;t=t.va}return!1},_i.prototype.all=function(e){var t=this.eg;for(this.sa=t.Sa=null,t=t.ea;t!==null;){if(!e(t.value))return!1;t=t.va}return!0},_i.prototype.each=function(e){var t=this.eg;for(this.sa=t.Sa=null,t=t.ea;t!==null;)e(t.value),t=t.va;return this},_i.prototype.map=function(e){var t=this.eg;t.Sa=null;var n=new tn;for(t=t.ea;t!==null;)n.add(e(t.value)),t=t.va;return n.iterator},_i.prototype.filter=function(e){var t=this.eg;t.Sa=null;var n=new tn;for(t=t.ea;t!==null;){var r=t.value;e(r)&&n.add(r),t=t.va}return n.iterator},_i.prototype.de=function(){this.value=this.key=null,this.qa=-1,this.eg.Sa=this},_i.prototype.toString=function(){return this.sa!==null?"SetIterator@"+this.sa.value:"SetIterator"},kn.Object.defineProperties(_i.prototype,{iterator:{get:function(){return this}},count:{get:function(){return this.eg.Sb}}}),_i.prototype.first=_i.prototype.first,_i.prototype.hasNext=_i.prototype.Ad,_i.prototype.next=_i.prototype.next,_i.prototype.reset=_i.prototype.reset,_i.className="SetIterator";function ut(e){Ge(this),this._isFrozen=!1,this.Tb={},this.Sb=0,this.Sa=null,this.Ja=0,this.kf=this.ea=null,typeof e=="string"&&Lt("Error: Since 2.0 List/Map/Set constructors no longer take an argument that enforces type."),e!==void 0&&this.addAll(e)}ye=ut.prototype,ye.xb=function(){var e=this.Ja;e++,999999999=this.Sb)return eo;var e=this.Sa;return e!==null?(e.reset(),e):new _i(this)}}}),ut.prototype.toList=ut.prototype.Hv,ut.prototype.toArray=ut.prototype.Fa,ut.prototype.clear=ut.prototype.clear,ut.prototype.retainAll=ut.prototype.pA,ut.prototype.removeAll=ut.prototype.hp,ut.prototype.delete=ut.prototype.delete,ut.prototype.remove=ut.prototype.remove,ut.prototype.first=ut.prototype.first,ut.prototype.containsAny=ut.prototype.Ty,ut.prototype.containsAll=ut.prototype.Sy,ut.prototype.has=ut.prototype.has,ut.prototype.contains=ut.prototype.contains,ut.prototype.addAll=ut.prototype.addAll,ut.prototype.add=ut.prototype.add,ut.prototype.thaw=ut.prototype.ka,ut.prototype.freeze=ut.prototype.freeze;var dt=1;ut.className="Set",ut.uniqueHash=Ge,ut.hashIdUnique=an,ut.hashId=it;function Et(e){this.ma=e,this.qa=e.Ja,this.sa=null}Et.prototype.reset=function(){this.qa=this.ma.Ja,this.sa=null},Et.prototype.next=function(){var e=this.ma;if(e.Ja!==this.qa&&this.key===null)return!1;var t=this.sa;return t=t===null?e.ea:t.va,t!==null?(this.sa=t,this.value=this.key=e=t.key,!0):(this.de(),!1)},Et.prototype.Ad=function(){return this.next()},Et.prototype.first=function(){var e=this.ma;return this.qa=e.Ja,e=e.ea,e!==null?(this.sa=e,this.value=this.key=e=e.key):null},Et.prototype.any=function(e){var t=this.ma;for(this.sa=null,t=t.ea;t!==null;){if(e(t.key))return!0;t=t.va}return!1},Et.prototype.all=function(e){var t=this.ma;for(this.sa=null,t=t.ea;t!==null;){if(!e(t.key))return!1;t=t.va}return!0},Et.prototype.each=function(e){var t=this.ma;for(this.sa=null,t=t.ea;t!==null;)e(t.key),t=t.va;return this},Et.prototype.map=function(e){var t=this.ma;this.sa=null;var n=new tn;for(t=t.ea;t!==null;)n.add(e(t.key)),t=t.va;return n.iterator},Et.prototype.filter=function(e){var t=this.ma;this.sa=null;var n=new tn;for(t=t.ea;t!==null;){var r=t.key;e(r)&&n.add(r),t=t.va}return n.iterator},Et.prototype.de=function(){this.value=this.key=null,this.qa=-1},Et.prototype.toString=function(){return this.sa!==null?"MapKeySetIterator@"+this.sa.value:"MapKeySetIterator"},kn.Object.defineProperties(Et.prototype,{iterator:{get:function(){return this}},count:{get:function(){return this.ma.Sb}}}),Et.prototype.first=Et.prototype.first,Et.prototype.hasNext=Et.prototype.Ad,Et.prototype.next=Et.prototype.next,Et.prototype.reset=Et.prototype.reset,Et.className="MapKeySetIterator";function Dt(e){ut.call(this),Ge(this),this._isFrozen=!0,this.ma=e}Tn(Dt,ut),ye=Dt.prototype,ye.freeze=function(){return this},ye.ka=function(){return this},ye.toString=function(){return"MapKeySet("+this.ma.toString()+")"},ye.add=function(){Lt("This Set is read-only: "+this.toString())},ye.contains=function(e){return this.ma.contains(e)},ye.has=function(e){return this.contains(e)},ye.remove=function(){Lt("This Set is read-only: "+this.toString())},ye.delete=function(e){return this.remove(e)},ye.clear=function(){Lt("This Set is read-only: "+this.toString())},ye.first=function(){var e=this.ma.ea;return e!==null?e.key:null},Dt.prototype.any=function(e){for(var t=this.ma.ea;t!==null;){if(e(t.key))return!0;t=t.va}return!1},Dt.prototype.all=function(e){for(var t=this.ma.ea;t!==null;){if(!e(t.key))return!1;t=t.va}return!0},Dt.prototype.each=function(e){for(var t=this.ma.ea;t!==null;)e(t.key),t=t.va;return this},Dt.prototype.map=function(e){for(var t=new ut,n=this.ma.ea;n!==null;)t.add(e(n.key)),n=n.va;return t},Dt.prototype.filter=function(e){for(var t=new ut,n=this.ma.ea;n!==null;){var r=n.key;e(r)&&t.add(r),n=n.va}return t},Dt.prototype.copy=function(){return new Dt(this.ma)},Dt.prototype.Iv=function(){var e=new ut,t=this.ma.Tb,n;for(n in t)e.add(t[n].key);return e},Dt.prototype.Fa=function(){var e=this.ma.Tb,t=Array(this.ma.Sb),n=0,r;for(r in e)t[n]=e[r].key,n++;return t},Dt.prototype.Hv=function(){var e=new tn,t=this.ma.Tb,n;for(n in t)e.add(t[n].key);return e},kn.Object.defineProperties(Dt.prototype,{count:{get:function(){return this.ma.Sb}},size:{get:function(){return this.ma.Sb}},iterator:{get:function(){return 0>=this.ma.Sb?eo:new Et(this.ma)}}}),Dt.prototype.toList=Dt.prototype.Hv,Dt.prototype.toArray=Dt.prototype.Fa,Dt.prototype.toSet=Dt.prototype.Iv,Dt.prototype.first=Dt.prototype.first,Dt.prototype.clear=Dt.prototype.clear,Dt.prototype.delete=Dt.prototype.delete,Dt.prototype.remove=Dt.prototype.remove,Dt.prototype.has=Dt.prototype.has,Dt.prototype.contains=Dt.prototype.contains,Dt.prototype.add=Dt.prototype.add,Dt.prototype.thaw=Dt.prototype.ka,Dt.prototype.freeze=Dt.prototype.freeze,Dt.className="MapKeySet";function gn(e){this.ma=e,e.jf=null,this.qa=e.Ja,this.sa=null}gn.prototype.reset=function(){var e=this.ma;e.jf=null,this.qa=e.Ja,this.sa=null},gn.prototype.next=function(){var e=this.ma;if(e.Ja!==this.qa&&this.key===null)return!1;var t=this.sa;return t=t===null?e.ea:t.va,t!==null?(this.sa=t,this.value=t.value,this.key=t.key,!0):(this.de(),!1)},gn.prototype.Ad=function(){return this.next()},gn.prototype.first=function(){var e=this.ma;if(this.qa=e.Ja,e=e.ea,e!==null){this.sa=e;var t=e.value;return this.key=e.key,this.value=t}return null},gn.prototype.any=function(e){var t=this.ma;for(this.sa=t.jf=null,t=t.ea;t!==null;){if(e(t.value))return!0;t=t.va}return!1},gn.prototype.all=function(e){var t=this.ma;for(this.sa=t.jf=null,t=t.ea;t!==null;){if(!e(t.value))return!1;t=t.va}return!0},gn.prototype.each=function(e){var t=this.ma;for(this.sa=t.jf=null,t=t.ea;t!==null;)e(t.value),t=t.va;return this},gn.prototype.map=function(e){var t=this.ma;this.sa=t.jf=null;var n=new tn;for(t=t.ea;t!==null;)n.add(e(t.value)),t=t.va;return n.iterator},gn.prototype.filter=function(e){var t=this.ma;this.sa=t.jf=null;var n=new tn;for(t=t.ea;t!==null;){var r=t.value;e(r)&&n.add(r),t=t.va}return n.iterator},gn.prototype.de=function(){this.value=this.key=null,this.qa=-1,this.ma.jf=this},gn.prototype.toString=function(){return this.sa!==null?"MapValueSetIterator@"+this.sa.value:"MapValueSetIterator"},kn.Object.defineProperties(gn.prototype,{iterator:{get:function(){return this}},count:{get:function(){return this.ma.Sb}}}),gn.prototype.first=gn.prototype.first,gn.prototype.hasNext=gn.prototype.Ad,gn.prototype.next=gn.prototype.next,gn.prototype.reset=gn.prototype.reset,gn.className="MapValueSetIterator";function Mn(e,t){this.key=e,this.value=t,this.ll=this.va=null}Mn.prototype.toString=function(){return"{"+this.key+":"+this.value+"}"},Mn.className="KeyValuePair";function In(e){this.ma=e,e.Sa=null,this.qa=e.Ja,this.sa=null}In.prototype.reset=function(){var e=this.ma;e.Sa=null,this.qa=e.Ja,this.sa=null},In.prototype.next=function(){var e=this.ma;if(e.Ja!==this.qa&&this.key===null)return!1;var t=this.sa;return t=t===null?e.ea:t.va,t!==null?(this.sa=t,this.key=t.key,this.value=t.value,!0):(this.de(),!1)},In.prototype.Ad=function(){return this.next()},In.prototype.first=function(){var e=this.ma;return this.qa=e.Ja,e=e.ea,e!==null?(this.sa=e,this.key=e.key,this.value=e.value,e):null},In.prototype.any=function(e){var t=this.ma;for(this.sa=t.Sa=null,t=t.ea;t!==null;){if(e(t))return!0;t=t.va}return!1},In.prototype.all=function(e){var t=this.ma;for(this.sa=t.Sa=null,t=t.ea;t!==null;){if(!e(t))return!1;t=t.va}return!0},In.prototype.each=function(e){var t=this.ma;for(this.sa=t.Sa=null,t=t.ea;t!==null;)e(t),t=t.va;return this},In.prototype.map=function(e){var t=this.ma;this.sa=t.Sa=null;var n=new tn;for(t=t.ea;t!==null;)n.add(e(t)),t=t.va;return n.iterator},In.prototype.filter=function(e){var t=this.ma;this.sa=t.Sa=null;var n=new tn;for(t=t.ea;t!==null;)e(t)&&n.add(t),t=t.va;return n.iterator},In.prototype.de=function(){this.value=this.key=null,this.qa=-1,this.ma.Sa=this},In.prototype.toString=function(){return this.sa!==null?"MapIterator@"+this.sa:"MapIterator"},kn.Object.defineProperties(In.prototype,{iterator:{get:function(){return this}},count:{get:function(){return this.ma.Sb}}}),In.prototype.first=In.prototype.first,In.prototype.hasNext=In.prototype.Ad,In.prototype.next=In.prototype.next,In.prototype.reset=In.prototype.reset,In.className="MapIterator";function nn(e){Ge(this),this._isFrozen=!1,this.Tb={},this.Sb=0,this.jf=this.Sa=null,this.Ja=0,this.kf=this.ea=null,typeof e=="string"&&Lt("Error: Since 2.0 List/Map/Set constructors no longer take an argument that enforces type."),e!==void 0&&this.addAll(e)}ye=nn.prototype,ye.xb=function(){var e=this.Ja;e++,999999999=this.count)return eo;var e=this.Sa;return e!==null?(e.reset(),e):new In(this)}},iteratorKeys:{get:function(){return 0>=this.count?eo:new Et(this)}},iteratorValues:{get:function(){if(0>=this.count)return eo;var e=this.jf;return e!==null?(e.reset(),e):new gn(this)}}}),nn.prototype.toKeySet=nn.prototype.Lf,nn.prototype.toArray=nn.prototype.Fa,nn.prototype.clear=nn.prototype.clear,nn.prototype.delete=nn.prototype.delete,nn.prototype.remove=nn.prototype.remove,nn.prototype.get=nn.prototype.get,nn.prototype.getValue=nn.prototype.I,nn.prototype.has=nn.prototype.has,nn.prototype.contains=nn.prototype.contains,nn.prototype.first=nn.prototype.first,nn.prototype.addAll=nn.prototype.addAll,nn.prototype.set=nn.prototype.set,nn.prototype.add=nn.prototype.add,nn.prototype.thaw=nn.prototype.ka,nn.prototype.freeze=nn.prototype.freeze,nn.className="Map";function Ue(e,t){e===void 0?this.y=this.x=0:typeof e=="number"&&typeof t=="number"?(this.x=e,this.y=t):Lt("Invalid arguments to Point constructor: "+e+", "+t),this._isFrozen=!1}var kr,Br,ei,ti,Jr;Ue.prototype.assign=function(e){return this.x=e.x,this.y=e.y,this},Ue.prototype.h=function(e,t){return this.x=e,this.y=t,this},Ue.prototype.sg=function(e,t){return this.x=e,this.y=t,this},Ue.prototype.set=function(e){return this.x=e.x,this.y=e.y,this},Ue.prototype.copy=function(){var e=new Ue;return e.x=this.x,e.y=this.y,e},ye=Ue.prototype,ye.ja=function(){return this._isFrozen=!0,Object.freeze(this),this},ye.J=function(){return this._isFrozen||Object.isFrozen(this)?this:this.copy().freeze()},ye.freeze=function(){return this._isFrozen=!0,this},ye.ka=function(){return Object.isFrozen(this)&&Lt("cannot thaw constant: "+this),this._isFrozen=!1,this};function Wr(e){if(typeof e=="string"){e=e.split(" ");for(var t=0,n=0;e[t]==="";)t++;var r=e[t++];r&&(n=parseFloat(r));for(var i=0;e[t]==="";)t++;return(r=e[t++])&&(i=parseFloat(r)),new Ue(n,i)}return new Ue}function Ri(e){return e.x.toString()+" "+e.y.toString()}ye.toString=function(){return"Point("+this.x+","+this.y+")"},ye.D=function(e){return e instanceof Ue?this.x===e.x&&this.y===e.y:!1},ye.hi=function(e,t){return this.x===e&&this.y===t},ye.Xa=function(e){return vt.B(this.x,e.x)&&vt.B(this.y,e.y)},ye.add=function(e){return this.x+=e.x,this.y+=e.y,this},ye.re=function(e){return this.x-=e.x,this.y-=e.y,this},ye.offset=function(e,t){return this.x+=e,this.y+=t,this},Ue.prototype.rotate=function(e){if(e===0)return this;var t=this.x,n=this.y;if(t===0&&n===0)return this;if(360<=e?e-=360:0>e&&(e+=360),e===90){e=0;var r=1}else e===180?(e=-1,r=0):e===270?(e=0,r=-1):(r=e*Math.PI/180,e=Math.cos(r),r=Math.sin(r));return this.x=e*t-r*n,this.y=r*t+e*n,this},ye=Ue.prototype,ye.scale=function(e,t){return this.x*=e,this.y*=t,this},ye.Bf=function(e){var t=e.x-this.x;return e=e.y-this.y,t*t+e*e},ye.zd=function(e,t){return e-=this.x,t-=this.y,e*e+t*t},ye.normalize=function(){var e=this.x,t=this.y,n=Math.sqrt(e*e+t*t);return 0t?270:0;if(t===0)return 0e?n=0>t?n+180:180-n:0>t&&(n=360-n),n}ye.Ry=function(e,t){return vt.Fl(e.x,e.y,t.x,t.y,this.x,this.y)},ye.fA=function(e,t,n,r){return vt.qh(e,t,n,r,this.x,this.y,this),this},ye.gA=function(e,t){return vt.qh(e.x,e.y,t.x,t.y,this.x,this.y,this),this},ye.uA=function(e,t,n,r){return vt.No(this.x,this.y,e,t,n,r,this),this},ye.vA=function(e,t){return vt.No(this.x,this.y,e.x,e.y,t.width,t.height,this),this},ye.xi=function(e,t){return this.x=e.x+t.x*e.width+t.offsetX,this.y=e.y+t.y*e.height+t.offsetY,this},ye.yi=function(e,t,n,r,i){return this.x=e+i.x*n+i.offsetX,this.y=t+i.y*r+i.offsetY,this},ye.transform=function(e){return e.Ga(this),this};function wr(e,t){return t.Cd(e),e}function rr(e,t,n,r,i,o){var a=i-n,p=o-r,w=a*a+p*p;n-=e,r-=t;var O=-n*a-r*p;return 0>=O||O>=w?(a=i-e,p=o-t,Math.min(n*n+r*r,a*a+p*p)):(e=a*r-p*n,e*e/w)}function Ir(e,t,n,r){return e=n-e,t=r-t,e*e+t*t}function Nr(e,t,n,r){return e=n-e,t=r-t,e===0?0t?270:0:t===0?0e?r=0>t?r+180:180-r:0>t&&(r=360-r),r)}ye.w=function(){return isFinite(this.x)&&isFinite(this.y)},Ue.alloc=function(){var e=$r.pop();return e===void 0?new Ue:e},Ue.allocAt=function(e,t){var n=$r.pop();return n===void 0?new Ue(e,t):(n.x=e,n.y=t,n)},Ue.free=function(e){$r.push(e)},Ue.prototype.isReal=Ue.prototype.w,Ue.prototype.setSpot=Ue.prototype.yi,Ue.prototype.setRectSpot=Ue.prototype.xi,Ue.prototype.snapToGridPoint=Ue.prototype.vA,Ue.prototype.snapToGrid=Ue.prototype.uA,Ue.prototype.projectOntoLineSegmentPoint=Ue.prototype.gA,Ue.prototype.projectOntoLineSegment=Ue.prototype.fA,Ue.intersectingLineSegments=function(e,t,n,r,i,o,a,p){return vt.Rl(e,t,n,r,i,o,a,p)},Ue.prototype.compareWithLineSegmentPoint=Ue.prototype.Ry,Ue.compareWithLineSegment=function(e,t,n,r,i,o){return vt.Fl(e,t,n,r,i,o)},Ue.prototype.direction=Ue.prototype.direction,Ue.prototype.directionPoint=Ue.prototype.ab,Ue.prototype.normalize=Ue.prototype.normalize,Ue.prototype.distanceSquared=Ue.prototype.zd,Ue.prototype.distanceSquaredPoint=Ue.prototype.Bf,Ue.prototype.scale=Ue.prototype.scale,Ue.prototype.rotate=Ue.prototype.rotate,Ue.prototype.offset=Ue.prototype.offset,Ue.prototype.subtract=Ue.prototype.re,Ue.prototype.add=Ue.prototype.add,Ue.prototype.equalsApprox=Ue.prototype.Xa,Ue.prototype.equalTo=Ue.prototype.hi,Ue.prototype.equals=Ue.prototype.D,Ue.prototype.set=Ue.prototype.set,Ue.prototype.setTo=Ue.prototype.sg;var $r=[];Ue.className="Point",Ue.parse=Wr,Ue.stringify=Ri,Ue.distanceLineSegmentSquared=rr,Ue.distanceSquared=Ir,Ue.direction=Nr,Ue.Origin=kr=new Ue(0,0).ja(),Ue.InfiniteTopLeft=Br=new Ue(-1/0,-1/0).ja(),Ue.InfiniteBottomRight=ei=new Ue(1/0,1/0).ja(),Ue.SixPoint=ti=new Ue(6,6).ja(),Ue.NoPoint=Jr=new Ue(NaN,NaN).ja(),Ue.parse=Wr,Ue.stringify=Ri,Ue.distanceLineSegmentSquared=rr,Ue.distanceSquared=Ir,Ue.direction=Nr;function Yt(e,t){e===void 0?this.height=this.width=0:typeof e=="number"&&(0<=e||isNaN(e))&&typeof t=="number"&&(0<=t||isNaN(t))?(this.width=e,this.height=t):Lt("Invalid arguments to Size constructor: "+e+", "+t),this._isFrozen=!1}var Sr,fr,pi,Pi,Ai,Ji,To;Yt.prototype.assign=function(e){return this.width=e.width,this.height=e.height,this},Yt.prototype.h=function(e,t){return this.width=e,this.height=t,this},Yt.prototype.sg=function(e,t){return this.width=e,this.height=t,this},Yt.prototype.set=function(e){return this.width=e.width,this.height=e.height,this},Yt.prototype.copy=function(){var e=new Yt;return e.width=this.width,e.height=this.height,e},ye=Yt.prototype,ye.ja=function(){return this._isFrozen=!0,Object.freeze(this),this},ye.J=function(){return this._isFrozen||Object.isFrozen(this)?this:this.copy().freeze()},ye.freeze=function(){return this._isFrozen=!0,this},ye.ka=function(){return Object.isFrozen(this)&&Lt("cannot thaw constant: "+this),this._isFrozen=!1,this};function _o(e){if(typeof e=="string"){e=e.split(" ");for(var t=0,n=0;e[t]==="";)t++;var r=e[t++];r&&(n=parseFloat(r));for(var i=0;e[t]==="";)t++;return(r=e[t++])&&(i=parseFloat(r)),new Yt(n,i)}return new Yt}function bo(e){return e.width.toString()+" "+e.height.toString()}ye.toString=function(){return"Size("+this.width+","+this.height+")"},ye.D=function(e){return e instanceof Yt?this.width===e.width&&this.height===e.height:!1},ye.hi=function(e,t){return this.width===e&&this.height===t},ye.Xa=function(e){return vt.B(this.width,e.width)&&vt.B(this.height,e.height)},ye.Bc=function(e,t){return e=this.width+e,this.width=0<=e?e:0,t=this.height+t,this.height=0<=t?t:0,this},ye.w=function(){return isFinite(this.width)&&isFinite(this.height)},Yt.alloc=function(){var e=Vo.pop();return e===void 0?new Yt:e},Yt.free=function(e){Vo.push(e)},Yt.prototype.isReal=Yt.prototype.w,Yt.prototype.inflate=Yt.prototype.Bc,Yt.prototype.equalsApprox=Yt.prototype.Xa,Yt.prototype.equalTo=Yt.prototype.hi,Yt.prototype.equals=Yt.prototype.D,Yt.prototype.set=Yt.prototype.set,Yt.prototype.setTo=Yt.prototype.sg;var Vo=[];Yt.className="Size",Yt.parse=_o,Yt.stringify=bo,Yt.ZeroSize=Sr=new Yt(0,0).ja(),Yt.OneSize=fr=new Yt(1,1).ja(),Yt.SixSize=pi=new Yt(6,6).ja(),Yt.EightSize=Pi=new Yt(8,8).ja(),Yt.TenSize=Ai=new Yt(10,10).ja(),Yt.InfiniteSize=Ji=new Yt(1/0,1/0).ja(),Yt.NoSize=To=new Yt(NaN,NaN).ja(),Yt.parse=_o,Yt.stringify=bo;function Nt(e,t,n,r){e===void 0?this.height=this.width=this.y=this.x=0:typeof e=="number"&&typeof t=="number"&&typeof n=="number"&&(0<=n||isNaN(n))&&typeof r=="number"&&(0<=r||isNaN(r))?(this.x=e,this.y=t,this.width=n,this.height=r):e instanceof Ue?(n=e.x,e=e.y,t instanceof Ue?(r=t.x,t=t.y,this.x=Math.min(n,r),this.y=Math.min(e,t),this.width=Math.abs(n-r),this.height=Math.abs(e-t)):t instanceof Yt?(this.x=n,this.y=e,this.width=t.width,this.height=t.height):Lt("Incorrect second argument supplied to Rect constructor "+t)):Lt("Invalid arguments to Rect constructor: "+e+", "+t+", "+n+", "+r),this._isFrozen=!1}ye=Nt.prototype,ye.assign=function(e){return this.x=e.x,this.y=e.y,this.width=e.width,this.height=e.height,this},ye.h=function(e,t,n,r){return this.x=e,this.y=t,this.width=n,this.height=r,this};function no(e,t,n){e.width=t,e.height=n}ye.sg=function(e,t,n,r){return this.x=e,this.y=t,this.width=n,this.height=r,this},ye.set=function(e){return this.x=e.x,this.y=e.y,this.width=e.width,this.height=e.height,this},ye.dd=function(e){return this.x=e.x,this.y=e.y,this},ye.tA=function(e){return this.width=e.width,this.height=e.height,this},Nt.prototype.copy=function(){var e=new Nt;return e.x=this.x,e.y=this.y,e.width=this.width,e.height=this.height,e},ye=Nt.prototype,ye.ja=function(){return this._isFrozen=!0,Object.freeze(this),this},ye.J=function(){return this._isFrozen||Object.isFrozen(this)?this:this.copy().freeze()},ye.freeze=function(){return this._isFrozen=!0,this},ye.ka=function(){return Object.isFrozen(this)&&Lt("cannot thaw constant: "+this),this._isFrozen=!1,this};function Fo(e){if(typeof e=="string"){e=e.split(" ");for(var t=0,n=0;e[t]==="";)t++;var r=e[t++];r&&(n=parseFloat(r));for(var i=0;e[t]==="";)t++;(r=e[t++])&&(i=parseFloat(r));for(var o=0;e[t]==="";)t++;(r=e[t++])&&(o=parseFloat(r));for(var a=0;e[t]==="";)t++;return(r=e[t++])&&(a=parseFloat(r)),new Nt(n,i,o,a)}return new Nt}function Xo(e){return e.x.toString()+" "+e.y.toString()+" "+e.width.toString()+" "+e.height.toString()}ye.toString=function(){return"Rect("+this.x+","+this.y+","+this.width+","+this.height+")"},ye.D=function(e){return e instanceof Nt?this.x===e.x&&this.y===e.y&&this.width===e.width&&this.height===e.height:!1},ye.hi=function(e,t,n,r){return this.x===e&&this.y===t&&this.width===n&&this.height===r},ye.Xa=function(e){return vt.B(this.x,e.x)&&vt.B(this.y,e.y)&&vt.B(this.width,e.width)&&vt.B(this.height,e.height)};function ho(e,t){return vt.$(e.x,t.x)&&vt.$(e.y,t.y)&&vt.$(e.width,t.width)&&vt.$(e.height,t.height)}ye.ca=function(e){return this.x<=e.x&&this.x+this.width>=e.x&&this.y<=e.y&&this.y+this.height>=e.y},ye.Re=function(e){return this.x<=e.x&&e.x+e.width<=this.x+this.width&&this.y<=e.y&&e.y+e.height<=this.y+this.height},ye.contains=function(e,t,n,r){return n===void 0&&(n=0),r===void 0&&(r=0),this.x<=e&&e+n<=this.x+this.width&&this.y<=t&&t+r<=this.y+this.height},ye.offset=function(e,t){return this.x+=e,this.y+=t,this},ye.Bc=function(e,t){return Zo(this,t,e,t,e)},ye.Co=function(e){return Zo(this,e.top,e.right,e.bottom,e.left)},ye.Fv=function(e){return Zo(this,-e.top,-e.right,-e.bottom,-e.left)},ye.Hz=function(e,t,n,r){return Zo(this,e,t,n,r)};function Zo(e,t,n,r,i){var o=e.width;return n+i<=-o?(e.x+=o/2,e.width=0):(e.x-=i,e.width+=n+i),n=e.height,t+r<=-n?(e.y+=n/2,e.height=0):(e.y-=t,e.height+=t+r),e}ye.Ex=function(e){return ko(this,e.x,e.y,e.width,e.height)},ye.Uu=function(e,t,n,r){return ko(this,e,t,n,r)};function ko(e,t,n,r,i){var o=Math.max(e.x,t),a=Math.max(e.y,n);return t=Math.min(e.x+e.width,t+r),n=Math.min(e.y+e.height,n+i),e.x=o,e.y=a,e.width=Math.max(0,t-o),e.height=Math.max(0,n-a),e}ye.Yc=function(e){return this.Vu(e.x,e.y,e.width,e.height)},ye.Vu=function(e,t,n,r){var i=this.width,o=this.x;return i!==1/0&&n!==1/0&&(i+=o,n+=e,isNaN(n)||isNaN(i)||o>n||e>i)?!1:(e=this.height,n=this.y,!(e!==1/0&&r!==1/0&&(e+=n,r+=t,isNaN(r)||isNaN(e)||n>r||t>e)))};function hs(e,t){var n=e.width,r=e.x,i=t.x-10;return r>t.width+10+10+i||i>n+r?!1:(n=e.height,e=e.y,r=t.y-10,!(e>t.height+10+10+r||r>n+e))}ye.Ye=function(e){return fi(this,e.x,e.y,0,0)},ye.ed=function(e){return fi(this,e.x,e.y,e.width,e.height)},ye.Kv=function(e,t,n,r){return n===void 0&&(n=0),r===void 0&&(r=0),fi(this,e,t,n,r)};function fi(e,t,n,r,i){var o=Math.min(e.x,t),a=Math.min(e.y,n);return t=Math.max(e.x+e.width,t+r),n=Math.max(e.y+e.height,n+i),e.x=o,e.y=a,e.width=t-o,e.height=n-a,e}ye.yi=function(e,t,n){return this.x=e-n.offsetX-n.x*this.width,this.y=t-n.offsetY-n.y*this.height,this};function $i(e,t,n,r,i,o,a,p){return a===void 0&&(a=0),p===void 0&&(p=0),e<=i&&i+a<=e+n&&t<=o&&o+p<=t+r}function Rr(e,t,n,r,i,o,a,p){return e>a+i||i>n+e?!1:!(t>p+o||o>r+t)}ye.w=function(){return isFinite(this.x)&&isFinite(this.y)&&isFinite(this.width)&&isFinite(this.height)},ye.Mz=function(){return this.width===0&&this.height===0},Nt.alloc=function(){var e=ji.pop();return e===void 0?new Nt:e},Nt.allocAt=function(e,t,n,r){var i=ji.pop();return i===void 0?new Nt(e,t,n,r):i.h(e,t,n,r)},Nt.free=function(e){ji.push(e)},kn.Object.defineProperties(Nt.prototype,{left:{get:function(){return this.x},set:function(e){this.x=e}},top:{get:function(){return this.y},set:function(e){this.y=e}},right:{get:function(){return this.x+this.width},set:function(e){this.x+=e-(this.x+this.width)}},bottom:{get:function(){return this.y+this.height},set:function(e){this.y+=e-(this.y+this.height)}},position:{get:function(){return new Ue(this.x,this.y)},set:function(e){this.x=e.x,this.y=e.y}},size:{get:function(){return new Yt(this.width,this.height)},set:function(e){this.width=e.width,this.height=e.height}},center:{get:function(){return new Ue(this.x+this.width/2,this.y+this.height/2)},set:function(e){this.x=e.x-this.width/2,this.y=e.y-this.height/2}},centerX:{get:function(){return this.x+this.width/2},set:function(e){this.x=e-this.width/2}},centerY:{get:function(){return this.y+this.height/2},set:function(e){this.y=e-this.height/2}}}),Nt.prototype.isEmpty=Nt.prototype.Mz,Nt.prototype.isReal=Nt.prototype.w,Nt.intersectsLineSegment=function(e,t,n,r,i,o,a,p){return vt.Fx(e,t,n,r,i,o,a,p)},Nt.prototype.setSpot=Nt.prototype.yi,Nt.prototype.union=Nt.prototype.Kv,Nt.prototype.unionRect=Nt.prototype.ed,Nt.prototype.unionPoint=Nt.prototype.Ye,Nt.prototype.intersects=Nt.prototype.Vu,Nt.prototype.intersectsRect=Nt.prototype.Yc,Nt.prototype.intersect=Nt.prototype.Uu,Nt.prototype.intersectRect=Nt.prototype.Ex,Nt.prototype.grow=Nt.prototype.Hz,Nt.prototype.subtractMargin=Nt.prototype.Fv,Nt.prototype.addMargin=Nt.prototype.Co,Nt.prototype.inflate=Nt.prototype.Bc,Nt.prototype.offset=Nt.prototype.offset,Nt.prototype.contains=Nt.prototype.contains,Nt.prototype.containsRect=Nt.prototype.Re,Nt.prototype.containsPoint=Nt.prototype.ca,Nt.prototype.equalsApprox=Nt.prototype.Xa,Nt.prototype.equalTo=Nt.prototype.hi,Nt.prototype.equals=Nt.prototype.D,Nt.prototype.setSize=Nt.prototype.tA,Nt.prototype.setPoint=Nt.prototype.dd,Nt.prototype.set=Nt.prototype.set,Nt.prototype.setTo=Nt.prototype.sg;var Yr=null,ui=null,ji=[];Nt.className="Rect",Nt.parse=Fo,Nt.stringify=Xo,Nt.contains=$i,Nt.intersects=Rr,Nt.ZeroRect=Yr=new Nt(0,0,0,0).ja(),Nt.NoRect=ui=new Nt(NaN,NaN,NaN,NaN).ja(),Nt.parse=Fo,Nt.stringify=Xo,Nt.contains=$i,Nt.intersects=Rr;function Wn(e,t,n,r){e===void 0?this.left=this.bottom=this.right=this.top=0:t===void 0?this.left=this.bottom=this.right=this.top=e:n===void 0?(this.top=e,this.right=t,this.bottom=e,this.left=t):r!==void 0?(this.top=e,this.right=t,this.bottom=n,this.left=r):Lt("Invalid arguments to Margin constructor: "+e+", "+t+", "+n+", "+r),this._isFrozen=!1}Wn.prototype.assign=function(e){return this.top=e.top,this.right=e.right,this.bottom=e.bottom,this.left=e.left,this},Wn.prototype.sg=function(e,t,n,r){return this.top=e,this.right=t,this.bottom=n,this.left=r,this},Wn.prototype.set=function(e){return this.top=e.top,this.right=e.right,this.bottom=e.bottom,this.left=e.left,this},Wn.prototype.copy=function(){var e=new Wn;return e.top=this.top,e.right=this.right,e.bottom=this.bottom,e.left=this.left,e},ye=Wn.prototype,ye.ja=function(){return this._isFrozen=!0,Object.freeze(this),this},ye.J=function(){return this._isFrozen||Object.isFrozen(this)?this:this.copy().freeze()},ye.freeze=function(){return this._isFrozen=!0,this},ye.ka=function(){return Object.isFrozen(this)&&Lt("cannot thaw constant: "+this),this._isFrozen=!1,this};function mo(e){if(typeof e=="string"){e=e.split(" ");for(var t=0,n=NaN;e[t]==="";)t++;var r=e[t++];if(r&&(n=parseFloat(r)),isNaN(n))return new Wn;for(var i=NaN;e[t]==="";)t++;if((r=e[t++])&&(i=parseFloat(r)),isNaN(i))return new Wn(n);for(var o=NaN;e[t]==="";)t++;if((r=e[t++])&&(o=parseFloat(r)),isNaN(o))return new Wn(n,i);for(var a=NaN;e[t]==="";)t++;return(r=e[t++])&&(a=parseFloat(r)),isNaN(a)?new Wn(n,i):new Wn(n,i,o,a)}return new Wn}function ao(e){return e.top.toString()+" "+e.right.toString()+" "+e.bottom.toString()+" "+e.left.toString()}ye.toString=function(){return"Margin("+this.top+","+this.right+","+this.bottom+","+this.left+")"},ye.D=function(e){return e instanceof Wn?this.top===e.top&&this.right===e.right&&this.bottom===e.bottom&&this.left===e.left:!1},ye.hi=function(e,t,n,r){return this.top===e&&this.right===t&&this.bottom===n&&this.left===r},ye.Xa=function(e){return vt.B(this.top,e.top)&&vt.B(this.right,e.right)&&vt.B(this.bottom,e.bottom)&&vt.B(this.left,e.left)},ye.w=function(){return isFinite(this.top)&&isFinite(this.right)&&isFinite(this.bottom)&&isFinite(this.left)},Wn.alloc=function(){var e=fs.pop();return e===void 0?new Wn:e},Wn.free=function(e){fs.push(e)},Wn.prototype.isReal=Wn.prototype.w,Wn.prototype.equalsApprox=Wn.prototype.Xa,Wn.prototype.equalTo=Wn.prototype.hi,Wn.prototype.equals=Wn.prototype.D,Wn.prototype.set=Wn.prototype.set,Wn.prototype.setTo=Wn.prototype.sg;var fo=null,ns=null,fs=[];Wn.className="Margin",Wn.parse=mo,Wn.stringify=ao,Wn.ZeroMargin=fo=new Wn(0,0,0,0).ja(),Wn.TwoMargin=ns=new Wn(2,2,2,2).ja(),Wn.parse=mo,Wn.stringify=ao;function Nn(e,t,n,r){e===void 0?this.offsetY=this.offsetX=this.y=this.x=0:(t===void 0&&(t=0),n===void 0&&(n=0),r===void 0&&(r=0),this.x=e,this.y=t,this.offsetX=n,this.offsetY=r),this._isFrozen=!1}var So,No,Es,go,bs,jr,Zs,Jo,Qo,ks,Ma,tl,rs,Bo,ou,Eu,su,Al,Js,Ns,Da,nl,Pu,Fu,tc,is,Uc,yc,Bu,kl,Vs,Ks,ws,js,ju,ba;Nn.prototype.assign=function(e){return this.x=e.x,this.y=e.y,this.offsetX=e.offsetX,this.offsetY=e.offsetY,this},Nn.prototype.sg=function(e,t,n,r){return this.x=e,this.y=t,this.offsetX=n,this.offsetY=r,this},Nn.prototype.set=function(e){return this.x=e.x,this.y=e.y,this.offsetX=e.offsetX,this.offsetY=e.offsetY,this},Nn.prototype.copy=function(){var e=new Nn;return e.x=this.x,e.y=this.y,e.offsetX=this.offsetX,e.offsetY=this.offsetY,e},ye=Nn.prototype,ye.ja=function(){return this._isFrozen=!0,Object.freeze(this),this},ye.J=function(){return this._isFrozen||Object.isFrozen(this)?this:this.copy().freeze()},ye.freeze=function(){return this._isFrozen=!0,this},ye.ka=function(){return Object.isFrozen(this)&&Lt("cannot thaw constant: "+this),this._isFrozen=!1,this};function os(e,t){return e.x=NaN,e.y=NaN,e.offsetX=t,e}function Uu(e){if(typeof e=="string"){if(e=e.trim(),e==="None")return So;if(e==="TopLeft")return No;if(e==="Top"||e==="TopCenter"||e==="MiddleTop")return Es;if(e==="TopRight")return go;if(e==="Left"||e==="LeftCenter"||e==="MiddleLeft")return bs;if(e==="Center")return jr;if(e==="Right"||e==="RightCenter"||e==="MiddleRight")return Zs;if(e==="BottomLeft")return Jo;if(e==="Bottom"||e==="BottomCenter"||e==="MiddleBottom")return Qo;if(e==="BottomRight")return ks;if(e==="TopSide")return Ma;if(e==="LeftSide")return tl;if(e==="RightSide")return rs;if(e==="BottomSide")return Bo;if(e==="TopBottomSides")return ou;if(e==="LeftRightSides")return Eu;if(e==="TopLeftSides")return su;if(e==="TopRightSides")return Al;if(e==="BottomLeftSides")return Js;if(e==="BottomRightSides")return Ns;if(e==="NotTopSide")return Da;if(e==="NotLeftSide")return nl;if(e==="NotRightSide")return Pu;if(e==="NotBottomSide")return Fu;if(e==="AllSides")return tc;if(e==="Default")return is;e=e.split(" ");for(var t=0,n=0;e[t]==="";)t++;var r=e[t++];r!==void 0&&0e&&(e+=360),e===0)return this;if(this.translate(t,n),e===90){e=0;var r=1}else e===180?(e=-1,r=0):e===270?(e=0,r=-1):(r=e*Math.PI/180,e=Math.cos(r),r=Math.sin(r));var i=this.m12*e+this.m22*r,o=this.m11*-r+this.m21*e,a=this.m12*-r+this.m22*e;return this.m11=this.m11*e+this.m21*r,this.m12=i,this.m21=o,this.m22=a,this.translate(-t,-n),this},ye=dr.prototype,ye.translate=function(e,t){return this.dx+=this.m11*e+this.m21*t,this.dy+=this.m12*e+this.m22*t,this},ye.scale=function(e,t){return t===void 0&&(t=e),this.m11*=e,this.m12*=e,this.m21*=t,this.m22*=t,this},ye.Ga=function(e){var t=e.x,n=e.y;return e.h(t*this.m11+n*this.m21+this.dx,t*this.m12+n*this.m22+this.dy)},ye.Cd=function(e){var t=1/(this.m11*this.m22-this.m12*this.m21),n=e.x,r=e.y;return e.h(n*this.m22*t+r*-this.m21*t+t*(this.m21*this.dy-this.m22*this.dx),n*-this.m12*t+r*this.m11*t+t*(this.m12*this.dx-this.m11*this.dy))},ye.Eu=function(e){var t=1/(this.m11*this.m22-this.m12*this.m21),n=1.25*e.x,r=1.2*e.y;return e.h(n*this.m22*t+r*-this.m21*t+t*(this.m21*this.dy-this.m22*this.dx),n*-this.m12*t+r*this.m11*t+t*(this.m12*this.dx-this.m11*this.dy))},ye.pp=function(e){var t=e.x,n=e.y,r=t+e.width,i=n+e.height,o=this.m11,a=this.m12,p=this.m21,w=this.m22,O=this.dx,D=this.dy,X=t*o+n*p+O,re=t*a+n*w+D,de=r*o+n*p+O,Se=r*a+n*w+D;return n=t*o+i*p+O,t=t*a+i*w+D,o=r*o+i*p+O,r=r*a+i*w+D,i=Math.min(X,de),X=Math.max(X,de),de=Math.min(re,Se),re=Math.max(re,Se),i=Math.min(i,n),X=Math.max(X,n),de=Math.min(de,t),re=Math.max(re,t),i=Math.min(i,o),X=Math.max(X,o),de=Math.min(de,r),re=Math.max(re,r),e.h(i,de,X-i,re-de),e},dr.alloc=function(){var e=nc.pop();return e===void 0?new dr:e},dr.free=function(e){nc.push(e)},dr.prototype.transformRect=dr.prototype.pp,dr.prototype.transformPoint=dr.prototype.Ga,dr.prototype.scale=dr.prototype.scale,dr.prototype.translate=dr.prototype.translate,dr.prototype.rotate=dr.prototype.rotate,dr.prototype.invert=dr.prototype.Vj,dr.prototype.multiplyInverted=dr.prototype.bv,dr.prototype.multiply=dr.prototype.multiply,dr.prototype.reset=dr.prototype.reset,dr.prototype.isIdentity=dr.prototype.ws,dr.prototype.equals=dr.prototype.D,dr.prototype.setTransform=dr.prototype.setTransform,dr.prototype.set=dr.prototype.set;var nc=[];dr.className="Transform",dr.xF="54a702f3e53909c447824c6706603faf4c";var vt={AA:"7da71ca0ad381e90",wg:(Math.sqrt(2)-1)/3*4,Uv:null,sqrt:function(e){if(0>=e)return 0;var t=vt.Uv;if(t===null){t=[];for(var n=0;2e3>=n;n++)t[n]=Math.sqrt(n);vt.Uv=t}return 1>e?(n=1/e,2e3>=n?1/t[n|0]:Math.sqrt(e)):2e3>=e?t[e|0]:Math.sqrt(e)},B:function(e,t){return e-=t,.5>e&&-.5e&&-5e-8=i&&(i=1e-6),eD-O)if(e-n>i||n-e>i){if(o=(r-t)/(n-e)*(o-e)+t,o-i<=a&&a<=o+i)return!0}else return!0;else if(t-r>i||r-t>i){if(a=(n-e)/(r-t)*(a-t)+e,a-i<=o&&o<=a+i)return!0}else return!0;return!1},cs:function(e,t,n,r,i,o,a,p,w,O,D,X){if(vt.Yb(e,t,a,p,X,n,r)&&vt.Yb(e,t,a,p,X,i,o))return vt.Yb(e,t,a,p,X,O,D);var re=(e+n)/2,de=(t+r)/2,Se=(n+i)/2,Te=(r+o)/2;i=(i+a)/2,o=(o+p)/2,r=(re+Se)/2,n=(de+Te)/2,Se=(Se+i)/2,Te=(Te+o)/2;var Xe=(r+Se)/2,We=(n+Te)/2;return vt.cs(e,t,re,de,r,n,Xe,We,w,O,D,X)||vt.cs(Xe,We,Se,Te,i,o,a,p,w,O,D,X)},ax:function(e,t,n,r,i,o,a,p,w){var O=(n+i)/2,D=(r+o)/2;return w.h((((e+n)/2+O)/2+(O+(i+a)/2)/2)/2,(((t+r)/2+D)/2+(D+(o+p)/2)/2)/2),w},My:function(e,t,n,r,i,o,a,p){var w=(n+i)/2,O=(r+o)/2;return Nr(((e+n)/2+w)/2,((t+r)/2+O)/2,(w+(i+a)/2)/2,(O+(o+p)/2)/2)},Dl:function(e,t,n,r,i,o,a,p,w,O){if(vt.Yb(e,t,a,p,w,n,r)&&vt.Yb(e,t,a,p,w,i,o))fi(O,e,t,0,0),fi(O,a,p,0,0);else{var D=(e+n)/2,X=(t+r)/2,re=(n+i)/2,de=(r+o)/2;i=(i+a)/2,o=(o+p)/2,r=(D+re)/2,n=(X+de)/2,re=(re+i)/2,de=(de+o)/2;var Se=(r+re)/2,Te=(n+de)/2;vt.Dl(e,t,D,X,r,n,Se,Te,w,O),vt.Dl(Se,Te,re,de,i,o,a,p,w,O)}return O},Qe:function(e,t,n,r,i,o,a,p,w,O){if(vt.Yb(e,t,a,p,w,n,r)&&vt.Yb(e,t,a,p,w,i,o))O.length===0&&(O.push(e),O.push(t)),O.push(a),O.push(p);else{var D=(e+n)/2,X=(t+r)/2,re=(n+i)/2,de=(r+o)/2;i=(i+a)/2,o=(o+p)/2,r=(D+re)/2,n=(X+de)/2,re=(re+i)/2,de=(de+o)/2;var Se=(r+re)/2,Te=(n+de)/2;vt.Qe(e,t,D,X,r,n,Se,Te,w,O),vt.Qe(Se,Te,re,de,i,o,a,p,w,O)}return O},jv:function(e,t,n,r,i,o,a,p,w,O){if(vt.Yb(e,t,i,o,O,n,r))return vt.Yb(e,t,i,o,O,p,w);var D=(e+n)/2,X=(t+r)/2;n=(n+i)/2,r=(r+o)/2;var re=(D+n)/2,de=(X+r)/2;return vt.jv(e,t,D,X,re,de,a,p,w,O)||vt.jv(re,de,n,r,i,o,a,p,w,O)},OA:function(e,t,n,r,i,o,a){return a.h(((e+n)/2+(n+i)/2)/2,((t+r)/2+(r+o)/2)/2),a},iv:function(e,t,n,r,i,o,a,p){if(vt.Yb(e,t,i,o,a,n,r))fi(p,e,t,0,0),fi(p,i,o,0,0);else{var w=(e+n)/2,O=(t+r)/2;n=(n+i)/2,r=(r+o)/2;var D=(w+n)/2,X=(O+r)/2;vt.iv(e,t,w,O,D,X,a,p),vt.iv(D,X,n,r,i,o,a,p)}return p},ep:function(e,t,n,r,i,o,a,p){if(vt.Yb(e,t,i,o,a,n,r))p.length===0&&(p.push(e),p.push(t)),p.push(i),p.push(o);else{var w=(e+n)/2,O=(t+r)/2;n=(n+i)/2,r=(r+o)/2;var D=(w+n)/2,X=(O+r)/2;vt.ep(e,t,w,O,D,X,a,p),vt.ep(D,X,n,r,i,o,a,p)}return p},Eo:function(e,t,n,r,i,o,a,p,w,O,D,X,re,de){if(vt.Yb(e,t,a,p,re,n,r)&&vt.Yb(e,t,a,p,re,i,o))return!vt.Rl(e,t,a,p,w,O,D,X)||(re=(e-a)*(O-X)-(t-p)*(w-D),re===0)?!1:(de.h(((e*p-t*a)*(w-D)-(e-a)*(w*X-O*D))/re,((e*p-t*a)*(O-X)-(t-p)*(w*X-O*D))/re),!0);var Se=(e+n)/2,Te=(t+r)/2,Xe=(n+i)/2,We=(r+o)/2;i=(i+a)/2,o=(o+p)/2,r=(Se+Xe)/2,n=(Te+We)/2,Xe=(Xe+i)/2,We=(We+o)/2;var qe=(r+Xe)/2,tt=(n+We)/2,rt=1/0,ft=!1,Tt=0,Sn=0;return vt.Eo(e,t,Se,Te,r,n,qe,tt,w,O,D,X,re,de)&&(e=(de.x-w)*(de.x-w)+(de.y-O)*(de.y-O),e=D)return de;if((w>D?w-D:D-w)<(O>X?O-X:X-O)){if(te)return de}else if(ee)return de;0re&&de--}else{Se=(e+n)/2,Te=(t+r)/2;var Xe=(n+i)/2,We=(r+o)/2;i=(i+a)/2,o=(o+p)/2,r=(Se+Xe)/2,n=(Te+We)/2,Xe=(Xe+i)/2,We=(We+o)/2;var qe=(r+Xe)/2,tt=(n+We)/2;de+=vt.Fo(e,t,Se,Te,r,n,qe,tt,w,O,D,X,re),de+=vt.Fo(qe,tt,Xe,We,i,o,a,p,w,O,D,X,re)}return de},qh:function(e,t,n,r,i,o,a){return vt.$(e,n)?(tt?(a.h(e,t),!1):(a.h(e,o),!0)):vt.$(t,r)?(ee?(a.h(e,t),!1):(a.h(i,t),!0)):(i=((e-i)*(e-n)+(t-o)*(t-r))/((n-e)*(n-e)+(r-t)*(r-t)),-5e-6>i?(a.h(e,t),!1):1.000005t?(w.h(e,t),!1):(w.h(e,n),!0)):(a=(r-t)/(n-e),vt.$(p,a)?(vt.qh(e,t,n,r,i,o,w),!1):(i=(a*e-p*i+o-t)/(a-p),vt.$(a,0)?(ee?(w.h(e,t),!1):(w.h(i,t),!0)):vt.qh(e,t,n,r,i,a*(i-e)+t,w))))},MA:function(e,t,n,r,i){return vt.Ve(n.x,n.y,r.x,r.y,e.x,e.y,t.x,t.y,i)},KA:function(e,t,n,r,i,o,a,p,w,O){function D(Xe,We){var qe=(Xe-e)*(Xe-e)+(We-t)*(We-t);qe(n>e?n-e:e-n)){if(re=1-(n-i)*(n-i)/(re*re),0>re)return w;re=Math.sqrt(re),r=-O*re+o,D(n,O*re+o),D(n,r)}else{if(n=(r-t)/(n-e),r=1/(re*re)+n*n/(O*O),p=2*n*(t-n*e)/(O*O)-2*n*o/(O*O)-2*i/(re*re),re=p*p-4*r*(2*n*e*o/(O*O)-2*t*o/(O*O)+o*o/(O*O)+i*i/(re*re)-1+(t-n*e)*(t-n*e)/(O*O)),0>re)return w;re=Math.sqrt(re),O=(-p+re)/(2*r),D(O,n*O-n*e+t),re=(-p-re)/(2*r),D(re,n*re-n*e+t)}return w},Ff:function(e,t,n,r,i,o,a,p,w){var O=1e21,D=e,X=t;if(vt.Ve(e,t,e,r,i,o,a,p,w)){var re=(w.x-i)*(w.x-i)+(w.y-o)*(w.y-o);reO},us:function(e,t,n){return vt.Fx(e.x,e.y,e.width,e.height,t.x,t.y,n.x,n.y)},Fx:function(e,t,n,r,i,o,a,p){var w=e+n,O=t+r;return i===a?(o=t):o===p?(i=e):!!($i(e,t,n,r,i,o)||$i(e,t,n,r,a,p)||vt.Rl(e,t,w,t,i,o,a,p)||vt.Rl(w,t,w,O,i,o,a,p)||vt.Rl(w,O,e,O,i,o,a,p)||vt.Rl(e,O,e,t,i,o,a,p))},Rl:function(e,t,n,r,i,o,a,p){return e===n&&t===r&&i===a&&o===p?e===i&&t===o:0>=vt.Fl(e,t,n,r,i,o)*vt.Fl(e,t,n,r,a,p)&&0>=vt.Fl(i,o,a,p,e,t)*vt.Fl(i,o,a,p,n,r)},Fl:function(e,t,n,r,i,o){return n-=e,r-=t,e=i-e,t=o-t,o=e*r-t*n,o===0&&(o=e*n+t*r,0o&&(o=0))),o},bp:function(e){return 0>e&&(e+=360),360<=e&&(e-=360),e},jx:function(e,t,n,r,i,o){var a=Math.PI;o||(r*=a/180,i*=a/180);var p=r>i?-1:1;o=[];var w=a/2,O=r;if(r=Math.min(2*a,Math.abs(i-r)),1e-5>r)return w=O+p*Math.min(r,w),p=e+n*Math.cos(O),O=t+n*Math.sin(O),e+=n*Math.cos(w),t+=n*Math.sin(w),n=(p+e)/2,w=(O+t)/2,o.push([p,O,n,w,n,w,e,t]),o;for(;1e-5n,o=0>r;if(eO&&(t=.5*(p+w),!(t===p||t===w));++O){var D=e/(t+i),X=a/(t+o);if(D=D*D+X*X-1,0D)w=t;else break}n=i*n/(t+i)-n,r=o*r/(t+o)-r,n=Math.sqrt(n*n+r*r)}else n=Math.abs(r-t);else r=e*e-t*t,o=e*n,oe?"M"+this.startX.toString()+" "+this.startY.toString()+"L"+this.endX.toString()+" "+this.endY.toString():"M"+this.startX.toFixed(e)+" "+this.startY.toFixed(e)+"L"+this.endX.toFixed(e)+" "+this.endY.toFixed(e);case un.u:var t=new Nt(this.startX,this.startY,0,0);return t.Kv(this.endX,this.endY,0,0),0>e?"M"+t.x.toString()+" "+t.y.toString()+"H"+t.right.toString()+"V"+t.bottom.toString()+"H"+t.left.toString()+"z":"M"+t.x.toFixed(e)+" "+t.y.toFixed(e)+"H"+t.right.toFixed(e)+"V"+t.bottom.toFixed(e)+"H"+t.left.toFixed(e)+"z";case un.F:if(t=new Nt(this.startX,this.startY,0,0),t.Kv(this.endX,this.endY,0,0),0>e)return e=t.left.toString()+" "+(t.y+t.height/2).toString(),"M"+e+"A"+(t.width/2).toString()+" "+(t.height/2).toString()+" 0 0 1 "+(t.right.toString()+" "+(t.y+t.height/2).toString())+"A"+(t.width/2).toString()+" "+(t.height/2).toString()+" 0 0 1 "+e;var n=t.left.toFixed(e)+" "+(t.y+t.height/2).toFixed(e);return"M"+n+"A"+(t.width/2).toFixed(e)+" "+(t.height/2).toFixed(e)+" 0 0 1 "+(t.right.toFixed(e)+" "+(t.y+t.height/2).toFixed(e))+"A"+(t.width/2).toFixed(e)+" "+(t.height/2).toFixed(e)+" 0 0 1 "+n;case un.o:t="",n=this.figures.s;for(var r=n.length,i=0;i=rt-1?!0:O[Te+1].match(ft)!==null}function r(){return Te++,O[Te]}function i(ar){var er=parseFloat(r()),si=parseFloat(r());Xe===Xe.toLowerCase()&&(er=tt.x+er,si=tt.y+si),ar.h(er,si)}function o(){return i(tt),tt}function a(){return i(qe),qe}function p(){var ar=We.toLowerCase();return ar!=="c"&&ar!=="s"&&ar!=="q"&&ar!=="t"?tt:new Ue(2*tt.x-qe.x,2*tt.y-qe.y)}t===void 0&&(t=!1);var w=/([UuBbMmZzLlHhVvCcSsQqTtAaFfXx])([UuBbMmZzLlHhVvCcSsQqTtAaFfXx])/gm;e=e.replace(/,/gm," "),e=e.replace(w,"$1 $2"),e=e.replace(w,"$1 $2"),e=e.replace(/([UuBbMmZzLlHhVvCcSsQqTtAaFfXx])([^s])/gm,"$1 $2"),e=e.replace(/([^s])([UuBbMmZzLlHhVvCcSsQqTtAaFfXx])/gm,"$1 $2"),e=e.replace(/([0-9])([+\-])/gm,"$1 $2"),e=e.replace(/[\s\r\t\n]+/gm," "),e=e.replace(/^\s+|\s+$/g,"");var O=e.split(" ");for(e=0;e=rt-1);)if(We=Xe,Xe=r(),Xe!=="")switch(Xe.toUpperCase()){case"X":de=!0,X=D=!1;break;case"M":for(Se=o(),e.mc===null||de===!0?(Ad(e,Se.x,Se.y,D,!X,re),de=!1):e.moveTo(Se.x,Se.y),w.assign(tt);!n();)Se=o(),e.lineTo(Se.x,Se.y);break;case"L":for(;!n();)Se=o(),e.lineTo(Se.x,Se.y);break;case"H":for(;!n();)tt=new Ue((Xe===Xe.toLowerCase()?tt.x:0)+parseFloat(r()),tt.y),e.lineTo(tt.x,tt.y);break;case"V":for(;!n();)tt=new Ue(tt.x,(Xe===Xe.toLowerCase()?tt.y:0)+parseFloat(r())),e.lineTo(tt.x,tt.y);break;case"C":for(;!n();){Se=new Ue,i(Se);var Tt=a(),Sn=o();Jc(e,Se.x,Se.y,Tt.x,Tt.y,Sn.x,Sn.y)}break;case"S":for(;!n();)Se=p(),Tt=a(),Sn=o(),Jc(e,Se.x,Se.y,Tt.x,Tt.y,Sn.x,Sn.y);break;case"Q":for(;!n();)Se=a(),Tt=o(),Qg(e,Se.x,Se.y,Tt.x,Tt.y);break;case"T":for(;!n();)qe=Se=p(),Tt=o(),Qg(e,Se.x,Se.y,Tt.x,Tt.y);break;case"B":for(;!n();){Se=parseFloat(r()),Tt=parseFloat(r()),Sn=parseFloat(r());var Rn=parseFloat(r()),_n=parseFloat(r()),ln=_n,Gt=!1;n()||(ln=parseFloat(r()),n()||(Gt=parseFloat(r())!==0)),Xe===Xe.toLowerCase()&&(Sn+=tt.x,Rn+=tt.y),e.arcTo(Se,Tt,Sn,Rn,_n,ln,Gt)}break;case"A":for(;!n();)Se=Math.abs(parseFloat(r())),Tt=Math.abs(parseFloat(r())),Sn=parseFloat(r()),_n=Rn=!1,Gt=ln=0,ln=r(),ln.length===1?(Rn=!!parseFloat(ln),_n=!!parseFloat(r()),ln=parseFloat(r())):ln.length===2?(Rn=!!parseFloat(ln[0]),_n=!!parseFloat(ln[1]),ln=parseFloat(r())):(Rn=!!parseFloat(ln[0]),_n=!!parseFloat(ln[1]),ln=parseFloat(ln.slice(2))),Gt=parseFloat(r()),Xe===Xe.toLowerCase()&&(ln=tt.x+ln,Gt=tt.y+Gt),tt.h(ln,Gt),j1(e,Se,Tt,Sn,Rn,_n,ln,Gt);break;case"Z":B1(e),tt.assign(w);break;case"F":for(Se="",Tt=1;O[Te+Tt];)if(O[Te+Tt]==="0")re=!0,Tt++;else if(O[Te+Tt].match(/[Uu]/)!==null)Tt++;else if(O[Te+Tt].match(ft)===null)Tt++;else{Se=O[Te+Tt];break}Se.match(/[Mm]/)?D=!0:0a&&(a+=360),Se.startAngle+=a),0>e&&(Se.startAngle=180-Se.startAngle,Se.sweepAngle=-Se.sweepAngle),0>r&&(Se.startAngle=-Se.startAngle,Se.sweepAngle=-Se.sweepAngle),Se.radiusX*=Math.sqrt(e*e+n*n),Se.radiusY!==void 0&&(Se.radiusY*=Math.sqrt(t*t+r*r));break;case ca:if(a=Se.endX,p=Se.endY,Se.endX=a*e+p*n+i,Se.endY=a*t+p*r+o,Se.radiusX===0||Se.radiusY===0)break;t!==0&&(a=180*Math.atan2(t,e)/Math.PI,0>a&&(a+=360),Se.xAxisRotation+=a),0>e&&(Se.xAxisRotation=180-Se.xAxisRotation,Se.isClockwiseArc=!Se.isClockwiseArc),0>r&&(Se.xAxisRotation=-Se.xAxisRotation,Se.isClockwiseArc=!Se.isClockwiseArc),Se.radiusX*=Math.sqrt(e*e+n*n),Se.radiusY*=Math.sqrt(t*t+r*r);break;default:Lt("Unknown Segment type: "+Se.type)}}}}return this._isInvalidBounds=!0,this},ye.ca=function(e,t){t===void 0&&(t=0);var n=this.od,r=this.pd,i=this.Dc,o=this.Ec;switch(this.type){case un.j:return vt.Yb(n,r,i,o,t,e.x,e.y);case un.u:var a=Nt.allocAt(Math.min(n,i)-t,Math.min(r,o)-t,Math.abs(i-n)+2*t,Math.abs(o-r)+2*t);return e=a.ca(e),Nt.free(a),e;case un.F:a=Math.min(n,i)-t;var p=Math.min(r,o)-t;return n=(Math.abs(i-n)+2*t)/2,t=(Math.abs(o-r)+2*t)/2,0>=n||0>=t?!1:(a=e.x-(a+n),p=e.y-(p+t),1>=a*a/(n*n)+p*p/(t*t));case un.o:return Nl(this,e,t,!0,!1);default:return!1}};function Nl(e,t,n,r,i){var o=t.x;t=t.y;for(var a=e.bounds.x-20,p=0,w,O,D,X,re=e.figures.s,de=re.length,Se=0;Se=e)return 0;if((i>a?i-a:a-i)<(o>p?o-p:p-o)){if(op)return 0}else if(to)return 0}else if(ia)return 0}else if(Oi)return 0;return 0e?e=0:1=o)return r=o-a,r=D===0?0:r/D,n=n[p],p=n[2*e],i=n[2*e+1],t.h(p+(n[2*e+2]-p)*r,i+(n[2*e+3]-i)*r),t;a+=D}}return t},ye.wx=function(e){if(0>e?e=0:1=i)return i=t[a],t=i[2*e],n=i[2*e+1],r=i[2*e+2],e=i[2*e+3],1>Math.abs(r-t)&&1>Math.abs(e-n)?0:1>Math.abs(r-t)?0<=e-n?90:270:1>Math.abs(e-n)?0<=r-t?0:180:180*Math.atan2(e-n,r-t)/Math.PI;o+=O}}return NaN},ye.Qu=function(e,t){if(0>e?e=0:1=o)return r=o-a,r=D===0?0:r/D,D=n[p],n=D[2*e],p=D[2*e+1],i=D[2*e+2],e=D[2*e+3],t[0]=n+(i-n)*r,t[1]=p+(e-p)*r,t[2]=1>Math.abs(i-n)&&1>Math.abs(e-p)?0:1>Math.abs(i-n)?0<=e-p?90:270:1>Math.abs(e-p)?0<=i-n?0:180:180*Math.atan2(e-p,i-n)/Math.PI,t;a+=D}}return t},ye.xx=function(e){if(this.type===un.j){var t=this.startX,n=this.startY,r=this.endX,i=this.endY;if(t!==r||n!==i){var o=e.x;if(e=e.y,t===r){if(n=r?r===n?0:1:Math.abs(e-n)/(r-a)}if(n===i)return t=r?r===t?0:1:Math.abs(o-t)/(r-a);a=(r-t)*(r-t)+(i-n)*(i-n);var p=Ue.alloc();return vt.qh(t,n,r,i,o,e,p),e=p.x,o=p.y,Ue.free(p),Math.sqrt(((e-t)*(e-t)+(o-n)*(o-n))/a)}}else if(this.type===un.u){a=this.startX,p=this.startY;var w=this.endX;if(i=this.endY,a!==w||p!==i){t=w-a,n=i-p,o=2*t+2*n,r=e.x,e=e.y,r=Math.min(Math.max(r,a),w),e=Math.min(Math.max(e,p),i),a=Math.abs(r-a),w=Math.abs(r-w),p=Math.abs(e-p),i=Math.abs(e-i);var O=Math.min(a,w,p,i);if(O===p)return r/o;if(O===w)return(t+e)/o;if(O===i)return(2*t+n-r)/o;if(O===a)return(2*t+2*n-e)/o}}else{t=this.flattenedSegments,n=this.flattenedLengths,o=this.flattenedTotalLength,r=Ue.alloc(),i=1/0,p=a=0,w=t.length;for(var D=O=0,X=0;Xe?0:1e?"M"+this.startX.toString()+" "+this.startY.toString():"M"+this.startX.toFixed(e)+" "+this.startY.toFixed(e),n=this.segments.s,r=n.length,i=0;ie&&(e+=360),this.Ne=e,this.Vh=0,this.Wh=Math.max(r,0),this.Pg=Math.max(i,0),typeof a=="boolean"?a&&(this.isLargeArc=!0):typeof a=="number"&&a&&(this.isLargeArc=!0),p&&(this.isClockwiseArc=!0)):(this.Ne=r,this.Vh=i,e===Oo&&(o=Math.max(o,0)),this.Wh=o,typeof a=="number"?(e===Oo&&(a=Math.max(a,0)),this.Pg=a):this.Pg=0),this.ae=null}zr.prototype.copy=function(){var e=new zr;return e.na=this.na,e.l=this.l&-2,e.Dc=this.Dc,e.Ec=this.Ec,e.Ne=this.Ne,e.Vh=this.Vh,e.Wh=this.Wh,e.Pg=this.Pg,e},ye=zr.prototype,ye.Xa=function(e){if(!(e instanceof zr)||this.type!==e.type||this.isClosed!==e.isClosed)return!1;switch(this.type){case Io:case Ci:return vt.B(this.endX,e.endX)&&vt.B(this.endY,e.endY);case ds:return vt.B(this.endX,e.endX)&&vt.B(this.endY,e.endY)&&vt.B(this.point1X,e.point1X)&&vt.B(this.point1Y,e.point1Y)&&vt.B(this.point2X,e.point2X)&&vt.B(this.point2Y,e.point2Y);case na:return vt.B(this.endX,e.endX)&&vt.B(this.endY,e.endY)&&vt.B(this.point1X,e.point1X)&&vt.B(this.point1Y,e.point1Y);case Oo:return vt.B(this.startAngle,e.startAngle)&&vt.B(this.sweepAngle,e.sweepAngle)&&vt.B(this.centerX,e.centerX)&&vt.B(this.centerY,e.centerY)&&vt.B(this.radiusX,e.radiusX)&&vt.B(this.radiusY,e.radiusY);case ca:return this.isClockwiseArc===e.isClockwiseArc&&this.isLargeArc===e.isLargeArc&&vt.B(this.xAxisRotation,e.xAxisRotation)&&vt.B(this.endX,e.endX)&&vt.B(this.endY,e.endY)&&vt.B(this.radiusX,e.radiusX)&&vt.B(this.radiusY,e.radiusY);default:return!1}},ye.qb=function(e){e.classType===zr&&(this.type=e)},ye.toString=function(e){switch(e===void 0&&(e=-1),this.type){case Io:e=0>e?"M"+this.endX.toString()+" "+this.endY.toString():"M"+this.endX.toFixed(e)+" "+this.endY.toFixed(e);break;case Ci:e=0>e?"L"+this.endX.toString()+" "+this.endY.toString():"L"+this.endX.toFixed(e)+" "+this.endY.toFixed(e);break;case ds:e=0>e?"C"+this.point1X.toString()+" "+this.point1Y.toString()+" "+this.point2X.toString()+" "+this.point2Y.toString()+" "+this.endX.toString()+" "+this.endY.toString():"C"+this.point1X.toFixed(e)+" "+this.point1Y.toFixed(e)+" "+this.point2X.toFixed(e)+" "+this.point2Y.toFixed(e)+" "+this.endX.toFixed(e)+" "+this.endY.toFixed(e);break;case na:e=0>e?"Q"+this.point1X.toString()+" "+this.point1Y.toString()+" "+this.endX.toString()+" "+this.endY.toString():"Q"+this.point1X.toFixed(e)+" "+this.point1Y.toFixed(e)+" "+this.endX.toFixed(e)+" "+this.endY.toFixed(e);break;case Oo:e=0>e?"B"+this.startAngle.toString()+" "+this.sweepAngle.toString()+" "+this.centerX.toString()+" "+this.centerY.toString()+" "+this.radiusX.toString()+" "+this.radiusY.toString():"B"+this.startAngle.toFixed(e)+" "+this.sweepAngle.toFixed(e)+" "+this.centerX.toFixed(e)+" "+this.centerY.toFixed(e)+" "+this.radiusX.toFixed(e)+" "+this.radiusY.toFixed(e);break;case ca:e=0>e?"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(e)+" "+this.radiusY.toFixed(e)+" "+this.xAxisRotation.toFixed(e)+" "+(this.isLargeArc?1:0)+" "+(this.isClockwiseArc?1:0)+" "+this.endX.toFixed(e)+" "+this.endY.toFixed(e);break;default:e=this.type.toString()}return e+(this.isClosed?"z":"")},ye.freeze=function(){return this._isFrozen=!0,this},ye.ka=function(){return this._isFrozen=!1,this},ye.close=function(){return this.isClosed=!0,this};function Ys(e,t){if(e.ae!==null&&t._isInvalidBounds===!1)return e.ae;var n=e.radiusX,r=e.radiusY;if(r===void 0&&(r=n),n===0||r===0)return e.ae=[],e.ae;t=e.Ne;var i=e.Vh,o=vt.jx(0,0,n=de?a=Math.PI:1<=de&&(a=0),!w&&0a&&(a+=2*Math.PI),w=t>o?1:t/o,de=t>o?o/t:1,t=vt.jx(0,0,t>o?t:o,D,D+a,!0),o=dr.alloc(),o.reset(),o.translate(n,r),o.rotate(e.Ne,0,0),o.scale(w,de),un.Ha(t,o),dr.free(o),e.ae=t,e.ae}kn.Object.defineProperties(zr.prototype,{_isFrozen:{get:function(){return(this.l&1)!==0},set:function(e){this.l=e?this.l|1:this.l&-2}},_isInvalidBounds:{get:function(){return(this.l&2)!==0},set:function(e){this.l=e?this.l|2:this.l&-3}},isClosed:{get:function(){return(this.l&8)!==0},set:function(e){this.isClosed!==e&&(this.l=e?this.l|8:this.l&-9,this._isInvalidBounds=!0)}},type:{get:function(){return this.na},set:function(e){this._isFrozen&&Yn(this,e),this.na=e,this._isInvalidBounds=!0}},endX:{get:function(){return this.Dc},set:function(e){this._isFrozen&&Yn(this,e),this.Dc=e,this._isInvalidBounds=!0}},endY:{get:function(){return this.Ec},set:function(e){this._isFrozen&&Yn(this,e),this.Ec=e,this._isInvalidBounds=!0}},point1X:{get:function(){return this.Ne},set:function(e){this._isFrozen&&Yn(this,e),this.Ne=e,this._isInvalidBounds=!0}},point1Y:{get:function(){return this.Vh},set:function(e){this._isFrozen&&Yn(this,e),this.Vh=e,this._isInvalidBounds=!0}},point2X:{get:function(){return this.Wh},set:function(e){this._isFrozen&&Yn(this,e),this.Wh=e,this._isInvalidBounds=!0}},point2Y:{get:function(){return this.Pg},set:function(e){this._isFrozen&&Yn(this,e),this.Pg=e,this._isInvalidBounds=!0}},centerX:{get:function(){return this.Ne},set:function(e){this._isFrozen&&Yn(this,e),this.Ne=e,this._isInvalidBounds=!0}},centerY:{get:function(){return this.Vh},set:function(e){this._isFrozen&&Yn(this,e),this.Vh=e,this._isInvalidBounds=!0}},radiusX:{get:function(){return this.Wh},set:function(e){0>e&&hr(e,">= zero",zr,"radiusX"),this._isFrozen&&Yn(this,e),this.Wh=e,this._isInvalidBounds=!0}},radiusY:{get:function(){return this.Pg},set:function(e){0>e&&hr(e,">= zero",zr,"radiusY"),this._isFrozen&&Yn(this,e),this.Pg=e,this._isInvalidBounds=!0}},startAngle:{get:function(){return this.Dc},set:function(e){this._isFrozen&&Yn(this,e),e%=360,0>e&&(e+=360),this.Dc=e,this._isInvalidBounds=!0}},sweepAngle:{get:function(){return this.Ec},set:function(e){this._isFrozen&&Yn(this,e),360e&&(e=-360),this.Ec=e,this._isInvalidBounds=!0}},isClockwiseArc:{get:function(){return(this.l&4)!==0},set:function(e){this._isFrozen&&Yn(this,e),this.l=e?this.l|4:this.l&-5,this._isInvalidBounds=!0}},isLargeArc:{get:function(){return(this.l&16)!==0},set:function(e){this._isFrozen&&Yn(this,e),this.l=e?this.l|16:this.l&-17,this._isInvalidBounds=!0}},xAxisRotation:{get:function(){return this.Ne},set:function(e){this._isFrozen&&Yn(this,e),e%=360,0>e&&(e+=360),this.Ne=e,this._isInvalidBounds=!0}}}),zr.prototype.equalsApprox=zr.prototype.Xa;var Io=new hn(zr,"Move",0),Ci=new hn(zr,"Line",1),ds=new hn(zr,"Bezier",2),na=new hn(zr,"QuadraticBezier",3),Oo=new hn(zr,"Arc",4),ca=new hn(zr,"SvgArc",4);zr.className="PathSegment",zr.Move=Io,zr.Line=Ci,zr.Bezier=ds,zr.QuadraticBezier=na,zr.Arc=Oo,zr.SvgArc=ca;function Ds(){this.H=null,this.xu=new Ue(0,0).freeze(),this.mt=new Ue(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}Ds.prototype.copy=function(){var e=new Ds;return this.clone(e)},Ds.prototype.clone=function(e){return e.H=this.H,e.xu.assign(this.viewPoint),e.mt.assign(this.documentPoint),e.Rq=this.Rq,e.Bp=this.Bp,e.Cp=this.Cp,e.xq=this.xq,e.Tp=this.Tp,e.Wr=this.Wr,e.Ep=this.Ep,e.Rp=this.Rp,e.tq=this.tq,e.nq=this.nq,e.xg=this.xg,e.Zp=this.Zp,e.Rr=this.Rr,e.Nr=this.Nr,e.xd=this.xd,e},Ds.prototype.toString=function(){var e="^";return this.modifiers!==0&&(e+="M:"+this.modifiers),this.button!==0&&(e+="B:"+this.button),this.key!==""&&(e+="K:"+this.key),this.clickCount!==0&&(e+="C:"+this.clickCount),this.delta!==0&&(e+="D:"+this.delta),this.handled&&(e+="h"),this.bubbles&&(e+="b"),this.documentPoint!==null&&(e+="@"+this.documentPoint.toString()),e},Ds.prototype.So=function(e,t){var n=this.diagram;return n===null||bl(n,e,t),t},Ds.prototype.Bz=function(e,t){var n=this.diagram;return n===null||(bl(n,e,t),t.assign(n.Ps(t))),t},kn.Object.defineProperties(Ds.prototype,{diagram:{get:function(){return this.H},set:function(e){this.H=e}},viewPoint:{get:function(){return this.xu},set:function(e){this.xu.assign(e)}},documentPoint:{get:function(){return this.mt},set:function(e){this.mt.assign(e)}},modifiers:{get:function(){return this.Rq},set:function(e){this.Rq=e}},button:{get:function(){return this.Bp},set:function(e){if(this.Bp=e,this.event===null)switch(e){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(e){this.Cp=e}},key:{get:function(){return this.xq},set:function(e){this.xq=e}},down:{get:function(){return this.Tp},set:function(e){this.Tp=e}},up:{get:function(){return this.Wr},set:function(e){this.Wr=e}},clickCount:{get:function(){return this.Ep},set:function(e){this.Ep=e}},delta:{get:function(){return this.Rp},set:function(e){this.Rp=e}},isMultiTouch:{get:function(){return this.tq},set:function(e){this.tq=e}},handled:{get:function(){return this.nq},set:function(e){this.nq=e}},bubbles:{get:function(){return this.xg},set:function(e){this.xg=e}},event:{get:function(){return this.Zp},set:function(e){this.Zp=e}},isTouchEvent:{get:function(){var e=this.event;return e===null?!1:e.pointerType==="touch"||e.pointerType==="pen"}},timestamp:{get:function(){return this.Rr},set:function(e){this.Rr=e}},targetDiagram:{get:function(){return this.Nr},set:function(e){this.Nr=e}},targetObject:{get:function(){return this.xd},set:function(e){this.xd=e}},control:{get:function(){return(this.modifiers&1)!==0},set:function(e){this.modifiers=e?this.modifiers|1:this.modifiers&-2}},shift:{get:function(){return(this.modifiers&4)!==0},set:function(e){this.modifiers=e?this.modifiers|4:this.modifiers&-5}},alt:{get:function(){return(this.modifiers&2)!==0},set:function(e){this.modifiers=e?this.modifiers|2:this.modifiers&-3}},meta:{get:function(){return(this.modifiers&8)!==0},set:function(e){this.modifiers=e?this.modifiers|8:this.modifiers&-9}},left:{get:function(){var e=this.event;return e===null||e.type!=="mousedown"&&e.type!=="mouseup"&&e.type!=="pointerdown"&&e.type!=="pointerup"?(this.buttons&1)!==0:this.button===0},set:function(e){this.buttons=e?this.buttons|1:this.buttons&-2}},right:{get:function(){var e=this.event;return e===null||e.type!=="mousedown"&&e.type!=="mouseup"&&e.type!=="pointerdown"&&e.type!=="pointerup"?(this.buttons&2)!==0:this.button===2},set:function(e){this.buttons=e?this.buttons|2:this.buttons&-3}},middle:{get:function(){var e=this.event;return e===null||e.type!=="mousedown"&&e.type!=="mouseup"&&e.type!=="pointerdown"&&e.type!=="pointerup"?(this.buttons&4)!==0:this.button===1},set:function(e){this.buttons=e?this.buttons|4:this.buttons&-5}}}),Ds.prototype.getMultiTouchDocumentPoint=Ds.prototype.Bz,Ds.prototype.getMultiTouchViewPoint=Ds.prototype.So,Ds.className="InputEvent";function gl(){this.H=null,this.xa="",this.ar=this.Lr=null}gl.prototype.copy=function(){var e=new gl;return e.H=this.H,e.xa=this.xa,e.Lr=this.Lr,e.ar=this.ar,e},gl.prototype.toString=function(){var e="*"+this.name;return this.subject!==null&&(e+=":"+this.subject.toString()),this.parameter!==null&&(e+="("+this.parameter.toString()+")"),e},kn.Object.defineProperties(gl.prototype,{diagram:{get:function(){return this.H},set:function(e){this.H=e}},name:{get:function(){return this.xa},set:function(e){this.xa=e}},subject:{get:function(){return this.Lr},set:function(e){this.Lr=e}},parameter:{get:function(){return this.ar},set:function(e){this.ar=e}}}),gl.className="DiagramEvent";function Qi(){this.Fm=Fi,this.rf=this.Qq="",this.Ln=this.Mn=this.Rn=this.Sn=this.Qn=this.H=this.cc=null}Qi.prototype.clear=function(){this.Ln=this.Mn=this.Rn=this.Sn=this.Qn=this.H=this.cc=null},Qi.prototype.copy=function(){var e=new Qi;e.Fm=this.Fm,e.Qq=this.Qq,e.rf=this.rf,e.cc=this.cc,e.H=this.H,e.Qn=this.Qn;var t=this.Sn;return e.Sn=bn(t)&&typeof t.J=="function"?t.J():t,t=this.Rn,e.Rn=bn(t)&&typeof t.J=="function"?t.J():t,t=this.Mn,e.Mn=bn(t)&&typeof t.J=="function"?t.J():t,t=this.Ln,e.Ln=bn(t)&&typeof t.J=="function"?t.J():t,e},Qi.prototype.qb=function(e){e.classType===Qi&&(this.change=e)},Qi.prototype.toString=function(){var e="";return e=this.change===Gs?e+"* ":this.change===Fi?e+(this.model!==null?"!m":"!d"):e+((this.model!==null?"!m":"!d")+this.change),this.propertyName&&typeof this.propertyName=="string"&&(e+=" "+this.propertyName),this.modelChange&&this.modelChange!==this.propertyName&&(e+=" "+this.modelChange),e+=": ",this.change===Gs?this.oldValue!==null&&(e+=" "+this.oldValue):(this.object!==null&&(e+=Di(this.object)),this.oldValue!==null&&(e+=" old: "+Di(this.oldValue)),this.oldParam!==null&&(e+=" "+this.oldParam),this.newValue!==null&&(e+=" new: "+Di(this.newValue)),this.newParam!==null&&(e+=" "+this.newParam)),e},Qi.prototype.I=function(e){return e?this.oldValue:this.newValue},Qi.prototype.Dz=function(e){return e?this.oldParam:this.newParam},Qi.prototype.canUndo=function(){return this.model!==null||this.diagram!==null},Qi.prototype.undo=function(){this.canUndo()&&(this.model!==null?this.model.changeState(this,!0):this.diagram!==null&&this.diagram.changeState(this,!0))},Qi.prototype.canRedo=function(){return this.model!==null||this.diagram!==null},Qi.prototype.redo=function(){this.canRedo()&&(this.model!==null?this.model.changeState(this,!1):this.diagram!==null&&this.diagram.changeState(this,!1))},kn.Object.defineProperties(Qi.prototype,{model:{get:function(){return this.cc},set:function(e){this.cc=e}},diagram:{get:function(){return this.H},set:function(e){this.H=e}},change:{get:function(){return this.Fm},set:function(e){this.Fm=e}},modelChange:{get:function(){return this.Qq},set:function(e){this.Qq=e}},propertyName:{get:function(){return this.rf},set:function(e){this.rf=e}},isTransactionFinished:{get:function(){return this.Fm===Gs&&(this.rf==="CommittedTransaction"||this.rf==="FinishedUndo"||this.rf==="FinishedRedo")}},object:{get:function(){return this.Qn},set:function(e){this.Qn=e}},oldValue:{get:function(){return this.Sn},set:function(e){this.Sn=e}},oldParam:{get:function(){return this.Rn},set:function(e){this.Rn=e}},newValue:{get:function(){return this.Mn},set:function(e){this.Mn=e}},newParam:{get:function(){return this.Ln},set:function(e){this.Ln=e}}}),Qi.prototype.redo=Qi.prototype.redo,Qi.prototype.canRedo=Qi.prototype.canRedo,Qi.prototype.undo=Qi.prototype.undo,Qi.prototype.canUndo=Qi.prototype.canUndo,Qi.prototype.getParam=Qi.prototype.Dz,Qi.prototype.getValue=Qi.prototype.I,Qi.prototype.clear=Qi.prototype.clear;var Gs=new hn(Qi,"Transaction",-1),Fi=new hn(Qi,"Property",0),xo=new hn(Qi,"Insert",1),Lo=new hn(Qi,"Remove",2);Qi.className="ChangedEvent",Qi.Transaction=Gs,Qi.Property=Fi,Qi.Insert=xo,Qi.Remove=Lo;function Go(){this.o=new tn().freeze(),this.xa="",this.j=!1}Go.prototype.toString=function(e){var t="Transaction: "+this.name+" "+this.changes.count.toString()+(this.isComplete?"":", incomplete");if(e!==void 0&&0t&&e.cd(t,r),t++);for(;e.length>t;)e.pop();e.freeze()}},kn.Object.defineProperties(Go.prototype,{changes:{get:function(){return this.o}},name:{get:function(){return this.xa},set:function(e){this.xa=e}},isComplete:{get:function(){return this.j},set:function(e){this.j=e}}}),Go.prototype.optimize=Go.prototype.ak,Go.prototype.redo=Go.prototype.redo,Go.prototype.canRedo=Go.prototype.canRedo,Go.prototype.undo=Go.prototype.undo,Go.prototype.canUndo=Go.prototype.canUndo,Go.prototype.clear=Go.prototype.clear,Go.className="Transaction";function ro(){this.Pt=new ut,this.Jd=!1,this.u=new tn().freeze(),this.Ce=-1,this.o=999,this.Fe=!1,this.Np=null,this.bi=0,this.j=!1,this.Ie=new tn().freeze(),this.hl=new tn,this.tt=!0,this.Dt=this.rq=this.Gt=this.Ft=!1}ro.prototype.toString=function(e){var t="UndoManager "+this.historyIndex+"<"+this.history.count+"<="+this.maxHistoryLength;t+="[";for(var n=this.nestedTransactionNames.count,r=0;re.transactionLevel&&zi("Ending transaction without having started a transaction: "+n);var r=e.transactionLevel===1,i=e.currentTransaction;r&&t&&(e.isInternalTransaction||e.Ob("CommittingTransaction",n,i));var o=0;if(0=r&&(o=t.M(0),o!==null&&o.clear(),t.mb(0),e.Ce--)),r===0||t.count!==0&&t.get(t.count-1)===i||(t.add(i),e.Ce++),t.freeze()),e.isInternalTransaction||e.Ob("CommittedTransaction",n,i);else{e.Fe=!0;try{e.isEnabled&&i!==null&&(i.isComplete=!0,i.undo())}finally{e.isInternalTransaction||e.Ob("RolledBackTransaction",n,i),e.Fe=!1}i!==null&&i.clear()}return e.Np=null,e.isPendingClear&&e.clear(),e.isPendingClear=!1,e.isPendingUnmodified=!1,!0}if(e.isEnabled&&!t&&i!==null){for(e=o,n=i.changes,i=n.count-1;i>=e;i--)t=n.M(i),t!==null&&t.undo(),n.ka(),n.mb(i);n.freeze()}return!1}ye.lx=function(){if(!this.isUndoingRedoing&&this.canRedo()){var e=this.history;e.ka();for(var t=e.count-1;t>this.historyIndex;t--){var n=e.M(t);n!==null&&n.clear(),e.mb(t),this.rq=!0}e.freeze()}},ro.prototype.canUndo=function(){if(!this.isEnabled||0=this.transactionLevel&&!this.tt&&(e=e.diagram,e!==null&&e.pi===!1||zi("Change not within a transaction: "+n.toString()))}},ro.prototype.skipsEvent=function(e){if(e===null||0>e.change.value)return!0;if(e=e.object,e===null)return!1;if(e.layer!==void 0){if(e=e.layer,e!==null&&e.isTemporary)return!0}else if(e.isTemporary)return!0;return!1},kn.Object.defineProperties(ro.prototype,{models:{get:function(){return this.Pt.iterator}},isEnabled:{get:function(){return this.Jd},set:function(e){this.Jd=e}},transactionToUndo:{get:function(){return 0<=this.historyIndex&&this.historyIndex<=this.history.count-1?this.history.M(this.historyIndex):null}},transactionToRedo:{get:function(){return this.historyIndexi||Math.abs(t.y-e.y)>r},kn.Object.defineProperties(xr.prototype,{diagram:{get:function(){return this.H},set:function(e){e instanceof Ct&&(this.H=e)}},name:{get:function(){return this.xa},set:function(e){this.xa=e}},isEnabled:{get:function(){return this.Jd},set:function(e){this.Jd=e}},isActive:{get:function(){return this.nb},set:function(e){this.nb=e}},transactionResult:{get:function(){return this.wm},set:function(e){this.wm=e}}}),xr.prototype.startTransaction=xr.prototype.Ea,xr.className="Tool";function Wi(){xr.call(this),this.name="ToolManager",this.hb=new tn,this.ob=new tn,this.Hb=new tn,this.F=this.V=850,this.o=new Yt(2,2).ja(),this.Ha=5e3,this.ia=lu,this.u=Il,this.Mp=this.j=null,this.zj=-1}Tn(Wi,xr),Wi.prototype.initializeStandardTools=function(){},Wi.prototype.updateAdornments=function(e){var t=this.currentToolTip;if(t instanceof qr&&this.Mp===e){var n=t.adornedObject;(e!==null?n.part===e:n===null)?this.showToolTip(t,n):this.hideToolTip()}},Wi.prototype.doMouseDown=function(){var e=this.diagram,t=e.lastInput;if(t.isTouchEvent&&this.gestureBehavior===ml&&(t.bubbles=!1),t.isMultiTouch){if(this.cancelWaitAfter(),this.gestureBehavior===Kl){t.bubbles=!0;return}if(this.gestureBehavior===ml)return;if(e.currentTool.canStartMultiTouch()){e.currentTool.standardPinchZoomStart();return}}for(var n=this.mouseDownTools.length,r=0;ri.right&&(n.x-=r.width+5/t.scale),n.xi.bottom?n.y-(r.height+5/t.scale):n.y+20/t.scale,n.yn.pointsCount)){var r=e.diagram;if(!r.isReadOnly){var i=e.Oe;if(i!==null){var o=null,a=null;n.fromNode===null&&(o=yn(e,n.i(0),!1),o!==null&&(a=o.part));var p=null,w=null;n.toNode===null&&(p=yn(e,n.i(n.pointsCount-1),!0),p!==null&&(w=p.part)),i.isValidLink(a,o,w,p)?t?(n.defaultFromPoint=n.i(0),n.defaultToPoint=n.i(n.pointsCount-1),n.suspendsRouting=!1,n.fromNode=a,o!==null&&(n.fromPortId=o.portId),n.toNode=w,p!==null&&(n.toPortId=p.portId),n.fromPort!==r.Mx&&r.R("LinkRelinked",n,r.Mx),n.toPort!==r.Nx&&r.R("LinkRelinked",n,r.Nx)):Pe(i,a,o,w,p):Pe(i,null,null,null,null)}}}}io.prototype.doDragOver=function(){};function Cn(e,t){var n=e.diagram;e.dragsLink&&An(e,!0),at(e);var r=e.findDragOverObject(t),i=n.lastInput;if(i.targetObject=r,r!==null){i.handled=!1;for(var o=r;o!==null;){var a=o.mouseDrop;if(a!==null&&(a(i,o),i.handled))break;jn(e,i,o),o=Ln(o)}}else o=n.mouseDrop,o!==null&&o(i);if(e.isActive||Hn!==null){for(i=(e.copiedParts||e.draggedParts).iterator;i.next();)o=i.key,o instanceof En&&o.linksConnected.each(function(p){p.suspendsRouting=!1});if(e.doDropOnto(t,r),e.isActive||Hn!==null){for(e=Nt.alloc(),t=n.selection.iterator;t.next();)r=t.value,r instanceof En&&qn(n,r,e);Nt.free(e)}}}function jn(e,t,n){e=e.diagram,n=n.part,!e.handlesDragDropForTopLevelParts||!n.isTopLevel||n instanceof lr||(n=e.mouseDrop,n!==null&&n(t))}function qn(e,t,n){var r=!1;if(n=t.getAvoidableRect(n),e.viewportBounds.Re(n)&&(r=!0),e=e.Nu(n,function(i){return i.part},function(i){return i instanceof cn},!0,function(i){return i instanceof cn},r),e.count!==0)for(e=e.iterator;e.next();)n=e.value,!n.Td(t)&&n.isAvoiding&&n.bb()}io.prototype.doDropOnto=function(){},io.prototype.doMouseMove=function(){if(this.isActive){var e=this.diagram,t=e.lastInput;this.simulatedMouseMove(t.event,t.documentPoint,t.targetDiagram)||this.currentPart===null||this.draggedParts===null||(this.mayCopy()?(mt(this,!1),sd(e,this.copiedParts),Ht(this,this.copiedParts,!1),bh(e,this.copiedParts)):this.mayMove()?(kt(this),Ht(this,this.draggedParts,!0)):this.mayDragOut()?(mt(this,!1),Ht(this,this.copiedParts,!1)):kt(this),xn(this,e.lastInput.documentPoint))}},io.prototype.doMouseUp=function(){if(this.isActive){var e=this.diagram,t=e.lastInput;if(!this.simulatedMouseUp(t.event,t.documentPoint,t.targetDiagram)){t=!1;var n=this.mayCopy();if(n&&this.copiedParts!==null?(kt(this),mt(this,!0),sd(e,this.copiedParts),Ht(this,this.copiedParts,!1),bh(e,this.copiedParts),this.copiedParts!==null&&(e.R("ChangingSelection",e.selection),e.clearSelection(!0),this.copiedParts.iteratorKeys.each(function(i){i.isSelected=!0}))):(t=!0,kt(this),this.mayMove()&&(Ht(this,this.draggedParts,!0),xn(this,e.lastInput.documentPoint))),this.Ym=!0,Cn(this,e.lastInput.documentPoint),this.isActive){var r=n?this.copiedParts.Lf():this.draggedParts.Lf();this.copiedParts=null,t&&mr(this),e.Ya(),bh(e,this.draggedParts),this.transactionResult=n?"Copy":"Move",e.R(n?"SelectionCopied":"SelectionMoved",r)}this.stopTool(),n&&e.R("ChangedSelection",e.selection)}}},io.prototype.simulatedMouseMove=function(e,t,n){if(Hn===null)return!1;var r=Hn.diagram;n instanceof Ct||(n=null);var i=ur;return n!==i&&(i!==null&&i!==r&&(i.ug(),Hn.isDragOutStarted=!1,i=i.toolManager.findTool("Dragging"),i!==null&&i.doSimulatedDragLeave()),ur=n,n!==null&&n!==r&&(pt(),i=n.toolManager.findTool("Dragging"),i!==null&&(Yl.contains(i)||Yl.add(i),i.doSimulatedDragEnter())),this.doUpdateCursor(null)),n===null||n===r||!n.allowDrop||n.isReadOnly||!n.allowInsert?!1:(r=n.toolManager.findTool("Dragging"),r!==null&&(e!==null&&(e.targetTouches!==void 0&&(0a&&(a=O),D>p&&(p=D))}}for(r===1/0?o.h(0,0,0,0):o.h(r,i,a-r,p-i),r=o.x+o.width/2,i=o.y+o.height/2,Nt.free(o),o=e.Fr,a=new nn,p=Ue.alloc(),w=t.iterator;w.next();)O=w.value,O instanceof cn&&O.canCopy()&&(D=n.I(O),D!==null&&(D.points=O.points,eh(D,o.x-r,o.y-i),D.suspendsRouting=!0,a.add(D,e.Pd())));for(t=t.iterator;t.next();)O=t.value,O.Zc()&&O.canCopy()&&(w=n.I(O),w!==null&&(O=O.location,p.h(o.x-(r-O.x),o.y-(i-O.y)),w.location=p,w.Va(),a.add(w,e.Pd(p))));Ue.free(p),e.copiedParts=a,Ke(e,a.Lf()),e.draggedLink!==null&&(n=e.draggedLink,t=n.routeBounds,eh(n,e.startPoint.x-(t.x+t.width/2),e.startPoint.y-(t.y+t.height/2))),e.doUpdateCursor(null)}}}io.prototype.doSimulatedDragOut=function(){var e=this.diagram;e.Ns=!1,this.mayCopy()||this.mayMove()?e.currentCursor="":e.currentCursor=this.nodropCursor,this.Bn=null},io.prototype.computeMove=function(e,t,n,r){return n=this.diagram,n!==null?n.computeMove(e,t,this.dragOptions,r):new Ue},kn.Object.defineProperties(io.prototype,{isCopyEnabled:{get:function(){return this.ob},set:function(e){this.ob=e}},copiesEffectiveCollection:{get:function(){return this.u},set:function(e){this.u=e}},dragOptions:{get:function(){return this.ia},set:function(e){this.ia=e}},isGridSnapEnabled:{get:function(){return this.dragOptions.isGridSnapEnabled},set:function(e){this.dragOptions.isGridSnapEnabled=e}},isComplexRoutingRealtime:{get:function(){return this.hb},set:function(e){this.hb=e}},isGridSnapRealtime:{get:function(){return this.dragOptions.isGridSnapRealtime},set:function(e){this.dragOptions.isGridSnapRealtime=e}},gridSnapCellSize:{get:function(){return this.dragOptions.gridSnapCellSize},set:function(e){this.dragOptions.gridSnapCellSize.D(e)||(e=e.J(),this.dragOptions.gridSnapCellSize=e)}},gridSnapCellSpot:{get:function(){return this.dragOptions.gridSnapCellSpot},set:function(e){this.dragOptions.gridSnapCellSpot.D(e)||(e=e.J(),this.dragOptions.gridSnapCellSpot=e)}},gridSnapOrigin:{get:function(){return this.dragOptions.gridSnapOrigin},set:function(e){this.dragOptions.gridSnapOrigin.D(e)||(e=e.J(),this.dragOptions.gridSnapOrigin=e)}},dragsLink:{get:function(){return this.dragOptions.dragsLink},set:function(e){this.dragOptions.dragsLink=e}},dragsTree:{get:function(){return this.dragOptions.dragsTree},set:function(e){this.dragOptions.dragsTree=e}},copyCursor:{get:function(){return this.F},set:function(e){this.F=e}},moveCursor:{get:function(){return this.Oc},set:function(e){this.Oc=e}},nodropCursor:{get:function(){return this.Pc},set:function(e){this.Pc=e}},currentPart:{get:function(){return this.V},set:function(e){this.V=e}},copiedParts:{get:function(){return this.o},set:function(e){this.o=e}},draggedParts:{get:function(){return this.Ha},set:function(e){this.Ha=e}},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(e){this.diagram.draggedLink=e}},isDragOutStarted:{get:function(){return this.Hb},set:function(e){this.Hb=e}},startPoint:{get:function(){return this.Fr},set:function(e){this.Fr.D(e)||this.Fr.assign(e)}},delay:{get:function(){return this.Ik},set:function(e){this.Ik=e}}}),io.prototype.getDraggingSource=io.prototype.Az;var Hn=null,ur=null;io.className="DraggingTool",Yl=new tn,Gi("draggingTool",function(){return this.findTool("Dragging")},function(e){this.gb("Dragging",e,this.mouseMoveTools)}),Wi.prototype.doCancel=function(){Hn!==null&&Hn.doCancel(),xr.prototype.doCancel.call(this)};function Qn(){xr.call(this),this.te=100,this.Ha=!1,this.u="pointer";var e=new cn,t=new vr;t.isPanelMain=!0,t.stroke="blue",e.add(t),t=new vr,t.toArrow="Standard",t.fill="blue",t.stroke="blue",e.add(t),e.layerName="Tool",this.Ci=e,e=new En,t=new vr,t.portId="",t.figure="Rectangle",t.fill=null,t.stroke="magenta",t.strokeWidth=2,t.desiredSize=fr,e.add(t),e.selectable=!1,e.layerName="Tool",this.Bi=e,this.j=t,e=new En,t=new vr,t.portId="",t.figure="Rectangle",t.fill=null,t.stroke="magenta",t.strokeWidth=2,t.desiredSize=fr,e.add(t),e.selectable=!1,e.layerName="Tool",this.Di=e,this.o=t,this.Pc=this.Oc=this.ob=this.hb=this.Hb=null,this.ia=!0,this.hy=new nn,this.Of=this.gj=this.Pf=null}Tn(Qn,xr),Qn.prototype.doStop=function(){this.diagram.ug(),this.originalToPort=this.originalToNode=this.originalFromPort=this.originalFromNode=this.originalLink=null,this.validPortsCache.clear(),this.targetPort=null},Qn.prototype.copyPortProperties=function(e,t,n,r,i){if(e!==null&&t!==null&&n!==null&&r!==null){var o=t.Df(),a=Yt.alloc();a.width=t.naturalBounds.width*o,a.height=t.naturalBounds.height*o,r.desiredSize=a,Yt.free(a),i?(r.toSpot=t.toSpot,r.toEndSegmentLength=t.toEndSegmentLength):(r.fromSpot=t.fromSpot,r.fromEndSegmentLength=t.fromEndSegmentLength),n.locationSpot=jr,o=Ue.alloc(),n.location=t.ga(jr,o),Ue.free(o),r.angle=t.li(),this.portTargeted!==null&&this.portTargeted(e,t,n,r,i)}},Qn.prototype.setNoTargetPortProperties=function(e,t,n){t!==null&&(t.desiredSize=fr,t.fromSpot=So,t.toSpot=So),e!==null&&(e.location=this.diagram.lastInput.documentPoint),this.portTargeted!==null&&this.portTargeted(null,null,e,t,n)},Qn.prototype.doMouseDown=function(){this.isActive&&this.doMouseMove()},Qn.prototype.doMouseMove=function(){if(this.isActive){var e=this.diagram;if(this.targetPort=this.findTargetPort(this.isForwards),this.targetPort!==null&&this.targetPort.part instanceof En){var t=this.targetPort.part;this.isForwards?this.copyPortProperties(t,this.targetPort,this.temporaryToNode,this.temporaryToPort,!0):this.copyPortProperties(t,this.targetPort,this.temporaryFromNode,this.temporaryFromPort,!1)}else this.isForwards?this.setNoTargetPortProperties(this.temporaryToNode,this.temporaryToPort,!0):this.setNoTargetPortProperties(this.temporaryFromNode,this.temporaryFromPort,!1);(e.allowHorizontalScroll||e.allowVerticalScroll)&&e.gs(e.lastInput.viewPoint)}},Qn.prototype.findValidLinkablePort=function(e,t){if(e===null)return null;var n=e.part;if(!(n instanceof En))return null;for(;e!==null;){var r=t?e.toLinkable:e.fromLinkable;if(r===!0&&(e.portId!==null||e instanceof En)&&(t?this.isValidTo(n,e):this.isValidFrom(n,e)))return e;if(r===!1)break;e=e.panel}return null},Qn.prototype.findTargetPort=function(e){var t=this.diagram,n=t.lastInput.documentPoint,r=this.portGravity;0>=r&&(r=.1);var i=this,o=t.og(n,r,function(X){return i.findValidLinkablePort(X,e)},null,!0);for(r=1/0,t=null,o=o.iterator;o.next();){var a=o.value,p=a.part;if(p instanceof En){var w=a.ga(jr,Ue.alloc()),O=n.x-w.x,D=n.y-w.y;Ue.free(w),w=O*O+D*D,wn){if(this.originalLink!==null&&e===this.originalFromNode&&t===this.originalFromPort)return!0;if(t=t.portId,t===null&&(t=""),e.Mo(t).count>=n)return!1}return!0},Qn.prototype.isValidTo=function(e,t){if(e===null||t===null)return this.isUnconnectedLinkValid;if(this.diagram.currentTool===this&&(e.layer!==null&&!e.layer.allowLink||t.toLinkable!==!0))return!1;var n=t.toMaxLinks;if(1/0>n){if(this.originalLink!==null&&e===this.originalToNode&&t===this.originalToPort)return!0;if(t=t.portId,t===null&&(t=""),e.Sd(t).count>=n)return!1}return!0},Qn.prototype.isInSameNode=function(e,t){return e===null||t===null?!1:e===t?!0:(e=e.part,t=t.part,e!==null&&e===t)},Qn.prototype.isLinked=function(e,t){if(e===null||t===null)return!1;var n=e.part;if(!(n instanceof En))return!1;e=e.portId,e===null&&(e="");var r=t.part;if(!(r instanceof En))return!1;for(t=t.portId,t===null&&(t=""),t=r.Sd(t);t.next();)if(r=t.value,r.fromNode===n&&r.fromPortId===e)return!0;return!1},Qn.prototype.isValidLink=function(e,t,n,r){if(!this.isValidFrom(e,t)||!this.isValidTo(n,r)||!(t===null||r===null||(t.fromLinkableSelfNode&&r.toLinkableSelfNode||!this.isInSameNode(t,r))&&(t.fromLinkableDuplicates&&r.toLinkableDuplicates||!this.isLinked(t,r)))||this.originalLink!==null&&(e!==null&&this.isLabelDependentOnLink(e,this.originalLink)||n!==null&&this.isLabelDependentOnLink(n,this.originalLink))||e!==null&&n!==null&&(e.data===null&&n.data!==null||e.data!==null&&n.data===null)||!this.isValidCycle(e,n,this.originalLink))return!1;if(e!==null){var i=e.linkValidation;if(i!==null&&!i(e,t,n,r,this.originalLink))return!1}return n!==null&&(i=n.linkValidation,i!==null&&!i(e,t,n,r,this.originalLink))?!1:(i=this.linkValidation,i!==null?i(e,t,n,r,this.originalLink):!0)},Qn.prototype.isLabelDependentOnLink=function(e,t){if(e===null)return!1;var n=e.labeledLink;if(n===null)return!1;if(n===t)return!0;var r=new ut;return r.add(e),_r(this,n,t,r)};function _r(e,t,n,r){if(t===n)return!0;var i=t.fromNode;return i!==null&&i.isLinkLabel&&(r.add(i),_r(e,i.labeledLink,n,r))?!0:(t=t.toNode,!!(t!==null&&t.isLinkLabel&&(r.add(t),_r(e,t.labeledLink,n,r))))}Qn.prototype.isValidCycle=function(e,t,n){if(n===void 0&&(n=null),e===null||t===null)return this.isUnconnectedLinkValid;var r=this.diagram.validCycle;if(r!==Rf){if(r===gp){if(r=n||this.temporaryLink,r!==null&&!r.isTreeLink)return!0;for(r=t.linksConnected;r.next();){var i=r.value;if(i!==n&&i.isTreeLink&&i.toNode===t)return!1}return!Xr(this,e,t,n,!0)}if(r===mp){if(r=n||this.temporaryLink,r!==null&&!r.isTreeLink)return!0;for(r=e.linksConnected;r.next();)if(i=r.value,i!==n&&i.isTreeLink&&i.fromNode===e)return!1;return!Xr(this,e,t,n,!0)}if(r===fp)return e===t?e=!0:(r=new ut,r.add(t),e=Cr(this,r,e,t,n)),!e;if(r===dp)return!Xr(this,e,t,n,!1);if(r===pp)return e===t?e=!0:(r=new ut,r.add(t),e=wi(this,r,e,t,n)),!e}return!0};function Xr(e,t,n,r,i){if(t===n)return!0;if(t===null||n===null)return!1;for(var o=t.linksConnected;o.next();){var a=o.value;if(a!==r&&(!i||a.isTreeLink)&&a.toNode===t&&(a=a.fromNode,a!==t&&Xr(e,a,n,r,i)))return!0}return!1}function Cr(e,t,n,r,i){if(n===r)return!0;if(n===null||r===null||t.contains(n))return!1;t.add(n);for(var o=n.linksConnected;o.next();){var a=o.value;if(a!==i&&a.toNode===n&&(a=a.fromNode,a!==n&&Cr(e,t,a,r,i)))return!0}return!1}function wi(e,t,n,r,i){if(n===r)return!0;if(n===null||r===null||t.contains(n))return!1;t.add(n);for(var o=n.linksConnected;o.next();){var a=o.value;if(a!==i){var p=a.fromNode;if(a=a.toNode,p=p===n?a:p,p!==n&&wi(e,t,p,r,i))return!0}}return!1}kn.Object.defineProperties(Qn.prototype,{portGravity:{get:function(){return this.te},set:function(e){0<=e&&(this.te=e)}},isUnconnectedLinkValid:{get:function(){return this.Ha},set:function(e){this.Ha=e}},linkingCursor:{get:function(){return this.u},set:function(e){this.u=e}},temporaryLink:{get:function(){return this.Ci},set:function(e){this.Ci=e}},temporaryFromNode:{get:function(){return this.Bi},set:function(e){(this.Bi=e)&&(this.j=e.port)}},temporaryFromPort:{get:function(){return this.j},set:function(e){if(this.j!==null){var t=this.j.panel;if(t!==null){var n=t.O.indexOf(this.j);t.mb(n),t.Gb(n,e)}}this.j=e}},temporaryToNode:{get:function(){return this.Di},set:function(e){(this.Di=e)&&(this.o=e.port)}},temporaryToPort:{get:function(){return this.o},set:function(e){if(this.o!==null){var t=this.o.panel;if(t!==null){var n=t.O.indexOf(this.o);t.mb(n),t.Gb(n,e)}}this.o=e}},originalLink:{get:function(){return this.Hb},set:function(e){this.Hb=e}},originalFromNode:{get:function(){return this.hb},set:function(e){this.hb=e}},originalFromPort:{get:function(){return this.ob},set:function(e){this.ob=e}},originalToNode:{get:function(){return this.Oc},set:function(e){this.Oc=e}},originalToPort:{get:function(){return this.Pc},set:function(e){this.Pc=e}},isForwards:{get:function(){return this.ia},set:function(e){this.ia=e}},validPortsCache:{get:function(){return this.hy}},targetPort:{get:function(){return this.Pf},set:function(e){this.Pf=e}},linkValidation:{get:function(){return this.gj},set:function(e){this.gj=e}},portTargeted:{get:function(){return this.Of},set:function(e){this.Of=e}}}),Qn.className="LinkingBaseTool";function ni(){Qn.call(this),this.name="Linking",this.V={},this.F=null,this.K=Bi,this.Xd=null}Tn(ni,Qn),ni.prototype.canStart=function(){if(!this.isEnabled)return!1;var e=this.diagram;return e.isReadOnly||e.isModelReadOnly||!e.allowLink||!e.model.xs()||!e.lastInput.left||e.currentTool!==this&&!this.isBeyondDragSize()?!1:this.findLinkablePort()!==null},ni.prototype.findLinkablePort=function(){var e=this.diagram,t=this.startObject;if(t===null&&(t=e.ic(e.firstInput.documentPoint,null,null)),t===null||(e=t.part,!(e instanceof En)))return null;var n=this.direction;if(n===Bi||n===te){var r=this.findValidLinkablePort(t,!1);if(r!==null||this.startObject===e&&(r=e.port,this.findValidLinkablePort(r,!1)))return this.isForwards=!0,r}return(n===Bi||n===Ee)&&(t=this.findValidLinkablePort(t,!0),t!==null||this.startObject===e&&(t=e.port,this.findValidLinkablePort(t,!0)))?(this.isForwards=!1,t):null},ni.prototype.doActivate=function(){var e=this.diagram,t=this.findLinkablePort();t===null?this.stopTool():(this.Ea(this.name),e.isMouseCaptured=!0,e.currentCursor=this.linkingCursor,this.isForwards?(this.temporaryToNode!==null&&(this.temporaryToNode.location=e.lastInput.documentPoint),this.originalFromPort=t,t=this.originalFromPort.part,t instanceof En&&(this.originalFromNode=t),this.copyPortProperties(this.originalFromNode,this.originalFromPort,this.temporaryFromNode,this.temporaryFromPort,!1)):(this.temporaryFromNode!==null&&(this.temporaryFromNode.location=e.lastInput.documentPoint),this.originalToPort=t,t=this.originalToPort.part,t instanceof En&&(this.originalToNode=t),this.copyPortProperties(this.originalToNode,this.originalToPort,this.temporaryToNode,this.temporaryToPort,!0)),e.add(this.temporaryFromNode),this.temporaryFromNode&&this.temporaryFromNode.Va(),e.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(),e.add(this.temporaryLink)),this.isActive=!0)},ni.prototype.doDeactivate=function(){this.isActive=!1;var e=this.diagram;e.remove(this.temporaryLink),e.remove(this.temporaryFromNode),e.remove(this.temporaryToNode),e.isMouseCaptured=!1,e.currentCursor="",this.stopTransaction()},ni.prototype.doStop=function(){Qn.prototype.doStop.call(this),this.startObject=null},ni.prototype.doMouseUp=function(){if(this.isActive){var e=this.diagram,t=this.transactionResult=null,n=null,r=null,i=null,o=null;try{var a=this.targetPort=this.findTargetPort(this.isForwards);if(a!==null){var p=a.part;p instanceof En&&(this.isForwards?(this.originalFromNode!==null&&(t=this.originalFromNode,n=this.originalFromPort),r=p,i=a):(t=p,n=a,this.originalToNode!==null&&(r=this.originalToNode,i=this.originalToPort)))}else this.isForwards?this.originalFromNode!==null&&this.isUnconnectedLinkValid&&(t=this.originalFromNode,n=this.originalFromPort):this.originalToNode!==null&&this.isUnconnectedLinkValid&&(r=this.originalToNode,i=this.originalToPort);t!==null||r!==null?(o=this.insertLink(t,n,r,i),o!==null?(a===null&&(this.isForwards?o.defaultToPoint=e.lastInput.documentPoint:o.defaultFromPoint=e.lastInput.documentPoint),e.allowSelect&&(e.R("ChangingSelection",e.selection),e.clearSelection(!0),o.isSelected=!0),this.transactionResult=this.name,e.R("LinkDrawn",o)):this.doNoLink(t,n,r,i)):this.isForwards?this.doNoLink(this.originalFromNode,this.originalFromPort,null,null):this.doNoLink(null,null,this.originalToNode,this.originalToPort)}finally{this.stopTool(),o&&e.allowSelect&&e.R("ChangedSelection",e.selection)}}},ni.prototype.isNewTreeLink=function(){var e=this.archetypeLinkData;if(e===null)return!0;if(e instanceof cn)return e.isTreeLink;var t=this.diagram;return t===null?!0:(e=t.partManager.getLinkCategoryForData(e),t=t.partManager.findLinkTemplateForCategory(e),t!==null?t.isTreeLink:!0)},ni.prototype.insertLink=function(e,t,n,r){return this.diagram.partManager.insertLink(e,t,n,r)},ni.prototype.doNoLink=function(){},kn.Object.defineProperties(ni.prototype,{archetypeLinkData:{get:function(){return this.V},set:function(e){this.V=e}},archetypeLabelNodeData:{get:function(){return this.F},set:function(e){this.F=e}},direction:{get:function(){return this.K},set:function(e){this.K=e}},startObject:{get:function(){return this.Xd},set:function(e){this.Xd=e}}});var Bi=new hn(ni,"Either",0),te=new hn(ni,"ForwardsOnly",0),Ee=new hn(ni,"BackwardsOnly",0);ni.className="LinkingTool",ni.Either=Bi,ni.ForwardsOnly=te,ni.BackwardsOnly=Ee;function Ae(){Qn.call(this),this.name="Relinking";var e=new vr;e.figure="Diamond",e.desiredSize=Pi,e.fill="lightblue",e.stroke="dodgerblue",e.cursor=this.linkingCursor,e.segmentIndex=0,this.V=e,e=new vr,e.figure="Diamond",e.desiredSize=Pi,e.fill="lightblue",e.stroke="dodgerblue",e.cursor=this.linkingCursor,e.segmentIndex=-1,this.Xd=e,this.F=null,this.Ew=new Nt}Tn(Ae,Qn),Ae.prototype.updateAdornments=function(e){if(e!==null&&e instanceof cn){var t="RelinkFrom",n=null;if(e.isSelected&&!this.diagram.isReadOnly){var r=e.selectionObject;r!==null&&e.canRelinkFrom()&&e.actualBounds.w()&&e.isVisible()&&r.actualBounds.w()&&r.Ed()&&(n=e.Pj(t),n===null&&(n=this.makeAdornment(r,!1),e.bh(t,n)))}n===null&&e.Jf(t),t="RelinkTo",n=null,e.isSelected&&!this.diagram.isReadOnly&&(r=e.selectionObject,r!==null&&e.canRelinkTo()&&e.actualBounds.w()&&e.isVisible()&&r.actualBounds.w()&&r.Ed()&&(n=e.Pj(t),n===null?(n=this.makeAdornment(r,!0),e.bh(t,n)):n.v())),n===null&&e.Jf(t)}},Ae.prototype.makeAdornment=function(e,t){var n=new qr;return n.type=qt.Link,t=t?this.toHandleArchetype:this.fromHandleArchetype,t!==null&&n.add(t.copy()),n.adornedObject=e,n},Ae.prototype.canStart=function(){if(!this.isEnabled)return!1;var e=this.diagram;if(e.isReadOnly||e.isModelReadOnly||!e.allowRelink||!e.model.xs()||!e.lastInput.left)return!1;var t=this.findToolHandleAt(e.firstInput.documentPoint,"RelinkFrom");return t===null&&(t=this.findToolHandleAt(e.firstInput.documentPoint,"RelinkTo")),t!==null},Ae.prototype.doActivate=function(){var e=this.diagram;if(this.originalLink===null){var t=this.handle;if(t===null&&(t=this.findToolHandleAt(e.firstInput.documentPoint,"RelinkFrom"),t===null&&(t=this.findToolHandleAt(e.firstInput.documentPoint,"RelinkTo"))),t===null)return;var n=t.part;if(!(n instanceof qr&&n.adornedPart instanceof cn))return;this.handle=t,this.isForwards=n===null||n.category==="RelinkTo",this.originalLink=n.adornedPart}this.Ea(this.name),e.isMouseCaptured=!0,e.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&&0t.firstPickIndex+1&&n=n.x)t=0>=n.y?t+225:1<=n.y?t+135:t+180;else if(1<=n.x)0>=n.y?t+=315:1<=n.y&&(t+=45);else if(0>=n.y)t+=270;else if(1<=n.y)t+=90;else break e;0>t?t+=360:360<=t&&(t-=360),e.cursor=22.5>t?"e-resize":67.5>t?"se-resize":112.5>t?"s-resize":157.5>t?"sw-resize":202.5>t?"w-resize":247.5>t?"nw-resize":292.5>t?"n-resize":337.5>t?"ne-resize":"e-resize"}else if(e instanceof qt)for(e=e.elements;e.next();)this.updateResizeHandles(e.value,t)}},Rt.prototype.canStart=function(){if(!this.isEnabled)return!1;var e=this.diagram;return!e.isReadOnly&&e.allowResize&&e.lastInput.left?this.findToolHandleAt(e.firstInput.documentPoint,this.name)!==null:!1},Rt.prototype.doActivate=function(){var e=this.diagram;this.handle===null&&(this.handle=this.findToolHandleAt(e.firstInput.documentPoint,this.name)),this.handle!==null&&(this.adornedObject=this.handle.part.adornedObject,this.adornedObject!==null&&(e.isMouseCaptured=!0,e.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))},Rt.prototype.doDeactivate=function(){var e=this.diagram;this.stopTransaction(),this.ue=this.handle=null,this.isActive=e.isMouseCaptured=!1},Rt.prototype.stopTransaction=function(){var e=this.diagram,t=xr.prototype.stopTransaction.call(this);return t&&e.undoManager.transactionToUndo!==null&&e.undoManager.transactionToUndo.ak(),t},Rt.prototype.doCancel=function(){this.adornedObject!==null&&(this.adornedObject.desiredSize=this.originalDesiredSize,this.adornedObject.part.location=this.originalLocation),this.stopTool()},Rt.prototype.doMouseMove=function(){var e=this.diagram;if(this.isActive){var t=this.rt,n=this.qt,r=this.pt,i=this.adornedObject.qs(e.lastInput.documentPoint,Ue.alloc()),o=this.computeReshape();t=this.computeResize(i,this.handle.alignment,t,n,r,o),this.resize(t),e.bd(),Ue.free(i)}},Rt.prototype.doMouseUp=function(){var e=this.diagram;if(this.isActive){var t=this.rt,n=this.qt,r=this.pt,i=this.adornedObject.qs(e.lastInput.documentPoint,Ue.alloc()),o=this.computeReshape();t=this.computeResize(i,this.handle.alignment,t,n,r,o),this.resize(t),Ue.free(i),e.Ya(),this.transactionResult=this.name,e.R("PartResized",this.adornedObject,this.originalDesiredSize)}this.stopTool()},Rt.prototype.resize=function(e){var t=this.diagram,n=this.adornedObject;if(n!==null){if(n.desiredSize=e.size,e=n.part,e.Va(),n=n.ga(this.handle.alignment.gv()),e instanceof lr){var r=new tn;if(r.add(e),!this.dragsMembers&&e.placeholder===null){var i=new C;i.dragsMembers=!1}t.moveParts(r,this.oppositePoint.copy().re(n),!0,i)}else e.location=e.location.copy().re(n).add(this.oppositePoint);t.bd()}},Rt.prototype.computeResize=function(e,t,n,r,i,o){t.Mc()&&(t=jr);var a=this.adornedObject.naturalBounds,p=a.x,w=a.y,O=a.x+a.width,D=a.y+a.height,X=1;if(!o){X=a.width;var re=a.height;0>=X&&(X=1),0>=re&&(re=1),X=re/X}return re=Ue.alloc(),vt.No(e.x,e.y,p,w,i.width,i.height,re),e=a.copy(),0>=t.x?0>=t.y?(e.x=Math.max(re.x,O-r.width),e.x=Math.min(e.x,O-n.width),e.width=Math.max(O-e.x,n.width),e.y=Math.max(re.y,D-r.height),e.y=Math.min(e.y,D-n.height),e.height=Math.max(D-e.y,n.height),o||(1<=e.height/e.width?(e.height=Math.max(Math.min(X*e.width,r.height),n.height),e.width=e.height/X):(e.width=Math.max(Math.min(e.height/X,r.width),n.width),e.height=X*e.width),e.x=O-e.width,e.y=D-e.height)):1<=t.y?(e.x=Math.max(re.x,O-r.width),e.x=Math.min(e.x,O-n.width),e.width=Math.max(O-e.x,n.width),e.height=Math.max(Math.min(re.y-w,r.height),n.height),o||(1<=e.height/e.width?(e.height=Math.max(Math.min(X*e.width,r.height),n.height),e.width=e.height/X):(e.width=Math.max(Math.min(e.height/X,r.width),n.width),e.height=X*e.width),e.x=O-e.width)):(e.x=Math.max(re.x,O-r.width),e.x=Math.min(e.x,O-n.width),e.width=O-e.x,o||(e.height=Math.max(Math.min(X*e.width,r.height),n.height),e.width=e.height/X,e.y=w+.5*(D-w-e.height))):1<=t.x?0>=t.y?(e.width=Math.max(Math.min(re.x-p,r.width),n.width),e.y=Math.max(re.y,D-r.height),e.y=Math.min(e.y,D-n.height),e.height=Math.max(D-e.y,n.height),o||(1<=e.height/e.width?(e.height=Math.max(Math.min(X*e.width,r.height),n.height),e.width=e.height/X):(e.width=Math.max(Math.min(e.height/X,r.width),n.width),e.height=X*e.width),e.y=D-e.height)):1<=t.y?(e.width=Math.max(Math.min(re.x-p,r.width),n.width),e.height=Math.max(Math.min(re.y-w,r.height),n.height),o||(1<=e.height/e.width?(e.height=Math.max(Math.min(X*e.width,r.height),n.height),e.width=e.height/X):(e.width=Math.max(Math.min(e.height/X,r.width),n.width),e.height=X*e.width))):(e.width=Math.max(Math.min(re.x-p,r.width),n.width),o||(e.height=Math.max(Math.min(X*e.width,r.height),n.height),e.width=e.height/X,e.y=w+.5*(D-w-e.height))):0>=t.y?(e.y=Math.max(re.y,D-r.height),e.y=Math.min(e.y,D-n.height),e.height=D-e.y,o||(e.width=Math.max(Math.min(e.height/X,r.width),n.width),e.height=X*e.width,e.x=p+.5*(O-p-e.width))):1<=t.y&&(e.height=Math.max(Math.min(re.y-w,r.height),n.height),o||(e.width=Math.max(Math.min(e.height/X,r.width),n.width),e.height=X*e.width,e.x=p+.5*(O-p-e.width))),Ue.free(re),e},Rt.prototype.computeReshape=function(){var e=Wt;return this.adornedObject instanceof vr&&(e=Pv(this.adornedObject)),!(e===Dn||this.diagram.lastInput.shift)},Rt.prototype.computeMinSize=function(){var e=this.adornedObject.minSize.copy(),t=this.minSize;return!isNaN(t.width)&&t.width>e.width&&(e.width=t.width),!isNaN(t.height)&&t.height>e.height&&(e.height=t.height),e},Rt.prototype.computeMaxSize=function(){var e=this.adornedObject.maxSize.copy(),t=this.maxSize;return!isNaN(t.width)&&t.widthn?n+=360:360<=n&&(n-=360),n=Math.round(45*Math.round(n/45));var r=this.handleDistance;return n===0?t.x=e.naturalBounds.width+r:n===45?(t.x=e.naturalBounds.width+r,t.y=e.naturalBounds.height+r):n===90?t.y=e.naturalBounds.height+r:n===135?(t.x=-r,t.y=e.naturalBounds.height+r):n===180?t.x=-r:n===225?(t.x=-r,t.y=-r):n===270?t.y=-r:n===315&&(t.x=e.naturalBounds.width+r,t.y=-r),e.ga(t)},Zt.prototype.doDeactivate=function(){var e=this.diagram;this.stopTransaction(),this.ue=this.handle=null,this.kr=new Ue(NaN,NaN),this.isActive=e.isMouseCaptured=!1},Zt.prototype.stopTransaction=function(){var e=this.diagram,t=xr.prototype.stopTransaction.call(this);return t&&e.undoManager.transactionToUndo!==null&&e.undoManager.transactionToUndo.ak(),t},Zt.prototype.doCancel=function(){this.diagram.delaysLayout=!1,this.rotate(this.originalAngle),this.stopTool()},Zt.prototype.doMouseMove=function(){var e=this.diagram;this.isActive&&(e=this.computeRotate(e.lastInput.documentPoint),this.rotate(e))},Zt.prototype.doMouseUp=function(){var e=this.diagram;if(this.isActive){e.delaysLayout=!1;var t=this.computeRotate(e.lastInput.documentPoint);this.rotate(t),e.Ya(),this.transactionResult=this.name,e.R("PartRotated",this.adornedObject,this.originalAngle)}this.stopTool()},Zt.prototype.rotate=function(e){var t=this.adornedObject;if(t!==null){t.angle=e,t=t.part,t.Va();var n=t.locationObject,r=t.rotateObject;(n===r||n.rg(r))&&(n=this.Tn.copy(),t.location=n.re(this.rotationPoint).rotate(e-this.originalAngle).add(this.rotationPoint)),this.diagram.bd()}},Zt.prototype.computeRotate=function(e){e=this.rotationPoint.ab(e)-this.handleAngle;var t=this.adornedObject.panel;t!==null&&(e-=t.li()),360<=e?e-=360:0>e&&(e+=360),t=Math.min(Math.abs(this.snapAngleMultiple),180);var n=Math.min(Math.abs(this.snapAngleEpsilon),t/2);return!this.diagram.lastInput.shift&&0t-n&&(e=(Math.floor(e/t)+1)*t)),360<=e?e-=360:0>e&&(e+=360),e},kn.Object.defineProperties(Zt.prototype,{handleArchetype:{get:function(){return this.o},set:function(e){this.o=e}},handle:{get:function(){return this.j},set:function(e){if(e!==null&&!(e.part instanceof qr))throw Error("new handle is not in an Adornment: "+e);this.j=e}},adornedObject:{get:function(){return this.ue},set:function(e){if(e!==null&&e.part instanceof qr)throw Error("new handle must not be in an Adornment: "+e);this.ue=e}},snapAngleMultiple:{get:function(){return this.ia},set:function(e){this.ia=e}},snapAngleEpsilon:{get:function(){return this.V},set:function(e){this.V=e}},originalAngle:{get:function(){return this.Cw}},rotationPoint:{get:function(){return this.kr},set:function(e){this.kr=e.copy()}},handleAngle:{get:function(){return this.u},set:function(e){this.u=e}},handleDistance:{get:function(){return this.F},set:function(e){this.F=e}}}),Zt.className="RotatingTool",Gi("rotatingTool",function(){return this.findTool("Rotating")},function(e){this.gb("Rotating",e,this.mouseDownTools)});function Jt(){xr.call(this),this.name="ClickSelecting"}Tn(Jt,xr),Jt.prototype.canStart=function(){return!(!this.isEnabled||this.isBeyondDragSize())},Jt.prototype.doMouseUp=function(){this.isActive&&(this.standardMouseSelect(),!this.standardMouseClick()&&this.diagram.lastInput.isTouchEvent&&this.diagram.toolManager.doToolTip()),this.stopTool()},Jt.className="ClickSelectingTool";function zt(){xr.call(this),this.name="Action",this.pk=null}Tn(zt,xr),zt.prototype.canStart=function(){if(!this.isEnabled)return!1;var e=this.diagram,t=e.lastInput,n=e.ic(t.documentPoint,function(r){for(;r.panel!==null&&!r.isActionable;)r=r.panel;return r});return n!==null&&n.isActionable?(this.pk=n,e.Ck=e.ic(t.documentPoint,null,null),!0):!1},zt.prototype.doMouseDown=function(){if(this.isActive){var e=this.diagram.lastInput,t=this.pk;t!==null&&(e.targetObject=t,t.actionDown!==null&&t.actionDown(e,t))}else this.canStart()&&this.doActivate()},zt.prototype.doMouseMove=function(){if(this.isActive){var e=this.diagram.lastInput,t=this.pk;t!==null&&(e.targetObject=t,t.actionMove!==null&&t.actionMove(e,t))}},zt.prototype.doMouseUp=function(){if(this.isActive){var e=this.diagram.lastInput,t=this.pk;if(t===null)return;e.targetObject=t,t.actionUp!==null&&t.actionUp(e,t),this.standardMouseClick(function(n){for(;n.panel!==null&&(!n.isActionable||n!==t);)n=n.panel;return n},function(n){return n===t})}this.stopTool()},zt.prototype.doCancel=function(){var e=this.diagram.lastInput,t=this.pk;t!==null&&(e.targetObject=t,t.actionCancel!==null&&t.actionCancel(e,t),this.stopTool())},zt.prototype.doStop=function(){this.pk=null},zt.className="ActionTool";function k(){xr.call(this),this.name="ClickCreating",this.Ri=null,this.o=!0,this.j=!1,this.mw=new Ue(0,0)}Tn(k,xr),k.prototype.canStart=function(){if(!this.isEnabled||this.archetypeNodeData===null)return!1;var e=this.diagram;if(e.isReadOnly||e.isModelReadOnly||!e.allowInsert||!e.lastInput.left||this.isBeyondDragSize())return!1;if(this.isDoubleClick){if(e.lastInput.clickCount===1&&(this.mw=e.lastInput.viewPoint.copy()),e.lastInput.clickCount!==2||this.isBeyondDragSize(this.mw))return!1}else if(e.lastInput.clickCount!==1)return!1;return!(e.currentTool!==this&&e.Ol(e.lastInput.documentPoint,!0)!==null)},k.prototype.doMouseUp=function(){var e=this.diagram;this.isActive&&this.insertPart(e.lastInput.documentPoint),this.stopTool()},k.prototype.insertPart=function(e){var t=this.diagram,n=this.archetypeNodeData;if(n===null)return null;var r=null;try{if(t.R("ChangingSelection",t.selection),this.Ea(this.name),n instanceof zn)n.Zc()&&(ql(n),r=n.copy(),r!==null&&t.add(r));else if(n!==null){var i=t.model.copyNodeData(n);bn(i)&&(t.model.xf(i),r=t.Lc(i))}if(r!==null){var o=Ue.allocAt(e.x,e.y);this.isGridSnapEnabled&&od(this.diagram,r,e,o),r.location=o,t.allowSelect&&(t.clearSelection(!0),r.isSelected=!0),Ue.free(o)}t.Ya(),this.transactionResult=this.name,t.R("PartCreated",r)}finally{this.stopTransaction(),t.R("ChangedSelection",t.selection)}return r},kn.Object.defineProperties(k.prototype,{archetypeNodeData:{get:function(){return this.Ri},set:function(e){this.Ri=e}},isDoubleClick:{get:function(){return this.o},set:function(e){this.o=e}},isGridSnapEnabled:{get:function(){return this.j},set:function(e){this.j=e}}}),k.className="ClickCreatingTool";function U(){xr.call(this),this.name="DragSelecting",this.Ik=175,this.o=!1;var e=new zn;e.layerName="Tool",e.selectable=!1;var t=new vr;t.name="SHAPE",t.figure="Rectangle",t.fill=null,t.stroke="magenta",e.add(t),this.j=e}Tn(U,xr),U.prototype.canStart=function(){if(!this.isEnabled)return!1;var e=this.diagram;if(!e.allowSelect)return!1;var t=e.lastInput;return!(!t.left||e.currentTool!==this&&(!this.isBeyondDragSize()||t.timestamp-e.firstInput.timestampi.right&&(n.x-=r.width+5/t.scale),n.xi.bottom&&(n.y-=r.height+5/t.scale),n.ye.lastInput.clickCount)):!1},$n.prototype.doStart=function(){Va=this,this.textBlock!==null&&this.doActivate()},$n.prototype.doActivate=function(){if(!this.isActive){var e=this.diagram;if(e!==null){var t=this.textBlock;if(t===null&&(t=e.ic(e.lastInput.documentPoint)),t!==null&&t instanceof Vi&&(this.textBlock=t,t.part!==null)){e.animationManager.Cc(),this.isActive=!0,this.qa=Is;var n=this.defaultTextEditor;t.textEditor!==null&&(n=t.textEditor),this.Zh=this.textBlock.copy();var r=new Nt(this.textBlock.ga(No),this.textBlock.ga(ks));e.tv(r),n.show(t,e,this),this.currentTextEditor=n}}}},$n.prototype.doCancel=function(){this.stopTool()},$n.prototype.doMouseUp=function(){this.canStart()&&this.doActivate()},$n.prototype.doMouseDown=function(){this.isActive&&this.acceptText(Eo)},$n.prototype.acceptText=function(e){switch(e){case Eo:this.qa===Do?this.currentTextEditor instanceof HTMLElement&&this.currentTextEditor.focus():(this.qa===Is||this.qa===Ol||this.qa===Wa)&&(this.qa=wu,Ur(this));break;case uo:case Qs:case Mo:(Qs!==e||this.textBlock.isMultiline!==!0)&&(this.qa===Is||this.qa===Ol||this.qa===Wa)&&(this.qa=wu,Ur(this))}};function Ur(e){var t=e.textBlock,n=e.diagram,r=e.currentTextEditor;if(t!==null&&r!==null){var i=t.text,o="";r.valueFunction!==null&&(o=r.valueFunction()),e.isValidText(t,i,o)?(e.Ea(e.name),e.qa=Do,e.transactionResult=e.name,t.text=o,e.doSuccess(i,o),n!==null&&n.R("TextEdited",t,i),e.stopTransaction(),e.stopTool(),n!==null&&n.doFocus()):(e.qa=Ol,e.doError(i,o))}}$n.prototype.doError=function(e,t){var n=this.textBlock;n.errorFunction!==null&&n.errorFunction(this,e,t),(e=this.currentTextEditor)&&e.show(n,this.diagram,this)},$n.prototype.doSuccess=function(e,t){var n=this.textBlock;n.textEdited!==null&&n.textEdited(n,e,t)},$n.prototype.doDeactivate=function(){var e=this.diagram;e!==null&&(this.qa=en,this.currentTextEditor!==null&&this.currentTextEditor.hide(e,this),this.textBlock=null,this.isActive=!1)},$n.prototype.doStop=function(){Va=null},$n.prototype.isValidText=function(e,t,n){var r=this.textValidation;return r!==null&&!r(e,t,n)?!1:(r=e.textValidation,!!(r===null||r(e,t,n)))},$n.prototype.Lx=function(e){var t=this.Zh;return t.text=e,t.measure(this.textBlock.Ih,1/0),t},kn.Object.defineProperties($n.prototype,{textBlock:{get:function(){return this.ia},set:function(e){this.ia=e}},currentTextEditor:{get:function(){return this.o},set:function(e){this.o=e}},defaultTextEditor:{get:function(){return this.j},set:function(e){this.j=e}},starting:{get:function(){return this.V},set:function(e){this.V=e}},textValidation:{get:function(){return this.vj},set:function(e){this.vj=e}},minimumEditorScale:{get:function(){return this.u},set:function(e){this.u=e}},selectsTextOnActivate:{get:function(){return this.F},set:function(e){this.F=e}},state:{get:function(){return this.qa},set:function(e){this.qa!==e&&(this.qa=e)}}}),$n.prototype.measureTemporaryTextBlock=$n.prototype.Lx;var uo=new hn($n,"LostFocus",0),Eo=new hn($n,"MouseDown",1),Mo=new hn($n,"Tab",2),Qs=new hn($n,"Enter",3),$t=new hn($n,"SingleClick",0),Rs=new hn($n,"SingleClickSelected",1),Ao=new hn($n,"DoubleClick",2),en=new hn($n,"StateNone",0),Is=new hn($n,"StateActive",1),Wa=new hn($n,"StateEditing",2),wu=new hn($n,"StateValidating",3),Ol=new hn($n,"StateInvalid",4),Do=new hn($n,"StateValidated",5),Va=null;$n.className="TextEditingTool",$n.LostFocus=uo,$n.MouseDown=Eo,$n.Tab=Mo,$n.Enter=Qs,$n.SingleClick=$t,$n.SingleClickSelected=Rs,$n.DoubleClick=Ao,$n.StateNone=en,$n.StateActive=Is,$n.StateEditing=Wa,$n.StateValidating=wu,$n.StateInvalid=Ol,$n.StateValidated=Do,Gi("textEditingTool",function(){return this.findTool("TextEditing")},function(e){this.gb("TextEditing",e,this.mouseUpTools)});function ss(e){Un||(vl(),Un=!0),this.H=Ya,this.Ok=this.zb=this.vq=this.bc=!1,this.Qw=!0,this.Pk=pr,this.Dm=!1,this.Gh=this.Jd=!0,this.Dg=600,this.cw=this.Ow=!1,this.Zd=new ut,this.ce=new Ii,this.ce.Yd=this,this.Ei=new ut,this.pu=new ut,this.Sr=new ut,this.pr=new ut,e&&Object.assign(this,e)}ss.prototype.Xe=function(e){this.H=e},ss.prototype.canStart=function(){return!0};function ra(e,t){e.Jd&&e.canStart(t)&&(e.Zd.add(t),e.defaultAnimation.isAnimating&&e.Cc(),Cs(e.H),e.zb=!0)}function Pa(e){if(e.Jd&&e.zb){var t=e.ce,n=e.H,r=e.Zd.contains("Model");r&&(e.Ok=!0,e.Pk===pr?(t.isViewportUnconstrained=!0,t.vc.clear(),t.add(n,"position",n.position.copy().offset(0,-200),n.position),t.add(n,"opacity",0,1)):e.Pk===po&&t.vc.clear(),e.Qw=!!(e.Pk===Ui&&n.du.D(n.pa)),n.R("InitialAnimationStarting",e)),r&&!e.Gh||t.vc.count===0?(e.Zd.clear(),e.zb=!1,t.vc.clear(),ha(t,n),e.Ok=!1,n.N()):(e.Zd.clear(),n.kg=!1,r=t.vc.get(n),n.autoScale!==pa&&r!==null&&(delete r.start.scale,delete r.end.scale),vn.requestAnimationFrame(function(){e.zb===!1||t.bc||(n.Gf("temporaryPixelRatio")&&da(n),Yh(n),e.zb=!1,t.start(),t.bc&&($l(e),n.Ya(),yl(t,0),ta(n,!0),Ka(e),n.R("AnimationStarting",e)))}))}}function rl(e){return e.Zd.contains("Trigger")&&e.Zd.count===1}function Cu(e,t,n,r){e.isTicking||rl(e)||t instanceof cn&&(t.fromNode!==null||t.toNode!==null)||e.ce.add(t,"position",n,r,!1)}ye=ss.prototype,ye.fv=function(e){return this.ce.fv(e)},ye.Xu=function(e){return this.ce.Xu(e)};function uu(e,t){function n(){if(0o?o+=360:w+=360),o=i(n,o,w-o,r)%360,a=i(n,a,O-a,r),p=i(n,p,D-p,r),n=i(n,e,t-e,r),"hsla("+o+", "+a+"%, "+p+"%, "+n+")"}function vl(){function e(n,r,i,o,a,p){n.position=new Ue(o(a,r.x,i.x-r.x,p),o(a,r.y,i.y-r.y,p))}var t=new nn;t.add("position:diagram",e),t.add("position",e),t.add("position:part",function(n,r,i,o,a,p){ae&&hr(e,">= 1",ss,"duration"),this.Dg=e}},isAnimating:{get:function(){return this.bc}},isTicking:{get:function(){return this.vq}},isInitial:{get:function(){return this.Gh},set:function(e){this.Gh=e}},defaultAnimation:{get:function(){return this.ce}},activeAnimations:{get:function(){return this.Ei}},initialAnimationStyle:{get:function(){return this.Pk},set:function(e){this.Pk=e}}}),ss.prototype.stopAnimation=ss.prototype.Cc;var Ll=null,Un=!1,pr=new hn(ss,"Default",1),Ui=new hn(ss,"AnimateLocations",2),po=new hn(ss,"None",3);ss.className="AnimationManager",ss.defineAnimationEffect=function(e,t){Un||(vl(),Un=!0),Ll.add(e,t)},ss.Default=pr,ss.AnimateLocations=Ui,ss.None=po;function Ii(e){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=Os,this.Wk=this.ho=!1,this.cu=1,this.au=0,this.Gd=this.Dg=NaN,this.gw=0,this.dn=null,this.o=kr,this.vc=new nn,this.Tt=new nn,this.yl=new ut,this.Ut=new ut,this.dw=Kc,e&&Object.assign(this,e)}Ii.prototype.suspend=function(){this.Xk=!0},Ii.prototype.advanceTo=function(e,t){t&&(this.Xk=!1),this.ho&&e>=this.Gd&&(this.Wk=!0,e-=this.Gd),this.gw=e,xa(this,!0),$l(this.Yd),ta(this.H),Ka(this.Yd),this.H.redraw()};function ha(e,t){if(e.Tt.clear(),e.Wk=!1,e.au=0,e.Gd=NaN,0e.cn?e.Gd:r-e.Qd;t&&(i=e.gw,ie.cn&&(e.ho&&!e.Wk?(e.Qd=+new Date,e.cn=e.Qd+e.Gd,e.Wk=!0):e.Ml(!1))}}}function yl(e,t){for(var n=e.Gd,r=e.vc.iterator,i=e.Wk;r.next();){var o=r.key;if(!(o instanceof gt&&o.diagram===null)){var a=r.value,p=i?a.end:a.start;a=i?a.start:a.end;var w=Ll,O;for(O in a)O==="position"&&(a["position:placeholder"]||a["position:nodeCollapse"])||w.get(O)===null||w.get(O)(o,p[O],a[O],e.Lp,t,n,e)}}}ye.stop=function(){return this.bc?(this.Ml(!0),this):this},ye.Ml=function(e){if(this.vu!==null&&this.vu.jo.remove(this.Nw),this.bc){var t=this.H,n=this.Yd;this.Xk=this.bc=n.Ok=!1,$l(n);for(var r=this.vc,i=this.yl.iterator;i.next();)t.remove(i.value);for(i=this.Ut.iterator;i.next();)i.value.v();i=this.ho,r=r.iterator;for(var o=Ll;r.next();){var a=r.key,p=r.value,w=i?p.end:p.start,O=i?p.start:p.end,D=p.Ku,X;for(X in O)if(o.get(X)!==null){var re=X;!p.Hu||re!=="position:nodeCollapse"&&re!=="position:placeholder"||(re="position"),o.get(re)(a,w[X],D[X]!==void 0?D[X]:p.Hu?w[X]:O[X],this.Lp,this.Gd,this.Gd,this)}p.Hu&&D.location!==void 0&&a instanceof zn&&(a.location=D.location),p.nv&&a instanceof zn&&a.Zb(!1)}if(t.As.clear(),gh(t,!1),t.Ya(),t.N(),ta(t,!0),n.defaultAnimation===this){for(X=n.pr.iterator;X.next();)i=X.value,i.Tg!==null&&(i.points=i.Tg,i.Tg=null);n.pr.clear()}ta(t,!0),this.isViewportUnconstrained&&(t.scrollMode=this.dw),Ka(n),this.au++,!e&&this.cu>this.au?(this.Wk=!1,this.start()):(this.dn&&this.dn(this),ha(this,null),n.Ml(this),t.$b())}},ye.Cj=function(e,t){var n=t.actualBounds,r=null;if(t instanceof lr&&(r=t.placeholder),r!==null?(n=r.ga(No),r=r.padding,n.x+=r.left,n.y+=r.top,this.add(e,"position",n,e.position,!1)):this.add(e,"position",new Ue(n.x+n.width/2,n.y+n.height/2),e.position,!1),this.add(e,"scale",.01,e.scale,!1),e instanceof lr)for(e=e.memberParts;e.next();)r=e.value,r instanceof En&&this.Cj(r,t)},ye.Aj=function(e,t){if(e.isVisible()){var n=null;if(t instanceof lr&&(n=t.placeholder),n!==null){var r=n.ga(No);n=n.padding,r.x+=n.left,r.y+=n.top,this.add(e,"position:placeholder",e.position,r,!0)}else this.add(e,"position:nodeCollapse",e.position,t,!0);if(this.add(e,"scale",e.scale,.01,!0),r=this.vc,r.contains(e)&&(r.I(e).nv=!0),e instanceof lr)for(e=e.memberParts;e.next();)r=e.value,r instanceof En&&this.Aj(r,t)}},ye.Ez=function(e){var t=this.Tt.get(e);return t===null&&(t={},this.Tt.add(e,t)),t},kn.Object.defineProperties(Ii.prototype,{duration:{get:function(){return this.Dg},set:function(e){1>e&&hr(e,">= 1",Ii,"duration"),this.Dg=e}},reversible:{get:function(){return this.ho},set:function(e){this.ho=e}},runCount:{get:function(){return this.cu},set:function(e){0e?n/2*e*e+t:-n/2*(--e*(e-2)-1)+t}function Ml(e,t,n,r){return e===r?t+n:n*(-Math.pow(2,-10*e/r)+1)+t}Ii.className="Animation",Ii.EaseLinear=function(e,t,n,r){return n*e/r+t},Ii.EaseInOutQuad=Os,Ii.EaseInQuad=function(e,t,n,r){return n*(e/=r)*e+t},Ii.EaseOutQuad=function(e,t,n,r){return-n*(e/=r)*(e-2)+t},Ii.EaseInExpo=function(e,t,n,r){return e===0?t:n*Math.pow(2,10*(e/r-1))+t},Ii.EaseOutExpo=Ml;function oa(e,t,n){this.start=e,this.end=t,this.Ku={},this.Hu=n,this.nv=!1}oa.className="AnimationState";function il(e,t,n){this.xd=null,this.rf=e,this.so=n||Gc,this.uk=null,t!==void 0&&(this.uk=t,n===void 0&&(this.so=vi))}il.prototype.copy=function(){var e=new il(this.rf);e.so=this.so;var t=this.uk;if(t!==null){var n={};t.duration!==void 0&&(n.duration=t.duration),t.finished!==void 0&&(n.finished=t.finished),t.easing!==void 0&&(n.easing=t.easing),e.uk=n}return e};function Gu(e,t){e=e.uk,e!==null&&(e.duration&&(t.duration=e.duration),e.finished&&(t.finished=e.finished),e.easing&&(t.easing=e.easing))}kn.Object.defineProperties(il.prototype,{propertyName:{get:function(){return this.rf},set:function(e){this.rf=e}},animationSettings:{get:function(){return this.uk},set:function(e){this.uk=e}},startCondition:{get:function(){return this.so},set:function(e){this.so=e}}});var Gc=new hn(il,"Default",1),vi=new hn(il,"Immediate",2),oi=new hn(il,"Bundled",3);il.className="AnimationTrigger",il.Default=Gc,il.Immediate=vi,il.Bundled=oi;function Qr(e){Ge(this),this.H=null,this.Pa=new tn,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=[],e&&Object.assign(this,e)}ye=Qr.prototype,ye.clear=function(){for(var e=this.Pa,t=0;t=e)return t;for(var n=0,r=0,i=0,o=0,a=0,p=this.Pa.iterator;p.next();){var w=p.value;w instanceof lr?i++:w instanceof En?r++:w instanceof cn?o++:w instanceof qr?a++:n++}if(p="",0n.Oq||p.height*i>n.Oq?t.gc(e,n):(i=t.actualBounds,o=t.naturalBounds,i.width===0||i.height===0||isNaN(i.x)||isNaN(i.y)||!t.isVisible()||(n=t.transform,t.areaBackground!==null&&(Ho(t,e,t.areaBackground,!0,!0,o,i),e.fillRect(i.x,i.y,i.width,i.height)),t.areaBackground===null&&t.background===null&&(Ho(t,e,"rgba(0,0,0,0.3)",!0,!1,o,i),e.fillRect(i.x,i.y,i.width,i.height)),t.background!==null&&(e.transform(n.m11,n.m12,n.m21,n.m22,n.dx,n.dy),Ho(t,e,t.background,!0,!1,o,i),e.fillRect(0,0,o.width/2,o.height/2),n.ws()||(t=1/(n.m11*n.m22-n.m12*n.m21),e.transform(n.m22*t,-n.m12*t,-n.m21*t,n.m11*t,t*(n.m21*n.dy-n.m22*n.dx),t*(n.m12*n.dx-n.m11*n.dy)))))),r&&(e.restore(),e.Vc(!0))}},ye.g=function(e,t,n,r,i){var o=this.diagram;o!==null&&o.cb(Fi,e,this,t,n,r,i)},ye.oi=function(e,t,n){var r=this.Pa;if(t.Ig=this,this===null&&la(t),e>=r.count)e=r.count;else if(r.M(e)===t)return-1;return r.Gb(e,t),t.Vo(n),r=this.diagram,r!==null&&(n?r.N():r.oi(t)),Wu(this,e,t),e},ye.pc=function(e,t,n){if(!n&&t.layer!==this&&t.layer!==null)return t.layer.pc(e,t,n);var r=this.Pa;if(0>e||e>=r.length){if(e=r.indexOf(t),0>e)return-1}else if(r.M(e)!==t&&(e=r.indexOf(t),0>e))return-1;return t.Wo(n),r.mb(e),r=this.diagram,r!==null&&(n?r.N():r.pc(t)),t.Ig=null,la(t),e};function Wu(e,t,n){if(t=hu(e,t,n),n instanceof lr&&n!==null&&isNaN(n.zOrder)){if(n.memberParts.count!==0){for(var r=-1,i=e.Pa.s,o=i.length,a=0;ar&&p.containingGroup===n&&(r=a,0<=t))break}!(0>r)&&r=i)return t;if(0>t&&(t=e.indexOf(n)),0>t)return-1;for(var o=t-1,a=NaN;0<=o&&(a=e.M(o).zOrder,!!isNaN(a));)o--;for(var p=t+1,w=NaN;pr)for(;;){if(o===-1||a<=r){if(o++,o===t)break;return e.mb(t),e.Gb(o,n),o}for(a=NaN;0<=--o&&(a=e.M(o).zOrder,isNaN(a)););}else if(!isNaN(w)&&w=r){if(p--,p===t)break;return e.mb(t),e.Gb(p,n),p}for(w=NaN;++pe||1=e)return t;for(var n=this.Wa.iterator;n.next();)t+=` `+n.value.toString(e-1);return t};function Kh(e,t){if(Po){if(t!=null||Lt("Diagram setup requires an argument DIV."),e.Ka!==null&&Lt("Diagram has already completed setup."),typeof t=="string"?e.Ka=vn.document.getElementById(t):t instanceof HTMLDivElement?e.Ka=t:Lt("No DIV or DIV id supplied: "+t),e.Ka===null&&Lt("Invalid DIV id; could not get element with id: "+t),e.Ka.H!==void 0&&Lt("Invalid div id; div already has a Diagram associated with it."),!e.ol&&vn.ResizeObserver){var n=bi(function(){e.$b()},250);e.ol=new vn.ResizeObserver(function(){n()}),e.ol.observe(e.Ka)}vn.getComputedStyle(e.Ka,null).position==="static"&&(e.Ka.style.position="relative"),t=5;var r="rgba(2"+t+"5, 255, 255, 0)";t--,e.Ka.style["-webkit-tap-highlight-color"]=r,e.Ka.innerHTML="",e.Ka.H=e,e.Ka.goDiagram=e,e.Ka.go=vn.go;var i=new Ql(e);if(i.style!==void 0&&(i.style.position="absolute",i.style.top="0px",i.style.left="0px",vn.getComputedStyle(e.Ka,null).getPropertyValue("direction")==="rtl"&&(e.tn=!0),i.style.zIndex="2",i.style.userSelect="none",i.style.MozUserSelect="none",i.style.touchAction="none",i.style.letterSpacing="normal !important",i.style.wordSpacing="normal !important"),e.ta=i,e.ib=i.context,r=e.ib,e.Mb=e.computePixelRatio(),e.viewSize.w()||(e.Aa=e.Ka.clientWidth||1,e.ya=e.Ka.clientHeight||1),tp(e,e.Aa,e.ya),e.Ka.insertBefore(i.Oa,e.Ka.firstChild),i=new Ql(null),i.width=1,i.height=1,e.jw=i,e.oy=i.context,Po){i=mi("div");var o=mi("div");i.style.position="absolute",i.style.overflow="auto",i.style.width=e.Aa+"px",i.style.height=e.ya+"px",i.style.zIndex="1",o.style.position="absolute",o.style.width="1px",o.style.height="1px",e.Ka.appendChild(i),i.appendChild(o),i.onscroll=Xh,i.addEventListener("pointerdown",_f),i.H=e,i.uy=!0,i.vy=!0,e.ku=i,e.hu=o}e.hk=bi(function(){e.Yh=null,e.N()},300),e.Ov=bi(function(){Yh(e)},250),e.preventDefault=function(a){return a.preventDefault(),!1},e.$j=function(a){if(e.isEnabled){var p=$a(e,a,!0);p.bubbles=!0;var w=0,O=0;p.delta=0,a.deltaX!==void 0?(a.deltaX!==0&&(w=0Math.abs(a.deltaY)?-w:-O):a.wheelDeltaX!==void 0?(a.wheelDeltaX!==0&&(w=0Math.abs(a.wheelDeltaY)?-w:-O):a.wheelDelta!==void 0&&a.wheelDelta!==0&&(p.delta=0p||Math.abs(O.y-a.screenY)>p)?e.yq++:e.yq=1,w.clickCount=e.yq,e.tw=a.timeStamp,e.uw.sg(a.screenX,a.screenY),e.doMouseDown(),a.button===1?a.preventDefault():Xi(w,a)}},e.dk=function(a){if(e.isEnabled){e.Vk=!0;var p=e.oj;if(p[0]===null||p[0].pointerId!==a.pointerId&&p[0].pointerType===a.pointerType){if(p[1]!==null&&p[1].pointerId===a.pointerId){p[1]=a;return}if(p[0]===null)p[0]=a;else return}else p[0]=a;if(p[0].pointerId===a.pointerId){p=vo(e,a,!1,!1,!1,p[1]!==null);var w=vn.document.elementFromPoint(a.clientX,a.clientY)||null;w!==null&&w.shadowRoot!==void 0&&w.shadowRoot!==null&&(w=w.shadowRoot.elementFromPoint(a.clientX,a.clientY));var O=e,D=a;w&&w.H&&(D=a,O=w.H),p.targetDiagram=O,$s(e,D,p),p.targetObject=null,e.doMouseMove(),Xi(p,a)}}},e.fk=function(a){if(e.isEnabled){e.Vk=!0;var p=a.pointerType==="touch"||a.pointerType==="pen",w=e.Yt;if(p&&e.qu)delete w[a.pointerId],a.preventDefault();else if(w=e.oj,w[0]===null||w[0].pointerId!==a.pointerId&&w[0].pointerType===a.pointerType)w[1]!==null&&w[1].pointerId===a.pointerId&&(w[1]=null);else{w[0]=null,w=vo(e,a,!1,!0,!0,!1);var O=vn.document.elementFromPoint(a.clientX,a.clientY)||null;O!==null&&O.shadowRoot!==void 0&&O.shadowRoot!==null&&(O=O.shadowRoot.elementFromPoint(a.clientX,a.clientY)),O!==null&&O.H instanceof Ct&&O.H!==e&&$s(O.H,a,w),O===null&&(O=a.target),$s(e,a,w),w.clickCount=e.yq,w.targetDiagram=kf(a,O),w.targetObject=null,e.doMouseUp(),Xi(w,a),p&&(e.wq=!1)}}},e.ek=function(a){if(e.isEnabled){e.Vk=!1;var p=e.Yt;p[a.pointerId]&&delete p[a.pointerId],p=e.oj,p[0]!==null&&p[0].pointerId===a.pointerId&&(p[0]=null),p[1]!==null&&p[1].pointerId===a.pointerId&&(p[1]=null),a.pointerType!=="touch"&&a.pointerType!=="pen"&&(a=e.currentTool,a.cancelWaitAfter(),a.standardMouseOver())}},e.ck=function(a){var p=e.oj;p[0]!==null&&p[0].pointerId===a.pointerId?(p[0]=null,e.wq=!1):p[1]!==null&&p[1].pointerId===a.pointerId&&(p[1]=null)},e.Vp=r.Z["d"+Lf[1]+Lf[2]+"wI"+rf.slice(1,5)]["b"+X1.slice(1,t)](r.Z,Of,t,t),r.Vc(!0),ep(e),e.nl==="svg"&&(t=e.pj.get("svg"),e.Ka.appendChild(t.Oa),e.ib=t.context)}}Ct.prototype.addEventListener=function(e,t,n,r){e.addEventListener(t,n,{capture:r,passive:!1})},Ct.prototype.removeEventListener=function(e,t,n,r){e.removeEventListener(t,n,{capture:r})};function ep(e){var t=e.ta.Oa;t instanceof HTMLCanvasElement||(t=e.div),e.addEventListener(t,"pointerdown",e.ui,!1),e.addEventListener(t,"pointermove",e.dk,!1),e.addEventListener(t,"pointerup",e.fk,!1),e.addEventListener(t,"pointerout",e.ek,!1),e.addEventListener(t,"pointercancel",e.ck,!1),e.addEventListener(t,"pointerenter",e.bz,!1),e.addEventListener(t,"pointerleave",e.cz,!1),e.addEventListener(t,"wheel",e.$j,!1),e.addEventListener(t,"keydown",e.Qz,!1),e.addEventListener(t,"keyup",e.Rz,!1),e.addEventListener(t,"blur",e.Ny,!1),e.addEventListener(t,"focus",e.Oy,!1),e.addEventListener(t,"selectstart",function(n){return n.preventDefault(),!1},!1),e.addEventListener(t,"contextmenu",function(n){return n.preventDefault(),!1},!1),e.addEventListener(vn,"resize",e.Ov,!1)}function da(e){30Se&&(this.position=Xe.h(-(t.scrollWidth-this.Aa)+We-this.Aa/i+D,this.position.y))),e.vy&&this.allowVerticalScroll&&(pTe&&(this.position=Xe.h(this.position.x,-(t.scrollHeight-this.ya)+e.scrollTop-this.ya/i+o))),Ue.free(Xe),this.vd=!0,this.Ee=this.qr=!1,r=this.documentBounds,i=this.viewportBounds,D=r.right,Se=i.right,o=r.bottom,Te=i.bottom,a=r.x,X=i.x,p=r.y,r=i.y,re>=w&&a>=X&&D<=Se&&(n.style.width="1px"),de>=O&&p>=r&&o<=Te&&(n.style.height="1px"))}},Ct.prototype.computeBounds=function(e){return e===void 0&&(e=new Nt),Cs(this),Zh(this,e)};function Zh(e,t){if(e.fixedBounds.w())return t.assign(e.fixedBounds),t.Co(e.yb),t;for(var n=!0,r=e.Wa.s,i=r.length,o=0;on&&(t=n),te.maxScale&&(t=e.maxScale),t):t===Eh?(t=w>p?(a-e.Db)/r:(o-e.Db)/i,t>n&&(t=n),te.maxScale&&(t=e.maxScale),t):e.scale}Ct.prototype.zoomToFit=function(){var e=this.sj;this.sj=Kc,this.scale=wc(this,Sl),e!==Kc&&(ol(this,!1),Af(this,this.documentBounds,this.Aa/this.Ca,this.ya/this.Ca,this.zk,!1)),this.sj=e},ye=Ct.prototype,ye.BA=function(e,t){t===void 0&&(t=Sl);var n=e.width,r=e.height;if(!(n===0||r===0||isNaN(n)&&isNaN(r))){var i=1;if(t===Sl||t===Eh)if(isNaN(n))i=this.viewportBounds.height*this.scale/r;else if(isNaN(r))i=this.viewportBounds.width*this.scale/n;else{i=this.Aa;var o=this.ya;i=t===Eh?o/r>i/n?(o-(this.Be?this.Db:0))/r:(i-(this.gf?this.Db:0))/n:Math.min(o/r,i/n)}this.scale=i,this.position=new Ue(e.x,e.y)}},ye.Jy=function(e,t){this.Va();var n=this.documentBounds,r=this.viewportBounds;this.position=new Ue(n.x+(e.x*n.width+e.offsetX)-(t.x*r.width-t.offsetX),n.y+(e.y*n.height+e.offsetY)-(t.y*r.height-t.offsetY))},ye.zz=function(e){if(e instanceof gt){this.eq=e;var t=Ue.alloc();this.fq=this.op(e.ga(No,t)),Ue.free(t)}else this.eq=null,this.fq=Jr};function Af(e,t,n,r,i,o){var a=Ue.allocAt(e.pa.x,e.pa.y),p=a.x,w=a.y;if(e.eq!==null){var O=Ue.alloc();O=e.eq.ga(No,O),p=O.x-e.fq.x/e.scale,w=O.y-e.fq.y/e.scale,i=So,Ue.free(O)}(o||e.scrollMode===Kc)&&(i.sb()&&(n>t.width&&(p=t.x+(i.x*t.width+i.offsetX)-(i.x*n-i.offsetX)),r>t.height&&(w=t.y+(i.y*t.height+i.offsetY)-(i.y*r-i.offsetY))),i=e.rj,o=n-t.width,nt.left?p=t.left:pt.top?w=t.top:wt;t++){var n=e.De.iterator;if(n===null||e.De.count===0)break;e.De=new ut,e.Nv(n,e.De)}e.nodes.each(function(r){r instanceof lr&&r.U&65536&&(r.U=r.U^65536)})}}ye.Nv=function(e,t){for(e.reset();e.next();){var n=e.value;!n.Zc()||n instanceof lr||(n.si()?(n.measure(1/0,1/0),n.arrange()):t.add(n))}for(e.reset();e.next();)n=e.value,n instanceof lr&&n.isVisible()&&_c(this,n);for(e.reset();e.next();)n=e.value,n instanceof cn&&n.isVisible()&&(n.si()?(n.measure(1/0,1/0),n.arrange()):t.add(n));for(e.reset();e.next();)n=e.value,n instanceof qr&&n.isVisible()&&(n.si()?(n.measure(1/0,1/0),n.arrange()):t.add(n))};function _c(e,t){for(var n=yr(),r=yr(),i=t.memberParts;i.next();){var o=i.value;o.isVisible()&&(o instanceof lr?(El(o)||Ca(o)||Ch(o))&&_c(e,o):o instanceof cn?o.fromNode===t||o.toNode===t?r.push(o):n.push(o):(o.measure(1/0,1/0),o.arrange()))}for(e=n.length,i=0;ift&&(We=Sn.left,qe=Sn.right),Xe.height>Tt&&(tt=Sn.top,rt=Sn.bottom)):(We=Sn.left,qe=Sn.right,tt=Sn.top,rt=Sn.bottom);var Rn=Xe.width+We+qe,_n=Xe.height+tt+rt;Sn=e.scale;var ln=Rn>w/Sn,Gt=_n>O/Sn;if(!(o||e.gf||e.Be||ln||Gt))return!0;We=Xe.x-We,w=D.x,qe=Xe.right+qe,O=D.right+a,tt=Xe.y-tt;var ar=D.y;Xe=Xe.bottom+rt,D=D.bottom+p;var er="1px";if(rt="1px",e.scrollMode===Kc&&(ln||Gt)&&(ln&&e.hasHorizontalScrollbar&&e.allowHorizontalScroll&&(ln=1,We+1O+1&&(ln=Math.max((qe-O)*Sn+e.Aa,ln)),ft+a+1D+1&&(ln=Math.max((Xe-D)*Sn+e.ya,ln)),Tt+p+1<_n&&(ln=Math.max((_n-Tt)*Sn+e.ya,ln)),rt=ln.toString()+"px")),ln=er!=="1px",Gt=rt!=="1px",ln&&Gt||!ln&&!Gt||(Gt&&(O-=e.Db),ln&&(D-=e.Db),RnO+1&&(a=Math.max((qe-O)*Sn+e.Aa,a)),ft+1D+1&&(p=Math.max((Xe-D)*Sn+a,p)),Tt+1<_n&&(p=Math.max((_n-Tt)*Sn+a,p)),rt=p.toString()+"px"),Gt=rt!=="1px"),e.qr&&ln===e.Be&&Gt===e.gf)return n===e.Aa&&r===e.ya||e.bd(),!1;if(ln!==e.Be&&(er==="1px"?e.ya=e.ya+e.Db:e.ya=Math.max(e.ya-e.Db,1),o=!0),e.Be=ln,Te.style.width=er,Gt!==e.gf&&(rt==="1px"?e.Aa=e.Aa+e.Db:e.Aa=Math.max(e.Aa-e.Db,1),o=!0,e.tn&&(p=Ue.alloc(),Gt?(t.style.left=e.Db+"px",e.position=p.h(e.pa.x+e.Db/e.scale,e.pa.y)):(t.style.left="0px",e.position=p.h(e.pa.x-e.Db/e.scale,e.pa.y)),Ue.free(p))),o&&Yu(e),e.gf=Gt,Te.style.height=rt,e.gu=!0,o&&(e.pn=!0),t=Se.scrollLeft,e.hasHorizontalScrollbar&&e.allowHorizontalScroll&&(ft+1O+1&&(t=e.position.x*Sn)),e.tn)switch(e.bu){case"negative":t=-(Se.scrollWidth-t-Se.clientWidth);break;case"reverse":t=Se.scrollWidth-t-Se.clientWidth}return Se.scrollLeft=t,e.hasVerticalScrollbar&&e.allowVerticalScroll&&(Tt+1<_n?Se.scrollTop=(e.position.y-tt)*Sn:tt+1D+1&&(Se.scrollTop=e.position.y*Sn)),w=e.Aa,O=e.ya,Se.style.width=w+(e.gf?e.Db:0)+"px",Se.style.height=O+(e.Be?e.Db:0)+"px",n!==w||r!==O||e.animationManager.zb?(n=Nt.allocAt(i,X,re,de),e.onViewportBoundsChanged(n,e.viewportBounds,Sn,o),Nt.free(n),!1):!0}ye=Ct.prototype,ye.add=function(e){var t=e.diagram;if(t!==this&&(t!==null&&Lt("Cannot add part "+e.toString()+" to "+this.toString()+". It is already a part of "+t.toString()),t=this.Qj(e.layerName),t===null&&(t=this.Qj("")),t===null&&Lt('Cannot add a Part when unable find a Layer named "'+e.layerName+'" and there is no default Layer'),e.layer!==t)){var n=t.oi(99999999,e,e.diagram===this);0<=n&&this.cb(xo,"parts",t,null,e,null,n),t.isTemporary||this.Ya(),e.C(1),n=e.layerChanged,n!==null&&n(e,null,t)}},ye.oi=function(e){this.partManager.oi(e);var t=this;uf(e,function(n){ef(t,n)}),(e instanceof qr||e instanceof lr&&e.placeholder!==null)&&e.v(),e.data!==null&&uf(e,function(n){by(t.partManager,n)}),Ca(e)!==!0&&Ch(e)!==!0||this.De.add(e),Z0(e,!0,this),Q0(e)?(e.actualBounds.w()&&this.N(ff(e,e.actualBounds)),this.Ya()):e.isVisible()&&e.actualBounds.w()&&this.N(ff(e,e.actualBounds)),this.$b()},ye.pc=function(e){e.Ej(),this.partManager.pc(e);var t=this;e.data!==null&&uf(e,function(n){Sy(t.partManager,n,t)}),this.De.remove(e),Q0(e)?(e.actualBounds.w()&&this.N(ff(e,e.actualBounds)),this.Ya()):e.isVisible()&&e.actualBounds.w()&&this.N(ff(e,e.actualBounds)),this.$b()},ye.remove=function(e){np(this,e,!0)};function np(e,t,n){var r=t.layer;r!==null&&r.diagram===e&&(t.isSelected=!1,t.isHighlighted=!1,t.C(2),n&&t.Lj(),n=r.pc(-1,t,!1),0<=n&&e.cb(Lo,"parts",r,t,null,n,null),e=t.layerChanged,e!==null&&e(t,r,null))}ye.Is=function(e,t){if(t===void 0&&(t=!1),or(e))for(var n=e.length,r=0;rr&&this.Ya(),this},ye.Cy=function(e,t){ip(this,e,t),e.Xe(this);var n=this.Wa,r=n.indexOf(e);0<=r&&(n.remove(e),this.cc!==null&&this.cb(Lo,"layers",this,e,null,r,null));var i=n.count,o;for(o=0;or&&this.Ya(),this},ye.kA=function(e){if(e.diagram!==this&&Lt("Cannot remove a Layer from another Diagram: "+e+" of "+e.diagram),e.name!==""){var t=this.Wa,n=t.indexOf(e);if(t.remove(e)){for(t=e.Pa.copy().iterator;t.next();){var r=t.value,i=r.layerName;i!==e.name?r.layerName=i:r.layerName=""}this.cc!==null&&this.cb(Lo,"layers",this,e,null,n,null),this.N(),this.Ya()}}},ye.Qj=function(e){for(var t=this.layers;t.next();){var n=t.value;if(n.name===e)return n}return null},ye.Yw=function(e){return this.pf===null&&(this.pf=new tn),this.pf.add(e),this.model.Pe(e),this},ye.mA=function(e){this.pf!==null&&(this.pf.remove(e),this.pf.count===0&&(this.pf=null)),this.model.ik(e)},ye.Pe=function(e){return this.zg===null&&(this.zg=new tn),this.zg.add(e),this},ye.ik=function(e){this.zg!==null&&(this.zg.remove(e),this.zg.count===0&&(this.zg=null))},ye.ds=function(e){if(this.skipsUndoManager||this.model.skipsUndoManager||this.model.undoManager.Tu(e),e.change!==Gs&&(this.isModified=!0),this.zg!==null)for(var t=this.zg,n=t.length,r=0;rX.Pa.indexOf(de)&&X.oi(re,de,Se):(de.isSelected=!1,de.isHighlighted=!1,de.Wb(),X.pc(Se?re:-1,de,Se)))}else X instanceof Ct?typeof re=="number"&&de instanceof Qr&&(t?(de.Xe(this),this.Wa.Gb(re,de)):this.Wa.mb(re)):Lt("unknown ChangedEvent.Remove object: "+e.toString());this.isModified=!0}else r!==Gs&&Lt("unknown ChangedEvent: "+e.toString())}finally{this.skipsModelSourceBindings=n}}},Ct.prototype.Ea=function(e){return this.undoManager.Ea(e)},Ct.prototype.eb=function(e){return this.undoManager.eb(e)},Ct.prototype.Kf=function(){return this.undoManager.Kf()},Ct.prototype.commit=function(e,t){t===void 0&&(t="");var n=this.skipsUndoManager;t===null&&(this.skipsUndoManager=!0,t=""),this.undoManager.Ea(t);var r=!1;try{e(this),r=!0}finally{r?this.undoManager.eb(t):this.undoManager.Kf(),this.skipsUndoManager=n}},Ct.prototype.updateAllTargetBindings=function(e){this.partManager.updateAllTargetBindings(e)},Ct.prototype.rp=function(){this.partManager.rp()};function op(e,t,n){var r=e.animationManager;if(e.vb||e.ld)e.Ca=n,Yu(e),e.N(),e.Ee=!0,r.zb&&(rl(r)||r.ce.add(r.H,"scale",t,e.Ca));else if(e.ta===null)e.Ca=n,Yu(e);else{e.vb=!0;var i=e.viewportBounds.copy(),o=e.Aa,a=e.ya,p=e.zoomPoint.x,w=e.zoomPoint.y,O=e.contentAlignment;isNaN(p)&&(O.$c()?O.Hf(tl)?p=0:O.Hf(rs)&&(p=o-1):p=O.sb()?O.x*(o-1):o/2),isNaN(w)&&(O.$c()?O.Hf(Ma)?w=0:O.Hf(Bo)&&(w=a-1):w=O.sb()?O.y*(a-1):a/2),e.scaleComputation===null||e.animationManager.defaultAnimation.isAnimating||(n=e.scaleComputation(e,n)),ne.maxScale&&(n=e.maxScale),o=Ue.allocAt(e.pa.x+p/t-p/n,e.pa.y+w/t-w/n),e.position=o,Ue.free(o),e.Ca=n,Yu(e),e.vb=!1,e.onViewportBoundsChanged(i,e.viewportBounds,t,!1),ol(e,!1),r.zb&&(rl(r)||r.ce.add(r.H,"scale",t,e.Ca))}}Ct.prototype.onViewportBoundsChanged=function(e,t,n,r){if(!e.D(t)){r===void 0&&(r=!1),r||(this.Ee=!0),this.vd=!0;var i=this.layout;i===null||!i.isViewportSized||this.autoScale!==pa||e.width===t.width&&e.height===t.height||i.C(),i=this.currentTool,this.Vk===!0&&i instanceof Wi&&(this.lastInput.documentPoint=this.Ps(this.lastInput.viewPoint),zc(i,this)),this.vb||this.invalidateViewport(e,t),Ku(this),this.fc.scale=n,this.fc.position.x=e.x,this.fc.position.y=e.y,this.fc.bounds.assign(e),this.fc.canvasSize.width=Math.round(e.width*n),this.fc.canvasSize.height=Math.round(e.height*n),this.fc.newCanvasSize.width=this.Aa,this.fc.newCanvasSize.height=this.ya,this.fc.isScroll=r,this.R("ViewportBoundsChanged",this.fc,e),this.isVirtualized&&this.links.each(function(o){o.isAvoiding&&o.actualBounds.Yc(t)&&o.bb()})}};function Ku(e,t){var n=e.fe;if(n!==null&&n.visible){for(var r=Yt.alloc(),i=1,o=1,a=n.O.s,p=a.length,w=0;wD||(Av(O.figure)?o=o*D/vt.vx(o,D):i=i*D/vt.vx(i,D))}if(a=n.gridCellSize,r.h(o*a.width,i*a.height),t!==void 0)i=t.width,o=t.height,e=t.x,a=t.y;else{if(t=Nt.alloc(),e=e.viewportBounds,t.h(e.x,e.y,e.width,e.height),!t.w()){Nt.free(t);return}i=t.width,o=t.height,e=t.x,a=t.y,Nt.free(t)}n.width=i+2*r.width,n.height=o+2*r.height,t=Ue.alloc(),vt.No(e,a,0,0,r.width,r.height,t),t.offset(-r.width,-r.height),Yt.free(r),n.part.location=t,Ue.free(t)}}Ct.prototype.clearSelection=function(e){e===void 0&&(e=!1);var t=this.selection;if(t.count!==0){e||this.R("ChangingSelection",t);for(var n=t.Fa(),r=n.length,i=0;i=r&&!o.defaultAnimation.isAnimating&&!o.zb&&(t||ra(o,"Layout")),e.xh=!1;for(var a=e.ai.iterator;a.next();)cp(e,a.value,t,r);i.isValidLayout||(!t||i.isRealtime||i.isRealtime===null||r===0?(i.doLayout(e),Cs(e),i.isValidLayout=!0):e.xh=!0)}finally{t=e.undoManager.isInternalTransaction,r===0&&(e.eb("Layout"),e.undoManager.isInternalTransaction=!1),!t||r!==0&&r!==1||Pa(o),e.aa=n}}}function cp(e,t,n,r){if(t!==null){for(var i=t.gl.iterator;i.next();)cp(e,i.value,n,r);i=t.layout,i===null||i.isValidLayout||(!n||i.isRealtime||r===0?(t.rh=!t.location.w(),i.doLayout(t),t.C(32),_c(e,t),i.isValidLayout=!0):e.xh=!0)}}ye.yz=function(){for(var e=new tn,t=this.nodes;t.next();){var n=t.value;n.isTopLevel&&n.kh()===null&&e.add(n)}return e.iterator};function dv(e){function t(i){var o=i.toLowerCase(),a=new tn;n.add(i,a),n.add(o,a),r.add(i,i),r.add(o,i)}var n=new nn,r=new nn;t("InitialAnimationStarting"),t("AnimationStarting"),t("AnimationFinished"),t("BackgroundSingleClicked"),t("BackgroundDoubleClicked"),t("BackgroundContextClicked"),t("ClipboardChanged"),t("ClipboardPasted"),t("DocumentBoundsChanged"),t("ExternalObjectsDropped"),t("GainedFocus"),t("InitialLayoutCompleted"),t("LayoutCompleted"),t("LinkDrawn"),t("LinkRelinked"),t("LinkReshaped"),t("LostFocus"),t("Modified"),t("ObjectSingleClicked"),t("ObjectDoubleClicked"),t("ObjectContextClicked"),t("PartCreated"),t("PartResized"),t("PartRotated"),t("SelectionMoved"),t("SelectionCopied"),t("SelectionDeleting"),t("SelectionDeleted"),t("SelectionGrouped"),t("SelectionUngrouped"),t("ChangingSelection"),t("ChangedSelection"),t("SubGraphCollapsed"),t("SubGraphExpanded"),t("TextEdited"),t("TreeCollapsed"),t("TreeExpanded"),t("ViewportBoundsChanged"),t("InvalidateDraw"),e.iw=n,e.hw=r}function vg(e,t){var n=e.hw.I(t);return n!==null?n:e.hw.I(t.toLowerCase())}function ld(e,t){var n=e.iw.I(t);if(n!==null||(n=e.iw.I(t.toLowerCase()),n!==null))return n;Lt("Unknown DiagramEvent name: "+t)}ye.Bj=function(e,t){return e=ld(this,e),e!==null&&e.add(t),this},ye.am=function(e,t){e=ld(this,e),e!==null&&e.remove(t)},ye.R=function(e,t,n){var r=ld(this,e),i=new gl;if(i.diagram=this,e=vg(this,e),e!==null&&(i.name=e),t!==void 0&&(i.subject=t),n!==void 0&&(i.parameter=n),t=r.length,t===1)r.M(0)(i);else if(t!==0)for(r=r.Fa(),n=0;n=n.top&&0>=n.left&&0>=n.right&&0>=n.bottom)return t;var r=this.viewportBounds,i=this.scale;r=Nt.allocAt(0,0,r.width*i,r.height*i);var o=Ue.allocAt(0,0);if(e.x>=r.x&&e.xr.x+r.width-n.right&&this.allowHorizontalScroll&&(a=Math.max(this.scrollHorizontalLineChange,1),a|=0,o.x+=a,e.x>r.x+r.width-n.right/2&&(o.x+=a),e.x>r.x+r.width-n.right/4&&(o.x+=4*a));return e.y>=r.y&&e.yr.y+r.height-n.bottom&&this.allowVerticalScroll&&(a=Math.max(this.scrollVerticalLineChange,1),a|=0,o.y+=a,e.y>r.y+r.height-n.bottom/2&&(o.y+=a),e.y>r.y+r.height-n.bottom/4&&(o.y+=4*a)),o.Xa(kr)||(t=new Ue(t.x+o.x/i,t.y+o.y/i)),Nt.free(r),Ue.free(o),t},ye=Ct.prototype,ye.Cs=function(){return null},ye.av=function(){return null},ye.bs=function(e,t){this.pj.add(e,t)},ye.Fu=function(e){(this.Pw=e)||this.nodes.each(function(t){t instanceof lr&&(t.$p=null)})};function Nf(e,t,n){function r(){var D=+new Date;for(o=!0,a.reset();a.next();)if(!a.value[0].al){o=!1;break}o||D-O>w?t(n,i,p):vn.requestAnimationFrame(r)}for(var i=n.callback,o=!0,a=e.Og.iterator;a.next();)if(!a.value[0].al){o=!1;break}if(typeof i!="function"||o)return t(n,i,e);var p=e,w=n.callbackTimeout||300,O=+new Date;return vn.requestAnimationFrame(function(){r()}),null}ye.Wz=function(e){return Po?(e===void 0&&(e={}),e.returnType="Image",this.Jx(e)):null},ye.Jx=function(e){return e===void 0&&(e={}),Nf(this,this.Xz,e)},ye.Xz=function(e,t,n){var r=bg(n,e,"canvas",null);if(r===null)return null;n=r.Z.canvas;var i=null;if(n!==null)switch(i=e.returnType,i===void 0?i="string":i=i.toLowerCase(),i){case rf+"data":i=r.getImageData(0,0,n.width,n.height);break;case rf:r=(e.document||document).createElement("img"),r.src=n.toDataURL(e.type,e.details),i=r;break;case"blob":return typeof t!="function"&&Lt('Error: Diagram.makeImageData called with "returnType: toBlob", but no required "callback" function property defined.'),typeof n.toBlob=="function"?(n.toBlob(t,e.type,e.details),"toBlob"):(t(null),null);default:i=n.toDataURL(e.type,e.details)}return typeof t=="function"?(t(i),null):i};function bg(e,t,n,r){if(e.animationManager.Cc(),e.bd(),e.ta===null)return null;typeof t!="object"&&Lt("properties argument must be an Object.");var i=t.size||null,o=t.scale||null;t.scale!==void 0&&isNaN(t.scale)&&(o="NaN");var a=t.maxSize;t.maxSize===void 0&&(a=n==="SVG"?new Yt(1/0,1/0):new Yt(2e3,2e3));var p=t.position||null,w=t.parts||null,O=t.padding===void 0?1:t.padding,D=t.background||null,X=t.omitTemporary;X===void 0&&(X=!0);var re=t.document||document,de=t.elementFinished||null,Se=t.showTemporary;Se===void 0&&(Se=!X),t=t.showGrid,t===void 0&&(t=Se),i!==null&&isNaN(i.width)&&isNaN(i.height)&&(i=null),typeof O=="number"?O=new Wn(O):O instanceof Wn||Lt("MakeImage padding must be a Margin or a number."),O.left=Math.max(O.left,0),O.right=Math.max(O.right,0),O.top=Math.max(O.top,0),O.bottom=Math.max(O.bottom,0),e.ib.Vc(!0),X=new Ql(null,re,void 0,!0);var Te=X.context;if(!(i||o||w||p))return X.width=e.Aa+Math.ceil(O.left+O.right),X.height=e.ya+Math.ceil(O.top+O.bottom),n==="SVG"?r===null?null:(r.resize(X.width,X.height,X.width,X.height),r.ownerDocument=re,r.hs=de,rd(e,r.context,O,new Yt(X.width,X.height),e.Ca,e.pa,w,D,Se,t),r.context):(e.Xm=!1,rd(e,Te,O,new Yt(X.width,X.height),e.Ca,e.pa,w,D,Se,t),e.Xm=!0,X.context);var Xe=e.Pp,We=e.documentBounds.copy();if(We.Fv(e.yb),Se)for(var qe=e.Wa.s,tt=qe.length,rt=0;rtXe?(o=Xe,i=We.width,We=We.height):(i=a.width,We=a.height)):(i=We.width*o,We=We.height*o):(o=Xe,i=We.width,We=We.height),O!==null?(i+=p,We+=tt):O=new Wn(0),a!==null&&(Xe=a.width,a=a.height,isNaN(Xe)&&(Xe=2e3),isNaN(a)&&(a=2e3),isFinite(Xe)&&(i=Math.min(i,Xe)),isFinite(a)&&(We=Math.min(We,a))),X.width=Math.ceil(i),X.height=Math.ceil(We),n==="SVG"?r===null?null:(r.resize(X.width,X.height,X.width,X.height),r.ownerDocument=re,r.hs=de,rd(e,r.context,O,new Yt(Math.ceil(i),Math.ceil(We)),o,qe,w,D,Se,t),r.context):(e.Xm=!1,rd(e,Te,O,new Yt(Math.ceil(i),Math.ceil(We)),o,qe,w,D,Se,t),e.Xm=!0,X.context)}kn.Object.defineProperties(Ct.prototype,{renderer:{get:function(){return this.nl},set:function(e){this instanceof q||(e===""&&(e="default"),e=e.toLowerCase(),e!==this.nl&&(this.nl=e,e==="default"||e==="canvas"?(e=this.pj.get("svg"),e!==null&&e.Oa.remove(),this.ta&&(this.ib=this.ta.context)):e==="svg"?(this.pj.contains("svg")?e=this.pj.get("svg"):(e=new $u(this,vn.document),this.bs("svg",e)),this.div!==null&&this.div.appendChild(e.Oa),this.ib=e.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))):e!=="debug"||this.pj.contains("SVG")||(e=new $u(this,vn.document),this.bs("SVG",e),e.Oa.style.backgroundColor="whitesmoke",this.div!==null&&this.div.after(e.Oa)),this.hk()))}},div:{get:function(){return this.Ka},set:function(e){if(this.Ka!==e){var t=this.Ka;t!==null?(t.H=void 0,t.goDiagram=void 0,t.go=void 0,t.innerHTML="",this.ta!==null&&(t=this.ta.Oa,this.removeEventListener(t,"pointermove",this.dk,!1),this.removeEventListener(t,"pointerdown",this.ui,!1),this.removeEventListener(t,"pointerup",this.fk,!1),this.removeEventListener(t,"pointerout",this.ek,!1),this.removeEventListener(t,"pointercancel",this.ck,!1),this.ta.mx()),this.ol&&(this.ol.disconnect(),this.ol=null),t=this.toolManager,t!==null&&(t.mouseDownTools.each(function(n){n.cancelWaitAfter()}),t.mouseMoveTools.each(function(n){n.cancelWaitAfter()}),t.mouseUpTools.each(function(n){n.cancelWaitAfter()})),t.cancelWaitAfter(),this.currentTool.doCancel(),this.ta=null,this.removeEventListener(vn,"resize",this.Ov,!1),this.removeEventListener(vn,"wheel",this.$j,!0),Ya===this&&(Ya=null)):this.ui===null&&(this.hf=!1),this.Ka=null,e!==null&&((t=e.H)&&(t.div=null),Kh(this,e),this.hk())}}},$w:{get:function(){return this.Sq}},pi:{get:function(){return this.hf}},draggedLink:{get:function(){return this.nt},set:function(e){this.nt!==e&&(this.nt=e,e!==null&&(this.Vt=e.fromPort,this.Wt=e.toPort))}},Mx:{get:function(){return this.Vt},set:function(e){this.Vt=e}},Nx:{get:function(){return this.Wt},set:function(e){this.Wt=e}},animationManager:{get:function(){return this.Yd}},undoManager:{get:function(){return this.cc.undoManager}},skipsUndoManager:{get:function(){return this.Wg},set:function(e){this.Wg=e,this.cc.skipsUndoManager=e}},delaysLayout:{get:function(){return this.lt},set:function(e){this.lt=e}},opacity:{get:function(){return this.pb},set:function(e){var t=this.pb;t!==e&&((0>e||1e&&hr(e,">= 0",Ct,"scrollHorizontalLineChange"),this.iu=e,this.g("scrollHorizontalLineChange",t,e))}},scrollVerticalLineChange:{get:function(){return this.mu},set:function(e){var t=this.mu;t!==e&&(0>e&&hr(e,">= 0",Ct,"scrollVerticalLineChange"),this.mu=e,this.g("scrollVerticalLineChange",t,e))}},lastInput:{get:function(){return this.cj},set:function(e){this.cj=e}},previousInput:{get:function(){return this.Qg},set:function(e){this.Qg=e}},firstInput:{get:function(){return this.bq},set:function(e){this.bq=e}},currentCursor:{get:function(){return this.it},set:function(e){if(e===""&&(e=this.Op),this.it!==e){var t=this.ta,n=this.Ka;if(t!==null&&n!==null){this.it=e;var r=t.style.cursor;t.style.cursor=e,n.style.cursor=e,t.style.cursor===r&&(t.style.cursor="-webkit-"+e,n.style.cursor="-webkit-"+e,t.style.cursor===r&&(t.style.cursor="-moz-"+e,n.style.cursor="-moz-"+e,t.style.cursor===r&&(t.style.cursor=e,n.style.cursor=e)))}}}},defaultCursor:{get:function(){return this.Op},set:function(e){e===""&&(e="auto");var t=this.Op;t!==e&&(this.Op=e,this.g("defaultCursor",t,e))}},click:{get:function(){return this.zh},set:function(e){var t=this.zh;t!==e&&(this.zh=e,this.g("click",t,e))}},doubleClick:{get:function(){return this.Fh},set:function(e){var t=this.Fh;t!==e&&(this.Fh=e,this.g("doubleClick",t,e))}},contextClick:{get:function(){return this.Bh},set:function(e){var t=this.Bh;t!==e&&(this.Bh=e,this.g("contextClick",t,e))}},mouseOver:{get:function(){return this.Qh},set:function(e){var t=this.Qh;t!==e&&(this.Qh=e,this.g("mouseOver",t,e))}},mouseHover:{get:function(){return this.Oh},set:function(e){var t=this.Oh;t!==e&&(this.Oh=e,this.g("mouseHover",t,e))}},mouseHold:{get:function(){return this.Nh},set:function(e){var t=this.Nh;t!==e&&(this.Nh=e,this.g("mouseHold",t,e))}},mouseDragOver:{get:function(){return this.Qt},set:function(e){var t=this.Qt;t!==e&&(this.Qt=e,this.g("mouseDragOver",t,e))}},mouseDrop:{get:function(){return this.Lh},set:function(e){var t=this.Lh;t!==e&&(this.Lh=e,this.g("mouseDrop",t,e))}},handlesDragDropForTopLevelParts:{get:function(){return this.xt},set:function(e){var t=this.xt;t!==e&&(this.xt=e,this.g("handlesDragDropForTopLevelParts",t,e))}},mouseEnter:{get:function(){return this.Mh},set:function(e){var t=this.Mh;t!==e&&(this.Mh=e,this.g("mouseEnter",t,e))}},mouseLeave:{get:function(){return this.Ph},set:function(e){var t=this.Ph;t!==e&&(this.Ph=e,this.g("mouseLeave",t,e))}},toolTip:{get:function(){return this.$h},set:function(e){var t=this.$h;t!==e&&(this.$h=e,this.g("toolTip",t,e))}},contextMenu:{get:function(){return this.Ch},set:function(e){var t=this.Ch;t!==e&&(this.Ch=e,this.g("contextMenu",t,e))}},commandHandler:{get:function(){return this.nb},set:function(e){this.nb!==e&&(this.nb=e,e.Xe(this))}},toolManager:{get:function(){return this.te},set:function(e){this.te!==e&&(this.te=e,e.diagram=this)}},defaultTool:{get:function(){return this.ob},set:function(e){var t=this.ob;t!==e&&(this.ob=e,e.diagram=this,this.currentTool===t&&(this.currentTool=e))}},currentTool:{get:function(){return this.hb},set:function(e){var t=this.hb;t&&(t.isActive&&t.doDeactivate(),t.cancelWaitAfter(),t.doStop()),e===null&&(e=this.defaultTool),e!==null&&(this.hb=e,e.diagram=this,e.doStart())}},selection:{get:function(){return this.Hw}},maxSelectionCount:{get:function(){return this.Nt},set:function(e){var t=this.Nt;if(t!==e)if(0<=e&&!isNaN(e)){if(this.Nt=e,this.g("maxSelectionCount",t,e),!this.undoManager.isUndoingRedoing&&(e=this.selection.count-e,0= 0",Ct,"maxSelectionCount")}},nodeSelectionAdornmentTemplate:{get:function(){return this.St},set:function(e){var t=this.St;t!==e&&(this.St=e,this.g("nodeSelectionAdornmentTemplate",t,e))}},groupSelectionAdornmentTemplate:{get:function(){return this.wt},set:function(e){var t=this.wt;t!==e&&(this.wt=e,this.g("groupSelectionAdornmentTemplate",t,e))}},linkSelectionAdornmentTemplate:{get:function(){return this.Kt},set:function(e){var t=this.Kt;t!==e&&(this.Kt=e,this.g("linkSelectionAdornmentTemplate",t,e))}},highlighteds:{get:function(){return this.nw}},isModified:{get:function(){var e=this.undoManager;return e.isEnabled?e.currentTransaction!==null?!0:this.rn&&this.Ce!==e.historyIndex:this.rn},set:function(e){if(this.rn!==e){this.rn=e;var t=this.undoManager;!e&&t.isEnabled&&(this.Ce=t.historyIndex),e||gg(this)}}},model:{get:function(){return this.cc},set:function(e){var t=this.cc;if(t!==e){this.currentTool.doCancel(),t&&t.undoManager!==e.undoManager&&t.undoManager.isInTransaction&&Lt("Do not replace a Diagram.model while a transaction is in progress."),this.animationManager.Cc(!0);var n=Cf(this,!0);this.hf=!1,this.fn=!0,this.Ce=-2,this.kg=!1;var r=this.vb;this.vb=!0,ra(this.animationManager,"Model"),t&&(this.pf!==null&&this.pf.each(function(o){return t.ik(o)}),t.ik(this.Oc)),this.cc=e,this.partManager=sp(this.cc.type);for(var i=0;ithis.scale&&(this.scale=e)):hr(e,"> 0",Ct,"minScale"))}},maxScale:{get:function(){return this.Mt},set:function(e){var t=this.Mt;t!==e&&(0 0",Ct,"maxScale"))}},zoomPoint:{get:function(){return this.zu},set:function(e){this.zu.D(e)||(this.zu=e=e.J())}},contentAlignment:{get:function(){return this.zk},set:function(e){var t=this.zk;t.D(e)||(this.zk=e=e.J(),this.g("contentAlignment",t,e),ol(this,!1))}},initialContentAlignment:{get:function(){return this.pq},set:function(e){var t=this.pq;t.D(e)||(this.pq=e=e.J(),this.g("initialContentAlignment",t,e))}},padding:{get:function(){return this.yb},set:function(e){typeof e=="number"&&(e=new Wn(e));var t=this.yb;t.D(e)||(this.yb=e=e.J(),this.Ya(),this.g("padding",t,e))}},partManager:{get:function(){return this.Pc},set:function(e){var t=this.Pc;t!==e&&(e.diagram!==null&&Lt("Cannot share PartManagers between Diagrams: "+e.toString()),t&&t.Xe(null),this.Pc=e,e.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(e){var t=this.Sc;t!==e&&(this.Sc=e,e.diagram=this,e.group=null,this.xh=!0,this.g("layout",t,e),this.$b())}},isTreePathToChildren:{get:function(){return this.Ht},set:function(e){var t=this.Ht;if(t!==e&&(this.Ht=e,this.g("isTreePathToChildren",t,e),!this.undoManager.isUndoingRedoing))for(e=this.nodes;e.next();)Np(e.value)}},treeCollapsePolicy:{get:function(){return this.uu},set:function(e){var t=this.uu;t!==e&&(e!==Yc&&e!==ps&&e!==dd&&Lt("Unknown Diagram.treeCollapsePolicy: "+e),this.uu=e,this.g("treeCollapsePolicy",t,e))}},Ue:{get:function(){return this.pw},set:function(e){this.pw=e}},avoidanceCellSize:{get:function(){return this.aw},set:function(e){this.Xh=null,this.aw=new Yt(Math.max(1,e.width),Math.max(1,e.height))}},avoidanceLimit:{get:function(){return this.bw},set:function(e){this.bw=Math.max(1,e)}},autoScrollInterval:{get:function(){return this.vp},set:function(e){var t=this.vp;t!==e&&(this.vp=e,this.g("autoScrollInterval",t,e))}},autoScrollRegion:{get:function(){return this.xp},set:function(e){typeof e=="number"&&(e=new Wn(e));var t=this.xp;t.D(e)||(this.xp=e=e.J(),this.Ya(),this.g("autoScrollRegion",t,e))}}}),kn.Object.defineProperties(Ct,{licenseKey:{get:function(){return vp.jc()},set:function(e){vp.add(e.replace(/\s/g,""))}},version:{get:function(){return nf}}}),Ct.prototype.makeImageData=Ct.prototype.Jx,Ct.prototype.makeImage=Ct.prototype.Wz,Ct.prototype.cacheGroupExternalLinks=Ct.prototype.Fu,Ct.prototype.addRenderer=Ct.prototype.bs,Ct.prototype.makeSVG=Ct.prototype.av,Ct.prototype.makeSvg=Ct.prototype.Cs,Ct.prototype.stopAutoScroll=Ct.prototype.ug,Ct.prototype.doAutoScroll=Ct.prototype.gs,Ct.prototype.isUnoccupied=Ct.prototype.Yj,Ct.prototype.raiseDiagramEvent=Ct.prototype.R,Ct.prototype.removeDiagramListener=Ct.prototype.am,Ct.prototype.addDiagramListener=Ct.prototype.Bj,Ct.prototype.findTreeRoots=Ct.prototype.yz,Ct.prototype.layoutDiagram=Ct.prototype.Uz,Ct.prototype.findTopLevelGroups=Ct.prototype.qz,Ct.prototype.findTopLevelNodesAndLinks=Ct.prototype.rz,Ct.prototype.ensureBounds=Ct.prototype.Va,Ct.prototype.findLinksByExample=Ct.prototype.ls,Ct.prototype.findNodesByExample=Ct.prototype.ms,Ct.prototype.findLinkForData=Ct.prototype.Kc,Ct.prototype.findNodeForData=Ct.prototype.ii,Ct.prototype.findPartForData=Ct.prototype.Lc,Ct.prototype.findLinkForKey=Ct.prototype.findLinkForKey,Ct.prototype.findNodeForKey=Ct.prototype.Vb,Ct.prototype.findPartForKey=Ct.prototype.findPartForKey,Ct.prototype.rebuildParts=Ct.prototype.Wd,Ct.prototype.transformViewToDoc=Ct.prototype.Ps,Ct.prototype.transformRectDocToView=Ct.prototype.zA,Ct.prototype.transformDocToView=Ct.prototype.op,Ct.prototype.centerRect=Ct.prototype.es,Ct.prototype.scrollToRect=Ct.prototype.tv,Ct.prototype.scroll=Ct.prototype.scroll,Ct.prototype.highlightCollection=Ct.prototype.Jz,Ct.prototype.highlight=Ct.prototype.Iz,Ct.prototype.selectCollection=Ct.prototype.rA,Ct.prototype.select=Ct.prototype.select,Ct.prototype.updateAllRelationshipsFromData=Ct.prototype.rp,Ct.prototype.updateAllTargetBindings=Ct.prototype.updateAllTargetBindings,Ct.prototype.commit=Ct.prototype.commit,Ct.prototype.rollbackTransaction=Ct.prototype.Kf,Ct.prototype.commitTransaction=Ct.prototype.eb,Ct.prototype.startTransaction=Ct.prototype.Ea,Ct.prototype.raiseChanged=Ct.prototype.g,Ct.prototype.raiseChangedEvent=Ct.prototype.cb,Ct.prototype.removeChangedListener=Ct.prototype.ik,Ct.prototype.addChangedListener=Ct.prototype.Pe,Ct.prototype.removeModelChangedListener=Ct.prototype.mA,Ct.prototype.addModelChangedListener=Ct.prototype.Yw,Ct.prototype.findLayer=Ct.prototype.Qj,Ct.prototype.removeLayer=Ct.prototype.kA,Ct.prototype.addLayerAfter=Ct.prototype.Cy,Ct.prototype.addLayerBefore=Ct.prototype.Ww,Ct.prototype.addLayer=Ct.prototype.Al,Ct.prototype.moveParts=Ct.prototype.moveParts,Ct.prototype.copyParts=Ct.prototype.Kj,Ct.prototype.removeParts=Ct.prototype.Is,Ct.prototype.remove=Ct.prototype.remove,Ct.prototype.add=Ct.prototype.add,Ct.prototype.clearDelayedGeometries=Ct.prototype.bx,Ct.prototype.setProperties=Ct.prototype.nm,Ct.prototype.attach=Ct.prototype.Du,Ct.prototype.set=Ct.prototype.set,Ct.prototype.resetInputOptions=Ct.prototype.Sx,Ct.prototype.setInputOption=Ct.prototype.sA,Ct.prototype.getInputOption=Ct.prototype.Ql,Ct.prototype.resetRenderingHints=Ct.prototype.Tx,Ct.prototype.setRenderingHint=Ct.prototype.Xx,Ct.prototype.getRenderingHint=Ct.prototype.Gf,Ct.prototype.maybeUpdate=Ct.prototype.bd,Ct.prototype.requestUpdate=Ct.prototype.$b,Ct.prototype.delayInitialization=Ct.prototype.Xy,Ct.prototype.isUpdateRequested=Ct.prototype.Pz,Ct.prototype.invalidateDocumentBounds=Ct.prototype.Ya,Ct.prototype.findObjectsNear=Ct.prototype.og,Ct.prototype.findPartsNear=Ct.prototype.mz,Ct.prototype.findObjectsIn=Ct.prototype.Cf,Ct.prototype.findPartsIn=Ct.prototype.ux,Ct.prototype.findObjectsAt=Ct.prototype.ji,Ct.prototype.findPartsAt=Ct.prototype.lz,Ct.prototype.findObjectAt=Ct.prototype.ic,Ct.prototype.findPartAt=Ct.prototype.Ol,Ct.prototype.focusObject=Ct.prototype.zz,Ct.prototype.alignDocument=Ct.prototype.Jy,Ct.prototype.zoomToRect=Ct.prototype.BA,Ct.prototype.zoomToFit=Ct.prototype.zoomToFit,Ct.prototype.diagramScroll=Ct.prototype.kx,Ct.prototype.focus=Ct.prototype.focus;var fd=new nn,Sg=null,Po=vn.document!==void 0,tf=null,xh="",pa=new hn(Ct,"None",0),Sl=new hn(Ct,"Uniform",1),Eh=new hn(Ct,"UniformToFill",2),Rf=new hn(Ct,"CycleAll",10),fp=new hn(Ct,"CycleNotDirected",11),dp=new hn(Ct,"CycleNotDirectedFast",12),pp=new hn(Ct,"CycleNotUndirected",13),gp=new hn(Ct,"CycleDestinationTree",14),mp=new hn(Ct,"CycleSourceTree",15),Kc=new hn(Ct,"DocumentScroll",1),If=new hn(Ct,"InfiniteScroll",2),Yc=new hn(Ct,"TreeParentCollapsed",21),ps=new hn(Ct,"AllParentsCollapsed",22),dd=new hn(Ct,"AnyParentsCollapsed",23),vp=new tn,nf="2.3.10",rf="image",Of=null,xg=!1;function sa(){if(Po){var e=vn.document.createElement("canvas"),t=e.getContext("2d"),n=sr("7ca11abfd022028846");t[n]=sr("398c3597c01238");for(var r=["5da73c80a36455d7038e4972187c3cae51fd22",Jn.Dx+"4ae6247590da4bb21c324ba3a84e385776",dr.xF+"fb236cdfda5de14c134ba1a95a2d4c7cc6f93c1387",vt.za],i=1;5>i;i++)t[sr("7ca11abfd7330390")](sr(r[i-1]),10,15*i);for(t[n]=sr("39f046ebb36e4b"),n=1;5>n;n++)t[sr("7ca11abfd7330390")](sr(r[n-1]),10,15*n);(r.length!==4||r[0][0]!=="5"||r[3][0]!=="7")&&(dr.prototype.Cd=dr.prototype.Eu),Of=e}}Ct.className="Diagram",Ct.fromDiv=function(e){var t=e;return typeof e=="string"&&(t=vn.document.getElementById(e)),t instanceof HTMLDivElement&&t.H instanceof Ct?t.H:null},Ct.inherit=function(e,t){function n(){}if(Object.getPrototypeOf(e).prototype)throw Error(`Used go.Diagram.inherit defining already defined class `+e);n.prototype=t.prototype,e.prototype=new n,e.prototype.constructor=e},Ct.useDOM=function(e){Po=e?vn.document!==void 0:!1},Ct.isUsingDOM=function(){return Po},Ct.None=pa,Ct.Uniform=Sl,Ct.UniformToFill=Eh,Ct.CycleAll=Rf,Ct.CycleNotDirected=fp,Ct.CycleNotDirectedFast=dp,Ct.CycleNotUndirected=pp,Ct.CycleDestinationTree=gp,Ct.CycleSourceTree=mp,Ct.DocumentScroll=Kc,Ct.InfiniteScroll=If,Ct.TreeParentCollapsed=Yc,Ct.AllParentsCollapsed=ps,Ct.AnyParentsCollapsed=dd;function Eg(){this.wy=null,this.j="zz@orderNum",this._tk==="63ad05bbe23a1786468a4c741b6d2"?this.Rc=this.j=!0:this.Rc=null}function of(e,t){if(t.ib.setTransform(t.Mb,0,0,t.Mb,0,0),t.ib.yc(),e.Rc===null)e:{t="f";var n=vn[sr("76a715b2f73f148a")][sr("72ba13b5")]||"";if(e.Rc=!0,Po){var r=Ct[sr("76a115b6ed251eaf4692")];if(r)for(var i=vp.iterator;i.next()&&(r=i.value,r=sr(r).split(sr("39e9")),!(6>r.length));){var o=sr(r[1]).split(".");if(r[4]!=="7da71ca0")break;var a=sr(Jn[sr("6cae19")]).split(".");if(o[0]>a[0]||o[0]===a[0]&&o[1]>=a[1]){var p=vn[sr("74a900bae4370f8b51")][sr("6fbb13a1c2311e8a57")].toLowerCase();if(a=p[sr("73a612b6fb191d")](sr("3aad1ab6e022098b4dc4")),o=sr(r[2]),-1a&&o!==sr("7da71ca0ad381e90")&&(a=t[sr("73a612b6fb191d")](sr("76a715b2ef3e149757"))),0>a&&(a=t[sr("73a612b6fb191d")](sr("76a715b2ef3e149757"))),0>a&&(a=t[sr("73a612b6fb191d")](sr("2bfa41fdb3784bca12"))),0>a&&(a=n[sr("73a612b6fb191d")](sr("7baa19a6f76c1988428554"))),e.Rc=!(0<=a&&ap),!e.Rc)))break;if(o[0]==="#"){a=vn.document.createElement("div");for(var w=r[0].replace(/[A-Za-z]/g,"");4>w.length;)w+="9";if(p=w,w=w.substr(w.length-4),r="",r+=["gsh","gsf"][parseInt(w.substr(0,1),10)%2],r+=["Header","Background","Display","Feedback"][parseInt(w.substr(0,1),10)%4],a[sr("79a417a0f0181a8946")]=r,vn.document[sr("78a712aa")]){vn.document[sr("78a712aa")][sr("7bb806b6ed32388c4a875b")](a),w=vn.getComputedStyle(a).getPropertyValue(sr("78a704b7e62456904c9b12701b6532a8"));var O=vn.getComputedStyle(a).getPropertyValue(sr("75b817b0ea2202"));if(vn.document[sr("78a712aa")][sr("68ad1bbcf533388c4a875b")](a),w){if(a=vn[sr("77a902b0eb1b1e804a8a")],O==="0."+parseInt(p,10)%100||w.indexOf(parseInt(o[1]+o[2],16))!==-1&&w.indexOf(parseInt(o[3]+o[4],16))!==-1){e.Rc=!1;break}else if(a&&a(sr("32ae19a1e0331fc94084537c067a67fa59f1386b89d006")).matches)for(r="."+r,o=0;or.updateDelay?r.N():r.o||(r.o=!0,setTimeout(function(){return r.redraw()},r.updateDelay))},n.Of=function(){r.observed!==null&&je(r)},n.autoScale=Sl,n.vb=!1,t&&Object.assign(n,t),n}Tn(q,Ct),q.prototype.computePixelRatio=function(){return 1},q.prototype.redraw=function(){if(this.o&&1<=this.updateDelay){this.o=!1;var e=this.ta,t=this.ib;if(e!==null&&t!==null){if(Qh(this),this.ql===null){var n=new Ql(null);n.width=e.width,n.height=e.height,this.ql=n}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),xe(this)}finally{this.ta=e,this.ib=t}}}Ct.prototype.redraw.call(this)},q.prototype.gc=function(){if(this.Ka===null&&Lt("No div specified"),this.ta===null&&Lt("No canvas specified"),!(this.ta instanceof $u)&&(Yv(this.box),this.Fc)){var e=this.observed;if(e!==null&&!e.animationManager.defaultAnimation.isAnimating&&e.pi){Qh(this);var t=this.ta;e=this.ib,e.Vc(!0),e.setTransform(1,0,0,1,0,0),e.clearRect(0,0,t.width,t.height),1>this.updateDelay?xe(this):this.ql!==null&&(e.drawImage(this.ql.Oa,0,0),t=this.Ab,t.reset(),this.scale!==1&&t.scale(this.scale),this.position.x===0&&this.position.y===0||t.translate(-this.position.x,-this.position.y),e.scale(this.Mb,this.Mb),e.transform(t.m11,t.m12,t.m21,t.m22,t.dx,t.dy),e.yc()),t=this.Wa.s;for(var n=t.length,r=0;re&&(e=0),this.ia!==e&&(this.ia=e)}}}),q.className="Overview";function Ze(){io.call(this),this.j=null}Tn(Ze,io),Ze.prototype.canStart=function(){if(!this.isEnabled)return!1;var e=this.diagram;if(e===null||!e.allowMove||!e.allowSelect)return!1;var t=e.observed;if(t===null)return!1;var n=e.lastInput;return!n.left||e.currentTool!==this&&(!this.isBeyondDragSize()||n.isTouchEvent&&n.timestamp-e.firstInput.timestampt.maxScale||(t.scale=e))},$e.prototype.canDecreaseZoom=function(e){e===void 0&&(e=1/this.zoomFactor);var t=this.diagram;return t.autoScale!==pa?!1:(e=t.scale*e,et.maxScale?!1:t.allowZoom)},$e.prototype.increaseZoom=function(e){e===void 0&&(e=this.zoomFactor);var t=this.diagram;t.autoScale===pa&&(e=t.scale*e,et.maxScale||(t.scale=e))},$e.prototype.canIncreaseZoom=function(e){e===void 0&&(e=this.zoomFactor);var t=this.diagram;return t.autoScale!==pa?!1:(e=t.scale*e,et.maxScale?!1:t.allowZoom)},$e.prototype.resetZoom=function(e){e===void 0&&(e=this.defaultScale);var t=this.diagram;et.maxScale||(t.scale=e)},$e.prototype.canResetZoom=function(e){e===void 0&&(e=this.defaultScale);var t=this.diagram;return et.maxScale?!1:t.allowZoom},$e.prototype.zoomToFit=function(){var e=this.diagram,t=e.animationManager;t.Cc(),e.redraw();var n=e.position,r=e.scale;ra(t,"Zoom To Fit"),this.isZoomToFitRestoreEnabled&&r===this.Au&&!isNaN(this.Jt)&&e.documentBounds.D(this.yu)?(e.scale=this.Jt,e.position=this.sw,this.Au=NaN,this.yu=Yr):(this.Jt=r,this.sw=n.copy(),e.zoomToFit(),this.Au=e.scale,this.yu=e.documentBounds.copy()),Pa(t)},$e.prototype.canZoomToFit=function(){return this.diagram.allowZoom},$e.prototype.scrollToPart=function(e){e===void 0&&(e=null);var t=this.diagram;if(t.Va(),e===null){try{this.cg!==null&&(this.cg.next()?e=this.cg.value:this.cg=null)}catch(w){this.cg=null}e===null&&(0e&&(e+=360)),e},ye.Df=function(){if(!(this.l&4096))return this.Kk;var e=this.Ca;return this.panel!==null?e*this.panel.Df():e},ye.qs=function(e,t){return t===void 0&&(t=new Ue),t.assign(e),this.oe.Cd(t),t},ye.rs=function(e,t,n){return this.Sj(e.x,e.y,t.x,t.y,n)},ye.Sj=function(e,t,n,r,i){var o=this.transform,a=1/(o.m11*o.m22-o.m12*o.m21),p=o.m22*a,w=-o.m12*a,O=-o.m21*a,D=o.m11*a,X=a*(o.m21*o.dy-o.m22*o.dx),re=a*(o.m12*o.dx-o.m11*o.dy);return this.areaBackground!==null?(o=this.actualBounds,vt.Ff(o.left,o.top,o.right,o.bottom,e,t,n,r,i)):(a=e*p+t*O+X,e=e*w+t*D+re,t=n*p+r*O+X,n=n*w+r*D+re,i.h(0,0),r=this.naturalBounds,n=vt.Ff(0,0,r.width,r.height,a,e,t,n,i),i.transform(o),n)},gt.prototype.measure=function(e,t,n,r){if(El(this)!==!1){var i=this.Kg,o=i.right+i.left;i=i.top+i.bottom,e=Math.max(e-o,0),t=Math.max(t-i,0),n=Math.max((n||0)-o,0),r=Math.max((r||0)-i,0),o=this.angle,i=this.desiredSize;var a=this.kq();o===90||o===270?(e=isFinite(i.height)?i.height+a:e,t=isFinite(i.width)?i.width+a:t):(e=isFinite(i.width)?i.width+a:e,t=isFinite(i.height)?i.height+a:t),i=n||0,a=r||0;var p=this instanceof qt;switch(Ba(this,!0)){case Wt:a=i=0,p&&(t=e=1/0);break;case Xt:isFinite(e)&&e>n&&(i=e),isFinite(t)&&t>r&&(a=t);break;case Bn:isFinite(e)&&e>n&&(i=e),a=0,p&&(t=1/0);break;case Kn:isFinite(t)&&t>r&&(a=t),i=0,p&&(e=1/0)}p=this.maxSize;var w=this.minSize;i>p.width&&w.widthp.height&&w.heighte.height||this.Cb>e.width))&&(n=!0)),this.l=n?this.l|256:this.l&-257,this.Ib.w()||Lt("Non-real actualBounds has been set. Object "+this+", actualBounds: "+this.Ib.toString()),this.Xl(o,this.Ib),ic(this,!1),Nt.free(o)},ye=gt.prototype,ye.eh=function(){};function ga(e,t,n,r,i){if(e.Ib.h(t,n,r,i),!e.desiredSize.w()){var o=e.uc;n=e.Kg,t=n.right+n.left;var a=n.top+n.bottom;switch(n=o.width+t,o=o.height+a,r+=t,i+=a,t=Ba(e,!0),n===r&&o===i&&(t=Wt),t){case Wt:(n>r||o>i)&&(gs(e,!0),e.measure(n>r?r:n,o>i?i:o,0,0));break;case Xt:gs(e,!0),e.measure(r,i,0,0);break;case Bn:gs(e,!0),e.measure(r,o,0,0);break;case Kn:gs(e,!0),e.measure(n,i,0,0)}}}ye.Xl=function(e,t){var n=this.part;n!==null&&n.diagram!==null&&(n.selectionObject!==this&&n.resizeObject!==this&&n.rotateObject!==this||Zv(n,!0),this.N(),ho(e,t)||(n.oh(),this.Pn(n)))},ye.Pn=function(e){this.portId!==null&&(Zv(e,!0),e instanceof En&&nb(e,this))},ye.gc=function(e,t){if(!Dl(this,e,t)&&this.visible){var n=this.opacity;if(n!==0){var r=1;n!==1&&(r=e.globalAlpha,e.globalAlpha=r*n);var i="";this.filter!==""&&(i=e.filter,e.filter=this.filter);var o=this instanceof qt&&Zc(this),a=this.Ib;if(o){var p=this.Ib,w=this.dc,O=this.areaBackground,D=this.Ma;O===null&&D===null||e.yc(),O!==null&&(Ho(this,e,O,!0,!0,w,p),O instanceof yi&&O.type===Bl?(e.beginPath(),e.rect(p.x,p.y,p.width,p.height),e.ng(O)):e.fillRect(p.x,p.y,p.width,p.height)),D!==null&&(Ho(this,e,D,!0,!1,w,p),D instanceof yi&&D.type===Bl?(e.beginPath(),e.rect(p.x,p.y,p.width,p.height),e.ng(D)):e.fillRect(p.x,p.y,p.width,p.height)),this.hh(e,t)}if(!o&&(o||a.width!==0&&a.height!==0&&!isNaN(a.x)&&!isNaN(a.y))){o=this.transform,p=this.panel,this.l&4096&&Us(this),O=this.part,w=!1;var X=0;O&&t.Gf("drawShadows")&&(w=O.isShadowed)&&(D=O.shadowOffset,X=Math.max(D.y,D.x)*t.scale*t.Mb),D=this.Dd();var re;if(!(re=t.$i||!D)){var de=this.naturalBounds;re=this.wh;var Se=re.m11,Te=re.m21,Xe=re.dx,We=re.m12,qe=re.m22,tt=re.dy,rt,ft=rt=0;re=rt*Se+ft*Te+Xe;var Tt=rt*We+ft*qe+tt;rt=de.width+X,ft=0;var Sn=rt*Se+ft*Te+Xe;rt=rt*We+ft*qe+tt,ft=Math.min(re,Sn);var Rn=Math.min(Tt,rt),_n=Math.max(re+0,Sn)-ft,ln=Math.max(Tt+0,rt)-Rn;re=ft,Tt=Rn,rt=de.width+X,ft=de.height+X,Sn=rt*Se+ft*Te+Xe,rt=rt*We+ft*qe+tt,ft=Math.min(re,Sn),Rn=Math.min(Tt,rt),_n=Math.max(re+_n,Sn)-ft,ln=Math.max(Tt+ln,rt)-Rn,re=ft,Tt=Rn,rt=0,ft=de.height+X,Sn=rt*Se+ft*Te+Xe,rt=rt*We+ft*qe+tt,ft=Math.min(re,Sn),Rn=Math.min(Tt,rt),_n=Math.max(re+_n,Sn)-ft,ln=Math.max(Tt+ln,rt)-Rn,re=ft,Tt=Rn,X=t.viewportBounds,de=X.x,Se=X.y,re=!(re>X.width+de||de>_n+re||Tt>X.height+Se||Se>ln+Tt)}if(re){if(re=(this.l&256)!==0,e.clipInsteadOfFill&&(re=!1),this instanceof Vi&&(e.font=this.font),re){if(Tt=p.se()?p.naturalBounds:p.actualBounds,_n=Math.max(a.x,Tt.x),ln=Math.max(a.y,Tt.y),X=Math.min(a.right,Tt.right)-_n,de=Math.min(a.bottom,Tt.bottom)-ln,Se=this.tb,Se!==null&&(_n=Se.x,ln=Se.y,X=Se.width,de=Se.height),_n>a.width+a.x||a.x>Tt.width+Tt.x){n!==1&&(e.globalAlpha=r),this.filter!==""&&(e.filter=i);return}e.save(),e.beginPath(),e.rect(_n,ln,X,de),e.clip()}if(D){if(!O.isVisible()){n!==1&&(e.globalAlpha=r),this.filter!==""&&(e.filter=i);return}w&&(Tt=O.shadowOffset,e.Ev(Tt.x*t.scale*this.scale*t.Mb,Tt.y*t.scale*this.scale*t.Mb,O.shadowBlur),kc(e),e.shadowColor=O.shadowColor)}w&&this.shadowVisible===!0?kc(e):w&&this.shadowVisible===!1&&oc(e),O=this.naturalBounds,this.areaBackground!==null&&(e.yc(),xl(this,e,O,a)),e.transform(o.m11,o.m12,o.m21,o.m22,o.dx,o.dy),w&&Ps(this,p)&&this.shadowVisible===null&&oc(e),this.Ma!==null&&(e.yc(),Xa(this,e,O,a)),w&&(this.Ma!==null||this.areaBackground!==null||Ps(this,p))?(du(this,!0),this.shadowVisible===null&&oc(e)):du(this,!1),this.hh(e,t),w&&this.l&512&&kc(e),D&&w&&oc(e),re&&(e.restore(),e.Vc(this instanceof qt)),o.ws()||(t=1/(o.m11*o.m22-o.m12*o.m21),e.transform(o.m22*t,-o.m12*t,-o.m21*t,o.m11*t,t*(o.m21*o.dy-o.m22*o.dx),t*(o.m12*o.dx-o.m11*o.dy)))}}n!==1&&(e.globalAlpha=r),this.filter!==""&&(e.filter=i)}}};function Ps(e,t){return t===null?!1:(Zc(t)&&(t=t.panel),(t.l&512)!==0||(t.type===qt.Auto||t.type===qt.Spot)&&t.Pb()!==e)}ye.Dv=function(){};function xl(e,t,n,r){Ho(e,t,e.areaBackground,!0,!0,n,r),e.areaBackground instanceof yi&&e.areaBackground.type===Bl?(t.beginPath(),t.rect(r.x,r.y,r.width,r.height),t.ng(e.areaBackground)):t.fillRect(r.x,r.y,r.width,r.height)}function Xa(e,t,n,r){var i=e.kq(),o=n.x,a=n.y,p=n.width+i,w=n.height+i;Ho(e,t,e.Ma,!0,!1,n,r),e.Ma instanceof yi&&e.Ma.type===Bl?(t.beginPath(),t.rect(o-i/2,a-i/2,p,w),t.ng(e.Ma)):t.fillRect(o-i/2,a-i/2,p,w)}function aa(e,t,n){for(var r=t.O.s,i=r.length,o=-1,a=0;ai)&&Lt("Must specify non-negative integer row for RowColumnDefinition "+t+", not: "+i),e.isRow=!0,e.index=i):t.column!==void 0&&(i=t.column,(i==null||i===1/0||isNaN(i)||0>i)&&Lt("Must specify non-negative integer column for RowColumnDefinition "+t+", not: "+i),e.isRow=!1,e.index=i),i=new yo;for(n in t)n!=="row"&&n!=="column"&&(i[n]=t[n]);Jh(e,i)}else Jh(e,t);else Lt('Unknown initializer "'+t+'" for object being constructed by GraphObject.make: '+e)}function $c(e,t){pd.add(e,t)}function wg(e,t,n){n===void 0&&(n=null);var r=e[1];if(typeof n=="function"?n(r):typeof r=="string")return e.splice(1,1),r;if(t===void 0)throw Error("no "+(typeof n=="function"?"satisfactory":"string")+" argument for GraphObject builder "+e[0]);return t}kn.Object.defineProperties(gt.prototype,{bindingId:{get:function(){return this.A!==null?this.A.zp:-1},set:function(e){this.bindingId!==e&&(this.A===null&&(this.A=new Df),this.A.zp=e)}},localBindings:{get:function(){return this.A!==null?this.A.te:null},set:function(e){this.localBindings!==e&&(this.A===null&&(this.A=new Df),this.A.te=e)}},srcBindings:{get:function(){return this.A!==null?this.A.wm:null},set:function(e){this.srcBindings!==e&&(this.A===null&&(this.A=new Df),this.A.wm=e)}},shadowVisible:{get:function(){return this.A!==null?this.A.Ci:null},set:function(e){var t=this.shadowVisible;t!==e&&(br(this),this.A.Ci=e,this.Uc=!0,this.N(),this.g("shadowVisible",t,e))}},enabledChanged:{get:function(){return this.A!==null?this.A.Hb:null},set:function(e){var t=this.enabledChanged;t!==e&&(br(this),this.A.Hb=e,this.g("enabledChanged",t,e))}},segmentOrientation:{get:function(){return this.Ua!==null?this.Ua.rr:Aa},set:function(e){var t=this.segmentOrientation;t!==e&&(this.Ua===null&&(this.Ua=new wh),this.Ua.rr=e,this.v(),this.g("segmentOrientation",t,e),e===Aa&&(this.angle=0))}},segmentIndex:{get:function(){return this.Ua!==null?this.Ua.u:-1/0},set:function(e){e=Math.round(e);var t=this.segmentIndex;t!==e&&(this.Ua===null&&(this.Ua=new wh),this.Ua.u=e,this.v(),this.g("segmentIndex",t,e))}},segmentFraction:{get:function(){return this.Ua!==null?this.Ua.o:0},set:function(e){isNaN(e)||0>e?e=0:1e||1=e&&Lt("GraphObject.scale for "+this+" must be greater than zero, not: "+e),this.Ca=e,this.v(),this.g("scale",t,e))}},angle:{get:function(){return this.Kb},set:function(e){var t=this.Kb;t!==e&&(e%=360,0>e&&(e+=360),t!==e&&(this.Kb=e,s0(this),this.v(),this.g("angle",t,e)))}},desiredSize:{get:function(){return this.jd},set:function(e){var t=e.width,n=e.height,r=this.jd,i=r.width,o=r.height;(i===t||isNaN(i)&&isNaN(t))&&(o===n||isNaN(o)&&isNaN(n))||(this.jd=e=e.J(),this.v(),this instanceof vr&&this.qc(),this.g("desiredSize",r,e),Ws(this)&&(e=this.part,e!==null&&(to(this,e,"width"),to(this,e,"height"))))}},width:{get:function(){return this.jd.width},set:function(e){var t=this.jd.width;t===e||isNaN(t)&&isNaN(e)||(t=this.jd,this.jd=e=new Yt(e,this.jd.height).freeze(),this.v(),this instanceof vr&&this.qc(),this.g("desiredSize",t,e),Ws(this)&&(e=this.part,e!==null&&to(this,e,"width")))}},height:{get:function(){return this.jd.height},set:function(e){var t=this.jd.height;t===e||isNaN(t)&&isNaN(e)||(t=this.jd,this.jd=e=new Yt(this.jd.width,e).freeze(),this.v(),this instanceof vr&&this.qc(),this.g("desiredSize",t,e),Ws(this)&&(e=this.part,e!==null&&to(this,e,"height")))}},minSize:{get:function(){return this.A!==null?this.A.u:Sr},set:function(e){var t=this.minSize;t.D(e)||(e=e.copy(),isNaN(e.width)&&(e.width=0),isNaN(e.height)&&(e.height=0),e.freeze(),br(this),this.A.u=e,this.v(),this.g("minSize",t,e))}},maxSize:{get:function(){return this.A!==null?this.A.o:Ji},set:function(e){var t=this.maxSize;t.D(e)||(e=e.copy(),isNaN(e.width)&&(e.width=1/0),isNaN(e.height)&&(e.height=1/0),e.freeze(),br(this),this.A.o=e,this.v(),this.g("maxSize",t,e))}},measuredBounds:{get:function(){return this.uc}},naturalBounds:{get:function(){return this.dc}},margin:{get:function(){return this.Kg},set:function(e){typeof e=="number"&&(e=new Wn(e));var t=this.Kg;t.D(e)||(this.Kg=e=e.J(),this.v(),this.g("margin",t,e))}},transform:{get:function(){return this.l&2048&&Us(this),this.Ab}},oe:{get:function(){return this.l&4096&&Us(this),this.wh}},animationTriggers:{get:function(){return this.A!==null?this.A.hb:null},set:function(e){this.animationTriggers!==e&&(br(this),this.A.hb=e)}},reshapingBehavior:{get:function(){return this.A!==null?this.A.Pf:Wt},set:function(e){this.reshapingBehavior!==e&&(br(this),this.A.Pf=e)}},alignment:{get:function(){return this.Jb},set:function(e){var t=this.Jb;t.D(e)||(e.Mc()&&!e.Xb()&&Lt("GraphObject.alignment for "+this+" must be a real Spot or Spot.Default, not: "+e),this.Jb=e=e.J(),wa(this),this.g("alignment",t,e))}},column:{get:function(){return this.Ag},set:function(e){e=Math.round(e);var t=this.Ag;t!==e&&(0>e&&hr(e,">= 0",gt,"column"),this.Ag=e,this.v(),this.g("column",t,e),this.svg!==null&&this.svg.remove())}},columnSpan:{get:function(){return this.A!==null?this.A.ob:1},set:function(e){e=Math.round(e);var t=this.columnSpan;t!==e&&(1>e&&hr(e,">= 1",gt,"columnSpan"),br(this),this.A.ob=e,this.v(),this.g("columnSpan",t,e))}},row:{get:function(){return this.io},set:function(e){e=Math.round(e);var t=this.io;t!==e&&(0>e&&hr(e,">= 0",gt,"row"),this.io=e,this.v(),this.g("row",t,e),this.svg!==null&&this.svg.remove())}},rowSpan:{get:function(){return this.A!==null?this.A.Bi:1},set:function(e){e=Math.round(e);var t=this.rowSpan;t!==e&&(1>e&&hr(e,">= 1",gt,"rowSpan"),br(this),this.A.Bi=e,this.v(),this.g("rowSpan",t,e))}},spanAllocation:{get:function(){return this.A!==null?this.A.Di:null},set:function(e){var t=this.spanAllocation;t!==e&&(br(this),this.A.Di=e,this.v(),this.g("spanAllocation",t,e))}},alignmentFocus:{get:function(){return this.sk},set:function(e){var t=this.sk;t.D(e)||(this.sk=e=e.J(),this.v(),this.g("alignmentFocus",t,e))}},portId:{get:function(){return this.Yn},set:function(e){var t=this.Yn;if(t!==e){var n=this.part;n===null||n instanceof En||Lt("Cannot set portID on a Link: "+e),t!==null&&n!==null&&ey(n,this),this.Yn=e,e!==null&&n!==null&&(n.Te=!0,ob(n,this)),this.g("portId",t,e)}}},toSpot:{get:function(){return this.ba!==null?this.ba.yj:So},set:function(e){var t=this.toSpot;t.D(e)||(e=e.J(),this.Xc(),this.ba.yj=e,this.g("toSpot",t,e),sf(this))}},toEndSegmentLength:{get:function(){return this.ba!==null?this.ba.wj:10},set:function(e){var t=this.toEndSegmentLength;t!==e&&(0>e&&hr(e,">= 0",gt,"toEndSegmentLength"),this.Xc(),this.ba.wj=e,this.g("toEndSegmentLength",t,e),sf(this))}},toShortLength:{get:function(){return this.ba!==null?this.ba.xj:0},set:function(e){var t=this.toShortLength;t!==e&&(this.Xc(),this.ba.xj=e,this.g("toShortLength",t,e),sf(this))}},toLinkable:{get:function(){return this.ba!==null?this.ba.Tr:null},set:function(e){var t=this.toLinkable;t!==e&&(this.Xc(),this.ba.Tr=e,this.g("toLinkable",t,e))}},toMaxLinks:{get:function(){return this.ba!==null?this.ba.Ur:1/0},set:function(e){var t=this.toMaxLinks;t!==e&&(0>e&&hr(e,">= 0",gt,"toMaxLinks"),this.Xc(),this.ba.Ur=e,this.g("toMaxLinks",t,e))}},fromSpot:{get:function(){return this.ba!==null?this.ba.Xi:So},set:function(e){var t=this.fromSpot;t.D(e)||(e=e.J(),this.Xc(),this.ba.Xi=e,this.g("fromSpot",t,e),sf(this))}},fromEndSegmentLength:{get:function(){return this.ba!==null?this.ba.Vi:10},set:function(e){var t=this.fromEndSegmentLength;t!==e&&(0>e&&hr(e,">= 0",gt,"fromEndSegmentLength"),this.Xc(),this.ba.Vi=e,this.g("fromEndSegmentLength",t,e),sf(this))}},fromShortLength:{get:function(){return this.ba!==null?this.ba.Wi:0},set:function(e){var t=this.fromShortLength;t!==e&&(this.Xc(),this.ba.Wi=e,this.g("fromShortLength",t,e),sf(this))}},fromLinkable:{get:function(){return this.ba!==null?this.ba.hq:null},set:function(e){var t=this.fromLinkable;t!==e&&(this.Xc(),this.ba.hq=e,this.g("fromLinkable",t,e))}},fromMaxLinks:{get:function(){return this.ba!==null?this.ba.iq:1/0},set:function(e){var t=this.fromMaxLinks;t!==e&&(0>e&&hr(e,">= 0",gt,"fromMaxLinks"),this.Xc(),this.ba.iq=e,this.g("fromMaxLinks",t,e))}},cursor:{get:function(){return this.A!==null?this.A.j:""},set:function(e){var t=this.cursor;t!==e&&(br(this),this.A.j=e,this.g("cursor",t,e))}},click:{get:function(){return this.A!==null?this.A.zh:null},set:function(e){var t=this.click;t!==e&&(br(this),this.A.zh=e,this.g("click",t,e))}},doubleClick:{get:function(){return this.A!==null?this.A.Fh:null},set:function(e){var t=this.doubleClick;t!==e&&(br(this),this.A.Fh=e,this.g("doubleClick",t,e))}},contextClick:{get:function(){return this.A!==null?this.A.Bh:null},set:function(e){var t=this.contextClick;t!==e&&(br(this),this.A.Bh=e,this.g("contextClick",t,e))}},mouseEnter:{get:function(){return this.A!==null?this.A.Mh:null},set:function(e){var t=this.mouseEnter;t!==e&&(br(this),this.A.Mh=e,this.g("mouseEnter",t,e))}},mouseLeave:{get:function(){return this.A!==null?this.A.Ph:null},set:function(e){var t=this.mouseLeave;t!==e&&(br(this),this.A.Ph=e,this.g("mouseLeave",t,e))}},mouseOver:{get:function(){return this.A!==null?this.A.Qh:null},set:function(e){var t=this.mouseOver;t!==e&&(br(this),this.A.Qh=e,this.g("mouseOver",t,e))}},mouseHover:{get:function(){return this.A!==null?this.A.Oh:null},set:function(e){var t=this.mouseHover;t!==e&&(br(this),this.A.Oh=e,this.g("mouseHover",t,e))}},mouseHold:{get:function(){return this.A!==null?this.A.Nh:null},set:function(e){var t=this.mouseHold;t!==e&&(br(this),this.A.Nh=e,this.g("mouseHold",t,e))}},mouseDragEnter:{get:function(){return this.A!==null?this.A.Of:null},set:function(e){var t=this.mouseDragEnter;t!==e&&(br(this),this.A.Of=e,this.g("mouseDragEnter",t,e))}},mouseDragLeave:{get:function(){return this.A!==null?this.A.Xd:null},set:function(e){var t=this.mouseDragLeave;t!==e&&(br(this),this.A.Xd=e,this.g("mouseDragLeave",t,e))}},mouseDrop:{get:function(){return this.A!==null?this.A.Lh:null},set:function(e){var t=this.mouseDrop;t!==e&&(br(this),this.A.Lh=e,this.g("mouseDrop",t,e))}},actionDown:{get:function(){return this.A!==null?this.A.V:null},set:function(e){var t=this.actionDown;t!==e&&(br(this),this.A.V=e,this.g("actionDown",t,e))}},actionMove:{get:function(){return this.A!==null?this.A.ia:null},set:function(e){var t=this.actionMove;t!==e&&(br(this),this.A.ia=e,this.g("actionMove",t,e))}},actionUp:{get:function(){return this.A!==null?this.A.Ha:null},set:function(e){var t=this.actionUp;t!==e&&(br(this),this.A.Ha=e,this.g("actionUp",t,e))}},actionCancel:{get:function(){return this.A!==null?this.A.F:null},set:function(e){var t=this.actionCancel;t!==e&&(br(this),this.A.F=e,this.g("actionCancel",t,e))}},toolTip:{get:function(){return this.A!==null?this.A.$h:null},set:function(e){var t=this.toolTip;t!==e&&(br(this),this.A.$h=e,this.g("toolTip",t,e))}},contextMenu:{get:function(){return this.A!==null?this.A.Ch:null},set:function(e){var t=this.contextMenu;t!==e&&(br(this),this.A.Ch=e,this.g("contextMenu",t,e))}}}),gt.prototype.trigger=gt.prototype.Jv,gt.prototype.findBindingPanel=gt.prototype.ih,gt.prototype.findTemplateBinder=gt.prototype.pz,gt.prototype.setProperties=gt.prototype.nm,gt.prototype.apply=gt.prototype.apply,gt.prototype.attach=gt.prototype.Du,gt.prototype.set=gt.prototype.set,gt.prototype.isEnabledObject=gt.prototype.If,gt.prototype.isVisibleObject=gt.prototype.Ed,gt.prototype.isContainedBy=gt.prototype.rg,gt.prototype.getNearestIntersectionPoint=gt.prototype.rs,gt.prototype.getLocalPoint=gt.prototype.qs,gt.prototype.getDocumentScale=gt.prototype.Df,gt.prototype.getDocumentAngle=gt.prototype.li,gt.prototype.getDocumentBounds=gt.prototype.mi,gt.prototype.getDocumentPoint=gt.prototype.ga,gt.prototype.intersectsRect=gt.prototype.Yc,gt.prototype.containedInRect=gt.prototype.fh,gt.prototype.containsRect=gt.prototype.Re,gt.prototype.containsPoint=gt.prototype.ca,gt.prototype.raiseChanged=gt.prototype.g,gt.prototype.raiseChangedEvent=gt.prototype.cb,gt.prototype.addCopyProperty=gt.prototype.Vw;var pd=null;gt.className="GraphObject",pd=new nn,$c("Button",function(){function e(n,r){return n.diagram.ic(n.documentPoint,function(i){for(;i.panel!==null&&!i.isActionable;)i=i.panel;return i},function(i){return i===r})!==null}var t=Fl(qt,qt.Auto,{isActionable:!0,enabledChanged:function(n,r){if(n instanceof qt){var i=n.fb("ButtonBorder");i!==null&&(i.fill=r?n._buttonFillNormal:n._buttonFillDisabled)}},cursor:"pointer",_buttonFillNormal:"#F5F5F5",_buttonStrokeNormal:"#BDBDBD",_buttonFillOver:"#E0E0E0",_buttonStrokeOver:"#9E9E9E",_buttonFillPressed:"#BDBDBD",_buttonStrokePressed:"#9E9E9E",_buttonFillDisabled:"#E5E5E5"},Fl(vr,{name:"ButtonBorder",figure:"RoundedRectangle",spot1:new Nn(0,0,2.76142374915397,2.761423749153969),spot2:new Nn(1,1,-2.76142374915397,-2.761423749153969),parameter1:2,parameter2:2,fill:"#F5F5F5",stroke:"#BDBDBD"}));return t.mouseEnter=function(n,r){if(r.If()&&r instanceof qt&&(n=r.fb("ButtonBorder"),n instanceof vr)){var i=r._buttonFillOver;r._buttonFillNormal=n.fill,n.fill=i,i=r._buttonStrokeOver,r._buttonStrokeNormal=n.stroke,n.stroke=i}},t.mouseLeave=function(n,r){r.If()&&r instanceof qt&&(n=r.fb("ButtonBorder"),n instanceof vr&&(n.fill=r._buttonFillNormal,n.stroke=r._buttonStrokeNormal))},t.actionDown=function(n,r){if(r.If()&&r instanceof qt&&r._buttonFillPressed!==null&&n.button===0){var i=r.fb("ButtonBorder");if(i instanceof vr){n=n.diagram;var o=n.skipsUndoManager;n.skipsUndoManager=!0;var a=r._buttonFillPressed;r._buttonFillOver=i.fill,i.fill=a,a=r._buttonStrokePressed,r._buttonStrokeOver=i.stroke,i.stroke=a,n.skipsUndoManager=o}}},t.actionUp=function(n,r){if(r.If()&&r instanceof qt&&r._buttonFillPressed!==null&&n.button===0){var i=r.fb("ButtonBorder");if(i instanceof vr){var o=n.diagram,a=o.skipsUndoManager;o.skipsUndoManager=!0,e(n,r)?(i.fill=r._buttonFillOver,i.stroke=r._buttonStrokeOver):(i.fill=r._buttonFillNormal,i.stroke=r._buttonStrokeNormal),o.skipsUndoManager=a}}},t.actionCancel=function(n,r){if(r.If()&&r instanceof qt&&r._buttonFillPressed!==null){var i=r.fb("ButtonBorder");if(i instanceof vr){var o=n.diagram,a=o.skipsUndoManager;o.skipsUndoManager=!0,e(n,r)?(i.fill=r._buttonFillOver,i.stroke=r._buttonStrokeOver):(i.fill=r._buttonFillNormal,i.stroke=r._buttonStrokeNormal),o.skipsUndoManager=a}}},t.actionMove=function(n,r){if(r.If()&&r instanceof qt&&r._buttonFillPressed!==null){var i=n.diagram;if(i.firstInput.button===0&&(i.currentTool.standardMouseOver(),e(n,r)&&(n=r.fb("ButtonBorder"),n instanceof vr))){var o=i.skipsUndoManager;i.skipsUndoManager=!0;var a=r._buttonFillPressed;n.fill!==a&&(n.fill=a),a=r._buttonStrokePressed,n.stroke!==a&&(n.stroke=a),i.skipsUndoManager=o}}},t}),$c("TreeExpanderButton",function(){var e=Fl("Button",{_treeExpandedFigure:"MinusLine",_treeCollapsedFigure:"PlusLine"},Fl(vr,{name:"ButtonIcon",figure:"MinusLine",stroke:"#424242",strokeWidth:2,desiredSize:Pi},new qo("figure","isTreeExpanded",function(t,n){return n=n.panel,t?n._treeExpandedFigure:n._treeCollapsedFigure}).cp()),{visible:!1},new qo("visible","isTreeLeaf",function(t){return!t}).cp());return e.click=function(t,n){if(n=n.part,n instanceof qr&&(n=n.adornedPart),n instanceof En){var r=n.diagram;if(r!==null){if(r=r.commandHandler,n.isTreeExpanded){if(!r.canCollapseTree(n))return}else if(!r.canExpandTree(n))return;t.handled=!0,n.isTreeExpanded?r.collapseTree(n):r.expandTree(n)}}},e}),$c("SubGraphExpanderButton",function(){var e=Fl("Button",{_subGraphExpandedFigure:"MinusLine",_subGraphCollapsedFigure:"PlusLine"},Fl(vr,{name:"ButtonIcon",figure:"MinusLine",stroke:"#424242",strokeWidth:2,desiredSize:Pi},new qo("figure","isSubGraphExpanded",function(t,n){return n=n.panel,t?n._subGraphExpandedFigure:n._subGraphCollapsedFigure}).cp()));return e.click=function(t,n){if(n=n.part,n instanceof qr&&(n=n.adornedPart),n instanceof lr){var r=n.diagram;if(r!==null){if(r=r.commandHandler,n.isSubGraphExpanded){if(!r.canCollapseSubGraph(n))return}else if(!r.canExpandSubGraph(n))return;t.handled=!0,n.isSubGraphExpanded?r.collapseSubGraph(n):r.expandSubGraph(n)}}},e}),$c("ToolTip",function(){return Fl(qr,qt.Auto,{isShadowed:!0,shadowColor:"rgba(0, 0, 0, .4)",shadowOffset:new Ue(0,3),shadowBlur:5},Fl(vr,{name:"Border",figure:"RoundedRectangle",parameter1:1,parameter2:1,fill:"#F5F5F5",stroke:"#F0F0F0",spot1:new Nn(0,0,4,6),spot2:new Nn(1,1,-4,-4)}))}),$c("ContextMenu",function(){return Fl(qr,qt.Vertical,{background:"#F5F5F5",isShadowed:!0,shadowColor:"rgba(0, 0, 0, .4)",shadowOffset:new Ue(0,3),shadowBlur:5},new qo("background","",function(e){return e.adornedPart!==null&&e.placeholder!==null?null:"#F5F5F5"}))}),$c("ContextMenuButton",function(){var e=Fl("Button");e.stretch=Bn;var t=e.fb("ButtonBorder");return t instanceof vr&&(t.figure="Rectangle",t.strokeWidth=0,t.spot1=new Nn(0,0,2,3),t.spot2=new Nn(1,1,-2,-2)),e}),$c("PanelExpanderButton",function(e){var t=wg(e,"COLLAPSIBLE"),n=Fl("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},Fl(vr,{name:"ButtonIcon",strokeWidth:2},new qo("geometryString","visible",function(r){return r?n._buttonExpandedFigure:n._buttonCollapsedFigure}).cp(t)));return e=n.fb("ButtonBorder"),e instanceof vr&&(e.stroke=null,e.fill="rgba(0, 0, 0, 0)"),n.click=function(r,i){var o=i.diagram;if(o!==null&&!o.isReadOnly){var a=i.ih();a===null&&(a=i.part),a!==null&&(i=a.fb(t),i!==null&&(r.handled=!0,o.Ea("Collapse/Expand Panel"),i.visible=!i.visible,o.eb("Collapse/Expand Panel")))}},n}),$c("CheckBoxButton",function(e){var t=wg(e);return e=Fl("Button",{desiredSize:new Yt(14,14)},Fl(vr,{name:"ButtonIcon",geometryString:"M0 0 M0 8.85 L4.9 13.75 16.2 2.45 M16.2 16.2",strokeWidth:2,stretch:Xt,geometryStretch:Dn,visible:!1},t!==""?new qo("visible",t).Kx():[])),e.click=function(n,r){if(r instanceof qt){var i=n.diagram;if(!(i===null||i.isReadOnly||t!==""&&i.model.isReadOnly)){n.handled=!0;var o=r.fb("ButtonIcon");i.Ea("checkbox"),o.visible=!o.visible,typeof r._doClick=="function"&&r._doClick(n,r),i.eb("checkbox")}}},e}),$c("CheckBox",function(e){e=wg(e),e=Fl("CheckBoxButton",e,{name:"Button",isActionable:!1,margin:new Wn(0,1,0,0)});var t=Fl(qt,"Horizontal",e,{isActionable:!0,cursor:e.cursor,margin:new Wn(1),_buttonFillNormal:e._buttonFillNormal,_buttonStrokeNormal:e._buttonStrokeNormal,_buttonFillOver:e._buttonFillOver,_buttonStrokeOver:e._buttonStrokeOver,_buttonFillPressed:e._buttonFillPressed,_buttonStrokePressed:e._buttonStrokePressed,_buttonFillDisabled:e._buttonFillDisabled,mouseEnter:e.mouseEnter,mouseLeave:e.mouseLeave,actionDown:e.actionDown,actionUp:e.actionUp,actionCancel:e.actionCancel,actionMove:e.actionMove,click:e.click,_buttonClick:e.click});return e.mouseEnter=null,e.mouseLeave=null,e.actionDown=null,e.actionUp=null,e.actionCancel=null,e.actionMove=null,e.click=null,t}),gt.None=Wt=new hn(gt,"None",0),gt.Default=cr=new hn(gt,"Default",0),gt.Vertical=Kn=new hn(gt,"Vertical",4),gt.Horizontal=Bn=new hn(gt,"Horizontal",5),gt.Fill=Xt=new hn(gt,"Fill",3),gt.Uniform=Dn=new hn(gt,"Uniform",1),gt.UniformToFill=Hr=new hn(gt,"UniformToFill",2),gt.FlipVertical=Er=new hn(gt,"FlipVertical",1),gt.FlipHorizontal=Kr=new hn(gt,"FlipHorizontal",2),gt.FlipBoth=Ti=new hn(gt,"FlipBoth",3),gt.make=Fl,gt.getBuilders=function(){var e=new nn,t;for(t in pd)if(t!==t.toLowerCase()){var n=pd.I(t);typeof n=="function"&&e.add(t,n)}return e.freeze(),e},gt.defineBuilder=$c,gt.build=function(e,t,n){for(var r=[],i=2;ie&&(e+=360),e!==0){if(this.translate(t,n),e===90){e=0;var r=1}else e===180?(e=-1,r=0):e===270?(e=0,r=-1):(r=e*Math.PI/180,e=Math.cos(r),r=Math.sin(r));var i=this.ha[1]*e+this.ha[3]*r,o=this.ha[0]*-r+this.ha[2]*e,a=this.ha[1]*-r+this.ha[3]*e;this.ha[0]=this.ha[0]*e+this.ha[2]*r,this.ha[1]=i,this.ha[2]=o,this.ha[3]=a,this.translate(-t,-n)}},af.className="STransform";function Pf(e){this.type=e,this.r2=this.y2=this.x2=this.r1=this.y1=this.x1=0,this.gx=[],this.pattern=null}Pf.prototype.addColorStop=function(e,t){this.gx.push({offset:e,color:t})},Pf.className="SGradient";function $u(e,t,n){this.ownerDocument=e=t===void 0?vn.document:t,this.cA="http://www.w3.org/2000/svg",e!==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 sl(this,n)}$u.prototype.resize=function(e,t,n,r){return this.width!==e||this.height!==t?(this.width=e,this.height=t,this.style.width=n+"px",this.style.height=r+"px",this.Oa.setAttributeNS(null,"width",n+"px"),this.Oa.setAttributeNS(null,"height",r+"px"),this.Oa.setAttributeNS(null,"viewBox","0 0 "+n+" "+r),this.context.ww.firstElementChild.setAttributeNS(null,"width",n+"px"),this.context.ww.firstElementChild.setAttributeNS(null,"height",r+"px"),!0):!1},$u.prototype.Ud=function(e,t,n){if(e=this.ownerDocument.createElementNS(this.cA,e),bn(t))for(var r in t)e.setAttributeNS(r==="href"?"http://www.w3.org/1999/xlink":"",r,t[r]);return n!==void 0&&(e.textContent=n),e},$u.prototype.getBoundingClientRect=function(){return this.Oa.getBoundingClientRect()},$u.prototype.focus=function(){this.Oa.focus()},$u.prototype.mx=function(){this.ownerDocument=null},kn.Object.defineProperties($u.prototype,{width:{get:function(){return this.Oa.width.baseVal.value},set:function(e){this.Oa.setAttribute("width",e+"px")}},height:{get:function(){return this.Oa.height.baseVal.value},set:function(e){this.Oa.setAttribute("height",e+"px")}},style:{get:function(){return this.Oa.style}}}),$u.className="SVGSurface";function sl(e,t){this.Gv=e,this.svg=e.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 af,this.j=Cg(this),this.Nj=Cg(this,"gojs-diagram"),this.Hl=this.ti=null;var n=dt++,r=this.Ud("clipPath",{id:"mainClip"+n});r.appendChild(this.Ud("rect",{x:0,y:0,width:e.width,height:e.height})),this.ww=r,this.svg.appendChild(this.j),this.j.appendChild(this.Nj),this.svg.appendChild(r),this.j.setAttributeNS(null,"clip-path","url(#mainClip"+n+")"),this.eA={},this.isTemporary=!!t,this.filter="",this.bk=null}function a0(e,t,n,r,i,o,a){e.Nj===void 0?bp(e,t,n,r,i,o,a):e.Nj.setAttribute("transform","matrix("+t+", "+n+", "+r+", "+i+", "+o+", "+a+")")}ye=sl.prototype,ye.arc=function(e,t,n,r,i,o,a,p){var w=2*Math.PI,O=w-1e-6,D=n*Math.cos(r),X=n*Math.sin(r),re=e+D,de=t+X,Se=o?0:1;r=o?r-i:i-r,(1e-6r&&(r=r%w+w),r>O?(this.path.push(["A",n,n,0,1,Se,e-D,t-X]),this.path.push(["A",n,n,0,1,Se,re,de])):1e-6=Math.PI),Se,e+n*Math.cos(i),t+n*Math.sin(i)])},ye.beginPath=function(){this.path=[],this.Yl={stroke:"none",fill:"none"}},ye.Se=function(e){this.addPath(this.path,this.rb,e||0)},ye.bezierCurveTo=function(e,t,n,r,i,o){this.path.push(["C",e,t,n,r,i,o])},ye.clearRect=function(){},ye.clip=function(){this.Yl.clipPath=!0},ye.closePath=function(){this.path.push(["z"])},ye.createLinearGradient=function(e,t,n,r){var i=new Pf("linear");return i.x1=e,i.y1=t,i.x2=n,i.y2=r,i},ye.createPattern=function(e){var t="";e instanceof HTMLCanvasElement&&(t=e.toDataURL()),e instanceof HTMLImageElement&&(t=e.getAttribute("src"));var n=this.eA;if(n[t])return"url(#"+n[t]+")";var r="PATTERN"+dt++,i={x:0,y:0,width:e.width,height:e.height,href:t};return e=this.Ud("pattern",{width:e.width,height:e.height,id:r,patternUnits:"userSpaceOnUse"}),e.appendChild(this.Ud(rf,i)),this.svg.appendChild(e),n[t]=r,"url(#"+r+")"},ye.createRadialGradient=function(e,t,n,r,i,o){var a=new Pf("radial");return a.x1=e,a.y1=t,a.r1=n,a.x2=r,a.y2=i,a.r2=o,a};function l0(e,t,n,r,i,o,a,p,w){r=p/r,i=w/i,o===0&&a===0||e.rb.translate(o,a),r===1&&i===1||e.rb.scale(r,i),t===0&&n===0||e.rb.translate(-t,-n)}ye.drawImage=function(e,t,n,r,i,o,a,p,w){var O="";e instanceof HTMLCanvasElement&&(O=e.toDataURL()),e instanceof HTMLImageElement&&(O=e.getAttribute("src"));var D=e instanceof HTMLImageElement?e.naturalWidth:e.width;e=e instanceof HTMLImageElement?e.naturalHeight:e.height,r===void 0&&(o=t,a=n,p=r=D,w=i=e),r=r||0,i=i||0,p=p||0,w=w||0,l0(this,t,n,r,i,o||0,a||0,p,w),o={x:0,y:0,width:D||r,height:e||i,href:O},vt.$(r,p)&&vt.$(i,w)?O.toLowerCase().indexOf(".svg")===-1&&O.toLowerCase().indexOf("data:image/svg")===-1&&(o.preserveAspectRatio="xMidYMid slice"):o.preserveAspectRatio="none",(t!==0||n!==0||r!==D||i!==e)&&(r+=t,i+=n,o["clip-path"]="path('M "+t+","+n+" L "+r+" "+n+" L "+r+" "+i+" L "+t+" "+i+" z')"),gd(this,rf,o,this.rb),this.addElement(rf,o)},ye.fill=function(e){e&&(this.Yl["fill-rule"]="evenodd"),gv(this,this.Yl)},ye.ng=function(e,t){this.clipInsteadOfFill?this.clip():this.fill(t)},ye.fillRect=function(e,t,n,r){e=[e,t,n,r],e={x:e[0],y:e[1],width:e[2],height:e[3]},gd(this,"fill",e,this.rb),this.addElement("rect",e)},ye.ox=function(e,t,n,r){e={x:e,y:t,width:n,height:r},gd(this,"fill",e,this.rb),gv(this,e),this.svg.prepend(this.Ud("rect",e))},ye.fillText=function(e,t,n){e=[e,t,n],t=this.textAlign,t==="left"?t="start":t==="right"?t="end":t==="center"&&(t="middle"),t={x:e[1],y:e[2],style:"font: "+this.font,"text-anchor":t},gd(this,"fill",t,this.rb),this.addElement("text",t,e[0])},ye.lineTo=function(e,t){this.path.push(["L",e,t])},ye.moveTo=function(e,t){this.path.push(["M",e,t])},ye.quadraticCurveTo=function(e,t,n,r){this.path.push(["Q",e,t,n,r])},ye.rect=function(e,t,n,r){this.path.push(["M",e,t],["L",e+n,t],["L",e+n,t+r],["L",e,t+r],["z"])},ye.restore=function(){this.rb=this.stack.pop(),this.path=this.stack.pop();var e=this.stack.pop();this.fillStyle=e.fillStyle,this.font=e.font,this.globalAlpha=e.globalAlpha,this.lineCap=e.lineCap,this.lineDashOffset=e.lineDashOffset,this.lineJoin=e.lineJoin,this.lineWidth=e.lineWidth,this.miterLimit=e.miterLimit,this.shadowBlur=e.shadowBlur,this.shadowColor=e.shadowColor,this.shadowOffsetX=e.shadowOffsetX,this.shadowOffsetY=e.shadowOffsetY,this.strokeStyle=e.strokeStyle,this.textAlign=e.textAlign,this.bk=e.bk},ye.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 e=[],t=0;tD.offset?1:-1}),i=0;in?(this.scale(n/e,1),this.translate((e-n)/2,0)):n>e&&(this.scale(1,e/n),this.translate(0,(n-e)/2)),this.Hm?this.clip():this.fill(t),e>n?(this.translate(-(e-n)/2,0),this.scale(1/(n/e),1)):n>e&&(this.translate(0,-(n-e)/2),this.scale(1,1/(e/n)))}else this.Hm?this.clip():this.fill(t)},ye.jk=function(){this.Hm||this.stroke()},ye.Ev=function(e,t,n){this.Ar=e,this.Br=t,this.Vg=n},ye.js=function(e,t){var n=this.Z;n.setLineDash!==void 0&&(n.setLineDash(e),n.lineDashOffset=t)},ye.fs=function(){var e=this.Z;e.setLineDash!==void 0&&(e.setLineDash(L1),e.lineDashOffset=0)},ye.Vc=function(e){e&&(this.dt=""),this.ct=this.et=""},ye.Hs=function(){},kn.Object.defineProperties(lf.prototype,{fillStyle:{get:function(){return this.Z.fillStyle},set:function(e){this.ct!==e&&(this.ct=this.Z.fillStyle=e)}},font:{get:function(){return this.Z.font},set:function(e){this.dt!==e&&(this.dt=this.Z.font=e)}},globalAlpha:{get:function(){return this.Z.globalAlpha},set:function(e){this.Z.globalAlpha=e}},lineCap:{get:function(){return this.Z.lineCap},set:function(e){this.Z.lineCap=e}},lineDashOffset:{get:function(){return this.Z.lineDashOffset},set:function(e){this.Z.lineDashOffset=e}},lineJoin:{get:function(){return this.Z.lineJoin},set:function(e){this.Z.lineJoin=e}},lineWidth:{get:function(){return this.Z.lineWidth},set:function(e){this.Z.lineWidth=e}},miterLimit:{get:function(){return this.Z.miterLimit},set:function(e){this.Z.miterLimit=e}},shadowBlur:{get:function(){return this.Z.shadowBlur},set:function(e){this.Z.shadowBlur=e}},shadowColor:{get:function(){return this.Z.shadowColor},set:function(e){this.Z.shadowColor=e}},shadowOffsetX:{get:function(){return this.Z.shadowOffsetX},set:function(e){this.Z.shadowOffsetX=e}},shadowOffsetY:{get:function(){return this.Z.shadowOffsetY},set:function(e){this.Z.shadowOffsetY=e}},strokeStyle:{get:function(){return this.Z.strokeStyle},set:function(e){this.et!==e&&(this.et=this.Z.strokeStyle=e)}},textAlign:{get:function(){return this.Z.textAlign},set:function(e){this.Z.textAlign=e}},imageSmoothingEnabled:{get:function(){return this.Z.imageSmoothingEnabled},set:function(e){this.Z.imageSmoothingEnabled=e}},filter:{get:function(){return this.Z.filter},set:function(e){this.Z.filter=e===""?"none":e}},clipInsteadOfFill:{get:function(){return this.Hm},set:function(e){this.Hm=e}}});var L1=Object.freeze([]);lf.className="CanvasSurfaceContext";function Sp(){this.F=this.o=this.u=this.j=0}Sp.className="ColorNumbers";function yi(e,t){bd||(Ev(),bd=!0),Ge(this),this._isFrozen=!1,e===void 0?(this.na=Xc,this.xk="black"):typeof e=="string"?(this.na=Xc,this.xk=e):(this.na=e,this.xk="black"),e=this.na,e===Rc?(this.Qd=Es,this.Lk=Qo):this.Lk=e===Bl?this.Qd=jr:this.Qd=So,this.Gr=0,this.Xp=NaN,this.xe=this.cr=this.we=null,this.ft=this.yk=0,t&&Object.assign(this,t)}yi.prototype.copy=function(){var e=new yi;return e.na=this.na,e.xk=this.xk,e.Qd=this.Qd.J(),e.Lk=this.Lk.J(),e.Gr=this.Gr,e.Xp=this.Xp,this.we!==null&&(e.we=this.we.copy()),e.cr=this.cr,e},ye=yi.prototype,ye.freeze=function(){return this._isFrozen=!0,this.we!==null&&this.we.freeze(),this},ye.ka=function(){return Object.isFrozen(this)&&Lt("cannot thaw constant: "+this),this._isFrozen=!1,this.we!==null&&this.we.ka(),this},ye.qb=function(e){e.classType===yi&&(this.type=e)},ye.toString=function(){var e="Brush(";if(this.type===Xc)e+=this.color;else if(e=this.type===Rc?e+"Linear ":this.type===Bl?e+"Radial ":this.type===Sd?e+"Pattern ":e+"(unknown) ",e+=this.start+" "+this.end,this.colorStops!==null)for(var t=this.colorStops.iterator;t.next();)e+=" "+t.key+":"+t.value;return e+")"},ye.addColorStop=function(e,t){return this._isFrozen&&Yn(this),(typeof e!="number"||!isFinite(e)||1e)&&hr(e,"0 <= loc <= 1",yi,"addColorStop:loc"),this.we===null&&(this.we=new nn),this.we.add(e,t),this.na===Xc&&(this.type=Rc),this.xe=null,this},ye.Vz=function(e,t){if(this._isFrozen&&Yn(this),e=e===void 0||typeof e!="number"?.2:e,t=t===void 0?xd:t,this.type===Xc)Nc(this.color),this.color=vd(e,t);else if((this.type===Rc||this.type===Bl)&&this.colorStops!==null)for(var n=this.colorStops.iterator;n.next();)Nc(n.value),this.addColorStop(n.key,vd(e,t));return this};function f0(e,t,n){return t=t===void 0||typeof t!="number"?.2:t,n=n===void 0?xd:n,Nc(e),vd(t,n)}ye.Wy=function(e,t){if(this._isFrozen&&Yn(this),e=e===void 0||typeof e!="number"?.2:e,t=t===void 0?xd:t,this.type===Xc)Nc(this.color),this.color=vd(-e,t);else if((this.type===Rc||this.type===Bl)&&this.colorStops!==null)for(var n=this.colorStops.iterator;n.next();)Nc(n.value),this.addColorStop(n.key,vd(-e,t));return this};function d0(e,t,n){return t=t===void 0||typeof t!="number"?.2:t,n=n===void 0?xd:n,Nc(e),vd(-t,n)}function vv(e,t,n){Nc(e),e=Zi.j;var r=Zi.u,i=Zi.o,o=Zi.F;return Nc(t),n===void 0&&(n=.5),"rgba("+Math.round((Zi.j-e)*n+e)+", "+Math.round((Zi.u-r)*n+r)+", "+Math.round((Zi.o-i)*n+i)+", "+Math.round((Zi.F-o)*n+o)+")"}ye.Gx=function(){if(this.type===Xc)return md(this.color);if((this.type===Rc||this.type===Bl)&&this.colorStops!==null){var e=this.colorStops;if(this.type===Bl)return md(e.first().value);if(e.get(.5)!==null)return md(e.get(.5));if(e.count===2)return e=e.Fa(),md(vv(e[0].value,e[1].value));for(var t=e.iterator,n=-1,r=-1,i=1,o=1;t.next();){var a=t.key,p=Math.abs(.5-t.key);i>o&&p=i&&pr&&(o=n,n=r,r=o,o=i),i=r-n,md(vv(e.get(n),e.get(r),1-o/i))}return!1};function md(e){return e?e instanceof yi?e.Gx():(Nc(e),128>(299*Zi.j+587*Zi.u+114*Zi.o)/1e3):!1}function vd(e,t){switch(t){case xd:t=100*bv(Zi.j);var n=100*bv(Zi.u),r=100*bv(Zi.o);return Ta.j=.4124564*t+.3575761*n+.1804375*r,Ta.u=.2126729*t+.7151522*n+.072175*r,Ta.o=.0193339*t+.119192*n+.9503041*r,Ta.F=Zi.F,t=xv(Ta.j/yd[0]),n=xv(Ta.u/yd[1]),r=xv(Ta.o/yd[2]),sc.j=116*n-16,sc.u=500*(t-n),sc.o=200*(n-r),sc.F=Ta.F,sc.j=Math.min(100,Math.max(0,sc.j+100*e)),e=(sc.j+16)/116,t=e-sc.o/200,Ta.j=yd[0]*p0(sc.u/500+e),Ta.u=yd[1]*(sc.j>_g*wv?Math.pow(e,3):sc.j/_g),Ta.o=yd[2]*p0(t),Ta.F=sc.F,e=-.969266*Ta.j+1.8760108*Ta.u+.041556*Ta.o,t=.0556434*Ta.j+-.2040259*Ta.u+1.0572252*Ta.o,Zi.j=255*Sv((3.2404542*Ta.j+-1.5371385*Ta.u+-.4985314*Ta.o)/100),Zi.u=255*Sv(e/100),Zi.o=255*Sv(t/100),Zi.F=Ta.F,Zi.j=Math.round(Zi.j),255Zi.j&&(Zi.j=0),Zi.u=Math.round(Zi.u),255Zi.u&&(Zi.u=0),Zi.o=Math.round(Zi.o),255Zi.o&&(Zi.o=0),"rgba("+Zi.j+", "+Zi.u+", "+Zi.o+", "+Zi.F+")";case g0:return yv(),wl.o=Math.min(100,Math.max(0,wl.o+100*e)),"hsla("+wl.j+", "+wl.u+"%, "+wl.o+"%, "+wl.F+")";default:Lt("Unknown color space: "+t)}}function Nc(e){bd||(Ev(),bd=!0);var t=Cv;if(t!==null){t.clearRect(0,0,1,1),t.fillStyle="#000000";var n=t.fillStyle;t.fillStyle=e,t.fillStyle!==n?(t.fillRect(0,0,1,1),e=t.getImageData(0,0,1,1).data,Zi.j=e[0],Zi.u=e[1],Zi.o=e[2],Zi.F=e[3]/255):(t.fillStyle="#FFFFFF",t.fillStyle=e,Zi.j=0,Zi.u=0,Zi.o=0,Zi.F=1)}}function yv(){var e=Zi.j/255,t=Zi.u/255,n=Zi.o/255,r=Math.max(e,t,n),i=Math.min(e,t,n),o=r-i;if(i=(r+i)/2,o===0)var a=e=0;else{switch(r){case e:a=(t-n)/o%6;break;case t:a=(n-e)/o+2;break;case n:a=(e-t)/o+4}a*=60,0>a&&(a+=360),e=o/(1-Math.abs(2*i-1))}wl.j=Math.round(a),wl.u=Math.round(100*e),wl.o=Math.round(100*i),wl.F=Zi.F}function bv(e){return e/=255,.04045>=e?e/12.92:Math.pow((e+.055)/1.055,2.4)}function Sv(e){return .0031308>=e?12.92*e:1.055*Math.pow(e,1/2.4)-.055}function xv(e){return e>wv?Math.pow(e,1/3):(_g*e+16)/116}function p0(e){var t=e*e*e;return t>wv?t:(116*e-16)/_g}function Ff(e,t){typeof e!="string"&&(e instanceof yi||Lt("Value for "+t+" must be a color string or a Brush, not "+e))}function Ev(){Cv=Po?new Ql(null,void 0,{willReadFrequently:!0}).context:null}kn.Object.defineProperties(yi.prototype,{type:{get:function(){return this.na},set:function(e){this._isFrozen&&Yn(this,e),this.na=e,this.start.Mc()&&(e===Rc?this.start=Es:e===Bl&&(this.start=jr)),this.end.Mc()&&(e===Rc?this.end=Qo:e===Bl&&(this.end=jr)),this.xe=null}},color:{get:function(){return this.xk},set:function(e){this._isFrozen&&Yn(this,e),this.xk=e,this.xe=null}},start:{get:function(){return this.Qd},set:function(e){this._isFrozen&&Yn(this,e),this.Qd=e.J(),this.xe=null}},end:{get:function(){return this.Lk},set:function(e){this._isFrozen&&Yn(this,e),this.Lk=e.J(),this.xe=null}},startRadius:{get:function(){return this.Gr},set:function(e){this._isFrozen&&Yn(this,e),0>e&&hr(e,">= zero",yi,"startRadius"),this.Gr=e,this.xe=null}},endRadius:{get:function(){return this.Xp},set:function(e){this._isFrozen&&Yn(this,e),0>e&&hr(e,">= zero",yi,"endRadius"),this.Xp=e,this.xe=null}},colorStops:{get:function(){return this.we},set:function(e){this._isFrozen&&Yn(this,e),this.we=e,this.xe=null}},pattern:{get:function(){return this.cr},set:function(e){this._isFrozen&&Yn(this,e),this.cr=e,this.xe=null}}}),yi.prototype.isDark=yi.prototype.Gx,yi.prototype.darkenBy=yi.prototype.Wy,yi.prototype.lightenBy=yi.prototype.Vz,yi.prototype.addColorStop=yi.prototype.addColorStop;var wv=216/24389,_g=24389/27,yd=[95.047,100,108.883],Cv=null,Zi=new Sp,wl=new Sp,Ta=new Sp,sc=new Sp,bd=!1;yi.className="Brush";var Xc;yi.Solid=Xc=new hn(yi,"Solid",0);var Rc;yi.Linear=Rc=new hn(yi,"Linear",1);var Bl;yi.Radial=Bl=new hn(yi,"Radial",2);var Sd;yi.Pattern=Sd=new hn(yi,"Pattern",4);var xd;yi.Lab=xd=new hn(yi,"Lab",5);var g0;yi.HSL=g0=new hn(yi,"HSL",6),yi.randomColor=function(e,t){e===void 0&&(e=128),t===void 0&&(t=Math.max(e,255));var n=Math.abs(t-e);t=Math.floor(e+Math.random()*n).toString(16);var r=Math.floor(e+Math.random()*n).toString(16);return e=Math.floor(e+Math.random()*n).toString(16),2>t.length&&(t="0"+t),2>r.length&&(r="0"+r),2>e.length&&(e="0"+e),"#"+t+r+e},yi.isValidColor=function(e){if(e==="black")return!0;if(e==="")return!1;bd||(Ev(),bd=!0);var t=Cv;if(t===null)return!0;t.fillStyle="#000000";var n=t.fillStyle;return t.fillStyle=e,t.fillStyle!==n?!0:(t.fillStyle="#FFFFFF",n=t.fillStyle,t.fillStyle=e,t.fillStyle!==n)},yi.lighten=function(e){return f0(e)},yi.lightenBy=f0,yi.darken=function(e){return d0(e)},yi.darkenBy=d0,yi.mix=vv,yi.isDark=md;function Ss(){this.xa="Base"}Ss.prototype.measure=function(){},Ss.prototype.Yz=function(e,t,n,r,i){e.measure(t,n,r,i)},Ss.prototype.arrange=function(){},Ss.prototype.Ly=function(e,t,n,r,i,o){e.arrange(t,n,r,i,o)},Ss.prototype.iA=function(e){e.Uj()},Ss.prototype.gc=function(){},kn.Object.defineProperties(Ss.prototype,{name:{get:function(){return this.xa},set:function(e){this.xa=e}},classType:{get:function(){return qt}}}),Ss.prototype.remeasureObject=Ss.prototype.iA,Ss.prototype.arrangeElement=Ss.prototype.Ly,Ss.prototype.measureElement=Ss.prototype.Yz,Ss.className="PanelLayout";function Ag(){this.xa="Base"}Tn(Ag,Ss),Ag.prototype.measure=function(e,t,n,r,i,o,a){var p=r.length;e=Ic(e);for(var w=0;wRn&&(As=Math.max(Rn-Bh,0));var tv=Gt.oa===0;Gt.oc=Gt.oc+As,Gt.actual=Gt.oa+As,Rn=Math.max(Rn-(As+(tv?Bh:0)),0)}if(Ja.columnSpan===1&&(ya===Wt||ya===Kn)){Gt=e.Eb(va);var lg=Gt.Wc();As=Math.max(vf-Gt.actual,0),As+lg>Sn&&(As=Math.max(Sn-lg,0));var Qy=Gt.oa===0;Gt.oc=Gt.oc+As,Gt.actual=Gt.oa+As,Sn=Math.max(Sn-(As+(Qy?lg:0)),0)}Fh&&Ja.Uj()}}}}}Mr(qe);var gc=0,Mc=0;o=e.columnCount;for(var Zf=0;Zf=e.rowCount);ch++)Gt=e.Fb(zo.row+ch),As=0,As=ya===Xt||ya===Kn?Math.max(Gt.minimum,Mu[zo.row+ch]===0?Gt.maximum:Math.min(Mu[zo.row+ch],Gt.maximum)):Math.max(Gt.minimum,isNaN(Gt.Hc)?Gt.maximum:Math.min(Gt.Hc,Gt.maximum)),Fc.height+=As,fl+=Gt.minimum;for(var iu=1;iu=e.columnCount);iu++)Gt=e.Eb(zo.column+iu),As=0,As=ya===Xt||ya===Bn?Math.max(Gt.minimum,Gl[zo.column+iu]===0?Gt.maximum:Math.min(Gl[zo.column+iu],Gt.maximum)):Math.max(Gt.minimum,isNaN(Gt.Hc)?Gt.maximum:Math.min(Gt.Hc,Gt.maximum)),Fc.width+=As,ov+=Gt.minimum;zs.width+=Fc.width,zs.height+=Fc.height;var Jd=zo.margin,Gh=Jd.right+Jd.left,cg=Jd.top+Jd.bottom;zo.measure(zs.width,zs.height,ov,fl);for(var Qd=zo.measuredBounds,ec=Math.max(Qd.width+Gh,0),xf=Math.max(Qd.height+cg,0),Wh=0,qd=0;qd=e.rowCount);qd++)Gt=e.Fb(zo.row+qd),Wh+=Gt.total||0;if(Wh=hh)&&!(zo.row+Bc>=e.rowCount);Bc++){Gt=e.Fb(zo.row+Bc);var dh=Gt.oa||0,Ef=fh(zo,Gt,vc);Gt.actual=Math.min(Gt.maximum,dh+Ef),Gt.oa!==dh&&(hh-=Gt.oa-dh)}for(;0Du&&(Gt.actual=Math.min(Gt.maximum,Du+hh),Gt.oa!==Du&&(hh-=Gt.oa-Du)),Gt.index===0)break;Gt=e.Fb(Gt.index-1)}}for(var qf=0,ph=0;ph=e.columnCount);ph++)Gt=e.Eb(zo.column+ph),qf+=Gt.total||0;if(qf=ed)&&!(zo.column+wf>=e.columnCount);wf++){Gt=e.Eb(zo.column+wf);var hg=Gt.oa||0,t0=jc(zo,Gt,e0);Gt.actual=Math.min(Gt.maximum,hg+t0),Gt.oa!==hg&&(ed-=Gt.oa-hg)}for(;0sv&&(Gt.actual=Math.min(Gt.maximum,sv+ed),Gt.oa!==sv&&(ed-=Gt.oa-sv)),Gt.index===0)break;Gt=e.Eb(Gt.index-1)}}}}Mr(tt),Yt.free(Fc),Yt.free(zs),Mu!==void 0&&Mr(Mu),Gl!==void 0&&Mr(Gl);var td=0,nd=0,av=e.desiredSize,A1=e.maxSize;ya=Ba(e,!0);var fg=Mc=gc=0,dg=0;o=e.columnCount;for(var lv=0;lv=e.rowCount);Gt++){var ar=e.Fb(qe+Gt);ar.oa!==0&&(We.height+=ar.total)}for(Gt=1;Gt<_n.columnSpan&&!(rt+Gt>=e.columnCount);Gt++)ar=e.Eb(rt+Gt),ar.oa!==0&&(We.width+=ar.total);var er=ft.oa+We.width,si=tt.oa+We.height;Gt=p,ar=w;var Hi=er,_s=si,Ms=p,ma=w,As=er,sh=si;p+er>n.width&&(As=Math.max(n.width-p,0)),w+si>n.height&&(sh=Math.max(n.height-w,0));var es=_n.alignment;if(es.Xb()){es=e.defaultAlignment,es.sb()||(es=jr);var Iu=es.x,va=es.y,ah=es.offsetX;es=es.offsetY;var _l=ft.alignment,nu=tt.alignment;_l.sb()&&(Iu=_l.x,ah=_l.offsetX),nu.sb()&&(va=nu.y,es=nu.offsetY)}else Iu=es.x,va=es.y,ah=es.offsetX,es=es.offsetY;(isNaN(Iu)||isNaN(va))&&(va=Iu=.5,es=ah=0),_l=ln.width,nu=ln.height;var ul=_n.margin,Ja=ul.left+ul.right,Fh=ul.top+ul.bottom,Ou=_u(_n,tt,ft,!1);!isNaN(_n.desiredSize.width)||Ou!==Xt&&Ou!==Bn||(_l=Math.max(er-Ja,0)),!isNaN(_n.desiredSize.height)||Ou!==Xt&&Ou!==Kn||(nu=Math.max(si-Fh,0)),er=_n.maxSize,si=_n.minSize,_l=Math.min(er.width,_l),nu=Math.min(er.height,nu),_l=Math.max(si.width,_l),nu=Math.max(si.height,nu),er=nu+Fh,Gt+=Hi*Iu-(_l+Ja)*Iu+ah+ul.left,ar+=_s*va-er*va+es+ul.top,_n.visible&&($i(Ms,ma,As,sh,Gt,ar,ln.width,ln.height)?_n.arrange(Gt,ar,_l,nu):_n.arrange(Gt,ar,_l,nu,new Nt(Ms,ma,As,sh)))}}}for(Yt.free(We),e=0;e=n&&(n=1);var r=e.gridCellSize,i=r.width;r=r.height;var o=e.naturalBounds,a=e.actualBounds,p=o.width,w=o.height,O=Math.ceil(p/i),D=Math.ceil(w/r),X=e.gridOrigin,re=X.x;X=X.y,t.save(),t.beginPath(),t.rect(0,0,p,w),t.clip(),t.Se();for(var de=[],Se=e.O.s,Te=Se.length,Xe=0;Xett)){We=Av(We.figure);for(var rt=0;rttt&&qe.push(ft))}}}}for(Se=e.O.s,Te=Se.length,Xe=0;Xei*We*n))){if(tt=Tt.segmentIndex,(!isFinite(tt)||isNaN(tt))&&(tt=0),0>tt&&(tt=We-Math.min(-tt,We)),tt=Math.round(tt%We),We=Tt.opacity,rt=1,We!==1){if(We===0)continue;rt=t.globalAlpha,t.globalAlpha=rt*We}ft=de[Xe];var Sn=!1,Rn=Tt.strokeDashArray;if(Rn!==null&&(Sn=!0,t.js(Rn,Tt.strokeDashOffset)),Tt.figure==="LineV"&&Tt.stroke!==null&&0t)return e%t===n;if(e%t!==n)return!1;t=r.length;for(var i=0;iX)qe.measure(1/0,1/0,0,0),tt=qe.measuredBounds,n.ed(tt),de.push(tt);else{var rt=qe.segmentIndex,ft=qe.segmentFraction,Tt=qe.alignmentFocus;Tt.Mc()&&(Tt=jr);var Sn=qe.segmentOrientation,Rn=qe.segmentOffset;if(isNaN(rt)){var _n=w.ua;tt=yr(),_n.Qu(ft,tt);var ln=Ue.allocAt(tt[0],tt[1]);if(ln.add(w.i(0)),_n.type===un.j?ln.offset(-_n.startX,-_n.startY):(_n=_n.figures.first(),_n!==null&&ln.offset(-_n.startX,-_n.startY)),_n=tt[2],Sn!==Aa){var Gt=w.computeAngle(qe,Sn,_n);qe.Kb=Gt}Gt=ln.x-t.x;var ar=ln.y-t.y;Ue.free(ln),Mr(tt)}else if(rt<-X||rt>=X)tt=Ue.alloc(),w.vg(),w.computeMidPoint(tt),_n=w.midAngle,Sn!==Aa&&(Gt=w.computeAngle(qe,Sn,_n),qe.Kb=Gt),Gt=tt.x-t.x,ar=tt.y-t.y,Ue.free(tt);else{if(Gt=0,0<=rt?(ar=D.M(rt),tt=rter+10?0<=rt?_n.ab(ar):ar.ab(_n):er>ln+10?0<=rt?tt.ab(Gt):Gt.ab(tt):0<=rt?_n.ab(Gt):Gt.ab(_n)}else _n=0<=rt?ar.ab(tt):tt.ab(ar);Sn!==Aa&&(Gt=w.computeAngle(qe,Sn,_n),qe.Kb=Gt),Gt=ar.x+(tt.x-ar.x)*ft-t.x,ar=ar.y+(tt.y-ar.y)*ft-t.y}qe.measure(1/0,1/0,0,0),tt=qe.measuredBounds,ln=qe.naturalBounds;var si=0;qe instanceof vr&&(si=qe.strokeWidth),er=ln.width+si;var Hi=ln.height+si;Se.reset(),Se.translate(-tt.x,-tt.y),Se.scale(qe.scale,qe.scale),Se.rotate(Sn===Aa?qe.angle:_n,er/2,Hi/2),Sn!==Mp&&Sn!==Pp||Se.rotate(90,er/2,Hi/2),Sn!==Dp&&Sn!==Fp||Se.rotate(-90,er/2,Hi/2),Sn===dm&&(45<_n&&135>_n||225<_n&&315>_n)&&Se.rotate(-_n,er/2,Hi/2),ln=new Nt(0,0,er,Hi),Te.xi(ln,Tt),Se.Ga(Te),Tt=-Te.x+si/2*qe.scale,qe=-Te.y+si/2*qe.scale,Xe.assign(Rn),si=isNaN(Rn.x);var _s=isNaN(Rn.y);if(si||_s){er=er/2+3,Hi=Hi/2+3;var Ms=45<=_n&&135>=_n,ma=225<=_n&&315>=_n;Sn===Aa&&(Ms||ma)?(Xe.x=_s?er:Rn.y,Xe.y=si?Hi:Rn.x,Ms?0<=rt||isNaN(rt)&&.5>ft||!si||(Xe.y=-Hi):ma&&((0<=rt||isNaN(rt)&&.5>ft)&&si&&(Xe.y=-Hi),_s&&(Xe.x=-er))):(si&&(Xe.x=0<=rt||isNaN(rt)&&.5>ft?er:-er),_s&&(Xe.y=-Hi),Xe.rotate(_n))}else Xe.rotate(_n);Gt+=Xe.x,ar+=Xe.y,ln.set(tt),ln.h(Gt+Tt,ar+qe,tt.width,tt.height),de.push(ln),n.ed(ln)}}if(a!==null)for(r=a.labelNodes;r.next();)r.value.measure(1/0,1/0);e.jg=n,e.position.h(t.x+n.x,t.y+n.y),no(i,n.width||0,n.height||0),dr.free(Se),Ue.free(Te),Ue.free(Xe)}}}},Fg.prototype.arrange=function(e,t){var n=t.length;if(e instanceof qr||e instanceof cn){var r=e,i=null;e instanceof qr&&(i=e,r=i.adornedPart);var o=e instanceof qr?null:r.path,a=e.j;if(a.length!==0){var p=0;if(o!==null&&p=n)Se=Ue.alloc(),de=X,Xe=Se,de.vg(),de.computeMidPoint(Xe),de=X.midAngle,O!==Aa&&(X=X.computeAngle(a,O,de),a.angle=X),X=Se.x,Xe=Se.y,Ue.free(Se);else{if(Te=0,0<=p?(Se=t.s[p],Xe=pqe+10?0<=p?de.ab(Se):Se.ab(de):qe>We+10?0<=p?Xe.ab(Te):Te.ab(Xe):0<=p?de.ab(Te):Te.ab(de)}else de=0<=p?Se.ab(Xe):Xe.ab(Se);O!==Aa&&(X=X.computeAngle(a,O,de),a.angle=X),X=Se.x+(Xe.x-Se.x)*w,Xe=Se.y+(Xe.y-Se.y)*w}if(re.ys())a.location=new Ue(X,Xe);else{re.Mc()&&(re=jr),Se=dr.alloc(),Se.reset(),Se.scale(a.scale,a.scale),Se.rotate(a.angle,0,0);var tt=a.naturalBounds;Te=Nt.allocAt(0,0,tt.width,tt.height),We=Ue.alloc(),We.xi(Te,re),Se.Ga(We),re=-We.x,qe=-We.y;var rt=tt.width,ft=tt.height;tt=Ue.alloc(),tt.assign(D);var Tt=isNaN(D.x),Sn=isNaN(D.y);if(Tt||Sn){rt=rt/2+3,ft=ft/2+3;var Rn=45<=de&&135>=de,_n=225<=de&&315>=de;O===Aa&&(Rn||_n)?(tt.x=Sn?rt:D.y,tt.y=Tt?ft:D.x,Rn?0<=p||isNaN(p)&&.5>w||!Tt||(tt.y=-ft):_n&&((0<=p||isNaN(p)&&.5>w)&&Tt&&(tt.y=-ft),Sn&&(tt.x=-rt))):(Tt&&(tt.x=0<=p||isNaN(p)&&.5>w?rt:-rt),Sn&&(tt.y=-ft),tt.rotate(de))}else tt.rotate(de);X+=tt.x,Xe+=tt.y,Se.pp(Te),re+=Te.x,qe+=Te.y,p=Ue.allocAt(X+re,Xe+qe),a.move(p),Ue.free(p),Ue.free(tt),Ue.free(We),Nt.free(Te),dr.free(Se)}}i!==null?i.Ul(!1):r.Ul(!1),r=V0(e),e.location.h(e.position.x+r.x,e.position.y+r.y),Ue.free(r)}};function m0(e,t,n,r){if(El(r)!==!1){var i=r.strokeWidth;i===0&&e instanceof qr&&e.type===qt.Link&&e.adornedObject instanceof vr&&(i=e.adornedObject.strokeWidth),i*=r.Ca,e instanceof cn&&e.ua!==null?(e=e.geometry.bounds,r.Ge(e.x-i/2,e.y-i/2,e.width+i,e.height+i)):e instanceof qr&&e.adornedPart.ua!==null?(e=e.adornedPart.ua.bounds,r.Ge(e.x-i/2,e.y-i/2,e.width+i,e.height+i)):r.Ge(-(i/2),-(i/2),t+i,n+i),i=r.desiredSize,i.w()||r.ua===null?r.dc.h(0,0,i.width,i.height):r.dc.assign(r.ua.bounds),gs(r,!1)}}function Ep(){this.xa="Base"}Tn(Ep,Ss),Ep.prototype.measure=function(e,t,n,r,i,o,a){var p=e.Pb();e.graduatedBounds=[];var w=p.margin,O=w.right+w.left,D=w.top+w.bottom;p.measure(t,n,o,a);var X=p.measuredBounds,re=new Nt(-w.left,-w.top,Math.max(X.width+O,0),Math.max(X.height+D,0));e.graduatedBounds.push(re),i.assign(re);for(var de=p.geometry,Se=p.strokeWidth,Te=de.flattenedSegments,Xe=de.flattenedLengths,We=de.flattenedTotalLength,qe=Te.length,tt=0,rt=0,ft=yr(),Tt=0;Tter&&(er+=360),Rn.push(er)}tt=Gt,rt=ar}ft.push(Rn)}if(e.graduatedIntervals===null){for(var si=[],Hi=e.O.s,_s=Hi.length,Ms=0;Ms<_s;Ms++){var ma=Hi[Ms],As=[];if(si.push(As),ma.visible){var sh=ma.interval;if(!(0>sh)){for(var es=0;es<_s;es++)if(es!==Ms){var Iu=Hi[es];if(Iu.visible&&ma.constructor===Iu.constructor){var va=Iu.interval;va>sh&&As.push(va)}}}}}e.graduatedIntervals=si}var ah=e.graduatedIntervals,_l=e.O.s,nu=_l.length,ul=0,Ja=0,Fh=We;e.graduatedMarks=[];for(var Ou,Wd=0;Wdag*ya*We/e.graduatedRange&&cl.graduatedSkip===null)){var Xf=Xe[0][0],Ju=0,Qa=0;Ja=We*cl.graduatedStart-1e-4,Fh=We*cl.graduatedEnd+1e-4;var vf=ag*ya,hl=e.graduatedTickBase;if(hle.graduatedMin+vf&&(hl-=Math.floor((hl-e.graduatedMin)/vf)*vf);for(var tv=ah[Wd],lg=hl,Qy=1e-6*e.graduatedMax,gc=1;hl<=e.graduatedMax+Qy;gc++){e:{for(var Mc=tv.length,Zf=0;Zf-Vd){var Uh=!1;break e}}Uh=!0}if(Uh&&(hl>e.graduatedMax&&(hl=e.graduatedMax),cl.graduatedSkip===null||cl instanceof Vi&&!cl.graduatedSkip(hl,cl)||cl instanceof vr&&!cl.graduatedSkip(hl,cl))&&(ul=(hl-e.graduatedMin)*We/e.graduatedRange,ul>We&&(ul=We),Ja<=ul&&ul<=Fh)){for(var mc=ft[Ju][Qa],lh=Xe[Ju][Qa];JuXf&&QaDc&&.4995Dc?0Dc||.9995Jf){var Yd=1-Math.abs(.5-Dc);mc=(Lu*Yd+qu*(1-Yd))%360;break e}}}mc=Lu}if(cl instanceof Vi){var Su="";cl.graduatedFunction!==null?(Su=cl.graduatedFunction(hl,cl),Su=Su!=null?Su.toString():""):Su=(+hl.toFixed(2)).toString(),Su!==""&&Ou.push({$l:Kd,angle:mc,text:Su})}else Ou.push({$l:Kd,angle:mc})}hl=lg+gc*vf}}}e.graduatedMarks.push(Ou)}Mr(ft);var zs=e.graduatedMarks;if(zs!==null)for(var ug=r.length,Oa=0;Oaxu;xu++){switch(xu){case 0:el.h(Fc,Mu);break;case 1:el.h(Fc+$d,Mu);break;case 2:el.h(Fc,Mu+Sf);break;case 3:el.h(Fc+$d,Mu+Sf)}el.rotate(zo+ts.angle),el.offset(iv,Zd),Xd===0&&xu===0?Gl.h(el.x,el.y,0,0):Gl.Ye(el),el.offset(-iv,-Zd),el.rotate(-zo-ts.angle)}Ue.free(el),Pc.graduatedBounds!==null&&Pc.graduatedBounds.push(Gl),fi(uh,Gl.x,Gl.y,Gl.width,Gl.height)}else if(ts instanceof Vi){var ru=e,ov=i;ru.temporaryTextBlock===null&&(ru.temporaryTextBlock=new Vi);var fl=ru.temporaryTextBlock;I0(fl,ts);var ch=ts.alignmentFocus;ch.Mc()&&(ch=Es);for(var iu=ts.segmentOrientation,Jd=ts.segmentOffset,Gh=new Nt,cg=0,Qd=0,ec=0,xf=0,Wh=0,qd=La.length,hh=0;hhec||225ec)&&Du.rotate(-ec,dh/2,Ef/2);var qf=Nt.allocAt(0,0,dh,Ef),ph=Ue.alloc();ph.xi(qf,ch),Du.Ga(ph);var ed=-ph.x,e0=-ph.y,jc=Ue.alloc();jc.assign(Jd),isNaN(jc.x)&&(jc.x=dh/2+3),isNaN(jc.y)&&(jc.y=-(Ef/2+3)),jc.rotate(ec),cg+=jc.x+ed,Qd+=jc.y+e0;var wf=new Nt(cg,Qd,fh.width,fh.height),hg=new Nt(fh.x,fh.y,fh.width,fh.height),t0=new Nt(Bc.x,Bc.y,Bc.width,Bc.height);vc.Sz=xf,vc.lineCount=fl.lineCount,vc.lines=[fl.Cb,fl.Ih,fl.df,fl.Le,fl.Qc,fl.Qb,fl.ze],vc.actualBounds=wf,vc.measuredBounds=hg,vc.naturalBounds=t0,hh===0?Gh.assign(wf):Gh.ed(wf),Ue.free(jc),Ue.free(ph),Nt.free(qf),dr.free(Du)}ru.graduatedBounds!==null&&ru.graduatedBounds.push(Gh),fi(ov,Gh.x,Gh.y,Gh.width,Gh.height)}gs(ts,!1)}}},Ep.prototype.arrange=function(e,t,n){if(e.graduatedBounds!==null){var r=e.Pb(),i=e.graduatedMarks;if(i!==null){var o=e.graduatedBounds,a=0,p=o[a];a++,r!==null&&r.arrange(p.x-n.x,p.y-n.y,p.width,p.height);for(var w=t.length,O=0;O=a&&(a=1);for(var p=o.actualBounds,w=e.O.s,O=e.graduatedMarks,D=w.length,X=0;Xe.graduatedTickUnit*re.interval*o.geometry.flattenedTotalLength/e.graduatedRange*a&&re.graduatedSkip===null)){var Te=re.measuredBounds,Xe=re.strokeWidth*re.scale,We=re.alignmentFocus;We.Mc()&&(We=Es);for(var qe=0;qea.height)continue}else if(O.position>a.width)continue;var D=O.separatorStrokeWidth;isNaN(D)&&(D=n?e.defaultRowSeparatorStrokeWidth:e.defaultColumnSeparatorStrokeWidth);var X=O.separatorStroke;if(X===null&&(X=n?e.defaultRowSeparatorStroke:e.defaultColumnSeparatorStroke),D!==0&&X!==null){Ho(e,t,X,!1,!1,a,o),X=!1;var re=O.separatorDashArray;re===null&&(re=n?e.defaultRowSeparatorDashArray:e.defaultColumnSeparatorDashArray),re!==null&&(X=!0,t.js(re,0)),t.beginPath(),re=O.position+D,n?re>a.height&&(D-=re-a.height):re>a.width&&(D-=re-a.width),O=O.position+D/2,t.lineWidth=D,D=e.yb,n?(O+=D.top,re=a.width-D.right,t.moveTo(D.left,O),t.lineTo(re,O)):(O+=D.left,re=a.height-D.bottom,t.moveTo(O,D.top),t.lineTo(O,re)),t.stroke(),t.Se(),X&&t.fs()}}}}function Bg(e,t,n,r,i){for(var o=r.length,a=e.actualBounds,p=e.naturalBounds,w=y0(e,!0),O=y0(e,!1),D=0;Dre)){var de=X.Wc(),Se=X.separatorStrokeWidth;isNaN(Se)&&(Se=n?e.defaultRowSeparatorStrokeWidth:e.defaultColumnSeparatorStrokeWidth);var Te=X.separatorStroke;Te===null&&(Te=n?e.defaultRowSeparatorStroke:e.defaultColumnSeparatorStroke),(Te===null||X.index===(n?w:O))&&(Se=0),de-=Se,Se=X.position+Se,de+=X.actual,Se+de>re&&(de=re-Se),0>=de||(re=e.yb,Ho(e,t,X.background,!0,!1,p,a),n?t.fillRect(re.left,Se+re.top,a.width-(re.left+re.right),de):t.fillRect(Se+re.left,re.top,de,a.height-(re.top+re.bottom)))}}}}function y0(e,t){for(var n=t?e.rowCount:e.columnCount,r=0;rr&&i.set(Se),Ue.free(Se)),Ue.free(D),o&&i.transform(a),O},ye.Gj=function(){for(var e=this.O.s,t=e.length,n=0;nn||o>r)&&(this.v(),this.measure(t>n?n:t,o>r?r:o,0,0));break;case Xt:this.v(!0),this.measure(n+p,r+a,0,0);break;case Bn:this.v(!0),this.measure(n+p,o+a,0,0);break;case Kn:this.v(!0),this.measure(t+p,r+a,0,0)}}this.na.arrange(this,i,this.jg)}},ye.gh=function(e){var t=this.naturalBounds,n=Ic(this);if($i(0,0,t.width,t.height,e.x,e.y)){t=this.O.s;for(var r=t.length,i=Ue.allocAt(0,0);r--;){var o=t[r];if((o.visible||o===n)&&(wr(i.set(e),o.transform),o.ca(i)))return Ue.free(i),!0}return Ue.free(i),!(this.Ma===null&&this.areaBackground===null)}return!1},ye.ks=function(e){if(this.bindingId===e)return this;for(var t=this.O.s,n=t.length,r=0;rre.width||X.y>re.height||0>X.x+X.width||0>X.y+X.height||(X=D,D=D instanceof qt?D:null,re=dr.alloc(),re.set(a),(D!==null?D.Cf(e,t,n,r,i,re):Ts(X,e,r,re))&&(t!==null&&(X=t(X)),X===null||n!==null&&!n(X)||i.add(X)),dr.free(re))}}return o===void 0&&dr.free(a),r}return o===void 0&&dr.free(a),!1};function kv(e,t,n,r){for(var i=e.O.s,o=i.length;o--;){var a=i[o];if(a.visible){var p=a.actualBounds,w=e.naturalBounds;p.x>w.width||p.y>w.height||0>p.x+p.width||0>p.y+p.height||(a instanceof qt&&kv(a,t,n,r),t!==null&&(a=t(a)),a===null||n!==null&&!n(a)||r.add(a))}}}ye.og=function(e,t,n,r,i,o){if(this.pickable===!1)return!1;n===void 0&&(n=null),r===void 0&&(r=null);var a=this.naturalBounds,p=this.se(),w=p?e:wr(Ue.allocAt(e.x,e.y),this.transform),O=p?t:wr(Ue.allocAt(t.x,t.y),this.transform),D=w.Bf(O),X=0Xe.width||Te.y>Xe.height||0>Te.x+Te.width||0>Te.y+Te.height))&&(Se.se()?(Te=Se.transform,wr(w.set(e),Te),wr(O.set(t),Te)):(w.set(e),O.set(t)),Te=Se,Se=Se instanceof qt?Se:null,(Se!==null?Se.og(w,O,n,r,i,o):Te.tx(w,O,i))&&(n!==null&&(Te=n(Te)),Te===null||r!==null&&!r(Te)||o.add(Te)))}}Ue.free(w),Ue.free(O)}return i?X:a}return!1};function Nv(e){var t=null;return e instanceof vr&&(t=e.spot1,t===is&&(t=null),e=e.geometry,e!==null&&t===null&&(t=e.spot1)),t===null&&(t=No),t}function Rv(e){var t=null;return e instanceof vr&&(t=e.spot2,t===is&&(t=null),e=e.geometry,e!==null&&t===null&&(t=e.spot2)),t===null&&(t=ks),t}ye.add=function(e){for(var t=[],n=0;n=i.count&&e>=i.count)return;i.mb(o),r=o}else Lt("element "+t.toString()+" has panel "+n.toString()+" but is not contained by it.")}(0>e||e>i.count)&&(e=i.count),i.Gb(e,t),(e===0||t.isPanelMain)&&(this.$g=null),El(this)||this.v(),t.v(!1),t.portId!==null?this.Te=!0:t instanceof qt&&t.Te===!0&&(this.Te=!0),this.graduatedIntervals=null,this.If()||Ug(this,t,!1),n=this.part,n!==null&&(n.Rh=null,n.ag=NaN,this.Te&&n instanceof En&&(n.Te=!0),n.Te&&n instanceof En&&(n.wc=null),i=this.diagram,i!==null&&i.undoManager.isUndoingRedoing||(r!==-1&&n.cb(Lo,"elements",this,t,null,r,null),n.cb(xo,"elements",this,null,t,null,e)))};function Iv(e,t){e.l=t?e.l|16777216:e.l&-16777217}ye.remove=function(e){for(var t=this.O.s,n=t.length,r=-1,i=0;ie&&hr(e,">= 0",qt,"getRowDefinition:idx"),e=Math.round(e);var t=this.rowDefs;if(t[e]===void 0){var n=new ms;n.wi(this),n.isRow=!0,n.index=e,t[e]=n,this.cb(xo,"rowdefs",this,null,n,null,e)}return t[e]},ye.oA=function(e){if(0>e&&hr(e,">= 0",qt,"removeRowDefinition:idx"),this.rowCount!==0){e=Math.round(e);var t=this.rowDefs,n=t[e];if(n){t[e]=void 0;for(var r=t.length-1;0<=r&&t[r--]===void 0;)t.length--;this.cb(Lo,"rowdefs",this,n,null,e,null),this.v()}}};function w0(e,t,n){var r=e.rowDefs;if(!(0>t)){if(r[t]=n instanceof ms?n:void 0,!n)for(t=r.length-1;0<=t&&r[t--]===void 0;)r.length--;e.v()}}ye.Eb=function(e){0>e&&hr(e,">= 0",qt,"getColumnDefinition:idx"),e=Math.round(e);var t=this.colDefs;if(t[e]===void 0){var n=new ms;n.wi(this),n.isRow=!1,n.index=e,t[e]=n,this.cb(xo,"coldefs",this,null,n,null,e)}return t[e]},ye.jA=function(e){if(0>e&&hr(e,">= 0",qt,"removeColumnDefinition:idx"),this.columnCount!==0){e=Math.round(e);var t=this.colDefs,n=t[e];if(n){t[e]=void 0;for(var r=t.length-1;0<=r&&t[r--]===void 0;)t.length--;this.cb(Lo,"coldefs",this,n,null,e,null),this.v()}}};function C0(e,t,n){var r=e.colDefs;if(!(0>t)){if(r[t]=n instanceof ms?n:void 0,!n)for(t=r.length-1;0<=t&&r[t--]===void 0;)r.length--;e.v()}}ye.Gy=function(e){var t=null;return e.isRow?t=this.Fb(e.index):e.isRow||(t=this.Eb(e.index)),t&&Hg(t,e),this},ye.Hy=function(e,t){return(e=this.Fb(e))&&Hg(e,new ms(t)),this},ye.By=function(e,t){return(e=this.Eb(e))&&Hg(e,new ms(t)),this},ye.nz=function(e){if(0>e||this.type!==qt.Table||this.rowCount===0)return-1;for(var t=0,n=this.rowDefs,r=n.length,i=this.topIndex;ie||this.type!==qt.Table||this.columnCount===0)return-1;for(var t=0,n=this.colDefs,r=n.length,i=this.leftIndex;ie;)this.pc(this.O.length-1,!1);_0(this,this.itemArray)};function _0(e,t){var n=wp(e);if(t===null||t.length===0)for(;e.O.length>n;)e.pc(e.O.length-1,!1);else if(e.O.length<=n){n=t.length;for(var r=0;rn)){var i=Lv(e,t);if(i=Mv(e,i),i!==null){if(ql(i),i=i.copy(),i.l&16777216){var o=e.ih();o!==null&&Iv(o,!0)}typeof t=="object"&&(e.ge===null&&(e.ge=new nn),e.ge.add(t,i)),o=n+wp(e),e.Gb(o,i),r&&(i.ub=t,Ov(e,o,n),i.ub=null),i.data=t}}}function Ov(e,t,n){for(e=e.O;te&&hr(e,">= 0",qt,"padding"),e=new Wn(e)):(0>e.left&&hr(e.left,">= 0",qt,"padding:value.left"),0>e.right&&hr(e.right,">= 0",qt,"padding:value.right"),0>e.top&&hr(e.top,">= 0",qt,"padding:value.top"),0>e.bottom&&hr(e.bottom,">= 0",qt,"padding:value.bottom"));var t=this.yb;t.D(e)||(this.yb=e=e.J(),this.v(),this.g("padding",t,e))}},defaultAlignment:{get:function(){return this.Tm},set:function(e){var t=this.Tm;t.D(e)||(this.Tm=e=e.J(),this.v(),this.g("defaultAlignment",t,e))}},defaultStretch:{get:function(){return this.Uf},set:function(e){var t=this.Uf;t!==e&&(this.Uf=e,this.v(),this.g("defaultStretch",t,e))}},defaultSeparatorPadding:{get:function(){return this.T!==null?this.T.Qp:fo},set:function(e){typeof e=="number"&&(e=new Wn(e));var t=this.defaultSeparatorPadding;t.D(e)||(e=e.J(),this.T===null&&(this.T=new jl),this.T.Qp=e,this.v(),this.g("defaultSeparatorPadding",t,e))}},defaultRowSeparatorStroke:{get:function(){return this.T!==null?this.T.ia:null},set:function(e){var t=this.defaultRowSeparatorStroke;t!==e&&(e===null||typeof e=="string"||e instanceof yi)&&(e instanceof yi&&e.freeze(),this.T===null&&(this.T=new jl),this.T.ia=e,this.N(),this.g("defaultRowSeparatorStroke",t,e))}},defaultRowSeparatorStrokeWidth:{get:function(){return this.T!==null?this.T.Ha:1},set:function(e){var t=this.defaultRowSeparatorStrokeWidth;t!==e&&isFinite(e)&&0<=e&&(this.T===null&&(this.T=new jl),this.T.Ha=e,this.v(),this.g("defaultRowSeparatorStrokeWidth",t,e))}},defaultRowSeparatorDashArray:{get:function(){return this.T!==null?this.T.V:null},set:function(e){var t=this.defaultRowSeparatorDashArray;if(t!==e){if(e!==null){for(var n=e.length,r=0,i=0;ie)&&Lt("Panel.topIndex must be greater than zero and a real number, not: "+e),this.T===null&&(this.T=new jl),this.T.Hb=e,this.v(),this.g("topIndex",t,e))}},leftIndex:{get:function(){return this.T!==null?this.T.hb:0},set:function(e){var t=this.leftIndex;t!==e&&((!isFinite(e)||0>e)&&Lt("Panel.leftIndex must be greater than zero and a real number, not: "+e),this.T===null&&(this.T=new jl),this.T.hb=e,this.v(),this.g("leftIndex",t,e))}},data:{get:function(){return this.ub},set:function(e){var t=this.ub;if(t!==e){var n=this instanceof zn&&!(this instanceof qr);ql(this),this.ub=e;var r=this.diagram;r!==null&&(n?(n=r.partManager,this instanceof cn?(t!==null&&n.bf.remove(t),e!==null&&n.bf.add(e,this)):this instanceof zn&&(t!==null&&n.cf.remove(t),e!==null&&n.cf.add(e,this))):(n=this.panel,n!==null&&n.ge!==null&&(t!==null&&n.ge.remove(t),e!==null&&n.ge.add(e,this)))),this.g("data",t,e),r!==null&&r.undoManager.isUndoingRedoing||e!==null&&this.La()}}},itemIndex:{get:function(){return this.zn},set:function(e){var t=this.zn;t!==e&&(this.zn=e,this.g("itemIndex",t,e))}},allBindings:{get:function(){return this.A!==null?this.A.nb:null},set:function(e){this.localBindings!==e&&(this.A===null&&(this.A=new Df),this.A.nb=e)}},itemArray:{get:function(){return this.Hh},set:function(e){var t=this.Hh;if(t!==e||e!==null&&D1(this,e)){var n=this.diagram;t!==e&&(n!==null&&t!==null&&Sy(n.partManager,this,n),this.Hh=e,n!==null&&e!==null&&by(n.partManager,this)),this.g("itemArray",t,e),n!==null&&n.undoManager.isUndoingRedoing||_0(this,e)}}},itemTemplate:{get:function(){return this.itemTemplateMap===null?null:this.itemTemplateMap.I("")},set:function(e){if(this.itemTemplateMap===null){if(e===null)return;this.itemTemplateMap=new nn}var t=this.itemTemplateMap.I("");t!==e&&((e instanceof zn||e.isPanelMain)&&Lt("Panel.itemTemplate must not be a Part or be Panel.isPanelMain: "+e),this.itemTemplateMap.add("",e),this.g("itemTemplate",t,e),e=this.diagram,e!==null&&e.undoManager.isUndoingRedoing||this.mv())}},itemTemplateMap:{get:function(){return this.A!==null?this.A.Pc:null},set:function(e){var t=this.itemTemplateMap;if(t!==e){for(var n=e.iterator;n.next(););br(this),this.A.Pc=e,this.g("itemTemplateMap",t,e),e=this.diagram,e!==null&&e.undoManager.isUndoingRedoing||this.mv()}}},itemCategoryProperty:{get:function(){return this.A!==null?this.A.Oc:"category"},set:function(e){var t=this.itemCategoryProperty;t!==e&&(br(this),this.A.Oc=e,this.g("itemCategoryProperty",t,e))}},isAtomic:{get:function(){return(this.l&1048576)!==0},set:function(e){var t=(this.l&1048576)!==0;t!==e&&(this.l^=1048576,this.g("isAtomic",t,e))}},isClipping:{get:function(){return(this.l&2097152)!==0},set:function(e){var t=(this.l&2097152)!==0;t!==e&&(this.l^=2097152,this instanceof lr&&(this.tb=null),this.v(),this.g("isClipping",t,e))}},isOpposite:{get:function(){return(this.l&33554432)!==0},set:function(e){var t=(this.l&33554432)!==0;t!==e&&(this.l^=33554432,this.v(),this.g("isOpposite",t,e))}},isEnabled:{get:function(){return(this.l&4194304)!==0},set:function(e){var t=(this.l&4194304)!==0;if(t!==e){var n=this.panel===null||this.panel.If();this.l^=4194304,this.g("isEnabled",t,e),t=this.diagram,t!==null&&t.undoManager.isUndoingRedoing||n&&Ug(this,this,e)}}},alignmentFocusName:{get:function(){return this.$e},set:function(e){var t=this.$e;t!==e&&(this.$e=e,this.v(),this.g("alignmentFocusName",t,e))}}}),kn.Object.defineProperties(qt,{Position:{get:function(){return pu.I("Position")}},Horizontal:{get:function(){return pu.I("Horizontal")}},Vertical:{get:function(){return pu.I("Vertical")}},Spot:{get:function(){return pu.I("Spot")}},Auto:{get:function(){return pu.I("Auto")}},Table:{get:function(){return pu.I("Table")}},Viewbox:{get:function(){return pu.I("Viewbox")}},TableRow:{get:function(){return pu.I("TableRow")}},TableColumn:{get:function(){return pu.I("TableColumn")}},Link:{get:function(){return pu.I("Link")}},Grid:{get:function(){return pu.I("Grid")}},Graduated:{get:function(){return pu.I("Graduated")}}}),qt.prototype.rebuildItemElements=qt.prototype.mv,qt.prototype.findItemPanelForData=qt.prototype.sx,qt.prototype.updateTargetBindings=qt.prototype.La,qt.prototype.copyTemplate=qt.prototype.Uy,qt.prototype.graduatedValueForPoint=qt.prototype.Gz,qt.prototype.graduatedPointForValue=qt.prototype.Fz,qt.prototype.findColumnForLocalX=qt.prototype.fz,qt.prototype.findRowForLocalY=qt.prototype.nz,qt.prototype.addColumnDefinition=qt.prototype.By,qt.prototype.addRowDefinition=qt.prototype.Hy,qt.prototype.addRowColumnDefinition=qt.prototype.Gy,qt.prototype.removeColumnDefinition=qt.prototype.jA,qt.prototype.getColumnDefinition=qt.prototype.Eb,qt.prototype.removeRowDefinition=qt.prototype.oA,qt.prototype.getRowDefinition=qt.prototype.Fb,qt.prototype.removeAt=qt.prototype.mb,qt.prototype.remove=qt.prototype.remove,qt.prototype.insertAt=qt.prototype.Gb,qt.prototype.elt=qt.prototype.M,qt.prototype.add=qt.prototype.add,qt.prototype.findObject=qt.prototype.fb,qt.prototype.findInVisualTree=qt.prototype.Nl,qt.prototype.walkVisualTreeFrom=qt.prototype.qm,qt.prototype.findMainElement=qt.prototype.Pb;var A0=!1,k0=null,pu=new nn;qt.className="Panel",qt.definePanelLayout=Xu,Xu("Position",new Ag),Xu("Vertical",new Ng),Xu("Auto",new Ig),Xu("Link",new Fg);function Oc(){this.lq=0,this.F=100,this.ia=10,this.V=0,this.Zh=this.o=this.j=this.u=null}Oc.prototype.copy=function(){var e=new Oc;return e.lq=this.lq,e.F=this.F,e.ia=this.ia,e.V=this.V,e.u=this.u,e.j=this.j,e.o=this.o,e.Zh=this.Zh,e},Oc.className="GradPanelSettings";function jl(){this.Pc=[],this.Oc=[],this.j=this.ob=Gg,this.hb=this.Hb=0,this.Qp=fo,this.Ha=1,this.V=this.ia=null,this.F=1,this.nb=this.o=this.u=null}jl.prototype.copy=function(e){for(var t=new jl,n=this.Pc,r=n.length,i=t.Pc,o=0;oe&&hr(e,">= 0",ms,"height"),this.Hc=e,this.actual=this.oa,this.panel!==null&&this.panel.v(),this.Ob("height",t,e))}},width:{get:function(){return this.Hc},set:function(e){var t=this.Hc;t!==e&&(0>e&&hr(e,">= 0",ms,"width"),this.Hc=e,this.actual=this.oa,this.panel!==null&&this.panel.v(),this.Ob("width",t,e))}},minimum:{get:function(){return this.jj},set:function(e){var t=this.jj;t!==e&&((0>e||!isFinite(e))&&hr(e,">= 0",ms,"minimum"),this.jj=e,this.actual=this.oa,this.panel!==null&&this.panel.v(),this.Ob("minimum",t,e))}},maximum:{get:function(){return this.hj},set:function(e){var t=this.hj;t!==e&&(0>e&&hr(e,">= 0",ms,"maximum"),this.hj=e,this.actual=this.oa,this.panel!==null&&this.panel.v(),this.Ob("maximum",t,e))}},alignment:{get:function(){return this.Jb},set:function(e){var t=this.Jb;t.D(e)||(this.Jb=e.J(),this.panel!==null&&this.panel.v(),this.Ob("alignment",t,e))}},stretch:{get:function(){return this.hg},set:function(e){var t=this.hg;t!==e&&(this.hg=e,this.panel!==null&&this.panel.v(),this.Ob("stretch",t,e))}},separatorPadding:{get:function(){return this.dg},set:function(e){typeof e=="number"&&(e=new Wn(e));var t=this.dg;e!==null&&t!==null&&t.D(e)||(e!==null&&(e=e.J()),this.dg=e,this.panel!==null&&this.panel.v(),this.Ob("separatorPadding",t,e))}},separatorStroke:{get:function(){return this.lo},set:function(e){var t=this.lo;t!==e&&(e!==null&&Ff(e,"RowColumnDefinition.separatorStroke"),e instanceof yi&&e.freeze(),this.lo=e,this.panel!==null&&this.panel.v(),this.Ob("separatorStroke",t,e))}},separatorStrokeWidth:{get:function(){return this.mo},set:function(e){var t=this.mo;t!==e&&(this.mo=e,this.panel!==null&&this.panel.v(),this.Ob("separatorStrokeWidth",t,e))}},separatorDashArray:{get:function(){return this.tj},set:function(e){var t=this.tj;if(t!==e){if(e!==null){for(var n=e.length,r=0,i=0;ii)){var o=r.measuredBounds,a=Math.max(1,o.width);o=o.height;for(var p=n[0],w=n[1],O,D,X,re,de,Se,Te=0,Xe=yr(),We=2;WeX&&(X=1),i=n=X,O=a/2,D=O!==0,We=0,Se=Xe[We],X=Se[0],de=Se[1],re=Se[2],Se=Se[3];for(var qe=0;.1<=Te;){if(qe===0&&(D?(i=n,i-=O,Te-=O,D=!1):i=n,i===0&&(i=1)),i>Te){Mr(Xe);return}i>Se?(qe=i-Se,i=Se):qe=0;var tt=Math.sqrt(i*i/(1+re*re));if(0>X&&(tt=-tt),p+=tt,w+=re*tt,e.translate(p,w),e.rotate(de),e.translate(-(a/2),-(o/2)),qe===0&&r.hh(e,t),e.translate(a/2,o/2),e.rotate(-de),e.translate(-p,-w),Te-=i,Se-=i,qe!==0){if(We++,We===Xe.length){Mr(Xe);return}Se=Xe[We],X=Se[0],de=Se[1],re=Se[2],Se=Se[3],i=qe}}Mr(Xe)}}ye.hh=function(e,t){var n=this.xc,r=this.Ui;if(n!==null||r!==null){var i=this.ua;if(i!==null){e.yc();var o=this.actualBounds,a=this.naturalBounds;r!==null&&Ho(this,e,r,!0,!1,a,o);var p=this.part,w=this.ig;if(n===null||w!==0||p===null||!this.isPanelMain&&p.Pb()!==this||(w=p.type===qt.Link&&p instanceof qr&&p.category==="Selection"&&p.adornedObject instanceof vr&&p.adornedPart.Pb()===p.adornedObject?p.adornedObject.strokeWidth:0),w===0&&(n=null),n!==null&&w!==0&&(Ho(this,e,n,!1,!1,a,o),e.lineWidth=w,e.lineJoin=this.strokeJoin,e.lineCap=this.strokeCap,e.miterLimit=this.strokeMiterLimit),o=!1,p&&t.Gf("drawShadows")&&(o=p.isShadowed),e.Il===!1&&(o=!1),p=!0,n===null||r!==null&&r!=="transparent"||(p=!1),a=!1,w=this.strokeDashArray,w!==null&&(a=!0,e.js(w,this.strokeDashOffset)),i.type===un.j)e.beginPath(),e.moveTo(i.startX,i.startY),e.lineTo(i.endX,i.endY),n!==null&&e.jk(),e.Se();else if(i.type===un.u){var O=i.startX;w=i.startY;var D=i.endX,X=i.endY;i=Math.min(O,D);var re=Math.min(w,X);O=Math.abs(D-O),w=Math.abs(X-w),e.beginPath(),e.rect(i,re,O,w),r!==null&&e.ng(r),n!==null&&(p&&o&&oc(e),e.jk(),p&&o&&kc(e)),e.Se()}else if(i.type===un.F)O=i.startX,w=i.startY,D=i.endX,X=i.endY,i=Math.abs(D-O)/2,re=Math.abs(X-w)/2,O=Math.min(O,D)+i,w=Math.min(w,X)+re,e.beginPath(),e.moveTo(O,w-re),e.bezierCurveTo(O+vt.wg*i,w-re,O+i,w-vt.wg*re,O+i,w),e.bezierCurveTo(O+i,w+vt.wg*re,O+vt.wg*i,w+re,O,w+re),e.bezierCurveTo(O-vt.wg*i,w+re,O-i,w+vt.wg*re,O-i,w),e.bezierCurveTo(O-i,w-vt.wg*re,O-vt.wg*i,w-re,O,w-re),e.closePath(),r!==null&&e.ng(r),n!==null&&(p&&o&&oc(e),e.jk(),p&&o&&kc(e)),e.Se();else if(i.type===un.o)for(i=i.figures,w=i.length,re=0;reTe.sweepAngle,de!==null?de.endX:O.startX,de!==null?de.endY:O.startY)}else if(de=Ys(Te,O),Xe=de.length,Xe===0)e.lineTo(Te.centerX,Te.centerY);else for(var We=0;We(n.startX-n.endX)*(e.x-n.endX)+(n.startY-n.endY)*(e.y-n.endY)||0>r)?!1:(Nt.free(o),vt.Yb(n.startX,n.startY,n.endX,n.endY,i,e.x,e.y));if(n.type===un.u){t=n.startX;var a=n.startY,p=n.endX;if(n=n.endY,o.x=Math.min(t,p),o.y=Math.min(a,n),o.width=Math.abs(p-t),o.height=Math.abs(n-a),this.fill===null){if(o.Bc(-r,-r),o.ca(e))return Nt.free(o),!1;o.Bc(r,r)}return this.stroke!==null&&o.Bc(i,i),e=o.ca(e),Nt.free(o),e}if(n.type===un.F){a=n.startX,i=n.startY,p=n.endX;var w=n.endY;if(n=Math.min(a,p),t=Math.min(i,w),a=Math.abs(p-a)/2,i=Math.abs(w-i)/2,n=e.x-(n+a),t=e.y-(t+i),this.fill===null){if(a-=r,i-=r,0>=a||0>=i||1>=n*n/(a*a)+t*t/(i*i))return Nt.free(o),!1;a+=r,i+=r}return this.stroke!==null&&(a+=r,i+=r),Nt.free(o),0>=a||0>=i?!1:1>=n*n/(a*a)+t*t/(i*i)}if(n.type===un.o)return Nt.free(o),this.fill===null?Vl(n,e.x,e.y,i):Nl(n,e,i,1=this.strokeWidth)D=vt.Ve(O.startX,O.startY,O.endX,O.endY,o,a,p,w,i);else{if(O.startX===O.endX?(r=X,D=0):(t=(O.endY-O.startY)/(O.endX-O.startX),D=X/Math.sqrt(1+t*t),r=D*t),t=yr(),e=new Ue,vt.Ve(O.startX+r,O.startY+D,O.endX+r,O.endY+D,o,a,p,w,e)&&t.push(e),e=new Ue,vt.Ve(O.startX-r,O.startY-D,O.endX-r,O.endY-D,o,a,p,w,e)&&t.push(e),e=new Ue,vt.Ve(O.startX+r,O.startY+D,O.startX-r,O.startY-D,o,a,p,w,e)&&t.push(e),e=new Ue,vt.Ve(O.endX+r,O.endY+D,O.endX-r,O.endY-D,o,a,p,w,e)&&t.push(e),p=t.length,p===0)return Mr(t),!1;for(D=!0,w=1/0,r=0;rMath.abs(n)){if(w=a-D-n*(o-r),0>e*e*n*n+O*O-w*w){i.x=NaN,i.y=NaN,D=!1;break e}X=Math.sqrt(e*e*n*n+O*O-w*w),p=(-(e*e*n*w)+e*O*X)/(O*O+e*e*n*n)+r,e=(-(e*e*n*w)-e*O*X)/(O*O+e*e*n*n)+r,O=n*(p-r)+w+D,w=n*(e-r)+w+D,Math.abs((o-p)*(o-p))+Math.abs((a-O)*(a-O))p){i.x=NaN,i.y=NaN,D=!1;break e}w=Math.sqrt(p),p=D+w,w=D-w,Math.abs(p-a)Math.abs(Se)?(Te*=.5/Se,Se=.5):Te!==0&&.5>Math.abs(Te)&&(Se*=.5/Te,Te=.5),We-=Se,qe-=Te;de.contains(We,qe);)We-=Se,qe-=Te;for(i.x=p,i.y=w,Te=0;Ten?e-n:n-e)<(t>r?t-r:r-t)?(e=te||vt.$(w.y,e))&&(w.yt||vt.$(w.x,t))&&(w.x=e&&r<=t):(e=r&&n<=e)}ye.tx=function(e,t,n){function r(Xe,We){for(var qe=Xe.length,tt=0;tti)return!0;return!1}if(n&&this.fill!==null&&this.gh(e,!0))return!0;var i=e.Bf(t),o=i;if(1.5=i||Ir(t,o,0,-X)>=i||Ir(t,o,0,X)>=i||Ir(t,o,D,0)>=i)}else if(t.type===un.o){if(O=t.bounds,o=O.x,p=O.y,w=O.x+O.width,O=O.y+O.height,e.x>w&&e.xO&&e.yi&&rr(e.x,e.y,o,p,w,p)>i&&rr(e.x,e.y,w,O,o,O)>i&&rr(e.x,e.y,w,O,w,p)>i)return!1;if(o=Math.sqrt(i),n){if(this.fill===null?Vl(t,e.x,e.y,o):Nl(t,e,o,!0,!1))return!0}else{for(n=t.figures,t=0;ti)return!1;for(p=o.segments.s,w=p.length,O=0;Oi)return!1;break;case ds:var re=yr();if(vt.Qe(a,D,X.point1X,X.point1Y,X.point2X,X.point2Y,X.endX,X.endY,.8,re),a=r(re,e),Mr(re),a||(a=X.endX,D=X.endY,e.zd(a,D)>i))return!1;break;case na:if(re=yr(),vt.ep(a,D,X.point1X,X.point1Y,X.endX,X.endY,.8,re),a=r(re,e),Mr(re),a||(a=X.endX,D=X.endY,e.zd(a,D)>i))return!1;break;case Oo:case ca:re=X.type===Oo?Ys(X,o):Sa(X,o,a,D);var de=re.length;if(de===0){if(a=X.type===Oo?X.centerX:X.endX,D=X.type===Oo?X.centerY:X.endY,e.zd(a,D)>i)return!1;break}X=null;for(var Se=yr(),Te=0;Te= 0",vr,"strokeWidth:value")}},strokeCap:{get:function(){return this.Na!==null?this.Na.Hr:"butt"},set:function(e){var t=this.strokeCap;t!==e&&(typeof e!="string"||e!=="butt"&&e!=="round"&&e!=="square"?hr(e,'"butt", "round", or "square"',vr,"strokeCap"):(cf(this),this.Na.Hr=e,this.N(),this.g("strokeCap",t,e)))}},strokeJoin:{get:function(){return this.Na!==null?this.Na.Ir:"miter"},set:function(e){var t=this.strokeJoin;t!==e&&(typeof e!="string"||e!=="miter"&&e!=="bevel"&&e!=="round"?hr(e,'"miter", "bevel", or "round"',vr,"strokeJoin"):(cf(this),this.Na.Ir=e,this.N(),this.g("strokeJoin",t,e)))}},strokeMiterLimit:{get:function(){return this.Na!==null?this.Na.Jr:10},set:function(e){var t=this.strokeMiterLimit;if(t!==e&&1<=e){cf(this),this.Na.Jr=e,this.N();var n=this.part;n!==null&&(n.ag=NaN),this.g("strokeMiterLimit",t,e)}}},strokeDashArray:{get:function(){return this.Yg},set:function(e){var t=this.Yg;if(t!==e){if(e!==null){for(var n=e.length,r=0,i=0;ie?e=0:1e?e=0:1(X*X+D*D)*re*re&&(n=!0),t.ib!==e&&(n=!1),t.ib instanceof sl&&(n=!1),t.Gf("textGreeking")===!1&&(n=!1),t=this.spacingAbove,X=this.spacingBelow,this.flip){case Kr:e.translate(i,0),e.scale(-1,1);break;case Er:e.translate(0,o),e.scale(1,-1);break;case Ti:e.translate(i,o),e.scale(-1,-1)}if(e.yc(),D=this.Gc,re=(t+a+X)*D,o>re&&(r=this.verticalAlignment,r=r.y*o-r.y*re+r.offsetY),D===1&&this.ze!==null)X=this.Cb,X>i&&(X=i),this.Oj(this.ze,e,0,r+t,i,a,X,n,p,w,O);else if(this.Qc!==null&&this.Qb!==null)for(re=0;rei&&(de=i),r+=t,this.Oj(this.Qb[re],e,0,r,i,a,de,n,p,w,O),r+=a+X}switch(this.flip){case Kr:e.scale(-1,1),e.translate(-i,0);break;case Er:e.scale(1,-1),e.translate(0,-o);break;case Ti:e.scale(-1,-1),e.translate(-i,-o)}}},ye.Oj=function(e,t,n,r,i,o,a,p,w,O,D){var X=0;if(p)w==="left"?X=0:w==="right"?X=i-a:w==="center"&&(X=(i-a)/2),t.fillRect(n+X,r+.25*o,a,1);else{if(w==="left"?X=0:w==="right"?X=i:w==="center"&&(X=i/2),i=Kg!==null?Kg(this,o):.75*o,t.fillText(e,n+X,r+i),e=o/20|0,e===0&&(e=1),w==="right"?X-=a:w==="center"&&(X-=a/2),O){p=Yg!==null?Yg(this,o):.8*o,w=n+X,O=r+p,i=n+X+a,p=r+p;var re=e;t.beginPath(),t.lineWidth=re,t.moveTo(w,O),t.lineTo(i,p),t.stroke(),t.Se(),t instanceof sl&&t.ad.classList.add("gojs-td")}D&&(D=r+o-o/2.2|0,e%2!==0&&(D+=.5),r=n+X,o=D,n=n+X+a,a=D,X=e,t.beginPath(),t.lineWidth=X,t.moveTo(r,o),t.lineTo(n,a),t.stroke(),t.Se(),t instanceof sl&&t.ad.classList.add("gojs-td"))}},ye.kk=function(e,t,n){if(!gt.prototype.kk.call(this,e,t,n))return!1;if(Ho(this,e,this.xc,!0,!1,this.naturalBounds,this.actualBounds),n){if(this.svg.getElementsByTagName("text").length===0)return!0;for(t=this.svg.getElementsByClassName("gojs-td"),n=0;n=this.Qb.length))){for(this.l|=16777216,O=this.Qb[w],t=Math.max(1,e-t);gu(O)>t&&1e.maxLines&&(e.l|=16777216))}function jv(e,t,n,r){var i=e.formatting===Ap;i&&(t=t.trim());var o=0,a=e.Ae,p=e.spacingAbove+e.spacingBelow;p=Math.max(0,_p(e)+p);var w=e.overflow===$g?O0(a):0;if(e.Gc>=e.maxLines)r!==null&&r.h(0,p);else if(a=t,e.wrap===Uv){e.Le=1;var O=gu(t);if(w===0||O<=n)e.Cb=Math.max(e.Cb,O),Tp(e,t,e.Cb),r!==null&&r.h(O,p);else{for(o=wd(e,a),a=a.substr(o.length),t=wd(e,a),O=gu(o+t);0n&&1n;){var X=1;for(O=gu(t.substr(0,X)),D=0;O<=n;)X++,D=O,O=gu(t.substr(0,X));if(X===1){var re=O;o=Math.max(o,O)}else re=D,o=Math.max(o,D);if(X--,1>X&&(X=1),Tp(e,t.substr(0,X),re),w++,t=t.substr(X),e.Gc+w>e.maxLines)break}for(D=wd(e,a),O=gu(t+D);0e.maxLines))break}e.Le=Math.min(e.maxLines,w),e.Cb=Math.max(e.Cb,o),r!==null&&r.h(e.Cb,p*e.Le)}}function wd(e,t){if(e.wrap===D0)return t.substr(0,1);for(var n=t.length,r=0,i=P1;r=t.length?t:t.substr(0,r)}function gu(e){return ja===null?8*e.length:ja.measureText(e).width}function _p(e){if(e.df!==null)return e.df;var t=e.Ae;if(ja===null){var n=16;return e.df=n}return Gv[t]!==void 0&&5e3>F0?n=Gv[t]:(n=1.3*ja.measureText("M").width,Gv[t]=n,F0++),e.df=n}function O0(e){if(ja===null)return 6;if(Xg[e]!==void 0&&5e3>Wv)var t=Xg[e];else t=ja.measureText(kp).width,Xg[e]=t,Wv++;return t}function L0(e,t){var n=e.ec.replace(/\r\n/g,` `).replace(/\r/g,` `),r=e.spacingAbove+e.spacingBelow;if(r=Math.max(0,_p(e)+r),n.length===0)return e.Cb=0,e.Gc=1,r;if(!e.isMultiline){var i=n.indexOf(` `,0);0<=i&&(n=n.substr(0,i))}i=0;for(var o=e.Gc=0,a,p=!1;!p;){if(a=n.indexOf(` `,o),a===-1&&(a=n.length,p=!0),o<=a){if(o=n.substr(o,a-o),e.wrap!==Uv){e.Le=0;var w=Yt.alloc();jv(e,o,t,w),i+=w.height,Yt.free(w),e.Gc+=e.Le}else jv(e,o,t,null),i+=r,e.Gc++;e.Gc===e.maxLines&&(p=!0)}o=a+1}return e.Lq=i}kn.Object.defineProperties(Vi.prototype,{font:{get:function(){return this.Ae},set:function(e){var t=this.Ae;t!==e&&(this.Ae=e,this.df=null,this.v(),this.g("font",t,e))}},text:{get:function(){return this.ec},set:function(e){var t=this.ec;e!=null?e=e.toString():e="",t!==e&&(this.ec=e,this.v(),this.g("text",t,e),this.Uc=!0)}},textAlign:{get:function(){return this.da!==null?this.da.Or:"start"},set:function(e){var t=this.textAlign;t===e||e!=="start"&&e!=="end"&&e!=="left"&&e!=="right"&&e!=="center"||(Zu(this),this.da.Or=e,this.N(),this.g("textAlign",t,e))}},flip:{get:function(){return this.da!==null?this.da.Xf:Wt},set:function(e){var t=this.flip;t!==e&&(Zu(this),this.da.Xf=e,this.N(),this.g("flip",t,e))}},verticalAlignment:{get:function(){return this.da!==null?this.da.Yr:Bu},set:function(e){var t=this.verticalAlignment;t.D(e)||(e=e.J(),Zu(this),this.da.Yr=e,wa(this),this.g("verticalAlignment",t,e))}},naturalBounds:{get:function(){if(!this.dc.w()){var e=Yt.alloc();jv(this,this.ec,999999,e);var t=e.width;Yt.free(e),e=L0(this,t);var n=this.desiredSize;isNaN(n.width)||(t=n.width),isNaN(n.height)||(e=n.height),no(this.dc,t,e)}return this.dc}},isMultiline:{get:function(){return(this.l&2097152)!==0},set:function(e){var t=(this.l&2097152)!==0;t!==e&&(this.l^=2097152,this.v(),this.g("isMultiline",t,e))}},isUnderline:{get:function(){return(this.l&4194304)!==0},set:function(e){var t=(this.l&4194304)!==0;t!==e&&(this.l^=4194304,this.Uc=!0,this.N(),this.g("isUnderline",t,e))}},isStrikethrough:{get:function(){return(this.l&8388608)!==0},set:function(e){var t=(this.l&8388608)!==0;t!==e&&(this.l^=8388608,this.Uc=!0,this.N(),this.g("isStrikethrough",t,e))}},wrap:{get:function(){return this.da!==null?this.da.$r:Hv},set:function(e){var t=this.wrap;t!==e&&(Zu(this),this.da.$r=e,this.v(),this.g("wrap",t,e))}},overflow:{get:function(){return this.da!==null?this.da.$q:zv},set:function(e){var t=this.overflow;t!==e&&(Zu(this),this.da.$q=e,this.v(),this.g("overflow",t,e))}},isOverflowed:{get:function(){return(this.l&16777216)!==0}},stroke:{get:function(){return this.xc},set:function(e){var t=this.xc;t!==e&&(e!==null&&Ff(e,"TextBlock.stroke"),e instanceof yi&&e.freeze(),this.xc=e,this.N(),this.g("stroke",t,e))}},lineCount:{get:function(){return this.Gc}},lineHeight:{get:function(){return _p(this)}},editable:{get:function(){return(this.l&1048576)!==0},set:function(e){var t=(this.l&1048576)!==0;t!==e&&(this.l^=1048576,this.g("editable",t,e))}},textEditor:{get:function(){return this.da!==null?this.da.Qr:null},set:function(e){var t=this.textEditor;t!==e&&(Zu(this),this.da.Qr=e,this.g("textEditor",t,e))}},errorFunction:{get:function(){return this.da!==null?this.da.Hd:null},set:function(e){var t=this.errorFunction;t!==e&&(Zu(this),this.da.Hd=e,this.g("errorFunction",t,e))}},interval:{get:function(){return this.fa!==null?this.fa.Tk:1},set:function(e){var t=this.interval;if(e=Math.round(e),t!==e&&e!==0&&isFinite(e)){this.fa===null&&(this.fa=new lc),this.fa.Tk=e,this.v();var n=this.panel;n!==null&&(n.graduatedIntervals=null),this.g("interval",t,e)}}},graduatedStart:{get:function(){return this.fa!==null?this.fa.u:0},set:function(e){var t=this.graduatedStart;t!==e&&(0>e?e=0:1e?e=0:1=e&&hr(e,"> 0",Vi,"maxLines"),Zu(this),this.da.Jq=e,this.v(),this.g("maxLines",t,e))}},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(e){var t=this.Gm;t!==e&&(this.Gm=e,this.g("choices",t,e))}}});var Kg=null,Yg=null,Uv=new hn(Vi,"None",0),M0=new hn(Vi,"WrapFit",1),Hv=new hn(Vi,"WrapDesiredSize",2),D0=new hn(Vi,"WrapBreakAll",3),zv=new hn(Vi,"OverflowClip",0),$g=new hn(Vi,"OverflowEllipsis",1),Ap=new hn(Vi,"FormatTrim",0),P0=new hn(Vi,"FormatNone",0),P1=/[ \u200b\u00ad]/,Gv=new yo,F0=0,Xg=new yo,Wv=0,kp="...",B0="",ja=null,Zg=!1;Vi.className="TextBlock";function Vv(){this.nc=!1,this.Hd=null,this.Xf=Wt,this.gq=Ap,this.Jq=1/0,this.$q=zv,this.Er=this.Dr=0,this.Or="start",this.vj=this.Qr=this.Pr=null,this.Yr=Bu,this.$r=Hv}Vv.prototype.copy=function(){var e=new Vv;return e.Hd=this.Hd,e.Xf=this.Xf,e.gq=this.gq,e.Jq=this.Jq,e.$q=this.$q,e.Dr=this.Dr,e.Er=this.Er,e.Or=this.Or,e.Pr=this.Pr,e.Qr=this.Qr,e.vj=this.vj,e.Yr=this.Yr,e.$r=this.$r,e},Vi.getEllipsis=function(){return kp},Vi.setEllipsis=function(e){kp=e,Xg=new yo,Wv=0},Vi.getBaseline=function(){return Kg},Vi.setBaseline=function(e){Kg=e},Vi.getUnderline=function(){return Yg},Vi.setUnderline=function(e){Yg=e},Vi.isValidFont=function(e){if(Zg||(ja=Po?new Ql(null).context:null,Zg=!0),ja===null)return!0;var t=ja.font;if(e===t||e==="10px sans-serif")return!0;ja.font="10px sans-serif",ja.font=e;var n=ja.font;if(n!=="10px sans-serif")return ja.font=t,!0;ja.font="19px serif";var r=ja.font;return ja.font=e,n=ja.font,ja.font=t,n!==r},Vi.FormatNone=P0,Vi.FormatTrim=Ap,Vi.None=Uv,Vi.OverflowClip=zv,Vi.OverflowEllipsis=$g,Vi.WrapBreakAll=D0,Vi.WrapDesiredSize=Hv,Vi.WrapFit=M0;function lc(){this.Tk=1,this.u=0,this.j=1,this.o=this.F=null}lc.prototype.copy=function(){var e=new lc;return e.Tk=this.Tk,e.u=this.u,e.j=this.j,e.F=this.F,e.o=this.o,e},lc.className="GradElementSettings";function Ua(e,t){gt.call(this),this.Eg=null,this.qo="",this.Xg=ui,this.Nk=Xt,this.Zg=this.Hd=null,this.Mk=jr,this.Xf=Wt,this.vl=null,this.qn=!1,this.en=!0,this.al=!1,this.bt=this.rl=null,typeof e=="string"?this.source=e:e&&Object.assign(this,e),t&&Object.assign(this,t)}var Cd;Tn(Ua,gt),Ua.prototype.cloneProtected=function(e){gt.prototype.cloneProtected.call(this,e),e.qo=this.qo,e.element=this.Eg,e.Xg=this.Xg.J(),e.Nk=this.Nk,e.Xf=this.Xf,e.Hd=this.Hd,e.Zg=this.Zg,e.Mk=this.Mk.J(),e.en=this.en,e.rl=this.rl},Ua.prototype.qb=function(e){e===Wt||e===Dn||e===Hr?this.imageStretch=e:gt.prototype.qb.call(this,e)},Ua.prototype.toString=function(){return"Picture("+this.source+")#"+it(this)};function Td(e){e===void 0&&(e=""),e!==""?Cd[e]&&(delete Cd[e],Jg--):(Cd=new yo,Jg=0)}function j0(e,t){t.qy||(t.Fq=function(n){t.sq=!0,t.ln=!1;var r=t.Bg.copy();if(r!=null){for(r=r.iterator;r.next();){var i=r.value;i.N();var o=t.getAttribute("src")||"",a=i.Og.I(o);if(a!==null)for(var p=a.length,w=0;w=r.width&&(o=o+Se.offsetX+(X*Se.x-r.width*Se.x)),re>=r.height&&(a=a+Se.offsetY+(re*Se.y-r.height*Se.y)),w=Math.min(r.width,X),p=Math.min(r.height,re);break;case Xt:X=r.width,re=r.height;break;case Dn:case Hr:de===Dn?(de=Math.min(r.height/re,r.width/X),X*=de,re*=de):de===Hr&&(de=Math.max(r.height/re,r.width/X),X*=de,re*=de,X>=r.width&&(o=(o+Se.offsetX+(X*Se.x-r.width*Se.x)/X)*w),re>=r.height&&(a=(a+Se.offsetY+(re*Se.y-r.height*Se.y)/re)*p),w*=1/(X/r.width),p*=1/(re/r.height),X=r.width,re=r.height)}de=this.Df()*t.scale;var Te=X*de*re*de,Xe=w*p/Te,We=n.__goCache;de=null;var qe=F1;if(!i){if(n.sq&&We!==void 0&&4qe*qe)for(We.gi===null&&(H0(We,4,O,D,n),H0(We,16,O,D,n)),i=We.gi,O=i.length,D=0;De)&&(e=5),e=Math.min(e,t/3),e=Math.min(e,n/3);var r="rr"+t+","+n+","+e,i=vt.Mf[r];if(i!==void 0)return i;var o=e*vt.wg;return i=new un().add(new jo(e,0,!0).add(new zr(Ci,t-e,0)).add(new zr(ds,t,e,t-o,0,t,o)).add(new zr(Ci,t,n-e)).add(new zr(ds,t-e,n,t,n-o,t-o,n)).add(new zr(Ci,e,n)).add(new zr(ds,0,n-e,o,n,0,n-o)).add(new zr(Ci,0,e)).add(new zr(ds,e,0,0,o,o,0).close())),1i.x&&e.y>i.y&&e.righti.x&&t.y>i.y&&t.right=n.maxSelectionCount)){this.G^=4096;var r=!1;if(n!==null){r=n.skipsUndoManager,n.skipsUndoManager=!0;var i=n.selection;i.ka(),e?i.add(this):i.remove(this),i.freeze()}this.g("isSelected",t,e),this.Wb(),e=this.selectionChanged,e!==null&&e(this),n!==null&&(n.$b(),n.skipsUndoManager=r)}}}},isHighlighted:{get:function(){return(this.G&524288)!==0},set:function(e){var t=(this.G&524288)!==0;if(t!==e){this.G^=524288;var n=this.diagram;n!==null&&(n=n.highlighteds,n.ka(),e?n.add(this):n.remove(this),n.freeze()),this.g("isHighlighted",t,e),this.N(),e=this.highlightedChanged,e!==null&&e(this)}}},isShadowed:{get:function(){return(this.G&8192)!==0},set:function(e){var t=(this.G&8192)!==0;t!==e&&(this.G^=8192,this.Uc=!0,this.g("isShadowed",t,e),this.N())}},isAnimated:{get:function(){return(this.G&262144)!==0},set:function(e){var t=(this.G&262144)!==0;t!==e&&(this.G^=262144,this.g("isAnimated",t,e))}},highlightedChanged:{get:function(){return this.P!==null?this.P.oq:null},set:function(e){var t=this.highlightedChanged;t!==e&&(Ha(this),this.P.oq=e,this.g("highlightedChanged",t,e))}},selectionObjectName:{get:function(){return this.P!==null?this.P.vr:""},set:function(e){var t=this.selectionObjectName;t!==e&&(Ha(this),this.P.vr=e,this.Ug=null,this.g("selectionObjectName",t,e))}},selectionAdornmentTemplate:{get:function(){return this.P!==null?this.P.tr:null},set:function(e){var t=this.selectionAdornmentTemplate;t!==e&&(Ha(this),this.P.tr=e,this.g("selectionAdornmentTemplate",t,e))}},selectionObject:{get:function(){if(this.Ug===null){var e=this.selectionObjectName;e!==null&&e!==""?(e=this.fb(e),e!==null?this.Ug=e:this.Ug=this):this instanceof cn?(e=this.path,e!==null?this.Ug=e:this.Ug=this):this.Ug=this}return this.Ug}},selectionChanged:{get:function(){return this.P!==null?this.P.ur:null},set:function(e){var t=this.selectionChanged;t!==e&&(Ha(this),this.P.ur=e,this.g("selectionChanged",t,e))}},resizeAdornmentTemplate:{get:function(){return this.P!==null?this.P.fr:null},set:function(e){var t=this.resizeAdornmentTemplate;t!==e&&(Ha(this),this.P.fr=e,this.g("resizeAdornmentTemplate",t,e))}},resizeObjectName:{get:function(){return this.P!==null?this.P.hr:""},set:function(e){var t=this.resizeObjectName;t!==e&&(Ha(this),this.P.hr=e,this.g("resizeObjectName",t,e))}},resizeObject:{get:function(){var e=this.resizeObjectName;return e!==""&&(e=this.fb(e),e!==null)?e:this}},resizeCellSize:{get:function(){return this.P!==null?this.P.gr:To},set:function(e){var t=this.resizeCellSize;t.D(e)||(e=e.J(),Ha(this),this.P.gr=e,this.g("resizeCellSize",t,e))}},rotateAdornmentTemplate:{get:function(){return this.P!==null?this.P.ir:null},set:function(e){var t=this.rotateAdornmentTemplate;t!==e&&(Ha(this),this.P.ir=e,this.g("rotateAdornmentTemplate",t,e))}},rotateObjectName:{get:function(){return this.P!==null?this.P.jr:""},set:function(e){var t=this.rotateObjectName;t!==e&&(Ha(this),this.P.jr=e,this.g("rotateObjectName",t,e))}},rotateObject:{get:function(){var e=this.rotateObjectName;return e!==""&&(e=this.fb(e),e!==null)?e:this}},rotationSpot:{get:function(){return this.P!==null?this.P.lr:is},set:function(e){var t=this.rotationSpot;t.D(e)||(e=e.J(),Ha(this),this.P.lr=e,this.g("rotationSpot",t,e))}},text:{get:function(){return this.ec},set:function(e){var t=this.ec;t!==e&&(this.ec=e,this.g("text",t,e))}},containingGroup:{get:function(){return this.Ah},set:function(e){if(this.Zc()){var t=this.Ah;if(t!==e){e===null||this!==e&&!e.Td(this)||(this===e&&Lt("Cannot make a Group a member of itself: "+this.toString()),Lt("Cannot make a Group indirectly contain itself: "+this.toString()+" already contains "+e.toString())),this.C(2);var n=this.diagram;if(t!==null?ry(t,this):this instanceof lr&&n!==null&&n.ai.remove(this),this.Ah=e,e!==null?ny(e,this):this instanceof lr&&n!==null&&n.ai.add(this),this.C(1),n!==null&&n.aa){var r=this.data,i=n.model;if(r!==null&&i.Xj()){var o=i.wa(e!==null?e.data:null);i.mp(r,o)}}if(r=this.containingGroupChanged,r!==null&&(i=!0,n!==null&&(i=n.aa,n.aa=!0),r(this,t,e),n!==null&&(n.aa=i)),this instanceof lr){for(n=new ut,_h(n,this,!0,0,!0),n=n.iterator;n.next();)if(r=n.value,r instanceof En)for(r=r.linksConnected;r.next();)kd(r.value)}if(this instanceof En){for(n=this.linksConnected;n.next();)kd(n.value);n=this.labeledLink,n!==null&&kd(n)}this.g("containingGroup",t,e),e!==null&&(t=e.layer,t!==null&&Wu(t,-1,e))}}else Lt("cannot set the Part.containingGroup of a Link or Adornment")}},containingGroupChanged:{get:function(){return this.P!==null?this.P.Kp:null},set:function(e){var t=this.containingGroupChanged;t!==e&&(Ha(this),this.P.Kp=e,this.g("containingGroupChanged",t,e))}},isTopLevel:{get:function(){return!(this.containingGroup!==null||this instanceof En&&this.labeledLink!==null)}},layoutConditions:{get:function(){return this.P!==null?this.P.Cq:127},set:function(e){var t=this.layoutConditions;t!==e&&(Ha(this),this.P.Cq=e,this.g("layoutConditions",t,e))}},dragComputation:{get:function(){return this.P!==null?this.P.Up:null},set:function(e){var t=this.dragComputation;t!==e&&(Ha(this),this.P.Up=e,this.g("dragComputation",t,e))}},shadowOffset:{get:function(){return this.P!==null?this.P.zr:ti},set:function(e){var t=this.shadowOffset;t.D(e)||(e=e.J(),Ha(this),this.P.zr=e,this.N(),this.g("shadowOffset",t,e))}},shadowColor:{get:function(){return this.P!==null?this.P.yr:"gray"},set:function(e){var t=this.shadowColor;t!==e&&(Ha(this),this.P.yr=e,this.N(),this.g("shadowColor",t,e))}},shadowBlur:{get:function(){return this.P!==null?this.P.Vg:4},set:function(e){var t=this.shadowBlur;t!==e&&(Ha(this),this.P.Vg=e,this.N(),this.g("shadowBlur",t,e))}}}),zn.prototype.invalidateLayout=zn.prototype.C,zn.prototype.findCommonContainingGroup=zn.prototype.px,zn.prototype.isMemberOf=zn.prototype.Td,zn.prototype.findTopLevelPart=zn.prototype.sz,zn.prototype.findSubGraphLevel=zn.prototype.oz,zn.prototype.ensureBounds=zn.prototype.Va,zn.prototype.getDocumentBounds=zn.prototype.mi,zn.prototype.findObject=zn.prototype.fb,zn.prototype.moveTo=zn.prototype.moveTo,zn.prototype.invalidateAdornments=zn.prototype.Wb,zn.prototype.clearAdornments=zn.prototype.Ej,zn.prototype.removeAdornment=zn.prototype.Jf,zn.prototype.addAdornment=zn.prototype.bh,zn.prototype.findAdornment=zn.prototype.Pj,zn.prototype.updateTargetBindings=zn.prototype.La;var q0=!1;zn.className="Part",zn.LayoutNone=0,zn.LayoutAdded=1,zn.LayoutRemoved=2,zn.LayoutShown=4,zn.LayoutHidden=8,zn.LayoutNodeSized=16,zn.LayoutGroupLayout=32,zn.LayoutNodeReplaced=64,zn.LayoutStandard=127,zn.LayoutAll=16777215;function qr(e,t){e===void 0||e instanceof Ss||typeof e=="string"?zn.call(this,e):(zn.call(this),e&&(t=e)),this.G&=-257,this.Jg="Adornment",this.ue=null,this.Aw=0,this.Uw=!1,this.j=this.$a=null,t&&Object.assign(this,t)}Tn(qr,zn),qr.prototype.toString=function(){var e=this.adornedPart;return"Adornment("+this.category+")"+(e!==null?e.toString():"")},qr.prototype.updateRelationshipsFromData=function(){},qr.prototype.Ul=function(e){var t=this.adornedObject,n=t==null?void 0:t.part;if(n instanceof cn&&t instanceof vr){t=n.path,n.Ul(e),e=t.geometry,n=this.O.s,t=n.length;for(var r=0;re&&(e=1);var t=this.diagram;if(t!==null&&!t.Ue){t.Ue=!0;var n=new ut;n.add(this),ab(this,n,t.isTreePathToChildren,e,t,this,t.treeCollapsePolicy===Yc),t.Ue=!1}};function ab(e,t,n,r,i,o,a){if(1e&&(e=2);var t=this.diagram;if(t!==null&&!t.Ue){t.Ue=!0;var n=new ut;n.add(this),ub(this,n,t.isTreePathToChildren,e,t,this,t.treeCollapsePolicy===Yc),t.Ue=!1}};function ub(e,t,n,r,i,o,a){for(var p=o===e?!1:e.isTreeExpanded,w=n?e.Mo():e.Sd(),O={};w.next();){var D=w.value;if(D.isTreeLink&&(p||D.fd||D.bb(),D=D.To(e),D!==null&&D!==e&&!t.contains(D))){if(t.add(D),!p){D.Zb(!0),D.oh();var X=n?D.Oo():D.Po();O.vv=e,X.all(function(re){return function(de){return de===re.vv||!de.isTreeExpanded}}(O))&&i.Cj(D,o)}(2i&&(i=p.right),p.bottom>o&&(o=p.bottom)}}return isFinite(n)&&isFinite(r)?e.h(n,r,i-n,o-r):(t=t.location,e.h(t.x,t.y,0,0)),e},kn.Object.defineProperties(_a.prototype,{padding:{get:function(){return this.yb},set:function(e){typeof e=="number"&&(e=new Wn(e));var t=this.yb;t.D(e)||(this.yb=e=e.J(),this.g("padding",t,e),this.v())}}}),_a.className="Placeholder";function cn(e){zn.call(this,qt.Link),this.Qa=8,this.ef=null,this.ff="",this.uf=this.gn=null,this.vf="",this.uo=null,this.qk=Aa,this.Om=0,this.Qm=Aa,this.Rm=NaN,this.qj=ly,this.po=.5,this.wd=null,this.Nb=new tn().freeze(),this.Tg=this.Mg=null,this.ml=new Nt,this.ua=new un,this.u=this.o=this.Sf=this.Wf=null,this.su=new Ue,this.cq=this.Mw=this.Lw=null,this.vt=NaN,this.ba=null,this.j=[],e&&Object.assign(this,e)}Tn(cn,zn),cn.prototype.cloneProtected=function(e){zn.prototype.cloneProtected.call(this,e),e.Qa=this.Qa&-113,e.ff=this.ff,e.gn=this.gn,e.vf=this.vf,e.uo=this.uo,e.qk=this.qk,e.Om=this.Om,e.Qm=this.Qm,e.Rm=this.Rm,e.qj=this.qj,e.po=this.po,this.ba!==null&&(e.ba=this.ba.copy())},ye=cn.prototype,ye.Af=function(e){zn.prototype.Af.call(this,e),this.ff=e.ff,this.vf=e.vf,e.Mg=null,e.bb(),e.Sf=this.Sf;var t=e.fromPort;t!==null&&al(t),e=e.toPort,e!==null&&al(e)},ye.qb=function(e){e.classType===cn?(e.value&2)===2?this.routing=e:e===Cl||e===th||e===Rd?this.curve=e:e===Op||e===cm||e===hm?this.adjusting=e:e!==ly&&e!==Aa&&Lt("Unknown Link enum value for a Link property: "+e):zn.prototype.qb.call(this,e)},ye.Xc=function(){this.ba===null&&(this.ba=new yp)},ye.si=function(){var e=this.fromNode;if(e!==null){var t=e.findVisibleNode();if(t!==null&&(e=t),Ca(e)||Ch(e))return!1}return e=this.toNode,!(e!==null&&(t=e.findVisibleNode(),t!==null&&(e=t),Ca(e)||Ch(e)))},ye.zv=function(){return!1},ye.Av=function(){},ye.Zc=function(){return!1},cn.prototype.computeAngle=function(e,t,n){return cn.computeAngle(t,n)},cn.computeAngle=function(e,t){switch(e){default:case Aa:e=0;break;case Lp:e=t;break;case Mp:e=t+90;break;case Dp:e=t-90;break;case uy:e=t+180;break;case fm:e=vt.bp(t),90e&&(e-=180);break;case Pp:e=vt.bp(t+90),90e&&(e-=180);break;case Fp:e=vt.bp(t-90),90e&&(e-=180);break;case dm:if(e=vt.bp(t),45e||225e)return 0;90e&&(e-=180)}return vt.bp(e)};function kd(e){var t=e.fromNode,n=e.toNode,r=null;if(t!==null?r=n!==null?t.px(n):t.containingGroup:n!==null?r=n.containingGroup:r=null,t=r,n=e.Ah,n!==t){n!==null&&ry(n,e),e.Ah=t,t!==null&&ny(t,e);var i=e.containingGroupChanged;if(i!==null){var o=!0,a=e.diagram;a!==null&&(o=a.aa,a.aa=!0),i(e,n,t),a!==null&&(a.aa=o)}!e.fd||e.Lw!==n&&e.Mw!==n||e.bb()}if(e.isLabeledLink)for(e=e.labelNodes;e.next();)e.value.containingGroup=r}ye=cn.prototype,ye.oh=function(){var e=this.containingGroup;e!==null&&this.fromNode!==e&&this.toNode!==e&&e.computesBoundsIncludingLinks&&zn.prototype.oh.call(this)},ye.To=function(e){var t=this.fromNode;return e===t?this.toNode:t},ye.Cz=function(e){var t=this.fromPort;return e===t?this.toPort:t};function fb(e,t){e.wd===null&&(e.wd=new ut),e.wd.add(t),e.v()}ye.Vo=function(e){if(zn.prototype.Vo.call(this,e),df(this)&&this.Xo(this.actualBounds),!e){e=this.ef;var t=null;e!==null&&(t=this.fromPort,nm(e,this,t));var n=this.uf;if(n!==null){var r=this.toPort;n===e&&r===t||nm(n,this,r)}Rp(this)}},ye.Wo=function(e){if(zn.prototype.Wo.call(this,e),df(this)&&this.Xo(this.actualBounds),!e){e=this.ef;var t=null;e!==null&&(t=this.fromPort,rm(e,this,t));var n=this.uf;if(n!==null){var r=this.toPort;n===e&&r===t||rm(n,this,r)}Ip(this)}},ye.Lj=function(){if(this.fd=!0,this.wd!==null){var e=this.diagram;if(e!==null)for(var t=this.wd.copy().iterator;t.next();)e.remove(t.value)}this.data!==null&&(e=this.diagram,e!==null&&e.partManager.removeDataForLink(this))},cn.prototype.updateRelationshipsFromData=function(){if(this.data!==null){var e=this.diagram;e!==null&&e.partManager.updateRelationshipsFromData(this)}},cn.prototype.move=function(e,t){var n=t?this.location:this.position,r=n.x;isNaN(r)&&(r=0);var i=n.y;for(isNaN(i)&&(i=0),r=e.x-r,i=e.y-i,t===!0?zn.prototype.move.call(this,e,!1):(e=Ue.allocAt(n.x+r,n.y+i),zn.prototype.move.call(this,e,!1),Ue.free(e)),eh(this,r,i),e=this.labelNodes;e.next();)t=e.value,n=t.position,t.moveTo(n.x+r,n.y+i)},cn.prototype.canRelinkFrom=function(){if(!this.relinkableFrom)return!1;var e=this.layer;return e===null?!0:e.allowRelink?(e=e.diagram,!!(e===null||e.allowRelink)):!1},cn.prototype.canRelinkTo=function(){if(!this.relinkableTo)return!1;var e=this.layer;return e===null?!0:e.allowRelink?(e=e.diagram,!!(e===null||e.allowRelink)):!1},cn.prototype.computeMidPoint=function(e){var t=this.pointsCount;if(t===0)return e.assign(Jr),e;if(t===1)return e.assign(this.i(0)),e;if(t===2){var n=this.i(0),r=this.i(1);return e.h((n.x+r.x)/2,(n.y+r.y)/2),e}if(this.isOrthogonal&&(15<=this.computeCorner()||this.computeCurve()===Cl))return this.ua.Pu(.5,e),e.add(this.i(0)),n=this.ua.figures.first(),e.offset(-n.startX,-n.startY),e;if(this.computeCurve()===Cl){if(t===3){n=this.i(0),r=this.i(1);var i=this.i(2);return vt.ax(n.x,n.y,r.x,r.y,r.x,r.y,i.x,i.y,e),e}if(r=(t-1)/3|0,n=3*(r/2|0),r%2===1){r=this.i(n),i=this.i(n+1);var o=this.i(n+2);n=this.i(n+3),vt.ax(r.x,r.y,i.x,i.y,o.x,o.y,n.x,n.y,e)}else e.assign(this.i(n));return e}var a=this.flattenedLengths;for(n=this.flattenedTotalLength,i=o=r=0;rn/2));)r+=i,o++;return t=this.i(o),o=this.i(o+1),1>Math.abs(t.x-o.x)?t.y>o.y?e.h(t.x,t.y-(n/2-r)):e.h(t.x,t.y+(n/2-r)):1>Math.abs(t.y-o.y)?t.x>o.x?e.h(t.x-(n/2-r),t.y):e.h(t.x+(n/2-r),t.y):(n=(n/2-r)/i,e.h(t.x+n*(o.x-t.x),t.y+n*(o.y-t.y))),e},cn.prototype.computeMidAngle=function(){var e=this.pointsCount;if(2>e)return NaN;if(e===2)return this.i(0).ab(this.i(1));if(this.isOrthogonal&&(15<=this.computeCorner()||this.computeCurve()===Cl))return this.ua.wx(.5);if(this.computeCurve()===Cl&&4<=e){var t=(e-1)/3|0,n=3*(t/2|0);if(t%2===1){n=Math.floor(n),e=this.i(n),t=this.i(n+1);var r=this.i(n+2);return n=this.i(n+3),vt.My(e.x,e.y,t.x,t.y,r.x,r.y,n.x,n.y)}if(0r/2));)i+=o,n++;if(t=this.i(n),r=this.i(n+1),1>Math.abs(t.x-r.x)&&1>Math.abs(t.y-r.y)){if(0Math.abs(t.x-r.x))return t.y>r.y?270:90;if(1>Math.abs(t.y-r.y))return t.x>r.x?180:0}return t.ab(r)},ye=cn.prototype,ye.i=function(e){return this.Nb.s[e]},ye.dd=function(e,t){this.Nb.cd(e,t)},ye.L=function(e,t,n){this.Nb.cd(e,new Ue(t,n))},ye.Kz=function(e,t){this.Nb.Gb(e,t)},ye.m=function(e,t,n){this.Nb.Gb(e,new Ue(t,n))},ye.ne=function(e){this.Nb.add(e)},ye.yf=function(e,t){this.Nb.add(new Ue(e,t))},ye.pv=function(e){this.Nb.mb(e)},ye.Fj=function(){this.Nb.clear()};function eh(e,t,n){if(t!==0||n!==0)if(e.pointsCount===0)e.defaultFromPoint&&e.defaultFromPoint.offset(t,n),e.defaultToPoint&&e.defaultToPoint.offset(t,n);else{for(var r=e.fd,i=new tn,o=e.Nb.iterator;o.next();){var a=o.value;i.add(new Ue(a.x+t,a.y+n).freeze())}i.freeze(),o=e.Nb,e.Nb=i,a=e.diagram,isNaN(t)||isNaN(n)||a!==null&&a.animationManager.zb?e.v():(e.ke.h(e.ke.x+t,e.ke.y+n),e.pa.h(e.pa.x+t,e.pa.y+n),wa(e)),r?om(e):(e.defaultFromPoint&&(e.defaultFromPoint=e.i(0)),e.defaultToPoint&&(e.defaultToPoint=e.i(e.pointsCount-1))),a!==null&&a.animationManager.zb&&Xl(a.animationManager,e,i),e.g("points",o,i)}}ye.uh=function(){this.Mg===null&&(this.Mg=this.Nb,this.Nb=this.Nb.copy())},ye.zf=function(){if(this.Mg!==null){for(var e=this.Mg,t=this.Nb,n=1/0,r=1/0,i=e.s,o=i.length,a=0;aO&&(X=-X),Te=(0>w?-1:1)*X+de,Xe=D*(Te-de)+Se),de=o.x+2*p/3,Se=o.y+2*w/3;var We=de,qe=Se;vt.B(w,0)?qe=0w?-1:1)*X+de,qe=D*(We-de)+Se),this.Fj(),this.ne(o),this.yf(Te,Xe),this.yf(We,qe),this.ne(re),this.dd(0,this.getLinkPoint(e,t,a,!0,!1,r,i)),this.dd(3,this.getLinkPoint(r,i,n,!1,!1,e,t))}else o=r,re=i,r=this.getLinkPoint(e,t,a,!0,!1,o,re),i=this.getLinkPoint(o,re,n,!1,!1,e,t),this.hasCurviness()?(re=i.x-r.x,n=i.y-r.y,a=this.computeCurviness(),e=r.x+re/2,t=r.y+n/2,o=e,p=t,vt.B(n,0)?p=0a&&(o=-o),o=(0>n?-1:1)*o+e,p=re*(o-e)+t),this.ne(r),this.yf(o,p),this.ne(i)):(this.ne(r),this.ne(i),p=Nt.alloc(),t.mi(p),w=p.ca(i),re.mi(p),O=p.ca(r),(w||O)&&(a=t.ga(am(a),new Ue),this.dd(0,this.getLinkPointFromPoint(e,t,a,i,!0,a)),n=re.ga(am(n),new Ue),this.dd(1,this.getLinkPointFromPoint(o,re,n,r,!1,n))),Nt.free(p))}else{X=this.isAvoiding,re&&(D&&X||O)&&this.Fj();var tt=O?this.computeCurviness():0;X=this.getLinkPoint(e,t,a,!0,D,r,i),de=Te=Se=0,(D||!p||O)&&(Xe=this.computeEndSegmentLength(e,t,a,!0),de=this.getLinkDirection(e,t,X,a,!0,D,r,i),O&&(p||a.D(n)||!D&&a.x+n.x===1&&a.y+n.y===1)&&(de-=D?90:30,0>tt&&(de-=180)),0>de?de+=360:360<=de&&(de-=360),O&&(Xe+=Math.abs(tt)*(D?1:2)),de===0?Se=Xe:de===90?Te=Xe:de===180?Se=-Xe:de===270?Te=-Xe:(Se=Xe*Math.cos(de*Math.PI/180),Te=Xe*Math.sin(de*Math.PI/180)),a.Mc()&&O&&(Xe=t.ga(jr,Ue.alloc()),We=Ue.allocAt(Xe.x+1e3*Se,Xe.y+1e3*Te),this.getLinkPointFromPoint(e,t,Xe,We,!0,X),Ue.free(Xe),Ue.free(We))),Xe=this.getLinkPoint(r,i,n,!1,D,e,t);var rt=qe=We=0;if(D||!w||O){var ft=this.computeEndSegmentLength(r,i,n,!1);rt=this.getLinkDirection(r,i,Xe,n,!1,D,e,t),O&&(w||a.D(n)||!D&&a.x+n.x===1&&a.y+n.y===1)&&(rt+=D?0:30,0>tt&&(rt+=180)),0>rt?rt+=360:360<=rt&&(rt-=360),O&&(ft+=Math.abs(tt)*(D?1:2)),rt===0?We=ft:rt===90?qe=ft:rt===180?We=-ft:rt===270?qe=-ft:(We=ft*Math.cos(rt*Math.PI/180),qe=ft*Math.sin(rt*Math.PI/180)),n.Mc()&&O&&(n=i.ga(jr,Ue.alloc()),a=Ue.allocAt(n.x+1e3*We,n.y+1e3*qe),this.getLinkPointFromPoint(r,i,n,a,!1,Xe),Ue.free(n),Ue.free(a))}n=X,(D||!p||O)&&(n=new Ue(X.x+Se,X.y+Te)),a=Xe,(D||!w||O)&&(a=new Ue(Xe.x+We,Xe.y+qe)),!re&&!D&&p&&3Math.abs(t.y-e.y)?(t.x>=e.x?t.x=e.x+9e9:t.x=e.x-9e9,t.y=e.y):(t.y>=e.y?t.y=e.y+9e9:t.y=e.y-9e9,t.x=e.x),t}cn.prototype.getLinkPointFromPoint=function(e,t,n,r,i,o){if(o===void 0&&(o=new Ue),e===null||t===null)return o.assign(n),o;if(e.isVisible()||(i=e.findVisibleNode(),i!==null&&i!==e&&(t=i.port)),e=null,i=t.panel,i===null||i.se()||(i=i.panel),i===null){i=r.x,r=r.y;var a=n.x;n=n.y}else{e=i.oe,i=1/(e.m11*e.m22-e.m12*e.m21),a=e.m22*i;var p=-e.m12*i,w=-e.m21*i,O=e.m11*i,D=i*(e.m21*e.dy-e.m22*e.dx),X=i*(e.m12*e.dx-e.m11*e.dy);i=r.x*a+r.y*w+D,r=r.x*p+r.y*O+X,a=n.x*a+n.y*w+D,n=n.x*p+n.y*O+X}return t.Sj(i,r,a,n,o),e!==null&&o.transform(e),o};function sm(e,t){var n=t.Zn;return n===null&&(n=new zf,n.port=t,n.node=t.part,t.Zn=n),Sb(n,e)}cn.prototype.getLinkPoint=function(e,t,n,r,i,o,a,p){if(p===void 0&&(p=new Ue),n.sb()&&!Nd(n))return t.ga(n,p),p;if(n.$c()){var w=sm(this,t);if(w!==null){if(p.assign(w.Zo),i&&this.routing===pb){var O=sm(this,a);if(O!==null&&w.Gl=D.y&&e.y<=D.y+D.height?p.y=e.y:(n.Hf(Ma)||n.Hf(Bo))&&e.x>=D.x&&e.x<=D.x+D.width&&(p.x=e.x),Ue.free(w),Ue.free(O)}}return p}}return n=t.ga(am(n),Ue.alloc()),this.pointsCount>(i?6:2)?(a=r?this.i(1):this.i(this.pointsCount-2),i&&(a=iy(n,a.copy()))):(w=this.computeSpot(!r,a),o=Ue.alloc(),a=a.ga(am(w),o),i&&(a=iy(n,a)),Ue.free(o)),this.getLinkPointFromPoint(e,t,n,a,r,p),Ue.free(n),p},cn.prototype.getLinkDirection=function(e,t,n,r,i,o,a,p){e:if(r.sb())var w=r.x>r.y?r.x>1-r.y?0:r.x<1-r.y?270:315:r.x1-r.y?90:r.x<1-r.y?180:135:.5>r.x?225:.5(o?6:2)?(p=i?this.i(1):this.i(this.pointsCount-2),p=o?iy(w,p.copy()):n):(n=Ue.alloc(),p=p.ga(jr,n),Ue.free(n)),n=Math.abs(p.x-w.x)>Math.abs(p.y-w.y)?p.x>=w.x?0:180:p.y>=w.y?90:270,Ue.free(w),w=n}return r.Mc()&&a.Td(e)&&(w+=180,360<=w&&(w-=360)),Nd(r)||(e=t.li(),e===0)||(45<=e&&135>e?w+=90:135<=e&&225>e?w+=180:225<=e&&315>e&&(w+=270),360<=w&&(w-=360)),w},cn.prototype.computeEndSegmentLength=function(e,t,n,r){return t!==null&&n.$c()&&(e=sm(this,t),e!==null)?e.Ju:(e=r?this.fromEndSegmentLength:this.toEndSegmentLength,t!==null&&isNaN(e)&&(e=r?t.fromEndSegmentLength:t.toEndSegmentLength),isNaN(e)&&(e=10),e)},cn.prototype.computeSpot=function(e,t){return t===void 0&&(t=null),e?(e=t||this.fromPort,e===null?e=jr:(t=this.fromSpot,t.Xb()&&(t=e.fromSpot),e=t===is?So:t)):(e=t||this.toPort,e===null?e=jr:(t=this.toSpot,t.Xb()&&(t=e.toSpot),e=t===is?So:t)),e};function Nd(e){return e===So||e.x===.5&&e.y===.5}function am(e){return e.x===.5&&e.y===.5?e:jr}cn.prototype.computeOtherPoint=function(e,t){return this.computeAdjusting()!==Aa&&4re.width||X.y>re.height||0>X.x+X.width||0>X.y+X.height)){if(X=dr.alloc(),X.set(a),D instanceof qt)p=D.Cf(e,t,n,r,i,X);else if(this.path===D){if(D instanceof vr)if(p=e,re=r,D.pickable===!1)p=!1;else if(X.multiply(D.transform),re)e:{var de=p,Se=X;if(D.fh(de,Se))p=!0;else{if(Se===void 0&&(Se=D.transform,de.Re(D.actualBounds))){p=!0;break e}p=de.left,re=de.right;var Te=de.top;de=de.bottom;var Xe=Ue.alloc(),We=Ue.alloc(),qe=Ue.alloc(),tt=dr.alloc();tt.set(Se),tt.bv(D.transform),tt.Vj(),We.x=re,We.y=Te,We.transform(tt),Xe.x=p,Xe.y=Te,Xe.transform(tt),Se=!1,hf(D,Xe,We,qe)?Se=!0:(Xe.x=re,Xe.y=de,Xe.transform(tt),hf(D,Xe,We,qe)?Se=!0:(We.x=p,We.y=de,We.transform(tt),hf(D,Xe,We,qe)?Se=!0:(Xe.x=p,Xe.y=Te,Xe.transform(tt),hf(D,Xe,We,qe)&&(Se=!0)))),dr.free(tt),Ue.free(Xe),Ue.free(We),Ue.free(qe),p=Se}}else p=D.fh(p,X)}else p=Ts(D,e,r,X);p&&(re=D,t!==null&&(re=t(D)),re&&(n===null||n(re))&&i.add(re)),dr.free(X)}}}return o===void 0&&dr.free(a),p||this.background!==null||this.areaBackground!==null}return o===void 0&&dr.free(a),!1},cn.prototype.computeCurve=function(){if(this.Wf===null){var e=this.fromPort,t=this.isOrthogonal;this.Wf=e!==null&&e===this.toPort&&!t}return this.Wf?Cl:this.curve},cn.prototype.computeCorner=function(){if(this.curve===Cl)return 0;var e=this.corner;return(isNaN(e)||0>e)&&(e=10),e},cn.prototype.findMidLabel=function(){for(var e=this.path,t=this.O.s,n=t.length,r=0;rw?-Math.PI/2:Math.PI/2;else D=Math.atan(w/Math.abs(p)),0>p&&(D=Math.PI-D);a=t.x;var X=t.y;p=r.x-a;var re=r.y-X;for(w=Math.sqrt(p*p+re*re),vt.$(p,0)?re=0>re?-Math.PI/2:Math.PI/2:(re=Math.atan(re/Math.abs(p)),0>p&&(re=Math.PI-re)),O=w/O,D=re-D,this.dd(e,t),e+=1;ew?-Math.PI/2:Math.PI/2:(w=Math.atan(w/Math.abs(p)),0>p&&(w=Math.PI-w)),p=w+D,t*=O,this.L(e,a+t*Math.cos(p),X+t*Math.sin(p)));this.dd(n,r)}}return!0;case hm:if(o=this.i(e),X=this.i(n),!o.Xa(t)||!X.Xa(r)){i=o.x,o=o.y,a=X.x,X=X.y,O=(a-i)*(a-i)+(X-o)*(X-o),p=t.x,D=t.y,w=r.x,re=r.y;var de=1;if(w-p!==0){var Se=(re-D)/(w-p);de=Math.sqrt(1+1/(Se*Se))}else Se=9e9;for(this.dd(e,t),e+=1;et?t+=360:360<=t&&(t-=360),0>r?r+=360:360<=r&&(r-=360);var a=r;t=315<=t||45>t?0:45<=t&&135>t?90:135<=t&&225>t?180:270,r=315<=r||45>r?0:45<=r&&135>r?90:135<=r&&225>r?180:270;var p=i.actualBounds.copy(),w=o.actualBounds.copy();if(p.w()&&w.w()){p.Bc(Bp,Bp),w.Bc(Bp,Bp),p.Ye(e),w.Ye(n);var O=Ue.alloc(),D=Ue.alloc();t===0?n.x>e.x||r===270&&n.ye.x||r===90&&n.y>e.y&&w.right>e.x?(O.h(n.x,e.y),D.h(n.x,(e.y+n.y)/2),r===180?(O.x=this.computeMidOrthoPosition(e.x,e.y,n.x,n.y,!1),D.x=O.x,D.y=n.y):r===270&&n.ye.y?(O.x=e.xw.bottom)?this.computeMidOrthoPosition(e.x,e.y,n.x,n.y,!1):w.right,D.x=O.x,D.y=n.y):r===0&&e.xw.top&&e.yp.bottom)&&(r===180&&(w.ca(e)||p.ca(n))?O.y=this.computeMidOrthoPosition(e.x,e.y,n.x,n.y,!0):n.ye.y&&(r===180||r===270)&&(O.y=this.computeMidOrthoPosition(e.x,p.bottom,n.x,Math.min(n.y,w.top),!0)),D.x=n.x,D.y=O.y),O.y>p.top&&O.y=p.left&&n.x<=e.x||e.x<=w.right&&e.x>=n.x?(r===90||r===270)&&(O.h(Math.max((e.x+n.x)/2,e.x),e.y),D.h(O.x,n.y)):(O.y=r===270||(r===0||r===180)&&n.ye.y&&w.lefte.y?(O.x=e.x>w.right?this.computeMidOrthoPosition(e.x,e.y,w.right,n.y,!1):e.x>w.left&&(r===270&&e.yw.bottom)?this.computeMidOrthoPosition(e.x,e.y,n.x,n.y,!1):w.left,D.x=O.x,D.y=n.y):r===180&&e.x>w.right&&e.y>w.top&&e.yp.bottom)&&(r===0&&(w.ca(e)||p.ca(n))?O.y=this.computeMidOrthoPosition(e.x,e.y,n.x,n.y,!0):n.ye.y&&(r===0||r===270)&&(O.y=this.computeMidOrthoPosition(e.x,p.bottom,n.x,Math.min(n.y,w.top),!0)),D.x=n.x,D.y=O.y),O.y>p.top&&O.y=e.x||e.x>=w.left&&e.x<=n.x?(r===90||r===270)&&(O.h(Math.min((e.x+n.x)/2,e.x),e.y),D.h(O.x,n.y)):(O.y=r===270||(r===0||r===180)&&n.ye.y||r===180&&n.xe.y||r===0&&n.x>e.x&&w.bottom>e.y?(O.h(e.x,n.y),D.h((e.x+n.x)/2,n.y),r===270?(O.y=this.computeMidOrthoPosition(e.x,e.y,n.x,n.y,!0),D.x=n.x,D.y=O.y):r===180&&n.xe.x?(O.y=e.yw.right)?this.computeMidOrthoPosition(e.x,e.y,n.x,n.y,!0):w.bottom,D.x=n.x,D.y=O.y):r===90&&e.yw.left&&e.xp.right)&&(r===270&&(w.ca(e)||p.ca(n))?O.x=this.computeMidOrthoPosition(e.x,e.y,n.x,n.y,!1):n.xe.x&&(r===270||r===180)&&(O.x=this.computeMidOrthoPosition(p.right,e.y,Math.min(n.x,w.left),n.y,!1)),D.x=O.x,D.y=n.y),O.x>p.left&&O.x=p.top&&n.y<=e.y||e.y<=w.bottom&&e.y>=n.y?(r===0||r===180)&&(O.h(e.x,Math.max((e.y+n.y)/2,e.y)),D.h(n.x,O.y)):(O.x=r===180||(r===90||r===270)&&n.xe.x&&w.top=e.x?(O.y=e.y>w.bottom?this.computeMidOrthoPosition(e.x,e.y,n.x,w.bottom,!0):e.y>w.top&&(r===180&&e.xw.right)?this.computeMidOrthoPosition(e.x,e.y,n.x,n.y,!0):w.top,D.x=n.x,D.y=O.y):r===270&&e.y>w.bottom&&e.x>w.left&&e.xp.right)&&(r===90&&(w.ca(e)||p.ca(n))?O.x=this.computeMidOrthoPosition(e.x,e.y,n.x,n.y,!1):n.xe.x&&(r===90||r===180)&&(O.x=this.computeMidOrthoPosition(p.right,e.y,Math.min(n.x,w.left),n.y,!1)),D.x=O.x,D.y=n.y),O.x>p.left&&O.x=e.y||e.y>=w.top&&e.y<=n.y?(r===0||r===180)&&(O.h(e.x,Math.min((e.y+n.y)/2,e.y)),D.h(n.x,O.y)):(O.x=r===180||(r===90||r===270)&&n.x=Od&&(vb(de),p.Bc(de.Ho*de.Hx,de.Go*de.Ix),yb(de,e,t,X,r,p,!1),w=uc(de,X.x,X.y)),!de.abort&&wthis.pointsCount?(t===0||t===180?(p.x=e.x,p.y=X.y):(p.x=X.x,p.y=e.y),this.L(2,p.x,p.y),this.m(3,p.x,p.y)):(a=this.i(3),t===0||t===180?vt.B(p.x,a.x)?(p=t===0?Math.max(p.x,e.x):Math.min(p.x,e.x),this.L(2,p,e.y),this.L(3,p,a.y)):vt.B(p.y,a.y)?(Math.abs(e.y-p.y)<=de.Go/2&&(this.L(2,p.x,e.y),this.L(3,a.x,e.y)),this.m(2,p.x,e.y)):this.L(2,e.x,p.y):(t===90||t===270)&&(vt.B(p.y,a.y)?(p=t===90?Math.max(p.y,e.y):Math.min(p.y,e.y),this.L(2,e.x,p),this.L(3,a.x,p)):vt.B(p.x,a.x)?(Math.abs(e.x-p.x)<=de.Ho/2&&(this.L(2,e.x,p.y),this.L(3,e.x,a.y)),this.m(2,e.x,p.y)):this.L(2,p.x,e.y))),n!==null&&(e=this.i(1),a=this.i(2),e.x!==a.x&&e.y!==a.y?t===0||t===180?this.m(2,e.x,a.y):this.m(2,a.x,e.y):t===0||t===180?this.m(2,i.x,n.y):this.m(2,n.x,i.y)),Se!==null&&(r===0||r===180?this.yf(o.x,Se.y):this.yf(Se.x,o.y)),t=!0):t=!1}}}else t=!1;t||(this.ne(O.copy()),this.ne(D.copy())),Ue.free(O),Ue.free(D)}},cn.prototype.computeMidOrthoPosition=function(e,t,n,r,i){var o=0;return!this.hasCurviness()||this.computeSpot(!0,this.fromPort).$c()||this.computeSpot(!1,this.toPort).$c()||(o=this.computeCurviness()),i?(t+r)/2+o:(e+n)/2+o};function oy(e){if(e.diagram===null||!e.isAvoiding||!ud(e.diagram))return!1;var t=e.points.s,n=t.length;if(4>n)return!1;e=cd(e.diagram,!0,e.containingGroup,null);for(var r=1;rpf&&uc(t,D,X)!==O-1&&(uc(t,n-p,r)===O-1?(i=180,D=n-p,X=r):uc(t,n+p,r)===O-1?(i=0,D=n+p,X=r):uc(t,n,r-w)===O-1?(i=270,D=n,X=r-w):uc(t,n,r+w)===O-1&&(i=90,D=n,X=r+w));O>pf&&uc(t,D,X)===O-1;)n=D,r=X,i===0?D+=p:i===90?X+=w:i===180?D-=p:X-=w,--O;o?O>pf&&(i===180||i===0?n=Math.floor(n/p)*p+p/2:(i===90||i===270)&&(r=Math.floor(r/w)*w+w/2)):(n=Math.floor(n/p)*p+p/2,r=Math.floor(r/w)*w+w/2),O>pf&&(o=i,a=n,D=r,i===0?(o=90,D+=w):i===90?(o=180,a-=p):i===180?(o=270,D-=w):i===270&&(o=0,a+=p),uc(t,a,D)===O-1?sy(e,t,a,D,o,!1,o):(a=n,D=r,i===0?(o=270,D-=w):i===90?(o=0,a+=p):i===180?(o=90,D+=w):i===270&&(o=180,a-=p),uc(t,a,D)===O-1&&sy(e,t,a,D,o,!1,o))),e.yf(n,r)}cn.prototype.ez=function(e){var t=e.x;e=e.y;for(var n=this.i(0),r=this.i(1),i=rr(t,e,n.x,n.y,r.x,r.y),o=0,a=1;athis.pointsCount?this.lk=!0:this.ua=this.makeGeometry(),e=this.path,e!==null)){e.ua=this.ua;for(var t=this.O.s,n=t.length,r=0;r=t&&(r=t-1),w=this.i(r),o.x=Math.min(w.x,o.x),o.y=Math.min(w.y,o.y);r=o.x,w=o.y}else{for(w=0;wXe?Se>de?(o.x=We-tt,o.y=de-tt,i.x=We+Te,i.y=de+Te):(o.x=We-tt,o.y=de+tt,i.x=We+Te,i.y=de-Te):Se>de?(o.x=We+tt,o.y=de-tt,i.x=We-Te,i.y=de+Te):(o.x=We+tt,o.y=de+tt,i.x=We-Te,i.y=de-Te)),vt.$(Xe,We)&&vt.$(de,Se)&&(de>re?(qe>We?(o.x=We-tt,o.y=de-tt,i.x=We+Te):(o.x=We+tt,o.y=de-tt,i.x=We-Te),i.y=de+Te):(qe>We?(o.x=We-tt,o.y=de+tt,i.x=We+Te):(o.x=We+tt,o.y=de+tt,i.x=We-Te),i.y=de-Te)),(vt.$(Xe,We)&&vt.$(We,qe)||vt.$(re,de)&&vt.$(de,Se))&&(Xe=.5*(Xe+qe),re=.5*(re+Se),o.x=Xe,o.y=re,i.x=Xe,i.y=re),(X===1||X===2&&vt.$(a.x,this.i(0).x)&&vt.$(a.y,this.i(0).y))&&(n.x=.5*(a.x+O.x),n.y=.5*(a.y+O.y)),Jc(p,n.x-r,n.y-w,o.x-r,o.y-w,O.x-r,O.y-w),t.set(o),n.set(i),a=O}}O=a.x,a=a.y,D=this.i(this.pointsCount-1),this.computeShortLength(!1)!==0&&(D=Bf(this,D.copy(),!1,kr)),O=.5*(O+D.x),a=.5*(a+D.y),Jc(p,i.x-r,i.y-w,O-r,a-w,D.x-r,D.y-w),Ue.free(t),Ue.free(n),Ue.free(o),Ue.free(i)}else for(n=3;n=t&&(n=t-1),i=this.i(n-1),a=this.i(n),n===t-1&&this.computeShortLength(!1)!==0&&(a=Bf(this,a.copy(),!1,kr)),Jc(p,o.x-r,o.y-w,i.x-r,i.y-w,a.x-r,a.y-w);else{for(o=Ue.alloc(),o.assign(this.i(0)),i=Ue.alloc(),i.assign(o),a=this.computeCorner(),X=1,O=0;X=t-1){if(!o.D(D))this.computeShortLength(!1)!==0&&(D=Bf(this,D.copy(),!1,kr)),jf(this,p,-r,-w,o,D,n);else if(O===0)for(X=1;Xo.x?rt=re.x-Se:rt=re.x+Se,We.y>re.y?qe=re.y+tt:qe=re.y-tt,We=Ue.allocAt(rt,ft),jf(this,p,X,Xe,o,We,Te),Ue.free(We),Qg(p,re.x+X,re.y+Xe,de+X,qe+Xe),o.h(de,qe)}else vt.B(o.x,re.x)&&vt.B(re.y,We.y)?(Se=Math.min(a,Math.abs(re.y-i.y)/2),Se=tt=Math.min(Se,Math.abs(We.x-re.x)/2),vt.B(tt,0)?(jf(this,p,X,Xe,o,re,Te),o.assign(re)):(rt=re.x,ft=re.y,de=rt,qe=ft,re.y>o.y?ft=re.y-Se:ft=re.y+Se,We.x>re.x?de=re.x+tt:de=re.x-tt,We=Ue.allocAt(rt,ft),jf(this,p,X,Xe,o,We,Te),Ue.free(We),Qg(p,re.x+X,re.y+Xe,de+X,qe+Xe),o.h(de,qe))):(jf(this,p,X,Xe,o,re,Te),o.assign(re));i.assign(D),X=O}Ue.free(o)}qg=p}else p=this.i(1).copy(),p.x-=r,p.y-=w,this.computeShortLength(!0)!==0&&(i=Bf(this,i,!0,o)),this.computeShortLength(!1)!==0&&(p=Bf(this,p,!1,o)),e.type=un.j,e.startX=i.x,e.startY=i.y,e.endX=p.x,e.endY=p.y;return this.lk=!0,e};function lm(e,t,n,r){return e=n-e,isNaN(e)||e===1/0||e===-1/0?NaN:(0>e&&(e=-e),t=r-t,isNaN(t)||t===1/0||t===-1/0?NaN:(0>t&&(t=-t),vt.$(e,0)?t:vt.$(t,0)?e:Math.sqrt(e*e+t*t)))}function Bf(e,t,n,r){var i=e.pointsCount;if(2>i)return t;if(n){var o=e.i(1);if(n=o.x-r.x,o=o.y-r.y,r=lm(t.x,t.y,n,o),r===0)return t;i=i===2?.5*r:r,e=e.computeShortLength(!0),e>i&&(e=i),i=e*(o-t.y)/r,t.x+=e*(n-t.x)/r,t.y+=i}else{if(o=e.i(i-2),n=o.x-r.x,o=o.y-r.y,r=lm(t.x,t.y,n,o),r===0)return t;i=i===2?.5*r:r,e=e.computeShortLength(!1),e>i&&(e=i),i=e*(t.y-o)/r,t.x-=e*(t.x-n)/r,t.y-=i}return t}function ay(e,t,n,r){for(var i=e.pointsCount,o=t;vt.$(t.x,o.x)&&vt.$(t.y,o.y);){if(n>=i)return i-1;o=e.i(n++)}if(!vt.$(t.x,o.x)&&!vt.$(t.y,o.y))return n-1;for(var a=o;vt.$(t.x,o.x)&&vt.$(o.x,a.x)&&(!r||(t.y>=o.y?o.y>=a.y:o.y<=a.y))||vt.$(t.y,o.y)&&vt.$(o.y,a.y)&&(!r||(t.x>=o.x?o.x>=a.x:o.x<=a.x));){if(n>=i)return i-1;a=e.i(n++)}return n-2}cn.prototype.computeJumpLength=function(){return 10};function jf(e,t,n,r,i,o,a){if(!a&&df(e)){a=e.computeJumpLength();var p=a/2,w=[],O=0;if(e.isVisible()&&(O=z1(e,i,o,w)),0X-a);)O--,X=Math.max(D-p,o.x);D=o.y-a+r,X+=n,de=o.y+r,e.curve===th?Ad(t,X,de,!1):Jc(t,re,D,X,D,X,de)}else if(vt.B(i.x,o.x))if(i.yD-a);)O--,D=Math.max(X-p,o.y);X=o.x-a+n,de=o.x+n,D+=r,e.curve===th?Ad(t,de,D,!1):Jc(t,X,re,X,D,de,D)}}}t.lineTo(o.x+n,o.y+r)}function z1(e,t,n,r){var i=e.diagram;if(i===null||t.D(n))return 0;for(i=i.layers;i.next();){var o=i.value;if(o!==null&&o.visible){o=o.Pa.s;for(var a=o.length,p=0;pa.x&&D.x>=O.x||O.xa.y&&D.y>=O.y||O.ya&&Math.min(Se,Te)D&&!vt.B(Se,Te)){p.x=D,p.y=a,D=!0;break e}}else if(vt.B(X,de)&&vt.B(Se,Te)&&Math.min(D,re)Se&&Math.min(a,Xe)X&&!vt.B(a,Xe)){p.x=Se,p.y=X,D=!0;break e}p.x=0,p.y=0,D=!1}D&&(i?n.push(p.x):n.push(p.y)),a=O}Ue.free(p)}function df(e){return e=e.curve,e===Rd||e===th}function um(e,t){(t||df(e))&&(t=e.diagram,t===null||t.animationManager.isTicking||t.Eh.contains(e)||e.ml.width===0&&e.ml.height===0||t.Eh.add(e,e.ml.copy()))}cn.prototype.Xo=function(e){var t=this.layer;if(t!==null&&t.visible&&!t.isTemporary){var n=t.diagram;if(n!==null&&!n.animationManager.isTicking){var r=!1;for(n=n.layers;n.next();){var i=n.value;if(i.visible){if(i===t){r=!0;var o=!1;i=i.Pa.s;for(var a=i.length,p=0;pe&&hr(e,">= 0",cn,"fromEndSegmentLength"),this.Xc(),this.ba.Vi=e,this.g("fromEndSegmentLength",t,e),this.bb())}},fromShortLength:{get:function(){return this.ba!==null?this.ba.Wi:NaN},set:function(e){var t=this.fromShortLength;t!==e&&(this.Xc(),this.ba.Wi=e,this.qc(),this.g("fromShortLength",t,e))}},toSpot:{get:function(){return this.ba!==null?this.ba.yj:is},set:function(e){var t=this.toSpot;t.D(e)||(e=e.J(),this.Xc(),this.ba.yj=e,this.g("toSpot",t,e),(t.$c()||e.$c())&&this.toNode!==null&&al(this.toPort),this.bb())}},toEndSegmentLength:{get:function(){return this.ba!==null?this.ba.wj:NaN},set:function(e){var t=this.toEndSegmentLength;t!==e&&(0>e&&hr(e,">= 0",cn,"toEndSegmentLength"),this.Xc(),this.ba.wj=e,this.g("toEndSegmentLength",t,e),this.bb())}},toShortLength:{get:function(){return this.ba!==null?this.ba.xj:NaN},set:function(e){var t=this.toShortLength;t!==e&&(this.Xc(),this.ba.xj=e,this.qc(),this.g("toShortLength",t,e))}},isLabeledLink:{get:function(){return this.wd===null?!1:0=r&&(o=r-1);var p=this.i(o-1),w=this.i(o);vt.Dl(i.x,i.y,a.x,a.y,p.x,p.y,w.x,w.y,.5,e),t=Math.min(w.x,t),n=Math.min(w.y,n),i=w}else for(i=this.i(0),o=this.i(1),t=Math.min(i.x,o.x),n=Math.min(i.y,o.y),e.h(i.x,i.y,0,0),e.Ye(o),i=2;ir&&(r=-r)):vt.$(r.y,i.y)?(r=i.x-r.x,0>r&&(r=-r)):r=Math.sqrt(r.Bf(i)),e.push(r)}}return this.cq}},flattenedTotalLength:{get:function(){var e=this.vt;if(isNaN(e)){for(var t=this.flattenedLengths,n=t.length,r=e=0;rthis.pointsCount)return this.lk=!0,this.ua;this.ua=this.makeGeometry()}return this.ua}},firstPickIndex:{get:function(){return 2>=this.pointsCount?0:this.isOrthogonal||!Nd(this.computeSpot(!0))?1:0}},lastPickIndex:{get:function(){var e=this.pointsCount;return e===0?0:2>=e?e-1:this.isOrthogonal||!Nd(this.computeSpot(!1))?e-2:e-1}},adjusting:{get:function(){return this.qk},set:function(e){var t=this.qk;t!==e&&(this.qk=e,this.g("adjusting",t,e))}},corner:{get:function(){return this.Om},set:function(e){var t=this.Om;t!==e&&(this.Om=e,this.qc(),this.g("corner",t,e))}},curve:{get:function(){return this.Qm},set:function(e){var t=this.Qm;t!==e&&(this.Qm=e,this.bb(),this.qc(),um(this,t===th||t===Rd||e===th||e===Rd),this.g("curve",t,e))}},curviness:{get:function(){return this.Rm},set:function(e){var t=this.Rm;t!==e&&(this.Rm=e,this.bb(),this.qc(),this.g("curviness",t,e))}},routing:{get:function(){return this.qj},set:function(e){var t=this.qj;t!==e&&(this.qj=e,this.Wf=null,this.bb(),um(this,(t.value&2)===2||(e.value&2)===2),this.g("routing",t,e))}},smoothness:{get:function(){return this.po},set:function(e){var t=this.po;t!==e&&(this.po=e,this.qc(),this.g("smoothness",t,e))}},key:{get:function(){var e=this.diagram;if(e!==null&&e.model.ri())return e.model.Ac(this.data)}}}),cn.prototype.invalidateOtherJumpOvers=cn.prototype.Xo,cn.prototype.findClosestSegment=cn.prototype.ez,cn.prototype.updateRoute=cn.prototype.vg,cn.prototype.invalidateRoute=cn.prototype.bb,cn.prototype.rollbackRoute=cn.prototype.rv,cn.prototype.commitRoute=cn.prototype.zf,cn.prototype.startRoute=cn.prototype.uh,cn.prototype.clearPoints=cn.prototype.Fj,cn.prototype.removePoint=cn.prototype.pv,cn.prototype.addPointAt=cn.prototype.yf,cn.prototype.addPoint=cn.prototype.ne,cn.prototype.insertPointAt=cn.prototype.m,cn.prototype.insertPoint=cn.prototype.Kz,cn.prototype.setPointAt=cn.prototype.L,cn.prototype.setPoint=cn.prototype.dd,cn.prototype.getPoint=cn.prototype.i,cn.prototype.getOtherPort=cn.prototype.Cz,cn.prototype.getOtherNode=cn.prototype.To;var Uf=null,Hf=null,ly=new hn(cn,"Normal",1),W1=new hn(cn,"Orthogonal",2),V1=new hn(cn,"AvoidsNodes",6),pb=new hn(cn,"AvoidsNodesStraight",7),Aa=new hn(cn,"None",0),Cl=new hn(cn,"Bezier",9),th=new hn(cn,"JumpGap",10),Rd=new hn(cn,"JumpOver",11),Op=new hn(cn,"End",17),cm=new hn(cn,"Scale",18),hm=new hn(cn,"Stretch",19),Lp=new hn(cn,"OrientAlong",21),Mp=new hn(cn,"OrientPlus90",22),Dp=new hn(cn,"OrientMinus90",23),uy=new hn(cn,"OrientOpposite",24),fm=new hn(cn,"OrientUpright",25),Pp=new hn(cn,"OrientPlus90Upright",26),Fp=new hn(cn,"OrientMinus90Upright",27),dm=new hn(cn,"OrientUpright45",28),gb=16,mb=14,Bp=8;cn.className="Link",cn.Normal=ly,cn.Orthogonal=W1,cn.AvoidsNodes=V1,cn.AvoidsNodesStraight=pb,cn.None=Aa,cn.Bezier=Cl,cn.JumpGap=th,cn.JumpOver=Rd,cn.End=Op,cn.Scale=cm,cn.Stretch=hm,cn.OrientAlong=Lp,cn.OrientPlus90=Mp,cn.OrientMinus90=Dp,cn.OrientOpposite=uy,cn.OrientUpright=fm,cn.OrientPlus90Upright=Pp,cn.OrientMinus90Upright=Fp,cn.OrientUpright45=dm,cn.EndSegmentStep=8,cn.CurvinessStart=gb,cn.SpacingMin=mb,cn.OrthoShortCut=Bp;function pm(e,t,n,r){Ge(this),this.Fe=this.qq=!1,this.Ds=e,this.Ox=t,this.cv=n,this.Px=r,this.links=[]}pm.prototype.Sl=function(){if(!this.qq){var e=this.links;0=e.width||0>=e.height)){var t=e.y,n=e.x+e.width,r=e.y+e.height;if(this.Nd=Math.floor((e.x-this.rc)/this.rc)*this.rc,this.Od=Math.floor((t-this.sc)/this.sc)*this.sc,this.En=Math.ceil((n+2*this.rc)/this.rc)*this.rc,this.Fn=Math.ceil((r+2*this.sc)/this.sc)*this.sc,e=1+(Math.ceil((this.En-this.Nd)/this.rc)|0),t=1+(Math.ceil((this.Fn-this.Od)/this.sc)|0),this.ac===null||this.di=pf&&(n[r]=cy)}jp.prototype.Yj=function(e,t,n,r){if(e>this.En||e+nthis.Fn||t+re&&(n+=e,e=0),0>t&&(i+=t,t=0),0>n||0>i)return!0;for(r=Math.min(e+n-1,this.di)|0,n=Math.min(t+i-1,this.ei)|0;e<=r;e++){i=this.ac[e];for(var o=t;o<=n;o++)if(i[o]===nh)return!1}return!0};function cc(e,t,n,r,i,o,a,p,w){if(!(ta||nw)){var O=t|0,D=n|0,X=e.ac[O][D];if(X>=pf&&X=e.ac[O][D]);)e.ac[O][D]=X,X+=1,i?D+=r:O+=r;if(O=i?D:O,i)if(0O;n+=r)cc(e,t,n,1,!i,o,a,p,w),cc(e,t,n,-1,!i,o,a,p,w);else if(0O;t+=r)cc(e,t,n,1,!i,o,a,p,w),cc(e,t,n,-1,!i,o,a,p,w)}}function gm(e,t,n,r,i,o,a,p,w){t|=0,n|=0;var O=nh,D=pf;for(e.ac[t][n]=D;O===nh&&t>o&&tp&&no&&tp&&n=Math.abs(p-O)&&1>=Math.abs(w-D))e.abort=!0;else{var X=o.x;r=o.y,t=o.x+o.width;var re=o.y+o.height;X-=e.Nd,X/=e.rc,r-=e.Od,r/=e.sc,t-=e.Nd,t/=e.rc,re-=e.Od,re/=e.sc,o=Math.max(0,Math.min(e.di,X|0)),t=Math.min(e.di,Math.max(0,t|0)),X=Math.max(0,Math.min(e.ei,r|0)),re=Math.min(e.ei,Math.max(0,re|0)),r=e.ac,p|=0,w|=0,O|=0,D|=0;var de=n===0||n===90?1:-1;if(n=n===90||n===270,r[p][w]===nh?(gm(e,p,w,de,n,o,t,X,re),gm(e,p,w,1,!n,o,t,X,re),gm(e,p,w,-1,!n,o,t,X,re)):gm(e,p,w,de,n,p,w,p,w),r[O][D]===nh?(mm(e,O,D,i===0||i===90?1:-1,i===90||i===270,o,t,X,re),mm(e,O,D,1,!(i===90||i===270),o,t,X,re),mm(e,O,D,-1,!(i===90||i===270),o,t,X,re)):mm(e,O,D,de,n,O,D,O,D),n=yr(),a&&bb(e,O,D,i,p,w,n))for((n[0]!==O||n[1]!==D)&&(n.unshift(D),n.unshift(O)),(n[n.length-2]!==p||n[n.length-1]!==w)&&(n.push(p),n.push(w)),e=pf,i=n[n.length-2],a=n[n.length-1],r[i][a]=e++,o=n.length-4;0<=o;o-=2)for(i=n[o+2],a=n[o+3],t=n[o],O=n[o+1];t>i?i++:ta?a++:Oi)D--;else break;else if(X>o)X--;else break;var re=p[D][X];if(re===0||re===hy)break;w=D,O=X}for(;;){if(D=r,X=w,re=O,r===0?reo&&(D=270,re--):r===90?Xi&&(D=180,X--):r===180?reo&&(D=270,re--):Xi&&(D=180,X--),X=p[X][re],D!==r&&X!==0&&X!==hy){if(a.push(w),a.push(O),bb(e,w,O,D,i,o,a))return!0;a.pop(),a.pop()}if(p[w][O]=hy,r===0){if(w===t)return!1;w--}else if(r===90){if(O===n)return!1;O--}else if(r===180){if(w===t)return!1;w++}else{if(O===n)return!1;O++}}}kn.Object.defineProperties(jp.prototype,{bounds:{get:function(){return new Nt(this.Nd,this.Od,this.En-this.Nd,this.Fn-this.Od)}},Ho:{get:function(){return this.rc},set:function(e){0=n?180:0}switch(e=180*Math.atan2(e.height,e.width)/Math.PI,t){case 3:return n>e&&n<=180+e?180:270;case 5:return n>180-e&&n<=360-e?270:0;case 12:return n>e&&n<=180+e?90:0;case 10:return n>180-e&&n<=360-e?180:90;case 7:return 90180+e&&n<=360-e?270:0;case 13:return 180e&&180>=n?90:0;case 14:return n>e&&n<=180-e?90:n>180-e&&270>=n?180:0;case 11:return n>180-e&&n<=180+e?180:n>180+e?270:90}return r&&t!==15&&(n-=15,0>n&&(n+=360)),n>e&&n<180-e?90:n>=180-e&&n<=180+e?180:n>180+e&&n<360-e?270:0}zf.prototype.Sl=function(){this.pe.length=0};function Sb(e,t){var n=e.pe;if(n.length===0){e:if(!e.ap){n=e.ap,e.ap=!0;var r=null,i=e.node,o=i instanceof lr?i:null;if(o===null||o.isSubGraphExpanded)var a=i.isTreeExpanded?i.findLinksConnected(e.port.portId):i.qx();else{if(!o.actualBounds.w()){e.ap=n;break e}r=o,a=r.Lu()}o=e.pe.length=0;var p=e.port.ga(No,Ue.alloc()),w=e.port.ga(ks,Ue.alloc());for(i=Nt.allocAt(p.x,p.y,0,0),i.Ye(w),Ue.free(p),Ue.free(w),p=Ue.allocAt(i.x+i.width/2,i.y+i.height/2),w=e.port.li(),a=a.iterator;a.next();){var O=a.value;if(O.isVisible()&&O.fromPort!==O.toPort){var D=O.fromPort===e.port||O.fromNode!==null&&O.fromNode.Td(r),X=O.computeSpot(D,e.port);if(X.$c()&&(D=D?O.toPort:O.fromPort,D!==null)){var re=D.part;if(re!==null){var de=re.findVisibleNode();de!==null&&de!==re&&(re=de,D=re.port),D=O.computeOtherPoint(re,D),re=p.ab(D),re-=w,0>re?re+=360:360<=re&&(re-=360),X=K1(i,X,re,O.isOrthogonal),X===0?(X=4,180re&&(re+=360)),de=e.pe[o],de===void 0?(de=new fy(O,re,X),e.pe[o]=de):(de.link=O,de.angle=re,de.Nc=X),de.hv.set(D),o++}}}}for(Ue.free(p),e.pe.sort(zf.prototype.j),w=e.pe.length,r=-1,o=p=0;oMath.abs(Te)?(qe=Math.abs(Te)/re,re=Math.abs(Te)):qe=1;break;case 2:de>Math.abs(tt)?(qe=Math.abs(tt)/de,de=Math.abs(tt)):qe=1;break;case 1:X>Math.abs(Te)?(qe=Math.abs(Te)/X,X=Math.abs(Te)):qe=1;break;default:case 4:D>Math.abs(tt)?(qe=Math.abs(tt)/D,D=Math.abs(tt)):qe=1}We=0}var Tt=rt.Zo;if(r===ty){switch(rt=rt.link.computeThickness(),rt*=qe,Tt.set(ft),Se){case 8:Tt.x=ft.x+Te/2+re/2-We-rt/2;break;case 2:Tt.y=ft.y+tt/2+de/2-We-rt/2;break;case 1:Tt.x=ft.x+Te/2-X/2+We+rt/2;break;default:case 4:Tt.y=ft.y+tt/2-D/2+We+rt/2}We+=rt}else{var Sn=.5;r===im&&(Sn=(rt.Uo+1)/(rt.Gl+1)),Tt.x=ft.x+Te*Sn,Tt.y=ft.y+tt*Sn}}}for(Ue.free(p),Ue.free(w),Ue.free(a),Ue.free(O),ft=e.pe,o=0;ot.Nc?1:e.anglet.angle?1:0},zf.prototype.computeEndSegmentLength=function(e){var t=e.link,n=t.computeEndSegmentLength(this.node,this.port,So,t.fromPort===this.port),r=e.Uo;if(0>r)return n;var i=e.Gl;if(1>=i||!t.isOrthogonal)return n;t=e.hv;var o=e.Zo;return(e.Nc===2||e.Nc===8)&&(r=i-1-r),((e=e.Nc===2||e.Nc===4)?t.y=t-1?(o=0,r=n,i+=a+20,a=0):o++}},co.prototype.doMinimalNetworkLayout=function(){var e=Math.ceil(Math.sqrt(this.network.vertexes.count));this.arrangementOrigin=this.initialOrigin(this.arrangementOrigin);for(var t=this.arrangementOrigin.x,n=t,r=this.arrangementOrigin.y,i=0,o=0,a=this.network.vertexes.iterator;a.next();){var p=a.value.node;if(!(p===null||p instanceof cn)&&(Up(p),this.rh(p))){var w=p.measuredBounds,O=w.width;w=w.height,p.moveTo(n,r),p instanceof lr&&(p.rh=!1),n+=Math.max(O,50)+20,o=Math.max(o,Math.max(w,50)),i>=e-1?(i=0,n=t,r+=o+20,o=0):i++}}},co.prototype.rh=function(e){return!!(!e.location.w()||e instanceof lr&&e.rh)};function Ah(e,t,n,r,i,o,a,p){for(n=n.iterator;n.next();){var w=n.value;r&&!w.isTopLevel||i!==null&&!i(w)||!w.canLayout()||(o&&w instanceof En?w.isLinkLabel||(w instanceof lr&&w.layout===null?Ah(e,t,w.memberParts,!1,i,o,a,p):(Up(w),t.add(w))):a&&w instanceof cn?t.add(w):!p||!w.Zc()||w instanceof En||(Up(w),t.add(w)))}}function Up(e){var t=e.actualBounds;(t.width===0||t.height===0||isNaN(t.width)||isNaN(t.height))&&e.Va()}co.prototype.ni=function(e,t){var n=this.boundsComputation;return n!==null?(t||(t=new Nt),n(e,this,t)):t?(t.set(e.actualBounds),t):e.actualBounds},co.prototype.ex=function(e){var t=new ut;return e instanceof Ct?(Ah(this,t,e.nodes,!0,null,!0,!0,!0),Ah(this,t,e.links,!0,null,!0,!0,!0),Ah(this,t,e.parts,!0,null,!0,!0,!0)):e instanceof lr?Ah(this,t,e.memberParts,!1,null,!0,!0,!0):Ah(this,t,e.iterator,!1,null,!0,!0,!0),t},co.prototype.initialOrigin=function(e){var t=this.group;if(t!==null){var n=t.position.copy();return(isNaN(n.x)||isNaN(n.y))&&n.set(e),t=t.placeholder,t!==null&&(n=t.ga(No),(isNaN(n.x)||isNaN(n.y))&&n.set(e),e=t.padding,n.x+=e.left,n.y+=e.top),n}return e},kn.Object.defineProperties(co.prototype,{diagram:{get:function(){return this.H},set:function(e){this.H=e}},group:{get:function(){return this.o},set:function(e){this.o!==e&&(this.o=e,e!==null&&(this.H=e.diagram))}},isOngoing:{get:function(){return this.sn},set:function(e){this.sn!==e&&(this.sn=e)}},isInitial:{get:function(){return this.Gh},set:function(e){this.Gh=e,e||(this.xn=!0)}},isViewportSized:{get:function(){return this.yn},set:function(e){this.yn!==e&&(this.yn=e)&&this.C()}},isRouting:{get:function(){return this.vn},set:function(e){this.vn!==e&&(this.vn=e)}},isRealtime:{get:function(){return this.un},set:function(e){this.un!==e&&(this.un=e)}},isValidLayout:{get:function(){return this.xn},set:function(e){this.xn!==e&&(this.xn=e,e||(e=this.diagram,e!==null&&(e.xh=!0)))}},network:{get:function(){return this.j},set:function(e){this.j!==e&&(this.j=e,e!==null&&(e.layout=this))}},boundsComputation:{get:function(){return this.Em},set:function(e){this.Em!==e&&(this.Em=e,this.C())}},arrangementOrigin:{get:function(){return this.Am},set:function(e){this.Am.D(e)||(this.Am.assign(e),this.C())}}}),co.prototype.collectParts=co.prototype.ex,co.prototype.getLayoutBounds=co.prototype.ni,co.prototype.invalidateLayout=co.prototype.C,co.className="Layout";function Ki(e){Ge(this),this.Sc=e,this.wf=new ut,this.ye=new ut,this.Es=new nn,this.zs=new nn}Ki.prototype.clear=function(){if(this.wf)for(var e=this.wf.iterator;e.next();)e.value.clear();if(this.ye)for(e=this.ye.iterator;e.next();)e.value.clear();this.wf=new ut,this.ye=new ut,this.Es=new nn,this.zs=new nn},Ki.prototype.toString=function(e){e===void 0&&(e=0);var t="LayoutNetwork"+(this.layout!==null?"("+this.layout.toString()+")":"");if(0>=e)return t;if(t+=" vertexes: "+this.wf.count+" edges: "+this.ye.count,1t?1:0):1:t!==null?-1:0}kn.Object.defineProperties(xs.prototype,{sourceEdgesArrayAccess:{get:function(){return this.tg._dataArray}},destinationEdgesArrayAccess:{get:function(){return this.mg._dataArray}},data:{get:function(){return this.ub},set:function(e){if(this.ub=e,e!==null&&e.bounds){var t=e.bounds;e=t.x;var n=t.y,r=t.width;t=t.height,this.o.h(r/2,t/2),this.j.h(e,n,r,t)}}},node:{get:function(){return this.Sh},set:function(e){if(this.Sh!==e){this.Sh=e,e.Va();var t=this.network.layout,n=Nt.alloc(),r=t.ni(e,n);t=r.x;var i=r.y,o=r.width;if(r=r.height,isNaN(t)&&(t=0),isNaN(i)&&(i=0),this.j.h(t,i,o,r),Nt.free(n),!(e instanceof lr)&&(e=e.locationObject.ga(jr),e.w())){this.o.h(e.x-t,e.y-i);return}this.o.h(o/2,r/2)}}},bounds:{get:function(){return this.j},set:function(e){this.j.D(e)||this.j.assign(e)}},focus:{get:function(){return this.o},set:function(e){this.o.D(e)||this.o.assign(e)}},centerX:{get:function(){return this.j.x+this.o.x},set:function(e){var t=this.j;t.x+this.o.x!==e&&(t.ka(),t.x=e-this.o.x,t.freeze())}},centerY:{get:function(){return this.j.y+this.o.y},set:function(e){var t=this.j;t.y+this.o.y!==e&&(t.ka(),t.y=e-this.o.y,t.freeze())}},focusX:{get:function(){return this.o.x},set:function(e){var t=this.o;t.x!==e&&(t.ka(),t.x=e,t.freeze())}},focusY:{get:function(){return this.o.y},set:function(e){var t=this.o;t.y!==e&&(t.ka(),t.y=e,t.freeze())}},x:{get:function(){return this.j.x},set:function(e){var t=this.j;t.x!==e&&(t.ka(),t.x=e,t.freeze())}},y:{get:function(){return this.j.y},set:function(e){var t=this.j;t.y!==e&&(t.ka(),t.y=e,t.freeze())}},width:{get:function(){return this.j.width},set:function(e){var t=this.j;t.width!==e&&(t.ka(),t.width=e,t.freeze())}},height:{get:function(){return this.j.height},set:function(e){var t=this.j;t.height!==e&&(t.ka(),t.height=e,t.freeze())}},network:{get:function(){return this.ob},set:function(e){this.ob=e}},sourceVertexes:{get:function(){for(var e=new ut,t=this.sourceEdges;t.next();)e.add(t.value.fromVertex);return e.iterator}},destinationVertexes:{get:function(){for(var e=new ut,t=this.destinationEdges;t.next();)e.add(t.value.toVertex);return e.iterator}},vertexes:{get:function(){for(var e=new ut,t=this.sourceEdges;t.next();)e.add(t.value.fromVertex);for(t=this.destinationEdges;t.next();)e.add(t.value.toVertex);return e.iterator}},sourceEdges:{get:function(){return this.tg.iterator}},destinationEdges:{get:function(){return this.mg.iterator}},edges:{get:function(){for(var e=new tn,t=this.sourceEdges;t.next();)e.add(t.value);for(t=this.destinationEdges;t.next();)e.add(t.value);return e.iterator}},edgesCount:{get:function(){return this.tg.count+this.mg.count}}}),xs.prototype.deleteDestinationEdge=xs.prototype.Jl,xs.prototype.addDestinationEdge=xs.prototype.zl,xs.prototype.deleteSourceEdge=xs.prototype.Kl,xs.prototype.addSourceEdge=xs.prototype.Cl,xs.className="LayoutVertex",xs.standardComparer=my,xs.smartComparer=function(e,t){if(e!==null){if(t!==null){e=e.Sh;var n=t.Sh;if(e!==null){if(n!==null){for(t=e.text.toLocaleLowerCase().split(/([+-]?[.]?\d+(?:\.\d*)?(?:e[+-]?\d+)?)/),e=n.text.toLocaleLowerCase().split(/([+-]?[.]?\d+(?:\.\d*)?(?:e[+-]?\d+)?)/),n=0;n "+(this.qd?this.qd.toString():"null"))),t},ll.prototype.gm=function(){var e=this.kd;this.kd=this.qd,this.qd=e},ll.prototype.commit=function(){},ll.prototype.Ax=function(e){return this.qd===e?this.kd:this.kd===e?this.qd:null},kn.Object.defineProperties(ll.prototype,{network:{get:function(){return this.nb},set:function(e){this.nb=e}},data:{get:function(){return this.ub},set:function(e){this.ub!==e&&(this.ub=e)}},link:{get:function(){return this.$k},set:function(e){this.$k!==e&&(this.$k=e)}},fromVertex:{get:function(){return this.kd},set:function(e){this.kd!==e&&(this.kd=e)}},toVertex:{get:function(){return this.qd},set:function(e){this.qd!==e&&(this.qd=e)}}}),ll.prototype.getOtherVertex=ll.prototype.Ax,ll.className="LayoutEdge";function Hs(e){co.call(this),this.isViewportSized=!0,this.yo=this.zo=NaN,this.yg=new Yt(NaN,NaN).freeze(),this.tf=new Yt(10,10).freeze(),this.Jb=Hp,this.Rb=ym,this.nd=zp,this.hd=Eb,e&&Object.assign(this,e)}Tn(Hs,co),Hs.prototype.cloneProtected=function(e){co.prototype.cloneProtected.call(this,e),e.zo=this.zo,e.yo=this.yo,e.yg.assign(this.yg),e.tf.assign(this.tf),e.Jb=this.Jb,e.Rb=this.Rb,e.nd=this.nd,e.hd=this.hd},Hs.prototype.qb=function(e){e.classType===Hs?e===zp||e===Sm||e===vy||e===bm?this.sorting=e:e===ym||e===Au?this.arrangement=e:e===Hp||e===vm?this.alignment=e:Lt("Unknown enum value: "+e):co.prototype.qb.call(this,e)},Hs.prototype.doLayout=function(e){this.arrangementOrigin=this.initialOrigin(this.arrangementOrigin);var t=this.ex(e);e=this.diagram;for(var n=t.copy().iterator;n.next();){var r=n.value;if(!r.ph()||r.fromNode===null&&r.toNode===null){if(r.Va(),r instanceof lr)for(r=r.memberParts;r.next();)t.remove(r.value)}else t.remove(r)}var i=t.Fa();if(i.length!==0){switch(this.sorting){case bm:i.reverse();break;case zp:i.sort(this.comparer);break;case Sm:i.sort(this.comparer),i.reverse()}var o=this.wrappingColumn;isNaN(o)&&(o=0);var a=this.wrappingWidth;switch(isNaN(a)&&e!==null?(t=e.padding,a=Math.max(e.viewportBounds.width-t.left-t.right,0)):a=Math.max(this.wrappingWidth,0),0>=o&&0>=a&&(o=1),t=this.spacing.width,isFinite(t)||(t=0),n=this.spacing.height,isFinite(n)||(n=0),e!==null&&e.Ea("Layout"),r=[],this.alignment){case vm:var p=t,w=n,O=Nt.alloc(),D=Math.max(this.cellSize.width,1);if(!isFinite(D))for(var X=D=0;Xo-1||0a)&&(r.push(new Nt(0,Te,a+p,We)),Xe=0,Se=de,Te+=We,We=0),We=Math.max(We,Tt),re){case Au:rt=-rt.width;break;default:rt=0}switch(tt.moveTo(Se+rt,Te),re){case Au:Se-=ft;break;default:Se+=ft}Xe++}r.push(new Nt(0,Te,a+p,We)),Nt.free(O);break;case Hp:for(w=a,D=o,X=t,re=n,a=Nt.alloc(),de=Math.max(this.cellSize.width,1),o=Te=O=0,p=Ue.alloc(),Se=0;Se=O&&(w-=O),O=tt=0,ft=Math.max(this.cellSize.height,1),rt=o=0,Tt=!0,Xe=Ue.alloc(),Sn=0;SnD-1||0w){for(r.push(new Nt(0,Tt?qe-o:qe,w+X,rt+o+re)),Rn=0;RnO&&(o.width+=o.x-O,o.x=O);Nt.free(a)}for(p=o=a=i=0;pt?1:0}kn.Object.defineProperties(Hs.prototype,{wrappingWidth:{get:function(){return this.zo},set:function(e){this.zo!==e&&(0X)){var Te=X+wp(Se);Se.pc(Te,!0),Ov(Se,Te,X)}}t.isModified=!0}}finally{t.aa=!0}}}}},Si.prototype.updateAllTargetBindings=function(e){e===void 0&&(e="");for(var t=this.parts.iterator;t.next();)t.value.La(e);for(t=this.nodes.iterator;t.next();)t.value.La(e);for(t=this.links.iterator;t.next();)t.value.La(e)},Si.prototype.rp=function(){for(var e=this.H.model,t=new ut,n=e.nodeDataArray,r=0;r=r)return"[]";var i=new cs;i.add("["),n&&1r)return;ki(e.Tc,r)}vs(e,"nodeDataArray",Lo,"nodeDataArray",e,t,null,r,null),e.qp(t)}ye.nA=function(e){if(or(e))for(var t=e.length,n=0;nt&&(t=e.length),Co(e,t,n),vs(this,"",xo,"",e,null,n,null,t)},ye.ov=function(e,t){t===void 0&&(t=-1),e===this.Tc&&Lt("Model.removeArrayItem should not be called on the Model.nodeDataArray"),t===-1&&(t=e.length-1);var n=e[t];ki(e,t),vs(this,"",Lo,"",e,n,null,t,null)},ye.Ro=function(e){if(e===null)return"";var t=this.lj;if(t===""||(t=$o(e,t),t===void 0))return"";if(typeof t=="string")return t;Lt("getCategoryForNodeData found a non-string category for "+e+": "+t)},ye.jm=function(e,t){if(e!==null){var n=this.lj;if(n!=="")if(this.lb(e)){var r=$o(e,n);r===void 0&&(r=""),r!==t&&(oo(e,n,t),vs(this,"nodeCategory",Fi,n,e,r,t))}else oo(e,n,t)}},ye.lm=function(e,t){this.jm(t,this.Ro(e))},ye.Tl=function(){return!1},ye.Wj=function(){return!1},ye.ri=function(){return!1},ye.xs=function(){return!1},ye.Xj=function(){return!1};function Ey(){return new Pn}function Wp(e,t){if(typeof t=="function"){if(t.className)return t.className;if(t.name)return t.name}else if(typeof t=="object"&&t!==null&&t.constructor)return Wp(e,t.constructor);return typeof t}function wy(e){return mu[e]?mu[e]:vn.go!==void 0&&vn.go[e]?vn.go[e]:null}function $o(e,t){if(!e||!t)return null;try{if(typeof t=="function")var n=t(e);else typeof e.getAttribute=="function"?(n=e.getAttribute(t),n===null&&(n=void 0)):n=e[t]}catch(r){}return n}function oo(e,t,n){if(e&&t)try{typeof t=="function"?t(e,n):typeof e.setAttribute=="function"?e.setAttribute(t,n):e[t]=n}catch(r){}}kn.Object.defineProperties(Pn.prototype,{name:{get:function(){return this.xa},set:function(e){var t=this.xa;t!==e&&(this.xa=e,this.g("name",t,e))}},dataFormat:{get:function(){return this.Sm},set:function(e){var t=this.Sm;t!==e&&(this.Sm=e,this.g("dataFormat",t,e))}},isReadOnly:{get:function(){return this.Gg},set:function(e){var t=this.Gg;t!==e&&(this.Gg=e,this.g("isReadOnly",t,e))}},modelData:{get:function(){return this.j},set:function(e){var t=this.j;t!==e&&(this.j=e,this.g("modelData",t,e),this.La(e))}},undoManager:{get:function(){return this.o},set:function(e){var t=this.o;t!==e&&(t!==null&&t.Rx(this),this.o=e,e!==null&&e.Xw(this))}},skipsUndoManager:{get:function(){return this.Wg},set:function(e){this.Wg=e}},nodeKeyProperty:{get:function(){return this.Th},set:function(e){var t=this.Th;t!==e&&(e===""&&Lt("Model.nodeKeyProperty may not be the empty string"),0"+Tl(this,i,!1)}return t},ye.Qv=function(e,t){this.linkKeyProperty===""&&Lt("GraphLinksModel.linkKeyProperty must not be an empty string for .toIncrementalData() to succeed.");var n=Pn.prototype.Qv.call(this,e,t),r=this,i=new ut,o=new ut,a=new ut,p=this.vh;e.changes.each(function(D){D.model===r&&(D.modelChange==="linkDataArray"?D.change===xo?i.add(D.newValue):D.change===Lo&&a.add(D.oldValue):r.Jc(D.object)?o.add(D.object):D.object!==null&&(D.object!==null&&p&&p.contains(D.object)?p.get(D.object).each(function(X){r.Jc(X)&&o.add(X)}):D.object instanceof Pn||r.lb(D.object)||Hb(r,D.object).each(function(X){o.add(X)})))});var w=this.il;w.clear(),i.each(function(D){w.add(r.Ac(D)),t||o.add(D)});var O=this.kl;return O.clear(),a.each(function(D){O.add(r.Ac(D)),t&&o.add(D)}),e=r.cloneDeep(o.Fa()),0r.indexOf(e.newValue)&&r.splice(n,0,e.newValue));return}}else if(e.change===Lo){if(n=e.oldParam,e.modelChange==="linkDataArray"){e=e.oldValue,bn(e)&&typeof n=="number"&&(r=this.Ac(e),t?(this.$f.add(e),this.md[n]!==e&&this.md.splice(n,0,e),r!==void 0&&this.wb.add(r,e)):(this.$f.remove(e),this.md[n]===e&&this.md.splice(n,1),r!==void 0&&this.wb.remove(r)));return}if(e.modelChange==="linkLabelKeys"){r=this.Ef(e.object),Array.isArray(r)&&typeof n=="number"&&(t?0>r.indexOf(e.newValue)&&r.splice(n,0,e.newValue):(n=r.indexOf(e.newValue),0<=n&&r.splice(n,1)));return}}Pn.prototype.changeState.call(this,e,t)}},ye=Gr.prototype,ye.Vl=function(e){if(e!==void 0){var t=this.Ri;if(t!==null){var n=this.hc(e);n===null&&(n=this.copyNodeData(t),oo(n,this.nodeKeyProperty,e),this.xf(n))}return e}},ye.yx=function(e){return Tl(this,e,!0)},ye.wv=function(e,t){Md(this,e,t,!0)},ye.Bx=function(e){return Tl(this,e,!1)},ye.Bv=function(e,t){Md(this,e,t,!1)};function Tl(e,t,n){if(t!==null&&(e=n?e.lf:e.mf,e!==""&&(e=$o(t,e),e!==void 0))){if(Nh(e))return e;Lt((n?"FromKey":"ToKey")+" value for link data "+t+" is not a number or a string: "+e)}}function Md(e,t,n,r){if(n===null&&(n=void 0),t!==null){var i=r?e.lf:e.mf;if(i!=="")if(n=e.Vl(n),e.Jc(t)){var o=$o(t,i);o!==n&&(Nu(e,o,t),oo(t,i,n),e.hc(n)===null&&ku(e,n,t),vs(e,r?"linkFromKey":"linkToKey",Fi,i,t,o,n),typeof i=="string"&&e.La(t,i))}else oo(t,i,n)}}ye.zx=function(e){return Tm(this,e,!0)},ye.xv=function(e,t){Dd(this,e,t,!0)},ye.Cx=function(e){return Tm(this,e,!1)},ye.Cv=function(e,t){Dd(this,e,t,!1)};function Tm(e,t,n){return t===null||(e=n?e.ej:e.fj,e==="")?"":(t=$o(t,e),t===void 0?"":t)}function Dd(e,t,n,r){if(t!==null){var i=r?e.ej:e.fj;if(i!=="")if(e.Jc(t)){var o=$o(t,i);o===void 0&&(o=""),o!==n&&(oo(t,i,n),vs(e,r?"linkFromPortId":"linkToPortId",Fi,i,t,o,n),typeof i=="string"&&e.La(t,i))}else oo(t,i,n)}}ye.Ef=function(e){if(e===null)return _m;var t=this.je;return t===""?_m:(e=$o(e,t),e===void 0?_m:e)},ye.Ls=function(e,t){if(e!==null){var n=this.je;if(n!=="")if(this.Jc(e)){var r=$o(e,n);if(r===void 0&&(r=_m),r!==t){if(Array.isArray(r))for(var i=r.length,o=0;oi||(r.splice(i,1),this.Jc(e)&&(Nu(this,t,e),vs(this,"linkLabelKeys",Lo,n,e,t,null,i,null)))}else r!==void 0&&Lt(n+" property is not an Array; cannot removeLabelKeyforLinkData: "+e)}}},ye.Ac=function(e){if(e!==null){var t=this.Jh;if(t!==""&&(t=$o(e,t),t!==void 0)){if(Nh(t))return t;Lt("Key value for link data "+e+" is not a number or a string: "+t)}}},ye.Ks=function(e,t){if(e!==null){var n=this.Jh;if(n!=="")if(this.Jc(e)){var r=$o(e,n);r!==t&&this.jh(t)===null&&(oo(e,n,t),r!==void 0&&this.wb.remove(r),this.wb.add(t,e),vs(this,"linkKey",Fi,n,e,r,t),typeof n=="string"&&this.La(e,n))}else oo(e,n,t)}},ye.jh=function(e){return e===null&&Lt("GraphLinksModel.findLinkDataForKey:key must not be null"),e!==void 0&&Nh(e)?this.wb.I(e):null},ye.Bs=function(e){if(e!==null){var t=this.Jh;if(t!==""){var n=this.Ac(e);if(n===void 0||this.wb.contains(n)){var r=this.cl;if(r!==null&&(n=r(this,e),n!=null&&!this.wb.contains(n))){oo(e,t,n);return}if(typeof n=="string"){for(r=2;this.wb.contains(n+r);)r++;oo(e,t,n+r)}else if(n===void 0||typeof n=="number"){for(n=-this.wb.count-1;this.wb.contains(n);)n--;oo(e,t,n)}}}}},ye.Jc=function(e){return e===null?!1:this.$f.contains(e)},ye.fi=function(e){e!==null&&(an(e),this.Jc(e)||zb(this,e,!0))};function zb(e,t,n){if(e.linkKeyProperty!==""){var r=e.Ac(t);if(r!==void 0&&e.wb.I(r)===t)return;e.Bs(t),r=e.Ac(t),r===void 0&&Lt("GraphLinksModel.makeLinkDataKeyUnique failed on "+t+". Data not added to model."),e.wb.add(r,t)}e.$f.add(t),r=null,n&&(r=e.md.length,e.md.splice(r,0,t)),vs(e,"linkDataArray",xo,"linkDataArray",e,null,t,null,r),Cy(e,t)}ye.Ey=function(e){if(Array.isArray(e))for(var t=e.length,n=0;nr)return;e.md.splice(r,1)}if(vs(e,"linkDataArray",Lo,"linkDataArray",e,t,null,r,null),n=Tl(e,t,!0),Nu(e,n,t),n=Tl(e,t,!1),Nu(e,n,t),r=e.Ef(t),Array.isArray(r))for(var i=r.length,o=0;o=e.count)e.count===1&&(e=e.first(),e.centerX=0,e.centerY=0);else{var t=new tn;t.addAll(e.iterator),e=new tn;var n=new tn,r=this.sort(t),i,o,a=this.Jp,p=this.arrangement,w=this.nodeDiameterFormula,O=this.radius;(!isFinite(O)||0>=O)&&(O=NaN);var D=this.aspectRatio;(!isFinite(D)||0>=D)&&(D=1);var X=this.startAngle;isFinite(X)||(X=0);var re=this.sweepAngle;if((!isFinite(re)||360re)&&(re=360),t=this.spacing,isFinite(t)||(t=NaN),p===yu&&w===Gf?p=vu:p===yu&&w!==Gf&&(p=this.arrangement),(this.direction===gf||this.direction===Pd)&&this.sorting!==Fd){for(w=0;!(w>=r.length)&&(e.add(r.M(w)),!(w+1>=r.length));w+=2)n.add(r.M(w+1));this.direction===gf?(this.arrangement===yu&&e.reverse(),r=new tn,r.addAll(e),r.addAll(n)):(this.arrangement===yu&&n.reverse(),r=new tn,r.addAll(n),r.addAll(e))}w=r.length;for(var de=o=i=0;dere&&(de===0||de===r.length-1)&&(Te/=2),i+=Te,o++}if(isNaN(O)||p===yu){if(isNaN(t)&&(t=6),p!==vu&&p!==yu){for(o=-1/0,a=0;aO?(O=i,o=O*D):a=de/(360<=re?w:w-1)}if(this.kw=p,this.lc=O,this.Zm=D,this.lw=X,this.Wp=re,this.Ti=t,this.me=o,this.Jp=a,t=r,r=this.kw,p=this.lc,O=this.lw,D=this.Wp,X=this.Ti,re=this.me,w=this.Jp,this.direction!==gf&&this.direction!==Pd||r!==yu)if(this.direction===gf||this.direction===Pd){switch(a=0,r){case Rh:a=180*km(this,p,re,O,w)/Math.PI;break;case vu:w=t=0,a=e.first(),a!==null&&(t=Oh(a,Math.PI/2)),a=n.first(),a!==null&&(w=Oh(a,Math.PI/2)),a=180*km(this,p,re,O,X+(t+w)/2)/Math.PI;break;case rh:a=D/t.length}if(this.direction===gf){switch(r){case Rh:$p(this,e,O,Ih);break;case vu:Yp(this,e,O,Ih);break;case rh:Kp(this,e,D/2,O,Ih)}switch(r){case Rh:$p(this,n,O+a,Ia);break;case vu:Yp(this,n,O+a,Ia);break;case rh:Kp(this,n,D/2,O+a,Ia)}}else{switch(r){case Rh:$p(this,n,O,Ih);break;case vu:Yp(this,n,O,Ih);break;case rh:Kp(this,n,D/2,O,Ih)}switch(r){case Rh:$p(this,e,O+a,Ia);break;case vu:Yp(this,e,O+a,Ia);break;case rh:Kp(this,e,D/2,O+a,Ia)}}}else switch(r){case Rh:$p(this,t,O,this.direction);break;case vu:Yp(this,t,O,this.direction);break;case rh:Kp(this,t,D,O,this.direction);break;case yu:Vb(this,t,D,O,this.direction)}else Vb(this,t,D,O-D/2,Ia)}this.updateParts(),this.network=null,this.isValidLayout=!0};function Kp(e,t,n,r,i){var o=e.Wp,a=e.lc;e=e.me,r=r*Math.PI/180,n=n*Math.PI/180;for(var p=t.length,w=0;wn){for(o=r+(i===Ia?o:-o);0>o;)o+=360;o%=360,180=D.length-1));X++)$b(e,w,O,D,X,i,o)||Xb(e,w,O,D,X,i,o),w=o.x,O=o.y;if(Ue.free(o),e.mj++,!(23Math.abs(de)?Math.abs(w-o)<(D[0].width+D[D.length-1].width)/2&&(a=0):a=0Math.abs(re)?0:re,w=Math.abs(o)>Math.abs(X)?0X:0e.mj?e.lc-a/(2*Math.PI):5>D.length&&10=X.length-1));re++)$b(e,w,O,X,re,i,D)||Xb(e,w,O,X,re,i,D),w=D.x,O=D.y;if(Ue.free(D),e.mj++,!(23e.mj?e.lc-o/(2*Math.PI):e.lc-(0p){if(o=t-e,o<-p)return a.x=o,a.y=O,!1;D=!0}}else if(o=t-e,o<-p){if(o=t+e,o>p)return a.x=o,a.y=O,!1;D=!0}return O=Math.sqrt(1-Math.min(1,o*o/(p*p)))*w,0>n!==D&&(O=-O),Math.abs(n-O)>(r[i].height+r[i+1].height)/2?(a.x=o,a.y=O,!1):(a.x=o,a.y=O,!0)}function Xb(e,t,n,r,i,o,a){var p=e.lc,w=e.me,O=0;if(e=(r[i].height+r[i+1].height)/2+e.Ti,r=!1,0<=t!=(o===Ia)){if(o=n-e,o<-w){if(o=n+e,o>w){a.x=O,a.y=o;return}r=!0}}else if(o=n+e,o>w){if(o=n-e,o<-w){a.x=O,a.y=o;return}r=!0}O=Math.sqrt(1-Math.min(1,o*o/(w*w)))*p,0>t!==r&&(O=-O),a.x=O,a.y=o}wo.prototype.commitLayout=function(){this.commitNodes(),this.isRouting&&this.commitLinks()},wo.prototype.commitNodes=function(){var e=this.group!==null&&this.group.placeholder!==null&&this.group.isSubGraphExpanded,t=e?this.group.location.copy():null,n=this.actualCenter;e?n=new Ue(0,0):(n.x=this.arrangementOrigin.x+this.lc,n.y=this.arrangementOrigin.y+this.me);for(var r=this.network.vertexes.iterator;r.next();){var i=r.value;i.x+=n.x,i.y+=n.y,i.commit()}e&&(this.group.Va(),e=this.group.position.copy(),n=this.group.location.copy(),t=t.re(n.re(e)),this.group.move(t),this.Zv=t.re(e))},wo.prototype.commitLinks=function(){for(var e=this.network.edges.iterator;e.next();)e.value.commit()};function Ty(e,t,n,r,i){var o=e.ty;if(.001>Math.abs(e.Zm-1))return r!==void 0&&i!==void 0?i*t:2*Math.PI*t;e=t>n?Math.sqrt(t*t-n*n)/t:Math.sqrt(n*n-t*t)/n;for(var a=0,p=r!==void 0&&i!==void 0?i/(o+1):Math.PI/(2*(o+1)),w=0,O=0;O<=o;O++){r!==void 0&&i!==void 0?w=r+O*i/o:w=O*Math.PI/(2*o);var D=Math.sin(w);a+=Math.sqrt(1-e*e*D*D)*p}return r!==void 0&&i!==void 0?(t>n?t:n)*a:4*(t>n?t:n)*a}function Am(e,t,n,r,i){return t/(r!==void 0&&i!==void 0?Ty(e,1,n,r,i):Ty(e,1,n))}function km(e,t,n,r,i){if(.001>Math.abs(e.Zm-1))return i/t;var o=t>n?Math.sqrt(t*t-n*n)/t:Math.sqrt(n*n-t*t)/n,a=0;e=2*Math.PI/(700*e.network.vertexes.count),t>n&&(r+=Math.PI/2);for(var p=0;;p++){var w=Math.sin(r+p*e);if(a+=(t>n?t:n)*Math.sqrt(1-o*o*w*w)*e,a>=i)return p*e}}wo.prototype.sort=function(e){switch(this.sorting){case Nm:break;case Rm:e.reverse();break;case Im:e.sort(this.comparer);break;case Om:e.sort(this.comparer),e.reverse();break;case Fd:return this.ak(Z1(e));default:Lt("Invalid sorting type.")}return e};function Z1(e){for(var t=[],n=0;ni&&(i=p,o=a)}else for(a=0;ai&&(i=p,o=a);for(n.add(e.M(o)),t[o]=-1,o=e.M(o),a=o.sourceEdges;a.next();)i=e.indexOf(a.value.fromVertex),0>i||0<=t[i]&&t[i]++;for(o=o.destinationEdges;o.next();)i=e.indexOf(o.value.toVertex),0>i||0<=t[i]&&t[i]++}return n}wo.prototype.ak=function(e){for(var t=[],n=0;nt[n].indexOf(i)&&t[n].push(i);for(r=r.sourceEdges;r.next();)i=e.indexOf(r.value.fromVertex),i!==n&&0>t[n].indexOf(i)&&t[n].push(i)}for(o=[],n=0;nt[n[Se]].indexOf(n[Se===n.length-1?0:Se+1])&&de.push(Se===n.length-1?0:Se+1);if(de.length===0)for(Se=0;Sen.indexOf(Tt)||ftn.indexOf(Tt)||ft=Te?ft+1:ft)),We+=ft=Te&&ft++,tt>=Te&&tt++,ft>tt&&(rt=tt,tt=ft,ft=rt),tt-ft<(n.length+2)/2==(ftde||de===D||(Se=de>D?de-D:D-de,X+=dea-Se?1:-1);n.splice(0>X?D:D+1,0,w),r.splice(p,1),p--}else o=!1;if(o)break;n.push(r[0]),r.splice(0,1)}for(t=0;t=e?this.ul=e:this.ul=360,this.C())}},arrangement:{get:function(){return this.Rb},set:function(e){this.Rb===e||e!==yu&&e!==vu&&e!==Rh&&e!==rh||(this.Rb=e,this.C())}},direction:{get:function(){return this.K},set:function(e){this.K===e||e!==Ia&&e!==Ih&&e!==gf&&e!==Pd||(this.K=e,this.C())}},sorting:{get:function(){return this.nd},set:function(e){this.nd===e||e!==Nm&&e!==Rm&&e!==Im&&!Om&&e!==Fd||(this.nd=e,this.C())}},comparer:{get:function(){return this.hd},set:function(e){this.hd!==e&&(this.hd=e,this.C())}},spacing:{get:function(){return this.tf},set:function(e){this.tf!==e&&(this.tf=e,this.C())}},nodeDiameterFormula:{get:function(){return this.Nn},set:function(e){this.Nn===e||e!==Lm&&e!==Gf||(this.Nn=e,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 vu=new hn(wo,"ConstantSpacing",0),Rh=new hn(wo,"ConstantDistance",1),rh=new hn(wo,"ConstantAngle",2),yu=new hn(wo,"Packed",3),Ia=new hn(wo,"Clockwise",4),Ih=new hn(wo,"Counterclockwise",5),gf=new hn(wo,"BidirectionalLeft",6),Pd=new hn(wo,"BidirectionalRight",7),Nm=new hn(wo,"Forwards",8),Rm=new hn(wo,"Reverse",9),Im=new hn(wo,"Ascending",10),Om=new hn(wo,"Descending",11),Fd=new hn(wo,"Optimized",12),Lm=new hn(wo,"Pythagorean",13),Gf=new hn(wo,"Circular",14);wo.className="CircularLayout",wo.ConstantSpacing=vu,wo.ConstantDistance=Rh,wo.ConstantAngle=rh,wo.Packed=yu,wo.Clockwise=Ia,wo.Counterclockwise=Ih,wo.BidirectionalLeft=gf,wo.BidirectionalRight=Pd,wo.Forwards=Nm,wo.Reverse=Rm,wo.Ascending=Im,wo.Descending=Om,wo.Optimized=Fd,wo.Pythagorean=Lm,wo.Circular=Gf;function Xp(){this.Pl=-1/0,this.tm=this.mk=null}Xp.prototype.compare=function(e,t){if(0this.Pl||Math.abs(e)e&&0p?(i=re.x+re.width/2,o=re.y+re.height/2,O[0]=new Ue(re.x+re.width+r.width,re.y),O[1]=new Ue(re.x,re.y+re.height+r.height),p=2):(w=Jb(O,p,i,o,re.width,re.height,r),X=O[w],de=new Ue(X.x+re.width+r.width,X.y),re=new Ue(X.x,X.y+re.height+r.height),w+1this.network.vertexes.count)return!1;for(var e=0,t=0,n=this.network.vertexes.first().bounds,r=this.network.vertexes.iterator;r.next();){if(r.value.bounds.Yc(n)&&(e++,2e.network.vertexes.count)return!1;for(e.ah=e.network.vertexes.Fa(),e=e.ah,e.sort(function(n,r){return n===null||r===null||n===r?0:r.Vd-n.Vd}),t=e.length-1;0<=t&&1>=e[t].Vd;)t--;return 1=a))){for(var O=p=0,D=w.count-a;Dde&&(de=1),p=vt.sqrt((p+de+O*O*4/(a*a))/de),a=(p-1)*D/2,p=(p-1)*X/2,i.bounds=new Nt(o-re.x-a,w-re.y-p,D+2*a,X+2*p),i.focus=new Ue(re.x+a,re.y+p)}}return e.network=r,n}function q1(e,t){for(var n=e.network.vertexes.iterator;n.next();){var r=n.value;if(r.network=t,r.We!==null){var i=r.We.M(r.sv);r.Vd=i.Rs;var o=i.Sv,a=i.Tv;r.bounds=new Nt(r.centerX-o,r.centerY-a,i.Ss,i.Qs),r.focus=new Ue(o,a),r.sv--}}for(n=e.network.edges.iterator;n.next();)n.value.network=t;e.network=t}function eS(e,t){var n=t.Hj;if(n!==null&&n.count!==0){var r=t.centerX,i=t.centerY,o=t.width,a=t.height;t.We!==null&&0=X.Vd?w++:(p=!0,O++,a+=Math.atan2(t.centerY-X.centerY,t.centerX-X.centerX))}if(w!==0){for(0>1)+O)*(p%2===0?1:-1),w.centerX=r+D*Math.cos(X),w.centerY=i+D*Math.sin(X),p++}}}}function Jb(e,t,n,r,i,o,a){var p=9e19,w=-1,O=0;e:for(;OD.y&&e[re].x-D.xD.x&&e[re].y-D.yt+o?(n=r+i-a,e=e-t-o,vt.sqrt(n*n+e*e)):e+na+p?e>t+o?(n=r-a-p,e=e-t-o,vt.sqrt(n*n+e*e)):e+nt+o?e-(t+o):e+n=t.length)return!1;var n=t[0];n.forceX=0,n.forceY=0;for(var r=n.centerX,i=r,o=n=n.centerY,a=1;ao-n)?t.sort(function(Te,Xe){return Te===null||Xe===null||Te===Xe?0:Te.centerX-Xe.centerX}):t.sort(function(Te,Xe){return Te===null||Xe===null||Te===Xe?0:Te.centerY-Xe.centerY}),n=e.Zf;var O=r=p=0;for(o=0;on||O-w>n){if(i)break}else if(D-de>n||de-D>n){if(!i)break}else{var Se=Qb(a,re);1>Se?(r=e.randomNumberGenerator,r===null&&(e.randomNumberGenerator=r=new Dm),Se=r.random(),p=r.random(),w>O?(r=Math.abs(re.bounds.right-a.bounds.x),r=(1+r)*Se):wde?(O=Math.abs(re.bounds.bottom-a.bounds.y),O=(1+O)*p):wX?(X=e.randomNumberGenerator,X===null&&(e.randomNumberGenerator=X=new Dm),p=X.random(),X=X.random(),r=(r>w?1:-1)*(1+(o.width>n.width?o.width:n.width))*p,O=(a>D?1:-1)*(1+(o.height>n.height?o.height:n.height))*X):(p=p.stiffness*(X-p.length),r=(w-r)/X*p,O=(D-a)/X*p),n.forceX+=r,n.forceY+=O,o.forceX-=r,o.forceY-=O;for(i=r=0;ie.epsilonDistance*e.epsilonDistance}Xs.prototype.moveVertex=function(e){var t=e.forceX,n=e.forceY,r=this.moveLimit;return t<-r?t=-r:t>r&&(t=r),n<-r?n=-r:n>r&&(n=r),e.centerX+=t,e.centerY+=n,t*t+n*n},Xs.prototype.moveFixedVertex=function(){},Xs.prototype.commitLayout=function(){this.yv(),this.commitNodes(),this.isRouting&&this.commitLinks()},Xs.prototype.yv=function(){if(this.setsPortSpots)for(var e=this.network.edges.iterator;e.next();){var t=e.value.link;t!==null&&(t.fromSpot=is,t.toSpot=is)}},Xs.prototype.commitNodes=function(){var e=0,t=0;if(this.arrangesToOrigin){var n=Nt.alloc();this.computeBounds(this.network,n),t=this.arrangementOrigin,e=t.x-n.x,t=t.y-n.y,Nt.free(n)}n=Nt.alloc();for(var r=this.network.vertexes.iterator;r.next();){var i=r.value;(e!==0||t!==0)&&(n.assign(i.bounds),n.x+=e,n.y+=t,i.bounds=n),i.commit()}Nt.free(n)},Xs.prototype.commitLinks=function(){for(var e=this.network.edges.iterator;e.next();)e.value.commit()},Xs.prototype.springStiffness=function(e){return e=e.stiffness,isNaN(e)?this.Hk:e},Xs.prototype.springLength=function(e){return e=e.length,isNaN(e)?this.Gk:e},Xs.prototype.electricalCharge=function(e){return e=e.charge,isNaN(e)?this.Ek:e},Xs.prototype.electricalFieldX=function(){return 0},Xs.prototype.electricalFieldY=function(){return 0},Xs.prototype.gravitationalMass=function(e){return e=e.mass,isNaN(e)?this.Fk:e},Xs.prototype.gravitationalFieldX=function(){return 0},Xs.prototype.gravitationalFieldY=function(){return 0},Xs.prototype.isFixed=function(e){return e.isFixed},kn.Object.defineProperties(Xs.prototype,{currentIteration:{get:function(){return this.An}},arrangementSpacing:{get:function(){return this.$d},set:function(e){this.$d.D(e)||(this.$d.assign(e),this.C())}},arrangesToOrigin:{get:function(){return this.Bm},set:function(e){this.Bm!==e&&(this.Bm=e,this.C())}},setsPortSpots:{get:function(){return this.sf},set:function(e){this.sf!==e&&(this.sf=e,this.C())}},comments:{get:function(){return this.td},set:function(e){this.td!==e&&(this.td=e,this.C())}},maxIterations:{get:function(){return this.dl},set:function(e){this.dl!==e&&0<=e&&(this.dl=e,this.C())}},epsilonDistance:{get:function(){return this.$m},set:function(e){this.$m!==e&&0Te&&0Te&&0e[this.Md]&&(this.Iq=e[n]-1,this.Md=n),e[n]a)for(var D=a+1;Dw;D--)X=r[D],X.near===O&&X.Dj===O.Dj||p++;var re;if(0<=n)for(w=r[a].sourceEdgesArrayAccess,O=0;OTe||X===Te&&de>Se)&&p++,XeX||Te===X&&Se>de)&&p++}}}if(0>=n){for(w=r[a].destinationEdgesArrayAccess,O=0;OTe||X===Te&&D>Xe)&&p++,SeX||Te===X&&Xe>D)&&p++)}for(o[a*i+a]=p,w=a+1;w=n){for(p=r[a].destinationEdgesArrayAccess,tt=r[w].destinationEdgesArrayAccess,O=0;O=n&&(w=p.sourceEdgesArrayAccess);var O=null;0<=n&&(O=p.destinationEdgesArrayAccess);var D=0,X=0,re=p.near;if(re!==null&&re.layer===p.layer&&(D+=re.column-1,X++),w!==null)for(re=0;re=n&&(w=p.sourceEdgesArrayAccess);var O=null;0<=n&&(O=p.destinationEdgesArrayAccess);var D=0,X=[],re=p.near;if(re!==null&&re.layer===p.layer&&(X[D]=re.column-1,D++),p=void 0,w!==null)for(re=0;re>1,o[a]=D&1?X[O]:X[O-1]+X[O]>>1)}return Mh(e,t,r),o}function qp(e,t,n,r,i,o){if(t.component===r){if(t.component=n,i)for(var a=t.destinationEdges;a.next();){var p=a.value,w=p.toVertex,O=t.layer-w.layer;p=e.linkMinLength(p),O===p&&qp(e,w,n,r,i,o)}if(o)for(a=t.sourceEdges;a.next();)p=a.value,w=p.fromVertex,O=w.layer-t.layer,p=e.linkMinLength(p),O===p&&qp(e,w,n,r,i,o)}}function ky(e,t,n,r,i,o){if(t.component===r){if(t.component=n,i)for(var a=t.destinationEdges;a.next();)ky(e,a.value.toVertex,n,r,i,o);if(o)for(t=t.sourceEdges;t.next();)ky(e,t.value.fromVertex,n,r,i,o)}}xi.prototype.removeCycles=function(){for(var e=this.network.edges.iterator;e.next();)e.value.rev=!1;switch(this.Dk){default:case Iy:e=this.network;var t=0,n=e.vertexes.count-1,r=[];r.length=n+1;for(var i=e.vertexes.iterator;i.next();)i.value.valid=!0;for(;nS(e)!==null;){for(i=r1(e);i!==null;)r[n]=i,n--,i.valid=!1,i=r1(e);for(i=i1(e);i!==null;)r[t]=i,t++,i.valid=!1,i=i1(e);i=null;for(var o=0,a=this.network.vertexes.iterator;a.next();){var p=a.value;if(p.valid){for(var w=0,O=p.destinationEdges;O.next();)O.value.toVertex.valid&&w++;O=0;for(var D=p.sourceEdges;D.next();)D.value.fromVertex.valid&&O++;(i===null||ot.toVertex.index&&(e.gm(t),t.rev=!0);break;case Um:for(r=this.network.vertexes.iterator;r.next();)e=r.value,e.Ll=-1,e.finish=-1;for(e=this.network.edges.iterator;e.next();)e.value.forest=!1;for(this.Kn=0,r.reset();r.next();)t=r.value,t.sourceEdges.count===0&&Ny(this,t);for(r.reset();r.next();)t=r.value,t.Ll===-1&&Ny(this,t);for(e.reset();e.next();)r=e.value,r.forest||(t=r.fromVertex,n=t.finish,i=r.toVertex,o=i.finish,i.Llr){if(0>r)for(t.reset();t.next();)t.value.layer-=r;for(r=[],t.reset();t.next();)n=t.value,i=r[n.layer],i===void 0?r[n.layer]=[n]:i.push(n);for(n=t=0;na&&qp(e,p,0,-1,!0,!1)}for(qp(e,t,1,-1,!0,!0);t.component!==0;){for(o=0,r=1/0,p=0,w=null,a=e.network.vertexes.iterator;a.next();){var O=a.value;if(O.component===1){var D=0,X=!1,re=O.sourceEdgesArrayAccess;i=re.length;for(var de=0;deo)&&!D&&(p=a,o=O)}if(0>r){for(n.reset();n.next();)r=n.value,r.component===1&&(r.layer-=i);t.component=0}else p.component=0}}}function u1(e,t,n){return e.K===90?n&&!t.rev||!n&&t.rev?270:90:e.K===180?n&&!t.rev||!n&&t.rev?0:180:e.K===270?n&&!t.rev||!n&&t.rev?90:270:n&&!t.rev||!n&&t.rev?180:0}xi.prototype.initializeIndices=function(){switch(this.Qk){default:case Dy:for(var e=this.network.vertexes.iterator;e.next();){var t=e.value,n=t.layer;t.index=this.tc[n],this.tc[n]++}break;case zm:for(e=this.network.vertexes.iterator,t=this.Ia;0<=t;t--)for(e.reset();e.next();)n=e.value,n.layer===t&&n.index===-1&&c1(this,n);break;case My:for(e=this.network.vertexes.iterator,t=0;t<=this.Ia;t++)for(e.reset();e.next();)n=e.value,n.layer===t&&n.index===-1&&h1(this,n)}};function c1(e,t){var n=t.layer;for(t.index=e.tc[n],e.tc[n]++,t=t.destinationEdgesArrayAccess,n=!0;n;){n=!1;for(var r=0;ro.portFromColOffset&&(n=!0,t[r]=o,t[r+1]=i)}}for(n=0;no.portToColOffset&&(r=!0,t[n]=o,t[n+1]=i)}for(n=0;n=a;r--)o=eu(this,r,-1)||o;for(i=this.countCrossings(),i>=e?Hl(this,t):(e=i,t=za(this)),o=!0;o;)for(o=!1,r=n;r>=a;r--)o=eu(this,r,1)||o;for(i=this.countCrossings(),i>=e?Hl(this,t):(e=i,t=za(this)),o=!0;o;)for(o=!1,r=a;r<=n;r++)o=eu(this,r,1)||o;for(i>=e?Hl(this,t):(e=i,t=za(this)),o=!0;o;)for(o=!1,r=a;r<=n;r++)o=eu(this,r,-1)||o;for(i>=e?Hl(this,t):(e=i,t=za(this)),o=!0;o;)for(o=!1,r=n;r>=a;r--)o=eu(this,r,0)||o;for(i>=e?Hl(this,t):(e=i,t=za(this)),o=!0;o;)for(o=!1,r=a;r<=n;r++)o=eu(this,r,0)||o;i>=e?Hl(this,t):(e=i,t=za(this))}break;default:case Gm:for(n=this.Ia,a=0,p=e+1;(r=this.countCrossings())=a;r--)o=eu(this,r,-1)||o;for(i=this.countCrossings(),i>=e?Hl(this,t):(e=i,t=za(this)),o=!0;o;)for(o=!1,r=n;r>=a;r--)o=eu(this,r,1)||o;for(i=this.countCrossings(),i>=e?Hl(this,t):(e=i,t=za(this)),o=!0;o;)for(o=!1,r=a;r<=n;r++)o=eu(this,r,1)||o;for(i>=e?Hl(this,t):(e=i,t=za(this)),o=!0;o;)for(o=!1,r=a;r<=n;r++)o=eu(this,r,-1)||o;for(i>=e?Hl(this,t):(e=i,t=za(this)),o=!0;o;)for(o=!1,r=n;r>=a;r--)o=eu(this,r,0)||o;for(i>=e?Hl(this,t):(e=i,t=za(this)),o=!0;o;)for(o=!1,r=a;r<=n;r++)o=eu(this,r,0)||o;i>=e?Hl(this,t):(e=i,t=za(this))}}Hl(this,t)};function Fm(e,t,n){var r=Lh(e,t),i=e.tc[t],o=n1(e,t,n),a=Ay(e,t,n);for(n=0;no+1&&(re+=4*(qe-o),de+=4*(qe-(o+1)))}for(rt=r[o].destinationEdges.iterator,rt.reset();rt.next();)if(qe=rt.value,tt=qe.toVertex,qe.valid&&tt.layer===t){for(qe=0;r[qe]!==tt;)qe++;qe===o+1&&(de+=1)}for(rt=r[o+1].sourceEdges.iterator,rt.reset();rt.next();)if(qe=rt.value,tt=qe.fromVertex,qe.valid&&tt.layer===t){for(qe=0;r[qe]!==tt;)qe++;qeo+1&&(re+=4*(qe-(o+1)),de+=4*(qe-o))}for(rt=r[o+1].destinationEdges.iterator,rt.reset();rt.next();)if(qe=rt.value,tt=qe.toVertex,qe.valid&&tt.layer===t){for(qe=0;r[qe]!==tt;)qe++;qe===o&&(re+=1)}qe=tt=0,rt=a[r[o].index];var ft=p[r[o].index],Tt=a[r[o+1].index],Sn=p[r[o+1].index];rt!==-1&&(tt+=Math.abs(rt-Se),qe+=Math.abs(rt-We)),ft!==-1&&(tt+=Math.abs(ft-Se),qe+=Math.abs(ft-We)),Tt!==-1&&(tt+=Math.abs(Tt-Te),qe+=Math.abs(Tt-Xe)),Sn!==-1&&(tt+=Math.abs(Sn-Te),qe+=Math.abs(Sn-Xe)),(de>1)+8*r;this.Ra*=8}if(this.bg&2)for(n=!0;n;){for(n=!1,t=this.Md+1;t<=this.Ia;t++)n=jd(this,t,1)||n;for(t=this.Md-1;0<=t;t--)n=jd(this,t,-1)||n;n=jd(this,this.Md,0)||n}if(this.bg&4){for(t=this.Md+1;t<=this.Ia;t++)Ry(this,t,1);for(t=this.Md-1;0<=t;t--)Ry(this,t,-1);Ry(this,this.Md,0)}if(e&&(f1(this,-1),f1(this,1)),this.bg&2)for(n=!0;n;){for(n=!1,n=jd(this,this.Md,0)||n,t=this.Md+1;t<=this.Ia;t++)n=jd(this,t,0)||n;for(t=this.Md-1;0<=t;t--)n=jd(this,t,0)||n}}else sS(this)};function jd(e,t,n){for(var r=!1;rS(e,t,n);)r=!0;return r}function rS(e,t,n){var r,i=Lh(e,t),o=e.tc[t],a=Ay(e,t,-1);if(0n)for(r=0;rr-1||D-i[r-1].column-1>X+e.nodeMinColumnSpace(i[r-1],!1)?de=D-1:de=D,X=r+1>=o||i[r+1].column-D-1>re+e.nodeMinColumnSpace(i[r+1],!0)?D+1:D;var Se=re=0,Te=0;if(0>=n)for(var Xe=i[r].sourceEdges.iterator;Xe.next();){var We=Xe.value,qe=We.fromVertex;if(We.valid&&qe.layer!==t){var tt=_y(We),rt=We.portFromColOffset;We=We.portToColOffset,qe=qe.column,re+=(Math.abs(D+We-(qe+rt))+1)*tt,Se+=(Math.abs(de+We-(qe+rt))+1)*tt,Te+=(Math.abs(X+We-(qe+rt))+1)*tt}}if(0<=n)for(Xe=i[r].destinationEdges.iterator;Xe.next();)We=Xe.value,qe=We.toVertex,We.valid&&qe.layer!==t&&(tt=_y(We),rt=We.portFromColOffset,We=We.portToColOffset,qe=qe.column,re+=(Math.abs(D+rt-(qe+We))+1)*tt,Se+=(Math.abs(de+rt-(qe+We))+1)*tt,Te+=(Math.abs(X+rt-(qe+We))+1)*tt);We=rt=tt=0,Xe=a[i[r].index],qe=p[i[r].index],Xe!==-1&&(tt+=Math.abs(Xe-D),rt+=Math.abs(Xe-de),We+=Math.abs(Xe-X)),qe!==-1&&(tt+=Math.abs(qe-D),rt+=Math.abs(qe-de),We+=Math.abs(qe-X)),Se=a[n]?D=w:O<=a[n]&&(D=O));D!==p&&(o=!0,r[n].column=D)}Mh(e,t,r),e.normalize()}function iS(e,t){for(var n=!0,r=e.network.vertexes.iterator;r.next();){var i=r.value,o=e.nodeMinColumnSpace(i,!0),a=e.nodeMinColumnSpace(i,!1);if(i.column-o<=t&&i.column+a>=t){n=!1;break}}if(e=!1,n)for(r.reset();r.next();)n=r.value,n.column>t&&(--n.column,e=!0);return e}function oS(e,t){var n=t+1,r,i=[],o=[];for(r=0;r<=e.Ia;r++)i[r]=!1,o[r]=!1;for(var a=e.network.vertexes.iterator;a.next();){r=a.value;var p=r.column-e.nodeMinColumnSpace(r,!0),w=r.column+e.nodeMinColumnSpace(r,!1);p<=t&&w>=t&&(i[r.layer]=!0),p<=n&&w>=n&&(o[r.layer]=!0)}for(p=!0,n=!1,r=0;r<=e.Ia;r++)p=p&&!(i[r]&&o[r]);if(p)for(a.reset();a.next();)e=a.value,e.column>t&&(--e.column,n=!0);return n}function f1(e,t){for(var n=0;n<=e.Ra;n++)for(;iS(e,n););for(e.normalize(),n=0;no?Hl(e,i):at)for(n=e.Ra;0<=n;n--)for(i=za(e),o=Pm(e),r=o+1;oo?Hl(e,i):an)for(r.reset();r.next();)i=r.value,i.column+e.nodeMinColumnSpace(i,!1)>=t&&(i.component=e.le);for(e.le++,r.reset();r.next();)t=r.value,t.component===-1&&(ky(e,t,e.le,-1,!0,!0),e.le++);var o;for(t=[],o=0;on)for(a=e.Ra;0n)for(r.reset();r.next();)n=r.value,i[n.component]&&(n.column+=1)}function sS(e){for(var t=yr(),n=e.fl.length,r=0;r<=n;r++)t[r]=[];for(r=e.network.vertexes.iterator;r.next();){var i=r.value;t[n-i.layer][i.index]=i}n=new ut,aS(t,n);var o=null,a=null,p=null,w=null,O=(e.ve&1)!==0,D=(e.ve&2)!==0,X=(e.ve&4)!==0,re=(e.ve&8)!==0;for(O&&(e.verticalAlignment(t,n,!0),o=Bm(e,t,!0,!1)),t.reverse(),X&&(e.verticalAlignment(t,n,!1),p=Bm(e,t,!1,!1)),r=rn(t),i=r.next();!i.done;i=r.next())i.value.reverse();re&&(e.verticalAlignment(t,n,!1),w=Bm(e,t,!1,!0)),t.reverse(),D&&(e.verticalAlignment(t,n,!0),a=Bm(e,t,!0,!0)),Mr(t),e.u(o,a,p,w),e.network.vertexes.each(function(de){var Se=yr();O&&Se.push(o.get(de)),D&&Se.push(a.get(de)),X&&Se.push(p.get(de)),re&&Se.push(w.get(de)),Se.sort(function(Xe,We){return Xe-We});var Te=Se.length;Te=(Se[Math.floor((Te-1)/2)]+Se[Math.ceil((Te-1)/2)])/2,Mr(Se),de.zc=Te})}function aS(e,t){for(var n=e.length,r=1;rD)&&t.add(X);o++}i=D}}}xi.prototype.verticalAlignment=function(e,t,n){lS(e),e=rn(e);for(var r=e.next();!r.done;r=e.next()){var i=-1;r=rn(r.value);for(var o=r.next();!o.done;o=r.next()){o=o.value;var a=n?By(o):hS(o),p=a.length;if(0=t[n].length)&&(a=t[n][0],a.sd===a)){a.sd.shift===1/0&&(a.sd.shift=0),a=n,p=0;do{for(o=t[a][p];o.align!==o.root;)o=o.align,a++,0e&&Lt("Could not determine previous vertex in layer"),t[n][e-1]}xi.prototype.u=function(e){for(var t=[],n=0;na;a++)if(t[a]){var p=uS(this,t[a],r,i,a);pa;o={delta:o.delta},a++)t[a]&&(o.delta=a===0||a===2?r[n]-r[a]:i[n]-i[a],o.delta!==0&&t[a].each(function(w){return function(O){O.value+=w.delta}}(o)));Mr(r),Mr(i)};function uS(e,t,n,r,i){if(!t||t.count===0)return n[i]=0,r[i]=0,1/0;var o=1/0,a=-1/0;return t.each(function(p){var w=p.key;p=p.value,w=e.K===90||e.K===270?w.width:w.height,pa&&(a=p+w)}),n[i]=o,r[i]=a,a-o}xi.prototype.commitLayout=function(){if(this.setsPortSpots)for(var e=jm(this,!0),t=jm(this,!1),n=this.network.edges.iterator;n.next();){var r=n.value.link;r!==null&&(r.fromSpot=e,r.toSpot=t)}this.commitNodes(),this.Gu(),this.isRouting&&this.commitLinks()};function jm(e,t){return e.K===270?t?Vs:js:e.K===90?t?js:Vs:e.K===180?t?Ks:ws:t?ws:Ks}xi.prototype.commitNodes=function(){this.he=[],this.Ld=[],this.Kd=[],this.Ta=[];for(var e=0;e<=this.Ia;e++)this.he[e]=0,this.Ld[e]=0,this.Kd[e]=0,this.Ta[e]=0;for(e=this.network.vertexes.iterator;e.next();){var t=e.value,n=t.layer;this.he[n]=Math.max(this.he[n],this.nodeMinLayerSpace(t,!0)),this.Ld[n]=Math.max(this.Ld[n],this.nodeMinLayerSpace(t,!1))}t=0,n=this.ie;for(var r=0;r<=this.Ia;r++){var i=n;0>=this.he[r]+this.Ld[r]&&(i=0),0=X.bounds.bottom?(X=X.bounds.y+X.bounds.height,t.m(Te++,rt,X+Tt),t.m(Te++,rt,X),t.m(Te++,rt,X-tt)):(t.m(Te++,rt,ft+Tt),t.m(Te++,rt,ft),t.m(Te++,rt,ft-tt)):this.K===270?ft<=X.bounds.y?(X=X.bounds.y,t.m(Te++,rt,X-tt),t.m(Te++,rt,X),t.m(Te++,rt,X+Tt)):(t.m(Te++,rt,ft-tt),t.m(Te++,rt,ft),t.m(Te++,rt,ft+Tt)):this.K===0&&(rt>=X.bounds.right?(X=X.bounds.x+X.bounds.width,t.m(Te++,X+Tt,ft),t.m(Te++,X,ft),t.m(Te++,X-tt,ft)):(t.m(Te++,rt+Tt,ft),t.m(Te++,rt,ft),t.m(Te++,rt-tt,ft)));else{t.m(Te++,We,qe);var Sn=0;this.K===180||this.K===0?((this.K===180?rt>=X.bounds.right:rt<=X.bounds.x)&&(Sn=(this.K===0?-tt:Tt)/2),t.m(Te++,We+Sn,ft)):((this.K===270?ft>=X.bounds.bottom:ft<=X.bounds.y)&&(Sn=(this.K===90?-tt:Tt)/2),t.m(Te++,rt,qe+Sn)),t.m(Te++,rt,ft)}}else tt=Math.max(10,this.he[Xe.layer]),Tt=Math.max(10,this.Ld[Xe.layer]),re?this.K===180?(t.m(Te++,rt-tt-Se,ft),t.m(Te++,Math.min(rt-tt+Se/2,rt),ft),t.m(Te++,rt,ft),t.m(Te++,rt,ft),t.m(Te++,Math.max(rt+Tt-Se/2,rt),ft),t.m(Te++,rt+Tt+Se,ft)):this.K===90?(t.m(Te++,rt,ft+Tt+Se),t.m(Te++,rt,Math.max(ft+Tt-Se/2,ft)),t.m(Te++,rt,ft),t.m(Te++,rt,ft),t.m(Te++,rt,Math.min(ft-tt+Se/2,ft)),t.m(Te++,rt,ft-tt-Se)):this.K===270?(t.m(Te++,rt,ft-tt-Se),t.m(Te++,rt,Math.min(ft-tt+Se/2,ft)),t.m(Te++,rt,ft),t.m(Te++,rt,ft),t.m(Te++,rt,Math.max(ft+Tt-Se/2,ft)),t.m(Te++,rt,ft+Tt+Se)):(t.m(Te++,rt+Tt+Se,ft),t.m(Te++,Math.max(rt+Tt-Se/2,rt),ft),t.m(Te++,rt,ft),t.m(Te++,rt,ft),t.m(Te++,Math.min(rt-tt+Se/2,rt),ft),t.m(Te++,rt-tt-Se,ft)):t.m(Te++,rt,ft)}X=Xe}(p===null||O!==So||de)&&(We=t.i(Te-1).x,qe=t.i(Te-1).y,rt=t.i(Te).x,ft=t.i(Te).y,de?(Se=this.Ld[D.layer],this.K===180||this.K===0?(de=qe,de>=D.bounds.y&&de<=D.bounds.bottom&&(this.K===180?rt>=D.bounds.x:rt<=D.bounds.right)&&(X=D.centerX+(this.K===180?-Se:Se),de=D.bounds.x&&de<=D.bounds.right&&(this.K===270?ft>=D.bounds.y:ft<=D.bounds.bottom)&&(X=D.centerY+(this.K===270?-Se:Se),de=D.bounds.x?(X=D.bounds.x+D.bounds.width,t.L(Te-2,X,qe),t.L(Te-1,X+Tt,qe)):this.K===90&&ft<=D.bounds.bottom?(X=D.bounds.y,t.L(Te-2,We,X),t.L(Te-1,We,X-tt)):this.K===270&&ft>=D.bounds.y?(X=D.bounds.y+D.bounds.height,t.L(Te-2,We,X),t.L(Te-1,We,X+Tt)):this.K===0&&rt<=D.bounds.right&&(X=D.bounds.x,t.L(Te-2,X,qe),t.L(Te-1,X-tt,qe))):(tt=Math.max(10,this.he[D.layer]),Tt=Math.max(10,this.Ld[D.layer]),de=0,this.K===180||this.K===0?((this.K===180?rt<=D.bounds.x:rt>=D.bounds.right)&&(de=(this.K===0?Tt:-tt)/2),t.m(Te++,rt+de,qe)):((this.K===270?ft<=D.bounds.y:ft>=D.bounds.bottom)&&(de=(this.K===90?Tt:-tt)/2),t.m(Te++,We,ft+de)),t.m(Te++,rt,ft)))}else{for(;D!==null&&D!==X;){for(tt=Xe=null,D=D.destinationEdges.iterator;D.next()&&(We=D.value,We.link!==n.link||(Xe=We.toVertex,tt=We.fromVertex,tt.node!==null&&(tt=null),Xe.node!==null)););if(Xe===null)break;Xe!==X&&(We=t.i(Te-1).x,qe=t.i(Te-1).y,rt=Xe.centerX,ft=Xe.centerY,de?this.K===180||this.K===0?(tt!==null?tt.centerY:qe)!==ft&&(tt=this.Ta[Xe.layer]+this.Rf.x,Te===t.firstPickIndex+1&&(tt=this.K===0?Math.max(tt,We):Math.min(tt,We)),t.m(Te++,tt,qe),t.m(Te++,tt,ft)):(tt!==null?tt.centerX:We)!==rt&&(tt=this.Ta[Xe.layer]+this.Rf.y,Te===t.firstPickIndex+1&&(tt=this.K===90?Math.max(tt,qe):Math.min(tt,qe)),t.m(Te++,We,tt),t.m(Te++,rt,tt)):(tt=Math.max(10,this.he[Xe.layer]),Tt=Math.max(10,this.Ld[Xe.layer]),re?this.K===180?(t.m(Te++,rt+Tt+Se,ft),t.m(Te++,Math.max(rt+Tt-Se/2,rt),ft),t.m(Te++,rt,ft),t.m(Te++,rt,ft),t.m(Te++,Math.min(rt-tt+Se/2,rt),ft),t.m(Te++,rt-tt-Se,ft)):this.K===90?(t.m(Te++,rt,ft-tt-Se),t.m(Te++,rt,Math.min(ft-tt+Se/2,ft)),t.m(Te++,rt,ft),t.m(Te++,rt,ft),t.m(Te++,rt,Math.max(ft+Tt-Se/2,ft)),t.m(Te++,rt,ft+Tt+Se)):this.K===270?(t.m(Te++,rt,ft+Tt+Se),t.m(Te++,rt,Math.max(ft+Tt-Se/2,ft)),t.m(Te++,rt,ft),t.m(Te++,rt,ft),t.m(Te++,rt,Math.min(ft-tt+Se/2,ft)),t.m(Te++,rt,ft-tt-Se)):(t.m(Te++,rt-tt-Se,ft),t.m(Te++,Math.min(rt-tt+Se/2,rt),ft),t.m(Te++,rt,ft),t.m(Te++,rt,ft),t.m(Te++,Math.max(rt+Tt-Se/2,rt),ft),t.m(Te++,rt+Tt+Se,ft)):this.K===180?(t.m(Te++,rt+Tt,ft),t.m(Te++,rt-tt,ft)):this.K===90?(t.m(Te++,rt,ft-tt),t.m(Te++,rt,ft+Tt)):this.K===270?(t.m(Te++,rt,ft+Tt),t.m(Te++,rt,ft-tt)):(t.m(Te++,rt-tt,ft),t.m(Te++,rt+Tt,ft)))),D=Xe}de&&(We=t.i(Te-1).x,qe=t.i(Te-1).y,rt=t.i(Te).x,ft=t.i(Te).y,this.K===180||this.K===0?qe!==ft&&(tt=this.K===0?Math.min(Math.max((rt+We)/2,this.Ta[X.layer]+this.Rf.x),rt):Math.max(Math.min((rt+We)/2,this.Ta[X.layer]+this.Rf.x),rt),t.m(Te++,tt,qe),t.m(Te++,tt,ft)):We!==rt&&(tt=this.K===90?Math.min(Math.max((ft+qe)/2,this.Ta[X.layer]+this.Rf.y),ft):Math.max(Math.min((ft+qe)/2,this.Ta[X.layer]+this.Rf.y),ft),t.m(Te++,We,tt),t.m(Te++,rt,tt)))}r!==null&&re&&4<=t.pointsCount&&(a!==null&&(a=O===So?t.getLinkPointFromPoint(i,a,a.ga(jr),t.i(3),!0):t.i(0),O===So&&(O=t.i(2),r=t.i(3),this.direction===90||this.direction===270?(t.L(1,(a.x+O.x)/2,O.y),t.L(2,r.x,(O.y+r.y)/2)):(t.L(1,O.x,(a.y+O.y)/2),t.L(2,(O.x+r.x)/2,r.y))),a.w()||a.set(i.actualBounds.center),t.L(0,a.x,a.y)),p!==null&&(i=w===So?t.getLinkPointFromPoint(o,p,p.ga(jr),t.i(t.pointsCount-4),!1):t.i(t.pointsCount-1),w===So&&(p=t.i(t.pointsCount-3),w=t.i(t.pointsCount-4),this.direction===90||this.direction===270?(t.L(t.pointsCount-2,(i.x+p.x)/2,p.y),t.L(t.pointsCount-2,w.x,(p.y+w.y)/2)):(t.L(t.pointsCount-2,p.x,(i.y+p.y)/2),t.L(t.pointsCount-3,(p.x+w.x)/2,w.y))),i.w()||i.set(o.actualBounds.center),t.L(t.pointsCount-1,i.x,i.y))),t.zf(),n.commit()}}}this.avoidOrthogonalOverlaps()},xi.prototype.avoidOrthogonalOverlaps=function(){if(!(0>=this.linkSpacing)){for(var e=new tn,t=this.network.edges.iterator;t.next();){var n=t.value.link;n!==null&&n.isOrthogonal&&!e.contains(n)&&e.add(n)}if(0o.y&&(D=O.y>o.y?0:a.xo.x&&(D=O.x>o.x?0:a.yt.layer?1:e.rdt.rd?1:e.Ict.Ic?1:0:0},ye.Ux=function(e,t){return e instanceof Dh&&t instanceof Dh&&e!==t?e.firstt.first||e.jt.j||e.rdt.rd?1:e.Ict.Ic?1:0:0},ye.Js=function(e,t){return e instanceof Dh&&t instanceof Dh&&e!==t?e.jct.jc||e.jt.j||e.rdt.rd?1:e.Ict.Ic?1:0:0},ye.B=function(e,t){return e-=t,-1e},ye.zi=function(e,t,n,r){var i=e.length,o=r-n;if(!(1>=o))if((0>n||n>=i-1)&&Lt("not in range 0 <= from < length: "+n),o===2)r=e[n],i=e[n+1],0=i)e.sort(t);else for(n=e.slice(0,r),n.sort(t),t=0;t=i)for(r=e.slice(n),r.sort(t),t=n;t=e.He.length){for(var r=[],i=0;ie&&(this.bg=e,this.C())}},alignOption:{get:function(){return this.ve},set:function(e){this.ve!==e&&0<=e&&16>e&&(this.ve=e,this.C())}},setsPortSpots:{get:function(){return this.sf},set:function(e){this.sf!==e&&(this.sf=e,this.C())}},linkSpacing:{get:function(){return this.Cn},set:function(e){this.Cn!==e&&0<=e&&(this.Cn=e,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 Um=new hn(xi,"CycleDepthFirst",0),Iy=new hn(xi,"CycleGreedy",1),eg=new hn(xi,"CycleFromLayers",2),Hm=new hn(xi,"LayerOptimalLinkLength",0),Oy=new hn(xi,"LayerLongestPathSink",1),Ly=new hn(xi,"LayerLongestPathSource",2),zm=new hn(xi,"InitDepthFirstOut",0),My=new hn(xi,"InitDepthFirstIn",1),Dy=new hn(xi,"InitNaive",2),Py=new hn(xi,"AggressiveNone",0),Gm=new hn(xi,"AggressiveLess",1),Fy=new hn(xi,"AggressiveMore",2),cS=8;xi.className="LayeredDigraphLayout",xi.CycleDepthFirst=Um,xi.CycleGreedy=Iy,xi.CycleFromLayers=eg,xi.LayerOptimalLinkLength=Hm,xi.LayerLongestPathSink=Oy,xi.LayerLongestPathSource=Ly,xi.InitDepthFirstOut=zm,xi.InitDepthFirstIn=My,xi.InitNaive=Dy,xi.AggressiveNone=Py,xi.AggressiveLess=Gm,xi.AggressiveMore=Fy,xi.PackNone=0,xi.PackExpand=1,xi.PackStraighten=2,xi.PackMedian=4,xi.PackAll=15,xi.AlignNone=0,xi.AlignUpperLeft=1,xi.AlignUpperRight=2,xi.AlignLowerLeft=4,xi.AlignLowerRight=8,xi.AlignAll=15;function Dh(){this.index=this.Ic=this.rd=this.jc=this.first=this.layer=0,this.link=null,this.j=0}Dh.className="SegInfo";function Ud(e){Ki.call(this,e)}Tn(Ud,Ki),Ud.prototype.createVertex=function(){return new zl(this)},Ud.prototype.createEdge=function(){return new tg(this)},Ud.className="LayeredDigraphNetwork";function zl(e){xs.call(this,e),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}Tn(zl,xs);function m1(e,t){return e.index-t.index}function Wm(e,t){if(!e.$n){for(var n=[],r=rn(e.destinationEdgesArrayAccess),i=r.next();!i.done;i=r.next())i=i.value,i.valid&&n.push(i);e.$n=n}for(e=rn(e.$n),n=e.next();!n.done;n=e.next())if(n=n.value,n.toVertex===t)return n;Lt("Unable to find destination edge to given vertex")}function By(e){if(!e.co){for(var t=[],n=rn(e.sourceEdgesArrayAccess),r=n.next();!r.done;r=n.next())r=r.value,r.valid&&t.push(r.fromVertex);t.sort(m1),e.co=t}return e.co}function hS(e){if(!e.ao){for(var t=[],n=rn(e.destinationEdgesArrayAccess),r=n.next();!r.done;r=n.next())r=r.value,r.valid&&t.push(r.toVertex);t.sort(m1),e.ao=t}return e.ao}zl.prototype.Cl=function(e){xs.prototype.Cl.call(this,e),this.bo=this.co=null},zl.prototype.Kl=function(e){xs.prototype.Kl.call(this,e),this.bo=this.co=null},zl.prototype.zl=function(e){xs.prototype.zl.call(this,e),this.$n=this.ao=null},zl.prototype.Jl=function(e){xs.prototype.Jl.call(this,e),this.$n=this.ao=null},kn.Object.defineProperties(zl.prototype,{layer:{get:function(){return this.Ig},set:function(e){this.Ig!==e&&(this.Ig=e)}},column:{get:function(){return this.Ag},set:function(e){this.Ag!==e&&(this.Ag=e)}},index:{get:function(){return this.Za},set:function(e){this.Za!==e&&(this.Za=e)}},component:{get:function(){return this.u},set:function(e){this.u!==e&&(this.u=e)}},near:{get:function(){return this.F},set:function(e){this.F!==e&&(this.F=e)}}}),zl.prototype.deleteDestinationEdge=zl.prototype.Jl,zl.prototype.addDestinationEdge=zl.prototype.zl,zl.prototype.deleteSourceEdge=zl.prototype.Kl,zl.prototype.addSourceEdge=zl.prototype.Cl,zl.className="LayeredDigraphVertex";function tg(e){ll.call(this,e),this.j=this.ia=this.Ha=!1,this.V=this.u=NaN,this.F=this.o=0}Tn(tg,ll),kn.Object.defineProperties(tg.prototype,{fromVertex:{get:function(){return this.kd},set:function(e){this.kd!==e&&(this.kd=e)}},toVertex:{get:function(){return this.qd},set:function(e){this.qd!==e&&(this.qd=e)}},valid:{get:function(){return this.Ha},set:function(e){this.Ha!==e&&(this.Ha=e)}},rev:{get:function(){return this.ia},set:function(e){this.ia!==e&&(this.ia=e)}},forest:{get:function(){return this.j},set:function(e){this.j!==e&&(this.j=e)}},portFromPos:{get:function(){return this.u},set:function(e){this.u!==e&&(this.u=e)}},portToPos:{get:function(){return this.V},set:function(e){this.V!==e&&(this.V=e)}},portFromColOffset:{get:function(){return this.o},set:function(e){this.o!==e&&(this.o=e)}},portToColOffset:{get:function(){return this.F},set:function(e){this.F!==e&&(this.F=e)}}}),tg.className="LayeredDigraphEdge";function Lr(e){co.call(this),this.Ub=new ut,this.Wn=$m,this.ud=hc,this.vo=Zm,this.Bq=Xy,this.$v=[],this.td=!0,this.Rb=Jm,this.$d=new Yt(10,10).freeze();var t=new $f(this);this.W=new tu(t),this.Y=new tu(t),this.ru=[],e&&Object.assign(this,e)}Tn(Lr,co),Lr.prototype.cloneProtected=function(e){co.prototype.cloneProtected.call(this,e),e.Wn=this.Wn,e.vo=this.vo,e.Bq=this.Bq,e.td=this.td,e.Rb=this.Rb,e.$d.assign(this.$d),e.W.copyInheritedPropertiesFrom(this.W),e.Y.copyInheritedPropertiesFrom(this.Y)},Lr.prototype.qb=function(e){e.classType===Lr?e.name.indexOf("Alignment")===0?this.alignment=e:e.name.indexOf("Arrangement")===0?this.arrangement=e:e.name.indexOf("Compaction")===0?this.compaction=e:e.name.indexOf("Path")===0?this.path=e:e.name.indexOf("Sorting")===0?this.sorting=e:e.name.indexOf("Style")===0?this.treeStyle=e:Lt("Unknown enum value: "+e):co.prototype.qb.call(this,e)},Lr.prototype.createNetwork=function(){return new $f(this)},Lr.prototype.makeNetwork=function(e){function t(r){if(r instanceof En)return!r.isLinkLabel&&r.category!=="Comment";if(r instanceof cn){var i=r.fromNode;return i===null||i.isLinkLabel||i.category==="Comment"?!1:(r=r.toNode,!(r===null||r.isLinkLabel||r.category==="Comment"))}return!1}var n=this.createNetwork();return e instanceof Ct?(n.lg(e.nodes,!0,t),n.lg(e.links,!0,t)):e instanceof lr?n.lg(e.memberParts,!1,t):n.lg(e.iterator,!1,t),n},Lr.prototype.doLayout=function(e){this.network===null&&(this.network=this.makeNetwork(e)),this.arrangement!==Qm&&(this.arrangementOrigin=this.initialOrigin(this.arrangementOrigin));var t=this.diagram;if(t===null&&e instanceof Ct&&(t=e),this.path===$m&&t!==null?this.ud=t.isTreePathToChildren?hc:Kf:this.ud=this.path===$m?hc:this.path,0t.level)return!1;e.removeChild(n.parent,n)}return!0}Lr.prototype.removeChild=function(e,t){if(e!==null&&t!==null){for(var n=e.children,r=0,i=0;ii?w1(this,e,a,er,We,qe):C1(this,e,a,er,We,qe),er=qe.x,We=qe.width,qe=qe.height;break;case oh:for(rt=0;rtX&&(RnMs&&(Vf(e,-Ms,0,ar,si-1),Ym(rt,-Ms,0),Ym(ft,-Ms,0),Ms=0)}Hi.S.h(Ms,_n),We=Math.max(We,Tt),qe=Math.max(qe,tt+(ln===0?0:Se)+_s.height),Rn=Tt}else 0X&&(_nMs&&(Vf(e,0,-Ms,ar,si-1),Ym(rt,0,-Ms),Ym(ft,0,-Ms),Ms=0)),Hi.S.h(Rn,Ms),qe=Math.max(qe,Sn),We=Math.max(We,tt+(ln===0?0:Se)+_s.width),_n=Sn;Gt++}switch(0O&&(O=0),135Te&&(Te=0),w===Lc&&(p+=re/2+e.focus.y),a+=r+n):t?(e.comments===null?r>We&&(We=Gy(w,r-We,0),a=We.x,p=We.y,We=r,O=0):We=Hy(e,We,O),0>O&&(a-=O,O=0),135qe&&(qe=Gy(w,0,Xe-qe),a=qe.x,p=qe.y,qe=Xe,Te=0):qe=zy(e,qe,Te),0>Te&&(p-=Te,Te=0),a+=r+n),0i[0].x?i[2].assign(i[1]):i[1].assign(i[2])),i[3].yi[0].x?i[3].assign(i[2]):i[2].assign(i[3])),ln[0].h(O+r,0),ln[1].h(ln[0].x,Xe),ln[2].yi[0].y?i[2].assign(i[1]):i[1].assign(i[2])),i[3].xi[0].y?i[3].assign(i[2]):i[2].assign(i[3])),ln[0].h(0,Te+Xe),ln[1].h(r,ln[0].y),ln[2].xr?w1(e,t,i,Gt,tt,rt):C1(e,t,i,Gt,tt,rt),Gt=rt.x,tt=rt.width,rt=rt.height;break;case oh:for(re=0;rere&&(Ttre&&(SnX&&(X=0),135We&&(We=0)),t.la.h(X,We),t.Da.h(tt,rt)}}Lr.prototype.customAlignment=function(e,t,n,r,i){return[t,n,r,i]};function w1(e,t,n,r,i,o){var a=n.length;if(a===0)return new Nt(r,0,i,o);if(a===1)return t=n[0],i=t.Da.width,o=t.Da.height,new Nt(r,0,i,o);for(var p=t.nodeSpacing,w=t.rowSpacing,O=bu(t)===90,D=0,X=0,re=0,de=0;deO&&(i-=O),o=Math.max(o,Math.max(de,re)+e+a.height),0>n.S.x&&(r=Vm(t,n.S.x,!1,r,p))):(n.S.h(i+e,r+p/2-n.focus.y-n.la.y),i=Math.max(i,Math.max(Se,X)+e+a.width),re=r+p/2-n.focus.y-n.la.y,o=Math.max(o,re+a.height),0>re&&(o-=re),0>n.S.y&&(r=Vm(t,n.S.y,!0,r,p)))),new Nt(r,0,i,o)}function C1(e,t,n,r,i,o){var a=n.length;if(a===0)return new Nt(r,0,i,o);if(a===1)return n=n[0],i=n.Da.width,o=n.Da.height,new Nt(r,0,i,o);for(var p=t.nodeSpacing,w=t.rowSpacing,O=bu(t)===270,D=0,X=0,re=0,de=0;deX&&(i-=X),o=Math.max(o,Math.abs(Math.min(de,re))+e+D.height),0>w.S.x&&(r=Vm(t,w.S.x,!1,r,p))):(w.S.h(-i-D.width-e,r+p/2-w.focus.y-w.la.y),i=Math.max(i,Math.abs(Math.min(Se,X))+e+D.width),re=r+p/2-w.focus.y-w.la.y,o=Math.max(o,re+D.height),0>re&&(o-=re),0>w.S.y&&(r=Vm(t,w.S.y,!0,r,p)))),t=0;tt&&(t=n+e.width),0>n&&(t-=n),t;case fc:return e.width>t?e.width:t;case dc:return 2*e.focus.x>t?e.width:t+e.width-2*e.focus.x;case ih:case pc:return Math.max(e.width,Math.max(t,n+e.width)-Math.min(0,n));case oh:return e.width-e.focus.x+e.nodeSpacing/2+t;case Lc:return Math.max(e.width,e.focus.x+e.nodeSpacing/2+t);default:return t}}function zy(e,t,n){switch(e.alignment){case Yf:case zd:return n+e.height>t&&(t=n+e.height),0>n&&(t-=n),t;case fc:return e.height>t?e.height:t;case dc:return 2*e.focus.y>t?e.height:t+e.height-2*e.focus.y;case ih:case pc:return Math.max(e.height,Math.max(t,n+e.height)-Math.min(0,n));case oh:return e.height-e.focus.y+e.nodeSpacing/2+t;case Lc:return Math.max(e.height,e.focus.y+e.nodeSpacing/2+t);default:return t}}function Gy(e,t,n){switch(e){case zd:t/=2,n/=2;break;case Yf:t/=2,n/=2;break;case fc:n=t=0;break;case dc:break;default:Lt("Unhandled alignment value "+e.toString())}return new Ue(t,n)}function mf(e,t,n,r,i,o){t=Gy(t,n,r),Vf(e,t.x,t.y,i,o)}function Vf(e,t,n,r,i){if(t!==0||n!==0)for(e=e.children;r<=i;r++){var o=e[r].S;o.x+=t,o.y+=n}}function Km(e,t,n,r){var i=t.parent;switch(e.ud){case hc:for(e=t.sourceEdges;e.next();)t=e.value,t.fromVertex===i&&t.relativePoint.h(n,r);break;case Kf:for(e=t.destinationEdges;e.next();)t=e.value,t.toVertex===i&&t.relativePoint.h(n,r);break;default:Lt("Unhandled path value "+e.ud.toString())}}function Ym(e,t,n){for(var r=0;rX.length||de===null||2>de.length))for(i=n=0;nO&&o.yo.y&&Ot.length||n===null||2>n.length)r=null;else{for(D=Za(e,t.length+n.length),r=o=w=0;ow;)O=n[o++],D[r++].h(O.x+i,O.y);for(n=Za(e,r),w=0;wX.length||o===null||2>o.length)i=null;else{for(D=Za(e,X.length+o.length),i=O=n=0;no;)w=X[n++],D[i++].h(w.x,w.y);for(o=Za(e,i),n=0;nX.length||de===null||2>de.length))for(i=n=0;nw&&o.xo.x&&wt.length||n===null||2>n.length)r=null;else{for(D=Za(e,t.length+n.length),r=o=w=0;ow;)O=n[o++],D[r++].h(O.x,O.y+i);for(n=Za(e,r),w=0;wX.length||o===null||2>o.length)i=null;else{for(D=Za(e,X.length+o.length),i=O=n=0;no;)w=X[n++],D[i++].h(w.x,w.y);for(o=Za(e,i),n=0;n=e?0:135>=e?90:225>=e?180:315>=e?270:0}Lr.prototype.computeLayerSpacing=function(e){var t=bu(e);t=t===90||t===270;var n=e.layerSpacing;if(0=e&&(this.W.nodeIndentPastParent=e,this.C())}},nodeSpacing:{get:function(){return this.W.nodeSpacing},set:function(e){this.W.nodeSpacing!==e&&(this.W.nodeSpacing=e,this.C())}},layerSpacing:{get:function(){return this.W.layerSpacing},set:function(e){this.W.layerSpacing!==e&&(this.W.layerSpacing=e,this.C())}},layerSpacingParentOverlap:{get:function(){return this.W.layerSpacingParentOverlap},set:function(e){this.W.layerSpacingParentOverlap!==e&&0<=e&&1>=e&&(this.W.layerSpacingParentOverlap=e,this.C())}},compaction:{get:function(){return this.W.compaction},set:function(e){this.W.compaction===e||e!==Xm&&e!==sg||(this.W.compaction=e,this.C())}},breadthLimit:{get:function(){return this.W.breadthLimit},set:function(e){this.W.breadthLimit!==e&&0<=e&&(this.W.breadthLimit=e,this.C())}},rowSpacing:{get:function(){return this.W.rowSpacing},set:function(e){this.W.rowSpacing!==e&&(this.W.rowSpacing=e,this.C())}},rowIndent:{get:function(){return this.W.rowIndent},set:function(e){this.W.rowIndent!==e&&0<=e&&(this.W.rowIndent=e,this.C())}},commentSpacing:{get:function(){return this.W.commentSpacing},set:function(e){this.W.commentSpacing!==e&&(this.W.commentSpacing=e,this.C())}},commentMargin:{get:function(){return this.W.commentMargin},set:function(e){this.W.commentMargin!==e&&(this.W.commentMargin=e,this.C())}},setsPortSpot:{get:function(){return this.W.setsPortSpot},set:function(e){this.W.setsPortSpot!==e&&(this.W.setsPortSpot=e,this.C())}},portSpot:{get:function(){return this.W.portSpot},set:function(e){this.W.portSpot.D(e)||(this.W.portSpot=e,this.C())}},setsChildPortSpot:{get:function(){return this.W.setsChildPortSpot},set:function(e){this.W.setsChildPortSpot!==e&&(this.W.setsChildPortSpot=e,this.C())}},childPortSpot:{get:function(){return this.W.childPortSpot},set:function(e){this.W.childPortSpot.D(e)||(this.W.childPortSpot=e,this.C())}},alternateSorting:{get:function(){return this.Y.sorting},set:function(e){this.Y.sorting===e||e!==Hd&&e!==rg&&e!==ig&&!og||(this.Y.sorting=e,this.C())}},alternateComparer:{get:function(){return this.Y.comparer},set:function(e){this.Y.comparer!==e&&(this.Y.comparer=e,this.C())}},alternateAngle:{get:function(){return this.Y.angle},set:function(e){this.Y.angle===e||e!==0&&e!==90&&e!==180&&e!==270||(this.Y.angle=e,this.C())}},alternateAlignment:{get:function(){return this.Y.alignment},set:function(e){this.Y.alignment!==e&&(this.Y.alignment=e,this.C())}},alternateNodeIndent:{get:function(){return this.Y.nodeIndent},set:function(e){this.Y.nodeIndent!==e&&0<=e&&(this.Y.nodeIndent=e,this.C())}},alternateNodeIndentPastParent:{get:function(){return this.Y.nodeIndentPastParent},set:function(e){this.Y.nodeIndentPastParent!==e&&0<=e&&1>=e&&(this.Y.nodeIndentPastParent=e,this.C())}},alternateNodeSpacing:{get:function(){return this.Y.nodeSpacing},set:function(e){this.Y.nodeSpacing!==e&&(this.Y.nodeSpacing=e,this.C())}},alternateLayerSpacing:{get:function(){return this.Y.layerSpacing},set:function(e){this.Y.layerSpacing!==e&&(this.Y.layerSpacing=e,this.C())}},alternateLayerSpacingParentOverlap:{get:function(){return this.Y.layerSpacingParentOverlap},set:function(e){this.Y.layerSpacingParentOverlap!==e&&0<=e&&1>=e&&(this.Y.layerSpacingParentOverlap=e,this.C())}},alternateCompaction:{get:function(){return this.Y.compaction},set:function(e){this.Y.compaction===e||e!==Xm&&e!==sg||(this.Y.compaction=e,this.C())}},alternateBreadthLimit:{get:function(){return this.Y.breadthLimit},set:function(e){this.Y.breadthLimit!==e&&0<=e&&(this.Y.breadthLimit=e,this.C())}},alternateRowSpacing:{get:function(){return this.Y.rowSpacing},set:function(e){this.Y.rowSpacing!==e&&(this.Y.rowSpacing=e,this.C())}},alternateRowIndent:{get:function(){return this.Y.rowIndent},set:function(e){this.Y.rowIndent!==e&&0<=e&&(this.Y.rowIndent=e,this.C())}},alternateCommentSpacing:{get:function(){return this.Y.commentSpacing},set:function(e){this.Y.commentSpacing!==e&&(this.Y.commentSpacing=e,this.C())}},alternateCommentMargin:{get:function(){return this.Y.commentMargin},set:function(e){this.Y.commentMargin!==e&&(this.Y.commentMargin=e,this.C())}},alternateSetsPortSpot:{get:function(){return this.Y.setsPortSpot},set:function(e){this.Y.setsPortSpot!==e&&(this.Y.setsPortSpot=e,this.C())}},alternatePortSpot:{get:function(){return this.Y.portSpot},set:function(e){this.Y.portSpot.D(e)||(this.Y.portSpot=e,this.C())}},alternateSetsChildPortSpot:{get:function(){return this.Y.setsChildPortSpot},set:function(e){this.Y.setsChildPortSpot!==e&&(this.Y.setsChildPortSpot=e,this.C())}},alternateChildPortSpot:{get:function(){return this.Y.childPortSpot},set:function(e){this.Y.childPortSpot.D(e)||(this.Y.childPortSpot=e,this.C())}}});var $m=new hn(Lr,"PathDefault",-1),hc=new hn(Lr,"PathDestination",0),Kf=new hn(Lr,"PathSource",1),Hd=new hn(Lr,"SortingForwards",10),rg=new hn(Lr,"SortingReverse",11),ig=new hn(Lr,"SortingAscending",12),og=new hn(Lr,"SortingDescending",13),zd=new hn(Lr,"AlignmentCenterSubtrees",20),Yf=new hn(Lr,"AlignmentCenterChildren",21),fc=new hn(Lr,"AlignmentStart",22),dc=new hn(Lr,"AlignmentEnd",23),ih=new hn(Lr,"AlignmentBus",24),pc=new hn(Lr,"AlignmentBusBranching",25),oh=new hn(Lr,"AlignmentTopLeftBus",26),Lc=new hn(Lr,"AlignmentBottomRightBus",27),Xm=new hn(Lr,"CompactionNone",30),sg=new hn(Lr,"CompactionBlock",31),Zm=new hn(Lr,"StyleLayered",40),Vy=new hn(Lr,"StyleLastParents",41),Ky=new hn(Lr,"StyleAlternating",42),Yy=new hn(Lr,"StyleRootOnly",43),Jm=new hn(Lr,"ArrangementVertical",50),$y=new hn(Lr,"ArrangementHorizontal",51),Qm=new hn(Lr,"ArrangementFixedRoots",52),Xy=new hn(Lr,"LayerIndividual",60),Zy=new hn(Lr,"LayerSiblings",61),qm=new hn(Lr,"LayerUniform",62);Lr.className="TreeLayout",Lr.PathDefault=$m,Lr.PathDestination=hc,Lr.PathSource=Kf,Lr.SortingForwards=Hd,Lr.SortingReverse=rg,Lr.SortingAscending=ig,Lr.SortingDescending=og,Lr.AlignmentCenterSubtrees=zd,Lr.AlignmentCenterChildren=Yf,Lr.AlignmentStart=fc,Lr.AlignmentEnd=dc,Lr.AlignmentBus=ih,Lr.AlignmentBusBranching=pc,Lr.AlignmentTopLeftBus=oh,Lr.AlignmentBottomRightBus=Lc,Lr.CompactionNone=Xm,Lr.CompactionBlock=sg,Lr.StyleLayered=Zm,Lr.StyleLastParents=Vy,Lr.StyleAlternating=Ky,Lr.StyleRootOnly=Yy,Lr.ArrangementVertical=Jm,Lr.ArrangementHorizontal=$y,Lr.ArrangementFixedRoots=Qm,Lr.LayerIndividual=Xy,Lr.LayerSiblings=Zy,Lr.LayerUniform=qm;function $f(e){Ki.call(this,e)}Tn($f,Ki),$f.prototype.createVertex=function(){return new tu(this)},$f.prototype.createEdge=function(){return new Gd(this)},$f.className="TreeNetwork";function tu(e){xs.call(this,e),this.V=!1,this.hb=null,this.u=[],this.nb=this.Ha=this.F=this.ia=0,this.td=null,this.S=new Ue(0,0),this.Da=new Yt(0,0),this.la=new Ue(0,0),this.im=this.hm=this.qA=!1,this.kp=this.Yo=null,this.nd=Hd,this.hd=my,this.Kb=0,this.Jb=Yf,this.Vq=this.Uq=0,this.Wq=20,this.ie=50,this.Aq=0,this.Hp=sg,this.Ap=0,this.nr=25,this.Gp=this.mr=10,this.Fp=20,this.xr=!0,this.dr=is,this.wr=!0,this.Dp=is}Tn(tu,xs),tu.prototype.copyInheritedPropertiesFrom=function(e){e!==null&&(this.nd=e.sorting,this.hd=e.comparer,this.Kb=e.angle,this.Jb=e.alignment,this.Uq=e.nodeIndent,this.Vq=e.nodeIndentPastParent,this.Wq=e.nodeSpacing,this.ie=e.layerSpacing,this.Aq=e.layerSpacingParentOverlap,this.Hp=e.compaction,this.Ap=e.breadthLimit,this.nr=e.rowSpacing,this.mr=e.rowIndent,this.Gp=e.commentSpacing,this.Fp=e.commentMargin,this.xr=e.setsPortSpot,this.dr=e.portSpot,this.wr=e.setsChildPortSpot,this.Dp=e.childPortSpot)},kn.Object.defineProperties(tu.prototype,{initialized:{get:function(){return this.V},set:function(e){this.V!==e&&(this.V=e)}},parent:{get:function(){return this.hb},set:function(e){this.hb!==e&&(this.hb=e)}},children:{get:function(){return this.u},set:function(e){if(this.u!==e){if(e!==null)for(var t=e.length,n=0;nde.y+n.rowIndent&&(o=Math.min(o,Math.max(X.y,o-t.computeNodeIndent(n))))):n.alignment===fc?(o=r.top+i.y,i.y===0&&X.yde.x+n.rowIndent&&(o=Math.min(o,Math.max(X.x,o-t.computeNodeIndent(n))))):n.alignment===fc?(o=r.left+i.x,i.x===0&&X.xde.y+n.rowIndent&&(o=Math.min(o,Math.max(X.y,o-t.computeNodeIndent(n))))):n.alignment===fc?(o=r.top+i.y,i.y===0&&X.yde.x+n.rowIndent&&(o=Math.min(o,Math.max(X.x,o-t.computeNodeIndent(n))))):n.alignment===fc?(o=r.left+i.x,i.x===0&&X.x=97&&B<=122||B>=65&&B<=90}},7961:function(Ie,Z,b){"use strict";var B=b(46260),Y=b(46195);Ie.exports=s;function s(E){return B(E)||Y(E)}},46195:function(Ie){"use strict";Ie.exports=Z;function Z(b){var B=typeof b=="string"?b.charCodeAt(0):b;return B>=48&&B<=57}},79480:function(Ie){"use strict";Ie.exports=Z;function Z(b){var B=typeof b=="string"?b.charCodeAt(0):b;return B>=97&&B<=102||B>=65&&B<=70||B>=48&&B<=57}},19575:function(Ie,Z,b){var B,Y;(function(s,E){Ie.exports=E(s)})(typeof self!="undefined"?self:typeof window!="undefined"?window:typeof b.g!="undefined"?b.g:this,function(s){"use strict";s=s||{};var E=s.Base64,I="2.6.4",u="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",d=function(ae){for(var he={},ce=0,we=ae.length;ce>>6)+g(128|he&63):g(224|he>>>12&15)+g(128|he>>>6&63)+g(128|he&63)}else{var he=65536+(ae.charCodeAt(0)-55296)*1024+(ae.charCodeAt(1)-56320);return g(240|he>>>18&7)+g(128|he>>>12&63)+g(128|he>>>6&63)+g(128|he&63)}},S=/[\uD800-\uDBFF][\uDC00-\uDFFFF]|[^\x00-\x7F]/g,v=function(ae){return ae.replace(S,y)},c=function(ae){var he=[0,2,1][ae.length%3],ce=ae.charCodeAt(0)<<16|(ae.length>1?ae.charCodeAt(1):0)<<8|(ae.length>2?ae.charCodeAt(2):0),we=[u.charAt(ce>>>18),u.charAt(ce>>>12&63),he>=2?"=":u.charAt(ce>>>6&63),he>=1?"=":u.charAt(ce&63)];return we.join("")},h=s.btoa&&typeof s.btoa=="function"?function(ae){return s.btoa(ae)}:function(ae){if(ae.match(/[^\x00-\xFF]/))throw new RangeError("The string contains invalid characters.");return ae.replace(/[\s\S]{1,3}/g,c)},m=function(ae){return h(v(String(ae)))},x=function(ae){return ae.replace(/[+\/]/g,function(he){return he=="+"?"-":"_"}).replace(/=/g,"")},T=function(ae,he){return he?x(m(ae)):m(ae)},_=function(ae){return T(ae,!0)},R;s.Uint8Array&&(R=function(ae,he){for(var ce="",we=0,me=ae.length;we>>18)+u.charAt(le>>>12&63)+(typeof ee!="undefined"?u.charAt(le>>>6&63):"=")+(typeof se!="undefined"?u.charAt(le&63):"=")}return he?x(ce):ce});var A=/[\xC0-\xDF][\x80-\xBF]|[\xE0-\xEF][\x80-\xBF]{2}|[\xF0-\xF7][\x80-\xBF]{3}/g,N=function(ae){switch(ae.length){case 4:var he=(7&ae.charCodeAt(0))<<18|(63&ae.charCodeAt(1))<<12|(63&ae.charCodeAt(2))<<6|63&ae.charCodeAt(3),ce=he-65536;return g((ce>>>10)+55296)+g((ce&1023)+56320);case 3:return g((15&ae.charCodeAt(0))<<12|(63&ae.charCodeAt(1))<<6|63&ae.charCodeAt(2));default:return g((31&ae.charCodeAt(0))<<6|63&ae.charCodeAt(1))}},L=function(ae){return ae.replace(A,N)},M=function(ae){var he=ae.length,ce=he%4,we=(he>0?d[ae.charAt(0)]<<18:0)|(he>1?d[ae.charAt(1)]<<12:0)|(he>2?d[ae.charAt(2)]<<6:0)|(he>3?d[ae.charAt(3)]:0),me=[g(we>>>16),g(we>>>8&255),g(we&255)];return me.length-=[0,0,2,1][ce],me.join("")},F=s.atob&&typeof s.atob=="function"?function(ae){return s.atob(ae)}:function(ae){return ae.replace(/\S{1,4}/g,M)},H=function(ae){return F(String(ae).replace(/[^A-Za-z0-9\+\/]/g,""))},P=function(ae){return L(F(ae))},V=function(ae){return String(ae).replace(/[-_]/g,function(he){return he=="-"?"+":"/"}).replace(/[^A-Za-z0-9\+\/]/g,"")},G=function(ae){return P(V(ae))},Q;s.Uint8Array&&(Q=function(ae){return Uint8Array.from(H(V(ae)),function(he){return he.charCodeAt(0)})});var ne=function(){var ae=s.Base64;return s.Base64=E,ae};if(s.Base64={VERSION:I,atob:H,btoa:h,fromBase64:G,toBase64:T,utob:v,encode:T,encodeURI:_,btou:L,decode:G,noConflict:ne,fromUint8Array:R,toUint8Array:Q},typeof Object.defineProperty=="function"){var ue=function(ae){return{value:ae,enumerable:!1,writable:!0,configurable:!0}};s.Base64.extendString=function(){Object.defineProperty(String.prototype,"fromBase64",ue(function(){return G(this)})),Object.defineProperty(String.prototype,"toBase64",ue(function(ae){return T(this,ae)})),Object.defineProperty(String.prototype,"toBase64URI",ue(function(){return T(this,!0)}))}}return s.Meteor&&(Base64=s.Base64),Ie.exports?Ie.exports.Base64=s.Base64:(B=[],Y=function(){return s.Base64}.apply(Z,B),Y!==void 0&&(Ie.exports=Y)),{Base64:s.Base64}})},15979:function(Ie,Z,b){"use strict";b.d(Z,{hP:function(){return pe}});var B=function(fe,z){return(B=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(J,be){J.__proto__=be}||function(J,be){for(var _e in be)Object.prototype.hasOwnProperty.call(be,_e)&&(J[_e]=be[_e])})(fe,z)};function Y(fe,z){function J(){this.constructor=fe}B(fe,z),fe.prototype=z===null?Object.create(z):(J.prototype=z.prototype,new J)}function s(fe,z,J,be){return new(J||(J=Promise))(function(_e,oe){function ie(ze){try{Ne(be.next(ze))}catch(Ve){oe(Ve)}}function ve(ze){try{Ne(be.throw(ze))}catch(Ve){oe(Ve)}}function Ne(ze){var Ve;ze.done?_e(ze.value):(Ve=ze.value,Ve instanceof J?Ve:new J(function(yt){yt(Ve)})).then(ie,ve)}Ne((be=be.apply(fe,z||[])).next())})}function E(fe,z){var J,be,_e,oe,ie={label:0,sent:function(){if(1&_e[0])throw _e[1];return _e[1]},trys:[],ops:[]};return oe={next:ve(0),throw:ve(1),return:ve(2)},typeof Symbol=="function"&&(oe[Symbol.iterator]=function(){return this}),oe;function ve(Ne){return function(ze){return function(Ve){if(J)throw new TypeError("Generator is already executing.");for(;ie;)try{if(J=1,be&&(_e=2&Ve[0]?be.return:Ve[0]?be.throw||((_e=be.return)&&_e.call(be),0):be.next)&&!(_e=_e.call(be,Ve[1])).done)return _e;switch(be=0,_e&&(Ve=[2&Ve[0],_e.value]),Ve[0]){case 0:case 1:_e=Ve;break;case 4:return ie.label++,{value:Ve[1],done:!1};case 5:ie.label++,be=Ve[1],Ve=[0];continue;case 7:Ve=ie.ops.pop(),ie.trys.pop();continue;default:if(_e=ie.trys,!((_e=_e.length>0&&_e[_e.length-1])||Ve[0]!==6&&Ve[0]!==2)){ie=0;continue}if(Ve[0]===3&&(!_e||Ve[1]>_e[0]&&Ve[1]<_e[3])){ie.label=Ve[1];break}if(Ve[0]===6&&ie.label<_e[1]){ie.label=_e[1],_e=Ve;break}if(_e&&ie.label<_e[2]){ie.label=_e[2],ie.ops.push(Ve);break}_e[2]&&ie.ops.pop(),ie.trys.pop();continue}Ve=z.call(fe,ie)}catch(yt){Ve=[6,yt],be=0}finally{J=_e=0}if(5&Ve[0])throw Ve[1];return{value:Ve[0]?Ve[1]:void 0,done:!0}}([Ne,ze])}}}function I(){for(var fe=0,z=0,J=arguments.length;z',"select"),this.addActionButton(be,'',"delete"),this.uiStyleSettings.clearButtonVisible&&this.addActionButton(be,'',"clear"),this.uiStyleSettings.undoButtonVisible&&this.addActionButton(be,'',"undo"),this.uiStyleSettings.redoButtonVisible&&this.addActionButton(be,'',"redo"),this.uiStyleSettings.zoomButtonVisible&&this.addActionButton(be,'',"zoom"),this.uiStyleSettings.zoomButtonVisible&&this.uiStyleSettings.zoomOutButtonVisible&&this.addActionButton(be,'',"zoom-out"),this.uiStyleSettings.notesButtonVisible&&this.addActionButton(be,'',"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(oe){var ie=document.createElement("div");ie.className=""+J.toolbarButtonStyleClass.name,ie.setAttribute("data-type-name",oe.typeName),ie.innerHTML=oe.icon,ie.addEventListener("click",function(){J.markerToolbarButtonClicked(ie,oe)}),J.buttons.push(ie),J.markerButtons.push(ie)}),this.overflowButton=document.createElement("div"),this.overflowButton.className=this.toolbarButtonStyleClass.name+" "+(this.uiStyleSettings.toolbarButtonStyleColorsClassName?this.uiStyleSettings.toolbarButtonStyleColorsClassName:this.toolbarButtonStyleColorsClass.name),this.overflowButton.innerHTML='',this.overflowButton.addEventListener("click",this.overflowButtonClicked),this.markerButtonBlock.appendChild(this.overflowButton));var _e=document.createElement("div");_e.className=this.toolbarBlockStyleClass.name,_e.style.whiteSpace="nowrap",_e.style.display=this.uiStyleSettings.resultButtonBlockVisible!==!1?"":"none",this.uiContainer.appendChild(_e),this.addActionButton(_e,'',"render"),this.addActionButton(_e,'',"close"),this.markerjsContainer.appendChild(this.uiContainer),this.setSelectMode(),this.setCurrentMarker(),this.adjustLayout()},fe.prototype.addButtonClickListener=function(z){this.buttonClickListeners.push(z)},fe.prototype.removeButtonClickListener=function(z){this.buttonClickListeners.indexOf(z)>-1&&this.buttonClickListeners.splice(this.buttonClickListeners.indexOf(z),1)},fe.prototype.setSelectMode=function(){this.resetButtonStyles(),this.setActiveButton(this.buttons[0])},fe.prototype.adjustLayout=function(){if(this.markerButtons&&this.markerButtons.length>0){var z=Math.floor(this.markerButtonBlock.clientWidth/this.uiStyleSettings.toolbarHeight)-1;this.markerButtonBlock.innerHTML="",this.markerButtonOverflowBlock.innerHTML="";for(var J=0;J0&&this.buttonClickListeners.forEach(function(be){return be("marker",J)}),this.markerButtonOverflowBlock.style.display="none"},fe.prototype.actionToolbarButtonClicked=function(z,J){this.buttonClickListeners&&this.buttonClickListeners.length>0&&this.buttonClickListeners.forEach(function(be){return be("action",J)}),this.markerButtonOverflowBlock.style.display="none",this.setActiveButton(this.buttons[0])},fe.prototype.setActiveButton=function(z){this.resetButtonStyles(),z.className=z.className.replace(this.uiStyleSettings.toolbarButtonStyleColorsClassName?this.uiStyleSettings.toolbarButtonStyleColorsClassName:this.toolbarButtonStyleColorsClass.name,"").trim(),z.className+=" "+(this.uiStyleSettings.toolbarActiveButtonStyleColorsClassName?this.uiStyleSettings.toolbarActiveButtonStyleColorsClassName:this.toolbarActiveButtonStyleColorsClass.name)},fe.prototype.setActiveMarkerButton=function(z){var J=this.markerButtons.find(function(be){return be.getAttribute("data-type-name")===z});J&&this.setActiveButton(J)},fe.prototype.setCurrentMarker=function(z){var J=this;this.currentMarker=z,this.buttons.filter(function(be){return/delete|notes/.test(be.getAttribute("data-action"))}).forEach(function(be){J.currentMarker===void 0?(be.style.fillOpacity="0.4",be.style.pointerEvents="none"):(be.style.fillOpacity="1",be.style.pointerEvents="all")})},fe}(),m=function(){function fe(z,J,be,_e){this.panels=[],this.panelButtons=[],this.markerjsContainer=z,this.displayMode=J,this.uiStyleSettings=be,this.styles=_e,this.panelButtonClick=this.panelButtonClick.bind(this),this.addStyles()}return fe.prototype.addStyles=function(){var z;this.toolboxStyleClass=this.styles.addClass(new c("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 c("toolbox_colors",` color: `+this.uiStyleSettings.toolboxColor+`; `));var J=this.uiStyleSettings.toolbarHeight/4;this.toolboxButtonRowStyleClass=this.styles.addClass(new c("toolbox-button-row",` display: flex; cursor: default; box-sizing: content-box; `)),this.toolboxButtonRowStyleColorsClass=this.styles.addClass(new c("toolbox-button-row_colors",` background-color: `+this.uiStyleSettings.toolbarBackgroundColor+`; `)),this.toolboxPanelRowStyleClass=this.styles.addClass(new c("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 c("toolbox-panel-row_colors",` background-color: `+((z=this.uiStyleSettings.toolboxBackgroundColor)!==null&&z!==void 0?z:this.uiStyleSettings.toolbarBackgroundHoverColor)+`; `)),this.toolboxButtonStyleClass=this.styles.addClass(new c("toolbox_button",` display: inline-block; width: `+(this.uiStyleSettings.toolbarHeight-2*J)+`px; height: `+(this.uiStyleSettings.toolbarHeight-2*J)+`px; padding: `+J+`px; box-sizing: content-box; `)),this.toolboxButtonStyleColorsClass=this.styles.addClass(new c("toolbox-button_colors",` fill: `+this.uiStyleSettings.toolbarColor+`; `)),this.toolboxActiveButtonStyleColorsClass=this.styles.addClass(new c("toolbox-active-button_colors",` background-color: `+this.uiStyleSettings.toolbarBackgroundHoverColor+`; fill: `+this.uiStyleSettings.toolbarColor+`; `)),this.styles.addRule(new v("."+this.toolboxButtonStyleColorsClass.name+":hover",` background-color: `+this.uiStyleSettings.toolbarBackgroundHoverColor+` `)),this.styles.addRule(new v("."+this.toolboxButtonStyleClass.name+" svg",` height: `+this.uiStyleSettings.toolbarHeight/2+`px; `))},fe.prototype.show=function(z){var J;this.uiContainer=document.createElement("div"),this.uiContainer.style.visibility=z,this.uiContainer.className=this.toolboxStyleClass.name+" "+((J=this.uiStyleSettings.toolboxStyleColorsClassName)!==null&&J!==void 0?J:this.toolboxStyleColorsClass.name),this.markerjsContainer.appendChild(this.uiContainer)},fe.prototype.setPanelButtons=function(z){var J,be,_e=this;this.panels=z,this.uiContainer!==void 0&&(this.uiContainer.innerHTML="",this.panelRow=document.createElement("div"),this.panelRow.className=this.toolboxPanelRowStyleClass.name+" "+((J=this.uiStyleSettings.toolboxPanelRowStyleColorsClassName)!==null&&J!==void 0?J:this.toolboxPanelRowStyleColorsClass.name),this.uiContainer.appendChild(this.panelRow),this.buttonRow=document.createElement("div"),this.buttonRow.className=this.toolboxButtonRowStyleClass.name+" "+((be=this.uiStyleSettings.toolboxButtonRowStyleColorsClassName)!==null&&be!==void 0?be:this.toolboxButtonRowStyleColorsClass.name)+" ",this.uiContainer.appendChild(this.buttonRow),this.panelButtons.splice(0),this.panels.forEach(function(oe){var ie;oe.uiStyleSettings=_e.uiStyleSettings;var ve=document.createElement("div");ve.className=_e.toolboxButtonStyleClass.name+" "+((ie=_e.uiStyleSettings.toolboxButtonStyleColorsClassName)!==null&&ie!==void 0?ie:_e.toolboxButtonStyleColorsClass.name),ve.innerHTML=oe.icon,ve.title=oe.title,ve.addEventListener("click",function(){_e.panelButtonClick(oe)}),_e.panelButtons.push(ve),_e.buttonRow.appendChild(ve)}),this.displayMode==="inline"?this.panelRow.style.display="none":this.panelRow.style.visibility="hidden")},fe.prototype.panelButtonClick=function(z){var J=this,be=-1;if(z!==this.activePanel){be=this.panels.indexOf(z),this.panelRow.innerHTML="";var _e=z.getUi();_e.style.margin=this.uiStyleSettings.toolbarHeight/4+"px",this.panelRow.appendChild(_e),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=z}else this.activePanel=void 0,this.panelRow.className=this.panelRow.className.replace(this.styles.fadeInAnimationClassName,""),this.panelRow.className+=" "+this.styles.fadeOutAnimationClassName,setTimeout(function(){J.displayMode==="inline"?J.panelRow.style.display="none":J.panelRow.style.visibility="hidden"},200);this.panelButtons.forEach(function(oe,ie){var ve,Ne;oe.className=J.toolboxButtonStyleClass.name+" "+(ie===be?""+((ve=J.uiStyleSettings.toolboxActiveButtonStyleColorsClassName)!==null&&ve!==void 0?ve:J.toolboxActiveButtonStyleColorsClass.name):""+((Ne=J.uiStyleSettings.toolboxButtonStyleColorsClassName)!==null&&Ne!==void 0?Ne:J.toolboxButtonStyleColorsClass.name))})},fe}(),x=function(fe,z){this.title=fe,this.icon=z},T=function(fe){function z(J,be,_e,oe){var ie=fe.call(this,J,oe||'')||this;return ie.colors=[],ie.addTransparent=!1,ie.colorBoxes=[],ie.colors=be,ie.currentColor=_e,ie.setCurrentColor=ie.setCurrentColor.bind(ie),ie.getColorBox=ie.getColorBox.bind(ie),ie}return Y(z,fe),z.prototype.getUi=function(){var J=this,be=document.createElement("div");return be.style.overflow="hidden",be.style.whiteSpace="nowrap",this.colors.forEach(function(_e){var oe=J.getColorBox(_e);be.appendChild(oe),J.colorBoxes.push(oe)}),be},z.prototype.getColorBox=function(J){var be=this,_e=this.uiStyleSettings.toolbarHeight/4,oe=this.uiStyleSettings.toolbarHeight-_e,ie=document.createElement("div");ie.style.display="inline-block",ie.style.boxSizing="content-box",ie.style.width=oe-2+"px",ie.style.height=oe-2+"px",ie.style.padding="1px",ie.style.marginRight="2px",ie.style.marginBottom="2px",ie.style.borderWidth="2px",ie.style.borderStyle="solid",ie.style.borderRadius=(oe+2)/2+"px",ie.style.borderColor=J===this.currentColor?this.uiStyleSettings.toolboxAccentColor:"transparent",ie.addEventListener("click",function(){be.setCurrentColor(J,ie)});var ve=document.createElement("div");return ve.style.display="inline-block",ve.style.width=oe-2+"px",ve.style.height=oe-2+"px",ve.style.backgroundColor=J,ve.style.borderRadius=oe/2+"px",J==="transparent"&&(ve.style.fill=this.uiStyleSettings.toolboxAccentColor,ve.innerHTML=` `),ie.appendChild(ve),ie},z.prototype.setCurrentColor=function(J,be){var _e=this;this.currentColor=J,this.colorBoxes.forEach(function(oe){oe.style.borderColor=oe===be?_e.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onColorChanged&&this.onColorChanged(J)},z}(x),_=function(){function fe(z,J,be){this._state="new",this._isSelected=!1,this._container=z,this._overlayContainer=J,this.globalSettings=be,this.stateChanged=this.stateChanged.bind(this),this.colorChanged=this.colorChanged.bind(this),this.fillColorChanged=this.fillColorChanged.bind(this)}return Object.defineProperty(fe.prototype,"typeName",{get:function(){return Object.getPrototypeOf(this).constructor.typeName},enumerable:!1,configurable:!0}),Object.defineProperty(fe.prototype,"container",{get:function(){return this._container},enumerable:!1,configurable:!0}),Object.defineProperty(fe.prototype,"overlayContainer",{get:function(){return this._overlayContainer},enumerable:!1,configurable:!0}),Object.defineProperty(fe.prototype,"state",{get:function(){return this._state},enumerable:!1,configurable:!0}),Object.defineProperty(fe.prototype,"toolboxPanels",{get:function(){return[]},enumerable:!1,configurable:!0}),fe.prototype.ownsTarget=function(z){return!1},Object.defineProperty(fe.prototype,"isSelected",{get:function(){return this._isSelected},enumerable:!1,configurable:!0}),fe.prototype.select=function(){this.container.style.cursor="move",this._isSelected=!0,this.manipulationStartState=this.getState()},fe.prototype.deselect=function(){this.container.style.cursor="default",this._isSelected=!1,this.stateChanged()},fe.prototype.pointerDown=function(z,J){},fe.prototype.dblClick=function(z,J){},fe.prototype.manipulate=function(z){},fe.prototype.pointerUp=function(z){this.stateChanged()},fe.prototype.dispose=function(){},fe.prototype.addMarkerVisualToContainer=function(z){this.container.childNodes.length>0?this.container.insertBefore(z,this.container.childNodes[0]):this.container.appendChild(z)},fe.prototype.getState=function(){return{typeName:fe.typeName,state:this.state,notes:this.notes}},fe.prototype.restoreState=function(z){this._state=z.state,this.notes=z.notes},fe.prototype.scale=function(z,J){},fe.prototype.colorChanged=function(z){this.onColorChanged&&this.onColorChanged(z),this.stateChanged()},fe.prototype.fillColorChanged=function(z){this.onFillColorChanged&&this.onFillColorChanged(z),this.stateChanged()},fe.prototype.stateChanged=function(){if(this.onStateChanged&&this.state!=="creating"&&this.state!=="new"){var z=this.getState();this.manipulationStartState!==void 0&&(this.manipulationStartState.state="select"),z.state="select",JSON.stringify(this.manipulationStartState)!=JSON.stringify(z)&&this.onStateChanged(this)}},fe.typeName="MarkerBase",fe}(),R=function(){function fe(){this.findGripByVisual=this.findGripByVisual.bind(this)}return fe.prototype.findGripByVisual=function(z){return this.topLeft.ownsTarget(z)?this.topLeft:this.topCenter.ownsTarget(z)?this.topCenter:this.topRight.ownsTarget(z)?this.topRight:this.centerLeft.ownsTarget(z)?this.centerLeft:this.centerRight.ownsTarget(z)?this.centerRight:this.bottomLeft.ownsTarget(z)?this.bottomLeft:this.bottomCenter.ownsTarget(z)?this.bottomCenter:this.bottomRight.ownsTarget(z)?this.bottomRight:void 0},fe}(),A=function(){function fe(){this.GRIP_SIZE=10,this.visual=u.createGroup(),this.visual.appendChild(u.createCircle(1.5*this.GRIP_SIZE,[["fill","transparent"]])),this.visual.appendChild(u.createCircle(this.GRIP_SIZE,[["fill","#cccccc"],["fill-opacity","0.7"],["stroke","#333333"],["stroke-width","2"],["stroke-opacity","0.7"]]))}return fe.prototype.ownsTarget=function(z){return z===this.visual||z===this.visual.childNodes[0]||z===this.visual.childNodes[1]},fe}(),N=function(){function fe(){}return fe.toITransformMatrix=function(z){return{a:z.a,b:z.b,c:z.c,d:z.d,e:z.e,f:z.f}},fe.toSVGMatrix=function(z,J){return z.a=J.a,z.b=J.b,z.c=J.c,z.d=J.d,z.e=J.e,z.f=J.f,z},fe}(),L=function(fe){function z(J,be,_e){var oe=fe.call(this,J,be,_e)||this;return oe.left=0,oe.top=0,oe.width=0,oe.height=0,oe.defaultSize={x:50,y:20},oe.offsetX=0,oe.offsetY=0,oe.rotationAngle=0,oe.CB_DISTANCE=10,oe._suppressMarkerCreateEvent=!1,oe.container.transform.baseVal.appendItem(u.createTransform()),oe.setupControlBox(),oe}return Y(z,fe),Object.defineProperty(z.prototype,"centerX",{get:function(){return this.left+this.width/2},enumerable:!1,configurable:!0}),Object.defineProperty(z.prototype,"centerY",{get:function(){return this.top+this.height/2},enumerable:!1,configurable:!0}),Object.defineProperty(z.prototype,"visual",{get:function(){return this._visual},set:function(J){this._visual=J;var be=u.createTransform();this._visual.transform.baseVal.appendItem(be)},enumerable:!1,configurable:!0}),z.prototype.ownsTarget=function(J){return!!fe.prototype.ownsTarget.call(this,J)||!!(this.controlGrips.findGripByVisual(J)!==void 0||this.rotatorGrip!==void 0&&this.rotatorGrip.ownsTarget(J))},z.prototype.pointerDown=function(J,be){fe.prototype.pointerDown.call(this,J,be),this.state==="new"&&(this.left=J.x,this.top=J.y),this.manipulationStartLeft=this.left,this.manipulationStartTop=this.top,this.manipulationStartWidth=this.width,this.manipulationStartHeight=this.height;var _e=this.unrotatePoint(J);if(this.manipulationStartX=_e.x,this.manipulationStartY=_e.y,this.offsetX=_e.x-this.left,this.offsetY=_e.y-this.top,this.state!=="new")if(this.select(),this.activeGrip=this.controlGrips.findGripByVisual(be),this.activeGrip!==void 0)this._state="resize";else if(this.rotatorGrip!==void 0&&this.rotatorGrip.ownsTarget(be)){this.activeGrip=this.rotatorGrip;var oe=this.rotatePoint({x:this.centerX,y:this.centerY});this.left=oe.x-this.width/2,this.top=oe.y-this.height/2,this.moveVisual({x:this.left,y:this.top});var ie=this.container.transform.baseVal.getItem(0);ie.setRotate(this.rotationAngle,this.centerX,this.centerY),this.container.transform.baseVal.replaceItem(ie,0),this.adjustControlBox(),this._state="rotate"}else this._state="move"},z.prototype.pointerUp=function(J){var be=this.state;fe.prototype.pointerUp.call(this,J),this.state==="creating"&&this.width<10&&this.height<10?(this.width=this.defaultSize.x,this.height=this.defaultSize.y):this.manipulate(J),this._state="select",be==="creating"&&this.onMarkerCreated&&this._suppressMarkerCreateEvent===!1&&this.onMarkerCreated(this)},z.prototype.moveVisual=function(J){this.visual.style.transform="translate("+J.x+"px, "+J.y+"px)"},z.prototype.manipulate=function(J){var be=this.unrotatePoint(J);this.state==="creating"?this.resize(J):this.state==="move"?(this.left=this.manipulationStartLeft+(be.x-this.manipulationStartLeft)-this.offsetX,this.top=this.manipulationStartTop+(be.y-this.manipulationStartTop)-this.offsetY,this.moveVisual({x:this.left,y:this.top}),this.adjustControlBox()):this.state==="resize"?this.resize(be):this.state==="rotate"&&this.rotate(J)},z.prototype.resize=function(J){var be=this.manipulationStartLeft,_e=this.manipulationStartWidth,oe=this.manipulationStartTop,ie=this.manipulationStartHeight;switch(this.activeGrip){case this.controlGrips.bottomLeft:case this.controlGrips.centerLeft:case this.controlGrips.topLeft:be=this.manipulationStartLeft+J.x-this.manipulationStartX,_e=this.manipulationStartWidth+this.manipulationStartLeft-be;break;case this.controlGrips.bottomRight:case this.controlGrips.centerRight:case this.controlGrips.topRight:case void 0:_e=this.manipulationStartWidth+J.x-this.manipulationStartX}switch(this.activeGrip){case this.controlGrips.topCenter:case this.controlGrips.topLeft:case this.controlGrips.topRight:oe=this.manipulationStartTop+J.y-this.manipulationStartY,ie=this.manipulationStartHeight+this.manipulationStartTop-oe;break;case this.controlGrips.bottomCenter:case this.controlGrips.bottomLeft:case this.controlGrips.bottomRight:case void 0:ie=this.manipulationStartHeight+J.y-this.manipulationStartY}_e>=0?(this.left=be,this.width=_e):(this.left=be+_e,this.width=-_e),ie>=0?(this.top=oe,this.height=ie):(this.top=oe+ie,this.height=-ie),this.setSize()},z.prototype.setSize=function(){this.moveVisual({x:this.left,y:this.top}),this.adjustControlBox()},z.prototype.rotate=function(J){if(Math.abs(J.x-this.centerX)>.1){var be=Math.sign(J.x-this.centerX);this.rotationAngle=180*Math.atan((J.y-this.centerY)/(J.x-this.centerX))/Math.PI+90*be,this.applyRotation()}},z.prototype.applyRotation=function(){var J=this.container.transform.baseVal.getItem(0);J.setRotate(this.rotationAngle,this.centerX,this.centerY),this.container.transform.baseVal.replaceItem(J,0)},z.prototype.rotatePoint=function(J){if(this.rotationAngle===0)return J;var be=this.container.getCTM(),_e=u.createPoint(J.x,J.y);return{x:(_e=_e.matrixTransform(be)).x,y:_e.y}},z.prototype.unrotatePoint=function(J){if(this.rotationAngle===0)return J;var be=this.container.getCTM();be=be.inverse();var _e=u.createPoint(J.x,J.y);return{x:(_e=_e.matrixTransform(be)).x,y:_e.y}},z.prototype.select=function(){fe.prototype.select.call(this),this.adjustControlBox(),this.controlBox.style.display=""},z.prototype.deselect=function(){fe.prototype.deselect.call(this),this.controlBox.style.display="none"},z.prototype.setupControlBox=function(){this.controlBox=u.createGroup();var J=u.createTransform();J.setTranslate(-this.CB_DISTANCE/2,-this.CB_DISTANCE/2),this.controlBox.transform.baseVal.appendItem(J),this.container.appendChild(this.controlBox),this.controlRect=u.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=u.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 R,this.addControlGrips(),this.controlBox.style.display="none"},z.prototype.adjustControlBox=function(){var J=this.controlBox.transform.baseVal.getItem(0);J.setTranslate(this.left-this.CB_DISTANCE/2,this.top-this.CB_DISTANCE/2),this.controlBox.transform.baseVal.replaceItem(J,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()},z.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()},z.prototype.createGrip=function(){var J=new A;return J.visual.transform.baseVal.appendItem(u.createTransform()),this.controlBox.appendChild(J.visual),J},z.prototype.positionGrips=function(){var J=this.controlGrips.topLeft.GRIP_SIZE,be=-J/2,_e=be,oe=(this.width+this.CB_DISTANCE)/2-J/2,ie=(this.height+this.CB_DISTANCE)/2-J/2,ve=this.height+this.CB_DISTANCE-J/2,Ne=this.width+this.CB_DISTANCE-J/2;this.positionGrip(this.controlGrips.topLeft.visual,be,_e),this.positionGrip(this.controlGrips.topCenter.visual,oe,_e),this.positionGrip(this.controlGrips.topRight.visual,Ne,_e),this.positionGrip(this.controlGrips.centerLeft.visual,be,ie),this.positionGrip(this.controlGrips.centerRight.visual,Ne,ie),this.positionGrip(this.controlGrips.bottomLeft.visual,be,ve),this.positionGrip(this.controlGrips.bottomCenter.visual,oe,ve),this.positionGrip(this.controlGrips.bottomRight.visual,Ne,ve),this.rotatorGrip!==void 0&&this.positionGrip(this.rotatorGrip.visual,oe,_e-3*this.CB_DISTANCE)},z.prototype.positionGrip=function(J,be,_e){var oe=J.transform.baseVal.getItem(0);oe.setTranslate(be,_e),J.transform.baseVal.replaceItem(oe,0)},z.prototype.hideControlBox=function(){this.controlBox.style.display="none"},z.prototype.showControlBox=function(){this.controlBox.style.display=""},z.prototype.getState=function(){return Object.assign({left:this.left,top:this.top,width:this.width,height:this.height,rotationAngle:this.rotationAngle,visualTransformMatrix:N.toITransformMatrix(this.visual.transform.baseVal.getItem(0).matrix),containerTransformMatrix:N.toITransformMatrix(this.container.transform.baseVal.getItem(0).matrix)},fe.prototype.getState.call(this))},z.prototype.restoreState=function(J){fe.prototype.restoreState.call(this,J);var be=J;this.left=be.left,this.top=be.top,this.width=be.width,this.height=be.height,this.rotationAngle=be.rotationAngle,this.visual.transform.baseVal.getItem(0).setMatrix(N.toSVGMatrix(this.visual.transform.baseVal.getItem(0).matrix,be.visualTransformMatrix)),this.container.transform.baseVal.getItem(0).setMatrix(N.toSVGMatrix(this.container.transform.baseVal.getItem(0).matrix,be.containerTransformMatrix))},z.prototype.scale=function(J,be){fe.prototype.scale.call(this,J,be);var _e=this.rotatePoint({x:this.left,y:this.top}),oe=this.unrotatePoint({x:_e.x*J,y:_e.y*be});this.left=oe.x,this.top=oe.y,this.width=this.width*J,this.height=this.height*be,this.adjustControlBox()},z}(_),M=function(fe){function z(J,be,_e){var oe=fe.call(this,J,be,_e)||this;return oe.fillColor="transparent",oe.strokeColor="transparent",oe.strokeWidth=0,oe.strokeDasharray="",oe.opacity=1,oe.setStrokeColor=oe.setStrokeColor.bind(oe),oe.setFillColor=oe.setFillColor.bind(oe),oe.setStrokeWidth=oe.setStrokeWidth.bind(oe),oe.setStrokeDasharray=oe.setStrokeDasharray.bind(oe),oe.createVisual=oe.createVisual.bind(oe),oe}return Y(z,fe),z.prototype.ownsTarget=function(J){return!(!fe.prototype.ownsTarget.call(this,J)&&J!==this.visual)},z.prototype.createVisual=function(){this.visual=u.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)},z.prototype.pointerDown=function(J,be){fe.prototype.pointerDown.call(this,J,be),this.state==="new"&&(this.createVisual(),this.moveVisual(J),this._state="creating")},z.prototype.manipulate=function(J){fe.prototype.manipulate.call(this,J)},z.prototype.resize=function(J){fe.prototype.resize.call(this,J),this.setSize()},z.prototype.setSize=function(){fe.prototype.setSize.call(this),u.setAttributes(this.visual,[["width",this.width.toString()],["height",this.height.toString()]])},z.prototype.pointerUp=function(J){fe.prototype.pointerUp.call(this,J),this.setSize()},z.prototype.setStrokeColor=function(J){this.strokeColor=J,this.visual&&u.setAttributes(this.visual,[["stroke",this.strokeColor]]),this.colorChanged(J),this.stateChanged()},z.prototype.setFillColor=function(J){this.fillColor=J,this.visual&&u.setAttributes(this.visual,[["fill",this.fillColor]]),this.stateChanged()},z.prototype.setStrokeWidth=function(J){this.strokeWidth=J,this.visual&&u.setAttributes(this.visual,[["stroke-width",this.strokeWidth.toString()]]),this.stateChanged()},z.prototype.setStrokeDasharray=function(J){this.strokeDasharray=J,this.visual&&u.setAttributes(this.visual,[["stroke-dasharray",this.strokeDasharray]]),this.stateChanged()},z.prototype.getState=function(){return Object.assign({fillColor:this.fillColor,strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray,opacity:this.opacity},fe.prototype.getState.call(this))},z.prototype.restoreState=function(J){var be=J;this.fillColor=be.fillColor,this.strokeColor=be.strokeColor,this.strokeWidth=be.strokeWidth,this.strokeDasharray=be.strokeDasharray,this.opacity=be.opacity,this.createVisual(),fe.prototype.restoreState.call(this,J),this.setSize()},z.prototype.scale=function(J,be){fe.prototype.scale.call(this,J,be),this.setSize()},z.title="Rectangle marker",z}(L),F=function(fe){function z(J,be,_e,oe){var ie=fe.call(this,J,oe||'')||this;return ie.widths=[],ie.widthBoxes=[],ie.widths=be,ie.currentWidth=_e,ie.setCurrentWidth=ie.setCurrentWidth.bind(ie),ie}return Y(z,fe),z.prototype.getUi=function(){var J=this,be=document.createElement("div");return be.style.display="flex",be.style.overflow="hidden",be.style.flexGrow="2",this.widths.forEach(function(_e){var oe=document.createElement("div");oe.style.display="flex",oe.style.flexGrow="2",oe.style.alignItems="center",oe.style.justifyContent="space-between",oe.style.padding="5px",oe.style.borderWidth="2px",oe.style.borderStyle="solid",oe.style.borderColor=_e===J.currentWidth?J.uiStyleSettings.toolboxAccentColor:"transparent",oe.addEventListener("click",function(){J.setCurrentWidth(_e,oe)}),be.appendChild(oe);var ie=document.createElement("div");ie.innerText=_e.toString(),ie.style.marginRight="5px",oe.appendChild(ie);var ve=document.createElement("div");ve.style.minHeight="20px",ve.style.flexGrow="2",ve.style.display="flex",ve.style.alignItems="center";var Ne=document.createElement("hr");Ne.style.minWidth="20px",Ne.style.border="0px",Ne.style.borderTop=_e+"px solid "+J.uiStyleSettings.toolboxColor,Ne.style.flexGrow="2",ve.appendChild(Ne),oe.appendChild(ve),J.widthBoxes.push(oe)}),be},z.prototype.setCurrentWidth=function(J,be){var _e=this;this.currentWidth=J,this.widthBoxes.forEach(function(oe){oe.style.borderColor=oe===be?_e.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onWidthChanged&&this.onWidthChanged(this.currentWidth)},z}(x),H=function(fe){function z(J,be,_e,oe){var ie=fe.call(this,J,oe||'')||this;return ie.styles=[],ie.styleBoxes=[],ie.styles=be,ie.currentStyle=_e,ie.setCurrentStyle=ie.setCurrentStyle.bind(ie),ie}return Y(z,fe),z.prototype.getUi=function(){var J=this,be=document.createElement("div");return be.style.display="flex",be.style.overflow="hidden",be.style.flexGrow="2",this.styles.forEach(function(_e){var oe=document.createElement("div");oe.style.display="flex",oe.style.alignItems="center",oe.style.justifyContent="space-between",oe.style.padding="5px",oe.style.borderWidth="2px",oe.style.borderStyle="solid",oe.style.overflow="hidden",oe.style.maxWidth=100/J.styles.length-5+"%",oe.style.borderColor=_e===J.currentStyle?J.uiStyleSettings.toolboxAccentColor:"transparent",oe.addEventListener("click",function(){J.setCurrentStyle(_e,oe)}),be.appendChild(oe);var ie=document.createElement("div");ie.style.minHeight="20px",ie.style.flexGrow="2",ie.style.overflow="hidden";var ve=` `;ie.innerHTML=ve,oe.appendChild(ie),J.styleBoxes.push(oe)}),be},z.prototype.setCurrentStyle=function(J,be){var _e=this;this.currentStyle=J,this.styleBoxes.forEach(function(oe){oe.style.borderColor=oe===be?_e.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onStyleChanged&&this.onStyleChanged(this.currentStyle)},z}(x),P=function(fe){function z(J,be,_e){var oe=fe.call(this,J,be,_e)||this;return oe.strokeColor=_e.defaultColor,oe.strokeWidth=_e.defaultStrokeWidth,oe.strokeDasharray=_e.defaultStrokeDasharray,oe.strokePanel=new T("Line color",_e.defaultColorSet,_e.defaultColor),oe.strokePanel.onColorChanged=oe.setStrokeColor,oe.strokeWidthPanel=new F("Line width",_e.defaultStrokeWidths,_e.defaultStrokeWidth),oe.strokeWidthPanel.onWidthChanged=oe.setStrokeWidth,oe.strokeStylePanel=new H("Line style",_e.defaultStrokeDasharrays,_e.defaultStrokeDasharray),oe.strokeStylePanel.onStyleChanged=oe.setStrokeDasharray,oe}return Y(z,fe),Object.defineProperty(z.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),z.prototype.getState=function(){var J=fe.prototype.getState.call(this);return J.typeName=z.typeName,J},z.typeName="FrameMarker",z.title="Frame marker",z.icon='',z}(M),V=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"},G=function(fe){function z(J,be,_e){var oe=fe.call(this,J,be,_e)||this;return oe.x1=0,oe.y1=0,oe.x2=0,oe.y2=0,oe.defaultLength=50,oe.manipulationStartX=0,oe.manipulationStartY=0,oe.manipulationStartX1=0,oe.manipulationStartY1=0,oe.manipulationStartX2=0,oe.manipulationStartY2=0,oe.setupControlBox(),oe}return Y(z,fe),z.prototype.ownsTarget=function(J){return!!fe.prototype.ownsTarget.call(this,J)||!(!this.grip1.ownsTarget(J)&&!this.grip2.ownsTarget(J))},z.prototype.pointerDown=function(J,be){fe.prototype.pointerDown.call(this,J,be),this.manipulationStartX=J.x,this.manipulationStartY=J.y,this.state==="new"&&(this.x1=J.x,this.y1=J.y,this.x2=J.x,this.y2=J.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(be)?this.activeGrip=this.grip1:this.grip2.ownsTarget(be)?this.activeGrip=this.grip2:this.activeGrip=void 0,this.activeGrip?this._state="resize":this._state="move")},z.prototype.pointerUp=function(J){var be=this.state;fe.prototype.pointerUp.call(this,J),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(J),this._state="select",be==="creating"&&this.onMarkerCreated&&this.onMarkerCreated(this)},z.prototype.adjustVisual=function(){},z.prototype.manipulate=function(J){this.state==="creating"?this.resize(J):this.state==="move"?(this.x1=this.manipulationStartX1+J.x-this.manipulationStartX,this.y1=this.manipulationStartY1+J.y-this.manipulationStartY,this.x2=this.manipulationStartX2+J.x-this.manipulationStartX,this.y2=this.manipulationStartY2+J.y-this.manipulationStartY,this.adjustVisual(),this.adjustControlBox()):this.state==="resize"&&this.resize(J)},z.prototype.resize=function(J){switch(this.activeGrip){case this.grip1:this.x1=J.x,this.y1=J.y;break;case this.grip2:case void 0:this.x2=J.x,this.y2=J.y}this.adjustVisual(),this.adjustControlBox()},z.prototype.select=function(){fe.prototype.select.call(this),this.adjustControlBox(),this.controlBox.style.display=""},z.prototype.deselect=function(){fe.prototype.deselect.call(this),this.controlBox.style.display="none"},z.prototype.setupControlBox=function(){this.controlBox=u.createGroup(),this.container.appendChild(this.controlBox),this.addControlGrips(),this.controlBox.style.display="none"},z.prototype.adjustControlBox=function(){this.positionGrips()},z.prototype.addControlGrips=function(){this.grip1=this.createGrip(),this.grip2=this.createGrip(),this.positionGrips()},z.prototype.createGrip=function(){var J=new A;return J.visual.transform.baseVal.appendItem(u.createTransform()),this.controlBox.appendChild(J.visual),J},z.prototype.positionGrips=function(){var J=this.grip1.GRIP_SIZE;this.positionGrip(this.grip1.visual,this.x1-J/2,this.y1-J/2),this.positionGrip(this.grip2.visual,this.x2-J/2,this.y2-J/2)},z.prototype.positionGrip=function(J,be,_e){var oe=J.transform.baseVal.getItem(0);oe.setTranslate(be,_e),J.transform.baseVal.replaceItem(oe,0)},z.prototype.getState=function(){return Object.assign({x1:this.x1,y1:this.y1,x2:this.x2,y2:this.y2},fe.prototype.getState.call(this))},z.prototype.restoreState=function(J){fe.prototype.restoreState.call(this,J);var be=J;this.x1=be.x1,this.y1=be.y1,this.x2=be.x2,this.y2=be.y2},z.prototype.scale=function(J,be){fe.prototype.scale.call(this,J,be),this.x1=this.x1*J,this.y1=this.y1*be,this.x2=this.x2*J,this.y2=this.y2*be,this.adjustVisual(),this.adjustControlBox()},z}(_),Q=function(fe){function z(J,be,_e){var oe=fe.call(this,J,be,_e)||this;return oe.strokeColor="transparent",oe.strokeWidth=0,oe.strokeDasharray="",oe.setStrokeColor=oe.setStrokeColor.bind(oe),oe.setStrokeWidth=oe.setStrokeWidth.bind(oe),oe.setStrokeDasharray=oe.setStrokeDasharray.bind(oe),oe.strokeColor=_e.defaultColor,oe.strokeWidth=_e.defaultStrokeWidth,oe.strokeDasharray=_e.defaultStrokeDasharray,oe.strokePanel=new T("Line color",_e.defaultColorSet,_e.defaultColor),oe.strokePanel.onColorChanged=oe.setStrokeColor,oe.strokeWidthPanel=new F("Line width",_e.defaultStrokeWidths,_e.defaultStrokeWidth),oe.strokeWidthPanel.onWidthChanged=oe.setStrokeWidth,oe.strokeStylePanel=new H("Line style",_e.defaultStrokeDasharrays,_e.defaultStrokeDasharray),oe.strokeStylePanel.onStyleChanged=oe.setStrokeDasharray,oe}return Y(z,fe),z.prototype.ownsTarget=function(J){return!(!fe.prototype.ownsTarget.call(this,J)&&J!==this.visual&&J!==this.selectorLine&&J!==this.visibleLine)},z.prototype.createVisual=function(){this.visual=u.createGroup(),this.selectorLine=u.createLine(this.x1,this.y1,this.x2,this.y2,[["stroke","transparent"],["stroke-width",(this.strokeWidth+10).toString()]]),this.visibleLine=u.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)},z.prototype.pointerDown=function(J,be){fe.prototype.pointerDown.call(this,J,be),this.state==="new"&&(this.createVisual(),this.adjustVisual(),this._state="creating")},z.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()),u.setAttributes(this.visibleLine,[["stroke",this.strokeColor]]),u.setAttributes(this.visibleLine,[["stroke-width",this.strokeWidth.toString()]]),u.setAttributes(this.visibleLine,[["stroke-dasharray",this.strokeDasharray.toString()]]))},z.prototype.setStrokeColor=function(J){this.strokeColor=J,this.adjustVisual(),this.colorChanged(J)},z.prototype.setStrokeWidth=function(J){this.strokeWidth=J,this.adjustVisual()},z.prototype.setStrokeDasharray=function(J){this.strokeDasharray=J,this.adjustVisual(),this.stateChanged()},Object.defineProperty(z.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),z.prototype.getState=function(){var J=Object.assign({strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray},fe.prototype.getState.call(this));return J.typeName=z.typeName,J},z.prototype.restoreState=function(J){fe.prototype.restoreState.call(this,J);var be=J;this.strokeColor=be.strokeColor,this.strokeWidth=be.strokeWidth,this.strokeDasharray=be.strokeDasharray,this.createVisual(),this.adjustVisual()},z.typeName="LineMarker",z.title="Line marker",z.icon='',z}(G),ne=function(fe){function z(J,be,_e,oe){var ie=fe.call(this,J,oe||'')||this;return ie.fonts=[],ie.fontBoxes=[],ie.fonts=be,ie.currentFont=_e,ie.setCurrentFont=ie.setCurrentFont.bind(ie),ie}return Y(z,fe),z.prototype.getUi=function(){var J=this,be=document.createElement("div");return be.style.overflow="hidden",be.style.flexGrow="2",this.fonts.forEach(function(_e){var oe=document.createElement("div");oe.style.display="inline-block",oe.style.alignItems="center",oe.style.justifyContent="space-between",oe.style.padding="5px",oe.style.borderWidth="2px",oe.style.borderStyle="solid",oe.style.overflow="hidden",oe.style.maxWidth=100/J.fonts.length-5+"%",oe.style.borderColor=_e===J.currentFont?J.uiStyleSettings.toolboxAccentColor:"transparent",oe.addEventListener("click",function(){J.setCurrentFont(_e,oe)}),be.appendChild(oe);var ie=document.createElement("div");ie.style.display="flex",ie.style.minHeight="20px",ie.style.flexGrow="2",ie.style.fontFamily=_e,ie.style.overflow="hidden";var ve=document.createElement("div");ve.style.whiteSpace="nowrap",ve.style.overflow="hidden",ve.style.textOverflow="ellipsis",ve.innerHTML="The quick brown fox jumps over the lazy dog",ie.appendChild(ve),oe.appendChild(ie),J.fontBoxes.push(oe)}),be},z.prototype.setCurrentFont=function(J,be){var _e=this;this.currentFont=J,this.fontBoxes.forEach(function(oe){oe.style.borderColor=oe===be?_e.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onFontChanged&&this.onFontChanged(this.currentFont)},z}(x),ue=function(fe){function z(J,be,_e){var oe=fe.call(this,J,be,_e)||this;return oe.color="transparent",oe.padding=5,oe.DEFAULT_TEXT="\u8BF7\u8F93\u5165\u6587\u672C",oe.text=oe.DEFAULT_TEXT,oe.isMoved=!1,oe.color=_e.defaultColor,oe.fontFamily=_e.defaultFontFamily,oe.defaultSize={x:100,y:30},oe.setColor=oe.setColor.bind(oe),oe.setFont=oe.setFont.bind(oe),oe.renderText=oe.renderText.bind(oe),oe.sizeText=oe.sizeText.bind(oe),oe.textEditDivClicked=oe.textEditDivClicked.bind(oe),oe.showTextEditor=oe.showTextEditor.bind(oe),oe.setSize=oe.setSize.bind(oe),oe.positionTextEditor=oe.positionTextEditor.bind(oe),oe.colorPanel=new T("Color",_e.defaultColorSet,_e.defaultColor),oe.colorPanel.onColorChanged=oe.setColor,oe.fontFamilyPanel=new ne("Font",_e.defaultFontFamilies,_e.defaultFontFamily),oe.fontFamilyPanel.onFontChanged=oe.setFont,oe}return Y(z,fe),z.prototype.ownsTarget=function(J){if(fe.prototype.ownsTarget.call(this,J)||J===this.visual||J===this.textElement||J===this.bgRectangle)return!0;var be=!1;return this.textElement.childNodes.forEach(function(_e){_e===J&&(be=!0)}),be},z.prototype.createVisual=function(){this.visual=u.createGroup(),this.bgRectangle=u.createRect(1,1,[["fill","transparent"]]),this.visual.appendChild(this.bgRectangle),this.textElement=u.createText([["fill",this.color],["font-family",this.fontFamily],["font-size","16px"],["x","0"],["y","0"]]),this.textElement.transform.baseVal.appendItem(u.createTransform()),this.textElement.transform.baseVal.appendItem(u.createTransform()),this.visual.appendChild(this.textElement),this.addMarkerVisualToContainer(this.visual),this.renderText()},z.prototype.pointerDown=function(J,be){fe.prototype.pointerDown.call(this,J,be),this.isMoved=!1,this.pointerDownPoint=J,this.pointerDownTimestamp=Date.now(),this.state==="new"&&(this.createVisual(),this.moveVisual(J),this._state="creating")},z.prototype.renderText=function(){var J=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(be){J.textElement.appendChild(u.createTSpan(be.trim()===""?" ":be.trim(),[["x","0"],["dy","1.2em"]]))}),setTimeout(this.sizeText,10)}},z.prototype.getTextScale=function(){var J=this.textElement.getBBox(),be=1;if(J.width>0&&J.height>0){var _e=(1*this.width-this.width*this.padding*2/100)/J.width,oe=(1*this.height-this.height*this.padding*2/100)/J.height;be=Math.min(_e,oe)}return be},z.prototype.getTextPosition=function(J){var be=this.textElement.getBBox(),_e=0,oe=0;return be.width>0&&be.height>0&&(_e=(this.width-be.width*J)/2,oe=this.height/2-be.height*J/2),{x:_e,y:oe}},z.prototype.sizeText=function(){var J=this.textElement.getBBox(),be=this.getTextScale(),_e=this.getTextPosition(be);_e.y-=J.y*be,navigator.userAgent.indexOf("Edge/")>-1?this.textElement.style.transform="translate("+_e.x+"px, "+_e.y+"px) scale("+be+", "+be+")":(this.textElement.transform.baseVal.getItem(0).setTranslate(_e.x,_e.y),this.textElement.transform.baseVal.getItem(1).setScale(be,be))},z.prototype.manipulate=function(J){fe.prototype.manipulate.call(this,J),this.pointerDownPoint!==void 0&&(this.isMoved=Math.abs(J.x-this.pointerDownPoint.x)>5||Math.abs(J.y-this.pointerDownPoint.y)>5)},z.prototype.resize=function(J){fe.prototype.resize.call(this,J),this.isMoved=!0,this.setSize(),this.sizeText()},z.prototype.setSize=function(){fe.prototype.setSize.call(this),this.visual&&this.bgRectangle&&(u.setAttributes(this.visual,[["width",this.width.toString()],["height",this.height.toString()]]),u.setAttributes(this.bgRectangle,[["width",this.width.toString()],["height",this.height.toString()]]))},z.prototype.pointerUp=function(J){var be=this.state;be==="creating"&&(this._suppressMarkerCreateEvent=!0),fe.prototype.pointerUp.call(this,J),this.setSize(),(be==="creating"||!this.isMoved&&Date.now()-this.pointerDownTimestamp>500)&&this.showTextEditor(),this.pointerDownPoint=void 0},z.prototype.showTextEditor=function(){var J=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(be){be.stopPropagation()}),this.textEditor.addEventListener("input",function(){for(var be=Number.parseFloat(J.textEditor.style.fontSize);J.textEditor.clientWidth>=Number.parseInt(J.textEditor.style.maxWidth)&&be>.9;)be-=.1,J.textEditor.style.fontSize=Math.max(be,.9)+"em"}),this.textEditor.addEventListener("keyup",function(be){be.cancelBubble=!0}),this.textEditor.addEventListener("paste",function(be){if(be.clipboardData){var _e=be.clipboardData.getData("text"),oe=window.getSelection();if(!oe.rangeCount)return!1;oe.deleteFromDocument(),oe.getRangeAt(0).insertNode(document.createTextNode(_e)),be.preventDefault()}}),this.textEditDiv.addEventListener("pointerup",function(){J.textEditDivClicked(J.textEditor.innerText)}),this.textEditDiv.appendChild(this.textEditor),this.overlayContainer.appendChild(this.textEditDiv),this.hideVisual(),this.textEditor.focus(),document.execCommand("selectAll")},z.prototype.positionTextEditor=function(){if(this.state==="edit")if(this.textEditor===void 0)this.showTextEditor();else{this.textElement.style.display="";var J=this.getTextScale(),be=this.rotatePoint({x:this.left+this.width/2,y:this.top+this.height/2}),_e=this.textElement.getBBox(),oe={x:_e.width*J,y:_e.height*J};be.x-=oe.x/2,be.y-=oe.y/2,this.textEditor.style.top=be.y+"px",this.textEditor.style.left=be.x+"px",this.textEditor.style.maxWidth=this.overlayContainer.offsetWidth-be.x+"px",this.textEditor.style.fontSize=Math.max(16*J,12)+"px",this.textElement.style.display="none"}},z.prototype.textEditDivClicked=function(J){this.text=J.trim(),this.overlayContainer.innerHTML="",this.renderText(),this.showVisual(),this._suppressMarkerCreateEvent&&(this._suppressMarkerCreateEvent=!1,this.onMarkerCreated&&this.onMarkerCreated(this)),this.stateChanged()},z.prototype.select=function(){fe.prototype.select.call(this),this.state==="edit"&&this.textEditDivClicked(this.textEditor.innerText)},z.prototype.deselect=function(){this.state==="edit"&&this.textEditDivClicked(this.textEditor.innerText),fe.prototype.deselect.call(this)},z.prototype.dblClick=function(J,be){fe.prototype.dblClick.call(this,J,be),this.showTextEditor()},z.prototype.setColor=function(J){this.textElement&&u.setAttributes(this.textElement,[["fill",J]]),this.color=J,this.textEditor&&(this.textEditor.style.color=this.color),this.colorChanged(J)},z.prototype.setFont=function(J){this.textElement&&u.setAttributes(this.textElement,[["font-family",J]]),this.fontFamily=J,this.textEditor&&(this.textEditor.style.fontFamily=this.fontFamily),this.renderText(),this.stateChanged()},z.prototype.hideVisual=function(){this.textElement.style.display="none",this.hideControlBox()},z.prototype.showVisual=function(){this.state==="edit"&&(this._state="select"),this.textElement.style.display="",this.showControlBox()},Object.defineProperty(z.prototype,"toolboxPanels",{get:function(){return[this.colorPanel,this.fontFamilyPanel]},enumerable:!1,configurable:!0}),z.prototype.getState=function(){var J=Object.assign({color:this.color,fontFamily:this.fontFamily,padding:this.padding,text:this.text},fe.prototype.getState.call(this));return J.typeName=z.typeName,J},z.prototype.restoreState=function(J){var be=J;this.color=be.color,this.fontFamily=be.fontFamily,this.padding=be.padding,this.text=be.text,this.createVisual(),fe.prototype.restoreState.call(this,J),this.setSize()},z.prototype.scale=function(J,be){fe.prototype.scale.call(this,J,be),this.setSize(),this.sizeText(),this.positionTextEditor()},z.typeName="TextMarker",z.title="Text marker",z.icon='',z}(L),ae=function(fe){function z(J,be,_e){var oe=fe.call(this,J,be,_e)||this;return oe.color="transparent",oe.lineWidth=3,oe.drawing=!1,oe.pixelRatio=1,oe.color=_e.defaultColor,oe.lineWidth=_e.defaultStrokeWidth,oe.pixelRatio=_e.freehandPixelRatio,oe.setColor=oe.setColor.bind(oe),oe.addCanvas=oe.addCanvas.bind(oe),oe.finishCreation=oe.finishCreation.bind(oe),oe.setLineWidth=oe.setLineWidth.bind(oe),oe.colorPanel=new T("Color",_e.defaultColorSet,_e.defaultColor),oe.colorPanel.onColorChanged=oe.setColor,oe.lineWidthPanel=new F("Line width",_e.defaultStrokeWidths,_e.defaultStrokeWidth),oe.lineWidthPanel.onWidthChanged=oe.setLineWidth,oe}return Y(z,fe),z.prototype.ownsTarget=function(J){return!(!fe.prototype.ownsTarget.call(this,J)&&J!==this.visual&&J!==this.drawingImage)},z.prototype.createVisual=function(){this.visual=u.createGroup(),this.drawingImage=u.createImage(),this.visual.appendChild(this.drawingImage);var J=u.createTransform();this.visual.transform.baseVal.appendItem(J),this.addMarkerVisualToContainer(this.visual)},z.prototype.pointerDown=function(J,be){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(J.x,J.y),this.drawing=!0):fe.prototype.pointerDown.call(this,J,be)},z.prototype.manipulate=function(J){this.state==="creating"?this.drawing&&(this.canvasContext.lineTo(J.x,J.y),this.canvasContext.stroke()):fe.prototype.manipulate.call(this,J)},z.prototype.resize=function(J){fe.prototype.resize.call(this,J),u.setAttributes(this.visual,[["width",this.width.toString()],["height",this.height.toString()]]),u.setAttributes(this.drawingImage,[["width",this.width.toString()],["height",this.height.toString()]])},z.prototype.pointerUp=function(J){this._state==="creating"?this.drawing&&(this.canvasContext.closePath(),this.drawing=!1,this.globalSettings.newFreehandMarkerOnPointerUp&&this.finishCreation()):fe.prototype.pointerUp.call(this,J)},z.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)},z.prototype.select=function(){this.state==="creating"&&this.finishCreation(),fe.prototype.select.call(this)},z.prototype.deselect=function(){this.state==="creating"&&this.finishCreation(),fe.prototype.deselect.call(this)},z.prototype.finishCreation=function(){for(var J=this.canvasContext.getImageData(0,0,this.canvasElement.width,this.canvasElement.height),be=[this.canvasElement.width+1,this.canvasElement.height+1,-1,-1],_e=be[0],oe=be[1],ie=be[2],ve=be[3],Ne=!1,ze=0;ze0&&(Ne=!0,zeve&&(ve=ze),Ve>ie&&(ie=Ve));if(Ne){this.left=_e/this.pixelRatio,this.top=oe/this.pixelRatio,this.width=(ie-_e)/this.pixelRatio,this.height=(ve-oe)/this.pixelRatio;var yt=document.createElement("canvas");yt.width=ie-_e,yt.height=ve-oe,yt.getContext("2d").putImageData(this.canvasContext.getImageData(_e,oe,ie-_e,ve-oe),0,0),this.drawingImgUrl=yt.toDataURL("image/png"),this.setDrawingImage(),this._state="select",this.onMarkerCreated&&this.onMarkerCreated(this)}this.overlayContainer.innerHTML=""},z.prototype.setDrawingImage=function(){u.setAttributes(this.drawingImage,[["width",this.width.toString()],["height",this.height.toString()]]),u.setAttributes(this.drawingImage,[["href",this.drawingImgUrl]]),this.moveVisual({x:this.left,y:this.top})},z.prototype.setColor=function(J){this.color=J,this.colorChanged(J)},z.prototype.setLineWidth=function(J){this.lineWidth=J},Object.defineProperty(z.prototype,"toolboxPanels",{get:function(){return this.state==="new"||this.state==="creating"?[this.colorPanel,this.lineWidthPanel]:[]},enumerable:!1,configurable:!0}),z.prototype.getState=function(){var J=Object.assign({drawingImgUrl:this.drawingImgUrl},fe.prototype.getState.call(this));return J.typeName=z.typeName,J},z.prototype.restoreState=function(J){this.createVisual(),fe.prototype.restoreState.call(this,J),this.drawingImgUrl=J.drawingImgUrl,this.setDrawingImage()},z.prototype.scale=function(J,be){fe.prototype.scale.call(this,J,be),this.setDrawingImage()},z.typeName="FreehandMarker",z.title="Freehand marker",z.icon='',z}(L),he=function(fe){function z(J,be,_e){var oe=fe.call(this,J,_e||'')||this;return oe.typeBoxes=[],oe.currentType=be,oe.setCurrentType=oe.setCurrentType.bind(oe),oe}return Y(z,fe),z.prototype.getUi=function(){var J=this,be=document.createElement("div");be.style.display="flex",be.style.overflow="hidden",be.style.flexGrow="2";for(var _e=function(ve){var Ne="both";switch(ve){case 0:Ne="both";break;case 1:Ne="start";break;case 2:Ne="end";break;case 3:Ne="none"}var ze=document.createElement("div");if(ze.style.display="flex",ze.style.flexGrow="2",ze.style.alignItems="center",ze.style.justifyContent="space-between",ze.style.padding="5px",ze.style.borderWidth="2px",ze.style.borderStyle="solid",ze.style.borderColor=Ne===oe.currentType?oe.uiStyleSettings.toolboxAccentColor:"transparent",ze.addEventListener("click",function(){J.setCurrentType(Ne,ze)}),be.appendChild(ze),Ne==="both"||Ne==="start"){var Ve=document.createElement("div");Ve.style.display="flex",Ve.style.alignItems="center",Ve.style.minHeight="20px",Ve.innerHTML=` `,Ve.style.marginLeft="5px",ze.appendChild(Ve)}var yt=document.createElement("div");yt.style.display="flex",yt.style.alignItems="center",yt.style.minHeight="20px",yt.style.flexGrow="2";var ct=document.createElement("hr");if(ct.style.minWidth="20px",ct.style.border="0px",ct.style.borderTop="3px solid "+(oe.uiStyleSettings!==void 0?oe.uiStyleSettings.toolboxColor:"#eeeeee"),ct.style.flexGrow="2",yt.appendChild(ct),ze.appendChild(yt),Ne==="both"||Ne==="end"){var St=document.createElement("div");St.style.display="flex",St.style.alignItems="center",St.style.minHeight="20px",St.innerHTML=` `,St.style.marginRight="5px",ze.appendChild(St)}oe.typeBoxes.push(ze)},oe=this,ie=0;ie<4;ie++)_e(ie);return be},z.prototype.setCurrentType=function(J,be){var _e=this;this.currentType=J,this.typeBoxes.forEach(function(oe){oe.style.borderColor=oe===be?_e.uiStyleSettings!==void 0?_e.uiStyleSettings.toolboxAccentColor:"#3080c3":"transparent"}),this.onArrowTypeChanged&&this.onArrowTypeChanged(this.currentType)},z}(x),ce=function(fe){function z(J,be,_e){var oe=fe.call(this,J,be,_e)||this;return oe.arrowType="end",oe.arrowBaseHeight=10,oe.arrowBaseWidth=10,oe.getArrowPoints=oe.getArrowPoints.bind(oe),oe.setArrowType=oe.setArrowType.bind(oe),oe.arrowTypePanel=new he("Arrow type","end"),oe.arrowTypePanel.onArrowTypeChanged=oe.setArrowType,oe}return Y(z,fe),z.prototype.ownsTarget=function(J){return!(!fe.prototype.ownsTarget.call(this,J)&&J!==this.arrow1&&J!==this.arrow2)},z.prototype.getArrowPoints=function(J,be){var _e=this.arrowBaseWidth+2*this.strokeWidth,oe=this.arrowBaseHeight+2*this.strokeWidth;return J-_e/2+","+(be+oe/2)+" "+J+","+(be-oe/2)+" "+(J+_e/2)+","+(be+oe/2)},z.prototype.createTips=function(){this.arrow1=u.createPolygon(this.getArrowPoints(this.x1,this.y1),[["fill",this.strokeColor]]),this.arrow1.transform.baseVal.appendItem(u.createTransform()),this.visual.appendChild(this.arrow1),this.arrow2=u.createPolygon(this.getArrowPoints(this.x2,this.y2),[["fill",this.strokeColor]]),this.arrow2.transform.baseVal.appendItem(u.createTransform()),this.visual.appendChild(this.arrow2)},z.prototype.pointerDown=function(J,be){fe.prototype.pointerDown.call(this,J,be),this.state==="creating"&&this.createTips()},z.prototype.adjustVisual=function(){if(fe.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",u.setAttributes(this.arrow1,[["points",this.getArrowPoints(this.x1,this.y1)],["fill",this.strokeColor]]),u.setAttributes(this.arrow2,[["points",this.getArrowPoints(this.x2,this.y2)],["fill",this.strokeColor]]);var J=0;Math.abs(this.x1-this.x2)>.1&&(J=180*Math.atan((this.y2-this.y1)/(this.x2-this.x1))/Math.PI+90*Math.sign(this.x1-this.x2));var be=this.arrow1.transform.baseVal.getItem(0);be.setRotate(J,this.x1,this.y1),this.arrow1.transform.baseVal.replaceItem(be,0);var _e=this.arrow2.transform.baseVal.getItem(0);_e.setRotate(J+180,this.x2,this.y2),this.arrow2.transform.baseVal.replaceItem(_e,0)}},z.prototype.setArrowType=function(J){this.arrowType=J,this.adjustVisual(),this.stateChanged()},Object.defineProperty(z.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel,this.arrowTypePanel]},enumerable:!1,configurable:!0}),z.prototype.getState=function(){var J=Object.assign({arrowType:this.arrowType},fe.prototype.getState.call(this));return J.typeName=z.typeName,J},z.prototype.restoreState=function(J){fe.prototype.restoreState.call(this,J);var be=J;this.arrowType=be.arrowType,this.createTips(),this.adjustVisual()},z.typeName="ArrowMarker",z.title="Arrow marker",z.icon='',z}(Q),we=function(fe){function z(J,be,_e){var oe=fe.call(this,J,be,_e)||this;return oe.fillColor=_e.defaultFillColor,oe.strokeWidth=0,oe.fillPanel=new T("Color",_e.defaultColorSet,_e.defaultFillColor),oe.fillPanel.onColorChanged=oe.setFillColor,oe}return Y(z,fe),Object.defineProperty(z.prototype,"toolboxPanels",{get:function(){return[this.fillPanel]},enumerable:!1,configurable:!0}),z.prototype.getState=function(){var J=fe.prototype.getState.call(this);return J.typeName=z.typeName,J},z.typeName="CoverMarker",z.title="Cover marker",z.icon='',z}(M),me=function(fe){function z(J,be,_e,oe){var ie=fe.call(this,J,oe||'')||this;return ie.opacities=[],ie.opacityBoxes=[],ie.opacities=be,ie.currentOpacity=_e,ie.setCurrentOpacity=ie.setCurrentOpacity.bind(ie),ie}return Y(z,fe),z.prototype.getUi=function(){var J=this,be=document.createElement("div");return be.style.display="flex",be.style.overflow="hidden",be.style.flexGrow="2",be.style.justifyContent="space-between",this.opacities.forEach(function(_e){var oe=document.createElement("div");oe.style.display="flex",oe.style.alignItems="center",oe.style.justifyContent="center",oe.style.padding="5px",oe.style.borderWidth="2px",oe.style.borderStyle="solid",oe.style.borderColor=_e===J.currentOpacity?J.uiStyleSettings.toolboxAccentColor:"transparent",oe.addEventListener("click",function(){J.setCurrentOpacity(_e,oe)}),be.appendChild(oe);var ie=document.createElement("div");ie.innerText=100*_e+"%",oe.appendChild(ie),J.opacityBoxes.push(oe)}),be},z.prototype.setCurrentOpacity=function(J,be){var _e=this;this.currentOpacity=J,this.opacityBoxes.forEach(function(oe){oe.style.borderColor=oe===be?_e.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onOpacityChanged&&this.onOpacityChanged(this.currentOpacity)},z}(x),Le=function(fe){function z(J,be,_e){var oe=fe.call(this,J,be,_e)||this;return oe.setOpacity=oe.setOpacity.bind(oe),oe.fillColor=_e.defaultHighlightColor,oe.strokeWidth=0,oe.opacity=_e.defaultHighlightOpacity,oe.fillPanel=new T("Color",_e.defaultColorSet,oe.fillColor),oe.fillPanel.onColorChanged=oe.setFillColor,oe.opacityPanel=new me("Opacity",_e.defaultOpacitySteps,oe.opacity),oe.opacityPanel.onOpacityChanged=oe.setOpacity,oe}return Y(z,fe),z.prototype.setOpacity=function(J){this.opacity=J,this.visual&&u.setAttributes(this.visual,[["opacity",this.opacity.toString()]]),this.stateChanged()},Object.defineProperty(z.prototype,"toolboxPanels",{get:function(){return[this.fillPanel,this.opacityPanel]},enumerable:!1,configurable:!0}),z.prototype.getState=function(){var J=fe.prototype.getState.call(this);return J.typeName=z.typeName,J},z.typeName="HighlightMarker",z.title="Highlight marker",z.icon='',z}(we),ee='',se='',le=function(fe){function z(J,be,_e){var oe=fe.call(this,J,be,_e)||this;return oe.bgColor="transparent",oe.tipPosition={x:0,y:0},oe.tipBase1Position={x:0,y:0},oe.tipBase2Position={x:0,y:0},oe.tipMoving=!1,oe.color=_e.defaultStrokeColor,oe.bgColor=_e.defaultFillColor,oe.fontFamily=_e.defaultFontFamily,oe.defaultSize={x:100,y:30},oe.setBgColor=oe.setBgColor.bind(oe),oe.getTipPoints=oe.getTipPoints.bind(oe),oe.positionTip=oe.positionTip.bind(oe),oe.setTipPoints=oe.setTipPoints.bind(oe),oe.colorPanel=new T("Text color",_e.defaultColorSet,oe.color,ee),oe.colorPanel.onColorChanged=oe.setColor,oe.bgColorPanel=new T("Fill color",_e.defaultColorSet,oe.bgColor,se),oe.bgColorPanel.onColorChanged=oe.setBgColor,oe.fontFamilyPanel=new ne("Font",_e.defaultFontFamilies,_e.defaultFontFamily),oe.fontFamilyPanel.onFontChanged=oe.setFont,oe.tipGrip=new A,oe.tipGrip.visual.transform.baseVal.appendItem(u.createTransform()),oe.controlBox.appendChild(oe.tipGrip.visual),oe}return Y(z,fe),z.prototype.ownsTarget=function(J){return fe.prototype.ownsTarget.call(this,J)||this.tipGrip.ownsTarget(J)||this.tip===J},z.prototype.createTip=function(){u.setAttributes(this.bgRectangle,[["fill",this.bgColor],["rx","10px"]]),this.tip=u.createPolygon(this.getTipPoints(),[["fill",this.bgColor]]),this.visual.appendChild(this.tip)},z.prototype.pointerDown=function(J,be){this.state==="new"&&fe.prototype.pointerDown.call(this,J,be),this.state==="creating"?this.createTip():this.tipGrip.ownsTarget(be)?(this.manipulationStartLeft=this.left,this.manipulationStartTop=this.top,this.tipMoving=!0):fe.prototype.pointerDown.call(this,J,be)},z.prototype.pointerUp=function(J){if(this.tipMoving)this.tipMoving=!1,this.isMoved=!0,fe.prototype.pointerUp.call(this,J);else{var be=this.state==="creating";fe.prototype.pointerUp.call(this,J),this.setTipPoints(be),this.positionTip()}},z.prototype.manipulate=function(J){if(this.tipMoving){var be=this.unrotatePoint(J);this.tipPosition={x:be.x-this.manipulationStartLeft,y:be.y-this.manipulationStartTop},this.positionTip()}else fe.prototype.manipulate.call(this,J)},z.prototype.setBgColor=function(J){this.bgRectangle&&this.tip&&(u.setAttributes(this.bgRectangle,[["fill",J]]),u.setAttributes(this.tip,[["fill",J]])),this.bgColor=J,this.fillColorChanged(J)},z.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},z.prototype.setTipPoints=function(J){J===void 0&&(J=!1);var be=Math.min(this.height/2,15),_e=this.height/5;J&&(this.tipPosition={x:be+_e/2,y:this.height+20});var oe=Math.atan(this.height/2/(this.width/2));this.tipPosition.x=this.width/2&&this.tipPosition.y=this.width/2&&this.tipPosition.y>=this.height/2?oe.1)){var J=180*Math.atan((this.y2-this.y1)/(this.x2-this.x1))/Math.PI+90*Math.sign(this.x1-this.x2),be=this.tip1.transform.baseVal.getItem(0);be.setRotate(J,this.x1,this.y1),this.tip1.transform.baseVal.replaceItem(be,0);var _e=this.tip2.transform.baseVal.getItem(0);_e.setRotate(J+180,this.x2,this.y2),this.tip2.transform.baseVal.replaceItem(_e,0)}},Object.defineProperty(z.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),z.prototype.getState=function(){var J=fe.prototype.getState.call(this);return J.typeName=z.typeName,J},z.prototype.restoreState=function(J){fe.prototype.restoreState.call(this,J),this.createTips(),this.adjustVisual()},z.typeName="MeasurementMarker",z.title="Measurement marker",z.icon='',z}(Q),Be=function(fe){function z(J,be,_e){var oe=fe.call(this,J,be,_e)||this;return oe.strokePanel.colors=_e.defaultColorSet,oe.fillColor="transparent",oe}return Y(z,fe),Object.defineProperty(z.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),z.prototype.getState=function(){var J=fe.prototype.getState.call(this);return J.typeName=z.typeName,J},z.typeName="EllipseFrameMarker",z.title="Ellipse frame marker",z.icon='',z}(ke),He=function(){function fe(){this.undoStack=[],this.redoStack=[]}return Object.defineProperty(fe.prototype,"isUndoPossible",{get:function(){return this.undoStack.length>0},enumerable:!1,configurable:!0}),Object.defineProperty(fe.prototype,"isRedoPossible",{get:function(){return this.redoStack.length>0},enumerable:!1,configurable:!0}),Object.defineProperty(fe.prototype,"undoStepCount",{get:function(){return this.undoStack.length},enumerable:!1,configurable:!0}),Object.defineProperty(fe.prototype,"redoStepCount",{get:function(){return this.redoStack.length},enumerable:!1,configurable:!0}),fe.prototype.addUndoStep=function(z){this.undoStack.length!==0&&JSON.stringify(this.undoStack[this.undoStack.length-1])===JSON.stringify(z)||(this.undoStack.push(z),JSON.stringify(this.lastRedoStep)!==JSON.stringify(z)&&this.redoStack.splice(0,this.redoStack.length))},fe.prototype.replaceLastUndoStep=function(z){this.undoStack.length>0&&(this.undoStack[this.undoStack.length-1]=z)},fe.prototype.getLastUndoStep=function(){return this.undoStack.length>0?this.undoStack[this.undoStack.length-1]:void 0},fe.prototype.undo=function(){if(this.undoStack.length>1){var z=this.undoStack.pop();return z!==void 0&&this.redoStack.push(z),this.undoStack.length>0?this.undoStack[this.undoStack.length-1]:void 0}},fe.prototype.redo=function(){return this.lastRedoStep=this.redoStack.pop(),this.lastRedoStep},fe}(),Fe=function(fe){function z(J,be,_e){var oe=fe.call(this,J,be,_e)||this;return oe.strokeColor="transparent",oe.strokeWidth=0,oe.strokeDasharray="",oe.curveX=0,oe.curveY=0,oe.manipulationStartCurveX=0,oe.manipulationStartCurveY=0,oe.setStrokeColor=oe.setStrokeColor.bind(oe),oe.setStrokeWidth=oe.setStrokeWidth.bind(oe),oe.setStrokeDasharray=oe.setStrokeDasharray.bind(oe),oe.positionGrips=oe.positionGrips.bind(oe),oe.addControlGrips=oe.addControlGrips.bind(oe),oe.adjustVisual=oe.adjustVisual.bind(oe),oe.setupControlBox=oe.setupControlBox.bind(oe),oe.resize=oe.resize.bind(oe),oe.strokeColor=_e.defaultColor,oe.strokeWidth=_e.defaultStrokeWidth,oe.strokeDasharray=_e.defaultStrokeDasharray,oe.strokePanel=new T("Line color",_e.defaultColorSet,_e.defaultColor),oe.strokePanel.onColorChanged=oe.setStrokeColor,oe.strokeWidthPanel=new F("Line width",_e.defaultStrokeWidths,_e.defaultStrokeWidth),oe.strokeWidthPanel.onWidthChanged=oe.setStrokeWidth,oe.strokeStylePanel=new H("Line style",_e.defaultStrokeDasharrays,_e.defaultStrokeDasharray),oe.strokeStylePanel.onStyleChanged=oe.setStrokeDasharray,oe}return Y(z,fe),z.prototype.ownsTarget=function(J){return!(!fe.prototype.ownsTarget.call(this,J)&&J!==this.visual&&J!==this.selectorCurve&&J!==this.visibleCurve&&!this.curveGrip.ownsTarget(J))},z.prototype.getPathD=function(){return"M "+this.x1+" "+this.y1+" Q "+this.curveX+" "+this.curveY+", "+this.x2+" "+this.y2},z.prototype.createVisual=function(){this.visual=u.createGroup(),this.selectorCurve=u.createPath(this.getPathD(),[["stroke","transparent"],["stroke-width",(this.strokeWidth+10).toString()],["fill","transparent"]]),this.visibleCurve=u.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)},z.prototype.pointerDown=function(J,be){fe.prototype.pointerDown.call(this,J,be),this.manipulationStartCurveX=this.curveX,this.manipulationStartCurveY=this.curveY,this.state==="new"&&(this.curveX=J.x,this.curveY=J.y),this.state==="new"?(this.createVisual(),this.adjustVisual(),this._state="creating"):this.curveGrip.ownsTarget(be)&&(this.activeGrip=this.curveGrip,this._state="resize")},z.prototype.adjustVisual=function(){this.selectorCurve&&this.visibleCurve&&(this.selectorCurve.setAttribute("d",this.getPathD()),this.visibleCurve.setAttribute("d",this.getPathD()),u.setAttributes(this.visibleCurve,[["stroke",this.strokeColor]]),u.setAttributes(this.visibleCurve,[["stroke-width",this.strokeWidth.toString()]]),u.setAttributes(this.visibleCurve,[["stroke-dasharray",this.strokeDasharray.toString()]]))},z.prototype.setupControlBox=function(){fe.prototype.setupControlBox.call(this),this.curveControlLine1=u.createLine(this.x1,this.y1,this.curveX,this.curveY,[["stroke","black"],["stroke-width","1"],["stroke-opacity","0.5"],["stroke-dasharray","3, 2"]]),this.curveControlLine2=u.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)},z.prototype.addControlGrips=function(){this.curveGrip=this.createGrip(),this.curveX=0,this.curveY=0,fe.prototype.addControlGrips.call(this)},z.prototype.positionGrips=function(){fe.prototype.positionGrips.call(this);var J=this.curveGrip.GRIP_SIZE;this.positionGrip(this.curveGrip.visual,this.curveX-J/2,this.curveY-J/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()))},z.prototype.manipulate=function(J){this.state==="move"&&(this.curveX=this.manipulationStartCurveX+J.x-this.manipulationStartX,this.curveY=this.manipulationStartCurveY+J.y-this.manipulationStartY),fe.prototype.manipulate.call(this,J)},z.prototype.resize=function(J){this.activeGrip===this.curveGrip&&(this.curveX=J.x,this.curveY=J.y),fe.prototype.resize.call(this,J),this.state==="creating"&&(this.curveX=this.x1+(this.x2-this.x1)/2,this.curveY=this.y1+(this.y2-this.y1)/2)},z.prototype.setStrokeColor=function(J){this.strokeColor=J,this.adjustVisual(),this.colorChanged(J)},z.prototype.setStrokeWidth=function(J){this.strokeWidth=J,this.adjustVisual()},z.prototype.setStrokeDasharray=function(J){this.strokeDasharray=J,this.adjustVisual()},z.prototype.scale=function(J,be){this.curveX=this.curveX*J,this.curveY=this.curveY*be,fe.prototype.scale.call(this,J,be)},Object.defineProperty(z.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),z.prototype.getState=function(){var J=Object.assign({strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray,curveX:this.curveX,curveY:this.curveY},fe.prototype.getState.call(this));return J.typeName=z.typeName,J},z.prototype.restoreState=function(J){fe.prototype.restoreState.call(this,J);var be=J;this.strokeColor=be.strokeColor,this.strokeWidth=be.strokeWidth,this.strokeDasharray=be.strokeDasharray,this.curveX=be.curveX,this.curveY=be.curveY,this.createVisual(),this.adjustVisual()},z.typeName="CurveMarker",z.title="Curve marker",z.icon='',z}(G),Je=function(fe){function z(J,be,_e){var oe=fe.call(this,J,be,_e)||this;return oe.fillColor="transparent",oe.strokeColor="transparent",oe.strokeWidth=0,oe.strokeDasharray="",oe.textColor="transparent",oe.fontSize="1rem",oe.isMoved=!1,oe.captionText="Caption",oe.PADDING=5,oe.captionBoxWidth=0,oe.captionBoxHeight=0,oe.strokeColor=_e.defaultColor,oe.strokeWidth=_e.defaultStrokeWidth,oe.strokeDasharray=_e.defaultStrokeDasharray,oe.fillColor=_e.defaultFillColor,oe.textColor=_e.defaultStrokeColor,oe.fontFamily=_e.defaultFontFamily,oe.fontSize=_e.defaultCaptionFontSize,oe.captionText=_e.defaultCaptionText,oe.setStrokeColor=oe.setStrokeColor.bind(oe),oe.setFillColor=oe.setFillColor.bind(oe),oe.setStrokeWidth=oe.setStrokeWidth.bind(oe),oe.setStrokeDasharray=oe.setStrokeDasharray.bind(oe),oe.createVisual=oe.createVisual.bind(oe),oe.sizeCaption=oe.sizeCaption.bind(oe),oe.setCaptionText=oe.setCaptionText.bind(oe),oe.showTextEditor=oe.showTextEditor.bind(oe),oe.positionTextEditor=oe.positionTextEditor.bind(oe),oe.finishTextEditing=oe.finishTextEditing.bind(oe),oe.setFont=oe.setFont.bind(oe),oe.setTextColor=oe.setTextColor.bind(oe),oe.strokePanel=new T("Line color",I(_e.defaultColorSet,["transparent"]),oe.strokeColor),oe.strokePanel.onColorChanged=oe.setStrokeColor,oe.fillPanel=new T("Fill color",I(_e.defaultColorSet,["transparent"]),oe.fillColor,se),oe.fillPanel.onColorChanged=oe.setFillColor,oe.strokeWidthPanel=new F("Line width",_e.defaultStrokeWidths,_e.defaultStrokeWidth),oe.strokeWidthPanel.onWidthChanged=oe.setStrokeWidth,oe.strokeStylePanel=new H("Line style",_e.defaultStrokeDasharrays,_e.defaultStrokeDasharray),oe.strokeStylePanel.onStyleChanged=oe.setStrokeDasharray,oe.fontFamilyPanel=new ne("Font",_e.defaultFontFamilies,_e.defaultFontFamily),oe.fontFamilyPanel.onFontChanged=oe.setFont,oe.textColorPanel=new T("Text color",_e.defaultColorSet,oe.textColor,ee),oe.textColorPanel.onColorChanged=oe.setTextColor,oe}return Y(z,fe),z.prototype.ownsTarget=function(J){return!(!fe.prototype.ownsTarget.call(this,J)&&J!==this.visual&&J!==this.frame&&J!==this.captionBg&&J!==this.captionElement)},z.prototype.createVisual=function(){this.visual=u.createGroup(),this.addMarkerVisualToContainer(this.visual),this.captionBg=u.createRect(1,1,[["fill",this.fillColor]]),this.visual.appendChild(this.captionBg),this.captionElement=u.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=u.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()},z.prototype.setCaptionText=function(J){this.captionText=J,this.captionElement.textContent=this.captionText,this.sizeCaption()},z.prototype.pointerDown=function(J,be){fe.prototype.pointerDown.call(this,J,be),this.isMoved=!1,this.pointerDownPoint=J,this.pointerDownTimestamp=Date.now(),this.state==="new"&&(this.createVisual(),this.moveVisual(J),this._state="creating")},z.prototype.manipulate=function(J){fe.prototype.manipulate.call(this,J),this.pointerDownPoint!==void 0&&(this.isMoved=Math.abs(J.x-this.pointerDownPoint.x)>5||Math.abs(J.y-this.pointerDownPoint.y)>5)},z.prototype.resize=function(J){fe.prototype.resize.call(this,J),this.setSize()},z.prototype.sizeCaption=function(){var J=this.captionElement.getBBox();this.captionText.trim()!==""?(this.captionBoxWidth=J.width+2*this.PADDING,this.captionBoxHeight=J.height+2*this.PADDING):(this.captionBoxWidth=0,this.captionBoxHeight=0),u.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')"]]),u.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')"]])},z.prototype.showTextEditor=function(){var J=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(be){be.stopPropagation()}),this.textEditBox.addEventListener("keypress",function(be){be.key==="Enter"&&J.finishTextEditing(J.textEditBox.value)}),this.textEditBox.addEventListener("keyup",function(be){be.cancelBubble=!0}),this.textEditBox.addEventListener("blur",function(){J.finishTextEditing(J.textEditBox.value)}),this.textEditDiv.addEventListener("pointerup",function(){J.finishTextEditing(J.textEditBox.value)}),this.positionTextEditor(),this.textEditBox.focus()},z.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"))},z.prototype.finishTextEditing=function(J){this.setCaptionText(J.trim()),this.overlayContainer.innerHTML="",this.stateChanged()},z.prototype.setFont=function(J){this.captionElement&&u.setAttributes(this.captionElement,[["font-family",J]]),this.fontFamily=J,this.textEditBox&&(this.textEditBox.style.fontFamily=this.fontFamily),this.sizeCaption(),this.stateChanged()},z.prototype.setTextColor=function(J){this.captionElement&&u.setAttributes(this.captionElement,[["fill",J]]),this.textColor=J,this.textEditBox&&(this.textEditBox.style.color=this.textColor),this.stateChanged()},z.prototype.setSize=function(){fe.prototype.setSize.call(this),u.setAttributes(this.frame,[["width",this.width.toString()],["height",this.height.toString()]]),this.sizeCaption()},z.prototype.pointerUp=function(J){fe.prototype.pointerUp.call(this,J),this.setSize(),!this.isMoved&&Date.now()-this.pointerDownTimestamp>500&&this.showTextEditor(),this.pointerDownPoint=void 0},z.prototype.dblClick=function(J,be){fe.prototype.dblClick.call(this,J,be),this.showTextEditor()},z.prototype.setStrokeColor=function(J){this.strokeColor=J,this.frame&&u.setAttributes(this.frame,[["stroke",this.strokeColor]]),this.colorChanged(J),this.stateChanged()},z.prototype.setFillColor=function(J){this.fillColor=J,this.captionBg&&u.setAttributes(this.captionBg,[["fill",this.fillColor]]),this.fillColorChanged(J),this.stateChanged()},z.prototype.setStrokeWidth=function(J){this.strokeWidth=J,this.frame&&u.setAttributes(this.frame,[["stroke-width",this.strokeWidth.toString()]]),this.stateChanged()},z.prototype.setStrokeDasharray=function(J){this.strokeDasharray=J,this.frame&&u.setAttributes(this.frame,[["stroke-dasharray",this.strokeDasharray]]),this.stateChanged()},Object.defineProperty(z.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.fillPanel,this.strokeWidthPanel,this.strokeStylePanel,this.fontFamilyPanel,this.textColorPanel]},enumerable:!1,configurable:!0}),z.prototype.getState=function(){var J=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},fe.prototype.getState.call(this));return J.typeName=this.typeName,J},z.prototype.restoreState=function(J){var be=J;this.fillColor=be.fillColor,this.strokeColor=be.strokeColor,this.strokeWidth=be.strokeWidth,this.strokeDasharray=be.strokeDasharray,this.textColor=be.textColor,this.fontFamily=be.fontFamily,this.captionText=be.captionText,this.fontSize=be.fontSize,this.createVisual(),fe.prototype.restoreState.call(this,J),this.setSize()},z.prototype.scale=function(J,be){fe.prototype.scale.call(this,J,be),this.setSize()},z.typeName="CaptionFrameMarker",z.title="Caption frame marker",z.icon='',z}(L),Me=function(){function fe(z,J){J===void 0&&(J=!1),this.cancelable=!1,this._defaultPrevented=!1,this.markerArea=z,this.cancelable=J}return Object.defineProperty(fe.prototype,"defaultPrevented",{get:function(){return this._defaultPrevented},enumerable:!1,configurable:!0}),fe.prototype.preventDefault=function(){this._defaultPrevented=!0},fe}(),lt=function(fe){function z(J,be,_e){var oe=fe.call(this,J,!1)||this;return oe.dataUrl=be,oe.state=_e,oe}return Y(z,fe),z}(Me),Re=function(fe){function z(J,be,_e){_e===void 0&&(_e=!1);var oe=fe.call(this,J,_e)||this;return oe.marker=be,oe}return Y(z,fe),z}(Me),Oe=function(){function fe(){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 fe.prototype.addEventListener=function(z,J){this[z].push(J)},fe.prototype.removeEventListener=function(z,J){var be=this[z].indexOf(J);be>-1&&this[z].splice(be,1)},fe}(),pe=function(){function fe(z){this.touchPoints=0,this._availableMarkerTypes=this.DEFAULT_MARKER_TYPES,this.mode="select",this.markers=[],this.isDragging=!1,this.renderEventListeners=[],this.closeEventListeners=[],this.settings=new V,this._isOpen=!1,this.undoRedoManager=new He,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 Oe,this._silentRenderMode=!1,this._isFocused=!1,this._instanceNo=fe.instanceCounter++,this.styles=new S(this.instanceNo),this.uiStyleSettings=this.styles.settings,this.target=z,this.targetRoot=document.body,this.width=z.clientWidth,this.height=z.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(fe.prototype,"ALL_MARKER_TYPES",{get:function(){return[P,ae,ce,ue,Be,ke,Le,le,De,we,Q,Fe,Je]},enumerable:!1,configurable:!0}),Object.defineProperty(fe.prototype,"DEFAULT_MARKER_TYPES",{get:function(){return[P,ae,ce,ue,ke,Le,le]},enumerable:!1,configurable:!0}),Object.defineProperty(fe.prototype,"BASIC_MARKER_TYPES",{get:function(){return[P,ae,ce,ue,Le]},enumerable:!1,configurable:!0}),Object.defineProperty(fe.prototype,"availableMarkerTypes",{get:function(){return this._availableMarkerTypes},set:function(z){var J=this;this._availableMarkerTypes.splice(0),z.forEach(function(be){if(typeof be=="string"){var _e=J.ALL_MARKER_TYPES.find(function(oe){return oe.typeName===be});_e!==void 0&&J._availableMarkerTypes.push(_e)}else J._availableMarkerTypes.push(be)})},enumerable:!1,configurable:!0}),Object.defineProperty(fe.prototype,"currentMarker",{get:function(){return this._currentMarker},enumerable:!1,configurable:!0}),Object.defineProperty(fe.prototype,"isOpen",{get:function(){return this._isOpen},enumerable:!1,configurable:!0}),Object.defineProperty(fe.prototype,"isUndoPossible",{get:function(){return!(!this.undoRedoManager||!this.undoRedoManager.isUndoPossible)},enumerable:!1,configurable:!0}),Object.defineProperty(fe.prototype,"isRedoPossible",{get:function(){return!(!this.undoRedoManager||!this.undoRedoManager.isRedoPossible)},enumerable:!1,configurable:!0}),Object.defineProperty(fe.prototype,"zoomLevel",{get:function(){return this._zoomLevel},set:function(z){this._zoomLevel=z,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(fe.prototype,"instanceNo",{get:function(){return this._instanceNo},enumerable:!1,configurable:!0}),fe.prototype.open=function(){this.setupResizeObserver(),this.setEditingTarget(),this.setTopLeft(),this.initMarkerCanvas(),this.initOverlay(),this.attachEvents(),this.settings.displayMode==="popup"&&this.onPopupTargetResize(),d.isLicensed||this.addLogo(),this._isOpen=!0,this._isFocused=!0},fe.prototype.show=function(){var z=this;this.styles.styleSheetRoot===void 0&&y.styleSheetRoot!==void 0&&(this.styles.styleSheetRoot=y.styleSheetRoot),this.setWindowHeight(),this.showUI(),this.open(),this.eventListeners.show.forEach(function(J){return J(new Me(z))})},fe.prototype.render=function(){return s(this,void 0,void 0,function(){var z;return E(this,function(J){switch(J.label){case 0:return this.setCurrentMarker(),(z=new g).naturalSize=this.renderAtNaturalSize,z.imageType=this.renderImageType,z.imageQuality=this.renderImageQuality,z.markersOnly=this.renderMarkersOnly,z.width=this.renderWidth,z.height=this.renderHeight,[4,z.rasterize(this.target instanceof HTMLImageElement?this.target:null,this.markerImage,this.renderTarget)];case 1:return J.sent(),[4,z.rasterize(this.target instanceof HTMLImageElement?this.target:null,this.markerImage,this.renderTarget)];case 2:return[2,J.sent()]}})})},fe.prototype.close=function(z){var J=this;if(z===void 0&&(z=!1),this.isOpen){var be=!1;z||this.eventListeners.beforeclose.forEach(function(_e){var oe=new Me(J,!0);_e(oe),oe.defaultPrevented&&(be=!0)}),be||(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(_e){return _e(new Me(J))}),this.detachEvents(),this._isOpen=!1)}},fe.prototype.addMarkersToToolbar=function(){for(var z,J=[],be=0;bethis.editorCanvas.clientHeight?this.editorCanvas.clientHeight*z:this.editorCanvas.clientWidth,be=J',z.title="Powered by marker.js",z.style.display="grid",z.style.alignItems="center",z.style.justifyItems="center",z.style.padding="3px",z.style.width="20px",z.style.height="20px",this.logoUI.appendChild(z),this.editorCanvas.appendChild(this.logoUI),this.logoUI.style.position="absolute",this.logoUI.style.pointerEvents="all",this.positionLogo()},fe.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")},fe.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"},fe.prototype.restoreOverflow=function(){document.body.style.overflow=this.bodyOverflowState,window.scroll({top:this.scrollYState,left:this.scrollXState})},fe.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 z=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=z+"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 h(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-1&&this.markers.splice(this.markers.indexOf(z),1),z.dispose()},fe.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())},fe.prototype.toolbarButtonClicked=function(z,J){if(z==="marker"&&J!==void 0)this.createNewMarker(J);else if(z==="action")switch(J){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()}},fe.prototype.deleteSelectedMarker=function(){var z=this;if(this._currentMarker!==void 0){var J=!1;if(this.eventListeners.markerbeforedelete.forEach(function(_e){var oe=new Re(z,z._currentMarker,!0);_e(oe),oe.defaultPrevented&&(J=!0)}),!J){var be=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(_e){return _e(new Re(z,be))})}}},fe.prototype.clear=function(){var z=this,J=!1;if(this.markers.length>0&&(this.eventListeners.markerbeforedelete.forEach(function(ie){var ve=new Re(z,void 0,!0);ie(ve),ve.defaultPrevented&&(J=!0)}),!J)){this.setCurrentMarker();for(var be=function(ie){var ve=_e.markers[ie];_e.setCurrentMarker(_e.markers[ie]),_e._currentMarker.dispose(),_e.markerImage.removeChild(_e._currentMarker.container),_e.markers.splice(_e.markers.indexOf(_e._currentMarker),1),_e.eventListeners.markerdelete.forEach(function(Ne){return Ne(new Re(z,ve))})},_e=this,oe=this.markers.length-1;oe>=0;oe--)be(oe);this.addUndoStep()}},Object.defineProperty(fe.prototype,"isNotesAreaOpen",{get:function(){return this.notesArea!==void 0},enumerable:!1,configurable:!0}),fe.prototype.showNotesEditor=function(){var z;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=(z=this._currentMarker.notes)!==null&&z!==void 0?z:"",this.overlayContainer.appendChild(this.notesArea))},fe.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)},fe.prototype.selectLastMarker=function(){this.markers.length>0?this.setCurrentMarker(this.markers[this.markers.length-1]):this.setCurrentMarker()},fe.prototype.addUndoStep=function(){var z=this;if(this._currentMarker===void 0||this._currentMarker.state!=="edit"){var J=this.getState(),be=this.undoRedoManager.getLastUndoStep();if(!be||be.width===J.width&&be.height===J.height){var _e=this.undoRedoManager.undoStepCount;this.undoRedoManager.addUndoStep(J),_e1&&this.panTo({x:z.clientX,y:z.clientY}))},fe.prototype.onPointerUp=function(z){this.touchPoints>0&&this.touchPoints--,this.touchPoints===0&&this.isDragging&&this._currentMarker!==void 0&&this._currentMarker.pointerUp(this.clientToLocalCoordinates(z.clientX,z.clientY)),this.isDragging=!1,this.addUndoStep()},fe.prototype.onPointerOut=function(){this.touchPoints>0&&this.touchPoints--},fe.prototype.onKeyUp=function(z){this._currentMarker===void 0||this.notesArea!==void 0||z.key!=="Delete"&&z.key!=="Backspace"||this.deleteSelectedMarker()},fe.prototype.clientToLocalCoordinates=function(z,J){var be=this.markerImage.getBoundingClientRect();return{x:(z-be.left)/this.zoomLevel,y:(J-be.top)/this.zoomLevel}},fe.prototype.onWindowResize=function(){this.positionUI()},fe.prototype.positionUI=function(){switch(this.setTopLeft(),this.settings.displayMode){case"inline":var z=this.target.getClientRects().item(0).y>this.styles.settings.toolbarHeight?this.target.offsetTop-this.styles.settings.toolbarHeight:0;this.coverDiv.style.top=z+"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()},fe.prototype.addLicenseKey=function(z){d.addKey(z)},fe.prototype.addEventListener=function(z,J){this.eventListeners.addEventListener(z,J)},fe.prototype.removeEventListener=function(z,J){this.eventListeners.removeEventListener(z,J)},fe.prototype.renderState=function(z){this._silentRenderMode=!0,this.settings.displayMode="inline",this.isOpen||this.show(),this.restoreState(z),this.startRenderAndClose(),this._silentRenderMode=!1},Object.defineProperty(fe.prototype,"isFocused",{get:function(){return this._isFocused},enumerable:!1,configurable:!0}),fe.prototype.focus=function(){var z=this;this._isFocused||(this.attachWindowEvents(),this._isFocused=!0,this._previousCurrentMarker!==void 0&&this.setCurrentMarker(this._previousCurrentMarker),this.eventListeners.focus.forEach(function(J){return J(new Me(z))}))},fe.prototype.blur=function(){var z=this;this._isFocused&&(this.detachWindowEvents(),this._isFocused=!1,this._previousCurrentMarker=this._currentMarker,this.setCurrentMarker(),this.eventListeners.blur.forEach(function(J){return J(new Me(z))}))},fe.instanceCounter=0,fe}()},89435:function(Ie){"use strict";var Z,b=59;Ie.exports=B;function B(Y){var s="&"+Y+";",E;return Z=Z||document.createElement("i"),Z.innerHTML=s,E=Z.textContent,E.charCodeAt(E.length-1)===b&&Y!=="semi"||E===s?!1:E}},57574:function(Ie,Z,b){"use strict";var B=b(21922),Y=b(93580),s=b(46195),E=b(79480),I=b(7961),u=b(89435);Ie.exports=Le;var d={}.hasOwnProperty,g=String.fromCharCode,y=Function.prototype,S={warning:null,reference:null,text:null,warningContext:null,referenceContext:null,textContext:null,position:{},additional:null,attribute:!1,nonTerminated:!0},v=9,c=10,h=12,m=32,x=38,T=59,_=60,R=61,A=35,N=88,L=120,M=65533,F="named",H="hexadecimal",P="decimal",V={};V[H]=16,V[P]=10;var G={};G[F]=I,G[P]=s,G[H]=E;var Q=1,ne=2,ue=3,ae=4,he=5,ce=6,we=7,me={};me[Q]="Named character references must be terminated by a semicolon",me[ne]="Numeric character references must be terminated by a semicolon",me[ue]="Named character references cannot be empty",me[ae]="Numeric character references cannot be empty",me[he]="Named character references must be known",me[ce]="Numeric character references cannot be disallowed",me[we]="Numeric character references cannot be outside the permissible Unicode range";function Le(ke,De){var Be={},He,Fe;De||(De={});for(Fe in S)He=De[Fe],Be[Fe]=He==null?S[Fe]:He;return(Be.position.indent||Be.position.start)&&(Be.indent=Be.position.indent||[],Be.position=Be.position.start),ee(ke,Be)}function ee(ke,De){var Be=De.additional,He=De.nonTerminated,Fe=De.text,Je=De.reference,Me=De.warning,lt=De.textContext,Re=De.referenceContext,Oe=De.warningContext,pe=De.position,fe=De.indent||[],z=ke.length,J=0,be=-1,_e=pe.column||1,oe=pe.line||1,ie="",ve=[],Ne,ze,Ve,yt,ct,St,_t,At,ht,wt,jt,st,ge,on,mn,Mt,On,Vn,Fn;for(typeof Be=="string"&&(Be=Be.charCodeAt(0)),Mt=Gn(),At=Me?sn:y,J--,z++;++J65535&&(St-=65536,wt+=g(St>>>10|55296),St=56320|St&1023),St=wt+g(St))):on!==F&&At(ae,Vn)),St?(xt(),Mt=Gn(),J=Fn-1,_e+=Fn-ge+1,ve.push(St),On=Gn(),On.offset++,Je&&Je.call(Re,St,{start:Mt,end:On},ke.slice(ge-1,Fn)),Mt=On):(yt=ke.slice(ge-1,Fn),ie+=yt,_e+=yt.length,J=Fn-1)}else ct===10&&(oe++,be++,_e=0),ct===ct?(ie+=g(ct),_e++):xt();return ve.join("");function Gn(){return{line:oe,column:_e,offset:J+(pe.offset||0)}}function sn(gr,Pr){var tr=Gn();tr.column+=Pr,tr.offset+=Pr,Me.call(Oe,me[gr],tr,gr)}function xt(){ie&&(ve.push(ie),Fe&&Fe.call(lt,ie,{start:Mt,end:Gn()}),ie="")}}function se(ke){return ke>=55296&&ke<=57343||ke>1114111}function le(ke){return ke>=1&&ke<=8||ke===11||ke>=13&&ke<=31||ke>=127&&ke<=159||ke>=64976&&ke<=65007||(ke&65535)===65535||(ke&65535)===65534}},42289:function(Ie,Z,b){"use strict";b.d(Z,{Z:function(){return an}});function B(it){"@babel/helpers - typeof";return B=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(dt){return typeof dt}:function(dt){return dt&&typeof Symbol=="function"&&dt.constructor===Symbol&&dt!==Symbol.prototype?"symbol":typeof dt},B(it)}function Y(it,dt){if(B(it)!="object"||!it)return it;var Et=it[Symbol.toPrimitive];if(Et!==void 0){var Dt=Et.call(it,dt||"default");if(B(Dt)!="object")return Dt;throw new TypeError("@@toPrimitive must return a primitive value.")}return(dt==="string"?String:Number)(it)}function s(it){var dt=Y(it,"string");return B(dt)=="symbol"?dt:dt+""}function E(it,dt,Et){return(dt=s(dt))in it?Object.defineProperty(it,dt,{value:Et,enumerable:!0,configurable:!0,writable:!0}):it[dt]=Et,it}function I(it,dt){var Et=Object.keys(it);if(Object.getOwnPropertySymbols){var Dt=Object.getOwnPropertySymbols(it);dt&&(Dt=Dt.filter(function(gn){return Object.getOwnPropertyDescriptor(it,gn).enumerable})),Et.push.apply(Et,Dt)}return Et}function u(it){for(var dt=1;dtit.length)&&(dt=it.length);for(var Et=0,Dt=Array(dt);Etit.length)&&(dt=it.length);for(var Et=0,Dt=new Array(dt);Et0&&arguments[0]!==void 0?arguments[0]:{},dt=it.mark;return dt?dt.startsWith("data-")?dt:"data-".concat(dt):pe}function J(it){if(it.attachTo)return it.attachTo;var dt=document.querySelector("head");return dt||document.body}function be(it){return it==="queue"?"prependQueue":it?"prepend":"append"}function _e(it){return Array.from((fe.get(it)||it).children).filter(function(dt){return dt.tagName==="STYLE"})}function oe(it){var dt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(!L())return null;var Et=dt.csp,Dt=dt.prepend,gn=document.createElement("style");gn.setAttribute(Oe,be(Dt)),Et!=null&&Et.nonce&&(gn.nonce=Et==null?void 0:Et.nonce),gn.innerHTML=it;var Mn=J(dt),In=Mn.firstChild;if(Dt){if(Dt==="queue"){var nn=_e(Mn).filter(function(Ue){return["prepend","prependQueue"].includes(Ue.getAttribute(Oe))});if(nn.length)return Mn.insertBefore(gn,nn[nn.length-1].nextSibling),gn}Mn.insertBefore(gn,In)}else Mn.appendChild(gn);return gn}function ie(it){var dt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},Et=J(dt);return _e(Et).find(function(Dt){return Dt.getAttribute(z(dt))===it})}function ve(it){var dt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},Et=ie(it,dt);if(Et){var Dt=J(dt);Dt.removeChild(Et)}}function Ne(it,dt){var Et=fe.get(it);if(!Et||!Re(document,Et)){var Dt=oe("",dt),gn=Dt.parentNode;fe.set(it,gn),it.removeChild(Dt)}}function ze(){fe.clear()}function Ve(it,dt){var Et=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},Dt=J(Et);Ne(Dt,Et);var gn=ie(dt,Et);if(gn){var Mn,In;if((Mn=Et.csp)!==null&&Mn!==void 0&&Mn.nonce&&gn.nonce!==((In=Et.csp)===null||In===void 0?void 0:In.nonce)){var nn;gn.nonce=(nn=Et.csp)===null||nn===void 0?void 0:nn.nonce}return gn.innerHTML!==it&&(gn.innerHTML=it),gn}var Ue=oe(it,Et);return Ue.setAttribute(z(Et),dt),Ue}var yt;function ct(it){if(typeof document=="undefined")return 0;if(it||yt===void 0){var dt=document.createElement("div");dt.style.width="100%",dt.style.height="200px";var Et=document.createElement("div"),Dt=Et.style;Dt.position="absolute",Dt.top="0",Dt.left="0",Dt.pointerEvents="none",Dt.visibility="hidden",Dt.width="200px",Dt.height="150px",Dt.overflow="hidden",Et.appendChild(dt),document.body.appendChild(Et);var gn=dt.offsetWidth;Et.style.overflow="scroll";var Mn=dt.offsetWidth;gn===Mn&&(Mn=Et.clientWidth),document.body.removeChild(Et),yt=gn-Mn}return yt}function St(it){var dt=it.match(/^(.*)px$/),Et=Number(dt==null?void 0:dt[1]);return Number.isNaN(Et)?ct():Et}function _t(it){if(typeof document=="undefined"||!it||!(it instanceof Element))return{width:0,height:0};var dt=getComputedStyle(it,"::-webkit-scrollbar"),Et=dt.width,Dt=dt.height;return{width:St(Et),height:St(Dt)}}function At(){return document.body.scrollHeight>(window.innerHeight||document.documentElement.clientHeight)&&window.innerWidth>document.body.offsetWidth}var ht="rc-util-locker-".concat(Date.now()),wt=0;function jt(it){var dt=!!it,Et=A.useState(function(){return wt+=1,"".concat(ht,"_").concat(wt)}),Dt=R(Et,1),gn=Dt[0];Fe(function(){if(dt){var Mn=_t(document.body).width,In=At();Ve(` html body { overflow-y: hidden; `.concat(In?"width: calc(100% - ".concat(Mn,"px);"):"",` }`),gn)}else ve(gn);return function(){ve(gn)}},[dt,gn])}var st=!1;function ge(it){return typeof it=="boolean"&&(st=it),st}var on=function(dt){return dt===!1?!1:!L()||!dt?null:typeof dt=="string"?document.querySelector(dt):typeof dt=="function"?dt():dt},mn=A.forwardRef(function(it,dt){var Et=it.open,Dt=it.autoLock,gn=it.getContainer,Mn=it.debug,In=it.autoDestroy,nn=In===void 0?!0:In,Ue=it.children,kr=A.useState(Et),Br=R(kr,2),ei=Br[0],ti=Br[1],Jr=ei||Et;A.useEffect(function(){(nn||Et)&&ti(Et)},[Et,nn]);var Wr=A.useState(function(){return on(gn)}),Ri=R(Wr,2),ri=Ri[0],wr=Ri[1];A.useEffect(function(){var Ji=on(gn);wr(Ji!=null?Ji:null)});var rr=lt(Jr&&!ri,Mn),Ir=R(rr,2),Nr=Ir[0],$r=Ir[1],Yt=ri!=null?ri:Nr;jt(Dt&&Et&&L()&&(Yt===Nr||Yt===document.body));var Sr=null;if(Ue&&Le(Ue)&&dt){var fr=Ue;Sr=fr.ref}var pi=me(Sr,dt);if(!Jr||!L()||ri===void 0)return null;var Pi=Yt===!1||ge(),Ai=Ue;return dt&&(Ai=A.cloneElement(Ue,{ref:pi})),A.createElement(se.Provider,{value:$r},Pi?Ai:(0,N.createPortal)(Ai,Yt))}),Mt=mn,On=Mt;function Vn(){return!!(typeof window!="undefined"&&window.document&&window.document.createElement)}var Fn=Vn()?A.useLayoutEffect:A.useEffect,Gn=function(dt,Et){var Dt=A.useRef(!0);Fn(function(){return dt(Dt.current)},Et),Fn(function(){return Dt.current=!1,function(){Dt.current=!0}},[])},sn=function(dt,Et){Gn(function(Dt){if(!Dt)return dt()},Et)},xt=Gn,gr=A.createContext(null),Pr=A.createContext({}),tr=gr;function ii(){return ii=Object.assign?Object.assign.bind():function(it){for(var dt=1;dt=Vt.F1&&Et<=Vt.F12)return!1;switch(Et){case Vt.ALT:case Vt.CAPS_LOCK:case Vt.CONTEXT_MENU:case Vt.CTRL:case Vt.DOWN:case Vt.END:case Vt.ESC:case Vt.HOME:case Vt.INSERT:case Vt.LEFT:case Vt.MAC_FF_META:case Vt.META:case Vt.NUMLOCK:case Vt.NUM_CENTER:case Vt.PAGE_DOWN:case Vt.PAGE_UP:case Vt.PAUSE:case Vt.PRINT_SCREEN:case Vt.RIGHT:case Vt.SHIFT:case Vt.UP:case Vt.WIN_KEY:case Vt.WIN_KEY_RIGHT:return!1;default:return!0}},isCharacterKey:function(dt){if(dt>=Vt.ZERO&&dt<=Vt.NINE||dt>=Vt.NUM_ZERO&&dt<=Vt.NUM_MULTIPLY||dt>=Vt.A&&dt<=Vt.Z||window.navigator.userAgent.indexOf("WebKit")!==-1&&dt===0)return!0;switch(dt){case Vt.SPACE:case Vt.QUESTION_MARK:case Vt.NUM_PLUS:case Vt.NUM_MINUS:case Vt.NUM_PERIOD:case Vt.NUM_DIVISION:case Vt.SEMICOLON:case Vt.DASH:case Vt.EQUALS:case Vt.COMMA:case Vt.PERIOD:case Vt.SLASH:case Vt.APOSTROPHE:case Vt.SINGLE_QUOTE:case Vt.OPEN_SQUARE_BRACKET:case Vt.BACKSLASH:case Vt.CLOSE_SQUARE_BRACKET:return!0;default:return!1}}},rn=Vt;function Xn(it){"@babel/helpers - typeof";return Xn=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(dt){return typeof dt}:function(dt){return dt&&typeof Symbol=="function"&&dt.constructor===Symbol&&dt!==Symbol.prototype?"symbol":typeof dt},Xn(it)}function Zn(it,dt){if(Xn(it)!=="object"||it===null)return it;var Et=it[Symbol.toPrimitive];if(Et!==void 0){var Dt=Et.call(it,dt||"default");if(Xn(Dt)!=="object")return Dt;throw new TypeError("@@toPrimitive must return a primitive value.")}return(dt==="string"?String:Number)(it)}function ir(it){var dt=Zn(it,"string");return Xn(dt)==="symbol"?dt:String(dt)}function Dr(it,dt,Et){return dt=ir(dt),dt in it?Object.defineProperty(it,dt,{value:Et,enumerable:!0,configurable:!0,writable:!0}):it[dt]=Et,it}function ai(it,dt){var Et=Object.keys(it);if(Object.getOwnPropertySymbols){var Dt=Object.getOwnPropertySymbols(it);dt&&(Dt=Dt.filter(function(gn){return Object.getOwnPropertyDescriptor(it,gn).enumerable})),Et.push.apply(Et,Dt)}return Et}function li(it){for(var dt=1;dt