|
|
!(function(){var Pv=Object.defineProperty,Av=Object.defineProperties;var Nv=Object.getOwnPropertyDescriptors;var Jf=Object.getOwnPropertySymbols;var Rv=Object.prototype.hasOwnProperty,Iv=Object.prototype.propertyIsEnumerable;var Sc=Math.pow,Xd=(Tt,vt,d)=>vt in Tt?Pv(Tt,vt,{enumerable:!0,configurable:!0,writable:!0,value:d}):Tt[vt]=d,Ul=(Tt,vt)=>{for(var d in vt||(vt={}))Rv.call(vt,d)&&Xd(Tt,d,vt[d]);if(Jf)for(var d of Jf(vt))Iv.call(vt,d)&&Xd(Tt,d,vt[d]);return Tt},Qd=(Tt,vt)=>Av(Tt,Nv(vt));var Aa=(Tt,vt,d)=>Xd(Tt,typeof vt!="symbol"?vt+"":vt,d);(self.webpackChunk=self.webpackChunk||[]).push([[6979],{40001:function(Tt,vt,d){"use strict";d.d(vt,{Z:function(){return A}});var l=d(54476),R=d(59301),O={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M912 190h-69.9c-9.8 0-19.1 4.5-25.1 12.2L404.7 724.5 207 474a32 32 0 00-25.1-12.2H112c-6.7 0-10.4 7.7-6.3 12.9l273.9 347c12.8 16.2 37.4 16.2 50.3 0l488.4-618.9c4.1-5.1.4-12.8-6.3-12.8z"}}]},name:"check",theme:"outlined"},_=O,g=d(7657),P=function(x,k){return R.createElement(g.Z,(0,l.Z)({},x,{ref:k,icon:_}))},b=R.forwardRef(P),A=b},84105:function(Tt,vt,d){"use strict";d.d(vt,{Z:function(){return A}});var l=d(54476),R=d(59301),O={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M884 256h-75c-5.1 0-9.9 2.5-12.9 6.6L512 654.2 227.9 262.6c-3-4.1-7.8-6.6-12.9-6.6h-75c-6.5 0-10.3 7.4-6.5 12.7l352.6 486.1c12.8 17.6 39 17.6 51.7 0l352.6-486.1c3.9-5.3.1-12.7-6.4-12.7z"}}]},name:"down",theme:"outlined"},_=O,g=d(7657),P=function(x,k){return R.createElement(g.Z,(0,l.Z)({},x,{ref:k,icon:_}))},b=R.forwardRef(P),A=b},73331:function(Tt,vt,d){"use strict";d.d(vt,{Z:function(){return A}});var l=d(54476),R=d(59301),O={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M942.2 486.2Q889.47 375.11 816.7 305l-50.88 50.88C807.31 395.53 843.45 447.4 874.7 512 791.5 684.2 673.4 766 512 766q-72.67 0-133.87-22.38L323 798.75Q408 838 512 838q288.3 0 430.2-300.3a60.29 60.29 0 000-51.5zm-63.57-320.64L836 122.88a8 8 0 00-11.32 0L715.31 232.2Q624.86 186 512 186q-288.3 0-430.2 300.3a60.3 60.3 0 000 51.5q56.69 119.4 136.5 191.41L112.48 835a8 8 0 000 11.31L155.17 889a8 8 0 0011.31 0l712.15-712.12a8 8 0 000-11.32zM149.3 512C232.6 339.8 350.7 258 512 258c54.54 0 104.13 9.36 149.12 28.39l-70.3 70.3a176 176 0 00-238.13 238.13l-83.42 83.42C223.1 637.49 183.3 582.28 149.3 512zm246.7 0a112.11 112.11 0 01146.2-106.69L401.31 546.2A112 112 0 01396 512z"}},{tag:"path",attrs:{d:"M508 624c-3.46 0-6.87-.16-10.25-.47l-52.82 52.82a176.09 176.09 0 00227.42-227.42l-52.82 52.82c.31 3.38.47 6.79.47 10.25a111.94 111.94 0 01-112 112z"}}]},name:"eye-invisible",theme:"outlined"},_=O,g=d(7657),P=function(x,k){return R.createElement(g.Z,(0,l.Z)({},x,{ref:k,icon:_}))},b=R.forwardRef(P),A=b},15277:function(Tt,vt,d){"use strict";d.d(vt,{Z:function(){return A}});var l=d(54476),R=d(59301),O={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M942.2 486.2C847.4 286.5 704.1 186 512 186c-192.2 0-335.4 100.5-430.2 300.3a60.3 60.3 0 000 51.5C176.6 737.5 319.9 838 512 838c192.2 0 335.4-100.5 430.2-300.3 7.7-16.2 7.7-35 0-51.5zM512 766c-161.3 0-279.4-81.8-362.7-254C232.6 339.8 350.7 258 512 258c161.3 0 279.4 81.8 362.7 254C791.5 684.2 673.4 766 512 766zm-4-430c-97.2 0-176 78.8-176 176s78.8 176 176 176 176-78.8 176-176-78.8-176-176-176zm0 288c-61.9 0-112-50.1-112-112s50.1-112 112-112 112 50.1 112 112-50.1 112-112 112z"}}]},name:"eye",theme:"outlined"},_=O,g=d(7657),P=function(x,k){return R.createElement(g.Z,(0,l.Z)({},x,{ref:k,icon:_}))},b=R.forwardRef(P),A=b},61485:function(Tt,vt,d){"use strict";d.d(vt,{Z:function(){return A}});var l=d(54476),R=d(59301),O={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z"}},{tag:"path",attrs:{d:"M623.6 316.7C593.6 290.4 554 276 512 276s-81.6 14.5-111.6 40.7C369.2 344 352 380.7 352 420v7.6c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8V420c0-44.1 43.1-80 96-80s96 35.9 96 80c0 31.1-22 59.6-56.1 72.7-21.2 8.1-39.2 22.3-52.1 40.9-13.1 19-19.9 41.8-19.9 64.9V620c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8v-22.7a48.3 48.3 0 0130.9-44.8c59-22.7 97.1-74.7 97.1-132.5.1-39.3-17.1-76-48.3-103.3zM472 732a40 40 0 1080 0 40 40 0 10-80 0z"}}]},name:"question-circle",theme:"outlined"},_=O,g=d(7657),P=function(x,k){return R.createElement(g.Z,(0,l.Z)({},x,{ref:k,icon:_}))},b=R.forwardRef(P),A=b},47472:function(Tt,vt,d){"use strict";d.d(vt,{Z:function(){return A}});var l=d(54476),R=d(59301),O={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M909.6 854.5L649.9 594.8C690.2 542.7 712 479 712 412c0-80.2-31.3-155.4-87.9-212.1-56.6-56.7-132-87.9-212.1-87.9s-155.5 31.3-212.1 87.9C143.2 256.5 112 331.8 112 412c0 80.1 31.3 155.5 87.9 212.1C256.5 680.8 331.8 712 412 712c67 0 130.6-21.8 182.7-62l259.7 259.6a8.2 8.2 0 0011.6 0l43.6-43.5a8.2 8.2 0 000-11.6zM570.4 570.4C528 612.7 471.8 636 412 636s-116-23.3-158.4-65.6C211.3 528 188 471.8 188 412s23.3-116.1 65.6-158.4C296 211.3 352.2 188 412 188s116.1 23.2 158.4 65.6S636 352.2 636 412s-23.3 116.1-65.6 158.4z"}}]},name:"search",theme:"outlined"},_=O,g=d(7657),P=function(x,k){return R.createElement(g.Z,(0,l.Z)({},x,{ref:k,icon:_}))},b=R.forwardRef(P),A=b},55532:function(Tt,vt,d){"use strict";d.d(vt,{ni:function(){return Oa},EF:function(){return Wa}});var l=function(it,ft){var Ft=it.nodes,de=it.edges,ye=[],Se={};if(!Ft)throw new Error("invalid nodes data!");return Ft&&Ft.forEach(function(Ue,Je){Se[Ue.id]=Je;var dn=[];ye.push(dn)}),de&&de.forEach(function(Ue){var Je=Ue.source,dn=Ue.target,vn=Se[Je],cn=Se[dn];!vn&&vn!==0||!cn&&cn!==0||(ye[vn][cn]=1,ft||(ye[cn][vn]=1))}),ye},R=l,O=function(it,ft){return it===ft},_=function(){function jt(it,ft){ft===void 0&&(ft=null),this.value=it,this.next=ft}return jt.prototype.toString=function(it){return it?it(this.value):"".concat(this.value)},jt}(),g=function(){function jt(it){it===void 0&&(it=O),this.head=null,this.tail=null,this.compare=it}return jt.prototype.prepend=function(it){var ft=new _(it,this.head);return this.head=ft,this.tail||(this.tail=ft),this},jt.prototype.append=function(it){var ft=new _(it);return this.head?(this.tail.next=ft,this.tail=ft,this):(this.head=ft,this.tail=ft,this)},jt.prototype.delete=function(it){if(!this.head)return null;for(var ft=null;this.head&&this.compare(this.head.value,it);)ft=this.head,this.head=this.head.next;var Ft=this.head;if(Ft!==null)for(;Ft.next;)this.compare(Ft.next.value,it)?(ft=Ft.next,Ft.next=Ft.next.next):Ft=Ft.next;return this.compare(this.tail.value,it)&&(this.tail=Ft),ft},jt.prototype.find=function(it){var ft=it.value,Ft=ft===void 0?void 0:ft,de=it.callback,ye=de===void 0?void 0:de;if(!this.head)return null;for(var Se=this.head;Se;){if(ye&&ye(Se.value)||Ft!==void 0&&this.compare(Se.value,Ft))return Se;Se=Se.next}return null},jt.prototype.deleteTail=function(){var it=this.tail;if(this.head===this.tail)return this.head=null,this.tail=null,it;for(var ft=this.head;ft.next;)ft.next.next?ft=ft.next:ft.next=null;return this.tail=ft,it},jt.prototype.deleteHead=function(){if(!this.head)return null;var it=this.head;return this.head.next?this.head=this.head.next:(this.head=null,this.tail=null),it},jt.prototype.fromArray=function(it){var ft=this;return it.forEach(function(Ft){return ft.append(Ft)}),this},jt.prototype.toArray=function(){for(var it=[],ft=this.head;ft;)it.push(ft),ft=ft.next;return it},jt.prototype.reverse=function(){for(var it=this.head,ft=null,Ft=null;it;)Ft=it.next,it.next=ft,ft=it,it=Ft;this.tail=this.head,this.head=ft},jt.prototype.toString=function(it){return it===void 0&&(it=void 0),this.toArray().map(function(ft){return ft.toString(it)}).toString()},jt}(),P=g,b=function(){function jt(){this.linkedList=new P}return jt.prototype.isEmpty=function(){return!this.linkedList.head},jt.prototype.peek=function(){return this.linkedList.head?this.linkedList.head.value:null},jt.prototype.enqueue=function(it){this.linkedList.append(it)},jt.prototype.dequeue=function(){var it=this.linkedList.deleteHead();return it?it.value:null},jt.prototype.toString=function(it){return this.linkedList.toString(it)},jt}(),A=b,I=function(it,ft,Ft){ft===void 0&&(ft=[]);var de=ft.filter(function(Je){return Je.source===it||Je.target===it});if(Ft==="target"){var ye=function(dn){return dn.source===it};return de.filter(ye).map(function(Je){return Je.target})}if(Ft==="source"){var Se=function(dn){return dn.target===it};return de.filter(Se).map(function(Je){return Je.source})}var Ue=function(dn){return dn.source===it?dn.target:dn.source};return de.map(Ue)},x=function(it,ft){return ft.filter(function(Ft){return Ft.source===it})},k=function(it,ft){return ft.filter(function(Ft){return Ft.source===it||Ft.target===it})},N=function(it){it===void 0&&(it=0);var ft="".concat(Math.random()).split(".")[1].substr(0,5),Ft="".concat(Math.random()).split(".")[1].substr(0,5);return"".concat(it,"-").concat(ft).concat(Ft)};function et(jt){jt===void 0&&(jt={});var it=jt,ft=function(){},Ft=function(){var de={};return function(ye){var Se=ye.next,Ue=Se;return de[Ue]?!1:(de[Ue]=!0,!0)}}();return it.allowTraversal=jt.allowTraversal||Ft,it.enter=jt.enter||ft,it.leave=jt.leave||ft,it}var tt=function(it,ft,Ft,de){de===void 0&&(de=!0);var ye=et(Ft),Se=new A,Ue=it.edges,Je=Ue===void 0?[]:Ue;Se.enqueue(ft);for(var dn="",vn=function(){var Nn=Se.dequeue();ye.enter({current:Nn,previous:dn}),I(Nn,Je,de?"target":void 0).forEach(function(Mn){ye.allowTraversal({previous:dn,current:Nn,next:Mn})&&Se.enqueue(Mn)}),ye.leave({current:Nn,previous:dn}),dn=Nn};!Se.isEmpty();)vn()},Ct=tt,ut=function(it){for(var ft=it.nodes,Ft=ft===void 0?[]:ft,de=it.edges,ye=de===void 0?[]:de,Se=[],Ue={},Je=[],dn=function Mn(zn){Je.push(zn),Ue[zn.id]=!0;for(var Gn=I(zn.id,ye),jn=function(gr){var Nr=Gn[gr];if(!Ue[Nr]){var kr=Ft.filter(function(Rr){return Rr.id===Nr});kr.length>0&&Mn(kr[0])}},tr=0;tr<Gn.length;++tr)jn(tr)},vn=0;vn<Ft.length;vn++){var cn=Ft[vn];if(!Ue[cn.id]){dn(cn);for(var Nn=[];Je.length>0;)Nn.push(Je.pop());Se.push(Nn)}}return Se},nt=function(it){for(var ft=it.nodes,Ft=ft===void 0?[]:ft,de=it.edges,ye=de===void 0?[]:de,Se=[],Ue={},Je={},dn={},vn=[],cn=0,Nn=function jn(tr){Je[tr.id]=cn,dn[tr.id]=cn,cn+=1,Se.push(tr),Ue[tr.id]=!0;for(var ur=I(tr.id,ye,"target").filter(function(li){return Ft.map(function(Qr){return Qr.id}).indexOf(li)>-1}),gr=function(Qr){var ti=ur[Qr];if(!Je[ti]&&Je[ti]!==0){var vi=Ft.filter(function(ci){return ci.id===ti});vi.length>0&&jn(vi[0]),dn[tr.id]=Math.min(dn[tr.id],dn[ti])}else Ue[ti]&&(dn[tr.id]=Math.min(dn[tr.id],Je[ti]))},Nr=0;Nr<ur.length;Nr++)gr(Nr);if(dn[tr.id]===Je[tr.id]){for(var kr=[];Se.length>0;){var Rr=Se.pop();if(Ue[Rr.id]=!1,kr.push(Rr),Rr===tr)break}kr.length>0&&vn.push(kr)}},Mn=0,zn=Ft;Mn<zn.length;Mn++){var Gn=zn[Mn];!Je[Gn.id]&&Je[Gn.id]!==0&&Nn(Gn)}return vn};function kt(jt,it){return it?nt(jt):ut(jt)}var Nt=function(it){var ft={},Ft=it.nodes,de=Ft===void 0?[]:Ft,ye=it.edges,Se=ye===void 0?[]:ye;return de.forEach(function(Ue){ft[Ue.id]={degree:0,inDegree:0,outDegree:0}}),Se.forEach(function(Ue){ft[Ue.source].degree++,ft[Ue.source].outDegree++,ft[Ue.target].degree++,ft[Ue.target].inDegree++}),ft},Bt=Nt,Xt=function(it,ft){var Ft=Nt(it);return Ft[ft]?Nt(it)[ft].inDegree:0},wt=function(it,ft){var Ft=Nt(it);return Ft[ft]?Nt(it)[ft].outDegree:0};function ot(jt){jt===void 0&&(jt={});var it=jt,ft=function(){},Ft=function(){var de={};return function(ye){var Se=ye.next;return de[Se]?!1:(de[Se]=!0,!0)}}();return it.allowTraversal=jt.allowTraversal||Ft,it.enter=jt.enter||ft,it.leave=jt.leave||ft,it}function It(jt,it,ft,Ft,de){de===void 0&&(de=!0),Ft.enter({current:it,previous:ft});var ye=jt.edges,Se=ye===void 0?[]:ye;I(it,Se,de?"target":void 0).forEach(function(Ue){Ft.allowTraversal({previous:ft,current:it,next:Ue})&&It(jt,Ue,it,Ft,de)}),Ft.leave({current:it,previous:ft})}function zt(jt,it,ft,Ft){Ft===void 0&&(Ft=!0),It(jt,it,"",ot(ft),Ft)}var Ot=function(it){var ft=null,Ft=it.nodes,de=Ft===void 0?[]:Ft,ye={},Se={},Ue={},Je={};de.forEach(function(cn){Se[cn.id]=cn});for(var dn={enter:function(Nn){var Mn=Nn.current,zn=Nn.previous;if(Ue[Mn]){ft={};for(var Gn=Mn,jn=zn;jn!==Mn;)ft[Gn]=jn,Gn=jn,jn=ye[jn];ft[Gn]=jn}else Ue[Mn]=Mn,delete Se[Mn],ye[Mn]=zn},leave:function(Nn){var Mn=Nn.current;Je[Mn]=Mn,delete Ue[Mn]},allowTraversal:function(Nn){var Mn=Nn.next;return ft?!1:!Je[Mn]}};Object.keys(Se).length;){var vn=Object.keys(Se)[0];zt(it,vn,dn)}return ft},pe=function(it,ft,Ft){var de,ye;Ft===void 0&&(Ft=!0);for(var Se=[],Ue=kt(it,!1),Je=0,dn=Ue;Je<dn.length;Je++){var vn=dn[Je];if(vn.length)for(var cn=vn[0],Nn=cn.id,Mn=[cn],zn=(de={},de[Nn]=cn,de),Gn=(ye={},ye[Nn]=new Set,ye);Mn.length>0;)for(var jn=Mn.pop(),tr=jn.id,ur=I(tr,it.edges),gr=function(Rr){var li,Qr=ur[Rr],ti=it.nodes.find(function(B){return B.id===Qr});if(Qr===tr)Se.push((li={},li[Qr]=jn,li));else if(!(Qr in Gn))zn[Qr]=jn,Mn.push(ti),Gn[Qr]=new Set([jn]);else if(!Gn[tr].has(ti)){for(var vi=!0,ci=[ti,jn],W=zn[tr];Gn[Qr].size&&!Gn[Qr].has(W)&&(ci.push(W),W!==zn[W.id]);)W=zn[W.id];if(ci.push(W),ft&&Ft?(vi=!1,ci.findIndex(function(B){return ft.indexOf(B.id)>-1})>-1&&(vi=!0)):ft&&!Ft&&ci.findIndex(function(B){return ft.indexOf(B.id)>-1})>-1&&(vi=!1),vi){for(var j={},F=1;F<ci.length;F+=1)j[ci[F-1].id]=ci[F];ci.length&&(j[ci[ci.length-1].id]=ci[0]),Se.push(j)}Gn[Qr].add(jn)}},Nr=0;Nr<ur.length;Nr+=1)gr(Nr)}return Se},xe=function(it,ft,Ft){Ft===void 0&&(Ft=!0);for(var de=[],ye=new Set,Se=[],Ue=[],Je={},dn={},vn=function(W){for(var j=[W];j.length>0;){var F=j.pop();ye.has(F)&&(ye.delete(F),Se[F.id].forEach(function(B){j.push(B)}),Se[F.id].clear())}},cn=function ci(W,j,F){var B=!1;if(ft&&Ft===!1&&ft.indexOf(W.id)>-1)return B;de.push(W),ye.add(W);for(var K=F[W.id],dt=0;dt<K.length;dt+=1){var St=Je[K[dt]];if(St===j){for(var Et={},Zt=1;Zt<de.length;Zt+=1)Et[de[Zt-1].id]=de[Zt];de.length&&(Et[de[de.length-1].id]=de[0]),Ue.push(Et),B=!0}else ye.has(St)||ci(St,j,F)&&(B=!0)}if(B)vn(W);else for(var dt=0;dt<K.length;dt+=1){var St=Je[K[dt]];Se[St.id].has(W)||Se[St.id].add(W)}return de.pop(),B},Nn=it.nodes,Mn=Nn===void 0?[]:Nn,zn=0;zn<Mn.length;zn+=1){var Gn=Mn[zn],jn=Gn.id;dn[jn]=zn,Je[zn]=Gn}if(ft&&Ft)for(var tr=function(W){var j=ft[W];dn[Mn[W].id]=dn[j],dn[j]=0,Je[0]=Mn.find(function(F){return F.id===j}),Je[dn[Mn[W].id]]=Mn[W]},zn=0;zn<ft.length;zn++)tr(zn);for(var ur=function(W){for(var j,F,B=1/0,K=0;K<W.length;K+=1)for(var dt=W[K],St=0;St<dt.length;St++){var Et=dn[dt[St].id];Et<B&&(B=Et,F=K)}for(var Zt=W[F],ce=[],K=0;K<Zt.length;K+=1){var Ae=Zt[K];ce[Ae.id]=[];for(var Le=0,$e=I(Ae.id,it.edges,"target").filter(function(bn){return Zt.map(function(xn){return xn.id}).indexOf(bn)>-1});Le<$e.length;Le++){var Xe=$e[Le];Xe===Ae.id&&!(Ft===!1&&ft.indexOf(Ae.id)>-1)?Ue.push((j={},j[Ae.id]=Ae,j)):ce[Ae.id].push(dn[Xe])}}return{component:Zt,adjList:ce,minIdx:B}},gr=0;gr<Mn.length;){var Nr=Mn.filter(function(ci){return dn[ci.id]>=gr}),kr=nt({nodes:Nr,edges:it.edges}).filter(function(ci){return ci.length>1});if(kr.length===0)break;var Rr=ur(kr),li=Rr.minIdx,Qr=Rr.adjList,ti=Rr.component;if(ti.length>1){ti.forEach(function(ci){Se[ci.id]=new Set});var vi=Je[li];if(ft&&Ft&&ft.indexOf(vi.id)===-1)return Ue;cn(vi,vi,Qr),gr=li+1}else break}return Ue},qt=function(it,ft,Ft,de){return de===void 0&&(de=!0),ft?xe(it,Ft,de):pe(it,Ft,de)},Ye=Ot,We=d(80813),Oe={}.toString,Qe=function(jt,it){return Oe.call(jt)==="[object "+it+"]"},Mt=Qe,ne=function(jt){return Mt(jt,"Function")},Me=function(jt){return Array.isArray?Array.isArray(jt):Mt(jt,"Array")},nn=function(jt){var it=typeof jt;return jt!==null&&it==="object"||it==="function"};function le(jt,it){if(jt){var ft;if(Me(jt))for(var Ft=0,de=jt.length;Ft<de&&(ft=it(jt[Ft],Ft),ft!==!1);Ft++);else if(nn(jt)){for(var ye in jt)if(jt.hasOwnProperty(ye)&&(ft=it(jt[ye],ye),ft===!1))break}}}var be=le,De=Object.keys?function(jt){return Object.keys(jt)}:function(jt){var it=[];return be(jt,function(ft,Ft){ne(jt)&&Ft==="prototype"||it.push(Ft)}),it},Yt=null;function re(jt,it){var ft=keys(it),Ft=ft.length;if(isNil(jt))return!Ft;for(var de=0;de<Ft;de+=1){var ye=ft[de];if(it[ye]!==jt[ye]||!(ye in jt))return!1}return!0}var xt=null,at=function(jt){if(!isObjectLike(jt)||!isType(jt,"Object"))return!1;if(Object.getPrototypeOf(jt)===null)return!0;for(var it=jt;Object.getPrototypeOf(it)!==null;)it=Object.getPrototypeOf(it);return Object.getPrototypeOf(jt)===it},se=null;function Fe(jt,it){if(!isArray(jt))return null;var ft;if(isFunction(it)&&(ft=it),isPlainObject(it)&&(ft=function(de){return isMatch(de,it)}),ft){for(var Ft=0;Ft<jt.length;Ft+=1)if(ft(jt[Ft]))return jt[Ft]}return null}var Re=null,ge=function(jt,it){for(var ft=null,Ft=0;Ft<jt.length;Ft++){var de=jt[Ft],ye=de[it];if(!isNil(ye)){isArray(ye)?ft=ye[0]:ft=ye;break}}return ft},Ie=null,Ne=function(jt){if(!isArray(jt))return[];for(var it=[],ft=0;ft<jt.length;ft++)it=it.concat(jt[ft]);return it},bt=null,Jt=function(jt,it){if(it===void 0&&(it=[]),!isArray(jt))it.push(jt);else for(var ft=0;ft<jt.length;ft+=1)Jt(jt[ft],it);return it},oe=null,M=function(jt){if(isArray(jt))return jt.reduce(function(it,ft){return Math.max(it,ft)},jt[0])},Q=function(jt){if(isArray(jt))return jt.reduce(function(it,ft){return Math.min(it,ft)},jt[0])},te=function(jt){var it=jt.filter(function(Se){return!isNaN(Se)});if(!it.length)return{min:0,max:0};if(isArray(jt[0])){for(var ft=[],Ft=0;Ft<jt.length;Ft++)ft=ft.concat(jt[Ft]);it=ft}var de=getMax(it),ye=getMin(it);return{min:ye,max:de}},Ut=null,we=Array.prototype,Ce=we.splice,_e=we.indexOf,mt=function(jt){for(var it=[],ft=1;ft<arguments.length;ft++)it[ft-1]=arguments[ft];for(var Ft=0;Ft<it.length;Ft++)for(var de=it[Ft],ye=-1;(ye=_e.call(jt,de))>-1;)Ce.call(jt,ye,1);return jt},X=null,Pt=Array.prototype.splice,At=function(it,ft){if(!isArrayLike(it))return[];for(var Ft=it?ft.length:0,de=Ft-1;Ft--;){var ye=void 0,Se=ft[Ft];(Ft===de||Se!==ye)&&(ye=Se,Pt.call(it,Se,1))}return it},Rt=null,_t=function(jt,it,ft){if(!isArray(jt)&&!isPlainObject(jt))return jt;var Ft=ft;return each(jt,function(de,ye){Ft=it(Ft,de,ye)}),Ft},Vt=null,ae=function(jt,it){var ft=[];if(!isArrayLike(jt))return ft;for(var Ft=-1,de=[],ye=jt.length;++Ft<ye;){var Se=jt[Ft];it(Se,Ft,jt)&&(ft.push(Se),de.push(Ft))}return pullAt(jt,de),ft},fe=null,me=function(jt){return Mt(jt,"String")};function Ze(jt,it){var ft;if(isFunction(it))ft=function(de,ye){return it(de)-it(ye)};else{var Ft=[];isString(it)?Ft.push(it):isArray(it)&&(Ft=it),ft=function(de,ye){for(var Se=0;Se<Ft.length;Se+=1){var Ue=Ft[Se];if(de[Ue]>ye[Ue])return 1;if(de[Ue]<ye[Ue])return-1}return 0}}return jt.sort(ft),jt}var Ge=null;function Ve(jt,it){it===void 0&&(it=new Map);var ft=[];if(Array.isArray(jt))for(var Ft=0,de=jt.length;Ft<de;Ft++){var ye=jt[Ft];it.has(ye)||(ft.push(ye),it.set(ye,!0))}return ft}var rn=function(jt,it){for(var ft=[],Ft={},de=0;de<jt.length;de++){var ye=jt[de],Se=ye[it];if(!isNil(Se)){isArray(Se)||(Se=[Se]);for(var Ue=0;Ue<Se.length;Ue++){var Je=Se[Ue];Ft[Je]||(ft.push(Je),Ft[Je]=!0)}}}return ft};function wn(jt,it){return isArray(jt)||isString(jt)?jt[0]===it:!1}var on=null;function _n(jt,it){return isArray(jt)||isString(jt)?jt[jt.length-1]===it:!1}var Cn=null,Ln=Object.prototype.hasOwnProperty;function En(jt,it){if(!it||!isArray(jt))return{};for(var ft={},Ft=isFunction(it)?it:function(Ue){return Ue[it]},de,ye=0;ye<jt.length;ye++){var Se=jt[ye];de=Ft(Se),Ln.call(ft,de)?ft[de].push(Se):ft[de]=[Se]}return ft}var cr=null;function Bn(jt,it){if(!it)return{0:jt};if(!isFunction(it)){var ft=isArray(it)?it:it.replace(/\s+/g,"").split("*");it=function(Ft){for(var de="_",ye=0,Se=ft.length;ye<Se;ye++)de+=Ft[ft[ye]]&&Ft[ft[ye]].toString();return de}}return groupBy(jt,it)}var br=function(jt,it){if(!it)return[jt];var ft=groupToMap(jt,it),Ft=[];for(var de in ft)Ft.push(ft[de]);return Ft},fr={};function Zr(jt){var it=fr[jt];if(!it){for(var ft=jt.toString(16),Ft=ft.length;Ft<6;Ft++)ft="0"+ft;it="#"+ft,fr[jt]=it}return it}var di=null;function Xr(jt){var it=0,ft=0,Ft=0,de=0;return isArray(jt)?jt.length===1?it=ft=Ft=de=jt[0]:jt.length===2?(it=Ft=jt[0],ft=de=jt[1]):jt.length===3?(it=jt[0],ft=de=jt[1],Ft=jt[2]):(it=jt[0],ft=jt[1],Ft=jt[2],de=jt[3]):it=ft=Ft=de=jt,{r1:it,r2:ft,r3:Ft,r4:de}}var Mr=null,gi=function(jt){return Mt(jt,"Number")},yi=gi,_i=function(jt){return isNumber(jt)&&jt%1!==0},qr=null,Jn=function(jt){return isNumber(jt)&&jt%2===0},sn=null,Wt=Number.isInteger?Number.isInteger:function(jt){return yi(jt)&&jt%1===0},y=null,E=function(jt){return isNumber(jt)&&jt<0},c=null,f=function(jt){return isNumber(jt)&&jt%2!==0},w=null,Z=function(jt){return isNumber(jt)&&jt>0},z=null,H=function(jt,it){if(isArray(jt)){for(var ft,Ft=-1/0,de=0;de<jt.length;de++){var ye=jt[de],Se=isFunction(it)?it(ye):ye[it];Se>Ft&&(ft=ye,Ft=Se)}return ft}},q=function(jt,it){if(isArray(jt)){for(var ft,Ft=1/0,de=0;de<jt.length;de++){var ye=jt[de],Se=isFunction(it)?it(ye):ye[it];Se<Ft&&(ft=ye,Ft=Se)}return ft}},Dt=180/Math.PI,U=function(jt){return Dt*jt},Y=null,G=Math.PI/180,J=function(jt){return G*jt},pt=null,Kt=null,yt=Object.values?function(jt){return Object.values(jt)}:function(jt){var it=[];return be(jt,function(ft,Ft){ne(jt)&&Ft==="prototype"||it.push(ft)}),it},Qt=yt,ct=function(jt,it){return contains(values(jt),it)},ht={}.toString,rt=function(jt){return ht.call(jt).replace(/^\[object /,"").replace(/]$/,"")},$t=null,Ht=function(jt){return isType(jt,"Arguments")},ue=null,Ee=function(jt){return isType(jt,"Boolean")},ie=null,Pe=function(jt){return isType(jt,"Date")},Be=null,He=function(jt){return isType(jt,"Error")},en=null;function un(jt){return isNumber(jt)&&isFinite(jt)}var mn=Object.prototype,Sn=function(jt){var it=jt&&jt.constructor,ft=typeof it=="function"&&it.prototype||mn;return jt===ft},Pn=null,$n=function(jt){return isType(jt,"RegExp")},Wn=null,Xn=function(){for(var jt=[],it=0;it<arguments.length;it++)jt[it]=arguments[it];for(var ft=jt[0],Ft=1;Ft<jt.length;Ft++){var de=jt[Ft];isFunction(de)&&(de=de.prototype),mix(ft.prototype,de)}},An=null,Zn=function(jt){if(typeof jt!="object"||jt===null)return jt;var it;if(Me(jt)){it=[];for(var ft=0,Ft=jt.length;ft<Ft;ft++)typeof jt[ft]=="object"&&jt[ft]!=null?it[ft]=Zn(jt[ft]):it[ft]=jt[ft]}else{it={};for(var de in jt)typeof jt[de]=="object"&&jt[de]!=null?it[de]=Zn(jt[de]):it[de]=jt[de]}return it},qn=Zn,er=function(jt,it){if(!ne(jt))throw new TypeError("Expected a function");var ft=function(){for(var Ft=[],de=0;de<arguments.length;de++)Ft[de]=arguments[de];var ye=it?it.apply(this,Ft):Ft[0],Se=ft.cache;if(Se.has(ye))return Se.get(ye);var Ue=jt.apply(this,Ft);return Se.set(ye,Ue),Ue};return ft.cache=new Map,ft},Cr=5;function Un(jt,it,ft,Ft){ft=ft||0,Ft=Ft||Cr;for(var de in it)if(it.hasOwnProperty(de)){var ye=it[de];ye!==null&&isPlainObject(ye)?(isPlainObject(jt[de])||(jt[de]={}),ft<Ft?Un(jt[de],ye,ft+1,Ft):jt[de]=it[de]):isArray(ye)?(jt[de]=[],jt[de]=jt[de].concat(ye)):ye!==void 0&&(jt[de]=ye)}}var ar=function(jt){for(var it=[],ft=1;ft<arguments.length;ft++)it[ft-1]=arguments[ft];for(var Ft=0;Ft<it.length;Ft+=1)Un(jt,it[Ft]);return jt},ii=null,Or=function(jt,it,ft,Ft){isFunction(it)||(ft=it,it=jt,jt=function(){});var de=Object.create?function(Se,Ue){return Object.create(Se,{constructor:{value:Ue}})}:function(Se,Ue){function Je(){}Je.prototype=Se;var dn=new Je;return dn.constructor=Ue,dn},ye=de(it.prototype,jt);return jt.prototype=mix(ye,jt.prototype),jt.superclass=de(it.prototype,it),mix(ye,ft),mix(jt,Ft),jt},Lr=null,fi=Object.prototype.hasOwnProperty;function zr(jt){if(isNil(jt))return!0;if(isArrayLike(jt))return!jt.length;var it=getType(jt);if(it==="Map"||it==="Set")return!jt.size;if(isPrototype(jt))return!Object.keys(jt).length;for(var ft in jt)if(fi.call(jt,ft))return!1;return!0}var Er=null,mr=function(jt){return typeof jt=="object"&&jt!==null},si=mr,Si=function(jt){return jt!==null&&typeof jt!="function"&&isFinite(jt.length)},Mi=Si,pi=function(jt,it){if(jt===it)return!0;if(!jt||!it||me(jt)||me(it))return!1;if(Mi(jt)||Mi(it)){if(jt.length!==it.length)return!1;for(var ft=!0,Ft=0;Ft<jt.length&&(ft=pi(jt[Ft],it[Ft]),!!ft);Ft++);return ft}if(si(jt)||si(it)){var de=Object.keys(jt),ye=Object.keys(it);if(de.length!==ye.length)return!1;for(var ft=!0,Ft=0;Ft<de.length&&(ft=pi(jt[de[Ft]],it[de[Ft]]),!!ft);Ft++);return ft}return!1},Wi=pi,Ji=function(jt,it,ft){return isFunction(ft)?!!ft(jt,it):isEqual(jt,it)},Hn=function(jt,it,ft){for(var Ft=0,de=isString(it)?it.split("."):it;jt&&Ft<de.length;)jt=jt[de[Ft++]];return jt===void 0||Ft<de.length?ft:jt},ra=function(jt,it,ft){var Ft=jt,de=isString(it)?it.split("."):it;return de.forEach(function(ye,Se){Se<de.length-1?(isObject(Ft[ye])||(Ft[ye]=isNumber(de[Se+1])?[]:{}),Ft=Ft[ye]):Ft[ye]=ft}),jt},Tr=Object.prototype.hasOwnProperty,hr=function(jt,it){if(jt===null||!isPlainObject(jt))return{};var ft={};return each(it,function(Ft){Tr.call(jt,Ft)&&(ft[Ft]=jt[Ft])}),ft},$r=function(jt,it){return reduce(jt,function(ft,Ft,de){return it.includes(de)||(ft[de]=Ft),ft},{})},ni={},Bi=function(jt){return jt=jt||"g",ni[jt]?ni[jt]+=1:ni[jt]=1,jt+ni[jt]},ya,qi=er(function(jt,it){it===void 0&&(it={});var ft=it.fontSize,Ft=it.fontFamily,de=it.fontWeight,ye=it.fontStyle,Se=it.fontVariant;return ya||(ya=document.createElement("canvas").getContext("2d")),ya.font=[ye,Se,de,ft+"px",Ft].join(" "),ya.measureText(me(jt)?jt:"").width},function(jt,it){return it===void 0&&(it={}),(0,We.pr)([jt],Qt(it)).join("")}),va=function(jt,it,ft,Ft){Ft===void 0&&(Ft="...");var de=16,ye=measureTextWidth(Ft,ft),Se=isString(jt)?jt:toString(jt),Ue=it,Je=[],dn,vn;if(measureTextWidth(jt,ft)<=it)return jt;for(;dn=Se.substr(0,de),vn=measureTextWidth(dn,ft),!(vn+ye>Ue&&vn>Ue);)if(Je.push(dn),Ue-=vn,Se=Se.substr(de),!Se)return Je.join("");for(;dn=Se.substr(0,1),vn=measureTextWidth(dn,ft),!(vn+ye>Ue);)if(Je.push(dn),Ue-=vn,Se=Se.substr(1),!Se)return Je.join("");return""+Je.join("")+Ft},Ka=function(){function jt(){this.map={}}return jt.prototype.has=function(it){return this.map[it]!==void 0},jt.prototype.get=function(it,ft){var Ft=this.map[it];return Ft===void 0?ft:Ft},jt.prototype.set=function(it,ft){this.map[it]=ft},jt.prototype.clear=function(){this.map={}},jt.prototype.delete=function(it){delete this.map[it]},jt.prototype.size=function(){return Object.keys(this.map).length},jt}(),ea=null,Na=function(it,ft,Ft){for(var de=1/0,ye,Se=0;Se<ft.length;Se++){var Ue=ft[Se].id;!Ft[Ue]&&it[Ue]<=de&&(de=it[Ue],ye=ft[Se])}return ye},Fa=function(it,ft,Ft,de){var ye=it.nodes,Se=ye===void 0?[]:ye,Ue=it.edges,Je=Ue===void 0?[]:Ue,dn=[],vn={},cn={},Nn={};Se.forEach(function(gr,Nr){var kr=gr.id;dn.push(kr),cn[kr]=1/0,kr===ft&&(cn[kr]=0)});for(var Mn=Se.length,zn=function(Nr){var kr=Na(cn,Se,vn),Rr=kr.id;if(vn[Rr]=!0,cn[Rr]===1/0)return"continue";var li=[];Ft?li=x(Rr,Je):li=k(Rr,Je),li.forEach(function(Qr){var ti=Qr.target,vi=Qr.source,ci=ti===Rr?vi:ti,W=de&&Qr[de]?Qr[de]:1;cn[ci]>cn[kr.id]+W?(cn[ci]=cn[kr.id]+W,Nn[ci]=[kr.id]):cn[ci]===cn[kr.id]+W&&Nn[ci].push(kr.id)})},Gn=0;Gn<Mn;Gn++)zn(Gn);Nn[ft]=[ft];var jn={};for(var tr in cn)cn[tr]!==1/0&&ja(ft,tr,Nn,jn);var ur={};for(var tr in jn)ur[tr]=jn[tr][0];return{length:cn,path:ur,allPath:jn}},da=Fa;function ja(jt,it,ft,Ft){if(jt===it)return[jt];if(Ft[it])return Ft[it];for(var de=[],ye=0,Se=ft[it];ye<Se.length;ye++){var Ue=Se[ye],Je=ja(jt,Ue,ft,Ft);if(!Je)return;for(var dn=0,vn=Je;dn<vn.length;dn++){var cn=vn[dn];Me(cn)?de.push((0,We.ev)((0,We.ev)([],cn,!0),[it],!1)):de.push([cn,it])}}return Ft[it]=de,Ft[it]}var Oa=function(it,ft,Ft,de,ye){var Se=da(it,ft,de,ye),Ue=Se.length,Je=Se.path,dn=Se.allPath;return{length:Ue[Ft],path:Je[Ft],allPath:dn[Ft]}},Ra=function(it,ft,Ft,de){var ye;if(ft===Ft)return[[ft]];var Se=it.edges,Ue=Se===void 0?[]:Se,Je=[ft],dn=(ye={},ye[ft]=!0,ye),vn=[],cn=[],Nn=de?I(ft,Ue,"target"):I(ft,Ue);for(vn.push(Nn);Je.length>0&&vn.length>0;){var Mn=vn[vn.length-1];if(Mn.length){var zn=Mn.shift();zn&&(Je.push(zn),dn[zn]=!0,Nn=de?I(zn,Ue,"target"):I(zn,Ue),vn.push(Nn.filter(function(tr){return!dn[tr]})))}else{var Gn=Je.pop();dn[Gn]=!1,vn.pop();continue}if(Je[Je.length-1]===Ft){var jn=Je.map(function(ur){return ur});cn.push(jn);var Gn=Je.pop();dn[Gn]=!1,vn.pop()}}return cn},Xa=function(it,ft){for(var Ft=R(it,ft),de=[],ye=Ft.length,Se=0;Se<ye;Se+=1){de[Se]=[];for(var Ue=0;Ue<ye;Ue+=1)Se===Ue?de[Se][Ue]=0:Ft[Se][Ue]===0||!Ft[Se][Ue]?de[Se][Ue]=1/0:de[Se][Ue]=Ft[Se][Ue]}for(var Je=0;Je<ye;Je+=1)for(var Se=0;Se<ye;Se+=1)for(var Ue=0;Ue<ye;Ue+=1)de[Se][Ue]>de[Se][Je]+de[Je][Ue]&&(de[Se][Ue]=de[Se][Je]+de[Je][Ue]);return de},oo=Xa,Ia=function(it,ft,Ft,de){ft===void 0&&(ft=!1),Ft===void 0&&(Ft="weight"),de===void 0&&(de=1e3);var ye=it.nodes,Se=ye===void 0?[]:ye,Ue=it.edges,Je=Ue===void 0?[]:Ue,dn={},vn={};Se.forEach(function(Nr,kr){var Rr=N();Nr.clusterId=Rr,dn[Rr]={id:Rr,nodes:[Nr]},vn[Nr.id]={node:Nr,idx:kr}});var cn=R(it,ft),Nn=[],Mn={};cn.forEach(function(Nr,kr){var Rr=0,li=Se[kr].id;Mn[li]={},Nr.forEach(function(Qr,ti){if(Qr){Rr+=Qr;var vi=Se[ti].id;Mn[li][vi]=Qr}}),Nn.push(Rr)});for(var zn=0,Gn=function(){var kr=!1;if(Se.forEach(function(Rr){var li={};Object.keys(Mn[Rr.id]).forEach(function(B){var K=Mn[Rr.id][B],dt=vn[B].node,St=dt.clusterId;li[St]||(li[St]=0),li[St]+=K});var Qr=-1/0,ti=[];if(Object.keys(li).forEach(function(B){Qr<li[B]?(Qr=li[B],ti=[B]):Qr===li[B]&&ti.push(B)}),!(ti.length===1&&ti[0]===Rr.clusterId)){var vi=ti.indexOf(Rr.clusterId);if(vi>=0&&ti.splice(vi,1),ti&&ti.length){kr=!0;var ci=dn[Rr.clusterId],W=ci.nodes.indexOf(Rr);ci.nodes.splice(W,1);var j=Math.floor(Math.random()*ti.length),F=dn[ti[j]];F.nodes.push(Rr),Rr.clusterId=F.id}}}),!kr)return"break";zn++};zn<de;){var jn=Gn();if(jn==="break")break}Object.keys(dn).forEach(function(Nr){var kr=dn[Nr];(!kr.nodes||!kr.nodes.length)&&delete dn[Nr]});var tr=[],ur={};Je.forEach(function(Nr){var kr=Nr.source,Rr=Nr.target,li=Nr[Ft]||1,Qr=vn[kr].node.clusterId,ti=vn[Rr].node.clusterId,vi="".concat(Qr,"---").concat(ti);if(ur[vi])ur[vi].weight+=li,ur[vi].count++;else{var ci={source:Qr,target:ti,weight:li,count:1};ur[vi]=ci,tr.push(ci)}});var gr=[];return Object.keys(dn).forEach(function(Nr){gr.push(dn[Nr])}),{clusters:gr,clusterEdges:tr}},so=Ia,$a=function(){function jt(it){this.arr=it}return jt.prototype.getArr=function(){return this.arr||[]},jt.prototype.add=function(it){var ft,Ft=it.arr;if(!(!((ft=this.arr)===null||ft===void 0)&&ft.length))return new jt(Ft);if(!(Ft!=null&&Ft.length))return new jt(this.arr);if(this.arr.length===Ft.length){var de=[];for(var ye in this.arr)de[ye]=this.arr[ye]+Ft[ye];return new jt(de)}},jt.prototype.subtract=function(it){var ft,Ft=it.arr;if(!(!((ft=this.arr)===null||ft===void 0)&&ft.length))return new jt(Ft);if(!(Ft!=null&&Ft.length))return new jt(this.arr);if(this.arr.length===Ft.length){var de=[];for(var ye in this.arr)de[ye]=this.arr[ye]-Ft[ye];return new jt(de)}},jt.prototype.avg=function(it){var ft=[];if(it!==0)for(var Ft in this.arr)ft[Ft]=this.arr[Ft]/it;return new jt(ft)},jt.prototype.negate=function(){var it=[];for(var ft in this.arr)it[ft]=-this.arr[ft];return new jt(it)},jt.prototype.squareEuclideanDistance=function(it){var ft,Ft=it.arr;if(!(!((ft=this.arr)===null||ft===void 0)&&ft.length)||!(Ft!=null&&Ft.length))return 0;if(this.arr.length===Ft.length){var de=0;for(var ye in this.arr)de+=Math.pow(this.arr[ye]-it.arr[ye],2);return de}},jt.prototype.euclideanDistance=function(it){var ft,Ft=it.arr;if(!(!((ft=this.arr)===null||ft===void 0)&&ft.length)||!(Ft!=null&&Ft.length))return 0;if(this.arr.length===Ft.length){var de=0;for(var ye in this.arr)de+=Math.pow(this.arr[ye]-it.arr[ye],2);return Math.sqrt(de)}else console.error("The two vectors are unequal in length.")},jt.prototype.normalize=function(){var it=[],ft=qn(this.arr);ft.sort(function(Se,Ue){return Se-Ue});var Ft=ft[ft.length-1],de=ft[0];for(var ye in this.arr)it[ye]=(this.arr[ye]-de)/(Ft-de);return new jt(it)},jt.prototype.norm2=function(){var it;if(!(!((it=this.arr)===null||it===void 0)&&it.length))return 0;var ft=0;for(var Ft in this.arr)ft+=Math.pow(this.arr[Ft],2);return Math.sqrt(ft)},jt.prototype.dot=function(it){var ft,Ft=it.arr;if(!(!((ft=this.arr)===null||ft===void 0)&&ft.length)||!(Ft!=null&&Ft.length))return 0;if(this.arr.length===Ft.length){var de=0;for(var ye in this.arr)de+=this.arr[ye]*it.arr[ye];return de}else console.error("The two vectors are unequal in length.")},jt.prototype.equal=function(it){var ft,Ft=it.arr;if(((ft=this.arr)===null||ft===void 0?void 0:ft.length)!==(Ft==null?void 0:Ft.length))return!1;for(var de in this.arr)if(this.arr[de]!==Ft[de])return!1;return!0},jt}(),fa=$a,vo=/^(\d{1,4})(-|\/)(\d{1,2})\2(\d{1,2})$/,Ca=/^(\d{1,4})(-|\/)(\d{1,2})\2(\d{1,2}) (\d{1,2}):(\d{1,2}):(\d{1,2})$/,Di=function(it,ft){it===void 0&&(it=[]),ft===void 0&&(ft=100);var Ft={};it.forEach(function(ye){ye.properties&&Object.keys(ye.properties).forEach(function(Se){if(Se==="id"||!"".concat(ye.properties[Se]).match(vo)&&!"".concat(ye.properties[Se]).match(Ca)&&isNaN(Number(ye.properties[Se]))){Ft.hasOwnProperty(Se)&&delete Ft[Se];return}Ft.hasOwnProperty(Se)?Ft[Se]+=1:Ft[Se]=1})});var de=Object.keys(Ft).sort(function(ye,Se){return Ft[Se]-Ft[ye]});return de.length<ft?de:de.slice(0,ft)},Qa=function(it,ft){return ft.map(function(Ft){return it.hasOwnProperty(Ft)?it[Ft]:0})},ts=function(it){for(var ft=Di(it),Ft=[],de=0;de<it.length;de++)Ft[de]=Qa(it[de].properties,ft);return Ft},Ja=function(it,ft){ft===void 0&&(ft=void 0);var Ft=[];return it.forEach(function(de){ft===void 0&&Ft.push(de),de[ft]!==void 0&&Ft.push(de[ft])}),Ft},To={getAllSortProperties:Di,getPropertyWeight:ts,getAllProperties:Ja},ia;(function(jt){jt.EuclideanDistance="euclideanDistance"})(ia||(ia={}));var lr=function(it,ft,Ft){var de=[];ft!=null&&ft.length?de=ft:(it.forEach(function(Se){de=de.concat(Object.keys(Se))}),de=Ve(de));var ye={};return de.forEach(function(Se){var Ue=[];it.forEach(function(Je){Je[Se]!==void 0&&Je[Se]!==""&&Ue.push(Je[Se])}),Ue.length&&!(Ft!=null&&Ft.includes(Se))&&(ye[Se]=Ve(Ue))}),ye},ri=function(it,ft,Ft){var de=lr(it,ft,Ft),ye=[];if(!Object.keys(de).length)return ye;var Se=Object.values(de),Ue=Se.every(function(Je){return Je.every(function(dn){return typeof dn=="number"})});return it.forEach(function(Je,dn){var vn=[];Object.keys(de).forEach(function(cn){var Nn=Je[cn],Mn=de[cn],zn=Mn.findIndex(function(tr){return Nn===tr}),Gn=[];if(Ue)Gn.push(Nn);else for(var jn=0;jn<Mn.length;jn++)jn===zn?Gn.push(1):Gn.push(0);vn=vn.concat(Gn)}),ye[dn]=vn}),ye},Yr=function(it,ft,Ft,de){Ft===void 0&&(Ft=ia.EuclideanDistance);var ye=0;switch(Ft){case ia.EuclideanDistance:ye=new fa(it).euclideanDistance(new fa(ft));break;default:break}return ye},hi={getAllKeyValueMap:lr,oneHot:ri,getDistance:Yr},ai=function(it,ft,Ft,de){for(var ye=ft.length,Se=2*de,Ue=0,Je=0;Je<ye;Je++)for(var dn=it[Je].clusterId,vn=0;vn<ye;vn++){var cn=it[vn].clusterId;if(dn===cn){var Nn=ft[Je][vn]||0,Mn=Ft[Je]||0,zn=Ft[vn]||0;Ue+=Nn-Mn*zn/Se}}return Ue*=1/Se,Ue},zi=function(it,ft){it===void 0&&(it=[]);for(var Ft=it.length,de=new fa([]),ye=0;ye<Ft;ye++)de=de.add(new fa(ft[ye]));var Se=de.avg(Ft);Se.normalize();for(var Ue=0,ye=0;ye<Ft;ye++){var Je=new fa(ft[ye]),dn=Je.squareEuclideanDistance(Se);Ue+=dn}var vn=[];it.forEach(function(){vn.push([])});for(var ye=0;ye<Ft;ye++){var Je=new fa(ft[ye]);it[ye].clusterInertial=0;for(var cn=0;cn<Ft;cn++){if(ye===cn){vn[ye][cn]=0;continue}var Nn=new fa(ft[cn]);vn[ye][cn]=Je.squareEuclideanDistance(Nn),it[ye].clusterInertial+=vn[ye][cn]}}for(var Mn=0,zn=2*Ft*Ue,ye=0;ye<Ft;ye++)for(var Gn=it[ye].clusterId,cn=0;cn<Ft;cn++){var jn=it[cn].clusterId;if(!(ye===cn||Gn!==jn)){var tr=it[ye].clusterInertial*it[cn].clusterInertial/Math.pow(zn,2)-vn[ye][cn]/zn;Mn+=tr}}return Number(Mn.toFixed(4))},qa=function(it,ft,Ft,de,ye,Se,Ue,Je,dn){ft===void 0&&(ft=!1),Ft===void 0&&(Ft="weight"),de===void 0&&(de=1e-4),ye===void 0&&(ye=!1),Se===void 0&&(Se=void 0),Ue===void 0&&(Ue=[]),Je===void 0&&(Je=["id"]),dn===void 0&&(dn=1);var vn=it.nodes,cn=vn===void 0?[]:vn,Nn=it.edges,Mn=Nn===void 0?[]:Nn,zn=[];if(ye){cn.forEach(function(Et,Zt){Et.properties=Et.properties||{},Et.originIndex=Zt});var Gn=[];cn.every(function(Et){return Et.hasOwnProperty("nodeType")})&&(Gn=Array.from(new Set(cn.map(function(Et){return Et.nodeType}))),cn.forEach(function(Et){Et.properties.nodeType=Gn.findIndex(function(Zt){return Zt===Et.nodeType})}));var jn=Ja(cn,Se);zn=ri(jn,Ue,Je)}var tr=1,ur={},gr={};cn.forEach(function(Et,Zt){var ce=String(tr++);Et.clusterId=ce,ur[ce]={id:ce,nodes:[Et]},gr[Et.id]={node:Et,idx:Zt}});var Nr=R(it,ft),kr=[],Rr={},li=0;Nr.forEach(function(Et,Zt){var ce=0,Ae=cn[Zt].id;Rr[Ae]={},Et.forEach(function(Le,$e){if(Le){ce+=Le;var Xe=cn[$e].id;Rr[Ae][Xe]=Le,li+=Le}}),kr.push(ce)}),li/=2;for(var Qr=1/0,ti=1/0,vi=0,ci=[],W={};;){ye&&cn.every(function(Et){return Et.hasOwnProperty("properties")})?Qr=ai(cn,Nr,kr,li)+zi(cn,zn)*dn:Qr=ai(cn,Nr,kr,li),vi===0&&(ti=Qr,ci=cn,W=ur);var j=Qr>0&&Qr>ti&&Qr-ti<de;if(Qr>ti&&(ci=cn.map(function(Et){return{node:Et,clusterId:Et.clusterId}}),W=qn(ur),ti=Qr),j||vi>100)break;vi++,Object.keys(ur).forEach(function(Et){var Zt=0;Mn.forEach(function(ce){var Ae=ce.source,Le=ce.target,$e=gr[Ae].node.clusterId,Xe=gr[Le].node.clusterId;($e===Et&&Xe!==Et||Xe===Et&&$e!==Et)&&(Zt=Zt+(ce[Ft]||1))}),ur[Et].sumTot=Zt}),cn.forEach(function(Et,Zt){var ce=ur[Et.clusterId],Ae=0,Le,$e=kr[Zt]/(2*li),Xe=0,an=ce.nodes;an.forEach(function(Wr){var ei=gr[Wr.id].idx;Xe+=Nr[Zt][ei]||0});var bn=Xe-ce.sumTot*$e,xn=an.filter(function(Wr){return Wr.id!==Et.id}),Dn=[];xn.forEach(function(Wr,ei){Dn[ei]=zn[Wr.originIndex]});var Fn=zi(xn,zn)*dn,On=Rr[Et.id];if(Object.keys(On).forEach(function(Wr){var ei=gr[Wr].node,Ti=ei.clusterId;if(Ti!==Et.clusterId){var Gi=ur[Ti],Ei=Gi.nodes;if(!(!Ei||!Ei.length)){var Vr=0;Ei.forEach(function(Zi){var Pi=gr[Zi.id].idx;Vr+=Nr[Zt][Pi]||0});var mi=Vr-Gi.sumTot*$e,Jr=Ei.concat([Et]),Ii=[];Jr.forEach(function(Zi,Pi){Ii[Pi]=zn[Zi.originIndex]});var Ki=zi(Jr,zn)*dn,Kr=mi-bn;ye&&(Kr=mi+Ki-(bn+Fn)),Kr>Ae&&(Ae=Kr,Le=Gi)}}}),Ae>0){Le.nodes.push(Et);var Yn=Et.clusterId;Et.clusterId=Le.id;var nr=ce.nodes.indexOf(Et);ce.nodes.splice(nr,1);var sr=0,xr=0;Mn.forEach(function(Wr){var ei=Wr.source,Ti=Wr.target,Gi=gr[ei].node.clusterId,Ei=gr[Ti].node.clusterId;(Gi===Le.id&&Ei!==Le.id||Ei===Le.id&&Gi!==Le.id)&&(sr=sr+(Wr[Ft]||1)),(Gi===Yn&&Ei!==Yn||Ei===Yn&&Gi!==Yn)&&(xr=xr+(Wr[Ft]||1))}),Le.sumTot=sr,ce.sumTot=xr}})}var F={},B=0;Object.keys(W).forEach(function(Et){var Zt=W[Et];if(!Zt.nodes||!Zt.nodes.length){delete W[Et];return}var ce=String(B+1);ce!==Et&&(Zt.id=ce,Zt.nodes=Zt.nodes.map(function(Ae){return{id:Ae.id,clusterId:ce}}),W[ce]=Zt,F[Et]=ce,delete W[Et],B++)}),ci.forEach(function(Et){var Zt=Et.node,ce=Et.clusterId;Zt&&(Zt.clusterId=ce,Zt.clusterId&&F[Zt.clusterId]&&(Zt.clusterId=F[Zt.clusterId]))});var K=[],dt={};Mn.forEach(function(Et){var Zt=Et.source,ce=Et.target,Ae=Et[Ft]||1,Le=gr[Zt].node.clusterId,$e=gr[ce].node.clusterId;if(!(!Le||!$e)){var Xe="".concat(Le,"---").concat($e);if(dt[Xe])dt[Xe].weight+=Ae,dt[Xe].count++;else{var an={source:Le,target:$e,weight:Ae,count:1};dt[Xe]=an,K.push(an)}}});var St=[];return Object.keys(W).forEach(function(Et){St.push(W[Et])}),{clusters:St,clusterEdges:K}},ji=qa,Vi=function(it,ft,Ft,de,ye,Se,Ue,Je){return ft===void 0&&(ft=!1),Ft===void 0&&(Ft="weight"),de===void 0&&(de=1e-4),ye===void 0&&(ye=void 0),Se===void 0&&(Se=[]),Ue===void 0&&(Ue=["id"]),Je===void 0&&(Je=1),ji(it,ft,Ft,de,!0,ye,Se,Ue,Je)},Kn=Vi,Ui=function(it,ft){var Ft;ft===void 0&&(ft=1);for(var de=qn(it),ye=de.nodes,Se=ye===void 0?[]:ye,Ue=de.edges,Je=Ue===void 0?[]:Ue,dn=function(){var Nn=Bt({nodes:Se,edges:Je}),Mn=Object.keys(Nn);Mn.sort(function(jn,tr){var ur,gr;return((ur=Nn[jn])===null||ur===void 0?void 0:ur.degree)-((gr=Nn[tr])===null||gr===void 0?void 0:gr.degree)});var zn=Mn[0];if(!Se.length||((Ft=Nn[zn])===null||Ft===void 0?void 0:Ft.degree)>=ft)return"break";var Gn=Se.findIndex(function(jn){return jn.id===zn});Se.splice(Gn,1),Je=Je.filter(function(jn){return!(jn.source===zn||jn.target===zn)})};;){var vn=dn();if(vn==="break")break}return{nodes:Se,edges:Je}},Io=Ui,Uo=function(it,ft,Ft){var de=[];switch(it){case ia.EuclideanDistance:de=ft[Ft];break;default:de=[];break}return de},es=function(it,ft,Ft,de,ye,Se){ft===void 0&&(ft=3),Ft===void 0&&(Ft=void 0),de===void 0&&(de=[]),ye===void 0&&(ye=["id"]),Se===void 0&&(Se=ia.EuclideanDistance);var Ue=it.nodes,Je=Ue===void 0?[]:Ue,dn=it.edges,vn=dn===void 0?[]:dn,cn={clusters:[{id:"0",nodes:Je}],clusterEdges:[]};if(Se===ia.EuclideanDistance&&!Je.every(function(ce){return ce.hasOwnProperty(Ft)}))return cn;var Nn=[],Mn=[];if(Se===ia.EuclideanDistance&&(Nn=Ja(Je,Ft),Mn=ri(Nn,de,ye)),!Mn.length)return cn;for(var zn=Ve(Mn.map(function(ce){return ce.join("")})),Gn=Math.min(ft,Je.length,zn.length),jn=0;jn<Je.length;jn++)Je[jn].originIndex=jn;for(var tr=[],ur=[],gr=[],jn=0;jn<Gn;jn++)if(jn===0){var Nr=Math.floor(Math.random()*Je.length);switch(Se){case ia.EuclideanDistance:tr[jn]=Mn[Nr];break;default:tr[jn]=[];break}ur.push(Nr),gr[jn]=[Je[Nr]],Je[Nr].clusterId=String(jn)}else{for(var kr=-1/0,Rr=0,li=function(Le){if(!ur.includes(Le)){for(var $e=0,Xe=0;Xe<tr.length;Xe++){var an=0;switch(Se){case ia.EuclideanDistance:an=Yr(Mn[Je[Le].originIndex],tr[Xe],Se);break;default:break}$e+=an}var bn=$e/tr.length;bn>kr&&!tr.find(function(xn){return Wi(xn,Uo(Se,Mn,Je[Le].originIndex))})&&(kr=bn,Rr=Le)}},Qr=0;Qr<Je.length;Qr++)li(Qr);tr[jn]=Uo(Se,Mn,Rr),ur.push(Rr),gr[jn]=[Je[Rr]],Je[Rr].clusterId=String(jn)}for(var ti=0;;){for(var jn=0;jn<Je.length;jn++){var vi=0,ci=1/0;if(!(ti===0&&ur.includes(jn))){for(var W=0;W<tr.length;W++){var j=0;switch(Se){case ia.EuclideanDistance:j=Yr(Mn[jn],tr[W],Se);break;default:break}j<ci&&(ci=j,vi=W)}if(Je[jn].clusterId!==void 0)for(var F=gr[Number(Je[jn].clusterId)].length-1;F>=0;F--)gr[Number(Je[jn].clusterId)][F].id===Je[jn].id&&gr[Number(Je[jn].clusterId)].splice(F,1);Je[jn].clusterId=String(vi),gr[vi].push(Je[jn])}}for(var B=!1,jn=0;jn<gr.length;jn++){for(var K=gr[jn],dt=new fa([]),W=0;W<K.length;W++)dt=dt.add(new fa(Mn[K[W].originIndex]));var St=dt.avg(K.length);St.equal(new fa(tr[jn]))||(B=!0,tr[jn]=St.getArr())}if(ti++,Je.every(function(ce){return ce.clusterId!==void 0})&&B||ti>=1e3)break}var Et=[],Zt={};return vn.forEach(function(ce){var Ae,Le,$e=ce.source,Xe=ce.target,an=(Ae=Je.find(function(Fn){return Fn.id===$e}))===null||Ae===void 0?void 0:Ae.clusterId,bn=(Le=Je.find(function(Fn){return Fn.id===Xe}))===null||Le===void 0?void 0:Le.clusterId,xn="".concat(an,"---").concat(bn);if(Zt[xn])Zt[xn].count++;else{var Dn={source:an,target:bn,count:1};Zt[xn]=Dn,Et.push(Dn)}}),{clusters:gr,clusterEdges:Et}},Ta=es,eo=function(it,ft){var Ft=new fa(ft),de=Ft.norm2(),ye=new fa(it),Se=ye.norm2(),Ue=Ft.dot(ye),Je=de*Se,dn=Je?Ue/Je:0;return dn},ns=eo,Po=function(it,ft,Ft,de,ye){it===void 0&&(it=[]),Ft===void 0&&(Ft=void 0),de===void 0&&(de=[]),ye===void 0&&(ye=[]);var Se=qn(it.filter(function(Nn){return Nn.id!==ft.id})),Ue=it.findIndex(function(Nn){return Nn.id===ft.id}),Je=Ja(it,Ft),dn=ri(Je,de,ye),vn=dn[Ue],cn=[];return Se.forEach(function(Nn,Mn){if(Nn.id!==ft.id){var zn=dn[Mn],Gn=ns(zn,vn);cn.push(Gn),Nn.cosineSimilarity=Gn}}),Se.sort(function(Nn,Mn){return Mn.cosineSimilarity-Nn.cosineSimilarity}),{allCosineSimilarity:cn,similarNodes:Se}},ys=Po,Ao=function(){function jt(it){this.count=it.length,this.parent={};for(var ft=0,Ft=it;ft<Ft.length;ft++){var de=Ft[ft];this.parent[de]=de}}return jt.prototype.find=function(it){for(;this.parent[it]!==it;)it=this.parent[it];return it},jt.prototype.union=function(it,ft){var Ft=this.find(it),de=this.find(ft);Ft!==de&&(Ft<de?(this.parent[ft]!==ft&&this.union(this.parent[ft],it),this.parent[ft]=this.parent[it]):(this.parent[it]!==it&&this.union(this.parent[it],ft),this.parent[it]=this.parent[ft]))},jt.prototype.connected=function(it,ft){return this.find(it)===this.find(ft)},jt}(),go=Ao,No=function(it,ft){return it-ft},fs=function(){function jt(it){it===void 0&&(it=No),this.compareFn=it,this.list=[]}return jt.prototype.getLeft=function(it){return 2*it+1},jt.prototype.getRight=function(it){return 2*it+2},jt.prototype.getParent=function(it){return it===0?null:Math.floor((it-1)/2)},jt.prototype.isEmpty=function(){return this.list.length<=0},jt.prototype.top=function(){return this.isEmpty()?void 0:this.list[0]},jt.prototype.delMin=function(){var it=this.top(),ft=this.list.pop();return this.list.length>0&&(this.list[0]=ft,this.moveDown(0)),it},jt.prototype.insert=function(it){if(it!==null){this.list.push(it);var ft=this.list.length-1;return this.moveUp(ft),!0}return!1},jt.prototype.moveUp=function(it){for(var ft=this.getParent(it);it&&it>0&&this.compareFn(this.list[ft],this.list[it])>0;){var Ft=this.list[ft];this.list[ft]=this.list[it],this.list[it]=Ft,it=ft,ft=this.getParent(it)}},jt.prototype.moveDown=function(it){var ft,Ft=it,de=this.getLeft(it),ye=this.getRight(it),Se=this.list.length;de!==null&&de<Se&&this.compareFn(this.list[Ft],this.list[de])>0?Ft=de:ye!==null&&ye<Se&&this.compareFn(this.list[Ft],this.list[ye])>0&&(Ft=ye),it!==Ft&&(ft=[this.list[Ft],this.list[it]],this.list[it]=ft[0],this.list[Ft]=ft[1],this.moveDown(Ft))},jt}(),Ba=fs,no=function(it,ft){var Ft=[],de=it.nodes,ye=de===void 0?[]:de,Se=it.edges,Ue=Se===void 0?[]:Se;if(ye.length===0)return Ft;var Je=ye[0],dn=new Set;dn.add(Je);var vn=function(jn,tr){return ft?jn.weight-tr.weight:0},cn=new Ba(vn);for(k(Je.id,Ue).forEach(function(Gn){cn.insert(Gn)});!cn.isEmpty();){var Nn=cn.delMin(),Mn=Nn.source,zn=Nn.target;dn.has(Mn)&&dn.has(zn)||(Ft.push(Nn),dn.has(Mn)||(dn.add(Mn),k(Mn,Ue).forEach(function(Gn){cn.insert(Gn)})),dn.has(zn)||(dn.add(zn),k(zn,Ue).forEach(function(Gn){cn.insert(Gn)})))}return Ft},za=function(it,ft){var Ft=[],de=it.nodes,ye=de===void 0?[]:de,Se=it.edges,Ue=Se===void 0?[]:Se;if(ye.length===0)return Ft;var Je=Ue.map(function(Mn){return Mn});ft&&Je.sort(function(Mn,zn){return Mn.weight-zn.weight});for(var dn=new go(ye.map(function(Mn){return Mn.id}));Je.length>0;){var vn=Je.shift(),cn=vn.source,Nn=vn.target;dn.connected(cn,Nn)||(Ft.push(vn),dn.union(cn,Nn))}return Ft},rs=function(it,ft,Ft){var de={prim:no,kruskal:za};return Ft?de[Ft](it,ft):za(it,ft)},is=rs,$i=function(it,ft,Ft){typeof ft!="number"&&(ft=1e-6),typeof Ft!="number"&&(Ft=.85);for(var de=1,ye=0,Se=1e3,Ue=it.nodes,Je=Ue===void 0?[]:Ue,dn=it.edges,vn=dn===void 0?[]:dn,cn=Je.length,Nn,Mn={},zn={},Gn=0;Gn<cn;++Gn){var jn=Je[Gn],tr=jn.id;Mn[tr]=1/cn,zn[tr]=1/cn}for(var ur=Bt(it);Se>0&&de>ft;){ye=0;for(var Gn=0;Gn<cn;++Gn){var jn=Je[Gn],tr=jn.id;if(Nn=0,ur[jn.id].inDegree===0)Mn[tr]=0;else{for(var gr=I(tr,vn,"source"),Nr=0;Nr<gr.length;++Nr){var kr=gr[Nr],Rr=ur[kr].outDegree;Rr>0&&(Nn+=zn[kr]/Rr)}Mn[tr]=Ft*Nn,ye+=Mn[tr]}}ye=(1-ye)/cn,de=0;for(var Gn=0;Gn<cn;++Gn){var jn=Je[Gn],tr=jn.id;Nn=Mn[tr]+ye,de+=Math.abs(Nn-zn[tr]),zn[tr]=Nn}Se-=1}return zn},Wa=$i,po=-1,bo=-1,Ro="-1",Ga="-1",Ho=-1,Ci="-1",bi=function(){function jt(it,ft,Ft,de){it===void 0&&(it=po),ft===void 0&&(ft=bo),Ft===void 0&&(Ft=bo),de===void 0&&(de=Ro),this.id=it,this.from=ft,this.to=Ft,this.label=de}return jt}(),aa=function(){function jt(it,ft){it===void 0&&(it=bo),ft===void 0&&(ft=Ga),this.id=it,this.label=ft,this.edges=[],this.edgeMap={}}return jt.prototype.addEdge=function(it){this.edges.push(it),this.edgeMap[it.id]=it},jt}(),ba=function(){function jt(it,ft,Ft){it===void 0&&(it=bo),ft===void 0&&(ft=!0),Ft===void 0&&(Ft=!1),this.id=it,this.edgeIdAutoIncrease=ft,this.edges=[],this.nodes=[],this.nodeMap={},this.edgeMap={},this.nodeLabelMap={},this.edgeLabelMap={},this.counter=0,this.directed=Ft}return jt.prototype.getNodeNum=function(){return this.nodes.length},jt.prototype.addNode=function(it,ft){if(!this.nodeMap[it]){var Ft=new aa(it,ft);this.nodes.push(Ft),this.nodeMap[it]=Ft,this.nodeLabelMap[ft]||(this.nodeLabelMap[ft]=[]),this.nodeLabelMap[ft].push(it)}},jt.prototype.addEdge=function(it,ft,Ft,de){if((this.edgeIdAutoIncrease||it===void 0)&&(it=this.counter++),!(this.nodeMap[ft]&&this.nodeMap[Ft]&&this.nodeMap[Ft].edgeMap[it])){var ye=new bi(it,ft,Ft,de);if(this.edges.push(ye),this.edgeMap[it]=ye,this.nodeMap[ft].addEdge(ye),this.edgeLabelMap[de]||(this.edgeLabelMap[de]=[]),this.edgeLabelMap[de].push(ye),!this.directed){var Se=new bi(it,Ft,ft,de);this.nodeMap[Ft].addEdge(Se),this.edgeLabelMap[de].push(Se)}}},jt}(),Hi=function(){function jt(it,ft,Ft,de,ye){this.fromNode=it,this.toNode=ft,this.nodeEdgeNodeLabel={nodeLabel1:Ft||Ga,edgeLabel:de||Ro,nodeLabel2:ye||Ga}}return jt.prototype.equalTo=function(it){return this.fromNode===it.formNode&&this.toNode===it.toNode&&this.nodeEdgeNodeLabel===it.nodeEdgeNodeLabel},jt.prototype.notEqualTo=function(it){return!this.equalTo(it)},jt}(),xi=function(){function jt(){this.rmpath=[],this.dfsEdgeList=[]}return jt.prototype.equalTo=function(it){var ft=this.dfsEdgeList.length,Ft=it.length;if(ft!==Ft)return!1;for(var de=0;de<ft;de++)if(this.dfsEdgeList[de]!==it[de])return!1;return!0},jt.prototype.notEqualTo=function(it){return!this.equalTo(it)},jt.prototype.pushBack=function(it,ft,Ft,de,ye){return this.dfsEdgeList.push(new Hi(it,ft,Ft,de,ye)),this.dfsEdgeList},jt.prototype.toGraph=function(it,ft){it===void 0&&(it=Ho),ft===void 0&&(ft=!1);var Ft=new ba(it,!0,ft);return this.dfsEdgeList.forEach(function(de){var ye=de.fromNode,Se=de.toNode,Ue=de.nodeEdgeNodeLabel,Je=Ue.nodeLabel1,dn=Ue.edgeLabel,vn=Ue.nodeLabel2;Je!==Ga&&Ft.addNode(ye,Je),vn!==Ga&&Ft.addNode(Se,vn),Je!==Ga&&vn!==Je&&Ft.addEdge(void 0,ye,Se,dn)}),Ft},jt.prototype.buildRmpath=function(){this.rmpath=[];for(var it=void 0,ft=this.dfsEdgeList.length,Ft=ft-1;Ft>=0;Ft--){var de=this.dfsEdgeList[Ft],ye=de.fromNode,Se=de.toNode;ye<Se&&(it===void 0||Se===it)&&(this.rmpath.push(Ft),it=ye)}return this.rmpath},jt.prototype.getNodeNum=function(){var it={};return this.dfsEdgeList.forEach(function(ft){it[ft.fromNode]||(it[ft.fromNode]=!0),it[ft.toNode]||(it[ft.toNode]=!0)}),Object.keys(it).length},jt}(),Ea=function(){function jt(it){if(this.his={},this.nodesUsed={},this.edgesUsed={},this.edges=[],!!it){for(;it;){var ft=it.edge;this.edges.push(ft),this.nodesUsed[ft.from]=1,this.nodesUsed[ft.to]=1,this.edgesUsed[ft.id]=1,it=it.preNode}this.edges=this.edges.reverse()}}return jt.prototype.hasNode=function(it){return this.nodesUsed[it.id]===1},jt.prototype.hasEdge=function(it){return this.edgesUsed[it.id]===1},jt}(),lo=function(){function jt(it){var ft=it.graphs,Ft=it.minSupport,de=Ft===void 0?2:Ft,ye=it.minNodeNum,Se=ye===void 0?1:ye,Ue=it.maxNodeNum,Je=Ue===void 0?4:Ue,dn=it.top,vn=dn===void 0?10:dn,cn=it.directed,Nn=cn===void 0?!1:cn,Mn=it.verbose,zn=Mn===void 0?!1:Mn;this.graphs=ft,this.dfsCode=new xi,this.support=0,this.frequentSize1Subgraphs=[],this.frequentSubgraphs=[],this.minSupport=de,this.top=vn,this.directed=Nn,this.counter=0,this.maxNodeNum=Je,this.minNodeNum=Se,this.verbose=zn,this.maxNodeNum<this.minNodeNum&&(this.maxNodeNum=this.minNodeNum),this.reportDF=[]}return jt.prototype.findForwardRootEdges=function(it,ft){var Ft=this,de=[],ye=it.nodeMap;return ft.edges.forEach(function(Se){(Ft.directed||ft.label<=ye[Se.to].label)&&de.push(Se)}),de},jt.prototype.findBackwardEdge=function(it,ft,Ft,de){if(!this.directed&&ft===Ft)return null;for(var ye=it.nodeMap,Se=ye[Ft.to],Ue=Se.edges,Je=Ue.length,dn=0;dn<Je;dn++){var vn=Ue[dn];if(!(de.hasEdge(vn)||vn.to!==ft.from)){if(this.directed){if(ye[ft.from].label<ye[Ft.to].label||ye[ft.from].label===ye[Ft.to].label&&ft.label<=vn.label)return vn}else if(ft.label<vn.label||ft.label===vn.label&&ye[ft.to].label<=ye[Ft.to].label)return vn}}return null},jt.prototype.findForwardPureEdges=function(it,ft,Ft,de){for(var ye=[],Se=ft.to,Ue=it.nodeMap[Se].edges,Je=Ue.length,dn=0;dn<Je;dn++){var vn=Ue[dn],cn=it.nodeMap[vn.to];Ft<=cn.label&&!de.hasNode(cn)&&ye.push(vn)}return ye},jt.prototype.findForwardRmpathEdges=function(it,ft,Ft,de){for(var ye=[],Se=it.nodeMap,Ue=Se[ft.to].label,Je=Se[ft.from],dn=Je.edges,vn=dn.length,cn=0;cn<vn;cn++){var Nn=dn[cn],Mn=Se[Nn.to].label;ft.to===Nn.to||Ft>Mn||de.hasNode(Se[Nn.to])||(ft.label<Nn.label||ft.label===Nn.label&&Ue<=Mn)&&ye.push(Nn)}return ye},jt.prototype.getSupport=function(it){var ft={};return it.forEach(function(Ft){ft[Ft.graphId]||(ft[Ft.graphId]=!0)}),Object.keys(ft).length},jt.prototype.findMinLabel=function(it){var ft=void 0;return Object.keys(it).forEach(function(Ft){var de=it[Ft],ye=de.nodeLabel1,Se=de.edgeLabel,Ue=de.nodeLabel2;if(!ft){ft={nodeLabel1:ye,edgeLabel:Se,nodeLabel2:Ue};return}(ye<ft.nodeLabel1||ye===ft.nodeLabel1&&Se<ft.edgeLabel||ye===ft.nodeLabel1&&Se===ft.edgeLabel&&Ue<ft.nodeLabel2)&&(ft={nodeLabel1:ye,edgeLabel:Se,nodeLabel2:Ue})}),ft},jt.prototype.isMin=function(){var it=this,ft=this.dfsCode;if(this.verbose&&console.log("isMin checking",ft),ft.dfsEdgeList.length===1)return!0;var Ft=this.directed,de=ft.toGraph(Ho,Ft),ye=de.nodeMap,Se=new xi,Ue={};de.nodes.forEach(function(cn){var Nn=it.findForwardRootEdges(de,cn);Nn.forEach(function(Mn){var zn=ye[Mn.to],Gn="".concat(cn.label,"-").concat(Mn.label,"-").concat(zn.label);Ue[Gn]||(Ue[Gn]={projected:[],nodeLabel1:cn.label,edgeLabel:Mn.label,nodeLabel2:zn.label});var jn={graphId:de.id,edge:Mn,preNode:null};Ue[Gn].projected.push(jn)})});var Je=this.findMinLabel(Ue);if(Je){Se.dfsEdgeList.push(new Hi(0,1,Je.nodeLabel1,Je.edgeLabel,Je.nodeLabel2));var dn=function cn(Nn){for(var Mn=Se.buildRmpath(),zn=Se.dfsEdgeList[0].nodeEdgeNodeLabel.nodeLabel1,Gn=Se.dfsEdgeList[Mn[0]].toNode,jn={},tr=!1,ur=0,gr=Ft?-1:0,Nr=function(dt){if(tr)return"break";Nn.forEach(function(St){var Et=new Ea(St),Zt=it.findBackwardEdge(de,Et.edges[Mn[dt]],Et.edges[Mn[0]],Et);Zt&&(jn[Zt.label]||(jn[Zt.label]={projected:[],edgeLabel:Zt.label}),jn[Zt.label].projected.push({graphId:de.id,edge:jn,preNode:St}),ur=Se.dfsEdgeList[Mn[dt]].fromNode,tr=!0)})},kr=Mn.length-1;kr>gr;kr--){var Rr=Nr(kr);if(Rr==="break")break}if(tr){var li=it.findMinLabel(jn);Se.dfsEdgeList.push(new Hi(Gn,ur,Ga,li.edgeLabel,Ga));var Qr=Se.dfsEdgeList.length-1;return it.dfsCode.dfsEdgeList[Qr]!==Se.dfsEdgeList[Qr]?!1:cn(jn[li.edgeLabel].projected)}var ti={};tr=!1;var vi=0;Nn.forEach(function(K){var dt=new Ea(K),St=it.findForwardPureEdges(de,dt.edges[Mn[0]],zn,dt);St.length>0&&(tr=!0,vi=Gn,St.forEach(function(Et){var Zt="".concat(Et.label,"-").concat(ye[Et.to].label);ti[Zt]||(ti[Zt]={projected:[],edgeLabel:Et.label,nodeLabel2:ye[Et.to].label}),ti[Zt].projected.push({graphId:de.id,edge:Et,preNode:K})}))});for(var ci=Mn.length,W=function(dt){if(tr)return"break";var St=Mn[dt];Nn.forEach(function(Et){var Zt=new Ea(Et),ce=it.findForwardRmpathEdges(de,Zt.edges[St],zn,Zt);ce.length>0&&(tr=!0,vi=Se.dfsEdgeList[St].fromNode,ce.forEach(function(Ae){var Le="".concat(Ae.label,"-").concat(ye[Ae.to].label);ti[Le]||(ti[Le]={projected:[],edgeLabel:Ae.label,nodeLabel2:ye[Ae.to].label}),ti[Le].projected.push({graphId:de.id,edge:Ae,preNode:Et})}))})},kr=0;kr<ci;kr++){var j=W(kr);if(j==="break")break}if(!tr)return!0;var F=it.findMinLabel(ti);Se.dfsEdgeList.push(new Hi(vi,Gn+1,Ga,F.edgeLabel,F.nodeLabel2));var B=Se.dfsEdgeList.length-1;return ft.dfsEdgeList[B]!==Se.dfsEdgeList[B]?!1:cn(ti["".concat(F.edgeLabel,"-").concat(F.nodeLabel2)].projected)},vn="".concat(Je.nodeLabel1,"-").concat(Je.edgeLabel,"-").concat(Je.nodeLabel2);return dn(Ue[vn].projected)}},jt.prototype.report=function(){if(!(this.dfsCode.getNodeNum()<this.minNodeNum)){this.counter++;var it=this.dfsCode.toGraph(this.counter,this.directed);this.frequentSubgraphs.push(qn(it))}},jt.prototype.subGraphMining=function(it){var ft=this,Ft=this.getSupport(it);if(!(Ft<this.minSupport)&&this.isMin()){this.report();var de=this.dfsCode.getNodeNum(),ye=this.dfsCode.buildRmpath(),Se=this.dfsCode.dfsEdgeList[ye[0]].toNode,Ue=this.dfsCode.dfsEdgeList[0].nodeEdgeNodeLabel.nodeLabel1,Je={},dn={};it.forEach(function(vn){for(var cn=ft.graphs[vn.graphId],Nn=cn.nodeMap,Mn=new Ea(vn),zn=ye.length-1;zn>=0;zn--){var Gn=ft.findBackwardEdge(cn,Mn.edges[ye[zn]],Mn.edges[ye[0]],Mn);if(Gn){var jn="".concat(ft.dfsCode.dfsEdgeList[ye[zn]].fromNode,"-").concat(Gn.label);dn[jn]||(dn[jn]={projected:[],toNodeId:ft.dfsCode.dfsEdgeList[ye[zn]].fromNode,edgeLabel:Gn.label}),dn[jn].projected.push({graphId:vn.graphId,edge:Gn,preNode:vn})}}if(!(de>=ft.maxNodeNum)){var tr=ft.findForwardPureEdges(cn,Mn.edges[ye[0]],Ue,Mn);tr.forEach(function(gr){var Nr="".concat(Se,"-").concat(gr.label,"-").concat(Nn[gr.to].label);Je[Nr]||(Je[Nr]={projected:[],fromNodeId:Se,edgeLabel:gr.label,nodeLabel2:Nn[gr.to].label}),Je[Nr].projected.push({graphId:vn.graphId,edge:gr,preNode:vn})});for(var ur=function(Nr){var kr=ft.findForwardRmpathEdges(cn,Mn.edges[ye[Nr]],Ue,Mn);kr.forEach(function(Rr){var li="".concat(ft.dfsCode.dfsEdgeList[ye[Nr]].fromNode,"-").concat(Rr.label,"-").concat(Nn[Rr.to].label);Je[li]||(Je[li]={projected:[],fromNodeId:ft.dfsCode.dfsEdgeList[ye[Nr]].fromNode,edgeLabel:Rr.label,nodeLabel2:Nn[Rr.to].label}),Je[li].projected.push({graphId:vn.graphId,edge:Rr,preNode:vn})})},zn=0;zn<ye.length;zn++)ur(zn)}}),Object.keys(dn).forEach(function(vn){var cn=dn[vn],Nn=cn.toNodeId,Mn=cn.edgeLabel;ft.dfsCode.dfsEdgeList.push(new Hi(Se,Nn,"-1",Mn,"-1")),ft.subGraphMining(dn[vn].projected),ft.dfsCode.dfsEdgeList.pop()}),Object.keys(Je).forEach(function(vn){var cn=Je[vn],Nn=cn.fromNodeId,Mn=cn.edgeLabel,zn=cn.nodeLabel2;ft.dfsCode.dfsEdgeList.push(new Hi(Nn,Se+1,Ga,Mn,zn)),ft.subGraphMining(Je[vn].projected),ft.dfsCode.dfsEdgeList.pop()})}},jt.prototype.generate1EdgeFrequentSubGraphs=function(){var it=this.graphs,ft=this.directed,Ft=this.minSupport,de=this.frequentSize1Subgraphs,ye={},Se={},Ue={},Je={};return Object.keys(it).forEach(function(dn){var vn=it[dn],cn=vn.nodeMap;vn.nodes.forEach(function(Nn,Mn){var zn=Nn.label,Gn="".concat(dn,"-").concat(zn);if(!Ue[Gn]){var jn=ye[zn]||0;jn++,ye[zn]=jn}Ue[Gn]={graphKey:dn,label:zn},Nn.edges.forEach(function(tr){var ur=zn,gr=cn[tr.to].label;if(!ft&&ur>gr){var Nr=gr;gr=ur,ur=Nr}var kr=tr.label,Rr="".concat(dn,"-").concat(ur,"-").concat(kr,"-").concat(gr),li="".concat(ur,"-").concat(kr,"-").concat(gr);if(!Se[li]){var Qr=Se[li]||0;Qr++,Se[li]=Qr}Je[Rr]={graphId:dn,nodeLabel1:ur,edgeLabel:kr,nodeLabel2:gr}})})}),Object.keys(ye).forEach(function(dn){var vn=ye[dn];if(!(vn<Ft)){var cn={nodes:[],edges:[]};cn.nodes.push({id:"0",label:dn}),de.push(cn)}}),de},jt.prototype.run=function(){var it=this;if(this.frequentSize1Subgraphs=this.generate1EdgeFrequentSubGraphs(),!(this.maxNodeNum<2)){var ft=this.graphs,Ft=this.directed,de={};Object.keys(ft).forEach(function(ye){var Se=ft[ye],Ue=Se.nodeMap;Se.nodes.forEach(function(Je){var dn=it.findForwardRootEdges(Se,Je);dn.forEach(function(vn){var cn=Ue[vn.to],Nn="".concat(Je.label,"-").concat(vn.label,"-").concat(cn.label);de[Nn]||(de[Nn]={projected:[],nodeLabel1:Je.label,edgeLabel:vn.label,nodeLabel2:cn.label});var Mn={graphId:ye,edge:vn,preNode:null};de[Nn].projected.push(Mn)})})}),Object.keys(de).forEach(function(ye){var Se=de[ye],Ue=Se.projected,Je=Se.nodeLabel1,dn=Se.edgeLabel,vn=Se.nodeLabel2;it.dfsCode.dfsEdgeList.push(new Hi(0,1,Je,dn,vn)),it.subGraphMining(Ue),it.dfsCode.dfsEdgeList.pop()})}},jt}(),xa=function(it,ft,Ft,de){var ye={};return Object.keys(it).forEach(function(Se,Ue){var Je=it[Se],dn=new ba(Ue,!0,ft),vn={};Je.nodes.forEach(function(cn,Nn){dn.addNode(Nn,cn[Ft]),vn[cn.id]=Nn}),Je.edges.forEach(function(cn,Nn){var Mn=vn[cn.source],zn=vn[cn.target];dn.addEdge(-1,Mn,zn,cn[de])}),dn&&dn.getNodeNum()&&(ye[dn.id]=dn)}),ye},Do=function(it,ft,Ft){var de=[];return it.forEach(function(ye){var Se={nodes:[],edges:[]};ye.nodes.forEach(function(Ue){var Je;Se.nodes.push((Je={id:"".concat(Ue.id)},Je[ft]=Ue.label,Je))}),ye.edges.forEach(function(Ue){var Je;Se.edges.push((Je={source:"".concat(Ue.from),target:"".concat(Ue.to)},Je[Ft]=Ue.label,Je))}),de.push(Se)}),de},Da="cluster",Lo=function(it){var ft=it.graphs,Ft=it.directed,de=Ft===void 0?!1:Ft,ye=it.nodeLabelProp,Se=ye===void 0?Da:ye,Ue=it.edgeLabelProp,Je=Ue===void 0?Da:Ue,dn=xa(ft,de,Se,Je),vn=it.minSupport,cn=it.maxNodeNum,Nn=it.minNodeNum,Mn=it.verbose,zn=it.top,Gn={graphs:dn,minSupport:vn,maxNodeNum:cn,minNodeNum:Nn,top:zn,verbose:Mn,directed:de},jn=new lo(Gn);jn.run();var tr=Do(jn.frequentSubgraphs,Se,Je);return tr},zs=Lo,Fr=function(it,ft,Ft,de){Ft===void 0&&(Ft="cluster"),de===void 0&&(de=2);var ye=[],Se=it.nodes;return ft.forEach(function(Ue,Je){ye.push(As(Se,Ue,Je,Ft,de))}),ye},As=function(it,ft,Ft,de,ye){var Se=[Ft],Ue=[],Je={};return ft.forEach(function(dn,vn){if(dn<=ye&&Ft!==vn){Se.push(vn),Ue.push(it[vn]);var cn=it[vn][de];Je[cn]?(Je[cn].count++,Je[cn].dists.push(dn)):Je[cn]={count:1,dists:[dn]}}}),Object.keys(Je).forEach(function(dn){Je[dn].dists=Je[dn].dists.sort(function(vn,cn){return vn-cn})}),{nodeIdx:Ft,nodeId:it[Ft].id,nodeIdxs:Se,neighbors:Ue,neighborNum:Se.length-1,nodeLabelCountMap:Je}},as=function(it,ft,Ft,de,ye){var Se=Math.ceil(Ft/ft),Ue={},Je=0;return de.forEach(function(dn,vn){for(var cn=0,Nn=0,Mn=dn.nodeIdxs,zn=dn.neighborNum-1;cn<Se;){for(var Gn=Mn[1+Math.floor(Math.random()*zn)],jn=0;(Ue["".concat(vn,"-").concat(Gn)]||Ue["".concat(Gn,"-").concat(vn)])&&(Gn=Math.floor(Math.random()*ft),jn++,!(jn>2*ft)););if(jn<2*ft&&(Ue["".concat(vn,"-").concat(Gn)]={start:vn,end:Gn,distance:ye[vn][Gn]},cn++,Je++,Je>=Ft))return Ue;if(Nn++,Nn>2*ft)break}if(cn<Se){var tr=Se-cn;Se=(Se+tr)/(ft-vn-1)}}),Ue},ko=function(it,ft,Ft,de){var ye=Ft.nodes;return de||(de={}),Object.keys(it).forEach(function(Se){var Ue,Je;if(!(de&&de[Se])){de[Se]={nodes:[],edges:[]};var dn=it[Se],vn=(Ue=ft[dn.start])===null||Ue===void 0?void 0:Ue.nodeIdxs,cn=(Je=ft[dn.end])===null||Je===void 0?void 0:Je.nodeIdxs;if(!(!vn||!cn)){var Nn=new Set(cn),Mn=vn.filter(function(ur){return Nn.has(ur)});if(!(!Mn||!Mn.length)){for(var zn={},Gn=Mn.length,jn=0;jn<Gn;jn++){var tr=ye[Mn[jn]];de[Se].nodes.push(tr),zn[tr.id]=!0}Ft.edges.forEach(function(ur){zn[ur.source]&&zn[ur.target]&&de[Se].edges.push(ur)})}}}}),de},hs=function(it,ft,Ft,de){var ye,Se,Ue={};it.nodes.forEach(function(dn){Ue[dn.id]=dn});var Je=0;return!(!((ye=ft==null?void 0:ft.edges)===null||ye===void 0)&&ye.length)||((Se=ft==null?void 0:ft.nodes)===null||Se===void 0?void 0:Se.length)<2?0:(it.edges.forEach(function(dn){var vn=Ue[dn.source][Ft],cn=Ue[dn.target][Ft],Nn=ft==null?void 0:ft.nodes[0][Ft],Mn=ft==null?void 0:ft.nodes[1][Ft],zn=ft==null?void 0:ft.edges[0][de];dn[de]===zn&&(vn===Nn&&cn===Mn||vn===Mn&&cn===Nn)&&Je++}),Je)},Ns=function(it,ft,Ft){for(var de=1/0,ye=0,Se=function(dn){var vn=it[dn],cn=Object.keys(vn).sort(function(ur,gr){return vn[ur]-vn[gr]}),Nn=10,Mn=[];cn.forEach(function(ur,gr){Mn[gr%Nn]||(Mn[gr%Nn]={graphs:[],totalCount:0,aveCount:0}),Mn[gr%Nn].graphs.push(ur),Mn[gr%Nn].totalCount+=vn[ur]});var zn=0,Gn=[];Mn.forEach(function(ur){var gr=ur.totalCount/ur.graphs.length;ur.aveCount=gr,Gn.push(gr);var Nr=0,kr=ur.length;ur.graphs.forEach(function(Rr,li){var Qr=vn[Rr];ur.graphs.forEach(function(ti,vi){li!==vi&&(Nr+=Math.abs(Qr-vn[ti]))})}),Nr/=kr*(kr-1)/2,zn+=Nr}),zn/=Mn.length;var jn=0;Gn.forEach(function(ur,gr){Gn.forEach(function(Nr,kr){gr!==kr&&(jn+=Math.abs(ur-Nr))}),jn/=Gn.length*(Gn.length-1)/2});var tr=jn-zn;de<tr&&(de=tr,ye=dn)},Ue=0;Ue<ft;Ue++)Se(Ue);return{structure:Ft[ye],structureCountMap:it[ye]}},bs=function(it,ft){var Ft={},de={};return it.forEach(function(ye,Se){Ft[ye.id]={idx:Se,node:ye,degree:0,inDegree:0,outDegree:0};var Ue=ye[ft];de[Ue]||(de[Ue]=[]),de[Ue].push(ye)}),{nodeMap:Ft,nodeLabelMap:de}},Yo=function(it,ft,Ft){var de={},ye={};return it.forEach(function(Se,Ue){de["".concat(N)]={idx:Ue,edge:Se};var Je=Se[ft];ye[Je]||(ye[Je]=[]),ye[Je].push(Se);var dn=Ft[Se.source];dn&&(dn.degree++,dn.outDegree++);var vn=Ft[Se.target];vn&&(vn.degree++,vn.inDegree++)}),{edgeMap:de,edgeLabelMap:ye}},Eo=function(it,ft,Ft){var de=ft.length,ye={};return ft.forEach(function(Se,Ue){for(var Je=Ft?0:Ue+1,dn=it[Ue].id,vn=Je;vn<de;vn++)if(Ue!==vn){var cn=it[vn].id,Nn=Se[vn];ye["".concat(dn,"-").concat(cn)]=Nn,Ft||(ye["".concat(cn,"-").concat(dn)]=Nn)}}),ye},La=function(it,ft,Ft,de,ye,Se,Ue,Je,dn,vn,cn){var Nn,Mn="".concat(ft.id,"-").concat(Ft.id);if(vn&&vn[Mn])return vn[Mn];var zn=cn?cn[Mn]:void 0;if(!zn){var Gn=(Nn={},Nn[Mn]={start:de[ft.id].idx,end:de[Ft.id].idx,distance:ye},Nn);cn=ko(Gn,Se,it,cn),zn=cn[Mn]}return hs(zn,Ue,Je,dn)},xo=function(it,ft,Ft,de){var ye,Se,Ue,Je=(ye=it[ft])===null||ye===void 0?void 0:ye.degree,dn=(Se=it[ft])===null||Se===void 0?void 0:Se.inDegree,vn=(Ue=it[ft])===null||Ue===void 0?void 0:Ue.outDegree;return it[ft]===void 0&&(Je=1/0,dn=1/0,vn=1/0,de[ft].forEach(function(cn){var Nn=Ft[cn.id].degree;Je>Nn&&(Je=Nn);var Mn=Ft[cn.id].inDegree;dn>Mn&&(dn=Mn);var zn=Ft[cn.id].outDegree;vn>zn&&(vn=zn)}),it[ft]={degree:Je,inDegree:dn,outDegree:vn}),{minPatternNodeLabelDegree:Je,minPatternNodeLabelInDegree:dn,minPatternNodeLabelOutDegree:vn}},ta=function(it,ft,Ft,de,ye,Se,Ue){var Je;if(Ft===void 0&&(Ft=!1),Se===void 0&&(Se="cluster"),Ue===void 0&&(Ue="cluster"),!(!it||!it.nodes)){var dn=it.nodes.length;if(dn){var vn=oo(it,Ft),cn=oo(ft,Ft),Nn=Eo(it.nodes,vn,Ft),Mn=Eo(ft.nodes,cn,Ft),zn=bs(it.nodes,Se),Gn=zn.nodeMap,jn=zn.nodeLabelMap,tr=bs(ft.nodes,Se),ur=tr.nodeMap,gr=tr.nodeLabelMap;Yo(it.edges,Ue,Gn);var Nr=Yo(ft.edges,Ue,ur).edgeLabelMap,kr=[];cn==null||cn.forEach(function(Vr){kr=kr.concat(Vr)}),ye||(ye=Math.max.apply(Math,(0,We.ev)((0,We.ev)([],kr,!1),[2],!1))),de||(de=ye);var Rr=Fr(it,vn,Se,de),li=Fr(ft,cn,Se,de),Qr=Math.min(100,dn*(dn-1)/2),ti=as(de,dn,Qr,Rr,vn),vi=ko(ti,Rr,it),ci=10,W=1,j=1,F=4,B={graphs:vi,nodeLabelProp:Se,edgeLabelProp:Ue,minSupport:W,minNodeNum:j,maxNodeNum:F,directed:Ft},K=zs(B).slice(0,ci),dt=K.length,St=[];K.forEach(function(Vr,mi){St[mi]={},Object.keys(vi).forEach(function(Jr){var Ii=vi[Jr],Ki=hs(Ii,Vr,Se,Ue);St[mi][Jr]=Ki})});var Et=Ns(St,dt,K),Zt=Et.structure,ce=Et.structureCountMap,Ae=ft.nodes[0],Le=[],$e=(Je=ft.nodes[0])===null||Je===void 0?void 0:Je[Se],Xe=-1/0;ft.nodes.forEach(function(Vr){var mi=Vr[Se],Jr=jn[mi];(Jr==null?void 0:Jr.length)>Xe&&(Xe=Jr.length,Le=Jr,$e=mi,Ae=Vr)});var an={},bn={},xn={},Dn={},Fn={},On={};Object.keys(gr).forEach(function(Vr,mi){Fn[Vr]=[],Ft&&(On[Vr]=[]);var Jr=-1/0,Ii=gr[Vr],Ki={};Ii.forEach(function(Ni){var Ri=Mn["".concat(Ae.id,"-").concat(Ni.id)];if(Ri&&Fn[Vr].push(Ri),Jr<Ri&&(Jr=Ri),Ki["".concat(Ae.id,"-").concat(Ni.id)]={start:0,end:ur[Ni.id].idx,distance:Ri},Ft){var na=Mn["".concat(Ni.id,"-").concat(Ae.id)];na&&On[Vr].push(na)}}),Fn[Vr]=Fn[Vr].sort(function(Ni,Ri){return Ni-Ri}),Ft&&(On[Vr]=On[Vr].sort(function(Ni,Ri){return Ni-Ri})),bn=ko(Ki,li,ft,bn);var Kr=[];if(Object.keys(Ki).forEach(function(Ni){if(xn[Ni]){Kr.push(xn[Ni]);return}var Ri=bn[Ni];xn[Ni]=hs(Ri,Zt,Se,Ue),Kr.push(xn[Ni])}),Kr=Kr.sort(function(Ni,Ri){return Ri-Ni}),Dn["".concat(Ae.id,"-").concat(Vr)]=Kr,Vr!==$e)for(var Zi=(Le==null?void 0:Le.length)||0,Pi=function(Ri){var na=Le[Ri],to=Rr[Gn[na.id].idx],ga=to.nodeLabelCountMap[Vr],os=gr[Vr].length;if(!ga||ga.count<os)return Le.splice(Ri,1),"continue";for(var ss=!1,Va=0;Va<os;Va++)if(ga.dists[Va]>Fn[Vr][Va]){ss=!0;break}if(ss)return Le.splice(Ri,1),"continue";var co={};to.neighbors.forEach(function(io){var So=Nn["".concat(na.id,"-").concat(io.id)];co["".concat(na.id,"-").concat(io.id)]={start:Gn[na.id].idx,end:Gn[io.id].idx,distance:So}}),vi=ko(co,Rr,it,vi);var wo=[];Object.keys(co).forEach(function(io){if(ce[io]){wo.push(ce[io]);return}var So=vi[io];ce[io]=hs(So,Zt,Se,Ue),wo.push(ce[io])}),wo=wo.sort(function(io,So){return So-io});for(var ro=!1,Va=0;Va<os;Va++)if(wo[Va]<Kr[Va]){ro=!0;break}if(ro)return Le.splice(Ri,1),"continue"},Qi=Zi-1;Qi>=0;Qi--)Pi(Qi)});var Yn=[];Le==null||Le.forEach(function(Vr){for(var mi=Gn[Vr.id].idx,Jr=As(it.nodes,vn[mi],mi,Se,ye),Ii=Jr.neighbors,Ki=Ii.length,Kr=!1,Zi=Ki-1;Zi>=0;Zi--){if(Ii.length+1<ft.nodes.length){Kr=!0;return}var Pi=Ii[Zi],Qi=Pi[Se];if(!gr[Qi]||!gr[Qi].length){Ii.splice(Zi,1);continue}if(!Fn[Qi]||!Fn[Qi].length){Ii.splice(Zi,1);continue}var Ni="".concat(Vr.id,"-").concat(Pi.id),Ri=Nn[Ni],na=Fn[Qi].length-1,to=Fn[Qi][na];if(Ri>to){Ii.splice(Zi,1);continue}if(Ft){var ga="".concat(Pi.id,"-").concat(Vr.id),os=Nn[ga];na=On[Qi].length-1;var ss=On[Qi][na];if(os>ss){Ii.splice(Zi,1);continue}}var Va=ce[Ni]?ce[Ni]:La(it,Vr,Pi,Gn,Ri,Rr,Zt,Se,Ue,ce,vi),co="".concat(Ae.id,"-").concat(Qi),wo=Dn[co][Dn[co].length-1];if(Va<wo){Ii.splice(Zi,1);continue}var ro=xo(an,Qi,ur,gr),io=ro.minPatternNodeLabelDegree,So=ro.minPatternNodeLabelInDegree,jo=ro.minPatternNodeLabelOutDegree;if(Gn[Pi.id].degree<io){Ii.splice(Zi,1);continue}}Kr||Yn.push({nodes:[Vr].concat(Ii)})});var nr=da(ft,Ae.id,!1).length,sr={};Ft?(Object.keys(nr).forEach(function(Vr){var mi=ur[Vr].node[Se];sr[mi]?sr[mi].push(nr[Vr]):sr[mi]=[nr[Vr]]}),Object.keys(sr).forEach(function(Vr){sr[Vr].sort(function(mi,Jr){return mi-Jr})})):sr=Fn;for(var xr=Yn.length,Wr=function(mi){var Jr=Yn[mi],Ii=Jr.nodes[0],Ki={},Kr={};Jr.nodes.forEach(function(oa,Mo){Kr[oa.id]={idx:Mo,node:oa,degree:0,inDegree:0,outDegree:0};var ha=oa[Se];Ki[ha]?Ki[ha]++:Ki[ha]=1});var Zi=[],Pi={};it.edges.forEach(function(oa){Kr[oa.source]&&Kr[oa.target]&&(Zi.push(oa),Pi[oa[Ue]]?Pi[oa[Ue]]++:Pi[oa[Ue]]=1,Kr[oa.source].degree++,Kr[oa.target].degree++,Kr[oa.source].outDegree++,Kr[oa.target].inDegree++)});for(var Qi=Object.keys(Nr).length,Ni=!1,Ri=0;Ri<Qi;Ri++){var na=Object.keys(Nr)[Ri];if(!Pi[na]||Pi[na]<Nr[na].length){Ni=!0;break}}if(Ni)return Yn.splice(mi,1),"continue";var to=Zi.length;if(to<ft.edges.length)return Yn.splice(mi,1),"break";for(var ga=!1,os=function(Mo){var ha=Zi[Mo],Zo=ha[Ue],Co=Nr[Zo];if(!Co||!Co.length)return Pi[Zo]--,Co&&Pi[Zo]<Co.length?(ga=!0,"break"):(Zi.splice(Mo,1),Kr[ha.source].degree--,Kr[ha.target].degree--,Kr[ha.source].outDegree--,Kr[ha.target].inDegree--,"continue");var ol=Kr[ha.source].node[Se],xs=Kr[ha.target].node[Se],Ds=!1;if(Co.forEach(function(gs){var ps=ur[gs.source].node,ws=ur[gs.target].node;ps[Se]===ol&&ws[Se]===xs&&(Ds=!0),!Ft&&ps[Se]===xs&&ws[Se]===ol&&(Ds=!0)}),!Ds)return Pi[Zo]--,Co&&Pi[Zo]<Co.length?(ga=!0,"break"):(Zi.splice(Mo,1),Kr[ha.source].degree--,Kr[ha.target].degree--,Kr[ha.source].outDegree--,Kr[ha.target].inDegree--,"continue")},Ri=to-1;Ri>=0;Ri--){var ss=os(Ri);if(ss==="break")break}if(ga)return Yn.splice(mi,1),"continue";Jr.edges=Zi;var Va=da(Jr,Jr.nodes[0].id,!1).length;if(Object.keys(Va).reverse().forEach(function(oa){if(!(oa===Jr.nodes[0].id||ga)){if(Va[oa]===1/0){var Mo=Kr[oa].node[Se];if(Ki[Mo]--,Ki[Mo]<gr[Mo].length){ga=!0;return}var ha=Jr.nodes.indexOf(Kr[oa].node);Jr.nodes.splice(ha,1),Kr[oa]=void 0;return}var Zo=Gn[oa].node[Se];if(!sr[Zo]||!sr[Zo].length||Va[oa]>sr[Zo][sr[Zo].length-1]){var Mo=Kr[oa].node[Se];if(Ki[Mo]--,Ki[Mo]<gr[Mo].length){ga=!0;return}var ha=Jr.nodes.indexOf(Kr[oa].node);Jr.nodes.splice(ha,1),Kr[oa]=void 0}}}),ga)return Yn.splice(mi,1),"continue";for(var co=!0,wo=0;co&&!ga;){co=!1;var ro=Ft?Kr[Ii.id].degree<ur[Ae.id].degree||Kr[Ii.id].inDegree<ur[Ae.id].inDegree||Kr[Ii.id].outDegree<ur[Ae.id].outDegree:Kr[Ii.id].degree<ur[Ae.id].degree;if(ro){ga=!0;break}if(Ki[Ii[Se]]<gr[Ii[Se]].length){ga=!0;break}for(var io=Jr.nodes.length,So=io-1;So>=0;So--){var jo=Jr.nodes[So],Rs=Kr[jo.id].degree,ls=Kr[jo.id].inDegree,$s=Kr[jo.id].outDegree,il=jo[Se],Ws=xo(an,il,ur,gr),al=Ws.minPatternNodeLabelDegree,Hl=Ws.minPatternNodeLabelInDegree,Yl=Ws.minPatternNodeLabelOutDegree,Mc=Ft?Rs<al||ls<Hl||$s<Yl:Rs<al;if(Mc){if(Ki[jo[Se]]--,Ki[jo[Se]]<gr[jo[Se]].length){ga=!0;break}Jr.nodes.splice(So,1),Kr[jo.id]=void 0,co=!0}}if(ga||!co&&wo!==0)break;to=Zi.length;for(var Is=to-1;Is>=0;Is--){var $o=Zi[Is];if(!Kr[$o.source]||!Kr[$o.target]){Zi.splice(Is,1);var vs=$o[Ue];if(Pi[vs]--,Kr[$o.source]&&(Kr[$o.source].degree--,Kr[$o.source].outDegree--),Kr[$o.target]&&(Kr[$o.target].degree--,Kr[$o.target].inDegree--),Nr[vs]&&Pi[vs]<Nr[vs].length){ga=!0;break}co=!0}}wo++}if(ga||ga||Jr.nodes.length<ft.nodes.length||Zi.length<ft.edges.length)return Yn.splice(mi,1),"continue"},ei=xr-1;ei>=0;ei--){var Ti=Wr(ei);if(Ti==="break")break}for(var Gi=Yn.length,Ei=function(mi){var Jr=Yn[mi],Ii={};Jr.edges.forEach(function(Zi){var Pi="".concat(Zi.source,"-").concat(Zi.target,"-").concat(Zi.label);Ii[Pi]?Ii[Pi]++:Ii[Pi]=1});for(var Ki=function(Pi){var Qi=Yn[Pi],Ni={};Qi.edges.forEach(function(na){var to="".concat(na.source,"-").concat(na.target,"-").concat(na.label);Ni[to]?Ni[to]++:Ni[to]=1});var Ri=!0;Object.keys(Ni).length!==Object.keys(Ii).length?Ri=!1:Object.keys(Ii).forEach(function(na){Ni[na]!==Ii[na]&&(Ri=!1)}),Ri&&Yn.splice(Pi,1)},Kr=Gi-1;Kr>mi;Kr--)Ki(Kr);Gi=Yn.length},ei=0;ei<=Gi-1;ei++)Ei(ei);return Yn}}},js=ta,_o=function(){function jt(it){it===void 0&&(it=10),this.linkedList=new P,this.maxStep=it}return Object.defineProperty(jt.prototype,"length",{get:function(){return this.linkedList.toArray().length},enumerable:!1,configurable:!0}),jt.prototype.isEmpty=function(){return!this.linkedList.head},jt.prototype.isMaxStack=function(){return this.toArray().length>=this.maxStep},jt.prototype.peek=function(){return this.isEmpty()?null:this.linkedList.head.value},jt.prototype.push=function(it){this.linkedList.prepend(it),this.length>this.maxStep&&this.linkedList.deleteTail()},jt.prototype.pop=function(){var it=this.linkedList.deleteHead();return it?it.value:null},jt.prototype.toArray=function(){return this.linkedList.toArray().map(function(it){return it.value})},jt.prototype.clear=function(){for(;!this.isEmpty();)this.pop()},jt}(),Es=_o,Ko=Ye,rl={getAdjMatrix:R,breadthFirstSearch:Ct,connectedComponent:kt,getDegree:Bt,getInDegree:Xt,getOutDegree:wt,detectCycle:Ye,detectDirectedCycle:Ko,detectAllCycles:qt,detectAllDirectedCycle:xe,detectAllUndirectedCycle:pe,depthFirstSearch:zt,dijkstra:da,findAllPath:Ra,findShortestPath:Oa,floydWarshall:oo,labelPropagation:so,louvain:ji,iLouvain:Kn,kCore:Io,kMeans:Ta,cosineSimilarity:ns,nodesCosineSimilarity:ys,minimumSpanningTree:is,pageRank:Wa,getNeighbors:I,Stack:Es,GADDI:js}},86314:function(Tt,vt,d){"use strict";d.d(vt,{MG:function(){return g},V7:function(){return b},Yq:function(){return P},eR:function(){return N},jt:function(){return I},tT:function(){return k}});var l=d(80813),R=d(76075),O=d(69014);function _(et){return typeof et=="boolean"?!1:"enter"in et&&"update"in et&&"exit"in et}function g(et){if(!et)return{enter:!1,update:!1,exit:!1};var tt=["enter","update","exit"],Ct=Object.fromEntries(Object.entries(et).filter(function(ut){var nt=(0,l.CR)(ut,1),kt=nt[0];return!tt.includes(kt)}));return Object.fromEntries(tt.map(function(ut){return _(et)?et[ut]===!1?[ut,!1]:[ut,(0,l.pi)((0,l.pi)({},et[ut]),Ct)]:[ut,Ct]}))}function P(et,tt){et?et.finished.then(tt):tt()}function b(et,tt){et.length===0?tt():Promise.all(et.map(function(Ct){return Ct==null?void 0:Ct.finished})).then(tt)}function A(et,tt){"update"in et?et.update(tt):et.attr(tt)}function I(et,tt,Ct){if(tt.length===0)return null;if(!Ct){var ut=tt.slice(-1)[0];return A(et,{style:ut}),null}return et.animate(tt,Ct)}function x(et,tt){return!(et.nodeName!=="text"||tt.nodeName!=="text"||et.attributes.text!==tt.attributes.text)}function k(et,tt,Ct,ut){if(ut===void 0&&(ut="destroy"),x(et,tt))return et.remove(),[null];var nt=function(){ut==="destroy"?et.destroy():ut==="hide"&&(0,O.Cp)(et),tt.isVisible()&&(0,O.$Z)(tt)};if(!Ct)return nt(),[null];var kt=Ct.duration,Nt=kt===void 0?0:kt,Bt=Ct.delay,Xt=Bt===void 0?0:Bt,wt=Math.ceil(+Nt/2),ot=+Nt/4,It=(0,l.CR)(et.getGeometryBounds().center,2),zt=It[0],Ot=It[1],pe=(0,l.CR)(tt.getGeometryBounds().center,2),xe=pe[0],qt=pe[1],Ye=(0,l.CR)([(zt+xe)/2-zt,(Ot+qt)/2-Ot],2),We=Ye[0],Oe=Ye[1],Qe=et.style.opacity,Mt=Qe===void 0?1:Qe,ne=tt.style.opacity,Me=ne===void 0?1:ne,nn=et.style.transform||"",le=tt.style.transform||"",be=et.animate([{opacity:Mt,transform:"translate(0, 0) ".concat(nn)},{opacity:0,transform:"translate(".concat(We,", ").concat(Oe,") ").concat(nn)}],(0,l.pi)((0,l.pi)({fill:"both"},Ct),{duration:Xt+wt+ot})),De=tt.animate([{opacity:0,transform:"translate(".concat(-We,", ").concat(-Oe,") ").concat(le),offset:.01},{opacity:Me,transform:"translate(0, 0) ".concat(le)}],(0,l.pi)((0,l.pi)({fill:"both"},Ct),{duration:wt+ot,delay:Xt+wt-ot}));return P(De,nt),[be,De]}function N(et,tt,Ct){var ut={},nt={};return Object.entries(tt).forEach(function(kt){var Nt=(0,l.CR)(kt,2),Bt=Nt[0],Xt=Nt[1];if(!(0,R.Z)(Xt)){var wt=et.style[Bt]||et.parsedStyle[Bt]||0;wt!==Xt&&(ut[Bt]=wt,nt[Bt]=Xt)}}),Ct?I(et,[ut,nt],(0,l.pi)({fill:"both"},Ct)):(A(et,nt),null)}},97304:function(Tt,vt,d){"use strict";d.d(vt,{w:function(){return b}});var l=d(80813),R=d(14675),O=d(69014),_=d(99247),g=d(16915);function P(){(0,O.WD)(this,this.attributes.visibility!=="hidden")}var b=function(A){(0,l.ZT)(I,A);function I(x,k){k===void 0&&(k={});var N=A.call(this,(0,_.n)({},{style:k},x))||this;return N.initialized=!1,N._defaultOptions=k,N}return Object.defineProperty(I.prototype,"offscreenGroup",{get:function(){return this._offscreen||(this._offscreen=(0,g.g)(this)),this._offscreen},enumerable:!1,configurable:!0}),Object.defineProperty(I.prototype,"defaultOptions",{get:function(){return this._defaultOptions},enumerable:!1,configurable:!0}),I.prototype.connectedCallback=function(){this.render(this.attributes,this),this.bindEvents(this.attributes,this),this.initialized=!0},I.prototype.disconnectedCallback=function(){var x;(x=this._offscreen)===null||x===void 0||x.destroy()},I.prototype.attributeChangedCallback=function(x){x==="visibility"&&P.call(this)},I.prototype.update=function(x,k){var N;return this.attr((0,_.n)({},this.attributes,x||{})),(N=this.render)===null||N===void 0?void 0:N.call(this,this.attributes,this,k)},I.prototype.clear=function(){this.removeChildren()},I.prototype.bindEvents=function(x,k){},I.prototype.getSubShapeStyle=function(x){var k=x.x,N=x.y,et=x.transform,tt=x.transformOrigin,Ct=x.class,ut=x.className,nt=x.zIndex,kt=(0,l._T)(x,["x","y","transform","transformOrigin","class","className","zIndex"]);return kt},I}(R.b_)},42777:function(Tt,vt,d){"use strict";d.d(vt,{x:function(){return _}});var l=d(80813),R=d(14675),O=d(16915),_=function(g){(0,l.ZT)(P,g);function P(b){b===void 0&&(b={});var A=b.style,I=(0,l._T)(b,["style"]);return g.call(this,(0,l.pi)({style:(0,l.pi)({text:"",fill:"black",fontFamily:"sans-serif",fontSize:16,fontStyle:"normal",fontVariant:"normal",fontWeight:"normal",lineWidth:1,textAlign:"start",textBaseline:"middle"},A)},I))||this}return Object.defineProperty(P.prototype,"offscreenGroup",{get:function(){return this._offscreen||(this._offscreen=(0,O.g)(this)),this._offscreen},enumerable:!1,configurable:!0}),P.prototype.disconnectedCallback=function(){var b;(b=this._offscreen)===null||b===void 0||b.destroy()},P}(R.xv)},65244:function(Tt,vt,d){"use strict";d.d(vt,{W:function(){return Dt}});var l=d(80813),R=d(97304),O=d(14675),_=d(88839),g=d(38974),P=d(17911),b=d(58688),A=d(33253),I=d(98294),x=d(67756);function k(U,Y,G){return G?"".concat(U," ").concat(G,"legend-").concat(Y):U}function N(U,Y,G){var J=U.classNamePrefix,pt=J===void 0?"":J;return k(Y.name,G,pt)}var et={title:"title",item:"item",marker:"marker",label:"label",value:"value",focusIcon:"focus-icon",background:"background",ribbon:"ribbon",track:"track",selection:"selection",handle:"handle",handleMarker:"handle-marker",handleLabel:"handle-label",indicator:"indicator",prevBtn:"prev-btn",nextBtn:"next-btn",pageInfo:"page-info"},tt=(0,b.A)({text:"text"},"title");function Ct(U,Y){var G=U.attributes,J=G.position,pt=G.spacing,Kt=G.inset,yt=G.text,Qt=U.getBBox(),ct=Y.getBBox(),ht=(0,A.l)(J),rt=(0,l.CR)((0,I.j)(yt?pt:0),4),$t=rt[0],Ht=rt[1],ue=rt[2],Ee=rt[3],ie=(0,l.CR)((0,I.j)(Kt),4),Pe=ie[0],Be=ie[1],He=ie[2],en=ie[3],un=(0,l.CR)([Ee+Ht,$t+ue],2),mn=un[0],Sn=un[1],Pn=(0,l.CR)([en+Be,Pe+He],2),$n=Pn[0],Wn=Pn[1];if(ht[0]==="l")return new P.b(Qt.x,Qt.y,ct.width+Qt.width+mn+$n,Math.max(ct.height+Wn,Qt.height));if(ht[0]==="t")return new P.b(Qt.x,Qt.y,Math.max(ct.width+$n,Qt.width),ct.height+Qt.height+Sn+Wn);var Xn=(0,l.CR)([Y.attributes.width||ct.width,Y.attributes.height||ct.height],2),An=Xn[0],Zn=Xn[1];return new P.b(ct.x,ct.y,An+Qt.width+mn+$n,Zn+Qt.height+Sn+Wn)}function ut(U,Y){var G=Object.entries(Y).reduce(function(J,pt){var Kt=(0,l.CR)(pt,2),yt=Kt[0],Qt=Kt[1],ct=U.node().attr(yt);return ct||(J[yt]=Qt),J},{});U.styles(G)}function nt(U){var Y,G,J,pt,Kt=U,yt=Kt.width,Qt=Kt.height,ct=Kt.position,ht=(0,l.CR)([+yt/2,+Qt/2],2),rt=ht[0],$t=ht[1],Ht=(0,l.CR)([+rt,+$t,"center","middle"],4),ue=Ht[0],Ee=Ht[1],ie=Ht[2],Pe=Ht[3],Be=(0,A.l)(ct);return Be.includes("l")&&(Y=(0,l.CR)([0,"start"],2),ue=Y[0],ie=Y[1]),Be.includes("r")&&(G=(0,l.CR)([+yt,"end"],2),ue=G[0],ie=G[1]),Be.includes("t")&&(J=(0,l.CR)([0,"top"],2),Ee=J[0],Pe=J[1]),Be.includes("b")&&(pt=(0,l.CR)([+Qt,"bottom"],2),Ee=pt[0],Pe=pt[1]),{x:ue,y:Ee,textAlign:ie,textBaseline:Pe}}var kt=function(U){(0,l.ZT)(Y,U);function Y(G){return U.call(this,G,{text:"",width:0,height:0,fill:"#4a505a",fontWeight:"bold",fontSize:12,fontFamily:"sans-serif",inset:0,spacing:0,position:"top-left"})||this}return Y.prototype.getAvailableSpace=function(){var G=this,J=this.attributes,pt=J.width,Kt=J.height,yt=J.position,Qt=J.spacing,ct=J.inset,ht=G.querySelector(tt.text.class);if(!ht)return new P.b(0,0,+pt,+Kt);var rt=ht.getBBox(),$t=rt.width,Ht=rt.height,ue=(0,l.CR)((0,I.j)(Qt),4),Ee=ue[0],ie=ue[1],Pe=ue[2],Be=ue[3],He=(0,l.CR)([0,0,+pt,+Kt],4),en=He[0],un=He[1],mn=He[2],Sn=He[3],Pn=(0,A.l)(yt);if(Pn.includes("i"))return new P.b(en,un,mn,Sn);Pn.forEach(function(Un,ar){var ii,Or,Lr,fi;Un==="t"&&(ii=(0,l.CR)(ar===0?[Ht+Pe,+Kt-Ht-Pe]:[0,+Kt],2),un=ii[0],Sn=ii[1]),Un==="r"&&(Or=(0,l.CR)([+pt-$t-Be],1),mn=Or[0]),Un==="b"&&(Lr=(0,l.CR)([+Kt-Ht-Ee],1),Sn=Lr[0]),Un==="l"&&(fi=(0,l.CR)(ar===0?[$t+ie,+pt-$t-ie]:[0,+pt],2),en=fi[0],mn=fi[1])});var $n=(0,l.CR)((0,I.j)(ct),4),Wn=$n[0],Xn=$n[1],An=$n[2],Zn=$n[3],qn=(0,l.CR)([Zn+Xn,Wn+An],2),er=qn[0],Cr=qn[1];return new P.b(en+Zn,un+Wn,mn-er,Sn-Cr)},Y.prototype.getBBox=function(){return this.title?this.title.getBBox():new P.b(0,0,0,0)},Y.prototype.render=function(G,J){var pt=this,Kt=G.width,yt=G.height,Qt=G.position,ct=G.spacing,ht=G.classNamePrefix,rt=(0,l._T)(G,["width","height","position","spacing","classNamePrefix"]),$t=(0,l.CR)((0,_.Hm)(rt),1),Ht=$t[0],ue=nt(G),Ee=ue.x,ie=ue.y,Pe=ue.textAlign,Be=ue.textBaseline;(0,x.z)(!!rt.text,(0,g.Ys)(J),function(He){var en=k(tt.text.name,et.title,ht);pt.title=He.maybeAppendByClassName(tt.text,"text").attr("className",en).styles(Ht).call(ut,{x:Ee,y:ie,textAlign:Pe,textBaseline:Be}).node()})},Y}(R.w),Nt=function(){},Bt=d(37004),Xt=d(38242);function wt(U,Y){return U.reduce(function(G,J){return(G[J[Y]]=G[J[Y]]||[]).push(J),G},{})}var ot=d(99247),It=d(70208),zt=d(78431),Ot=d(86314);function pe(U){var Y;return((Y=U[0])===null||Y===void 0?void 0:Y.map(function(G,J){return U.map(function(pt){return pt[J]})}))||[]}var xe=d(69014),qt=d(99769),Ye=function(U,Y,G){return[["M",U-G,Y],["A",G,G,0,1,0,U+G,Y],["A",G,G,0,1,0,U-G,Y],["Z"]]},We=Ye,Oe=function(U,Y,G){return[["M",U-G,Y-G],["L",U+G,Y-G],["L",U+G,Y+G],["L",U-G,Y+G],["Z"]]},Qe=function(U,Y,G){return[["M",U-G,Y],["L",U,Y-G],["L",U+G,Y],["L",U,Y+G],["Z"]]},Mt=function(U,Y,G){var J=G*Math.sin(.3333333333333333*Math.PI);return[["M",U-G,Y+J],["L",U,Y-J],["L",U+G,Y+J],["Z"]]},ne=function(U,Y,G){var J=G*Math.sin(.3333333333333333*Math.PI);return[["M",U-G,Y-J],["L",U+G,Y-J],["L",U,Y+J],["Z"]]},Me=function(U,Y,G){var J=G/2*Math.sqrt(3);return[["M",U,Y-G],["L",U+J,Y-G/2],["L",U+J,Y+G/2],["L",U,Y+G],["L",U-J,Y+G/2],["L",U-J,Y-G/2],["Z"]]},nn=function(U,Y,G){var J=G-1.5;return[["M",U-G,Y-J],["L",U+G,Y+J],["L",U+G,Y-J],["L",U-G,Y+J],["Z"]]},le=function(U,Y,G){return[["M",U,Y+G],["L",U,Y-G]]},be=function(U,Y,G){return[["M",U-G,Y-G],["L",U+G,Y+G],["M",U+G,Y-G],["L",U-G,Y+G]]},De=function(U,Y,G){return[["M",U-G/2,Y-G],["L",U+G/2,Y-G],["M",U,Y-G],["L",U,Y+G],["M",U-G/2,Y+G],["L",U+G/2,Y+G]]},Yt=function(U,Y,G){return[["M",U-G,Y],["L",U+G,Y],["M",U,Y-G],["L",U,Y+G]]},re=function(U,Y,G){return[["M",U-G,Y],["L",U+G,Y]]},xt=function(U,Y,G){return[["M",U-G,Y],["L",U+G,Y]]},at=xt,se=function(U,Y,G){return[["M",U-G,Y],["A",G/2,G/2,0,1,1,U,Y],["A",G/2,G/2,0,1,0,U+G,Y]]},Fe=function(U,Y,G){return[["M",U-G-1,Y-2.5],["L",U,Y-2.5],["L",U,Y+2.5],["L",U+G+1,Y+2.5]]},Re=function(U,Y,G){return[["M",U-G-1,Y+2.5],["L",U,Y+2.5],["L",U,Y-2.5],["L",U+G+1,Y-2.5]]},ge=function(U,Y,G){return[["M",U-(G+1),Y+2.5],["L",U-G/2,Y+2.5],["L",U-G/2,Y-2.5],["L",U+G/2,Y-2.5],["L",U+G/2,Y+2.5],["L",U+G+1,Y+2.5]]};function Ie(U,Y){return[["M",U-5,Y+2.5],["L",U-5,Y],["L",U,Y],["L",U,Y-3],["L",U,Y+3],["L",U+6.5,Y+3]]}var Ne=function(U,Y,G){return[["M",U-G,Y-G],["L",U+G,Y],["L",U-G,Y+G],["Z"]]},bt=function(U,Y,G){var J=G,pt=G*.2,Kt=G*.7;return[["M",U-J,Y],["A",J,J,0,1,0,U+J,Y],["A",J,J,0,1,0,U-J,Y],["Z"],["M",U-Kt,Y],["L",U-pt,Y],["M",U+pt,Y],["L",U+Kt,Y],["M",U,Y-Kt],["L",U,Y-pt],["M",U,Y+pt],["L",U,Y+Kt]]},Jt=(0,b.A)({prevBtnGroup:"prev-btn-group",prevBtn:"prev-btn",nextBtnGroup:"next-btn-group",nextBtn:"next-btn",pageInfoGroup:"page-info-group",pageInfo:"page-info",playWindow:"play-window",contentGroup:"content-group",controller:"controller",clipPath:"clip-path"},"navigator"),oe=function(U){(0,l.ZT)(Y,U);function Y(G){var J=U.call(this,G,{x:0,y:0,animate:{easing:"linear",duration:200,fill:"both"},buttonCursor:"pointer",buttonFill:"black",buttonD:Ne(0,0,6),buttonSize:12,controllerPadding:5,controllerSpacing:5,formatter:function(pt,Kt){return"".concat(pt,"/").concat(Kt)},defaultPage:0,loop:!1,orientation:"horizontal",pageNumFill:"black",pageNumFontSize:12,pageNumTextAlign:"start",pageNumTextBaseline:"middle"})||this;return J.playState="idle",J.contentGroup=J.appendChild(new O.ZA({class:Jt.contentGroup.name})),J.playWindow=J.contentGroup.appendChild(new O.ZA({class:Jt.playWindow.name})),J.innerCurrPage=J.defaultPage,J}return Object.defineProperty(Y.prototype,"defaultPage",{get:function(){var G=this.attributes.defaultPage;return(0,It.Z)(G,0,Math.max(this.pageViews.length-1,0))},enumerable:!1,configurable:!0}),Object.defineProperty(Y.prototype,"pageViews",{get:function(){return this.playWindow.children},enumerable:!1,configurable:!0}),Object.defineProperty(Y.prototype,"controllerShape",{get:function(){return this.totalPages>1?{width:55,height:0}:{width:0,height:0}},enumerable:!1,configurable:!0}),Object.defineProperty(Y.prototype,"pageShape",{get:function(){var G=this.pageViews,J=(0,l.CR)(pe(G.map(function($t){var Ht=$t.getBBox(),ue=Ht.width,Ee=Ht.height;return[ue,Ee]})).map(function($t){return Math.max.apply(Math,(0,l.ev)([],(0,l.CR)($t),!1))}),2),pt=J[0],Kt=J[1],yt=this.attributes,Qt=yt.pageWidth,ct=Qt===void 0?pt:Qt,ht=yt.pageHeight,rt=ht===void 0?Kt:ht;return{pageWidth:ct,pageHeight:rt}},enumerable:!1,configurable:!0}),Y.prototype.getContainer=function(){return this.playWindow},Object.defineProperty(Y.prototype,"totalPages",{get:function(){return this.pageViews.length},enumerable:!1,configurable:!0}),Object.defineProperty(Y.prototype,"currPage",{get:function(){return this.innerCurrPage},enumerable:!1,configurable:!0}),Y.prototype.getBBox=function(){var G=U.prototype.getBBox.call(this),J=G.x,pt=G.y,Kt=this.controllerShape,yt=this.pageShape,Qt=yt.pageWidth,ct=yt.pageHeight;return new P.b(J,pt,Qt+Kt.width,ct)},Y.prototype.goTo=function(G){var J=this,pt=this.attributes.animate,Kt=this,yt=Kt.currPage,Qt=Kt.playState,ct=Kt.playWindow,ht=Kt.pageViews;if(Qt!=="idle"||G<0||ht.length<=0||G>=ht.length)return null;ht[yt].setLocalPosition(0,0),this.prepareFollowingPage(G);var rt=(0,l.CR)(this.getFollowingPageDiff(G),2),$t=rt[0],Ht=rt[1];this.playState="running";var ue=(0,Ot.jt)(ct,[{transform:"translate(0, 0)"},{transform:"translate(".concat(-$t,", ").concat(-Ht,")")}],pt);return(0,Ot.Yq)(ue,function(){J.innerCurrPage=G,J.playState="idle",J.setVisiblePages([G]),J.updatePageInfo()}),ue},Y.prototype.prev=function(){var G=this.attributes.loop,J=this.pageViews.length,pt=this.currPage;if(!G&&pt<=0)return null;var Kt=G?(pt-1+J)%J:(0,It.Z)(pt-1,0,J);return this.goTo(Kt)},Y.prototype.next=function(){var G=this.attributes.loop,J=this.pageViews.length,pt=this.currPage;if(!G&&pt>=J-1)return null;var Kt=G?(pt+1)%J:(0,It.Z)(pt+1,0,J);return this.goTo(Kt)},Y.prototype.renderClipPath=function(G){var J=this.pageShape,pt=J.pageWidth,Kt=J.pageHeight;if(!pt||!Kt){this.contentGroup.style.clipPath=void 0;return}this.clipPath=G.maybeAppendByClassName(Jt.clipPath,"rect").styles({width:pt,height:Kt}),this.contentGroup.attr("clipPath",this.clipPath.node())},Y.prototype.setVisiblePages=function(G){this.playWindow.children.forEach(function(J,pt){G.includes(pt)?(0,xe.$Z)(J):(0,xe.Cp)(J)})},Y.prototype.adjustControllerLayout=function(){var G=this,J=G.prevBtnGroup,pt=G.nextBtnGroup,Kt=G.pageInfoGroup,yt=this.attributes,Qt=yt.orientation,ct=yt.controllerPadding,ht=Kt.getBBox(),rt=ht.width,$t=ht.height,Ht=(0,l.CR)(Qt==="horizontal"?[-180,0]:[-90,90],2),ue=Ht[0],Ee=Ht[1];J.setLocalEulerAngles(ue),pt.setLocalEulerAngles(Ee);var ie=J.getBBox(),Pe=ie.width,Be=ie.height,He=pt.getBBox(),en=He.width,un=He.height,mn=Math.max(Pe,rt,en),Sn=Qt==="horizontal"?{offset:[[0,0],[Pe/2+ct,0],[Pe+rt+ct*2,0]],textAlign:"start"}:{offset:[[mn/2,-Be-ct],[mn/2,0],[mn/2,un+ct]],textAlign:"center"},Pn=(0,l.CR)(Sn.offset,3),$n=(0,l.CR)(Pn[0],2),Wn=$n[0],Xn=$n[1],An=(0,l.CR)(Pn[1],2),Zn=An[0],qn=An[1],er=(0,l.CR)(Pn[2],2),Cr=er[0],Un=er[1],ar=Sn.textAlign,ii=Kt.querySelector("text");ii&&(ii.style.textAlign=ar),J.setLocalPosition(Wn,Xn),Kt.setLocalPosition(Zn,qn),pt.setLocalPosition(Cr,Un)},Y.prototype.updatePageInfo=function(){var G,J=this,pt=J.currPage,Kt=J.pageViews,yt=J.attributes.formatter;Kt.length<2||((G=this.pageInfoGroup.querySelector(Jt.pageInfo.class))===null||G===void 0||G.attr("text",yt(pt+1,Kt.length)),this.adjustControllerLayout())},Y.prototype.getFollowingPageDiff=function(G){var J=this.currPage;if(J===G)return[0,0];var pt=this.attributes.orientation,Kt=this.pageShape,yt=Kt.pageWidth,Qt=Kt.pageHeight,ct=G<J?-1:1;return pt==="horizontal"?[ct*yt,0]:[0,ct*Qt]},Y.prototype.prepareFollowingPage=function(G){var J=this,pt=J.currPage,Kt=J.pageViews;if(this.setVisiblePages([G,pt]),G!==pt){var yt=(0,l.CR)(this.getFollowingPageDiff(G),2),Qt=yt[0],ct=yt[1];Kt[G].setLocalPosition(Qt,ct)}},Y.prototype.renderController=function(G){var J=this,pt=this.attributes,Kt=pt.controllerSpacing,yt=pt.classNamePrefix,Qt=yt===void 0?"":yt,ct=this.pageShape,ht=ct.pageWidth,rt=ct.pageHeight,$t=this.pageViews.length>=2,Ht=G.maybeAppendByClassName(Jt.controller,"g");if((0,xe.WD)(Ht.node(),$t),!!$t){var ue=(0,_.zs)(this.attributes,"button"),Ee=(0,_.zs)(this.attributes,"pageNum"),ie=(0,l.CR)((0,_.Hm)(ue),2),Pe=ie[0],Be=ie[1],He=Pe.size,en=(0,l._T)(Pe,["size"]),un=!Ht.select(Jt.prevBtnGroup.class).node(),mn=Ht.maybeAppendByClassName(Jt.prevBtnGroup,"g").styles(Be);this.prevBtnGroup=mn.node();var Sn=mn.maybeAppendByClassName(Jt.prevBtn,"path");if(Qt){var Pn=k(Jt.prevBtn.name,et.prevBtn,Qt);Sn.node().setAttribute("class",Pn)}var $n=Ht.maybeAppendByClassName(Jt.nextBtnGroup,"g").styles(Be);this.nextBtnGroup=$n.node();var Wn=$n.maybeAppendByClassName(Jt.nextBtn,"path");if(Qt){var Xn=k(Jt.nextBtn.name,et.nextBtn,Qt);Wn.node().setAttribute("class",Xn)}[Sn,Wn].forEach(function(er){er.styles((0,l.pi)((0,l.pi)({},en),{transformOrigin:"center"})),(0,qt.b)(er.node(),He,!0)});var An=Ht.maybeAppendByClassName(Jt.pageInfoGroup,"g");this.pageInfoGroup=An.node();var Zn=An.maybeAppendByClassName(Jt.pageInfo,"text");if(Zn.styles(Ee),Qt){var qn=k(Jt.pageInfo.name,et.pageInfo,Qt);Zn.node().setAttribute("class",qn)}this.updatePageInfo(),Ht.node().setLocalPosition(ht+Kt,rt/2),un&&(this.prevBtnGroup.addEventListener("click",function(){J.prev()}),this.nextBtnGroup.addEventListener("click",function(){J.next()}))}},Y.prototype.render=function(G,J){var pt=G.x,Kt=pt===void 0?0:pt,yt=G.y,Qt=yt===void 0?0:yt;this.attr("transform","translate(".concat(Kt,", ").concat(Qt,")"));var ct=(0,g.Ys)(J);this.renderClipPath(ct),this.renderController(ct),this.setVisiblePages([this.defaultPage]),this.goTo(this.defaultPage)},Y.prototype.bindEvents=function(){var G=this,J=(0,zt.Z)(function(){return G.render(G.attributes,G)},50);this.playWindow.addEventListener(O.Dk.INSERTED,J),this.playWindow.addEventListener(O.Dk.REMOVED,J)},Y}(R.w),M=d(71018),Q=d(93785),te=d(71879);function Ut(U){var Y="default";if((0,Q.Z)(U)&&U instanceof Image)Y="image";else if((0,M.Z)(U))Y="symbol";else if((0,te.Z)(U)){var G=new RegExp("data:(image|text)");U.match(G)?Y="base64":/^(https?:\/\/(([a-zA-Z0-9]+-?)+[a-zA-Z0-9]+\.)+[a-zA-Z]+)(:\d+)?(\/.*)?(\?.*)?(#.*)?$/.test(U)?Y="url":Y="symbol"}return Y}function we(U){var Y=Ut(U);return["base64","url","image"].includes(Y)?"image":U&&Y==="symbol"?"path":null}var Ce=function(U){(0,l.ZT)(Y,U);function Y(){return U!==null&&U.apply(this,arguments)||this}return Y.prototype.render=function(G,J){var pt=G.x,Kt=pt===void 0?0:pt,yt=G.y,Qt=yt===void 0?0:yt,ct=this.getSubShapeStyle(G),ht=ct.symbol,rt=ct.size,$t=rt===void 0?16:rt,Ht=(0,l._T)(ct,["symbol","size"]),ue=we(ht);(0,x.z)(!!ue,(0,g.Ys)(J),function(Ee){Ee.maybeAppendByClassName("marker",ue).attr("className","marker ".concat(ue,"-marker")).call(function(ie){if(ue==="image"){var Pe=$t*2;ie.styles({img:ht,width:Pe,height:Pe,x:Kt-$t,y:Qt-$t})}else{var Pe=$t/2,Be=(0,M.Z)(ht)?ht:Y.getSymbol(ht);ie.styles((0,l.pi)({d:Be==null?void 0:Be(Kt,Qt,Pe)},Ht))}})})},Y.MARKER_SYMBOL_MAP=new Map,Y.registerSymbol=function(G,J){Y.MARKER_SYMBOL_MAP.set(G,J)},Y.getSymbol=function(G){return Y.MARKER_SYMBOL_MAP.get(G)},Y.getSymbols=function(){return Array.from(Y.MARKER_SYMBOL_MAP.keys())},Y}(R.w);Ce.registerSymbol("cross",be),Ce.registerSymbol("hyphen",re),Ce.registerSymbol("line",le),Ce.registerSymbol("plus",Yt),Ce.registerSymbol("tick",De),Ce.registerSymbol("circle",Ye),Ce.registerSymbol("point",We),Ce.registerSymbol("bowtie",nn),Ce.registerSymbol("hexagon",Me),Ce.registerSymbol("square",Oe),Ce.registerSymbol("diamond",Qe),Ce.registerSymbol("triangle",Mt),Ce.registerSymbol("triangle-down",ne),Ce.registerSymbol("line",le),Ce.registerSymbol("dot",xt),Ce.registerSymbol("dash",at),Ce.registerSymbol("smooth",se),Ce.registerSymbol("hv",Fe),Ce.registerSymbol("vh",Re),Ce.registerSymbol("hvh",ge),Ce.registerSymbol("vhv",Ie),Ce.registerSymbol("focus",bt);function _e(U,Y,G){var J=Math.round((U-G)/Y);return G+J*Y}function mt(U,Y,G){var J=1.4,pt=J*G;return[["M",U-G,Y-pt],["L",U+G,Y-pt],["L",U+G,Y+pt],["L",U-G,Y+pt],["Z"]]}var X=1.4,Pt=.4;function At(U,Y,G){var J=G,pt=J*X,Kt=J/2,yt=J/6,Qt=U+pt*Pt;return[["M",U,Y],["L",Qt,Y+Kt],["L",U+pt,Y+Kt],["L",U+pt,Y-Kt],["L",Qt,Y-Kt],["Z"],["M",Qt,Y+yt],["L",U+pt-2,Y+yt],["M",Qt,Y-yt],["L",U+pt-2,Y-yt]]}function Rt(U,Y,G){var J=G,pt=J*X,Kt=J/2,yt=J/6,Qt=Y+pt*Pt;return[["M",U,Y],["L",U-Kt,Qt],["L",U-Kt,Y+pt],["L",U+Kt,Y+pt],["L",U+Kt,Qt],["Z"],["M",U-yt,Qt],["L",U-yt,Y+pt-2],["M",U+yt,Qt],["L",U+yt,Y+pt-2]]}Ce.registerSymbol("hiddenHandle",mt),Ce.registerSymbol("verticalHandle",At),Ce.registerSymbol("horizontalHandle",Rt);var _t=function(U,Y,G){return U===void 0&&(U="horizontal"),U==="horizontal"?Y:G};function Vt(U,Y,G,J){var pt;J===void 0&&(J=4);var Kt=__read(U,2),yt=Kt[0],Qt=Kt[1],ct=__read(Y,2),ht=ct[0],rt=ct[1],$t=__read(G,2),Ht=$t[0],ue=$t[1],Ee=__read([ht,rt],2),ie=Ee[0],Pe=Ee[1],Be=Pe-ie;return ie>Pe&&(pt=__read([Pe,ie],2),ie=pt[0],Pe=pt[1]),Be>Qt-yt?[yt,Qt]:ie<yt?Ht===yt&&ue===Pe?[yt,Pe]:[yt,Be+yt]:Pe>Qt?ue===Qt&&Ht===ie?[ie,Qt]:[Qt-Be,Qt]:[ie,Pe]}function ae(U,Y,G){return U===void 0&&(U="horizontal"),U==="horizontal"?Y:G}var fe=d(49527),me=d(2080),Ze=d(88170),Ge=d(53160),Ve=d(23343);function rn(U,Y){for(var G in Y)Y.hasOwnProperty(G)&&G!=="constructor"&&Y[G]!==void 0&&(U[G]=Y[G])}function wn(U,Y,G,J){return Y&&rn(U,Y),G&&rn(U,G),J&&rn(U,J),U}var on=d(5759);function _n(U){return U instanceof Element||U instanceof Document}var Cn,Ln="component-poptip",En={CONTAINER:"component-poptip",ARROW:"component-poptip-arrow",TEXT:"component-poptip-text"},cr=(Cn={},Cn[".".concat(En.CONTAINER)]={visibility:"visible",position:"absolute","background-color":"rgba(0, 0, 0)","box-shadow":"0px 0px 10px #aeaeae","border-radius":"3px",color:"#fff",opacity:.8,"font-size":"12px",padding:"4px 6px",display:"flex","justify-content":"center","align-items":"center","z-index":8,transition:"visibility 50ms"},Cn[".".concat(En.TEXT)]={"text-align":"center"},Cn[".".concat(En.CONTAINER,"[data-position='top']")]={transform:"translate(-50%, -100%)"},Cn[".".concat(En.CONTAINER,"[data-position='left']")]={transform:"translate(-100%, -50%)"},Cn[".".concat(En.CONTAINER,"[data-position='right']")]={transform:"translate(0, -50%)"},Cn[".".concat(En.CONTAINER,"[data-position='bottom']")]={transform:"translate(-50%, 0)"},Cn[".".concat(En.CONTAINER,"[data-position='top-left']")]={transform:"translate(0,-100%)"},Cn[".".concat(En.CONTAINER,"[data-position='top-right']")]={transform:"translate(-100%,-100%)"},Cn[".".concat(En.CONTAINER,"[data-position='left-top']")]={transform:"translate(-100%, 0)"},Cn[".".concat(En.CONTAINER,"[data-position='left-bottom']")]={transform:"translate(-100%, -100%)"},Cn[".".concat(En.CONTAINER,"[data-position='right-top']")]={transform:"translate(0, 0)"},Cn[".".concat(En.CONTAINER,"[data-position='right-bottom']")]={transform:"translate(0, -100%)"},Cn[".".concat(En.CONTAINER,"[data-position='bottom-left']")]={transform:"translate(0, 0)"},Cn[".".concat(En.CONTAINER,"[data-position='bottom-right']")]={transform:"translate(-100%, 0)"},Cn[".".concat(En.ARROW)]={width:"4px",height:"4px",transform:"rotate(45deg)","background-color":"rgba(0, 0, 0)",position:"absolute","z-index":-1},Cn[".".concat(En.CONTAINER,"[data-position='top']")]={transform:"translate(-50%, calc(-100% - 5px))"},Cn["[data-position='top'] .".concat(En.ARROW)]={bottom:"-2px"},Cn[".".concat(En.CONTAINER,"[data-position='left']")]={transform:"translate(calc(-100% - 5px), -50%)"},Cn["[data-position='left'] .".concat(En.ARROW)]={right:"-2px"},Cn[".".concat(En.CONTAINER,"[data-position='right']")]={transform:"translate(5px, -50%)"},Cn["[data-position='right'] .".concat(En.ARROW)]={left:"-2px"},Cn[".".concat(En.CONTAINER,"[data-position='bottom']")]={transform:"translate(-50%, 5px)"},Cn["[data-position='bottom'] .".concat(En.ARROW)]={top:"-2px"},Cn[".".concat(En.CONTAINER,"[data-position='top-left']")]={transform:"translate(0, calc(-100% - 5px))"},Cn["[data-position='top-left'] .".concat(En.ARROW)]={left:"10px",bottom:"-2px"},Cn[".".concat(En.CONTAINER,"[data-position='top-right']")]={transform:"translate(-100%, calc(-100% - 5px))"},Cn["[data-position='top-right'] .".concat(En.ARROW)]={right:"10px",bottom:"-2px"},Cn[".".concat(En.CONTAINER,"[data-position='left-top']")]={transform:"translate(calc(-100% - 5px), 0)"},Cn["[data-position='left-top'] .".concat(En.ARROW)]={right:"-2px",top:"8px"},Cn[".".concat(En.CONTAINER,"[data-position='left-bottom']")]={transform:"translate(calc(-100% - 5px), -100%)"},Cn["[data-position='left-bottom'] .".concat(En.ARROW)]={right:"-2px",bottom:"8px"},Cn[".".concat(En.CONTAINER,"[data-position='right-top']")]={transform:"translate(5px, 0)"},Cn["[data-position='right-top'] .".concat(En.ARROW)]={left:"-2px",top:"8px"},Cn[".".concat(En.CONTAINER,"[data-position='right-bottom']")]={transform:"translate(5px, -100%)"},Cn["[data-position='right-bottom'] .".concat(En.ARROW)]={left:"-2px",bottom:"8px"},Cn[".".concat(En.CONTAINER,"[data-position='bottom-left']")]={transform:"translate(0, 5px)"},Cn["[data-position='bottom-left'] .".concat(En.ARROW)]={top:"-2px",left:"8px"},Cn[".".concat(En.CONTAINER,"[data-position='bottom-right']")]={transform:"translate(-100%, 5px)"},Cn["[data-position='bottom-right'] .".concat(En.ARROW)]={top:"-2px",right:"8px"},Cn),Bn=void 0;function br(U,Y,G,J,pt,Kt){if(pt===void 0&&(pt=!1),Kt===void 0&&(Kt=!1),Kt)return[U,Y];var yt=G.getBoundingClientRect(),Qt=yt.x,ct=yt.y,ht=yt.width,rt=yt.height;switch(J){case"top":return pt?[Qt+ht/2,ct]:[U,ct];case"left":return pt?[Qt,ct+rt/2]:[Qt,Y];case"bottom":return pt?[Qt+ht/2,ct+rt]:[U,ct+rt];case"right":return pt?[Qt+ht,ct+rt/2]:[Qt+ht,Y];case"top-right":case"right-top":return[Qt+ht,ct];case"left-bottom":case"bottom-left":return[Qt,ct+rt];case"right-bottom":case"bottom-right":return[Qt+ht,ct+rt];case"top-left":case"left-top":default:return[Qt,ct]}}var fr=function(U){var Y;return function(){for(var G=[],J=0;J<arguments.length;J++)G[J]=arguments[J];return Y||(Y=U.apply(Bn,G)),Y}};function Zr(U){var Y=U&&document.getElementById(U);return Y||(Y=document.createElement("div"),Y.setAttribute("id",U),document.body.appendChild(Y)),Y}function di(U){var Y=fr(Zr)(U);return Y}var Xr=function(U){(0,l.ZT)(Y,U);function Y(G){var J=U.call(this,(0,Ve.Z)({style:{id:Ln}},Y.defaultOptions,G))||this;return J.visibility="visible",J.map=new Map,J.domStyles="",J.initShape(),J.render(J.attributes,J),J}return Object.defineProperty(Y.prototype,"visible",{get:function(){return this.visibility==="visible"},enumerable:!1,configurable:!0}),Y.prototype.render=function(G,J){this.visibility=this.style.visibility,this.updatePoptipElement()},Y.prototype.update=function(G){this.attr((0,Ve.Z)({},this.style,G)),this.render(this.attributes,this)},Y.prototype.bind=function(G,J){var pt=this;if(G){var Kt=this.style.text,yt=function(ct){var ht=G,rt=pt.style,$t=Kt;if(J){var Ht=typeof J=="function"?J.call(null,ct):J,ue=Ht.html,Ee=Ht.target,ie=(0,l._T)(Ht,["html","target"]);rt=wn({},pt.style,ie),(Ee||Ee===!1)&&(ht=Ee),typeof ue=="string"&&($t=ue)}var Pe=rt.position,Be=rt.arrowPointAtCenter,He=rt.follow,en=rt.offset;if(ht){var un=ct,mn=un.clientX,Sn=un.clientY,Pn=(0,l.CR)(br(mn,Sn,ht,Pe,Be,He),2),$n=Pn[0],Wn=Pn[1];pt.showTip($n,Wn,{text:$t,position:Pe,offset:en})}else pt.hideTip()},Qt=function(){pt.hideTip()};G.addEventListener("mousemove",yt),G.addEventListener("mouseleave",Qt),this.map.set(G,[yt,Qt])}},Y.prototype.unbind=function(G){if(this.map.has(G)){var J=(0,l.CR)(this.map.get(G)||[],2),pt=J[0],Kt=J[1];pt&&G.removeEventListener("mousemove",pt),Kt&&G.removeEventListener("mouseleave",Kt),this.map.delete(G)}},Y.prototype.clear=function(){this.container.innerHTML=""},Y.prototype.destroy=function(){var G=this,J;(0,l.ev)([],(0,l.CR)(this.map.keys()),!1).forEach(function(pt){return G.unbind(pt)}),(J=this.container)===null||J===void 0||J.remove(),U.prototype.destroy.call(this)},Y.prototype.showTip=function(G,J,pt){var Kt=(0,on.Z)(pt,"text");if(!(Kt&&typeof Kt!="string")&&(this.applyStyles(),G&&J&&pt)){var yt=pt.offset,Qt=pt.position;if(Qt&&this.container.setAttribute("data-position",Qt),this.setOffsetPosition(G,J,yt),typeof Kt=="string"){var ct=this.container.querySelector(".".concat(En.TEXT));ct&&(ct.innerHTML=Kt)}this.visibility="visible",this.container.style.visibility="visible"}},Y.prototype.hideTip=function(){this.visibility="hidden",this.container.style.visibility="hidden"},Y.prototype.getContainer=function(){return this.container},Y.prototype.getClassName=function(){var G=this.style.containerClassName;return"".concat(En.CONTAINER).concat(G?" ".concat(G):"")},Y.prototype.initShape=function(){var G=this,J=this.style.id;this.container=di(J),this.container.className=this.getClassName(),this.container.addEventListener("mousemove",function(){return G.showTip()}),this.container.addEventListener("mouseleave",function(){return G.hideTip()})},Y.prototype.updatePoptipElement=function(){var G=this.container;this.clear();var J=this.style,pt=J.id,Kt=J.template,yt=J.text;this.container.setAttribute("id",pt),this.container.className=this.getClassName();var Qt='<span class="'.concat(En.ARROW,'"></span>');G.innerHTML=Qt,(0,te.Z)(Kt)?G.innerHTML+=Kt:Kt&&_n(Kt)&&G.appendChild(Kt),yt&&(G.getElementsByClassName(En.TEXT)[0].textContent=yt),this.applyStyles(),this.container.style.visibility=this.visibility},Y.prototype.applyStyles=function(){var G=(0,ot.n)({},cr,this.style.domStyles),J=Object.entries(G).reduce(function(Kt,yt){var Qt=(0,l.CR)(yt,2),ct=Qt[0],ht=Qt[1],rt=Object.entries(ht).reduce(function($t,Ht){var ue=(0,l.CR)(Ht,2),Ee=ue[0],ie=ue[1];return"".concat($t).concat(Ee,": ").concat(ie,";")},"");return"".concat(Kt).concat(ct,"{").concat(rt,"}")},"");if(this.domStyles!==J){this.domStyles=J;var pt=this.container.querySelector("style");pt&&this.container.removeChild(pt),pt=document.createElement("style"),pt.innerHTML=J,this.container.appendChild(pt)}},Y.prototype.setOffsetPosition=function(G,J,pt){pt===void 0&&(pt=this.style.offset);var Kt=(0,l.CR)(pt,2),yt=Kt[0],Qt=yt===void 0?0:yt,ct=Kt[1],ht=ct===void 0?0:ct;this.container.style.left="".concat(G+Qt,"px"),this.container.style.top="".concat(J+ht,"px")},Y.tag="poptip",Y.defaultOptions={style:{x:0,y:0,width:0,height:0,target:null,visibility:"hidden",text:"",position:"top",follow:!1,offset:[0,0],domStyles:cr,template:'<div class="'.concat(En.TEXT,'"></div>')}},Y}(R.w),Mr=(0,b.A)({layout:"flex",markerGroup:"marker-group",marker:"marker",labelGroup:"label-group",label:"label",valueGroup:"value-group",focusGroup:"focus-group",focus:"focus",value:"value",backgroundGroup:"background-group",background:"background"},"legend-category-item"),gi={offset:[0,20],domStyles:{".component-poptip":{opacity:"1",padding:"8px 12px",background:"#fff",boxShadow:"0 2px 8px rgba(0, 0, 0, 0.15)"},".component-poptip-arrow":{display:"none"},".component-poptip-text":{color:"#000",lineHeight:"20px"}}};function yi(U){var Y=U.querySelector(Mr.marker.class);return Y?Y.style:{}}var _i=function(U){(0,l.ZT)(Y,U);function Y(G,J){var pt=U.call(this,G,{span:[1,1],marker:function(){return new O.Cd({style:{r:6}})},markerSize:10,labelFill:"#646464",valueFill:"#646464",labelFontSize:12,valueFontSize:12,labelTextBaseline:"middle",valueTextBaseline:"middle"})||this;return pt.keyFields={},pt.keyFields=J||{},pt}return Object.defineProperty(Y.prototype,"showValue",{get:function(){var G=this.attributes.valueText;return G?typeof G=="string"||typeof G=="number"?G!=="":typeof G=="function"?!0:G.attr("text")!=="":!1},enumerable:!1,configurable:!0}),Object.defineProperty(Y.prototype,"actualSpace",{get:function(){var G=this.labelGroup,J=this.valueGroup,pt=this.attributes,Kt=pt.markerSize,yt=pt.focus,Qt=pt.focusMarkerSize,ct=G.node().getBBox(),ht=ct.width,rt=ct.height,$t=J.node().getBBox(),Ht=$t.width,ue=$t.height,Ee=yt?Qt!=null?Qt:12:0;return{markerWidth:Kt,labelWidth:ht,valueWidth:Ht,focusWidth:Ee,height:Math.max(Kt,rt,ue)}},enumerable:!1,configurable:!0}),Object.defineProperty(Y.prototype,"span",{get:function(){var G=this.attributes.span;if(!G)return[1,1];var J=(0,l.CR)((0,I.j)(G),2),pt=J[0],Kt=J[1],yt=this.showValue?Kt:0,Qt=pt+yt;return[pt/Qt,yt/Qt]},enumerable:!1,configurable:!0}),Y.prototype.setAttribute=function(G,J){U.prototype.setAttribute.call(this,G,J)},Object.defineProperty(Y.prototype,"shape",{get:function(){var G,J=this.attributes,pt=J.markerSize,Kt=J.width,yt=this.actualSpace,Qt=yt.markerWidth,ct=yt.focusWidth,ht=yt.height,rt=this.actualSpace,$t=rt.labelWidth,Ht=rt.valueWidth,ue=(0,l.CR)(this.spacing,3),Ee=ue[0],ie=ue[1],Pe=ue[2];if(Kt){var Be=Kt-pt-Ee-ie-ct-Pe,He=(0,l.CR)(this.span,2),en=He[0],un=He[1];G=(0,l.CR)([en*Be,un*Be],2),$t=G[0],Ht=G[1]}var mn=Qt+$t+Ht+Ee+ie+ct+Pe;return{width:mn,height:ht,markerWidth:Qt,labelWidth:$t,valueWidth:Ht,focusWidth:ct}},enumerable:!1,configurable:!0}),Object.defineProperty(Y.prototype,"spacing",{get:function(){var G=this.attributes,J=G.spacing,pt=G.focus;if(!J)return[0,0,0];var Kt=(0,l.CR)((0,I.j)(J),3),yt=Kt[0],Qt=Kt[1],ct=Kt[2];return[yt,this.showValue?Qt:0,pt?ct:0]},enumerable:!1,configurable:!0}),Object.defineProperty(Y.prototype,"layout",{get:function(){var G=this.shape,J=G.markerWidth,pt=G.labelWidth,Kt=G.valueWidth,yt=G.focusWidth,Qt=G.width,ct=G.height,ht=(0,l.CR)(this.spacing,3),rt=ht[0],$t=ht[1],Ht=ht[2];return{height:ct,width:Qt,markerWidth:J,labelWidth:pt,valueWidth:Kt,focusWidth:yt,position:[J/2,J+rt,J+pt+rt+$t,J+pt+Kt+rt+$t+Ht+yt/2]}},enumerable:!1,configurable:!0}),Object.defineProperty(Y.prototype,"scaleSize",{get:function(){var G=yi(this.markerGroup.node()),J=this.attributes,pt=J.markerSize,Kt=J.markerStrokeWidth,yt=Kt===void 0?G.strokeWidth:Kt,Qt=J.markerLineWidth,ct=Qt===void 0?G.lineWidth:Qt,ht=J.markerStroke,rt=ht===void 0?G.stroke:ht,$t=+(yt||ct||(rt?1:0))*Math.sqrt(2),Ht=this.markerGroup.node().getBBox(),ue=Ht.width,Ee=Ht.height;return(1-$t/Math.max(ue,Ee))*pt},enumerable:!1,configurable:!0}),Y.prototype.renderMarker=function(G){var J=this,pt=this.attributes,Kt=pt.marker,yt=pt.classNamePrefix,Qt=(0,_.zs)(this.attributes,"marker");this.markerGroup=G.maybeAppendByClassName(Mr.markerGroup,"g").style("zIndex",0),(0,x.z)(!!Kt,this.markerGroup,function(){var ct,ht=J.markerGroup.node(),rt=(ct=ht.childNodes)===null||ct===void 0?void 0:ct[0],$t=k(Mr.marker.name,et.marker,yt),Ht=typeof Kt=="string"?new Ce({style:{symbol:Kt},className:$t}):Kt();if(rt)if(Ht.nodeName===rt.nodeName)rt instanceof Ce?rt.update((0,l.pi)((0,l.pi)({},Qt),{symbol:Kt})):((0,me.DM)(rt,Ht),(0,g.Ys)(rt).styles(Qt));else{if(rt.remove(),!(Ht instanceof Ce)){var Ee=k(Mr.marker.name,et.marker,yt);Ht.className=Ee}(0,g.Ys)(Ht).styles(Qt),ht.appendChild(Ht)}else{if(!(Ht instanceof Ce)){var ue=k(Mr.marker.name,et.marker,yt);Ht.className=ue,(0,g.Ys)(Ht).styles(Qt)}ht.appendChild(Ht)}J.markerGroup.node().scale(1/J.markerGroup.node().getScale()[0]);var ie=(0,qt.b)(J.markerGroup.node(),J.scaleSize,!0);J.markerGroup.node().style._transform="scale(".concat(ie,")")})},Y.prototype.renderLabel=function(G){var J=(0,_.zs)(this.attributes,"label"),pt=J.text,Kt=(0,l._T)(J,["text"]),yt=this.attributes.classNamePrefix;this.labelGroup=G.maybeAppendByClassName(Mr.labelGroup,"g").style("zIndex",0);var Qt=k(Mr.label.name,et.label,yt),ct=this.labelGroup.maybeAppendByClassName(Mr.label,function(){return(0,Ze.S)(pt)});ct.node().setAttribute("class",Qt),ct.styles(Kt)},Y.prototype.renderValue=function(G){var J=this,pt=(0,_.zs)(this.attributes,"value"),Kt=pt.text,yt=(0,l._T)(pt,["text"]),Qt=this.attributes.classNamePrefix;this.valueGroup=G.maybeAppendByClassName(Mr.valueGroup,"g").style("zIndex",0),(0,x.z)(this.showValue,this.valueGroup,function(){var ct=k(Mr.value.name,et.value,Qt),ht=J.valueGroup.maybeAppendByClassName(Mr.value,function(){return(0,Ze.S)(Kt)});ht.node().setAttribute("class",ct),ht.styles(yt)})},Y.prototype.createPoptip=function(){var G=this.attributes.poptip,J=G||{},pt=J.render,Kt=(0,l._T)(J,["render"]),yt=new Xr({style:(0,ot.n)(gi,Kt)});return this.poptipGroup=yt,yt},Y.prototype.bindPoptip=function(G){var J=this,pt=this.attributes.poptip;if(pt){var Kt=this.poptipGroup||this.createPoptip();Kt.bind(G,function(){var yt=J.attributes,Qt=yt.labelText,ct=yt.valueText,ht=yt.markerFill,rt=typeof Qt=="string"?Qt:Qt==null?void 0:Qt.attr("text"),$t=typeof ct=="string"?ct:ct==null?void 0:ct.attr("text");if(typeof pt.render=="function")return{html:pt.render((0,l.pi)((0,l.pi)({},J.keyFields),{label:rt,value:$t,color:ht}))};var Ht="";return(typeof rt=="string"||typeof rt=="number")&&(Ht+='<div class="component-poptip-label">'.concat(rt,"</div>")),(typeof $t=="string"||typeof $t=="number")&&(Ht+='<div class="component-poptip-value">'.concat($t,"</div>")),{html:Ht}})}},Y.prototype.renderFocus=function(G){var J=this,pt=this.attributes,Kt=pt.focus,yt=pt.focusMarkerSize,Qt=pt.classNamePrefix,ct={x:0,y:0,size:yt,opacity:.6,symbol:"focus",stroke:"#aaaaaa",lineWidth:1};(0,fe.Z)(Kt)||(this.focusGroup=G.maybeAppendByClassName(Mr.focusGroup,"g").style("zIndex",0),(0,x.z)(Kt,this.focusGroup,function(){var ht=k(Mr.focus.name,et.focusIcon,Qt),rt=new Ce({style:(0,l.pi)((0,l.pi)({},ct),{symbol:"focus"}),className:ht}),$t=new O.Cd({style:{r:ct.size/2,fill:"transparent"}}),Ht=J.focusGroup.node();Ht.appendChild($t),Ht.appendChild(rt),rt.update({opacity:0}),G.node().addEventListener("pointerenter",function(){rt.update({opacity:1})}),G.node().addEventListener("pointerleave",function(){rt.update({opacity:0})})}))},Y.prototype.renderPoptip=function(G){var J=this,pt=this.attributes.poptip;if(pt){var Kt=G.maybeAppendByClassName(Mr.value,"g").node(),yt=G.maybeAppendByClassName(Mr.label,"g").node();[Kt,yt].forEach(function(Qt){Qt&&J.bindPoptip(Qt)})}},Y.prototype.renderBackground=function(G){var J=this.shape,pt=J.width,Kt=J.height,yt=(0,_.zs)(this.attributes,"background");this.background=G.maybeAppendByClassName(Mr.backgroundGroup,"g").style("zIndex",-1);var Qt=this.background.maybeAppendByClassName(Mr.background,"rect");Qt.styles((0,l.pi)({width:pt,height:Kt},yt));var ct=this.attributes.classNamePrefix,ht=ct===void 0?"":ct;if(ht){var rt=k(Mr.background.name,et.background,ht);Qt.node().setAttribute("class",rt)}},Y.prototype.adjustLayout=function(){var G=this.layout,J=G.labelWidth,pt=G.valueWidth,Kt=G.height,yt=(0,l.CR)(G.position,4),Qt=yt[0],ct=yt[1],ht=yt[2],rt=yt[3],$t=Kt/2;this.markerGroup.styles({transform:"translate(".concat(Qt,", ").concat($t,")").concat(this.markerGroup.node().style._transform)}),this.labelGroup.styles({transform:"translate(".concat(ct,", ").concat($t,")")}),this.focusGroup&&this.focusGroup.styles({transform:"translate(".concat(rt,", ").concat($t,")")}),(0,Ge.O)(this.labelGroup.select(Mr.label.class).node(),Math.ceil(J)),this.showValue&&(this.valueGroup.styles({transform:"translate(".concat(ht,", ").concat($t,")")}),(0,Ge.O)(this.valueGroup.select(Mr.value.class).node(),Math.ceil(pt)))},Y.prototype.render=function(G,J){var pt=(0,g.Ys)(J),Kt=G.x,yt=Kt===void 0?0:Kt,Qt=G.y,ct=Qt===void 0?0:Qt;pt.styles({transform:"translate(".concat(yt,", ").concat(ct,")")}),this.renderMarker(pt),this.renderLabel(pt),this.renderValue(pt),this.renderBackground(pt),this.renderPoptip(pt),this.renderFocus(pt),this.adjustLayout()},Y}(R.w),qr=(0,b.A)({page:"item-page",navigator:"navigator",item:"item"},"items"),Jn=function(U,Y,G){return G===void 0&&(G=!0),U?Y(U):G},sn=function(U){(0,l.ZT)(Y,U);function Y(G){var J=U.call(this,G,{data:[],gridRow:1/0,gridCol:void 0,padding:0,width:1e3,height:100,rowPadding:0,colPadding:0,layout:"flex",orientation:"horizontal",click:Nt,mouseenter:Nt,mouseleave:Nt})||this;return J.navigatorShape=[0,0],J}return Object.defineProperty(Y.prototype,"pageViews",{get:function(){return this.navigator.getContainer()},enumerable:!1,configurable:!0}),Object.defineProperty(Y.prototype,"grid",{get:function(){var G=this.attributes,J=G.gridRow,pt=G.gridCol,Kt=G.data;if(!J&&!pt)throw new Error("gridRow and gridCol can not be set null at the same time");return J&&pt?[J,pt]:J?[J,Kt.length]:[Kt.length,pt]},enumerable:!1,configurable:!0}),Object.defineProperty(Y.prototype,"renderData",{get:function(){var G=this.attributes,J=G.data,pt=G.layout,Kt=G.poptip,yt=G.focus,Qt=G.focusMarkerSize,ct=G.classNamePrefix,ht=(0,_.zs)(this.attributes,"item"),rt=J.map(function($t,Ht){var ue=$t.id,Ee=ue===void 0?Ht:ue,ie=$t.label,Pe=$t.value;return{id:"".concat(Ee),index:Ht,style:(0,l.pi)({layout:pt,labelText:ie,valueText:Pe,poptip:Kt,focus:yt,focusMarkerSize:Qt,classNamePrefix:ct},Object.fromEntries(Object.entries(ht).map(function(Be){var He=(0,l.CR)(Be,2),en=He[0],un=He[1];return[en,(0,Xt.S)(un,[$t,Ht,J])]})))}});return rt},enumerable:!1,configurable:!0}),Y.prototype.getGridLayout=function(){var G=this,J=this.attributes,pt=J.orientation,Kt=J.width,yt=J.rowPadding,Qt=J.colPadding,ct=(0,l.CR)(this.navigatorShape,1),ht=ct[0],rt=(0,l.CR)(this.grid,2),$t=rt[0],Ht=rt[1],ue=Ht*$t,Ee=0;return this.pageViews.children.map(function(ie,Pe){var Be,He,en=Math.floor(Pe/ue),un=Pe%ue,mn=G.ifHorizontal(Ht,$t),Sn=[Math.floor(un/mn),un%mn];pt==="vertical"&&Sn.reverse();var Pn=(0,l.CR)(Sn,2),$n=Pn[0],Wn=Pn[1],Xn=(Kt-ht-(Ht-1)*Qt)/Ht,An=ie.getBBox().height,Zn=(0,l.CR)([0,0],2),qn=Zn[0],er=Zn[1];return pt==="horizontal"?(Be=(0,l.CR)([Ee,$n*(An+yt)],2),qn=Be[0],er=Be[1],Ee=Wn===Ht-1?0:Ee+Xn+Qt):(He=(0,l.CR)([Wn*(Xn+Qt),Ee],2),qn=He[0],er=He[1],Ee=$n===$t-1?0:Ee+An+yt),{page:en,index:Pe,row:$n,col:Wn,pageIndex:un,width:Xn,height:An,x:qn,y:er}})},Y.prototype.getFlexLayout=function(){var G=this.attributes,J=G.width,pt=G.height,Kt=G.rowPadding,yt=G.colPadding,Qt=(0,l.CR)(this.navigatorShape,1),ct=Qt[0],ht=(0,l.CR)(this.grid,2),rt=ht[0],$t=ht[1],Ht=(0,l.CR)([J-ct,pt],2),ue=Ht[0],Ee=Ht[1],ie=(0,l.CR)([0,0,0,0,0,0,0,0],8),Pe=ie[0],Be=ie[1],He=ie[2],en=ie[3],un=ie[4],mn=ie[5],Sn=ie[6],Pn=ie[7];return this.pageViews.children.map(function($n,Wn){var Xn,An,Zn,qn,er=$n.getBBox(),Cr=er.width,Un=er.height,ar=Sn===0?0:yt,ii=Sn+ar+Cr;if(ii<=ue&&Jn(un,function(Lr){return Lr<$t}))return Xn=(0,l.CR)([Sn+ar,Pn,ii],3),Pe=Xn[0],Be=Xn[1],Sn=Xn[2],{width:Cr,height:Un,x:Pe,y:Be,page:He,index:Wn,pageIndex:en++,row:mn,col:un++};An=(0,l.CR)([mn+1,0,0,Pn+Un+Kt],4),mn=An[0],un=An[1],Sn=An[2],Pn=An[3];var Or=Pn+Un;return Or<=Ee&&Jn(mn,function(Lr){return Lr<rt})?(Zn=(0,l.CR)([Sn,Pn,Cr],3),Pe=Zn[0],Be=Zn[1],Sn=Zn[2],{width:Cr,height:Un,x:Pe,y:Be,page:He,index:Wn,pageIndex:en++,row:mn,col:un++}):(qn=(0,l.CR)([0,0,Cr,0,He+1,0,0,0],8),Pe=qn[0],Be=qn[1],Sn=qn[2],Pn=qn[3],He=qn[4],en=qn[5],mn=qn[6],un=qn[7],{width:Cr,height:Un,x:Pe,y:Be,page:He,index:Wn,pageIndex:en++,row:mn,col:un++})})},Object.defineProperty(Y.prototype,"itemsLayout",{get:function(){this.navigatorShape=[0,0];var G=this.attributes.layout==="grid"?this.getGridLayout:this.getFlexLayout,J=G.call(this);return J.slice(-1)[0].page>0?(this.navigatorShape=[55,0],G.call(this)):J},enumerable:!1,configurable:!0}),Y.prototype.ifHorizontal=function(G,J){var pt=this.attributes.orientation;return ae(pt,G,J)},Y.prototype.flattenPage=function(G){G.querySelectorAll(qr.item.class).forEach(function(J){G.appendChild(J)}),G.querySelectorAll(qr.page.class).forEach(function(J){var pt=G.removeChild(J);pt.destroy()})},Y.prototype.renderItems=function(G){var J=this.attributes,pt=J.click,Kt=J.mouseenter,yt=J.mouseleave,Qt=J.classNamePrefix;this.flattenPage(G);var ct=this.dispatchCustomEvent.bind(this),ht=k(qr.item.name,et.item,Qt);(0,g.Ys)(G).selectAll(qr.item.class).data(this.renderData,function(rt){return rt.id}).join(function(rt){return rt.append(function($t){var Ht=$t.style,ue=(0,l._T)($t,["style"]);return new _i({style:Ht},ue)}).attr("className",ht).on("click",function(){pt==null||pt(this),ct("itemClick",{item:this})}).on("pointerenter",function(){Kt==null||Kt(this),ct("itemMouseenter",{item:this})}).on("pointerleave",function(){yt==null||yt(this),ct("itemMouseleave",{item:this})})},function(rt){return rt.each(function($t){var Ht=$t.style;this.update(Ht)})},function(rt){return rt.remove()})},Y.prototype.relayoutNavigator=function(){var G,J=this.attributes,pt=J.layout,Kt=J.width,yt=((G=this.pageViews.children[0])===null||G===void 0?void 0:G.getBBox().height)||0,Qt=(0,l.CR)(this.navigatorShape,2),ct=Qt[0],ht=Qt[1];this.navigator.update(pt==="grid"?{pageWidth:Kt-ct,pageHeight:yt-ht}:{})},Y.prototype.adjustLayout=function(){var G=this,J=Object.entries(wt(this.itemsLayout,"page")).map(function(Kt){var yt=(0,l.CR)(Kt,2),Qt=yt[0],ct=yt[1];return{page:Qt,layouts:ct}}),pt=(0,l.ev)([],(0,l.CR)(this.navigator.getContainer().children),!1);J.forEach(function(Kt){var yt=Kt.layouts,Qt=G.pageViews.appendChild(new O.ZA({className:qr.page.name}));yt.forEach(function(ct){var ht=ct.x,rt=ct.y,$t=ct.index,Ht=ct.width,ue=ct.height,Ee=pt[$t];Qt.appendChild(Ee),(0,Bt.Z)(Ee,"__layout__",ct),Ee.update({x:ht,y:rt,width:Ht,height:ue})})}),this.relayoutNavigator()},Y.prototype.renderNavigator=function(G){var J=this.attributes,pt=J.orientation,Kt=J.classNamePrefix,yt=(0,_.zs)(this.attributes,"nav"),Qt=(0,ot.n)({orientation:pt,classNamePrefix:Kt},yt),ct=this;return G.selectAll(qr.navigator.class).data(["nav"]).join(function(ht){return ht.append(function(){return new oe({style:Qt})}).attr("className",qr.navigator.name).each(function(){ct.navigator=this})},function(ht){return ht.each(function(){this.update(Qt)})},function(ht){return ht.remove()}),this.navigator},Y.prototype.getBBox=function(){return this.navigator.getBBox()},Y.prototype.render=function(G,J){var pt=this.attributes.data;if(!(!pt||pt.length===0)){var Kt=this.renderNavigator((0,g.Ys)(J));this.renderItems(Kt.getContainer()),this.adjustLayout()}},Y.prototype.dispatchCustomEvent=function(G,J){var pt=new O.Aw(G,{detail:J});this.dispatchEvent(pt)},Y}(R.w),Wt=(0,b.A)({markerGroup:"marker-group",marker:"marker",labelGroup:"label-group",label:"label"},"handle"),y={showLabel:!0,formatter:function(U){return U.toString()},markerSize:25,markerStroke:"#c5c5c5",markerFill:"#fff",markerLineWidth:1,labelFontSize:12,labelFill:"#c5c5c5",labelText:"",orientation:"vertical",spacing:0},E=function(U){(0,l.ZT)(Y,U);function Y(G){return U.call(this,G,y)||this}return Y.prototype.render=function(G,J){var pt=(0,g.Ys)(J).maybeAppendByClassName(Wt.markerGroup,"g");this.renderMarker(pt);var Kt=(0,g.Ys)(J).maybeAppendByClassName(Wt.labelGroup,"g");this.renderLabel(Kt)},Y.prototype.renderMarker=function(G){var J=this,pt=this.attributes,Kt=pt.orientation,yt=pt.classNamePrefix,Qt=pt.markerSymbol,ct=Qt===void 0?ae(Kt,"horizontalHandle","verticalHandle"):Qt;(0,x.z)(!!ct,G,function(ht){var rt=(0,_.zs)(J.attributes,"marker"),$t=(0,l.pi)({symbol:ct},rt),Ht=k(Wt.marker.name,et.handleMarker,yt);if(J.marker=ht.maybeAppendByClassName(Wt.marker,function(){return new Ce({style:$t,className:Ht})}).update($t),yt){var ue=J.marker.node().querySelector(".marker");if(ue){var Ee=ue.getAttribute("class")||"",ie=Ee.split(" ")[0],Pe=k(ie,et.handleMarker,yt);ue.setAttribute("class",Pe)}}})},Y.prototype.renderLabel=function(G){var J=this,pt=this.attributes,Kt=pt.showLabel,yt=pt.orientation,Qt=pt.spacing,ct=Qt===void 0?0:Qt,ht=pt.formatter,rt=pt.classNamePrefix;(0,x.z)(Kt,G,function($t){var Ht,ue=(0,_.zs)(J.attributes,"label"),Ee=ue.text,ie=(0,l._T)(ue,["text"]),Pe=((Ht=$t.select(Wt.marker.class))===null||Ht===void 0?void 0:Ht.node().getBBox())||{},Be=Pe.width,He=Be===void 0?0:Be,en=Pe.height,un=en===void 0?0:en,mn=(0,l.CR)(ae(yt,[0,un+ct,"center","top"],[He+ct,0,"start","middle"]),4),Sn=mn[0],Pn=mn[1],$n=mn[2],Wn=mn[3],Xn=k(Wt.label.name,et.handleLabel,rt);$t.maybeAppendByClassName(Wt.label,"text").attr("className",Xn).styles((0,l.pi)((0,l.pi)({},ie),{x:Sn,y:Pn,text:ht(Ee).toString(),textAlign:$n,textBaseline:Wn}))})},Y}(R.w),c={showTitle:!0,padding:0,orientation:"horizontal",backgroundFill:"transparent",titleText:"",titleSpacing:4,titlePosition:"top-left",titleFill:"#2C3542",titleFontWeight:"bold",titleFontFamily:"sans-serif",titleFontSize:12},f=(0,ot.n)({},c,{}),w=(0,ot.n)({},c,(0,_.dq)(y,"handle"),{color:["#d0e3fa","#acc7f6","#8daaf2","#6d8eea","#4d73cd","#325bb1","#5a3e75","#8c3c79","#e23455","#e7655b"],indicatorBackgroundFill:"#262626",indicatorLabelFill:"white",indicatorLabelFontSize:12,indicatorVisibility:"hidden",labelAlign:"value",labelDirection:"positive",labelSpacing:5,showHandle:!0,showIndicator:!0,showLabel:!0,slidable:!0,titleText:"",type:"continuous"}),Z=.01,z=.5,H=(0,b.A)({title:"title",html:"html",titleGroup:"title-group",items:"items",itemsGroup:"items-group",contentGroup:"content-group",ribbonGroup:"ribbon-group",ribbon:"ribbon",handlesGroup:"handles-group",handle:"handle",startHandle:"start-handle",endHandle:"end-handle",labelGroup:"label-group",label:"label",indicator:"indicator"},"legend"),q=function(U){(0,l.ZT)(Y,U);function Y(){return U!==null&&U.apply(this,arguments)||this}return Y.prototype.update=function(G){this.attr(G)},Y}(O.k9),Dt=function(U){(0,l.ZT)(Y,U);function Y(G){return U.call(this,G,f)||this}return Y.prototype.renderTitle=function(G,J,pt){var Kt=this.attributes,yt=Kt.showTitle,Qt=Kt.titleText,ct=Kt.classNamePrefix,ht=(0,_.zs)(this.attributes,"title"),rt=(0,l.CR)((0,_.Hm)(ht),2),$t=rt[0],Ht=rt[1];this.titleGroup=G.maybeAppendByClassName(H.titleGroup,"g").styles(Ht);var ue=(0,l.pi)((0,l.pi)({width:J,height:pt},$t),{text:yt?Qt:"",classNamePrefix:ct});this.title=this.titleGroup.maybeAppendByClassName(H.title,function(){return new kt({style:ue})}).update(ue)},Y.prototype.renderCustom=function(G){var J=this.attributes.data,pt={innerHTML:this.attributes.render(J),pointerEvents:"auto"};G.maybeAppendByClassName(H.html,function(){return new q({className:H.html.name,style:pt})}).update(pt)},Y.prototype.renderItems=function(G,J){var pt=J.x,Kt=J.y,yt=J.width,Qt=J.height,ct=(0,_.zs)(this.attributes,"title",!0),ht=(0,l.CR)((0,_.Hm)(ct),2),rt=ht[0],$t=ht[1],Ht=(0,l.pi)((0,l.pi)({},rt),{width:yt,height:Qt,x:0,y:0});this.itemsGroup=G.maybeAppendByClassName(H.itemsGroup,"g").styles((0,l.pi)((0,l.pi)({},$t),{transform:"translate(".concat(pt,", ").concat(Kt,")")}));var ue=this;this.itemsGroup.selectAll(H.items.class).data(["items"]).join(function(Ee){return Ee.append(function(){return new sn({style:Ht})}).attr("className",H.items.name).each(function(){ue.items=(0,g.Ys)(this)})},function(Ee){return Ee.update(Ht)},function(Ee){return Ee.remove()})},Y.prototype.adjustLayout=function(){var G=this.attributes.showTitle;if(G){var J=this.title.node().getAvailableSpace(),pt=J.x,Kt=J.y;this.itemsGroup.node().style.transform="translate(".concat(pt,", ").concat(Kt,")")}},Object.defineProperty(Y.prototype,"availableSpace",{get:function(){var G=this.attributes,J=G.showTitle,pt=G.width,Kt=G.height;return J?this.title.node().getAvailableSpace():new P.b(0,0,pt,Kt)},enumerable:!1,configurable:!0}),Y.prototype.getBBox=function(){var G,J,pt=(G=this.title)===null||G===void 0?void 0:G.node(),Kt=(J=this.items)===null||J===void 0?void 0:J.node();return!pt||!Kt?U.prototype.getBBox.call(this):Ct(pt,Kt)},Y.prototype.render=function(G,J){var pt=this.attributes,Kt=pt.width,yt=pt.height,Qt=pt.x,ct=Qt===void 0?0:Qt,ht=pt.y,rt=ht===void 0?0:ht,$t=pt.classNamePrefix,Ht=pt.render,ue=(0,g.Ys)(J),Ee=J.className||"legend-category";$t?J.attr("className","".concat(Ee," ").concat($t,"legend")):J.className||J.attr("className","legend-category"),J.style.transform="translate(".concat(ct,", ").concat(rt,")"),Ht?this.renderCustom(ue):(this.renderTitle(ue,Kt,yt),this.renderItems(ue,this.availableSpace),this.adjustLayout())},Y}(R.w)},91498:function(Tt,vt,d){"use strict";d.d(vt,{s:function(){return ci}});var l=d(80813),R=d(70208),O=d(97304),_=d(14675),g=d(99247),P=d(17911),b=d(88839),A=null,I=null;function x(W){return W instanceof Date?W:new Date(W)}function k(W){for(var j=__read(W,2),F=j[0],B=j[1],K=A.indexOf(F),dt=A.indexOf(B),St="",Et=K;Et<=dt;Et+=1)if(St+=I[Et],Et<dt){var Zt="-";Et===2?Zt=" ":Et>2&&(Zt=":"),St+=Zt}return St}function N(W,j){var F={YYYY:W.getFullYear(),MM:W.getMonth()+1,DD:W.getDate(),HH:W.getHours(),mm:W.getMinutes(),ss:W.getSeconds()},B=j;return Object.keys(F).forEach(function(K){var dt=F[K];B=B.replace(K,K==="YYYY"?"".concat(dt):"".concat(dt).padStart(2,"0"))}),B}function et(W,j){return x(W).getTime()-x(j).getTime()}function tt(W,j){var F=__read([x(W),x(j)],2),B=F[0],K=F[1];return B.getFullYear()!==K.getFullYear()?"year":B.getMonth()!==K.getMonth()?"month":B.getDay()!==K.getDay()?"day":B.getHours()!==K.getHours()?"hour":B.getMinutes()!==K.getMinutes()?"minute":"second"}function Ct(W,j){var F=new Date(W),B={year:function(K){K.setMonth(0),K.setHours(0,0,0,0)},month:function(K){K.setDate(1),K.setHours(0,0,0,0)},day:function(K){return K.setHours(0,0,0,0)},hour:function(K){return K.setMinutes(0,0,0)},minute:function(K){return K.setSeconds(0,0)},second:function(K){return K.setMilliseconds(0)}};return B[j](F),N(F,k(["year",j]))}var ut=d(86314),nt=d(67756);function kt(W,j){if(W.length<=j)return W;for(var F=Math.floor(W.length/j),B=[],K=0;K<W.length;K+=F)B.push(W[K]);return B}var Nt=d(38974),Bt=d(23343),Xt=d(58688),wt={gridGroup:"grid-group",mainGroup:"main-group",lineGroup:"line-group",tickGroup:"tick-group",labelGroup:"label-group",titleGroup:"title-group",grid:"grid",line:"line",lineFirst:"line-first",lineSecond:"line-second",tick:"tick",tickItem:"tick-item",label:"label",labelItem:"label-item",title:"title"},ot={data:[],animate:{enter:!1,update:{duration:100,easing:"ease-in-out-sine",fill:"both"},exit:{duration:100,fill:"both"}},showArrow:!0,showGrid:!0,showLabel:!0,showLine:!0,showTick:!0,showTitle:!0,showTrunc:!1,dataThreshold:100,lineLineWidth:1,lineStroke:"black",crossPadding:10,titleFill:"black",titleFontSize:12,titlePosition:"lb",titleSpacing:0,titleTextAlign:"center",titleTextBaseline:"middle",lineArrow:function(){return new _.y$({style:{d:[["M",10,10],["L",-10,0],["L",10,-10],["L",0,0],["L",10,10],["Z"]],fill:"black",transformOrigin:"center"}})},labelAlign:"parallel",labelDirection:"positive",labelFontSize:12,labelSpacing:0,gridConnect:"line",gridControlAngles:[],gridDirection:"positive",gridLength:0,gridType:"segment",lineArrowOffset:15,lineArrowSize:10,tickDirection:"positive",tickLength:5,tickLineWidth:1,tickStroke:"black",labelOverlap:[]},It=(0,Bt.Z)({},ot,{style:{type:"arc"}}),zt=(0,Bt.Z)({},ot,{style:{}}),Ot=(0,Xt.A)({mainGroup:wt.mainGroup,gridGroup:wt.gridGroup,grid:wt.grid,lineGroup:wt.lineGroup,line:wt.line,tickGroup:wt.tickGroup,tick:wt.tick,tickItem:wt.tickItem,labelGroup:wt.labelGroup,label:wt.label,labelItem:wt.labelItem,titleGroup:wt.titleGroup,title:wt.title,lineFirst:wt.lineFirst,lineSecond:wt.lineSecond},"axis"),pe=d(71018);function xe(W,j){return[W[0]*j,W[1]*j]}function qt(W,j){return[W[0]+j[0],W[1]+j[1]]}function Ye(W,j){return[W[0]-j[0],W[1]-j[1]]}function We(W,j){return[Math.min(W[0],j[0]),Math.min(W[1],j[1])]}function Oe(W,j){return[Math.max(W[0],j[0]),Math.max(W[1],j[1])]}function Qe(W,j){return Math.sqrt(Math.pow(W[0]-j[0],2)+Math.pow(W[1]-j[1],2))}function Mt(W){if(W[0]===0&&W[1]===0)return[0,0];var j=Math.sqrt(Math.pow(W[0],2)+Math.pow(W[1],2));return[W[0]/j,W[1]/j]}function ne(W,j,F){var B=__read(W,2),K=B[0],dt=B[1],St=__read(j,2),Et=St[0],Zt=St[1],ce=K-Et,Ae=dt-Zt,Le=Math.sin(F),$e=Math.cos(F);return[ce*$e-Ae*Le+Et,ce*Le+Ae*$e+Zt]}function Me(W,j){return j?[W[1],-W[0]]:[-W[1],W[0]]}function nn(W){return W*Math.PI/180}function le(W){return Number((W*180/Math.PI).toPrecision(5))}var be=d(38242);function De(W,j){return W.style.opacity||(W.style.opacity=1),(0,ut.eR)(W,{opacity:0},j)}var Yt=["$el","cx","cy","d","dx","dy","fill","fillOpacity","filter","fontFamily","fontSize","fontStyle","fontVariant","fontWeight","height","img","increasedLineWidthForHitTesting","innerHTML","isBillboard","billboardRotation","isSizeAttenuation","isClosed","isOverflowing","leading","letterSpacing","lineDash","lineHeight","lineWidth","markerEnd","markerEndOffset","markerMid","markerStart","markerStartOffset","maxLines","metrics","miterLimit","offsetX","offsetY","opacity","path","points","r","radius","rx","ry","shadowColor","src","stroke","strokeOpacity","text","textAlign","textBaseline","textDecorationColor","textDecorationLine","textDecorationStyle","textOverflow","textPath","textPathSide","textPathStartOffset","transform","transformOrigin","visibility","width","wordWrap","wordWrapWidth","x","x1","x2","y","y1","y2","z1","z2","zIndex"];function re(W){return Yt.includes(W)}function xt(W){var j={};for(var F in W)re(F)&&(j[F]=W[F]);return j}var at=(0,Xt.A)({lineGroup:"line-group",line:"line",regionGroup:"region-group",region:"region"},"grid");function se(W){return W.reduce(function(j,F,B){return j.push((0,l.ev)([B===0?"M":"L"],(0,l.CR)(F),!1)),j},[])}function Fe(W,j,F){var B=j.connect,K=B===void 0?"line":B,dt=j.center;if(K==="line")return se(W);if(!dt)return[];var St=Qe(W[0],dt),Et=F?0:1;return W.reduce(function(Zt,ce,Ae){return Ae===0?Zt.push((0,l.ev)(["M"],(0,l.CR)(ce),!1)):Zt.push((0,l.ev)(["A",St,St,0,0,Et],(0,l.CR)(ce),!1)),Zt},[])}function Re(W,j,F){return j.type==="surround"?Fe(W,j,F):se(W)}function ge(W,j,F){var B=F.type,K=F.connect,dt=F.center,St=F.closed,Et=St?[["Z"]]:[],Zt=(0,l.CR)([Re(W,F),Re(j.slice().reverse(),F,!0)],2),ce=Zt[0],Ae=Zt[1],Le=(0,l.CR)([W[0],j.slice(-1)[0]],2),$e=Le[0],Xe=Le[1],an=function(Fn,On){return[ce,Fn,Ae,On,Et].flat()};if(K==="line"||B==="surround")return an([(0,l.ev)(["L"],(0,l.CR)(Xe),!1)],[(0,l.ev)(["L"],(0,l.CR)($e),!1)]);if(!dt)throw new Error("Arc grid need to specified center");var bn=(0,l.CR)([Qe(Xe,dt),Qe($e,dt)],2),xn=bn[0],Dn=bn[1];return an([(0,l.ev)(["A",xn,xn,0,0,1],(0,l.CR)(Xe),!1),(0,l.ev)(["L"],(0,l.CR)(Xe),!1)],[(0,l.ev)(["A",Dn,Dn,0,0,0],(0,l.CR)($e),!1),(0,l.ev)(["L"],(0,l.CR)($e),!1)])}function Ie(W,j,F,B){var K=F.animate,dt=F.isBillboard,St=j.map(function(Et,Zt){return{id:Et.id||"grid-line-".concat(Zt),d:Re(Et.points,F)}});return W.selectAll(at.line.class).data(St,function(Et){return Et.id}).join(function(Et){return Et.append("path").each(function(Zt,ce){var Ae=(0,be.S)(xt((0,l.pi)({d:Zt.d},B)),[Zt,ce,St]);this.attr((0,l.pi)({class:at.line.name,stroke:"#D9D9D9",lineWidth:1,lineDash:[4,4],isBillboard:dt},Ae))})},function(Et){return Et.transition(function(Zt,ce){var Ae=(0,be.S)(xt((0,l.pi)({d:Zt.d},B)),[Zt,ce,St]);return(0,ut.eR)(this,Ae,K.update)})},function(Et){return Et.transition(function(){var Zt=this,ce=De(this,K.exit);return(0,ut.Yq)(ce,function(){return Zt.remove()}),ce})}).transitions()}function Ne(W,j,F){var B=F.animate,K=F.connect,dt=F.areaFill;if(j.length<2||!dt||!K)return[];for(var St=Array.isArray(dt)?dt:[dt,"transparent"],Et=function(an){return St[an%St.length]},Zt=[],ce=0;ce<j.length-1;ce++){var Ae=(0,l.CR)([j[ce].points,j[ce+1].points],2),Le=Ae[0],$e=Ae[1],Xe=ge(Le,$e,F);Zt.push({d:Xe,fill:Et(ce)})}return W.selectAll(at.region.class).data(Zt,function(an,bn){return bn}).join(function(an){return an.append("path").each(function(bn,xn){var Dn=(0,be.S)(bn,[bn,xn,Zt]);this.attr(Dn)}).attr("className",at.region.name)},function(an){return an.transition(function(bn,xn){var Dn=(0,be.S)(bn,[bn,xn,Zt]);return(0,ut.eR)(this,Dn,B.update)})},function(an){return an.transition(function(){var bn=this,xn=De(this,B.exit);return(0,ut.Yq)(xn,function(){return bn.remove()}),xn})}).transitions()}function bt(W){var j=W.data,F=j===void 0?[]:j,B=W.closed;return B?F.map(function(K){var dt=K.points,St=(0,l.CR)(dt,1),Et=St[0];return(0,l.pi)((0,l.pi)({},K),{points:(0,l.ev)((0,l.ev)([],(0,l.CR)(dt),!1),[Et],!1)})}):F}var Jt=function(W){(0,l.ZT)(j,W);function j(){return W!==null&&W.apply(this,arguments)||this}return j.prototype.render=function(F,B){var K=F.type,dt=F.center,St=F.areaFill,Et=F.closed,Zt=(0,l._T)(F,["type","center","areaFill","closed"]),ce=bt(F),Ae=(0,Nt.Ys)(B).maybeAppendByClassName(at.lineGroup,"g"),Le=(0,Nt.Ys)(B).maybeAppendByClassName(at.regionGroup,"g"),$e=Ie(Ae,ce,F,Zt),Xe=Ne(Le,ce,F);return(0,l.ev)((0,l.ev)([],(0,l.CR)($e),!1),(0,l.CR)(Xe),!1)},j}(O.w),oe=d(5759),M=function(W,j){return function(F){return W*(1-F)+j*F}};function Q(W,j){var F=j?j.length:0,B=W?Math.min(F,W.length):0;return function(K){var dt=new Array(B),St=new Array(F),Et=0;for(Et=0;Et<B;++Et)dt[Et]=Ut(W[Et],j[Et]);for(;Et<F;++Et)St[Et]=j[Et];for(Et=0;Et<B;++Et)St[Et]=dt[Et](K);return St}}function te(W,j){W===void 0&&(W={}),j===void 0&&(j={});var F={},B={};return Object.entries(j).forEach(function(K){var dt=(0,l.CR)(K,2),St=dt[0],Et=dt[1];St in W?F[St]=Ut(W[St],Et):B[St]=Et}),function(K){return Object.entries(F).forEach(function(dt){var St=(0,l.CR)(dt,2),Et=St[0],Zt=St[1];return B[Et]=Zt(K)}),B}}function Ut(W,j){return typeof W=="number"&&typeof j=="number"?M(W,j):Array.isArray(W)&&Array.isArray(j)?Q(W,j):typeof W=="object"&&typeof j=="object"?te(W,j):function(F){return W}}function we(W,j,F,B){if(!B)return W.attr("__keyframe_data__",F),null;var K=B.duration,dt=K===void 0?0:K,St=Ut(j,F),Et=Math.ceil(+dt/16),Zt=new Array(Et).fill(0).map(function(ce,Ae,Le){return{__keyframe_data__:St(Ae/(Le.length-1))}});return W.animate(Zt,(0,l.pi)({fill:"both"},B))}var Ce=d(88170),_e=d(99769);function mt(W,j){var F={},B=Array.isArray(j)?j:[j];for(var K in W)B.includes(K)||(F[K]=W[K]);return F}function X(W,j){return Object.fromEntries(Object.entries(W).map(function(F){var B=(0,l.CR)(F,2),K=B[0],dt=B[1];return[K,(0,be.S)(dt,j)]}))}function Pt(W){if(W.type==="linear"){var j=W.startPos,F=W.endPos;return __spreadArray(__spreadArray([],__read(j),!1),__read(F),!1)}var B=W.startAngle,K=W.endAngle,dt=W.center,St=W.radius;return __spreadArray(__spreadArray([B,K],__read(dt),!1),[St],!1)}function At(W,j){return j&&(0,pe.Z)(j)?W.filter(j):W}function Rt(W,j){var F=j.startAngle,B=j.endAngle;return(B-F)*W+F}function _t(W,j){if(j.type==="linear"){var F=(0,l.CR)(j.startPos,2),B=F[0],K=F[1],dt=(0,l.CR)(j.endPos,2),St=dt[0],Et=dt[1],Zt=(0,l.CR)([St-B,Et-K],2),ce=Zt[0],Ae=Zt[1];return Mt([ce,Ae])}var Le=nn(Rt(W,j));return[-Math.sin(Le),Math.cos(Le)]}function Vt(W,j,F){var B=_t(W,F);return Me(B,j!=="positive")}function ae(W,j){return Vt(W,j.labelDirection,j)}function fe(W,j,F){return F?"".concat(W," ").concat(F,"axis-").concat(j):W}function me(W,j,F){var B=W.classNamePrefix,K=B===void 0?"":B;return fe(j.name,F,K)}function Ze(W,j,F,B){return B&&W.attr("className",fe(j.name,F,B)),W}function Ge(W,j){var F=(0,l.CR)(j.startPos,2),B=F[0],K=F[1],dt=(0,l.CR)(j.endPos,2),St=dt[0],Et=dt[1],Zt=(0,l.CR)([St-B,Et-K],2),ce=Zt[0],Ae=Zt[1];return[B+ce*W,K+Ae*W]}function Ve(W,j){var F=j.radius,B=(0,l.CR)(j.center,2),K=B[0],dt=B[1],St=nn(Rt(W,j));return[K+F*Math.cos(St),dt+F*Math.sin(St)]}function rn(W,j){return j.type==="linear"?Ge(W,j):Ve(W,j)}function wn(W){return _t(0,W)[1]===0}function on(W){return _t(0,W)[0]===0}function _n(W,j){return j-W===360}function Cn(W,j,F,B,K){var dt=j-W,St=(0,l.CR)([K,K],2),Et=St[0],Zt=St[1],ce=(0,l.CR)([nn(W),nn(j)],2),Ae=ce[0],Le=ce[1],$e=function(Ti){return[F+K*Math.cos(Ti),B+K*Math.sin(Ti)]},Xe=(0,l.CR)($e(Ae),2),an=Xe[0],bn=Xe[1],xn=(0,l.CR)($e(Le),2),Dn=xn[0],Fn=xn[1];if(_n(W,j)){var On=(Le+Ae)/2,Yn=(0,l.CR)($e(On),2),nr=Yn[0],sr=Yn[1];return[["M",an,bn],["A",Et,Zt,0,1,0,nr,sr],["A",Et,Zt,0,1,0,Dn,Fn]]}var xr=dt>180?1:0,Wr=W>j?0:1,ei=!1;return ei?"M".concat(F,",").concat(B,",L").concat(an,",").concat(bn,",A").concat(Et,",").concat(Zt,",0,").concat(xr,",").concat(Wr,",").concat(Dn,",").concat(Fn,",L").concat(F,",").concat(B):"M".concat(an,",").concat(bn,",A").concat(Et,",").concat(Zt,",0,").concat(xr,",").concat(Wr,",").concat(Dn,",").concat(Fn)}function Ln(W){var j=W.attributes,F=j.startAngle,B=j.endAngle,K=j.center,dt=j.radius;return(0,l.ev)((0,l.ev)([F,B],(0,l.CR)(K),!1),[dt],!1)}function En(W,j,F,B){var K=j.startAngle,dt=j.endAngle,St=j.center,Et=j.radius,Zt=j.classNamePrefix;return W.selectAll(Ot.line.class).data([{d:Cn.apply(void 0,(0,l.ev)((0,l.ev)([K,dt],(0,l.CR)(St),!1),[Et],!1))}],function(ce,Ae){return Ae}).join(function(ce){var Ae=ce.append("path").attr("className",Ot.line.name).styles(j).styles({d:function(Le){return Le.d}});return Ze(Ae,Ot.line,wt.line,Zt),Ae},function(ce){return ce.transition(function(){var Ae=this,Le=we(this,Ln(this),(0,l.ev)((0,l.ev)([K,dt],(0,l.CR)(St),!1),[Et],!1),B.update);if(Le){var $e=function(){var Xe=(0,oe.Z)(Ae.attributes,"__keyframe_data__");Ae.style.d=Cn.apply(void 0,(0,l.ev)([],(0,l.CR)(Xe),!1))};Le.onframe=$e,Le.onfinish=$e}return Le}).styles(j)},function(ce){return ce.remove()}).styles(F).transitions()}function cr(W,j){var F=j.truncRange,B=j.truncShape,K=j.lineExtension}function Bn(W,j,F){F===void 0&&(F=[0,0]);var B=(0,l.CR)([W,j,F],3),K=(0,l.CR)(B[0],2),dt=K[0],St=K[1],Et=(0,l.CR)(B[1],2),Zt=Et[0],ce=Et[1],Ae=(0,l.CR)(B[2],2),Le=Ae[0],$e=Ae[1],Xe=(0,l.CR)([Zt-dt,ce-St],2),an=Xe[0],bn=Xe[1],xn=Math.sqrt(Math.pow(an,2)+Math.pow(bn,2)),Dn=(0,l.CR)([-Le/xn,$e/xn],2),Fn=Dn[0],On=Dn[1];return[Fn*an,Fn*bn,On*an,On*bn]}function br(W){var j=(0,l.CR)(W,2),F=(0,l.CR)(j[0],2),B=F[0],K=F[1],dt=(0,l.CR)(j[1],2),St=dt[0],Et=dt[1];return{x1:B,y1:K,x2:St,y2:Et}}function fr(W,j,F,B){var K=j.showTrunc,dt=j.startPos,St=j.endPos,Et=j.truncRange,Zt=j.lineExtension,ce=j.classNamePrefix,Ae=(0,l.CR)([dt,St],2),Le=(0,l.CR)(Ae[0],2),$e=Le[0],Xe=Le[1],an=(0,l.CR)(Ae[1],2),bn=an[0],xn=an[1],Dn=(0,l.CR)(Zt?Bn(dt,St,Zt):new Array(4).fill(0),4),Fn=Dn[0],On=Dn[1],Yn=Dn[2],nr=Dn[3],sr=function(Zi){return W.selectAll(Ot.line.class).data(Zi,function(Pi,Qi){return Qi}).join(function(Pi){var Qi=Pi.append("line").styles(F).transition(function(Ni){return(0,ut.eR)(this,br(Ni.line),!1)});return Qi.attr("className",function(Ni){if(!ce)return"".concat(Ot.line.name," ").concat(Ni.className);var Ri=fe(Ot.line.name,wt.line,ce);if(Ni.className===Ot.lineFirst.name){var na=fe(Ot.lineFirst.name,wt.lineFirst,ce);return"".concat(Ri," ").concat(na)}if(Ni.className===Ot.lineSecond.name){var na=fe(Ot.lineSecond.name,wt.lineSecond,ce);return"".concat(Ri," ").concat(na)}return Ri}),Qi},function(Pi){return Pi.styles(F).transition(function(Qi){var Ni=Qi.line;return(0,ut.eR)(this,br(Ni),B.update)})},function(Pi){return Pi.remove()}).transitions()};if(!K||!Et)return sr([{line:[[$e+Fn,Xe+On],[bn+Yn,xn+nr]],className:Ot.line.name}]);var xr=(0,l.CR)(Et,2),Wr=xr[0],ei=xr[1],Ti=bn-$e,Gi=xn-Xe,Ei=(0,l.CR)([$e+Ti*Wr,Xe+Gi*Wr],2),Vr=Ei[0],mi=Ei[1],Jr=(0,l.CR)([$e+Ti*ei,Xe+Gi*ei],2),Ii=Jr[0],Ki=Jr[1],Kr=sr([{line:[[$e+Fn,Xe+On],[Vr,mi]],className:Ot.lineFirst.name},{line:[[Ii,Ki],[bn+Yn,xn+nr]],className:Ot.lineSecond.name}]);return cr(W,j),Kr}function Zr(W,j,F,B){var K=F.showArrow,dt=F.showTrunc,St=F.lineArrow,Et=F.lineArrowOffset,Zt=F.lineArrowSize,ce;if(j==="arc"?ce=W.select(Ot.line.class):dt?ce=W.select(Ot.lineSecond.class):ce=W.select(Ot.line.class),!K||!St||F.type==="arc"&&_n(F.startAngle,F.endAngle)){var Ae=ce.node();Ae&&(Ae.style.markerEnd=void 0);return}var Le=(0,Ce.S)(St);Le.attr(B),(0,_e.b)(Le,Zt,!0),ce.style("markerEnd",Le).style("markerEndOffset",-Et)}function di(W,j,F){var B=j.type,K,dt=(0,b.zs)(j,"line");return B==="linear"?K=fr(W,j,mt(dt,"arrow"),F):K=En(W,j,mt(dt,"arrow"),F),Zr(W,B,j,dt),K}function Xr(W,j){return Vt(W,j.gridDirection,j)}function Mr(W){var j=W.type,F=W.gridCenter;return j==="linear"?F:F||W.center}function gi(W,j){var F=j.gridLength;return W.map(function(B,K){var dt=B.value,St=(0,l.CR)(rn(dt,j),2),Et=St[0],Zt=St[1],ce=(0,l.CR)(xe(Xr(dt,j),F),2),Ae=ce[0],Le=ce[1];return{id:K,points:[[Et,Zt],[Et+Ae,Zt+Le]]}})}function yi(W,j){var F=j.gridControlAngles,B=Mr(j);if(!B)throw new Error("grid center is not provide");if(W.length<2)throw new Error("Invalid grid data");if(!F||F.length===0)throw new Error("Invalid gridControlAngles");var K=(0,l.CR)(B,2),dt=K[0],St=K[1];return W.map(function(Et,Zt){var ce=Et.value,Ae=(0,l.CR)(rn(ce,j),2),Le=Ae[0],$e=Ae[1],Xe=(0,l.CR)([Le-dt,$e-St],2),an=Xe[0],bn=Xe[1],xn=[];return F.forEach(function(Dn){var Fn=nn(Dn),On=(0,l.CR)([Math.cos(Fn),Math.sin(Fn)],2),Yn=On[0],nr=On[1],sr=an*Yn-bn*nr+dt,xr=an*nr+bn*Yn+St;xn.push([sr,xr])}),{points:xn,id:Zt}})}function _i(W,j,F,B){var K=F.classNamePrefix,dt=(0,b.zs)(F,"grid"),St=dt.type,Et=dt.areaFill,Zt=Mr(F),ce=At(j,F.gridFilter),Ae=St==="segment"?gi(ce,F):yi(ce,F),Le=(0,l.pi)((0,l.pi)({},dt),{center:Zt,areaFill:(0,pe.Z)(Et)?ce.map(function($e,Xe){return(0,be.S)(Et,[$e,Xe,ce])}):Et,animate:B,data:Ae});return W.selectAll(Ot.grid.class).data([1]).join(function($e){var Xe=$e.append(function(){return new Jt({style:Le})}).attr("className",Ot.grid.name);return Ze(Xe,Ot.grid,wt.grid,K),Xe},function($e){return $e.transition(function(){return this.update(Le)})},function($e){return $e.remove()}).transitions()}function qr(W,j,F,B,K){return B===void 0&&(B=!0),K===void 0&&(K=!1),B&&W===j||K&&W===F?!0:W>j&&W<F}var Jn=function(W){var j=new DOMParser,F=j.parseFromString(W,"text/html"),B=F.body.firstElementChild;if(console.log(B==null?void 0:B.getClientRects(),11),!B)return 0;var K=B.getAttribute("style")||"",dt=Object.fromEntries(K.split(";").map(function(xn){return xn.trim()}).filter(function(xn){return xn.includes(":")}).map(function(xn){var Dn=(0,l.CR)(xn.split(":").map(function(Yn){return Yn.trim()}),2),Fn=Dn[0],On=Dn[1];return[Fn.toLowerCase(),On]})),St=function(xn){if(!xn)return 0;var Dn=xn.match(/([\d.]+)px/);return Dn?parseFloat(Dn[1]):0};if(dt.height)return St(dt.height);var Et=St(dt["font-size"])||16,Zt=dt["line-height"],ce;!Zt||Zt==="normal"?ce=1.2*Et:Zt.endsWith("px")?ce=St(Zt):/^[\d.]+$/.test(Zt)?ce=parseFloat(Zt)*Et:ce=Et;var Ae=St(dt["padding-top"]),Le=St(dt["padding-bottom"]);if(dt.padding){var $e=dt.padding.split(/\s+/).map(St);$e.length===1||$e.length===2?(Ae=$e[0],Le=$e[0]):($e.length===3||$e.length===4)&&(Ae=$e[0],Le=$e[2])}var Xe=St(dt["border-top-width"]),an=St(dt["border-bottom-width"]);if(dt.border){var bn=dt.border.match(/([\d.]+)px/);bn&&(Xe=parseFloat(bn[1]),an=parseFloat(bn[1]))}if(dt["border-width"]){var $e=dt["border-width"].split(/\s+/).map(St);$e.length===1||$e.length===2?(Xe=$e[0],an=$e[0]):($e.length===3||$e.length===4)&&(Xe=$e[0],an=$e[2])}return ce+Ae+Le+Xe+an},sn=d(69014),Wt=d(53160),y=d(58533);function E(W,j,F,B){F===void 0&&(F=2),B===void 0&&(B="top"),(0,y.Rm)(W,{wordWrap:!0,wordWrapWidth:j,maxLines:F,textBaseline:B})}function c(W,j,F){var B=W.getBBox(),K=B.width,dt=B.height,St=(0,l.CR)([j,F].map(function(ce,Ae){var Le;return ce.includes("%")?parseFloat(((Le=ce.match(/[+-]?([0-9]*[.])?[0-9]+/))===null||Le===void 0?void 0:Le[0])||"0")/100*(Ae===0?K:dt):ce}),2),Et=St[0],Zt=St[1];return[Et,Zt]}function f(W,j){if(j)try{var F=/translate\(([+-]*[\d]+[%]*),[ ]*([+-]*[\d]+[%]*)\)/g,B=j.replace(F,function(K,dt,St){return"translate(".concat(c(W,dt,St),")")});W.attr("transform",B)}catch(K){}}var w=d(16915),Z=d(76075),z=d(98294),H=function(){function W(j,F,B,K){this.set(j,F,B,K)}return Object.defineProperty(W.prototype,"left",{get:function(){return this.x1},enumerable:!1,configurable:!0}),Object.defineProperty(W.prototype,"top",{get:function(){return this.y1},enumerable:!1,configurable:!0}),Object.defineProperty(W.prototype,"right",{get:function(){return this.x2},enumerable:!1,configurable:!0}),Object.defineProperty(W.prototype,"bottom",{get:function(){return this.y2},enumerable:!1,configurable:!0}),Object.defineProperty(W.prototype,"width",{get:function(){return this.defined("x2")&&this.defined("x1")?this.x2-this.x1:void 0},enumerable:!1,configurable:!0}),Object.defineProperty(W.prototype,"height",{get:function(){return this.defined("y2")&&this.defined("y1")?this.y2-this.y1:void 0},enumerable:!1,configurable:!0}),W.prototype.rotatedPoints=function(j,F,B){var K=this,dt=K.x1,St=K.y1,Et=K.x2,Zt=K.y2,ce=Math.cos(j),Ae=Math.sin(j),Le=F-F*ce+B*Ae,$e=B-F*Ae-B*ce,Xe=[[ce*dt-Ae*Zt+Le,Ae*dt+ce*Zt+$e],[ce*Et-Ae*Zt+Le,Ae*Et+ce*Zt+$e],[ce*dt-Ae*St+Le,Ae*dt+ce*St+$e],[ce*Et-Ae*St+Le,Ae*Et+ce*St+$e]];return Xe},W.prototype.set=function(j,F,B,K){return B<j?(this.x2=j,this.x1=B):(this.x1=j,this.x2=B),K<F?(this.y2=F,this.y1=K):(this.y1=F,this.y2=K),this},W.prototype.defined=function(j){return this[j]!==Number.MAX_VALUE&&this[j]!==-Number.MAX_VALUE},W}();function q(W,j){var F=W.getEulerAngles()||0;W.setEulerAngles(0);var B=W.getBounds(),K=(0,l.CR)(B.min,2),dt=K[0],St=K[1],Et=(0,l.CR)(B.max,2),Zt=Et[0],ce=Et[1],Ae=W.getBBox(),Le=Ae.width,$e=Ae.height,Xe=$e,an=0,bn=0,xn=dt,Dn=St,Fn=(0,y.U4)(W);if(Fn){Xe-=1.5;var On=Fn.style.textAlign,Yn=Fn.style.textBaseline;On==="center"?xn=(dt+Zt)/2:(On==="right"||On==="end")&&(xn=Zt),Yn==="middle"?Dn=(St+ce)/2:Yn==="bottom"&&(Dn=ce)}var nr=(0,l.CR)((0,z.j)(j),4),sr=nr[0],xr=sr===void 0?0:sr,Wr=nr[1],ei=Wr===void 0?0:Wr,Ti=nr[2],Gi=Ti===void 0?xr:Ti,Ei=nr[3],Vr=Ei===void 0?ei:Ei,mi=new H((an+=dt)-Vr,(bn+=St)-xr,an+Le+ei,bn+Xe+Gi);return W.setEulerAngles(F),mi.rotatedPoints(nn(F),xn,Dn)}function Dt(W,j){return j[0]<=Math.max(W[0][0],W[1][0])&&j[0]<=Math.min(W[0][0],W[1][0])&&j[1]<=Math.max(W[0][1],W[1][1])&&j[1]<=Math.min(W[0][1],W[1][1])}function U(W,j,F){var B=(j[1]-W[1])*(F[0]-j[0])-(j[0]-W[0])*(F[1]-j[1]);return B===0?0:B<0?2:1}function Y(W,j){var F=U(W[0],W[1],j[0]),B=U(W[0],W[1],j[1]),K=U(j[0],j[1],W[0]),dt=U(j[0],j[1],W[1]);return!!(F!==B&&K!==dt||F===0&&Dt(W,j[0])||B===0&&Dt(W,j[1])||K===0&&Dt(j,W[0])||dt===0&&Dt(j,W[1]))}function G(W,j){var F=W.length;if(F<3)return!1;var B=[j,[9999,j[1]]],K=0,dt=0;do{var St=[W[dt],W[(dt+1)%F]];if(Y(St,B)){if(U(St[0],j,St[1])===0)return Dt(St,j);K++}dt=(dt+1)%F}while(dt!==0);return!!(K&1)}function J(W,j){return j.every(function(F){return G(W,F)})}function pt(W,j,F){var B=W.x1,K=W.x2,dt=W.y1,St=W.y2,Et=[[B,dt],[K,dt],[K,St],[B,St]],Zt=q(j,F);return J(Et,Zt)}function Kt(W,j){var F=(0,l.CR)(W,4),B=F[0],K=F[1],dt=F[2],St=F[3],Et=(0,l.CR)(j,4),Zt=Et[0],ce=Et[1],Ae=Et[2],Le=Et[3],$e=dt-B,Xe=St-K,an=Ae-Zt,bn=Le-ce,xn=$e*bn-an*Xe;if(xn===0)return!1;var Dn=xn>0,Fn=B-Zt,On=K-ce,Yn=$e*On-Xe*Fn;if(Yn<0===Dn)return!1;var nr=an*On-bn*Fn;return!(nr<0===Dn||Yn>xn===Dn||nr>xn===Dn)}function yt(W,j){var F=[[W[0],W[1],W[2],W[3]],[W[2],W[3],W[4],W[5]],[W[4],W[5],W[6],W[7]],[W[6],W[7],W[0],W[1]]];return F.some(function(B){return Kt(j,B)})}var Qt={lineToLine:Kt,intersectBoxLine:yt,getBounds:q};function ct(W,j,F){var B,K,dt=q(W,F).flat(1),St=q(j,F).flat(1),Et=[[dt[0],dt[1],dt[2],dt[3]],[dt[0],dt[1],dt[4],dt[5]],[dt[4],dt[5],dt[6],dt[7]],[dt[2],dt[3],dt[6],dt[7]]];try{for(var Zt=(0,l.XA)(Et),ce=Zt.next();!ce.done;ce=Zt.next()){var Ae=ce.value;if(yt(St,Ae))return!0}}catch(Le){B={error:Le}}finally{try{ce&&!ce.done&&(K=Zt.return)&&K.call(Zt)}finally{if(B)throw B.error}}return!1}function ht(W,j){var F=W.type,B=W.labelDirection,K=W.crossSize;if(!K)return!1;if(F==="arc"){var dt=W.center,St=W.radius,Et=(0,l.CR)(dt,2),Zt=Et[0],ce=Et[1],Ae=B==="negative"?0:K,Le=-St-Ae,$e=St+Ae,Xe=(0,l.CR)((0,z.j)(j),4),an=Xe[0],bn=Xe[1],xn=Xe[2],Dn=Xe[3];return new H(Zt+Le-Dn,ce+Le-an,Zt+$e+bn,ce+$e+xn)}var Fn=(0,l.CR)(W.startPos,2),On=Fn[0],Yn=Fn[1],nr=(0,l.CR)(W.endPos,2),sr=nr[0],xr=nr[1],Wr=(0,l.CR)(on(W)?[-j,0,j,0]:[0,j,0,-j],4),ei=Wr[0],Ti=Wr[1],Gi=Wr[2],Ei=Wr[3],Vr=ae(0,W),mi=xe(Vr,K),Jr=new H(On,Yn,sr,xr);return Jr.x1+=Ei,Jr.y1+=ei,Jr.x2+=Ti+mi[0],Jr.y2+=Gi+mi[1],Jr}function rt(W,j,F){var B,K,dt=j.crossPadding,St=new Set,Et=null,Zt=ht(j,dt),ce=function(an){return Zt?pt(Zt,an):!0},Ae=function(an,bn){return!an||!an.firstChild?!0:!ct(an.firstChild,bn.firstChild,(0,z.j)(F))};try{for(var Le=(0,l.XA)(W),$e=Le.next();!$e.done;$e=Le.next()){var Xe=$e.value;ce(Xe)?!Et||Ae(Et,Xe)?Et=Xe:(St.add(Et),St.add(Xe)):St.add(Xe)}}catch(an){B={error:an}}finally{try{$e&&!$e.done&&(K=Le.return)&&K.call(Le)}finally{if(B)throw B.error}}return Array.from(St)}function $t(W,j){return j===void 0&&(j={}),(0,Z.Z)(W)?0:typeof W=="number"?W:Math.floor((0,y.Ux)(W,j))}function Ht(W,j,F,B){if(!(W.length<=0)){var K=j.suffix,dt=K===void 0?"...":K,St=j.minLength,Et=j.maxLength,Zt=Et===void 0?1/0:Et,ce=j.step,Ae=ce===void 0?" ":ce,Le=j.margin,$e=Le===void 0?[0,0,0,0]:Le,Xe=(0,y.qT)(B.getTextShape(W[0])),an=$t(Ae,Xe),bn=St?$t(St,Xe):an,xn=$t(Zt,Xe);((0,Z.Z)(xn)||xn===1/0)&&(xn=Math.max.apply(null,W.map(function(mi){return mi.getBBox().width})));for(var Dn=W.slice(),Fn=(0,l.CR)($e,4),On=Fn[0],Yn=On===void 0?0:On,nr=Fn[1],sr=nr===void 0?0:nr,xr=Fn[2],Wr=xr===void 0?Yn:xr,ei=Fn[3],Ti=ei===void 0?sr:ei,Gi=function(mi){if(Dn.forEach(function(Jr){B.ellipsis(B.getTextShape(Jr),mi,dt)}),Dn=rt(W,F,$e),Dn.length<1)return{value:void 0}},Ei=xn;Ei>bn+an;Ei-=an){var Vr=Gi(Ei);if(typeof Vr=="object")return Vr.value}}}var ue=function(W){return W!==void 0&&W!=null&&!Number.isNaN(W)},Ee=d(2080),ie={parity:function(W,j){var F=j.seq,B=F===void 0?2:F;return W.filter(function(K,dt){return dt%B?((0,sn.Cp)(K),!1):!0})}},Pe=function(W){return W.filter(ue)};function Be(W,j,F,B){var K=W.length,dt=j.keepHeader,St=j.keepTail;if(!(K<=1||K===2&&dt&&St)){var Et=ie.parity,Zt=function(On){return On.forEach(B.show),On},ce=2,Ae=W.slice(),Le=W.slice(),$e=Math.min.apply(Math,(0,l.ev)([1],(0,l.CR)(W.map(function(On){return On.getBBox().width})),!1));if(F.type==="linear"&&(wn(F)||on(F))){var Xe=(0,Ee._v)(W[0]).left,an=(0,Ee._v)(W[K-1]).right,bn=Math.abs(an-Xe)||1;ce=Math.max(Math.floor(K*$e/bn),ce)}var xn,Dn;for(dt&&(xn=Ae.splice(0,1)[0]),St&&(Dn=Ae.splice(-1,1)[0],Ae.reverse()),Zt(Ae);ce<W.length&&rt(Pe(Dn?(0,l.ev)((0,l.ev)([Dn],(0,l.CR)(Le),!1),[xn],!1):(0,l.ev)([xn],(0,l.CR)(Le),!1)),F,j==null?void 0:j.margin).length;){if(Dn&&!xn&&ce%2===0){var Fn=Ae.splice(0,1);Fn.forEach(B.hide)}else if(Dn&&xn){var Fn=Ae.splice(0,1);Fn.forEach(B.hide)}Le=Et(Zt(Ae),{seq:ce}),ce++}}}function He(W,j,F,B){var K,dt,St=j.optionalAngles,Et=St===void 0?[0,45,90]:St,Zt=j.margin,ce=j.recoverWhenFailed,Ae=ce===void 0?!0:ce,Le=W.map(function(Dn){return Dn.getLocalEulerAngles()}),$e=function(){return rt(W,F,Zt).length<1},Xe=function(Dn){return W.forEach(function(Fn,On){var Yn=Array.isArray(Dn)?Dn[On]:Dn;B.rotate(Fn,+Yn)})};try{for(var an=(0,l.XA)(Et),bn=an.next();!bn.done;bn=an.next()){var xn=bn.value;if(Xe(xn),$e())return}}catch(Dn){K={error:Dn}}finally{try{bn&&!bn.done&&(dt=an.return)&&dt.call(an)}finally{if(K)throw K.error}}Ae&&Xe(Le)}function en(W){var j=W.type,F=W.labelDirection;return j==="linear"&&wn(W)?F==="negative"?"bottom":"top":"middle"}function un(W,j,F,B,K){var dt,St=j.maxLines,Et=St===void 0?3:St,Zt=j.recoverWhenFailed,ce=Zt===void 0?!0:Zt,Ae=j.margin,Le=Ae===void 0?[0,0,0,0]:Ae,$e=(0,be.S)((dt=j.wordWrapWidth)!==null&&dt!==void 0?dt:50,[K]),Xe=W.map(function(On){return On.attr("maxLines")||1}),an=Math.min.apply(Math,(0,l.ev)([],(0,l.CR)(Xe),!1)),bn=function(){return rt(W,F,Le).length<1},xn=en(F),Dn=function(On){return W.forEach(function(Yn,nr){var sr=Array.isArray(On)?On[nr]:On;B.wrap(Yn,$e,sr,xn)})};if(!(an>Et)){if(F.type==="linear"&&wn(F)){if(Dn(Et),bn())return}else for(var Fn=an;Fn<=Et;Fn++)if(Dn(Fn),bn())return;ce&&Dn(Xe)}}var mn=new Map([["hide",Be],["rotate",He],["ellipsis",Ht],["wrap",un]]);function Sn(W,j,F){return j.labelOverlap.length<1?!1:F==="hide"?!(0,w.X)(W[0]):F==="rotate"?!W.some(function(B){var K;return!!(!((K=B.attr("transform"))===null||K===void 0)&&K.includes("rotate"))}):F==="ellipsis"||F==="wrap"?W.filter(function(B){return B.querySelector("text")}).length>=1:!0}function Pn(W,j,F,B){var K=j.labelOverlap,dt=K===void 0?[]:K;dt.length&&dt.forEach(function(St){var Et=St.type,Zt=mn.get(Et);Sn(W,j,Et)&&(Zt==null||Zt(W,St,j,B,F))})}function $n(){for(var W=[],j=0;j<arguments.length;j++)W[j]=arguments[j];var F=function(B){return B==="positive"?-1:1};return W.reduce(function(B,K){return B*F(K)},1)}function Wn(W){for(var j=W;j<0;)j+=360;return Math.round(j%360)}function Xn(W,j){var F=(0,l.CR)(W,2),B=F[0],K=F[1],dt=(0,l.CR)(j,2),St=dt[0],Et=dt[1],Zt=(0,l.CR)([B*St+K*Et,B*Et-K*St],2),ce=Zt[0],Ae=Zt[1];return Math.atan2(Ae,ce)}function An(W){var j=(W+360)%180;return qr(j,-90,90)||(j+=180),j}function Zn(W,j,F){var B,K=F.labelAlign,dt=(B=j.style.transform)===null||B===void 0?void 0:B.includes("rotate");if(dt)return j.getLocalEulerAngles();var St=0,Et=ae(W.value,F),Zt=_t(W.value,F);return K==="horizontal"?0:(K==="perpendicular"?St=Xn([1,0],Et):St=Xn([Zt[0]<0?-1:1,0],Zt),An(le(St)))}function qn(W,j,F){var B=F.type,K=F.labelAlign,dt=ae(W,F),St=Wn(j),Et=Wn(le(Xn([1,0],dt))),Zt="center",ce="middle";return B==="linear"?[90,270].includes(Et)&&St===0?(Zt="center",ce=dt[1]===1?"top":"bottom"):!(Et%180)&&[90,270].includes(St)?Zt="center":Et===0?(qr(St,0,90,!1,!0)||qr(St,0,90)||qr(St,270,360))&&(Zt="start"):Et===90?qr(St,0,90,!1,!0)?Zt="start":(qr(St,90,180)||qr(St,270,360))&&(Zt="end"):Et===270?qr(St,0,90,!1,!0)?Zt="end":(qr(St,90,180)||qr(St,270,360))&&(Zt="start"):Et===180&&(St===90?Zt="start":(qr(St,0,90)||qr(St,270,360))&&(Zt="end")):K==="parallel"?qr(Et,0,180,!0)?ce="top":ce="bottom":K==="horizontal"?qr(Et,90,270,!1)?Zt="end":(qr(Et,270,360,!1)||qr(Et,0,90))&&(Zt="start"):K==="perpendicular"&&(qr(Et,90,270)?Zt="end":Zt="start"),{textAlign:Zt,textBaseline:ce}}function er(W,j,F){j.setLocalEulerAngles(W);var B=j.__data__.value,K=qn(B,W,F),dt=j.querySelector(Ot.labelItem.class);dt&&Or(dt,K)}function Cr(W,j,F){var B=F.showTick,K=F.tickLength,dt=F.tickDirection,St=F.labelDirection,Et=F.labelSpacing,Zt=j.indexOf(W),ce=(0,be.S)(Et,[W,Zt,j]),Ae=(0,l.CR)([ae(W.value,F),$n(St,dt)],2),Le=Ae[0],$e=Ae[1],Xe=$e===1?(0,be.S)(B?K:0,[W,Zt,j]):0,an=(0,l.CR)(qt(xe(Le,ce+Xe),rn(W.value,F)),2),bn=an[0],xn=an[1];return{x:bn,y:xn}}function Un(W,j,F,B){var K=B.labelFormatter,dt=(0,pe.Z)(K)?function(){return(0,Ce.S)((0,be.S)(K,[W,j,F,ae(W.value,B)]))}:function(){return(0,Ce.S)(W.label||"")};return dt}function ar(W,j,F,B){var K=B.labelRender,dt=((0,oe.Z)(B,"endPos.0",400)-(0,oe.Z)(B,"startPos.0",0))/F.length,St=(0,pe.Z)(K)?(0,be.S)(K,[W,j,F,ae(W.value,B)]):W.label||"",Et=Jn(St)||30;return function(){return(0,Ce.$)(St,{width:dt,height:Et})}}var ii={html:["fill"],text:[]};function Or(W,j){["text","html"].includes(W.nodeName)&&W.attr(mt(j,ii[W.nodeName]))}function Lr(W,j){Pn(this.node().childNodes,W,j,{hide:sn.Cp,show:sn.$Z,rotate:function(F,B){er(+B,F,W)},ellipsis:function(F,B,K){F&&(0,Wt.O)(F,B||1/0,K)},wrap:function(F,B,K){F&&E(F,B,K)},getTextShape:function(F){return F.querySelector(Ot.labelItem.class)}})}function fi(W,j,F,B,K){var dt=F.indexOf(j),St=K.labelRender,Et=K.classNamePrefix,Zt=(0,Nt.Ys)(W).append(St?ar(j,dt,F,K):Un(j,dt,F,K)).attr("className",Ot.labelItem.name).node();Ze((0,Nt.Ys)(Zt),Ot.labelItem,wt.labelItem,Et);var ce=(0,l.CR)((0,b.Hm)(X(B,[j,dt,F])),2),Ae=ce[0],Le=ce[1],$e=Le.transform,Xe=(0,l._T)(Le,["transform"]);f(Zt,$e);var an=Zn(j,Zt,K);if(Zt.getLocalEulerAngles()||Zt.setLocalEulerAngles(an),Or(Zt,(0,l.pi)((0,l.pi)({},qn(j.value,an,K)),Ae)),Zt.nodeName==="html"){var bn=Zt.getBBox(),xn=Zt.style.x||0;Zt.attr("x",xn-bn.width/2)}return W.attr(Xe),Zt}function zr(W,j,F,B,K){var dt=F.classNamePrefix,St=At(j,F.labelFilter),Et=(0,b.zs)(F,"label"),Zt,ce=W.selectAll(Ot.label.class).data(St,function(Ae,Le){return Le}).join(function(Ae){var Le=Ae.append("g").attr("className",Ot.label.name).transition(function($e){fi(this,$e,j,Et,F);var Xe=Cr($e,j,F),an=Xe.x,bn=Xe.y;return this.style.transform="translate(".concat(an,", ").concat(bn,")"),null});return Ze(Le,Ot.label,wt.label,dt),Le},function(Ae){return Ae.transition(function(Le){var $e=this.querySelector(Ot.labelItem.class),Xe=fi(this,Le,j,Et,F),an=(0,ut.tT)($e,Xe,B.update),bn=Cr(Le,j,F),xn=bn.x,Dn=bn.y,Fn=(0,ut.eR)(this,{transform:"translate(".concat(xn,", ").concat(Dn,")")},B.update);return(0,l.ev)((0,l.ev)([],(0,l.CR)(an),!1),[Fn],!1)})},function(Ae){return Zt=Ae,Ae.transition(function(){var Le=this,$e=De(this.childNodes[0],B.exit);return(0,ut.Yq)($e,function(){return(0,Nt.Ys)(Le).remove()}),$e}),Zt}).transitions();return(0,ut.V7)(ce,function(){Lr.call(W,F,K)}),ce}function Er(W,j){return Vt(W,j.tickDirection,j)}function mr(W,j){var F=(0,l.CR)(W,2),B=F[0],K=F[1];return[[0,0],[B*j,K*j]]}function si(W,j,F,B,K){var dt=K.tickLength,St=(0,l.CR)(mr(B,(0,be.S)(dt,[W,j,F])),2),Et=(0,l.CR)(St[0],2),Zt=Et[0],ce=Et[1],Ae=(0,l.CR)(St[1],2),Le=Ae[0],$e=Ae[1];return{x1:Zt,x2:Le,y1:ce,y2:$e}}function Si(W,j,F,B,K){var dt=K.tickFormatter,St=K.classNamePrefix,Et=Er(j.value,K),Zt="line";(0,pe.Z)(dt)&&(Zt=function(){return(0,be.S)(dt,[j,F,B,Et])});var ce=W.append(Zt).attr("className",Ot.tickItem.name);return Ze(ce,Ot.tickItem,wt.tickItem,St),ce}function Mi(W,j,F,B,K,dt,St){var Et=Er(W.value,dt),Zt=si(W,j,F,Et,dt),ce=Zt.x1,Ae=Zt.x2,Le=Zt.y1,$e=Zt.y2,Xe=(0,l.CR)((0,b.Hm)(X(St,[W,j,F,Et])),2),an=Xe[0],bn=Xe[1];B.node().nodeName==="line"&&B.styles((0,l.pi)({x1:ce,x2:Ae,y1:Le,y2:$e},an)),K.attr(bn),B.styles(an)}function pi(W,j,F,B,K,dt){var St=Si((0,Nt.Ys)(this),W,j,F,B);Mi(W,j,F,St,this,B,K);var Et=(0,l.CR)(rn(W.value,B),2),Zt=Et[0],ce=Et[1];return(0,ut.eR)(this,{transform:"translate(".concat(Zt,", ").concat(ce,")")},dt)}function Wi(W,j,F,B){var K=F.classNamePrefix,dt=At(j,F.tickFilter),St=(0,b.zs)(F,"tick");return W.selectAll(Ot.tick.class).data(dt,function(Et){return Et.id||Et.label}).join(function(Et){var Zt=Et.append("g").attr("className",Ot.tick.name).transition(function(ce,Ae){return pi.call(this,ce,Ae,dt,F,St,!1)});return Ze(Zt,Ot.tick,wt.tick,K),Zt},function(Et){return Et.transition(function(Zt,ce){return this.removeChildren(),pi.call(this,Zt,ce,dt,F,St,B.update)})},function(Et){return Et.transition(function(){var Zt=this,ce=De(this.childNodes[0],B.exit);return(0,ut.Yq)(ce,function(){return Zt.remove()}),ce})}).transitions()}var Ji=d(33253);function Hn(W,j,F){var B=F.titlePosition,K=B===void 0?"lb":B,dt=F.titleSpacing,St=(0,Ji.l)(K),Et=W.node().getLocalBounds(),Zt=(0,l.CR)(Et.min,2),ce=Zt[0],Ae=Zt[1],Le=(0,l.CR)(Et.halfExtents,2),$e=Le[0],Xe=Le[1],an=(0,l.CR)(j.node().getLocalBounds().halfExtents,2),bn=an[0],xn=an[1],Dn=(0,l.CR)([ce+$e,Ae+Xe],2),Fn=Dn[0],On=Dn[1],Yn=(0,l.CR)((0,z.j)(dt),4),nr=Yn[0],sr=Yn[1],xr=Yn[2],Wr=Yn[3];if(["start","end"].includes(K)&&F.type==="linear"){var ei=F.startPos,Ti=F.endPos,Gi=(0,l.CR)(K==="start"?[ei,Ti]:[Ti,ei],2),Ei=Gi[0],Vr=Gi[1],mi=Mt([-Vr[0]+Ei[0],-Vr[1]+Ei[1]]),Jr=(0,l.CR)(xe(mi,nr),2),Ii=Jr[0],Ki=Jr[1];return{x:Ei[0]+Ii,y:Ei[1]+Ki}}return St.includes("t")&&(On-=Xe+xn+nr),St.includes("r")&&(Fn+=$e+bn+sr),St.includes("l")&&(Fn-=$e+bn+Wr),St.includes("b")&&(On+=Xe+xn+xr),{x:Fn,y:On}}function ra(W,j,F){var B=W.getGeometryBounds().halfExtents,K=B[1]*2;if(j==="vertical"){if(F==="left")return"rotate(-90) translate(0, ".concat(K/2,")");if(F==="right")return"rotate(-90) translate(0, -".concat(K/2,")")}return""}function Tr(W,j,F,B,K){var dt=(0,b.zs)(B,"title"),St=(0,l.CR)((0,b.Hm)(dt),2),Et=St[0],Zt=St[1],ce=Zt.transform,Ae=Zt.transformOrigin,Le=(0,l._T)(Zt,["transform","transformOrigin"]);j.styles(Le);var $e=ce||ra(W.node(),Et.direction,Et.position);W.styles((0,l.pi)((0,l.pi)({},Et),{transformOrigin:Ae})),f(W.node(),$e);var Xe=Hn((0,Nt.Ys)(F._offscreen||F.querySelector(Ot.mainGroup.class)),j,B),an=Xe.x,bn=Xe.y,xn=(0,ut.eR)(j.node(),{transform:"translate(".concat(an,", ").concat(bn,")")},K);return xn}function hr(W,j,F,B){var K=F.titleText,dt=F.classNamePrefix;return W.selectAll(Ot.title.class).data([{title:K}].filter(function(St){return!!St.title}),function(St,Et){return St.title}).join(function(St){var Et=St.append(function(){return(0,Ce.S)(K)}).attr("className",Ot.title.name).transition(function(){return Tr((0,Nt.Ys)(this),W,j,F,B.enter)});return Ze(Et,Ot.title,wt.title,dt),Et},function(St){return St.transition(function(){return Tr((0,Nt.Ys)(this),W,j,F,B.update)})},function(St){return St.remove()}).transitions()}function $r(W,j,F,B){var K=W.showLine,dt=W.showTick,St=W.showLabel,Et=W.classNamePrefix,Zt=j.maybeAppendByClassName(Ot.lineGroup,"g");Ze(Zt,Ot.lineGroup,wt.lineGroup,Et);var ce=(0,nt.z)(K,Zt,function(an){return di(an,W,B)})||[],Ae=j.maybeAppendByClassName(Ot.tickGroup,"g");Ze(Ae,Ot.tickGroup,wt.tickGroup,Et);var Le=(0,nt.z)(dt,Ae,function(an){return Wi(an,F,W,B)})||[],$e=j.maybeAppendByClassName(Ot.labelGroup,"g");Ze($e,Ot.labelGroup,wt.labelGroup,Et);var Xe=(0,nt.z)(St,$e,function(an){return zr(an,F,W,B,j.node())})||[];return(0,l.ev)((0,l.ev)((0,l.ev)([],(0,l.CR)(ce),!1),(0,l.CR)(Le),!1),(0,l.CR)(Xe),!1).filter(function(an){return!!an})}var ni=function(W){(0,l.ZT)(j,W);function j(F){return W.call(this,F,ot)||this}return j.prototype.render=function(F,B,K){var dt=this,St=F.titleText,Et=F.data,Zt=F.animate,ce=F.showTitle,Ae=F.showGrid,Le=F.dataThreshold,$e=F.truncRange,Xe=F.classNamePrefix,an=B.className||"axis";Xe?B.attr("className","".concat(an," ").concat(Xe,"axis")):B.className||B.attr("className","axis");var bn=kt(Et,Le).filter(function(xr){var Wr=xr.value;return!($e&&Wr>$e[0]&&Wr<$e[1])}),xn=(0,ut.MG)(K===void 0?Zt:K),Dn=(0,Nt.Ys)(B).maybeAppendByClassName(Ot.gridGroup,"g");Ze(Dn,Ot.gridGroup,wt.gridGroup,Xe);var Fn=(0,nt.z)(Ae,Dn,function(xr){return _i(xr,bn,F,xn)})||[],On=(0,Nt.Ys)(B).maybeAppendByClassName(Ot.mainGroup,"g");Ze(On,Ot.mainGroup,wt.mainGroup,Xe),St&&(!this.initialized&&xn.enter||this.initialized&&xn.update)&&$r(F,(0,Nt.Ys)(this.offscreenGroup),bn,(0,ut.MG)(!1));var Yn=$r(F,(0,Nt.Ys)(On.node()),bn,xn),nr=(0,Nt.Ys)(B).maybeAppendByClassName(Ot.titleGroup,"g");Ze(nr,Ot.titleGroup,wt.titleGroup,Xe);var sr=(0,nt.z)(ce,nr,function(xr){return hr(xr,dt,F,xn)})||[];return(0,l.ev)((0,l.ev)((0,l.ev)([],(0,l.CR)(Fn),!1),(0,l.CR)(Yn),!1),(0,l.CR)(sr),!1).flat().filter(function(xr){return!!xr})},j}(O.w),Bi=d(42777);function ya(W){var j=W.canvas,F=W.touches,B=W.offsetX,K=W.offsetY;if(j){var dt=j.x,St=j.y;return[dt,St]}if(F){var Et=F[0],Zt=Et.clientX,ce=Et.clientY;return[Zt,ce]}return B&&K?[B,K]:[0,0]}function qi(W){var j=W.nativeEvent,F=W.touches,B=W.clientX,K=W.clientY;if(j)return[j.clientX,j.clientY];if(F){var dt=F[0],St=dt.clientX,Et=dt.clientY;return[St,Et]}return typeof B=="number"&&typeof K=="number"?[B,K]:[0,0]}function va(W,j){return+W.toPrecision(j)}function Ka(W){return W.toLocaleString()}function ea(W){return W.toExponential()}function Na(W,j){return j===void 0&&(j=0),Math.abs(W)<1e3?String(W):"".concat(va(W/1e3,j).toLocaleString(),"K")}var Fa=function(W,j,F){return W<0&&Number.isFinite(W)?j:F},da=function(W,j,F){return W>0&&Number.isFinite(W)?j:F},ja=function(W,j){return W*j},Oa=function(W,j){return W/2+(j||0)/2},Ra=function(W){return W};class Xa{constructor(j){this.options=(0,Bt.Z)({},this.getDefaultOptions()),this.update(j)}getOptions(){return this.options}update(j={}){this.options=(0,Bt.Z)({},this.options,j),this.rescale(j)}rescale(j){}}function oo(W,j){return j-W?F=>(F-W)/(j-W):F=>.5}function Ia(W,...j){return j.reduce((F,B)=>K=>F(B(K)),W)}function so(W,j,F,B,K){let dt=F||0,St=B||W.length;const Et=K||(Zt=>Zt);for(;dt<St;){const Zt=Math.floor((dt+St)/2);Et(W[Zt])>j?St=Zt:dt=Zt+1}return dt}var $a=d(75196),fa=d.n($a);function vo(W,j,F){let B=F;return B<0&&(B+=1),B>1&&(B-=1),B<1/6?W+(j-W)*6*B:B<1/2?j:B<2/3?W+(j-W)*(2/3-B)*6:W}function Ca(W){const j=W[0]/360,F=W[1]/100,B=W[2]/100,K=W[3];if(F===0)return[B*255,B*255,B*255,K];const dt=B<.5?B*(1+F):B+F-B*F,St=2*B-dt,Et=vo(St,dt,j+1/3),Zt=vo(St,dt,j),ce=vo(St,dt,j-1/3);return[Et*255,Zt*255,ce*255,K]}function Di(W){const j=fa().get(W);if(!j)return null;const{model:F,value:B}=j;return F==="rgb"?B:F==="hsl"?Ca(B):null}const Qa=(W,j)=>F=>W*(1-F)+j*F,ts=(W,j)=>{const F=Di(W),B=Di(j);return F===null||B===null?F?()=>W:()=>j:K=>{const dt=new Array(4);for(let Ae=0;Ae<4;Ae+=1){const Le=F[Ae],$e=B[Ae];dt[Ae]=Le*(1-K)+$e*K}const[St,Et,Zt,ce]=dt;return`rgba(${Math.round(St)}, ${Math.round(Et)}, ${Math.round(Zt)}, ${ce})`}},Ja=(W,j)=>typeof W=="number"&&typeof j=="number"?Qa(W,j):typeof W=="string"&&typeof j=="string"?ts(W,j):()=>W,To=(W,j)=>{const F=Qa(W,j);return B=>Math.round(F(B))};var ia=d(49527);function lr(W){return W===null}function ri(W){return!(0,ia.Z)(W)&&!lr(W)&&!Number.isNaN(W)}const Yr=Math.sqrt(50),hi=Math.sqrt(10),ai=Math.sqrt(2);function zi(W,j,F){const B=(j-W)/Math.max(0,F),K=Math.floor(Math.log(B)/Math.LN10),dt=B/Sc(10,K);return K>=0?(dt>=Yr?10:dt>=hi?5:dt>=ai?2:1)*Sc(10,K):-Sc(10,-K)/(dt>=Yr?10:dt>=hi?5:dt>=ai?2:1)}function qa(W,j,F){const B=Math.abs(j-W)/Math.max(0,F);let K=Sc(10,Math.floor(Math.log(B)/Math.LN10));const dt=B/K;return dt>=Yr?K*=10:dt>=hi?K*=5:dt>=ai&&(K*=2),j<W?-K:K}const ji=(W,j,F=5)=>{const B=[W,j];let K=0,dt=B.length-1,St=B[K],Et=B[dt],Zt;return Et<St&&([St,Et]=[Et,St],[K,dt]=[dt,K]),Zt=zi(St,Et,F),Zt>0?(St=Math.floor(St/Zt)*Zt,Et=Math.ceil(Et/Zt)*Zt,Zt=zi(St,Et,F)):Zt<0&&(St=Math.ceil(St*Zt)/Zt,Et=Math.floor(Et*Zt)/Zt,Zt=zi(St,Et,F)),Zt>0?(B[K]=Math.floor(St/Zt)*Zt,B[dt]=Math.ceil(Et/Zt)*Zt):Zt<0&&(B[K]=Math.ceil(St*Zt)/Zt,B[dt]=Math.floor(Et*Zt)/Zt),B};function Vi(W,j){const F=j<W?j:W,B=W>j?W:j;return K=>Math.min(Math.max(F,K),B)}const Kn=(W,j,F)=>{const[B,K]=W,[dt,St]=j;let Et,Zt;return B<K?(Et=oo(B,K),Zt=F(dt,St)):(Et=oo(K,B),Zt=F(St,dt)),Ia(Zt,Et)},Ui=(W,j,F)=>{const B=Math.min(W.length,j.length)-1,K=new Array(B),dt=new Array(B),St=W[0]>W[B],Et=St?[...W].reverse():W,Zt=St?[...j].reverse():j;for(let ce=0;ce<B;ce+=1)K[ce]=oo(Et[ce],Et[ce+1]),dt[ce]=F(Zt[ce],Zt[ce+1]);return ce=>{const Ae=so(W,ce,1,B)-1,Le=K[Ae],$e=dt[Ae];return Ia($e,Le)(ce)}},Io=(W,j,F,B)=>(Math.min(W.length,j.length)>2?Ui:Kn)(W,j,B?To:F);class Uo extends Xa{getDefaultOptions(){return{domain:[0,1],range:[0,1],nice:!1,clamp:!1,round:!1,interpolate:Qa,tickCount:5}}map(j){return ri(j)?this.output(j):this.options.unknown}invert(j){return ri(j)?this.input(j):this.options.unknown}nice(){if(!this.options.nice)return;const[j,F,B,...K]=this.getTickMethodOptions();this.options.domain=this.chooseNice()(j,F,B,...K)}getTicks(){const{tickMethod:j}=this.options,[F,B,K,...dt]=this.getTickMethodOptions();return j(F,B,K,...dt)}getTickMethodOptions(){const{domain:j,tickCount:F}=this.options,B=j[0],K=j[j.length-1];return[B,K,F]}chooseNice(){return ji}rescale(){this.nice();const[j,F]=this.chooseTransforms();this.composeOutput(j,this.chooseClamp(j)),this.composeInput(j,F,this.chooseClamp(F))}chooseClamp(j){const{clamp:F,range:B}=this.options,K=this.options.domain.map(j),dt=Math.min(K.length,B.length);return F?Vi(K[0],K[dt-1]):Ra}composeOutput(j,F){const{domain:B,range:K,round:dt,interpolate:St}=this.options,Et=Io(B.map(j),K,St,dt);this.output=Ia(Et,F,j)}composeInput(j,F,B){const{domain:K,range:dt}=this.options,St=Io(dt,K.map(j),Qa);this.input=Ia(F,B,St)}}const es=(W,j,F)=>{let B,K,dt=W,St=j;if(dt===St&&F>0)return[dt];let Et=zi(dt,St,F);if(Et===0||!Number.isFinite(Et))return[];if(Et>0){dt=Math.ceil(dt/Et),St=Math.floor(St/Et),K=new Array(B=Math.ceil(St-dt+1));for(let Zt=0;Zt<B;Zt+=1)K[Zt]=(dt+Zt)*Et}else{Et=-Et,dt=Math.ceil(dt*Et),St=Math.floor(St*Et),K=new Array(B=Math.ceil(St-dt+1));for(let Zt=0;Zt<B;Zt+=1)K[Zt]=(dt+Zt)/Et}return K};class Ta extends Uo{getDefaultOptions(){return{domain:[0,1],range:[0,1],unknown:void 0,nice:!1,clamp:!1,round:!1,interpolate:Ja,tickMethod:es,tickCount:5}}chooseTransforms(){return[Ra,Ra]}clone(){return new Ta(this.options)}}function eo({map:W,initKey:j},F){const B=j(F);return W.has(B)?W.get(B):F}function ns({map:W,initKey:j},F){const B=j(F);return W.has(B)?W.get(B):(W.set(B,F),F)}function Po({map:W,initKey:j},F){const B=j(F);return W.has(B)&&(F=W.get(B),W.delete(B)),F}function ys(W){return typeof W=="object"?W.valueOf():W}class Ao extends Map{constructor(j){if(super(),this.map=new Map,this.initKey=ys,j!==null)for(const[F,B]of j)this.set(F,B)}get(j){return super.get(eo({map:this.map,initKey:this.initKey},j))}has(j){return super.has(eo({map:this.map,initKey:this.initKey},j))}set(j,F){return super.set(ns({map:this.map,initKey:this.initKey},j),F)}delete(j){return super.delete(Po({map:this.map,initKey:this.initKey},j))}}const go=Symbol("defaultUnknown");function No(W,j,F){for(let B=0;B<j.length;B+=1)W.has(j[B])||W.set(F(j[B]),B)}function fs(W){const{value:j,from:F,to:B,mapper:K,notFoundReturn:dt}=W;let St=K.get(j);if(St===void 0){if(dt!==go)return dt;St=F.push(j)-1,K.set(j,St)}return B[St%B.length]}function Ba(W){return W instanceof Date?j=>`${j}`:typeof W=="object"?j=>JSON.stringify(j):j=>j}class no extends Xa{getDefaultOptions(){return{domain:[],range:[],unknown:go}}constructor(j){super(j)}map(j){return this.domainIndexMap.size===0&&No(this.domainIndexMap,this.getDomain(),this.domainKey),fs({value:this.domainKey(j),mapper:this.domainIndexMap,from:this.getDomain(),to:this.getRange(),notFoundReturn:this.options.unknown})}invert(j){return this.rangeIndexMap.size===0&&No(this.rangeIndexMap,this.getRange(),this.rangeKey),fs({value:this.rangeKey(j),mapper:this.rangeIndexMap,from:this.getRange(),to:this.getDomain(),notFoundReturn:this.options.unknown})}rescale(j){const[F]=this.options.domain,[B]=this.options.range;if(this.domainKey=Ba(F),this.rangeKey=Ba(B),!this.rangeIndexMap){this.rangeIndexMap=new Map,this.domainIndexMap=new Map;return}(!j||j.range)&&this.rangeIndexMap.clear(),(!j||j.domain||j.compare)&&(this.domainIndexMap.clear(),this.sortedDomain=void 0)}clone(){return new no(this.options)}getRange(){return this.options.range}getDomain(){if(this.sortedDomain)return this.sortedDomain;const{domain:j,compare:F}=this.options;return this.sortedDomain=F?[...j].sort(F):j,this.sortedDomain}}function za(W){const j=Math.min(...W);return W.map(F=>F/j)}function rs(W,j){const F=W.length,B=j-F;return B>0?[...W,...new Array(B).fill(1)]:B<0?W.slice(0,j):W}function is(W){return Math.round(W*1e12)/1e12}function $i(W){const{domain:j,range:F,paddingOuter:B,paddingInner:K,flex:dt,round:St,align:Et}=W,Zt=j.length,ce=rs(dt,Zt),[Ae,Le]=F,$e=Le-Ae,Xe=2/Zt*B+1-1/Zt*K,an=$e/Xe,bn=an*K/Zt,xn=an-Zt*bn,Dn=za(ce),Fn=Dn.reduce((Ei,Vr)=>Ei+Vr),On=xn/Fn,Yn=new Ao(j.map((Ei,Vr)=>{const mi=Dn[Vr]*On;return[Ei,St?Math.floor(mi):mi]})),nr=new Ao(j.map((Ei,Vr)=>{const Jr=Dn[Vr]*On+bn;return[Ei,St?Math.floor(Jr):Jr]})),sr=Array.from(nr.values()).reduce((Ei,Vr)=>Ei+Vr),Wr=($e-(sr-sr/Zt*K))*Et,ei=Ae+Wr;let Ti=St?Math.round(ei):ei;const Gi=new Array(Zt);for(let Ei=0;Ei<Zt;Ei+=1){Gi[Ei]=is(Ti);const Vr=j[Ei];Ti+=nr.get(Vr)}return{valueBandWidth:Yn,valueStep:nr,adjustedRange:Gi}}function Wa(W){var j;const{domain:F}=W,B=F.length;if(B===0)return{valueBandWidth:void 0,valueStep:void 0,adjustedRange:[]};if(!!(!((j=W.flex)===null||j===void 0)&&j.length))return $i(W);const{range:dt,paddingOuter:St,paddingInner:Et,round:Zt,align:ce}=W;let Ae,Le,$e=dt[0];const an=dt[1]-$e,bn=St*2,xn=B-Et;Ae=an/Math.max(1,bn+xn),Zt&&(Ae=Math.floor(Ae)),$e+=(an-Ae*(B-Et))*ce,Le=Ae*(1-Et),Zt&&($e=Math.round($e),Le=Math.round(Le));const Dn=new Array(B).fill(0).map((Fn,On)=>$e+On*Ae);return{valueStep:Ae,valueBandWidth:Le,adjustedRange:Dn}}class po extends no{getDefaultOptions(){return{domain:[],range:[0,1],align:.5,round:!1,paddingInner:0,paddingOuter:0,padding:0,unknown:go,flex:[]}}constructor(j){super(j)}clone(){return new po(this.options)}getStep(j){return this.valueStep===void 0?1:typeof this.valueStep=="number"?this.valueStep:j===void 0?Array.from(this.valueStep.values())[0]:this.valueStep.get(j)}getBandWidth(j){return this.valueBandWidth===void 0?1:typeof this.valueBandWidth=="number"?this.valueBandWidth:j===void 0?Array.from(this.valueBandWidth.values())[0]:this.valueBandWidth.get(j)}getRange(){return this.adjustedRange}getPaddingInner(){const{padding:j,paddingInner:F}=this.options;return j>0?j:F}getPaddingOuter(){const{padding:j,paddingOuter:F}=this.options;return j>0?j:F}rescale(){super.rescale();const{align:j,domain:F,range:B,round:K,flex:dt}=this.options,{adjustedRange:St,valueBandWidth:Et,valueStep:Zt}=Wa({align:j,range:B,round:K,flex:dt,paddingInner:this.getPaddingInner(),paddingOuter:this.getPaddingOuter(),domain:F});this.valueStep=Zt,this.valueBandWidth=Et,this.adjustedRange=St}}var bo=d(37547),Ro=d(1933),Ga=d(39934),Ho=function(W){(0,l.ZT)(j,W);function j(F){var B=this,K=F.style,dt=(0,l._T)(F,["style"]);return B=W.call(this,(0,Bt.Z)({},{type:"column"},(0,l.pi)({style:K},dt)))||this,B.columnsGroup=new _.ZA({name:"columns"}),B.appendChild(B.columnsGroup),B.render(),B}return j.prototype.render=function(){var F=this.attributes,B=F.columns,K=F.x,dt=F.y;this.columnsGroup.style.transform="translate(".concat(K,", ").concat(dt,")"),(0,Nt.Ys)(this.columnsGroup).selectAll(".column").data(B.flat()).join(function(St){return St.append("rect").attr("className","column").each(function(Et){this.attr(Et)})},function(St){return St.each(function(Et){this.attr(Et)})},function(St){return St.remove()})},j.prototype.update=function(F){this.attr((0,g.n)({},this.attributes,F)),this.render()},j.prototype.clear=function(){this.removeChildren()},j}(_.s$),Ci=function(W){(0,l.ZT)(j,W);function j(F){var B=this,K=F.style,dt=(0,l._T)(F,["style"]);return B=W.call(this,(0,Bt.Z)({},{type:"lines"},(0,l.pi)({style:K},dt)))||this,B.linesGroup=B.appendChild(new _.ZA),B.areasGroup=B.appendChild(new _.ZA),B.render(),B}return j.prototype.render=function(){var F=this.attributes,B=F.lines,K=F.areas,dt=F.x,St=F.y;this.style.transform="translate(".concat(dt,", ").concat(St,")"),B&&this.renderLines(B),K&&this.renderAreas(K)},j.prototype.clear=function(){this.linesGroup.removeChildren(),this.areasGroup.removeChildren()},j.prototype.update=function(F){this.attr((0,g.n)({},this.attributes,F)),this.render()},j.prototype.renderLines=function(F){(0,Nt.Ys)(this.linesGroup).selectAll(".line").data(F).join(function(B){return B.append("path").attr("className","line").each(function(K){this.attr(K)})},function(B){return B.each(function(K){this.attr(K)})},function(B){return B.remove()})},j.prototype.renderAreas=function(F){(0,Nt.Ys)(this.linesGroup).selectAll(".area").data(F).join(function(B){return B.append("path").attr("className","area").each(function(K){this.attr(K)})},function(B){return B.each(function(K){this.style(K)})},function(B){return B.remove()})},j}(_.s$),bi=d(62099);function aa(W,j,F,B){var K,dt=[],St=!!B,Et,Zt,ce=[1/0,1/0],Ae=[-1/0,-1/0],Le,$e,Xe;if(St){K=(0,l.CR)(B,2),ce=K[0],Ae=K[1];for(var an=0,bn=W.length;an<bn;an+=1){var xn=W[an];ce=We(ce,xn),Ae=Oe(Ae,xn)}}for(var an=0,Dn=W.length;an<Dn;an+=1){var xn=W[an];if(an===0&&!F)Xe=xn;else if(an===Dn-1&&!F)$e=xn,dt.push(Xe),dt.push($e);else{var Fn=[an?an-1:Dn-1,an-1][F?0:1];Et=W[Fn],Zt=W[F?(an+1)%Dn:an+1];var On=[0,0];On=Ye(Zt,Et),On=xe(On,j);var Yn=Qe(xn,Et),nr=Qe(xn,Zt),sr=Yn+nr;sr!==0&&(Yn/=sr,nr/=sr);var xr=xe(On,-Yn),Wr=xe(On,nr);$e=qt(xn,xr),Le=qt(xn,Wr),Le=We(Le,Oe(Zt,xn)),Le=Oe(Le,We(Zt,xn)),xr=Ye(Le,xn),xr=xe(xr,-Yn/nr),$e=qt(xn,xr),$e=We($e,Oe(Et,xn)),$e=Oe($e,We(Et,xn)),Wr=Ye(xn,$e),Wr=xe(Wr,nr/Yn),Le=qt(xn,Wr),St&&($e=Oe($e,ce),$e=We($e,Ae),Le=Oe(Le,ce),Le=We(Le,Ae)),dt.push(Xe),dt.push($e),Xe=Le}}return F&&dt.push(dt.shift()),dt}function ba(W,j,F){var B;j===void 0&&(j=!1),F===void 0&&(F=[[0,0],[1,1]]);for(var K=!!j,dt=[],St=0,Et=W.length;St<Et;St+=2)dt.push([W[St],W[St+1]]);for(var Zt=aa(dt,.4,K,F),ce=dt.length,Ae=[],Le,$e,Xe,St=0;St<ce-1;St+=1)Le=Zt[St*2],$e=Zt[St*2+1],Xe=dt[St+1],Ae.push(["C",Le[0],Le[1],$e[0],$e[1],Xe[0],Xe[1]]);return K&&(Le=Zt[ce],$e=Zt[ce+1],B=(0,l.CR)(dt,1),Xe=B[0],Ae.push(["C",Le[0],Le[1],$e[0],$e[1],Xe[0],Xe[1]])),Ae}function Hi(W,j){var F,B=j.x,K=j.y,dt=(0,l.CR)(K.getOptions().range||[0,0],2),St=dt[0],Et=dt[1];return Et>St&&(F=(0,l.CR)([St,Et],2),Et=F[0],St=F[1]),W.map(function(Zt){var ce=Zt.map(function(Ae,Le){return[B.map(Le),(0,R.Z)(K.map(Ae),Et,St)]});return ce})}function xi(W,j){j===void 0&&(j=!1);var F=j?W.length-1:0,B=W.map(function(K,dt){return(0,l.ev)([dt===F?"M":"L"],(0,l.CR)(K),!1)});return j?B.reverse():B}function Ea(W,j){if(j===void 0&&(j=!1),W.length<=2)return xi(W);for(var F=[],B=W.length,K=0;K<B;K+=1){var dt=j?W[B-K-1]:W[K];(0,bi.Z)(dt,F.slice(-2))||F.push.apply(F,(0,l.ev)([],(0,l.CR)(dt),!1))}var St=ba(F,!1);return j?St.unshift((0,l.ev)(["M"],(0,l.CR)(W[B-1]),!1)):St.unshift((0,l.ev)(["M"],(0,l.CR)(W[0]),!1)),St}function lo(W,j,F){var B=(0,bo.Z)(W);return B.push(["L",j,F],["L",0,F],["Z"]),B}function xa(W,j,F,B){return W.map(function(K){return lo(j?Ea(K):xi(K),F,B)})}function Do(W,j,F){for(var B=[],K=W.length-1;K>=0;K-=1){var dt=W[K],St=xi(dt),Et=void 0;if(K===0)Et=lo(St,j,F);else{var Zt=W[K-1],ce=xi(Zt,!0);ce[0][0]="L",Et=(0,l.ev)((0,l.ev)((0,l.ev)([],(0,l.CR)(St),!1),(0,l.CR)(ce),!1),[["Z"]],!1)}B.push(Et)}return B}function Da(W,j,F){for(var B=[],K=W.length-1;K>=0;K-=1){var dt=W[K],St=Ea(dt),Et=void 0;if(K===0)Et=lo(St,j,F);else{var Zt=W[K-1],ce=Ea(Zt,!0),Ae=dt[0];ce[0][0]="L",Et=(0,l.ev)((0,l.ev)((0,l.ev)([],(0,l.CR)(St),!1),(0,l.CR)(ce),!1),[(0,l.ev)(["M"],(0,l.CR)(Ae),!1),["Z"]],!1)}B.push(Et)}return B}var Lo=d(59895),zs=function(W,j){if((0,Ga.Z)(W)){for(var F,B=1/0,K=0;K<W.length;K++){var dt=W[K],St=(0,pe.Z)(j)?j(dt):dt[j];St<B&&(F=dt,B=St)}return F}},Fr=d(82639),As=function(W,j){if((0,Ga.Z)(W)){for(var F,B=-1/0,K=0;K<W.length;K++){var dt=W[K],St=(0,pe.Z)(j)?j(dt):dt[j];St>B&&(F=dt,B=St)}return F}};function as(W){return W.length===0?[0,0]:[(0,Lo.Z)(zs(W,function(j){return(0,Lo.Z)(j)||0})),(0,Fr.Z)(As(W,function(j){return(0,Fr.Z)(j)||0}))]}function ko(W){for(var j=(0,bo.Z)(W),F=j[0].length,B=(0,l.CR)([Array(F).fill(0),Array(F).fill(0)],2),K=B[0],dt=B[1],St=0;St<j.length;St+=1)for(var Et=j[St],Zt=0;Zt<F;Zt+=1)Et[Zt]>=0?(Et[Zt]+=K[Zt],K[Zt]=Et[Zt]):(Et[Zt]+=dt[Zt],dt[Zt]=Et[Zt]);return j}var hs=function(W){(0,l.ZT)(j,W);function j(F){return W.call(this,F,{type:"line",x:0,y:0,width:200,height:20,isStack:!1,color:["#83daad","#edbf45","#d2cef9","#e290b3","#6f63f4"],smooth:!0,lineLineWidth:1,areaOpacity:0,isGroup:!1,columnLineWidth:1,columnStroke:"#fff",scale:1,spacing:0})||this}return Object.defineProperty(j.prototype,"rawData",{get:function(){var F=this.attributes.data;if(!F||(F==null?void 0:F.length)===0)return[[]];var B=(0,bo.Z)(F);return(0,Ro.Z)(B[0])?[B]:B},enumerable:!1,configurable:!0}),Object.defineProperty(j.prototype,"data",{get:function(){return this.attributes.isStack?ko(this.rawData):this.rawData},enumerable:!1,configurable:!0}),Object.defineProperty(j.prototype,"scales",{get:function(){return this.createScales(this.data)},enumerable:!1,configurable:!0}),Object.defineProperty(j.prototype,"baseline",{get:function(){var F=this.scales.y,B=(0,l.CR)(F.getOptions().domain||[0,0],2),K=B[0],dt=B[1];return dt<0?F.map(dt):F.map(K<0?0:K)},enumerable:!1,configurable:!0}),Object.defineProperty(j.prototype,"containerShape",{get:function(){var F=this.attributes,B=F.width,K=F.height;return{width:B,height:K}},enumerable:!1,configurable:!0}),Object.defineProperty(j.prototype,"linesStyle",{get:function(){var F=this,B=this.attributes,K=B.type,dt=B.isStack,St=B.smooth;if(K!=="line")throw new Error("linesStyle can only be used in line type");var Et=(0,b.zs)(this.attributes,"area"),Zt=(0,b.zs)(this.attributes,"line"),ce=this.containerShape.width,Ae=this.data;if(Ae[0].length===0)return{lines:[],areas:[]};var Le=this.scales,$e=Le.x,Xe=Le.y,an=Hi(Ae,{type:"line",x:$e,y:Xe}),bn=[];if(Et){var xn=this.baseline;dt?bn=St?Da(an,ce,xn):Do(an,ce,xn):bn=xa(an,St,ce,xn)}return{lines:an.map(function(Dn,Fn){return(0,l.pi)({stroke:F.getColor(Fn),d:St?Ea(Dn):xi(Dn)},Zt)}),areas:bn.map(function(Dn,Fn){return(0,l.pi)({d:Dn,fill:F.getColor(Fn)},Et)})}},enumerable:!1,configurable:!0}),Object.defineProperty(j.prototype,"columnsStyle",{get:function(){var F=this,B=(0,b.zs)(this.attributes,"column"),K=this.attributes,dt=K.isStack,St=K.type,Et=K.scale;if(St!=="column")throw new Error("columnsStyle can only be used in column type");var Zt=this.containerShape.height,ce=this.rawData;if(!ce)return{columns:[]};dt&&(ce=ko(ce));var Ae=this.createScales(ce),Le=Ae.x,$e=Ae.y,Xe=(0,l.CR)(as(ce),2),an=Xe[0],bn=Xe[1],xn=new Ta({domain:[0,bn-(an>0?0:an)],range:[0,Zt*Et]}),Dn=Le.getBandWidth(),Fn=this.rawData;return{columns:ce.map(function(On,Yn){return On.map(function(nr,sr){var xr=Dn/ce.length,Wr=function(){return{x:Le.map(sr)+xr*Yn,y:nr>=0?$e.map(nr):$e.map(0),width:xr,height:xn.map(Math.abs(nr))}},ei=function(){return{x:Le.map(sr),y:$e.map(nr),width:Dn,height:xn.map(Fn[Yn][sr])}};return(0,l.pi)((0,l.pi)({fill:F.getColor(Yn)},B),dt?ei():Wr())})})}},enumerable:!1,configurable:!0}),j.prototype.render=function(F,B){(0,Nt.OV)(B,".container","rect").attr("className","container").node();var K=F.type,dt=F.x,St=F.y,Et="spark".concat(K),Zt=(0,l.pi)({x:dt,y:St},K==="line"?this.linesStyle:this.columnsStyle);(0,Nt.Ys)(B).selectAll(".spark").data([K]).join(function(ce){return ce.append(function(Ae){return Ae==="line"?new Ci({className:Et,style:Zt}):new Ho({className:Et,style:Zt})}).attr("className","spark ".concat(Et))},function(ce){return ce.update(Zt)},function(ce){return ce.remove()})},j.prototype.getColor=function(F){var B=this.attributes.color;return(0,Ga.Z)(B)?B[F%B.length]:(0,pe.Z)(B)?B.call(null,F):B},j.prototype.createScales=function(F){var B,K,dt=this.attributes,St=dt.type,Et=dt.scale,Zt=dt.range,ce=Zt===void 0?[]:Zt,Ae=dt.spacing,Le=this.containerShape,$e=Le.width,Xe=Le.height,an=(0,l.CR)(as(F),2),bn=an[0],xn=an[1],Dn=new Ta({domain:[(B=ce[0])!==null&&B!==void 0?B:bn,(K=ce[1])!==null&&K!==void 0?K:xn],range:[Xe,Xe*(1-Et)]});return St==="line"?{type:St,x:new Ta({domain:[0,F[0].length-1],range:[0,$e]}),y:Dn}:{type:St,x:new po({domain:F[0].map(function(Fn,On){return On}),range:[0,$e],paddingInner:Ae,paddingOuter:Ae/2,align:.5}),y:Dn}},j.tag="sparkline",j}(O.w),Ns={fill:"#fff",lineWidth:1,radius:2,size:10,stroke:"#bfbfbf",strokeOpacity:1,zIndex:0},bs={fill:"#000",fillOpacity:.45,fontSize:12,textAlign:"center",textBaseline:"middle",zIndex:1},Yo={x:0,y:0,orientation:"horizontal",showLabel:!0,type:"start"},Eo=(0,Xt.A)({foreground:"foreground",handle:"handle",selection:"selection",sparkline:"sparkline",sparklineGroup:"sparkline-group",track:"track",brushArea:"brush-area"},"slider"),La=(0,Xt.A)({labelGroup:"label-group",label:"label",iconGroup:"icon-group",icon:"icon",iconRect:"icon-rect",iconLine:"icon-line"},"handle"),xo=function(W){(0,l.ZT)(j,W);function j(){return W!==null&&W.apply(this,arguments)||this}return j.prototype.render=function(F,B){var K=F.x,dt=F.y,St=F.size,Et=St===void 0?10:St,Zt=F.radius,ce=Zt===void 0?Et/4:Zt,Ae=F.orientation,Le=F.classNamePrefix,$e=(0,l._T)(F,["x","y","size","radius","orientation","classNamePrefix"]),Xe=Et,an=Xe*2.4,bn=Le?"".concat(La.iconRect.name," ").concat(Le,"handle-icon-rect"):La.iconRect.name,xn=function(sr){return Le?"".concat(La.iconLine,"-").concat(sr," ").concat(Le,"handle-icon-line"):"".concat(La.iconLine,"-").concat(sr)},Dn=(0,Nt.Ys)(B).maybeAppendByClassName(La.iconRect,"rect").attr("className",bn).styles((0,l.pi)((0,l.pi)({},$e),{width:Xe,height:an,radius:ce,x:K-Xe/2,y:dt-an/2,transformOrigin:"center"})),Fn=K+1/3*Xe-Xe/2,On=K+2/3*Xe-Xe/2,Yn=dt+1/4*an-an/2,nr=dt+3/4*an-an/2;Dn.maybeAppendByClassName("".concat(La.iconLine,"-1"),"line").attr("className",xn(1)).styles((0,l.pi)({x1:Fn,x2:Fn,y1:Yn,y2:nr},$e)),Dn.maybeAppendByClassName("".concat(La.iconLine,"-2"),"line").attr("className",xn(2)).styles((0,l.pi)({x1:On,x2:On,y1:Yn,y2:nr},$e)),Ae==="vertical"&&(Dn.node().style.transform="rotate(90)")},j}(O.w),ta=function(W){(0,l.ZT)(j,W);function j(F){return W.call(this,F,Yo)||this}return j.prototype.renderLabel=function(F){var B=this,K=this.attributes,dt=K.x,St=K.y,Et=K.showLabel,Zt=(0,b.zs)(this.attributes,"label"),ce=Zt.x,Ae=ce===void 0?0:ce,Le=Zt.y,$e=Le===void 0?0:Le,Xe=Zt.transform,an=Zt.transformOrigin,bn=(0,l._T)(Zt,["x","y","transform","transformOrigin"]),xn=(0,l.CR)((0,b.Hm)(bn,[]),2),Dn=xn[0],Fn=xn[1],On=(0,Nt.Ys)(F).maybeAppendByClassName(La.labelGroup,"g").styles(Fn),Yn=(0,l.pi)((0,l.pi)({},bs),Dn),nr=Yn.text,sr=(0,l._T)(Yn,["text"]);(0,nt.z)(!!Et,On,function(xr){B.label=xr.maybeAppendByClassName(La.label,"text").styles((0,l.pi)((0,l.pi)({},sr),{x:dt+Ae,y:St+$e,transform:Xe,transformOrigin:an,text:"".concat(nr)})),B.label.on("mousedown",function(Wr){Wr.stopPropagation()}),B.label.on("touchstart",function(Wr){Wr.stopPropagation()})})},j.prototype.renderIcon=function(F){var B=this.attributes,K=B.x,dt=B.y,St=B.orientation,Et=B.type,Zt=B.classNamePrefix,ce=(0,l.pi)((0,l.pi)({x:K,y:dt,orientation:St,classNamePrefix:Zt},Ns),(0,b.zs)(this.attributes,"icon")),Ae=this.attributes.iconShape,Le=Ae===void 0?function(){return new xo({style:ce})}:Ae,$e=(0,Nt.Ys)(F).maybeAppendByClassName(La.iconGroup,"g");$e.selectAll(La.icon.class).data([Le]).join(function(Xe){return Xe.append(typeof Le=="string"?Le:function(){return Le(Et)}).attr("className",La.icon.name)},function(Xe){return Xe.update(ce)},function(Xe){return Xe.remove()})},j.prototype.render=function(F,B){this.renderIcon(B),this.renderLabel(B)},j}(O.w),js=function(W){(0,l.ZT)(j,W);function j(F){var B=W.call(this,F,(0,l.pi)((0,l.pi)((0,l.pi)({x:0,y:0,animate:{duration:100,fill:"both"},brushable:!0,formatter:function(K){return K.toString()},handleSpacing:2,orientation:"horizontal",padding:0,autoFitLabel:!0,scrollable:!0,selectionFill:"#5B8FF9",selectionFillOpacity:.45,selectionZIndex:2,showHandle:!0,showLabel:!0,slidable:!0,trackFill:"#416180",trackLength:200,trackOpacity:.05,trackSize:20,trackZIndex:-1,values:[0,1],type:"range",selectionType:"select",handleIconOffset:0},(0,b.dq)(Yo,"handle")),(0,b.dq)(Ns,"handleIcon")),(0,b.dq)(bs,"handleLabel")))||this;return B.range=[0,1],B.onDragStart=function(K){return function(dt){dt.stopPropagation(),B.target=K,B.prevPos=B.getOrientVal(qi(dt));var St=B.availableSpace,Et=St.x,Zt=St.y,ce=B.getBBox(),Ae=ce.x,Le=ce.y;B.selectionStartPos=B.getRatio(B.prevPos-B.getOrientVal([Et,Zt])-B.getOrientVal([+Ae,+Le])),B.selectionWidth=0,document.addEventListener("pointermove",B.onDragging),document.addEventListener("pointerup",B.onDragEnd)}},B.onDragging=function(K){var dt=B.attributes,St=dt.slidable,Et=dt.brushable,Zt=dt.type;K.stopPropagation();var ce=B.getOrientVal(qi(K)),Ae=ce-B.prevPos;if(Ae){var Le=B.getRatio(Ae);switch(B.target){case"start":St&&B.setValuesOffset(Le);break;case"end":St&&B.setValuesOffset(0,Le);break;case"selection":St&&B.setValuesOffset(Le,Le);break;case"track":if(!Et)return;B.selectionWidth+=Le,Zt==="range"?B.innerSetValues([B.selectionStartPos,B.selectionStartPos+B.selectionWidth].sort(),!0):B.innerSetValues([0,B.selectionStartPos+B.selectionWidth],!0);break;default:break}B.prevPos=ce}},B.onDragEnd=function(){document.removeEventListener("pointermove",B.onDragging),document.removeEventListener("pointermove",B.onDragging),document.removeEventListener("pointerup",B.onDragEnd),B.target="",B.updateHandlesPosition(!1)},B.onValueChange=function(K){var dt=B.attributes,St=dt.onChange,Et=dt.type,Zt=Et==="range"?K:K[1],ce=Et==="range"?B.getValues():B.getValues()[1],Ae=new _.Aw("valuechange",{detail:{oldValue:Zt,value:ce}});B.dispatchEvent(Ae),St==null||St(ce)},B.selectionStartPos=0,B.selectionWidth=0,B.prevPos=0,B.target="",B}return Object.defineProperty(j.prototype,"values",{get:function(){return this.attributes.values},set:function(F){this.attributes.values=this.clampValues(F)},enumerable:!1,configurable:!0}),Object.defineProperty(j.prototype,"sparklineStyle",{get:function(){var F=this.attributes.orientation;if(F!=="horizontal")return null;var B=(0,b.zs)(this.attributes,"sparkline");return(0,l.pi)((0,l.pi)({zIndex:0},this.availableSpace),B)},enumerable:!1,configurable:!0}),Object.defineProperty(j.prototype,"shape",{get:function(){var F=this.attributes,B=F.trackLength,K=F.trackSize,dt=(0,l.CR)(this.getOrientVal([[B,K],[K,B]]),2),St=dt[0],Et=dt[1];return{width:St,height:Et}},enumerable:!1,configurable:!0}),Object.defineProperty(j.prototype,"availableSpace",{get:function(){var F=this.attributes,B=F.x,K=F.y,dt=F.padding,St=(0,l.CR)((0,z.j)(dt),4),Et=St[0],Zt=St[1],ce=St[2],Ae=St[3],Le=this.shape,$e=Le.width,Xe=Le.height;return{x:Ae,y:Et,width:$e-(Ae+Zt),height:Xe-(Et+ce)}},enumerable:!1,configurable:!0}),j.prototype.getValues=function(){return this.values},j.prototype.setValues=function(F,B){F===void 0&&(F=[0,0]),B===void 0&&(B=!1),this.attributes.values=F;var K=B===!1?!1:this.attributes.animate;this.updateSelectionArea(K),this.updateHandlesPosition(K)},j.prototype.updateSelectionArea=function(F){var B=this.calcSelectionArea();this.foregroundGroup.selectAll(Eo.selection.class).each(function(K,dt){(0,ut.eR)(this,B[dt],F)})},j.prototype.updateHandlesPosition=function(F){this.attributes.showHandle&&(this.startHandle&&(0,ut.eR)(this.startHandle,this.getHandleStyle("start"),F),this.endHandle&&(0,ut.eR)(this.endHandle,this.getHandleStyle("end"),F))},j.prototype.innerSetValues=function(F,B){F===void 0&&(F=[0,0]),B===void 0&&(B=!1);var K=this.values,dt=this.clampValues(F);this.attributes.values=dt,this.setValues(dt),B&&this.onValueChange(K)},j.prototype.renderTrack=function(F){var B=this.attributes,K=B.x,dt=B.y,St=(0,b.zs)(this.attributes,"track");this.trackShape=(0,Nt.Ys)(F).maybeAppendByClassName(Eo.track,"rect").styles((0,l.pi)((0,l.pi)({x:K,y:dt},this.shape),St))},j.prototype.renderBrushArea=function(F){var B=this.attributes,K=B.x,dt=B.y,St=B.brushable;this.brushArea=(0,Nt.Ys)(F).maybeAppendByClassName(Eo.brushArea,"rect").styles((0,l.pi)({x:K,y:dt,fill:"transparent",cursor:St?"crosshair":"default"},this.shape))},j.prototype.renderSparkline=function(F){var B=this,K=this.attributes,dt=K.x,St=K.y,Et=K.orientation,Zt=(0,Nt.Ys)(F).maybeAppendByClassName(Eo.sparklineGroup,"g");(0,nt.z)(Et==="horizontal",Zt,function(ce){var Ae=(0,l.pi)((0,l.pi)({},B.sparklineStyle),{x:dt,y:St});ce.maybeAppendByClassName(Eo.sparkline,function(){return new hs({style:Ae})}).update(Ae)})},j.prototype.renderHandles=function(){var F=this,B,K=this.attributes,dt=K.showHandle,St=K.type,Et=St==="range"?["start","end"]:["end"],Zt=dt?Et:[],ce=this;(B=this.foregroundGroup)===null||B===void 0||B.selectAll(Eo.handle.class).data(Zt.map(function(Ae){return{type:Ae}}),function(Ae){return Ae.type}).join(function(Ae){return Ae.append(function(Le){var $e=Le.type;return new ta({style:F.getHandleStyle($e)})}).each(function(Le){var $e=Le.type;this.attr("class","".concat(Eo.handle.name," ").concat($e,"-handle"));var Xe="".concat($e,"Handle");ce[Xe]=this,this.addEventListener("pointerdown",ce.onDragStart($e))})},function(Ae){return Ae.each(function(Le){var $e=Le.type;this.update(ce.getHandleStyle($e))})},function(Ae){return Ae.each(function(Le){var $e=Le.type,Xe="".concat($e,"Handle");ce[Xe]=void 0}).remove()})},j.prototype.renderSelection=function(F){var B=this.attributes,K=B.x,dt=B.y,St=B.type,Et=B.selectionType;this.foregroundGroup=(0,Nt.Ys)(F).maybeAppendByClassName(Eo.foreground,"g");var Zt=(0,b.zs)(this.attributes,"selection"),ce=function(Le){return Le.style("visibility",function($e){return $e.show?"visible":"hidden"}).style("cursor",function($e){return Et==="select"?"grab":Et==="invert"?"crosshair":"default"}).styles((0,l.pi)((0,l.pi)({},Zt),{transform:"translate(".concat(K,", ").concat(dt,")")}))},Ae=this;this.foregroundGroup.selectAll(Eo.selection.class).data(St==="value"?[]:this.calcSelectionArea().map(function(Le,$e){return{style:(0,l.pi)({},Le),index:$e,show:Et==="select"?$e===1:$e!==1}}),function(Le){return Le.index}).join(function(Le){return Le.append("rect").attr("className",Eo.selection.name).call(ce).each(function($e,Xe){var an=this;Xe===1?(Ae.selectionShape=(0,Nt.Ys)(this),this.on("pointerdown",function(bn){an.attr("cursor","grabbing"),Ae.onDragStart("selection")(bn)}),Ae.dispatchCustomEvent(this,"pointerenter","selectionMouseenter"),Ae.dispatchCustomEvent(this,"pointerleave","selectionMouseleave"),Ae.dispatchCustomEvent(this,"click","selectionClick"),this.addEventListener("pointerdown",function(){an.attr("cursor","grabbing")}),this.addEventListener("pointerup",function(){an.attr("cursor","pointer")}),this.addEventListener("pointerover",function(){an.attr("cursor","pointer")})):this.on("pointerdown",Ae.onDragStart("track"))})},function(Le){return Le.call(ce)},function(Le){return Le.remove()}),this.updateSelectionArea(!1),this.renderHandles()},j.prototype.render=function(F,B){this.renderTrack(B),this.renderSparkline(B),this.renderBrushArea(B),this.renderSelection(B)},j.prototype.clampValues=function(F,B){var K;B===void 0&&(B=4);var dt=(0,l.CR)(this.range,2),St=dt[0],Et=dt[1],Zt=(0,l.CR)(this.getValues().map(function(xn){return va(xn,B)}),2),ce=Zt[0],Ae=Zt[1],Le=Array.isArray(F)?F:[ce,F!=null?F:Ae],$e=(0,l.CR)((Le||[ce,Ae]).map(function(xn){return va(xn,B)}),2),Xe=$e[0],an=$e[1];if(this.attributes.type==="value")return[0,(0,R.Z)(an,St,Et)];Xe>an&&(K=(0,l.CR)([an,Xe],2),Xe=K[0],an=K[1]);var bn=an-Xe;return bn>Et-St?[St,Et]:Xe<St?ce===St&&Ae===an?[St,an]:[St,bn+St]:an>Et?Ae===Et&&ce===Xe?[Xe,Et]:[Et-bn,Et]:[Xe,an]},j.prototype.calcSelectionArea=function(F){var B=(0,l.CR)(this.clampValues(F),2),K=B[0],dt=B[1],St=this.availableSpace,Et=St.x,Zt=St.y,ce=St.width,Ae=St.height;return this.getOrientVal([[{y:Zt,height:Ae,x:Et,width:K*ce},{y:Zt,height:Ae,x:K*ce+Et,width:(dt-K)*ce},{y:Zt,height:Ae,x:dt*ce,width:(1-dt)*ce}],[{x:Et,width:ce,y:Zt,height:K*Ae},{x:Et,width:ce,y:K*Ae+Zt,height:(dt-K)*Ae},{x:Et,width:ce,y:dt*Ae,height:(1-dt)*Ae}]])},j.prototype.calcHandlePosition=function(F){var B=this.attributes.handleIconOffset,K=this.availableSpace,dt=K.x,St=K.y,Et=K.width,Zt=K.height,ce=(0,l.CR)(this.clampValues(),2),Ae=ce[0],Le=ce[1],$e=F==="start"?-B:B,Xe=(F==="start"?Ae:Le)*this.getOrientVal([Et,Zt])+$e;return{x:dt+this.getOrientVal([Xe,Et/2]),y:St+this.getOrientVal([Zt/2,Xe])}},j.prototype.inferTextStyle=function(F){var B=this.attributes.orientation;return B==="horizontal"?{}:F==="start"?{transformOrigin:"left center",transform:"rotate(90)",textAlign:"start"}:F==="end"?{transformOrigin:"right center",transform:"rotate(90)",textAlign:"end"}:{}},j.prototype.calcHandleText=function(F){var B,K=this.attributes,dt=K.type,St=K.orientation,Et=K.formatter,Zt=K.autoFitLabel,ce=(0,b.zs)(this.attributes,"handle"),Ae=(0,b.zs)(ce,"label"),Le=ce.spacing,$e=this.getHandleSize(),Xe=this.clampValues(),an=F==="start"?Xe[0]:Xe[1],bn=Et(an),xn=new Bi.x({style:(0,l.pi)((0,l.pi)((0,l.pi)({},Ae),this.inferTextStyle(F)),{text:bn})}),Dn=xn.getBBox(),Fn=Dn.width,On=Dn.height;if(xn.destroy(),!Zt){if(dt==="value")return{text:bn,x:0,y:-On-Le};var Yn=Le+$e+(St==="horizontal"?Fn/2:0);return B={text:bn},B[St==="horizontal"?"x":"y"]=F==="start"?-Yn:Yn,B}var nr=0,sr=0,xr=this.availableSpace,Wr=xr.width,ei=xr.height,Ti=this.calcSelectionArea()[1],Gi=Ti.x,Ei=Ti.y,Vr=Ti.width,mi=Ti.height,Jr=Le+$e;if(St==="horizontal"){var Ii=Jr+Fn/2;if(F==="start"){var Ki=Gi-Jr-Fn;nr=Ki>0?-Ii:Ii}else{var Kr=Wr-Gi-Vr-Jr>Fn;nr=Kr?Ii:-Ii}}else{var Zi=Jr,Pi=On+Jr;F==="start"?sr=Ei-$e>On?-Pi:Zi:sr=ei-(Ei+mi)-$e>On?Pi:-Zi}return{x:nr,y:sr,text:bn}},j.prototype.getHandleLabelStyle=function(F){var B=(0,b.zs)(this.attributes,"handleLabel");return(0,l.pi)((0,l.pi)((0,l.pi)({},B),this.calcHandleText(F)),this.inferTextStyle(F))},j.prototype.getHandleIconStyle=function(){var F=this.attributes.handleIconShape,B=(0,b.zs)(this.attributes,"handleIcon"),K=this.getOrientVal(["ew-resize","ns-resize"]),dt=this.getHandleSize();return(0,l.pi)({cursor:K,shape:F,size:dt},B)},j.prototype.getHandleStyle=function(F){var B=this.attributes,K=B.x,dt=B.y,St=B.showLabel,Et=B.showLabelOnInteraction,Zt=B.orientation,ce=this.calcHandlePosition(F),Ae=ce.x,Le=ce.y,$e=this.calcHandleText(F),Xe=St;return!St&&Et&&(this.target?Xe=!0:Xe=!1),(0,l.pi)((0,l.pi)((0,l.pi)({},(0,b.dq)(this.getHandleIconStyle(),"icon")),(0,b.dq)((0,l.pi)((0,l.pi)({},this.getHandleLabelStyle(F)),$e),"label")),{transform:"translate(".concat(Ae+K,", ").concat(Le+dt,")"),orientation:Zt,showLabel:Xe,type:F,zIndex:3})},j.prototype.getHandleSize=function(){var F=this.attributes,B=F.handleIconSize,K=F.width,dt=F.height;return B||Math.floor((this.getOrientVal([+dt,+K])+4)/2.4)},j.prototype.getOrientVal=function(F){var B=(0,l.CR)(F,2),K=B[0],dt=B[1],St=this.attributes.orientation;return St==="horizontal"?K:dt},j.prototype.setValuesOffset=function(F,B){B===void 0&&(B=0);var K=this.attributes.type,dt=(0,l.CR)(this.getValues(),2),St=dt[0],Et=dt[1],Zt=K==="range"?F:0,ce=[St+Zt,Et+B].sort();this.innerSetValues(ce,!0)},j.prototype.getRatio=function(F){var B=this.availableSpace,K=B.width,dt=B.height;return F/this.getOrientVal([K,dt])},j.prototype.dispatchCustomEvent=function(F,B,K){var dt=this;F.on(B,function(St){St.stopPropagation(),dt.dispatchEvent(new _.Aw(K,{detail:St}))})},j.prototype.bindEvents=function(){this.addEventListener("wheel",this.onScroll);var F=this.brushArea;this.dispatchCustomEvent(F,"click","trackClick"),this.dispatchCustomEvent(F,"pointerenter","trackMouseenter"),this.dispatchCustomEvent(F,"pointerleave","trackMouseleave"),F.on("pointerdown",this.onDragStart("track"))},j.prototype.onScroll=function(F){var B=this.attributes.scrollable;if(B){var K=F.deltaX,dt=F.deltaY,St=dt||K,Et=this.getRatio(St);this.setValuesOffset(Et,Et)}},j.tag="slider",j}(O.w),_o=d(92387),Es={backgroundFill:"#262626",backgroundLineCap:"round",backgroundLineWidth:1,backgroundStroke:"#333",backgroundZIndex:-1,formatter:function(W){return W.toString()},labelFill:"#fff",labelFontSize:12,labelTextBaseline:"middle",padding:[2,4],position:"right",radius:0,zIndex:999},Ko=(0,Xt.A)({background:"background",labelGroup:"label-group",label:"label"},"indicator"),rl=function(W){(0,l.ZT)(j,W);function j(F){var B=W.call(this,F,Es)||this;return B.point=[0,0],B.group=B.appendChild(new _.ZA({})),B.isMutationObserved=!0,B}return j.prototype.renderBackground=function(){if(this.label){var F=this.attributes,B=F.position,K=F.padding,dt=(0,l.CR)((0,z.j)(K),4),St=dt[0],Et=dt[1],Zt=dt[2],ce=dt[3],Ae=this.label.node().getLocalBounds(),Le=Ae.min,$e=Ae.max,Xe=new P.b(Le[0]-ce,Le[1]-St,$e[0]+Et-Le[0]+ce,$e[1]+Zt-Le[1]+St),an=this.getPath(B,Xe),bn=(0,b.zs)(this.attributes,"background");this.background=(0,Nt.Ys)(this.group).maybeAppendByClassName(Ko.background,"path").styles((0,l.pi)((0,l.pi)({},bn),{d:an})),this.group.appendChild(this.label.node())}},j.prototype.renderLabel=function(){var F=this.attributes,B=F.formatter,K=F.labelText,dt=(0,b.zs)(this.attributes,"label"),St=(0,l.CR)((0,b.Hm)(dt),2),Et=St[0],Zt=St[1],ce=Et.text,Ae=(0,l._T)(Et,["text"]);if(this.label=(0,Nt.Ys)(this.group).maybeAppendByClassName(Ko.labelGroup,"g").styles(Zt),!!K){var Le=this.label.maybeAppendByClassName(Ko.label,function(){return(0,Ce.S)(B(K))}).style("text",B(K).toString());Le.selectAll("text").styles(Ae)}},j.prototype.adjustLayout=function(){var F=(0,l.CR)(this.point,2),B=F[0],K=F[1],dt=this.attributes,St=dt.x,Et=dt.y;this.group.attr("transform","translate(".concat(St-B,", ").concat(Et-K,")"))},j.prototype.getPath=function(F,B){var K=this.attributes.radius,dt=B.x,St=B.y,Et=B.width,Zt=B.height,ce=[["M",dt+K,St],["L",dt+Et-K,St],["A",K,K,0,0,1,dt+Et,St+K],["L",dt+Et,St+Zt-K],["A",K,K,0,0,1,dt+Et-K,St+Zt],["L",dt+K,St+Zt],["A",K,K,0,0,1,dt,St+Zt-K],["L",dt,St+K],["A",K,K,0,0,1,dt+K,St],["Z"]],Ae={top:4,right:6,bottom:0,left:2},Le=Ae[F],$e=this.createCorner([ce[Le].slice(-2),ce[Le+1].slice(-2)]);return ce.splice.apply(ce,(0,l.ev)([Le+1,1],(0,l.CR)($e),!1)),ce[0][0]="M",ce},j.prototype.createCorner=function(F,B){B===void 0&&(B=10);var K=.8,dt=Ee.wE.apply(void 0,(0,l.ev)([],(0,l.CR)(F),!1)),St=(0,l.CR)(F,2),Et=(0,l.CR)(St[0],2),Zt=Et[0],ce=Et[1],Ae=(0,l.CR)(St[1],2),Le=Ae[0],$e=Ae[1],Xe=(0,l.CR)(dt?[Le-Zt,[Zt,Le]]:[$e-ce,[ce,$e]],2),an=Xe[0],bn=(0,l.CR)(Xe[1],2),xn=bn[0],Dn=bn[1],Fn=an/2,On=an/Math.abs(an),Yn=B*On,nr=Yn/2,sr=Yn*Math.sqrt(3)/2*K,xr=(0,l.CR)([xn,xn+Fn-nr,xn+Fn,xn+Fn+nr,Dn],5),Wr=xr[0],ei=xr[1],Ti=xr[2],Gi=xr[3],Ei=xr[4];return dt?(this.point=[Ti,ce-sr],[["L",Wr,ce],["L",ei,ce],["L",Ti,ce-sr],["L",Gi,ce],["L",Ei,ce]]):(this.point=[Zt+sr,Ti],[["L",Zt,Wr],["L",Zt,ei],["L",Zt+sr,Ti],["L",Zt,Gi],["L",Zt,Ei]])},j.prototype.applyVisibility=function(){var F=this.attributes.visibility;F==="hidden"?(0,sn.Cp)(this):(0,sn.$Z)(this)},j.prototype.bindEvents=function(){this.label.on(_.Dk.BOUNDS_CHANGED,this.renderBackground)},j.prototype.render=function(){this.renderLabel(),this.renderBackground(),this.adjustLayout(),this.applyVisibility()},j}(O.w),jt=function(W){(0,l.ZT)(j,W);function j(F){var B=W.call(this,(0,g.n)({},j.defaultOptions,F))||this;return B.hoverColor="#f5f5f5",B.selectedColor="#e6f7ff",B.background=B.appendChild(new _.UL({})),B.label=B.background.appendChild(new _.ZA({})),B}return Object.defineProperty(j.prototype,"padding",{get:function(){return(0,z.j)(this.style.padding)},enumerable:!1,configurable:!0}),j.prototype.renderLabel=function(){var F=this.style,B=F.label,K=F.value,dt=(0,b.zs)(this.attributes,"label");(0,Nt.Ys)(this.label).maybeAppend(".label",function(){return(0,Ce.S)(B)}).attr("className","label").styles(dt),this.label.attr("__data__",K)},j.prototype.renderBackground=function(){var F=this.label.getBBox(),B=(0,l.CR)(this.padding,4),K=B[0],dt=B[1],St=B[2],Et=B[3],Zt=F.width,ce=F.height,Ae=Zt+Et+dt,Le=ce+K+St,$e=(0,b.zs)(this.attributes,"background"),Xe=this.style,an=Xe.width,bn=an===void 0?0:an,xn=Xe.height,Dn=xn===void 0?0:xn,Fn=Xe.selected;this.background.attr((0,l.pi)((0,l.pi)({},$e),{width:Math.max(Ae,bn),height:Math.max(Le,Dn),fill:Fn?this.selectedColor:"#fff"})),this.label.attr({transform:"translate(".concat(Et,", ").concat((Le-ce)/2,")")})},j.prototype.render=function(){this.renderLabel(),this.renderBackground()},j.prototype.bindEvents=function(){var F=this;this.addEventListener("pointerenter",function(){F.style.selected||F.background.attr("fill",F.hoverColor)}),this.addEventListener("pointerleave",function(){F.style.selected||F.background.attr("fill",F.style.backgroundFill)});var B=this;this.addEventListener("click",function(){var K=F.style,dt=K.label,St=K.value,Et=K.onClick;Et==null||Et(St,{label:dt,value:St},B)})},j.defaultOptions={style:{value:"",label:"",cursor:"pointer"}},j}(O.w),it=function(W){(0,l.ZT)(j,W);function j(F){var B,K,dt=W.call(this,(0,g.n)({},j.defaultOptions,F))||this;dt.currentValue=(B=j.defaultOptions.style)===null||B===void 0?void 0:B.defaultValue,dt.isPointerInSelect=!1,dt.select=dt.appendChild(new _.UL({className:"select",style:{cursor:"pointer",width:0,height:0}})),dt.dropdown=dt.appendChild(new _.UL({className:"dropdown"}));var St=dt.style.defaultValue;return St&&(!((K=dt.style.options)===null||K===void 0)&&K.some(function(Et){return Et.value===St}))&&(dt.currentValue=St),dt}return j.prototype.setValue=function(F){this.currentValue=F,this.render()},j.prototype.getValue=function(){return this.currentValue},Object.defineProperty(j.prototype,"dropdownPadding",{get:function(){return(0,z.j)(this.style.dropdownPadding)},enumerable:!1,configurable:!0}),j.prototype.renderSelect=function(){var F=this,B,K=this.style,dt=K.x,St=K.y,Et=K.width,Zt=K.height,ce=K.bordered,Ae=K.showDropdownIcon,Le=(0,b.zs)(this.attributes,"select"),$e=(0,b.zs)(this.attributes,"placeholder");this.select.attr((0,l.pi)((0,l.pi)({x:dt,y:St,width:Et,height:Zt},Le),{fill:"#fff",strokeWidth:ce?1:0}));var Xe=this.dropdownPadding,an=10;Ae&&(0,Nt.Ys)(this.select).maybeAppend(".dropdown-icon","path").style("d","M-5,-3.5 L0,3.5 L5,-3.5").style("transform","translate(".concat(dt+Et-an-Xe[1]-Xe[3],", ").concat(St+Zt/2,")")).style("lineWidth",1).style("stroke",this.select.style.stroke);var bn=(B=this.style.options)===null||B===void 0?void 0:B.find(function(On){return On.value===F.currentValue}),xn=(0,l.pi)({x:dt+Xe[3]},$e);(0,Nt.Ys)(this.select).selectAll(".placeholder").data(bn?[]:[1]).join(function(On){return On.append("text").attr("className","placeholder").styles(xn).style("y",function(){var Yn=this.getBBox();return St+(Zt-Yn.height)/2})},function(On){return On.styles(xn)},function(On){return On.remove()});var Dn=(0,b.zs)(this.attributes,"optionLabel"),Fn=(0,l.pi)({x:dt+Xe[3]},Dn);(0,Nt.Ys)(this.select).selectAll(".value").data(bn?[bn]:[]).join(function(On){return On.append(function(Yn){return(0,Ce.S)(Yn.label)}).attr("className","value").styles(Fn).style("y",function(){var Yn=this.getBBox();return St+(Zt-Yn.height)/2})},function(On){return On.styles(Fn)},function(On){return On.remove()})},j.prototype.renderDropdown=function(){var F=this,B,K,dt=this.style,St=dt.x,Et=dt.y,Zt=dt.width,ce=dt.height,Ae=dt.options,Le=dt.onSelect,$e=dt.open,Xe=(0,b.zs)(this.attributes,"dropdown"),an=(0,b.zs)(this.attributes,"option"),bn=this.dropdownPadding;(0,Nt.Ys)(this.dropdown).maybeAppend(".dropdown-container","g").attr("className","dropdown-container").selectAll(".dropdown-item").data(Ae,function(Fn){return Fn.value}).join(function(Fn){return Fn.append(function(On){return new jt({className:"dropdown-item",style:(0,l.pi)((0,l.pi)((0,l.pi)({},On),an),{width:Zt-bn[1]-bn[3],selected:On.value===F.currentValue,onClick:function(Yn,nr,sr){F.setValue(Yn),Le==null||Le(Yn,nr,sr),F.dispatchEvent(new _.Aw("change",{detail:{value:Yn,option:nr,item:sr}})),(0,sn.Cp)(F.dropdown)}})})}).each(function(On,Yn){var nr,sr=(nr=this.parentNode)===null||nr===void 0?void 0:nr.children,xr=sr.reduce(function(Wr,ei,Ti){return Ti<Yn&&(Wr+=ei.getBBox().height),Wr},0);this.attr("transform","translate(".concat(bn[3],", ").concat(bn[0]+xr,")"))})},function(Fn){return Fn.update(function(On){return{selected:On.value===F.currentValue}})},function(Fn){return Fn.remove()});var xn=(K=(B=this.dropdown.getElementsByClassName("dropdown-container"))===null||B===void 0?void 0:B[0])===null||K===void 0?void 0:K.getBBox(),Dn=Xe.spacing;this.dropdown.attr((0,l.pi)({transform:"translate(".concat(St,", ").concat(Et+ce+Dn,")"),width:xn.width+bn[1]+bn[3],height:xn.height+bn[0]+bn[2]},Xe)),!$e&&(0,sn.Cp)(this.dropdown)},j.prototype.render=function(){this.renderSelect(),this.renderDropdown()},j.prototype.bindEvents=function(){var F=this;this.addEventListener("click",function(B){B.stopPropagation()}),this.select.addEventListener("click",function(){F.dropdown.style.visibility==="visible"?(0,sn.Cp)(F.dropdown):(0,sn.$Z)(F.dropdown)}),this.addEventListener("pointerenter",function(){F.isPointerInSelect=!0}),this.addEventListener("pointerleave",function(){F.isPointerInSelect=!1}),document==null||document.addEventListener("click",function(){F.isPointerInSelect||(0,sn.Cp)(F.dropdown)})},j.defaultOptions={style:{x:0,y:0,width:140,height:32,options:[],bordered:!0,defaultValue:"",selectRadius:8,selectStroke:"#d9d9d9",showDropdownIcon:!0,placeholderText:"\u8BF7\u9009\u62E9",placeholderFontSize:12,placeholderTextBaseline:"top",placeholderFill:"#c2c2c2",dropdownFill:"#fff",dropdownStroke:"#d9d9d9",dropdownRadius:8,dropdownShadowBlur:4,dropdownShadowColor:"rgba(0, 0, 0, 0.08)",dropdownPadding:8,dropdownSpacing:10,optionPadding:[8,12],optionFontSize:12,optionTextBaseline:"top",optionBackgroundFill:"#fff",optionBackgroundRadius:4,optionLabelFontSize:12,optionLabelTextBaseline:"top"}},j}(O.w),ft=function(W){(0,l.ZT)(j,W);function j(F){var B=W.call(this,(0,g.n)({},{style:{backgroundOpacity:j.backgroundOpacities.default}},j.defaultOptions,F))||this;return B.showBackground=!0,B.background=B.appendChild(new _.UL({})),B.icon=B.appendChild(new _.ZA({})),B}return Object.defineProperty(j.prototype,"label",{get:function(){return"BaseIcon"},enumerable:!1,configurable:!0}),Object.defineProperty(j.prototype,"lineWidth",{get:function(){return Math.log10(this.attributes.size)},enumerable:!1,configurable:!0}),Object.defineProperty(j.prototype,"padding",{get:function(){return(0,z.j)(this.attributes.size/5)},enumerable:!1,configurable:!0}),Object.defineProperty(j.prototype,"iconSize",{get:function(){var F=this.attributes.size,B=(0,l.CR)(this.padding,4),K=B[0],dt=B[1],St=B[2],Et=B[3];return Math.max(F-Math.max(Et+dt,K+St),this.lineWidth*2+1)},enumerable:!1,configurable:!0}),j.prototype.renderBackground=function(){var F=this.attributes,B=F.x,K=F.y,dt=F.size,St=dt/2,Et=(0,b.zs)(this.attributes,"background");this.background.attr((0,l.pi)({x:B-St,y:K-St,width:dt,height:dt},Et))},j.prototype.showIndicator=function(){if(this.label){var F=this.attributes.size,B=this.background.getBBox(),K=B.x,dt=B.y;this.indicator.update({x:K+F/2,y:dt-5,labelText:this.label,visibility:"visible"})}},j.prototype.hideIndicator=function(){this.indicator.update({visibility:"hidden"})},j.prototype.connectedCallback=function(){var F;W.prototype.connectedCallback.call(this);var B=this.attributes.size,K=this.background.getBBox(),dt=K.x,St=K.y,Et=(F=this.ownerDocument)===null||F===void 0?void 0:F.defaultView;Et&&(this.indicator=Et.appendChild(new rl({style:{x:dt+B/2,y:St-B/2,visibility:"hidden",position:"top",radius:3,zIndex:100}})))},j.prototype.disconnectedCallback=function(){this.indicator.destroy()},j.prototype.render=function(){this.renderIcon(),this.showBackground&&this.renderBackground()},j.prototype.bindEvents=function(){var F=this,B=this.attributes.onClick;if(this.addEventListener("click",function(){B==null||B(F)}),this.showBackground){var K=function(){return F.background.attr({opacity:j.backgroundOpacities.default})},dt=function(){return F.background.attr({opacity:j.backgroundOpacities.hover})},St=function(){return F.background.attr({opacity:j.backgroundOpacities.active})};this.addEventListener("pointerenter",function(){dt(),F.showIndicator()}),this.addEventListener("pointerleave",function(){K(),F.hideIndicator()}),this.addEventListener("pointerdown",function(){St()}),this.addEventListener("pointerup",function(){K()})}},j.tag="IconBase",j.defaultOptions={style:{x:0,y:0,size:10,color:"#565758",backgroundRadius:4,backgroundFill:"#e2e2e2"}},j.backgroundOpacities={default:0,hover:.8,active:1},j}(O.w),Ft=function(W,j){return j===void 0&&(j="#565758"),new _.y$({style:{fill:j,d:"M ".concat(W,",").concat(W," L -").concat(W,",0 L ").concat(W,",-").concat(W," Z"),transformOrigin:"center"}})},de=function(W){(0,l.ZT)(j,W);function j(){return W!==null&&W.apply(this,arguments)||this}return j.prototype.arcPath=function(F,B,K){var dt=(0,l.CR)([K,K],2),St=dt[0],Et=dt[1],Zt=function(bn){return[F+K*Math.cos(bn),B+K*Math.sin(bn)]},ce=(0,l.CR)(Zt(-5/4*Math.PI),2),Ae=ce[0],Le=ce[1],$e=(0,l.CR)(Zt(1/4*Math.PI),2),Xe=$e[0],an=$e[1];return"M".concat(Ae,",").concat(Le,",A").concat(St,",").concat(Et,",0,1,1,").concat(Xe,",").concat(an)},Object.defineProperty(j.prototype,"label",{get:function(){return"\u91CD\u7F6E"},enumerable:!1,configurable:!0}),j.prototype.renderIcon=function(){var F=this.attributes,B=F.x,K=F.y,dt=F.color,St=this.iconSize,Et=this.lineWidth,Zt=Et+.5;(0,Nt.Ys)(this.icon).maybeAppend(".reset","path").styles({stroke:dt,lineWidth:Et,d:this.arcPath(B,K,St/2-Et),markerStart:Ft(Zt,dt)})},j}(ft),ye=function(W){(0,l.ZT)(j,W);function j(){return W!==null&&W.apply(this,arguments)||this}return Object.defineProperty(j.prototype,"label",{get:function(){return"\u5FEB\u9000"},enumerable:!1,configurable:!0}),j.prototype.renderIcon=function(){var F=this.attributes,B=F.x,K=F.y,dt=F.color,St=this.iconSize,Et=St/2,Zt=St/2/Math.pow(3,.5),ce=[[B,K],[B,K-Zt],[B-Et,K],[B,K+Zt],[B,K],[B+Et,K-Zt],[B+Et,K+Zt],[B,K]];(0,Nt.Ys)(this.icon).maybeAppend(".backward","polygon").styles({points:ce,fill:dt})},j}(ft),Se=function(W){(0,l.ZT)(j,W);function j(){return W!==null&&W.apply(this,arguments)||this}return Object.defineProperty(j.prototype,"label",{get:function(){return"\u5FEB\u8FDB"},enumerable:!1,configurable:!0}),j.prototype.renderIcon=function(){var F=this.attributes,B=F.x,K=F.y,dt=F.color,St=this.iconSize,Et=St/2,Zt=St/2/Math.pow(3,.5),ce=[[B,K],[B,K-Zt],[B+Et,K],[B,K+Zt],[B,K],[B-Et,K-Zt],[B-Et,K+Zt],[B,K]];(0,Nt.Ys)(this.icon).maybeAppend(".forward","polygon").styles({points:ce,fill:dt})},j}(ft),Ue=function(W){(0,l.ZT)(j,W);function j(){return W!==null&&W.apply(this,arguments)||this}return Object.defineProperty(j.prototype,"label",{get:function(){return"\u64AD\u653E"},enumerable:!1,configurable:!0}),j.prototype.renderIcon=function(){var F=this.attributes,B=F.x,K=F.y,dt=F.color,St=this.iconSize,Et=St/3*Math.pow(3,.5)*.8,Zt=[[B+Et,K],[B-Et/2,K-St/2*.8],[B-Et/2,K+St/2*.8],[B+Et,K]];(0,Nt.Ys)(this.icon).maybeAppend(".play","polygon").styles({points:Zt,fill:dt})},j}(ft),Je=function(W){(0,l.ZT)(j,W);function j(){return W!==null&&W.apply(this,arguments)||this}return Object.defineProperty(j.prototype,"label",{get:function(){return"\u6682\u505C"},enumerable:!1,configurable:!0}),j.prototype.renderIcon=function(){var F=this.attributes,B=F.x,K=F.y,dt=F.color,St=this.iconSize,Et=St/3,Zt=[[B-Et,K-St/2],[B-Et,K+St/2],[B-Et/2,K+St/2],[B-Et/2,K-St/2],[B-Et,K-St/2],[B+Et/2,K-St/2],[B+Et/2,K+St/2],[B+Et,K+St/2],[B+Et,K-St/2]];(0,Nt.Ys)(this.icon).maybeAppend(".pause","polygon").styles({points:Zt,fill:dt})},j}(ft),dn=function(W){(0,l.ZT)(j,W);function j(){return W!==null&&W.apply(this,arguments)||this}return Object.defineProperty(j.prototype,"label",{get:function(){return"\u8303\u56F4\u65F6\u95F4"},enumerable:!1,configurable:!0}),j.prototype.renderIcon=function(){var F=this.attributes,B=F.x,K=F.y,dt=F.color,St=this,Et=St.iconSize,Zt=St.lineWidth,ce=Zt;(0,Nt.Ys)(this.icon).maybeAppend(".left-line","line").styles({x1:B-Et/2,y1:K-Et/2,x2:B-Et/2,y2:K+Et/2,stroke:dt,lineWidth:Zt}),(0,Nt.Ys)(this.icon).maybeAppend(".right-line","line").styles({x1:B+Et/2,y1:K-Et/2,x2:B+Et/2,y2:K+Et/2,stroke:dt,lineWidth:Zt}),(0,Nt.Ys)(this.icon).maybeAppend(".left-arrow","line").styles({x1:B,y1:K,x2:B-Et/2+ce*2,y2:K,stroke:dt,lineWidth:Zt,markerEnd:Ft(Zt*2,dt)}),(0,Nt.Ys)(this.icon).maybeAppend(".right-arrow","line").styles({x1:B,y1:K,x2:B+Et/2-ce*2,y2:K,stroke:dt,lineWidth:Zt,markerEnd:Ft(Zt*2,dt)})},j}(ft),vn=function(W){(0,l.ZT)(j,W);function j(){return W!==null&&W.apply(this,arguments)||this}return Object.defineProperty(j.prototype,"label",{get:function(){return"\u5355\u4E00\u65F6\u95F4"},enumerable:!1,configurable:!0}),j.prototype.renderIcon=function(){var F=this.attributes,B=F.x,K=F.y,dt=F.color,St=this,Et=St.iconSize,Zt=St.lineWidth;(0,Nt.Ys)(this.icon).maybeAppend(".line","line").styles({x1:B,y1:K-Et/2,x2:B,y2:K+Et/2,stroke:dt,lineWidth:Zt});var ce=Zt;(0,Nt.Ys)(this.icon).maybeAppend(".left-arrow","line").styles({x1:B-Et/2-ce*2,y1:K,x2:B-ce*2,y2:K,stroke:dt,lineWidth:Zt,markerEnd:Ft(Zt*2,dt)}),(0,Nt.Ys)(this.icon).maybeAppend(".right-arrow","line").styles({x1:B+Et/2+ce*2,y1:K,x2:B+ce*2,y2:K,stroke:dt,lineWidth:Zt,markerEnd:Ft(Zt*2,dt)})},j}(ft),cn=function(W){return[[-W/2,-W/2],[-W/2,W/2],[W/2,W/2]]},Nn=function(W){(0,l.ZT)(j,W);function j(){return W!==null&&W.apply(this,arguments)||this}return Object.defineProperty(j.prototype,"label",{get:function(){return"\u6298\u7EBF\u56FE"},enumerable:!1,configurable:!0}),j.prototype.renderIcon=function(){var F=this.attributes,B=F.x,K=F.y,dt=F.color,St=this,Et=St.iconSize,Zt=St.lineWidth,ce=Zt,Ae=(Et-ce*2-Zt)/4,Le=(Et-ce*2-Zt)/2,$e=(0,l.CR)([B-Et/2+ce,K+Et/2-ce*2],2),Xe=$e[0],an=$e[1];(0,Nt.Ys)(this.icon).maybeAppend(".coordinate","polyline").styles({points:cn(Et).map(function(bn){var xn=(0,l.CR)(bn,2),Dn=xn[0],Fn=xn[1];return[Dn+B,Fn+K]}),stroke:dt,lineWidth:Zt}),(0,Nt.Ys)(this.icon).maybeAppend(".line","polyline").styles({points:[[Xe,an],[Xe+Ae,an-Le],[Xe+Ae*2,an],[Xe+Ae*4,an-Le*2]],stroke:dt,lineWidth:Zt})},j}(ft),Mn=function(W){(0,l.ZT)(j,W);function j(){return W!==null&&W.apply(this,arguments)||this}return Object.defineProperty(j.prototype,"label",{get:function(){return"\u6761\u5F62\u56FE"},enumerable:!1,configurable:!0}),Object.defineProperty(j.prototype,"data",{get:function(){return[1,4,2,4,3]},enumerable:!1,configurable:!0}),j.prototype.renderIcon=function(){var F=this.data,B=this.attributes,K=B.x,dt=B.y,St=B.color,Et=this,Zt=Et.iconSize,ce=Et.lineWidth,Ae=ce,Le=(Zt-Ae)/F.length,$e=(Zt-Ae*2)/4,Xe=(0,l.CR)([K-Zt/2+Ae*2,dt+Zt/2-Ae],2),an=Xe[0],bn=Xe[1];(0,Nt.Ys)(this.icon).maybeAppend(".coordinate","polyline").styles({points:cn(Zt).map(function(xn){var Dn=(0,l.CR)(xn,2),Fn=Dn[0],On=Dn[1];return[Fn+K,On+dt]}),stroke:St,lineWidth:ce}),(0,Nt.Ys)(this.icon).maybeAppend(".bars","g").selectAll(".column").data(this.data.map(function(xn,Dn){return{value:xn,index:Dn}})).join(function(xn){return xn.append("line").attr("className","column").style("x1",function(Dn){var Fn=Dn.index;return an+Le*Fn}).style("y1",bn).style("x2",function(Dn){var Fn=Dn.index;return an+Le*Fn}).style("y2",function(Dn){var Fn=Dn.value;return bn-$e*Fn}).styles({y1:bn,stroke:St,lineWidth:ce})})},j}(ft),zn=function(W){(0,l.ZT)(j,W);function j(F){var B=W.call(this,(0,g.n)({},{style:{color:"#d8d9d9"}},F))||this;return B.showBackground=!1,B}return j.prototype.renderIcon=function(){var F=this.attributes,B=F.x,K=F.y,dt=F.color,St=this,Et=St.iconSize,Zt=St.lineWidth;(0,Nt.Ys)(this.icon).maybeAppend(".split","line").styles({x1:B,y1:K-Et/2,x2:B,y2:K+Et/2,stroke:dt,lineWidth:Zt})},j}(ft),Gn=function(W){(0,l.ZT)(j,W);function j(){var F=W.apply(this,(0,l.ev)([],(0,l.CR)(arguments),!1))||this;return F.showBackground=!1,F}return Object.defineProperty(j.prototype,"padding",{get:function(){return(0,z.j)(0)},enumerable:!1,configurable:!0}),j.prototype.renderIcon=function(){var F=this.iconSize,B=this.attributes,K=B.x,dt=B.y,St=B.speed,Et=St===void 0?1:St,Zt=(0,_o.Z)(this.attributes,["x","y","transform","transformOrigin","width","height","size","color","speed"]),ce=(0,R.Z)(F,20,1/0),Ae=20,Le=(0,l.pi)((0,l.pi)({},Zt),{x:K-ce/2,y:dt-Ae/2,width:ce,height:Ae,defaultValue:Et,bordered:!1,showDropdownIcon:!1,selectRadius:2,dropdownPadding:this.padding,dropdownRadius:2,dropdownSpacing:F/5,placeholderFontSize:F/2,optionPadding:0,optionLabelFontSize:F/2,optionBackgroundRadius:1,options:[{label:"1x",value:1},{label:"1.5x",value:1.5},{label:"2x",value:2}]});(0,Nt.Ys)(this.icon).maybeAppend(".speed",function(){return new it({style:Le})}).attr("className","speed").each(function(){this.update(Le)})},j.tag="SpeedSelect",j}(ft),jn=function(W){(0,l.ZT)(j,W);function j(F){var B=W.call(this,F)||this;return B.icon=B.appendChild(new _.ZA({})),B.currentType=B.attributes.type,B}return j.prototype.getType=function(){return this.currentType},j.prototype.render=function(){var F=this,B=this.attributes,K=B.onChange,dt=(0,l._T)(B,["onChange"]);(0,Nt.Ys)(this.icon).selectAll(".icon").data([this.currentType]).join(function(St){return St.append(function(Et){var Zt,ce=(Zt=F.toggles.find(function(Ae){var Le=(0,l.CR)(Ae,1),$e=Le[0];return $e===Et}))===null||Zt===void 0?void 0:Zt[1];if(!ce)throw new Error("Invalid type: ".concat(Et));return new ce({})}).attr("className","icon").styles(dt,!1).update({})},function(St){return St.styles({restStyles:dt}).update({})},function(St){return St.remove()})},j.prototype.bindEvents=function(){var F=this,B=this.attributes.onChange;this.addEventListener("click",function(K){K.preventDefault(),K.stopPropagation();var dt=(F.toggles.findIndex(function(Et){var Zt=(0,l.CR)(Et,1),ce=Zt[0];return ce===F.currentType})+1)%F.toggles.length,St=F.toggles[dt][0];B==null||B(F.currentType),F.currentType=St,F.render()})},j.tag="ToggleIcon",j}(O.w),tr=function(W){(0,l.ZT)(j,W);function j(F){var B=W.call(this,(0,g.n)({},{style:{type:"play"}},F))||this;return B.toggles=[["play",Ue],["pause",Je]],B}return j}(jn),ur=function(W){(0,l.ZT)(j,W);function j(F){var B=W.call(this,(0,g.n)({},{style:{type:"range"}},F))||this;return B.toggles=[["range",dn],["value",vn]],B}return j}(jn),gr=function(W){(0,l.ZT)(j,W);function j(F){var B=W.call(this,(0,g.n)({},{style:{type:"column"}},F))||this;return B.toggles=[["line",Nn],["column",Mn]],B}return j}(jn),Nr={reset:de,speed:Gn,backward:ye,playPause:tr,forward:Se,selectionType:ur,chartType:gr,split:zn},kr=function(W){(0,l.ZT)(j,W);function j(F){var B=W.call(this,(0,g.n)({},j.defaultOptions,F))||this;return B.background=B.appendChild(new _.UL({})),B.functions=B.appendChild(new _.ZA({})),B}return Object.defineProperty(j.prototype,"padding",{get:function(){return(0,z.j)(this.attributes.padding)},enumerable:!1,configurable:!0}),j.prototype.renderBackground=function(){var F=this.style,B=F.x,K=F.y,dt=F.width,St=F.height,Et=(0,b.zs)(this.attributes,"background");this.background.attr((0,l.pi)({x:B,y:K,width:dt,height:St},Et))},j.prototype.renderFunctions=function(){var F=this,B,K=this.attributes,dt=K.functions,St=K.iconSize,Et=K.iconSpacing,Zt=K.x,ce=K.y,Ae=K.width,Le=K.height,$e=K.align,Xe=(0,l.CR)(this.padding,4),an=Xe[1],bn=Xe[3],xn=dt.reduce(function(On,Yn){return On.length&&Yn.length?On.concat.apply(On,(0,l.ev)(["split"],(0,l.CR)(Yn),!1)):On.concat.apply(On,(0,l.ev)([],(0,l.CR)(Yn),!1))},[]),Dn=xn.length*(St+Et)-Et,Fn={left:bn+St/2,center:(Ae-Dn)/2+St/2,right:Ae-Dn-bn-an+St/2}[$e]||0;(B=this.speedSelect)===null||B===void 0||B.destroy(),this.functions.removeChildren(),xn.forEach(function(On,Yn){var nr,sr=Nr[On],xr={x:Zt+Yn*(St+Et)+Fn,y:ce+Le/2,size:St};if(sr===Gn?(xr.speed=F.attributes.speed,xr.onSelect=function(ei){return F.handleFunctionChange(On,{value:ei})}):[tr,ur,gr].includes(sr)?(xr.onChange=function(ei){return F.handleFunctionChange(On,{value:ei})},sr===tr&&(xr.type=F.attributes.state==="play"?"pause":"play"),sr===ur&&(xr.type=F.attributes.selectionType==="range"?"value":"range"),sr===gr&&(xr.type=F.attributes.chartType==="line"?"column":"line")):xr.onClick=function(){return F.handleFunctionChange(On,{value:On})},sr===Gn){var Wr=(nr=F.ownerDocument)===null||nr===void 0?void 0:nr.defaultView;Wr&&(F.speedSelect=new sr({style:(0,l.pi)((0,l.pi)({},xr),{zIndex:100})}),Wr.appendChild(F.speedSelect))}else F.functions.appendChild(new sr({style:xr}))})},j.prototype.disconnectedCallback=function(){var F;W.prototype.disconnectedCallback.call(this),(F=this.speedSelect)===null||F===void 0||F.destroy()},j.prototype.render=function(){this.renderBackground(),this.renderFunctions()},j.prototype.handleFunctionChange=function(F,B){var K=this.attributes.onChange;K==null||K(F,B)},j.defaultOptions={style:{x:0,y:0,width:300,height:40,padding:0,align:"center",iconSize:25,iconSpacing:0,speed:1,state:"pause",chartType:"line",selectionType:"range",backgroundFill:"#fbfdff",backgroundStroke:"#ebedf0",functions:[["reset","speed"],["backward","playPause","forward"],["selectionType","chartType"]]}},j}(O.w),Rr=function(W){(0,l.ZT)(j,W);function j(F){var B=W.call(this,(0,g.n)({},j.defaultOptions,F))||this;return B.bindEvents(),B}return j.prototype.bindEvents=function(){var F=this;this.addEventListener("mouseenter",function(){F.attr("lineWidth",Math.ceil(+(F.style.r||0)/2))}),this.addEventListener("mouseleave",function(){F.attr("lineWidth",0)})},j.defaultOptions={style:{r:5,fill:"#3f7cf7",lineWidth:0,stroke:"#3f7cf7",strokeOpacity:.5,cursor:"pointer"}},j}(_.Cd),li=function(W){(0,l.ZT)(j,W);function j(F){return W.call(this,(0,g.n)({},j.defaultOptions,F))||this}return j.prototype.renderBackground=function(){var F=this.attributes,B=F.x,K=F.y,dt=F.width,St=F.height,Et=(0,b.zs)(this.attributes,"background");(0,Nt.Ys)(this).maybeAppend("background","rect").attr("className","background").styles((0,l.pi)({x:B-dt/2,y:K-St/2,width:dt,height:St},Et))},j.prototype.renderIcon=function(){var F=this.attributes,B=F.x,K=F.y,dt=F.iconSize,St=(0,b.zs)(this.attributes,"icon"),Et=1,Zt=dt/2;(0,Nt.Ys)(this).maybeAppend("icon-left-line","line").attr("className","icon-left-line").styles((0,l.pi)({x1:B-Et,y1:K-Zt,x2:B-Et,y2:K+Zt},St)),(0,Nt.Ys)(this).maybeAppend("icon-right-line","line").attr("className","icon-right-line").styles((0,l.pi)({x1:B+Et,y1:K-Zt,x2:B+Et,y2:K+Zt},St))},j.prototype.renderBorder=function(){var F=this.attributes,B=F.x,K=F.y,dt=F.width,St=F.height,Et=F.type,Zt=(0,b.zs)(this.attributes,"border"),ce=Et==="start"?+dt/2:-dt/2;(0,Nt.Ys)(this).maybeAppend("border","line").attr("className","border").styles((0,l.pi)({x1:ce+B,y1:K-St/2,x2:ce+B,y2:K+St/2},Zt))},j.prototype.render=function(){this.renderBackground(),this.renderIcon(),this.renderBorder()},j.defaultOptions={style:{x:0,y:0,width:10,height:50,iconSize:10,type:"start",backgroundFill:"#fff",backgroundFillOpacity:.5,iconStroke:"#9a9a9a",iconLineWidth:1,borderStroke:"#e8e8e8",borderLineWidth:1}},j}(O.w);function Qr(W,j){return typeof W=="number"?vi(W):ti(W,j)}function ti(W,j){var F=new Date(W);switch(j){case"half-hour":case"hour":case"four-hour":return[0,6,12,18].includes(F.getHours())&&F.getMinutes()===0?N(F,`HH:mm
|
|
|
YYYY-MM-DD`):N(F,"HH:mm");case"half-day":return F.getHours()<12?`AM
|
|
|
`.concat(N(F,"YYYY-MM-DD")):"PM";case"day":return[1,10,20].includes(F.getDate())?N(F,`DD
|
|
|
YYYY-MM`):N(F,"DD");case"week":return F.getDate()<=7?N(F,`DD
|
|
|
YYYY-MM`):N(F,"DD");case"month":return[0,6].includes(F.getMonth())?N(F,`MM\u6708
|
|
|
YYYY`):N(F,"MM\u6708");case"season":return[0].includes(F.getMonth())?N(F,`MM\u6708
|
|
|
YYYY`):N(F,"MM\u6708");case"year":return N(F,"YYYY");default:return N(F,"YYYY-MM-DD HH:mm")}}function vi(W){var j=String(Math.floor(W/3600)).padStart(2,"0"),F=String(Math.floor(W%3600/60)).padStart(2,"0"),B=String(Math.floor(W%60)).padStart(2,"0");return W<3600?"".concat(F,":").concat(B):"".concat(j,":").concat(F,":").concat(B)}var ci=function(W){(0,l.ZT)(j,W);function j(F){var B=W.call(this,(0,g.n)({},j.defaultOptions,F))||this;B.axis=B.appendChild(new ni({style:{type:"linear",startPos:[0,0],endPos:[0,0],data:[],showArrow:!1,animate:!1}})),B.timeline=B.appendChild(new js({style:{onChange:function(Le){B.handleSliderChange(Le)}}})),B.controller=B.appendChild(new kr({})),B.states={},B.handleSliderChange=function(Le){var $e=function(){var Xe=B.states.values;return Array.isArray(Xe)?(0,l.ev)([],(0,l.CR)(Xe),!1):Xe}();B.setBySliderValues(Le),B.dispatchOnChange($e)};var K=B.attributes,dt=K.selectionType,St=K.chartType,Et=K.speed,Zt=K.state,ce=K.playMode,Ae=K.values;return B.states={chartType:St,playMode:ce,selectionType:dt,speed:Et,state:Zt},B.setByTimebarValues(Ae),B}return Object.defineProperty(j.prototype,"data",{get:function(){var F=this.attributes.data,B=function(K,dt){return K.time<dt.time?-1:K.time>dt.time?1:0};return F.sort(B)},enumerable:!1,configurable:!0}),Object.defineProperty(j.prototype,"space",{get:function(){var F=this.attributes,B=F.x,K=F.y,dt=F.width,St=F.height,Et=F.type,Zt=F.controllerHeight,ce=(0,R.Z)(+St-Zt,0,+St),Ae=new P.b(B,K+ +St-Zt,+dt,Zt),Le,$e=0;Et==="chart"?($e=35,Le=new P.b(B,K+ce-$e,+dt,$e)):Le=new P.b;var Xe=Et==="time"?10:ce,an=new P.b(B,K+(Et==="time"?ce:ce-Xe),+dt,Xe-$e);return{axisBBox:Le,controllerBBox:Ae,timelineBBox:an}},enumerable:!1,configurable:!0}),j.prototype.setBySliderValues=function(F){var B,K,dt=this.data,St=(0,l.CR)(Array.isArray(F)?F:[0,F],2),Et=St[0],Zt=St[1],ce=dt.length,Ae=dt[Math.floor(Et*ce)],Le=dt[Math.ceil(Zt*ce)-(Array.isArray(F)?0:1)];this.states.values=[(B=Ae==null?void 0:Ae.time)!==null&&B!==void 0?B:dt[0].time,(K=Le==null?void 0:Le.time)!==null&&K!==void 0?K:1/0]},j.prototype.setByTimebarValues=function(F){var B,K,dt,St=this.data,Et=(0,l.CR)(Array.isArray(F)?F:[void 0,F],2),Zt=Et[0],ce=Et[1],Ae=St.find(function($e){var Xe=$e.time;return Xe===Zt}),Le=St.find(function($e){var Xe=$e.time;return Xe===ce});this.states.values=[(B=Ae==null?void 0:Ae.time)!==null&&B!==void 0?B:(K=St[0])===null||K===void 0?void 0:K.time,(dt=Le==null?void 0:Le.time)!==null&&dt!==void 0?dt:1/0]},j.prototype.setByIndex=function(F){var B,K,dt,St,Et=this.data,Zt=(0,l.CR)(F,2),ce=Zt[0],Ae=Zt[1];this.states.values=[(K=(B=Et[ce])===null||B===void 0?void 0:B.time)!==null&&K!==void 0?K:Et[0].time,(St=(dt=this.data[Ae])===null||dt===void 0?void 0:dt.time)!==null&&St!==void 0?St:1/0]},Object.defineProperty(j.prototype,"sliderValues",{get:function(){var F=this.states,B=F.values,K=F.selectionType,dt=(0,l.CR)(Array.isArray(B)?B:[void 0,B],2),St=dt[0],Et=dt[1],Zt=this.data,ce=Zt.length,Ae=K==="value",Le=function(){var Xe=Zt.findIndex(function(an){var bn=an.time;return bn===St});return Ae?0:Xe>-1?Xe/ce:0},$e=function(){if(Et===1/0)return 1;var Xe=Zt.findIndex(function(an){var bn=an.time;return bn===Et});return Xe>-1?Xe/ce:Ae?.5:1};return[Le(),$e()]},enumerable:!1,configurable:!0}),Object.defineProperty(j.prototype,"values",{get:function(){var F=this.states,B=F.values,K=F.selectionType,dt=(0,l.CR)(Array.isArray(B)?B:[this.data[0].time,B],2),St=dt[0],Et=dt[1];return K==="value"?Et:[St,Et]},enumerable:!1,configurable:!0}),j.prototype.getDatumByRatio=function(F){var B=this.data,K=B.length,dt=Math.floor(F*(K-1));return B[dt]},Object.defineProperty(j.prototype,"chartHandleIconShape",{get:function(){var F=this.states.selectionType,B=this.space.timelineBBox.height;return F==="range"?function(K){return new li({style:{type:K,height:B,iconSize:B/6}})}:function(){return new _.x1({style:{x1:0,y1:-B/2,x2:0,y2:B/2,lineWidth:2,stroke:"#c8c8c8"}})}},enumerable:!1,configurable:!0}),j.prototype.getChartStyle=function(F){var B=this,K=F.x,dt=F.y,St=F.width,Et=F.height,Zt=this.states,ce=Zt.selectionType,Ae=Zt.chartType,Le=this.data,$e=this.attributes,Xe=$e.type,an=$e.labelFormatter,bn=(0,b.zs)(this.attributes,"chart"),xn=bn.type,Dn=(0,l._T)(bn,["type"]),Fn=ce==="range";if(Xe==="time")return(0,l.pi)({handleIconShape:function(){return new Rr({})},selectionFill:"#2e7ff8",selectionFillOpacity:1,showLabelOnInteraction:!0,handleLabelDy:Fn?-15:0,autoFitLabel:Fn,handleSpacing:Fn?-15:0,trackFill:"#edeeef",trackLength:St,trackOpacity:.5,trackRadius:Et/2,trackSize:Et/2,type:ce,values:this.sliderValues,formatter:function(nr){if(an)return an(nr);var sr=B.getDatumByRatio(nr).time;return typeof sr=="number"?vi(sr):N(sr,"YYYY-MM-DD HH:mm:ss")},transform:"translate(".concat(K,", ").concat(dt,")"),zIndex:1},Dn);var On=ce==="range"?5:0,Yn=Le.map(function(nr){var sr=nr.value;return sr});return(0,l.pi)({handleIconOffset:On,handleIconShape:this.chartHandleIconShape,selectionFill:"#fff",selectionFillOpacity:.5,selectionType:"invert",sparklineSpacing:.1,sparklineColumnLineWidth:0,sparklineColor:"#d4e5fd",sparklineAreaOpacity:1,sparklineAreaLineWidth:0,sparklineData:Yn,sparklineType:Ae,sparklineScale:.8,trackLength:St,trackSize:Et,type:ce,values:this.sliderValues,transform:"translate(".concat(K,", ").concat(dt,")"),zIndex:1},Dn)},j.prototype.renderChart=function(F){F===void 0&&(F=this.space.timelineBBox),this.timeline.update(this.getChartStyle(F))},j.prototype.updateSelection=function(){this.timeline.setValues(this.sliderValues,!0),this.handleSliderChange(this.sliderValues)},j.prototype.getAxisStyle=function(F){var B=this.data,K=this.attributes,dt=K.interval,St=K.labelFormatter,Et=(0,b.zs)(this.attributes,"axis"),Zt=F.x,ce=F.y,Ae=F.width,Le=(0,l.ev)((0,l.ev)([],(0,l.CR)(B),!1),[{time:0}],!1).map(function(Xe,an,bn){var xn=Xe.time;return{label:"".concat(xn),value:an/(bn.length-1),time:xn}}),$e=(0,l.pi)({startPos:[Zt,ce],endPos:[Zt+Ae,ce],data:Le,labelFilter:function(Xe,an){return an<Le.length-1},labelFormatter:function(Xe){var an=Xe.time;return St?St(an):Qr(an,dt)}},Et);return $e},j.prototype.renderAxis=function(F){F===void 0&&(F=this.space.axisBBox);var B=this.attributes.type;B==="chart"&&this.axis.update(this.getAxisStyle(F))},j.prototype.renderController=function(F){F===void 0&&(F=this.space.controllerBBox);var B=this.attributes.type,K=this.states,dt=K.state,St=K.speed,Et=K.selectionType,Zt=K.chartType,ce=(0,b.zs)(this.attributes,"controller"),Ae=this,Le=(0,l.pi)((0,l.pi)((0,l.pi)({},F),{iconSize:20,speed:St,state:dt,selectionType:Et,chartType:Zt,onChange:function($e,Xe){var an=Xe.value;switch($e){case"reset":Ae.internalReset();break;case"speed":Ae.handleSpeedChange(an);break;case"backward":Ae.internalBackward();break;case"playPause":an==="play"?Ae.internalPlay():Ae.internalPause();break;case"forward":Ae.internalForward();break;case"selectionType":Ae.handleSelectionTypeChange(an);break;case"chartType":Ae.handleChartTypeChange(an);break;default:break}}}),ce);B==="time"&&(Le.functions=[["reset","speed"],["backward","playPause","forward"],["selectionType"]]),this.controller.update(Le)},j.prototype.dispatchOnChange=function(F){var B=this.data,K=this.attributes.onChange,dt=this.states,St=dt.values,Et=dt.selectionType,Zt=(0,l.CR)(St,2),ce=Zt[0],Ae=Zt[1],Le=Ae===1/0?B.at(-1).time:Ae,$e=Et==="range"?[ce,Le]:Le,Xe=function(an,bn){return Array.isArray(an)?Array.isArray(bn)?an[0]===bn[0]&&(an[1]===bn[1]||an[1]===1/0||bn[1]===1/0):!1:Array.isArray(bn)?!1:an===bn};(!F||!Xe(F,$e))&&(K==null||K(Et==="range"?[ce,Le]:Le))},j.prototype.internalReset=function(F){var B,K,dt=this.states.selectionType;this.internalPause(),this.setBySliderValues(dt==="range"?[0,1]:[0,0]),this.renderController(),this.updateSelection(),F||((K=(B=this.attributes)===null||B===void 0?void 0:B.onReset)===null||K===void 0||K.call(B),this.dispatchOnChange())},j.prototype.reset=function(){this.internalReset()},j.prototype.moveSelection=function(F,B){var K=this.data,dt=K.length,St=this.states,Et=St.values,Zt=St.selectionType,ce=St.playMode,Ae=(0,l.CR)(Et,2),Le=Ae[0],$e=Ae[1],Xe=K.findIndex(function(On){var Yn=On.time;return Yn===Le}),an=K.findIndex(function(On){var Yn=On.time;return Yn===$e});an===-1&&(an=dt);var bn=F==="backward"?-1:1,xn;Zt==="range"?ce==="acc"?(xn=[Xe,an+bn],bn===-1&&Xe===an&&(xn=[Xe,dt])):xn=[Xe+bn,an+bn]:xn=[Xe,an+bn];var Dn=function(On){var Yn=(0,l.CR)(On.sort(function(Wr,ei){return Wr-ei}),2),nr=Yn[0],sr=Yn[1],xr=function(Wr){return(0,R.Z)(Wr,0,dt)};return sr>dt?Zt==="value"?[0,0]:ce==="acc"?[xr(nr),xr(nr)]:[0,xr(sr-nr)]:nr<0?ce==="acc"?[0,xr(sr)]:[xr(nr+dt-sr),dt]:[xr(nr),xr(sr)]},Fn=Dn(xn);return this.setByIndex(Fn),this.updateSelection(),Fn},j.prototype.internalBackward=function(F){var B,K,dt=this.moveSelection("backward",F);return F||((K=(B=this.attributes)===null||B===void 0?void 0:B.onBackward)===null||K===void 0||K.call(B),this.dispatchOnChange()),dt},j.prototype.backward=function(){this.internalBackward()},j.prototype.internalPlay=function(F){var B=this,K,dt,St=this.data,Et=this.attributes.loop,Zt=this.states.speed,ce=Zt===void 0?1:Zt;this.playInterval=window.setInterval(function(){var Ae=B.internalForward();Ae[1]===St.length&&!Et&&(B.internalPause(),B.renderController())},1e3/ce),this.states.state="play",!F&&((dt=(K=this.attributes)===null||K===void 0?void 0:K.onPlay)===null||dt===void 0||dt.call(K))},j.prototype.play=function(){this.internalPlay()},j.prototype.internalPause=function(F){var B,K;clearInterval(this.playInterval),this.states.state="pause",!F&&((K=(B=this.attributes)===null||B===void 0?void 0:B.onPause)===null||K===void 0||K.call(B))},j.prototype.pause=function(){this.internalPause()},j.prototype.internalForward=function(F){var B,K,dt=this.moveSelection("forward",F);return F||((K=(B=this.attributes)===null||B===void 0?void 0:B.onForward)===null||K===void 0||K.call(B),this.dispatchOnChange()),dt},j.prototype.forward=function(){this.internalForward()},j.prototype.handleSpeedChange=function(F){var B,K;this.states.speed=F;var dt=this.states.state;dt==="play"&&(this.internalPause(!0),this.internalPlay(!0)),(K=(B=this.attributes)===null||B===void 0?void 0:B.onSpeedChange)===null||K===void 0||K.call(B,F)},j.prototype.handleSelectionTypeChange=function(F){var B,K;this.states.selectionType=F,this.renderChart(),(K=(B=this.attributes)===null||B===void 0?void 0:B.onSelectionTypeChange)===null||K===void 0||K.call(B,F)},j.prototype.handleChartTypeChange=function(F){var B,K;this.states.chartType=F,this.renderChart(),(K=(B=this.attributes)===null||B===void 0?void 0:B.onChartTypeChange)===null||K===void 0||K.call(B,F)},j.prototype.render=function(){var F=this.space,B=F.axisBBox,K=F.controllerBBox,dt=F.timelineBBox;this.renderController(K),this.renderAxis(B),this.renderChart(dt),this.states.state==="play"&&this.internalPlay()},j.prototype.destroy=function(){W.prototype.destroy.call(this),this.internalPause(!0)},j.defaultOptions={style:{x:0,y:0,axisLabelFill:"#6e6e6e",axisLabelTextAlign:"left",axisLabelTextBaseline:"top",axisLabelTransform:"translate(5, -12)",axisLineLineWidth:1,axisLineStroke:"#cacdd1",axisTickLength:15,axisTickLineWidth:1,axisTickStroke:"#cacdd1",chartShowLabel:!1,chartType:"line",controllerAlign:"center",controllerHeight:40,data:[],interval:"day",loop:!1,playMode:"acc",selectionType:"range",type:"time"}},j}(O.w)},75242:function(Tt,vt,d){"use strict";d.d(vt,{u:function(){return N}});var l=d(80813),R=d(85580);function O(et,tt){return!et||!tt?et:et.replace(/\\?\{([^{}]+)\}/g,function(Ct,ut){return Ct.charAt(0)==="\\"?Ct.slice(1):tt[ut]===void 0?"":tt[ut]})}var _=O,g=d(97304),P=function(et,tt){if(tt==null){et.innerHTML="";return}et.replaceChildren?Array.isArray(tt)?et.replaceChildren.apply(et,(0,l.ev)([],(0,l.CR)(tt),!1)):et.replaceChildren(tt):(et.innerHTML="",Array.isArray(tt)?tt.forEach(function(Ct){return et.appendChild(Ct)}):et.appendChild(tt))},b=d(88839),A=d(17911);function I(et){return et===void 0&&(et=""),{CONTAINER:"".concat(et,"tooltip"),TITLE:"".concat(et,"tooltip-title"),LIST:"".concat(et,"tooltip-list"),LIST_ITEM:"".concat(et,"tooltip-list-item"),NAME:"".concat(et,"tooltip-list-item-name"),MARKER:"".concat(et,"tooltip-list-item-marker"),NAME_LABEL:"".concat(et,"tooltip-list-item-name-label"),VALUE:"".concat(et,"tooltip-list-item-value"),CROSSHAIR_X:"".concat(et,"tooltip-crosshair-x"),CROSSHAIR_Y:"".concat(et,"tooltip-crosshair-y")}}var x={overflow:"hidden","white-space":"nowrap","text-overflow":"ellipsis"};function k(et){var tt;et===void 0&&(et="");var Ct=I(et);return tt={},tt[".".concat(Ct.CONTAINER)]={position:"absolute",visibility:"visible","z-index":8,transition:"visibility 0.2s cubic-bezier(0.23, 1, 0.32, 1), left 0.4s cubic-bezier(0.23, 1, 0.32, 1), top 0.4s cubic-bezier(0.23, 1, 0.32, 1)","background-color":"rgba(255, 255, 255, 0.96)","box-shadow":"0 6px 12px 0 rgba(0, 0, 0, 0.12)","border-radius":"4px",color:"rgba(0, 0, 0, 0.65)","font-size":"12px","line-height":"20px",padding:"12px","min-width":"120px","max-width":"360px","font-family":"Roboto-Regular"},tt[".".concat(Ct.TITLE)]={color:"rgba(0, 0, 0, 0.45)"},tt[".".concat(Ct.LIST)]={margin:"0px","list-style-type":"none",padding:"0px"},tt[".".concat(Ct.LIST_ITEM)]={"list-style-type":"none",display:"flex","line-height":"2em","align-items":"center","justify-content":"space-between","white-space":"nowrap"},tt[".".concat(Ct.MARKER)]={width:"8px",height:"8px","border-radius":"50%",display:"inline-block","margin-right":"4px"},tt[".".concat(Ct.NAME)]={display:"flex","align-items":"center","max-width":"216px"},tt[".".concat(Ct.NAME_LABEL)]=(0,l.pi)({flex:1},x),tt[".".concat(Ct.VALUE)]=(0,l.pi)({display:"inline-block",float:"right",flex:1,"text-align":"right","min-width":"28px","margin-left":"30px",color:"rgba(0, 0, 0, 0.85)"},x),tt[".".concat(Ct.CROSSHAIR_X)]={position:"absolute",width:"1px","background-color":"rgba(0, 0, 0, 0.25)"},tt[".".concat(Ct.CROSSHAIR_Y)]={position:"absolute",height:"1px","background-color":"rgba(0, 0, 0, 0.25)"},tt}var N=function(et){(0,l.ZT)(tt,et);function tt(Ct){var ut=this,nt,kt,Nt=(kt=(nt=Ct.style)===null||nt===void 0?void 0:nt.template)===null||kt===void 0?void 0:kt.prefixCls,Bt=I(Nt);return ut=et.call(this,Ct,{data:[],x:0,y:0,visibility:"visible",title:"",position:"bottom-right",offset:[5,5],enterable:!1,container:{x:0,y:0},bounding:null,template:{prefixCls:"",container:'<div class="'.concat(Bt.CONTAINER,'"></div>'),title:'<div class="'.concat(Bt.TITLE,'"></div>'),item:'<li class="'.concat(Bt.LIST_ITEM,`" data-index={index}>
|
|
|
<span class="`).concat(Bt.NAME,`">
|
|
|
<span class="`).concat(Bt.MARKER,`" style="background:{color}"></span>
|
|
|
<span class="`).concat(Bt.NAME_LABEL,`" title="{name}">{name}</span>
|
|
|
</span>
|
|
|
<span class="`).concat(Bt.VALUE,`" title="{value}">{value}</span>
|
|
|
</li>`)},style:k(Nt)})||this,ut.timestamp=-1,ut.prevCustomContentKey=ut.attributes.contentKey,ut.initShape(),ut.render(ut.attributes,ut),ut}return Object.defineProperty(tt.prototype,"HTMLTooltipElement",{get:function(){return this.element},enumerable:!1,configurable:!0}),tt.prototype.getContainer=function(){return this.element},Object.defineProperty(tt.prototype,"elementSize",{get:function(){var Ct=this.element.offsetWidth,ut=this.element.offsetHeight;return{width:Ct,height:ut}},enumerable:!1,configurable:!0}),Object.defineProperty(tt.prototype,"HTMLTooltipItemsElements",{get:function(){var Ct=this.attributes,ut=Ct.data,nt=Ct.template;return ut.map(function(kt,Nt){var Bt=kt.name,Xt=Bt===void 0?"":Bt,wt=kt.color,ot=wt===void 0?"black":wt,It=kt.index,zt=(0,l._T)(kt,["name","color","index"]),Ot=(0,l.pi)({name:Xt,color:ot,index:It!=null?It:Nt},zt);return(0,R.L)(_(nt.item,Ot))})},enumerable:!1,configurable:!0}),tt.prototype.render=function(Ct,ut){this.renderHTMLTooltipElement(),this.updatePosition()},tt.prototype.destroy=function(){var Ct;(Ct=this.element)===null||Ct===void 0||Ct.remove(),et.prototype.destroy.call(this)},tt.prototype.show=function(Ct,ut){var nt=this;if(Ct!==void 0&&ut!==void 0){var kt=this.element.style.visibility==="hidden",Nt=function(){nt.attributes.x=Ct!=null?Ct:nt.attributes.x,nt.attributes.y=ut!=null?ut:nt.attributes.y,nt.updatePosition()};kt?this.closeTransition(Nt):Nt()}this.element.style.visibility="visible"},tt.prototype.hide=function(Ct,ut){Ct===void 0&&(Ct=0),ut===void 0&&(ut=0);var nt=this.attributes.enterable;nt&&this.isCursorEntered(Ct,ut)||(this.element.style.visibility="hidden")},tt.prototype.initShape=function(){var Ct=this.attributes.template;this.element=(0,R.L)(Ct.container),this.id&&this.element.setAttribute("id",this.id)},tt.prototype.renderCustomContent=function(){if(!(this.prevCustomContentKey!==void 0&&this.prevCustomContentKey===this.attributes.contentKey)){this.prevCustomContentKey=this.attributes.contentKey;var Ct=this.attributes.content;Ct&&(typeof Ct=="string"?this.element.innerHTML=Ct:P(this.element,Ct))}},tt.prototype.renderHTMLTooltipElement=function(){var Ct,ut,nt=this.attributes,kt=nt.template,Nt=nt.title,Bt=nt.enterable,Xt=nt.style,wt=nt.content,ot=I(kt.prefixCls),It=this.element;if(this.element.style.pointerEvents=Bt?"auto":"none",wt)this.renderCustomContent();else{Nt?(It.innerHTML=kt.title,It.getElementsByClassName(ot.TITLE)[0].innerHTML=Nt):(ut=(Ct=It.getElementsByClassName(ot.TITLE))===null||Ct===void 0?void 0:Ct[0])===null||ut===void 0||ut.remove();var zt=this.HTMLTooltipItemsElements,Ot=document.createElement("ul");Ot.className=ot.LIST,P(Ot,zt);var pe=this.element.querySelector(".".concat(ot.LIST));pe?pe.replaceWith(Ot):It.appendChild(Ot)}(0,b.MC)(It,Xt)},tt.prototype.getRelativeOffsetFromCursor=function(Ct){var ut=this.attributes,nt=ut.position,kt=ut.offset,Nt=Ct||nt,Bt=Nt.split("-"),Xt={left:[-1,0],right:[1,0],top:[0,-1],bottom:[0,1]},wt=this.elementSize,ot=wt.width,It=wt.height,zt=[-ot/2,-It/2];return Bt.forEach(function(Ot){var pe=(0,l.CR)(zt,2),xe=pe[0],qt=pe[1],Ye=(0,l.CR)(Xt[Ot],2),We=Ye[0],Oe=Ye[1];zt=[xe+(ot/2+kt[0])*We,qt+(It/2+kt[1])*Oe]}),zt},tt.prototype.setOffsetPosition=function(Ct){var ut=(0,l.CR)(Ct,2),nt=ut[0],kt=ut[1],Nt=this.attributes,Bt=Nt.x,Xt=Bt===void 0?0:Bt,wt=Nt.y,ot=wt===void 0?0:wt,It=Nt.container,zt=It.x,Ot=It.y;this.element.style.left="".concat(+Xt+zt+nt,"px"),this.element.style.top="".concat(+ot+Ot+kt,"px")},tt.prototype.updatePosition=function(){var Ct=this.attributes.showDelay,ut=Ct===void 0?60:Ct,nt=Date.now();this.timestamp>0&&nt-this.timestamp<ut||(this.timestamp=nt,this.setOffsetPosition(this.autoPosition(this.getRelativeOffsetFromCursor())))},tt.prototype.autoPosition=function(Ct){var ut=(0,l.CR)(Ct,2),nt=ut[0],kt=ut[1],Nt=this.attributes,Bt=Nt.x,Xt=Nt.y,wt=Nt.bounding,ot=Nt.position;if(!wt)return[nt,kt];var It=this.element,zt=It.offsetWidth,Ot=It.offsetHeight,pe=(0,l.CR)([+Bt+nt,+Xt+kt],2),xe=pe[0],qt=pe[1],Ye={left:"right",right:"left",top:"bottom",bottom:"top"},We=wt.x,Oe=wt.y,Qe=wt.width,Mt=wt.height,ne={left:xe<We,right:xe+zt>We+Qe,top:qt<Oe,bottom:qt+Ot>Oe+Mt},Me=[];ot.split("-").forEach(function(le){ne[le]?Me.push(Ye[le]):Me.push(le)});var nn=Me.join("-");return this.getRelativeOffsetFromCursor(nn)},tt.prototype.isCursorEntered=function(Ct,ut){if(this.element){var nt=this.element.getBoundingClientRect(),kt=nt.x,Nt=nt.y,Bt=nt.width,Xt=nt.height;return new A.b(kt,Nt,Bt,Xt).isPointIn(Ct,ut)}return!1},tt.prototype.closeTransition=function(Ct){var ut=this,nt=this.element.style.transition;this.element.style.transition="none",Ct(),setTimeout(function(){ut.element.style.transition=nt},10)},tt.tag="tooltip",tt}(g.w)},17911:function(Tt,vt,d){"use strict";d.d(vt,{b:function(){return l}});var l=function(){function O(_,g,P,b){_===void 0&&(_=0),g===void 0&&(g=0),P===void 0&&(P=0),b===void 0&&(b=0),this.x=0,this.y=0,this.width=0,this.height=0,this.x=_,this.y=g,this.width=P,this.height=b}return Object.defineProperty(O.prototype,"bottom",{get:function(){return this.y+this.height},enumerable:!1,configurable:!0}),Object.defineProperty(O.prototype,"left",{get:function(){return this.x},enumerable:!1,configurable:!0}),Object.defineProperty(O.prototype,"right",{get:function(){return this.x+this.width},enumerable:!1,configurable:!0}),Object.defineProperty(O.prototype,"top",{get:function(){return this.y},enumerable:!1,configurable:!0}),O.fromRect=function(_){return new O(_.x,_.y,_.width,_.height)},O.prototype.toJSON=function(){return{x:this.x,y:this.y,width:this.width,height:this.height,top:this.top,right:this.right,bottom:this.bottom,left:this.left}},O.prototype.isPointIn=function(_,g){return _>=this.left&&_<=this.right&&g>=this.top&&g<=this.bottom},O}();function R(O){var _=O.getRenderBounds(),g=__read(_.min,2),P=g[0],b=g[1],A=__read(_.max,2),I=A[0],x=A[1],k=I-P,N=x-b;return new l(P,b,k,N)}},38242:function(Tt,vt,d){"use strict";d.d(vt,{S:function(){return O}});var l=d(80813),R=d(71018);function O(_,g){return(0,R.Z)(_)?_.apply(void 0,(0,l.ev)([],(0,l.CR)(g),!1)):_}},58688:function(Tt,vt,d){"use strict";d.d(vt,{A:function(){return R}});var l=d(80813),R=function(O,_){var g=function(b){return"".concat(_,"-").concat(b)},P=Object.fromEntries(Object.entries(O).map(function(b){var A=(0,l.CR)(b,2),I=A[0],x=A[1],k=g(x);return[I,{name:k,class:".".concat(k),id:"#".concat(k),toString:function(){return k}}]}));return Object.assign(P,{prefix:g}),P}},99247:function(Tt,vt,d){"use strict";d.d(vt,{n:function(){return P}});var l=d(80813),R=d(63467),O=d(39934),_=5,g=function(b,A,I,x){I===void 0&&(I=0),x===void 0&&(x=_),Object.entries(A).forEach(function(k){var N=(0,l.CR)(k,2),et=N[0],tt=N[1],Ct=b;Object.prototype.hasOwnProperty.call(A,et)&&(tt?(0,R.Z)(tt)?((0,R.Z)(b[et])||(Ct[et]={}),I<x?g(b[et],tt,I+1,x):Ct[et]=A[et]):(0,O.Z)(tt)?(Ct[et]=[],Ct[et]=Ct[et].concat(tt)):Ct[et]=tt:Ct[et]=tt)})},P=function(b){for(var A=[],I=1;I<arguments.length;I++)A[I-1]=arguments[I];for(var x=0;x<A.length;x+=1)g(b,A[x]);return b}},53160:function(Tt,vt,d){"use strict";d.d(vt,{O:function(){return R}});var l=d(58533);function R(O,_,g){g===void 0&&(g="..."),(0,l.Rm)(O,{wordWrap:!0,wordWrapWidth:_,maxLines:1,textOverflow:g})}},88170:function(Tt,vt,d){"use strict";d.d(vt,{$:function(){return b},S:function(){return P}});var l=d(80813),R=d(71879),O=d(1933),_=d(42777),g=d(14675);function P(A){return typeof A=="function"?A():(0,R.Z)(A)||(0,O.Z)(A)?new _.x({style:{text:String(A)}}):A}function b(A,I){return typeof A=="function"?A():(0,R.Z)(A)||(0,O.Z)(A)?new g.k9({style:(0,l.pi)((0,l.pi)({pointerEvents:"auto"},I),{innerHTML:A})}):A}},67756:function(Tt,vt,d){"use strict";d.d(vt,{z:function(){return l}});function l(R,O,_,g,P){return g===void 0&&(g=!0),P===void 0&&(P=function(b){b.node().removeChildren()}),R?_(O):(g&&P(O),null)}},16915:function(Tt,vt,d){"use strict";d.d(vt,{X:function(){return P},g:function(){return g}});var l=d(80813),R=d(14675),O=d(69014),_=function(b){(0,l.ZT)(A,b);function A(){for(var I=[],x=0;x<arguments.length;x++)I[x]=arguments[x];var k=b.apply(this,(0,l.ev)([],(0,l.CR)(I),!1))||this;return k.isMutationObserved=!0,k.addEventListener(R.Dk.INSERTED,function(){(0,O.Cp)(k)}),k}return A}(R.ZA);function g(b){var A=b.appendChild(new _({class:"offscreen"}));return(0,O.Cp)(A),A}function P(b){for(var A=b;A;){if(A.className==="offscreen")return!0;A=A.parent}return!1}},33253:function(Tt,vt,d){"use strict";d.d(vt,{l:function(){return l}});function l(R){return/\S+-\S+/g.test(R)?R.split("-").map(function(O){return O[0]}):R.length>2?[R[0]]:R.split("")}},99769:function(Tt,vt,d){"use strict";d.d(vt,{b:function(){return l}});function l(R,O,_){_===void 0&&(_=!1);var g=R.getBBox(),P=g.width,b=g.height,A=O/Math.max(P,b);return _&&(R.style.transform="scale(".concat(A,")")),A}},38974:function(Tt,vt,d){"use strict";d.d(vt,{OV:function(){return k},Ys:function(){return x}});var l=d(80813),R=d(39934),O=function(N){if(!(0,R.Z)(N))return[];for(var et=[],tt=0;tt<N.length;tt++)et=et.concat(N[tt]);return et},_=O,g=d(14675),P=d(42777);function b(N,et){var tt=new Map;return N.forEach(function(Ct){var ut=et(Ct);tt.has(ut)||tt.set(ut,[]),tt.get(ut).push(Ct)}),tt}function A(N){throw new Error(N)}var I=function(){function N(ut,nt,kt,Nt,Bt,Xt,wt){ut===void 0&&(ut=null),nt===void 0&&(nt=null),kt===void 0&&(kt=null),Nt===void 0&&(Nt=null),Bt===void 0&&(Bt=[null,null,null,null,null]),Xt===void 0&&(Xt=[]),wt===void 0&&(wt=[]),et.add(this),this._elements=Array.from(ut),this._data=nt,this._parent=kt,this._document=Nt,this._enter=Bt[0],this._update=Bt[1],this._exit=Bt[2],this._merge=Bt[3],this._split=Bt[4],this._transitions=Xt,this._facetElements=wt}N.prototype.selectAll=function(ut){var nt=typeof ut=="string"?this._parent.querySelectorAll(ut):ut;return new tt(nt,null,this._elements[0],this._document)},N.prototype.selectFacetAll=function(ut){var nt=typeof ut=="string"?this._parent.querySelectorAll(ut):ut;return new tt(this._elements,null,this._parent,this._document,void 0,void 0,nt)},N.prototype.select=function(ut){var nt=typeof ut=="string"?this._parent.querySelectorAll(ut)[0]||null:ut;return new tt([nt],null,nt,this._document)},N.prototype.append=function(ut){var nt=this,kt=typeof ut=="function"?ut:function(){return nt.createElement(ut)},Nt=[];if(this._data!==null){for(var Bt=0;Bt<this._data.length;Bt++){var Xt=this._data[Bt],wt=(0,l.CR)(Array.isArray(Xt)?Xt:[Xt,null],2),ot=wt[0],It=wt[1],zt=kt(ot,Bt);zt.__data__=ot,It!==null&&(zt.__fromElements__=It),this._parent.appendChild(zt),Nt.push(zt)}return new tt(Nt,null,this._parent,this._document)}for(var Bt=0;Bt<this._elements.length;Bt++){var Ot=this._elements[Bt],ot=Ot.__data__,zt=kt(ot,Bt);Ot.appendChild(zt),Nt.push(zt)}return new tt(Nt,null,Nt[0],this._document)},N.prototype.maybeAppend=function(ut,nt){var kt=(0,l.Q_)(this,et,"m",Ct).call(this,ut[0]==="#"?ut:"#".concat(ut),nt);return kt.attr("id",ut),kt},N.prototype.maybeAppendByClassName=function(ut,nt){var kt=ut.toString(),Nt=(0,l.Q_)(this,et,"m",Ct).call(this,kt[0]==="."?kt:".".concat(kt),nt);return Nt.attr("className",kt),Nt},N.prototype.maybeAppendByName=function(ut,nt){var kt=(0,l.Q_)(this,et,"m",Ct).call(this,'[name="'.concat(ut,'"]'),nt);return kt.attr("name",ut),kt},N.prototype.data=function(ut,nt,kt){var Nt,Bt;nt===void 0&&(nt=function(le){return le}),kt===void 0&&(kt=function(){return null});for(var Xt=[],wt=[],ot=new Set(this._elements),It=[],zt=new Set,Ot=new Map(this._elements.map(function(le,be){return[nt(le.__data__,be),le]})),pe=new Map(this._facetElements.map(function(le,be){return[nt(le.__data__,be),le]})),xe=b(this._elements,function(le){return kt(le.__data__)}),qt=0;qt<ut.length;qt++){var Ye=ut[qt],We=nt(Ye,qt),Oe=kt(Ye,qt);if(Ot.has(We)){var Qe=Ot.get(We);Qe.__data__=Ye,Qe.__facet__=!1,wt.push(Qe),ot.delete(Qe),Ot.delete(We)}else if(pe.has(We)){var Qe=pe.get(We);Qe.__data__=Ye,Qe.__facet__=!0,wt.push(Qe),pe.delete(We)}else if(xe.has(We)){var Mt=xe.get(We);It.push([Ye,Mt]);try{for(var ne=(Nt=void 0,(0,l.XA)(Mt)),Me=ne.next();!Me.done;Me=ne.next()){var Qe=Me.value;ot.delete(Qe)}}catch(le){Nt={error:le}}finally{try{Me&&!Me.done&&(Bt=ne.return)&&Bt.call(ne)}finally{if(Nt)throw Nt.error}}xe.delete(We)}else if(Ot.has(Oe)){var Qe=Ot.get(Oe);Qe.__toData__?Qe.__toData__.push(Ye):Qe.__toData__=[Ye],zt.add(Qe),ot.delete(Qe)}else Xt.push(Ye)}var nn=[new tt([],Xt,this._parent,this._document),new tt(wt,null,this._parent,this._document),new tt(ot,null,this._parent,this._document),new tt([],It,this._parent,this._document),new tt(zt,null,this._parent,this._document)];return new tt(this._elements,null,this._parent,this._document,nn)},N.prototype.merge=function(ut){var nt=(0,l.ev)((0,l.ev)([],(0,l.CR)(this._elements),!1),(0,l.CR)(ut._elements),!1),kt=(0,l.ev)((0,l.ev)([],(0,l.CR)(this._transitions),!1),(0,l.CR)(ut._transitions),!1);return new tt(nt,null,this._parent,this._document,void 0,kt)},N.prototype.createElement=function(ut){if(this._document)return this._document.createElement(ut,{});var nt=tt.registry[ut];return nt?new nt:A("Unknown node type: ".concat(ut))},N.prototype.join=function(ut,nt,kt,Nt,Bt){ut===void 0&&(ut=function(Ot){return Ot}),nt===void 0&&(nt=function(Ot){return Ot}),kt===void 0&&(kt=function(Ot){return Ot.remove()}),Nt===void 0&&(Nt=function(Ot){return Ot}),Bt===void 0&&(Bt=function(Ot){return Ot.remove()});var Xt=ut(this._enter),wt=nt(this._update),ot=kt(this._exit),It=Nt(this._merge),zt=Bt(this._split);return wt.merge(Xt).merge(ot).merge(It).merge(zt)},N.prototype.remove=function(){for(var ut=function(Nt){var Bt=nt._elements[Nt],Xt=nt._transitions[Nt];Xt?Xt.then(function(){return Bt.remove()}):Bt.remove()},nt=this,kt=0;kt<this._elements.length;kt++)ut(kt);return new tt([],null,this._parent,this._document,void 0,this._transitions)},N.prototype.each=function(ut){for(var nt=0;nt<this._elements.length;nt++){var kt=this._elements[nt],Nt=kt.__data__;ut.call(kt,Nt,nt)}return this},N.prototype.attr=function(ut,nt){var kt=typeof nt!="function"?function(){return nt}:nt;return this.each(function(Nt,Bt){nt!==void 0&&(this[ut]=kt.call(this,Nt,Bt))})},N.prototype.style=function(ut,nt,kt){kt===void 0&&(kt=!0);var Nt=typeof nt!="function"||!kt?function(){return nt}:nt;return this.each(function(Bt,Xt){nt!==void 0&&(this.style[ut]=Nt.call(this,Bt,Xt))})},N.prototype.styles=function(ut,nt){return ut===void 0&&(ut={}),nt===void 0&&(nt=!0),this.each(function(kt,Nt){var Bt=this;Object.entries(ut).forEach(function(Xt){var wt=(0,l.CR)(Xt,2),ot=wt[0],It=wt[1],zt=typeof It!="function"||!nt?function(){return It}:It;It!==void 0&&Bt.attr(ot,zt.call(Bt,kt,Nt))})})},N.prototype.update=function(ut,nt){nt===void 0&&(nt=!0);var kt=typeof ut!="function"||!nt?function(){return ut}:ut;return this.each(function(Nt,Bt){ut&&this.update&&this.update(kt.call(this,Nt,Bt))})},N.prototype.maybeUpdate=function(ut,nt){nt===void 0&&(nt=!0);var kt=typeof ut!="function"||!nt?function(){return ut}:ut;return this.each(function(Nt,Bt){ut&&this.update&&this.update(kt.call(this,Nt,Bt))})},N.prototype.transition=function(ut){var nt=this._transitions,kt=new Array(this._elements.length);return this.each(function(Nt,Bt){kt[Bt]=ut.call(this,Nt,Bt)}),this._transitions=_(kt),this},N.prototype.on=function(ut,nt){return this.each(function(){this.addEventListener(ut,nt)}),this},N.prototype.call=function(ut){for(var nt=[],kt=1;kt<arguments.length;kt++)nt[kt-1]=arguments[kt];return ut.call.apply(ut,(0,l.ev)([this._parent,this],(0,l.CR)(nt),!1)),this},N.prototype.node=function(){return this._elements[0]},N.prototype.nodes=function(){return this._elements},N.prototype.transitions=function(){return this._transitions.filter(function(ut){return!!ut})},N.prototype.parent=function(){return this._parent};var et,tt,Ct;return tt=N,et=new WeakSet,Ct=function(nt,kt){var Nt=this._elements[0],Bt=Nt.querySelector(nt);if(Bt)return new tt([Bt],null,this._parent,this._document);var Xt=typeof kt=="string"?this.createElement(kt):kt();return Nt.appendChild(Xt),new tt([Xt],null,this._parent,this._document)},N.registry={g:g.ZA,rect:g.UL,circle:g.Cd,path:g.y$,text:P.x,ellipse:g.Pj,image:g.Ee,line:g.x1,polygon:g.mg,polyline:g.aH,html:g.k9},N}();function x(N){return new I([N],null,N,N.ownerDocument)}function k(N,et,tt){return N.querySelector(et)?x(N).select(et):x(N).append(tt)}},98294:function(Tt,vt,d){"use strict";d.d(vt,{j:function(){return O}});var l=d(1933),R=d(39934);function O(_){if((0,l.Z)(_))return[_,_,_,_];if((0,R.Z)(_)){var g=_.length;if(g===1)return[_[0],_[0],_[0],_[0]];if(g===2)return[_[0],_[1],_[0],_[1]];if(g===3)return[_[0],_[1],_[2],_[1]];if(g===4)return _}return[0,0,0,0]}},2080:function(Tt,vt,d){"use strict";d.d(vt,{DM:function(){return b},_v:function(){return O},wE:function(){return g}});var l=d(80813);function R(A){var I=A&&A.getRenderBounds();if(!I)return{width:0,height:0};var x=I.getMax(),k=I.getMin();return{width:x[0]-k[0],height:x[1]-k[1]}}function O(A){var I=A.getLocalBounds(),x=I.min,k=I.max,N=(0,l.CR)([x,k],2),et=(0,l.CR)(N[0],2),tt=et[0],Ct=et[1],ut=(0,l.CR)(N[1],2),nt=ut[0],kt=ut[1];return{x:tt,y:Ct,width:nt-tt,height:kt-Ct,left:tt,bottom:kt,top:Ct,right:nt}}function _(A,I){var x=select(A).append("text").node();return x.attr(__assign(__assign({},I),{visibility:"hidden"})),x}function g(A,I){var x=(0,l.CR)(A,2),k=x[0],N=x[1],et=(0,l.CR)(I,2),tt=et[0],Ct=et[1];return k!==tt&&N===Ct}function P(A,I){var x=__read(A,2),k=x[0],N=x[1],et=__read(I,2),tt=et[0],Ct=et[1];return k===tt&&N!==Ct}function b(A,I){var x,k,N=I.attributes;try{for(var et=(0,l.XA)(Object.entries(N)),tt=et.next();!tt.done;tt=et.next()){var Ct=(0,l.CR)(tt.value,2),ut=Ct[0],nt=Ct[1];ut!=="id"&&ut!=="className"&&A.attr(ut,nt)}}catch(kt){x={error:kt}}finally{try{tt&&!tt.done&&(k=et.return)&&k.call(et)}finally{if(x)throw x.error}}}},88839:function(Tt,vt,d){"use strict";d.d(vt,{MC:function(){return P},Hm:function(){return x},zs:function(){return A},dq:function(){return I}});var l=d(80813);function R(k){return k.toString().charAt(0).toUpperCase()+k.toString().slice(1)}function O(k){return k.toString().charAt(0).toLowerCase()+k.toString().slice(1)}function _(k,N){return"".concat(N).concat(R(k))}function g(k,N,et){var tt;et===void 0&&(et=!0);var Ct=N||((tt=k.match(/^([a-z][a-z0-9]+)/))===null||tt===void 0?void 0:tt[0])||"",ut=k.replace(new RegExp("^(".concat(Ct,")")),"");return et?O(ut):ut}function P(k,N){Object.entries(N).forEach(function(et){var tt=(0,l.CR)(et,2),Ct=tt[0],ut=tt[1];(0,l.ev)([k],(0,l.CR)(k.querySelectorAll(Ct)),!1).filter(function(nt){return nt.matches(Ct)}).forEach(function(nt){if(nt){var kt=nt;kt.style.cssText+=Object.entries(ut).reduce(function(Nt,Bt){return"".concat(Nt).concat(Bt.join(":"),";")},"")}})})}var b=function(k,N){if(!(k!=null&&k.startsWith(N)))return!1;var et=k[N.length];return et>="A"&&et<="Z"};function A(k,N,et){et===void 0&&(et=!1);var tt={};return Object.entries(k).forEach(function(Ct){var ut=(0,l.CR)(Ct,2),nt=ut[0],kt=ut[1];if(!(nt==="className"||nt==="class")){if(b(nt,"show")&&b(g(nt,"show"),N)!==et)nt===_(N,"show")?tt[nt]=kt:tt[nt.replace(new RegExp(R(N)),"")]=kt;else if(!b(nt,"show")&&b(nt,N)!==et){var Nt=g(nt,N);Nt==="filter"&&typeof kt=="function"||(tt[Nt]=kt)}}}),tt}function I(k,N){return Object.entries(k).reduce(function(et,tt){var Ct=(0,l.CR)(tt,2),ut=Ct[0],nt=Ct[1];return ut.startsWith("show")?et["show".concat(N).concat(ut.slice(4))]=nt:et["".concat(N).concat(R(ut))]=nt,et},{})}function x(k,N){N===void 0&&(N=["x","y","class","className"]);var et=["transform","transformOrigin","anchor","visibility","pointerEvents","zIndex","cursor","clipPath","clipPathTargets","offsetPath","offsetPathTargets","offsetDistance","draggable","droppable"],tt={},Ct={};return Object.entries(k).forEach(function(ut){var nt=(0,l.CR)(ut,2),kt=nt[0],Nt=nt[1];N.includes(kt)||(et.indexOf(kt)!==-1?Ct[kt]=Nt:tt[kt]=Nt)}),[tt,Ct]}},58533:function(Tt,vt,d){"use strict";d.d(vt,{Rm:function(){return I},U4:function(){return A},Ux:function(){return P},qT:function(){return b}});var l=d(14675),R=d(40455),O,_;function g(x){_=x}var P=(0,R.Z)(function(x,k){var N=k.fontSize,et=k.fontFamily,tt=k.fontWeight,Ct=k.fontStyle,ut=k.fontVariant;return _?_(x,N):(O||(O=l.GZ.offscreenCanvasCreator.getOrCreateContext(void 0)),O.font=[Ct,ut,tt,"".concat(N,"px"),et].join(" "),O.measureText(x).width)},function(x,k){return[x,Object.values(k||b(x)).join()].join("")},4096),b=function(x){var k=x.style.fontFamily||"sans-serif",N=x.style.fontWeight||"normal",et=x.style.fontStyle||"normal",tt=x.style.fontVariant,Ct=x.style.fontSize;return Ct=typeof Ct=="object"?Ct.value:Ct,{fontSize:Ct,fontFamily:k,fontWeight:N,fontStyle:et,fontVariant:tt}};function A(x){return x.nodeName==="text"?x:x.nodeName==="g"&&x.children.length===1&&x.children[0].nodeName==="text"?x.children[0]:null}function I(x,k){var N=A(x);N&&N.attr(k)}},69014:function(Tt,vt,d){"use strict";d.d(vt,{Cp:function(){return O},$Z:function(){return R},WD:function(){return _}});function l(g,P){P(g),g.children&&g.children.forEach(function(b){b&&l(b,P)})}function R(g){_(g,!0)}function O(g){_(g,!1)}function _(g,P){var b=P?"visible":"hidden";l(g,function(A){A.attr("visibility",b)})}},49336:function(Tt,vt){"use strict";var d="*",l=function(){function R(){this._events={}}return R.prototype.on=function(O,_,g){return this._events[O]||(this._events[O]=[]),this._events[O].push({callback:_,once:!!g}),this},R.prototype.once=function(O,_){return this.on(O,_,!0)},R.prototype.emit=function(O){for(var _=this,g=[],P=1;P<arguments.length;P++)g[P-1]=arguments[P];var b=this._events[O]||[],A=this._events[d]||[],I=function(x){for(var k=x.length,N=0;N<k;N++)if(x[N]){var et=x[N],tt=et.callback,Ct=et.once;Ct&&(x.splice(N,1),x.length===0&&delete _._events[O],k--,N--),tt.apply(_,g)}};I(b),I(A)},R.prototype.off=function(O,_){if(!O)this._events={};else if(!_)delete this._events[O];else{for(var g=this._events[O]||[],P=g.length,b=0;b<P;b++)g[b].callback===_&&(g.splice(b,1),P--,b--);g.length===0&&delete this._events[O]}return this},R.prototype.getEvents=function(){return this._events},R}();vt.Z=l},14634:function(Tt,vt,d){"use strict";d.d(vt,{Th:function(){return Wt}});var l=d(83652),R=d(67732),O=d(22214),_=d(42403),g=d(77263),P=d(20068),b=d(42978),A=d(70208);function I(y,E){var c=E.cx,f=c===void 0?0:c,w=E.cy,Z=w===void 0?0:w,z=E.r;y.arc(f,Z,z,0,Math.PI*2,!1)}function x(y,E){var c=E.cx,f=c===void 0?0:c,w=E.cy,Z=w===void 0?0:w,z=E.rx,H=E.ry;if(y.ellipse)y.ellipse(f,Z,z,H,0,0,Math.PI*2,!1);else{var q=z>H?z:H,Dt=z>H?1:z/H,U=z>H?H/z:1;y.save(),y.scale(Dt,U),y.arc(f,Z,q,0,Math.PI*2)}}function k(y,E){var c=E.x1,f=E.y1,w=E.x2,Z=E.y2,z=E.markerStart,H=E.markerEnd,q=E.markerStartOffset,Dt=E.markerEndOffset,U=0,Y=0,G=0,J=0,pt=0,Kt,yt;z&&(0,g.RV)(z)&&q&&(Kt=w-c,yt=Z-f,pt=Math.atan2(yt,Kt),U=Math.cos(pt)*(q||0),Y=Math.sin(pt)*(q||0)),H&&(0,g.RV)(H)&&Dt&&(Kt=c-w,yt=f-Z,pt=Math.atan2(yt,Kt),G=Math.cos(pt)*(Dt||0),J=Math.sin(pt)*(Dt||0)),y.moveTo(c+U,f+Y),y.lineTo(w+G,Z+J)}function N(y,E){var c=E.markerStart,f=E.markerEnd,w=E.markerStartOffset,Z=E.markerEndOffset,z=E.d,H=z.absolutePath,q=z.segments,Dt=0,U=0,Y=0,G=0,J=0,pt,Kt;if(c&&(0,g.RV)(c)&&w){var yt=c.parentNode.getStartTangent(),Qt=(0,b.Z)(yt,2),ct=Qt[0],ht=Qt[1];pt=ct[0]-ht[0],Kt=ct[1]-ht[1],J=Math.atan2(Kt,pt),Dt=Math.cos(J)*(w||0),U=Math.sin(J)*(w||0)}if(f&&(0,g.RV)(f)&&Z){var rt=f.parentNode.getEndTangent(),$t=(0,b.Z)(rt,2),Ht=$t[0],ue=$t[1];pt=Ht[0]-ue[0],Kt=Ht[1]-ue[1],J=Math.atan2(Kt,pt),Y=Math.cos(J)*(Z||0),G=Math.sin(J)*(Z||0)}for(var Ee=0;Ee<H.length;Ee++){var ie=H[Ee],Pe=ie[0],Be=H[Ee+1],He=Ee===0&&(Dt!==0||U!==0),en=(Ee===H.length-1||Be&&(Be[0]==="M"||Be[0]==="Z"))&&Y!==0&&G!==0,un=He?[Dt,U]:[0,0],mn=(0,b.Z)(un,2),Sn=mn[0],Pn=mn[1],$n=en?[Y,G]:[0,0],Wn=(0,b.Z)($n,2),Xn=Wn[0],An=Wn[1];switch(Pe){case"M":y.moveTo(ie[1]+Sn,ie[2]+Pn);break;case"L":y.lineTo(ie[1]+Xn,ie[2]+An);break;case"Q":y.quadraticCurveTo(ie[1],ie[2],ie[3]+Xn,ie[4]+An);break;case"C":y.bezierCurveTo(ie[1],ie[2],ie[3],ie[4],ie[5]+Xn,ie[6]+An);break;case"A":{var Zn=q[Ee].arcParams,qn=Zn.cx,er=Zn.cy,Cr=Zn.rx,Un=Zn.ry,ar=Zn.startAngle,ii=Zn.endAngle,Or=Zn.xRotation,Lr=Zn.sweepFlag;if(y.ellipse)y.ellipse(qn,er,Cr,Un,Or,ar,ii,!!(1-Lr));else{var fi=Cr>Un?Cr:Un,zr=Cr>Un?1:Cr/Un,Er=Cr>Un?Un/Cr:1;y.translate(qn,er),y.rotate(Or),y.scale(zr,Er),y.arc(0,0,fi,ar,ii,!!(1-Lr)),y.scale(1/zr,1/Er),y.rotate(-Or),y.translate(-qn,-er)}en&&y.lineTo(ie[6]+Y,ie[7]+G);break}case"Z":y.closePath();break}}}function et(y,E){var c=E.markerStart,f=E.markerEnd,w=E.markerStartOffset,Z=E.markerEndOffset,z=E.points.points,H=z.length,q=z[0][0],Dt=z[0][1],U=z[H-1][0],Y=z[H-1][1],G=0,J=0,pt=0,Kt=0,yt=0,Qt,ct;c&&(0,g.RV)(c)&&w&&(Qt=z[1][0]-z[0][0],ct=z[1][1]-z[0][1],yt=Math.atan2(ct,Qt),G=Math.cos(yt)*(w||0),J=Math.sin(yt)*(w||0)),f&&(0,g.RV)(f)&&Z&&(Qt=z[H-1][0]-z[0][0],ct=z[H-1][1]-z[0][1],yt=Math.atan2(ct,Qt),pt=Math.cos(yt)*(Z||0),Kt=Math.sin(yt)*(Z||0)),y.moveTo(q+(G||pt),Dt+(J||Kt));for(var ht=1;ht<H-1;ht++){var rt=z[ht];y.lineTo(rt[0],rt[1])}y.lineTo(U,Y)}function tt(y,E){var c=E.markerStart,f=E.markerEnd,w=E.markerStartOffset,Z=E.markerEndOffset,z=E.points.points,H=z.length,q=z[0][0],Dt=z[0][1],U=z[H-1][0],Y=z[H-1][1],G=0,J=0,pt=0,Kt=0,yt=0,Qt,ct;c&&(0,g.RV)(c)&&w&&(Qt=z[1][0]-z[0][0],ct=z[1][1]-z[0][1],yt=Math.atan2(ct,Qt),G=Math.cos(yt)*(w||0),J=Math.sin(yt)*(w||0)),f&&(0,g.RV)(f)&&Z&&(Qt=z[H-2][0]-z[H-1][0],ct=z[H-2][1]-z[H-1][1],yt=Math.atan2(ct,Qt),pt=Math.cos(yt)*(Z||0),Kt=Math.sin(yt)*(Z||0)),y.moveTo(q+G,Dt+J);for(var ht=1;ht<H-1;ht++){var rt=z[ht];y.lineTo(rt[0],rt[1])}y.lineTo(U+pt,Y+Kt)}function Ct(y,E){var c=E.x,f=c===void 0?0:c,w=E.y,Z=w===void 0?0:w,z=E.radius,H=E.width,q=E.height,Dt=H,U=q,Y=z&&z.some(function($t){return $t!==0});if(!Y)y.rect(f,Z,Dt,U);else{var G=H>0?1:-1,J=q>0?1:-1,pt=G+J===0,Kt=z.map(function($t){return(0,A.Z)($t,0,Math.min(Math.abs(Dt)/2,Math.abs(U)/2))}),yt=(0,b.Z)(Kt,4),Qt=yt[0],ct=yt[1],ht=yt[2],rt=yt[3];y.moveTo(G*Qt+f,Z),y.lineTo(Dt-G*ct+f,Z),ct!==0&&y.arc(Dt-G*ct+f,J*ct+Z,ct,-J*Math.PI/2,G>0?0:Math.PI,pt),y.lineTo(Dt+f,U-J*ht+Z),ht!==0&&y.arc(Dt-G*ht+f,U-J*ht+Z,ht,G>0?0:Math.PI,J>0?Math.PI/2:1.5*Math.PI,pt),y.lineTo(G*rt+f,U+Z),rt!==0&&y.arc(G*rt+f,U-J*rt+Z,rt,J>0?Math.PI/2:-Math.PI/2,G>0?Math.PI:0,pt),y.lineTo(f,J*Qt+Z),Qt!==0&&y.arc(G*Qt+f,J*Qt+Z,Qt,G>0?Math.PI:0,J>0?Math.PI*1.5:Math.PI/2,pt)}}var ut=function(y){function E(){var c;(0,R.Z)(this,E);for(var f=arguments.length,w=new Array(f),Z=0;Z<f;Z++)w[Z]=arguments[Z];return c=(0,O.Z)(this,E,[].concat(w)),c.name="canvas-path-generator",c}return(0,_.Z)(E,y),(0,l.Z)(E,[{key:"init",value:function(){var f,w=(f={},(0,P.Z)((0,P.Z)((0,P.Z)((0,P.Z)((0,P.Z)((0,P.Z)((0,P.Z)((0,P.Z)((0,P.Z)((0,P.Z)(f,g.bn.CIRCLE,I),g.bn.ELLIPSE,x),g.bn.RECT,Ct),g.bn.LINE,k),g.bn.POLYLINE,tt),g.bn.POLYGON,et),g.bn.PATH,N),g.bn.TEXT,void 0),g.bn.GROUP,void 0),g.bn.IMAGE,void 0),(0,P.Z)((0,P.Z)((0,P.Z)(f,g.bn.HTML,void 0),g.bn.MESH,void 0),g.bn.FRAGMENT,void 0));this.context.pathGeneratorFactory=w}},{key:"destroy",value:function(){delete this.context.pathGeneratorFactory}}])}(g.F6),nt=d(19251),kt=d(75044),Nt=d(3202),Bt=d(92421),Xt=d(60187),wt=d(52402),ot=d(66045),It=d(33885);var zt=Bt.Ue(),Ot=Bt.Ue(),pe=Bt.Ue(),xe=Xt.create(),qt=function(){function y(){var E=this;(0,R.Z)(this,y),this.isHit=function(c,f,w,Z){var z=E.context.pointInPathPickerFactory[c.nodeName];if(z){var H=Xt.invert(xe,w),q=Bt.fF(Ot,Bt.t8(pe,f[0],f[1],0),H);if(z(c,new g.E9(q[0],q[1]),Z,E.isPointInPath,E.context,E.runtime))return!0}return!1},this.isPointInPath=function(c,f){var w=E.runtime.offscreenCanvasCreator.getOrCreateContext(E.context.config.offscreenCanvas),Z=E.context.pathGeneratorFactory[c.nodeName];return Z&&(w.beginPath(),Z(w,c.parsedStyle),w.closePath()),w.isPointInPath(f.x,f.y)}}return(0,l.Z)(y,[{key:"apply",value:function(c,f){var w,Z=this,z=c.renderingService,H=c.renderingContext;this.context=c,this.runtime=f;var q=(w=H.root)===null||w===void 0?void 0:w.ownerDocument;z.hooks.pick.tapPromise(y.tag,function(){var Dt=(0,Nt.Z)((0,kt.Z)().mark(function U(Y){return(0,kt.Z)().wrap(function(G){for(;;)switch(G.prev=G.next){case 0:return G.abrupt("return",Z.pick(q,Y));case 1:case"end":return G.stop()}},U)}));return function(U){return Dt.apply(this,arguments)}}()),z.hooks.pickSync.tap(y.tag,function(Dt){return Z.pick(q,Dt)})}},{key:"pick",value:function(c,f){var w=f.topmost,Z=f.position,z=Z.x,H=Z.y,q=Bt.t8(zt,z,H,0),Dt=c.elementsFromBBox(q[0],q[1],q[0],q[1]),U=[],Y=(0,nt.Z)(Dt),G;try{for(Y.s();!(G=Y.n()).done;){var J=G.value,pt=J.getWorldTransform(),Kt=this.isHit(J,q,pt,!1);if(Kt){var yt=(0,g.Oi)(J);if(yt){var Qt=yt.parsedStyle.clipPath,ct=this.isHit(Qt,q,Qt.getWorldTransform(),!0);if(ct){if(w)return f.picked=[J],f;U.push(J)}}else{if(w)return f.picked=[J],f;U.push(J)}}}}catch(ht){Y.e(ht)}finally{Y.f()}return f.picked=U,f}}])}();qt.tag="CanvasPicker";function Ye(y,E,c){var f=y.parsedStyle,w=f.cx,Z=w===void 0?0:w,z=f.cy,H=z===void 0?0:z,q=f.r,Dt=f.fill,U=f.stroke,Y=f.lineWidth,G=Y===void 0?1:Y,J=f.increasedLineWidthForHitTesting,pt=J===void 0?0:J,Kt=f.pointerEvents,yt=Kt===void 0?"auto":Kt,Qt=(G+pt)/2,ct=(0,wt.TE)(Z,H,E.x,E.y),ht=(0,g.L1)(yt,Dt,U),rt=(0,b.Z)(ht,2),$t=rt[0],Ht=rt[1];return $t&&Ht||c?ct<=q+Qt:$t?ct<=q:Ht?ct>=q-Qt&&ct<=q+Qt:!1}function We(y,E,c,f){return y/(c*c)+E/(f*f)}function Oe(y,E,c){var f=y.parsedStyle,w=f.cx,Z=w===void 0?0:w,z=f.cy,H=z===void 0?0:z,q=f.rx,Dt=f.ry,U=f.fill,Y=f.stroke,G=f.lineWidth,J=G===void 0?1:G,pt=f.increasedLineWidthForHitTesting,Kt=pt===void 0?0:pt,yt=f.pointerEvents,Qt=yt===void 0?"auto":yt,ct=E.x,ht=E.y,rt=(0,g.L1)(Qt,U,Y),$t=(0,b.Z)(rt,2),Ht=$t[0],ue=$t[1],Ee=(J+Kt)/2,ie=(ct-Z)*(ct-Z),Pe=(ht-H)*(ht-H);return Ht&&ue||c?We(ie,Pe,q+Ee,Dt+Ee)<=1:Ht?We(ie,Pe,q,Dt)<=1:ue?We(ie,Pe,q-Ee,Dt-Ee)>=1&&We(ie,Pe,q+Ee,Dt+Ee)<=1:!1}function Qe(y,E,c,f,w,Z){return w>=y&&w<=y+c&&Z>=E&&Z<=E+f}function Mt(y,E,c,f,w,Z,z){var H=w/2;return Qe(y-H,E-H,c,w,Z,z)||Qe(y+c-H,E-H,w,f,Z,z)||Qe(y+H,E+f-H,c,w,Z,z)||Qe(y-H,E+H,w,f,Z,z)}function ne(y,E,c,f,w,Z,z,H){var q=(Math.atan2(H-E,z-y)+Math.PI*2)%(Math.PI*2),Dt={x:y+c*Math.cos(q),y:E+c*Math.sin(q)};return(0,wt.TE)(Dt.x,Dt.y,z,H)<=Z/2}function Me(y,E,c,f,w,Z,z){var H=Math.min(y,c),q=Math.max(y,c),Dt=Math.min(E,f),U=Math.max(E,f),Y=w/2;return Z>=H-Y&&Z<=q+Y&&z>=Dt-Y&&z<=U+Y?(0,wt._x)(y,E,c,f,Z,z)<=w/2:!1}function nn(y,E,c,f,w){var Z=y.length;if(Z<2)return!1;for(var z=0;z<Z-1;z++){var H=y[z][0],q=y[z][1],Dt=y[z+1][0],U=y[z+1][1];if(Me(H,q,Dt,U,E,c,f))return!0}if(w){var Y=y[0],G=y[Z-1];if(Me(Y[0],Y[1],G[0],G[1],E,c,f))return!0}return!1}var le=1e-6;function be(y){return Math.abs(y)<le?0:y<0?-1:1}function De(y,E,c){return(c[0]-y[0])*(E[1]-y[1])===(E[0]-y[0])*(c[1]-y[1])&&Math.min(y[0],E[0])<=c[0]&&c[0]<=Math.max(y[0],E[0])&&Math.min(y[1],E[1])<=c[1]&&c[1]<=Math.max(y[1],E[1])}function Yt(y,E,c){var f=!1,w=y.length;if(w<=2)return!1;for(var Z=0;Z<w;Z++){var z=y[Z],H=y[(Z+1)%w];if(De(z,H,[E,c]))return!0;be(z[1]-c)>0!=be(H[1]-c)>0&&be(E-(c-z[1])*(z[0]-H[0])/(z[1]-H[1])-z[0])<0&&(f=!f)}return f}function re(y,E,c){for(var f=!1,w=0;w<y.length;w++){var Z=y[w];if(f=Yt(Z,E,c),f)break}return f}function xt(y,E,c){var f=y.parsedStyle,w=f.x1,Z=f.y1,z=f.x2,H=f.y2,q=f.lineWidth,Dt=q===void 0?1:q,U=f.increasedLineWidthForHitTesting,Y=U===void 0?0:U,G=f.pointerEvents,J=G===void 0?"auto":G,pt=f.fill,Kt=f.stroke,yt=(0,g.L1)(J,pt,Kt),Qt=(0,b.Z)(yt,2),ct=Qt[1];return!ct&&!c||!Dt?!1:Me(w,Z,z,H,Dt+Y,E.x,E.y)}function at(y,E,c,f,w){for(var Z=!1,z=E/2,H=0;H<y.length;H++){var q=y[H],Dt=q.currentPoint,U=q.params,Y=q.prePoint,G=q.box;if(!(G&&!Qe(G.x-z,G.y-z,G.width+E,G.height+E,c,f)))switch(q.command){case"L":case"Z":if(Z=Me(Y[0],Y[1],Dt[0],Dt[1],E,c,f),Z)return!0;break;case"Q":var J=(0,wt.Y1)(Y[0],Y[1],U[1],U[2],U[3],U[4],c,f);if(Z=J<=E/2,Z)return!0;break;case"C":var pt=(0,wt.ph)(Y[0],Y[1],U[1],U[2],U[3],U[4],U[5],U[6],c,f,w);if(Z=pt<=E/2,Z)return!0;break;case"A":q.cubicParams||(q.cubicParams=(0,ot.W)(Y[0],Y[1],U[1],U[2],U[3],U[4],U[5],U[6],U[7],void 0));for(var Kt=q.cubicParams,yt=Y,Qt=0;Qt<Kt.length;Qt+=6){var ct=(0,wt.ph)(yt[0],yt[1],Kt[Qt],Kt[Qt+1],Kt[Qt+2],Kt[Qt+3],Kt[Qt+4],Kt[Qt+5],c,f,w);if(yt=[Kt[Qt+4],Kt[Qt+5]],Z=ct<=E/2,Z)return!0}break}}return Z}function se(y,E,c,f,w,Z){var z=y.parsedStyle,H=z.lineWidth,q=H===void 0?1:H,Dt=z.increasedLineWidthForHitTesting,U=Dt===void 0?0:Dt,Y=z.stroke,G=z.fill,J=z.d,pt=z.pointerEvents,Kt=pt===void 0?"auto":pt,yt=J.segments,Qt=J.hasArc,ct=J.polylines,ht=J.polygons,rt=(0,g.L1)(Kt,(ht==null?void 0:ht.length)&&G,Y),$t=(0,b.Z)(rt,2),Ht=$t[0],ue=$t[1],Ee=(0,g.gz)(y),ie=!1;return Ht||c?(Qt?ie=f(y,E):ie=re(ht,E.x,E.y)||re(ct,E.x,E.y),ie):((ue||c)&&(ie=at(yt,q+U,E.x,E.y,Ee)),ie)}function Fe(y,E,c){var f=y.parsedStyle,w=f.stroke,Z=f.fill,z=f.lineWidth,H=z===void 0?1:z,q=f.increasedLineWidthForHitTesting,Dt=q===void 0?0:q,U=f.points,Y=f.pointerEvents,G=Y===void 0?"auto":Y,J=(0,g.L1)(G,Z,w),pt=(0,b.Z)(J,2),Kt=pt[0],yt=pt[1],Qt=!1;return(yt||c)&&(Qt=nn(U.points,H+Dt,E.x,E.y,!0)),!Qt&&(Kt||c)&&(Qt=Yt(U.points,E.x,E.y)),Qt}function Re(y,E,c){var f=y.parsedStyle,w=f.lineWidth,Z=w===void 0?1:w,z=f.increasedLineWidthForHitTesting,H=z===void 0?0:z,q=f.points,Dt=f.pointerEvents,U=Dt===void 0?"auto":Dt,Y=f.fill,G=f.stroke,J=(0,g.L1)(U,Y,G),pt=(0,b.Z)(J,2),Kt=pt[1];return!Kt&&!c||!Z?!1:nn(q.points,Z+H,E.x,E.y,!1)}function ge(y,E,c,f,w){var Z=y.parsedStyle,z=Z.radius,H=Z.fill,q=Z.stroke,Dt=Z.lineWidth,U=Dt===void 0?1:Dt,Y=Z.increasedLineWidthForHitTesting,G=Y===void 0?0:Y,J=Z.x,pt=J===void 0?0:J,Kt=Z.y,yt=Kt===void 0?0:Kt,Qt=Z.width,ct=Z.height,ht=Z.pointerEvents,rt=ht===void 0?"auto":ht,$t=(0,g.L1)(rt,H,q),Ht=(0,b.Z)($t,2),ue=Ht[0],Ee=Ht[1],ie=z&&z.some(function(en){return en!==0}),Pe=U+G;if(ie){var He=!1;return(Ee||c)&&(He=Ie(pt,yt,Qt,ct,z.map(function(en){return(0,A.Z)(en,0,Math.min(Math.abs(Qt)/2,Math.abs(ct)/2))}),Pe,E.x,E.y)),!He&&(ue||c)&&(He=f(y,E)),He}else{var Be=Pe/2;if(ue&&Ee||c)return Qe(pt-Be,yt-Be,Qt+Be,ct+Be,E.x,E.y);if(ue)return Qe(pt,yt,Qt,ct,E.x,E.y);if(Ee)return Mt(pt,yt,Qt,ct,Pe,E.x,E.y)}return!1}function Ie(y,E,c,f,w,Z,z,H){var q=(0,b.Z)(w,4),Dt=q[0],U=q[1],Y=q[2],G=q[3];return Me(y+Dt,E,y+c-U,E,Z,z,H)||Me(y+c,E+U,y+c,E+f-Y,Z,z,H)||Me(y+c-Y,E+f,y+G,E+f,Z,z,H)||Me(y,E+f-G,y,E+Dt,Z,z,H)||ne(y+c-U,E+U,U,1.5*Math.PI,2*Math.PI,Z,z,H)||ne(y+c-Y,E+f-Y,Y,0,.5*Math.PI,Z,z,H)||ne(y+G,E+f-G,G,.5*Math.PI,Math.PI,Z,z,H)||ne(y+Dt,E+Dt,Dt,Math.PI,1.5*Math.PI,Z,z,H)}function Ne(y,E,c,f,w,Z){var z=y.parsedStyle,H=z.pointerEvents,q=H===void 0?"auto":H,Dt=z.x,U=Dt===void 0?0:Dt,Y=z.y,G=Y===void 0?0:Y,J=z.width,pt=z.height;if(q==="non-transparent-pixel"){var Kt=w.config.offscreenCanvas,yt=Z.offscreenCanvasCreator.getOrCreateCanvas(Kt),Qt=Z.offscreenCanvasCreator.getOrCreateContext(Kt,{willReadFrequently:!0});yt.width=J,yt.height=pt,w.defaultStyleRendererFactory[g.bn.IMAGE].render(Qt,(0,It.Z)((0,It.Z)({},y.parsedStyle),{},{x:0,y:0}),y,void 0,void 0,void 0);var ct=Qt.getImageData(E.x-U,E.y-G,1,1).data;return ct.every(function(ht){return ht!==0})}return!0}function bt(y,E,c,f){var w=y.getGeometryBounds();return E.x>=w.min[0]&&E.y>=w.min[1]&&E.x<=w.max[0]&&E.y<=w.max[1]}var Jt=function(y){function E(){var c;(0,R.Z)(this,E);for(var f=arguments.length,w=new Array(f),Z=0;Z<f;Z++)w[Z]=arguments[Z];return c=(0,O.Z)(this,E,[].concat(w)),c.name="canvas-picker",c}return(0,_.Z)(E,y),(0,l.Z)(E,[{key:"init",value:function(){var f,w=(f={},(0,P.Z)((0,P.Z)((0,P.Z)((0,P.Z)((0,P.Z)((0,P.Z)((0,P.Z)((0,P.Z)((0,P.Z)((0,P.Z)(f,g.bn.CIRCLE,Ye),g.bn.ELLIPSE,Oe),g.bn.RECT,ge),g.bn.LINE,xt),g.bn.POLYLINE,Re),g.bn.POLYGON,Fe),g.bn.PATH,se),g.bn.TEXT,bt),g.bn.GROUP,null),g.bn.IMAGE,Ne),(0,P.Z)((0,P.Z)(f,g.bn.HTML,null),g.bn.MESH,null));this.context.pointInPathPickerFactory=w,this.addRenderingPlugin(new qt)}},{key:"destroy",value:function(){delete this.context.pointInPathPickerFactory,this.removeAllRenderingPlugins()}}])}(g.F6),oe=d(94480);function M(y,E){if(!{}.hasOwnProperty.call(y,E))throw new TypeError("attempted to use private field on non-instance");return y}var Q=0;function te(y){return"__private_"+Q+++"_"+y}var Ut=d(76075),we=d(71879);var Ce=function(){function y(){(0,R.Z)(this,y),this.cacheStore=new Map}return(0,l.Z)(y,[{key:"onRefAdded",value:function(c){}},{key:"has",value:function(c){return this.cacheStore.has(c)}},{key:"put",value:function(c,f,w){return this.cacheStore.has(c)?!1:(this.cacheStore.set(c,{value:f,counter:new Set([w.entity])}),this.onRefAdded(w),!0)}},{key:"get",value:function(c,f){var w=this.cacheStore.get(c);return w?(w.counter.has(f.entity)||(w.counter.add(f.entity),this.onRefAdded(f)),w.value):null}},{key:"update",value:function(c,f,w){var Z=this.cacheStore.get(c);return Z?(Z.value=(0,It.Z)((0,It.Z)({},Z.value),f),Z.counter.has(w.entity)||(Z.counter.add(w.entity),this.onRefAdded(w)),!0):!1}},{key:"release",value:function(c,f){var w=this.cacheStore.get(c);return w?(w.counter.delete(f.entity),w.counter.size<=0&&this.cacheStore.delete(c),!0):!1}},{key:"releaseRef",value:function(c){var f=this;Array.from(this.cacheStore.keys()).forEach(function(w){f.release(w,c)})}},{key:"getSize",value:function(){return this.cacheStore.size}},{key:"clear",value:function(){this.cacheStore.clear()}}])}(),_e=[],mt=[],X=function(){function y(){(0,R.Z)(this,y)}return(0,l.Z)(y,null,[{key:"stop",value:function(){var c=arguments.length>0&&arguments[0]!==void 0?arguments[0]:y.api;y.rafId&&(c.cancelAnimationFrame(y.rafId),y.rafId=null)}},{key:"executeTask",value:function(){var c=arguments.length>0&&arguments[0]!==void 0?arguments[0]:y.api;_e.length<=0&&mt.length<=0||(mt.forEach(function(f){return f()}),mt=_e.splice(0,y.TASK_NUM_PER_FRAME),y.rafId=c.requestAnimationFrame(function(){y.executeTask(c)}))}},{key:"sliceImage",value:function(c,f,w,Z){for(var z=arguments.length>4&&arguments[4]!==void 0?arguments[4]:0,H=arguments.length>5&&arguments[5]!==void 0?arguments[5]:y.api,q=c.naturalWidth||c.width,Dt=c.naturalHeight||c.height,U=f-z,Y=w-z,G=Math.ceil(q/U),J=Math.ceil(Dt/Y),pt={tileSize:[f,w],gridSize:[J,G],tiles:Array(J).fill(null).map(function(){return Array(G).fill(null)})},Kt=function(ct){for(var ht=function(Ht){_e.push(function(){var ue=Ht*U,Ee=ct*Y,ie=[Math.min(f,q-ue),Math.min(w,Dt-Ee)],Pe=ie[0],Be=ie[1],He=H.createCanvas();He.width=f,He.height=w;var en=He.getContext("2d");en.drawImage(c,ue,Ee,Pe,Be,0,0,Pe,Be),pt.tiles[ct][Ht]={x:ue,y:Ee,tileX:Ht,tileY:ct,data:He},Z()})},rt=0;rt<G;rt++)ht(rt)},yt=0;yt<J;yt++)Kt(yt);return y.stop(),y.executeTask(),pt}}])}();X.TASK_NUM_PER_FRAME=10;var Pt=new Ce;Pt.onRefAdded=function(E){var c=this;E.addEventListener(g.Dk.DESTROY,function(){c.releaseRef(E)},{once:!0})};var At=function(){function y(E,c){(0,R.Z)(this,y),this.gradientCache={},this.patternCache={},this.context=E,this.runtime=c}return(0,l.Z)(y,[{key:"getImageSync",value:function(c,f,w){var Z=(0,we.Z)(c)?c:c.src;if(Pt.has(Z)){var z=Pt.get(Z,f);if(z.img.complete)return w==null||w(z),z}return this.getOrCreateImage(c,f).then(function(H){w==null||w(H)}).catch(function(H){console.error(H)}),null}},{key:"getOrCreateImage",value:function(c,f){var w=this,Z=(0,we.Z)(c)?c:c.src;if(!(0,we.Z)(c)&&!Pt.has(Z)){var z={img:c,size:[c.naturalWidth||c.width,c.naturalHeight||c.height],tileSize:Rt(c)};Pt.put(Z,z,f)}if(Pt.has(Z)){var H=Pt.get(Z,f);return H.img.complete?Promise.resolve(H):new Promise(function(q,Dt){H.img.addEventListener("load",function(){H.size=[H.img.naturalWidth||H.img.width,H.img.naturalHeight||H.img.height],H.tileSize=Rt(H.img),q(H)}),H.img.addEventListener("error",function(U){Dt(U)})})}return new Promise(function(q,Dt){var U=w.context.config.createImage();if(U){var Y={img:U,size:[0,0],tileSize:Rt(U)};Pt.put(Z,Y,f),U.onload=function(){Y.size=[U.naturalWidth||U.width,U.naturalHeight||U.height],Y.tileSize=Rt(Y.img),q(Y)},U.onerror=function(G){Dt(G)},U.crossOrigin="Anonymous",U.src=Z}})}},{key:"createDownSampledImage",value:function(){var E=(0,Nt.Z)((0,kt.Z)().mark(function f(w,Z){var z,H,q,Dt,U,Y,G,J,pt,Kt,yt,Qt,ct,ht;return(0,kt.Z)().wrap(function(rt){for(;;)switch(rt.prev=rt.next){case 0:return rt.next=1,this.getOrCreateImage(w,Z);case 1:if(z=rt.sent,typeof z.downSamplingRate=="undefined"){rt.next=2;break}return rt.abrupt("return",z);case 2:if(H=this.context.config.enableLargeImageOptimization,q=typeof H=="boolean"?{}:H,Dt=q.maxDownSampledImageSize,U=Dt===void 0?2048:Dt,Y=q.downSamplingRateThreshold,G=Y===void 0?.5:Y,J=this.runtime.globalThis.createImageBitmap,pt=(0,b.Z)(z.size,2),Kt=pt[0],yt=pt[1],Qt=z.img,ct=Math.min((U+U)/(Kt+yt),Math.max(.01,Math.min(G,.5))),ht=(0,It.Z)((0,It.Z)({},z),{},{downSamplingRate:ct}),Pt.update(z.img.src,ht,Z),!J){rt.next=7;break}return rt.prev=3,rt.next=4,J(z.img,{resizeWidth:Kt*ct,resizeHeight:yt*ct});case 4:Qt=rt.sent,rt.next=6;break;case 5:rt.prev=5,rt.catch(3),ct=1;case 6:rt.next=8;break;case 7:ct=1;case 8:return ht=(0,It.Z)((0,It.Z)({},this.getImageSync(w,Z)),{},{downSampled:Qt,downSamplingRate:ct}),Pt.update(z.img.src,ht,Z),rt.abrupt("return",ht);case 9:case"end":return rt.stop()}},f,this,[[3,5]])}));function c(f,w){return E.apply(this,arguments)}return c}()},{key:"createImageTiles",value:function(){var E=(0,Nt.Z)((0,kt.Z)().mark(function f(w,Z,z,H){var q,Dt,U,Y,G;return(0,kt.Z)().wrap(function(J){for(;;)switch(J.prev=J.next){case 0:return J.next=1,this.getOrCreateImage(w,H);case 1:return q=J.sent,Dt=H.ownerDocument.defaultView,U=Dt.requestAnimationFrame,Y=Dt.cancelAnimationFrame,X.api={requestAnimationFrame:U,cancelAnimationFrame:Y,createCanvas:function(){return g.jB.createCanvas()}},G=(0,It.Z)((0,It.Z)({},q),X.sliceImage(q.img,q.tileSize[0],q.tileSize[0],z)),Pt.update(q.img.src,G,H),J.abrupt("return",G);case 2:case"end":return J.stop()}},f,this)}));function c(f,w,Z,z){return E.apply(this,arguments)}return c}()},{key:"releaseImage",value:function(c,f){Pt.release((0,we.Z)(c)?c:c.src,f)}},{key:"releaseImageRef",value:function(c){Pt.releaseRef(c)}},{key:"getOrCreatePatternSync",value:function(c,f,w,Z,z,H,q){var Dt=this.generatePatternKey(f);if(Dt&&this.patternCache[Dt])return this.patternCache[Dt];var U=f.image,Y=f.repetition,G=f.transform,J,pt=!1;if((0,we.Z)(U)){var Kt=this.getImageSync(U,c,q);J=Kt==null?void 0:Kt.img}else Z?(J=Z,pt=!0):J=U;var yt=J&&w.createPattern(J,Y);if(yt){var Qt;G?Qt=(0,g.G0)((0,g.G$)(G),new g.s$({})):Qt=Xt.identity(Xt.create()),pt&&Xt.scale(Qt,Qt,[1/z,1/z,1]),yt.setTransform({a:Qt[0],b:Qt[1],c:Qt[4],d:Qt[5],e:Qt[12]+H[0],f:Qt[13]+H[1]})}return Dt&&yt&&(this.patternCache[Dt]=yt),yt}},{key:"getOrCreateGradient",value:function(c,f){var w=this.generateGradientKey(c),Z=c.type,z=c.steps,H=c.min,q=c.width,Dt=c.height,U=c.angle,Y=c.cx,G=c.cy,J=c.size;if(this.gradientCache[w])return this.gradientCache[w];var pt=null;if(Z===g.GL.LinearGradient){var Kt=(0,g.Rx)(H,q,Dt,U),yt=Kt.x1,Qt=Kt.y1,ct=Kt.x2,ht=Kt.y2;pt=f.createLinearGradient(yt,Qt,ct,ht)}else if(Z===g.GL.RadialGradient){var rt=(0,g.o6)(H,q,Dt,Y,G,J),$t=rt.x,Ht=rt.y,ue=rt.r;pt=f.createRadialGradient($t,Ht,0,$t,Ht,ue)}return pt&&(z.forEach(function(Ee){var ie=Ee.offset,Pe=Ee.color;if(ie.unit===g.Cm.kPercentage){var Be;(Be=pt)===null||Be===void 0||Be.addColorStop(ie.value/100,Pe.toString())}}),this.gradientCache[w]=pt),this.gradientCache[w]}},{key:"generateGradientKey",value:function(c){var f=c.type,w=c.min,Z=c.width,z=c.height,H=c.steps,q=c.angle,Dt=c.cx,U=c.cy,Y=c.size;return"gradient-".concat(f,"-").concat((q==null?void 0:q.toString())||0,"-").concat((Dt==null?void 0:Dt.toString())||0,"-").concat((U==null?void 0:U.toString())||0,"-").concat((Y==null?void 0:Y.toString())||0,"-").concat(w[0],"-").concat(w[1],"-").concat(Z,"-").concat(z,"-").concat(H.map(function(G){var J=G.offset,pt=G.color;return"".concat(J).concat(pt)}).join("-"))}},{key:"generatePatternKey",value:function(c){var f=c.image,w=c.repetition;if((0,we.Z)(f))return"pattern-".concat(f,"-").concat(w);if(f.nodeName==="rect")return"pattern-".concat(f.entity,"-").concat(w)}}])}();At.isSupportTile=!!g.jB.createCanvas();function Rt(y){if(!y.complete)return[0,0];var E=y.naturalWidth||y.width,c=y.naturalHeight||y.height,f=256;return[256,512].forEach(function(w){var Z=Math.ceil(c/w),z=Math.ceil(E/w);Z*z<1e3&&(f=w)}),[f,f]}var _t=function(){function y(){(0,R.Z)(this,y)}return(0,l.Z)(y,[{key:"apply",value:function(c){var f=c.renderingService,w=c.renderingContext,Z=c.imagePool,z=w.root.ownerDocument.defaultView,H=function(Y,G,J){var pt=Y.parsedStyle,Kt=pt.width,yt=pt.height;Kt&&!yt?Y.setAttribute("height",J/G*Kt):!Kt&&yt&&Y.setAttribute("width",G/J*yt)},q=function(Y){var G=Y.target,J=G.nodeName,pt=G.attributes;if(J===g.bn.IMAGE){var Kt=pt.src,yt=pt.keepAspectRatio;Z.getImageSync(Kt,G,function(Qt){var ct=Qt.img,ht=ct.width,rt=ct.height;yt&&H(G,ht,rt),G.dirty(),f.dirty()})}},Dt=function(Y){var G=Y.target,J=Y.attrName,pt=Y.prevValue,Kt=Y.newValue;G.nodeName!==g.bn.IMAGE||J!=="src"||(pt!==Kt&&Z.releaseImage(pt,G),(0,we.Z)(Kt)&&Z.getOrCreateImage(Kt,G).then(function(yt){var Qt=yt.img,ct=Qt.width,ht=Qt.height;G.attributes.keepAspectRatio&&H(G,ct,ht),G.dirty(),f.dirty()}).catch(function(){}))};f.hooks.init.tap(y.tag,function(){z.addEventListener(g.Dk.MOUNTED,q),z.addEventListener(g.Dk.ATTR_MODIFIED,Dt)}),f.hooks.destroy.tap(y.tag,function(){z.removeEventListener(g.Dk.MOUNTED,q),z.removeEventListener(g.Dk.ATTR_MODIFIED,Dt)})}}])}();_t.tag="LoadImage";var Vt=function(y){function E(){var c;(0,R.Z)(this,E);for(var f=arguments.length,w=new Array(f),Z=0;Z<f;Z++)w[Z]=arguments[Z];return c=(0,O.Z)(this,E,[].concat(w)),c.name="image-loader",c}return(0,_.Z)(E,y),(0,l.Z)(E,[{key:"init",value:function(f){this.context.imagePool=new At(this.context,f),this.addRenderingPlugin(new _t)}},{key:"destroy",value:function(){this.removeAllRenderingPlugins()}}])}(g.F6);var ae=te("renderState"),fe=function(){function y(E){(0,R.Z)(this,y),this.removedRBushNodeAABBs=[],this.renderQueue=[],Object.defineProperty(this,ae,{writable:!0,value:{restoreStack:[],prevObject:null,currentContext:new Map}}),this.clearFullScreenLastFrame=!1,this.clearFullScreen=!1,this.vpMatrix=Xt.create(),this.dprMatrix=Xt.create(),this.tmpMat4=Xt.create(),this.vec3a=Bt.Ue(),this.vec3b=Bt.Ue(),this.vec3c=Bt.Ue(),this.vec3d=Bt.Ue(),this.canvasRendererPluginOptions=E}return(0,l.Z)(y,[{key:"apply",value:function(c,f){var w=this;this.context=c;var Z=this.context,z=Z.config,H=Z.camera,q=Z.renderingService,Dt=Z.renderingContext,U=Z.rBushRoot,Y=Z.pathGeneratorFactory,G=z.renderer.getConfig().enableRenderingOptimization;z.renderer.getConfig().enableDirtyCheck=!1,z.renderer.getConfig().enableDirtyRectangleRendering=!1,this.rBush=U,this.pathGeneratorFactory=Y;var J=c.contextService,pt=Dt.root.ownerDocument.defaultView,Kt=function(rt){var $t=rt.target,Ht=$t.rBushNode;Ht!=null&&Ht.aabb&&w.removedRBushNodeAABBs.push(Ht.aabb)},yt=function(rt){var $t=rt.target,Ht=$t.rBushNode;Ht.aabb&&w.removedRBushNodeAABBs.push(Ht.aabb)};q.hooks.init.tap(y.tag,function(){pt.addEventListener(g.Dk.UNMOUNTED,Kt),pt.addEventListener(g.Dk.CULLED,yt);var ht=J.getDPR(),rt=z.width,$t=z.height,Ht=J.getContext();w.clearRect(Ht,0,0,rt*ht,$t*ht,z.background)}),q.hooks.destroy.tap(y.tag,function(){pt.removeEventListener(g.Dk.UNMOUNTED,Kt),pt.removeEventListener(g.Dk.CULLED,yt),w.renderQueue=[],w.removedRBushNodeAABBs=[],M(w,ae)[ae]={restoreStack:[],prevObject:null,currentContext:null}});var Qt=function(){var rt,$t=J.getContext(),Ht=J.getDPR(),ue=z.width,Ee=z.height,ie=w.canvasRendererPluginOptions,Pe=ie.dirtyObjectNumThreshold,Be=ie.dirtyObjectRatioThreshold,He=q.getStats(),en=He.total,un=He.rendered,mn=un/en;w.clearFullScreen=w.clearFullScreenLastFrame||!((rt=pt.context.renderingPlugins[1])!==null&&rt!==void 0&&rt.isFirstTimeRenderingFinished)||q.disableDirtyRectangleRendering()||un>Pe&&mn>Be,$t&&(typeof $t.resetTransform=="function"?$t.resetTransform():$t.setTransform(1,0,0,1,0,0),w.clearFullScreen&&w.clearRect($t,0,0,ue*Ht,Ee*Ht,z.background))},ct=function(rt,$t){for(var Ht=[rt];Ht.length>0;){var ue,Ee=Ht.pop();Ee.isVisible()&&!Ee.isCulled()&&(G?w.renderDisplayObjectOptimized(Ee,$t,w.context,M(w,ae)[ae],f):w.renderDisplayObject(Ee,$t,w.context,M(w,ae)[ae],f));for(var ie=((ue=Ee.sortable)===null||ue===void 0||(ue=ue.sorted)===null||ue===void 0?void 0:ue.length)>0?Ee.sortable.sorted:Ee.childNodes,Pe=ie.length-1;Pe>=0;Pe--)Ht.push(ie[Pe])}};q.hooks.endFrame.tap(y.tag,function(){if(Qt(),Dt.root.childNodes.length===0){w.clearFullScreenLastFrame=!0;return}G=z.renderer.getConfig().enableRenderingOptimization,M(w,ae)[ae]={restoreStack:[],prevObject:null,currentContext:M(w,ae)[ae].currentContext},M(w,ae)[ae].currentContext.clear(),w.clearFullScreenLastFrame=!1;var ht=J.getContext(),rt=J.getDPR();if(Xt.fromScaling(w.dprMatrix,[rt,rt,1]),Xt.multiply(w.vpMatrix,w.dprMatrix,H.getOrthoMatrix()),w.clearFullScreen)G?(ht.save(),ct(Dt.root,ht),ht.restore()):ct(Dt.root,ht),w.removedRBushNodeAABBs=[];else{var $t=w.safeMergeAABB.apply(w,[w.mergeDirtyAABBs(w.renderQueue)].concat((0,oe.Z)(w.removedRBushNodeAABBs.map(function(Un){var ar=Un.minX,ii=Un.minY,Or=Un.maxX,Lr=Un.maxY,fi=new g.mN;return fi.setMinMax([ar,ii,0],[Or,Lr,0]),fi}))));if(w.removedRBushNodeAABBs=[],g.mN.isEmpty($t)){w.renderQueue=[];return}var Ht=w.convertAABB2Rect($t),ue=Ht.x,Ee=Ht.y,ie=Ht.width,Pe=Ht.height,Be=Bt.fF(w.vec3a,[ue,Ee,0],w.vpMatrix),He=Bt.fF(w.vec3b,[ue+ie,Ee,0],w.vpMatrix),en=Bt.fF(w.vec3c,[ue,Ee+Pe,0],w.vpMatrix),un=Bt.fF(w.vec3d,[ue+ie,Ee+Pe,0],w.vpMatrix),mn=Math.min(Be[0],He[0],un[0],en[0]),Sn=Math.min(Be[1],He[1],un[1],en[1]),Pn=Math.max(Be[0],He[0],un[0],en[0]),$n=Math.max(Be[1],He[1],un[1],en[1]),Wn=Math.floor(mn),Xn=Math.floor(Sn),An=Math.ceil(Pn-mn),Zn=Math.ceil($n-Sn);ht.save(),w.clearRect(ht,Wn,Xn,An,Zn,z.background),ht.beginPath(),ht.rect(Wn,Xn,An,Zn),ht.clip(),ht.setTransform(w.vpMatrix[0],w.vpMatrix[1],w.vpMatrix[4],w.vpMatrix[5],w.vpMatrix[12],w.vpMatrix[13]);var qn=z.renderer.getConfig(),er=qn.enableDirtyRectangleRenderingDebug;er&&pt.dispatchEvent(new g.Aw(g.$6.DIRTY_RECTANGLE,{dirtyRect:{x:Wn,y:Xn,width:An,height:Zn}}));var Cr=w.searchDirtyObjects($t);Cr.sort(function(Un,ar){return Un.sortable.renderOrder-ar.sortable.renderOrder}).forEach(function(Un){Un&&Un.isVisible()&&!Un.isCulled()&&w.renderDisplayObject(Un,ht,w.context,M(w,ae)[ae],f)}),ht.restore(),w.renderQueue.forEach(function(Un){w.saveDirtyAABB(Un)}),w.renderQueue=[]}M(w,ae)[ae].restoreStack.forEach(function(){ht.restore()}),M(w,ae)[ae].restoreStack=[]}),q.hooks.render.tap(y.tag,function(ht){w.clearFullScreen||w.renderQueue.push(ht)})}},{key:"clearRect",value:function(c,f,w,Z,z,H){c.clearRect(f,w,Z,z),H&&(c.fillStyle=H,c.fillRect(f,w,Z,z))}},{key:"renderDisplayObjectOptimized",value:function(c,f,w,Z,z){var H=c.nodeName,q=!1,Dt=!1,U=this.context.styleRendererFactory[H],Y=this.pathGeneratorFactory[H],G=c.parsedStyle.clipPath;if(G){q=!Z.prevObject||!Xt.exactEquals(G.getWorldTransform(),Z.prevObject.getWorldTransform()),q&&(this.applyWorldTransform(f,G),Z.prevObject=null);var J=this.pathGeneratorFactory[G.nodeName];J&&(f.save(),Dt=!0,f.beginPath(),J(f,G.parsedStyle),f.closePath(),f.clip())}if(U){q=!Z.prevObject||!Xt.exactEquals(c.getWorldTransform(),Z.prevObject.getWorldTransform()),q&&this.applyWorldTransform(f,c);var pt=!Z.prevObject;if(!pt){var Kt=Z.prevObject.nodeName;H===g.bn.TEXT?pt=Kt!==g.bn.TEXT:H===g.bn.IMAGE?pt=Kt!==g.bn.IMAGE:pt=Kt===g.bn.TEXT||Kt===g.bn.IMAGE}U.applyStyleToContext(f,c,pt,Z),Z.prevObject=c}Y&&(f.beginPath(),Y(f,c.parsedStyle),H!==g.bn.LINE&&H!==g.bn.PATH&&H!==g.bn.POLYLINE&&f.closePath()),U&&U.drawToContext(f,c,M(this,ae)[ae],this,z),Dt&&f.restore(),c.dirty(!1)}},{key:"renderDisplayObject",value:function(c,f,w,Z,z){var H=c.nodeName,q=Z.restoreStack[Z.restoreStack.length-1];q&&!(c.compareDocumentPosition(q)&g.NB.DOCUMENT_POSITION_CONTAINS)&&(f.restore(),Z.restoreStack.pop());var Dt=this.context.styleRendererFactory[H],U=this.pathGeneratorFactory[H],Y=c.parsedStyle.clipPath;if(Y){this.applyWorldTransform(f,Y);var G=this.pathGeneratorFactory[Y.nodeName];G&&(f.save(),Z.restoreStack.push(c),f.beginPath(),G(f,Y.parsedStyle),f.closePath(),f.clip())}Dt&&(this.applyWorldTransform(f,c),f.save(),this.applyAttributesToContext(f,c)),U&&(f.beginPath(),U(f,c.parsedStyle),H!==g.bn.LINE&&H!==g.bn.PATH&&H!==g.bn.POLYLINE&&f.closePath()),Dt&&(Dt.render(f,c.parsedStyle,c,w,this,z),f.restore()),c.dirty(!1)}},{key:"applyAttributesToContext",value:function(c,f){var w=f.parsedStyle,Z=w.stroke,z=w.fill,H=w.opacity,q=w.lineDash,Dt=w.lineDashOffset;q&&c.setLineDash(q),(0,Ut.Z)(Dt)||(c.lineDashOffset=Dt),(0,Ut.Z)(H)||(c.globalAlpha*=H),!(0,Ut.Z)(Z)&&!Array.isArray(Z)&&!Z.isNone&&(c.strokeStyle=f.attributes.stroke),!(0,Ut.Z)(z)&&!Array.isArray(z)&&!z.isNone&&(c.fillStyle=f.attributes.fill)}},{key:"convertAABB2Rect",value:function(c){var f=c.getMin(),w=c.getMax(),Z=Math.floor(f[0]),z=Math.floor(f[1]),H=Math.ceil(w[0]),q=Math.ceil(w[1]),Dt=H-Z,U=q-z;return{x:Z,y:z,width:Dt,height:U}}},{key:"mergeDirtyAABBs",value:function(c){var f=new g.mN;return c.forEach(function(w){var Z=w.getRenderBounds();f.add(Z);var z=w.renderable.dirtyRenderBounds;z&&f.add(z)}),f}},{key:"searchDirtyObjects",value:function(c){var f=c.getMin(),w=(0,b.Z)(f,2),Z=w[0],z=w[1],H=c.getMax(),q=(0,b.Z)(H,2),Dt=q[0],U=q[1],Y=this.rBush.search({minX:Z,minY:z,maxX:Dt,maxY:U});return Y.map(function(G){var J=G.displayObject;return J})}},{key:"saveDirtyAABB",value:function(c){var f=c.renderable;f.dirtyRenderBounds||(f.dirtyRenderBounds=new g.mN);var w=c.getRenderBounds();w&&f.dirtyRenderBounds.update(w.center,w.halfExtents)}},{key:"applyWorldTransform",value:function(c,f,w){w?(Xt.copy(this.tmpMat4,f.getLocalTransform()),Xt.multiply(this.tmpMat4,w,this.tmpMat4),Xt.multiply(this.tmpMat4,this.vpMatrix,this.tmpMat4)):(Xt.copy(this.tmpMat4,f.getWorldTransform()),Xt.multiply(this.tmpMat4,this.vpMatrix,this.tmpMat4)),c.setTransform(this.tmpMat4[0],this.tmpMat4[1],this.tmpMat4[4],this.tmpMat4[5],this.tmpMat4[12],this.tmpMat4[13])}},{key:"safeMergeAABB",value:function(){for(var c=new g.mN,f=arguments.length,w=new Array(f),Z=0;Z<f;Z++)w[Z]=arguments[Z];return w.forEach(function(z){c.add(z)}),c}}])}();fe.tag="CanvasRenderer";function me(y,E,c,f,w,Z,z){var H,q;if(y.image.nodeName==="rect"){var Dt=y.image.parsedStyle,U=Dt.width,Y=Dt.height;q=f.contextService.getDPR();var G=f.config.offscreenCanvas;H=Z.offscreenCanvasCreator.getOrCreateCanvas(G),H.width=U*q,H.height=Y*q;var J=Z.offscreenCanvasCreator.getOrCreateContext(G),pt={restoreStack:[],prevObject:null,currentContext:new Map};y.image.forEach(function(yt){w.renderDisplayObject(yt,J,f,pt,Z)}),pt.restoreStack.forEach(function(){J.restore()})}var Kt=z.getOrCreatePatternSync(E,y,c,H,q,E.getGeometryBounds().min,function(){E.dirty(),f.renderingService.dirty()});return Kt}function Ze(y,E,c,f){var w;if(y.type===g.GL.LinearGradient||y.type===g.GL.RadialGradient){var Z=E.getGeometryBounds(),z=Z&&Z.halfExtents[0]*2||1,H=Z&&Z.halfExtents[1]*2||1,q=Z&&Z.min||[0,0];w=f.getOrCreateGradient((0,It.Z)((0,It.Z)({type:y.type},y.value),{},{min:q,width:z,height:H}),c)}return w}var Ge=["shadowBlur","shadowOffsetX","shadowOffsetY"],Ve=["lineCap","lineJoin","miterLimit"],rn={globalAlpha:1,shadowBlur:0,shadowOffsetX:0,shadowOffsetY:0,shadowColor:"#000",filter:"none",globalCompositeOperation:"source-over",strokeStyle:"#000",strokeOpacity:1,lineWidth:1,lineDash:[],lineDashOffset:0,lineCap:"butt",lineJoin:"miter",miterLimit:10,fillStyle:"#000",fillOpacity:1},wn={};function on(y,E,c,f){var w=f.has(E)?f.get(E):rn[E];return w!==c&&(E==="lineDash"?y.setLineDash(c):y[E]=c,f.set(E,c)),w}var _n=function(){function y(E){(0,R.Z)(this,y),this.imagePool=E}return(0,l.Z)(y,[{key:"applyAttributesToContext",value:function(c,f){}},{key:"render",value:function(c,f,w,Z,z,H){}},{key:"applyCommonStyleToContext",value:function(c,f,w,Z){var z=w?wn:Z.prevObject.parsedStyle,H=f.parsedStyle;(w||H.opacity!==z.opacity)&&on(c,"globalAlpha",(0,Ut.Z)(H.opacity)?rn.globalAlpha:H.opacity,Z.currentContext),(w||H.blend!==z.blend)&&on(c,"globalCompositeOperation",(0,Ut.Z)(H.blend)?rn.globalCompositeOperation:H.blend,Z.currentContext)}},{key:"applyStrokeFillStyleToContext",value:function(c,f,w,Z){var z=w?wn:Z.prevObject.parsedStyle,H=f.parsedStyle,q=H.lineWidth,Dt=q===void 0?rn.lineWidth:q,U=H.fill&&!H.fill.isNone,Y=H.stroke&&!H.stroke.isNone&&Dt>0;if(Y){if(w||f.attributes.stroke!==Z.prevObject.attributes.stroke){var G=!(0,Ut.Z)(H.stroke)&&!Array.isArray(H.stroke)&&!H.stroke.isNone?f.attributes.stroke:rn.strokeStyle;on(c,"strokeStyle",G,Z.currentContext)}(w||H.lineWidth!==z.lineWidth)&&on(c,"lineWidth",(0,Ut.Z)(H.lineWidth)?rn.lineWidth:H.lineWidth,Z.currentContext),(w||H.lineDash!==z.lineDash)&&on(c,"lineDash",H.lineDash||rn.lineDash,Z.currentContext),(w||H.lineDashOffset!==z.lineDashOffset)&&on(c,"lineDashOffset",(0,Ut.Z)(H.lineDashOffset)?rn.lineDashOffset:H.lineDashOffset,Z.currentContext);for(var J=0;J<Ve.length;J++){var pt=Ve[J];(w||H[pt]!==z[pt])&&on(c,pt,(0,Ut.Z)(H[pt])?rn[pt]:H[pt],Z.currentContext)}}if(U&&(w||f.attributes.fill!==Z.prevObject.attributes.fill)){var Kt=!(0,Ut.Z)(H.fill)&&!Array.isArray(H.fill)&&!H.fill.isNone?f.attributes.fill:rn.fillStyle;on(c,"fillStyle",Kt,Z.currentContext)}}},{key:"applyStyleToContext",value:function(c,f,w,Z){var z=f.nodeName;this.applyCommonStyleToContext(c,f,w,Z),z===g.bn.IMAGE||this.applyStrokeFillStyleToContext(c,f,w,Z)}},{key:"applyShadowAndFilterStyleToContext",value:function(c,f,w,Z){var z=f.parsedStyle;if(w){on(c,"shadowColor",z.shadowColor.toString(),Z.currentContext);for(var H=0;H<Ge.length;H++){var q=Ge[H];on(c,q,z[q]||rn[q],Z.currentContext)}}z.filter&&z.filter.length&&on(c,"filter",f.attributes.filter,Z.currentContext)}},{key:"clearShadowAndFilterStyleForContext",value:function(c,f,w,Z){var z=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!1;if(f){on(c,"shadowColor",rn.shadowColor,Z.currentContext);for(var H=0;H<Ge.length;H++){var q=Ge[H];on(c,q,rn[q],Z.currentContext)}}if(w)if(f&&z){var Dt=c.filter;!(0,Ut.Z)(Dt)&&Dt.indexOf("drop-shadow")>-1&&on(c,"filter",Dt.replace(/drop-shadow\([^)]*\)/,"").trim()||rn.filter,Z.currentContext)}else on(c,"filter",rn.filter,Z.currentContext)}},{key:"fillToContext",value:function(c,f,w,Z,z){var H=this,q=f.parsedStyle,Dt=q.fill,U=q.fillRule,Y=null;if(Array.isArray(Dt)&&Dt.length>0)Dt.forEach(function(J){var pt=on(c,"fillStyle",Ze(J,f,c,H.imagePool),w.currentContext);Y=Y!=null?Y:pt,U?c.fill(U):c.fill()});else{if((0,g.R)(Dt)){var G=me(Dt,f,c,f.ownerDocument.defaultView.context,Z,z,this.imagePool);G&&(c.fillStyle=G,Y=!0)}U?c.fill(U):c.fill()}Y!==null&&on(c,"fillStyle",Y,w.currentContext)}},{key:"strokeToContext",value:function(c,f,w,Z,z){var H=this,q=f.parsedStyle.stroke,Dt=null;if(Array.isArray(q)&&q.length>0)q.forEach(function(G){var J=on(c,"strokeStyle",Ze(G,f,c,H.imagePool),w.currentContext);Dt=Dt!=null?Dt:J,c.stroke()});else{if((0,g.R)(q)){var U=me(q,f,c,f.ownerDocument.defaultView.context,Z,z,this.imagePool);if(U){var Y=on(c,"strokeStyle",U,w.currentContext);Dt=Dt!=null?Dt:Y}}c.stroke()}Dt!==null&&on(c,"strokeStyle",Dt,w.currentContext)}},{key:"drawToContext",value:function(c,f,w,Z,z){var H,q=f.nodeName,Dt=f.parsedStyle,U=Dt.opacity,Y=U===void 0?rn.globalAlpha:U,G=Dt.fillOpacity,J=G===void 0?rn.fillOpacity:G,pt=Dt.strokeOpacity,Kt=pt===void 0?rn.strokeOpacity:pt,yt=Dt.lineWidth,Qt=yt===void 0?rn.lineWidth:yt,ct=Dt.fill&&!Dt.fill.isNone,ht=Dt.stroke&&!Dt.stroke.isNone&&Qt>0;if(!(!ct&&!ht)){var rt=!(0,Ut.Z)(Dt.shadowColor)&&Dt.shadowBlur>0,$t=Dt.shadowType==="inner",Ht=((H=Dt.fill)===null||H===void 0?void 0:H.alpha)===0,ue=!!(Dt.filter&&Dt.filter.length),Ee=rt&&ht&&(q===g.bn.PATH||q===g.bn.LINE||q===g.bn.POLYLINE||Ht||$t),ie=null;if(ct){Ee||this.applyShadowAndFilterStyleToContext(c,f,rt,w);var Pe=Y*J;ie=on(c,"globalAlpha",Pe,w.currentContext),this.fillToContext(c,f,w,Z,z),Ee||this.clearShadowAndFilterStyleForContext(c,rt,ue,w)}if(ht){var Be=!1,He=Y*Kt,en=on(c,"globalAlpha",He,w.currentContext);if(ie=ct?ie:en,Ee&&(this.applyShadowAndFilterStyleToContext(c,f,rt,w),Be=!0,$t)){var un=c.globalCompositeOperation;c.globalCompositeOperation="source-atop",this.strokeToContext(c,f,w,Z,z),c.globalCompositeOperation=un,this.clearShadowAndFilterStyleForContext(c,rt,ue,w,!0)}this.strokeToContext(c,f,w,Z,z),Be&&this.clearShadowAndFilterStyleForContext(c,rt,ue,w)}ie!==null&&on(c,"globalAlpha",ie,w.currentContext)}}}])}(),Cn=function(y){function E(){return(0,R.Z)(this,E),(0,O.Z)(this,E,arguments)}return(0,_.Z)(E,y),(0,l.Z)(E,[{key:"render",value:function(f,w,Z,z,H,q){var Dt=w.fill,U=w.fillRule,Y=w.opacity,G=Y===void 0?1:Y,J=w.fillOpacity,pt=J===void 0?1:J,Kt=w.stroke,yt=w.strokeOpacity,Qt=yt===void 0?1:yt,ct=w.lineWidth,ht=ct===void 0?1:ct,rt=w.lineCap,$t=w.lineJoin,Ht=w.shadowType,ue=w.shadowColor,Ee=w.shadowBlur,ie=w.filter,Pe=w.miterLimit,Be=Dt&&!Dt.isNone,He=Kt&&!Kt.isNone&&ht>0,en=(Dt==null?void 0:Dt.alpha)===0,un=!!(ie&&ie.length),mn=!(0,Ut.Z)(ue)&&Ee>0,Sn=Z.nodeName,Pn=Ht==="inner",$n=He&&mn&&(Sn===g.bn.PATH||Sn===g.bn.LINE||Sn===g.bn.POLYLINE||en||Pn);Be&&(f.globalAlpha=G*pt,$n||Ln(Z,f,mn),En(f,Z,Dt,U,z,H,q,this.imagePool),$n||this.clearShadowAndFilter(f,un,mn)),He&&(f.globalAlpha=G*Qt,f.lineWidth=ht,(0,Ut.Z)(Pe)||(f.miterLimit=Pe),(0,Ut.Z)(rt)||(f.lineCap=rt),(0,Ut.Z)($t)||(f.lineJoin=$t),$n&&(Pn&&(f.globalCompositeOperation="source-atop"),Ln(Z,f,!0),Pn&&(cr(f,Z,Kt,z,H,q,this.imagePool),f.globalCompositeOperation=rn.globalCompositeOperation,this.clearShadowAndFilter(f,un,!0))),cr(f,Z,Kt,z,H,q,this.imagePool))}},{key:"clearShadowAndFilter",value:function(f,w,Z){if(Z&&(f.shadowColor="transparent",f.shadowBlur=0),w){var z=f.filter;!(0,Ut.Z)(z)&&z.indexOf("drop-shadow")>-1&&(f.filter=z.replace(/drop-shadow\([^)]*\)/,"").trim()||"none")}}}])}(_n);function Ln(y,E,c){var f=y.parsedStyle,w=f.filter,Z=f.shadowColor,z=f.shadowBlur,H=f.shadowOffsetX,q=f.shadowOffsetY;w&&w.length&&(E.filter=y.style.filter),c&&(E.shadowColor=Z.toString(),E.shadowBlur=z||0,E.shadowOffsetX=H||0,E.shadowOffsetY=q||0)}function En(y,E,c,f,w,Z,z,H){var q=arguments.length>8&&arguments[8]!==void 0?arguments[8]:!1;Array.isArray(c)?c.forEach(function(Dt){y.fillStyle=Ze(Dt,E,y,H),q||(f?y.fill(f):y.fill())}):((0,g.R)(c)&&(y.fillStyle=me(c,E,y,w,Z,z,H)),q||(f?y.fill(f):y.fill()))}function cr(y,E,c,f,w,Z,z){var H=arguments.length>7&&arguments[7]!==void 0?arguments[7]:!1;Array.isArray(c)?c.forEach(function(q){y.strokeStyle=Ze(q,E,y,z),H||y.stroke()}):((0,g.R)(c)&&(y.strokeStyle=me(c,E,y,f,w,Z,z)),H||y.stroke())}function Bn(y,E){var c=(0,b.Z)(y,4),f=c[0],w=c[1],Z=c[2],z=c[3],H=(0,b.Z)(E,4),q=H[0],Dt=H[1],U=H[2],Y=H[3],G=Math.max(f,q),J=Math.max(w,Dt),pt=Math.min(f+Z,q+U),Kt=Math.min(w+z,Dt+Y);return pt<=G||Kt<=J?null:[G,J,pt-G,Kt-J]}function br(y,E){var c=Bt.fF(Bt.Ue(),[y[0],y[1],0],E),f=Bt.fF(Bt.Ue(),[y[0]+y[2],y[1],0],E),w=Bt.fF(Bt.Ue(),[y[0],y[1]+y[3],0],E),Z=Bt.fF(Bt.Ue(),[y[0]+y[2],y[1]+y[3],0],E);return[Math.min(c[0],f[0],w[0],Z[0]),Math.min(c[1],f[1],w[1],Z[1]),Math.max(c[0],f[0],w[0],Z[0])-Math.min(c[0],f[0],w[0],Z[0]),Math.max(c[1],f[1],w[1],Z[1])-Math.min(c[1],f[1],w[1],Z[1])]}var fr=function(y){function E(){return(0,R.Z)(this,E),(0,O.Z)(this,E,arguments)}return(0,_.Z)(E,y),(0,l.Z)(E,[{key:"renderDownSampled",value:function(f,w,Z,z){var H=z.src,q=z.imageCache;if(!q.downSampled){this.imagePool.createDownSampledImage(H,Z).then(function(){Z.ownerDocument&&(Z.dirty(),Z.ownerDocument.defaultView.context.renderingService.dirty())}).catch(function(Dt){console.error(Dt)});return}f.drawImage(q.downSampled,Math.floor(z.drawRect[0]),Math.floor(z.drawRect[1]),Math.ceil(z.drawRect[2]),Math.ceil(z.drawRect[3]))}},{key:"renderTile",value:function(f,w,Z,z){var H=z.src,q=z.imageCache,Dt=z.imageRect,U=z.drawRect,Y=q.size,G=f.getTransform(),J=G.a,pt=G.b,Kt=G.c,yt=G.d,Qt=G.e,ct=G.f;if(f.resetTransform(),!(q!=null&&q.gridSize)){this.imagePool.createImageTiles(H,[],function(){Z.ownerDocument&&(Z.dirty(),Z.ownerDocument.defaultView.context.renderingService.dirty())},Z).catch(function(mn){console.error(mn)});return}for(var ht=[Y[0]/Dt[2],Y[1]/Dt[3]],rt=[q.tileSize[0]/ht[0],q.tileSize[1]/ht[1]],$t=[Math.floor((U[0]-Dt[0])/rt[0]),Math.ceil((U[0]+U[2]-Dt[0])/rt[0])],Ht=$t[0],ue=$t[1],Ee=[Math.floor((U[1]-Dt[1])/rt[1]),Math.ceil((U[1]+U[3]-Dt[1])/rt[1])],ie=Ee[0],Pe=Ee[1],Be=ie;Be<=Pe;Be++)for(var He=Ht;He<=ue;He++){var en=q.tiles[Be][He];if(en){var un=[Math.floor(Dt[0]+en.tileX*rt[0]),Math.floor(Dt[1]+en.tileY*rt[1]),Math.ceil(rt[0]),Math.ceil(rt[1])];f.drawImage(en.data,un[0],un[1],un[2],un[3])}}f.setTransform(J,pt,Kt,yt,Qt,ct)}},{key:"render",value:function(f,w,Z){var z=w.x,H=z===void 0?0:z,q=w.y,Dt=q===void 0?0:q,U=w.width,Y=w.height,G=w.src,J=w.shadowColor,pt=w.shadowBlur,Kt=this.imagePool.getImageSync(G,Z),yt=Kt==null?void 0:Kt.img,Qt=U,ct=Y;if(yt){Qt||(Qt=yt.width),ct||(ct=yt.height);var ht=!(0,Ut.Z)(J)&&pt>0;Ln(Z,f,ht);try{var rt=Z.ownerDocument.defaultView.getContextService().getDomElement(),$t=rt.width,Ht=rt.height,ue=f.getTransform(),Ee=ue.a,ie=ue.b,Pe=ue.c,Be=ue.d,He=ue.e,en=ue.f,un=Xt.fromValues(Ee,Pe,0,0,ie,Be,0,0,0,0,1,0,He,en,0,1),mn=br([H,Dt,Qt,ct],un),Sn=Bn([0,0,$t,Ht],mn);if(!Sn)return;if(!Z.ownerDocument.defaultView.getConfig().enableLargeImageOptimization){E.renderFull(f,w,Z,{image:yt,drawRect:[H,Dt,Qt,ct]});return}var Pn=mn[2]/Kt.size[0];if(Pn<(Kt.downSamplingRate||.5)){this.renderDownSampled(f,w,Z,{src:G,imageCache:Kt,drawRect:[H,Dt,Qt,ct]});return}if(!At.isSupportTile){E.renderFull(f,w,Z,{image:yt,drawRect:[H,Dt,Qt,ct]});return}this.renderTile(f,w,Z,{src:G,imageCache:Kt,imageRect:mn,drawRect:Sn})}catch($n){}}}},{key:"drawToContext",value:function(f,w,Z,z,H){this.render(f,w.parsedStyle,w)}}],[{key:"renderFull",value:function(f,w,Z,z){f.drawImage(z.image,Math.floor(z.drawRect[0]),Math.floor(z.drawRect[1]),Math.ceil(z.drawRect[2]),Math.ceil(z.drawRect[3]))}}])}(Cn),Zr=function(y){function E(){return(0,R.Z)(this,E),(0,O.Z)(this,E,arguments)}return(0,_.Z)(E,y),(0,l.Z)(E,[{key:"render",value:function(f,w,Z,z,H,q){Z.getBounds();var Dt=w.lineWidth,U=Dt===void 0?1:Dt,Y=w.textAlign,G=Y===void 0?"start":Y,J=w.textBaseline,pt=J===void 0?"alphabetic":J,Kt=w.lineJoin,yt=Kt===void 0?"miter":Kt,Qt=w.miterLimit,ct=Qt===void 0?10:Qt,ht=w.letterSpacing,rt=ht===void 0?0:ht,$t=w.stroke,Ht=w.fill,ue=w.fillRule,Ee=w.fillOpacity,ie=Ee===void 0?1:Ee,Pe=w.strokeOpacity,Be=Pe===void 0?1:Pe,He=w.opacity,en=He===void 0?1:He,un=w.metrics,mn=w.x,Sn=mn===void 0?0:mn,Pn=w.y,$n=Pn===void 0?0:Pn,Wn=w.dx,Xn=w.dy,An=w.shadowColor,Zn=w.shadowBlur,qn=w.textDecorationLine,er=un.font,Cr=un.lines,Un=un.height,ar=un.lineHeight,ii=un.lineMetrics;f.font=er,f.lineWidth=U,f.textAlign=G==="middle"?"center":G;var Or=pt;Or==="alphabetic"&&(Or="bottom"),f.lineJoin=yt,(0,Ut.Z)(ct)||(f.miterLimit=ct);var Lr=$n;pt==="middle"?Lr+=-Un/2-ar/2:pt==="bottom"||pt==="alphabetic"||pt==="ideographic"?Lr+=-Un:(pt==="top"||pt==="hanging")&&(Lr+=-ar);var fi=Sn+(Wn||0);Lr+=Xn||0,Cr.length===1&&(Or==="bottom"?(Or="middle",Lr-=.5*Un):Or==="top"&&(Or="middle",Lr+=.5*Un)),f.textBaseline=Or;var zr=!(0,Ut.Z)(An)&&Zn>0;Ln(Z,f,zr);for(var Er=0;Er<Cr.length;Er++){var mr=U/2+fi;Lr+=ar,!(0,Ut.Z)($t)&&!$t.isNone&&U&&this.drawLetterSpacing(f,Z,Cr[Er],ii[Er],G,mr,Lr,rt,Ht,ue,ie,$t,Be,en,!0,z,H,q),(0,Ut.Z)(Ht)||this.drawLetterSpacing(f,Z,Cr[Er],ii[Er],G,mr,Lr,rt,Ht,ue,ie,$t,Be,en,!1,z,H,q)}qn&&qn!=="none"&&this.drawTextDecorations(f,w,Z,Cr,ar,fi,$n+(Xn||0),z,H,q)}},{key:"drawLetterSpacing",value:function(f,w,Z,z,H,q,Dt,U,Y,G,J,pt,Kt,yt,Qt,ct,ht,rt){if(U===0){Qt?this.strokeText(f,w,Z,q,Dt,pt,Kt,ct,ht,rt):this.fillText(f,w,Z,q,Dt,Y,G,J,yt,ct,ht,rt);return}var $t=f.textAlign;f.textAlign="left";var Ht=q;H==="center"||H==="middle"?Ht=q-z.width/2:(H==="right"||H==="end")&&(Ht=q-z.width);for(var ue=Array.from(Z),Ee=f.measureText(Z).width,ie=0,Pe=0;Pe<ue.length;++Pe){var Be=ue[Pe];Qt?this.strokeText(f,w,Be,Ht,Dt,pt,Kt,ct,ht,rt):this.fillText(f,w,Be,Ht,Dt,Y,G,J,yt,ct,ht,rt),ie=f.measureText(Z.substring(Pe+1)).width,Ht+=Ee-ie+U,Ee=ie}f.textAlign=$t}},{key:"fillText",value:function(f,w,Z,z,H,q,Dt,U,Y,G,J,pt){En(f,w,q,Dt,G,J,pt,this.imagePool,!0);var Kt,yt=!(0,Ut.Z)(U)&&U!==1;yt&&(Kt=f.globalAlpha,f.globalAlpha=U*Y),f.fillText(Z,z,H),yt&&(f.globalAlpha=Kt)}},{key:"strokeText",value:function(f,w,Z,z,H,q,Dt,U,Y,G){cr(f,w,q,U,Y,G,this.imagePool,!0);var J,pt=!(0,Ut.Z)(Dt)&&Dt!==1;pt&&(J=f.globalAlpha,f.globalAlpha=Dt),f.strokeText(Z,z,H),pt&&(f.globalAlpha=J)}},{key:"drawTextDecorations",value:function(f,w,Z,z,H,q,Dt,U,Y,G){var J=w.textDecorationLine,pt=w.textDecorationColor,Kt=w.textDecorationStyle,yt=w.textDecorationThickness,Qt=yt===void 0?1:yt,ct=w.textAlign,ht=ct===void 0?"start":ct,rt=w.lineWidth,$t=rt===void 0?1:rt,Ht=w.metrics;if(!(!J||J==="none")){var ue=Ht.lineMetrics,Ee=J.split(" ");switch(f.lineWidth=Qt,pt&&(f.strokeStyle="rgba(".concat(pt.r,", ").concat(pt.g,", ").concat(pt.b,", ").concat(pt.alpha,")")),Kt){case"dashed":f.setLineDash([5,5]);break;case"dotted":f.setLineDash([2,2]);break;case"wavy":f.setLineDash([]);break;default:f.setLineDash([]);break}var ie=Dt,Pe=w.textBaseline,Be=Pe===void 0?"alphabetic":Pe;Be==="middle"?ie+=-Ht.height/2-H/2:Be==="bottom"||Be==="alphabetic"||Be==="ideographic"?ie+=-Ht.height:(Be==="top"||Be==="hanging")&&(ie+=-H);for(var He=0;He<z.length;He++){ie+=H;var en=ue[He];if(en){var un=$t/2,mn=q,Sn=q+en.width;ht==="center"||ht==="middle"?(mn=q-en.width/2,Sn=q+en.width/2):(ht==="right"||ht==="end")&&(mn=q-en.width,Sn=q),mn+=un,Sn+=un;var Pn=(0,nt.Z)(Ee),$n;try{for(Pn.s();!($n=Pn.n()).done;){var Wn=$n.value,Xn=ie;switch(Wn){case"underline":Xn+=2;break;case"overline":Xn-=H-2;break;case"line-through":Xn-=H/2;break;default:continue}Kt==="wavy"?this.drawWavyLine(f,mn,Sn,Xn):(f.beginPath(),f.moveTo(mn,Xn),f.lineTo(Sn,Xn),f.stroke())}}catch(An){Pn.e(An)}finally{Pn.f()}}}f.setLineDash([])}}},{key:"drawWavyLine",value:function(f,w,Z,z){var H=2,q=10,Dt=Math.floor((Z-w)/q);f.beginPath(),f.moveTo(w,z);for(var U=0;U<Dt;U++){var Y=w+U*q+q/4,G=z+H,J=w+U*q+q/2,pt=z;f.quadraticCurveTo(Y,G,J,pt);var Kt=w+U*q+q*3/4,yt=z-H,Qt=w+(U+1)*q,ct=z;f.quadraticCurveTo(Kt,yt,Qt,ct)}f.stroke()}},{key:"drawToContext",value:function(f,w,Z,z,H){this.render(f,w.parsedStyle,w,w.ownerDocument.defaultView.context,z,H)}}])}(Cn),di=function(y){function E(){var c,f=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return(0,R.Z)(this,E),c=(0,O.Z)(this,E),c.name="canvas-renderer",c.options=f,c}return(0,_.Z)(E,y),(0,l.Z)(E,[{key:"init",value:function(){var f,w=(0,It.Z)({dirtyObjectNumThreshold:500,dirtyObjectRatioThreshold:.8},this.options),Z=this.context.imagePool,z=new Cn(Z),H=(f={},(0,P.Z)((0,P.Z)((0,P.Z)((0,P.Z)((0,P.Z)((0,P.Z)((0,P.Z)((0,P.Z)((0,P.Z)((0,P.Z)(f,g.bn.CIRCLE,z),g.bn.ELLIPSE,z),g.bn.RECT,z),g.bn.IMAGE,new fr(Z)),g.bn.TEXT,new Zr(Z)),g.bn.LINE,z),g.bn.POLYLINE,z),g.bn.POLYGON,z),g.bn.PATH,z),g.bn.GROUP,void 0),(0,P.Z)((0,P.Z)((0,P.Z)(f,g.bn.HTML,void 0),g.bn.MESH,void 0),g.bn.FRAGMENT,void 0));this.context.defaultStyleRendererFactory=H,this.context.styleRendererFactory=H,this.addRenderingPlugin(new fe(w))}},{key:"destroy",value:function(){this.removeAllRenderingPlugins(),delete this.context.defaultStyleRendererFactory,delete this.context.styleRendererFactory}}])}(g.F6);var Xr=function(){function y(){(0,R.Z)(this,y)}return(0,l.Z)(y,[{key:"apply",value:function(c,f){var w=this,Z=c.renderingService,z=c.renderingContext,H=c.config;this.context=c;var q=z.root.ownerDocument.defaultView,Dt=function(Ee){Z.hooks.pointerMove.call(Ee)},U=function(Ee){Z.hooks.pointerUp.call(Ee)},Y=function(Ee){Z.hooks.pointerDown.call(Ee)},G=function(Ee){Z.hooks.pointerOver.call(Ee)},J=function(Ee){Z.hooks.pointerOut.call(Ee)},pt=function(Ee){Z.hooks.pointerCancel.call(Ee)},Kt=function(Ee){Z.hooks.pointerWheel.call(Ee)},yt=function(Ee){Z.hooks.click.call(Ee)},Qt=function(Ee){f.globalThis.document.addEventListener("pointermove",Dt,!0),Ee.addEventListener("pointerdown",Y,!0),Ee.addEventListener("pointerleave",J,!0),Ee.addEventListener("pointerover",G,!0),f.globalThis.addEventListener("pointerup",U,!0),f.globalThis.addEventListener("pointercancel",pt,!0)},ct=function(Ee){Ee.addEventListener("touchstart",Y,!0),Ee.addEventListener("touchend",U,!0),Ee.addEventListener("touchmove",Dt,!0),Ee.addEventListener("touchcancel",pt,!0)},ht=function(Ee){f.globalThis.document.addEventListener("mousemove",Dt,!0),Ee.addEventListener("mousedown",Y,!0),Ee.addEventListener("mouseout",J,!0),Ee.addEventListener("mouseover",G,!0),f.globalThis.addEventListener("mouseup",U,!0)},rt=function(Ee){f.globalThis.document.removeEventListener("pointermove",Dt,!0),Ee.removeEventListener("pointerdown",Y,!0),Ee.removeEventListener("pointerleave",J,!0),Ee.removeEventListener("pointerover",G,!0),f.globalThis.removeEventListener("pointerup",U,!0),f.globalThis.removeEventListener("pointercancel",pt,!0)},$t=function(Ee){Ee.removeEventListener("touchstart",Y,!0),Ee.removeEventListener("touchend",U,!0),Ee.removeEventListener("touchmove",Dt,!0),Ee.removeEventListener("touchcancel",pt,!0)},Ht=function(Ee){f.globalThis.document.removeEventListener("mousemove",Dt,!0),Ee.removeEventListener("mousedown",Y,!0),Ee.removeEventListener("mouseout",J,!0),Ee.removeEventListener("mouseover",G,!0),f.globalThis.removeEventListener("mouseup",U,!0)};Z.hooks.init.tap(y.tag,function(){var ue=w.context.contextService.getDomElement();f.globalThis.navigator.msPointerEnabled?(ue.style.msContentZooming="none",ue.style.msTouchAction="none"):q.supportsPointerEvents&&(ue.style.touchAction="none"),q.supportsPointerEvents?Qt(ue):ht(ue),q.supportsTouchEvents&&ct(ue),H.useNativeClickEvent&&ue.addEventListener("click",yt,!0),ue.addEventListener("wheel",Kt,{passive:!0,capture:!0})}),Z.hooks.destroy.tap(y.tag,function(){var ue=w.context.contextService.getDomElement();f.globalThis.navigator.msPointerEnabled?(ue.style.msContentZooming="",ue.style.msTouchAction=""):q.supportsPointerEvents&&(ue.style.touchAction=""),q.supportsPointerEvents?rt(ue):Ht(ue),q.supportsTouchEvents&&$t(ue),H.useNativeClickEvent&&ue.removeEventListener("click",yt,!0),ue.removeEventListener("wheel",Kt,!0)})}}])}();Xr.tag="DOMInteraction";var Mr=function(y){function E(){var c;(0,R.Z)(this,E);for(var f=arguments.length,w=new Array(f),Z=0;Z<f;Z++)w[Z]=arguments[Z];return c=(0,O.Z)(this,E,[].concat(w)),c.name="dom-interaction",c}return(0,_.Z)(E,y),(0,l.Z)(E,[{key:"init",value:function(){this.addRenderingPlugin(new Xr)}},{key:"destroy",value:function(){this.removeAllRenderingPlugins()}}])}(g.F6),gi=d(1933);var yi="g-canvas-camera",_i=function(){function y(){(0,R.Z)(this,y),this.displayObjectHTMLElementMap=new WeakMap}return(0,l.Z)(y,[{key:"joinTransformMatrix",value:function(c){var f=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[0,0,0];return"matrix(".concat([c[0],c[1],c[4],c[5],c[12]+f[0],c[13]+f[1]].join(","),")")}},{key:"apply",value:function(c,f){var w=this,Z=c.camera,z=c.renderingContext,H=c.renderingService;this.context=c;var q=z.root.ownerDocument.defaultView,Dt=q.context.eventService.nativeHTMLMap,U=function(Qt,ct){ct.style.transform=w.joinTransformMatrix(Qt.getWorldTransform(),Qt.getOrigin())},Y=function(Qt){var ct=Qt.target;if(ct.nodeName===g.bn.HTML){w.$camera||(w.$camera=w.createCamera(Z));var ht=w.getOrCreateEl(ct);w.$camera.appendChild(ht),Object.keys(ct.attributes).forEach(function(rt){w.updateAttribute(rt,ct)}),U(ct,ht),Dt.set(ht,ct)}},G=function(Qt){var ct=Qt.target;if(ct.nodeName===g.bn.HTML&&w.$camera){var ht=w.getOrCreateEl(ct);ht&&(ht.remove(),Dt.delete(ht))}},J=function(Qt){var ct=Qt.target;if(ct.nodeName===g.bn.HTML){var ht=Qt.attrName;w.updateAttribute(ht,ct)}},pt=function(Qt){for(var ct=Qt.detail,ht=0;ht<ct.length;ht++){var rt=ct[ht],$t=rt.target,Ht=$t.nodeName===g.bn.FRAGMENT?$t.childNodes:[$t];Ht.forEach(function(ue){if(ue.nodeName===g.bn.HTML){var Ee=w.getOrCreateEl(ue);U(ue,Ee)}})}},Kt=function(){if(w.$camera){var Qt=w.context.config,ct=Qt.width,ht=Qt.height;w.$camera.parentElement.style.width="".concat(ct||0,"px"),w.$camera.parentElement.style.height="".concat(ht||0,"px")}};H.hooks.init.tap(y.tag,function(){q.addEventListener(g.$6.RESIZE,Kt),q.addEventListener(g.Dk.MOUNTED,Y),q.addEventListener(g.Dk.UNMOUNTED,G),q.addEventListener(g.Dk.ATTR_MODIFIED,J),q.addEventListener(g.Dk.BOUNDS_CHANGED,pt)}),H.hooks.endFrame.tap(y.tag,function(){w.$camera&&z.renderReasons.has(g.Rr.CAMERA_CHANGED)&&(w.$camera.style.transform=w.joinTransformMatrix(Z.getOrthoMatrix()))}),H.hooks.destroy.tap(y.tag,function(){w.$camera&&w.$camera.remove(),q.removeEventListener(g.$6.RESIZE,Kt),q.removeEventListener(g.Dk.MOUNTED,Y),q.removeEventListener(g.Dk.UNMOUNTED,G),q.removeEventListener(g.Dk.ATTR_MODIFIED,J),q.removeEventListener(g.Dk.BOUNDS_CHANGED,pt)})}},{key:"createCamera",value:function(c){var f=this.context.config,w=f.document,Z=f.width,z=f.height,H=this.context.contextService.getDomElement(),q=H.parentNode;if(q){var Dt=yi,U=q.querySelector("#".concat(Dt));if(!U){var Y=(w||document).createElement("div");Y.style.overflow="hidden",Y.style.pointerEvents="none",Y.style.position="absolute",Y.style.left="0px",Y.style.top="0px",Y.style.width="".concat(Z||0,"px"),Y.style.height="".concat(z||0,"px");var G=(w||document).createElement("div");U=G,G.id=Dt,G.style.position="absolute",G.style.left="".concat(H.offsetLeft||0,"px"),G.style.top="".concat(H.offsetTop||0,"px"),G.style.transformOrigin="left top",G.style.transform=this.joinTransformMatrix(c.getOrthoMatrix()),G.style.pointerEvents="none",G.style.width="100%",G.style.height="100%",Y.appendChild(G),q.appendChild(Y)}return U}return null}},{key:"getOrCreateEl",value:function(c){var f=this.context.config.document,w=this.displayObjectHTMLElementMap.get(c);return w||(w=(f||document).createElement("div"),c.parsedStyle.$el=w,this.displayObjectHTMLElementMap.set(c,w),c.id&&(w.id=c.id),c.name&&w.setAttribute("name",c.name),c.className&&(w.className=c.className),w.style.position="absolute",w.style["will-change"]="transform",w.style.transform=this.joinTransformMatrix(c.getWorldTransform(),c.getOrigin())),w}},{key:"updateAttribute",value:function(c,f){var w=this.getOrCreateEl(f);switch(c){case"innerHTML":var Z=f.parsedStyle.innerHTML;(0,we.Z)(Z)?w.innerHTML=Z:(w.innerHTML="",w.appendChild(Z));break;case"x":w.style.left="".concat(f.parsedStyle.x,"px");break;case"y":w.style.top="".concat(f.parsedStyle.y,"px");break;case"transformOrigin":var z=f.parsedStyle.transformOrigin;w.style["transform-origin"]="".concat(z[0].buildCSSText(null,null,"")," ").concat(z[1].buildCSSText(null,null,""));break;case"width":var H=f.parsedStyle.width;w.style.width=(0,gi.Z)(H)?"".concat(H,"px"):H.toString();break;case"height":var q=f.parsedStyle.height;w.style.height=(0,gi.Z)(q)?"".concat(q,"px"):q.toString();break;case"zIndex":var Dt=f.parsedStyle.zIndex;w.style["z-index"]="".concat(Dt);break;case"visibility":var U=f.parsedStyle.visibility;w.style.visibility=U;break;case"pointerEvents":var Y=f.parsedStyle.pointerEvents,G=Y===void 0?"auto":Y;w.style.pointerEvents=G;break;case"opacity":var J=f.parsedStyle.opacity;w.style.opacity="".concat(J);break;case"fill":var pt=f.parsedStyle.fill,Kt="";(0,g.qA)(pt)?pt.isNone?Kt="transparent":Kt=f.getAttribute("fill"):Array.isArray(pt)?Kt=f.getAttribute("fill"):(0,g.R)(pt),w.style.background=Kt;break;case"stroke":var yt=f.parsedStyle.stroke,Qt="";(0,g.qA)(yt)?yt.isNone?Qt="transparent":Qt=f.getAttribute("stroke"):Array.isArray(yt)?Qt=f.getAttribute("stroke"):(0,g.R)(yt),w.style["border-color"]=Qt,w.style["border-style"]="solid";break;case"lineWidth":var ct=f.parsedStyle.lineWidth;w.style["border-width"]="".concat(ct||0,"px");break;case"lineDash":w.style["border-style"]="dashed";break;case"filter":var ht=f.style.filter;w.style.filter=ht;break;default:!(0,Ut.Z)(f.style[c])&&f.style[c]!==""&&(w.style[c]=f.style[c])}}}])}();_i.tag="HTMLRendering";var qr=function(y){function E(){var c;(0,R.Z)(this,E);for(var f=arguments.length,w=new Array(f),Z=0;Z<f;Z++)w[Z]=arguments[Z];return c=(0,O.Z)(this,E,[].concat(w)),c.name="html-renderer",c}return(0,_.Z)(E,y),(0,l.Z)(E,[{key:"init",value:function(){this.addRenderingPlugin(new _i)}},{key:"destroy",value:function(){this.removeAllRenderingPlugins()}}])}(g.F6);var Jn=function(){function y(E){(0,R.Z)(this,y),this.renderingContext=E.renderingContext,this.canvasConfig=E.config}return(0,l.Z)(y,[{key:"init",value:function(){var c=this.canvasConfig,f=c.container,w=c.canvas;if(w)this.$canvas=w,f&&w.parentElement!==f&&f.appendChild(w),this.$container=w.parentElement,this.canvasConfig.container=this.$container;else if(f&&(this.$container=(0,we.Z)(f)?document.getElementById(f):f,this.$container)){var Z=document.createElement("canvas");this.$container.appendChild(Z),this.$container.style.position||(this.$container.style.position="relative"),this.$canvas=Z}this.context=this.$canvas.getContext("2d"),this.resize(this.canvasConfig.width,this.canvasConfig.height)}},{key:"getContext",value:function(){return this.context}},{key:"getDomElement",value:function(){return this.$canvas}},{key:"getDPR",value:function(){return this.dpr}},{key:"getBoundingClientRect",value:function(){if(this.$canvas.getBoundingClientRect)return this.$canvas.getBoundingClientRect()}},{key:"destroy",value:function(){this.$container&&this.$canvas&&this.$canvas.parentNode&&this.$container.removeChild(this.$canvas)}},{key:"resize",value:function(c,f){var w=this.canvasConfig.devicePixelRatio;this.dpr=w,this.$canvas&&(this.$canvas.width=this.dpr*c,this.$canvas.height=this.dpr*f,(0,g.$p)(this.$canvas,c,f)),this.renderingContext.renderReasons.add(g.Rr.CAMERA_CHANGED)}},{key:"applyCursorStyle",value:function(c){this.$container&&this.$container.style&&(this.$container.style.cursor=c)}},{key:"toDataURL",value:function(){var E=(0,Nt.Z)((0,kt.Z)().mark(function f(){var w,Z,z,H=arguments;return(0,kt.Z)().wrap(function(q){for(;;)switch(q.prev=q.next){case 0:return w=H.length>0&&H[0]!==void 0?H[0]:{},Z=w.type,z=w.encoderOptions,q.abrupt("return",this.context.canvas.toDataURL(Z,z));case 1:case"end":return q.stop()}},f,this)}));function c(){return E.apply(this,arguments)}return c}()}])}(),sn=function(y){function E(){var c;(0,R.Z)(this,E);for(var f=arguments.length,w=new Array(f),Z=0;Z<f;Z++)w[Z]=arguments[Z];return c=(0,O.Z)(this,E,[].concat(w)),c.name="canvas-context-register",c}return(0,_.Z)(E,y),(0,l.Z)(E,[{key:"init",value:function(){this.context.ContextService=Jn}},{key:"destroy",value:function(){delete this.context.ContextService}}])}(g.F6),Wt=function(y){function E(c){var f;return(0,R.Z)(this,E),f=(0,O.Z)(this,E,[c]),f.registerPlugin(new sn),f.registerPlugin(new Vt),f.registerPlugin(new ut),f.registerPlugin(new di),f.registerPlugin(new Mr),f.registerPlugin(new Jt),f.registerPlugin(new qr),f}return(0,_.Z)(E,y),(0,l.Z)(E)}(g.I8)},77263:function(Tt,vt,d){"use strict";d.d(vt,{mN:function(){return H},I8:function(){return y},F6:function(){return Wt},V1:function(){return zr},iM:function(){return ar},Xz:function(){return Id},$6:function(){return Xo},Cd:function(){return sc},b_:function(){return Kc},Aw:function(){return ao},s$:function(){return pa},BB:function(){return Jc},jf:function(){return J},Dk:function(){return Ha},Pj:function(){return wl},xA:function(){return Xs},nR:function(){return ml},GL:function(){return Ba},ZA:function(){return Bo},k9:function(){return lc},Ee:function(){return cc},x1:function(){return Sl},NB:function(){return wa},jB:function(){return kc},y$:function(){return uc},E9:function(){return Y},mg:function(){return tl},aH:function(){return Ml},UL:function(){return Cl},Rr:function(){return ks},bn:function(){return Jn},xv:function(){return Ol},Cm:function(){return Kn},Rx:function(){return xa},o6:function(){return Do},O4:function(){return ct},Vl:function(){return rt},Oi:function(){return gs},_O:function(){return yt},gz:function(){return tr},qA:function(){return xo},RV:function(){return sa},L1:function(){return ju},R:function(){return La},G$:function(){return ei},G0:function(){return Nc},N1:function(){return ss},BV:function(){return Ht},GZ:function(){return rr},$p:function(){return ws}});var l=d(33885),R=d(67732),O=d(83652),_=d(94480),g=d(22214),P=d(42403),b=d(42978),A=d(37271),I=A,x=d(92421),k=d(97082),N=d(60187),et=d(79111),tt=d(94569),Ct=d(45545),ut=d(1933),nt=d(68901),kt=d(76075),Nt=d(71879),Bt=d(70208),Xt=d(80813),wt={a:7,c:6,h:1,l:2,m:2,r:4,q:4,s:4,t:2,v:1,z:0};function ot(h){return Array.isArray(h)&&h.every(function(p){var a=p[0].toLowerCase();return wt[a]===p.length-1&&"achlmqstvz".includes(a)})}function It(h){return ot(h)&&h.every(function(p){var a=p[0];return a===a.toUpperCase()})}function zt(h){return It(h)&&h.every(function(p){var a=p[0];return"ACLMQZ".includes(a)})}var Ot={x1:0,y1:0,x2:0,y2:0,x:0,y:0,qx:null,qy:null};function pe(h){for(var p=h.pathValue[h.segmentStart],a=p.toLowerCase(),s=h.data;s.length>=wt[a]&&(a==="m"&&s.length>2?(h.segments.push([p].concat(s.splice(0,2))),a="l",p=p==="m"?"l":"L"):h.segments.push([p].concat(s.splice(0,wt[a]))),!!wt[a]););}function xe(h){var p=h.index,a=h.pathValue,s=a.charCodeAt(p);if(s===48){h.param=0,h.index+=1;return}if(s===49){h.param=1,h.index+=1;return}h.err='[path-util]: invalid Arc flag "'.concat(a[p],'", expecting 0 or 1 at index ').concat(p)}function qt(h){return h>=48&&h<=57||h===43||h===45||h===46}function Ye(h){return h>=48&&h<=57}function We(h){var p=h.max,a=h.pathValue,s=h.index,m=s,D=!1,L=!1,V=!1,st=!1,Lt;if(m>=p){h.err="[path-util]: Invalid path value at index ".concat(m,', "pathValue" is missing param');return}if(Lt=a.charCodeAt(m),(Lt===43||Lt===45)&&(m+=1,Lt=a.charCodeAt(m)),!Ye(Lt)&&Lt!==46){h.err="[path-util]: Invalid path value at index ".concat(m,', "').concat(a[m],'" is not a number');return}if(Lt!==46){if(D=Lt===48,m+=1,Lt=a.charCodeAt(m),D&&m<p&&Lt&&Ye(Lt)){h.err="[path-util]: Invalid path value at index ".concat(s,', "').concat(a[s],'" illegal number');return}for(;m<p&&Ye(a.charCodeAt(m));)m+=1,L=!0;Lt=a.charCodeAt(m)}if(Lt===46){for(st=!0,m+=1;Ye(a.charCodeAt(m));)m+=1,V=!0;Lt=a.charCodeAt(m)}if(Lt===101||Lt===69){if(st&&!L&&!V){h.err="[path-util]: Invalid path value at index ".concat(m,', "').concat(a[m],'" invalid float exponent');return}if(m+=1,Lt=a.charCodeAt(m),(Lt===43||Lt===45)&&(m+=1),m<p&&Ye(a.charCodeAt(m)))for(;m<p&&Ye(a.charCodeAt(m));)m+=1;else{h.err="[path-util]: Invalid path value at index ".concat(m,', "').concat(a[m],'" invalid integer exponent');return}}h.index=m,h.param=+h.pathValue.slice(s,m)}function Oe(h){var p=[5760,6158,8192,8193,8194,8195,8196,8197,8198,8199,8200,8201,8202,8239,8287,12288,65279];return h===10||h===13||h===8232||h===8233||h===32||h===9||h===11||h===12||h===160||h>=5760&&p.includes(h)}function Qe(h){for(var p=h.pathValue,a=h.max;h.index<a&&Oe(p.charCodeAt(h.index));)h.index+=1}function Mt(h){switch(h|32){case 109:case 122:case 108:case 104:case 118:case 99:case 115:case 113:case 116:case 97:return!0;default:return!1}}function ne(h){return(h|32)===97}function Me(h){var p=h.max,a=h.pathValue,s=h.index,m=a.charCodeAt(s),D=wt[a[s].toLowerCase()];if(h.segmentStart=s,!Mt(m)){h.err='[path-util]: Invalid path value "'.concat(a[s],'" is not a path command');return}if(h.index+=1,Qe(h),h.data=[],!D){pe(h);return}for(;;){for(var L=D;L>0;L-=1){if(ne(m)&&(L===3||L===4)?xe(h):We(h),h.err.length)return;h.data.push(h.param),Qe(h),h.index<p&&a.charCodeAt(h.index)===44&&(h.index+=1,Qe(h))}if(h.index>=h.max||!qt(a.charCodeAt(h.index)))break}pe(h)}var nn=function(){function h(p){this.pathValue=p,this.segments=[],this.max=p.length,this.index=0,this.param=0,this.segmentStart=0,this.data=[],this.err=""}return h}();function le(h){if(ot(h))return[].concat(h);var p=new nn(h);for(Qe(p);p.index<p.max&&!p.err.length;)Me(p);return p.err?p.err:p.segments}function be(h){if(It(h))return[].concat(h);var p=le(h),a=0,s=0,m=0,D=0;return p.map(function(L){var V=L.slice(1).map(Number),st=L[0],Lt=st.toUpperCase();if(st==="M")return a=V[0],s=V[1],m=a,D=s,["M",a,s];var he;if(st!==Lt)switch(Lt){case"A":he=[Lt,V[0],V[1],V[2],V[3],V[4],V[5]+a,V[6]+s];break;case"V":he=[Lt,V[0]+s];break;case"H":he=[Lt,V[0]+a];break;default:{var Te=V.map(function(qe,tn){return qe+(tn%2?s:a)});he=[Lt].concat(Te)}}else he=[Lt].concat(V);var je=he.length;switch(Lt){case"Z":a=m,s=D;break;case"H":a=he[1];break;case"V":s=he[1];break;default:a=he[je-2],s=he[je-1],Lt==="M"&&(m=a,D=s)}return he})}function De(h,p){var a=h[0],s=p.x1,m=p.y1,D=p.x2,L=p.y2,V=h.slice(1).map(Number),st=h;if("TQ".includes(a)||(p.qx=null,p.qy=null),a==="H")st=["L",h[1],m];else if(a==="V")st=["L",s,h[1]];else if(a==="S"){var Lt=s*2-D,he=m*2-L;p.x1=Lt,p.y1=he,st=["C",Lt,he].concat(V)}else if(a==="T"){var Te=s*2-p.qx,je=m*2-p.qy;p.qx=Te,p.qy=je,st=["Q",Te,je].concat(V)}else if(a==="Q"){var qe=V[0],tn=V[1];p.qx=qe,p.qy=tn}return st}function Yt(h){if(zt(h))return[].concat(h);for(var p=be(h),a=(0,Xt.pi)({},Ot),s=0;s<p.length;s+=1){p[s]=De(p[s],a);var m=p[s],D=m.length;a.x1=+m[D-2],a.y1=+m[D-1],a.x2=+m[D-4]||a.x1,a.y2=+m[D-3]||a.y1}return p}function re(h,p,a){var s=h[0],m=h[1],D=p[0],L=p[1];return[s+(D-s)*a,m+(L-m)*a]}function xt(h,p,a,s,m){var D=(0,nt.y)([h,p],[a,s]),L={x:0,y:0};if(typeof m=="number")if(m<=0)L={x:h,y:p};else if(m>=D)L={x:a,y:s};else{var V=re([h,p],[a,s],m/D),st=V[0],Lt=V[1];L={x:st,y:Lt}}return{length:D,point:L,min:{x:Math.min(h,a),y:Math.min(p,s)},max:{x:Math.max(h,a),y:Math.max(p,s)}}}function at(h,p){var a=h.x,s=h.y,m=p.x,D=p.y,L=a*m+s*D,V=Math.sqrt((Math.pow(a,2)+Math.pow(s,2))*(Math.pow(m,2)+Math.pow(D,2))),st=a*D-s*m<0?-1:1,Lt=st*Math.acos(L/V);return Lt}function se(h,p,a,s,m,D,L,V,st,Lt){var he=Math.abs,Te=Math.sin,je=Math.cos,qe=Math.sqrt,tn=Math.PI,fn=he(a),gn=he(s),yn=(m%360+360)%360,pn=yn*(tn/180);if(h===V&&p===st)return{x:h,y:p};if(fn===0||gn===0)return xt(h,p,V,st,Lt).point;var Rn=(h-V)/2,Qn=(p-st)/2,vr={x:je(pn)*Rn+Te(pn)*Qn,y:-Te(pn)*Rn+je(pn)*Qn},wr=Math.pow(vr.x,2)/Math.pow(fn,2)+Math.pow(vr.y,2)/Math.pow(gn,2);wr>1&&(fn*=qe(wr),gn*=qe(wr));var Pr=Math.pow(fn,2)*Math.pow(gn,2)-Math.pow(fn,2)*Math.pow(vr.y,2)-Math.pow(gn,2)*Math.pow(vr.x,2),Ur=Math.pow(fn,2)*Math.pow(vr.y,2)+Math.pow(gn,2)*Math.pow(vr.x,2),Gr=Pr/Ur;Gr=Gr<0?0:Gr;var _r=(D!==L?1:-1)*qe(Gr),Ar={x:_r*(fn*vr.y/gn),y:_r*(-(gn*vr.x)/fn)},jr={x:je(pn)*Ar.x-Te(pn)*Ar.y+(h+V)/2,y:Te(pn)*Ar.x+je(pn)*Ar.y+(p+st)/2},oi={x:(vr.x-Ar.x)/fn,y:(vr.y-Ar.y)/gn},Xi=at({x:1,y:0},oi),la={x:(-vr.x-Ar.x)/fn,y:(-vr.y-Ar.y)/gn},ca=at(oi,la);!L&&ca>0?ca-=2*tn:L&&ca<0&&(ca+=2*tn),ca%=2*tn;var Br=Xi+ca*Lt,wi=fn*je(Br),Ai=gn*Te(Br),Pa={x:je(pn)*wi-Te(pn)*Ai+jr.x,y:Te(pn)*wi+je(pn)*Ai+jr.y};return Pa}function Fe(h,p,a,s,m,D,L,V,st,Lt,he){var Te,je=he.bbox,qe=je===void 0?!0:je,tn=he.length,fn=tn===void 0?!0:tn,gn=he.sampleSize,yn=gn===void 0?30:gn,pn=typeof Lt=="number",Rn=h,Qn=p,vr=0,wr=[Rn,Qn,vr],Pr=[Rn,Qn],Ur=0,Gr={x:0,y:0},_r=[{x:Rn,y:Qn}];pn&&Lt<=0&&(Gr={x:Rn,y:Qn});for(var Ar=0;Ar<=yn;Ar+=1){if(Ur=Ar/yn,Te=se(h,p,a,s,m,D,L,V,st,Ur),Rn=Te.x,Qn=Te.y,qe&&_r.push({x:Rn,y:Qn}),fn&&(vr+=(0,nt.y)(Pr,[Rn,Qn])),Pr=[Rn,Qn],pn&&vr>=Lt&&Lt>wr[2]){var jr=(vr-Lt)/(vr-wr[2]);Gr={x:Pr[0]*(1-jr)+wr[0]*jr,y:Pr[1]*(1-jr)+wr[1]*jr}}wr=[Rn,Qn,vr]}return pn&&Lt>=vr&&(Gr={x:V,y:st}),{length:vr,point:Gr,min:{x:Math.min.apply(null,_r.map(function(oi){return oi.x})),y:Math.min.apply(null,_r.map(function(oi){return oi.y}))},max:{x:Math.max.apply(null,_r.map(function(oi){return oi.x})),y:Math.max.apply(null,_r.map(function(oi){return oi.y}))}}}function Re(h,p,a,s,m,D,L,V,st){var Lt=1-st;return{x:Math.pow(Lt,3)*h+3*Math.pow(Lt,2)*st*a+3*Lt*Math.pow(st,2)*m+Math.pow(st,3)*L,y:Math.pow(Lt,3)*p+3*Math.pow(Lt,2)*st*s+3*Lt*Math.pow(st,2)*D+Math.pow(st,3)*V}}function ge(h,p,a,s,m,D,L,V,st,Lt){var he,Te=Lt.bbox,je=Te===void 0?!0:Te,qe=Lt.length,tn=qe===void 0?!0:qe,fn=Lt.sampleSize,gn=fn===void 0?10:fn,yn=typeof st=="number",pn=h,Rn=p,Qn=0,vr=[pn,Rn,Qn],wr=[pn,Rn],Pr=0,Ur={x:0,y:0},Gr=[{x:pn,y:Rn}];yn&&st<=0&&(Ur={x:pn,y:Rn});for(var _r=0;_r<=gn;_r+=1){if(Pr=_r/gn,he=Re(h,p,a,s,m,D,L,V,Pr),pn=he.x,Rn=he.y,je&&Gr.push({x:pn,y:Rn}),tn&&(Qn+=(0,nt.y)(wr,[pn,Rn])),wr=[pn,Rn],yn&&Qn>=st&&st>vr[2]){var Ar=(Qn-st)/(Qn-vr[2]);Ur={x:wr[0]*(1-Ar)+vr[0]*Ar,y:wr[1]*(1-Ar)+vr[1]*Ar}}vr=[pn,Rn,Qn]}return yn&&st>=Qn&&(Ur={x:L,y:V}),{length:Qn,point:Ur,min:{x:Math.min.apply(null,Gr.map(function(jr){return jr.x})),y:Math.min.apply(null,Gr.map(function(jr){return jr.y}))},max:{x:Math.max.apply(null,Gr.map(function(jr){return jr.x})),y:Math.max.apply(null,Gr.map(function(jr){return jr.y}))}}}function Ie(h,p,a,s,m,D,L){var V=1-L;return{x:Math.pow(V,2)*h+2*V*L*a+Math.pow(L,2)*m,y:Math.pow(V,2)*p+2*V*L*s+Math.pow(L,2)*D}}function Ne(h,p,a,s,m,D,L,V){var st,Lt=V.bbox,he=Lt===void 0?!0:Lt,Te=V.length,je=Te===void 0?!0:Te,qe=V.sampleSize,tn=qe===void 0?10:qe,fn=typeof L=="number",gn=h,yn=p,pn=0,Rn=[gn,yn,pn],Qn=[gn,yn],vr=0,wr={x:0,y:0},Pr=[{x:gn,y:yn}];fn&&L<=0&&(wr={x:gn,y:yn});for(var Ur=0;Ur<=tn;Ur+=1){if(vr=Ur/tn,st=Ie(h,p,a,s,m,D,vr),gn=st.x,yn=st.y,he&&Pr.push({x:gn,y:yn}),je&&(pn+=(0,nt.y)(Qn,[gn,yn])),Qn=[gn,yn],fn&&pn>=L&&L>Rn[2]){var Gr=(pn-L)/(pn-Rn[2]);wr={x:Qn[0]*(1-Gr)+Rn[0]*Gr,y:Qn[1]*(1-Gr)+Rn[1]*Gr}}Rn=[gn,yn,pn]}return fn&&L>=pn&&(wr={x:m,y:D}),{length:pn,point:wr,min:{x:Math.min.apply(null,Pr.map(function(_r){return _r.x})),y:Math.min.apply(null,Pr.map(function(_r){return _r.y}))},max:{x:Math.max.apply(null,Pr.map(function(_r){return _r.x})),y:Math.max.apply(null,Pr.map(function(_r){return _r.y}))}}}function bt(h,p,a){for(var s,m,D,L,V,st,Lt=Yt(h),he=typeof p=="number",Te,je=[],qe,tn=0,fn=0,gn=0,yn=0,pn,Rn=[],Qn=[],vr=0,wr={x:0,y:0},Pr=wr,Ur=wr,Gr=wr,_r=0,Ar=0,jr=Lt.length;Ar<jr;Ar+=1)pn=Lt[Ar],qe=pn[0],Te=qe==="M",je=Te?je:[tn,fn].concat(pn.slice(1)),Te?(gn=pn[1],yn=pn[2],wr={x:gn,y:yn},Pr=wr,vr=0,he&&p<.001&&(Gr=wr)):qe==="L"?(s=xt(je[0],je[1],je[2],je[3],(p||0)-_r),vr=s.length,wr=s.min,Pr=s.max,Ur=s.point):qe==="A"?(m=Fe(je[0],je[1],je[2],je[3],je[4],je[5],je[6],je[7],je[8],(p||0)-_r,a||{}),vr=m.length,wr=m.min,Pr=m.max,Ur=m.point):qe==="C"?(D=ge(je[0],je[1],je[2],je[3],je[4],je[5],je[6],je[7],(p||0)-_r,a||{}),vr=D.length,wr=D.min,Pr=D.max,Ur=D.point):qe==="Q"?(L=Ne(je[0],je[1],je[2],je[3],je[4],je[5],(p||0)-_r,a||{}),vr=L.length,wr=L.min,Pr=L.max,Ur=L.point):qe==="Z"&&(je=[tn,fn,gn,yn],V=xt(je[0],je[1],je[2],je[3],(p||0)-_r),vr=V.length,wr=V.min,Pr=V.max,Ur=V.point),he&&_r<p&&_r+vr>=p&&(Gr=Ur),Qn.push(Pr),Rn.push(wr),_r+=vr,st=qe!=="Z"?pn.slice(-2):[gn,yn],tn=st[0],fn=st[1];return he&&p>=_r&&(Gr={x:tn,y:fn}),{length:_r,point:Gr,min:{x:Math.min.apply(null,Rn.map(function(oi){return oi.x})),y:Math.min.apply(null,Rn.map(function(oi){return oi.y}))},max:{x:Math.max.apply(null,Qn.map(function(oi){return oi.x})),y:Math.max.apply(null,Qn.map(function(oi){return oi.y}))}}}function Jt(h,p){return bt(h,void 0,(0,Xt.pi)((0,Xt.pi)({},p),{bbox:!1,length:!0})).length}var oe=d(59895),M=d(82639),Q=d(5131),te=function(h,p){return(h%p+p)%p},Ut=te;function we(h,p,a){if(h[a].length>7){h[a].shift();for(var s=h[a],m=a;s.length;)p[a]="A",h.splice(m+=1,0,["C"].concat(s.splice(0,6)));h.splice(a,1)}}function Ce(h){return zt(h)&&h.every(function(p){var a=p[0];return"MC".includes(a)})}var _e=d(66045);function mt(h,p,a,s,m,D){var L=.3333333333333333,V=2/3;return[L*h+V*a,L*p+V*s,L*m+V*a,L*D+V*s,m,D]}var X=function(h,p,a,s){var m=.5,D=re([h,p],[a,s],m);return(0,Xt.ev)((0,Xt.ev)([],D,!0),[a,s,a,s],!1)};function Pt(h,p){var a=h[0],s=h.slice(1).map(Number),m=s[0],D=s[1],L,V=p.x1,st=p.y1,Lt=p.x,he=p.y;switch("TQ".includes(a)||(p.qx=null,p.qy=null),a){case"M":return p.x=m,p.y=D,h;case"A":return L=[V,st].concat(s),["C"].concat((0,_e.W)(L[0],L[1],L[2],L[3],L[4],L[5],L[6],L[7],L[8],L[9]));case"Q":return p.qx=m,p.qy=D,L=[V,st].concat(s),["C"].concat(mt(L[0],L[1],L[2],L[3],L[4],L[5]));case"L":return["C"].concat(X(V,st,m,D));case"Z":return V===Lt&&st===he?["C",V,st,Lt,he,Lt,he]:["C"].concat(X(V,st,Lt,he));default:}return h}function At(h,p){if(p===void 0&&(p=!1),Ce(h)){var a=[].concat(h);return p?[a,[]]:a}for(var s=Yt(h),m=(0,Xt.pi)({},Ot),D=[],L="",V=s.length,st,Lt,he=[],Te=0;Te<V;Te+=1){s[Te]&&(L=s[Te][0]),D[Te]=L;var je=Pt(s[Te],m);s[Te]=je,we(s,D,Te),V=s.length,L==="Z"&&he.push(Te),st=s[Te],Lt=st.length,m.x1=+st[Lt-2],m.y1=+st[Lt-1],m.x2=+st[Lt-4]||m.x1,m.y2=+st[Lt-3]||m.y1}return p?[s,he]:s}var Rt=50;function _t(h,p){p===void 0&&(p=.5);var a=h.slice(0,2),s=h.slice(2,4),m=h.slice(4,6),D=h.slice(6,8),L=re(a,s,p),V=re(s,m,p),st=re(m,D,p),Lt=re(L,V,p),he=re(V,st,p),Te=re(Lt,he,p);return[["C"].concat(L,Lt,Te),["C"].concat(he,st,D)]}function Vt(h){return h.map(function(p,a,s){var m=a&&s[a-1].slice(-2).concat(p.slice(1)),D=a?ge(m[0],m[1],m[2],m[3],m[4],m[5],m[6],m[7],m[8],{bbox:!1}).length:0,L;return a?L=D?_t(m):[p,p]:L=[p],{s:p,ss:L,l:D}})}function ae(h,p,a,s){if(s===void 0&&(s=0),s>Rt)return console.warn("Maximum recursion depth reached in equalizeSegments"),[h,p];var m=Vt(h),D=Vt(p),L=m.length,V=D.length,st=m.filter(function(yn){return yn.l}).length,Lt=D.filter(function(yn){return yn.l}).length,he=m.filter(function(yn){return yn.l}).reduce(function(yn,pn){var Rn=pn.l;return yn+Rn},0)/st||0,Te=D.filter(function(yn){return yn.l}).reduce(function(yn,pn){var Rn=pn.l;return yn+Rn},0)/Lt||0,je=a||Math.max(L,V),qe=[he,Te],tn=[je-L,je-V],fn=0,gn=[m,D].map(function(yn,pn){return yn.l===je?yn.map(function(Rn){return Rn.s}):yn.map(function(Rn,Qn){return fn=Qn&&tn[pn]&&Rn.l>=qe[pn],tn[pn]-=fn?1:0,fn?Rn.ss:[Rn.s]}).flat()});return gn[0].length===gn[1].length?gn:ae(gn[0],gn[1],je,s+1)}function fe(h,p,a,s,m,D,L,V){return 3*((V-p)*(a+m)-(L-h)*(s+D)+s*(h-m)-a*(p-D)+V*(m+h/3)-L*(D+p/3))/20}function me(h){var p=0,a=0,s=0;return At(h).map(function(m){var D;switch(m[0]){case"M":return p=m[1],a=m[2],0;default:var L=m.slice(1),V=L[0],st=L[1],Lt=L[2],he=L[3],Te=L[4],je=L[5];return s=fe(p,a,V,st,Lt,he,Te,je),D=m.slice(-2),p=D[0],a=D[1],s}}).reduce(function(m,D){return m+D},0)}function Ze(h){return me(h)>=0}function Ge(h){var p=h.slice(1).map(function(a,s,m){return s?m[s-1].slice(-2).concat(a.slice(1)):h[0].slice(1).concat(a.slice(1))}).map(function(a){return a.map(function(s,m){return a[a.length-m-2*(1-m%2)]})}).reverse();return[["M"].concat(p[0].slice(0,2))].concat(p.map(function(a){return["C"].concat(a.slice(2))}))}function Ve(h){return h.map(function(p){return Array.isArray(p)?[].concat(p):p})}function rn(h){var p=h.length,a=p-1;return h.map(function(s,m){return h.map(function(D,L){var V=m+L,st;return L===0||h[V]&&h[V][0]==="M"?(st=h[V],["M"].concat(st.slice(-2))):(V>=p&&(V-=a),h[V])})})}function wn(h,p){var a=h.length-1,s=[],m=0,D=0,L=rn(h);return L.forEach(function(V,st){h.slice(1).forEach(function(Lt,he){D+=(0,nt.y)(h[(st+he)%a].slice(-2),p[he%a].slice(-2))}),s[st]=D,D=0}),m=s.indexOf(Math.min.apply(null,s)),L[m]}var on=d(49527),_n=d(39934),Cn=d(50264),Ln=d(71018),En=d(93785);function cr(h,p,a){return bt(h,p,(0,Xt.pi)((0,Xt.pi)({},a),{bbox:!1,length:!0})).point}var Bn=d(20068),br=d(58289);function fr(h,p){for(;!{}.hasOwnProperty.call(h,p)&&(h=(0,br.Z)(h))!==null;);return h}function Zr(){return Zr=typeof Reflect!="undefined"&&Reflect.get?Reflect.get.bind():function(h,p,a){var s=fr(h,p);if(s){var m=Object.getOwnPropertyDescriptor(s,p);return m.get?m.get.call(arguments.length<3?h:a):m.value}},Zr.apply(null,arguments)}function di(h,p,a,s){var m=Zr((0,br.Z)(1&s?h.prototype:h),p,a);return 2&s&&typeof m=="function"?function(D){return m.apply(a,D)}:m}var Xr=d(97047),Mr=d(52402),gi=d(75044),yi=d(3202),_i=d(19251),qr=d(75931);var Jn=function(h){return h.GROUP="g",h.FRAGMENT="fragment",h.CIRCLE="circle",h.ELLIPSE="ellipse",h.IMAGE="image",h.RECT="rect",h.LINE="line",h.POLYLINE="polyline",h.POLYGON="polygon",h.TEXT="text",h.PATH="path",h.HTML="html",h.MESH="mesh",h}({}),sn=function(h){return h[h.ZERO=0]="ZERO",h[h.NEGATIVE_ONE=1]="NEGATIVE_ONE",h}({}),Wt=function(){function h(){(0,R.Z)(this,h),this.plugins=[]}return(0,O.Z)(h,[{key:"addRenderingPlugin",value:function(a){this.plugins.push(a),this.context.renderingPlugins.push(a)}},{key:"removeAllRenderingPlugins",value:function(){var a=this;this.plugins.forEach(function(s){var m=a.context.renderingPlugins.indexOf(s);m>=0&&a.context.renderingPlugins.splice(m,1)})}}])}(),y=function(){function h(p){(0,R.Z)(this,h),this.clipSpaceNearZ=sn.NEGATIVE_ONE,this.plugins=[],this.config=(0,l.Z)({enableDirtyCheck:!0,enableCulling:!1,enableAutoRendering:!0,enableDirtyRectangleRendering:!0,enableDirtyRectangleRenderingDebug:!1,enableSizeAttenuation:!0,enableRenderingOptimization:!1},p)}return(0,O.Z)(h,[{key:"registerPlugin",value:function(a){var s=this.plugins.findIndex(function(m){return m===a});s===-1&&this.plugins.push(a)}},{key:"unregisterPlugin",value:function(a){var s=this.plugins.findIndex(function(m){return m===a});s>-1&&this.plugins.splice(s,1)}},{key:"getPlugins",value:function(){return this.plugins}},{key:"getPlugin",value:function(a){return this.plugins.find(function(s){return s.name===a})}},{key:"getConfig",value:function(){return this.config}},{key:"setConfig",value:function(a){Object.assign(this.config,a)}}])}(),E=x.IH,c=x.JG,f=x.Fp,w=x.VV,Z=x.bA,z=x.lu,H=function(){function h(){(0,R.Z)(this,h),this.center=[0,0,0],this.halfExtents=[0,0,0],this.min=[0,0,0],this.max=[0,0,0]}return(0,O.Z)(h,[{key:"update",value:function(a,s){c(this.center,a),c(this.halfExtents,s),z(this.min,this.center,this.halfExtents),E(this.max,this.center,this.halfExtents)}},{key:"setMinMax",value:function(a,s){E(this.center,s,a),Z(this.center,this.center,.5),z(this.halfExtents,s,a),Z(this.halfExtents,this.halfExtents,.5),c(this.min,a),c(this.max,s)}},{key:"getMin",value:function(){return this.min}},{key:"getMax",value:function(){return this.max}},{key:"add",value:function(a){if(!h.isEmpty(a)){if(h.isEmpty(this)){this.setMinMax(a.getMin(),a.getMax());return}var s=this.center,m=s[0],D=s[1],L=s[2],V=this.halfExtents,st=V[0],Lt=V[1],he=V[2],Te=m-st,je=m+st,qe=D-Lt,tn=D+Lt,fn=L-he,gn=L+he,yn=a.center,pn=yn[0],Rn=yn[1],Qn=yn[2],vr=a.halfExtents,wr=vr[0],Pr=vr[1],Ur=vr[2],Gr=pn-wr,_r=pn+wr,Ar=Rn-Pr,jr=Rn+Pr,oi=Qn-Ur,Xi=Qn+Ur;Gr<Te&&(Te=Gr),_r>je&&(je=_r),Ar<qe&&(qe=Ar),jr>tn&&(tn=jr),oi<fn&&(fn=oi),Xi>gn&&(gn=Xi),s[0]=(Te+je)*.5,s[1]=(qe+tn)*.5,s[2]=(fn+gn)*.5,V[0]=(je-Te)*.5,V[1]=(tn-qe)*.5,V[2]=(gn-fn)*.5,this.min[0]=Te,this.min[1]=qe,this.min[2]=fn,this.max[0]=je,this.max[1]=tn,this.max[2]=gn}}},{key:"setFromTransformedAABB",value:function(a,s){var m=this.center,D=this.halfExtents,L=a.center,V=a.halfExtents,st=s[0],Lt=s[4],he=s[8],Te=s[1],je=s[5],qe=s[9],tn=s[2],fn=s[6],gn=s[10],yn=Math.abs(st),pn=Math.abs(Lt),Rn=Math.abs(he),Qn=Math.abs(Te),vr=Math.abs(je),wr=Math.abs(qe),Pr=Math.abs(tn),Ur=Math.abs(fn),Gr=Math.abs(gn);m[0]=s[12]+st*L[0]+Lt*L[1]+he*L[2],m[1]=s[13]+Te*L[0]+je*L[1]+qe*L[2],m[2]=s[14]+tn*L[0]+fn*L[1]+gn*L[2],D[0]=yn*V[0]+pn*V[1]+Rn*V[2],D[1]=Qn*V[0]+vr*V[1]+wr*V[2],D[2]=Pr*V[0]+Ur*V[1]+Gr*V[2],z(this.min,m,D),E(this.max,m,D)}},{key:"intersects",value:function(a){var s=this.getMax(),m=this.getMin(),D=a.getMax(),L=a.getMin();return m[0]<=D[0]&&s[0]>=L[0]&&m[1]<=D[1]&&s[1]>=L[1]&&m[2]<=D[2]&&s[2]>=L[2]}},{key:"intersection",value:function(a){if(!this.intersects(a))return null;var s=new h,m=f([0,0,0],this.getMin(),a.getMin()),D=w([0,0,0],this.getMax(),a.getMax());return s.setMinMax(m,D),s}},{key:"getNegativeFarPoint",value:function(a){return a.pnVertexFlag===273?c([0,0,0],this.min):a.pnVertexFlag===272?[this.min[0],this.min[1],this.max[2]]:a.pnVertexFlag===257?[this.min[0],this.max[1],this.min[2]]:a.pnVertexFlag===256?[this.min[0],this.max[1],this.max[2]]:a.pnVertexFlag===17?[this.max[0],this.min[1],this.min[2]]:a.pnVertexFlag===16?[this.max[0],this.min[1],this.max[2]]:a.pnVertexFlag===1?[this.max[0],this.max[1],this.min[2]]:[this.max[0],this.max[1],this.max[2]]}},{key:"getPositiveFarPoint",value:function(a){return a.pnVertexFlag===273?c([0,0,0],this.max):a.pnVertexFlag===272?[this.max[0],this.max[1],this.min[2]]:a.pnVertexFlag===257?[this.max[0],this.min[1],this.max[2]]:a.pnVertexFlag===256?[this.max[0],this.min[1],this.min[2]]:a.pnVertexFlag===17?[this.min[0],this.max[1],this.max[2]]:a.pnVertexFlag===16?[this.min[0],this.max[1],this.min[2]]:a.pnVertexFlag===1?[this.min[0],this.min[1],this.max[2]]:[this.min[0],this.min[1],this.min[2]]}}],[{key:"isEmpty",value:function(a){return!a||a.halfExtents[0]===0&&a.halfExtents[1]===0&&a.halfExtents[2]===0}}])}(),q=function(){function h(p,a){(0,R.Z)(this,h),this.distance=p||0,this.normal=a||x.al(0,1,0),this.updatePNVertexFlag()}return(0,O.Z)(h,[{key:"updatePNVertexFlag",value:function(){this.pnVertexFlag=(+(this.normal[0]>=0)<<8)+(+(this.normal[1]>=0)<<4)+ +(this.normal[2]>=0)}},{key:"distanceToPoint",value:function(a){return x.AK(a,this.normal)-this.distance}},{key:"normalize",value:function(){var a=1/x.Zh(this.normal);x.bA(this.normal,this.normal,a),this.distance*=a}},{key:"intersectsLine",value:function(a,s,m){var D=this.distanceToPoint(a),L=this.distanceToPoint(s),V=D/(D-L),st=V>=0&&V<=1;return st&&m&&x.t7(m,a,s,V),st}}])}(),Dt=function(h){return h[h.OUTSIDE=4294967295]="OUTSIDE",h[h.INSIDE=0]="INSIDE",h[h.INDETERMINATE=2147483647]="INDETERMINATE",h}({}),U=function(){function h(p){if((0,R.Z)(this,h),this.planes=[],p)this.planes=p;else for(var a=0;a<6;a++)this.planes.push(new q)}return(0,O.Z)(h,[{key:"extractFromVPMatrix",value:function(a){var s=(0,b.Z)(a,16),m=s[0],D=s[1],L=s[2],V=s[3],st=s[4],Lt=s[5],he=s[6],Te=s[7],je=s[8],qe=s[9],tn=s[10],fn=s[11],gn=s[12],yn=s[13],pn=s[14],Rn=s[15];x.t8(this.planes[0].normal,V-m,Te-st,fn-je),this.planes[0].distance=Rn-gn,x.t8(this.planes[1].normal,V+m,Te+st,fn+je),this.planes[1].distance=Rn+gn,x.t8(this.planes[2].normal,V+D,Te+Lt,fn+qe),this.planes[2].distance=Rn+yn,x.t8(this.planes[3].normal,V-D,Te-Lt,fn-qe),this.planes[3].distance=Rn-yn,x.t8(this.planes[4].normal,V-L,Te-he,fn-tn),this.planes[4].distance=Rn-pn,x.t8(this.planes[5].normal,V+L,Te+he,fn+tn),this.planes[5].distance=Rn+pn,this.planes.forEach(function(Qn){Qn.normalize(),Qn.updatePNVertexFlag()})}}])}(),Y=function(){function h(){var p=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;(0,R.Z)(this,h),this.x=0,this.y=0,this.x=p,this.y=a}return(0,O.Z)(h,[{key:"clone",value:function(){return new h(this.x,this.y)}},{key:"copyFrom",value:function(a){this.x=a.x,this.y=a.y}}])}(),G=function(){function h(p,a,s,m){(0,R.Z)(this,h),this.x=p,this.y=a,this.width=s,this.height=m,this.left=p,this.right=p+s,this.top=a,this.bottom=a+m}return(0,O.Z)(h,[{key:"toJSON",value:function(){}}],[{key:"fromRect",value:function(a){return new h(a.x,a.y,a.width,a.height)}},{key:"applyTransform",value:function(a,s){var m=k.al(a.x,a.y,0,1),D=k.al(a.x+a.width,a.y,0,1),L=k.al(a.x,a.y+a.height,0,1),V=k.al(a.x+a.width,a.y+a.height,0,1),st=k.Ue(),Lt=k.Ue(),he=k.Ue(),Te=k.Ue();k.fF(st,m,s),k.fF(Lt,D,s),k.fF(he,L,s),k.fF(Te,V,s);var je=Math.min(st[0],Lt[0],he[0],Te[0]),qe=Math.min(st[1],Lt[1],he[1],Te[1]),tn=Math.max(st[0],Lt[0],he[0],Te[0]),fn=Math.max(st[1],Lt[1],he[1],Te[1]);return h.fromRect({x:je,y:qe,width:tn-je,height:fn-qe})}}])}(),J="Method not implemented.",pt="Use document.documentElement instead.",Kt="Cannot append a destroyed element.";function yt(h){return h===void 0?0:h>360||h<-360?h%360:h}var Qt=x.Ue();function ct(h){var p=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0,s=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!0;return Array.isArray(h)&&h.length===3?s?x.d9(h):x.JG(Qt,h):(0,ut.Z)(h)?s?x.al(h,p,a):x.t8(Qt,h,p,a):s?x.al(h[0],h[1]||p,h[2]||a):x.t8(Qt,h[0],h[1]||p,h[2]||a)}var ht=Math.PI/180;function rt(h){return h*ht}var $t=180/Math.PI;function Ht(h){return h*$t}var ue=.9;function Ee(h){return h%=400,h<0&&(h+=400),h*ue}function ie(h){return h/360}function Pe(h){return 360*h}var Be=Math.PI/2;function He(h,p){var a=p[0],s=p[1],m=p[2],D=p[3],L=a*a,V=s*s,st=m*m,Lt=D*D,he=L+V+st+Lt,Te=a*D-s*m;return Te>.499995*he?(h[0]=Be,h[1]=2*Math.atan2(s,a),h[2]=0):Te<-.499995*he?(h[0]=-Be,h[1]=2*Math.atan2(s,a),h[2]=0):(h[0]=Math.asin(2*(a*m-D*s)),h[1]=Math.atan2(2*(a*D+s*m),1-2*(st+Lt)),h[2]=Math.atan2(2*(a*s+m*D),1-2*(V+st))),h}function en(h,p){var a,s,m=N.getScaling(x.Ue(),p),D=(0,b.Z)(m,3),L=D[0],V=D[1],st=D[2],Lt=Math.asin(-p[2]/L);return Lt<Be?Lt>-Be?(a=Math.atan2(p[6]/V,p[10]/st),s=Math.atan2(p[1]/L,p[0]/L)):(s=0,a=-Math.atan2(p[4]/V,p[5]/V)):(s=0,a=Math.atan2(p[4]/V,p[5]/V)),h[0]=a,h[1]=Lt,h[2]=s,h}function un(h,p){return p.length===16?en(h,p):He(h,p)}function mn(h,p,a,s,m){var D=Math.cos(h),L=Math.sin(h);return et.al(s*D,m*L,0,-s*L,m*D,0,p,a,1)}function Sn(h,p,a,s,m,D,L){var V=arguments.length>7&&arguments[7]!==void 0?arguments[7]:!1,st=2*D,Lt=a-p,he=s-m,Te=st/Lt,je=st/he,qe=(a+p)/Lt,tn=(s+m)/he,fn,gn,yn=L-D,pn=L*D;return V?(fn=-L/yn,gn=-pn/yn):(fn=-(L+D)/yn,gn=-2*pn/yn),h[0]=Te,h[1]=0,h[2]=0,h[3]=0,h[4]=0,h[5]=je,h[6]=0,h[7]=0,h[8]=qe,h[9]=tn,h[10]=fn,h[11]=-1,h[12]=0,h[13]=0,h[14]=gn,h[15]=0,h}function Pn(h){var p=h[0],a=h[1],s=h[3],m=h[4],D=Math.sqrt(p*p+a*a),L=Math.sqrt(s*s+m*m),V=p*m-a*s;if(V<0&&(p<m?D=-D:L=-L),D){var st=1/D;p*=st,a*=st}if(L){var Lt=1/L;s*=Lt,m*=Lt}var he=Math.atan2(a,p),Te=Ht(he);return[h[6],h[7],D,L,Te]}var $n=N.create(),Wn=N.create(),Xn=k.Ue(),An=[x.Ue(),x.Ue(),x.Ue()],Zn=x.Ue();function qn(h,p,a,s,m,D){if(!er($n,h)||(N.copy(Wn,$n),Wn[3]=0,Wn[7]=0,Wn[11]=0,Wn[15]=1,Math.abs(N.determinant(Wn))<1e-8))return!1;var L=$n[3],V=$n[7],st=$n[11],Lt=$n[12],he=$n[13],Te=$n[14],je=$n[15];if(L!==0||V!==0||st!==0){Xn[0]=L,Xn[1]=V,Xn[2]=st,Xn[3]=je;var qe=N.invert(Wn,Wn);if(!qe)return!1;N.transpose(Wn,Wn),k.fF(m,Xn,Wn)}else m[0]=m[1]=m[2]=0,m[3]=1;if(p[0]=Lt,p[1]=he,p[2]=Te,Cr(An,$n),a[0]=x.kE(An[0]),x.Fv(An[0],An[0]),s[0]=x.AK(An[0],An[1]),Un(An[1],An[1],An[0],1,-s[0]),a[1]=x.kE(An[1]),x.Fv(An[1],An[1]),s[0]/=a[1],s[1]=x.AK(An[0],An[2]),Un(An[2],An[2],An[0],1,-s[1]),s[2]=x.AK(An[1],An[2]),Un(An[2],An[2],An[1],1,-s[2]),a[2]=x.kE(An[2]),x.Fv(An[2],An[2]),s[1]/=a[2],s[2]/=a[2],x.kC(Zn,An[1],An[2]),x.AK(An[0],Zn)<0)for(var tn=0;tn<3;tn++)a[tn]*=-1,An[tn][0]*=-1,An[tn][1]*=-1,An[tn][2]*=-1;return D[0]=.5*Math.sqrt(Math.max(1+An[0][0]-An[1][1]-An[2][2],0)),D[1]=.5*Math.sqrt(Math.max(1-An[0][0]+An[1][1]-An[2][2],0)),D[2]=.5*Math.sqrt(Math.max(1-An[0][0]-An[1][1]+An[2][2],0)),D[3]=.5*Math.sqrt(Math.max(1+An[0][0]+An[1][1]+An[2][2],0)),An[2][1]>An[1][2]&&(D[0]=-D[0]),An[0][2]>An[2][0]&&(D[1]=-D[1]),An[1][0]>An[0][1]&&(D[2]=-D[2]),!0}function er(h,p){var a=p[15];if(a===0)return!1;for(var s=1/a,m=0;m<16;m++)h[m]=p[m]*s;return!0}function Cr(h,p){h[0][0]=p[0],h[0][1]=p[1],h[0][2]=p[2],h[1][0]=p[4],h[1][1]=p[5],h[1][2]=p[6],h[2][0]=p[8],h[2][1]=p[9],h[2][2]=p[10]}function Un(h,p,a,s,m){h[0]=p[0]*s+a[0]*m,h[1]=p[1]*s+a[1]*m,h[2]=p[2]*s+a[2]*m}var ar=function(h){return h[h.ORBITING=0]="ORBITING",h[h.EXPLORING=1]="EXPLORING",h[h.TRACKING=2]="TRACKING",h}({}),ii=function(h){return h[h.DEFAULT=0]="DEFAULT",h[h.ROTATIONAL=1]="ROTATIONAL",h[h.TRANSLATIONAL=2]="TRANSLATIONAL",h[h.CINEMATIC=3]="CINEMATIC",h}({}),Or=function(h){return h[h.ORTHOGRAPHIC=0]="ORTHOGRAPHIC",h[h.PERSPECTIVE=1]="PERSPECTIVE",h}({}),Lr={UPDATED:"updated"},fi=2e-4,zr=function(){function h(){(0,R.Z)(this,h),this.clipSpaceNearZ=sn.NEGATIVE_ONE,this.eventEmitter=new I,this.matrix=N.create(),this.right=x.al(1,0,0),this.up=x.al(0,1,0),this.forward=x.al(0,0,1),this.position=x.al(0,0,1),this.focalPoint=x.al(0,0,0),this.distanceVector=x.al(0,0,-1),this.distance=1,this.azimuth=0,this.elevation=0,this.roll=0,this.relAzimuth=0,this.relElevation=0,this.relRoll=0,this.dollyingStep=0,this.maxDistance=1/0,this.minDistance=-1/0,this.zoom=1,this.rotateWorld=!1,this.fov=30,this.near=.1,this.far=1e3,this.aspect=1,this.projectionMatrix=N.create(),this.projectionMatrixInverse=N.create(),this.jitteredProjectionMatrix=void 0,this.enableUpdate=!0,this.type=ar.EXPLORING,this.trackingMode=ii.DEFAULT,this.projectionMode=Or.PERSPECTIVE,this.frustum=new U,this.orthoMatrix=N.create()}return(0,O.Z)(h,[{key:"isOrtho",value:function(){return this.projectionMode===Or.ORTHOGRAPHIC}},{key:"getProjectionMode",value:function(){return this.projectionMode}},{key:"getPerspective",value:function(){return this.jitteredProjectionMatrix||this.projectionMatrix}},{key:"getPerspectiveInverse",value:function(){return this.projectionMatrixInverse}},{key:"getFrustum",value:function(){return this.frustum}},{key:"getPosition",value:function(){return this.position}},{key:"getFocalPoint",value:function(){return this.focalPoint}},{key:"getDollyingStep",value:function(){return this.dollyingStep}},{key:"getNear",value:function(){return this.near}},{key:"getFar",value:function(){return this.far}},{key:"getZoom",value:function(){return this.zoom}},{key:"getOrthoMatrix",value:function(){return this.orthoMatrix}},{key:"getView",value:function(){return this.view}},{key:"setEnableUpdate",value:function(a){this.enableUpdate=a}},{key:"setType",value:function(a,s){return this.type=a,this.type===ar.EXPLORING?this.setWorldRotation(!0):this.setWorldRotation(!1),this._getAngles(),this.type===ar.TRACKING&&s!==void 0&&this.setTrackingMode(s),this}},{key:"setProjectionMode",value:function(a){return this.projectionMode=a,this}},{key:"setTrackingMode",value:function(a){if(this.type!==ar.TRACKING)throw new Error("Impossible to set a tracking mode if the camera is not of tracking type");return this.trackingMode=a,this}},{key:"setWorldRotation",value:function(a){return this.rotateWorld=a,this._getAngles(),this}},{key:"getViewTransform",value:function(){return N.invert(N.create(),this.matrix)}},{key:"getWorldTransform",value:function(){return this.matrix}},{key:"jitterProjectionMatrix",value:function(a,s){var m=N.fromTranslation(N.create(),[a,s,0]);this.jitteredProjectionMatrix=N.multiply(N.create(),m,this.projectionMatrix)}},{key:"clearJitterProjectionMatrix",value:function(){this.jitteredProjectionMatrix=void 0}},{key:"setMatrix",value:function(a){return this.matrix=a,this._update(),this}},{key:"setProjectionMatrix",value:function(a){this.projectionMatrix=a}},{key:"setFov",value:function(a){return this.setPerspective(this.near,this.far,a,this.aspect),this}},{key:"setAspect",value:function(a){return this.setPerspective(this.near,this.far,this.fov,a),this}},{key:"setNear",value:function(a){return this.projectionMode===Or.PERSPECTIVE?this.setPerspective(a,this.far,this.fov,this.aspect):this.setOrthographic(this.left,this.rright,this.top,this.bottom,a,this.far),this}},{key:"setFar",value:function(a){return this.projectionMode===Or.PERSPECTIVE?this.setPerspective(this.near,a,this.fov,this.aspect):this.setOrthographic(this.left,this.rright,this.top,this.bottom,this.near,a),this}},{key:"setViewOffset",value:function(a,s,m,D,L,V){return this.aspect=a/s,this.view===void 0&&(this.view={enabled:!0,fullWidth:1,fullHeight:1,offsetX:0,offsetY:0,width:1,height:1}),this.view.enabled=!0,this.view.fullWidth=a,this.view.fullHeight=s,this.view.offsetX=m,this.view.offsetY=D,this.view.width=L,this.view.height=V,this.projectionMode===Or.PERSPECTIVE?this.setPerspective(this.near,this.far,this.fov,this.aspect):this.setOrthographic(this.left,this.rright,this.top,this.bottom,this.near,this.far),this}},{key:"clearViewOffset",value:function(){return this.view!==void 0&&(this.view.enabled=!1),this.projectionMode===Or.PERSPECTIVE?this.setPerspective(this.near,this.far,this.fov,this.aspect):this.setOrthographic(this.left,this.rright,this.top,this.bottom,this.near,this.far),this}},{key:"setZoom",value:function(a){return this.zoom=a,this.projectionMode===Or.ORTHOGRAPHIC?this.setOrthographic(this.left,this.rright,this.top,this.bottom,this.near,this.far):this.projectionMode===Or.PERSPECTIVE&&this.setPerspective(this.near,this.far,this.fov,this.aspect),this}},{key:"setZoomByViewportPoint",value:function(a,s){var m=this.canvas.viewport2Canvas({x:s[0],y:s[1]}),D=m.x,L=m.y,V=this.roll;this.rotate(0,0,-V),this.setPosition(D,L),this.setFocalPoint(D,L),this.setZoom(a),this.rotate(0,0,V);var st=this.canvas.viewport2Canvas({x:s[0],y:s[1]}),Lt=st.x,he=st.y,Te=x.al(Lt-D,he-L,0),je=x.AK(Te,this.right)/x.kE(this.right),qe=x.AK(Te,this.up)/x.kE(this.up),tn=this.getPosition(),fn=(0,b.Z)(tn,2),gn=fn[0],yn=fn[1],pn=this.getFocalPoint(),Rn=(0,b.Z)(pn,2),Qn=Rn[0],vr=Rn[1];return this.setPosition(gn-je,yn-qe),this.setFocalPoint(Qn-je,vr-qe),this}},{key:"setPerspective",value:function(a,s,m,D){var L;this.projectionMode=Or.PERSPECTIVE,this.fov=m,this.near=a,this.far=s,this.aspect=D;var V=this.near*Math.tan(rt(.5*this.fov))/this.zoom,st=2*V,Lt=this.aspect*st,he=-.5*Lt;if((L=this.view)!==null&&L!==void 0&&L.enabled){var Te=this.view.fullWidth,je=this.view.fullHeight;he+=this.view.offsetX*Lt/Te,V-=this.view.offsetY*st/je,Lt*=this.view.width/Te,st*=this.view.height/je}return Sn(this.projectionMatrix,he,he+Lt,V-st,V,a,this.far,this.clipSpaceNearZ===sn.ZERO),N.invert(this.projectionMatrixInverse,this.projectionMatrix),this.triggerUpdate(),this}},{key:"setOrthographic",value:function(a,s,m,D,L,V){var st;this.projectionMode=Or.ORTHOGRAPHIC,this.rright=s,this.left=a,this.top=m,this.bottom=D,this.near=L,this.far=V;var Lt=(this.rright-this.left)/(2*this.zoom),he=(this.top-this.bottom)/(2*this.zoom),Te=(this.rright+this.left)/2,je=(this.top+this.bottom)/2,qe=Te-Lt,tn=Te+Lt,fn=je+he,gn=je-he;if((st=this.view)!==null&&st!==void 0&&st.enabled){var yn=(this.rright-this.left)/this.view.fullWidth/this.zoom,pn=(this.top-this.bottom)/this.view.fullHeight/this.zoom;qe+=yn*this.view.offsetX,tn=qe+yn*this.view.width,fn-=pn*this.view.offsetY,gn=fn-pn*this.view.height}return this.clipSpaceNearZ===sn.NEGATIVE_ONE?N.ortho(this.projectionMatrix,qe,tn,fn,gn,L,V):N.orthoZO(this.projectionMatrix,qe,tn,fn,gn,L,V),N.invert(this.projectionMatrixInverse,this.projectionMatrix),this._getOrthoMatrix(),this.triggerUpdate(),this}},{key:"setPosition",value:function(a){var s=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.position[1],m=arguments.length>2&&arguments[2]!==void 0?arguments[2]:this.position[2],D=ct(a,s,m);return this._setPosition(D),this.setFocalPoint(this.focalPoint),this.triggerUpdate(),this}},{key:"setFocalPoint",value:function(a){var s=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.focalPoint[1],m=arguments.length>2&&arguments[2]!==void 0?arguments[2]:this.focalPoint[2],D=x.al(0,1,0);if(this.focalPoint=ct(a,s,m),this.trackingMode===ii.CINEMATIC){var L=x.$X(x.Ue(),this.focalPoint,this.position);a=L[0],s=L[1],m=L[2];var V=x.kE(L),st=Ht(Math.asin(s/V)),Lt=90+Ht(Math.atan2(m,a)),he=N.create();N.rotateY(he,he,rt(Lt)),N.rotateX(he,he,rt(st)),D=x.fF(x.Ue(),[0,1,0],he)}return N.invert(this.matrix,N.lookAt(N.create(),this.position,this.focalPoint,D)),this._getAxes(),this._getDistance(),this._getAngles(),this.triggerUpdate(),this}},{key:"getDistance",value:function(){return this.distance}},{key:"getDistanceVector",value:function(){return this.distanceVector}},{key:"setDistance",value:function(a){if(this.distance===a||a<0)return this;this.distance=a,this.distance<fi&&(this.distance=fi),this.dollyingStep=this.distance/100;var s=x.Ue();a=this.distance;var m=this.forward,D=this.focalPoint;return s[0]=a*m[0]+D[0],s[1]=a*m[1]+D[1],s[2]=a*m[2]+D[2],this._setPosition(s),this.triggerUpdate(),this}},{key:"setMaxDistance",value:function(a){return this.maxDistance=a,this}},{key:"setMinDistance",value:function(a){return this.minDistance=a,this}},{key:"setAzimuth",value:function(a){return this.azimuth=yt(a),this.computeMatrix(),this._getAxes(),this.type===ar.ORBITING||this.type===ar.EXPLORING?this._getPosition():this.type===ar.TRACKING&&this._getFocalPoint(),this.triggerUpdate(),this}},{key:"getAzimuth",value:function(){return this.azimuth}},{key:"setElevation",value:function(a){return this.elevation=yt(a),this.computeMatrix(),this._getAxes(),this.type===ar.ORBITING||this.type===ar.EXPLORING?this._getPosition():this.type===ar.TRACKING&&this._getFocalPoint(),this.triggerUpdate(),this}},{key:"getElevation",value:function(){return this.elevation}},{key:"setRoll",value:function(a){return this.roll=yt(a),this.computeMatrix(),this._getAxes(),this.type===ar.ORBITING||this.type===ar.EXPLORING?this._getPosition():this.type===ar.TRACKING&&this._getFocalPoint(),this.triggerUpdate(),this}},{key:"getRoll",value:function(){return this.roll}},{key:"_update",value:function(){this._getAxes(),this._getPosition(),this._getDistance(),this._getAngles(),this._getOrthoMatrix(),this.triggerUpdate()}},{key:"computeMatrix",value:function(){var a=tt.yY(tt.Ue(),[0,0,1],rt(this.roll));N.identity(this.matrix);var s=tt.yY(tt.Ue(),[1,0,0],rt((this.rotateWorld&&this.type!==ar.TRACKING||this.type===ar.TRACKING?1:-1)*this.elevation)),m=tt.yY(tt.Ue(),[0,1,0],rt((this.rotateWorld&&this.type!==ar.TRACKING||this.type===ar.TRACKING?1:-1)*this.azimuth)),D=tt.Jp(tt.Ue(),m,s);D=tt.Jp(tt.Ue(),D,a);var L=N.fromQuat(N.create(),D);this.type===ar.ORBITING||this.type===ar.EXPLORING?(N.translate(this.matrix,this.matrix,this.focalPoint),N.multiply(this.matrix,this.matrix,L),N.translate(this.matrix,this.matrix,[0,0,this.distance])):this.type===ar.TRACKING&&(N.translate(this.matrix,this.matrix,this.position),N.multiply(this.matrix,this.matrix,L))}},{key:"_setPosition",value:function(a,s,m){this.position=ct(a,s,m);var D=this.matrix;D[12]=this.position[0],D[13]=this.position[1],D[14]=this.position[2],D[15]=1,this._getOrthoMatrix()}},{key:"_getAxes",value:function(){x.JG(this.right,ct(k.fF(k.Ue(),[1,0,0,0],this.matrix))),x.JG(this.up,ct(k.fF(k.Ue(),[0,1,0,0],this.matrix))),x.JG(this.forward,ct(k.fF(k.Ue(),[0,0,1,0],this.matrix))),x.Fv(this.right,this.right),x.Fv(this.up,this.up),x.Fv(this.forward,this.forward)}},{key:"_getAngles",value:function(){var a=this.distanceVector[0],s=this.distanceVector[1],m=this.distanceVector[2],D=x.kE(this.distanceVector);if(D===0){this.elevation=0,this.azimuth=0;return}this.type===ar.TRACKING?(this.elevation=Ht(Math.asin(s/D)),this.azimuth=Ht(Math.atan2(-a,-m))):this.rotateWorld?(this.elevation=Ht(Math.asin(s/D)),this.azimuth=Ht(Math.atan2(-a,-m))):(this.elevation=-Ht(Math.asin(s/D)),this.azimuth=-Ht(Math.atan2(-a,-m)))}},{key:"_getPosition",value:function(){x.JG(this.position,ct(k.fF(k.Ue(),[0,0,0,1],this.matrix))),this._getDistance()}},{key:"_getFocalPoint",value:function(){x.kK(this.distanceVector,[0,0,-this.distance],et.xO(et.Ue(),this.matrix)),x.IH(this.focalPoint,this.position,this.distanceVector),this._getDistance()}},{key:"_getDistance",value:function(){this.distanceVector=x.$X(x.Ue(),this.focalPoint,this.position),this.distance=x.kE(this.distanceVector),this.dollyingStep=this.distance/100}},{key:"_getOrthoMatrix",value:function(){if(this.projectionMode===Or.ORTHOGRAPHIC){var a=this.position,s=tt.yY(tt.Ue(),[0,0,1],-this.roll*Math.PI/180);N.fromRotationTranslationScaleOrigin(this.orthoMatrix,s,x.al((this.rright-this.left)/2-a[0],(this.top-this.bottom)/2-a[1],0),x.al(this.zoom,this.zoom,1),a)}}},{key:"triggerUpdate",value:function(){if(this.enableUpdate){var a=this.getViewTransform(),s=N.multiply(N.create(),this.getPerspective(),a);this.getFrustum().extractFromVPMatrix(s),this.eventEmitter.emit(Lr.UPDATED)}}},{key:"rotate",value:function(a,s,m){throw new Error(J)}},{key:"pan",value:function(a,s){throw new Error(J)}},{key:"dolly",value:function(a){throw new Error(J)}},{key:"createLandmark",value:function(a,s){throw new Error(J)}},{key:"gotoLandmark",value:function(a,s){throw new Error(J)}},{key:"cancelLandmarkAnimation",value:function(){throw new Error(J)}}])}(),Er=function(h){return h[h.Standard=0]="Standard",h}({}),mr=function(h){return h[h.ADDED=0]="ADDED",h[h.REMOVED=1]="REMOVED",h[h.Z_INDEX_CHANGED=2]="Z_INDEX_CHANGED",h}({}),si=x.Ue(),Si=N.create(),Mi=tt.Ue();function pi(h){if(h.localDirtyFlag){var p=h.localSkew[0]!==0||h.localSkew[1]!==0;if(p){N.fromRotationTranslationScaleOrigin(h.localTransform,h.localRotation,h.localPosition,x.al(1,1,1),h.origin),(h.localSkew[0]!==0||h.localSkew[1]!==0)&&(N.identity(Si),Si[4]=Math.tan(h.localSkew[0]),Si[1]=Math.tan(h.localSkew[1]),N.multiply(h.localTransform,h.localTransform,Si));var a=N.fromRotationTranslationScaleOrigin(Si,tt.t8(Mi,0,0,0,1),x.t8(si,1,1,1),h.localScale,h.origin);N.multiply(h.localTransform,h.localTransform,a)}else{var s=h.localTransform,m=h.localPosition,D=h.localRotation,L=h.localScale,V=h.origin,st=m[0]!==0||m[1]!==0||m[2]!==0,Lt=D[3]!==1||D[0]!==0||D[1]!==0||D[2]!==0,he=L[0]!==1||L[1]!==1||L[2]!==1,Te=V[0]!==0||V[1]!==0||V[2]!==0;!Lt&&!he&&!Te?st?N.fromTranslation(s,m):N.identity(s):N.fromRotationTranslationScaleOrigin(s,D,m,L,V)}h.localDirtyFlag=!1}}function Wi(h,p){h.dirtyFlag&&(p?N.multiply(h.worldTransform,p.worldTransform,h.localTransform):N.copy(h.worldTransform,h.localTransform),h.dirtyFlag=!1)}var Ji={absolutePath:[],hasArc:!1,segments:[],polygons:[],polylines:[],curve:null,totalLength:0,rect:new G(0,0,0,0)},Hn=function(h){return h.COORDINATE="<coordinate>",h.COLOR="<color>",h.PAINT="<paint>",h.NUMBER="<number>",h.ANGLE="<angle>",h.OPACITY_VALUE="<opacity-value>",h.SHADOW_BLUR="<shadow-blur>",h.LENGTH="<length>",h.PERCENTAGE="<percentage>",h.LENGTH_PERCENTAGE="<length> | <percentage>",h.LENGTH_PERCENTAGE_12="[<length> | <percentage>]{1,2}",h.LENGTH_PERCENTAGE_14="[<length> | <percentage>]{1,4}",h.LIST_OF_POINTS="<list-of-points>",h.PATH="<path>",h.FILTER="<filter>",h.Z_INDEX="<z-index>",h.OFFSET_DISTANCE="<offset-distance>",h.DEFINED_PATH="<defined-path>",h.MARKER="<marker>",h.TRANSFORM="<transform>",h.TRANSFORM_ORIGIN="<transform-origin>",h.TEXT="<text>",h.TEXT_TRANSFORM="<text-transform>",h}({});function ra(h,p,a){h.prototype=p.prototype=a,a.constructor=h}function Tr(h,p){var a=Object.create(h.prototype);for(var s in p)a[s]=p[s];return a}function hr(){}var $r=.7,ni=1/$r,Bi="\\s*([+-]?\\d+)\\s*",ya="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",qi="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",va=/^#([0-9a-f]{3,8})$/,Ka=new RegExp(`^rgb\\(${Bi},${Bi},${Bi}\\)$`),ea=new RegExp(`^rgb\\(${qi},${qi},${qi}\\)$`),Na=new RegExp(`^rgba\\(${Bi},${Bi},${Bi},${ya}\\)$`),Fa=new RegExp(`^rgba\\(${qi},${qi},${qi},${ya}\\)$`),da=new RegExp(`^hsl\\(${ya},${qi},${qi}\\)$`),ja=new RegExp(`^hsla\\(${ya},${qi},${qi},${ya}\\)$`),Oa={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};ra(hr,so,{copy(h){return Object.assign(new this.constructor,this,h)},displayable(){return this.rgb().displayable()},hex:Ra,formatHex:Ra,formatHex8:Xa,formatHsl:oo,formatRgb:Ia,toString:Ia});function Ra(){return this.rgb().formatHex()}function Xa(){return this.rgb().formatHex8()}function oo(){return Yr(this).formatHsl()}function Ia(){return this.rgb().formatRgb()}function so(h){var p,a;return h=(h+"").trim().toLowerCase(),(p=va.exec(h))?(a=p[1].length,p=parseInt(p[1],16),a===6?$a(p):a===3?new Di(p>>8&15|p>>4&240,p>>4&15|p&240,(p&15)<<4|p&15,1):a===8?fa(p>>24&255,p>>16&255,p>>8&255,(p&255)/255):a===4?fa(p>>12&15|p>>8&240,p>>8&15|p>>4&240,p>>4&15|p&240,((p&15)<<4|p&15)/255):null):(p=Ka.exec(h))?new Di(p[1],p[2],p[3],1):(p=ea.exec(h))?new Di(p[1]*255/100,p[2]*255/100,p[3]*255/100,1):(p=Na.exec(h))?fa(p[1],p[2],p[3],p[4]):(p=Fa.exec(h))?fa(p[1]*255/100,p[2]*255/100,p[3]*255/100,p[4]):(p=da.exec(h))?ri(p[1],p[2]/100,p[3]/100,1):(p=ja.exec(h))?ri(p[1],p[2]/100,p[3]/100,p[4]):Oa.hasOwnProperty(h)?$a(Oa[h]):h==="transparent"?new Di(NaN,NaN,NaN,0):null}function $a(h){return new Di(h>>16&255,h>>8&255,h&255,1)}function fa(h,p,a,s){return s<=0&&(h=p=a=NaN),new Di(h,p,a,s)}function vo(h){return h instanceof hr||(h=so(h)),h?(h=h.rgb(),new Di(h.r,h.g,h.b,h.opacity)):new Di}function Ca(h,p,a,s){return arguments.length===1?vo(h):new Di(h,p,a,s==null?1:s)}function Di(h,p,a,s){this.r=+h,this.g=+p,this.b=+a,this.opacity=+s}ra(Di,Ca,Tr(hr,{brighter(h){return h=h==null?ni:Math.pow(ni,h),new Di(this.r*h,this.g*h,this.b*h,this.opacity)},darker(h){return h=h==null?$r:Math.pow($r,h),new Di(this.r*h,this.g*h,this.b*h,this.opacity)},rgb(){return this},clamp(){return new Di(ia(this.r),ia(this.g),ia(this.b),To(this.opacity))},displayable(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:Qa,formatHex:Qa,formatHex8:ts,formatRgb:Ja,toString:Ja}));function Qa(){return`#${lr(this.r)}${lr(this.g)}${lr(this.b)}`}function ts(){return`#${lr(this.r)}${lr(this.g)}${lr(this.b)}${lr((isNaN(this.opacity)?1:this.opacity)*255)}`}function Ja(){const h=To(this.opacity);return`${h===1?"rgb(":"rgba("}${ia(this.r)}, ${ia(this.g)}, ${ia(this.b)}${h===1?")":`, ${h})`}`}function To(h){return isNaN(h)?1:Math.max(0,Math.min(1,h))}function ia(h){return Math.max(0,Math.min(255,Math.round(h)||0))}function lr(h){return h=ia(h),(h<16?"0":"")+h.toString(16)}function ri(h,p,a,s){return s<=0?h=p=a=NaN:a<=0||a>=1?h=p=NaN:p<=0&&(h=NaN),new ai(h,p,a,s)}function Yr(h){if(h instanceof ai)return new ai(h.h,h.s,h.l,h.opacity);if(h instanceof hr||(h=so(h)),!h)return new ai;if(h instanceof ai)return h;h=h.rgb();var p=h.r/255,a=h.g/255,s=h.b/255,m=Math.min(p,a,s),D=Math.max(p,a,s),L=NaN,V=D-m,st=(D+m)/2;return V?(p===D?L=(a-s)/V+(a<s)*6:a===D?L=(s-p)/V+2:L=(p-a)/V+4,V/=st<.5?D+m:2-D-m,L*=60):V=st>0&&st<1?0:L,new ai(L,V,st,h.opacity)}function hi(h,p,a,s){return arguments.length===1?Yr(h):new ai(h,p,a,s==null?1:s)}function ai(h,p,a,s){this.h=+h,this.s=+p,this.l=+a,this.opacity=+s}ra(ai,hi,Tr(hr,{brighter(h){return h=h==null?ni:Math.pow(ni,h),new ai(this.h,this.s,this.l*h,this.opacity)},darker(h){return h=h==null?$r:Math.pow($r,h),new ai(this.h,this.s,this.l*h,this.opacity)},rgb(){var h=this.h%360+(this.h<0)*360,p=isNaN(h)||isNaN(this.s)?0:this.s,a=this.l,s=a+(a<.5?a:1-a)*p,m=2*a-s;return new Di(ji(h>=240?h-240:h+120,m,s),ji(h,m,s),ji(h<120?h+240:h-120,m,s),this.opacity)},clamp(){return new ai(zi(this.h),qa(this.s),qa(this.l),To(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){const h=To(this.opacity);return`${h===1?"hsl(":"hsla("}${zi(this.h)}, ${qa(this.s)*100}%, ${qa(this.l)*100}%${h===1?")":`, ${h})`}`}}));function zi(h){return h=(h||0)%360,h<0?h+360:h}function qa(h){return Math.max(0,Math.min(1,h||0))}function ji(h,p,a){return(h<60?p+(a-p)*h/60:h<180?a:h<240?p+(a-p)*(240-h)/60:p)*255}function Vi(h,p){if(typeof h!="function"||p!=null&&typeof p!="function")throw new TypeError("Expected a function");var a=function(){for(var m=arguments.length,D=new Array(m),L=0;L<m;L++)D[L]=arguments[L];var V=p?p.apply(this,D):D[0],st=a.cache;if(st.has(V))return st.get(V);var Lt=h.apply(this,D);return a.cache=st.set(V,Lt)||st,Lt};return a.cache=new(Vi.Cache||Map),Vi.cacheList.push(a.cache),a}Vi.Cache=Map,Vi.cacheList=[],Vi.clearCache=function(){Vi.cacheList.forEach(function(h){return h.clear()})};var Kn=function(h){return h[h.kUnknown=0]="kUnknown",h[h.kNumber=1]="kNumber",h[h.kPercentage=2]="kPercentage",h[h.kEms=3]="kEms",h[h.kPixels=4]="kPixels",h[h.kRems=5]="kRems",h[h.kDegrees=6]="kDegrees",h[h.kRadians=7]="kRadians",h[h.kGradians=8]="kGradians",h[h.kTurns=9]="kTurns",h[h.kMilliseconds=10]="kMilliseconds",h[h.kSeconds=11]="kSeconds",h[h.kInteger=12]="kInteger",h}({}),Ui=function(h){return h[h.kUNumber=0]="kUNumber",h[h.kUPercent=1]="kUPercent",h[h.kULength=2]="kULength",h[h.kUAngle=3]="kUAngle",h[h.kUTime=4]="kUTime",h[h.kUOther=5]="kUOther",h}({}),Io=function(h){return h[h.kYes=0]="kYes",h[h.kNo=1]="kNo",h}({}),Uo=function(h){return h[h.kYes=0]="kYes",h[h.kNo=1]="kNo",h}({}),es=[{name:"em",unit_type:Kn.kEms},{name:"px",unit_type:Kn.kPixels},{name:"deg",unit_type:Kn.kDegrees},{name:"rad",unit_type:Kn.kRadians},{name:"grad",unit_type:Kn.kGradians},{name:"ms",unit_type:Kn.kMilliseconds},{name:"s",unit_type:Kn.kSeconds},{name:"rem",unit_type:Kn.kRems},{name:"turn",unit_type:Kn.kTurns}],Ta=function(h){return h[h.kUnknownType=0]="kUnknownType",h[h.kUnparsedType=1]="kUnparsedType",h[h.kKeywordType=2]="kKeywordType",h[h.kUnitType=3]="kUnitType",h[h.kSumType=4]="kSumType",h[h.kProductType=5]="kProductType",h[h.kNegateType=6]="kNegateType",h[h.kInvertType=7]="kInvertType",h[h.kMinType=8]="kMinType",h[h.kMaxType=9]="kMaxType",h[h.kClampType=10]="kClampType",h[h.kTransformType=11]="kTransformType",h[h.kPositionType=12]="kPositionType",h[h.kURLImageType=13]="kURLImageType",h[h.kColorType=14]="kColorType",h[h.kUnsupportedColorType=15]="kUnsupportedColorType",h}({}),eo=function(p){return es.find(function(a){return a.name===p}).unit_type},ns=function(p){return p?p==="number"?Kn.kNumber:p==="percent"||p==="%"?Kn.kPercentage:eo(p):Kn.kUnknown},Po=function(p){switch(p){case Kn.kNumber:case Kn.kInteger:return Ui.kUNumber;case Kn.kPercentage:return Ui.kUPercent;case Kn.kPixels:return Ui.kULength;case Kn.kMilliseconds:case Kn.kSeconds:return Ui.kUTime;case Kn.kDegrees:case Kn.kRadians:case Kn.kGradians:case Kn.kTurns:return Ui.kUAngle;default:return Ui.kUOther}},ys=function(p){switch(p){case Ui.kUNumber:return Kn.kNumber;case Ui.kULength:return Kn.kPixels;case Ui.kUPercent:return Kn.kPercentage;case Ui.kUTime:return Kn.kSeconds;case Ui.kUAngle:return Kn.kDegrees;default:return Kn.kUnknown}},Ao=function(p){var a=1;switch(p){case Kn.kPixels:case Kn.kDegrees:case Kn.kSeconds:break;case Kn.kMilliseconds:a=.001;break;case Kn.kRadians:a=180/Math.PI;break;case Kn.kGradians:a=.9;break;case Kn.kTurns:a=360;break}return a},go=function(p){switch(p){case Kn.kNumber:case Kn.kInteger:return"";case Kn.kPercentage:return"%";case Kn.kEms:return"em";case Kn.kRems:return"rem";case Kn.kPixels:return"px";case Kn.kDegrees:return"deg";case Kn.kRadians:return"rad";case Kn.kGradians:return"grad";case Kn.kMilliseconds:return"ms";case Kn.kSeconds:return"s";case Kn.kTurns:return"turn"}return""},No=function(){function h(){(0,R.Z)(this,h)}return(0,O.Z)(h,[{key:"toString",value:function(){return this.buildCSSText(Io.kNo,Uo.kNo,"")}},{key:"isNumericValue",value:function(){return this.getType()>=Ta.kUnitType&&this.getType()<=Ta.kClampType}}],[{key:"isAngle",value:function(a){return a===Kn.kDegrees||a===Kn.kRadians||a===Kn.kGradians||a===Kn.kTurns}},{key:"isLength",value:function(a){return a>=Kn.kEms&&a<Kn.kDegrees}},{key:"isRelativeUnit",value:function(a){return a===Kn.kPercentage||a===Kn.kEms||a===Kn.kRems}},{key:"isTime",value:function(a){return a===Kn.kSeconds||a===Kn.kMilliseconds}}])}(),fs=function(h){function p(a){var s;return(0,R.Z)(this,p),s=(0,g.Z)(this,p),s.colorSpace=a,s}return(0,P.Z)(p,h),(0,O.Z)(p,[{key:"getType",value:function(){return Ta.kColorType}},{key:"to",value:function(s){return this}}])}(No),Ba=function(h){return h[h.Constant=0]="Constant",h[h.LinearGradient=1]="LinearGradient",h[h.RadialGradient=2]="RadialGradient",h}({}),no=function(h){function p(a,s){var m;return(0,R.Z)(this,p),m=(0,g.Z)(this,p),m.type=a,m.value=s,m}return(0,P.Z)(p,h),(0,O.Z)(p,[{key:"clone",value:function(){return new p(this.type,this.value)}},{key:"buildCSSText",value:function(s,m,D){return D}},{key:"getType",value:function(){return Ta.kColorType}}])}(No),za=function(h){function p(a){var s;return(0,R.Z)(this,p),s=(0,g.Z)(this,p),s.value=a,s}return(0,P.Z)(p,h),(0,O.Z)(p,[{key:"clone",value:function(){return new p(this.value)}},{key:"getType",value:function(){return Ta.kKeywordType}},{key:"buildCSSText",value:function(s,m,D){return D+this.value}}])}(No),rs=function(p){var a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"",s="";return Number.isFinite(p)?s="NaN":p>0?s="infinity":s="-infinity",s+=a},is=function(p){return ys(Po(p))},$i=function(h){function p(a){var s,m=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Kn.kNumber;(0,R.Z)(this,p),s=(0,g.Z)(this,p);var D;return typeof m=="string"?D=ns(m):D=m,s.unit=D,s.value=a,s}return(0,P.Z)(p,h),(0,O.Z)(p,[{key:"clone",value:function(){return new p(this.value,this.unit)}},{key:"equals",value:function(s){var m=s;return this.value===m.value&&this.unit===m.unit}},{key:"getType",value:function(){return Ta.kUnitType}},{key:"convertTo",value:function(s){if(this.unit===s)return new p(this.value,this.unit);var m=is(this.unit);if(m!==is(s)||m===Kn.kUnknown)return null;var D=Ao(this.unit)/Ao(s);return new p(this.value*D,s)}},{key:"buildCSSText",value:function(s,m,D){var L;switch(this.unit){case Kn.kUnknown:break;case Kn.kInteger:L=Number(this.value).toFixed(0);break;case Kn.kNumber:case Kn.kPercentage:case Kn.kEms:case Kn.kRems:case Kn.kPixels:case Kn.kDegrees:case Kn.kRadians:case Kn.kGradians:case Kn.kMilliseconds:case Kn.kSeconds:case Kn.kTurns:{var V=-999999,st=999999,Lt=this.value,he=go(this.unit);if(Lt<V||Lt>st){var Te=go(this.unit);!Number.isFinite(Lt)||Number.isNaN(Lt)?L=rs(Lt,Te):L=Lt+(Te||"")}else L="".concat(Lt).concat(he)}}return D+=L,D}}])}(No),Wa=new $i(0,"px");new $i(1,"px");var po=new $i(0,"deg"),bo=function(h){function p(a,s,m){var D,L=arguments.length>3&&arguments[3]!==void 0?arguments[3]:1,V=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!1;return(0,R.Z)(this,p),D=(0,g.Z)(this,p,["rgb"]),D.r=a,D.g=s,D.b=m,D.alpha=L,D.isNone=V,D}return(0,P.Z)(p,h),(0,O.Z)(p,[{key:"clone",value:function(){return new p(this.r,this.g,this.b,this.alpha)}},{key:"buildCSSText",value:function(s,m,D){return"".concat(D,"rgba(").concat(this.r,",").concat(this.g,",").concat(this.b,",").concat(this.alpha,")")}}])}(fs),Ro=new za("unset"),Ga=new za("initial"),Ho=new za("inherit"),Ci={"":Ro,unset:Ro,initial:Ga,inherit:Ho},bi=function(p){return Ci[p]||(Ci[p]=new za(p)),Ci[p]},aa=new bo(0,0,0,0,!0),ba=new bo(0,0,0,0),Hi=Vi(function(h,p,a,s){return new bo(h,p,a,s)},function(h,p,a,s){return"rgba(".concat(h,",").concat(p,",").concat(a,",").concat(s,")")}),xi=function(p){var a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Kn.kNumber;return new $i(p,a)};new $i(50,"%");function Ea(h){var p=h.type,a=h.value;return p==="hex"?"#".concat(a):p==="literal"?a:p==="rgb"?"rgb(".concat(a.join(","),")"):"rgba(".concat(a.join(","),")")}var lo=function(){var h={linearGradient:/^(linear\-gradient)/i,repeatingLinearGradient:/^(repeating\-linear\-gradient)/i,radialGradient:/^(radial\-gradient)/i,repeatingRadialGradient:/^(repeating\-radial\-gradient)/i,conicGradient:/^(conic\-gradient)/i,sideOrCorner:/^to (left (top|bottom)|right (top|bottom)|top (left|right)|bottom (left|right)|left|right|top|bottom)/i,extentKeywords:/^(closest\-side|closest\-corner|farthest\-side|farthest\-corner|contain|cover)/,positionKeywords:/^(left|center|right|top|bottom)/i,pixelValue:/^(-?(([0-9]*\.[0-9]+)|([0-9]+\.?)))px/,percentageValue:/^(-?(([0-9]*\.[0-9]+)|([0-9]+\.?)))\%/,emValue:/^(-?(([0-9]*\.[0-9]+)|([0-9]+\.?)))em/,angleValue:/^(-?(([0-9]*\.[0-9]+)|([0-9]+\.?)))deg/,startCall:/^\(/,endCall:/^\)/,comma:/^,/,hexColor:/^\#([0-9a-fA-F]+)/,literalColor:/^([a-zA-Z]+)/,rgbColor:/^rgb/i,rgbaColor:/^rgba/i,number:/^(([0-9]*\.[0-9]+)|([0-9]+\.?))/},p="";function a(Br){throw new Error("".concat(p,": ").concat(Br))}function s(){var Br=m();return p.length>0&&a("Invalid input not EOF"),Br}function m(){return Rn(D)}function D(){return L("linear-gradient",h.linearGradient,st)||L("repeating-linear-gradient",h.repeatingLinearGradient,st)||L("radial-gradient",h.radialGradient,Te)||L("repeating-radial-gradient",h.repeatingRadialGradient,Te)||L("conic-gradient",h.conicGradient,Te)}function L(Br,wi,Ai){return V(wi,function(Pa){var Ya=Ai();return Ya&&(la(h.comma)||a("Missing comma before color stops")),{type:Br,orientation:Ya,colorStops:Rn(Qn)}})}function V(Br,wi){var Ai=la(Br);if(Ai){la(h.startCall)||a("Missing (");var Pa=wi(Ai);return la(h.endCall)||a("Missing )"),Pa}}function st(){return Lt()||he()}function Lt(){return Xi("directional",h.sideOrCorner,1)}function he(){return Xi("angular",h.angleValue,1)}function Te(){var Br,wi=je(),Ai;return wi&&(Br=[],Br.push(wi),Ai=p,la(h.comma)&&(wi=je(),wi?Br.push(wi):p=Ai)),Br}function je(){var Br=qe()||tn();if(Br)Br.at=gn();else{var wi=fn();if(wi){Br=wi;var Ai=gn();Ai&&(Br.at=Ai)}else{var Pa=yn();Pa&&(Br={type:"default-radial",at:Pa})}}return Br}function qe(){var Br=Xi("shape",/^(circle)/i,0);return Br&&(Br.style=oi()||fn()),Br}function tn(){var Br=Xi("shape",/^(ellipse)/i,0);return Br&&(Br.style=Ar()||fn()),Br}function fn(){return Xi("extent-keyword",h.extentKeywords,1)}function gn(){if(Xi("position",/^at/,0)){var Br=yn();return Br||a("Missing positioning value"),Br}}function yn(){var Br=pn();if(Br.x||Br.y)return{type:"position",value:Br}}function pn(){return{x:Ar(),y:Ar()}}function Rn(Br){var wi=Br(),Ai=[];if(wi)for(Ai.push(wi);la(h.comma);)wi=Br(),wi?Ai.push(wi):a("One extra comma");return Ai}function Qn(){var Br=vr();return Br||a("Expected color definition"),Br.length=Ar(),Br}function vr(){return Pr()||Gr()||Ur()||wr()}function wr(){return Xi("literal",h.literalColor,0)}function Pr(){return Xi("hex",h.hexColor,1)}function Ur(){return V(h.rgbColor,function(){return{type:"rgb",value:Rn(_r)}})}function Gr(){return V(h.rgbaColor,function(){return{type:"rgba",value:Rn(_r)}})}function _r(){return la(h.number)[1]}function Ar(){return Xi("%",h.percentageValue,1)||jr()||oi()}function jr(){return Xi("position-keyword",h.positionKeywords,1)}function oi(){return Xi("px",h.pixelValue,1)||Xi("em",h.emValue,1)}function Xi(Br,wi,Ai){var Pa=la(wi);if(Pa)return{type:Br,value:Pa[Ai]}}function la(Br){var wi=/^[\n\r\t\s]+/.exec(p);wi&&ca(wi[0].length);var Ai=Br.exec(p);return Ai&&ca(Ai[0].length),Ai}function ca(Br){p=p.substring(Br)}return function(Br){return p=Br,s()}}();function xa(h,p,a,s){var m=rt(s.value),D=0,L=0,V=D+p/2,st=L+a/2,Lt=Math.abs(p*Math.cos(m))+Math.abs(a*Math.sin(m)),he=h[0]+V-Math.cos(m)*Lt/2,Te=h[1]+st-Math.sin(m)*Lt/2,je=h[0]+V+Math.cos(m)*Lt/2,qe=h[1]+st+Math.sin(m)*Lt/2;return{x1:he,y1:Te,x2:je,y2:qe}}function Do(h,p,a,s,m,D){var L=s.value,V=m.value;s.unit===Kn.kPercentage&&(L=s.value/100*p),m.unit===Kn.kPercentage&&(V=m.value/100*a);var st=Math.max((0,nt.y)([0,0],[L,V]),(0,nt.y)([0,a],[L,V]),(0,nt.y)([p,a],[L,V]),(0,nt.y)([p,0],[L,V]));return D&&(D instanceof $i?st=D.value:D instanceof za&&(D.value==="closest-side"?st=Math.min(L,p-L,V,a-V):D.value==="farthest-side"?st=Math.max(L,p-L,V,a-V):D.value==="closest-corner"&&(st=Math.min((0,nt.y)([0,0],[L,V]),(0,nt.y)([0,a],[L,V]),(0,nt.y)([p,a],[L,V]),(0,nt.y)([p,0],[L,V]))))),{x:L+h[0],y:V+h[1],r:st}}var Da=/^l\s*\(\s*([\d.]+)\s*\)\s*(.*)/i,Lo=/^r\s*\(\s*([\d.]+)\s*,\s*([\d.]+)\s*,\s*([\d.]+)\s*\)\s*(.*)/i,zs=/^p\s*\(\s*([axyn])\s*\)\s*(.*)/i,Fr=/[\d.]+:(#[^\s]+|[^\)]+\))/gi;function As(h){var p,a=h.length;if(h[a-1].length=(p=h[a-1].length)!==null&&p!==void 0?p:{type:"%",value:"100"},a>1){var s;h[0].length=(s=h[0].length)!==null&&s!==void 0?s:{type:"%",value:"0"}}for(var m=0,D=Number(h[0].length.value),L=1;L<a;L++){var V,st=(V=h[L].length)===null||V===void 0?void 0:V.value;if(!(0,kt.Z)(st)&&!(0,kt.Z)(D)){for(var Lt=1;Lt<L-m;Lt++)h[m+Lt].length={type:"%",value:"".concat(D+(Number(st)-D)*Lt/(L-m))};m=L,D=Number(st)}}}var as={left:180,top:-90,bottom:90,right:0,"left top":225,"top left":225,"left bottom":135,"bottom left":135,"right top":-45,"top right":-45,"right bottom":45,"bottom right":45},ko=Vi(function(h){var p;return h.type==="angular"?p=Number(h.value):p=as[h.value]||0,xi(p,"deg")}),hs=Vi(function(h){var p=50,a=50,s="%",m="%";if((h==null?void 0:h.type)==="position"){var D=h.value,L=D.x,V=D.y;(L==null?void 0:L.type)==="position-keyword"&&(L.value==="left"?p=0:L.value==="center"?p=50:L.value==="right"?p=100:L.value==="top"?a=0:L.value==="bottom"&&(a=100)),(V==null?void 0:V.type)==="position-keyword"&&(V.value==="left"?p=0:V.value==="center"?a=50:V.value==="right"?p=100:V.value==="top"?a=0:V.value==="bottom"&&(a=100)),((L==null?void 0:L.type)==="px"||(L==null?void 0:L.type)==="%"||(L==null?void 0:L.type)==="em")&&(s=L==null?void 0:L.type,p=Number(L.value)),((V==null?void 0:V.type)==="px"||(V==null?void 0:V.type)==="%"||(V==null?void 0:V.type)==="em")&&(m=V==null?void 0:V.type,a=Number(V.value))}return{cx:xi(p,s),cy:xi(a,m)}}),Ns=Vi(function(h){if(h.indexOf("linear")>-1||h.indexOf("radial")>-1){var p=lo(h);return p.map(function(V){var st=V.type,Lt=V.orientation,he=V.colorStops;As(he);var Te=he.map(function(Rn){return{offset:xi(Number(Rn.length.value),"%"),color:Ea(Rn)}});if(st==="linear-gradient")return new no(Ba.LinearGradient,{angle:Lt?ko(Lt):po,steps:Te});if(st==="radial-gradient"&&(Lt||(Lt=[{type:"shape",value:"circle"}]),Lt[0].type==="shape"&&Lt[0].value==="circle")){var je=hs(Lt[0].at),qe=je.cx,tn=je.cy,fn;if(Lt[0].style){var gn=Lt[0].style,yn=gn.type,pn=gn.value;yn==="extent-keyword"?fn=bi(pn):fn=xi(pn,yn)}return new no(Ba.RadialGradient,{cx:qe,cy:tn,size:fn,steps:Te})}})}var a=h[0];if(h[1]==="("||h[2]==="("){if(a==="l"){var s=Da.exec(h);if(s){var m,D=((m=s[2].match(Fr))===null||m===void 0?void 0:m.map(function(V){return V.split(":")}))||[];return[new no(Ba.LinearGradient,{angle:xi(parseFloat(s[1]),"deg"),steps:D.map(function(V){var st=(0,b.Z)(V,2),Lt=st[0],he=st[1];return{offset:xi(Number(Lt)*100,"%"),color:he}})})]}}else if(a==="r"){var L=bs(h);if(L)if((0,Nt.Z)(L))h=L;else return[new no(Ba.RadialGradient,L)]}else if(a==="p")return Yo(h)}});function bs(h){var p=Lo.exec(h);if(p){var a,s=((a=p[4].match(Fr))===null||a===void 0?void 0:a.map(function(m){return m.split(":")}))||[];return{cx:xi(50,"%"),cy:xi(50,"%"),steps:s.map(function(m){var D=(0,b.Z)(m,2),L=D[0],V=D[1];return{offset:xi(Number(L)*100,"%"),color:V}})}}return null}function Yo(h){var p=zs.exec(h);if(p){var a=p[1],s=p[2];switch(a){case"a":a="repeat";break;case"x":a="repeat-x";break;case"y":a="repeat-y";break;case"n":a="no-repeat";break;default:a="no-repeat"}return{image:s,repetition:a}}return null}function Eo(h){return!!h.type&&!!h.value}function La(h){return h&&!!h.image}function xo(h){return h&&!(0,kt.Z)(h.r)&&!(0,kt.Z)(h.g)&&!(0,kt.Z)(h.b)}var ta=Vi(function(h){if(La(h))return(0,l.Z)({repetition:"repeat"},h);if((0,kt.Z)(h)&&(h=""),h==="transparent")return ba;if(h==="currentColor")h="black";else if(h==="none")return aa;var p=Ns(h);if(p)return p;var a=so(h),s=[0,0,0,0];return a!==null&&(s[0]=a.r||0,s[1]=a.g||0,s[2]=a.b||0,s[3]=a.opacity),Hi.apply(void 0,s)});function js(h,p){if(!(!xo(h)||!xo(p)))return[[Number(h.r),Number(h.g),Number(h.b),Number(h.alpha)],[Number(p.r),Number(p.g),Number(p.b),Number(p.alpha)],function(a){var s=a.slice();if(s[3])for(var m=0;m<3;m++)s[m]=Math.round((0,Bt.Z)(s[m],0,255));return s[3]=(0,Bt.Z)(s[3],0,1),"rgba(".concat(s.join(","),")")}]}function _o(h,p){if((0,kt.Z)(p))return xi(0,"px");if(p="".concat(p).trim().toLowerCase(),isFinite(Number(p))){if("px".search(h)>=0)return xi(Number(p),"px");if("deg".search(h)>=0)return xi(Number(p),"deg")}var a=[];p=p.replace(h,function(m){return a.push(m),"U".concat(m)});var s="U(".concat(h.source,")");return a.map(function(m){return xi(Number(p.replace(new RegExp("U".concat(m),"g"),"").replace(new RegExp(s,"g"),"*0")),m)})[0]}var Es=function(p){return _o(new RegExp("px","g"),p)},Ko=Vi(Es),rl=function(p){return _o(new RegExp("%","g"),p)};Vi(rl);var jt=function(p){return(0,ut.Z)(p)||isFinite(Number(p))?xi(Number(p)||0,"px"):_o(new RegExp("px|%|em|rem","g"),p)},it=Vi(jt),ft=function(p){return _o(new RegExp("deg|rad|grad|turn","g"),p)},Ft=Vi(ft);function de(h,p,a,s){var m=arguments.length>4&&arguments[4]!==void 0?arguments[4]:0,D="",L=h.value||0,V=p.value||0,st=is(h.unit),Lt=h.convertTo(st),he=p.convertTo(st);return Lt&&he?(L=Lt.value,V=he.value,D=go(h.unit)):($i.isLength(h.unit)||$i.isLength(p.unit))&&(L=Ue(h,m,a),V=Ue(p,m,a),D="px"),[L,V,function(Te){return s&&(Te=Math.max(Te,0)),Te+D}]}function ye(h){var p=0;return h.unit===Kn.kDegrees?p=h.value:h.unit===Kn.kRadians?p=Ht(Number(h.value)):h.unit===Kn.kTurns?p=Pe(Number(h.value)):h.value&&(p=h.value),p}function Se(h,p){var a;return Array.isArray(h)?a=h.map(function(s){return Number(s)}):(0,Nt.Z)(h)?a=h.split(" ").map(function(s){return Number(s)}):(0,ut.Z)(h)&&(a=[h]),p===2?a.length===1?[a[0],a[0]]:[a[0],a[1]]:p===4?a.length===1?[a[0],a[0],a[0],a[0]]:a.length===2?[a[0],a[1],a[0],a[1]]:a.length===3?[a[0],a[1],a[2],a[1]]:[a[0],a[1],a[2],a[3]]:p==="even"&&a.length%2===1?[].concat((0,_.Z)(a),(0,_.Z)(a)):a}function Ue(h,p,a){var s=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1;if(h.unit===Kn.kPixels)return Number(h.value);if(h.unit===Kn.kPercentage&&a){var m=a.nodeName===Jn.GROUP?a.getLocalBounds():a.getGeometryBounds();return(s?m.min[p]:0)+h.value/100*m.halfExtents[p]*2}return 0}var Je=function(p){return _o(/deg|rad|grad|turn|px|%/g,p)},dn=["blur","brightness","drop-shadow","contrast","grayscale","sepia","saturate","hue-rotate","invert"];function vn(){var h=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"";if(h=h.toLowerCase().trim(),h==="none")return[];for(var p=/\s*([\w-]+)\(([^)]*)\)/g,a=[],s,m=0;s=p.exec(h);){if(s.index!==m)return[];if(m=s.index+s[0].length,dn.indexOf(s[1])>-1&&a.push({name:s[1],params:s[2].split(" ").map(function(D){return Je(D)||ta(D)})}),p.lastIndex===h.length)return a}return[]}function cn(h){return h.toString()}var Nn=function(p){return typeof p=="number"?xi(p):/^\s*[-+]?(\d*\.)?\d+\s*$/.test(p)?xi(Number(p)):xi(0)},Mn=Vi(Nn);Vi(function(h){return(0,Nt.Z)(h)?h.split(" ").map(Mn):h.map(Mn)});function zn(h,p){return[h,p,cn]}function Gn(h,p){return function(a,s){return[a,s,function(m){return cn((0,Bt.Z)(m,h,p))}]}}function jn(h,p){if(h.length===p.length)return[h,p,function(a){return a}]}function tr(h){return h.parsedStyle.d.totalLength===0&&(h.parsedStyle.d.totalLength=Jt(h.parsedStyle.d.absolutePath)),h.parsedStyle.d.totalLength}function ur(h){return h.parsedStyle.points.totalLength===0&&(h.parsedStyle.points.totalLength=(0,Mr.hE)(h.parsedStyle.points.points)),h.parsedStyle.points.totalLength}function gr(h){for(var p=0;p<h.length;p++){var a=h[p-1],s=h[p],m=s[0];if(m==="M"&&a){var D=a[0],L=[s[1],s[2]],V=void 0;D==="L"||D==="M"?V=[a[1],a[2]]:(D==="C"||D==="A"||D==="Q")&&(V=[a[a.length-2],a[a.length-1]]),V&&Rr(L,V)&&(h.splice(p,1),p--)}}}function Nr(h){for(var p=!1,a=h.length,s=0;s<a;s++){var m=h[s],D=m[0];if(D==="C"||D==="A"||D==="Q"){p=!0;break}}return p}function kr(h){for(var p=[],a=[],s=[],m=0;m<h.length;m++){var D=h[m],L=D[0];L==="M"?(s.length&&(a.push(s),s=[]),s.push([D[1],D[2]])):L==="Z"?s.length&&(p.push(s),s=[]):s.push([D[1],D[2]])}return s.length>0&&a.push(s),{polygons:p,polylines:a}}function Rr(h,p){return h[0]===p[0]&&h[1]===p[1]}function li(h,p){for(var a=[],s=[],m=[],D=0;D<h.length;D++){var L=h[D],V=L.currentPoint,st=L.params,Lt=L.prePoint,he=void 0;switch(L.command){case"Q":he=(0,Mr.x4)(Lt[0],Lt[1],st[1],st[2],st[3],st[4]);break;case"C":he=(0,Mr.l5)(Lt[0],Lt[1],st[1],st[2],st[3],st[4],st[5],st[6]);break;case"A":var Te=L.arcParams;he=(0,Mr.vp)(Te.cx,Te.cy,Te.rx,Te.ry,Te.xRotation,Te.startAngle,Te.endAngle);break;default:a.push(V[0]),s.push(V[1]);break}he&&(L.box=he,a.push(he.x,he.x+he.width),s.push(he.y,he.y+he.height)),p&&(L.command==="L"||L.command==="M")&&L.prePoint&&L.nextPoint&&m.push(L)}a=a.filter(function(Qn){return!Number.isNaN(Qn)&&Qn!==1/0&&Qn!==-1/0}),s=s.filter(function(Qn){return!Number.isNaN(Qn)&&Qn!==1/0&&Qn!==-1/0});var je=(0,oe.Z)(a),qe=(0,oe.Z)(s),tn=(0,M.Z)(a),fn=(0,M.Z)(s);if(m.length===0)return{x:je,y:qe,width:tn-je,height:fn-qe};for(var gn=0;gn<m.length;gn++){var yn=m[gn],pn=yn.currentPoint,Rn=void 0;pn[0]===je?(Rn=Qr(yn,p),je-=Rn.xExtra):pn[0]===tn&&(Rn=Qr(yn,p),tn+=Rn.xExtra),pn[1]===qe?(Rn=Qr(yn,p),qe-=Rn.yExtra):pn[1]===fn&&(Rn=Qr(yn,p),fn+=Rn.yExtra)}return{x:je,y:qe,width:tn-je,height:fn-qe}}function Qr(h,p){var a=h.prePoint,s=h.currentPoint,m=h.nextPoint,D=Math.pow(s[0]-a[0],2)+Math.pow(s[1]-a[1],2),L=Math.pow(s[0]-m[0],2)+Math.pow(s[1]-m[1],2),V=Math.pow(a[0]-m[0],2)+Math.pow(a[1]-m[1],2),st=Math.acos((D+L-V)/(2*Math.sqrt(D)*Math.sqrt(L)));if(!st||Math.sin(st)===0||(0,Q.Z)(st,0))return{xExtra:0,yExtra:0};var Lt=Math.abs(Math.atan2(m[1]-s[1],m[0]-s[0])),he=Math.abs(Math.atan2(m[0]-s[0],m[1]-s[1]));Lt=Lt>Math.PI/2?Math.PI-Lt:Lt,he=he>Math.PI/2?Math.PI-he:he;var Te={xExtra:Math.cos(st/2-Lt)*(p/2*(1/Math.sin(st/2)))-p/2||0,yExtra:Math.cos(he-st/2)*(p/2*(1/Math.sin(st/2)))-p/2||0};return Te}function ti(h,p){return[p[0]+(p[0]-h[0]),p[1]+(p[1]-h[1])]}var vi=function(p,a){var s=p.x*a.x+p.y*a.y,m=Math.sqrt((Math.pow(p.x,2)+Math.pow(p.y,2))*(Math.pow(a.x,2)+Math.pow(a.y,2))),D=p.x*a.y-p.y*a.x<0?-1:1,L=D*Math.acos(s/m);return L},ci=function(p,a,s,m,D,L,V,st){a=Math.abs(a),s=Math.abs(s),m=Ut(m,360);var Lt=rt(m);if(p.x===V.x&&p.y===V.y)return{x:p.x,y:p.y,ellipticalArcAngle:0};if(a===0||s===0)return{x:0,y:0,ellipticalArcAngle:0};var he=(p.x-V.x)/2,Te=(p.y-V.y)/2,je={x:Math.cos(Lt)*he+Math.sin(Lt)*Te,y:-Math.sin(Lt)*he+Math.cos(Lt)*Te},qe=Math.pow(je.x,2)/Math.pow(a,2)+Math.pow(je.y,2)/Math.pow(s,2);qe>1&&(a*=Math.sqrt(qe),s*=Math.sqrt(qe));var tn=Math.pow(a,2)*Math.pow(s,2)-Math.pow(a,2)*Math.pow(je.y,2)-Math.pow(s,2)*Math.pow(je.x,2),fn=Math.pow(a,2)*Math.pow(je.y,2)+Math.pow(s,2)*Math.pow(je.x,2),gn=tn/fn;gn=gn<0?0:gn;var yn=(D!==L?1:-1)*Math.sqrt(gn),pn={x:yn*(a*je.y/s),y:yn*(-(s*je.x)/a)},Rn={x:Math.cos(Lt)*pn.x-Math.sin(Lt)*pn.y+(p.x+V.x)/2,y:Math.sin(Lt)*pn.x+Math.cos(Lt)*pn.y+(p.y+V.y)/2},Qn={x:(je.x-pn.x)/a,y:(je.y-pn.y)/s},vr=vi({x:1,y:0},Qn),wr={x:(-je.x-pn.x)/a,y:(-je.y-pn.y)/s},Pr=vi(Qn,wr);!L&&Pr>0?Pr-=2*Math.PI:L&&Pr<0&&(Pr+=2*Math.PI),Pr%=2*Math.PI;var Ur=vr+Pr*st,Gr=a*Math.cos(Ur),_r=s*Math.sin(Ur),Ar={x:Math.cos(Lt)*Gr-Math.sin(Lt)*_r+Rn.x,y:Math.sin(Lt)*Gr+Math.cos(Lt)*_r+Rn.y,ellipticalArcStartAngle:vr,ellipticalArcEndAngle:vr+Pr,ellipticalArcAngle:Ur,ellipticalArcCenter:Rn,resultantRx:a,resultantRy:s};return Ar};function W(h){for(var p=[],a=null,s=null,m=null,D=0,L=h.length,V=0;V<L;V++){var st=h[V];s=h[V+1];var Lt=st[0],he={command:Lt,prePoint:a,params:st,startTangent:null,endTangent:null,currentPoint:null,nextPoint:null,arcParams:null,box:null,cubicParams:null};switch(Lt){case"M":m=[st[1],st[2]],D=V;break;case"A":var Te=dt(a,st);he.arcParams=Te;break}if(Lt==="Z")a=m,s=h[D+1];else{var je=st.length;a=[st[je-2],st[je-1]]}s&&s[0]==="Z"&&(s=h[D],p[D]&&(p[D].prePoint=a)),he.currentPoint=a,p[D]&&Rr(a,p[D].currentPoint)&&(p[D].prePoint=he.prePoint);var qe=s?[s[s.length-2],s[s.length-1]]:null;he.nextPoint=qe;var tn=he.prePoint;if(["L","H","V"].includes(Lt))he.startTangent=[tn[0]-a[0],tn[1]-a[1]],he.endTangent=[a[0]-tn[0],a[1]-tn[1]];else if(Lt==="Q"){var fn=[st[1],st[2]];he.startTangent=[tn[0]-fn[0],tn[1]-fn[1]],he.endTangent=[a[0]-fn[0],a[1]-fn[1]]}else if(Lt==="T"){var gn=p[V-1],yn=ti(gn.currentPoint,tn);gn.command==="Q"?(he.command="Q",he.startTangent=[tn[0]-yn[0],tn[1]-yn[1]],he.endTangent=[a[0]-yn[0],a[1]-yn[1]]):(he.command="TL",he.startTangent=[tn[0]-a[0],tn[1]-a[1]],he.endTangent=[a[0]-tn[0],a[1]-tn[1]])}else if(Lt==="C"){var pn=[st[1],st[2]],Rn=[st[3],st[4]];he.startTangent=[tn[0]-pn[0],tn[1]-pn[1]],he.endTangent=[a[0]-Rn[0],a[1]-Rn[1]],he.startTangent[0]===0&&he.startTangent[1]===0&&(he.startTangent=[pn[0]-Rn[0],pn[1]-Rn[1]]),he.endTangent[0]===0&&he.endTangent[1]===0&&(he.endTangent=[Rn[0]-pn[0],Rn[1]-pn[1]])}else if(Lt==="S"){var Qn=p[V-1],vr=ti(Qn.currentPoint,tn),wr=[st[1],st[2]];Qn.command==="C"?(he.command="C",he.startTangent=[tn[0]-vr[0],tn[1]-vr[1]],he.endTangent=[a[0]-wr[0],a[1]-wr[1]]):(he.command="SQ",he.startTangent=[tn[0]-wr[0],tn[1]-wr[1]],he.endTangent=[a[0]-wr[0],a[1]-wr[1]])}else if(Lt==="A"){var Pr=j(he,0),Ur=Pr.x,Gr=Pr.y,_r=j(he,1,!1),Ar=_r.x,jr=_r.y;he.startTangent=[Ur,Gr],he.endTangent=[Ar,jr]}p.push(he)}return p}function j(h,p){var a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,s=h.arcParams,m=s.rx,D=m===void 0?0:m,L=s.ry,V=L===void 0?0:L,st=s.xRotation,Lt=s.arcFlag,he=s.sweepFlag,Te=ci({x:h.prePoint[0],y:h.prePoint[1]},D,V,st,!!Lt,!!he,{x:h.currentPoint[0],y:h.currentPoint[1]},p),je=ci({x:h.prePoint[0],y:h.prePoint[1]},D,V,st,!!Lt,!!he,{x:h.currentPoint[0],y:h.currentPoint[1]},a?p+.005:p-.005),qe=je.x-Te.x,tn=je.y-Te.y,fn=Math.sqrt(qe*qe+tn*tn);return{x:-qe/fn,y:-tn/fn}}function F(h){return Math.sqrt(h[0]*h[0]+h[1]*h[1])}function B(h,p){return F(h)*F(p)?(h[0]*p[0]+h[1]*p[1])/(F(h)*F(p)):1}function K(h,p){return(h[0]*p[1]<h[1]*p[0]?-1:1)*Math.acos(B(h,p))}function dt(h,p){var a=p[1],s=p[2],m=Ut(rt(p[3]),Math.PI*2),D=p[4],L=p[5],V=h[0],st=h[1],Lt=p[6],he=p[7],Te=Math.cos(m)*(V-Lt)/2+Math.sin(m)*(st-he)/2,je=-1*Math.sin(m)*(V-Lt)/2+Math.cos(m)*(st-he)/2,qe=Te*Te/(a*a)+je*je/(s*s);qe>1&&(a*=Math.sqrt(qe),s*=Math.sqrt(qe));var tn=a*a*(je*je)+s*s*(Te*Te),fn=tn?Math.sqrt((a*a*(s*s)-tn)/tn):1;D===L&&(fn*=-1),isNaN(fn)&&(fn=0);var gn=s?fn*a*je/s:0,yn=a?fn*-s*Te/a:0,pn=(V+Lt)/2+Math.cos(m)*gn-Math.sin(m)*yn,Rn=(st+he)/2+Math.sin(m)*gn+Math.cos(m)*yn,Qn=[(Te-gn)/a,(je-yn)/s],vr=[(-1*Te-gn)/a,(-1*je-yn)/s],wr=K([1,0],Qn),Pr=K(Qn,vr);return B(Qn,vr)<=-1&&(Pr=Math.PI),B(Qn,vr)>=1&&(Pr=0),L===0&&Pr>0&&(Pr-=2*Math.PI),L===1&&Pr<0&&(Pr+=2*Math.PI),{cx:pn,cy:Rn,rx:Rr(h,[Lt,he])?0:a,ry:Rr(h,[Lt,he])?0:s,startAngle:wr,endAngle:wr+Pr,xRotation:m,arcFlag:D,sweepFlag:L}}function St(h,p,a){return h.reduce(function(s,m){var D="";if(m[0]==="M"||m[0]==="L"){var L=vec3.fromValues(m[1],m[2],0);a&&vec3.transformMat4(L,L,a),D="".concat(m[0]).concat(L[0],",").concat(L[1])}else if(m[0]==="Z")D=m[0];else if(m[0]==="C"){var V=vec3.fromValues(m[1],m[2],0),st=vec3.fromValues(m[3],m[4],0),Lt=vec3.fromValues(m[5],m[6],0);a&&(vec3.transformMat4(V,V,a),vec3.transformMat4(st,st,a),vec3.transformMat4(Lt,Lt,a)),D="".concat(m[0]).concat(V[0],",").concat(V[1],",").concat(st[0],",").concat(st[1],",").concat(Lt[0],",").concat(Lt[1])}else if(m[0]==="A"){var he=vec3.fromValues(m[6],m[7],0);a&&vec3.transformMat4(he,he,a),D="".concat(m[0]).concat(m[1],",").concat(m[2],",").concat(m[3],",").concat(m[4],",").concat(m[5],",").concat(he[0],",").concat(he[1])}else if(m[0]==="Q"){var Te=vec3.fromValues(m[1],m[2],0),je=vec3.fromValues(m[3],m[4],0);a&&(vec3.transformMat4(Te,Te,a),vec3.transformMat4(je,je,a)),D="".concat(m[0]).concat(m[1],",").concat(m[2],",").concat(m[3],",").concat(m[4],"}")}return s+=D},"")}function Et(h,p,a,s){return[["M",h,p],["L",a,s]]}function Zt(h,p,a,s){var m=(-1+Math.sqrt(2))/3*4,D=h*m,L=p*m,V=a-h,st=a+h,Lt=s-p,he=s+p;return[["M",V,s],["C",V,s-L,a-D,Lt,a,Lt],["C",a+D,Lt,st,s-L,st,s],["C",st,s+L,a+D,he,a,he],["C",a-D,he,V,s+L,V,s],["Z"]]}function ce(h,p){var a=h.map(function(s,m){return[m===0?"M":"L",s[0],s[1]]});return p&&a.push(["Z"]),a}function Ae(h,p,a,s,m){if(m){var D=_slicedToArray(m,4),L=D[0],V=D[1],st=D[2],Lt=D[3],he=h>0?1:-1,Te=p>0?1:-1,je=he+Te!==0?1:0;return[["M",he*L+a,s],["L",h-he*V+a,s],V?["A",V,V,0,0,je,h+a,Te*V+s]:null,["L",h+a,p-Te*st+s],st?["A",st,st,0,0,je,h+a-he*st,p+s]:null,["L",a+he*Lt,p+s],Lt?["A",Lt,Lt,0,0,je,a,p+s-Te*Lt]:null,["L",a,Te*L+s],L?["A",L,L,0,0,je,he*L+a,s]:null,["Z"]].filter(function(qe){return qe})}return[["M",a,s],["L",a+h,s],["L",a+h,s+p],["L",a,s+p],["Z"]]}function Le(h){var p=arguments.length>1&&arguments[1]!==void 0?arguments[1]:h.getLocalTransform(),a=[];switch(h.nodeName){case Jn.LINE:var s=h.parsedStyle,m=s.x1,D=m===void 0?0:m,L=s.y1,V=L===void 0?0:L,st=s.x2,Lt=st===void 0?0:st,he=s.y2,Te=he===void 0?0:he;a=Et(D,V,Lt,Te);break;case Jn.CIRCLE:{var je=h.parsedStyle,qe=je.r,tn=qe===void 0?0:qe,fn=je.cx,gn=fn===void 0?0:fn,yn=je.cy,pn=yn===void 0?0:yn;a=Zt(tn,tn,gn,pn);break}case Jn.ELLIPSE:{var Rn=h.parsedStyle,Qn=Rn.rx,vr=Qn===void 0?0:Qn,wr=Rn.ry,Pr=wr===void 0?0:wr,Ur=Rn.cx,Gr=Ur===void 0?0:Ur,_r=Rn.cy,Ar=_r===void 0?0:_r;a=Zt(vr,Pr,Gr,Ar);break}case Jn.POLYLINE:case Jn.POLYGON:var jr=h.parsedStyle.points;a=ce(jr.points,h.nodeName===Jn.POLYGON);break;case Jn.RECT:var oi=h.parsedStyle,Xi=oi.width,la=Xi===void 0?0:Xi,ca=oi.height,Br=ca===void 0?0:ca,wi=oi.x,Ai=wi===void 0?0:wi,Pa=oi.y,Ya=Pa===void 0?0:Pa,Go=oi.radius,Nl=Go&&Go.some(function(el){return el!==0});a=Ae(la,Br,Ai,Ya,Nl&&Go.map(function(el){return clamp(el,0,Math.min(Math.abs(la)/2,Math.abs(Br)/2))}));break;case Jn.PATH:var Rl=h.parsedStyle.d.absolutePath;a=_toConsumableArray(Rl);break}if(a.length)return St(a,h,p)}function $e(h){var p=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0,s=arguments.length>3&&arguments[3]!==void 0?arguments[3]:0,m=arguments.length>4&&arguments[4]!==void 0?arguments[4]:0,D=h.map(function(L,V){var st=L[0],Lt=h[V+1],he=V===0&&(p!==0||a!==0),Te=(V===h.length-1||Lt&&(Lt[0]==="M"||Lt[0]==="Z"))&&s!==0&&m!==0,je=he?[p,a]:[0,0],qe=_slicedToArray(je,2),tn=qe[0],fn=qe[1],gn=Te?[s,m]:[0,0],yn=_slicedToArray(gn,2),pn=yn[0],Rn=yn[1];switch(st){case"M":return"M ".concat(L[1]+tn,",").concat(L[2]+fn);case"L":return"L ".concat(L[1]+pn,",").concat(L[2]+Rn);case"Q":return"Q ".concat(L[1]," ").concat(L[2],",").concat(L[3]+pn," ").concat(L[4]+Rn);case"C":return"C ".concat(L[1]," ").concat(L[2],",").concat(L[3]," ").concat(L[4],",").concat(L[5]+pn," ").concat(L[6]+Rn);case"A":return"A ".concat(L[1]," ").concat(L[2]," ").concat(L[3]," ").concat(L[4]," ").concat(L[5]," ").concat(L[6]," ").concat(L[7]).concat(Te?" L ".concat(L[6]+s,",").concat(L[7]+m):"");case"Z":return"Z";default:return null}}).filter(function(L){return L!==null}).join(" ");return~D.indexOf("NaN")?"":D}var Xe=function(p){if(p===""||Array.isArray(p)&&p.length===0)return{absolutePath:[],hasArc:!1,segments:[],polygons:[],polylines:[],curve:null,totalLength:0,rect:{x:0,y:0,width:0,height:0}};var a;try{a=Yt(p)}catch(qe){a=Yt(""),console.error("[g]: Invalid SVG Path definition: ".concat(p))}gr(a);var s=Nr(a),m=kr(a),D=m.polygons,L=m.polylines,V=W(a),st=li(V,0),Lt=st.x,he=st.y,Te=st.width,je=st.height;return{absolutePath:a,hasArc:s,segments:V,polygons:D,polylines:L,totalLength:0,rect:{x:Number.isFinite(Lt)?Lt:0,y:Number.isFinite(he)?he:0,width:Number.isFinite(Te)?Te:0,height:Number.isFinite(je)?je:0}}},an=Vi(Xe);function bn(h){return(0,Nt.Z)(h)?an(h):Xe(h)}function xn(h,p,a){var s=h.curve,m=p.curve;(!s||s.length===0)&&(s=At(h.absolutePath,!1),h.curve=s),(!m||m.length===0)&&(m=At(p.absolutePath,!1),p.curve=m);var D=[s,m];s.length!==m.length&&(D=ae(s,m));var L=Ze(D[0])!==Ze(D[1])?Ge(D[0]):Ve(D[0]);return[L,wn(D[1],L),function(V){return V}]}function Dn(h,p){var a;return(0,Nt.Z)(h)?a=h.split(" ").map(function(s){var m=s.split(","),D=(0,b.Z)(m,2),L=D[0],V=D[1];return[Number(L),Number(V)]}):a=h,{points:a,totalLength:0,segments:[]}}function Fn(h,p){return[h.points,p.points,function(a){return a}]}var On=null,Yn=/\s*(\w+)\(([^)]*)\)/g;function nr(h){return function(p){var a=0;return h.map(function(s){return s===On?p[a++]:s})}}function sr(h){return h}var xr={matrix:["NNNNNN",[On,On,0,0,On,On,0,0,0,0,1,0,On,On,0,1],sr],matrix3d:["NNNNNNNNNNNNNNNN",sr],rotate:["A"],rotateX:["A"],rotateY:["A"],rotateZ:["A"],rotate3d:["NNNA"],perspective:["L"],scale:["Nn",nr([On,On,new $i(1)]),sr],scaleX:["N",nr([On,new $i(1),new $i(1)]),nr([On,new $i(1)])],scaleY:["N",nr([new $i(1),On,new $i(1)]),nr([new $i(1),On])],scaleZ:["N",nr([new $i(1),new $i(1),On])],scale3d:["NNN",sr],skew:["Aa",null,sr],skewX:["A",null,nr([On,po])],skewY:["A",null,nr([po,On])],translate:["Tt",nr([On,On,Wa]),sr],translateX:["T",nr([On,Wa,Wa]),nr([On,Wa])],translateY:["T",nr([Wa,On,Wa]),nr([Wa,On])],translateZ:["L",nr([Wa,Wa,On])],translate3d:["TTL",sr]};function Wr(h){for(var p=[],a=h.length,s=0;s<a;s++){var m=h[s],D=m[0],L=m.slice(1);D==="translate"||D==="skew"?L.length===1&&L.push(0):D==="scale"&&L.length===1&&L.push(L[0]);var V=xr[D];if(!V)return[];var st=L.map(function(Lt){return xi(Lt)});p.push({t:D,d:st})}return p}function ei(h){if(Array.isArray(h))return Wr(h);if(h=(h||"none").trim(),h==="none")return[];var p=[],a,s=0;for(Yn.lastIndex=0;a=Yn.exec(h);){if(a.index!==s)return[];s=a.index+a[0].length;var m=a[1],D=xr[m];if(!D)return[];var L=a[2].split(","),V=D[0];if(V.length<L.length)return[];for(var st=[],Lt=0;Lt<V.length;Lt++){var he=L[Lt],Te=V[Lt],je=void 0;if(he?je={A:function(tn){return tn.trim()==="0"?po:Ft(tn)},N:Mn,T:it,L:Ko}[Te.toUpperCase()](he):je={a:po,n:st[0],t:Wa}[Te],je===void 0)return[];st.push(je)}if(p.push({t:m,d:st}),Yn.lastIndex===h.length)return p}return[]}function Ti(h){if(Array.isArray(h))return Wr(h);if(h=(h||"none").trim(),h==="none")return[];var p=[],a,s=0;for(Yn.lastIndex=0;a=Yn.exec(h);){if(a.index!==s)return[];s=a.index+a[0].length;var m=a[1],D=xr[m];if(!D)return[];var L=a[2].split(","),V=D[0];if(V.length<L.length)return[];for(var st=[],Lt=0;Lt<V.length;Lt++){var he=L[Lt],Te=V[Lt],je=void 0;if(he?je={A:function(tn){return tn.trim()==="0"?po:ft(tn)},N:Nn,T:jt,L:Es}[Te.toUpperCase()](he):je={a:po,n:st[0],t:Wa}[Te],je===void 0)return[];st.push(je)}if(p.push({t:m,d:st}),Yn.lastIndex===h.length)return p}return[]}function Gi(h){var p,a,s,m;switch(h.t){case"rotateX":return m=rt(ye(h.d[0])),[1,0,0,0,0,Math.cos(m),Math.sin(m),0,0,-Math.sin(m),Math.cos(m),0,0,0,0,1];case"rotateY":return m=rt(ye(h.d[0])),[Math.cos(m),0,-Math.sin(m),0,0,1,0,0,Math.sin(m),0,Math.cos(m),0,0,0,0,1];case"rotate":case"rotateZ":return m=rt(ye(h.d[0])),[Math.cos(m),Math.sin(m),0,0,-Math.sin(m),Math.cos(m),0,0,0,0,1,0,0,0,0,1];case"rotate3d":p=h.d[0].value,a=h.d[1].value,s=h.d[2].value,m=rt(ye(h.d[3]));var D=p*p+a*a+s*s;if(D===0)p=1,a=0,s=0;else if(D!==1){var L=Math.sqrt(D);p/=L,a/=L,s/=L}var V=Math.sin(m/2),st=V*Math.cos(m/2),Lt=V*V;return[1-2*(a*a+s*s)*Lt,2*(p*a*Lt+s*st),2*(p*s*Lt-a*st),0,2*(p*a*Lt-s*st),1-2*(p*p+s*s)*Lt,2*(a*s*Lt+p*st),0,2*(p*s*Lt+a*st),2*(a*s*Lt-p*st),1-2*(p*p+a*a)*Lt,0,0,0,0,1];case"scale":return[h.d[0].value,0,0,0,0,h.d[1].value,0,0,0,0,1,0,0,0,0,1];case"scaleX":return[h.d[0].value,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];case"scaleY":return[1,0,0,0,0,h.d[0].value,0,0,0,0,1,0,0,0,0,1];case"scaleZ":return[1,0,0,0,0,1,0,0,0,0,h.d[0].value,0,0,0,0,1];case"scale3d":return[h.d[0].value,0,0,0,0,h.d[1].value,0,0,0,0,h.d[2].value,0,0,0,0,1];case"skew":var he=rt(ye(h.d[0])),Te=rt(ye(h.d[1]));return[1,Math.tan(Te),0,0,Math.tan(he),1,0,0,0,0,1,0,0,0,0,1];case"skewX":return m=rt(ye(h.d[0])),[1,0,0,0,Math.tan(m),1,0,0,0,0,1,0,0,0,0,1];case"skewY":return m=rt(ye(h.d[0])),[1,Math.tan(m),0,0,0,1,0,0,0,0,1,0,0,0,0,1];case"translate":return p=Ue(h.d[0],0,null)||0,a=Ue(h.d[1],0,null)||0,[1,0,0,0,0,1,0,0,0,0,1,0,p,a,0,1];case"translateX":return p=Ue(h.d[0],0,null)||0,[1,0,0,0,0,1,0,0,0,0,1,0,p,0,0,1];case"translateY":return a=Ue(h.d[0],0,null)||0,[1,0,0,0,0,1,0,0,0,0,1,0,0,a,0,1];case"translateZ":return s=Ue(h.d[0],0,null)||0,[1,0,0,0,0,1,0,0,0,0,1,0,0,0,s,1];case"translate3d":return p=Ue(h.d[0],0,null)||0,a=Ue(h.d[1],0,null)||0,s=Ue(h.d[2],0,null)||0,[1,0,0,0,0,1,0,0,0,0,1,0,p,a,s,1];case"perspective":var je=Ue(h.d[0],0,null)||0,qe=je?-1/je:0;return[1,0,0,0,0,1,0,0,0,0,1,qe,0,0,0,1];case"matrix":return[h.d[0].value,h.d[1].value,0,0,h.d[2].value,h.d[3].value,0,0,0,0,1,0,h.d[4].value,h.d[5].value,0,1];case"matrix3d":return h.d.map(function(tn){return tn.value})}}function Ei(h,p){return[h[0]*p[0]+h[4]*p[1]+h[8]*p[2]+h[12]*p[3],h[1]*p[0]+h[5]*p[1]+h[9]*p[2]+h[13]*p[3],h[2]*p[0]+h[6]*p[1]+h[10]*p[2]+h[14]*p[3],h[3]*p[0]+h[7]*p[1]+h[11]*p[2]+h[15]*p[3],h[0]*p[4]+h[4]*p[5]+h[8]*p[6]+h[12]*p[7],h[1]*p[4]+h[5]*p[5]+h[9]*p[6]+h[13]*p[7],h[2]*p[4]+h[6]*p[5]+h[10]*p[6]+h[14]*p[7],h[3]*p[4]+h[7]*p[5]+h[11]*p[6]+h[15]*p[7],h[0]*p[8]+h[4]*p[9]+h[8]*p[10]+h[12]*p[11],h[1]*p[8]+h[5]*p[9]+h[9]*p[10]+h[13]*p[11],h[2]*p[8]+h[6]*p[9]+h[10]*p[10]+h[14]*p[11],h[3]*p[8]+h[7]*p[9]+h[11]*p[10]+h[15]*p[11],h[0]*p[12]+h[4]*p[13]+h[8]*p[14]+h[12]*p[15],h[1]*p[12]+h[5]*p[13]+h[9]*p[14]+h[13]*p[15],h[2]*p[12]+h[6]*p[13]+h[10]*p[14]+h[14]*p[15],h[3]*p[12]+h[7]*p[13]+h[11]*p[14]+h[15]*p[15]]}function Vr(h){return h.length===0?[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]:h.map(Gi).reduce(Ei)}function mi(h){var p=[0,0,0],a=[1,1,1],s=[0,0,0],m=[0,0,0,1],D=[0,0,0,1];return qn(Vr(h),p,a,s,m,D),[[p,a,s,D,m]]}var Jr=function(){function h(s,m){for(var D=[[0,0,0,0],[0,0,0,0],[0,0,0,0],[0,0,0,0]],L=0;L<4;L++)for(var V=0;V<4;V++)for(var st=0;st<4;st++)D[L][V]+=m[L][st]*s[st][V];return D}function p(s){return s[0][2]===0&&s[0][3]===0&&s[1][2]===0&&s[1][3]===0&&s[2][0]===0&&s[2][1]===0&&s[2][2]===1&&s[2][3]===0&&s[3][2]===0&&s[3][3]===1}function a(s,m,D,L,V){for(var st=[[1,0,0,0],[0,1,0,0],[0,0,1,0],[0,0,0,1]],Lt=0;Lt<4;Lt++)st[Lt][3]=V[Lt];for(var he=0;he<3;he++)for(var Te=0;Te<3;Te++)st[3][he]+=s[Te]*st[Te][he];var je=L[0],qe=L[1],tn=L[2],fn=L[3],gn=[[1,0,0,0],[0,1,0,0],[0,0,1,0],[0,0,0,1]];gn[0][0]=1-2*(qe*qe+tn*tn),gn[0][1]=2*(je*qe-tn*fn),gn[0][2]=2*(je*tn+qe*fn),gn[1][0]=2*(je*qe+tn*fn),gn[1][1]=1-2*(je*je+tn*tn),gn[1][2]=2*(qe*tn-je*fn),gn[2][0]=2*(je*tn-qe*fn),gn[2][1]=2*(qe*tn+je*fn),gn[2][2]=1-2*(je*je+qe*qe),st=h(st,gn);var yn=[[1,0,0,0],[0,1,0,0],[0,0,1,0],[0,0,0,1]];D[2]&&(yn[2][1]=D[2],st=h(st,yn)),D[1]&&(yn[2][1]=0,yn[2][0]=D[0],st=h(st,yn)),D[0]&&(yn[2][0]=0,yn[1][0]=D[0],st=h(st,yn));for(var pn=0;pn<3;pn++)for(var Rn=0;Rn<3;Rn++)st[pn][Rn]*=m[pn];return p(st)?[st[0][0],st[0][1],st[1][0],st[1][1],st[3][0],st[3][1]]:st[0].concat(st[1],st[2],st[3])}return a}();function Ii(h){return h.toFixed(6).replace(".000000","")}function Ki(h,p){var a,s;return h.decompositionPair!==p&&(h.decompositionPair=p,a=mi(h)),p.decompositionPair!==h&&(p.decompositionPair=h,s=mi(p)),a[0]===null||s[0]===null?[[!1],[!0],function(m){return m?p[0].d:h[0].d}]:(a[0].push(0),s[0].push(1),[a,s,function(m){var D=Zi(a[0][3],s[0][3],m[5]),L=Jr(m[0],m[1],m[2],D,m[4]),V=L.map(Ii).join(",");return V}])}function Kr(h,p){for(var a=0,s=0;s<h.length;s++)a+=h[s]*p[s];return a}function Zi(h,p,a){var s=Kr(h,p);s=(0,Bt.Z)(s,-1,1);var m=[];if(s===1)m=h;else for(var D=Math.acos(s),L=Math.sin(a*D)*1/Math.sqrt(1-s*s),V=0;V<4;V++)m.push(h[V]*(Math.cos(a*D)-s*L)+p[V]*L);return m}function Pi(h){return h.replace(/[XY]/,"")}function Qi(h){return h.replace(/(X|Y|Z|3d)?$/,"3d")}var Ni=function(p,a){return p==="perspective"&&a==="perspective"||(p==="matrix"||p==="matrix3d")&&(a==="matrix"||a==="matrix3d")};function Ri(h,p,a){var s=!1;if(!h.length||!p.length){h.length||(s=!0,h=p,p=[]);for(var m=function(){var Ar=h[D],jr=Ar.t,oi=Ar.d,Xi=jr.substring(0,5)==="scale"?1:0;p.push({t:jr,d:oi.map(function(la){return typeof la=="number"?xi(Xi):xi(Xi,la.unit)})})},D=0;D<h.length;D++)m()}var L=[],V=[],st=[];if(h.length!==p.length){var Lt=Ki(h,p);L=[Lt[0]],V=[Lt[1]],st=[["matrix",[Lt[2]]]]}else for(var he=0;he<h.length;he++){var Te=h[he].t,je=p[he].t,qe=h[he].d,tn=p[he].d,fn=xr[Te],gn=xr[je],yn=void 0;if(Ni(Te,je)){var pn=Ki([h[he]],[p[he]]);L.push(pn[0]),V.push(pn[1]),st.push(["matrix",[pn[2]]]);continue}else if(Te===je)yn=Te;else if(fn[2]&&gn[2]&&Pi(Te)===Pi(je))yn=Pi(Te),qe=fn[2](qe),tn=gn[2](tn);else if(fn[1]&&gn[1]&&Qi(Te)===Qi(je))yn=Qi(Te),qe=fn[1](qe),tn=gn[1](tn);else{var Rn=Ki(h,p);L=[Rn[0]],V=[Rn[1]],st=[["matrix",[Rn[2]]]];break}for(var Qn=[],vr=[],wr=[],Pr=0;Pr<qe.length;Pr++){var Ur=de(qe[Pr],tn[Pr],a,!1,Pr);Qn[Pr]=Ur[0],vr[Pr]=Ur[1],wr.push(Ur[2])}L.push(Qn),V.push(vr),st.push([yn,wr])}if(s){var Gr=L;L=V,V=Gr}return[L,V,function(_r){return _r.map(function(Ar,jr){var oi=Ar.map(function(Xi,la){return st[jr][1][la](Xi)}).join(",");return st[jr][0]==="matrix"&&oi.split(",").length===16&&(st[jr][0]="matrix3d"),st[jr][0]==="matrix3d"&&oi.split(",").length===6&&(st[jr][0]="matrix"),"".concat(st[jr][0],"(").concat(oi,")")}).join(" ")}]}var na=Vi(function(h){if((0,Nt.Z)(h)){if(h==="text-anchor")return[xi(0,"px"),xi(0,"px")];var p=h.split(" ");return p.length===1&&(p[0]==="top"||p[0]==="bottom"?(p[1]=p[0],p[0]="center"):p[1]="center"),p.length!==2?null:[it(to(p[0])),it(to(p[1]))]}return[xi(h[0]||0,"px"),xi(h[1]||0,"px")]});function to(h){return h==="center"?"50%":h==="left"||h==="top"?"0%":h==="right"||h==="bottom"?"100%":h}var ga=[{n:"display",k:["none"]},{n:"opacity",int:!0,inh:!0,d:"1",syntax:Hn.OPACITY_VALUE},{n:"fillOpacity",int:!0,inh:!0,d:"1",syntax:Hn.OPACITY_VALUE},{n:"strokeOpacity",int:!0,inh:!0,d:"1",syntax:Hn.OPACITY_VALUE},{n:"fill",int:!0,k:["none"],d:"none",syntax:Hn.PAINT},{n:"fillRule",k:["nonzero","evenodd"],d:"nonzero"},{n:"stroke",int:!0,k:["none"],d:"none",syntax:Hn.PAINT,l:!0},{n:"shadowType",k:["inner","outer","both"],d:"outer",l:!0},{n:"shadowColor",int:!0,syntax:Hn.COLOR},{n:"shadowOffsetX",int:!0,l:!0,d:"0",syntax:Hn.LENGTH_PERCENTAGE},{n:"shadowOffsetY",int:!0,l:!0,d:"0",syntax:Hn.LENGTH_PERCENTAGE},{n:"shadowBlur",int:!0,l:!0,d:"0",syntax:Hn.SHADOW_BLUR},{n:"lineWidth",int:!0,inh:!0,d:"1",l:!0,a:["strokeWidth"],syntax:Hn.LENGTH_PERCENTAGE},{n:"increasedLineWidthForHitTesting",inh:!0,d:"0",l:!0,syntax:Hn.LENGTH_PERCENTAGE},{n:"lineJoin",inh:!0,l:!0,a:["strokeLinejoin"],k:["miter","bevel","round"],d:"miter"},{n:"lineCap",inh:!0,l:!0,a:["strokeLinecap"],k:["butt","round","square"],d:"butt"},{n:"lineDash",int:!0,inh:!0,k:["none"],a:["strokeDasharray"],syntax:Hn.LENGTH_PERCENTAGE_12},{n:"lineDashOffset",int:!0,inh:!0,d:"0",a:["strokeDashoffset"],syntax:Hn.LENGTH_PERCENTAGE},{n:"offsetPath",syntax:Hn.DEFINED_PATH},{n:"offsetDistance",int:!0,syntax:Hn.OFFSET_DISTANCE},{n:"dx",int:!0,l:!0,d:"0",syntax:Hn.LENGTH_PERCENTAGE},{n:"dy",int:!0,l:!0,d:"0",syntax:Hn.LENGTH_PERCENTAGE},{n:"zIndex",ind:!0,int:!0,d:"0",k:["auto"],syntax:Hn.Z_INDEX},{n:"visibility",k:["visible","hidden"],ind:!0,inh:!0,int:!0,d:"visible"},{n:"pointerEvents",inh:!0,k:["none","auto","stroke","fill","painted","visible","visiblestroke","visiblefill","visiblepainted","all"],d:"auto"},{n:"filter",ind:!0,l:!0,k:["none"],d:"none",syntax:Hn.FILTER},{n:"clipPath",syntax:Hn.DEFINED_PATH},{n:"textPath",syntax:Hn.DEFINED_PATH},{n:"textPathSide",k:["left","right"],d:"left"},{n:"textPathStartOffset",l:!0,d:"0",syntax:Hn.LENGTH_PERCENTAGE},{n:"transform",p:100,int:!0,k:["none"],d:"none",syntax:Hn.TRANSFORM},{n:"transformOrigin",p:100,d:"0 0",l:!0,syntax:Hn.TRANSFORM_ORIGIN},{n:"cx",int:!0,l:!0,d:"0",syntax:Hn.COORDINATE},{n:"cy",int:!0,l:!0,d:"0",syntax:Hn.COORDINATE},{n:"cz",int:!0,l:!0,d:"0",syntax:Hn.COORDINATE},{n:"r",int:!0,l:!0,d:"0",syntax:Hn.LENGTH_PERCENTAGE},{n:"rx",int:!0,l:!0,d:"0",syntax:Hn.LENGTH_PERCENTAGE},{n:"ry",int:!0,l:!0,d:"0",syntax:Hn.LENGTH_PERCENTAGE},{n:"x",int:!0,l:!0,d:"0",syntax:Hn.COORDINATE},{n:"y",int:!0,l:!0,d:"0",syntax:Hn.COORDINATE},{n:"z",int:!0,l:!0,d:"0",syntax:Hn.COORDINATE},{n:"width",int:!0,l:!0,k:["auto","fit-content","min-content","max-content"],d:"0",syntax:Hn.LENGTH_PERCENTAGE},{n:"height",int:!0,l:!0,k:["auto","fit-content","min-content","max-content"],d:"0",syntax:Hn.LENGTH_PERCENTAGE},{n:"radius",int:!0,l:!0,d:"0",syntax:Hn.LENGTH_PERCENTAGE_14},{n:"x1",int:!0,l:!0,syntax:Hn.COORDINATE},{n:"y1",int:!0,l:!0,syntax:Hn.COORDINATE},{n:"z1",int:!0,l:!0,syntax:Hn.COORDINATE},{n:"x2",int:!0,l:!0,syntax:Hn.COORDINATE},{n:"y2",int:!0,l:!0,syntax:Hn.COORDINATE},{n:"z2",int:!0,l:!0,syntax:Hn.COORDINATE},{n:"d",int:!0,l:!0,d:"",syntax:Hn.PATH,p:50},{n:"points",int:!0,l:!0,syntax:Hn.LIST_OF_POINTS,p:50},{n:"text",l:!0,d:"",syntax:Hn.TEXT,p:50},{n:"textTransform",l:!0,inh:!0,k:["capitalize","uppercase","lowercase","none"],d:"none",syntax:Hn.TEXT_TRANSFORM,p:51},{n:"font",l:!0},{n:"fontSize",int:!0,inh:!0,d:"16px",l:!0,syntax:Hn.LENGTH_PERCENTAGE},{n:"fontFamily",l:!0,inh:!0,d:"sans-serif"},{n:"fontStyle",l:!0,inh:!0,k:["normal","italic","oblique"],d:"normal"},{n:"fontWeight",l:!0,inh:!0,k:["normal","bold","bolder","lighter"],d:"normal"},{n:"fontVariant",l:!0,inh:!0,k:["normal","small-caps"],d:"normal"},{n:"lineHeight",l:!0,syntax:Hn.LENGTH,int:!0,d:"0"},{n:"letterSpacing",l:!0,syntax:Hn.LENGTH,int:!0,d:"0"},{n:"miterLimit",l:!0,syntax:Hn.NUMBER,d:function(p){return p===Jn.PATH||p===Jn.POLYGON||p===Jn.POLYLINE?"4":"10"}},{n:"wordWrap",l:!0},{n:"wordWrapWidth",l:!0},{n:"maxLines",l:!0},{n:"textOverflow",l:!0,d:"clip"},{n:"leading",l:!0},{n:"textBaseline",l:!0,inh:!0,k:["top","hanging","middle","alphabetic","ideographic","bottom"],d:"alphabetic"},{n:"textAlign",l:!0,inh:!0,k:["start","center","middle","end","left","right"],d:"start"},{n:"markerStart",syntax:Hn.MARKER},{n:"markerEnd",syntax:Hn.MARKER},{n:"markerMid",syntax:Hn.MARKER},{n:"markerStartOffset",syntax:Hn.LENGTH,l:!0,int:!0,d:"0"},{n:"markerEndOffset",syntax:Hn.LENGTH,l:!0,int:!0,d:"0"}],os=new Set(ga.filter(function(h){return!!h.l}).map(function(h){return h.n})),ss={},Va=function(){function h(p){var a=this;(0,R.Z)(this,h),this.runtime=p,ga.forEach(function(s){a.registerMetadata(s)})}return(0,O.Z)(h,[{key:"registerMetadata",value:function(a){[a.n].concat((0,_.Z)(a.a||[])).forEach(function(s){ss[s]=a})}},{key:"getPropertySyntax",value:function(a){return this.runtime.CSSPropertySyntaxFactory[a]}},{key:"processProperties",value:function(a,s){var m=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{skipUpdateAttribute:!1,skipParse:!1,forceUpdateGeometry:!1,usedAttributes:[],memoize:!0};Object.assign(a.attributes,s);var D=a.parsedStyle.clipPath,L=a.parsedStyle.offsetPath;co(a,s);var V=!!m.forceUpdateGeometry;if(!V){for(var st in s)if(os.has(st)){V=!0;break}}var Lt=wo(a);Lt.has("fill")&&s.fill&&(a.parsedStyle.fill=ta(s.fill)),Lt.has("stroke")&&s.stroke&&(a.parsedStyle.stroke=ta(s.stroke)),Lt.has("shadowColor")&&s.shadowColor&&(a.parsedStyle.shadowColor=ta(s.shadowColor)),Lt.has("filter")&&s.filter&&(a.parsedStyle.filter=vn(s.filter)),Lt.has("radius")&&!(0,kt.Z)(s.radius)&&(a.parsedStyle.radius=Se(s.radius,4)),Lt.has("lineDash")&&!(0,kt.Z)(s.lineDash)&&(a.parsedStyle.lineDash=Se(s.lineDash,"even")),Lt.has("points")&&s.points&&(a.parsedStyle.points=Dn(s.points)),Lt.has("d")&&s.d===""&&(a.parsedStyle.d=(0,l.Z)({},Ji)),Lt.has("d")&&s.d&&(a.parsedStyle.d=bn(s.d)),Lt.has("textTransform")&&s.textTransform&&this.runtime.CSSPropertySyntaxFactory[Hn.TEXT_TRANSFORM].calculator(null,null,{value:s.textTransform},a,null),Lt.has("clipPath")&&!(0,on.Z)(s.clipPath)&&this.runtime.CSSPropertySyntaxFactory[Hn.DEFINED_PATH].calculator("clipPath",D,s.clipPath,a,this.runtime),Lt.has("offsetPath")&&s.offsetPath&&this.runtime.CSSPropertySyntaxFactory[Hn.DEFINED_PATH].calculator("offsetPath",L,s.offsetPath,a,this.runtime),Lt.has("transform")&&s.transform&&(a.parsedStyle.transform=ei(s.transform)),Lt.has("transformOrigin")&&s.transformOrigin&&(a.parsedStyle.transformOrigin=na(s.transformOrigin)),Lt.has("markerStart")&&s.markerStart&&(a.parsedStyle.markerStart=this.runtime.CSSPropertySyntaxFactory[Hn.MARKER].calculator(null,s.markerStart,s.markerStart,null,null)),Lt.has("markerEnd")&&s.markerEnd&&(a.parsedStyle.markerEnd=this.runtime.CSSPropertySyntaxFactory[Hn.MARKER].calculator(null,s.markerEnd,s.markerEnd,null,null)),Lt.has("markerMid")&&s.markerMid&&(a.parsedStyle.markerMid=this.runtime.CSSPropertySyntaxFactory[Hn.MARKER].calculator("",s.markerMid,s.markerMid,null,null)),Lt.has("zIndex")&&!(0,kt.Z)(s.zIndex)&&this.runtime.CSSPropertySyntaxFactory[Hn.Z_INDEX].postProcessor(a),Lt.has("offsetDistance")&&!(0,kt.Z)(s.offsetDistance)&&this.runtime.CSSPropertySyntaxFactory[Hn.OFFSET_DISTANCE].postProcessor(a),Lt.has("transform")&&s.transform&&this.runtime.CSSPropertySyntaxFactory[Hn.TRANSFORM].postProcessor(a),Lt.has("transformOrigin")&&s.transformOrigin&&this.runtime.CSSPropertySyntaxFactory[Hn.TRANSFORM_ORIGIN].postProcessor(a),V&&(a.dirty(!0,!0),m.forceUpdateGeometry||this.runtime.sceneGraphService.dirtyToRoot(a))}},{key:"updateGeometry",value:function(a){var s=a.nodeName,m=this.runtime.geometryUpdaterFactory[s];if(m){var D=a.geometry;D.contentBounds||(D.contentBounds=new H),D.renderBounds||(D.renderBounds=new H);var L=a.parsedStyle,V=m.update(L,a),st=V.cx,Lt=st===void 0?0:st,he=V.cy,Te=he===void 0?0:he,je=V.cz,qe=je===void 0?0:je,tn=V.hwidth,fn=tn===void 0?0:tn,gn=V.hheight,yn=gn===void 0?0:gn,pn=V.hdepth,Rn=pn===void 0?0:pn,Qn=[Math.abs(fn),Math.abs(yn),Rn],vr=L.stroke,wr=L.lineWidth,Pr=wr===void 0?1:wr,Ur=L.increasedLineWidthForHitTesting,Gr=Ur===void 0?0:Ur,_r=L.shadowType,Ar=_r===void 0?"outer":_r,jr=L.shadowColor,oi=L.filter,Xi=oi===void 0?[]:oi,la=L.transformOrigin,ca=[Lt,Te,qe];D.contentBounds.update(ca,Qn);var Br=s===Jn.POLYLINE||s===Jn.POLYGON||s===Jn.PATH?Math.SQRT2:.5,wi=vr&&!vr.isNone;if(wi){var Ai=((Pr||0)+(Gr||0))*Br;Qn[0]+=Ai,Qn[1]+=Ai}if(D.renderBounds.update(ca,Qn),jr&&Ar&&Ar!=="inner"){var Pa=D.renderBounds,Ya=Pa.min,Go=Pa.max,Nl=L.shadowBlur,Rl=L.shadowOffsetX,el=L.shadowOffsetY,Il=Nl||0,vc=Rl||0,Dl=el||0,Qo=Ya[0]-Il+vc,ru=Go[0]+Il+vc,iu=Ya[1]-Il+Dl,Dd=Go[1]+Il+Dl;Ya[0]=Math.min(Ya[0],Qo),Go[0]=Math.max(Go[0],ru),Ya[1]=Math.min(Ya[1],iu),Go[1]=Math.max(Go[1],Dd),D.renderBounds.setMinMax(Ya,Go)}Xi.forEach(function(gc){var su=gc.name,kl=gc.params;if(su==="blur"){var _l=kl[0].value;D.renderBounds.update(D.renderBounds.center,x.IH(D.renderBounds.halfExtents,D.renderBounds.halfExtents,[_l,_l,0]))}else if(su==="drop-shadow"){var lu=kl[0].value,cu=kl[1].value,Zl=kl[2].value,pc=D.renderBounds,Ts=pc.min,Ps=pc.max,kd=Ts[0]-Zl+lu,_d=Ps[0]+Zl+lu,Zd=Ts[1]-Zl+cu,Fd=Ps[1]+Zl+cu;Ts[0]=Math.min(Ts[0],kd),Ps[0]=Math.max(Ps[0],_d),Ts[1]=Math.min(Ts[1],Zd),Ps[1]=Math.max(Ps[1],Fd),D.renderBounds.setMinMax(Ts,Ps)}}),a.geometry.dirty=!1;var Ld=fn<0,au=yn<0,Ll=(Ld?-1:1)*(la?Ue(la[0],0,a,!0):0),ou=(au?-1:1)*(la?Ue(la[1],1,a,!0):0);(Ll||ou)&&a.setOrigin(Ll,ou)}}},{key:"updateSizeAttenuation",value:function(a,s){a.style.isSizeAttenuation?(a.style.rawLineWidth||(a.style.rawLineWidth=a.style.lineWidth),a.style.lineWidth=(a.style.rawLineWidth||1)/s,a.nodeName===Jn.CIRCLE&&(a.style.rawR||(a.style.rawR=a.style.r),a.style.r=(a.style.rawR||1)/s)):(a.style.rawLineWidth&&(a.style.lineWidth=a.style.rawLineWidth,delete a.style.rawLineWidth),a.nodeName===Jn.CIRCLE&&a.style.rawR&&(a.style.r=a.style.rawR,delete a.style.rawR))}}])}();function co(h,p){var a=wo(h);for(var s in p)a.has(s)&&(h.parsedStyle[s]=p[s])}function wo(h){return h.constructor.PARSED_STYLE_LIST}var ro=function(){function h(){(0,R.Z)(this,h),this.mixer=zn}return(0,O.Z)(h,[{key:"calculator",value:function(a,s,m,D){return ye(m)}}])}(),io=function(){function h(){(0,R.Z)(this,h)}return(0,O.Z)(h,[{key:"calculator",value:function(a,s,m,D,L){return m instanceof za&&(m=null),L.sceneGraphService.updateDisplayObjectDependency(a,s,m,D),a==="clipPath"&&D.forEach(function(V){V.childNodes.length===0&&L.sceneGraphService.dirtyToRoot(V)}),m}}])}(),So=function(){function h(){(0,R.Z)(this,h),this.parser=ta,this.mixer=js}return(0,O.Z)(h,[{key:"calculator",value:function(a,s,m,D){return m instanceof za?m.value==="none"?aa:ba:m}}])}(),jo=function(){function h(){(0,R.Z)(this,h)}return(0,O.Z)(h,[{key:"calculator",value:function(a,s,m){return m instanceof za?[]:m}}])}();function Rs(h){var p=h.parsedStyle,a=p.fontSize;return(0,kt.Z)(a)?null:a}var ls=function(){function h(){(0,R.Z)(this,h),this.mixer=zn}return(0,O.Z)(h,[{key:"calculator",value:function(a,s,m,D,L){if((0,ut.Z)(m))return m;if($i.isRelativeUnit(m.unit)){if(m.unit===Kn.kPercentage)return 0;if(m.unit===Kn.kEms){if(D.parentNode){var V=Rs(D.parentNode);if(V)return V*=m.value,V}return 0}if(m.unit===Kn.kRems){var st;if(D!=null&&(st=D.ownerDocument)!==null&&st!==void 0&&st.documentElement){var Lt=Rs(D.ownerDocument.documentElement);if(Lt)return Lt*=m.value,Lt}return 0}}else return m.value}}])}(),$s=function(){function h(){(0,R.Z)(this,h),this.mixer=jn}return(0,O.Z)(h,[{key:"calculator",value:function(a,s,m){return m.map(function(D){return D.value})}}])}(),il=function(){function h(){(0,R.Z)(this,h),this.mixer=jn}return(0,O.Z)(h,[{key:"calculator",value:function(a,s,m){return m.map(function(D){return D.value})}}])}(),Ws=function(){function h(){(0,R.Z)(this,h)}return(0,O.Z)(h,[{key:"calculator",value:function(a,s,m,D){var L;m instanceof za&&(m=null);var V=(L=m)===null||L===void 0?void 0:L.cloneNode(!0);return V&&(V.style.isMarker=!0),V}}])}(),al=function(){function h(){(0,R.Z)(this,h),this.mixer=zn}return(0,O.Z)(h,[{key:"calculator",value:function(a,s,m){return m.value}}])}(),Hl=function(){function h(){(0,R.Z)(this,h),this.mixer=Gn(0,1)}return(0,O.Z)(h,[{key:"calculator",value:function(a,s,m){return m.value}},{key:"postProcessor",value:function(a){var s=a.parsedStyle,m=s.offsetPath,D=s.offsetDistance;if(m){var L=m.nodeName;if(L===Jn.LINE||L===Jn.PATH||L===Jn.POLYLINE){var V=m.getPoint(D);V&&a.setLocalPosition(V.x,V.y)}}}}])}(),Yl=function(){function h(){(0,R.Z)(this,h),this.mixer=Gn(0,1)}return(0,O.Z)(h,[{key:"calculator",value:function(a,s,m){return m.value}}])}(),Mc=function(){function h(){(0,R.Z)(this,h),this.parser=bn,this.mixer=xn}return(0,O.Z)(h,[{key:"calculator",value:function(a,s,m){return m instanceof za&&m.value==="unset"?{absolutePath:[],hasArc:!1,segments:[],polygons:[],polylines:[],curve:null,totalLength:0,rect:new G(0,0,0,0)}:m}}])}(),Is=(0,O.Z)(function h(){(0,R.Z)(this,h),this.mixer=Fn}),$o=function(h){function p(){var a;(0,R.Z)(this,p);for(var s=arguments.length,m=new Array(s),D=0;D<s;D++)m[D]=arguments[D];return a=(0,g.Z)(this,p,[].concat(m)),a.mixer=Gn(0,1/0),a}return(0,P.Z)(p,h),(0,O.Z)(p)}(ls),vs=function(){function h(){(0,R.Z)(this,h)}return(0,O.Z)(h,[{key:"calculator",value:function(a,s,m,D){return m instanceof za?m.value==="unset"?"":m.value:"".concat(m)}},{key:"postProcessor",value:function(a){a.nodeValue="".concat(a.parsedStyle.text)||""}}])}(),oa=function(){function h(){(0,R.Z)(this,h)}return(0,O.Z)(h,[{key:"calculator",value:function(a,s,m,D){var L=D.getAttribute("text");if(L){var V=L;m.value==="capitalize"?V=L.charAt(0).toUpperCase()+L.slice(1):m.value==="lowercase"?V=L.toLowerCase():m.value==="uppercase"&&(V=L.toUpperCase()),D.parsedStyle.text=V}return m.value}}])}(),Mo=function(p){return Object.fromEntries(Object.entries(p).filter(function(a){var s=_slicedToArray(a,2),m=s[1];return m!==void 0}))},ha=new WeakMap;function Zo(h,p,a){if(h){var s=typeof h=="string"?document.getElementById(h):h;ha.has(s)&&ha.get(s).destroy(a),ha.set(s,p)}}var Co=typeof window!="undefined"&&typeof window.document!="undefined";function ol(h){return!!h.getAttribute}function xs(h,p){for(var a=0,s=h.length;a<s;){var m=a+s>>>1;Ds(h[m],p)<0?a=m+1:s=m}return a}function Ds(h,p){var a=Number(h.parsedStyle.zIndex||0),s=Number(p.parsedStyle.zIndex||0);if(a===s){var m=h.parentNode;if(m){var D=m.childNodes||[];return D.indexOf(h)-D.indexOf(p)}}return a-s}function gs(h){var p=h;do{var a,s=(a=p.parsedStyle)===null||a===void 0?void 0:a.clipPath;if(s)return p;p=p.parentElement}while(p!==null);return null}var ps="px";function ws(h,p,a){Co&&h.style&&(h.style.width=p+ps,h.style.height=a+ps)}function Kl(h,p){if(Co)return document.defaultView.getComputedStyle(h,null).getPropertyValue(p)}function sl(h){var p=Kl(h,"width");return p==="auto"?h.offsetWidth:parseFloat(p)}function Cc(h){var p=Kl(h,"height");return p==="auto"?h.offsetHeight:parseFloat(p)}var Gs=1,Ua={touchstart:"pointerdown",touchend:"pointerup",touchendoutside:"pointerupoutside",touchmove:"pointermove",touchcancel:"pointercancel"},ll=typeof performance=="object"&&performance.now?performance:Date;function cl(h){return h.nodeName===Jn.FRAGMENT?!0:h.getRootNode().nodeName===Jn.FRAGMENT}function ju(){var h=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"auto",p=arguments.length>1?arguments[1]:void 0,a=arguments.length>2?arguments[2]:void 0,s=!1,m=!1,D=!!p&&!p.isNone,L=!!a&&!a.isNone;return h==="visiblepainted"||h==="painted"||h==="auto"?(s=D,m=L):h==="visiblefill"||h==="fill"?s=!0:h==="visiblestroke"||h==="stroke"?m=!0:(h==="visible"||h==="all")&&(s=!0,m=!0),[s,m]}var tf=1,$u=function(){return tf++},cs=typeof self=="object"&&self.self===self?self:typeof d.g=="object"&&d.g.global===d.g?d.g:{},ul=Date.now(),Wu=function(){return cs.performance&&typeof cs.performance.now=="function"?cs.performance.now():Date.now()-ul},Ss={},Xl=Date.now(),Gu=function(p){if(typeof p!="function")throw new TypeError("".concat(p," is not a function"));var a=Date.now(),s=a-Xl,m=s>16?0:16-s,D=$u();return Ss[D]=p,Object.keys(Ss).length>1||setTimeout(function(){Xl=a;var L=Ss;Ss={},Object.keys(L).forEach(function(V){return L[V](Wu())})},m),D},Vu=function(p){delete Ss[p]},Oc=["","webkit","moz","ms","o"],Vs=function(p){return typeof p!="string"?Gu:p===""?cs.requestAnimationFrame:cs["".concat(p,"RequestAnimationFrame")]},Uu=function(p){return typeof p!="string"?Vu:p===""?cs.cancelAnimationFrame:cs["".concat(p,"CancelAnimationFrame")]||cs["".concat(p,"CancelRequestAnimationFrame")]},dl=function(p,a){for(var s=0;p[s]!==void 0;){if(a(p[s]))return p[s];s+=1}},Us=dl(Oc,function(h){return!!Vs(h)}),Ql=Vs(Us),Hs=Uu(Us);cs.requestAnimationFrame=Ql,cs.cancelAnimationFrame=Hs;var Tc=function(){function h(){(0,R.Z)(this,h),this.callbacks=[]}return(0,O.Z)(h,[{key:"getCallbacksNum",value:function(){return this.callbacks.length}},{key:"tapPromise",value:function(a,s){this.callbacks.push(s)}},{key:"promise",value:function(){for(var a=arguments.length,s=new Array(a),m=0;m<a;m++)s[m]=arguments[m];return Promise.all(this.callbacks.map(function(D){return D.apply(void 0,s)}))}}])}(),fl=function(){function h(){(0,R.Z)(this,h),this.callbacks=[]}return(0,O.Z)(h,[{key:"tapPromise",value:function(a,s){this.callbacks.push(s)}},{key:"promise",value:function(){var p=(0,yi.Z)((0,gi.Z)().mark(function s(){var m,D,L,V,st=arguments;return(0,gi.Z)().wrap(function(Lt){for(;;)switch(Lt.prev=Lt.next){case 0:if(!this.callbacks.length){Lt.next=6;break}return Lt.next=1,(m=this.callbacks)[0].apply(m,st);case 1:D=Lt.sent,L=1;case 2:if(!(L<this.callbacks.length)){Lt.next=5;break}return V=this.callbacks[L],Lt.next=3,V(D);case 3:D=Lt.sent;case 4:L++,Lt.next=2;break;case 5:return Lt.abrupt("return",D);case 6:return Lt.abrupt("return",null);case 7:case"end":return Lt.stop()}},s,this)}));function a(){return p.apply(this,arguments)}return a}()}])}(),uo=function(){function h(){(0,R.Z)(this,h),this.callbacks=[]}return(0,O.Z)(h,[{key:"tap",value:function(a,s){this.callbacks.push(s)}},{key:"call",value:function(){for(var a=arguments.length,s=new Array(a),m=0;m<a;m++)s[m]=arguments[m];var D=arguments;this.callbacks.forEach(function(L){L.apply(void 0,D)})}}])}(),hl=function(){function h(){(0,R.Z)(this,h),this.callbacks=[]}return(0,O.Z)(h,[{key:"tap",value:function(a,s){this.callbacks.push(s)}},{key:"call",value:function(){for(var a=arguments.length,s=new Array(a),m=0;m<a;m++)s[m]=arguments[m];if(this.callbacks.length){for(var D=arguments,L=this.callbacks[0].apply(void 0,D),V=1;V<this.callbacks.length;V++){var st=this.callbacks[V];L=st(L)}return L}return null}}])}(),vl=["serif","sans-serif","monospace","cursive","fantasy","system-ui"],gl=/([\"\'])[^\'\"]+\1/;function ui(h){var p=h.fontSize,a=p===void 0?16:p,s=h.fontFamily,m=s===void 0?"sans-serif":s,D=h.fontStyle,L=D===void 0?"normal":D,V=h.fontVariant,st=V===void 0?"normal":V,Lt=h.fontWeight,he=Lt===void 0?"normal":Lt;return{fontSize:a,fontFamily:m,fontStyle:L,fontVariant:st,fontWeight:he}}var Pc=Vi(function(p){for(var a=ui(p),s=a.fontSize,m=a.fontFamily,D=a.fontStyle,L=a.fontVariant,V=a.fontWeight,st=(0,ut.Z)(s)&&"".concat(s,"px")||"16px",Lt=m.split(","),he=Lt.length-1;he>=0;he--){var Te=Lt[he].trim();!gl.test(Te)&&vl.indexOf(Te)<0&&(Te='"'.concat(Te,'"')),Lt[he]=Te}return"".concat(D," ").concat(L," ").concat(V," ").concat(st," ").concat(Lt.join(","))},function(h){var p=ui(h),a=p.fontSize,s=p.fontFamily,m=p.fontStyle,D=p.fontVariant,L=p.fontWeight;return"".concat(m,"_").concat(D,"_").concat(L,"_").concat(a,"_").concat(s)}),Ac=1e-6,Ys=function(p){return Math.max(p,Ac)};function Jl(h,p,a){return N.identity(h),h[4]=Math.tan(p),h[1]=Math.tan(a),h}var ka=N.create(),Hu=N.create(),Yu={scale:function(p){N.fromScaling(ka,[p[0].value,p[1].value,1].map(function(a){return Ys(a)}))},scaleX:function(p){N.fromScaling(ka,[p[0].value,1,1].map(function(a){return Ys(a)}))},scaleY:function(p){N.fromScaling(ka,[1,p[0].value,1].map(function(a){return Ys(a)}))},scaleZ:function(p){N.fromScaling(ka,[1,1,p[0].value].map(function(a){return Ys(a)}))},scale3d:function(p){N.fromScaling(ka,[p[0].value,p[1].value,p[2].value].map(function(a){return Ys(a)}))},translate:function(p){N.fromTranslation(ka,[p[0].value,p[1].value,0])},translateX:function(p){N.fromTranslation(ka,[p[0].value,0,0])},translateY:function(p){N.fromTranslation(ka,[0,p[0].value,0])},translateZ:function(p){N.fromTranslation(ka,[0,0,p[0].value])},translate3d:function(p){N.fromTranslation(ka,[p[0].value,p[1].value,p[2].value])},rotate:function(p){N.fromZRotation(ka,rt(ye(p[0])))},rotateX:function(p){N.fromXRotation(ka,rt(ye(p[0])))},rotateY:function(p){N.fromYRotation(ka,rt(ye(p[0])))},rotateZ:function(p){N.fromZRotation(ka,rt(ye(p[0])))},rotate3d:function(p){N.fromRotation(ka,rt(ye(p[3])),[p[0].value,p[1].value,p[2].value])},skew:function(p){Jl(ka,rt(p[0].value),rt(p[1].value))},skewX:function(p){Jl(ka,rt(p[0].value),0)},skewY:function(p){Jl(ka,0,rt(p[0].value))},matrix:function(p){N.set(ka,p[0].value,p[1].value,0,0,p[2].value,p[3].value,0,0,0,0,1,0,p[4].value,p[5].value,0,1)},matrix3d:function(p){N.set.apply(N,[ka].concat((0,_.Z)(p.map(function(a){return a.value}))))}},ql=x.al(1,1,1),Ku=x.Ue(),pl={translate:function(p,a){rr.sceneGraphService.setLocalScale(p,ql,!1),rr.sceneGraphService.setLocalEulerAngles(p,Ku,void 0,void 0,!1),rr.sceneGraphService.setLocalPosition(p,[a[0].value,a[1].value,0],!1),rr.sceneGraphService.dirtyLocalTransform(p,p.transformable)}};function Nc(h,p){if(h.length){if(h.length===1&&pl[h[0].t]){pl[h[0].t](p,h[0].d);return}for(var a=N.identity(Hu),s=0;s<h.length;s++){var m=h[s],D=m.t,L=m.d,V=Yu[D];V&&(V(L),N.mul(a,a,ka))}p.setLocalTransform(a)}else p.resetLocalTransform();return p.getLocalTransform()}var Xu=function(){function h(){(0,R.Z)(this,h),this.parser=Ti,this.mixer=Ri}return(0,O.Z)(h,[{key:"calculator",value:function(a,s,m,D){return m instanceof za?[]:m}},{key:"postProcessor",value:function(a){Nc(a.parsedStyle.transform,a)}}])}(),Qu=function(){function h(){(0,R.Z)(this,h)}return(0,O.Z)(h,[{key:"postProcessor",value:function(a){var s=a.parsedStyle.transformOrigin;s[0].unit===Kn.kPixels&&s[1].unit===Kn.kPixels?a.setOrigin(s[0].value,s[1].value):a.getGeometryBounds()}}])}(),Ju=function(){function h(){(0,R.Z)(this,h)}return(0,O.Z)(h,[{key:"calculator",value:function(a,s,m,D){return m.value}},{key:"postProcessor",value:function(a){if(a.parentNode){var s=a.parentNode,m=s.renderable,D=s.sortable;m&&s.dirty(),D&&(D.dirty=!0,D.dirtyReason=mr.Z_INDEX_CHANGED)}}}])}(),Ls=function(){function h(){(0,R.Z)(this,h)}return(0,O.Z)(h,[{key:"update",value:function(a,s){var m=a.cx,D=m===void 0?0:m,L=a.cy,V=L===void 0?0:L,st=a.r,Lt=st===void 0?0:st;return{cx:D,cy:V,hwidth:Lt,hheight:Lt}}}])}(),qu=function(){function h(){(0,R.Z)(this,h)}return(0,O.Z)(h,[{key:"update",value:function(a,s){var m=a.cx,D=m===void 0?0:m,L=a.cy,V=L===void 0?0:L,st=a.rx,Lt=st===void 0?0:st,he=a.ry,Te=he===void 0?0:he;return{cx:D,cy:V,hwidth:Lt,hheight:Te}}}])}(),Rc=function(){function h(){(0,R.Z)(this,h)}return(0,O.Z)(h,[{key:"update",value:function(a){var s=a.x1,m=a.y1,D=a.x2,L=a.y2,V=Math.min(s,D),st=Math.max(s,D),Lt=Math.min(m,L),he=Math.max(m,L),Te=st-V,je=he-Lt,qe=Te/2,tn=je/2;return{cx:V+qe,cy:Lt+tn,hwidth:qe,hheight:tn}}}])}(),Ic=function(){function h(){(0,R.Z)(this,h)}return(0,O.Z)(h,[{key:"update",value:function(a){var s=a.d,m=s.rect,D=m.x,L=m.y,V=m.width,st=m.height,Lt=V/2,he=st/2;return{cx:D+Lt,cy:L+he,hwidth:Lt,hheight:he}}}])}(),ef=function(){function h(){(0,R.Z)(this,h)}return(0,O.Z)(h,[{key:"update",value:function(a){if(a.points&&(0,_n.Z)(a.points.points)){var s=a.points.points,m=Math.min.apply(Math,(0,_.Z)(s.map(function(je){return je[0]}))),D=Math.max.apply(Math,(0,_.Z)(s.map(function(je){return je[0]}))),L=Math.min.apply(Math,(0,_.Z)(s.map(function(je){return je[1]}))),V=Math.max.apply(Math,(0,_.Z)(s.map(function(je){return je[1]}))),st=D-m,Lt=V-L,he=st/2,Te=Lt/2;return{cx:m+he,cy:L+Te,hwidth:he,hheight:Te}}return{cx:0,cy:0,hwidth:0,hheight:0}}}])}(),nf=function(){function h(){(0,R.Z)(this,h)}return(0,O.Z)(h,[{key:"update",value:function(a,s){var m=a.x,D=m===void 0?0:m,L=a.y,V=L===void 0?0:L,st=a.src,Lt=a.width,he=Lt===void 0?0:Lt,Te=a.height,je=Te===void 0?0:Te,qe=he,tn=je;return st&&!(0,Nt.Z)(st)&&(qe||(qe=st.width,a.width=qe),tn||(tn=st.height,a.height=tn)),{cx:D+qe/2,cy:V+tn/2,hwidth:qe/2,hheight:tn/2}}}])}(),Dc=function(){function h(p){(0,R.Z)(this,h),this.globalRuntime=p}return(0,O.Z)(h,[{key:"isReadyToMeasure",value:function(a,s){var m=a.text;return m}},{key:"update",value:function(a,s){var m,D=a.text,L=a.textAlign,V=L===void 0?"start":L,st=a.lineWidth,Lt=st===void 0?1:st,he=a.textBaseline,Te=he===void 0?"alphabetic":he,je=a.dx,qe=je===void 0?0:je,tn=a.dy,fn=tn===void 0?0:tn,gn=a.x,yn=gn===void 0?0:gn,pn=a.y,Rn=pn===void 0?0:pn;if(!this.isReadyToMeasure(a,s))return a.metrics={font:"",width:0,height:0,lines:[],lineWidths:[],lineHeight:0,maxLineWidth:0,fontProperties:{ascent:0,descent:0,fontSize:0},lineMetrics:[]},{hwidth:0,hheight:0,cx:0,cy:0};var Qn=(s==null||(m=s.ownerDocument)===null||m===void 0||(m=m.defaultView)===null||m===void 0?void 0:m.getConfig())||{},vr=Qn.offscreenCanvas,wr=this.globalRuntime.textService.measureText(D,a,vr);a.metrics=wr;var Pr=wr.width,Ur=wr.height,Gr=Pr/2,_r=Ur/2,Ar=yn+Gr;V==="center"||V==="middle"?Ar+=Lt/2-Gr:(V==="right"||V==="end")&&(Ar+=Lt-Gr*2);var jr=Rn-_r;return Te==="middle"?jr+=_r:Te==="top"||Te==="hanging"?jr+=_r*2:Te==="alphabetic"||(Te==="bottom"||Te==="ideographic")&&(jr+=0),qe&&(Ar+=qe),fn&&(jr+=fn),{cx:Ar,cy:jr,hwidth:Gr,hheight:_r}}}])}(),Ks=function(){function h(){(0,R.Z)(this,h)}return(0,O.Z)(h,[{key:"update",value:function(a,s){return{cx:0,cy:0,hwidth:0,hheight:0}}}])}(),td=function(){function h(){(0,R.Z)(this,h)}return(0,O.Z)(h,[{key:"update",value:function(a,s){var m=a.x,D=m===void 0?0:m,L=a.y,V=L===void 0?0:L,st=a.width,Lt=st===void 0?0:st,he=a.height,Te=he===void 0?0:he;return{cx:D+Lt/2,cy:V+Te/2,hwidth:Lt/2,hheight:Te/2}}}])}();function rf(h){return!!h.type}var Xs=function(){function h(p){(0,R.Z)(this,h),this.eventPhase=h.prototype.NONE,this.bubbles=!0,this.cancelBubble=!0,this.cancelable=!1,this.defaultPrevented=!1,this.propagationStopped=!1,this.propagationImmediatelyStopped=!1,this.layer=new Y,this.page=new Y,this.canvas=new Y,this.viewport=new Y,this.composed=!1,this.NONE=0,this.CAPTURING_PHASE=1,this.AT_TARGET=2,this.BUBBLING_PHASE=3,this.manager=p}return(0,O.Z)(h,[{key:"name",get:function(){return this.type}},{key:"layerX",get:function(){return this.layer.x}},{key:"layerY",get:function(){return this.layer.y}},{key:"pageX",get:function(){return this.page.x}},{key:"pageY",get:function(){return this.page.y}},{key:"x",get:function(){return this.canvas.x}},{key:"y",get:function(){return this.canvas.y}},{key:"canvasX",get:function(){return this.canvas.x}},{key:"canvasY",get:function(){return this.canvas.y}},{key:"viewportX",get:function(){return this.viewport.x}},{key:"viewportY",get:function(){return this.viewport.y}},{key:"composedPath",value:function(){return this.manager&&(!this.path||this.path[0]!==this.target)&&(this.path=this.target?this.manager.propagationPath(this.target):[]),this.path}},{key:"propagationPath",get:function(){return this.composedPath()}},{key:"preventDefault",value:function(){this.nativeEvent instanceof Event&&this.nativeEvent.cancelable&&this.nativeEvent.preventDefault(),this.defaultPrevented=!0}},{key:"stopImmediatePropagation",value:function(){this.propagationImmediatelyStopped=!0}},{key:"stopPropagation",value:function(){this.propagationStopped=!0}},{key:"initEvent",value:function(){}},{key:"initUIEvent",value:function(){}},{key:"clone",value:function(){throw new Error(J)}}])}(),tc=function(h){function p(){var a;(0,R.Z)(this,p);for(var s=arguments.length,m=new Array(s),D=0;D<s;D++)m[D]=arguments[D];return a=(0,g.Z)(this,p,[].concat(m)),a.client=new Y,a.movement=new Y,a.offset=new Y,a.global=new Y,a.screen=new Y,a}return(0,P.Z)(p,h),(0,O.Z)(p,[{key:"clientX",get:function(){return this.client.x}},{key:"clientY",get:function(){return this.client.y}},{key:"movementX",get:function(){return this.movement.x}},{key:"movementY",get:function(){return this.movement.y}},{key:"offsetX",get:function(){return this.offset.x}},{key:"offsetY",get:function(){return this.offset.y}},{key:"globalX",get:function(){return this.global.x}},{key:"globalY",get:function(){return this.global.y}},{key:"screenX",get:function(){return this.screen.x}},{key:"screenY",get:function(){return this.screen.y}},{key:"getModifierState",value:function(s){return"getModifierState"in this.nativeEvent&&this.nativeEvent.getModifierState(s)}},{key:"initMouseEvent",value:function(){throw new Error(J)}}])}(Xs),ml=function(h){function p(){var a;(0,R.Z)(this,p);for(var s=arguments.length,m=new Array(s),D=0;D<s;D++)m[D]=arguments[D];return a=(0,g.Z)(this,p,[].concat(m)),a.width=0,a.height=0,a.isPrimary=!1,a}return(0,P.Z)(p,h),(0,O.Z)(p,[{key:"getCoalescedEvents",value:function(){return this.type==="pointermove"||this.type==="mousemove"||this.type==="touchmove"?[this]:[]}},{key:"getPredictedEvents",value:function(){throw new Error("getPredictedEvents is not supported!")}},{key:"clone",value:function(){return this.manager.clonePointerEvent(this)}}])}(tc),Qs=function(h){function p(){return(0,R.Z)(this,p),(0,g.Z)(this,p,arguments)}return(0,P.Z)(p,h),(0,O.Z)(p,[{key:"clone",value:function(){return this.manager.cloneWheelEvent(this)}}])}(tc),ao=function(h){function p(a,s){var m;return(0,R.Z)(this,p),m=(0,g.Z)(this,p,[null]),m.type=a,m.detail=s==null?void 0:s.detail,s&&!("detail"in s)&&(m.detail=s),Object.assign(m,s),m}return(0,P.Z)(p,h),(0,O.Z)(p)}(Xs),ec=function(){function h(){(0,R.Z)(this,h),this.emitter=new I}return(0,O.Z)(h,[{key:"on",value:function(a,s,m){return this.addEventListener(a,s,m),this}},{key:"addEventListener",value:function(a,s,m){var D=!1,L=!1;if((0,Cn.Z)(m))D=m;else if(m){var V=m.capture;D=V===void 0?!1:V;var st=m.once;L=st===void 0?!1:st}D&&(a+="capture"),s=(0,Ln.Z)(s)?s:s.handleEvent;var Lt=(0,Ln.Z)(s)?void 0:s;return L?this.emitter.once(a,s,Lt):this.emitter.on(a,s,Lt),this}},{key:"off",value:function(a,s,m){return a?this.removeEventListener(a,s,m):this.removeAllEventListeners(),this}},{key:"removeAllEventListeners",value:function(){var a;(a=this.emitter)===null||a===void 0||a.removeAllListeners()}},{key:"removeEventListener",value:function(a,s,m){var D;if(!this.emitter)return this;var L=(0,Cn.Z)(m)?m:m==null?void 0:m.capture;L&&(a+="capture"),s=(0,Ln.Z)(s)?s:(D=s)===null||D===void 0?void 0:D.handleEvent;var V=(0,Ln.Z)(s)?void 0:s;return this.emitter.off(a,s,V),this}},{key:"emit",value:function(a,s){this.dispatchEvent(new ao(a,s))}},{key:"dispatchEventToSelf",value:function(a){a.target||(a.target=this),a.currentTarget=this,this.emitter.emit(a.type,a)}},{key:"dispatchEvent",value:function(a){var s=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,m=arguments.length>2?arguments[2]:void 0;if(m)return this.dispatchEventToSelf(a),!0;var D;if(this.document)D=this;else if(this.defaultView)D=this.defaultView;else{var L;D=(L=this.ownerDocument)===null||L===void 0?void 0:L.defaultView}if(D){if(a.manager=D.getEventService(),!a.manager)return!1;a.defaultPrevented=!1,a.path?a.path.length=0:a.page=[],s||(a.target=this),a.manager.dispatchEvent(a,a.type,s)}else this.dispatchEventToSelf(a);return!a.defaultPrevented}}])}(),wa=function(h){function p(){var a;(0,R.Z)(this,p);for(var s=arguments.length,m=new Array(s),D=0;D<s;D++)m[D]=arguments[D];return a=(0,g.Z)(this,p,[].concat(m)),a.shadow=!1,a.ownerDocument=null,a.isConnected=!1,a.baseURI="",a.childNodes=[],a.nodeType=0,a.nodeName="",a.nodeValue=null,a.mutations=void 0,a.parentNode=null,a.destroyed=!1,a}return(0,P.Z)(p,h),(0,O.Z)(p,[{key:"textContent",get:function(){var s="";this.nodeName===Jn.TEXT&&(s+=this.style.text);var m=(0,_i.Z)(this.childNodes),D;try{for(m.s();!(D=m.n()).done;){var L=D.value;L.nodeName===Jn.TEXT?s+=L.nodeValue:s+=L.textContent}}catch(V){m.e(V)}finally{m.f()}return s},set:function(s){var m=this;this.childNodes.slice().forEach(function(D){m.removeChild(D)}),this.nodeName===Jn.TEXT&&(this.style.text="".concat(s))}},{key:"getRootNode",value:function(){var s=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return this.parentNode?this.parentNode.getRootNode(s):s.composed&&this.host?this.host.getRootNode(s):this}},{key:"hasChildNodes",value:function(){return this.childNodes.length>0}},{key:"isDefaultNamespace",value:function(s){throw new Error(J)}},{key:"lookupNamespaceURI",value:function(s){throw new Error(J)}},{key:"lookupPrefix",value:function(s){throw new Error(J)}},{key:"normalize",value:function(){throw new Error(J)}},{key:"isEqualNode",value:function(s){return this===s}},{key:"isSameNode",value:function(s){return this.isEqualNode(s)}},{key:"parent",get:function(){return this.parentNode}},{key:"parentElement",get:function(){return null}},{key:"nextSibling",get:function(){return null}},{key:"previousSibling",get:function(){return null}},{key:"firstChild",get:function(){return this.childNodes.length>0?this.childNodes[0]:null}},{key:"lastChild",get:function(){return this.childNodes.length>0?this.childNodes[this.childNodes.length-1]:null}},{key:"compareDocumentPosition",value:function(s){if(s===this)return 0;for(var m=s,D=this,L=[m],V=[D];(st=m.parentNode)!==null&&st!==void 0?st:D.parentNode;){var st;m=m.parentNode?(L.push(m.parentNode),m.parentNode):m,D=D.parentNode?(V.push(D.parentNode),D.parentNode):D}if(m!==D)return p.DOCUMENT_POSITION_DISCONNECTED|p.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC|p.DOCUMENT_POSITION_PRECEDING;var Lt=L.length>V.length?L:V,he=Lt===L?V:L;if(Lt[Lt.length-he.length]===he[0])return Lt===L?p.DOCUMENT_POSITION_CONTAINED_BY|p.DOCUMENT_POSITION_FOLLOWING:p.DOCUMENT_POSITION_CONTAINS|p.DOCUMENT_POSITION_PRECEDING;for(var Te=Lt.length-he.length,je=he.length-1;je>=0;je--){var qe=he[je],tn=Lt[Te+je];if(tn!==qe){var fn=qe.parentNode.childNodes;return fn.indexOf(qe)<fn.indexOf(tn)?he===L?p.DOCUMENT_POSITION_PRECEDING:p.DOCUMENT_POSITION_FOLLOWING:Lt===L?p.DOCUMENT_POSITION_PRECEDING:p.DOCUMENT_POSITION_FOLLOWING}}return p.DOCUMENT_POSITION_FOLLOWING}},{key:"contain",value:function(s){return this.contains(s)}},{key:"contains",value:function(s){for(var m=s;m&&this!==m;)m=m.parentNode;return!!m}},{key:"getAncestor",value:function(s){for(var m=this;s>0&&m;)m=m.parentNode,s--;return m}},{key:"forEach",value:function(s){for(var m=[this];m.length>0;){var D=m.pop(),L=s(D);if(L===!1)break;for(var V=D.childNodes.length-1;V>=0;V--)m.push(D.childNodes[V])}}}],[{key:"isNode",value:function(s){return!!s.childNodes}}])}(ec);wa.DOCUMENT_POSITION_DISCONNECTED=1,wa.DOCUMENT_POSITION_PRECEDING=2,wa.DOCUMENT_POSITION_FOLLOWING=4,wa.DOCUMENT_POSITION_CONTAINS=8,wa.DOCUMENT_POSITION_CONTAINED_BY=16,wa.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC=32;var Lc=2048,ed=function(){function h(p,a){var s=this;(0,R.Z)(this,h),this.nativeHTMLMap=new WeakMap,this.cursor="default",this.mappingTable={},this.mappingState={trackingData:{}},this.eventPool=new Map,this.tmpMatrix=N.create(),this.tmpVec3=x.Ue(),this.onPointerDown=function(m){var D=s.createPointerEvent(m);if(s.dispatchEvent(D,"pointerdown"),D.pointerType==="touch")s.dispatchEvent(D,"touchstart");else if(D.pointerType==="mouse"||D.pointerType==="pen"){var L=D.button===2;s.dispatchEvent(D,L?"rightdown":"mousedown")}var V=s.trackingData(m.pointerId);V.pressTargetsByButton[m.button]=D.composedPath(),s.freeEvent(D)},this.onPointerUp=function(m){var D=ll.now(),L=s.createPointerEvent(m,void 0,void 0,s.context.config.alwaysTriggerPointerEventOnCanvas?s.rootTarget:void 0);if(s.dispatchEvent(L,"pointerup"),L.pointerType==="touch")s.dispatchEvent(L,"touchend");else if(L.pointerType==="mouse"||L.pointerType==="pen"){var V=L.button===2;s.dispatchEvent(L,V?"rightup":"mouseup")}var st=s.trackingData(m.pointerId),Lt=s.findMountedTarget(st.pressTargetsByButton[m.button]),he=Lt;if(Lt&&!L.composedPath().includes(Lt)){for(var Te=Lt;Te&&!L.composedPath().includes(Te);){if(L.currentTarget=Te,s.notifyTarget(L,"pointerupoutside"),L.pointerType==="touch")s.notifyTarget(L,"touchendoutside");else if(L.pointerType==="mouse"||L.pointerType==="pen"){var je=L.button===2;s.notifyTarget(L,je?"rightupoutside":"mouseupoutside")}wa.isNode(Te)&&(Te=Te.parentNode)}delete st.pressTargetsByButton[m.button],he=Te}if(he){var qe,tn=s.clonePointerEvent(L,"click");tn.target=he,tn.path=[],st.clicksByButton[m.button]||(st.clicksByButton[m.button]={clickCount:0,target:tn.target,timeStamp:D});var fn=s.context.renderingContext.root.ownerDocument.defaultView,gn=st.clicksByButton[m.button];gn.target===tn.target&&D-gn.timeStamp<fn.getConfig().dblClickSpeed?++gn.clickCount:gn.clickCount=1,gn.target=tn.target,gn.timeStamp=D,tn.detail=gn.clickCount,(qe=L.detail)!==null&&qe!==void 0&&qe.preventClick||(!s.context.config.useNativeClickEvent&&(tn.pointerType==="mouse"||tn.pointerType==="touch")&&s.dispatchEvent(tn,"click"),s.dispatchEvent(tn,"pointertap")),s.freeEvent(tn)}s.freeEvent(L)},this.onPointerMove=function(m){var D=s.createPointerEvent(m,void 0,void 0,s.context.config.alwaysTriggerPointerEventOnCanvas?s.rootTarget:void 0),L=D.pointerType==="mouse"||D.pointerType==="pen",V=s.trackingData(m.pointerId),st=s.findMountedTarget(V.overTargets);if(V.overTargets&&st!==D.target){var Lt=m.type==="mousemove"?"mouseout":"pointerout",he=s.createPointerEvent(m,Lt,st||void 0);if(s.dispatchEvent(he,"pointerout"),L&&s.dispatchEvent(he,"mouseout"),!D.composedPath().includes(st)){var Te=s.createPointerEvent(m,"pointerleave",st||void 0);for(Te.eventPhase=Te.AT_TARGET;Te.target&&!D.composedPath().includes(Te.target);)Te.currentTarget=Te.target,s.notifyTarget(Te),L&&s.notifyTarget(Te,"mouseleave"),wa.isNode(Te.target)&&(Te.target=Te.target.parentNode);s.freeEvent(Te)}s.freeEvent(he)}if(st!==D.target){var je=m.type==="mousemove"?"mouseover":"pointerover",qe=s.clonePointerEvent(D,je);s.dispatchEvent(qe,"pointerover"),L&&s.dispatchEvent(qe,"mouseover");for(var tn=st&&wa.isNode(st)&&st.parentNode;tn&&tn!==(wa.isNode(s.rootTarget)&&s.rootTarget.parentNode)&&tn!==D.target;)tn=tn.parentNode;var fn=!tn||tn===(wa.isNode(s.rootTarget)&&s.rootTarget.parentNode);if(fn){var gn=s.clonePointerEvent(D,"pointerenter");for(gn.eventPhase=gn.AT_TARGET;gn.target&&gn.target!==st&&gn.target!==(wa.isNode(s.rootTarget)&&s.rootTarget.parentNode);)gn.currentTarget=gn.target,s.notifyTarget(gn),L&&s.notifyTarget(gn,"mouseenter"),wa.isNode(gn.target)&&(gn.target=gn.target.parentNode);s.freeEvent(gn)}s.freeEvent(qe)}s.dispatchEvent(D,"pointermove"),D.pointerType==="touch"&&s.dispatchEvent(D,"touchmove"),L&&(s.dispatchEvent(D,"mousemove"),s.cursor=s.getCursor(D.target)),V.overTargets=D.composedPath(),s.freeEvent(D)},this.onPointerOut=function(m){var D=s.trackingData(m.pointerId);if(D.overTargets){var L=m.pointerType==="mouse"||m.pointerType==="pen",V=s.findMountedTarget(D.overTargets),st=s.createPointerEvent(m,"pointerout",V||void 0);s.dispatchEvent(st),L&&s.dispatchEvent(st,"mouseout");var Lt=s.createPointerEvent(m,"pointerleave",V||void 0);for(Lt.eventPhase=Lt.AT_TARGET;Lt.target&&Lt.target!==(wa.isNode(s.rootTarget)&&s.rootTarget.parentNode);)Lt.currentTarget=Lt.target,s.notifyTarget(Lt),L&&s.notifyTarget(Lt,"mouseleave"),wa.isNode(Lt.target)&&(Lt.target=Lt.target.parentNode);D.overTargets=null,s.freeEvent(st),s.freeEvent(Lt)}s.cursor=null},this.onPointerOver=function(m){var D=s.trackingData(m.pointerId),L=s.createPointerEvent(m),V=L.pointerType==="mouse"||L.pointerType==="pen";s.dispatchEvent(L,"pointerover"),V&&s.dispatchEvent(L,"mouseover"),L.pointerType==="mouse"&&(s.cursor=s.getCursor(L.target));var st=s.clonePointerEvent(L,"pointerenter");for(st.eventPhase=st.AT_TARGET;st.target&&st.target!==(wa.isNode(s.rootTarget)&&s.rootTarget.parentNode);)st.currentTarget=st.target,s.notifyTarget(st),V&&s.notifyTarget(st,"mouseenter"),wa.isNode(st.target)&&(st.target=st.target.parentNode);D.overTargets=L.composedPath(),s.freeEvent(L),s.freeEvent(st)},this.onPointerUpOutside=function(m){var D=s.trackingData(m.pointerId),L=s.findMountedTarget(D.pressTargetsByButton[m.button]),V=s.createPointerEvent(m);if(L){for(var st=L;st;)V.currentTarget=st,s.notifyTarget(V,"pointerupoutside"),V.pointerType==="touch"||(V.pointerType==="mouse"||V.pointerType==="pen")&&s.notifyTarget(V,V.button===2?"rightupoutside":"mouseupoutside"),wa.isNode(st)&&(st=st.parentNode);delete D.pressTargetsByButton[m.button]}s.freeEvent(V)},this.onWheel=function(m){var D=s.createWheelEvent(m);s.dispatchEvent(D),s.freeEvent(D)},this.onClick=function(m){if(s.context.config.useNativeClickEvent){var D=s.createPointerEvent(m);s.dispatchEvent(D),s.freeEvent(D)}},this.onPointerCancel=function(m){var D=s.createPointerEvent(m,void 0,void 0,s.context.config.alwaysTriggerPointerEventOnCanvas?s.rootTarget:void 0);s.dispatchEvent(D),s.freeEvent(D)},this.globalRuntime=p,this.context=a}return(0,O.Z)(h,[{key:"init",value:function(){this.rootTarget=this.context.renderingContext.root.parentNode,this.addEventMapping("pointerdown",this.onPointerDown),this.addEventMapping("pointerup",this.onPointerUp),this.addEventMapping("pointermove",this.onPointerMove),this.addEventMapping("pointerout",this.onPointerOut),this.addEventMapping("pointerleave",this.onPointerOut),this.addEventMapping("pointercancel",this.onPointerCancel),this.addEventMapping("pointerover",this.onPointerOver),this.addEventMapping("pointerupoutside",this.onPointerUpOutside),this.addEventMapping("wheel",this.onWheel),this.addEventMapping("click",this.onClick)}},{key:"destroy",value:function(){this.mappingTable={},this.mappingState={},this.eventPool.clear()}},{key:"getScale",value:function(){var a=this.context.contextService.getBoundingClientRect(),s=1,m=1,D=this.context.contextService.getDomElement();if(D&&a){var L=D.offsetWidth,V=D.offsetHeight;L&&V&&(s=a.width/L,m=a.height/V)}return{scaleX:s,scaleY:m,bbox:a}}},{key:"client2Viewport",value:function(a){var s=this.getScale(),m=s.scaleX,D=s.scaleY,L=s.bbox;return new Y((a.x-((L==null?void 0:L.left)||0))/m,(a.y-((L==null?void 0:L.top)||0))/D)}},{key:"viewport2Client",value:function(a){var s=this.getScale(),m=s.scaleX,D=s.scaleY,L=s.bbox;return new Y((a.x+((L==null?void 0:L.left)||0))*m,(a.y+((L==null?void 0:L.top)||0))*D)}},{key:"viewport2Canvas",value:function(a){var s=a.x,m=a.y,D=this.rootTarget.defaultView,L=D.getCamera(),V=this.context.config,st=V.width,Lt=V.height,he=L.getPerspectiveInverse(),Te=L.getWorldTransform(),je=N.multiply(this.tmpMatrix,Te,he),qe=x.t8(this.tmpVec3,s/st*2-1,(1-m/Lt)*2-1,0);return x.fF(qe,qe,je),new Y(qe[0],qe[1])}},{key:"canvas2Viewport",value:function(a){var s=this.rootTarget.defaultView,m=s.getCamera(),D=m.getPerspective(),L=m.getViewTransform(),V=N.multiply(this.tmpMatrix,D,L),st=x.t8(this.tmpVec3,a.x,a.y,0);x.fF(this.tmpVec3,this.tmpVec3,V);var Lt=this.context.config,he=Lt.width,Te=Lt.height;return new Y((st[0]+1)/2*he,(1-(st[1]+1)/2)*Te)}},{key:"setPickHandler",value:function(a){this.pickHandler=a}},{key:"addEventMapping",value:function(a,s){this.mappingTable[a]||(this.mappingTable[a]=[]),this.mappingTable[a].push({fn:s,priority:0}),this.mappingTable[a].sort(function(m,D){return m.priority-D.priority})}},{key:"mapEvent",value:function(a){if(this.rootTarget){var s=this.mappingTable[a.type];if(s)for(var m=0,D=s.length;m<D;m++)s[m].fn(a);else console.warn("[EventService]: Event mapping not defined for ".concat(a.type))}}},{key:"dispatchEvent",value:function(a,s,m){if(!m)a.propagationStopped=!1,a.propagationImmediatelyStopped=!1,this.propagate(a,s);else{a.eventPhase=a.AT_TARGET;var D=this.rootTarget.defaultView||null;a.currentTarget=D,this.notifyListeners(a,s)}}},{key:"propagate",value:function(a,s){if(a.target){var m=a.composedPath();a.eventPhase=a.CAPTURING_PHASE;for(var D=m.length-1;D>=1;D--)if(a.currentTarget=m[D],this.notifyTarget(a,s),a.propagationStopped||a.propagationImmediatelyStopped)return;if(a.eventPhase=a.AT_TARGET,a.currentTarget=a.target,this.notifyTarget(a,s),!(a.propagationStopped||a.propagationImmediatelyStopped)){var L=m.indexOf(a.currentTarget);a.eventPhase=a.BUBBLING_PHASE;for(var V=L+1;V<m.length;V++)if(a.currentTarget=m[V],this.notifyTarget(a,s),a.propagationStopped||a.propagationImmediatelyStopped)return}}}},{key:"propagationPath",value:function(a){var s=[a],m=this.rootTarget.defaultView||null;if(m&&m===a)return s.unshift(m.document),s;for(var D=0;D<Lc&&a!==this.rootTarget;D++)wa.isNode(a)&&a.parentNode&&(s.push(a.parentNode),a=a.parentNode);return m&&s.push(m),s}},{key:"hitTest",value:function(a){var s=a.viewportX,m=a.viewportY,D=this.context.config,L=D.width,V=D.height,st=D.disableHitTesting;return s<0||m<0||s>L||m>V?null:!st&&this.pickHandler(a)||this.rootTarget||null}},{key:"isNativeEventFromCanvas",value:function(a,s){var m,D=s==null?void 0:s.target;if((m=D)!==null&&m!==void 0&&m.shadowRoot&&(D=s.composedPath()[0]),D){if(D===a)return!0;if(a&&a.contains)return a.contains(D)}return s!=null&&s.composedPath?s.composedPath().indexOf(a)>-1:!1}},{key:"getExistedHTML",value:function(a){if(a.nativeEvent.composedPath)for(var s=0,m=a.nativeEvent.composedPath();s<m.length;s++){var D=m[s],L=this.nativeHTMLMap.get(D);if(L)return L}return null}},{key:"pickTarget",value:function(a){return this.hitTest({clientX:a.clientX,clientY:a.clientY,viewportX:a.viewportX,viewportY:a.viewportY,x:a.canvasX,y:a.canvasY})}},{key:"createPointerEvent",value:function(a,s,m,D){var L=this.allocateEvent(ml);this.copyPointerData(a,L),this.copyMouseData(a,L),this.copyData(a,L),L.nativeEvent=a.nativeEvent,L.originalEvent=a;var V=this.getExistedHTML(L),st=this.context.contextService.getDomElement();return L.target=m!=null?m:V||this.isNativeEventFromCanvas(st,L.nativeEvent)&&this.pickTarget(L)||D,typeof s=="string"&&(L.type=s),L}},{key:"createWheelEvent",value:function(a){var s=this.allocateEvent(Qs);this.copyWheelData(a,s),this.copyMouseData(a,s),this.copyData(a,s),s.nativeEvent=a.nativeEvent,s.originalEvent=a;var m=this.getExistedHTML(s),D=this.context.contextService.getDomElement();return s.target=m||this.isNativeEventFromCanvas(D,s.nativeEvent)&&this.pickTarget(s),s}},{key:"trackingData",value:function(a){return this.mappingState.trackingData[a]||(this.mappingState.trackingData[a]={pressTargetsByButton:{},clicksByButton:{},overTarget:null}),this.mappingState.trackingData[a]}},{key:"cloneWheelEvent",value:function(a){var s=this.allocateEvent(Qs);return s.nativeEvent=a.nativeEvent,s.originalEvent=a.originalEvent,this.copyWheelData(a,s),this.copyMouseData(a,s),this.copyData(a,s),s.target=a.target,s.path=a.composedPath().slice(),s.type=a.type,s}},{key:"clonePointerEvent",value:function(a,s){var m=this.allocateEvent(ml);return m.nativeEvent=a.nativeEvent,m.originalEvent=a.originalEvent,this.copyPointerData(a,m),this.copyMouseData(a,m),this.copyData(a,m),m.target=a.target,m.path=a.composedPath().slice(),m.type=s!=null?s:m.type,m}},{key:"copyPointerData",value:function(a,s){s.pointerId=a.pointerId,s.width=a.width,s.height=a.height,s.isPrimary=a.isPrimary,s.pointerType=a.pointerType,s.pressure=a.pressure,s.tangentialPressure=a.tangentialPressure,s.tiltX=a.tiltX,s.tiltY=a.tiltY,s.twist=a.twist}},{key:"copyMouseData",value:function(a,s){s.altKey=a.altKey,s.button=a.button,s.buttons=a.buttons,s.ctrlKey=a.ctrlKey,s.metaKey=a.metaKey,s.shiftKey=a.shiftKey,s.client.copyFrom(a.client),s.movement.copyFrom(a.movement),s.canvas.copyFrom(a.canvas),s.screen.copyFrom(a.screen),s.global.copyFrom(a.global),s.offset.copyFrom(a.offset)}},{key:"copyWheelData",value:function(a,s){s.deltaMode=a.deltaMode,s.deltaX=a.deltaX,s.deltaY=a.deltaY,s.deltaZ=a.deltaZ}},{key:"copyData",value:function(a,s){s.isTrusted=a.isTrusted,s.timeStamp=ll.now(),s.type=a.type,s.detail=a.detail,s.view=a.view,s.page.copyFrom(a.page),s.viewport.copyFrom(a.viewport)}},{key:"allocateEvent",value:function(a){this.eventPool.has(a)||this.eventPool.set(a,[]);var s=this.eventPool.get(a).pop()||new a(this);return s.eventPhase=s.NONE,s.currentTarget=null,s.path=[],s.target=null,s}},{key:"freeEvent",value:function(a){if(a.manager!==this)throw new Error("It is illegal to free an event not managed by this EventBoundary!");var s=a.constructor;this.eventPool.has(s)||this.eventPool.set(s,[]),this.eventPool.get(s).push(a)}},{key:"notifyTarget",value:function(a,s){s=s!=null?s:a.type;var m=a.eventPhase===a.CAPTURING_PHASE||a.eventPhase===a.AT_TARGET?"".concat(s,"capture"):s;this.notifyListeners(a,m),a.eventPhase===a.AT_TARGET&&this.notifyListeners(a,s)}},{key:"notifyListeners",value:function(a,s){var m=a.currentTarget.emitter,D=m._events[s];if(D)if("fn"in D)D.once&&m.removeListener(s,D.fn,void 0,!0),D.fn.call(a.currentTarget||D.context,a);else for(var L=0;L<D.length&&!a.propagationImmediatelyStopped;L++)D[L].once&&m.removeListener(s,D[L].fn,void 0,!0),D[L].fn.call(a.currentTarget||D[L].context,a)}},{key:"findMountedTarget",value:function(a){if(!a)return null;for(var s=a[a.length-1],m=a.length-2;m>=0;m--){var D=a[m];if(D===this.rootTarget||wa.isNode(D)&&D.parentNode===s)s=a[m];else break}return s}},{key:"getCursor",value:function(a){for(var s=a;s;){var m=ol(s)&&s.getAttribute("cursor");if(m)return m;s=wa.isNode(s)&&s.parentNode}}}])}(),kc=function(){function h(){(0,R.Z)(this,h)}return(0,O.Z)(h,[{key:"getOrCreateCanvas",value:function(a,s){if(this.canvas)return this.canvas;if(a||rr.offscreenCanvas)this.canvas=a||rr.offscreenCanvas,this.context=this.canvas.getContext("2d",(0,l.Z)({willReadFrequently:!0},s));else try{this.canvas=new window.OffscreenCanvas(0,0),this.context=this.canvas.getContext("2d",(0,l.Z)({willReadFrequently:!0},s)),(!this.context||!this.context.measureText)&&(this.canvas=document.createElement("canvas"),this.context=this.canvas.getContext("2d"))}catch(m){this.canvas=document.createElement("canvas"),this.context=this.canvas.getContext("2d",(0,l.Z)({willReadFrequently:!0},s))}return this.canvas.width=10,this.canvas.height=10,this.canvas}},{key:"getOrCreateContext",value:function(a,s){return this.context?this.context:(this.getOrCreateCanvas(a,s),this.context)}}],[{key:"createCanvas",value:function(){try{return new window.OffscreenCanvas(0,0)}catch(a){}try{return document.createElement("canvas")}catch(a){}return null}}])}(),ks=function(h){return h[h.CAMERA_CHANGED=0]="CAMERA_CHANGED",h[h.DISPLAY_OBJECT_CHANGED=1]="DISPLAY_OBJECT_CHANGED",h[h.NONE=2]="NONE",h}({}),_c=function(){function h(p,a){(0,R.Z)(this,h),this.inited=!1,this.stats={total:0,rendered:0},this.zIndexCounter=0,this.hooks={init:new uo,initAsync:new Tc,dirtycheck:new hl,cull:new hl,beginFrame:new uo,beforeRender:new uo,render:new uo,afterRender:new uo,endFrame:new uo,destroy:new uo,pick:new fl,pickSync:new hl,pointerDown:new uo,pointerUp:new uo,pointerMove:new uo,pointerOut:new uo,pointerOver:new uo,pointerWheel:new uo,pointerCancel:new uo,click:new uo},this.globalRuntime=p,this.context=a}return(0,O.Z)(h,[{key:"init",value:function(a){var s=this,m=(0,l.Z)((0,l.Z)({},this.globalRuntime),this.context);this.context.renderingPlugins.forEach(function(D){D.apply(m,s.globalRuntime)}),this.hooks.init.call(),this.hooks.initAsync.getCallbacksNum()===0?(this.inited=!0,a()):this.hooks.initAsync.promise().then(function(){s.inited=!0,a()}).catch(function(D){})}},{key:"getStats",value:function(){return this.stats}},{key:"disableDirtyRectangleRendering",value:function(){var a=this.context.config.renderer,s=a.getConfig(),m=s.enableDirtyRectangleRendering;return!m||this.context.renderingContext.renderReasons.has(ks.CAMERA_CHANGED)}},{key:"render",value:function(a,s,m){var D=this,L=a.getConfig(),V=this.context.renderingContext;if(this.stats.total=0,this.stats.rendered=0,this.zIndexCounter=0,this.globalRuntime.sceneGraphService.syncHierarchy(V.root),this.globalRuntime.sceneGraphService.notifyMutationObservers(a),V.renderReasons.size&&this.inited){V.dirtyRectangleRenderingDisabled=this.disableDirtyRectangleRendering();var st=V.renderReasons.size===1&&V.renderReasons.has(ks.CAMERA_CHANGED),Lt=!L.disableRenderHooks||!st;Lt&&this.renderDisplayObject(V.root,L,V),this.hooks.beginFrame.call(s),Lt&&V.renderListCurrentFrame.forEach(function(he){D.hooks.beforeRender.call(he),D.hooks.render.call(he),D.hooks.afterRender.call(he)}),this.hooks.endFrame.call(s),V.renderListCurrentFrame=[],V.renderReasons.clear(),m()}}},{key:"renderDisplayObject",value:function(a,s,m){var D=this,L=s.renderer.getConfig(),V=L.enableDirtyCheck,st=L.enableCulling;function Lt(fn){var gn=fn.renderable,yn=fn.sortable,pn=V?gn.dirty||m.dirtyRectangleRenderingDisabled?fn:null:fn,Rn=null;pn&&(Rn=st?D.hooks.cull.call(pn,D.context.camera):pn,Rn&&(D.stats.rendered+=1,m.renderListCurrentFrame.push(Rn))),fn.dirty(!1),yn.renderOrder=D.zIndexCounter,D.zIndexCounter+=1,D.stats.total+=1,yn.dirty&&(D.sort(fn,yn),yn.dirty=!1,yn.dirtyChildren=[],yn.dirtyReason=void 0)}for(var he=[a];he.length>0;){var Te,je=he.pop();Lt(je);for(var qe=((Te=je.sortable)===null||Te===void 0||(Te=Te.sorted)===null||Te===void 0?void 0:Te.length)>0?je.sortable.sorted:je.childNodes,tn=qe.length-1;tn>=0;tn--)he.push(qe[tn])}}},{key:"sort",value:function(a,s){var m,D;(s==null||(m=s.sorted)===null||m===void 0?void 0:m.length)>0&&s.dirtyReason!==mr.Z_INDEX_CHANGED?s.dirtyChildren.forEach(function(L){var V=s.sorted.indexOf(L);V>-1&&s.sorted.splice(V,1);var st=a.childNodes.indexOf(L);if(st>-1)if(s.sorted.length===0)s.sorted.push(L);else{var Lt=xs(s.sorted,L);s.sorted.splice(Lt,0,L)}}):s.sorted=a.childNodes.slice().sort(Ds),((D=s.sorted)===null||D===void 0?void 0:D.length)>0&&a.childNodes.filter(function(L){return L.parsedStyle.zIndex}).length===0&&(s.sorted=[])}},{key:"destroy",value:function(){this.inited=!1,this.hooks.destroy.call()}},{key:"dirty",value:function(){this.context.renderingContext.renderReasons.add(ks.DISPLAY_OBJECT_CHANGED)}}])}(),nd=/\[\s*(.*)=(.*)\s*\]/,nc=function(){function h(){(0,R.Z)(this,h)}return(0,O.Z)(h,[{key:"selectOne",value:function(a,s){var m=this;if(a.startsWith("."))return s.find(function(st){return((st==null?void 0:st.classList)||[]).indexOf(m.getIdOrClassname(a))>-1});if(a.startsWith("#"))return s.find(function(st){return st.id===m.getIdOrClassname(a)});if(a.startsWith("[")){var D=this.getAttribute(a),L=D.name,V=D.value;return L?s.find(function(st){return s!==st&&(L==="name"?st.name===V:m.attributeToString(st,L)===V)}):null}return s.find(function(st){return s!==st&&st.nodeName===a})}},{key:"selectAll",value:function(a,s){var m=this;if(a.startsWith("."))return s.findAll(function(st){return s!==st&&((st==null?void 0:st.classList)||[]).indexOf(m.getIdOrClassname(a))>-1});if(a.startsWith("#"))return s.findAll(function(st){return s!==st&&st.id===m.getIdOrClassname(a)});if(a.startsWith("[")){var D=this.getAttribute(a),L=D.name,V=D.value;return L?s.findAll(function(st){return s!==st&&(L==="name"?st.name===V:m.attributeToString(st,L)===V)}):[]}return s.findAll(function(st){return s!==st&&st.nodeName===a})}},{key:"is",value:function(a,s){if(a.startsWith("."))return s.className===this.getIdOrClassname(a);if(a.startsWith("#"))return s.id===this.getIdOrClassname(a);if(a.startsWith("[")){var m=this.getAttribute(a),D=m.name,L=m.value;return D==="name"?s.name===L:this.attributeToString(s,D)===L}return s.nodeName===a}},{key:"getIdOrClassname",value:function(a){return a.substring(1)}},{key:"getAttribute",value:function(a){var s=a.match(nd),m="",D="";return s&&s.length>2&&(m=s[1].replace(/"/g,""),D=s[2].replace(/"/g,"")),{name:m,value:D}}},{key:"attributeToString",value:function(a,s){if(!a.getAttribute)return"";var m=a.getAttribute(s);return(0,kt.Z)(m)?"":m.toString?m.toString():""}}])}(),Ha=function(h){return h.ATTR_MODIFIED="DOMAttrModified",h.INSERTED="DOMNodeInserted",h.MOUNTED="DOMNodeInsertedIntoDocument",h.REMOVED="removed",h.UNMOUNTED="DOMNodeRemovedFromDocument",h.REPARENT="reparent",h.DESTROY="destroy",h.BOUNDS_CHANGED="bounds-changed",h.CULLED="culled",h}({}),Fo=function(h){function p(a,s,m,D,L,V,st,Lt){var he;return(0,R.Z)(this,p),he=(0,g.Z)(this,p,[null]),he.relatedNode=s,he.prevValue=m,he.newValue=D,he.attrName=L,he.attrChange=V,he.prevParsedValue=st,he.newParsedValue=Lt,he.type=a,he}return(0,P.Z)(p,h),(0,O.Z)(p)}(Xs);Fo.ADDITION=2,Fo.MODIFICATION=1,Fo.REMOVAL=3;var rd=new Fo(Ha.REPARENT,null,"","","",0,"",""),Zc=Ct.Ue(),yl=x.Ue(),id=x.al(1,1,1),ad=N.create(),od=Ct.Ue(),ms=x.Ue(),sd=N.create(),Ms=tt.Ue(),ld=x.Ue(),cd=tt.Ue(),ud=x.Ue(),Js=x.Ue(),Cs=x.Ue(),qs=N.create(),rc=tt.Ue(),Fc=tt.Ue(),bl=tt.Ue(),dd=function(){function h(p){(0,R.Z)(this,h),this.displayObjectDependencyMap=new WeakMap,this.runtime=p}return(0,O.Z)(h,[{key:"matches",value:function(a,s){return this.runtime.sceneGraphSelector.is(a,s)}},{key:"querySelector",value:function(a,s){return this.runtime.sceneGraphSelector.selectOne(a,s)}},{key:"querySelectorAll",value:function(a,s){return this.runtime.sceneGraphSelector.selectAll(a,s)}},{key:"attach",value:function(a,s,m){var D,L=!1;a.parentNode&&(L=a.parentNode!==s,this.detach(a));var V=a.nodeName===Jn.FRAGMENT,st=cl(s);a.parentNode=s;var Lt=V?a.childNodes:[a];(0,ut.Z)(m)?Lt.forEach(function(fn){s.childNodes.splice(m,0,fn),fn.parentNode=s}):Lt.forEach(function(fn){s.childNodes.push(fn),fn.parentNode=s});var he=s,Te=he.sortable;if((Te!=null&&(D=Te.sorted)!==null&&D!==void 0&&D.length||Te.dirty||a.parsedStyle.zIndex)&&(Te.dirtyChildren.indexOf(a)===-1&&Te.dirtyChildren.push(a),Te.dirty=!0,Te.dirtyReason=mr.ADDED),!st){if(V)this.dirtyFragment(a);else{var je=a.transformable;je&&this.dirtyWorldTransform(a,je)}if(L){var qe,tn=((qe=s.ownerDocument)===null||qe===void 0||(qe=qe.defaultView)===null||qe===void 0||(qe=qe.getConfig())===null||qe===void 0||(qe=qe.future)===null||qe===void 0?void 0:qe.experimentalCancelEventPropagation)===!0;a.dispatchEvent(rd,tn,tn)}}}},{key:"detach",value:function(a){var s,m;if(a.parentNode){var D=a.transformable,L=a.parentNode,V=L.sortable;(V!=null&&(s=V.sorted)!==null&&s!==void 0&&s.length||(m=a.style)!==null&&m!==void 0&&m.zIndex)&&(V.dirtyChildren.indexOf(a)===-1&&V.dirtyChildren.push(a),V.dirty=!0,V.dirtyReason=mr.REMOVED);var st=a.parentNode.childNodes.indexOf(a);st>-1&&a.parentNode.childNodes.splice(st,1),D&&this.dirtyWorldTransform(a,D),a.parentNode=null}}},{key:"getLocalPosition",value:function(a){return a.transformable.localPosition}},{key:"getLocalRotation",value:function(a){return a.transformable.localRotation}},{key:"getLocalScale",value:function(a){return a.transformable.localScale}},{key:"getLocalSkew",value:function(a){return a.transformable.localSkew}},{key:"getLocalTransform",value:function(a){var s=a.transformable;return pi(s),s.localTransform}},{key:"setLocalPosition",value:function(a,s){var m,D=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,L=a.transformable;Js[0]=s[0],Js[1]=s[1],Js[2]=(m=s[2])!==null&&m!==void 0?m:0,!x.fS(L.localPosition,Js)&&(x.JG(L.localPosition,Js),D&&this.dirtyLocalTransform(a,L))}},{key:"translateLocal",value:function(a,s){var m=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0,D=arguments.length>3&&arguments[3]!==void 0?arguments[3]:0;typeof s=="number"&&(s=x.al(s,m,D));var L=a.transformable;x.fS(s,yl)||(x.VC(s,s,L.localRotation),x.IH(L.localPosition,L.localPosition,s),this.dirtyLocalTransform(a,L))}},{key:"setLocalRotation",value:function(a,s,m,D,L){var V=arguments.length>5&&arguments[5]!==void 0?arguments[5]:!0;typeof s=="number"&&(s=tt.t8(Ms,s,m,D,L));var st=a.transformable;tt.JG(st.localRotation,s),V&&this.dirtyLocalTransform(a,st)}},{key:"rotateLocal",value:function(a,s){var m=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0,D=arguments.length>3&&arguments[3]!==void 0?arguments[3]:0;typeof s=="number"&&(s=x.al(s,m,D));var L=a.transformable;tt.Su(Fc,s[0],s[1],s[2]),tt.dC(L.localRotation,L.localRotation,Fc),this.dirtyLocalTransform(a,L)}},{key:"setLocalScale",value:function(a,s){var m,D=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,L=a.transformable;x.t8(ms,s[0],s[1],(m=s[2])!==null&&m!==void 0?m:L.localScale[2]),!x.fS(ms,L.localScale)&&(x.JG(L.localScale,ms),D&&this.dirtyLocalTransform(a,L))}},{key:"scaleLocal",value:function(a,s){var m,D=a.transformable;x.Jp(D.localScale,D.localScale,x.t8(ms,s[0],s[1],(m=s[2])!==null&&m!==void 0?m:1)),this.dirtyLocalTransform(a,D)}},{key:"setLocalSkew",value:function(a,s,m){var D=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!0;typeof s=="number"&&(s=Ct.t8(od,s,m));var L=a.transformable;Ct.JG(L.localSkew,s),D&&this.dirtyLocalTransform(a,L)}},{key:"setLocalEulerAngles",value:function(a,s){var m=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0,D=arguments.length>3&&arguments[3]!==void 0?arguments[3]:0,L=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!0;typeof s=="number"&&(s=x.al(s,m,D));var V=a.transformable;tt.Su(V.localRotation,s[0],s[1],s[2]),L&&this.dirtyLocalTransform(a,V)}},{key:"setLocalTransform",value:function(a,s){var m=N.getTranslation(ld,s),D=N.getRotation(cd,s),L=N.getScaling(ud,s);this.setLocalScale(a,L,!1),this.setLocalPosition(a,m,!1),this.setLocalRotation(a,D,void 0,void 0,void 0,!1),this.dirtyLocalTransform(a,a.transformable)}},{key:"resetLocalTransform",value:function(a){this.setLocalScale(a,id,!1),this.setLocalPosition(a,yl,!1),this.setLocalEulerAngles(a,yl,void 0,void 0,!1),this.setLocalSkew(a,Zc,void 0,!1),this.dirtyLocalTransform(a,a.transformable)}},{key:"getPosition",value:function(a){var s=a.transformable;return N.getTranslation(s.position,this.getWorldTransform(a,s))}},{key:"getRotation",value:function(a){var s=a.transformable;return N.getRotation(s.rotation,this.getWorldTransform(a,s))}},{key:"getScale",value:function(a){var s=a.transformable;return N.getScaling(s.scaling,this.getWorldTransform(a,s))}},{key:"getOrigin",value:function(a){return a.getGeometryBounds(),a.transformable.origin}},{key:"getWorldTransform",value:function(a){var s=arguments.length>1&&arguments[1]!==void 0?arguments[1]:a.transformable;return!s.localDirtyFlag&&!s.dirtyFlag||(a.parentNode&&a.parentNode.transformable&&this.getWorldTransform(a.parentNode),this.internalUpdateTransform(a)),s.worldTransform}},{key:"setPosition",value:function(a,s){var m,D=a.transformable;if(Cs[0]=s[0],Cs[1]=s[1],Cs[2]=(m=s[2])!==null&&m!==void 0?m:0,!x.fS(this.getPosition(a),Cs)){if(x.JG(D.position,Cs),a.parentNode===null||!a.parentNode.transformable)x.JG(D.localPosition,Cs);else{var L=a.parentNode.transformable;N.copy(qs,L.worldTransform),N.invert(qs,qs),x.fF(D.localPosition,Cs,qs)}this.dirtyLocalTransform(a,D)}}},{key:"translate",value:function(a,s){var m=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0,D=arguments.length>3&&arguments[3]!==void 0?arguments[3]:0;typeof s=="number"&&(s=x.t8(ms,s,m,D)),!x.fS(s,yl)&&(x.IH(ms,this.getPosition(a),s),this.setPosition(a,ms))}},{key:"setRotation",value:function(a,s,m,D,L){var V=a.transformable;if(typeof s=="number"&&(s=tt.al(s,m,D,L)),a.parentNode===null||!a.parentNode.transformable)this.setLocalRotation(a,s);else{var st=this.getRotation(a.parentNode);tt.JG(Ms,st),tt.U_(Ms,Ms),tt.Jp(V.localRotation,Ms,s),tt.Fv(V.localRotation,V.localRotation),this.dirtyLocalTransform(a,V)}}},{key:"rotate",value:function(a,s){var m=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0,D=arguments.length>3&&arguments[3]!==void 0?arguments[3]:0;typeof s=="number"&&(s=x.al(s,m,D));var L=a.transformable;if(a.parentNode===null||!a.parentNode.transformable)this.rotateLocal(a,s);else{var V=Ms;tt.Su(V,s[0],s[1],s[2]);var st=this.getRotation(a),Lt=this.getRotation(a.parentNode);tt.JG(bl,Lt),tt.U_(bl,bl),tt.Jp(V,bl,V),tt.Jp(L.localRotation,V,st),tt.Fv(L.localRotation,L.localRotation),this.dirtyLocalTransform(a,L)}}},{key:"setOrigin",value:function(a,s){var m=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0,D=arguments.length>3&&arguments[3]!==void 0?arguments[3]:0;typeof s=="number"&&(s=[s,m,D]);var L=a.transformable;if(!(s[0]===L.origin[0]&&s[1]===L.origin[1]&&s[2]===L.origin[2])){var V=L.origin;V[0]=s[0],V[1]=s[1],V[2]=s[2]||0,this.dirtyLocalTransform(a,L)}}},{key:"setEulerAngles",value:function(a,s){var m=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0,D=arguments.length>3&&arguments[3]!==void 0?arguments[3]:0;typeof s=="number"&&(s=x.al(s,m,D));var L=a.transformable;if(a.parentNode===null||!a.parentNode.transformable)this.setLocalEulerAngles(a,s);else{tt.Su(L.localRotation,s[0],s[1],s[2]);var V=this.getRotation(a.parentNode);tt.JG(rc,tt.U_(Ms,V)),tt.dC(L.localRotation,L.localRotation,rc),this.dirtyLocalTransform(a,L)}}},{key:"getGeometryBounds",value:function(a){var s=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,m=a,D=m.geometry;D.dirty&&rr.styleValueRegistry.updateGeometry(a);var L=s?D.renderBounds:D.contentBounds||null;return L||new H}},{key:"getTransformedGeometryBounds",value:function(a){var s=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,m=arguments.length>2?arguments[2]:void 0,D=this.getGeometryBounds(a,s);if(!H.isEmpty(D)){var L=m||new H;return L.setFromTransformedAABB(D,this.getWorldTransform(a)),L}return null}},{key:"getBounds",value:function(a){var s=this,m=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,D=a,L=D.renderable;if(!L.boundsDirty&&!m&&L.bounds)return L.bounds;if(!L.renderBoundsDirty&&m&&L.renderBounds)return L.renderBounds;var V=m?L.renderBounds:L.bounds,st=this.getTransformedGeometryBounds(a,m,V),Lt=a.childNodes;if(Lt.forEach(function(je){var qe=s.getBounds(je,m);qe&&(st?st.add(qe):(st=V||new H,st.update(qe.center,qe.halfExtents)))}),st||(st=new H),m){var he=gs(a);if(he){var Te=he.parsedStyle.clipPath.getBounds(m);st?Te&&(st=Te.intersection(st)):st.update(Te.center,Te.halfExtents)}}return m?(L.renderBounds=st,L.renderBoundsDirty=!1):(L.bounds=st,L.boundsDirty=!1),st}},{key:"getLocalBounds",value:function(a){if(a.parentNode){var s=ad;a.parentNode.transformable&&(s=N.invert(sd,this.getWorldTransform(a.parentNode)));var m=this.getBounds(a);if(!H.isEmpty(m)){var D=new H;return D.setFromTransformedAABB(m,s),D}}return this.getBounds(a)}},{key:"getBoundingClientRect",value:function(a){var s,m,D=this.getGeometryBounds(a);H.isEmpty(D)||(m=new H,m.setFromTransformedAABB(D,this.getWorldTransform(a)));var L=(s=a.ownerDocument)===null||s===void 0||(s=s.defaultView)===null||s===void 0?void 0:s.getContextService().getBoundingClientRect();if(m){var V=m.getMin(),st=(0,b.Z)(V,2),Lt=st[0],he=st[1],Te=m.getMax(),je=(0,b.Z)(Te,2),qe=je[0],tn=je[1];return new G(Lt+((L==null?void 0:L.left)||0),he+((L==null?void 0:L.top)||0),qe-Lt,tn-he)}return new G((L==null?void 0:L.left)||0,(L==null?void 0:L.top)||0,0,0)}},{key:"internalUpdateTransform",value:function(a){var s,m=(s=a.parentNode)===null||s===void 0?void 0:s.transformable;pi(a.transformable),Wi(a.transformable,m)}},{key:"internalUpdateElement",value:function(a,s){var m,D,L,V,st=((m=a.ownerDocument)===null||m===void 0||(m=m.defaultView)===null||m===void 0||(m=m.getConfig())===null||m===void 0||(m=m.future)===null||m===void 0?void 0:m.experimentalAttributeUpdateOptimization)===!0,Lt=s[s.length-1],he=(Lt==null?void 0:Lt.transformDirty)||((D=a.transformable)===null||D===void 0?void 0:D.localDirtyFlag);if(a.transformable){var Te;(Te=a.transformable).dirtyFlag||(Te.dirtyFlag=he)}if(this.internalUpdateTransform(a),he){var je;(je=a.dirty)===null||je===void 0||je.call(a,!0,!0)}var qe=((L=a.renderable)===null||L===void 0?void 0:L.boundsDirty)||((V=a.renderable)===null||V===void 0?void 0:V.renderBoundsDirty);if((he||qe)&&(Lt==null?void 0:Lt.shapeUpdated)===!1&&st)for(var tn=s.length-1;tn>=0;){var fn,gn,yn=s[tn];if(yn.shapeUpdated)break;(fn=(gn=yn.node).dirty)===null||fn===void 0||fn.call(gn,!0,!0),yn.shapeUpdated=!0,tn-=1}return he}},{key:"syncHierarchy",value:function(a){for(var s,m,D=[a],L=a.parentNode?[{node:a.parentNode,transformDirty:((s=a.parentNode.transformable)===null||s===void 0?void 0:s.localDirtyFlag)||((m=a.parentNode.transformable)===null||m===void 0?void 0:m.dirtyFlag),shapeUpdated:!1}]:[];D.length>0;){for(var V=D.pop(),st=L[L.length-1];L.length>0&&V.parentNode!==st.node;)st=L.pop();var Lt=this.internalUpdateElement(V,L);if(V.childNodes.length>0){for(var he=V.childNodes.length-1;he>=0;he--)D.push(V.childNodes[he]);L.push({node:V,transformDirty:Lt,shapeUpdated:!1})}}}},{key:"dirtyLocalTransform",value:function(a,s){cl(a)||s.localDirtyFlag||(s.localDirtyFlag=!0,s.dirtyFlag||this.dirtyWorldTransform(a,s))}},{key:"dirtyWorldTransform",value:function(a,s){this.dirtyWorldInternal(a,s),this.dirtyToRoot(a,!0)}},{key:"dirtyWorldInternal",value:function(a,s){var m,D=this,L=((m=a.ownerDocument)===null||m===void 0||(m=m.defaultView)===null||m===void 0||(m=m.getConfig())===null||m===void 0||(m=m.future)===null||m===void 0?void 0:m.experimentalAttributeUpdateOptimization)===!0;s.dirtyFlag||(s.dirtyFlag=!0,a.dirty(!0,!0),L||a.childNodes.forEach(function(V){var st=V.transformable;D.dirtyWorldInternal(V,st)}))}},{key:"dirtyToRoot",value:function(a){for(var s,m=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,D=a,L=((s=a.ownerDocument)===null||s===void 0||(s=s.defaultView)===null||s===void 0||(s=s.getConfig())===null||s===void 0||(s=s.future)===null||s===void 0?void 0:s.experimentalAttributeUpdateOptimization)===!0;D;){var V,st;if((V=(st=D).dirty)===null||V===void 0||V.call(st,!0,!0),L)break;D=D.parentNode}m&&a.forEach(function(Te){var je;(je=Te.dirty)===null||je===void 0||je.call(Te,!0,!0)}),this.informDependentDisplayObjects(a);var Lt=a.mutations||[],he=Lt.find(function(Te){return Te.type==="attributes"&&Te._boundsChangeData});he?he._boundsChangeData={affectChildren:he._boundsChangeData.affectChildren||m}:(he={type:"attributes",target:a,_boundsChangeData:{affectChildren:m}},Lt.push(he)),a.mutations=Lt}},{key:"dirtyFragment",value:function(a){var s,m,D=a.transformable;D&&(D.dirtyFlag=!0,D.localDirtyFlag=!0),(s=(m=a).dirty)===null||s===void 0||s.call(m,!0,!0);for(var L=a.childNodes.length,V=0;V<L;V++)this.dirtyFragment(a.childNodes[V])}},{key:"notifyMutationObservers",value:function(a){var s=new Set;if(a.getRoot().forEach(function(D){(D.mutations||[]).forEach(function(L){L.type==="attributes"&&L._boundsChangeData&&(L._boundsChangeData.affectChildren?D.forEach(function(V){var st=(0,l.Z)({},L);st.target=V,s.add(st)}):s.add(L))}),D.mutations=void 0}),s.size>0){var m=new ao(Ha.BOUNDS_CHANGED,{detail:Array.from(s)});a.dispatchEvent(m,!0,!0)}}},{key:"updateDisplayObjectDependency",value:function(a,s,m,D){if(s&&s!==m){var L=this.displayObjectDependencyMap.get(s);if(L&&L[a]){var V=L[a].indexOf(D);L[a].splice(V,1)}}if(m){var st=this.displayObjectDependencyMap.get(m);st||(this.displayObjectDependencyMap.set(m,{}),st=this.displayObjectDependencyMap.get(m)),st[a]||(st[a]=[]),st[a].push(D)}}},{key:"informDependentDisplayObjects",value:function(a){var s,m=this,D=this.displayObjectDependencyMap.get(a);if(D){var L=(s=a.ownerDocument)===null||s===void 0||(s=s.defaultView)===null||s===void 0||(s=s.getConfig())===null||s===void 0||(s=s.future)===null||s===void 0?void 0:s.experimentalCancelEventPropagation;Object.keys(D).forEach(function(V){D[V].forEach(function(st){m.dirtyToRoot(st,!0),st.dispatchEvent(new Fo(Ha.ATTR_MODIFIED,st,m,m,V,Fo.MODIFICATION,m,m),L,L),st.isCustomElement&&st.isConnected&&st.attributeChangedCallback&&st.attributeChangedCallback(V,m,m)})})}}}])}(),Bc=function(){function h(p){if((0,R.Z)(this,h),p<=0)throw new Error("LRU capacity must be a positive number.");this.capacity=p,this.cache=new Map}return(0,O.Z)(h,[{key:"get",value:function(a){if(this.cache.has(a)){var s=this.cache.get(a);return this.cache.delete(a),this.cache.set(a,s),s}}},{key:"put",value:function(a,s){if(this.cache.has(a)&&this.cache.delete(a),this.cache.set(a,s),this.cache.size>this.capacity){var m=this.cache.keys().next().value;this.cache.delete(m)}}},{key:"len",value:function(){return this.cache.size}},{key:"clear",value:function(){this.cache.clear()}}])}(),Os={MetricsString:"|\xC9q\xC5",BaselineSymbol:"M",BaselineMultiplier:1.4,HeightMultiplier:2,Newlines:[10,13],BreakingSpaces:[9,32,8192,8193,8194,8195,8196,8197,8198,8200,8201,8202,8287,12288]},zc=/[a-zA-Z0-9\u00C0-\u00D6\u00D8-\u00f6\u00f8-\u00ff!"#$%&'()*+,-./:;]/,jc=/[!%),.:;?\]}¢°·'""†‡›℃∶、。〃〆〕〗〞﹚﹜!"%'),.:;?!]}~]/,fd=/[$(£¥·'"〈《「『【〔〖〝﹙﹛$(.[{£¥]/,$c=/[!),.:;?\]}¢·–—'"•"、。〆〞〕〉》」︰︱︲︳﹐﹑﹒﹔﹕﹖﹘﹚﹜!),.:;?︶︸︺︼︾﹀﹂﹗]|}、]/,hd=/[([{£¥'"‵〈《「『〔〝︴﹙﹛({︵︷︹︻︽︿﹁﹃﹏]/,vd=/[)\]}〕〉》」』】〙〗〟'"⦆»ヽヾーァィゥェォッャュョヮヵヶぁぃぅぇぉっゃゅょゎゕゖㇰㇱㇲㇳㇴㇵㇶㇷㇸㇹㇺㇻㇼㇽㇾㇿ々〻‐゠–〜?!‼⁇⁈⁉・、:;,。.]/,gd=/[([{〔〈《「『【〘〖〝'"⦅«—...‥〳〴〵]/,Wc=/[!%),.:;?\]}¢°'"†‡℃〆〈《「『〕!%),.:;?]}]/,Gc=/[$([{£¥'"々〇〉》」〔$([{⦆¥₩#]/,ic=new RegExp("".concat(jc.source,"|").concat($c.source,"|").concat(vd.source,"|").concat(Wc.source)),pd=new RegExp("".concat(fd.source,"|").concat(hd.source,"|").concat(gd.source,"|").concat(Gc.source)),md=function(){function h(p){var a=this;(0,R.Z)(this,h),this.fontMetricsCache={},this.shouldBreakByKinsokuShorui=function(s,m){return a.isBreakingSpace(m)?!1:!!(s&&(pd.exec(m)||ic.exec(s)))},this.trimByKinsokuShorui=function(s){var m=(0,_.Z)(s),D=m[m.length-2];if(!D)return s;var L=D[D.length-1];return m[m.length-2]=D.slice(0,-1),m[m.length-1]=L+m[m.length-1],m},this.runtime=p,this.charWidthCache=new Bc(100)}return(0,O.Z)(h,[{key:"measureFont",value:function(a,s){if(this.fontMetricsCache[a])return this.fontMetricsCache[a];var m={ascent:0,descent:0,fontSize:0},D=this.runtime.offscreenCanvasCreator.getOrCreateCanvas(s),L=this.runtime.offscreenCanvasCreator.getOrCreateContext(s,{willReadFrequently:!0});L.font=a;var V=Os.MetricsString+Os.BaselineSymbol,st=Math.ceil(L.measureText(V).width),Lt=Math.ceil(L.measureText(Os.BaselineSymbol).width),he=Os.HeightMultiplier*Lt;Lt=Lt*Os.BaselineMultiplier|0,D.width=st,D.height=he,L.fillStyle="#f00",L.fillRect(0,0,st,he),L.font=a,L.textBaseline="alphabetic",L.fillStyle="#000",L.fillText(V,0,Lt);var Te=L.getImageData(0,0,st||1,he||1).data,je=Te.length,qe=st*4,tn=0,fn=0,gn=!1;for(tn=0;tn<Lt;++tn){for(var yn=0;yn<qe;yn+=4)if(Te[fn+yn]!==255){gn=!0;break}if(!gn)fn+=qe;else break}for(m.ascent=Lt-tn,fn=je-qe,gn=!1,tn=he;tn>Lt;--tn){for(var pn=0;pn<qe;pn+=4)if(Te[fn+pn]!==255){gn=!0;break}if(!gn)fn-=qe;else break}return m.descent=tn-Lt,m.fontSize=m.ascent+m.descent,this.fontMetricsCache[a]=m,m}},{key:"measureText",value:function(a,s,m){var D=s.fontSize,L=D===void 0?16:D,V=s.wordWrap,st=V===void 0?!1:V,Lt=s.lineHeight,he=s.lineWidth,Te=he===void 0?1:he,je=s.textBaseline,qe=je===void 0?"alphabetic":je,tn=s.textAlign,fn=tn===void 0?"start":tn,gn=s.letterSpacing,yn=gn===void 0?0:gn,pn=s.textPath;s.textPathSide,s.textPathStartOffset;var Rn=s.leading,Qn=Rn===void 0?0:Rn,vr=Pc(s),wr=this.measureFont(vr,m);wr.fontSize===0&&(wr.fontSize=L,wr.ascent=L);var Pr=this.runtime.offscreenCanvasCreator.getOrCreateContext(m);Pr.font=vr,s.isOverflowing=!1;var Ur=st?this.wordWrap(a,s,m):a,Gr=Ur.split(/(?:\r\n|\r|\n)/),_r=new Array(Gr.length),Ar=0;if(pn){pn.getTotalLength();for(var jr=0;jr<Gr.length;jr++)Pr.measureText(Gr[jr]).width+(Gr[jr].length-1)*yn}else{for(var oi=0;oi<Gr.length;oi++){var Xi=Pr.measureText(Gr[oi]).width+(Gr[oi].length-1)*yn;_r[oi]=Xi,Ar=Math.max(Ar,Xi)}var la=Ar+Te,ca=Lt||wr.fontSize+Te,Br=Math.max(ca,wr.fontSize+Te)+(Gr.length-1)*(ca+Qn);ca+=Qn;var wi=0;return qe==="middle"?wi=-Br/2:qe==="bottom"||qe==="alphabetic"||qe==="ideographic"?wi=-Br:(qe==="top"||qe==="hanging")&&(wi=0),{font:vr,width:la,height:Br,lines:Gr,lineWidths:_r,lineHeight:ca,maxLineWidth:Ar,fontProperties:wr,lineMetrics:_r.map(function(Ai,Pa){var Ya=0;return fn==="center"||fn==="middle"?Ya-=Ai/2:(fn==="right"||fn==="end")&&(Ya-=Ai),new G(Ya-Te/2,wi+Pa*ca,Ai+Te,ca)})}}}},{key:"wordWrap",value:function(a,s,m){var D=this,L=Array.from(a);if(L.length===0)return"";var V=this,st=s.wordWrapWidth,Lt=st===void 0?0:st,he=s.letterSpacing,Te=he===void 0?0:he,je=s.maxLines,qe=je===void 0?1/0:je,tn=s.textOverflow,fn=this.runtime.offscreenCanvasCreator.getOrCreateContext(m),gn=Lt+Te,yn="";tn==="ellipsis"?yn="...":tn&&tn!=="clip"&&(yn=tn);var pn=[""],Rn=0,Qn=0,vr=-1,wr=Pc(s),Pr=this.charWidthCache.get(wr);Pr||(Pr=new Bc(500),this.charWidthCache.put(wr,Pr));var Ur=function(Ai){return D.getFromCache(Ai,Te,Pr,fn)},Gr=Ur(yn);function _r(wi,Ai,Pa,Ya){for(;Ur(wi)<Ya&&Ai<L.length-1&&!V.isNewline(L[Ai+1]);)Ai+=1,wi+=L[Ai];for(;Ur(wi)>Ya&&Ai>=Pa;)Ai-=1,wi=wi.slice(0,-1);return{lineTxt:wi,txtLastCharIndex:Ai}}function Ar(wi,Ai){if(!(Gr<=0||Gr>gn)){if(!pn[wi]){pn[wi]=yn;return}var Pa=_r(pn[wi],Ai,vr+1,gn-Gr);pn[wi]=Pa.lineTxt+yn}}for(var jr=0;jr<L.length;jr++){var oi=L[jr],Xi=L[jr-1],la=L[jr+1],ca=Ur(oi);if(this.isNewline(oi)){if(Rn+1>=qe){jr<L.length-1&&Ar(Rn,jr-1),s.isOverflowing=!0;break}vr=jr-1,Rn+=1,Qn=0,pn[Rn]="";continue}if(ca>gn){Ar(Rn,jr-1),s.isOverflowing=!0;break}if(Qn>0&&Qn+ca>gn){var Br=_r(pn[Rn],jr-1,vr+1,gn);if(Br.txtLastCharIndex!==jr-1){if(pn[Rn]=Br.lineTxt,Br.txtLastCharIndex===L.length-1)break;jr=Br.txtLastCharIndex+1,oi=L[jr],Xi=L[jr-1],la=L[jr+1],ca=Ur(oi)}if(Rn+1>=qe){Ar(Rn,jr-1),s.isOverflowing=!0;break}if(vr=jr-1,Rn+=1,Qn=0,pn[Rn]="",this.isBreakingSpace(oi))continue;this.canBreakInLastChar(oi)||(pn=this.trimToBreakable(pn),Qn=this.sumTextWidthByCache(pn[Rn]||"",Ur)),this.shouldBreakByKinsokuShorui(oi,la)&&(pn=this.trimByKinsokuShorui(pn),Qn+=Ur(Xi||""))}Qn+=ca,pn[Rn]+=oi}return pn.join(`
|
|
|
`)}},{key:"isBreakingSpace",value:function(a){return typeof a!="string"?!1:Os.BreakingSpaces.indexOf(a.charCodeAt(0))>=0}},{key:"isNewline",value:function(a){return typeof a!="string"?!1:Os.Newlines.indexOf(a.charCodeAt(0))>=0}},{key:"trimToBreakable",value:function(a){var s=(0,_.Z)(a),m=s[s.length-2],D=this.findBreakableIndex(m);if(D===-1||!m)return s;var L=m.slice(D,D+1),V=this.isBreakingSpace(L),st=D+1,Lt=D+(V?0:1);return s[s.length-1]+=m.slice(st,m.length),s[s.length-2]=m.slice(0,Lt),s}},{key:"canBreakInLastChar",value:function(a){return!(a&&zc.test(a))}},{key:"sumTextWidthByCache",value:function(a,s){return a.split("").reduce(function(m,D){return m+s(D)},0)}},{key:"findBreakableIndex",value:function(a){for(var s=a.length-1;s>=0;s--)if(!zc.test(a[s]))return s;return-1}},{key:"getFromCache",value:function(a,s,m,D){var L=m.get(a);if(typeof L!="number"){var V=a.length*s,st=D.measureText(a);L=st.width+V,m.put(a,L)}return L}},{key:"clearCache",value:function(){this.fontMetricsCache={},this.charWidthCache.clear()}}])}(),rr={},yd=function(h){var p=new nf,a=new ef;return h={},(0,Bn.Z)((0,Bn.Z)((0,Bn.Z)((0,Bn.Z)((0,Bn.Z)((0,Bn.Z)((0,Bn.Z)((0,Bn.Z)((0,Bn.Z)((0,Bn.Z)(h,Jn.FRAGMENT,null),Jn.CIRCLE,new Ls),Jn.ELLIPSE,new qu),Jn.RECT,p),Jn.IMAGE,p),Jn.GROUP,new Ks),Jn.LINE,new Rc),Jn.TEXT,new Dc(rr)),Jn.POLYLINE,a),Jn.POLYGON,a),(0,Bn.Z)((0,Bn.Z)((0,Bn.Z)(h,Jn.PATH,new Ic),Jn.HTML,new td),Jn.MESH,null)}(),Vc=function(h){var p=new So,a=new ls;return h={},(0,Bn.Z)((0,Bn.Z)((0,Bn.Z)((0,Bn.Z)((0,Bn.Z)((0,Bn.Z)((0,Bn.Z)((0,Bn.Z)((0,Bn.Z)((0,Bn.Z)(h,Hn.PERCENTAGE,null),Hn.NUMBER,new al),Hn.ANGLE,new ro),Hn.DEFINED_PATH,new io),Hn.PAINT,p),Hn.COLOR,p),Hn.FILTER,new jo),Hn.LENGTH,a),Hn.LENGTH_PERCENTAGE,a),Hn.LENGTH_PERCENTAGE_12,new $s),(0,Bn.Z)((0,Bn.Z)((0,Bn.Z)((0,Bn.Z)((0,Bn.Z)((0,Bn.Z)((0,Bn.Z)((0,Bn.Z)((0,Bn.Z)((0,Bn.Z)(h,Hn.LENGTH_PERCENTAGE_14,new il),Hn.COORDINATE,new ls),Hn.OFFSET_DISTANCE,new Hl),Hn.OPACITY_VALUE,new Yl),Hn.PATH,new Mc),Hn.LIST_OF_POINTS,new Is),Hn.SHADOW_BLUR,new $o),Hn.TEXT,new vs),Hn.TEXT_TRANSFORM,new oa),Hn.TRANSFORM,new Xu),(0,Bn.Z)((0,Bn.Z)((0,Bn.Z)(h,Hn.TRANSFORM_ORIGIN,new Qu),Hn.Z_INDEX,new Ju),Hn.MARKER,new Ws)}(),Uc=function(){return typeof globalThis!="undefined"?globalThis:typeof self!="undefined"?self:typeof window!="undefined"?window:typeof d.g!="undefined"?d.g:{}};rr.CameraContribution=zr,rr.AnimationTimeline=null,rr.EasingFunction=null,rr.offscreenCanvasCreator=new kc,rr.sceneGraphSelector=new nc,rr.sceneGraphService=new dd(rr),rr.textService=new md(rr),rr.geometryUpdaterFactory=yd,rr.CSSPropertySyntaxFactory=Vc,rr.styleValueRegistry=new Va(rr),rr.layoutRegistry=null,rr.globalThis=Uc(),rr.enableStyleSyntax=!0,rr.enableSizeAttenuation=!1;var Hc=0;function bd(){Hc=0}var ac=new Fo(Ha.INSERTED,null,"","","",0,"",""),El=new Fo(Ha.REMOVED,null,"","","",0,"",""),oc=new ao(Ha.DESTROY),Ed=function(h){function p(){var a;(0,R.Z)(this,p);for(var s=arguments.length,m=new Array(s),D=0;D<s;D++)m[D]=arguments[D];return a=(0,g.Z)(this,p,[].concat(m)),a.entity=Hc++,a.transformable={dirtyFlag:!1,localDirtyFlag:!1,localPosition:[0,0,0],localRotation:[0,0,0,1],localScale:[1,1,1],localTransform:[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1],localSkew:[0,0],position:[0,0,0],rotation:[0,0,0,1],scaling:[1,1,1],worldTransform:[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1],origin:[0,0,0]},a.renderable={bounds:void 0,boundsDirty:!0,renderBounds:void 0,renderBoundsDirty:!0,dirtyRenderBounds:void 0,dirty:!1},a.geometry={contentBounds:void 0,renderBounds:void 0,dirty:!0},a.cullable={strategy:Er.Standard,visibilityPlaneMask:-1,visible:!0,enable:!0},a.sortable={dirty:!1,sorted:void 0,renderOrder:0,dirtyChildren:[],dirtyReason:void 0},a.rBushNode={aabb:void 0},a.namespaceURI="g",a.scrollLeft=0,a.scrollTop=0,a.clientTop=0,a.clientLeft=0,a.style={},a.computedStyle={},a.parsedStyle={},a.attributes={},a}return(0,P.Z)(p,h),(0,O.Z)(p,[{key:"dirty",value:function(){var s=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0,m=arguments.length>1?arguments[1]:void 0;this.renderable.dirty=s,m!==void 0&&(this.renderable.boundsDirty=m,this.renderable.renderBoundsDirty=m,this.geometry.dirty=m)}},{key:"className",get:function(){return this.getAttribute("class")||""},set:function(s){this.setAttribute("class",s)}},{key:"classList",get:function(){return this.className.split(" ").filter(function(s){return s!==""})}},{key:"tagName",get:function(){return this.nodeName}},{key:"children",get:function(){return this.childNodes}},{key:"childElementCount",get:function(){return this.childNodes.length}},{key:"firstElementChild",get:function(){return this.firstChild}},{key:"lastElementChild",get:function(){return this.lastChild}},{key:"parentElement",get:function(){return this.parentNode}},{key:"nextSibling",get:function(){if(this.parentNode){var s=this.parentNode.childNodes.indexOf(this);return this.parentNode.childNodes[s+1]||null}return null}},{key:"previousSibling",get:function(){if(this.parentNode){var s=this.parentNode.childNodes.indexOf(this);return this.parentNode.childNodes[s-1]||null}return null}},{key:"cloneNode",value:function(s){throw new Error(J)}},{key:"appendChild",value:function(s,m){var D;if(s.destroyed)throw new Error(Kt);return rr.sceneGraphService.attach(s,this,m),(D=this.ownerDocument)!==null&&D!==void 0&&D.defaultView&&(!cl(this)&&s.nodeName===Jn.FRAGMENT?this.ownerDocument.defaultView.mountFragment(s):this.ownerDocument.defaultView.mountChildren(s)),this.isMutationObserved&&(ac.relatedNode=this,s.dispatchEvent(ac)),s}},{key:"insertBefore",value:function(s,m){if(!m)this.appendChild(s);else{s.parentElement&&s.parentElement.removeChild(s);var D=this.childNodes.indexOf(m);D===-1?this.appendChild(s):this.appendChild(s,D)}return s}},{key:"replaceChild",value:function(s,m){var D=this.childNodes.indexOf(m);return this.removeChild(m),this.appendChild(s,D),m}},{key:"removeChild",value:function(s){var m,D,L=((m=this.ownerDocument)===null||m===void 0||(m=m.defaultView)===null||m===void 0||(m=m.getConfig().future)===null||m===void 0?void 0:m.experimentalCancelEventPropagation)===!0;return El.relatedNode=this,s.dispatchEvent(El,L,L),(D=s.ownerDocument)!==null&&D!==void 0&&D.defaultView&&s.ownerDocument.defaultView.unmountChildren(s),rr.sceneGraphService.detach(s),s}},{key:"removeChildren",value:function(){for(var s=this.childNodes.length-1;s>=0;s--){var m=this.childNodes[s];this.removeChild(m)}}},{key:"destroyChildren",value:function(){for(var s=this.childNodes.length-1;s>=0;s--){var m=this.childNodes[s];m.childNodes.length>0&&m.destroyChildren(),m.destroy()}}},{key:"matches",value:function(s){return rr.sceneGraphService.matches(s,this)}},{key:"getElementById",value:function(s){return rr.sceneGraphService.querySelector("#".concat(s),this)}},{key:"getElementsByName",value:function(s){return rr.sceneGraphService.querySelectorAll('[name="'.concat(s,'"]'),this)}},{key:"getElementsByClassName",value:function(s){return rr.sceneGraphService.querySelectorAll(".".concat(s),this)}},{key:"getElementsByTagName",value:function(s){return rr.sceneGraphService.querySelectorAll(s,this)}},{key:"querySelector",value:function(s){return rr.sceneGraphService.querySelector(s,this)}},{key:"querySelectorAll",value:function(s){return rr.sceneGraphService.querySelectorAll(s,this)}},{key:"closest",value:function(s){var m=this;do{if(rr.sceneGraphService.matches(s,m))return m;m=m.parentElement}while(m!==null);return null}},{key:"find",value:function(s){var m=this,D=null;return this.forEach(function(L){return L!==m&&s(L)?(D=L,!1):!0}),D}},{key:"findAll",value:function(s){var m=this,D=[];return this.forEach(function(L){L!==m&&s(L)&&D.push(L)}),D}},{key:"after",value:function(){var s=this;if(this.parentNode){for(var m=this.parentNode.childNodes.indexOf(this),D=arguments.length,L=new Array(D),V=0;V<D;V++)L[V]=arguments[V];L.forEach(function(st,Lt){var he;return(he=s.parentNode)===null||he===void 0?void 0:he.appendChild(st,m+Lt+1)})}}},{key:"before",value:function(){if(this.parentNode){for(var s,m=this.parentNode.childNodes.indexOf(this),D=arguments.length,L=new Array(D),V=0;V<D;V++)L[V]=arguments[V];var st=L[0],Lt=(0,Xr.Z)(L).slice(1);this.parentNode.appendChild(st,m),(s=st).after.apply(s,(0,_.Z)(Lt))}}},{key:"replaceWith",value:function(){this.after.apply(this,arguments),this.remove()}},{key:"append",value:function(){for(var s=this,m=arguments.length,D=new Array(m),L=0;L<m;L++)D[L]=arguments[L];D.forEach(function(V){return s.appendChild(V)})}},{key:"prepend",value:function(){for(var s=this,m=arguments.length,D=new Array(m),L=0;L<m;L++)D[L]=arguments[L];D.forEach(function(V,st){return s.appendChild(V,st)})}},{key:"replaceChildren",value:function(){for(;this.childNodes.length&&this.firstChild;)this.removeChild(this.firstChild);this.append.apply(this,arguments)}},{key:"remove",value:function(){return this.parentNode?this.parentNode.removeChild(this):this}},{key:"destroy",value:function(){var s,m=((s=this.ownerDocument)===null||s===void 0||(s=s.defaultView)===null||s===void 0||(s=s.getConfig().future)===null||s===void 0?void 0:s.experimentalCancelEventPropagation)===!0;this.destroyChildren(),this.dispatchEvent(oc,m,m),this.remove(),this.emitter.removeAllListeners(),this.destroyed=!0}},{key:"getGeometryBounds",value:function(){var s=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1;return rr.sceneGraphService.getGeometryBounds(this,s)}},{key:"getTransformedGeometryBounds",value:function(){var s=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1;return rr.sceneGraphService.getTransformedGeometryBounds(this,s)}},{key:"getBounds",value:function(){return rr.sceneGraphService.getBounds(this)}},{key:"getRenderBounds",value:function(){return rr.sceneGraphService.getBounds(this,!0)}},{key:"getLocalBounds",value:function(){return rr.sceneGraphService.getLocalBounds(this)}},{key:"getBoundingClientRect",value:function(){return rr.sceneGraphService.getBoundingClientRect(this)}},{key:"getClientRects",value:function(){return[this.getBoundingClientRect()]}},{key:"computedStyleMap",value:function(){return new Map(Object.entries(this.computedStyle))}},{key:"getAttributeNames",value:function(){return Object.keys(this.attributes)}},{key:"getAttribute",value:function(s){if(typeof s!="symbol"){var m=this.attributes[s];return m}}},{key:"hasAttribute",value:function(s){return this.getAttributeNames().includes(s)}},{key:"hasAttributes",value:function(){return!!this.getAttributeNames().length}},{key:"removeAttribute",value:function(s){this.setAttribute(s,null),delete this.attributes[s]}},{key:"setAttribute",value:function(s,m){this.attributes[s]=m}},{key:"getAttributeNS",value:function(s,m){throw new Error(J)}},{key:"getAttributeNode",value:function(s){throw new Error(J)}},{key:"getAttributeNodeNS",value:function(s,m){throw new Error(J)}},{key:"hasAttributeNS",value:function(s,m){throw new Error(J)}},{key:"removeAttributeNS",value:function(s,m){throw new Error(J)}},{key:"removeAttributeNode",value:function(s){throw new Error(J)}},{key:"setAttributeNS",value:function(s,m,D){throw new Error(J)}},{key:"setAttributeNode",value:function(s){throw new Error(J)}},{key:"setAttributeNodeNS",value:function(s){throw new Error(J)}},{key:"toggleAttribute",value:function(s,m){throw new Error(J)}}])}(wa);function sa(h){return!!(h!=null&&h.nodeName)}var Yc=rr.globalThis.Proxy?rr.globalThis.Proxy:function(){},Wo=new Fo(Ha.ATTR_MODIFIED,null,null,null,null,Fo.MODIFICATION,null,null),xl=x.Ue(),xd=tt.Ue(),pa=function(h){function p(a){var s;return(0,R.Z)(this,p),s=(0,g.Z)(this,p),s.isCustomElement=!1,s.isMutationObserved=!1,s.activeAnimations=[],s.config=a,s.id=a.id||"",s.name=a.name||"",(a.className||a.class)&&(s.className=a.className||a.class),s.nodeName=a.type||Jn.GROUP,a.initialParsedStyle&&Object.assign(s.parsedStyle,a.initialParsedStyle),s.initAttributes(a.style),rr.enableStyleSyntax&&(s.style=new Yc({setProperty:function(D,L){s.setAttribute(D,L)},getPropertyValue:function(D){return s.getAttribute(D)},removeProperty:function(D){s.removeAttribute(D)},item:function(){return""}},{get:function(D,L){return D[L]!==void 0?D[L]:s.getAttribute(L)},set:function(D,L,V){return s.setAttribute(L,V),!0}})),s}return(0,P.Z)(p,h),(0,O.Z)(p,[{key:"destroy",value:function(){di(p,"destroy",this,3)([]),this.getAnimations().forEach(function(s){s.cancel()})}},{key:"cloneNode",value:function(s,m){var D=(0,l.Z)({},this.attributes);for(var L in D){var V=D[L];sa(V)&&L!=="clipPath"&&L!=="offsetPath"&&L!=="textPath"&&(D[L]=V.cloneNode(s)),m&&(D[L]=m(L,V))}var st=new this.constructor((0,l.Z)((0,l.Z)({},this.config),{},{style:D}));return st.setLocalTransform(this.getLocalTransform()),s&&this.children.forEach(function(Lt){if(!Lt.style.isMarker){var he=Lt.cloneNode(s);st.appendChild(he)}}),st}},{key:"initAttributes",value:function(){var s=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},m={forceUpdateGeometry:!0};rr.styleValueRegistry.processProperties(this,s,m),this.dirty()}},{key:"setAttribute",value:function(s,m){var D=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,L=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!0;(0,on.Z)(m)||(D||m!==this.attributes[s])&&(this.internalSetAttribute(s,m,{memoize:L}),di(p,"setAttribute",this,3)([s,m]))}},{key:"internalSetAttribute",value:function(s,m){var D=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},L=this.attributes[s],V=this.parsedStyle[s];rr.styleValueRegistry.processProperties(this,(0,Bn.Z)({},s,m),D),this.dirty();var st=this.parsedStyle[s];if(this.isConnected)if(Wo.relatedNode=this,Wo.prevValue=L,Wo.newValue=m,Wo.attrName=s,Wo.prevParsedValue=V,Wo.newParsedValue=st,this.isMutationObserved)this.dispatchEvent(Wo);else{var Lt,he=((Lt=this.ownerDocument.defaultView.getConfig().future)===null||Lt===void 0?void 0:Lt.experimentalCancelEventPropagation)===!0;Wo.target=this,this.ownerDocument.defaultView.dispatchEvent(Wo,!0,he)}if(this.isCustomElement&&this.isConnected||!this.isCustomElement){var Te,je;(Te=(je=this).attributeChangedCallback)===null||Te===void 0||Te.call(je,s,L,m,V,st)}}},{key:"getBBox",value:function(){var s=this.getBounds(),m=s.getMin(),D=(0,b.Z)(m,2),L=D[0],V=D[1],st=s.getMax(),Lt=(0,b.Z)(st,2),he=Lt[0],Te=Lt[1];return new G(L,V,he-L,Te-V)}},{key:"setOrigin",value:function(s){var m=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,D=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0;return rr.sceneGraphService.setOrigin(this,ct(s,m,D,!1)),this}},{key:"getOrigin",value:function(){return rr.sceneGraphService.getOrigin(this)}},{key:"setPosition",value:function(s){var m=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,D=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0;return rr.sceneGraphService.setPosition(this,ct(s,m,D,!1)),this}},{key:"setLocalPosition",value:function(s){var m=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,D=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0;return rr.sceneGraphService.setLocalPosition(this,ct(s,m,D,!1)),this}},{key:"translate",value:function(s){var m=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,D=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0;return rr.sceneGraphService.translate(this,ct(s,m,D,!1)),this}},{key:"translateLocal",value:function(s){var m=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,D=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0;return rr.sceneGraphService.translateLocal(this,ct(s,m,D,!1)),this}},{key:"getPosition",value:function(){return rr.sceneGraphService.getPosition(this)}},{key:"getLocalPosition",value:function(){return rr.sceneGraphService.getLocalPosition(this)}},{key:"scale",value:function(s,m,D){return this.scaleLocal(s,m,D)}},{key:"scaleLocal",value:function(s,m,D){return typeof s=="number"&&(m=m||s,D=D||s,s=ct(s,m,D,!1)),rr.sceneGraphService.scaleLocal(this,s),this}},{key:"setLocalScale",value:function(s,m,D){return typeof s=="number"&&(m=m||s,D=D||s,s=ct(s,m,D,!1)),rr.sceneGraphService.setLocalScale(this,s),this}},{key:"getLocalScale",value:function(){return rr.sceneGraphService.getLocalScale(this)}},{key:"getScale",value:function(){return rr.sceneGraphService.getScale(this)}},{key:"getEulerAngles",value:function(){var s=un(xl,rr.sceneGraphService.getWorldTransform(this)),m=(0,b.Z)(s,3),D=m[2];return Ht(D)}},{key:"getLocalEulerAngles",value:function(){var s=un(xl,rr.sceneGraphService.getLocalRotation(this)),m=(0,b.Z)(s,3),D=m[2];return Ht(D)}},{key:"setEulerAngles",value:function(s){return rr.sceneGraphService.setEulerAngles(this,0,0,s),this}},{key:"setLocalEulerAngles",value:function(s){return rr.sceneGraphService.setLocalEulerAngles(this,0,0,s),this}},{key:"rotateLocal",value:function(s,m,D){return(0,kt.Z)(m)&&(0,kt.Z)(D)?rr.sceneGraphService.rotateLocal(this,0,0,s):rr.sceneGraphService.rotateLocal(this,s,m,D),this}},{key:"rotate",value:function(s,m,D){return(0,kt.Z)(m)&&(0,kt.Z)(D)?rr.sceneGraphService.rotate(this,0,0,s):rr.sceneGraphService.rotate(this,s,m,D),this}},{key:"setRotation",value:function(s,m,D,L){return rr.sceneGraphService.setRotation(this,s,m,D,L),this}},{key:"setLocalRotation",value:function(s,m,D,L){return rr.sceneGraphService.setLocalRotation(this,s,m,D,L),this}},{key:"setLocalSkew",value:function(s,m){return rr.sceneGraphService.setLocalSkew(this,s,m),this}},{key:"getRotation",value:function(){return rr.sceneGraphService.getRotation(this)}},{key:"getLocalRotation",value:function(){return rr.sceneGraphService.getLocalRotation(this)}},{key:"getLocalSkew",value:function(){return rr.sceneGraphService.getLocalSkew(this)}},{key:"getLocalTransform",value:function(){return rr.sceneGraphService.getLocalTransform(this)}},{key:"getWorldTransform",value:function(){return rr.sceneGraphService.getWorldTransform(this)}},{key:"setLocalTransform",value:function(s){return rr.sceneGraphService.setLocalTransform(this,s),this}},{key:"resetLocalTransform",value:function(){rr.sceneGraphService.resetLocalTransform(this)}},{key:"getAnimations",value:function(){return this.activeAnimations}},{key:"animate",value:function(s,m){var D,L=(D=this.ownerDocument)===null||D===void 0?void 0:D.timeline;return L?L.play(this,s,m):null}},{key:"isVisible",value:function(){var s;return((s=this.parsedStyle)===null||s===void 0?void 0:s.visibility)!=="hidden"}},{key:"interactive",get:function(){return this.isInteractive()},set:function(s){this.style.pointerEvents=s?"auto":"none"}},{key:"isInteractive",value:function(){var s;return((s=this.parsedStyle)===null||s===void 0?void 0:s.pointerEvents)!=="none"}},{key:"isCulled",value:function(){return!!(this.cullable&&this.cullable.enable&&!this.cullable.visible)}},{key:"toFront",value:function(){return this.parentNode&&(this.style.zIndex=Math.max.apply(Math,(0,_.Z)(this.parentNode.children.map(function(s){return Number(s.style.zIndex)})))+1),this}},{key:"toBack",value:function(){return this.parentNode&&(this.style.zIndex=Math.min.apply(Math,(0,_.Z)(this.parentNode.children.map(function(s){return Number(s.style.zIndex)})))-1),this}},{key:"getConfig",value:function(){return this.config}},{key:"attr",value:function(){for(var s=this,m=arguments.length,D=new Array(m),L=0;L<m;L++)D[L]=arguments[L];var V=D[0],st=D[1];return V?(0,En.Z)(V)?(Object.keys(V).forEach(function(Lt){s.setAttribute(Lt,V[Lt])}),this):D.length===2?(this.setAttribute(V,st),this):this.attributes[V]:this.attributes}},{key:"getMatrix",value:function(s){var m=s||this.getWorldTransform(),D=N.getTranslation(xl,m),L=(0,b.Z)(D,2),V=L[0],st=L[1],Lt=N.getScaling(xl,m),he=(0,b.Z)(Lt,2),Te=he[0],je=he[1],qe=N.getRotation(xd,m),tn=un(xl,qe),fn=(0,b.Z)(tn,3),gn=fn[0],yn=fn[2];return mn(gn||yn,V,st,Te,je)}},{key:"getLocalMatrix",value:function(){return this.getMatrix(this.getLocalTransform())}},{key:"setMatrix",value:function(s){var m=Pn(s),D=(0,b.Z)(m,5),L=D[0],V=D[1],st=D[2],Lt=D[3],he=D[4];this.setEulerAngles(he).setPosition(L,V).setLocalScale(st,Lt)}},{key:"setLocalMatrix",value:function(s){var m=Pn(s),D=(0,b.Z)(m,5),L=D[0],V=D[1],st=D[2],Lt=D[3],he=D[4];this.setLocalEulerAngles(he).setLocalPosition(L,V).setLocalScale(st,Lt)}},{key:"show",value:function(){this.forEach(function(s){s.style.visibility="visible"})}},{key:"hide",value:function(){this.forEach(function(s){s.style.visibility="hidden"})}},{key:"getCount",value:function(){return this.childElementCount}},{key:"getParent",value:function(){return this.parentElement}},{key:"getChildren",value:function(){return this.children}},{key:"getFirst",value:function(){return this.firstElementChild}},{key:"getLast",value:function(){return this.lastElementChild}},{key:"getChildByIndex",value:function(s){return this.children[s]||null}},{key:"add",value:function(s,m){return this.appendChild(s,m)}},{key:"set",value:function(s,m){this.config[s]=m}},{key:"get",value:function(s){return this.config[s]}},{key:"moveTo",value:function(s){var m=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,D=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0;return this.setPosition(s,m,D),this}},{key:"move",value:function(s){var m=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,D=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0;return this.setPosition(s,m,D),this}},{key:"setZIndex",value:function(s){return this.style.zIndex=s,this}}])}(Ed);pa.PARSED_STYLE_LIST=new Set(["class","className","clipPath","cursor","display","draggable","droppable","fill","fillOpacity","fillRule","filter","increasedLineWidthForHitTesting","lineCap","lineDash","lineDashOffset","lineJoin","lineWidth","miterLimit","hitArea","offsetDistance","offsetPath","offsetX","offsetY","opacity","pointerEvents","shadowColor","shadowType","shadowBlur","shadowOffsetX","shadowOffsetY","stroke","strokeOpacity","strokeWidth","strokeLinecap","strokeLineJoin","strokeDasharray","strokeDashoffset","transform","transformOrigin","textTransform","visibility","zIndex"]);var sc=function(h){function p(){var a=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return(0,R.Z)(this,p),(0,g.Z)(this,p,[(0,l.Z)({type:Jn.CIRCLE},a)])}return(0,P.Z)(p,h),(0,O.Z)(p)}(pa);sc.PARSED_STYLE_LIST=new Set([].concat((0,_.Z)(pa.PARSED_STYLE_LIST),["cx","cy","cz","r","isBillboard","isSizeAttenuation"]));var wd=["style"],Kc=function(h){function p(){var a,s=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},m=s.style,D=(0,qr.Z)(s,wd);return(0,R.Z)(this,p),a=(0,g.Z)(this,p,[(0,l.Z)({style:m},D)]),a.isCustomElement=!0,a}return(0,P.Z)(p,h),(0,O.Z)(p)}(pa);Kc.PARSED_STYLE_LIST=new Set(["class","className","clipPath","cursor","draggable","droppable","opacity","pointerEvents","transform","transformOrigin","zIndex","visibility"]);var wl=function(h){function p(){var a=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return(0,R.Z)(this,p),(0,g.Z)(this,p,[(0,l.Z)({type:Jn.ELLIPSE},a)])}return(0,P.Z)(p,h),(0,O.Z)(p)}(pa);wl.PARSED_STYLE_LIST=new Set([].concat((0,_.Z)(pa.PARSED_STYLE_LIST),["cx","cy","cz","rx","ry","isBillboard","isSizeAttenuation"]));var Sd=function(h){function p(){return(0,R.Z)(this,p),(0,g.Z)(this,p,[{type:Jn.FRAGMENT}])}return(0,P.Z)(p,h),(0,O.Z)(p)}(pa);Sd.PARSED_STYLE_LIST=new Set(["class","className"]);var Bo=function(h){function p(){var a=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return(0,R.Z)(this,p),(0,g.Z)(this,p,[(0,l.Z)({type:Jn.GROUP},a)])}return(0,P.Z)(p,h),(0,O.Z)(p)}(pa);Bo.PARSED_STYLE_LIST=new Set(["class","className","clipPath","cursor","draggable","droppable","opacity","pointerEvents","transform","transformOrigin","zIndex","visibility"]);var Md=["style"],lc=function(h){function p(){var a,s=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},m=s.style,D=(0,qr.Z)(s,Md);return(0,R.Z)(this,p),a=(0,g.Z)(this,p,[(0,l.Z)({type:Jn.HTML,style:m},D)]),a.cullable.enable=!1,a}return(0,P.Z)(p,h),(0,O.Z)(p,[{key:"getDomElement",value:function(){return this.parsedStyle.$el}},{key:"getClientRects",value:function(){return[this.getBoundingClientRect()]}},{key:"getLocalBounds",value:function(){if(this.parentNode){var s=N.invert(N.create(),this.parentNode.getWorldTransform()),m=this.getBounds();if(!H.isEmpty(m)){var D=new H;return D.setFromTransformedAABB(m,s),D}}return this.getBounds()}}])}(pa);lc.PARSED_STYLE_LIST=new Set([].concat((0,_.Z)(pa.PARSED_STYLE_LIST),["x","y","$el","innerHTML","width","height"]));var cc=function(h){function p(){var a=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return(0,R.Z)(this,p),(0,g.Z)(this,p,[(0,l.Z)({type:Jn.IMAGE},a)])}return(0,P.Z)(p,h),(0,O.Z)(p)}(pa);cc.PARSED_STYLE_LIST=new Set([].concat((0,_.Z)(pa.PARSED_STYLE_LIST),["x","y","z","src","width","height","isBillboard","billboardRotation","isSizeAttenuation","keepAspectRatio"]));var Cd=["style"],Sl=function(h){function p(){var a,s=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},m=s.style,D=(0,qr.Z)(s,Cd);(0,R.Z)(this,p),a=(0,g.Z)(this,p,[(0,l.Z)({type:Jn.LINE,style:(0,l.Z)({x1:0,y1:0,x2:0,y2:0,z1:0,z2:0},m)},D)]),a.markerStartAngle=0,a.markerEndAngle=0;var L=a.parsedStyle,V=L.markerStart,st=L.markerEnd;return V&&sa(V)&&(a.markerStartAngle=V.getLocalEulerAngles(),a.appendChild(V)),st&&sa(st)&&(a.markerEndAngle=st.getLocalEulerAngles(),a.appendChild(st)),a.transformMarker(!0),a.transformMarker(!1),a}return(0,P.Z)(p,h),(0,O.Z)(p,[{key:"attributeChangedCallback",value:function(s,m,D,L,V){s==="x1"||s==="y1"||s==="x2"||s==="y2"||s==="markerStartOffset"||s==="markerEndOffset"?(this.transformMarker(!0),this.transformMarker(!1)):s==="markerStart"?(L&&sa(L)&&(this.markerStartAngle=0,L.remove()),V&&sa(V)&&(this.markerStartAngle=V.getLocalEulerAngles(),this.appendChild(V),this.transformMarker(!0))):s==="markerEnd"&&(L&&sa(L)&&(this.markerEndAngle=0,L.remove()),V&&sa(V)&&(this.markerEndAngle=V.getLocalEulerAngles(),this.appendChild(V),this.transformMarker(!1)))}},{key:"transformMarker",value:function(s){var m=this.parsedStyle,D=m.markerStart,L=m.markerEnd,V=m.markerStartOffset,st=m.markerEndOffset,Lt=m.x1,he=m.x2,Te=m.y1,je=m.y2,qe=s?D:L;if(!(!qe||!sa(qe))){var tn=0,fn,gn,yn,pn,Rn,Qn;s?(yn=Lt,pn=Te,fn=he-Lt,gn=je-Te,Rn=V||0,Qn=this.markerStartAngle):(yn=he,pn=je,fn=Lt-he,gn=Te-je,Rn=st||0,Qn=this.markerEndAngle),tn=Math.atan2(gn,fn),qe.setLocalEulerAngles(tn*180/Math.PI+Qn),qe.setLocalPosition(yn+Math.cos(tn)*Rn,pn+Math.sin(tn)*Rn)}}},{key:"getPoint",value:function(s){var m=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,D=this.parsedStyle,L=D.x1,V=D.y1,st=D.x2,Lt=D.y2,he=(0,Mr.U4)(L,V,st,Lt,s),Te=he.x,je=he.y,qe=x.fF(x.Ue(),x.al(Te,je,0),m?this.getWorldTransform():this.getLocalTransform());return new Y(qe[0],qe[1])}},{key:"getPointAtLength",value:function(s){var m=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;return this.getPoint(s/this.getTotalLength(),m)}},{key:"getTotalLength",value:function(){var s=this.parsedStyle,m=s.x1,D=s.y1,L=s.x2,V=s.y2;return(0,Mr.Xk)(m,D,L,V)}}])}(pa);Sl.PARSED_STYLE_LIST=new Set([].concat((0,_.Z)(pa.PARSED_STYLE_LIST),["x1","y1","x2","y2","z1","z2","isBillboard","isSizeAttenuation","markerStart","markerEnd","markerStartOffset","markerEndOffset"]));var Xc=["style"],uc=function(h){function p(){var a,s=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},m=s.style,D=(0,qr.Z)(s,Xc);(0,R.Z)(this,p),a=(0,g.Z)(this,p,[(0,l.Z)({type:Jn.PATH,style:m,initialParsedStyle:{miterLimit:4,d:(0,l.Z)({},Ji)}},D)]),a.markerStartAngle=0,a.markerEndAngle=0,a.markerMidList=[];var L=a.parsedStyle,V=L.markerStart,st=L.markerEnd,Lt=L.markerMid;return V&&sa(V)&&(a.markerStartAngle=V.getLocalEulerAngles(),a.appendChild(V)),Lt&&sa(Lt)&&a.placeMarkerMid(Lt),st&&sa(st)&&(a.markerEndAngle=st.getLocalEulerAngles(),a.appendChild(st)),a.transformMarker(!0),a.transformMarker(!1),a}return(0,P.Z)(p,h),(0,O.Z)(p,[{key:"attributeChangedCallback",value:function(s,m,D,L,V){s==="d"?(this.transformMarker(!0),this.transformMarker(!1),this.placeMarkerMid(this.parsedStyle.markerMid)):s==="markerStartOffset"||s==="markerEndOffset"?(this.transformMarker(!0),this.transformMarker(!1)):s==="markerStart"?(L&&sa(L)&&(this.markerStartAngle=0,L.remove()),V&&sa(V)&&(this.markerStartAngle=V.getLocalEulerAngles(),this.appendChild(V),this.transformMarker(!0))):s==="markerEnd"?(L&&sa(L)&&(this.markerEndAngle=0,L.remove()),V&&sa(V)&&(this.markerEndAngle=V.getLocalEulerAngles(),this.appendChild(V),this.transformMarker(!1))):s==="markerMid"&&this.placeMarkerMid(V)}},{key:"transformMarker",value:function(s){var m=this.parsedStyle,D=m.markerStart,L=m.markerEnd,V=m.markerStartOffset,st=m.markerEndOffset,Lt=s?D:L;if(!(!Lt||!sa(Lt))){var he=0,Te,je,qe,tn,fn,gn;if(s){var yn=this.getStartTangent(),pn=(0,b.Z)(yn,2),Rn=pn[0],Qn=pn[1];qe=Qn[0],tn=Qn[1],Te=Rn[0]-Qn[0],je=Rn[1]-Qn[1],fn=V||0,gn=this.markerStartAngle}else{var vr=this.getEndTangent(),wr=(0,b.Z)(vr,2),Pr=wr[0],Ur=wr[1];qe=Ur[0],tn=Ur[1],Te=Pr[0]-Ur[0],je=Pr[1]-Ur[1],fn=st||0,gn=this.markerEndAngle}he=Math.atan2(je,Te),Lt.setLocalEulerAngles(he*180/Math.PI+gn),Lt.setLocalPosition(qe+Math.cos(he)*fn,tn+Math.sin(he)*fn)}}},{key:"placeMarkerMid",value:function(s){var m=this.parsedStyle.d.segments;if(this.markerMidList.forEach(function(he){he.remove()}),s&&sa(s))for(var D=1;D<m.length-1;D++){var L=(0,b.Z)(m[D].currentPoint,2),V=L[0],st=L[1],Lt=D===1?s:s.cloneNode(!0);this.markerMidList.push(Lt),this.appendChild(Lt),Lt.setLocalPosition(V,st)}}},{key:"getTotalLength",value:function(){return tr(this)}},{key:"getPointAtLength",value:function(s){var m=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,D=this.parsedStyle.d.absolutePath,L=cr(D,s),V=L.x,st=L.y,Lt=x.fF(x.Ue(),x.al(V,st,0),m?this.getWorldTransform():this.getLocalTransform());return new Y(Lt[0],Lt[1])}},{key:"getPoint",value:function(s){var m=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;return this.getPointAtLength(s*tr(this),m)}},{key:"getStartTangent",value:function(){var s=this.parsedStyle.d.segments,m=[];if(s.length>1){var D=s[0].currentPoint,L=s[1].currentPoint,V=s[1].startTangent;m=[],V?(m.push([D[0]-V[0],D[1]-V[1]]),m.push([D[0],D[1]])):(m.push([L[0],L[1]]),m.push([D[0],D[1]]))}return m}},{key:"getEndTangent",value:function(){var s=this.parsedStyle.d.segments,m=s.length,D=[];if(m>1){var L=s[m-2].currentPoint,V=s[m-1].currentPoint,st=s[m-1].endTangent;D=[],st?(D.push([V[0]-st[0],V[1]-st[1]]),D.push([V[0],V[1]])):(D.push([L[0],L[1]]),D.push([V[0],V[1]]))}return D}}])}(pa);uc.PARSED_STYLE_LIST=new Set([].concat((0,_.Z)(pa.PARSED_STYLE_LIST),["d","markerStart","markerMid","markerEnd","markerStartOffset","markerEndOffset","isBillboard","isSizeAttenuation"]));var Qc=["style"],tl=function(h){function p(){var a,s=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},m=s.style,D=(0,qr.Z)(s,Qc);(0,R.Z)(this,p),a=(0,g.Z)(this,p,[(0,l.Z)({type:Jn.POLYGON,style:m,initialParsedStyle:{points:{points:[],totalLength:0,segments:[]},miterLimit:4,isClosed:!0}},D)]),a.markerStartAngle=0,a.markerEndAngle=0,a.markerMidList=[];var L=a.parsedStyle,V=L.markerStart,st=L.markerEnd,Lt=L.markerMid;return V&&sa(V)&&(a.markerStartAngle=V.getLocalEulerAngles(),a.appendChild(V)),Lt&&sa(Lt)&&a.placeMarkerMid(Lt),st&&sa(st)&&(a.markerEndAngle=st.getLocalEulerAngles(),a.appendChild(st)),a.transformMarker(!0),a.transformMarker(!1),a}return(0,P.Z)(p,h),(0,O.Z)(p,[{key:"attributeChangedCallback",value:function(s,m,D,L,V){s==="points"?(this.transformMarker(!0),this.transformMarker(!1),this.placeMarkerMid(this.parsedStyle.markerMid)):s==="markerStartOffset"||s==="markerEndOffset"?(this.transformMarker(!0),this.transformMarker(!1)):s==="markerStart"?(L&&sa(L)&&(this.markerStartAngle=0,L.remove()),V&&sa(V)&&(this.markerStartAngle=V.getLocalEulerAngles(),this.appendChild(V),this.transformMarker(!0))):s==="markerEnd"?(L&&sa(L)&&(this.markerEndAngle=0,L.remove()),V&&sa(V)&&(this.markerEndAngle=V.getLocalEulerAngles(),this.appendChild(V),this.transformMarker(!1))):s==="markerMid"&&this.placeMarkerMid(V)}},{key:"transformMarker",value:function(s){var m=this.parsedStyle,D=m.markerStart,L=m.markerEnd,V=m.markerStartOffset,st=m.markerEndOffset,Lt=m.points,he=Lt||{},Te=he.points,je=s?D:L;if(!(!je||!sa(je)||!Te)){var qe=0,tn,fn,gn,yn,pn,Rn;if(gn=Te[0][0],yn=Te[0][1],s)tn=Te[1][0]-Te[0][0],fn=Te[1][1]-Te[0][1],pn=V||0,Rn=this.markerStartAngle;else{var Qn=Te.length;this.parsedStyle.isClosed?(tn=Te[Qn-1][0]-Te[0][0],fn=Te[Qn-1][1]-Te[0][1]):(gn=Te[Qn-1][0],yn=Te[Qn-1][1],tn=Te[Qn-2][0]-Te[Qn-1][0],fn=Te[Qn-2][1]-Te[Qn-1][1]),pn=st||0,Rn=this.markerEndAngle}qe=Math.atan2(fn,tn),je.setLocalEulerAngles(qe*180/Math.PI+Rn),je.setLocalPosition(gn+Math.cos(qe)*pn,yn+Math.sin(qe)*pn)}}},{key:"placeMarkerMid",value:function(s){var m=this.parsedStyle.points,D=m||{},L=D.points;if(this.markerMidList.forEach(function(Te){Te.remove()}),this.markerMidList=[],s&&sa(s)&&L)for(var V=1;V<(this.parsedStyle.isClosed?L.length:L.length-1);V++){var st=L[V][0],Lt=L[V][1],he=V===1?s:s.cloneNode(!0);this.markerMidList.push(he),this.appendChild(he),he.setLocalPosition(st,Lt)}}}])}(pa);tl.PARSED_STYLE_LIST=new Set([].concat((0,_.Z)(pa.PARSED_STYLE_LIST),["points","markerStart","markerMid","markerEnd","markerStartOffset","markerEndOffset","isClosed","isBillboard","isSizeAttenuation"]));var Od=["style"],Ml=function(h){function p(){var a=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},s=a.style,m=(0,qr.Z)(a,Od);return(0,R.Z)(this,p),(0,g.Z)(this,p,[(0,l.Z)({type:Jn.POLYLINE,style:s,initialParsedStyle:{points:{points:[],totalLength:0,segments:[]},miterLimit:4,isClosed:!1}},m)])}return(0,P.Z)(p,h),(0,O.Z)(p,[{key:"getTotalLength",value:function(){return ur(this)}},{key:"getPointAtLength",value:function(s){var m=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;return this.getPoint(s/this.getTotalLength(),m)}},{key:"getPoint",value:function(s){var m=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,D=this.parsedStyle.points.points;if(this.parsedStyle.points.segments.length===0){var L=[],V=0,st,Lt,he=this.getTotalLength();D.forEach(function(yn,pn){D[pn+1]&&(st=[0,0],st[0]=V/he,Lt=(0,Mr.Xk)(yn[0],yn[1],D[pn+1][0],D[pn+1][1]),V+=Lt,st[1]=V/he,L.push(st))}),this.parsedStyle.points.segments=L}var Te=0,je=0;this.parsedStyle.points.segments.forEach(function(yn,pn){s>=yn[0]&&s<=yn[1]&&(Te=(s-yn[0])/(yn[1]-yn[0]),je=pn)});var qe=(0,Mr.U4)(D[je][0],D[je][1],D[je+1][0],D[je+1][1],Te),tn=qe.x,fn=qe.y,gn=x.fF(x.Ue(),x.al(tn,fn,0),m?this.getWorldTransform():this.getLocalTransform());return new Y(gn[0],gn[1])}},{key:"getStartTangent",value:function(){var s=this.parsedStyle.points.points,m=[];return m.push([s[1][0],s[1][1]]),m.push([s[0][0],s[0][1]]),m}},{key:"getEndTangent",value:function(){var s=this.parsedStyle.points.points,m=s.length-1,D=[];return D.push([s[m-1][0],s[m-1][1]]),D.push([s[m][0],s[m][1]]),D}}])}(tl);Ml.PARSED_STYLE_LIST=new Set([].concat((0,_.Z)(tl.PARSED_STYLE_LIST),["points","markerStart","markerMid","markerEnd","markerStartOffset","markerEndOffset","isBillboard"]));var Cl=function(h){function p(){var a=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return(0,R.Z)(this,p),(0,g.Z)(this,p,[(0,l.Z)({type:Jn.RECT},a)])}return(0,P.Z)(p,h),(0,O.Z)(p)}(pa);Cl.PARSED_STYLE_LIST=new Set([].concat((0,_.Z)(pa.PARSED_STYLE_LIST),["x","y","z","width","height","isBillboard","isSizeAttenuation","radius"]));var Td=["style"],Ol=function(h){function p(){var a=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},s=a.style,m=(0,qr.Z)(a,Td);return(0,R.Z)(this,p),(0,g.Z)(this,p,[(0,l.Z)({type:Jn.TEXT,style:(0,l.Z)({fill:"black"},s)},m)])}return(0,P.Z)(p,h),(0,O.Z)(p,[{key:"getComputedTextLength",value:function(){var s;return this.getGeometryBounds(),((s=this.parsedStyle.metrics)===null||s===void 0?void 0:s.maxLineWidth)||0}},{key:"getLineBoundingRects",value:function(){var s;return this.getGeometryBounds(),((s=this.parsedStyle.metrics)===null||s===void 0?void 0:s.lineMetrics)||[]}},{key:"isOverflowing",value:function(){return this.getGeometryBounds(),!!this.parsedStyle.isOverflowing}}])}(pa);Ol.PARSED_STYLE_LIST=new Set([].concat((0,_.Z)(pa.PARSED_STYLE_LIST),["x","y","z","isBillboard","billboardRotation","isSizeAttenuation","text","textAlign","textBaseline","fontStyle","fontSize","fontFamily","fontWeight","fontVariant","lineHeight","letterSpacing","leading","wordWrap","wordWrapWidth","maxLines","textOverflow","isOverflowing","textPath","textDecorationLine","textDecorationColor","textDecorationStyle","textDecorationThickness","textPathSide","textPathStartOffset","metrics","dx","dy"]));var Pd=function(){function h(){(0,R.Z)(this,h),this.registry={},this.define(Jn.CIRCLE,sc),this.define(Jn.ELLIPSE,wl),this.define(Jn.RECT,Cl),this.define(Jn.IMAGE,cc),this.define(Jn.LINE,Sl),this.define(Jn.GROUP,Bo),this.define(Jn.PATH,uc),this.define(Jn.POLYGON,tl),this.define(Jn.POLYLINE,Ml),this.define(Jn.TEXT,Ol),this.define(Jn.HTML,lc)}return(0,O.Z)(h,[{key:"define",value:function(a,s){this.registry[a]=s}},{key:"get",value:function(a){return this.registry[a]}}])}(),af={number:function(p){return new $i(p)},percent:function(p){return new $i(p,"%")},px:function(p){return new $i(p,"px")},em:function(p){return new $i(p,"em")},rem:function(p){return new $i(p,"rem")},deg:function(p){return new $i(p,"deg")},grad:function(p){return new $i(p,"grad")},rad:function(p){return new $i(p,"rad")},turn:function(p){return new $i(p,"turn")},s:function(p){return new $i(p,"s")},ms:function(p){return new $i(p,"ms")},registerProperty:function(p){var a=p.name,s=p.inherits,m=p.interpolable,D=p.initialValue,L=p.syntax;rr.styleValueRegistry.registerMetadata({n:a,inh:s,int:m,d:D,syntax:L})},registerLayout:function(p,a){rr.layoutRegistry.registerLayout(p,a)}},Jc=function(h){function p(){var a;(0,R.Z)(this,p),a=(0,g.Z)(this,p),a.defaultView=null,a.ownerDocument=null,a.nodeName="document";try{a.timeline=new rr.AnimationTimeline(a)}catch(m){}var s={};return ga.forEach(function(m){var D=m.n,L=m.inh,V=m.d;L&&V&&(s[D]=(0,Ln.Z)(V)?V(Jn.GROUP):V)}),a.documentElement=new Bo({id:"g-root",style:s}),a.documentElement.ownerDocument=a,a.documentElement.parentNode=a,a.childNodes=[a.documentElement],a}return(0,P.Z)(p,h),(0,O.Z)(p,[{key:"children",get:function(){return this.childNodes}},{key:"childElementCount",get:function(){return this.childNodes.length}},{key:"firstElementChild",get:function(){return this.firstChild}},{key:"lastElementChild",get:function(){return this.lastChild}},{key:"createElement",value:function(s,m){if(s==="svg")return this.documentElement;var D=this.defaultView.customElements.get(s);D||(console.warn("Unsupported tagName: ",s),D=s==="tspan"?Ol:Bo);var L=new D(m);return L.ownerDocument=this,L}},{key:"createElementNS",value:function(s,m,D){return this.createElement(m,D)}},{key:"cloneNode",value:function(s){throw new Error(J)}},{key:"destroy",value:function(){try{this.documentElement.destroyChildren(),this.timeline.destroy()}catch(s){}}},{key:"elementsFromBBox",value:function(s,m,D,L){var V=[],st=function(he){if(!(!he.isInteractive()||he.isCulled())){var Te=he.parsedStyle.pointerEvents,je=Te===void 0?"auto":Te,qe=["auto","visiblepainted","visiblefill","visiblestroke","visible"].includes(je);if(!qe||he.isVisible()){var tn=he.getTransformedGeometryBounds(!0);tn&&!H.isEmpty(tn)&&tn.max[0]>=s&&tn.min[0]<=D&&tn.max[1]>=m&&tn.min[1]<=L&&V.push(he)}he.childNodes&&he.childNodes.forEach(function(fn){fn instanceof pa&&st(fn)})}};return st(this.documentElement),V.sort(function(Lt,he){return he.sortable.renderOrder-Lt.sortable.renderOrder}),V}},{key:"elementFromPointSync",value:function(s,m){var D=this.defaultView.canvas2Viewport({x:s,y:m}),L=D.x,V=D.y,st=this.defaultView.getConfig(),Lt=st.width,he=st.height;if(L<0||V<0||L>Lt||V>he)return null;var Te=this.defaultView.viewport2Client({x:L,y:V}),je=Te.x,qe=Te.y,tn=this.defaultView.getRenderingService().hooks.pickSync.call({topmost:!0,position:{x:s,y:m,viewportX:L,viewportY:V,clientX:je,clientY:qe},picked:[]}),fn=tn.picked;return fn&&fn[0]||this.documentElement}},{key:"elementFromPoint",value:function(){var a=(0,yi.Z)((0,gi.Z)().mark(function m(D,L){var V,st,Lt,he,Te,je,qe,tn,fn,gn,yn;return(0,gi.Z)().wrap(function(pn){for(;;)switch(pn.prev=pn.next){case 0:if(V=this.defaultView.canvas2Viewport({x:D,y:L}),st=V.x,Lt=V.y,he=this.defaultView.getConfig(),Te=he.width,je=he.height,!(st<0||Lt<0||st>Te||Lt>je)){pn.next=1;break}return pn.abrupt("return",null);case 1:return qe=this.defaultView.viewport2Client({x:st,y:Lt}),tn=qe.x,fn=qe.y,pn.next=2,this.defaultView.getRenderingService().hooks.pick.promise({topmost:!0,position:{x:D,y:L,viewportX:st,viewportY:Lt,clientX:tn,clientY:fn},picked:[]});case 2:return gn=pn.sent,yn=gn.picked,pn.abrupt("return",yn&&yn[0]||this.documentElement);case 3:case"end":return pn.stop()}},m,this)}));function s(m,D){return a.apply(this,arguments)}return s}()},{key:"elementsFromPointSync",value:function(s,m){var D=this.defaultView.canvas2Viewport({x:s,y:m}),L=D.x,V=D.y,st=this.defaultView.getConfig(),Lt=st.width,he=st.height;if(L<0||V<0||L>Lt||V>he)return[];var Te=this.defaultView.viewport2Client({x:L,y:V}),je=Te.x,qe=Te.y,tn=this.defaultView.getRenderingService().hooks.pickSync.call({topmost:!1,position:{x:s,y:m,viewportX:L,viewportY:V,clientX:je,clientY:qe},picked:[]}),fn=tn.picked;return fn[fn.length-1]!==this.documentElement&&fn.push(this.documentElement),fn}},{key:"elementsFromPoint",value:function(){var a=(0,yi.Z)((0,gi.Z)().mark(function m(D,L){var V,st,Lt,he,Te,je,qe,tn,fn,gn,yn;return(0,gi.Z)().wrap(function(pn){for(;;)switch(pn.prev=pn.next){case 0:if(V=this.defaultView.canvas2Viewport({x:D,y:L}),st=V.x,Lt=V.y,he=this.defaultView.getConfig(),Te=he.width,je=he.height,!(st<0||Lt<0||st>Te||Lt>je)){pn.next=1;break}return pn.abrupt("return",[]);case 1:return qe=this.defaultView.viewport2Client({x:st,y:Lt}),tn=qe.x,fn=qe.y,pn.next=2,this.defaultView.getRenderingService().hooks.pick.promise({topmost:!1,position:{x:D,y:L,viewportX:st,viewportY:Lt,clientX:tn,clientY:fn},picked:[]});case 2:return gn=pn.sent,yn=gn.picked,yn[yn.length-1]!==this.documentElement&&yn.push(this.documentElement),pn.abrupt("return",yn);case 3:case"end":return pn.stop()}},m,this)}));function s(m,D){return a.apply(this,arguments)}return s}()},{key:"appendChild",value:function(s,m){throw new Error(pt)}},{key:"insertBefore",value:function(s,m){throw new Error(pt)}},{key:"removeChild",value:function(s,m){throw new Error(pt)}},{key:"replaceChild",value:function(s,m,D){throw new Error(pt)}},{key:"append",value:function(){throw new Error(pt)}},{key:"prepend",value:function(){throw new Error(pt)}},{key:"getElementById",value:function(s){return this.documentElement.getElementById(s)}},{key:"getElementsByName",value:function(s){return this.documentElement.getElementsByName(s)}},{key:"getElementsByTagName",value:function(s){return this.documentElement.getElementsByTagName(s)}},{key:"getElementsByClassName",value:function(s){return this.documentElement.getElementsByClassName(s)}},{key:"querySelector",value:function(s){return this.documentElement.querySelector(s)}},{key:"querySelectorAll",value:function(s){return this.documentElement.querySelectorAll(s)}},{key:"find",value:function(s){return this.documentElement.find(s)}},{key:"findAll",value:function(s){return this.documentElement.findAll(s)}}])}(wa),dc=function(){function h(p){(0,R.Z)(this,h),this.strategies=p}return(0,O.Z)(h,[{key:"apply",value:function(a){var s=a.config,m=a.camera,D=a.renderingService,L=a.renderingContext,V=this.strategies;D.hooks.cull.tap(h.tag,function(st){if(st){var Lt,he=st.cullable;if(V.length===0?he.visible=L.unculledEntities.indexOf(st.entity)>-1:he.visible=V.every(function(je){return je.isVisible(m,st)}),!st.isCulled()&&st.isVisible())return st;var Te=((Lt=s.future)===null||Lt===void 0?void 0:Lt.experimentalCancelEventPropagation)===!0;return st.dispatchEvent(new ao(Ha.CULLED),Te,Te),null}return st}),D.hooks.afterRender.tap(h.tag,function(st){st.cullable.visibilityPlaneMask=-1})}}])}();dc.tag="Culling";var qc=function(){function h(){var p=this;(0,R.Z)(this,h),this.autoPreventDefault=!1,this.rootPointerEvent=new ml(null),this.rootWheelEvent=new Qs(null),this.onPointerMove=function(a){var s,m=(s=p.context.renderingContext.root)===null||s===void 0||(s=s.ownerDocument)===null||s===void 0?void 0:s.defaultView;if(!(m.supportsTouchEvents&&a.pointerType==="touch")){var D=p.normalizeToPointerEvent(a,m),L=(0,_i.Z)(D),V;try{for(L.s();!(V=L.n()).done;){var st=V.value,Lt=p.bootstrapEvent(p.rootPointerEvent,st,m,a);p.context.eventService.mapEvent(Lt)}}catch(he){L.e(he)}finally{L.f()}p.setCursor(p.context.eventService.cursor)}},this.onClick=function(a){var s,m=(s=p.context.renderingContext.root)===null||s===void 0||(s=s.ownerDocument)===null||s===void 0?void 0:s.defaultView,D=p.normalizeToPointerEvent(a,m),L=(0,_i.Z)(D),V;try{for(L.s();!(V=L.n()).done;){var st=V.value,Lt=p.bootstrapEvent(p.rootPointerEvent,st,m,a);p.context.eventService.mapEvent(Lt)}}catch(he){L.e(he)}finally{L.f()}p.setCursor(p.context.eventService.cursor)}}return(0,O.Z)(h,[{key:"apply",value:function(a){var s=this;this.context=a;var m=a.renderingService,D=this.context.renderingContext.root.ownerDocument.defaultView;this.context.eventService.setPickHandler(function(L){var V=s.context.renderingService.hooks.pickSync.call({position:L,picked:[],topmost:!0}),st=V.picked;return st[0]||null}),m.hooks.pointerWheel.tap(h.tag,function(L){var V=s.normalizeWheelEvent(L);s.context.eventService.mapEvent(V)}),m.hooks.pointerDown.tap(h.tag,function(L){if(!(D.supportsTouchEvents&&L.pointerType==="touch")){var V=s.normalizeToPointerEvent(L,D);if(s.autoPreventDefault&&V[0].isNormalized){var st=L.cancelable||!("cancelable"in L);st&&L.preventDefault()}var Lt=(0,_i.Z)(V),he;try{for(Lt.s();!(he=Lt.n()).done;){var Te=he.value,je=s.bootstrapEvent(s.rootPointerEvent,Te,D,L);s.context.eventService.mapEvent(je)}}catch(qe){Lt.e(qe)}finally{Lt.f()}s.setCursor(s.context.eventService.cursor)}}),m.hooks.pointerUp.tap(h.tag,function(L){if(!(D.supportsTouchEvents&&L.pointerType==="touch")){var V=s.context.contextService.getDomElement(),st=s.context.eventService.isNativeEventFromCanvas(V,L),Lt=st?"":"outside",he=s.normalizeToPointerEvent(L,D),Te=(0,_i.Z)(he),je;try{for(Te.s();!(je=Te.n()).done;){var qe=je.value,tn=s.bootstrapEvent(s.rootPointerEvent,qe,D,L);tn.type+=Lt,s.context.eventService.mapEvent(tn)}}catch(fn){Te.e(fn)}finally{Te.f()}s.setCursor(s.context.eventService.cursor)}}),m.hooks.pointerMove.tap(h.tag,this.onPointerMove),m.hooks.pointerOver.tap(h.tag,this.onPointerMove),m.hooks.pointerOut.tap(h.tag,this.onPointerMove),m.hooks.click.tap(h.tag,this.onClick),m.hooks.pointerCancel.tap(h.tag,function(L){var V=s.normalizeToPointerEvent(L,D),st=(0,_i.Z)(V),Lt;try{for(st.s();!(Lt=st.n()).done;){var he=Lt.value,Te=s.bootstrapEvent(s.rootPointerEvent,he,D,L);s.context.eventService.mapEvent(Te)}}catch(je){st.e(je)}finally{st.f()}s.setCursor(s.context.eventService.cursor)})}},{key:"bootstrapEvent",value:function(a,s,m,D){a.view=m,a.originalEvent=null,a.nativeEvent=D,a.pointerId=s.pointerId,a.width=s.width,a.height=s.height,a.isPrimary=s.isPrimary,a.pointerType=s.pointerType,a.pressure=s.pressure,a.tangentialPressure=s.tangentialPressure,a.tiltX=s.tiltX,a.tiltY=s.tiltY,a.twist=s.twist,this.transferMouseData(a,s);var L=this.context.eventService.client2Viewport({x:s.clientX,y:s.clientY}),V=L.x,st=L.y;a.viewport.x=V,a.viewport.y=st;var Lt=this.context.eventService.viewport2Canvas(a.viewport),he=Lt.x,Te=Lt.y;return a.canvas.x=he,a.canvas.y=Te,a.global.copyFrom(a.canvas),a.offset.copyFrom(a.canvas),a.isTrusted=D.isTrusted,a.type==="pointerleave"&&(a.type="pointerout"),a.type.startsWith("mouse")&&(a.type=a.type.replace("mouse","pointer")),a.type.startsWith("touch")&&(a.type=Ua[a.type]||a.type),a}},{key:"normalizeWheelEvent",value:function(a){var s=this.rootWheelEvent;this.transferMouseData(s,a),s.deltaMode=a.deltaMode,s.deltaX=a.deltaX,s.deltaY=a.deltaY,s.deltaZ=a.deltaZ;var m=this.context.eventService.client2Viewport({x:a.clientX,y:a.clientY}),D=m.x,L=m.y;s.viewport.x=D,s.viewport.y=L;var V=this.context.eventService.viewport2Canvas(s.viewport),st=V.x,Lt=V.y;return s.canvas.x=st,s.canvas.y=Lt,s.global.copyFrom(s.canvas),s.offset.copyFrom(s.canvas),s.nativeEvent=a,s.type=a.type,s}},{key:"transferMouseData",value:function(a,s){a.isTrusted=s.isTrusted,a.srcElement=s.srcElement,a.timeStamp=ll.now(),a.type=s.type,a.altKey=s.altKey,a.metaKey=s.metaKey,a.shiftKey=s.shiftKey,a.ctrlKey=s.ctrlKey,a.button=s.button,a.buttons=s.buttons,a.client.x=s.clientX,a.client.y=s.clientY,a.movement.x=s.movementX,a.movement.y=s.movementY,a.page.x=s.pageX,a.page.y=s.pageY,a.screen.x=s.screenX,a.screen.y=s.screenY,a.relatedTarget=null}},{key:"setCursor",value:function(a){this.context.contextService.applyCursorStyle(a||this.context.config.cursor||"default")}},{key:"normalizeToPointerEvent",value:function(a,s){var m=[];if(s.isTouchEvent(a))for(var D=0;D<a.changedTouches.length;D++){var L=a.changedTouches[D];(0,on.Z)(L.button)&&(L.button=0),(0,on.Z)(L.buttons)&&(L.buttons=1),(0,on.Z)(L.isPrimary)&&(L.isPrimary=a.touches.length===1&&a.type==="touchstart"),(0,on.Z)(L.width)&&(L.width=L.radiusX||1),(0,on.Z)(L.height)&&(L.height=L.radiusY||1),(0,on.Z)(L.tiltX)&&(L.tiltX=0),(0,on.Z)(L.tiltY)&&(L.tiltY=0),(0,on.Z)(L.pointerType)&&(L.pointerType="touch"),(0,on.Z)(L.pointerId)&&(L.pointerId=L.identifier||0),(0,on.Z)(L.pressure)&&(L.pressure=L.force||.5),(0,on.Z)(L.twist)&&(L.twist=0),(0,on.Z)(L.tangentialPressure)&&(L.tangentialPressure=0),L.isNormalized=!0,L.type=a.type,m.push(L)}else if(s.isMouseEvent(a)){var V=a;(0,on.Z)(V.isPrimary)&&(V.isPrimary=!0),(0,on.Z)(V.width)&&(V.width=1),(0,on.Z)(V.height)&&(V.height=1),(0,on.Z)(V.tiltX)&&(V.tiltX=0),(0,on.Z)(V.tiltY)&&(V.tiltY=0),(0,on.Z)(V.pointerType)&&(V.pointerType="mouse"),(0,on.Z)(V.pointerId)&&(V.pointerId=Gs),(0,on.Z)(V.pressure)&&(V.pressure=.5),(0,on.Z)(V.twist)&&(V.twist=0),(0,on.Z)(V.tangentialPressure)&&(V.tangentialPressure=0),V.isNormalized=!0,m.push(V)}else m.push(a);return m}}])}();qc.tag="Event";var Ad=[Jn.CIRCLE,Jn.ELLIPSE,Jn.IMAGE,Jn.RECT,Jn.LINE,Jn.POLYLINE,Jn.POLYGON,Jn.TEXT,Jn.PATH,Jn.HTML],tu=function(){function h(){(0,R.Z)(this,h)}return(0,O.Z)(h,[{key:"isVisible",value:function(a,s){var m,D=s.cullable;if(!D.enable)return!0;var L=s.getRenderBounds();if(H.isEmpty(L))return!1;var V=a.getFrustum(),st=(m=s.parentNode)===null||m===void 0||(m=m.cullable)===null||m===void 0?void 0:m.visibilityPlaneMask;return D.visibilityPlaneMask=this.computeVisibilityWithPlaneMask(s,L,st||Dt.INDETERMINATE,V.planes),D.visible=D.visibilityPlaneMask!==Dt.OUTSIDE,D.visible}},{key:"computeVisibilityWithPlaneMask",value:function(a,s,m,D){if(m===Dt.OUTSIDE||m===Dt.INSIDE)return m;for(var L=Dt.INSIDE,V=Ad.indexOf(a.nodeName)>-1,st=0,Lt=D.length;st<Lt;++st){var he=1<<st;if(m&he&&!(V&&(st===4||st===5))){var Te=D[st],je=Te.normal,qe=Te.distance;if(x.AK(je,s.getPositiveFarPoint(D[st]))+qe<0)return Dt.OUTSIDE;x.AK(je,s.getNegativeFarPoint(D[st]))+qe<0&&(L|=he)}}return L}}])}(),eu=function(){function h(){(0,R.Z)(this,h),this.mutationRecords=[],this.isFirstTimeRendering=!0,this.isFirstTimeRenderingFinished=!1}return(0,O.Z)(h,[{key:"apply",value:function(a){var s=this,m,D=a.renderingService,L=a.renderingContext,V=L.root.ownerDocument.defaultView,st=function(tn){D.dirty()},Lt=function(tn){var fn,gn=tn.detail;(fn=s.mutationRecords).push.apply(fn,(0,_.Z)(gn)),D.dirty()},he=function(tn){var fn=tn.target;rr.enableSizeAttenuation&&rr.styleValueRegistry.updateSizeAttenuation(fn,V.getCamera().getZoom())},Te=function(tn){var fn=tn.target;rr.sceneGraphService.dirtyToRoot(fn),D.dirty()};D.hooks.init.tap(h.tag,function(){V.addEventListener(Ha.MOUNTED,he),V.addEventListener(Ha.UNMOUNTED,Te),V.addEventListener(Ha.ATTR_MODIFIED,st),V.addEventListener(Ha.BOUNDS_CHANGED,Lt)}),D.hooks.destroy.tap(h.tag,function(){V.removeEventListener(Ha.MOUNTED,he),V.removeEventListener(Ha.UNMOUNTED,Te),V.removeEventListener(Ha.ATTR_MODIFIED,st),V.removeEventListener(Ha.BOUNDS_CHANGED,Lt),s.mutationRecords=[]});var je=(m=rr.globalThis.requestIdleCallback)!==null&&m!==void 0?m:Ql.bind(rr.globalThis);D.hooks.endFrame.tap(h.tag,function(){s.isFirstTimeRendering&&(s.isFirstTimeRendering=!1,je(function(){s.isFirstTimeRenderingFinished=!0})),s.mutationRecords=[]})}}])}();eu.tag="Prepare";function of(h){return!!h.document}var Xo=function(h){return h.READY="ready",h.BEFORE_RENDER="beforerender",h.RERENDER="rerender",h.AFTER_RENDER="afterrender",h.BEFORE_DESTROY="beforedestroy",h.AFTER_DESTROY="afterdestroy",h.RESIZE="resize",h.DIRTY_RECTANGLE="dirtyrectangle",h.RENDERER_CHANGED="rendererchanged",h}({}),nu=500,Nd=.1,Rd=1e3,Tl=new ao(Ha.MOUNTED),Pl=new ao(Ha.UNMOUNTED),fc=new ao(Xo.BEFORE_RENDER),Al=new ao(Xo.RERENDER),hc=new ao(Xo.AFTER_RENDER),Id=function(h){function p(a){var s;(0,R.Z)(this,p),s=(0,g.Z)(this,p),s.Element=pa,s.inited=!1,s.context={};var m=a.container,D=a.canvas,L=a.renderer,V=a.width,st=a.height,Lt=a.background,he=a.cursor,Te=a.supportsMutipleCanvasesInOneContainer,je=a.cleanUpOnDestroy,qe=je===void 0?!0:je,tn=a.offscreenCanvas,fn=a.devicePixelRatio,gn=a.requestAnimationFrame,yn=a.cancelAnimationFrame,pn=a.createImage,Rn=a.supportsTouchEvents,Qn=a.supportsPointerEvents,vr=a.isTouchEvent,wr=a.isMouseEvent,Pr=a.dblClickSpeed,Ur=V,Gr=st,_r=fn||Co&&window.devicePixelRatio||1;return _r=_r>=1?Math.ceil(_r):1,D&&(Ur=V||sl(D)||D.width/_r,Gr=st||Cc(D)||D.height/_r),s.customElements=new Pd,s.devicePixelRatio=_r,s.requestAnimationFrame=gn!=null?gn:Ql.bind(rr.globalThis),s.cancelAnimationFrame=yn!=null?yn:Hs.bind(rr.globalThis),s.createImage=pn!=null?pn:function(){return new window.Image},s.supportsTouchEvents=Rn!=null?Rn:"ontouchstart"in rr.globalThis,s.supportsPointerEvents=Qn!=null?Qn:!!rr.globalThis.PointerEvent,s.isTouchEvent=vr!=null?vr:function(Ar){return s.supportsTouchEvents&&Ar instanceof rr.globalThis.TouchEvent},s.isMouseEvent=wr!=null?wr:function(Ar){return!rr.globalThis.MouseEvent||Ar instanceof rr.globalThis.MouseEvent&&(!s.supportsPointerEvents||!(Ar instanceof rr.globalThis.PointerEvent))},tn&&(rr.offscreenCanvas=tn),s.document=new Jc,s.document.defaultView=s,Te||Zo(m,s,qe),s.initRenderingContext((0,l.Z)((0,l.Z)({},a),{},{width:Ur,height:Gr,background:Lt!=null?Lt:"transparent",cursor:he!=null?he:"default",cleanUpOnDestroy:qe,devicePixelRatio:_r,requestAnimationFrame:s.requestAnimationFrame,cancelAnimationFrame:s.cancelAnimationFrame,createImage:s.createImage,supportsTouchEvents:s.supportsTouchEvents,supportsPointerEvents:s.supportsPointerEvents,isTouchEvent:s.isTouchEvent,isMouseEvent:s.isMouseEvent,dblClickSpeed:Pr!=null?Pr:200})),s.initDefaultCamera(Ur,Gr,L.clipSpaceNearZ),s.initRenderer(L,!0),s}return(0,P.Z)(p,h),(0,O.Z)(p,[{key:"initRenderingContext",value:function(s){this.context.config=s,this.context.renderingContext={root:this.document.documentElement,unculledEntities:[],renderListCurrentFrame:[],renderReasons:new Set,force:!1,dirty:!1}}},{key:"initDefaultCamera",value:function(s,m,D){var L=this,V=new rr.CameraContribution;V.clipSpaceNearZ=D,V.setType(ar.EXPLORING,ii.DEFAULT).setPosition(s/2,m/2,nu).setFocalPoint(s/2,m/2,0).setOrthographic(s/-2,s/2,m/2,m/-2,Nd,Rd),V.canvas=this,V.eventEmitter.on(Lr.UPDATED,function(){L.context.renderingContext.renderReasons.add(ks.CAMERA_CHANGED),rr.enableSizeAttenuation&&L.getConfig().renderer.getConfig().enableSizeAttenuation&&L.updateSizeAttenuation()}),this.context.camera=V}},{key:"updateSizeAttenuation",value:function(){var s=this.getCamera().getZoom();this.document.documentElement.forEach(function(m){rr.styleValueRegistry.updateSizeAttenuation(m,s)})}},{key:"getConfig",value:function(){return this.context.config}},{key:"getRoot",value:function(){return this.document.documentElement}},{key:"getCamera",value:function(){return this.context.camera}},{key:"getContextService",value:function(){return this.context.contextService}},{key:"getEventService",value:function(){return this.context.eventService}},{key:"getRenderingService",value:function(){return this.context.renderingService}},{key:"getRenderingContext",value:function(){return this.context.renderingContext}},{key:"getStats",value:function(){return this.getRenderingService().getStats()}},{key:"ready",get:function(){var s=this;return this.readyPromise||(this.readyPromise=new Promise(function(m){s.resolveReadyPromise=function(){m(s)}}),this.inited&&this.resolveReadyPromise()),this.readyPromise}},{key:"destroy",value:function(){var s,m=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0,D=arguments.length>1?arguments[1]:void 0;Vi.clearCache();var L=((s=this.getConfig().future)===null||s===void 0?void 0:s.experimentalCancelEventPropagation)===!0;D||this.dispatchEvent(new ao(Xo.BEFORE_DESTROY),L,L),this.frameId&&this.cancelAnimationFrame(this.frameId);var V=this.getRoot();m&&(this.unmountChildren(V),this.document.destroy(),this.getEventService().destroy()),this.getRenderingService().destroy(),this.getContextService().destroy(),D||this.dispatchEvent(new ao(Xo.AFTER_DESTROY),L,L);var st=function(he){he.currentTarget=null,he.manager=null,he.target=null,he.relatedNode=null};st(Tl),st(Pl),st(fc),st(Al),st(hc),st(Wo),st(ac),st(El),st(oc),rr.textService.clearCache()}},{key:"changeSize",value:function(s,m){this.resize(s,m)}},{key:"resize",value:function(s,m){var D,L=this.context.config;L.width=s,L.height=m,this.getContextService().resize(s,m);var V=this.context.camera,st=V.getProjectionMode();V.setPosition(s/2,m/2,nu).setFocalPoint(s/2,m/2,0),st===Or.ORTHOGRAPHIC?V.setOrthographic(s/-2,s/2,m/2,m/-2,V.getNear(),V.getFar()):V.setAspect(s/m);var Lt=((D=L.future)===null||D===void 0?void 0:D.experimentalCancelEventPropagation)===!0;this.dispatchEvent(new ao(Xo.RESIZE,{width:s,height:m}),Lt,Lt)}},{key:"appendChild",value:function(s,m){return this.document.documentElement.appendChild(s,m)}},{key:"insertBefore",value:function(s,m){return this.document.documentElement.insertBefore(s,m)}},{key:"removeChild",value:function(s){return this.document.documentElement.removeChild(s)}},{key:"removeChildren",value:function(){this.document.documentElement.removeChildren()}},{key:"destroyChildren",value:function(){this.document.documentElement.destroyChildren()}},{key:"render",value:function(s){var m,D=this;s&&(fc.detail=s,hc.detail=s);var L=((m=this.getConfig().future)===null||m===void 0?void 0:m.experimentalCancelEventPropagation)===!0;this.dispatchEvent(fc,L,L);var V=this.getRenderingService();V.render(this,s,function(){D.dispatchEvent(Al,L,L)}),this.dispatchEvent(hc,L,L)}},{key:"run",value:function(){var s=this,m=function(L,V){s.render(V),s.frameId=s.requestAnimationFrame(m)};m()}},{key:"initRenderer",value:function(s){var m=this,D=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;if(!s)throw new Error("Renderer is required.");this.inited=!1,this.readyPromise=void 0,this.context.renderingPlugins=[],this.context.renderingPlugins.push(new qc,new eu,new dc([new tu])),this.loadRendererContainerModule(s),this.context.contextService=new this.context.ContextService((0,l.Z)((0,l.Z)({},rr),this.context)),this.context.renderingService=new _c(rr,this.context),this.context.eventService=new ed(rr,this.context),this.context.eventService.init(),this.context.contextService.init?(this.context.contextService.init(),this.initRenderingService(s,D,!0)):this.context.contextService.initAsync().then(function(){m.initRenderingService(s,D)}).catch(function(L){console.error(L)})}},{key:"initRenderingService",value:function(s){var m=this,D=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,L=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;this.context.renderingService.init(function(){var V;m.inited=!0;var st=((V=m.getConfig().future)===null||V===void 0?void 0:V.experimentalCancelEventPropagation)===!0;D?L?m.requestAnimationFrame(function(){m.dispatchEvent(new ao(Xo.READY),st,st)}):m.dispatchEvent(new ao(Xo.READY),st,st):m.dispatchEvent(new ao(Xo.RENDERER_CHANGED),st,st),m.readyPromise&&m.resolveReadyPromise(),D||m.getRoot().forEach(function(Lt){var he,Te;(he=(Te=Lt).dirty)===null||he===void 0||he.call(Te,!0,!0)}),m.mountChildren(m.getRoot()),s.getConfig().enableAutoRendering&&m.run()})}},{key:"loadRendererContainerModule",value:function(s){var m=this,D=s.getPlugins();D.forEach(function(L){L.context=m.context,L.init(rr)})}},{key:"setRenderer",value:function(s){var m=this.getConfig();if(m.renderer!==s){var D=m.renderer;m.renderer=s,this.destroy(!1,!0),(0,_.Z)((D==null?void 0:D.getPlugins())||[]).reverse().forEach(function(L){L.destroy(rr)}),this.initRenderer(s)}}},{key:"setCursor",value:function(s){var m=this.getConfig();m.cursor=s,this.getContextService().applyCursorStyle(s)}},{key:"unmountChildren",value:function(s){var m=this;if(s.childNodes.forEach(function(V){m.unmountChildren(V)}),this.inited){if(s.isMutationObserved)s.dispatchEvent(Pl);else{var D,L=((D=this.getConfig().future)===null||D===void 0?void 0:D.experimentalCancelEventPropagation)===!0;Pl.target=s,this.dispatchEvent(Pl,!0,L)}s!==this.document.documentElement&&(s.ownerDocument=null),s.isConnected=!1}s.isCustomElement&&s.disconnectedCallback&&s.disconnectedCallback()}},{key:"mountChildren",value:function(s){var m=this,D=arguments.length>1&&arguments[1]!==void 0?arguments[1]:cl(s);if(this.inited){if(!s.isConnected&&(s.ownerDocument=this.document,s.isConnected=!0,!D))if(s.isMutationObserved)s.dispatchEvent(Tl);else{var L,V=((L=this.getConfig().future)===null||L===void 0?void 0:L.experimentalCancelEventPropagation)===!0;Tl.target=s,this.dispatchEvent(Tl,!0,V)}}else console.warn("[g]: You are trying to call `canvas.appendChild` before canvas' initialization finished. You can either await `canvas.ready` or listen to `CanvasEvent.READY` manually.","appended child: ",s.nodeName);s.childNodes.forEach(function(st){m.mountChildren(st,D)}),s.isCustomElement&&s.connectedCallback&&s.connectedCallback()}},{key:"mountFragment",value:function(s){this.mountChildren(s,!1)}},{key:"client2Viewport",value:function(s){return this.getEventService().client2Viewport(s)}},{key:"viewport2Client",value:function(s){return this.getEventService().viewport2Client(s)}},{key:"viewport2Canvas",value:function(s){return this.getEventService().viewport2Canvas(s)}},{key:"canvas2Viewport",value:function(s){return this.getEventService().canvas2Viewport(s)}},{key:"getPointByClient",value:function(s,m){return this.client2Viewport({x:s,y:m})}},{key:"getClientByPoint",value:function(s,m){return this.viewport2Client({x:s,y:m})}}])}(ec)},52402:function(Tt,vt,d){"use strict";d.d(vt,{TE:function(){return _},U4:function(){return Ot},Xk:function(){return zt},Y1:function(){return At},_x:function(){return xe},hE:function(){return Re},l5:function(){return ne},ph:function(){return le},vp:function(){return kt},x4:function(){return mt}});var l=d(94480),R=d(5131),O=d(45545);function _(Rt,_t,Vt,ae){var fe=Rt-Vt,me=_t-ae;return Math.sqrt(fe*fe+me*me)}function g(Rt,_t){var Vt=Math.min.apply(Math,(0,l.Z)(Rt)),ae=Math.min.apply(Math,(0,l.Z)(_t)),fe=Math.max.apply(Math,(0,l.Z)(Rt)),me=Math.max.apply(Math,(0,l.Z)(_t));return{x:Vt,y:ae,width:fe-Vt,height:me-ae}}function P(Rt){return(Rt+Math.PI*2)%(Math.PI*2)}function b(Rt,_t){var Vt=Math.abs(Rt);return _t>0?Vt:Vt*-1}function A(Rt,_t,Vt,ae,fe,me){var Ze=Vt,Ge=ae;if(Ze===0||Ge===0)return{x:Rt,y:_t};for(var Ve=fe-Rt,rn=me-_t,wn=Math.abs(Ve),on=Math.abs(rn),_n=Ze*Ze,Cn=Ge*Ge,Ln=Math.PI/4,En=0,cr=0,Bn=0;Bn<4;Bn++){En=Ze*Math.cos(Ln),cr=Ge*Math.sin(Ln);var br=(_n-Cn)*Math.pow(Math.cos(Ln),3)/Ze,fr=(Cn-_n)*Math.pow(Math.sin(Ln),3)/Ge,Zr=En-br,di=cr-fr,Xr=wn-br,Mr=on-fr,gi=Math.hypot(di,Zr),yi=Math.hypot(Mr,Xr),_i=gi*Math.asin((Zr*Mr-di*Xr)/(gi*yi)),qr=_i/Math.sqrt(_n+Cn-En*En-cr*cr);Ln+=qr,Ln=Math.min(Math.PI/2,Math.max(0,Ln))}return{x:Rt+b(En,Ve),y:_t+b(cr,rn)}}function I(Rt,_t,Vt,ae,fe,me,Ze,Ge){return-1*Vt*Math.cos(fe)*Math.sin(Ge)-ae*Math.sin(fe)*Math.cos(Ge)}function x(Rt,_t,Vt,ae,fe,me,Ze,Ge){return-1*Vt*Math.sin(fe)*Math.sin(Ge)+ae*Math.cos(fe)*Math.cos(Ge)}function k(Rt,_t,Vt){return Math.atan(-_t/Rt*Math.tan(Vt))}function N(Rt,_t,Vt){return Math.atan(_t/(Rt*Math.tan(Vt)))}function et(Rt,_t,Vt,ae,fe,me){return Vt*Math.cos(fe)*Math.cos(me)-ae*Math.sin(fe)*Math.sin(me)+Rt}function tt(Rt,_t,Vt,ae,fe,me){return Vt*Math.sin(fe)*Math.cos(me)+ae*Math.cos(fe)*Math.sin(me)+_t}function Ct(Rt,_t,Vt,ae){var fe=Math.atan2(ae*Rt,Vt*_t);return(fe+Math.PI*2)%(Math.PI*2)}function ut(Rt,_t,Vt){return{x:Rt*Math.cos(Vt),y:_t*Math.sin(Vt)}}function nt(Rt,_t,Vt){var ae=Math.cos(Vt),fe=Math.sin(Vt);return[Rt*ae-_t*fe,Rt*fe+_t*ae]}function kt(Rt,_t,Vt,ae,fe,me,Ze){for(var Ge=k(Vt,ae,fe),Ve=1/0,rn=-1/0,wn=[me,Ze],on=-Math.PI*2;on<=Math.PI*2;on+=Math.PI){var _n=Ge+on;me<Ze?me<_n&&_n<Ze&&wn.push(_n):Ze<_n&&_n<me&&wn.push(_n)}for(var Cn=0;Cn<wn.length;Cn++){var Ln=et(Rt,_t,Vt,ae,fe,wn[Cn]);Ln<Ve&&(Ve=Ln),Ln>rn&&(rn=Ln)}for(var En=N(Vt,ae,fe),cr=1/0,Bn=-1/0,br=[me,Ze],fr=-Math.PI*2;fr<=Math.PI*2;fr+=Math.PI){var Zr=En+fr;me<Ze?me<Zr&&Zr<Ze&&br.push(Zr):Ze<Zr&&Zr<me&&br.push(Zr)}for(var di=0;di<br.length;di++){var Xr=tt(Rt,_t,Vt,ae,fe,br[di]);Xr<cr&&(cr=Xr),Xr>Bn&&(Bn=Xr)}return{x:Ve,y:cr,width:rn-Ve,height:Bn-cr}}function Nt(Rt,_t,Vt,ae,fe,me,Ze,Ge,Ve){var rn=nt(Ge-Rt,Ve-_t,-fe),wn=_slicedToArray(rn,2),on=wn[0],_n=wn[1],Cn=A(0,0,Vt,ae,on,_n),Ln=Ct(Vt,ae,Cn.x,Cn.y);Ln<me?Cn=ut(Vt,ae,me):Ln>Ze&&(Cn=ut(Vt,ae,Ze));var En=nt(Cn.x,Cn.y,fe);return{x:En[0]+Rt,y:En[1]+_t}}function Bt(Rt,_t,Vt,ae,fe,me,Ze,Ge){var Ve=(Ze-me)*Ge+me,rn=I(Rt,_t,Vt,ae,fe,me,Ze,Ve),wn=x(Rt,_t,Vt,ae,fe,me,Ze,Ve);return P(Math.atan2(wn,rn))}var Xt=1e-4;function wt(Rt,_t,Vt,ae,fe,me){var Ze=-1,Ge=1/0,Ve=[Vt,ae],rn=20;me&&me>200&&(rn=me/10);for(var wn=1/rn,on=wn/10,_n=0;_n<=rn;_n++){var Cn=_n*wn,Ln=[fe.apply(void 0,(0,l.Z)(Rt.concat([Cn]))),fe.apply(void 0,(0,l.Z)(_t.concat([Cn])))],En=_(Ve[0],Ve[1],Ln[0],Ln[1]);En<Ge&&(Ze=Cn,Ge=En)}if(Ze===0)return{x:Rt[0],y:_t[0]};if(Ze===1){var cr=Rt.length;return{x:Rt[cr-1],y:_t[cr-1]}}Ge=1/0;for(var Bn=0;Bn<32&&!(on<Xt);Bn++){var br=Ze-on,fr=Ze+on,Zr=[fe.apply(void 0,(0,l.Z)(Rt.concat([br]))),fe.apply(void 0,(0,l.Z)(_t.concat([br])))],di=_(Ve[0],Ve[1],Zr[0],Zr[1]);if(br>=0&&di<Ge)Ze=br,Ge=di;else{var Xr=[fe.apply(void 0,(0,l.Z)(Rt.concat([fr]))),fe.apply(void 0,(0,l.Z)(_t.concat([fr])))],Mr=_(Ve[0],Ve[1],Xr[0],Xr[1]);fr<=1&&Mr<Ge?(Ze=fr,Ge=Mr):on*=.5}}return{x:fe.apply(void 0,(0,l.Z)(Rt.concat([Ze]))),y:fe.apply(void 0,(0,l.Z)(_t.concat([Ze])))}}function ot(Rt,_t){for(var Vt=0,ae=Rt.length,fe=0;fe<ae;fe++){var me=Rt[fe],Ze=_t[fe],Ge=Rt[(fe+1)%ae],Ve=_t[(fe+1)%ae];Vt+=_(me,Ze,Ge,Ve)}return Vt/2}function It(Rt,_t,Vt,ae){return g([Rt,Vt],[_t,ae])}function zt(Rt,_t,Vt,ae){return _(Rt,_t,Vt,ae)}function Ot(Rt,_t,Vt,ae,fe){return{x:(1-fe)*Rt+fe*Vt,y:(1-fe)*_t+fe*ae}}function pe(Rt,_t,Vt,ae,fe,me){var Ze=(Vt-Rt)*(fe-Rt)+(ae-_t)*(me-_t);if(Ze<0)return _(Rt,_t,fe,me);var Ge=(Vt-Rt)*(Vt-Rt)+(ae-_t)*(ae-_t);return Ze>Ge?_(Vt,ae,fe,me):xe(Rt,_t,Vt,ae,fe,me)}function xe(Rt,_t,Vt,ae,fe,me){var Ze=[Vt-Rt,ae-_t];if(O.I6(Ze,[0,0]))return Math.sqrt((fe-Rt)*(fe-Rt)+(me-_t)*(me-_t));var Ge=[-Ze[1],Ze[0]];O.Fv(Ge,Ge);var Ve=[fe-Rt,me-_t];return Math.abs(O.AK(Ve,Ge))}function qt(Rt,_t,Vt,ae){return Math.atan2(ae-_t,Vt-Rt)}function Ye(Rt,_t,Vt,ae,fe){var me=1-fe;return me*me*me*Rt+3*_t*fe*me*me+3*Vt*fe*fe*me+ae*fe*fe*fe}function We(Rt,_t,Vt,ae,fe){var me=1-fe;return 3*(me*me*(_t-Rt)+2*me*fe*(Vt-_t)+fe*fe*(ae-Vt))}function Oe(Rt,_t,Vt,ae){var fe=-3*Rt+9*_t-9*Vt+3*ae,me=6*Rt-12*_t+6*Vt,Ze=3*_t-3*Rt,Ge=[],Ve,rn,wn;if((0,R.Z)(fe,0))(0,R.Z)(me,0)||(Ve=-Ze/me,Ve>=0&&Ve<=1&&Ge.push(Ve));else{var on=me*me-4*fe*Ze;(0,R.Z)(on,0)?Ge.push(-me/(2*fe)):on>0&&(wn=Math.sqrt(on),Ve=(-me+wn)/(2*fe),rn=(-me-wn)/(2*fe),Ve>=0&&Ve<=1&&Ge.push(Ve),rn>=0&&rn<=1&&Ge.push(rn))}return Ge}function Qe(Rt,_t,Vt,ae,fe,me,Ze,Ge,Ve){var rn=Ye(Rt,Vt,fe,Ze,Ve),wn=Ye(_t,ae,me,Ge,Ve),on=Ot(Rt,_t,Vt,ae,Ve),_n=Ot(Vt,ae,fe,me,Ve),Cn=Ot(fe,me,Ze,Ge,Ve),Ln=Ot(on.x,on.y,_n.x,_n.y,Ve),En=Ot(_n.x,_n.y,Cn.x,Cn.y,Ve);return[[Rt,_t,on.x,on.y,Ln.x,Ln.y,rn,wn],[rn,wn,En.x,En.y,Cn.x,Cn.y,Ze,Ge]]}function Mt(Rt,_t,Vt,ae,fe,me,Ze,Ge,Ve){if(Ve===0)return ot([Rt,Vt,fe,Ze],[_t,ae,me,Ge]);var rn=Qe(Rt,_t,Vt,ae,fe,me,Ze,Ge,.5),wn=[].concat(_toConsumableArray(rn[0]),[Ve-1]),on=[].concat(_toConsumableArray(rn[1]),[Ve-1]);return Mt.apply(void 0,_toConsumableArray(wn))+Mt.apply(void 0,_toConsumableArray(on))}function ne(Rt,_t,Vt,ae,fe,me,Ze,Ge){for(var Ve=[Rt,Ze],rn=[_t,Ge],wn=Oe(Rt,Vt,fe,Ze),on=Oe(_t,ae,me,Ge),_n=0;_n<wn.length;_n++)Ve.push(Ye(Rt,Vt,fe,Ze,wn[_n]));for(var Cn=0;Cn<on.length;Cn++)rn.push(Ye(_t,ae,me,Ge,on[Cn]));return g(Ve,rn)}function Me(Rt,_t,Vt,ae,fe,me,Ze,Ge){return Mt(Rt,_t,Vt,ae,fe,me,Ze,Ge,3)}function nn(Rt,_t,Vt,ae,fe,me,Ze,Ge,Ve,rn,wn){return wt([Rt,Vt,fe,Ze],[_t,ae,me,Ge],Ve,rn,Ye,wn)}function le(Rt,_t,Vt,ae,fe,me,Ze,Ge,Ve,rn,wn){var on=nn(Rt,_t,Vt,ae,fe,me,Ze,Ge,Ve,rn,wn);return _(on.x,on.y,Ve,rn)}function be(Rt,_t,Vt,ae,fe,me,Ze,Ge,Ve){return{x:Ye(Rt,Vt,fe,Ze,Ve),y:Ye(_t,ae,me,Ge,Ve)}}function De(Rt,_t,Vt,ae,fe,me,Ze,Ge,Ve){var rn=We(Rt,Vt,fe,Ze,Ve),wn=We(_t,ae,me,Ge,Ve);return P(Math.atan2(wn,rn))}function Yt(Rt){for(var _t=0,Vt=[],ae=0;ae<Rt.length-1;ae++){var fe=Rt[ae],me=Rt[ae+1],Ze=_(fe[0],fe[1],me[0],me[1]),Ge={from:fe,to:me,length:Ze};Vt.push(Ge),_t+=Ze}return{segments:Vt,totalLength:_t}}function re(Rt){if(Rt.length<2)return 0;for(var _t=0,Vt=0;Vt<Rt.length-1;Vt++){var ae=Rt[Vt],fe=Rt[Vt+1];_t+=_(ae[0],ae[1],fe[0],fe[1])}return _t}function xt(Rt,_t){if(_t>1||_t<0||Rt.length<2)return null;var Vt=Yt(Rt),ae=Vt.segments,fe=Vt.totalLength;if(fe===0)return{x:Rt[0][0],y:Rt[0][1]};for(var me=0,Ze=null,Ge=0;Ge<ae.length;Ge++){var Ve=ae[Ge],rn=Ve.from,wn=Ve.to,on=Ve.length/fe;if(_t>=me&&_t<=me+on){var _n=(_t-me)/on;Ze=Ot(rn[0],rn[1],wn[0],wn[1],_n);break}me+=on}return Ze}function at(Rt,_t){if(_t>1||_t<0||Rt.length<2)return 0;for(var Vt=Yt(Rt),ae=Vt.segments,fe=Vt.totalLength,me=0,Ze=0,Ge=0;Ge<ae.length;Ge++){var Ve=ae[Ge],rn=Ve.from,wn=Ve.to,on=Ve.length/fe;if(_t>=me&&_t<=me+on){Ze=Math.atan2(wn[1]-rn[1],wn[0]-rn[0]);break}me+=on}return Ze}function se(Rt,_t,Vt){for(var ae=1/0,fe=0;fe<Rt.length-1;fe++){var me=Rt[fe],Ze=Rt[fe+1],Ge=pe(me[0],me[1],Ze[0],Ze[1],_t,Vt);Ge<ae&&(ae=Ge)}return ae}function Fe(Rt){for(var _t=[],Vt=[],ae=0;ae<Rt.length;ae++){var fe=Rt[ae];_t.push(fe[0]),Vt.push(fe[1])}return g(_t,Vt)}function Re(Rt){return re(Rt)}function ge(Rt,_t){return xt(Rt,_t)}function Ie(Rt,_t,Vt){return se(Rt,_t,Vt)}function Ne(Rt,_t){return at(Rt,_t)}function bt(Rt){var _t=Rt.slice(0);return Rt.length&&_t.push(Rt[0]),_t}function Jt(Rt){return Fe(Rt)}function oe(Rt){return re(bt(Rt))}function M(Rt,_t){return xt(bt(Rt),_t)}function Q(Rt,_t,Vt){return se(bt(Rt),_t,Vt)}function te(Rt,_t){return at(bt(Rt),_t)}function Ut(Rt,_t,Vt,ae){var fe=1-ae;return fe*fe*Rt+2*ae*fe*_t+ae*ae*Vt}function we(Rt,_t,Vt){var ae=Rt+Vt-2*_t;if((0,R.Z)(ae,0))return[.5];var fe=(Rt-_t)/ae;return fe<=1&&fe>=0?[fe]:[]}function Ce(Rt,_t,Vt,ae,fe,me,Ze){var Ge=Ut(Rt,Vt,fe,Ze),Ve=Ut(_t,ae,me,Ze),rn=Ot(Rt,_t,Vt,ae,Ze),wn=Ot(Vt,ae,fe,me,Ze);return[[Rt,_t,rn.x,rn.y,Ge,Ve],[Ge,Ve,wn.x,wn.y,fe,me]]}function _e(Rt,_t,Vt,ae,fe,me,Ze){if(Ze===0)return(_(Rt,_t,Vt,ae)+_(Vt,ae,fe,me)+_(Rt,_t,fe,me))/2;var Ge=Ce(Rt,_t,Vt,ae,fe,me,.5),Ve=Ge[0],rn=Ge[1];return Ve.push(Ze-1),rn.push(Ze-1),_e.apply(void 0,_toConsumableArray(Ve))+_e.apply(void 0,_toConsumableArray(rn))}function mt(Rt,_t,Vt,ae,fe,me){var Ze=we(Rt,Vt,fe)[0],Ge=we(_t,ae,me)[0],Ve=[Rt,fe],rn=[_t,me];return Ze!==void 0&&Ve.push(Ut(Rt,Vt,fe,Ze)),Ge!==void 0&&rn.push(Ut(_t,ae,me,Ge)),g(Ve,rn)}function X(Rt,_t,Vt,ae,fe,me){return _e(Rt,_t,Vt,ae,fe,me,3)}function Pt(Rt,_t,Vt,ae,fe,me,Ze,Ge){return wt([Rt,Vt,fe],[_t,ae,me],Ze,Ge,Ut)}function At(Rt,_t,Vt,ae,fe,me,Ze,Ge){var Ve=Pt(Rt,_t,Vt,ae,fe,me,Ze,Ge);return _(Ve.x,Ve.y,Ze,Ge)}},19584:function(Tt,vt,d){"use strict";d.d(vt,{S:function(){return k}});var l=d(33885),R=d(67732),O=d(83652),_=d(22214),g=d(42403),P=d(77263),b=d(75044),A=d(3202),I=d(68901);var x=function(){function N(et){(0,R.Z)(this,N),this.dragndropPluginOptions=et}return(0,O.Z)(N,[{key:"apply",value:function(tt){var Ct=this,ut=tt.renderingService,nt=tt.renderingContext,kt=nt.root.ownerDocument,Nt=kt.defaultView,Bt=function(wt){var ot=wt.target,It=ot===kt,zt=It&&Ct.dragndropPluginOptions.isDocumentDraggable?kt:ot.closest&&ot.closest("[draggable=true]");if(zt){var Ot=!1,pe=wt.timeStamp,xe=[wt.clientX,wt.clientY],qt=null,Ye=[wt.clientX,wt.clientY],We=function(){var Qe=(0,A.Z)((0,b.Z)().mark(function Mt(ne){var Me,nn,le,be,De,Yt;return(0,b.Z)().wrap(function(re){for(;;)switch(re.prev=re.next){case 0:if(Ot){re.next=2;break}if(Me=ne.timeStamp-pe,nn=(0,I.y)([ne.clientX,ne.clientY],xe),!(Me<=Ct.dragndropPluginOptions.dragstartTimeThreshold||nn<=Ct.dragndropPluginOptions.dragstartDistanceThreshold)){re.next=1;break}return re.abrupt("return");case 1:ne.type="dragstart",zt.dispatchEvent(ne),Ot=!0;case 2:if(ne.type="drag",ne.dx=ne.clientX-Ye[0],ne.dy=ne.clientY-Ye[1],zt.dispatchEvent(ne),Ye=[ne.clientX,ne.clientY],It){re.next=4;break}return le=Ct.dragndropPluginOptions.overlap==="pointer"?[ne.canvasX,ne.canvasY]:ot.getBounds().center,re.next=3,kt.elementsFromPoint(le[0],le[1]);case 3:be=re.sent,De=be[be.indexOf(ot)+1],Yt=(De==null?void 0:De.closest("[droppable=true]"))||(Ct.dragndropPluginOptions.isDocumentDroppable?kt:null),qt!==Yt&&(qt&&(ne.type="dragleave",ne.target=qt,qt.dispatchEvent(ne)),Yt&&(ne.type="dragenter",ne.target=Yt,Yt.dispatchEvent(ne)),qt=Yt,qt&&(ne.type="dragover",ne.target=qt,qt.dispatchEvent(ne)));case 4:case"end":return re.stop()}},Mt)}));return function(ne){return Qe.apply(this,arguments)}}();Nt.addEventListener("pointermove",We);var Oe=function(Mt){if(Ot){Mt.detail={preventClick:!0};var ne=Mt.clone();qt&&(ne.type="drop",ne.target=qt,qt.dispatchEvent(ne)),ne.type="dragend",zt.dispatchEvent(ne),Ot=!1}Nt.removeEventListener("pointermove",We)};ot.addEventListener("pointerup",Oe,{once:!0}),ot.addEventListener("pointerupoutside",Oe,{once:!0})}};ut.hooks.init.tap(N.tag,function(){Nt.addEventListener("pointerdown",Bt)}),ut.hooks.destroy.tap(N.tag,function(){Nt.removeEventListener("pointerdown",Bt)})}}])}();x.tag="Dragndrop";var k=function(N){function et(){var tt,Ct=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return(0,R.Z)(this,et),tt=(0,_.Z)(this,et),tt.name="dragndrop",tt.options=Ct,tt}return(0,g.Z)(et,N),(0,O.Z)(et,[{key:"init",value:function(){this.addRenderingPlugin(new x((0,l.Z)({overlap:"pointer",isDocumentDraggable:!1,isDocumentDroppable:!1,dragstartDistanceThreshold:0,dragstartTimeThreshold:0},this.options)))}},{key:"destroy",value:function(){this.removeAllRenderingPlugins()}},{key:"setOptions",value:function(Ct){Object.assign(this.plugins[0].dragndropPluginOptions,Ct)}}])}(P.F6)},14675:function(Tt,vt,d){"use strict";d.d(vt,{mN:function(){return l.mN},Xz:function(){return l.Xz},$6:function(){return l.$6},Cd:function(){return l.Cd},b_:function(){return l.b_},Aw:function(){return l.Aw},s$:function(){return l.s$},BB:function(){return l.BB},Dk:function(){return l.Dk},Pj:function(){return l.Pj},nR:function(){return l.nR},ZA:function(){return l.ZA},k9:function(){return l.k9},Ee:function(){return l.Ee},x1:function(){return l.x1},y$:function(){return l.y$},mg:function(){return l.mg},aH:function(){return l.aH},UL:function(){return l.UL},xv:function(){return l.xv},BV:function(){return l.BV},GZ:function(){return l.GZ}});var l=d(77263),R=d(67732),O=d(83652),_=d(22214),g=d(42403),P=d(71879),b=d(1933),A=d(94569),I=d(60187),x=d(92421);var k=function(ct){function ht(){var rt;(0,R.Z)(this,ht);for(var $t=arguments.length,Ht=new Array($t),ue=0;ue<$t;ue++)Ht[ue]=arguments[ue];return rt=(0,_.Z)(this,ht,[].concat(Ht)),rt.landmarks=[],rt}return(0,g.Z)(ht,ct),(0,O.Z)(ht,[{key:"rotate",value:function($t,Ht,ue){if(this.relElevation=(0,l._O)(Ht),this.relAzimuth=(0,l._O)($t),this.relRoll=(0,l._O)(ue),this.elevation+=this.relElevation,this.azimuth+=this.relAzimuth,this.roll+=this.relRoll,this.type===l.iM.EXPLORING){var Ee=A.yY(A.Ue(),[1,0,0],(0,l.Vl)((this.rotateWorld?1:-1)*this.relElevation)),ie=A.yY(A.Ue(),[0,1,0],(0,l.Vl)((this.rotateWorld?1:-1)*this.relAzimuth)),Pe=A.yY(A.Ue(),[0,0,1],(0,l.Vl)(this.relRoll)),Be=A.Jp(A.Ue(),ie,Ee);Be=A.Jp(A.Ue(),Be,Pe);var He=I.fromQuat(I.create(),Be);I.translate(this.matrix,this.matrix,[0,0,-this.distance]),I.multiply(this.matrix,this.matrix,He),I.translate(this.matrix,this.matrix,[0,0,this.distance])}else{if(Math.abs(this.elevation)>90)return this;this.computeMatrix()}return this._getAxes(),this.type===l.iM.ORBITING||this.type===l.iM.EXPLORING?this._getPosition():this.type===l.iM.TRACKING&&this._getFocalPoint(),this._update(),this}},{key:"pan",value:function($t,Ht){var ue=(0,l.O4)($t,Ht,0),Ee=x.d9(this.position);return x.IH(Ee,Ee,x.bA(x.Ue(),this.right,ue[0])),x.IH(Ee,Ee,x.bA(x.Ue(),this.up,ue[1])),this._setPosition(Ee),this.triggerUpdate(),this}},{key:"dolly",value:function($t){var Ht=this.forward,ue=x.d9(this.position),Ee=$t*this.dollyingStep,ie=this.distance+$t*this.dollyingStep;return Ee=Math.max(Math.min(ie,this.maxDistance),this.minDistance)-this.distance,ue[0]+=Ee*Ht[0],ue[1]+=Ee*Ht[1],ue[2]+=Ee*Ht[2],this._setPosition(ue),this.type===l.iM.ORBITING||this.type===l.iM.EXPLORING?this._getDistance():this.type===l.iM.TRACKING&&x.IH(this.focalPoint,ue,this.distanceVector),this.triggerUpdate(),this}},{key:"cancelLandmarkAnimation",value:function(){this.landmarkAnimationID!==void 0&&this.canvas.cancelAnimationFrame(this.landmarkAnimationID)}},{key:"createLandmark",value:function($t){var Ht,ue,Ee,ie,Pe=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},Be=Pe.position,He=Be===void 0?this.position:Be,en=Pe.focalPoint,un=en===void 0?this.focalPoint:en,mn=Pe.roll,Sn=Pe.zoom,Pn=new l.GZ.CameraContribution;Pn.setType(this.type,void 0),Pn.setPosition(He[0],(Ht=He[1])!==null&&Ht!==void 0?Ht:this.position[1],(ue=He[2])!==null&&ue!==void 0?ue:this.position[2]),Pn.setFocalPoint(un[0],(Ee=un[1])!==null&&Ee!==void 0?Ee:this.focalPoint[1],(ie=un[2])!==null&&ie!==void 0?ie:this.focalPoint[2]),Pn.setRoll(mn!=null?mn:this.roll),Pn.setZoom(Sn!=null?Sn:this.zoom);var $n={name:$t,matrix:I.clone(Pn.getWorldTransform()),right:x.d9(Pn.right),up:x.d9(Pn.up),forward:x.d9(Pn.forward),position:x.d9(Pn.getPosition()),focalPoint:x.d9(Pn.getFocalPoint()),distanceVector:x.d9(Pn.getDistanceVector()),distance:Pn.getDistance(),dollyingStep:Pn.getDollyingStep(),azimuth:Pn.getAzimuth(),elevation:Pn.getElevation(),roll:Pn.getRoll(),relAzimuth:Pn.relAzimuth,relElevation:Pn.relElevation,relRoll:Pn.relRoll,zoom:Pn.getZoom()};return this.landmarks.push($n),$n}},{key:"gotoLandmark",value:function($t){var Ht=this,ue=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},Ee=(0,P.Z)($t)?this.landmarks.find(function(Or){return Or.name===$t}):$t;if(Ee){var ie=(0,b.Z)(ue)?{duration:ue}:ue,Pe=ie.easing,Be=Pe===void 0?"linear":Pe,He=ie.duration,en=He===void 0?100:He,un=ie.easingFunction,mn=un===void 0?void 0:un,Sn=ie.onfinish,Pn=Sn===void 0?void 0:Sn,$n=ie.onframe,Wn=$n===void 0?void 0:$n,Xn=.01;this.cancelLandmarkAnimation();var An=Ee.position,Zn=Ee.focalPoint,qn=Ee.zoom,er=Ee.roll,Cr=mn||l.GZ.EasingFunction(Be),Un,ar=function(){Ht.setFocalPoint(Zn),Ht.setPosition(An),Ht.setRoll(er),Ht.setZoom(qn),Ht.computeMatrix(),Ht.triggerUpdate(),Pn==null||Pn()};if(en===0)return ar();var ii=function(Lr){Un===void 0&&(Un=Lr);var fi=Lr-Un;if(fi>=en){ar();return}var zr=Cr(fi/en),Er=x.Ue(),mr=x.Ue(),si=1,Si=0;x.t7(Er,Ht.focalPoint,Zn,zr),x.t7(mr,Ht.position,An,zr),Si=Ht.roll*(1-zr)+er*zr,si=Ht.zoom*(1-zr)+qn*zr,Ht.setFocalPoint(Er),Ht.setPosition(mr),Ht.setRoll(Si),Ht.setZoom(si);var Mi=x.TK(Er,Zn)+x.TK(mr,An);if(Mi<=Xn&&qn===void 0&&er===void 0)return ar();Ht.computeMatrix(),Ht.triggerUpdate(),fi<en&&(Wn==null||Wn(zr),Ht.landmarkAnimationID=Ht.canvas.requestAnimationFrame(ii))};this.canvas.requestAnimationFrame(ii)}}}])}(l.V1);l.GZ.CameraContribution=k;var N=null,et=0,tt=new WeakMap,Ct=null,ut=null,nt,kt;function Nt(ct,ht){return nt=new N(ct,ht)}function Bt(ct){return kt||(kt=N.copy(nt),kt.oldValue=ct,kt)}function Xt(){nt=kt=void 0}function wt(ct){return ct===kt||ct===nt}function ot(ct,ht){return ct===ht?ct:kt&&wt(ct)?kt:null}function It(ct){ct.nodes.forEach(function(ht){var rt=tt.get(ht);rt&&rt.forEach(function($t){$t.observer===ct&&$t.removeTransientObservers()})})}function zt(ct,ht){for(var rt=ct;rt;rt=rt.parentNode){var $t=tt.get(rt);if($t)for(var Ht=0;Ht<$t.length;Ht++){var ue=$t[Ht],Ee=ue.options;if(!(rt!==ct&&!Ee.subtree)){var ie=ht(Ee);ie&&ue.enqueue(ie)}}}}var Ot=!1,pe=null;function xe(ct){pe.push(ct),Ot||(Ot=!0,typeof runtime.globalThis!="undefined"?runtime.globalThis.setTimeout(qt):qt())}function qt(){Ot=!1;var ct=pe;pe=[],ct.sort(function(rt,$t){return rt.uid-$t.uid});var ht=!1;ct.forEach(function(rt){var $t=rt.takeRecords();It(rt),$t.length&&(rt.callback($t,rt),ht=!0)}),ht&&qt()}var Ye=d(94480),We=d(42978),Oe=d(70208),Qe=d(76075);var Mt=function(ct){function ht(rt,$t,Ht,ue){var Ee;return(0,R.Z)(this,ht),Ee=(0,_.Z)(this,ht,[rt]),Ee.currentTime=Ht,Ee.timelineTime=ue,Ee.target=$t,Ee.type="finish",Ee.bubbles=!1,Ee.currentTarget=$t,Ee.defaultPrevented=!1,Ee.eventPhase=Ee.AT_TARGET,Ee.timeStamp=Date.now(),Ee.currentTime=Ht,Ee.timelineTime=ue,Ee}return(0,g.Z)(ht,ct),(0,O.Z)(ht)}(l.xA),ne=0,Me=function(){function ct(ht,rt){var $t;(0,R.Z)(this,ct),this.currentTimePending=!1,this._idle=!0,this._paused=!1,this._finishedFlag=!0,this._currentTime=0,this._playbackRate=1,this._inTimeline=!0,this.effect=ht,ht.animation=this,this.timeline=rt,this.id="".concat(ne++),this._inEffect=!!this.effect.update(0),this._totalDuration=Number(($t=this.effect)===null||$t===void 0?void 0:$t.getComputedTiming().endTime),this._holdTime=0,this._paused=!1,this.oldPlayState="idle",this.updatePromises()}return(0,O.Z)(ct,[{key:"pending",get:function(){return this._startTime===null&&!this._paused&&this.playbackRate!==0||this.currentTimePending}},{key:"playState",get:function(){return this._idle?"idle":this._isFinished?"finished":this._paused?"paused":"running"}},{key:"ready",get:function(){var rt=this;return this.readyPromise||(this.timeline.animationsWithPromises.indexOf(this)===-1&&this.timeline.animationsWithPromises.push(this),this.readyPromise=new Promise(function($t,Ht){rt.resolveReadyPromise=function(){$t(rt)},rt.rejectReadyPromise=function(){Ht(new Error)}}),this.pending||this.resolveReadyPromise()),this.readyPromise}},{key:"finished",get:function(){var rt=this;return this.finishedPromise||(this.timeline.animationsWithPromises.indexOf(this)===-1&&this.timeline.animationsWithPromises.push(this),this.finishedPromise=new Promise(function($t,Ht){rt.resolveFinishedPromise=function(){$t(rt)},rt.rejectFinishedPromise=function(){Ht(new Error)}}),this.playState==="finished"&&this.resolveFinishedPromise()),this.finishedPromise}},{key:"currentTime",get:function(){return this.updatePromises(),this._idle||this.currentTimePending?null:this._currentTime},set:function(rt){if(rt=Number(rt),!isNaN(rt)){if(this.timeline.restart(),!this._paused&&this._startTime!==null){var $t;this._startTime=Number(($t=this.timeline)===null||$t===void 0?void 0:$t.currentTime)-rt/this.playbackRate}this.currentTimePending=!1,this._currentTime!==rt&&(this._idle&&(this._idle=!1,this._paused=!0),this.tickCurrentTime(rt,!0),this.timeline.applyDirtiedAnimation(this))}}},{key:"startTime",get:function(){return this._startTime},set:function(rt){if(rt!==null){if(this.updatePromises(),rt=Number(rt),isNaN(rt)||this._paused||this._idle)return;this._startTime=rt,this.tickCurrentTime((Number(this.timeline.currentTime)-this._startTime)*this.playbackRate),this.timeline.applyDirtiedAnimation(this),this.updatePromises()}}},{key:"playbackRate",get:function(){return this._playbackRate},set:function(rt){if(rt!==this._playbackRate){this.updatePromises();var $t=this.currentTime;this._playbackRate=rt,this.startTime=null,this.playState!=="paused"&&this.playState!=="idle"&&(this._finishedFlag=!1,this._idle=!1,this.ensureAlive(),this.timeline.applyDirtiedAnimation(this)),$t!==null&&(this.currentTime=$t),this.updatePromises()}}},{key:"_isFinished",get:function(){return!this._idle&&(this._playbackRate>0&&Number(this._currentTime)>=this._totalDuration||this._playbackRate<0&&Number(this._currentTime)<=0)}},{key:"totalDuration",get:function(){return this._totalDuration}},{key:"_needsTick",get:function(){return this.pending||this.playState==="running"||!this._finishedFlag}},{key:"updatePromises",value:function(){var rt;if((rt=this.effect.target)!==null&&rt!==void 0&&rt.destroyed)return this.readyPromise=void 0,this.finishedPromise=void 0,!1;var $t=this.oldPlayState,Ht=this.pending?"pending":this.playState;return this.readyPromise&&Ht!==$t&&(Ht==="idle"?(this.rejectReadyPromise(),this.readyPromise=void 0):$t==="pending"?this.resolveReadyPromise():Ht==="pending"&&(this.readyPromise=void 0)),this.finishedPromise&&Ht!==$t&&(Ht==="idle"?(this.rejectFinishedPromise(),this.finishedPromise=void 0):Ht==="finished"?this.resolveFinishedPromise():$t==="finished"&&(this.finishedPromise=void 0)),this.oldPlayState=Ht,this.readyPromise||this.finishedPromise}},{key:"play",value:function(){this.updatePromises(),this._paused=!1,(this._isFinished||this._idle)&&(this.rewind(),this._startTime=null),this._finishedFlag=!1,this._idle=!1,this.ensureAlive(),this.timeline.applyDirtiedAnimation(this),this.timeline.animations.indexOf(this)===-1&&this.timeline.animations.push(this),this.updatePromises()}},{key:"pause",value:function(){this.updatePromises(),this.currentTime&&(this._holdTime=this.currentTime),!this._isFinished&&!this._paused&&!this._idle?this.currentTimePending=!0:this._idle&&(this.rewind(),this._idle=!1),this._startTime=null,this._paused=!0,this.updatePromises()}},{key:"finish",value:function(){this.updatePromises(),!this._idle&&(this.currentTime=this._playbackRate>0?this._totalDuration:0,this._startTime=this._totalDuration-this.currentTime,this.currentTimePending=!1,this.timeline.applyDirtiedAnimation(this),this.updatePromises())}},{key:"cancel",value:function(){var rt=this;if(this.updatePromises(),!!this._inEffect&&(this._inEffect=!1,this._idle=!0,this._paused=!1,this._finishedFlag=!0,this._currentTime=0,this._startTime=null,this.effect.update(null),this.timeline.applyDirtiedAnimation(this),this.updatePromises(),this.oncancel)){var $t=new Mt(null,this,this.currentTime,null);setTimeout(function(){rt.oncancel($t)})}}},{key:"reverse",value:function(){this.updatePromises();var rt=this.currentTime;this.playbackRate*=-1,this.play(),rt!==null&&(this.currentTime=rt),this.updatePromises()}},{key:"updatePlaybackRate",value:function(rt){this.playbackRate=rt}},{key:"targetAnimations",value:function(){var rt,$t=(rt=this.effect)===null||rt===void 0?void 0:rt.target;return $t.getAnimations()}},{key:"markTarget",value:function(){var rt=this.targetAnimations();rt.indexOf(this)===-1&&rt.push(this)}},{key:"unmarkTarget",value:function(){var rt=this.targetAnimations(),$t=rt.indexOf(this);$t!==-1&&rt.splice($t,1)}},{key:"tick",value:function(rt,$t){!this._idle&&!this._paused&&(this._startTime===null?$t&&(this.startTime=rt-this._currentTime/this.playbackRate):this._isFinished||this.tickCurrentTime((rt-this._startTime)*this.playbackRate)),$t&&(this.currentTimePending=!1,this.fireEvents(rt))}},{key:"rewind",value:function(){if(this.playbackRate>=0)this.currentTime=0;else if(this._totalDuration<1/0)this.currentTime=this._totalDuration;else throw new Error("Unable to rewind negative playback rate animation with infinite duration")}},{key:"persist",value:function(){throw new Error(l.jf)}},{key:"addEventListener",value:function(rt,$t,Ht){throw new Error(l.jf)}},{key:"removeEventListener",value:function(rt,$t,Ht){throw new Error(l.jf)}},{key:"dispatchEvent",value:function(rt){throw new Error(l.jf)}},{key:"commitStyles",value:function(){throw new Error(l.jf)}},{key:"ensureAlive",value:function(){if(this.playbackRate<0&&this.currentTime===0){var rt;this._inEffect=!!((rt=this.effect)!==null&&rt!==void 0&&rt.update(-1))}else{var $t;this._inEffect=!!(($t=this.effect)!==null&&$t!==void 0&&$t.update(this.currentTime))}!this._inTimeline&&(this._inEffect||!this._finishedFlag)&&(this._inTimeline=!0,this.timeline.animations.push(this))}},{key:"tickCurrentTime",value:function(rt,$t){rt!==this._currentTime&&(this._currentTime=rt,this._isFinished&&!$t&&(this._currentTime=this._playbackRate>0?this._totalDuration:0),this.ensureAlive())}},{key:"fireEvents",value:function(rt){var $t=this;if(this._isFinished){if(!this._finishedFlag){if(this.onfinish){var Ht=new Mt(null,this,this.currentTime,rt);setTimeout(function(){$t.onfinish&&$t.onfinish(Ht)})}this._finishedFlag=!0}}else{if(this.onframe&&this.playState==="running"){var ue=new Mt(null,this,this.currentTime,rt);this.onframe(ue)}this._finishedFlag=!1}}}])}(),nn=4,le=.001,be=1e-7,De=10,Yt=11,re=1/(Yt-1),xt=typeof Float32Array=="function",at=function(ht,rt){return 1-3*rt+3*ht},se=function(ht,rt){return 3*rt-6*ht},Fe=function(ht){return 3*ht},Re=function(ht,rt,$t){return((at(rt,$t)*ht+se(rt,$t))*ht+Fe(rt))*ht},ge=function(ht,rt,$t){return 3*at(rt,$t)*ht*ht+2*se(rt,$t)*ht+Fe(rt)},Ie=function(ht,rt,$t,Ht,ue){var Ee,ie,Pe=0;do ie=rt+($t-rt)/2,Ee=Re(ie,Ht,ue)-ht,Ee>0?$t=ie:rt=ie;while(Math.abs(Ee)>be&&++Pe<De);return ie},Ne=function(ht,rt,$t,Ht){for(var ue=0;ue<nn;++ue){var Ee=ge(rt,$t,Ht);if(Ee===0)return rt;var ie=Re(rt,$t,Ht)-ht;rt-=ie/Ee}return rt},bt=function(ht,rt,$t,Ht){if(!(ht>=0&&ht<=1&&$t>=0&&$t<=1))throw new Error("bezier x values must be in [0, 1] range");if(ht===rt&&$t===Ht)return function(Pe){return Pe};for(var ue=xt?new Float32Array(Yt):new Array(Yt),Ee=0;Ee<Yt;++Ee)ue[Ee]=Re(Ee*re,ht,$t);var ie=function(Be){for(var He=0,en=1,un=Yt-1;en!==un&&ue[en]<=Be;++en)He+=re;--en;var mn=(Be-ue[en])/(ue[en+1]-ue[en]),Sn=He+mn*re,Pn=ge(Sn,ht,$t);return Pn>=le?Ne(Be,Sn,ht,$t):Pn===0?Sn:Ie(Be,He,He+re,ht,$t)};return function(Pe){return Pe===0||Pe===1?Pe:Re(ie(Pe),rt,Ht)}},Jt=function(ht){return ht=ht.replace(/([A-Z])/g,function(rt){return"-".concat(rt.toLowerCase())}),ht.charAt(0)==="-"?ht.substring(1):ht},oe=function(ht){return Math.pow(ht,2)},M=function(ht){return Math.pow(ht,3)},Q=function(ht){return Math.pow(ht,4)},te=function(ht){return Math.pow(ht,5)},Ut=function(ht){return Math.pow(ht,6)},we=function(ht){return 1-Math.cos(ht*Math.PI/2)},Ce=function(ht){return 1-Math.sqrt(1-ht*ht)},_e=function(ht){return ht*ht*(3*ht-2)},mt=function(ht){for(var rt,$t=4;ht<((rt=Math.pow(2,--$t))-1)/11;);return 1/Math.pow(4,3-$t)-7.5625*Math.pow((rt*3-2)/22-ht,2)},X=function(ht){var rt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],$t=(0,We.Z)(rt,2),Ht=$t[0],ue=Ht===void 0?1:Ht,Ee=$t[1],ie=Ee===void 0?.5:Ee,Pe=(0,Oe.Z)(Number(ue),1,10),Be=(0,Oe.Z)(Number(ie),.1,2);return ht===0||ht===1?ht:-Pe*Math.pow(2,10*(ht-1))*Math.sin((ht-1-Be/(Math.PI*2)*Math.asin(1/Pe))*(Math.PI*2)/Be)},Pt=function(ht){var rt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],$t=arguments.length>2?arguments[2]:void 0,Ht=(0,We.Z)(rt,4),ue=Ht[0],Ee=ue===void 0?1:ue,ie=Ht[1],Pe=ie===void 0?100:ie,Be=Ht[2],He=Be===void 0?10:Be,en=Ht[3],un=en===void 0?0:en;Ee=(0,Oe.Z)(Ee,.1,1e3),Pe=(0,Oe.Z)(Pe,.1,1e3),He=(0,Oe.Z)(He,.1,1e3),un=(0,Oe.Z)(un,.1,1e3);var mn=Math.sqrt(Pe/Ee),Sn=He/(2*Math.sqrt(Pe*Ee)),Pn=Sn<1?mn*Math.sqrt(1-Sn*Sn):0,$n=1,Wn=Sn<1?(Sn*mn+-un)/Pn:-un+mn,Xn=$t?$t*ht/1e3:ht;return Sn<1?Xn=Math.exp(-Xn*Sn*mn)*($n*Math.cos(Pn*Xn)+Wn*Math.sin(Pn*Xn)):Xn=($n+Wn*Xn)*Math.exp(-Xn*mn),ht===0||ht===1?ht:1-Xn},At=function(ht){var rt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],$t=rt,Ht=(0,We.Z)($t,2),ue=Ht[0],Ee=ue===void 0?10:ue,ie=Ht[1],Pe=ie==="start"?Math.ceil:Math.floor;return Pe((0,Oe.Z)(ht,0,1)*Ee)/Ee},Rt=function(ht){var rt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],$t=(0,We.Z)(rt,4),Ht=$t[0],ue=$t[1],Ee=$t[2],ie=$t[3];return bt(Ht,ue,Ee,ie)(ht)},_t=bt(.42,0,1,1),Vt=function(ht){return function(rt){var $t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],Ht=arguments.length>2?arguments[2]:void 0;return 1-ht(1-rt,$t,Ht)}},ae=function(ht){return function(rt){var $t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],Ht=arguments.length>2?arguments[2]:void 0;return rt<.5?ht(rt*2,$t,Ht)/2:1-ht(rt*-2+2,$t,Ht)/2}},fe=function(ht){return function(rt){var $t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],Ht=arguments.length>2?arguments[2]:void 0;return rt<.5?(1-ht(1-rt*2,$t,Ht))/2:(ht(rt*2-1,$t,Ht)+1)/2}},me={steps:At,"step-start":function(ht){return At(ht,[1,"start"])},"step-end":function(ht){return At(ht,[1,"end"])},linear:function(ht){return ht},"cubic-bezier":Rt,ease:function(ht){return Rt(ht,[.25,.1,.25,1])},in:_t,out:Vt(_t),"in-out":ae(_t),"out-in":fe(_t),"in-quad":oe,"out-quad":Vt(oe),"in-out-quad":ae(oe),"out-in-quad":fe(oe),"in-cubic":M,"out-cubic":Vt(M),"in-out-cubic":ae(M),"out-in-cubic":fe(M),"in-quart":Q,"out-quart":Vt(Q),"in-out-quart":ae(Q),"out-in-quart":fe(Q),"in-quint":te,"out-quint":Vt(te),"in-out-quint":ae(te),"out-in-quint":fe(te),"in-expo":Ut,"out-expo":Vt(Ut),"in-out-expo":ae(Ut),"out-in-expo":fe(Ut),"in-sine":we,"out-sine":Vt(we),"in-out-sine":ae(we),"out-in-sine":fe(we),"in-circ":Ce,"out-circ":Vt(Ce),"in-out-circ":ae(Ce),"out-in-circ":fe(Ce),"in-back":_e,"out-back":Vt(_e),"in-out-back":ae(_e),"out-in-back":fe(_e),"in-bounce":mt,"out-bounce":Vt(mt),"in-out-bounce":ae(mt),"out-in-bounce":fe(mt),"in-elastic":X,"out-elastic":Vt(X),"in-out-elastic":ae(X),"out-in-elastic":fe(X),spring:Pt,"spring-in":Pt,"spring-out":Vt(Pt),"spring-in-out":ae(Pt),"spring-out-in":fe(Pt)},Ze=function(ht){return Jt(ht).replace(/^ease-/,"").replace(/(\(|\s).+/,"").toLowerCase().trim()},Ge=function(ht){return me[Ze(ht)]||me.linear},Ve=function(ht){return ht},rn=1,wn=.5,on=0;function _n(ct,ht){return function(rt){if(rt>=1)return 1;var $t=1/ct;return rt+=ht*$t,rt-rt%$t}}var Cn="\\s*(-?\\d+\\.?\\d*|-?\\.\\d+)\\s*",Ln=new RegExp("cubic-bezier\\(".concat(Cn,",").concat(Cn,",").concat(Cn,",").concat(Cn,"\\)")),En=/steps\(\s*(\d+)\s*\)/,cr=/steps\(\s*(\d+)\s*,\s*(start|middle|end)\s*\)/;function Bn(ct){var ht=Ln.exec(ct);if(ht)return bt.apply(void 0,(0,Ye.Z)(ht.slice(1).map(Number)));var rt=En.exec(ct);if(rt)return _n(Number(rt[1]),on);var $t=cr.exec(ct);return $t?_n(Number($t[1]),{start:rn,middle:wn,end:on}[$t[2]]):Ge(ct)}function br(ct){return Math.abs(fr(ct)/(ct.playbackRate||1))}function fr(ct){var ht;return ct.duration===0||ct.iterations===0?0:(ct.duration==="auto"?0:Number(ct.duration))*((ht=ct.iterations)!==null&&ht!==void 0?ht:1)}var Zr=0,di=1,Xr=2,Mr=3;function gi(ct,ht,rt){if(ht===null)return Zr;var $t=rt.endTime;return ht<Math.min(rt.delay,$t)?di:ht>=Math.min(rt.delay+ct+rt.endDelay,$t)?Xr:Mr}function yi(ct,ht,rt,$t,Ht){switch($t){case di:return ht==="backwards"||ht==="both"?0:null;case Mr:return rt-Ht;case Xr:return ht==="forwards"||ht==="both"?ct:null;case Zr:return null}}function _i(ct,ht,rt,$t,Ht){var ue=Ht;return ct===0?ht!==di&&(ue+=rt):ue+=$t/ct,ue}function qr(ct,ht,rt,$t,Ht,ue){var Ee=ct===1/0?ht%1:ct%1;return Ee===0&&rt===Xr&&$t!==0&&(Ht!==0||ue===0)&&(Ee=1),Ee}function Jn(ct,ht,rt,$t){return ct===Xr&&ht===1/0?1/0:rt===1?Math.floor($t)-1:Math.floor($t)}function sn(ct,ht,rt){var $t=ct;if(ct!=="normal"&&ct!=="reverse"){var Ht=ht;ct==="alternate-reverse"&&(Ht+=1),$t="normal",Ht!==1/0&&Ht%2!==0&&($t="reverse")}return $t==="normal"?rt:1-rt}function Wt(ct,ht,rt){var $t=gi(ct,ht,rt),Ht=yi(ct,rt.fill,ht,$t,rt.delay);if(Ht===null)return null;var ue=rt.duration==="auto"?0:rt.duration,Ee=_i(ue,$t,rt.iterations,Ht,rt.iterationStart),ie=qr(Ee,rt.iterationStart,$t,rt.iterations,Ht,ue),Pe=Jn($t,rt.iterations,ie,Ee),Be=sn(rt.direction,Pe,ie);return rt.currentIteration=Pe,rt.progress=Be,rt.easingFunction(Be)}function y(ct,ht,rt){var $t=c(ct,ht),Ht=f($t,rt);return function(ue,Ee){if(Ee!==null)Ht.filter(function(Pe){return Ee>=Pe.applyFrom&&Ee<Pe.applyTo}).forEach(function(Pe){var Be=Ee-Pe.startOffset,He=Pe.endOffset-Pe.startOffset,en=He===0?0:Be/He;ue.setAttribute(Pe.property,Pe.interpolation(en),!1,!1)});else for(var ie in $t)E(ie)&&ue.setAttribute(ie,null)}}function E(ct){return ct!=="offset"&&ct!=="easing"&&ct!=="composite"&&ct!=="computedOffset"}function c(ct,ht){for(var rt={},$t=0;$t<ct.length;$t++)for(var Ht in ct[$t])if(E(Ht)){var ue={offset:ct[$t].offset,computedOffset:ct[$t].computedOffset,easing:ct[$t].easing,easingFunction:Bn(ct[$t].easing)||ht.easingFunction,value:ct[$t][Ht]};rt[Ht]=rt[Ht]||[],rt[Ht].push(ue)}return rt}function f(ct,ht){var rt=[];for(var $t in ct)for(var Ht=ct[$t],ue=0;ue<Ht.length-1;ue++){var Ee=ue,ie=ue+1,Pe=Ht[Ee].computedOffset,Be=Ht[ie].computedOffset,He=Pe,en=Be;ue===0&&(He=-1/0,Be===0&&(ie=Ee)),ue===Ht.length-2&&(en=1/0,Pe===1&&(Ee=ie)),rt.push({applyFrom:He,applyTo:en,startOffset:Ht[Ee].computedOffset,endOffset:Ht[ie].computedOffset,easingFunction:Ht[Ee].easingFunction,property:$t,interpolation:Z($t,Ht[Ee].value,Ht[ie].value,ht)})}return rt.sort(function(un,mn){return un.startOffset-mn.startOffset}),rt}var w=function(ht,rt,$t){return function(Ht){var ue=z(ht,rt,Ht);return(0,b.Z)(ue)?ue:$t(ue)}};function Z(ct,ht,rt,$t){var Ht=l.N1[ct];if(Ht&&Ht.syntax&&Ht.int){var ue=l.GZ.styleValueRegistry.getPropertySyntax(Ht.syntax);if(ue){var Ee=ue.parser,ie=Ee?Ee(ht,$t):ht,Pe=Ee?Ee(rt,$t):rt,Be=ue.mixer(ie,Pe,$t);if(Be){var He=w.apply(void 0,(0,Ye.Z)(Be));return function(en){return en===0?ht:en===1?rt:He(en)}}}}return w(!1,!0,function(en){return en?rt:ht})}function z(ct,ht,rt){if(typeof ct=="number"&&typeof ht=="number")return ct*(1-rt)+ht*rt;if(typeof ct=="boolean"&&typeof ht=="boolean"||typeof ct=="string"&&typeof ht=="string")return rt<.5?ct:ht;if(Array.isArray(ct)&&Array.isArray(ht)){for(var $t=ct.length,Ht=ht.length,ue=Math.max($t,Ht),Ee=[],ie=0;ie<ue;ie++)Ee.push(z(ct[ie<$t?ie:$t-1],ht[ie<Ht?ie:Ht-1],rt));return Ee}throw new Error("Mismatched interpolation arguments ".concat(ct,":").concat(ht))}var H=function(){function ct(){(0,R.Z)(this,ct),this.delay=0,this.direction="normal",this.duration="auto",this._easing="linear",this.easingFunction=Ve,this.endDelay=0,this.fill="auto",this.iterationStart=0,this.iterations=1,this.currentIteration=null,this.progress=null}return(0,O.Z)(ct,[{key:"easing",get:function(){return this._easing},set:function(rt){this.easingFunction=Bn(rt),this._easing=rt}}])}();function q(ct){var ht=[];for(var rt in ct)if(!(rt in["easing","offset","composite"])){var $t=ct[rt];Array.isArray($t)||($t=[$t]);for(var Ht=$t.length,ue=0;ue<Ht;ue++){if(!ht[ue]){var Ee={};"offset"in ct&&(Ee.offset=Number(ct.offset)),"easing"in ct&&(Ee.easing=ct.easing),"composite"in ct&&(Ee.composite=ct.composite),ht[ue]=Ee}$t[ue]!==void 0&&$t[ue]!==null&&(ht[ue][rt]=$t[ue])}}return ht.sort(function(ie,Pe){return(ie.computedOffset||0)-(Pe.computedOffset||0)}),ht}function Dt(ct,ht){if(ct===null)return[];Array.isArray(ct)||(ct=q(ct));for(var rt=ct.map(function(Pe){var Be={};ht!=null&&ht.composite&&(Be.composite="auto");for(var He in Pe){var en=Pe[He];if(He==="offset"){if(en!==null){if(en=Number(en),!isFinite(en))throw new Error("Keyframe offsets must be numbers.");if(en<0||en>1)throw new Error("Keyframe offsets must be between 0 and 1.");Be.computedOffset=en}}else if(He==="composite"&&["replace","add","accumulate","auto"].indexOf(en)===-1)throw new Error("".concat(en," compositing is not supported"));Be[He]=en}return Be.offset===void 0&&(Be.offset=null),Be.easing===void 0&&(Be.easing=(ht==null?void 0:ht.easing)||"linear"),Be.composite===void 0&&(Be.composite="auto"),Be}),$t=!0,Ht=-1/0,ue=0;ue<rt.length;ue++){var Ee=rt[ue].offset;if((0,Qe.Z)(Ee))$t=!1;else{if(Ee<Ht)throw new TypeError("Keyframes are not loosely sorted by offset. Sort or specify offsets.");Ht=Ee}}rt=rt.filter(function(Pe){return Number(Pe.offset)>=0&&Number(Pe.offset)<=1});function ie(){var Pe,Be=rt,He=Be.length;if(rt[He-1].computedOffset=Number((Pe=rt[He-1].offset)!==null&&Pe!==void 0?Pe:1),He>1){var en;rt[0].computedOffset=Number((en=rt[0].offset)!==null&&en!==void 0?en:0)}for(var un=0,mn=Number(rt[0].computedOffset),Sn=1;Sn<He;Sn++){var Pn=rt[Sn].computedOffset;if(!(0,Qe.Z)(Pn)&&!(0,Qe.Z)(mn)){for(var $n=1;$n<Sn-un;$n++)rt[un+$n].computedOffset=mn+(Number(Pn)-mn)*$n/(Sn-un);un=Sn,mn=Number(Pn)}}}return $t||ie(),rt}var U="backwards|forwards|both|none".split("|"),Y="reverse|alternate|alternate-reverse".split("|");function G(ct,ht){var rt=new H;return ht&&(rt.fill="both",rt.duration="auto"),typeof ct=="number"&&!isNaN(ct)?rt.duration=ct:ct!==void 0&&Object.keys(ct).forEach(function($t){if(ct[$t]!==void 0&&ct[$t]!==null&&ct[$t]!=="auto"){if((typeof rt[$t]=="number"||$t==="duration")&&(typeof ct[$t]!="number"||isNaN(ct[$t]))||$t==="fill"&&U.indexOf(ct[$t])===-1||$t==="direction"&&Y.indexOf(ct[$t])===-1)return;rt[$t]=ct[$t]}}),rt}function J(ct,ht){return ct=pt(ct!=null?ct:{duration:"auto"}),G(ct,ht)}function pt(ct){return typeof ct=="number"&&(isNaN(ct)?ct={duration:"auto"}:ct={duration:ct}),ct}var Kt=function(){function ct(ht,rt,$t){var Ht=this;(0,R.Z)(this,ct),this.composite="replace",this.iterationComposite="replace",this.target=ht,this.timing=J($t,!1),this.timing.effect=this,this.timing.activeDuration=br(this.timing),this.timing.endTime=Math.max(0,this.timing.delay+this.timing.activeDuration+this.timing.endDelay),this.normalizedKeyframes=Dt(rt,this.timing),this.interpolations=y(this.normalizedKeyframes,this.timing,this.target);var ue=l.GZ.globalThis.Proxy;this.computedTiming=ue?new ue(this.timing,{get:function(ie,Pe){return Pe==="duration"?ie.duration==="auto"?0:ie.duration:Pe==="fill"?ie.fill==="auto"?"none":ie.fill:Pe==="localTime"?Ht.animation&&Ht.animation.currentTime||null:Pe==="currentIteration"?!Ht.animation||Ht.animation.playState!=="running"?null:ie.currentIteration||0:Pe==="progress"?!Ht.animation||Ht.animation.playState!=="running"?null:ie.progress||0:ie[Pe]},set:function(){return!0}}):this.timing}return(0,O.Z)(ct,[{key:"applyInterpolations",value:function(){this.interpolations(this.target,Number(this.timeFraction))}},{key:"update",value:function(rt){return rt===null?!1:(this.timeFraction=Wt(this.timing.activeDuration,rt,this.timing),this.timeFraction!==null)}},{key:"getKeyframes",value:function(){return this.normalizedKeyframes}},{key:"setKeyframes",value:function(rt){this.normalizedKeyframes=Dt(rt)}},{key:"getComputedTiming",value:function(){return this.computedTiming}},{key:"getTiming",value:function(){return this.timing}},{key:"updateTiming",value:function(rt){var $t=this;Object.keys(rt||{}).forEach(function(Ht){$t.timing[Ht]=rt[Ht]})}}])}();function yt(ct,ht){return Number(ct.id)-Number(ht.id)}var Qt=function(){function ct(ht){var rt=this;(0,R.Z)(this,ct),this.animations=[],this.ticking=!1,this.timelineTicking=!1,this.hasRestartedThisFrame=!1,this.animationsWithPromises=[],this.inTick=!1,this.pendingEffects=[],this.currentTime=null,this.rafId=0,this.rafCallbacks=[],this.webAnimationsNextTick=function($t){rt.currentTime=$t,rt.discardAnimations(),rt.animations.length===0?rt.timelineTicking=!1:rt.requestAnimationFrame(rt.webAnimationsNextTick)},this.processRafCallbacks=function($t){var Ht=rt.rafCallbacks;rt.rafCallbacks=[],$t<Number(rt.currentTime)&&($t=Number(rt.currentTime)),rt.animations.sort(yt),rt.animations=rt.tick($t,!0,rt.animations)[0],Ht.forEach(function(ue){ue[1]($t)}),rt.applyPendingEffects()},this.document=ht}return(0,O.Z)(ct,[{key:"getAnimations",value:function(){return this.discardAnimations(),this.animations.slice()}},{key:"isTicking",value:function(){return this.inTick}},{key:"play",value:function(rt,$t,Ht){var ue=new Kt(rt,$t,Ht),Ee=new Me(ue,this);return this.animations.push(Ee),this.restartWebAnimationsNextTick(),Ee.updatePromises(),Ee.play(),Ee.updatePromises(),Ee}},{key:"applyDirtiedAnimation",value:function(rt){var $t=this;if(!this.inTick){rt.markTarget();var Ht=rt.targetAnimations();Ht.sort(yt);var ue=this.tick(Number(this.currentTime),!1,Ht.slice())[1];ue.forEach(function(Ee){var ie=$t.animations.indexOf(Ee);ie!==-1&&$t.animations.splice(ie,1)}),this.applyPendingEffects()}}},{key:"restart",value:function(){return this.ticking||(this.ticking=!0,this.requestAnimationFrame(function(){}),this.hasRestartedThisFrame=!0),this.hasRestartedThisFrame}},{key:"destroy",value:function(){this.document.defaultView.cancelAnimationFrame(this.frameId)}},{key:"applyPendingEffects",value:function(){this.pendingEffects.forEach(function(rt){rt==null||rt.applyInterpolations()}),this.pendingEffects=[]}},{key:"updateAnimationsPromises",value:function(){this.animationsWithPromises=this.animationsWithPromises.filter(function(rt){return rt.updatePromises()})}},{key:"discardAnimations",value:function(){this.updateAnimationsPromises(),this.animations=this.animations.filter(function(rt){return rt.playState!=="finished"&&rt.playState!=="idle"})}},{key:"restartWebAnimationsNextTick",value:function(){this.timelineTicking||(this.timelineTicking=!0,this.requestAnimationFrame(this.webAnimationsNextTick))}},{key:"rAF",value:function(rt){var $t=this.rafId++;return this.rafCallbacks.length===0&&(this.frameId=this.document.defaultView.requestAnimationFrame(this.processRafCallbacks)),this.rafCallbacks.push([$t,rt]),$t}},{key:"requestAnimationFrame",value:function(rt){var $t=this;return this.rAF(function(Ht){$t.updateAnimationsPromises(),rt(Ht),$t.updateAnimationsPromises()})}},{key:"tick",value:function(rt,$t,Ht){var ue=this,Ee,ie;this.inTick=!0,this.hasRestartedThisFrame=!1,this.currentTime=rt,this.ticking=!1;var Pe=[],Be=[],He=[],en=[];return Ht.forEach(function(un){un.tick(rt,$t),un._inEffect?(Be.push(un.effect),un.markTarget()):(Pe.push(un.effect),un.unmarkTarget()),un._needsTick&&(ue.ticking=!0);var mn=un._inEffect||un._needsTick;un._inTimeline=mn,mn?He.push(un):en.push(un)}),(Ee=this.pendingEffects).push.apply(Ee,Pe),(ie=this.pendingEffects).push.apply(ie,Be),this.ticking&&this.requestAnimationFrame(function(){}),this.inTick=!1,[He,en]}}])}();l.GZ.EasingFunction=Bn,l.GZ.AnimationTimeline=Qt;},67469:function(Tt,vt,d){"use strict";d.d(vt,{k:function(){return _}});var l=d(49336),R=d(54648),O=d(7663);class _ extends l.Z{constructor(b){super();Aa(this,"nodeMap",new Map);Aa(this,"edgeMap",new Map);Aa(this,"inEdgesMap",new Map);Aa(this,"outEdgesMap",new Map);Aa(this,"bothEdgesMap",new Map);Aa(this,"treeIndices",new Map);Aa(this,"changes",[]);Aa(this,"batchCount",0);Aa(this,"onChanged",()=>{});Aa(this,"batch",b=>{this.batchCount+=1,b(),this.batchCount-=1,this.batchCount||this.commit()});b&&(b.nodes&&this.addNodes(b.nodes),b.edges&&this.addEdges(b.edges),b.tree&&this.addTree(b.tree),b.onChanged&&(this.onChanged=b.onChanged))}commit(){const b=this.changes;this.changes=[];const A={graph:this,changes:b};this.emit("changed",A),this.onChanged(A)}reduceChanges(b){let A=[];return b.forEach(I=>{switch(I.type){case"NodeRemoved":{let x=!1;A=A.filter(k=>{if(k.type==="NodeAdded"){const N=k.value.id===I.value.id;return N&&(x=!0),!N}else{if(k.type==="NodeDataUpdated")return k.id!==I.value.id;if(k.type==="TreeStructureChanged")return k.nodeId!==I.value.id}return!0}),x||A.push(I);break}case"EdgeRemoved":{let x=!1;A=A.filter(k=>{if(k.type==="EdgeAdded"){const N=k.value.id===I.value.id;return N&&(x=!0),!N}else if(k.type==="EdgeDataUpdated"||k.type==="EdgeUpdated")return k.id!==I.value.id;return!0}),x||A.push(I);break}case"NodeDataUpdated":case"EdgeDataUpdated":case"EdgeUpdated":{const x=A.findIndex(N=>N.type===I.type&&N.id===I.id&&(I.propertyName===void 0||N.propertyName===I.propertyName)),k=A[x];k?I.propertyName!==void 0?k.newValue=I.newValue:(A.splice(x,1),A.push(I)):A.push(I);break}case"TreeStructureDetached":{A=A.filter(x=>x.type==="TreeStructureAttached"||x.type==="TreeStructureChanged"?x.treeKey!==I.treeKey:!0),A.push(I);break}case"TreeStructureChanged":{const x=A.find(k=>k.type==="TreeStructureChanged"&&k.treeKey===I.treeKey&&k.nodeId===I.nodeId);x?x.newParentId=I.newParentId:A.push(I);break}default:A.push(I);break}}),A}checkNodeExistence(b){this.getNode(b)}hasNode(b){return this.nodeMap.has(b)}areNeighbors(b,A){return this.getNeighbors(A).some(I=>I.id===b)}getNode(b){const A=this.nodeMap.get(b);if(!A)throw new Error("Node not found for id: "+b);return A}getRelatedEdges(b,A){if(this.checkNodeExistence(b),A==="in"){const I=this.inEdgesMap.get(b);return Array.from(I)}else if(A==="out"){const I=this.outEdgesMap.get(b);return Array.from(I)}else{const I=this.bothEdgesMap.get(b);return Array.from(I)}}getDegree(b,A){return this.getRelatedEdges(b,A).length}getSuccessors(b){const I=this.getRelatedEdges(b,"out").map(x=>this.getNode(x.target));return Array.from(new Set(I))}getPredecessors(b){const I=this.getRelatedEdges(b,"in").map(x=>this.getNode(x.source));return Array.from(new Set(I))}getNeighbors(b){const A=this.getPredecessors(b),I=this.getSuccessors(b);return Array.from(new Set([...A,...I]))}doAddNode(b){if(this.hasNode(b.id))throw new Error("Node already exists: "+b.id);this.nodeMap.set(b.id,b),this.inEdgesMap.set(b.id,new Set),this.outEdgesMap.set(b.id,new Set),this.bothEdgesMap.set(b.id,new Set),this.treeIndices.forEach(A=>{A.childrenMap.set(b.id,new Set)}),this.changes.push({type:"NodeAdded",value:b})}addNodes(b){this.batch(()=>{for(const A of b)this.doAddNode(A)})}addNode(b){this.addNodes([b])}doRemoveNode(b){const A=this.getNode(b),I=this.bothEdgesMap.get(b);I==null||I.forEach(x=>this.doRemoveEdge(x.id)),this.nodeMap.delete(b),this.treeIndices.forEach(x=>{var N,et;(N=x.childrenMap.get(b))==null||N.forEach(tt=>{x.parentMap.delete(tt.id)});const k=x.parentMap.get(b);k&&((et=x.childrenMap.get(k.id))==null||et.delete(A)),x.parentMap.delete(b),x.childrenMap.delete(b)}),this.bothEdgesMap.delete(b),this.inEdgesMap.delete(b),this.outEdgesMap.delete(b),this.changes.push({type:"NodeRemoved",value:A})}removeNodes(b){this.batch(()=>{b.forEach(A=>this.doRemoveNode(A))})}removeNode(b){this.removeNodes([b])}updateNodeDataProperty(b,A,I){const x=this.getNode(b);this.batch(()=>{const k=x.data[A],N=I;x.data[A]=N,this.changes.push({type:"NodeDataUpdated",id:b,propertyName:A,oldValue:k,newValue:N})})}mergeNodeData(b,A){this.batch(()=>{Object.entries(A).forEach(([I,x])=>{this.updateNodeDataProperty(b,I,x)})})}updateNodeData(...b){const A=b[0],I=this.getNode(A);if(typeof b[1]=="string"){this.updateNodeDataProperty(A,b[1],b[2]);return}let x;if(typeof b[1]=="function"){const k=b[1];x=k(I.data)}else typeof b[1]=="object"&&(x=b[1]);this.batch(()=>{const k=I.data,N=x;I.data=x,this.changes.push({type:"NodeDataUpdated",id:A,oldValue:k,newValue:N})})}checkEdgeExistence(b){if(!this.hasEdge(b))throw new Error("Edge not found for id: "+b)}hasEdge(b){return this.edgeMap.has(b)}getEdge(b){return this.checkEdgeExistence(b),this.edgeMap.get(b)}getEdgeDetail(b){const A=this.getEdge(b);return{edge:A,source:this.getNode(A.source),target:this.getNode(A.target)}}doAddEdge(b){if(this.hasEdge(b.id))throw new Error("Edge already exists: "+b.id);this.checkNodeExistence(b.source),this.checkNodeExistence(b.target),this.edgeMap.set(b.id,b);const A=this.inEdgesMap.get(b.target),I=this.outEdgesMap.get(b.source),x=this.bothEdgesMap.get(b.source),k=this.bothEdgesMap.get(b.target);A.add(b),I.add(b),x.add(b),k.add(b),this.changes.push({type:"EdgeAdded",value:b})}addEdges(b){this.batch(()=>{for(const A of b)this.doAddEdge(A)})}addEdge(b){this.addEdges([b])}doRemoveEdge(b){const A=this.getEdge(b),I=this.outEdgesMap.get(A.source),x=this.inEdgesMap.get(A.target),k=this.bothEdgesMap.get(A.source),N=this.bothEdgesMap.get(A.target);I.delete(A),x.delete(A),k.delete(A),N.delete(A),this.edgeMap.delete(b),this.changes.push({type:"EdgeRemoved",value:A})}removeEdges(b){this.batch(()=>{b.forEach(A=>this.doRemoveEdge(A))})}removeEdge(b){this.removeEdges([b])}updateEdgeSource(b,A){const I=this.getEdge(b);this.checkNodeExistence(A);const x=I.source,k=A;this.outEdgesMap.get(x).delete(I),this.bothEdgesMap.get(x).delete(I),this.outEdgesMap.get(k).add(I),this.bothEdgesMap.get(k).add(I),I.source=A,this.batch(()=>{this.changes.push({type:"EdgeUpdated",id:b,propertyName:"source",oldValue:x,newValue:k})})}updateEdgeTarget(b,A){const I=this.getEdge(b);this.checkNodeExistence(A);const x=I.target,k=A;this.inEdgesMap.get(x).delete(I),this.bothEdgesMap.get(x).delete(I),this.inEdgesMap.get(k).add(I),this.bothEdgesMap.get(k).add(I),I.target=A,this.batch(()=>{this.changes.push({type:"EdgeUpdated",id:b,propertyName:"target",oldValue:x,newValue:k})})}updateEdgeDataProperty(b,A,I){const x=this.getEdge(b);this.batch(()=>{const k=x.data[A],N=I;x.data[A]=N,this.changes.push({type:"EdgeDataUpdated",id:b,propertyName:A,oldValue:k,newValue:N})})}updateEdgeData(...b){const A=b[0],I=this.getEdge(A);if(typeof b[1]=="string"){this.updateEdgeDataProperty(A,b[1],b[2]);return}let x;if(typeof b[1]=="function"){const k=b[1];x=k(I.data)}else typeof b[1]=="object"&&(x=b[1]);this.batch(()=>{const k=I.data,N=x;I.data=x,this.changes.push({type:"EdgeDataUpdated",id:A,oldValue:k,newValue:N})})}mergeEdgeData(b,A){this.batch(()=>{Object.entries(A).forEach(([I,x])=>{this.updateEdgeDataProperty(b,I,x)})})}checkTreeExistence(b){if(!this.hasTreeStructure(b))throw new Error("Tree structure not found for treeKey: "+b)}hasTreeStructure(b){return this.treeIndices.has(b)}attachTreeStructure(b){this.treeIndices.has(b)||(this.treeIndices.set(b,{parentMap:new Map,childrenMap:new Map}),this.batch(()=>{this.changes.push({type:"TreeStructureAttached",treeKey:b})}))}detachTreeStructure(b){this.checkTreeExistence(b),this.treeIndices.delete(b),this.batch(()=>{this.changes.push({type:"TreeStructureDetached",treeKey:b})})}addTree(b,A){this.batch(()=>{this.attachTreeStructure(A);const I=[],x=Array.isArray(b)?b:[b];for(;x.length;){const k=x.shift();I.push(k),k.children&&x.push(...k.children)}this.addNodes(I),I.forEach(k=>{var N;(N=k.children)==null||N.forEach(et=>{this.setParent(et.id,k.id,A)})})})}getRoots(b){return this.checkTreeExistence(b),this.getAllNodes().filter(A=>!this.getParent(A.id,b))}getChildren(b,A){this.checkNodeExistence(b),this.checkTreeExistence(A);const x=this.treeIndices.get(A).childrenMap.get(b);return Array.from(x||[])}getParent(b,A){return this.checkNodeExistence(b),this.checkTreeExistence(A),this.treeIndices.get(A).parentMap.get(b)||null}getAncestors(b,A){const I=[];let x=this.getNode(b),k;for(;k=this.getParent(x.id,A);)I.push(k),x=k;return I}setParent(b,A,I){var Ct,ut;this.checkTreeExistence(I);const x=this.treeIndices.get(I);if(!x)return;const k=this.getNode(b),N=x.parentMap.get(b);if((N==null?void 0:N.id)===A)return;if(A==null){N&&((Ct=x.childrenMap.get(N.id))==null||Ct.delete(k)),x.parentMap.delete(b);return}const et=this.getNode(A);x.parentMap.set(b,et),N&&((ut=x.childrenMap.get(N.id))==null||ut.delete(k));let tt=x.childrenMap.get(et.id);tt||(tt=new Set,x.childrenMap.set(et.id,tt)),tt.add(k),this.batch(()=>{this.changes.push({type:"TreeStructureChanged",treeKey:I,nodeId:b,oldParentId:N==null?void 0:N.id,newParentId:et.id})})}dfsTree(b,A,I){const x=k=>this.getChildren(k,I);return(0,O.I)(this.getNode(b),new Set,A,x)}bfsTree(b,A,I){const x=k=>this.getChildren(k,I);return(0,O.O)([this.getNode(b)],new Set,A,x)}getAllNodes(){return Array.from(this.nodeMap.values())}getAllEdges(){return Array.from(this.edgeMap.values())}bfs(b,A,I="out"){const x={in:this.getPredecessors.bind(this),out:this.getSuccessors.bind(this),both:this.getNeighbors.bind(this)}[I];return(0,O.O)([this.getNode(b)],new Set,A,x)}dfs(b,A,I="out"){const x={in:this.getPredecessors.bind(this),out:this.getSuccessors.bind(this),both:this.getNeighbors.bind(this)}[I];return(0,O.I)(this.getNode(b),new Set,A,x)}clone(){const b=this.getAllNodes().map(x=>Qd(Ul({},x),{data:Ul({},x.data)})),A=this.getAllEdges().map(x=>Qd(Ul({},x),{data:Ul({},x.data)})),I=new _({nodes:b,edges:A});return this.treeIndices.forEach(({parentMap:x,childrenMap:k},N)=>{const et=new Map;x.forEach((Ct,ut)=>{et.set(ut,I.getNode(Ct.id))});const tt=new Map;k.forEach((Ct,ut)=>{tt.set(ut,new Set(Array.from(Ct).map(nt=>I.getNode(nt.id))))}),I.treeIndices.set(N,{parentMap:et,childrenMap:tt})}),I}toJSON(){return JSON.stringify({nodes:this.getAllNodes(),edges:this.getAllEdges()})}createView(b){return new R.t(Ul({graph:this},b))}}},54648:function(Tt,vt,d){"use strict";d.d(vt,{t:function(){return O}});var l=d(7663);const R=()=>!0;class O{constructor(g){Aa(this,"graph");Aa(this,"nodeFilter");Aa(this,"edgeFilter");Aa(this,"cacheEnabled");Aa(this,"inEdgesMap",new Map);Aa(this,"outEdgesMap",new Map);Aa(this,"bothEdgesMap",new Map);Aa(this,"allNodesMap",new Map);Aa(this,"allEdgesMap",new Map);Aa(this,"clearCache",()=>{this.inEdgesMap.clear(),this.outEdgesMap.clear(),this.bothEdgesMap.clear(),this.allNodesMap.clear(),this.allEdgesMap.clear()});Aa(this,"refreshCache",()=>{this.clearCache(),this.updateCache(this.graph.getAllNodes().map(g=>g.id))});Aa(this,"updateCache",g=>{const P=new Set;g.forEach(b=>{const A=this.bothEdgesMap.get(b);if(A&&A.forEach(I=>P.add(I.id)),!this.hasNode(b))this.inEdgesMap.delete(b),this.outEdgesMap.delete(b),this.bothEdgesMap.delete(b),this.allNodesMap.delete(b);else{const I=this.graph.getRelatedEdges(b,"in").filter(this.edgeFilter),x=this.graph.getRelatedEdges(b,"out").filter(this.edgeFilter),k=Array.from(new Set([...I,...x]));k.forEach(N=>P.add(N.id)),this.inEdgesMap.set(b,I),this.outEdgesMap.set(b,x),this.bothEdgesMap.set(b,k),this.allNodesMap.set(b,this.graph.getNode(b))}}),P.forEach(b=>{this.hasEdge(b)?this.allEdgesMap.set(b,this.graph.getEdge(b)):this.allEdgesMap.delete(b)})});Aa(this,"handleGraphChanged",g=>{const P=new Set;g.changes.forEach(b=>{switch(b.type){case"NodeAdded":P.add(b.value.id);break;case"NodeDataUpdated":P.add(b.id);break;case"EdgeAdded":P.add(b.value.source),P.add(b.value.target);break;case"EdgeUpdated":(b.propertyName==="source"||b.propertyName==="target")&&(P.add(b.oldValue),P.add(b.newValue));break;case"EdgeDataUpdated":if(g.graph.hasEdge(b.id)){const A=g.graph.getEdge(b.id);P.add(A.source),P.add(A.target)}break;case"EdgeRemoved":P.add(b.value.source),P.add(b.value.target);break;case"NodeRemoved":P.add(b.value.id);break;default:break}}),this.updateCache(P)});this.graph=g.graph;const P=g.nodeFilter||R,b=g.edgeFilter||R;this.nodeFilter=P,this.edgeFilter=A=>{const{source:I,target:x}=this.graph.getEdgeDetail(A.id);return!P(I)||!P(x)?!1:b(A,I,x)},g.cache==="auto"?(this.cacheEnabled=!0,this.startAutoCache()):g.cache==="manual"?this.cacheEnabled=!0:this.cacheEnabled=!1}startAutoCache(){this.refreshCache(),this.graph.on("changed",this.handleGraphChanged)}stopAutoCache(){this.graph.off("changed",this.handleGraphChanged)}checkNodeExistence(g){this.getNode(g)}hasNode(g){if(!this.graph.hasNode(g))return!1;const P=this.graph.getNode(g);return this.nodeFilter(P)}areNeighbors(g,P){return this.checkNodeExistence(g),this.getNeighbors(P).some(b=>b.id===g)}getNode(g){const P=this.graph.getNode(g);if(!this.nodeFilter(P))throw new Error("Node not found for id: "+g);return P}getRelatedEdges(g,P){return this.checkNodeExistence(g),this.cacheEnabled?P==="in"?this.inEdgesMap.get(g):P==="out"?this.outEdgesMap.get(g):this.bothEdgesMap.get(g):this.graph.getRelatedEdges(g,P).filter(this.edgeFilter)}getDegree(g,P){return this.getRelatedEdges(g,P).length}getSuccessors(g){const b=this.getRelatedEdges(g,"out").map(A=>this.getNode(A.target));return Array.from(new Set(b))}getPredecessors(g){const b=this.getRelatedEdges(g,"in").map(A=>this.getNode(A.source));return Array.from(new Set(b))}getNeighbors(g){const P=this.getPredecessors(g),b=this.getSuccessors(g);return Array.from(new Set([...P,...b]))}hasEdge(g){if(!this.graph.hasEdge(g))return!1;const P=this.graph.getEdge(g);return this.edgeFilter(P)}getEdge(g){const P=this.graph.getEdge(g);if(!this.edgeFilter(P))throw new Error("Edge not found for id: "+g);return P}getEdgeDetail(g){const P=this.getEdge(g);return{edge:P,source:this.getNode(P.source),target:this.getNode(P.target)}}hasTreeStructure(g){return this.graph.hasTreeStructure(g)}getRoots(g){return this.graph.getRoots(g).filter(this.nodeFilter)}getChildren(g,P){return this.checkNodeExistence(g),this.graph.getChildren(g,P).filter(this.nodeFilter)}getParent(g,P){this.checkNodeExistence(g);const b=this.graph.getParent(g,P);return!b||!this.nodeFilter(b)?null:b}getAllNodes(){return this.cacheEnabled?Array.from(this.allNodesMap.values()):this.graph.getAllNodes().filter(this.nodeFilter)}getAllEdges(){return this.cacheEnabled?Array.from(this.allEdgesMap.values()):this.graph.getAllEdges().filter(this.edgeFilter)}bfs(g,P,b="out"){const A={in:this.getPredecessors.bind(this),out:this.getSuccessors.bind(this),both:this.getNeighbors.bind(this)}[b];(0,l.O)([this.getNode(g)],new Set,P,A)}dfs(g,P,b="out"){const A={in:this.getPredecessors.bind(this),out:this.getSuccessors.bind(this),both:this.getNeighbors.bind(this)}[b];(0,l.I)(this.getNode(g),new Set,P,A)}}},7663:function(Tt,vt,d){"use strict";d.d(vt,{I:function(){return R},O:function(){return l}});function l(O,_,g,P){for(;O.length;){const b=O.shift();if(g(b))return!0;_.add(b.id),P(b.id).forEach(I=>{_.has(I.id)||(_.add(I.id),O.push(I))})}return!1}function R(O,_,g,P){if(g(O))return!0;_.add(O.id);for(const A of P(O.id))if(!_.has(A.id)&&R(A,_,g,P))return!0;return!1}},13722:function(Tt){(function(d,l){Tt.exports=l()})(typeof self!="undefined"?self:this,function(){return function(vt){var d={};function l(R){if(d[R])return d[R].exports;var O=d[R]={i:R,l:!1,exports:{}};return vt[R].call(O.exports,O,O.exports,l),O.l=!0,O.exports}return l.m=vt,l.c=d,l.d=function(R,O,_){l.o(R,O)||Object.defineProperty(R,O,{configurable:!1,enumerable:!0,get:_})},l.n=function(R){var O=R&&R.__esModule?function(){return R.default}:function(){return R};return l.d(O,"a",O),O},l.o=function(R,O){return Object.prototype.hasOwnProperty.call(R,O)},l.p="",l(l.s=5)}([function(vt,d){function l(R,O,_,g){return g===void 0&&(g="height"),_==="center"?(R[g]+O[g])/2:R.height}vt.exports={assign:Object.assign,getHeight:l}},function(vt,d,l){var R=l(3),O=function(){function _(P,b){b===void 0&&(b={});var A=this;A.options=b,A.rootNode=R(P,b)}var g=_.prototype;return g.execute=function(){throw new Error("please override this method")},_}();vt.exports=O},function(vt,d,l){var R=l(4),O=["LR","RL","TB","BT","H","V"],_=["LR","RL","H"],g=function(I){return _.indexOf(I)>-1},P=O[0];vt.exports=function(A,I,x){var k=I.direction||P;if(I.isHorizontal=g(k),k&&O.indexOf(k)===-1)throw new TypeError("Invalid direction: "+k);if(k===O[0])x(A,I);else if(k===O[1])x(A,I),A.right2left();else if(k===O[2])x(A,I);else if(k===O[3])x(A,I),A.bottom2top();else if(k===O[4]||k===O[5]){var N=R(A,I),et=N.left,tt=N.right;x(et,I),x(tt,I),I.isHorizontal?et.right2left():et.bottom2top(),tt.translate(et.x-tt.x,et.y-tt.y),A.x=et.x,A.y=tt.y;var Ct=A.getBoundingBox();I.isHorizontal?Ct.top<0&&A.translate(0,-Ct.top):Ct.left<0&&A.translate(-Ct.left,0)}var ut=I.fixedRoot;return ut===void 0&&(ut=!0),ut&&A.translate(-(A.x+A.width/2+A.hgap),-(A.y+A.height/2+A.vgap)),b(A,I),A};function b(A,I){if(I.radial){var x=I.isHorizontal?["x","y"]:["y","x"],k=x[0],N=x[1],et={x:1/0,y:1/0},tt={x:-1/0,y:-1/0},Ct=0;A.DFTraverse(function(kt){Ct++;var Nt=kt.x,Bt=kt.y;et.x=Math.min(et.x,Nt),et.y=Math.min(et.y,Bt),tt.x=Math.max(tt.x,Nt),tt.y=Math.max(tt.y,Bt)});var ut=tt[N]-et[N];if(ut===0)return;var nt=Math.PI*2/Ct;A.DFTraverse(function(kt){var Nt=(kt[N]-et[N])/ut*(Math.PI*2-nt)+nt,Bt=kt[k]-A[k];kt.x=Math.cos(Nt)*Bt,kt.y=Math.sin(Nt)*Bt})}}},function(vt,d,l){var R=l(0),O=18,_=O*2,g=O,P={getId:function(x){return x.id||x.name},getPreH:function(x){return x.preH||0},getPreV:function(x){return x.preV||0},getHGap:function(x){return x.hgap||g},getVGap:function(x){return x.vgap||g},getChildren:function(x){return x.children},getHeight:function(x){return x.height||_},getWidth:function(x){var k=x.label||" ";return x.width||k.split("").length*O}};function b(I,x){var k=this;if(k.vgap=k.hgap=0,I instanceof b)return I;k.data=I;var N=x.getHGap(I),et=x.getVGap(I);return k.preH=x.getPreH(I),k.preV=x.getPreV(I),k.width=x.getWidth(I),k.height=x.getHeight(I),k.width+=k.preH,k.height+=k.preV,k.id=x.getId(I),k.x=k.y=0,k.depth=0,k.children||(k.children=[]),k.addGap(N,et),k}R.assign(b.prototype,{isRoot:function(){return this.depth===0},isLeaf:function(){return this.children.length===0},addGap:function(x,k){var N=this;N.hgap+=x,N.vgap+=k,N.width+=2*x,N.height+=2*k},eachNode:function(x){for(var k=this,N=[k],et;et=N.shift();)x(et),N=et.children.concat(N)},DFTraverse:function(x){this.eachNode(x)},BFTraverse:function(x){for(var k=this,N=[k],et;et=N.shift();)x(et),N=N.concat(et.children)},getBoundingBox:function(){var x={left:Number.MAX_VALUE,top:Number.MAX_VALUE,width:0,height:0};return this.eachNode(function(k){x.left=Math.min(x.left,k.x),x.top=Math.min(x.top,k.y),x.width=Math.max(x.width,k.x+k.width),x.height=Math.max(x.height,k.y+k.height)}),x},translate:function(x,k){x===void 0&&(x=0),k===void 0&&(k=0),this.eachNode(function(N){N.x+=x,N.y+=k,N.x+=N.preH,N.y+=N.preV})},right2left:function(){var x=this,k=x.getBoundingBox();x.eachNode(function(N){N.x=N.x-(N.x-k.left)*2-N.width}),x.translate(k.width,0)},bottom2top:function(){var x=this,k=x.getBoundingBox();x.eachNode(function(N){N.y=N.y-(N.y-k.top)*2-N.height}),x.translate(0,k.height)}});function A(I,x,k){x===void 0&&(x={}),x=R.assign({},P,x);var N=new b(I,x),et=[N],tt;if(!k&&!I.collapsed){for(;tt=et.shift();)if(!tt.data.collapsed){var Ct=x.getChildren(tt.data),ut=Ct?Ct.length:0;if(tt.children=new Array(ut),Ct&&ut)for(var nt=0;nt<ut;nt++){var kt=new b(Ct[nt],x);tt.children[nt]=kt,et.push(kt),kt.parent=tt,kt.depth=tt.depth+1}}}return N}vt.exports=A},function(vt,d,l){var R=l(3);vt.exports=function(O,_){for(var g=R(O.data,_,!0),P=R(O.data,_,!0),b=O.children.length,A=Math.round(b/2),I=_.getSide||function(et,tt){return tt<A?"right":"left"},x=0;x<b;x++){var k=O.children[x],N=I(k,x);N==="right"?P.children.push(k):g.children.push(k)}return g.eachNode(function(et){et.isRoot()||(et.side="left")}),P.eachNode(function(et){et.isRoot()||(et.side="right")}),{left:g,right:P}}},function(vt,d,l){var R={compactBox:l(6),dendrogram:l(8),indented:l(10),mindmap:l(12)};vt.exports=R},function(vt,d,l){function R(k,N){k.prototype=Object.create(N.prototype),k.prototype.constructor=k,O(k,N)}function O(k,N){return O=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(et,tt){return et.__proto__=tt,et},O(k,N)}var _=l(1),g=l(7),P=l(2),b=l(0),A=function(k){function N(){return k.apply(this,arguments)||this}R(N,k);var et=N.prototype;return et.execute=function(){var Ct=this;return P(Ct.rootNode,Ct.options,g)},N}(_),I={};function x(k,N){return N=b.assign({},I,N),new A(k,N).execute()}vt.exports=x},function(vt,d){function l(b,A,I,x){x===void 0&&(x=[]);var k=this;k.w=b||0,k.h=A||0,k.y=I||0,k.x=0,k.c=x||[],k.cs=x.length,k.prelim=0,k.mod=0,k.shift=0,k.change=0,k.tl=null,k.tr=null,k.el=null,k.er=null,k.msel=0,k.mser=0}l.fromNode=function(b,A){if(!b)return null;var I=[];return b.children.forEach(function(x){I.push(l.fromNode(x,A))}),A?new l(b.height,b.width,b.x,I):new l(b.width,b.height,b.y,I)};function R(b,A,I){I?b.y+=A:b.x+=A,b.children.forEach(function(x){R(x,A,I)})}function O(b,A){var I=A?b.y:b.x;return b.children.forEach(function(x){I=Math.min(O(x,A),I)}),I}function _(b,A){var I=O(b,A);R(b,-I,A)}function g(b,A,I){I?A.y=b.x:A.x=b.x,b.c.forEach(function(x,k){g(x,A.children[k],I)})}function P(b,A,I){I===void 0&&(I=0),A?(b.x=I,I+=b.width):(b.y=I,I+=b.height),b.children.forEach(function(x){P(x,A,I)})}vt.exports=function(b,A){A===void 0&&(A={});var I=A.isHorizontal;function x(zt){if(zt.cs===0){k(zt);return}x(zt.c[0]);for(var Ot=ot(ut(zt.c[0].el),0,null),pe=1;pe<zt.cs;++pe){x(zt.c[pe]);var xe=ut(zt.c[pe].er);N(zt,pe,Ot),Ot=ot(xe,pe,Ot)}Nt(zt),k(zt)}function k(zt){zt.cs===0?(zt.el=zt,zt.er=zt,zt.msel=zt.mser=0):(zt.el=zt.c[0].el,zt.msel=zt.c[0].msel,zt.er=zt.c[zt.cs-1].er,zt.mser=zt.c[zt.cs-1].mser)}function N(zt,Ot,pe){for(var xe=zt.c[Ot-1],qt=xe.mod,Ye=zt.c[Ot],We=Ye.mod;xe!==null&&Ye!==null;){ut(xe)>pe.low&&(pe=pe.nxt);var Oe=qt+xe.prelim+xe.w-(We+Ye.prelim);Oe>0&&(We+=Oe,et(zt,Ot,pe.index,Oe));var Qe=ut(xe),Mt=ut(Ye);Qe<=Mt&&(xe=Ct(xe),xe!==null&&(qt+=xe.mod)),Qe>=Mt&&(Ye=tt(Ye),Ye!==null&&(We+=Ye.mod))}!xe&&Ye?nt(zt,Ot,Ye,We):xe&&!Ye&&kt(zt,Ot,xe,qt)}function et(zt,Ot,pe,xe){zt.c[Ot].mod+=xe,zt.c[Ot].msel+=xe,zt.c[Ot].mser+=xe,Xt(zt,Ot,pe,xe)}function tt(zt){return zt.cs===0?zt.tl:zt.c[0]}function Ct(zt){return zt.cs===0?zt.tr:zt.c[zt.cs-1]}function ut(zt){return zt.y+zt.h}function nt(zt,Ot,pe,xe){var qt=zt.c[0].el;qt.tl=pe;var Ye=xe-pe.mod-zt.c[0].msel;qt.mod+=Ye,qt.prelim-=Ye,zt.c[0].el=zt.c[Ot].el,zt.c[0].msel=zt.c[Ot].msel}function kt(zt,Ot,pe,xe){var qt=zt.c[Ot].er;qt.tr=pe;var Ye=xe-pe.mod-zt.c[Ot].mser;qt.mod+=Ye,qt.prelim-=Ye,zt.c[Ot].er=zt.c[Ot-1].er,zt.c[Ot].mser=zt.c[Ot-1].mser}function Nt(zt){zt.prelim=(zt.c[0].prelim+zt.c[0].mod+zt.c[zt.cs-1].mod+zt.c[zt.cs-1].prelim+zt.c[zt.cs-1].w)/2-zt.w/2}function Bt(zt,Ot){Ot+=zt.mod,zt.x=zt.prelim+Ot,wt(zt);for(var pe=0;pe<zt.cs;pe++)Bt(zt.c[pe],Ot)}function Xt(zt,Ot,pe,xe){if(pe!==Ot-1){var qt=Ot-pe;zt.c[pe+1].shift+=xe/qt,zt.c[Ot].shift-=xe/qt,zt.c[Ot].change-=xe-xe/qt}}function wt(zt){for(var Ot=0,pe=0,xe=0;xe<zt.cs;xe++)Ot+=zt.c[xe].shift,pe+=Ot+zt.c[xe].change,zt.c[xe].mod+=pe}function ot(zt,Ot,pe){for(;pe!==null&&zt>=pe.low;)pe=pe.nxt;return{low:zt,index:Ot,nxt:pe}}P(b,I);var It=l.fromNode(b,I);return x(It),Bt(It,0),g(It,b,I),_(b,I),b}},function(vt,d,l){function R(k,N){k.prototype=Object.create(N.prototype),k.prototype.constructor=k,O(k,N)}function O(k,N){return O=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(et,tt){return et.__proto__=tt,et},O(k,N)}var _=l(1),g=l(9),P=l(2),b=l(0),A=function(k){function N(){return k.apply(this,arguments)||this}R(N,k);var et=N.prototype;return et.execute=function(){var Ct=this;return Ct.rootNode.width=0,P(Ct.rootNode,Ct.options,g)},N}(_),I={};function x(k,N){return N=b.assign({},I,N),new A(k,N).execute()}vt.exports=x},function(vt,d,l){var R=l(0);function O(P,b){P===void 0&&(P=0),b===void 0&&(b=[]);var A=this;A.x=A.y=0,A.leftChild=A.rightChild=null,A.height=0,A.children=b}var _={isHorizontal:!0,nodeSep:20,nodeSize:20,rankSep:200,subTreeSep:10};function g(P,b,A){A?(b.x=P.x,b.y=P.y):(b.x=P.y,b.y=P.x),P.children.forEach(function(I,x){g(I,b.children[x],A)})}vt.exports=function(P,b){b===void 0&&(b={}),b=R.assign({},_,b);var A=0;function I(tt){if(!tt)return null;tt.width=0,tt.depth&&tt.depth>A&&(A=tt.depth);var Ct=tt.children,ut=Ct.length,nt=new O(tt.height,[]);return Ct.forEach(function(kt,Nt){var Bt=I(kt);nt.children.push(Bt),Nt===0&&(nt.leftChild=Bt),Nt===ut-1&&(nt.rightChild=Bt)}),nt.originNode=tt,nt.isLeaf=tt.isLeaf(),nt}function x(tt){if(tt.isLeaf||tt.children.length===0)tt.drawingDepth=A;else{var Ct=tt.children.map(function(nt){return x(nt)}),ut=Math.min.apply(null,Ct);tt.drawingDepth=ut-1}return tt.drawingDepth}var k;function N(tt){tt.x=tt.drawingDepth*b.rankSep,tt.isLeaf?(tt.y=0,k&&(tt.y=k.y+k.height+b.nodeSep,tt.originNode.parent!==k.originNode.parent&&(tt.y+=b.subTreeSep)),k=tt):(tt.children.forEach(function(Ct){N(Ct)}),tt.y=(tt.leftChild.y+tt.rightChild.y)/2)}var et=I(P);return x(et),N(et),g(et,P,b.isHorizontal),P}},function(vt,d,l){function R(et,tt){et.prototype=Object.create(tt.prototype),et.prototype.constructor=et,O(et,tt)}function O(et,tt){return O=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(Ct,ut){return Ct.__proto__=ut,Ct},O(et,tt)}var _=l(1),g=l(11),P=l(4),b=l(0),A=["LR","RL","H"],I=A[0],x=function(et){function tt(){return et.apply(this,arguments)||this}R(tt,et);var Ct=tt.prototype;return Ct.execute=function(){var nt=this,kt=nt.options,Nt=nt.rootNode;kt.isHorizontal=!0;var Bt=kt.indent,Xt=Bt===void 0?20:Bt,wt=kt.dropCap,ot=wt===void 0?!0:wt,It=kt.direction,zt=It===void 0?I:It,Ot=kt.align;if(zt&&A.indexOf(zt)===-1)throw new TypeError("Invalid direction: "+zt);if(zt===A[0])g(Nt,Xt,ot,Ot);else if(zt===A[1])g(Nt,Xt,ot,Ot),Nt.right2left();else if(zt===A[2]){var pe=P(Nt,kt),xe=pe.left,qt=pe.right;g(xe,Xt,ot,Ot),xe.right2left(),g(qt,Xt,ot,Ot);var Ye=xe.getBoundingBox();qt.translate(Ye.width,0),Nt.x=qt.x-Nt.width/2}return Nt},tt}(_),k={};function N(et,tt){return tt=b.assign({},k,tt),new x(et,tt).execute()}vt.exports=N},function(vt,d,l){var R=l(0);function O(_,g,P,b,A){var I=(typeof P=="function"?P(_):P)*_.depth;if(!b)try{if(_.id===_.parent.children[0].id){_.x+=I,_.y=g?g.y:0;return}}catch(N){}if(_.x+=I,g){if(_.y=g.y+R.getHeight(g,_,A),g.parent&&_.parent.id!==g.parent.id){var x=g.parent,k=x.y+R.getHeight(x,_,A);_.y=k>_.y?k:_.y}}else _.y=0}vt.exports=function(_,g,P,b){var A=null;_.eachNode(function(I){O(I,A,g,P,b),A=I})}},function(vt,d,l){function R(k,N){k.prototype=Object.create(N.prototype),k.prototype.constructor=k,O(k,N)}function O(k,N){return O=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(et,tt){return et.__proto__=tt,et},O(k,N)}var _=l(1),g=l(13),P=l(2),b=l(0),A=function(k){function N(){return k.apply(this,arguments)||this}R(N,k);var et=N.prototype;return et.execute=function(){var Ct=this;return P(Ct.rootNode,Ct.options,g)},N}(_),I={};function x(k,N){return N=b.assign({},I,N),new A(k,N).execute()}vt.exports=x},function(vt,d,l){var R=l(0);function O(P,b){var A=0;return P.children.length?P.children.forEach(function(I){A+=O(I,b)}):A=P.height,P._subTreeSep=b.getSubTreeSep(P.data),P.totalHeight=Math.max(P.height,A)+2*P._subTreeSep,P.totalHeight}function _(P){var b=P.children,A=b.length;if(A){b.forEach(function(tt){_(tt)});var I=b[0],x=b[A-1],k=x.y-I.y+x.height,N=0;if(b.forEach(function(tt){N+=tt.totalHeight}),k>P.height)P.y=I.y+k/2-P.height/2;else if(b.length!==1||P.height>N){var et=P.y+(P.height-k)/2-I.y;b.forEach(function(tt){tt.translate(0,et)})}else P.y=(I.y+I.height/2+x.y+x.height/2)/2-P.height/2}}var g={getSubTreeSep:function(){return 0}};vt.exports=function(P,b){b===void 0&&(b={}),b=R.assign({},g,b),P.parent={x:0,width:0,height:0,y:0},P.BFTraverse(function(A){A.x=A.parent.x+A.parent.width}),P.parent=null,O(P,b),P.startY=0,P.y=P.totalHeight/2-P.height/2,P.eachNode(function(A){var I=A.children,x=I.length;if(x){var k=I[0];if(k.startY=A.startY+A._subTreeSep,x===1)k.y=A.y+A.height/2-k.height/2;else{k.y=k.startY+k.totalHeight/2-k.height/2;for(var N=1;N<x;N++){var et=I[N];et.startY=I[N-1].startY+I[N-1].totalHeight,et.y=et.startY+et.totalHeight/2-et.height/2}}}}),_(P)}}])})},85580:function(Tt,vt,d){"use strict";d.d(vt,{L:function(){return l}});function l(R){var O=document.createElement("div");O.innerHTML=R;var _=O.childNodes[0];return _&&O.contains(_)&&O.removeChild(_),_}},70208:function(Tt,vt){"use strict";var d=function(l,R,O){return l<R?R:l>O?O:l};vt.Z=d},37547:function(Tt,vt,d){"use strict";var l=d(39934),R=function(O){if(typeof O!="object"||O===null)return O;var _;if((0,l.Z)(O)){_=[];for(var g=0,P=O.length;g<P;g++)typeof O[g]=="object"&&O[g]!=null?_[g]=R(O[g]):_[g]=O[g]}else{_={};for(var b in O)typeof O[b]=="object"&&O[b]!=null?_[b]=R(O[b]):_[b]=O[b]}return _};vt.Z=R},78431:function(Tt,vt){"use strict";function d(l,R,O){var _;return function(){var g=this,P=arguments,b=function(){_=null,O||l.apply(g,P)},A=O&&!_;clearTimeout(_),_=setTimeout(b,R),A&&l.apply(g,P)}}vt.Z=d},23343:function(Tt,vt,d){"use strict";var l=d(39934),R=d(63467),O=5;function _(b,A){if(Object.hasOwn)return Object.hasOwn(b,A);if(b==null)throw new TypeError("Cannot convert undefined or null to object");return Object.prototype.hasOwnProperty.call(Object(b),A)}function g(b,A,I,x){I=I||0,x=x||O;for(var k in A)if(_(A,k)){var N=A[k];N!==null&&(0,R.Z)(N)?((0,R.Z)(b[k])||(b[k]={}),I<x?g(b[k],N,I+1,x):b[k]=A[k]):(0,l.Z)(N)?(b[k]=[],b[k]=b[k].concat(N)):N!==void 0&&(b[k]=N)}}var P=function(b){for(var A=[],I=1;I<arguments.length;I++)A[I-1]=arguments[I];for(var x=0;x<A.length;x+=1)g(b,A[x]);return b};vt.Z=P},47182:function(Tt,vt,d){"use strict";d.d(vt,{Z:function(){return b}});var l=d(68599),R=function(A,I){if(!(0,l.Z)(A))return A;for(var x=[],k=0;k<A.length;k++){var N=A[k];I(N,k)&&x.push(N)}return x},O=R,_=function(A,I){return(0,l.Z)(A)?A.indexOf(I)>-1:!1},g=_,P=function(A,I){return I===void 0&&(I=[]),O(A,function(x){return!g(I,x)})},b=P},56039:function(Tt,vt,d){"use strict";var l=d(39934),R=d(93785);function O(_,g){if(_){var P;if((0,l.Z)(_))for(var b=0,A=_.length;b<A&&(P=g(_[b],b),P!==!1);b++);else if((0,R.Z)(_)){for(var I in _)if(_.hasOwnProperty(I)&&(P=g(_[I],I),P===!1))break}}}vt.Z=O},5759:function(Tt,vt,d){"use strict";var l=d(71879);vt.Z=function(R,O,_){for(var g=0,P=(0,l.Z)(O)?O.split("."):O;R&&g<P.length;)R=R[P[g++]];return R===void 0||g<P.length?_:R}},15610:function(Tt,vt,d){"use strict";var l=d(39934),R=d(71018),O=Object.prototype.hasOwnProperty;function _(g,P){if(!P||!(0,l.Z)(g))return{};for(var b={},A=(0,R.Z)(P)?P:function(N){return N[P]},I,x=0;x<g.length;x++){var k=g[x];I=A(k),O.call(b,I)?b[I].push(k):b[I]=[k]}return b}vt.Z=_},68599:function(Tt,vt){"use strict";var d=function(l){return l!==null&&typeof l!="function"&&isFinite(l.length)};vt.Z=d},39934:function(Tt,vt,d){"use strict";d.d(vt,{Z:function(){return l}});function l(R){return Array.isArray(R)}},50264:function(Tt,vt,d){"use strict";var l=d(97868),R=function(O){return(0,l.Z)(O,"Boolean")};vt.Z=R},21790:function(Tt,vt,d){"use strict";d.d(vt,{Z:function(){return l}});function l(R){return R instanceof Date}},42791:function(Tt,vt,d){"use strict";d.d(vt,{Z:function(){return k}});var l=d(76075),R=d(68599),O={}.toString,_=function(N){return O.call(N).replace(/^\[object /,"").replace(/]$/,"")},g=_,P=Object.prototype,b=function(N){var et=N&&N.constructor,tt=typeof et=="function"&&et.prototype||P;return N===tt},A=b,I=Object.prototype.hasOwnProperty;function x(N){if((0,l.Z)(N))return!0;if((0,R.Z)(N))return!N.length;var et=g(N);if(et==="Map"||et==="Set")return!N.size;if(A(N))return!Object.keys(N).length;for(var tt in N)if(I.call(N,tt))return!1;return!0}var k=x},62099:function(Tt,vt,d){"use strict";var l=d(60574),R=d(68599),O=d(71879),_=function(g,P){if(g===P)return!0;if(!g||!P||(0,O.Z)(g)||(0,O.Z)(P))return!1;if((0,R.Z)(g)||(0,R.Z)(P)){if(g.length!==P.length)return!1;for(var b=!0,A=0;A<g.length&&(b=_(g[A],P[A]),!!b);A++);return b}if((0,l.Z)(g)||(0,l.Z)(P)){var I=Object.keys(g),x=Object.keys(P);if(I.length!==x.length)return!1;for(var b=!0,A=0;A<I.length&&(b=_(g[I[A]],P[I[A]]),!!b);A++);return b}return!1};vt.Z=_},71018:function(Tt,vt,d){"use strict";d.d(vt,{Z:function(){return l}});function l(R){return typeof R=="function"}},76075:function(Tt,vt,d){"use strict";d.d(vt,{Z:function(){return l}});function l(R){return R==null}},5131:function(Tt,vt,d){"use strict";d.d(vt,{Z:function(){return R}});var l=1e-5;function R(O,_,g){return g===void 0&&(g=l),O===_||Math.abs(O-_)<g}},1933:function(Tt,vt,d){"use strict";d.d(vt,{Z:function(){return l}});function l(R){return typeof R=="number"}},60574:function(Tt,vt){"use strict";var d=function(l){return typeof l=="object"&&l!==null};vt.Z=d},93785:function(Tt,vt){"use strict";vt.Z=function(d){var l=typeof d;return d!==null&&l==="object"||l==="function"}},63467:function(Tt,vt,d){"use strict";var l=d(60574),R=d(97868),O=function(_){if(!(0,l.Z)(_)||!(0,R.Z)(_,"Object"))return!1;if(Object.getPrototypeOf(_)===null)return!0;for(var g=_;Object.getPrototypeOf(g)!==null;)g=Object.getPrototypeOf(g);return Object.getPrototypeOf(_)===g};vt.Z=O},71879:function(Tt,vt,d){"use strict";d.d(vt,{Z:function(){return l}});function l(R){return typeof R=="string"}},97868:function(Tt,vt){"use strict";var d={}.toString,l=function(R,O){return d.call(R)==="[object "+O+"]"};vt.Z=l},49527:function(Tt,vt){"use strict";var d=function(l){return l===void 0};vt.Z=d},45642:function(Tt,vt,d){"use strict";var l=d(96862),R=function(O){var _=(0,l.Z)(O);return _.charAt(0).toLowerCase()+_.substring(1)};vt.Z=R},82639:function(Tt,vt,d){"use strict";d.d(vt,{Z:function(){return l}});function l(R){if(!Array.isArray(R))return-1/0;var O=R.length;if(!O)return-1/0;for(var _=R[0],g=1;g<O;g++)_=Math.max(_,R[g]);return _}},40455:function(Tt,vt,d){"use strict";d.d(vt,{Z:function(){return O}});function l(_){var g,P,b,A=_||1;function I(k,N){++g>A&&(b=P,x(1),++g),P[k]=N}function x(k){g=0,P=Object.create(null),k||(b=Object.create(null))}return x(),{clear:x,has:function(k){return P[k]!==void 0||b[k]!==void 0},get:function(k){var N=P[k];if(N!==void 0)return N;if((N=b[k])!==void 0)return I(k,N),N},set:function(k,N){P[k]!==void 0?P[k]=N:I(k,N)}}}var R=new Map;function O(_,g,P){P===void 0&&(P=128);var b=function(){for(var A=[],I=0;I<arguments.length;I++)A[I]=arguments[I];var x=g?g.apply(this,A):A[0];R.has(_)||R.set(_,l(P));var k=R.get(_);if(k.has(x))return k.get(x);var N=_.apply(this,A);return k.set(x,N),N};return b}},59895:function(Tt,vt,d){"use strict";var l=d(39934);vt.Z=function(R){if((0,l.Z)(R))return R.reduce(function(O,_){return Math.min(O,_)},R[0])}},92387:function(Tt,vt,d){"use strict";d.d(vt,{Z:function(){return P}});var l=d(56039),R=d(39934),O=d(63467),_=function(b,A,I){if(!(0,R.Z)(b)&&!(0,O.Z)(b))return b;var x=I;return(0,l.Z)(b,function(k,N){x=A(x,k,N)}),x},g=_,P=function(b,A){return g(b,function(I,x,k){return A.includes(k)||(I[k]=x),I},{})}},84502:function(Tt,vt,d){"use strict";var l=d(56039),R=d(63467),O=Object.prototype.hasOwnProperty;vt.Z=function(_,g){if(_===null||!(0,R.Z)(_))return{};var P={};return(0,l.Z)(g,function(b){O.call(_,b)&&(P[b]=_[b])}),P}},37004:function(Tt,vt,d){"use strict";var l=d(93785),R=d(71879),O=d(1933);vt.Z=function(_,g,P){var b=_,A=(0,R.Z)(g)?g.split("."):g;return A.forEach(function(I,x){x<A.length-1?((0,l.Z)(b[I])||(b[I]=(0,O.Z)(A[x+1])?[]:{}),b=b[I]):b[I]=P}),_}},62199:function(Tt,vt){"use strict";vt.Z=function(d,l,R){var O,_,g,P,b=0;R||(R={});var A=function(){b=R.leading===!1?0:Date.now(),O=null,P=d.apply(_,g),O||(_=g=null)},I=function(){var x=Date.now();!b&&R.leading===!1&&(b=x);var k=l-(x-b);return _=this,g=arguments,k<=0||k>l?(O&&(clearTimeout(O),O=null),b=x,P=d.apply(_,g),O||(_=g=null)):!O&&R.trailing!==!1&&(O=setTimeout(A,k)),P};return I.cancel=function(){clearTimeout(O),b=0,O=_=g=null},I}},96862:function(Tt,vt,d){"use strict";var l=d(76075);vt.Z=function(R){return(0,l.Z)(R)?"":R.toString()}},35300:function(Tt,vt,d){"use strict";d.d(vt,{Z:function(){return l}});function l(R,O){O===void 0&&(O=new Map);var _=[];if(Array.isArray(R))for(var g=0,P=R.length;g<P;g++){var b=R[g];O.has(b)||(_.push(b),O.set(b,!0))}return _}},63178:function(Tt,vt){"use strict";var d={};vt.Z=function(l){return l=l||"g",d[l]?d[l]+=1:d[l]=1,l+d[l]}},18178:function(Tt,vt,d){"use strict";var l=d(96862),R=function(O){var _=(0,l.Z)(O);return _.charAt(0).toUpperCase()+_.substring(1)};vt.Z=R},66045:function(Tt,vt,d){"use strict";d.d(vt,{W:function(){return R}});function l(O,_,g){var P=O*Math.cos(g)-_*Math.sin(g),b=O*Math.sin(g)+_*Math.cos(g);return{x:P,y:b}}function R(O,_,g,P,b,A,I,x,k,N){var et=O,tt=_,Ct=g,ut=P,nt=x,kt=k,Nt=Math.PI*120/180,Bt=Math.PI/180*(+b||0),Xt=[],wt,ot,It,zt,Ot;if(N)ot=N[0],It=N[1],zt=N[2],Ot=N[3];else{wt=l(et,tt,-Bt),et=wt.x,tt=wt.y,wt=l(nt,kt,-Bt),nt=wt.x,kt=wt.y;var pe=(et-nt)/2,xe=(tt-kt)/2,qt=pe*pe/(Ct*Ct)+xe*xe/(ut*ut);qt>1&&(qt=Math.sqrt(qt),Ct*=qt,ut*=qt);var Ye=Ct*Ct,We=ut*ut,Oe=(A===I?-1:1)*Math.sqrt(Math.abs((Ye*We-Ye*xe*xe-We*pe*pe)/(Ye*xe*xe+We*pe*pe)));zt=Oe*Ct*xe/ut+(et+nt)/2,Ot=Oe*-ut*pe/Ct+(tt+kt)/2,ot=Math.asin(((tt-Ot)/ut*Math.pow(10,9)>>0)/Math.pow(10,9)),It=Math.asin(((kt-Ot)/ut*Math.pow(10,9)>>0)/Math.pow(10,9)),ot=et<zt?Math.PI-ot:ot,It=nt<zt?Math.PI-It:It,ot<0&&(ot=Math.PI*2+ot),It<0&&(It=Math.PI*2+It),I&&ot>It&&(ot-=Math.PI*2),!I&&It>ot&&(It-=Math.PI*2)}var Qe=It-ot;if(Math.abs(Qe)>Nt){var Mt=It,ne=nt,Me=kt;It=ot+Nt*(I&&It>ot?1:-1),nt=zt+Ct*Math.cos(It),kt=Ot+ut*Math.sin(It),Xt=R(nt,kt,Ct,ut,b,0,I,ne,Me,[It,Mt,zt,Ot])}Qe=It-ot;var nn=Math.cos(ot),le=Math.sin(ot),be=Math.cos(It),De=Math.sin(It),Yt=Math.tan(Qe/4),re=4/3*Ct*Yt,xt=4/3*ut*Yt,at=[et,tt],se=[et+re*le,tt-xt*nn],Fe=[nt+re*De,kt-xt*be],Re=[nt,kt];if(se[0]=2*at[0]-se[0],se[1]=2*at[1]-se[1],N)return se.concat(Fe,Re,Xt);Xt=se.concat(Fe,Re,Xt);for(var ge=[],Ie=0,Ne=Xt.length;Ie<Ne;Ie+=1)ge[Ie]=Ie%2?l(Xt[Ie-1],Xt[Ie],Bt).y:l(Xt[Ie],Xt[Ie+1],Bt).x;return ge}},68901:function(Tt,vt,d){"use strict";d.d(vt,{y:function(){return l}});function l(R,O){return Math.sqrt((R[0]-O[0])*(R[0]-O[0])+(R[1]-O[1])*(R[1]-O[1]))}},12397:function(Tt,vt,d){"use strict";d.r(vt),d.d(vt,{default:function(){return Tv}});var l={};d.r(l),d.d(l,{circle:function(){return Ae},diamond:function(){return $e},rect:function(){return an},simple:function(){return xn},triangle:function(){return Le},triangleRect:function(){return bn},vee:function(){return Xe}});var R=d(59301),O=d(76820),_=d(67341),g=d(51910),P=d(78241),b=d(3113),A=d(8591),I=d(43418),x=d(5112),k=d(92832),N=d(57809),et=d(90115),tt=d(64866),Ct=d(22566),ut={rightopen:"rightopen___cs_vm",rightmodal:"rightmodal___MNsxT",rname:"rname___QGxLy",topradios:"topradios___si9En",topradio:"topradio___kGT57",bocent:"bocent___yMEuU",bctitle:"bctitle___Pll_D",btcent:"btcent___aHH1B",bctitles:"bctitles___UC1Yp"},nt=d(14675),kt=d(18178),Nt=d(76075),Bt=d(62099),Xt=d(93785);const wt={duration:500},ot={duration:1e3,easing:"cubic-bezier(0.250, 0.460, 0.450, 0.940)",iterations:1,fill:"both"},It={CHANGE:"change"};var zt;(function(i){i.NodeAdded="NodeAdded",i.NodeUpdated="NodeUpdated",i.NodeRemoved="NodeRemoved",i.EdgeAdded="EdgeAdded",i.EdgeUpdated="EdgeUpdated",i.EdgeRemoved="EdgeRemoved",i.ComboAdded="ComboAdded",i.ComboUpdated="ComboUpdated",i.ComboRemoved="ComboRemoved"})(zt||(zt={}));var Ot;(function(i){i.DRAW="draw",i.COLLAPSE="collapse",i.EXPAND="expand",i.TRANSFORM="transform"})(Ot||(Ot={}));var pe;(function(i){i.CLICK="canvas:click",i.DBLCLICK="canvas:dblclick",i.POINTER_OVER="canvas:pointerover",i.POINTER_LEAVE="canvas:pointerleave",i.POINTER_ENTER="canvas:pointerenter",i.POINTER_MOVE="canvas:pointermove",i.POINTER_OUT="canvas:pointerout",i.POINTER_DOWN="canvas:pointerdown",i.POINTER_UP="canvas:pointerup",i.CONTEXT_MENU="canvas:contextmenu",i.DRAG_START="canvas:dragstart",i.DRAG="canvas:drag",i.DRAG_END="canvas:dragend",i.DRAG_ENTER="canvas:dragenter",i.DRAG_OVER="canvas:dragover",i.DRAG_LEAVE="canvas:dragleave",i.DROP="canvas:drop",i.WHEEL="canvas:wheel"})(pe||(pe={}));var xe;(function(i){i.CLICK="combo:click",i.DBLCLICK="combo:dblclick",i.POINTER_OVER="combo:pointerover",i.POINTER_LEAVE="combo:pointerleave",i.POINTER_ENTER="combo:pointerenter",i.POINTER_MOVE="combo:pointermove",i.POINTER_OUT="combo:pointerout",i.POINTER_DOWN="combo:pointerdown",i.POINTER_UP="combo:pointerup",i.CONTEXT_MENU="combo:contextmenu",i.DRAG_START="combo:dragstart",i.DRAG="combo:drag",i.DRAG_END="combo:dragend",i.DRAG_ENTER="combo:dragenter",i.DRAG_OVER="combo:dragover",i.DRAG_LEAVE="combo:dragleave",i.DROP="combo:drop"})(xe||(xe={}));var qt;(function(i){i.CLICK="click",i.DBLCLICK="dblclick",i.POINTER_OVER="pointerover",i.POINTER_LEAVE="pointerleave",i.POINTER_ENTER="pointerenter",i.POINTER_MOVE="pointermove",i.POINTER_OUT="pointerout",i.POINTER_DOWN="pointerdown",i.POINTER_UP="pointerup",i.CONTEXT_MENU="contextmenu",i.DRAG_START="dragstart",i.DRAG="drag",i.DRAG_END="dragend",i.DRAG_ENTER="dragenter",i.DRAG_OVER="dragover",i.DRAG_LEAVE="dragleave",i.DROP="drop",i.KEY_DOWN="keydown",i.KEY_UP="keyup",i.WHEEL="wheel"})(qt||(qt={}));var Ye;(function(i){i.KEY_DOWN="keydown",i.KEY_UP="keyup"})(Ye||(Ye={}));var We;(function(i){i.CLICK="edge:click",i.DBLCLICK="edge:dblclick",i.POINTER_OVER="edge:pointerover",i.POINTER_LEAVE="edge:pointerleave",i.POINTER_ENTER="edge:pointerenter",i.POINTER_MOVE="edge:pointermove",i.POINTER_OUT="edge:pointerout",i.POINTER_DOWN="edge:pointerdown",i.POINTER_UP="edge:pointerup",i.CONTEXT_MENU="edge:contextmenu",i.DRAG_ENTER="edge:dragenter",i.DRAG_OVER="edge:dragover",i.DRAG_LEAVE="edge:dragleave",i.DROP="edge:drop"})(We||(We={}));var Oe;(function(i){i.BEFORE_CANVAS_INIT="beforecanvasinit",i.AFTER_CANVAS_INIT="aftercanvasinit",i.BEFORE_SIZE_CHANGE="beforesizechange",i.AFTER_SIZE_CHANGE="aftersizechange",i.BEFORE_ELEMENT_CREATE="beforeelementcreate",i.AFTER_ELEMENT_CREATE="afterelementcreate",i.BEFORE_ELEMENT_UPDATE="beforeelementupdate",i.AFTER_ELEMENT_UPDATE="afterelementupdate",i.BEFORE_ELEMENT_DESTROY="beforeelementdestroy",i.AFTER_ELEMENT_DESTROY="afterelementdestroy",i.BEFORE_ELEMENT_TRANSLATE="beforeelementtranslate",i.AFTER_ELEMENT_TRANSLATE="afterelementtranslate",i.BEFORE_DRAW="beforedraw",i.AFTER_DRAW="afterdraw",i.BEFORE_RENDER="beforerender",i.AFTER_RENDER="afterrender",i.BEFORE_ANIMATE="beforeanimate",i.AFTER_ANIMATE="afteranimate",i.BEFORE_LAYOUT="beforelayout",i.AFTER_LAYOUT="afterlayout",i.BEFORE_STAGE_LAYOUT="beforestagelayout",i.AFTER_STAGE_LAYOUT="afterstagelayout",i.BEFORE_TRANSFORM="beforetransform",i.AFTER_TRANSFORM="aftertransform",i.BATCH_START="batchstart",i.BATCH_END="batchend",i.BEFORE_DESTROY="beforedestroy",i.AFTER_DESTROY="afterdestroy",i.BEFORE_RENDERER_CHANGE="beforerendererchange",i.AFTER_RENDERER_CHANGE="afterrendererchange"})(Oe||(Oe={}));var Qe;(function(i){i.UNDO="undo",i.REDO="redo",i.CANCEL="cancel",i.ADD="add",i.CLEAR="clear",i.CHANGE="change"})(Qe||(Qe={}));var Mt;(function(i){i.CLICK="node:click",i.DBLCLICK="node:dblclick",i.POINTER_OVER="node:pointerover",i.POINTER_LEAVE="node:pointerleave",i.POINTER_ENTER="node:pointerenter",i.POINTER_MOVE="node:pointermove",i.POINTER_OUT="node:pointerout",i.POINTER_DOWN="node:pointerdown",i.POINTER_UP="node:pointerup",i.CONTEXT_MENU="node:contextmenu",i.DRAG_START="node:dragstart",i.DRAG="node:drag",i.DRAG_END="node:dragend",i.DRAG_ENTER="node:dragenter",i.DRAG_OVER="node:dragover",i.DRAG_LEAVE="node:dragleave",i.DROP="node:drop"})(Mt||(Mt={}));const ne="combo",Me="tree";var nn;(function(i){i.NODE="node",i.EDGE="edge",i.COMBO="combo",i.THEME="theme",i.PALETTE="palette",i.LAYOUT="layout",i.BEHAVIOR="behavior",i.PLUGIN="plugin",i.ANIMATION="animation",i.TRANSFORM="transform",i.SHAPE="shape"})(nn||(nn={}));const le={animation:{},behavior:{},combo:{},edge:{},layout:{},node:{},palette:{},theme:{},plugin:{},transform:{},shape:{}};function be(i,t){var e;const n=(e=le[i])===null||e===void 0?void 0:e[t];if(n)return n}function De(i){return EXTENSION_REGISTRY[i]}const Yt="5.0.27",re="G6";function xt(i){return`[${re} v${Yt}] ${i}`}const at={mute:!1,debug:i=>{!at.mute&&console.debug(xt(i))},info:i=>{!at.mute&&console.info(xt(i))},warn:i=>{!at.mute&&console.warn(xt(i))},error:i=>{!at.mute&&console.error(xt(i))}};function se(i){const{theme:t}=i;if(!t)return{};const e=be(nn.THEME,t);return e||(at.warn(`The theme of ${t} is not registered.`),{})}function Fe(i,t){if(Array.isArray(i)&&i.length===0)return null;const e=Array.isArray(i)?i[0]:i,n=Array.isArray(i)?i.slice(1):t||[];return new Proxy(e,{get(r,o){return typeof r[o]=="function"&&!["onframe","onfinish"].includes(o)?(...u)=>{r[o](...u),n.forEach(v=>{var S;return(S=v[o])===null||S===void 0?void 0:S.call(v,...u)})}:o==="finished"?Promise.all([e.finished,...n.map(u=>u.finished)]):Reflect.get(r,o)},set(r,o,u){return["onframe","onfinish"].includes(o)||n.forEach(v=>{v[o]=u}),Reflect.set(r,o,u)}})}function Re(i){const t=i.reduce((n,r)=>(Object.entries(r).forEach(([o,u])=>{n[o]===void 0?n[o]=[u]:n[o].push(u)}),n),{});Object.entries(t).forEach(([n,r])=>{(r.length!==i.length||r.some(o=>(0,Nt.Z)(o))||r.every(o=>!["sourceNode","targetNode","childrenNode"].includes(n)&&(0,Bt.Z)(o,r[0])))&&delete t[n]});const e=Object.entries(t).reduce((n,[r,o])=>(o.forEach((u,v)=>{n[v]?n[v][r]=u:n[v]={[r]:u}}),n),[]);return i.length!==0&&e.length===0&&e.push({_:0},{_:0}),e}function ge(i){switch(i){case"opacity":return 1;case"x":case"y":case"z":case"zIndex":return 0;case"visibility":return"visible";case"collapsed":return!1;case"states":return[];default:return}}function Ie(i,t){const{animation:e}=i;if(e===!1||t===!1)return!1;const n=Object.assign({},wt);return(0,Xt.Z)(e)&&Object.assign(n,e),(0,Xt.Z)(t)&&Object.assign(n,t),n}function Ne(i){if(typeof i=="string"){const t=be(nn.ANIMATION,i);return t||(at.warn(`The animation of ${i} is not registered.`),[])}return i}function bt(i,t,e,n){var r,o;const{animation:u}=i,v=(r=i==null?void 0:i[t])===null||r===void 0?void 0:r.animation;if(v===!1)return[];const S=v==null?void 0:v[e];if(S===!1)return[];if(u===!1||n===!1)return[];const C=(o=se(i)[t])===null||o===void 0?void 0:o.animation,T=(lt=[])=>Ne(lt).map(gt=>Object.assign(Object.assign(Object.assign(Object.assign({},ot),(0,Xt.Z)(u)&&u),gt),(0,Xt.Z)(n)&&n));if(S)return T(S);if(!C)return[];const $=C[e];return $===!1?[]:T($)}function Jt(i,t,e,n){if(Array.isArray(n)){let o=!1;const u=n.map(v=>v[0]==="translate"?(o=!0,["translate",i,t]):v[0]==="translate3d"?(o=!0,["translate3d",i,t,e]):v);return o||u.splice(0,0,e===0?["translate",i,t]:["translate3d",i,t,e]),u}const r=n?n.replace(/translate(3d)?\([^)]*\)/g,""):"";return e===0?`translate(${i}, ${t})${r}`:`translate3d(${i}, ${t}, ${e})${r}`}var oe=function(i,t){var e={};for(var n in i)Object.prototype.hasOwnProperty.call(i,n)&&t.indexOf(n)<0&&(e[n]=i[n]);if(i!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,n=Object.getOwnPropertySymbols(i);r<n.length;r++)t.indexOf(n[r])<0&&Object.prototype.propertyIsEnumerable.call(i,n[r])&&(e[n[r]]=i[n[r]]);return e};const M=(i,t,e)=>{if(!e.length)return null;const[n,r]=t,o=C=>{var T;if(C){const $=i.getShape(C);if(!$)return null;const lt=`get${(0,kt.Z)(C)}Style`,gt=((T=i==null?void 0:i[lt])===null||T===void 0?void 0:T.bind(i))||(ve=>ve),Gt=(gt==null?void 0:gt(n))||{},ee=(gt==null?void 0:gt(r))||{};return{shape:$,fromStyle:Gt,toStyle:ee}}else return{shape:i,fromStyle:n,toStyle:r}};let u;const v=e.map(C=>{var{fields:T,shape:$,states:lt}=C,gt=oe(C,["fields","shape","states"]);const Gt=o($);if(!Gt)return null;const{shape:ee,fromStyle:ve,toStyle:ke}=Gt,ze=[{},{}];if(T.forEach(ln=>{var kn,Tn;Object.assign(ze[0],{[ln]:(kn=ve[ln])!==null&&kn!==void 0?kn:ge(ln)}),Object.assign(ze[1],{[ln]:(Tn=ke[ln])!==null&&Tn!==void 0?Tn:ge(ln)})}),ze.some(ln=>Object.keys(ln).some(kn=>["x","y","z"].includes(kn)))){const{x:ln=0,y:kn=0,z:Tn=0,transform:In=""}=ee.attributes||{};ze.forEach(hn=>{hn.transform=Jt(hn.x||ln,hn.y||kn,hn.z||Tn,In)})}const Ke=ee.animate(Re(ze),gt);return $===void 0&&(u=Ke),Ke}).filter(Boolean),S=u||(v==null?void 0:v[0]);return S?Fe(S,v.filter(C=>C!==C)):null},Q=[{fields:["opacity"]}],te=[{fields:["x","y"]}],Ut=[{fields:["x","y"]}],we=Ut,Ce=[{fields:["sourceNode","targetNode"]}],_e=Ce,mt=[{fields:["childrenNode","x","y"]}],X=mt,Pt=[{fields:["childrenNode","x","y"]}];var At=d(71018),Rt=d(15610),_t=d(62199),Vt=d(37547);function ae(i){return"source"in i&&"target"in i}function fe(i){return i.length===2}function me(i){return i.length===3}function Ze(i){return i instanceof Float32Array?!0:Array.isArray(i)&&(i.length===2||i.length===3)?i.every(t=>typeof t=="number"):!1}function Ge(i,t,e){return i>=t&&i<=e}function Ve(i=0){if(Array.isArray(i)){const[t=0,e=t,n=t,r=e]=i;return[t,e,n,r]}return[i,i,i,i]}function rn(i=0){const t=Ve(i);return t[0]+t[2]}function wn(i=0){const t=Ve(i);return t[1]+t[3]}function on(i){return i.max[0]-i.min[0]}function _n(i){return i.max[1]-i.min[1]}function Cn(i){return[on(i),_n(i)]}function Ln(i,t){const e=Ze(i)?En(i):i.getShape("key").getBounds();return t?cr(e,t):e}function En(i){const[t,e,n=0]=i,r=new nt.mN;return r.setMinMax([t,e,n],[t,e,n]),r}function cr(i,t){const[e,n,r,o]=Ve(t),[u,v,S]=i.min,[C,T,$]=i.max,lt=new nt.mN;return lt.setMinMax([u-o,v-e,S],[C+n,T+r,$]),lt}function Bn(i){if(i.length===0)return new nt.mN;if(i.length===1)return i[0];const t=new nt.mN;t.setMinMax(i[0].min,i[0].max);for(let e=1;e<i.length;e++){const n=i[e];t.setMinMax([Math.min(t.min[0],n.min[0]),Math.min(t.min[1],n.min[1]),Math.min(t.min[2],n.min[2])],[Math.max(t.max[0],n.max[0]),Math.max(t.max[1],n.max[1]),Math.max(t.max[2],n.max[2])])}return t}function br(i,t){const[e,n]=i.min,[r,o]=i.max,[u,v]=t.min,[S,C]=t.max;return e>=u&&r<=S&&n>=v&&o<=C}function fr(i,t){return Ge(i[0],t.min[0],t.max[0])&&Ge(i[1],t.min[1],t.max[1])}function Zr(i,t,e=!1){const{min:[n,r],max:[o,u]}=t,v=(i[1]===r||i[1]===u)&&(e||Ge(i[0],n,o)),S=(i[0]===n||i[0]===o)&&(e||Ge(i[1],r,u));return v||S}function di(i,t){return!fr(i,t)}function Xr(i,t){const{center:e}=t;return i[0]===e[0]&&i[1]===e[1]}function Mr(i,t){const[e,n]=i,[r,o]=t.min,[u,v]=t.max,S=e-r,C=u-e,T=n-o,$=v-n,lt=Math.min(S,C,T,$);return lt===S?"left":lt===C?"right":lt===T?"top":lt===$?"bottom":"left"}function gi(i,t){const e=(0,Vt.Z)(i);if(fr(i,t))switch(Mr(i,t)){case"left":e[0]=t.min[0];break;case"right":e[0]=t.max[0];break;case"top":e[1]=t.min[1];break;case"bottom":e[1]=t.max[1];break}else{const[n,r]=i,[o,u]=t.min,[v,S]=t.max;e[0]=Ge(n,o,v)?n:n<o?o:v,e[1]=Ge(r,u,S)?r:r<u?u:S}return e}function yi(i,t){const{center:e}=i,[n,r]=Cn(i),o=t==="up"||t==="down"?e[0]:t==="right"?e[0]-n/6:e[0]+n/6,u=t==="left"||t==="right"?e[1]:t==="down"?e[1]-r/6:e[1]+r/6;return[o,u]}function _i(i,t){let[e,n]=Cn(i);return[e,n]=t==="up"||t==="down"?[e,n]:[n,e],(Math.pow(n,2)-Math.pow(Math.sqrt(Math.pow(e/2,2)+Math.pow(n,2))-e/2,2))/(2*n)}function qr(i){const{min:[t,e],max:[n,r]}=i,o=[t,r],u=[n,r],v=[n,e],S=[t,e];return[[o,u],[u,v],[v,S],[S,o]]}var Jn=d(55532);function sn(i){if(i.id!==void 0)return i.id;if(i.source!==void 0&&i.target!==void 0)return`${i.source}-${i.target}`;throw new Error(xt("The datum does not have available id."))}function Wt(i){return i.combo}function y(i,t){const e={nodes:(i.nodes||[]).map(sn),edges:(i.edges||[]).map(sn),combos:(i.combos||[]).map(sn)};return t?Object.values(e).flat():e}const E=(i,t,e)=>{var n;switch(e.type){case"degree":{const r=new Map;return(n=i.nodes)===null||n===void 0||n.forEach(o=>{const u=t(sn(o),e.direction).length;r.set(sn(o),u)}),r}case"betweenness":return f(i,e.directed,e.weightPropertyName);case"closeness":return w(i,e.directed,e.weightPropertyName);case"eigenvector":return z(i,e.directed);case"pagerank":return Z(i,e.epsilon,e.linkProb);default:return c(i)}},c=i=>{var t;const e=new Map;return(t=i.nodes)===null||t===void 0||t.forEach(n=>{e.set(sn(n),0)}),e},f=(i,t,e)=>{const n=c(i),{nodes:r=[]}=i;return r.forEach(o=>{r.forEach(u=>{if(o!==u){const{allPath:v}=(0,Jn.ni)(i,sn(o),sn(u),t,e),S=v.length;v.flat().forEach(C=>{C!==sn(o)&&C!==sn(u)&&n.set(C,n.get(C)+1/S)})}})}),n},w=(i,t,e)=>{const n=new Map,{nodes:r=[]}=i;return r.forEach(o=>{const u=r.reduce((v,S)=>{if(o!==S){const{length:C}=(0,Jn.ni)(i,sn(o),sn(S),t,e);v+=C}return v},0);n.set(sn(o),1/u)}),n},Z=(i,t,e)=>{var n;const r=new Map,o=(0,Jn.EF)(i,t,e);return(n=i.nodes)===null||n===void 0||n.forEach(u=>{r.set(sn(u),o[sn(u)])}),r},z=(i,t)=>{const{nodes:e=[]}=i,n=H(i,t),r=q(n,e.length),o=new Map;return e.forEach((u,v)=>{o.set(sn(u),r[v])}),o},H=(i,t)=>{const{nodes:e=[],edges:n=[]}=i,r=Array(e.length).fill(null).map(()=>Array(e.length).fill(0));return n.forEach(({source:o,target:u})=>{const v=e.findIndex(C=>sn(C)===o),S=e.findIndex(C=>sn(C)===u);t?r[v][S]=1:(r[v][S]=1,r[S][v]=1)}),r},q=(i,t,e=100,n=1e-6)=>{let r=Array(t).fill(1),o=1/0;for(let u=0;u<e&&o>n;u++){const v=Array(t).fill(0);for(let C=0;C<t;C++)for(let T=0;T<t;T++)v[C]+=i[C][T]*r[T];const S=Math.sqrt(v.reduce((C,T)=>C+T*T,0));for(let C=0;C<t;C++)v[C]/=S;o=Math.sqrt(v.reduce((C,T,$)=>C+(T-r[$])*T,0)),r=v}return r};function Dt(i,t,e,n=Bt.Z){const r=new Map(i.map(lt=>[e(lt),lt])),o=new Map(t.map(lt=>[e(lt),lt])),u=new Set(r.keys()),v=new Set(o.keys()),S=[],C=[],T=[],$=[];return v.forEach(lt=>{u.has(lt)?n(r.get(lt),o.get(lt))?$.push(o.get(lt)):C.push(o.get(lt)):S.push(o.get(lt))}),u.forEach(lt=>{v.has(lt)||T.push(r.get(lt))}),{enter:S,exit:T,keep:$,update:C}}const U=new WeakMap;function Y(i,t,e=!1,n){if(t===void 0)return;const r=(o,u=t)=>{const v=(S=u)=>o.childNodes.forEach(C=>r(C,S));if(n&&!n(o))return v();if(!e&&o===i)i.style.visibility=t,U.delete(i),v(t);else{U.has(o)||U.set(o,o.style.visibility);const S=u==="hidden"||G(o)==="hidden"?"hidden":"visible";o.style.visibility=S,v(S)}};r(i)}function G(i){return U.has(i)?U.get(i):i.style.visibility}function J(i,t,e){const n={},r=o=>(o in n||(n[o]=0),`${t}-${o}-${n[o]++}`);return e.map(o=>typeof o=="string"?{type:o,key:r(o)}:typeof o=="function"?o.call(i):o.key?o:Object.assign(Object.assign({},o),{key:r(o.type)}))}class pt{constructor(t){this.extensions=[],this.extensionMap={},this.context=t}setExtensions(t){const e=J(this.context.graph,this.category,t),{enter:n,update:r,exit:o,keep:u}=Dt(this.extensions,e,v=>v.key);this.createExtensions(n),this.updateExtensions([...r,...u]),this.destroyExtensions(o),this.extensions=e}createExtension(t){const{category:e}=this,{key:n,type:r}=t,o=be(e,r);if(!o)return at.warn(`The extension ${r} of ${e} is not registered.`);const u=new o(this.context,t);this.extensionMap[n]=u}createExtensions(t){t.forEach(e=>this.createExtension(e))}updateExtension(t){const{key:e}=t,n=this.extensionMap[e];n&&n.update(t)}updateExtensions(t){t.forEach(e=>this.updateExtension(e))}destroyExtension(t){const e=this.extensionMap[t];e&&(e.destroy(),delete this.extensionMap[t])}destroyExtensions(t){t.forEach(({key:e})=>this.destroyExtension(e))}destroy(){Object.values(this.extensionMap).forEach(t=>t.destroy()),this.context={},this.extensions=[],this.extensionMap={}}}class Kt{constructor(t,e){this.events=[],this.destroyed=!1,this.context=t,this.options=e}update(t){this.options=Object.assign(this.options,t)}destroy(){this.context={},this.options={},this.destroyed=!0}}class yt extends Kt{}class Qt extends yt{constructor(t,e){super(t,Object.assign({},Qt.defaultOptions,e)),this.isOverlapping=(n,r)=>r.some(o=>n.intersects(o)),this.occupiedBounds=[],this.detectLabelCollision=n=>{const r=this.context.viewport,o={show:[],hide:[]};return this.occupiedBounds=[],n.forEach(u=>{const v=u.getShape("label").getRenderBounds();r.isInViewport(v,!0)&&!this.isOverlapping(v,this.occupiedBounds)?(o.show.push(u),this.occupiedBounds.push(cr(v,this.options.padding))):o.hide.push(u)}),o},this.hideLabelIfExceedViewport=(n,r)=>{const{exit:o}=Dt(n,r,u=>u.id);o==null||o.forEach(this.hideLabel)},this.nodeCentralities=new Map,this.sortNodesByCentrality=(n,r)=>{const{model:o}=this.context,u=o.getData(),v=o.getRelatedEdgesData.bind(o);return n.map(C=>(this.nodeCentralities.has(C.id)||(this.nodeCentralities=E(u,v,r)),{node:C,centrality:this.nodeCentralities.get(C.id)})).sort((C,T)=>T.centrality-C.centrality).map(C=>C.node)},this.sortLabelElementsInView=n=>{const{sort:r,sortNode:o,sortCombo:u,sortEdge:v}=this.options,{model:S}=this.context;if((0,At.Z)(r))return n.sort((ee,ve)=>r(S.getElementDataById(ee.id),S.getElementDataById(ve.id)));const{node:C=[],edge:T=[],combo:$=[]}=(0,Rt.Z)(n,ee=>ee.type),lt=(0,At.Z)(u)?$.sort((ee,ve)=>u(...S.getComboData([ee.id,ve.id]))):$,gt=(0,At.Z)(o)?C.sort((ee,ve)=>o(...S.getNodeData([ee.id,ve.id]))):this.sortNodesByCentrality(C,o),Gt=(0,At.Z)(v)?T.sort((ee,ve)=>v(...S.getEdgeData([ee.id,ve.id]))):T;return[...lt,...gt,...Gt]},this.labelElementsInView=[],this.onToggleVisibility=n=>{if(!this.validate(n)){this.hiddenElements.size>0&&(this.hiddenElements.forEach(this.showLabel),this.hiddenElements.clear());return}const r=this.getLabelElementsInView();this.hideLabelIfExceedViewport(this.labelElementsInView,r),this.labelElementsInView=r;const o=this.sortLabelElementsInView(this.labelElementsInView),{show:u,hide:v}=this.detectLabelCollision(o);for(let S=u.length-1;S>=0;S--)this.showLabel(u[S]);v.forEach(this.hideLabel)},this.hiddenElements=new Map,this.hideLabel=n=>{const r=n.getShape("label");r&&Y(r,"hidden"),this.hiddenElements.set(n.id,n)},this.showLabel=n=>{const r=n.getShape("label");r&&Y(r,"visible"),n.toFront(),this.hiddenElements.delete(n.id)},this.onTransform=(0,_t.Z)(this.onToggleVisibility,this.options.throttle,{leading:!0}),this.bindEvents()}update(t){this.unbindEvents(),super.update(t),this.bindEvents(),this.onToggleVisibility({})}get labelElements(){const e=Object.values(this.context.element.elementMap).filter(n=>n.isVisible()&&n.getShape("label"));return Object.fromEntries(e.map(n=>[n.id,n]))}getLabelElementsInView(){const t=this.context.viewport;return Object.values(this.labelElements).filter(e=>t.isInViewport(e.getShape("key").getRenderBounds()))}bindEvents(){const{graph:t}=this.context;t.on(Oe.AFTER_DRAW,this.onToggleVisibility),t.on(Oe.AFTER_LAYOUT,this.onToggleVisibility),t.on(Oe.AFTER_TRANSFORM,this.onTransform)}unbindEvents(){const{graph:t}=this.context;t.off(Oe.AFTER_DRAW,this.onToggleVisibility),t.off(Oe.AFTER_LAYOUT,this.onToggleVisibility),t.off(Oe.AFTER_TRANSFORM,this.onTransform)}validate(t){if(this.destroyed)return!1;const{enable:e}=this.options;return(0,At.Z)(e)?e(t):!!e}destroy(){this.unbindEvents(),super.destroy()}}Qt.defaultOptions={enable:!0,throttle:100,padding:0,sortNode:{type:"degree"}};var ct=d(23343);const ht=[0,0,0];function rt(i,t){return i.map((e,n)=>e+t[n])}function $t(i,t){return i.map((e,n)=>e-t[n])}function Ht(i,t){return typeof t=="number"?i.map(e=>e*t):i.map((e,n)=>e*t[n])}function ue(i,t){return typeof t=="number"?i.map(e=>e/t):i.map((e,n)=>e/t[n])}function Ee(i,t){return i.reduce((e,n,r)=>e+n*t[r],0)}function ie(i,t){const e=Wn(i),n=Wn(t);return[e[1]*n[2]-e[2]*n[1],e[2]*n[0]-e[0]*n[2],e[0]*n[1]-e[1]*n[0]]}function Pe(i,t){return i.map(e=>e*t)}function Be(i,t){return Math.sqrt(i.reduce((e,n,r)=>e+Math.pow(n-t[r]||0,2),0))}function He(i,t){return i.reduce((e,n,r)=>e+Math.abs(n-t[r]),0)}function en(i){const t=i.reduce((e,n)=>e+Math.pow(n,2),0);return i.map(e=>e/Math.sqrt(t))}function un(i,t,e=!1){const n=i[0]*t[1]-i[1]*t[0];let r=Math.acos(Ht(i,t).reduce((o,u)=>o+u,0)/(Be(i,ht)*Be(t,ht)));return e&&n<0&&(r=2*Math.PI-r),r}function mn(i,t){return i.every((e,n)=>e===t[n])}function Sn(i,t=!0){return t?[-i[1],i[0]]:[i[1],-i[0]]}function Pn(i,t){return i.map(e=>e%t)}function $n(i){return[i[0],i[1]]}function Wn(i){return fe(i)?[i[0],i[1],0]:i}function Xn(i){const[t,e]=i;return!t&&!e?0:Math.atan2(e,t)}function An(i,t){const[e,n]=i,[r,o]=t,u=$t(e,n),v=$t(r,o);return ie(u,v).every(S=>S===0)}function Zn(i,t,e=!1){if(An(i,t))return;const[n,r]=i,[o,u]=t,v=((n[0]-o[0])*(o[1]-u[1])-(n[1]-o[1])*(o[0]-u[0]))/((n[0]-r[0])*(o[1]-u[1])-(n[1]-r[1])*(o[0]-u[0])),S=u[0]-o[0]?(n[0]-o[0]+v*(r[0]-n[0]))/(u[0]-o[0]):(n[1]-o[1]+v*(r[1]-n[1]))/(u[1]-o[1]);if(!(!e&&(!Ge(v,0,1)||!Ge(S,0,1))))return[n[0]+v*(r[0]-n[0]),n[1]+v*(r[1]-n[1])]}function qn(i){if(Array.isArray(i))return Ge(i[0],0,1)&&Ge(i[1],0,1)?i:[.5,.5];const t=i.split("-"),e=t.includes("left")?0:t.includes("right")?1:.5,n=t.includes("top")?0:t.includes("bottom")?1:.5;return[e,n]}function er(i){const{x:t=0,y:e=0,z:n=0}=i.style||{};return[+t,+e,+n]}function Cr(i){const{x:t,y:e,z:n}=i.style||{};return t!==void 0||e!==void 0||n!==void 0}function Un(i,t){const[e,n]=t,{min:r,max:o}=i;return[r[0]+e*(o[0]-r[0]),r[1]+n*(o[1]-r[1])]}function ar(i,t="center"){const e=qn(t);return Un(i,e)}function ii(i,t){const e=parseAnchor(t);return Un(i,e)}const Or=i=>{const[t,e]=i;return{left:Math.min(t[0],e[0]),right:Math.max(t[0],e[0]),top:Math.min(t[1],e[1]),bottom:Math.max(t[1],e[1])}};function Lr(i){var t;return[i.x,i.y,(t=i.z)!==null&&t!==void 0?t:0]}function fi(i){var t;return{x:i[0],y:i[1],z:(t=i[2])!==null&&t!==void 0?t:0}}function zr(i){return i.sort((t,e)=>t[0]-e[0]||t[1]-e[1])}function Er(i){const t=new Set;return i.filter(e=>{const n=e.join(",");return t.has(n)?!1:(t.add(n),!0)})}function mr(i,t=0){return i.map(e=>parseFloat(e.toFixed(t)))}function si(i,t,e,n=!1){if((0,Bt.Z)(i,t))return i;const r=n?$t(i,t):$t(t,i),o=en(r),u=[o[0]*e,o[1]*e];return rt($n(i),u)}function Si(i,t){return i[1]===t[1]}function Mi(i,t){return i[0]===t[0]}function pi(i,t){return Si(i,t)||Mi(i,t)}function Wi(i,t,e){return An([i,t],[t,e])}function Ji(i,t){return[2*t[0]-i[0],2*t[1]-i[1]]}function Hn(i,t,e,n=!0,r=!1){for(let o=0;o<e.length;o++){let u=e[o],v=e[(o+1)%e.length];n&&(u=rt(t,u),v=rt(t,v));const S=r?Ji(i,t):i,C=Zn([t,S],[u,v]);if(C)return{point:C,line:[u,v]}}return{point:t,line:void 0}}function ra(i,t,e,n){const r=i[0],o=i[1];let u=!1;e===void 0&&(e=0),n===void 0&&(n=t.length);const v=n-e;for(let S=0,C=v-1;S<v;C=S++){const T=t[S+e][0],$=t[S+e][1],lt=t[C+e][0],gt=t[C+e][1];$>o!=gt>o&&r<(lt-T)*(o-$)/(gt-$)+T&&(u=!u)}return u}function Tr(i,t,e=!1){const n=ar(t,"center"),r=[ar(t,"left-top"),ar(t,"right-top"),ar(t,"right-bottom"),ar(t,"left-bottom")];return Hn(i,n,r,!1,e).point}function hr(i,t,e=!1){const n=t.center,r=e?Ji(i,n):i,o=$t(r,t.center),u=Math.atan2(o[1],o[0]);if(isNaN(u))return n;const v=on(t)/2,S=_n(t)/2,C=n[0]+v*Math.cos(u),T=n[1]+S*Math.sin(u);return[C,T]}function $r(i,t){let e=1/0,n=[i[0],t[0]];return i.forEach(r=>{t.forEach(o=>{const u=Be(r,o);u<e&&(e=u,n=[r,o])})}),n}function ni(i,t){let e=1/0,n=[[0,0],[0,0]];return t.forEach(r=>{const o=Bi(i,r);o<e&&(e=o,n=r)}),n}function Bi(i,t){const e=ya(i,t);return Be(i,e)}function ya(i,t){const[e,n]=t[0],[r,o]=t[1],[u,v]=i,S=r-e,C=o-n;if(S===0&&C===0)return[e,n];let T=((u-e)*S+(v-n)*C)/(S*S+C*C);T>1?T=1:T<0&&(T=0);const $=e+T*S,lt=n+T*C;return[$,lt]}function qi(i){const t=i.reduce((e,n)=>rt(e,n),[0,0]);return ue(t,i.length)}function va(i,t=!0){const e=qi(i);return i.sort(([n,r],[o,u])=>{const v=Math.atan2(r-e[1],n-e[0]),S=Math.atan2(u-e[1],o-e[0]);return t?S-v:v-S})}function Ka(i,t){return[i,[i[0],t[1]],t,[t[0],i[1]]]}var ea=d(71879);const Na=i=>i.map(t=>(0,ea.Z)(t)?t.toLocaleLowerCase():t);class Fa{constructor(t){this.map=new Map,this.recordKey=new Set,this.onKeyDown=e=>{e!=null&&e.key&&(this.recordKey.add(e.key),this.trigger(e))},this.onKeyUp=e=>{e!=null&&e.key&&this.recordKey.delete(e.key)},this.onWheel=e=>{this.triggerExtendKey(qt.WHEEL,e)},this.onDrag=e=>{this.triggerExtendKey(qt.DRAG,e)},this.onFocus=()=>{this.recordKey.clear()},this.emitter=t,this.bindEvents()}bind(t,e){t.length!==0&&this.map.set(t,e)}unbind(t,e){this.map.forEach((n,r)=>{(0,Bt.Z)(r,t)&&(!e||e===n)&&this.map.delete(r)})}unbindAll(){this.map.clear()}match(t){const e=Na(Array.from(this.recordKey)).sort(),n=Na(t).sort();return(0,Bt.Z)(e,n)}bindEvents(){const{emitter:t}=this;t.on(qt.KEY_DOWN,this.onKeyDown),t.on(qt.KEY_UP,this.onKeyUp),t.on(qt.WHEEL,this.onWheel),t.on(qt.DRAG,this.onDrag),window.addEventListener("focus",this.onFocus)}trigger(t){this.map.forEach((e,n)=>{this.match(n)&&e(t)})}triggerExtendKey(t,e){this.map.forEach((n,r)=>{r.includes(t)&&(0,Bt.Z)(Array.from(this.recordKey),r.filter(o=>o!==t))&&n(e)})}destroy(){this.unbindAll(),this.emitter.off(qt.KEY_DOWN,this.onKeyDown),this.emitter.off(qt.KEY_UP,this.onKeyUp),this.emitter.off(qt.WHEEL,this.onWheel),this.emitter.off(qt.DRAG,this.onDrag),window.removeEventListener("blur",this.onFocus)}}class da extends yt{constructor(t,e){super(t,(0,ct.Z)({},da.defaultOptions,e)),this.shortcut=new Fa(t.graph),this.onPointerDown=this.onPointerDown.bind(this),this.onPointerMove=this.onPointerMove.bind(this),this.onPointerUp=this.onPointerUp.bind(this),this.clearStates=this.clearStates.bind(this),this.bindEvents()}onPointerDown(t){if(!this.validate(t)||!this.isKeydown()||this.startPoint)return;const{canvas:e,graph:n}=this.context,r=Object.assign({},this.options.style);this.options.style.lineWidth&&(r.lineWidth=+this.options.style.lineWidth/n.getZoom()),this.rectShape=new nt.UL({id:"g6-brush-select",style:r}),e.appendChild(this.rectShape),this.startPoint=[t.canvas.x,t.canvas.y]}onPointerMove(t){var e;if(!this.startPoint)return;const{immediately:n,mode:r}=this.options;this.endPoint=ja(t),(e=this.rectShape)===null||e===void 0||e.attr({x:Math.min(this.endPoint[0],this.startPoint[0]),y:Math.min(this.endPoint[1],this.startPoint[1]),width:Math.abs(this.endPoint[0]-this.startPoint[0]),height:Math.abs(this.endPoint[1]-this.startPoint[1])}),n&&r==="default"&&this.updateElementsStates(Ka(this.startPoint,this.endPoint))}onPointerUp(t){if(this.startPoint){if(!this.endPoint){this.clearBrush();return}this.endPoint=ja(t),this.updateElementsStates(Ka(this.startPoint,this.endPoint)),this.clearBrush()}}clearStates(){this.endPoint||this.clearElementsStates()}clearElementsStates(){const{graph:t}=this.context,e=Object.values(t.getData()).reduce((n,r)=>Object.assign({},n,r.reduce((o,u)=>(o[sn(u)]=[],o),{})),{});t.setElementState(e,this.options.animation)}updateElementsStates(t){const{graph:e}=this.context,{enableElements:n,state:r,mode:o,onSelect:u}=this.options,v=this.selector(e,t,n);let S={};switch(o){case"union":v.forEach(C=>{S[C]=[...e.getElementState(C),r]});break;case"diff":v.forEach(C=>{const T=e.getElementState(C);S[C]=T.includes(r)?T.filter($=>$!==r):[...T,r]});break;case"intersect":v.forEach(C=>{const T=e.getElementState(C);S[C]=T.includes(r)?[r]:[]});break;case"default":default:v.forEach(C=>{S[C]=[r]});break}(0,At.Z)(u)&&(S=u(S)),e.setElementState(S,this.options.animation)}selector(t,e,n){if(!n||n.length===0)return[];const r=[],o=t.getData();if(n.forEach(u=>{o[`${u}s`].forEach(v=>{const S=sn(v);t.getElementVisibility(S)!=="hidden"&&ra(t.getElementPosition(S),e)&&r.push(S)})}),n.includes("edge")){const u=o.edges;u==null||u.forEach(v=>{const{source:S,target:C}=v;r.includes(S)&&r.includes(C)&&r.push(sn(v))})}return r}clearBrush(){var t;(t=this.rectShape)===null||t===void 0||t.remove(),this.rectShape=void 0,this.startPoint=void 0,this.endPoint=void 0}isKeydown(){const{trigger:t}=this.options,e=Array.isArray(t)?t:[t];return this.shortcut.match(e.filter(n=>n!=="drag"))}validate(t){if(this.destroyed)return!1;const{enable:e}=this.options;return(0,At.Z)(e)?e(t):!!e}bindEvents(){const{graph:t}=this.context;t.on(qt.POINTER_DOWN,this.onPointerDown),t.on(qt.POINTER_MOVE,this.onPointerMove),t.on(qt.POINTER_UP,this.onPointerUp),t.on(pe.CLICK,this.clearStates)}unbindEvents(){const{graph:t}=this.context;t.off(qt.POINTER_DOWN,this.onPointerDown),t.off(qt.POINTER_MOVE,this.onPointerMove),t.off(qt.POINTER_UP,this.onPointerUp),t.off(pe.CLICK,this.clearStates)}update(t){this.unbindEvents(),this.options=(0,ct.Z)(this.options,t),this.bindEvents()}destroy(){this.unbindEvents(),super.destroy()}}da.defaultOptions={animation:!1,enable:!0,enableElements:["node","combo","edge"],immediately:!1,mode:"default",state:"selected",trigger:["shift"],style:{width:0,height:0,lineWidth:1,fill:"#1677FF",stroke:"#1677FF",fillOpacity:.1,zIndex:2,pointerEvents:"none"}};const ja=i=>[i.canvas.x,i.canvas.y],Oa=.8,Ra=["node","edge","combo"];function Xa(i,t,e,n,r=0){n==="TB"&&t(i,r);const o=e(i);if(o)for(const u of o)Xa(u,t,e,n,r+1);n==="BT"&&t(i,r)}function oo(i,t,e){const n=[[i,0]];for(;n.length;){const[r,o]=n.shift();t(r,o);const u=e(r);if(u)for(const v of u)n.push([v,o+1])}}function Ia(i,t,e,n,r="both"){if(t==="combo"||t==="node")return so(i,e,n,r);const o=i.getEdgeData(e);if(!o)return[];const u=so(i,o.source,n-1,r),v=so(i,o.target,n-1,r);return Array.from(new Set([...u,...v,e]))}function so(i,t,e,n="both"){const r=new Set,o=new Set,u=new Set;return oo(t,(v,S)=>{S>e||(u.add(v),i.getRelatedEdgesData(v,n).forEach(C=>{const T=sn(C);!o.has(T)&&S<e&&(u.add(T),o.add(T))}))},v=>i.getRelatedEdgesData(v,n).map(S=>S.source===v?S.target:S.source).filter(S=>r.has(S)?!1:(r.add(S),!0))),Array.from(u)}function $a(i){return i.states||[]}var fa=function(i,t,e,n){function r(o){return o instanceof e?o:new e(function(u){u(o)})}return new(e||(e=Promise))(function(o,u){function v(T){try{C(n.next(T))}catch($){u($)}}function S(T){try{C(n.throw(T))}catch($){u($)}}function C(T){T.done?o(T.value):r(T.value).then(v,S)}C((n=n.apply(i,t||[])).next())})};class vo extends yt{constructor(t,e){super(t,Object.assign({},vo.defaultOptions,e)),this.onClickSelect=n=>fa(this,void 0,void 0,function*(){var r,o;this.validate(n)&&(yield this.updateState(n),(o=(r=this.options).onClick)===null||o===void 0||o.call(r,n))}),this.onClickCanvas=n=>fa(this,void 0,void 0,function*(){var r,o;this.validate(n)&&(yield this.clearState(),(o=(r=this.options).onClick)===null||o===void 0||o.call(r,n))}),this.shortcut=new Fa(t.graph),this.bindEvents()}bindEvents(){const{graph:t}=this.context;this.unbindEvents(),Ra.forEach(e=>{t.on(`${e}:${qt.CLICK}`,this.onClickSelect)}),t.on(pe.CLICK,this.onClickCanvas)}get isMultipleSelect(){const{multiple:t,trigger:e}=this.options;return t&&this.shortcut.match(e)}getNeighborIds(t){const{target:e,targetType:n}=t,{graph:r}=this.context,{degree:o}=this.options;return Ia(r,n,e.id,typeof o=="function"?o(t):o).filter(u=>u!==e.id)}updateState(t){return fa(this,void 0,void 0,function*(){const{state:e,unselectedState:n,neighborState:r,animation:o}=this.options;if(!e&&!r&&!n)return;const{target:u}=t,{graph:v}=this.context,S=v.getElementData(u.id),C=$a(S).includes(e)?"unselect":"select",T={},$=this.isMultipleSelect,lt=[u.id],gt=this.getNeighborIds(t);if($)if(Object.assign(T,this.getDataStates()),C==="select"){const Gt=(ee,ve)=>{ee.forEach(ke=>{const ze=new Set(v.getElementState(ke));ze.add(ve),ze.delete(n),T[ke]=Array.from(ze)})};Gt(lt,e),Gt(gt,r),n&&Object.keys(T).forEach(ee=>{const ve=T[ee];!ve.includes(e)&&!ve.includes(r)&&!ve.includes(n)&&T[ee].push(n)})}else{const Gt=T[u.id];T[u.id]=Gt.filter(ee=>ee!==e&&ee!==r),Gt.includes(n)||T[u.id].push(n),gt.forEach(ee=>{T[ee]=T[ee].filter(ve=>ve!==r),T[ee].includes(e)||T[ee].push(n)})}else if(C==="select"){Object.assign(T,this.getClearStates(!!n));const Gt=(ee,ve)=>{ee.forEach(ke=>{T[ke]||(T[ke]=v.getElementState(ke)),T[ke].push(ve)})};Gt(lt,e),Gt(gt,r),n&&Object.keys(T).forEach(ee=>{!lt.includes(ee)&&!gt.includes(ee)&&T[ee].push(n)})}else Object.assign(T,this.getClearStates());yield v.setElementState(T,o)})}getDataStates(){const{graph:t}=this.context,{nodes:e,edges:n,combos:r}=t.getData(),o={};return[...e,...n,...r].forEach(u=>{o[sn(u)]=$a(u)}),o}getClearStates(t=!1){const{graph:e}=this.context,{state:n,unselectedState:r,neighborState:o}=this.options,u=new Set([n,r,o]),{nodes:v,edges:S,combos:C}=e.getData(),T={};return[...v,...S,...C].forEach($=>{const lt=$a($),gt=lt.filter(Gt=>!u.has(Gt));(t||gt.length!==lt.length)&&(T[sn($)]=gt)}),T}clearState(){return fa(this,void 0,void 0,function*(){const{graph:t}=this.context;yield t.setElementState(this.getClearStates(),this.options.animation)})}validate(t){if(this.destroyed)return!1;const{enable:e}=this.options;return(0,At.Z)(e)?e(t):!!e}unbindEvents(){const{graph:t}=this.context;Ra.forEach(e=>{t.off(`${e}:${qt.CLICK}`,this.onClickSelect)}),t.off(pe.CLICK,this.onClickCanvas)}destroy(){this.unbindEvents(),super.destroy()}}vo.defaultOptions={animation:!0,enable:!0,multiple:!1,trigger:["shift"],state:"selected",neighborState:"selected",unselectedState:void 0,degree:0};function Ca(i){var t;return!!(!((t=i.style)===null||t===void 0)&&t.collapsed)}var Di=d(5759),Qa=d(37004),ts=d(45642);function Ja(i,t){if(!i.startsWith(t))return!1;const e=i[t.length];return e>="A"&&e<="Z"}function To(i,t){return`${t}${(0,kt.Z)(i)}`}function ia(i,t,e=!0){if(!t||!Ja(i,t))return i;const n=i.slice(t.length);return e?(0,ts.Z)(n):n}function lr(i,t){const e=Object.entries(i).reduce((n,[r,o])=>(r==="className"||r==="class"||Ja(r,t)&&Object.assign(n,{[ia(r,t)]:o}),n),{});if("opacity"in i){const n=To("opacity",t),r=i.opacity;if(n in i){const o=i[n];Object.assign(e,{opacity:r*o})}else Object.assign(e,{opacity:r})}return e}function ri(i,t){const e=t.length;return Object.keys(i).reduce((n,r)=>{if(r.startsWith(t)){const o=r.slice(e);n[o]=i[r]}return n},{})}function Yr(i,t){const e=typeof t=="string"?[t]:t,n={};return Object.keys(i).forEach(r=>{e.find(o=>r.startsWith(o))||(n[r]=i[r])}),n}function hi(i,t,e){return Object.entries(i).reduce((n,[r,o])=>(Ja(r,t)?n[To(ia(r,t,!1),e)]=o:n[r]=o,n),{})}function ai(i=0){if(typeof i=="number")return[i,i,i];const[t,e=t,n=t]=i;return[t,e,n]}var zi=function(i,t){var e={};for(var n in i)Object.prototype.hasOwnProperty.call(i,n)&&t.indexOf(n)<0&&(e[n]=i[n]);if(i!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,n=Object.getOwnPropertySymbols(i);r<n.length;r++)t.indexOf(n[r])<0&&Object.prototype.propertyIsEnumerable.call(i,n[r])&&(e[n[r]]=i[n[r]]);return e};function qa(i,t){const{datum:e,graph:n}=t;return typeof i=="function"?i.call(n,e):Object.fromEntries(Object.entries(i).map(([r,o])=>typeof o=="function"?[r,o.call(n,e)]:[r,o]))}function ji(i,t){const e=(i==null?void 0:i.style)||{},n=(t==null?void 0:t.style)||{};return Object.assign({},i,t,{style:Object.assign({},e,n)})}function Vi(i){const{x:t,y:e,z:n,class:r,className:o,transform:u,transformOrigin:v,context:S,zIndex:C,visibility:T}=i;return zi(i,["x","y","z","class","className","transform","transformOrigin","context","zIndex","visibility"])}const Kn=new WeakMap;function Ui(i,t,e){Kn.has(i)||Kn.set(i,{});const n=Kn.get(i);if(!n[t])return n[t]=e,!0;const r=n[t];return Io(r,e)?!1:(n[t]=e,!0)}const Io=(i,t,e=2)=>{if(typeof i!="object"||typeof t!="object")return i===t;const n=Object.keys(i),r=Object.keys(t);if(n.length!==r.length)return!1;for(const o of n){const u=i[o],v=t[o];if(e>1&&typeof u=="object"&&typeof v=="object"){if(!Io(u,v,e-1))return!1}else if(u!==v)return!1}return!0};function Uo(i,t){const e=ai(i);let n={};return t.text&&!t.fontSize&&(n={fontSize:Math.min(...e)*.5}),t.src&&(!t.width||!t.height)&&(n={width:e[0]*.5,height:e[1]*.5}),n}function es(i){if(i)return typeof i=="string"||typeof i=="function"||Array.isArray(i)?{type:"group",field:t=>t.id,color:i,invert:!1}:i}function Ta(i,t){if(!t)return{};const{type:e,color:n,field:r,invert:o}=t,u=S=>{const C=typeof n=="string"?be("palette",n):n;if(typeof C=="function"){const T={};return S.forEach(([$,lt])=>{T[$]=C(o?1-lt:lt)}),T}else if(Array.isArray(C)){const T=o?[...C].reverse():C,$={};return S.forEach(([lt,gt])=>{$[lt]=T[gt%C.length]}),$}return{}},v=(S,C)=>{var T;return typeof S=="string"?(T=C.data)===null||T===void 0?void 0:T[S]:S==null?void 0:S(C)};if(e==="group"){const S=(0,Rt.Z)(i,lt=>{if(!r)return"default";const gt=v(r,lt);return gt?String(gt):"default"}),C=Object.keys(S),T=u(C.map((lt,gt)=>[lt,gt])),$={};return Object.entries(S).forEach(([lt,gt])=>{gt.forEach(Gt=>{$[sn(Gt)]=T[lt]})}),$}else if(e==="value"){const[S,C]=i.reduce(([$,lt],gt)=>{const Gt=v(r,gt);if(typeof Gt!="number")throw new Error(xt(`Palette field ${r} is not a number`));return[Math.min($,Gt),Math.max(lt,Gt)]},[1/0,-1/0]),T=C-S;return u(i.map($=>[$.id,(v(r,$)-S)/T]))}}function eo(i){const t=typeof i=="string"?be("palette",i):i;if(typeof t!="function")return t}function ns(i,t){let e=2*i;return typeof t=="string"?e=i*Number(t.replace("%",""))/100:typeof t=="number"&&(e=t),isNaN(e)&&(e=2*i),e}function Po(i,t,e=1,n=!1){const r=n?e:1,o=(i.max[0]-i.min[0])*r;return ns(o,t)}function ys(i,t,e=1){const n=Be(i[0],i[1])*e;return ns(n,t)}var Ao=d(42791);class go extends nt.b_{constructor(t){super(t),this.shapeMap={},this.animateMap={},this.transformPosition(this.attributes),this.render(this.attributes,this),this.setVisibility(),this.bindEvents()}get parsedAttributes(){return this.attributes}upsert(t,e,n,r,o){var u,v,S,C,T,$,lt,gt;const Gt=this.shapeMap[t];if(n===!1){Gt&&((u=o==null?void 0:o.beforeDestroy)===null||u===void 0||u.call(o,Gt),r.removeChild(Gt),delete this.shapeMap[t],(v=o==null?void 0:o.afterDestroy)===null||v===void 0||v.call(o,Gt));return}const ee=typeof e=="string"?be(nn.SHAPE,e):e;if(!ee)throw new Error(xt(`Shape ${e} not found`));if(!Gt||Gt.destroyed||!(Gt instanceof ee)){Gt&&((S=o==null?void 0:o.beforeDestroy)===null||S===void 0||S.call(o,Gt),Gt==null||Gt.destroy(),(C=o==null?void 0:o.afterDestroy)===null||C===void 0||C.call(o,Gt)),(T=o==null?void 0:o.beforeCreate)===null||T===void 0||T.call(o);const ve=new ee({className:t,style:n});return r.appendChild(ve),this.shapeMap[t]=ve,($=o==null?void 0:o.afterCreate)===null||$===void 0||$.call(o,ve),ve}return(lt=o==null?void 0:o.beforeUpdate)===null||lt===void 0||lt.call(o,Gt),vs(Gt,n),(gt=o==null?void 0:o.afterUpdate)===null||gt===void 0||gt.call(o,Gt),Gt}transformPosition(t){if("x"in t||"y"in t||"z"in t){const{x:e=0,y:n=0,z:r=0,transform:o}=t;this.style.transform=Jt(+e,+n,+r,o)}}update(t={}){const e=Object.assign({},this.attributes,t);this.attr(e),this.render(e,this),this.transformPosition(e),this.setVisibility()}bindEvents(){}getGraphicStyle(t){return Vi(t)}get compositeShapes(){return[["badges","badge-"],["ports","port-"]]}animate(t,e){if(t.length===0)return null;const n=[];if(t[0].x!==void 0||t[0].y!==void 0||t[0].z!==void 0){const{x:o=0,y:u=0,z:v=0}=this.attributes;t.forEach(S=>{const{x:C=o,y:T=u,z:$=v}=S;Object.assign(S,{transform:$?[["translate3d",C,T,$]]:[["translate",C,T]]})})}const r=super.animate(t,e);if(r&&(No(this,r),n.push(r)),Array.isArray(t)&&t.length>0){const o=["transform","transformOrigin","x","y","z","zIndex"];if(Object.keys(t[0]).some(u=>!o.includes(u))){Object.entries(this.shapeMap).forEach(([v,S])=>{const C=`get${(0,kt.Z)(v)}Style`,T=this[C];if((0,At.Z)(T)){const $=t.map(gt=>T.call(this,Object.assign(Object.assign({},this.attributes),gt))),lt=S.animate(Re($),e);lt&&(No(S,lt),n.push(lt))}});const u=(v,S)=>{if(!(0,Ao.Z)(v)){const C=`get${(0,kt.Z)(S)}Style`,T=this[C];if((0,At.Z)(T)){const $=t.map(lt=>T.call(this,Object.assign(Object.assign({},this.attributes),lt)));Object.entries($[0]).map(([lt])=>{const gt=$.map(ee=>ee[lt]),Gt=v[lt];if(Gt){const ee=Gt.animate(Re(gt),e);ee&&(No(Gt,ee),n.push(ee))}})}}};this.compositeShapes.forEach(([v,S])=>{const C=ri(this.shapeMap,S);u(C,v)})}}return Fe(n)}getShape(t){return this.shapeMap[t]}setVisibility(){const{visibility:t}=this.attributes;Y(this,t,!0)}destroy(){this.shapeMap={},this.animateMap={},super.destroy()}}function No(i,t){t==null||t.finished.then(()=>{const e=i.activeAnimations.findIndex(n=>n===t);e>-1&&i.activeAnimations.splice(e,1)})}var fs=function(i,t){var e={};for(var n in i)Object.prototype.hasOwnProperty.call(i,n)&&t.indexOf(n)<0&&(e[n]=i[n]);if(i!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,n=Object.getOwnPropertySymbols(i);r<n.length;r++)t.indexOf(n[r])<0&&Object.prototype.propertyIsEnumerable.call(i,n[r])&&(e[n[r]]=i[n[r]]);return e};class Ba extends go{constructor(t){super(ji({style:Ba.defaultStyleProps},t))}isTextStyle(t){return Ja(t,"label")}isBackgroundStyle(t){return Ja(t,"background")}getTextStyle(t){const e=this.getGraphicStyle(t),{padding:n}=e,r=fs(e,["padding"]);return Yr(r,"background")}getBackgroundStyle(t){if(t.background===!1)return!1;const e=this.getGraphicStyle(t),{wordWrap:n,wordWrapWidth:r,padding:o}=e,u=lr(e,"background"),{min:[v,S],center:[C,T],halfExtents:[$,lt]}=this.shapeMap.text.getGeometryBounds(),[gt,Gt,ee,ve]=Ve(o),ke=$*2+ve+Gt,{width:ze,height:Ke}=u;ze&&Ke?Object.assign(u,{x:C-Number(ze)/2,y:T-Number(Ke)/2}):Object.assign(u,{x:v-ve,y:S-gt,width:n?Math.min(ke,r+ve+Gt):ke,height:lt*2+gt+ee});const{radius:ln}=u;if(typeof ln=="string"&&ln.endsWith("%")){const kn=Number(ln.replace("%",""))/100;u.radius=Math.min(+u.width,+u.height)*kn}return u}render(t=this.parsedAttributes,e=this){this.upsert("text",nt.xv,this.getTextStyle(t),e),this.upsert("background",nt.UL,this.getBackgroundStyle(t),e)}getGeometryBounds(){return(this.getShape("background")||this.getShape("text")).getGeometryBounds()}}Ba.defaultStyleProps={padding:0,fontSize:12,fontFamily:"system-ui, sans-serif",wordWrap:!0,maxLines:1,wordWrapWidth:128,textOverflow:"...",textBaseline:"middle",backgroundOpacity:.75,backgroundZIndex:-1,backgroundLineWidth:0};class no extends go{constructor(t){super(ji({style:no.defaultStyleProps},t))}getBadgeStyle(t){return this.getGraphicStyle(t)}render(t=this.parsedAttributes,e=this){this.upsert("label",Ba,this.getBadgeStyle(t),e)}getGeometryBounds(){const t=this.getShape("label");return(t.getShape("background")||t.getShape("text")).getGeometryBounds()}}no.defaultStyleProps={padding:[2,4,2,4],fontSize:10,wordWrap:!1,backgroundRadius:"50%",backgroundOpacity:1};function za(i,t=!0){const e=[];return i.forEach((n,r)=>{e.push([r===0?"M":"L",...n])}),t&&e.push(["Z"]),e}const rs={M:["x","y"],m:["dx","dy"],H:["x"],h:["dx"],V:["y"],v:["dy"],L:["x","y"],l:["dx","dy"],Z:[],z:[],C:["x1","y1","x2","y2","x","y"],c:["dx1","dy1","dx2","dy2","dx","dy"],S:["x2","y2","x","y"],s:["dx2","dy2","dx","dy"],Q:["x1","y1","x","y"],q:["dx1","dy1","dx","dy"],T:["x","y"],t:["dx","dy"],A:["rx","ry","rotation","large-arc","sweep","x","y"],a:["rx","ry","rotation","large-arc","sweep","dx","dy"]};function is(i){const t=i.replace(/[\n\r]/g,"").replace(/-/g," -").replace(/(\d*\.)(\d+)(?=\.)/g,"$1$2 ").trim().split(/\s*,|\s+/),e=[];let n="",r={};for(;t.length>0;){let o=t.shift();o in rs?n=o:t.unshift(o),r={type:n},rs[n].forEach(S=>{o=t.shift(),r[S]=o}),n==="M"?n="L":n==="m"&&(n="l");const[u,...v]=Object.values(r);e.push([u,...v.map(Number)])}return e}function $i(i){const t=[];return(typeof i=="string"?is(i):i).forEach(n=>{const r=n[0];if(r==="Z"){t.push(t[0]);return}if(r!=="A")for(let o=1;o<n.length;o=o+2)t.push([n[o],n[o+1],0]);else{const o=n.length;t.push([n[o-2],n[o-1],0])}}),t}const Wa=i=>{if(i.length<2)return[["M",0,0],["L",0,0]];const t=i[0],e=i[1],n=i[i.length-1],r=i[i.length-2];i.unshift(r,n),i.push(t,e);const o=[["M",n[0],n[1]]];for(let u=1;u<i.length-2;u+=1){const[v,S]=i[u-1],[C,T]=i[u],[$,lt]=i[u+1],[gt,Gt]=u!==i.length-2?i[u+2]:[$,lt],ee=C+($-v)/6,ve=T+(lt-S)/6,ke=$-(gt-C)/6,ze=lt-(Gt-T)/6;o.push(["C",ee,ve,ke,ze,$,lt])}return o};function po(i,t,e,n,r,o,u){const[v,S]=ar(i,t),C={textAlign:t==="left"?"right":t==="right"?"left":"center",textBaseline:t==="top"?"bottom":t==="bottom"?"top":"middle",transform:[["translate",v+e,S+n]]};if(t==="center"||!r)return C;const T=$i(o);if(!T||T.length<=3)return C;const $=T.map((Gt,ee)=>{const ve=Gt,ke=T[(ee+1)%T.length];return(0,Bt.Z)(ve,ke)?null:[ve,ke]}).filter(Boolean),lt=ni([v,S],$),gt=ya([v,S],lt);if(gt&<&&(C.transform=[["translate",gt[0]+e,gt[1]+n]],u)){const Gt=Math.atan((lt[0][1]-lt[1][1])/(lt[0][0]-lt[1][0]));C.transform.push(["rotate",Gt/Math.PI*180]),C.textAlign="center",(t==="right"||t==="left")&&(Gt>0?C.textBaseline=t==="right"?"bottom":"top":C.textBaseline=t==="right"?"top":"bottom")}return C}var bo=function(i,t){var e={};for(var n in i)Object.prototype.hasOwnProperty.call(i,n)&&t.indexOf(n)<0&&(e[n]=i[n]);if(i!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,n=Object.getOwnPropertySymbols(i);r<n.length;r++)t.indexOf(n[r])<0&&Object.prototype.propertyIsEnumerable.call(i,n[r])&&(e[n[r]]=i[n[r]]);return e};class Ro extends go{constructor(t){super(ji({style:Ro.defaultStyleProps},t))}getLabelStyle(t){if(!t.label||!t.d||t.d.length===0)return!1;const e=lr(this.getGraphicStyle(t),"label"),{maxWidth:n,offsetX:r,offsetY:o,autoRotate:u,placement:v,closeToPath:S}=e,C=bo(e,["maxWidth","offsetX","offsetY","autoRotate","placement","closeToPath"]),T=this.shapeMap.key,$=T==null?void 0:T.getRenderBounds();return Object.assign(po($,v,r,o,S,t.d,u),{wordWrapWidth:Po($,n)},C)}getKeyStyle(t){return this.getGraphicStyle(t)}render(t,e){this.upsert("key",nt.y$,this.getKeyStyle(t),e),this.upsert("label",Ba,this.getLabelStyle(t),e)}}Ro.defaultStyleProps={label:!0,labelPlacement:"bottom",labelCloseToPath:!0,labelAutoRotate:!0,labelOffsetX:0,labelOffsetY:0};function Ga(i){const t=[],e=n=>{n!=null&&n.children.length&&n.children.forEach(r=>{t.push(r),e(r)})};return e(i),t}function Ho(i){const t=[];let e=i.parentNode;for(;e;)t.push(e),e=e.parentNode;return t}class Ci extends nt.Ee{constructor(t){super(t),this.onMounted=()=>{this.handleRadius()},this.onAttrModified=()=>{this.handleRadius()},aa=this,this.isMutationObserved=!0,this.addEventListener(nt.Dk.MOUNTED,this.onMounted),this.addEventListener(nt.Dk.ATTR_MODIFIED,this.onAttrModified)}handleRadius(){const{radius:t,clipPath:e,width:n=0,height:r=0}=this.attributes;if(t&&n&&r){const[o,u]=this.getBounds().min,v={x:o,y:u,radius:t,width:n,height:r};if(e)Object.assign(this.parsedStyle.clipPath.style,v);else{const S=new nt.UL({style:v});this.style.clipPath=S}}else e&&(this.style.clipPath=null)}}const bi=new WeakMap;let aa=null;const ba=i=>{if(aa&&Ho(aa).includes(i)){const t=bi.get(i);t?t.includes(aa)||t.push(aa):bi.set(i,[aa])}},Hi=i=>{const t=bi.get(i);t&&t.forEach(e=>e.handleRadius())};class xi extends go{constructor(t){super(t)}isImage(){const{src:t}=this.attributes;return!!t}getIconStyle(t=this.attributes){const{width:e=0,height:n=0}=t,r=this.getGraphicStyle(t);return this.isImage()?Object.assign({x:-e/2,y:-n/2},r):Object.assign({textBaseline:"middle",textAlign:"center"},r)}render(t=this.attributes,e=this){this.upsert("icon",this.isImage()?Ci:nt.xv,this.getIconStyle(t),e)}}class Ea extends go{get context(){return this.attributes.context}get parsedAttributes(){return this.attributes}onframe(){}animate(t,e){const n=super.animate(t,e);return n&&(n.onframe=()=>this.onframe(),n.finished.then(()=>this.onframe())),n}}var lo=function(i,t){var e={};for(var n in i)Object.prototype.hasOwnProperty.call(i,n)&&t.indexOf(n)<0&&(e[n]=i[n]);if(i!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,n=Object.getOwnPropertySymbols(i);r<n.length;r++)t.indexOf(n[r])<0&&Object.prototype.propertyIsEnumerable.call(i,n[r])&&(e[n[r]]=i[n[r]]);return e};class xa extends Ea{constructor(t){super(ji({style:xa.defaultStyleProps},t)),this.type="node"}getSize(t=this.attributes){const{size:e}=t;return ai(e)}getKeyStyle(t){const e=this.getGraphicStyle(t);return Object.assign(Yr(e,["label","halo","icon","badge","port"]))}getLabelStyle(t){if(t.label===!1||!t.labelText)return!1;const e=lr(this.getGraphicStyle(t),"label"),{placement:n,maxWidth:r,offsetX:o,offsetY:u}=e,v=lo(e,["placement","maxWidth","offsetX","offsetY"]),S=this.getShape("key").getLocalBounds();return Object.assign(il(S,n,o,u),{wordWrapWidth:Po(S,r)},v)}getHaloStyle(t){if(t.halo===!1)return!1;const e=this.getKeyStyle(t),{fill:n}=e,r=lo(e,["fill"]),o=lr(this.getGraphicStyle(t),"halo");return Object.assign(Object.assign(Object.assign({},r),{stroke:n}),o)}getIconStyle(t){if(t.icon===!1||!t.iconText&&!t.iconSrc)return!1;const e=lr(this.getGraphicStyle(t),"icon");return Object.assign(Uo(t.size,e),e)}getBadgesStyle(t){var e;const n=ri(this.shapeMap,"badge-"),r={};if(Object.keys(n).forEach($=>{r[$]=!1}),t.badge===!1||!(!((e=t.badges)===null||e===void 0)&&e.length))return r;const{badges:o=[],badgePalette:u,opacity:v=1}=t,S=lo(t,["badges","badgePalette","opacity"]),C=eo(u),T=lr(this.getGraphicStyle(S),"badge");return o.forEach(($,lt)=>{r[lt]=Object.assign(Object.assign({backgroundFill:C?C[lt%(C==null?void 0:C.length)]:void 0,opacity:v},T),this.getBadgeStyle($))}),r}getBadgeStyle(t){const e=this.getShape("key"),{placement:n="top",offsetX:r,offsetY:o}=t,u=lo(t,["placement","offsetX","offsetY"]),v=il(e.getLocalBounds(),n,r,o,!0);return Object.assign(Object.assign({},v),u)}getPortsStyle(t){var e;const n=this.getPorts(),r={};if(Object.keys(n).forEach(v=>{r[v]=!1}),t.port===!1||!(!((e=t.ports)===null||e===void 0)&&e.length))return r;const o=lr(this.getGraphicStyle(t),"port"),{ports:u=[]}=t;return u.forEach((v,S)=>{const C=v.key||S,T=Object.assign(Object.assign({},o),v);if(wo(T))r[C]=!1;else{const[$,lt]=this.getPortXY(t,v);r[C]=Object.assign({transform:[["translate",$,lt]]},T)}}),r}getPortXY(t,e){const{placement:n="left"}=e,r=this.getShape("key");return Va(Do(this.context,r),n)}getPorts(){return ri(this.shapeMap,"port-")}getCenter(){return this.getShape("key").getBounds().center}getIntersectPoint(t,e=!1){const n=this.getShape("key").getBounds();return Tr(t,n,e)}drawHaloShape(t,e){const n=this.getHaloStyle(t);if(!Ui(this,"halo",n))return;const r=this.getShape("key");this.upsert("halo",r.constructor,n,e)}drawIconShape(t,e){const n=this.getIconStyle(t);Ui(this,"icon",n)&&(this.upsert("icon",xi,n,e),ba(this))}drawBadgeShapes(t,e){const n=this.getBadgesStyle(t);Object.keys(n).forEach(r=>{const o=n[r];Ui(this,`badge-${r}`,o)&&this.upsert(`badge-${r}`,no,o,e)})}drawPortShapes(t,e){const n=this.getPortsStyle(t);Object.keys(n).forEach(r=>{const o=n[r],u=`port-${r}`;Ui(this,u,o)&&this.upsert(u,nt.Cd,o,e)})}drawLabelShape(t,e){const n=this.getLabelStyle(t);Ui(this,"label",n)&&this.upsert("label",Ba,n,e)}_drawKeyShape(t,e){return this.drawKeyShape(t,e)}render(t=this.parsedAttributes,e=this){this._drawKeyShape(t,e),this.getShape("key")&&(this.drawHaloShape(t,e),this.drawIconShape(t,e),this.drawBadgeShapes(t,e),this.drawLabelShape(t,e),this.drawPortShapes(t,e))}update(t){super.update(t),t&&("x"in t||"y"in t||"z"in t)&&Hi(this)}onframe(){this.drawBadgeShapes(this.parsedAttributes,this),this.drawLabelShape(this.parsedAttributes,this)}}xa.defaultStyleProps={x:0,y:0,size:32,droppable:!0,draggable:!0,port:!0,ports:[],portZIndex:2,portLinkToCenter:!1,badge:!0,badges:[],badgeZIndex:3,halo:!1,haloDroppable:!1,haloLineDash:0,haloLineWidth:12,haloStrokeOpacity:.25,haloPointerEvents:"none",haloZIndex:-1,icon:!0,iconZIndex:1,label:!0,labelIsBillboard:!0,labelMaxWidth:"200%",labelPlacement:"bottom",labelWordWrap:!1,labelZIndex:0};function Do(i,t){if(!i)return t.getLocalBounds();const e=i.canvas.getLayer(),n=t.cloneNode();Y(n,"hidden"),e.appendChild(n);const r=n.getLocalBounds();return e.removeChild(n),r}class Da extends xa{constructor(t){super(ji({style:Da.defaultStyleProps},t))}drawKeyShape(t,e){return this.upsert("key",nt.Cd,this.getKeyStyle(t),e)}getKeyStyle(t){const e=super.getKeyStyle(t);return Object.assign(Object.assign({},e),{r:Math.min(...this.getSize(t))/2})}getIconStyle(t){const e=super.getIconStyle(t),{r:n}=this.getShape("key").attributes,r=n*2*Oa;return e?Object.assign({width:r,height:r},e):!1}getIntersectPoint(t,e=!1){const n=this.getShape("key").getBounds();return hr(t,n,e)}}Da.defaultStyleProps={size:32};class Lo extends xa{constructor(t){super(t)}get parsedAttributes(){return this.attributes}drawKeyShape(t,e){return this.upsert("key",nt.mg,this.getKeyStyle(t),e)}getKeyStyle(t){const e=super.getKeyStyle(t);return Object.assign(Object.assign({},e),{points:this.getPoints(t)})}getIntersectPoint(t,e=!1){var n,r;const{points:o}=this.getShape("key").attributes,u=[+(((n=this.attributes)===null||n===void 0?void 0:n.x)||0),+(((r=this.attributes)===null||r===void 0?void 0:r.y)||0)];return Hn(t,u,o,!0,e).point}}class zs extends Lo{constructor(t){super(t)}getPoints(t){const[e,n]=this.getSize(t);return Is(e,n)}}var Fr=d(1933),As=function(i,t){var e={};for(var n in i)Object.prototype.hasOwnProperty.call(i,n)&&t.indexOf(n)<0&&(e[n]=i[n]);if(i!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,n=Object.getOwnPropertySymbols(i);r<n.length;r++)t.indexOf(n[r])<0&&Object.prototype.propertyIsEnumerable.call(i,n[r])&&(e[n[r]]=i[n[r]]);return e};class as extends Da{constructor(t){super(ji({style:as.defaultStyleProps},t))}parseOuterR(){const{size:t}=this.parsedAttributes;return Math.min(...ai(t))/2}parseInnerR(){const{innerR:t}=this.parsedAttributes;return(0,ea.Z)(t)?parseInt(t)/100*this.parseOuterR():t}drawDonutShape(t,e){const{donuts:n}=t;if(!(n!=null&&n.length))return;const r=n.map($=>(0,Fr.Z)($)?{value:$}:$),o=lr(this.getGraphicStyle(t),"donut"),u=eo(t.donutPalette);if(!u)return;const v=r.reduce(($,lt)=>{var gt;return $+((gt=lt.value)!==null&>!==void 0?gt:0)},0),S=this.parseOuterR(),C=this.parseInnerR();let T=0;r.forEach(($,lt)=>{const{value:gt=0,color:Gt=u[lt%u.length]}=$,ee=As($,["value","color"]),ve=(v===0?1/r.length:gt/v)*360;this.upsert(`round${lt}`,nt.y$,Object.assign(Object.assign(Object.assign({},o),{d:bs(S,C,T,T+ve),fill:Gt}),ee),e),T+=ve})}render(t,e=this){super.render(t,e),this.drawDonutShape(t,e)}}as.defaultStyleProps={innerR:"50%",donuts:[],donutPalette:"tableau"};const ko=(i,t,e,n)=>[i+Math.sin(n)*e,t-Math.cos(n)*e],hs=(i,t,e,n)=>n<=0||e<=n?[["M",i-e,t],["A",e,e,0,1,1,i+e,t],["A",e,e,0,1,1,i-e,t],["Z"]]:[["M",i-e,t],["A",e,e,0,1,1,i+e,t],["A",e,e,0,1,1,i-e,t],["Z"],["M",i+n,t],["A",n,n,0,1,0,i-n,t],["A",n,n,0,1,0,i+n,t],["Z"]],Ns=(i,t,e,n,r,o)=>{const[u,v]=[r/360*2*Math.PI,o/360*2*Math.PI],S=[ko(i,t,n,u),ko(i,t,e,u),ko(i,t,e,v),ko(i,t,n,v)],C=v-u>Math.PI?1:0;return[["M",S[0][0],S[0][1]],["L",S[1][0],S[1][1]],["A",e,e,0,C,1,S[2][0],S[2][1]],["L",S[3][0],S[3][1]],["A",n,n,0,C,0,S[0][0],S[0][1]],["Z"]]},bs=(i=0,t=0,e,n)=>{const[r,o]=[0,0];return Math.abs(e-n)%360<1e-6?hs(r,o,i,t):Ns(r,o,i,t,e,n)};class Yo extends xa{constructor(t){super(ji({style:Yo.defaultStyleProps},t))}drawKeyShape(t,e){return this.upsert("key",nt.Pj,this.getKeyStyle(t),e)}getKeyStyle(t){const e=super.getKeyStyle(t),[n,r]=this.getSize(t);return Object.assign(Object.assign({},e),{rx:n/2,ry:r/2})}getIconStyle(t){const e=super.getIconStyle(t),{rx:n,ry:r}=this.getShape("key").attributes,o=Math.min(+n,+r)*2*Oa;return e?Object.assign({width:o,height:o},e):!1}getIntersectPoint(t,e=!1){const n=this.getShape("key").getBounds();return hr(t,n,e)}}Yo.defaultStyleProps={size:[45,35]};class Eo extends Lo{constructor(t){super(t)}getOuterR(t){return t.outerR||Math.min(...this.getSize(t))/2}getPoints(t){return oa(this.getOuterR(t))}getIconStyle(t){const e=super.getIconStyle(t),n=this.getOuterR(t)*Oa;return e?Object.assign({width:n,height:n},e):!1}}var La=d(14634),xo=d(84502),ta=d(49527),js=function(i,t){var e={};for(var n in i)Object.prototype.hasOwnProperty.call(i,n)&&t.indexOf(n)<0&&(e[n]=i[n]);if(i!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,n=Object.getOwnPropertySymbols(i);r<n.length;r++)t.indexOf(n[r])<0&&Object.prototype.propertyIsEnumerable.call(i,n[r])&&(e[n[r]]=i[n[r]]);return e};class _o extends xa{constructor(t){super(Object.assign(Object.assign({},t),{style:Object.assign({},_o.defaultStyleProps,t.style)})),this.rootPointerEvent=new nt.nR(null),this.forwardEvents=e=>{const n=this.context.canvas,r=n.context.renderingContext.root.ownerDocument.defaultView;this.normalizeToPointerEvent(e,r).forEach(u=>{const v=this.bootstrapEvent(this.rootPointerEvent,u,r,e);(0,Qa.Z)(n.context.eventService,"mappingTable.pointerupoutside",[]),n.context.eventService.mapEvent(v)})}}get eventService(){return this.context.canvas.context.eventService}get events(){return[qt.CLICK,qt.POINTER_DOWN,qt.POINTER_MOVE,qt.POINTER_UP,qt.POINTER_OVER,qt.POINTER_LEAVE]}getDomElement(){return this.getShape("key").getDomElement()}getKeyStyle(t){const e=(0,xo.Z)(t,["dx","dy","innerHTML","pointerEvents","cursor"]),{dx:n=0,dy:r=0}=e,o=js(e,["dx","dy"]),[u,v]=this.getSize(t);return Object.assign(Object.assign({x:n,y:r},o),{width:u,height:v})}drawKeyShape(t,e){const n=this.getKeyStyle(t),{x:r,y:o,width:u=0,height:v=0}=n,S=this.upsert("key-container",nt.UL,{x:r,y:o,width:u,height:v,opacity:0},e);return this.upsert("key",nt.k9,n,S)}connectedCallback(){if(!(this.context.canvas.getRenderer("main")instanceof La.Th))return;const n=this.getDomElement();this.events.forEach(r=>{n.addEventListener(r,this.forwardEvents)})}attributeChangedCallback(t,e,n){t==="zIndex"&&e!==n&&(this.getDomElement().style.zIndex=n)}destroy(){const t=this.getDomElement();this.events.forEach(e=>{t.removeEventListener(e,this.forwardEvents)}),super.destroy()}normalizeToPointerEvent(t,e){const n=[];if(e.isTouchEvent(t))for(let r=0;r<t.changedTouches.length;r++){const o=t.changedTouches[r];(0,ta.Z)(o.button)&&(o.button=0),(0,ta.Z)(o.buttons)&&(o.buttons=1),(0,ta.Z)(o.isPrimary)&&(o.isPrimary=t.touches.length===1&&t.type==="touchstart"),(0,ta.Z)(o.width)&&(o.width=o.radiusX||1),(0,ta.Z)(o.height)&&(o.height=o.radiusY||1),(0,ta.Z)(o.tiltX)&&(o.tiltX=0),(0,ta.Z)(o.tiltY)&&(o.tiltY=0),(0,ta.Z)(o.pointerType)&&(o.pointerType="touch"),(0,ta.Z)(o.pointerId)&&(o.pointerId=o.identifier||0),(0,ta.Z)(o.pressure)&&(o.pressure=o.force||.5),(0,ta.Z)(o.twist)&&(o.twist=0),(0,ta.Z)(o.tangentialPressure)&&(o.tangentialPressure=0),o.isNormalized=!0,o.type=t.type,n.push(o)}else if(e.isMouseEvent(t)){const r=t;(0,ta.Z)(r.isPrimary)&&(r.isPrimary=!0),(0,ta.Z)(r.width)&&(r.width=1),(0,ta.Z)(r.height)&&(r.height=1),(0,ta.Z)(r.tiltX)&&(r.tiltX=0),(0,ta.Z)(r.tiltY)&&(r.tiltY=0),(0,ta.Z)(r.pointerType)&&(r.pointerType="mouse"),(0,ta.Z)(r.pointerId)&&(r.pointerId=1),(0,ta.Z)(r.pressure)&&(r.pressure=.5),(0,ta.Z)(r.twist)&&(r.twist=0),(0,ta.Z)(r.tangentialPressure)&&(r.tangentialPressure=0),r.isNormalized=!0,n.push(r)}else n.push(t);return n}transferMouseData(t,e){t.isTrusted=e.isTrusted,t.srcElement=e.srcElement,t.timeStamp=performance.now(),t.type=e.type,t.altKey=e.altKey,t.metaKey=e.metaKey,t.shiftKey=e.shiftKey,t.ctrlKey=e.ctrlKey,t.button=e.button,t.buttons=e.buttons,t.client.x=e.clientX,t.client.y=e.clientY,t.movement.x=e.movementX,t.movement.y=e.movementY,t.page.x=e.pageX,t.page.y=e.pageY,t.screen.x=e.screenX,t.screen.y=e.screenY,t.relatedTarget=null}bootstrapEvent(t,e,n,r){t.view=n,t.originalEvent=null,t.nativeEvent=r,t.pointerId=e.pointerId,t.width=e.width,t.height=e.height,t.isPrimary=e.isPrimary,t.pointerType=e.pointerType,t.pressure=e.pressure,t.tangentialPressure=e.tangentialPressure,t.tiltX=e.tiltX,t.tiltY=e.tiltY,t.twist=e.twist,this.transferMouseData(t,e);const{x:o,y:u}=this.getViewportXY(e);t.viewport.x=o,t.viewport.y=u;const[v,S]=this.context.canvas.getCanvasByViewport([o,u]);return t.canvas.x=v,t.canvas.y=S,t.global.copyFrom(t.canvas),t.offset.copyFrom(t.canvas),t.isTrusted=r.isTrusted,t.type==="pointerleave"&&(t.type="pointerout"),t}getViewportXY(t){let e,n;const{offsetX:r,offsetY:o,clientX:u,clientY:v}=t;if(this.context.canvas.context.config.supportsCSSTransform&&!(0,Nt.Z)(r)&&!(0,Nt.Z)(o))e=r,n=o;else{const S=this.eventService.client2Viewport({x:u,y:v});e=S.x,n=S.y}return{x:e,y:n}}onframe(){super.onframe();const{opacity:t}=this.attributes;this.getDomElement().style.opacity=`${t}`}}_o.defaultStyleProps={size:[160,80],halo:!1,icon:!1,label:!1,pointerEvents:"auto"};var Es=function(i,t){var e={};for(var n in i)Object.prototype.hasOwnProperty.call(i,n)&&t.indexOf(n)<0&&(e[n]=i[n]);if(i!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,n=Object.getOwnPropertySymbols(i);r<n.length;r++)t.indexOf(n[r])<0&&Object.prototype.propertyIsEnumerable.call(i,n[r])&&(e[n[r]]=i[n[r]]);return e};class Ko extends xa{constructor(t){super(ji({style:Ko.defaultStyleProps},t))}getKeyStyle(t){const[e,n]=this.getSize(t),r=super.getKeyStyle(t),{fillOpacity:o,opacity:u=o}=r,v=Es(r,["fillOpacity","opacity"]);return Object.assign(Object.assign({opacity:u},v),{width:e,height:n,x:-e/2,y:-n/2})}getHaloStyle(t){if(t.halo===!1)return!1;const e=this.getShape("key").attributes,{fill:n,stroke:r}=e,o=Es(e,["fill","stroke"]),u=lr(this.getGraphicStyle(t),"halo"),v=Number(u.lineWidth),[S,C]=rt(this.getSize(t),[v,v]);return Object.assign(Object.assign({},u),{width:S,height:C,fill:"transparent",x:-S/2,y:-C/2})}getIconStyle(t){const e=super.getIconStyle(t),[n,r]=this.getSize(t);return e?Object.assign({width:n*Oa,height:r*Oa},e):!1}drawKeyShape(t,e){const n=this.upsert("key",Ci,this.getKeyStyle(t),e);return ba(this),n}drawHaloShape(t,e){this.upsert("halo",nt.UL,this.getHaloStyle(t),e)}update(t){super.update(t),t&&("x"in t||"y"in t||"z"in t)&&Hi(this)}}Ko.defaultStyleProps={size:32};class rl extends xa{constructor(t){super(t)}getKeyStyle(t){const[e,n]=this.getSize(t);return Object.assign(Object.assign({},super.getKeyStyle(t)),{width:e,height:n,x:-e/2,y:-n/2})}getIconStyle(t){const e=super.getIconStyle(t),{width:n,height:r}=this.getShape("key").attributes;return e?Object.assign({width:n*Oa,height:r*Oa},e):!1}drawKeyShape(t,e){return this.upsert("key",nt.UL,this.getKeyStyle(t),e)}}class jt extends Lo{constructor(t){super(t)}getInnerR(t){return t.innerR||this.getOuterR(t)*3/8}getOuterR(t){return Math.min(...this.getSize(t))/2}getPoints(t){return Ws(this.getOuterR(t),this.getInnerR(t))}getIconStyle(t){const e=super.getIconStyle(t),n=this.getInnerR(t)*2*Oa;return e?Object.assign({width:n,height:n},e):!1}getPortXY(t,e){const{placement:n="top"}=e,r=this.getShape("key").getLocalBounds(),o=al(this.getOuterR(t),this.getInnerR(t));return Va(r,n,o,!1)}}class it extends Lo{constructor(t){super(ji({style:it.defaultStyleProps},t))}getPoints(t){const{direction:e}=t,[n,r]=this.getSize(t);return Hl(n,r,e)}getPortXY(t,e){const{direction:n}=t,{placement:r="top"}=e,o=this.getShape("key").getLocalBounds(),[u,v]=this.getSize(t),S=Yl(u,v,n);return Va(o,r,S,!1)}getIconStyle(t){const{icon:e,iconText:n,iconSrc:r,direction:o}=t;if(e===!1||(0,Ao.Z)(n||r))return!1;const u=lr(this.getGraphicStyle(t),"icon"),v=this.getShape("key").getLocalBounds(),[S,C]=yi(v,o),T=_i(v,o)*2*Oa;return Object.assign({x:S,y:C,width:T,height:T},u)}}it.defaultStyleProps={size:40,direction:"up"};var ft=function(i,t){var e={};for(var n in i)Object.prototype.hasOwnProperty.call(i,n)&&t.indexOf(n)<0&&(e[n]=i[n]);if(i!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,n=Object.getOwnPropertySymbols(i);r<n.length;r++)t.indexOf(n[r])<0&&Object.prototype.propertyIsEnumerable.call(i,n[r])&&(e[n[r]]=i[n[r]]);return e};class Ft extends xa{constructor(t){super(ji({style:Ft.defaultStyleProps},t)),this.type="combo",this.updateComboPosition(this.parsedAttributes)}getKeySize(t){const{collapsed:e,childrenNode:n=[]}=t;return n.length===0?this.getEmptyKeySize(t):e?this.getCollapsedKeySize(t):this.getExpandedKeySize(t)}getEmptyKeySize(t){const{padding:e,collapsedSize:n}=t,[r,o,u,v]=Ve(e);return rt(ai(n),[v+o,r+u,0])}getCollapsedKeySize(t){return ai(t.collapsedSize)}getExpandedKeySize(t){const e=this.getContentBBox(t);return[on(e),_n(e),0]}getContentBBox(t){const{context:e,childrenNode:n=[],padding:r}=t,o=n.map(v=>e.element.getElement(v)).filter(Boolean);if(o.length===0){const v=new nt.mN,{x:S=0,y:C=0,size:T}=t,[$,lt]=ai(T);return v.setMinMax([S-$/2,C-lt/2,0],[S+$/2,C+lt/2,0]),v}const u=Bn(o.map(v=>v.getBounds()));return r?cr(u,r):u}drawCollapsedMarkerShape(t,e){const n=this.getCollapsedMarkerStyle(t);Ui(this,"collapsedMarker",n)&&(this.upsert("collapsed-marker",xi,n,e),ba(this))}getCollapsedMarkerStyle(t){if(!t.collapsed||!t.collapsedMarker)return!1;const e=lr(this.getGraphicStyle(t),"collapsedMarker"),{type:n}=e,r=ft(e,["type"]),o=this.getShape("key"),[u,v]=ar(o.getLocalBounds(),"center"),S=Object.assign(Object.assign({},r),{x:u,y:v});if(n){const C=this.getCollapsedMarkerText(n,t);Object.assign(S,{text:C})}return S}getCollapsedMarkerText(t,e){const{context:n,childrenData:r=[]}=e,{model:o}=n;return t==="descendant-count"?o.getDescendantsData(this.id).length.toString():t==="child-count"?r.length.toString():t==="node-count"?o.getDescendantsData(this.id).filter(u=>o.getElementType(sn(u))==="node").length.toString():(0,At.Z)(t)?t(r):""}getComboZIndex(t){return(this.context.model.getAncestorsData(this.id,ne)||[]).length}getComboPosition(t){const{x:e=0,y:n=0,collapsed:r,context:o,childrenData:u=[]}=t;if(u.length===0)return[+e,+n,0];if(r){const{model:v}=o,S=v.getDescendantsData(this.id).filter(C=>!v.isCombo(sn(C)));if(S.length>0&&S.some(Cr)){const C=S.reduce((T,$)=>rt(T,er($)),[0,0,0]);return ue(C,S.length)}return[+e,+n,0]}return this.getContentBBox(t).center}getComboStyle(t){const{zIndex:e=this.getComboZIndex(t)}=t,[n,r]=this.getComboPosition(t);return{x:n,y:r,transform:[["translate",n,r]],zIndex:e}}updateComboPosition(t){const e=this.getComboStyle(t);Object.assign(this.style,e);const{x:n,y:r}=e;this.context.model.syncComboDatum({id:this.id,style:{x:n,y:r}}),Hi(this)}render(t,e=this){super.render(t,e),this.drawCollapsedMarkerShape(t,e)}update(t={}){super.update(t),this.updateComboPosition(this.parsedAttributes)}onframe(){super.onframe(),this.attributes.collapsed||this.updateComboPosition(this.parsedAttributes),this.drawKeyShape(this.parsedAttributes,this)}animate(t,e){const n=super.animate(this.attributes.collapsed?t:t.map(r=>{var{x:o,y:u,z:v,transform:S}=r,C=ft(r,["x","y","z","transform"]);return C}),e);return n&&new Proxy(n,{set:(r,o,u)=>(o==="currentTime"&&Promise.resolve().then(()=>this.onframe()),Reflect.set(r,o,u))})}}Ft.defaultStyleProps={childrenNode:[],droppable:!0,draggable:!0,collapsed:!1,collapsedSize:32,collapsedMarker:!0,collapsedMarkerZIndex:1,collapsedMarkerFontSize:12,collapsedMarkerTextAlign:"center",collapsedMarkerTextBaseline:"middle",collapsedMarkerType:"child-count"};class de extends Ft{constructor(t){super(t)}drawKeyShape(t,e){return this.upsert("key",nt.Cd,this.getKeyStyle(t),e)}getKeyStyle(t){const{collapsed:e}=t,n=super.getKeyStyle(t),[r]=this.getKeySize(t);return Object.assign(Object.assign(Object.assign({},n),e&&lr(n,"collapsed")),{r:r/2})}getCollapsedKeySize(t){const[e,n]=ai(t.collapsedSize),r=Math.max(e,n)/2;return[r*2,r*2,0]}getExpandedKeySize(t){const e=this.getContentBBox(t),[n,r]=Cn(e),o=Math.sqrt(Math.pow(n,2)+Math.pow(r,2))/2;return[o*2,o*2,0]}getIntersectPoint(t,e=!1){const n=this.getShape("key").getBounds();return hr(t,n,e)}}class ye extends Ft{constructor(t){super(t)}drawKeyShape(t,e){return this.upsert("key",nt.UL,this.getKeyStyle(t),e)}getKeyStyle(t){const e=super.getKeyStyle(t),[n,r]=this.getKeySize(t);return Object.assign(Object.assign(Object.assign({},e),t.collapsed&&lr(e,"collapsed")),{width:n,height:r,x:-n/2,y:-r/2})}}var Se=d(47182);const Ue={padding:10};function Je(i,t,e,n,r,o){const{padding:u}=Object.assign(Ue,o),v=Ln(e,u),S=Ln(n,u),C=[i,...r,t];let T=null;const $=[];for(let lt=0,gt=C.length;lt<gt-1;lt++){const Gt=lt+1,ee=C[lt],ve=C[Gt],ke=pi(ee,ve);let ze=null;if(lt===0)if(Gt===gt-1)if(v.intersects(S))ze=tr(ee,ve,v,S);else if(!Xr(ee,v)&&!Xr(ve,S)){const Ke=gi(ee,v),ln=gi(ve,S);ze=Mn(Ke,ln,cn(Ke,ln)),ze.points.unshift(Ke),ze.points.push(ln)}else ke||(ze=jn(ee,ve,v,S));else fr(ve,v)?ze=tr(ee,ve,v,Ln(ve,u),T):ke||(ze=zn(ee,ve,v));else Gt===gt-1?fr(ee,S)?ze=tr(ee,ve,Ln(ee,u),S,T):ke||(ze=Gn(ee,ve,S,T)):ke||(ze=Mn(ee,ve,T));ze?($.push(...ze.points),T=ze.direction):T=cn(ee,ve),Gt<gt-1&&$.push(ve)}return $.map($n)}const dn={N:"S",S:"N",W:"E",E:"W"},vn={N:-Math.PI/2,S:Math.PI/2,E:0,W:Math.PI};function cn(i,t){const[e,n]=i,[r,o]=t;return e===r?n>o?"N":"S":n===o?e>r?"W":"E":null}function Nn(i,t){return t==="N"||t==="S"?_n(i):on(i)}function Mn(i,t,e){const n=[i[0],t[1]],r=[t[0],i[1]],o=cn(i,n),u=cn(i,r),v=e?dn[e]:null,S=o===e||o!==v&&u!==e?n:r;return{points:[S],direction:cn(S,t)}}function zn(i,t,e){if(Xr(i,e)){const n=ur(i,t,e);return{points:[n],direction:cn(n,t)}}else{const n=gi(i,e),o=["left","right"].includes(Mr(i,e))?[t[0],n[1]]:[n[0],t[1]];return{points:[o],direction:cn(o,t)}}}function Gn(i,t,e,n){const r=Xr(t,e)?t:gi(t,e),o=[[r[0],i[1]],[i[0],r[1]]],u=o.filter(S=>di(S,e)&&!Zr(S,e,!0)),v=u.filter(S=>cn(S,i)!==n);if(v.length>0){const S=v.find(C=>cn(i,C)===n)||v[0];return{points:[S],direction:cn(S,t)}}else{const S=(0,Se.Z)(o,u)[0],C=si(t,S,Nn(e,n)/2);return{points:[ur(C,i,e),C],direction:cn(C,t)}}}function jn(i,t,e,n){let r=zn(i,t,e);const o=Wn(r.points[0]);if(fr(o,n)){r=zn(t,i,n);const u=Wn(r.points[0]);if(fr(u,e)){const v=si(i,o,Nn(e,cn(i,o))/2),S=si(t,u,Nn(n,cn(t,u))/2),C=[(v[0]+S[0])/2,(v[1]+S[1])/2],T=zn(i,C,e),$=Gn(C,t,n,T.direction);r.points=[T.points[0],$.points[0]],r.direction=$.direction}}return r}function tr(i,t,e,n,r){const u=Bn([e,n]),v=Be(t,u.center)>Be(i,u.center),[S,C]=v?[t,i]:[i,t],T=_n(u)+on(u);let $;if(r){const Gt=[S[0]+T*Math.cos(vn[r]),S[1]+T*Math.sin(vn[r])];$=si(gi(Gt,u),Gt,.01)}else $=si(gi(S,u),S,-.01);let lt=ur($,C,u),gt=[mr($,2),mr(lt,2)];if((0,Bt.Z)(mr($),mr(lt))){const Gt=un($t($,S),[1,0,0])+Math.PI/2;lt=[C[0]+T*Math.cos(Gt),C[1]+T*Math.sin(Gt),0],lt=mr(si(gi(lt,u),C,-.01),2);const ee=ur($,lt,u);gt=[$,ee,lt]}return{points:v?gt.reverse():gt,direction:cn(v?$:lt,t)}}function ur(i,t,e){let n=[i[0],t[1]];return fr(n,e)&&(n=[t[0],i[1]]),n}function gr(i,t,e,n,r){let S=typeof t=="number"?t:.5;t==="start"&&(S=0),t==="end"&&(S=.99);const C=Lr(i.getPoint(S)),T=Lr(i.getPoint(S+.01));let $=t==="start"?"left":t==="end"?"right":"center";if(Si(C,T)||!e){const[ke,ze]=kr(i,S,n,r);return{transform:[["translate",ke,ze]],textAlign:$}}let lt=Math.atan2(T[1]-C[1],T[0]-C[0]);T[0]<C[0]&&($=$==="center"?$:$==="left"?"right":"left",n*=-1,lt+=Math.PI);const[Gt,ee]=kr(i,S,n,r,lt),ve=[["translate",Gt,ee],["rotate",lt/Math.PI*180]];return{textAlign:$,transform:ve}}function Nr(i,t,e,n,r){var o,u;const v=((o=i.badge)===null||o===void 0?void 0:o.getGeometryBounds().halfExtents[0])*2||0,S=((u=i.label)===null||u===void 0?void 0:u.getGeometryBounds().halfExtents[0])*2||0;return gr(i.key,e,!0,(S?(S/2+v/2)*(t==="suffix"?1:-1):0)+n,r)}function kr(i,t,e,n,r){const[o,u]=Lr(i.getPoint(t));let v=e,S=n;return r&&(v=e*Math.cos(r)-n*Math.sin(r),S=e*Math.sin(r)+n*Math.cos(r)),[o+v,u+S]}function Rr(i,t,e,n){if((0,Bt.Z)(i,t))return i;const r=$t(t,i),o=[i[0]+e*r[0],i[1]+e*r[1]],u=en(Sn(r,!1));return o[0]+=n*u[0],o[1]+=n*u[1],o}function li(i){return(0,Fr.Z)(i)?[i,-i]:i}function Qr(i){return(0,Fr.Z)(i)?[i,1-i]:i}function ti(i,t,e){return[["M",i[0],i[1]],["Q",e[0],e[1],t[0],t[1]]]}function vi(i,t,e){return[["M",i[0],i[1]],["C",e[0][0],e[0][1],e[1][0],e[1][1],t[0],t[1]]]}function ci(i,t=0,e=!1){const n=i[0],r=i[i.length-1],o=i.slice(1,i.length-1),u=[["M",n[0],n[1]]];return o.forEach((v,S)=>{const C=o[S-1]||n,T=o[S+1]||r;if(!Wi(C,v,T)&&t){const[$,lt]=W(C,v,T,t);u.push(["L",$[0],$[1]],["Q",v[0],v[1],lt[0],lt[1]],["L",lt[0],lt[1]])}else u.push(["L",v[0],v[1]])}),u.push(["L",r[0],r[1]]),e&&u.push(["Z"]),u}function W(i,t,e,n){const r=He(i,t),o=He(e,t),u=Math.min(n,Math.min(r,o)/2),v=[t[0]-u/r*(t[0]-i[0]),t[1]-u/r*(t[1]-i[1])],S=[t[0]-u/o*(t[0]-e[0]),t[1]-u/o*(t[1]-e[1])];return[v,S]}const j=i=>{const t=Math.PI/2,e=_n(i)/2,n=on(i)/2,r=Math.atan2(e,n)/2,o=Math.atan2(n,e)/2;return{top:[-t-o,-t+o],"top-right":[-t+o,-r],"right-top":[-t+o,-r],right:[-r,r],"bottom-right":[r,t-o],"right-bottom":[r,t-o],bottom:[t-o,t+o],"bottom-left":[t+o,Math.PI-r],"left-bottom":[t+o,Math.PI-r],left:[Math.PI-r,Math.PI+r],"top-left":[Math.PI+r,-t-o],"left-top":[Math.PI+r,-t-o]}};function F(i,t,e,n,r){const o=Ln(i),u=i.getCenter();let v=n&&ro(n),S=r&&ro(r);if(!v||!S){const C=j(o),T=C[t][0],$=C[t][1],[lt,gt]=Cn(o),Gt=Math.max(lt,gt),ee=rt(u,[Gt*Math.cos(T),Gt*Math.sin(T),0]),ve=rt(u,[Gt*Math.cos($),Gt*Math.sin($),0]);v=$s(i,ee),S=$s(i,ve),e||([v,S]=[S,v])}return[v,S]}function B(i,t,e,n,r,o){const u=i.getPorts()[r||o],v=i.getPorts()[o||r];let[S,C]=F(i,t,e,u,v);const T=K(i,S,C,n);return u&&(S=ls(u,T[0])),v&&(C=ls(v,T[T.length-1])),vi(S,C,T)}function K(i,t,e,n){const r=i.getCenter();if((0,Bt.Z)(t,e)){const o=$t(t,r),u=[n*Math.sign(o[0])||n/2,n*Math.sign(o[1])||-n/2,0];return[rt(t,u),rt(e,Ht(u,[1,-1,1]))]}return[si(r,t,Be(r,t)+n),si(r,e,Be(r,e)+n)]}function dt(i,t,e,n,r,o,u){const v=co(i),S=v[o||u],C=v[u||o];let[T,$]=F(i,e,n,S,C);const lt=St(i,T,$,r);return S&&(T=ls(S,lt[0])),C&&($=ls(C,lt[lt.length-1])),ci([T,...lt,$],t)}function St(i,t,e,n){const r=[],o=Ln(i);if((0,Bt.Z)(t,e))switch(Mr(t,o)){case"left":r.push([t[0]-n,t[1]]),r.push([t[0]-n,t[1]+n]),r.push([t[0],t[1]+n]);break;case"right":r.push([t[0]+n,t[1]]),r.push([t[0]+n,t[1]+n]),r.push([t[0],t[1]+n]);break;case"top":r.push([t[0],t[1]-n]),r.push([t[0]+n,t[1]-n]),r.push([t[0]+n,t[1]]);break;case"bottom":r.push([t[0],t[1]+n]),r.push([t[0]+n,t[1]+n]),r.push([t[0]+n,t[1]]);break}else{const u=Mr(t,o),v=Mr(e,o);if(u===v){const S=u;let C,T;switch(S){case"left":C=Math.min(t[0],e[0])-n,r.push([C,t[1]]),r.push([C,e[1]]);break;case"right":C=Math.max(t[0],e[0])+n,r.push([C,t[1]]),r.push([C,e[1]]);break;case"top":T=Math.min(t[1],e[1])-n,r.push([t[0],T]),r.push([e[0],T]);break;case"bottom":T=Math.max(t[1],e[1])+n,r.push([t[0],T]),r.push([e[0],T]);break}}else{const S=(lt,gt)=>({left:[gt[0]-n,gt[1]],right:[gt[0]+n,gt[1]],top:[gt[0],gt[1]-n],bottom:[gt[0],gt[1]+n]})[lt],C=S(u,t),T=S(v,e),$=ur(C,T,o);r.push(C,$,T)}}return r}function Et(i,t){const e=new Set,n=new Set,r=new Set;return i.forEach(o=>{t(o).forEach(v=>{e.add(v),i.includes(v.source)&&i.includes(v.target)?n.add(v):r.add(v)})}),{edges:Array.from(e),internal:Array.from(n),external:Array.from(r)}}function Zt(i,t){const e=[];let n=i;for(;n;){e.push(n);const r=t(sn(n));if(r)n=r;else break}if(e.some(r=>{var o;return(o=r.style)===null||o===void 0?void 0:o.collapsed})){const r=e.reverse().findIndex(Ca);return e[r]||e.at(-1)}return i}function ce(i,t){return t||(i<4?10:i===4?12:i*2.5)}const Ae=(i,t)=>{const e=Math.max(i,t)/2;return[["M",-i/2,0],["A",e,e,0,1,0,2*e-i/2,0],["A",e,e,0,1,0,-i/2,0],["Z"]]},Le=(i,t)=>[["M",-i/2,0],["L",i/2,-t/2],["L",i/2,t/2],["Z"]],$e=(i,t)=>[["M",-i/2,0],["L",0,-t/2],["L",i/2,0],["L",0,t/2],["Z"]],Xe=(i,t)=>[["M",-i/2,0],["L",i/2,-t/2],["L",4*i/5-i/2,0],["L",i/2,t/2],["Z"]],an=(i,t)=>[["M",-i/2,-t/2],["L",i/2,-t/2],["L",i/2,t/2],["L",-i/2,t/2],["Z"]],bn=(i,t)=>{const e=i/2,n=i/7,r=i-n;return[["M",-e,0],["L",0,-t/2],["L",0,t/2],["Z"],["M",r-e,-t/2],["L",r+n-e,-t/2],["L",r+n-e,t/2],["L",r-e,t/2],["Z"]]},xn=(i,t)=>[["M",i/2,-t/2],["L",-i/2,0],["L",i/2,0],["L",-i/2,0],["L",i/2,t/2]];var Dn=function(i,t){var e={};for(var n in i)Object.prototype.hasOwnProperty.call(i,n)&&t.indexOf(n)<0&&(e[n]=i[n]);if(i!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,n=Object.getOwnPropertySymbols(i);r<n.length;r++)t.indexOf(n[r])<0&&Object.prototype.propertyIsEnumerable.call(i,n[r])&&(e[n[r]]=i[n[r]]);return e};class Fn extends Ea{constructor(t){super(ji({style:Fn.defaultStyleProps},t)),this.type="edge"}get sourceNode(){const{context:t,sourceNode:e}=this.parsedAttributes;return t.element.getElement(e)}get targetNode(){const{context:t,targetNode:e}=this.parsedAttributes;return t.element.getElement(e)}getKeyStyle(t){const e=this.getGraphicStyle(t),{loop:n}=e,r=Dn(e,["loop"]),{sourceNode:o,targetNode:u}=this,v=n&&os(o,u)?this.getLoopPath(t):this.getKeyPath(t);return Object.assign({d:v},Yr(r,["halo","label","startArrow","endArrow"]))}getLoopPath(t){const{sourcePort:e,targetPort:n}=t,r=this.sourceNode,o=Ln(r),u=Math.max(on(o),_n(o)),{placement:v,clockwise:S,dist:C=u}=lr(this.getGraphicStyle(t),"loop");return B(r,v,S,C,e,n)}getEndpoints(t,e=!0,n=[]){const{sourcePort:r,targetPort:o}=t,{sourceNode:u,targetNode:v}=this,[S,C]=io(u,v,r,o);if(!e){const gt=S?ro(S):u.getCenter(),Gt=C?ro(C):v.getCenter();return[gt,Gt]}const T=typeof n=="function"?n():n,$=Rs(S||u,T[0]||C||v),lt=Rs(C||v,T[T.length-1]||S||u);return[$,lt]}getHaloStyle(t){if(t.halo===!1)return!1;const e=this.getKeyStyle(t),n=lr(this.getGraphicStyle(t),"halo");return Object.assign(Object.assign({},e),n)}getLabelStyle(t){if(t.label===!1||!t.labelText)return!1;const e=lr(this.getGraphicStyle(t),"label"),{placement:n,offsetX:r,offsetY:o,autoRotate:u,maxWidth:v}=e,S=Dn(e,["placement","offsetX","offsetY","autoRotate","maxWidth"]),C=gr(this.shapeMap.key,n,u,r,o),T=this.shapeMap.key.getLocalBounds(),$=ys([T.min,T.max],v);return Object.assign({wordWrapWidth:$},C,S)}getBadgeStyle(t){if(t.badge===!1||!t.badgeText)return!1;const e=lr(t,"badge"),{offsetX:n,offsetY:r,placement:o}=e,u=Dn(e,["offsetX","offsetY","placement"]);return Object.assign(u,Nr(this.shapeMap,o,t.labelPlacement,n,r))}drawArrow(t,e){var n;const r=e==="start",u=t[e==="start"?"startArrow":"endArrow"],v=this.shapeMap.key;if(u){const S=this.getArrowStyle(t,r);if(!Ui(this,`arrow-${e}`,S))return;const[C,T,$]=r?["markerStart","markerStartOffset","startArrowOffset"]:["markerEnd","markerEndOffset","endArrowOffset"],lt=v.parsedStyle[C];if(lt)lt.attr(S);else{const gt=S.src?nt.Ee:nt.y$,Gt=new gt({style:S});v.style[C]=Gt}v.style[T]=t[$]||S.width/2+ +S.lineWidth}else{const S=r?"markerStart":"markerEnd";(n=v.style[S])===null||n===void 0||n.destroy(),v.style[S]=null}}getArrowStyle(t,e){const n=this.getShape("key").attributes,r=e?"startArrow":"endArrow",o=lr(this.getGraphicStyle(t),r),{size:u,type:v}=o,S=Dn(o,["size","type"]),[C,T]=ai(ce(n.lineWidth,u)),lt=((0,At.Z)(v)?v:l[v]||Le)(C,T);return Object.assign((0,xo.Z)(n,["stroke","strokeOpacity","fillOpacity"]),{width:C,height:T},Object.assign({},lt&&{d:lt,fill:v==="simple"?"":n.stroke}),S)}drawLabelShape(t,e){const n=this.getLabelStyle(t);Ui(this,"label",n)&&this.upsert("label",Ba,n,e)}drawHaloShape(t,e){const n=this.getHaloStyle(t);Ui(this,"halo",n)&&this.upsert("halo",nt.y$,n,e)}drawBadgeShape(t,e){const n=this.getBadgeStyle(t);Ui(this,"badge",n)&&this.upsert("badge",no,n,e)}drawSourceArrow(t){this.drawArrow(t,"start")}drawTargetArrow(t){this.drawArrow(t,"end")}drawKeyShape(t,e){const n=this.getKeyStyle(t);if(Ui(this,"key",n))return this.upsert("key",nt.y$,n,e)}render(t=this.parsedAttributes,e=this){this.drawKeyShape(t,e),this.getShape("key")&&(this.drawSourceArrow(t),this.drawTargetArrow(t),this.drawLabelShape(t,e),this.drawHaloShape(t,e),this.drawBadgeShape(t,e))}onframe(){this.drawKeyShape(this.parsedAttributes,this),this.drawSourceArrow(this.parsedAttributes),this.drawTargetArrow(this.parsedAttributes),this.drawHaloShape(this.parsedAttributes,this),this.drawLabelShape(this.parsedAttributes,this),this.drawBadgeShape(this.parsedAttributes,this)}animate(t,e){const n=super.animate(t,e);return n&&new Proxy(n,{set:(r,o,u)=>(o==="currentTime"&&Promise.resolve().then(()=>this.onframe()),Reflect.set(r,o,u))})}}Fn.defaultStyleProps={badge:!0,badgeOffsetX:0,badgeOffsetY:0,badgePlacement:"suffix",isBillboard:!0,label:!0,labelAutoRotate:!0,labelIsBillboard:!0,labelMaxWidth:"80%",labelOffsetX:4,labelOffsetY:0,labelPlacement:"center",labelTextBaseline:"middle",labelWordWrap:!1,halo:!1,haloDroppable:!1,haloLineDash:0,haloLineWidth:12,haloPointerEvents:"none",haloStrokeOpacity:.25,haloZIndex:-1,loop:!0,startArrow:!1,startArrowLineDash:0,startArrowLineJoin:"round",startArrowLineWidth:1,startArrowTransformOrigin:"center",startArrowType:"vee",endArrow:!1,endArrowLineDash:0,endArrowLineJoin:"round",endArrowLineWidth:1,endArrowTransformOrigin:"center",endArrowType:"vee",loopPlacement:"top",loopClockwise:!0};class On extends Fn{constructor(t){super(ji({style:On.defaultStyleProps},t))}getKeyPath(t){const[e,n]=this.getEndpoints(t),{controlPoints:r,curvePosition:o,curveOffset:u}=t,v=this.getControlPoints(e,n,Qr(o),li(u),r);return vi(e,n,v)}getControlPoints(t,e,n,r,o){return(o==null?void 0:o.length)===2?o:[Rr(t,e,n[0],r[0]),Rr(t,e,n[1],r[1])]}}On.defaultStyleProps={curvePosition:.5,curveOffset:20};class Yn extends On{constructor(t){super(ji({style:Yn.defaultStyleProps},t))}getControlPoints(t,e,n,r){const o=e[0]-t[0];return[[t[0]+o*n[0]+r[0],t[1]],[e[0]-o*n[1]+r[1],e[1]]]}}Yn.defaultStyleProps={curvePosition:[.5,.5],curveOffset:[0,0]};class nr extends On{constructor(t){super(ji({style:nr.defaultStyleProps},t))}get ref(){return this.context.model.getRootsData()[0]}getEndpoints(t){if(this.sourceNode.id===this.ref.id)return super.getEndpoints(t);const e=er(this.ref),n=this.sourceNode.getIntersectPoint(e,!0),r=this.targetNode.getIntersectPoint(e);return[n,r]}toRadialCoordinate(t){const e=er(this.ref),n=Be(t,e),r=Xn($t(t,e));return[n,r]}getControlPoints(t,e,n,r){const[o,u]=this.toRadialCoordinate(t),[v]=this.toRadialCoordinate(e),S=v-o;return[[t[0]+(S*n[0]+r[0])*Math.cos(u),t[1]+(S*n[0]+r[0])*Math.sin(u)],[e[0]-(S*n[1]-r[0])*Math.cos(u),e[1]-(S*n[1]-r[0])*Math.sin(u)]]}}nr.defaultStyleProps={curvePosition:.5,curveOffset:20};class sr extends On{constructor(t){super(ji({style:sr.defaultStyleProps},t))}getControlPoints(t,e,n,r){const o=e[1]-t[1];return[[t[0],t[1]+o*n[0]+r[0]],[e[0],e[1]-o*n[1]+r[1]]]}}sr.defaultStyleProps={curvePosition:[.5,.5],curveOffset:[0,0]};class xr extends Fn{constructor(t){super(ji({style:xr.defaultStyleProps},t))}getKeyPath(t){const[e,n]=this.getEndpoints(t);return[["M",e[0],e[1]],["L",n[0],n[1]]]}}xr.defaultStyleProps={};const Wr={enableObstacleAvoidance:!1,offset:10,maxAllowedDirectionChange:Math.PI/2,maximumLoops:3e3,gridSize:5,startDirections:["top","right","bottom","left"],endDirections:["top","right","bottom","left"],directionMap:{right:{stepX:1,stepY:0},left:{stepX:-1,stepY:0},bottom:{stepX:0,stepY:1},top:{stepX:0,stepY:-1}},penalties:{0:0,90:0},distFunc:He},ei=i=>`${Math.round(i[0])}|||${Math.round(i[1])}`;function Ti(i,t){const e=n=>Math.round(n/t);return(0,Fr.Z)(i)?e(i):i.map(e)}function Gi(i,t){const e=Math.abs(i-t);return e>Math.PI?2*Math.PI-e:e}function Ei(i,t){const e=t[0]-i[0],n=t[1]-i[1];return!e&&!n?0:Math.atan2(n,e)}function Vr(i,t,e,n){const r=Ei(i,t),o=e[ei(i)],v=Ei(o||n,i);return Gi(v,r)}const mi=(i,t)=>{const{offset:e,gridSize:n}=t,r={};return i.forEach(o=>{if(!o||o.destroyed||!o.isVisible())return;const u=cr(o.getRenderBounds(),e);for(let v=Ti(u.min[0],n);v<=Ti(u.max[0],n);v+=1)for(let S=Ti(u.min[1],n);S<=Ti(u.max[1],n);S+=1)r[`${v}|||${S}`]=!0}),r};function Jr(i,t,e){return Math.min(...t.map(n=>e(i,n)))}function Ii(i,t,e){let n=i[0],r=e(i[0],t);for(let o=0;o<i.length;o++){const u=i[o],v=e(u,t);v<r&&(n=u,r=v)}return n}const Ki=(i,t,e,n)=>{if(!t)return[i];const{directionMap:r,offset:o}=n,u=cr(t.getRenderBounds(),o),v=Object.keys(r).reduce((S,C)=>{if(e.includes(C)){const T=r[C],[$,lt]=Cn(u),gt=[i[0]+T.stepX*$,i[1]+T.stepY*lt],Gt=qr(u);for(let ee=0;ee<Gt.length;ee++){const ve=Zn([i,gt],Gt[ee]);ve&&Zr(ve,u)&&S.push(ve)}}return S},[]);return fr(i,u)||v.push(i),v.map(S=>Ti(S,n.gridSize))},Kr=(i,t,e,n,r,o,u)=>{const v=[];let S=[o[0]===n[0]?n[0]:i[0]*u,o[1]===n[1]?n[1]:i[1]*u];v.unshift(S);let C=i,T=t[ei(C)];for(;T;){const gt=T,Gt=C;Vr(gt,Gt,t,e)&&(S=[gt[0]===Gt[0]?S[0]:gt[0]*u,gt[1]===Gt[1]?S[1]:gt[1]*u],v.unshift(S)),T=t[ei(gt)],C=gt}const $=r.map(gt=>[gt[0]*u,gt[1]*u]),lt=Ii($,S,He);return v.unshift(lt),v};function Zi(i,t,e,n){const r=$n(i.getCenter()),o=$n(t.getCenter()),u=Object.assign(Wr,n),{gridSize:v}=u,S=u.enableObstacleAvoidance?e:[i,t],C=mi(S,u),T=Ti(r,v),$=Ti(o,v),lt=Ki(r,i,u.startDirections,u),gt=Ki(o,t,u.endDirections,u);lt.forEach(hn=>delete C[ei(hn)]),gt.forEach(hn=>delete C[ei(hn)]);const Gt={},ee={},ve={},ke={},ze={},Ke=new Pi;for(let hn=0;hn<lt.length;hn++){const or=lt[hn],yr=ei(or);Gt[yr]=or,ke[yr]=0,ze[yr]=Jr(or,gt,u.distFunc),Ke.add({id:yr,value:ze[yr]})}const ln=gt.map(hn=>ei(hn));let kn=u.maximumLoops,Tn,In=1/0;for(const[hn,or]of Object.entries(Gt))ze[hn]<=In&&(In=ze[hn],Tn=or);for(;Object.keys(Gt).length>0&&kn>0;){const hn=Ke.minId(!1);if(hn)Tn=Gt[hn];else break;const or=ei(Tn);if(ln.includes(or))return Kr(Tn,ve,T,o,lt,$,v);delete Gt[or],Ke.remove(or),ee[or]=!0;for(const yr of Object.values(u.directionMap)){const Vn=rt(Tn,[yr.stepX,yr.stepY]),Dr=ei(Vn);if(ee[Dr])continue;const pr=Vr(Tn,Vn,ve,T);if(pr>u.maxAllowedDirectionChange||C[Dr])continue;Gt[Dr]||(Gt[Dr]=Vn);const Sr=u.penalties[pr],dr=u.distFunc(Tn,Vn)+(isNaN(Sr)?v:Sr),Ir=ke[or]+dr,Yi=ke[Dr];Yi&&Ir>=Yi||(ve[Dr]=Tn,ke[Dr]=Ir,ze[Dr]=Ir+Jr(Vn,gt,u.distFunc),Ke.add({id:Dr,value:ze[Dr]}))}kn-=1}return[]}class Pi{constructor(){this.arr=[],this.map={},this.arr=[],this.map={}}_innerAdd(t,e){let n=0,r=e-1;for(;r-n>1;){const o=Math.floor((n+r)/2);if(this.arr[o].value>t.value)r=o;else if(this.arr[o].value<t.value)n=o;else{this.arr.splice(o,0,t),this.map[t.id]=!0;return}}this.arr.splice(r,0,t),this.map[t.id]=!0}add(t){delete this.map[t.id];const e=this.arr.length;if(!e||this.arr[e-1].value<t.value){this.arr.push(t),this.map[t.id]=!0;return}this._innerAdd(t,e)}remove(t){this.map[t]&&delete this.map[t]}_clearAndGetMinId(){let t;for(let e=this.arr.length-1;e>=0;e--)this.map[this.arr[e].id]?t=this.arr[e].id:this.arr.splice(e,1);return t}_findFirstId(){for(;this.arr.length;){const t=this.arr.shift();if(this.map[t.id])return t.id}}minId(t){return t?this._clearAndGetMinId():this._findFirstId()}}class Qi extends Fn{constructor(t){super(ji({style:Qi.defaultStyleProps},t))}getControlPoints(t){const{router:e}=t,{sourceNode:n,targetNode:r}=this,[o,u]=this.getEndpoints(t,!1);let v=[];if(!e)v=t.controlPoints;else if(e.type==="shortest-path"){const S=this.context.element.getNodes();v=Zi(n,r,S,e),v.length||(v=Je(o,u,n,r,t.controlPoints,{padding:e.offset}))}else e.type==="orth"&&(v=Je(o,u,n,r,t.controlPoints,e));return v}getPoints(t){const e=this.getControlPoints(t),[n,r]=this.getEndpoints(t,!0,e);return[n,...e,r]}getKeyPath(t){const e=this.getPoints(t);return ci(e,t.radius)}getLoopPath(t){const{sourcePort:e,targetPort:n,radius:r}=t,o=this.sourceNode,u=Ln(o),v=Math.max(on(u),_n(u))/4,{placement:S,clockwise:C,dist:T=v}=lr(this.getGraphicStyle(t),"loop");return dt(o,r,S,C,T,e,n)}}Qi.defaultStyleProps={radius:0,controlPoints:[],router:!1};class Ni extends Fn{constructor(t){super(ji({style:Ni.defaultStyleProps},t))}getKeyPath(t){const{curvePosition:e,curveOffset:n}=t,[r,o]=this.getEndpoints(t),u=t.controlPoint||Rr(r,o,e,n);return ti(r,o,u)}}Ni.defaultStyleProps={curvePosition:.5,curveOffset:30};function Ri(i){return i instanceof xa&&i.type==="node"}function na(i){return i instanceof Fn}function to(i){return i instanceof Ft}function ga(i){return Ri(i)||na(i)||to(i)}function os(i,t){return!i||!t?!1:i===t}const ss={top:[.5,0],right:[1,.5],bottom:[.5,1],left:[0,.5],default:[.5,.5]};function Va(i,t,e=ss,n=!0){const r=[.5,.5],o=(0,ea.Z)(t)?(0,Di.Z)(e,t.toLocaleLowerCase(),r):t;if(!n&&(0,ea.Z)(t))return o;const[u,v]=o||r;return[i.min[0]+on(i)*u,i.min[1]+_n(i)*v]}function co(i){if(!i)return{};const t=i.getPorts();return(i.attributes.ports||[]).forEach((n,r)=>{var o;const{key:u,placement:v}=n;wo(n)&&(t[o=u||r]||(t[o]=ar(i.getShape("key").getBounds(),v)))}),t}function wo(i){const{r:t}=i;return!t||Number(t)===0}function ro(i){return Ze(i)?i:i.getPosition()}function io(i,t,e,n){const r=So(i,t,e,n),o=So(t,i,n,e);return[r,o]}function So(i,t,e,n){const r=co(i);if(e)return r[e];const o=Object.values(r);if(o.length===0)return;const u=o.map(C=>ro(C)),v=jo(t,n),[S]=$r(u,v);return o.find(C=>ro(C)===S)}function jo(i,t){const e=co(i);if(t)return[ro(e[t])];const n=Object.values(e);return n.length>0?n.map(r=>ro(r)):[i.getCenter()]}function Rs(i,t){return to(i)||Ri(i)?$s(i,t):ls(i,t)}function ls(i,t){if(!i||!t)return[0,0,0];if(Ze(i))return i;if(i.attributes.linkToCenter)return i.getPosition();const e=Ze(t)?t:Ri(t)?t.getCenter():t.getPosition();return hr(e,i.getBounds())}function $s(i,t){if(!i||!t)return[0,0,0];const e=Ze(t)?t:Ri(t)?t.getCenter():t.getPosition();return i.getIntersectPoint(e)||i.getCenter()}function il(i,t="bottom",e=0,n=0,r=!1){const o=t.split("-"),[u,v]=ar(i,t),S=o.includes("left")?"right":o.includes("right")?"left":"center";let C=o.includes("top")?"bottom":o.includes("bottom")?"top":"middle";return r&&(C=C==="top"?"bottom":C==="bottom"?"top":C),{transform:[["translate",u+e,v+n]],textBaseline:C,textAlign:S}}function Ws(i,t){return[[0,-i],[t*Math.cos(3*Math.PI/10),-t*Math.sin(3*Math.PI/10)],[i*Math.cos(Math.PI/10),-i*Math.sin(Math.PI/10)],[t*Math.cos(Math.PI/10),t*Math.sin(Math.PI/10)],[i*Math.cos(3*Math.PI/10),i*Math.sin(3*Math.PI/10)],[0,t],[-i*Math.cos(3*Math.PI/10),i*Math.sin(3*Math.PI/10)],[-t*Math.cos(Math.PI/10),t*Math.sin(Math.PI/10)],[-i*Math.cos(Math.PI/10),-i*Math.sin(Math.PI/10)],[-t*Math.cos(3*Math.PI/10),-t*Math.sin(3*Math.PI/10)]]}function al(i,t){const e={};return e.top=[0,-i],e.left=[-i*Math.cos(Math.PI/10),-i*Math.sin(Math.PI/10)],e["left-bottom"]=[-i*Math.cos(3*Math.PI/10),i*Math.sin(3*Math.PI/10)],e.bottom=[0,t],e["right-bottom"]=[i*Math.cos(3*Math.PI/10),i*Math.sin(3*Math.PI/10)],e.right=e.default=[i*Math.cos(Math.PI/10),-i*Math.sin(Math.PI/10)],e}function Hl(i,t,e){const n=t/2,r=i/2,o={up:[[-r,n],[r,n],[0,-n]],left:[[-r,0],[r,n],[r,-n]],right:[[-r,n],[-r,-n],[r,0]],down:[[-r,-n],[r,-n],[0,n]]};return o[e]||o.up}function Yl(i,t,e){const n=t/2,r=i/2,o={};return e==="down"?(o.bottom=o.default=[0,n],o.right=[r,-n],o.left=[-r,-n]):e==="left"?(o.top=[r,-n],o.bottom=[r,n],o.left=o.default=[-r,0]):e==="right"?(o.top=[-r,-n],o.bottom=[-r,n],o.right=o.default=[r,0]):(o.left=[-r,n],o.top=o.default=[0,-n],o.right=[r,n]),o}function Mc(i,t){return[[i/2,-t/2],[i/2,t/2],[-i/2,t/2],[-i/2,-t/2]]}function Is(i,t){return[[0,-t/2],[i/2,0],[0,t/2],[-i/2,0]]}function $o(i){return(0,Di.Z)(i,["style","visibility"])!=="hidden"}function vs(i,t){"update"in i?i.update(t):i.attr(t)}function oa(i){return[[0,i],[i*Math.sqrt(3)/2,i/2],[i*Math.sqrt(3)/2,-i/2],[0,-i],[-i*Math.sqrt(3)/2,-i/2],[-i*Math.sqrt(3)/2,i/2]]}function Mo(i){(0,Qa.Z)(i,"__to_be_destroyed__",!0)}function ha(i){return(0,Di.Z)(i,"__to_be_destroyed__",!1)}var Zo=function(i,t,e,n){function r(o){return o instanceof e?o:new e(function(u){u(o)})}return new(e||(e=Promise))(function(o,u){function v(T){try{C(n.next(T))}catch($){u($)}}function S(T){try{C(n.throw(T))}catch($){u($)}}function C(T){T.done?o(T.value):r(T.value).then(v,S)}C((n=n.apply(i,t||[])).next())})};class Co extends yt{constructor(t,e){super(t,Object.assign({},Co.defaultOptions,e)),this.onCollapseExpand=n=>Zo(this,void 0,void 0,function*(){if(!this.validate(n))return;const{target:r}=n;if(!ga(r))return;const o=r.id,{model:u,graph:v}=this.context,S=u.getElementDataById(o);if(!S)return!1;const{onCollapse:C,onExpand:T,animation:$}=this.options;Ca(S)?(yield v.expandElement(o,$),T==null||T(o)):(yield v.collapseElement(o,$),C==null||C(o))}),this.bindEvents()}update(t){this.unbindEvents(),super.update(t),this.bindEvents()}bindEvents(){const{graph:t}=this.context,{trigger:e}=this.options;t.on(`node:${e}`,this.onCollapseExpand),t.on(`combo:${e}`,this.onCollapseExpand)}unbindEvents(){const{graph:t}=this.context,{trigger:e}=this.options;t.off(`node:${e}`,this.onCollapseExpand),t.off(`combo:${e}`,this.onCollapseExpand)}validate(t){if(this.destroyed)return!1;const{enable:e}=this.options;return(0,At.Z)(e)?e(t):!!e}destroy(){this.unbindEvents(),super.destroy()}}Co.defaultOptions={enable:!0,animation:!0,trigger:qt.DBLCLICK};var ol=d(63178),xs=function(i,t,e,n){function r(o){return o instanceof e?o:new e(function(u){u(o)})}return new(e||(e=Promise))(function(o,u){function v(T){try{C(n.next(T))}catch($){u($)}}function S(T){try{C(n.throw(T))}catch($){u($)}}function C(T){T.done?o(T.value):r(T.value).then(v,S)}C((n=n.apply(i,t||[])).next())})};const Ds="g6-create-edge-assist-edge-id",gs="g6-create-edge-assist-node-id";class ps extends yt{constructor(t,e){super(t,Object.assign({},ps.defaultOptions,e)),this.drop=n=>xs(this,void 0,void 0,function*(){const{targetType:r}=n;["combo","node"].includes(r)&&this.source?yield this.handleCreateEdge(n):yield this.cancelEdge()}),this.handleCreateEdge=n=>xs(this,void 0,void 0,function*(){var r,o,u;if(!this.validate(n))return;const{graph:v,canvas:S,batch:C,element:T}=this.context,{style:$}=this.options;if(this.source){this.createEdge(n),yield this.cancelEdge();return}C.startBatch(),S.setCursor("crosshair"),this.source=this.getSelectedNodeIDs([n.target.id])[0];const lt=v.getElementData(this.source);v.addNodeData([{id:gs,style:{visibility:"hidden",ports:[{key:"port-1",placement:[.5,.5]}],x:(r=lt.style)===null||r===void 0?void 0:r.x,y:(o=lt.style)===null||o===void 0?void 0:o.y}}]),v.addEdgeData([{id:Ds,source:this.source,target:gs,style:Object.assign({pointerEvents:"none"},$)}]),yield(u=T.draw({animation:!1}))===null||u===void 0?void 0:u.finished}),this.updateAssistEdge=n=>xs(this,void 0,void 0,function*(){var r;if(!this.source)return;const{model:o,element:u}=this.context;o.translateNodeTo(gs,[n.canvas.x,n.canvas.y]),yield(r=u.draw({animation:!1,silence:!0}))===null||r===void 0?void 0:r.finished}),this.createEdge=n=>{var r,o;const{graph:u}=this.context,{style:v,onFinish:S,onCreate:C}=this.options;if(((r=n.target)===null||r===void 0?void 0:r.id)===void 0||this.source===void 0)return;const $=(o=this.getSelectedNodeIDs([n.target.id]))===null||o===void 0?void 0:o[0],lt=`${this.source}-${$}-${(0,ol.Z)()}`,gt=C({id:lt,source:this.source,target:$,style:v});u.addEdgeData([gt]),S(gt)},this.cancelEdge=()=>xs(this,void 0,void 0,function*(){var n;if(!this.source)return;const{graph:r,element:o,batch:u}=this.context;r.removeNodeData([gs]),this.source=void 0,yield(n=o.draw({animation:!1}))===null||n===void 0?void 0:n.finished,u.endBatch()}),this.bindEvents()}update(t){super.update(t),this.bindEvents()}bindEvents(){const{graph:t}=this.context,{trigger:e}=this.options;this.unbindEvents(),e==="click"?(t.on(Mt.CLICK,this.handleCreateEdge),t.on(xe.CLICK,this.handleCreateEdge),t.on(pe.CLICK,this.cancelEdge),t.on(We.CLICK,this.cancelEdge)):(t.on(Mt.DRAG_START,this.handleCreateEdge),t.on(xe.DRAG_START,this.handleCreateEdge),t.on(qt.POINTER_UP,this.drop)),t.on(qt.POINTER_MOVE,this.updateAssistEdge)}getSelectedNodeIDs(t){return Array.from(new Set(this.context.graph.getElementDataByState("node",this.options.state).map(e=>e.id).concat(t)))}validate(t){if(this.destroyed)return!1;const{enable:e}=this.options;return(0,At.Z)(e)?e(t):!!e}unbindEvents(){const{graph:t}=this.context;t.off(Mt.CLICK,this.handleCreateEdge),t.off(xe.CLICK,this.handleCreateEdge),t.off(pe.CLICK,this.cancelEdge),t.off(We.CLICK,this.cancelEdge),t.off(Mt.DRAG_START,this.handleCreateEdge),t.off(xe.DRAG_START,this.handleCreateEdge),t.off(qt.POINTER_UP,this.drop),t.off(qt.POINTER_MOVE,this.updateAssistEdge)}destroy(){this.unbindEvents(),super.destroy()}}ps.defaultOptions={animation:!0,enable:!0,style:{},trigger:"drag",onCreate:i=>i,onFinish:()=>{}};var ws=d(78431),Kl=function(i,t,e,n){function r(o){return o instanceof e?o:new e(function(u){u(o)})}return new(e||(e=Promise))(function(o,u){function v(T){try{C(n.next(T))}catch($){u($)}}function S(T){try{C(n.throw(T))}catch($){u($)}}function C(T){T.done?o(T.value):r(T.value).then(v,S)}C((n=n.apply(i,t||[])).next())})};class sl extends yt{constructor(t,e){super(t,Object.assign({},sl.defaultOptions,e)),this.isDragging=!1,this.onDragStart=n=>{this.validate(n)&&(this.isDragging=!0,this.context.canvas.setCursor("grabbing"))},this.onDrag=n=>{if(!this.isDragging)return;const{x:r,y:o}=n.movement;r|o&&this.translate([r,o],!1)},this.onDragEnd=()=>{var n,r;this.isDragging=!1,this.context.canvas.setCursor(this.defaultCursor),(r=(n=this.options).onFinish)===null||r===void 0||r.call(n)},this.invokeOnFinish=(0,ws.Z)(()=>{var n,r;(r=(n=this.options).onFinish)===null||r===void 0||r.call(n)},300),this.shortcut=new Fa(t.graph),this.bindEvents(),this.defaultCursor=this.context.canvas.getConfig().cursor||"default"}update(t){this.unbindEvents(),super.update(t),this.bindEvents()}bindEvents(){const{trigger:t}=this.options;if((0,Xt.Z)(t)){const{up:e=[],down:n=[],left:r=[],right:o=[]}=t;this.shortcut.bind(e,u=>this.onTranslate([0,1],u)),this.shortcut.bind(n,u=>this.onTranslate([0,-1],u)),this.shortcut.bind(r,u=>this.onTranslate([1,0],u)),this.shortcut.bind(o,u=>this.onTranslate([-1,0],u))}else{const{graph:e}=this.context;e.on(qt.DRAG_START,this.onDragStart),e.on(qt.DRAG,this.onDrag),e.on(qt.DRAG_END,this.onDragEnd)}}onTranslate(t,e){return Kl(this,void 0,void 0,function*(){if(!this.validate(e))return;const{sensitivity:n}=this.options,r=n*-1;yield this.translate(Ht(t,r),this.options.animation),this.invokeOnFinish()})}translate(t,e){return Kl(this,void 0,void 0,function*(){t=this.clampByDirection(t),t=this.clampByRange(t),yield this.context.graph.translateBy(t,e)})}clampByDirection([t,e]){const{direction:n}=this.options;return n==="x"?e=0:n==="y"&&(t=0),[t,e]}clampByRange([t,e]){const{viewport:n,canvas:r}=this.context,[o,u]=r.getSize(),[v,S,C,T]=Ve(this.options.range),$=[u*v,o*S,u*C,o*T],lt=cr(En(n.getCanvasCenter()),$),gt=$t(n.getViewportCenter(),[t,e,0]);if(!fr(gt,lt)){const{min:[Gt,ee],max:[ve,ke]}=lt;(gt[0]<Gt&&t>0||gt[0]>ve&&t<0)&&(t=0),(gt[1]<ee&&e>0||gt[1]>ke&&e<0)&&(e=0)}return[t,e]}validate(t){if(this.destroyed)return!1;const{enable:e}=this.options;return typeof e=="function"?e(t):!!e}unbindEvents(){this.shortcut.unbindAll();const{graph:t}=this.context;t.off(qt.DRAG_START,this.onDragStart),t.off(qt.DRAG,this.onDrag),t.off(qt.DRAG_END,this.onDragEnd)}destroy(){this.shortcut.destroy(),this.unbindEvents(),this.context.canvas.setCursor(this.defaultCursor),super.destroy()}}sl.defaultOptions={enable:i=>"targetType"in i?i.targetType==="canvas":!0,sensitivity:10,direction:"both",range:1/0};var Cc=function(i,t,e,n){function r(o){return o instanceof e?o:new e(function(u){u(o)})}return new(e||(e=Promise))(function(o,u){function v(T){try{C(n.next(T))}catch($){u($)}}function S(T){try{C(n.throw(T))}catch($){u($)}}function C(T){T.done?o(T.value):r(T.value).then(v,S)}C((n=n.apply(i,t||[])).next())})};class Gs extends yt{constructor(t,e){super(t,Object.assign({},Gs.defaultOptions,e)),this.enable=!1,this.enableElements=["node","combo"],this.target=[],this.shadowOrigin=[0,0],this.hiddenEdges=[],this.isDragging=!1,this.onDrop=n=>Cc(this,void 0,void 0,function*(){var r;if(this.options.dropEffect!=="link")return;const{model:o,element:u}=this.context,v=n.target.id;this.target.forEach(S=>{const C=o.getParentData(S,ne);C&&sn(C)===v&&o.refreshComboData(v),o.setParent(S,v,ne)}),yield(r=u==null?void 0:u.draw({animation:!0}))===null||r===void 0?void 0:r.finished}),this.setCursor=n=>{if(this.isDragging)return;const{type:r}=n,{canvas:o}=this.context,{cursor:u}=this.options;r===qt.POINTER_ENTER?o.setCursor((u==null?void 0:u.grab)||"grab"):o.setCursor((u==null?void 0:u.default)||"default")},this.onDragStart=this.onDragStart.bind(this),this.onDrag=this.onDrag.bind(this),this.onDragEnd=this.onDragEnd.bind(this),this.onDrop=this.onDrop.bind(this),this.bindEvents()}update(t){this.unbindEvents(),super.update(t),this.bindEvents()}bindEvents(){const{graph:t,canvas:e}=this.context,n=e.getLayer().getContextService().$canvas;n&&(n.addEventListener("blur",this.onDragEnd),n.addEventListener("contextmenu",this.onDragEnd)),this.enableElements.forEach(r=>{t.on(`${r}:${qt.DRAG_START}`,this.onDragStart),t.on(`${r}:${qt.DRAG}`,this.onDrag),t.on(`${r}:${qt.DRAG_END}`,this.onDragEnd),t.on(`${r}:${qt.POINTER_ENTER}`,this.setCursor),t.on(`${r}:${qt.POINTER_LEAVE}`,this.setCursor)}),["link"].includes(this.options.dropEffect)&&(t.on(xe.DROP,this.onDrop),t.on(pe.DROP,this.onDrop))}getSelectedNodeIDs(t){return Array.from(new Set(this.context.graph.getElementDataByState("node",this.options.state).map(e=>e.id).concat(t)))}getDelta(t){const e=this.context.graph.getZoom();return ue([t.dx,t.dy],e)}onDragStart(t){var e;if(this.enable=this.validate(t),!this.enable)return;const{batch:n,canvas:r}=this.context;r.setCursor(((e=this.options.cursor)===null||e===void 0?void 0:e.grabbing)||"grabbing"),this.isDragging=!0,n.startBatch(),this.target=this.getSelectedNodeIDs([t.target.id]),this.hideEdge(),this.context.graph.frontElement(this.target),this.options.shadow&&this.createShadow(this.target)}onDrag(t){if(!this.enable)return;const e=this.getDelta(t);this.options.shadow?this.moveShadow(e):this.moveElement(this.target,e)}onDragEnd(){var t,e,n;if(this.enable=!1,this.options.shadow){if(!this.shadow)return;this.shadow.style.visibility="hidden";const{x:u=0,y:v=0}=this.shadow.attributes,[S,C]=$t([+u,+v],this.shadowOrigin);this.moveElement(this.target,[S,C])}this.showEdges(),(e=(t=this.options).onFinish)===null||e===void 0||e.call(t,this.target);const{batch:r,canvas:o}=this.context;r.endBatch(),o.setCursor(((n=this.options.cursor)===null||n===void 0?void 0:n.grab)||"grab"),this.isDragging=!1,this.target=[]}validate(t){if(this.destroyed)return!1;const{enable:e}=this.options;return(0,At.Z)(e)?e(t):!!e}moveElement(t,e){return Cc(this,void 0,void 0,function*(){const{graph:n,model:r}=this.context,{dropEffect:o}=this.options;o==="move"&&t.forEach(u=>r.refreshComboData(u)),n.translateElementBy(Object.fromEntries(t.map(u=>[u,e])),!1)})}moveShadow(t){if(!this.shadow)return;const{x:e=0,y:n=0}=this.shadow.attributes,[r,o]=t;this.shadow.attr({x:+e+r,y:+n+o})}createShadow(t){const e=lr(this.options,"shadow"),n=Bn(t.map(C=>this.context.element.getElement(C).getBounds())),[r,o]=n.min;this.shadowOrigin=[r,o];const[u,v]=Cn(n),S={width:u,height:v,x:r,y:o};this.shadow?this.shadow.attr(Object.assign(Object.assign(Object.assign({},e),S),{visibility:"visible"})):(this.shadow=new nt.UL({style:Object.assign(Object.assign(Object.assign({$layer:"transient"},e),S),{pointerEvents:"none"})}),this.context.canvas.appendChild(this.shadow))}showEdges(){this.options.shadow||this.hiddenEdges.length===0||(this.context.graph.showElement(this.hiddenEdges),this.hiddenEdges=[])}hideEdge(){const{hideEdge:t,shadow:e}=this.options;if(t==="none"||e)return;const{graph:n}=this.context;t==="all"?this.hiddenEdges=n.getEdgeData().map(sn):this.hiddenEdges=Array.from(new Set(this.target.map(r=>n.getRelatedEdgesData(r,t).map(sn)).flat())),n.hideElement(this.hiddenEdges)}unbindEvents(){const{graph:t,canvas:e}=this.context,n=e.getLayer().getContextService().$canvas;n&&(n.removeEventListener("blur",this.onDragEnd),n.removeEventListener("contextmenu",this.onDragEnd)),this.enableElements.forEach(r=>{t.off(`${r}:${qt.DRAG_START}`,this.onDragStart),t.off(`${r}:${qt.DRAG}`,this.onDrag),t.off(`${r}:${qt.DRAG_END}`,this.onDragEnd),t.off(`${r}:${qt.POINTER_ENTER}`,this.setCursor),t.off(`${r}:${qt.POINTER_LEAVE}`,this.setCursor)}),t.off(`combo:${qt.DROP}`,this.onDrop),t.off(`canvas:${qt.DROP}`,this.onDrop)}destroy(){var t;this.unbindEvents(),(t=this.shadow)===null||t===void 0||t.destroy(),super.destroy()}}Gs.defaultOptions={animation:!0,enable:i=>["node","combo"].includes(i.targetType),dropEffect:"move",state:"selected",hideEdge:"none",shadow:!1,shadowZIndex:100,shadowFill:"#F3F9FF",shadowFillOpacity:.5,shadowStroke:"#1890FF",shadowStrokeOpacity:.9,shadowLineDash:[5,5],cursor:{default:"default",grab:"grab",grabbing:"grabbing"}};var Ua=d(67469);class ll{constructor(t,e){this.context=t,this.options=e||{}}}var cl=function(i,t,e,n){function r(o){return o instanceof e?o:new e(function(u){u(o)})}return new(e||(e=Promise))(function(o,u){function v(T){try{C(n.next(T))}catch($){u($)}}function S(T){try{C(n.throw(T))}catch($){u($)}}function C(T){T.done?o(T.value):r(T.value).then(v,S)}C((n=n.apply(i,t||[])).next())})},ju=function(i,t){var e={};for(var n in i)Object.prototype.hasOwnProperty.call(i,n)&&t.indexOf(n)<0&&(e[n]=i[n]);if(i!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,n=Object.getOwnPropertySymbols(i);r<n.length;r++)t.indexOf(n[r])<0&&Object.prototype.propertyIsEnumerable.call(i,n[r])&&(e[n[r]]=i[n[r]]);return e};function tf(i){const{type:t}=i;return!!(["comboCombined","comboForce"].includes(t)||t==="antv-dagre"&&i.sortByCombo)}function $u(i){const{type:t}=i;return["compact-box","mindmap","dendrogram","indented"].includes(t)}function cs(i){return isNumber(i.x)&&isNumber(i.y)}function ul(i){const{nodes:t,edges:e}=i,n={nodes:[],edges:[],combos:[]};return t.forEach(r=>{const o=r.data._isCombo?n.combos:n.nodes,{x:u,y:v,z:S=0}=r.data;o==null||o.push({id:r.id,style:{x:u,y:v,z:S}})}),e.forEach(r=>{const{id:o,source:u,target:v,data:{points:S=[],controlPoints:C=S.slice(1,S.length-1)}}=r;n.edges.push({id:o,source:u,target:v,style:Object.assign({},C!=null&&C.length?{controlPoints:C.map(Lr)}:{})})}),n}function Wu(i,t){class e extends ll{constructor(r,o){if(super(r,o),this.instance=new i({}),this.id=this.instance.id,"stop"in this.instance&&"tick"in this.instance){const u=this.instance;this.stop=u.stop.bind(u),this.tick=v=>{const S=u.tick(v);return ul(S)}}}execute(r,o){return cl(this,void 0,void 0,function*(){return ul(yield this.instance.execute(this.graphData2LayoutModel(r),this.transformOptions((0,ct.Z)({},this.options,o))))})}transformOptions(r){const{onTick:o}=r;return o&&(r.onTick=u=>o(ul(u))),r}graphData2LayoutModel(r){const{nodes:o=[],edges:u=[],combos:v=[]}=r,S=o.map(gt=>{const Gt=sn(gt),{data:ee,style:ve,combo:ke}=gt,ze=ju(gt,["data","style","combo"]),Ke={id:Gt,data:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},ee),{data:ee}),ke?{parentId:ke}:{}),{style:ve}),ze)};return ve!=null&&ve.x&&Object.assign(Ke.data,{x:ve.x}),ve!=null&&ve.y&&Object.assign(Ke.data,{y:ve.y}),ve!=null&&ve.z&&Object.assign(Ke.data,{z:ve.z}),Ke}),C=new Map(S.map(gt=>[gt.id,gt])),T=u.filter(gt=>{const{source:Gt,target:ee}=gt;return C.has(Gt)&&C.has(ee)}).map(gt=>{const{source:Gt,target:ee,data:ve,style:ke}=gt;return{id:sn(gt),source:Gt,target:ee,data:Object.assign({},ve),style:Object.assign({},ke)}}),$=v.map(gt=>({id:sn(gt),data:Object.assign({_isCombo:!0},gt.data),style:Object.assign({},gt.style)})),lt=new Ua.k({nodes:[...S,...$],edges:T});return t.model.model.hasTreeStructure(ne)&&(lt.attachTreeStructure(ne),S.forEach(gt=>{const Gt=t.model.model.getParent(gt.id,ne);Gt&<.hasNode(Gt.id)&<.setParent(gt.id,Gt.id,ne)})),lt}}return e}function Ss(i,t,...e){if(t in i)return i[t](...e);if("instance"in i){const n=i.instance;if(t in n)return n[t](...e)}return null}function Xl(i,t){if(t in i)return i[t];if("instance"in i){const e=i.instance;if(t in e)return e[t]}return null}var Gu=function(i,t,e,n){function r(o){return o instanceof e?o:new e(function(u){u(o)})}return new(e||(e=Promise))(function(o,u){function v(T){try{C(n.next(T))}catch($){u($)}}function S(T){try{C(n.throw(T))}catch($){u($)}}function C(T){T.done?o(T.value):r(T.value).then(v,S)}C((n=n.apply(i,t||[])).next())})};class Vu extends Gs{get forceLayoutInstance(){return this.context.layout.getLayoutInstance().find(t=>["d3-force","d3-force-3d"].includes(t==null?void 0:t.id))}validate(t){return this.context.layout?this.forceLayoutInstance?super.validate(t):(at.warn("DragElementForce only works with d3-force or d3-force-3d layout"),!1):!1}moveElement(t,e){return Gu(this,void 0,void 0,function*(){const n=this.forceLayoutInstance;this.context.graph.getNodeData(t).forEach((r,o)=>{const{x:u=0,y:v=0}=r.style||{};n&&Ss(n,"setFixedPosition",t[o],[...rt([+u,+v],e)])})})}onDragStart(t){if(this.enable=this.validate(t),!this.enable)return;this.target=this.getSelectedNodeIDs([t.target.id]),this.hideEdge(),this.context.graph.frontElement(this.target);const e=this.forceLayoutInstance;e&&Xl(e,"simulation").alphaTarget(.3).restart(),this.context.graph.getNodeData(this.target).forEach(n=>{const{x:r=0,y:o=0}=n.style||{};e&&Ss(e,"setFixedPosition",sn(n),[+r,+o])})}onDrag(t){if(!this.enable)return;const e=this.getDelta(t);this.moveElement(this.target,e)}onDragEnd(){const t=this.forceLayoutInstance;t&&Xl(t,"simulation").alphaTarget(0),this.context.graph.getNodeData(this.target).forEach(e=>{t&&Ss(t,"setFixedPosition",sn(e),[null,null,null])})}}var Oc=function(i,t,e,n){function r(o){return o instanceof e?o:new e(function(u){u(o)})}return new(e||(e=Promise))(function(o,u){function v(T){try{C(n.next(T))}catch($){u($)}}function S(T){try{C(n.throw(T))}catch($){u($)}}function C(T){T.done?o(T.value):r(T.value).then(v,S)}C((n=n.apply(i,t||[])).next())})};class Vs extends yt{constructor(t,e){super(t,Object.assign({},Vs.defaultOptions,e)),this.isZoomEvent=n=>!!(n.data&&"scale"in n.data),this.relatedEdgeToUpdate=new Set,this.zoom=this.context.graph.getZoom(),this.fixElementSize=n=>Oc(this,void 0,void 0,function*(){if(!this.validate(n))return;const{graph:r}=this.context,{state:o,nodeFilter:u,edgeFilter:v,comboFilter:S}=this.options,C=(o?r.getElementDataByState("node",o):r.getNodeData()).filter(u),T=(o?r.getElementDataByState("edge",o):r.getEdgeData()).filter(v),$=(o?r.getElementDataByState("combo",o):r.getComboData()).filter(S),lt=this.isZoomEvent(n)?this.zoom=Math.max(.01,Math.min(n.data.scale,10)):this.zoom,gt=[...C,...$];gt.length>0&>.forEach(Gt=>this.fixNodeLike(Gt,lt)),this.updateRelatedEdges(),T.length>0&&T.forEach(Gt=>this.fixEdge(Gt,lt))}),this.cachedStyles=new Map,this.getOriginalFieldValue=(n,r,o)=>{var u;const v=this.cachedStyles.get(n)||[],S=((u=v.find(C=>C.shape===r))===null||u===void 0?void 0:u.style)||{};return o in S||(S[o]=r.attributes[o],this.cachedStyles.set(n,[...v.filter(C=>C.shape!==r),{shape:r,style:S}])),S[o]},this.scaleEntireElement=(n,r,o)=>{r.setLocalScale(1/o);const u=this.cachedStyles.get(n)||[];u.push({shape:r}),this.cachedStyles.set(n,u)},this.scaleSpecificShapes=(n,r,o)=>{const u=Ga(n);(Array.isArray(o)?o:[o]).forEach(S=>{const{shape:C,fields:T}=S,$=typeof C=="function"?C(u):n.getShape(C);if($){if(!T){this.scaleEntireElement(n.id,$,r);return}T.forEach(lt=>{const gt=this.getOriginalFieldValue(n.id,$,lt);(0,Fr.Z)(gt)&&($.style[lt]=gt/r)})}})},this.skipIfExceedViewport=n=>{const{viewport:r}=this.context;return!(r!=null&&r.isInViewport(n.getRenderBounds(),!1,30))},this.fixNodeLike=(n,r)=>{const o=sn(n),{element:u,model:v}=this.context,S=u.getElement(o);if(!S||this.skipIfExceedViewport(S))return;v.getRelatedEdgesData(o).forEach($=>this.relatedEdgeToUpdate.add(sn($)));const T=this.options[S.type];if(!T){this.scaleEntireElement(o,S,r);return}this.scaleSpecificShapes(S,r,T)},this.fixEdge=(n,r)=>{const o=sn(n),u=this.context.element.getElement(o);if(!u||this.skipIfExceedViewport(u))return;const v=this.options.edge;if(!v){u.style.transformOrigin="center",this.scaleEntireElement(o,u,r);return}this.scaleSpecificShapes(u,r,v)},this.updateRelatedEdges=()=>{const{element:n}=this.context;this.relatedEdgeToUpdate.size>0&&this.relatedEdgeToUpdate.forEach(r=>{const o=n.getElement(r);o==null||o.update({})}),this.relatedEdgeToUpdate.clear()},this.resetTransform=()=>Oc(this,void 0,void 0,function*(){this.options.reset?this.restoreCachedStyles():this.fixElementSize({data:{scale:this.zoom}})}),this.bindEvents()}restoreCachedStyles(){if(this.cachedStyles.size>0){this.cachedStyles.forEach(r=>{r.forEach(({shape:o,style:u})=>{if((0,Ao.Z)(u))o.setLocalScale(1);else{if(this.options.state)return;Object.entries(u).forEach(([v,S])=>o.style[v]=S)}})});const{graph:t,element:e}=this.context,n=Object.keys(Object.fromEntries(this.cachedStyles)).filter(r=>r&&t.getElementType(r)==="node");if(n.length>0){const r=new Set;n.forEach(o=>{t.getRelatedEdgesData(o).forEach(u=>r.add(sn(u)))}),r.forEach(o=>{const u=e==null?void 0:e.getElement(o);u==null||u.update({})})}}}bindEvents(){const{graph:t}=this.context;t.on(Oe.AFTER_DRAW,this.resetTransform),t.on(Oe.AFTER_TRANSFORM,this.fixElementSize)}unbindEvents(){const{graph:t}=this.context;t.off(Oe.AFTER_DRAW,this.resetTransform),t.off(Oe.AFTER_TRANSFORM,this.fixElementSize)}validate(t){if(this.destroyed)return!1;const{enable:e}=this.options;return(0,At.Z)(e)?e(t):!!e}destroy(){this.unbindEvents(),super.destroy()}}Vs.defaultOptions={enable:i=>i.data.scale<1,nodeFilter:()=>!0,edgeFilter:()=>!0,comboFilter:()=>!0,edge:[{shape:"key",fields:["lineWidth"]},{shape:"halo",fields:["lineWidth"]},{shape:"label"}],reset:!1};var Uu=function(i,t,e,n){function r(o){return o instanceof e?o:new e(function(u){u(o)})}return new(e||(e=Promise))(function(o,u){function v(T){try{C(n.next(T))}catch($){u($)}}function S(T){try{C(n.throw(T))}catch($){u($)}}function C(T){T.done?o(T.value):r(T.value).then(v,S)}C((n=n.apply(i,t||[])).next())})};class dl extends yt{constructor(t,e){super(t,Object.assign({},dl.defaultOptions,e)),this.focus=n=>Uu(this,void 0,void 0,function*(){if(!this.validate(n))return;const{graph:r}=this.context;yield r.focusElement(n.target.id,this.options.animation)}),this.bindEvents()}bindEvents(){const{graph:t}=this.context;this.unbindEvents(),Ra.forEach(e=>{t.on(`${e}:${qt.CLICK}`,this.focus)})}validate(t){if(this.destroyed)return!1;const{enable:e}=this.options;return(0,At.Z)(e)?e(t):!!e}unbindEvents(){const{graph:t}=this.context;Ra.forEach(e=>{t.off(`${e}:${qt.CLICK}`,this.focus)})}destroy(){this.unbindEvents(),super.destroy()}}dl.defaultOptions={animation:{easing:"ease-in",duration:500},enable:!0};class Us extends yt{constructor(t,e){super(t,Object.assign({},Us.defaultOptions,e)),this.isFrozen=!1,this.toggleFrozen=n=>{this.isFrozen=n.type==="dragstart"},this.hoverElement=n=>{if(!this.validate(n))return;const r=n.type===qt.POINTER_ENTER;this.updateElementsState(n,r);const{onHover:o,onHoverEnd:u}=this.options;r?o==null||o(n):u==null||u(n)},this.updateElementsState=(n,r)=>{if(!this.options.state&&!this.options.inactiveState)return;const{graph:o}=this.context,{state:u,animation:v,inactiveState:S}=this.options,C=this.getActiveIds(n),T={};if(u&&Object.assign(T,this.getElementsState(C,u,r)),S){const $=y(o.getData(),!0).filter(lt=>!C.includes(lt));Object.assign(T,this.getElementsState($,S,r))}o.setElementState(T,v)},this.getElementsState=(n,r,o)=>{const{graph:u}=this.context,v={};return n.forEach(S=>{const C=u.getElementState(S);o?v[S]=C.includes(r)?C:[...C,r]:v[S]=C.filter(T=>T!==r)}),v},this.bindEvents()}bindEvents(){const{graph:t}=this.context;this.unbindEvents(),Ra.forEach(n=>{t.on(`${n}:${qt.POINTER_ENTER}`,this.hoverElement),t.on(`${n}:${qt.POINTER_LEAVE}`,this.hoverElement)});const e=this.context.canvas.document;e.addEventListener(`${qt.DRAG_START}`,this.toggleFrozen),e.addEventListener(`${qt.DRAG_END}`,this.toggleFrozen)}getActiveIds(t){const{graph:e}=this.context,{degree:n,direction:r}=this.options,o=t.target.id;return n?Ia(e,t.targetType,o,typeof n=="function"?n(t):n,r):[o]}validate(t){if(this.destroyed||this.isFrozen||ha(t.target)||this.context.graph.isCollapsingExpanding)return!1;const{enable:e}=this.options;return(0,At.Z)(e)?e(t):!!e}unbindEvents(){const{graph:t}=this.context;Ra.forEach(n=>{t.off(`${n}:${qt.POINTER_ENTER}`,this.hoverElement),t.off(`${n}:${qt.POINTER_LEAVE}`,this.hoverElement)});const e=this.context.canvas.document;e.removeEventListener(`${qt.DRAG_START}`,this.toggleFrozen),e.removeEventListener(`${qt.DRAG_END}`,this.toggleFrozen)}destroy(){this.unbindEvents(),super.destroy()}}Us.defaultOptions={animation:!1,enable:!0,degree:0,direction:"both",state:"active",inactiveState:void 0};class Ql extends da{onPointerDown(t){if(!super.validate(t)||!super.isKeydown()||this.points)return;const{canvas:e}=this.context;this.pathShape=new nt.y$({id:"g6-lasso-select",style:this.options.style}),e.appendChild(this.pathShape),this.points=[ja(t)]}onPointerMove(t){var e;if(!this.points)return;const{immediately:n,mode:r}=this.options;this.points.push(ja(t)),(e=this.pathShape)===null||e===void 0||e.setAttribute("d",za(this.points)),n&&r==="default"&&this.points.length>2&&super.updateElementsStates(this.points)}onPointerUp(){if(this.points){if(this.points.length<2){this.clearLasso();return}super.updateElementsStates(this.points),this.clearLasso()}}clearLasso(){var t;(t=this.pathShape)===null||t===void 0||t.remove(),this.pathShape=void 0,this.points=void 0}}class Hs extends yt{constructor(t,e){super(t,Object.assign({},Hs.defaultOptions,e)),this.hiddenShapes=[],this.isVisible=!0,this.setElementsVisibility=(n,r,o)=>{n.filter(Boolean).forEach(u=>{r==="hidden"&&!u.isVisible()?this.hiddenShapes.push(u):r==="visible"&&this.hiddenShapes.includes(u)?this.hiddenShapes.splice(this.hiddenShapes.indexOf(u),1):Y(u,r,!1,o)})},this.filterShapes=(n,r)=>{if((0,At.Z)(r))return u=>!r(n,u);const o=r==null?void 0:r[n];return u=>u.className?!(o!=null&&o.includes(u.className)):!0},this.hideShapes=n=>{if(!this.validate(n)||!this.isVisible)return;const{element:r}=this.context,{shapes:o={}}=this.options;this.setElementsVisibility(r.getNodes(),"hidden",this.filterShapes("node",o)),this.setElementsVisibility(r.getEdges(),"hidden",this.filterShapes("edge",o)),this.setElementsVisibility(r.getCombos(),"hidden",this.filterShapes("combo",o)),this.isVisible=!1},this.showShapes=(0,ws.Z)(n=>{if(!this.validate(n)||this.isVisible)return;const{element:r}=this.context;this.setElementsVisibility(r.getNodes(),"visible"),this.setElementsVisibility(r.getEdges(),"visible"),this.setElementsVisibility(r.getCombos(),"visible"),this.isVisible=!0},this.options.debounce),this.bindEvents()}bindEvents(){const{graph:t}=this.context;t.on(Oe.BEFORE_TRANSFORM,this.hideShapes),t.on(Oe.AFTER_TRANSFORM,this.showShapes)}unbindEvents(){const{graph:t}=this.context;t.off(Oe.BEFORE_TRANSFORM,this.hideShapes),t.off(Oe.AFTER_TRANSFORM,this.showShapes)}validate(t){if(this.destroyed)return!1;const{enable:e}=this.options;return(0,At.Z)(e)?e(t):!!e}update(t){this.unbindEvents(),super.update(t),this.bindEvents()}destroy(){this.unbindEvents(),super.destroy()}}Hs.defaultOptions={enable:!0,debounce:200,shapes:i=>i==="node"};var Tc=function(i,t,e,n){function r(o){return o instanceof e?o:new e(function(u){u(o)})}return new(e||(e=Promise))(function(o,u){function v(T){try{C(n.next(T))}catch($){u($)}}function S(T){try{C(n.throw(T))}catch($){u($)}}function C(T){T.done?o(T.value):r(T.value).then(v,S)}C((n=n.apply(i,t||[])).next())})};class fl extends yt{constructor(t,e){super(t,Object.assign({},fl.defaultOptions,e)),this.onWheel=n=>Tc(this,void 0,void 0,function*(){this.options.preventDefault&&n.preventDefault();const r=n.deltaX,o=n.deltaY;yield this.scroll([-r,-o],n)}),this.shortcut=new Fa(t.graph),this.bindEvents()}update(t){super.update(t),this.bindEvents()}bindEvents(){var t,e;const{trigger:n}=this.options;if(this.shortcut.unbindAll(),(0,Xt.Z)(n)){(t=this.graphDom)===null||t===void 0||t.removeEventListener(qt.WHEEL,this.onWheel);const{up:r=[],down:o=[],left:u=[],right:v=[]}=n;this.shortcut.bind(r,S=>this.scroll([0,-10],S)),this.shortcut.bind(o,S=>this.scroll([0,10],S)),this.shortcut.bind(u,S=>this.scroll([-10,0],S)),this.shortcut.bind(v,S=>this.scroll([10,0],S))}else(e=this.graphDom)===null||e===void 0||e.addEventListener(qt.WHEEL,this.onWheel,{passive:!1})}get graphDom(){return this.context.graph.getCanvas().getContextService().getDomElement()}formatDisplacement(t){const{sensitivity:e}=this.options;return t=Ht(t,e),t=this.clampByDirection(t),t=this.clampByRange(t),t}clampByDirection([t,e]){const{direction:n}=this.options;return n==="x"?e=0:n==="y"&&(t=0),[t,e]}clampByRange([t,e]){const{viewport:n,canvas:r}=this.context,[o,u]=r.getSize(),[v,S,C,T]=Ve(this.options.range),$=[u*v,o*S,u*C,o*T],lt=cr(En(n.getCanvasCenter()),$),gt=$t(n.getViewportCenter(),[t,e,0]);if(!fr(gt,lt)){const{min:[Gt,ee],max:[ve,ke]}=lt;(gt[0]<Gt&&t>0||gt[0]>ve&&t<0)&&(t=0),(gt[1]<ee&&e>0||gt[1]>ke&&e<0)&&(e=0)}return[t,e]}scroll(t,e){return Tc(this,void 0,void 0,function*(){if(!this.validate(e))return;const{onFinish:n}=this.options,r=this.context.graph,o=this.formatDisplacement(t);yield r.translateBy(o,!1),n==null||n()})}validate(t){if(this.destroyed)return!1;const{enable:e}=this.options;return(0,At.Z)(e)?e(t):!!e}destroy(){var t;this.shortcut.destroy(),(t=this.graphDom)===null||t===void 0||t.removeEventListener(qt.WHEEL,this.onWheel),super.destroy()}}fl.defaultOptions={enable:!0,sensitivity:1,preventDefault:!0,range:1/0};var uo=d(70208),hl=function(i,t,e,n){function r(o){return o instanceof e?o:new e(function(u){u(o)})}return new(e||(e=Promise))(function(o,u){function v(T){try{C(n.next(T))}catch($){u($)}}function S(T){try{C(n.throw(T))}catch($){u($)}}function C(T){T.done?o(T.value):r(T.value).then(v,S)}C((n=n.apply(i,t||[])).next())})};class vl extends yt{constructor(t,e){super(t,Object.assign({},vl.defaultOptions,e)),this.zoom=(n,r,o)=>hl(this,void 0,void 0,function*(){if(!this.validate(r))return;const{graph:u}=this.context;let v;"viewport"in r&&(v=Lr(r.viewport));const{sensitivity:S,onFinish:C}=this.options,T=1+(0,uo.Z)(n,-50,50)*S/100,$=u.getZoom();yield u.zoomTo($*T,o,v),C==null||C()}),this.onReset=()=>hl(this,void 0,void 0,function*(){yield this.context.graph.zoomTo(1,this.options.animation)}),this.preventDefault=n=>{this.options.preventDefault&&n.preventDefault()},this.shortcut=new Fa(t.graph),this.bindEvents()}update(t){super.update(t),this.bindEvents()}bindEvents(){var t;const{trigger:e}=this.options;if(this.shortcut.unbindAll(),Array.isArray(e)&&((t=this.context.canvas.getContainer())===null||t===void 0||t.addEventListener(qt.WHEEL,this.preventDefault),this.shortcut.bind([...e,qt.WHEEL],n=>{const{deltaX:r,deltaY:o}=n;this.zoom(-(o!=null?o:r),n,!1)})),typeof e=="object"){const{zoomIn:n=[],zoomOut:r=[],reset:o=[]}=e;this.shortcut.bind(n,u=>this.zoom(10,u,this.options.animation)),this.shortcut.bind(r,u=>this.zoom(-10,u,this.options.animation)),this.shortcut.bind(o,this.onReset)}}validate(t){if(this.destroyed)return!1;const{enable:e}=this.options;return(0,At.Z)(e)?e(t):!!e}destroy(){var t;this.shortcut.destroy(),(t=this.context.canvas.getContainer())===null||t===void 0||t.removeEventListener(qt.WHEEL,this.preventDefault),super.destroy()}}vl.defaultOptions={animation:{duration:200},enable:!0,sensitivity:1,trigger:[],preventDefault:!0};var gl=d(13722),ui=d(80813);const Pc=(i,t)=>{if(i!=="next"&&i!=="prev")return t},Ac=i=>{i.prev.next=i.next,i.next.prev=i.prev,delete i.next,delete i.prev};class Ys{constructor(){const t={};t.prev=t,t.next=t.prev,this.shortcut=t}dequeue(){const t=this.shortcut,e=t.prev;if(e&&e!==t)return Ac(e),e}enqueue(t){const e=this.shortcut;t.prev&&t.next&&Ac(t),t.next=e.next,e.next.prev=t,e.next=t,t.prev=e}toString(){const t=[],e=this.shortcut;let n=e.prev;for(;n!==e;)t.push(JSON.stringify(n,Pc)),n=n==null?void 0:n.prev;return`[${t.join(", ")}]`}}class Jl extends Ys{}const ka=()=>1,Hu=(i,t)=>{var e;if(i.getAllNodes().length<=1)return[];const n=Ku(i,t||ka);return(e=Yu(n.graph,n.buckets,n.zeroIdx).map(o=>i.getRelatedEdges(o.v,"out").filter(({target:u})=>u===o.w)))===null||e===void 0?void 0:e.flat()},Yu=(i,t,e)=>{let n=[];const r=t[t.length-1],o=t[0];let u;for(;i.getAllNodes().length;){for(;u=o.dequeue();)ql(i,t,e,u);for(;u=r.dequeue();)ql(i,t,e,u);if(i.getAllNodes().length){for(let v=t.length-2;v>0;--v)if(u=t[v].dequeue(),u){n=n.concat(ql(i,t,e,u,!0));break}}}return n},ql=(i,t,e,n,r)=>{var o,u;const v=[];return i.hasNode(n.v)&&((o=i.getRelatedEdges(n.v,"in"))===null||o===void 0||o.forEach(S=>{const C=S.data.weight,T=i.getNode(S.source);r&&v.push({v:S.source,w:S.target,in:0,out:0}),T.data.out===void 0&&(T.data.out=0),T.data.out-=C,pl(t,e,Object.assign({v:T.id},T.data))}),(u=i.getRelatedEdges(n.v,"out"))===null||u===void 0||u.forEach(S=>{const C=S.data.weight,T=S.target,$=i.getNode(T);$.data.in===void 0&&($.data.in=0),$.data.in-=C,pl(t,e,Object.assign({v:$.id},$.data))}),i.removeNode(n.v)),r?v:void 0},Ku=(i,t)=>{const e=new Ua.k;let n=0,r=0;i.getAllNodes().forEach(S=>{e.addNode({id:S.id,data:{v:S.id,in:0,out:0}})}),i.getAllEdges().forEach(S=>{const C=e.getRelatedEdges(S.source,"out").find($=>$.target===S.target),T=(t==null?void 0:t(S))||1;C?e.updateEdgeData(C==null?void 0:C.id,Object.assign(Object.assign({},C.data),{weight:C.data.weight+T})):e.addEdge({id:S.id,source:S.source,target:S.target,data:{weight:T}}),r=Math.max(r,e.getNode(S.source).data.out+=T),n=Math.max(n,e.getNode(S.target).data.in+=T)});const o=[],u=r+n+3;for(let S=0;S<u;S++)o.push(new Jl);const v=n+1;return e.getAllNodes().forEach(S=>{pl(o,v,Object.assign({v:S.id},e.getNode(S.id).data))}),{buckets:o,zeroIdx:v,graph:e}},pl=(i,t,e)=>{e.out?e.in?i[e.out-e.in+t].enqueue(e):i[i.length-1].enqueue(e):i[0].enqueue(e)},Nc=(i,t)=>{const n=t==="greedy"?Hu(i,(r=>o=>o.data.weight||1)(i)):Xu(i);n==null||n.forEach(r=>{const o=r.data;i.removeEdge(r.id),o.forwardName=r.data.name,o.reversed=!0,i.addEdge({id:r.id,source:r.target,target:r.source,data:Object.assign({},o)})})},Xu=i=>{const t=[],e={},n={},r=o=>{n[o]||(n[o]=!0,e[o]=!0,i.getRelatedEdges(o,"out").forEach(u=>{e[u.target]?t.push(u):r(u.target)}),delete e[o])};return i.getAllNodes().forEach(o=>r(o.id)),t},Qu=i=>{i.getAllEdges().forEach(t=>{const e=t.data;if(e.reversed){i.removeEdge(t.id);const n=e.forwardName;delete e.reversed,delete e.forwardName,i.addEdge({id:t.id,source:t.target,target:t.source,data:Object.assign(Object.assign({},e),{forwardName:n})})}})},Ju=(i,t)=>Number(i)-Number(t),Ls=(i,t,e,n)=>{let r;do r=`${n}${Math.random()}`;while(i.hasNode(r));return e.dummy=t,i.addNode({id:r,data:e}),r},qu=i=>{const t=new Ua.k;return i.getAllNodes().forEach(e=>{t.addNode(Object.assign({},e))}),i.getAllEdges().forEach(e=>{const n=t.getRelatedEdges(e.source,"out").find(r=>r.target===e.target);n?t.updateEdgeData(n==null?void 0:n.id,Object.assign(Object.assign({},n.data),{weight:n.data.weight+e.data.weight||0,minlen:Math.max(n.data.minlen,e.data.minlen||1)})):t.addEdge({id:e.id,source:e.source,target:e.target,data:{weight:e.data.weight||0,minlen:e.data.minlen||1}})}),t},Rc=i=>{const t=new Ua.k;return i.getAllNodes().forEach(e=>{i.getChildren(e.id).length||t.addNode(Object.assign({},e))}),i.getAllEdges().forEach(e=>{t.addEdge(e)}),t},Ic=(i,t)=>i==null?void 0:i.reduce((e,n,r)=>(e[n]=t[r],e),{}),ef=i=>{const t={};return i.getAllNodes().forEach(e=>{const n={};i.getRelatedEdges(e.id,"out").forEach(r=>{n[r.target]=(n[r.target]||0)+(r.data.weight||0)}),t[e.id]=n}),t},nf=i=>{const t=i.getAllNodes(),e=t.map(n=>{const r={};return i.getRelatedEdges(n.id,"in").forEach(o=>{r[o.source]=(r[o.source]||0)+o.data.weight}),r});return Ic(t.map(n=>n.id),e)},Dc=(i,t)=>{const e=Number(i.x),n=Number(i.y),r=Number(t.x)-e,o=Number(t.y)-n;let u=Number(i.width)/2,v=Number(i.height)/2;if(!r&&!o)return{x:0,y:0};let S,C;return Math.abs(o)*u>Math.abs(r)*v?(o<0&&(v=-v),S=v*r/o,C=v):(r<0&&(u=-u),S=u,C=u*o/r),{x:e+S,y:n+C}},Ks=i=>{const t=[],e=tc(i)+1;for(let n=0;n<e;n++)t.push([]);i.getAllNodes().forEach(n=>{const r=n.data.rank;r!==void 0&&t[r]&&t[r].push(n.id)});for(let n=0;n<e;n++)t[n]=t[n].sort((r,o)=>Ju(i.getNode(r).data.order,i.getNode(o).data.order));return t},td=i=>{const t=i.getAllNodes().filter(n=>n.data.rank!==void 0).map(n=>n.data.rank),e=Math.min(...t);i.getAllNodes().forEach(n=>{n.data.hasOwnProperty("rank")&&e!==1/0&&(n.data.rank-=e)})},rf=(i,t=0)=>{const e=i.getAllNodes(),n=e.filter(v=>v.data.rank!==void 0).map(v=>v.data.rank),r=Math.min(...n),o=[];e.forEach(v=>{const S=(v.data.rank||0)-r;o[S]||(o[S]=[]),o[S].push(v.id)});let u=0;for(let v=0;v<o.length;v++){const S=o[v];S===void 0?v%t!==0&&(u-=1):u&&(S==null||S.forEach(C=>{const T=i.getNode(C);T&&(T.data.rank=T.data.rank||0,T.data.rank+=u)}))}},Xs=(i,t,e,n)=>{const r={width:0,height:0};return(0,Fr.Z)(e)&&(0,Fr.Z)(n)&&(r.rank=e,r.order=n),Ls(i,"border",r,t)},tc=i=>{let t;return i.getAllNodes().forEach(e=>{const n=e.data.rank;n!==void 0&&(t===void 0||n>t)&&(t=n)}),t||(t=0),t},ml=(i,t)=>{const e={lhs:[],rhs:[]};return i==null||i.forEach(n=>{t(n)?e.lhs.push(n):e.rhs.push(n)}),e},Qs=(i,t)=>i.reduce((e,n)=>{const r=t(e),o=t(n);return r>o?n:e}),ao=(i,t,e,n,r,o)=>{n.includes(t.id)||(n.push(t.id),e||o.push(t.id),r(t.id).forEach(u=>ao(i,u,e,n,r,o)),e&&o.push(t.id))},ec=(i,t,e,n)=>{const r=Array.isArray(t)?t:[t],o=S=>n?i.getSuccessors(S):i.getNeighbors(S),u=[],v=[];return r.forEach(S=>{if(i.hasNode(S.id))ao(i,S,e==="post",v,o,u);else throw new Error(`Graph does not have node: ${S}`)}),u},wa=i=>{const t=e=>{const n=i.getChildren(e),r=i.getNode(e);if(n!=null&&n.length&&n.forEach(o=>t(o.id)),r.data.hasOwnProperty("minRank")){r.data.borderLeft=[],r.data.borderRight=[];for(let o=r.data.minRank,u=r.data.maxRank+1;o<u;o+=1)Lc(i,"borderLeft","_bl",e,r,o),Lc(i,"borderRight","_br",e,r,o)}};i.getRoots().forEach(e=>t(e.id))},Lc=(i,t,e,n,r,o)=>{const u={rank:o,borderType:t,width:0,height:0},v=r.data[t][o-1],S=Ls(i,"border",u,e);r.data[t][o]=S,i.setParent(S,n),v&&i.addEdge({id:`e${Math.random()}`,source:v,target:S,data:{weight:1}})},ed=(i,t)=>{const e=t.toLowerCase();(e==="lr"||e==="rl")&&ks(i)},kc=(i,t)=>{const e=t.toLowerCase();(e==="bt"||e==="rl")&&nd(i),(e==="lr"||e==="rl")&&(Ha(i),ks(i))},ks=i=>{i.getAllNodes().forEach(t=>{_c(t)}),i.getAllEdges().forEach(t=>{_c(t)})},_c=i=>{const t=i.data.width;i.data.width=i.data.height,i.data.height=t},nd=i=>{i.getAllNodes().forEach(t=>{nc(t.data)}),i.getAllEdges().forEach(t=>{var e;(e=t.data.points)===null||e===void 0||e.forEach(n=>nc(n)),t.data.hasOwnProperty("y")&&nc(t.data)})},nc=i=>{i!=null&&i.y&&(i.y=-i.y)},Ha=i=>{i.getAllNodes().forEach(t=>{Fo(t.data)}),i.getAllEdges().forEach(t=>{var e;(e=t.data.points)===null||e===void 0||e.forEach(n=>Fo(n)),t.data.hasOwnProperty("x")&&Fo(t.data)})},Fo=i=>{const t=i.x;i.x=i.y,i.y=t},rd=i=>{const t=Ls(i,"root",{},"_root"),e=yl(i);let n=Math.max(...Object.values(e));Math.abs(n)===1/0&&(n=1);const r=n-1,o=2*r+1;i.getAllEdges().forEach(v=>{v.data.minlen*=o});const u=id(i)+1;return i.getRoots().forEach(v=>{Zc(i,t,o,u,r,e,v.id)}),{nestingRoot:t,nodeRankFactor:o}},Zc=(i,t,e,n,r,o,u)=>{const v=i.getChildren(u);if(!(v!=null&&v.length)){u!==t&&i.addEdge({id:`e${Math.random()}`,source:t,target:u,data:{weight:0,minlen:e}});return}const S=Xs(i,"_bt"),C=Xs(i,"_bb"),T=i.getNode(u);i.setParent(S,u),T.data.borderTop=S,i.setParent(C,u),T.data.borderBottom=C,v==null||v.forEach($=>{Zc(i,t,e,n,r,o,$.id);const lt=$.data.borderTop?$.data.borderTop:$.id,gt=$.data.borderBottom?$.data.borderBottom:$.id,Gt=$.data.borderTop?n:2*n,ee=lt!==gt?1:r-o[u]+1;i.addEdge({id:`e${Math.random()}`,source:S,target:lt,data:{minlen:ee,weight:Gt,nestingEdge:!0}}),i.addEdge({id:`e${Math.random()}`,source:gt,target:C,data:{minlen:ee,weight:Gt,nestingEdge:!0}})}),i.getParent(u)||i.addEdge({id:`e${Math.random()}`,source:t,target:S,data:{weight:0,minlen:r+o[u]}})},yl=i=>{const t={},e=(n,r)=>{const o=i.getChildren(n);o==null||o.forEach(u=>e(u.id,r+1)),t[n]=r};return i.getRoots().forEach(n=>e(n.id,1)),t},id=i=>{let t=0;return i.getAllEdges().forEach(e=>{t+=e.data.weight}),t},ad=(i,t)=>{t&&i.removeNode(t),i.getAllEdges().forEach(e=>{e.data.nestingEdge&&i.removeEdge(e.id)})},od="edge",ms="edge-label",sd=(i,t)=>{i.getAllEdges().forEach(e=>Ms(i,e,t))},Ms=(i,t,e)=>{let n=t.source,r=i.getNode(n).data.rank;const o=t.target,u=i.getNode(o).data.rank,v=t.data.labelRank;if(u===r+1)return;i.removeEdge(t.id);let S,C,T;for(T=0,++r;r<u;++T,++r)t.data.points=[],C={originalEdge:t,width:0,height:0,rank:r},S=Ls(i,od,C,"_d"),r===v&&(C.width=t.data.width,C.height=t.data.height,C.dummy=ms,C.labelpos=t.data.labelpos),i.addEdge({id:`e${Math.random()}`,source:n,target:S,data:{weight:t.data.weight}}),T===0&&e.push(S),n=S;i.addEdge({id:`e${Math.random()}`,source:n,target:o,data:{weight:t.data.weight}})},ld=(i,t)=>{t.forEach(e=>{let n=i.getNode(e);const{data:r}=n,o=r.originalEdge;let u;o&&i.addEdge(o);let v=e;for(;n.data.dummy;)u=i.getSuccessors(v)[0],i.removeNode(v),o.data.points.push({x:n.data.x,y:n.data.y}),n.data.dummy===ms&&(o.data.x=n.data.x,o.data.y=n.data.y,o.data.width=n.data.width,o.data.height=n.data.height),v=u.id,n=i.getNode(v)})},cd=(i,t,e)=>{const n={};let r;e==null||e.forEach(o=>{let u=i.getParent(o),v,S;for(;u;){if(v=i.getParent(u.id),v?(S=n[v.id],n[v.id]=u.id):(S=r,r=u.id),S&&S!==u.id){t.hasNode(S)||t.addNode({id:S,data:{}}),t.hasNode(u.id)||t.addNode({id:u.id,data:{}}),t.hasEdge(`e${S}-${u.id}`)||t.addEdge({id:`e${S}-${u.id}`,source:S,target:u.id,data:{}});return}u=v}})},ud=(i,t,e)=>{const n=Js(i),r=new Ua.k({tree:[{id:n,children:[],data:{}}]});return i.getAllNodes().forEach(o=>{const u=i.getParent(o.id);(o.data.rank===t||o.data.minRank<=t&&t<=o.data.maxRank)&&(r.hasNode(o.id)||r.addNode(Object.assign({},o)),u!=null&&u.id&&!r.hasNode(u==null?void 0:u.id)&&r.addNode(Object.assign({},u)),r.setParent(o.id,(u==null?void 0:u.id)||n),i.getRelatedEdges(o.id,e).forEach(v=>{const S=v.source===o.id?v.target:v.source;r.hasNode(S)||r.addNode(Object.assign({},i.getNode(S)));const C=r.getRelatedEdges(S,"out").find(({target:$})=>$===o.id),T=C!==void 0?C.data.weight:0;C?r.updateEdgeData(C.id,Object.assign(Object.assign({},C.data),{weight:v.data.weight+T})):r.addEdge({id:v.id,source:S,target:o.id,data:{weight:v.data.weight+T}})}),o.data.hasOwnProperty("minRank")&&r.updateNodeData(o.id,Object.assign(Object.assign({},o.data),{borderLeft:o.data.borderLeft[t],borderRight:o.data.borderRight[t]})))}),r},Js=i=>{let t;for(;i.hasNode(t=`_root${Math.random()}`););return t},Cs=(i,t,e)=>{const n=Ic(e,e.map((T,$)=>$)),o=t.map(T=>{const $=i.getRelatedEdges(T,"out").map(lt=>({pos:n[lt.target]||0,weight:lt.data.weight}));return $==null?void 0:$.sort((lt,gt)=>lt.pos-gt.pos)}).flat().filter(T=>T!==void 0);let u=1;for(;u<e.length;)u<<=1;const v=2*u-1;u-=1;const S=Array(v).fill(0,0,v);let C=0;return o==null||o.forEach(T=>{if(T){let $=T.pos+u;S[$]+=T.weight;let lt=0;for(;$>0;)$%2&&(lt+=S[$+1]),$=$-1>>1,S[$]+=T.weight;C+=T.weight*lt}}),C},qs=(i,t)=>{let e=0;for(let n=1;n<(t==null?void 0:t.length);n+=1)e+=Cs(i,t[n-1],t[n]);return e},rc=i=>{const t={},e=i.getAllNodes(),n=e.map(C=>{var T;return(T=C.data.rank)!==null&&T!==void 0?T:-1/0}),r=Math.max(...n),o=[];for(let C=0;C<r+1;C++)o.push([]);const u=e.sort((C,T)=>i.getNode(C.id).data.rank-i.getNode(T.id).data.rank),S=u.filter(C=>i.getNode(C.id).data.fixorder!==void 0).sort((C,T)=>i.getNode(C.id).data.fixorder-i.getNode(T.id).data.fixorder);return S==null||S.forEach(C=>{isNaN(i.getNode(C.id).data.rank)||o[i.getNode(C.id).data.rank].push(C.id),t[C.id]=!0}),u==null||u.forEach(C=>i.dfsTree(C.id,T=>{if(t.hasOwnProperty(T.id))return!0;t[T.id]=!0,isNaN(T.data.rank)||o[T.data.rank].push(T.id)})),o},Fc=(i,t)=>t.map(e=>{const n=i.getRelatedEdges(e,"in");if(!(n!=null&&n.length))return{v:e};const r={sum:0,weight:0};return n==null||n.forEach(o=>{const u=i.getNode(o.source);r.sum+=o.data.weight*u.data.order,r.weight+=o.data.weight}),{v:e,barycenter:r.sum/r.weight,weight:r.weight}}),bl=(i,t)=>{var e,n,r;const o={};i==null||i.forEach((v,S)=>{o[v.v]={i:S,indegree:0,in:[],out:[],vs:[v.v]};const C=o[v.v];v.barycenter!==void 0&&(C.barycenter=v.barycenter,C.weight=v.weight)}),(e=t.getAllEdges())===null||e===void 0||e.forEach(v=>{const S=o[v.source],C=o[v.target];S!==void 0&&C!==void 0&&(C.indegree++,S.out.push(o[v.target]))});const u=(r=(n=Object.values(o)).filter)===null||r===void 0?void 0:r.call(n,v=>!v.indegree);return dd(u)},dd=i=>{var t,e;const n=[],r=S=>C=>{C.merged||(C.barycenter===void 0||S.barycenter===void 0||C.barycenter>=S.barycenter)&&Bc(S,C)},o=S=>C=>{C.in.push(S),--C.indegree===0&&i.push(C)};for(;i!=null&&i.length;){const S=i.pop();n.push(S),(t=S.in.reverse())===null||t===void 0||t.forEach(C=>r(S)(C)),(e=S.out)===null||e===void 0||e.forEach(C=>o(S)(C))}const u=n.filter(S=>!S.merged),v=["vs","i","barycenter","weight"];return u.map(S=>{const C={};return v==null||v.forEach(T=>{S[T]!==void 0&&(C[T]=S[T])}),C})},Bc=(i,t)=>{var e;let n=0,r=0;i.weight&&(n+=i.barycenter*i.weight,r+=i.weight),t.weight&&(n+=t.barycenter*t.weight,r+=t.weight),i.vs=(e=t.vs)===null||e===void 0?void 0:e.concat(i.vs),i.barycenter=n/r,i.weight=r,i.i=Math.min(t.i,i.i),t.merged=!0};var Os=bl;const zc=(i,t,e,n)=>{const r=ml(i,lt=>{const gt=lt.hasOwnProperty("fixorder")&&!isNaN(lt.fixorder);return n?!gt&<.hasOwnProperty("barycenter"):gt||lt.hasOwnProperty("barycenter")}),o=r.lhs,u=r.rhs.sort((lt,gt)=>-lt.i- -gt.i),v=[];let S=0,C=0,T=0;o==null||o.sort(fd(!!t,!!e)),T=jc(v,u,T),o==null||o.forEach(lt=>{var gt;T+=(gt=lt.vs)===null||gt===void 0?void 0:gt.length,v.push(lt.vs),S+=lt.barycenter*lt.weight,C+=lt.weight,T=jc(v,u,T)});const $={vs:v.flat()};return C&&($.barycenter=S/C,$.weight=C),$},jc=(i,t,e)=>{let n=e,r;for(;t.length&&(r=t[t.length-1]).i<=n;)t.pop(),i==null||i.push(r.vs),n++;return n},fd=(i,t)=>(e,n)=>{if(e.fixorder!==void 0&&n.fixorder!==void 0)return e.fixorder-n.fixorder;if(e.barycenter<n.barycenter)return-1;if(e.barycenter>n.barycenter)return 1;if(t&&e.order!==void 0&&n.order!==void 0){if(e.order<n.order)return-1;if(e.order>n.order)return 1}return i?n.i-e.i:e.i-n.i},$c=(i,t,e,n,r,o)=>{var u,v,S,C;let T=i.getChildren(t).map(ze=>ze.id);const $=i.getNode(t),lt=$?$.data.borderLeft:void 0,gt=$?$.data.borderRight:void 0,Gt={};lt&&(T=T==null?void 0:T.filter(ze=>ze!==lt&&ze!==gt));const ee=Fc(i,T||[]);ee==null||ee.forEach(ze=>{var Ke;if(!((Ke=i.getChildren(ze.v))===null||Ke===void 0)&&Ke.length){const ln=$c(i,ze.v,e,n,o);Gt[ze.v]=ln,ln.hasOwnProperty("barycenter")&&vd(ze,ln)}});const ve=Os(ee,e);hd(ve,Gt),(u=ve.filter(ze=>ze.vs.length>0))===null||u===void 0||u.forEach(ze=>{const Ke=i.getNode(ze.vs[0]);Ke&&(ze.fixorder=Ke.data.fixorder,ze.order=Ke.data.order)});const ke=zc(ve,n,r,o);if(lt&&(ke.vs=[lt,ke.vs,gt].flat(),!((v=i.getPredecessors(lt))===null||v===void 0)&&v.length)){const ze=i.getNode(((S=i.getPredecessors(lt))===null||S===void 0?void 0:S[0].id)||""),Ke=i.getNode(((C=i.getPredecessors(gt))===null||C===void 0?void 0:C[0].id)||"");ke.hasOwnProperty("barycenter")||(ke.barycenter=0,ke.weight=0),ke.barycenter=(ke.barycenter*ke.weight+ze.data.order+Ke.data.order)/(ke.weight+2),ke.weight+=2}return ke},hd=(i,t)=>{i==null||i.forEach(e=>{var n;const r=(n=e.vs)===null||n===void 0?void 0:n.map(o=>t[o]?t[o].vs:o);e.vs=r.flat()})},vd=(i,t)=>{i.barycenter!==void 0?(i.barycenter=(i.barycenter*i.weight+t.barycenter*t.weight)/(i.weight+t.weight),i.weight+=t.weight):(i.barycenter=t.barycenter,i.weight=t.weight)},gd=(i,t)=>{const e=tc(i),n=[],r=[];for(let T=1;T<e+1;T++)n.push(T);for(let T=e-1;T>-1;T--)r.push(T);const o=Wc(i,n,"in"),u=Wc(i,r,"out");let v=rc(i);ic(i,v);let S=Number.POSITIVE_INFINITY,C;for(let T=0,$=0;$<4;++T,++$){Gc(T%2?o:u,T%4>=2,!1,t),v=Ks(i);const lt=qs(i,v);lt<S&&($=0,C=(0,Vt.Z)(v),S=lt)}v=rc(i),ic(i,v);for(let T=0,$=0;$<4;++T,++$){Gc(T%2?o:u,T%4>=2,!0,t),v=Ks(i);const lt=qs(i,v);lt<S&&($=0,C=(0,Vt.Z)(v),S=lt)}ic(i,C)},Wc=(i,t,e)=>t.map(n=>ud(i,n,e)),Gc=(i,t,e,n)=>{const r=new Ua.k;i==null||i.forEach(o=>{var u;const v=o.getRoots()[0].id,S=$c(o,v,r,t,e,n);for(let C=0;C<((u=S.vs)===null||u===void 0?void 0:u.length);C++){const T=o.getNode(S.vs[C]);T&&(T.data.order=C)}cd(o,r,S.vs)})},ic=(i,t)=>{t==null||t.forEach(e=>{e==null||e.forEach((n,r)=>{i.getNode(n).data.order=r})})},pd=(i,t)=>{const n=i.getAllNodes().filter(u=>{var v;return!(!((v=i.getChildren(u.id))===null||v===void 0)&&v.length)}).map(u=>u.data.rank),r=Math.max(...n),o=[];for(let u=0;u<r+1;u++)o[u]=[];t==null||t.forEach(u=>{const v=i.getNode(u);!v||v.data.dummy||isNaN(v.data.rank)||(v.data.fixorder=o[v.data.rank].length,o[v.data.rank].push(u))})},md=i=>{const t={};let e=0;const n=r=>{const o=e;i.getChildren(r).forEach(u=>n(u.id)),t[r]={low:o,lim:e++}};return i.getRoots().forEach(r=>n(r.id)),t},rr=(i,t,e,n)=>{var r,o;const u=[],v=[],S=Math.min(t[e].low,t[n].low),C=Math.max(t[e].lim,t[n].lim);let T,$;T=e;do T=(r=i.getParent(T))===null||r===void 0?void 0:r.id,u.push(T);while(T&&(t[T].low>S||C>t[T].lim));for($=T,T=n;T&&T!==$;)v.push(T),T=(o=i.getParent(T))===null||o===void 0?void 0:o.id;return{lca:$,path:u.concat(v.reverse())}},yd=(i,t)=>{const e=md(i);t.forEach(n=>{var r,o;let u=n,v=i.getNode(u);const S=v.data.originalEdge;if(!S)return;const C=rr(i,e,S.source,S.target),T=C.path,$=C.lca;let lt=0,gt=T[lt],Gt=!0;for(;u!==S.target;){if(v=i.getNode(u),Gt){for(;gt!==$&&((r=i.getNode(gt))===null||r===void 0?void 0:r.data.maxRank)<v.data.rank;)lt++,gt=T[lt];gt===$&&(Gt=!1)}if(!Gt){for(;lt<T.length-1&&((o=i.getNode(T[lt+1]))===null||o===void 0?void 0:o.data.minRank)<=v.data.rank;)lt++;gt=T[lt]}i.hasNode(gt)&&i.setParent(u,gt),u=i.getSuccessors(u)[0].id}})},Vc=(i,t)=>{const e={},n=(r,o)=>{let u=0,v=0;const S=r.length,C=o==null?void 0:o[(o==null?void 0:o.length)-1];return o==null||o.forEach((T,$)=>{var lt;const gt=Hc(i,T),Gt=gt?i.getNode(gt.id).data.order:S;(gt||T===C)&&((lt=o.slice(v,$+1))===null||lt===void 0||lt.forEach(ee=>{var ve;(ve=i.getPredecessors(ee))===null||ve===void 0||ve.forEach(ke=>{var ze;const Ke=i.getNode(ke.id),ln=Ke.data.order;(ln<u||Gt<ln)&&!(Ke.data.dummy&&(!((ze=i.getNode(ee))===null||ze===void 0)&&ze.data.dummy))&&bd(e,ke.id,ee)})}),v=$+1,u=Gt)}),o};return t!=null&&t.length&&t.reduce(n),e},Uc=(i,t)=>{const e={};function n(v,S,C,T,$){var lt,gt;let Gt;for(let ee=S;ee<C;ee++)Gt=v[ee],!((lt=i.getNode(Gt))===null||lt===void 0)&<.data.dummy&&((gt=i.getPredecessors(Gt))===null||gt===void 0||gt.forEach(ve=>{const ke=i.getNode(ve.id);ke.data.dummy&&(ke.data.order<T||ke.data.order>$)&&bd(e,ve.id,Gt)}))}function r(v){return JSON.stringify(v.slice(1))}function o(v,S){const C=r(v);S.get(C)||(n(...v),S.set(C,!0))}const u=(v,S)=>{let C=-1,T,$=0;const lt=new Map;return S==null||S.forEach((gt,Gt)=>{var ee;if(((ee=i.getNode(gt))===null||ee===void 0?void 0:ee.data.dummy)==="border"){const ve=i.getPredecessors(gt)||[];ve.length&&(T=i.getNode(ve[0].id).data.order,o([S,$,Gt,C,T],lt),$=Gt,C=T)}o([S,$,S.length,T,v.length],lt)}),S};return t!=null&&t.length&&t.reduce(u),e},Hc=(i,t)=>{var e,n;if(!((e=i.getNode(t))===null||e===void 0)&&e.data.dummy)return(n=i.getPredecessors(t))===null||n===void 0?void 0:n.find(r=>i.getNode(r.id).data.dummy)},bd=(i,t,e)=>{let n=t,r=e;if(n>r){const u=n;n=r,r=u}let o=i[n];o||(i[n]=o={}),o[r]=!0},ac=(i,t,e)=>{let n=t,r=e;if(n>r){const o=t;n=r,r=o}return!!i[n]},El=(i,t,e,n)=>{const r={},o={},u={};return t==null||t.forEach(v=>{v==null||v.forEach((S,C)=>{r[S]=S,o[S]=S,u[S]=C})}),t==null||t.forEach(v=>{let S=-1;v==null||v.forEach(C=>{let T=n(C).map($=>$.id);if(T.length){T=T.sort((lt,gt)=>u[lt]-u[gt]);const $=(T.length-1)/2;for(let lt=Math.floor($),gt=Math.ceil($);lt<=gt;++lt){const Gt=T[lt];o[C]===C&&S<u[Gt]&&!ac(e,C,Gt)&&(o[Gt]=C,o[C]=r[C]=r[Gt],S=u[Gt])}}})}),{root:r,align:o}},oc=(i,t,e,n,r,o,u)=>{var v;const S={},C=Ed(i,t,e,r,o,u),T=u?"borderLeft":"borderRight",$=(Gt,ee)=>{let ve=C.getAllNodes(),ke=ve.pop();const ze={};for(;ke;)ze[ke.id]?Gt(ke.id):(ze[ke.id]=!0,ve.push(ke),ve=ve.concat(ee(ke.id))),ke=ve.pop()},lt=Gt=>{S[Gt]=(C.getRelatedEdges(Gt,"in")||[]).reduce((ee,ve)=>Math.max(ee,(S[ve.source]||0)+ve.data.weight),0)},gt=Gt=>{const ee=(C.getRelatedEdges(Gt,"out")||[]).reduce((ke,ze)=>Math.min(ke,(S[ze.target]||0)-ze.data.weight),Number.POSITIVE_INFINITY),ve=i.getNode(Gt);ee!==Number.POSITIVE_INFINITY&&ve.data.borderType!==T&&(S[Gt]=Math.max(S[Gt],ee))};return $(lt,C.getPredecessors.bind(C)),$(gt,C.getSuccessors.bind(C)),(v=Object.values(n))===null||v===void 0||v.forEach(Gt=>{S[Gt]=S[e[Gt]]}),S},Ed=(i,t,e,n,r,o)=>{const u=new Ua.k,v=xd(n,r,o);return t==null||t.forEach(S=>{let C;S==null||S.forEach(T=>{const $=e[T];if(u.hasNode($)||u.addNode({id:$,data:{}}),C){const lt=e[C],gt=u.getRelatedEdges(lt,"out").find(Gt=>Gt.target===$);gt?u.updateEdgeData(gt.id,Object.assign(Object.assign({},gt.data),{weight:Math.max(v(i,T,C),gt.data.weight||0)})):u.addEdge({id:`e${Math.random()}`,source:lt,target:$,data:{weight:Math.max(v(i,T,C),0)}})}C=T})}),u},sa=(i,t)=>Qs(Object.values(t),e=>{var n;let r=Number.NEGATIVE_INFINITY,o=Number.POSITIVE_INFINITY;return(n=Object.keys(e))===null||n===void 0||n.forEach(u=>{const v=e[u],S=pa(i,u)/2;r=Math.max(v+S,r),o=Math.min(v-S,o)}),r-o});function Yc(i,t){const e=Object.values(t),n=Math.min(...e),r=Math.max(...e);["u","d"].forEach(o=>{["l","r"].forEach(u=>{const v=o+u,S=i[v];let C;if(S===t)return;const T=Object.values(S);C=u==="l"?n-Math.min(...T):r-Math.max(...T),C&&(i[v]={},Object.keys(S).forEach($=>{i[v][$]=S[$]+C}))})})}const Wo=(i,t)=>{const e={};return Object.keys(i.ul).forEach(n=>{if(t)e[n]=i[t.toLowerCase()][n];else{const r=Object.values(i).map(o=>o[n]);e[n]=(r[0]+r[1])/2}}),e},xl=(i,t)=>{const{align:e,nodesep:n=0,edgesep:r=0}=t||{},o=buildLayerMatrix(i),u=Object.assign(Vc(i,o),Uc(i,o)),v={};let S;["u","d"].forEach(T=>{S=T==="u"?o:Object.values(o).reverse(),["l","r"].forEach($=>{$==="r"&&(S=S.map(ee=>Object.values(ee).reverse()));const lt=(T==="u"?i.getPredecessors:i.getSuccessors).bind(i),gt=El(i,S,u,lt),Gt=oc(i,S,gt.root,gt.align,n,r,$==="r");$==="r"&&Object.keys(Gt).forEach(ee=>{Gt[ee]=-Gt[ee]}),v[T+$]=Gt})});const C=sa(i,v);return Yc(v,C),Wo(v,e)},xd=(i,t,e)=>(n,r,o)=>{const u=n.getNode(r),v=n.getNode(o);let S=0,C=0;if(S+=u.data.width/2,u.data.hasOwnProperty("labelpos"))switch((u.data.labelpos||"").toLowerCase()){case"l":C=-u.data.width/2;break;case"r":C=u.data.width/2;break}if(C&&(S+=e?C:-C),C=0,S+=(u.data.dummy?t:i)/2,S+=(v.data.dummy?t:i)/2,S+=v.data.width/2,v.data.labelpos)switch((v.data.labelpos||"").toLowerCase()){case"l":C=v.data.width/2;break;case"r":C=-v.data.width/2;break}return C&&(S+=e?C:-C),C=0,S},pa=(i,t)=>i.getNode(t).data.width||0,sc=(i,t)=>{const{ranksep:e=0}=t||{},n=Ks(i);let r=0;n==null||n.forEach(o=>{const u=o.map(S=>i.getNode(S).data.height),v=Math.max(...u,0);o==null||o.forEach(S=>{i.getNode(S).data.y=r+v/2}),r+=v+e})},wd=(i,t)=>{const{align:e,nodesep:n=0,edgesep:r=0}=t||{},o=Ks(i),u=Object.assign(Vc(i,o),Uc(i,o)),v={};let S=[];["u","d"].forEach(T=>{S=T==="u"?o:Object.values(o).reverse(),["l","r"].forEach($=>{$==="r"&&(S=S.map(ee=>Object.values(ee).reverse()));const lt=(T==="u"?i.getPredecessors:i.getSuccessors).bind(i),gt=El(i,S,u,lt),Gt=oc(i,S,gt.root,gt.align,n,r,$==="r");$==="r"&&Object.keys(Gt).forEach(ee=>Gt[ee]=-Gt[ee]),v[T+$]=Gt})});const C=sa(i,v);return C&&Yc(v,C),Wo(v,e)},Kc=(i,t)=>{var e;const n=Rc(i);sc(n,t);const r=wd(n,t);(e=Object.keys(r))===null||e===void 0||e.forEach(o=>{n.getNode(o).data.x=r[o]})},wl=i=>{const t={},e=n=>{var r;const o=i.getNode(n);if(!o)return 0;if(t[n])return o.data.rank;t[n]=!0;let u;return(r=i.getRelatedEdges(n,"out"))===null||r===void 0||r.forEach(v=>{const S=e(v.target),C=v.data.minlen,T=S-C;T&&(u===void 0||T<u)&&(u=T)}),u||(u=0),o.data.rank=u,u};i.getAllNodes().filter(n=>i.getRelatedEdges(n.id,"in").length===0).forEach(n=>e(n.id))},Sd=i=>{const t={};let e;const n=u=>{var v;const S=i.getNode(u);if(!S)return 0;if(t[u])return S.data.rank;t[u]=!0;let C;return(v=i.getRelatedEdges(u,"out"))===null||v===void 0||v.forEach(T=>{const $=n(T.target),lt=T.data.minlen,gt=$-lt;gt&&(C===void 0||gt<C)&&(C=gt)}),C||(C=0),(e===void 0||C<e)&&(e=C),S.data.rank=C,C};i.getAllNodes().filter(u=>i.getRelatedEdges(u.id,"in").length===0).forEach(u=>{u&&n(u.id)}),e===void 0&&(e=0);const r={},o=(u,v)=>{var S;const C=i.getNode(u),T=isNaN(C.data.layer)?v:C.data.layer;(C.data.rank===void 0||C.data.rank<T)&&(C.data.rank=T),!r[u]&&(r[u]=!0,(S=i.getRelatedEdges(u,"out"))===null||S===void 0||S.forEach($=>{o($.target,T+$.data.minlen)}))};i.getAllNodes().forEach(u=>{const v=u.data;v&&(isNaN(v.layer)?v.rank-=e:o(u.id,v.layer))})},Bo=(i,t)=>i.getNode(t.target).data.rank-i.getNode(t.source).data.rank-t.data.minlen,Md=i=>{const t=new Ua.k({tree:[]}),e=i.getAllNodes()[0],n=i.getAllNodes().length;t.addNode(e);let r,o;for(;lc(t,i)<n;)r=Sl(t,i),o=t.hasNode(r.source)?Bo(i,r):-Bo(i,r),Xc(t,i,o);return t},lc=(i,t)=>{const e=n=>{t.getRelatedEdges(n,"both").forEach(r=>{const o=r.source,u=n===o?r.target:o;!i.hasNode(u)&&!Bo(t,r)&&(i.addNode({id:u,data:{}}),i.addEdge({id:r.id,source:n,target:u,data:{}}),e(u))})};return i.getAllNodes().forEach(n=>e(n.id)),i.getAllNodes().length},cc=i=>{const t=new Ua.k({tree:[]}),e=i.getAllNodes()[0],n=i.getAllNodes().length;t.addNode(e);let r,o;for(;Cd(t,i)<n;)r=Sl(t,i),o=t.hasNode(r.source)?Bo(i,r):-Bo(i,r),Xc(t,i,o);return t},Cd=(i,t)=>{const e=n=>{var r;(r=t.getRelatedEdges(n,"both"))===null||r===void 0||r.forEach(o=>{const u=o.source,v=n===u?o.target:u;!i.hasNode(v)&&(t.getNode(v).data.layer!==void 0||!Bo(t,o))&&(i.addNode({id:v,data:{}}),i.addEdge({id:o.id,source:n,target:v,data:{}}),e(v))})};return i.getAllNodes().forEach(n=>e(n.id)),i.getAllNodes().length},Sl=(i,t)=>Qs(t.getAllEdges(),e=>i.hasNode(e.source)!==i.hasNode(e.target)?Bo(t,e):1/0),Xc=(i,t,e)=>{i.getAllNodes().forEach(n=>{const r=t.getNode(n.id);r.data.rank||(r.data.rank=0),r.data.rank+=e})},uc=i=>{const t=qu(i);wl(t);const e=Md(t);Ml(e),Qc(e,t);let n,r;for(;n=Td(e);)r=Ol(e,t,n),Pd(e,t,n,r)},Qc=(i,t)=>{let e=ec(i,i.getAllNodes(),"post",!1);e=e.slice(0,(e==null?void 0:e.length)-1),e.forEach(n=>{tl(i,t,n)})},tl=(i,t,e)=>{const r=i.getNode(e).data.parent,o=i.getRelatedEdges(e,"both").find(u=>u.target===r||u.source===r);o.data.cutvalue=Od(i,t,e)},Od=(i,t,e)=>{const r=i.getNode(e).data.parent;let o=!0,u=t.getRelatedEdges(e,"out").find(S=>S.target===r),v=0;return u||(o=!1,u=t.getRelatedEdges(r,"out").find(S=>S.target===e)),v=u.data.weight,t.getRelatedEdges(e,"both").forEach(S=>{const C=S.source===e,T=C?S.target:S.source;if(T!==r){const $=C===o,lt=S.data.weight;if(v+=$?lt:-lt,Jc(i,e,T)){const gt=i.getRelatedEdges(e,"both").find(Gt=>Gt.source===T||Gt.target===T).data.cutvalue;v+=$?-gt:gt}}}),v},Ml=(i,t=i.getAllNodes()[0].id)=>{Cl(i,{},1,t)},Cl=(i,t,e,n,r)=>{var o;const u=e;let v=e;const S=i.getNode(n);return t[n]=!0,(o=i.getNeighbors(n))===null||o===void 0||o.forEach(C=>{t[C.id]||(v=Cl(i,t,v,C.id,n))}),S.data.low=u,S.data.lim=v++,r?S.data.parent=r:delete S.data.parent,v},Td=i=>i.getAllEdges().find(t=>t.data.cutvalue<0),Ol=(i,t,e)=>{let n=e.source,r=e.target;t.getRelatedEdges(n,"out").find(T=>T.target===r)||(n=e.target,r=e.source);const o=i.getNode(n),u=i.getNode(r);let v=o,S=!1;o.data.lim>u.data.lim&&(v=u,S=!0);const C=t.getAllEdges().filter(T=>S===dc(i.getNode(T.source),v)&&S!==dc(i.getNode(T.target),v));return Qs(C,T=>Bo(t,T))},Pd=(i,t,e,n)=>{const r=i.getRelatedEdges(e.source,"both").find(o=>o.source===e.target||o.target===e.target);r&&i.removeEdge(r.id),i.addEdge({id:`e${Math.random()}`,source:n.source,target:n.target,data:{}}),Ml(i),Qc(i,t),af(i,t)},af=(i,t)=>{const e=i.getAllNodes().find(r=>!r.data.parent);let n=ec(i,e,"pre",!1);n=n.slice(1),n.forEach(r=>{const o=i.getNode(r).data.parent;let u=t.getRelatedEdges(r,"out").find(S=>S.target===o),v=!1;!u&&t.hasNode(o)&&(u=t.getRelatedEdges(o,"out").find(S=>S.target===r),v=!0),t.getNode(r).data.rank=(t.hasNode(o)&&t.getNode(o).data.rank||0)+(v?u==null?void 0:u.data.minlen:-(u==null?void 0:u.data.minlen))})},Jc=(i,t,e)=>i.getRelatedEdges(t,"both").find(n=>n.source===e||n.target===e),dc=(i,t)=>t.data.low<=i.data.lim&&i.data.lim<=t.data.lim,qc=(i,t)=>{switch(t){case"network-simplex":eu(i);break;case"tight-tree":tu(i);break;case"longest-path":Ad(i);break;default:tu(i)}},Ad=wl,tu=i=>{Sd(i),cc(i)},eu=i=>{uc(i)},of=(i,t)=>{const{edgeLabelSpace:e,keepNodeOrder:n,prevGraph:r,rankdir:o,ranksep:u}=t;!n&&r&&nu(i,r);const v=hc(i);e&&(t.ranksep=Id(v,{rankdir:o,ranksep:u}));let S;try{S=Xo(v,t)}catch(C){if(C.message==="Not possible to find intersection inside of the rectangle"){console.error(`The following error may be caused by improper layer setting, please make sure your manual layer setting does not violate the graph's structure:
|
|
|
`,C);return}throw C}return Nd(i,v),S},Xo=(i,t)=>{const{acyclicer:e,ranker:n,rankdir:r="tb",nodeOrder:o,keepNodeOrder:u,align:v,nodesep:S=50,edgesep:C=20,ranksep:T=50}=t;st(i),Nc(i,e);const{nestingRoot:$,nodeRankFactor:lt}=rd(i);qc(Rc(i),n),h(i),rf(i,lt),ad(i,$),td(i),p(i),a(i);const gt=[];sd(i,gt),yd(i,gt),wa(i),u&&pd(i,o),gd(i,u),Lt(i),ed(i,r),Kc(i,{align:v,nodesep:S,edgesep:C,ranksep:T}),he(i),V(i),ld(i,gt),D(i),kc(i,r);const{width:Gt,height:ee}=s(i);return m(i),L(i),Qu(i),{width:Gt,height:ee}},nu=(i,t)=>{i.getAllNodes().forEach(e=>{const n=i.getNode(e.id);if(t.hasNode(e.id)){const r=t.getNode(e.id);n.data.fixorder=r.data._order,delete r.data._order}else delete n.data.fixorder})},Nd=(i,t)=>{i.getAllNodes().forEach(e=>{var n;const r=i.getNode(e.id);if(r){const o=t.getNode(e.id);r.data.x=o.data.x,r.data.y=o.data.y,r.data._order=o.data.order,r.data._rank=o.data.rank,!((n=t.getChildren(e.id))===null||n===void 0)&&n.length&&(r.data.width=o.data.width,r.data.height=o.data.height)}}),i.getAllEdges().forEach(e=>{const n=i.getEdge(e.id),r=t.getEdge(e.id);n.data.points=r?r.data.points:[],r&&r.data.hasOwnProperty("x")&&(n.data.x=r.data.x,n.data.y=r.data.y)})},Rd=["width","height","layer","fixorder"],Tl={width:0,height:0},Pl=["minlen","weight","width","height","labeloffset"],fc={minlen:1,weight:1,width:0,height:0,labeloffset:10,labelpos:"r"},Al=["labelpos"],hc=i=>{const t=new Ua.k({tree:[]});return i.getAllNodes().forEach(e=>{const n=je(i.getNode(e.id).data),r=Object.assign(Object.assign({},Tl),n),o=Te(r,Rd);t.hasNode(e.id)||t.addNode({id:e.id,data:Object.assign({},o)});const u=i.hasTreeStructure("combo")?i.getParent(e.id,"combo"):i.getParent(e.id);(0,Nt.Z)(u)||(t.hasNode(u.id)||t.addNode(Object.assign({},u)),t.setParent(e.id,u.id))}),i.getAllEdges().forEach(e=>{const n=je(i.getEdge(e.id).data),r={};Al==null||Al.forEach(o=>{n[o]!==void 0&&(r[o]=n[o])}),t.addEdge({id:e.id,source:e.source,target:e.target,data:Object.assign({},fc,Te(n,Pl),r)})}),t},Id=(i,t)=>{const{ranksep:e=0,rankdir:n}=t;return i.getAllNodes().forEach(r=>{isNaN(r.data.layer)||r.data.layer||(r.data.layer=0)}),i.getAllEdges().forEach(r=>{var o;r.data.minlen*=2,((o=r.data.labelpos)===null||o===void 0?void 0:o.toLowerCase())!=="c"&&(n==="TB"||n==="BT"?r.data.width+=r.data.labeloffset:r.data.height+=r.data.labeloffset)}),e/2},h=i=>{i.getAllEdges().forEach(t=>{if(t.data.width&&t.data.height){const e=i.getNode(t.source),n=i.getNode(t.target),r={e:t,rank:(n.data.rank-e.data.rank)/2+e.data.rank};Ls(i,"edge-proxy",r,"_ep")}})},p=i=>{let t=0;return i.getAllNodes().forEach(e=>{var n,r;e.data.borderTop&&(e.data.minRank=(n=i.getNode(e.data.borderTop))===null||n===void 0?void 0:n.data.rank,e.data.maxRank=(r=i.getNode(e.data.borderBottom))===null||r===void 0?void 0:r.data.rank,t=Math.max(t,e.data.maxRank||-1/0))}),t},a=i=>{i.getAllNodes().forEach(t=>{t.data.dummy==="edge-proxy"&&(i.getEdge(t.data.e.id).data.labelRank=t.data.rank,i.removeNode(t.id))})},s=(i,t)=>{let e,n=0,r,o=0;const{marginx:u=0,marginy:v=0}=t||{},S=C=>{if(!C.data)return;const T=C.data.x,$=C.data.y,lt=C.data.width,gt=C.data.height;!isNaN(T)&&!isNaN(lt)&&(e===void 0&&(e=T-lt/2),e=Math.min(e,T-lt/2),n=Math.max(n,T+lt/2)),!isNaN($)&&!isNaN(gt)&&(r===void 0&&(r=$-gt/2),r=Math.min(r,$-gt/2),o=Math.max(o,$+gt/2))};return i.getAllNodes().forEach(C=>{S(C)}),i.getAllEdges().forEach(C=>{C!=null&&C.data.hasOwnProperty("x")&&S(C)}),e-=u,r-=v,i.getAllNodes().forEach(C=>{C.data.x-=e,C.data.y-=r}),i.getAllEdges().forEach(C=>{var T;(T=C.data.points)===null||T===void 0||T.forEach($=>{$.x-=e,$.y-=r}),C.data.hasOwnProperty("x")&&(C.data.x-=e),C.data.hasOwnProperty("y")&&(C.data.y-=r)}),{width:n-e+u,height:o-r+v}},m=i=>{i.getAllEdges().forEach(t=>{const e=i.getNode(t.source),n=i.getNode(t.target);let r,o;t.data.points?(r=t.data.points[0],o=t.data.points[t.data.points.length-1]):(t.data.points=[],r={x:n.data.x,y:n.data.y},o={x:e.data.x,y:e.data.y}),t.data.points.unshift(Dc(e.data,r)),t.data.points.push(Dc(n.data,o))})},D=i=>{i.getAllEdges().forEach(t=>{if(t.data.hasOwnProperty("x"))switch((t.data.labelpos==="l"||t.data.labelpos==="r")&&(t.data.width-=t.data.labeloffset),t.data.labelpos){case"l":t.data.x-=t.data.width/2+t.data.labeloffset;break;case"r":t.data.x+=t.data.width/2+t.data.labeloffset;break}})},L=i=>{i.getAllEdges().forEach(t=>{var e;t.data.reversed&&((e=t.data.points)===null||e===void 0||e.reverse())})},V=i=>{i.getAllNodes().forEach(t=>{var e,n,r;if(!((e=i.getChildren(t.id))===null||e===void 0)&&e.length){const o=i.getNode(t.id),u=i.getNode(o.data.borderTop),v=i.getNode(o.data.borderBottom),S=i.getNode(o.data.borderLeft[((n=o.data.borderLeft)===null||n===void 0?void 0:n.length)-1]),C=i.getNode(o.data.borderRight[((r=o.data.borderRight)===null||r===void 0?void 0:r.length)-1]);o.data.width=Math.abs((C==null?void 0:C.data.x)-(S==null?void 0:S.data.x))||10,o.data.height=Math.abs((v==null?void 0:v.data.y)-(u==null?void 0:u.data.y))||10,o.data.x=((S==null?void 0:S.data.x)||0)+o.data.width/2,o.data.y=((u==null?void 0:u.data.y)||0)+o.data.height/2}}),i.getAllNodes().forEach(t=>{t.data.dummy==="border"&&i.removeNode(t.id)})},st=i=>{i.getAllEdges().forEach(t=>{if(t.source===t.target){const e=i.getNode(t.source);e.data.selfEdges||(e.data.selfEdges=[]),e.data.selfEdges.push(t),i.removeEdge(t.id)}})},Lt=i=>{const t=Ks(i);t==null||t.forEach(e=>{let n=0;e==null||e.forEach((r,o)=>{var u;const v=i.getNode(r);v.data.order=o+n,(u=v.data.selfEdges)===null||u===void 0||u.forEach(S=>{Ls(i,"selfedge",{width:S.data.width,height:S.data.height,rank:v.data.rank,order:o+ ++n,e:S},"_se")}),delete v.data.selfEdges})})},he=i=>{i.getAllNodes().forEach(t=>{const e=i.getNode(t.id);if(e.data.dummy==="selfedge"){const n=i.getNode(e.data.e.source),r=n.data.x+n.data.width/2,o=n.data.y,u=e.data.x-r,v=n.data.height/2;i.hasEdge(e.data.e.id)?i.updateEdgeData(e.data.e.id,e.data.e.data):i.addEdge({id:e.data.e.id,source:e.data.e.source,target:e.data.e.target,data:e.data.e.data}),i.removeNode(t.id),e.data.e.data.points=[{x:r+2*u/3,y:o-v},{x:r+5*u/6,y:o-v},{y:o,x:r+u},{x:r+5*u/6,y:o+v},{x:r+2*u/3,y:o+v}],e.data.e.data.x=e.data.x,e.data.e.data.y=e.data.y}})},Te=(i,t)=>{const e={};return t==null||t.forEach(n=>{i[n]!==void 0&&(e[n]=+i[n])}),e},je=(i={})=>{const t={};return Object.keys(i).forEach(e=>{t[e.toLowerCase()]=i[e]}),t};function qe(i,t){let e;return(0,At.Z)(t)?e=t:(0,Fr.Z)(t)?e=()=>t:e=()=>i,e}function tn(i,t,e=!0){return!t&&t!==0?n=>{const{size:r}=n.data||{};return r?Array.isArray(r)?r[0]>r[1]?r[0]:r[1]:(0,Xt.Z)(r)?r.width>r.height?r.width:r.height:r:i}:(0,At.Z)(t)?t:(0,Fr.Z)(t)?()=>t:Array.isArray(t)?()=>{if(e){const n=Math.max(...t);return isNaN(n)?i:n}return t}:(0,Xt.Z)(t)?()=>{if(e){const n=Math.max(t.width,t.height);return isNaN(n)?i:n}return[t.width,t.height]}:()=>i}const fn=(i,t)=>{let e,n;return(0,Fr.Z)(t)?n=()=>t:(0,At.Z)(t)?n=t:n=()=>0,i?Array.isArray(i)?e=r=>(i[0]>i[1]?i[0]:i[1])+n(r):(0,At.Z)(i)?e=i:e=r=>i+n(r):e=r=>{var o,u;if(!((o=r.data)===null||o===void 0)&&o.bboxSize)return Math.max(r.data.bboxSize[0],r.data.bboxSize[1])+n(r);if(!((u=r.data)===null||u===void 0)&&u.size){if(Array.isArray(r.data.size))return Math.max(r.data.size[0],r.data.size[1])+n(r);const v=r.data.size;return(0,Xt.Z)(v)?(v.width>v.height?v.width:v.height)+n(r):v+n(r)}return 10+n(r)},e},gn=i=>{if(i===null)return i;if(i instanceof Date)return new Date(i.getTime());if(i instanceof Array){const t=[];return i.forEach(e=>{t.push(e)}),t.map(e=>gn(e))}if(typeof i=="object"){const t={};return Object.keys(i).forEach(e=>{t[e]=gn(i[e])}),t}return i},yn=(i,t)=>{const e=gn(i);return e.data=e.data||{},t&&((0,Fr.Z)(e.data.x)||(e.data.x=Math.random()*t[0]),(0,Fr.Z)(e.data.y)||(e.data.y=Math.random()*t[1])),e},pn={rankdir:"TB",nodesep:50,ranksep:50,edgeLabelSpace:!0,ranker:"tight-tree",controlPoints:!1,radial:!1,focusNode:null};class Rn{constructor(t={}){this.options=t,this.id="antv-dagre",this.options=Object.assign(Object.assign({},pn),t)}execute(t,e){return(0,ui.mG)(this,void 0,void 0,function*(){return this.genericDagreLayout(!1,t,e)})}assign(t,e){return(0,ui.mG)(this,void 0,void 0,function*(){yield this.genericDagreLayout(!0,t,e)})}genericDagreLayout(t,e,n){return(0,ui.mG)(this,void 0,void 0,function*(){const r=Object.assign(Object.assign({},this.options),n),{nodeSize:o,align:u,rankdir:v="TB",ranksep:S,nodesep:C,ranksepFunc:T,nodesepFunc:$,edgeLabelSpace:lt,ranker:gt,nodeOrder:Gt,begin:ee,controlPoints:ve,radial:ke,sortByCombo:ze,preset:Ke}=r,ln=new Ua.k({tree:[]}),kn=qe(S||50,T),Tn=qe(C||50,$);let In=Tn,hn=kn;(v==="LR"||v==="RL")&&(In=kn,hn=Tn);const or=fn(o,void 0),yr=e.getAllNodes(),Vn=e.getAllEdges();yr.forEach(ir=>{const Hr=or(ir),Oi=hn(ir),Li=In(ir),ua=Hr+2*Li,_a=Hr+2*Oi,Fi=ir.data.layer;(0,Fr.Z)(Fi)?ln.addNode({id:ir.id,data:{width:ua,height:_a,layer:Fi}}):ln.addNode({id:ir.id,data:{width:ua,height:_a}})}),ze&&(ln.attachTreeStructure("combo"),yr.forEach(ir=>{const{parentId:Hr}=ir.data;Hr!==void 0&&ln.hasNode(Hr)&&ln.setParent(ir.id,Hr,"combo")})),Vn.forEach(ir=>{ln.addEdge({id:ir.id,source:ir.source,target:ir.target,data:{weight:ir.data.weight||1}})});let Dr;Ke!=null&&Ke.length&&(Dr=new Ua.k({nodes:Ke})),of(ln,{prevGraph:Dr,edgeLabelSpace:lt,keepNodeOrder:!!Gt,nodeOrder:Gt||[],acyclicer:"greedy",ranker:gt,rankdir:v,nodesep:C,align:u});const pr=[0,0];if(ee){let ir=1/0,Hr=1/0;ln.getAllNodes().forEach(Oi=>{ir>Oi.data.x&&(ir=Oi.data.x),Hr>Oi.data.y&&(Hr=Oi.data.y)}),ln.getAllEdges().forEach(Oi=>{var Li;(Li=Oi.data.points)===null||Li===void 0||Li.forEach(ua=>{ir>ua.x&&(ir=ua.x),Hr>ua.y&&(Hr=ua.y)})}),pr[0]=ee[0]-ir,pr[1]=ee[1]-Hr}const Sr=v==="LR"||v==="RL";if(!ke){const ir=new Set,Oi=v==="BT"||v==="RL"?(Fi,Sa)=>Sa-Fi:(Fi,Sa)=>Fi-Sa;ln.getAllNodes().forEach(Fi=>{Fi.data.x=Fi.data.x+pr[0],Fi.data.y=Fi.data.y+pr[1],ir.add(Sr?Fi.data.x:Fi.data.y)});const Li=Array.from(ir).sort(Oi),ua=Sr?(Fi,Sa)=>Fi.x!==Sa.x:(Fi,Sa)=>Fi.y!==Sa.y,_a=Sr?(Fi,Sa,Za)=>{const Ma=Math.max(Sa.y,Za.y),zo=Math.min(Sa.y,Za.y);return Fi.filter(ki=>ki.y<=Ma&&ki.y>=zo)}:(Fi,Sa,Za)=>{const Ma=Math.max(Sa.x,Za.x),zo=Math.min(Sa.x,Za.x);return Fi.filter(ki=>ki.x<=Ma&&ki.x>=zo)};ln.getAllEdges().forEach((Fi,Sa)=>{var Za;lt&&ve&&Fi.data.type!=="loop"&&(Fi.data.controlPoints=Qn((Za=Fi.data.points)===null||Za===void 0?void 0:Za.map(({x:Ma,y:zo})=>({x:Ma+pr[0],y:zo+pr[1]})),ln.getNode(Fi.source),ln.getNode(Fi.target),Li,Sr,ua,_a))})}let dr=[];dr=ln.getAllNodes().map(ir=>yn(ir));const Ir=ln.getAllEdges();return t&&(dr.forEach(ir=>{e.mergeNodeData(ir.id,{x:ir.data.x,y:ir.data.y})}),Ir.forEach(ir=>{e.mergeEdgeData(ir.id,{controlPoints:ir.data.controlPoints})})),{nodes:dr,edges:Ir}})}}const Qn=(i,t,e,n,r,o,u)=>{let v=(i==null?void 0:i.slice(1,i.length-1))||[];if(t&&e){let{x:S,y:C}=t.data,{x:T,y:$}=e.data;if(r&&(S=t.data.y,C=t.data.x,T=e.data.y,$=e.data.x),$!==C&&S!==T){const lt=n.indexOf(C),gt=n[lt+1];if(gt){const ve=v[0],ke=r?{x:(C+gt)/2,y:(ve==null?void 0:ve.y)||T}:{x:(ve==null?void 0:ve.x)||T,y:(C+gt)/2};(!ve||o(ve,ke))&&v.unshift(ke)}const Gt=n.indexOf($),ee=Math.abs(Gt-lt);if(ee===1)v=u(v,t.data,e.data),v.length||v.push(r?{x:(C+$)/2,y:S}:{x:S,y:(C+$)/2});else if(ee>1){const ve=n[Gt-1];if(ve){const ke=v[v.length-1],ze=r?{x:($+ve)/2,y:(ke==null?void 0:ke.y)||T}:{x:(ke==null?void 0:ke.x)||S,y:($+ve)/2};(!ke||o(ke,ze))&&v.push(ze)}}}}return v},vr=(i,t,e)=>{const n=i.getAllNodes(),r=i.getAllEdges();if(!(n!=null&&n.length))return{nodes:[],edges:r};if(n.length===1)return t&&i.mergeNodeData(n[0].id,{x:e[0],y:e[1]}),{nodes:[Object.assign(Object.assign({},n[0]),{data:Object.assign(Object.assign({},n[0].data),{x:e[0],y:e[1]})})],edges:r}},wr={radius:null,startRadius:null,endRadius:null,startAngle:0,endAngle:2*Math.PI,clockwise:!0,divisions:1,ordering:null,angleRatio:1};class Pr{constructor(t={}){this.options=t,this.id="circular",this.options=Object.assign(Object.assign({},wr),t)}execute(t,e){return(0,ui.mG)(this,void 0,void 0,function*(){return this.genericCircularLayout(!1,t,e)})}assign(t,e){return(0,ui.mG)(this,void 0,void 0,function*(){yield this.genericCircularLayout(!0,t,e)})}genericCircularLayout(t,e,n){return(0,ui.mG)(this,void 0,void 0,function*(){const r=Object.assign(Object.assign({},this.options),n),{width:o,height:u,center:v,divisions:S,startAngle:C=0,endAngle:T=2*Math.PI,angleRatio:$,ordering:lt,clockwise:gt,nodeSpacing:Gt,nodeSize:ee}=r,ve=e.getAllNodes(),ke=e.getAllEdges(),[ze,Ke,ln]=_r(o,u,v),kn=ve==null?void 0:ve.length;if(!kn||kn===1)return vr(e,t,ln);const Tn=(T-C)/kn;let{radius:In,startRadius:hn,endRadius:or}=r;if(Gt){const Sr=qe(10,Gt),dr=tn(10,ee);let Ir=-1/0;ve.forEach(ir=>{const Hr=dr(ir);Ir<Hr&&(Ir=Hr)});let Yi=0;ve.forEach((ir,Hr)=>{Hr===0?Yi+=Ir||10:Yi+=(Sr(ir)||0)+(Ir||10)}),In=Yi/(2*Math.PI)}else!In&&!hn&&!or?In=Math.min(Ke,ze)/2:!hn&&or?hn=or:hn&&!or&&(or=hn);const yr=Tn*$;let Vn=[];lt==="topology"?Vn=Ur(e,ve):lt==="topology-directed"?Vn=Ur(e,ve,!0):lt==="degree"?Vn=Gr(e,ve):Vn=ve.map(Sr=>yn(Sr));const Dr=Math.ceil(kn/S);for(let Sr=0;Sr<kn;++Sr){let dr=In;!dr&&hn!==null&&or!==null&&(dr=hn+Sr*(or-hn)/(kn-1)),dr||(dr=10+Sr*100/(kn-1));let Ir=C+Sr%Dr*yr+2*Math.PI/S*Math.floor(Sr/Dr);gt||(Ir=T-Sr%Dr*yr-2*Math.PI/S*Math.floor(Sr/Dr)),Vn[Sr].data.x=ln[0]+Math.cos(Ir)*dr,Vn[Sr].data.y=ln[1]+Math.sin(Ir)*dr}return t&&Vn.forEach(Sr=>{e.mergeNodeData(Sr.id,{x:Sr.data.x,y:Sr.data.y})}),{nodes:Vn,edges:ke}})}}const Ur=(i,t,e=!1)=>{const n=[yn(t[0])],r={},o=t.length;r[t[0].id]=!0;let u=0;return t.forEach((v,S)=>{if(S!==0)if((S===o-1||i.getDegree(v.id,"both")!==i.getDegree(t[S+1].id,"both")||i.areNeighbors(n[u].id,v.id))&&!r[v.id])n.push(yn(v)),r[v.id]=!0,u++;else{const C=e?i.getSuccessors(n[u].id):i.getNeighbors(n[u].id);let T=!1;for(let lt=0;lt<C.length;lt++){const gt=C[lt];if(i.getDegree(gt.id)===i.getDegree(v.id)&&!r[gt.id]){n.push(yn(gt)),r[gt.id]=!0,T=!0;break}}let $=0;for(;!T&&(r[t[$].id]||(n.push(yn(t[$])),r[t[$].id]=!0,T=!0),$++,$!==o););}}),n};function Gr(i,t){const e=[];return t.forEach((n,r)=>{e.push(yn(n))}),e.sort((n,r)=>i.getDegree(n.id,"both")-i.getDegree(r.id,"both")),e}const _r=(i,t,e)=>{let n=i,r=t,o=e;return!n&&typeof window!="undefined"&&(n=window.innerWidth),!r&&typeof window!="undefined"&&(r=window.innerHeight),o||(o=[n/2,r/2]),[n,r,o]},Ar=Array.isArray,jr={nodeSize:30,nodeSpacing:10,preventOverlap:!1,sweep:void 0,equidistant:!1,startAngle:3/2*Math.PI,clockwise:!0,maxLevelDiff:void 0,sortBy:"degree"};class oi{constructor(t={}){this.options=t,this.id="concentric",this.options=Object.assign(Object.assign({},jr),t)}execute(t,e){return(0,ui.mG)(this,void 0,void 0,function*(){return this.genericConcentricLayout(!1,t,e)})}assign(t,e){return(0,ui.mG)(this,void 0,void 0,function*(){yield this.genericConcentricLayout(!0,t,e)})}genericConcentricLayout(t,e,n){return(0,ui.mG)(this,void 0,void 0,function*(){const r=Object.assign(Object.assign({},this.options),n),{center:o,width:u,height:v,sortBy:S,maxLevelDiff:C,sweep:T,clockwise:$,equidistant:lt,preventOverlap:gt,startAngle:Gt=3/2*Math.PI,nodeSize:ee,nodeSpacing:ve}=r,ke=e.getAllNodes(),ze=e.getAllEdges(),Ke=!u&&typeof window!="undefined"?window.innerWidth:u,ln=!v&&typeof window!="undefined"?window.innerHeight:v,kn=o||[Ke/2,ln/2];if(!(ke!=null&&ke.length)||ke.length===1)return vr(e,t,kn);const Tn=[];let In,hn=0;Ar(ee)?In=Math.max(ee[0],ee[1]):(0,At.Z)(ee)?(In=-1/0,ke.forEach(ir=>{const Hr=ee(ir);Hr>In&&(In=Hr)})):In=ee,Ar(ve)?hn=Math.max(ve[0],ve[1]):(0,Fr.Z)(ve)&&(hn=ve),ke.forEach(ir=>{const Hr=yn(ir);Tn.push(Hr);let Oi=In;const{data:Li}=Hr;Ar(Li.size)?Oi=Math.max(Li.size[0],Li.size[1]):(0,Fr.Z)(Li.size)?Oi=Li.size:(0,Xt.Z)(Li.size)&&(Oi=Math.max(Li.size.width,Li.size.height)),In=Math.max(In,Oi),(0,At.Z)(ve)&&(hn=Math.max(ve(ir),hn))});const or={};Tn.forEach((ir,Hr)=>{or[ir.id]=Hr});let yr=S;(!(0,ea.Z)(yr)||Tn[0].data[yr]===void 0)&&(yr="degree"),yr==="degree"?Tn.sort((ir,Hr)=>e.getDegree(Hr.id,"both")-e.getDegree(ir.id,"both")):Tn.sort((ir,Hr)=>Hr.data[yr]-ir.data[yr]);const Vn=Tn[0],Dr=(C||(yr==="degree"?e.getDegree(Vn.id,"both"):Vn.data[yr]))/4,pr=[{nodes:[]}];let Sr=pr[0];Tn.forEach(ir=>{if(Sr.nodes.length>0){const Hr=Math.abs(yr==="degree"?e.getDegree(Sr.nodes[0].id,"both")-e.getDegree(ir.id,"both"):Sr.nodes[0].data[yr]-ir.data[yr]);Dr&&Hr>=Dr&&(Sr={nodes:[]},pr.push(Sr))}Sr.nodes.push(ir)});let dr=In+hn;if(!gt){const ir=pr.length>0&&pr[0].nodes.length>1,Oi=(Math.min(Ke,ln)/2-dr)/(pr.length+(ir?1:0));dr=Math.min(dr,Oi)}let Ir=0;if(pr.forEach(ir=>{const Hr=T===void 0?2*Math.PI-2*Math.PI/ir.nodes.length:T;if(ir.dTheta=Hr/Math.max(1,ir.nodes.length-1),ir.nodes.length>1&>){const Oi=Math.cos(ir.dTheta)-Math.cos(0),Li=Math.sin(ir.dTheta)-Math.sin(0),ua=Math.sqrt(dr*dr/(Oi*Oi+Li*Li));Ir=Math.max(ua,Ir)}ir.r=Ir,Ir+=dr}),lt){let ir=0,Hr=0;for(let Oi=0;Oi<pr.length;Oi++){const ua=(pr[Oi].r||0)-Hr;ir=Math.max(ir,ua)}Hr=0,pr.forEach((Oi,Li)=>{Li===0&&(Hr=Oi.r||0),Oi.r=Hr,Hr+=ir})}return pr.forEach(ir=>{const Hr=ir.dTheta||0,Oi=ir.r||0;ir.nodes.forEach((Li,ua)=>{const _a=Gt+($?1:-1)*Hr*ua;Li.data.x=kn[0]+Oi*Math.cos(_a),Li.data.y=kn[1]+Oi*Math.sin(_a)})}),t&&Tn.forEach(ir=>e.mergeNodeData(ir.id,{x:ir.data.x,y:ir.data.y})),{nodes:Tn,edges:ze}})}}var Xi=d(14301),la=d(7695);const ca=.81,Br=.1;function wi(i,t,e,n,r=2){const o=t/e,u=i.getAllNodes(),v=u.map((T,$)=>{const{nodeStrength:lt,x:gt,y:Gt,z:ee,size:ve}=T.data;return{x:gt,y:Gt,z:ee,size:ve,index:$,id:T.id,vx:0,vy:0,vz:0,weight:o*lt}}),S=(r===2?(0,Xi.Z)(v,T=>T.x,T=>T.y):(0,la.Z)(v,T=>T.x,T=>T.y,T=>T.z)).visitAfter(Ai),C=new Map;return v.forEach(T=>{C.set(T.id,T),Ya(T,S,r)}),v.map((T,$)=>{const{id:lt,data:gt}=u[$],{mass:Gt=1}=gt;n[lt]={x:T.vx/Gt,y:T.vy/Gt,z:T.vz/Gt}}),n}function Ai(i){let t=0,e=0,n=0,r=0,o=0;const u=i.length;if(u){for(let v=0;v<u;v++){const S=i[v];S&&S.weight&&(t+=S.weight,e+=S.x*S.weight,n+=S.y*S.weight,r+=S.z*S.weight,o+=S.size*S.weight)}i.x=e/t,i.y=n/t,i.z=r/t,i.size=o/t,i.weight=t}else{const v=i;i.x=v.data.x,i.y=v.data.y,i.z=v.data.z,i.size=v.data.size,i.weight=v.data.weight}}const Pa=(i,t,e,n,r,o,u)=>{var v;if(((v=i.data)===null||v===void 0?void 0:v.id)===o.id)return;const S=[e,n,r][u-1],C=o.x-i.x||Br,T=o.y-i.y||Br,$=o.z-i.z||Br,lt=[C,T,$],gt=S-t;let Gt=0;for(let ke=0;ke<u;ke++)Gt+=lt[ke]*lt[ke];const ve=Math.sqrt(Gt)*Gt;if(gt*gt*ca<Gt){const ke=i.weight/ve;return o.vx+=C*ke,o.vy+=T*ke,o.vz+=$*ke,!0}if(i.length)return!1;if(i.data!==o){const ke=i.data.weight/ve;o.vx+=C*ke,o.vy+=T*ke,o.vz+=$*ke}};function Ya(i,t,e){t.visit((n,r,o,u,v)=>Pa(n,r,o,u,v,i,e))}const Go={dimensions:2,maxIteration:500,gravity:10,factor:1,edgeStrength:50,nodeStrength:1e3,coulombDisScale:.005,damping:.9,maxSpeed:200,minMovement:.4,interval:.02,linkDistance:200,clusterNodeStrength:20,preventOverlap:!0,distanceThresholdMode:"mean"};class Nl{constructor(t={}){this.options=t,this.id="force",this.timeInterval=0,this.judgingDistance=0,this.running=!1,this.options=Object.assign(Object.assign({},Go),t)}execute(t,e){return(0,ui.mG)(this,void 0,void 0,function*(){return this.genericForceLayout(!1,t,e)})}assign(t,e){return(0,ui.mG)(this,void 0,void 0,function*(){yield this.genericForceLayout(!0,t,e)})}stop(){this.timeInterval&&typeof window!="undefined"&&window.clearInterval(this.timeInterval),this.running=!1}tick(t=this.options.maxIteration||1){if(this.lastResult)return this.lastResult;for(let n=0;(this.judgingDistance>this.lastOptions.minMovement||n<1)&&n<t;n++)this.runOneStep(this.lastCalcGraph,this.lastGraph,n,this.lastVelMap,this.lastOptions),this.updatePosition(this.lastGraph,this.lastCalcGraph,this.lastVelMap,this.lastOptions);const e={nodes:this.lastLayoutNodes,edges:this.lastLayoutEdges};return this.lastAssign&&e.nodes.forEach(n=>this.lastGraph.mergeNodeData(n.id,{x:n.data.x,y:n.data.y,z:this.options.dimensions===3?n.data.z:void 0})),e}genericForceLayout(t,e,n){return(0,ui.mG)(this,void 0,void 0,function*(){const r=Object.assign(Object.assign({},this.options),n),o=e.getAllNodes(),u=e.getAllEdges(),v=this.formatOptions(r,e),{dimensions:S,width:C,height:T,nodeSize:$,getMass:lt,nodeStrength:gt,edgeStrength:Gt,linkDistance:ee}=v,ve=o.map((hn,or)=>Object.assign(Object.assign({},hn),{data:Object.assign(Object.assign({},hn.data),{x:(0,Fr.Z)(hn.data.x)?hn.data.x:Math.random()*C,y:(0,Fr.Z)(hn.data.y)?hn.data.y:Math.random()*T,z:(0,Fr.Z)(hn.data.z)?hn.data.z:Math.random()*Math.sqrt(C*T),size:$(hn)||30,mass:lt(hn),nodeStrength:gt(hn)})})),ke=u.map(hn=>Object.assign(Object.assign({},hn),{data:Object.assign(Object.assign({},hn.data),{edgeStrength:Gt(hn),linkDistance:ee(hn,e.getNode(hn.source),e.getNode(hn.target))})}));if(!(o!=null&&o.length))return this.lastResult={nodes:[],edges:u},{nodes:[],edges:u};const ze={};o.forEach((hn,or)=>{ze[hn.id]={x:0,y:0,z:0}});const Ke=new Ua.k({nodes:ve,edges:ke});this.formatCentripetal(v,Ke);const{maxIteration:ln,minMovement:kn,onTick:Tn}=v;if(this.lastLayoutNodes=ve,this.lastLayoutEdges=ke,this.lastAssign=t,this.lastGraph=e,this.lastCalcGraph=Ke,this.lastOptions=v,this.lastVelMap=ze,typeof window=="undefined")return;let In=0;return new Promise(hn=>{this.timeInterval=window.setInterval(()=>{(!o||!this.running)&&hn({nodes:Dl(e,ve),edges:u}),this.runOneStep(Ke,e,In,ze,v),this.updatePosition(e,Ke,ze,v),t&&ve.forEach(or=>e.mergeNodeData(or.id,{x:or.data.x,y:or.data.y,z:S===3?or.data.z:void 0})),Tn==null||Tn({nodes:Dl(e,ve),edges:u}),In++,(In>=ln||this.judgingDistance<kn)&&(window.clearInterval(this.timeInterval),hn({nodes:Dl(e,ve),edges:u}))},0),this.running=!0})})}formatOptions(t,e){const n=Object.assign({},t),{width:r,height:o,getMass:u,nodeSize:v}=t;n.width=!r&&typeof window!="undefined"?window.innerWidth:r,n.height=!o&&typeof window!="undefined"?window.innerHeight:o,t.center||(n.center=[n.width/2,n.height/2]),u||(n.getMass=$=>{let lt=1;(0,Fr.Z)($==null?void 0:$.data.mass)&&(lt=$==null?void 0:$.data.mass);const gt=e.getDegree($.id,"both");return!gt||gt<5?lt:gt*5*lt});const S=qe(0,t.nodeSpacing);let C;v?(0,At.Z)(v)?C=$=>v($)+S($):Ar(v)?C=$=>{const lt=v;return Math.max(lt[0],lt[1])+S($)}:C=$=>v+S($):C=$=>{const{size:lt}=($==null?void 0:$.data)||{};return lt?Ar(lt)?Math.max(lt[0],lt[1])+S($):(0,Xt.Z)(lt)?Math.max(lt.width,lt.height)+S($):lt+S($):10+S($)},n.nodeSize=C;const T=t.linkDistance?qe(1,t.linkDistance):$=>1+n.nodeSize(e.getNode($.source))+n.nodeSize(e.getNode($.target));return n.linkDistance=T,n.nodeStrength=qe(1,t.nodeStrength),n.edgeStrength=qe(1,t.edgeStrength),n}formatCentripetal(t,e){const{dimensions:n,centripetalOptions:r,center:o,clusterNodeStrength:u,leafCluster:v,clustering:S,nodeClusterBy:C}=t,T=e.getAllNodes(),$=r||{leaf:2,single:2,others:1,center:ke=>({x:o[0],y:o[1],z:n===3?o[2]:void 0})};typeof u!="function"&&(t.clusterNodeStrength=ke=>u);let lt,gt;if(v&&C&&(lt=Rl(e,C),gt=Array.from(new Set(T==null?void 0:T.map(ke=>ke.data[C])))||[],t.centripetalOptions=Object.assign($,{single:100,leaf:ke=>{const{siblingLeaves:ze,sameTypeLeaves:Ke}=lt[ke.id]||{};return(Ke==null?void 0:Ke.length)===(ze==null?void 0:ze.length)||(gt==null?void 0:gt.length)===1?1:t.clusterNodeStrength(ke)},others:1,center:ke=>{const ze=e.getDegree(ke.id,"both");if(!ze)return{x:100,y:100,z:0};let Ke;if(ze===1){const{sameTypeLeaves:ln=[]}=lt[ke.id]||{};ln.length===1?Ke=void 0:ln.length>1&&(Ke=vc(ln))}else Ke=void 0;return{x:Ke==null?void 0:Ke.x,y:Ke==null?void 0:Ke.y,z:Ke==null?void 0:Ke.z}}})),S&&C){lt||(lt=Rl(e,C)),gt||(gt=Array.from(new Set(T.map(ze=>ze.data[C])))),gt=gt.filter(ze=>ze!==void 0);const ke={};gt.forEach(ze=>{const Ke=T.filter(ln=>ln.data[C]===ze).map(ln=>e.getNode(ln.id));ke[ze]=vc(Ke)}),t.centripetalOptions=Object.assign($,{single:ze=>t.clusterNodeStrength(ze),leaf:ze=>t.clusterNodeStrength(ze),others:ze=>t.clusterNodeStrength(ze),center:ze=>{const Ke=ke[ze.data[C]];return{x:Ke==null?void 0:Ke.x,y:Ke==null?void 0:Ke.y,z:Ke==null?void 0:Ke.z}}})}const{leaf:Gt,single:ee,others:ve}=t.centripetalOptions||{};Gt&&typeof Gt!="function"&&(t.centripetalOptions.leaf=()=>Gt),ee&&typeof ee!="function"&&(t.centripetalOptions.single=()=>ee),ve&&typeof ve!="function"&&(t.centripetalOptions.others=()=>ve)}runOneStep(t,e,n,r,o){const u={},v=t.getAllNodes(),S=t.getAllEdges();if(!(v!=null&&v.length))return;const{monitor:C}=o;if(this.calRepulsive(t,u,o),S&&this.calAttractive(t,u,o),this.calGravity(t,e,u,o),this.updateVelocity(t,u,r,o),C){const T=this.calTotalEnergy(u,v);C({energy:T,nodes:e.getAllNodes(),edges:e.getAllEdges(),iterations:n})}}calTotalEnergy(t,e){if(!(e!=null&&e.length))return 0;let n=0;return e.forEach((r,o)=>{const u=t[r.id].x,v=t[r.id].y,S=this.options.dimensions===3?t[r.id].z:0,C=u*u+v*v+S*S,{mass:T=1}=r.data;n+=T*C*.5}),n}calRepulsive(t,e,n){const{dimensions:r,factor:o,coulombDisScale:u}=n;wi(t,o,u*u,e,r)}calAttractive(t,e,n){const{dimensions:r,nodeSize:o}=n;t.getAllEdges().forEach((u,v)=>{const{source:S,target:C}=u,T=t.getNode(S),$=t.getNode(C);if(!T||!$)return;let lt=$.data.x-T.data.x,gt=$.data.y-T.data.y,Gt=r===3?$.data.z-T.data.z:0;!lt&&!gt&&(lt=Math.random()*.01,gt=Math.random()*.01,r===3&&!Gt&&(Gt=Math.random()*.01));const ee=Math.sqrt(lt*lt+gt*gt+Gt*Gt);if(ee<o(T)+o($))return;const ve=lt/ee,ke=gt/ee,ze=Gt/ee,{linkDistance:Ke=200,edgeStrength:ln=200}=u.data||{},Tn=(Ke-ee)*ln,In=T.data.mass||1,hn=$.data.mass||1,or=1/In,yr=1/hn,Vn=ve*Tn,Dr=ke*Tn,pr=ze*Tn;e[S].x-=Vn*or,e[S].y-=Dr*or,e[S].z-=pr*or,e[C].x+=Vn*yr,e[C].y+=Dr*yr,e[C].z+=pr*yr})}calGravity(t,e,n,r){const{getCenter:o}=r,u=t.getAllNodes(),v=e.getAllNodes(),S=e.getAllEdges(),{width:C,height:T,center:$,gravity:lt,centripetalOptions:gt}=r;u&&u.forEach(Gt=>{const{id:ee,data:ve}=Gt,{mass:ke,x:ze,y:Ke,z:ln}=ve,kn=e.getNode(ee);let Tn=0,In=0,hn=0,or=lt;const yr=t.getDegree(ee,"in"),Vn=t.getDegree(ee,"out"),Dr=t.getDegree(ee,"both"),pr=o==null?void 0:o(kn,Dr);if(pr){const[Sr,dr,Ir]=pr;Tn=ze-Sr,In=Ke-dr,or=Ir}else Tn=ze-$[0],In=Ke-$[1],hn=ln-$[2];if(or&&(n[ee].x-=or*Tn/ke,n[ee].y-=or*In/ke,n[ee].z-=or*hn/ke),gt){const{leaf:Sr,single:dr,others:Ir,center:Yi}=gt,{x:ir,y:Hr,z:Oi,centerStrength:Li}=(Yi==null?void 0:Yi(kn,v,S,C,T))||{x:0,y:0,z:0,centerStrength:0};if(!(0,Fr.Z)(ir)||!(0,Fr.Z)(Hr))return;const ua=(ze-ir)/ke,_a=(Ke-Hr)/ke,Fi=(ln-Oi)/ke;if(Li&&(n[ee].x-=Li*ua,n[ee].y-=Li*_a,n[ee].z-=Li*Fi),Dr===0){const Za=dr(kn);if(!Za)return;n[ee].x-=Za*ua,n[ee].y-=Za*_a,n[ee].z-=Za*Fi;return}if(yr===0||Vn===0){const Za=Sr(kn,v,S);if(!Za)return;n[ee].x-=Za*ua,n[ee].y-=Za*_a,n[ee].z-=Za*Fi;return}const Sa=Ir(kn);if(!Sa)return;n[ee].x-=Sa*ua,n[ee].y-=Sa*_a,n[ee].z-=Sa*Fi}})}updateVelocity(t,e,n,r){const{damping:o,maxSpeed:u,interval:v,dimensions:S}=r,C=t.getAllNodes();C!=null&&C.length&&C.forEach(T=>{const{id:$}=T;let lt=(n[$].x+e[$].x*v)*o||.01,gt=(n[$].y+e[$].y*v)*o||.01,Gt=S===3?(n[$].z+e[$].z*v)*o||.01:0;const ee=Math.sqrt(lt*lt+gt*gt+Gt*Gt);if(ee>u){const ve=u/ee;lt=ve*lt,gt=ve*gt,Gt=ve*Gt}n[$]={x:lt,y:gt,z:Gt}})}updatePosition(t,e,n,r){const{distanceThresholdMode:o,interval:u,dimensions:v}=r,S=e.getAllNodes();if(!(S!=null&&S.length)){this.judgingDistance=0;return}let C=0;o==="max"?this.judgingDistance=-1/0:o==="min"&&(this.judgingDistance=1/0),S.forEach(T=>{const{id:$}=T,lt=t.getNode($);if((0,Fr.Z)(lt.data.fx)&&(0,Fr.Z)(lt.data.fy)){e.mergeNodeData($,{x:lt.data.fx,y:lt.data.fy,z:v===3?lt.data.fz:void 0});return}const gt=n[$].x*u,Gt=n[$].y*u,ee=v===3?n[$].z*u:0;e.mergeNodeData($,{x:T.data.x+gt,y:T.data.y+Gt,z:T.data.z+ee});const ve=Math.sqrt(gt*gt+Gt*Gt+ee*ee);switch(o){case"max":this.judgingDistance<ve&&(this.judgingDistance=ve);break;case"min":this.judgingDistance>ve&&(this.judgingDistance=ve);break;default:C=C+ve;break}}),(!o||o==="mean")&&(this.judgingDistance=C/S.length)}}const Rl=(i,t)=>{const e=i.getAllNodes();if(!(e!=null&&e.length))return{};const n={};return e.forEach((r,o)=>{i.getDegree(r.id,"both")===1&&(n[r.id]=el(i,"leaf",r,t))}),n},el=(i,t,e,n)=>{const r=i.getDegree(e.id,"in"),o=i.getDegree(e.id,"out");let u=e,v=[];r===0?(u=i.getSuccessors(e.id)[0],v=i.getNeighbors(u.id)):o===0&&(u=i.getPredecessors(e.id)[0],v=i.getNeighbors(u.id)),v=v.filter(C=>i.getDegree(C.id,"in")===0||i.getDegree(C.id,"out")===0);const S=Il(i,t,n,e,v);return{coreNode:u,siblingLeaves:v,sameTypeLeaves:S}},Il=(i,t,e,n,r)=>{const o=n.data[e]||"";let u=(r==null?void 0:r.filter(v=>v.data[e]===o))||[];return t==="leaf"&&(u=u.filter(v=>i.getDegree(v.id,"in")===0||i.getDegree(v.id,"out")===0)),u},vc=i=>{const t={x:0,y:0};i.forEach(n=>{const{x:r,y:o}=n.data;t.x+=r||0,t.y+=o||0});const e=i.length||1;return{x:t.x/e,y:t.y/e}},Dl=(i,t)=>t.map(e=>{const{id:n,data:r}=e,o=i.getNode(n);return Object.assign(Object.assign({},o),{data:Object.assign(Object.assign({},o.data),{x:r.x,y:r.y,z:r.z})})});var Qo=d(53754);const ru=i=>{const t=[],e=i.length;for(let n=0;n<e;n+=1){t[n]=[];for(let r=0;r<e;r+=1)n===r?t[n][r]=0:i[n][r]===0||!i[n][r]?t[n][r]=1/0:t[n][r]=i[n][r]}for(let n=0;n<e;n+=1)for(let r=0;r<e;r+=1)for(let o=0;o<e;o+=1)t[r][o]>t[r][n]+t[n][o]&&(t[r][o]=t[r][n]+t[n][o]);return t},iu=(i,t)=>{const{nodes:e,edges:n}=i,r=[],o={};if(!e)throw new Error("invalid nodes data!");return e&&e.forEach((u,v)=>{o[u.id]=v;const S=[];r.push(S)}),n==null||n.forEach(u=>{const{source:v,target:S}=u,C=o[v],T=o[S];C===void 0||T===void 0||(r[C][T]=1,t||(r[T][C]=1))}),r},Dd=(i,t)=>{const e=[];return i.forEach(n=>{const r=[];n.forEach(o=>{r.push(o*t)}),e.push(r)}),e},Ld=i=>{let t=1/0,e=1/0,n=-1/0,r=-1/0;return i.forEach(o=>{let u=o.data.size;Ar(u)?u.length===1&&(u=[u[0],u[0]]):(0,Fr.Z)(u)?u=[u,u]:(u===void 0||isNaN(u))&&(u=[30,30]);const v=[u[0]/2,u[1]/2],S=o.data.x-v[0],C=o.data.x+v[0],T=o.data.y-v[1],$=o.data.y+v[1];t>S&&(t=S),e>T&&(e=T),n<C&&(n=C),r<$&&(r=$)}),{minX:t,minY:e,maxX:n,maxY:r}},au=(i,t)=>Math.sqrt((i.x-t.x)*(i.x-t.x)+(i.y-t.y)*(i.y-t.y)),Ll=(i,t,e,n="TB",r,o={})=>{if(!(t!=null&&t.length))return;const{stopBranchFn:u,stopAllFn:v}=o;for(let S=0;S<t.length;S++){const C=t[S];if(i.hasNode(C.id)&&!(u!=null&&u(C))){if(v!=null&&v(C))return;n==="TB"&&e(C),Ll(i,i.getChildren(C.id,r),e,n,r,o),n!=="TB"&&e(C)}}},ou={center:[0,0],linkDistance:50};class gc{constructor(t={}){this.options=t,this.id="mds",this.options=Object.assign(Object.assign({},ou),t)}execute(t,e){return(0,ui.mG)(this,void 0,void 0,function*(){return this.genericMDSLayout(!1,t,e)})}assign(t,e){return(0,ui.mG)(this,void 0,void 0,function*(){yield this.genericMDSLayout(!0,t,e)})}genericMDSLayout(t,e,n){return(0,ui.mG)(this,void 0,void 0,function*(){const r=Object.assign(Object.assign({},this.options),n),{center:o=[0,0],linkDistance:u=50}=r,v=e.getAllNodes(),S=e.getAllEdges();if(!(v!=null&&v.length)||v.length===1)return vr(e,t,o);const C=iu({nodes:v,edges:S},!1),T=ru(C);su(T);const $=Dd(T,u),lt=kl($),gt=[];return lt.forEach((ee,ve)=>{const ke=yn(v[ve]);ke.data.x=ee[0]+o[0],ke.data.y=ee[1]+o[1],gt.push(ke)}),t&>.forEach(ee=>e.mergeNodeData(ee.id,{x:ee.data.x,y:ee.data.y})),{nodes:gt,edges:S}})}}const su=i=>{let t=-999999;i.forEach(e=>{e.forEach(n=>{n!==1/0&&t<n&&(t=n)})}),i.forEach((e,n)=>{e.forEach((r,o)=>{r===1/0&&(i[n][o]=t)})})},kl=i=>{const e=Qo.y3.mul(Qo.y3.pow(i,2),-.5),n=e.mean("row"),r=e.mean("column"),o=e.mean();e.add(o).subRowVector(n).subColumnVector(r);const u=new Qo.Sc(e),v=Qo.y3.sqrt(u.diagonalMatrix).diagonal();return u.leftSingularVectors.toJSON().map(S=>Qo.y3.mul([S],[v]).toJSON()[0].splice(0,2))};function _l(i){return!!i.tick&&!!i.stop}const lu={gForce:!0,force2:!0,d3force:!0,fruchterman:!0,forceAtlas2:!0,force:!0,"graphin-force":!0},cu={center:[0,0],comboPadding:10,treeKey:"combo"};class Zl{constructor(t={}){this.options=t,this.id="comboCombined",this.options=Object.assign(Object.assign({},cu),t)}execute(t,e){return(0,ui.mG)(this,void 0,void 0,function*(){return this.genericComboCombinedLayout(!1,t,e)})}assign(t,e){return(0,ui.mG)(this,void 0,void 0,function*(){yield this.genericComboCombinedLayout(!0,t,e)})}genericComboCombinedLayout(t,e,n){return(0,ui.mG)(this,void 0,void 0,function*(){const r=this.initVals(Object.assign(Object.assign({},this.options),n)),{center:o,treeKey:u,outerLayout:v}=r,S=e.getAllNodes().filter(hn=>!hn.data._isCombo),C=e.getAllNodes().filter(hn=>hn.data._isCombo),T=e.getAllEdges(),$=S==null?void 0:S.length;if(!$||$===1)return vr(e,t,o);const lt=[],gt=new Map;S.forEach(hn=>{gt.set(hn.id,hn)});const Gt=new Map;C.forEach(hn=>{Gt.set(hn.id,hn)});const ee=new Map,ve=this.getInnerGraphs(e,u,gt,Gt,T,r,ee);yield Promise.all(ve);const ke=new Map,ze=[],Ke=new Map;let ln=!0;e.getRoots(u).forEach(hn=>{const or=ee.get(hn.id),yr=Gt.get(hn.id)||gt.get(hn.id),Vn={id:hn.id,data:Object.assign(Object.assign({},hn.data),{x:or.data.x||yr.data.x,y:or.data.y||yr.data.y,fx:or.data.fx||yr.data.fx,fy:or.data.fy||yr.data.fy,mass:or.data.mass||yr.data.mass,size:or.data.size})};ze.push(Vn),ke.set(hn.id,!0),!isNaN(Vn.data.x)&&Vn.data.x!==0&&!isNaN(Vn.data.y)&&Vn.data.y!==0?ln=!1:(Vn.data.x=Math.random()*100,Vn.data.y=Math.random()*100),Ll(e,[hn],Dr=>{Dr.id!==hn.id&&Ke.set(Dr.id,hn.id)},"TB",u)});const kn=[];T.forEach(hn=>{const or=Ke.get(hn.source)||hn.source,yr=Ke.get(hn.target)||hn.target;or!==yr&&ke.has(or)&&ke.has(yr)&&kn.push({id:hn.id,source:or,target:yr,data:{}})});let Tn;if(ze!=null&&ze.length){if(ze.length===1)ze[0].data.x=o[0],ze[0].data.y=o[1];else{const hn=new Ua.k({nodes:ze,edges:kn}),or=v||new Nl;ln&&lu[or.id]&&(yield(ze.length<100?new gc:new oi).assign(hn));const yr=Object.assign({center:o,kg:5,preventOverlap:!0,animate:!1},or.id==="force"?{gravity:1,factor:4,linkDistance:(Vn,Dr,pr)=>{const Sr=Math.max(...Dr.data.size)||32,dr=Math.max(...pr.data.size)||32;return Sr/2+dr/2+200}}:{});Tn=yield pc(or,hn,yr)}ee.forEach(hn=>{var or;const yr=Tn.nodes.find(pr=>pr.id===hn.id);if(yr){const{x:pr,y:Sr}=yr.data;hn.data.visited=!0,hn.data.x=pr,hn.data.y=Sr,lt.push({id:hn.id,data:{x:pr,y:Sr}})}const{x:Vn,y:Dr}=hn.data;(or=hn.data.nodes)===null||or===void 0||or.forEach(pr=>{lt.push({id:pr.id,data:{x:pr.data.x+Vn,y:pr.data.y+Dr}})})}),ee.forEach(({data:hn})=>{const{x:or,y:yr,visited:Vn,nodes:Dr}=hn;Dr==null||Dr.forEach(pr=>{if(!Vn){const Sr=lt.find(dr=>dr.id===pr.id);Sr.data.x+=or||0,Sr.data.y+=yr||0}})})}return t&<.forEach(hn=>{e.mergeNodeData(hn.id,{x:hn.data.x,y:hn.data.y})}),{nodes:lt,edges:T}})}initVals(t){const e=Object.assign({},t),{nodeSize:n,spacing:r,comboPadding:o}=t;let u,v;if((0,Fr.Z)(r)?v=()=>r:(0,At.Z)(r)?v=r:v=()=>0,e.spacing=v,!n)u=C=>{const T=v(C);return C.size?Ar(C.size)?((C.size[0]>C.size[1]?C.size[0]:C.size[1])+T)/2:(0,Xt.Z)(C.size)?((C.size.width>C.size.height?C.size.width:C.size.height)+T)/2:(C.size+T)/2:32+T/2};else if((0,At.Z)(n))u=C=>{const T=n(C),$=v(C);return Ar(C.size)?((C.size[0]>C.size[1]?C.size[0]:C.size[1])+$)/2:((T||32)+$)/2};else if(Ar(n)){const T=(n[0]>n[1]?n[0]:n[1])/2;u=$=>T+v($)/2}else{const C=n/2;u=T=>C+v(T)/2}e.nodeSize=u;let S;return(0,Fr.Z)(o)?S=()=>o:Ar(o)?S=()=>Math.max.apply(null,o):(0,At.Z)(o)?S=o:S=()=>0,e.comboPadding=S,e}getInnerGraphs(t,e,n,r,o,u,v){const{nodeSize:S,comboPadding:C,spacing:T,innerLayout:$}=u,lt=$||new oi({}),gt={center:[0,0],preventOverlap:!0,nodeSpacing:T},Gt=[],ee=ve=>{let ke=(C==null?void 0:C(ve))||10;return Ar(ke)&&(ke=Math.max(...ke)),{size:ke?[ke*2,ke*2]:[30,30],padding:ke}};return t.getRoots(e).forEach(ve=>{v.set(ve.id,{id:ve.id,data:{nodes:[],size:ee(ve).size}});let ke=Promise.resolve();Ll(t,[ve],ze=>{var Ke;if(!ze.data._isCombo)return;const{size:ln,padding:kn}=ee(ze);if(!(!((Ke=t.getChildren(ze.id,e))===null||Ke===void 0)&&Ke.length))v.set(ze.id,{id:ze.id,data:Object.assign(Object.assign({},ze.data),{size:ln})});else{const Tn=v.get(ze.id);v.set(ze.id,{id:ze.id,data:Object.assign({nodes:[]},Tn==null?void 0:Tn.data)});const In=new Map,hn=t.getChildren(ze.id,e).map(Vn=>{if(Vn.data._isCombo)return v.has(Vn.id)||v.set(Vn.id,{id:Vn.id,data:Object.assign({},Vn.data)}),In.set(Vn.id,!0),v.get(Vn.id);const Dr=n.get(Vn.id)||r.get(Vn.id);return In.set(Vn.id,!0),{id:Vn.id,data:Object.assign(Object.assign({},Dr.data),Vn.data)}}),or={nodes:hn,edges:o.filter(Vn=>In.has(Vn.source)&&In.has(Vn.target))};let yr=1/0;hn.forEach(Vn=>{var Dr;let{size:pr}=Vn.data;pr||(pr=((Dr=v.get(Vn.id))===null||Dr===void 0?void 0:Dr.data.size)||(S==null?void 0:S(Vn))||[30,30]),(0,Fr.Z)(pr)&&(pr=[pr,pr]);const[Sr,dr]=pr;yr>Sr&&(yr=Sr),yr>dr&&(yr=dr),Vn.data.size=pr}),ke=ke.then(()=>(0,ui.mG)(this,void 0,void 0,function*(){const Vn=new Ua.k(or);yield pc(lt,Vn,gt,!0);const{minX:Dr,minY:pr,maxX:Sr,maxY:dr}=Ld(hn),Ir={x:(Sr+Dr)/2,y:(dr+pr)/2};or.nodes.forEach(ir=>{ir.data.x-=Ir.x,ir.data.y-=Ir.y});const Yi=[Math.max(Sr-Dr,yr)+kn*2,Math.max(dr-pr,yr)+kn*2];v.get(ze.id).data.size=Yi,v.get(ze.id).data.nodes=hn}))}return!0},"BT",e),Gt.push(ke)}),Gt}}function pc(i,t,e,n){var r;return(0,ui.mG)(this,void 0,void 0,function*(){return _l(i)?(i.execute(t,e),i.stop(),i.tick((r=e.iterations)!==null&&r!==void 0?r:300)):n?yield i.assign(t,e):yield i.execute(t,e)})}var Ts=d(31136),Ps=d(84365),kd=d(32575),_d=d(33039),Zd=d(54774),Fd=d(34123),qf=d(97468),th=d(74515);class eh{constructor(t){this.id="d3-force",this.config={inputNodeAttrs:["x","y","vx","vy","fx","fy"],outputNodeAttrs:["x","y","vx","vy"],simulationAttrs:["alpha","alphaMin","alphaDecay","alphaTarget","velocityDecay","randomSource"]},this.forceMap={link:Ts.Z,manyBody:Ps.Z,center:kd.Z,collide:_d.Z,radial:Zd.Z,x:Fd.Z,y:qf.Z},this.options={link:{id:e=>e.id},manyBody:{},center:{x:0,y:0}},this.context={options:{},assign:!1,nodes:[],edges:[]},(0,ct.Z)(this.options,t),this.options.forceSimulation&&(this.simulation=this.options.forceSimulation)}execute(t,e){return(0,ui.mG)(this,void 0,void 0,function*(){return this.genericLayout(!1,t,e)})}assign(t,e){return(0,ui.mG)(this,void 0,void 0,function*(){yield this.genericLayout(!0,t,e)})}stop(){this.simulation.stop()}tick(t){return this.simulation.tick(t),this.getResult()}restart(){this.simulation.restart()}setFixedPosition(t,e){const n=this.context.nodes.find(r=>r.id===t);n&&e.forEach((r,o)=>{if(typeof r=="number"||r===null){const u=["fx","fy","fz"][o];n[u]=r}})}getOptions(t){var e,n;const r=(0,ct.Z)({},this.options,t);return r.collide&&((e=r.collide)===null||e===void 0?void 0:e.radius)===void 0&&(r.collide=r.collide||{},r.collide.radius=(n=r.nodeSize)!==null&&n!==void 0?n:10),r.iterations===void 0&&(r.link&&r.link.iterations===void 0&&(r.iterations=r.link.iterations),r.collide&&r.collide.iterations===void 0&&(r.iterations=r.collide.iterations)),this.context.options=r,r}genericLayout(t,e,n){var r;return(0,ui.mG)(this,void 0,void 0,function*(){const o=this.getOptions(n),u=e.getAllNodes().map(({id:T,data:$})=>Object.assign(Object.assign({id:T},$),(0,xo.Z)($.data,this.config.inputNodeAttrs))),v=e.getAllEdges().map(T=>Object.assign({},T));Object.assign(this.context,{assign:t,nodes:u,edges:v,graph:e});const S=new Promise(T=>{this.resolver=T}),C=this.setSimulation(o);return C.nodes(u),(r=C.force("link"))===null||r===void 0||r.links(v),S})}getResult(){const{assign:t,nodes:e,edges:n,graph:r}=this.context,o=e.map(v=>({id:v.id,data:Object.assign(Object.assign({},v.data),(0,xo.Z)(v,this.config.outputNodeAttrs))})),u=n.map(({id:v,source:S,target:C,data:T})=>({id:v,source:typeof S=="object"?S.id:S,target:typeof C=="object"?C.id:C,data:T}));return t&&o.forEach(v=>r.mergeNodeData(v.id,v.data)),{nodes:o,edges:u}}initSimulation(){return(0,th.Z)()}setSimulation(t){const e=this.simulation||this.options.forceSimulation||this.initSimulation();return this.simulation||(this.simulation=e.on("tick",()=>{var n;return(n=t.onTick)===null||n===void 0?void 0:n.call(t,this.getResult())}).on("end",()=>{var n;return(n=this.resolver)===null||n===void 0?void 0:n.call(this,this.getResult())})),sf(e,this.config.simulationAttrs.map(n=>[n,t[n]])),Object.entries(this.forceMap).forEach(([n,r])=>{const o=n;if(t[n]){let u=e.force(o);u||(u=r(),e.force(o,u)),sf(u,Object.entries(t[o]))}else e.force(o,null)}),e}}const sf=(i,t)=>t.reduce((e,[n,r])=>!e[n]||r===void 0?e:e[n].call(i,r),i);var lf=d(92546),nh=d.n(lf);function rh(i){if(!i)return[0,0,0];if((0,Fr.Z)(i))return[i,i,i];if(i.length===0)return[0,0,0];const[t,e=t,n=t]=i;return[t,e,n]}class uu{constructor(t){this.id="dagre",this.options={},Object.assign(this.options,uu.defaultOptions,t)}execute(t,e){return(0,ui.mG)(this,void 0,void 0,function*(){return this.genericDagreLayout(!1,t,Object.assign(Object.assign({},this.options),e))})}assign(t,e){return(0,ui.mG)(this,void 0,void 0,function*(){yield this.genericDagreLayout(!0,t,Object.assign(Object.assign({},this.options),e))})}genericDagreLayout(t,e,n){return(0,ui.mG)(this,void 0,void 0,function*(){const{nodeSize:r}=n,o=new lf.graphlib.Graph;o.setGraph(n),o.setDefaultEdgeLabel(()=>({}));const u=e.getAllNodes(),v=e.getAllEdges();[...u,...v].some(({id:C})=>(0,Fr.Z)(C))&&console.error("Dagre layout only support string id, it will convert number to string."),e.getAllNodes().forEach(C=>{const{id:T}=C,$=Object.assign({},C.data);if(r!==void 0){const[lt,gt]=rh((0,At.Z)(r)?r(C):r);Object.assign($,{width:lt,height:gt})}o.setNode(T.toString(),$)}),e.getAllEdges().forEach(({id:C,source:T,target:$})=>{o.setEdge(T.toString(),$.toString(),{id:C})}),nh().layout(o);const S={nodes:[],edges:[]};return o.nodes().forEach(C=>{const T=o.node(C);S.nodes.push({id:C,data:T}),t&&e.mergeNodeData(C,T)}),o.edges().forEach(C=>{const T=o.edge(C),{id:$}=T,lt=(0,ui._T)(T,["id"]),{v:gt,w:Gt}=C;S.edges.push({id:$,source:gt,target:Gt,data:lt}),t&&e.mergeEdgeData($,lt)}),S})}}uu.defaultOptions={};class Bd{constructor(t){this.id=t.id||0,this.rx=t.rx,this.ry=t.ry,this.fx=0,this.fy=0,this.mass=t.mass,this.degree=t.degree,this.g=t.g||0}distanceTo(t){const e=this.rx-t.rx,n=this.ry-t.ry;return Math.hypot(e,n)}setPos(t,e){this.rx=t,this.ry=e}resetForce(){this.fx=0,this.fy=0}addForce(t){const e=t.rx-this.rx,n=t.ry-this.ry;let r=Math.hypot(e,n);r=r<1e-4?1e-4:r;const o=this.g*(this.degree+1)*(t.degree+1)/r;this.fx+=o*e/r,this.fy+=o*n/r}in(t){return t.contains(this.rx,this.ry)}add(t){const e=this.mass+t.mass,n=(this.rx*this.mass+t.rx*t.mass)/e,r=(this.ry*this.mass+t.ry*t.mass)/e,o=this.degree+t.degree,u={rx:n,ry:r,mass:e,degree:o};return new Bd(u)}}class Fl{constructor(t){this.xmid=t.xmid,this.ymid=t.ymid,this.length=t.length,this.massCenter=t.massCenter||[0,0],this.mass=t.mass||1}getLength(){return this.length}contains(t,e){const n=this.length/2;return t<=this.xmid+n&&t>=this.xmid-n&&e<=this.ymid+n&&e>=this.ymid-n}NW(){const t=this.xmid-this.length/4,e=this.ymid+this.length/4,n=this.length/2,r={xmid:t,ymid:e,length:n};return new Fl(r)}NE(){const t=this.xmid+this.length/4,e=this.ymid+this.length/4,n=this.length/2,r={xmid:t,ymid:e,length:n};return new Fl(r)}SW(){const t=this.xmid-this.length/4,e=this.ymid-this.length/4,n=this.length/2,r={xmid:t,ymid:e,length:n};return new Fl(r)}SE(){const t=this.xmid+this.length/4,e=this.ymid-this.length/4,n=this.length/2,r={xmid:t,ymid:e,length:n};return new Fl(r)}}class Bl{constructor(t){this.body=null,this.quad=null,this.NW=null,this.NE=null,this.SW=null,this.SE=null,this.theta=.5,t!=null&&(this.quad=t)}insert(t){if(this.body==null){this.body=t;return}this._isExternal()?(this.quad&&(this.NW=new Bl(this.quad.NW()),this.NE=new Bl(this.quad.NE()),this.SW=new Bl(this.quad.SW()),this.SE=new Bl(this.quad.SE())),this._putBody(this.body),this._putBody(t),this.body=this.body.add(t)):(this.body=this.body.add(t),this._putBody(t))}_putBody(t){this.quad&&(t.in(this.quad.NW())&&this.NW?this.NW.insert(t):t.in(this.quad.NE())&&this.NE?this.NE.insert(t):t.in(this.quad.SW())&&this.SW?this.SW.insert(t):t.in(this.quad.SE())&&this.SE&&this.SE.insert(t))}_isExternal(){return this.NW==null&&this.NE==null&&this.SW==null&&this.SE==null}updateForce(t){if(!(this.body==null||t===this.body))if(this._isExternal())t.addForce(this.body);else{const e=this.quad?this.quad.getLength():0,n=this.body.distanceTo(t);e/n<this.theta?t.addForce(this.body):(this.NW&&this.NW.updateForce(t),this.NE&&this.NE.updateForce(t),this.SW&&this.SW.updateForce(t),this.SE&&this.SE.updateForce(t))}}}const ih={center:[0,0],width:300,height:300,kr:5,kg:1,mode:"normal",preventOverlap:!1,dissuadeHubs:!1,maxIteration:0,ks:.1,ksmax:10,tao:.1};class ah{constructor(t={}){this.options=t,this.id="forceAtlas2",this.options=Object.assign(Object.assign({},ih),t)}execute(t,e){return(0,ui.mG)(this,void 0,void 0,function*(){return this.genericForceAtlas2Layout(!1,t,e)})}assign(t,e){return(0,ui.mG)(this,void 0,void 0,function*(){yield this.genericForceAtlas2Layout(!0,t,e)})}genericForceAtlas2Layout(t,e,n){return(0,ui.mG)(this,void 0,void 0,function*(){const r=e.getAllEdges(),o=e.getAllNodes(),u=this.formatOptions(n,o.length),{width:v,height:S,prune:C,maxIteration:T,nodeSize:$,center:lt}=u;if(!(o!=null&&o.length)||o.length===1)return vr(e,t,lt);const gt=o.map(ke=>yn(ke,[v,S])),Gt=r.filter(ke=>{const{source:ze,target:Ke}=ke;return ze!==Ke}),ee=new Ua.k({nodes:gt,edges:Gt}),ve=this.getSizes(ee,e,$);if(this.run(ee,e,T,ve,t,u),C){for(let ze=0;ze<Gt.length;ze+=1){const{source:Ke,target:ln}=Gt[ze],kn=ee.getDegree(Ke),Tn=ee.getDegree(Ke);if(kn<=1){const In=ee.getNode(ln);ee.mergeNodeData(Ke,{x:In.data.x,y:In.data.y})}else if(Tn<=1){const In=ee.getNode(Ke);ee.mergeNodeData(ln,{x:In.data.x,y:In.data.y})}}const ke=Object.assign(Object.assign({},u),{prune:!1,barnesHut:!1});this.run(ee,e,100,ve,t,ke)}return{nodes:gt,edges:r}})}getSizes(t,e,n){const r=t.getAllNodes(),o={};for(let u=0;u<r.length;u+=1){const{id:v,data:S}=r[u];if(o[v]=10,(0,Fr.Z)(S.size))o[v]=S.size;else if(Ar(S.size))isNaN(S.size[0])||(o[v]=Math.max(S.size[0])),isNaN(S.size[1])||(o[v]=Math.max(S.size[1]));else if((0,Xt.Z)(S.size))o[v]=Math.max(S.size.width,S.size.height);else if((0,At.Z)(n)){const C=e.getNode(v),T=n(C);Ar(T)?o[v]=Math.max(...T):o[v]=T}else Ar(n)?o[v]=Math.max(...n):(0,Fr.Z)(n)&&(o[v]=n)}return o}formatOptions(t={},e){const n=Object.assign(Object.assign({},this.options),t),{center:r,width:o,height:u,barnesHut:v,prune:S,maxIteration:C,kr:T,kg:$}=n;return n.width=!o&&typeof window!="undefined"?window.innerWidth:o,n.height=!u&&typeof window!="undefined"?window.innerHeight:u,n.center=r||[n.width/2,n.height/2],v===void 0&&e>250&&(n.barnesHut=!0),S===void 0&&e>100&&(n.prune=!0),C===0&&!S?(n.maxIteration=250,e<=200&&e>100?n.maxIteration=1e3:e>200&&(n.maxIteration=1200)):C===0&&S&&(n.maxIteration=100,e<=200&&e>100?n.maxIteration=500:e>200&&(n.maxIteration=950)),T||(n.kr=50,e>100&&e<=500?n.kr=20:e>500&&(n.kr=1)),$||(n.kg=20,e>100&&e<=500?n.kg=10:e>500&&(n.kg=1)),n}run(t,e,n,r,o,u){const{kr:v,barnesHut:S,onTick:C}=u,T=t.getAllNodes();let $=0,lt=n;const gt={},Gt={},ee={};for(let ve=0;ve<T.length;ve+=1){const{data:ke,id:ze}=T[ve];if(gt[ze]=[0,0],S){const Ke={id:ve,rx:ke.x,ry:ke.y,mass:1,g:v,degree:t.getDegree(ze)};ee[ze]=new Bd(Ke)}}for(;lt>0;)$=this.oneStep(t,{iter:lt,preventOverlapIters:50,krPrime:100,sg:$,forces:gt,preForces:Gt,bodies:ee,sizes:r},u),lt--,C==null||C({nodes:T,edges:e.getAllEdges()});return t}oneStep(t,e,n){const{iter:r,preventOverlapIters:o,krPrime:u,sg:v,preForces:S,bodies:C,sizes:T}=e;let{forces:$}=e;const{preventOverlap:lt,barnesHut:gt}=n,Gt=t.getAllNodes();for(let ee=0;ee<Gt.length;ee+=1){const{id:ve}=Gt[ee];S[ve]=[...$[ve]],$[ve]=[0,0]}return $=this.getAttrForces(t,r,o,T,$,n),gt&&(lt&&r>o||!lt)?$=this.getOptRepGraForces(t,$,C,n):$=this.getRepGraForces(t,r,o,$,u,T,n),this.updatePos(t,$,S,v,n)}getAttrForces(t,e,n,r,o,u){const{preventOverlap:v,dissuadeHubs:S,mode:C,prune:T}=u,$=t.getAllEdges();for(let lt=0;lt<$.length;lt+=1){const{source:gt,target:Gt}=$[lt],ee=t.getNode(gt),ve=t.getNode(Gt),ke=t.getDegree(gt),ze=t.getDegree(Gt);if(T&&(ke<=1||ze<=1))continue;const Ke=[ve.data.x-ee.data.x,ve.data.y-ee.data.y];let ln=Math.hypot(Ke[0],Ke[1]);ln=ln<1e-4?1e-4:ln,Ke[0]=Ke[0]/ln,Ke[1]=Ke[1]/ln,v&&e<n&&(ln=ln-r[gt]-r[Gt]);let kn=ln,Tn=kn;C==="linlog"&&(kn=Math.log(1+ln),Tn=kn),S&&(kn=ln/ke,Tn=ln/ze),v&&e<n&&ln<=0?(kn=0,Tn=0):v&&e<n&&ln>0&&(kn=ln,Tn=ln),o[gt][0]+=kn*Ke[0],o[Gt][0]-=Tn*Ke[0],o[gt][1]+=kn*Ke[1],o[Gt][1]-=Tn*Ke[1]}return o}getOptRepGraForces(t,e,n,r){const{kg:o,center:u,prune:v}=r,S=t.getAllNodes(),C=S.length;let T=9e10,$=-9e10,lt=9e10,gt=-9e10;for(let ze=0;ze<C;ze+=1){const{id:Ke,data:ln}=S[ze];v&&t.getDegree(Ke)<=1||(n[Ke].setPos(ln.x,ln.y),ln.x>=$&&($=ln.x),ln.x<=T&&(T=ln.x),ln.y>=gt&&(gt=ln.y),ln.y<=lt&&(lt=ln.y))}const Gt=Math.max($-T,gt-lt),ee={xmid:($+T)/2,ymid:(gt+lt)/2,length:Gt,massCenter:u,mass:C},ve=new Fl(ee),ke=new Bl(ve);for(let ze=0;ze<C;ze+=1){const{id:Ke}=S[ze];v&&t.getDegree(Ke)<=1||n[Ke].in(ve)&&ke.insert(n[Ke])}for(let ze=0;ze<C;ze+=1){const{id:Ke,data:ln}=S[ze],kn=t.getDegree(Ke);if(v&&kn<=1)continue;n[Ke].resetForce(),ke.updateForce(n[Ke]),e[Ke][0]-=n[Ke].fx,e[Ke][1]-=n[Ke].fy;const Tn=[ln.x-u[0],ln.y-u[1]];let In=Math.hypot(Tn[0],Tn[1]);In=In<1e-4?1e-4:In,Tn[0]=Tn[0]/In,Tn[1]=Tn[1]/In;const hn=o*(kn+1);e[Ke][0]-=hn*Tn[0],e[Ke][1]-=hn*Tn[1]}return e}getRepGraForces(t,e,n,r,o,u,v){const{preventOverlap:S,kr:C,kg:T,center:$,prune:lt}=v,gt=t.getAllNodes(),Gt=gt.length;for(let ee=0;ee<Gt;ee+=1){const ve=gt[ee],ke=t.getDegree(ve.id);for(let kn=ee+1;kn<Gt;kn+=1){const Tn=gt[kn],In=t.getDegree(Tn.id);if(lt&&(ke<=1||In<=1))continue;const hn=[Tn.data.x-ve.data.x,Tn.data.y-ve.data.y];let or=Math.hypot(hn[0],hn[1]);or=or<1e-4?1e-4:or,hn[0]=hn[0]/or,hn[1]=hn[1]/or,S&&e<n&&(or=or-u[ve.id]-u[Tn.id]);let yr=C*(ke+1)*(In+1)/or;S&&e<n&&or<0?yr=o*(ke+1)*(In+1):S&&e<n&&or===0?yr=0:S&&e<n&&or>0&&(yr=C*(ke+1)*(In+1)/or),r[ve.id][0]-=yr*hn[0],r[Tn.id][0]+=yr*hn[0],r[ve.id][1]-=yr*hn[1],r[Tn.id][1]+=yr*hn[1]}const ze=[ve.data.x-$[0],ve.data.y-$[1]],Ke=Math.hypot(ze[0],ze[1]);ze[0]=ze[0]/Ke,ze[1]=ze[1]/Ke;const ln=T*(ke+1);r[ve.id][0]-=ln*ze[0],r[ve.id][1]-=ln*ze[1]}return r}updatePos(t,e,n,r,o){const{ks:u,tao:v,prune:S,ksmax:C}=o,T=t.getAllNodes(),$=T.length,lt=[],gt=[];let Gt=0,ee=0,ve=r;for(let ze=0;ze<$;ze+=1){const{id:Ke}=T[ze],ln=t.getDegree(Ke);if(S&&ln<=1)continue;const kn=[e[Ke][0]-n[Ke][0],e[Ke][1]-n[Ke][1]],Tn=Math.hypot(kn[0],kn[1]),In=[e[Ke][0]+n[Ke][0],e[Ke][1]+n[Ke][1]],hn=Math.hypot(In[0],In[1]);lt[ze]=Tn,gt[ze]=hn/2,Gt+=(ln+1)*lt[ze],ee+=(ln+1)*gt[ze]}const ke=ve;ve=v*ee/Gt,ke!==0&&(ve=ve>1.5*ke?1.5*ke:ve);for(let ze=0;ze<$;ze+=1){const{id:Ke,data:ln}=T[ze],kn=t.getDegree(Ke);if(S&&kn<=1||(0,Fr.Z)(ln.fx)&&(0,Fr.Z)(ln.fy))continue;let Tn=u*ve/(1+ve*Math.sqrt(lt[ze])),In=Math.hypot(e[Ke][0],e[Ke][1]);In=In<1e-4?1e-4:In;const hn=C/In;Tn=Tn>hn?hn:Tn;const or=Tn*e[Ke][0],yr=Tn*e[Ke][1];t.mergeNodeData(Ke,{x:ln.x+or,y:ln.y+yr})}return ve}}const oh={maxIteration:1e3,gravity:10,speed:5,clustering:!1,clusterGravity:10,width:300,height:300,nodeClusterBy:"cluster"},sh=800;class lh{constructor(t={}){this.options=t,this.id="fruchterman",this.timeInterval=0,this.running=!1,this.options=Object.assign(Object.assign({},oh),t)}execute(t,e){return(0,ui.mG)(this,void 0,void 0,function*(){return this.genericFruchtermanLayout(!1,t,e)})}assign(t,e){return(0,ui.mG)(this,void 0,void 0,function*(){yield this.genericFruchtermanLayout(!0,t,e)})}stop(){this.timeInterval&&typeof window!="undefined"&&window.clearInterval(this.timeInterval),this.running=!1}tick(t=this.options.maxIteration||1){if(this.lastResult)return this.lastResult;for(let n=0;n<t;n++)this.runOneStep(this.lastGraph,this.lastClusterMap,this.lastOptions);const e={nodes:this.lastLayoutNodes,edges:this.lastLayoutEdges};return this.lastAssign&&e.nodes.forEach(n=>this.lastGraph.mergeNodeData(n.id,{x:n.data.x,y:n.data.y,z:this.options.dimensions===3?n.data.z:void 0})),e}genericFruchtermanLayout(t,e,n){return(0,ui.mG)(this,void 0,void 0,function*(){if(this.running)return;const r=this.formatOptions(n),{dimensions:o,width:u,height:v,center:S,clustering:C,nodeClusterBy:T,maxIteration:$,onTick:lt}=r,gt=e.getAllNodes(),Gt=e.getAllEdges();if(!(gt!=null&>.length)){const Ke={nodes:[],edges:Gt};return this.lastResult=Ke,Ke}if(gt.length===1){t&&e.mergeNodeData(gt[0].id,{x:S[0],y:S[1],z:o===3?S[2]:void 0});const Ke={nodes:[Object.assign(Object.assign({},gt[0]),{data:Object.assign(Object.assign({},gt[0].data),{x:S[0],y:S[1],z:o===3?S[2]:void 0})})],edges:Gt};return this.lastResult=Ke,Ke}const ee=gt.map(Ke=>yn(Ke,[u,v])),ve=new Ua.k({nodes:ee,edges:Gt}),ke={};if(C&&ee.forEach(Ke=>{const ln=Ke.data[T];ke[ln]||(ke[ln]={name:ln,cx:0,cy:0,count:0})}),this.lastLayoutNodes=ee,this.lastLayoutEdges=Gt,this.lastAssign=t,this.lastGraph=ve,this.lastOptions=r,this.lastClusterMap=ke,typeof window=="undefined")return;let ze=0;return new Promise(Ke=>{this.timeInterval=window.setInterval(()=>{if(!this.running){Ke({nodes:ee,edges:Gt});return}this.runOneStep(ve,ke,r),t&&ee.forEach(({id:ln,data:kn})=>e.mergeNodeData(ln,{x:kn.x,y:kn.y,z:o===3?kn.z:void 0})),lt==null||lt({nodes:ee,edges:Gt}),ze++,ze>=$&&(window.clearInterval(this.timeInterval),Ke({nodes:ee,edges:Gt}))},0),this.running=!0})})}formatOptions(t={}){const e=Object.assign(Object.assign({},this.options),t),{clustering:n,nodeClusterBy:r}=e,{center:o,width:u,height:v}=e;return e.width=!u&&typeof window!="undefined"?window.innerWidth:u,e.height=!v&&typeof window!="undefined"?window.innerHeight:v,e.center=o||[e.width/2,e.height/2],e.clustering=n&&!!r,e}runOneStep(t,e,n){const{dimensions:r,height:o,width:u,gravity:v,center:S,speed:C,clustering:T,nodeClusterBy:$,clusterGravity:lt}=n,gt=o*u,Gt=Math.sqrt(gt)/10,ee=t.getAllNodes(),ve=gt/(ee.length+1),ke=Math.sqrt(ve),ze={};if(this.applyCalculate(t,ze,ke,ve),T){for(const ln in e)e[ln].cx=0,e[ln].cy=0,e[ln].count=0;ee.forEach(ln=>{const{data:kn}=ln,Tn=e[kn[$]];(0,Fr.Z)(kn.x)&&(Tn.cx+=kn.x),(0,Fr.Z)(kn.y)&&(Tn.cy+=kn.y),Tn.count++});for(const ln in e)e[ln].cx/=e[ln].count,e[ln].cy/=e[ln].count;const Ke=lt||v;ee.forEach((ln,kn)=>{const{id:Tn,data:In}=ln;if(!(0,Fr.Z)(In.x)||!(0,Fr.Z)(In.y))return;const hn=e[In[$]],or=Math.sqrt((In.x-hn.cx)*(In.x-hn.cx)+(In.y-hn.cy)*(In.y-hn.cy)),yr=ke*Ke;ze[Tn].x-=yr*(In.x-hn.cx)/or,ze[Tn].y-=yr*(In.y-hn.cy)/or})}ee.forEach((Ke,ln)=>{const{id:kn,data:Tn}=Ke;if(!(0,Fr.Z)(Tn.x)||!(0,Fr.Z)(Tn.y))return;const In=.01*ke*v;ze[kn].x-=In*(Tn.x-S[0]),ze[kn].y-=In*(Tn.y-S[1]),r===3&&(ze[kn].z-=In*(Tn.z-S[2]))}),ee.forEach((Ke,ln)=>{const{id:kn,data:Tn}=Ke;if((0,Fr.Z)(Tn.fx)&&(0,Fr.Z)(Tn.fy)){Tn.x=Tn.fx,Tn.y=Tn.fy,r===3&&(Tn.z=Tn.fz);return}if(!(0,Fr.Z)(Tn.x)||!(0,Fr.Z)(Tn.y))return;const In=Math.sqrt(ze[kn].x*ze[kn].x+ze[kn].y*ze[kn].y+(r===3?ze[kn].z*ze[kn].z:0));if(In>0){const hn=Math.min(Gt*(C/sh),In);t.mergeNodeData(kn,{x:Tn.x+ze[kn].x/In*hn,y:Tn.y+ze[kn].y/In*hn,z:r===3?Tn.z+ze[kn].z/In*hn:void 0})}})}applyCalculate(t,e,n,r){this.calRepulsive(t,e,r),this.calAttractive(t,e,n)}calRepulsive(t,e,n){const r=t.getAllNodes();r.forEach(({data:o,id:u},v)=>{e[u]={x:0,y:0,z:0},r.forEach(({data:S,id:C},T)=>{if(v<=T||!(0,Fr.Z)(o.x)||!(0,Fr.Z)(S.x)||!(0,Fr.Z)(o.y)||!(0,Fr.Z)(S.y))return;let $=o.x-S.x,lt=o.y-S.y,gt=this.options.dimensions===3?o.z-S.z:0,Gt=$*$+lt*lt+gt*gt;Gt===0&&(Gt=1,$=.01,lt=.01,gt=.01);const ee=n/Gt,ve=$*ee,ke=lt*ee,ze=gt*ee;e[u].x+=ve,e[u].y+=ke,e[C].x-=ve,e[C].y-=ke,this.options.dimensions===3&&(e[u].z+=ze,e[C].z-=ze)})})}calAttractive(t,e,n){t.getAllEdges().forEach(o=>{const{source:u,target:v}=o;if(!u||!v||u===v)return;const{data:S}=t.getNode(u),{data:C}=t.getNode(v);if(!(0,Fr.Z)(C.x)||!(0,Fr.Z)(S.x)||!(0,Fr.Z)(C.y)||!(0,Fr.Z)(S.y))return;const T=C.x-S.x,$=C.y-S.y,lt=this.options.dimensions===3?C.z-S.z:0,gt=Math.sqrt(T*T+$*$+lt*lt)/n,Gt=T*gt,ee=$*gt,ve=lt*gt;e[u].x+=Gt,e[u].y+=ee,e[v].x-=Gt,e[v].y-=ee,this.options.dimensions===3&&(e[u].z+=ve,e[v].z-=ve)})}}const ch={begin:[0,0],preventOverlap:!0,preventOverlapPadding:10,condense:!1,rows:void 0,cols:void 0,position:void 0,sortBy:"degree",nodeSize:30,width:300,height:300};class uh{constructor(t={}){this.options=t,this.id="grid",this.options=Object.assign(Object.assign({},ch),t)}execute(t,e){return(0,ui.mG)(this,void 0,void 0,function*(){return this.genericGridLayout(!1,t,e)})}assign(t,e){return(0,ui.mG)(this,void 0,void 0,function*(){yield this.genericGridLayout(!0,t,e)})}genericGridLayout(t,e,n){return(0,ui.mG)(this,void 0,void 0,function*(){const r=Object.assign(Object.assign({},this.options),n),{begin:o=[0,0],condense:u,preventOverlapPadding:v,preventOverlap:S,rows:C,cols:T,nodeSpacing:$,nodeSize:lt,width:gt,height:Gt,position:ee}=r;let{sortBy:ve}=r;const ke=e.getAllNodes(),ze=e.getAllEdges(),Ke=ke==null?void 0:ke.length;if(!Ke||Ke===1)return vr(e,t,o);const ln=ke.map(dr=>yn(dr));ve!=="id"&&(!(0,ea.Z)(ve)||ln[0].data[ve]===void 0)&&(ve="degree"),ve==="degree"?ln.sort((dr,Ir)=>e.getDegree(Ir.id,"both")-e.getDegree(dr.id,"both")):ve==="id"?ln.sort((dr,Ir)=>(0,Fr.Z)(Ir.id)&&(0,Fr.Z)(dr.id)?Ir.id-dr.id:`${dr.id}`.localeCompare(`${Ir.id}`)):ln.sort((dr,Ir)=>Ir.data[ve]-dr.data[ve]);const kn=!gt&&typeof window!="undefined"?window.innerWidth:gt,Tn=!Gt&&typeof window!="undefined"?window.innerHeight:Gt,In=Ke,hn={rows:C,cols:T};if(C!=null&&T!=null)hn.rows=C,hn.cols=T;else if(C!=null&&T==null)hn.rows=C,hn.cols=Math.ceil(In/hn.rows);else if(C==null&&T!=null)hn.cols=T,hn.rows=Math.ceil(In/hn.cols);else{const dr=Math.sqrt(In*Tn/kn);hn.rows=Math.round(dr),hn.cols=Math.round(kn/Tn*dr)}if(hn.rows=Math.max(hn.rows,1),hn.cols=Math.max(hn.cols,1),hn.cols*hn.rows>In){const dr=du(hn),Ir=fu(hn);(dr-1)*Ir>=In?du(hn,dr-1):(Ir-1)*dr>=In&&fu(hn,Ir-1)}else for(;hn.cols*hn.rows<In;){const dr=du(hn),Ir=fu(hn);(Ir+1)*dr>=In?fu(hn,Ir+1):du(hn,dr+1)}let or=u?0:kn/hn.cols,yr=u?0:Tn/hn.rows;if(S||$){const dr=qe(10,$),Ir=tn(30,lt,!1);ln.forEach(Yi=>{(!Yi.data.x||!Yi.data.y)&&(Yi.data.x=0,Yi.data.y=0);const ir=e.getNode(Yi.id),Hr=Ir(ir)||30;let Oi,Li;Ar(Hr)?(Oi=Hr[0],Li=Hr[1]):(Oi=Hr,Li=Hr);const ua=dr!==void 0?dr(Yi):v,_a=Oi+ua,Fi=Li+ua;or=Math.max(or,_a),yr=Math.max(yr,Fi)})}const Vn={},Dr={row:0,col:0},pr={};for(let dr=0;dr<ln.length;dr++){const Ir=ln[dr];let Yi;if(ee&&(Yi=ee(e.getNode(Ir.id))),Yi&&(Yi.row!==void 0||Yi.col!==void 0)){const ir={row:Yi.row,col:Yi.col};if(ir.col===void 0)for(ir.col=0;zd(Vn,ir);)ir.col++;else if(ir.row===void 0)for(ir.row=0;zd(Vn,ir);)ir.row++;pr[Ir.id]=ir,cf(Vn,ir)}dh(Ir,o,or,yr,pr,hn,Dr,Vn)}const Sr={nodes:ln,edges:ze};return t&&ln.forEach(dr=>{e.mergeNodeData(dr.id,{x:dr.data.x,y:dr.data.y})}),Sr})}}const du=(i,t)=>{let e;const n=i.rows||5,r=i.cols||5;return t==null?e=Math.min(n,r):Math.min(n,r)===i.rows?i.rows=t:i.cols=t,e},fu=(i,t)=>{let e;const n=i.rows||5,r=i.cols||5;return t==null?e=Math.max(n,r):Math.max(n,r)===i.rows?i.rows=t:i.cols=t,e},zd=(i,t)=>i[`c-${t.row}-${t.col}`]||!1,cf=(i,t)=>i[`c-${t.row}-${t.col}`]=!0,uf=(i,t)=>{const e=i.cols||5;t.col++,t.col>=e&&(t.col=0,t.row++)},dh=(i,t,e,n,r,o,u,v)=>{let S,C;const T=r[i.id];if(T)S=T.col*e+e/2+t[0],C=T.row*n+n/2+t[1];else{for(;zd(v,u);)uf(o,u);S=u.col*e+e/2+t[0],C=u.row*n+n/2+t[1],cf(v,u),uf(o,u)}i.data.x=S,i.data.y=C},fh=(i,t,e)=>{try{const n=Qo.y3.mul(Qo.y3.pow(t,2),-.5),r=n.mean("row"),o=n.mean("column"),u=n.mean();n.add(u).subRowVector(r).subColumnVector(o);const v=new Qo.Sc(n),S=Qo.y3.sqrt(v.diagonalMatrix).diagonal();return v.leftSingularVectors.toJSON().map(C=>Qo.y3.mul([C],[S]).toJSON()[0].splice(0,i))}catch(n){const r=[];for(let o=0;o<t.length;o++){const u=Math.random()*e,v=Math.random()*e;r.push([u,v])}return r}},hh=800,vh={iterations:10,height:10,width:10,speed:100,gravity:10,k:5},gh=(i,t)=>{const e=Object.assign(Object.assign({},vh),t),{positions:n,iterations:r,width:o,k:u,speed:v=100,strictRadial:S,focusIdx:C,radii:T=[],nodeSizeFunc:$}=e,lt=i.getAllNodes(),gt=[],Gt=o/10;for(let ee=0;ee<r;ee++)n.forEach((ve,ke)=>{gt[ke]={x:0,y:0}}),ph(lt,n,gt,u,T,$),mh(n,gt,v,S,C,Gt,o,T);return n},ph=(i,t,e,n,r,o)=>{t.forEach((u,v)=>{e[v]={x:0,y:0},t.forEach((S,C)=>{if(v===C||r[v]!==r[C])return;let T=u.x-S.x,$=u.y-S.y,lt=Math.sqrt(T*T+$*$);if(lt===0){lt=1;const gt=v>C?1:-1;T=.01*gt,$=.01*gt}if(lt<o(i[v])/2+o(i[C])/2){const gt=n*n/lt;e[v].x+=T/lt*gt,e[v].y+=$/lt*gt}})})},mh=(i,t,e,n,r,o,u,v)=>{const S=o||u/10;return n&&t.forEach((C,T)=>{const $=i[T].x-i[r].x,lt=i[T].y-i[r].y,gt=Math.sqrt($*$+lt*lt);let Gt=lt/gt,ee=-$/gt;const ve=Math.sqrt(C.x*C.x+C.y*C.y);let ke=Math.acos((Gt*C.x+ee*C.y)/ve);ke>Math.PI/2&&(ke-=Math.PI/2,Gt*=-1,ee*=-1);const ze=Math.cos(ke)*ve;C.x=Gt*ze,C.y=ee*ze}),i.forEach((C,T)=>{if(T===r)return;const $=Math.sqrt(t[T].x*t[T].x+t[T].y*t[T].y);if($>0&&T!==r){const lt=Math.min(S*(e/hh),$);if(C.x+=t[T].x/$*lt,C.y+=t[T].y/$*lt,n){let gt=C.x-i[r].x,Gt=C.y-i[r].y;const ee=Math.sqrt(gt*gt+Gt*Gt);gt=gt/ee*v[T],Gt=Gt/ee*v[T],C.x=i[r].x+gt,C.y=i[r].y+Gt}}}),i},yh={maxIteration:1e3,focusNode:null,unitRadius:null,linkDistance:50,preventOverlap:!1,strictRadial:!0,maxPreventOverlapIteration:200,sortStrength:10};class bh{constructor(t={}){this.options=t,this.id="radial",this.options=Object.assign(Object.assign({},yh),t)}execute(t,e){return(0,ui.mG)(this,void 0,void 0,function*(){return this.genericRadialLayout(!1,t,e)})}assign(t,e){return(0,ui.mG)(this,void 0,void 0,function*(){yield this.genericRadialLayout(!0,t,e)})}genericRadialLayout(t,e,n){return(0,ui.mG)(this,void 0,void 0,function*(){const r=Object.assign(Object.assign({},this.options),n),{width:o,height:u,center:v,focusNode:S,unitRadius:C,nodeSize:T,nodeSpacing:$,strictRadial:lt,preventOverlap:gt,maxPreventOverlapIteration:Gt,sortBy:ee,linkDistance:ve=50,sortStrength:ke=10,maxIteration:ze=1e3}=r,Ke=e.getAllNodes(),ln=e.getAllEdges(),kn=!o&&typeof window!="undefined"?window.innerWidth:o,Tn=!u&&typeof window!="undefined"?window.innerHeight:u,In=v||[kn/2,Tn/2];if(!(Ke!=null&&Ke.length)||Ke.length===1)return vr(e,t,In);let hn=Ke[0];if((0,ea.Z)(S)){for(let Ma=0;Ma<Ke.length;Ma++)if(Ke[Ma].id===S){hn=Ke[Ma];break}}else hn=S||Ke[0];const or=wh(Ke,hn.id),yr=iu({nodes:Ke,edges:ln},!1),Vn=ru(yr),Dr=Mh(Vn,or);Sh(Vn,or,Dr+1);const pr=Vn[or];let Sr=kn-In[0]>In[0]?In[0]:kn-In[0],dr=Tn-In[1]>In[1]?In[1]:Tn-In[1];Sr===0&&(Sr=kn/2),dr===0&&(dr=Tn/2);const Ir=Math.min(Sr,dr),Yi=Math.max(...pr),ir=[],Hr=C||Ir/Yi;pr.forEach((Ma,zo)=>{ir[zo]=Ma*Hr});const Oi=Eh(Ke,Vn,ve,ir,Hr,ee,ke),Li=xh(Oi),ua=fh(ve,Oi,ve);let _a=ua.map(([Ma,zo])=>({x:(isNaN(Ma)?Math.random()*ve:Ma)-ua[or][0],y:(isNaN(zo)?Math.random()*ve:zo)-ua[or][1]}));this.run(ze,_a,Li,Oi,ir,or);let Fi;if(gt){Fi=fn(T,$);const Ma={nodes:Ke,nodeSizeFunc:Fi,positions:_a,radii:ir,height:Tn,width:kn,strictRadial:!!lt,focusIdx:or,iterations:Gt||200,k:_a.length/4.5};_a=gh(e,Ma)}const Sa=[];return _a.forEach((Ma,zo)=>{const ki=yn(Ke[zo]);ki.data.x=Ma.x+In[0],ki.data.y=Ma.y+In[1],Sa.push(ki)}),t&&Sa.forEach(Ma=>e.mergeNodeData(Ma.id,{x:Ma.data.x,y:Ma.data.y})),{nodes:Sa,edges:ln}})}run(t,e,n,r,o,u){for(let v=0;v<=t;v++){const S=v/t;this.oneIteration(S,e,o,r,n,u)}}oneIteration(t,e,n,r,o,u){const v=1-t;e.forEach((S,C)=>{const T=au(S,{x:0,y:0}),$=T===0?0:1/T;if(C===u)return;let lt=0,gt=0,Gt=0;e.forEach((ve,ke)=>{if(C===ke)return;const ze=au(S,ve),Ke=ze===0?0:1/ze,ln=r[ke][C];Gt+=o[C][ke],lt+=o[C][ke]*(ve.x+ln*(S.x-ve.x)*Ke),gt+=o[C][ke]*(ve.y+ln*(S.y-ve.y)*Ke)});const ee=n[C]===0?0:1/n[C];Gt*=v,Gt+=t*ee*ee,lt*=v,lt+=t*ee*S.x*$,S.x=lt/Gt,gt*=v,gt+=t*ee*S.y*$,S.y=gt/Gt})}}const Eh=(i,t,e,n,r,o,u)=>{if(!i)return[];const v=[];if(t){const S={};t.forEach((C,T)=>{const $=[];C.forEach((lt,gt)=>{var Gt,ee;if(T===gt)$.push(0);else if(n[T]===n[gt])if(o==="data")$.push(lt*(Math.abs(T-gt)*u)/(n[T]/r));else if(o){let ve,ke;if(S[i[T].id])ve=S[i[T].id];else{const ze=(o==="id"?i[T].id:(Gt=i[T].data)===null||Gt===void 0?void 0:Gt[o])||0;(0,ea.Z)(ze)?ve=ze.charCodeAt(0):ve=ze,S[i[T].id]=ve}if(S[i[gt].id])ke=S[i[gt].id];else{const ze=(o==="id"?i[gt].id:(ee=i[gt].data)===null||ee===void 0?void 0:ee[o])||0;(0,ea.Z)(ze)?ke=ze.charCodeAt(0):ke=ze,S[i[gt].id]=ke}$.push(lt*(Math.abs(ve-ke)*u)/(n[T]/r))}else $.push(lt*e/(n[T]/r));else{const ve=(e+r)/2;$.push(lt*ve)}}),v.push($)})}return v},xh=i=>{const t=i.length,e=i[0].length,n=[];for(let r=0;r<t;r++){const o=[];for(let u=0;u<e;u++)i[r][u]!==0?o.push(1/(i[r][u]*i[r][u])):o.push(0);n.push(o)}return n},wh=(i,t)=>{let e=-1;return i.forEach((n,r)=>{n.id===t&&(e=r)}),Math.max(e,0)},Sh=(i,t,e)=>{const n=i.length;for(let r=0;r<n;r++)if(i[t][r]===1/0){i[t][r]=e,i[r][t]=e;for(let o=0;o<n;o++)i[r][o]!==1/0&&i[t][o]===1/0&&(i[t][o]=e+i[r][o],i[o][t]=e+i[r][o])}for(let r=0;r<n;r++)if(r!==t){for(let o=0;o<n;o++)if(i[r][o]===1/0){let u=Math.abs(i[t][r]-i[t][o]);u=u===0?1:u,i[r][o]=u}}},Mh=(i,t)=>{let e=0;for(let n=0;n<i[t].length;n++)i[t][n]!==1/0&&(e=i[t][n]>e?i[t][n]:e);return e},Ch={center:[0,0],width:300,height:300};class Oh{constructor(t={}){this.options=t,this.id="random",this.options=Object.assign(Object.assign({},Ch),t)}execute(t,e){return(0,ui.mG)(this,void 0,void 0,function*(){return this.genericRandomLayout(!1,t,e)})}assign(t,e){return(0,ui.mG)(this,void 0,void 0,function*(){yield this.genericRandomLayout(!0,t,e)})}genericRandomLayout(t,e,n){return(0,ui.mG)(this,void 0,void 0,function*(){const r=Object.assign(Object.assign({},this.options),n),{center:o,width:u,height:v}=r,S=e.getAllNodes(),C=.9,T=!u&&typeof window!="undefined"?window.innerWidth:u,$=!v&&typeof window!="undefined"?window.innerHeight:v,lt=o||[T/2,$/2],gt=[];return S&&S.forEach(ee=>{gt.push({id:ee.id,data:{x:(Math.random()-.5)*C*T+lt[0],y:(Math.random()-.5)*C*$+lt[1]}})}),t&>.forEach(ee=>e.mergeNodeData(ee.id,{x:ee.data.x,y:ee.data.y})),{nodes:gt,edges:e.getAllEdges()}})}}const Th=["rgb(158, 1, 66)","rgb(213, 62, 79)","rgb(244, 109, 67)","rgb(253, 174, 97)","rgb(254, 224, 139)","rgb(255, 255, 191)","rgb(230, 245, 152)","rgb(171, 221, 164)","rgb(102, 194, 165)","rgb(50, 136, 189)","rgb(94, 79, 162)"],Ph=["rgb(78, 121, 167)","rgb(242, 142, 44)","rgb(225, 87, 89)","rgb(118, 183, 178)","rgb(89, 161, 79)","rgb(237, 201, 73)","rgb(175, 122, 161)","rgb(255, 157, 167)","rgb(156, 117, 95)","rgb(186, 176, 171)"],Ah=["rgb(255, 245, 235)","rgb(254, 230, 206)","rgb(253, 208, 162)","rgb(253, 174, 107)","rgb(253, 141, 60)","rgb(241, 105, 19)","rgb(217, 72, 1)","rgb(166, 54, 3)","rgb(127, 39, 4)"],Nh=["rgb(247, 252, 245)","rgb(229, 245, 224)","rgb(199, 233, 192)","rgb(161, 217, 155)","rgb(116, 196, 118)","rgb(65, 171, 93)","rgb(35, 139, 69)","rgb(0, 109, 44)","rgb(0, 68, 27)"],Rh=["rgb(247, 251, 255)","rgb(222, 235, 247)","rgb(198, 219, 239)","rgb(158, 202, 225)","rgb(107, 174, 214)","rgb(66, 146, 198)","rgb(33, 113, 181)","rgb(8, 81, 156)","rgb(8, 48, 107)"];var df=d(92387);const zl=i=>i?parseInt(i):0;function Ih(i){const t=getComputedStyle(i),e=i.clientWidth||zl(t.width),n=i.clientHeight||zl(t.height),r=zl(t.paddingLeft)+zl(t.paddingRight),o=zl(t.paddingTop)+zl(t.paddingBottom);return[e-r,n-o]}function ff(i){let t=640,e=480;const[n,r]=Ih(i);t=n||t,e=r||e;const o=1,u=1;return[Math.max((0,Fr.Z)(t)?t:o,o),Math.max((0,Fr.Z)(e)?e:u,u)]}function mc(i,t=!0,e){const n=document.createElement("div");return n.setAttribute("class",`g6-${i}`),Object.assign(n.style,{position:"absolute",display:"block"}),t&&Object.assign(n.style,{inset:"0px",height:"100%",width:"100%",overflow:"hidden",pointerEvents:"none"}),e&&Object.assign(n.style,e),n}function jd(i,t="div",e={},n="",r=document.body){const o=document.getElementById(i);o&&o.remove();const u=document.createElement(t);return u.innerHTML=n,u.id=i,Object.assign(u.style,e),r.appendChild(u),u}function Dh(i,t){const e=i.firstChild;e?i.insertBefore(t,e):i.appendChild(t)}class mo extends Kt{}var Lh=function(i,t,e,n){function r(o){return o instanceof e?o:new e(function(u){u(o)})}return new(e||(e=Promise))(function(o,u){function v(T){try{C(n.next(T))}catch($){u($)}}function S(T){try{C(n.throw(T))}catch($){u($)}}function C(T){T.done?o(T.value):r(T.value).then(v,S)}C((n=n.apply(i,t||[])).next())})};class hu extends mo{constructor(t,e){super(t,Object.assign({},hu.defaultOptions,e)),this.$element=mc("background"),this.context.canvas.getContainer().prepend(this.$element),this.update(e)}update(t){const e=Object.create(null,{update:{get:()=>super.update}});return Lh(this,void 0,void 0,function*(){e.update.call(this,t),Object.assign(this.$element.style,(0,df.Z)(this.options,["key","type"]))})}destroy(){super.destroy(),this.$element.remove()}}hu.defaultOptions={transition:"background 0.5s",backgroundSize:"cover"};var jl=d(80574),kh=function(i,t){var e={};for(var n in i)Object.prototype.hasOwnProperty.call(i,n)&&t.indexOf(n)<0&&(e[n]=i[n]);if(i!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,n=Object.getOwnPropertySymbols(i);r<n.length;r++)t.indexOf(n[r])<0&&Object.prototype.propertyIsEnumerable.call(i,n[r])&&(e[n[r]]=i[n[r]]);return e};class vu extends mo{constructor(t,e){super(t,(0,ct.Z)({},vu.defaultOptions,e)),this.members=new Map,this.avoidMembers=new Map,this.bubbleSetOptions={},this.drawBubbleSets=()=>{const{style:n,bubbleSetOptions:r}=this.parseOptions();(0,Bt.Z)(this.bubbleSetOptions,r)||this.init(),this.bubbleSetOptions=Object.assign({},r);const o=Object.assign(Object.assign({},n),{d:this.getPath()});this.shape?this.shape.update(o):(this.shape=new Ro({style:o}),this.context.canvas.appendChild(this.shape))},this.updateBubbleSetsPath=n=>{if(!this.shape)return;const r=sn(n.data);[...this.options.members,...this.options.avoidMembers].includes(r)&&this.shape.update(Object.assign(Object.assign({},this.parseOptions().style),{d:this.getPath(r)}))},this.getPath=n=>{const{graph:r}=this.context,o=this.options.members,u=[...this.members.keys()],v=this.options.avoidMembers,S=[...this.avoidMembers.keys()];if(!n&&(0,Bt.Z)(o,u)&&(0,Bt.Z)(v,S))return this.path;const{enter:C=[],exit:T=[]}=Dt(u,o,ve=>ve),{enter:$=[],exit:lt=[]}=Dt(S,v,ve=>ve);n&&(T.push(n),C.push(n));const gt=(ve,ke,ze)=>{ve.forEach(Ke=>{const ln=ze?this.members:this.avoidMembers,kn=ze?"pushMember":"pushNonMember",Tn=ze?"removeMember":"removeNonMember";if(ke){let In;r.getElementType(Ke)==="edge"?([In]=Zh(r,Ke),this.bubbleSets.pushEdge(In)):([In]=_h(r,Ke),this.bubbleSets[kn](In)),ln.set(Ke,In)}else{const In=ln.get(Ke);In&&(r.getElementType(Ke)==="edge"?this.bubbleSets.removeEdge(In):this.bubbleSets[Tn](In),ln.delete(Ke))}})};gt(T,!1,!0),gt(C,!0,!0),gt(lt,!1,!1),gt($,!0,!1);const ee=this.bubbleSets.compute().sample(8).simplify(0).bSplines().simplify(0);return this.path=Wa(ee.points.map(Lr)),this.path},this.bindEvents(),this.bubbleSets=new jl.CF(this.options)}bindEvents(){this.context.graph.on(Oe.AFTER_RENDER,this.drawBubbleSets),this.context.graph.on(Oe.AFTER_ELEMENT_UPDATE,this.updateBubbleSetsPath)}init(){this.bubbleSets=new jl.CF(this.options),this.members=new Map,this.avoidMembers=new Map}parseOptions(){const t=this.options,{type:e,key:n,members:r,avoidMembers:o}=t,u=kh(t,["type","key","members","avoidMembers"]),v=Object.keys(u).reduce((S,C)=>(C in jl.vC?S.bubbleSetOptions[C]=u[C]:S.style[C]=u[C],S),{style:{},bubbleSetOptions:{}});return Object.assign({type:e,key:n,members:r,avoidMembers:o},v)}addMember(t){const e=Array.isArray(t)?t:[t];e.some(n=>this.options.avoidMembers.includes(n))&&(this.options.avoidMembers=this.options.avoidMembers.filter(n=>!e.includes(n))),this.options.members=[...new Set([...this.options.members,...e])],this.drawBubbleSets()}removeMember(t){const e=Array.isArray(t)?t:[t];this.options.members=this.options.members.filter(n=>!e.includes(n)),this.drawBubbleSets()}updateMember(t){this.options.members=(0,At.Z)(t)?t(this.options.members):t,this.drawBubbleSets()}getMember(){return this.options.members}addAvoidMember(t){const e=Array.isArray(t)?t:[t];e.some(n=>this.options.members.includes(n))&&(this.options.members=this.options.members.filter(n=>!e.includes(n))),this.options.avoidMembers=[...new Set([...this.options.avoidMembers,...e])],this.drawBubbleSets()}removeAvoidMember(t){const e=Array.isArray(t)?t:[t];this.options.avoidMembers.some(n=>e.includes(n))&&(this.options.avoidMembers=this.options.avoidMembers.filter(n=>!e.includes(n)),this.drawBubbleSets())}updateAvoidMember(t){this.options.avoidMembers=Array.isArray(t)?t:[t],this.drawBubbleSets()}getAvoidMember(){return this.options.avoidMembers}destroy(){this.context.graph.off(Oe.AFTER_RENDER,this.drawBubbleSets),this.context.graph.off(Oe.AFTER_ELEMENT_UPDATE,this.updateBubbleSetsPath),this.shape.destroy(),super.destroy()}}vu.defaultOptions=Object.assign({members:[],avoidMembers:[],fill:"lightblue",fillOpacity:.2,stroke:"blue",strokeOpacity:.2},jl.vC);const _h=(i,t)=>(Array.isArray(t)?t:[t]).map(n=>{const r=i.getElementRenderBounds(n);return new jl.Ae(r.min[0],r.min[1],on(r),_n(r))}),Zh=(i,t)=>(Array.isArray(t)?t:[t]).map(n=>{const r=i.getEdgeData(n),o=i.getElementPosition(r.source),u=i.getElementPosition(r.target);return jl.x1.from({x1:o[0],y1:o[1],x2:u[0],y2:u[1]})});class Dv extends null{constructor(t,e){super(t,e),this.setOptions=n=>{const r={cameraType:"setType",near:"setNear",far:"setFar",fov:"setFov",aspect:"setAspect",projectionMode:"setProjectionMode",distance:"setDistance",minDistance:"setMinDistance",maxDistance:"setMaxDistance",roll:"setRoll",elevation:"setElevation",azimuth:"setAzimuth"},o=(u,v)=>{switch(u){case"projectionMode":return v==="perspective"?1:0;case"cameraType":return{orbiting:0,exploring:1,tracking:2}[v];case"aspect":return typeof v=="number"?v:this.getCanvasAspect();default:return v}};Object.entries(r).forEach(([u,v])=>{const S=n[u];if(S!==void 0){const C=o(u,S);this.context.canvas.getCamera()[v](C)}})},this.bindEvents()}update(t){this.setOptions(t),super.update(t)}bindEvents(){this.context.graph.once(GraphEvent.BEFORE_DRAW,()=>this.setOptions(this.options))}getCanvasAspect(){const[t,e]=this.context.viewport.getCanvasSize();return t/e}}function Fh(i){return`
|
|
|
<ul class="g6-contextmenu-ul">
|
|
|
${i.map(t=>`<li class="g6-contextmenu-li" value="${t.value}">${t.name}</li>`).join("")}
|
|
|
</ul>
|
|
|
`}const Bh=`
|
|
|
.g6-contextmenu {
|
|
|
font-size: 12px;
|
|
|
background-color: rgba(255, 255, 255, 0.96);
|
|
|
border-radius: 4px;
|
|
|
overflow: hidden;
|
|
|
box-shadow: rgba(0, 0, 0, 0.12) 0px 6px 12px 0px;
|
|
|
transition: visibility 0.2s cubic-bezier(0.23, 1, 0.32, 1) 0s, left 0.4s cubic-bezier(0.23, 1, 0.32, 1) 0s, top 0.4s cubic-bezier(0.23, 1, 0.32, 1) 0s;
|
|
|
}
|
|
|
|
|
|
.g6-contextmenu-ul {
|
|
|
max-width: 256px;
|
|
|
min-width: 96px;
|
|
|
list-style: none;
|
|
|
padding: 0;
|
|
|
margin: 0;
|
|
|
}
|
|
|
|
|
|
.g6-contextmenu-li {
|
|
|
padding: 8px 12px;
|
|
|
cursor: pointer;
|
|
|
user-select: none;
|
|
|
}
|
|
|
|
|
|
.g6-contextmenu-li:hover {
|
|
|
background-color: #f5f5f5;
|
|
|
cursor: pointer;
|
|
|
}
|
|
|
`;var hf=function(i,t,e,n){function r(o){return o instanceof e?o:new e(function(u){u(o)})}return new(e||(e=Promise))(function(o,u){function v(T){try{C(n.next(T))}catch($){u($)}}function S(T){try{C(n.throw(T))}catch($){u($)}}function C(T){T.done?o(T.value):r(T.value).then(v,S)}C((n=n.apply(i,t||[])).next())})};class gu extends mo{constructor(t,e){super(t,Object.assign({},gu.defaultOptions,e)),this.targetElement=null,this.onTriggerEvent=n=>{var r;(r=n.preventDefault)===null||r===void 0||r.call(n),this.show(n)},this.onMenuItemClick=n=>{const{onClick:r,trigger:o}=this.options;if(n.target instanceof HTMLElement&&n.target.className.includes("g6-contextmenu-li")){const u=n.target.getAttribute("value");r==null||r(u,n.target,this.targetElement),this.hide()}o!=="click"&&this.hide()},this.initElement(),this.update(e)}initElement(){this.$element=mc("contextmenu",!1,{zIndex:"99"});const{className:t}=this.options;t&&this.$element.classList.add(t),this.context.canvas.getContainer().appendChild(this.$element),jd("g6-contextmenu-css","style",{},Bh,document.head)}show(t){return hf(this,void 0,void 0,function*(){const{enable:e,offset:n}=this.options;if(typeof e=="function"&&!e(t)||!e){this.hide();return}const r=yield this.getDOMContent(t);r instanceof HTMLElement?(this.$element.innerHTML="",this.$element.appendChild(r)):this.$element.innerHTML=r;const o=this.context.graph.getCanvas().getContainer().getBoundingClientRect();this.$element.style.left=`${t.client.x-o.left+n[0]}px`,this.$element.style.top=`${t.client.y-o.top+n[1]}px`,this.$element.style.display="block",this.targetElement=t.target})}hide(){this.$element.style.display="none",this.targetElement=null}update(t){this.unbindEvents(),super.update(t),this.bindEvents()}destroy(){this.unbindEvents(),super.destroy(),this.$element.remove()}getDOMContent(t){return hf(this,void 0,void 0,function*(){const{getContent:e,getItems:n}=this.options;return n?Fh(yield n(t)):yield e(t)})}bindEvents(){const{graph:t}=this.context,{trigger:e}=this.options;t.on(`canvas:${e}`,this.onTriggerEvent),t.on(`node:${e}`,this.onTriggerEvent),t.on(`edge:${e}`,this.onTriggerEvent),t.on(`combo:${e}`,this.onTriggerEvent),document.addEventListener("click",this.onMenuItemClick)}unbindEvents(){const{graph:t}=this.context,{trigger:e}=this.options;t.off(`canvas:${e}`,this.onTriggerEvent),t.off(`node:${e}`,this.onTriggerEvent),t.off(`edge:${e}`,this.onTriggerEvent),t.off(`combo:${e}`,this.onTriggerEvent),document.removeEventListener("click",this.onMenuItemClick)}}gu.defaultOptions={trigger:"contextmenu",offset:[4,4],loadingContent:'<div class="g6-contextmenu-loading">Loading...</div>',getContent:()=>"It is a empty context menu.",enable:()=>!0};class pu extends mo{constructor(t,e){super(t,Object.assign({},pu.defaultOptions,e)),this.edgeBundles={},this.edgePoints={},this.onBundle=()=>{const{model:n,element:r}=this.context,o=n.getEdgeData();this.divideEdges(this.options.divisions);const{cycles:u,iterRate:v,divRate:S}=this.options;let{lambda:C,divisions:T,iterations:$}=this.options;for(let lt=0;lt<u;lt++){for(let gt=0;gt<$;gt++){const Gt={};o.forEach(ee=>{var ve;if(ee.source===ee.target)return;const ke=sn(ee);Gt[ke]=this.getEdgeForces(ee,T,C);for(let ze=0;ze<T+1;ze++)(ve=this.edgePoints)[ke]||(ve[ke]=[]),this.edgePoints[ke][ze]=rt(this.edgePoints[ke][ze],Gt[ke][ze])})}C/=2,T*=S,$*=v,this.divideEdges(T)}o.forEach(lt=>{const gt=sn(lt),Gt=r.getElement(gt);Gt==null||Gt.update({d:ci(this.edgePoints[gt])})})},this.bindEvents()}get nodeMap(){const t=this.context.model.getNodeData();return Object.fromEntries(t.map(e=>[sn(e),$n(er(e))]))}divideEdges(t){this.context.model.getEdgeData().forEach(n=>{var r;const o=sn(n);(r=this.edgePoints)[o]||(r[o]=[]);const u=this.nodeMap[n.source],v=this.nodeMap[n.target];if(t===1)this.edgePoints[o].push(u),this.edgePoints[o].push(ue(rt(u,v),2)),this.edgePoints[o].push(v);else{const C=(this.edgePoints[o].length===0?Be(u,v):Gh(this.edgePoints[o]))/(t+1);let T=C;const $=[u];for(let lt=1;lt<this.edgePoints[o].length;lt++){const gt=this.edgePoints[o][lt-1],Gt=this.edgePoints[o][lt];let ee=Be(Gt,gt);for(;ee>T;){const ve=T/ee,ke=rt(gt,Ht($t(Gt,gt),ve));$.push(ke),ee-=T,T=C}T-=ee}$.push(v),this.edgePoints[o]=$}})}getVectorPosition(t){const e=this.nodeMap[t.source],n=this.nodeMap[t.target],[r,o]=$t(n,e),u=Be(e,n);return{source:e,target:n,vx:r,vy:o,length:u}}measureEdgeCompatibility(t,e){const n=this.getVectorPosition(t),r=this.getVectorPosition(e),o=zh(n,r),u=jh(n,r),v=$h(n,r),S=Wh(n,r);return o*u*v*S}getEdgeBundles(){const t={},e=this.options.bundleThreshold,n=this.context.model.getEdgeData();return n.forEach((r,o)=>{n.forEach((u,v)=>{var S,C;if(v<=o)return;this.measureEdgeCompatibility(r,u)>=e&&(t[S=sn(r)]||(t[S]=[]),t[sn(r)].push(u),t[C=sn(u)]||(t[C]=[]),t[sn(u)].push(r))})}),t}getSpringForce(t,e){const{pre:n,cur:r,next:o}=t;return Ht($t(rt(n,o),Ht(r,2)),e)}getElectrostaticForce(t,e){(0,Ao.Z)(this.edgeBundles)&&(this.edgeBundles=this.getEdgeBundles());const n=this.edgeBundles[sn(e)];let r=[0,0];return n==null||n.forEach(o=>{const u=this.edgePoints[sn(o)][t],v=this.edgePoints[sn(e)][t],S=$t(u,v),C=Be(u,v);r=rt(r,Ht(S,1/C))}),r}getEdgeForces(t,e,n){const r=this.nodeMap[t.source],o=this.nodeMap[t.target],u=this.options.K/(Be(r,o)*(e+1)),v=[[0,0]],S=sn(t);for(let C=1;C<e;C++){const T=this.getSpringForce({pre:this.edgePoints[S][C-1],cur:this.edgePoints[S][C],next:this.edgePoints[S][C+1]||[0,0]},u),$=this.getElectrostaticForce(C,t);v.push(Ht(rt(T,$),n))}return v.push([0,0]),v}bindEvents(){const{graph:t}=this.context;t.on(Oe.AFTER_RENDER,this.onBundle)}unbindEvents(){const{graph:t}=this.context;t.off(Oe.AFTER_RENDER,this.onBundle)}destroy(){this.unbindEvents(),super.destroy()}}pu.defaultOptions={K:.1,lambda:.1,divisions:1,divRate:2,cycles:6,iterations:90,iterRate:2/3,bundleThreshold:.6};const zh=(i,t)=>Math.abs(Ee([i.vx,i.vy],[t.vx,t.vy])/(i.length*t.length)),jh=(i,t)=>{const e=(i.length+t.length)/2;return 2/(e/Math.min(i.length,t.length)+Math.max(i.length,t.length)/e)},$h=(i,t)=>{const e=(i.length+t.length)/2,n=ue(rt(i.source,i.target),2),r=ue(rt(t.source,t.target),2);return e/(e+Be(n,r))},vf=(i,t)=>{if(t.source[0]===t.target[0])return[t.source[0],i[1]];if(t.source[1]===t.target[1])return[i[0],t.source[1]];const e=(t.source[1]-t.target[1])/(t.source[0]-t.target[0]),n=(e*e*t.source[0]+e*(i[1]-t.source[1])+i[0])/(e*e+1),r=e*(n-t.source[0])+t.source[1];return[n,r]},gf=(i,t)=>{const e=vf(t.source,i),n=vf(t.target,i),r=ue(rt(e,n),2),o=ue(rt(i.source,i.target),2);return Be(e,n)===0?0:Math.max(0,1-2*Be(o,r)/Be(e,n))},Wh=(i,t)=>Math.min(gf(i,t),gf(t,i)),Gh=i=>{let t=0;for(let e=1;e<i.length;e++)t+=Be(i[e],i[e-1]);return t},Vh={fill:"#fff",fillOpacity:1,lineWidth:1,stroke:"#000",strokeOpacity:.8},pf=.05;class mu extends mo{constructor(t,e){super(t,Object.assign({},mu.defaultOptions,e)),this.shapes=new Map,this.r=this.options.r,this.onEdgeFilter=n=>{if(this.options.trigger==="drag"&&this.isLensOn)return;const r=Lr(n.canvas);this.renderLens(r),this.renderFocusElements()},this.renderLens=n=>{const r=Object.assign({},Vh,this.options.style);this.isLensOn||(this.lens=new Da({style:r}),this.canvas.appendChild(this.lens)),Object.assign(r,fi(n),{size:this.r*2}),this.lens.update(r)},this.getFilterData=()=>{const{filter:n}=this.options,{model:r}=this.context,o=r.getData();if(!n)return o;const{nodes:u,edges:v,combos:S}=o;return{nodes:u.filter(C=>n(sn(C),"node")),edges:v.filter(C=>n(sn(C),"edge")),combos:S.filter(C=>n(sn(C),"combo"))}},this.getFocusElements=n=>{const{nodes:r,edges:o}=this.getFilterData(),u=r.filter(C=>Be(er(C),n)<this.r),v=u.map(C=>sn(C)),S=o.filter(C=>{const{source:T,target:$}=C,lt=v.includes(T),gt=v.includes($);switch(this.options.nodeType){case"both":return lt&>case"either":return lt!==gt;case"source":return lt&&!gt;case"target":return!lt&>default:return!1}});return{nodes:u,edges:S}},this.renderFocusElements=()=>{const{element:n,graph:r}=this.context;if(!this.isLensOn)return;const o=this.lens.getCenter(),{nodes:u,edges:v}=this.getFocusElements(o),S=new Set,C=T=>{const $=sn(T);S.add($);const lt=n.getElement($);if(!lt)return;const gt=this.shapes.get($)||lt.cloneNode();gt.setPosition(lt.getPosition()),gt.id=lt.id,this.shapes.has($)?Object.entries(lt.attributes).forEach(([ve,ke])=>{gt.style[ve]!==ke&&(gt.style[ve]=ke)}):(this.canvas.appendChild(gt),this.shapes.set($,gt));const Gt=r.getElementType($),ee=this.getElementStyle(Gt,T);gt.update(ee)};u.forEach(C),v.forEach(C),this.shapes.forEach((T,$)=>{S.has($)||(T.destroy(),this.shapes.delete($))})},this.scaleRByWheel=n=>{var r;this.options.preventDefault&&n.preventDefault();const{clientX:o,clientY:u,deltaX:v,deltaY:S}=n,{graph:C,canvas:T}=this.context,$=C.getCanvasByClient([o,u]),lt=(r=this.lens)===null||r===void 0?void 0:r.getCenter();if(!this.isLensOn||Be($,lt)>this.r)return;const{maxR:gt,minR:Gt}=this.options,ee=v+S>0?1/(1-pf):1-pf,ve=Math.min(...T.getSize())/2;this.r=Math.max(Gt||0,Math.min(gt||ve,this.r*ee)),this.renderLens(lt),this.renderFocusElements()},this.isLensDragging=!1,this.onDragStart=n=>{var r;const o=Lr(n.canvas),u=(r=this.lens)===null||r===void 0?void 0:r.getCenter();!this.isLensOn||Be(o,u)>this.r||(this.isLensDragging=!0)},this.onDrag=n=>{if(!this.isLensDragging)return;const r=Lr(n.canvas);this.renderLens(r),this.renderFocusElements()},this.onDragEnd=()=>{this.isLensDragging=!1},this.bindEvents()}get canvas(){return this.context.canvas.getLayer("transient")}get isLensOn(){return this.lens&&!this.lens.destroyed}getElementStyle(t,e){const n=t==="node"?this.options.nodeStyle:this.options.edgeStyle;return typeof n=="function"?n(e):n}get graphDom(){return this.context.graph.getCanvas().getContextService().getDomElement()}bindEvents(){var t;const{graph:e}=this.context,{trigger:n,scaleRBy:r}=this.options,o=e.getCanvas().getLayer();["click","drag"].includes(n)&&o.addEventListener(qt.CLICK,this.onEdgeFilter),n==="pointermove"?o.addEventListener(qt.POINTER_MOVE,this.onEdgeFilter):n==="drag"&&(o.addEventListener(qt.DRAG_START,this.onDragStart),o.addEventListener(qt.DRAG,this.onDrag),o.addEventListener(qt.DRAG_END,this.onDragEnd)),r==="wheel"&&((t=this.graphDom)===null||t===void 0||t.addEventListener(qt.WHEEL,this.scaleRByWheel,{passive:!1}))}unbindEvents(){var t;const{graph:e}=this.context,{trigger:n,scaleRBy:r}=this.options,o=e.getCanvas().getLayer();["click","drag"].includes(n)&&o.removeEventListener(qt.CLICK,this.onEdgeFilter),n==="pointermove"?o.removeEventListener(qt.POINTER_MOVE,this.onEdgeFilter):n==="drag"&&(o.removeEventListener(qt.DRAG_START,this.onDragStart),o.removeEventListener(qt.DRAG,this.onDrag),o.removeEventListener(qt.DRAG_END,this.onDragEnd)),r==="wheel"&&((t=this.graphDom)===null||t===void 0||t.removeEventListener(qt.WHEEL,this.scaleRByWheel))}update(t){this.unbindEvents(),super.update(t),this.bindEvents()}destroy(){this.unbindEvents(),this.isLensOn&&this.lens.destroy(),this.shapes.forEach((t,e)=>{t.destroy(),this.shapes.delete(e)}),super.destroy()}}mu.defaultOptions={trigger:"pointermove",r:60,nodeType:"both",filter:()=>!0,style:{lineWidth:2},nodeStyle:{label:!1},edgeStyle:{label:!0},scaleRBy:"wheel",preventDefault:!0};const Uh={fill:"#ccc",fillOpacity:.1,lineWidth:2,stroke:"#000",strokeOpacity:.8,labelFontSize:12},mf=.05,yf=.1;class yu extends mo{constructor(t,e){super(t,Object.assign({},yu.defaultOptions,e)),this.r=this.options.r,this.d=this.options.d,this.onCreateFisheye=n=>{if(this.options.trigger==="drag"&&this.isLensOn)return;const r=Lr(n.canvas);this.onMagnify(r)},this.onMagnify=n=>{n.some(isNaN)||(this.renderLens(n),this.renderFocusElements())},this.renderLens=n=>{const r=Object.assign({},Uh,this.options.style);this.isLensOn||(this.lens=new Da({style:r}),this.canvas.appendChild(this.lens)),Object.assign(r,fi(n),{size:this.r*2,label:this.options.showDPercent,labelText:this.getDPercent()}),this.lens.update(r)},this.getDPercent=()=>{const{minD:n,maxD:r}=this.options;return`${Math.round((this.d-n)/(r-n)*100)}%`},this.prevMagnifiedStyleMap=new Map,this.prevOriginStyleMap=new Map,this.renderFocusElements=()=>{if(!this.isLensOn)return;const{graph:n}=this.context,r=this.lens.getCenter(),o=(this.d+1)*this.r,u=new Map,v=new Map;n.getNodeData().forEach(C=>{const T=er(C),$=Be(T,r);if($>this.r)return;const lt=o*$/(this.d*$+this.r),[gt,Gt]=T,[ee,ve]=r,ke=(gt-ee)/$,ze=(Gt-ve)/$,Ke=[ee+lt*ke,ve+lt*ze],ln=sn(C),kn=this.getNodeStyle(C),Tn=(0,xo.Z)(n.getElementRenderStyle(ln),Object.keys(kn));u.set(ln,Object.assign(Object.assign({},fi(Ke)),kn)),v.set(ln,Object.assign(Object.assign({},fi(T)),Tn))}),this.updateStyle(u,v)},this.getNodeStyle=n=>{const{nodeStyle:r}=this.options;return typeof r=="function"?r(n):r},this.updateStyle=(n,r)=>{const{graph:o,element:u}=this.context,{enter:v,exit:S,keep:C}=Dt(Array.from(this.prevMagnifiedStyleMap.keys()),Array.from(n.keys()),lt=>lt),T=new Set,$=(lt,gt)=>{const Gt=u.getElement(lt);Gt==null||Gt.update(gt),o.getRelatedEdgesData(lt).forEach(ee=>{T.add(sn(ee))})};[...v,...C].forEach(lt=>{$(lt,n.get(lt))}),S.forEach(lt=>{$(lt,this.prevOriginStyleMap.get(lt)),this.prevOriginStyleMap.delete(lt)}),T.forEach(lt=>{const gt=u.getElement(lt);gt==null||gt.update({})}),this.prevMagnifiedStyleMap=n,r.forEach((lt,gt)=>{this.prevOriginStyleMap.has(gt)||this.prevOriginStyleMap.set(gt,lt)})},this.isWheelValid=n=>{if(this.options.preventDefault&&n.preventDefault(),!this.isLensOn)return!1;const{clientX:r,clientY:o}=n,u=this.context.graph.getCanvasByClient([r,o]),v=this.lens.getCenter();return!(Be(u,v)>this.r)},this.scaleR=n=>{const{maxR:r,minR:o}=this.options,u=n?1/(1-mf):1-mf,v=Math.min(...this.context.canvas.getSize())/2;this.r=Math.max(o||0,Math.min(r||v,this.r*u))},this.scaleD=n=>{const{maxD:r,minD:o}=this.options,u=n?this.d+yf:this.d-yf;this.d=Math.max(o,Math.min(r,u))},this.scaleRByWheel=n=>{if(!this.isWheelValid(n))return;const{deltaX:r,deltaY:o}=n;this.scaleR(r+o>0);const u=this.lens.getCenter();this.onMagnify(u)},this.scaleDByWheel=n=>{if(!this.isWheelValid(n))return;const{deltaX:r,deltaY:o}=n;this.scaleD(r+o>0);const u=this.lens.getCenter();this.onMagnify(u)},this.isDragValid=n=>{if(this.options.preventDefault&&n.preventDefault(),!this.isLensOn)return!1;const r=Lr(n.canvas),o=this.lens.getCenter();return!(Be(r,o)>this.r)},this.isLensDragging=!1,this.onDragStart=n=>{this.isDragValid(n)&&(this.isLensDragging=!0)},this.onDrag=n=>{if(!this.isLensDragging)return;const r=Lr(n.canvas);this.onMagnify(r)},this.onDragEnd=()=>{this.isLensDragging=!1},this.scaleRByDrag=n=>{if(!this.isLensDragging)return;const{dx:r,dy:o}=n;this.scaleR(r-o>0);const u=this.lens.getCenter();this.onMagnify(u)},this.scaleDByDrag=n=>{if(!this.isLensDragging)return;const{dx:r,dy:o}=n;this.scaleD(r-o>0);const u=this.lens.getCenter();this.onMagnify(u)},this.bindEvents()}get canvas(){return this.context.canvas.getLayer("transient")}get isLensOn(){return this.lens&&!this.lens.destroyed}get graphDom(){return this.context.graph.getCanvas().getContextService().getDomElement()}bindEvents(){var t;const{graph:e}=this.context,{trigger:n,scaleRBy:r,scaleDBy:o}=this.options,u=e.getCanvas().getLayer();if(["click","drag"].includes(n)&&u.addEventListener(qt.CLICK,this.onCreateFisheye),n==="pointermove"&&u.addEventListener(qt.POINTER_MOVE,this.onCreateFisheye),n==="drag"||r==="drag"||o==="drag"){u.addEventListener(qt.DRAG_START,this.onDragStart),u.addEventListener(qt.DRAG_END,this.onDragEnd);const v=n==="drag"?this.onDrag:r==="drag"?this.scaleRByDrag:this.scaleDByDrag;u.addEventListener(qt.DRAG,v)}if(r==="wheel"||o==="wheel"){const v=r==="wheel"?this.scaleRByWheel:this.scaleDByWheel;(t=this.graphDom)===null||t===void 0||t.addEventListener(qt.WHEEL,v,{passive:!1})}}unbindEvents(){var t;const{graph:e}=this.context,{trigger:n,scaleRBy:r,scaleDBy:o}=this.options,u=e.getCanvas().getLayer();if(["click","drag"].includes(n)&&u.removeEventListener(qt.CLICK,this.onCreateFisheye),n==="pointermove"&&u.removeEventListener(qt.POINTER_MOVE,this.onCreateFisheye),n==="drag"||r==="drag"||o==="drag"){u.removeEventListener(qt.DRAG_START,this.onDragStart),u.removeEventListener(qt.DRAG_END,this.onDragEnd);const v=n==="drag"?this.onDrag:r==="drag"?this.scaleRByDrag:this.scaleDByDrag;u.removeEventListener(qt.DRAG,v)}if(r==="wheel"||o==="wheel"){const v=r==="wheel"?this.scaleRByWheel:this.scaleDByWheel;(t=this.graphDom)===null||t===void 0||t.removeEventListener(qt.WHEEL,v)}}update(t){this.unbindEvents(),super.update(t),this.bindEvents()}destroy(){var t;this.unbindEvents(),this.isLensOn&&((t=this.lens)===null||t===void 0||t.destroy()),this.prevMagnifiedStyleMap.clear(),this.prevOriginStyleMap.clear(),super.destroy()}}yu.defaultOptions={trigger:"pointermove",r:120,d:1.5,maxD:5,minD:0,showDPercent:!0,style:{},nodeStyle:{label:!0},preventDefault:!0};class bu extends mo{constructor(t,e){super(t,Object.assign({},bu.defaultOptions,e)),this.$el=this.context.canvas.getContainer(),this.graphSize=[0,0],this.onFullscreenChange=()=>{var n,r,o,u;const v=!!document.fullscreenElement;this.options.autoFit&&this.setGraphSize(v),v?(r=(n=this.options).onEnter)===null||r===void 0||r.call(n):(u=(o=this.options).onExit)===null||u===void 0||u.call(o)},this.shortcut=new Fa(t.graph),this.bindEvents(),this.style=document.createElement("style"),document.head.appendChild(this.style),this.style.innerHTML=`
|
|
|
:not(:root):fullscreen::backdrop {
|
|
|
background: transparent;
|
|
|
}
|
|
|
`}bindEvents(){this.unbindEvents(),this.shortcut.unbindAll();const{request:t=[],exit:e=[]}=this.options.trigger;this.shortcut.bind(t,this.request),this.shortcut.bind(e,this.exit),["webkitfullscreenchange","mozfullscreenchange","fullscreenchange","MSFullscreenChange"].forEach(r=>{document.addEventListener(r,this.onFullscreenChange,!1)})}unbindEvents(){this.shortcut.unbindAll(),["webkitfullscreenchange","mozfullscreenchange","fullscreenchange","MSFullscreenChange"].forEach(e=>{document.removeEventListener(e,this.onFullscreenChange,!1)})}setGraphSize(t=!0){let e,n;t?(e=window.screen.width,n=window.screen.height,this.graphSize=this.context.graph.getSize()):[e,n]=this.graphSize,this.context.graph.setSize(e,n),this.context.graph.render()}request(){document.fullscreenElement||!Hh()||this.$el.requestFullscreen().catch(t=>{at.warn(`Error attempting to enable full-screen: ${t.message} (${t.name})`)})}exit(){document.fullscreenElement&&document.exitFullscreen()}update(t){this.unbindEvents(),super.update(t),this.bindEvents()}destroy(){this.exit(),this.style.remove(),super.destroy()}}bu.defaultOptions={trigger:{},autoFit:!0};function Hh(){return document.fullscreenEnabled||Reflect.get(document,"webkitFullscreenEnabled")||Reflect.get(document,"mozFullscreenEnabled")||Reflect.get(document,"msFullscreenEnabled")}class Eu extends mo{constructor(t,e){super(t,Object.assign({},Eu.defaultOptions,e)),this.$element=mc("grid-line"),this.offset=[0,0],this.onTransform=r=>{if(!this.options.follow)return;const{data:{translate:o}}=r;o&&this.updateOffset(o)};const n=this.context.canvas.getContainer();Dh(n,this.$element),this.updateStyle(),this.bindEvents()}update(t){super.update(t),this.updateStyle()}bindEvents(){const{graph:t}=this.context;t.on(Oe.AFTER_TRANSFORM,this.onTransform)}updateStyle(){const{size:t,stroke:e,lineWidth:n,border:r,borderLineWidth:o,borderStroke:u,borderStyle:v}=this.options;Object.assign(this.$element.style,{border:r?`${o}px ${v} ${u}`:"none",backgroundImage:`linear-gradient(${e} ${n}px, transparent ${n}px), linear-gradient(90deg, ${e} ${n}px, transparent ${n}px)`,backgroundSize:`${t}px ${t}px`})}updateOffset(t){this.offset=Pn(rt(this.offset,t),this.options.size),this.$element.style.backgroundPosition=`${this.offset[0]}px ${this.offset[1]}px`}destroy(){this.context.graph.off(Oe.AFTER_TRANSFORM,this.onTransform),this.$element.remove(),super.destroy()}}Eu.defaultOptions={border:!0,borderLineWidth:1,borderStroke:"#eee",borderStyle:"solid",lineWidth:1,size:20,stroke:"#eee"};var $d=d(49336);function Wd(i){const t={Added:new Map,Updated:new Map,Removed:new Map};return i.forEach(e=>{const{type:n,value:r}=e,o=sn(r);if(n==="NodeAdded"||n==="EdgeAdded"||n==="ComboAdded")t.Added.set(o,e);else if(n==="NodeUpdated"||n==="EdgeUpdated"||n==="ComboUpdated")if(t.Added.has(o))t.Added.set(o,{type:n.replace("Updated","Added"),value:r});else if(t.Updated.has(o)){const{original:u}=t.Updated.get(o);t.Updated.set(o,{type:n,value:r,original:u})}else t.Removed.has(o)||t.Updated.set(o,e);else(n==="NodeRemoved"||n==="EdgeRemoved"||n==="ComboRemoved")&&(t.Added.has(o)?t.Added.delete(o):(t.Updated.has(o)&&t.Updated.delete(o),t.Removed.set(o,e)))}),[...Array.from(t.Added.values()),...Array.from(t.Updated.values()),...Array.from(t.Removed.values())]}function bf(i){const{NodeAdded:t=[],NodeUpdated:e=[],NodeRemoved:n=[],EdgeAdded:r=[],EdgeUpdated:o=[],EdgeRemoved:u=[],ComboAdded:v=[],ComboUpdated:S=[],ComboRemoved:C=[]}=(0,Rt.Z)(i,T=>T.type);return{add:{nodes:t,edges:r,combos:v},update:{nodes:e,edges:o,combos:S},remove:{nodes:n,edges:u,combos:C}}}function Ef(i,t){for(const e in i)(0,Xt.Z)(i[e])&&!Array.isArray(i[e])&&i[e]!==null?(t[e]||(t[e]={}),Ef(i[e],t[e])):t[e]===void 0&&(t[e]=ge(e))}function Yh(i,t=!1,e){const n={animation:t,current:{add:{},update:{},remove:{}},original:{add:{},update:{},remove:{}}},{add:r,update:o,remove:u}=bf(Wd(i));return["nodes","edges","combos"].forEach(v=>{o[v]&&o[v].forEach(S=>{var C,T;const $=Object.assign({},S.value);let lt=Object.assign({},S.original);if(e){const gt=e.graph.getElementType(sn(S.original)),Gt=gt==="edge"?"stroke":"fill",ee=e.element.getElementComputedStyle(gt,S.original);lt=Object.assign(Object.assign({},S.original),{style:Object.assign({[Gt]:ee[Gt]},S.original.style)})}Ef($,lt),(C=n.current.update)[v]||(C[v]=[]),n.current.update[v].push($),(T=n.original.update)[v]||(T[v]=[]),n.original.update[v].push(lt)}),r[v]&&r[v].forEach(S=>{var C,T;const $=Object.assign({},S.value);(C=n.current.add)[v]||(C[v]=[]),n.current.add[v].push($),(T=n.original.remove)[v]||(T[v]=[]),n.original.remove[v].push($)}),u[v]&&u[v].forEach(S=>{var C,T;const $=Object.assign({},S.value);(C=n.current.remove)[v]||(C[v]=[]),n.current.remove[v].push($),(T=n.original.add)[v]||(T[v]=[]),n.original.add[v].push($)})}),n}class xu extends mo{constructor(t,e){super(t,Object.assign({},xu.defaultOptions,e)),this.batchChanges=null,this.batchAnimation=!1,this.undoStack=[],this.redoStack=[],this.freezed=!1,this.executeCommand=(r,o=!0)=>{var u,v,S;this.freezed=!0,(v=(u=this.options).executeCommand)===null||v===void 0||v.call(u,r);const C=o?r.original:r.current;this.context.graph.addData(C.add),this.context.graph.updateData(C.update),this.context.graph.removeData(y(C.remove,!1)),(S=this.context.element)===null||S===void 0||S.draw({silence:!0,animation:r.animation}),this.freezed=!1},this.addCommand=r=>{var o;if(!this.freezed){if(r.type===Oe.AFTER_DRAW){const{dataChanges:u=[],animation:v=!0}=r.data;if(!((o=this.context.batch)===null||o===void 0)&&o.isBatching){if(!this.batchChanges)return;this.batchChanges.push(u),this.batchAnimation&&(this.batchAnimation=v);return}this.batchChanges=[u],this.batchAnimation=v}this.undoStackPush(Yh(this.batchChanges.flat(),this.batchAnimation,this.context)),this.notify(Qe.ADD,this.undoStack[this.undoStack.length-1])}},this.initBatchCommand=r=>{const{initiate:o}=r.data;this.batchAnimation=!1,o?this.batchChanges=[]:this.undoStack.pop()||(this.batchChanges=null)},this.emitter=new $d.Z;const{graph:n}=this.context;n.on(Oe.AFTER_DRAW,this.addCommand),n.on(Oe.BATCH_START,this.initBatchCommand),n.on(Oe.BATCH_END,this.addCommand)}canUndo(){return this.undoStack.length>0}canRedo(){return this.redoStack.length>0}undo(){var t,e,n,r;const o=this.undoStack.pop();if(o){if(this.executeCommand(o),((e=(t=this.options).beforeAddCommand)===null||e===void 0?void 0:e.call(t,o,!1))===!1)return;this.redoStack.push(o),(r=(n=this.options).afterAddCommand)===null||r===void 0||r.call(n,o,!1),this.notify(Qe.UNDO,o)}return this}redo(){const t=this.redoStack.pop();return t&&(this.executeCommand(t,!1),this.undoStackPush(t),this.notify(Qe.REDO,t)),this}undoAndCancel(){const t=this.undoStack.pop();return t&&(this.executeCommand(t,!1),this.redoStack=[],this.notify(Qe.CANCEL,t)),this}undoStackPush(t){var e,n,r,o;const{stackSize:u}=this.options;u!==0&&this.undoStack.length>=u&&this.undoStack.shift(),((n=(e=this.options).beforeAddCommand)===null||n===void 0?void 0:n.call(e,t,!0))!==!1&&(this.undoStack.push(t),(o=(r=this.options).afterAddCommand)===null||o===void 0||o.call(r,t,!0))}clear(){this.undoStack=[],this.redoStack=[],this.batchChanges=null,this.batchAnimation=!1,this.notify(Qe.CLEAR,null)}notify(t,e){this.emitter.emit(t,{cmd:e}),this.emitter.emit(Qe.CHANGE,{cmd:e})}on(t,e){this.emitter.on(t,e)}destroy(){const{graph:t}=this.context;t.off(Oe.AFTER_DRAW,this.addCommand),t.off(Oe.BATCH_START,this.initBatchCommand),t.off(Oe.BATCH_END,this.addCommand),this.emitter.off(),super.destroy(),this.undoStack=[],this.redoStack=[]}}xu.defaultOptions={stackSize:0};var Kh=d(76117),Xh=d.n(Kh);function Qh(i,t,e){if(i.length===1)return Jh(i[0],t,e);if(i.length===2)return qh(i,t,e);switch(e){case"smooth":return e0(i,t);case"sharp":return n0(i,t);case"rounded":default:return t0(i,t)}}const Jh=(i,t,e)=>{if(e==="sharp")return[["M",i[0]-t,i[1]-t],["L",i[0]+t,i[1]-t],["L",i[0]+t,i[1]+t],["L",i[0]-t,i[1]+t],["Z"]];const n=[t,t,0,0,0];return[["M",i[0],i[1]-t],["A",...n,i[0],i[1]+t],["A",...n,i[0],i[1]-t]]},qh=(i,t,e)=>{const n=[t,t,0,0,0],r=e==="sharp"?rt(i[0],Pe(en($t(i[0],i[1])),t)):i[0],o=e==="sharp"?rt(i[1],Pe(en($t(i[1],i[0])),t)):i[1],u=Pe(en(Sn($t(r,o),!1)),t),v=Pe(u,-1),S=rt(r,u),C=rt(o,u),T=rt(o,v),$=rt(r,v);return e==="sharp"?[["M",S[0],S[1]],["L",C[0],C[1]],["L",T[0],T[1]],["L",$[0],$[1]],["Z"]]:[["M",S[0],S[1]],["L",C[0],C[1]],["A",...n,T[0],T[1]],["L",$[0],$[1]],["A",...n,S[0],S[1]]]},t0=(i,t)=>{const e=va(i).map((v,S)=>{const C=(S-2+i.length)%i.length,T=(S-1+i.length)%i.length,$=(S+1)%i.length,lt=i[C],gt=i[T],Gt=i[$],ee=$t(lt,gt),ve=$t(gt,v),ke=$t(v,Gt),ze=(In,hn)=>un(In,hn,!0)<Math.PI,Ke=ze(ee,ve),ln=ze(ve,ke),kn=In=>Pe(en(Sn(In,!1)),t),Tn=kn(ve);return[{p:$n(Ke?rt(gt,kn(ee)):rt(gt,Tn)),concave:Ke&>},{p:$n(ln?rt(v,kn(ke)):rt(v,Tn)),concave:ln&&v}]}),n=[t,t,0,0,0],r=e.findIndex((v,S)=>!e[(S-1+e.length)%e.length][0].concave&&!e[(S-1+e.length)%e.length][1].concave&&!v[0].concave&&!v[0].concave&&!v[1].concave),o=e.slice(r).concat(e.slice(0,r));let u=[];return o.flatMap((v,S)=>{const C=[],T=o[e.length-1];return S===0&&C.push(["M",...T[1].p]),v[0].concave?u.push(v[0].p,v[1].p):C.push(["A",...n,...v[0].p]),v[1].concave?u.unshift(v[1].p):C.push(["L",...v[1].p]),u.length===3&&(C.pop(),C.push(["C",...u.flat()]),u=[]),C})},e0=(i,t)=>{const e=va(i).map((n,r)=>{const o=i[(r+1)%i.length];return{p:n,v:en($t(o,n))}});return e.forEach((n,r)=>{const o=r>0?r-1:i.length-1,u=e[o].v,v=en(rt(u,Pe(n.v,un(u,n.v,!0)<Math.PI?1:-1)));n.p=rt(n.p,Pe(v,t))}),Wa(e.map(n=>n.p))},n0=(i,t)=>{const n=i.map((o,u)=>{const v=i[u===0?i.length-1:u-1],S=Wn(Pe(en(Sn($t(v,o),!1)),t));return[rt(v,S),rt(o,S)]}).flat();return n.map((o,u)=>{if(u%2===0)return null;const v=[n[(u-1)%n.length],n[u%n.length]],S=[n[(u+1)%n.length],n[(u+2)%n.length]];return Zn(v,S,!0)}).filter(Boolean).map((o,u)=>[u===0?"M":"L",o[0],o[1]]).concat([["Z"]])};var r0=function(i,t){var e={};for(var n in i)Object.prototype.hasOwnProperty.call(i,n)&&t.indexOf(n)<0&&(e[n]=i[n]);if(i!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,n=Object.getOwnPropertySymbols(i);r<n.length;r++)t.indexOf(n[r])<0&&Object.prototype.propertyIsEnumerable.call(i,n[r])&&(e[n[r]]=i[n[r]]);return e};class wu extends mo{constructor(t,e){super(t,Object.assign({},wu.defaultOptions,e)),this.hullMemberIds=[],this.drawHull=()=>{if(!this.shape)this.shape=new Ro({style:this.getHullStyle()}),this.context.canvas.appendChild(this.shape);else{const n=!(0,Bt.Z)(this.optionsCache,this.options);this.shape.update(this.getHullStyle(n))}this.optionsCache=Object.assign({},this.options)},this.updateHullPath=n=>{this.shape&&this.options.members.includes(sn(n.data))&&this.shape.update({d:this.getHullPath(!0)})},this.getHullPath=(n=!1)=>{const{graph:r}=this.context,o=this.getMember();if(o.length===0)return"";const u=o.map(C=>r.getNodeData(C)),v=Xh()(u.map(er),this.options.concavity).slice(1).reverse(),S=v.flatMap(C=>u.filter(T=>(0,Bt.Z)(er(T),C)).map(sn));return(0,Bt.Z)(S,this.hullMemberIds)&&!n?this.path:(this.hullMemberIds=S,this.path=Qh(v,this.getPadding(),this.options.corner),this.path)},this.bindEvents()}bindEvents(){this.context.graph.on(Oe.AFTER_RENDER,this.drawHull),this.context.graph.on(Oe.AFTER_ELEMENT_UPDATE,this.updateHullPath)}getHullStyle(t){const e=this.options,{members:n,padding:r,corner:o}=e,u=r0(e,["members","padding","corner"]);return Object.assign(Object.assign({},u),{d:this.getHullPath(t)})}getPadding(){const{graph:t}=this.context;return this.hullMemberIds.reduce((n,r)=>{const{halfExtents:o}=t.getElementRenderBounds(r),u=Math.max(o[0],o[1]);return Math.max(n,u)},0)+this.options.padding}addMember(t){const e=Array.isArray(t)?t:[t];this.options.members=[...new Set([...this.options.members,...e])],this.shape.update({d:this.getHullPath()})}removeMember(t){const e=Array.isArray(t)?t:[t];this.options.members=this.options.members.filter(n=>!e.includes(n)),e.some(n=>this.hullMemberIds.includes(n))&&this.shape.update({d:this.getHullPath()})}updateMember(t){this.options.members=(0,At.Z)(t)?t(this.options.members):t,this.shape.update(this.getHullStyle(!0))}getMember(){return this.options.members}destroy(){this.context.graph.off(Oe.AFTER_DRAW,this.drawHull),this.shape.destroy(),this.hullMemberIds=[],super.destroy()}}wu.defaultOptions={members:[],padding:10,corner:"rounded",concavity:1/0,fill:"lightblue",fillOpacity:.2,labelOpacity:1,stroke:"blue",strokeOpacity:.2};var nl=d(17911);function xf(i){for(var t=1/0,e=1/0,n=-1/0,r=-1/0,o=0;o<i.length;o++){var u=i[o],v=u.x,S=u.y,C=u.width,T=u.height,$=(0,ui.CR)([v+C,S+T],2),lt=$[0],gt=$[1];v<t&&(t=v),S<e&&(e=S),lt>n&&(n=lt),gt>r&&(r=gt)}return new nl.b(t,e,n-t,r-e)}var i0=function(i,t,e){var n=i.width,r=i.height,o=e.flexDirection,u=o===void 0?"row":o,v=e.flexWrap,S=v===void 0?"nowrap":v,C=e.justifyContent,T=C===void 0?"flex-start":C,$=e.alignContent,lt=$===void 0?"flex-start":$,gt=e.alignItems,Gt=gt===void 0?"flex-start":gt,ee=u==="row",ve=u==="row"||u==="column",ke=ee?ve?[1,0]:[-1,0]:ve?[0,1]:[0,-1],ze=(0,ui.CR)([0,0],2),Ke=ze[0],ln=ze[1],kn=t.map(function(pr){var Sr,dr=pr.width,Ir=pr.height,Yi=(0,ui.CR)([Ke,ln],2),ir=Yi[0],Hr=Yi[1];return Sr=(0,ui.CR)([Ke+dr*ke[0],ln+Ir*ke[1]],2),Ke=Sr[0],ln=Sr[1],new nl.b(ir,Hr,dr,Ir)}),Tn=xf(kn),In={"flex-start":0,"flex-end":ee?n-Tn.width:r-Tn.height,center:ee?(n-Tn.width)/2:(r-Tn.height)/2},hn=kn.map(function(pr){var Sr=pr.x,dr=pr.y,Ir=nl.b.fromRect(pr);return Ir.x=ee?Sr+In[T]:Sr,Ir.y=ee?dr:dr+In[T],Ir}),or=xf(hn),yr=function(pr){var Sr=(0,ui.CR)(ee?["height",r]:["width",n],2),dr=Sr[0],Ir=Sr[1];switch(Gt){case"flex-start":return 0;case"flex-end":return Ir-pr[dr];case"center":return Ir/2-pr[dr]/2;default:return 0}},Vn=hn.map(function(pr){var Sr=pr.x,dr=pr.y,Ir=nl.b.fromRect(pr);return Ir.x=ee?Sr:Sr+yr(Ir),Ir.y=ee?dr+yr(Ir):dr,Ir}),Dr=Vn.map(function(pr){var Sr,dr,Ir=nl.b.fromRect(pr);return Ir.x+=(Sr=i.x)!==null&&Sr!==void 0?Sr:0,Ir.y+=(dr=i.y)!==null&&dr!==void 0?dr:0,Ir});return Dr},a0=function(i,t,e){return[]},o0=function(i,t,e){if(t.length===0)return[];var n={flex:i0,grid:a0},r=e.display in n?n[e.display]:null;return(r==null?void 0:r.call(null,i,t,e))||[]},Su=d(98294),s0=function(i){(0,ui.ZT)(t,i);function t(e){var n=i.call(this,e)||this;n.layoutEvents=[nt.Dk.BOUNDS_CHANGED,nt.Dk.INSERTED,nt.Dk.REMOVED],n.$margin=(0,Su.j)(0),n.$padding=(0,Su.j)(0);var r=e.style||{},o=r.margin,u=o===void 0?0:o,v=r.padding,S=v===void 0?0:v;return n.margin=u,n.padding=S,n.isMutationObserved=!0,n.bindEvents(),n}return Object.defineProperty(t.prototype,"margin",{get:function(){return this.$margin},set:function(e){this.$margin=(0,Su.j)(e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"padding",{get:function(){return this.$padding},set:function(e){this.$padding=(0,Su.j)(e)},enumerable:!1,configurable:!0}),t.prototype.getBBox=function(){var e=this.attributes,n=e.x,r=n===void 0?0:n,o=e.y,u=o===void 0?0:o,v=e.width,S=e.height,C=(0,ui.CR)(this.$margin,4),T=C[0],$=C[1],lt=C[2],gt=C[3];return new nl.b(r-gt,u-T,v+gt+$,S+T+lt)},t.prototype.appendChild=function(e,n){return e.isMutationObserved=!0,i.prototype.appendChild.call(this,e,n),e},t.prototype.getAvailableSpace=function(){var e=this.attributes,n=e.width,r=e.height,o=(0,ui.CR)(this.$padding,4),u=o[0],v=o[1],S=o[2],C=o[3],T=(0,ui.CR)(this.$margin,4),$=T[0],lt=T[3];return new nl.b(C+lt,u+$,n-C-v,r-u-S)},t.prototype.layout=function(){if(!(!this.attributes.display||!this.isConnected)&&!this.children.some(function(u){return!u.isConnected}))try{var e=this.attributes,n=e.x,r=e.y;this.style.transform="translate(".concat(n,", ").concat(r,")");var o=o0(this.getAvailableSpace(),this.children.map(function(u){return u.getBBox()}),this.attributes);this.children.forEach(function(u,v){var S=o[v],C=S.x,T=S.y;u.style.transform="translate(".concat(C,", ").concat(T,")")})}catch(u){}},t.prototype.bindEvents=function(){var e=this;this.layoutEvents.forEach(function(n){e.addEventListener(n,function(r){r.target&&(r.target.isMutationObserved=!0,e.layout())})})},t.prototype.attributeChangedCallback=function(e,n,r){e==="margin"?this.margin=r:e==="padding"&&(this.padding=r),this.layout()},t}(nt.ZA),l0=d(65244),c0=function(i,t){var e={};for(var n in i)Object.prototype.hasOwnProperty.call(i,n)&&t.indexOf(n)<0&&(e[n]=i[n]);if(i!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,n=Object.getOwnPropertySymbols(i);r<n.length;r++)t.indexOf(n[r])<0&&Object.prototype.propertyIsEnumerable.call(i,n[r])&&(e[n[r]]=i[n[r]]);return e};class Mu extends mo{constructor(t,e){super(t,Object.assign({},Mu.defaultOptions,e)),this.typePrefix="__data__",this.element=null,this.draw=!1,this.fieldMap={node:new Map,edge:new Map,combo:new Map},this.selectedItems=[],this.bindEvents=()=>{const{graph:n}=this.context;n.on(Oe.AFTER_DRAW,this.createElement)},this.changeState=(n,r)=>{const{graph:o}=this.context,{typePrefix:u}=this,v=(0,Di.Z)(n,[u,"id"]),S=(0,Di.Z)(n,[u,"style","labelText"]),[C]=v.split("__"),T=this.fieldMap[C].get(S)||[];o.setElementState(Object.fromEntries(T==null?void 0:T.map($=>[$,r])))},this.click=n=>{if(this.options.trigger==="hover")return;const r=(0,Di.Z)(n,[this.typePrefix,"id"]);this.selectedItems.includes(r)?(this.selectedItems=this.selectedItems.filter(o=>o!==r),this.changeState(n,[])):(this.selectedItems.push(r),this.changeState(n,"selected"))},this.mouseleave=n=>{this.options.trigger!=="click"&&(this.selectedItems=[],this.changeState(n,[]))},this.mouseenter=n=>{if(this.options.trigger==="click")return;const r=(0,Di.Z)(n,[this.typePrefix,"id"]);this.selectedItems.includes(r)?this.selectedItems=this.selectedItems.filter(o=>o!==r):(this.selectedItems.push(r),this.changeState(n,"active"))},this.setFieldMap=(n,r,o)=>{if(!n)return;const u=this.fieldMap[o];if(u)if(!u.has(n))u.set(n,[r]);else{const v=u.get(n);v&&(v.push(r),u.set(n,v))}},this.getEvents=()=>({mouseenter:this.mouseenter,mouseleave:this.mouseleave,click:this.click}),this.getMarkerData=(n,r)=>{if(!n)return[];const{model:o,element:u,graph:v}=this.context,{nodes:S,edges:C,combos:T}=o.getData(),$={},lt=ke=>(0,At.Z)(n)?n(ke):n,gt={node:"circle",edge:"line",combo:"rect"},Gt={circle:"circle",ellipse:"circle",image:"bowtie",rect:"square",star:"cross",triangle:"triangle",diamond:"diamond",cubic:"dot",line:"hyphen",polyline:"hyphen",quadratic:"hv","cubic-horizontal":"hyphen","cubic-vertical":"line"},ee=(ke,ze)=>u==null?void 0:u.getElementComputedStyle(ke,ze),ve=(ke,ze)=>{ke.forEach(Ke=>{const{id:ln}=Ke,kn=(0,Di.Z)(Ke,["data",lt(Ke)]),Tn=(u==null?void 0:u.getElementType(ze,Ke))||"circle",In=ee(ze,Ke),hn=(ze==="edge"?In==null?void 0:In.stroke:In==null?void 0:In.fill)||"#1783ff";ln&&kn&&kn.replace(/\s+/g,"")&&(this.setFieldMap(kn,ln,ze),$[kn]||($[kn]={id:`${ze}__${ln}`,label:kn,marker:Gt[Tn]||gt[ze],elementType:ze,lineWidth:1,stroke:hn,fill:hn}))})};switch(r){case"node":ve(S,"node");break;case"edge":ve(C,"edge");break;case"combo":ve(T,"combo");break;default:return[]}return Object.values($)},this.layout=n=>{const r={flexDirection:"row",alignItems:"flex-end",justifyContent:"center"};let{flexDirection:o,alignItems:u,justifyContent:v}=r;const S={top:["row","flex-start","center"],bottom:["row","flex-end","center"],left:["column","flex-start","center"],right:["column","flex-end","center"]};return n in S&&([o,u,v]=S[n]),{display:"flex",flexDirection:o,justifyContent:v,alignItems:u}},this.createElement=()=>{if(this.draw){this.updateElement();return}const{canvas:n}=this.context,[r,o]=n.getSize(),u=this.options,{width:v=r,height:S=o,nodeField:C,edgeField:T,comboField:$,trigger:lt,position:gt}=u,Gt=c0(u,["width","height","nodeField","edgeField","comboField","trigger","position"]),ee=this.getMarkerData(C,"node"),ve=this.getMarkerData(T,"edge"),ke=this.getMarkerData($,"combo"),ze=[...ee,...ke,...ve],Ke=this.layout(gt),ln=new s0({style:Object.assign({width:v,height:S},Ke)}),kn=Object.assign({width:v,height:S,data:ze,itemMarkerLineWidth:({lineWidth:In})=>In,itemMarker:({marker:In})=>In,itemMarkerStroke:({stroke:In})=>In,itemMarkerFill:({fill:In})=>In,gridCol:ee.length},Gt,this.getEvents()),Tn=new l0.W({className:"legend",style:kn});ln.appendChild(Tn),n.appendChild(ln),this.element=ln,this.draw=!0},this.bindEvents()}update(t){super.update(t),this.clear(),this.createElement()}clear(){var t;(t=this.element)===null||t===void 0||t.destroy(),this.element=null,this.draw=!1}updateElement(){if(!this.element)return;this.element.getChildByIndex(0).update({itemMarkerOpacity:({id:e})=>!this.selectedItems.length||this.selectedItems.includes(e)?1:.5,itemLabelOpacity:({id:e})=>!this.selectedItems.length||this.selectedItems.includes(e)?1:.5})}destroy(){this.clear(),this.context.graph.off(Oe.AFTER_DRAW,this.createElement),super.destroy()}}Mu.defaultOptions={position:"bottom",trigger:"hover",orientation:"horizontal",layout:"flex",itemSpacing:4,rowPadding:10,colPadding:10,itemMarkerSize:16,itemLabelFontSize:16};class Cu extends mo{constructor(t,e){super(t,Object.assign({},Cu.defaultOptions,e)),this.onDraw=n=>{var r;!((r=n==null?void 0:n.data)===null||r===void 0)&&r.render||this.onRender()},this.shapes=new Map,this.landmarkMap=new Map,this.mask=null,this.isMaskDragging=!1,this.onMaskDragStart=n=>{this.mask&&(this.isMaskDragging=!0,this.mask.setPointerCapture(n.pointerId),this.mask.addEventListener("pointermove",this.onMaskDrag),this.mask.addEventListener("pointerup",this.onMaskDragEnd),this.mask.addEventListener("pointercancel",this.onMaskDragEnd))},this.onMaskDrag=n=>{if(!this.mask||!this.isMaskDragging)return;const{size:[r,o]}=this.options,{movementX:u,movementY:v}=n,{left:S,top:C,width:T,height:$}=this.mask.style,[,,lt,gt]=this.maskBBox;let Gt=parseInt(S)+u,ee=parseInt(C)+v,ve=parseInt(T),ke=parseInt($);Gt<0&&(Gt=0),ee<0&&(ee=0),Gt+ve>r&&(Gt=Zs(r-ve,0)),ee+ke>o&&(ee=Zs(o-ke,0)),ve<lt&&(u>0?(Gt=Zs(Gt-u,0),ve=_s(ve+u,r)):u<0&&(ve=_s(ve-u,r))),ke<gt&&(v>0?(ee=Zs(ee-v,0),ke=_s(ke+v,o)):v<0&&(ke=_s(ke-v,o))),Object.assign(this.mask.style,{left:Gt+"px",top:ee+"px",width:ve+"px",height:ke+"px"});const ze=parseInt(S)-Gt,Ke=parseInt(C)-ee;if(ze===0&&Ke===0)return;const ln=this.context.canvas.getCamera().getZoom(),kn=this.canvas.getCamera().getZoom(),Tn=ln/kn;this.context.graph.translateBy([ze*Tn,Ke*Tn],!1)},this.onMaskDragEnd=n=>{this.mask&&(this.isMaskDragging=!1,this.mask.releasePointerCapture(n.pointerId),this.mask.removeEventListener("pointermove",this.onMaskDrag),this.mask.removeEventListener("pointerup",this.onMaskDragEnd),this.mask.removeEventListener("pointercancel",this.onMaskDragEnd))},this.onTransform=(0,_t.Z)(()=>{this.isMaskDragging||(this.updateMask(),this.setCamera())},32,{leading:!0}),this.setOnRender(),this.bindEvents()}update(t){this.unbindEvents(),super.update(t),"delay"in t&&this.setOnRender(),this.bindEvents()}setOnRender(){this.onRender=(0,ws.Z)(()=>{this.renderMinimap(),this.renderMask()},this.options.delay,!0)}bindEvents(){const{graph:t}=this.context;t.on(Oe.AFTER_DRAW,this.onDraw),t.on(Oe.AFTER_RENDER,this.onRender),t.on(Oe.AFTER_TRANSFORM,this.onTransform)}unbindEvents(){const{graph:t}=this.context;t.off(Oe.AFTER_DRAW,this.onDraw),t.off(Oe.AFTER_RENDER,this.onRender),t.off(Oe.AFTER_TRANSFORM,this.onTransform)}renderMinimap(){const t=this.getElements(),e=this.initCanvas();this.setShapes(e,t)}getElements(){const{filter:t}=this.options,{model:e}=this.context,n=e.getData();if(!t)return n;const{nodes:r,edges:o,combos:u}=n;return{nodes:r.filter(v=>t(sn(v),"node")),edges:o.filter(v=>t(sn(v),"edge")),combos:u.filter(v=>t(sn(v),"combo"))}}setShapes(t,e){const{nodes:n,edges:r,combos:o}=e,{shape:u}=this.options,{element:v}=this.context;if(u==="key"){const C=new Set,T=$=>{const lt=sn($);C.add(lt);const gt=v.getElement(lt);if(!gt)return;const Gt=gt.getShape("key"),ee=this.shapes.get(lt)||Gt.cloneNode();ee.setPosition(Gt.getPosition()),gt.style.zIndex&&(ee.style.zIndex=gt.style.zIndex),ee.id=gt.id,this.shapes.has(lt)?Object.entries(Gt.attributes).forEach(([ve,ke])=>{ee.style[ve]!==ke&&(ee.style[ve]=ke)}):(t.appendChild(ee),this.shapes.set(lt,ee))};r.forEach(T),o.forEach(T),n.forEach(T),this.shapes.forEach(($,lt)=>{C.has(lt)||(t.removeChild($),this.shapes.delete(lt))});return}const S=(C,T)=>{const lt=v.getElement(C).getPosition();return T.setPosition(lt),T};t.removeChildren(),r.forEach(C=>t.appendChild(u(sn(C),"edge"))),o.forEach(C=>{t.appendChild(S(sn(C),u(sn(C),"combo")))}),n.forEach(C=>{t.appendChild(S(sn(C),u(sn(C),"node")))})}calculatePosition(){const{position:t,size:[e,n]}=this.options,{canvas:r}=this.context,[o,u]=r.getSize(),[v,S]=qn(t);return[v*(o-e),S*(u-n)]}createContainer(){const{container:t,className:e,size:[n,r],containerStyle:o}=this.options;if(t)return typeof t=="string"?document.querySelector(t):t;const u=document.createElement("div");u.classList.add("g6-minimap"),e&&u.classList.add(e);const[v,S]=this.calculatePosition();return Object.assign(u.style,Object.assign({position:"absolute",left:v+"px",top:S+"px",width:n+"px",height:r+"px"},o)),this.context.canvas.getContainer().appendChild(u)}initCanvas(){const{renderer:t,size:[e,n]}=this.options;if(this.canvas){const{width:r,height:o}=this.canvas.getConfig();(e!==r||n!==o)&&this.canvas.resize(e,n),t&&this.canvas.setRenderer(t)}else{const r=document.createElement("div"),o=this.createContainer();this.container=o,o.appendChild(r),this.canvas=new nt.Xz({width:e,height:n,container:r,renderer:t||new La.Th})}return this.setCamera(),this.canvas}createLandmark(t,e,n){const r=`${t.join(",")}-${e.join(",")}-${n}`;if(this.landmarkMap.has(r))return this.landmarkMap.get(r);const u=this.canvas.getCamera().createLandmark(r,{position:t,focalPoint:e,zoom:n});return this.landmarkMap.set(r,u),u}setCamera(){var t;const{canvas:e}=this.context,n=(t=this.canvas)===null||t===void 0?void 0:t.getCamera();if(!n)return;const{size:[r,o],padding:u}=this.options,[v,S,C,T]=Ve(u),{min:$,max:lt,center:gt}=e.getBounds("elements"),Gt=lt[0]-$[0],ee=lt[1]-$[1],ve=r-T-S,ke=o-v-C,ze=ve/Gt,Ke=ke/ee,ln=Math.min(ze,Ke),kn=this.createLandmark(gt,gt,ln);n.gotoLandmark(kn,0)}get maskBBox(){const{canvas:t}=this.context,e=t.getSize(),n=t.getCanvasByViewport([0,0]),r=t.getCanvasByViewport(e),o=this.canvas.canvas2Viewport(fi(n)),u=this.canvas.canvas2Viewport(fi(r)),v=u.x-o.x,S=u.y-o.y;return[o.x,o.y,v,S]}calculateMaskBBox(){const{size:[t,e]}=this.options;let[n,r,o,u]=this.maskBBox;return n<0&&(o=_s(o+n,t),n=0),r<0&&(u=_s(u+r,e),r=0),n+o>t&&(o=Zs(t-n,0)),r+u>e&&(u=Zs(e-r,0)),[_s(n,t),_s(r,e),Zs(o,0),Zs(u,0)]}renderMask(){const{maskStyle:t}=this.options;this.mask||(this.mask=document.createElement("div"),this.mask.addEventListener("pointerdown",this.onMaskDragStart)),this.container.appendChild(this.mask),Object.assign(this.mask.style,Object.assign(Object.assign({},t),{cursor:"move",position:"absolute",pointerEvents:"auto"})),this.updateMask()}updateMask(){if(!this.mask)return;const[t,e,n,r]=this.calculateMaskBBox();Object.assign(this.mask.style,{top:e+"px",left:t+"px",width:n+"px",height:r+"px"})}destroy(){var t;this.unbindEvents(),this.canvas.destroy(),(t=this.mask)===null||t===void 0||t.remove(),super.destroy()}}Cu.defaultOptions={size:[240,160],shape:"key",padding:10,position:"right-bottom",maskStyle:{border:"1px solid #ddd",background:"rgba(0, 0, 0, 0.1)"},containerStyle:{border:"1px solid #ddd",background:"#fff"},delay:128};const _s=(i,t)=>Math.min(i,t),Zs=(i,t)=>Math.max(i,t);var Gd=function(i,t,e,n){function r(o){return o instanceof e?o:new e(function(u){u(o)})}return new(e||(e=Promise))(function(o,u){function v(T){try{C(n.next(T))}catch($){u($)}}function S(T){try{C(n.throw(T))}catch($){u($)}}function C(T){T.done?o(T.value):r(T.value).then(v,S)}C((n=n.apply(i,t||[])).next())})};const Vd={x1:0,y1:0,x2:0,y2:0,visibility:"hidden"};class Ou extends mo{constructor(t,e){super(t,Object.assign({},Ou.defaultOptions,e)),this.initSnapline=()=>{const n=this.context.canvas.getLayer("transient");this.horizontalLine||(this.horizontalLine=n.appendChild(new nt.x1({style:Object.assign(Object.assign({},Vd),this.options.horizontalLineStyle)}))),this.verticalLine||(this.verticalLine=n.appendChild(new nt.x1({style:Object.assign(Object.assign({},Vd),this.options.verticalLineStyle)})))},this.isHorizontalSticking=!1,this.isVerticalSticking=!1,this.enableStick=!0,this.autoSnapToLine=(n,r,o)=>Gd(this,void 0,void 0,function*(){const{verticalX:u,horizontalY:v}=o,{tolerance:S}=this.options,{min:[C,T],max:[$,lt],center:[gt,Gt]}=r;let ee=0,ve=0;u!==null&&(Oo($,u)<S&&(ee=u-$),Oo(C,u)<S&&(ee=u-C),Oo(gt,u)<S&&(ee=u-gt),ee!==0&&(this.isVerticalSticking=!0)),v!==null&&(Oo(lt,v)<S&&(ve=v-lt),Oo(T,v)<S&&(ve=v-T),Oo(Gt,v)<S&&(ve=v-Gt),ve!==0&&(this.isHorizontalSticking=!0)),(ee!==0||ve!==0)&&(yield this.context.graph.translateElementBy({[n]:[ee,ve]},!1))}),this.enableSnap=n=>{const{target:r}=n,o=.5;if(this.isHorizontalSticking||this.isVerticalSticking){const[u,v]=this.getDelta(n);if(this.isHorizontalSticking&&this.isVerticalSticking&&Math.abs(u)<=o&&Math.abs(v)<=o)return this.context.graph.translateElementBy({[r.id]:[-u,-v]},!1),!1;if(this.isHorizontalSticking&&Math.abs(v)<=o)return this.context.graph.translateElementBy({[r.id]:[0,-v]},!1),!1;if(this.isVerticalSticking&&Math.abs(u)<=o)return this.context.graph.translateElementBy({[r.id]:[-u,0]},!1),!1;this.isHorizontalSticking=!1,this.isVerticalSticking=!1,this.enableStick=!1,setTimeout(()=>{this.enableStick=!0},200)}return this.enableStick},this.calcSnaplineMetadata=(n,r)=>{const{tolerance:o,shape:u}=this.options,{min:[v,S],max:[C,T],center:[$,lt]}=r;let gt=null,Gt=null,ee=null,ve=null,ke=null,ze=null;return this.getNodes().some(Ke=>{if((0,Bt.Z)(n.id,Ke.id))return!1;const ln=wf(Ke,u).getRenderBounds(),{min:[kn,Tn],max:[In,hn],center:[or,yr]}=ln;return gt===null&&(Oo(or,$)<o?gt=or:Oo(kn,v)<o||Oo(kn,C)<o?gt=kn:(Oo(In,C)<o||Oo(In,v)<o)&&(gt=In),gt!==null&&(Gt=Math.min(Tn,S),ee=Math.max(hn,T))),ve===null&&(Oo(yr,lt)<o?ve=yr:Oo(Tn,S)<o||Oo(Tn,T)<o?ve=Tn:(Oo(hn,T)<o||Oo(hn,S)<o)&&(ve=hn),ve!==null&&(ke=Math.min(kn,v),ze=Math.max(In,C))),gt!==null&&ve!==null}),{verticalX:gt,verticalMinY:Gt,verticalMaxY:ee,horizontalY:ve,horizontalMinX:ke,horizontalMaxX:ze}},this.onDragStart=()=>{this.initSnapline()},this.onDrag=n=>Gd(this,void 0,void 0,function*(){const{target:r}=n;if(this.options.autoSnap&&!this.enableSnap(n))return;const o=wf(r,this.options.shape).getRenderBounds(),u=this.calcSnaplineMetadata(r,o);this.hideSnapline(),(u.verticalX!==null||u.horizontalY!==null)&&this.updateSnapline(u),this.options.autoSnap&&(yield this.autoSnapToLine(r.id,o,u))}),this.onDragEnd=()=>{this.hideSnapline()},this.bindEvents()}getNodes(){var t;const{filter:e}=this.options,r=(((t=this.context.element)===null||t===void 0?void 0:t.getNodes())||[]).filter(o=>{var u;return $o(o)&&((u=this.context.viewport)===null||u===void 0?void 0:u.isInViewport(o.getRenderBounds()))});return e?r.filter(o=>e(o)):r}hideSnapline(){this.horizontalLine.style.visibility="hidden",this.verticalLine.style.visibility="hidden"}getLineWidth(t){const{lineWidth:e}=this.options[`${t}LineStyle`];return+(e||Vd.lineWidth||1)/this.context.graph.getZoom()}updateSnapline(t){const{verticalX:e,verticalMinY:n,verticalMaxY:r,horizontalY:o,horizontalMinX:u,horizontalMaxX:v}=t,[S,C]=this.context.canvas.getSize(),{offset:T}=this.options;o!==null?Object.assign(this.horizontalLine.style,{x1:T===1/0?0:u-T,y1:o,x2:T===1/0?S:v+T,y2:o,visibility:"visible",lineWidth:this.getLineWidth("horizontal")}):this.horizontalLine.style.visibility="hidden",e!==null?Object.assign(this.verticalLine.style,{x1:e,y1:T===1/0?0:n-T,x2:e,y2:T===1/0?C:r+T,visibility:"visible",lineWidth:this.getLineWidth("vertical")}):this.verticalLine.style.visibility="hidden"}getDelta(t){const e=this.context.graph.getZoom();return ue([t.dx,t.dy],e)}bindEvents(){return Gd(this,void 0,void 0,function*(){const{graph:t}=this.context;t.on(Mt.DRAG_START,this.onDragStart),t.on(Mt.DRAG,this.onDrag),t.on(Mt.DRAG_END,this.onDragEnd)})}unbindEvents(){const{graph:t}=this.context;t.off(Mt.DRAG_START,this.onDragStart),t.off(Mt.DRAG,this.onDrag),t.off(Mt.DRAG_END,this.onDragEnd)}destroyElements(){var t,e;(t=this.horizontalLine)===null||t===void 0||t.destroy(),(e=this.verticalLine)===null||e===void 0||e.destroy()}destroy(){this.destroyElements(),this.unbindEvents(),super.destroy()}}Ou.defaultOptions={tolerance:5,offset:20,autoSnap:!0,shape:"key",verticalLineStyle:{stroke:"#1783FF"},horizontalLineStyle:{stroke:"#1783FF"},filter:()=>!0};const Oo=(i,t)=>Math.abs(i-t),wf=(i,t)=>typeof t=="function"?t(i):i.getShape(t);var u0=d(91498),d0=d(39934),f0=d(21790),h0=function(i,t,e,n){function r(o){return o instanceof e?o:new e(function(u){u(o)})}return new(e||(e=Promise))(function(o,u){function v(T){try{C(n.next(T))}catch($){u($)}}function S(T){try{C(n.throw(T))}catch($){u($)}}function C(T){T.done?o(T.value):r(T.value).then(v,S)}C((n=n.apply(i,t||[])).next())})},v0=function(i,t){var e={};for(var n in i)Object.prototype.hasOwnProperty.call(i,n)&&t.indexOf(n)<0&&(e[n]=i[n]);if(i!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,n=Object.getOwnPropertySymbols(i);r<n.length;r++)t.indexOf(n[r])<0&&Object.prototype.propertyIsEnumerable.call(i,n[r])&&(e[n[r]]=i[n[r]]);return e};const g0=["timestamp","time","date","datetime"];class Tu extends mo{get padding(){return Ve(this.options.padding)}constructor(t,e){super(t,Object.assign({},Tu.defaultOptions,e)),this.backup(),this.upsertTimebar()}play(){var t;(t=this.timebar)===null||t===void 0||t.play()}pause(){var t;(t=this.timebar)===null||t===void 0||t.pause()}forward(){var t;(t=this.timebar)===null||t===void 0||t.forward()}backward(){var t;(t=this.timebar)===null||t===void 0||t.backward()}reset(){var t;(t=this.timebar)===null||t===void 0||t.reset()}update(t){super.update(t),this.backup(),Object.keys(t).forEach(e=>{switch(e){case"position":this.upsertWrapper();break;default:this.upsertTimebar();break}})}backup(){this.originalData=Sf(this.context.graph.getData())}upsertTimebar(){const{canvas:t}=this.context,e=this.options,{onChange:n,timebarType:r,data:o,x:u,y:v,width:S,height:C,mode:T}=e,$=v0(e,["onChange","timebarType","data","x","y","width","height","mode"]),lt=t.getSize(),[gt]=this.padding;this.upsertCanvas().ready.then(()=>{var Gt;const ee=Object.assign(Object.assign({x:lt[0]/2-S/2,y:gt,onChange:ve=>{const ke=((0,d0.Z)(ve)?ve:[ve,ve]).map(ze=>(0,f0.Z)(ze)?ze.getTime():ze);this.options.mode==="modify"?this.filterElements(ke):this.hiddenElements(ke),n==null||n(ke)}},$),{data:o.map(ve=>(0,Fr.Z)(ve)?{time:ve,value:0}:ve),width:S,height:C,type:r});this.timebar?this.timebar.update(ee):(this.timebar=new u0.s({style:ee}),(Gt=this.canvas)===null||Gt===void 0||Gt.appendChild(this.timebar))})}upsertWrapper(){var t;if(!this.wrapper){const u=document.createElement("div");u.style.position="absolute",this.wrapper=u}const{x:e,y:n,className:r,position:o}=this.options;return r&&(this.wrapper.className=r),(0,Fr.Z)(e)||(0,Fr.Z)(n)?Object.assign(this.wrapper.style,{left:`${e!=null?e:0}px`,top:`${n!=null?n:0}px`}):Object.assign(this.wrapper.style,{[o==="top"?"bottom":"top"]:"unset",[o==="top"?"top":"bottom"]:"0px"}),(t=this.context.canvas.getContainer())===null||t===void 0||t.appendChild(this.wrapper),this.wrapper}upsertCanvas(){var t,e;const n=this.upsertWrapper();if(this.canvas)return this.canvas;const{height:r}=this.options,[o]=this.context.canvas.getSize(),[u,,v]=this.padding;return this.canvas=new nt.Xz({container:n,width:o,height:r+u+v,renderer:((e=(t=this.context.options).renderer)===null||e===void 0?void 0:e.call(t,"main"))||new La.Th,supportsMutipleCanvasesInOneContainer:!0}),this.canvas}filterElements(t){return h0(this,void 0,void 0,function*(){var e;if(!this.originalData)return;const{elementTypes:n,getTime:r}=this.options,{graph:o,element:u}=this.context,v=Sf(this.originalData);n.forEach(C=>{const T=`${C}s`;v[T]=(this.originalData[T]||[]).filter($=>{const lt=r($);return!!Mf(lt,t)})});const S=[...v.nodes,...v.combos].map(C=>sn(C));v.edges=v.edges.filter(C=>{const T=C.source,$=C.target;return S.includes(T)&&S.includes($)}),o.setData(v),yield(e=u.draw({animation:!1,silence:!0}))===null||e===void 0?void 0:e.finished})}hiddenElements(t){const{graph:e}=this.context,{elementTypes:n,getTime:r}=this.options,o=[],u=[];n.forEach(v=>{var S;const C=`${v}s`;(((S=this.originalData)===null||S===void 0?void 0:S[C])||[]).forEach($=>{const lt=sn($),gt=r($);Mf(gt,t)?u.push(lt):o.push(lt)})}),e.hideElement(o,!1),e.showElement(u,!1)}destroy(){var t,e,n;const{graph:r}=this.context;this.originalData&&r.setData(Object.assign({},this.originalData)),(t=this.timebar)===null||t===void 0||t.destroy(),(e=this.canvas)===null||e===void 0||e.destroy(),(n=this.wrapper)===null||n===void 0||n.remove(),this.originalData=void 0,this.wrapper=void 0,this.timebar=void 0,this.canvas=void 0,super.destroy()}}Tu.defaultOptions={position:"bottom",enable:!0,timebarType:"time",className:"g6-timebar",width:450,height:60,zIndex:3,elementTypes:["node"],padding:10,mode:"modify",getTime:i=>p0(i,g0,void 0),loop:!1};const Sf=i=>{const{nodes:t=[],edges:e=[],combos:n=[]}=i;return{nodes:[...t],edges:[...e],combos:[...n]}},Mf=(i,t)=>{if((0,Fr.Z)(t))return i===t;const[e,n]=t;return i>=e&&i<=n},p0=(i,t,e)=>{var n;for(let r=0;r<t.length;r++){const o=t[r],u=(n=i.data)===null||n===void 0?void 0:n[o];if(u)return u}return e};function m0(i){const t={top:"unset",right:"unset",bottom:"unset",left:"unset"};return i.split("-").forEach(n=>{t[n]="8px"}),t.flexDirection=i.startsWith("top")||i.startsWith("bottom")?"row":"column",t}const y0=`
|
|
|
.g6-toolbar {
|
|
|
position: absolute;
|
|
|
z-index: 100;
|
|
|
display: flex;
|
|
|
flex-direction: row;
|
|
|
align-items: center;
|
|
|
justify-content: center;
|
|
|
border-radius: 4px;
|
|
|
box-shadow: 0px 0px 8px rgba(0, 0, 0, 0.1);
|
|
|
opacity: 0.65;
|
|
|
}
|
|
|
.g6-toolbar .g6-toolbar-item {
|
|
|
display: inline-block;
|
|
|
width: 16px;
|
|
|
height: 16px;
|
|
|
padding: 4px;
|
|
|
cursor: pointer;
|
|
|
box-sizing: content-box;
|
|
|
}
|
|
|
|
|
|
.g6-toolbar .g6-toolbar-item:hover {
|
|
|
background-color: #f0f0f0;
|
|
|
}
|
|
|
|
|
|
.g6-toolbar .g6-toolbar-item svg {
|
|
|
display: inline-block;
|
|
|
width: 100%;
|
|
|
height: 100%;
|
|
|
pointer-events: none;
|
|
|
}
|
|
|
`,b0=`
|
|
|
<svg>
|
|
|
<symbol id="zoom-in" viewBox="64 64 896 896">
|
|
|
<path d="M637 443H519V309c0-4.4-3.6-8-8-8h-60c-4.4 0-8 3.6-8 8v134H325c-4.4 0-8 3.6-8 8v60c0 4.4 3.6 8 8 8h118v134c0 4.4 3.6 8 8 8h60c4.4 0 8-3.6 8-8V519h118c4.4 0 8-3.6 8-8v-60c0-4.4-3.6-8-8-8zm284 424L775 721c122.1-148.9 113.6-369.5-26-509-148-148.1-388.4-148.1-537 0-148.1 148.6-148.1 389 0 537 139.5 139.6 360.1 148.1 509 26l146 146c3.2 2.8 8.3 2.8 11 0l43-43c2.8-2.7 2.8-7.8 0-11zM696 696c-118.8 118.7-311.2 118.7-430 0-118.7-118.8-118.7-311.2 0-430 118.8-118.7 311.2-118.7 430 0 118.7 118.8 118.7 311.2 0 430z"></path>
|
|
|
</symbol>
|
|
|
<symbol id="zoom-out" viewBox="64 64 896 896">
|
|
|
<path d="M637 443H325c-4.4 0-8 3.6-8 8v60c0 4.4 3.6 8 8 8h312c4.4 0 8-3.6 8-8v-60c0-4.4-3.6-8-8-8zm284 424L775 721c122.1-148.9 113.6-369.5-26-509-148-148.1-388.4-148.1-537 0-148.1 148.6-148.1 389 0 537 139.5 139.6 360.1 148.1 509 26l146 146c3.2 2.8 8.3 2.8 11 0l43-43c2.8-2.7 2.8-7.8 0-11zM696 696c-118.8 118.7-311.2 118.7-430 0-118.7-118.8-118.7-311.2 0-430 118.8-118.7 311.2-118.7 430 0 118.7 118.8 118.7 311.2 0 430z"></path>
|
|
|
</symbol>
|
|
|
<symbol id="edit" viewBox="64 64 896 896">
|
|
|
<path d="M257.7 752c2 0 4-.2 6-.5L431.9 722c2-.4 3.9-1.3 5.3-2.8l423.9-423.9a9.96 9.96 0 000-14.1L694.9 114.9c-1.9-1.9-4.4-2.9-7.1-2.9s-5.2 1-7.1 2.9L256.8 538.8c-1.5 1.5-2.4 3.3-2.8 5.3l-29.5 168.2a33.5 33.5 0 009.4 29.8c6.6 6.4 14.9 9.9 23.8 9.9zm67.4-174.4L687.8 215l73.3 73.3-362.7 362.6-88.9 15.7 15.6-89zM880 836H144c-17.7 0-32 14.3-32 32v36c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-36c0-17.7-14.3-32-32-32z"></path>
|
|
|
</symbol>
|
|
|
<symbol id="delete" viewBox="64 64 896 896">
|
|
|
<path d="M360 184h-8c4.4 0 8-3.6 8-8v8h304v-8c0 4.4 3.6 8 8 8h-8v72h72v-80c0-35.3-28.7-64-64-64H352c-35.3 0-64 28.7-64 64v80h72v-72zm504 72H160c-17.7 0-32 14.3-32 32v32c0 4.4 3.6 8 8 8h60.4l24.7 523c1.6 34.1 29.8 61 63.9 61h454c34.2 0 62.3-26.8 63.9-61l24.7-523H888c4.4 0 8-3.6 8-8v-32c0-17.7-14.3-32-32-32zM731.3 840H292.7l-24.2-512h487l-24.2 512z"></path>
|
|
|
</symbol>
|
|
|
<symbol id="redo" viewBox="64 64 896 896">
|
|
|
<path d="M758.2 839.1C851.8 765.9 912 651.9 912 523.9 912 303 733.5 124.3 512.6 124 291.4 123.7 112 302.8 112 523.9c0 125.2 57.5 236.9 147.6 310.2 3.5 2.8 8.6 2.2 11.4-1.3l39.4-50.5c2.7-3.4 2.1-8.3-1.2-11.1-8.1-6.6-15.9-13.7-23.4-21.2a318.64 318.64 0 01-68.6-101.7C200.4 609 192 567.1 192 523.9s8.4-85.1 25.1-124.5c16.1-38.1 39.2-72.3 68.6-101.7 29.4-29.4 63.6-52.5 101.7-68.6C426.9 212.4 468.8 204 512 204s85.1 8.4 124.5 25.1c38.1 16.1 72.3 39.2 101.7 68.6 29.4 29.4 52.5 63.6 68.6 101.7 16.7 39.4 25.1 81.3 25.1 124.5s-8.4 85.1-25.1 124.5a318.64 318.64 0 01-68.6 101.7c-9.3 9.3-19.1 18-29.3 26L668.2 724a8 8 0 00-14.1 3l-39.6 162.2c-1.2 5 2.6 9.9 7.7 9.9l167 .8c6.7 0 10.5-7.7 6.3-12.9l-37.3-47.9z"></path>
|
|
|
</symbol>
|
|
|
<symbol id="undo" viewBox="64 64 896 896">
|
|
|
<path d="M511.4 124C290.5 124.3 112 303 112 523.9c0 128 60.2 242 153.8 315.2l-37.5 48c-4.1 5.3-.3 13 6.3 12.9l167-.8c5.2 0 9-4.9 7.7-9.9L369.8 727a8 8 0 00-14.1-3L315 776.1c-10.2-8-20-16.7-29.3-26a318.64 318.64 0 01-68.6-101.7C200.4 609 192 567.1 192 523.9s8.4-85.1 25.1-124.5c16.1-38.1 39.2-72.3 68.6-101.7 29.4-29.4 63.6-52.5 101.7-68.6C426.9 212.4 468.8 204 512 204s85.1 8.4 124.5 25.1c38.1 16.1 72.3 39.2 101.7 68.6 29.4 29.4 52.5 63.6 68.6 101.7 16.7 39.4 25.1 81.3 25.1 124.5s-8.4 85.1-25.1 124.5a318.64 318.64 0 01-68.6 101.7c-7.5 7.5-15.3 14.5-23.4 21.2a7.93 7.93 0 00-1.2 11.1l39.4 50.5c2.8 3.5 7.9 4.1 11.4 1.3C854.5 760.8 912 649.1 912 523.9c0-221.1-179.4-400.2-400.6-399.9z"></path>
|
|
|
</symbol>
|
|
|
<symbol id="export" viewBox="64 64 896 896">
|
|
|
<path d="M880 912H144c-17.7 0-32-14.3-32-32V144c0-17.7 14.3-32 32-32h360c4.4 0 8 3.6 8 8v56c0 4.4-3.6 8-8 8H184v656h656V520c0-4.4 3.6-8 8-8h56c4.4 0 8 3.6 8 8v360c0 17.7-14.3 32-32 32zM770.87 199.13l-52.2-52.2a8.01 8.01 0 014.7-13.6l179.4-21c5.1-.6 9.5 3.7 8.9 8.9l-21 179.4c-.8 6.6-8.9 9.4-13.6 4.7l-52.4-52.4-256.2 256.2a8.03 8.03 0 01-11.3 0l-42.4-42.4a8.03 8.03 0 010-11.3l256.1-256.3z"></path>
|
|
|
</symbol>
|
|
|
<symbol id="auto-fit" viewBox="64 64 896 896">
|
|
|
<path d="M952 474H829.8C812.5 327.6 696.4 211.5 550 194.2V72c0-4.4-3.6-8-8-8h-60c-4.4 0-8 3.6-8 8v122.2C327.6 211.5 211.5 327.6 194.2 474H72c-4.4 0-8 3.6-8 8v60c0 4.4 3.6 8 8 8h122.2C211.5 696.4 327.6 812.5 474 829.8V952c0 4.4 3.6 8 8 8h60c4.4 0 8-3.6 8-8V829.8C696.4 812.5 812.5 696.4 829.8 550H952c4.4 0 8-3.6 8-8v-60c0-4.4-3.6-8-8-8zM512 756c-134.8 0-244-109.2-244-244s109.2-244 244-244 244 109.2 244 244-109.2 244-244 244z"></path>
|
|
|
<path d="M512 392c-32.1 0-62.1 12.4-84.8 35.2-22.7 22.7-35.2 52.7-35.2 84.8s12.5 62.1 35.2 84.8C449.9 619.4 480 632 512 632s62.1-12.5 84.8-35.2C619.4 574.1 632 544 632 512s-12.5-62.1-35.2-84.8A118.57 118.57 0 00512 392z"></path>
|
|
|
</symbol>
|
|
|
<symbol id="reset" viewBox="64 64 896 896">
|
|
|
<path d="M909.1 209.3l-56.4 44.1C775.8 155.1 656.2 92 521.9 92 290 92 102.3 279.5 102 511.5 101.7 743.7 289.8 932 521.9 932c181.3 0 335.8-115 394.6-276.1 1.5-4.2-.7-8.9-4.9-10.3l-56.7-19.5a8 8 0 00-10.1 4.8c-1.8 5-3.8 10-5.9 14.9-17.3 41-42.1 77.8-73.7 109.4A344.77 344.77 0 01655.9 829c-42.3 17.9-87.4 27-133.8 27-46.5 0-91.5-9.1-133.8-27A341.5 341.5 0 01279 755.2a342.16 342.16 0 01-73.7-109.4c-17.9-42.4-27-87.4-27-133.9s9.1-91.5 27-133.9c17.3-41 42.1-77.8 73.7-109.4 31.6-31.6 68.4-56.4 109.3-73.8 42.3-17.9 87.4-27 133.8-27 46.5 0 91.5 9.1 133.8 27a341.5 341.5 0 01109.3 73.8c9.9 9.9 19.2 20.4 27.8 31.4l-60.2 47a8 8 0 003 14.1l175.6 43c5 1.2 9.9-2.6 9.9-7.7l.8-180.9c-.1-6.6-7.8-10.3-13-6.2z"></path>
|
|
|
</symbol>
|
|
|
<symbol id="exit-fullscreen" viewBox="0 0 1024 1024">
|
|
|
<path d="M418.13333333 361.43786666c0 0.2048-0.13653333 0.4096-0.13653334 0.68266667C417.99679999 362.32533333 418.13333333 362.53013333 418.13333333 362.73493333 418.13333333 371.54133333 414.44693333 379.392 408.78079999 385.39946666 408.43946666 385.7408 408.30293333 386.21866666 408.02986666 386.49173333c-1.09226667 1.09226667-2.59413333 1.77493333-3.82293333 2.73066667C398.40426666 393.65973333 391.64586666 396.8 383.93173333 396.8 383.72693333 396.8 383.59039999 396.73173333 383.38559999 396.73173333S382.97599999 396.8 382.77119999 396.8L112.29866666 396.8C92.50133333 396.8 76.79999999 381.50826666 76.79999999 362.66666666 76.66346666 343.89333333 92.63786666 328.53333333 112.16213333 328.53333333l189.44 0L87.44959999 114.51733333C73.59146666 100.59093333 73.25013333 78.5408 86.63039999 65.29706666c13.17546667-13.44853333 35.36213333-12.97066667 49.152 0.88746667l214.08426667 214.08426667L349.86666666 90.89706666C349.79839999 71.23626666 365.22666666 55.46666666 383.99999999 55.46666666 402.77333333 55.33013333 418.13333333 71.30453333 418.13333333 90.8288L418.13333333 361.43786666zM928.90453333 328.53333333l-189.44 0 214.15253333-214.08426667c13.85813333-13.9264 14.19946667-35.90826667 0.88746667-49.22026666-13.17546667-13.44853333-35.36213333-12.97066667-49.152 0.88746666l-214.08426667 214.08426667L691.26826666 90.89706666C691.26826666 71.23626666 675.83999999 55.46666666 657.06666666 55.46666666 638.29333333 55.33013333 622.93333333 71.30453333 622.93333333 90.8288l0 270.60906666c0 0.2048 0.13653333 0.4096 0.13653333 0.68266667C623.06986666 362.32533333 622.93333333 362.53013333 622.93333333 362.73493333 622.93333333 371.54133333 626.61973333 379.392 632.28586666 385.39946666c0.34133333 0.34133333 0.47786667 0.8192 0.8192 1.09226667 1.09226667 1.09226667 2.59413333 1.77493333 3.8912 2.73066667C642.66239999 393.65973333 649.42079999 396.8 657.13493333 396.8c0.2048 0 0.34133333-0.06826667 0.54613333-0.06826667S658.09066666 396.8 658.29546666 396.8l270.5408 0C948.56533333 396.8 964.26666666 381.50826666 964.26666666 362.66666666 964.40319999 343.89333333 948.42879999 328.53333333 928.90453333 328.53333333zM418.13333333 635.73333333c0-8.8064-3.6864-16.5888-9.35253334-22.66453333C408.43946666 612.72746666 408.30293333 612.2496 408.02986666 611.90826666 406.86933333 610.88426666 405.43573333 610.2016 404.20693333 609.24586666 398.47253333 604.80853333 391.64586666 601.6 383.93173333 601.6 383.72693333 601.6 383.59039999 601.73653333 383.38559999 601.73653333S382.97599999 601.6 382.77119999 601.6L112.29866666 601.6C92.50133333 601.6 76.79999999 616.96 76.79999999 635.73333333 76.66346666 654.50666666 92.63786666 669.86666666 112.16213333 669.86666666l189.44 0-214.15253334 214.15253334c-13.85813333 13.85813333-14.19946667 35.84-0.88746666 49.22026666 13.17546667 13.44853333 35.36213333 12.9024 49.152-0.95573333l214.08426666-214.08426667 0 189.37173334c0 19.59253333 15.42826667 35.49866667 34.2016 35.36213333C402.77333333 943.2064 418.13333333 927.232 418.13333333 907.5712L418.13333333 637.09866666c0-0.27306667-0.13653333-0.47786667-0.13653334-0.68266666C417.99679999 636.14293333 418.13333333 635.93813333 418.13333333 635.73333333zM739.46453333 669.86666666l189.44 0c19.456 0 35.49866667-15.36 35.36213333-34.13333333C964.26666666 616.96 948.56533333 601.6 928.76799999 601.6L658.29546666 601.6C658.09066666 601.6 657.88586666 601.73653333 657.68106666 601.73653333S657.33973333 601.6 657.13493333 601.6C649.42079999 601.6 642.59413333 604.80853333 636.85973333 609.24586666 635.63093333 610.2016 634.19733333 610.88426666 633.03679999 611.90826666 632.76373333 612.2496 632.62719999 612.72746666 632.28586666 613.0688 626.61973333 619.14453333 622.93333333 626.92693333 622.93333333 635.73333333c0 0.2048 0.13653333 0.4096 0.13653333 0.68266667C623.06986666 636.6208 622.93333333 636.8256 622.93333333 637.09866666l0 270.5408C622.93333333 927.232 638.29333333 943.2064 657.06666666 942.93333333c18.77333333 0.13653333 34.2016-15.70133333 34.2016-35.36213333l0-189.37173334 214.08426667 214.08426667c13.78986667 13.85813333 35.90826667 14.40426667 49.152 0.95573333 13.312-13.312 12.97066667-35.36213333-0.88746667-49.22026666L739.46453333 669.86666666z" ></path></symbol>
|
|
|
<symbol id="request-fullscreen" viewBox="0 0 1024 1024">
|
|
|
<path d="M69.818182 87.598545v273.128728a34.909091 34.909091 0 0 0 69.818182 0V163.653818l221.928727 222.021818a33.512727 33.512727 0 0 0 47.383273-47.383272L186.926545 116.363636h197.073455a34.909091 34.909091 0 0 0 0-69.818181H110.871273C85.364364 46.545455 69.818182 59.671273 69.818182 87.598545zM938.542545 46.545455H665.413818a34.909091 34.909091 0 0 0 0 69.818181h197.073455L640.465455 338.292364a33.512727 33.512727 0 0 0 47.383272 47.383272l221.928728-222.021818v197.073455a34.909091 34.909091 0 0 0 69.818181 0V87.598545c0-27.927273-15.453091-41.053091-40.96-41.05309z m-827.671272 907.636363h273.128727a34.909091 34.909091 0 0 0 0-69.818182H186.926545l222.021819-221.928727a33.512727 33.512727 0 0 0-47.383273-47.383273L139.636364 837.073455V640a34.909091 34.909091 0 0 0-69.818182 0v273.128727c0 27.927273 15.546182 41.053091 41.053091 41.053091z m868.724363-41.053091V640a34.909091 34.909091 0 0 0-69.818181 0v197.073455L687.941818 615.051636a33.512727 33.512727 0 0 0-47.383273 47.383273L862.487273 884.363636H665.413818a34.909091 34.909091 0 0 0 0 69.818182h273.128727c25.6 0 41.053091-13.125818 41.053091-41.053091z" ></path></symbol>
|
|
|
</svg>
|
|
|
`;var Cf=function(i,t,e,n){function r(o){return o instanceof e?o:new e(function(u){u(o)})}return new(e||(e=Promise))(function(o,u){function v(T){try{C(n.next(T))}catch($){u($)}}function S(T){try{C(n.throw(T))}catch($){u($)}}function C(T){T.done?o(T.value):r(T.value).then(v,S)}C((n=n.apply(i,t||[])).next())})};class Pu extends mo{constructor(t,e){super(t,Object.assign({},Pu.defaultOptions,e)),this.$element=mc("toolbar",!1),this.onToolbarItemClick=r=>{const{onClick:o}=this.options;if(r.target instanceof Element&&r.target.className.includes("g6-toolbar-item")){const u=r.target.getAttribute("value");o==null||o(u,r.target)}};const n=this.context.canvas.getContainer();this.$element.style.display="flex",n.appendChild(this.$element),jd("g6-toolbar-css","style",{},y0,document.head),jd("g6-toolbar-svgicon","div",{display:"none"},b0),this.$element.addEventListener("click",this.onToolbarItemClick),this.update(e)}update(t){const e=Object.create(null,{update:{get:()=>super.update}});return Cf(this,void 0,void 0,function*(){e.update.call(this,t);const{className:n,position:r,style:o}=this.options;this.$element.className=`g6-toolbar ${n||""}`,Object.assign(this.$element.style,o,m0(r)),this.$element.innerHTML=yield this.getDOMContent()})}destroy(){this.$element.removeEventListener("click",this.onToolbarItemClick),this.$element.remove(),super.destroy()}getDOMContent(){return Cf(this,void 0,void 0,function*(){return(yield this.options.getItems()).map(e=>`
|
|
|
<div class="g6-toolbar-item" value="${e.value}">
|
|
|
<svg aria-hidden="true" focusable="false">
|
|
|
<use xlink:href="#${e.id}"></use>
|
|
|
</svg>
|
|
|
</div>`).join("")})}}Pu.defaultOptions={position:"top-left"};var E0=d(75242);class Au extends mo{constructor(t,e){super(t,Object.assign({},Au.defaultOptions,e)),this.currentTarget=null,this.tooltipElement=null,this.container=null,this.isEnable=n=>{const{enable:r}=this.options;return typeof r=="function"?r(n):r},this.onClick=n=>{const{target:{id:r}}=n;this.currentTarget===r?(this.hide(n),this.currentTarget=null):(this.currentTarget=r,this.show(n))},this.onPointerMove=n=>{const{target:r}=n;!this.currentTarget||r.id===this.currentTarget||this.show(n)},this.onPointerLeave=n=>{this.hide(n),this.currentTarget=null},this.onCanvasMove=n=>{this.hide(n),this.currentTarget=null},this.onPointerEnter=n=>{this.show(n)},this.showById=n=>{const r={target:{id:n}};this.show(r)},this.getElementData=(n,r)=>{const{model:o}=this.context;switch(r){case"node":return o.getNodeData([n]);case"edge":return o.getEdgeData([n]);case"combo":return o.getComboData([n]);default:return[]}},this.show=n=>{const{client:r,target:{id:o}}=n;if(ha(n.target)||!this.tooltipElement||!this.isEnable(n))return;const u=this.context.graph.getElementType(o),{getContent:v,title:S}=this.options;this.currentTarget=o;const C=this.getElementData(o,u);let T,$;if(r)T=r.x,$=r.y;else{const gt=(0,Di.Z)(C,"0.style",{x:0,y:0});T=gt.x,$=gt.y}let lt={};if(v)lt.content=v(n,C);else{const gt=this.context.graph.getElementRenderStyle(o),Gt=u==="node"?gt.fill:gt.stroke;lt={title:S||u,data:C.map(ee=>({name:"ID",value:ee.id||`${ee.source} -> ${ee.target}`,color:Gt}))}}this.tooltipElement.update(Object.assign(Object.assign(Object.assign({},this.tooltipStyleProps),{x:T,y:$,style:{".tooltip":{visibility:"visible"}}}),lt))},this.hide=n=>{var r;if(!n){(r=this.tooltipElement)===null||r===void 0||r.hide();return}if(!this.tooltipElement||!this.currentTarget)return;const{client:{x:o,y:u}}=n;this.tooltipElement.hide(o,u)},this.initTooltip=()=>{var n;const r=new E0.u({className:"tooltip",style:this.tooltipStyleProps});return(n=this.container)===null||n===void 0||n.appendChild(r.HTMLTooltipElement),r},this.render(),this.bindEvents()}getEvents(){return this.options.trigger==="click"?{"node:click":this.onClick,"edge:click":this.onClick,"combo:click":this.onClick,"canvas:click":this.onPointerLeave,contextmenu:this.onPointerLeave,drag:this.onPointerLeave}:{"node:pointerenter":this.onPointerEnter,"node:pointermove":this.onPointerMove,"canvas:pointermove":this.onCanvasMove,"edge:pointerenter":this.onPointerEnter,"edge:pointermove":this.onPointerMove,"combo:pointerenter":this.onPointerEnter,"combo:pointermove":this.onPointerMove,contextmenu:this.onPointerLeave,"node:drag":this.onPointerLeave}}update(t){var e;this.unbindEvents(),super.update(t),this.tooltipElement&&((e=this.container)===null||e===void 0||e.removeChild(this.tooltipElement.HTMLTooltipElement)),this.tooltipElement=this.initTooltip(),this.bindEvents()}render(){const{canvas:t}=this.context,e=t.getContainer();e&&(this.container=e,this.tooltipElement=this.initTooltip())}unbindEvents(){const{graph:t}=this.context,e=this.getEvents();Object.keys(e).forEach(n=>{t.off(n,e[n])})}bindEvents(){const{graph:t}=this.context,e=this.getEvents();Object.keys(e).forEach(n=>{t.on(n,e[n])})}get tooltipStyleProps(){const{canvas:t}=this.context,{center:e}=t.getBounds(),n=t.getContainer(),{top:r,left:o}=n.getBoundingClientRect(),{style:u,position:v,enterable:S,container:C={x:-o,y:-r},title:T,offset:$}=this.options,[lt,gt]=e,[Gt,ee]=t.getSize();return{x:lt,y:gt,container:C,title:T,bounding:{x:0,y:0,width:Gt,height:ee},position:v,enterable:S,offset:$,style:u}}destroy(){var t;this.unbindEvents(),this.tooltipElement&&((t=this.container)===null||t===void 0||t.removeChild(this.tooltipElement.HTMLTooltipElement)),super.destroy()}}Au.defaultOptions={trigger:"hover",position:"top-right",enterable:!1,enable:!0,offset:[10,10],style:{".tooltip":{visibility:"hidden"}}};var Of=function(i,t,e,n){function r(o){return o instanceof e?o:new e(function(u){u(o)})}return new(e||(e=Promise))(function(o,u){function v(T){try{C(n.next(T))}catch($){u($)}}function S(T){try{C(n.throw(T))}catch($){u($)}}function C(T){T.done?o(T.value):r(T.value).then(v,S)}C((n=n.apply(i,t||[])).next())})};let $l;function Tf(i,t){return $l||($l=document.createElement("canvas")),$l.width=i,$l.height=t,$l.getContext("2d").clearRect(0,0,i,t),$l}function x0(i,t,e,n){return Of(this,void 0,void 0,function*(){const r=Tf(i,t),o=r.getContext("2d"),{rotate:u,opacity:v,textFill:S,textFontSize:C,textFontFamily:T,textFontVariant:$,textFontWeight:lt,textAlign:gt,textBaseline:Gt}=n;return o.textAlign=gt,o.textBaseline=Gt,o.translate(i/2,t/2),o.font=`${C}px ${T} ${$} ${lt}`,u&&o.rotate(u),v&&(o.globalAlpha=v),S&&(o.fillStyle=S,o.fillText(`${e}`,0,0)),r.toDataURL()})}function w0(i,t,e,n){return Of(this,void 0,void 0,function*(){const r=Tf(i,t),o=r.getContext("2d"),{rotate:u,opacity:v}=n;u&&o.rotate(u),v&&(o.globalAlpha=v);const S=new Image;return S.crossOrigin="anonymous",S.src=e,new Promise(C=>{S.onload=function(){const T=i>S.width?(i-S.width)/2:0,$=t>S.height?(t-S.height)/2:0;o.drawImage(S,0,0,S.width,S.height,T,$,i-T*2,t-$*2),C(r.toDataURL())}})})}var S0=function(i,t,e,n){function r(o){return o instanceof e?o:new e(function(u){u(o)})}return new(e||(e=Promise))(function(o,u){function v(T){try{C(n.next(T))}catch($){u($)}}function S(T){try{C(n.throw(T))}catch($){u($)}}function C(T){T.done?o(T.value):r(T.value).then(v,S)}C((n=n.apply(i,t||[])).next())})},M0=function(i,t){var e={};for(var n in i)Object.prototype.hasOwnProperty.call(i,n)&&t.indexOf(n)<0&&(e[n]=i[n]);if(i!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,n=Object.getOwnPropertySymbols(i);r<n.length;r++)t.indexOf(n[r])<0&&Object.prototype.propertyIsEnumerable.call(i,n[r])&&(e[n[r]]=i[n[r]]);return e};class Nu extends mo{constructor(t,e){super(t,Object.assign({},Nu.defaultOptions,e)),this.$element=mc("watermark"),this.context.canvas.getContainer().appendChild(this.$element),this.update(e)}update(t){const e=Object.create(null,{update:{get:()=>super.update}});return S0(this,void 0,void 0,function*(){e.update.call(this,t);const n=this.options,{width:r,height:o,text:u,imageURL:v}=n,S=M0(n,["width","height","text","imageURL"]);Object.keys(S).forEach(T=>{T.startsWith("background")&&(this.$element.style[T]=t[T])});const C=v?yield w0(r,o,v,S):yield x0(r,o,u,S);this.$element.style.backgroundImage=`url(${C})`})}destroy(){super.destroy(),this.$element.remove()}}Nu.defaultOptions={width:200,height:100,opacity:.2,rotate:Math.PI/12,text:"",textFill:"#000",textFontSize:16,textAlign:"center",textBaseline:"middle",backgroundRepeat:"repeat"};const C0=["#7E92B5","#F4664A","#FFBE3A"],O0={type:"group",color:["#1783FF","#00C9C9","#F08F56","#D580FF","#7863FF","#DB9D0D","#60C42D","#FF80CA","#2491B3","#17C76F"]},T0={type:"group",color:["#99ADD1","#1783FF","#00C9C9","#F08F56","#D580FF","#7863FF","#DB9D0D","#60C42D","#FF80CA","#2491B3","#17C76F"]};function Pf(i){const{bgColor:t,textColor:e,nodeColor:n,nodeColorDisabled:r,nodeStroke:o,nodeHaloStrokeOpacityActive:u=.15,nodeHaloStrokeOpacitySelected:v=.25,nodeOpacityDisabled:S=.06,nodeIconOpacityInactive:C=.85,nodeOpacityInactive:T=.25,nodeBadgePalette:$=C0,nodePaletteOptions:lt=O0,edgeColor:gt,edgeColorDisabled:Gt,edgePaletteOptions:ee=T0,comboColor:ve,comboColorDisabled:ke,comboStroke:ze,comboStrokeDisabled:Ke,edgeColorInactive:ln}=i;return{background:t,node:{palette:lt,style:{donutOpacity:1,badgeBackgroundOpacity:1,badgeFill:"#fff",badgeFontSize:8,badgePadding:[0,4],badgePalette:$,fill:n,fillOpacity:1,halo:!1,iconFill:"#fff",iconOpacity:1,labelBackground:!1,labelBackgroundFill:t,labelBackgroundLineWidth:0,labelBackgroundOpacity:.75,labelFill:e,labelFillOpacity:.85,labelLineHeight:16,labelPadding:[0,2],labelFontSize:12,labelFontWeight:400,labelOpacity:1,labelOffsetY:2,lineWidth:0,portFill:n,portLineWidth:1,portStroke:o,portStrokeOpacity:.65,size:32,stroke:o,strokeOpacity:1,zIndex:2},state:{selected:{halo:!0,haloLineWidth:24,haloStrokeOpacity:v,labelFontSize:12,labelFontWeight:"bold",lineWidth:4,stroke:o},active:{halo:!0,haloLineWidth:12,haloStrokeOpacity:u},highlight:{labelFontWeight:"bold",lineWidth:4,stroke:o,strokeOpacity:.85},inactive:{badgeBackgroundOpacity:T,donutOpacity:T,fillOpacity:T,iconOpacity:C,labelFill:e,labelFillOpacity:T,strokeOpacity:T},disabled:{badgeBackgroundOpacity:.25,donutOpacity:S,fill:r,fillOpacity:S,iconFill:r,iconOpacity:.25,labelFill:e,labelFillOpacity:.25,strokeOpacity:S}},animation:{enter:"fade",exit:"fade",show:"fade",hide:"fade",expand:"node-expand",collapse:"node-collapse",update:[{fields:["x","y","fill","stroke"]}],translate:[{fields:["x","y"]}]}},edge:{palette:ee,style:{badgeBackgroundFill:gt,badgeFill:"#fff",badgeFontSize:8,badgeOffsetX:10,fillOpacity:1,halo:!1,haloLineWidth:12,haloStrokeOpacity:1,increasedLineWidthForHitTesting:2,labelBackground:!1,labelBackgroundFill:t,labelBackgroundLineWidth:0,labelBackgroundOpacity:.75,labelBackgroundPadding:[4,4,4,4],labelFill:e,labelFontSize:12,labelFontWeight:400,labelOpacity:1,labelPlacement:"center",labelTextBaseline:"middle",lineWidth:1,stroke:gt,strokeOpacity:1,zIndex:1},state:{selected:{halo:!0,haloStrokeOpacity:.25,labelFontSize:14,labelFontWeight:"bold",lineWidth:3},active:{halo:!0,haloStrokeOpacity:.15},highlight:{labelFontWeight:"bold",lineWidth:3},inactive:{stroke:ln,fillOpacity:.08,labelOpacity:.25,strokeOpacity:.08,badgeBackgroundOpacity:.25},disabled:{stroke:Gt,fillOpacity:.45,strokeOpacity:.45,labelOpacity:.25,badgeBackgroundOpacity:.45}},animation:{enter:"fade",exit:"fade",expand:"path-in",collapse:"path-out",show:"fade",hide:"fade",update:[{fields:["sourceNode","targetNode"]},{fields:["stroke"],shape:"key"}],translate:[{fields:["sourceNode","targetNode"]}]}},combo:{style:{collapsedMarkerFill:t,collapsedMarkerFontSize:12,collapsedMarkerFillOpacity:1,collapsedSize:32,collapsedFillOpacity:1,fill:ve,halo:!1,haloLineWidth:12,haloStroke:ze,haloStrokeOpacity:.25,labelBackground:!1,labelBackgroundFill:t,labelBackgroundLineWidth:0,labelBackgroundOpacity:.75,labelBackgroundPadding:[2,4,2,4],labelFill:e,labelFontSize:12,labelFontWeight:400,labelOpacity:1,lineDash:0,lineWidth:1,fillOpacity:.04,strokeOpacity:1,padding:10,stroke:ze},state:{selected:{halo:!0,labelFontSize:14,labelFontWeight:700,lineWidth:4},active:{halo:!0},highlight:{labelFontWeight:700,lineWidth:4},inactive:{fillOpacity:.65,labelOpacity:.25,strokeOpacity:.65},disabled:{fill:ke,fillOpacity:.25,labelOpacity:.25,stroke:Ke,strokeOpacity:.25}},animation:{enter:"fade",exit:"fade",show:"fade",hide:"fade",expand:"combo-expand",collapse:"combo-collapse",update:[{fields:["x","y"]},{fields:["fill","stroke","lineWidth"],shape:"key"}],translate:[{fields:["x","y"]}]}}}}const P0=Pf({bgColor:"#000000",comboColor:"#fdfdfd",comboColorDisabled:"#d0e4ff",comboStroke:"#99add1",comboStrokeDisabled:"#969696",edgeColor:"#637088",edgeColorDisabled:"#637088",edgeColorInactive:"#D0E4FF",edgePaletteOptions:{type:"group",color:["#637088","#0F55A6","#008383","#9C5D38","#8B53A6","#4E40A6","#8F6608","#3E801D","#A65383","#175E75","#0F8248"]},nodeColor:"#1783ff",nodeColorDisabled:"#D0E4FF",nodeHaloStrokeOpacityActive:.25,nodeHaloStrokeOpacitySelected:.45,nodeIconOpacityInactive:.45,nodeOpacityDisabled:.25,nodeOpacityInactive:.45,nodeStroke:"#d0e4ff",textColor:"#ffffff"}),A0=Pf({bgColor:"#ffffff",comboColor:"#99ADD1",comboColorDisabled:"#f0f0f0",comboStroke:"#99add1",comboStrokeDisabled:"#d9d9d9",edgeColor:"#99add1",edgeColorDisabled:"#d9d9d9",edgeColorInactive:"#1B324F",nodeColor:"#1783ff",nodeColorDisabled:"#1B324F",nodeHaloStrokeOpacityActive:.15,nodeHaloStrokeOpacitySelected:.25,nodeIconOpacityInactive:.85,nodeOpacityDisabled:.06,nodeOpacityInactive:.25,nodeStroke:"#000000",textColor:"#000000"});class Fs extends Kt{beforeDraw(t,e){return t}afterLayout(){}}class N0 extends Fs{beforeDraw(t){const{model:e}=this.context,n=t.add.combos,r=o=>{const u=[];return o.forEach((v,S)=>{const T=e.getAncestorsData(S,"combo").map($=>sn($)).reverse();u.push([S,v,T.length])}),new Map(u.sort(([,,v],[,,S])=>S-v).map(([v,S])=>[v,S]))};return t.add.combos=r(n),t.update.combos=r(t.update.combos),t}}function Vo(i,t,e,n,r){const o=sn(n),u=`${e}s`,v=r?n:i.add[u].get(o)||i.update[u].get(o)||i.remove[u].get(o)||n;Object.entries(i).forEach(([S,C])=>{t===S?C[u].set(o,v):C[u].delete(o)})}function Ru(i,t){return Object.keys(i).every(e=>i[e]===t[e])}class R0 extends Fs{beforeDraw(t,e){if(e.stage==="visibility"||!this.context.model.model.hasTreeStructure(ne))return t;const{model:n}=this.context,{add:r,update:o}=t,u=[...t.update.combos.entries(),...t.add.combos.entries()];for(;u.length;){const[v,S]=u.pop();if(Ca(S)){const C=n.getDescendantsData(v),T=C.map(sn),{internal:$,external:lt}=Et(T,gt=>n.getRelatedEdgesData(gt));C.forEach(gt=>{const Gt=sn(gt),ee=u.findIndex(([ke])=>ke===Gt);ee!==-1&&u.splice(ee,1);const ve=n.getElementType(Gt);Vo(t,"remove",ve,gt)}),$.forEach(gt=>Vo(t,"remove","edge",gt)),lt.forEach(gt=>{var Gt;const ee=sn(gt);((Gt=this.context.element)===null||Gt===void 0?void 0:Gt.getElement(ee))?o.edges.set(ee,gt):r.edges.set(ee,gt)})}else{const C=n.getChildrenData(v),T=C.map(sn),{edges:$}=Et(T,lt=>n.getRelatedEdgesData(lt));[...C,...$].forEach(lt=>{var gt;const Gt=sn(lt),ee=n.getElementType(Gt);((gt=this.context.element)===null||gt===void 0?void 0:gt.getElement(Gt))?Vo(t,"update",ee,lt):Vo(t,"add",ee,lt),ee==="combo"&&u.push([Gt,lt])})}}return t}}const Af=(i,t,e,n)=>{const r=`${e}s`,o=sn(n);!i.add[r].has(o)&&!i.update[r].has(o)&&i[t][r].set(sn(n),n)};class I0 extends Fs{getElement(t){return this.context.element.getElement(t)}handleExpand(t,e){if(Af(e,"add","node",t),Ca(t))return;const n=sn(t);Af(e,"add","node",t),this.context.model.getRelatedEdgesData(n,"out").forEach(u=>{Vo(e,"add","edge",u)}),this.context.model.getChildrenData(n).forEach(u=>{this.handleExpand(u,e)})}beforeDraw(t){const{graph:e,model:n}=this.context;if(!n.model.hasTreeStructure(Me))return t;const{add:{nodes:r,edges:o},update:{nodes:u}}=t,v=new Map,S=new Map;r.forEach((T,$)=>{Ca(T)&&v.set($,T)}),o.forEach(T=>{if(e.getElementType(T.source)!=="node")return;const $=e.getNodeData(T.source);Ca($)&&v.set(T.source,$)}),u.forEach((T,$)=>{const lt=this.getElement($);if(!lt)return;const gt=lt.attributes.collapsed;Ca(T)?gt||v.set($,T):gt&&S.set($,T)});const C=new Set;return v.forEach((T,$)=>{n.getDescendantsData($).forEach(gt=>{const Gt=sn(gt);if(C.has(Gt))return;Vo(t,"remove","node",gt),n.getRelatedEdgesData(Gt).forEach(ve=>{Vo(t,"remove","edge",ve)}),C.add(Gt)})}),S.forEach((T,$)=>{if(n.getAncestorsData($,Me).some(Ca)){Vo(t,"remove","node",T);return}this.handleExpand(T,t)}),t}}function D0(i,t,e,n=!1){const r=le[i][t];!n&&r?r!==e&&at.warn(`The extension ${t} of ${i} has been registered before.`):Object.assign(le[i],{[t]:e})}class Iu{constructor(t){this.type=t}}class fo extends Iu{constructor(t,e){super(t),this.data=e}}class Jo extends Iu{constructor(t,e,n,r){super(t),this.animationType=e,this.animation=n,this.data=r}}class Wl extends Iu{constructor(t,e,n){super(t),this.elementType=e,this.data=n}}class Du extends Iu{constructor(t,e){super(t),this.data=e}}function yo(i,t){i.emit(t.type,t)}function L0(i){if(!i)return null;if(i instanceof nt.BB)return{type:"canvas",element:i};let t=i;for(;t;){if(Ri(t))return{type:"node",element:t};if(na(t))return{type:"edge",element:t};if(to(t))return{type:"combo",element:t};t=t.parentElement}return null}const Gl="cachedStyle",Lu=i=>`__${i}__`;function k0(i,t){const e=Array.isArray(t)?t:[t];(0,Di.Z)(i,Gl)||(0,Qa.Z)(i,Gl,{}),e.forEach(n=>{(0,Qa.Z)((0,Di.Z)(i,Gl),Lu(n),i.attributes[n])})}function Nf(i,t){return(0,Di.Z)(i,[Gl,Lu(t)])}function _0(i,t){return Lu(t)in((0,Di.Z)(i,Gl)||{})}function Zv(i,t,e){set(i,[Gl,Lu(t)],e)}class Z0{constructor(t){this.tasks=[],this.animations=new Set,this.context=t}getTasks(){const t=[...this.tasks];return this.tasks=[],t}add(t,e){this.tasks.push([t,e])}animate(t,e,n){var r,o,u;(r=e==null?void 0:e.before)===null||r===void 0||r.call(e);const v=this.getTasks().map(([C,T])=>{var $,lt,gt;const{element:Gt,elementType:ee,stage:ve}=C,ke=bt(this.context.options,ee,ve,t);($=T==null?void 0:T.before)===null||$===void 0||$.call(T);const ze=M(Gt,this.inferStyle(C,n),ke);return ze?((lt=T==null?void 0:T.beforeAnimate)===null||lt===void 0||lt.call(T,ze),ze.finished.then(()=>{var Ke,ln;(Ke=T==null?void 0:T.afterAnimate)===null||Ke===void 0||Ke.call(T,ze),(ln=T==null?void 0:T.after)===null||ln===void 0||ln.call(T),this.animations.delete(ze)})):(gt=T==null?void 0:T.after)===null||gt===void 0||gt.call(T),ze}).filter(Boolean);v.forEach(C=>this.animations.add(C));const S=Fe(v);return S?((o=e==null?void 0:e.beforeAnimate)===null||o===void 0||o.call(e,S),S.finished.then(()=>{var C,T;(C=e==null?void 0:e.afterAnimate)===null||C===void 0||C.call(e,S),(T=e==null?void 0:e.after)===null||T===void 0||T.call(e),this.release()})):(u=e==null?void 0:e.after)===null||u===void 0||u.call(e),S}inferStyle(t,e){var n,r;const{element:o,elementType:u,stage:v,originalStyle:S,modifiedStyle:C}=t,T={},$={};if(v==="enter")Object.assign(T,{opacity:0});else if(v==="exit")Object.assign($,{opacity:0});else if(v==="show")Object.assign(T,{opacity:0}),Object.assign($,{opacity:(n=Nf(o,"opacity"))!==null&&n!==void 0?n:ge("opacity")});else if(v==="hide")Object.assign(T,{opacity:(r=Nf(o,"opacity"))!==null&&r!==void 0?r:ge("opacity")}),Object.assign($,{opacity:0});else if(v==="collapse"){const{collapse:lt}=e||{},{target:gt,descendants:Gt,position:ee}=lt;if(u==="node"){if(Gt.includes(o.id)){const[ve,ke,ze]=ee;Object.assign($,{x:ve,y:ke,z:ze})}}else if(u==="combo"){if(o.id===gt||Gt.includes(o.id)){const[ve,ke]=ee;Object.assign($,{x:ve,y:ke,childrenNode:S.childrenNode})}}else u==="edge"&&Object.assign($,{sourceNode:C.sourceNode,targetNode:C.targetNode})}else if(v==="expand"){const{expand:lt}=e||{},{target:gt,descendants:Gt,position:ee}=lt;if(u==="node"){if(o.id===gt||Gt.includes(o.id)){const[ve,ke,ze]=ee;Object.assign(T,{x:ve,y:ke,z:ze})}}else if(u==="combo"){if(o.id===gt||Gt.includes(o.id)){const[ve,ke,ze]=ee;Object.assign(T,{x:ve,y:ke,z:ze,childrenNode:C.childrenNode})}}else u==="edge"&&Object.assign(T,{sourceNode:C.sourceNode,targetNode:C.targetNode})}return[Object.keys(T).length>0?Object.assign({},S,T):S,Object.keys($).length>0?Object.assign({},C,$):C]}stop(){this.animations.forEach(t=>t.cancel())}clear(){this.tasks=[]}release(){var t,e;const{canvas:n}=this.context,r=(e=(t=n.document)===null||t===void 0?void 0:t.timeline)===null||e===void 0?void 0:e.animationsWithPromises;r&&(n.document.timeline.animationsWithPromises=r.filter(o=>o.playState!=="finished"))}destroy(){this.stop(),this.animations.clear(),this.tasks=[]}}class F0{constructor(t){this.batchCount=0,this.context=t}emit(t){const{graph:e}=this.context;e.emit(t.type,t)}startBatch(t=!0){this.batchCount++,this.batchCount===1&&this.emit(new fo(Oe.BATCH_START,{initiate:t}))}endBatch(){this.batchCount--,this.batchCount===0&&this.emit(new fo(Oe.BATCH_END))}get isBatching(){return this.batchCount>0}destroy(){this.context=null}}class B0 extends pt{constructor(t){super(t),this.currentTarget=null,this.currentTargetType=null,this.category="behavior",this.forwardCanvasEvents=e=>{const{target:n}=e,r=L0(n);if(!r)return;const{graph:o,canvas:u}=this.context,{type:v,element:S}=r;if("destroyed"in S&&(ha(S)||S.destroyed))return;const{type:C,detail:T,button:$}=e,lt=Object.assign(Object.assign({},e),{target:S,targetType:v,originalTarget:n});C===qt.POINTER_MOVE&&(this.currentTarget!==S&&(this.currentTarget&&o.emit(`${this.currentTargetType}:${qt.POINTER_LEAVE}`,Object.assign(Object.assign({},lt),{type:qt.POINTER_LEAVE,target:this.currentTarget,targetType:this.currentTargetType})),S&&(Object.assign(lt,{type:qt.POINTER_ENTER}),o.emit(`${v}:${qt.POINTER_ENTER}`,lt))),this.currentTarget=S,this.currentTargetType=v),C===qt.CLICK&&$===2||(o.emit(`${v}:${C}`,lt),o.emit(C,lt)),C===qt.CLICK&&T===2&&(Object.assign(lt,{type:qt.DBLCLICK}),o.emit(`${v}:${qt.DBLCLICK}`,lt),o.emit(qt.DBLCLICK,lt)),C===qt.POINTER_DOWN&&$===2&&(Object.assign(lt,{type:qt.CONTEXT_MENU,preventDefault:()=>{var gt;(gt=u.getContainer())===null||gt===void 0||gt.addEventListener(qt.CONTEXT_MENU,Gt=>Gt.preventDefault(),{once:!0})}}),o.emit(`${v}:${qt.CONTEXT_MENU}`,lt),o.emit(qt.CONTEXT_MENU,lt))},this.forwardContainerEvents=e=>{this.context.graph.emit(e.type,e)},this.forwardEvents(),this.setBehaviors(this.context.options.behaviors||[])}setBehaviors(t){this.setExtensions(t)}forwardEvents(){const t=this.context.canvas.getContainer();t&&[Ye.KEY_DOWN,Ye.KEY_UP].forEach(n=>{t.addEventListener(n,this.forwardContainerEvents)});const e=this.context.canvas.document;e&&[qt.CLICK,qt.DBLCLICK,qt.POINTER_OVER,qt.POINTER_LEAVE,qt.POINTER_ENTER,qt.POINTER_MOVE,qt.POINTER_OUT,qt.POINTER_DOWN,qt.POINTER_UP,qt.CONTEXT_MENU,qt.DRAG_START,qt.DRAG,qt.DRAG_END,qt.DRAG_ENTER,qt.DRAG_OVER,qt.DRAG_LEAVE,qt.DROP,qt.WHEEL].forEach(n=>{e.addEventListener(n,this.forwardCanvasEvents)})}destroy(){const t=this.context.canvas.getContainer();t&&[Ye.KEY_DOWN,Ye.KEY_UP].forEach(e=>{t.removeEventListener(e,this.forwardContainerEvents)}),this.context.canvas.document.removeAllEventListeners(),super.destroy()}}var z0=d(19584),j0=d(85580),Rf=function(i,t,e,n){function r(o){return o instanceof e?o:new e(function(u){u(o)})}return new(e||(e=Promise))(function(o,u){function v(T){try{C(n.next(T))}catch($){u($)}}function S(T){try{C(n.throw(T))}catch($){u($)}}function C(T){T.done?o(T.value):r(T.value).then(v,S)}C((n=n.apply(i,t||[])).next())})},If=function(i,t){var e={};for(var n in i)Object.prototype.hasOwnProperty.call(i,n)&&t.indexOf(n)<0&&(e[n]=i[n]);if(i!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,n=Object.getOwnPropertySymbols(i);r<n.length;r++)t.indexOf(n[r])<0&&Object.prototype.propertyIsEnumerable.call(i,n[r])&&(e[n[r]]=i[n[r]]);return e};const Df=["background","main","label","transient"];class Lf{getConfig(){return this.config}getLayer(t="main"){return this.extends.layers[t]}getLayers(){return this.extends.layers}getRenderer(t){return this.extends.renderers[t]}getCamera(t="main"){return this.getLayer(t).getCamera()}getRoot(t="main"){return this.getLayer(t).getRoot()}getContextService(t="main"){return this.getLayer(t).getContextService()}setCursor(t){this.config.cursor=t,this.getLayer().setCursor(t)}get document(){return this.getLayer().document}get context(){return this.getLayer().context}constructor(t){this.config=t;const{renderer:e,background:n,cursor:r}=t,o=If(t,["renderer","background","cursor"]),u=kf(e),v=Object.fromEntries(Df.map(S=>{const C=new nt.Xz(Object.assign(Object.assign({},o),{supportsMutipleCanvasesInOneContainer:!0,renderer:u[S],background:S==="background"?n:void 0}));return[S,C]}));_f(v),this.extends={config:t,renderer:e,renderers:u,layers:v}}get ready(){return Promise.all(Object.entries(this.getLayers()).map(([,t])=>t.ready))}resize(t,e){Object.assign(this.extends.config,{width:t,height:e}),Object.values(this.getLayers()).forEach(n=>{const r=n.getCamera(),o=r.getPosition(),u=r.getFocalPoint();n.resize(t,e),r.setPosition(o),r.setFocalPoint(u)})}getBounds(t){return Bn(Object.values(this.getLayers()).map(e=>t?e.getRoot().childNodes.find(r=>r.classList.includes(t)):e.getRoot()).filter(e=>(e==null?void 0:e.childNodes.length)>0).map(e=>e.getBounds()))}getContainer(){const t=this.extends.config.container;return typeof t=="string"?document.getElementById(t):t}getSize(){return[this.extends.config.width||0,this.extends.config.height||0]}appendChild(t,e){var n;const r=((n=t.style)===null||n===void 0?void 0:n.$layer)||"main";return this.getLayer(r).appendChild(t,e)}setRenderer(t){if(t===this.extends.renderer)return;const e=kf(t);this.extends.renderers=e,Object.entries(e).forEach(([n,r])=>this.getLayer(n).setRenderer(r)),_f(this.getLayers())}getCanvasByViewport(t){return Lr(this.getLayer().viewport2Canvas(fi(t)))}getViewportByCanvas(t){return Lr(this.getLayer().canvas2Viewport(fi(t)))}getViewportByClient(t){return Lr(this.getLayer().client2Viewport(fi(t)))}getClientByViewport(t){return Lr(this.getLayer().viewport2Client(fi(t)))}getClientByCanvas(t){return this.getClientByViewport(this.getViewportByCanvas(t))}getCanvasByClient(t){const e=this.getLayer(),n=e.client2Viewport(fi(t));return Lr(e.viewport2Canvas(n))}toDataURL(){return Rf(this,arguments,void 0,function*(t={}){const e=window.devicePixelRatio||1,{mode:n="viewport"}=t,r=If(t,["mode"]);let[o,u,v,S]=[0,0,0,0];if(n==="viewport")[v,S]=this.getSize();else if(n==="overall"){const ke=this.getBounds(),ze=Cn(ke);[o,u]=ke.min,[v,S]=ze}const C=(0,j0.L)('<div id="virtual-image"></div>'),T=new nt.Xz({width:v,height:S,renderer:new La.Th,devicePixelRatio:e,container:C,background:this.extends.config.background});yield T.ready,T.appendChild(this.getLayer("background").getRoot().cloneNode(!0)),T.appendChild(this.getRoot().cloneNode(!0));const $=this.getLayer("label").getRoot().cloneNode(!0),lt=T.viewport2Canvas({x:0,y:0}),gt=this.getCanvasByViewport([0,0]);$.translate([gt[0]-lt.x,gt[1]-lt.y]),$.scale(1/this.getCamera().getZoom()),T.appendChild($),T.appendChild(this.getLayer("transient").getRoot().cloneNode(!0));const Gt=this.getCamera(),ee=T.getCamera();if(n==="viewport")ee.setZoom(Gt.getZoom()),ee.setPosition(Gt.getPosition()),ee.setFocalPoint(Gt.getFocalPoint());else if(n==="overall"){const[ke,ze,Ke]=ee.getPosition(),[ln,kn,Tn]=ee.getFocalPoint();ee.setPosition([ke+o,ze+u,Ke]),ee.setFocalPoint([ln+o,kn+u,Tn])}const ve=T.getContextService();return new Promise(ke=>{T.addEventListener(nt.$6.RERENDER,()=>Rf(this,void 0,void 0,function*(){yield new Promise(Ke=>setTimeout(Ke,300));const ze=yield ve.toDataURL(r);ke(ze)}))})})}destroy(){Object.values(this.getLayers()).forEach(t=>{t.getCamera().cancelLandmarkAnimation(),t.destroy()})}}function kf(i){return Object.fromEntries(Df.map(t=>{const e=(i==null?void 0:i(t))||new La.Th;return t==="main"?e.registerPlugin(new z0.S({isDocumentDraggable:!0,isDocumentDroppable:!0,dragstartDistanceThreshold:10,dragstartTimeThreshold:100})):e.unregisterPlugin(e.getPlugin("dom-interaction")),[t,e]}))}function _f(i){Object.entries(i).forEach(([t,e])=>{const n=e.getContextService().getDomElement();n.style.position="absolute",n.style.outline="none",n.tabIndex=1,t!=="main"&&(n.style.pointerEvents="none")})}var $0=d(35300),yc=function(i,t){var e={};for(var n in i)Object.prototype.hasOwnProperty.call(i,n)&&t.indexOf(n)<0&&(e[n]=i[n]);if(i!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,n=Object.getOwnPropertySymbols(i);r<n.length;r++)t.indexOf(n[r])<0&&Object.prototype.propertyIsEnumerable.call(i,n[r])&&(e[n[r]]=i[n[r]]);return e};function Bs(i,t){const{data:e,style:n}=i,r=yc(i,["data","style"]),{data:o,style:u}=t,v=yc(t,["data","style"]),S=Object.assign(Object.assign({},r),v);return(e||o)&&Object.assign(S,{data:Object.assign(Object.assign({},e),o)}),(n||u)&&Object.assign(S,{style:Object.assign(Object.assign({},n),u)}),S}function Ud(i){const{data:t,style:e}=i,r=yc(i,["data","style"]);return t&&(r.data=Object.assign({},t)),e&&(r.style=Object.assign({},e)),r}function Fv(i){return!get(i,["nodes","length"])&&!get(i,["edges","length"])&&!get(i,["combos","length"])}function Vl(i={},t={}){const{states:e=[],data:n={},style:r={},children:o=[]}=i,u=yc(i,["states","data","style","children"]),{states:v=[],data:S={},style:C={},children:T=[]}=t,$=yc(t,["states","data","style","children"]),lt=(Gt,ee)=>Gt.length!==ee.length?!1:Gt.every((ve,ke)=>ve===ee[ke]),gt=(Gt,ee)=>{const ve=Object.keys(Gt),ke=Object.keys(ee);return ve.length!==ke.length?!1:ve.every(ze=>Gt[ze]===ee[ze])};return!(!gt(u,$)||!lt(o,T)||!lt(e,v)||!gt(n,S)||!gt(r,C))}var W0=function(i,t){var e={};for(var n in i)Object.prototype.hasOwnProperty.call(i,n)&&t.indexOf(n)<0&&(e[n]=i[n]);if(i!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,n=Object.getOwnPropertySymbols(i);r<n.length;r++)t.indexOf(n[r])<0&&Object.prototype.propertyIsEnumerable.call(i,n[r])&&(e[n[r]]=i[n[r]]);return e};function Hd(i){const{id:t=sn(i),style:e,data:n}=i,r=W0(i,["id","style","data"]),o=Object.assign(Object.assign({},i),{style:Object.assign({},e),data:Object.assign({},n)});return ae(i)?Object.assign({id:t,data:o},r):{id:t,data:o}}function ho(i){return i.data}function G0(i){if(i.hasTreeStructure(Me))return;i.attachTreeStructure(Me);const t=i.getAllEdges();for(const e of t){const{source:n,target:r}=e;i.setParent(r,n,Me)}}class V0{constructor(){this.latestRemovedComboIds=new Set,this.comboIds=new Set,this.changes=[],this.batchCount=0,this.isTraceless=!1,this.enableUpdateNodeLikeHierarchy=!0,this.model=new Ua.k}pushChange(t){if(this.isTraceless)return;const{type:e}=t;if(e===zt.NodeUpdated||e===zt.EdgeUpdated||e===zt.ComboUpdated){const{value:n,original:r}=t;this.changes.push({value:Ud(n),original:Ud(r),type:e})}else this.changes.push({value:Ud(t.value),type:e})}getChanges(){return this.changes}clearChanges(){this.changes=[]}batch(t){this.batchCount++,this.model.batch(t),this.batchCount--}silence(t){this.isTraceless=!0,t(),this.isTraceless=!1}isCombo(t){return this.comboIds.has(t)||this.latestRemovedComboIds.has(t)}getData(){return{nodes:this.getNodeData(),edges:this.getEdgeData(),combos:this.getComboData()}}getNodeData(t){return this.model.getAllNodes().reduce((e,n)=>{const r=ho(n);return this.isCombo(sn(r))||(t===void 0||t.includes(sn(r)))&&e.push(r),e},[])}getEdgeDatum(t){return ho(this.model.getEdge(t))}getEdgeData(t){return this.model.getAllEdges().reduce((e,n)=>{const r=ho(n);return(t===void 0||t.includes(sn(r)))&&e.push(r),e},[])}getComboData(t){return this.model.getAllNodes().reduce((e,n)=>{const r=ho(n);return this.isCombo(sn(r))&&(t===void 0||t.includes(sn(r)))&&e.push(r),e},[])}getRootsData(t=Me){return this.model.getRoots(t).map(ho)}getAncestorsData(t,e){const{model:n}=this;return!n.hasNode(t)||!n.hasTreeStructure(e)?[]:n.getAncestors(t,e).map(ho)}getDescendantsData(t){const e=this.getElementDataById(t),n=[];return Xa(e,r=>{r!==e&&n.push(r)},r=>this.getChildrenData(sn(r)),"TB"),n}getParentData(t,e){const{model:n}=this;if(!e){at.warn("The hierarchy structure key is not specified");return}if(!n.hasNode(t)||!n.hasTreeStructure(e))return;const r=n.getParent(t,e);return r?ho(r):void 0}getChildrenData(t){const e=this.getElementType(t)==="node"?Me:ne,{model:n}=this;return!n.hasNode(t)||!n.hasTreeStructure(e)?[]:n.getChildren(t,e).map(ho)}getElementsDataByType(t){return t==="node"?this.getNodeData():t==="edge"?this.getEdgeData():t==="combo"?this.getComboData():[]}getElementDataById(t){return this.getElementType(t)==="edge"?this.getEdgeDatum(t):this.getNodeLikeDatum(t)}getNodeLikeDatum(t){const e=this.model.getNode(t);return ho(e)}getNodeLikeData(t){return this.model.getAllNodes().reduce((e,n)=>{const r=ho(n);return t?t.includes(sn(r))&&e.push(r):e.push(r),e},[])}getElementDataByState(t,e){return this.getElementsDataByType(t).filter(r=>{var o;return(o=r.states)===null||o===void 0?void 0:o.includes(e)})}getElementState(t){var e;return((e=this.getElementDataById(t))===null||e===void 0?void 0:e.states)||[]}hasNode(t){return this.model.hasNode(t)&&!this.isCombo(t)}hasEdge(t){return this.model.hasEdge(t)}hasCombo(t){return this.model.hasNode(t)&&this.isCombo(t)}getRelatedEdgesData(t,e="both"){return this.model.getRelatedEdges(t,e).map(ho)}getNeighborNodesData(t){return this.model.getNeighbors(t).map(ho)}setData(t){const{nodes:e=[],edges:n=[],combos:r=[]}=t,{nodes:o,edges:u,combos:v}=this.getData(),S=Dt(o,e,$=>sn($),Vl),C=Dt(u,n,$=>sn($),Vl),T=Dt(v,r,$=>sn($),Vl);this.batch(()=>{this.addData({nodes:S.enter,edges:C.enter,combos:T.enter}),this.updateData({nodes:S.update,edges:C.update,combos:T.update}),this.removeData({nodes:S.exit.map(sn),edges:C.exit.map(sn),combos:T.exit.map(sn)})})}addData(t){const{nodes:e,edges:n,combos:r}=t;this.batch(()=>{this.addComboData(r),this.addNodeData(e),this.addEdgeData(n)})}addNodeData(t=[]){t.length&&(this.model.addNodes(t.map(e=>(this.pushChange({value:e,type:zt.NodeAdded}),Hd(e)))),this.updateNodeLikeHierarchy(t))}addEdgeData(t=[]){t.length&&this.model.addEdges(t.map(e=>(this.pushChange({value:e,type:zt.EdgeAdded}),Hd(e))))}addComboData(t=[]){if(!t.length)return;const{model:e}=this;e.hasTreeStructure(ne)||e.attachTreeStructure(ne),e.addNodes(t.map(n=>(this.comboIds.add(sn(n)),this.pushChange({value:n,type:zt.ComboAdded}),Hd(n)))),this.updateNodeLikeHierarchy(t)}addChildrenData(t,e){const n=this.getNodeLikeDatum(t),r=e.map(sn);this.addNodeData(e),this.updateNodeData([{id:t,children:[...n.children||[],...r]}]),this.addEdgeData(r.map(o=>({source:t,target:o})))}updateNodeLikeHierarchy(t){if(!this.enableUpdateNodeLikeHierarchy)return;const{model:e}=this;t.forEach(n=>{const r=sn(n);Wt(n)&&(e.hasTreeStructure(ne)||e.attachTreeStructure(ne),this.setParent(r,Wt(n),ne));const u=n.children||[];if(u.length){e.hasTreeStructure(Me)||e.attachTreeStructure(Me);const v=u.filter(S=>e.hasNode(S));v.forEach(S=>this.setParent(S,r,Me)),v.length!==u.length&&this.updateNodeData([{id:r,children:v}])}})}preventUpdateNodeLikeHierarchy(t){this.enableUpdateNodeLikeHierarchy=!1,t(),this.enableUpdateNodeLikeHierarchy=!0}updateData(t){const{nodes:e,edges:n,combos:r}=t;this.batch(()=>{this.updateNodeData(e),this.updateComboData(r),this.updateEdgeData(n)})}updateNodeData(t=[]){if(!t.length)return;const{model:e}=this;this.batch(()=>{const n=[];t.forEach(r=>{const o=sn(r),u=ho(e.getNode(o));if(Vl(u,r))return;const v=Bs(u,r);this.pushChange({value:v,original:u,type:zt.NodeUpdated}),e.mergeNodeData(o,v),n.push(v)}),this.updateNodeLikeHierarchy(n)})}refreshData(){const{nodes:t,edges:e,combos:n}=this.getData();t.forEach(r=>{this.pushChange({value:r,original:r,type:zt.NodeUpdated})}),e.forEach(r=>{this.pushChange({value:r,original:r,type:zt.EdgeUpdated})}),n.forEach(r=>{this.pushChange({value:r,original:r,type:zt.ComboUpdated})})}syncNodeDatum(t){const{model:e}=this,n=sn(t),r=ho(e.getNode(n)),o=Bs(r,t);e.mergeNodeData(n,o)}updateEdgeData(t=[]){if(!t.length)return;const{model:e}=this;this.batch(()=>{t.forEach(n=>{const r=sn(n),o=ho(e.getEdge(r));if(Vl(o,n))return;n.source&&o.source!==n.source&&e.updateEdgeSource(r,n.source),n.target&&o.target!==n.target&&e.updateEdgeTarget(r,n.target);const u=Bs(o,n);this.pushChange({value:u,original:o,type:zt.EdgeUpdated}),e.mergeEdgeData(r,u)})})}updateComboData(t=[]){if(!t.length)return;const{model:e}=this;e.batch(()=>{const n=[];t.forEach(r=>{const o=sn(r),u=ho(e.getNode(o));if(Vl(u,r))return;const v=Bs(u,r);this.pushChange({value:v,original:u,type:zt.ComboUpdated}),e.mergeNodeData(o,v),n.push(v)}),this.updateNodeLikeHierarchy(n)})}setParent(t,e,n,r=!0){var o;if(t===e)return;const u=this.getNodeLikeDatum(t),v=Wt(u);if(e){const S=this.getNodeLikeDatum(e);if(((o=S.style)===null||o===void 0?void 0:o.zIndex)!==void 0){const C=(0,Di.Z)(S,["style","zIndex"],0)+(this.isCombo(e)?1:0);(0,Qa.Z)(u,["style","zIndex"],C)}}if(v!==e&&n===ne){const S={id:t,combo:e};this.isCombo(t)?this.syncComboDatum(S):this.syncNodeDatum(S)}this.model.setParent(t,e,n),r&&n===ne&&(0,$0.Z)([v,e]).forEach(S=>{S!==void 0&&this.refreshComboData(S)})}refreshComboData(t){const e=this.getComboData([t])[0],n=this.getAncestorsData(t,ne);e&&this.pushChange({value:e,original:e,type:zt.ComboUpdated}),n.forEach(r=>{this.pushChange({value:r,original:r,type:zt.ComboUpdated})})}syncComboDatum(t){const{model:e}=this,n=sn(t);if(!e.hasNode(n))return;const r=ho(e.getNode(n)),o=Bs(r,t);e.mergeNodeData(n,o)}getElementPosition(t){const e=this.getElementDataById(t);return er(e)}translateNodeLikeBy(t,e){this.isCombo(t)?this.translateComboBy(t,e):this.translateNodeBy(t,e)}translateNodeLikeTo(t,e){this.isCombo(t)?this.translateComboTo(t,e):this.translateNodeTo(t,e)}translateNodeBy(t,e){const n=this.getElementPosition(t),r=rt(n,[...e,0].slice(0,3));this.translateNodeTo(t,r)}translateNodeTo(t,e){const[n=0,r=0,o=0]=e;this.preventUpdateNodeLikeHierarchy(()=>{this.updateNodeData([{id:t,style:{x:n,y:r,z:o}}])})}translateComboBy(t,e){const[n=0,r=0,o=0]=e;if([n,r,o].some(isNaN)||[n,r,o].every(S=>S===0))return;const u=this.getComboData([t])[0];if(!u)return;const v=new Set;Xa(u,S=>{const C=sn(S);if(v.has(C))return;v.add(C);const[T,$,lt]=er(S),gt=Bs(S,{style:{x:T+n,y:$+r,z:lt+o}});this.pushChange({value:gt,original:S,type:this.isCombo(C)?zt.ComboUpdated:zt.NodeUpdated}),this.model.mergeNodeData(C,gt)},S=>this.getChildrenData(sn(S)),"BT")}translateComboTo(t,e){var n;if(e.some(isNaN))return;const[r=0,o=0,u=0]=e,v=(n=this.getComboData([t]))===null||n===void 0?void 0:n[0];if(!v)return;const[S,C,T]=er(v),$=r-S,lt=o-C,gt=u-T;Xa(v,Gt=>{const ee=sn(Gt),[ve,ke,ze]=er(Gt),Ke=Bs(Gt,{style:{x:ve+$,y:ke+lt,z:ze+gt}});this.pushChange({value:Ke,original:Gt,type:this.isCombo(ee)?zt.ComboUpdated:zt.NodeUpdated}),this.model.mergeNodeData(ee,Ke)},Gt=>this.getChildrenData(sn(Gt)),"BT")}removeData(t){const{nodes:e,edges:n,combos:r}=t;this.batch(()=>{this.removeEdgeData(n),this.removeNodeData(e),this.removeComboData(r),this.latestRemovedComboIds=new Set(r)})}removeNodeData(t=[]){t.length&&this.batch(()=>{t.forEach(e=>{this.removeEdgeData(this.getRelatedEdgesData(e).map(sn)),this.pushChange({value:this.getNodeData([e])[0],type:zt.NodeRemoved}),this.removeNodeLikeHierarchy(e)}),this.model.removeNodes(t)})}removeEdgeData(t=[]){t.length&&(t.forEach(e=>this.pushChange({value:this.getEdgeData([e])[0],type:zt.EdgeRemoved})),this.model.removeEdges(t))}removeComboData(t=[]){t.length&&this.batch(()=>{t.forEach(e=>{this.pushChange({value:this.getComboData([e])[0],type:zt.ComboRemoved}),this.removeNodeLikeHierarchy(e),this.comboIds.delete(e)}),this.model.removeNodes(t)})}removeNodeLikeHierarchy(t){if(this.model.hasTreeStructure(ne)){const e=Wt(this.getNodeLikeDatum(t));this.setParent(t,void 0,ne,!1),this.model.getChildren(t,ne).forEach(n=>{const r=ho(n),o=sn(r);this.setParent(sn(r),e,ne,!1);const u=Bs(r,{id:sn(r),combo:e});this.pushChange({value:u,original:r,type:this.isCombo(o)?zt.ComboUpdated:zt.NodeUpdated}),this.model.mergeNodeData(sn(r),u)}),(0,ta.Z)(e)||this.refreshComboData(e)}}getElementType(t){if(this.model.hasNode(t))return this.isCombo(t)?"combo":"node";if(this.model.hasEdge(t))return"edge";throw new Error(xt(`Unknown element type of id: ${t}`))}destroy(){const{model:t}=this,e=t.getAllNodes(),n=t.getAllEdges();t.removeEdges(n.map(r=>r.id)),t.removeNodes(e.map(r=>r.id)),this.context={}}}var ku=function(i,t,e,n){function r(o){return o instanceof e?o:new e(function(u){u(o)})}return new(e||(e=Promise))(function(o,u){function v(T){try{C(n.next(T))}catch($){u($)}}function S(T){try{C(n.throw(T))}catch($){u($)}}function C(T){T.done?o(T.value):r(T.value).then(v,S)}C((n=n.apply(i,t||[])).next())})};class U0{constructor(t){this.elementMap={},this.shapeTypeMap={},this.paletteStyle={},this.defaultStyle={},this.stateStyle={},this.visibilityCache=new WeakMap,this.context=t}init(){if(!this.container){const{canvas:t}=this.context;this.container=t.appendChild(new nt.ZA({className:"elements"}))}}emit(t,e){e.silence||yo(this.context.graph,t)}forEachElementData(t){Ra.forEach(e=>{const n=this.context.model.getElementsDataByType(e);t(e,n)})}getElementType(t,e){var n;const{options:r,graph:o}=this.context,u=((n=r[t])===null||n===void 0?void 0:n.type)||e.type;return u?typeof u=="string"?u:u.call(o,e):t==="edge"?"line":"circle"}getTheme(t){return se(this.context.options)[t]||{}}getThemeStyle(t){return this.getTheme(t).style||{}}getThemeStateStyle(t,e){const{state:n={}}=this.getTheme(t);return Object.assign({},...e.map(r=>n[r]||{}))}computePaletteStyle(){const{options:t}=this.context;this.paletteStyle={},this.forEachElementData((e,n)=>{var r,o;const u=Object.assign({},es((r=this.getTheme(e))===null||r===void 0?void 0:r.palette),es((o=t[e])===null||o===void 0?void 0:o.palette));u!=null&&u.field&&Object.assign(this.paletteStyle,Ta(n,u))})}getPaletteStyle(t,e){const n=this.paletteStyle[e];return n?t==="edge"?{stroke:n}:{fill:n}:{}}computeElementDefaultStyle(t,e){var n;const{options:r}=this.context,o=((n=r[t])===null||n===void 0?void 0:n.style)||{};"transform"in o&&Array.isArray(o.transform)&&(o.transform=[...o.transform]),this.defaultStyle[sn(e.datum)]=qa(o,e)}computeElementsDefaultStyle(t){const{graph:e}=this.context;this.forEachElementData((n,r)=>{const o=r.length;for(let u=0;u<o;u++){const v=r[u];(t===void 0||t.includes(sn(v)))&&this.computeElementDefaultStyle(n,{datum:v,graph:e})}})}getDefaultStyle(t){return this.defaultStyle[t]||{}}getElementState(t){try{const{model:e}=this.context;return e.getElementState(t)}catch(e){return[]}}getElementStateStyle(t,e,n){var r,o;const{options:u}=this.context,v=((o=(r=u[t])===null||r===void 0?void 0:r.state)===null||o===void 0?void 0:o[e])||{};return qa(v,n)}computeElementStatesStyle(t,e,n){this.stateStyle[sn(n.datum)]=Object.assign({},...e.map(r=>this.getElementStateStyle(t,r,n)))}computeElementsStatesStyle(t){const{graph:e}=this.context;this.forEachElementData((n,r)=>{const o=r.length;for(let u=0;u<o;u++){const v=r[u];if(t===void 0||t.includes(sn(v))){const S=this.getElementState(sn(v));this.computeElementStatesStyle(n,S,{datum:v,graph:e})}}})}getStateStyle(t){return this.stateStyle[t]||{}}computeStyle(t,e){t&&["translate","zIndex"].includes(t)||(this.computePaletteStyle(),this.computeElementsDefaultStyle(e),this.computeElementsStatesStyle(e))}getElement(t){return this.elementMap[t]}getElementZIndex(t){var e;const n=this.getElement(t);return n&&(e=n.style.zIndex)!==null&&e!==void 0?e:0}getNodes(){return this.context.model.getNodeData().map(({id:t})=>this.elementMap[t])}getEdges(){return this.context.model.getEdgeData().map(t=>this.elementMap[sn(t)])}getCombos(){return this.context.model.getComboData().map(({id:t})=>this.elementMap[t])}getElementComputedStyle(t,e){const n=sn(e),r=this.getThemeStyle(t),o=this.getPaletteStyle(t,n),u=e.style||{},v=this.getDefaultStyle(n),S=this.getThemeStateStyle(t,this.getElementState(n)),C=this.getStateStyle(n),T=Object.assign({},r,o,u,v,S,C);if(t==="combo"){const $=this.context.model.getChildrenData(n),gt=!!T.collapsed?[]:$.map(sn).filter(Gt=>this.getElement(Gt));Object.assign(T,{childrenNode:gt,childrenData:$})}return T}draw(t={animation:!0}){this.init();const e=this.computeChangesAndDrawData(t);if(!e)return null;const{dataChanges:n,drawData:r}=e;this.markDestroyElement(r),this.computeStyle(t.stage);const{add:o,update:u,remove:v}=r;this.destroyElements(v,t),this.createElements(o,t),this.updateElements(u,t);const{animation:S,silence:C}=t,{type:T="draw"}=t;return this.context.animation.animate(S,C?{}:{before:()=>this.emit(new fo(Oe.BEFORE_DRAW,{dataChanges:n,animation:S,render:T==="render"}),t),beforeAnimate:$=>this.emit(new Jo(Oe.BEFORE_ANIMATE,Ot.DRAW,$,r),t),afterAnimate:$=>this.emit(new Jo(Oe.AFTER_ANIMATE,Ot.DRAW,$,r),t),after:()=>this.emit(new fo(Oe.AFTER_DRAW,{dataChanges:n,animation:S,render:T==="render"}),t)})}computeChangesAndDrawData(t){const{model:e}=this.context,n=e.getChanges(),r=Wd(n);if(r.length===0)return null;const{NodeAdded:o=[],NodeUpdated:u=[],NodeRemoved:v=[],EdgeAdded:S=[],EdgeUpdated:C=[],EdgeRemoved:T=[],ComboAdded:$=[],ComboUpdated:lt=[],ComboRemoved:gt=[]}=(0,Rt.Z)(r,ke=>ke.type),Gt=ke=>new Map(ke.map(ze=>{const Ke=ze.value;return[sn(Ke),Ke]})),ee={add:{nodes:Gt(o),edges:Gt(S),combos:Gt($)},update:{nodes:Gt(u),edges:Gt(C),combos:Gt(lt)},remove:{nodes:Gt(v),edges:Gt(T),combos:Gt(gt)}},ve=this.transformData(ee,t);return e.clearChanges(),{dataChanges:n,drawData:ve}}transformData(t,e){const n=this.context.transform.getTransformInstance();return Object.values(n).reduce((r,o)=>o.beforeDraw(r,e),t)}createElement(t,e,n){var r,o;const u=sn(e);if(this.getElement(u))return;const S=this.getElementType(t,e),C=this.getElementComputedStyle(t,e),T=be(t,S);if(!T)return at.warn(`The element ${S} of ${t} is not registered.`);if(this.emit(new Wl(Oe.BEFORE_ELEMENT_CREATE,t,e),n),n.stage==="expand"){const gt=this.getElementZIndex(n.target);(!C.zIndex||C.zIndex<gt)&&(C.zIndex=gt+((r=C.zIndex)!==null&&r!==void 0?r:0))}const $=this.container.appendChild(new T({id:u,style:Object.assign({context:this.context},C)}));this.shapeTypeMap[u]=S,this.elementMap[u]=$;const{stage:lt="enter"}=n;(o=this.context.animation)===null||o===void 0||o.add({element:$,elementType:t,stage:lt,originalStyle:Object.assign({},$.attributes),modifiedStyle:Object.assign(Object.assign({},$.attributes),C)},{after:()=>{var gt;this.emit(new Wl(Oe.AFTER_ELEMENT_CREATE,t,e),n),(gt=$.onCreate)===null||gt===void 0||gt.call($)}})}createElements(t,e){const{nodes:n,edges:r,combos:o}=t;[["node",n],["combo",o],["edge",r]].forEach(([v,S])=>{S.forEach(C=>this.createElement(v,C,e))})}getUpdateStageStyle(t,e,n){const{stage:r="update"}=n;if(r==="translate")if(t==="node"||t==="combo"){const{style:{x:o=0,y:u=0,z:v=0}={}}=e;return{x:o,y:u,z:v}}else return{};return this.getElementComputedStyle(t,e)}updateElement(t,e,n){var r;const o=sn(e),{stage:u="update"}=n,v=this.getElement(o);if(!v)return()=>null;this.emit(new Wl(Oe.BEFORE_ELEMENT_UPDATE,t,e),n);const S=this.getElementType(t,e),C=this.getUpdateStageStyle(t,e,n);this.shapeTypeMap[o]!==S&&(v.destroy(),delete this.shapeTypeMap[o],delete this.elementMap[o],this.createElement(t,e,{animation:!1,silence:!0}));const T=u!=="visibility"?u:C.visibility==="hidden"?"hide":"show";T==="hide"&&delete C.visibility,(r=this.context.animation)===null||r===void 0||r.add({element:v,elementType:t,stage:T,originalStyle:Object.assign({},v.attributes),modifiedStyle:Object.assign(Object.assign({},v.attributes),C)},{before:()=>{const $=this.elementMap[o];u!=="collapse"&&vs($,C),u==="visibility"&&(_0($,"opacity")||k0($,"opacity"),this.visibilityCache.set($,T==="show"?"visible":"hidden"),T==="show"&&Y($,"visible"))},after:()=>{var $;const lt=this.elementMap[o];u==="collapse"&&vs(lt,C),T==="hide"&&Y(lt,this.visibilityCache.get(lt)),this.emit(new Wl(Oe.AFTER_ELEMENT_UPDATE,t,e),n),($=lt.onUpdate)===null||$===void 0||$.call(lt)}})}updateElements(t,e){const{nodes:n,edges:r,combos:o}=t;[["node",n],["combo",o],["edge",r]].forEach(([v,S])=>{S.forEach(C=>this.updateElement(v,C,e))})}markDestroyElement(t){Object.values(t.remove).forEach(e=>{e.forEach(n=>{const r=sn(n),o=this.getElement(r);o&&Mo(o)})})}destroyElement(t,e,n){var r;const{stage:o="exit"}=n,u=sn(e),v=this.elementMap[u];if(!v)return()=>null;this.emit(new Wl(Oe.BEFORE_ELEMENT_DESTROY,t,e),n),(r=this.context.animation)===null||r===void 0||r.add({element:v,elementType:t,stage:o,originalStyle:Object.assign({},v.attributes),modifiedStyle:Object.assign({},v.attributes)},{after:()=>{var S;this.clearElement(u),v.destroy(),(S=v.onDestroy)===null||S===void 0||S.call(v),this.emit(new Wl(Oe.AFTER_ELEMENT_DESTROY,t,e),n)}})}destroyElements(t,e){const{nodes:n,edges:r,combos:o}=t;[["combo",o],["edge",r],["node",n]].forEach(([v,S])=>{S.forEach(C=>this.destroyElement(v,C,e))})}clearElement(t){delete this.paletteStyle[t],delete this.defaultStyle[t],delete this.stateStyle[t],delete this.elementMap[t],delete this.shapeTypeMap[t]}collapseNode(t,e){return ku(this,void 0,void 0,function*(){var n;const{model:r,layout:o}=this.context,u=this.computeChangesAndDrawData({stage:"collapse",animation:e});if(!u)return;this.markDestroyElement(u.drawData);const v=yield o.simulate();r.updateData(v);const S=this.computeChangesAndDrawData({stage:"collapse",animation:e});if(!S)return;const{drawData:C}=S,{add:T,remove:$,update:lt}=C;this.markDestroyElement(C);const gt={animation:e,stage:"collapse",data:C};this.destroyElements($,gt),this.createElements(T,gt),this.updateElements(lt,gt),yield(n=this.context.animation.animate(e,{beforeAnimate:Gt=>this.emit(new Jo(Oe.BEFORE_ANIMATE,Ot.COLLAPSE,Gt,C),gt),afterAnimate:Gt=>this.emit(new Jo(Oe.AFTER_ANIMATE,Ot.COLLAPSE,Gt,C),gt)},{collapse:{target:t,descendants:Array.from($.nodes).map(([,Gt])=>sn(Gt)),position:er(lt.nodes.get(t))}}))===null||n===void 0?void 0:n.finished})}expandNode(t,e){return ku(this,void 0,void 0,function*(){var n;const{model:r,layout:o}=this.context;if(!r.getAncestorsData(t,ne).every(Gt=>Ca(Gt)))return;const u=er(r.getNodeData([t])[0]),v=this.computeChangesAndDrawData({stage:"expand",animation:e});if(!v)return;const{drawData:{add:S}}=v;this.createElements(S,{animation:!1,stage:"expand",target:t}),this.context.animation.clear();const C=yield o.simulate();r.updateData(C),this.computeStyle("expand");const T=this.computeChangesAndDrawData({stage:"collapse",animation:e});if(!T)return;const{drawData:$}=T,{update:lt}=$,gt={animation:e,stage:"expand",data:$};S.edges.forEach(Gt=>lt.edges.set(sn(Gt),Gt)),S.nodes.forEach(Gt=>lt.nodes.set(sn(Gt),Gt)),this.updateElements(lt,gt),yield(n=this.context.animation.animate(e,{beforeAnimate:Gt=>this.emit(new Jo(Oe.BEFORE_ANIMATE,Ot.EXPAND,Gt,$),gt),afterAnimate:Gt=>this.emit(new Jo(Oe.AFTER_ANIMATE,Ot.EXPAND,Gt,$),gt)},{expand:{target:t,descendants:Array.from(S.nodes).map(([,Gt])=>sn(Gt)),position:u}}))===null||n===void 0?void 0:n.finished})}collapseCombo(t,e){return ku(this,void 0,void 0,function*(){var n;const{model:r,element:o}=this.context;if(r.getAncestorsData(t,ne).some(ee=>Ca(ee)))return;const u=o.getElement(t),v=u.getComboPosition(Object.assign(Object.assign({},u.attributes),{collapsed:!0})),S=this.computeChangesAndDrawData({stage:"collapse",animation:e});if(!S)return;const{dataChanges:C,drawData:T}=S;this.markDestroyElement(T);const{update:$,remove:lt}=T,gt={animation:e,stage:"collapse",data:T};this.destroyElements(lt,gt),this.updateElements($,gt);const Gt=ee=>Array.from(ee).map(([,ve])=>sn(ve));yield(n=this.context.animation.animate(e,{before:()=>this.emit(new fo(Oe.BEFORE_DRAW,{dataChanges:C,animation:e}),gt),beforeAnimate:ee=>this.emit(new Jo(Oe.BEFORE_ANIMATE,Ot.COLLAPSE,ee,T),gt),afterAnimate:ee=>this.emit(new Jo(Oe.AFTER_ANIMATE,Ot.COLLAPSE,ee,T),gt),after:()=>this.emit(new fo(Oe.AFTER_DRAW,{dataChanges:C,animation:e}),gt)},{collapse:{target:t,descendants:[...Gt(lt.nodes),...Gt(lt.combos)],position:v}}))===null||n===void 0?void 0:n.finished})}expandCombo(t,e){return ku(this,void 0,void 0,function*(){var n;const{model:r}=this.context,o=er(r.getComboData([t])[0]);this.computeStyle("expand");const u=this.computeChangesAndDrawData({stage:"expand",animation:e});if(!u)return;const{dataChanges:v,drawData:S}=u,{add:C,update:T}=S,$={animation:e,stage:"expand",data:S,target:t};this.createElements(C,$),this.updateElements(T,$);const lt=gt=>Array.from(gt).map(([,Gt])=>sn(Gt));yield(n=this.context.animation.animate(e,{before:()=>this.emit(new fo(Oe.BEFORE_DRAW,{dataChanges:v,animation:e}),$),beforeAnimate:gt=>this.emit(new Jo(Oe.BEFORE_ANIMATE,Ot.EXPAND,gt,S),$),afterAnimate:gt=>this.emit(new Jo(Oe.AFTER_ANIMATE,Ot.EXPAND,gt,S),$),after:()=>this.emit(new fo(Oe.AFTER_DRAW,{dataChanges:v,animation:e}),$)},{expand:{target:t,descendants:[...lt(C.nodes),...lt(C.combos)],position:o}}))===null||n===void 0?void 0:n.finished})}getFrontZIndex(t){const{model:e}=this.context,n=e.getElementType(t),r=e.getElementDataById(t),o=e.getData();if(Object.assign(o,{[`${n}s`]:o[`${n}s`].filter(u=>sn(u)!==t)}),n==="combo"&&!Ca(r)){const u=e.getAncestorsData(t,ne).map(sn);o.nodes=o.nodes.filter(v=>!u.includes(sn(v))),o.combos=o.combos.filter(v=>!u.includes(sn(v))),o.edges=o.edges.filter(({source:v,target:S})=>u.includes(v)&&u.includes(S))}return Math.max(0,...Object.values(o).flat().map(u=>{const v=sn(u);return this.getElementZIndex(v)}))+1}destroy(){this.container.destroy(),this.elementMap={},this.shapeTypeMap={},this.defaultStyle={},this.stateStyle={},this.paletteStyle={},this.context={}}}var Zf=d(96262);class H0 extends $d.Z{constructor(t,e,n){super(),this.graph=t,this.layout=e,this.options=n,this.spawnWorker()}spawnWorker(){this.proxy=Zf.Ud(new Worker(new URL(d.p+d.u(4566),d.b),{type:void 0})),this.running&&(this.running=!1,this.execute())}execute(){var t;return(0,ui.mG)(this,void 0,void 0,function*(){if(this.running)return this;this.running=!0;const e=this.layout.options,{onTick:n}=e,r=(0,ui._T)(e,["onTick"]),o={};Object.keys(r).forEach(C=>{(0,At.Z)(r[C])||(o[C]=r[C])});const u={layout:{id:this.layout.id,options:o,iterations:(t=this.options)===null||t===void 0?void 0:t.iterations},nodes:this.graph.getAllNodes(),edges:this.graph.getAllEdges()},v=new Float32Array([0]),[S]=yield this.proxy.calculateLayout(u,[v]);return S})}stop(){return this.running=!1,this.proxy.stopLayout(),this}kill(){this.proxy[Zf.Yy]()}isRunning(){return this.running}}var bc=function(i,t,e,n){function r(o){return o instanceof e?o:new e(function(u){u(o)})}return new(e||(e=Promise))(function(o,u){function v(T){try{C(n.next(T))}catch($){u($)}}function S(T){try{C(n.throw(T))}catch($){u($)}}function C(T){T.done?o(T.value):r(T.value).then(v,S)}C((n=n.apply(i,t||[])).next())})},Y0=function(i,t){var e={};for(var n in i)Object.prototype.hasOwnProperty.call(i,n)&&t.indexOf(n)<0&&(e[n]=i[n]);if(i!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,n=Object.getOwnPropertySymbols(i);r<n.length;r++)t.indexOf(n[r])<0&&Object.prototype.propertyIsEnumerable.call(i,n[r])&&(e[n[r]]=i[n[r]]);return e};class K0{get presetOptions(){return{animation:!!Ie(this.context.options,!0)}}get options(){const{options:t}=this.context;return t.layout}constructor(t){this.instances=[],this.context=t}getLayoutInstance(){return this.instances}layout(){return bc(this,void 0,void 0,function*(){if(!this.options)return;const t=Array.isArray(this.options)?this.options:[this.options],{graph:e}=this.context;yo(e,new fo(Oe.BEFORE_LAYOUT));for(const n of t){const r=t.indexOf(n),o=this.getLayoutData(n),u=Object.assign(Object.assign({},this.presetOptions),n);yo(e,new fo(Oe.BEFORE_STAGE_LAYOUT,{options:u,index:r}));const v=yield this.stepLayout(o,u,r);yo(e,new fo(Oe.AFTER_STAGE_LAYOUT,{options:u,index:r})),n.animation||this.updateElementPosition(v,!1)}yo(e,new fo(Oe.AFTER_LAYOUT)),this.transformDataAfterLayout()})}transformDataAfterLayout(){const t=this.context.transform.getTransformInstance();Object.values(t).forEach(e=>e.afterLayout())}simulate(){return bc(this,void 0,void 0,function*(){if(!this.options)return{};const t=Array.isArray(this.options)?this.options:[this.options];let e={};for(const n of t){const r=t.indexOf(n),o=this.getLayoutData(n);e=yield this.stepLayout(o,Object.assign(Object.assign(Object.assign({},this.presetOptions),n),{animation:!1}),r)}return e})}stepLayout(t,e,n){return bc(this,void 0,void 0,function*(){return $u(e)?yield this.treeLayout(t,e,n):yield this.graphLayout(t,e,n)})}graphLayout(t,e,n){return bc(this,void 0,void 0,function*(){const{animation:r,enableWorker:o,iterations:u=300}=e,v=this.initGraphLayout(e);if(!v)return{};if(this.instances[n]=v,this.instance=v,o){const C=v;return this.supervisor=new H0(C.graphData2LayoutModel(t),C.instance,{iterations:u}),ul(yield this.supervisor.execute())}if(_l(v))return r?yield v.execute(t,{onTick:C=>{this.updateElementPosition(C,!1)}}):(v.execute(t),v.stop(),v.tick(u));const S=yield v.execute(t);if(r){const C=this.updateElementPosition(S,r);yield C==null?void 0:C.finished}return S})}treeLayout(t,e,n){return bc(this,void 0,void 0,function*(){const{type:r,animation:o}=e,u=be("layout",r);if(!u)return{};const{nodes:v=[],edges:S=[]}=t,C=new Ua.k({nodes:v.map(Gt=>({id:sn(Gt),data:Gt.data||{}})),edges:S.map(Gt=>({id:sn(Gt),source:Gt.source,target:Gt.target,data:Gt.data||{}}))});G0(C);const T={nodes:[],edges:[]},$={nodes:[],edges:[]};C.getRoots(Me).forEach(Gt=>{Xa(Gt,Ke=>{Ke.children=C.getSuccessors(Ke.id)},Ke=>C.getSuccessors(Ke.id),"TB");const ee=u(Gt,e),{x:ve,y:ke,z:ze=0}=ee;Xa(ee,Ke=>{const{id:ln,x:kn,y:Tn,z:In=0}=Ke;T.nodes.push({id:ln,style:{x:ve,y:ke,z:ze}}),$.nodes.push({id:ln,style:{x:kn,y:Tn,z:In}})},Ke=>Ke.children,"TB")});const gt=this.inferTreeLayoutOffset($);if(Ff($,gt),o){Ff(T,gt),this.updateElementPosition(T,!1);const Gt=this.updateElementPosition($,o);yield Gt==null?void 0:Gt.finished}return $})}inferTreeLayoutOffset(t){var e;let[n,r]=[1/0,-1/0],[o,u]=[1/0,-1/0];(e=t.nodes)===null||e===void 0||e.forEach(ee=>{const{x:ve=0,y:ke=0}=ee.style||{};n=Math.min(n,ve),r=Math.max(r,ve),o=Math.min(o,ke),u=Math.max(u,ke)});const{canvas:v}=this.context,S=v.getSize(),[C,T]=v.getCanvasByViewport([0,0]),[$,lt]=v.getCanvasByViewport(S);if(n>=C&&r<=$&&o>=T&&u<=lt)return[0,0];const gt=(C+$)/2,Gt=(T+lt)/2;return[gt-(n+r)/2,Gt-(o+u)/2]}stopLayout(){this.instance&&_l(this.instance)&&(this.instance.stop(),this.instance=void 0),this.supervisor&&(this.supervisor.stop(),this.supervisor=void 0),this.animationResult&&(this.animationResult.finish(),this.animationResult=void 0)}getLayoutData(t){const{nodeFilter:e=()=>!0}=t,{nodes:n,edges:r,combos:o}=this.context.model.getData(),u=T=>this.context.element.getElement(T),v=n.filter(T=>{const $=sn(T),lt=u($);return!lt||ha(lt)?!1:e(T)}),S=new Map(v.map(T=>[sn(T),T])),C=r.filter(T=>{const{source:$,target:lt}=T;return!(!S.has($)||!S.has(lt))});return{nodes:v,edges:C,combos:o}}initGraphLayout(t){var e;const{element:n,viewport:r}=this.context,{type:o,enableWorker:u,animation:v,iterations:S}=t,C=Y0(t,["type","enableWorker","animation","iterations"]),[T,$]=r.getCanvasSize(),lt=[T/2,$/2],gt=(e=t==null?void 0:t.nodeSize)!==null&&e!==void 0?e:ze=>{const Ke=n==null?void 0:n.getElement(ze.id),{size:ln}=(Ke==null?void 0:Ke.attributes)||{};return Math.max(...ai(ln))},Gt=be("layout",o);if(!Gt)return at.warn(`The layout of ${o} is not registered.`);const ee=Object.getPrototypeOf(Gt.prototype)===ll.prototype?Gt:Wu(Gt,this.context),ve=new ee(this.context),ke={nodeSize:gt,width:T,height:$,center:lt};switch(ve.id){case"d3-force":case"d3-force-3d":Object.assign(ke,{center:{x:T/2,y:$/2,z:0}});break;default:break}return(0,ct.Z)(ve.options,ke,C),ve}updateElementPosition(t,e){const{model:n,element:r}=this.context;return r?(n.updateData(t),r.draw({animation:e,silence:!0})):null}destroy(){var t;this.stopLayout(),this.context={},(t=this.supervisor)===null||t===void 0||t.kill(),this.supervisor=void 0,this.instance=void 0,this.instances=[],this.animationResult=void 0}}const Ff=(i,t)=>{var e;const[n,r]=t;(e=i.nodes)===null||e===void 0||e.forEach(o=>{if(o.style){const{x:u=0,y:v=0}=o.style;o.style.x=u+n,o.style.y=v+r}else o.style={x:n,y:r}})};class X0 extends pt{constructor(t){super(t),this.category="plugin",this.setPlugins(this.context.options.plugins||[])}setPlugins(t){this.setExtensions(t)}getPluginInstance(t){const e=this.extensionMap[t];if(e)return e;at.warn(`Cannot find the plugin ${t}, will try to find it by type.`);const n=this.extensions.find(r=>r.type===t);if(n)return this.extensionMap[n.key]}}const _u=["update-related-edges","collapse-expand-node","collapse-expand-combo","get-edge-actual-ends","arrange-draw-order"];class Q0 extends pt{constructor(t){super(t),this.category="transform",this.setTransforms(this.context.options.transforms||[])}getTransforms(){}setTransforms(t){this.setExtensions([..._u.slice(0,_u.length-1),...t,_u[_u.length-1]])}getTransformInstance(t){return t?this.extensionMap[t]:this.extensionMap}}var Ec=function(i,t,e,n){function r(o){return o instanceof e?o:new e(function(u){u(o)})}return new(e||(e=Promise))(function(o,u){function v(T){try{C(n.next(T))}catch($){u($)}}function S(T){try{C(n.throw(T))}catch($){u($)}}function C(T){T.done?o(T.value):r(T.value).then(v,S)}C((n=n.apply(i,t||[])).next())})};class J0{get padding(){return Ve(this.context.options.padding)}get paddingOffset(){const[t,e,n,r]=this.padding,[o,u,v]=[(r-e)/2,(t-n)/2,0];return[o,u,v]}constructor(t){this.landmarkCounter=0,this.context=t;const[e,n]=this.paddingOffset,{zoom:r,rotation:o,x:u=e,y:v=n}=t.options;this.transform({mode:"absolute",scale:r,translate:[u,v],rotate:o},!1)}get camera(){const{canvas:t}=this.context;return new Proxy(t.getCamera(),{get:(e,n)=>{const o=Object.entries(t.getLayers()).filter(([v])=>!["main"].includes(v)).map(([,v])=>v.getCamera()),u=e[n];if(typeof u=="function")return(...v)=>{const S=u.apply(e,v);return o.forEach(C=>{C[n].apply(C,v)}),S}}})}createLandmark(t){return this.camera.createLandmark(`landmark-${this.landmarkCounter++}`,t)}getAnimation(t){const e=Ie(this.context.options,t);return e?(0,xo.Z)(Object.assign({},e),["easing","duration"]):!1}getCanvasSize(){const{canvas:t}=this.context,{width:e=0,height:n=0}=t.getConfig();return[e,n]}getCanvasCenter(){const{canvas:t}=this.context,{width:e=0,height:n=0}=t.getConfig();return[e/2,n/2,0]}getViewportCenter(){const[t,e]=this.camera.getPosition();return[t,e,0]}getGraphCenter(){return this.context.graph.getViewportByCanvas(this.getCanvasCenter())}getZoom(){return this.camera.getZoom()}getRotation(){return this.camera.getRoll()}getTranslateOptions(t){const{camera:e}=this,{mode:n,translate:r=[]}=t,o=this.getZoom(),u=e.getPosition(),v=e.getFocalPoint(),[S,C]=this.getCanvasCenter(),[T=0,$=0,lt=0]=r,gt=ue([-T,-$,-lt],o);return n==="relative"?{position:rt(u,gt),focalPoint:rt(v,gt)}:{position:rt([S,C,u[2]],gt),focalPoint:rt([S,C,v[2]],gt)}}getRotateOptions(t){const{mode:e,rotate:n=0}=t;return{roll:e==="relative"?this.camera.getRoll()+n:n}}getZoomOptions(t){const{zoomRange:e}=this.context.options,n=this.camera.getZoom(),{mode:r,scale:o=1}=t;return(0,uo.Z)(r==="relative"?n*o:o,...e)}transform(t,e){return Ec(this,void 0,void 0,function*(){const{graph:n}=this.context,{translate:r,rotate:o,scale:u,origin:v}=t;this.cancelAnimation();const S=this.getAnimation(e);if(yo(n,new Du(Oe.BEFORE_TRANSFORM,t)),!o&&u&&!r&&v&&!S){this.camera.setZoomByViewportPoint(this.getZoomOptions(t),v),yo(n,new Du(Oe.AFTER_TRANSFORM,t));return}const C={};if(r&&Object.assign(C,this.getTranslateOptions(t)),(0,Fr.Z)(o)&&Object.assign(C,this.getRotateOptions(t)),(0,Fr.Z)(u)&&Object.assign(C,{zoom:this.getZoomOptions(t)}),S)return yo(n,new Jo(Oe.BEFORE_ANIMATE,Ot.TRANSFORM,null,t)),new Promise(T=>{this.transformResolver=T,this.camera.gotoLandmark(this.createLandmark(C),Object.assign(Object.assign({},S),{onfinish:()=>{yo(n,new Jo(Oe.AFTER_ANIMATE,Ot.TRANSFORM,null,t)),yo(n,new Du(Oe.AFTER_TRANSFORM,t)),this.transformResolver=void 0,T()}}))});this.camera.gotoLandmark(this.createLandmark(C),{duration:0}),yo(n,new Du(Oe.AFTER_TRANSFORM,t))})}fitView(t,e){return Ec(this,void 0,void 0,function*(){const[n,r,o,u]=this.padding,{when:v="always",direction:S="both"}=t||{},[C,T]=this.context.canvas.getSize(),$=C-u-r,lt=T-n-o,gt=this.context.canvas.getBounds(),Gt=this.getBBoxInViewport(gt),[ee,ve]=Cn(Gt),ke=S==="x"&&ee>=$||S==="y"&&ve>=lt||S==="both"&&ee>=$&&ve>=lt;if(v==="overflow"&&!ke)return yield this.fitCenter(e);const ze=$/ee,Ke=lt/ve,ln=S==="x"?ze:S==="y"?Ke:Math.min(ze,Ke),kn=this.getAnimation(e);yield this.transform({mode:"relative",scale:ln,translate:rt($t(this.getCanvasCenter(),this.getBBoxInViewport(gt).center),ue(this.paddingOffset,ln))},kn)})}fitCenter(t){return Ec(this,void 0,void 0,function*(){const e=this.context.canvas.getBounds();yield this.focus(e,t)})}focusElements(t,e){return Ec(this,void 0,void 0,function*(){const{element:n}=this.context;if(!n)return;const r=Bn(t.map(o=>n.getElement(o).getRenderBounds()));yield this.focus(r,e)})}focus(t,e){return Ec(this,void 0,void 0,function*(){const n=this.context.graph.getViewportByCanvas(t.center),r=this.getCanvasCenter(),o=$t(r,n);yield this.transform({mode:"relative",translate:rt(o,this.paddingOffset)},e)})}getBBoxInViewport(t){const{min:e,max:n}=t,{graph:r}=this.context,[o,u]=r.getViewportByCanvas(e),[v,S]=r.getViewportByCanvas(n),C=new nt.mN;return C.setMinMax([o,u,0],[v,S,0]),C}isInViewport(t,e=!1,n=0){const{graph:r}=this.context,o=this.getCanvasSize(),[u,v]=r.getCanvasByViewport([0,0]),[S,C]=r.getCanvasByViewport(o);let T=new nt.mN;return T.setMinMax([u,v,0],[S,C,0]),n&&(T=cr(T,n)),Ze(t)?fr(t,T):e?br(t,T):T.intersects(t)}cancelAnimation(){var t,e;!((t=this.camera.landmarks)===null||t===void 0)&&t.length&&this.camera.cancelLandmarkAnimation(),(e=this.transformResolver)===null||e===void 0||e.call(this)}}var ma=function(i,t,e,n){function r(o){return o instanceof e?o:new e(function(u){u(o)})}return new(e||(e=Promise))(function(o,u){function v(T){try{C(n.next(T))}catch($){u($)}}function S(T){try{C(n.throw(T))}catch($){u($)}}function C(T){T.done?o(T.value):r(T.value).then(v,S)}C((n=n.apply(i,t||[])).next())})};class Yd extends $d.Z{constructor(t){super(),this.destroyed=!1,this.context={model:new V0},this.isCollapsingExpanding=!1,this.onResize=(0,ws.Z)(()=>{this.resize()},300),this.options=Object.assign({},Yd.defaultOptions,t),this._setOptions(this.options,!0),this.context.graph=this,this.options.autoResize&&window.addEventListener("resize",this.onResize)}getOptions(){return this.options}setOptions(t){this._setOptions(t,!1)}_setOptions(t,e){if(this.updateCanvas(t),e){const{data:lt}=t;lt&&this.addData(lt);return}Object.assign(this.options,t);const{behaviors:n,combo:r,data:o,edge:u,layout:v,node:S,plugins:C,theme:T,transforms:$}=t;n&&this.setBehaviors(n),o&&this.setData(o),S&&this.setNode(S),u&&this.setEdge(u),r&&this.setCombo(r),v&&this.setLayout(v),T&&this.setTheme(T),C&&this.setPlugins(C),$&&this.setTransforms($)}getSize(){return this.context.canvas?this.context.canvas.getSize():[this.options.width||0,this.options.height||0]}setSize(t,e){var n;Object.assign(this.options,{width:t,height:e}),(n=this.context.canvas)===null||n===void 0||n.resize(t,e)}setZoomRange(t){this.options.zoomRange=t}getZoomRange(){return this.options.zoomRange}setNode(t){this.options.node=t,this.context.model.refreshData()}setEdge(t){this.options.edge=t,this.context.model.refreshData()}setCombo(t){this.options.combo=t,this.context.model.refreshData()}getTheme(){return this.options.theme}setTheme(t){this.options.theme=(0,At.Z)(t)?t(this.getTheme()):t}setLayout(t){this.options.layout=(0,At.Z)(t)?t(this.getLayout()):t}getLayout(){return this.options.layout}setBehaviors(t){var e;this.options.behaviors=(0,At.Z)(t)?t(this.getBehaviors()):t,(e=this.context.behavior)===null||e===void 0||e.setBehaviors(this.options.behaviors)}updateBehavior(t){this.setBehaviors(e=>e.map(n=>typeof n=="object"&&n.key===t.key?Object.assign(Object.assign({},n),t):n))}getBehaviors(){return this.options.behaviors||[]}setPlugins(t){var e;this.options.plugins=(0,At.Z)(t)?t(this.getPlugins()):t,(e=this.context.plugin)===null||e===void 0||e.setPlugins(this.options.plugins)}updatePlugin(t){this.setPlugins(e=>e.map(n=>typeof n=="object"&&n.key===t.key?Object.assign(Object.assign({},n),t):n))}getPlugins(){return this.options.plugins||[]}getPluginInstance(t){return this.context.plugin.getPluginInstance(t)}setTransforms(t){var e;this.options.transforms=(0,At.Z)(t)?t(this.getTransforms()):t,(e=this.context.transform)===null||e===void 0||e.setTransforms(this.options.transforms)}updateTransform(t){this.setTransforms(e=>e.map(n=>typeof n=="object"&&n.key===t.key?Object.assign(Object.assign({},n),t):n)),this.context.model.refreshData()}getTransforms(){return this.options.transforms||[]}getData(){return this.context.model.getData()}getElementData(t){return Array.isArray(t)?t.map(e=>this.context.model.getElementDataById(e)):this.context.model.getElementDataById(t)}getNodeData(t){var e;return t===void 0?this.context.model.getNodeData():Array.isArray(t)?this.context.model.getNodeData(t):(e=this.context.model.getNodeData([t]))===null||e===void 0?void 0:e[0]}getEdgeData(t){var e;return t===void 0?this.context.model.getEdgeData():Array.isArray(t)?this.context.model.getEdgeData(t):(e=this.context.model.getEdgeData([t]))===null||e===void 0?void 0:e[0]}getComboData(t){var e;return t===void 0?this.context.model.getComboData():Array.isArray(t)?this.context.model.getComboData(t):(e=this.context.model.getComboData([t]))===null||e===void 0?void 0:e[0]}setData(t){this.context.model.setData((0,At.Z)(t)?t(this.getData()):t)}addData(t){this.context.model.addData((0,At.Z)(t)?t(this.getData()):t)}addNodeData(t){this.context.model.addNodeData((0,At.Z)(t)?t(this.getNodeData()):t)}addEdgeData(t){this.context.model.addEdgeData((0,At.Z)(t)?t(this.getEdgeData()):t)}addComboData(t){this.context.model.addComboData((0,At.Z)(t)?t(this.getComboData()):t)}addChildrenData(t,e){this.context.model.addChildrenData(t,e)}updateData(t){this.context.model.updateData((0,At.Z)(t)?t(this.getData()):t)}updateNodeData(t){this.context.model.updateNodeData((0,At.Z)(t)?t(this.getNodeData()):t)}updateEdgeData(t){this.context.model.updateEdgeData((0,At.Z)(t)?t(this.getEdgeData()):t)}updateComboData(t){this.context.model.updateComboData((0,At.Z)(t)?t(this.getComboData()):t)}removeData(t){this.context.model.removeData((0,At.Z)(t)?t(this.getData()):t)}removeNodeData(t){this.context.model.removeNodeData((0,At.Z)(t)?t(this.getNodeData()):t)}removeEdgeData(t){this.context.model.removeEdgeData((0,At.Z)(t)?t(this.getEdgeData()):t)}removeComboData(t){this.context.model.removeComboData((0,At.Z)(t)?t(this.getComboData()):t)}getElementType(t){return this.context.model.getElementType(t)}getRelatedEdgesData(t,e="both"){return this.context.model.getRelatedEdgesData(t,e)}getNeighborNodesData(t){return this.context.model.getNeighborNodesData(t)}getAncestorsData(t,e){return this.context.model.getAncestorsData(t,e)}getParentData(t,e){return this.context.model.getParentData(t,e)}getChildrenData(t){return this.context.model.getChildrenData(t)}getDescendantsData(t){return this.context.model.getDescendantsData(t)}getElementDataByState(t,e){return this.context.model.getElementDataByState(t,e)}initCanvas(){return ma(this,void 0,void 0,function*(){var t;if(this.context.canvas)return yield this.context.canvas.ready;const{container:e="container",width:n,height:r,renderer:o,cursor:u,background:v,devicePixelRatio:S=(t=window.devicePixelRatio)!==null&&t!==void 0?t:1}=this.options;if(e instanceof Lf)this.context.canvas=e,u&&e.setCursor(u),o&&e.setRenderer(o),yield e.ready;else{const C=(0,ea.Z)(e)?document.getElementById(e):e,T=ff(C);this.emit(Oe.BEFORE_CANVAS_INIT,{container:C,width:n,height:r});const $=new Lf({container:C,width:n||T[0],height:r||T[1],background:v,renderer:o,cursor:u,devicePixelRatio:S});this.context.canvas=$,yield $.ready,this.emit(Oe.AFTER_CANVAS_INIT,{canvas:$})}})}updateCanvas(t){var e,n;const{renderer:r,cursor:o,height:u,width:v}=t,S=this.context.canvas;S&&(r&&(this.emit(Oe.BEFORE_RENDERER_CHANGE,{renderer:this.options.renderer}),S.setRenderer(r),this.emit(Oe.AFTER_RENDERER_CHANGE,{renderer:r})),o&&S.setCursor(o),((0,Fr.Z)(v)||(0,Fr.Z)(u))&&this.setSize((e=v!=null?v:this.options.width)!==null&&e!==void 0?e:0,(n=u!=null?u:this.options.height)!==null&&n!==void 0?n:0))}initRuntime(){this.context.options=this.options,this.context.batch||(this.context.batch=new F0(this.context)),this.context.plugin||(this.context.plugin=new X0(this.context)),this.context.viewport||(this.context.viewport=new J0(this.context)),this.context.transform||(this.context.transform=new Q0(this.context)),this.context.element||(this.context.element=new U0(this.context)),this.context.animation||(this.context.animation=new Z0(this.context)),this.context.layout||(this.context.layout=new K0(this.context)),this.context.behavior||(this.context.behavior=new B0(this.context))}prepare(){return ma(this,void 0,void 0,function*(){if(yield Promise.resolve(),this.destroyed)throw new Error(xt("The graph instance has been destroyed"));yield this.initCanvas(),this.initRuntime()})}render(){return ma(this,void 0,void 0,function*(){yield this.prepare(),yo(this,new fo(Oe.BEFORE_RENDER));const t=this.context.element.draw({type:"render"});yield Promise.all([t==null?void 0:t.finished,this.context.layout.layout()]),yield this.autoFit(),yo(this,new fo(Oe.AFTER_RENDER))})}draw(){return ma(this,void 0,void 0,function*(){var t;yield this.prepare(),yield(t=this.context.element.draw())===null||t===void 0?void 0:t.finished})}layout(){return ma(this,void 0,void 0,function*(){yield this.context.layout.layout()})}stopLayout(){this.context.layout.stopLayout()}clear(){return ma(this,void 0,void 0,function*(){this.context.model.setData({}),yield this.draw()})}destroy(){yo(this,new fo(Oe.BEFORE_DESTROY));const{layout:t,animation:e,element:n,model:r,canvas:o,behavior:u,plugin:v}=this.context;v==null||v.destroy(),u==null||u.destroy(),t==null||t.destroy(),e==null||e.destroy(),n==null||n.destroy(),r.destroy(),o==null||o.destroy(),this.options={},this.context={},this.off(),window.removeEventListener("resize",this.onResize),this.destroyed=!0,yo(this,new fo(Oe.AFTER_DESTROY))}getCanvas(){return this.context.canvas}resize(t,e){const n=!t||!e?ff(this.context.canvas.getContainer()):[t,e];(0,Bt.Z)(n,this.getSize())||(yo(this,new fo(Oe.BEFORE_SIZE_CHANGE,{size:n})),this.context.canvas.resize(...n),yo(this,new fo(Oe.AFTER_SIZE_CHANGE,{size:n})))}fitView(t,e){return ma(this,void 0,void 0,function*(){var n;yield(n=this.context.viewport)===null||n===void 0?void 0:n.fitView(t,e)})}fitCenter(t){return ma(this,void 0,void 0,function*(){var e;yield(e=this.context.viewport)===null||e===void 0?void 0:e.fitCenter(t)})}autoFit(){return ma(this,void 0,void 0,function*(){const{autoFit:t}=this.context.options;if(t)if((0,ea.Z)(t))t==="view"?yield this.fitView():t==="center"&&(yield this.fitCenter());else{const{type:e,animation:n}=t;e==="view"?yield this.fitView(t.options,n):e==="center"&&(yield this.fitCenter(n))}})}focusElement(t,e){return ma(this,void 0,void 0,function*(){var n;yield(n=this.context.viewport)===null||n===void 0?void 0:n.focusElements(Array.isArray(t)?t:[t],e)})}zoomBy(t,e,n){return ma(this,void 0,void 0,function*(){yield this.context.viewport.transform({mode:"relative",scale:t,origin:n},e)})}zoomTo(t,e,n){return ma(this,void 0,void 0,function*(){this.context.viewport.transform({mode:"absolute",scale:t,origin:n},e)})}getZoom(){return this.context.viewport.getZoom()}rotateBy(t,e,n){return ma(this,void 0,void 0,function*(){yield this.context.viewport.transform({mode:"relative",rotate:t,origin:n},e)})}rotateTo(t,e,n){return ma(this,void 0,void 0,function*(){yield this.context.viewport.transform({mode:"absolute",rotate:t,origin:n},e)})}getRotation(){return this.context.viewport.getRotation()}translateBy(t,e){return ma(this,void 0,void 0,function*(){yield this.context.viewport.transform({mode:"relative",translate:t},e)})}translateTo(t,e){return ma(this,void 0,void 0,function*(){yield this.context.viewport.transform({mode:"absolute",translate:t},e)})}getPosition(){return $t([0,0],this.getCanvasByViewport([0,0]))}translateElementBy(t,e){return ma(this,arguments,void 0,function*(n,r,o=!0){var u,v;const[S,C]=(0,Xt.Z)(n)?[n,(u=r)!==null&&u!==void 0?u:!0]:[{[n]:r},o];Object.entries(S).forEach(([T,$])=>this.context.model.translateNodeLikeBy(T,$)),yield(v=this.context.element.draw({animation:C,stage:"translate"}))===null||v===void 0?void 0:v.finished})}translateElementTo(t,e){return ma(this,arguments,void 0,function*(n,r,o=!0){var u,v;const[S,C]=(0,Xt.Z)(n)?[n,(u=r)!==null&&u!==void 0?u:!0]:[{[n]:r},o];Object.entries(S).forEach(([T,$])=>this.context.model.translateNodeLikeTo(T,$)),yield(v=this.context.element.draw({animation:C,stage:"translate"}))===null||v===void 0?void 0:v.finished})}getElementPosition(t){return this.context.model.getElementPosition(t)}getElementRenderStyle(t){return(0,df.Z)(this.context.element.getElement(t).attributes,["context"])}setElementVisibility(t,e){return ma(this,arguments,void 0,function*(n,r,o=!0){var u,v;const[S,C]=(0,Xt.Z)(n)?[n,(u=r)!==null&&u!==void 0?u:!0]:[{[n]:r},o],T={nodes:[],edges:[],combos:[]};Object.entries(S).forEach(([gt,Gt])=>{const ee=this.getElementType(gt);T[`${ee}s`].push({id:gt,style:{visibility:Gt}})});const{model:$,element:lt}=this.context;$.preventUpdateNodeLikeHierarchy(()=>{$.updateData(T)}),yield(v=lt.draw({animation:C,stage:"visibility"}))===null||v===void 0?void 0:v.finished})}showElement(t,e){return ma(this,void 0,void 0,function*(){const n=Array.isArray(t)?t:[t];yield this.setElementVisibility(Object.fromEntries(n.map(r=>[r,"visible"])),e)})}hideElement(t,e){return ma(this,void 0,void 0,function*(){const n=Array.isArray(t)?t:[t];yield this.setElementVisibility(Object.fromEntries(n.map(r=>[r,"hidden"])),e)})}getElementVisibility(t){var e,n;const r=this.context.element.getElement(t);return(n=(e=r==null?void 0:r.style)===null||e===void 0?void 0:e.visibility)!==null&&n!==void 0?n:"visible"}setElementZIndex(t,e){return ma(this,void 0,void 0,function*(){var n;const r={nodes:[],edges:[],combos:[]},o=(0,Xt.Z)(t)?t:{[t]:e};Object.entries(o).forEach(([S,C])=>{const T=this.getElementType(S);r[`${T}s`].push({id:S,style:{zIndex:C}})});const{model:u,element:v}=this.context;u.preventUpdateNodeLikeHierarchy(()=>u.updateData(r)),yield(n=v.draw({animation:!1,stage:"zIndex"}))===null||n===void 0?void 0:n.finished})}frontElement(t){return ma(this,void 0,void 0,function*(){const e=Array.isArray(t)?t:[t],{model:n,element:r}=this.context,o={};e.map(u=>{const v=r.getFrontZIndex(u);if(n.getElementType(u)==="combo"){const C=n.getAncestorsData(u,ne).at(-1)||this.getComboData(u),T=[C,...n.getDescendantsData(sn(C))],$=v-r.getElementZIndex(u);T.forEach(gt=>{o[sn(gt)]=this.getElementZIndex(sn(gt))+$});const{internal:lt}=Et(T.map(sn),gt=>n.getRelatedEdgesData(gt));lt.forEach(gt=>{const Gt=sn(gt);o[Gt]=this.getElementZIndex(Gt)+$})}else o[u]=v}),yield this.setElementZIndex(o)})}getElementZIndex(t){var e,n,r;const{model:o,element:u}=this.context;return(r=(n=(e=o.getElementDataById(t))===null||e===void 0?void 0:e.style)===null||n===void 0?void 0:n.zIndex)!==null&&r!==void 0?r:u.getElementZIndex(t)}setElementState(t,e){return ma(this,arguments,void 0,function*(n,r,o=!0){var u,v;const[S,C]=(0,Xt.Z)(n)?[n,(u=r)!==null&&u!==void 0?u:!0]:[{[n]:r},o],T=lt=>lt?Array.isArray(lt)?lt:[lt]:[],$={nodes:[],edges:[],combos:[]};Object.entries(S).forEach(([lt,gt])=>{const Gt=this.getElementType(lt);$[`${Gt}s`].push({id:lt,states:T(gt)})}),this.updateData($),yield(v=this.context.element.draw({animation:C}))===null||v===void 0?void 0:v.finished})}getElementState(t){return this.context.model.getElementState(t)}getElementRenderBounds(t){return this.context.element.getElement(t).getRenderBounds()}collapseElement(t){return ma(this,arguments,void 0,function*(e,n=!0){const{model:r,element:o}=this.context;if(Ca(r.getNodeLikeData([e])[0])||this.isCollapsingExpanding)return;const u=r.getElementType(e);yield this.frontElement(e),this.isCollapsingExpanding=!0,this.setElementCollapsibility(e,!0),u==="node"?yield o.collapseNode(e,n):u==="combo"&&(yield o.collapseCombo(e,n)),this.isCollapsingExpanding=!1})}expandElement(t){return ma(this,arguments,void 0,function*(e,n=!0){const{model:r,element:o}=this.context;if(!Ca(r.getNodeLikeData([e])[0])||this.isCollapsingExpanding)return;const u=r.getElementType(e);this.isCollapsingExpanding=!0,this.setElementCollapsibility(e,!1),u==="node"?yield o.expandNode(e,n):u==="combo"&&(yield o.expandCombo(e,n)),this.isCollapsingExpanding=!1})}setElementCollapsibility(t,e){const n=this.getElementType(t);n==="node"?this.updateNodeData([{id:t,style:{collapsed:e}}]):n==="combo"&&this.updateComboData([{id:t,style:{collapsed:e}}])}toDataURL(){return ma(this,arguments,void 0,function*(t={}){return this.context.canvas.toDataURL(t)})}getCanvasByViewport(t){return this.context.canvas.getCanvasByViewport(t)}getViewportByCanvas(t){return this.context.canvas.getViewportByCanvas(t)}getClientByCanvas(t){return this.context.canvas.getClientByCanvas(t)}getCanvasByClient(t){return this.context.canvas.getCanvasByClient(t)}getViewportCenter(){return this.context.viewport.getViewportCenter()}getCanvasCenter(){return this.context.viewport.getCanvasCenter()}on(t,e,n){return super.on(t,e,n)}once(t,e){return super.once(t,e)}off(t,e){return super.off(t,e)}}Yd.defaultOptions={autoResize:!1,theme:"light",rotation:0,zoom:1,zoomRange:[.01,10]};var q0=function(i,t){var e={};for(var n in i)Object.prototype.hasOwnProperty.call(i,n)&&t.indexOf(n)<0&&(e[n]=i[n]);if(i!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,n=Object.getOwnPropertySymbols(i);r<n.length;r++)t.indexOf(n[r])<0&&Object.prototype.propertyIsEnumerable.call(i,n[r])&&(e[n[r]]=i[n[r]]);return e};function tv(i,t){const{getNodeData:e=(v,S)=>{if(v.depth=S,!v.children)return v;const{children:C}=v,T=q0(v,["children"]);return Object.assign(Object.assign({},T),{children:C.map($=>$.id)})},getEdgeData:n=(v,S)=>({source:v.id,target:S.id}),getChildren:r=v=>v.children||[]}=t||{},o=[],u=[];return Xa(i,(v,S)=>{o.push(e(v,S));const C=r(v);for(const T of C)u.push(n(v,T))},v=>r(v),"TB"),{nodes:o,edges:u}}class ev extends Fs{beforeDraw(t){const{add:e,update:n}=t,{model:r}=this.context;return[...e.edges.entries(),...n.edges.entries()].forEach(([,o])=>{Bf(r,o)}),t}}const Bf=(i,t)=>{const{source:e,target:n}=t,r=i.getElementDataById(e),o=i.getElementDataById(n),u=Zt(r,$=>i.getParentData($,ne)),v=Zt(o,$=>i.getParentData($,ne)),S=sn(u),C=sn(v),T={sourceNode:S,targetNode:C};return t.style?Object.assign(t.style,T):t.style=T,t},nv=(i,t,e)=>{const[n,r]=t,[o,u]=e;if(r===n)return o;const v=(i-n)/(r-n);return o+v*(u-o)},rv=(i,t,e)=>{const[n,r]=t,[o,u]=e,v=Math.log(i-n+1)/Math.log(r-n+1);return o+v*(u-o)},iv=(i,t,e,n=2)=>{const[r,o]=t,[u,v]=e,S=Math.pow((i-r)/(o-r),n);return u+S*(v-u)},av=(i,t,e)=>{const[n,r]=t,[o,u]=e,v=Math.sqrt((i-n)/(r-n));return o+v*(u-o)};class Zu extends Fs{constructor(t,e){super(t,(0,ct.Z)({},Zu.defaultOptions,e)),this.assignSizeByCentrality=(n,r,o,u,v,S)=>{const C=[r,o],T=[u[0],v[0]],$=[u[1],v[1]],lt=[u[2],v[2]],gt=(Gt,ee)=>{if(typeof S=="function")return S(Gt,C,ee);switch(S){case"linear":return nv(Gt,C,ee);case"log":return rv(Gt,C,ee);case"pow":return iv(Gt,C,ee,2);case"sqrt":return av(Gt,C,ee);default:return ee[0]}};return[gt(n,T),gt(n,$),gt(n,lt)]}}beforeDraw(t){const{model:e}=this.context,n=e.getNodeData(),r=ai(this.options.maxSize),o=ai(this.options.minSize),u=this.getCentralities(this.options.centrality),v=u.size>0?Math.max(...u.values()):0,S=u.size>0?Math.min(...u.values()):0;return n.forEach(C=>{var T;const $=this.assignSizeByCentrality(u.get(sn(C))||0,S,v,o,r,this.options.scale),lt=(T=this.context.element)===null||T===void 0?void 0:T.getElement(sn(C)),gt={size:$};this.assignLabelStyle(gt,$,C,lt),(!lt||!Ru(gt,lt.attributes))&&Vo(t,lt?"update":"add","node",(0,ct.Z)(C,{style:gt}),!0)}),t}assignLabelStyle(t,e,n,r){var o;const u=r?r.config.style:(o=this.context.element)===null||o===void 0?void 0:o.getElementComputedStyle("node",n);if(Object.assign(t,(0,xo.Z)(u,["labelFontSize","labelLineHeight"])),this.options.mapLabelSize){const v=this.getLabelSizeByNodeSize(e,1/0,Number(t.labelFontSize));Object.assign(t,{labelFontSize:v,labelLineHeight:v+rn(t.labelPadding)})}return t}getLabelSizeByNodeSize(t,e,n){const r=Math.min(...t)/2,[o,u]=Array.isArray(this.options.mapLabelSize)?this.options.mapLabelSize:[n,e];return Math.min(u,Math.max(r,o))}getCentralities(t){const{model:e}=this.context,n=e.getData();if(typeof t=="function")return t(n);const r=e.getRelatedEdgesData.bind(e);return E(n,r,t)}}Zu.defaultOptions={centrality:{type:"degree"},maxSize:80,minSize:20,scale:"linear",mapLabelSize:!1};class Fu extends Fs{constructor(t,e){super(t,Object.assign({},Fu.defaultOptions,e))}get ref(){return this.context.model.getRootsData()[0]}afterLayout(){var t;const e=er(this.ref),{graph:n,model:r}=this.context;(t=r.getData().nodes)===null||t===void 0||t.forEach(u=>{if(sn(u)===sn(this.ref))return;const v=Xn($t(er(u),e)),S=Math.abs(v)>Math.PI/2,C=u.transformd||!u.children||u.children.length===0,T=ai(n.getElementRenderStyle(sn(u)).size)[0]/2,$=(C?1:-1)*(T+this.options.offset),lt=[["translate",$*Math.cos(v),$*Math.sin(v)],["rotate",S?(0,nt.BV)(v)+180:(0,nt.BV)(v)]];r.updateNodeData([{id:sn(u),style:{labelTextAlign:S===C?"right":"left",labelTextBaseline:"middle",labelTransform:lt}}])}),n.draw()}}Fu.defaultOptions={offset:5};var zf=d(50264);const ov="quadratic",jf=["top","top-right","right","right-bottom","bottom","bottom-left","left","left-top"];class Bu extends Fs{constructor(t,e){super(t,Object.assign({},Bu.defaultOptions,e)),this.cacheMergeStyle=new Map,this.getAffectedParallelEdges=n=>{const{add:{edges:r},update:{nodes:o,edges:u,combos:v},remove:{edges:S}}=n,{model:C}=this.context,T=new Map,$=(Gt,ee)=>{C.getRelatedEdgesData(ee).forEach(ke=>!T.has(sn(ke))&&T.set(sn(ke),ke))};o.forEach($),v.forEach($);const lt=Gt=>{const ee=C.getEdgeData().map(ke=>Bf(C,ke));sv(Gt,ee,!0).forEach(ke=>!T.has(sn(ke))&&T.set(sn(ke),ke))};if(S.size&&S.forEach(lt),r.size&&r.forEach(lt),u.size){const Gt=bf(Wd(C.getChanges())).update.edges;u.forEach(ee=>{var ve;lt(ee);const ke=(ve=Gt.find(ze=>sn(ze.value)===sn(ee)))===null||ve===void 0?void 0:ve.original;ke&&!Kd(ee,ke)&<(ke)})}(0,Ao.Z)(this.options.edges)||T.forEach((Gt,ee)=>!this.options.edges.includes(ee)&&T.delete(ee));const gt=C.getEdgeData().map(sn);return new Map([...T].sort((Gt,ee)=>gt.indexOf(Gt[0])-gt.indexOf(ee[0])))},this.applyBundlingStyle=(n,r,o)=>{const{edgeMap:u,reverses:v}=$f(r);u.forEach(S=>{S.forEach((C,T,$)=>{var lt;const gt=$.length,Gt=C.style||{};if(C.source===C.target){const ke=jf.length;Gt.loopPlacement=jf[T%ke],Gt.loopDist=Math.floor(T/ke)*o+50}else if(gt===1)Gt.curveOffset=0;else{const ke=(T%2===0?1:-1)*(v[`${C.source}|${C.target}|${T}`]?-1:1);Gt.curveOffset=gt%2===1?ke*Math.ceil(T/2)*o*2:ke*(Math.floor(T/2)*o*2+o)}const ee=Object.assign(C,{type:ov,style:Gt}),ve=(lt=this.context.element)===null||lt===void 0?void 0:lt.getElement(sn(C));(!ve||!Ru(ee.style,ve.attributes))&&Vo(n,ve?"update":"add","edge",ee,!0)})})},this.resetEdgeStyle=n=>{const r=n.style||{},o=this.cacheMergeStyle.get(sn(n))||{};return Object.keys(o).forEach(u=>{(0,Bt.Z)(r[u],o[u])&&(n[u]?r[u]=n[u]:delete r[u])}),Object.assign(n,{style:r})},this.applyMergingStyle=(n,r)=>{const{edgeMap:o,reverses:u}=$f(r);o.forEach(v=>{var S;if(v.length===1){const T=v[0],$=(S=this.context.element)===null||S===void 0?void 0:S.getElement(sn(T)),lt=this.resetEdgeStyle(T);(!$||!Ru(lt,$.attributes))&&Vo(n,$?"update":"add","edge",lt);return}const C=v.map(({source:T,target:$,style:lt={}},gt)=>{const{startArrow:Gt,endArrow:ee}=lt,ve={},[ke,ze]=u[`${T}|${$}|${gt}`]?["endArrow","startArrow"]:["startArrow","endArrow"];return(0,zf.Z)(Gt)&&(ve[ke]=Gt),(0,zf.Z)(ee)&&(ve[ze]=ee),ve}).reduce((T,$)=>Object.assign(Object.assign({},T),$),{});v.forEach((T,$,lt)=>{var gt;if($!==0){Vo(n,"remove","edge",T);return}const Gt=Object.assign({},(0,At.Z)(this.options.style)?this.options.style(lt):this.options.style,{childrenData:lt});this.cacheMergeStyle.set(sn(T),Gt);const ee=Object.assign(Object.assign({},T),{type:"line",style:Object.assign(Object.assign(Object.assign({},T.style),C),Gt)}),ve=(gt=this.context.element)===null||gt===void 0?void 0:gt.getElement(sn(T));(!ve||!Ru(ee.style,ve.attributes))&&Vo(n,ve?"update":"add","edge",ee,!0)})})}}beforeDraw(t){const e=this.getAffectedParallelEdges(t);return e.size===0||(this.options.mode==="bundle"?this.applyBundlingStyle(t,e,this.options.distance):this.applyMergingStyle(t,e)),t}}Bu.defaultOptions={mode:"bundle",distance:15};const $f=i=>{const t=new Map,e=new Set,n={};for(const[r,o]of i){if(e.has(r))continue;const{source:u,target:v}=o,S=`${u}-${v}`;t.has(S)||t.set(S,[]),t.get(S).push(o),e.add(r);for(const[C,T]of i)e.has(C)||Kd(o,T)&&(t.get(S).push(T),e.add(C),u===T.target&&v===T.source&&(n[`${T.source}|${T.target}|${t.get(S).length-1}`]=!0))}return{edgeMap:t,reverses:n}},sv=(i,t,e)=>t.filter(n=>(e||sn(n)!==sn(i))&&Kd(n,i)),Kd=(i,t)=>{const{sourceNode:e,targetNode:n}=i.style||{},{sourceNode:r,targetNode:o}=t.style||{};return e===r&&n===o||e===o&&n===r};class lv extends Fs{beforeDraw(t,e){const{stage:n}=e;if(n==="visibility")return t;const{model:r}=this.context,{update:{nodes:o,edges:u,combos:v}}=t,S=(C,T)=>{r.getRelatedEdgesData(T).forEach(lt=>!u.has(sn(lt))&&u.set(sn(lt),lt))};return o.forEach(S),v.forEach(S),t}}const cv={animation:{"combo-collapse":mt,"combo-expand":X,"node-collapse":Ut,"node-expand":we,"path-in":Ce,"path-out":_e,fade:Q,translate:te},behavior:{"brush-select":da,"click-select":vo,"collapse-expand":Co,"create-edge":ps,"drag-canvas":sl,"drag-element-force":Vu,"drag-element":Gs,"fix-element-size":Vs,"focus-element":dl,"hover-activate":Us,"lasso-select":Ql,"auto-adapt-label":Qt,"optimize-viewport-transform":Hs,"scroll-canvas":fl,"zoom-canvas":vl},combo:{circle:de,rect:ye},edge:{cubic:On,line:xr,polyline:Qi,quadratic:Ni,"cubic-horizontal":Yn,"cubic-radial":nr,"cubic-vertical":sr},layout:{"antv-dagre":Rn,"combo-combined":Zl,"compact-box":gl.compactBox,"force-atlas2":ah,circular:Pr,concentric:oi,"d3-force":eh,dagre:uu,dendrogram:gl.dendrogram,force:Nl,fruchterman:lh,grid:uh,indented:gl.indented,mds:gc,mindmap:gl.mindmap,radial:bh,random:Oh},node:{circle:Da,diamond:zs,ellipse:Yo,hexagon:Eo,html:_o,image:Ko,rect:rl,star:jt,donut:as,triangle:it},palette:{spectral:Th,tableau:Ph,oranges:Ah,greens:Nh,blues:Rh},theme:{dark:P0,light:A0},plugin:{"bubble-sets":vu,"edge-bundling":pu,"edge-filter-lens":mu,"grid-line":Eu,background:hu,contextmenu:gu,fisheye:yu,fullscreen:bu,history:xu,hull:wu,legend:Mu,minimap:Cu,snapline:Ou,timebar:Tu,toolbar:Pu,tooltip:Au,watermark:Nu},transform:{"arrange-draw-order":N0,"collapse-expand-combo":R0,"collapse-expand-node":I0,"get-edge-actual-ends":ev,"map-node-size":Zu,"place-radial-labels":Fu,"process-parallel-edges":Bu,"update-related-edges":lv},shape:{circle:nt.Cd,ellipse:nt.Pj,group:nt.ZA,html:nt.k9,image:Ci,line:nt.x1,path:nt.y$,polygon:nt.mg,polyline:nt.aH,rect:nt.UL,text:nt.xv,label:Ba,badge:no}};function uv(){Object.entries(cv).forEach(([i,t])=>{Object.entries(t).forEach(([e,n])=>{D0(i,e,n)})})}uv();const Bv={css:"//at.alicdn.com/t/a/font_470089_8hnbbf8n4u8.css",js:"//at.alicdn.com/t/a/font_470089_8hnbbf8n4u8.js"};var dv=Object.defineProperty,Wf=Object.getOwnPropertySymbols,fv=Object.prototype.hasOwnProperty,hv=Object.prototype.propertyIsEnumerable,Gf=(i,t,e)=>t in i?dv(i,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):i[t]=e,vv=(i,t)=>{for(var e in t||(t={}))fv.call(t,e)&&Gf(i,e,t[e]);if(Wf)for(var e of Wf(t))hv.call(t,e)&&Gf(i,e,t[e]);return i};const zv=i=>React.createElement("svg",vv({width:12,height:8,xmlns:"http://www.w3.org/2000/svg"},i),React.createElement("title",null,"\u7F16\u7EC4 10"),React.createElement("g",{fillRule:"nonzero",fill:"none"},React.createElement("path",{d:"m.565 4.503 3.488 3.284c.217.204.533.26.814.154a.708.708 0 0 0 .463-.652V.72a.708.708 0 0 0-.463-.652.807.807 0 0 0-.288-.056.737.737 0 0 0-.526.21L.565 3.506a.692.692 0 0 0-.217.499.655.655 0 0 0 .217.498Z",fill:"#462BB1"}),React.createElement("path",{d:"m7.232 4.503 3.488 3.284c.217.204.533.26.814.154a.708.708 0 0 0 .463-.652V.72a.708.708 0 0 0-.463-.652.807.807 0 0 0-.288-.056.737.737 0 0 0-.526.21L7.232 3.506a.692.692 0 0 0-.218.499.655.655 0 0 0 .218.498Z",fill:"#A395D9"})));var gv="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTIiIGhlaWdodD0iOCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48ZyBmaWxsLXJ1bGU9Im5vbnplcm8iIGZpbGw9Im5vbmUiPjxwYXRoIGQ9Im0uNTY1IDQuNTAzIDMuNDg4IDMuMjg0Yy4yMTcuMjA0LjUzMy4yNi44MTQuMTU0YS43MDguNzA4IDAgMCAwIC40NjMtLjY1MlYuNzJhLjcwOC43MDggMCAwIDAtLjQ2My0uNjUyLjgwNy44MDcgMCAwIDAtLjI4OC0uMDU2LjczNy43MzcgMCAwIDAtLjUyNi4yMUwuNTY1IDMuNTA2YS42OTIuNjkyIDAgMCAwLS4yMTcuNDk5LjY1NS42NTUgMCAwIDAgLjIxNy40OThaIiBmaWxsPSIjNDYyQkIxIi8+PHBhdGggZD0ibTcuMjMyIDQuNTAzIDMuNDg4IDMuMjg0Yy4yMTcuMjA0LjUzMy4yNi44MTQuMTU0YS43MDguNzA4IDAgMCAwIC40NjMtLjY1MlYuNzJhLjcwOC43MDggMCAwIDAtLjQ2My0uNjUyLjgwNy44MDcgMCAwIDAtLjI4OC0uMDU2LjczNy43MzcgMCAwIDAtLjUyNi4yMUw3LjIzMiAzLjUwNmEuNjkyLjY5MiAwIDAgMC0uMjE4LjQ5OS42NTUuNjU1IDAgMCAwIC4yMTguNDk4WiIgZmlsbD0iI0EzOTVEOSIvPjwvZz48L3N2Zz4=",pv=Object.defineProperty,Vf=Object.getOwnPropertySymbols,mv=Object.prototype.hasOwnProperty,yv=Object.prototype.propertyIsEnumerable,Uf=(i,t,e)=>t in i?pv(i,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):i[t]=e,bv=(i,t)=>{for(var e in t||(t={}))mv.call(t,e)&&Uf(i,e,t[e]);if(Vf)for(var e of Vf(t))yv.call(t,e)&&Uf(i,e,t[e]);return i};const jv=i=>React.createElement("svg",bv({width:12,height:8,xmlns:"http://www.w3.org/2000/svg"},i),React.createElement("title",null,"\u7F16\u7EC4 10"),React.createElement("g",{fillRule:"nonzero",fill:"none"},React.createElement("path",{d:"M11.435 4.503 7.947 7.787a.785.785 0 0 1-.814.154.708.708 0 0 1-.463-.652V.72c0-.287.182-.54.463-.652a.807.807 0 0 1 .288-.056c.196 0 .386.07.526.21l3.488 3.284c.14.134.217.316.217.499a.655.655 0 0 1-.217.498Z",fill:"#462BB1"}),React.createElement("path",{d:"M4.768 4.503 1.28 7.787a.785.785 0 0 1-.814.154.708.708 0 0 1-.463-.652V.72c0-.287.183-.54.463-.652A.807.807 0 0 1 .754.012c.197 0 .386.07.526.21l3.488 3.284c.14.134.218.316.218.499a.655.655 0 0 1-.218.498Z",fill:"#A395D9"})));var Ev="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTIiIGhlaWdodD0iOCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48ZyBmaWxsLXJ1bGU9Im5vbnplcm8iIGZpbGw9Im5vbmUiPjxwYXRoIGQ9Ik0xMS40MzUgNC41MDMgNy45NDcgNy43ODdhLjc4NS43ODUgMCAwIDEtLjgxNC4xNTQuNzA4LjcwOCAwIDAgMS0uNDYzLS42NTJWLjcyYzAtLjI4Ny4xODItLjU0LjQ2My0uNjUyYS44MDcuODA3IDAgMCAxIC4yODgtLjA1NmMuMTk2IDAgLjM4Ni4wNy41MjYuMjFsMy40ODggMy4yODRjLjE0LjEzNC4yMTcuMzE2LjIxNy40OTlhLjY1NS42NTUgMCAwIDEtLjIxNy40OThaIiBmaWxsPSIjNDYyQkIxIi8+PHBhdGggZD0iTTQuNzY4IDQuNTAzIDEuMjggNy43ODdhLjc4NS43ODUgMCAwIDEtLjgxNC4xNTQuNzA4LjcwOCAwIDAgMS0uNDYzLS42NTJWLjcyYzAtLjI4Ny4xODMtLjU0LjQ2My0uNjUyQS44MDcuODA3IDAgMCAxIC43NTQuMDEyYy4xOTcgMCAuMzg2LjA3LjUyNi4yMWwzLjQ4OCAzLjI4NGMuMTQuMTM0LjIxOC4zMTYuMjE4LjQ5OWEuNjU1LjY1NSAwIDAgMS0uMjE4LjQ5OFoiIGZpbGw9IiNBMzk1RDkiLz48L2c+PC9zdmc+",xv=Object.defineProperty,wv=Object.defineProperties,Sv=Object.getOwnPropertyDescriptors,Hf=Object.getOwnPropertySymbols,Mv=Object.prototype.hasOwnProperty,Cv=Object.prototype.propertyIsEnumerable,Yf=(i,t,e)=>t in i?xv(i,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):i[t]=e,zu=(i,t)=>{for(var e in t||(t={}))Mv.call(t,e)&&Yf(i,e,t[e]);if(Hf)for(var e of Hf(t))Cv.call(t,e)&&Yf(i,e,t[e]);return i},Ov=(i,t)=>wv(i,Sv(t)),xc=(i,t,e)=>new Promise((n,r)=>{var o=S=>{try{v(e.next(S))}catch(C){r(C)}},u=S=>{try{v(e.throw(S))}catch(C){r(C)}},v=S=>S.done?n(S.value):Promise.resolve(S.value).then(o,u);v((e=e.apply(i,t)).next())}),Tv=()=>{const i=(0,R.useRef)(null),t=(0,R.useRef)(null),{pathId:e}=(0,et.useParams)(),[n,r]=(0,R.useState)([]),[o,u]=(0,R.useState)(!1),[v,S]=(0,R.useState)([]),[C,T]=(0,R.useState)(1),[$,lt]=(0,R.useState)(!1),[gt]=P.default.useForm(),[Gt,ee]=(0,R.useState)([]),[ve,ke]=(0,R.useState)({knowledge_type:1}),[ze,Ke]=(0,R.useState)([]),[ln,kn]=(0,R.useState)({}),[Tn,In]=(0,R.useState)({nodes:[],links:[]});(0,R.useEffect)(()=>{hn()},[]);function hn(){return xc(this,null,function*(){var Vn,Dr,pr,Sr,dr,Ir,Yi,ir;if(!i.current)return;let Hr=yield(0,tt.ZP)(`/api/knowledge_maps/${e}.json`,{method:"get"});if((Hr==null?void 0:Hr.status)===0){S(Hr==null?void 0:Hr.data);let Li=[];(Dr=(Vn=Hr==null?void 0:Hr.data)==null?void 0:Vn.node_data)==null||Dr.map(ki=>{var us;return(us=ki==null?void 0:ki.nodes)==null?void 0:us.map((ds,qo)=>{qo==0&&Li.push(ds)})});let ua=(pr=Li==null?void 0:Li.splice(1))==null?void 0:pr.map((ki,us)=>{var ds,qo,wc;return{startNodeUuid:(qo=(ds=Li==null?void 0:Li[0])==null?void 0:ds.properties)==null?void 0:qo.uuid,type:"\u5305\u542B",endNodeUuid:(wc=ki==null?void 0:ki.properties)==null?void 0:wc.uuid}});const{nodes:_a,links:Fi}=(dr=(Sr=Hr==null?void 0:Hr.data)==null?void 0:Sr.node_data)==null?void 0:dr.reduce((ki,us)=>(ki.nodes.push(...us.nodes),ki.links.push(...us.relationships),ki),{nodes:[],links:[]});let Sa=(0,Ct.fX)(_a==null?void 0:_a.map((ki,us)=>{var ds,qo,wc,Kf,Xf,Qf;return Ov(zu(zu({},ki),ki==null?void 0:ki.properties),{rootNodeUuid:(ds=ki==null?void 0:ki.properties)==null?void 0:ds.rootNodeUuid,id:(qo=ki==null?void 0:ki.properties)==null?void 0:qo.name,name:(wc=ki==null?void 0:ki.properties)==null?void 0:wc.name,labelstype:(Kf=ki==null?void 0:ki.labels)==null?void 0:Kf[1],description:(Xf=ki==null?void 0:ki.properties)==null?void 0:Xf.description,nodeType:(Qf=ki==null?void 0:ki.properties)==null?void 0:Qf.nodeType,level:0})}),[...Fi==null?void 0:Fi.filter(ki=>ki.type==="\u5305\u542B"),...ua]),Za=tv(Sa),Ma=(Ir=Za.nodes)==null?void 0:Ir.filter((ki,us,ds)=>us===ds.findIndex(qo=>qo.id===ki.id)),zo=(Yi=Za.edges)==null?void 0:Yi.filter((ki,us,ds)=>us===ds.findIndex(qo=>qo.source===ki.source&&qo.target===ki.target));console.log("----",Sa),In({nodes:Ma,links:zo})}let Oi=yield(0,tt.ZP)(`/api/knowledge_maps/${e}/knowledge_list.json`,{method:"get"});(Oi==null?void 0:Oi.status)===0&&(r((ir=Oi==null?void 0:Oi.data)==null?void 0:ir.list),kn(Oi==null?void 0:Oi.data))})}(0,R.useEffect)(()=>{if(!i.current||Tn.nodes.length===0)return;const Vn=(0,O.Z)()(i.current).graphData(Tn).nodeAutoColorBy("group").nodeThreeObject(Dr=>{const pr=Math.max(10*Math.pow(.7,Dr.level),2),Sr=new g.Kj0(new g.xo$(pr,16,16),new g.vBJ({color:Dr.color||16777215})),dr=new _.Z(Dr.id);dr.color="#fff",dr.textHeight=pr*.9,dr.position.set(0,pr+2,0);const Ir=new g.ZAu;return Ir.add(Sr),Ir.add(dr),Ir}).linkOpacity(.3).linkWidth(.5).linkDirectionalParticles(0).linkDirectionalParticleWidth(0).onNodeClick(Dr=>{const Sr=1+80/Math.hypot(Dr.x,Dr.y,Dr.z);Vn.cameraPosition({x:Dr.x*Sr,y:Dr.y*Sr,z:Dr.z*Sr},Dr,3e3)});return t.current=Vn,()=>{Vn._destructor()}},[Tn]);function or(){return xc(this,null,function*(){let Vn=yield(0,tt.ZP)("/api/paths.json",{method:"get",params:{page:1,limit:800}});Vn&&ee(Vn==null?void 0:Vn.subjects)})}function yr(Vn){return xc(this,null,function*(){var Dr;let pr=yield(0,tt.ZP)("/api/knowledge_maps.json",{method:"get",params:{page:1,limit:800,knowledge_type:Vn}});pr&&Ke(((Dr=pr==null?void 0:pr.data)==null?void 0:Dr.list)||[])})}return R.createElement("div",{style:{position:"relative"}},R.createElement(b.ZP,{type:"primary",ghost:!0,style:{position:"absolute",top:20,left:20,zIndex:10},onClick:()=>{history.back()}},"\u8FD4\u56DE"),R.createElement("div",{onClick:()=>{u(!o)},className:ut.rightopen,style:{right:o?600:0}},R.createElement("div",null,o?"\u6536":"\u5C55"),R.createElement("div",null,o?"\u8D77":"\u5F00"),R.createElement("img",{src:o?Ev:gv})),o&&R.createElement("div",{className:ut.rightmodal},R.createElement("div",{style:{display:"flex",justifyContent:"end"}},R.createElement("a",{onClick:()=>{(ln==null?void 0:ln.knowledge_type)==2?or():(ln==null?void 0:ln.knowledge_type)==3&&yr(2),gt.setFieldsValue({knowledge_type:ln==null?void 0:ln.knowledge_type,name:v==null?void 0:v.name,description:v==null?void 0:v.description,subject_ids:(ln==null?void 0:ln.knowledge_type)==2?v==null?void 0:v.subject_ids:[],knowledge_map_ids:(ln==null?void 0:ln.knowledge_type)==3?v==null?void 0:v.map_ids:[]}),ke({knowledge_type:ln==null?void 0:ln.knowledge_type,name:v==null?void 0:v.name,description:v==null?void 0:v.description,subject_ids:(ln==null?void 0:ln.knowledge_type)==2?v==null?void 0:v.subject_ids:[],knowledge_map_ids:(ln==null?void 0:ln.knowledge_type)==3?v==null?void 0:v.map_ids:[]}),lt(!0)}},"\u7F16\u8F91"),R.createElement("a",{onClick:()=>xc(void 0,null,function*(){let Vn=yield(0,tt.ZP)(`/api/knowledge_maps/${e}.json`,{method:"DELETE"});(Vn==null?void 0:Vn.status)===0&&(A.ZP.info("\u5220\u9664\u6210\u529F"),history.back())}),style:{marginLeft:20}},"\u5220\u9664")),R.createElement("div",{className:ut.rname},R.createElement("div",{style:{color:"#333333",fontSize:16}},v==null?void 0:v.name),R.createElement("div",{style:{marginTop:14}},R.createElement("span",{style:{color:"#5F6A95"}},"\u521B\u5EFA\u65E5\u671F"),R.createElement("span",{style:{marginLeft:10}},v==null?void 0:v.created_at))),R.createElement("div",{style:{marginTop:20,display:"flex"}},R.createElement("div",{onClick:()=>{T(1)},className:ut.topradios},"\u4E13\u4E1A\u6982\u89C8"),R.createElement("div",{onClick:()=>{T(2)},className:ut.topradio},"\u56FE\u8C31\u5217\u8868")),C===1&&R.createElement("div",{className:ut.bocent},R.createElement("div",{className:ut.bctitle},R.createElement("div",null,"\u8BFE\u7A0B\u6570\u91CF"),R.createElement("div",null,"\u56FE\u8C31\u6570\u91CF"),R.createElement("div",null,"\u56FE\u8C31\u8282\u70B9\u6570\u91CF")),R.createElement("div",{className:ut.btcent},R.createElement("div",null,v==null?void 0:v.subject_count),R.createElement("div",null,v==null?void 0:v.knowledge_count),R.createElement("div",null,v==null?void 0:v.node_count)),R.createElement("div",{style:{marginTop:20}},v==null?void 0:v.description)),C===2&&R.createElement("div",{className:ut.bocent},R.createElement("div",{className:ut.bctitles},R.createElement("div",null,"\u8BFE\u7A0B\u540D\u79F0"),R.createElement("div",null,"\u56FE\u8C31\u6570\u91CF"),R.createElement("div",null,"\u6807\u7B7E\u8282\u70B9"),R.createElement("div",null,"\u8D44\u6E90\u8282\u70B9")),n==null?void 0:n.map(Vn=>R.createElement("div",{className:ut.bctitles},R.createElement("div",{style:{color:"#3061D0"},onClick:()=>{window.open(`/knowledgegraph/${Vn==null?void 0:Vn.identifier}`)}},"\u300A",Vn==null?void 0:Vn.name,"\u300B"),R.createElement("div",null,Vn==null?void 0:Vn.knowledge_count),R.createElement("div",null,Vn==null?void 0:Vn.label_count),R.createElement("div",null,Vn==null?void 0:Vn.resource_count))))),R.createElement("div",{ref:i,style:{width:"100vw",height:"100vh",background:"#000",margin:0,overflow:"hidden"}}),R.createElement(I.default,{open:$,title:"\u7F16\u8F91\u77E5\u8BC6\u56FE\u8C31",centered:!0,width:1200,onCancel:()=>{lt(!1)},onOk:()=>gt.submit()},R.createElement(P.default,{form:gt,scrollToFirstError:!0,layout:"horizontal",colon:!1,size:"large",labelCol:{flex:"110rem"},onValuesChange:(Vn,Dr)=>{(Vn==null?void 0:Vn.knowledge_type)==2?or():(Vn==null?void 0:Vn.knowledge_type)==3&&yr(2),ke(zu({},Dr)),Vn!=null&&Vn.knowledge_type&>.setFieldsValue({name:"",description:"",subject_id:"",subject_ids:[],knowledge_map_ids:[],knowledge_type:Vn==null?void 0:Vn.knowledge_type})},initialValues:{knowledge_type:1},onFinish:Vn=>xc(void 0,null,function*(){let Dr=yield(0,tt.ZP)(`/api/knowledge_maps/${e}.json`,{method:"PUT",body:zu({},Vn)});(Dr==null?void 0:Dr.status)===0&&(A.ZP.info("\u4FEE\u6539\u6210\u529F"),hn(),lt(!1),gt.resetFields(),ke({name:"",description:"",subject_id:"",subject_ids:[],knowledge_map_ids:[],knowledge_type:1}))}),className:ut.form},R.createElement(P.default.Item,{label:"\u56FE\u8C31\u603B\u7C7B",name:"knowledge_type",rules:[{required:!0,message:"\u8BF7\u9009\u62E9\u56FE\u8C31\u603B\u7C7B"}]},R.createElement(x.ZP.Group,{disabled:!0},R.createElement(x.ZP,{value:1},"\u8BFE\u7A0B\u56FE\u8C31"),R.createElement(x.ZP,{value:2},"\u4E13\u4E1A\u56FE\u8C31"),R.createElement(x.ZP,{value:3},"\u5B66\u79D1\u56FE\u8C31"))),R.createElement(P.default.Item,{label:ve.knowledge_type==1?"\u56FE\u8C31\u540D\u79F0":ve.knowledge_type==2?"\u4E13\u4E1A\u540D\u79F0":"\u5B66\u79D1\u540D\u79F0",name:"name",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u540D\u79F0"},{type:"string",max:60,message:"\u8F93\u5165\u8D85\u9650\uFF0C\u8BF7\u7F29\u51CF\u5B57\u7B26\u6570"},{type:"string",whitespace:!0,message:"\u5185\u5BB9\u4E0D\u80FD\u5168\u4E3A\u7A7A\u683C"}]},R.createElement(k.default,{maxLength:60,showCount:!0,placeholder:"\u8BF7\u8F93\u5165"})),R.createElement(P.default.Item,{label:ve.knowledge_type==1?"\u56FE\u8C31\u7B80\u4ECB":ve.knowledge_type==2?"\u4E13\u4E1A\u7B80\u4ECB":"\u5B66\u79D1\u7B80\u4ECB",name:"description",rules:[{required:!1,message:"\u8BF7\u8F93\u5165\u7B80\u4ECB"},{type:"string",max:500,message:"\u8F93\u5165\u8D85\u9650\uFF0C\u8BF7\u7F29\u51CF\u5B57\u7B26\u6570"},{type:"string",whitespace:!0,message:"\u5185\u5BB9\u4E0D\u80FD\u5168\u4E3A\u7A7A\u683C"}]},R.createElement(k.default.TextArea,{maxLength:500,showCount:!0,placeholder:"\u8BF7\u8F93\u5165"})),ve.knowledge_type=="2"&&R.createElement(P.default.Item,{className:ut.mType,label:ve.knowledge_type==2?"\u9009\u62E9\u8BFE\u7A0B":"\u9009\u62E9\u4E13\u4E1A",name:ve.knowledge_type==2?"subject_ids":"knowledge_map_ids",rules:[{required:!0,message:"\u8BF7\u9009\u62E9\u8BFE\u7A0B"}]},R.createElement(N.default,{mode:"multiple"},Gt==null?void 0:Gt.map(Vn=>R.createElement(N.default.Option,{value:Vn==null?void 0:Vn.id},Vn==null?void 0:Vn.name)))),ve.knowledge_type=="3"&&R.createElement(P.default.Item,{className:ut.mType,label:"\u9009\u62E9\u4E13\u4E1A",name:"knowledge_map_ids",rules:[{required:!0,message:"\u8BF7\u9009\u62E9\u4E13\u4E1A"}]},R.createElement(N.default,{mode:"multiple"},ze==null?void 0:ze.map(Vn=>R.createElement(N.default.Option,{value:Vn==null?void 0:Vn.id},Vn==null?void 0:Vn.name)))))))}},49529:function(Tt,vt,d){"use strict";var l,R=Object.defineProperty,O=Wt=>{throw TypeError(Wt)},_=Math.pow,g=(Wt,y,E)=>y in Wt?R(Wt,y,{enumerable:!0,configurable:!0,writable:!0,value:E}):Wt[y]=E,P=(Wt,y,E)=>g(Wt,typeof y!="symbol"?y+"":y,E),b=(Wt,y,E)=>y.has(Wt)||O("Cannot "+E),A=(Wt,y,E)=>(b(Wt,y,"read from private field"),E?E.call(Wt):y.get(Wt)),I=(Wt,y,E)=>y.has(Wt)?O("Cannot add the same private member more than once"):y instanceof WeakSet?y.add(Wt):y.set(Wt,E),x=(Wt,y,E,c)=>(b(Wt,y,"write to private field"),c?c.call(Wt,E):y.set(Wt,E),E),k=(Wt,y,E)=>(b(Wt,y,"access private method"),E),N,et,tt;l={value:!0};var Ct=d(34634),ut=d(34402);const nt=" ".repeat(2),kt=" ".repeat(4);function Nt(){return Bt(this)}function Bt(Wt,y={}){const{maxRows:E=15,maxColumns:c=10,maxNumSize:f=8,padMinus:w="auto"}=y;return`${Wt.constructor.name} {
|
|
|
${nt}[
|
|
|
${kt}${Xt(Wt,E,c,f,w)}
|
|
|
${nt}]
|
|
|
${nt}rows: ${Wt.rows}
|
|
|
${nt}columns: ${Wt.columns}
|
|
|
}`}function Xt(Wt,y,E,c,f){const{rows:w,columns:Z}=Wt,z=Math.min(w,y),H=Math.min(Z,E),q=[];if(f==="auto"){f=!1;t:for(let Dt=0;Dt<z;Dt++)for(let U=0;U<H;U++)if(Wt.get(Dt,U)<0){f=!0;break t}}for(let Dt=0;Dt<z;Dt++){let U=[];for(let Y=0;Y<H;Y++)U.push(wt(Wt.get(Dt,Y),c,f));q.push(`${U.join(" ")}`)}return H!==Z&&(q[q.length-1]+=` ... ${Z-E} more columns`),z!==w&&q.push(`... ${w-y} more rows`),q.join(`
|
|
|
${kt}`)}function wt(Wt,y,E){return(Wt>=0&&E?` ${ot(Wt,y-1)}`:ot(Wt,y)).padEnd(y)}function ot(Wt,y){let E=Wt.toString();if(E.length<=y)return E;let c=Wt.toFixed(y);if(c.length>y&&(c=Wt.toFixed(Math.max(0,y-(c.length-y)))),c.length<=y&&!c.startsWith("0.000")&&!c.startsWith("-0.000"))return c;let f=Wt.toExponential(y);return f.length>y&&(f=Wt.toExponential(Math.max(0,y-(f.length-y)))),f.slice(0)}function It(Wt,y){Wt.prototype.add=function(c){return typeof c=="number"?this.addS(c):this.addM(c)},Wt.prototype.addS=function(c){for(let f=0;f<this.rows;f++)for(let w=0;w<this.columns;w++)this.set(f,w,this.get(f,w)+c);return this},Wt.prototype.addM=function(c){if(c=y.checkMatrix(c),this.rows!==c.rows||this.columns!==c.columns)throw new RangeError("Matrices dimensions must be equal");for(let f=0;f<this.rows;f++)for(let w=0;w<this.columns;w++)this.set(f,w,this.get(f,w)+c.get(f,w));return this},Wt.add=function(c,f){return new y(c).add(f)},Wt.prototype.sub=function(c){return typeof c=="number"?this.subS(c):this.subM(c)},Wt.prototype.subS=function(c){for(let f=0;f<this.rows;f++)for(let w=0;w<this.columns;w++)this.set(f,w,this.get(f,w)-c);return this},Wt.prototype.subM=function(c){if(c=y.checkMatrix(c),this.rows!==c.rows||this.columns!==c.columns)throw new RangeError("Matrices dimensions must be equal");for(let f=0;f<this.rows;f++)for(let w=0;w<this.columns;w++)this.set(f,w,this.get(f,w)-c.get(f,w));return this},Wt.sub=function(c,f){return new y(c).sub(f)},Wt.prototype.subtract=Wt.prototype.sub,Wt.prototype.subtractS=Wt.prototype.subS,Wt.prototype.subtractM=Wt.prototype.subM,Wt.subtract=Wt.sub,Wt.prototype.mul=function(c){return typeof c=="number"?this.mulS(c):this.mulM(c)},Wt.prototype.mulS=function(c){for(let f=0;f<this.rows;f++)for(let w=0;w<this.columns;w++)this.set(f,w,this.get(f,w)*c);return this},Wt.prototype.mulM=function(c){if(c=y.checkMatrix(c),this.rows!==c.rows||this.columns!==c.columns)throw new RangeError("Matrices dimensions must be equal");for(let f=0;f<this.rows;f++)for(let w=0;w<this.columns;w++)this.set(f,w,this.get(f,w)*c.get(f,w));return this},Wt.mul=function(c,f){return new y(c).mul(f)},Wt.prototype.multiply=Wt.prototype.mul,Wt.prototype.multiplyS=Wt.prototype.mulS,Wt.prototype.multiplyM=Wt.prototype.mulM,Wt.multiply=Wt.mul,Wt.prototype.div=function(c){return typeof c=="number"?this.divS(c):this.divM(c)},Wt.prototype.divS=function(c){for(let f=0;f<this.rows;f++)for(let w=0;w<this.columns;w++)this.set(f,w,this.get(f,w)/c);return this},Wt.prototype.divM=function(c){if(c=y.checkMatrix(c),this.rows!==c.rows||this.columns!==c.columns)throw new RangeError("Matrices dimensions must be equal");for(let f=0;f<this.rows;f++)for(let w=0;w<this.columns;w++)this.set(f,w,this.get(f,w)/c.get(f,w));return this},Wt.div=function(c,f){return new y(c).div(f)},Wt.prototype.divide=Wt.prototype.div,Wt.prototype.divideS=Wt.prototype.divS,Wt.prototype.divideM=Wt.prototype.divM,Wt.divide=Wt.div,Wt.prototype.mod=function(c){return typeof c=="number"?this.modS(c):this.modM(c)},Wt.prototype.modS=function(c){for(let f=0;f<this.rows;f++)for(let w=0;w<this.columns;w++)this.set(f,w,this.get(f,w)%c);return this},Wt.prototype.modM=function(c){if(c=y.checkMatrix(c),this.rows!==c.rows||this.columns!==c.columns)throw new RangeError("Matrices dimensions must be equal");for(let f=0;f<this.rows;f++)for(let w=0;w<this.columns;w++)this.set(f,w,this.get(f,w)%c.get(f,w));return this},Wt.mod=function(c,f){return new y(c).mod(f)},Wt.prototype.modulus=Wt.prototype.mod,Wt.prototype.modulusS=Wt.prototype.modS,Wt.prototype.modulusM=Wt.prototype.modM,Wt.modulus=Wt.mod,Wt.prototype.and=function(c){return typeof c=="number"?this.andS(c):this.andM(c)},Wt.prototype.andS=function(c){for(let f=0;f<this.rows;f++)for(let w=0;w<this.columns;w++)this.set(f,w,this.get(f,w)&c);return this},Wt.prototype.andM=function(c){if(c=y.checkMatrix(c),this.rows!==c.rows||this.columns!==c.columns)throw new RangeError("Matrices dimensions must be equal");for(let f=0;f<this.rows;f++)for(let w=0;w<this.columns;w++)this.set(f,w,this.get(f,w)&c.get(f,w));return this},Wt.and=function(c,f){return new y(c).and(f)},Wt.prototype.or=function(c){return typeof c=="number"?this.orS(c):this.orM(c)},Wt.prototype.orS=function(c){for(let f=0;f<this.rows;f++)for(let w=0;w<this.columns;w++)this.set(f,w,this.get(f,w)|c);return this},Wt.prototype.orM=function(c){if(c=y.checkMatrix(c),this.rows!==c.rows||this.columns!==c.columns)throw new RangeError("Matrices dimensions must be equal");for(let f=0;f<this.rows;f++)for(let w=0;w<this.columns;w++)this.set(f,w,this.get(f,w)|c.get(f,w));return this},Wt.or=function(c,f){return new y(c).or(f)},Wt.prototype.xor=function(c){return typeof c=="number"?this.xorS(c):this.xorM(c)},Wt.prototype.xorS=function(c){for(let f=0;f<this.rows;f++)for(let w=0;w<this.columns;w++)this.set(f,w,this.get(f,w)^c);return this},Wt.prototype.xorM=function(c){if(c=y.checkMatrix(c),this.rows!==c.rows||this.columns!==c.columns)throw new RangeError("Matrices dimensions must be equal");for(let f=0;f<this.rows;f++)for(let w=0;w<this.columns;w++)this.set(f,w,this.get(f,w)^c.get(f,w));return this},Wt.xor=function(c,f){return new y(c).xor(f)},Wt.prototype.leftShift=function(c){return typeof c=="number"?this.leftShiftS(c):this.leftShiftM(c)},Wt.prototype.leftShiftS=function(c){for(let f=0;f<this.rows;f++)for(let w=0;w<this.columns;w++)this.set(f,w,this.get(f,w)<<c);return this},Wt.prototype.leftShiftM=function(c){if(c=y.checkMatrix(c),this.rows!==c.rows||this.columns!==c.columns)throw new RangeError("Matrices dimensions must be equal");for(let f=0;f<this.rows;f++)for(let w=0;w<this.columns;w++)this.set(f,w,this.get(f,w)<<c.get(f,w));return this},Wt.leftShift=function(c,f){return new y(c).leftShift(f)},Wt.prototype.signPropagatingRightShift=function(c){return typeof c=="number"?this.signPropagatingRightShiftS(c):this.signPropagatingRightShiftM(c)},Wt.prototype.signPropagatingRightShiftS=function(c){for(let f=0;f<this.rows;f++)for(let w=0;w<this.columns;w++)this.set(f,w,this.get(f,w)>>c);return this},Wt.prototype.signPropagatingRightShiftM=function(c){if(c=y.checkMatrix(c),this.rows!==c.rows||this.columns!==c.columns)throw new RangeError("Matrices dimensions must be equal");for(let f=0;f<this.rows;f++)for(let w=0;w<this.columns;w++)this.set(f,w,this.get(f,w)>>c.get(f,w));return this},Wt.signPropagatingRightShift=function(c,f){return new y(c).signPropagatingRightShift(f)},Wt.prototype.rightShift=function(c){return typeof c=="number"?this.rightShiftS(c):this.rightShiftM(c)},Wt.prototype.rightShiftS=function(c){for(let f=0;f<this.rows;f++)for(let w=0;w<this.columns;w++)this.set(f,w,this.get(f,w)>>>c);return this},Wt.prototype.rightShiftM=function(c){if(c=y.checkMatrix(c),this.rows!==c.rows||this.columns!==c.columns)throw new RangeError("Matrices dimensions must be equal");for(let f=0;f<this.rows;f++)for(let w=0;w<this.columns;w++)this.set(f,w,this.get(f,w)>>>c.get(f,w));return this},Wt.rightShift=function(c,f){return new y(c).rightShift(f)},Wt.prototype.zeroFillRightShift=Wt.prototype.rightShift,Wt.prototype.zeroFillRightShiftS=Wt.prototype.rightShiftS,Wt.prototype.zeroFillRightShiftM=Wt.prototype.rightShiftM,Wt.zeroFillRightShift=Wt.rightShift,Wt.prototype.not=function(){for(let c=0;c<this.rows;c++)for(let f=0;f<this.columns;f++)this.set(c,f,~this.get(c,f));return this},Wt.not=function(c){return new y(c).not()},Wt.prototype.abs=function(){for(let c=0;c<this.rows;c++)for(let f=0;f<this.columns;f++)this.set(c,f,Math.abs(this.get(c,f)));return this},Wt.abs=function(c){return new y(c).abs()},Wt.prototype.acos=function(){for(let c=0;c<this.rows;c++)for(let f=0;f<this.columns;f++)this.set(c,f,Math.acos(this.get(c,f)));return this},Wt.acos=function(c){return new y(c).acos()},Wt.prototype.acosh=function(){for(let c=0;c<this.rows;c++)for(let f=0;f<this.columns;f++)this.set(c,f,Math.acosh(this.get(c,f)));return this},Wt.acosh=function(c){return new y(c).acosh()},Wt.prototype.asin=function(){for(let c=0;c<this.rows;c++)for(let f=0;f<this.columns;f++)this.set(c,f,Math.asin(this.get(c,f)));return this},Wt.asin=function(c){return new y(c).asin()},Wt.prototype.asinh=function(){for(let c=0;c<this.rows;c++)for(let f=0;f<this.columns;f++)this.set(c,f,Math.asinh(this.get(c,f)));return this},Wt.asinh=function(c){return new y(c).asinh()},Wt.prototype.atan=function(){for(let c=0;c<this.rows;c++)for(let f=0;f<this.columns;f++)this.set(c,f,Math.atan(this.get(c,f)));return this},Wt.atan=function(c){return new y(c).atan()},Wt.prototype.atanh=function(){for(let c=0;c<this.rows;c++)for(let f=0;f<this.columns;f++)this.set(c,f,Math.atanh(this.get(c,f)));return this},Wt.atanh=function(c){return new y(c).atanh()},Wt.prototype.cbrt=function(){for(let c=0;c<this.rows;c++)for(let f=0;f<this.columns;f++)this.set(c,f,Math.cbrt(this.get(c,f)));return this},Wt.cbrt=function(c){return new y(c).cbrt()},Wt.prototype.ceil=function(){for(let c=0;c<this.rows;c++)for(let f=0;f<this.columns;f++)this.set(c,f,Math.ceil(this.get(c,f)));return this},Wt.ceil=function(c){return new y(c).ceil()},Wt.prototype.clz32=function(){for(let c=0;c<this.rows;c++)for(let f=0;f<this.columns;f++)this.set(c,f,Math.clz32(this.get(c,f)));return this},Wt.clz32=function(c){return new y(c).clz32()},Wt.prototype.cos=function(){for(let c=0;c<this.rows;c++)for(let f=0;f<this.columns;f++)this.set(c,f,Math.cos(this.get(c,f)));return this},Wt.cos=function(c){return new y(c).cos()},Wt.prototype.cosh=function(){for(let c=0;c<this.rows;c++)for(let f=0;f<this.columns;f++)this.set(c,f,Math.cosh(this.get(c,f)));return this},Wt.cosh=function(c){return new y(c).cosh()},Wt.prototype.exp=function(){for(let c=0;c<this.rows;c++)for(let f=0;f<this.columns;f++)this.set(c,f,Math.exp(this.get(c,f)));return this},Wt.exp=function(c){return new y(c).exp()},Wt.prototype.expm1=function(){for(let c=0;c<this.rows;c++)for(let f=0;f<this.columns;f++)this.set(c,f,Math.expm1(this.get(c,f)));return this},Wt.expm1=function(c){return new y(c).expm1()},Wt.prototype.floor=function(){for(let c=0;c<this.rows;c++)for(let f=0;f<this.columns;f++)this.set(c,f,Math.floor(this.get(c,f)));return this},Wt.floor=function(c){return new y(c).floor()},Wt.prototype.fround=function(){for(let c=0;c<this.rows;c++)for(let f=0;f<this.columns;f++)this.set(c,f,Math.fround(this.get(c,f)));return this},Wt.fround=function(c){return new y(c).fround()},Wt.prototype.log=function(){for(let c=0;c<this.rows;c++)for(let f=0;f<this.columns;f++)this.set(c,f,Math.log(this.get(c,f)));return this},Wt.log=function(c){return new y(c).log()},Wt.prototype.log1p=function(){for(let c=0;c<this.rows;c++)for(let f=0;f<this.columns;f++)this.set(c,f,Math.log1p(this.get(c,f)));return this},Wt.log1p=function(c){return new y(c).log1p()},Wt.prototype.log10=function(){for(let c=0;c<this.rows;c++)for(let f=0;f<this.columns;f++)this.set(c,f,Math.log10(this.get(c,f)));return this},Wt.log10=function(c){return new y(c).log10()},Wt.prototype.log2=function(){for(let c=0;c<this.rows;c++)for(let f=0;f<this.columns;f++)this.set(c,f,Math.log2(this.get(c,f)));return this},Wt.log2=function(c){return new y(c).log2()},Wt.prototype.round=function(){for(let c=0;c<this.rows;c++)for(let f=0;f<this.columns;f++)this.set(c,f,Math.round(this.get(c,f)));return this},Wt.round=function(c){return new y(c).round()},Wt.prototype.sign=function(){for(let c=0;c<this.rows;c++)for(let f=0;f<this.columns;f++)this.set(c,f,Math.sign(this.get(c,f)));return this},Wt.sign=function(c){return new y(c).sign()},Wt.prototype.sin=function(){for(let c=0;c<this.rows;c++)for(let f=0;f<this.columns;f++)this.set(c,f,Math.sin(this.get(c,f)));return this},Wt.sin=function(c){return new y(c).sin()},Wt.prototype.sinh=function(){for(let c=0;c<this.rows;c++)for(let f=0;f<this.columns;f++)this.set(c,f,Math.sinh(this.get(c,f)));return this},Wt.sinh=function(c){return new y(c).sinh()},Wt.prototype.sqrt=function(){for(let c=0;c<this.rows;c++)for(let f=0;f<this.columns;f++)this.set(c,f,Math.sqrt(this.get(c,f)));return this},Wt.sqrt=function(c){return new y(c).sqrt()},Wt.prototype.tan=function(){for(let c=0;c<this.rows;c++)for(let f=0;f<this.columns;f++)this.set(c,f,Math.tan(this.get(c,f)));return this},Wt.tan=function(c){return new y(c).tan()},Wt.prototype.tanh=function(){for(let c=0;c<this.rows;c++)for(let f=0;f<this.columns;f++)this.set(c,f,Math.tanh(this.get(c,f)));return this},Wt.tanh=function(c){return new y(c).tanh()},Wt.prototype.trunc=function(){for(let c=0;c<this.rows;c++)for(let f=0;f<this.columns;f++)this.set(c,f,Math.trunc(this.get(c,f)));return this},Wt.trunc=function(c){return new y(c).trunc()},Wt.pow=function(c,f){return new y(c).pow(f)},Wt.prototype.pow=function(c){return typeof c=="number"?this.powS(c):this.powM(c)},Wt.prototype.powS=function(c){for(let f=0;f<this.rows;f++)for(let w=0;w<this.columns;w++)this.set(f,w,_(this.get(f,w),c));return this},Wt.prototype.powM=function(c){if(c=y.checkMatrix(c),this.rows!==c.rows||this.columns!==c.columns)throw new RangeError("Matrices dimensions must be equal");for(let f=0;f<this.rows;f++)for(let w=0;w<this.columns;w++)this.set(f,w,_(this.get(f,w),c.get(f,w)));return this}}function zt(Wt,y,E){let c=E?Wt.rows:Wt.rows-1;if(y<0||y>c)throw new RangeError("Row index out of range")}function Ot(Wt,y,E){let c=E?Wt.columns:Wt.columns-1;if(y<0||y>c)throw new RangeError("Column index out of range")}function pe(Wt,y){if(y.to1DArray&&(y=y.to1DArray()),y.length!==Wt.columns)throw new RangeError("vector size must be the same as the number of columns");return y}function xe(Wt,y){if(y.to1DArray&&(y=y.to1DArray()),y.length!==Wt.rows)throw new RangeError("vector size must be the same as the number of rows");return y}function qt(Wt,y){if(!Ct.isAnyArray(y))throw new TypeError("row indices must be an array");for(let E=0;E<y.length;E++)if(y[E]<0||y[E]>=Wt.rows)throw new RangeError("row indices are out of range")}function Ye(Wt,y){if(!Ct.isAnyArray(y))throw new TypeError("column indices must be an array");for(let E=0;E<y.length;E++)if(y[E]<0||y[E]>=Wt.columns)throw new RangeError("column indices are out of range")}function We(Wt,y,E,c,f){if(arguments.length!==5)throw new RangeError("expected 4 arguments");if(Qe("startRow",y),Qe("endRow",E),Qe("startColumn",c),Qe("endColumn",f),y>E||c>f||y<0||y>=Wt.rows||E<0||E>=Wt.rows||c<0||c>=Wt.columns||f<0||f>=Wt.columns)throw new RangeError("Submatrix indices are out of range")}function Oe(Wt,y=0){let E=[];for(let c=0;c<Wt;c++)E.push(y);return E}function Qe(Wt,y){if(typeof y!="number")throw new TypeError(`${Wt} must be a number`)}function Mt(Wt){if(Wt.isEmpty())throw new Error("Empty matrix has no elements to index")}function ne(Wt){let y=Oe(Wt.rows);for(let E=0;E<Wt.rows;++E)for(let c=0;c<Wt.columns;++c)y[E]+=Wt.get(E,c);return y}function Me(Wt){let y=Oe(Wt.columns);for(let E=0;E<Wt.rows;++E)for(let c=0;c<Wt.columns;++c)y[c]+=Wt.get(E,c);return y}function nn(Wt){let y=0;for(let E=0;E<Wt.rows;E++)for(let c=0;c<Wt.columns;c++)y+=Wt.get(E,c);return y}function le(Wt){let y=Oe(Wt.rows,1);for(let E=0;E<Wt.rows;++E)for(let c=0;c<Wt.columns;++c)y[E]*=Wt.get(E,c);return y}function be(Wt){let y=Oe(Wt.columns,1);for(let E=0;E<Wt.rows;++E)for(let c=0;c<Wt.columns;++c)y[c]*=Wt.get(E,c);return y}function De(Wt){let y=1;for(let E=0;E<Wt.rows;E++)for(let c=0;c<Wt.columns;c++)y*=Wt.get(E,c);return y}function Yt(Wt,y,E){const c=Wt.rows,f=Wt.columns,w=[];for(let Z=0;Z<c;Z++){let z=0,H=0,q=0;for(let Dt=0;Dt<f;Dt++)q=Wt.get(Z,Dt)-E[Z],z+=q,H+=q*q;y?w.push((H-z*z/f)/(f-1)):w.push((H-z*z/f)/f)}return w}function re(Wt,y,E){const c=Wt.rows,f=Wt.columns,w=[];for(let Z=0;Z<f;Z++){let z=0,H=0,q=0;for(let Dt=0;Dt<c;Dt++)q=Wt.get(Dt,Z)-E[Z],z+=q,H+=q*q;y?w.push((H-z*z/c)/(c-1)):w.push((H-z*z/c)/c)}return w}function xt(Wt,y,E){const c=Wt.rows,f=Wt.columns,w=c*f;let Z=0,z=0,H=0;for(let q=0;q<c;q++)for(let Dt=0;Dt<f;Dt++)H=Wt.get(q,Dt)-E,Z+=H,z+=H*H;return y?(z-Z*Z/w)/(w-1):(z-Z*Z/w)/w}function at(Wt,y){for(let E=0;E<Wt.rows;E++)for(let c=0;c<Wt.columns;c++)Wt.set(E,c,Wt.get(E,c)-y[E])}function se(Wt,y){for(let E=0;E<Wt.rows;E++)for(let c=0;c<Wt.columns;c++)Wt.set(E,c,Wt.get(E,c)-y[c])}function Fe(Wt,y){for(let E=0;E<Wt.rows;E++)for(let c=0;c<Wt.columns;c++)Wt.set(E,c,Wt.get(E,c)-y)}function Re(Wt){const y=[];for(let E=0;E<Wt.rows;E++){let c=0;for(let f=0;f<Wt.columns;f++)c+=_(Wt.get(E,f),2)/(Wt.columns-1);y.push(Math.sqrt(c))}return y}function ge(Wt,y){for(let E=0;E<Wt.rows;E++)for(let c=0;c<Wt.columns;c++)Wt.set(E,c,Wt.get(E,c)/y[E])}function Ie(Wt){const y=[];for(let E=0;E<Wt.columns;E++){let c=0;for(let f=0;f<Wt.rows;f++)c+=_(Wt.get(f,E),2)/(Wt.rows-1);y.push(Math.sqrt(c))}return y}function Ne(Wt,y){for(let E=0;E<Wt.rows;E++)for(let c=0;c<Wt.columns;c++)Wt.set(E,c,Wt.get(E,c)/y[c])}function bt(Wt){const y=Wt.size-1;let E=0;for(let c=0;c<Wt.columns;c++)for(let f=0;f<Wt.rows;f++)E+=_(Wt.get(f,c),2)/y;return Math.sqrt(E)}function Jt(Wt,y){for(let E=0;E<Wt.rows;E++)for(let c=0;c<Wt.columns;c++)Wt.set(E,c,Wt.get(E,c)/y)}class oe{static from1DArray(y,E,c){if(y*E!==c.length)throw new RangeError("data length does not match given dimensions");let w=new Ut(y,E);for(let Z=0;Z<y;Z++)for(let z=0;z<E;z++)w.set(Z,z,c[Z*E+z]);return w}static rowVector(y){let E=new Ut(1,y.length);for(let c=0;c<y.length;c++)E.set(0,c,y[c]);return E}static columnVector(y){let E=new Ut(y.length,1);for(let c=0;c<y.length;c++)E.set(c,0,y[c]);return E}static zeros(y,E){return new Ut(y,E)}static ones(y,E){return new Ut(y,E).fill(1)}static rand(y,E,c={}){if(typeof c!="object")throw new TypeError("options must be an object");const{random:f=Math.random}=c;let w=new Ut(y,E);for(let Z=0;Z<y;Z++)for(let z=0;z<E;z++)w.set(Z,z,f());return w}static randInt(y,E,c={}){if(typeof c!="object")throw new TypeError("options must be an object");const{min:f=0,max:w=1e3,random:Z=Math.random}=c;if(!Number.isInteger(f))throw new TypeError("min must be an integer");if(!Number.isInteger(w))throw new TypeError("max must be an integer");if(f>=w)throw new RangeError("min must be smaller than max");let z=w-f,H=new Ut(y,E);for(let q=0;q<y;q++)for(let Dt=0;Dt<E;Dt++){let U=f+Math.round(Z()*z);H.set(q,Dt,U)}return H}static eye(y,E,c){E===void 0&&(E=y),c===void 0&&(c=1);let f=Math.min(y,E),w=this.zeros(y,E);for(let Z=0;Z<f;Z++)w.set(Z,Z,c);return w}static diag(y,E,c){let f=y.length;E===void 0&&(E=f),c===void 0&&(c=E);let w=Math.min(f,E,c),Z=this.zeros(E,c);for(let z=0;z<w;z++)Z.set(z,z,y[z]);return Z}static min(y,E){y=this.checkMatrix(y),E=this.checkMatrix(E);let c=y.rows,f=y.columns,w=new Ut(c,f);for(let Z=0;Z<c;Z++)for(let z=0;z<f;z++)w.set(Z,z,Math.min(y.get(Z,z),E.get(Z,z)));return w}static max(y,E){y=this.checkMatrix(y),E=this.checkMatrix(E);let c=y.rows,f=y.columns,w=new this(c,f);for(let Z=0;Z<c;Z++)for(let z=0;z<f;z++)w.set(Z,z,Math.max(y.get(Z,z),E.get(Z,z)));return w}static checkMatrix(y){return oe.isMatrix(y)?y:new Ut(y)}static isMatrix(y){return y!=null&&y.klass==="Matrix"}get size(){return this.rows*this.columns}apply(y){if(typeof y!="function")throw new TypeError("callback must be a function");for(let E=0;E<this.rows;E++)for(let c=0;c<this.columns;c++)y.call(this,E,c);return this}to1DArray(){let y=[];for(let E=0;E<this.rows;E++)for(let c=0;c<this.columns;c++)y.push(this.get(E,c));return y}to2DArray(){let y=[];for(let E=0;E<this.rows;E++){y.push([]);for(let c=0;c<this.columns;c++)y[E].push(this.get(E,c))}return y}toJSON(){return this.to2DArray()}isRowVector(){return this.rows===1}isColumnVector(){return this.columns===1}isVector(){return this.rows===1||this.columns===1}isSquare(){return this.rows===this.columns}isEmpty(){return this.rows===0||this.columns===0}isSymmetric(){if(this.isSquare()){for(let y=0;y<this.rows;y++)for(let E=0;E<=y;E++)if(this.get(y,E)!==this.get(E,y))return!1;return!0}return!1}isDistance(){if(!this.isSymmetric())return!1;for(let y=0;y<this.rows;y++)if(this.get(y,y)!==0)return!1;return!0}isEchelonForm(){let y=0,E=0,c=-1,f=!0,w=!1;for(;y<this.rows&&f;){for(E=0,w=!1;E<this.columns&&w===!1;)this.get(y,E)===0?E++:this.get(y,E)===1&&E>c?(w=!0,c=E):(f=!1,w=!0);y++}return f}isReducedEchelonForm(){let y=0,E=0,c=-1,f=!0,w=!1;for(;y<this.rows&&f;){for(E=0,w=!1;E<this.columns&&w===!1;)this.get(y,E)===0?E++:this.get(y,E)===1&&E>c?(w=!0,c=E):(f=!1,w=!0);for(let Z=E+1;Z<this.rows;Z++)this.get(y,Z)!==0&&(f=!1);y++}return f}echelonForm(){let y=this.clone(),E=0,c=0;for(;E<y.rows&&c<y.columns;){let f=E;for(let w=E;w<y.rows;w++)y.get(w,c)>y.get(f,c)&&(f=w);if(y.get(f,c)===0)c++;else{y.swapRows(E,f);let w=y.get(E,c);for(let Z=c;Z<y.columns;Z++)y.set(E,Z,y.get(E,Z)/w);for(let Z=E+1;Z<y.rows;Z++){let z=y.get(Z,c)/y.get(E,c);y.set(Z,c,0);for(let H=c+1;H<y.columns;H++)y.set(Z,H,y.get(Z,H)-y.get(E,H)*z)}E++,c++}}return y}reducedEchelonForm(){let y=this.echelonForm(),E=y.columns,c=y.rows,f=c-1;for(;f>=0;)if(y.maxRow(f)===0)f--;else{let w=0,Z=!1;for(;w<c&&Z===!1;)y.get(f,w)===1?Z=!0:w++;for(let z=0;z<f;z++){let H=y.get(z,w);for(let q=w;q<E;q++){let Dt=y.get(z,q)-H*y.get(f,q);y.set(z,q,Dt)}}f--}return y}set(){throw new Error("set method is unimplemented")}get(){throw new Error("get method is unimplemented")}repeat(y={}){if(typeof y!="object")throw new TypeError("options must be an object");const{rows:E=1,columns:c=1}=y;if(!Number.isInteger(E)||E<=0)throw new TypeError("rows must be a positive integer");if(!Number.isInteger(c)||c<=0)throw new TypeError("columns must be a positive integer");let f=new Ut(this.rows*E,this.columns*c);for(let w=0;w<E;w++)for(let Z=0;Z<c;Z++)f.setSubMatrix(this,this.rows*w,this.columns*Z);return f}fill(y){for(let E=0;E<this.rows;E++)for(let c=0;c<this.columns;c++)this.set(E,c,y);return this}neg(){return this.mulS(-1)}getRow(y){zt(this,y);let E=[];for(let c=0;c<this.columns;c++)E.push(this.get(y,c));return E}getRowVector(y){return Ut.rowVector(this.getRow(y))}setRow(y,E){zt(this,y),E=pe(this,E);for(let c=0;c<this.columns;c++)this.set(y,c,E[c]);return this}swapRows(y,E){zt(this,y),zt(this,E);for(let c=0;c<this.columns;c++){let f=this.get(y,c);this.set(y,c,this.get(E,c)),this.set(E,c,f)}return this}getColumn(y){Ot(this,y);let E=[];for(let c=0;c<this.rows;c++)E.push(this.get(c,y));return E}getColumnVector(y){return Ut.columnVector(this.getColumn(y))}setColumn(y,E){Ot(this,y),E=xe(this,E);for(let c=0;c<this.rows;c++)this.set(c,y,E[c]);return this}swapColumns(y,E){Ot(this,y),Ot(this,E);for(let c=0;c<this.rows;c++){let f=this.get(c,y);this.set(c,y,this.get(c,E)),this.set(c,E,f)}return this}addRowVector(y){y=pe(this,y);for(let E=0;E<this.rows;E++)for(let c=0;c<this.columns;c++)this.set(E,c,this.get(E,c)+y[c]);return this}subRowVector(y){y=pe(this,y);for(let E=0;E<this.rows;E++)for(let c=0;c<this.columns;c++)this.set(E,c,this.get(E,c)-y[c]);return this}mulRowVector(y){y=pe(this,y);for(let E=0;E<this.rows;E++)for(let c=0;c<this.columns;c++)this.set(E,c,this.get(E,c)*y[c]);return this}divRowVector(y){y=pe(this,y);for(let E=0;E<this.rows;E++)for(let c=0;c<this.columns;c++)this.set(E,c,this.get(E,c)/y[c]);return this}addColumnVector(y){y=xe(this,y);for(let E=0;E<this.rows;E++)for(let c=0;c<this.columns;c++)this.set(E,c,this.get(E,c)+y[E]);return this}subColumnVector(y){y=xe(this,y);for(let E=0;E<this.rows;E++)for(let c=0;c<this.columns;c++)this.set(E,c,this.get(E,c)-y[E]);return this}mulColumnVector(y){y=xe(this,y);for(let E=0;E<this.rows;E++)for(let c=0;c<this.columns;c++)this.set(E,c,this.get(E,c)*y[E]);return this}divColumnVector(y){y=xe(this,y);for(let E=0;E<this.rows;E++)for(let c=0;c<this.columns;c++)this.set(E,c,this.get(E,c)/y[E]);return this}mulRow(y,E){zt(this,y);for(let c=0;c<this.columns;c++)this.set(y,c,this.get(y,c)*E);return this}mulColumn(y,E){Ot(this,y);for(let c=0;c<this.rows;c++)this.set(c,y,this.get(c,y)*E);return this}max(y){if(this.isEmpty())return NaN;switch(y){case"row":{const E=new Array(this.rows).fill(Number.NEGATIVE_INFINITY);for(let c=0;c<this.rows;c++)for(let f=0;f<this.columns;f++)this.get(c,f)>E[c]&&(E[c]=this.get(c,f));return E}case"column":{const E=new Array(this.columns).fill(Number.NEGATIVE_INFINITY);for(let c=0;c<this.rows;c++)for(let f=0;f<this.columns;f++)this.get(c,f)>E[f]&&(E[f]=this.get(c,f));return E}case void 0:{let E=this.get(0,0);for(let c=0;c<this.rows;c++)for(let f=0;f<this.columns;f++)this.get(c,f)>E&&(E=this.get(c,f));return E}default:throw new Error(`invalid option: ${y}`)}}maxIndex(){Mt(this);let y=this.get(0,0),E=[0,0];for(let c=0;c<this.rows;c++)for(let f=0;f<this.columns;f++)this.get(c,f)>y&&(y=this.get(c,f),E[0]=c,E[1]=f);return E}min(y){if(this.isEmpty())return NaN;switch(y){case"row":{const E=new Array(this.rows).fill(Number.POSITIVE_INFINITY);for(let c=0;c<this.rows;c++)for(let f=0;f<this.columns;f++)this.get(c,f)<E[c]&&(E[c]=this.get(c,f));return E}case"column":{const E=new Array(this.columns).fill(Number.POSITIVE_INFINITY);for(let c=0;c<this.rows;c++)for(let f=0;f<this.columns;f++)this.get(c,f)<E[f]&&(E[f]=this.get(c,f));return E}case void 0:{let E=this.get(0,0);for(let c=0;c<this.rows;c++)for(let f=0;f<this.columns;f++)this.get(c,f)<E&&(E=this.get(c,f));return E}default:throw new Error(`invalid option: ${y}`)}}minIndex(){Mt(this);let y=this.get(0,0),E=[0,0];for(let c=0;c<this.rows;c++)for(let f=0;f<this.columns;f++)this.get(c,f)<y&&(y=this.get(c,f),E[0]=c,E[1]=f);return E}maxRow(y){if(zt(this,y),this.isEmpty())return NaN;let E=this.get(y,0);for(let c=1;c<this.columns;c++)this.get(y,c)>E&&(E=this.get(y,c));return E}maxRowIndex(y){zt(this,y),Mt(this);let E=this.get(y,0),c=[y,0];for(let f=1;f<this.columns;f++)this.get(y,f)>E&&(E=this.get(y,f),c[1]=f);return c}minRow(y){if(zt(this,y),this.isEmpty())return NaN;let E=this.get(y,0);for(let c=1;c<this.columns;c++)this.get(y,c)<E&&(E=this.get(y,c));return E}minRowIndex(y){zt(this,y),Mt(this);let E=this.get(y,0),c=[y,0];for(let f=1;f<this.columns;f++)this.get(y,f)<E&&(E=this.get(y,f),c[1]=f);return c}maxColumn(y){if(Ot(this,y),this.isEmpty())return NaN;let E=this.get(0,y);for(let c=1;c<this.rows;c++)this.get(c,y)>E&&(E=this.get(c,y));return E}maxColumnIndex(y){Ot(this,y),Mt(this);let E=this.get(0,y),c=[0,y];for(let f=1;f<this.rows;f++)this.get(f,y)>E&&(E=this.get(f,y),c[0]=f);return c}minColumn(y){if(Ot(this,y),this.isEmpty())return NaN;let E=this.get(0,y);for(let c=1;c<this.rows;c++)this.get(c,y)<E&&(E=this.get(c,y));return E}minColumnIndex(y){Ot(this,y),Mt(this);let E=this.get(0,y),c=[0,y];for(let f=1;f<this.rows;f++)this.get(f,y)<E&&(E=this.get(f,y),c[0]=f);return c}diag(){let y=Math.min(this.rows,this.columns),E=[];for(let c=0;c<y;c++)E.push(this.get(c,c));return E}norm(y="frobenius"){switch(y){case"max":return this.max();case"frobenius":return Math.sqrt(this.dot(this));default:throw new RangeError(`unknown norm type: ${y}`)}}cumulativeSum(){let y=0;for(let E=0;E<this.rows;E++)for(let c=0;c<this.columns;c++)y+=this.get(E,c),this.set(E,c,y);return this}dot(y){oe.isMatrix(y)&&(y=y.to1DArray());let E=this.to1DArray();if(E.length!==y.length)throw new RangeError("vectors do not have the same size");let c=0;for(let f=0;f<E.length;f++)c+=E[f]*y[f];return c}mmul(y){y=Ut.checkMatrix(y);let E=this.rows,c=this.columns,f=y.columns,w=new Ut(E,f),Z=new Float64Array(c);for(let z=0;z<f;z++){for(let H=0;H<c;H++)Z[H]=y.get(H,z);for(let H=0;H<E;H++){let q=0;for(let Dt=0;Dt<c;Dt++)q+=this.get(H,Dt)*Z[Dt];w.set(H,z,q)}}return w}mpow(y){if(!this.isSquare())throw new RangeError("Matrix must be square");if(!Number.isInteger(y)||y<0)throw new RangeError("Exponent must be a non-negative integer");let E=Ut.eye(this.rows),c=this;for(let f=y;f>=1;f/=2)f&1&&(E=E.mmul(c)),c=c.mmul(c);return E}strassen2x2(y){y=Ut.checkMatrix(y);let E=new Ut(2,2);const c=this.get(0,0),f=y.get(0,0),w=this.get(0,1),Z=y.get(0,1),z=this.get(1,0),H=y.get(1,0),q=this.get(1,1),Dt=y.get(1,1),U=(c+q)*(f+Dt),Y=(z+q)*f,G=c*(Z-Dt),J=q*(H-f),pt=(c+w)*Dt,Kt=(z-c)*(f+Z),yt=(w-q)*(H+Dt),Qt=U+J-pt+yt,ct=G+pt,ht=Y+J,rt=U-Y+G+Kt;return E.set(0,0,Qt),E.set(0,1,ct),E.set(1,0,ht),E.set(1,1,rt),E}strassen3x3(y){y=Ut.checkMatrix(y);let E=new Ut(3,3);const c=this.get(0,0),f=this.get(0,1),w=this.get(0,2),Z=this.get(1,0),z=this.get(1,1),H=this.get(1,2),q=this.get(2,0),Dt=this.get(2,1),U=this.get(2,2),Y=y.get(0,0),G=y.get(0,1),J=y.get(0,2),pt=y.get(1,0),Kt=y.get(1,1),yt=y.get(1,2),Qt=y.get(2,0),ct=y.get(2,1),ht=y.get(2,2),rt=(c+f+w-Z-z-Dt-U)*Kt,$t=(c-Z)*(-G+Kt),Ht=z*(-Y+G+pt-Kt-yt-Qt+ht),ue=(-c+Z+z)*(Y-G+Kt),Ee=(Z+z)*(-Y+G),ie=c*Y,Pe=(-c+q+Dt)*(Y-J+yt),Be=(-c+q)*(J-yt),He=(q+Dt)*(-Y+J),en=(c+f+w-z-H-q-Dt)*yt,un=Dt*(-Y+J+pt-Kt-yt-Qt+ct),mn=(-w+Dt+U)*(Kt+Qt-ct),Sn=(w-U)*(Kt-ct),Pn=w*Qt,$n=(Dt+U)*(-Qt+ct),Wn=(-w+z+H)*(yt+Qt-ht),Xn=(w-H)*(yt-ht),An=(z+H)*(-Qt+ht),Zn=f*pt,qn=H*ct,er=Z*J,Cr=q*G,Un=U*ht,ar=ie+Pn+Zn,ii=rt+ue+Ee+ie+mn+Pn+$n,Or=ie+Pe+He+en+Pn+Wn+An,Lr=$t+Ht+ue+ie+Pn+Wn+Xn,fi=$t+ue+Ee+ie+qn,zr=Pn+Wn+Xn+An+er,Er=ie+Pe+Be+un+mn+Sn+Pn,mr=mn+Sn+Pn+$n+Cr,si=ie+Pe+Be+He+Un;return E.set(0,0,ar),E.set(0,1,ii),E.set(0,2,Or),E.set(1,0,Lr),E.set(1,1,fi),E.set(1,2,zr),E.set(2,0,Er),E.set(2,1,mr),E.set(2,2,si),E}mmulStrassen(y){y=Ut.checkMatrix(y);let E=this.clone(),c=E.rows,f=E.columns,w=y.rows,Z=y.columns;f!==w&&console.warn(`Multiplying ${c} x ${f} and ${w} x ${Z} matrix: dimensions do not match.`);function z(U,Y,G){let J=U.rows,pt=U.columns;if(J===Y&&pt===G)return U;{let Kt=oe.zeros(Y,G);return Kt=Kt.setSubMatrix(U,0,0),Kt}}let H=Math.max(c,w),q=Math.max(f,Z);E=z(E,H,q),y=z(y,H,q);function Dt(U,Y,G,J){if(G<=512||J<=512)return U.mmul(Y);G%2===1&&J%2===1?(U=z(U,G+1,J+1),Y=z(Y,G+1,J+1)):G%2===1?(U=z(U,G+1,J),Y=z(Y,G+1,J)):J%2===1&&(U=z(U,G,J+1),Y=z(Y,G,J+1));let pt=parseInt(U.rows/2,10),Kt=parseInt(U.columns/2,10),yt=U.subMatrix(0,pt-1,0,Kt-1),Qt=Y.subMatrix(0,pt-1,0,Kt-1),ct=U.subMatrix(0,pt-1,Kt,U.columns-1),ht=Y.subMatrix(0,pt-1,Kt,Y.columns-1),rt=U.subMatrix(pt,U.rows-1,0,Kt-1),$t=Y.subMatrix(pt,Y.rows-1,0,Kt-1),Ht=U.subMatrix(pt,U.rows-1,Kt,U.columns-1),ue=Y.subMatrix(pt,Y.rows-1,Kt,Y.columns-1),Ee=Dt(oe.add(yt,Ht),oe.add(Qt,ue),pt,Kt),ie=Dt(oe.add(rt,Ht),Qt,pt,Kt),Pe=Dt(yt,oe.sub(ht,ue),pt,Kt),Be=Dt(Ht,oe.sub($t,Qt),pt,Kt),He=Dt(oe.add(yt,ct),ue,pt,Kt),en=Dt(oe.sub(rt,yt),oe.add(Qt,ht),pt,Kt),un=Dt(oe.sub(ct,Ht),oe.add($t,ue),pt,Kt),mn=oe.add(Ee,Be);mn.sub(He),mn.add(un);let Sn=oe.add(Pe,He),Pn=oe.add(ie,Be),$n=oe.sub(Ee,ie);$n.add(Pe),$n.add(en);let Wn=oe.zeros(2*mn.rows,2*mn.columns);return Wn=Wn.setSubMatrix(mn,0,0),Wn=Wn.setSubMatrix(Sn,mn.rows,0),Wn=Wn.setSubMatrix(Pn,0,mn.columns),Wn=Wn.setSubMatrix($n,mn.rows,mn.columns),Wn.subMatrix(0,G-1,0,J-1)}return Dt(E,y,H,q)}scaleRows(y={}){if(typeof y!="object")throw new TypeError("options must be an object");const{min:E=0,max:c=1}=y;if(!Number.isFinite(E))throw new TypeError("min must be a number");if(!Number.isFinite(c))throw new TypeError("max must be a number");if(E>=c)throw new RangeError("min must be smaller than max");let f=new Ut(this.rows,this.columns);for(let w=0;w<this.rows;w++){const Z=this.getRow(w);Z.length>0&&ut(Z,{min:E,max:c,output:Z}),f.setRow(w,Z)}return f}scaleColumns(y={}){if(typeof y!="object")throw new TypeError("options must be an object");const{min:E=0,max:c=1}=y;if(!Number.isFinite(E))throw new TypeError("min must be a number");if(!Number.isFinite(c))throw new TypeError("max must be a number");if(E>=c)throw new RangeError("min must be smaller than max");let f=new Ut(this.rows,this.columns);for(let w=0;w<this.columns;w++){const Z=this.getColumn(w);Z.length&&ut(Z,{min:E,max:c,output:Z}),f.setColumn(w,Z)}return f}flipRows(){const y=Math.ceil(this.columns/2);for(let E=0;E<this.rows;E++)for(let c=0;c<y;c++){let f=this.get(E,c),w=this.get(E,this.columns-1-c);this.set(E,c,w),this.set(E,this.columns-1-c,f)}return this}flipColumns(){const y=Math.ceil(this.rows/2);for(let E=0;E<this.columns;E++)for(let c=0;c<y;c++){let f=this.get(c,E),w=this.get(this.rows-1-c,E);this.set(c,E,w),this.set(this.rows-1-c,E,f)}return this}kroneckerProduct(y){y=Ut.checkMatrix(y);let E=this.rows,c=this.columns,f=y.rows,w=y.columns,Z=new Ut(E*f,c*w);for(let z=0;z<E;z++)for(let H=0;H<c;H++)for(let q=0;q<f;q++)for(let Dt=0;Dt<w;Dt++)Z.set(f*z+q,w*H+Dt,this.get(z,H)*y.get(q,Dt));return Z}kroneckerSum(y){if(y=Ut.checkMatrix(y),!this.isSquare()||!y.isSquare())throw new Error("Kronecker Sum needs two Square Matrices");let E=this.rows,c=y.rows,f=this.kroneckerProduct(Ut.eye(c,c)),w=Ut.eye(E,E).kroneckerProduct(y);return f.add(w)}transpose(){let y=new Ut(this.columns,this.rows);for(let E=0;E<this.rows;E++)for(let c=0;c<this.columns;c++)y.set(c,E,this.get(E,c));return y}sortRows(y=M){for(let E=0;E<this.rows;E++)this.setRow(E,this.getRow(E).sort(y));return this}sortColumns(y=M){for(let E=0;E<this.columns;E++)this.setColumn(E,this.getColumn(E).sort(y));return this}subMatrix(y,E,c,f){We(this,y,E,c,f);let w=new Ut(E-y+1,f-c+1);for(let Z=y;Z<=E;Z++)for(let z=c;z<=f;z++)w.set(Z-y,z-c,this.get(Z,z));return w}subMatrixRow(y,E,c){if(E===void 0&&(E=0),c===void 0&&(c=this.columns-1),E>c||E<0||E>=this.columns||c<0||c>=this.columns)throw new RangeError("Argument out of range");let f=new Ut(y.length,c-E+1);for(let w=0;w<y.length;w++)for(let Z=E;Z<=c;Z++){if(y[w]<0||y[w]>=this.rows)throw new RangeError(`Row index out of range: ${y[w]}`);f.set(w,Z-E,this.get(y[w],Z))}return f}subMatrixColumn(y,E,c){if(E===void 0&&(E=0),c===void 0&&(c=this.rows-1),E>c||E<0||E>=this.rows||c<0||c>=this.rows)throw new RangeError("Argument out of range");let f=new Ut(c-E+1,y.length);for(let w=0;w<y.length;w++)for(let Z=E;Z<=c;Z++){if(y[w]<0||y[w]>=this.columns)throw new RangeError(`Column index out of range: ${y[w]}`);f.set(Z-E,w,this.get(Z,y[w]))}return f}setSubMatrix(y,E,c){if(y=Ut.checkMatrix(y),y.isEmpty())return this;let f=E+y.rows-1,w=c+y.columns-1;We(this,E,f,c,w);for(let Z=0;Z<y.rows;Z++)for(let z=0;z<y.columns;z++)this.set(E+Z,c+z,y.get(Z,z));return this}selection(y,E){qt(this,y),Ye(this,E);let c=new Ut(y.length,E.length);for(let f=0;f<y.length;f++){let w=y[f];for(let Z=0;Z<E.length;Z++){let z=E[Z];c.set(f,Z,this.get(w,z))}}return c}trace(){let y=Math.min(this.rows,this.columns),E=0;for(let c=0;c<y;c++)E+=this.get(c,c);return E}clone(){return this.constructor.copy(this,new Ut(this.rows,this.columns))}static copy(y,E){for(const[c,f,w]of y.entries())E.set(c,f,w);return E}sum(y){switch(y){case"row":return ne(this);case"column":return Me(this);case void 0:return nn(this);default:throw new Error(`invalid option: ${y}`)}}product(y){switch(y){case"row":return le(this);case"column":return be(this);case void 0:return De(this);default:throw new Error(`invalid option: ${y}`)}}mean(y){const E=this.sum(y);switch(y){case"row":{for(let c=0;c<this.rows;c++)E[c]/=this.columns;return E}case"column":{for(let c=0;c<this.columns;c++)E[c]/=this.rows;return E}case void 0:return E/this.size;default:throw new Error(`invalid option: ${y}`)}}variance(y,E={}){if(typeof y=="object"&&(E=y,y=void 0),typeof E!="object")throw new TypeError("options must be an object");const{unbiased:c=!0,mean:f=this.mean(y)}=E;if(typeof c!="boolean")throw new TypeError("unbiased must be a boolean");switch(y){case"row":{if(!Ct.isAnyArray(f))throw new TypeError("mean must be an array");return Yt(this,c,f)}case"column":{if(!Ct.isAnyArray(f))throw new TypeError("mean must be an array");return re(this,c,f)}case void 0:{if(typeof f!="number")throw new TypeError("mean must be a number");return xt(this,c,f)}default:throw new Error(`invalid option: ${y}`)}}standardDeviation(y,E){typeof y=="object"&&(E=y,y=void 0);const c=this.variance(y,E);if(y===void 0)return Math.sqrt(c);for(let f=0;f<c.length;f++)c[f]=Math.sqrt(c[f]);return c}center(y,E={}){if(typeof y=="object"&&(E=y,y=void 0),typeof E!="object")throw new TypeError("options must be an object");const{center:c=this.mean(y)}=E;switch(y){case"row":{if(!Ct.isAnyArray(c))throw new TypeError("center must be an array");return at(this,c),this}case"column":{if(!Ct.isAnyArray(c))throw new TypeError("center must be an array");return se(this,c),this}case void 0:{if(typeof c!="number")throw new TypeError("center must be a number");return Fe(this,c),this}default:throw new Error(`invalid option: ${y}`)}}scale(y,E={}){if(typeof y=="object"&&(E=y,y=void 0),typeof E!="object")throw new TypeError("options must be an object");let c=E.scale;switch(y){case"row":{if(c===void 0)c=Re(this);else if(!Ct.isAnyArray(c))throw new TypeError("scale must be an array");return ge(this,c),this}case"column":{if(c===void 0)c=Ie(this);else if(!Ct.isAnyArray(c))throw new TypeError("scale must be an array");return Ne(this,c),this}case void 0:{if(c===void 0)c=bt(this);else if(typeof c!="number")throw new TypeError("scale must be a number");return Jt(this,c),this}default:throw new Error(`invalid option: ${y}`)}}toString(y){return Bt(this,y)}[Symbol.iterator](){return this.entries()}*entries(){for(let y=0;y<this.rows;y++)for(let E=0;E<this.columns;E++)yield[y,E,this.get(y,E)]}*values(){for(let y=0;y<this.rows;y++)for(let E=0;E<this.columns;E++)yield this.get(y,E)}}oe.prototype.klass="Matrix",typeof Symbol!="undefined"&&(oe.prototype[Symbol.for("nodejs.util.inspect.custom")]=Nt);function M(Wt,y){return Wt-y}function Q(Wt){return Wt.every(y=>typeof y=="number")}oe.random=oe.rand,oe.randomInt=oe.randInt,oe.diagonal=oe.diag,oe.prototype.diagonal=oe.prototype.diag,oe.identity=oe.eye,oe.prototype.negate=oe.prototype.neg,oe.prototype.tensorProduct=oe.prototype.kroneckerProduct;const te=class Jd extends oe{constructor(y,E){if(super(),I(this,N),P(this,"data"),Jd.isMatrix(y))k(this,N,et).call(this,y.rows,y.columns),Jd.copy(y,this);else if(Number.isInteger(y)&&y>=0)k(this,N,et).call(this,y,E);else if(Ct.isAnyArray(y)){const c=y;if(y=c.length,E=y?c[0].length:0,typeof E!="number")throw new TypeError("Data must be a 2D array with at least one element");this.data=[];for(let f=0;f<y;f++){if(c[f].length!==E)throw new RangeError("Inconsistent array dimensions");if(!Q(c[f]))throw new TypeError("Input data contains non-numeric values");this.data.push(Float64Array.from(c[f]))}this.rows=y,this.columns=E}else throw new TypeError("First argument must be a positive number or an array")}set(y,E,c){return this.data[y][E]=c,this}get(y,E){return this.data[y][E]}removeRow(y){return zt(this,y),this.data.splice(y,1),this.rows-=1,this}addRow(y,E){return E===void 0&&(E=y,y=this.rows),zt(this,y,!0),E=Float64Array.from(pe(this,E)),this.data.splice(y,0,E),this.rows+=1,this}removeColumn(y){Ot(this,y);for(let E=0;E<this.rows;E++){const c=new Float64Array(this.columns-1);for(let f=0;f<y;f++)c[f]=this.data[E][f];for(let f=y+1;f<this.columns;f++)c[f-1]=this.data[E][f];this.data[E]=c}return this.columns-=1,this}addColumn(y,E){typeof E=="undefined"&&(E=y,y=this.columns),Ot(this,y,!0),E=xe(this,E);for(let c=0;c<this.rows;c++){const f=new Float64Array(this.columns+1);let w=0;for(;w<y;w++)f[w]=this.data[c][w];for(f[w++]=E[c];w<this.columns+1;w++)f[w]=this.data[c][w-1];this.data[c]=f}return this.columns+=1,this}};N=new WeakSet,et=function(Wt,y){if(this.data=[],Number.isInteger(y)&&y>=0)for(let E=0;E<Wt;E++)this.data.push(new Float64Array(y));else throw new TypeError("nColumns must be a positive integer");this.rows=Wt,this.columns=y};let Ut=te;It(oe,Ut);const we=class qd extends oe{constructor(y){if(super(),I(this,tt),Ut.isMatrix(y)){if(!y.isSymmetric())throw new TypeError("not symmetric data");x(this,tt,Ut.copy(y,new Ut(y.rows,y.rows)))}else if(Number.isInteger(y)&&y>=0)x(this,tt,new Ut(y,y));else if(x(this,tt,new Ut(y)),!this.isSymmetric())throw new TypeError("not symmetric data")}get size(){return A(this,tt).size}get rows(){return A(this,tt).rows}get columns(){return A(this,tt).columns}get diagonalSize(){return this.rows}static isSymmetricMatrix(y){return Ut.isMatrix(y)&&y.klassType==="SymmetricMatrix"}static zeros(y){return new this(y)}static ones(y){return new this(y).fill(1)}clone(){const y=new qd(this.diagonalSize);for(const[E,c,f]of this.upperRightEntries())y.set(E,c,f);return y}toMatrix(){return new Ut(this)}get(y,E){return A(this,tt).get(y,E)}set(y,E,c){return A(this,tt).set(y,E,c),A(this,tt).set(E,y,c),this}removeCross(y){return A(this,tt).removeRow(y),A(this,tt).removeColumn(y),this}addCross(y,E){E===void 0&&(E=y,y=this.diagonalSize);const c=E.slice();return c.splice(y,1),A(this,tt).addRow(y,c),A(this,tt).addColumn(y,E),this}applyMask(y){if(y.length!==this.diagonalSize)throw new RangeError("Mask size do not match with matrix size");const E=[];for(const[c,f]of y.entries())f||E.push(c);E.reverse();for(const c of E)this.removeCross(c);return this}toCompact(){const{diagonalSize:y}=this,E=new Array(y*(y+1)/2);for(let c=0,f=0,w=0;w<E.length;w++)E[w]=this.get(f,c),++c>=y&&(c=++f);return E}static fromCompact(y){const E=y.length,c=(Math.sqrt(8*E+1)-1)/2;if(!Number.isInteger(c))throw new TypeError(`This array is not a compact representation of a Symmetric Matrix, ${JSON.stringify(y)}`);const f=new qd(c);for(let w=0,Z=0,z=0;z<E;z++)f.set(w,Z,y[z]),++w>=c&&(w=++Z);return f}*upperRightEntries(){for(let y=0,E=0;y<this.diagonalSize;void 0){const c=this.get(y,E);yield[y,E,c],++E>=this.diagonalSize&&(E=++y)}}*upperRightValues(){for(let y=0,E=0;y<this.diagonalSize;void 0)yield this.get(y,E),++E>=this.diagonalSize&&(E=++y)}};tt=new WeakMap;let Ce=we;Ce.prototype.klassType="SymmetricMatrix";class _e extends Ce{static isDistanceMatrix(y){return Ce.isSymmetricMatrix(y)&&y.klassSubType==="DistanceMatrix"}constructor(y){if(super(y),!this.isDistance())throw new TypeError("Provided arguments do no produce a distance matrix")}set(y,E,c){return y===E&&(c=0),super.set(y,E,c)}addCross(y,E){return E===void 0&&(E=y,y=this.diagonalSize),E=E.slice(),E[y]=0,super.addCross(y,E)}toSymmetricMatrix(){return new Ce(this)}clone(){const y=new _e(this.diagonalSize);for(const[E,c,f]of this.upperRightEntries())E!==c&&y.set(E,c,f);return y}toCompact(){const{diagonalSize:y}=this,E=(y-1)*y/2,c=new Array(E);for(let f=1,w=0,Z=0;Z<c.length;Z++)c[Z]=this.get(w,f),++f>=y&&(f=++w+1);return c}static fromCompact(y){const E=y.length;if(E===0)return new this(0);const c=(Math.sqrt(8*E+1)+1)/2;if(!Number.isInteger(c))throw new TypeError(`This array is not a compact representation of a DistanceMatrix, ${JSON.stringify(y)}`);const f=new this(c);for(let w=1,Z=0,z=0;z<E;z++)f.set(w,Z,y[z]),++w>=c&&(w=++Z+1);return f}}_e.prototype.klassSubType="DistanceMatrix";class mt extends oe{constructor(y,E,c){super(),this.matrix=y,this.rows=E,this.columns=c}}class X extends mt{constructor(y,E){Ot(y,E),super(y,y.rows,1),this.column=E}set(y,E,c){return this.matrix.set(y,this.column,c),this}get(y){return this.matrix.get(y,this.column)}}class Pt extends mt{constructor(y,E){Ye(y,E),super(y,y.rows,E.length),this.columnIndices=E}set(y,E,c){return this.matrix.set(y,this.columnIndices[E],c),this}get(y,E){return this.matrix.get(y,this.columnIndices[E])}}class At extends mt{constructor(y){super(y,y.rows,y.columns)}set(y,E,c){return this.matrix.set(y,this.columns-E-1,c),this}get(y,E){return this.matrix.get(y,this.columns-E-1)}}class Rt extends mt{constructor(y){super(y,y.rows,y.columns)}set(y,E,c){return this.matrix.set(this.rows-y-1,E,c),this}get(y,E){return this.matrix.get(this.rows-y-1,E)}}class _t extends mt{constructor(y,E){zt(y,E),super(y,1,y.columns),this.row=E}set(y,E,c){return this.matrix.set(this.row,E,c),this}get(y,E){return this.matrix.get(this.row,E)}}class Vt extends mt{constructor(y,E){qt(y,E),super(y,E.length,y.columns),this.rowIndices=E}set(y,E,c){return this.matrix.set(this.rowIndices[y],E,c),this}get(y,E){return this.matrix.get(this.rowIndices[y],E)}}class ae extends mt{constructor(y,E,c){qt(y,E),Ye(y,c),super(y,E.length,c.length),this.rowIndices=E,this.columnIndices=c}set(y,E,c){return this.matrix.set(this.rowIndices[y],this.columnIndices[E],c),this}get(y,E){return this.matrix.get(this.rowIndices[y],this.columnIndices[E])}}class fe extends mt{constructor(y,E,c,f,w){We(y,E,c,f,w),super(y,c-E+1,w-f+1),this.startRow=E,this.startColumn=f}set(y,E,c){return this.matrix.set(this.startRow+y,this.startColumn+E,c),this}get(y,E){return this.matrix.get(this.startRow+y,this.startColumn+E)}}class me extends mt{constructor(y){super(y,y.columns,y.rows)}set(y,E,c){return this.matrix.set(E,y,c),this}get(y,E){return this.matrix.get(E,y)}}class Ze extends oe{constructor(y,E={}){const{rows:c=1}=E;if(y.length%c!==0)throw new Error("the data length is not divisible by the number of rows");super(),this.rows=c,this.columns=y.length/c,this.data=y}set(y,E,c){let f=this._calculateIndex(y,E);return this.data[f]=c,this}get(y,E){let c=this._calculateIndex(y,E);return this.data[c]}_calculateIndex(y,E){return y*this.columns+E}}class Ge extends oe{constructor(y){super(),this.data=y,this.rows=y.length,this.columns=y[0].length}set(y,E,c){return this.data[y][E]=c,this}get(y,E){return this.data[y][E]}}function Ve(Wt,y){if(Ct.isAnyArray(Wt))return Wt[0]&&Ct.isAnyArray(Wt[0])?new Ge(Wt):new Ze(Wt,y);throw new Error("the argument is not an array")}class rn{constructor(y){y=Ge.checkMatrix(y);let E=y.clone(),c=E.rows,f=E.columns,w=new Float64Array(c),Z=1,z,H,q,Dt,U,Y,G,J,pt;for(z=0;z<c;z++)w[z]=z;for(J=new Float64Array(c),H=0;H<f;H++){for(z=0;z<c;z++)J[z]=E.get(z,H);for(z=0;z<c;z++){for(pt=Math.min(z,H),U=0,q=0;q<pt;q++)U+=E.get(z,q)*J[q];J[z]-=U,E.set(z,H,J[z])}for(Dt=H,z=H+1;z<c;z++)Math.abs(J[z])>Math.abs(J[Dt])&&(Dt=z);if(Dt!==H){for(q=0;q<f;q++)Y=E.get(Dt,q),E.set(Dt,q,E.get(H,q)),E.set(H,q,Y);G=w[Dt],w[Dt]=w[H],w[H]=G,Z=-Z}if(H<c&&E.get(H,H)!==0)for(z=H+1;z<c;z++)E.set(z,H,E.get(z,H)/E.get(H,H))}this.LU=E,this.pivotVector=w,this.pivotSign=Z}isSingular(){let y=this.LU,E=y.columns;for(let c=0;c<E;c++)if(y.get(c,c)===0)return!0;return!1}solve(y){y=Ut.checkMatrix(y);let E=this.LU;if(E.rows!==y.rows)throw new Error("Invalid matrix dimensions");if(this.isSingular())throw new Error("LU matrix is singular");let f=y.columns,w=y.subMatrixRow(this.pivotVector,0,f-1),Z=E.columns,z,H,q;for(q=0;q<Z;q++)for(z=q+1;z<Z;z++)for(H=0;H<f;H++)w.set(z,H,w.get(z,H)-w.get(q,H)*E.get(z,q));for(q=Z-1;q>=0;q--){for(H=0;H<f;H++)w.set(q,H,w.get(q,H)/E.get(q,q));for(z=0;z<q;z++)for(H=0;H<f;H++)w.set(z,H,w.get(z,H)-w.get(q,H)*E.get(z,q))}return w}get determinant(){let y=this.LU;if(!y.isSquare())throw new Error("Matrix must be square");let E=this.pivotSign,c=y.columns;for(let f=0;f<c;f++)E*=y.get(f,f);return E}get lowerTriangularMatrix(){let y=this.LU,E=y.rows,c=y.columns,f=new Ut(E,c);for(let w=0;w<E;w++)for(let Z=0;Z<c;Z++)w>Z?f.set(w,Z,y.get(w,Z)):w===Z?f.set(w,Z,1):f.set(w,Z,0);return f}get upperTriangularMatrix(){let y=this.LU,E=y.rows,c=y.columns,f=new Ut(E,c);for(let w=0;w<E;w++)for(let Z=0;Z<c;Z++)w<=Z?f.set(w,Z,y.get(w,Z)):f.set(w,Z,0);return f}get pivotPermutationVector(){return Array.from(this.pivotVector)}}function wn(Wt,y){let E=0;return Math.abs(Wt)>Math.abs(y)?(E=y/Wt,Math.abs(Wt)*Math.sqrt(1+E*E)):y!==0?(E=Wt/y,Math.abs(y)*Math.sqrt(1+E*E)):0}class on{constructor(y){y=Ge.checkMatrix(y);let E=y.clone(),c=y.rows,f=y.columns,w=new Float64Array(f),Z,z,H,q;for(H=0;H<f;H++){let Dt=0;for(Z=H;Z<c;Z++)Dt=wn(Dt,E.get(Z,H));if(Dt!==0){for(E.get(H,H)<0&&(Dt=-Dt),Z=H;Z<c;Z++)E.set(Z,H,E.get(Z,H)/Dt);for(E.set(H,H,E.get(H,H)+1),z=H+1;z<f;z++){for(q=0,Z=H;Z<c;Z++)q+=E.get(Z,H)*E.get(Z,z);for(q=-q/E.get(H,H),Z=H;Z<c;Z++)E.set(Z,z,E.get(Z,z)+q*E.get(Z,H))}}w[H]=-Dt}this.QR=E,this.Rdiag=w}solve(y){y=Ut.checkMatrix(y);let E=this.QR,c=E.rows;if(y.rows!==c)throw new Error("Matrix row dimensions must agree");if(!this.isFullRank())throw new Error("Matrix is rank deficient");let f=y.columns,w=y.clone(),Z=E.columns,z,H,q,Dt;for(q=0;q<Z;q++)for(H=0;H<f;H++){for(Dt=0,z=q;z<c;z++)Dt+=E.get(z,q)*w.get(z,H);for(Dt=-Dt/E.get(q,q),z=q;z<c;z++)w.set(z,H,w.get(z,H)+Dt*E.get(z,q))}for(q=Z-1;q>=0;q--){for(H=0;H<f;H++)w.set(q,H,w.get(q,H)/this.Rdiag[q]);for(z=0;z<q;z++)for(H=0;H<f;H++)w.set(z,H,w.get(z,H)-w.get(q,H)*E.get(z,q))}return w.subMatrix(0,Z-1,0,f-1)}isFullRank(){let y=this.QR.columns;for(let E=0;E<y;E++)if(this.Rdiag[E]===0)return!1;return!0}get upperTriangularMatrix(){let y=this.QR,E=y.columns,c=new Ut(E,E),f,w;for(f=0;f<E;f++)for(w=0;w<E;w++)f<w?c.set(f,w,y.get(f,w)):f===w?c.set(f,w,this.Rdiag[f]):c.set(f,w,0);return c}get orthogonalMatrix(){let y=this.QR,E=y.rows,c=y.columns,f=new Ut(E,c),w,Z,z,H;for(z=c-1;z>=0;z--){for(w=0;w<E;w++)f.set(w,z,0);for(f.set(z,z,1),Z=z;Z<c;Z++)if(y.get(z,z)!==0){for(H=0,w=z;w<E;w++)H+=y.get(w,z)*f.get(w,Z);for(H=-H/y.get(z,z),w=z;w<E;w++)f.set(w,Z,f.get(w,Z)+H*y.get(w,z))}}return f}}class _n{constructor(y,E={}){if(y=Ge.checkMatrix(y),y.isEmpty())throw new Error("Matrix must be non-empty");let c=y.rows,f=y.columns;const{computeLeftSingularVectors:w=!0,computeRightSingularVectors:Z=!0,autoTranspose:z=!1}=E;let H=!!w,q=!!Z,Dt=!1,U;if(c<f)if(!z)U=y.clone(),console.warn("Computing SVD on a matrix with more columns than rows. Consider enabling autoTranspose");else{U=y.transpose(),c=U.rows,f=U.columns,Dt=!0;let ie=H;H=q,q=ie}else U=y.clone();let Y=Math.min(c,f),G=Math.min(c+1,f),J=new Float64Array(G),pt=new Ut(c,Y),Kt=new Ut(f,f),yt=new Float64Array(f),Qt=new Float64Array(c),ct=new Float64Array(G);for(let ie=0;ie<G;ie++)ct[ie]=ie;let ht=Math.min(c-1,f),rt=Math.max(0,Math.min(f-2,c)),$t=Math.max(ht,rt);for(let ie=0;ie<$t;ie++){if(ie<ht){J[ie]=0;for(let Pe=ie;Pe<c;Pe++)J[ie]=wn(J[ie],U.get(Pe,ie));if(J[ie]!==0){U.get(ie,ie)<0&&(J[ie]=-J[ie]);for(let Pe=ie;Pe<c;Pe++)U.set(Pe,ie,U.get(Pe,ie)/J[ie]);U.set(ie,ie,U.get(ie,ie)+1)}J[ie]=-J[ie]}for(let Pe=ie+1;Pe<f;Pe++){if(ie<ht&&J[ie]!==0){let Be=0;for(let He=ie;He<c;He++)Be+=U.get(He,ie)*U.get(He,Pe);Be=-Be/U.get(ie,ie);for(let He=ie;He<c;He++)U.set(He,Pe,U.get(He,Pe)+Be*U.get(He,ie))}yt[Pe]=U.get(ie,Pe)}if(H&&ie<ht)for(let Pe=ie;Pe<c;Pe++)pt.set(Pe,ie,U.get(Pe,ie));if(ie<rt){yt[ie]=0;for(let Pe=ie+1;Pe<f;Pe++)yt[ie]=wn(yt[ie],yt[Pe]);if(yt[ie]!==0){yt[ie+1]<0&&(yt[ie]=0-yt[ie]);for(let Pe=ie+1;Pe<f;Pe++)yt[Pe]/=yt[ie];yt[ie+1]+=1}if(yt[ie]=-yt[ie],ie+1<c&&yt[ie]!==0){for(let Pe=ie+1;Pe<c;Pe++)Qt[Pe]=0;for(let Pe=ie+1;Pe<c;Pe++)for(let Be=ie+1;Be<f;Be++)Qt[Pe]+=yt[Be]*U.get(Pe,Be);for(let Pe=ie+1;Pe<f;Pe++){let Be=-yt[Pe]/yt[ie+1];for(let He=ie+1;He<c;He++)U.set(He,Pe,U.get(He,Pe)+Be*Qt[He])}}if(q)for(let Pe=ie+1;Pe<f;Pe++)Kt.set(Pe,ie,yt[Pe])}}let Ht=Math.min(f,c+1);if(ht<f&&(J[ht]=U.get(ht,ht)),c<Ht&&(J[Ht-1]=0),rt+1<Ht&&(yt[rt]=U.get(rt,Ht-1)),yt[Ht-1]=0,H){for(let ie=ht;ie<Y;ie++){for(let Pe=0;Pe<c;Pe++)pt.set(Pe,ie,0);pt.set(ie,ie,1)}for(let ie=ht-1;ie>=0;ie--)if(J[ie]!==0){for(let Pe=ie+1;Pe<Y;Pe++){let Be=0;for(let He=ie;He<c;He++)Be+=pt.get(He,ie)*pt.get(He,Pe);Be=-Be/pt.get(ie,ie);for(let He=ie;He<c;He++)pt.set(He,Pe,pt.get(He,Pe)+Be*pt.get(He,ie))}for(let Pe=ie;Pe<c;Pe++)pt.set(Pe,ie,-pt.get(Pe,ie));pt.set(ie,ie,1+pt.get(ie,ie));for(let Pe=0;Pe<ie-1;Pe++)pt.set(Pe,ie,0)}else{for(let Pe=0;Pe<c;Pe++)pt.set(Pe,ie,0);pt.set(ie,ie,1)}}if(q)for(let ie=f-1;ie>=0;ie--){if(ie<rt&&yt[ie]!==0)for(let Pe=ie+1;Pe<f;Pe++){let Be=0;for(let He=ie+1;He<f;He++)Be+=Kt.get(He,ie)*Kt.get(He,Pe);Be=-Be/Kt.get(ie+1,ie);for(let He=ie+1;He<f;He++)Kt.set(He,Pe,Kt.get(He,Pe)+Be*Kt.get(He,ie))}for(let Pe=0;Pe<f;Pe++)Kt.set(Pe,ie,0);Kt.set(ie,ie,1)}let ue=Ht-1,Ee=Number.EPSILON;for(;Ht>0;){let ie,Pe;for(ie=Ht-2;ie>=-1&&ie!==-1;ie--){const Be=Number.MIN_VALUE+Ee*Math.abs(J[ie]+Math.abs(J[ie+1]));if(Math.abs(yt[ie])<=Be||Number.isNaN(yt[ie])){yt[ie]=0;break}}if(ie===Ht-2)Pe=4;else{let Be;for(Be=Ht-1;Be>=ie&&Be!==ie;Be--){let He=(Be!==Ht?Math.abs(yt[Be]):0)+(Be!==ie+1?Math.abs(yt[Be-1]):0);if(Math.abs(J[Be])<=Ee*He){J[Be]=0;break}}Be===ie?Pe=3:Be===Ht-1?Pe=1:(Pe=2,ie=Be)}switch(ie++,Pe){case 1:{let Be=yt[Ht-2];yt[Ht-2]=0;for(let He=Ht-2;He>=ie;He--){let en=wn(J[He],Be),un=J[He]/en,mn=Be/en;if(J[He]=en,He!==ie&&(Be=-mn*yt[He-1],yt[He-1]=un*yt[He-1]),q)for(let Sn=0;Sn<f;Sn++)en=un*Kt.get(Sn,He)+mn*Kt.get(Sn,Ht-1),Kt.set(Sn,Ht-1,-mn*Kt.get(Sn,He)+un*Kt.get(Sn,Ht-1)),Kt.set(Sn,He,en)}break}case 2:{let Be=yt[ie-1];yt[ie-1]=0;for(let He=ie;He<Ht;He++){let en=wn(J[He],Be),un=J[He]/en,mn=Be/en;if(J[He]=en,Be=-mn*yt[He],yt[He]=un*yt[He],H)for(let Sn=0;Sn<c;Sn++)en=un*pt.get(Sn,He)+mn*pt.get(Sn,ie-1),pt.set(Sn,ie-1,-mn*pt.get(Sn,He)+un*pt.get(Sn,ie-1)),pt.set(Sn,He,en)}break}case 3:{const Be=Math.max(Math.abs(J[Ht-1]),Math.abs(J[Ht-2]),Math.abs(yt[Ht-2]),Math.abs(J[ie]),Math.abs(yt[ie])),He=J[Ht-1]/Be,en=J[Ht-2]/Be,un=yt[Ht-2]/Be,mn=J[ie]/Be,Sn=yt[ie]/Be,Pn=((en+He)*(en-He)+un*un)/2,$n=He*un*(He*un);let Wn=0;(Pn!==0||$n!==0)&&(Pn<0?Wn=0-Math.sqrt(Pn*Pn+$n):Wn=Math.sqrt(Pn*Pn+$n),Wn=$n/(Pn+Wn));let Xn=(mn+He)*(mn-He)+Wn,An=mn*Sn;for(let Zn=ie;Zn<Ht-1;Zn++){let qn=wn(Xn,An);qn===0&&(qn=Number.MIN_VALUE);let er=Xn/qn,Cr=An/qn;if(Zn!==ie&&(yt[Zn-1]=qn),Xn=er*J[Zn]+Cr*yt[Zn],yt[Zn]=er*yt[Zn]-Cr*J[Zn],An=Cr*J[Zn+1],J[Zn+1]=er*J[Zn+1],q)for(let Un=0;Un<f;Un++)qn=er*Kt.get(Un,Zn)+Cr*Kt.get(Un,Zn+1),Kt.set(Un,Zn+1,-Cr*Kt.get(Un,Zn)+er*Kt.get(Un,Zn+1)),Kt.set(Un,Zn,qn);if(qn=wn(Xn,An),qn===0&&(qn=Number.MIN_VALUE),er=Xn/qn,Cr=An/qn,J[Zn]=qn,Xn=er*yt[Zn]+Cr*J[Zn+1],J[Zn+1]=-Cr*yt[Zn]+er*J[Zn+1],An=Cr*yt[Zn+1],yt[Zn+1]=er*yt[Zn+1],H&&Zn<c-1)for(let Un=0;Un<c;Un++)qn=er*pt.get(Un,Zn)+Cr*pt.get(Un,Zn+1),pt.set(Un,Zn+1,-Cr*pt.get(Un,Zn)+er*pt.get(Un,Zn+1)),pt.set(Un,Zn,qn)}yt[Ht-2]=Xn;break}case 4:{if(J[ie]<=0&&(J[ie]=J[ie]<0?-J[ie]:0,q))for(let Be=0;Be<=ue;Be++)Kt.set(Be,ie,-Kt.get(Be,ie));for(;ie<ue&&!(J[ie]>=J[ie+1]);){let Be=J[ie];if(J[ie]=J[ie+1],J[ie+1]=Be,q&&ie<f-1)for(let He=0;He<f;He++)Be=Kt.get(He,ie+1),Kt.set(He,ie+1,Kt.get(He,ie)),Kt.set(He,ie,Be);if(H&&ie<c-1)for(let He=0;He<c;He++)Be=pt.get(He,ie+1),pt.set(He,ie+1,pt.get(He,ie)),pt.set(He,ie,Be);ie++}Ht--;break}}}if(Dt){let ie=Kt;Kt=pt,pt=ie}this.m=c,this.n=f,this.s=J,this.U=pt,this.V=Kt}solve(y){let E=y,c=this.threshold,f=this.s.length,w=Ut.zeros(f,f);for(let Y=0;Y<f;Y++)Math.abs(this.s[Y])<=c?w.set(Y,Y,0):w.set(Y,Y,1/this.s[Y]);let Z=this.U,z=this.rightSingularVectors,H=z.mmul(w),q=z.rows,Dt=Z.rows,U=Ut.zeros(q,Dt);for(let Y=0;Y<q;Y++)for(let G=0;G<Dt;G++){let J=0;for(let pt=0;pt<f;pt++)J+=H.get(Y,pt)*Z.get(G,pt);U.set(Y,G,J)}return U.mmul(E)}solveForDiagonal(y){return this.solve(Ut.diag(y))}inverse(){let y=this.V,E=this.threshold,c=y.rows,f=y.columns,w=new Ut(c,this.s.length);for(let Dt=0;Dt<c;Dt++)for(let U=0;U<f;U++)Math.abs(this.s[U])>E&&w.set(Dt,U,y.get(Dt,U)/this.s[U]);let Z=this.U,z=Z.rows,H=Z.columns,q=new Ut(c,z);for(let Dt=0;Dt<c;Dt++)for(let U=0;U<z;U++){let Y=0;for(let G=0;G<H;G++)Y+=w.get(Dt,G)*Z.get(U,G);q.set(Dt,U,Y)}return q}get condition(){return this.s[0]/this.s[Math.min(this.m,this.n)-1]}get norm2(){return this.s[0]}get rank(){let y=Math.max(this.m,this.n)*this.s[0]*Number.EPSILON,E=0,c=this.s;for(let f=0,w=c.length;f<w;f++)c[f]>y&&E++;return E}get diagonal(){return Array.from(this.s)}get threshold(){return Number.EPSILON/2*Math.max(this.m,this.n)*this.s[0]}get leftSingularVectors(){return this.U}get rightSingularVectors(){return this.V}get diagonalMatrix(){return Ut.diag(this.s)}}function Cn(Wt,y=!1){return Wt=Ge.checkMatrix(Wt),y?new _n(Wt).inverse():Ln(Wt,Ut.eye(Wt.rows))}function Ln(Wt,y,E=!1){return Wt=Ge.checkMatrix(Wt),y=Ge.checkMatrix(y),E?new _n(Wt).solve(y):Wt.isSquare()?new rn(Wt).solve(y):new on(Wt).solve(y)}function En(Wt){if(Wt=Ut.checkMatrix(Wt),Wt.isSquare()){if(Wt.columns===0)return 1;let y,E,c,f;if(Wt.columns===2)return y=Wt.get(0,0),E=Wt.get(0,1),c=Wt.get(1,0),f=Wt.get(1,1),y*f-E*c;if(Wt.columns===3){let w,Z,z;return w=new ae(Wt,[1,2],[1,2]),Z=new ae(Wt,[1,2],[0,2]),z=new ae(Wt,[1,2],[0,1]),y=Wt.get(0,0),E=Wt.get(0,1),c=Wt.get(0,2),y*En(w)-E*En(Z)+c*En(z)}else return new rn(Wt).determinant}else throw Error("determinant can only be calculated for a square matrix")}function cr(Wt,y){let E=[];for(let c=0;c<Wt;c++)c!==y&&E.push(c);return E}function Bn(Wt,y,E,c=1e-9,f=1e-9){if(Wt>f)return new Array(y.rows+1).fill(0);{let w=y.addRow(E,[0]);for(let Z=0;Z<w.rows;Z++)Math.abs(w.get(Z,0))<c&&w.set(Z,0,0);return w.to1DArray()}}function br(Wt,y={}){const{thresholdValue:E=1e-9,thresholdError:c=1e-9}=y;Wt=Ut.checkMatrix(Wt);let f=Wt.rows,w=new Ut(f,f);for(let Z=0;Z<f;Z++){let z=Ut.columnVector(Wt.getRow(Z)),H=Wt.subMatrixRow(cr(f,Z)).transpose(),Dt=new _n(H).solve(z),U=Ut.sub(z,H.mmul(Dt)).abs().max();w.setRow(Z,Bn(U,Dt,Z,E,c))}return w}function fr(Wt,y=Number.EPSILON){if(Wt=Ut.checkMatrix(Wt),Wt.isEmpty())return Wt.transpose();let E=new _n(Wt,{autoTranspose:!0}),c=E.leftSingularVectors,f=E.rightSingularVectors,w=E.diagonal;for(let Z=0;Z<w.length;Z++)Math.abs(w[Z])>y?w[Z]=1/w[Z]:w[Z]=0;return f.mmul(Ut.diag(w).mmul(c.transpose()))}function Zr(Wt,y=Wt,E={}){Wt=new Ut(Wt);let c=!1;if(typeof y=="object"&&!Ut.isMatrix(y)&&!Ct.isAnyArray(y)?(E=y,y=Wt,c=!0):y=new Ut(y),Wt.rows!==y.rows)throw new TypeError("Both matrices must have the same number of rows");const{center:f=!0}=E;f&&(Wt=Wt.center("column"),c||(y=y.center("column")));const w=Wt.transpose().mmul(y);for(let Z=0;Z<w.rows;Z++)for(let z=0;z<w.columns;z++)w.set(Z,z,w.get(Z,z)*(1/(Wt.rows-1)));return w}function di(Wt,y=Wt,E={}){Wt=new Ut(Wt);let c=!1;if(typeof y=="object"&&!Ut.isMatrix(y)&&!Ct.isAnyArray(y)?(E=y,y=Wt,c=!0):y=new Ut(y),Wt.rows!==y.rows)throw new TypeError("Both matrices must have the same number of rows");const{center:f=!0,scale:w=!0}=E;f&&(Wt.center("column"),c||y.center("column")),w&&(Wt.scale("column"),c||y.scale("column"));const Z=Wt.standardDeviation("column",{unbiased:!0}),z=c?Z:y.standardDeviation("column",{unbiased:!0}),H=Wt.transpose().mmul(y);for(let q=0;q<H.rows;q++)for(let Dt=0;Dt<H.columns;Dt++)H.set(q,Dt,H.get(q,Dt)*(1/(Z[q]*z[Dt]))*(1/(Wt.rows-1)));return H}class Xr{constructor(y,E={}){const{assumeSymmetric:c=!1}=E;if(y=Ge.checkMatrix(y),!y.isSquare())throw new Error("Matrix is not a square matrix");if(y.isEmpty())throw new Error("Matrix must be non-empty");let f=y.columns,w=new Ut(f,f),Z=new Float64Array(f),z=new Float64Array(f),H=y,q,Dt,U=!1;if(c?U=!0:U=y.isSymmetric(),U){for(q=0;q<f;q++)for(Dt=0;Dt<f;Dt++)w.set(q,Dt,H.get(q,Dt));Mr(f,z,Z,w),gi(f,z,Z,w)}else{let Y=new Ut(f,f),G=new Float64Array(f);for(Dt=0;Dt<f;Dt++)for(q=0;q<f;q++)Y.set(q,Dt,H.get(q,Dt));yi(f,Y,G,w),_i(f,z,Z,w,Y)}this.n=f,this.e=z,this.d=Z,this.V=w}get realEigenvalues(){return Array.from(this.d)}get imaginaryEigenvalues(){return Array.from(this.e)}get eigenvectorMatrix(){return this.V}get diagonalMatrix(){let y=this.n,E=this.e,c=this.d,f=new Ut(y,y),w,Z;for(w=0;w<y;w++){for(Z=0;Z<y;Z++)f.set(w,Z,0);f.set(w,w,c[w]),E[w]>0?f.set(w,w+1,E[w]):E[w]<0&&f.set(w,w-1,E[w])}return f}}function Mr(Wt,y,E,c){let f,w,Z,z,H,q,Dt,U;for(H=0;H<Wt;H++)E[H]=c.get(Wt-1,H);for(z=Wt-1;z>0;z--){for(U=0,Z=0,q=0;q<z;q++)U=U+Math.abs(E[q]);if(U===0)for(y[z]=E[z-1],H=0;H<z;H++)E[H]=c.get(z-1,H),c.set(z,H,0),c.set(H,z,0);else{for(q=0;q<z;q++)E[q]/=U,Z+=E[q]*E[q];for(f=E[z-1],w=Math.sqrt(Z),f>0&&(w=-w),y[z]=U*w,Z=Z-f*w,E[z-1]=f-w,H=0;H<z;H++)y[H]=0;for(H=0;H<z;H++){for(f=E[H],c.set(H,z,f),w=y[H]+c.get(H,H)*f,q=H+1;q<=z-1;q++)w+=c.get(q,H)*E[q],y[q]+=c.get(q,H)*f;y[H]=w}for(f=0,H=0;H<z;H++)y[H]/=Z,f+=y[H]*E[H];for(Dt=f/(Z+Z),H=0;H<z;H++)y[H]-=Dt*E[H];for(H=0;H<z;H++){for(f=E[H],w=y[H],q=H;q<=z-1;q++)c.set(q,H,c.get(q,H)-(f*y[q]+w*E[q]));E[H]=c.get(z-1,H),c.set(z,H,0)}}E[z]=Z}for(z=0;z<Wt-1;z++){if(c.set(Wt-1,z,c.get(z,z)),c.set(z,z,1),Z=E[z+1],Z!==0){for(q=0;q<=z;q++)E[q]=c.get(q,z+1)/Z;for(H=0;H<=z;H++){for(w=0,q=0;q<=z;q++)w+=c.get(q,z+1)*c.get(q,H);for(q=0;q<=z;q++)c.set(q,H,c.get(q,H)-w*E[q])}}for(q=0;q<=z;q++)c.set(q,z+1,0)}for(H=0;H<Wt;H++)E[H]=c.get(Wt-1,H),c.set(Wt-1,H,0);c.set(Wt-1,Wt-1,1),y[0]=0}function gi(Wt,y,E,c){let f,w,Z,z,H,q,Dt,U,Y,G,J,pt,Kt,yt,Qt,ct;for(Z=1;Z<Wt;Z++)y[Z-1]=y[Z];y[Wt-1]=0;let ht=0,rt=0,$t=Number.EPSILON;for(q=0;q<Wt;q++){for(rt=Math.max(rt,Math.abs(E[q])+Math.abs(y[q])),Dt=q;Dt<Wt&&!(Math.abs(y[Dt])<=$t*rt);)Dt++;if(Dt>q)do{for(f=E[q],U=(E[q+1]-f)/(2*y[q]),Y=wn(U,1),U<0&&(Y=-Y),E[q]=y[q]/(U+Y),E[q+1]=y[q]*(U+Y),G=E[q+1],w=f-E[q],Z=q+2;Z<Wt;Z++)E[Z]-=w;for(ht=ht+w,U=E[Dt],J=1,pt=J,Kt=J,yt=y[q+1],Qt=0,ct=0,Z=Dt-1;Z>=q;Z--)for(Kt=pt,pt=J,ct=Qt,f=J*y[Z],w=J*U,Y=wn(U,y[Z]),y[Z+1]=Qt*Y,Qt=y[Z]/Y,J=U/Y,U=J*E[Z]-Qt*f,E[Z+1]=w+Qt*(J*f+Qt*E[Z]),H=0;H<Wt;H++)w=c.get(H,Z+1),c.set(H,Z+1,Qt*c.get(H,Z)+J*w),c.set(H,Z,J*c.get(H,Z)-Qt*w);U=-Qt*ct*Kt*yt*y[q]/G,y[q]=Qt*U,E[q]=J*U}while(Math.abs(y[q])>$t*rt);E[q]=E[q]+ht,y[q]=0}for(Z=0;Z<Wt-1;Z++){for(H=Z,U=E[Z],z=Z+1;z<Wt;z++)E[z]<U&&(H=z,U=E[z]);if(H!==Z)for(E[H]=E[Z],E[Z]=U,z=0;z<Wt;z++)U=c.get(z,Z),c.set(z,Z,c.get(z,H)),c.set(z,H,U)}}function yi(Wt,y,E,c){let f=0,w=Wt-1,Z,z,H,q,Dt,U,Y;for(U=f+1;U<=w-1;U++){for(Y=0,q=U;q<=w;q++)Y=Y+Math.abs(y.get(q,U-1));if(Y!==0){for(H=0,q=w;q>=U;q--)E[q]=y.get(q,U-1)/Y,H+=E[q]*E[q];for(z=Math.sqrt(H),E[U]>0&&(z=-z),H=H-E[U]*z,E[U]=E[U]-z,Dt=U;Dt<Wt;Dt++){for(Z=0,q=w;q>=U;q--)Z+=E[q]*y.get(q,Dt);for(Z=Z/H,q=U;q<=w;q++)y.set(q,Dt,y.get(q,Dt)-Z*E[q])}for(q=0;q<=w;q++){for(Z=0,Dt=w;Dt>=U;Dt--)Z+=E[Dt]*y.get(q,Dt);for(Z=Z/H,Dt=U;Dt<=w;Dt++)y.set(q,Dt,y.get(q,Dt)-Z*E[Dt])}E[U]=Y*E[U],y.set(U,U-1,Y*z)}}for(q=0;q<Wt;q++)for(Dt=0;Dt<Wt;Dt++)c.set(q,Dt,q===Dt?1:0);for(U=w-1;U>=f+1;U--)if(y.get(U,U-1)!==0){for(q=U+1;q<=w;q++)E[q]=y.get(q,U-1);for(Dt=U;Dt<=w;Dt++){for(z=0,q=U;q<=w;q++)z+=E[q]*c.get(q,Dt);for(z=z/E[U]/y.get(U,U-1),q=U;q<=w;q++)c.set(q,Dt,c.get(q,Dt)+z*E[q])}}}function _i(Wt,y,E,c,f){let w=Wt-1,Z=0,z=Wt-1,H=Number.EPSILON,q=0,Dt=0,U=0,Y=0,G=0,J=0,pt=0,Kt=0,yt,Qt,ct,ht,rt,$t,Ht,ue,Ee,ie,Pe,Be,He,en,un;for(yt=0;yt<Wt;yt++)for((yt<Z||yt>z)&&(E[yt]=f.get(yt,yt),y[yt]=0),Qt=Math.max(yt-1,0);Qt<Wt;Qt++)Dt=Dt+Math.abs(f.get(yt,Qt));for(;w>=Z;){for(ht=w;ht>Z&&(J=Math.abs(f.get(ht-1,ht-1))+Math.abs(f.get(ht,ht)),J===0&&(J=Dt),!(Math.abs(f.get(ht,ht-1))<H*J));)ht--;if(ht===w)f.set(w,w,f.get(w,w)+q),E[w]=f.get(w,w),y[w]=0,w--,Kt=0;else if(ht===w-1){if(Ht=f.get(w,w-1)*f.get(w-1,w),U=(f.get(w-1,w-1)-f.get(w,w))/2,Y=U*U+Ht,pt=Math.sqrt(Math.abs(Y)),f.set(w,w,f.get(w,w)+q),f.set(w-1,w-1,f.get(w-1,w-1)+q),ue=f.get(w,w),Y>=0){for(pt=U>=0?U+pt:U-pt,E[w-1]=ue+pt,E[w]=E[w-1],pt!==0&&(E[w]=ue-Ht/pt),y[w-1]=0,y[w]=0,ue=f.get(w,w-1),J=Math.abs(ue)+Math.abs(pt),U=ue/J,Y=pt/J,G=Math.sqrt(U*U+Y*Y),U=U/G,Y=Y/G,Qt=w-1;Qt<Wt;Qt++)pt=f.get(w-1,Qt),f.set(w-1,Qt,Y*pt+U*f.get(w,Qt)),f.set(w,Qt,Y*f.get(w,Qt)-U*pt);for(yt=0;yt<=w;yt++)pt=f.get(yt,w-1),f.set(yt,w-1,Y*pt+U*f.get(yt,w)),f.set(yt,w,Y*f.get(yt,w)-U*pt);for(yt=Z;yt<=z;yt++)pt=c.get(yt,w-1),c.set(yt,w-1,Y*pt+U*c.get(yt,w)),c.set(yt,w,Y*c.get(yt,w)-U*pt)}else E[w-1]=ue+U,E[w]=ue+U,y[w-1]=pt,y[w]=-pt;w=w-2,Kt=0}else{if(ue=f.get(w,w),Ee=0,Ht=0,ht<w&&(Ee=f.get(w-1,w-1),Ht=f.get(w,w-1)*f.get(w-1,w)),Kt===10){for(q+=ue,yt=Z;yt<=w;yt++)f.set(yt,yt,f.get(yt,yt)-ue);J=Math.abs(f.get(w,w-1))+Math.abs(f.get(w-1,w-2)),ue=Ee=.75*J,Ht=-.4375*J*J}if(Kt===30&&(J=(Ee-ue)/2,J=J*J+Ht,J>0)){for(J=Math.sqrt(J),Ee<ue&&(J=-J),J=ue-Ht/((Ee-ue)/2+J),yt=Z;yt<=w;yt++)f.set(yt,yt,f.get(yt,yt)-J);q+=J,ue=Ee=Ht=.964}for(Kt=Kt+1,rt=w-2;rt>=ht&&(pt=f.get(rt,rt),G=ue-pt,J=Ee-pt,U=(G*J-Ht)/f.get(rt+1,rt)+f.get(rt,rt+1),Y=f.get(rt+1,rt+1)-pt-G-J,G=f.get(rt+2,rt+1),J=Math.abs(U)+Math.abs(Y)+Math.abs(G),U=U/J,Y=Y/J,G=G/J,!(rt===ht||Math.abs(f.get(rt,rt-1))*(Math.abs(Y)+Math.abs(G))<H*(Math.abs(U)*(Math.abs(f.get(rt-1,rt-1))+Math.abs(pt)+Math.abs(f.get(rt+1,rt+1))))));)rt--;for(yt=rt+2;yt<=w;yt++)f.set(yt,yt-2,0),yt>rt+2&&f.set(yt,yt-3,0);for(ct=rt;ct<=w-1&&(en=ct!==w-1,ct!==rt&&(U=f.get(ct,ct-1),Y=f.get(ct+1,ct-1),G=en?f.get(ct+2,ct-1):0,ue=Math.abs(U)+Math.abs(Y)+Math.abs(G),ue!==0&&(U=U/ue,Y=Y/ue,G=G/ue)),ue!==0);ct++)if(J=Math.sqrt(U*U+Y*Y+G*G),U<0&&(J=-J),J!==0){for(ct!==rt?f.set(ct,ct-1,-J*ue):ht!==rt&&f.set(ct,ct-1,-f.get(ct,ct-1)),U=U+J,ue=U/J,Ee=Y/J,pt=G/J,Y=Y/U,G=G/U,Qt=ct;Qt<Wt;Qt++)U=f.get(ct,Qt)+Y*f.get(ct+1,Qt),en&&(U=U+G*f.get(ct+2,Qt),f.set(ct+2,Qt,f.get(ct+2,Qt)-U*pt)),f.set(ct,Qt,f.get(ct,Qt)-U*ue),f.set(ct+1,Qt,f.get(ct+1,Qt)-U*Ee);for(yt=0;yt<=Math.min(w,ct+3);yt++)U=ue*f.get(yt,ct)+Ee*f.get(yt,ct+1),en&&(U=U+pt*f.get(yt,ct+2),f.set(yt,ct+2,f.get(yt,ct+2)-U*G)),f.set(yt,ct,f.get(yt,ct)-U),f.set(yt,ct+1,f.get(yt,ct+1)-U*Y);for(yt=Z;yt<=z;yt++)U=ue*c.get(yt,ct)+Ee*c.get(yt,ct+1),en&&(U=U+pt*c.get(yt,ct+2),c.set(yt,ct+2,c.get(yt,ct+2)-U*G)),c.set(yt,ct,c.get(yt,ct)-U),c.set(yt,ct+1,c.get(yt,ct+1)-U*Y)}}}if(Dt!==0){for(w=Wt-1;w>=0;w--)if(U=E[w],Y=y[w],Y===0)for(ht=w,f.set(w,w,1),yt=w-1;yt>=0;yt--){for(Ht=f.get(yt,yt)-U,G=0,Qt=ht;Qt<=w;Qt++)G=G+f.get(yt,Qt)*f.get(Qt,w);if(y[yt]<0)pt=Ht,J=G;else if(ht=yt,y[yt]===0?f.set(yt,w,Ht!==0?-G/Ht:-G/(H*Dt)):(ue=f.get(yt,yt+1),Ee=f.get(yt+1,yt),Y=(E[yt]-U)*(E[yt]-U)+y[yt]*y[yt],$t=(ue*J-pt*G)/Y,f.set(yt,w,$t),f.set(yt+1,w,Math.abs(ue)>Math.abs(pt)?(-G-Ht*$t)/ue:(-J-Ee*$t)/pt)),$t=Math.abs(f.get(yt,w)),H*$t*$t>1)for(Qt=yt;Qt<=w;Qt++)f.set(Qt,w,f.get(Qt,w)/$t)}else if(Y<0)for(ht=w-1,Math.abs(f.get(w,w-1))>Math.abs(f.get(w-1,w))?(f.set(w-1,w-1,Y/f.get(w,w-1)),f.set(w-1,w,-(f.get(w,w)-U)/f.get(w,w-1))):(un=qr(0,-f.get(w-1,w),f.get(w-1,w-1)-U,Y),f.set(w-1,w-1,un[0]),f.set(w-1,w,un[1])),f.set(w,w-1,0),f.set(w,w,1),yt=w-2;yt>=0;yt--){for(ie=0,Pe=0,Qt=ht;Qt<=w;Qt++)ie=ie+f.get(yt,Qt)*f.get(Qt,w-1),Pe=Pe+f.get(yt,Qt)*f.get(Qt,w);if(Ht=f.get(yt,yt)-U,y[yt]<0)pt=Ht,G=ie,J=Pe;else if(ht=yt,y[yt]===0?(un=qr(-ie,-Pe,Ht,Y),f.set(yt,w-1,un[0]),f.set(yt,w,un[1])):(ue=f.get(yt,yt+1),Ee=f.get(yt+1,yt),Be=(E[yt]-U)*(E[yt]-U)+y[yt]*y[yt]-Y*Y,He=(E[yt]-U)*2*Y,Be===0&&He===0&&(Be=H*Dt*(Math.abs(Ht)+Math.abs(Y)+Math.abs(ue)+Math.abs(Ee)+Math.abs(pt))),un=qr(ue*G-pt*ie+Y*Pe,ue*J-pt*Pe-Y*ie,Be,He),f.set(yt,w-1,un[0]),f.set(yt,w,un[1]),Math.abs(ue)>Math.abs(pt)+Math.abs(Y)?(f.set(yt+1,w-1,(-ie-Ht*f.get(yt,w-1)+Y*f.get(yt,w))/ue),f.set(yt+1,w,(-Pe-Ht*f.get(yt,w)-Y*f.get(yt,w-1))/ue)):(un=qr(-G-Ee*f.get(yt,w-1),-J-Ee*f.get(yt,w),pt,Y),f.set(yt+1,w-1,un[0]),f.set(yt+1,w,un[1]))),$t=Math.max(Math.abs(f.get(yt,w-1)),Math.abs(f.get(yt,w))),H*$t*$t>1)for(Qt=yt;Qt<=w;Qt++)f.set(Qt,w-1,f.get(Qt,w-1)/$t),f.set(Qt,w,f.get(Qt,w)/$t)}for(yt=0;yt<Wt;yt++)if(yt<Z||yt>z)for(Qt=yt;Qt<Wt;Qt++)c.set(yt,Qt,f.get(yt,Qt));for(Qt=Wt-1;Qt>=Z;Qt--)for(yt=Z;yt<=z;yt++){for(pt=0,ct=Z;ct<=Math.min(Qt,z);ct++)pt=pt+c.get(yt,ct)*f.get(ct,Qt);c.set(yt,Qt,pt)}}}function qr(Wt,y,E,c){let f,w;return Math.abs(E)>Math.abs(c)?(f=c/E,w=E+f*c,[(Wt+f*y)/w,(y-f*Wt)/w]):(f=E/c,w=c+f*E,[(f*Wt+y)/w,(f*y-Wt)/w])}class Jn{constructor(y){if(y=Ge.checkMatrix(y),!y.isSymmetric())throw new Error("Matrix is not symmetric");let E=y,c=E.rows,f=new Ut(c,c),w=!0,Z,z,H;for(z=0;z<c;z++){let q=0;for(H=0;H<z;H++){let Dt=0;for(Z=0;Z<H;Z++)Dt+=f.get(H,Z)*f.get(z,Z);Dt=(E.get(z,H)-Dt)/f.get(H,H),f.set(z,H,Dt),q=q+Dt*Dt}for(q=E.get(z,z)-q,w&&(w=q>0),f.set(z,z,Math.sqrt(Math.max(q,0))),H=z+1;H<c;H++)f.set(z,H,0)}this.L=f,this.positiveDefinite=w}isPositiveDefinite(){return this.positiveDefinite}solve(y){y=Ge.checkMatrix(y);let E=this.L,c=E.rows;if(y.rows!==c)throw new Error("Matrix dimensions do not match");if(this.isPositiveDefinite()===!1)throw new Error("Matrix is not positive definite");let f=y.columns,w=y.clone(),Z,z,H;for(H=0;H<c;H++)for(z=0;z<f;z++){for(Z=0;Z<H;Z++)w.set(H,z,w.get(H,z)-w.get(Z,z)*E.get(H,Z));w.set(H,z,w.get(H,z)/E.get(H,H))}for(H=c-1;H>=0;H--)for(z=0;z<f;z++){for(Z=H+1;Z<c;Z++)w.set(H,z,w.get(H,z)-w.get(Z,z)*E.get(Z,H));w.set(H,z,w.get(H,z)/E.get(H,H))}return w}get lowerTriangularMatrix(){return this.L}}class sn{constructor(y,E={}){y=Ge.checkMatrix(y);let{Y:c}=E;const{scaleScores:f=!1,maxIterations:w=1e3,terminationCriteria:Z=1e-10}=E;let z;if(c){if(Ct.isAnyArray(c)&&typeof c[0]=="number"?c=Ut.columnVector(c):c=Ge.checkMatrix(c),c.rows!==y.rows)throw new Error("Y should have the same number of rows as X");z=c.getColumnVector(0)}else z=y.getColumnVector(0);let H=1,q,Dt,U,Y;for(let G=0;G<w&&H>Z;G++)U=y.transpose().mmul(z).div(z.transpose().mmul(z).get(0,0)),U=U.div(U.norm()),q=y.mmul(U).div(U.transpose().mmul(U).get(0,0)),G>0&&(H=q.clone().sub(Y).pow(2).sum()),Y=q.clone(),c?(Dt=c.transpose().mmul(q).div(q.transpose().mmul(q).get(0,0)),Dt=Dt.div(Dt.norm()),z=c.mmul(Dt).div(Dt.transpose().mmul(Dt).get(0,0))):z=q;if(c){let G=y.transpose().mmul(q).div(q.transpose().mmul(q).get(0,0));G=G.div(G.norm());let J=y.clone().sub(q.clone().mmul(G.transpose())),pt=z.transpose().mmul(q).div(q.transpose().mmul(q).get(0,0)),Kt=c.clone().sub(q.clone().mulS(pt.get(0,0)).mmul(Dt.transpose()));this.t=q,this.p=G.transpose(),this.w=U.transpose(),this.q=Dt,this.u=z,this.s=q.transpose().mmul(q),this.xResidual=J,this.yResidual=Kt,this.betas=pt}else this.w=U.transpose(),this.s=q.transpose().mmul(q).sqrt(),f?this.t=q.clone().div(this.s.get(0,0)):this.t=q,this.xResidual=y.sub(q.mmul(U.transpose()))}}vt.XA=oe,vt.a_=Jn,vt.yQ=Jn,vt.Hs=_e,vt.Ec=Xr,vt.dx=Xr,vt.LU=rn,vt.Rm=rn,vt.y3=Ut,vt.qK=Pt,vt.pb=X,vt.j=At,vt.sO=Rt,vt.BZ=Vt,vt.EK=_t,vt.Db=ae,vt.Fx=fe,vt.tU=me,vt.Ym=sn,vt.rs=sn,vt.QR=on,vt.TB=on,vt.oH=_n,vt.Sc=_n,vt.BN=Ce,vt.it=Ze,vt.$r=Ge,vt.QM=di,vt.AV=Zr,l=Ut,vt.GH=En,vt.SO=Cn,vt.uZ=br,vt.yU=fr,vt.F1=Ln,vt.re=Ve},19080:function(Tt,vt,d){"use strict";d.d(vt,{F:function(){return g},Z:function(){return _}});var l=d(92310),R=d.n(l);const O=null;function _(P,b,A){return R()({[`${P}-status-success`]:b==="success",[`${P}-status-warning`]:b==="warning",[`${P}-status-error`]:b==="error",[`${P}-status-validating`]:b==="validating",[`${P}-has-feedback`]:A})}const g=(P,b)=>b||P},93891:function(Tt,vt,d){"use strict";var l=d(59301),R=d(36355),O=d(64165);const _=g=>{const{componentName:P}=g,{getPrefixCls:b}=(0,l.useContext)(R.E_),A=b("empty");switch(P){case"Table":case"List":return l.createElement(O.Z,{image:O.Z.PRESENTED_IMAGE_SIMPLE});case"Select":case"TreeSelect":case"Cascader":case"Transfer":case"Mentions":return l.createElement(O.Z,{image:O.Z.PRESENTED_IMAGE_SIMPLE,className:`${A}-small`});default:return l.createElement(O.Z,null)}};vt.Z=_},64165:function(Tt,vt,d){"use strict";d.d(vt,{Z:function(){return Bt}});var l=d(92310),R=d.n(l),O=d(59301),_=d(36355),g=d(9763),P=d(64993),b=d(88088),I=()=>{const[,Xt]=(0,b.Z)(),ot=new P.C(Xt.colorBgBase).toHsl().l<.5?{opacity:.65}:{};return O.createElement("svg",{style:ot,width:"184",height:"152",viewBox:"0 0 184 152",xmlns:"http://www.w3.org/2000/svg"},O.createElement("g",{fill:"none",fillRule:"evenodd"},O.createElement("g",{transform:"translate(24 31.67)"},O.createElement("ellipse",{fillOpacity:".8",fill:"#F5F5F7",cx:"67.797",cy:"106.89",rx:"67.797",ry:"12.668"}),O.createElement("path",{d:"M122.034 69.674L98.109 40.229c-1.148-1.386-2.826-2.225-4.593-2.225h-51.44c-1.766 0-3.444.839-4.592 2.225L13.56 69.674v15.383h108.475V69.674z",fill:"#AEB8C2"}),O.createElement("path",{d:"M101.537 86.214L80.63 61.102c-1.001-1.207-2.507-1.867-4.048-1.867H31.724c-1.54 0-3.047.66-4.048 1.867L6.769 86.214v13.792h94.768V86.214z",fill:"url(#linearGradient-1)",transform:"translate(13.56)"}),O.createElement("path",{d:"M33.83 0h67.933a4 4 0 0 1 4 4v93.344a4 4 0 0 1-4 4H33.83a4 4 0 0 1-4-4V4a4 4 0 0 1 4-4z",fill:"#F5F5F7"}),O.createElement("path",{d:"M42.678 9.953h50.237a2 2 0 0 1 2 2V36.91a2 2 0 0 1-2 2H42.678a2 2 0 0 1-2-2V11.953a2 2 0 0 1 2-2zM42.94 49.767h49.713a2.262 2.262 0 1 1 0 4.524H42.94a2.262 2.262 0 0 1 0-4.524zM42.94 61.53h49.713a2.262 2.262 0 1 1 0 4.525H42.94a2.262 2.262 0 0 1 0-4.525zM121.813 105.032c-.775 3.071-3.497 5.36-6.735 5.36H20.515c-3.238 0-5.96-2.29-6.734-5.36a7.309 7.309 0 0 1-.222-1.79V69.675h26.318c2.907 0 5.25 2.448 5.25 5.42v.04c0 2.971 2.37 5.37 5.277 5.37h34.785c2.907 0 5.277-2.421 5.277-5.393V75.1c0-2.972 2.343-5.426 5.25-5.426h26.318v33.569c0 .617-.077 1.216-.221 1.789z",fill:"#DCE0E6"})),O.createElement("path",{d:"M149.121 33.292l-6.83 2.65a1 1 0 0 1-1.317-1.23l1.937-6.207c-2.589-2.944-4.109-6.534-4.109-10.408C138.802 8.102 148.92 0 161.402 0 173.881 0 184 8.102 184 18.097c0 9.995-10.118 18.097-22.599 18.097-4.528 0-8.744-1.066-12.28-2.902z",fill:"#DCE0E6"}),O.createElement("g",{transform:"translate(149.65 15.383)",fill:"#FFF"},O.createElement("ellipse",{cx:"20.654",cy:"3.167",rx:"2.849",ry:"2.815"}),O.createElement("path",{d:"M5.698 5.63H0L2.898.704zM9.259.704h4.985V5.63H9.259z"}))))},k=()=>{const[,Xt]=(0,b.Z)(),{colorFill:wt,colorFillTertiary:ot,colorFillQuaternary:It,colorBgContainer:zt}=Xt,{borderColor:Ot,shadowColor:pe,contentColor:xe}=(0,O.useMemo)(()=>({borderColor:new P.C(wt).onBackground(zt).toHexShortString(),shadowColor:new P.C(ot).onBackground(zt).toHexShortString(),contentColor:new P.C(It).onBackground(zt).toHexShortString()}),[wt,ot,It,zt]);return O.createElement("svg",{width:"64",height:"41",viewBox:"0 0 64 41",xmlns:"http://www.w3.org/2000/svg"},O.createElement("g",{transform:"translate(0 1)",fill:"none",fillRule:"evenodd"},O.createElement("ellipse",{fill:pe,cx:"32",cy:"33",rx:"32",ry:"7"}),O.createElement("g",{fillRule:"nonzero",stroke:Ot},O.createElement("path",{d:"M55 12.76L44.854 1.258C44.367.474 43.656 0 42.907 0H21.093c-.749 0-1.46.474-1.947 1.257L9 12.761V22h46v-9.24z"}),O.createElement("path",{d:"M41.613 15.931c0-1.605.994-2.93 2.227-2.931H55v18.137C55 33.26 53.68 35 52.05 35h-40.1C10.32 35 9 33.259 9 31.137V13h11.16c1.233 0 2.227 1.323 2.227 2.928v.022c0 1.605 1.005 2.901 2.237 2.901h14.752c1.232 0 2.237-1.308 2.237-2.913v-.007z",fill:xe}))))},N=d(83116),et=d(37613);const tt=Xt=>{const{componentCls:wt,margin:ot,marginXS:It,marginXL:zt,fontSize:Ot,lineHeight:pe}=Xt;return{[wt]:{marginInline:It,fontSize:Ot,lineHeight:pe,textAlign:"center",[`${wt}-image`]:{height:Xt.emptyImgHeight,marginBottom:It,opacity:Xt.opacityImage,img:{height:"100%"},svg:{maxWidth:"100%",height:"100%",margin:"auto"}},[`${wt}-description`]:{color:Xt.colorText},[`${wt}-footer`]:{marginTop:ot},"&-normal":{marginBlock:zt,color:Xt.colorTextDisabled,[`${wt}-description`]:{color:Xt.colorTextDisabled},[`${wt}-image`]:{height:Xt.emptyImgHeightMD}},"&-small":{marginBlock:It,color:Xt.colorTextDisabled,[`${wt}-image`]:{height:Xt.emptyImgHeightSM}}}}};var Ct=(0,N.Z)("Empty",Xt=>{const{componentCls:wt,controlHeightLG:ot}=Xt,It=(0,et.TS)(Xt,{emptyImgCls:`${wt}-img`,emptyImgHeight:ot*2.5,emptyImgHeightMD:ot,emptyImgHeightSM:ot*.875});return[tt(It)]}),ut=function(Xt,wt){var ot={};for(var It in Xt)Object.prototype.hasOwnProperty.call(Xt,It)&&wt.indexOf(It)<0&&(ot[It]=Xt[It]);if(Xt!=null&&typeof Object.getOwnPropertySymbols=="function")for(var zt=0,It=Object.getOwnPropertySymbols(Xt);zt<It.length;zt++)wt.indexOf(It[zt])<0&&Object.prototype.propertyIsEnumerable.call(Xt,It[zt])&&(ot[It[zt]]=Xt[It[zt]]);return ot};const nt=O.createElement(I,null),kt=O.createElement(k,null),Nt=Xt=>{var{className:wt,rootClassName:ot,prefixCls:It,image:zt=nt,description:Ot,children:pe,imageStyle:xe,style:qt}=Xt,Ye=ut(Xt,["className","rootClassName","prefixCls","image","description","children","imageStyle","style"]);const{getPrefixCls:We,direction:Oe,empty:Qe}=O.useContext(_.E_),Mt=We("empty",It),[ne,Me]=Ct(Mt),[nn]=(0,g.Z)("Empty"),le=typeof Ot!="undefined"?Ot:nn==null?void 0:nn.description,be=typeof le=="string"?le:"empty";let De=null;return typeof zt=="string"?De=O.createElement("img",{alt:be,src:zt}):De=zt,ne(O.createElement("div",Object.assign({className:R()(Me,Mt,Qe==null?void 0:Qe.className,{[`${Mt}-normal`]:zt===kt,[`${Mt}-rtl`]:Oe==="rtl"},wt,ot),style:Object.assign(Object.assign({},Qe==null?void 0:Qe.style),qt)},Ye),O.createElement("div",{className:`${Mt}-image`,style:xe},De),le&&O.createElement("div",{className:`${Mt}-description`},le),pe&&O.createElement("div",{className:`${Mt}-footer`},pe)))};Nt.PRESENTED_IMAGE_DEFAULT=nt,Nt.PRESENTED_IMAGE_SIMPLE=kt;var Bt=Nt},78241:function(Tt,vt,d){"use strict";d.d(vt,{default:function(){return E}});var l=d(94480),R=d(92310),O=d.n(R),_=d(77900),g=d(59301),P=d(62892),b=d(32441);function A(c){const[f,w]=g.useState(c);return g.useEffect(()=>{const Z=setTimeout(()=>{w(c)},c.length?0:10);return()=>{clearTimeout(Z)}},[c]),f}var I=d(17313),x=d(29878),k=d(8378),N=d(37613),et=d(83116),Ct=c=>{const{componentCls:f}=c,w=`${f}-show-help`,Z=`${f}-show-help-item`;return{[w]:{transition:`opacity ${c.motionDurationSlow} ${c.motionEaseInOut}`,"&-appear, &-enter":{opacity:0,"&-active":{opacity:1}},"&-leave":{opacity:1,"&-active":{opacity:0}},[Z]:{overflow:"hidden",transition:`height ${c.motionDurationSlow} ${c.motionEaseInOut},
|
|
|
opacity ${c.motionDurationSlow} ${c.motionEaseInOut},
|
|
|
transform ${c.motionDurationSlow} ${c.motionEaseInOut} !important`,[`&${Z}-appear, &${Z}-enter`]:{transform:"translateY(-5px)",opacity:0,"&-active":{transform:"translateY(0)",opacity:1}},[`&${Z}-leave-active`]:{transform:"translateY(-5px)"}}}}};const ut=c=>({legend:{display:"block",width:"100%",marginBottom:c.marginLG,padding:0,color:c.colorTextDescription,fontSize:c.fontSizeLG,lineHeight:"inherit",border:0,borderBottom:`${c.lineWidth}px ${c.lineType} ${c.colorBorder}`},label:{fontSize:c.fontSize},'input[type="search"]':{boxSizing:"border-box"},'input[type="radio"], input[type="checkbox"]':{lineHeight:"normal"},'input[type="file"]':{display:"block"},'input[type="range"]':{display:"block",width:"100%"},"select[multiple], select[size]":{height:"auto"},"input[type='file']:focus,\n input[type='radio']:focus,\n input[type='checkbox']:focus":{outline:0,boxShadow:`0 0 0 ${c.controlOutlineWidth}px ${c.controlOutline}`},output:{display:"block",paddingTop:15,color:c.colorText,fontSize:c.fontSize,lineHeight:c.lineHeight}}),nt=(c,f)=>{const{formItemCls:w}=c;return{[w]:{[`${w}-label > label`]:{height:f},[`${w}-control-input`]:{minHeight:f}}}},kt=c=>{const{componentCls:f}=c;return{[c.componentCls]:Object.assign(Object.assign(Object.assign({},(0,I.Wf)(c)),ut(c)),{[`${f}-text`]:{display:"inline-block",paddingInlineEnd:c.paddingSM},"&-small":Object.assign({},nt(c,c.controlHeightSM)),"&-large":Object.assign({},nt(c,c.controlHeightLG))})}},Nt=c=>{const{formItemCls:f,iconCls:w,componentCls:Z,rootPrefixCls:z,labelRequiredMarkColor:H,labelColor:q,labelFontSize:Dt,labelHeight:U,labelColonMarginInlineStart:Y,labelColonMarginInlineEnd:G,itemMarginBottom:J}=c;return{[f]:Object.assign(Object.assign({},(0,I.Wf)(c)),{marginBottom:J,verticalAlign:"top","&-with-help":{transition:"none"},[`&-hidden,
|
|
|
&-hidden.${z}-row`]:{display:"none"},"&-has-warning":{[`${f}-split`]:{color:c.colorError}},"&-has-error":{[`${f}-split`]:{color:c.colorWarning}},[`${f}-label`]:{flexGrow:0,overflow:"hidden",whiteSpace:"nowrap",textAlign:"end",verticalAlign:"middle","&-left":{textAlign:"start"},"&-wrap":{overflow:"unset",lineHeight:`${c.lineHeight} - 0.25em`,whiteSpace:"unset"},"> label":{position:"relative",display:"inline-flex",alignItems:"center",maxWidth:"100%",height:U,color:q,fontSize:Dt,[`> ${w}`]:{fontSize:c.fontSize,verticalAlign:"top"},[`&${f}-required:not(${f}-required-mark-optional)::before`]:{display:"inline-block",marginInlineEnd:c.marginXXS,color:H,fontSize:c.fontSize,fontFamily:"SimSun, sans-serif",lineHeight:1,content:'"*"',[`${Z}-hide-required-mark &`]:{display:"none"}},[`${f}-optional`]:{display:"inline-block",marginInlineStart:c.marginXXS,color:c.colorTextDescription,[`${Z}-hide-required-mark &`]:{display:"none"}},[`${f}-tooltip`]:{color:c.colorTextDescription,cursor:"help",writingMode:"horizontal-tb",marginInlineStart:c.marginXXS},"&::after":{content:'":"',position:"relative",marginBlock:0,marginInlineStart:Y,marginInlineEnd:G},[`&${f}-no-colon::after`]:{content:'"\\a0"'}}},[`${f}-control`]:{"--ant-display":"flex",flexDirection:"column",flexGrow:1,[`&:first-child:not([class^="'${z}-col-'"]):not([class*="' ${z}-col-'"])`]:{width:"100%"},"&-input":{position:"relative",display:"flex",alignItems:"center",minHeight:c.controlHeight,"&-content":{flex:"auto",maxWidth:"100%"}}},[f]:{"&-explain, &-extra":{clear:"both",color:c.colorTextDescription,fontSize:c.fontSize,lineHeight:c.lineHeight},"&-explain-connected":{width:"100%"},"&-extra":{minHeight:c.controlHeightSM,transition:`color ${c.motionDurationMid} ${c.motionEaseOut}`},"&-explain":{"&-error":{color:c.colorError},"&-warning":{color:c.colorWarning}}},[`&-with-help ${f}-explain`]:{height:"auto",opacity:1},[`${f}-feedback-icon`]:{fontSize:c.fontSize,textAlign:"center",visibility:"visible",animationName:x.kr,animationDuration:c.motionDurationMid,animationTimingFunction:c.motionEaseOutBack,pointerEvents:"none","&-success":{color:c.colorSuccess},"&-error":{color:c.colorError},"&-warning":{color:c.colorWarning},"&-validating":{color:c.colorPrimary}}})}},Bt=c=>{const{componentCls:f,formItemCls:w}=c;return{[`${f}-horizontal`]:{[`${w}-label`]:{flexGrow:0},[`${w}-control`]:{flex:"1 1 0",minWidth:0},[`${w}-label[class$='-24'], ${w}-label[class*='-24 ']`]:{[`& + ${w}-control`]:{minWidth:"unset"}}}}},Xt=c=>{const{componentCls:f,formItemCls:w}=c;return{[`${f}-inline`]:{display:"flex",flexWrap:"wrap",[w]:{flex:"none",marginInlineEnd:c.margin,marginBottom:0,"&-row":{flexWrap:"nowrap"},[`> ${w}-label,
|
|
|
> ${w}-control`]:{display:"inline-block",verticalAlign:"top"},[`> ${w}-label`]:{flex:"none"},[`${f}-text`]:{display:"inline-block"},[`${w}-has-feedback`]:{display:"inline-block"}}}}},wt=c=>({padding:c.verticalLabelPadding,margin:c.verticalLabelMargin,whiteSpace:"initial",textAlign:"start","> label":{margin:0,"&::after":{visibility:"hidden"}}}),ot=c=>{const{componentCls:f,formItemCls:w,rootPrefixCls:Z}=c;return{[`${w} ${w}-label`]:wt(c),[f]:{[w]:{flexWrap:"wrap",[`${w}-label, ${w}-control`]:{[`&:not([class*=" ${Z}-col-xs"])`]:{flex:"0 0 100%",maxWidth:"100%"}}}}}},It=c=>{const{componentCls:f,formItemCls:w,rootPrefixCls:Z}=c;return{[`${f}-vertical`]:{[w]:{"&-row":{flexDirection:"column"},"&-label > label":{height:"auto"},[`${f}-item-control`]:{width:"100%"}}},[`${f}-vertical ${w}-label,
|
|
|
.${Z}-col-24${w}-label,
|
|
|
.${Z}-col-xl-24${w}-label`]:wt(c),[`@media (max-width: ${c.screenXSMax}px)`]:[ot(c),{[f]:{[`.${Z}-col-xs-24${w}-label`]:wt(c)}}],[`@media (max-width: ${c.screenSMMax}px)`]:{[f]:{[`.${Z}-col-sm-24${w}-label`]:wt(c)}},[`@media (max-width: ${c.screenMDMax}px)`]:{[f]:{[`.${Z}-col-md-24${w}-label`]:wt(c)}},[`@media (max-width: ${c.screenLGMax}px)`]:{[f]:{[`.${Z}-col-lg-24${w}-label`]:wt(c)}}}},zt=(c,f)=>(0,N.TS)(c,{formItemCls:`${c.componentCls}-item`,rootPrefixCls:f});var Ot=(0,et.Z)("Form",(c,f)=>{let{rootPrefixCls:w}=f;const Z=zt(c,w);return[kt(Z),Nt(Z),Ct(Z),Bt(Z),Xt(Z),It(Z),(0,k.Z)(Z),x.kr]},c=>({labelRequiredMarkColor:c.colorError,labelColor:c.colorTextHeading,labelFontSize:c.fontSize,labelHeight:c.controlHeight,labelColonMarginInlineStart:c.marginXXS/2,labelColonMarginInlineEnd:c.marginXS,itemMarginBottom:c.marginLG,verticalLabelPadding:`0 0 ${c.paddingXS}px`,verticalLabelMargin:0}),{order:-1e3});const pe=[];function xe(c,f,w){let Z=arguments.length>3&&arguments[3]!==void 0?arguments[3]:0;return{key:typeof c=="string"?c:`${f}-${Z}`,error:c,errorStatus:w}}var Ye=c=>{let{help:f,helpStatus:w,errors:Z=pe,warnings:z=pe,className:H,fieldId:q,onVisibleChanged:Dt}=c;const{prefixCls:U}=g.useContext(b.Rk),Y=`${U}-item-explain`,[,G]=Ot(U),J=(0,g.useMemo)(()=>(0,P.Z)(U),[U]),pt=A(Z),Kt=A(z),yt=g.useMemo(()=>f!=null?[xe(f,"help",w)]:[].concat((0,l.Z)(pt.map((ct,ht)=>xe(ct,"error","error",ht))),(0,l.Z)(Kt.map((ct,ht)=>xe(ct,"warning","warning",ht)))),[f,w,pt,Kt]),Qt={};return q&&(Qt.id=`${q}_help`),g.createElement(_.default,{motionDeadline:J.motionDeadline,motionName:`${U}-show-help`,visible:!!yt.length,onVisibleChanged:Dt},ct=>{const{className:ht,style:rt}=ct;return g.createElement("div",Object.assign({},Qt,{className:O()(Y,ht,H,G),style:rt,role:"alert"}),g.createElement(_.CSSMotionList,Object.assign({keys:yt},(0,P.Z)(U),{motionName:`${U}-show-help-item`,component:!1}),$t=>{const{key:Ht,error:ue,errorStatus:Ee,className:ie,style:Pe}=$t;return g.createElement("div",{key:Ht,className:O()(ie,{[`${Y}-${Ee}`]:Ee}),style:Pe},ue)}))})},We=d(95013),Oe=d(36355),Qe=d(1684),Mt=d(52946),ne=d(19716),Me=d(16722);const nn=["parentNode"],le="form_item";function be(c){return c===void 0||c===!1?[]:Array.isArray(c)?c:[c]}function De(c,f){if(!c.length)return;const w=c.join("_");return f?`${f}_${w}`:nn.includes(w)?`${le}_${w}`:w}function Yt(c,f,w,Z,z,H){let q=Z;return H!==void 0?q=H:w.validating?q="validating":c.length?q="error":f.length?q="warning":(w.touched||z&&w.validated)&&(q="success"),q}function re(c){return be(c).join("_")}function xt(c){const[f]=(0,We.useForm)(),w=g.useRef({}),Z=g.useMemo(()=>c!=null?c:Object.assign(Object.assign({},f),{__INTERNAL__:{itemRef:z=>H=>{const q=re(z);H?w.current[q]=H:delete w.current[q]}},scrollToField:function(z){let H=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const q=be(z),Dt=De(q,Z.__INTERNAL__.name),U=Dt?document.getElementById(Dt):null;U&&(0,Me.Z)(U,Object.assign({scrollMode:"if-needed",block:"nearest"},H))},getFieldInstance:z=>{const H=re(z);return w.current[H]}}),[c,f]);return[Z]}var at=d(28726),se=function(c,f){var w={};for(var Z in c)Object.prototype.hasOwnProperty.call(c,Z)&&f.indexOf(Z)<0&&(w[Z]=c[Z]);if(c!=null&&typeof Object.getOwnPropertySymbols=="function")for(var z=0,Z=Object.getOwnPropertySymbols(c);z<Z.length;z++)f.indexOf(Z[z])<0&&Object.prototype.propertyIsEnumerable.call(c,Z[z])&&(w[Z[z]]=c[Z[z]]);return w};const Fe=(c,f)=>{const w=g.useContext(Qe.Z),{getPrefixCls:Z,direction:z,form:H}=g.useContext(Oe.E_),{prefixCls:q,className:Dt,rootClassName:U,size:Y,disabled:G=w,form:J,colon:pt,labelAlign:Kt,labelWrap:yt,labelCol:Qt,wrapperCol:ct,hideRequiredMark:ht,layout:rt="horizontal",scrollToFirstError:$t,requiredMark:Ht,onFinishFailed:ue,name:Ee,style:ie,feedbackIcons:Pe}=c,Be=se(c,["prefixCls","className","rootClassName","size","disabled","form","colon","labelAlign","labelWrap","labelCol","wrapperCol","hideRequiredMark","layout","scrollToFirstError","requiredMark","onFinishFailed","name","style","feedbackIcons"]),He=(0,ne.Z)(Y),en=g.useContext(at.Z),un=(0,g.useMemo)(()=>Ht!==void 0?Ht:H&&H.requiredMark!==void 0?H.requiredMark:!ht,[ht,Ht,H]),mn=pt!=null?pt:H==null?void 0:H.colon,Sn=Z("form",q),[Pn,$n]=Ot(Sn),Wn=O()(Sn,`${Sn}-${rt}`,{[`${Sn}-hide-required-mark`]:un===!1,[`${Sn}-rtl`]:z==="rtl",[`${Sn}-${He}`]:He},$n,H==null?void 0:H.className,Dt,U),[Xn]=xt(J),{__INTERNAL__:An}=Xn;An.name=Ee;const Zn=(0,g.useMemo)(()=>({name:Ee,labelAlign:Kt,labelCol:Qt,labelWrap:yt,wrapperCol:ct,vertical:rt==="vertical",colon:mn,requiredMark:un,itemRef:An.itemRef,form:Xn,feedbackIcons:Pe}),[Ee,Kt,Qt,ct,rt,mn,un,Xn,Pe]);g.useImperativeHandle(f,()=>Xn);const qn=(Cr,Un)=>{if(Cr){let ar={block:"nearest"};typeof Cr=="object"&&(ar=Cr),Xn.scrollToField(Un,ar)}},er=Cr=>{if(ue==null||ue(Cr),Cr.errorFields.length){const Un=Cr.errorFields[0].name;if($t!==void 0){qn($t,Un);return}H&&H.scrollToFirstError!==void 0&&qn(H.scrollToFirstError,Un)}};return Pn(g.createElement(Qe.n,{disabled:G},g.createElement(Mt.q,{size:He},g.createElement(b.RV,Object.assign({},{validateMessages:en}),g.createElement(b.q3.Provider,{value:Zn},g.createElement(We.default,Object.assign({id:Ee},Be,{name:Ee,onFinishFailed:er,form:Xn,style:Object.assign(Object.assign({},H==null?void 0:H.style),ie),className:Wn})))))))};var ge=g.forwardRef(Fe),Ie=d(41799),Ne=d(8654),bt=d(92343),Jt=d(11592);function oe(c){if(typeof c=="function")return c;const f=(0,Jt.Z)(c);return f.length<=1?f[0]:f}const M=()=>{const{status:c,errors:f=[],warnings:w=[]}=(0,g.useContext)(b.aM);return{status:c,errors:f,warnings:w}};M.Context=b.aM;var Q=M,te=d(16089);function Ut(c){const[f,w]=g.useState(c),Z=(0,g.useRef)(null),z=(0,g.useRef)([]),H=(0,g.useRef)(!1);g.useEffect(()=>(H.current=!1,()=>{H.current=!0,te.Z.cancel(Z.current),Z.current=null}),[]);function q(Dt){H.current||(Z.current===null&&(z.current=[],Z.current=(0,te.Z)(()=>{Z.current=null,w(U=>{let Y=U;return z.current.forEach(G=>{Y=G(Y)}),Y})})),z.current.push(Dt))}return[f,q]}function we(){const{itemRef:c}=g.useContext(b.q3),f=g.useRef({});function w(Z,z){const H=z&&typeof z=="object"&&z.ref,q=Z.join("_");return(f.current.name!==q||f.current.originRef!==H)&&(f.current.name=q,f.current.originRef=H,f.current.ref=(0,Ne.sQ)(c(Z),H)),f.current.ref}return w}var Ce=d(29194),_e=d(34280),mt=d(2738),X=d(27382),Pt=d(37028);const At=c=>{const{formItemCls:f}=c;return{"@media screen and (-ms-high-contrast: active), (-ms-high-contrast: none)":{[`${f}-control`]:{display:"flex"}}}};var Rt=(0,et.b)(["Form","item-item"],(c,f)=>{let{rootPrefixCls:w}=f;const Z=zt(c,w);return[At(Z)]}),Vt=c=>{const{prefixCls:f,status:w,wrapperCol:Z,children:z,errors:H,warnings:q,_internalItemRender:Dt,extra:U,help:Y,fieldId:G,marginBottom:J,onErrorVisibleChanged:pt}=c,Kt=`${f}-item`,yt=g.useContext(b.q3),Qt=Z||yt.wrapperCol||{},ct=O()(`${Kt}-control`,Qt.className),ht=g.useMemo(()=>Object.assign({},yt),[yt]);delete ht.labelCol,delete ht.wrapperCol;const rt=g.createElement("div",{className:`${Kt}-control-input`},g.createElement("div",{className:`${Kt}-control-input-content`},z)),$t=g.useMemo(()=>({prefixCls:f,status:w}),[f,w]),Ht=J!==null||H.length||q.length?g.createElement("div",{style:{display:"flex",flexWrap:"nowrap"}},g.createElement(b.Rk.Provider,{value:$t},g.createElement(Ye,{fieldId:G,errors:H,warnings:q,help:Y,helpStatus:w,className:`${Kt}-explain-connected`,onVisibleChanged:pt})),!!J&&g.createElement("div",{style:{width:0,height:J}})):null,ue={};G&&(ue.id=`${G}_extra`);const Ee=U?g.createElement("div",Object.assign({},ue,{className:`${Kt}-extra`}),U):null,ie=Dt&&Dt.mark==="pro_table_render"&&Dt.render?Dt.render(c,{input:rt,errorList:Ht,extra:Ee}):g.createElement(g.Fragment,null,rt,Ht,Ee);return g.createElement(b.q3.Provider,{value:ht},g.createElement(Pt.Z,Object.assign({},Qt,{className:ct}),ie),g.createElement(Rt,{prefixCls:f}))},ae=d(61485),fe=d(31724),me=d(9763),Ze=d(6848),Ge=function(c,f){var w={};for(var Z in c)Object.prototype.hasOwnProperty.call(c,Z)&&f.indexOf(Z)<0&&(w[Z]=c[Z]);if(c!=null&&typeof Object.getOwnPropertySymbols=="function")for(var z=0,Z=Object.getOwnPropertySymbols(c);z<Z.length;z++)f.indexOf(Z[z])<0&&Object.prototype.propertyIsEnumerable.call(c,Z[z])&&(w[Z[z]]=c[Z[z]]);return w};function Ve(c){return c?typeof c=="object"&&!g.isValidElement(c)?c:{title:c}:null}var wn=c=>{let{prefixCls:f,label:w,htmlFor:Z,labelCol:z,labelAlign:H,colon:q,required:Dt,requiredMark:U,tooltip:Y}=c;var G;const[J]=(0,me.Z)("Form"),{vertical:pt,labelAlign:Kt,labelCol:yt,labelWrap:Qt,colon:ct}=g.useContext(b.q3);if(!w)return null;const ht=z||yt||{},rt=H||Kt,$t=`${f}-item-label`,Ht=O()($t,rt==="left"&&`${$t}-left`,ht.className,{[`${$t}-wrap`]:!!Qt});let ue=w;const Ee=q===!0||ct!==!1&&q!==!1;Ee&&!pt&&typeof w=="string"&&w.trim()!==""&&(ue=w.replace(/[:|:]\s*$/,""));const Pe=Ve(Y);if(Pe){const{icon:un=g.createElement(ae.Z,null)}=Pe,mn=Ge(Pe,["icon"]),Sn=g.createElement(Ze.Z,Object.assign({},mn),g.cloneElement(un,{className:`${f}-item-tooltip`,title:""}));ue=g.createElement(g.Fragment,null,ue,Sn)}const Be=U==="optional",He=typeof U=="function";He?ue=U(ue,{required:!!Dt}):Be&&!Dt&&(ue=g.createElement(g.Fragment,null,ue,g.createElement("span",{className:`${f}-item-optional`,title:""},(J==null?void 0:J.optional)||((G=fe.Z.Form)===null||G===void 0?void 0:G.optional))));const en=O()({[`${f}-item-required`]:Dt,[`${f}-item-required-mark-optional`]:Be||He,[`${f}-item-no-colon`]:!Ee});return g.createElement(Pt.Z,Object.assign({},ht,{className:Ht}),g.createElement("label",{htmlFor:Z,className:en,title:typeof w=="string"?w:""},ue))},on=d(29679),_n=d(19248),Cn=d(96512),Ln=d(58617);const En={success:on.Z,warning:Cn.Z,error:_n.Z,validating:Ln.Z};function cr(c){let{children:f,errors:w,warnings:Z,hasFeedback:z,validateStatus:H,prefixCls:q,meta:Dt,noStyle:U}=c;const Y=`${q}-item`,{feedbackIcons:G}=g.useContext(b.q3),J=Yt(w,Z,Dt,null,!!z,H),{isFormItemInput:pt,status:Kt}=g.useContext(b.aM),yt=g.useMemo(()=>{var Qt;let ct;if(z){const $t=z!==!0&&z.icons||G,Ht=J&&((Qt=$t==null?void 0:$t({status:J,errors:w,warnings:Z}))===null||Qt===void 0?void 0:Qt[J]),ue=J&&En[J];ct=Ht!==!1&&ue?g.createElement("span",{className:O()(`${Y}-feedback-icon`,`${Y}-feedback-icon-${J}`)},Ht||g.createElement(ue,null)):null}let ht=!0,rt=J||"";return U&&(ht=pt,rt=(J!=null?J:Kt)||""),{status:rt,errors:w,warnings:Z,hasFeedback:!!z,feedbackIcon:ct,isFormItemInput:ht}},[J,z,U,pt,Kt]);return g.createElement(b.aM.Provider,{value:yt},f)}var Bn=function(c,f){var w={};for(var Z in c)Object.prototype.hasOwnProperty.call(c,Z)&&f.indexOf(Z)<0&&(w[Z]=c[Z]);if(c!=null&&typeof Object.getOwnPropertySymbols=="function")for(var z=0,Z=Object.getOwnPropertySymbols(c);z<Z.length;z++)f.indexOf(Z[z])<0&&Object.prototype.propertyIsEnumerable.call(c,Z[z])&&(w[Z[z]]=c[Z[z]]);return w};function br(c){const{prefixCls:f,className:w,rootClassName:Z,style:z,help:H,errors:q,warnings:Dt,validateStatus:U,meta:Y,hasFeedback:G,hidden:J,children:pt,fieldId:Kt,required:yt,isRequired:Qt,onSubItemMetaChange:ct}=c,ht=Bn(c,["prefixCls","className","rootClassName","style","help","errors","warnings","validateStatus","meta","hasFeedback","hidden","children","fieldId","required","isRequired","onSubItemMetaChange"]),rt=`${f}-item`,{requiredMark:$t}=g.useContext(b.q3),Ht=g.useRef(null),ue=A(q),Ee=A(Dt),ie=H!=null,Pe=!!(ie||q.length||Dt.length),Be=!!Ht.current&&(0,Ce.Z)(Ht.current),[He,en]=g.useState(null);(0,_e.Z)(()=>{if(Pe&&Ht.current){const $n=getComputedStyle(Ht.current);en(parseInt($n.marginBottom,10))}},[Pe,Be]);const un=$n=>{$n||en(null)},Sn=function(){let $n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1;const Wn=$n?ue:Y.errors,Xn=$n?Ee:Y.warnings;return Yt(Wn,Xn,Y,"",!!G,U)}(),Pn=O()(rt,w,Z,{[`${rt}-with-help`]:ie||ue.length||Ee.length,[`${rt}-has-feedback`]:Sn&&G,[`${rt}-has-success`]:Sn==="success",[`${rt}-has-warning`]:Sn==="warning",[`${rt}-has-error`]:Sn==="error",[`${rt}-is-validating`]:Sn==="validating",[`${rt}-hidden`]:J});return g.createElement("div",{className:Pn,style:z,ref:Ht},g.createElement(X.Z,Object.assign({className:`${rt}-row`},(0,mt.Z)(ht,["_internalItemRender","colon","dependencies","extra","fieldKey","getValueFromEvent","getValueProps","htmlFor","id","initialValue","isListField","label","labelAlign","labelCol","labelWrap","messageVariables","name","normalize","noStyle","preserve","requiredMark","rules","shouldUpdate","trigger","tooltip","validateFirst","validateTrigger","valuePropName","wrapperCol","validateDebounce"])),g.createElement(wn,Object.assign({htmlFor:Kt},c,{requiredMark:$t,required:yt!=null?yt:Qt,prefixCls:f})),g.createElement(Vt,Object.assign({},c,Y,{errors:ue,warnings:Ee,prefixCls:f,status:Sn,help:H,marginBottom:He,onErrorVisibleChanged:un}),g.createElement(b.qI.Provider,{value:ct},g.createElement(cr,{prefixCls:f,meta:Y,errors:Y.errors,warnings:Y.warnings,hasFeedback:G,validateStatus:Sn},pt)))),!!He&&g.createElement("div",{className:`${rt}-margin-offset`,style:{marginBottom:-He}}))}const fr="__SPLIT__",Zr=null,di=g.memo(c=>{let{children:f}=c;return f},(c,f)=>c.value===f.value&&c.update===f.update&&c.childProps.length===f.childProps.length&&c.childProps.every((w,Z)=>w===f.childProps[Z]));function Xr(c){return c!=null}function Mr(){return{errors:[],warnings:[],touched:!1,validating:!1,name:[],validated:!1}}function gi(c){const{name:f,noStyle:w,className:Z,dependencies:z,prefixCls:H,shouldUpdate:q,rules:Dt,children:U,required:Y,label:G,messageVariables:J,trigger:pt="onChange",validateTrigger:Kt,hidden:yt,help:Qt}=c,{getPrefixCls:ct}=g.useContext(Oe.E_),{name:ht}=g.useContext(b.q3),rt=oe(U),$t=typeof rt=="function",Ht=g.useContext(b.qI),{validateTrigger:ue}=g.useContext(We.FieldContext),Ee=Kt!==void 0?Kt:ue,ie=Xr(f),Pe=ct("form",H),[Be,He]=Ot(Pe),en=g.useContext(We.ListContext),un=g.useRef(),[mn,Sn]=Ut({}),[Pn,$n]=(0,Ie.Z)(()=>Mr()),Wn=Un=>{const ar=en==null?void 0:en.getKey(Un.name);if($n(Un.destroy?Mr():Un,!0),w&&Qt!==!1&&Ht){let ii=Un.name;if(Un.destroy)ii=un.current||ii;else if(ar!==void 0){const[Or,Lr]=ar;ii=[Or].concat((0,l.Z)(Lr)),un.current=ii}Ht(Un,ii)}},Xn=(Un,ar)=>{Sn(ii=>{const Or=Object.assign({},ii),fi=[].concat((0,l.Z)(Un.name.slice(0,-1)),(0,l.Z)(ar)).join(fr);return Un.destroy?delete Or[fi]:Or[fi]=Un,Or})},[An,Zn]=g.useMemo(()=>{const Un=(0,l.Z)(Pn.errors),ar=(0,l.Z)(Pn.warnings);return Object.values(mn).forEach(ii=>{Un.push.apply(Un,(0,l.Z)(ii.errors||[])),ar.push.apply(ar,(0,l.Z)(ii.warnings||[]))}),[Un,ar]},[mn,Pn.errors,Pn.warnings]),qn=we();function er(Un,ar,ii){return w&&!yt?g.createElement(cr,{prefixCls:Pe,hasFeedback:c.hasFeedback,validateStatus:c.validateStatus,meta:Pn,errors:An,warnings:Zn,noStyle:!0},Un):g.createElement(br,Object.assign({key:"row"},c,{className:O()(Z,He),prefixCls:Pe,fieldId:ar,isRequired:ii,errors:An,warnings:Zn,meta:Pn,onSubItemMetaChange:Xn}),Un)}if(!ie&&!$t&&!z)return Be(er(rt));let Cr={};return typeof G=="string"?Cr.label=G:f&&(Cr.label=String(f)),J&&(Cr=Object.assign(Object.assign({},Cr),J)),Be(g.createElement(We.Field,Object.assign({},c,{messageVariables:Cr,trigger:pt,validateTrigger:Ee,onMetaChange:Wn}),(Un,ar,ii)=>{const Or=be(f).length&&ar?ar.name:[],Lr=De(Or,ht),fi=Y!==void 0?Y:!!(Dt&&Dt.some(mr=>{if(mr&&typeof mr=="object"&&mr.required&&!mr.warningOnly)return!0;if(typeof mr=="function"){const si=mr(ii);return si&&si.required&&!si.warningOnly}return!1})),zr=Object.assign({},Un);let Er=null;if(Array.isArray(rt)&&ie)Er=rt;else if(!($t&&(!(q||z)||ie))){if(!(z&&!$t&&!ie))if((0,bt.l$)(rt)){const mr=Object.assign(Object.assign({},rt.props),zr);if(mr.id||(mr.id=Lr),Qt||An.length>0||Zn.length>0||c.extra){const Mi=[];(Qt||An.length>0)&&Mi.push(`${Lr}_help`),c.extra&&Mi.push(`${Lr}_extra`),mr["aria-describedby"]=Mi.join(" ")}An.length>0&&(mr["aria-invalid"]="true"),fi&&(mr["aria-required"]="true"),(0,Ne.Yr)(rt)&&(mr.ref=qn(Or,rt)),new Set([].concat((0,l.Z)(be(pt)),(0,l.Z)(be(Ee)))).forEach(Mi=>{mr[Mi]=function(){for(var pi,Wi,Ji,Hn,ra,Tr=arguments.length,hr=new Array(Tr),$r=0;$r<Tr;$r++)hr[$r]=arguments[$r];(Ji=zr[Mi])===null||Ji===void 0||(pi=Ji).call.apply(pi,[zr].concat(hr)),(ra=(Hn=rt.props)[Mi])===null||ra===void 0||(Wi=ra).call.apply(Wi,[Hn].concat(hr))}});const Si=[mr["aria-required"],mr["aria-invalid"],mr["aria-describedby"]];Er=g.createElement(di,{value:zr[c.valuePropName||"value"],update:rt,childProps:Si},(0,bt.Tm)(rt,mr))}else $t&&(q||z)&&!ie?Er=rt(ii):Er=rt}return er(Er,Lr,fi)}))}const yi=gi;yi.useStatus=Q;var _i=yi,qr=function(c,f){var w={};for(var Z in c)Object.prototype.hasOwnProperty.call(c,Z)&&f.indexOf(Z)<0&&(w[Z]=c[Z]);if(c!=null&&typeof Object.getOwnPropertySymbols=="function")for(var z=0,Z=Object.getOwnPropertySymbols(c);z<Z.length;z++)f.indexOf(Z[z])<0&&Object.prototype.propertyIsEnumerable.call(c,Z[z])&&(w[Z[z]]=c[Z[z]]);return w},sn=c=>{var{prefixCls:f,children:w}=c,Z=qr(c,["prefixCls","children"]);const{getPrefixCls:z}=g.useContext(Oe.E_),H=z("form",f),q=g.useMemo(()=>({prefixCls:H,status:"error"}),[H]);return g.createElement(We.List,Object.assign({},Z),(Dt,U,Y)=>g.createElement(b.Rk.Provider,{value:q},w(Dt.map(G=>Object.assign(Object.assign({},G),{fieldKey:G.key})),U,{errors:Y.errors,warnings:Y.warnings})))};function Wt(){const{form:c}=(0,g.useContext)(b.q3);return c}const y=ge;y.Item=_i,y.List=sn,y.ErrorList=Ye,y.useForm=xt,y.useFormInstance=Wt,y.useWatch=We.useWatch,y.Provider=b.RV,y.create=()=>{};var E=y},9432:function(Tt,vt,d){"use strict";d.d(vt,{Z:function(){return Nt},n:function(){return nt}});var l=d(19248),R=d(92310),O=d.n(R),_=d(93681),g=d(8654),P=d(59301),b=d(19080),A=d(36355),I=d(1684),x=d(19716),k=d(32441),N=d(33234),et=d(59412),tt=d(9937);function Ct(Bt){return!!(Bt.prefix||Bt.suffix||Bt.allowClear)}var ut=function(Bt,Xt){var wt={};for(var ot in Bt)Object.prototype.hasOwnProperty.call(Bt,ot)&&Xt.indexOf(ot)<0&&(wt[ot]=Bt[ot]);if(Bt!=null&&typeof Object.getOwnPropertySymbols=="function")for(var It=0,ot=Object.getOwnPropertySymbols(Bt);It<ot.length;It++)Xt.indexOf(ot[It])<0&&Object.prototype.propertyIsEnumerable.call(Bt,ot[It])&&(wt[ot[It]]=Bt[ot[It]]);return wt};function nt(Bt,Xt){if(!Bt)return;Bt.focus(Xt);const{cursor:wt}=Xt||{};if(wt){const ot=Bt.value.length;switch(wt){case"start":Bt.setSelectionRange(0,0);break;case"end":Bt.setSelectionRange(ot,ot);break;default:Bt.setSelectionRange(0,ot);break}}}var Nt=(0,P.forwardRef)((Bt,Xt)=>{var wt;const{prefixCls:ot,bordered:It=!0,status:zt,size:Ot,disabled:pe,onBlur:xe,onFocus:qt,suffix:Ye,allowClear:We,addonAfter:Oe,addonBefore:Qe,className:Mt,style:ne,styles:Me,rootClassName:nn,onChange:le,classNames:be}=Bt,De=ut(Bt,["prefixCls","bordered","status","size","disabled","onBlur","onFocus","suffix","allowClear","addonAfter","addonBefore","className","style","styles","rootClassName","onChange","classNames"]),{getPrefixCls:Yt,direction:re,input:xt}=P.useContext(A.E_),at=Yt("input",ot),se=(0,P.useRef)(null),[Fe,Re]=(0,tt.ZP)(at),{compactSize:ge,compactItemClassnames:Ie}=(0,N.ri)(at,re),Ne=(0,x.Z)(Rt=>{var _t;return(_t=Ot!=null?Ot:ge)!==null&&_t!==void 0?_t:Rt}),bt=P.useContext(I.Z),Jt=pe!=null?pe:bt,{status:oe,hasFeedback:M,feedbackIcon:Q}=(0,P.useContext)(k.aM),te=(0,b.F)(oe,zt),Ut=Ct(Bt)||!!M,we=(0,P.useRef)(Ut);(0,P.useEffect)(()=>{var Rt;Ut&&we.current,we.current=Ut},[Ut]);const Ce=(0,et.Z)(se,!0),_e=Rt=>{Ce(),xe==null||xe(Rt)},mt=Rt=>{Ce(),qt==null||qt(Rt)},X=Rt=>{Ce(),le==null||le(Rt)},Pt=(M||Ye)&&P.createElement(P.Fragment,null,Ye,M&&Q);let At;return typeof We=="object"&&(We!=null&&We.clearIcon)?At=We:We&&(At={clearIcon:P.createElement(l.Z,null)}),Fe(P.createElement(_.default,Object.assign({ref:(0,g.sQ)(Xt,se),prefixCls:at,autoComplete:xt==null?void 0:xt.autoComplete},De,{disabled:Jt,onBlur:_e,onFocus:mt,style:Object.assign(Object.assign({},xt==null?void 0:xt.style),ne),styles:Object.assign(Object.assign({},xt==null?void 0:xt.styles),Me),suffix:Pt,allowClear:At,className:O()(Mt,nn,Ie,xt==null?void 0:xt.className),onChange:X,addonAfter:Oe&&P.createElement(N.BR,null,P.createElement(k.Ux,{override:!0,status:!0},Oe)),addonBefore:Qe&&P.createElement(N.BR,null,P.createElement(k.Ux,{override:!0,status:!0},Qe)),classNames:Object.assign(Object.assign(Object.assign({},be),xt==null?void 0:xt.classNames),{input:O()({[`${at}-sm`]:Ne==="small",[`${at}-lg`]:Ne==="large",[`${at}-rtl`]:re==="rtl",[`${at}-borderless`]:!It},!Ut&&(0,b.Z)(at,te),be==null?void 0:be.input,(wt=xt==null?void 0:xt.classNames)===null||wt===void 0?void 0:wt.input,Re)}),classes:{affixWrapper:O()({[`${at}-affix-wrapper-sm`]:Ne==="small",[`${at}-affix-wrapper-lg`]:Ne==="large",[`${at}-affix-wrapper-rtl`]:re==="rtl",[`${at}-affix-wrapper-borderless`]:!It},(0,b.Z)(`${at}-affix-wrapper`,te,M),Re),wrapper:O()({[`${at}-group-rtl`]:re==="rtl"},Re),group:O()({[`${at}-group-wrapper-sm`]:Ne==="small",[`${at}-group-wrapper-lg`]:Ne==="large",[`${at}-group-wrapper-rtl`]:re==="rtl",[`${at}-group-wrapper-disabled`]:Jt},(0,b.Z)(`${at}-group-wrapper`,te,M),Re)}})))})},1643:function(Tt,vt,d){"use strict";var l=d(19248),R=d(92310),O=d.n(R),_=d(9296),g=d(59301),P=d(19080),b=d(36355),A=d(1684),I=d(19716),x=d(32441),k=d(9432),N=d(9937),et=function(Ct,ut){var nt={};for(var kt in Ct)Object.prototype.hasOwnProperty.call(Ct,kt)&&ut.indexOf(kt)<0&&(nt[kt]=Ct[kt]);if(Ct!=null&&typeof Object.getOwnPropertySymbols=="function")for(var Nt=0,kt=Object.getOwnPropertySymbols(Ct);Nt<kt.length;Nt++)ut.indexOf(kt[Nt])<0&&Object.prototype.propertyIsEnumerable.call(Ct,kt[Nt])&&(nt[kt[Nt]]=Ct[kt[Nt]]);return nt};const tt=(0,g.forwardRef)((Ct,ut)=>{const{prefixCls:nt,bordered:kt=!0,size:Nt,disabled:Bt,status:Xt,allowClear:wt,showCount:ot,classNames:It,rootClassName:zt,className:Ot}=Ct,pe=et(Ct,["prefixCls","bordered","size","disabled","status","allowClear","showCount","classNames","rootClassName","className"]),{getPrefixCls:xe,direction:qt}=g.useContext(b.E_),Ye=(0,I.Z)(Nt),We=g.useContext(A.Z),Oe=Bt!=null?Bt:We,{status:Qe,hasFeedback:Mt,feedbackIcon:ne}=g.useContext(x.aM),Me=(0,P.F)(Qe,Xt),nn=g.useRef(null);g.useImperativeHandle(ut,()=>{var re;return{resizableTextArea:(re=nn.current)===null||re===void 0?void 0:re.resizableTextArea,focus:xt=>{var at,se;(0,k.n)((se=(at=nn.current)===null||at===void 0?void 0:at.resizableTextArea)===null||se===void 0?void 0:se.textArea,xt)},blur:()=>{var xt;return(xt=nn.current)===null||xt===void 0?void 0:xt.blur()}}});const le=xe("input",nt);let be;typeof wt=="object"&&(wt!=null&&wt.clearIcon)?be=wt:wt&&(be={clearIcon:g.createElement(l.Z,null)});const[De,Yt]=(0,N.ZP)(le);return De(g.createElement(_.default,Object.assign({},pe,{disabled:Oe,allowClear:be,className:O()(Ot,zt),classes:{affixWrapper:O()(`${le}-textarea-affix-wrapper`,{[`${le}-affix-wrapper-rtl`]:qt==="rtl",[`${le}-affix-wrapper-borderless`]:!kt,[`${le}-affix-wrapper-sm`]:Ye==="small",[`${le}-affix-wrapper-lg`]:Ye==="large",[`${le}-textarea-show-count`]:ot},(0,P.Z)(`${le}-affix-wrapper`,Me),Yt)},classNames:Object.assign(Object.assign({},It),{textarea:O()({[`${le}-borderless`]:!kt,[`${le}-sm`]:Ye==="small",[`${le}-lg`]:Ye==="large"},(0,P.Z)(le,Me),Yt,It==null?void 0:It.textarea)}),prefixCls:le,suffix:Mt&&g.createElement("span",{className:`${le}-textarea-suffix`},ne),showCount:ot,ref:nn})))});vt.Z=tt},59412:function(Tt,vt,d){"use strict";d.d(vt,{Z:function(){return R}});var l=d(59301);function R(O,_){const g=(0,l.useRef)([]),P=()=>{g.current.push(setTimeout(()=>{var b,A,I,x;!((b=O.current)===null||b===void 0)&&b.input&&((A=O.current)===null||A===void 0?void 0:A.input.getAttribute("type"))==="password"&&(!((I=O.current)===null||I===void 0)&&I.input.hasAttribute("value"))&&((x=O.current)===null||x===void 0||x.input.removeAttribute("value"))}))};return(0,l.useEffect)(()=>(_&&P(),()=>g.current.forEach(b=>{b&&clearTimeout(b)})),[]),P}},92832:function(Tt,vt,d){"use strict";d.d(vt,{default:function(){return Ye}});var l=d(92310),R=d.n(l),O=d(59301),_=d(36355),g=d(32441),P=d(9937),A=We=>{const{getPrefixCls:Oe,direction:Qe}=(0,O.useContext)(_.E_),{prefixCls:Mt,className:ne}=We,Me=Oe("input-group",Mt),nn=Oe("input"),[le,be]=(0,P.ZP)(nn),De=R()(Me,{[`${Me}-lg`]:We.size==="large",[`${Me}-sm`]:We.size==="small",[`${Me}-compact`]:We.compact,[`${Me}-rtl`]:Qe==="rtl"},be,ne),Yt=(0,O.useContext)(g.aM),re=(0,O.useMemo)(()=>Object.assign(Object.assign({},Yt),{isFormItemInput:!1}),[Yt]);return le(O.createElement("span",{className:De,style:We.style,onMouseEnter:We.onMouseEnter,onMouseLeave:We.onMouseLeave,onFocus:We.onFocus,onBlur:We.onBlur},O.createElement(g.aM.Provider,{value:re},We.children)))},I=d(9432),x=d(73331),k=d(15277),N=d(2738),et=d(8654),tt=d(59412),Ct=function(We,Oe){var Qe={};for(var Mt in We)Object.prototype.hasOwnProperty.call(We,Mt)&&Oe.indexOf(Mt)<0&&(Qe[Mt]=We[Mt]);if(We!=null&&typeof Object.getOwnPropertySymbols=="function")for(var ne=0,Mt=Object.getOwnPropertySymbols(We);ne<Mt.length;ne++)Oe.indexOf(Mt[ne])<0&&Object.prototype.propertyIsEnumerable.call(We,Mt[ne])&&(Qe[Mt[ne]]=We[Mt[ne]]);return Qe};const ut=We=>We?O.createElement(k.Z,null):O.createElement(x.Z,null),nt={click:"onClick",hover:"onMouseOver"};var Nt=O.forwardRef((We,Oe)=>{const{visibilityToggle:Qe=!0}=We,Mt=typeof Qe=="object"&&Qe.visible!==void 0,[ne,Me]=(0,O.useState)(()=>Mt?Qe.visible:!1),nn=(0,O.useRef)(null);O.useEffect(()=>{Mt&&Me(Qe.visible)},[Mt,Qe]);const le=(0,tt.Z)(nn),be=()=>{const{disabled:Jt}=We;Jt||(ne&&le(),Me(oe=>{var M;const Q=!oe;return typeof Qe=="object"&&((M=Qe.onVisibleChange)===null||M===void 0||M.call(Qe,Q)),Q}))},De=Jt=>{const{action:oe="click",iconRender:M=ut}=We,Q=nt[oe]||"",te=M(ne),Ut={[Q]:be,className:`${Jt}-icon`,key:"passwordIcon",onMouseDown:we=>{we.preventDefault()},onMouseUp:we=>{we.preventDefault()}};return O.cloneElement(O.isValidElement(te)?te:O.createElement("span",null,te),Ut)},{className:Yt,prefixCls:re,inputPrefixCls:xt,size:at}=We,se=Ct(We,["className","prefixCls","inputPrefixCls","size"]),{getPrefixCls:Fe}=O.useContext(_.E_),Re=Fe("input",xt),ge=Fe("input-password",re),Ie=Qe&&De(ge),Ne=R()(ge,Yt,{[`${ge}-${at}`]:!!at}),bt=Object.assign(Object.assign({},(0,N.Z)(se,["suffix","iconRender","visibilityToggle"])),{type:ne?"text":"password",className:Ne,prefixCls:Re,suffix:Ie});return at&&(bt.size=at),O.createElement(I.Z,Object.assign({ref:(0,et.sQ)(Oe,nn)},bt))}),Bt=d(47472),Xt=d(92343),wt=d(3113),ot=d(19716),It=d(33234),zt=function(We,Oe){var Qe={};for(var Mt in We)Object.prototype.hasOwnProperty.call(We,Mt)&&Oe.indexOf(Mt)<0&&(Qe[Mt]=We[Mt]);if(We!=null&&typeof Object.getOwnPropertySymbols=="function")for(var ne=0,Mt=Object.getOwnPropertySymbols(We);ne<Mt.length;ne++)Oe.indexOf(Mt[ne])<0&&Object.prototype.propertyIsEnumerable.call(We,Mt[ne])&&(Qe[Mt[ne]]=We[Mt[ne]]);return Qe},pe=O.forwardRef((We,Oe)=>{const{prefixCls:Qe,inputPrefixCls:Mt,className:ne,size:Me,suffix:nn,enterButton:le=!1,addonAfter:be,loading:De,disabled:Yt,onSearch:re,onChange:xt,onCompositionStart:at,onCompositionEnd:se}=We,Fe=zt(We,["prefixCls","inputPrefixCls","className","size","suffix","enterButton","addonAfter","loading","disabled","onSearch","onChange","onCompositionStart","onCompositionEnd"]),{getPrefixCls:Re,direction:ge}=O.useContext(_.E_),Ie=O.useRef(!1),Ne=Re("input-search",Qe),bt=Re("input",Mt),{compactSize:Jt}=(0,It.ri)(Ne,ge),oe=(0,ot.Z)(Vt=>{var ae;return(ae=Me!=null?Me:Jt)!==null&&ae!==void 0?ae:Vt}),M=O.useRef(null),Q=Vt=>{Vt&&Vt.target&&Vt.type==="click"&&re&&re(Vt.target.value,Vt,{source:"clear"}),xt&&xt(Vt)},te=Vt=>{var ae;document.activeElement===((ae=M.current)===null||ae===void 0?void 0:ae.input)&&Vt.preventDefault()},Ut=Vt=>{var ae,fe;re&&re((fe=(ae=M.current)===null||ae===void 0?void 0:ae.input)===null||fe===void 0?void 0:fe.value,Vt,{source:"input"})},we=Vt=>{Ie.current||De||Ut(Vt)},Ce=typeof le=="boolean"?O.createElement(Bt.Z,null):null,_e=`${Ne}-button`;let mt;const X=le||{},Pt=X.type&&X.type.__ANT_BUTTON===!0;Pt||X.type==="button"?mt=(0,Xt.Tm)(X,Object.assign({onMouseDown:te,onClick:Vt=>{var ae,fe;(fe=(ae=X==null?void 0:X.props)===null||ae===void 0?void 0:ae.onClick)===null||fe===void 0||fe.call(ae,Vt),Ut(Vt)},key:"enterButton"},Pt?{className:_e,size:oe}:{})):mt=O.createElement(wt.ZP,{className:_e,type:le?"primary":void 0,size:oe,disabled:Yt,key:"enterButton",onMouseDown:te,onClick:Ut,loading:De,icon:Ce},le),be&&(mt=[mt,(0,Xt.Tm)(be,{key:"addonAfter"})]);const At=R()(Ne,{[`${Ne}-rtl`]:ge==="rtl",[`${Ne}-${oe}`]:!!oe,[`${Ne}-with-button`]:!!le},ne),Rt=Vt=>{Ie.current=!0,at==null||at(Vt)},_t=Vt=>{Ie.current=!1,se==null||se(Vt)};return O.createElement(I.Z,Object.assign({ref:(0,et.sQ)(M,Oe),onPressEnter:we},Fe,{size:oe,onCompositionStart:Rt,onCompositionEnd:_t,prefixCls:bt,addonAfter:mt,suffix:nn,onChange:Q,className:At,disabled:Yt}))}),xe=d(1643);const qt=I.Z;qt.Group=A,qt.Search=pe,qt.TextArea=xe.Z,qt.Password=Nt;var Ye=qt},9937:function(Tt,vt,d){"use strict";d.d(vt,{M1:function(){return b},TM:function(){return Xt},Xy:function(){return A},bi:function(){return k},e5:function(){return Bt},ik:function(){return N},nz:function(){return g},pU:function(){return P},s7:function(){return et},x0:function(){return x}});var l=d(17313),R=d(74207),O=d(37613),_=d(83116);const g=wt=>({"&::-moz-placeholder":{opacity:1},"&::placeholder":{color:wt,userSelect:"none"},"&:placeholder-shown":{textOverflow:"ellipsis"}}),P=wt=>({borderColor:wt.hoverBorderColor}),b=wt=>({borderColor:wt.activeBorderColor,boxShadow:wt.activeShadow,outline:0}),A=wt=>({color:wt.colorTextDisabled,backgroundColor:wt.colorBgContainerDisabled,borderColor:wt.colorBorder,boxShadow:"none",cursor:"not-allowed",opacity:1,"&:hover":Object.assign({},P((0,O.TS)(wt,{hoverBorderColor:wt.colorBorder})))}),I=wt=>{const{paddingBlockLG:ot,fontSizeLG:It,lineHeightLG:zt,borderRadiusLG:Ot,paddingInlineLG:pe}=wt;return{padding:`${ot}px ${pe}px`,fontSize:It,lineHeight:zt,borderRadius:Ot}},x=wt=>({padding:`${wt.paddingBlockSM}px ${wt.paddingInlineSM}px`,borderRadius:wt.borderRadiusSM}),k=(wt,ot)=>{const{componentCls:It,colorError:zt,colorWarning:Ot,errorActiveShadow:pe,warningActiveShadow:xe,colorErrorBorderHover:qt,colorWarningBorderHover:Ye}=wt;return{[`&-status-error:not(${ot}-disabled):not(${ot}-borderless)${ot}`]:{borderColor:zt,"&:hover":{borderColor:qt},"&:focus, &-focused":Object.assign({},b((0,O.TS)(wt,{activeBorderColor:zt,activeShadow:pe}))),[`${It}-prefix, ${It}-suffix`]:{color:zt}},[`&-status-warning:not(${ot}-disabled):not(${ot}-borderless)${ot}`]:{borderColor:Ot,"&:hover":{borderColor:Ye},"&:focus, &-focused":Object.assign({},b((0,O.TS)(wt,{activeBorderColor:Ot,activeShadow:xe}))),[`${It}-prefix, ${It}-suffix`]:{color:Ot}}}},N=wt=>Object.assign(Object.assign({position:"relative",display:"inline-block",width:"100%",minWidth:0,padding:`${wt.paddingBlock}px ${wt.paddingInline}px`,color:wt.colorText,fontSize:wt.fontSize,lineHeight:wt.lineHeight,backgroundColor:wt.colorBgContainer,backgroundImage:"none",borderWidth:wt.lineWidth,borderStyle:wt.lineType,borderColor:wt.colorBorder,borderRadius:wt.borderRadius,transition:`all ${wt.motionDurationMid}`},g(wt.colorTextPlaceholder)),{"&:hover":Object.assign({},P(wt)),"&:focus, &-focused":Object.assign({},b(wt)),"&-disabled, &[disabled]":Object.assign({},A(wt)),"&-borderless":{"&, &:hover, &:focus, &-focused, &-disabled, &[disabled]":{backgroundColor:"transparent",border:"none",boxShadow:"none"}},"textarea&":{maxWidth:"100%",height:"auto",minHeight:wt.controlHeight,lineHeight:wt.lineHeight,verticalAlign:"bottom",transition:`all ${wt.motionDurationSlow}, height 0s`,resize:"vertical"},"&-lg":Object.assign({},I(wt)),"&-sm":Object.assign({},x(wt)),"&-rtl":{direction:"rtl"},"&-textarea-rtl":{direction:"rtl"}}),et=wt=>{const{componentCls:ot,antCls:It}=wt;return{position:"relative",display:"table",width:"100%",borderCollapse:"separate",borderSpacing:0,"&[class*='col-']":{paddingInlineEnd:wt.paddingXS,"&:last-child":{paddingInlineEnd:0}},[`&-lg ${ot}, &-lg > ${ot}-group-addon`]:Object.assign({},I(wt)),[`&-sm ${ot}, &-sm > ${ot}-group-addon`]:Object.assign({},x(wt)),[`&-lg ${It}-select-single ${It}-select-selector`]:{height:wt.controlHeightLG},[`&-sm ${It}-select-single ${It}-select-selector`]:{height:wt.controlHeightSM},[`> ${ot}`]:{display:"table-cell","&:not(:first-child):not(:last-child)":{borderRadius:0}},[`${ot}-group`]:{"&-addon, &-wrap":{display:"table-cell",width:1,whiteSpace:"nowrap",verticalAlign:"middle","&:not(:first-child):not(:last-child)":{borderRadius:0}},"&-wrap > *":{display:"block !important"},"&-addon":{position:"relative",padding:`0 ${wt.paddingInline}px`,color:wt.colorText,fontWeight:"normal",fontSize:wt.fontSize,textAlign:"center",backgroundColor:wt.colorFillAlter,border:`${wt.lineWidth}px ${wt.lineType} ${wt.colorBorder}`,borderRadius:wt.borderRadius,transition:`all ${wt.motionDurationSlow}`,lineHeight:1,[`${It}-select`]:{margin:`-${wt.paddingBlock+1}px -${wt.paddingInline}px`,[`&${It}-select-single:not(${It}-select-customize-input)`]:{[`${It}-select-selector`]:{backgroundColor:"inherit",border:`${wt.lineWidth}px ${wt.lineType} transparent`,boxShadow:"none"}},"&-open, &-focused":{[`${It}-select-selector`]:{color:wt.colorPrimary}}},[`${It}-cascader-picker`]:{margin:`-9px -${wt.paddingInline}px`,backgroundColor:"transparent",[`${It}-cascader-input`]:{textAlign:"start",border:0,boxShadow:"none"}}},"&-addon:first-child":{borderInlineEnd:0},"&-addon:last-child":{borderInlineStart:0}},[`${ot}`]:{width:"100%",marginBottom:0,textAlign:"inherit","&:focus":{zIndex:1,borderInlineEndWidth:1},"&:hover":{zIndex:1,borderInlineEndWidth:1,[`${ot}-search-with-button &`]:{zIndex:0}}},[`> ${ot}:first-child, ${ot}-group-addon:first-child`]:{borderStartEndRadius:0,borderEndEndRadius:0,[`${It}-select ${It}-select-selector`]:{borderStartEndRadius:0,borderEndEndRadius:0}},[`> ${ot}-affix-wrapper`]:{[`&:not(:first-child) ${ot}`]:{borderStartStartRadius:0,borderEndStartRadius:0},[`&:not(:last-child) ${ot}`]:{borderStartEndRadius:0,borderEndEndRadius:0}},[`> ${ot}:last-child, ${ot}-group-addon:last-child`]:{borderStartStartRadius:0,borderEndStartRadius:0,[`${It}-select ${It}-select-selector`]:{borderStartStartRadius:0,borderEndStartRadius:0}},[`${ot}-affix-wrapper`]:{"&:not(:last-child)":{borderStartEndRadius:0,borderEndEndRadius:0,[`${ot}-search &`]:{borderStartStartRadius:wt.borderRadius,borderEndStartRadius:wt.borderRadius}},[`&:not(:first-child), ${ot}-search &:not(:first-child)`]:{borderStartStartRadius:0,borderEndStartRadius:0}},[`&${ot}-group-compact`]:Object.assign(Object.assign({display:"block"},(0,l.dF)()),{[`${ot}-group-addon, ${ot}-group-wrap, > ${ot}`]:{"&:not(:first-child):not(:last-child)":{borderInlineEndWidth:wt.lineWidth,"&:hover":{zIndex:1},"&:focus":{zIndex:1}}},"& > *":{display:"inline-block",float:"none",verticalAlign:"top",borderRadius:0},[`
|
|
|
& > ${ot}-affix-wrapper,
|
|
|
& > ${ot}-number-affix-wrapper,
|
|
|
& > ${It}-picker-range
|
|
|
`]:{display:"inline-flex"},"& > *:not(:last-child)":{marginInlineEnd:-wt.lineWidth,borderInlineEndWidth:wt.lineWidth},[`${ot}`]:{float:"none"},[`& > ${It}-select > ${It}-select-selector,
|
|
|
& > ${It}-select-auto-complete ${ot},
|
|
|
& > ${It}-cascader-picker ${ot},
|
|
|
& > ${ot}-group-wrapper ${ot}`]:{borderInlineEndWidth:wt.lineWidth,borderRadius:0,"&:hover":{zIndex:1},"&:focus":{zIndex:1}},[`& > ${It}-select-focused`]:{zIndex:1},[`& > ${It}-select > ${It}-select-arrow`]:{zIndex:1},[`& > *:first-child,
|
|
|
& > ${It}-select:first-child > ${It}-select-selector,
|
|
|
& > ${It}-select-auto-complete:first-child ${ot},
|
|
|
& > ${It}-cascader-picker:first-child ${ot}`]:{borderStartStartRadius:wt.borderRadius,borderEndStartRadius:wt.borderRadius},[`& > *:last-child,
|
|
|
& > ${It}-select:last-child > ${It}-select-selector,
|
|
|
& > ${It}-cascader-picker:last-child ${ot},
|
|
|
& > ${It}-cascader-picker-focused:last-child ${ot}`]:{borderInlineEndWidth:wt.lineWidth,borderStartEndRadius:wt.borderRadius,borderEndEndRadius:wt.borderRadius},[`& > ${It}-select-auto-complete ${ot}`]:{verticalAlign:"top"},[`${ot}-group-wrapper + ${ot}-group-wrapper`]:{marginInlineStart:-wt.lineWidth,[`${ot}-affix-wrapper`]:{borderRadius:0}},[`${ot}-group-wrapper:not(:last-child)`]:{[`&${ot}-search > ${ot}-group`]:{[`& > ${ot}-group-addon > ${ot}-search-button`]:{borderRadius:0},[`& > ${ot}`]:{borderStartStartRadius:wt.borderRadius,borderStartEndRadius:0,borderEndEndRadius:0,borderEndStartRadius:wt.borderRadius}}}})}},tt=wt=>{const{componentCls:ot,controlHeightSM:It,lineWidth:zt}=wt,pe=(It-zt*2-16)/2;return{[ot]:Object.assign(Object.assign(Object.assign(Object.assign({},(0,l.Wf)(wt)),N(wt)),k(wt,ot)),{'&[type="color"]':{height:wt.controlHeight,[`&${ot}-lg`]:{height:wt.controlHeightLG},[`&${ot}-sm`]:{height:It,paddingTop:pe,paddingBottom:pe}},'&[type="search"]::-webkit-search-cancel-button, &[type="search"]::-webkit-search-decoration':{"-webkit-appearance":"none"}})}},Ct=wt=>{const{componentCls:ot}=wt;return{[`${ot}-clear-icon`]:{margin:0,color:wt.colorTextQuaternary,fontSize:wt.fontSizeIcon,verticalAlign:-1,cursor:"pointer",transition:`color ${wt.motionDurationSlow}`,"&:hover":{color:wt.colorTextTertiary},"&:active":{color:wt.colorText},"&-hidden":{visibility:"hidden"},"&-has-suffix":{margin:`0 ${wt.inputAffixPadding}px`}}}},ut=wt=>{const{componentCls:ot,inputAffixPadding:It,colorTextDescription:zt,motionDurationSlow:Ot,colorIcon:pe,colorIconHover:xe,iconCls:qt}=wt;return{[`${ot}-affix-wrapper`]:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},N(wt)),{display:"inline-flex",[`&:not(${ot}-affix-wrapper-disabled):hover`]:Object.assign(Object.assign({},P(wt)),{zIndex:1,[`${ot}-search-with-button &`]:{zIndex:0}}),"&-focused, &:focus":{zIndex:1},"&-disabled":{[`${ot}[disabled]`]:{background:"transparent"}},[`> input${ot}`]:{padding:0,fontSize:"inherit",border:"none",borderRadius:0,outline:"none","&::-ms-reveal":{display:"none"},"&:focus":{boxShadow:"none !important"}},"&::before":{display:"inline-block",width:0,visibility:"hidden",content:'"\\a0"'},[`${ot}`]:{"&-prefix, &-suffix":{display:"flex",flex:"none",alignItems:"center","> *:not(:last-child)":{marginInlineEnd:wt.paddingXS}},"&-show-count-suffix":{color:zt},"&-show-count-has-suffix":{marginInlineEnd:wt.paddingXXS},"&-prefix":{marginInlineEnd:It},"&-suffix":{marginInlineStart:It}}}),Ct(wt)),{[`${qt}${ot}-password-icon`]:{color:pe,cursor:"pointer",transition:`all ${Ot}`,"&:hover":{color:xe}}}),k(wt,`${ot}-affix-wrapper`))}},nt=wt=>{const{componentCls:ot,colorError:It,colorWarning:zt,borderRadiusLG:Ot,borderRadiusSM:pe}=wt;return{[`${ot}-group`]:Object.assign(Object.assign(Object.assign({},(0,l.Wf)(wt)),et(wt)),{"&-rtl":{direction:"rtl"},"&-wrapper":{display:"inline-block",width:"100%",textAlign:"start",verticalAlign:"top","&-rtl":{direction:"rtl"},"&-lg":{[`${ot}-group-addon`]:{borderRadius:Ot,fontSize:wt.fontSizeLG}},"&-sm":{[`${ot}-group-addon`]:{borderRadius:pe}},"&-status-error":{[`${ot}-group-addon`]:{color:It,borderColor:It}},"&-status-warning":{[`${ot}-group-addon`]:{color:zt,borderColor:zt}},"&-disabled":{[`${ot}-group-addon`]:Object.assign({},A(wt))},[`&:not(${ot}-compact-first-item):not(${ot}-compact-last-item)${ot}-compact-item`]:{[`${ot}, ${ot}-group-addon`]:{borderRadius:0}},[`&:not(${ot}-compact-last-item)${ot}-compact-first-item`]:{[`${ot}, ${ot}-group-addon`]:{borderStartEndRadius:0,borderEndEndRadius:0}},[`&:not(${ot}-compact-first-item)${ot}-compact-last-item`]:{[`${ot}, ${ot}-group-addon`]:{borderStartStartRadius:0,borderEndStartRadius:0}}}})}},kt=wt=>{const{componentCls:ot,antCls:It}=wt,zt=`${ot}-search`;return{[zt]:{[`${ot}`]:{"&:hover, &:focus":{borderColor:wt.colorPrimaryHover,[`+ ${ot}-group-addon ${zt}-button:not(${It}-btn-primary)`]:{borderInlineStartColor:wt.colorPrimaryHover}}},[`${ot}-affix-wrapper`]:{borderRadius:0},[`${ot}-lg`]:{lineHeight:wt.lineHeightLG-2e-4},[`> ${ot}-group`]:{[`> ${ot}-group-addon:last-child`]:{insetInlineStart:-1,padding:0,border:0,[`${zt}-button`]:{paddingTop:0,paddingBottom:0,borderStartStartRadius:0,borderStartEndRadius:wt.borderRadius,borderEndEndRadius:wt.borderRadius,borderEndStartRadius:0,boxShadow:"none"},[`${zt}-button:not(${It}-btn-primary)`]:{color:wt.colorTextDescription,"&:hover":{color:wt.colorPrimaryHover},"&:active":{color:wt.colorPrimaryActive},[`&${It}-btn-loading::before`]:{insetInlineStart:0,insetInlineEnd:0,insetBlockStart:0,insetBlockEnd:0}}}},[`${zt}-button`]:{height:wt.controlHeight,"&:hover, &:focus":{zIndex:1}},[`&-large ${zt}-button`]:{height:wt.controlHeightLG},[`&-small ${zt}-button`]:{height:wt.controlHeightSM},"&-rtl":{direction:"rtl"},[`&${ot}-compact-item`]:{[`&:not(${ot}-compact-last-item)`]:{[`${ot}-group-addon`]:{[`${ot}-search-button`]:{marginInlineEnd:-wt.lineWidth,borderRadius:0}}},[`&:not(${ot}-compact-first-item)`]:{[`${ot},${ot}-affix-wrapper`]:{borderRadius:0}},[`> ${ot}-group-addon ${ot}-search-button,
|
|
|
> ${ot},
|
|
|
${ot}-affix-wrapper`]:{"&:hover,&:focus,&:active":{zIndex:2}},[`> ${ot}-affix-wrapper-focused`]:{zIndex:2}}}}},Nt=wt=>{const{componentCls:ot,paddingLG:It}=wt,zt=`${ot}-textarea`;return{[zt]:{position:"relative","&-show-count":{[`> ${ot}`]:{height:"100%"},[`${ot}-data-count`]:{position:"absolute",bottom:-wt.fontSize*wt.lineHeight,insetInlineEnd:0,color:wt.colorTextDescription,whiteSpace:"nowrap",pointerEvents:"none"}},"&-allow-clear":{[`> ${ot}`]:{paddingInlineEnd:It}},[`&-affix-wrapper${zt}-has-feedback`]:{[`${ot}`]:{paddingInlineEnd:It}},[`&-affix-wrapper${ot}-affix-wrapper`]:{padding:0,[`> textarea${ot}`]:{fontSize:"inherit",border:"none",outline:"none","&:focus":{boxShadow:"none !important"}},[`${ot}-suffix`]:{margin:0,"> *:not(:last-child)":{marginInline:0},[`${ot}-clear-icon`]:{position:"absolute",insetInlineEnd:wt.paddingXS,insetBlockStart:wt.paddingXS},[`${zt}-suffix`]:{position:"absolute",top:0,insetInlineEnd:wt.paddingInline,bottom:0,zIndex:1,display:"inline-flex",alignItems:"center",margin:"auto",pointerEvents:"none"}}}}}};function Bt(wt){return(0,O.TS)(wt,{inputAffixPadding:wt.paddingXXS})}const Xt=wt=>{const{controlHeight:ot,fontSize:It,lineHeight:zt,lineWidth:Ot,controlHeightSM:pe,controlHeightLG:xe,fontSizeLG:qt,lineHeightLG:Ye,paddingSM:We,controlPaddingHorizontalSM:Oe,controlPaddingHorizontal:Qe,colorFillAlter:Mt,colorPrimaryHover:ne,controlOutlineWidth:Me,controlOutline:nn,colorErrorOutline:le,colorWarningOutline:be}=wt;return{paddingBlock:Math.max(Math.round((ot-It*zt)/2*10)/10-Ot,3),paddingBlockSM:Math.max(Math.round((pe-It*zt)/2*10)/10-Ot,0),paddingBlockLG:Math.ceil((xe-qt*Ye)/2*10)/10-Ot,paddingInline:We-Ot,paddingInlineSM:Oe-Ot,paddingInlineLG:Qe-Ot,addonBg:Mt,activeBorderColor:ne,hoverBorderColor:ne,activeShadow:`0 0 0 ${Me}px ${nn}`,errorActiveShadow:`0 0 0 ${Me}px ${le}`,warningActiveShadow:`0 0 0 ${Me}px ${be}`}};vt.ZP=(0,_.Z)("Input",wt=>{const ot=(0,O.TS)(wt,Bt(wt));return[tt(ot),Nt(ot),ut(ot),nt(ot),kt(ot),(0,R.c)(ot)]},Xt)},5112:function(Tt,vt,d){"use strict";d.d(vt,{ZP:function(){return nn}});var l=d(92310),R=d.n(l),O=d(18929),_=d(26112),g=d(59301),P=d(36355),b=d(19716);const A=g.createContext(null),I=A.Provider;var x=A;const k=g.createContext(null),N=k.Provider;var et=d(5630),tt=d(8654),Ct=d(1684),ut=d(32441),nt=d(17313),kt=d(83116),Nt=d(37613);const Bt=le=>{const{componentCls:be,antCls:De}=le,Yt=`${be}-group`;return{[Yt]:Object.assign(Object.assign({},(0,nt.Wf)(le)),{display:"inline-block",fontSize:0,[`&${Yt}-rtl`]:{direction:"rtl"},[`${De}-badge ${De}-badge-count`]:{zIndex:1},[`> ${De}-badge:not(:first-child) > ${De}-button-wrapper`]:{borderInlineStart:"none"}})}},Xt=le=>{const{componentCls:be,wrapperMarginInlineEnd:De,colorPrimary:Yt,radioSize:re,motionDurationSlow:xt,motionDurationMid:at,motionEaseInOutCirc:se,colorBgContainer:Fe,colorBorder:Re,lineWidth:ge,dotSize:Ie,colorBgContainerDisabled:Ne,colorTextDisabled:bt,paddingXS:Jt,dotColorDisabled:oe,lineType:M,radioDotDisabledSize:Q,wireframe:te,colorWhite:Ut}=le,we=`${be}-inner`;return{[`${be}-wrapper`]:Object.assign(Object.assign({},(0,nt.Wf)(le)),{display:"inline-flex",alignItems:"baseline",marginInlineStart:0,marginInlineEnd:De,cursor:"pointer",[`&${be}-wrapper-rtl`]:{direction:"rtl"},"&-disabled":{cursor:"not-allowed",color:le.colorTextDisabled},"&::after":{display:"inline-block",width:0,overflow:"hidden",content:'"\\a0"'},[`${be}-checked::after`]:{position:"absolute",insetBlockStart:0,insetInlineStart:0,width:"100%",height:"100%",border:`${ge}px ${M} ${Yt}`,borderRadius:"50%",visibility:"hidden",content:'""'},[be]:Object.assign(Object.assign({},(0,nt.Wf)(le)),{position:"relative",display:"inline-block",outline:"none",cursor:"pointer",alignSelf:"center",borderRadius:"50%"}),[`${be}-wrapper:hover &,
|
|
|
&:hover ${we}`]:{borderColor:Yt},[`${be}-input:focus-visible + ${we}`]:Object.assign({},(0,nt.oN)(le)),[`${be}:hover::after, ${be}-wrapper:hover &::after`]:{visibility:"visible"},[`${be}-inner`]:{"&::after":{boxSizing:"border-box",position:"absolute",insetBlockStart:"50%",insetInlineStart:"50%",display:"block",width:re,height:re,marginBlockStart:re/-2,marginInlineStart:re/-2,backgroundColor:te?Yt:Ut,borderBlockStart:0,borderInlineStart:0,borderRadius:re,transform:"scale(0)",opacity:0,transition:`all ${xt} ${se}`,content:'""'},boxSizing:"border-box",position:"relative",insetBlockStart:0,insetInlineStart:0,display:"block",width:re,height:re,backgroundColor:Fe,borderColor:Re,borderStyle:"solid",borderWidth:ge,borderRadius:"50%",transition:`all ${at}`},[`${be}-input`]:{position:"absolute",inset:0,zIndex:1,cursor:"pointer",opacity:0},[`${be}-checked`]:{[we]:{borderColor:Yt,backgroundColor:te?Fe:Yt,"&::after":{transform:`scale(${Ie/re})`,opacity:1,transition:`all ${xt} ${se}`}}},[`${be}-disabled`]:{cursor:"not-allowed",[we]:{backgroundColor:Ne,borderColor:Re,cursor:"not-allowed","&::after":{backgroundColor:oe}},[`${be}-input`]:{cursor:"not-allowed"},[`${be}-disabled + span`]:{color:bt,cursor:"not-allowed"},[`&${be}-checked`]:{[we]:{"&::after":{transform:`scale(${Q/re})`}}}},[`span${be} + *`]:{paddingInlineStart:Jt,paddingInlineEnd:Jt}})}},wt=le=>{const{buttonColor:be,controlHeight:De,componentCls:Yt,lineWidth:re,lineType:xt,colorBorder:at,motionDurationSlow:se,motionDurationMid:Fe,buttonPaddingInline:Re,fontSize:ge,buttonBg:Ie,fontSizeLG:Ne,controlHeightLG:bt,controlHeightSM:Jt,paddingXS:oe,borderRadius:M,borderRadiusSM:Q,borderRadiusLG:te,buttonCheckedBg:Ut,buttonSolidCheckedColor:we,colorTextDisabled:Ce,colorBgContainerDisabled:_e,buttonCheckedBgDisabled:mt,buttonCheckedColorDisabled:X,colorPrimary:Pt,colorPrimaryHover:At,colorPrimaryActive:Rt,buttonSolidCheckedBg:_t,buttonSolidCheckedHoverBg:Vt,buttonSolidCheckedActiveBg:ae}=le;return{[`${Yt}-button-wrapper`]:{position:"relative",display:"inline-block",height:De,margin:0,paddingInline:Re,paddingBlock:0,color:be,fontSize:ge,lineHeight:`${De-re*2}px`,background:Ie,border:`${re}px ${xt} ${at}`,borderBlockStartWidth:re+.02,borderInlineStartWidth:0,borderInlineEndWidth:re,cursor:"pointer",transition:[`color ${Fe}`,`background ${Fe}`,`box-shadow ${Fe}`].join(","),a:{color:be},[`> ${Yt}-button`]:{position:"absolute",insetBlockStart:0,insetInlineStart:0,zIndex:-1,width:"100%",height:"100%"},"&:not(:first-child)":{"&::before":{position:"absolute",insetBlockStart:-re,insetInlineStart:-re,display:"block",boxSizing:"content-box",width:1,height:"100%",paddingBlock:re,paddingInline:0,backgroundColor:at,transition:`background-color ${se}`,content:'""'}},"&:first-child":{borderInlineStart:`${re}px ${xt} ${at}`,borderStartStartRadius:M,borderEndStartRadius:M},"&:last-child":{borderStartEndRadius:M,borderEndEndRadius:M},"&:first-child:last-child":{borderRadius:M},[`${Yt}-group-large &`]:{height:bt,fontSize:Ne,lineHeight:`${bt-re*2}px`,"&:first-child":{borderStartStartRadius:te,borderEndStartRadius:te},"&:last-child":{borderStartEndRadius:te,borderEndEndRadius:te}},[`${Yt}-group-small &`]:{height:Jt,paddingInline:oe-re,paddingBlock:0,lineHeight:`${Jt-re*2}px`,"&:first-child":{borderStartStartRadius:Q,borderEndStartRadius:Q},"&:last-child":{borderStartEndRadius:Q,borderEndEndRadius:Q}},"&:hover":{position:"relative",color:Pt},"&:has(:focus-visible)":Object.assign({},(0,nt.oN)(le)),[`${Yt}-inner, input[type='checkbox'], input[type='radio']`]:{width:0,height:0,opacity:0,pointerEvents:"none"},[`&-checked:not(${Yt}-button-wrapper-disabled)`]:{zIndex:1,color:Pt,background:Ut,borderColor:Pt,"&::before":{backgroundColor:Pt},"&:first-child":{borderColor:Pt},"&:hover":{color:At,borderColor:At,"&::before":{backgroundColor:At}},"&:active":{color:Rt,borderColor:Rt,"&::before":{backgroundColor:Rt}}},[`${Yt}-group-solid &-checked:not(${Yt}-button-wrapper-disabled)`]:{color:we,background:_t,borderColor:_t,"&:hover":{color:we,background:Vt,borderColor:Vt},"&:active":{color:we,background:ae,borderColor:ae}},"&-disabled":{color:Ce,backgroundColor:_e,borderColor:at,cursor:"not-allowed","&:first-child, &:hover":{color:Ce,backgroundColor:_e,borderColor:at}},[`&-disabled${Yt}-button-wrapper-checked`]:{color:X,backgroundColor:mt,borderColor:at,boxShadow:"none"}}}},ot=le=>le-4*2;var It=(0,kt.Z)("Radio",le=>{const{controlOutline:be,controlOutlineWidth:De,radioSize:Yt}=le,re=`0 0 0 ${De}px ${be}`,xt=re,at=ot(Yt),se=(0,Nt.TS)(le,{radioDotDisabledSize:at,radioFocusShadow:re,radioButtonFocusShadow:xt});return[Bt(se),Xt(se),wt(se)]},le=>{const{wireframe:be,padding:De,marginXS:Yt,lineWidth:re,fontSizeLG:xt,colorText:at,colorBgContainer:se,colorTextDisabled:Fe,controlItemBgActiveDisabled:Re,colorTextLightSolid:ge,colorPrimary:Ie,colorPrimaryHover:Ne,colorPrimaryActive:bt}=le,Jt=4,oe=xt,M=be?ot(oe):oe-(Jt+re)*2;return{radioSize:oe,dotSize:M,dotColorDisabled:Fe,buttonSolidCheckedColor:ge,buttonSolidCheckedBg:Ie,buttonSolidCheckedHoverBg:Ne,buttonSolidCheckedActiveBg:bt,buttonBg:se,buttonCheckedBg:se,buttonColor:at,buttonCheckedBgDisabled:Re,buttonCheckedColorDisabled:Fe,buttonPaddingInline:De-re,wrapperMarginInlineEnd:Yt}}),zt=d(14088),Ot=d(4572),pe=function(le,be){var De={};for(var Yt in le)Object.prototype.hasOwnProperty.call(le,Yt)&&be.indexOf(Yt)<0&&(De[Yt]=le[Yt]);if(le!=null&&typeof Object.getOwnPropertySymbols=="function")for(var re=0,Yt=Object.getOwnPropertySymbols(le);re<Yt.length;re++)be.indexOf(Yt[re])<0&&Object.prototype.propertyIsEnumerable.call(le,Yt[re])&&(De[Yt[re]]=le[Yt[re]]);return De};const xe=(le,be)=>{var De,Yt;const re=g.useContext(x),xt=g.useContext(k),{getPrefixCls:at,direction:se,radio:Fe}=g.useContext(P.E_),Re=g.useRef(null),ge=(0,tt.sQ)(be,Re),{isFormItemInput:Ie}=g.useContext(ut.aM),Ne=Rt=>{var _t,Vt;(_t=le.onChange)===null||_t===void 0||_t.call(le,Rt),(Vt=re==null?void 0:re.onChange)===null||Vt===void 0||Vt.call(re,Rt)},{prefixCls:bt,className:Jt,rootClassName:oe,children:M,style:Q}=le,te=pe(le,["prefixCls","className","rootClassName","children","style"]),Ut=at("radio",bt),we=((re==null?void 0:re.optionType)||xt)==="button",Ce=we?`${Ut}-button`:Ut,[_e,mt]=It(Ut),X=Object.assign({},te),Pt=g.useContext(Ct.Z);re&&(X.name=re.name,X.onChange=Ne,X.checked=le.value===re.value,X.disabled=(De=X.disabled)!==null&&De!==void 0?De:re.disabled),X.disabled=(Yt=X.disabled)!==null&&Yt!==void 0?Yt:Pt;const At=R()(`${Ce}-wrapper`,{[`${Ce}-wrapper-checked`]:X.checked,[`${Ce}-wrapper-disabled`]:X.disabled,[`${Ce}-wrapper-rtl`]:se==="rtl",[`${Ce}-wrapper-in-form-item`]:Ie},Fe==null?void 0:Fe.className,Jt,oe,mt);return _e(g.createElement(zt.Z,{component:"Radio",disabled:X.disabled},g.createElement("label",{className:At,style:Object.assign(Object.assign({},Fe==null?void 0:Fe.style),Q),onMouseEnter:le.onMouseEnter,onMouseLeave:le.onMouseLeave},g.createElement(et.Z,Object.assign({},X,{className:R()(X.className,!we&&Ot.A),type:"radio",prefixCls:Ce,ref:ge})),M!==void 0?g.createElement("span",null,M):null)))};var Ye=g.forwardRef(xe);const We=g.forwardRef((le,be)=>{const{getPrefixCls:De,direction:Yt}=g.useContext(P.E_),[re,xt]=(0,O.Z)(le.defaultValue,{value:le.value}),at=_t=>{const Vt=re,ae=_t.target.value;"value"in le||xt(ae);const{onChange:fe}=le;fe&&ae!==Vt&&fe(_t)},{prefixCls:se,className:Fe,rootClassName:Re,options:ge,buttonStyle:Ie="outline",disabled:Ne,children:bt,size:Jt,style:oe,id:M,onMouseEnter:Q,onMouseLeave:te,onFocus:Ut,onBlur:we}=le,Ce=De("radio",se),_e=`${Ce}-group`,[mt,X]=It(Ce);let Pt=bt;ge&&ge.length>0&&(Pt=ge.map(_t=>typeof _t=="string"||typeof _t=="number"?g.createElement(Ye,{key:_t.toString(),prefixCls:Ce,disabled:Ne,value:_t,checked:re===_t},_t):g.createElement(Ye,{key:`radio-group-value-options-${_t.value}`,prefixCls:Ce,disabled:_t.disabled||Ne,value:_t.value,checked:re===_t.value,title:_t.title,style:_t.style},_t.label)));const At=(0,b.Z)(Jt),Rt=R()(_e,`${_e}-${Ie}`,{[`${_e}-${At}`]:At,[`${_e}-rtl`]:Yt==="rtl"},Fe,Re,X);return mt(g.createElement("div",Object.assign({},(0,_.Z)(le,{aria:!0,data:!0}),{className:Rt,style:oe,onMouseEnter:Q,onMouseLeave:te,onFocus:Ut,onBlur:we,id:M,ref:be}),g.createElement(I,{value:{onChange:at,value:re,disabled:le.disabled,name:le.name,optionType:le.optionType}},Pt)))});var Oe=g.memo(We),Qe=function(le,be){var De={};for(var Yt in le)Object.prototype.hasOwnProperty.call(le,Yt)&&be.indexOf(Yt)<0&&(De[Yt]=le[Yt]);if(le!=null&&typeof Object.getOwnPropertySymbols=="function")for(var re=0,Yt=Object.getOwnPropertySymbols(le);re<Yt.length;re++)be.indexOf(Yt[re])<0&&Object.prototype.propertyIsEnumerable.call(le,Yt[re])&&(De[Yt[re]]=le[Yt[re]]);return De};const Mt=(le,be)=>{const{getPrefixCls:De}=g.useContext(P.E_),{prefixCls:Yt}=le,re=Qe(le,["prefixCls"]),xt=De("radio",Yt);return g.createElement(N,{value:"button"},g.createElement(Ye,Object.assign({prefixCls:xt},re,{type:"radio",ref:be})))};var ne=g.forwardRef(Mt);const Me=Ye;Me.Button=ne,Me.Group=Oe,Me.__ANT_RADIO=!0;var nn=Me},57809:function(Tt,vt,d){"use strict";var l=d(92310),R=d.n(l),O=d(77861),_=d(2738),g=d(59301),P=d(53487),b=d(62892),A=d(19080),I=d(36355),x=d(1684),k=d(93891),N=d(19716),et=d(32441),tt=d(33234),Ct=d(14154),ut=d(58582),nt=d(84443),kt=d(66339),Nt=function(It,zt){var Ot={};for(var pe in It)Object.prototype.hasOwnProperty.call(It,pe)&&zt.indexOf(pe)<0&&(Ot[pe]=It[pe]);if(It!=null&&typeof Object.getOwnPropertySymbols=="function")for(var xe=0,pe=Object.getOwnPropertySymbols(It);xe<pe.length;xe++)zt.indexOf(pe[xe])<0&&Object.prototype.propertyIsEnumerable.call(It,pe[xe])&&(Ot[pe[xe]]=It[pe[xe]]);return Ot};const Bt="SECRET_COMBOBOX_MODE_DO_NOT_USE",Xt=(It,zt)=>{var Ot,{prefixCls:pe,bordered:xe=!0,className:qt,rootClassName:Ye,getPopupContainer:We,popupClassName:Oe,dropdownClassName:Qe,listHeight:Mt=256,placement:ne,listItemHeight:Me=24,size:nn,disabled:le,notFoundContent:be,status:De,builtinPlacements:Yt,dropdownMatchSelectWidth:re,popupMatchSelectWidth:xt,direction:at,style:se,allowClear:Fe}=It,Re=Nt(It,["prefixCls","bordered","className","rootClassName","getPopupContainer","popupClassName","dropdownClassName","listHeight","placement","listItemHeight","size","disabled","notFoundContent","status","builtinPlacements","dropdownMatchSelectWidth","popupMatchSelectWidth","direction","style","allowClear"]);const{getPopupContainer:ge,getPrefixCls:Ie,renderEmpty:Ne,direction:bt,virtual:Jt,popupMatchSelectWidth:oe,popupOverflow:M,select:Q}=g.useContext(I.E_),te=Ie("select",pe),Ut=Ie(),we=at!=null?at:bt,{compactSize:Ce,compactItemClassnames:_e}=(0,tt.ri)(te,we),[mt,X]=(0,Ct.Z)(te),Pt=g.useMemo(()=>{const{mode:di}=Re;if(di!=="combobox")return di===Bt?"combobox":di},[Re.mode]),At=Pt==="multiple"||Pt==="tags",Rt=(0,nt.Z)(Re.suffixIcon,Re.showArrow),_t=(Ot=xt!=null?xt:re)!==null&&Ot!==void 0?Ot:oe,{status:Vt,hasFeedback:ae,isFormItemInput:fe,feedbackIcon:me}=g.useContext(et.aM),Ze=(0,A.F)(Vt,De);let Ge;be!==void 0?Ge=be:Pt==="combobox"?Ge=null:Ge=(Ne==null?void 0:Ne("Select"))||g.createElement(k.Z,{componentName:"Select"});const{suffixIcon:Ve,itemIcon:rn,removeIcon:wn,clearIcon:on}=(0,kt.Z)(Object.assign(Object.assign({},Re),{multiple:At,hasFeedback:ae,feedbackIcon:me,showSuffixIcon:Rt,prefixCls:te,showArrow:Re.showArrow,componentName:"Select"})),_n=Fe===!0?{clearIcon:on}:Fe,Cn=(0,_.Z)(Re,["suffixIcon","itemIcon"]),Ln=R()(Oe||Qe,{[`${te}-dropdown-${we}`]:we==="rtl"},Ye,X),En=(0,N.Z)(di=>{var Xr;return(Xr=nn!=null?nn:Ce)!==null&&Xr!==void 0?Xr:di}),cr=g.useContext(x.Z),Bn=le!=null?le:cr,br=R()({[`${te}-lg`]:En==="large",[`${te}-sm`]:En==="small",[`${te}-rtl`]:we==="rtl",[`${te}-borderless`]:!xe,[`${te}-in-form-item`]:fe},(0,A.Z)(te,Ze,ae),_e,Q==null?void 0:Q.className,qt,Ye,X),fr=g.useMemo(()=>ne!==void 0?ne:we==="rtl"?"bottomRight":"bottomLeft",[ne,we]),Zr=(0,ut.Z)(Yt,M);return mt(g.createElement(O.ZP,Object.assign({ref:zt,virtual:Jt,showSearch:Q==null?void 0:Q.showSearch},Cn,{style:Object.assign(Object.assign({},Q==null?void 0:Q.style),se),dropdownMatchSelectWidth:_t,builtinPlacements:Zr,transitionName:(0,b.m)(Ut,"slide-up",Re.transitionName),listHeight:Mt,listItemHeight:Me,mode:Pt,prefixCls:te,placement:fr,direction:we,suffixIcon:Ve,menuItemSelectedIcon:rn,removeIcon:wn,allowClear:_n,notFoundContent:Ge,className:br,getPopupContainer:We||ge,dropdownClassName:Ln,disabled:Bn})))},wt=g.forwardRef(Xt),ot=(0,P.Z)(wt);wt.SECRET_COMBOBOX_MODE_DO_NOT_USE=Bt,wt.Option=O.Wx,wt.OptGroup=O.Xo,wt._InternalPanelDoNotUseOrYouWillBeFired=ot,vt.default=wt},14154:function(Tt,vt,d){"use strict";d.d(vt,{Z:function(){return wt}});var l=d(17313),R=d(74207),O=d(37613),_=d(83116),g=d(13826),P=d(92899);const b=ot=>{const{optionHeight:It,optionFontSize:zt,optionLineHeight:Ot,optionPadding:pe}=ot;return{position:"relative",display:"block",minHeight:It,padding:pe,color:ot.colorText,fontWeight:"normal",fontSize:zt,lineHeight:Ot,boxSizing:"border-box"}};var I=ot=>{const{antCls:It,componentCls:zt}=ot,Ot=`${zt}-item`,pe=`&${It}-slide-up-enter${It}-slide-up-enter-active`,xe=`&${It}-slide-up-appear${It}-slide-up-appear-active`,qt=`&${It}-slide-up-leave${It}-slide-up-leave-active`,Ye=`${zt}-dropdown-placement-`;return[{[`${zt}-dropdown`]:Object.assign(Object.assign({},(0,l.Wf)(ot)),{position:"absolute",top:-9999,zIndex:ot.zIndexPopup,boxSizing:"border-box",padding:ot.paddingXXS,overflow:"hidden",fontSize:ot.fontSize,fontVariant:"initial",backgroundColor:ot.colorBgElevated,borderRadius:ot.borderRadiusLG,outline:"none",boxShadow:ot.boxShadowSecondary,[`
|
|
|
${pe}${Ye}bottomLeft,
|
|
|
${xe}${Ye}bottomLeft
|
|
|
`]:{animationName:g.fJ},[`
|
|
|
${pe}${Ye}topLeft,
|
|
|
${xe}${Ye}topLeft,
|
|
|
${pe}${Ye}topRight,
|
|
|
${xe}${Ye}topRight
|
|
|
`]:{animationName:g.Qt},[`${qt}${Ye}bottomLeft`]:{animationName:g.Uw},[`
|
|
|
${qt}${Ye}topLeft,
|
|
|
${qt}${Ye}topRight
|
|
|
`]:{animationName:g.ly},"&-hidden":{display:"none"},[`${Ot}`]:Object.assign(Object.assign({},b(ot)),{cursor:"pointer",transition:`background ${ot.motionDurationSlow} ease`,borderRadius:ot.borderRadiusSM,"&-group":{color:ot.colorTextDescription,fontSize:ot.fontSizeSM,cursor:"default"},"&-option":{display:"flex","&-content":Object.assign({flex:"auto"},l.vS),"&-state":{flex:"none",display:"flex",alignItems:"center"},[`&-active:not(${Ot}-option-disabled)`]:{backgroundColor:ot.optionActiveBg},[`&-selected:not(${Ot}-option-disabled)`]:{color:ot.optionSelectedColor,fontWeight:ot.optionSelectedFontWeight,backgroundColor:ot.optionSelectedBg,[`${Ot}-option-state`]:{color:ot.colorPrimary}},"&-disabled":{[`&${Ot}-option-selected`]:{backgroundColor:ot.colorBgContainerDisabled},color:ot.colorTextDisabled,cursor:"not-allowed"},"&-grouped":{paddingInlineStart:ot.controlPaddingHorizontal*2}}}),"&-rtl":{direction:"rtl"}})},(0,g.oN)(ot,"slide-up"),(0,g.oN)(ot,"slide-down"),(0,P.Fm)(ot,"move-up"),(0,P.Fm)(ot,"move-down")]};const x=2,k=ot=>{let{controlHeightSM:It,controlHeight:zt,lineWidth:Ot}=ot;const pe=(zt-It)/2-Ot,xe=Math.ceil(pe/2);return[pe,xe]};function N(ot,It){const{componentCls:zt,iconCls:Ot}=ot,pe=`${zt}-selection-overflow`,xe=ot.multipleSelectItemHeight,[qt]=k(ot),Ye=It?`${zt}-${It}`:"";return{[`${zt}-multiple${Ye}`]:{fontSize:ot.fontSize,[pe]:{position:"relative",display:"flex",flex:"auto",flexWrap:"wrap",maxWidth:"100%","&-item":{flex:"none",alignSelf:"center",maxWidth:"100%",display:"inline-flex"}},[`${zt}-selector`]:{display:"flex",flexWrap:"wrap",alignItems:"center",padding:`${qt-x}px ${x*2}px`,borderRadius:ot.borderRadius,[`${zt}-show-search&`]:{cursor:"text"},[`${zt}-disabled&`]:{background:ot.multipleSelectorBgDisabled,cursor:"not-allowed"},"&:after":{display:"inline-block",width:0,margin:`${x}px 0`,lineHeight:`${xe}px`,visibility:"hidden",content:'"\\a0"'}},[`
|
|
|
&${zt}-show-arrow ${zt}-selector,
|
|
|
&${zt}-allow-clear ${zt}-selector
|
|
|
`]:{paddingInlineEnd:ot.fontSizeIcon+ot.controlPaddingHorizontal},[`${zt}-selection-item`]:{position:"relative",display:"flex",flex:"none",boxSizing:"border-box",maxWidth:"100%",height:xe,marginTop:x,marginBottom:x,lineHeight:`${xe-ot.lineWidth*2}px`,background:ot.multipleItemBg,border:`${ot.lineWidth}px ${ot.lineType} ${ot.multipleItemBorderColor}`,borderRadius:ot.borderRadiusSM,cursor:"default",transition:`font-size ${ot.motionDurationSlow}, line-height ${ot.motionDurationSlow}, height ${ot.motionDurationSlow}`,userSelect:"none",marginInlineEnd:x*2,paddingInlineStart:ot.paddingXS,paddingInlineEnd:ot.paddingXS/2,[`${zt}-disabled&`]:{color:ot.multipleItemColorDisabled,borderColor:ot.multipleItemBorderColorDisabled,cursor:"not-allowed"},"&-content":{display:"inline-block",marginInlineEnd:ot.paddingXS/2,overflow:"hidden",whiteSpace:"pre",textOverflow:"ellipsis"},"&-remove":Object.assign(Object.assign({},(0,l.Ro)()),{display:"inline-flex",alignItems:"center",color:ot.colorIcon,fontWeight:"bold",fontSize:10,lineHeight:"inherit",cursor:"pointer",[`> ${Ot}`]:{verticalAlign:"-0.2em"},"&:hover":{color:ot.colorIconHover}})},[`${pe}-item + ${pe}-item`]:{[`${zt}-selection-search`]:{marginInlineStart:0}},[`${zt}-selection-search`]:{display:"inline-flex",position:"relative",maxWidth:"100%",marginInlineStart:ot.inputPaddingHorizontalBase-qt,"\n &-input,\n &-mirror\n ":{height:xe,fontFamily:ot.fontFamily,lineHeight:`${xe}px`,transition:`all ${ot.motionDurationSlow}`},"&-input":{width:"100%",minWidth:4.1},"&-mirror":{position:"absolute",top:0,insetInlineStart:0,insetInlineEnd:"auto",zIndex:999,whiteSpace:"pre",visibility:"hidden"}},[`${zt}-selection-placeholder `]:{position:"absolute",top:"50%",insetInlineStart:ot.inputPaddingHorizontalBase,insetInlineEnd:ot.inputPaddingHorizontalBase,transform:"translateY(-50%)",transition:`all ${ot.motionDurationSlow}`}}}}var tt=ot=>{const{componentCls:It}=ot,zt=(0,O.TS)(ot,{controlHeight:ot.controlHeightSM,multipleSelectItemHeight:ot.controlHeightXS,borderRadius:ot.borderRadiusSM,borderRadiusSM:ot.borderRadiusXS}),Ot=(0,O.TS)(ot,{fontSize:ot.fontSizeLG,controlHeight:ot.controlHeightLG,multipleSelectItemHeight:ot.multipleItemHeightLG,borderRadius:ot.borderRadiusLG,borderRadiusSM:ot.borderRadius}),[,pe]=k(ot);return[N(ot),N(zt,"sm"),{[`${It}-multiple${It}-sm`]:{[`${It}-selection-placeholder`]:{insetInline:ot.controlPaddingHorizontalSM-ot.lineWidth},[`${It}-selection-search`]:{marginInlineStart:pe}}},N(Ot,"lg")]};function Ct(ot,It){const{componentCls:zt,inputPaddingHorizontalBase:Ot,borderRadius:pe}=ot,xe=ot.controlHeight-ot.lineWidth*2,qt=Math.ceil(ot.fontSize*1.25),Ye=It?`${zt}-${It}`:"";return{[`${zt}-single${Ye}`]:{fontSize:ot.fontSize,[`${zt}-selector`]:Object.assign(Object.assign({},(0,l.Wf)(ot)),{display:"flex",borderRadius:pe,[`${zt}-selection-search`]:{position:"absolute",top:0,insetInlineStart:Ot,insetInlineEnd:Ot,bottom:0,"&-input":{width:"100%"}},[`
|
|
|
${zt}-selection-item,
|
|
|
${zt}-selection-placeholder
|
|
|
`]:{padding:0,lineHeight:`${xe}px`,transition:`all ${ot.motionDurationSlow}, visibility 0s`,"@supports (-moz-appearance: meterbar)":{lineHeight:`${xe}px`}},[`${zt}-selection-item`]:{position:"relative",userSelect:"none"},[`${zt}-selection-placeholder`]:{transition:"none",pointerEvents:"none"},[["&:after",`${zt}-selection-item:after`,`${zt}-selection-placeholder:after`].join(",")]:{display:"inline-block",width:0,visibility:"hidden",content:'"\\a0"'}}),[`
|
|
|
&${zt}-show-arrow ${zt}-selection-item,
|
|
|
&${zt}-show-arrow ${zt}-selection-placeholder
|
|
|
`]:{paddingInlineEnd:qt},[`&${zt}-open ${zt}-selection-item`]:{color:ot.colorTextPlaceholder},[`&:not(${zt}-customize-input)`]:{[`${zt}-selector`]:{width:"100%",height:ot.controlHeight,padding:`0 ${Ot}px`,[`${zt}-selection-search-input`]:{height:xe},"&:after":{lineHeight:`${xe}px`}}},[`&${zt}-customize-input`]:{[`${zt}-selector`]:{"&:after":{display:"none"},[`${zt}-selection-search`]:{position:"static",width:"100%"},[`${zt}-selection-placeholder`]:{position:"absolute",insetInlineStart:0,insetInlineEnd:0,padding:`0 ${Ot}px`,"&:after":{display:"none"}}}}}}}function ut(ot){const{componentCls:It}=ot,zt=ot.controlPaddingHorizontalSM-ot.lineWidth;return[Ct(ot),Ct((0,O.TS)(ot,{controlHeight:ot.controlHeightSM,borderRadius:ot.borderRadiusSM}),"sm"),{[`${It}-single${It}-sm`]:{[`&:not(${It}-customize-input)`]:{[`${It}-selection-search`]:{insetInlineStart:zt,insetInlineEnd:zt},[`${It}-selector`]:{padding:`0 ${zt}px`},[`&${It}-show-arrow ${It}-selection-search`]:{insetInlineEnd:zt+ot.fontSize*1.5},[`
|
|
|
&${It}-show-arrow ${It}-selection-item,
|
|
|
&${It}-show-arrow ${It}-selection-placeholder
|
|
|
`]:{paddingInlineEnd:ot.fontSize*1.5}}}},Ct((0,O.TS)(ot,{controlHeight:ot.singleItemHeightLG,fontSize:ot.fontSizeLG,borderRadius:ot.borderRadiusLG}),"lg")]}const nt=ot=>{const{componentCls:It,selectorBg:zt}=ot;return{position:"relative",backgroundColor:zt,border:`${ot.lineWidth}px ${ot.lineType} ${ot.colorBorder}`,transition:`all ${ot.motionDurationMid} ${ot.motionEaseInOut}`,input:{cursor:"pointer"},[`${It}-show-search&`]:{cursor:"text",input:{cursor:"auto",color:"inherit"}},[`${It}-disabled&`]:{color:ot.colorTextDisabled,background:ot.colorBgContainerDisabled,cursor:"not-allowed",[`${It}-multiple&`]:{background:ot.multipleSelectorBgDisabled},input:{cursor:"not-allowed"}}}},kt=function(ot,It){let zt=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;const{componentCls:Ot,borderHoverColor:pe,outlineColor:xe,antCls:qt}=It,Ye=zt?{[`${Ot}-selector`]:{borderColor:pe}}:{};return{[ot]:{[`&:not(${Ot}-disabled):not(${Ot}-customize-input):not(${qt}-pagination-size-changer)`]:Object.assign(Object.assign({},Ye),{[`${Ot}-focused& ${Ot}-selector`]:{borderColor:pe,boxShadow:`0 0 0 ${It.controlOutlineWidth}px ${xe}`,outline:0},[`&:hover ${Ot}-selector`]:{borderColor:pe}})}}},Nt=ot=>{const{componentCls:It}=ot;return{[`${It}-selection-search-input`]:{margin:0,padding:0,background:"transparent",border:"none",outline:"none",appearance:"none","&::-webkit-search-cancel-button":{display:"none","-webkit-appearance":"none"}}}},Bt=ot=>{const{componentCls:It,inputPaddingHorizontalBase:zt,iconCls:Ot}=ot;return{[It]:Object.assign(Object.assign({},(0,l.Wf)(ot)),{position:"relative",display:"inline-block",cursor:"pointer",[`&:not(${It}-customize-input) ${It}-selector`]:Object.assign(Object.assign({},nt(ot)),Nt(ot)),[`${It}-selection-item`]:Object.assign({flex:1,fontWeight:"normal"},l.vS),[`${It}-selection-placeholder`]:Object.assign(Object.assign({},l.vS),{flex:1,color:ot.colorTextPlaceholder,pointerEvents:"none"}),[`${It}-arrow`]:Object.assign(Object.assign({},(0,l.Ro)()),{position:"absolute",top:"50%",insetInlineStart:"auto",insetInlineEnd:zt,height:ot.fontSizeIcon,marginTop:-ot.fontSizeIcon/2,color:ot.colorTextQuaternary,fontSize:ot.fontSizeIcon,lineHeight:1,textAlign:"center",pointerEvents:"none",display:"flex",alignItems:"center",[Ot]:{verticalAlign:"top",transition:`transform ${ot.motionDurationSlow}`,"> svg":{verticalAlign:"top"},[`&:not(${It}-suffix)`]:{pointerEvents:"auto"}},[`${It}-disabled &`]:{cursor:"not-allowed"},"> *:not(:last-child)":{marginInlineEnd:8}}),[`${It}-clear`]:{position:"absolute",top:"50%",insetInlineStart:"auto",insetInlineEnd:zt,zIndex:1,display:"inline-block",width:ot.fontSizeIcon,height:ot.fontSizeIcon,marginTop:-ot.fontSizeIcon/2,color:ot.colorTextQuaternary,fontSize:ot.fontSizeIcon,fontStyle:"normal",lineHeight:1,textAlign:"center",textTransform:"none",background:ot.clearBg,cursor:"pointer",opacity:0,transition:`color ${ot.motionDurationMid} ease, opacity ${ot.motionDurationSlow} ease`,textRendering:"auto","&:before":{display:"block"},"&:hover":{color:ot.colorTextTertiary}},"&:hover":{[`${It}-clear`]:{opacity:1}}}),[`${It}-has-feedback`]:{[`${It}-clear`]:{insetInlineEnd:zt+ot.fontSize+ot.paddingXS}}}},Xt=ot=>{const{componentCls:It}=ot;return[{[It]:{[`&-borderless ${It}-selector`]:{backgroundColor:"transparent !important",borderColor:"transparent !important",boxShadow:"none !important"},[`&${It}-in-form-item`]:{width:"100%"}}},Bt(ot),ut(ot),tt(ot),I(ot),{[`${It}-rtl`]:{direction:"rtl"}},kt(It,(0,O.TS)(ot,{borderHoverColor:ot.colorPrimaryHover,outlineColor:ot.controlOutline})),kt(`${It}-status-error`,(0,O.TS)(ot,{borderHoverColor:ot.colorErrorHover,outlineColor:ot.colorErrorOutline}),!0),kt(`${It}-status-warning`,(0,O.TS)(ot,{borderHoverColor:ot.colorWarningHover,outlineColor:ot.colorWarningOutline}),!0),(0,R.c)(ot,{borderElCls:`${It}-selector`,focusElCls:`${It}-focused`})]};var wt=(0,_.Z)("Select",(ot,It)=>{let{rootPrefixCls:zt}=It;const Ot=(0,O.TS)(ot,{rootPrefixCls:zt,inputPaddingHorizontalBase:ot.paddingSM-1,multipleSelectItemHeight:ot.multipleItemHeight});return[Xt(Ot)]},ot=>{const{fontSize:It,lineHeight:zt,controlHeight:Ot,controlPaddingHorizontal:pe,zIndexPopupBase:xe,colorText:qt,fontWeightStrong:Ye,controlItemBgActive:We,controlItemBgHover:Oe,colorBgContainer:Qe,colorFillSecondary:Mt,controlHeightLG:ne,controlHeightSM:Me,colorBgContainerDisabled:nn,colorTextDisabled:le}=ot;return{zIndexPopup:xe+50,optionSelectedColor:qt,optionSelectedFontWeight:Ye,optionSelectedBg:We,optionActiveBg:Oe,optionPadding:`${(Ot-It*zt)/2}px ${pe}px`,optionFontSize:It,optionLineHeight:zt,optionHeight:Ot,selectorBg:Qe,clearBg:Qe,singleItemHeightLG:ne,multipleItemBg:Mt,multipleItemBorderColor:"transparent",multipleItemHeight:Me,multipleItemHeightLG:Ot,multipleSelectorBgDisabled:nn,multipleItemColorDisabled:le,multipleItemBorderColorDisabled:"transparent"}})},58582:function(Tt,vt,d){"use strict";d.d(vt,{Z:function(){return R}});const l=O=>{const g={overflow:{adjustX:!0,adjustY:!0,shiftY:!0},htmlRegion:O==="scroll"?"scroll":"visible",_experimental:{dynamicInset:!0}};return{bottomLeft:Object.assign(Object.assign({},g),{points:["tl","bl"],offset:[0,4]}),bottomRight:Object.assign(Object.assign({},g),{points:["tr","br"],offset:[0,4]}),topLeft:Object.assign(Object.assign({},g),{points:["bl","tl"],offset:[0,-4]}),topRight:Object.assign(Object.assign({},g),{points:["br","tr"],offset:[0,-4]})}};function R(O,_){return O||l(_)}},84443:function(Tt,vt,d){"use strict";d.d(vt,{Z:function(){return l}});function l(R,O){return O!==void 0?O:R!==null}},66339:function(Tt,vt,d){"use strict";d.d(vt,{Z:function(){return A}});var l=d(40001),R=d(19248),O=d(99267),_=d(84105),g=d(58617),P=d(47472),b=d(59301);function A(I){let{suffixIcon:x,clearIcon:k,menuItemSelectedIcon:N,removeIcon:et,loading:tt,multiple:Ct,hasFeedback:ut,prefixCls:nt,showSuffixIcon:kt,feedbackIcon:Nt,showArrow:Bt,componentName:Xt}=I;const wt=k!=null?k:b.createElement(R.Z,null),ot=pe=>x===null&&!ut&&!Bt?null:b.createElement(b.Fragment,null,kt!==!1&&pe,ut&&Nt);let It=null;if(x!==void 0)It=ot(x);else if(tt)It=ot(b.createElement(g.Z,{spin:!0}));else{const pe=`${nt}-suffix`;It=xe=>{let{open:qt,showSearch:Ye}=xe;return ot(qt&&Ye?b.createElement(P.Z,{className:pe}):b.createElement(_.Z,{className:pe}))}}let zt=null;N!==void 0?zt=N:Ct?zt=b.createElement(l.Z,null):zt=null;let Ot=null;return et!==void 0?Ot=et:Ot=b.createElement(O.Z,null),{clearIcon:wt,suffixIcon:It,itemIcon:zt,removeIcon:Ot}}},8378:function(Tt,vt){"use strict";const d=l=>({[l.componentCls]:{[`${l.antCls}-motion-collapse-legacy`]:{overflow:"hidden","&-active":{transition:`height ${l.motionDurationMid} ${l.motionEaseInOut},
|
|
|
opacity ${l.motionDurationMid} ${l.motionEaseInOut} !important`}},[`${l.antCls}-motion-collapse`]:{overflow:"hidden",transition:`height ${l.motionDurationMid} ${l.motionEaseInOut},
|
|
|
opacity ${l.motionDurationMid} ${l.motionEaseInOut} !important`}}});vt.Z=d},92899:function(Tt,vt,d){"use strict";d.d(vt,{Fm:function(){return N}});var l=d(36237),R=d(95406);const O=new l.Keyframes("antMoveDownIn",{"0%":{transform:"translate3d(0, 100%, 0)",transformOrigin:"0 0",opacity:0},"100%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1}}),_=new l.Keyframes("antMoveDownOut",{"0%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1},"100%":{transform:"translate3d(0, 100%, 0)",transformOrigin:"0 0",opacity:0}}),g=new l.Keyframes("antMoveLeftIn",{"0%":{transform:"translate3d(-100%, 0, 0)",transformOrigin:"0 0",opacity:0},"100%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1}}),P=new l.Keyframes("antMoveLeftOut",{"0%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1},"100%":{transform:"translate3d(-100%, 0, 0)",transformOrigin:"0 0",opacity:0}}),b=new l.Keyframes("antMoveRightIn",{"0%":{transform:"translate3d(100%, 0, 0)",transformOrigin:"0 0",opacity:0},"100%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1}}),A=new l.Keyframes("antMoveRightOut",{"0%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1},"100%":{transform:"translate3d(100%, 0, 0)",transformOrigin:"0 0",opacity:0}}),I=new l.Keyframes("antMoveUpIn",{"0%":{transform:"translate3d(0, -100%, 0)",transformOrigin:"0 0",opacity:0},"100%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1}}),x=new l.Keyframes("antMoveUpOut",{"0%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1},"100%":{transform:"translate3d(0, -100%, 0)",transformOrigin:"0 0",opacity:0}}),k={"move-up":{inKeyframes:I,outKeyframes:x},"move-down":{inKeyframes:O,outKeyframes:_},"move-left":{inKeyframes:g,outKeyframes:P},"move-right":{inKeyframes:b,outKeyframes:A}},N=(et,tt)=>{const{antCls:Ct}=et,ut=`${Ct}-${tt}`,{inKeyframes:nt,outKeyframes:kt}=k[tt];return[(0,R.R)(ut,nt,kt,et.motionDurationMid),{[`
|
|
|
${ut}-enter,
|
|
|
${ut}-appear
|
|
|
`]:{opacity:0,animationTimingFunction:et.motionEaseOutCirc},[`${ut}-leave`]:{animationTimingFunction:et.motionEaseInOutCirc}}]}},13826:function(Tt,vt,d){"use strict";d.d(vt,{Qt:function(){return g},Uw:function(){return _},fJ:function(){return O},ly:function(){return P},oN:function(){return N}});var l=d(36237),R=d(95406);const O=new l.Keyframes("antSlideUpIn",{"0%":{transform:"scaleY(0.8)",transformOrigin:"0% 0%",opacity:0},"100%":{transform:"scaleY(1)",transformOrigin:"0% 0%",opacity:1}}),_=new l.Keyframes("antSlideUpOut",{"0%":{transform:"scaleY(1)",transformOrigin:"0% 0%",opacity:1},"100%":{transform:"scaleY(0.8)",transformOrigin:"0% 0%",opacity:0}}),g=new l.Keyframes("antSlideDownIn",{"0%":{transform:"scaleY(0.8)",transformOrigin:"100% 100%",opacity:0},"100%":{transform:"scaleY(1)",transformOrigin:"100% 100%",opacity:1}}),P=new l.Keyframes("antSlideDownOut",{"0%":{transform:"scaleY(1)",transformOrigin:"100% 100%",opacity:1},"100%":{transform:"scaleY(0.8)",transformOrigin:"100% 100%",opacity:0}}),b=new l.Keyframes("antSlideLeftIn",{"0%":{transform:"scaleX(0.8)",transformOrigin:"0% 0%",opacity:0},"100%":{transform:"scaleX(1)",transformOrigin:"0% 0%",opacity:1}}),A=new l.Keyframes("antSlideLeftOut",{"0%":{transform:"scaleX(1)",transformOrigin:"0% 0%",opacity:1},"100%":{transform:"scaleX(0.8)",transformOrigin:"0% 0%",opacity:0}}),I=new l.Keyframes("antSlideRightIn",{"0%":{transform:"scaleX(0.8)",transformOrigin:"100% 0%",opacity:0},"100%":{transform:"scaleX(1)",transformOrigin:"100% 0%",opacity:1}}),x=new l.Keyframes("antSlideRightOut",{"0%":{transform:"scaleX(1)",transformOrigin:"100% 0%",opacity:1},"100%":{transform:"scaleX(0.8)",transformOrigin:"100% 0%",opacity:0}}),k={"slide-up":{inKeyframes:O,outKeyframes:_},"slide-down":{inKeyframes:g,outKeyframes:P},"slide-left":{inKeyframes:b,outKeyframes:A},"slide-right":{inKeyframes:I,outKeyframes:x}},N=(et,tt)=>{const{antCls:Ct}=et,ut=`${Ct}-${tt}`,{inKeyframes:nt,outKeyframes:kt}=k[tt];return[(0,R.R)(ut,nt,kt,et.motionDurationMid),{[`
|
|
|
${ut}-enter,
|
|
|
${ut}-appear
|
|
|
`]:{transform:"scale(0)",transformOrigin:"0% 0%",opacity:0,animationTimingFunction:et.motionEaseOutQuint,"&-prepare":{transform:"scale(1)"}},[`${ut}-leave`]:{animationTimingFunction:et.motionEaseInQuint}}]}},80574:function(Tt,vt,d){"use strict";d.d(vt,{Ae:function(){return nt},CF:function(){return Ut},vC:function(){return oe},x1:function(){return P}});function l(mt,X,Pt,At,Rt,_t){const Vt=mt,ae=X,fe=Pt-Vt,me=At-ae;let Ze=Rt-Vt,Ge=_t-ae,Ve=Ze*fe+Ge*me,rn=0;Ve<=0?rn=0:(Ze=fe-Ze,Ge=me-Ge,Ve=Ze*fe+Ge*me,Ve<=0?rn=0:rn=Ve*Ve/(fe*fe+me*me));const wn=Ze*Ze+Ge*Ge-rn;return wn<0?0:wn}function R(mt,X,Pt,At){return(mt-Pt)*(mt-Pt)+(X-At)*(X-At)}function O(mt,X,Pt,At,Rt){return R(mt,X,Pt,At)<Rt*Rt}function _(mt){if(!Number.isFinite(mt))return Pt=>Pt;if(mt===0)return Math.round;const X=Math.pow(10,mt);return Pt=>Math.round(Pt*X)/X}function g(mt){const X=Math.min(mt.x1,mt.x2),Pt=Math.max(mt.x1,mt.x2),At=Math.min(mt.y1,mt.y2),Rt=Math.max(mt.y1,mt.y2);return{x:X,y:At,x2:Pt,y2:Rt,width:Pt-X,height:Rt-At}}class P{constructor(X,Pt,At,Rt){this.x1=X,this.y1=Pt,this.x2=At,this.y2=Rt}equals(X){return this.x1===X.x1&&this.y1===X.y1&&this.x2===X.x2&&this.y2===X.y2}draw(X){X.moveTo(this.x1,this.y1),X.lineTo(this.x2,this.y2)}toString(){return`Line(from=(${this.x1},${this.y1}),to=(${this.x2},${this.y2}))`}static from(X){return new P(X.x1,X.y1,X.x2,X.y2)}cuts(X,Pt){if(this.y1===this.y2||Pt<this.y1&&Pt<=this.y2||Pt>this.y1&&Pt>=this.y2||X>this.x1&&X>=this.x2)return!1;if(X<this.x1&&X<=this.x2)return!0;const At=this.x1+(Pt-this.y1)*(this.x2-this.x1)/(this.y2-this.y1);return X<=At}distSquare(X,Pt){return l(this.x1,this.y1,this.x2,this.y2,X,Pt)}ptClose(X,Pt,At){if(this.x1<this.x2){if(X<this.x1-At||X>this.x2+At)return!1}else if(X<this.x2-At||X>this.x1+At)return!1;if(this.y1<this.y2){if(Pt<this.y1-At||Pt>this.y2+At)return!1}else if(Pt<this.y2-At||Pt>this.y1+At)return!1;return!0}}var b;(function(mt){mt[mt.POINT=1]="POINT",mt[mt.PARALLEL=2]="PARALLEL",mt[mt.COINCIDENT=3]="COINCIDENT",mt[mt.NONE=4]="NONE"})(b||(b={}));class A{constructor(X,Pt=0,At=0){this.state=X,this.x=Pt,this.y=At}}function I(mt,X){const Pt=(X.x2-X.x1)*(mt.y1-X.y1)-(X.y2-X.y1)*(mt.x1-X.x1),At=(mt.x2-mt.x1)*(mt.y1-X.y1)-(mt.y2-mt.y1)*(mt.x1-X.x1),Rt=(X.y2-X.y1)*(mt.x2-mt.x1)-(X.x2-X.x1)*(mt.y2-mt.y1);if(Rt){const _t=Pt/Rt,Vt=At/Rt;return 0<=_t&&_t<=1&&0<=Vt&&Vt<=1?new A(b.POINT,mt.x1+_t*(mt.x2-mt.x1),mt.y1+_t*(mt.y2-mt.y1)):new A(b.NONE)}return new A(Pt===0||At===0?b.COINCIDENT:b.PARALLEL)}function x(mt,X){const Pt=(X.x2-X.x1)*(mt.y1-X.y1)-(X.y2-X.y1)*(mt.x1-X.x1),At=(mt.x2-mt.x1)*(mt.y1-X.y1)-(mt.y2-mt.y1)*(mt.x1-X.x1),Rt=(X.y2-X.y1)*(mt.x2-mt.x1)-(X.x2-X.x1)*(mt.y2-mt.y1);if(Rt){const _t=Pt/Rt,Vt=At/Rt;if(0<=_t&&_t<=1&&0<=Vt&&Vt<=1)return _t}return Number.POSITIVE_INFINITY}function k(mt,X){function Pt(Rt,_t,Vt,ae){let fe=x(X,new P(Rt,_t,Vt,ae));return fe=Math.abs(fe-.5),fe>=0&&fe<=1?1:0}let At=Pt(mt.x,mt.y,mt.x2,mt.y);return At+=Pt(mt.x,mt.y,mt.x,mt.y2),At>1||(At+=Pt(mt.x,mt.y2,mt.x2,mt.y2),At>1)?!0:(At+=Pt(mt.x2,mt.y,mt.x2,mt.y2),At>0)}var N;(function(mt){mt[mt.LEFT=0]="LEFT",mt[mt.TOP=1]="TOP",mt[mt.RIGHT=2]="RIGHT",mt[mt.BOTTOM=3]="BOTTOM"})(N||(N={}));function et(mt,X,Pt){const At=new Set;return mt.width<=0?(At.add(N.LEFT),At.add(N.RIGHT)):X<mt.x?At.add(N.LEFT):X>mt.x+mt.width&&At.add(N.RIGHT),mt.height<=0?(At.add(N.TOP),At.add(N.BOTTOM)):Pt<mt.y?At.add(N.TOP):Pt>mt.y+mt.height&&At.add(N.BOTTOM),At}function tt(mt,X){let Pt=X.x1,At=X.y1;const Rt=X.x2,_t=X.y2,Vt=Array.from(et(mt,Rt,_t));if(Vt.length===0)return!0;let ae=et(mt,Pt,At);for(;ae.size!==0;){for(const fe of Vt)if(ae.has(fe))return!1;if(ae.has(N.RIGHT)||ae.has(N.LEFT)){let fe=mt.x;ae.has(N.RIGHT)&&(fe+=mt.width),At=At+(fe-Pt)*(_t-At)/(Rt-Pt),Pt=fe}else{let fe=mt.y;ae.has(N.BOTTOM)&&(fe+=mt.height),Pt=Pt+(fe-At)*(Rt-Pt)/(_t-At),At=fe}ae=et(mt,Pt,At)}return!0}function Ct(mt,X){let Pt=Number.POSITIVE_INFINITY,At=0;function Rt(_t,Vt,ae,fe){let me=x(X,new P(_t,Vt,ae,fe));me=Math.abs(me-.5),me>=0&&me<=1&&(At++,me<Pt&&(Pt=me))}return Rt(mt.x,mt.y,mt.x2,mt.y),Rt(mt.x,mt.y,mt.x,mt.y2),At>1||(Rt(mt.x,mt.y2,mt.x2,mt.y2),At>1)?Pt:(Rt(mt.x2,mt.y,mt.x2,mt.y2),At===0?-1:Pt)}function ut(mt,X){let Pt=0;const At=I(mt,new P(X.x,X.y,X.x2,X.y));Pt+=At.state===b.POINT?1:0;const Rt=I(mt,new P(X.x,X.y,X.x,X.y2));Pt+=Rt.state===b.POINT?1:0;const _t=I(mt,new P(X.x,X.y2,X.x2,X.y2));Pt+=_t.state===b.POINT?1:0;const Vt=I(mt,new P(X.x2,X.y,X.x2,X.y2));return Pt+=Vt.state===b.POINT?1:0,{top:At,left:Rt,bottom:_t,right:Vt,count:Pt}}class nt{constructor(X,Pt,At,Rt){this.x=X,this.y=Pt,this.width=At,this.height=Rt}get x2(){return this.x+this.width}get y2(){return this.y+this.height}get cx(){return this.x+this.width/2}get cy(){return this.y+this.height/2}get radius(){return Math.max(this.width,this.height)/2}static from(X){return new nt(X.x,X.y,X.width,X.height)}equals(X){return this.x===X.x&&this.y===X.y&&this.width===X.width&&this.height===X.height}clone(){return new nt(this.x,this.y,this.width,this.height)}add(X){const Pt=Math.min(this.x,X.x),At=Math.min(this.y,X.y),Rt=Math.max(this.x2,X.x+X.width),_t=Math.max(this.y2,X.y+X.height);this.x=Pt,this.y=At,this.width=Rt-Pt,this.height=_t-At}addPoint(X){const Pt=Math.min(this.x,X.x),At=Math.min(this.y,X.y),Rt=Math.max(this.x2,X.x),_t=Math.max(this.y2,X.y);this.x=Pt,this.y=At,this.width=Rt-Pt,this.height=_t-At}toString(){return`Rectangle[x=${this.x}, y=${this.y}, w=${this.width}, h=${this.height}]`}draw(X){X.rect(this.x,this.y,this.width,this.height)}containsPt(X,Pt){return X>=this.x&&X<=this.x2&&Pt>=this.y&&Pt<=this.y2}get area(){return this.width*this.height}intersects(X){return this.area<=0||X.width<=0||X.height<=0?!1:X.x+X.width>this.x&&X.y+X.height>this.y&&X.x<this.x2&&X.y<this.y2}distSquare(X,Pt){if(this.containsPt(X,Pt))return 0;const At=et(this,X,Pt);return At.has(N.TOP)?At.has(N.LEFT)?R(X,Pt,this.x,this.y):At.has(N.RIGHT)?R(X,Pt,this.x2,this.y):(this.y-Pt)*(this.y-Pt):At.has(N.BOTTOM)?At.has(N.LEFT)?R(X,Pt,this.x,this.y2):At.has(N.RIGHT)?R(X,Pt,this.x2,this.y2):(Pt-this.y2)*(Pt-this.y2):At.has(N.LEFT)?(this.x-X)*(this.x-X):At.has(N.RIGHT)?(X-this.x2)*(X-this.x2):0}}function kt(mt){if(mt.length===0)return null;const X=mt[0],Pt=new nt(X.x,X.y,0,0);for(const At of mt)Pt.addPoint(At);return Pt}class Nt{constructor(X,Pt,At){this.cx=X,this.cy=Pt,this.radius=At}get x(){return this.cx-this.radius}get x2(){return this.cx+this.radius}get width(){return this.radius*2}get y(){return this.cy-this.radius}get y2(){return this.cy+this.radius}get height(){return this.radius*2}static from(X){return new Nt(X.cx,X.cy,X.radius)}containsPt(X,Pt){return R(this.cx,this.cy,X,Pt)<this.radius*this.radius}distSquare(X,Pt){const At=R(this.cx,this.cy,X,Pt);if(At<this.radius*this.radius)return 0;const Rt=Math.sqrt(At)-this.radius;return Rt*Rt}draw(X){X.ellipse(this.cx,this.cy,this.radius,this.radius,0,0,Math.PI*2)}}class Bt{constructor(X,Pt=0,At=0,Rt=0,_t=0,Vt=10,ae=10,fe=new Float32Array(Math.max(0,Vt*ae)).fill(0)){this.pixelGroup=X,this.i=Pt,this.j=At,this.pixelX=Rt,this.pixelY=_t,this.width=Vt,this.height=ae,this.area=fe}createSub(X,Pt){return new Bt(this.pixelGroup,X.x,X.y,Pt.x,Pt.y,X.width,X.height)}static fromPixelRegion(X,Pt){return new Bt(Pt,0,0,X.x,X.y,Math.ceil(X.width/Pt),Math.ceil(X.height/Pt))}copy(X,Pt){return new Bt(this.pixelGroup,this.scaleX(Pt.x),this.scaleY(Pt.y),Pt.x,Pt.y,X.width,X.height,X.area)}boundX(X){return X<this.i?this.i:X>=this.width?this.width-1:X}boundY(X){return X<this.j?this.j:X>=this.height?this.height-1:X}scaleX(X){return this.boundX(Math.floor((X-this.pixelX)/this.pixelGroup))}scaleY(X){return this.boundY(Math.floor((X-this.pixelY)/this.pixelGroup))}scale(X){const Pt=this.scaleX(X.x),At=this.scaleY(X.y),Rt=this.boundX(Math.ceil((X.x+X.width-this.pixelX)/this.pixelGroup)),_t=this.boundY(Math.ceil((X.y+X.height-this.pixelY)/this.pixelGroup)),Vt=Rt-Pt,ae=_t-At;return new nt(Pt,At,Vt,ae)}invertScaleX(X){return Math.round(X*this.pixelGroup+this.pixelX)}invertScaleY(X){return Math.round(X*this.pixelGroup+this.pixelY)}addPadding(X,Pt){const At=Math.ceil(Pt/this.pixelGroup),Rt=this.boundX(X.x-At),_t=this.boundY(X.y-At),Vt=this.boundX(X.x2+At),ae=this.boundY(X.y2+At),fe=Vt-Rt,me=ae-_t;return new nt(Rt,_t,fe,me)}get(X,Pt){return X<0||Pt<0||X>=this.width||Pt>=this.height?Number.NaN:this.area[X+Pt*this.width]}inc(X,Pt,At){X<0||Pt<0||X>=this.width||Pt>=this.height||(this.area[X+Pt*this.width]+=At)}set(X,Pt,At){X<0||Pt<0||X>=this.width||Pt>=this.height||(this.area[X+Pt*this.width]=At)}incArea(X,Pt){if(X.width<=0||X.height<=0||Pt===0)return;const At=this.width,Rt=X.width,_t=Math.max(0,X.i),Vt=Math.max(0,X.j),ae=Math.min(X.i+X.width,At),fe=Math.min(X.j+X.height,this.height);if(!(fe<=0||ae<=0||_t>=At||fe>=this.height))for(let me=Vt;me<fe;me++){const Ze=(me-X.j)*Rt,Ge=me*At;for(let Ve=_t;Ve<ae;Ve++){const rn=X.area[Ve-X.i+Ze];rn!==0&&(this.area[Ve+Ge]+=Pt*rn)}}}fill(X){this.area.fill(X)}fillArea(X,Pt){const At=X.x+X.y*this.width;for(let Rt=0;Rt<X.height;Rt++){const _t=At+Rt*this.width;this.area.fill(Pt,_t,_t+X.width)}}fillHorizontalLine(X,Pt,At,Rt){const _t=X+Pt*this.width;this.area.fill(Rt,_t,_t+At)}fillVerticalLine(X,Pt,At,Rt){const _t=X+Pt*this.width;for(let Vt=0;Vt<At;Vt++)this.area[_t+Vt*this.width]=Rt}clear(){this.area.fill(0)}toString(){let X="";for(let Pt=0;Pt<this.height;Pt++){const At=Pt*this.width;for(let Rt=0;Rt<this.width;Rt++){const _t=this.area[At+Rt];X+=_t.toFixed(1).padStart(6),X+=" "}X+=`
|
|
|
`}return X}draw(X,Pt=!0){if(this.width<=0||this.height<=0)return;X.save(),Pt&&X.translate(this.pixelX,this.pixelY);const At=this.area.reduce((Vt,ae)=>Math.min(Vt,ae),Number.POSITIVE_INFINITY),Rt=this.area.reduce((Vt,ae)=>Math.max(Vt,ae),Number.NEGATIVE_INFINITY),_t=Vt=>(Vt-At)/(Rt-At);X.scale(this.pixelGroup,this.pixelGroup);for(let Vt=0;Vt<this.width;Vt++)for(let ae=0;ae<this.height;ae++){const fe=this.area[Vt+ae*this.width];X.fillStyle=`rgba(0, 0, 0, ${_t(fe)})`,X.fillRect(Vt,ae,1,1)}X.restore()}drawThreshold(X,Pt,At=!0){if(!(this.width<=0||this.height<=0)){X.save(),At&&X.translate(this.pixelX,this.pixelY),X.scale(this.pixelGroup,this.pixelGroup);for(let Rt=0;Rt<this.width;Rt++)for(let _t=0;_t<this.height;_t++){const Vt=this.area[Rt+_t*this.width];X.fillStyle=Vt>Pt?"black":"white",X.fillRect(Rt,_t,1,1)}X.restore()}}}function Xt(mt,X){const Pt=At=>({x:At.x-X,y:At.y-X,width:At.width+2*X,height:At.height+2*X});return Array.isArray(mt)?mt.map(Pt):Pt(mt)}function wt(mt,X,Pt){return ot(Object.assign(g(mt),{distSquare:(At,Rt)=>l(mt.x1,mt.y1,mt.x2,mt.y2,At,Rt)}),X,Pt)}function ot(mt,X,Pt){const At=Xt(mt,Pt),Rt=X.scale(At),_t=X.createSub(Rt,At);return It(_t,X,Pt,(Vt,ae)=>mt.distSquare(Vt,ae)),_t}function It(mt,X,Pt,At){const Rt=Pt*Pt;for(let _t=0;_t<mt.height;_t++)for(let Vt=0;Vt<mt.width;Vt++){const ae=X.invertScaleX(mt.i+Vt),fe=X.invertScaleY(mt.j+_t),me=At(ae,fe);if(me===0){mt.set(Vt,_t,Rt);continue}if(me<Rt){const Ze=Pt-Math.sqrt(me);mt.set(Vt,_t,Ze*Ze)}}return mt}function zt(mt,X,Pt){const At=X.scale(mt),Rt=X.addPadding(At,Pt),_t=X.createSub(Rt,{x:mt.x-Pt,y:mt.y-Pt}),Vt=At.x-Rt.x,ae=At.y-Rt.y,fe=Rt.x2-At.x2,me=Rt.y2-At.y2,Ze=Rt.width-Vt-fe,Ge=Rt.height-ae-me,Ve=Pt*Pt;_t.fillArea({x:Vt,y:ae,width:Ze+1,height:Ge+1},Ve);const rn=[0],wn=Math.max(ae,Vt,fe,me);{const Ln=X.invertScaleX(At.x+At.width/2);for(let En=1;En<wn;En++){const cr=X.invertScaleY(At.y-En),Bn=mt.distSquare(Ln,cr);if(Bn<Ve){const br=Pt-Math.sqrt(Bn);rn.push(br*br)}else break}}const on=[],_n=Math.max(Vt,fe),Cn=Math.max(ae,fe);for(let Ln=1;Ln<_n;Ln++){const En=X.invertScaleX(At.x-Ln),cr=[];for(let Bn=1;Bn<Cn;Bn++){const br=X.invertScaleY(At.y-Bn),fr=mt.distSquare(En,br);if(fr<Ve){const Zr=Pt-Math.sqrt(fr);cr.push(Zr*Zr)}else cr.push(0)}on.push(cr)}for(let Ln=1;Ln<Math.min(ae,rn.length);Ln++){const En=rn[Ln];_t.fillHorizontalLine(Vt,ae-Ln,Ze+1,En)}for(let Ln=1;Ln<Math.min(me,rn.length);Ln++){const En=rn[Ln];_t.fillHorizontalLine(Vt,ae+Ge+Ln,Ze+1,En)}for(let Ln=1;Ln<Math.min(Vt,rn.length);Ln++){const En=rn[Ln];_t.fillVerticalLine(Vt-Ln,ae,Ge+1,En)}for(let Ln=1;Ln<Math.min(me,rn.length);Ln++){const En=rn[Ln];_t.fillVerticalLine(Vt+Ze+Ln,ae,Ge+1,En)}for(let Ln=1;Ln<Vt;Ln++){const En=on[Ln-1],cr=Vt-Ln;for(let Bn=1;Bn<ae;Bn++)_t.set(cr,ae-Bn,En[Bn-1]);for(let Bn=1;Bn<me;Bn++)_t.set(cr,ae+Ge+Bn,En[Bn-1])}for(let Ln=1;Ln<fe;Ln++){const En=on[Ln-1],cr=Vt+Ze+Ln;for(let Bn=1;Bn<ae;Bn++)_t.set(cr,ae-Bn,En[Bn-1]);for(let Bn=1;Bn<me;Bn++)_t.set(cr,ae+Ge+Bn,En[Bn-1])}return _t}function Ot(mt,X,Pt,At){return{x:mt,y:X,width:Pt,height:At}}function pe(mt,X,Pt){return{cx:mt,cy:X,radius:Pt}}function xe(mt,X,Pt,At){return{x1:mt,y1:X,x2:Pt,y2:At}}function qt(mt,X){return{x:mt,y:X}}function Ye(mt,X,Pt,At){if(mt.length===0)return[];const Rt=ne(mt);return Rt.map((_t,Vt)=>{const ae=Rt.slice(0,Vt);return We(X,_t,ae,Pt,At)}).flat()}function We(mt,X,Pt,At,Rt){const _t=qt(X.cx,X.cy),Vt=Mt(_t,Pt,mt);if(Vt==null)return[];const ae=new P(_t.x,_t.y,Vt.cx,Vt.cy),fe=Oe(ae,mt,At,Rt);return Qe(fe,mt)}function Oe(mt,X,Pt,At){const Rt=[],_t=[];_t.push(mt);let Vt=!0;for(let ae=0;ae<Pt&&Vt;ae++)for(Vt=!1;!Vt&&_t.length>0;){const fe=_t.pop(),me=le(X,fe),Ze=me?ut(fe,me):null;if(!me||!Ze||Ze.count!==2){Vt||Rt.push(fe);continue}let Ge=At,Ve=De(me,Ge,Ze,!0),rn=nn(Ve,_t)||nn(Ve,Rt),wn=Me(Ve,X);for(;!rn&&wn&&Ge>=1;)Ge/=1.5,Ve=De(me,Ge,Ze,!0),rn=nn(Ve,_t)||nn(Ve,Rt),wn=Me(Ve,X);if(Ve&&!rn&&!wn&&(_t.push(new P(fe.x1,fe.y1,Ve.x,Ve.y)),_t.push(new P(Ve.x,Ve.y,fe.x2,fe.y2)),Vt=!0),Vt)continue;Ge=At,Ve=De(me,Ge,Ze,!1);let on=nn(Ve,_t)||nn(Ve,Rt);for(wn=Me(Ve,X);!on&&wn&&Ge>=1;)Ge/=1.5,Ve=De(me,Ge,Ze,!1),on=nn(Ve,_t)||nn(Ve,Rt),wn=Me(Ve,X);Ve&&!on&&(_t.push(new P(fe.x1,fe.y1,Ve.x,Ve.y)),_t.push(new P(Ve.x,Ve.y,fe.x2,fe.y2)),Vt=!0),Vt||Rt.push(fe)}for(;_t.length>0;)Rt.push(_t.pop());return Rt}function Qe(mt,X){const Pt=[];for(;mt.length>0;){const At=mt.pop();if(mt.length===0){Pt.push(At);break}const Rt=mt.pop(),_t=new P(At.x1,At.y1,Rt.x2,Rt.y2);le(X,_t)?(Pt.push(At),mt.push(Rt)):mt.push(_t)}return Pt}function Mt(mt,X,Pt){let At=Number.POSITIVE_INFINITY;return X.reduce((Rt,_t)=>{const Vt=R(mt.x,mt.y,_t.cx,_t.cy);if(Vt>At)return Rt;const ae=new P(mt.x,mt.y,_t.cx,_t.cy),fe=be(Pt,ae);return Vt*(fe+1)*(fe+1)<At&&(Rt=_t,At=Vt*(fe+1)*(fe+1)),Rt},null)}function ne(mt){if(mt.length<2)return mt;let X=0,Pt=0;return mt.forEach(At=>{X+=At.cx,Pt+=At.cy}),X/=mt.length,Pt/=mt.length,mt.map(At=>{const Rt=X-At.cx,_t=Pt-At.cy,Vt=Rt*Rt+_t*_t;return[At,Vt]}).sort((At,Rt)=>At[1]-Rt[1]).map(At=>At[0])}function Me(mt,X){return X.some(Pt=>Pt.containsPt(mt.x,mt.y))}function nn(mt,X){return X.some(Pt=>!!(O(Pt.x1,Pt.y1,mt.x,mt.y,.001)||O(Pt.x2,Pt.y2,mt.x,mt.y,.001)))}function le(mt,X){let Pt=Number.POSITIVE_INFINITY,At=null;for(const Rt of mt){if(!tt(Rt,X))continue;const _t=Ct(Rt,X);_t>=0&&_t<Pt&&(At=Rt,Pt=_t)}return At}function be(mt,X){return mt.reduce((Pt,At)=>tt(At,X)&&k(At,X)?Pt+1:Pt,0)}function De(mt,X,Pt,At){const Rt=Pt.top,_t=Pt.left,Vt=Pt.bottom,ae=Pt.right;if(At){if(_t.state===b.POINT){if(Rt.state===b.POINT)return qt(mt.x-X,mt.y-X);if(Vt.state===b.POINT)return qt(mt.x-X,mt.y2+X);const Ve=mt.width*mt.height;return mt.width*((_t.y-mt.y+(ae.y-mt.y))*.5)<Ve*.5?_t.y>ae.y?qt(mt.x-X,mt.y-X):qt(mt.x2+X,mt.y-X):_t.y<ae.y?qt(mt.x-X,mt.y2+X):qt(mt.x2+X,mt.y2+X)}if(ae.state===b.POINT){if(Rt.state===b.POINT)return qt(mt.x2+X,mt.y-X);if(Vt.state===b.POINT)return qt(mt.x2+X,mt.y2+X)}const Ze=mt.height*mt.width;return mt.height*((Rt.x-mt.x+(ae.x-mt.x))*.5)<Ze*.5?Rt.x>Vt.x?qt(mt.x-X,mt.y-X):qt(mt.x-X,mt.y2+X):Rt.x<Vt.x?qt(mt.x2+X,mt.y-X):qt(mt.x2+X,mt.y2+X)}if(_t.state===b.POINT){if(Rt.state===b.POINT)return qt(mt.x2+X,mt.y2+X);if(Vt.state===b.POINT)return qt(mt.x2+X,mt.y-X);const Ze=mt.height*mt.width;return mt.width*((_t.y-mt.y+(ae.y-mt.y))*.5)<Ze*.5?_t.y>ae.y?qt(mt.x2+X,mt.y2+X):qt(mt.x-X,mt.y2+X):_t.y<ae.y?qt(mt.x2+X,mt.y-X):qt(mt.x-X,mt.y-X)}if(ae.state===b.POINT){if(Rt.state===b.POINT)return qt(mt.x-X,mt.y2+X);if(Vt.state===b.POINT)return qt(mt.x-X,mt.y-X)}const fe=mt.height*mt.width;return mt.height*((Rt.x-mt.x+(ae.x-mt.x))*.5)<fe*.5?Rt.x>Vt.x?qt(mt.x2+X,mt.y2+X):qt(mt.x2+X,mt.y-X):Rt.x<Vt.x?qt(mt.x-X,mt.y2+X):qt(mt.x-X,mt.y-X)}function Yt(mt,X,Pt,At){if(!(mt.closed?Pt<mt.length:Pt<mt.length-1))return!1;const _t=mt.get(X),Vt=mt.get(Pt+1);for(let ae=X+1;ae<=Pt;ae++){const fe=mt.get(ae);if(l(_t.x,_t.y,Vt.x,Vt.y,fe.x,fe.y)>At)return!1}return!0}function re(mt=0){return X=>{if(mt<0||X.length<3)return X;const Pt=[];let At=0;const Rt=mt*mt;for(;At<X.length;){let _t=At+1;for(;Yt(X,At,_t,Rt);)_t++;Pt.push(X.get(At)),At=_t}return new Fe(Pt)}}function xt(mt,X){switch(mt){case-2:return(((-X+3)*X-3)*X+1)/6;case-1:return((3*X-6)*X*X+4)/6;case 0:return(((-3*X+3)*X+3)*X+1)/6;case 1:return X*X*X/6;default:throw new Error("unknown error")}}function at(mt=6){function _t(Vt,ae,fe){let me=0,Ze=0;for(let Ge=-2;Ge<=1;Ge++){const Ve=Vt.get(ae+Ge),rn=xt(Ge,fe);me+=rn*Ve.x,Ze+=rn*Ve.y}return{x:me,y:Ze}}return Vt=>{if(Vt.length<3)return Vt;const ae=[],fe=Vt.closed,me=Vt.length+3-1+(fe?0:2);ae.push(_t(Vt,2-(fe?0:2),0));for(let Ze=2-(fe?0:2);Ze<me;Ze++)for(let Ge=1;Ge<=mt;Ge++)ae.push(_t(Vt,Ze,Ge/mt));return new Fe(ae)}}function se(mt=8){return X=>{let Pt=mt,At=X.length;if(Pt>1)for(At=Math.floor(X.length/Pt);At<3&&Pt>1;)Pt-=1,At=Math.floor(X.length/Pt);const Rt=[];for(let _t=0,Vt=0;Vt<At;Vt++,_t+=Pt)Rt.push(X.get(_t));return new Fe(Rt)}}class Fe{constructor(X=[],Pt=!0){this.points=X,this.closed=Pt}get(X){const Pt=X,At=this.points.length;return X<0?this.closed?this.get(X+At):this.points[0]:X>=At?this.closed?this.get(X-At):this.points[At-1]:this.points[Pt]}get length(){return this.points.length}toString(X=1/0){const Pt=this.points;if(Pt.length===0)return"";const At=typeof X=="function"?X:_(X);let Rt="M";for(const _t of Pt)Rt+=`${At(_t.x)},${At(_t.y)} L`;return Rt=Rt.slice(0,-1),this.closed&&(Rt+=" Z"),Rt}draw(X){const Pt=this.points;if(Pt.length!==0){X.beginPath(),X.moveTo(Pt[0].x,Pt[0].y);for(const At of Pt)X.lineTo(At.x,At.y);this.closed&&X.closePath()}}sample(X){return se(X)(this)}simplify(X){return re(X)(this)}bSplines(X){return at(X)(this)}apply(X){return X(this)}containsElements(X){const Pt=kt(this.points);return Pt?X.every(At=>Pt.containsPt(At.cx,At.cy)&&this.withinArea(At.cx,At.cy)):!1}withinArea(X,Pt){if(this.length===0)return!1;let At=0;const Rt=this.points[0],_t=new P(Rt.x,Rt.y,Rt.x,Rt.y);for(let Vt=1;Vt<this.points.length;Vt++){const ae=this.points[Vt];_t.x1=_t.x2,_t.y1=_t.y2,_t.x2=ae.x,_t.y2=ae.y,_t.cuts(X,Pt)&&At++}return _t.x1=_t.x2,_t.y1=_t.y2,_t.x2=Rt.x,_t.y2=Rt.y,_t.cuts(X,Pt)&&At++,At%2===1}}class Re{constructor(X=0){this.count=0,this.arr=[],this.set=new Set,this.arr.length=X}add(X){this.set.add(`${X.x}x${X.y}`),this.arr[this.count++]=X}contains(X){return this.set.has(`${X.x}x${X.y}`)}isFirst(X){if(this.count===0)return!1;const Pt=this.arr[0];return Pt!=null&&Pt.x===X.x&&Pt.y===X.y}path(){return new Fe(this.arr.slice(0,this.count))}clear(){this.set.clear(),this.count=0}get(X){return this.arr[X]}get length(){return this.count}}const ge=0,Ie=1,Ne=2,bt=3;function Jt(mt,X){const Pt=(Math.floor(mt.width)+Math.floor(mt.height))*2,At=new Re(Pt);function Rt(fe,me,Ze,Ge){const Ve=mt.get(fe,me);return Number.isNaN(Ve)?Number.NaN:Ve>X?Ze+Ge:Ze}function _t(fe,me){let Ze=ge;return Ze=Rt(fe,me,Ze,1),Ze=Rt(fe+1,me,Ze,2),Ze=Rt(fe,me+1,Ze,4),Ze=Rt(fe+1,me+1,Ze,8),Number.isNaN(Ze)?-1:Ze}let Vt=Ie;function ae(fe,me){let Ze=fe,Ge=me,Ve=mt.invertScaleX(Ze),rn=mt.invertScaleY(Ge);for(let wn=0;wn<mt.width*mt.height;wn++){const on={x:Ve,y:rn};if(At.contains(on)){if(At.isFirst(on))return!0}else At.add(on);const _n=_t(Ze,Ge);switch(_n){case-1:return!0;case 0:case 3:case 2:case 7:Vt=Ne;break;case 12:case 14:case 4:Vt=bt;break;case 6:Vt=Vt===ge?bt:Ne;break;case 1:case 13:case 5:Vt=ge;break;case 9:Vt=Vt===Ne?ge:Ie;break;case 10:case 8:case 11:Vt=Ie;break;default:return console.warn("Marching squares invalid state: "+_n),!0}switch(Vt){case ge:Ge--,rn-=mt.pixelGroup;break;case Ie:Ge++,rn+=mt.pixelGroup;break;case bt:Ze--,Ve-=mt.pixelGroup;break;case Ne:Ze++,Ve+=mt.pixelGroup;break;default:return console.warn("Marching squares invalid state: "+_n),!0}}return!0}for(let fe=0;fe<mt.width;fe++)for(let me=0;me<mt.height;me++){if(mt.get(fe,me)<=X)continue;const Ze=_t(fe,me);if(!(Ze<0||Ze===15)&&ae(fe,me))return At.path()}return null}const oe={maxRoutingIterations:100,maxMarchingIterations:20,pixelGroup:4,edgeR0:10,edgeR1:20,nodeR0:15,nodeR1:50,morphBuffer:10,threshold:1,memberInfluenceFactor:1,edgeInfluenceFactor:1,nonMemberInfluenceFactor:-.8,virtualEdges:!0};function M(mt){return mt!=null&&typeof mt.radius=="number"}function Q(mt,X){if(M(mt)!==M(X))return!1;if(M(mt)){const At=X;return mt.cx===At.cx&&mt.cy===At.cy&&mt.radius===At.radius}const Pt=X;return mt.x===Pt.x&&mt.y===Pt.y&&mt.width===Pt.width&&mt.height===Pt.height}var te;(function(mt){mt[mt.MEMBERS=0]="MEMBERS",mt[mt.NON_MEMBERS=1]="NON_MEMBERS",mt[mt.EDGES=2]="EDGES"})(te||(te={}));class Ut{constructor(X={}){this.dirty=new Set,this.members=[],this.nonMembers=[],this.virtualEdges=[],this.edges=[],this.activeRegion=new nt(0,0,0,0),this.potentialArea=new Bt(1,0,0,0,0,0,0),this.o=Object.assign({},oe,X)}pushMember(...X){if(X.length!==0){this.dirty.add(te.MEMBERS);for(const Pt of X)this.members.push({raw:Pt,obj:M(Pt)?Nt.from(Pt):nt.from(Pt),area:null})}}removeMember(X){const Pt=this.members.findIndex(At=>Q(At.raw,X));return Pt<0?!1:(this.members.splice(Pt,1),this.dirty.add(te.MEMBERS),!0)}removeNonMember(X){const Pt=this.nonMembers.findIndex(At=>Q(At.raw,X));return Pt<0?!1:(this.nonMembers.splice(Pt,1),this.dirty.add(te.NON_MEMBERS),!0)}removeEdge(X){const Pt=this.edges.findIndex(At=>At.obj.equals(X));return Pt<0?!1:(this.edges.splice(Pt,1),this.dirty.add(te.NON_MEMBERS),!0)}pushNonMember(...X){if(X.length!==0){this.dirty.add(te.NON_MEMBERS);for(const Pt of X)this.nonMembers.push({raw:Pt,obj:M(Pt)?Nt.from(Pt):nt.from(Pt),area:null})}}pushEdge(...X){if(X.length!==0){this.dirty.add(te.EDGES);for(const Pt of X)this.edges.push({raw:Pt,obj:P.from(Pt),area:null})}}update(){const X=this.dirty.has(te.MEMBERS),Pt=this.dirty.has(te.NON_MEMBERS);let At=this.dirty.has(te.EDGES);this.dirty.clear();const Rt=this.members.map(me=>me.obj);if(this.o.virtualEdges&&(X||Pt)){const me=this.nonMembers.map(Ve=>Ve.obj),Ze=Ye(Rt,me,this.o.maxRoutingIterations,this.o.morphBuffer),Ge=new Map(this.virtualEdges.map(Ve=>[Ve.obj.toString(),Ve.area]));this.virtualEdges=Ze.map(Ve=>{var rn;return{raw:Ve,obj:Ve,area:(rn=Ge.get(Ve.toString()))!==null&&rn!==void 0?rn:null}}),At=!0}let _t=!1;if(X||At){const me=this.virtualEdges.concat(this.edges).map(rn=>rn.obj),Ze=Ce(Rt,me),Ge=Math.max(this.o.edgeR1,this.o.nodeR1)+this.o.morphBuffer,Ve=nt.from(Xt(Ze,Ge));Ve.equals(this.activeRegion)||(_t=!0,this.activeRegion=Ve)}if(_t){const me=Math.ceil(this.activeRegion.width/this.o.pixelGroup),Ze=Math.ceil(this.activeRegion.height/this.o.pixelGroup);this.activeRegion.x!==this.potentialArea.pixelX||this.activeRegion.y!==this.potentialArea.pixelY?(this.potentialArea=Bt.fromPixelRegion(this.activeRegion,this.o.pixelGroup),this.members.forEach(Ge=>Ge.area=null),this.nonMembers.forEach(Ge=>Ge.area=null),this.edges.forEach(Ge=>Ge.area=null),this.virtualEdges.forEach(Ge=>Ge.area=null)):(me!==this.potentialArea.width||Ze!==this.potentialArea.height)&&(this.potentialArea=Bt.fromPixelRegion(this.activeRegion,this.o.pixelGroup))}const Vt=new Map,ae=me=>{if(me.area){const Ze=`${me.obj.width}x${me.obj.height}x${me.obj instanceof nt?"R":"C"}`;Vt.set(Ze,me.area)}},fe=me=>{if(me.area)return;const Ze=`${me.obj.width}x${me.obj.height}x${me.obj instanceof nt?"R":"C"}`;if(Vt.has(Ze)){const Ve=Vt.get(Ze);me.area=this.potentialArea.copy(Ve,{x:me.obj.x-this.o.nodeR1,y:me.obj.y-this.o.nodeR1});return}const Ge=me.obj instanceof nt?zt(me.obj,this.potentialArea,this.o.nodeR1):ot(me.obj,this.potentialArea,this.o.nodeR1);me.area=Ge,Vt.set(Ze,Ge)};this.members.forEach(ae),this.nonMembers.forEach(ae),this.members.forEach(fe),this.nonMembers.forEach(me=>{this.activeRegion.intersects(me.obj)?fe(me):me.area=null}),this.edges.forEach(me=>{me.area||(me.area=wt(me.obj,this.potentialArea,this.o.edgeR1))}),this.virtualEdges.forEach(me=>{me.area||(me.area=wt(me.obj,this.potentialArea,this.o.edgeR1))})}drawMembers(X){for(const Pt of this.members)Pt.obj.draw(X)}drawNonMembers(X){for(const Pt of this.nonMembers)Pt.obj.draw(X)}drawEdges(X){for(const Pt of this.edges)Pt.obj.draw(X)}drawPotentialArea(X,Pt=!0){this.potentialArea.draw(X,Pt)}compute(){if(this.members.length===0)return new Fe([]);this.dirty.size>0&&this.update();const{o:X,potentialArea:Pt}=this,At=this.members.map(ae=>ae.area),Rt=this.virtualEdges.concat(this.edges).map(ae=>ae.area),_t=this.nonMembers.filter(ae=>ae.area!=null).map(ae=>ae.area),Vt=this.members.map(ae=>ae.obj);return we(Pt,At,Rt,_t,ae=>ae.containsElements(Vt),X)}}function we(mt,X,Pt,At,Rt,_t={}){const Vt=Object.assign({},oe,_t);let ae=Vt.threshold,fe=Vt.memberInfluenceFactor,me=Vt.edgeInfluenceFactor,Ze=Vt.nonMemberInfluenceFactor;const Ge=(Vt.nodeR0-Vt.nodeR1)*(Vt.nodeR0-Vt.nodeR1),Ve=(Vt.edgeR0-Vt.edgeR1)*(Vt.edgeR0-Vt.edgeR1);for(let rn=0;rn<Vt.maxMarchingIterations;rn++){if(mt.clear(),fe!==0){const on=fe/Ge;for(const _n of X)mt.incArea(_n,on)}if(me!==0){const on=me/Ve;for(const _n of Pt)mt.incArea(_n,on)}if(Ze!==0){const on=Ze/Ge;for(const _n of At)mt.incArea(_n,on)}const wn=Jt(mt,ae);if(wn&&Rt(wn))return wn;if(ae*=.95,rn<=Vt.maxMarchingIterations*.5)fe*=1.2,me*=1.2;else if(Ze!==0&&At.length>0)Ze*=.8;else break}return new Fe([])}function Ce(mt,X){if(mt.length===0)return new nt(0,0,0,0);const Pt=nt.from(mt[0]);for(const At of mt)Pt.add(At);for(const At of X)Pt.add(g(At));return Pt}function _e(mt,X=[],Pt=[],At={}){if(mt.length===0)return new Fe([]);const Rt=new Ut(At);return Rt.pushMember(...mt),Rt.pushNonMember(...X),Rt.pushEdge(...Pt),Rt.compute()}},45411:function(Tt){"use strict";Tt.exports={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]}},75196:function(Tt,vt,d){var l=d(45411),R=d(81683),O=Object.hasOwnProperty,_=Object.create(null);for(var g in l)O.call(l,g)&&(_[l[g]]=g);var P=Tt.exports={to:{},get:{}};P.get=function(I){var x=I.substring(0,3).toLowerCase(),k,N;switch(x){case"hsl":k=P.get.hsl(I),N="hsl";break;case"hwb":k=P.get.hwb(I),N="hwb";break;default:k=P.get.rgb(I),N="rgb";break}return k?{model:N,value:k}:null},P.get.rgb=function(I){if(!I)return null;var x=/^#([a-f0-9]{3,4})$/i,k=/^#([a-f0-9]{6})([a-f0-9]{2})?$/i,N=/^rgba?\(\s*([+-]?\d+)(?=[\s,])\s*(?:,\s*)?([+-]?\d+)(?=[\s,])\s*(?:,\s*)?([+-]?\d+)\s*(?:[,|\/]\s*([+-]?[\d\.]+)(%?)\s*)?\)$/,et=/^rgba?\(\s*([+-]?[\d\.]+)\%\s*,?\s*([+-]?[\d\.]+)\%\s*,?\s*([+-]?[\d\.]+)\%\s*(?:[,|\/]\s*([+-]?[\d\.]+)(%?)\s*)?\)$/,tt=/^(\w+)$/,Ct=[0,0,0,1],ut,nt,kt;if(ut=I.match(k)){for(kt=ut[2],ut=ut[1],nt=0;nt<3;nt++){var Nt=nt*2;Ct[nt]=parseInt(ut.slice(Nt,Nt+2),16)}kt&&(Ct[3]=parseInt(kt,16)/255)}else if(ut=I.match(x)){for(ut=ut[1],kt=ut[3],nt=0;nt<3;nt++)Ct[nt]=parseInt(ut[nt]+ut[nt],16);kt&&(Ct[3]=parseInt(kt+kt,16)/255)}else if(ut=I.match(N)){for(nt=0;nt<3;nt++)Ct[nt]=parseInt(ut[nt+1],0);ut[4]&&(ut[5]?Ct[3]=parseFloat(ut[4])*.01:Ct[3]=parseFloat(ut[4]))}else if(ut=I.match(et)){for(nt=0;nt<3;nt++)Ct[nt]=Math.round(parseFloat(ut[nt+1])*2.55);ut[4]&&(ut[5]?Ct[3]=parseFloat(ut[4])*.01:Ct[3]=parseFloat(ut[4]))}else return(ut=I.match(tt))?ut[1]==="transparent"?[0,0,0,0]:O.call(l,ut[1])?(Ct=l[ut[1]],Ct[3]=1,Ct):null:null;for(nt=0;nt<3;nt++)Ct[nt]=b(Ct[nt],0,255);return Ct[3]=b(Ct[3],0,1),Ct},P.get.hsl=function(I){if(!I)return null;var x=/^hsla?\(\s*([+-]?(?:\d{0,3}\.)?\d+)(?:deg)?\s*,?\s*([+-]?[\d\.]+)%\s*,?\s*([+-]?[\d\.]+)%\s*(?:[,|\/]\s*([+-]?(?=\.\d|\d)(?:0|[1-9]\d*)?(?:\.\d*)?(?:[eE][+-]?\d+)?)\s*)?\)$/,k=I.match(x);if(k){var N=parseFloat(k[4]),et=(parseFloat(k[1])%360+360)%360,tt=b(parseFloat(k[2]),0,100),Ct=b(parseFloat(k[3]),0,100),ut=b(isNaN(N)?1:N,0,1);return[et,tt,Ct,ut]}return null},P.get.hwb=function(I){if(!I)return null;var x=/^hwb\(\s*([+-]?\d{0,3}(?:\.\d+)?)(?:deg)?\s*,\s*([+-]?[\d\.]+)%\s*,\s*([+-]?[\d\.]+)%\s*(?:,\s*([+-]?(?=\.\d|\d)(?:0|[1-9]\d*)?(?:\.\d*)?(?:[eE][+-]?\d+)?)\s*)?\)$/,k=I.match(x);if(k){var N=parseFloat(k[4]),et=(parseFloat(k[1])%360+360)%360,tt=b(parseFloat(k[2]),0,100),Ct=b(parseFloat(k[3]),0,100),ut=b(isNaN(N)?1:N,0,1);return[et,tt,Ct,ut]}return null},P.to.hex=function(){var I=R(arguments);return"#"+A(I[0])+A(I[1])+A(I[2])+(I[3]<1?A(Math.round(I[3]*255)):"")},P.to.rgb=function(){var I=R(arguments);return I.length<4||I[3]===1?"rgb("+Math.round(I[0])+", "+Math.round(I[1])+", "+Math.round(I[2])+")":"rgba("+Math.round(I[0])+", "+Math.round(I[1])+", "+Math.round(I[2])+", "+I[3]+")"},P.to.rgb.percent=function(){var I=R(arguments),x=Math.round(I[0]/255*100),k=Math.round(I[1]/255*100),N=Math.round(I[2]/255*100);return I.length<4||I[3]===1?"rgb("+x+"%, "+k+"%, "+N+"%)":"rgba("+x+"%, "+k+"%, "+N+"%, "+I[3]+")"},P.to.hsl=function(){var I=R(arguments);return I.length<4||I[3]===1?"hsl("+I[0]+", "+I[1]+"%, "+I[2]+"%)":"hsla("+I[0]+", "+I[1]+"%, "+I[2]+"%, "+I[3]+")"},P.to.hwb=function(){var I=R(arguments),x="";return I.length>=4&&I[3]!==1&&(x=", "+I[3]),"hwb("+I[0]+", "+I[1]+"%, "+I[2]+"%"+x+")"},P.to.keyword=function(I){return _[I.slice(0,3)]};function b(I,x,k){return Math.min(Math.max(x,I),k)}function A(I){var x=Math.round(I).toString(16).toUpperCase();return x.length<2?"0"+x:x}},92546:function(Tt,vt,d){Tt.exports={graphlib:d(76626),layout:d(47194),debug:d(11303),util:{time:d(53063).time,notime:d(53063).notime},version:d(11897)}},91626:function(Tt,vt,d){"use strict";var l=d(72361),R=d(39240);Tt.exports={run:O,undo:g};function O(P){var b=P.graph().acyclicer==="greedy"?R(P,A(P)):_(P);l.forEach(b,function(I){var x=P.edge(I);P.removeEdge(I),x.forwardName=I.name,x.reversed=!0,P.setEdge(I.w,I.v,x,l.uniqueId("rev"))});function A(I){return function(x){return I.edge(x).weight}}}function _(P){var b=[],A={},I={};function x(k){l.has(I,k)||(I[k]=!0,A[k]=!0,l.forEach(P.outEdges(k),function(N){l.has(A,N.w)?b.push(N):x(N.w)}),delete A[k])}return l.forEach(P.nodes(),x),b}function g(P){l.forEach(P.edges(),function(b){var A=P.edge(b);if(A.reversed){P.removeEdge(b);var I=A.forwardName;delete A.reversed,delete A.forwardName,P.setEdge(b.w,b.v,A,I)}})}},60765:function(Tt,vt,d){var l=d(72361),R=d(53063);Tt.exports=O;function O(g){function P(b){var A=g.children(b),I=g.node(b);if(A.length&&l.forEach(A,P),l.has(I,"minRank")){I.borderLeft=[],I.borderRight=[];for(var x=I.minRank,k=I.maxRank+1;x<k;++x)_(g,"borderLeft","_bl",b,I,x),_(g,"borderRight","_br",b,I,x)}}l.forEach(g.children(),P)}function _(g,P,b,A,I,x){var k={width:0,height:0,rank:x,borderType:P},N=I[P][x-1],et=R.addDummyNode(g,"border",k,b);I[P][x]=et,g.setParent(et,A),N&&g.setEdge(N,et,{weight:1})}},13257:function(Tt,vt,d){"use strict";var l=d(72361);Tt.exports={adjust:R,undo:O};function R(x){var k=x.graph().rankdir.toLowerCase();(k==="lr"||k==="rl")&&_(x)}function O(x){var k=x.graph().rankdir.toLowerCase();(k==="bt"||k==="rl")&&P(x),(k==="lr"||k==="rl")&&(A(x),_(x))}function _(x){l.forEach(x.nodes(),function(k){g(x.node(k))}),l.forEach(x.edges(),function(k){g(x.edge(k))})}function g(x){var k=x.width;x.width=x.height,x.height=k}function P(x){l.forEach(x.nodes(),function(k){b(x.node(k))}),l.forEach(x.edges(),function(k){var N=x.edge(k);l.forEach(N.points,b),l.has(N,"y")&&b(N)})}function b(x){x.y=-x.y}function A(x){l.forEach(x.nodes(),function(k){I(x.node(k))}),l.forEach(x.edges(),function(k){var N=x.edge(k);l.forEach(N.points,I),l.has(N,"x")&&I(N)})}function I(x){var k=x.x;x.x=x.y,x.y=k}},21135:function(Tt){Tt.exports=vt;function vt(){var R={};R._next=R._prev=R,this._sentinel=R}vt.prototype.dequeue=function(){var R=this._sentinel,O=R._prev;if(O!==R)return d(O),O},vt.prototype.enqueue=function(R){var O=this._sentinel;R._prev&&R._next&&d(R),R._next=O._next,O._next._prev=R,O._next=R,R._prev=O},vt.prototype.toString=function(){for(var R=[],O=this._sentinel,_=O._prev;_!==O;)R.push(JSON.stringify(_,l)),_=_._prev;return"["+R.join(", ")+"]"};function d(R){R._prev._next=R._next,R._next._prev=R._prev,delete R._next,delete R._prev}function l(R,O){if(R!=="_next"&&R!=="_prev")return O}},11303:function(Tt,vt,d){var l=d(72361),R=d(53063),O=d(76626).Graph;Tt.exports={debugOrdering:_};function _(g){var P=R.buildLayerMatrix(g),b=new O({compound:!0,multigraph:!0}).setGraph({});return l.forEach(g.nodes(),function(A){b.setNode(A,{label:A}),b.setParent(A,"layer"+g.node(A).rank)}),l.forEach(g.edges(),function(A){b.setEdge(A.v,A.w,{},A.name)}),l.forEach(P,function(A,I){var x="layer"+I;b.setNode(x,{rank:"same"}),l.reduce(A,function(k,N){return b.setEdge(k,N,{style:"invis"}),N})}),b}},76626:function(Tt,vt,d){var l;try{l=d(75172)}catch(R){}l||(l=window.graphlib),Tt.exports=l},39240:function(Tt,vt,d){var l=d(72361),R=d(76626).Graph,O=d(21135);Tt.exports=g;var _=l.constant(1);function g(x,k){if(x.nodeCount()<=1)return[];var N=A(x,k||_),et=P(N.graph,N.buckets,N.zeroIdx);return l.flatten(l.map(et,function(tt){return x.outEdges(tt.v,tt.w)}),!0)}function P(x,k,N){for(var et=[],tt=k[k.length-1],Ct=k[0],ut;x.nodeCount();){for(;ut=Ct.dequeue();)b(x,k,N,ut);for(;ut=tt.dequeue();)b(x,k,N,ut);if(x.nodeCount()){for(var nt=k.length-2;nt>0;--nt)if(ut=k[nt].dequeue(),ut){et=et.concat(b(x,k,N,ut,!0));break}}}return et}function b(x,k,N,et,tt){var Ct=tt?[]:void 0;return l.forEach(x.inEdges(et.v),function(ut){var nt=x.edge(ut),kt=x.node(ut.v);tt&&Ct.push({v:ut.v,w:ut.w}),kt.out-=nt,I(k,N,kt)}),l.forEach(x.outEdges(et.v),function(ut){var nt=x.edge(ut),kt=ut.w,Nt=x.node(kt);Nt.in-=nt,I(k,N,Nt)}),x.removeNode(et.v),Ct}function A(x,k){var N=new R,et=0,tt=0;l.forEach(x.nodes(),function(nt){N.setNode(nt,{v:nt,in:0,out:0})}),l.forEach(x.edges(),function(nt){var kt=N.edge(nt.v,nt.w)||0,Nt=k(nt),Bt=kt+Nt;N.setEdge(nt.v,nt.w,Bt),tt=Math.max(tt,N.node(nt.v).out+=Nt),et=Math.max(et,N.node(nt.w).in+=Nt)});var Ct=l.range(tt+et+3).map(function(){return new O}),ut=et+1;return l.forEach(N.nodes(),function(nt){I(Ct,ut,N.node(nt))}),{graph:N,buckets:Ct,zeroIdx:ut}}function I(x,k,N){N.out?N.in?x[N.out-N.in+k].enqueue(N):x[x.length-1].enqueue(N):x[0].enqueue(N)}},47194:function(Tt,vt,d){"use strict";var l=d(72361),R=d(91626),O=d(27163),_=d(64505),g=d(53063).normalizeRanks,P=d(71970),b=d(53063).removeEmptyRanks,A=d(31733),I=d(60765),x=d(13257),k=d(62852),N=d(93021),et=d(53063),tt=d(76626).Graph;Tt.exports=Ct;function Ct(Yt,re){var xt=re&&re.debugTiming?et.time:et.notime;xt("layout",function(){var at=xt(" buildLayoutGraph",function(){return Ot(Yt)});xt(" runLayout",function(){ut(at,xt)}),xt(" updateInputGraph",function(){nt(Yt,at)})})}function ut(Yt,re){re(" makeSpaceForEdgeLabels",function(){pe(Yt)}),re(" removeSelfEdges",function(){Me(Yt)}),re(" acyclic",function(){R.run(Yt)}),re(" nestingGraph.run",function(){A.run(Yt)}),re(" rank",function(){_(et.asNonCompoundGraph(Yt))}),re(" injectEdgeLabelProxies",function(){xe(Yt)}),re(" removeEmptyRanks",function(){b(Yt)}),re(" nestingGraph.cleanup",function(){A.cleanup(Yt)}),re(" normalizeRanks",function(){g(Yt)}),re(" assignRankMinMax",function(){qt(Yt)}),re(" removeEdgeLabelProxies",function(){Ye(Yt)}),re(" normalize.run",function(){O.run(Yt)}),re(" parentDummyChains",function(){P(Yt)}),re(" addBorderSegments",function(){I(Yt)}),re(" order",function(){k(Yt)}),re(" insertSelfEdges",function(){nn(Yt)}),re(" adjustCoordinateSystem",function(){x.adjust(Yt)}),re(" position",function(){N(Yt)}),re(" positionSelfEdges",function(){le(Yt)}),re(" removeBorderNodes",function(){ne(Yt)}),re(" normalize.undo",function(){O.undo(Yt)}),re(" fixupEdgeLabelCoords",function(){Qe(Yt)}),re(" undoCoordinateSystem",function(){x.undo(Yt)}),re(" translateGraph",function(){We(Yt)}),re(" assignNodeIntersects",function(){Oe(Yt)}),re(" reversePoints",function(){Mt(Yt)}),re(" acyclic.undo",function(){R.undo(Yt)})}function nt(Yt,re){l.forEach(Yt.nodes(),function(xt){var at=Yt.node(xt),se=re.node(xt);at&&(at.x=se.x,at.y=se.y,re.children(xt).length&&(at.width=se.width,at.height=se.height))}),l.forEach(Yt.edges(),function(xt){var at=Yt.edge(xt),se=re.edge(xt);at.points=se.points,l.has(se,"x")&&(at.x=se.x,at.y=se.y)}),Yt.graph().width=re.graph().width,Yt.graph().height=re.graph().height}var kt=["nodesep","edgesep","ranksep","marginx","marginy"],Nt={ranksep:50,edgesep:20,nodesep:50,rankdir:"tb"},Bt=["acyclicer","ranker","rankdir","align"],Xt=["width","height"],wt={width:0,height:0},ot=["minlen","weight","width","height","labeloffset"],It={minlen:1,weight:1,width:0,height:0,labeloffset:10,labelpos:"r"},zt=["labelpos"];function Ot(Yt){var re=new tt({multigraph:!0,compound:!0}),xt=De(Yt.graph());return re.setGraph(l.merge({},Nt,be(xt,kt),l.pick(xt,Bt))),l.forEach(Yt.nodes(),function(at){var se=De(Yt.node(at));re.setNode(at,l.defaults(be(se,Xt),wt)),re.setParent(at,Yt.parent(at))}),l.forEach(Yt.edges(),function(at){var se=De(Yt.edge(at));re.setEdge(at,l.merge({},It,be(se,ot),l.pick(se,zt)))}),re}function pe(Yt){var re=Yt.graph();re.ranksep/=2,l.forEach(Yt.edges(),function(xt){var at=Yt.edge(xt);at.minlen*=2,at.labelpos.toLowerCase()!=="c"&&(re.rankdir==="TB"||re.rankdir==="BT"?at.width+=at.labeloffset:at.height+=at.labeloffset)})}function xe(Yt){l.forEach(Yt.edges(),function(re){var xt=Yt.edge(re);if(xt.width&&xt.height){var at=Yt.node(re.v),se=Yt.node(re.w),Fe={rank:(se.rank-at.rank)/2+at.rank,e:re};et.addDummyNode(Yt,"edge-proxy",Fe,"_ep")}})}function qt(Yt){var re=0;l.forEach(Yt.nodes(),function(xt){var at=Yt.node(xt);at.borderTop&&(at.minRank=Yt.node(at.borderTop).rank,at.maxRank=Yt.node(at.borderBottom).rank,re=l.max(re,at.maxRank))}),Yt.graph().maxRank=re}function Ye(Yt){l.forEach(Yt.nodes(),function(re){var xt=Yt.node(re);xt.dummy==="edge-proxy"&&(Yt.edge(xt.e).labelRank=xt.rank,Yt.removeNode(re))})}function We(Yt){var re=Number.POSITIVE_INFINITY,xt=0,at=Number.POSITIVE_INFINITY,se=0,Fe=Yt.graph(),Re=Fe.marginx||0,ge=Fe.marginy||0;function Ie(Ne){var bt=Ne.x,Jt=Ne.y,oe=Ne.width,M=Ne.height;re=Math.min(re,bt-oe/2),xt=Math.max(xt,bt+oe/2),at=Math.min(at,Jt-M/2),se=Math.max(se,Jt+M/2)}l.forEach(Yt.nodes(),function(Ne){Ie(Yt.node(Ne))}),l.forEach(Yt.edges(),function(Ne){var bt=Yt.edge(Ne);l.has(bt,"x")&&Ie(bt)}),re-=Re,at-=ge,l.forEach(Yt.nodes(),function(Ne){var bt=Yt.node(Ne);bt.x-=re,bt.y-=at}),l.forEach(Yt.edges(),function(Ne){var bt=Yt.edge(Ne);l.forEach(bt.points,function(Jt){Jt.x-=re,Jt.y-=at}),l.has(bt,"x")&&(bt.x-=re),l.has(bt,"y")&&(bt.y-=at)}),Fe.width=xt-re+Re,Fe.height=se-at+ge}function Oe(Yt){l.forEach(Yt.edges(),function(re){var xt=Yt.edge(re),at=Yt.node(re.v),se=Yt.node(re.w),Fe,Re;xt.points?(Fe=xt.points[0],Re=xt.points[xt.points.length-1]):(xt.points=[],Fe=se,Re=at),xt.points.unshift(et.intersectRect(at,Fe)),xt.points.push(et.intersectRect(se,Re))})}function Qe(Yt){l.forEach(Yt.edges(),function(re){var xt=Yt.edge(re);if(l.has(xt,"x"))switch((xt.labelpos==="l"||xt.labelpos==="r")&&(xt.width-=xt.labeloffset),xt.labelpos){case"l":xt.x-=xt.width/2+xt.labeloffset;break;case"r":xt.x+=xt.width/2+xt.labeloffset;break}})}function Mt(Yt){l.forEach(Yt.edges(),function(re){var xt=Yt.edge(re);xt.reversed&&xt.points.reverse()})}function ne(Yt){l.forEach(Yt.nodes(),function(re){if(Yt.children(re).length){var xt=Yt.node(re),at=Yt.node(xt.borderTop),se=Yt.node(xt.borderBottom),Fe=Yt.node(l.last(xt.borderLeft)),Re=Yt.node(l.last(xt.borderRight));xt.width=Math.abs(Re.x-Fe.x),xt.height=Math.abs(se.y-at.y),xt.x=Fe.x+xt.width/2,xt.y=at.y+xt.height/2}}),l.forEach(Yt.nodes(),function(re){Yt.node(re).dummy==="border"&&Yt.removeNode(re)})}function Me(Yt){l.forEach(Yt.edges(),function(re){if(re.v===re.w){var xt=Yt.node(re.v);xt.selfEdges||(xt.selfEdges=[]),xt.selfEdges.push({e:re,label:Yt.edge(re)}),Yt.removeEdge(re)}})}function nn(Yt){var re=et.buildLayerMatrix(Yt);l.forEach(re,function(xt){var at=0;l.forEach(xt,function(se,Fe){var Re=Yt.node(se);Re.order=Fe+at,l.forEach(Re.selfEdges,function(ge){et.addDummyNode(Yt,"selfedge",{width:ge.label.width,height:ge.label.height,rank:Re.rank,order:Fe+ ++at,e:ge.e,label:ge.label},"_se")}),delete Re.selfEdges})})}function le(Yt){l.forEach(Yt.nodes(),function(re){var xt=Yt.node(re);if(xt.dummy==="selfedge"){var at=Yt.node(xt.e.v),se=at.x+at.width/2,Fe=at.y,Re=xt.x-se,ge=at.height/2;Yt.setEdge(xt.e,xt.label),Yt.removeNode(re),xt.label.points=[{x:se+2*Re/3,y:Fe-ge},{x:se+5*Re/6,y:Fe-ge},{x:se+Re,y:Fe},{x:se+5*Re/6,y:Fe+ge},{x:se+2*Re/3,y:Fe+ge}],xt.label.x=xt.x,xt.label.y=xt.y}})}function be(Yt,re){return l.mapValues(l.pick(Yt,re),Number)}function De(Yt){var re={};return l.forEach(Yt,function(xt,at){re[at.toLowerCase()]=xt}),re}},72361:function(Tt,vt,d){var l;try{l={cloneDeep:d(20250),constant:d(13503),defaults:d(28548),each:d(76934),filter:d(64725),find:d(79785),flatten:d(40151),forEach:d(99204),forIn:d(23190),has:d(99946),isUndefined:d(16513),last:d(10611),map:d(9924),mapValues:d(70642),max:d(95987),merge:d(28440),min:d(73376),minBy:d(83296),now:d(5795),pick:d(89409),range:d(60859),reduce:d(16473),sortBy:d(351),uniqueId:d(95708),values:d(81229),zipObject:d(92993)}}catch(R){}l||(l=window._),Tt.exports=l},31733:function(Tt,vt,d){var l=d(72361),R=d(53063);Tt.exports={run:O,cleanup:b};function O(A){var I=R.addDummyNode(A,"root",{},"_root"),x=g(A),k=l.max(l.values(x))-1,N=2*k+1;A.graph().nestingRoot=I,l.forEach(A.edges(),function(tt){A.edge(tt).minlen*=N});var et=P(A)+1;l.forEach(A.children(),function(tt){_(A,I,N,et,k,x,tt)}),A.graph().nodeRankFactor=N}function _(A,I,x,k,N,et,tt){var Ct=A.children(tt);if(!Ct.length){tt!==I&&A.setEdge(I,tt,{weight:0,minlen:x});return}var ut=R.addBorderNode(A,"_bt"),nt=R.addBorderNode(A,"_bb"),kt=A.node(tt);A.setParent(ut,tt),kt.borderTop=ut,A.setParent(nt,tt),kt.borderBottom=nt,l.forEach(Ct,function(Nt){_(A,I,x,k,N,et,Nt);var Bt=A.node(Nt),Xt=Bt.borderTop?Bt.borderTop:Nt,wt=Bt.borderBottom?Bt.borderBottom:Nt,ot=Bt.borderTop?k:2*k,It=Xt!==wt?1:N-et[tt]+1;A.setEdge(ut,Xt,{weight:ot,minlen:It,nestingEdge:!0}),A.setEdge(wt,nt,{weight:ot,minlen:It,nestingEdge:!0})}),A.parent(tt)||A.setEdge(I,ut,{weight:0,minlen:N+et[tt]})}function g(A){var I={};function x(k,N){var et=A.children(k);et&&et.length&&l.forEach(et,function(tt){x(tt,N+1)}),I[k]=N}return l.forEach(A.children(),function(k){x(k,1)}),I}function P(A){return l.reduce(A.edges(),function(I,x){return I+A.edge(x).weight},0)}function b(A){var I=A.graph();A.removeNode(I.nestingRoot),delete I.nestingRoot,l.forEach(A.edges(),function(x){var k=A.edge(x);k.nestingEdge&&A.removeEdge(x)})}},27163:function(Tt,vt,d){"use strict";var l=d(72361),R=d(53063);Tt.exports={run:O,undo:g};function O(P){P.graph().dummyChains=[],l.forEach(P.edges(),function(b){_(P,b)})}function _(P,b){var A=b.v,I=P.node(A).rank,x=b.w,k=P.node(x).rank,N=b.name,et=P.edge(b),tt=et.labelRank;if(k!==I+1){P.removeEdge(b);var Ct,ut,nt;for(nt=0,++I;I<k;++nt,++I)et.points=[],ut={width:0,height:0,edgeLabel:et,edgeObj:b,rank:I},Ct=R.addDummyNode(P,"edge",ut,"_d"),I===tt&&(ut.width=et.width,ut.height=et.height,ut.dummy="edge-label",ut.labelpos=et.labelpos),P.setEdge(A,Ct,{weight:et.weight},N),nt===0&&P.graph().dummyChains.push(Ct),A=Ct;P.setEdge(A,x,{weight:et.weight},N)}}function g(P){l.forEach(P.graph().dummyChains,function(b){var A=P.node(b),I=A.edgeLabel,x;for(P.setEdge(A.edgeObj,I);A.dummy;)x=P.successors(b)[0],P.removeNode(b),I.points.push({x:A.x,y:A.y}),A.dummy==="edge-label"&&(I.x=A.x,I.y=A.y,I.width=A.width,I.height=A.height),b=x,A=P.node(b)})}},52205:function(Tt,vt,d){var l=d(72361);Tt.exports=R;function R(O,_,g){var P={},b;l.forEach(g,function(A){for(var I=O.parent(A),x,k;I;){if(x=O.parent(I),x?(k=P[x],P[x]=I):(k=b,b=I),k&&k!==I){_.setEdge(k,I);return}I=x}})}},99506:function(Tt,vt,d){var l=d(72361);Tt.exports=R;function R(O,_){return l.map(_,function(g){var P=O.inEdges(g);if(P.length){var b=l.reduce(P,function(A,I){var x=O.edge(I),k=O.node(I.v);return{sum:A.sum+x.weight*k.order,weight:A.weight+x.weight}},{sum:0,weight:0});return{v:g,barycenter:b.sum/b.weight,weight:b.weight}}else return{v:g}})}},59105:function(Tt,vt,d){var l=d(72361),R=d(76626).Graph;Tt.exports=O;function O(g,P,b){var A=_(g),I=new R({compound:!0}).setGraph({root:A}).setDefaultNodeLabel(function(x){return g.node(x)});return l.forEach(g.nodes(),function(x){var k=g.node(x),N=g.parent(x);(k.rank===P||k.minRank<=P&&P<=k.maxRank)&&(I.setNode(x),I.setParent(x,N||A),l.forEach(g[b](x),function(et){var tt=et.v===x?et.w:et.v,Ct=I.edge(tt,x),ut=l.isUndefined(Ct)?0:Ct.weight;I.setEdge(tt,x,{weight:g.edge(et).weight+ut})}),l.has(k,"minRank")&&I.setNode(x,{borderLeft:k.borderLeft[P],borderRight:k.borderRight[P]}))}),I}function _(g){for(var P;g.hasNode(P=l.uniqueId("_root")););return P}},45456:function(Tt,vt,d){"use strict";var l=d(72361);Tt.exports=R;function R(_,g){for(var P=0,b=1;b<g.length;++b)P+=O(_,g[b-1],g[b]);return P}function O(_,g,P){for(var b=l.zipObject(P,l.map(P,function(et,tt){return tt})),A=l.flatten(l.map(g,function(et){return l.sortBy(l.map(_.outEdges(et),function(tt){return{pos:b[tt.w],weight:_.edge(tt).weight}}),"pos")}),!0),I=1;I<P.length;)I<<=1;var x=2*I-1;I-=1;var k=l.map(new Array(x),function(){return 0}),N=0;return l.forEach(A.forEach(function(et){var tt=et.pos+I;k[tt]+=et.weight;for(var Ct=0;tt>0;)tt%2&&(Ct+=k[tt+1]),tt=tt-1>>1,k[tt]+=et.weight;N+=et.weight*Ct})),N}},62852:function(Tt,vt,d){"use strict";var l=d(72361),R=d(18043),O=d(45456),_=d(86490),g=d(59105),P=d(52205),b=d(76626).Graph,A=d(53063);Tt.exports=I;function I(et){var tt=A.maxRank(et),Ct=x(et,l.range(1,tt+1),"inEdges"),ut=x(et,l.range(tt-1,-1,-1),"outEdges"),nt=R(et);N(et,nt);for(var kt=Number.POSITIVE_INFINITY,Nt,Bt=0,Xt=0;Xt<4;++Bt,++Xt){k(Bt%2?Ct:ut,Bt%4>=2),nt=A.buildLayerMatrix(et);var wt=O(et,nt);wt<kt&&(Xt=0,Nt=l.cloneDeep(nt),kt=wt)}N(et,Nt)}function x(et,tt,Ct){return l.map(tt,function(ut){return g(et,ut,Ct)})}function k(et,tt){var Ct=new b;l.forEach(et,function(ut){var nt=ut.graph().root,kt=_(ut,nt,Ct,tt);l.forEach(kt.vs,function(Nt,Bt){ut.node(Nt).order=Bt}),P(ut,Ct,kt.vs)})}function N(et,tt){l.forEach(tt,function(Ct){l.forEach(Ct,function(ut,nt){et.node(ut).order=nt})})}},18043:function(Tt,vt,d){"use strict";var l=d(72361);Tt.exports=R;function R(O){var _={},g=l.filter(O.nodes(),function(x){return!O.children(x).length}),P=l.max(l.map(g,function(x){return O.node(x).rank})),b=l.map(l.range(P+1),function(){return[]});function A(x){if(!l.has(_,x)){_[x]=!0;var k=O.node(x);b[k.rank].push(x),l.forEach(O.successors(x),A)}}var I=l.sortBy(g,function(x){return O.node(x).rank});return l.forEach(I,A),b}},45926:function(Tt,vt,d){"use strict";var l=d(72361);Tt.exports=R;function R(g,P){var b={};l.forEach(g,function(I,x){var k=b[I.v]={indegree:0,in:[],out:[],vs:[I.v],i:x};l.isUndefined(I.barycenter)||(k.barycenter=I.barycenter,k.weight=I.weight)}),l.forEach(P.edges(),function(I){var x=b[I.v],k=b[I.w];!l.isUndefined(x)&&!l.isUndefined(k)&&(k.indegree++,x.out.push(b[I.w]))});var A=l.filter(b,function(I){return!I.indegree});return O(A)}function O(g){var P=[];function b(x){return function(k){k.merged||(l.isUndefined(k.barycenter)||l.isUndefined(x.barycenter)||k.barycenter>=x.barycenter)&&_(x,k)}}function A(x){return function(k){k.in.push(x),--k.indegree===0&&g.push(k)}}for(;g.length;){var I=g.pop();P.push(I),l.forEach(I.in.reverse(),b(I)),l.forEach(I.out,A(I))}return l.map(l.filter(P,function(x){return!x.merged}),function(x){return l.pick(x,["vs","i","barycenter","weight"])})}function _(g,P){var b=0,A=0;g.weight&&(b+=g.barycenter*g.weight,A+=g.weight),P.weight&&(b+=P.barycenter*P.weight,A+=P.weight),g.vs=P.vs.concat(g.vs),g.barycenter=b/A,g.weight=A,g.i=Math.min(P.i,g.i),P.merged=!0}},86490:function(Tt,vt,d){var l=d(72361),R=d(99506),O=d(45926),_=d(1349);Tt.exports=g;function g(A,I,x,k){var N=A.children(I),et=A.node(I),tt=et?et.borderLeft:void 0,Ct=et?et.borderRight:void 0,ut={};tt&&(N=l.filter(N,function(wt){return wt!==tt&&wt!==Ct}));var nt=R(A,N);l.forEach(nt,function(wt){if(A.children(wt.v).length){var ot=g(A,wt.v,x,k);ut[wt.v]=ot,l.has(ot,"barycenter")&&b(wt,ot)}});var kt=O(nt,x);P(kt,ut);var Nt=_(kt,k);if(tt&&(Nt.vs=l.flatten([tt,Nt.vs,Ct],!0),A.predecessors(tt).length)){var Bt=A.node(A.predecessors(tt)[0]),Xt=A.node(A.predecessors(Ct)[0]);l.has(Nt,"barycenter")||(Nt.barycenter=0,Nt.weight=0),Nt.barycenter=(Nt.barycenter*Nt.weight+Bt.order+Xt.order)/(Nt.weight+2),Nt.weight+=2}return Nt}function P(A,I){l.forEach(A,function(x){x.vs=l.flatten(x.vs.map(function(k){return I[k]?I[k].vs:k}),!0)})}function b(A,I){l.isUndefined(A.barycenter)?(A.barycenter=I.barycenter,A.weight=I.weight):(A.barycenter=(A.barycenter*A.weight+I.barycenter*I.weight)/(A.weight+I.weight),A.weight+=I.weight)}},1349:function(Tt,vt,d){var l=d(72361),R=d(53063);Tt.exports=O;function O(P,b){var A=R.partition(P,function(ut){return l.has(ut,"barycenter")}),I=A.lhs,x=l.sortBy(A.rhs,function(ut){return-ut.i}),k=[],N=0,et=0,tt=0;I.sort(g(!!b)),tt=_(k,x,tt),l.forEach(I,function(ut){tt+=ut.vs.length,k.push(ut.vs),N+=ut.barycenter*ut.weight,et+=ut.weight,tt=_(k,x,tt)});var Ct={vs:l.flatten(k,!0)};return et&&(Ct.barycenter=N/et,Ct.weight=et),Ct}function _(P,b,A){for(var I;b.length&&(I=l.last(b)).i<=A;)b.pop(),P.push(I.vs),A++;return A}function g(P){return function(b,A){return b.barycenter<A.barycenter?-1:b.barycenter>A.barycenter?1:P?A.i-b.i:b.i-A.i}}},71970:function(Tt,vt,d){var l=d(72361);Tt.exports=R;function R(g){var P=_(g);l.forEach(g.graph().dummyChains,function(b){for(var A=g.node(b),I=A.edgeObj,x=O(g,P,I.v,I.w),k=x.path,N=x.lca,et=0,tt=k[et],Ct=!0;b!==I.w;){if(A=g.node(b),Ct){for(;(tt=k[et])!==N&&g.node(tt).maxRank<A.rank;)et++;tt===N&&(Ct=!1)}if(!Ct){for(;et<k.length-1&&g.node(tt=k[et+1]).minRank<=A.rank;)et++;tt=k[et]}g.setParent(b,tt),b=g.successors(b)[0]}})}function O(g,P,b,A){var I=[],x=[],k=Math.min(P[b].low,P[A].low),N=Math.max(P[b].lim,P[A].lim),et,tt;et=b;do et=g.parent(et),I.push(et);while(et&&(P[et].low>k||N>P[et].lim));for(tt=et,et=A;(et=g.parent(et))!==tt;)x.push(et);return{path:I.concat(x.reverse()),lca:tt}}function _(g){var P={},b=0;function A(I){var x=b;l.forEach(g.children(I),A),P[I]={low:x,lim:b++}}return l.forEach(g.children(),A),P}},92080:function(Tt,vt,d){"use strict";var l=d(72361),R=d(76626).Graph,O=d(53063);Tt.exports={positionX:Ct,findType1Conflicts:_,findType2Conflicts:g,addConflict:b,hasConflict:A,verticalAlignment:I,horizontalCompaction:x,alignCoordinates:et,findSmallestWidthAlignment:N,balance:tt};function _(kt,Nt){var Bt={};function Xt(wt,ot){var It=0,zt=0,Ot=wt.length,pe=l.last(ot);return l.forEach(ot,function(xe,qt){var Ye=P(kt,xe),We=Ye?kt.node(Ye).order:Ot;(Ye||xe===pe)&&(l.forEach(ot.slice(zt,qt+1),function(Oe){l.forEach(kt.predecessors(Oe),function(Qe){var Mt=kt.node(Qe),ne=Mt.order;(ne<It||We<ne)&&!(Mt.dummy&&kt.node(Oe).dummy)&&b(Bt,Qe,Oe)})}),zt=qt+1,It=We)}),ot}return l.reduce(Nt,Xt),Bt}function g(kt,Nt){var Bt={};function Xt(ot,It,zt,Ot,pe){var xe;l.forEach(l.range(It,zt),function(qt){xe=ot[qt],kt.node(xe).dummy&&l.forEach(kt.predecessors(xe),function(Ye){var We=kt.node(Ye);We.dummy&&(We.order<Ot||We.order>pe)&&b(Bt,Ye,xe)})})}function wt(ot,It){var zt=-1,Ot,pe=0;return l.forEach(It,function(xe,qt){if(kt.node(xe).dummy==="border"){var Ye=kt.predecessors(xe);Ye.length&&(Ot=kt.node(Ye[0]).order,Xt(It,pe,qt,zt,Ot),pe=qt,zt=Ot)}Xt(It,pe,It.length,Ot,ot.length)}),It}return l.reduce(Nt,wt),Bt}function P(kt,Nt){if(kt.node(Nt).dummy)return l.find(kt.predecessors(Nt),function(Bt){return kt.node(Bt).dummy})}function b(kt,Nt,Bt){if(Nt>Bt){var Xt=Nt;Nt=Bt,Bt=Xt}var wt=kt[Nt];wt||(kt[Nt]=wt={}),wt[Bt]=!0}function A(kt,Nt,Bt){if(Nt>Bt){var Xt=Nt;Nt=Bt,Bt=Xt}return l.has(kt[Nt],Bt)}function I(kt,Nt,Bt,Xt){var wt={},ot={},It={};return l.forEach(Nt,function(zt){l.forEach(zt,function(Ot,pe){wt[Ot]=Ot,ot[Ot]=Ot,It[Ot]=pe})}),l.forEach(Nt,function(zt){var Ot=-1;l.forEach(zt,function(pe){var xe=Xt(pe);if(xe.length){xe=l.sortBy(xe,function(Qe){return It[Qe]});for(var qt=(xe.length-1)/2,Ye=Math.floor(qt),We=Math.ceil(qt);Ye<=We;++Ye){var Oe=xe[Ye];ot[pe]===pe&&Ot<It[Oe]&&!A(Bt,pe,Oe)&&(ot[Oe]=pe,ot[pe]=wt[pe]=wt[Oe],Ot=It[Oe])}}})}),{root:wt,align:ot}}function x(kt,Nt,Bt,Xt,wt){var ot={},It=k(kt,Nt,Bt,wt),zt=wt?"borderLeft":"borderRight";function Ot(qt,Ye){for(var We=It.nodes(),Oe=We.pop(),Qe={};Oe;)Qe[Oe]?qt(Oe):(Qe[Oe]=!0,We.push(Oe),We=We.concat(Ye(Oe))),Oe=We.pop()}function pe(qt){ot[qt]=It.inEdges(qt).reduce(function(Ye,We){return Math.max(Ye,ot[We.v]+It.edge(We))},0)}function xe(qt){var Ye=It.outEdges(qt).reduce(function(Oe,Qe){return Math.min(Oe,ot[Qe.w]-It.edge(Qe))},Number.POSITIVE_INFINITY),We=kt.node(qt);Ye!==Number.POSITIVE_INFINITY&&We.borderType!==zt&&(ot[qt]=Math.max(ot[qt],Ye))}return Ot(pe,It.predecessors.bind(It)),Ot(xe,It.successors.bind(It)),l.forEach(Xt,function(qt){ot[qt]=ot[Bt[qt]]}),ot}function k(kt,Nt,Bt,Xt){var wt=new R,ot=kt.graph(),It=ut(ot.nodesep,ot.edgesep,Xt);return l.forEach(Nt,function(zt){var Ot;l.forEach(zt,function(pe){var xe=Bt[pe];if(wt.setNode(xe),Ot){var qt=Bt[Ot],Ye=wt.edge(qt,xe);wt.setEdge(qt,xe,Math.max(It(kt,pe,Ot),Ye||0))}Ot=pe})}),wt}function N(kt,Nt){return l.minBy(l.values(Nt),function(Bt){var Xt=Number.NEGATIVE_INFINITY,wt=Number.POSITIVE_INFINITY;return l.forIn(Bt,function(ot,It){var zt=nt(kt,It)/2;Xt=Math.max(ot+zt,Xt),wt=Math.min(ot-zt,wt)}),Xt-wt})}function et(kt,Nt){var Bt=l.values(Nt),Xt=l.min(Bt),wt=l.max(Bt);l.forEach(["u","d"],function(ot){l.forEach(["l","r"],function(It){var zt=ot+It,Ot=kt[zt],pe;if(Ot!==Nt){var xe=l.values(Ot);pe=It==="l"?Xt-l.min(xe):wt-l.max(xe),pe&&(kt[zt]=l.mapValues(Ot,function(qt){return qt+pe}))}})})}function tt(kt,Nt){return l.mapValues(kt.ul,function(Bt,Xt){if(Nt)return kt[Nt.toLowerCase()][Xt];var wt=l.sortBy(l.map(kt,Xt));return(wt[1]+wt[2])/2})}function Ct(kt){var Nt=O.buildLayerMatrix(kt),Bt=l.merge(_(kt,Nt),g(kt,Nt)),Xt={},wt;l.forEach(["u","d"],function(It){wt=It==="u"?Nt:l.values(Nt).reverse(),l.forEach(["l","r"],function(zt){zt==="r"&&(wt=l.map(wt,function(qt){return l.values(qt).reverse()}));var Ot=(It==="u"?kt.predecessors:kt.successors).bind(kt),pe=I(kt,wt,Bt,Ot),xe=x(kt,wt,pe.root,pe.align,zt==="r");zt==="r"&&(xe=l.mapValues(xe,function(qt){return-qt})),Xt[It+zt]=xe})});var ot=N(kt,Xt);return et(Xt,ot),tt(Xt,kt.graph().align)}function ut(kt,Nt,Bt){return function(Xt,wt,ot){var It=Xt.node(wt),zt=Xt.node(ot),Ot=0,pe;if(Ot+=It.width/2,l.has(It,"labelpos"))switch(It.labelpos.toLowerCase()){case"l":pe=-It.width/2;break;case"r":pe=It.width/2;break}if(pe&&(Ot+=Bt?pe:-pe),pe=0,Ot+=(It.dummy?Nt:kt)/2,Ot+=(zt.dummy?Nt:kt)/2,Ot+=zt.width/2,l.has(zt,"labelpos"))switch(zt.labelpos.toLowerCase()){case"l":pe=zt.width/2;break;case"r":pe=-zt.width/2;break}return pe&&(Ot+=Bt?pe:-pe),pe=0,Ot}}function nt(kt,Nt){return kt.node(Nt).width}},93021:function(Tt,vt,d){"use strict";var l=d(72361),R=d(53063),O=d(92080).positionX;Tt.exports=_;function _(P){P=R.asNonCompoundGraph(P),g(P),l.forEach(O(P),function(b,A){P.node(A).x=b})}function g(P){var b=R.buildLayerMatrix(P),A=P.graph().ranksep,I=0;l.forEach(b,function(x){var k=l.max(l.map(x,function(N){return P.node(N).height}));l.forEach(x,function(N){P.node(N).y=I+k/2}),I+=k+A})}},61031:function(Tt,vt,d){"use strict";var l=d(72361),R=d(76626).Graph,O=d(2416).slack;Tt.exports=_;function _(A){var I=new R({directed:!1}),x=A.nodes()[0],k=A.nodeCount();I.setNode(x,{});for(var N,et;g(I,A)<k;)N=P(I,A),et=I.hasNode(N.v)?O(A,N):-O(A,N),b(I,A,et);return I}function g(A,I){function x(k){l.forEach(I.nodeEdges(k),function(N){var et=N.v,tt=k===et?N.w:et;!A.hasNode(tt)&&!O(I,N)&&(A.setNode(tt,{}),A.setEdge(k,tt,{}),x(tt))})}return l.forEach(A.nodes(),x),A.nodeCount()}function P(A,I){return l.minBy(I.edges(),function(x){if(A.hasNode(x.v)!==A.hasNode(x.w))return O(I,x)})}function b(A,I,x){l.forEach(A.nodes(),function(k){I.node(k).rank+=x})}},64505:function(Tt,vt,d){"use strict";var l=d(2416),R=l.longestPath,O=d(61031),_=d(77076);Tt.exports=g;function g(I){switch(I.graph().ranker){case"network-simplex":A(I);break;case"tight-tree":b(I);break;case"longest-path":P(I);break;default:A(I)}}var P=R;function b(I){R(I),O(I)}function A(I){_(I)}},77076:function(Tt,vt,d){"use strict";var l=d(72361),R=d(61031),O=d(2416).slack,_=d(2416).longestPath,g=d(76626).alg.preorder,P=d(76626).alg.postorder,b=d(53063).simplify;Tt.exports=A,A.initLowLimValues=N,A.initCutValues=I,A.calcCutValue=k,A.leaveEdge=tt,A.enterEdge=Ct,A.exchangeEdges=ut;function A(Bt){Bt=b(Bt),_(Bt);var Xt=R(Bt);N(Xt),I(Xt,Bt);for(var wt,ot;wt=tt(Xt);)ot=Ct(Xt,Bt,wt),ut(Xt,Bt,wt,ot)}function I(Bt,Xt){var wt=P(Bt,Bt.nodes());wt=wt.slice(0,wt.length-1),l.forEach(wt,function(ot){x(Bt,Xt,ot)})}function x(Bt,Xt,wt){var ot=Bt.node(wt),It=ot.parent;Bt.edge(wt,It).cutvalue=k(Bt,Xt,wt)}function k(Bt,Xt,wt){var ot=Bt.node(wt),It=ot.parent,zt=!0,Ot=Xt.edge(wt,It),pe=0;return Ot||(zt=!1,Ot=Xt.edge(It,wt)),pe=Ot.weight,l.forEach(Xt.nodeEdges(wt),function(xe){var qt=xe.v===wt,Ye=qt?xe.w:xe.v;if(Ye!==It){var We=qt===zt,Oe=Xt.edge(xe).weight;if(pe+=We?Oe:-Oe,kt(Bt,wt,Ye)){var Qe=Bt.edge(wt,Ye).cutvalue;pe+=We?-Qe:Qe}}}),pe}function N(Bt,Xt){arguments.length<2&&(Xt=Bt.nodes()[0]),et(Bt,{},1,Xt)}function et(Bt,Xt,wt,ot,It){var zt=wt,Ot=Bt.node(ot);return Xt[ot]=!0,l.forEach(Bt.neighbors(ot),function(pe){l.has(Xt,pe)||(wt=et(Bt,Xt,wt,pe,ot))}),Ot.low=zt,Ot.lim=wt++,It?Ot.parent=It:delete Ot.parent,wt}function tt(Bt){return l.find(Bt.edges(),function(Xt){return Bt.edge(Xt).cutvalue<0})}function Ct(Bt,Xt,wt){var ot=wt.v,It=wt.w;Xt.hasEdge(ot,It)||(ot=wt.w,It=wt.v);var zt=Bt.node(ot),Ot=Bt.node(It),pe=zt,xe=!1;zt.lim>Ot.lim&&(pe=Ot,xe=!0);var qt=l.filter(Xt.edges(),function(Ye){return xe===Nt(Bt,Bt.node(Ye.v),pe)&&xe!==Nt(Bt,Bt.node(Ye.w),pe)});return l.minBy(qt,function(Ye){return O(Xt,Ye)})}function ut(Bt,Xt,wt,ot){var It=wt.v,zt=wt.w;Bt.removeEdge(It,zt),Bt.setEdge(ot.v,ot.w,{}),N(Bt),I(Bt,Xt),nt(Bt,Xt)}function nt(Bt,Xt){var wt=l.find(Bt.nodes(),function(It){return!Xt.node(It).parent}),ot=g(Bt,wt);ot=ot.slice(1),l.forEach(ot,function(It){var zt=Bt.node(It).parent,Ot=Xt.edge(It,zt),pe=!1;Ot||(Ot=Xt.edge(zt,It),pe=!0),Xt.node(It).rank=Xt.node(zt).rank+(pe?Ot.minlen:-Ot.minlen)})}function kt(Bt,Xt,wt){return Bt.hasEdge(Xt,wt)}function Nt(Bt,Xt,wt){return wt.low<=Xt.lim&&Xt.lim<=wt.lim}},2416:function(Tt,vt,d){"use strict";var l=d(72361);Tt.exports={longestPath:R,slack:O};function R(_){var g={};function P(b){var A=_.node(b);if(l.has(g,b))return A.rank;g[b]=!0;var I=l.min(l.map(_.outEdges(b),function(x){return P(x.w)-_.edge(x).minlen}));return(I===Number.POSITIVE_INFINITY||I===void 0||I===null)&&(I=0),A.rank=I}l.forEach(_.sources(),P)}function O(_,g){return _.node(g.w).rank-_.node(g.v).rank-_.edge(g).minlen}},53063:function(Tt,vt,d){"use strict";var l=d(72361),R=d(76626).Graph;Tt.exports={addDummyNode:O,simplify:_,asNonCompoundGraph:g,successorWeights:P,predecessorWeights:b,intersectRect:A,buildLayerMatrix:I,normalizeRanks:x,removeEmptyRanks:k,addBorderNode:N,maxRank:et,partition:tt,time:Ct,notime:ut};function O(nt,kt,Nt,Bt){var Xt;do Xt=l.uniqueId(Bt);while(nt.hasNode(Xt));return Nt.dummy=kt,nt.setNode(Xt,Nt),Xt}function _(nt){var kt=new R().setGraph(nt.graph());return l.forEach(nt.nodes(),function(Nt){kt.setNode(Nt,nt.node(Nt))}),l.forEach(nt.edges(),function(Nt){var Bt=kt.edge(Nt.v,Nt.w)||{weight:0,minlen:1},Xt=nt.edge(Nt);kt.setEdge(Nt.v,Nt.w,{weight:Bt.weight+Xt.weight,minlen:Math.max(Bt.minlen,Xt.minlen)})}),kt}function g(nt){var kt=new R({multigraph:nt.isMultigraph()}).setGraph(nt.graph());return l.forEach(nt.nodes(),function(Nt){nt.children(Nt).length||kt.setNode(Nt,nt.node(Nt))}),l.forEach(nt.edges(),function(Nt){kt.setEdge(Nt,nt.edge(Nt))}),kt}function P(nt){var kt=l.map(nt.nodes(),function(Nt){var Bt={};return l.forEach(nt.outEdges(Nt),function(Xt){Bt[Xt.w]=(Bt[Xt.w]||0)+nt.edge(Xt).weight}),Bt});return l.zipObject(nt.nodes(),kt)}function b(nt){var kt=l.map(nt.nodes(),function(Nt){var Bt={};return l.forEach(nt.inEdges(Nt),function(Xt){Bt[Xt.v]=(Bt[Xt.v]||0)+nt.edge(Xt).weight}),Bt});return l.zipObject(nt.nodes(),kt)}function A(nt,kt){var Nt=nt.x,Bt=nt.y,Xt=kt.x-Nt,wt=kt.y-Bt,ot=nt.width/2,It=nt.height/2;if(!Xt&&!wt)throw new Error("Not possible to find intersection inside of the rectangle");var zt,Ot;return Math.abs(wt)*ot>Math.abs(Xt)*It?(wt<0&&(It=-It),zt=It*Xt/wt,Ot=It):(Xt<0&&(ot=-ot),zt=ot,Ot=ot*wt/Xt),{x:Nt+zt,y:Bt+Ot}}function I(nt){var kt=l.map(l.range(et(nt)+1),function(){return[]});return l.forEach(nt.nodes(),function(Nt){var Bt=nt.node(Nt),Xt=Bt.rank;l.isUndefined(Xt)||(kt[Xt][Bt.order]=Nt)}),kt}function x(nt){var kt=l.min(l.map(nt.nodes(),function(Nt){return nt.node(Nt).rank}));l.forEach(nt.nodes(),function(Nt){var Bt=nt.node(Nt);l.has(Bt,"rank")&&(Bt.rank-=kt)})}function k(nt){var kt=l.min(l.map(nt.nodes(),function(wt){return nt.node(wt).rank})),Nt=[];l.forEach(nt.nodes(),function(wt){var ot=nt.node(wt).rank-kt;Nt[ot]||(Nt[ot]=[]),Nt[ot].push(wt)});var Bt=0,Xt=nt.graph().nodeRankFactor;l.forEach(Nt,function(wt,ot){l.isUndefined(wt)&&ot%Xt!==0?--Bt:Bt&&l.forEach(wt,function(It){nt.node(It).rank+=Bt})})}function N(nt,kt,Nt,Bt){var Xt={width:0,height:0};return arguments.length>=4&&(Xt.rank=Nt,Xt.order=Bt),O(nt,"border",Xt,kt)}function et(nt){return l.max(l.map(nt.nodes(),function(kt){var Nt=nt.node(kt).rank;if(!l.isUndefined(Nt))return Nt}))}function tt(nt,kt){var Nt={lhs:[],rhs:[]};return l.forEach(nt,function(Bt){kt(Bt)?Nt.lhs.push(Bt):Nt.rhs.push(Bt)}),Nt}function Ct(nt,kt){var Nt=l.now();try{return kt()}finally{console.log(nt+" time: "+(l.now()-Nt)+"ms")}}function ut(nt,kt){return kt()}},11897:function(Tt){Tt.exports="0.8.5"},37271:function(Tt){"use strict";var vt=Object.prototype.hasOwnProperty,d="~";function l(){}Object.create&&(l.prototype=Object.create(null),new l().__proto__||(d=!1));function R(P,b,A){this.fn=P,this.context=b,this.once=A||!1}function O(P,b,A,I,x){if(typeof A!="function")throw new TypeError("The listener must be a function");var k=new R(A,I||P,x),N=d?d+b:b;return P._events[N]?P._events[N].fn?P._events[N]=[P._events[N],k]:P._events[N].push(k):(P._events[N]=k,P._eventsCount++),P}function _(P,b){--P._eventsCount===0?P._events=new l:delete P._events[b]}function g(){this._events=new l,this._eventsCount=0}g.prototype.eventNames=function(){var b=[],A,I;if(this._eventsCount===0)return b;for(I in A=this._events)vt.call(A,I)&&b.push(d?I.slice(1):I);return Object.getOwnPropertySymbols?b.concat(Object.getOwnPropertySymbols(A)):b},g.prototype.listeners=function(b){var A=d?d+b:b,I=this._events[A];if(!I)return[];if(I.fn)return[I.fn];for(var x=0,k=I.length,N=new Array(k);x<k;x++)N[x]=I[x].fn;return N},g.prototype.listenerCount=function(b){var A=d?d+b:b,I=this._events[A];return I?I.fn?1:I.length:0},g.prototype.emit=function(b,A,I,x,k,N){var et=d?d+b:b;if(!this._events[et])return!1;var tt=this._events[et],Ct=arguments.length,ut,nt;if(tt.fn){switch(tt.once&&this.removeListener(b,tt.fn,void 0,!0),Ct){case 1:return tt.fn.call(tt.context),!0;case 2:return tt.fn.call(tt.context,A),!0;case 3:return tt.fn.call(tt.context,A,I),!0;case 4:return tt.fn.call(tt.context,A,I,x),!0;case 5:return tt.fn.call(tt.context,A,I,x,k),!0;case 6:return tt.fn.call(tt.context,A,I,x,k,N),!0}for(nt=1,ut=new Array(Ct-1);nt<Ct;nt++)ut[nt-1]=arguments[nt];tt.fn.apply(tt.context,ut)}else{var kt=tt.length,Nt;for(nt=0;nt<kt;nt++)switch(tt[nt].once&&this.removeListener(b,tt[nt].fn,void 0,!0),Ct){case 1:tt[nt].fn.call(tt[nt].context);break;case 2:tt[nt].fn.call(tt[nt].context,A);break;case 3:tt[nt].fn.call(tt[nt].context,A,I);break;case 4:tt[nt].fn.call(tt[nt].context,A,I,x);break;default:if(!ut)for(Nt=1,ut=new Array(Ct-1);Nt<Ct;Nt++)ut[Nt-1]=arguments[Nt];tt[nt].fn.apply(tt[nt].context,ut)}}return!0},g.prototype.on=function(b,A,I){return O(this,b,A,I,!1)},g.prototype.once=function(b,A,I){return O(this,b,A,I,!0)},g.prototype.removeListener=function(b,A,I,x){var k=d?d+b:b;if(!this._events[k])return this;if(!A)return _(this,k),this;var N=this._events[k];if(N.fn)N.fn===A&&(!x||N.once)&&(!I||N.context===I)&&_(this,k);else{for(var et=0,tt=[],Ct=N.length;et<Ct;et++)(N[et].fn!==A||x&&!N[et].once||I&&N[et].context!==I)&&tt.push(N[et]);tt.length?this._events[k]=tt.length===1?tt[0]:tt:_(this,k)}return this},g.prototype.removeAllListeners=function(b){var A;return b?(A=d?d+b:b,this._events[A]&&_(this,A)):(this._events=new l,this._eventsCount=0),this},g.prototype.off=g.prototype.removeListener,g.prototype.addListener=g.prototype.on,g.prefixed=d,g.EventEmitter=g,Tt.exports=g},85551:function(Tt,vt,d){"use strict";d.d(vt,{Ib:function(){return l},WT:function(){return R},yy:function(){return _}});var l=1e-6,R=typeof Float32Array!="undefined"?Float32Array:Array,O=Math.random,_="zyx";function g(N){return N>=0?Math.round(N):N%.5===0?Math.floor(N):Math.round(N)}function P(N){R=N}var b=Math.PI/180,A=180/Math.PI;function I(N){return N*b}function x(N){return N*A}function k(N,et){var tt=arguments.length>2&&arguments[2]!==void 0?arguments[2]:l;return Math.abs(N-et)<=tt*Math.max(1,Math.abs(N),Math.abs(et))}},79111:function(Tt,vt,d){"use strict";d.d(vt,{Ue:function(){return R},al:function(){return P},xO:function(){return O}});var l=d(85551);function R(){var Mt=new l.WT(9);return l.WT!=Float32Array&&(Mt[1]=0,Mt[2]=0,Mt[3]=0,Mt[5]=0,Mt[6]=0,Mt[7]=0),Mt[0]=1,Mt[4]=1,Mt[8]=1,Mt}function O(Mt,ne){return Mt[0]=ne[0],Mt[1]=ne[1],Mt[2]=ne[2],Mt[3]=ne[4],Mt[4]=ne[5],Mt[5]=ne[6],Mt[6]=ne[8],Mt[7]=ne[9],Mt[8]=ne[10],Mt}function _(Mt){var ne=new glMatrix.ARRAY_TYPE(9);return ne[0]=Mt[0],ne[1]=Mt[1],ne[2]=Mt[2],ne[3]=Mt[3],ne[4]=Mt[4],ne[5]=Mt[5],ne[6]=Mt[6],ne[7]=Mt[7],ne[8]=Mt[8],ne}function g(Mt,ne){return Mt[0]=ne[0],Mt[1]=ne[1],Mt[2]=ne[2],Mt[3]=ne[3],Mt[4]=ne[4],Mt[5]=ne[5],Mt[6]=ne[6],Mt[7]=ne[7],Mt[8]=ne[8],Mt}function P(Mt,ne,Me,nn,le,be,De,Yt,re){var xt=new l.WT(9);return xt[0]=Mt,xt[1]=ne,xt[2]=Me,xt[3]=nn,xt[4]=le,xt[5]=be,xt[6]=De,xt[7]=Yt,xt[8]=re,xt}function b(Mt,ne,Me,nn,le,be,De,Yt,re,xt){return Mt[0]=ne,Mt[1]=Me,Mt[2]=nn,Mt[3]=le,Mt[4]=be,Mt[5]=De,Mt[6]=Yt,Mt[7]=re,Mt[8]=xt,Mt}function A(Mt){return Mt[0]=1,Mt[1]=0,Mt[2]=0,Mt[3]=0,Mt[4]=1,Mt[5]=0,Mt[6]=0,Mt[7]=0,Mt[8]=1,Mt}function I(Mt,ne){if(Mt===ne){var Me=ne[1],nn=ne[2],le=ne[5];Mt[1]=ne[3],Mt[2]=ne[6],Mt[3]=Me,Mt[5]=ne[7],Mt[6]=nn,Mt[7]=le}else Mt[0]=ne[0],Mt[1]=ne[3],Mt[2]=ne[6],Mt[3]=ne[1],Mt[4]=ne[4],Mt[5]=ne[7],Mt[6]=ne[2],Mt[7]=ne[5],Mt[8]=ne[8];return Mt}function x(Mt,ne){var Me=ne[0],nn=ne[1],le=ne[2],be=ne[3],De=ne[4],Yt=ne[5],re=ne[6],xt=ne[7],at=ne[8],se=at*De-Yt*xt,Fe=-at*be+Yt*re,Re=xt*be-De*re,ge=Me*se+nn*Fe+le*Re;return ge?(ge=1/ge,Mt[0]=se*ge,Mt[1]=(-at*nn+le*xt)*ge,Mt[2]=(Yt*nn-le*De)*ge,Mt[3]=Fe*ge,Mt[4]=(at*Me-le*re)*ge,Mt[5]=(-Yt*Me+le*be)*ge,Mt[6]=Re*ge,Mt[7]=(-xt*Me+nn*re)*ge,Mt[8]=(De*Me-nn*be)*ge,Mt):null}function k(Mt,ne){var Me=ne[0],nn=ne[1],le=ne[2],be=ne[3],De=ne[4],Yt=ne[5],re=ne[6],xt=ne[7],at=ne[8];return Mt[0]=De*at-Yt*xt,Mt[1]=le*xt-nn*at,Mt[2]=nn*Yt-le*De,Mt[3]=Yt*re-be*at,Mt[4]=Me*at-le*re,Mt[5]=le*be-Me*Yt,Mt[6]=be*xt-De*re,Mt[7]=nn*re-Me*xt,Mt[8]=Me*De-nn*be,Mt}function N(Mt){var ne=Mt[0],Me=Mt[1],nn=Mt[2],le=Mt[3],be=Mt[4],De=Mt[5],Yt=Mt[6],re=Mt[7],xt=Mt[8];return ne*(xt*be-De*re)+Me*(-xt*le+De*Yt)+nn*(re*le-be*Yt)}function et(Mt,ne,Me){var nn=ne[0],le=ne[1],be=ne[2],De=ne[3],Yt=ne[4],re=ne[5],xt=ne[6],at=ne[7],se=ne[8],Fe=Me[0],Re=Me[1],ge=Me[2],Ie=Me[3],Ne=Me[4],bt=Me[5],Jt=Me[6],oe=Me[7],M=Me[8];return Mt[0]=Fe*nn+Re*De+ge*xt,Mt[1]=Fe*le+Re*Yt+ge*at,Mt[2]=Fe*be+Re*re+ge*se,Mt[3]=Ie*nn+Ne*De+bt*xt,Mt[4]=Ie*le+Ne*Yt+bt*at,Mt[5]=Ie*be+Ne*re+bt*se,Mt[6]=Jt*nn+oe*De+M*xt,Mt[7]=Jt*le+oe*Yt+M*at,Mt[8]=Jt*be+oe*re+M*se,Mt}function tt(Mt,ne,Me){var nn=ne[0],le=ne[1],be=ne[2],De=ne[3],Yt=ne[4],re=ne[5],xt=ne[6],at=ne[7],se=ne[8],Fe=Me[0],Re=Me[1];return Mt[0]=nn,Mt[1]=le,Mt[2]=be,Mt[3]=De,Mt[4]=Yt,Mt[5]=re,Mt[6]=Fe*nn+Re*De+xt,Mt[7]=Fe*le+Re*Yt+at,Mt[8]=Fe*be+Re*re+se,Mt}function Ct(Mt,ne,Me){var nn=ne[0],le=ne[1],be=ne[2],De=ne[3],Yt=ne[4],re=ne[5],xt=ne[6],at=ne[7],se=ne[8],Fe=Math.sin(Me),Re=Math.cos(Me);return Mt[0]=Re*nn+Fe*De,Mt[1]=Re*le+Fe*Yt,Mt[2]=Re*be+Fe*re,Mt[3]=Re*De-Fe*nn,Mt[4]=Re*Yt-Fe*le,Mt[5]=Re*re-Fe*be,Mt[6]=xt,Mt[7]=at,Mt[8]=se,Mt}function ut(Mt,ne,Me){var nn=Me[0],le=Me[1];return Mt[0]=nn*ne[0],Mt[1]=nn*ne[1],Mt[2]=nn*ne[2],Mt[3]=le*ne[3],Mt[4]=le*ne[4],Mt[5]=le*ne[5],Mt[6]=ne[6],Mt[7]=ne[7],Mt[8]=ne[8],Mt}function nt(Mt,ne){return Mt[0]=1,Mt[1]=0,Mt[2]=0,Mt[3]=0,Mt[4]=1,Mt[5]=0,Mt[6]=ne[0],Mt[7]=ne[1],Mt[8]=1,Mt}function kt(Mt,ne){var Me=Math.sin(ne),nn=Math.cos(ne);return Mt[0]=nn,Mt[1]=Me,Mt[2]=0,Mt[3]=-Me,Mt[4]=nn,Mt[5]=0,Mt[6]=0,Mt[7]=0,Mt[8]=1,Mt}function Nt(Mt,ne){return Mt[0]=ne[0],Mt[1]=0,Mt[2]=0,Mt[3]=0,Mt[4]=ne[1],Mt[5]=0,Mt[6]=0,Mt[7]=0,Mt[8]=1,Mt}function Bt(Mt,ne){return Mt[0]=ne[0],Mt[1]=ne[1],Mt[2]=0,Mt[3]=ne[2],Mt[4]=ne[3],Mt[5]=0,Mt[6]=ne[4],Mt[7]=ne[5],Mt[8]=1,Mt}function Xt(Mt,ne){var Me=ne[0],nn=ne[1],le=ne[2],be=ne[3],De=Me+Me,Yt=nn+nn,re=le+le,xt=Me*De,at=nn*De,se=nn*Yt,Fe=le*De,Re=le*Yt,ge=le*re,Ie=be*De,Ne=be*Yt,bt=be*re;return Mt[0]=1-se-ge,Mt[3]=at-bt,Mt[6]=Fe+Ne,Mt[1]=at+bt,Mt[4]=1-xt-ge,Mt[7]=Re-Ie,Mt[2]=Fe-Ne,Mt[5]=Re+Ie,Mt[8]=1-xt-se,Mt}function wt(Mt,ne){var Me=ne[0],nn=ne[1],le=ne[2],be=ne[3],De=ne[4],Yt=ne[5],re=ne[6],xt=ne[7],at=ne[8],se=ne[9],Fe=ne[10],Re=ne[11],ge=ne[12],Ie=ne[13],Ne=ne[14],bt=ne[15],Jt=Me*Yt-nn*De,oe=Me*re-le*De,M=Me*xt-be*De,Q=nn*re-le*Yt,te=nn*xt-be*Yt,Ut=le*xt-be*re,we=at*Ie-se*ge,Ce=at*Ne-Fe*ge,_e=at*bt-Re*ge,mt=se*Ne-Fe*Ie,X=se*bt-Re*Ie,Pt=Fe*bt-Re*Ne,At=Jt*Pt-oe*X+M*mt+Q*_e-te*Ce+Ut*we;return At?(At=1/At,Mt[0]=(Yt*Pt-re*X+xt*mt)*At,Mt[1]=(re*_e-De*Pt-xt*Ce)*At,Mt[2]=(De*X-Yt*_e+xt*we)*At,Mt[3]=(le*X-nn*Pt-be*mt)*At,Mt[4]=(Me*Pt-le*_e+be*Ce)*At,Mt[5]=(nn*_e-Me*X-be*we)*At,Mt[6]=(Ie*Ut-Ne*te+bt*Q)*At,Mt[7]=(Ne*M-ge*Ut-bt*oe)*At,Mt[8]=(ge*te-Ie*M+bt*Jt)*At,Mt):null}function ot(Mt,ne,Me){return Mt[0]=2/ne,Mt[1]=0,Mt[2]=0,Mt[3]=0,Mt[4]=-2/Me,Mt[5]=0,Mt[6]=-1,Mt[7]=1,Mt[8]=1,Mt}function It(Mt){return"mat3("+Mt[0]+", "+Mt[1]+", "+Mt[2]+", "+Mt[3]+", "+Mt[4]+", "+Mt[5]+", "+Mt[6]+", "+Mt[7]+", "+Mt[8]+")"}function zt(Mt){return Math.sqrt(Mt[0]*Mt[0]+Mt[1]*Mt[1]+Mt[2]*Mt[2]+Mt[3]*Mt[3]+Mt[4]*Mt[4]+Mt[5]*Mt[5]+Mt[6]*Mt[6]+Mt[7]*Mt[7]+Mt[8]*Mt[8])}function Ot(Mt,ne,Me){return Mt[0]=ne[0]+Me[0],Mt[1]=ne[1]+Me[1],Mt[2]=ne[2]+Me[2],Mt[3]=ne[3]+Me[3],Mt[4]=ne[4]+Me[4],Mt[5]=ne[5]+Me[5],Mt[6]=ne[6]+Me[6],Mt[7]=ne[7]+Me[7],Mt[8]=ne[8]+Me[8],Mt}function pe(Mt,ne,Me){return Mt[0]=ne[0]-Me[0],Mt[1]=ne[1]-Me[1],Mt[2]=ne[2]-Me[2],Mt[3]=ne[3]-Me[3],Mt[4]=ne[4]-Me[4],Mt[5]=ne[5]-Me[5],Mt[6]=ne[6]-Me[6],Mt[7]=ne[7]-Me[7],Mt[8]=ne[8]-Me[8],Mt}function xe(Mt,ne,Me){return Mt[0]=ne[0]*Me,Mt[1]=ne[1]*Me,Mt[2]=ne[2]*Me,Mt[3]=ne[3]*Me,Mt[4]=ne[4]*Me,Mt[5]=ne[5]*Me,Mt[6]=ne[6]*Me,Mt[7]=ne[7]*Me,Mt[8]=ne[8]*Me,Mt}function qt(Mt,ne,Me,nn){return Mt[0]=ne[0]+Me[0]*nn,Mt[1]=ne[1]+Me[1]*nn,Mt[2]=ne[2]+Me[2]*nn,Mt[3]=ne[3]+Me[3]*nn,Mt[4]=ne[4]+Me[4]*nn,Mt[5]=ne[5]+Me[5]*nn,Mt[6]=ne[6]+Me[6]*nn,Mt[7]=ne[7]+Me[7]*nn,Mt[8]=ne[8]+Me[8]*nn,Mt}function Ye(Mt,ne){return Mt[0]===ne[0]&&Mt[1]===ne[1]&&Mt[2]===ne[2]&&Mt[3]===ne[3]&&Mt[4]===ne[4]&&Mt[5]===ne[5]&&Mt[6]===ne[6]&&Mt[7]===ne[7]&&Mt[8]===ne[8]}function We(Mt,ne){var Me=Mt[0],nn=Mt[1],le=Mt[2],be=Mt[3],De=Mt[4],Yt=Mt[5],re=Mt[6],xt=Mt[7],at=Mt[8],se=ne[0],Fe=ne[1],Re=ne[2],ge=ne[3],Ie=ne[4],Ne=ne[5],bt=ne[6],Jt=ne[7],oe=ne[8];return Math.abs(Me-se)<=glMatrix.EPSILON*Math.max(1,Math.abs(Me),Math.abs(se))&&Math.abs(nn-Fe)<=glMatrix.EPSILON*Math.max(1,Math.abs(nn),Math.abs(Fe))&&Math.abs(le-Re)<=glMatrix.EPSILON*Math.max(1,Math.abs(le),Math.abs(Re))&&Math.abs(be-ge)<=glMatrix.EPSILON*Math.max(1,Math.abs(be),Math.abs(ge))&&Math.abs(De-Ie)<=glMatrix.EPSILON*Math.max(1,Math.abs(De),Math.abs(Ie))&&Math.abs(Yt-Ne)<=glMatrix.EPSILON*Math.max(1,Math.abs(Yt),Math.abs(Ne))&&Math.abs(re-bt)<=glMatrix.EPSILON*Math.max(1,Math.abs(re),Math.abs(bt))&&Math.abs(xt-Jt)<=glMatrix.EPSILON*Math.max(1,Math.abs(xt),Math.abs(Jt))&&Math.abs(at-oe)<=glMatrix.EPSILON*Math.max(1,Math.abs(at),Math.abs(oe))}var Oe=null,Qe=null},60187:function(Tt,vt,d){"use strict";d.r(vt),d.d(vt,{add:function(){return Fe},adjoint:function(){return x},clone:function(){return O},copy:function(){return _},create:function(){return R},decompose:function(){return Ye},determinant:function(){return k},equals:function(){return bt},exactEquals:function(){return Ne},frob:function(){return se},fromQuat:function(){return Qe},fromQuat2:function(){return Ot},fromRotation:function(){return Xt},fromRotationTranslation:function(){return zt},fromRotationTranslationScale:function(){return We},fromRotationTranslationScaleOrigin:function(){return Oe},fromScaling:function(){return Bt},fromTranslation:function(){return Nt},fromValues:function(){return g},fromXRotation:function(){return wt},fromYRotation:function(){return ot},fromZRotation:function(){return It},frustum:function(){return Mt},getRotation:function(){return qt},getScaling:function(){return xe},getTranslation:function(){return pe},identity:function(){return b},invert:function(){return I},lookAt:function(){return re},mul:function(){return Jt},multiply:function(){return N},multiplyScalar:function(){return ge},multiplyScalarAndAdd:function(){return Ie},ortho:function(){return De},orthoNO:function(){return be},orthoZO:function(){return Yt},perspective:function(){return Me},perspectiveFromFieldOfView:function(){return le},perspectiveNO:function(){return ne},perspectiveZO:function(){return nn},rotate:function(){return Ct},rotateX:function(){return ut},rotateY:function(){return nt},rotateZ:function(){return kt},scale:function(){return tt},set:function(){return P},str:function(){return at},sub:function(){return oe},subtract:function(){return Re},targetTo:function(){return xt},translate:function(){return et},transpose:function(){return A}});var l=d(85551);function R(){var M=new l.WT(16);return l.WT!=Float32Array&&(M[1]=0,M[2]=0,M[3]=0,M[4]=0,M[6]=0,M[7]=0,M[8]=0,M[9]=0,M[11]=0,M[12]=0,M[13]=0,M[14]=0),M[0]=1,M[5]=1,M[10]=1,M[15]=1,M}function O(M){var Q=new l.WT(16);return Q[0]=M[0],Q[1]=M[1],Q[2]=M[2],Q[3]=M[3],Q[4]=M[4],Q[5]=M[5],Q[6]=M[6],Q[7]=M[7],Q[8]=M[8],Q[9]=M[9],Q[10]=M[10],Q[11]=M[11],Q[12]=M[12],Q[13]=M[13],Q[14]=M[14],Q[15]=M[15],Q}function _(M,Q){return M[0]=Q[0],M[1]=Q[1],M[2]=Q[2],M[3]=Q[3],M[4]=Q[4],M[5]=Q[5],M[6]=Q[6],M[7]=Q[7],M[8]=Q[8],M[9]=Q[9],M[10]=Q[10],M[11]=Q[11],M[12]=Q[12],M[13]=Q[13],M[14]=Q[14],M[15]=Q[15],M}function g(M,Q,te,Ut,we,Ce,_e,mt,X,Pt,At,Rt,_t,Vt,ae,fe){var me=new l.WT(16);return me[0]=M,me[1]=Q,me[2]=te,me[3]=Ut,me[4]=we,me[5]=Ce,me[6]=_e,me[7]=mt,me[8]=X,me[9]=Pt,me[10]=At,me[11]=Rt,me[12]=_t,me[13]=Vt,me[14]=ae,me[15]=fe,me}function P(M,Q,te,Ut,we,Ce,_e,mt,X,Pt,At,Rt,_t,Vt,ae,fe,me){return M[0]=Q,M[1]=te,M[2]=Ut,M[3]=we,M[4]=Ce,M[5]=_e,M[6]=mt,M[7]=X,M[8]=Pt,M[9]=At,M[10]=Rt,M[11]=_t,M[12]=Vt,M[13]=ae,M[14]=fe,M[15]=me,M}function b(M){return M[0]=1,M[1]=0,M[2]=0,M[3]=0,M[4]=0,M[5]=1,M[6]=0,M[7]=0,M[8]=0,M[9]=0,M[10]=1,M[11]=0,M[12]=0,M[13]=0,M[14]=0,M[15]=1,M}function A(M,Q){if(M===Q){var te=Q[1],Ut=Q[2],we=Q[3],Ce=Q[6],_e=Q[7],mt=Q[11];M[1]=Q[4],M[2]=Q[8],M[3]=Q[12],M[4]=te,M[6]=Q[9],M[7]=Q[13],M[8]=Ut,M[9]=Ce,M[11]=Q[14],M[12]=we,M[13]=_e,M[14]=mt}else M[0]=Q[0],M[1]=Q[4],M[2]=Q[8],M[3]=Q[12],M[4]=Q[1],M[5]=Q[5],M[6]=Q[9],M[7]=Q[13],M[8]=Q[2],M[9]=Q[6],M[10]=Q[10],M[11]=Q[14],M[12]=Q[3],M[13]=Q[7],M[14]=Q[11],M[15]=Q[15];return M}function I(M,Q){var te=Q[0],Ut=Q[1],we=Q[2],Ce=Q[3],_e=Q[4],mt=Q[5],X=Q[6],Pt=Q[7],At=Q[8],Rt=Q[9],_t=Q[10],Vt=Q[11],ae=Q[12],fe=Q[13],me=Q[14],Ze=Q[15],Ge=te*mt-Ut*_e,Ve=te*X-we*_e,rn=te*Pt-Ce*_e,wn=Ut*X-we*mt,on=Ut*Pt-Ce*mt,_n=we*Pt-Ce*X,Cn=At*fe-Rt*ae,Ln=At*me-_t*ae,En=At*Ze-Vt*ae,cr=Rt*me-_t*fe,Bn=Rt*Ze-Vt*fe,br=_t*Ze-Vt*me,fr=Ge*br-Ve*Bn+rn*cr+wn*En-on*Ln+_n*Cn;return fr?(fr=1/fr,M[0]=(mt*br-X*Bn+Pt*cr)*fr,M[1]=(we*Bn-Ut*br-Ce*cr)*fr,M[2]=(fe*_n-me*on+Ze*wn)*fr,M[3]=(_t*on-Rt*_n-Vt*wn)*fr,M[4]=(X*En-_e*br-Pt*Ln)*fr,M[5]=(te*br-we*En+Ce*Ln)*fr,M[6]=(me*rn-ae*_n-Ze*Ve)*fr,M[7]=(At*_n-_t*rn+Vt*Ve)*fr,M[8]=(_e*Bn-mt*En+Pt*Cn)*fr,M[9]=(Ut*En-te*Bn-Ce*Cn)*fr,M[10]=(ae*on-fe*rn+Ze*Ge)*fr,M[11]=(Rt*rn-At*on-Vt*Ge)*fr,M[12]=(mt*Ln-_e*cr-X*Cn)*fr,M[13]=(te*cr-Ut*Ln+we*Cn)*fr,M[14]=(fe*Ve-ae*wn-me*Ge)*fr,M[15]=(At*wn-Rt*Ve+_t*Ge)*fr,M):null}function x(M,Q){var te=Q[0],Ut=Q[1],we=Q[2],Ce=Q[3],_e=Q[4],mt=Q[5],X=Q[6],Pt=Q[7],At=Q[8],Rt=Q[9],_t=Q[10],Vt=Q[11],ae=Q[12],fe=Q[13],me=Q[14],Ze=Q[15],Ge=te*mt-Ut*_e,Ve=te*X-we*_e,rn=te*Pt-Ce*_e,wn=Ut*X-we*mt,on=Ut*Pt-Ce*mt,_n=we*Pt-Ce*X,Cn=At*fe-Rt*ae,Ln=At*me-_t*ae,En=At*Ze-Vt*ae,cr=Rt*me-_t*fe,Bn=Rt*Ze-Vt*fe,br=_t*Ze-Vt*me;return M[0]=mt*br-X*Bn+Pt*cr,M[1]=we*Bn-Ut*br-Ce*cr,M[2]=fe*_n-me*on+Ze*wn,M[3]=_t*on-Rt*_n-Vt*wn,M[4]=X*En-_e*br-Pt*Ln,M[5]=te*br-we*En+Ce*Ln,M[6]=me*rn-ae*_n-Ze*Ve,M[7]=At*_n-_t*rn+Vt*Ve,M[8]=_e*Bn-mt*En+Pt*Cn,M[9]=Ut*En-te*Bn-Ce*Cn,M[10]=ae*on-fe*rn+Ze*Ge,M[11]=Rt*rn-At*on-Vt*Ge,M[12]=mt*Ln-_e*cr-X*Cn,M[13]=te*cr-Ut*Ln+we*Cn,M[14]=fe*Ve-ae*wn-me*Ge,M[15]=At*wn-Rt*Ve+_t*Ge,M}function k(M){var Q=M[0],te=M[1],Ut=M[2],we=M[3],Ce=M[4],_e=M[5],mt=M[6],X=M[7],Pt=M[8],At=M[9],Rt=M[10],_t=M[11],Vt=M[12],ae=M[13],fe=M[14],me=M[15],Ze=Q*_e-te*Ce,Ge=Q*mt-Ut*Ce,Ve=te*mt-Ut*_e,rn=Pt*ae-At*Vt,wn=Pt*fe-Rt*Vt,on=At*fe-Rt*ae,_n=Q*on-te*wn+Ut*rn,Cn=Ce*on-_e*wn+mt*rn,Ln=Pt*Ve-At*Ge+Rt*Ze,En=Vt*Ve-ae*Ge+fe*Ze;return X*_n-we*Cn+me*Ln-_t*En}function N(M,Q,te){var Ut=Q[0],we=Q[1],Ce=Q[2],_e=Q[3],mt=Q[4],X=Q[5],Pt=Q[6],At=Q[7],Rt=Q[8],_t=Q[9],Vt=Q[10],ae=Q[11],fe=Q[12],me=Q[13],Ze=Q[14],Ge=Q[15],Ve=te[0],rn=te[1],wn=te[2],on=te[3];return M[0]=Ve*Ut+rn*mt+wn*Rt+on*fe,M[1]=Ve*we+rn*X+wn*_t+on*me,M[2]=Ve*Ce+rn*Pt+wn*Vt+on*Ze,M[3]=Ve*_e+rn*At+wn*ae+on*Ge,Ve=te[4],rn=te[5],wn=te[6],on=te[7],M[4]=Ve*Ut+rn*mt+wn*Rt+on*fe,M[5]=Ve*we+rn*X+wn*_t+on*me,M[6]=Ve*Ce+rn*Pt+wn*Vt+on*Ze,M[7]=Ve*_e+rn*At+wn*ae+on*Ge,Ve=te[8],rn=te[9],wn=te[10],on=te[11],M[8]=Ve*Ut+rn*mt+wn*Rt+on*fe,M[9]=Ve*we+rn*X+wn*_t+on*me,M[10]=Ve*Ce+rn*Pt+wn*Vt+on*Ze,M[11]=Ve*_e+rn*At+wn*ae+on*Ge,Ve=te[12],rn=te[13],wn=te[14],on=te[15],M[12]=Ve*Ut+rn*mt+wn*Rt+on*fe,M[13]=Ve*we+rn*X+wn*_t+on*me,M[14]=Ve*Ce+rn*Pt+wn*Vt+on*Ze,M[15]=Ve*_e+rn*At+wn*ae+on*Ge,M}function et(M,Q,te){var Ut=te[0],we=te[1],Ce=te[2],_e,mt,X,Pt,At,Rt,_t,Vt,ae,fe,me,Ze;return Q===M?(M[12]=Q[0]*Ut+Q[4]*we+Q[8]*Ce+Q[12],M[13]=Q[1]*Ut+Q[5]*we+Q[9]*Ce+Q[13],M[14]=Q[2]*Ut+Q[6]*we+Q[10]*Ce+Q[14],M[15]=Q[3]*Ut+Q[7]*we+Q[11]*Ce+Q[15]):(_e=Q[0],mt=Q[1],X=Q[2],Pt=Q[3],At=Q[4],Rt=Q[5],_t=Q[6],Vt=Q[7],ae=Q[8],fe=Q[9],me=Q[10],Ze=Q[11],M[0]=_e,M[1]=mt,M[2]=X,M[3]=Pt,M[4]=At,M[5]=Rt,M[6]=_t,M[7]=Vt,M[8]=ae,M[9]=fe,M[10]=me,M[11]=Ze,M[12]=_e*Ut+At*we+ae*Ce+Q[12],M[13]=mt*Ut+Rt*we+fe*Ce+Q[13],M[14]=X*Ut+_t*we+me*Ce+Q[14],M[15]=Pt*Ut+Vt*we+Ze*Ce+Q[15]),M}function tt(M,Q,te){var Ut=te[0],we=te[1],Ce=te[2];return M[0]=Q[0]*Ut,M[1]=Q[1]*Ut,M[2]=Q[2]*Ut,M[3]=Q[3]*Ut,M[4]=Q[4]*we,M[5]=Q[5]*we,M[6]=Q[6]*we,M[7]=Q[7]*we,M[8]=Q[8]*Ce,M[9]=Q[9]*Ce,M[10]=Q[10]*Ce,M[11]=Q[11]*Ce,M[12]=Q[12],M[13]=Q[13],M[14]=Q[14],M[15]=Q[15],M}function Ct(M,Q,te,Ut){var we=Ut[0],Ce=Ut[1],_e=Ut[2],mt=Math.sqrt(we*we+Ce*Ce+_e*_e),X,Pt,At,Rt,_t,Vt,ae,fe,me,Ze,Ge,Ve,rn,wn,on,_n,Cn,Ln,En,cr,Bn,br,fr,Zr;return mt<l.Ib?null:(mt=1/mt,we*=mt,Ce*=mt,_e*=mt,X=Math.sin(te),Pt=Math.cos(te),At=1-Pt,Rt=Q[0],_t=Q[1],Vt=Q[2],ae=Q[3],fe=Q[4],me=Q[5],Ze=Q[6],Ge=Q[7],Ve=Q[8],rn=Q[9],wn=Q[10],on=Q[11],_n=we*we*At+Pt,Cn=Ce*we*At+_e*X,Ln=_e*we*At-Ce*X,En=we*Ce*At-_e*X,cr=Ce*Ce*At+Pt,Bn=_e*Ce*At+we*X,br=we*_e*At+Ce*X,fr=Ce*_e*At-we*X,Zr=_e*_e*At+Pt,M[0]=Rt*_n+fe*Cn+Ve*Ln,M[1]=_t*_n+me*Cn+rn*Ln,M[2]=Vt*_n+Ze*Cn+wn*Ln,M[3]=ae*_n+Ge*Cn+on*Ln,M[4]=Rt*En+fe*cr+Ve*Bn,M[5]=_t*En+me*cr+rn*Bn,M[6]=Vt*En+Ze*cr+wn*Bn,M[7]=ae*En+Ge*cr+on*Bn,M[8]=Rt*br+fe*fr+Ve*Zr,M[9]=_t*br+me*fr+rn*Zr,M[10]=Vt*br+Ze*fr+wn*Zr,M[11]=ae*br+Ge*fr+on*Zr,Q!==M&&(M[12]=Q[12],M[13]=Q[13],M[14]=Q[14],M[15]=Q[15]),M)}function ut(M,Q,te){var Ut=Math.sin(te),we=Math.cos(te),Ce=Q[4],_e=Q[5],mt=Q[6],X=Q[7],Pt=Q[8],At=Q[9],Rt=Q[10],_t=Q[11];return Q!==M&&(M[0]=Q[0],M[1]=Q[1],M[2]=Q[2],M[3]=Q[3],M[12]=Q[12],M[13]=Q[13],M[14]=Q[14],M[15]=Q[15]),M[4]=Ce*we+Pt*Ut,M[5]=_e*we+At*Ut,M[6]=mt*we+Rt*Ut,M[7]=X*we+_t*Ut,M[8]=Pt*we-Ce*Ut,M[9]=At*we-_e*Ut,M[10]=Rt*we-mt*Ut,M[11]=_t*we-X*Ut,M}function nt(M,Q,te){var Ut=Math.sin(te),we=Math.cos(te),Ce=Q[0],_e=Q[1],mt=Q[2],X=Q[3],Pt=Q[8],At=Q[9],Rt=Q[10],_t=Q[11];return Q!==M&&(M[4]=Q[4],M[5]=Q[5],M[6]=Q[6],M[7]=Q[7],M[12]=Q[12],M[13]=Q[13],M[14]=Q[14],M[15]=Q[15]),M[0]=Ce*we-Pt*Ut,M[1]=_e*we-At*Ut,M[2]=mt*we-Rt*Ut,M[3]=X*we-_t*Ut,M[8]=Ce*Ut+Pt*we,M[9]=_e*Ut+At*we,M[10]=mt*Ut+Rt*we,M[11]=X*Ut+_t*we,M}function kt(M,Q,te){var Ut=Math.sin(te),we=Math.cos(te),Ce=Q[0],_e=Q[1],mt=Q[2],X=Q[3],Pt=Q[4],At=Q[5],Rt=Q[6],_t=Q[7];return Q!==M&&(M[8]=Q[8],M[9]=Q[9],M[10]=Q[10],M[11]=Q[11],M[12]=Q[12],M[13]=Q[13],M[14]=Q[14],M[15]=Q[15]),M[0]=Ce*we+Pt*Ut,M[1]=_e*we+At*Ut,M[2]=mt*we+Rt*Ut,M[3]=X*we+_t*Ut,M[4]=Pt*we-Ce*Ut,M[5]=At*we-_e*Ut,M[6]=Rt*we-mt*Ut,M[7]=_t*we-X*Ut,M}function Nt(M,Q){return M[0]=1,M[1]=0,M[2]=0,M[3]=0,M[4]=0,M[5]=1,M[6]=0,M[7]=0,M[8]=0,M[9]=0,M[10]=1,M[11]=0,M[12]=Q[0],M[13]=Q[1],M[14]=Q[2],M[15]=1,M}function Bt(M,Q){return M[0]=Q[0],M[1]=0,M[2]=0,M[3]=0,M[4]=0,M[5]=Q[1],M[6]=0,M[7]=0,M[8]=0,M[9]=0,M[10]=Q[2],M[11]=0,M[12]=0,M[13]=0,M[14]=0,M[15]=1,M}function Xt(M,Q,te){var Ut=te[0],we=te[1],Ce=te[2],_e=Math.sqrt(Ut*Ut+we*we+Ce*Ce),mt,X,Pt;return _e<l.Ib?null:(_e=1/_e,Ut*=_e,we*=_e,Ce*=_e,mt=Math.sin(Q),X=Math.cos(Q),Pt=1-X,M[0]=Ut*Ut*Pt+X,M[1]=we*Ut*Pt+Ce*mt,M[2]=Ce*Ut*Pt-we*mt,M[3]=0,M[4]=Ut*we*Pt-Ce*mt,M[5]=we*we*Pt+X,M[6]=Ce*we*Pt+Ut*mt,M[7]=0,M[8]=Ut*Ce*Pt+we*mt,M[9]=we*Ce*Pt-Ut*mt,M[10]=Ce*Ce*Pt+X,M[11]=0,M[12]=0,M[13]=0,M[14]=0,M[15]=1,M)}function wt(M,Q){var te=Math.sin(Q),Ut=Math.cos(Q);return M[0]=1,M[1]=0,M[2]=0,M[3]=0,M[4]=0,M[5]=Ut,M[6]=te,M[7]=0,M[8]=0,M[9]=-te,M[10]=Ut,M[11]=0,M[12]=0,M[13]=0,M[14]=0,M[15]=1,M}function ot(M,Q){var te=Math.sin(Q),Ut=Math.cos(Q);return M[0]=Ut,M[1]=0,M[2]=-te,M[3]=0,M[4]=0,M[5]=1,M[6]=0,M[7]=0,M[8]=te,M[9]=0,M[10]=Ut,M[11]=0,M[12]=0,M[13]=0,M[14]=0,M[15]=1,M}function It(M,Q){var te=Math.sin(Q),Ut=Math.cos(Q);return M[0]=Ut,M[1]=te,M[2]=0,M[3]=0,M[4]=-te,M[5]=Ut,M[6]=0,M[7]=0,M[8]=0,M[9]=0,M[10]=1,M[11]=0,M[12]=0,M[13]=0,M[14]=0,M[15]=1,M}function zt(M,Q,te){var Ut=Q[0],we=Q[1],Ce=Q[2],_e=Q[3],mt=Ut+Ut,X=we+we,Pt=Ce+Ce,At=Ut*mt,Rt=Ut*X,_t=Ut*Pt,Vt=we*X,ae=we*Pt,fe=Ce*Pt,me=_e*mt,Ze=_e*X,Ge=_e*Pt;return M[0]=1-(Vt+fe),M[1]=Rt+Ge,M[2]=_t-Ze,M[3]=0,M[4]=Rt-Ge,M[5]=1-(At+fe),M[6]=ae+me,M[7]=0,M[8]=_t+Ze,M[9]=ae-me,M[10]=1-(At+Vt),M[11]=0,M[12]=te[0],M[13]=te[1],M[14]=te[2],M[15]=1,M}function Ot(M,Q){var te=new l.WT(3),Ut=-Q[0],we=-Q[1],Ce=-Q[2],_e=Q[3],mt=Q[4],X=Q[5],Pt=Q[6],At=Q[7],Rt=Ut*Ut+we*we+Ce*Ce+_e*_e;return Rt>0?(te[0]=(mt*_e+At*Ut+X*Ce-Pt*we)*2/Rt,te[1]=(X*_e+At*we+Pt*Ut-mt*Ce)*2/Rt,te[2]=(Pt*_e+At*Ce+mt*we-X*Ut)*2/Rt):(te[0]=(mt*_e+At*Ut+X*Ce-Pt*we)*2,te[1]=(X*_e+At*we+Pt*Ut-mt*Ce)*2,te[2]=(Pt*_e+At*Ce+mt*we-X*Ut)*2),zt(M,Q,te),M}function pe(M,Q){return M[0]=Q[12],M[1]=Q[13],M[2]=Q[14],M}function xe(M,Q){var te=Q[0],Ut=Q[1],we=Q[2],Ce=Q[4],_e=Q[5],mt=Q[6],X=Q[8],Pt=Q[9],At=Q[10];return M[0]=Math.sqrt(te*te+Ut*Ut+we*we),M[1]=Math.sqrt(Ce*Ce+_e*_e+mt*mt),M[2]=Math.sqrt(X*X+Pt*Pt+At*At),M}function qt(M,Q){var te=new l.WT(3);xe(te,Q);var Ut=1/te[0],we=1/te[1],Ce=1/te[2],_e=Q[0]*Ut,mt=Q[1]*we,X=Q[2]*Ce,Pt=Q[4]*Ut,At=Q[5]*we,Rt=Q[6]*Ce,_t=Q[8]*Ut,Vt=Q[9]*we,ae=Q[10]*Ce,fe=_e+At+ae,me=0;return fe>0?(me=Math.sqrt(fe+1)*2,M[3]=.25*me,M[0]=(Rt-Vt)/me,M[1]=(_t-X)/me,M[2]=(mt-Pt)/me):_e>At&&_e>ae?(me=Math.sqrt(1+_e-At-ae)*2,M[3]=(Rt-Vt)/me,M[0]=.25*me,M[1]=(mt+Pt)/me,M[2]=(_t+X)/me):At>ae?(me=Math.sqrt(1+At-_e-ae)*2,M[3]=(_t-X)/me,M[0]=(mt+Pt)/me,M[1]=.25*me,M[2]=(Rt+Vt)/me):(me=Math.sqrt(1+ae-_e-At)*2,M[3]=(mt-Pt)/me,M[0]=(_t+X)/me,M[1]=(Rt+Vt)/me,M[2]=.25*me),M}function Ye(M,Q,te,Ut){Q[0]=Ut[12],Q[1]=Ut[13],Q[2]=Ut[14];var we=Ut[0],Ce=Ut[1],_e=Ut[2],mt=Ut[4],X=Ut[5],Pt=Ut[6],At=Ut[8],Rt=Ut[9],_t=Ut[10];te[0]=Math.sqrt(we*we+Ce*Ce+_e*_e),te[1]=Math.sqrt(mt*mt+X*X+Pt*Pt),te[2]=Math.sqrt(At*At+Rt*Rt+_t*_t);var Vt=1/te[0],ae=1/te[1],fe=1/te[2],me=we*Vt,Ze=Ce*ae,Ge=_e*fe,Ve=mt*Vt,rn=X*ae,wn=Pt*fe,on=At*Vt,_n=Rt*ae,Cn=_t*fe,Ln=me+rn+Cn,En=0;return Ln>0?(En=Math.sqrt(Ln+1)*2,M[3]=.25*En,M[0]=(wn-_n)/En,M[1]=(on-Ge)/En,M[2]=(Ze-Ve)/En):me>rn&&me>Cn?(En=Math.sqrt(1+me-rn-Cn)*2,M[3]=(wn-_n)/En,M[0]=.25*En,M[1]=(Ze+Ve)/En,M[2]=(on+Ge)/En):rn>Cn?(En=Math.sqrt(1+rn-me-Cn)*2,M[3]=(on-Ge)/En,M[0]=(Ze+Ve)/En,M[1]=.25*En,M[2]=(wn+_n)/En):(En=Math.sqrt(1+Cn-me-rn)*2,M[3]=(Ze-Ve)/En,M[0]=(on+Ge)/En,M[1]=(wn+_n)/En,M[2]=.25*En),M}function We(M,Q,te,Ut){var we=Q[0],Ce=Q[1],_e=Q[2],mt=Q[3],X=we+we,Pt=Ce+Ce,At=_e+_e,Rt=we*X,_t=we*Pt,Vt=we*At,ae=Ce*Pt,fe=Ce*At,me=_e*At,Ze=mt*X,Ge=mt*Pt,Ve=mt*At,rn=Ut[0],wn=Ut[1],on=Ut[2];return M[0]=(1-(ae+me))*rn,M[1]=(_t+Ve)*rn,M[2]=(Vt-Ge)*rn,M[3]=0,M[4]=(_t-Ve)*wn,M[5]=(1-(Rt+me))*wn,M[6]=(fe+Ze)*wn,M[7]=0,M[8]=(Vt+Ge)*on,M[9]=(fe-Ze)*on,M[10]=(1-(Rt+ae))*on,M[11]=0,M[12]=te[0],M[13]=te[1],M[14]=te[2],M[15]=1,M}function Oe(M,Q,te,Ut,we){var Ce=Q[0],_e=Q[1],mt=Q[2],X=Q[3],Pt=Ce+Ce,At=_e+_e,Rt=mt+mt,_t=Ce*Pt,Vt=Ce*At,ae=Ce*Rt,fe=_e*At,me=_e*Rt,Ze=mt*Rt,Ge=X*Pt,Ve=X*At,rn=X*Rt,wn=Ut[0],on=Ut[1],_n=Ut[2],Cn=we[0],Ln=we[1],En=we[2],cr=(1-(fe+Ze))*wn,Bn=(Vt+rn)*wn,br=(ae-Ve)*wn,fr=(Vt-rn)*on,Zr=(1-(_t+Ze))*on,di=(me+Ge)*on,Xr=(ae+Ve)*_n,Mr=(me-Ge)*_n,gi=(1-(_t+fe))*_n;return M[0]=cr,M[1]=Bn,M[2]=br,M[3]=0,M[4]=fr,M[5]=Zr,M[6]=di,M[7]=0,M[8]=Xr,M[9]=Mr,M[10]=gi,M[11]=0,M[12]=te[0]+Cn-(cr*Cn+fr*Ln+Xr*En),M[13]=te[1]+Ln-(Bn*Cn+Zr*Ln+Mr*En),M[14]=te[2]+En-(br*Cn+di*Ln+gi*En),M[15]=1,M}function Qe(M,Q){var te=Q[0],Ut=Q[1],we=Q[2],Ce=Q[3],_e=te+te,mt=Ut+Ut,X=we+we,Pt=te*_e,At=Ut*_e,Rt=Ut*mt,_t=we*_e,Vt=we*mt,ae=we*X,fe=Ce*_e,me=Ce*mt,Ze=Ce*X;return M[0]=1-Rt-ae,M[1]=At+Ze,M[2]=_t-me,M[3]=0,M[4]=At-Ze,M[5]=1-Pt-ae,M[6]=Vt+fe,M[7]=0,M[8]=_t+me,M[9]=Vt-fe,M[10]=1-Pt-Rt,M[11]=0,M[12]=0,M[13]=0,M[14]=0,M[15]=1,M}function Mt(M,Q,te,Ut,we,Ce,_e){var mt=1/(te-Q),X=1/(we-Ut),Pt=1/(Ce-_e);return M[0]=Ce*2*mt,M[1]=0,M[2]=0,M[3]=0,M[4]=0,M[5]=Ce*2*X,M[6]=0,M[7]=0,M[8]=(te+Q)*mt,M[9]=(we+Ut)*X,M[10]=(_e+Ce)*Pt,M[11]=-1,M[12]=0,M[13]=0,M[14]=_e*Ce*2*Pt,M[15]=0,M}function ne(M,Q,te,Ut,we){var Ce=1/Math.tan(Q/2);if(M[0]=Ce/te,M[1]=0,M[2]=0,M[3]=0,M[4]=0,M[5]=Ce,M[6]=0,M[7]=0,M[8]=0,M[9]=0,M[11]=-1,M[12]=0,M[13]=0,M[15]=0,we!=null&&we!==1/0){var _e=1/(Ut-we);M[10]=(we+Ut)*_e,M[14]=2*we*Ut*_e}else M[10]=-1,M[14]=-2*Ut;return M}var Me=ne;function nn(M,Q,te,Ut,we){var Ce=1/Math.tan(Q/2);if(M[0]=Ce/te,M[1]=0,M[2]=0,M[3]=0,M[4]=0,M[5]=Ce,M[6]=0,M[7]=0,M[8]=0,M[9]=0,M[11]=-1,M[12]=0,M[13]=0,M[15]=0,we!=null&&we!==1/0){var _e=1/(Ut-we);M[10]=we*_e,M[14]=we*Ut*_e}else M[10]=-1,M[14]=-Ut;return M}function le(M,Q,te,Ut){var we=Math.tan(Q.upDegrees*Math.PI/180),Ce=Math.tan(Q.downDegrees*Math.PI/180),_e=Math.tan(Q.leftDegrees*Math.PI/180),mt=Math.tan(Q.rightDegrees*Math.PI/180),X=2/(_e+mt),Pt=2/(we+Ce);return M[0]=X,M[1]=0,M[2]=0,M[3]=0,M[4]=0,M[5]=Pt,M[6]=0,M[7]=0,M[8]=-((_e-mt)*X*.5),M[9]=(we-Ce)*Pt*.5,M[10]=Ut/(te-Ut),M[11]=-1,M[12]=0,M[13]=0,M[14]=Ut*te/(te-Ut),M[15]=0,M}function be(M,Q,te,Ut,we,Ce,_e){var mt=1/(Q-te),X=1/(Ut-we),Pt=1/(Ce-_e);return M[0]=-2*mt,M[1]=0,M[2]=0,M[3]=0,M[4]=0,M[5]=-2*X,M[6]=0,M[7]=0,M[8]=0,M[9]=0,M[10]=2*Pt,M[11]=0,M[12]=(Q+te)*mt,M[13]=(we+Ut)*X,M[14]=(_e+Ce)*Pt,M[15]=1,M}var De=be;function Yt(M,Q,te,Ut,we,Ce,_e){var mt=1/(Q-te),X=1/(Ut-we),Pt=1/(Ce-_e);return M[0]=-2*mt,M[1]=0,M[2]=0,M[3]=0,M[4]=0,M[5]=-2*X,M[6]=0,M[7]=0,M[8]=0,M[9]=0,M[10]=Pt,M[11]=0,M[12]=(Q+te)*mt,M[13]=(we+Ut)*X,M[14]=Ce*Pt,M[15]=1,M}function re(M,Q,te,Ut){var we,Ce,_e,mt,X,Pt,At,Rt,_t,Vt,ae=Q[0],fe=Q[1],me=Q[2],Ze=Ut[0],Ge=Ut[1],Ve=Ut[2],rn=te[0],wn=te[1],on=te[2];return Math.abs(ae-rn)<l.Ib&&Math.abs(fe-wn)<l.Ib&&Math.abs(me-on)<l.Ib?b(M):(At=ae-rn,Rt=fe-wn,_t=me-on,Vt=1/Math.sqrt(At*At+Rt*Rt+_t*_t),At*=Vt,Rt*=Vt,_t*=Vt,we=Ge*_t-Ve*Rt,Ce=Ve*At-Ze*_t,_e=Ze*Rt-Ge*At,Vt=Math.sqrt(we*we+Ce*Ce+_e*_e),Vt?(Vt=1/Vt,we*=Vt,Ce*=Vt,_e*=Vt):(we=0,Ce=0,_e=0),mt=Rt*_e-_t*Ce,X=_t*we-At*_e,Pt=At*Ce-Rt*we,Vt=Math.sqrt(mt*mt+X*X+Pt*Pt),Vt?(Vt=1/Vt,mt*=Vt,X*=Vt,Pt*=Vt):(mt=0,X=0,Pt=0),M[0]=we,M[1]=mt,M[2]=At,M[3]=0,M[4]=Ce,M[5]=X,M[6]=Rt,M[7]=0,M[8]=_e,M[9]=Pt,M[10]=_t,M[11]=0,M[12]=-(we*ae+Ce*fe+_e*me),M[13]=-(mt*ae+X*fe+Pt*me),M[14]=-(At*ae+Rt*fe+_t*me),M[15]=1,M)}function xt(M,Q,te,Ut){var we=Q[0],Ce=Q[1],_e=Q[2],mt=Ut[0],X=Ut[1],Pt=Ut[2],At=we-te[0],Rt=Ce-te[1],_t=_e-te[2],Vt=At*At+Rt*Rt+_t*_t;Vt>0&&(Vt=1/Math.sqrt(Vt),At*=Vt,Rt*=Vt,_t*=Vt);var ae=X*_t-Pt*Rt,fe=Pt*At-mt*_t,me=mt*Rt-X*At;return Vt=ae*ae+fe*fe+me*me,Vt>0&&(Vt=1/Math.sqrt(Vt),ae*=Vt,fe*=Vt,me*=Vt),M[0]=ae,M[1]=fe,M[2]=me,M[3]=0,M[4]=Rt*me-_t*fe,M[5]=_t*ae-At*me,M[6]=At*fe-Rt*ae,M[7]=0,M[8]=At,M[9]=Rt,M[10]=_t,M[11]=0,M[12]=we,M[13]=Ce,M[14]=_e,M[15]=1,M}function at(M){return"mat4("+M[0]+", "+M[1]+", "+M[2]+", "+M[3]+", "+M[4]+", "+M[5]+", "+M[6]+", "+M[7]+", "+M[8]+", "+M[9]+", "+M[10]+", "+M[11]+", "+M[12]+", "+M[13]+", "+M[14]+", "+M[15]+")"}function se(M){return Math.sqrt(M[0]*M[0]+M[1]*M[1]+M[2]*M[2]+M[3]*M[3]+M[4]*M[4]+M[5]*M[5]+M[6]*M[6]+M[7]*M[7]+M[8]*M[8]+M[9]*M[9]+M[10]*M[10]+M[11]*M[11]+M[12]*M[12]+M[13]*M[13]+M[14]*M[14]+M[15]*M[15])}function Fe(M,Q,te){return M[0]=Q[0]+te[0],M[1]=Q[1]+te[1],M[2]=Q[2]+te[2],M[3]=Q[3]+te[3],M[4]=Q[4]+te[4],M[5]=Q[5]+te[5],M[6]=Q[6]+te[6],M[7]=Q[7]+te[7],M[8]=Q[8]+te[8],M[9]=Q[9]+te[9],M[10]=Q[10]+te[10],M[11]=Q[11]+te[11],M[12]=Q[12]+te[12],M[13]=Q[13]+te[13],M[14]=Q[14]+te[14],M[15]=Q[15]+te[15],M}function Re(M,Q,te){return M[0]=Q[0]-te[0],M[1]=Q[1]-te[1],M[2]=Q[2]-te[2],M[3]=Q[3]-te[3],M[4]=Q[4]-te[4],M[5]=Q[5]-te[5],M[6]=Q[6]-te[6],M[7]=Q[7]-te[7],M[8]=Q[8]-te[8],M[9]=Q[9]-te[9],M[10]=Q[10]-te[10],M[11]=Q[11]-te[11],M[12]=Q[12]-te[12],M[13]=Q[13]-te[13],M[14]=Q[14]-te[14],M[15]=Q[15]-te[15],M}function ge(M,Q,te){return M[0]=Q[0]*te,M[1]=Q[1]*te,M[2]=Q[2]*te,M[3]=Q[3]*te,M[4]=Q[4]*te,M[5]=Q[5]*te,M[6]=Q[6]*te,M[7]=Q[7]*te,M[8]=Q[8]*te,M[9]=Q[9]*te,M[10]=Q[10]*te,M[11]=Q[11]*te,M[12]=Q[12]*te,M[13]=Q[13]*te,M[14]=Q[14]*te,M[15]=Q[15]*te,M}function Ie(M,Q,te,Ut){return M[0]=Q[0]+te[0]*Ut,M[1]=Q[1]+te[1]*Ut,M[2]=Q[2]+te[2]*Ut,M[3]=Q[3]+te[3]*Ut,M[4]=Q[4]+te[4]*Ut,M[5]=Q[5]+te[5]*Ut,M[6]=Q[6]+te[6]*Ut,M[7]=Q[7]+te[7]*Ut,M[8]=Q[8]+te[8]*Ut,M[9]=Q[9]+te[9]*Ut,M[10]=Q[10]+te[10]*Ut,M[11]=Q[11]+te[11]*Ut,M[12]=Q[12]+te[12]*Ut,M[13]=Q[13]+te[13]*Ut,M[14]=Q[14]+te[14]*Ut,M[15]=Q[15]+te[15]*Ut,M}function Ne(M,Q){return M[0]===Q[0]&&M[1]===Q[1]&&M[2]===Q[2]&&M[3]===Q[3]&&M[4]===Q[4]&&M[5]===Q[5]&&M[6]===Q[6]&&M[7]===Q[7]&&M[8]===Q[8]&&M[9]===Q[9]&&M[10]===Q[10]&&M[11]===Q[11]&&M[12]===Q[12]&&M[13]===Q[13]&&M[14]===Q[14]&&M[15]===Q[15]}function bt(M,Q){var te=M[0],Ut=M[1],we=M[2],Ce=M[3],_e=M[4],mt=M[5],X=M[6],Pt=M[7],At=M[8],Rt=M[9],_t=M[10],Vt=M[11],ae=M[12],fe=M[13],me=M[14],Ze=M[15],Ge=Q[0],Ve=Q[1],rn=Q[2],wn=Q[3],on=Q[4],_n=Q[5],Cn=Q[6],Ln=Q[7],En=Q[8],cr=Q[9],Bn=Q[10],br=Q[11],fr=Q[12],Zr=Q[13],di=Q[14],Xr=Q[15];return Math.abs(te-Ge)<=l.Ib*Math.max(1,Math.abs(te),Math.abs(Ge))&&Math.abs(Ut-Ve)<=l.Ib*Math.max(1,Math.abs(Ut),Math.abs(Ve))&&Math.abs(we-rn)<=l.Ib*Math.max(1,Math.abs(we),Math.abs(rn))&&Math.abs(Ce-wn)<=l.Ib*Math.max(1,Math.abs(Ce),Math.abs(wn))&&Math.abs(_e-on)<=l.Ib*Math.max(1,Math.abs(_e),Math.abs(on))&&Math.abs(mt-_n)<=l.Ib*Math.max(1,Math.abs(mt),Math.abs(_n))&&Math.abs(X-Cn)<=l.Ib*Math.max(1,Math.abs(X),Math.abs(Cn))&&Math.abs(Pt-Ln)<=l.Ib*Math.max(1,Math.abs(Pt),Math.abs(Ln))&&Math.abs(At-En)<=l.Ib*Math.max(1,Math.abs(At),Math.abs(En))&&Math.abs(Rt-cr)<=l.Ib*Math.max(1,Math.abs(Rt),Math.abs(cr))&&Math.abs(_t-Bn)<=l.Ib*Math.max(1,Math.abs(_t),Math.abs(Bn))&&Math.abs(Vt-br)<=l.Ib*Math.max(1,Math.abs(Vt),Math.abs(br))&&Math.abs(ae-fr)<=l.Ib*Math.max(1,Math.abs(ae),Math.abs(fr))&&Math.abs(fe-Zr)<=l.Ib*Math.max(1,Math.abs(fe),Math.abs(Zr))&&Math.abs(me-di)<=l.Ib*Math.max(1,Math.abs(me),Math.abs(di))&&Math.abs(Ze-Xr)<=l.Ib*Math.max(1,Math.abs(Ze),Math.abs(Xr))}var Jt=N,oe=Re},94569:function(Tt,vt,d){"use strict";d.d(vt,{Fv:function(){return le},JG:function(){return pe},Jp:function(){return x},Su:function(){return ot},U_:function(){return Bt},Ue:function(){return g},al:function(){return Ot},dC:function(){return Ye},t8:function(){return xe},yY:function(){return b}});var l=d(85551),R=d(79111),O=d(92421),_=d(97082);function g(){var at=new l.WT(4);return l.WT!=Float32Array&&(at[0]=0,at[1]=0,at[2]=0),at[3]=1,at}function P(at){return at[0]=0,at[1]=0,at[2]=0,at[3]=1,at}function b(at,se,Fe){Fe=Fe*.5;var Re=Math.sin(Fe);return at[0]=Re*se[0],at[1]=Re*se[1],at[2]=Re*se[2],at[3]=Math.cos(Fe),at}function A(at,se){var Fe=Math.acos(se[3])*2,Re=Math.sin(Fe/2);return Re>glMatrix.EPSILON?(at[0]=se[0]/Re,at[1]=se[1]/Re,at[2]=se[2]/Re):(at[0]=1,at[1]=0,at[2]=0),Fe}function I(at,se){var Fe=Oe(at,se);return Math.acos(2*Fe*Fe-1)}function x(at,se,Fe){var Re=se[0],ge=se[1],Ie=se[2],Ne=se[3],bt=Fe[0],Jt=Fe[1],oe=Fe[2],M=Fe[3];return at[0]=Re*M+Ne*bt+ge*oe-Ie*Jt,at[1]=ge*M+Ne*Jt+Ie*bt-Re*oe,at[2]=Ie*M+Ne*oe+Re*Jt-ge*bt,at[3]=Ne*M-Re*bt-ge*Jt-Ie*oe,at}function k(at,se,Fe){Fe*=.5;var Re=se[0],ge=se[1],Ie=se[2],Ne=se[3],bt=Math.sin(Fe),Jt=Math.cos(Fe);return at[0]=Re*Jt+Ne*bt,at[1]=ge*Jt+Ie*bt,at[2]=Ie*Jt-ge*bt,at[3]=Ne*Jt-Re*bt,at}function N(at,se,Fe){Fe*=.5;var Re=se[0],ge=se[1],Ie=se[2],Ne=se[3],bt=Math.sin(Fe),Jt=Math.cos(Fe);return at[0]=Re*Jt-Ie*bt,at[1]=ge*Jt+Ne*bt,at[2]=Ie*Jt+Re*bt,at[3]=Ne*Jt-ge*bt,at}function et(at,se,Fe){Fe*=.5;var Re=se[0],ge=se[1],Ie=se[2],Ne=se[3],bt=Math.sin(Fe),Jt=Math.cos(Fe);return at[0]=Re*Jt+ge*bt,at[1]=ge*Jt-Re*bt,at[2]=Ie*Jt+Ne*bt,at[3]=Ne*Jt-Ie*bt,at}function tt(at,se){var Fe=se[0],Re=se[1],ge=se[2];return at[0]=Fe,at[1]=Re,at[2]=ge,at[3]=Math.sqrt(Math.abs(1-Fe*Fe-Re*Re-ge*ge)),at}function Ct(at,se){var Fe=se[0],Re=se[1],ge=se[2],Ie=se[3],Ne=Math.sqrt(Fe*Fe+Re*Re+ge*ge),bt=Math.exp(Ie),Jt=Ne>0?bt*Math.sin(Ne)/Ne:0;return at[0]=Fe*Jt,at[1]=Re*Jt,at[2]=ge*Jt,at[3]=bt*Math.cos(Ne),at}function ut(at,se){var Fe=se[0],Re=se[1],ge=se[2],Ie=se[3],Ne=Math.sqrt(Fe*Fe+Re*Re+ge*ge),bt=Ne>0?Math.atan2(Ne,Ie)/Ne:0;return at[0]=Fe*bt,at[1]=Re*bt,at[2]=ge*bt,at[3]=.5*Math.log(Fe*Fe+Re*Re+ge*ge+Ie*Ie),at}function nt(at,se,Fe){return ut(at,se),We(at,at,Fe),Ct(at,at),at}function kt(at,se,Fe,Re){var ge=se[0],Ie=se[1],Ne=se[2],bt=se[3],Jt=Fe[0],oe=Fe[1],M=Fe[2],Q=Fe[3],te,Ut,we,Ce,_e;return Ut=ge*Jt+Ie*oe+Ne*M+bt*Q,Ut<0&&(Ut=-Ut,Jt=-Jt,oe=-oe,M=-M,Q=-Q),1-Ut>l.Ib?(te=Math.acos(Ut),we=Math.sin(te),Ce=Math.sin((1-Re)*te)/we,_e=Math.sin(Re*te)/we):(Ce=1-Re,_e=Re),at[0]=Ce*ge+_e*Jt,at[1]=Ce*Ie+_e*oe,at[2]=Ce*Ne+_e*M,at[3]=Ce*bt+_e*Q,at}function Nt(at){var se=glMatrix.RANDOM(),Fe=glMatrix.RANDOM(),Re=glMatrix.RANDOM(),ge=Math.sqrt(1-se),Ie=Math.sqrt(se);return at[0]=ge*Math.sin(2*Math.PI*Fe),at[1]=ge*Math.cos(2*Math.PI*Fe),at[2]=Ie*Math.sin(2*Math.PI*Re),at[3]=Ie*Math.cos(2*Math.PI*Re),at}function Bt(at,se){var Fe=se[0],Re=se[1],ge=se[2],Ie=se[3],Ne=Fe*Fe+Re*Re+ge*ge+Ie*Ie,bt=Ne?1/Ne:0;return at[0]=-Fe*bt,at[1]=-Re*bt,at[2]=-ge*bt,at[3]=Ie*bt,at}function Xt(at,se){return at[0]=-se[0],at[1]=-se[1],at[2]=-se[2],at[3]=se[3],at}function wt(at,se){var Fe=se[0]+se[4]+se[8],Re;if(Fe>0)Re=Math.sqrt(Fe+1),at[3]=.5*Re,Re=.5/Re,at[0]=(se[5]-se[7])*Re,at[1]=(se[6]-se[2])*Re,at[2]=(se[1]-se[3])*Re;else{var ge=0;se[4]>se[0]&&(ge=1),se[8]>se[ge*3+ge]&&(ge=2);var Ie=(ge+1)%3,Ne=(ge+2)%3;Re=Math.sqrt(se[ge*3+ge]-se[Ie*3+Ie]-se[Ne*3+Ne]+1),at[ge]=.5*Re,Re=.5/Re,at[3]=(se[Ie*3+Ne]-se[Ne*3+Ie])*Re,at[Ie]=(se[Ie*3+ge]+se[ge*3+Ie])*Re,at[Ne]=(se[Ne*3+ge]+se[ge*3+Ne])*Re}return at}function ot(at,se,Fe,Re){var ge=arguments.length>4&&arguments[4]!==void 0?arguments[4]:l.yy,Ie=Math.PI/360;se*=Ie,Re*=Ie,Fe*=Ie;var Ne=Math.sin(se),bt=Math.cos(se),Jt=Math.sin(Fe),oe=Math.cos(Fe),M=Math.sin(Re),Q=Math.cos(Re);switch(ge){case"xyz":at[0]=Ne*oe*Q+bt*Jt*M,at[1]=bt*Jt*Q-Ne*oe*M,at[2]=bt*oe*M+Ne*Jt*Q,at[3]=bt*oe*Q-Ne*Jt*M;break;case"xzy":at[0]=Ne*oe*Q-bt*Jt*M,at[1]=bt*Jt*Q-Ne*oe*M,at[2]=bt*oe*M+Ne*Jt*Q,at[3]=bt*oe*Q+Ne*Jt*M;break;case"yxz":at[0]=Ne*oe*Q+bt*Jt*M,at[1]=bt*Jt*Q-Ne*oe*M,at[2]=bt*oe*M-Ne*Jt*Q,at[3]=bt*oe*Q+Ne*Jt*M;break;case"yzx":at[0]=Ne*oe*Q+bt*Jt*M,at[1]=bt*Jt*Q+Ne*oe*M,at[2]=bt*oe*M-Ne*Jt*Q,at[3]=bt*oe*Q-Ne*Jt*M;break;case"zxy":at[0]=Ne*oe*Q-bt*Jt*M,at[1]=bt*Jt*Q+Ne*oe*M,at[2]=bt*oe*M+Ne*Jt*Q,at[3]=bt*oe*Q-Ne*Jt*M;break;case"zyx":at[0]=Ne*oe*Q-bt*Jt*M,at[1]=bt*Jt*Q+Ne*oe*M,at[2]=bt*oe*M-Ne*Jt*Q,at[3]=bt*oe*Q+Ne*Jt*M;break;default:throw new Error("Unknown angle order "+ge)}return at}function It(at){return"quat("+at[0]+", "+at[1]+", "+at[2]+", "+at[3]+")"}var zt=_.d9,Ot=_.al,pe=_.JG,xe=_.t8,qt=_.IH,Ye=x,We=_.bA,Oe=_.AK,Qe=_.t7,Mt=_.kE,ne=null,Me=_.we,nn=null,le=_.Fv,be=_.I6;function De(at,se){return Math.abs(vec4.dot(at,se))>=1-glMatrix.EPSILON}var Yt=function(){var at=O.Ue(),se=O.al(1,0,0),Fe=O.al(0,1,0);return function(Re,ge,Ie){var Ne=O.AK(ge,Ie);return Ne<-.999999?(O.kC(at,se,ge),O.Zh(at)<1e-6&&O.kC(at,Fe,ge),O.Fv(at,at),b(Re,at,Math.PI),Re):Ne>.999999?(Re[0]=0,Re[1]=0,Re[2]=0,Re[3]=1,Re):(O.kC(at,ge,Ie),Re[0]=at[0],Re[1]=at[1],Re[2]=at[2],Re[3]=1+Ne,le(Re,Re))}}(),re=function(){var at=g(),se=g();return function(Fe,Re,ge,Ie,Ne,bt){return kt(at,Re,Ne,bt),kt(se,ge,Ie,bt),kt(Fe,at,se,2*bt*(1-bt)),Fe}}(),xt=function(){var at=R.Ue();return function(se,Fe,Re,ge){return at[0]=Re[0],at[3]=Re[1],at[6]=Re[2],at[1]=ge[0],at[4]=ge[1],at[7]=ge[2],at[2]=-Fe[0],at[5]=-Fe[1],at[8]=-Fe[2],le(se,wt(se,at))}}()},45545:function(Tt,vt,d){"use strict";d.d(vt,{AK:function(){return zt},Fv:function(){return It},I6:function(){return le},JG:function(){return g},Ue:function(){return R},t8:function(){return P}});var l=d(85551);function R(){var ge=new l.WT(2);return l.WT!=Float32Array&&(ge[0]=0,ge[1]=0),ge}function O(ge){var Ie=new glMatrix.ARRAY_TYPE(2);return Ie[0]=ge[0],Ie[1]=ge[1],Ie}function _(ge,Ie){var Ne=new glMatrix.ARRAY_TYPE(2);return Ne[0]=ge,Ne[1]=Ie,Ne}function g(ge,Ie){return ge[0]=Ie[0],ge[1]=Ie[1],ge}function P(ge,Ie,Ne){return ge[0]=Ie,ge[1]=Ne,ge}function b(ge,Ie,Ne){return ge[0]=Ie[0]+Ne[0],ge[1]=Ie[1]+Ne[1],ge}function A(ge,Ie,Ne){return ge[0]=Ie[0]-Ne[0],ge[1]=Ie[1]-Ne[1],ge}function I(ge,Ie,Ne){return ge[0]=Ie[0]*Ne[0],ge[1]=Ie[1]*Ne[1],ge}function x(ge,Ie,Ne){return ge[0]=Ie[0]/Ne[0],ge[1]=Ie[1]/Ne[1],ge}function k(ge,Ie){return ge[0]=Math.ceil(Ie[0]),ge[1]=Math.ceil(Ie[1]),ge}function N(ge,Ie){return ge[0]=Math.floor(Ie[0]),ge[1]=Math.floor(Ie[1]),ge}function et(ge,Ie,Ne){return ge[0]=Math.min(Ie[0],Ne[0]),ge[1]=Math.min(Ie[1],Ne[1]),ge}function tt(ge,Ie,Ne){return ge[0]=Math.max(Ie[0],Ne[0]),ge[1]=Math.max(Ie[1],Ne[1]),ge}function Ct(ge,Ie){return ge[0]=glMatrix.round(Ie[0]),ge[1]=glMatrix.round(Ie[1]),ge}function ut(ge,Ie,Ne){return ge[0]=Ie[0]*Ne,ge[1]=Ie[1]*Ne,ge}function nt(ge,Ie,Ne,bt){return ge[0]=Ie[0]+Ne[0]*bt,ge[1]=Ie[1]+Ne[1]*bt,ge}function kt(ge,Ie){var Ne=Ie[0]-ge[0],bt=Ie[1]-ge[1];return Math.sqrt(Ne*Ne+bt*bt)}function Nt(ge,Ie){var Ne=Ie[0]-ge[0],bt=Ie[1]-ge[1];return Ne*Ne+bt*bt}function Bt(ge){var Ie=ge[0],Ne=ge[1];return Math.sqrt(Ie*Ie+Ne*Ne)}function Xt(ge){var Ie=ge[0],Ne=ge[1];return Ie*Ie+Ne*Ne}function wt(ge,Ie){return ge[0]=-Ie[0],ge[1]=-Ie[1],ge}function ot(ge,Ie){return ge[0]=1/Ie[0],ge[1]=1/Ie[1],ge}function It(ge,Ie){var Ne=Ie[0],bt=Ie[1],Jt=Ne*Ne+bt*bt;return Jt>0&&(Jt=1/Math.sqrt(Jt)),ge[0]=Ie[0]*Jt,ge[1]=Ie[1]*Jt,ge}function zt(ge,Ie){return ge[0]*Ie[0]+ge[1]*Ie[1]}function Ot(ge,Ie,Ne){var bt=Ie[0]*Ne[1]-Ie[1]*Ne[0];return ge[0]=ge[1]=0,ge[2]=bt,ge}function pe(ge,Ie,Ne,bt){var Jt=Ie[0],oe=Ie[1];return ge[0]=Jt+bt*(Ne[0]-Jt),ge[1]=oe+bt*(Ne[1]-oe),ge}function xe(ge,Ie){Ie=Ie===void 0?1:Ie;var Ne=glMatrix.RANDOM()*2*Math.PI;return ge[0]=Math.cos(Ne)*Ie,ge[1]=Math.sin(Ne)*Ie,ge}function qt(ge,Ie,Ne){var bt=Ie[0],Jt=Ie[1];return ge[0]=Ne[0]*bt+Ne[2]*Jt,ge[1]=Ne[1]*bt+Ne[3]*Jt,ge}function Ye(ge,Ie,Ne){var bt=Ie[0],Jt=Ie[1];return ge[0]=Ne[0]*bt+Ne[2]*Jt+Ne[4],ge[1]=Ne[1]*bt+Ne[3]*Jt+Ne[5],ge}function We(ge,Ie,Ne){var bt=Ie[0],Jt=Ie[1];return ge[0]=Ne[0]*bt+Ne[3]*Jt+Ne[6],ge[1]=Ne[1]*bt+Ne[4]*Jt+Ne[7],ge}function Oe(ge,Ie,Ne){var bt=Ie[0],Jt=Ie[1];return ge[0]=Ne[0]*bt+Ne[4]*Jt+Ne[12],ge[1]=Ne[1]*bt+Ne[5]*Jt+Ne[13],ge}function Qe(ge,Ie,Ne,bt){var Jt=Ie[0]-Ne[0],oe=Ie[1]-Ne[1],M=Math.sin(bt),Q=Math.cos(bt);return ge[0]=Jt*Q-oe*M+Ne[0],ge[1]=Jt*M+oe*Q+Ne[1],ge}function Mt(ge,Ie){var Ne=ge[0],bt=ge[1],Jt=Ie[0],oe=Ie[1];return Math.abs(Math.atan2(bt*Jt-Ne*oe,Ne*Jt+bt*oe))}function ne(ge,Ie){var Ne=ge[0],bt=ge[1],Jt=Ie[0],oe=Ie[1];return Math.atan2(Ne*oe-bt*Jt,Ne*Jt+bt*oe)}function Me(ge){return ge[0]=0,ge[1]=0,ge}function nn(ge){return"vec2("+ge[0]+", "+ge[1]+")"}function le(ge,Ie){return ge[0]===Ie[0]&&ge[1]===Ie[1]}function be(ge,Ie){var Ne=ge[0],bt=ge[1],Jt=Ie[0],oe=Ie[1];return Math.abs(Ne-Jt)<=glMatrix.EPSILON*Math.max(1,Math.abs(Ne),Math.abs(Jt))&&Math.abs(bt-oe)<=glMatrix.EPSILON*Math.max(1,Math.abs(bt),Math.abs(oe))}var De=null,Yt=null,re=null,xt=null,at=null,se=null,Fe=null,Re=function(){var ge=R();return function(Ie,Ne,bt,Jt,oe,M){var Q,te;for(Ne||(Ne=2),bt||(bt=0),Jt?te=Math.min(Jt*Ne+bt,Ie.length):te=Ie.length,Q=bt;Q<te;Q+=Ne)ge[0]=Ie[Q],ge[1]=Ie[Q+1],oe(ge,ge,M),Ie[Q]=ge[0],Ie[Q+1]=ge[1];return Ie}}()},92421:function(Tt,vt,d){"use strict";d.d(vt,{$X:function(){return I},AK:function(){return zt},Fp:function(){return Ct},Fv:function(){return It},IH:function(){return A},JG:function(){return P},Jp:function(){return x},TK:function(){return Fe},Ue:function(){return R},VC:function(){return Mt},VV:function(){return tt},Zh:function(){return ge},al:function(){return g},bA:function(){return nt},d9:function(){return O},fF:function(){return Oe},fS:function(){return re},kC:function(){return Ot},kE:function(){return _},kK:function(){return Qe},lu:function(){return xt},t7:function(){return pe},t8:function(){return b}});var l=d(85551);function R(){var bt=new l.WT(3);return l.WT!=Float32Array&&(bt[0]=0,bt[1]=0,bt[2]=0),bt}function O(bt){var Jt=new l.WT(3);return Jt[0]=bt[0],Jt[1]=bt[1],Jt[2]=bt[2],Jt}function _(bt){var Jt=bt[0],oe=bt[1],M=bt[2];return Math.sqrt(Jt*Jt+oe*oe+M*M)}function g(bt,Jt,oe){var M=new l.WT(3);return M[0]=bt,M[1]=Jt,M[2]=oe,M}function P(bt,Jt){return bt[0]=Jt[0],bt[1]=Jt[1],bt[2]=Jt[2],bt}function b(bt,Jt,oe,M){return bt[0]=Jt,bt[1]=oe,bt[2]=M,bt}function A(bt,Jt,oe){return bt[0]=Jt[0]+oe[0],bt[1]=Jt[1]+oe[1],bt[2]=Jt[2]+oe[2],bt}function I(bt,Jt,oe){return bt[0]=Jt[0]-oe[0],bt[1]=Jt[1]-oe[1],bt[2]=Jt[2]-oe[2],bt}function x(bt,Jt,oe){return bt[0]=Jt[0]*oe[0],bt[1]=Jt[1]*oe[1],bt[2]=Jt[2]*oe[2],bt}function k(bt,Jt,oe){return bt[0]=Jt[0]/oe[0],bt[1]=Jt[1]/oe[1],bt[2]=Jt[2]/oe[2],bt}function N(bt,Jt){return bt[0]=Math.ceil(Jt[0]),bt[1]=Math.ceil(Jt[1]),bt[2]=Math.ceil(Jt[2]),bt}function et(bt,Jt){return bt[0]=Math.floor(Jt[0]),bt[1]=Math.floor(Jt[1]),bt[2]=Math.floor(Jt[2]),bt}function tt(bt,Jt,oe){return bt[0]=Math.min(Jt[0],oe[0]),bt[1]=Math.min(Jt[1],oe[1]),bt[2]=Math.min(Jt[2],oe[2]),bt}function Ct(bt,Jt,oe){return bt[0]=Math.max(Jt[0],oe[0]),bt[1]=Math.max(Jt[1],oe[1]),bt[2]=Math.max(Jt[2],oe[2]),bt}function ut(bt,Jt){return bt[0]=glMatrix.round(Jt[0]),bt[1]=glMatrix.round(Jt[1]),bt[2]=glMatrix.round(Jt[2]),bt}function nt(bt,Jt,oe){return bt[0]=Jt[0]*oe,bt[1]=Jt[1]*oe,bt[2]=Jt[2]*oe,bt}function kt(bt,Jt,oe,M){return bt[0]=Jt[0]+oe[0]*M,bt[1]=Jt[1]+oe[1]*M,bt[2]=Jt[2]+oe[2]*M,bt}function Nt(bt,Jt){var oe=Jt[0]-bt[0],M=Jt[1]-bt[1],Q=Jt[2]-bt[2];return Math.sqrt(oe*oe+M*M+Q*Q)}function Bt(bt,Jt){var oe=Jt[0]-bt[0],M=Jt[1]-bt[1],Q=Jt[2]-bt[2];return oe*oe+M*M+Q*Q}function Xt(bt){var Jt=bt[0],oe=bt[1],M=bt[2];return Jt*Jt+oe*oe+M*M}function wt(bt,Jt){return bt[0]=-Jt[0],bt[1]=-Jt[1],bt[2]=-Jt[2],bt}function ot(bt,Jt){return bt[0]=1/Jt[0],bt[1]=1/Jt[1],bt[2]=1/Jt[2],bt}function It(bt,Jt){var oe=Jt[0],M=Jt[1],Q=Jt[2],te=oe*oe+M*M+Q*Q;return te>0&&(te=1/Math.sqrt(te)),bt[0]=Jt[0]*te,bt[1]=Jt[1]*te,bt[2]=Jt[2]*te,bt}function zt(bt,Jt){return bt[0]*Jt[0]+bt[1]*Jt[1]+bt[2]*Jt[2]}function Ot(bt,Jt,oe){var M=Jt[0],Q=Jt[1],te=Jt[2],Ut=oe[0],we=oe[1],Ce=oe[2];return bt[0]=Q*Ce-te*we,bt[1]=te*Ut-M*Ce,bt[2]=M*we-Q*Ut,bt}function pe(bt,Jt,oe,M){var Q=Jt[0],te=Jt[1],Ut=Jt[2];return bt[0]=Q+M*(oe[0]-Q),bt[1]=te+M*(oe[1]-te),bt[2]=Ut+M*(oe[2]-Ut),bt}function xe(bt,Jt,oe,M){var Q=Math.acos(Math.min(Math.max(zt(Jt,oe),-1),1)),te=Math.sin(Q),Ut=Math.sin((1-M)*Q)/te,we=Math.sin(M*Q)/te;return bt[0]=Ut*Jt[0]+we*oe[0],bt[1]=Ut*Jt[1]+we*oe[1],bt[2]=Ut*Jt[2]+we*oe[2],bt}function qt(bt,Jt,oe,M,Q,te){var Ut=te*te,we=Ut*(2*te-3)+1,Ce=Ut*(te-2)+te,_e=Ut*(te-1),mt=Ut*(3-2*te);return bt[0]=Jt[0]*we+oe[0]*Ce+M[0]*_e+Q[0]*mt,bt[1]=Jt[1]*we+oe[1]*Ce+M[1]*_e+Q[1]*mt,bt[2]=Jt[2]*we+oe[2]*Ce+M[2]*_e+Q[2]*mt,bt}function Ye(bt,Jt,oe,M,Q,te){var Ut=1-te,we=Ut*Ut,Ce=te*te,_e=we*Ut,mt=3*te*we,X=3*Ce*Ut,Pt=Ce*te;return bt[0]=Jt[0]*_e+oe[0]*mt+M[0]*X+Q[0]*Pt,bt[1]=Jt[1]*_e+oe[1]*mt+M[1]*X+Q[1]*Pt,bt[2]=Jt[2]*_e+oe[2]*mt+M[2]*X+Q[2]*Pt,bt}function We(bt,Jt){Jt=Jt===void 0?1:Jt;var oe=glMatrix.RANDOM()*2*Math.PI,M=glMatrix.RANDOM()*2-1,Q=Math.sqrt(1-M*M)*Jt;return bt[0]=Math.cos(oe)*Q,bt[1]=Math.sin(oe)*Q,bt[2]=M*Jt,bt}function Oe(bt,Jt,oe){var M=Jt[0],Q=Jt[1],te=Jt[2],Ut=oe[3]*M+oe[7]*Q+oe[11]*te+oe[15];return Ut=Ut||1,bt[0]=(oe[0]*M+oe[4]*Q+oe[8]*te+oe[12])/Ut,bt[1]=(oe[1]*M+oe[5]*Q+oe[9]*te+oe[13])/Ut,bt[2]=(oe[2]*M+oe[6]*Q+oe[10]*te+oe[14])/Ut,bt}function Qe(bt,Jt,oe){var M=Jt[0],Q=Jt[1],te=Jt[2];return bt[0]=M*oe[0]+Q*oe[3]+te*oe[6],bt[1]=M*oe[1]+Q*oe[4]+te*oe[7],bt[2]=M*oe[2]+Q*oe[5]+te*oe[8],bt}function Mt(bt,Jt,oe){var M=oe[0],Q=oe[1],te=oe[2],Ut=oe[3],we=Jt[0],Ce=Jt[1],_e=Jt[2],mt=Q*_e-te*Ce,X=te*we-M*_e,Pt=M*Ce-Q*we;return mt=mt+mt,X=X+X,Pt=Pt+Pt,bt[0]=we+Ut*mt+Q*Pt-te*X,bt[1]=Ce+Ut*X+te*mt-M*Pt,bt[2]=_e+Ut*Pt+M*X-Q*mt,bt}function ne(bt,Jt,oe,M){var Q=[],te=[];return Q[0]=Jt[0]-oe[0],Q[1]=Jt[1]-oe[1],Q[2]=Jt[2]-oe[2],te[0]=Q[0],te[1]=Q[1]*Math.cos(M)-Q[2]*Math.sin(M),te[2]=Q[1]*Math.sin(M)+Q[2]*Math.cos(M),bt[0]=te[0]+oe[0],bt[1]=te[1]+oe[1],bt[2]=te[2]+oe[2],bt}function Me(bt,Jt,oe,M){var Q=[],te=[];return Q[0]=Jt[0]-oe[0],Q[1]=Jt[1]-oe[1],Q[2]=Jt[2]-oe[2],te[0]=Q[2]*Math.sin(M)+Q[0]*Math.cos(M),te[1]=Q[1],te[2]=Q[2]*Math.cos(M)-Q[0]*Math.sin(M),bt[0]=te[0]+oe[0],bt[1]=te[1]+oe[1],bt[2]=te[2]+oe[2],bt}function nn(bt,Jt,oe,M){var Q=[],te=[];return Q[0]=Jt[0]-oe[0],Q[1]=Jt[1]-oe[1],Q[2]=Jt[2]-oe[2],te[0]=Q[0]*Math.cos(M)-Q[1]*Math.sin(M),te[1]=Q[0]*Math.sin(M)+Q[1]*Math.cos(M),te[2]=Q[2],bt[0]=te[0]+oe[0],bt[1]=te[1]+oe[1],bt[2]=te[2]+oe[2],bt}function le(bt,Jt){var oe=bt[0],M=bt[1],Q=bt[2],te=Jt[0],Ut=Jt[1],we=Jt[2],Ce=Math.sqrt((oe*oe+M*M+Q*Q)*(te*te+Ut*Ut+we*we)),_e=Ce&&zt(bt,Jt)/Ce;return Math.acos(Math.min(Math.max(_e,-1),1))}function be(bt){return bt[0]=0,bt[1]=0,bt[2]=0,bt}function De(bt){return"vec3("+bt[0]+", "+bt[1]+", "+bt[2]+")"}function Yt(bt,Jt){return bt[0]===Jt[0]&&bt[1]===Jt[1]&&bt[2]===Jt[2]}function re(bt,Jt){var oe=bt[0],M=bt[1],Q=bt[2],te=Jt[0],Ut=Jt[1],we=Jt[2];return Math.abs(oe-te)<=l.Ib*Math.max(1,Math.abs(oe),Math.abs(te))&&Math.abs(M-Ut)<=l.Ib*Math.max(1,Math.abs(M),Math.abs(Ut))&&Math.abs(Q-we)<=l.Ib*Math.max(1,Math.abs(Q),Math.abs(we))}var xt=I,at=null,se=null,Fe=Nt,Re=null,ge=_,Ie=null,Ne=function(){var bt=R();return function(Jt,oe,M,Q,te,Ut){var we,Ce;for(oe||(oe=3),M||(M=0),Q?Ce=Math.min(Q*oe+M,Jt.length):Ce=Jt.length,we=M;we<Ce;we+=oe)bt[0]=Jt[we],bt[1]=Jt[we+1],bt[2]=Jt[we+2],te(bt,bt,Ut),Jt[we]=bt[0],Jt[we+1]=bt[1],Jt[we+2]=bt[2];return Jt}}()},97082:function(Tt,vt,d){"use strict";d.d(vt,{AK:function(){return zt},Fv:function(){return It},I6:function(){return Qe},IH:function(){return b},JG:function(){return g},Ue:function(){return R},al:function(){return _},bA:function(){return ut},d9:function(){return O},fF:function(){return qt},kE:function(){return Bt},t7:function(){return pe},t8:function(){return P},we:function(){return Xt}});var l=d(85551);function R(){var xt=new l.WT(4);return l.WT!=Float32Array&&(xt[0]=0,xt[1]=0,xt[2]=0,xt[3]=0),xt}function O(xt){var at=new l.WT(4);return at[0]=xt[0],at[1]=xt[1],at[2]=xt[2],at[3]=xt[3],at}function _(xt,at,se,Fe){var Re=new l.WT(4);return Re[0]=xt,Re[1]=at,Re[2]=se,Re[3]=Fe,Re}function g(xt,at){return xt[0]=at[0],xt[1]=at[1],xt[2]=at[2],xt[3]=at[3],xt}function P(xt,at,se,Fe,Re){return xt[0]=at,xt[1]=se,xt[2]=Fe,xt[3]=Re,xt}function b(xt,at,se){return xt[0]=at[0]+se[0],xt[1]=at[1]+se[1],xt[2]=at[2]+se[2],xt[3]=at[3]+se[3],xt}function A(xt,at,se){return xt[0]=at[0]-se[0],xt[1]=at[1]-se[1],xt[2]=at[2]-se[2],xt[3]=at[3]-se[3],xt}function I(xt,at,se){return xt[0]=at[0]*se[0],xt[1]=at[1]*se[1],xt[2]=at[2]*se[2],xt[3]=at[3]*se[3],xt}function x(xt,at,se){return xt[0]=at[0]/se[0],xt[1]=at[1]/se[1],xt[2]=at[2]/se[2],xt[3]=at[3]/se[3],xt}function k(xt,at){return xt[0]=Math.ceil(at[0]),xt[1]=Math.ceil(at[1]),xt[2]=Math.ceil(at[2]),xt[3]=Math.ceil(at[3]),xt}function N(xt,at){return xt[0]=Math.floor(at[0]),xt[1]=Math.floor(at[1]),xt[2]=Math.floor(at[2]),xt[3]=Math.floor(at[3]),xt}function et(xt,at,se){return xt[0]=Math.min(at[0],se[0]),xt[1]=Math.min(at[1],se[1]),xt[2]=Math.min(at[2],se[2]),xt[3]=Math.min(at[3],se[3]),xt}function tt(xt,at,se){return xt[0]=Math.max(at[0],se[0]),xt[1]=Math.max(at[1],se[1]),xt[2]=Math.max(at[2],se[2]),xt[3]=Math.max(at[3],se[3]),xt}function Ct(xt,at){return xt[0]=glMatrix.round(at[0]),xt[1]=glMatrix.round(at[1]),xt[2]=glMatrix.round(at[2]),xt[3]=glMatrix.round(at[3]),xt}function ut(xt,at,se){return xt[0]=at[0]*se,xt[1]=at[1]*se,xt[2]=at[2]*se,xt[3]=at[3]*se,xt}function nt(xt,at,se,Fe){return xt[0]=at[0]+se[0]*Fe,xt[1]=at[1]+se[1]*Fe,xt[2]=at[2]+se[2]*Fe,xt[3]=at[3]+se[3]*Fe,xt}function kt(xt,at){var se=at[0]-xt[0],Fe=at[1]-xt[1],Re=at[2]-xt[2],ge=at[3]-xt[3];return Math.sqrt(se*se+Fe*Fe+Re*Re+ge*ge)}function Nt(xt,at){var se=at[0]-xt[0],Fe=at[1]-xt[1],Re=at[2]-xt[2],ge=at[3]-xt[3];return se*se+Fe*Fe+Re*Re+ge*ge}function Bt(xt){var at=xt[0],se=xt[1],Fe=xt[2],Re=xt[3];return Math.sqrt(at*at+se*se+Fe*Fe+Re*Re)}function Xt(xt){var at=xt[0],se=xt[1],Fe=xt[2],Re=xt[3];return at*at+se*se+Fe*Fe+Re*Re}function wt(xt,at){return xt[0]=-at[0],xt[1]=-at[1],xt[2]=-at[2],xt[3]=-at[3],xt}function ot(xt,at){return xt[0]=1/at[0],xt[1]=1/at[1],xt[2]=1/at[2],xt[3]=1/at[3],xt}function It(xt,at){var se=at[0],Fe=at[1],Re=at[2],ge=at[3],Ie=se*se+Fe*Fe+Re*Re+ge*ge;return Ie>0&&(Ie=1/Math.sqrt(Ie)),xt[0]=se*Ie,xt[1]=Fe*Ie,xt[2]=Re*Ie,xt[3]=ge*Ie,xt}function zt(xt,at){return xt[0]*at[0]+xt[1]*at[1]+xt[2]*at[2]+xt[3]*at[3]}function Ot(xt,at,se,Fe){var Re=se[0]*Fe[1]-se[1]*Fe[0],ge=se[0]*Fe[2]-se[2]*Fe[0],Ie=se[0]*Fe[3]-se[3]*Fe[0],Ne=se[1]*Fe[2]-se[2]*Fe[1],bt=se[1]*Fe[3]-se[3]*Fe[1],Jt=se[2]*Fe[3]-se[3]*Fe[2],oe=at[0],M=at[1],Q=at[2],te=at[3];return xt[0]=M*Jt-Q*bt+te*Ne,xt[1]=-(oe*Jt)+Q*Ie-te*ge,xt[2]=oe*bt-M*Ie+te*Re,xt[3]=-(oe*Ne)+M*ge-Q*Re,xt}function pe(xt,at,se,Fe){var Re=at[0],ge=at[1],Ie=at[2],Ne=at[3];return xt[0]=Re+Fe*(se[0]-Re),xt[1]=ge+Fe*(se[1]-ge),xt[2]=Ie+Fe*(se[2]-Ie),xt[3]=Ne+Fe*(se[3]-Ne),xt}function xe(xt,at){at=at===void 0?1:at;var se,Fe,Re,ge,Ie,Ne,bt;bt=glMatrix.RANDOM(),se=bt*2-1,Fe=(4*glMatrix.RANDOM()-2)*Math.sqrt(bt*-bt+bt),Ie=se*se+Fe*Fe,bt=glMatrix.RANDOM(),Re=bt*2-1,ge=(4*glMatrix.RANDOM()-2)*Math.sqrt(bt*-bt+bt),Ne=Re*Re+ge*ge;var Jt=Math.sqrt((1-Ie)/Ne);return xt[0]=at*se,xt[1]=at*Fe,xt[2]=at*Re*Jt,xt[3]=at*ge*Jt,xt}function qt(xt,at,se){var Fe=at[0],Re=at[1],ge=at[2],Ie=at[3];return xt[0]=se[0]*Fe+se[4]*Re+se[8]*ge+se[12]*Ie,xt[1]=se[1]*Fe+se[5]*Re+se[9]*ge+se[13]*Ie,xt[2]=se[2]*Fe+se[6]*Re+se[10]*ge+se[14]*Ie,xt[3]=se[3]*Fe+se[7]*Re+se[11]*ge+se[15]*Ie,xt}function Ye(xt,at,se){var Fe=se[0],Re=se[1],ge=se[2],Ie=se[3],Ne=at[0],bt=at[1],Jt=at[2],oe=Re*Jt-ge*bt,M=ge*Ne-Fe*Jt,Q=Fe*bt-Re*Ne;return oe=oe+oe,M=M+M,Q=Q+Q,xt[0]=Ne+Ie*oe+Re*Q-ge*M,xt[1]=bt+Ie*M+ge*oe-Fe*Q,xt[2]=Jt+Ie*Q+Fe*M-Re*oe,xt[3]=at[3],xt}function We(xt){return xt[0]=0,xt[1]=0,xt[2]=0,xt[3]=0,xt}function Oe(xt){return"vec4("+xt[0]+", "+xt[1]+", "+xt[2]+", "+xt[3]+")"}function Qe(xt,at){return xt[0]===at[0]&&xt[1]===at[1]&&xt[2]===at[2]&&xt[3]===at[3]}function Mt(xt,at){var se=xt[0],Fe=xt[1],Re=xt[2],ge=xt[3],Ie=at[0],Ne=at[1],bt=at[2],Jt=at[3];return Math.abs(se-Ie)<=glMatrix.EPSILON*Math.max(1,Math.abs(se),Math.abs(Ie))&&Math.abs(Fe-Ne)<=glMatrix.EPSILON*Math.max(1,Math.abs(Fe),Math.abs(Ne))&&Math.abs(Re-bt)<=glMatrix.EPSILON*Math.max(1,Math.abs(Re),Math.abs(bt))&&Math.abs(ge-Jt)<=glMatrix.EPSILON*Math.max(1,Math.abs(ge),Math.abs(Jt))}var ne=null,Me=null,nn=null,le=null,be=null,De=null,Yt=null,re=function(){var xt=R();return function(at,se,Fe,Re,ge,Ie){var Ne,bt;for(se||(se=4),Fe||(Fe=0),Re?bt=Math.min(Re*se+Fe,at.length):bt=at.length,Ne=Fe;Ne<bt;Ne+=se)xt[0]=at[Ne],xt[1]=at[Ne+1],xt[2]=at[Ne+2],xt[3]=at[Ne+3],ge(xt,xt,Ie),at[Ne]=xt[0],at[Ne+1]=xt[1],at[Ne+2]=xt[2],at[Ne+3]=xt[3];return at}}()},75172:function(Tt,vt,d){var l=d(89224);Tt.exports={Graph:l.Graph,json:d(17401),alg:d(54613),version:l.version}},91606:function(Tt,vt,d){var l=d(95329);Tt.exports=R;function R(O){var _={},g=[],P;function b(A){l.has(_,A)||(_[A]=!0,P.push(A),l.each(O.successors(A),b),l.each(O.predecessors(A),b))}return l.each(O.nodes(),function(A){P=[],b(A),P.length&&g.push(P)}),g}},21482:function(Tt,vt,d){var l=d(95329);Tt.exports=R;function R(_,g,P){l.isArray(g)||(g=[g]);var b=(_.isDirected()?_.successors:_.neighbors).bind(_),A=[],I={};return l.each(g,function(x){if(!_.hasNode(x))throw new Error("Graph does not have node: "+x);O(_,x,P==="post",I,b,A)}),A}function O(_,g,P,b,A,I){l.has(b,g)||(b[g]=!0,P||I.push(g),l.each(A(g),function(x){O(_,x,P,b,A,I)}),P&&I.push(g))}},40845:function(Tt,vt,d){var l=d(13746),R=d(95329);Tt.exports=O;function O(_,g,P){return R.transform(_.nodes(),function(b,A){b[A]=l(_,A,g,P)},{})}},13746:function(Tt,vt,d){var l=d(95329),R=d(36614);Tt.exports=_;var O=l.constant(1);function _(P,b,A,I){return g(P,String(b),A||O,I||function(x){return P.outEdges(x)})}function g(P,b,A,I){var x={},k=new R,N,et,tt=function(Ct){var ut=Ct.v!==N?Ct.v:Ct.w,nt=x[ut],kt=A(Ct),Nt=et.distance+kt;if(kt<0)throw new Error("dijkstra does not allow negative edge weights. Bad edge: "+Ct+" Weight: "+kt);Nt<nt.distance&&(nt.distance=Nt,nt.predecessor=N,k.decrease(ut,Nt))};for(P.nodes().forEach(function(Ct){var ut=Ct===b?0:Number.POSITIVE_INFINITY;x[Ct]={distance:ut},k.add(Ct,ut)});k.size()>0&&(N=k.removeMin(),et=x[N],et.distance!==Number.POSITIVE_INFINITY);)I(N).forEach(tt);return x}},59324:function(Tt,vt,d){var l=d(95329),R=d(94558);Tt.exports=O;function O(_){return l.filter(R(_),function(g){return g.length>1||g.length===1&&_.hasEdge(g[0],g[0])})}},22893:function(Tt,vt,d){var l=d(95329);Tt.exports=O;var R=l.constant(1);function O(g,P,b){return _(g,P||R,b||function(A){return g.outEdges(A)})}function _(g,P,b){var A={},I=g.nodes();return I.forEach(function(x){A[x]={},A[x][x]={distance:0},I.forEach(function(k){x!==k&&(A[x][k]={distance:Number.POSITIVE_INFINITY})}),b(x).forEach(function(k){var N=k.v===x?k.w:k.v,et=P(k);A[x][N]={distance:et,predecessor:x}})}),I.forEach(function(x){var k=A[x];I.forEach(function(N){var et=A[N];I.forEach(function(tt){var Ct=et[x],ut=k[tt],nt=et[tt],kt=Ct.distance+ut.distance;kt<nt.distance&&(nt.distance=kt,nt.predecessor=ut.predecessor)})})}),A}},54613:function(Tt,vt,d){Tt.exports={components:d(91606),dijkstra:d(13746),dijkstraAll:d(40845),findCycles:d(59324),floydWarshall:d(22893),isAcyclic:d(588),postorder:d(98049),preorder:d(67158),prim:d(66058),tarjan:d(94558),topsort:d(7793)}},588:function(Tt,vt,d){var l=d(7793);Tt.exports=R;function R(O){try{l(O)}catch(_){if(_ instanceof l.CycleException)return!1;throw _}return!0}},98049:function(Tt,vt,d){var l=d(21482);Tt.exports=R;function R(O,_){return l(O,_,"post")}},67158:function(Tt,vt,d){var l=d(21482);Tt.exports=R;function R(O,_){return l(O,_,"pre")}},66058:function(Tt,vt,d){var l=d(95329),R=d(6349),O=d(36614);Tt.exports=_;function _(g,P){var b=new R,A={},I=new O,x;function k(et){var tt=et.v===x?et.w:et.v,Ct=I.priority(tt);if(Ct!==void 0){var ut=P(et);ut<Ct&&(A[tt]=x,I.decrease(tt,ut))}}if(g.nodeCount()===0)return b;l.each(g.nodes(),function(et){I.add(et,Number.POSITIVE_INFINITY),b.setNode(et)}),I.decrease(g.nodes()[0],0);for(var N=!1;I.size()>0;){if(x=I.removeMin(),l.has(A,x))b.setEdge(x,A[x]);else{if(N)throw new Error("Input graph is not connected: "+g);N=!0}g.nodeEdges(x).forEach(k)}return b}},94558:function(Tt,vt,d){var l=d(95329);Tt.exports=R;function R(O){var _=0,g=[],P={},b=[];function A(I){var x=P[I]={onStack:!0,lowlink:_,index:_++};if(g.push(I),O.successors(I).forEach(function(et){l.has(P,et)?P[et].onStack&&(x.lowlink=Math.min(x.lowlink,P[et].index)):(A(et),x.lowlink=Math.min(x.lowlink,P[et].lowlink))}),x.lowlink===x.index){var k=[],N;do N=g.pop(),P[N].onStack=!1,k.push(N);while(I!==N);b.push(k)}}return O.nodes().forEach(function(I){l.has(P,I)||A(I)}),b}},7793:function(Tt,vt,d){var l=d(95329);Tt.exports=R,R.CycleException=O;function R(_){var g={},P={},b=[];function A(I){if(l.has(P,I))throw new O;l.has(g,I)||(P[I]=!0,g[I]=!0,l.each(_.predecessors(I),A),delete P[I],b.push(I))}if(l.each(_.sinks(),A),l.size(g)!==_.nodeCount())throw new O;return b}function O(){}O.prototype=new Error},36614:function(Tt,vt,d){var l=d(95329);Tt.exports=R;function R(){this._arr=[],this._keyIndices={}}R.prototype.size=function(){return this._arr.length},R.prototype.keys=function(){return this._arr.map(function(O){return O.key})},R.prototype.has=function(O){return l.has(this._keyIndices,O)},R.prototype.priority=function(O){var _=this._keyIndices[O];if(_!==void 0)return this._arr[_].priority},R.prototype.min=function(){if(this.size()===0)throw new Error("Queue underflow");return this._arr[0].key},R.prototype.add=function(O,_){var g=this._keyIndices;if(O=String(O),!l.has(g,O)){var P=this._arr,b=P.length;return g[O]=b,P.push({key:O,priority:_}),this._decrease(b),!0}return!1},R.prototype.removeMin=function(){this._swap(0,this._arr.length-1);var O=this._arr.pop();return delete this._keyIndices[O.key],this._heapify(0),O.key},R.prototype.decrease=function(O,_){var g=this._keyIndices[O];if(_>this._arr[g].priority)throw new Error("New priority is greater than current priority. Key: "+O+" Old: "+this._arr[g].priority+" New: "+_);this._arr[g].priority=_,this._decrease(g)},R.prototype._heapify=function(O){var _=this._arr,g=2*O,P=g+1,b=O;g<_.length&&(b=_[g].priority<_[b].priority?g:b,P<_.length&&(b=_[P].priority<_[b].priority?P:b),b!==O&&(this._swap(O,b),this._heapify(b)))},R.prototype._decrease=function(O){for(var _=this._arr,g=_[O].priority,P;O!==0&&(P=O>>1,!(_[P].priority<g));)this._swap(O,P),O=P},R.prototype._swap=function(O,_){var g=this._arr,P=this._keyIndices,b=g[O],A=g[_];g[O]=A,g[_]=b,P[A.key]=O,P[b.key]=_}},6349:function(Tt,vt,d){"use strict";var l=d(95329);Tt.exports=g;var R="\0",O="\0",_="";function g(k){this._isDirected=l.has(k,"directed")?k.directed:!0,this._isMultigraph=l.has(k,"multigraph")?k.multigraph:!1,this._isCompound=l.has(k,"compound")?k.compound:!1,this._label=void 0,this._defaultNodeLabelFn=l.constant(void 0),this._defaultEdgeLabelFn=l.constant(void 0),this._nodes={},this._isCompound&&(this._parent={},this._children={},this._children[O]={}),this._in={},this._preds={},this._out={},this._sucs={},this._edgeObjs={},this._edgeLabels={}}g.prototype._nodeCount=0,g.prototype._edgeCount=0,g.prototype.isDirected=function(){return this._isDirected},g.prototype.isMultigraph=function(){return this._isMultigraph},g.prototype.isCompound=function(){return this._isCompound},g.prototype.setGraph=function(k){return this._label=k,this},g.prototype.graph=function(){return this._label},g.prototype.setDefaultNodeLabel=function(k){return l.isFunction(k)||(k=l.constant(k)),this._defaultNodeLabelFn=k,this},g.prototype.nodeCount=function(){return this._nodeCount},g.prototype.nodes=function(){return l.keys(this._nodes)},g.prototype.sources=function(){var k=this;return l.filter(this.nodes(),function(N){return l.isEmpty(k._in[N])})},g.prototype.sinks=function(){var k=this;return l.filter(this.nodes(),function(N){return l.isEmpty(k._out[N])})},g.prototype.setNodes=function(k,N){var et=arguments,tt=this;return l.each(k,function(Ct){et.length>1?tt.setNode(Ct,N):tt.setNode(Ct)}),this},g.prototype.setNode=function(k,N){return l.has(this._nodes,k)?(arguments.length>1&&(this._nodes[k]=N),this):(this._nodes[k]=arguments.length>1?N:this._defaultNodeLabelFn(k),this._isCompound&&(this._parent[k]=O,this._children[k]={},this._children[O][k]=!0),this._in[k]={},this._preds[k]={},this._out[k]={},this._sucs[k]={},++this._nodeCount,this)},g.prototype.node=function(k){return this._nodes[k]},g.prototype.hasNode=function(k){return l.has(this._nodes,k)},g.prototype.removeNode=function(k){var N=this;if(l.has(this._nodes,k)){var et=function(tt){N.removeEdge(N._edgeObjs[tt])};delete this._nodes[k],this._isCompound&&(this._removeFromParentsChildList(k),delete this._parent[k],l.each(this.children(k),function(tt){N.setParent(tt)}),delete this._children[k]),l.each(l.keys(this._in[k]),et),delete this._in[k],delete this._preds[k],l.each(l.keys(this._out[k]),et),delete this._out[k],delete this._sucs[k],--this._nodeCount}return this},g.prototype.setParent=function(k,N){if(!this._isCompound)throw new Error("Cannot set parent in a non-compound graph");if(l.isUndefined(N))N=O;else{N+="";for(var et=N;!l.isUndefined(et);et=this.parent(et))if(et===k)throw new Error("Setting "+N+" as parent of "+k+" would create a cycle");this.setNode(N)}return this.setNode(k),this._removeFromParentsChildList(k),this._parent[k]=N,this._children[N][k]=!0,this},g.prototype._removeFromParentsChildList=function(k){delete this._children[this._parent[k]][k]},g.prototype.parent=function(k){if(this._isCompound){var N=this._parent[k];if(N!==O)return N}},g.prototype.children=function(k){if(l.isUndefined(k)&&(k=O),this._isCompound){var N=this._children[k];if(N)return l.keys(N)}else{if(k===O)return this.nodes();if(this.hasNode(k))return[]}},g.prototype.predecessors=function(k){var N=this._preds[k];if(N)return l.keys(N)},g.prototype.successors=function(k){var N=this._sucs[k];if(N)return l.keys(N)},g.prototype.neighbors=function(k){var N=this.predecessors(k);if(N)return l.union(N,this.successors(k))},g.prototype.isLeaf=function(k){var N;return this.isDirected()?N=this.successors(k):N=this.neighbors(k),N.length===0},g.prototype.filterNodes=function(k){var N=new this.constructor({directed:this._isDirected,multigraph:this._isMultigraph,compound:this._isCompound});N.setGraph(this.graph());var et=this;l.each(this._nodes,function(ut,nt){k(nt)&&N.setNode(nt,ut)}),l.each(this._edgeObjs,function(ut){N.hasNode(ut.v)&&N.hasNode(ut.w)&&N.setEdge(ut,et.edge(ut))});var tt={};function Ct(ut){var nt=et.parent(ut);return nt===void 0||N.hasNode(nt)?(tt[ut]=nt,nt):nt in tt?tt[nt]:Ct(nt)}return this._isCompound&&l.each(N.nodes(),function(ut){N.setParent(ut,Ct(ut))}),N},g.prototype.setDefaultEdgeLabel=function(k){return l.isFunction(k)||(k=l.constant(k)),this._defaultEdgeLabelFn=k,this},g.prototype.edgeCount=function(){return this._edgeCount},g.prototype.edges=function(){return l.values(this._edgeObjs)},g.prototype.setPath=function(k,N){var et=this,tt=arguments;return l.reduce(k,function(Ct,ut){return tt.length>1?et.setEdge(Ct,ut,N):et.setEdge(Ct,ut),ut}),this},g.prototype.setEdge=function(){var k,N,et,tt,Ct=!1,ut=arguments[0];typeof ut=="object"&&ut!==null&&"v"in ut?(k=ut.v,N=ut.w,et=ut.name,arguments.length===2&&(tt=arguments[1],Ct=!0)):(k=ut,N=arguments[1],et=arguments[3],arguments.length>2&&(tt=arguments[2],Ct=!0)),k=""+k,N=""+N,l.isUndefined(et)||(et=""+et);var nt=A(this._isDirected,k,N,et);if(l.has(this._edgeLabels,nt))return Ct&&(this._edgeLabels[nt]=tt),this;if(!l.isUndefined(et)&&!this._isMultigraph)throw new Error("Cannot set a named edge when isMultigraph = false");this.setNode(k),this.setNode(N),this._edgeLabels[nt]=Ct?tt:this._defaultEdgeLabelFn(k,N,et);var kt=I(this._isDirected,k,N,et);return k=kt.v,N=kt.w,Object.freeze(kt),this._edgeObjs[nt]=kt,P(this._preds[N],k),P(this._sucs[k],N),this._in[N][nt]=kt,this._out[k][nt]=kt,this._edgeCount++,this},g.prototype.edge=function(k,N,et){var tt=arguments.length===1?x(this._isDirected,arguments[0]):A(this._isDirected,k,N,et);return this._edgeLabels[tt]},g.prototype.hasEdge=function(k,N,et){var tt=arguments.length===1?x(this._isDirected,arguments[0]):A(this._isDirected,k,N,et);return l.has(this._edgeLabels,tt)},g.prototype.removeEdge=function(k,N,et){var tt=arguments.length===1?x(this._isDirected,arguments[0]):A(this._isDirected,k,N,et),Ct=this._edgeObjs[tt];return Ct&&(k=Ct.v,N=Ct.w,delete this._edgeLabels[tt],delete this._edgeObjs[tt],b(this._preds[N],k),b(this._sucs[k],N),delete this._in[N][tt],delete this._out[k][tt],this._edgeCount--),this},g.prototype.inEdges=function(k,N){var et=this._in[k];if(et){var tt=l.values(et);return N?l.filter(tt,function(Ct){return Ct.v===N}):tt}},g.prototype.outEdges=function(k,N){var et=this._out[k];if(et){var tt=l.values(et);return N?l.filter(tt,function(Ct){return Ct.w===N}):tt}},g.prototype.nodeEdges=function(k,N){var et=this.inEdges(k,N);if(et)return et.concat(this.outEdges(k,N))};function P(k,N){k[N]?k[N]++:k[N]=1}function b(k,N){--k[N]||delete k[N]}function A(k,N,et,tt){var Ct=""+N,ut=""+et;if(!k&&Ct>ut){var nt=Ct;Ct=ut,ut=nt}return Ct+_+ut+_+(l.isUndefined(tt)?R:tt)}function I(k,N,et,tt){var Ct=""+N,ut=""+et;if(!k&&Ct>ut){var nt=Ct;Ct=ut,ut=nt}var kt={v:Ct,w:ut};return tt&&(kt.name=tt),kt}function x(k,N){return A(k,N.v,N.w,N.name)}},89224:function(Tt,vt,d){Tt.exports={Graph:d(6349),version:d(16544)}},17401:function(Tt,vt,d){var l=d(95329),R=d(6349);Tt.exports={write:O,read:P};function O(b){var A={options:{directed:b.isDirected(),multigraph:b.isMultigraph(),compound:b.isCompound()},nodes:_(b),edges:g(b)};return l.isUndefined(b.graph())||(A.value=l.clone(b.graph())),A}function _(b){return l.map(b.nodes(),function(A){var I=b.node(A),x=b.parent(A),k={v:A};return l.isUndefined(I)||(k.value=I),l.isUndefined(x)||(k.parent=x),k})}function g(b){return l.map(b.edges(),function(A){var I=b.edge(A),x={v:A.v,w:A.w};return l.isUndefined(A.name)||(x.name=A.name),l.isUndefined(I)||(x.value=I),x})}function P(b){var A=new R(b.options).setGraph(b.value);return l.each(b.nodes,function(I){A.setNode(I.v,I.value),I.parent&&A.setParent(I.v,I.parent)}),l.each(b.edges,function(I){A.setEdge({v:I.v,w:I.w,name:I.name},I.value)}),A}},95329:function(Tt,vt,d){var l;try{l={clone:d(76833),constant:d(13503),each:d(76934),filter:d(64725),has:d(99946),isArray:d(80744),isEmpty:d(61627),isFunction:d(9363),isUndefined:d(16513),keys:d(55451),map:d(9924),reduce:d(16473),size:d(40617),transform:d(91116),union:d(44065),values:d(81229)}}catch(R){}l||(l=window._),Tt.exports=l},16544:function(Tt){Tt.exports="2.1.8"},95328:function(Tt){function vt(O,_,g){return(_[0]-O[0])*(g[1]-O[1])-(_[1]-O[1])*(g[0]-O[0])}function d(O){const _=[];for(let g=0;g<O.length;g++){for(;_.length>=2&&vt(_[_.length-2],_[_.length-1],O[g])<=0;)_.pop();_.push(O[g])}return _.pop(),_}function l(O){const _=O.reverse(),g=[];for(let P=0;P<_.length;P++){for(;g.length>=2&&vt(g[g.length-2],g[g.length-1],_[P])<=0;)g.pop();g.push(_[P])}return g.pop(),g}function R(O){const _=d(O),P=l(O).concat(_);return P.push(O[0]),P}Tt.exports=R},11950:function(Tt){Tt.exports={toXy:function(vt,d){return d===void 0?vt.slice():vt.map(function(l){return new Function("pt","return [pt"+d[0]+",pt"+d[1]+"];")(l)})},fromXy:function(vt,d){return d===void 0?vt.slice():vt.map(function(l){return new Function("pt","const o = {}; o"+d[0]+"= pt[0]; o"+d[1]+"= pt[1]; return o;")(l)})}}},98204:function(Tt){function vt(l,R){this._cells=[],this._cellSize=R,this._reverseCellSize=1/R;for(let O=0;O<l.length;O++){const _=l[O],g=this.coordToCellNum(_[0]),P=this.coordToCellNum(_[1]);if(this._cells[g])this._cells[g][P]?this._cells[g][P].push(_):this._cells[g][P]=[_];else{const b=[];b[P]=[_],this._cells[g]=b}}}vt.prototype={cellPoints:function(l,R){return this._cells[l]!==void 0&&this._cells[l][R]!==void 0?this._cells[l][R]:[]},rangePoints:function(l){const R=this.coordToCellNum(l[0]),O=this.coordToCellNum(l[1]),_=this.coordToCellNum(l[2]),g=this.coordToCellNum(l[3]),P=[];for(let b=R;b<=_;b++)for(let A=O;A<=g;A++)for(let I=0;I<this.cellPoints(b,A).length;I++)P.push(this.cellPoints(b,A)[I]);return P},removePoint:function(l){const R=this.coordToCellNum(l[0]),O=this.coordToCellNum(l[1]),_=this._cells[R][O];let g;for(let P=0;P<_.length;P++)if(_[P][0]===l[0]&&_[P][1]===l[1]){g=P;break}return _.splice(g,1),_},trunc:Math.trunc||function(l){return l-l%1},coordToCellNum:function(l){return this.trunc(l*this._reverseCellSize)},extendBbox:function(l,R){return[l[0]-R*this._cellSize,l[1]-R*this._cellSize,l[2]+R*this._cellSize,l[3]+R*this._cellSize]}};function d(l,R){return new vt(l,R)}Tt.exports=d},76117:function(Tt,vt,d){"use strict";const l=d(86972),R=d(98204),O=d(11950),_=d(95328);function g(nt){const kt=[nt[0]];let Nt=nt[0];for(let Bt=1;Bt<nt.length;Bt++){const Xt=nt[Bt];(Nt[0]!==Xt[0]||Nt[1]!==Xt[1])&&kt.push(Xt),Nt=Xt}return kt}function P(nt){return nt.sort(function(kt,Nt){return kt[0]-Nt[0]||kt[1]-Nt[1]})}function b(nt,kt){return Math.pow(kt[0]-nt[0],2)+Math.pow(kt[1]-nt[1],2)}function A(nt,kt,Nt){const Bt=[kt[0]-nt[0],kt[1]-nt[1]],Xt=[Nt[0]-nt[0],Nt[1]-nt[1]],wt=b(nt,kt),ot=b(nt,Nt);return(Bt[0]*Xt[0]+Bt[1]*Xt[1])/Math.sqrt(wt*ot)}function I(nt,kt){for(let Nt=0;Nt<kt.length-1;Nt++){const Bt=[kt[Nt],kt[Nt+1]];if(!(nt[0][0]===Bt[0][0]&&nt[0][1]===Bt[0][1]||nt[0][0]===Bt[1][0]&&nt[0][1]===Bt[1][1])&&l(nt,Bt))return!0}return!1}function x(nt){let kt=1/0,Nt=1/0,Bt=-1/0,Xt=-1/0;for(let wt=nt.length-1;wt>=0;wt--)nt[wt][0]<kt&&(kt=nt[wt][0]),nt[wt][1]<Nt&&(Nt=nt[wt][1]),nt[wt][0]>Bt&&(Bt=nt[wt][0]),nt[wt][1]>Xt&&(Xt=nt[wt][1]);return[Bt-kt,Xt-Nt]}function k(nt){return[Math.min(nt[0][0],nt[1][0]),Math.min(nt[0][1],nt[1][1]),Math.max(nt[0][0],nt[1][0]),Math.max(nt[0][1],nt[1][1])]}function N(nt,kt,Nt){let Bt=null,Xt=Ct,wt=Ct,ot,It;for(let zt=0;zt<kt.length;zt++)ot=A(nt[0],nt[1],kt[zt]),It=A(nt[1],nt[0],kt[zt]),ot>Xt&&It>wt&&!I([nt[0],kt[zt]],Nt)&&!I([nt[1],kt[zt]],Nt)&&(Xt=ot,wt=It,Bt=kt[zt]);return Bt}function et(nt,kt,Nt,Bt,Xt){let wt=!1;for(let ot=0;ot<nt.length-1;ot++){const It=[nt[ot],nt[ot+1]],zt=It[0][0]+","+It[0][1]+","+It[1][0]+","+It[1][1];if(b(It[0],It[1])<kt||Xt.has(zt))continue;let Ot=0,pe=k(It),xe,qt,Ye;do pe=Bt.extendBbox(pe,Ot),xe=pe[2]-pe[0],qt=pe[3]-pe[1],Ye=N(It,Bt.rangePoints(pe),nt),Ot++;while(Ye===null&&(Nt[0]>xe||Nt[1]>qt));xe>=Nt[0]&&qt>=Nt[1]&&Xt.add(zt),Ye!==null&&(nt.splice(ot+1,0,Ye),Bt.removePoint(Ye),wt=!0)}return wt?et(nt,kt,Nt,Bt,Xt):nt}function tt(nt,kt,Nt){let Bt=kt||20;const Xt=g(P(O.toXy(nt,Nt)));if(Xt.length<4){const xe=Xt.concat([Xt[0]]);return Nt?O.fromXy(xe,Nt):xe}const wt=x(Xt),ot=[wt[0]*ut,wt[1]*ut],It=_(Xt),zt=Xt.filter(function(xe){return It.indexOf(xe)<0}),Ot=Math.ceil(1/(Xt.length/(wt[0]*wt[1]))),pe=et(It,Math.pow(Bt,2),ot,R(zt,Ot),new Set);return Nt?O.fromXy(pe,Nt):pe}const Ct=Math.cos(90/(180/Math.PI)),ut=.6;Tt.exports=tt},86972:function(Tt){function vt(l,R,O,_,g,P){const b=(P-R)*(O-l)-(_-R)*(g-l);return b>0?!0:!(b<0)}function d(l,R){const O=l[0][0],_=l[0][1],g=l[1][0],P=l[1][1],b=R[0][0],A=R[0][1],I=R[1][0],x=R[1][1];return vt(O,_,b,A,I,x)!==vt(g,P,b,A,I,x)&&vt(O,_,g,P,b,A)!==vt(O,_,g,P,I,x)}Tt.exports=d},34634:function(Tt,vt,d){"use strict";d.r(vt),d.d(vt,{isAnyArray:function(){return R}});const l=Object.prototype.toString;function R(O){const _=l.call(O);return _.endsWith("Array]")&&!_.includes("Big")}},55973:function(Tt){Tt.exports=function(d){return!d||typeof d=="string"?!1:d instanceof Array||Array.isArray(d)||d.length>=0&&(d.splice instanceof Function||Object.getOwnPropertyDescriptor(d,d.length-1)&&d.constructor.name!=="String")}},15584:function(Tt,vt,d){var l=d(73893),R=d(33152),O=l(R,"DataView");Tt.exports=O},97288:function(Tt,vt,d){var l=d(73893),R=d(33152),O=l(R,"Promise");Tt.exports=O},23599:function(Tt,vt,d){var l=d(73893),R=d(33152),O=l(R,"Set");Tt.exports=O},98924:function(Tt,vt,d){var l=d(52166),R=d(34776),O=d(40393);function _(g){var P=-1,b=g==null?0:g.length;for(this.__data__=new l;++P<b;)this.add(g[P])}_.prototype.add=_.prototype.push=R,_.prototype.has=O,Tt.exports=_},26873:function(Tt,vt,d){var l=d(73893),R=d(33152),O=l(R,"WeakMap");Tt.exports=O},74809:function(Tt){function vt(d,l){for(var R=-1,O=d==null?0:d.length;++R<O&&l(d[R],R,d)!==!1;);return d}Tt.exports=vt},86952:function(Tt){function vt(d,l){for(var R=-1,O=d==null?0:d.length,_=0,g=[];++R<O;){var P=d[R];l(P,R,d)&&(g[_++]=P)}return g}Tt.exports=vt},84271:function(Tt,vt,d){var l=d(17424);function R(O,_){var g=O==null?0:O.length;return!!g&&l(O,_,0)>-1}Tt.exports=R},94874:function(Tt){function vt(d,l,R){for(var O=-1,_=d==null?0:d.length;++O<_;)if(R(l,d[O]))return!0;return!1}Tt.exports=vt},75010:function(Tt){function vt(d,l){for(var R=-1,O=d==null?0:d.length,_=Array(O);++R<O;)_[R]=l(d[R],R,d);return _}Tt.exports=vt},57095:function(Tt){function vt(d,l){for(var R=-1,O=l.length,_=d.length;++R<O;)d[_+R]=l[R];return d}Tt.exports=vt},99861:function(Tt){function vt(d,l,R,O){var _=-1,g=d==null?0:d.length;for(O&&g&&(R=d[++_]);++_<g;)R=l(R,d[_],_,d);return R}Tt.exports=vt},64045:function(Tt){function vt(d,l){for(var R=-1,O=d==null?0:d.length;++R<O;)if(l(d[R],R,d))return!0;return!1}Tt.exports=vt},26539:function(Tt,vt,d){var l=d(22310),R=l("length");Tt.exports=R},91937:function(Tt,vt,d){var l=d(95378),R=d(55451);function O(_,g){return _&&l(g,R(g),_)}Tt.exports=O},26680:function(Tt,vt,d){var l=d(95378),R=d(56730);function O(_,g){return _&&l(g,R(g),_)}Tt.exports=O},99045:function(Tt,vt,d){var l=d(91866),R=d(74809),O=d(60348),_=d(91937),g=d(26680),P=d(32315),b=d(47760),A=d(15168),I=d(71678),x=d(12076),k=d(22675),N=d(66139),et=d(79264),tt=d(97541),Ct=d(4084),ut=d(80744),nt=d(57835),kt=d(41626),Nt=d(20816),Bt=d(65226),Xt=d(55451),wt=d(56730),ot=1,It=2,zt=4,Ot="[object Arguments]",pe="[object Array]",xe="[object Boolean]",qt="[object Date]",Ye="[object Error]",We="[object Function]",Oe="[object GeneratorFunction]",Qe="[object Map]",Mt="[object Number]",ne="[object Object]",Me="[object RegExp]",nn="[object Set]",le="[object String]",be="[object Symbol]",De="[object WeakMap]",Yt="[object ArrayBuffer]",re="[object DataView]",xt="[object Float32Array]",at="[object Float64Array]",se="[object Int8Array]",Fe="[object Int16Array]",Re="[object Int32Array]",ge="[object Uint8Array]",Ie="[object Uint8ClampedArray]",Ne="[object Uint16Array]",bt="[object Uint32Array]",Jt={};Jt[Ot]=Jt[pe]=Jt[Yt]=Jt[re]=Jt[xe]=Jt[qt]=Jt[xt]=Jt[at]=Jt[se]=Jt[Fe]=Jt[Re]=Jt[Qe]=Jt[Mt]=Jt[ne]=Jt[Me]=Jt[nn]=Jt[le]=Jt[be]=Jt[ge]=Jt[Ie]=Jt[Ne]=Jt[bt]=!0,Jt[Ye]=Jt[We]=Jt[De]=!1;function oe(M,Q,te,Ut,we,Ce){var _e,mt=Q&ot,X=Q&It,Pt=Q&zt;if(te&&(_e=we?te(M,Ut,we,Ce):te(M)),_e!==void 0)return _e;if(!Nt(M))return M;var At=ut(M);if(At){if(_e=et(M),!mt)return b(M,_e)}else{var Rt=N(M),_t=Rt==We||Rt==Oe;if(nt(M))return P(M,mt);if(Rt==ne||Rt==Ot||_t&&!we){if(_e=X||_t?{}:Ct(M),!mt)return X?I(M,g(_e,M)):A(M,_(_e,M))}else{if(!Jt[Rt])return we?M:{};_e=tt(M,Rt,mt)}}Ce||(Ce=new l);var Vt=Ce.get(M);if(Vt)return Vt;Ce.set(M,_e),Bt(M)?M.forEach(function(me){_e.add(oe(me,Q,te,me,M,Ce))}):kt(M)&&M.forEach(function(me,Ze){_e.set(Ze,oe(me,Q,te,Ze,M,Ce))});var ae=Pt?X?k:x:X?wt:Xt,fe=At?void 0:ae(M);return R(fe||M,function(me,Ze){fe&&(Ze=me,me=M[Ze]),O(_e,Ze,oe(me,Q,te,Ze,M,Ce))}),_e}Tt.exports=oe},44107:function(Tt,vt,d){var l=d(85605),R=d(49164),O=R(l);Tt.exports=O},2659:function(Tt,vt,d){var l=d(45029);function R(O,_,g){for(var P=-1,b=O.length;++P<b;){var A=O[P],I=_(A);if(I!=null&&(x===void 0?I===I&&!l(I):g(I,x)))var x=I,k=A}return k}Tt.exports=R},32872:function(Tt,vt,d){var l=d(44107);function R(O,_){var g=[];return l(O,function(P,b,A){_(P,b,A)&&g.push(P)}),g}Tt.exports=R},51533:function(Tt){function vt(d,l,R,O){for(var _=d.length,g=R+(O?1:-1);O?g--:++g<_;)if(l(d[g],g,d))return g;return-1}Tt.exports=vt},9256:function(Tt,vt,d){var l=d(57095),R=d(88133);function O(_,g,P,b,A){var I=-1,x=_.length;for(P||(P=R),A||(A=[]);++I<x;){var k=_[I];g>0&&P(k)?g>1?O(k,g-1,P,b,A):l(A,k):b||(A[A.length]=k)}return A}Tt.exports=O},85605:function(Tt,vt,d){var l=d(14018),R=d(55451);function O(_,g){return _&&l(_,g,R)}Tt.exports=O},89147:function(Tt,vt,d){var l=d(1186),R=d(9171);function O(_,g){g=l(g,_);for(var P=0,b=g.length;_!=null&&P<b;)_=_[R(g[P++])];return P&&P==b?_:void 0}Tt.exports=O},75635:function(Tt,vt,d){var l=d(57095),R=d(80744);function O(_,g,P){var b=g(_);return R(_)?b:l(b,P(_))}Tt.exports=O},40302:function(Tt){function vt(d,l){return d>l}Tt.exports=vt},3251:function(Tt){var vt=Object.prototype,d=vt.hasOwnProperty;function l(R,O){return R!=null&&d.call(R,O)}Tt.exports=l},62348:function(Tt){function vt(d,l){return d!=null&&l in Object(d)}Tt.exports=vt},17424:function(Tt,vt,d){var l=d(51533),R=d(8373),O=d(49237);function _(g,P,b){return P===P?O(g,P,b):l(g,R,b)}Tt.exports=_},77295:function(Tt,vt,d){var l=d(84412),R=d(93913);function O(_,g,P,b,A){return _===g?!0:_==null||g==null||!R(_)&&!R(g)?_!==_&&g!==g:l(_,g,P,b,O,A)}Tt.exports=O},84412:function(Tt,vt,d){var l=d(91866),R=d(50401),O=d(57710),_=d(4983),g=d(66139),P=d(80744),b=d(57835),A=d(18397),I=1,x="[object Arguments]",k="[object Array]",N="[object Object]",et=Object.prototype,tt=et.hasOwnProperty;function Ct(ut,nt,kt,Nt,Bt,Xt){var wt=P(ut),ot=P(nt),It=wt?k:g(ut),zt=ot?k:g(nt);It=It==x?N:It,zt=zt==x?N:zt;var Ot=It==N,pe=zt==N,xe=It==zt;if(xe&&b(ut)){if(!b(nt))return!1;wt=!0,Ot=!1}if(xe&&!Ot)return Xt||(Xt=new l),wt||A(ut)?R(ut,nt,kt,Nt,Bt,Xt):O(ut,nt,It,kt,Nt,Bt,Xt);if(!(kt&I)){var qt=Ot&&tt.call(ut,"__wrapped__"),Ye=pe&&tt.call(nt,"__wrapped__");if(qt||Ye){var We=qt?ut.value():ut,Oe=Ye?nt.value():nt;return Xt||(Xt=new l),Bt(We,Oe,kt,Nt,Xt)}}return xe?(Xt||(Xt=new l),_(ut,nt,kt,Nt,Bt,Xt)):!1}Tt.exports=Ct},55005:function(Tt,vt,d){var l=d(66139),R=d(93913),O="[object Map]";function _(g){return R(g)&&l(g)==O}Tt.exports=_},51524:function(Tt,vt,d){var l=d(91866),R=d(77295),O=1,_=2;function g(P,b,A,I){var x=A.length,k=x,N=!I;if(P==null)return!k;for(P=Object(P);x--;){var et=A[x];if(N&&et[2]?et[1]!==P[et[0]]:!(et[0]in P))return!1}for(;++x<k;){et=A[x];var tt=et[0],Ct=P[tt],ut=et[1];if(N&&et[2]){if(Ct===void 0&&!(tt in P))return!1}else{var nt=new l;if(I)var kt=I(Ct,ut,tt,P,b,nt);if(!(kt===void 0?R(ut,Ct,O|_,I,nt):kt))return!1}}return!0}Tt.exports=g},8373:function(Tt){function vt(d){return d!==d}Tt.exports=vt},38652:function(Tt,vt,d){var l=d(66139),R=d(93913),O="[object Set]";function _(g){return R(g)&&l(g)==O}Tt.exports=_},95979:function(Tt,vt,d){var l=d(17632),R=d(38933),O=d(46962),_=d(80744),g=d(35769);function P(b){return typeof b=="function"?b:b==null?O:typeof b=="object"?_(b)?R(b[0],b[1]):l(b):g(b)}Tt.exports=P},6019:function(Tt,vt,d){var l=d(7975),R=d(23730),O=Object.prototype,_=O.hasOwnProperty;function g(P){if(!l(P))return R(P);var b=[];for(var A in Object(P))_.call(P,A)&&A!="constructor"&&b.push(A);return b}Tt.exports=g},93757:function(Tt){function vt(d,l){return d<l}Tt.exports=vt},65487:function(Tt,vt,d){var l=d(44107),R=d(24665);function O(_,g){var P=-1,b=R(_)?Array(_.length):[];return l(_,function(A,I,x){b[++P]=g(A,I,x)}),b}Tt.exports=O},17632:function(Tt,vt,d){var l=d(51524),R=d(10261),O=d(24122);function _(g){var P=R(g);return P.length==1&&P[0][2]?O(P[0][0],P[0][1]):function(b){return b===g||l(b,g,P)}}Tt.exports=_},38933:function(Tt,vt,d){var l=d(77295),R=d(44231),O=d(37879),_=d(86773),g=d(88411),P=d(24122),b=d(9171),A=1,I=2;function x(k,N){return _(k)&&g(N)?P(b(k),N):function(et){var tt=R(et,k);return tt===void 0&&tt===N?O(et,k):l(N,tt,A|I)}}Tt.exports=x},58506:function(Tt,vt,d){var l=d(75010),R=d(89147),O=d(95979),_=d(65487),g=d(33065),P=d(38342),b=d(11249),A=d(46962),I=d(80744);function x(k,N,et){N.length?N=l(N,function(ut){return I(ut)?function(nt){return R(nt,ut.length===1?ut[0]:ut)}:ut}):N=[A];var tt=-1;N=l(N,P(O));var Ct=_(k,function(ut,nt,kt){var Nt=l(N,function(Bt){return Bt(ut)});return{criteria:Nt,index:++tt,value:ut}});return g(Ct,function(ut,nt){return b(ut,nt,et)})}Tt.exports=x},88832:function(Tt,vt,d){var l=d(10867),R=d(37879);function O(_,g){return l(_,g,function(P,b){return R(_,b)})}Tt.exports=O},10867:function(Tt,vt,d){var l=d(89147),R=d(36897),O=d(1186);function _(g,P,b){for(var A=-1,I=P.length,x={};++A<I;){var k=P[A],N=l(g,k);b(N,k)&&R(x,O(k,g),N)}return x}Tt.exports=_},22310:function(Tt){function vt(d){return function(l){return l==null?void 0:l[d]}}Tt.exports=vt},96916:function(Tt,vt,d){var l=d(89147);function R(O){return function(_){return l(_,O)}}Tt.exports=R},36121:function(Tt){var vt=Math.ceil,d=Math.max;function l(R,O,_,g){for(var P=-1,b=d(vt((O-R)/(_||1)),0),A=Array(b);b--;)A[g?b:++P]=R,R+=_;return A}Tt.exports=l},30739:function(Tt){function vt(d,l,R,O,_){return _(d,function(g,P,b){R=O?(O=!1,g):l(R,g,P,b)}),R}Tt.exports=vt},36897:function(Tt,vt,d){var l=d(60348),R=d(1186),O=d(70213),_=d(20816),g=d(9171);function P(b,A,I,x){if(!_(b))return b;A=R(A,b);for(var k=-1,N=A.length,et=N-1,tt=b;tt!=null&&++k<N;){var Ct=g(A[k]),ut=I;if(Ct==="__proto__"||Ct==="constructor"||Ct==="prototype")return b;if(k!=et){var nt=tt[Ct];ut=x?x(nt,Ct,tt):void 0,ut===void 0&&(ut=_(nt)?nt:O(A[k+1])?[]:{})}l(tt,Ct,ut),tt=tt[Ct]}return b}Tt.exports=P},33065:function(Tt){function vt(d,l){var R=d.length;for(d.sort(l);R--;)d[R]=d[R].value;return d}Tt.exports=vt},50230:function(Tt,vt,d){var l=d(91869),R=d(75010),O=d(80744),_=d(45029),g=1/0,P=l?l.prototype:void 0,b=P?P.toString:void 0;function A(I){if(typeof I=="string")return I;if(O(I))return R(I,A)+"";if(_(I))return b?b.call(I):"";var x=I+"";return x=="0"&&1/I==-g?"-0":x}Tt.exports=A},13927:function(Tt,vt,d){var l=d(15333),R=/^\s+/;function O(_){return _&&_.slice(0,l(_)+1).replace(R,"")}Tt.exports=O},29098:function(Tt,vt,d){var l=d(98924),R=d(84271),O=d(94874),_=d(1931),g=d(47506),P=d(79679),b=200;function A(I,x,k){var N=-1,et=R,tt=I.length,Ct=!0,ut=[],nt=ut;if(k)Ct=!1,et=O;else if(tt>=b){var kt=x?null:g(I);if(kt)return P(kt);Ct=!1,et=_,nt=new l}else nt=x?[]:ut;t:for(;++N<tt;){var Nt=I[N],Bt=x?x(Nt):Nt;if(Nt=k||Nt!==0?Nt:0,Ct&&Bt===Bt){for(var Xt=nt.length;Xt--;)if(nt[Xt]===Bt)continue t;x&&nt.push(Bt),ut.push(Nt)}else et(nt,Bt,k)||(nt!==ut&&nt.push(Bt),ut.push(Nt))}return ut}Tt.exports=A},20720:function(Tt,vt,d){var l=d(75010);function R(O,_){return l(_,function(g){return O[g]})}Tt.exports=R},94484:function(Tt){function vt(d,l,R){for(var O=-1,_=d.length,g=l.length,P={};++O<_;){var b=O<g?l[O]:void 0;R(P,d[O],b)}return P}Tt.exports=vt},1931:function(Tt){function vt(d,l){return d.has(l)}Tt.exports=vt},11756:function(Tt,vt,d){var l=d(46962);function R(O){return typeof O=="function"?O:l}Tt.exports=R},1186:function(Tt,vt,d){var l=d(80744),R=d(86773),O=d(40493),_=d(44140);function g(P,b){return l(P)?P:R(P,b)?[P]:O(_(P))}Tt.exports=g},27984:function(Tt,vt,d){var l=d(20188);function R(O,_){var g=_?l(O.buffer):O.buffer;return new O.constructor(g,O.byteOffset,O.byteLength)}Tt.exports=R},78583:function(Tt){var vt=/\w*$/;function d(l){var R=new l.constructor(l.source,vt.exec(l));return R.lastIndex=l.lastIndex,R}Tt.exports=d},28757:function(Tt,vt,d){var l=d(91869),R=l?l.prototype:void 0,O=R?R.valueOf:void 0;function _(g){return O?Object(O.call(g)):{}}Tt.exports=_},83018:function(Tt,vt,d){var l=d(45029);function R(O,_){if(O!==_){var g=O!==void 0,P=O===null,b=O===O,A=l(O),I=_!==void 0,x=_===null,k=_===_,N=l(_);if(!x&&!N&&!A&&O>_||A&&I&&k&&!x&&!N||P&&I&&k||!g&&k||!b)return 1;if(!P&&!A&&!N&&O<_||N&&g&&b&&!P&&!A||x&&g&&b||!I&&b||!k)return-1}return 0}Tt.exports=R},11249:function(Tt,vt,d){var l=d(83018);function R(O,_,g){for(var P=-1,b=O.criteria,A=_.criteria,I=b.length,x=g.length;++P<I;){var k=l(b[P],A[P]);if(k){if(P>=x)return k;var N=g[P];return k*(N=="desc"?-1:1)}}return O.index-_.index}Tt.exports=R},15168:function(Tt,vt,d){var l=d(95378),R=d(58966);function O(_,g){return l(_,R(_),g)}Tt.exports=O},71678:function(Tt,vt,d){var l=d(95378),R=d(66817);function O(_,g){return l(_,R(_),g)}Tt.exports=O},49164:function(Tt,vt,d){var l=d(24665);function R(O,_){return function(g,P){if(g==null)return g;if(!l(g))return O(g,P);for(var b=g.length,A=_?b:-1,I=Object(g);(_?A--:++A<b)&&P(I[A],A,I)!==!1;);return g}}Tt.exports=R},19554:function(Tt,vt,d){var l=d(95979),R=d(24665),O=d(55451);function _(g){return function(P,b,A){var I=Object(P);if(!R(P)){var x=l(b,3);P=O(P),b=function(N){return x(I[N],N,I)}}var k=g(P,b,A);return k>-1?I[x?P[k]:k]:void 0}}Tt.exports=_},76106:function(Tt,vt,d){var l=d(36121),R=d(8138),O=d(97341);function _(g){return function(P,b,A){return A&&typeof A!="number"&&R(P,b,A)&&(b=A=void 0),P=O(P),b===void 0?(b=P,P=0):b=O(b),A=A===void 0?P<b?1:-1:O(A),l(P,b,A,g)}}Tt.exports=_},47506:function(Tt,vt,d){var l=d(23599),R=d(9958),O=d(79679),_=1/0,g=l&&1/O(new l([,-0]))[1]==_?function(P){return new l(P)}:R;Tt.exports=g},50401:function(Tt,vt,d){var l=d(98924),R=d(64045),O=d(1931),_=1,g=2;function P(b,A,I,x,k,N){var et=I&_,tt=b.length,Ct=A.length;if(tt!=Ct&&!(et&&Ct>tt))return!1;var ut=N.get(b),nt=N.get(A);if(ut&&nt)return ut==A&&nt==b;var kt=-1,Nt=!0,Bt=I&g?new l:void 0;for(N.set(b,A),N.set(A,b);++kt<tt;){var Xt=b[kt],wt=A[kt];if(x)var ot=et?x(wt,Xt,kt,A,b,N):x(Xt,wt,kt,b,A,N);if(ot!==void 0){if(ot)continue;Nt=!1;break}if(Bt){if(!R(A,function(It,zt){if(!O(Bt,zt)&&(Xt===It||k(Xt,It,I,x,N)))return Bt.push(zt)})){Nt=!1;break}}else if(!(Xt===wt||k(Xt,wt,I,x,N))){Nt=!1;break}}return N.delete(b),N.delete(A),Nt}Tt.exports=P},57710:function(Tt,vt,d){var l=d(91869),R=d(77945),O=d(43607),_=d(50401),g=d(83383),P=d(79679),b=1,A=2,I="[object Boolean]",x="[object Date]",k="[object Error]",N="[object Map]",et="[object Number]",tt="[object RegExp]",Ct="[object Set]",ut="[object String]",nt="[object Symbol]",kt="[object ArrayBuffer]",Nt="[object DataView]",Bt=l?l.prototype:void 0,Xt=Bt?Bt.valueOf:void 0;function wt(ot,It,zt,Ot,pe,xe,qt){switch(zt){case Nt:if(ot.byteLength!=It.byteLength||ot.byteOffset!=It.byteOffset)return!1;ot=ot.buffer,It=It.buffer;case kt:return!(ot.byteLength!=It.byteLength||!xe(new R(ot),new R(It)));case I:case x:case et:return O(+ot,+It);case k:return ot.name==It.name&&ot.message==It.message;case tt:case ut:return ot==It+"";case N:var Ye=g;case Ct:var We=Ot&b;if(Ye||(Ye=P),ot.size!=It.size&&!We)return!1;var Oe=qt.get(ot);if(Oe)return Oe==It;Ot|=A,qt.set(ot,It);var Qe=_(Ye(ot),Ye(It),Ot,pe,xe,qt);return qt.delete(ot),Qe;case nt:if(Xt)return Xt.call(ot)==Xt.call(It)}return!1}Tt.exports=wt},4983:function(Tt,vt,d){var l=d(12076),R=1,O=Object.prototype,_=O.hasOwnProperty;function g(P,b,A,I,x,k){var N=A&R,et=l(P),tt=et.length,Ct=l(b),ut=Ct.length;if(tt!=ut&&!N)return!1;for(var nt=tt;nt--;){var kt=et[nt];if(!(N?kt in b:_.call(b,kt)))return!1}var Nt=k.get(P),Bt=k.get(b);if(Nt&&Bt)return Nt==b&&Bt==P;var Xt=!0;k.set(P,b),k.set(b,P);for(var wt=N;++nt<tt;){kt=et[nt];var ot=P[kt],It=b[kt];if(I)var zt=N?I(It,ot,kt,b,P,k):I(ot,It,kt,P,b,k);if(!(zt===void 0?ot===It||x(ot,It,A,I,k):zt)){Xt=!1;break}wt||(wt=kt=="constructor")}if(Xt&&!wt){var Ot=P.constructor,pe=b.constructor;Ot!=pe&&"constructor"in P&&"constructor"in b&&!(typeof Ot=="function"&&Ot instanceof Ot&&typeof pe=="function"&&pe instanceof pe)&&(Xt=!1)}return k.delete(P),k.delete(b),Xt}Tt.exports=g},522:function(Tt,vt,d){var l=d(40151),R=d(19652),O=d(71152);function _(g){return O(R(g,void 0,l),g+"")}Tt.exports=_},12076:function(Tt,vt,d){var l=d(75635),R=d(58966),O=d(55451);function _(g){return l(g,O,R)}Tt.exports=_},22675:function(Tt,vt,d){var l=d(75635),R=d(66817),O=d(56730);function _(g){return l(g,O,R)}Tt.exports=_},10261:function(Tt,vt,d){var l=d(88411),R=d(55451);function O(_){for(var g=R(_),P=g.length;P--;){var b=g[P],A=_[b];g[P]=[b,A,l(A)]}return g}Tt.exports=O},58966:function(Tt,vt,d){var l=d(86952),R=d(4134),O=Object.prototype,_=O.propertyIsEnumerable,g=Object.getOwnPropertySymbols,P=g?function(b){return b==null?[]:(b=Object(b),l(g(b),function(A){return _.call(b,A)}))}:R;Tt.exports=P},66817:function(Tt,vt,d){var l=d(57095),R=d(49217),O=d(58966),_=d(4134),g=Object.getOwnPropertySymbols,P=g?function(b){for(var A=[];b;)l(A,O(b)),b=R(b);return A}:_;Tt.exports=P},66139:function(Tt,vt,d){var l=d(15584),R=d(40164),O=d(97288),_=d(23599),g=d(26873),P=d(86756),b=d(63256),A="[object Map]",I="[object Object]",x="[object Promise]",k="[object Set]",N="[object WeakMap]",et="[object DataView]",tt=b(l),Ct=b(R),ut=b(O),nt=b(_),kt=b(g),Nt=P;(l&&Nt(new l(new ArrayBuffer(1)))!=et||R&&Nt(new R)!=A||O&&Nt(O.resolve())!=x||_&&Nt(new _)!=k||g&&Nt(new g)!=N)&&(Nt=function(Bt){var Xt=P(Bt),wt=Xt==I?Bt.constructor:void 0,ot=wt?b(wt):"";if(ot)switch(ot){case tt:return et;case Ct:return A;case ut:return x;case nt:return k;case kt:return N}return Xt}),Tt.exports=Nt},63100:function(Tt,vt,d){var l=d(1186),R=d(13053),O=d(80744),_=d(70213),g=d(11156),P=d(9171);function b(A,I,x){I=l(I,A);for(var k=-1,N=I.length,et=!1;++k<N;){var tt=P(I[k]);if(!(et=A!=null&&x(A,tt)))break;A=A[tt]}return et||++k!=N?et:(N=A==null?0:A.length,!!N&&g(N)&&_(tt,N)&&(O(A)||R(A)))}Tt.exports=b},55015:function(Tt){var vt="\\ud800-\\udfff",d="\\u0300-\\u036f",l="\\ufe20-\\ufe2f",R="\\u20d0-\\u20ff",O=d+l+R,_="\\ufe0e\\ufe0f",g="\\u200d",P=RegExp("["+g+vt+O+_+"]");function b(A){return P.test(A)}Tt.exports=b},79264:function(Tt){var vt=Object.prototype,d=vt.hasOwnProperty;function l(R){var O=R.length,_=new R.constructor(O);return O&&typeof R[0]=="string"&&d.call(R,"index")&&(_.index=R.index,_.input=R.input),_}Tt.exports=l},97541:function(Tt,vt,d){var l=d(20188),R=d(27984),O=d(78583),_=d(28757),g=d(78358),P="[object Boolean]",b="[object Date]",A="[object Map]",I="[object Number]",x="[object RegExp]",k="[object Set]",N="[object String]",et="[object Symbol]",tt="[object ArrayBuffer]",Ct="[object DataView]",ut="[object Float32Array]",nt="[object Float64Array]",kt="[object Int8Array]",Nt="[object Int16Array]",Bt="[object Int32Array]",Xt="[object Uint8Array]",wt="[object Uint8ClampedArray]",ot="[object Uint16Array]",It="[object Uint32Array]";function zt(Ot,pe,xe){var qt=Ot.constructor;switch(pe){case tt:return l(Ot);case P:case b:return new qt(+Ot);case Ct:return R(Ot,xe);case ut:case nt:case kt:case Nt:case Bt:case Xt:case wt:case ot:case It:return g(Ot,xe);case A:return new qt;case I:case N:return new qt(Ot);case x:return O(Ot);case k:return new qt;case et:return _(Ot)}}Tt.exports=zt},88133:function(Tt,vt,d){var l=d(91869),R=d(13053),O=d(80744),_=l?l.isConcatSpreadable:void 0;function g(P){return O(P)||R(P)||!!(_&&P&&P[_])}Tt.exports=g},86773:function(Tt,vt,d){var l=d(80744),R=d(45029),O=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,_=/^\w*$/;function g(P,b){if(l(P))return!1;var A=typeof P;return A=="number"||A=="symbol"||A=="boolean"||P==null||R(P)?!0:_.test(P)||!O.test(P)||b!=null&&P in Object(b)}Tt.exports=g},88411:function(Tt,vt,d){var l=d(20816);function R(O){return O===O&&!l(O)}Tt.exports=R},83383:function(Tt){function vt(d){var l=-1,R=Array(d.size);return d.forEach(function(O,_){R[++l]=[_,O]}),R}Tt.exports=vt},24122:function(Tt){function vt(d,l){return function(R){return R==null?!1:R[d]===l&&(l!==void 0||d in Object(R))}}Tt.exports=vt},26332:function(Tt,vt,d){var l=d(52858),R=500;function O(_){var g=l(_,function(b){return P.size===R&&P.clear(),b}),P=g.cache;return g}Tt.exports=O},23730:function(Tt,vt,d){var l=d(31030),R=l(Object.keys,Object);Tt.exports=R},34776:function(Tt){var vt="__lodash_hash_undefined__";function d(l){return this.__data__.set(l,vt),this}Tt.exports=d},40393:function(Tt){function vt(d){return this.__data__.has(d)}Tt.exports=vt},79679:function(Tt){function vt(d){var l=-1,R=Array(d.size);return d.forEach(function(O){R[++l]=O}),R}Tt.exports=vt},49237:function(Tt){function vt(d,l,R){for(var O=R-1,_=d.length;++O<_;)if(d[O]===l)return O;return-1}Tt.exports=vt},29405:function(Tt,vt,d){var l=d(26539),R=d(55015),O=d(60844);function _(g){return R(g)?O(g):l(g)}Tt.exports=_},40493:function(Tt,vt,d){var l=d(26332),R=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,O=/\\(\\)?/g,_=l(function(g){var P=[];return g.charCodeAt(0)===46&&P.push(""),g.replace(R,function(b,A,I,x){P.push(I?x.replace(O,"$1"):A||b)}),P});Tt.exports=_},9171:function(Tt,vt,d){var l=d(45029),R=1/0;function O(_){if(typeof _=="string"||l(_))return _;var g=_+"";return g=="0"&&1/_==-R?"-0":g}Tt.exports=O},15333:function(Tt){var vt=/\s/;function d(l){for(var R=l.length;R--&&vt.test(l.charAt(R)););return R}Tt.exports=d},60844:function(Tt){var vt="\\ud800-\\udfff",d="\\u0300-\\u036f",l="\\ufe20-\\ufe2f",R="\\u20d0-\\u20ff",O=d+l+R,_="\\ufe0e\\ufe0f",g="["+vt+"]",P="["+O+"]",b="\\ud83c[\\udffb-\\udfff]",A="(?:"+P+"|"+b+")",I="[^"+vt+"]",x="(?:\\ud83c[\\udde6-\\uddff]){2}",k="[\\ud800-\\udbff][\\udc00-\\udfff]",N="\\u200d",et=A+"?",tt="["+_+"]?",Ct="(?:"+N+"(?:"+[I,x,k].join("|")+")"+tt+et+")*",ut=tt+et+Ct,nt="(?:"+[I+P+"?",P,x,k,g].join("|")+")",kt=RegExp(b+"(?="+b+")|"+nt+ut,"g");function Nt(Bt){for(var Xt=kt.lastIndex=0;kt.test(Bt);)++Xt;return Xt}Tt.exports=Nt},76833:function(Tt,vt,d){var l=d(99045),R=4;function O(_){return l(_,R)}Tt.exports=O},20250:function(Tt,vt,d){var l=d(99045),R=1,O=4;function _(g){return l(g,R|O)}Tt.exports=_},28548:function(Tt,vt,d){var l=d(92918),R=d(43607),O=d(8138),_=d(56730),g=Object.prototype,P=g.hasOwnProperty,b=l(function(A,I){A=Object(A);var x=-1,k=I.length,N=k>2?I[2]:void 0;for(N&&O(I[0],I[1],N)&&(k=1);++x<k;)for(var et=I[x],tt=_(et),Ct=-1,ut=tt.length;++Ct<ut;){var nt=tt[Ct],kt=A[nt];(kt===void 0||R(kt,g[nt])&&!P.call(A,nt))&&(A[nt]=et[nt])}return A});Tt.exports=b},76934:function(Tt,vt,d){Tt.exports=d(99204)},64725:function(Tt,vt,d){var l=d(86952),R=d(32872),O=d(95979),_=d(80744);function g(P,b){var A=_(P)?l:R;return A(P,O(b,3))}Tt.exports=g},79785:function(Tt,vt,d){var l=d(19554),R=d(9991),O=l(R);Tt.exports=O},9991:function(Tt,vt,d){var l=d(51533),R=d(95979),O=d(12824),_=Math.max;function g(P,b,A){var I=P==null?0:P.length;if(!I)return-1;var x=A==null?0:O(A);return x<0&&(x=_(I+x,0)),l(P,R(b,3),x)}Tt.exports=g},40151:function(Tt,vt,d){var l=d(9256);function R(O){var _=O==null?0:O.length;return _?l(O,1):[]}Tt.exports=R},99204:function(Tt,vt,d){var l=d(74809),R=d(44107),O=d(11756),_=d(80744);function g(P,b){var A=_(P)?l:R;return A(P,O(b))}Tt.exports=g},23190:function(Tt,vt,d){var l=d(14018),R=d(11756),O=d(56730);function _(g,P){return g==null?g:l(g,R(P),O)}Tt.exports=_},44231:function(Tt,vt,d){var l=d(89147);function R(O,_,g){var P=O==null?void 0:l(O,_);return P===void 0?g:P}Tt.exports=R},99946:function(Tt,vt,d){var l=d(3251),R=d(63100);function O(_,g){return _!=null&&R(_,g,l)}Tt.exports=O},37879:function(Tt,vt,d){var l=d(62348),R=d(63100);function O(_,g){return _!=null&&R(_,g,l)}Tt.exports=O},61627:function(Tt,vt,d){var l=d(6019),R=d(66139),O=d(13053),_=d(80744),g=d(24665),P=d(57835),b=d(7975),A=d(18397),I="[object Map]",x="[object Set]",k=Object.prototype,N=k.hasOwnProperty;function et(tt){if(tt==null)return!0;if(g(tt)&&(_(tt)||typeof tt=="string"||typeof tt.splice=="function"||P(tt)||A(tt)||O(tt)))return!tt.length;var Ct=R(tt);if(Ct==I||Ct==x)return!tt.size;if(b(tt))return!l(tt).length;for(var ut in tt)if(N.call(tt,ut))return!1;return!0}Tt.exports=et},41626:function(Tt,vt,d){var l=d(55005),R=d(38342),O=d(52495),_=O&&O.isMap,g=_?R(_):l;Tt.exports=g},65226:function(Tt,vt,d){var l=d(38652),R=d(38342),O=d(52495),_=O&&O.isSet,g=_?R(_):l;Tt.exports=g},7941:function(Tt,vt,d){var l=d(86756),R=d(80744),O=d(93913),_="[object String]";function g(P){return typeof P=="string"||!R(P)&&O(P)&&l(P)==_}Tt.exports=g},45029:function(Tt,vt,d){var l=d(86756),R=d(93913),O="[object Symbol]";function _(g){return typeof g=="symbol"||R(g)&&l(g)==O}Tt.exports=_},16513:function(Tt){function vt(d){return d===void 0}Tt.exports=vt},55451:function(Tt,vt,d){var l=d(63333),R=d(6019),O=d(24665);function _(g){return O(g)?l(g):R(g)}Tt.exports=_},10611:function(Tt){function vt(d){var l=d==null?0:d.length;return l?d[l-1]:void 0}Tt.exports=vt},9924:function(Tt,vt,d){var l=d(75010),R=d(95979),O=d(65487),_=d(80744);function g(P,b){var A=_(P)?l:O;return A(P,R(b,3))}Tt.exports=g},70642:function(Tt,vt,d){var l=d(42813),R=d(85605),O=d(95979);function _(g,P){var b={};return P=O(P,3),R(g,function(A,I,x){l(b,I,P(A,I,x))}),b}Tt.exports=_},95987:function(Tt,vt,d){var l=d(2659),R=d(40302),O=d(46962);function _(g){return g&&g.length?l(g,O,R):void 0}Tt.exports=_},52858:function(Tt,vt,d){var l=d(52166),R="Expected a function";function O(_,g){if(typeof _!="function"||g!=null&&typeof g!="function")throw new TypeError(R);var P=function(){var b=arguments,A=g?g.apply(this,b):b[0],I=P.cache;if(I.has(A))return I.get(A);var x=_.apply(this,b);return P.cache=I.set(A,x)||I,x};return P.cache=new(O.Cache||l),P}O.Cache=l,Tt.exports=O},73376:function(Tt,vt,d){var l=d(2659),R=d(93757),O=d(46962);function _(g){return g&&g.length?l(g,O,R):void 0}Tt.exports=_},83296:function(Tt,vt,d){var l=d(2659),R=d(95979),O=d(93757);function _(g,P){return g&&g.length?l(g,R(P,2),O):void 0}Tt.exports=_},9958:function(Tt){function vt(){}Tt.exports=vt},5795:function(Tt,vt,d){var l=d(33152),R=function(){return l.Date.now()};Tt.exports=R},89409:function(Tt,vt,d){var l=d(88832),R=d(522),O=R(function(_,g){return _==null?{}:l(_,g)});Tt.exports=O},35769:function(Tt,vt,d){var l=d(22310),R=d(96916),O=d(86773),_=d(9171);function g(P){return O(P)?l(_(P)):R(P)}Tt.exports=g},60859:function(Tt,vt,d){var l=d(76106),R=l();Tt.exports=R},16473:function(Tt,vt,d){var l=d(99861),R=d(44107),O=d(95979),_=d(30739),g=d(80744);function P(b,A,I){var x=g(b)?l:_,k=arguments.length<3;return x(b,O(A,4),I,k,R)}Tt.exports=P},40617:function(Tt,vt,d){var l=d(6019),R=d(66139),O=d(24665),_=d(7941),g=d(29405),P="[object Map]",b="[object Set]";function A(I){if(I==null)return 0;if(O(I))return _(I)?g(I):I.length;var x=R(I);return x==P||x==b?I.size:l(I).length}Tt.exports=A},351:function(Tt,vt,d){var l=d(9256),R=d(58506),O=d(92918),_=d(8138),g=O(function(P,b){if(P==null)return[];var A=b.length;return A>1&&_(P,b[0],b[1])?b=[]:A>2&&_(b[0],b[1],b[2])&&(b=[b[0]]),R(P,l(b,1),[])});Tt.exports=g},4134:function(Tt){function vt(){return[]}Tt.exports=vt},97341:function(Tt,vt,d){var l=d(59406),R=1/0,O=17976931348623157e292;function _(g){if(!g)return g===0?g:0;if(g=l(g),g===R||g===-R){var P=g<0?-1:1;return P*O}return g===g?g:0}Tt.exports=_},12824:function(Tt,vt,d){var l=d(97341);function R(O){var _=l(O),g=_%1;return _===_?g?_-g:_:0}Tt.exports=R},59406:function(Tt,vt,d){var l=d(13927),R=d(20816),O=d(45029),_=NaN,g=/^[-+]0x[0-9a-f]+$/i,P=/^0b[01]+$/i,b=/^0o[0-7]+$/i,A=parseInt;function I(x){if(typeof x=="number")return x;if(O(x))return _;if(R(x)){var k=typeof x.valueOf=="function"?x.valueOf():x;x=R(k)?k+"":k}if(typeof x!="string")return x===0?x:+x;x=l(x);var N=P.test(x);return N||b.test(x)?A(x.slice(2),N?2:8):g.test(x)?_:+x}Tt.exports=I},44140:function(Tt,vt,d){var l=d(50230);function R(O){return O==null?"":l(O)}Tt.exports=R},91116:function(Tt,vt,d){var l=d(74809),R=d(35024),O=d(85605),_=d(95979),g=d(49217),P=d(80744),b=d(57835),A=d(9363),I=d(20816),x=d(18397);function k(N,et,tt){var Ct=P(N),ut=Ct||b(N)||x(N);if(et=_(et,4),tt==null){var nt=N&&N.constructor;ut?tt=Ct?new nt:[]:I(N)?tt=A(nt)?R(g(N)):{}:tt={}}return(ut?l:O)(N,function(kt,Nt,Bt){return et(tt,kt,Nt,Bt)}),tt}Tt.exports=k},44065:function(Tt,vt,d){var l=d(9256),R=d(92918),O=d(29098),_=d(41590),g=R(function(P){return O(l(P,1,_,!0))});Tt.exports=g},95708:function(Tt,vt,d){var l=d(44140),R=0;function O(_){var g=++R;return l(_)+g}Tt.exports=O},81229:function(Tt,vt,d){var l=d(20720),R=d(55451);function O(_){return _==null?[]:l(_,R(_))}Tt.exports=O},92993:function(Tt,vt,d){var l=d(60348),R=d(94484);function O(_,g){return R(_||[],g||[],l)}Tt.exports=O},34402:function(Tt,vt,d){"use strict";d.r(vt),d.d(vt,{default:function(){return _}});var l=d(34634);function R(g){var P=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(!(0,l.isAnyArray)(g))throw new TypeError("input must be an array");if(g.length===0)throw new TypeError("input must not be empty");var b=P.fromIndex,A=b===void 0?0:b,I=P.toIndex,x=I===void 0?g.length:I;if(A<0||A>=g.length||!Number.isInteger(A))throw new Error("fromIndex must be a positive integer smaller than length");if(x<=A||x>g.length||!Number.isInteger(x))throw new Error("toIndex must be an integer greater than fromIndex and at most equal to length");for(var k=g[A],N=A+1;N<x;N++)g[N]>k&&(k=g[N]);return k}function O(g){var P=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(!(0,l.isAnyArray)(g))throw new TypeError("input must be an array");if(g.length===0)throw new TypeError("input must not be empty");var b=P.fromIndex,A=b===void 0?0:b,I=P.toIndex,x=I===void 0?g.length:I;if(A<0||A>=g.length||!Number.isInteger(A))throw new Error("fromIndex must be a positive integer smaller than length");if(x<=A||x>g.length||!Number.isInteger(x))throw new Error("toIndex must be an integer greater than fromIndex and at most equal to length");for(var k=g[A],N=A+1;N<x;N++)g[N]<k&&(k=g[N]);return k}function _(g){var P=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if((0,l.isAnyArray)(g)){if(g.length===0)throw new TypeError("input must not be empty")}else throw new TypeError("input must be an array");var b;if(P.output!==void 0){if(!(0,l.isAnyArray)(P.output))throw new TypeError("output option must be an array if specified");b=P.output}else b=new Array(g.length);var A=O(g),I=R(g);if(A===I)throw new RangeError("minimum and maximum input values are equal. Cannot rescale a constant array");var x=P.min,k=x===void 0?P.autoMinMax?A:0:x,N=P.max,et=N===void 0?P.autoMinMax?I:1:N;if(k>=et)throw new RangeError("min option must be smaller than max option");for(var tt=(et-k)/(I-A),Ct=0;Ct<g.length;Ct++)b[Ct]=(g[Ct]-A)*tt+k;return b}},5630:function(Tt,vt,d){"use strict";var l=d(54476),R=d(33885),O=d(20068),_=d(42978),g=d(75931),P=d(92310),b=d.n(P),A=d(18929),I=d(59301),x=["prefixCls","className","style","checked","disabled","defaultChecked","type","title","onChange"],k=(0,I.forwardRef)(function(N,et){var tt,Ct=N.prefixCls,ut=Ct===void 0?"rc-checkbox":Ct,nt=N.className,kt=N.style,Nt=N.checked,Bt=N.disabled,Xt=N.defaultChecked,wt=Xt===void 0?!1:Xt,ot=N.type,It=ot===void 0?"checkbox":ot,zt=N.title,Ot=N.onChange,pe=(0,g.Z)(N,x),xe=(0,I.useRef)(null),qt=(0,A.Z)(wt,{value:Nt}),Ye=(0,_.Z)(qt,2),We=Ye[0],Oe=Ye[1];(0,I.useImperativeHandle)(et,function(){return{focus:function(){var Me;(Me=xe.current)===null||Me===void 0||Me.focus()},blur:function(){var Me;(Me=xe.current)===null||Me===void 0||Me.blur()},input:xe.current}});var Qe=b()(ut,nt,(tt={},(0,O.Z)(tt,"".concat(ut,"-checked"),We),(0,O.Z)(tt,"".concat(ut,"-disabled"),Bt),tt)),Mt=function(Me){Bt||("checked"in N||Oe(Me.target.checked),Ot==null||Ot({target:(0,R.Z)((0,R.Z)({},N),{},{type:It,checked:Me.target.checked}),stopPropagation:function(){Me.stopPropagation()},preventDefault:function(){Me.preventDefault()},nativeEvent:Me.nativeEvent}))};return I.createElement("span",{className:Qe,title:zt,style:kt},I.createElement("input",(0,l.Z)({},pe,{className:"".concat(ut,"-input"),ref:xe,onChange:Mt,disabled:Bt,checked:!!We,type:It})),I.createElement("span",{className:"".concat(ut,"-inner")}))});vt.Z=k},93681:function(Tt,vt,d){"use strict";d.r(vt),d.d(vt,{BaseInput:function(){return x},default:function(){return Nt}});var l=d(54476),R=d(33885),O=d(20068),_=d(76190),g=d(92310),P=d.n(g),b=d(59301),A=d(5643),I=function(Xt){var wt,ot,It=Xt.inputElement,zt=Xt.prefixCls,Ot=Xt.prefix,pe=Xt.suffix,xe=Xt.addonBefore,qt=Xt.addonAfter,Ye=Xt.className,We=Xt.style,Oe=Xt.disabled,Qe=Xt.readOnly,Mt=Xt.focused,ne=Xt.triggerFocus,Me=Xt.allowClear,nn=Xt.value,le=Xt.handleReset,be=Xt.hidden,De=Xt.classes,Yt=Xt.classNames,re=Xt.dataAttrs,xt=Xt.styles,at=Xt.components,se=(at==null?void 0:at.affixWrapper)||"span",Fe=(at==null?void 0:at.groupWrapper)||"span",Re=(at==null?void 0:at.wrapper)||"span",ge=(at==null?void 0:at.groupAddon)||"span",Ie=(0,b.useRef)(null),Ne=function(X){var Pt;(Pt=Ie.current)!==null&&Pt!==void 0&&Pt.contains(X.target)&&(ne==null||ne())},bt=function(){var X;if(!Me)return null;var Pt=!Oe&&!Qe&&nn,At="".concat(zt,"-clear-icon"),Rt=(0,_.Z)(Me)==="object"&&Me!==null&&Me!==void 0&&Me.clearIcon?Me.clearIcon:"\u2716";return b.createElement("span",{onClick:le,onMouseDown:function(Vt){return Vt.preventDefault()},className:P()(At,(X={},(0,O.Z)(X,"".concat(At,"-hidden"),!Pt),(0,O.Z)(X,"".concat(At,"-has-suffix"),!!pe),X)),role:"button",tabIndex:-1},Rt)},Jt=(0,b.cloneElement)(It,{value:nn,hidden:be,className:P()((wt=It.props)===null||wt===void 0?void 0:wt.className,!(0,A.X3)(Xt)&&!(0,A.He)(Xt)&&Ye)||null,style:(0,R.Z)((0,R.Z)({},(ot=It.props)===null||ot===void 0?void 0:ot.style),!(0,A.X3)(Xt)&&!(0,A.He)(Xt)?We:{})});if((0,A.X3)(Xt)){var oe,M="".concat(zt,"-affix-wrapper"),Q=P()(M,(oe={},(0,O.Z)(oe,"".concat(M,"-disabled"),Oe),(0,O.Z)(oe,"".concat(M,"-focused"),Mt),(0,O.Z)(oe,"".concat(M,"-readonly"),Qe),(0,O.Z)(oe,"".concat(M,"-input-with-clear-btn"),pe&&Me&&nn),oe),!(0,A.He)(Xt)&&Ye,De==null?void 0:De.affixWrapper,Yt==null?void 0:Yt.affixWrapper),te=(pe||Me)&&b.createElement("span",{className:P()("".concat(zt,"-suffix"),Yt==null?void 0:Yt.suffix),style:xt==null?void 0:xt.suffix},bt(),pe);Jt=b.createElement(se,(0,l.Z)({className:Q,style:(0,R.Z)((0,R.Z)({},(0,A.He)(Xt)?void 0:We),xt==null?void 0:xt.affixWrapper),hidden:!(0,A.He)(Xt)&&be,onClick:Ne},re==null?void 0:re.affixWrapper,{ref:Ie}),Ot&&b.createElement("span",{className:P()("".concat(zt,"-prefix"),Yt==null?void 0:Yt.prefix),style:xt==null?void 0:xt.prefix},Ot),(0,b.cloneElement)(It,{value:nn,hidden:null}),te)}if((0,A.He)(Xt)){var Ut="".concat(zt,"-group"),we="".concat(Ut,"-addon"),Ce=P()("".concat(zt,"-wrapper"),Ut,De==null?void 0:De.wrapper),_e=P()("".concat(zt,"-group-wrapper"),Ye,De==null?void 0:De.group);return b.createElement(Fe,{className:_e,style:We,hidden:be},b.createElement(Re,{className:Ce},xe&&b.createElement(ge,{className:we},xe),(0,b.cloneElement)(Jt,{hidden:null}),qt&&b.createElement(ge,{className:we},qt)))}return Jt},x=I,k=d(94480),N=d(42978),et=d(75931),tt=d(18929),Ct=d(2738),ut=["autoComplete","onChange","onFocus","onBlur","onPressEnter","onKeyDown","prefixCls","disabled","htmlSize","className","maxLength","suffix","showCount","type","classes","classNames","styles"],nt=(0,b.forwardRef)(function(Bt,Xt){var wt=Bt.autoComplete,ot=Bt.onChange,It=Bt.onFocus,zt=Bt.onBlur,Ot=Bt.onPressEnter,pe=Bt.onKeyDown,xe=Bt.prefixCls,qt=xe===void 0?"rc-input":xe,Ye=Bt.disabled,We=Bt.htmlSize,Oe=Bt.className,Qe=Bt.maxLength,Mt=Bt.suffix,ne=Bt.showCount,Me=Bt.type,nn=Me===void 0?"text":Me,le=Bt.classes,be=Bt.classNames,De=Bt.styles,Yt=(0,et.Z)(Bt,ut),re=(0,tt.Z)(Bt.defaultValue,{value:Bt.value}),xt=(0,N.Z)(re,2),at=xt[0],se=xt[1],Fe=(0,b.useState)(!1),Re=(0,N.Z)(Fe,2),ge=Re[0],Ie=Re[1],Ne=(0,b.useRef)(null),bt=function(_e){Ne.current&&(0,A.nH)(Ne.current,_e)};(0,b.useImperativeHandle)(Xt,function(){return{focus:bt,blur:function(){var _e;(_e=Ne.current)===null||_e===void 0||_e.blur()},setSelectionRange:function(_e,mt,X){var Pt;(Pt=Ne.current)===null||Pt===void 0||Pt.setSelectionRange(_e,mt,X)},select:function(){var _e;(_e=Ne.current)===null||_e===void 0||_e.select()},input:Ne.current}}),(0,b.useEffect)(function(){Ie(function(Ce){return Ce&&Ye?!1:Ce})},[Ye]);var Jt=function(_e){Bt.value===void 0&&se(_e.target.value),Ne.current&&(0,A.rJ)(Ne.current,_e,ot)},oe=function(_e){Ot&&_e.key==="Enter"&&Ot(_e),pe==null||pe(_e)},M=function(_e){Ie(!0),It==null||It(_e)},Q=function(_e){Ie(!1),zt==null||zt(_e)},te=function(_e){se(""),bt(),Ne.current&&(0,A.rJ)(Ne.current,_e,ot)},Ut=function(){var _e=(0,Ct.Z)(Bt,["prefixCls","onPressEnter","addonBefore","addonAfter","prefix","suffix","allowClear","defaultValue","showCount","classes","htmlSize","styles","classNames"]);return b.createElement("input",(0,l.Z)({autoComplete:wt},_e,{onChange:Jt,onFocus:M,onBlur:Q,onKeyDown:oe,className:P()(qt,(0,O.Z)({},"".concat(qt,"-disabled"),Ye),be==null?void 0:be.input),style:De==null?void 0:De.input,ref:Ne,size:We,type:nn}))},we=function(){var _e=Number(Qe)>0;if(Mt||ne){var mt=(0,A.D7)(at),X=(0,k.Z)(mt).length,Pt=(0,_.Z)(ne)==="object"?ne.formatter({value:mt,count:X,maxLength:Qe}):"".concat(X).concat(_e?" / ".concat(Qe):"");return b.createElement(b.Fragment,null,!!ne&&b.createElement("span",{className:P()("".concat(qt,"-show-count-suffix"),(0,O.Z)({},"".concat(qt,"-show-count-has-suffix"),!!Mt),be==null?void 0:be.count),style:(0,R.Z)({},De==null?void 0:De.count)},Pt),Mt)}return null};return b.createElement(x,(0,l.Z)({},Yt,{prefixCls:qt,className:Oe,inputElement:Ut(),handleReset:te,value:(0,A.D7)(at),focused:ge,triggerFocus:bt,suffix:we(),disabled:Ye,classes:le,classNames:be,styles:De}))}),kt=nt,Nt=kt},5643:function(Tt,vt,d){"use strict";d.d(vt,{D7:function(){return g},He:function(){return l},X3:function(){return R},nH:function(){return _},rJ:function(){return O}});function l(P){return!!(P.addonBefore||P.addonAfter)}function R(P){return!!(P.prefix||P.suffix||P.allowClear)}function O(P,b,A,I){if(A){var x=b;if(b.type==="click"){var k=P.cloneNode(!0);x=Object.create(b,{target:{value:k},currentTarget:{value:k}}),k.value="",A(x);return}if(I!==void 0){x=Object.create(b,{target:{value:P},currentTarget:{value:P}}),P.value=I,A(x);return}A(x)}}function _(P,b){if(P){P.focus(b);var A=b||{},I=A.cursor;if(I){var x=P.value.length;switch(I){case"start":P.setSelectionRange(0,0);break;case"end":P.setSelectionRange(x,x);break;default:P.setSelectionRange(0,x)}}}}function g(P){return typeof P=="undefined"||P===null?"":String(P)}},83836:function(Tt,vt,d){"use strict";d.d(vt,{Z:function(){return ne}});var l=d(54476),R=d(33885),O=d(42978),_=d(75931),g=d(59301),P=d(92310),b=d.n(P),A=d(29301),I=d(34280),x=["prefixCls","invalidate","item","renderItem","responsive","responsiveDisabled","registerSize","itemKey","className","style","children","display","order","component"],k=void 0;function N(Me,nn){var le=Me.prefixCls,be=Me.invalidate,De=Me.item,Yt=Me.renderItem,re=Me.responsive,xt=Me.responsiveDisabled,at=Me.registerSize,se=Me.itemKey,Fe=Me.className,Re=Me.style,ge=Me.children,Ie=Me.display,Ne=Me.order,bt=Me.component,Jt=bt===void 0?"div":bt,oe=(0,_.Z)(Me,x),M=re&&!Ie;function Q(_e){at(se,_e)}g.useEffect(function(){return function(){Q(null)}},[]);var te=Yt&&De!==k?Yt(De,{index:Ne}):ge,Ut;be||(Ut={opacity:M?0:1,height:M?0:k,overflowY:M?"hidden":k,order:re?Ne:k,pointerEvents:M?"none":k,position:M?"absolute":k});var we={};M&&(we["aria-hidden"]=!0);var Ce=g.createElement(Jt,(0,l.Z)({className:b()(!be&&le,Fe),style:(0,R.Z)((0,R.Z)({},Ut),Re)},we,oe,{ref:nn}),te);return re&&(Ce=g.createElement(A.Z,{onResize:function(mt){var X=mt.offsetWidth;Q(X)},disabled:xt},Ce)),Ce}var et=g.forwardRef(N);et.displayName="Item";var tt=et,Ct=d(6089),ut=d(4676),nt=d(16089);function kt(Me){if(typeof MessageChannel=="undefined")(0,nt.Z)(Me);else{var nn=new MessageChannel;nn.port1.onmessage=function(){return Me()},nn.port2.postMessage(void 0)}}function Nt(){var Me=g.useRef(null),nn=function(be){Me.current||(Me.current=[],kt(function(){(0,ut.unstable_batchedUpdates)(function(){Me.current.forEach(function(De){De()}),Me.current=null})})),Me.current.push(be)};return nn}function Bt(Me,nn){var le=g.useState(nn),be=(0,O.Z)(le,2),De=be[0],Yt=be[1],re=(0,Ct.Z)(function(xt){Me(function(){Yt(xt)})});return[De,re]}var Xt=g.createContext(null),wt=["component"],ot=["className"],It=["className"],zt=function(nn,le){var be=g.useContext(Xt);if(!be){var De=nn.component,Yt=De===void 0?"div":De,re=(0,_.Z)(nn,wt);return g.createElement(Yt,(0,l.Z)({},re,{ref:le}))}var xt=be.className,at=(0,_.Z)(be,ot),se=nn.className,Fe=(0,_.Z)(nn,It);return g.createElement(Xt.Provider,{value:null},g.createElement(tt,(0,l.Z)({ref:le,className:b()(xt,se)},at,Fe)))},Ot=g.forwardRef(zt);Ot.displayName="RawItem";var pe=Ot,xe=["prefixCls","data","renderItem","renderRawItem","itemKey","itemWidth","ssr","style","className","maxCount","renderRest","renderRawRest","prefix","suffix","component","itemComponent","onVisibleChange"],qt="responsive",Ye="invalidate";function We(Me){return"+ ".concat(Me.length," ...")}function Oe(Me,nn){var le=Me.prefixCls,be=le===void 0?"rc-overflow":le,De=Me.data,Yt=De===void 0?[]:De,re=Me.renderItem,xt=Me.renderRawItem,at=Me.itemKey,se=Me.itemWidth,Fe=se===void 0?10:se,Re=Me.ssr,ge=Me.style,Ie=Me.className,Ne=Me.maxCount,bt=Me.renderRest,Jt=Me.renderRawRest,oe=Me.prefix,M=Me.suffix,Q=Me.component,te=Q===void 0?"div":Q,Ut=Me.itemComponent,we=Me.onVisibleChange,Ce=(0,_.Z)(Me,xe),_e=Re==="full",mt=Nt(),X=Bt(mt,null),Pt=(0,O.Z)(X,2),At=Pt[0],Rt=Pt[1],_t=At||0,Vt=Bt(mt,new Map),ae=(0,O.Z)(Vt,2),fe=ae[0],me=ae[1],Ze=Bt(mt,0),Ge=(0,O.Z)(Ze,2),Ve=Ge[0],rn=Ge[1],wn=Bt(mt,0),on=(0,O.Z)(wn,2),_n=on[0],Cn=on[1],Ln=Bt(mt,0),En=(0,O.Z)(Ln,2),cr=En[0],Bn=En[1],br=Bt(mt,0),fr=(0,O.Z)(br,2),Zr=fr[0],di=fr[1],Xr=(0,g.useState)(null),Mr=(0,O.Z)(Xr,2),gi=Mr[0],yi=Mr[1],_i=(0,g.useState)(null),qr=(0,O.Z)(_i,2),Jn=qr[0],sn=qr[1],Wt=g.useMemo(function(){return Jn===null&&_e?Number.MAX_SAFE_INTEGER:Jn||0},[Jn,At]),y=(0,g.useState)(!1),E=(0,O.Z)(y,2),c=E[0],f=E[1],w="".concat(be,"-item"),Z=Math.max(Ve,_n),z=Ne===qt,H=Yt.length&&z,q=Ne===Ye,Dt=H||typeof Ne=="number"&&Yt.length>Ne,U=(0,g.useMemo)(function(){var en=Yt;return H?At===null&&_e?en=Yt:en=Yt.slice(0,Math.min(Yt.length,_t/Fe)):typeof Ne=="number"&&(en=Yt.slice(0,Ne)),en},[Yt,Fe,At,Ne,H]),Y=(0,g.useMemo)(function(){return H?Yt.slice(Wt+1):Yt.slice(U.length)},[Yt,U,H,Wt]),G=(0,g.useCallback)(function(en,un){var mn;return typeof at=="function"?at(en):(mn=at&&(en==null?void 0:en[at]))!==null&&mn!==void 0?mn:un},[at]),J=(0,g.useCallback)(re||function(en){return en},[re]);function pt(en,un,mn){Jn===en&&(un===void 0||un===gi)||(sn(en),mn||(f(en<Yt.length-1),we==null||we(en)),un!==void 0&&yi(un))}function Kt(en,un){Rt(un.clientWidth)}function yt(en,un){me(function(mn){var Sn=new Map(mn);return un===null?Sn.delete(en):Sn.set(en,un),Sn})}function Qt(en,un){Cn(un),rn(_n)}function ct(en,un){Bn(un)}function ht(en,un){di(un)}function rt(en){return fe.get(G(U[en],en))}(0,I.Z)(function(){if(_t&&typeof Z=="number"&&U){var en=cr+Zr,un=U.length,mn=un-1;if(!un){pt(0,null);return}for(var Sn=0;Sn<un;Sn+=1){var Pn=rt(Sn);if(_e&&(Pn=Pn||0),Pn===void 0){pt(Sn-1,void 0,!0);break}if(en+=Pn,mn===0&&en<=_t||Sn===mn-1&&en+rt(mn)<=_t){pt(mn,null);break}else if(en+Z>_t){pt(Sn-1,en-Pn-Zr+_n);break}}M&&rt(0)+Zr>_t&&yi(null)}},[_t,fe,_n,cr,Zr,G,U]);var $t=c&&!!Y.length,Ht={};gi!==null&&H&&(Ht={position:"absolute",left:gi,top:0});var ue={prefixCls:w,responsive:H,component:Ut,invalidate:q},Ee=xt?function(en,un){var mn=G(en,un);return g.createElement(Xt.Provider,{key:mn,value:(0,R.Z)((0,R.Z)({},ue),{},{order:un,item:en,itemKey:mn,registerSize:yt,display:un<=Wt})},xt(en,un))}:function(en,un){var mn=G(en,un);return g.createElement(tt,(0,l.Z)({},ue,{order:un,key:mn,item:en,renderItem:J,itemKey:mn,registerSize:yt,display:un<=Wt}))},ie={order:$t?Wt:Number.MAX_SAFE_INTEGER,className:"".concat(w,"-rest"),registerSize:Qt,display:$t},Pe=bt||We,Be=Jt?g.createElement(Xt.Provider,{value:(0,R.Z)((0,R.Z)({},ue),ie)},Jt(Y)):g.createElement(tt,(0,l.Z)({},ue,ie),typeof Pe=="function"?Pe(Y):Pe),He=g.createElement(te,(0,l.Z)({className:b()(!q&&be,Ie),style:ge,ref:nn},Ce),oe&&g.createElement(tt,(0,l.Z)({},ue,{responsive:z,responsiveDisabled:!H,order:-1,className:"".concat(w,"-prefix"),registerSize:ct,display:!0}),oe),U.map(Ee),Dt?Be:null,M&&g.createElement(tt,(0,l.Z)({},ue,{responsive:z,responsiveDisabled:!H,order:Wt,className:"".concat(w,"-suffix"),registerSize:ht,display:!0,style:Ht}),M));return z?g.createElement(A.Z,{onResize:Kt,disabled:!H},He):He}var Qe=g.forwardRef(Oe);Qe.displayName="Overflow",Qe.Item=pe,Qe.RESPONSIVE=qt,Qe.INVALIDATE=Ye;var Mt=Qe,ne=Mt},17115:function(Tt,vt,d){"use strict";d.d(vt,{ZP:function(){return b}});var l=d(42978),R=d(59301),O=d(47273),_=0,g=(0,O.Z)();function P(){var A;return g?(A=_,_+=1):A="TEST_OR_SSR",A}function b(A){var I=R.useState(),x=(0,l.Z)(I,2),k=x[0],N=x[1];return R.useEffect(function(){N("rc_select_".concat(P()))},[]),A||k}},77861:function(Tt,vt,d){"use strict";d.d(vt,{Ac:function(){return At},Xo:function(){return _n},Wx:function(){return Ln},ZP:function(){return w},lk:function(){return Xt}});var l=d(54476),R=d(94480),O=d(20068),_=d(33885),g=d(42978),P=d(75931),b=d(76190),A=d(18929),I=d(48736),x=d(59301),k=d(92310),N=d.n(k),et=d(34280),tt=d(49658),Ct=d(10228),ut=d(8654),nt=function(z){var H=z.className,q=z.customizeIcon,Dt=z.customizeIconProps,U=z.onMouseDown,Y=z.onClick,G=z.children,J;return typeof q=="function"?J=q(Dt):J=q,x.createElement("span",{className:H,onMouseDown:function(Kt){Kt.preventDefault(),U&&U(Kt)},style:{userSelect:"none",WebkitUserSelect:"none"},unselectable:"on",onClick:Y,"aria-hidden":!0},J!==void 0?J:x.createElement("span",{className:N()(H.split(/\s+/).map(function(pt){return"".concat(pt,"-icon")}))},G))},kt=nt;function Nt(Z,z,H,q,Dt){var U=arguments.length>5&&arguments[5]!==void 0?arguments[5]:!1,Y=arguments.length>6?arguments[6]:void 0,G=arguments.length>7?arguments[7]:void 0,J=x.useMemo(function(){if((0,b.Z)(q)==="object")return q.clearIcon;if(Dt)return Dt},[q,Dt]),pt=x.useMemo(function(){return!!(!U&&q&&(H.length||Y)&&!(G==="combobox"&&Y===""))},[q,U,H.length,Y,G]);return{allowClear:pt,clearIcon:x.createElement(kt,{className:"".concat(Z,"-clear"),onMouseDown:z,customizeIcon:J},"\xD7")}}var Bt=x.createContext(null);function Xt(){return x.useContext(Bt)}function wt(){var Z=arguments.length>0&&arguments[0]!==void 0?arguments[0]:10,z=x.useState(!1),H=(0,g.Z)(z,2),q=H[0],Dt=H[1],U=x.useRef(null),Y=function(){window.clearTimeout(U.current)};x.useEffect(function(){return Y},[]);var G=function(pt,Kt){Y(),U.current=window.setTimeout(function(){Dt(pt),Kt&&Kt()},Z)};return[q,G,Y]}function ot(){var Z=arguments.length>0&&arguments[0]!==void 0?arguments[0]:250,z=x.useRef(null),H=x.useRef(null);x.useEffect(function(){return function(){window.clearTimeout(H.current)}},[]);function q(Dt){(Dt||z.current===null)&&(z.current=Dt),window.clearTimeout(H.current),H.current=window.setTimeout(function(){z.current=null},Z)}return[function(){return z.current},q]}function It(Z,z,H,q){var Dt=x.useRef(null);Dt.current={open:z,triggerOpen:H,customizedTrigger:q},x.useEffect(function(){function U(Y){var G;if(!((G=Dt.current)!==null&&G!==void 0&&G.customizedTrigger)){var J=Y.target;J.shadowRoot&&Y.composed&&(J=Y.composedPath()[0]||J),Dt.current.open&&Z().filter(function(pt){return pt}).every(function(pt){return!pt.contains(J)&&pt!==J})&&Dt.current.triggerOpen(!1)}}return window.addEventListener("mousedown",U),function(){return window.removeEventListener("mousedown",U)}},[])}var zt=d(26112),Ot=d(83836),pe=function(z,H){var q,Dt,U=z.prefixCls,Y=z.id,G=z.inputElement,J=z.disabled,pt=z.tabIndex,Kt=z.autoFocus,yt=z.autoComplete,Qt=z.editable,ct=z.activeDescendantId,ht=z.value,rt=z.maxLength,$t=z.onKeyDown,Ht=z.onMouseDown,ue=z.onChange,Ee=z.onPaste,ie=z.onCompositionStart,Pe=z.onCompositionEnd,Be=z.open,He=z.attrs,en=G||x.createElement("input",null),un=en,mn=un.ref,Sn=un.props,Pn=Sn.onKeyDown,$n=Sn.onChange,Wn=Sn.onMouseDown,Xn=Sn.onCompositionStart,An=Sn.onCompositionEnd,Zn=Sn.style;return(0,I.Kp)(!("maxLength"in en.props),"Passing 'maxLength' to input element directly may not work because input in BaseSelect is controlled."),en=x.cloneElement(en,(0,_.Z)((0,_.Z)((0,_.Z)({type:"search"},Sn),{},{id:Y,ref:(0,ut.sQ)(H,mn),disabled:J,tabIndex:pt,autoComplete:yt||"off",autoFocus:Kt,className:N()("".concat(U,"-selection-search-input"),(q=en)===null||q===void 0||(Dt=q.props)===null||Dt===void 0?void 0:Dt.className),role:"combobox","aria-label":"Search","aria-expanded":Be||!1,"aria-haspopup":"listbox","aria-owns":"".concat(Y,"_list"),"aria-autocomplete":"list","aria-controls":"".concat(Y,"_list"),"aria-activedescendant":Be?ct:void 0},He),{},{value:Qt?ht:"",maxLength:rt,readOnly:!Qt,unselectable:Qt?null:"on",style:(0,_.Z)((0,_.Z)({},Zn),{},{opacity:Qt?null:0}),onKeyDown:function(er){$t(er),Pn&&Pn(er)},onMouseDown:function(er){Ht(er),Wn&&Wn(er)},onChange:function(er){ue(er),$n&&$n(er)},onCompositionStart:function(er){ie(er),Xn&&Xn(er)},onCompositionEnd:function(er){Pe(er),An&&An(er)},onPaste:Ee})),en},xe=x.forwardRef(pe);xe.displayName="Input";var qt=xe;function Ye(Z){return Array.isArray(Z)?Z:Z!==void 0?[Z]:[]}var We=typeof window!="undefined"&&window.document&&window.document.documentElement,Oe=We;function Qe(Z){return Z!=null}function Mt(Z){return!Z&&Z!==0}function ne(Z){return["string","number"].includes((0,b.Z)(Z))}function Me(Z){var z=void 0;return Z&&(ne(Z.title)?z=Z.title.toString():ne(Z.label)&&(z=Z.label.toString())),z}function nn(Z,z){Oe?x.useLayoutEffect(Z,z):x.useEffect(Z,z)}function le(Z){var z;return(z=Z.key)!==null&&z!==void 0?z:Z.value}var be=function(z){z.preventDefault(),z.stopPropagation()},De=function(z){var H=z.id,q=z.prefixCls,Dt=z.values,U=z.open,Y=z.searchValue,G=z.autoClearSearchValue,J=z.inputRef,pt=z.placeholder,Kt=z.disabled,yt=z.mode,Qt=z.showSearch,ct=z.autoFocus,ht=z.autoComplete,rt=z.activeDescendantId,$t=z.tabIndex,Ht=z.removeIcon,ue=z.maxTagCount,Ee=z.maxTagTextLength,ie=z.maxTagPlaceholder,Pe=ie===void 0?function(pi){return"+ ".concat(pi.length," ...")}:ie,Be=z.tagRender,He=z.onToggleOpen,en=z.onRemove,un=z.onInputChange,mn=z.onInputPaste,Sn=z.onInputKeyDown,Pn=z.onInputMouseDown,$n=z.onInputCompositionStart,Wn=z.onInputCompositionEnd,Xn=x.useRef(null),An=(0,x.useState)(0),Zn=(0,g.Z)(An,2),qn=Zn[0],er=Zn[1],Cr=(0,x.useState)(!1),Un=(0,g.Z)(Cr,2),ar=Un[0],ii=Un[1],Or="".concat(q,"-selection"),Lr=U||yt==="multiple"&&G===!1||yt==="tags"?Y:"",fi=yt==="tags"||yt==="multiple"&&G===!1||Qt&&(U||ar);nn(function(){er(Xn.current.scrollWidth)},[Lr]);function zr(pi,Wi,Ji,Hn,ra){return x.createElement("span",{className:N()("".concat(Or,"-item"),(0,O.Z)({},"".concat(Or,"-item-disabled"),Ji)),title:Me(pi)},x.createElement("span",{className:"".concat(Or,"-item-content")},Wi),Hn&&x.createElement(kt,{className:"".concat(Or,"-item-remove"),onMouseDown:be,onClick:ra,customizeIcon:Ht},"\xD7"))}function Er(pi,Wi,Ji,Hn,ra){var Tr=function($r){be($r),He(!U)};return x.createElement("span",{onMouseDown:Tr},Be({label:Wi,value:pi,disabled:Ji,closable:Hn,onClose:ra}))}function mr(pi){var Wi=pi.disabled,Ji=pi.label,Hn=pi.value,ra=!Kt&&!Wi,Tr=Ji;if(typeof Ee=="number"&&(typeof Ji=="string"||typeof Ji=="number")){var hr=String(Tr);hr.length>Ee&&(Tr="".concat(hr.slice(0,Ee),"..."))}var $r=function(Bi){Bi&&Bi.stopPropagation(),en(pi)};return typeof Be=="function"?Er(Hn,Tr,Wi,ra,$r):zr(pi,Tr,Wi,ra,$r)}function si(pi){var Wi=typeof Pe=="function"?Pe(pi):Pe;return zr({title:Wi},Wi,!1)}var Si=x.createElement("div",{className:"".concat(Or,"-search"),style:{width:qn},onFocus:function(){ii(!0)},onBlur:function(){ii(!1)}},x.createElement(qt,{ref:J,open:U,prefixCls:q,id:H,inputElement:null,disabled:Kt,autoFocus:ct,autoComplete:ht,editable:fi,activeDescendantId:rt,value:Lr,onKeyDown:Sn,onMouseDown:Pn,onChange:un,onPaste:mn,onCompositionStart:$n,onCompositionEnd:Wn,tabIndex:$t,attrs:(0,zt.Z)(z,!0)}),x.createElement("span",{ref:Xn,className:"".concat(Or,"-search-mirror"),"aria-hidden":!0},Lr,"\xA0")),Mi=x.createElement(Ot.Z,{prefixCls:"".concat(Or,"-overflow"),data:Dt,renderItem:mr,renderRest:si,suffix:Si,itemKey:le,maxCount:ue});return x.createElement(x.Fragment,null,Mi,!Dt.length&&!Lr&&x.createElement("span",{className:"".concat(Or,"-placeholder")},pt))},Yt=De,re=function(z){var H=z.inputElement,q=z.prefixCls,Dt=z.id,U=z.inputRef,Y=z.disabled,G=z.autoFocus,J=z.autoComplete,pt=z.activeDescendantId,Kt=z.mode,yt=z.open,Qt=z.values,ct=z.placeholder,ht=z.tabIndex,rt=z.showSearch,$t=z.searchValue,Ht=z.activeValue,ue=z.maxLength,Ee=z.onInputKeyDown,ie=z.onInputMouseDown,Pe=z.onInputChange,Be=z.onInputPaste,He=z.onInputCompositionStart,en=z.onInputCompositionEnd,un=z.title,mn=x.useState(!1),Sn=(0,g.Z)(mn,2),Pn=Sn[0],$n=Sn[1],Wn=Kt==="combobox",Xn=Wn||rt,An=Qt[0],Zn=$t||"";Wn&&Ht&&!Pn&&(Zn=Ht),x.useEffect(function(){Wn&&$n(!1)},[Wn,Ht]);var qn=Kt!=="combobox"&&!yt&&!rt?!1:!!Zn,er=un===void 0?Me(An):un,Cr=function(){if(An)return null;var ar=qn?{visibility:"hidden"}:void 0;return x.createElement("span",{className:"".concat(q,"-selection-placeholder"),style:ar},ct)};return x.createElement(x.Fragment,null,x.createElement("span",{className:"".concat(q,"-selection-search")},x.createElement(qt,{ref:U,prefixCls:q,id:Dt,open:yt,inputElement:H,disabled:Y,autoFocus:G,autoComplete:J,editable:Xn,activeDescendantId:pt,value:Zn,onKeyDown:Ee,onMouseDown:ie,onChange:function(ar){$n(!0),Pe(ar)},onPaste:Be,onCompositionStart:He,onCompositionEnd:en,tabIndex:ht,attrs:(0,zt.Z)(z,!0),maxLength:Wn?ue:void 0})),!Wn&&An?x.createElement("span",{className:"".concat(q,"-selection-item"),title:er,style:qn?{visibility:"hidden"}:void 0},An.label):null,Cr())},xt=re;function at(Z){return![Ct.Z.ESC,Ct.Z.SHIFT,Ct.Z.BACKSPACE,Ct.Z.TAB,Ct.Z.WIN_KEY,Ct.Z.ALT,Ct.Z.META,Ct.Z.WIN_KEY_RIGHT,Ct.Z.CTRL,Ct.Z.SEMICOLON,Ct.Z.EQUALS,Ct.Z.CAPS_LOCK,Ct.Z.CONTEXT_MENU,Ct.Z.F1,Ct.Z.F2,Ct.Z.F3,Ct.Z.F4,Ct.Z.F5,Ct.Z.F6,Ct.Z.F7,Ct.Z.F8,Ct.Z.F9,Ct.Z.F10,Ct.Z.F11,Ct.Z.F12].includes(Z)}var se=function(z,H){var q=(0,x.useRef)(null),Dt=(0,x.useRef)(!1),U=z.prefixCls,Y=z.open,G=z.mode,J=z.showSearch,pt=z.tokenWithEnter,Kt=z.autoClearSearchValue,yt=z.onSearch,Qt=z.onSearchSubmit,ct=z.onToggleOpen,ht=z.onInputKeyDown,rt=z.domRef;x.useImperativeHandle(H,function(){return{focus:function(){q.current.focus()},blur:function(){q.current.blur()}}});var $t=ot(0),Ht=(0,g.Z)($t,2),ue=Ht[0],Ee=Ht[1],ie=function(Zn){var qn=Zn.which;(qn===Ct.Z.UP||qn===Ct.Z.DOWN)&&Zn.preventDefault(),ht&&ht(Zn),qn===Ct.Z.ENTER&&G==="tags"&&!Dt.current&&!Y&&(Qt==null||Qt(Zn.target.value)),at(qn)&&ct(!0)},Pe=function(){Ee(!0)},Be=(0,x.useRef)(null),He=function(Zn){yt(Zn,!0,Dt.current)!==!1&&ct(!0)},en=function(){Dt.current=!0},un=function(Zn){Dt.current=!1,G!=="combobox"&&He(Zn.target.value)},mn=function(Zn){var qn=Zn.target.value;if(pt&&Be.current&&/[\r\n]/.test(Be.current)){var er=Be.current.replace(/[\r\n]+$/,"").replace(/\r\n/g," ").replace(/[\r\n]/g," ");qn=qn.replace(er,Be.current)}Be.current=null,He(qn)},Sn=function(Zn){var qn=Zn.clipboardData,er=qn.getData("text");Be.current=er},Pn=function(Zn){var qn=Zn.target;if(qn!==q.current){var er=document.body.style.msTouchAction!==void 0;er?setTimeout(function(){q.current.focus()}):q.current.focus()}},$n=function(Zn){var qn=ue();Zn.target!==q.current&&!qn&&G!=="combobox"&&Zn.preventDefault(),(G!=="combobox"&&(!J||!qn)||!Y)&&(Y&&Kt!==!1&&yt("",!0,!1),ct())},Wn={inputRef:q,onInputKeyDown:ie,onInputMouseDown:Pe,onInputChange:mn,onInputPaste:Sn,onInputCompositionStart:en,onInputCompositionEnd:un},Xn=G==="multiple"||G==="tags"?x.createElement(Yt,(0,l.Z)({},z,Wn)):x.createElement(xt,(0,l.Z)({},z,Wn));return x.createElement("div",{ref:rt,className:"".concat(U,"-selector"),onClick:Pn,onMouseDown:$n},Xn)},Fe=x.forwardRef(se);Fe.displayName="Selector";var Re=Fe,ge=d(35593),Ie=["prefixCls","disabled","visible","children","popupElement","animation","transitionName","dropdownStyle","dropdownClassName","direction","placement","builtinPlacements","dropdownMatchSelectWidth","dropdownRender","dropdownAlign","getPopupContainer","empty","getTriggerDOMNode","onPopupVisibleChange","onPopupMouseEnter"],Ne=function(z){var H=z===!0?0:1;return{bottomLeft:{points:["tl","bl"],offset:[0,4],overflow:{adjustX:H,adjustY:1},htmlRegion:"scroll"},bottomRight:{points:["tr","br"],offset:[0,4],overflow:{adjustX:H,adjustY:1},htmlRegion:"scroll"},topLeft:{points:["bl","tl"],offset:[0,-4],overflow:{adjustX:H,adjustY:1},htmlRegion:"scroll"},topRight:{points:["br","tr"],offset:[0,-4],overflow:{adjustX:H,adjustY:1},htmlRegion:"scroll"}}},bt=function(z,H){var q=z.prefixCls,Dt=z.disabled,U=z.visible,Y=z.children,G=z.popupElement,J=z.animation,pt=z.transitionName,Kt=z.dropdownStyle,yt=z.dropdownClassName,Qt=z.direction,ct=Qt===void 0?"ltr":Qt,ht=z.placement,rt=z.builtinPlacements,$t=z.dropdownMatchSelectWidth,Ht=z.dropdownRender,ue=z.dropdownAlign,Ee=z.getPopupContainer,ie=z.empty,Pe=z.getTriggerDOMNode,Be=z.onPopupVisibleChange,He=z.onPopupMouseEnter,en=(0,P.Z)(z,Ie),un="".concat(q,"-dropdown"),mn=G;Ht&&(mn=Ht(G));var Sn=x.useMemo(function(){return rt||Ne($t)},[rt,$t]),Pn=J?"".concat(un,"-").concat(J):pt,$n=typeof $t=="number",Wn=x.useMemo(function(){return $n?null:$t===!1?"minWidth":"width"},[$t,$n]),Xn=Kt;$n&&(Xn=(0,_.Z)((0,_.Z)({},Xn),{},{width:$t}));var An=x.useRef(null);return x.useImperativeHandle(H,function(){return{getPopupElement:function(){return An.current}}}),x.createElement(ge.Z,(0,l.Z)({},en,{showAction:Be?["click"]:[],hideAction:Be?["click"]:[],popupPlacement:ht||(ct==="rtl"?"bottomRight":"bottomLeft"),builtinPlacements:Sn,prefixCls:un,popupTransitionName:Pn,popup:x.createElement("div",{ref:An,onMouseEnter:He},mn),stretch:Wn,popupAlign:ue,popupVisible:U,getPopupContainer:Ee,popupClassName:N()(yt,(0,O.Z)({},"".concat(un,"-empty"),ie)),popupStyle:Xn,getTriggerDOMNode:Pe,onPopupVisibleChange:Be}),Y)},Jt=x.forwardRef(bt);Jt.displayName="SelectTrigger";var oe=Jt,M=d(66712);function Q(Z,z){var H=Z.key,q;return"value"in Z&&(q=Z.value),H!=null?H:q!==void 0?q:"rc-index-key-".concat(z)}function te(Z,z){var H=Z||{},q=H.label,Dt=H.value,U=H.options,Y=H.groupLabel,G=q||(z?"children":"label");return{label:G,value:Dt||"value",options:U||"options",groupLabel:Y||G}}function Ut(Z){var z=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},H=z.fieldNames,q=z.childrenAsData,Dt=[],U=te(H,!1),Y=U.label,G=U.value,J=U.options,pt=U.groupLabel;function Kt(yt,Qt){yt.forEach(function(ct){if(Qt||!(J in ct)){var ht=ct[G];Dt.push({key:Q(ct,Dt.length),groupOption:Qt,data:ct,label:ct[Y],value:ht})}else{var rt=ct[pt];rt===void 0&&q&&(rt=ct.label),Dt.push({key:Q(ct,Dt.length),group:!0,data:ct,label:rt}),Kt(ct[J],!0)}})}return Kt(Z,!1),Dt}function we(Z){var z=(0,_.Z)({},Z);return"props"in z||Object.defineProperty(z,"props",{get:function(){return(0,I.ZP)(!1,"Return type is option instead of Option instance. Please read value directly instead of reading from `props`."),z}}),z}function Ce(Z,z){if(!z||!z.length)return null;var H=!1;function q(U,Y){var G=(0,M.Z)(Y),J=G[0],pt=G.slice(1);if(!J)return[U];var Kt=U.split(J);return H=H||Kt.length>1,Kt.reduce(function(yt,Qt){return[].concat((0,R.Z)(yt),(0,R.Z)(q(Qt,pt)))},[]).filter(function(yt){return yt})}var Dt=q(Z,z);return H?Dt:null}var _e=["id","prefixCls","className","showSearch","tagRender","direction","omitDomProps","displayValues","onDisplayValuesChange","emptyOptions","notFoundContent","onClear","mode","disabled","loading","getInputElement","getRawInputElement","open","defaultOpen","onDropdownVisibleChange","activeValue","onActiveValueChange","activeDescendantId","searchValue","autoClearSearchValue","onSearch","onSearchSplit","tokenSeparators","allowClear","suffixIcon","clearIcon","OptionList","animation","transitionName","dropdownStyle","dropdownClassName","dropdownMatchSelectWidth","dropdownRender","dropdownAlign","placement","builtinPlacements","getPopupContainer","showAction","onFocus","onBlur","onKeyUp","onKeyDown","onMouseDown"],mt=["value","onChange","removeIcon","placeholder","autoFocus","maxTagCount","maxTagTextLength","maxTagPlaceholder","choiceTransitionName","onInputKeyDown","onPopupScroll","tabIndex"];function X(Z){return Z==="tags"||Z==="multiple"}var Pt=x.forwardRef(function(Z,z){var H,q,Dt=Z.id,U=Z.prefixCls,Y=Z.className,G=Z.showSearch,J=Z.tagRender,pt=Z.direction,Kt=Z.omitDomProps,yt=Z.displayValues,Qt=Z.onDisplayValuesChange,ct=Z.emptyOptions,ht=Z.notFoundContent,rt=ht===void 0?"Not Found":ht,$t=Z.onClear,Ht=Z.mode,ue=Z.disabled,Ee=Z.loading,ie=Z.getInputElement,Pe=Z.getRawInputElement,Be=Z.open,He=Z.defaultOpen,en=Z.onDropdownVisibleChange,un=Z.activeValue,mn=Z.onActiveValueChange,Sn=Z.activeDescendantId,Pn=Z.searchValue,$n=Z.autoClearSearchValue,Wn=Z.onSearch,Xn=Z.onSearchSplit,An=Z.tokenSeparators,Zn=Z.allowClear,qn=Z.suffixIcon,er=Z.clearIcon,Cr=Z.OptionList,Un=Z.animation,ar=Z.transitionName,ii=Z.dropdownStyle,Or=Z.dropdownClassName,Lr=Z.dropdownMatchSelectWidth,fi=Z.dropdownRender,zr=Z.dropdownAlign,Er=Z.placement,mr=Z.builtinPlacements,si=Z.getPopupContainer,Si=Z.showAction,Mi=Si===void 0?[]:Si,pi=Z.onFocus,Wi=Z.onBlur,Ji=Z.onKeyUp,Hn=Z.onKeyDown,ra=Z.onMouseDown,Tr=(0,P.Z)(Z,_e),hr=X(Ht),$r=(G!==void 0?G:hr)||Ht==="combobox",ni=(0,_.Z)({},Tr);mt.forEach(function(Ci){delete ni[Ci]}),Kt==null||Kt.forEach(function(Ci){delete ni[Ci]});var Bi=x.useState(!1),ya=(0,g.Z)(Bi,2),qi=ya[0],va=ya[1];x.useEffect(function(){va((0,tt.Z)())},[]);var Ka=x.useRef(null),ea=x.useRef(null),Na=x.useRef(null),Fa=x.useRef(null),da=x.useRef(null),ja=wt(),Oa=(0,g.Z)(ja,3),Ra=Oa[0],Xa=Oa[1],oo=Oa[2];x.useImperativeHandle(z,function(){var Ci,bi;return{focus:(Ci=Fa.current)===null||Ci===void 0?void 0:Ci.focus,blur:(bi=Fa.current)===null||bi===void 0?void 0:bi.blur,scrollTo:function(ba){var Hi;return(Hi=da.current)===null||Hi===void 0?void 0:Hi.scrollTo(ba)}}});var Ia=x.useMemo(function(){var Ci;if(Ht!=="combobox")return Pn;var bi=(Ci=yt[0])===null||Ci===void 0?void 0:Ci.value;return typeof bi=="string"||typeof bi=="number"?String(bi):""},[Pn,Ht,yt]),so=Ht==="combobox"&&typeof ie=="function"&&ie()||null,$a=typeof Pe=="function"&&Pe(),fa=(0,ut.x1)(ea,$a==null||(H=$a.props)===null||H===void 0?void 0:H.ref),vo=x.useState(!1),Ca=(0,g.Z)(vo,2),Di=Ca[0],Qa=Ca[1];(0,et.Z)(function(){Qa(!0)},[]);var ts=(0,A.Z)(!1,{defaultValue:He,value:Be}),Ja=(0,g.Z)(ts,2),To=Ja[0],ia=Ja[1],lr=Di?To:!1,ri=!rt&&ct;(ue||ri&&lr&&Ht==="combobox")&&(lr=!1);var Yr=ri?!1:lr,hi=x.useCallback(function(Ci){var bi=Ci!==void 0?Ci:!lr;ue||(ia(bi),lr!==bi&&(en==null||en(bi)))},[ue,lr,ia,en]),ai=x.useMemo(function(){return(An||[]).some(function(Ci){return[`
|
|
|
`,`\r
|
|
|
`].includes(Ci)})},[An]),zi=function(bi,aa,ba){var Hi=!0,xi=bi;mn==null||mn(null);var Ea=ba?null:Ce(bi,An);return Ht!=="combobox"&&Ea&&(xi="",Xn==null||Xn(Ea),hi(!1),Hi=!1),Wn&&Ia!==xi&&Wn(xi,{source:aa?"typing":"effect"}),Hi},qa=function(bi){!bi||!bi.trim()||Wn(bi,{source:"submit"})};x.useEffect(function(){!lr&&!hr&&Ht!=="combobox"&&zi("",!1,!1)},[lr]),x.useEffect(function(){To&&ue&&ia(!1),ue&&Xa(!1)},[ue]);var ji=ot(),Vi=(0,g.Z)(ji,2),Kn=Vi[0],Ui=Vi[1],Io=function(bi){var aa=Kn(),ba=bi.which;if(ba===Ct.Z.ENTER&&(Ht!=="combobox"&&bi.preventDefault(),lr||hi(!0)),Ui(!!Ia),ba===Ct.Z.BACKSPACE&&!aa&&hr&&!Ia&&yt.length){for(var Hi=(0,R.Z)(yt),xi=null,Ea=Hi.length-1;Ea>=0;Ea-=1){var lo=Hi[Ea];if(!lo.disabled){Hi.splice(Ea,1),xi=lo;break}}xi&&Qt(Hi,{type:"remove",values:[xi]})}for(var xa=arguments.length,Do=new Array(xa>1?xa-1:0),Da=1;Da<xa;Da++)Do[Da-1]=arguments[Da];if(lr&&da.current){var Lo;(Lo=da.current).onKeyDown.apply(Lo,[bi].concat(Do))}Hn==null||Hn.apply(void 0,[bi].concat(Do))},Uo=function(bi){for(var aa=arguments.length,ba=new Array(aa>1?aa-1:0),Hi=1;Hi<aa;Hi++)ba[Hi-1]=arguments[Hi];if(lr&&da.current){var xi;(xi=da.current).onKeyUp.apply(xi,[bi].concat(ba))}Ji==null||Ji.apply(void 0,[bi].concat(ba))},es=function(bi){var aa=yt.filter(function(ba){return ba!==bi});Qt(aa,{type:"remove",values:[bi]})},Ta=x.useRef(!1),eo=function(){Xa(!0),ue||(pi&&!Ta.current&&pi.apply(void 0,arguments),Mi.includes("focus")&&hi(!0)),Ta.current=!0},ns=function(){Xa(!1,function(){Ta.current=!1,hi(!1)}),!ue&&(Ia&&(Ht==="tags"?Wn(Ia,{source:"submit"}):Ht==="multiple"&&Wn("",{source:"blur"})),Wi&&Wi.apply(void 0,arguments))},Po=[];x.useEffect(function(){return function(){Po.forEach(function(Ci){return clearTimeout(Ci)}),Po.splice(0,Po.length)}},[]);var ys=function(bi){var aa,ba=bi.target,Hi=(aa=Na.current)===null||aa===void 0?void 0:aa.getPopupElement();if(Hi&&Hi.contains(ba)){var xi=setTimeout(function(){var Do=Po.indexOf(xi);if(Do!==-1&&Po.splice(Do,1),oo(),!qi&&!Hi.contains(document.activeElement)){var Da;(Da=Fa.current)===null||Da===void 0||Da.focus()}});Po.push(xi)}for(var Ea=arguments.length,lo=new Array(Ea>1?Ea-1:0),xa=1;xa<Ea;xa++)lo[xa-1]=arguments[xa];ra==null||ra.apply(void 0,[bi].concat(lo))},Ao=x.useState({}),go=(0,g.Z)(Ao,2),No=go[1];function fs(){No({})}var Ba;$a&&(Ba=function(bi){hi(bi)}),It(function(){var Ci;return[Ka.current,(Ci=Na.current)===null||Ci===void 0?void 0:Ci.getPopupElement()]},Yr,hi,!!$a);var no=x.useMemo(function(){return(0,_.Z)((0,_.Z)({},Z),{},{notFoundContent:rt,open:lr,triggerOpen:Yr,id:Dt,showSearch:$r,multiple:hr,toggleOpen:hi})},[Z,rt,Yr,lr,Dt,$r,hr,hi]),za=!!qn||Ee,rs;za&&(rs=x.createElement(kt,{className:N()("".concat(U,"-arrow"),(0,O.Z)({},"".concat(U,"-arrow-loading"),Ee)),customizeIcon:qn,customizeIconProps:{loading:Ee,searchValue:Ia,open:lr,focused:Ra,showSearch:$r}}));var is=function(){var bi;$t==null||$t(),(bi=Fa.current)===null||bi===void 0||bi.focus(),Qt([],{type:"clear",values:yt}),zi("",!1,!1)},$i=Nt(U,is,yt,Zn,er,ue,Ia,Ht),Wa=$i.allowClear,po=$i.clearIcon,bo=x.createElement(Cr,{ref:da}),Ro=N()(U,Y,(q={},(0,O.Z)(q,"".concat(U,"-focused"),Ra),(0,O.Z)(q,"".concat(U,"-multiple"),hr),(0,O.Z)(q,"".concat(U,"-single"),!hr),(0,O.Z)(q,"".concat(U,"-allow-clear"),Zn),(0,O.Z)(q,"".concat(U,"-show-arrow"),za),(0,O.Z)(q,"".concat(U,"-disabled"),ue),(0,O.Z)(q,"".concat(U,"-loading"),Ee),(0,O.Z)(q,"".concat(U,"-open"),lr),(0,O.Z)(q,"".concat(U,"-customize-input"),so),(0,O.Z)(q,"".concat(U,"-show-search"),$r),q)),Ga=x.createElement(oe,{ref:Na,disabled:ue,prefixCls:U,visible:Yr,popupElement:bo,animation:Un,transitionName:ar,dropdownStyle:ii,dropdownClassName:Or,direction:pt,dropdownMatchSelectWidth:Lr,dropdownRender:fi,dropdownAlign:zr,placement:Er,builtinPlacements:mr,getPopupContainer:si,empty:ct,getTriggerDOMNode:function(){return ea.current},onPopupVisibleChange:Ba,onPopupMouseEnter:fs},$a?x.cloneElement($a,{ref:fa}):x.createElement(Re,(0,l.Z)({},Z,{domRef:ea,prefixCls:U,inputElement:so,ref:Fa,id:Dt,showSearch:$r,autoClearSearchValue:$n,mode:Ht,activeDescendantId:Sn,tagRender:J,values:yt,open:lr,onToggleOpen:hi,activeValue:un,searchValue:Ia,onSearch:zi,onSearchSubmit:qa,onRemove:es,tokenWithEnter:ai}))),Ho;return $a?Ho=Ga:Ho=x.createElement("div",(0,l.Z)({className:Ro},ni,{ref:Ka,onMouseDown:ys,onKeyDown:Io,onKeyUp:Uo,onFocus:eo,onBlur:ns}),Ra&&!lr&&x.createElement("span",{style:{width:0,height:0,position:"absolute",overflow:"hidden",opacity:0},"aria-live":"polite"},"".concat(yt.map(function(Ci){var bi=Ci.label,aa=Ci.value;return["number","string"].includes((0,b.Z)(bi))?bi:aa}).join(", "))),Ga,rs,Wa&&po),x.createElement(Bt.Provider,{value:no},Ho)}),At=Pt,Rt=function(Z,z){var H=x.useRef({values:new Map,options:new Map}),q=x.useMemo(function(){var U=H.current,Y=U.values,G=U.options,J=Z.map(function(yt){if(yt.label===void 0){var Qt;return(0,_.Z)((0,_.Z)({},yt),{},{label:(Qt=Y.get(yt.value))===null||Qt===void 0?void 0:Qt.label})}return yt}),pt=new Map,Kt=new Map;return J.forEach(function(yt){pt.set(yt.value,yt),Kt.set(yt.value,z.get(yt.value)||G.get(yt.value))}),H.current.values=pt,H.current.options=Kt,J},[Z,z]),Dt=x.useCallback(function(U){return z.get(U)||H.current.options.get(U)},[z]);return[q,Dt]};function _t(Z,z){return Ye(Z).join("").toUpperCase().includes(z)}var Vt=function(Z,z,H,q,Dt){return x.useMemo(function(){if(!H||q===!1)return Z;var U=z.options,Y=z.label,G=z.value,J=[],pt=typeof q=="function",Kt=H.toUpperCase(),yt=pt?q:function(ct,ht){return Dt?_t(ht[Dt],Kt):ht[U]?_t(ht[Y!=="children"?Y:"label"],Kt):_t(ht[G],Kt)},Qt=pt?function(ct){return we(ct)}:function(ct){return ct};return Z.forEach(function(ct){if(ct[U]){var ht=yt(H,Qt(ct));if(ht)J.push(ct);else{var rt=ct[U].filter(function($t){return yt(H,Qt($t))});rt.length&&J.push((0,_.Z)((0,_.Z)({},ct),{},(0,O.Z)({},U,rt)))}return}yt(H,Qt(ct))&&J.push(ct)}),J},[Z,q,Dt,H,z])},ae=d(17115),fe=d(11592),me=["children","value"],Ze=["children"];function Ge(Z){var z=Z,H=z.key,q=z.props,Dt=q.children,U=q.value,Y=(0,P.Z)(q,me);return(0,_.Z)({key:H,value:U!==void 0?U:H,children:Dt},Y)}function Ve(Z){var z=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;return(0,fe.Z)(Z).map(function(H,q){if(!x.isValidElement(H)||!H.type)return null;var Dt=H,U=Dt.type.isSelectOptGroup,Y=Dt.key,G=Dt.props,J=G.children,pt=(0,P.Z)(G,Ze);return z||!U?Ge(H):(0,_.Z)((0,_.Z)({key:"__RC_SELECT_GRP__".concat(Y===null?q:Y,"__"),label:Y},pt),{},{options:Ve(J)})}).filter(function(H){return H})}function rn(Z,z,H,q,Dt){return x.useMemo(function(){var U=Z,Y=!Z;Y&&(U=Ve(z));var G=new Map,J=new Map,pt=function(Qt,ct,ht){ht&&typeof ht=="string"&&Qt.set(ct[ht],ct)};function Kt(yt){for(var Qt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,ct=0;ct<yt.length;ct+=1){var ht=yt[ct];!ht[H.options]||Qt?(G.set(ht[H.value],ht),pt(J,ht,H.label),pt(J,ht,q),pt(J,ht,Dt)):Kt(ht[H.options],!0)}}return Kt(U),{options:U,valueOptions:G,labelOptions:J}},[Z,z,H,q,Dt])}function wn(Z){var z=x.useRef();z.current=Z;var H=x.useCallback(function(){return z.current.apply(z,arguments)},[]);return H}var on=function(){return null};on.isSelectOptGroup=!0;var _n=on,Cn=function(){return null};Cn.isSelectOption=!0;var Ln=Cn,En=d(80547),cr=d(2738),Bn=d(48911),br=x.createContext(null),fr=br;function Zr(){return/(mac\sos|macintosh)/i.test(navigator.appVersion)}var di=["disabled","title","children","style","className"];function Xr(Z){return typeof Z=="string"||typeof Z=="number"}var Mr=function(z,H){var q=Xt(),Dt=q.prefixCls,U=q.id,Y=q.open,G=q.multiple,J=q.mode,pt=q.searchValue,Kt=q.toggleOpen,yt=q.notFoundContent,Qt=q.onPopupScroll,ct=x.useContext(fr),ht=ct.flattenOptions,rt=ct.onActiveValue,$t=ct.defaultActiveFirstOption,Ht=ct.onSelect,ue=ct.menuItemSelectedIcon,Ee=ct.rawValues,ie=ct.fieldNames,Pe=ct.virtual,Be=ct.direction,He=ct.listHeight,en=ct.listItemHeight,un="".concat(Dt,"-item"),mn=(0,En.Z)(function(){return ht},[Y,ht],function(zr,Er){return Er[0]&&zr[1]!==Er[1]}),Sn=x.useRef(null),Pn=function(Er){Er.preventDefault()},$n=function(Er){Sn.current&&Sn.current.scrollTo(typeof Er=="number"?{index:Er}:Er)},Wn=function(Er){for(var mr=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1,si=mn.length,Si=0;Si<si;Si+=1){var Mi=(Er+Si*mr+si)%si,pi=mn[Mi],Wi=pi.group,Ji=pi.data;if(!Wi&&!Ji.disabled)return Mi}return-1},Xn=x.useState(function(){return Wn(0)}),An=(0,g.Z)(Xn,2),Zn=An[0],qn=An[1],er=function(Er){var mr=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;qn(Er);var si={source:mr?"keyboard":"mouse"},Si=mn[Er];if(!Si){rt(null,-1,si);return}rt(Si.value,Er,si)};(0,x.useEffect)(function(){er($t!==!1?Wn(0):-1)},[mn.length,pt]);var Cr=x.useCallback(function(zr){return Ee.has(zr)&&J!=="combobox"},[J,(0,R.Z)(Ee).toString(),Ee.size]);(0,x.useEffect)(function(){var zr=setTimeout(function(){if(!G&&Y&&Ee.size===1){var mr=Array.from(Ee)[0],si=mn.findIndex(function(Si){var Mi=Si.data;return Mi.value===mr});si!==-1&&(er(si),$n(si))}});if(Y){var Er;(Er=Sn.current)===null||Er===void 0||Er.scrollTo(void 0)}return function(){return clearTimeout(zr)}},[Y,pt,ht.length]);var Un=function(Er){Er!==void 0&&Ht(Er,{selected:!Ee.has(Er)}),G||Kt(!1)};if(x.useImperativeHandle(H,function(){return{onKeyDown:function(Er){var mr=Er.which,si=Er.ctrlKey;switch(mr){case Ct.Z.N:case Ct.Z.P:case Ct.Z.UP:case Ct.Z.DOWN:{var Si=0;if(mr===Ct.Z.UP?Si=-1:mr===Ct.Z.DOWN?Si=1:Zr()&&si&&(mr===Ct.Z.N?Si=1:mr===Ct.Z.P&&(Si=-1)),Si!==0){var Mi=Wn(Zn+Si,Si);$n(Mi),er(Mi,!0)}break}case Ct.Z.ENTER:{var pi=mn[Zn];pi&&!pi.data.disabled?Un(pi.value):Un(void 0),Y&&Er.preventDefault();break}case Ct.Z.ESC:Kt(!1),Y&&Er.stopPropagation()}},onKeyUp:function(){},scrollTo:function(Er){$n(Er)}}}),mn.length===0)return x.createElement("div",{role:"listbox",id:"".concat(U,"_list"),className:"".concat(un,"-empty"),onMouseDown:Pn},yt);var ar=Object.keys(ie).map(function(zr){return ie[zr]}),ii=function(Er){return Er.label};function Or(zr,Er){var mr=zr.group;return{role:mr?"presentation":"option",id:"".concat(U,"_list_").concat(Er)}}var Lr=function(Er){var mr=mn[Er];if(!mr)return null;var si=mr.data||{},Si=si.value,Mi=mr.group,pi=(0,zt.Z)(si,!0),Wi=ii(mr);return mr?x.createElement("div",(0,l.Z)({"aria-label":typeof Wi=="string"&&!Mi?Wi:null},pi,{key:Er},Or(mr,Er),{"aria-selected":Cr(Si)}),Si):null},fi={role:"listbox",id:"".concat(U,"_list")};return x.createElement(x.Fragment,null,Pe&&x.createElement("div",(0,l.Z)({},fi,{style:{height:0,width:0,overflow:"hidden"}}),Lr(Zn-1),Lr(Zn),Lr(Zn+1)),x.createElement(Bn.Z,{itemKey:"key",ref:Sn,data:mn,height:He,itemHeight:en,fullHeight:!1,onMouseDown:Pn,onScroll:Qt,virtual:Pe,direction:Be,innerProps:Pe?null:fi},function(zr,Er){var mr,si=zr.group,Si=zr.groupOption,Mi=zr.data,pi=zr.label,Wi=zr.value,Ji=Mi.key;if(si){var Hn,ra=(Hn=Mi.title)!==null&&Hn!==void 0?Hn:Xr(pi)?pi.toString():void 0;return x.createElement("div",{className:N()(un,"".concat(un,"-group")),title:ra},pi!==void 0?pi:Ji)}var Tr=Mi.disabled,hr=Mi.title,$r=Mi.children,ni=Mi.style,Bi=Mi.className,ya=(0,P.Z)(Mi,di),qi=(0,cr.Z)(ya,ar),va=Cr(Wi),Ka="".concat(un,"-option"),ea=N()(un,Ka,Bi,(mr={},(0,O.Z)(mr,"".concat(Ka,"-grouped"),Si),(0,O.Z)(mr,"".concat(Ka,"-active"),Zn===Er&&!Tr),(0,O.Z)(mr,"".concat(Ka,"-disabled"),Tr),(0,O.Z)(mr,"".concat(Ka,"-selected"),va),mr)),Na=ii(zr),Fa=!ue||typeof ue=="function"||va,da=typeof Na=="number"?Na:Na||Wi,ja=Xr(da)?da.toString():void 0;return hr!==void 0&&(ja=hr),x.createElement("div",(0,l.Z)({},(0,zt.Z)(qi),Pe?{}:Or(zr,Er),{"aria-selected":va,className:ea,title:ja,onMouseMove:function(){Zn===Er||Tr||er(Er)},onClick:function(){Tr||Un(Wi)},style:ni}),x.createElement("div",{className:"".concat(Ka,"-content")},da),x.isValidElement(ue)||va,Fa&&x.createElement(kt,{className:"".concat(un,"-option-state"),customizeIcon:ue,customizeIconProps:{isSelected:va}},va?"\u2713":null))}))},gi=x.forwardRef(Mr);gi.displayName="OptionList";var yi=gi;function _i(Z){var z=Z.mode,H=Z.options,q=Z.children,Dt=Z.backfill,U=Z.allowClear,Y=Z.placeholder,G=Z.getInputElement,J=Z.showSearch,pt=Z.onSearch,Kt=Z.defaultOpen,yt=Z.autoFocus,Qt=Z.labelInValue,ct=Z.value,ht=Z.inputValue,rt=Z.optionLabelProp,$t=isMultiple(z),Ht=J!==void 0?J:$t||z==="combobox",ue=H||convertChildrenToData(q);if(warning(z!=="tags"||ue.every(function(Be){return!Be.disabled}),"Please avoid setting option to disabled in tags mode since user can always type text as tag."),z==="tags"||z==="combobox"){var Ee=ue.some(function(Be){return Be.options?Be.options.some(function(He){return typeof("value"in He?He.value:He.key)=="number"}):typeof("value"in Be?Be.value:Be.key)=="number"});warning(!Ee,"`value` of Option should not use number type when `mode` is `tags` or `combobox`.")}if(warning(z!=="combobox"||!rt,"`combobox` mode not support `optionLabelProp`. Please set `value` on Option directly."),warning(z==="combobox"||!Dt,"`backfill` only works with `combobox` mode."),warning(z==="combobox"||!G,"`getInputElement` only work with `combobox` mode."),noteOnce(z!=="combobox"||!G||!U||!Y,"Customize `getInputElement` should customize clear and placeholder logic instead of configuring `allowClear` and `placeholder`."),pt&&!Ht&&z!=="combobox"&&z!=="tags"&&warning(!1,"`onSearch` should work with `showSearch` instead of use alone."),noteOnce(!Kt||yt,"`defaultOpen` makes Select open without focus which means it will not close by click outside. You can set `autoFocus` if needed."),ct!=null){var ie=toArray(ct);warning(!Qt||ie.every(function(Be){return _typeof(Be)==="object"&&("key"in Be||"value"in Be)}),"`value` should in shape of `{ value: string | number, label?: ReactNode }` when you set `labelInValue` to `true`"),warning(!$t||Array.isArray(ct),"`value` should be array when `mode` is `multiple` or `tags`")}if(q){var Pe=null;toNodeArray(q).some(function(Be){if(!React.isValidElement(Be)||!Be.type)return!1;var He=Be,en=He.type;if(en.isSelectOption)return!1;if(en.isSelectOptGroup){var un=toNodeArray(Be.props.children).every(function(mn){return!React.isValidElement(mn)||!Be.type||mn.type.isSelectOption?!0:(Pe=mn.type,!1)});return!un}return Pe=en,!0}),Pe&&warning(!1,"`children` should be `Select.Option` or `Select.OptGroup` instead of `".concat(Pe.displayName||Pe.name||Pe,"`.")),warning(ht===void 0,"`inputValue` is deprecated, please use `searchValue` instead.")}}function qr(Z,z){if(Z){var H=function q(Dt){for(var U=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,Y=0;Y<Dt.length;Y++){var G=Dt[Y];if(G[z==null?void 0:z.value]===null)return warning(!1,"`value` in Select options should not be `null`."),!0;if(!U&&Array.isArray(G[z==null?void 0:z.options])&&q(G[z==null?void 0:z.options],!0))break}};H(Z)}}var Jn=null,sn=["id","mode","prefixCls","backfill","fieldNames","inputValue","searchValue","onSearch","autoClearSearchValue","onSelect","onDeselect","dropdownMatchSelectWidth","filterOption","filterSort","optionFilterProp","optionLabelProp","options","children","defaultActiveFirstOption","menuItemSelectedIcon","virtual","direction","listHeight","listItemHeight","value","defaultValue","labelInValue","onChange"],Wt=["inputValue"];function y(Z){return!Z||(0,b.Z)(Z)!=="object"}var E=x.forwardRef(function(Z,z){var H=Z.id,q=Z.mode,Dt=Z.prefixCls,U=Dt===void 0?"rc-select":Dt,Y=Z.backfill,G=Z.fieldNames,J=Z.inputValue,pt=Z.searchValue,Kt=Z.onSearch,yt=Z.autoClearSearchValue,Qt=yt===void 0?!0:yt,ct=Z.onSelect,ht=Z.onDeselect,rt=Z.dropdownMatchSelectWidth,$t=rt===void 0?!0:rt,Ht=Z.filterOption,ue=Z.filterSort,Ee=Z.optionFilterProp,ie=Z.optionLabelProp,Pe=Z.options,Be=Z.children,He=Z.defaultActiveFirstOption,en=Z.menuItemSelectedIcon,un=Z.virtual,mn=Z.direction,Sn=Z.listHeight,Pn=Sn===void 0?200:Sn,$n=Z.listItemHeight,Wn=$n===void 0?20:$n,Xn=Z.value,An=Z.defaultValue,Zn=Z.labelInValue,qn=Z.onChange,er=(0,P.Z)(Z,sn),Cr=(0,ae.ZP)(H),Un=X(q),ar=!!(!Pe&&Be),ii=x.useMemo(function(){return Ht===void 0&&q==="combobox"?!1:Ht},[Ht,q]),Or=x.useMemo(function(){return te(G,ar)},[JSON.stringify(G),ar]),Lr=(0,A.Z)("",{value:pt!==void 0?pt:J,postState:function(ri){return ri||""}}),fi=(0,g.Z)(Lr,2),zr=fi[0],Er=fi[1],mr=rn(Pe,Be,Or,Ee,ie),si=mr.valueOptions,Si=mr.labelOptions,Mi=mr.options,pi=x.useCallback(function(lr){var ri=Ye(lr);return ri.map(function(Yr){var hi,ai,zi,qa,ji;if(y(Yr))hi=Yr;else{var Vi;zi=Yr.key,ai=Yr.label,hi=(Vi=Yr.value)!==null&&Vi!==void 0?Vi:zi}var Kn=si.get(hi);if(Kn){var Ui;if(ai===void 0&&(ai=Kn==null?void 0:Kn[ie||Or.label]),zi===void 0&&(zi=(Ui=Kn==null?void 0:Kn.key)!==null&&Ui!==void 0?Ui:hi),qa=Kn==null?void 0:Kn.disabled,ji=Kn==null?void 0:Kn.title,0)var Io}return{label:ai,value:hi,key:zi,disabled:qa,title:ji}})},[Or,ie,si]),Wi=(0,A.Z)(An,{value:Xn}),Ji=(0,g.Z)(Wi,2),Hn=Ji[0],ra=Ji[1],Tr=x.useMemo(function(){var lr,ri=pi(Hn);return q==="combobox"&&Mt((lr=ri[0])===null||lr===void 0?void 0:lr.value)?[]:ri},[Hn,pi,q]),hr=Rt(Tr,si),$r=(0,g.Z)(hr,2),ni=$r[0],Bi=$r[1],ya=x.useMemo(function(){if(!q&&ni.length===1){var lr=ni[0];if(lr.value===null&&(lr.label===null||lr.label===void 0))return[]}return ni.map(function(ri){var Yr;return(0,_.Z)((0,_.Z)({},ri),{},{label:(Yr=ri.label)!==null&&Yr!==void 0?Yr:ri.value})})},[q,ni]),qi=x.useMemo(function(){return new Set(ni.map(function(lr){return lr.value}))},[ni]);x.useEffect(function(){if(q==="combobox"){var lr,ri=(lr=ni[0])===null||lr===void 0?void 0:lr.value;Er(Qe(ri)?String(ri):"")}},[ni]);var va=wn(function(lr,ri){var Yr,hi=ri!=null?ri:lr;return Yr={},(0,O.Z)(Yr,Or.value,lr),(0,O.Z)(Yr,Or.label,hi),Yr}),Ka=x.useMemo(function(){if(q!=="tags")return Mi;var lr=(0,R.Z)(Mi),ri=function(hi){return si.has(hi)};return(0,R.Z)(ni).sort(function(Yr,hi){return Yr.value<hi.value?-1:1}).forEach(function(Yr){var hi=Yr.value;ri(hi)||lr.push(va(hi,Yr.label))}),lr},[va,Mi,si,ni,q]),ea=Vt(Ka,Or,zr,ii,Ee),Na=x.useMemo(function(){return q!=="tags"||!zr||ea.some(function(lr){return lr[Ee||"value"]===zr})||ea.some(function(lr){return lr[Or.value]===zr})?ea:[va(zr)].concat((0,R.Z)(ea))},[va,Ee,q,ea,zr,Or]),Fa=x.useMemo(function(){return ue?(0,R.Z)(Na).sort(function(lr,ri){return ue(lr,ri)}):Na},[Na,ue]),da=x.useMemo(function(){return Ut(Fa,{fieldNames:Or,childrenAsData:ar})},[Fa,Or,ar]),ja=function(ri){var Yr=pi(ri);if(ra(Yr),qn&&(Yr.length!==ni.length||Yr.some(function(zi,qa){var ji;return((ji=ni[qa])===null||ji===void 0?void 0:ji.value)!==(zi==null?void 0:zi.value)}))){var hi=Zn?Yr:Yr.map(function(zi){return zi.value}),ai=Yr.map(function(zi){return we(Bi(zi.value))});qn(Un?hi:hi[0],Un?ai:ai[0])}},Oa=x.useState(null),Ra=(0,g.Z)(Oa,2),Xa=Ra[0],oo=Ra[1],Ia=x.useState(0),so=(0,g.Z)(Ia,2),$a=so[0],fa=so[1],vo=He!==void 0?He:q!=="combobox",Ca=x.useCallback(function(lr,ri){var Yr=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},hi=Yr.source,ai=hi===void 0?"keyboard":hi;fa(ri),Y&&q==="combobox"&&lr!==null&&ai==="keyboard"&&oo(String(lr))},[Y,q]),Di=function(ri,Yr,hi){var ai=function(){var Ta,eo=Bi(ri);return[Zn?{label:eo==null?void 0:eo[Or.label],value:ri,key:(Ta=eo==null?void 0:eo.key)!==null&&Ta!==void 0?Ta:ri}:ri,we(eo)]};if(Yr&&ct){var zi=ai(),qa=(0,g.Z)(zi,2),ji=qa[0],Vi=qa[1];ct(ji,Vi)}else if(!Yr&&ht&&hi!=="clear"){var Kn=ai(),Ui=(0,g.Z)(Kn,2),Io=Ui[0],Uo=Ui[1];ht(Io,Uo)}},Qa=wn(function(lr,ri){var Yr,hi=Un?ri.selected:!0;hi?Yr=Un?[].concat((0,R.Z)(ni),[lr]):[lr]:Yr=ni.filter(function(ai){return ai.value!==lr}),ja(Yr),Di(lr,hi),q==="combobox"?oo(""):(!X||Qt)&&(Er(""),oo(""))}),ts=function(ri,Yr){ja(ri);var hi=Yr.type,ai=Yr.values;(hi==="remove"||hi==="clear")&&ai.forEach(function(zi){Di(zi.value,!1,hi)})},Ja=function(ri,Yr){if(Er(ri),oo(null),Yr.source==="submit"){var hi=(ri||"").trim();if(hi){var ai=Array.from(new Set([].concat((0,R.Z)(qi),[hi])));ja(ai),Di(hi,!0),Er("")}return}Yr.source!=="blur"&&(q==="combobox"&&ja(ri),Kt==null||Kt(ri))},To=function(ri){var Yr=ri;q!=="tags"&&(Yr=ri.map(function(ai){var zi=Si.get(ai);return zi==null?void 0:zi.value}).filter(function(ai){return ai!==void 0}));var hi=Array.from(new Set([].concat((0,R.Z)(qi),(0,R.Z)(Yr))));ja(hi),hi.forEach(function(ai){Di(ai,!0)})},ia=x.useMemo(function(){var lr=un!==!1&&$t!==!1;return(0,_.Z)((0,_.Z)({},mr),{},{flattenOptions:da,onActiveValue:Ca,defaultActiveFirstOption:vo,onSelect:Qa,menuItemSelectedIcon:en,rawValues:qi,fieldNames:Or,virtual:lr,direction:mn,listHeight:Pn,listItemHeight:Wn,childrenAsData:ar})},[mr,da,Ca,vo,Qa,en,qi,Or,un,$t,Pn,Wn,ar]);return x.createElement(fr.Provider,{value:ia},x.createElement(At,(0,l.Z)({},er,{id:Cr,prefixCls:U,ref:z,omitDomProps:Wt,mode:q,displayValues:ya,onDisplayValuesChange:ts,direction:mn,searchValue:zr,onSearch:Ja,autoClearSearchValue:Qt,onSearchSplit:To,dropdownMatchSelectWidth:$t,OptionList:yi,emptyOptions:!da.length,activeValue:Xa,activeDescendantId:"".concat(Cr,"_list_").concat($a)})))}),c=E;c.Option=Ln,c.OptGroup=_n;var f=c,w=f},9296:function(Tt,vt,d){"use strict";d.r(vt),d.d(vt,{ResizableTextArea:function(){return xe},default:function(){return Mt}});var l=d(54476),R=d(33885),O=d(20068),_=d(76190),g=d(42978),P=d(75931),b=d(94480),A=d(92310),I=d.n(A),x=d(93681),k=d(5643),N=d(18929),et=d(59301),tt=d(29301),Ct=d(34280),ut=d(16089),nt=`
|
|
|
min-height:0 !important;
|
|
|
max-height:none !important;
|
|
|
height:0 !important;
|
|
|
visibility:hidden !important;
|
|
|
overflow:hidden !important;
|
|
|
position:absolute !important;
|
|
|
z-index:-1000 !important;
|
|
|
top:0 !important;
|
|
|
right:0 !important;
|
|
|
pointer-events: none !important;
|
|
|
`,kt=["letter-spacing","line-height","padding-top","padding-bottom","font-family","font-weight","font-size","font-variant","text-rendering","text-transform","width","text-indent","padding-left","padding-right","border-width","box-sizing","word-break","white-space"],Nt={},Bt;function Xt(ne){var Me=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,nn=ne.getAttribute("id")||ne.getAttribute("data-reactid")||ne.getAttribute("name");if(Me&&Nt[nn])return Nt[nn];var le=window.getComputedStyle(ne),be=le.getPropertyValue("box-sizing")||le.getPropertyValue("-moz-box-sizing")||le.getPropertyValue("-webkit-box-sizing"),De=parseFloat(le.getPropertyValue("padding-bottom"))+parseFloat(le.getPropertyValue("padding-top")),Yt=parseFloat(le.getPropertyValue("border-bottom-width"))+parseFloat(le.getPropertyValue("border-top-width")),re=kt.map(function(at){return"".concat(at,":").concat(le.getPropertyValue(at))}).join(";"),xt={sizingStyle:re,paddingSize:De,borderSize:Yt,boxSizing:be};return Me&&nn&&(Nt[nn]=xt),xt}function wt(ne){var Me=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,nn=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null,le=arguments.length>3&&arguments[3]!==void 0?arguments[3]:null;Bt||(Bt=document.createElement("textarea"),Bt.setAttribute("tab-index","-1"),Bt.setAttribute("aria-hidden","true"),document.body.appendChild(Bt)),ne.getAttribute("wrap")?Bt.setAttribute("wrap",ne.getAttribute("wrap")):Bt.removeAttribute("wrap");var be=Xt(ne,Me),De=be.paddingSize,Yt=be.borderSize,re=be.boxSizing,xt=be.sizingStyle;Bt.setAttribute("style","".concat(xt,";").concat(nt)),Bt.value=ne.value||ne.placeholder||"";var at=void 0,se=void 0,Fe,Re=Bt.scrollHeight;if(re==="border-box"?Re+=Yt:re==="content-box"&&(Re-=De),nn!==null||le!==null){Bt.value=" ";var ge=Bt.scrollHeight-De;nn!==null&&(at=ge*nn,re==="border-box"&&(at=at+De+Yt),Re=Math.max(at,Re)),le!==null&&(se=ge*le,re==="border-box"&&(se=se+De+Yt),Fe=Re>se?"":"hidden",Re=Math.min(se,Re))}var Ie={height:Re,overflowY:Fe,resize:"none"};return at&&(Ie.minHeight=at),se&&(Ie.maxHeight=se),Ie}var ot=["prefixCls","onPressEnter","defaultValue","value","autoSize","onResize","className","style","disabled","onChange","onInternalAutoSize"],It=0,zt=1,Ot=2,pe=et.forwardRef(function(ne,Me){var nn=ne,le=nn.prefixCls,be=nn.onPressEnter,De=nn.defaultValue,Yt=nn.value,re=nn.autoSize,xt=nn.onResize,at=nn.className,se=nn.style,Fe=nn.disabled,Re=nn.onChange,ge=nn.onInternalAutoSize,Ie=(0,P.Z)(nn,ot),Ne=(0,N.Z)(De,{value:Yt,postState:function(_n){return _n!=null?_n:""}}),bt=(0,g.Z)(Ne,2),Jt=bt[0],oe=bt[1],M=function(_n){oe(_n.target.value),Re==null||Re(_n)},Q=et.useRef();et.useImperativeHandle(Me,function(){return{textArea:Q.current}});var te=et.useMemo(function(){return re&&(0,_.Z)(re)==="object"?[re.minRows,re.maxRows]:[]},[re]),Ut=(0,g.Z)(te,2),we=Ut[0],Ce=Ut[1],_e=!!re,mt=function(){try{if(document.activeElement===Q.current){var _n=Q.current,Cn=_n.selectionStart,Ln=_n.selectionEnd,En=_n.scrollTop;Q.current.setSelectionRange(Cn,Ln),Q.current.scrollTop=En}}catch(cr){}},X=et.useState(Ot),Pt=(0,g.Z)(X,2),At=Pt[0],Rt=Pt[1],_t=et.useState(),Vt=(0,g.Z)(_t,2),ae=Vt[0],fe=Vt[1],me=function(){Rt(It)};(0,Ct.Z)(function(){_e&&me()},[Yt,we,Ce,_e]),(0,Ct.Z)(function(){if(At===It)Rt(zt);else if(At===zt){var on=wt(Q.current,!1,we,Ce);Rt(Ot),fe(on)}else mt()},[At]);var Ze=et.useRef(),Ge=function(){ut.Z.cancel(Ze.current)},Ve=function(_n){At===Ot&&(xt==null||xt(_n),re&&(Ge(),Ze.current=(0,ut.Z)(function(){me()})))};et.useEffect(function(){return Ge},[]);var rn=_e?ae:null,wn=(0,R.Z)((0,R.Z)({},se),rn);return(At===It||At===zt)&&(wn.overflowY="hidden",wn.overflowX="hidden"),et.createElement(tt.Z,{onResize:Ve,disabled:!(re||xt)},et.createElement("textarea",(0,l.Z)({},Ie,{ref:Q,style:wn,className:I()(le,at,(0,O.Z)({},"".concat(le,"-disabled"),Fe)),disabled:Fe,value:Jt,onChange:M})))}),xe=pe,qt=["defaultValue","value","onFocus","onBlur","onChange","allowClear","maxLength","onCompositionStart","onCompositionEnd","suffix","prefixCls","classes","showCount","className","style","disabled","hidden","classNames","styles","onResize"];function Ye(ne,Me){return(0,b.Z)(ne||"").slice(0,Me).join("")}function We(ne,Me,nn,le){var be=nn;return ne?be=Ye(nn,le):(0,b.Z)(Me||"").length<nn.length&&(0,b.Z)(nn||"").length>le&&(be=Me),be}var Oe=et.forwardRef(function(ne,Me){var nn,le=ne.defaultValue,be=ne.value,De=ne.onFocus,Yt=ne.onBlur,re=ne.onChange,xt=ne.allowClear,at=ne.maxLength,se=ne.onCompositionStart,Fe=ne.onCompositionEnd,Re=ne.suffix,ge=ne.prefixCls,Ie=ge===void 0?"rc-textarea":ge,Ne=ne.classes,bt=ne.showCount,Jt=ne.className,oe=ne.style,M=ne.disabled,Q=ne.hidden,te=ne.classNames,Ut=ne.styles,we=ne.onResize,Ce=(0,P.Z)(ne,qt),_e=(0,N.Z)(le,{value:be,defaultValue:le}),mt=(0,g.Z)(_e,2),X=mt[0],Pt=mt[1],At=(0,et.useRef)(null),Rt=et.useState(!1),_t=(0,g.Z)(Rt,2),Vt=_t[0],ae=_t[1],fe=et.useState(!1),me=(0,g.Z)(fe,2),Ze=me[0],Ge=me[1],Ve=et.useRef(),rn=et.useRef(0),wn=et.useState(null),on=(0,g.Z)(wn,2),_n=on[0],Cn=on[1],Ln=function(){var y;(y=At.current)===null||y===void 0||y.textArea.focus()};(0,et.useImperativeHandle)(Me,function(){return{resizableTextArea:At.current,focus:Ln,blur:function(){var y;(y=At.current)===null||y===void 0||y.textArea.blur()}}}),(0,et.useEffect)(function(){ae(function(Wt){return!M&&Wt})},[M]);var En=Number(at)>0,cr=function(y){Ge(!0),Ve.current=X,rn.current=y.currentTarget.selectionStart,se==null||se(y)},Bn=function(y){Ge(!1);var E=y.currentTarget.value;if(En){var c,f=rn.current>=at+1||rn.current===((c=Ve.current)===null||c===void 0?void 0:c.length);E=We(f,Ve.current,E,at)}E!==X&&(Pt(E),(0,k.rJ)(y.currentTarget,y,re,E)),Fe==null||Fe(y)},br=function(y){var E=y.target.value;if(!Ze&&En){var c=y.target.selectionStart>=at+1||y.target.selectionStart===E.length||!y.target.selectionStart;E=We(c,X,E,at)}Pt(E),(0,k.rJ)(y.currentTarget,y,re,E)},fr=function(y){var E=Ce.onPressEnter,c=Ce.onKeyDown;y.key==="Enter"&&E&&E(y),c==null||c(y)},Zr=function(y){ae(!0),De==null||De(y)},di=function(y){ae(!1),Yt==null||Yt(y)},Xr=function(y){var E;Pt(""),Ln(),(0,k.rJ)((E=At.current)===null||E===void 0?void 0:E.textArea,y,re)},Mr=(0,k.D7)(X);!Ze&&En&&be==null&&(Mr=Ye(Mr,at));var gi=Re,yi;if(bt){var _i=(0,b.Z)(Mr).length;(0,_.Z)(bt)==="object"?yi=bt.formatter({value:Mr,count:_i,maxLength:at}):yi="".concat(_i).concat(En?" / ".concat(at):""),gi=et.createElement(et.Fragment,null,gi,et.createElement("span",{className:I()("".concat(Ie,"-data-count"),te==null?void 0:te.count),style:Ut==null?void 0:Ut.count},yi))}var qr=function(y){var E;we==null||we(y),(E=At.current)!==null&&E!==void 0&&E.textArea.style.height&&Cn(!0)},Jn=!Ce.autoSize&&!bt&&!xt,sn=et.createElement(x.BaseInput,{value:Mr,allowClear:xt,handleReset:Xr,suffix:gi,prefixCls:Ie,classes:{affixWrapper:I()(Ne==null?void 0:Ne.affixWrapper,(nn={},(0,O.Z)(nn,"".concat(Ie,"-show-count"),bt),(0,O.Z)(nn,"".concat(Ie,"-textarea-allow-clear"),xt),nn))},disabled:M,focused:Vt,className:Jt,style:(0,R.Z)((0,R.Z)({},oe),_n&&!Jn?{height:"auto"}:{}),dataAttrs:{affixWrapper:{"data-count":typeof yi=="string"?yi:void 0}},hidden:Q,inputElement:et.createElement(xe,(0,l.Z)({},Ce,{onKeyDown:fr,onChange:br,onFocus:Zr,onBlur:di,onCompositionStart:cr,onCompositionEnd:Bn,className:te==null?void 0:te.textarea,style:(0,R.Z)((0,R.Z)({},Ut==null?void 0:Ut.textarea),{},{resize:oe==null?void 0:oe.resize}),disabled:M,prefixCls:Ie,onResize:qr,ref:At}))});return sn}),Qe=Oe,Mt=Qe},48911:function(Tt,vt,d){"use strict";d.d(vt,{Z:function(){return Ne}});var l=d(54476),R=d(76190),O=d(33885),_=d(20068),g=d(42978),P=d(75931),b=d(92310),A=d.n(b),I=d(29301),x=d(70425),k=d(34280),N=d(59301),et=d(4676),tt=N.forwardRef(function(bt,Jt){var oe=bt.height,M=bt.offsetY,Q=bt.offsetX,te=bt.children,Ut=bt.prefixCls,we=bt.onInnerResize,Ce=bt.innerProps,_e=bt.rtl,mt=bt.extra,X={},Pt={display:"flex",flexDirection:"column"};return M!==void 0&&(X={height:oe,position:"relative",overflow:"hidden"},Pt=(0,O.Z)((0,O.Z)({},Pt),{},(0,_.Z)((0,_.Z)((0,_.Z)((0,_.Z)((0,_.Z)({transform:"translateY(".concat(M,"px)")},_e?"marginRight":"marginLeft",-Q),"position","absolute"),"left",0),"right",0),"top",0))),N.createElement("div",{style:X},N.createElement(I.Z,{onResize:function(Rt){var _t=Rt.offsetHeight;_t&&we&&we()}},N.createElement("div",(0,l.Z)({style:Pt,className:A()((0,_.Z)({},"".concat(Ut,"-holder-inner"),Ut)),ref:Jt},Ce),te,mt)))});tt.displayName="Filler";var Ct=tt;function ut(bt){var Jt=bt.children,oe=bt.setRef,M=N.useCallback(function(Q){oe(Q)},[]);return N.cloneElement(Jt,{ref:M})}function nt(bt,Jt,oe,M,Q,te,Ut,we){var Ce=we.getKey;return bt.slice(Jt,oe+1).map(function(_e,mt){var X=Jt+mt,Pt=Ut(_e,X,{style:{width:M},offsetX:Q}),At=Ce(_e);return N.createElement(ut,{key:At,setRef:function(_t){return te(_e,_t)}},Pt)})}function kt(bt,Jt,oe,M){var Q=oe-bt,te=Jt-oe,Ut=Math.min(Q,te)*2;if(M<=Ut){var we=Math.floor(M/2);return M%2?oe+we+1:oe-we}return Q>te?oe-(M-te):oe+(M-Q)}function Nt(bt,Jt,oe){var M=bt.length,Q=Jt.length,te,Ut;if(M===0&&Q===0)return null;M<Q?(te=bt,Ut=Jt):(te=Jt,Ut=bt);var we={__EMPTY_ITEM__:!0};function Ce(Rt){return Rt!==void 0?oe(Rt):we}for(var _e=null,mt=Math.abs(M-Q)!==1,X=0;X<Ut.length;X+=1){var Pt=Ce(te[X]),At=Ce(Ut[X]);if(Pt!==At){_e=X,mt=mt||Pt!==Ce(Ut[X+1]);break}}return _e===null?null:{index:_e,multiple:mt}}function Bt(bt,Jt,oe){var M=N.useState(bt),Q=(0,g.Z)(M,2),te=Q[0],Ut=Q[1],we=N.useState(null),Ce=(0,g.Z)(we,2),_e=Ce[0],mt=Ce[1];return N.useEffect(function(){var X=Nt(te||[],bt||[],Jt);(X==null?void 0:X.index)!==void 0&&(oe==null||oe(X.index),mt(bt[X.index])),Ut(bt)},[bt]),[_e]}var Xt=d(16089),wt=(typeof navigator=="undefined"?"undefined":(0,R.Z)(navigator))==="object"&&/Firefox/i.test(navigator.userAgent),ot=wt,It=function(bt,Jt,oe,M){var Q=(0,N.useRef)(!1),te=(0,N.useRef)(null);function Ut(){clearTimeout(te.current),Q.current=!0,te.current=setTimeout(function(){Q.current=!1},50)}var we=(0,N.useRef)({top:bt,bottom:Jt,left:oe,right:M});return we.current.top=bt,we.current.bottom=Jt,we.current.left=oe,we.current.right=M,function(Ce,_e){var mt=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,X=Ce?_e<0&&we.current.left||_e>0&&we.current.right:_e<0&&we.current.top||_e>0&&we.current.bottom;return mt&&X?(clearTimeout(te.current),Q.current=!1):(!X||Q.current)&&Ut(),!Q.current&&X}};function zt(bt,Jt,oe,M,Q,te,Ut){var we=(0,N.useRef)(0),Ce=(0,N.useRef)(null),_e=(0,N.useRef)(null),mt=(0,N.useRef)(!1),X=It(Jt,oe,M,Q);function Pt(fe,me){if(Xt.Z.cancel(Ce.current),!X(!1,me)){var Ze=fe;if(!Ze._virtualHandled)Ze._virtualHandled=!0;else return;we.current+=me,_e.current=me,ot||Ze.preventDefault(),Ce.current=(0,Xt.Z)(function(){var Ge=mt.current?10:1;Ut(we.current*Ge,!1),we.current=0})}}function At(fe,me){Ut(me,!0),ot||fe.preventDefault()}var Rt=(0,N.useRef)(null),_t=(0,N.useRef)(null);function Vt(fe){if(bt){Xt.Z.cancel(_t.current),_t.current=(0,Xt.Z)(function(){Rt.current=null},2);var me=fe.deltaX,Ze=fe.deltaY,Ge=fe.shiftKey,Ve=me,rn=Ze;(Rt.current==="sx"||!Rt.current&&Ge&&Ze&&!me)&&(Ve=Ze,rn=0,Rt.current="sx");var wn=Math.abs(Ve),on=Math.abs(rn);Rt.current===null&&(Rt.current=te&&wn>on?"x":"y"),Rt.current==="y"?Pt(fe,rn):At(fe,Ve)}}function ae(fe){bt&&(mt.current=fe.detail===_e.current)}return[Vt,ae]}function Ot(bt,Jt,oe,M){var Q=N.useMemo(function(){return[new Map,[]]},[bt,oe.id,M]),te=(0,g.Z)(Q,2),Ut=te[0],we=te[1],Ce=function(mt){var X=arguments.length>1&&arguments[1]!==void 0?arguments[1]:mt,Pt=Ut.get(mt),At=Ut.get(X);if(Pt===void 0||At===void 0)for(var Rt=bt.length,_t=we.length;_t<Rt;_t+=1){var Vt,ae=bt[_t],fe=Jt(ae);Ut.set(fe,_t);var me=(Vt=oe.get(fe))!==null&&Vt!==void 0?Vt:M;if(we[_t]=(we[_t-1]||0)+me,fe===mt&&(Pt=_t),fe===X&&(At=_t),Pt!==void 0&&At!==void 0)break}return{top:we[Pt-1]||0,bottom:we[At]}};return Ce}var pe=d(67732),xe=d(83652),qt=function(){function bt(){(0,pe.Z)(this,bt),(0,_.Z)(this,"maps",void 0),(0,_.Z)(this,"id",0),(0,_.Z)(this,"diffRecords",new Map),this.maps=Object.create(null)}return(0,xe.Z)(bt,[{key:"set",value:function(oe,M){this.diffRecords.set(oe,this.maps[oe]),this.maps[oe]=M,this.id+=1}},{key:"get",value:function(oe){return this.maps[oe]}},{key:"resetRecord",value:function(){this.diffRecords.clear()}},{key:"getRecord",value:function(){return this.diffRecords}}]),bt}(),Ye=qt;function We(bt){var Jt=parseFloat(bt);return isNaN(Jt)?0:Jt}function Oe(bt,Jt,oe){var M=N.useState(0),Q=(0,g.Z)(M,2),te=Q[0],Ut=Q[1],we=(0,N.useRef)(new Map),Ce=(0,N.useRef)(new Ye),_e=(0,N.useRef)(0);function mt(){_e.current+=1}function X(){var At=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1;mt();var Rt=function(){var ae=!1;we.current.forEach(function(fe,me){if(fe&&fe.offsetParent){var Ze=fe.offsetHeight,Ge=getComputedStyle(fe),Ve=Ge.marginTop,rn=Ge.marginBottom,wn=We(Ve),on=We(rn),_n=Ze+wn+on;Ce.current.get(me)!==_n&&(Ce.current.set(me,_n),ae=!0)}}),ae&&Ut(function(fe){return fe+1})};if(At)Rt();else{_e.current+=1;var _t=_e.current;Promise.resolve().then(function(){_t===_e.current&&Rt()})}}function Pt(At,Rt){var _t=bt(At),Vt=we.current.get(_t);Rt?(we.current.set(_t,Rt),X()):we.current.delete(_t),!Vt!=!Rt&&(Rt?Jt==null||Jt(At):oe==null||oe(At))}return(0,N.useEffect)(function(){return mt},[]),[Pt,X,Ce.current,te]}var Qe=14/15;function Mt(bt,Jt,oe){var M=(0,N.useRef)(!1),Q=(0,N.useRef)(0),te=(0,N.useRef)(0),Ut=(0,N.useRef)(null),we=(0,N.useRef)(null),Ce,_e=function(At){if(M.current){var Rt=Math.ceil(At.touches[0].pageX),_t=Math.ceil(At.touches[0].pageY),Vt=Q.current-Rt,ae=te.current-_t,fe=Math.abs(Vt)>Math.abs(ae);fe?Q.current=Rt:te.current=_t;var me=oe(fe,fe?Vt:ae,!1,At);me&&At.preventDefault(),clearInterval(we.current),me&&(we.current=setInterval(function(){fe?Vt*=Qe:ae*=Qe;var Ze=Math.floor(fe?Vt:ae);(!oe(fe,Ze,!0)||Math.abs(Ze)<=.1)&&clearInterval(we.current)},16))}},mt=function(){M.current=!1,Ce()},X=function(At){Ce(),At.touches.length===1&&!M.current&&(M.current=!0,Q.current=Math.ceil(At.touches[0].pageX),te.current=Math.ceil(At.touches[0].pageY),Ut.current=At.target,Ut.current.addEventListener("touchmove",_e,{passive:!1}),Ut.current.addEventListener("touchend",mt,{passive:!0}))};Ce=function(){Ut.current&&(Ut.current.removeEventListener("touchmove",_e),Ut.current.removeEventListener("touchend",mt))},(0,k.Z)(function(){return bt&&Jt.current.addEventListener("touchstart",X,{passive:!0}),function(){var Pt;(Pt=Jt.current)===null||Pt===void 0||Pt.removeEventListener("touchstart",X),Ce(),clearInterval(we.current)}},[bt])}function ne(bt){return Math.floor(Math.pow(bt,.5))}function Me(bt,Jt){var oe="touches"in bt?bt.touches[0]:bt;return oe[Jt?"pageX":"pageY"]-window[Jt?"scrollX":"scrollY"]}function nn(bt,Jt,oe){N.useEffect(function(){var M=Jt.current;if(bt&&M){var Q=!1,te,Ut,we=function(){Xt.Z.cancel(te)},Ce=function Pt(){we(),te=(0,Xt.Z)(function(){oe(Ut),Pt()})},_e=function(){Q=!1,we()},mt=function(At){if(!(At.target.draggable||At.button!==0)){var Rt=At;Rt._virtualHandled||(Rt._virtualHandled=!0,Q=!0)}},X=function(At){if(Q){var Rt=Me(At,!1),_t=M.getBoundingClientRect(),Vt=_t.top,ae=_t.bottom;if(Rt<=Vt){var fe=Vt-Rt;Ut=-ne(fe),Ce()}else if(Rt>=ae){var me=Rt-ae;Ut=ne(me),Ce()}else we()}};return M.addEventListener("mousedown",mt),M.ownerDocument.addEventListener("mouseup",_e),M.ownerDocument.addEventListener("mousemove",X),M.ownerDocument.addEventListener("dragend",_e),function(){M.removeEventListener("mousedown",mt),M.ownerDocument.removeEventListener("mouseup",_e),M.ownerDocument.removeEventListener("mousemove",X),M.ownerDocument.removeEventListener("dragend",_e),we()}}},[bt])}var le=10;function be(bt,Jt,oe,M,Q,te,Ut,we){var Ce=N.useRef(),_e=N.useState(null),mt=(0,g.Z)(_e,2),X=mt[0],Pt=mt[1];return(0,k.Z)(function(){if(X&&X.times<le){if(!bt.current){Pt(function(di){return(0,O.Z)({},di)});return}te();var At=X.targetAlign,Rt=X.originAlign,_t=X.index,Vt=X.offset,ae=bt.current.clientHeight,fe=!1,me=At,Ze=null;if(ae){for(var Ge=At||Rt,Ve=0,rn=0,wn=0,on=Math.min(Jt.length-1,_t),_n=0;_n<=on;_n+=1){var Cn=Q(Jt[_n]);rn=Ve;var Ln=oe.get(Cn);wn=rn+(Ln===void 0?M:Ln),Ve=wn}for(var En=Ge==="top"?Vt:ae-Vt,cr=on;cr>=0;cr-=1){var Bn=Q(Jt[cr]),br=oe.get(Bn);if(br===void 0){fe=!0;break}if(En-=br,En<=0)break}switch(Ge){case"top":Ze=rn-Vt;break;case"bottom":Ze=wn-ae+Vt;break;default:{var fr=bt.current.scrollTop,Zr=fr+ae;rn<fr?me="top":wn>Zr&&(me="bottom")}}Ze!==null&&Ut(Ze),Ze!==X.lastTop&&(fe=!0)}fe&&Pt((0,O.Z)((0,O.Z)({},X),{},{times:X.times+1,targetAlign:me,lastTop:Ze}))}},[X,bt.current]),function(At){if(At==null){we();return}if(Xt.Z.cancel(Ce.current),typeof At=="number")Ut(At);else if(At&&(0,R.Z)(At)==="object"){var Rt,_t=At.align;"index"in At?Rt=At.index:Rt=Jt.findIndex(function(fe){return Q(fe)===At.key});var Vt=At.offset,ae=Vt===void 0?0:Vt;Pt({times:0,index:Rt,offset:ae,originAlign:_t})}}}var De=N.forwardRef(function(bt,Jt){var oe=bt.prefixCls,M=bt.rtl,Q=bt.scrollOffset,te=bt.scrollRange,Ut=bt.onStartMove,we=bt.onStopMove,Ce=bt.onScroll,_e=bt.horizontal,mt=bt.spinSize,X=bt.containerSize,Pt=bt.style,At=bt.thumbStyle,Rt=bt.showScrollBar,_t=N.useState(!1),Vt=(0,g.Z)(_t,2),ae=Vt[0],fe=Vt[1],me=N.useState(null),Ze=(0,g.Z)(me,2),Ge=Ze[0],Ve=Ze[1],rn=N.useState(null),wn=(0,g.Z)(rn,2),on=wn[0],_n=wn[1],Cn=!M,Ln=N.useRef(),En=N.useRef(),cr=N.useState(Rt),Bn=(0,g.Z)(cr,2),br=Bn[0],fr=Bn[1],Zr=N.useRef(),di=function(){Rt===!0||Rt===!1||(clearTimeout(Zr.current),fr(!0),Zr.current=setTimeout(function(){fr(!1)},3e3))},Xr=te-X||0,Mr=X-mt||0,gi=N.useMemo(function(){if(Q===0||Xr===0)return 0;var c=Q/Xr;return c*Mr},[Q,Xr,Mr]),yi=function(f){f.stopPropagation(),f.preventDefault()},_i=N.useRef({top:gi,dragging:ae,pageY:Ge,startTop:on});_i.current={top:gi,dragging:ae,pageY:Ge,startTop:on};var qr=function(f){fe(!0),Ve(Me(f,_e)),_n(_i.current.top),Ut(),f.stopPropagation(),f.preventDefault()};N.useEffect(function(){var c=function(z){z.preventDefault()},f=Ln.current,w=En.current;return f.addEventListener("touchstart",c,{passive:!1}),w.addEventListener("touchstart",qr,{passive:!1}),function(){f.removeEventListener("touchstart",c),w.removeEventListener("touchstart",qr)}},[]);var Jn=N.useRef();Jn.current=Xr;var sn=N.useRef();sn.current=Mr,N.useEffect(function(){if(ae){var c,f=function(z){var H=_i.current,q=H.dragging,Dt=H.pageY,U=H.startTop;Xt.Z.cancel(c);var Y=Ln.current.getBoundingClientRect(),G=X/(_e?Y.width:Y.height);if(q){var J=(Me(z,_e)-Dt)*G,pt=U;!Cn&&_e?pt-=J:pt+=J;var Kt=Jn.current,yt=sn.current,Qt=yt?pt/yt:0,ct=Math.ceil(Qt*Kt);ct=Math.max(ct,0),ct=Math.min(ct,Kt),c=(0,Xt.Z)(function(){Ce(ct,_e)})}},w=function(){fe(!1),we()};return window.addEventListener("mousemove",f,{passive:!0}),window.addEventListener("touchmove",f,{passive:!0}),window.addEventListener("mouseup",w,{passive:!0}),window.addEventListener("touchend",w,{passive:!0}),function(){window.removeEventListener("mousemove",f),window.removeEventListener("touchmove",f),window.removeEventListener("mouseup",w),window.removeEventListener("touchend",w),Xt.Z.cancel(c)}}},[ae]),N.useEffect(function(){return di(),function(){clearTimeout(Zr.current)}},[Q]),N.useImperativeHandle(Jt,function(){return{delayHidden:di}});var Wt="".concat(oe,"-scrollbar"),y={position:"absolute",visibility:br?null:"hidden"},E={position:"absolute",borderRadius:99,background:"var(--rc-virtual-list-scrollbar-bg, rgba(0, 0, 0, 0.5))",cursor:"pointer",userSelect:"none"};return _e?(Object.assign(y,{height:8,left:0,right:0,bottom:0}),Object.assign(E,(0,_.Z)({height:"100%",width:mt},Cn?"left":"right",gi))):(Object.assign(y,(0,_.Z)({width:8,top:0,bottom:0},Cn?"right":"left",0)),Object.assign(E,{width:"100%",height:mt,top:gi})),N.createElement("div",{ref:Ln,className:A()(Wt,(0,_.Z)((0,_.Z)((0,_.Z)({},"".concat(Wt,"-horizontal"),_e),"".concat(Wt,"-vertical"),!_e),"".concat(Wt,"-visible"),br)),style:(0,O.Z)((0,O.Z)({},y),Pt),onMouseDown:yi,onMouseMove:di},N.createElement("div",{ref:En,className:A()("".concat(Wt,"-thumb"),(0,_.Z)({},"".concat(Wt,"-thumb-moving"),ae)),style:(0,O.Z)((0,O.Z)({},E),At),onMouseDown:qr}))}),Yt=De,re=20;function xt(){var bt=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,Jt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,oe=bt/Jt*bt;return isNaN(oe)&&(oe=0),oe=Math.max(oe,re),Math.floor(oe)}var at=["prefixCls","className","height","itemHeight","fullHeight","style","data","children","itemKey","virtual","direction","scrollWidth","component","onScroll","onVirtualScroll","onVisibleChange","innerProps","extraRender","styles","showScrollBar"],se=[],Fe={overflowY:"auto",overflowAnchor:"none"};function Re(bt,Jt){var oe=bt.prefixCls,M=oe===void 0?"rc-virtual-list":oe,Q=bt.className,te=bt.height,Ut=bt.itemHeight,we=bt.fullHeight,Ce=we===void 0?!0:we,_e=bt.style,mt=bt.data,X=bt.children,Pt=bt.itemKey,At=bt.virtual,Rt=bt.direction,_t=bt.scrollWidth,Vt=bt.component,ae=Vt===void 0?"div":Vt,fe=bt.onScroll,me=bt.onVirtualScroll,Ze=bt.onVisibleChange,Ge=bt.innerProps,Ve=bt.extraRender,rn=bt.styles,wn=bt.showScrollBar,on=wn===void 0?"optional":wn,_n=(0,P.Z)(bt,at),Cn=N.useCallback(function(Tr){return typeof Pt=="function"?Pt(Tr):Tr==null?void 0:Tr[Pt]},[Pt]),Ln=Oe(Cn,null,null),En=(0,g.Z)(Ln,4),cr=En[0],Bn=En[1],br=En[2],fr=En[3],Zr=!!(At!==!1&&te&&Ut),di=N.useMemo(function(){return Object.values(br.maps).reduce(function(Tr,hr){return Tr+hr},0)},[br.id,br.maps]),Xr=Zr&&mt&&(Math.max(Ut*mt.length,di)>te||!!_t),Mr=Rt==="rtl",gi=A()(M,(0,_.Z)({},"".concat(M,"-rtl"),Mr),Q),yi=mt||se,_i=(0,N.useRef)(),qr=(0,N.useRef)(),Jn=(0,N.useRef)(),sn=(0,N.useState)(0),Wt=(0,g.Z)(sn,2),y=Wt[0],E=Wt[1],c=(0,N.useState)(0),f=(0,g.Z)(c,2),w=f[0],Z=f[1],z=(0,N.useState)(!1),H=(0,g.Z)(z,2),q=H[0],Dt=H[1],U=function(){Dt(!0)},Y=function(){Dt(!1)},G={getKey:Cn};function J(Tr){E(function(hr){var $r;typeof Tr=="function"?$r=Tr(hr):$r=Tr;var ni=Wn($r);return _i.current.scrollTop=ni,ni})}var pt=(0,N.useRef)({start:0,end:yi.length}),Kt=(0,N.useRef)(),yt=Bt(yi,Cn),Qt=(0,g.Z)(yt,1),ct=Qt[0];Kt.current=ct;var ht=N.useMemo(function(){if(!Zr)return{scrollHeight:void 0,start:0,end:yi.length-1,offset:void 0};if(!Xr){var Tr;return{scrollHeight:((Tr=qr.current)===null||Tr===void 0?void 0:Tr.offsetHeight)||0,start:0,end:yi.length-1,offset:void 0}}for(var hr=0,$r,ni,Bi,ya=yi.length,qi=0;qi<ya;qi+=1){var va=yi[qi],Ka=Cn(va),ea=br.get(Ka),Na=hr+(ea===void 0?Ut:ea);Na>=y&&$r===void 0&&($r=qi,ni=hr),Na>y+te&&Bi===void 0&&(Bi=qi),hr=Na}return $r===void 0&&($r=0,ni=0,Bi=Math.ceil(te/Ut)),Bi===void 0&&(Bi=yi.length-1),Bi=Math.min(Bi+1,yi.length-1),{scrollHeight:hr,start:$r,end:Bi,offset:ni}},[Xr,Zr,y,yi,fr,te]),rt=ht.scrollHeight,$t=ht.start,Ht=ht.end,ue=ht.offset;pt.current.start=$t,pt.current.end=Ht,N.useLayoutEffect(function(){var Tr=br.getRecord();if(Tr.size===1){var hr=Array.from(Tr.keys())[0],$r=Tr.get(hr),ni=yi[$t];if(ni&&$r===void 0){var Bi=Cn(ni);if(Bi===hr){var ya=br.get(hr),qi=ya-Ut;J(function(va){return va+qi})}}}br.resetRecord()},[rt]);var Ee=N.useState({width:0,height:te}),ie=(0,g.Z)(Ee,2),Pe=ie[0],Be=ie[1],He=function(hr){Be({width:hr.offsetWidth,height:hr.offsetHeight})},en=(0,N.useRef)(),un=(0,N.useRef)(),mn=N.useMemo(function(){return xt(Pe.width,_t)},[Pe.width,_t]),Sn=N.useMemo(function(){return xt(Pe.height,rt)},[Pe.height,rt]),Pn=rt-te,$n=(0,N.useRef)(Pn);$n.current=Pn;function Wn(Tr){var hr=Tr;return Number.isNaN($n.current)||(hr=Math.min(hr,$n.current)),hr=Math.max(hr,0),hr}var Xn=y<=0,An=y>=Pn,Zn=w<=0,qn=w>=_t,er=It(Xn,An,Zn,qn),Cr=function(){return{x:Mr?-w:w,y}},Un=(0,N.useRef)(Cr()),ar=(0,x.useEvent)(function(Tr){if(me){var hr=(0,O.Z)((0,O.Z)({},Cr()),Tr);(Un.current.x!==hr.x||Un.current.y!==hr.y)&&(me(hr),Un.current=hr)}});function ii(Tr,hr){var $r=Tr;hr?((0,et.flushSync)(function(){Z($r)}),ar()):J($r)}function Or(Tr){var hr=Tr.currentTarget.scrollTop;hr!==y&&J(hr),fe==null||fe(Tr),ar()}var Lr=function(hr){var $r=hr,ni=_t?_t-Pe.width:0;return $r=Math.max($r,0),$r=Math.min($r,ni),$r},fi=(0,x.useEvent)(function(Tr,hr){hr?((0,et.flushSync)(function(){Z(function($r){var ni=$r+(Mr?-Tr:Tr);return Lr(ni)})}),ar()):J(function($r){var ni=$r+Tr;return ni})}),zr=zt(Zr,Xn,An,Zn,qn,!!_t,fi),Er=(0,g.Z)(zr,2),mr=Er[0],si=Er[1];Mt(Zr,_i,function(Tr,hr,$r,ni){var Bi=ni;return er(Tr,hr,$r)?!1:!Bi||!Bi._virtualHandled?(Bi&&(Bi._virtualHandled=!0),mr({preventDefault:function(){},deltaX:Tr?hr:0,deltaY:Tr?0:hr}),!0):!1}),nn(Xr,_i,function(Tr){J(function(hr){return hr+Tr})}),(0,k.Z)(function(){function Tr($r){var ni=Xn&&$r.detail<0,Bi=An&&$r.detail>0;Zr&&!ni&&!Bi&&$r.preventDefault()}var hr=_i.current;return hr.addEventListener("wheel",mr,{passive:!1}),hr.addEventListener("DOMMouseScroll",si,{passive:!0}),hr.addEventListener("MozMousePixelScroll",Tr,{passive:!1}),function(){hr.removeEventListener("wheel",mr),hr.removeEventListener("DOMMouseScroll",si),hr.removeEventListener("MozMousePixelScroll",Tr)}},[Zr,Xn,An]),(0,k.Z)(function(){if(_t){var Tr=Lr(w);Z(Tr),ar({x:Tr})}},[Pe.width,_t]);var Si=function(){var hr,$r;(hr=en.current)===null||hr===void 0||hr.delayHidden(),($r=un.current)===null||$r===void 0||$r.delayHidden()},Mi=be(_i,yi,br,Ut,Cn,function(){return Bn(!0)},J,Si);N.useImperativeHandle(Jt,function(){return{nativeElement:Jn.current,getScrollInfo:Cr,scrollTo:function(hr){function $r(ni){return ni&&(0,R.Z)(ni)==="object"&&("left"in ni||"top"in ni)}$r(hr)?(hr.left!==void 0&&Z(Lr(hr.left)),Mi(hr.top)):Mi(hr)}}}),(0,k.Z)(function(){if(Ze){var Tr=yi.slice($t,Ht+1);Ze(Tr,yi)}},[$t,Ht,yi]);var pi=Ot(yi,Cn,br,Ut),Wi=Ve==null?void 0:Ve({start:$t,end:Ht,virtual:Xr,offsetX:w,offsetY:ue,rtl:Mr,getSize:pi}),Ji=nt(yi,$t,Ht,_t,w,cr,X,G),Hn=null;te&&(Hn=(0,O.Z)((0,_.Z)({},Ce?"height":"maxHeight",te),Fe),Zr&&(Hn.overflowY="hidden",_t&&(Hn.overflowX="hidden"),q&&(Hn.pointerEvents="none")));var ra={};return Mr&&(ra.dir="rtl"),N.createElement("div",(0,l.Z)({ref:Jn,style:(0,O.Z)((0,O.Z)({},_e),{},{position:"relative"}),className:gi},ra,_n),N.createElement(I.Z,{onResize:He},N.createElement(ae,{className:"".concat(M,"-holder"),style:Hn,ref:_i,onScroll:Or,onMouseEnter:Si},N.createElement(Ct,{prefixCls:M,height:rt,offsetX:w,offsetY:ue,scrollWidth:_t,onInnerResize:Bn,ref:qr,innerProps:Ge,rtl:Mr,extra:Wi},Ji))),Xr&&rt>te&&N.createElement(Yt,{ref:en,prefixCls:M,scrollOffset:y,scrollRange:rt,rtl:Mr,onScroll:ii,onStartMove:U,onStopMove:Y,spinSize:Sn,containerSize:Pe.height,style:rn==null?void 0:rn.verticalScrollBar,thumbStyle:rn==null?void 0:rn.verticalScrollBarThumb,showScrollBar:on}),Xr&&_t>Pe.width&&N.createElement(Yt,{ref:un,prefixCls:M,scrollOffset:w,scrollRange:_t,rtl:Mr,onScroll:ii,onStartMove:U,onStopMove:Y,spinSize:mn,containerSize:Pe.width,horizontal:!0,style:rn==null?void 0:rn.horizontalScrollBar,thumbStyle:rn==null?void 0:rn.horizontalScrollBarThumb,showScrollBar:on}))}var ge=N.forwardRef(Re);ge.displayName="List";var Ie=ge,Ne=Ie},81683:function(Tt,vt,d){"use strict";var l=d(55973),R=Array.prototype.concat,O=Array.prototype.slice,_=Tt.exports=function(P){for(var b=[],A=0,I=P.length;A<I;A++){var x=P[A];l(x)?b=R.call(b,O.call(x)):b.push(x)}return b};_.wrap=function(g){return function(){return g(_(arguments))}}},22214:function(Tt,vt,d){"use strict";d.d(vt,{Z:function(){return _}});var l=d(58289),R=d(75538),O=d(85458);function _(g,P,b){return P=(0,l.Z)(P),(0,O.Z)(g,(0,R.Z)()?Reflect.construct(P,b||[],(0,l.Z)(g).constructor):P.apply(g,b))}},19251:function(Tt,vt,d){"use strict";d.d(vt,{Z:function(){return R}});var l=d(3208);function R(O,_){var g=typeof Symbol!="undefined"&&O[Symbol.iterator]||O["@@iterator"];if(!g){if(Array.isArray(O)||(g=(0,l.Z)(O))||_&&O&&typeof O.length=="number"){g&&(O=g);var P=0,b=function(){};return{s:b,n:function(){return P>=O.length?{done:!0}:{done:!1,value:O[P++]}},e:function(N){throw N},f:b}}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 A,I=!0,x=!1;return{s:function(){g=g.call(O)},n:function(){var N=g.next();return I=N.done,N},e:function(N){x=!0,A=N},f:function(){try{I||g.return==null||g.return()}finally{if(x)throw A}}}}},53754:function(Tt,vt,d){"use strict";d.d(vt,{Sc:function(){return zt},y3:function(){return x}});var l=d(49529);const R=l.XA,O=l.a_,_=l.yQ,g=l.Hs,P=l.Ec,b=l.dx,A=l.LU,I=l.Rm,x=l.y3,k=l.qK,N=l.pb,et=l.j,tt=l.sO,Ct=l.BZ,ut=l.EK,nt=l.Db,kt=l.Fx,Nt=l.tU,Bt=l.Ym,Xt=l.rs,wt=l.QR,ot=l.TB,It=l.oH,zt=l.Sc,Ot=l.BN,pe=l.it,xe=l.$r,qt=l.QM,Ye=l.AV;var We=(l.y3,l.y3);const Oe=l.GH,Qe=l.SO,Mt=l.uZ,ne=l.yU,Me=l.F1,nn=l.re},96262:function(Tt,vt,d){"use strict";d.d(vt,{Ud:function(){return tt},Yy:function(){return O}});const l=Symbol("Comlink.proxy"),R=Symbol("Comlink.endpoint"),O=Symbol("Comlink.releaseProxy"),_=Symbol("Comlink.finalizer"),g=Symbol("Comlink.thrown"),P=Oe=>typeof Oe=="object"&&Oe!==null||typeof Oe=="function",b={canHandle:Oe=>P(Oe)&&Oe[l],serialize(Oe){const{port1:Qe,port2:Mt}=new MessageChannel;return k(Oe,Qe),[Mt,[Mt]]},deserialize(Oe){return Oe.start(),tt(Oe)}},A={canHandle:Oe=>P(Oe)&&g in Oe,serialize({value:Oe}){let Qe;return Oe instanceof Error?Qe={isError:!0,value:{message:Oe.message,name:Oe.name,stack:Oe.stack}}:Qe={isError:!1,value:Oe},[Qe,[]]},deserialize(Oe){throw Oe.isError?Object.assign(new Error(Oe.value.message),Oe.value):Oe.value}},I=new Map([["proxy",b],["throw",A]]);function x(Oe,Qe){for(const Mt of Oe)if(Qe===Mt||Mt==="*"||Mt instanceof RegExp&&Mt.test(Qe))return!0;return!1}function k(Oe,Qe=globalThis,Mt=["*"]){Qe.addEventListener("message",function ne(Me){if(!Me||!Me.data)return;if(!x(Mt,Me.origin)){console.warn(`Invalid origin '${Me.origin}' for comlink proxy`);return}const{id:nn,type:le,path:be}=Object.assign({path:[]},Me.data),De=(Me.data.argumentList||[]).map(qt);let Yt;try{const re=be.slice(0,-1).reduce((at,se)=>at[se],Oe),xt=be.reduce((at,se)=>at[se],Oe);switch(le){case"GET":Yt=xt;break;case"SET":re[be.slice(-1)[0]]=qt(Me.data.value),Yt=!0;break;case"APPLY":Yt=xt.apply(re,De);break;case"CONSTRUCT":{const at=new xt(...De);Yt=Ot(at)}break;case"ENDPOINT":{const{port1:at,port2:se}=new MessageChannel;k(Oe,se),Yt=zt(at,[at])}break;case"RELEASE":Yt=void 0;break;default:return}}catch(re){Yt={value:re,[g]:0}}Promise.resolve(Yt).catch(re=>({value:re,[g]:0})).then(re=>{const[xt,at]=xe(re);Qe.postMessage(Object.assign(Object.assign({},xt),{id:nn}),at),le==="RELEASE"&&(Qe.removeEventListener("message",ne),et(Qe),_ in Oe&&typeof Oe[_]=="function"&&Oe[_]())}).catch(re=>{const[xt,at]=xe({value:new TypeError("Unserializable return value"),[g]:0});Qe.postMessage(Object.assign(Object.assign({},xt),{id:nn}),at)})}),Qe.start&&Qe.start()}function N(Oe){return Oe.constructor.name==="MessagePort"}function et(Oe){N(Oe)&&Oe.close()}function tt(Oe,Qe){const Mt=new Map;return Oe.addEventListener("message",function(Me){const{data:nn}=Me;if(!nn||!nn.id)return;const le=Mt.get(nn.id);if(le)try{le(nn)}finally{Mt.delete(nn.id)}}),Xt(Oe,Mt,[],Qe)}function Ct(Oe){if(Oe)throw new Error("Proxy has been released and is not useable")}function ut(Oe){return Ye(Oe,new Map,{type:"RELEASE"}).then(()=>{et(Oe)})}const nt=new WeakMap,kt="FinalizationRegistry"in globalThis&&new FinalizationRegistry(Oe=>{const Qe=(nt.get(Oe)||0)-1;nt.set(Oe,Qe),Qe===0&&ut(Oe)});function Nt(Oe,Qe){const Mt=(nt.get(Qe)||0)+1;nt.set(Qe,Mt),kt&&kt.register(Oe,Qe,Oe)}function Bt(Oe){kt&&kt.unregister(Oe)}function Xt(Oe,Qe,Mt=[],ne=function(){}){let Me=!1;const nn=new Proxy(ne,{get(le,be){if(Ct(Me),be===O)return()=>{Bt(nn),ut(Oe),Qe.clear(),Me=!0};if(be==="then"){if(Mt.length===0)return{then:()=>nn};const De=Ye(Oe,Qe,{type:"GET",path:Mt.map(Yt=>Yt.toString())}).then(qt);return De.then.bind(De)}return Xt(Oe,Qe,[...Mt,be])},set(le,be,De){Ct(Me);const[Yt,re]=xe(De);return Ye(Oe,Qe,{type:"SET",path:[...Mt,be].map(xt=>xt.toString()),value:Yt},re).then(qt)},apply(le,be,De){Ct(Me);const Yt=Mt[Mt.length-1];if(Yt===R)return Ye(Oe,Qe,{type:"ENDPOINT"}).then(qt);if(Yt==="bind")return Xt(Oe,Qe,Mt.slice(0,-1));const[re,xt]=ot(De);return Ye(Oe,Qe,{type:"APPLY",path:Mt.map(at=>at.toString()),argumentList:re},xt).then(qt)},construct(le,be){Ct(Me);const[De,Yt]=ot(be);return Ye(Oe,Qe,{type:"CONSTRUCT",path:Mt.map(re=>re.toString()),argumentList:De},Yt).then(qt)}});return Nt(nn,Oe),nn}function wt(Oe){return Array.prototype.concat.apply([],Oe)}function ot(Oe){const Qe=Oe.map(xe);return[Qe.map(Mt=>Mt[0]),wt(Qe.map(Mt=>Mt[1]))]}const It=new WeakMap;function zt(Oe,Qe){return It.set(Oe,Qe),Oe}function Ot(Oe){return Object.assign(Oe,{[l]:!0})}function pe(Oe,Qe=globalThis,Mt="*"){return{postMessage:(ne,Me)=>Oe.postMessage(ne,Mt,Me),addEventListener:Qe.addEventListener.bind(Qe),removeEventListener:Qe.removeEventListener.bind(Qe)}}function xe(Oe){for(const[Qe,Mt]of I)if(Mt.canHandle(Oe)){const[ne,Me]=Mt.serialize(Oe);return[{type:"HANDLER",name:Qe,value:ne},Me]}return[{type:"RAW",value:Oe},It.get(Oe)||[]]}function qt(Oe){switch(Oe.type){case"HANDLER":return I.get(Oe.name).deserialize(Oe.value);case"RAW":return Oe.value}}function Ye(Oe,Qe,Mt,ne){return new Promise(Me=>{const nn=We();Qe.set(nn,Me),Oe.start&&Oe.start(),Oe.postMessage(Object.assign({id:nn},Mt),ne)})}function We(){return new Array(4).fill(0).map(()=>Math.floor(Math.random()*Number.MAX_SAFE_INTEGER).toString(16)).join("-")}},32575:function(Tt,vt,d){"use strict";d.d(vt,{Z:function(){return l}});function l(R,O){var _,g=1;R==null&&(R=0),O==null&&(O=0);function P(){var b,A=_.length,I,x=0,k=0;for(b=0;b<A;++b)I=_[b],x+=I.x,k+=I.y;for(x=(x/A-R)*g,k=(k/A-O)*g,b=0;b<A;++b)I=_[b],I.x-=x,I.y-=k}return P.initialize=function(b){_=b},P.x=function(b){return arguments.length?(R=+b,P):R},P.y=function(b){return arguments.length?(O=+b,P):O},P.strength=function(b){return arguments.length?(g=+b,P):g},P}},33039:function(Tt,vt,d){"use strict";d.d(vt,{Z:function(){return P}});var l=d(14301),R=d(91592),O=d(12068);function _(b){return b.x+b.vx}function g(b){return b.y+b.vy}function P(b){var A,I,x,k=1,N=1;typeof b!="function"&&(b=(0,R.Z)(b==null?1:+b));function et(){for(var ut,nt=A.length,kt,Nt,Bt,Xt,wt,ot,It=0;It<N;++It)for(kt=(0,l.Z)(A,_,g).visitAfter(tt),ut=0;ut<nt;++ut)Nt=A[ut],wt=I[Nt.index],ot=wt*wt,Bt=Nt.x+Nt.vx,Xt=Nt.y+Nt.vy,kt.visit(zt);function zt(Ot,pe,xe,qt,Ye){var We=Ot.data,Oe=Ot.r,Qe=wt+Oe;if(We){if(We.index>Nt.index){var Mt=Bt-We.x-We.vx,ne=Xt-We.y-We.vy,Me=Mt*Mt+ne*ne;Me<Qe*Qe&&(Mt===0&&(Mt=(0,O.Z)(x),Me+=Mt*Mt),ne===0&&(ne=(0,O.Z)(x),Me+=ne*ne),Me=(Qe-(Me=Math.sqrt(Me)))/Me*k,Nt.vx+=(Mt*=Me)*(Qe=(Oe*=Oe)/(ot+Oe)),Nt.vy+=(ne*=Me)*Qe,We.vx-=Mt*(Qe=1-Qe),We.vy-=ne*Qe)}return}return pe>Bt+Qe||qt<Bt-Qe||xe>Xt+Qe||Ye<Xt-Qe}}function tt(ut){if(ut.data)return ut.r=I[ut.data.index];for(var nt=ut.r=0;nt<4;++nt)ut[nt]&&ut[nt].r>ut.r&&(ut.r=ut[nt].r)}function Ct(){if(A){var ut,nt=A.length,kt;for(I=new Array(nt),ut=0;ut<nt;++ut)kt=A[ut],I[kt.index]=+b(kt,ut,A)}}return et.initialize=function(ut,nt){A=ut,x=nt,Ct()},et.iterations=function(ut){return arguments.length?(N=+ut,et):N},et.strength=function(ut){return arguments.length?(k=+ut,et):k},et.radius=function(ut){return arguments.length?(b=typeof ut=="function"?ut:(0,R.Z)(+ut),Ct(),et):b},et}},91592:function(Tt,vt,d){"use strict";d.d(vt,{Z:function(){return l}});function l(R){return function(){return R}}},12068:function(Tt,vt,d){"use strict";d.d(vt,{Z:function(){return l}});function l(R){return(R()-.5)*1e-6}},42398:function(Tt,vt,d){"use strict";d.d(vt,{Z:function(){return _}});const l=1664525,R=1013904223,O=4294967296;function _(){let g=1;return()=>(g=(l*g+R)%O)/O}},31136:function(Tt,vt,d){"use strict";d.d(vt,{Z:function(){return g}});var l=d(91592),R=d(12068);function O(P){return P.index}function _(P,b){var A=P.get(b);if(!A)throw new Error("node not found: "+b);return A}function g(P){var b=O,A=nt,I,x=(0,l.Z)(30),k,N,et,tt,Ct,ut=1;P==null&&(P=[]);function nt(wt){return 1/Math.min(et[wt.source.index],et[wt.target.index])}function kt(wt){for(var ot=0,It=P.length;ot<ut;++ot)for(var zt=0,Ot,pe,xe,qt,Ye,We,Oe;zt<It;++zt)Ot=P[zt],pe=Ot.source,xe=Ot.target,qt=xe.x+xe.vx-pe.x-pe.vx||(0,R.Z)(Ct),Ye=xe.y+xe.vy-pe.y-pe.vy||(0,R.Z)(Ct),We=Math.sqrt(qt*qt+Ye*Ye),We=(We-k[zt])/We*wt*I[zt],qt*=We,Ye*=We,xe.vx-=qt*(Oe=tt[zt]),xe.vy-=Ye*Oe,pe.vx+=qt*(Oe=1-Oe),pe.vy+=Ye*Oe}function Nt(){if(N){var wt,ot=N.length,It=P.length,zt=new Map(N.map((pe,xe)=>[b(pe,xe,N),pe])),Ot;for(wt=0,et=new Array(ot);wt<It;++wt)Ot=P[wt],Ot.index=wt,typeof Ot.source!="object"&&(Ot.source=_(zt,Ot.source)),typeof Ot.target!="object"&&(Ot.target=_(zt,Ot.target)),et[Ot.source.index]=(et[Ot.source.index]||0)+1,et[Ot.target.index]=(et[Ot.target.index]||0)+1;for(wt=0,tt=new Array(It);wt<It;++wt)Ot=P[wt],tt[wt]=et[Ot.source.index]/(et[Ot.source.index]+et[Ot.target.index]);I=new Array(It),Bt(),k=new Array(It),Xt()}}function Bt(){if(N)for(var wt=0,ot=P.length;wt<ot;++wt)I[wt]=+A(P[wt],wt,P)}function Xt(){if(N)for(var wt=0,ot=P.length;wt<ot;++wt)k[wt]=+x(P[wt],wt,P)}return kt.initialize=function(wt,ot){N=wt,Ct=ot,Nt()},kt.links=function(wt){return arguments.length?(P=wt,Nt(),kt):P},kt.id=function(wt){return arguments.length?(b=wt,kt):b},kt.iterations=function(wt){return arguments.length?(ut=+wt,kt):ut},kt.strength=function(wt){return arguments.length?(A=typeof wt=="function"?wt:(0,l.Z)(+wt),Bt(),kt):A},kt.distance=function(wt){return arguments.length?(x=typeof wt=="function"?wt:(0,l.Z)(+wt),Xt(),kt):x},kt}},84365:function(Tt,vt,d){"use strict";d.d(vt,{Z:function(){return g}});var l=d(14301),R=d(91592),O=d(12068),_=d(74515);function g(){var P,b,A,I,x=(0,R.Z)(-30),k,N=1,et=1/0,tt=.81;function Ct(Nt){var Bt,Xt=P.length,wt=(0,l.Z)(P,_.x,_.y).visitAfter(nt);for(I=Nt,Bt=0;Bt<Xt;++Bt)b=P[Bt],wt.visit(kt)}function ut(){if(P){var Nt,Bt=P.length,Xt;for(k=new Array(Bt),Nt=0;Nt<Bt;++Nt)Xt=P[Nt],k[Xt.index]=+x(Xt,Nt,P)}}function nt(Nt){var Bt=0,Xt,wt,ot=0,It,zt,Ot;if(Nt.length){for(It=zt=Ot=0;Ot<4;++Ot)(Xt=Nt[Ot])&&(wt=Math.abs(Xt.value))&&(Bt+=Xt.value,ot+=wt,It+=wt*Xt.x,zt+=wt*Xt.y);Nt.x=It/ot,Nt.y=zt/ot}else{Xt=Nt,Xt.x=Xt.data.x,Xt.y=Xt.data.y;do Bt+=k[Xt.data.index];while(Xt=Xt.next)}Nt.value=Bt}function kt(Nt,Bt,Xt,wt){if(!Nt.value)return!0;var ot=Nt.x-b.x,It=Nt.y-b.y,zt=wt-Bt,Ot=ot*ot+It*It;if(zt*zt/tt<Ot)return Ot<et&&(ot===0&&(ot=(0,O.Z)(A),Ot+=ot*ot),It===0&&(It=(0,O.Z)(A),Ot+=It*It),Ot<N&&(Ot=Math.sqrt(N*Ot)),b.vx+=ot*Nt.value*I/Ot,b.vy+=It*Nt.value*I/Ot),!0;if(Nt.length||Ot>=et)return;(Nt.data!==b||Nt.next)&&(ot===0&&(ot=(0,O.Z)(A),Ot+=ot*ot),It===0&&(It=(0,O.Z)(A),Ot+=It*It),Ot<N&&(Ot=Math.sqrt(N*Ot)));do Nt.data!==b&&(zt=k[Nt.data.index]*I/Ot,b.vx+=ot*zt,b.vy+=It*zt);while(Nt=Nt.next)}return Ct.initialize=function(Nt,Bt){P=Nt,A=Bt,ut()},Ct.strength=function(Nt){return arguments.length?(x=typeof Nt=="function"?Nt:(0,R.Z)(+Nt),ut(),Ct):x},Ct.distanceMin=function(Nt){return arguments.length?(N=Nt*Nt,Ct):Math.sqrt(N)},Ct.distanceMax=function(Nt){return arguments.length?(et=Nt*Nt,Ct):Math.sqrt(et)},Ct.theta=function(Nt){return arguments.length?(tt=Nt*Nt,Ct):Math.sqrt(tt)},Ct}},54774:function(Tt,vt,d){"use strict";d.d(vt,{Z:function(){return R}});var l=d(91592);function R(O,_,g){var P,b=(0,l.Z)(.1),A,I;typeof O!="function"&&(O=(0,l.Z)(+O)),_==null&&(_=0),g==null&&(g=0);function x(N){for(var et=0,tt=P.length;et<tt;++et){var Ct=P[et],ut=Ct.x-_||1e-6,nt=Ct.y-g||1e-6,kt=Math.sqrt(ut*ut+nt*nt),Nt=(I[et]-kt)*A[et]*N/kt;Ct.vx+=ut*Nt,Ct.vy+=nt*Nt}}function k(){if(P){var N,et=P.length;for(A=new Array(et),I=new Array(et),N=0;N<et;++N)I[N]=+O(P[N],N,P),A[N]=isNaN(I[N])?0:+b(P[N],N,P)}}return x.initialize=function(N){P=N,k()},x.strength=function(N){return arguments.length?(b=typeof N=="function"?N:(0,l.Z)(+N),k(),x):b},x.radius=function(N){return arguments.length?(O=typeof N=="function"?N:(0,l.Z)(+N),k(),x):O},x.x=function(N){return arguments.length?(_=+N,x):_},x.y=function(N){return arguments.length?(g=+N,x):g},x}},74515:function(Tt,vt,d){"use strict";d.d(vt,{Z:function(){return A},x:function(){return _},y:function(){return g}});var l=d(27625),R=d(83833),O=d(42398);function _(I){return I.x}function g(I){return I.y}var P=10,b=Math.PI*(3-Math.sqrt(5));function A(I){var x,k=1,N=.001,et=1-Math.pow(N,1/300),tt=0,Ct=.6,ut=new Map,nt=(0,R.HT)(Bt),kt=(0,l.Z)("tick","end"),Nt=(0,O.Z)();I==null&&(I=[]);function Bt(){Xt(),kt.call("tick",x),k<N&&(nt.stop(),kt.call("end",x))}function Xt(It){var zt,Ot=I.length,pe;It===void 0&&(It=1);for(var xe=0;xe<It;++xe)for(k+=(tt-k)*et,ut.forEach(function(qt){qt(k)}),zt=0;zt<Ot;++zt)pe=I[zt],pe.fx==null?pe.x+=pe.vx*=Ct:(pe.x=pe.fx,pe.vx=0),pe.fy==null?pe.y+=pe.vy*=Ct:(pe.y=pe.fy,pe.vy=0);return x}function wt(){for(var It=0,zt=I.length,Ot;It<zt;++It){if(Ot=I[It],Ot.index=It,Ot.fx!=null&&(Ot.x=Ot.fx),Ot.fy!=null&&(Ot.y=Ot.fy),isNaN(Ot.x)||isNaN(Ot.y)){var pe=P*Math.sqrt(.5+It),xe=It*b;Ot.x=pe*Math.cos(xe),Ot.y=pe*Math.sin(xe)}(isNaN(Ot.vx)||isNaN(Ot.vy))&&(Ot.vx=Ot.vy=0)}}function ot(It){return It.initialize&&It.initialize(I,Nt),It}return wt(),x={tick:Xt,restart:function(){return nt.restart(Bt),x},stop:function(){return nt.stop(),x},nodes:function(It){return arguments.length?(I=It,wt(),ut.forEach(ot),x):I},alpha:function(It){return arguments.length?(k=+It,x):k},alphaMin:function(It){return arguments.length?(N=+It,x):N},alphaDecay:function(It){return arguments.length?(et=+It,x):+et},alphaTarget:function(It){return arguments.length?(tt=+It,x):tt},velocityDecay:function(It){return arguments.length?(Ct=1-It,x):1-Ct},randomSource:function(It){return arguments.length?(Nt=It,ut.forEach(ot),x):Nt},force:function(It,zt){return arguments.length>1?(zt==null?ut.delete(It):ut.set(It,ot(zt)),x):ut.get(It)},find:function(It,zt,Ot){var pe=0,xe=I.length,qt,Ye,We,Oe,Qe;for(Ot==null?Ot=1/0:Ot*=Ot,pe=0;pe<xe;++pe)Oe=I[pe],qt=It-Oe.x,Ye=zt-Oe.y,We=qt*qt+Ye*Ye,We<Ot&&(Qe=Oe,Ot=We);return Qe},on:function(It,zt){return arguments.length>1?(kt.on(It,zt),x):kt.on(It)}}}},34123:function(Tt,vt,d){"use strict";d.d(vt,{Z:function(){return R}});var l=d(91592);function R(O){var _=(0,l.Z)(.1),g,P,b;typeof O!="function"&&(O=(0,l.Z)(O==null?0:+O));function A(x){for(var k=0,N=g.length,et;k<N;++k)et=g[k],et.vx+=(b[k]-et.x)*P[k]*x}function I(){if(g){var x,k=g.length;for(P=new Array(k),b=new Array(k),x=0;x<k;++x)P[x]=isNaN(b[x]=+O(g[x],x,g))?0:+_(g[x],x,g)}}return A.initialize=function(x){g=x,I()},A.strength=function(x){return arguments.length?(_=typeof x=="function"?x:(0,l.Z)(+x),I(),A):_},A.x=function(x){return arguments.length?(O=typeof x=="function"?x:(0,l.Z)(+x),I(),A):O},A}},97468:function(Tt,vt,d){"use strict";d.d(vt,{Z:function(){return R}});var l=d(91592);function R(O){var _=(0,l.Z)(.1),g,P,b;typeof O!="function"&&(O=(0,l.Z)(O==null?0:+O));function A(x){for(var k=0,N=g.length,et;k<N;++k)et=g[k],et.vy+=(b[k]-et.y)*P[k]*x}function I(){if(g){var x,k=g.length;for(P=new Array(k),b=new Array(k),x=0;x<k;++x)P[x]=isNaN(b[x]=+O(g[x],x,g))?0:+_(g[x],x,g)}}return A.initialize=function(x){g=x,I()},A.strength=function(x){return arguments.length?(_=typeof x=="function"?x:(0,l.Z)(+x),I(),A):_},A.y=function(x){return arguments.length?(O=typeof x=="function"?x:(0,l.Z)(+x),I(),A):O},A}},16722:function(Tt,vt,d){"use strict";d.d(vt,{Z:function(){return A}});const l=I=>typeof I=="object"&&I!=null&&I.nodeType===1,R=(I,x)=>(!x||I!=="hidden")&&I!=="visible"&&I!=="clip",O=(I,x)=>{if(I.clientHeight<I.scrollHeight||I.clientWidth<I.scrollWidth){const k=getComputedStyle(I,null);return R(k.overflowY,x)||R(k.overflowX,x)||(N=>{const et=(tt=>{if(!tt.ownerDocument||!tt.ownerDocument.defaultView)return null;try{return tt.ownerDocument.defaultView.frameElement}catch(Ct){return null}})(N);return!!et&&(et.clientHeight<N.scrollHeight||et.clientWidth<N.scrollWidth)})(I)}return!1},_=(I,x,k,N,et,tt,Ct,ut)=>tt<I&&Ct>x||tt>I&&Ct<x?0:tt<=I&&ut<=k||Ct>=x&&ut>=k?tt-I-N:Ct>x&&ut<k||tt<I&&ut>k?Ct-x+et:0,g=I=>{const x=I.parentElement;return x==null?I.getRootNode().host||null:x},P=(I,x)=>{var k,N,et,tt;if(typeof document=="undefined")return[];const{scrollMode:Ct,block:ut,inline:nt,boundary:kt,skipOverflowHiddenElements:Nt}=x,Bt=typeof kt=="function"?kt:Yt=>Yt!==kt;if(!l(I))throw new TypeError("Invalid target");const Xt=document.scrollingElement||document.documentElement,wt=[];let ot=I;for(;l(ot)&&Bt(ot);){if(ot=g(ot),ot===Xt){wt.push(ot);break}ot!=null&&ot===document.body&&O(ot)&&!O(document.documentElement)||ot!=null&&O(ot,Nt)&&wt.push(ot)}const It=(N=(k=window.visualViewport)==null?void 0:k.width)!=null?N:innerWidth,zt=(tt=(et=window.visualViewport)==null?void 0:et.height)!=null?tt:innerHeight,{scrollX:Ot,scrollY:pe}=window,{height:xe,width:qt,top:Ye,right:We,bottom:Oe,left:Qe}=I.getBoundingClientRect(),{top:Mt,right:ne,bottom:Me,left:nn}=(Yt=>{const re=window.getComputedStyle(Yt);return{top:parseFloat(re.scrollMarginTop)||0,right:parseFloat(re.scrollMarginRight)||0,bottom:parseFloat(re.scrollMarginBottom)||0,left:parseFloat(re.scrollMarginLeft)||0}})(I);let le=ut==="start"||ut==="nearest"?Ye-Mt:ut==="end"?Oe+Me:Ye+xe/2-Mt+Me,be=nt==="center"?Qe+qt/2-nn+ne:nt==="end"?We+ne:Qe-nn;const De=[];for(let Yt=0;Yt<wt.length;Yt++){const re=wt[Yt],{height:xt,width:at,top:se,right:Fe,bottom:Re,left:ge}=re.getBoundingClientRect();if(Ct==="if-needed"&&Ye>=0&&Qe>=0&&Oe<=zt&&We<=It&&(re===Xt&&!O(re)||Ye>=se&&Oe<=Re&&Qe>=ge&&We<=Fe))return De;const Ie=getComputedStyle(re),Ne=parseInt(Ie.borderLeftWidth,10),bt=parseInt(Ie.borderTopWidth,10),Jt=parseInt(Ie.borderRightWidth,10),oe=parseInt(Ie.borderBottomWidth,10);let M=0,Q=0;const te="offsetWidth"in re?re.offsetWidth-re.clientWidth-Ne-Jt:0,Ut="offsetHeight"in re?re.offsetHeight-re.clientHeight-bt-oe:0,we="offsetWidth"in re?re.offsetWidth===0?0:at/re.offsetWidth:0,Ce="offsetHeight"in re?re.offsetHeight===0?0:xt/re.offsetHeight:0;if(Xt===re)M=ut==="start"?le:ut==="end"?le-zt:ut==="nearest"?_(pe,pe+zt,zt,bt,oe,pe+le,pe+le+xe,xe):le-zt/2,Q=nt==="start"?be:nt==="center"?be-It/2:nt==="end"?be-It:_(Ot,Ot+It,It,Ne,Jt,Ot+be,Ot+be+qt,qt),M=Math.max(0,M+pe),Q=Math.max(0,Q+Ot);else{M=ut==="start"?le-se-bt:ut==="end"?le-Re+oe+Ut:ut==="nearest"?_(se,Re,xt,bt,oe+Ut,le,le+xe,xe):le-(se+xt/2)+Ut/2,Q=nt==="start"?be-ge-Ne:nt==="center"?be-(ge+at/2)+te/2:nt==="end"?be-Fe+Jt+te:_(ge,Fe,at,Ne,Jt+te,be,be+qt,qt);const{scrollLeft:_e,scrollTop:mt}=re;M=Ce===0?0:Math.max(0,Math.min(mt+M/Ce,re.scrollHeight-xt/Ce+Ut)),Q=we===0?0:Math.max(0,Math.min(_e+Q/we,re.scrollWidth-at/we+te)),le+=mt-M,be+=_e-Q}De.push({el:re,top:M,left:Q})}return De},b=I=>I===!1?{block:"end",inline:"nearest"}:(x=>x===Object(x)&&Object.keys(x).length!==0)(I)?I:{block:"start",inline:"nearest"};function A(I,x){if(!I.isConnected||!(et=>{let tt=et;for(;tt&&tt.parentNode;){if(tt.parentNode===document)return!0;tt=tt.parentNode instanceof ShadowRoot?tt.parentNode.host:tt.parentNode}return!1})(I))return;const k=(et=>{const tt=window.getComputedStyle(et);return{top:parseFloat(tt.scrollMarginTop)||0,right:parseFloat(tt.scrollMarginRight)||0,bottom:parseFloat(tt.scrollMarginBottom)||0,left:parseFloat(tt.scrollMarginLeft)||0}})(I);if((et=>typeof et=="object"&&typeof et.behavior=="function")(x))return x.behavior(P(I,x));const N=typeof x=="boolean"||x==null?void 0:x.behavior;for(const{el:et,top:tt,left:Ct}of P(I,b(x))){const ut=tt-k.top+k.bottom,nt=Ct-k.left+k.right;et.scroll({top:ut,left:nt,behavior:N})}}},67341:function(Tt,vt,d){"use strict";d.d(vt,{Z:function(){return zt}});var l=d(51910);function R(Ot,pe){(pe==null||pe>Ot.length)&&(pe=Ot.length);for(var xe=0,qt=Array(pe);xe<pe;xe++)qt[xe]=Ot[xe];return qt}function O(Ot){if(Array.isArray(Ot))return Ot}function _(Ot){if(Array.isArray(Ot))return R(Ot)}function g(Ot){if(Ot===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return Ot}function P(Ot,pe,xe){return pe=x(pe),nt(Ot,N()?Reflect.construct(pe,xe||[],x(Ot).constructor):pe.apply(Ot,xe))}function b(Ot,pe){if(!(Ot instanceof pe))throw new TypeError("Cannot call a class as a function")}function A(Ot,pe){for(var xe=0;xe<pe.length;xe++){var qt=pe[xe];qt.enumerable=qt.enumerable||!1,qt.configurable=!0,"value"in qt&&(qt.writable=!0),Object.defineProperty(Ot,wt(qt.key),qt)}}function I(Ot,pe,xe){return pe&&A(Ot.prototype,pe),Object.defineProperty(Ot,"prototype",{writable:!1}),Ot}function x(Ot){return x=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(pe){return pe.__proto__||Object.getPrototypeOf(pe)},x(Ot)}function k(Ot,pe){if(typeof pe!="function"&&pe!==null)throw new TypeError("Super expression must either be null or a function");Ot.prototype=Object.create(pe&&pe.prototype,{constructor:{value:Ot,writable:!0,configurable:!0}}),Object.defineProperty(Ot,"prototype",{writable:!1}),pe&&kt(Ot,pe)}function N(){try{var Ot=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(pe){}return(N=function(){return!!Ot})()}function et(Ot){if(typeof Symbol!="undefined"&&Ot[Symbol.iterator]!=null||Ot["@@iterator"]!=null)return Array.from(Ot)}function tt(Ot,pe){var xe=Ot==null?null:typeof Symbol!="undefined"&&Ot[Symbol.iterator]||Ot["@@iterator"];if(xe!=null){var qt,Ye,We,Oe,Qe=[],Mt=!0,ne=!1;try{if(We=(xe=xe.call(Ot)).next,pe===0){if(Object(xe)!==xe)return;Mt=!1}else for(;!(Mt=(qt=We.call(xe)).done)&&(Qe.push(qt.value),Qe.length!==pe);Mt=!0);}catch(Me){ne=!0,Ye=Me}finally{try{if(!Mt&&xe.return!=null&&(Oe=xe.return(),Object(Oe)!==Oe))return}finally{if(ne)throw Ye}}return Qe}}function Ct(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function ut(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function nt(Ot,pe){if(pe&&(typeof pe=="object"||typeof pe=="function"))return pe;if(pe!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return g(Ot)}function kt(Ot,pe){return kt=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(xe,qt){return xe.__proto__=qt,xe},kt(Ot,pe)}function Nt(Ot,pe){return O(Ot)||tt(Ot,pe)||ot(Ot,pe)||Ct()}function Bt(Ot){return _(Ot)||et(Ot)||ot(Ot)||ut()}function Xt(Ot,pe){if(typeof Ot!="object"||!Ot)return Ot;var xe=Ot[Symbol.toPrimitive];if(xe!==void 0){var qt=xe.call(Ot,pe);if(typeof qt!="object")return qt;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(Ot)}function wt(Ot){var pe=Xt(Ot,"string");return typeof pe=="symbol"?pe:pe+""}function ot(Ot,pe){if(Ot){if(typeof Ot=="string")return R(Ot,pe);var xe={}.toString.call(Ot).slice(8,-1);return xe==="Object"&&Ot.constructor&&(xe=Ot.constructor.name),xe==="Map"||xe==="Set"?Array.from(Ot):xe==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(xe)?R(Ot,pe):void 0}}var It=typeof window!="undefined"&&window.THREE?window.THREE:{CanvasTexture:l.ROQ,Sprite:l.jyi,SpriteMaterial:l.xeV,SRGBColorSpace:l.KI_},zt=function(Ot){function pe(){var xe,qt=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"",Ye=arguments.length>1&&arguments[1]!==void 0?arguments[1]:10,We=arguments.length>2&&arguments[2]!==void 0?arguments[2]:"rgba(255, 255, 255, 1)";return b(this,pe),xe=P(this,pe,[new It.SpriteMaterial]),xe._text="".concat(qt),xe._textHeight=Ye,xe._color=We,xe._backgroundColor=!1,xe._padding=0,xe._borderWidth=0,xe._borderRadius=0,xe._borderColor="white",xe._offsetX=0,xe._offsetY=0,xe._strokeWidth=0,xe._strokeColor="white",xe._fontFace="system-ui",xe._fontSize=90,xe._fontWeight="normal",xe._canvas=document.createElement("canvas"),xe._genCanvas(),xe}return k(pe,Ot),I(pe,[{key:"text",get:function(){return this._text},set:function(qt){this._text=qt,this._genCanvas()}},{key:"textHeight",get:function(){return this._textHeight},set:function(qt){this._textHeight=qt,this._genCanvas()}},{key:"color",get:function(){return this._color},set:function(qt){this._color=qt,this._genCanvas()}},{key:"backgroundColor",get:function(){return this._backgroundColor},set:function(qt){this._backgroundColor=qt,this._genCanvas()}},{key:"padding",get:function(){return this._padding},set:function(qt){this._padding=qt,this._genCanvas()}},{key:"borderWidth",get:function(){return this._borderWidth},set:function(qt){this._borderWidth=qt,this._genCanvas()}},{key:"borderRadius",get:function(){return this._borderRadius},set:function(qt){this._borderRadius=qt,this._genCanvas()}},{key:"borderColor",get:function(){return this._borderColor},set:function(qt){this._borderColor=qt,this._genCanvas()}},{key:"offsetX",get:function(){return this._offsetX},set:function(qt){this._offsetX=qt,this._genCanvas()}},{key:"offsetY",get:function(){return this._offsetY},set:function(qt){this._offsetY=qt,this._genCanvas()}},{key:"fontFace",get:function(){return this._fontFace},set:function(qt){this._fontFace=qt,this._genCanvas()}},{key:"fontSize",get:function(){return this._fontSize},set:function(qt){this._fontSize=qt,this._genCanvas()}},{key:"fontWeight",get:function(){return this._fontWeight},set:function(qt){this._fontWeight=qt,this._genCanvas()}},{key:"strokeWidth",get:function(){return this._strokeWidth},set:function(qt){this._strokeWidth=qt,this._genCanvas()}},{key:"strokeColor",get:function(){return this._strokeColor},set:function(qt){this._strokeColor=qt,this._genCanvas()}},{key:"_genCanvas",value:function(){var qt=this,Ye=this._canvas,We=Ye.getContext("2d"),Oe=1/this.textHeight,Qe=Array.isArray(this.borderWidth)?this.borderWidth:[this.borderWidth,this.borderWidth],Mt=Qe.map(function(oe){return oe*qt.fontSize*Oe}),ne=Array.isArray(this.borderRadius)?this.borderRadius:[this.borderRadius,this.borderRadius,this.borderRadius,this.borderRadius],Me=ne.map(function(oe){return oe*qt.fontSize*Oe}),nn=Array.isArray(this.padding)?this.padding:[this.padding,this.padding],le=nn.map(function(oe){return oe*qt.fontSize*Oe}),be=[this.offsetX,this.offsetY].map(function(oe){return oe*qt.fontSize*Oe}),De=this.text.split(`
|
|
|
`),Yt="".concat(this.fontWeight," ").concat(this.fontSize,"px ").concat(this.fontFace);We.font=Yt;var re=Math.max.apply(Math,Bt(De.map(function(oe){return We.measureText(oe).width}))),xt=this.fontSize*De.length,at=re+Mt[0]*2+le[0]*2,se=xt+Mt[1]*2+le[1]*2;if(Ye.width=at+Math.abs(be[0]),Ye.height=se+Math.abs(be[1]),We.translate.apply(We,Bt(be.map(function(oe){return Math.max(0,oe)}))),this.borderWidth){if(We.strokeStyle=this.borderColor,Mt[0]){var Fe=Mt[0]/2;We.lineWidth=Mt[0],We.beginPath(),We.moveTo(Fe,Me[0]),We.lineTo(Fe,se-Me[3]),We.moveTo(at-Fe,Me[1]),We.lineTo(at-Fe,se-Me[2]),We.stroke()}if(Mt[1]){var Re=Mt[1]/2;We.lineWidth=Mt[1],We.beginPath(),We.moveTo(Math.max(Mt[0],Me[0]),Re),We.lineTo(at-Math.max(Mt[0],Me[1]),Re),We.moveTo(Math.max(Mt[0],Me[3]),se-Re),We.lineTo(at-Math.max(Mt[0],Me[2]),se-Re),We.stroke()}if(this.borderRadius){var ge=Math.max.apply(Math,Bt(Mt)),Ie=ge/2;We.lineWidth=ge,We.beginPath(),[!!Me[0]&&[Me[0],Ie,Ie,Me[0]],!!Me[1]&&[at-Me[1],at-Ie,Ie,Me[1]],!!Me[2]&&[at-Me[2],at-Ie,se-Ie,se-Me[2]],!!Me[3]&&[Me[3],Ie,se-Ie,se-Me[3]]].filter(function(oe){return oe}).forEach(function(oe){var M=Nt(oe,4),Q=M[0],te=M[1],Ut=M[2],we=M[3];We.moveTo(Q,Ut),We.quadraticCurveTo(te,Ut,te,we)}),We.stroke()}}this.backgroundColor&&(We.fillStyle=this.backgroundColor,this.borderRadius?(We.beginPath(),We.moveTo(Mt[0],Me[0]),[[Mt[0],Me[0],at-Me[1],Mt[1],Mt[1],Mt[1]],[at-Mt[0],at-Mt[0],at-Mt[0],Mt[1],Me[1],se-Me[2]],[at-Mt[0],at-Me[2],Me[3],se-Mt[1],se-Mt[1],se-Mt[1]],[Mt[0],Mt[0],Mt[0],se-Mt[1],se-Me[3],Me[0]]].forEach(function(oe){var M=Nt(oe,6),Q=M[0],te=M[1],Ut=M[2],we=M[3],Ce=M[4],_e=M[5];We.quadraticCurveTo(Q,we,te,Ce),We.lineTo(Ut,_e)}),We.closePath(),We.fill()):We.fillRect(Mt[0],Mt[1],at-Mt[0]*2,se-Mt[1]*2)),We.translate.apply(We,Bt(Mt)),We.translate.apply(We,Bt(le)),We.font=Yt,We.fillStyle=this.color,We.textBaseline="bottom";var Ne=this.strokeWidth>0;Ne&&(We.lineWidth=this.strokeWidth*this.fontSize/10,We.strokeStyle=this.strokeColor),De.forEach(function(oe,M){var Q=(re-We.measureText(oe).width)/2,te=(M+1)*qt.fontSize;Ne&&We.strokeText(oe,Q,te),We.fillText(oe,Q,te)}),this.material.map&&this.material.map.dispose();var bt=this.material.map=new It.CanvasTexture(Ye);bt.colorSpace=It.SRGBColorSpace;var Jt=this.textHeight*De.length+Qe[1]*2+nn[1]*2+Math.abs(this.offsetY);this.scale.set(Jt*Ye.width/Ye.height,Jt,0)}},{key:"clone",value:function(){return new this.constructor(this.text,this.textHeight,this.color).copy(this)}},{key:"copy",value:function(qt){return It.Sprite.prototype.copy.call(this,qt),this.color=qt.color,this.backgroundColor=qt.backgroundColor,this.padding=qt.padding,this.borderWidth=qt.borderWidth,this.borderColor=qt.borderColor,this.offsetX=qt.offsetX,this.offsetY=qt.offsetY,this.fontFace=qt.fontFace,this.fontSize=qt.fontSize,this.fontWeight=qt.fontWeight,this.strokeWidth=qt.strokeWidth,this.strokeColor=qt.strokeColor,this}}])}(It.Sprite)},80813:function(Tt,vt,d){"use strict";d.d(vt,{CR:function(){return nt},Jh:function(){return et},Q_:function(){return Ye},XA:function(){return ut},ZT:function(){return R},_T:function(){return _},ev:function(){return Bt},mG:function(){return N},pi:function(){return O},pr:function(){return Nt}});var l=function(le,be){return l=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(De,Yt){De.__proto__=Yt}||function(De,Yt){for(var re in Yt)Object.prototype.hasOwnProperty.call(Yt,re)&&(De[re]=Yt[re])},l(le,be)};function R(le,be){if(typeof be!="function"&&be!==null)throw new TypeError("Class extends value "+String(be)+" is not a constructor or null");l(le,be);function De(){this.constructor=le}le.prototype=be===null?Object.create(be):(De.prototype=be.prototype,new De)}var O=function(){return O=Object.assign||function(be){for(var De,Yt=1,re=arguments.length;Yt<re;Yt++){De=arguments[Yt];for(var xt in De)Object.prototype.hasOwnProperty.call(De,xt)&&(be[xt]=De[xt])}return be},O.apply(this,arguments)};function _(le,be){var De={};for(var Yt in le)Object.prototype.hasOwnProperty.call(le,Yt)&&be.indexOf(Yt)<0&&(De[Yt]=le[Yt]);if(le!=null&&typeof Object.getOwnPropertySymbols=="function")for(var re=0,Yt=Object.getOwnPropertySymbols(le);re<Yt.length;re++)be.indexOf(Yt[re])<0&&Object.prototype.propertyIsEnumerable.call(le,Yt[re])&&(De[Yt[re]]=le[Yt[re]]);return De}function g(le,be,De,Yt){var re=arguments.length,xt=re<3?be:Yt===null?Yt=Object.getOwnPropertyDescriptor(be,De):Yt,at;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")xt=Reflect.decorate(le,be,De,Yt);else for(var se=le.length-1;se>=0;se--)(at=le[se])&&(xt=(re<3?at(xt):re>3?at(be,De,xt):at(be,De))||xt);return re>3&&xt&&Object.defineProperty(be,De,xt),xt}function P(le,be){return function(De,Yt){be(De,Yt,le)}}function b(le,be,De,Yt,re,xt){function at(Q){if(Q!==void 0&&typeof Q!="function")throw new TypeError("Function expected");return Q}for(var se=Yt.kind,Fe=se==="getter"?"get":se==="setter"?"set":"value",Re=!be&&le?Yt.static?le:le.prototype:null,ge=be||(Re?Object.getOwnPropertyDescriptor(Re,Yt.name):{}),Ie,Ne=!1,bt=De.length-1;bt>=0;bt--){var Jt={};for(var oe in Yt)Jt[oe]=oe==="access"?{}:Yt[oe];for(var oe in Yt.access)Jt.access[oe]=Yt.access[oe];Jt.addInitializer=function(Q){if(Ne)throw new TypeError("Cannot add initializers after decoration has completed");xt.push(at(Q||null))};var M=(0,De[bt])(se==="accessor"?{get:ge.get,set:ge.set}:ge[Fe],Jt);if(se==="accessor"){if(M===void 0)continue;if(M===null||typeof M!="object")throw new TypeError("Object expected");(Ie=at(M.get))&&(ge.get=Ie),(Ie=at(M.set))&&(ge.set=Ie),(Ie=at(M.init))&&re.unshift(Ie)}else(Ie=at(M))&&(se==="field"?re.unshift(Ie):ge[Fe]=Ie)}Re&&Object.defineProperty(Re,Yt.name,ge),Ne=!0}function A(le,be,De){for(var Yt=arguments.length>2,re=0;re<be.length;re++)De=Yt?be[re].call(le,De):be[re].call(le);return Yt?De:void 0}function I(le){return typeof le=="symbol"?le:"".concat(le)}function x(le,be,De){return typeof be=="symbol"&&(be=be.description?"[".concat(be.description,"]"):""),Object.defineProperty(le,"name",{configurable:!0,value:De?"".concat(De," ",be):be})}function k(le,be){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(le,be)}function N(le,be,De,Yt){function re(xt){return xt instanceof De?xt:new De(function(at){at(xt)})}return new(De||(De=Promise))(function(xt,at){function se(ge){try{Re(Yt.next(ge))}catch(Ie){at(Ie)}}function Fe(ge){try{Re(Yt.throw(ge))}catch(Ie){at(Ie)}}function Re(ge){ge.done?xt(ge.value):re(ge.value).then(se,Fe)}Re((Yt=Yt.apply(le,be||[])).next())})}function et(le,be){var De={label:0,sent:function(){if(xt[0]&1)throw xt[1];return xt[1]},trys:[],ops:[]},Yt,re,xt,at=Object.create((typeof Iterator=="function"?Iterator:Object).prototype);return at.next=se(0),at.throw=se(1),at.return=se(2),typeof Symbol=="function"&&(at[Symbol.iterator]=function(){return this}),at;function se(Re){return function(ge){return Fe([Re,ge])}}function Fe(Re){if(Yt)throw new TypeError("Generator is already executing.");for(;at&&(at=0,Re[0]&&(De=0)),De;)try{if(Yt=1,re&&(xt=Re[0]&2?re.return:Re[0]?re.throw||((xt=re.return)&&xt.call(re),0):re.next)&&!(xt=xt.call(re,Re[1])).done)return xt;switch(re=0,xt&&(Re=[Re[0]&2,xt.value]),Re[0]){case 0:case 1:xt=Re;break;case 4:return De.label++,{value:Re[1],done:!1};case 5:De.label++,re=Re[1],Re=[0];continue;case 7:Re=De.ops.pop(),De.trys.pop();continue;default:if(xt=De.trys,!(xt=xt.length>0&&xt[xt.length-1])&&(Re[0]===6||Re[0]===2)){De=0;continue}if(Re[0]===3&&(!xt||Re[1]>xt[0]&&Re[1]<xt[3])){De.label=Re[1];break}if(Re[0]===6&&De.label<xt[1]){De.label=xt[1],xt=Re;break}if(xt&&De.label<xt[2]){De.label=xt[2],De.ops.push(Re);break}xt[2]&&De.ops.pop(),De.trys.pop();continue}Re=be.call(le,De)}catch(ge){Re=[6,ge],re=0}finally{Yt=xt=0}if(Re[0]&5)throw Re[1];return{value:Re[0]?Re[1]:void 0,done:!0}}}var tt=Object.create?function(le,be,De,Yt){Yt===void 0&&(Yt=De);var re=Object.getOwnPropertyDescriptor(be,De);(!re||("get"in re?!be.__esModule:re.writable||re.configurable))&&(re={enumerable:!0,get:function(){return be[De]}}),Object.defineProperty(le,Yt,re)}:function(le,be,De,Yt){Yt===void 0&&(Yt=De),le[Yt]=be[De]};function Ct(le,be){for(var De in le)De!=="default"&&!Object.prototype.hasOwnProperty.call(be,De)&&tt(be,le,De)}function ut(le){var be=typeof Symbol=="function"&&Symbol.iterator,De=be&&le[be],Yt=0;if(De)return De.call(le);if(le&&typeof le.length=="number")return{next:function(){return le&&Yt>=le.length&&(le=void 0),{value:le&&le[Yt++],done:!le}}};throw new TypeError(be?"Object is not iterable.":"Symbol.iterator is not defined.")}function nt(le,be){var De=typeof Symbol=="function"&&le[Symbol.iterator];if(!De)return le;var Yt=De.call(le),re,xt=[],at;try{for(;(be===void 0||be-- >0)&&!(re=Yt.next()).done;)xt.push(re.value)}catch(se){at={error:se}}finally{try{re&&!re.done&&(De=Yt.return)&&De.call(Yt)}finally{if(at)throw at.error}}return xt}function kt(){for(var le=[],be=0;be<arguments.length;be++)le=le.concat(nt(arguments[be]));return le}function Nt(){for(var le=0,be=0,De=arguments.length;be<De;be++)le+=arguments[be].length;for(var Yt=Array(le),re=0,be=0;be<De;be++)for(var xt=arguments[be],at=0,se=xt.length;at<se;at++,re++)Yt[re]=xt[at];return Yt}function Bt(le,be,De){if(De||arguments.length===2)for(var Yt=0,re=be.length,xt;Yt<re;Yt++)(xt||!(Yt in be))&&(xt||(xt=Array.prototype.slice.call(be,0,Yt)),xt[Yt]=be[Yt]);return le.concat(xt||Array.prototype.slice.call(be))}function Xt(le){return this instanceof Xt?(this.v=le,this):new Xt(le)}function wt(le,be,De){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var Yt=De.apply(le,be||[]),re,xt=[];return re=Object.create((typeof AsyncIterator=="function"?AsyncIterator:Object).prototype),se("next"),se("throw"),se("return",at),re[Symbol.asyncIterator]=function(){return this},re;function at(bt){return function(Jt){return Promise.resolve(Jt).then(bt,Ie)}}function se(bt,Jt){Yt[bt]&&(re[bt]=function(oe){return new Promise(function(M,Q){xt.push([bt,oe,M,Q])>1||Fe(bt,oe)})},Jt&&(re[bt]=Jt(re[bt])))}function Fe(bt,Jt){try{Re(Yt[bt](Jt))}catch(oe){Ne(xt[0][3],oe)}}function Re(bt){bt.value instanceof Xt?Promise.resolve(bt.value.v).then(ge,Ie):Ne(xt[0][2],bt)}function ge(bt){Fe("next",bt)}function Ie(bt){Fe("throw",bt)}function Ne(bt,Jt){bt(Jt),xt.shift(),xt.length&&Fe(xt[0][0],xt[0][1])}}function ot(le){var be,De;return be={},Yt("next"),Yt("throw",function(re){throw re}),Yt("return"),be[Symbol.iterator]=function(){return this},be;function Yt(re,xt){be[re]=le[re]?function(at){return(De=!De)?{value:Xt(le[re](at)),done:!1}:xt?xt(at):at}:xt}}function It(le){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var be=le[Symbol.asyncIterator],De;return be?be.call(le):(le=typeof ut=="function"?ut(le):le[Symbol.iterator](),De={},Yt("next"),Yt("throw"),Yt("return"),De[Symbol.asyncIterator]=function(){return this},De);function Yt(xt){De[xt]=le[xt]&&function(at){return new Promise(function(se,Fe){at=le[xt](at),re(se,Fe,at.done,at.value)})}}function re(xt,at,se,Fe){Promise.resolve(Fe).then(function(Re){xt({value:Re,done:se})},at)}}function zt(le,be){return Object.defineProperty?Object.defineProperty(le,"raw",{value:be}):le.raw=be,le}var Ot=Object.create?function(le,be){Object.defineProperty(le,"default",{enumerable:!0,value:be})}:function(le,be){le.default=be},pe=function(le){return pe=Object.getOwnPropertyNames||function(be){var De=[];for(var Yt in be)Object.prototype.hasOwnProperty.call(be,Yt)&&(De[De.length]=Yt);return De},pe(le)};function xe(le){if(le&&le.__esModule)return le;var be={};if(le!=null)for(var De=pe(le),Yt=0;Yt<De.length;Yt++)De[Yt]!=="default"&&tt(be,le,De[Yt]);return Ot(be,le),be}function qt(le){return le&&le.__esModule?le:{default:le}}function Ye(le,be,De,Yt){if(De==="a"&&!Yt)throw new TypeError("Private accessor was defined without a getter");if(typeof be=="function"?le!==be||!Yt:!be.has(le))throw new TypeError("Cannot read private member from an object whose class did not declare it");return De==="m"?Yt:De==="a"?Yt.call(le):Yt?Yt.value:be.get(le)}function We(le,be,De,Yt,re){if(Yt==="m")throw new TypeError("Private method is not writable");if(Yt==="a"&&!re)throw new TypeError("Private accessor was defined without a setter");if(typeof be=="function"?le!==be||!re:!be.has(le))throw new TypeError("Cannot write private member to an object whose class did not declare it");return Yt==="a"?re.call(le,De):re?re.value=De:be.set(le,De),De}function Oe(le,be){if(be===null||typeof be!="object"&&typeof be!="function")throw new TypeError("Cannot use 'in' operator on non-object");return typeof le=="function"?be===le:le.has(be)}function Qe(le,be,De){if(be!=null){if(typeof be!="object"&&typeof be!="function")throw new TypeError("Object expected.");var Yt,re;if(De){if(!Symbol.asyncDispose)throw new TypeError("Symbol.asyncDispose is not defined.");Yt=be[Symbol.asyncDispose]}if(Yt===void 0){if(!Symbol.dispose)throw new TypeError("Symbol.dispose is not defined.");Yt=be[Symbol.dispose],De&&(re=Yt)}if(typeof Yt!="function")throw new TypeError("Object not disposable.");re&&(Yt=function(){try{re.call(this)}catch(xt){return Promise.reject(xt)}}),le.stack.push({value:be,dispose:Yt,async:De})}else De&&le.stack.push({async:!0});return be}var Mt=typeof SuppressedError=="function"?SuppressedError:function(le,be,De){var Yt=new Error(De);return Yt.name="SuppressedError",Yt.error=le,Yt.suppressed=be,Yt};function ne(le){function be(xt){le.error=le.hasError?new Mt(xt,le.error,"An error was suppressed during disposal."):xt,le.hasError=!0}var De,Yt=0;function re(){for(;De=le.stack.pop();)try{if(!De.async&&Yt===1)return Yt=0,le.stack.push(De),Promise.resolve().then(re);if(De.dispose){var xt=De.dispose.call(De.value);if(De.async)return Yt|=2,Promise.resolve(xt).then(re,function(at){return be(at),re()})}else Yt|=1}catch(at){be(at)}if(Yt===1)return le.hasError?Promise.reject(le.error):Promise.resolve();if(le.hasError)throw le.error}return re()}function Me(le,be){return typeof le=="string"&&/^\.\.?\//.test(le)?le.replace(/\.(tsx)$|((?:\.d)?)((?:\.[^./]+?)?)\.([cm]?)ts$/i,function(De,Yt,re,xt,at){return Yt?be?".jsx":".js":re&&(!xt||!at)?De:re+xt+"."+at.toLowerCase()+"js"}):le}var nn={__extends:R,__assign:O,__rest:_,__decorate:g,__param:P,__esDecorate:b,__runInitializers:A,__propKey:I,__setFunctionName:x,__metadata:k,__awaiter:N,__generator:et,__createBinding:tt,__exportStar:Ct,__values:ut,__read:nt,__spread:kt,__spreadArrays:Nt,__spreadArray:Bt,__await:Xt,__asyncGenerator:wt,__asyncDelegator:ot,__asyncValues:It,__makeTemplateObject:zt,__importStar:xe,__importDefault:qt,__classPrivateFieldGet:Ye,__classPrivateFieldSet:We,__classPrivateFieldIn:Oe,__addDisposableResource:Qe,__disposeResources:ne,__rewriteRelativeImportExtension:Me}}}]);
|
|
|
}()); |