vue-safe-force-graph 2.0.75 → 2.0.76
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -136,5 +136,5 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
136
136
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}()}function W_(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var Ya=typeof globalThis!="undefined"?globalThis:typeof window!="undefined"?window:typeof global!="undefined"?global:typeof self!="undefined"?self:{},ht=function(e){try{return!!e()}catch(t){return!0}},zt=!ht(function(){return Object.defineProperty({},1,{get:function(){return 7}})[1]!==7}),gd=!ht(function(){var e=function(){}.bind();return typeof e!="function"||e.hasOwnProperty("prototype")}),K_=gd,Y_=Function.prototype,Hp=Y_.call,vG=K_&&Y_.bind.bind(Hp,Hp),dt=K_?vG:function(e){return function(){return Hp.apply(e,arguments)}},Ja=function(e){return e==null},yG=Ja,bG=TypeError,md=function(e){if(yG(e))throw new bG("Can't call method on "+e);return e},wG=md,_G=Object,wo=function(e){return _G(wG(e))},CG=wo,SG=dt({}.hasOwnProperty),yn=Object.hasOwn||function(e,t){return SG(CG(e),t)},Gp=zt,EG=yn,J_=Function.prototype,xG=Gp&&Object.getOwnPropertyDescriptor,Wp=EG(J_,"name"),Xa={EXISTS:Wp,PROPER:Wp&&function(){}.name==="something",CONFIGURABLE:Wp&&(!Gp||Gp&&xG(J_,"name").configurable)},X_={exports:{}},Kp=typeof document=="object"&&document.all,bt=Kp===void 0&&Kp!==void 0?function(e){return typeof e=="function"||e===Kp}:function(e){return typeof e=="function"},Qa=function(e){return e&&e.Math===Math&&e},pt=Qa(typeof globalThis=="object"&&globalThis)||Qa(typeof window=="object"&&window)||Qa(typeof self=="object"&&self)||Qa(typeof Ya=="object"&&Ya)||Qa(typeof Ya=="object"&&Ya)||function(){return this}()||Function("return this")(),Q_=pt,kG=Object.defineProperty,Yp=function(e,t){try{kG(Q_,e,{value:t,configurable:!0,writable:!0})}catch(n){Q_[e]=t}return t},NG=Yp,Z_="__core-js_shared__",Jp=pt[Z_]||NG(Z_,{}),TG=bt,Xp=Jp,AG=dt(Function.toString);TG(Xp.inspectSource)||(Xp.inspectSource=function(e){return AG(e)});var Bi,vd,Qp=Xp.inspectSource,OG=bt,V_=pt.WeakMap,IG=OG(V_)&&/native code/.test(String(V_)),BG=bt,Rn=function(e){return typeof e=="object"?e!==null:BG(e)},Ir={},e3=Rn,Zp=pt.document,PG=e3(Zp)&&e3(Zp.createElement),yd=function(e){return PG?Zp.createElement(e):{}},RG=yd,t3=!zt&&!ht(function(){return Object.defineProperty(RG("div"),"a",{get:function(){return 7}}).a!==7}),n3=zt&&ht(function(){return Object.defineProperty(function(){},"prototype",{value:42,writable:!1}).prototype!==42}),LG=Rn,DG=String,MG=TypeError,Kt=function(e){if(LG(e))return e;throw new MG(DG(e)+" is not an object")},FG=gd,bd=Function.prototype.call,Ut=FG?bd.bind(bd):function(){return bd.apply(bd,arguments)},Vp=pt,$G=bt,_o=function(e,t){return arguments.length<2?(n=Vp[e],$G(n)?n:void 0):Vp[e]&&Vp[e][t];var n},wd=dt({}.isPrototypeOf),_d=typeof navigator!="undefined"&&String(navigator.userAgent)||"",r3=pt,eg=_d,i3=r3.process,o3=r3.Deno,s3=i3&&i3.versions||o3&&o3.version,a3=s3&&s3.v8;a3&&(vd=(Bi=a3.split("."))[0]>0&&Bi[0]<4?1:+(Bi[0]+Bi[1])),!vd&&eg&&(!(Bi=eg.match(/Edge\/(\d+)/))||Bi[1]>=74)&&(Bi=eg.match(/Chrome\/(\d+)/))&&(vd=+Bi[1]);var Cd=vd,l3=Cd,zG=ht,UG=pt.String,c3=!!Object.getOwnPropertySymbols&&!zG(function(){var e=Symbol("symbol detection");return!UG(e)||!(Object(e)instanceof Symbol)||!Symbol.sham&&l3&&l3<41}),d3=c3&&!Symbol.sham&&typeof Symbol.iterator=="symbol",jG=_o,qG=bt,HG=wd,GG=Object,u3=d3?function(e){return typeof e=="symbol"}:function(e){var t=jG("Symbol");return qG(t)&&HG(t.prototype,GG(e))},WG=String,Sd=function(e){try{return WG(e)}catch(t){return"Object"}},KG=bt,YG=Sd,JG=TypeError,Pi=function(e){if(KG(e))return e;throw new JG(YG(e)+" is not a function")},XG=Pi,QG=Ja,Ed=function(e,t){var n=e[t];return QG(n)?void 0:XG(n)},tg=Ut,ng=bt,rg=Rn,ZG=TypeError,f3={exports:{}},h3=Jp;(f3.exports=function(e,t){return h3[e]||(h3[e]=t!==void 0?t:{})})("versions",[]).push({version:"3.35.0",mode:"global",copyright:"© 2014-2023 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.35.0/LICENSE",source:"https://github.com/zloirock/core-js"});var ig=f3.exports,VG=dt,eW=0,tW=Math.random(),nW=VG(1 .toString),p3=function(e){return"Symbol("+(e===void 0?"":e)+")_"+nW(++eW+tW,36)},rW=ig,g3=yn,iW=p3,oW=c3,sW=d3,hs=pt.Symbol,og=rW("wks"),aW=sW?hs.for||hs:hs&&hs.withoutSetter||iW,Nt=function(e){return g3(og,e)||(og[e]=oW&&g3(hs,e)?hs[e]:aW("Symbol."+e)),og[e]},lW=Ut,m3=Rn,v3=u3,cW=Ed,dW=TypeError,uW=Nt("toPrimitive"),fW=function(e,t){if(!m3(e)||v3(e))return e;var n,r=cW(e,uW);if(r){if(t===void 0&&(t="default"),n=lW(r,e,t),!m3(n)||v3(n))return n;throw new dW("Can't convert object to primitive value")}return t===void 0&&(t="number"),function(s,a){var l,c;if(a==="string"&&ng(l=s.toString)&&!rg(c=tg(l,s))||ng(l=s.valueOf)&&!rg(c=tg(l,s))||a!=="string"&&ng(l=s.toString)&&!rg(c=tg(l,s)))return c;throw new ZG("Can't convert object to primitive value")}(e,t)},hW=u3,sg=function(e){var t=fW(e,"string");return hW(t)?t:t+""},pW=zt,gW=t3,mW=n3,xd=Kt,y3=sg,vW=TypeError,ag=Object.defineProperty,yW=Object.getOwnPropertyDescriptor,lg="enumerable",cg="configurable",dg="writable";Ir.f=pW?mW?function(e,t,n){if(xd(e),t=y3(t),xd(n),typeof e=="function"&&t==="prototype"&&"value"in n&&dg in n&&!n[dg]){var r=yW(e,t);r&&r[dg]&&(e[t]=n.value,n={configurable:cg in n?n[cg]:r[cg],enumerable:lg in n?n[lg]:r[lg],writable:!1})}return ag(e,t,n)}:ag:function(e,t,n){if(xd(e),t=y3(t),xd(n),gW)try{return ag(e,t,n)}catch(r){}if("get"in n||"set"in n)throw new vW("Accessors not supported");return"value"in n&&(e[t]=n.value),e};var kd,Za,Nd,Va=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}},bW=Ir,wW=Va,el=zt?function(e,t,n){return bW.f(e,t,wW(1,n))}:function(e,t,n){return e[t]=n,e},_W=p3,b3=ig("keys"),ug=function(e){return b3[e]||(b3[e]=_W(e))},fg={},CW=IG,w3=pt,SW=Rn,EW=el,hg=yn,pg=Jp,xW=ug,kW=fg,_3="Object already initialized",gg=w3.TypeError,NW=w3.WeakMap;if(CW||pg.state){var Br=pg.state||(pg.state=new NW);Br.get=Br.get,Br.has=Br.has,Br.set=Br.set,kd=function(e,t){if(Br.has(e))throw new gg(_3);return t.facade=e,Br.set(e,t),t},Za=function(e){return Br.get(e)||{}},Nd=function(e){return Br.has(e)}}else{var ps=xW("state");kW[ps]=!0,kd=function(e,t){if(hg(e,ps))throw new gg(_3);return t.facade=e,EW(e,ps,t),t},Za=function(e){return hg(e,ps)?e[ps]:{}},Nd=function(e){return hg(e,ps)}}var Ri={set:kd,get:Za,has:Nd,enforce:function(e){return Nd(e)?Za(e):kd(e,{})},getterFor:function(e){return function(t){var n;if(!SW(t)||(n=Za(t)).type!==e)throw new gg("Incompatible receiver, "+e+" required");return n}}},mg=dt,TW=ht,AW=bt,Td=yn,vg=zt,OW=Xa.CONFIGURABLE,IW=Qp,BW=Ri.enforce,PW=Ri.get,C3=String,Ad=Object.defineProperty,RW=mg("".slice),LW=mg("".replace),DW=mg([].join),MW=vg&&!TW(function(){return Ad(function(){},"length",{value:8}).length!==8}),FW=String(String).split("String"),$W=X_.exports=function(e,t,n){RW(C3(t),0,7)==="Symbol("&&(t="["+LW(C3(t),/^Symbol\(([^)]*)\)/,"$1")+"]"),n&&n.getter&&(t="get "+t),n&&n.setter&&(t="set "+t),(!Td(e,"name")||OW&&e.name!==t)&&(vg?Ad(e,"name",{value:t,configurable:!0}):e.name=t),MW&&n&&Td(n,"arity")&&e.length!==n.arity&&Ad(e,"length",{value:n.arity});try{n&&Td(n,"constructor")&&n.constructor?vg&&Ad(e,"prototype",{writable:!1}):e.prototype&&(e.prototype=void 0)}catch(s){}var r=BW(e);return Td(r,"source")||(r.source=DW(FW,typeof t=="string"?t:"")),e};Function.prototype.toString=$W(function(){return AW(this)&&PW(this).source||IW(this)},"toString");var S3=X_.exports,E3=S3,zW=Ir,Od=function(e,t,n){return n.get&&E3(n.get,t,{getter:!0}),n.set&&E3(n.set,t,{setter:!0}),zW.f(e,t,n)},UW=zt,jW=Xa.EXISTS,x3=dt,qW=Od,k3=Function.prototype,HW=x3(k3.toString),N3=/function\b(?:\s|\/\*[\S\s]*?\*\/|\/\/[^\n\r]*[\n\r]+)*([^\s(/]*)/,GW=x3(N3.exec);UW&&!jW&&qW(k3,"name",{configurable:!0,get:function(){try{return GW(N3,HW(this))[1]}catch(e){return""}}});var yg={},Id={},T3={}.propertyIsEnumerable,A3=Object.getOwnPropertyDescriptor,WW=A3&&!T3.call({1:2},1);Id.f=WW?function(e){var t=A3(this,e);return!!t&&t.enumerable}:T3;var O3=dt,KW=O3({}.toString),YW=O3("".slice),gs=function(e){return YW(KW(e),8,-1)},JW=ht,XW=gs,bg=Object,QW=dt("".split),wg=JW(function(){return!bg("z").propertyIsEnumerable(0)})?function(e){return XW(e)==="String"?QW(e,""):bg(e)}:bg,ZW=wg,VW=md,ms=function(e){return ZW(VW(e))},eK=zt,tK=Ut,nK=Id,rK=Va,iK=ms,oK=sg,sK=yn,aK=t3,I3=Object.getOwnPropertyDescriptor;yg.f=eK?I3:function(e,t){if(e=iK(e),t=oK(t),aK)try{return I3(e,t)}catch(n){}if(sK(e,t))return rK(!tK(nK.f,e,t),e[t])};var lK=bt,cK=Ir,dK=S3,uK=Yp,lr=function(e,t,n,r){r||(r={});var s=r.enumerable,a=r.name!==void 0?r.name:t;if(lK(n)&&dK(n,a,r),r.global)s?e[t]=n:uK(t,n);else{try{r.unsafe?e[t]&&(s=!0):delete e[t]}catch(l){}s?e[t]=n:cK.f(e,t,{value:n,enumerable:!1,configurable:!r.nonConfigurable,writable:!r.nonWritable})}return e},B3={},fK=Math.ceil,hK=Math.floor,pK=Math.trunc||function(e){var t=+e;return(t>0?hK:fK)(t)},Bd=function(e){var t=+e;return t!=t||t===0?0:pK(t)},gK=Bd,mK=Math.max,vK=Math.min,yK=Bd,bK=Math.min,P3=function(e){return e>0?bK(yK(e),9007199254740991):0},wK=P3,tl=function(e){return wK(e.length)},_K=ms,CK=tl,R3=function(e){return function(t,n,r){var s,a=_K(t),l=CK(a),c=function(u,d){var f=gK(u);return f<0?mK(f+d,0):vK(f,d)}(r,l);if(e&&n!=n){for(;l>c;)if((s=a[c++])!=s)return!0}else for(;l>c;c++)if((e||c in a)&&a[c]===n)return e||c||0;return!e&&-1}},SK={includes:R3(!0),indexOf:R3(!1)},_g=yn,EK=ms,xK=SK.indexOf,kK=fg,L3=dt([].push),D3=function(e,t){var n,r=EK(e),s=0,a=[];for(n in r)!_g(kK,n)&&_g(r,n)&&L3(a,n);for(;t.length>s;)_g(r,n=t[s++])&&(~xK(a,n)||L3(a,n));return a},Cg=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],NK=D3,TK=Cg.concat("length","prototype");B3.f=Object.getOwnPropertyNames||function(e){return NK(e,TK)};var Sg={};Sg.f=Object.getOwnPropertySymbols;var AK=_o,OK=B3,IK=Sg,BK=Kt,PK=dt([].concat),RK=AK("Reflect","ownKeys")||function(e){var t=OK.f(BK(e)),n=IK.f;return n?PK(t,n(e)):t},M3=yn,LK=RK,DK=yg,MK=Ir,FK=ht,$K=bt,zK=/#|\.prototype\./,nl=function(e,t){var n=jK[UK(e)];return n===HK||n!==qK&&($K(t)?FK(t):!!t)},UK=nl.normalize=function(e){return String(e).replace(zK,".").toLowerCase()},jK=nl.data={},qK=nl.NATIVE="N",HK=nl.POLYFILL="P",F3=nl,Eg=pt,GK=yg.f,WK=el,KK=lr,YK=Yp,JK=function(e,t,n){for(var r=LK(t),s=MK.f,a=DK.f,l=0;l<r.length;l++){var c=r[l];M3(e,c)||n&&M3(n,c)||s(e,c,a(t,c))}},XK=F3,bn=function(e,t){var n,r,s,a,l,c=e.target,u=e.global,d=e.stat;if(n=u?Eg:d?Eg[c]||YK(c,{}):(Eg[c]||{}).prototype)for(r in t){if(a=t[r],s=e.dontCallGetSet?(l=GK(n,r))&&l.value:n[r],!XK(u?r:c+(d?".":"#")+r,e.forced)&&s!==void 0){if(typeof a==typeof s)continue;JK(a,s)}(e.sham||s&&s.sham)&&WK(a,"sham",!0),KK(n,r,a,e)}},$3={};$3[Nt("toStringTag")]="z";var xg=String($3)==="[object z]",QK=xg,ZK=bt,Pd=gs,VK=Nt("toStringTag"),eY=Object,tY=Pd(function(){return arguments}())==="Arguments",rl=QK?Pd:function(e){var t,n,r;return e===void 0?"Undefined":e===null?"Null":typeof(n=function(s,a){try{return s[a]}catch(l){}}(t=eY(e),VK))=="string"?n:tY?Pd(t):(r=Pd(t))==="Object"&&ZK(t.callee)?"Arguments":r},nY=rl,rY=String,Co=function(e){if(nY(e)==="Symbol")throw new TypeError("Cannot convert a Symbol value to a string");return rY(e)},iY=Kt,z3=function(){var e=iY(this),t="";return e.hasIndices&&(t+="d"),e.global&&(t+="g"),e.ignoreCase&&(t+="i"),e.multiline&&(t+="m"),e.dotAll&&(t+="s"),e.unicode&&(t+="u"),e.unicodeSets&&(t+="v"),e.sticky&&(t+="y"),t},kg=ht,Ng=pt.RegExp,Tg=kg(function(){var e=Ng("a","y");return e.lastIndex=2,e.exec("abcd")!==null}),oY=Tg||kg(function(){return!Ng("a","y").sticky}),sY={BROKEN_CARET:Tg||kg(function(){var e=Ng("^r","gy");return e.lastIndex=2,e.exec("str")!==null}),MISSED_STICKY:oY,UNSUPPORTED_Y:Tg},U3={},aY=D3,lY=Cg,Ag=Object.keys||function(e){return aY(e,lY)},cY=zt,dY=n3,uY=Ir,fY=Kt,hY=ms,pY=Ag;U3.f=cY&&!dY?Object.defineProperties:function(e,t){fY(e);for(var n,r=hY(t),s=pY(t),a=s.length,l=0;a>l;)uY.f(e,n=s[l++],r[n]);return e};var Rd,j3=_o("document","documentElement"),gY=Kt,mY=U3,q3=Cg,vY=fg,yY=j3,bY=yd,Og="prototype",Ig="script",H3=ug("IE_PROTO"),Bg=function(){},G3=function(e){return"<"+Ig+">"+e+"</"+Ig+">"},W3=function(e){e.write(G3("")),e.close();var t=e.parentWindow.Object;return e=null,t},Ld=function(){try{Rd=new ActiveXObject("htmlfile")}catch(s){}var e,t,n;Ld=typeof document!="undefined"?document.domain&&Rd?W3(Rd):(t=bY("iframe"),n="java"+Ig+":",t.style.display="none",yY.appendChild(t),t.src=String(n),(e=t.contentWindow.document).open(),e.write(G3("document.F=Object")),e.close(),e.F):W3(Rd);for(var r=q3.length;r--;)delete Ld[Og][q3[r]];return Ld()};vY[H3]=!0;var K3,Pg,Dd=Object.create||function(e,t){var n;return e!==null?(Bg[Og]=gY(e),n=new Bg,Bg[Og]=null,n[H3]=e):n=Ld(),t===void 0?n:mY.f(n,t)},wY=ht,_Y=pt.RegExp,CY=wY(function(){var e=_Y(".","s");return!(e.dotAll&&e.test(`
|
|
137
137
|
`)&&e.flags==="s")}),SY=ht,EY=pt.RegExp,xY=SY(function(){var e=EY("(?<a>b)","g");return e.exec("b").groups.a!=="b"||"b".replace(e,"$<a>c")!=="bc"}),vs=Ut,Md=dt,kY=Co,NY=z3,TY=sY,AY=Dd,OY=Ri.get,IY=CY,BY=xY,PY=ig("native-string-replace",String.prototype.replace),Fd=RegExp.prototype.exec,Rg=Fd,RY=Md("".charAt),LY=Md("".indexOf),DY=Md("".replace),Lg=Md("".slice),Dg=(Pg=/b*/g,vs(Fd,K3=/a/,"a"),vs(Fd,Pg,"a"),K3.lastIndex!==0||Pg.lastIndex!==0),Y3=TY.BROKEN_CARET,Mg=/()??/.exec("")[1]!==void 0;(Dg||Mg||Y3||IY||BY)&&(Rg=function(e){var t,n,r,s,a,l,c,u=this,d=OY(u),f=kY(e),p=d.raw;if(p)return p.lastIndex=u.lastIndex,t=vs(Rg,p,f),u.lastIndex=p.lastIndex,t;var g=d.groups,v=Y3&&u.sticky,b=vs(NY,u),w=u.source,_=0,C=f;if(v&&(b=DY(b,"y",""),LY(b,"g")===-1&&(b+="g"),C=Lg(f,u.lastIndex),u.lastIndex>0&&(!u.multiline||u.multiline&&RY(f,u.lastIndex-1)!==`
|
|
138
138
|
`)&&(w="(?: "+w+")",C=" "+C,_++),n=new RegExp("^(?:"+w+")",b)),Mg&&(n=new RegExp("^"+w+"$(?!\\s)",b)),Dg&&(r=u.lastIndex),s=vs(Fd,v?n:u,C),v?s?(s.input=Lg(s.input,_),s[0]=Lg(s[0],_),s.index=u.lastIndex,u.lastIndex+=s[0].length):u.lastIndex=0:Dg&&s&&(u.lastIndex=u.global?s.index+s[0].length:r),Mg&&s&&s.length>1&&vs(PY,s[0],n,function(){for(a=1;a<arguments.length-2;a++)arguments[a]===void 0&&(s[a]=void 0)}),s&&g)for(s.groups=l=AY(null),a=0;a<g.length;a++)l[(c=g[a])[0]]=s[c[1]];return s});var $d=Rg;bn({target:"RegExp",proto:!0,forced:/./.exec!==$d},{exec:$d});var MY=gd,J3=Function.prototype,X3=J3.apply,Q3=J3.call,Z3=typeof Reflect=="object"&&Reflect.apply||(MY?Q3.bind(X3):function(){return Q3.apply(X3,arguments)}),FY=gs,$Y=dt,Fg=function(e){if(FY(e)==="Function")return $Y(e)},V3=Fg,e6=lr,zY=$d,t6=ht,n6=Nt,UY=el,jY=n6("species"),$g=RegExp.prototype,zg=dt,qY=Bd,HY=Co,GY=md,WY=zg("".charAt),r6=zg("".charCodeAt),KY=zg("".slice),i6=function(e){return function(t,n){var r,s,a=HY(GY(t)),l=qY(n),c=a.length;return l<0||l>=c?e?"":void 0:(r=r6(a,l))<55296||r>56319||l+1===c||(s=r6(a,l+1))<56320||s>57343?e?WY(a,l):r:e?KY(a,l,l+2):s-56320+(r-55296<<10)+65536}},Ug={codeAt:i6(!1),charAt:i6(!0)},YY=Ug.charAt,jg=dt,JY=wo,XY=Math.floor,qg=jg("".charAt),QY=jg("".replace),Hg=jg("".slice),ZY=/\$([$&'`]|\d{1,2}|<[^>]*>)/g,VY=/\$([$&'`]|\d{1,2})/g,o6=Ut,eJ=Kt,tJ=bt,nJ=gs,rJ=$d,iJ=TypeError,oJ=Z3,s6=Ut,zd=dt,sJ=ht,aJ=Kt,lJ=bt,cJ=Ja,dJ=Bd,uJ=P3,ys=Co,fJ=md,hJ=function(e,t,n){return t+(n?YY(e,t).length:1)},pJ=Ed,gJ=function(e,t,n,r,s,a){var l=n+e.length,c=r.length,u=VY;return s!==void 0&&(s=JY(s),u=ZY),QY(a,u,function(d,f){var p;switch(qg(f,0)){case"$":return"$";case"&":return e;case"`":return Hg(t,0,n);case"'":return Hg(t,l);case"<":p=s[Hg(f,1,-1)];break;default:var g=+f;if(g===0)return d;if(g>c){var v=XY(g/10);return v===0?d:v<=c?r[v-1]===void 0?qg(f,1):r[v-1]+qg(f,1):d}p=r[g-1]}return p===void 0?"":p})},mJ=function(e,t){var n=e.exec;if(tJ(n)){var r=o6(n,e,t);return r!==null&&eJ(r),r}if(nJ(e)==="RegExp")return o6(rJ,e,t);throw new iJ("RegExp#exec called on incompatible receiver")},Gg=Nt("replace"),vJ=Math.max,yJ=Math.min,bJ=zd([].concat),Wg=zd([].push),a6=zd("".indexOf),l6=zd("".slice),wJ="a".replace(/./,"$0")==="$0",c6=!!/./[Gg]&&/./[Gg]("a","$0")==="";(function(e,t,n,r){var s=n6(e),a=!t6(function(){var d={};return d[s]=function(){return 7},""[e](d)!==7}),l=a&&!t6(function(){var d=!1,f=/a/;return e==="split"&&((f={}).constructor={},f.constructor[jY]=function(){return f},f.flags="",f[s]=/./[s]),f.exec=function(){return d=!0,null},f[s](""),!d});if(!a||!l||n){var c=V3(/./[s]),u=t(s,""[e],function(d,f,p,g,v){var b=V3(d),w=f.exec;return w===zY||w===$g.exec?a&&!v?{done:!0,value:c(f,p,g)}:{done:!0,value:b(p,f,g)}:{done:!1}});e6(String.prototype,e,u[0]),e6($g,s,u[1])}r&&UY($g[s],"sham",!0)})("replace",function(e,t,n){var r=c6?"$":"$0";return[function(s,a){var l=fJ(this),c=cJ(s)?void 0:pJ(s,Gg);return c?s6(c,s,l,a):s6(t,ys(l),s,a)},function(s,a){var l=aJ(this),c=ys(s);if(typeof a=="string"&&a6(a,r)===-1&&a6(a,"$<")===-1){var u=n(t,l,c,a);if(u.done)return u.value}var d=lJ(a);d||(a=ys(a));var f,p=l.global;p&&(f=l.unicode,l.lastIndex=0);for(var g,v=[];(g=mJ(l,c))!==null&&(Wg(v,g),p);)ys(g[0])===""&&(l.lastIndex=hJ(c,uJ(l.lastIndex),f));for(var b,w="",_=0,C=0;C<v.length;C++){for(var N,S=ys((g=v[C])[0]),E=vJ(yJ(dJ(g.index),c.length),0),k=[],A=1;A<g.length;A++)Wg(k,(b=g[A])===void 0?b:String(b));var O=g.groups;if(d){var I=bJ([S],k,E,c);O!==void 0&&Wg(I,O),N=ys(oJ(a,void 0,I))}else N=gJ(S,c,E,k,O,a);E>=_&&(w+=l6(c,_,E)+N,_=E+S.length)}return w+l6(c,_)}]},!!sJ(function(){var e=/./;return e.exec=function(){var t=[];return t.groups={a:"7"},t},"".replace(e,"$<a>")!=="7"})||!wJ||c6);var _J=Nt,CJ=Dd,SJ=Ir.f,Kg=_J("unscopables"),Yg=Array.prototype;Yg[Kg]===void 0&&SJ(Yg,Kg,{configurable:!0,value:CJ(null)});var So,d6,u6,il={},EJ=!ht(function(){function e(){}return e.prototype.constructor=null,Object.getPrototypeOf(new e)!==e.prototype}),xJ=yn,kJ=bt,NJ=wo,TJ=EJ,f6=ug("IE_PROTO"),Jg=Object,AJ=Jg.prototype,Xg=TJ?Jg.getPrototypeOf:function(e){var t=NJ(e);if(xJ(t,f6))return t[f6];var n=t.constructor;return kJ(n)&&t instanceof n?n.prototype:t instanceof Jg?AJ:null},OJ=ht,IJ=bt,BJ=Rn,h6=Xg,PJ=lr,Qg=Nt("iterator"),p6=!1;[].keys&&("next"in(u6=[].keys())?(d6=h6(h6(u6)))!==Object.prototype&&(So=d6):p6=!0);var RJ=!BJ(So)||OJ(function(){var e={};return So[Qg].call(e)!==e});RJ&&(So={}),IJ(So[Qg])||PJ(So,Qg,function(){return this});var Zg={IteratorPrototype:So,BUGGY_SAFARI_ITERATORS:p6},LJ=Ir.f,DJ=yn,g6=Nt("toStringTag"),bs=function(e,t,n){e&&!n&&(e=e.prototype),e&&!DJ(e,g6)&&LJ(e,g6,{configurable:!0,value:t})},MJ=Zg.IteratorPrototype,FJ=Dd,$J=Va,zJ=bs,UJ=il,jJ=function(){return this},m6=function(e,t,n,r){var s=t+" Iterator";return e.prototype=FJ(MJ,{next:$J(+!r,n)}),zJ(e,s,!1),UJ[s]=jJ,e},qJ=dt,HJ=Pi,GJ=Rn,WJ=String,KJ=TypeError,YJ=Kt,JJ=function(e){if(function(t){return GJ(t)||t===null}(e))return e;throw new KJ("Can't set "+WJ(e)+" as a prototype")},v6=Object.setPrototypeOf||("__proto__"in{}?function(){var e,t=!1,n={};try{(e=function(r,s,a){try{return qJ(HJ(Object.getOwnPropertyDescriptor(r,s)[a]))}catch(l){}}(Object.prototype,"__proto__","set"))(n,[]),t=n instanceof Array}catch(r){}return function(r,s){return YJ(r),JJ(s),t?e(r,s):r.__proto__=s,r}}():void 0),XJ=bn,QJ=Ut,ZJ=bt,VJ=m6,y6=Xg,b6=v6,eX=bs,tX=el,Vg=lr,nX=il,rX=Xa.PROPER,iX=Xa.CONFIGURABLE,w6=Zg.IteratorPrototype,Ud=Zg.BUGGY_SAFARI_ITERATORS,ol=Nt("iterator"),_6="keys",sl="values",C6="entries",oX=function(){return this},S6=function(e,t,n,r,s,a,l){VJ(n,t,r);var c,u,d,f=function(C){if(C===s&&w)return w;if(!Ud&&C&&C in v)return v[C];switch(C){case _6:case sl:case C6:return function(){return new n(this,C)}}return function(){return new n(this)}},p=t+" Iterator",g=!1,v=e.prototype,b=v[ol]||v["@@iterator"]||s&&v[s],w=!Ud&&b||f(s),_=t==="Array"&&v.entries||b;if(_&&(c=y6(_.call(new e)))!==Object.prototype&&c.next&&(y6(c)!==w6&&(b6?b6(c,w6):ZJ(c[ol])||Vg(c,ol,oX)),eX(c,p,!0)),rX&&s===sl&&b&&b.name!==sl&&(iX?tX(v,"name",sl):(g=!0,w=function(){return QJ(b,this)})),s)if(u={values:f(sl),keys:a?w:f(_6),entries:f(C6)},l)for(d in u)(Ud||g||!(d in v))&&Vg(v,d,u[d]);else XJ({target:t,proto:!0,forced:Ud||g},u);return v[ol]!==w&&Vg(v,ol,w,{name:s}),nX[t]=w,u},em=function(e,t){return{value:e,done:t}},sX=ms,tm=function(e){Yg[Kg][e]=!0},E6=il,x6=Ri,aX=Ir.f,lX=S6,jd=em,cX=zt,k6="Array Iterator",dX=x6.set,uX=x6.getterFor(k6),fX=lX(Array,"Array",function(e,t){dX(this,{type:k6,target:sX(e),index:0,kind:t})},function(){var e=uX(this),t=e.target,n=e.index++;if(!t||n>=t.length)return e.target=void 0,jd(void 0,!0);switch(e.kind){case"keys":return jd(n,!1);case"values":return jd(t[n],!1)}return jd([n,t[n]],!1)},"values"),N6=E6.Arguments=E6.Array;if(tm("keys"),tm("values"),tm("entries"),cX&&N6.name!=="values")try{aX(N6,"name",{value:"values"})}catch(e){}var hX=rl,pX=xg?{}.toString:function(){return"[object "+hX(this)+"]"};xg||lr(Object.prototype,"toString",pX,{unsafe:!0});var gX=Ug.charAt,mX=Co,T6=Ri,vX=S6,A6=em,O6="String Iterator",yX=T6.set,bX=T6.getterFor(O6);vX(String,"String",function(e){yX(this,{type:O6,string:mX(e),index:0})},function(){var e,t=bX(this),n=t.string,r=t.index;return r>=n.length?A6(void 0,!0):(e=gX(n,r),t.index+=e.length,A6(e,!1))});var nm=yd("span").classList,I6=nm&&nm.constructor&&nm.constructor.prototype,wX=I6===Object.prototype?void 0:I6,B6=pt,P6={CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0},_X=wX,al=fX,R6=el,CX=bs,rm=Nt("iterator"),im=al.values,L6=function(e,t){if(e){if(e[rm]!==im)try{R6(e,rm,im)}catch(r){e[rm]=im}if(CX(e,t,!0),P6[t]){for(var n in al)if(e[n]!==al[n])try{R6(e,n,al[n])}catch(r){e[n]=al[n]}}}};for(var om in P6)L6(B6[om]&&B6[om].prototype,om);L6(_X,"DOMTokenList");var SX=ht,EX=zt,xX=Nt("iterator"),D6=!SX(function(){var e=new URL("b?a=1&b=2&c=3","http://a"),t=e.searchParams,n=new URLSearchParams("a=1&a=2&b=3"),r="";return e.pathname="c%20d",t.forEach(function(s,a){t.delete("b"),r+=a+s}),n.delete("a",2),n.delete("b",void 0),!t.size&&!EX||!t.sort||e.href!=="http://a/c%20d?a=1&c=3"||t.get("c")!=="3"||String(new URLSearchParams("?a=1"))!=="a=1"||!t[xX]||new URL("https://a@b").username!=="a"||new URLSearchParams(new URLSearchParams("a=b")).get("a")!=="b"||new URL("http://тест").host!=="xn--e1aybc"||new URL("http://a#б").hash!=="#%D0%B1"||r!=="a1c3"||new URL("http://x",void 0).host!=="x"}),kX=Pi,NX=gd,TX=Fg(Fg.bind),Eo=function(e,t){return kX(e),t===void 0?e:NX?TX(e,t):function(){return e.apply(t,arguments)}},AX=wd,OX=TypeError,sm=function(e,t){if(AX(t,e))return e;throw new OX("Incorrect invocation")},M6=zt,IX=dt,BX=Ut,PX=ht,am=Ag,RX=Sg,LX=Id,DX=wo,MX=wg,ws=Object.assign,F6=Object.defineProperty,FX=IX([].concat),$X=!ws||PX(function(){if(M6&&ws({b:1},ws(F6({},"a",{enumerable:!0,get:function(){F6(this,"b",{value:3,enumerable:!1})}}),{b:2})).b!==1)return!0;var e={},t={},n=Symbol("assign detection"),r="abcdefghijklmnopqrst";return e[n]=7,r.split("").forEach(function(s){t[s]=s}),ws({},e)[n]!==7||am(ws({},t)).join("")!==r})?function(e,t){for(var n=DX(e),r=arguments.length,s=1,a=RX.f,l=LX.f;r>s;)for(var c,u=MX(arguments[s++]),d=a?FX(am(u),a(u)):am(u),f=d.length,p=0;f>p;)c=d[p++],M6&&!BX(l,u,c)||(n[c]=u[c]);return n}:ws,zX=Ut,$6=Kt,UX=Ed,z6=function(e,t,n){var r,s;$6(e);try{if(!(r=UX(e,"return"))){if(t==="throw")throw n;return n}r=zX(r,e)}catch(a){s=!0,r=a}if(t==="throw")throw n;if(s)throw r;return $6(r),n},jX=Kt,qX=z6,HX=il,GX=Nt("iterator"),WX=Array.prototype,U6=function(e){return e!==void 0&&(HX.Array===e||WX[GX]===e)},KX=dt,YX=ht,j6=bt,JX=rl,XX=Qp,q6=function(){},QX=[],H6=_o("Reflect","construct"),lm=/^\s*(?:class|function)\b/,ZX=KX(lm.exec),VX=!lm.test(q6),ll=function(e){if(!j6(e))return!1;try{return H6(q6,QX,e),!0}catch(t){return!1}},G6=function(e){if(!j6(e))return!1;switch(JX(e)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return VX||!!ZX(lm,XX(e))}catch(t){return!0}};G6.sham=!0;var cm=!H6||YX(function(){var e;return ll(ll.call)||!ll(Object)||!ll(function(){e=!0})||e})?G6:ll,eQ=sg,tQ=Ir,nQ=Va,W6=function(e,t,n){var r=eQ(t);r in e?tQ.f(e,r,nQ(0,n)):e[r]=n},rQ=rl,K6=Ed,iQ=Ja,oQ=il,sQ=Nt("iterator"),qd=function(e){if(!iQ(e))return K6(e,sQ)||K6(e,"@@iterator")||oQ[rQ(e)]},aQ=Ut,lQ=Pi,cQ=Kt,dQ=Sd,uQ=qd,fQ=TypeError,dm=function(e,t){var n=arguments.length<2?uQ(e):t;if(lQ(n))return cQ(aQ(n,e));throw new fQ(dQ(e)+" is not iterable")},hQ=Eo,pQ=Ut,gQ=wo,mQ=function(e,t,n,r){try{return r?t(jX(n)[0],n[1]):t(n)}catch(s){qX(e,"throw",s)}},vQ=U6,yQ=cm,bQ=tl,Y6=W6,wQ=dm,_Q=qd,J6=Array,um=dt([].slice),xo=dt,fm=2147483647,CQ=/[^\0-\u007E]/,X6=/[.\u3002\uFF0E\uFF61]/g,Q6="Overflow: input needs wider integers to process",Z6=RangeError,SQ=xo(X6.exec),_s=Math.floor,hm=String.fromCharCode,V6=xo("".charCodeAt),e4=xo([].join),Li=xo([].push),EQ=xo("".replace),xQ=xo("".split),kQ=xo("".toLowerCase),t4=function(e){return e+22+75*(e<26)},NQ=function(e,t,n){var r=0;for(e=n?_s(e/700):e>>1,e+=_s(e/t);e>455;)e=_s(e/35),r+=36;return _s(r+36*e/(e+38))},TQ=function(e){var t=[];e=function(C){for(var N=[],S=0,E=C.length;S<E;){var k=V6(C,S++);if(k>=55296&&k<=56319&&S<E){var A=V6(C,S++);(64512&A)==56320?Li(N,((1023&k)<<10)+(1023&A)+65536):(Li(N,k),S--)}else Li(N,k)}return N}(e);var n,r,s=e.length,a=128,l=0,c=72;for(n=0;n<e.length;n++)(r=e[n])<128&&Li(t,hm(r));var u=t.length,d=u;for(u&&Li(t,"-");d<s;){var f=fm;for(n=0;n<e.length;n++)(r=e[n])>=a&&r<f&&(f=r);var p=d+1;if(f-a>_s((fm-l)/p))throw new Z6(Q6);for(l+=(f-a)*p,a=f,n=0;n<e.length;n++){if((r=e[n])<a&&++l>fm)throw new Z6(Q6);if(r===a){for(var g=l,v=36;;){var b=v<=c?1:v>=c+26?26:v-c;if(g<b)break;var w=g-b,_=36-b;Li(t,hm(t4(b+w%_))),g=_s(w/_),v+=36}Li(t,hm(t4(g))),c=NQ(l,p,d===u),l=0,d++}}l++,a++}return e4(t,"")},AQ=TypeError,pm=function(e,t){if(e<t)throw new AQ("Not enough arguments");return e},n4=pt,OQ=zt,IQ=Object.getOwnPropertyDescriptor,r4=function(e){if(!OQ)return n4[e];var t=IQ(n4,e);return t&&t.value},BQ=lr,i4=um,PQ=Math.floor,gm=function(e,t){var n=e.length;if(n<8)for(var r,s,a=1;a<n;){for(s=a,r=e[a];s&&t(e[s-1],r)>0;)e[s]=e[--s];s!==a++&&(e[s]=r)}else for(var l=PQ(n/2),c=gm(i4(e,0,l),t),u=gm(i4(e,l),t),d=c.length,f=u.length,p=0,g=0;p<d||g<f;)e[p+g]=p<d&&g<f?t(c[p],u[g])<=0?c[p++]:u[g++]:p<d?c[p++]:u[g++];return e},mm=bn,Hd=pt,vm=r4,Gd=Ut,Pr=dt,cl=zt,o4=D6,s4=lr,RQ=Od,LQ=bs,DQ=m6,ym=Ri,a4=sm,bm=bt,MQ=yn,FQ=Eo,$Q=rl,zQ=Kt,l4=Rn,tn=Co,UQ=Dd,c4=Va,d4=dm,jQ=qd,Wd=em,Cs=pm,qQ=gm,HQ=Nt("iterator"),Ss="URLSearchParams",u4=Ss+"Iterator",f4=ym.set,Ln=ym.getterFor(Ss),GQ=ym.getterFor(u4),h4=vm("fetch"),Kd=vm("Request"),dl=vm("Headers"),wm=Kd&&Kd.prototype,p4=dl&&dl.prototype,WQ=Hd.RegExp,KQ=Hd.TypeError,g4=Hd.decodeURIComponent,YQ=Hd.encodeURIComponent,JQ=Pr("".charAt),m4=Pr([].join),ko=Pr([].push),_m=Pr("".replace),XQ=Pr([].shift),v4=Pr([].splice),y4=Pr("".split),QQ=Pr("".slice),ZQ=/\+/g,b4=Array(4),VQ=function(e){return b4[e-1]||(b4[e-1]=WQ("((?:%[\\da-f]{2}){"+e+"})","gi"))},eZ=function(e){try{return g4(e)}catch(t){return e}},w4=function(e){var t=_m(e,ZQ," "),n=4;try{return g4(t)}catch(r){for(;n;)t=_m(t,VQ(n--),eZ);return t}},tZ=/[!'()~]|%20/g,nZ={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+"},rZ=function(e){return nZ[e]},_4=function(e){return _m(YQ(e),tZ,rZ)},Cm=DQ(function(e,t){f4(this,{type:u4,target:Ln(e).entries,index:0,kind:t})},Ss,function(){var e=GQ(this),t=e.target,n=e.index++;if(!t||n>=t.length)return e.target=void 0,Wd(void 0,!0);var r=t[n];switch(e.kind){case"keys":return Wd(r.key,!1);case"values":return Wd(r.value,!1)}return Wd([r.key,r.value],!1)},!0),C4=function(e){this.entries=[],this.url=null,e!==void 0&&(l4(e)?this.parseObject(e):this.parseQuery(typeof e=="string"?JQ(e,0)==="?"?QQ(e,1):e:tn(e)))};C4.prototype={type:Ss,bindURL:function(e){this.url=e,this.update()},parseObject:function(e){var t,n,r,s,a,l,c,u=this.entries,d=jQ(e);if(d)for(n=(t=d4(e,d)).next;!(r=Gd(n,t)).done;){if(a=(s=d4(zQ(r.value))).next,(l=Gd(a,s)).done||(c=Gd(a,s)).done||!Gd(a,s).done)throw new KQ("Expected sequence with length 2");ko(u,{key:tn(l.value),value:tn(c.value)})}else for(var f in e)MQ(e,f)&&ko(u,{key:f,value:tn(e[f])})},parseQuery:function(e){if(e)for(var t,n,r=this.entries,s=y4(e,"&"),a=0;a<s.length;)(t=s[a++]).length&&(n=y4(t,"="),ko(r,{key:w4(XQ(n)),value:w4(m4(n,"="))}))},serialize:function(){for(var e,t=this.entries,n=[],r=0;r<t.length;)e=t[r++],ko(n,_4(e.key)+"="+_4(e.value));return m4(n,"&")},update:function(){this.entries.length=0,this.parseQuery(this.url.query)},updateURL:function(){this.url&&this.url.update()}};var Yd=function(){a4(this,Es);var e=f4(this,new C4(arguments.length>0?arguments[0]:void 0));cl||(this.size=e.entries.length)},Es=Yd.prototype;if(function(e,t,n){for(var r in t)BQ(e,r,t[r],n)}(Es,{append:function(e,t){var n=Ln(this);Cs(arguments.length,2),ko(n.entries,{key:tn(e),value:tn(t)}),cl||this.length++,n.updateURL()},delete:function(e){for(var t=Ln(this),n=Cs(arguments.length,1),r=t.entries,s=tn(e),a=n<2?void 0:arguments[1],l=a===void 0?a:tn(a),c=0;c<r.length;){var u=r[c];if(u.key!==s||l!==void 0&&u.value!==l)c++;else if(v4(r,c,1),l!==void 0)break}cl||(this.size=r.length),t.updateURL()},get:function(e){var t=Ln(this).entries;Cs(arguments.length,1);for(var n=tn(e),r=0;r<t.length;r++)if(t[r].key===n)return t[r].value;return null},getAll:function(e){var t=Ln(this).entries;Cs(arguments.length,1);for(var n=tn(e),r=[],s=0;s<t.length;s++)t[s].key===n&&ko(r,t[s].value);return r},has:function(e){for(var t=Ln(this).entries,n=Cs(arguments.length,1),r=tn(e),s=n<2?void 0:arguments[1],a=s===void 0?s:tn(s),l=0;l<t.length;){var c=t[l++];if(c.key===r&&(a===void 0||c.value===a))return!0}return!1},set:function(e,t){var n=Ln(this);Cs(arguments.length,1);for(var r,s=n.entries,a=!1,l=tn(e),c=tn(t),u=0;u<s.length;u++)(r=s[u]).key===l&&(a?v4(s,u--,1):(a=!0,r.value=c));a||ko(s,{key:l,value:c}),cl||(this.size=s.length),n.updateURL()},sort:function(){var e=Ln(this);qQ(e.entries,function(t,n){return t.key>n.key?1:-1}),e.updateURL()},forEach:function(e){for(var t,n=Ln(this).entries,r=FQ(e,arguments.length>1?arguments[1]:void 0),s=0;s<n.length;)r((t=n[s++]).value,t.key,this)},keys:function(){return new Cm(this,"keys")},values:function(){return new Cm(this,"values")},entries:function(){return new Cm(this,"entries")}},{enumerable:!0}),s4(Es,HQ,Es.entries,{name:"entries"}),s4(Es,"toString",function(){return Ln(this).serialize()},{enumerable:!0}),cl&&RQ(Es,"size",{get:function(){return Ln(this).entries.length},configurable:!0,enumerable:!0}),LQ(Yd,Ss),mm({global:!0,constructor:!0,forced:!o4},{URLSearchParams:Yd}),!o4&&bm(dl)){var iZ=Pr(p4.has),oZ=Pr(p4.set),S4=function(e){if(l4(e)){var t,n=e.body;if($Q(n)===Ss)return t=e.headers?new dl(e.headers):new dl,iZ(t,"content-type")||oZ(t,"content-type","application/x-www-form-urlencoded;charset=UTF-8"),UQ(e,{body:c4(0,tn(n)),headers:c4(0,t)})}return e};if(bm(h4)&&mm({global:!0,enumerable:!0,dontCallGetSet:!0,forced:!0},{fetch:function(e){return h4(e,arguments.length>1?S4(arguments[1]):{})}}),bm(Kd)){var Sm=function(e){return a4(this,wm),new Kd(e,arguments.length>1?S4(arguments[1]):{})};wm.constructor=Sm,Sm.prototype=wm,mm({global:!0,constructor:!0,dontCallGetSet:!0,forced:!0},{Request:Sm})}}var Dn,sZ=bn,Em=zt,aZ=D6,xm=pt,E4=Eo,Mn=dt,Jd=lr,Fn=Od,lZ=sm,km=yn,Nm=$X,xs=function(e){var t=gQ(e),n=yQ(this),r=arguments.length,s=r>1?arguments[1]:void 0,a=s!==void 0;a&&(s=hQ(s,r>2?arguments[2]:void 0));var l,c,u,d,f,p,g=_Q(t),v=0;if(!g||this===J6&&vQ(g))for(l=bQ(t),c=n?new this(l):J6(l);l>v;v++)p=a?s(t[v],v):t[v],Y6(c,v,p);else for(f=(d=wQ(t,g)).next,c=n?new this:[];!(u=pQ(f,d)).done;v++)p=a?mQ(d,s,[u.value,v],!0):u.value,Y6(c,v,p);return c.length=v,c},cr=um,cZ=Ug.codeAt,ai=Co,dZ=bs,uZ=pm,x4={URLSearchParams:Yd,getState:Ln},k4=Ri,fZ=k4.set,Xd=k4.getterFor("URL"),hZ=x4.URLSearchParams,pZ=x4.getState,ul=xm.URL,Tm=xm.TypeError,Qd=xm.parseInt,gZ=Math.floor,N4=Math.pow,$n=Mn("".charAt),dr=Mn(/./.exec),fl=Mn([].join),mZ=Mn(1 .toString),vZ=Mn([].pop),ks=Mn([].push),Am=Mn("".replace),yZ=Mn([].shift),bZ=Mn("".split),hl=Mn("".slice),Zd=Mn("".toLowerCase),wZ=Mn([].unshift),Om="Invalid scheme",No="Invalid host",T4="Invalid port",A4=/[a-z]/i,_Z=/[\d+-.a-z]/i,Im=/\d/,CZ=/^0x/i,SZ=/^[0-7]+$/,EZ=/^\d+$/,O4=/^[\da-f]+$/i,xZ=/[\0\t\n\r #%/:<>?@[\\\]^|]/,kZ=/[\0\t\n\r #/:<>?@[\\\]^|]/,NZ=/^[\u0000-\u0020]+/,TZ=/(^|[^\u0000-\u0020])[\u0000-\u0020]+$/,AZ=/[\t\n\r]/g,pl=function(e){var t,n,r,s;if(typeof e=="number"){for(t=[],n=0;n<4;n++)wZ(t,e%256),e=gZ(e/256);return fl(t,".")}if(typeof e=="object"){for(t="",r=function(a){for(var l=null,c=1,u=null,d=0,f=0;f<8;f++)a[f]!==0?(d>c&&(l=u,c=d),u=null,d=0):(u===null&&(u=f),++d);return d>c&&(l=u,c=d),l}(e),n=0;n<8;n++)s&&e[n]===0||(s&&(s=!1),r===n?(t+=n?":":"::",s=!0):(t+=mZ(e[n],16),n<7&&(t+=":")));return"["+t+"]"}return e},Vd={},I4=Nm({},Vd,{" ":1,'"':1,"<":1,">":1,"`":1}),B4=Nm({},I4,{"#":1,"?":1,"{":1,"}":1}),Bm=Nm({},B4,{"/":1,":":1,";":1,"=":1,"@":1,"[":1,"\\":1,"]":1,"^":1,"|":1}),Di=function(e,t){var n=cZ(e,0);return n>32&&n<127&&!km(t,e)?e:encodeURIComponent(e)},eu={ftp:21,file:null,http:80,https:443,ws:80,wss:443},gl=function(e,t){var n;return e.length===2&&dr(A4,$n(e,0))&&((n=$n(e,1))===":"||!t&&n==="|")},P4=function(e){var t;return e.length>1&&gl(hl(e,0,2))&&(e.length===2||(t=$n(e,2))==="/"||t==="\\"||t==="?"||t==="#")},OZ=function(e){return e==="."||Zd(e)==="%2e"},Pm={},R4={},Rm={},L4={},D4={},Lm={},M4={},F4={},tu={},nu={},Dm={},Mm={},Fm={},$m={},$4={},zm={},Ns={},Rr={},z4={},To={},li={},Um=function(e,t,n){var r,s,a,l=ai(e);if(t){if(s=this.parse(l))throw new Tm(s);this.searchParams=null}else{if(n!==void 0&&(r=new Um(n,!0)),s=this.parse(l,null,r))throw new Tm(s);(a=pZ(new hZ)).bindURL(this),this.searchParams=a}};Um.prototype={type:"URL",parse:function(e,t,n){var r,s,a,l,c,u=this,d=t||Pm,f=0,p="",g=!1,v=!1,b=!1;for(e=ai(e),t||(u.scheme="",u.username="",u.password="",u.host=null,u.port=null,u.path=[],u.query=null,u.fragment=null,u.cannotBeABaseURL=!1,e=Am(e,NZ,""),e=Am(e,TZ,"$1")),e=Am(e,AZ,""),r=xs(e);f<=r.length;){switch(s=r[f],d){case Pm:if(!s||!dr(A4,s)){if(t)return Om;d=Rm;continue}p+=Zd(s),d=R4;break;case R4:if(s&&(dr(_Z,s)||s==="+"||s==="-"||s==="."))p+=Zd(s);else{if(s!==":"){if(t)return Om;p="",d=Rm,f=0;continue}if(t&&(u.isSpecial()!==km(eu,p)||p==="file"&&(u.includesCredentials()||u.port!==null)||u.scheme==="file"&&!u.host))return;if(u.scheme=p,t)return void(u.isSpecial()&&eu[u.scheme]===u.port&&(u.port=null));p="",u.scheme==="file"?d=$m:u.isSpecial()&&n&&n.scheme===u.scheme?d=L4:u.isSpecial()?d=F4:r[f+1]==="/"?(d=D4,f++):(u.cannotBeABaseURL=!0,ks(u.path,""),d=z4)}break;case Rm:if(!n||n.cannotBeABaseURL&&s!=="#")return Om;if(n.cannotBeABaseURL&&s==="#"){u.scheme=n.scheme,u.path=cr(n.path),u.query=n.query,u.fragment="",u.cannotBeABaseURL=!0,d=li;break}d=n.scheme==="file"?$m:Lm;continue;case L4:if(s!=="/"||r[f+1]!=="/"){d=Lm;continue}d=tu,f++;break;case D4:if(s==="/"){d=nu;break}d=Rr;continue;case Lm:if(u.scheme=n.scheme,s===Dn)u.username=n.username,u.password=n.password,u.host=n.host,u.port=n.port,u.path=cr(n.path),u.query=n.query;else if(s==="/"||s==="\\"&&u.isSpecial())d=M4;else if(s==="?")u.username=n.username,u.password=n.password,u.host=n.host,u.port=n.port,u.path=cr(n.path),u.query="",d=To;else{if(s!=="#"){u.username=n.username,u.password=n.password,u.host=n.host,u.port=n.port,u.path=cr(n.path),u.path.length--,d=Rr;continue}u.username=n.username,u.password=n.password,u.host=n.host,u.port=n.port,u.path=cr(n.path),u.query=n.query,u.fragment="",d=li}break;case M4:if(!u.isSpecial()||s!=="/"&&s!=="\\"){if(s!=="/"){u.username=n.username,u.password=n.password,u.host=n.host,u.port=n.port,d=Rr;continue}d=nu}else d=tu;break;case F4:if(d=tu,s!=="/"||$n(p,f+1)!=="/")continue;f++;break;case tu:if(s!=="/"&&s!=="\\"){d=nu;continue}break;case nu:if(s==="@"){g&&(p="%40"+p),g=!0,a=xs(p);for(var w=0;w<a.length;w++){var _=a[w];if(_!==":"||b){var C=Di(_,Bm);b?u.password+=C:u.username+=C}else b=!0}p=""}else if(s===Dn||s==="/"||s==="?"||s==="#"||s==="\\"&&u.isSpecial()){if(g&&p==="")return"Invalid authority";f-=xs(p).length+1,p="",d=Dm}else p+=s;break;case Dm:case Mm:if(t&&u.scheme==="file"){d=zm;continue}if(s!==":"||v){if(s===Dn||s==="/"||s==="?"||s==="#"||s==="\\"&&u.isSpecial()){if(u.isSpecial()&&p==="")return No;if(t&&p===""&&(u.includesCredentials()||u.port!==null))return;if(l=u.parseHost(p))return l;if(p="",d=Ns,t)return;continue}s==="["?v=!0:s==="]"&&(v=!1),p+=s}else{if(p==="")return No;if(l=u.parseHost(p))return l;if(p="",d=Fm,t===Mm)return}break;case Fm:if(!dr(Im,s)){if(s===Dn||s==="/"||s==="?"||s==="#"||s==="\\"&&u.isSpecial()||t){if(p!==""){var N=Qd(p,10);if(N>65535)return T4;u.port=u.isSpecial()&&N===eu[u.scheme]?null:N,p=""}if(t)return;d=Ns;continue}return T4}p+=s;break;case $m:if(u.scheme="file",s==="/"||s==="\\")d=$4;else{if(!n||n.scheme!=="file"){d=Rr;continue}switch(s){case Dn:u.host=n.host,u.path=cr(n.path),u.query=n.query;break;case"?":u.host=n.host,u.path=cr(n.path),u.query="",d=To;break;case"#":u.host=n.host,u.path=cr(n.path),u.query=n.query,u.fragment="",d=li;break;default:P4(fl(cr(r,f),""))||(u.host=n.host,u.path=cr(n.path),u.shortenPath()),d=Rr;continue}}break;case $4:if(s==="/"||s==="\\"){d=zm;break}n&&n.scheme==="file"&&!P4(fl(cr(r,f),""))&&(gl(n.path[0],!0)?ks(u.path,n.path[0]):u.host=n.host),d=Rr;continue;case zm:if(s===Dn||s==="/"||s==="\\"||s==="?"||s==="#"){if(!t&&gl(p))d=Rr;else if(p===""){if(u.host="",t)return;d=Ns}else{if(l=u.parseHost(p))return l;if(u.host==="localhost"&&(u.host=""),t)return;p="",d=Ns}continue}p+=s;break;case Ns:if(u.isSpecial()){if(d=Rr,s!=="/"&&s!=="\\")continue}else if(t||s!=="?")if(t||s!=="#"){if(s!==Dn&&(d=Rr,s!=="/"))continue}else u.fragment="",d=li;else u.query="",d=To;break;case Rr:if(s===Dn||s==="/"||s==="\\"&&u.isSpecial()||!t&&(s==="?"||s==="#")){if((c=Zd(c=p))===".."||c==="%2e."||c===".%2e"||c==="%2e%2e"?(u.shortenPath(),s==="/"||s==="\\"&&u.isSpecial()||ks(u.path,"")):OZ(p)?s==="/"||s==="\\"&&u.isSpecial()||ks(u.path,""):(u.scheme==="file"&&!u.path.length&&gl(p)&&(u.host&&(u.host=""),p=$n(p,0)+":"),ks(u.path,p)),p="",u.scheme==="file"&&(s===Dn||s==="?"||s==="#"))for(;u.path.length>1&&u.path[0]==="";)yZ(u.path);s==="?"?(u.query="",d=To):s==="#"&&(u.fragment="",d=li)}else p+=Di(s,B4);break;case z4:s==="?"?(u.query="",d=To):s==="#"?(u.fragment="",d=li):s!==Dn&&(u.path[0]+=Di(s,Vd));break;case To:t||s!=="#"?s!==Dn&&(s==="'"&&u.isSpecial()?u.query+="%27":u.query+=s==="#"?"%23":Di(s,Vd)):(u.fragment="",d=li);break;case li:s!==Dn&&(u.fragment+=Di(s,I4))}f++}},parseHost:function(e){var t,n,r;if($n(e,0)==="["){if($n(e,e.length-1)!=="]"||(t=function(s){var a,l,c,u,d,f,p,g=[0,0,0,0,0,0,0,0],v=0,b=null,w=0,_=function(){return $n(s,w)};if(_()===":"){if($n(s,1)!==":")return;w+=2,b=++v}for(;_();){if(v===8)return;if(_()!==":"){for(a=l=0;l<4&&dr(O4,_());)a=16*a+Qd(_(),16),w++,l++;if(_()==="."){if(l===0||(w-=l,v>6))return;for(c=0;_();){if(u=null,c>0){if(!(_()==="."&&c<4))return;w++}if(!dr(Im,_()))return;for(;dr(Im,_());){if(d=Qd(_(),10),u===null)u=d;else{if(u===0)return;u=10*u+d}if(u>255)return;w++}g[v]=256*g[v]+u,++c!=2&&c!==4||v++}if(c!==4)return;break}if(_()===":"){if(w++,!_())return}else if(_())return;g[v++]=a}else{if(b!==null)return;w++,b=++v}}if(b!==null)for(f=v-b,v=7;v!==0&&f>0;)p=g[v],g[v--]=g[b+f-1],g[b+--f]=p;else if(v!==8)return;return g}(hl(e,1,-1)),!t))return No;this.host=t}else if(this.isSpecial()){if(e=function(s){var a,l,c=[],u=xQ(EQ(kQ(s),X6,"."),".");for(a=0;a<u.length;a++)l=u[a],Li(c,SQ(CQ,l)?"xn--"+TQ(l):l);return e4(c,".")}(e),dr(xZ,e)||(t=function(s){var a,l,c,u,d,f,p,g=bZ(s,".");if(g.length&&g[g.length-1]===""&&g.length--,(a=g.length)>4)return s;for(l=[],c=0;c<a;c++){if((u=g[c])==="")return s;if(d=10,u.length>1&&$n(u,0)==="0"&&(d=dr(CZ,u)?16:8,u=hl(u,d===8?1:2)),u==="")f=0;else{if(!dr(d===10?EZ:d===8?SZ:O4,u))return s;f=Qd(u,d)}ks(l,f)}for(c=0;c<a;c++)if(f=l[c],c===a-1){if(f>=N4(256,5-a))return null}else if(f>255)return null;for(p=vZ(l),c=0;c<l.length;c++)p+=l[c]*N4(256,3-c);return p}(e),t===null))return No;this.host=t}else{if(dr(kZ,e))return No;for(t="",n=xs(e),r=0;r<n.length;r++)t+=Di(n[r],Vd);this.host=t}},cannotHaveUsernamePasswordPort:function(){return!this.host||this.cannotBeABaseURL||this.scheme==="file"},includesCredentials:function(){return this.username!==""||this.password!==""},isSpecial:function(){return km(eu,this.scheme)},shortenPath:function(){var e=this.path,t=e.length;!t||this.scheme==="file"&&t===1&&gl(e[0],!0)||e.length--},serialize:function(){var e=this,t=e.scheme,n=e.username,r=e.password,s=e.host,a=e.port,l=e.path,c=e.query,u=e.fragment,d=t+":";return s!==null?(d+="//",e.includesCredentials()&&(d+=n+(r?":"+r:"")+"@"),d+=pl(s),a!==null&&(d+=":"+a)):t==="file"&&(d+="//"),d+=e.cannotBeABaseURL?l[0]:l.length?"/"+fl(l,"/"):"",c!==null&&(d+="?"+c),u!==null&&(d+="#"+u),d},setHref:function(e){var t=this.parse(e);if(t)throw new Tm(t);this.searchParams.update()},getOrigin:function(){var e=this.scheme,t=this.port;if(e==="blob")try{return new Ts(e.path[0]).origin}catch(n){return"null"}return e!=="file"&&this.isSpecial()?e+"://"+pl(this.host)+(t!==null?":"+t:""):"null"},getProtocol:function(){return this.scheme+":"},setProtocol:function(e){this.parse(ai(e)+":",Pm)},getUsername:function(){return this.username},setUsername:function(e){var t=xs(ai(e));if(!this.cannotHaveUsernamePasswordPort()){this.username="";for(var n=0;n<t.length;n++)this.username+=Di(t[n],Bm)}},getPassword:function(){return this.password},setPassword:function(e){var t=xs(ai(e));if(!this.cannotHaveUsernamePasswordPort()){this.password="";for(var n=0;n<t.length;n++)this.password+=Di(t[n],Bm)}},getHost:function(){var e=this.host,t=this.port;return e===null?"":t===null?pl(e):pl(e)+":"+t},setHost:function(e){this.cannotBeABaseURL||this.parse(e,Dm)},getHostname:function(){var e=this.host;return e===null?"":pl(e)},setHostname:function(e){this.cannotBeABaseURL||this.parse(e,Mm)},getPort:function(){var e=this.port;return e===null?"":ai(e)},setPort:function(e){this.cannotHaveUsernamePasswordPort()||((e=ai(e))===""?this.port=null:this.parse(e,Fm))},getPathname:function(){var e=this.path;return this.cannotBeABaseURL?e[0]:e.length?"/"+fl(e,"/"):""},setPathname:function(e){this.cannotBeABaseURL||(this.path=[],this.parse(e,Ns))},getSearch:function(){var e=this.query;return e?"?"+e:""},setSearch:function(e){(e=ai(e))===""?this.query=null:($n(e,0)==="?"&&(e=hl(e,1)),this.query="",this.parse(e,To)),this.searchParams.update()},getSearchParams:function(){return this.searchParams.facade},getHash:function(){var e=this.fragment;return e?"#"+e:""},setHash:function(e){(e=ai(e))!==""?($n(e,0)==="#"&&(e=hl(e,1)),this.fragment="",this.parse(e,li)):this.fragment=null},update:function(){this.query=this.searchParams.serialize()||null}};var Ts=function(e){var t=lZ(this,nn),n=uZ(arguments.length,1)>1?arguments[1]:void 0,r=fZ(t,new Um(e,!1,n));Em||(t.href=r.serialize(),t.origin=r.getOrigin(),t.protocol=r.getProtocol(),t.username=r.getUsername(),t.password=r.getPassword(),t.host=r.getHost(),t.hostname=r.getHostname(),t.port=r.getPort(),t.pathname=r.getPathname(),t.search=r.getSearch(),t.searchParams=r.getSearchParams(),t.hash=r.getHash())},nn=Ts.prototype,zn=function(e,t){return{get:function(){return Xd(this)[e]()},set:t&&function(n){return Xd(this)[t](n)},configurable:!0,enumerable:!0}};if(Em&&(Fn(nn,"href",zn("serialize","setHref")),Fn(nn,"origin",zn("getOrigin")),Fn(nn,"protocol",zn("getProtocol","setProtocol")),Fn(nn,"username",zn("getUsername","setUsername")),Fn(nn,"password",zn("getPassword","setPassword")),Fn(nn,"host",zn("getHost","setHost")),Fn(nn,"hostname",zn("getHostname","setHostname")),Fn(nn,"port",zn("getPort","setPort")),Fn(nn,"pathname",zn("getPathname","setPathname")),Fn(nn,"search",zn("getSearch","setSearch")),Fn(nn,"searchParams",zn("getSearchParams")),Fn(nn,"hash",zn("getHash","setHash"))),Jd(nn,"toJSON",function(){return Xd(this).serialize()},{enumerable:!0}),Jd(nn,"toString",function(){return Xd(this).serialize()},{enumerable:!0}),ul){var U4=ul.createObjectURL,j4=ul.revokeObjectURL;U4&&Jd(Ts,"createObjectURL",E4(U4,ul)),j4&&Jd(Ts,"revokeObjectURL",E4(j4,ul))}dZ(Ts,"URL"),sZ({global:!0,constructor:!0,forced:!aZ,sham:!Em},{URL:Ts});var IZ=gs,q4=Array.isArray||function(e){return IZ(e)==="Array"},BZ=TypeError,H4=q4,PZ=cm,RZ=Rn,LZ=Nt("species"),G4=Array,W4=function(e,t){return new(function(n){var r;return H4(n)&&(r=n.constructor,(PZ(r)&&(r===G4||H4(r.prototype))||RZ(r)&&(r=r[LZ])===null)&&(r=void 0)),r===void 0?G4:r}(e))(t===0?0:t)},DZ=ht,MZ=Cd,FZ=Nt("species"),K4=function(e){return MZ>=51||!DZ(function(){var t=[];return(t.constructor={})[FZ]=function(){return{foo:1}},t[e](Boolean).foo!==1})},$Z=bn,zZ=ht,UZ=q4,jZ=Rn,qZ=wo,HZ=tl,Y4=function(e){if(e>9007199254740991)throw BZ("Maximum allowed index exceeded");return e},J4=W6,GZ=W4,WZ=K4,KZ=Cd,X4=Nt("isConcatSpreadable"),YZ=KZ>=51||!zZ(function(){var e=[];return e[X4]=!1,e.concat()[0]!==e}),JZ=function(e){if(!jZ(e))return!1;var t=e[X4];return t!==void 0?!!t:UZ(e)};$Z({target:"Array",proto:!0,arity:1,forced:!YZ||!WZ("concat")},{concat:function(e){var t,n,r,s,a,l=qZ(this),c=GZ(l,0),u=0;for(t=-1,r=arguments.length;t<r;t++)if(JZ(a=t===-1?l:arguments[t]))for(s=HZ(a),Y4(u+s),n=0;n<s;n++,u++)n in a&&J4(c,u,a[n]);else Y4(u+1),J4(c,u++,a);return c.length=u,c}});var XZ=Eo,QZ=wg,ZZ=wo,VZ=tl,eV=W4,Q4=dt([].push),Mi=function(e){var t=e===1,n=e===2,r=e===3,s=e===4,a=e===6,l=e===7,c=e===5||a;return function(u,d,f,p){for(var g,v,b=ZZ(u),w=QZ(b),_=VZ(w),C=XZ(d,f),N=0,S=p||eV,E=t?S(u,_):n||l?S(u,0):void 0;_>N;N++)if((c||N in w)&&(v=C(g=w[N],N,b),e))if(t)E[N]=v;else if(v)switch(e){case 3:return!0;case 5:return g;case 6:return N;case 2:Q4(E,g)}else switch(e){case 4:return!1;case 7:Q4(E,g)}return a?-1:r||s?s:E}},tV=[Mi(0),Mi(1),Mi(2),Mi(3),Mi(4),Mi(5),Mi(6),Mi(7)][1];bn({target:"Array",proto:!0,forced:!K4("map")},{map:function(e){return tV(this,e,arguments.length>1?arguments[1]:void 0)}});var Z4=zt,nV=ht,V4=dt,rV=Xg,iV=Ag,oV=ms,e8=V4(Id.f),sV=V4([].push),aV=Z4&&nV(function(){var e=Object.create(null);return e[2]=2,!e8(e,2)}),t8=function(e){return function(t){for(var n,r=oV(t),s=iV(r),a=aV&&rV(r)===null,l=s.length,c=0,u=[];l>c;)n=s[c++],Z4&&!(a?n in r:e8(r,n))||sV(u,e?[n,r[n]]:r[n]);return u}},lV=[t8(!0),t8(!1)][0];bn({target:"Object",stat:!0},{entries:function(e){return lV(e)}});var cV=Ut,dV=yn,uV=wd,fV=z3,n8=RegExp.prototype,hV=Xa.PROPER,pV=lr,gV=Kt,r8=Co,mV=ht,jm="toString",i8=RegExp.prototype,o8=i8[jm],vV=mV(function(){return o8.call({source:"a",flags:"b"})!=="/a/b"}),yV=hV&&o8.name!==jm;(vV||yV)&&pV(i8,jm,function(){var e=gV(this);return"/"+r8(e.source)+"/"+r8(function(t){var n=t.flags;return n!==void 0||"flags"in n8||dV(t,"flags")||!uV(n8,t)?n:cV(fV,t)}(e))},{unsafe:!0});var ml,As,s8,qm,ru=gs(pt.process)==="process",bV=_o,wV=Od,_V=zt,a8=Nt("species"),CV=cm,SV=Sd,EV=TypeError,l8=Kt,xV=Ja,kV=Nt("species"),c8=/(?:ipad|iphone|ipod).*applewebkit/i.test(_d),wn=pt,NV=Z3,TV=Eo,d8=bt,AV=yn,u8=ht,f8=j3,OV=um,h8=yd,IV=pm,BV=c8,PV=ru,Hm=wn.setImmediate,Gm=wn.clearImmediate,RV=wn.process,Wm=wn.Dispatch,LV=wn.Function,p8=wn.MessageChannel,DV=wn.String,Km=0,vl={},g8="onreadystatechange";u8(function(){ml=wn.location});var Ym=function(e){if(AV(vl,e)){var t=vl[e];delete vl[e],t()}},Jm=function(e){return function(){Ym(e)}},m8=function(e){Ym(e.data)},v8=function(e){wn.postMessage(DV(e),ml.protocol+"//"+ml.host)};Hm&&Gm||(Hm=function(e){IV(arguments.length,1);var t=d8(e)?e:LV(e),n=OV(arguments,1);return vl[++Km]=function(){NV(t,void 0,n)},As(Km),Km},Gm=function(e){delete vl[e]},PV?As=function(e){RV.nextTick(Jm(e))}:Wm&&Wm.now?As=function(e){Wm.now(Jm(e))}:p8&&!BV?(qm=(s8=new p8).port2,s8.port1.onmessage=m8,As=TV(qm.postMessage,qm)):wn.addEventListener&&d8(wn.postMessage)&&!wn.importScripts&&ml&&ml.protocol!=="file:"&&!u8(v8)?(As=v8,wn.addEventListener("message",m8,!1)):As=g8 in h8("script")?function(e){f8.appendChild(h8("script"))[g8]=function(){f8.removeChild(this),Ym(e)}}:function(e){setTimeout(Jm(e),0)});var y8={set:Hm,clear:Gm},b8=function(){this.head=null,this.tail=null};b8.prototype={add:function(e){var t={item:e,next:null},n=this.tail;n?n.next=t:this.head=t,this.tail=t},get:function(){var e=this.head;if(e)return(this.head=e.next)===null&&(this.tail=null),e.item}};var Os,Xm,Qm,Zm,w8,_8=b8,MV=/ipad|iphone|ipod/i.test(_d)&&typeof Pebble!="undefined",FV=/web0s(?!.*chrome)/i.test(_d),Is=pt,$V=r4,C8=Eo,Vm=y8.set,zV=_8,UV=c8,jV=MV,qV=FV,e0=ru,S8=Is.MutationObserver||Is.WebKitMutationObserver,E8=Is.document,x8=Is.process,iu=Is.Promise,t0=$V("queueMicrotask");if(!t0){var ou=new zV,su=function(){var e,t;for(e0&&(e=x8.domain)&&e.exit();t=ou.get();)try{t()}catch(n){throw ou.head&&Os(),n}e&&e.enter()};UV||e0||qV||!S8||!E8?!jV&&iu&&iu.resolve?((Zm=iu.resolve(void 0)).constructor=iu,w8=C8(Zm.then,Zm),Os=function(){w8(su)}):e0?Os=function(){x8.nextTick(su)}:(Vm=C8(Vm,Is),Os=function(){Vm(su)}):(Xm=!0,Qm=E8.createTextNode(""),new S8(su).observe(Qm,{characterData:!0}),Os=function(){Qm.data=Xm=!Xm}),t0=function(e){ou.head||Os(),ou.add(e)}}var HV=t0,n0=function(e){try{return{error:!1,value:e()}}catch(t){return{error:!0,value:t}}},au=pt.Promise,k8=typeof Deno=="object"&&Deno&&typeof Deno.version=="object",GV=!k8&&!ru&&typeof window=="object"&&typeof document=="object",WV=pt,yl=au,KV=bt,YV=F3,JV=Qp,XV=Nt,QV=GV,ZV=k8,r0=Cd;yl&&yl.prototype;var VV=XV("species"),N8=!1,T8=KV(WV.PromiseRejectionEvent),eee=YV("Promise",function(){var e=JV(yl),t=e!==String(yl);if(!t&&r0===66)return!0;if(!r0||r0<51||!/native code/.test(e)){var n=new yl(function(s){s(1)}),r=function(s){s(function(){},function(){})};if((n.constructor={})[VV]=r,!(N8=n.then(function(){})instanceof r))return!0}return!t&&(QV||ZV)&&!T8}),Ao={CONSTRUCTOR:eee,REJECTION_EVENT:T8,SUBCLASSING:N8},Bs={},A8=Pi,tee=TypeError,nee=function(e){var t,n;this.promise=new e(function(r,s){if(t!==void 0||n!==void 0)throw new tee("Bad Promise constructor");t=r,n=s}),this.resolve=A8(t),this.reject=A8(n)};Bs.f=function(e){return new nee(e)};var i0,O8,I8,ree=bn,lu=ru,Fi=pt,Ps=Ut,B8=lr,P8=v6,iee=bs,oee=Pi,cu=bt,see=Rn,aee=sm,lee=function(e,t){var n,r=l8(e).constructor;return r===void 0||xV(n=l8(r)[kV])?t:function(s){if(CV(s))return s;throw new EV(SV(s)+" is not a constructor")}(n)},R8=y8.set,o0=HV,cee=n0,dee=_8,L8=Ri,du=au,D8=Bs,uu="Promise",M8=Ao.CONSTRUCTOR,uee=Ao.REJECTION_EVENT,fee=Ao.SUBCLASSING,s0=L8.getterFor(uu),hee=L8.set,Rs=du&&du.prototype,Ls=du,fu=Rs,F8=Fi.TypeError,a0=Fi.document,l0=Fi.process,c0=D8.f,pee=c0,gee=!!(a0&&a0.createEvent&&Fi.dispatchEvent),$8="unhandledrejection",z8=function(e){var t;return!(!see(e)||!cu(t=e.then))&&t},U8=function(e,t){var n,r,s,a=t.value,l=t.state===1,c=l?e.ok:e.fail,u=e.resolve,d=e.reject,f=e.domain;try{c?(l||(t.rejection===2&&vee(t),t.rejection=1),c===!0?n=a:(f&&f.enter(),n=c(a),f&&(f.exit(),s=!0)),n===e.promise?d(new F8("Promise-chain cycle")):(r=z8(n))?Ps(r,n,u,d):u(n)):d(a)}catch(p){f&&!s&&f.exit(),d(p)}},j8=function(e,t){e.notified||(e.notified=!0,o0(function(){for(var n,r=e.reactions;n=r.get();)U8(n,e);e.notified=!1,t&&!e.rejection&&mee(e)}))},q8=function(e,t,n){var r,s;gee?((r=a0.createEvent("Event")).promise=t,r.reason=n,r.initEvent(e,!1,!0),Fi.dispatchEvent(r)):r={promise:t,reason:n},!uee&&(s=Fi["on"+e])?s(r):e===$8&&function(a,l){try{arguments.length===1?console.error(a):console.error(a,l)}catch(c){}}("Unhandled promise rejection",n)},mee=function(e){Ps(R8,Fi,function(){var t,n=e.facade,r=e.value;if(H8(e)&&(t=cee(function(){lu?l0.emit("unhandledRejection",r,n):q8($8,n,r)}),e.rejection=lu||H8(e)?2:1,t.error))throw t.value})},H8=function(e){return e.rejection!==1&&!e.parent},vee=function(e){Ps(R8,Fi,function(){var t=e.facade;lu?l0.emit("rejectionHandled",t):q8("rejectionhandled",t,e.value)})},Ds=function(e,t,n){return function(r){e(t,r,n)}},Ms=function(e,t,n){e.done||(e.done=!0,n&&(e=n),e.value=t,e.state=2,j8(e,!0))},d0=function(e,t,n){if(!e.done){e.done=!0,n&&(e=n);try{if(e.facade===t)throw new F8("Promise can't be resolved itself");var r=z8(t);r?o0(function(){var s={done:!1};try{Ps(r,t,Ds(d0,s,e),Ds(Ms,s,e))}catch(a){Ms(s,a,e)}}):(e.value=t,e.state=1,j8(e,!1))}catch(s){Ms({done:!1},s,e)}}};if(M8&&(fu=(Ls=function(e){aee(this,fu),oee(e),Ps(i0,this);var t=s0(this);try{e(Ds(d0,t),Ds(Ms,t))}catch(n){Ms(t,n)}}).prototype,(i0=function(e){hee(this,{type:uu,done:!1,notified:!1,parent:!1,reactions:new dee,rejection:!1,state:0,value:void 0})}).prototype=B8(fu,"then",function(e,t){var n=s0(this),r=c0(lee(this,Ls));return n.parent=!0,r.ok=!cu(e)||e,r.fail=cu(t)&&t,r.domain=lu?l0.domain:void 0,n.state===0?n.reactions.add(r):o0(function(){U8(r,n)}),r.promise}),O8=function(){var e=new i0,t=s0(e);this.promise=e,this.resolve=Ds(d0,t),this.reject=Ds(Ms,t)},D8.f=c0=function(e){return e===Ls||e===void 0?new O8(e):pee(e)},cu(du)&&Rs!==Object.prototype)){I8=Rs.then,fee||B8(Rs,"then",function(e,t){var n=this;return new Ls(function(r,s){Ps(I8,n,r,s)}).then(e,t)},{unsafe:!0});try{delete Rs.constructor}catch(e){}P8&&P8(Rs,fu)}ree({global:!0,constructor:!0,wrap:!0,forced:M8},{Promise:Ls}),iee(Ls,uu,!1),function(e){var t=bV(e);_V&&t&&!t[a8]&&wV(t,a8,{configurable:!0,get:function(){return this}})}(uu);var yee=Eo,bee=Ut,wee=Kt,_ee=Sd,Cee=U6,See=tl,G8=wd,Eee=dm,xee=qd,W8=z6,kee=TypeError,hu=function(e,t){this.stopped=e,this.result=t},K8=hu.prototype,Y8=function(e,t,n){var r,s,a,l,c,u,d,f=n&&n.that,p=!(!n||!n.AS_ENTRIES),g=!(!n||!n.IS_RECORD),v=!(!n||!n.IS_ITERATOR),b=!(!n||!n.INTERRUPTED),w=yee(t,f),_=function(N){return r&&W8(r,"normal",N),new hu(!0,N)},C=function(N){return p?(wee(N),b?w(N[0],N[1],_):w(N[0],N[1])):b?w(N,_):w(N)};if(g)r=e.iterator;else if(v)r=e;else{if(!(s=xee(e)))throw new kee(_ee(e)+" is not iterable");if(Cee(s)){for(a=0,l=See(e);l>a;a++)if((c=C(e[a]))&&G8(K8,c))return c;return new hu(!1)}r=Eee(e,s)}for(u=g?e.next:r.next;!(d=bee(u,r)).done;){try{c=C(d.value)}catch(N){W8(r,"throw",N)}if(typeof c=="object"&&c&&G8(K8,c))return c}return new hu(!1)},J8=Nt("iterator"),X8=!1;try{var Nee=0,Q8={next:function(){return{done:!!Nee++}},return:function(){X8=!0}};Q8[J8]=function(){return this},Array.from(Q8,function(){throw 2})}catch(e){}var Tee=au,Z8=Ao.CONSTRUCTOR||!function(e,t){try{if(!t&&!X8)return!1}catch(s){return!1}var n=!1;try{var r={};r[J8]=function(){return{next:function(){return{done:n=!0}}}},e(r)}catch(s){}return n}(function(e){Tee.all(e).then(void 0,function(){})}),Aee=Ut,Oee=Pi,Iee=Bs,Bee=n0,Pee=Y8;bn({target:"Promise",stat:!0,forced:Z8},{all:function(e){var t=this,n=Iee.f(t),r=n.resolve,s=n.reject,a=Bee(function(){var l=Oee(t.resolve),c=[],u=0,d=1;Pee(e,function(f){var p=u++,g=!1;d++,Aee(l,t,f).then(function(v){g||(g=!0,c[p]=v,--d||r(c))},s)}),--d||r(c)});return a.error&&s(a.value),n.promise}});var Ree=bn,Lee=Ao.CONSTRUCTOR,u0=au,Dee=_o,Mee=bt,Fee=lr,V8=u0&&u0.prototype;if(Ree({target:"Promise",proto:!0,forced:Lee,real:!0},{catch:function(e){return this.then(void 0,e)}}),Mee(u0)){var e5=Dee("Promise").prototype.catch;V8.catch!==e5&&Fee(V8,"catch",e5,{unsafe:!0})}var $ee=Ut,zee=Pi,Uee=Bs,jee=n0,qee=Y8;bn({target:"Promise",stat:!0,forced:Z8},{race:function(e){var t=this,n=Uee.f(t),r=n.reject,s=jee(function(){var a=zee(t.resolve);qee(e,function(l){$ee(a,t,l).then(n.resolve,r)})});return s.error&&r(s.value),n.promise}});var Hee=Bs;bn({target:"Promise",stat:!0,forced:Ao.CONSTRUCTOR},{reject:function(e){var t=Hee.f(this);return(0,t.reject)(e),t.promise}});var Gee=Kt,Wee=Rn,Kee=Bs,Yee=bn,Jee=Ao.CONSTRUCTOR;_o("Promise"),Yee({target:"Promise",stat:!0,forced:Jee},{resolve:function(e){return function(t,n){if(Gee(t),Wee(n)&&n.constructor===t)return n;var r=Kee.f(t);return(0,r.resolve)(n),r.promise}(this,e)}});var pu,bl,t5={exports:{}},n5={exports:{}};pu="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",bl={rotl:function(e,t){return e<<t|e>>>32-t},rotr:function(e,t){return e<<32-t|e>>>t},endian:function(e){if(e.constructor==Number)return 16711935&bl.rotl(e,8)|4278255360&bl.rotl(e,24);for(var t=0;t<e.length;t++)e[t]=bl.endian(e[t]);return e},randomBytes:function(e){for(var t=[];e>0;e--)t.push(Math.floor(256*Math.random()));return t},bytesToWords:function(e){for(var t=[],n=0,r=0;n<e.length;n++,r+=8)t[r>>>5]|=e[n]<<24-r%32;return t},wordsToBytes:function(e){for(var t=[],n=0;n<32*e.length;n+=8)t.push(e[n>>>5]>>>24-n%32&255);return t},bytesToHex:function(e){for(var t=[],n=0;n<e.length;n++)t.push((e[n]>>>4).toString(16)),t.push((15&e[n]).toString(16));return t.join("")},hexToBytes:function(e){for(var t=[],n=0;n<e.length;n+=2)t.push(parseInt(e.substr(n,2),16));return t},bytesToBase64:function(e){for(var t=[],n=0;n<e.length;n+=3)for(var r=e[n]<<16|e[n+1]<<8|e[n+2],s=0;s<4;s++)8*n+6*s<=8*e.length?t.push(pu.charAt(r>>>6*(3-s)&63)):t.push("=");return t.join("")},base64ToBytes:function(e){e=e.replace(/[^A-Z0-9+\/]/gi,"");for(var t=[],n=0,r=0;n<e.length;r=++n%4)r!=0&&t.push((pu.indexOf(e.charAt(n-1))&Math.pow(2,-2*r+8)-1)<<2*r|pu.indexOf(e.charAt(n))>>>6-2*r);return t}},n5.exports=bl;var Xee=n5.exports,f0={utf8:{stringToBytes:function(e){return f0.bin.stringToBytes(unescape(encodeURIComponent(e)))},bytesToString:function(e){return decodeURIComponent(escape(f0.bin.bytesToString(e)))}},bin:{stringToBytes:function(e){for(var t=[],n=0;n<e.length;n++)t.push(255&e.charCodeAt(n));return t},bytesToString:function(e){for(var t=[],n=0;n<e.length;n++)t.push(String.fromCharCode(e[n]));return t.join("")}}},r5=f0,Qee=function(e){return e!=null&&(i5(e)||function(t){return typeof t.readFloatLE=="function"&&typeof t.slice=="function"&&i5(t.slice(0,0))}(e)||!!e._isBuffer)};function i5(e){return!!e.constructor&&typeof e.constructor.isBuffer=="function"&&e.constructor.isBuffer(e)}(function(){var e=Xee,t=r5.utf8,n=Qee,r=r5.bin,s=function(a,l){a.constructor==String?a=l&&l.encoding==="binary"?r.stringToBytes(a):t.stringToBytes(a):n(a)?a=Array.prototype.slice.call(a,0):Array.isArray(a)||a.constructor===Uint8Array||(a=a.toString());for(var c=e.bytesToWords(a),u=8*a.length,d=1732584193,f=-271733879,p=-1732584194,g=271733878,v=0;v<c.length;v++)c[v]=16711935&(c[v]<<8|c[v]>>>24)|4278255360&(c[v]<<24|c[v]>>>8);c[u>>>5]|=128<<u%32,c[14+(u+64>>>9<<4)]=u;var b=s._ff,w=s._gg,_=s._hh,C=s._ii;for(v=0;v<c.length;v+=16){var N=d,S=f,E=p,k=g;d=b(d,f,p,g,c[v+0],7,-680876936),g=b(g,d,f,p,c[v+1],12,-389564586),p=b(p,g,d,f,c[v+2],17,606105819),f=b(f,p,g,d,c[v+3],22,-1044525330),d=b(d,f,p,g,c[v+4],7,-176418897),g=b(g,d,f,p,c[v+5],12,1200080426),p=b(p,g,d,f,c[v+6],17,-1473231341),f=b(f,p,g,d,c[v+7],22,-45705983),d=b(d,f,p,g,c[v+8],7,1770035416),g=b(g,d,f,p,c[v+9],12,-1958414417),p=b(p,g,d,f,c[v+10],17,-42063),f=b(f,p,g,d,c[v+11],22,-1990404162),d=b(d,f,p,g,c[v+12],7,1804603682),g=b(g,d,f,p,c[v+13],12,-40341101),p=b(p,g,d,f,c[v+14],17,-1502002290),d=w(d,f=b(f,p,g,d,c[v+15],22,1236535329),p,g,c[v+1],5,-165796510),g=w(g,d,f,p,c[v+6],9,-1069501632),p=w(p,g,d,f,c[v+11],14,643717713),f=w(f,p,g,d,c[v+0],20,-373897302),d=w(d,f,p,g,c[v+5],5,-701558691),g=w(g,d,f,p,c[v+10],9,38016083),p=w(p,g,d,f,c[v+15],14,-660478335),f=w(f,p,g,d,c[v+4],20,-405537848),d=w(d,f,p,g,c[v+9],5,568446438),g=w(g,d,f,p,c[v+14],9,-1019803690),p=w(p,g,d,f,c[v+3],14,-187363961),f=w(f,p,g,d,c[v+8],20,1163531501),d=w(d,f,p,g,c[v+13],5,-1444681467),g=w(g,d,f,p,c[v+2],9,-51403784),p=w(p,g,d,f,c[v+7],14,1735328473),d=_(d,f=w(f,p,g,d,c[v+12],20,-1926607734),p,g,c[v+5],4,-378558),g=_(g,d,f,p,c[v+8],11,-2022574463),p=_(p,g,d,f,c[v+11],16,1839030562),f=_(f,p,g,d,c[v+14],23,-35309556),d=_(d,f,p,g,c[v+1],4,-1530992060),g=_(g,d,f,p,c[v+4],11,1272893353),p=_(p,g,d,f,c[v+7],16,-155497632),f=_(f,p,g,d,c[v+10],23,-1094730640),d=_(d,f,p,g,c[v+13],4,681279174),g=_(g,d,f,p,c[v+0],11,-358537222),p=_(p,g,d,f,c[v+3],16,-722521979),f=_(f,p,g,d,c[v+6],23,76029189),d=_(d,f,p,g,c[v+9],4,-640364487),g=_(g,d,f,p,c[v+12],11,-421815835),p=_(p,g,d,f,c[v+15],16,530742520),d=C(d,f=_(f,p,g,d,c[v+2],23,-995338651),p,g,c[v+0],6,-198630844),g=C(g,d,f,p,c[v+7],10,1126891415),p=C(p,g,d,f,c[v+14],15,-1416354905),f=C(f,p,g,d,c[v+5],21,-57434055),d=C(d,f,p,g,c[v+12],6,1700485571),g=C(g,d,f,p,c[v+3],10,-1894986606),p=C(p,g,d,f,c[v+10],15,-1051523),f=C(f,p,g,d,c[v+1],21,-2054922799),d=C(d,f,p,g,c[v+8],6,1873313359),g=C(g,d,f,p,c[v+15],10,-30611744),p=C(p,g,d,f,c[v+6],15,-1560198380),f=C(f,p,g,d,c[v+13],21,1309151649),d=C(d,f,p,g,c[v+4],6,-145523070),g=C(g,d,f,p,c[v+11],10,-1120210379),p=C(p,g,d,f,c[v+2],15,718787259),f=C(f,p,g,d,c[v+9],21,-343485551),d=d+N>>>0,f=f+S>>>0,p=p+E>>>0,g=g+k>>>0}return e.endian([d,f,p,g])};s._ff=function(a,l,c,u,d,f,p){var g=a+(l&c|~l&u)+(d>>>0)+p;return(g<<f|g>>>32-f)+l},s._gg=function(a,l,c,u,d,f,p){var g=a+(l&u|c&~u)+(d>>>0)+p;return(g<<f|g>>>32-f)+l},s._hh=function(a,l,c,u,d,f,p){var g=a+(l^c^u)+(d>>>0)+p;return(g<<f|g>>>32-f)+l},s._ii=function(a,l,c,u,d,f,p){var g=a+(c^(l|~u))+(d>>>0)+p;return(g<<f|g>>>32-f)+l},s._blocksize=16,s._digestsize=16,t5.exports=function(a,l){if(a==null)throw new Error("Illegal argument "+a);var c=e.wordsToBytes(s(a,l));return l&&l.asBytes?c:l&&l.asString?r.bytesToString(c):e.bytesToHex(c)}})();var o5=function(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}(t5.exports),h0={exports:{}};(function(e,t){(function(n,r){var s="function",a="undefined",l="object",c="string",u="major",d="model",f="name",p="type",g="vendor",v="version",b="architecture",w="console",_="mobile",C="tablet",N="smarttv",S="wearable",E="embedded",k="Amazon",A="Apple",O="ASUS",I="BlackBerry",z="Browser",P="Chrome",M="Firefox",K="Google",j="Huawei",Q="LG",H="Microsoft",L="Motorola",U="Opera",q="Samsung",W="Sharp",D="Sony",ae="Xiaomi",re="Zebra",Y="Facebook",J="Chromium OS",se="Mac OS",ie=function(Se){for(var Oe={},xe=0;xe<Se.length;xe++)Oe[Se[xe].toUpperCase()]=Se[xe];return Oe},F=function(Se,Oe){return typeof Se===c&&G(Oe).indexOf(G(Se))!==-1},G=function(Se){return Se.toLowerCase()},ee=function(Se,Oe){if(typeof Se===c)return Se=Se.replace(/^\s\s*/,""),typeof Oe===a?Se:Se.substring(0,500)},le=function(Se,Oe){for(var xe,We,st,Me,wt,Z,Be=0;Be<Oe.length&&!wt;){var at=Oe[Be],mt=Oe[Be+1];for(xe=We=0;xe<at.length&&!wt&&at[xe];)if(wt=at[xe++].exec(Se))for(st=0;st<mt.length;st++)Z=wt[++We],typeof(Me=mt[st])===l&&Me.length>0?Me.length===2?typeof Me[1]==s?this[Me[0]]=Me[1].call(this,Z):this[Me[0]]=Me[1]:Me.length===3?typeof Me[1]!==s||Me[1].exec&&Me[1].test?this[Me[0]]=Z?Z.replace(Me[1],Me[2]):r:this[Me[0]]=Z?Me[1].call(this,Z,Me[2]):r:Me.length===4&&(this[Me[0]]=Z?Me[3].call(this,Z.replace(Me[1],Me[2])):r):this[Me]=Z||r;Be+=2}},ue=function(Se,Oe){for(var xe in Oe)if(typeof Oe[xe]===l&&Oe[xe].length>0){for(var We=0;We<Oe[xe].length;We++)if(F(Oe[xe][We],Se))return xe==="?"?r:xe}else if(F(Oe[xe],Se))return xe==="?"?r:xe;return Se},ve={ME:"4.90","NT 3.11":"NT3.51","NT 4.0":"NT4.0",2e3:"NT 5.0",XP:["NT 5.1","NT 5.2"],Vista:"NT 6.0",7:"NT 6.1",8:"NT 6.2",8.1:"NT 6.3",10:["NT 6.4","NT 10.0"],RT:"ARM"},ye={browser:[[/\b(?:crmo|crios)\/([\w\.]+)/i],[v,[f,"Chrome"]],[/edg(?:e|ios|a)?\/([\w\.]+)/i],[v,[f,"Edge"]],[/(opera mini)\/([-\w\.]+)/i,/(opera [mobiletab]{3,6})\b.+version\/([-\w\.]+)/i,/(opera)(?:.+version\/|[\/ ]+)([\w\.]+)/i],[f,v],[/opios[\/ ]+([\w\.]+)/i],[v,[f,U+" Mini"]],[/\bopr\/([\w\.]+)/i],[v,[f,U]],[/\bb[ai]*d(?:uhd|[ub]*[aekoprswx]{5,6})[\/ ]?([\w\.]+)/i],[v,[f,"Baidu"]],[/(kindle)\/([\w\.]+)/i,/(lunascape|maxthon|netfront|jasmine|blazer)[\/ ]?([\w\.]*)/i,/(avant|iemobile|slim)\s?(?:browser)?[\/ ]?([\w\.]*)/i,/(?:ms|\()(ie) ([\w\.]+)/i,/(flock|rockmelt|midori|epiphany|silk|skyfire|bolt|iron|vivaldi|iridium|phantomjs|bowser|quark|qupzilla|falkon|rekonq|puffin|brave|whale(?!.+naver)|qqbrowserlite|qq|duckduckgo)\/([-\w\.]+)/i,/(heytap|ovi)browser\/([\d\.]+)/i,/(weibo)__([\d\.]+)/i],[f,v],[/(?:\buc? ?browser|(?:juc.+)ucweb)[\/ ]?([\w\.]+)/i],[v,[f,"UC"+z]],[/microm.+\bqbcore\/([\w\.]+)/i,/\bqbcore\/([\w\.]+).+microm/i,/micromessenger\/([\w\.]+)/i],[v,[f,"WeChat"]],[/konqueror\/([\w\.]+)/i],[v,[f,"Konqueror"]],[/trident.+rv[: ]([\w\.]{1,9})\b.+like gecko/i],[v,[f,"IE"]],[/ya(?:search)?browser\/([\w\.]+)/i],[v,[f,"Yandex"]],[/slbrowser\/([\w\.]+)/i],[v,[f,"Smart Lenovo "+z]],[/(avast|avg)\/([\w\.]+)/i],[[f,/(.+)/,"$1 Secure "+z],v],[/\bfocus\/([\w\.]+)/i],[v,[f,M+" Focus"]],[/\bopt\/([\w\.]+)/i],[v,[f,U+" Touch"]],[/coc_coc\w+\/([\w\.]+)/i],[v,[f,"Coc Coc"]],[/dolfin\/([\w\.]+)/i],[v,[f,"Dolphin"]],[/coast\/([\w\.]+)/i],[v,[f,U+" Coast"]],[/miuibrowser\/([\w\.]+)/i],[v,[f,"MIUI "+z]],[/fxios\/([-\w\.]+)/i],[v,[f,M]],[/\bqihu|(qi?ho?o?|360)browser/i],[[f,"360 "+z]],[/(oculus|sailfish|huawei|vivo)browser\/([\w\.]+)/i],[[f,/(.+)/,"$1 "+z],v],[/samsungbrowser\/([\w\.]+)/i],[v,[f,q+" Internet"]],[/(comodo_dragon)\/([\w\.]+)/i],[[f,/_/g," "],v],[/metasr[\/ ]?([\d\.]+)/i],[v,[f,"Sogou Explorer"]],[/(sogou)mo\w+\/([\d\.]+)/i],[[f,"Sogou Mobile"],v],[/(electron)\/([\w\.]+) safari/i,/(tesla)(?: qtcarbrowser|\/(20\d\d\.[-\w\.]+))/i,/m?(qqbrowser|2345Explorer)[\/ ]?([\w\.]+)/i],[f,v],[/(lbbrowser)/i,/\[(linkedin)app\]/i],[f],[/((?:fban\/fbios|fb_iab\/fb4a)(?!.+fbav)|;fbav\/([\w\.]+);)/i],[[f,Y],v],[/(Klarna)\/([\w\.]+)/i,/(kakao(?:talk|story))[\/ ]([\w\.]+)/i,/(naver)\(.*?(\d+\.[\w\.]+).*\)/i,/safari (line)\/([\w\.]+)/i,/\b(line)\/([\w\.]+)\/iab/i,/(alipay)client\/([\w\.]+)/i,/(chromium|instagram|snapchat)[\/ ]([-\w\.]+)/i],[f,v],[/\bgsa\/([\w\.]+) .*safari\//i],[v,[f,"GSA"]],[/musical_ly(?:.+app_?version\/|_)([\w\.]+)/i],[v,[f,"TikTok"]],[/headlesschrome(?:\/([\w\.]+)| )/i],[v,[f,P+" Headless"]],[/ wv\).+(chrome)\/([\w\.]+)/i],[[f,P+" WebView"],v],[/droid.+ version\/([\w\.]+)\b.+(?:mobile safari|safari)/i],[v,[f,"Android "+z]],[/(chrome|omniweb|arora|[tizenoka]{5} ?browser)\/v?([\w\.]+)/i],[f,v],[/version\/([\w\.\,]+) .*mobile\/\w+ (safari)/i],[v,[f,"Mobile Safari"]],[/version\/([\w(\.|\,)]+) .*(mobile ?safari|safari)/i],[v,f],[/webkit.+?(mobile ?safari|safari)(\/[\w\.]+)/i],[f,[v,ue,{"1.0":"/8",1.2:"/1",1.3:"/3","2.0":"/412","2.0.2":"/416","2.0.3":"/417","2.0.4":"/419","?":"/"}]],[/(webkit|khtml)\/([\w\.]+)/i],[f,v],[/(navigator|netscape\d?)\/([-\w\.]+)/i],[[f,"Netscape"],v],[/mobile vr; rv:([\w\.]+)\).+firefox/i],[v,[f,M+" Reality"]],[/ekiohf.+(flow)\/([\w\.]+)/i,/(swiftfox)/i,/(icedragon|iceweasel|camino|chimera|fennec|maemo browser|minimo|conkeror|klar)[\/ ]?([\w\.\+]+)/i,/(seamonkey|k-meleon|icecat|iceape|firebird|phoenix|palemoon|basilisk|waterfox)\/([-\w\.]+)$/i,/(firefox)\/([\w\.]+)/i,/(mozilla)\/([\w\.]+) .+rv\:.+gecko\/\d+/i,/(polaris|lynx|dillo|icab|doris|amaya|w3m|netsurf|sleipnir|obigo|mosaic|(?:go|ice|up)[\. ]?browser)[-\/ ]?v?([\w\.]+)/i,/(links) \(([\w\.]+)/i,/panasonic;(viera)/i],[f,v],[/(cobalt)\/([\w\.]+)/i],[f,[v,/master.|lts./,""]]],cpu:[[/(?:(amd|x(?:(?:86|64)[-_])?|wow|win)64)[;\)]/i],[[b,"amd64"]],[/(ia32(?=;))/i],[[b,G]],[/((?:i[346]|x)86)[;\)]/i],[[b,"ia32"]],[/\b(aarch64|arm(v?8e?l?|_?64))\b/i],[[b,"arm64"]],[/\b(arm(?:v[67])?ht?n?[fl]p?)\b/i],[[b,"armhf"]],[/windows (ce|mobile); ppc;/i],[[b,"arm"]],[/((?:ppc|powerpc)(?:64)?)(?: mac|;|\))/i],[[b,/ower/,"",G]],[/(sun4\w)[;\)]/i],[[b,"sparc"]],[/((?:avr32|ia64(?=;))|68k(?=\))|\barm(?=v(?:[1-7]|[5-7]1)l?|;|eabi)|(?=atmel )avr|(?:irix|mips|sparc)(?:64)?\b|pa-risc)/i],[[b,G]]],device:[[/\b(sch-i[89]0\d|shw-m380s|sm-[ptx]\w{2,4}|gt-[pn]\d{2,4}|sgh-t8[56]9|nexus 10)/i],[d,[g,q],[p,C]],[/\b((?:s[cgp]h|gt|sm)-\w+|sc[g-]?[\d]+a?|galaxy nexus)/i,/samsung[- ]([-\w]+)/i,/sec-(sgh\w+)/i],[d,[g,q],[p,_]],[/(?:\/|\()(ip(?:hone|od)[\w, ]*)(?:\/|;)/i],[d,[g,A],[p,_]],[/\((ipad);[-\w\),; ]+apple/i,/applecoremedia\/[\w\.]+ \((ipad)/i,/\b(ipad)\d\d?,\d\d?[;\]].+ios/i],[d,[g,A],[p,C]],[/(macintosh);/i],[d,[g,A]],[/\b(sh-?[altvz]?\d\d[a-ekm]?)/i],[d,[g,W],[p,_]],[/\b((?:ag[rs][23]?|bah2?|sht?|btv)-a?[lw]\d{2})\b(?!.+d\/s)/i],[d,[g,j],[p,C]],[/(?:huawei|honor)([-\w ]+)[;\)]/i,/\b(nexus 6p|\w{2,4}e?-[atu]?[ln][\dx][012359c][adn]?)\b(?!.+d\/s)/i],[d,[g,j],[p,_]],[/\b(poco[\w ]+|m2\d{3}j\d\d[a-z]{2})(?: bui|\))/i,/\b; (\w+) build\/hm\1/i,/\b(hm[-_ ]?note?[_ ]?(?:\d\w)?) bui/i,/\b(redmi[\-_ ]?(?:note|k)?[\w_ ]+)(?: bui|\))/i,/oid[^\)]+; (m?[12][0-389][01]\w{3,6}[c-y])( bui|; wv|\))/i,/\b(mi[-_ ]?(?:a\d|one|one[_ ]plus|note lte|max|cc)?[_ ]?(?:\d?\w?)[_ ]?(?:plus|se|lite)?)(?: bui|\))/i],[[d,/_/g," "],[g,ae],[p,_]],[/oid[^\)]+; (2\d{4}(283|rpbf)[cgl])( bui|\))/i,/\b(mi[-_ ]?(?:pad)(?:[\w_ ]+))(?: bui|\))/i],[[d,/_/g," "],[g,ae],[p,C]],[/; (\w+) bui.+ oppo/i,/\b(cph[12]\d{3}|p(?:af|c[al]|d\w|e[ar])[mt]\d0|x9007|a101op)\b/i],[d,[g,"OPPO"],[p,_]],[/vivo (\w+)(?: bui|\))/i,/\b(v[12]\d{3}\w?[at])(?: bui|;)/i],[d,[g,"Vivo"],[p,_]],[/\b(rmx[1-3]\d{3})(?: bui|;|\))/i],[d,[g,"Realme"],[p,_]],[/\b(milestone|droid(?:[2-4x]| (?:bionic|x2|pro|razr))?:?( 4g)?)\b[\w ]+build\//i,/\bmot(?:orola)?[- ](\w*)/i,/((?:moto[\w\(\) ]+|xt\d{3,4}|nexus 6)(?= bui|\)))/i],[d,[g,L],[p,_]],[/\b(mz60\d|xoom[2 ]{0,2}) build\//i],[d,[g,L],[p,C]],[/((?=lg)?[vl]k\-?\d{3}) bui| 3\.[-\w; ]{10}lg?-([06cv9]{3,4})/i],[d,[g,Q],[p,C]],[/(lm(?:-?f100[nv]?|-[\w\.]+)(?= bui|\))|nexus [45])/i,/\blg[-e;\/ ]+((?!browser|netcast|android tv)\w+)/i,/\blg-?([\d\w]+) bui/i],[d,[g,Q],[p,_]],[/(ideatab[-\w ]+)/i,/lenovo ?(s[56]000[-\w]+|tab(?:[\w ]+)|yt[-\d\w]{6}|tb[-\d\w]{6})/i],[d,[g,"Lenovo"],[p,C]],[/(?:maemo|nokia).*(n900|lumia \d+)/i,/nokia[-_ ]?([-\w\.]*)/i],[[d,/_/g," "],[g,"Nokia"],[p,_]],[/(pixel c)\b/i],[d,[g,K],[p,C]],[/droid.+; (pixel[\daxl ]{0,6})(?: bui|\))/i],[d,[g,K],[p,_]],[/droid.+ (a?\d[0-2]{2}so|[c-g]\d{4}|so[-gl]\w+|xq-a\w[4-7][12])(?= bui|\).+chrome\/(?![1-6]{0,1}\d\.))/i],[d,[g,D],[p,_]],[/sony tablet [ps]/i,/\b(?:sony)?sgp\w+(?: bui|\))/i],[[d,"Xperia Tablet"],[g,D],[p,C]],[/ (kb2005|in20[12]5|be20[12][59])\b/i,/(?:one)?(?:plus)? (a\d0\d\d)(?: b|\))/i],[d,[g,"OnePlus"],[p,_]],[/(alexa)webm/i,/(kf[a-z]{2}wi|aeo[c-r]{2})( bui|\))/i,/(kf[a-z]+)( bui|\)).+silk\//i],[d,[g,k],[p,C]],[/((?:sd|kf)[0349hijorstuw]+)( bui|\)).+silk\//i],[[d,/(.+)/g,"Fire Phone $1"],[g,k],[p,_]],[/(playbook);[-\w\),; ]+(rim)/i],[d,g,[p,C]],[/\b((?:bb[a-f]|st[hv])100-\d)/i,/\(bb10; (\w+)/i],[d,[g,I],[p,_]],[/(?:\b|asus_)(transfo[prime ]{4,10} \w+|eeepc|slider \w+|nexus 7|padfone|p00[cj])/i],[d,[g,O],[p,C]],[/ (z[bes]6[027][012][km][ls]|zenfone \d\w?)\b/i],[d,[g,O],[p,_]],[/(nexus 9)/i],[d,[g,"HTC"],[p,C]],[/(htc)[-;_ ]{1,2}([\w ]+(?=\)| bui)|\w+)/i,/(zte)[- ]([\w ]+?)(?: bui|\/|\))/i,/(alcatel|geeksphone|nexian|panasonic(?!(?:;|\.))|sony(?!-bra))[-_ ]?([-\w]*)/i],[g,[d,/_/g," "],[p,_]],[/droid.+; ([ab][1-7]-?[0178a]\d\d?)/i],[d,[g,"Acer"],[p,C]],[/droid.+; (m[1-5] note) bui/i,/\bmz-([-\w]{2,})/i],[d,[g,"Meizu"],[p,_]],[/; ((?:power )?armor(?:[\w ]{0,8}))(?: bui|\))/i],[d,[g,"Ulefone"],[p,_]],[/(blackberry|benq|palm(?=\-)|sonyericsson|acer|asus|dell|meizu|motorola|polytron|infinix|tecno)[-_ ]?([-\w]*)/i,/(hp) ([\w ]+\w)/i,/(asus)-?(\w+)/i,/(microsoft); (lumia[\w ]+)/i,/(lenovo)[-_ ]?([-\w]+)/i,/(jolla)/i,/(oppo) ?([\w ]+) bui/i],[g,d,[p,_]],[/(kobo)\s(ereader|touch)/i,/(archos) (gamepad2?)/i,/(hp).+(touchpad(?!.+tablet)|tablet)/i,/(kindle)\/([\w\.]+)/i,/(nook)[\w ]+build\/(\w+)/i,/(dell) (strea[kpr\d ]*[\dko])/i,/(le[- ]+pan)[- ]+(\w{1,9}) bui/i,/(trinity)[- ]*(t\d{3}) bui/i,/(gigaset)[- ]+(q\w{1,9}) bui/i,/(vodafone) ([\w ]+)(?:\)| bui)/i],[g,d,[p,C]],[/(surface duo)/i],[d,[g,H],[p,C]],[/droid [\d\.]+; (fp\du?)(?: b|\))/i],[d,[g,"Fairphone"],[p,_]],[/(u304aa)/i],[d,[g,"AT&T"],[p,_]],[/\bsie-(\w*)/i],[d,[g,"Siemens"],[p,_]],[/\b(rct\w+) b/i],[d,[g,"RCA"],[p,C]],[/\b(venue[\d ]{2,7}) b/i],[d,[g,"Dell"],[p,C]],[/\b(q(?:mv|ta)\w+) b/i],[d,[g,"Verizon"],[p,C]],[/\b(?:barnes[& ]+noble |bn[rt])([\w\+ ]*) b/i],[d,[g,"Barnes & Noble"],[p,C]],[/\b(tm\d{3}\w+) b/i],[d,[g,"NuVision"],[p,C]],[/\b(k88) b/i],[d,[g,"ZTE"],[p,C]],[/\b(nx\d{3}j) b/i],[d,[g,"ZTE"],[p,_]],[/\b(gen\d{3}) b.+49h/i],[d,[g,"Swiss"],[p,_]],[/\b(zur\d{3}) b/i],[d,[g,"Swiss"],[p,C]],[/\b((zeki)?tb.*\b) b/i],[d,[g,"Zeki"],[p,C]],[/\b([yr]\d{2}) b/i,/\b(dragon[- ]+touch |dt)(\w{5}) b/i],[[g,"Dragon Touch"],d,[p,C]],[/\b(ns-?\w{0,9}) b/i],[d,[g,"Insignia"],[p,C]],[/\b((nxa|next)-?\w{0,9}) b/i],[d,[g,"NextBook"],[p,C]],[/\b(xtreme\_)?(v(1[045]|2[015]|[3469]0|7[05])) b/i],[[g,"Voice"],d,[p,_]],[/\b(lvtel\-)?(v1[12]) b/i],[[g,"LvTel"],d,[p,_]],[/\b(ph-1) /i],[d,[g,"Essential"],[p,_]],[/\b(v(100md|700na|7011|917g).*\b) b/i],[d,[g,"Envizen"],[p,C]],[/\b(trio[-\w\. ]+) b/i],[d,[g,"MachSpeed"],[p,C]],[/\btu_(1491) b/i],[d,[g,"Rotor"],[p,C]],[/(shield[\w ]+) b/i],[d,[g,"Nvidia"],[p,C]],[/(sprint) (\w+)/i],[g,d,[p,_]],[/(kin\.[onetw]{3})/i],[[d,/\./g," "],[g,H],[p,_]],[/droid.+; (cc6666?|et5[16]|mc[239][23]x?|vc8[03]x?)\)/i],[d,[g,re],[p,C]],[/droid.+; (ec30|ps20|tc[2-8]\d[kx])\)/i],[d,[g,re],[p,_]],[/smart-tv.+(samsung)/i],[g,[p,N]],[/hbbtv.+maple;(\d+)/i],[[d,/^/,"SmartTV"],[g,q],[p,N]],[/(nux; netcast.+smarttv|lg (netcast\.tv-201\d|android tv))/i],[[g,Q],[p,N]],[/(apple) ?tv/i],[g,[d,A+" TV"],[p,N]],[/crkey/i],[[d,P+"cast"],[g,K],[p,N]],[/droid.+aft(\w+)( bui|\))/i],[d,[g,k],[p,N]],[/\(dtv[\);].+(aquos)/i,/(aquos-tv[\w ]+)\)/i],[d,[g,W],[p,N]],[/(bravia[\w ]+)( bui|\))/i],[d,[g,D],[p,N]],[/(mitv-\w{5}) bui/i],[d,[g,ae],[p,N]],[/Hbbtv.*(technisat) (.*);/i],[g,d,[p,N]],[/\b(roku)[\dx]*[\)\/]((?:dvp-)?[\d\.]*)/i,/hbbtv\/\d+\.\d+\.\d+ +\([\w\+ ]*; *([\w\d][^;]*);([^;]*)/i],[[g,ee],[d,ee],[p,N]],[/\b(android tv|smart[- ]?tv|opera tv|tv; rv:)\b/i],[[p,N]],[/(ouya)/i,/(nintendo) ([wids3utch]+)/i],[g,d,[p,w]],[/droid.+; (shield) bui/i],[d,[g,"Nvidia"],[p,w]],[/(playstation [345portablevi]+)/i],[d,[g,D],[p,w]],[/\b(xbox(?: one)?(?!; xbox))[\); ]/i],[d,[g,H],[p,w]],[/((pebble))app/i],[g,d,[p,S]],[/(watch)(?: ?os[,\/]|\d,\d\/)[\d\.]+/i],[d,[g,A],[p,S]],[/droid.+; (glass) \d/i],[d,[g,K],[p,S]],[/droid.+; (wt63?0{2,3})\)/i],[d,[g,re],[p,S]],[/(quest( 2| pro)?)/i],[d,[g,Y],[p,S]],[/(tesla)(?: qtcarbrowser|\/[-\w\.]+)/i],[g,[p,E]],[/(aeobc)\b/i],[d,[g,k],[p,E]],[/droid .+?; ([^;]+?)(?: bui|; wv\)|\) applew).+? mobile safari/i],[d,[p,_]],[/droid .+?; ([^;]+?)(?: bui|\) applew).+?(?! mobile) safari/i],[d,[p,C]],[/\b((tablet|tab)[;\/]|focus\/\d(?!.+mobile))/i],[[p,C]],[/(phone|mobile(?:[;\/]| [ \w\/\.]*safari)|pda(?=.+windows ce))/i],[[p,_]],[/(android[-\w\. ]{0,9});.+buil/i],[d,[g,"Generic"]]],engine:[[/windows.+ edge\/([\w\.]+)/i],[v,[f,"EdgeHTML"]],[/webkit\/537\.36.+chrome\/(?!27)([\w\.]+)/i],[v,[f,"Blink"]],[/(presto)\/([\w\.]+)/i,/(webkit|trident|netfront|netsurf|amaya|lynx|w3m|goanna)\/([\w\.]+)/i,/ekioh(flow)\/([\w\.]+)/i,/(khtml|tasman|links)[\/ ]\(?([\w\.]+)/i,/(icab)[\/ ]([23]\.[\d\.]+)/i,/\b(libweb)/i],[f,v],[/rv\:([\w\.]{1,9})\b.+(gecko)/i],[v,f]],os:[[/microsoft (windows) (vista|xp)/i],[f,v],[/(windows (?:phone(?: os)?|mobile))[\/ ]?([\d\.\w ]*)/i],[f,[v,ue,ve]],[/windows nt 6\.2; (arm)/i,/windows[\/ ]?([ntce\d\. ]+\w)(?!.+xbox)/i,/(?:win(?=3|9|n)|win 9x )([nt\d\.]+)/i],[[v,ue,ve],[f,"Windows"]],[/ip[honead]{2,4}\b(?:.*os ([\w]+) like mac|; opera)/i,/(?:ios;fbsv\/|iphone.+ios[\/ ])([\d\.]+)/i,/cfnetwork\/.+darwin/i],[[v,/_/g,"."],[f,"iOS"]],[/(mac os x) ?([\w\. ]*)/i,/(macintosh|mac_powerpc\b)(?!.+haiku)/i],[[f,se],[v,/_/g,"."]],[/droid ([\w\.]+)\b.+(android[- ]x86|harmonyos)/i],[v,f],[/(android|webos|qnx|bada|rim tablet os|maemo|meego|sailfish)[-\/ ]?([\w\.]*)/i,/(blackberry)\w*\/([\w\.]*)/i,/(tizen|kaios)[\/ ]([\w\.]+)/i,/\((series40);/i],[f,v],[/\(bb(10);/i],[v,[f,I]],[/(?:symbian ?os|symbos|s60(?=;)|series60)[-\/ ]?([\w\.]*)/i],[v,[f,"Symbian"]],[/mozilla\/[\d\.]+ \((?:mobile|tablet|tv|mobile; [\w ]+); rv:.+ gecko\/([\w\.]+)/i],[v,[f,M+" OS"]],[/web0s;.+rt(tv)/i,/\b(?:hp)?wos(?:browser)?\/([\w\.]+)/i],[v,[f,"webOS"]],[/watch(?: ?os[,\/]|\d,\d\/)([\d\.]+)/i],[v,[f,"watchOS"]],[/crkey\/([\d\.]+)/i],[v,[f,P+"cast"]],[/(cros) [\w]+(?:\)| ([\w\.]+)\b)/i],[[f,J],v],[/panasonic;(viera)/i,/(netrange)mmh/i,/(nettv)\/(\d+\.[\w\.]+)/i,/(nintendo|playstation) ([wids345portablevuch]+)/i,/(xbox); +xbox ([^\);]+)/i,/\b(joli|palm)\b ?(?:os)?\/?([\w\.]*)/i,/(mint)[\/\(\) ]?(\w*)/i,/(mageia|vectorlinux)[; ]/i,/([kxln]?ubuntu|debian|suse|opensuse|gentoo|arch(?= linux)|slackware|fedora|mandriva|centos|pclinuxos|red ?hat|zenwalk|linpus|raspbian|plan 9|minix|risc os|contiki|deepin|manjaro|elementary os|sabayon|linspire)(?: gnu\/linux)?(?: enterprise)?(?:[- ]linux)?(?:-gnu)?[-\/ ]?(?!chrom|package)([-\w\.]*)/i,/(hurd|linux) ?([\w\.]*)/i,/(gnu) ?([\w\.]*)/i,/\b([-frentopcghs]{0,5}bsd|dragonfly)[\/ ]?(?!amd|[ix346]{1,2}86)([\w\.]*)/i,/(haiku) (\w+)/i],[f,v],[/(sunos) ?([\w\.\d]*)/i],[[f,"Solaris"],v],[/((?:open)?solaris)[-\/ ]?([\w\.]*)/i,/(aix) ((\d)(?=\.|\)| )[\w\.])*/i,/\b(beos|os\/2|amigaos|morphos|openvms|fuchsia|hp-ux|serenityos)/i,/(unix) ?([\w\.]*)/i],[f,v]]},Ce=function(Se,Oe){if(typeof Se===l&&(Oe=Se,Se=r),!(this instanceof Ce))return new Ce(Se,Oe).getResult();var xe=typeof n!==a&&n.navigator?n.navigator:r,We=Se||(xe&&xe.userAgent?xe.userAgent:""),st=xe&&xe.userAgentData?xe.userAgentData:r,Me=Oe?function(Z,Be){var at={};for(var mt in Z)Be[mt]&&Be[mt].length%2==0?at[mt]=Be[mt].concat(Z[mt]):at[mt]=Z[mt];return at}(ye,Oe):ye,wt=xe&&xe.userAgent==We;return this.getBrowser=function(){var Z={};return Z[f]=r,Z[v]=r,le.call(Z,We,Me.browser),Z[u]=function(Be){return typeof Be===c?Be.replace(/[^\d\.]/g,"").split(".")[0]:r}(Z[v]),wt&&xe&&xe.brave&&typeof xe.brave.isBrave==s&&(Z[f]="Brave"),Z},this.getCPU=function(){var Z={};return Z[b]=r,le.call(Z,We,Me.cpu),Z},this.getDevice=function(){var Z={};return Z[g]=r,Z[d]=r,Z[p]=r,le.call(Z,We,Me.device),wt&&!Z[p]&&st&&st.mobile&&(Z[p]=_),wt&&Z[d]=="Macintosh"&&xe&&typeof xe.standalone!==a&&xe.maxTouchPoints&&xe.maxTouchPoints>2&&(Z[d]="iPad",Z[p]=C),Z},this.getEngine=function(){var Z={};return Z[f]=r,Z[v]=r,le.call(Z,We,Me.engine),Z},this.getOS=function(){var Z={};return Z[f]=r,Z[v]=r,le.call(Z,We,Me.os),wt&&!Z[f]&&st&&st.platform!="Unknown"&&(Z[f]=st.platform.replace(/chrome os/i,J).replace(/macos/i,se)),Z},this.getResult=function(){return{ua:this.getUA(),browser:this.getBrowser(),engine:this.getEngine(),os:this.getOS(),device:this.getDevice(),cpu:this.getCPU()}},this.getUA=function(){return We},this.setUA=function(Z){return We=typeof Z===c&&Z.length>500?ee(Z,500):Z,this},this.setUA(We),this};Ce.VERSION="1.0.37",Ce.BROWSER=ie([f,v,u]),Ce.CPU=ie([b]),Ce.DEVICE=ie([d,g,p,w,_,N,C,S,E]),Ce.ENGINE=Ce.OS=ie([f,v]),e.exports&&(t=e.exports=Ce),t.UAParser=Ce;var Ie=typeof n!==a&&(n.jQuery||n.Zepto);if(Ie&&!Ie.ua){var gt=new Ce;Ie.ua=gt.getResult(),Ie.ua.get=function(){return gt.getUA()},Ie.ua.set=function(Se){gt.setUA(Se);var Oe=gt.getResult();for(var xe in Oe)Ie.ua[xe]=Oe[xe]}}})(typeof window=="object"?window:Ya)})(h0,h0.exports);var Zee=h0.exports,Vee=function(){function e(){var r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};(function(v,b){if(!(v instanceof b))throw new TypeError("Cannot call a class as a function")})(this,e);var s=r.appKey,a=r.ratio,l=a===void 0?10:a,c=r.env,u=c===void 0?"production":c,d=r.appVersion,f=d===void 0?"0.0.1":d,p=r.whiteScreenConfig,g=p===void 0?{target:document.body,screenshot:!0,score:1.5,domDepth:6}:p;this.appKey=s,this.sdkVersion="1.1.6",this.ratio=Math.max(0,Math.min(l,100)),this.env=u,this.appVersion=f,this.whiteScreenConfig=g,this.sid=this.sessionid(),this.timeDifference=0,this.host="qapm.360.cn"}var t,n;return t=e,n=[{key:"getUA",value:function(){var r,s=new Zee.UAParser().getResult();if(s.browser.name==="360 Browser"){var a=window.navigator.userAgent;/360EE/.test(a)&&(s.browser.name="360极速浏览器"),/360SE/.test(a)&&(s.browser.name="360安全浏览器")}return{os:s.os.name,osVersion:s.os.version,browser:s.browser.name,browserVersion:s.browser.version,ua:s.ua,device:s.device.model||"Unknow",deviceType:s.device.type||"Pc",network:(r=window.navigator)===null||r===void 0||(r=r.connection)===null||r===void 0?void 0:r.effectiveType}}},{key:"uid",value:function(){if(localStorage.getItem("__QAPM_UID__"))return localStorage.getItem("__QAPM_UID__");var r=this.mid()||o5(""+Date.now()+1e9*Math.random());return localStorage.setItem("__QAPM_UID__",r),r}},{key:"mid",value:function(){var r="";try{r=external.GetMID(external.GetSID(window))}catch(s){}if(!r)try{r=window.wdextcmd.GetMid()}catch(s){}return r||""}},{key:"sessionid",value:function(){return o5(""+Date.now()+1e9*Math.random())}},{key:"isIE",value:function(){var r=window.navigator.userAgent;return r.indexOf("MSIE")!==-1||r.indexOf("Trident")!==-1}},{key:"padLeft",value:function(r,s,a){for(var l=r+"";l.length<s;)l=(a||"0")+l;return l}},{key:"formatTime",value:function(r){var s=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"Y-m-d H:i:s";return r?(typeof r!="number"&&typeof r!="string"||r.length===10&&(r*=1e3),r=new Date(r),s.replace(/Y/g,this.padLeft(r.getFullYear(),4)).replace(/m/g,this.padLeft(r.getMonth()+1,2)).replace(/d/g,this.padLeft(r.getDate(),2)).replace(/H/g,this.padLeft(r.getHours(),2)).replace(/i/g,this.padLeft(r.getMinutes(),2)).replace(/s/g,this.padLeft(r.getSeconds(),2))):""}},{key:"formatDate",value:function(r){return this.formatTime(r,"Y-m-d")}},{key:"getTime",value:function(){var r=new Date().getTime()+this.timeDifference;return{time:this.formatTime(r)||r,date:this.formatDate(r)||r}}},{key:"calcRatio",value:function(){return Math.floor(100*Math.random())<this.ratio}},{key:"initTime",value:function(){var r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};try{var s=new URL("".concat(window.location.protocol,"//").concat(this.host,"/time"));Object.entries(r).map(function(a){var l=mG(a,2),c=l[0],u=l[1];s.searchParams.set(c,u)}),this.fetch(s.toString())}catch(a){console.error("initTime Error",a)}}},{key:"fetch",get:function(){return window.fetch?window.fetch.bind(window):function(r){var s=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return new Promise(function(a,l){var c=new XMLHttpRequest;s.keepalive&&(c.keepalive=!0),c.open(s.method||"GET",r),c.onload=function(){a({text:function(){return Promise.resolve(c.responseText)}})},c.onerror=function(){l(c)},c.send(s.body)})}}}],n&&gG(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),e}(),s5=function(e,t){if(PerformanceObserver)if((PerformanceObserver.supportedEntryTypes||[]).includes(e))try{new PerformanceObserver(function(n){n&&t(n)}).observe({type:e,buffered:!0})}catch(n){t("err")}else t("err");else t("err")},jt=function(e){var t=Math.min(Math.max(e,0),15e3);return Number.isNaN(t)?0:t%1!=0?Number(t.toFixed(2)):t},ete=function(){function e(t){ud(this,e),si(this,"performanceData",{fcp:0,fp:0,lcp:0}),si(this,"commit",function(){}),this.webCoreIns=t}return fd(e,[{key:"init",value:function(){try{if(!((t=window.performance)&&t.getEntriesByType&&t.timing))return;this.calcPerformanceTime()}catch(n){}var t}},{key:"calcNavigation",value:function(t){}},{key:"calcPerformanceTime",value:function(){var t=this;Promise.all([new Promise(function(n,r){var s=window.performance.timing,a=null;window.addEventListener("load",function l(){if(s.loadEventEnd>0){clearTimeout(a);var c=jt(s.unloadEnd-s.unloadStart),u=jt(s.redirectStart-s.redirectEnd),d=jt(s.domainLookupStart-s.fetchStart),f=jt(s.domainLookupEnd-s.domainLookupStart),p=jt(s.connectEnd-s.connectStart),g=jt(s.secureConnectionStart==0?0:s.connectEnd-s.secureConnectionStart),v=jt(s.responseStart-s.requestStart),b=jt(s.domInteractive-s.fetchStart),w=jt(s.responseEnd-s.responseStart),_=jt(s.domContentLoadedEventEnd-s.fetchStart),C=jt(s.domInteractive-s.responseEnd),N=jt(s.loadEventStart-s.domContentLoadedEventEnd),S=jt(s.loadEventEnd-s.loadEventStart),E=jt(s.loadEventEnd-s.fetchStart);n({unloadTime:c,redirectTime:u,appCacheTime:d,dnsTime:f,tcpTime:p,sslTime:g,ttfb:v,contentTime:w,domParseTime:C,tti:b,domReadyTime:_,loadEventTime:S,loadFinishTime:E,loadResourceTime:N,resource:""})}else a=setTimeout(l,100)},!1)}),new Promise(function(n,r){s5("paint",function(s){var a=0,l=0;if(s!=="err"){var c,u=qp(s.getEntries());try{for(u.s();!(c=u.n()).done;){var d=c.value,f=d.name,p=d.startTime;f==="first-paint"&&(a=jt(p)),f==="first-contentful-paint"&&(l=jt(p))}}catch(g){u.e(g)}finally{u.f()}}n({fp:a,fcp:l})})}).catch(function(n){return console.log(n)}),new Promise(function(n,r){s5("largest-contentful-paint",function(s){if(s=="err")n({lcp:0});else{var a,l=qp(s.getEntries());try{for(l.s();!(a=l.n()).done;){var c=a.value;n({lcp:jt(c.startTime)})}}catch(u){l.e(u)}finally{l.f()}}})}).catch(function(n){return console.log(n)})]).then(function(){var n=(arguments.length>0&&arguments[0]!==void 0?arguments[0]:[]).reduce(function(r,s){return Ga(Ga({},r),s)},t.performanceData);n.type="performance",t.webCoreIns.commit(n)}).catch(function(n){console.log(n)})}},{key:"calcResourceTime",value:function(){}}]),e}(),tte=["SCRIPT","STYLE","META","HEAD"];function p0(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:document.body,t=arguments.length>1?arguments[1]:void 0,n=arguments.length>2?arguments[2]:void 0,r=arguments.length>3?arguments[3]:void 0,s=arguments.length>4?arguments[4]:void 0;if(!e||n>r||tte.indexOf(e.tagName)>-1||s&&t>s)return n;var a=function(l,c){if(!c||!document.querySelector(l.tagName))return 0;var u=l.getBoundingClientRect(),d=u.top,f=u.height;return d>window.innerHeight||f<=0?0:1/Math.pow(2,c-1)}(e,t);return[].reduceRight.call(e.children,function(l,c){return p0(c,t+1,l,r,s)},n+a)}var nte=0,g0={},rte=function(e){if(!e)return Promise.reject("empty url");var t=g0[e];return t?Promise.resolve(t):new Promise(function(n,r){var s=document.createElement("script");if(s.id="script".concat(nte++),s.src=e,s.async="async",s.src.indexOf("http")!==0)throw Error("load-script只能加载http/https协议的url,当前协议是".concat(location.protocol));s.onerror=function(a){$("#".concat(s.id)).remove(),r(a)},s.readyState?s.onreadystatechange=function(a){s.readyState!="loaded"&&s.readyState!="complete"||(s.onreadystatechange=null,g0[e]=a,n(a))}:s.onload=function(a){g0[e]=a,n(a)},document.body.appendChild(s)})};function ite(e,t){return a5.apply(this,arguments)}function a5(){return(a5=Wa(ar().mark(function e(t,n){var r,s,a;return ar().wrap(function(l){for(;;)switch(l.prev=l.next){case 0:return l.next=2,rte("https://html2canvas.hertzen.com/dist/html2canvas.min.js");case 2:return l.next=4,html2canvas(document.body,{useCORS:!0});case 4:return r=l.sent,s=r.toDataURL("image/jpeg",.3),a=ote(s),l.next=9,ste(a,t,n);case 9:return l.abrupt("return",l.sent);case 10:case"end":return l.stop()}},e)}))).apply(this,arguments)}function ote(e){for(var t=e.split(","),n=t[0].match(/:(.*?);/)[1],r=atob(t[1]),s=r.length,a=new Uint8Array(s);s--;)a[s]=r.charCodeAt(s);return new Blob([a],{type:n})}function ste(e,t,n){return l5.apply(this,arguments)}function l5(){return(l5=Wa(ar().mark(function e(t,n,r){var s,a;return ar().wrap(function(l){for(;;)switch(l.prev=l.next){case 0:return(s=new FormData).append("filename",t,"".concat(r,".png")),s.append("https",1),l.next=5,n("//qapm.360.cn/api/upload/uploadImg",{method:"POST",body:s,keepalive:!0}).then(function(c){return c.json()});case 5:return a=l.sent,l.abrupt("return",a);case 7:case"end":return l.stop()}},e)}))).apply(this,arguments)}var ate=function(){function e(n){ud(this,e),si(this,"isLoaded",!1),si(this,"timer",null),si(this,"whiteCount",0),si(this,"maxLoopNumber",2),si(this,"isReport",!1),this.webCoreIns=n;var r=n.config.whiteScreenConfig||{},s=r.target,a=r.score,l=a===void 0?1.5:a;r.screenshot;var c=r.domDepth,u=c===void 0?6:c;this.target=s,this.score=l,this.screenshot=!1,this.domDepth=u,this.fetch=n.fetch}var t;return fd(e,[{key:"init",value:function(){var n=this;window.addEventListener("load",function(){n.isLoaded=!0,n.handle()}),window.addEventListener("error",function(){n.isLoaded&&(n.whiteCount=n.maxLoopNumber,n.handle())})}},{key:"getTarget",value:function(){var n;try{n=this.target?document.querySelector(this.target):document.body}catch(r){console.log("sdk入参target有误:",this.target)}return n||console.log("sdk入参target有误:",this.target),n||document.body}},{key:"handle",value:function(){var n=p0(this.getTarget(),0,0,this.score,this.domDepth);this.whiteCount+=1,n<=this.score?this.openLoopToJudge(n):this.whiteCount=0}},{key:"openLoopToJudge",value:function(n){var r=this;this.whiteCount>=this.maxLoopNumber?this.commit(n):this.timer=setTimeout(function(){var s=p0(r.target,0,0,r.score,r.domDepth);r.whiteCount+=1,s<=r.score?(clearTimeout(r.timer),r.timer=null,r.openLoopToJudge(s)):(clearTimeout(r.timer),r.timer=null,r.whiteCount=0)},1e3)}},{key:"commit",value:(t=Wa(ar().mark(function n(r){return ar().wrap(function(s){for(;;)switch(s.prev=s.next){case 0:if(!this.isReport){s.next=2;break}return s.abrupt("return");case 2:this.isReport=!0,this.screenshot&&ite(this.fetch,this.webCoreIns.sid),this.webCoreIns.commit({type:"whiteScreen",score:r});case 5:case"end":return s.stop()}},n,this)})),function(n){return t.apply(this,arguments)})}]),e}(),lte=/^\s*at (?:(.*?) ?\()?((?:file|https?|blob|chrome-extension|address|native|eval|webpack|<anonymous>|[-a-z]+:|.*bundle|\/).*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,gu="js",wl="resource",c5="unhandledrejection",mu="cors",d5="vue",u5="react";function cte(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var vu,_l,f5={exports:{}},h5={exports:{}};vu="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",_l={rotl:function(e,t){return e<<t|e>>>32-t},rotr:function(e,t){return e<<32-t|e>>>t},endian:function(e){if(e.constructor==Number)return 16711935&_l.rotl(e,8)|4278255360&_l.rotl(e,24);for(var t=0;t<e.length;t++)e[t]=_l.endian(e[t]);return e},randomBytes:function(e){for(var t=[];e>0;e--)t.push(Math.floor(256*Math.random()));return t},bytesToWords:function(e){for(var t=[],n=0,r=0;n<e.length;n++,r+=8)t[r>>>5]|=e[n]<<24-r%32;return t},wordsToBytes:function(e){for(var t=[],n=0;n<32*e.length;n+=8)t.push(e[n>>>5]>>>24-n%32&255);return t},bytesToHex:function(e){for(var t=[],n=0;n<e.length;n++)t.push((e[n]>>>4).toString(16)),t.push((15&e[n]).toString(16));return t.join("")},hexToBytes:function(e){for(var t=[],n=0;n<e.length;n+=2)t.push(parseInt(e.substr(n,2),16));return t},bytesToBase64:function(e){for(var t=[],n=0;n<e.length;n+=3)for(var r=e[n]<<16|e[n+1]<<8|e[n+2],s=0;s<4;s++)8*n+6*s<=8*e.length?t.push(vu.charAt(r>>>6*(3-s)&63)):t.push("=");return t.join("")},base64ToBytes:function(e){e=e.replace(/[^A-Z0-9+\/]/gi,"");for(var t=[],n=0,r=0;n<e.length;r=++n%4)r!=0&&t.push((vu.indexOf(e.charAt(n-1))&Math.pow(2,-2*r+8)-1)<<2*r|vu.indexOf(e.charAt(n))>>>6-2*r);return t}},h5.exports=_l;var dte=h5.exports,m0={utf8:{stringToBytes:function(e){return m0.bin.stringToBytes(unescape(encodeURIComponent(e)))},bytesToString:function(e){return decodeURIComponent(escape(m0.bin.bytesToString(e)))}},bin:{stringToBytes:function(e){for(var t=[],n=0;n<e.length;n++)t.push(255&e.charCodeAt(n));return t},bytesToString:function(e){for(var t=[],n=0;n<e.length;n++)t.push(String.fromCharCode(e[n]));return t.join("")}}},p5=m0,ute=function(e){return e!=null&&(g5(e)||function(t){return typeof t.readFloatLE=="function"&&typeof t.slice=="function"&&g5(t.slice(0,0))}(e)||!!e._isBuffer)};function g5(e){return!!e.constructor&&typeof e.constructor.isBuffer=="function"&&e.constructor.isBuffer(e)}(function(){var e=dte,t=p5.utf8,n=ute,r=p5.bin,s=function(a,l){a.constructor==String?a=l&&l.encoding==="binary"?r.stringToBytes(a):t.stringToBytes(a):n(a)?a=Array.prototype.slice.call(a,0):Array.isArray(a)||a.constructor===Uint8Array||(a=a.toString());for(var c=e.bytesToWords(a),u=8*a.length,d=1732584193,f=-271733879,p=-1732584194,g=271733878,v=0;v<c.length;v++)c[v]=16711935&(c[v]<<8|c[v]>>>24)|4278255360&(c[v]<<24|c[v]>>>8);c[u>>>5]|=128<<u%32,c[14+(u+64>>>9<<4)]=u;var b=s._ff,w=s._gg,_=s._hh,C=s._ii;for(v=0;v<c.length;v+=16){var N=d,S=f,E=p,k=g;d=b(d,f,p,g,c[v+0],7,-680876936),g=b(g,d,f,p,c[v+1],12,-389564586),p=b(p,g,d,f,c[v+2],17,606105819),f=b(f,p,g,d,c[v+3],22,-1044525330),d=b(d,f,p,g,c[v+4],7,-176418897),g=b(g,d,f,p,c[v+5],12,1200080426),p=b(p,g,d,f,c[v+6],17,-1473231341),f=b(f,p,g,d,c[v+7],22,-45705983),d=b(d,f,p,g,c[v+8],7,1770035416),g=b(g,d,f,p,c[v+9],12,-1958414417),p=b(p,g,d,f,c[v+10],17,-42063),f=b(f,p,g,d,c[v+11],22,-1990404162),d=b(d,f,p,g,c[v+12],7,1804603682),g=b(g,d,f,p,c[v+13],12,-40341101),p=b(p,g,d,f,c[v+14],17,-1502002290),d=w(d,f=b(f,p,g,d,c[v+15],22,1236535329),p,g,c[v+1],5,-165796510),g=w(g,d,f,p,c[v+6],9,-1069501632),p=w(p,g,d,f,c[v+11],14,643717713),f=w(f,p,g,d,c[v+0],20,-373897302),d=w(d,f,p,g,c[v+5],5,-701558691),g=w(g,d,f,p,c[v+10],9,38016083),p=w(p,g,d,f,c[v+15],14,-660478335),f=w(f,p,g,d,c[v+4],20,-405537848),d=w(d,f,p,g,c[v+9],5,568446438),g=w(g,d,f,p,c[v+14],9,-1019803690),p=w(p,g,d,f,c[v+3],14,-187363961),f=w(f,p,g,d,c[v+8],20,1163531501),d=w(d,f,p,g,c[v+13],5,-1444681467),g=w(g,d,f,p,c[v+2],9,-51403784),p=w(p,g,d,f,c[v+7],14,1735328473),d=_(d,f=w(f,p,g,d,c[v+12],20,-1926607734),p,g,c[v+5],4,-378558),g=_(g,d,f,p,c[v+8],11,-2022574463),p=_(p,g,d,f,c[v+11],16,1839030562),f=_(f,p,g,d,c[v+14],23,-35309556),d=_(d,f,p,g,c[v+1],4,-1530992060),g=_(g,d,f,p,c[v+4],11,1272893353),p=_(p,g,d,f,c[v+7],16,-155497632),f=_(f,p,g,d,c[v+10],23,-1094730640),d=_(d,f,p,g,c[v+13],4,681279174),g=_(g,d,f,p,c[v+0],11,-358537222),p=_(p,g,d,f,c[v+3],16,-722521979),f=_(f,p,g,d,c[v+6],23,76029189),d=_(d,f,p,g,c[v+9],4,-640364487),g=_(g,d,f,p,c[v+12],11,-421815835),p=_(p,g,d,f,c[v+15],16,530742520),d=C(d,f=_(f,p,g,d,c[v+2],23,-995338651),p,g,c[v+0],6,-198630844),g=C(g,d,f,p,c[v+7],10,1126891415),p=C(p,g,d,f,c[v+14],15,-1416354905),f=C(f,p,g,d,c[v+5],21,-57434055),d=C(d,f,p,g,c[v+12],6,1700485571),g=C(g,d,f,p,c[v+3],10,-1894986606),p=C(p,g,d,f,c[v+10],15,-1051523),f=C(f,p,g,d,c[v+1],21,-2054922799),d=C(d,f,p,g,c[v+8],6,1873313359),g=C(g,d,f,p,c[v+15],10,-30611744),p=C(p,g,d,f,c[v+6],15,-1560198380),f=C(f,p,g,d,c[v+13],21,1309151649),d=C(d,f,p,g,c[v+4],6,-145523070),g=C(g,d,f,p,c[v+11],10,-1120210379),p=C(p,g,d,f,c[v+2],15,718787259),f=C(f,p,g,d,c[v+9],21,-343485551),d=d+N>>>0,f=f+S>>>0,p=p+E>>>0,g=g+k>>>0}return e.endian([d,f,p,g])};s._ff=function(a,l,c,u,d,f,p){var g=a+(l&c|~l&u)+(d>>>0)+p;return(g<<f|g>>>32-f)+l},s._gg=function(a,l,c,u,d,f,p){var g=a+(l&u|c&~u)+(d>>>0)+p;return(g<<f|g>>>32-f)+l},s._hh=function(a,l,c,u,d,f,p){var g=a+(l^c^u)+(d>>>0)+p;return(g<<f|g>>>32-f)+l},s._ii=function(a,l,c,u,d,f,p){var g=a+(c^(l|~u))+(d>>>0)+p;return(g<<f|g>>>32-f)+l},s._blocksize=16,s._digestsize=16,f5.exports=function(a,l){if(a==null)throw new Error("Illegal argument "+a);var c=e.wordsToBytes(s(a,l));return l&&l.asBytes?c:l&&l.asString?r.bytesToString(c):e.bytesToHex(c)}})();var fte=cte(f5.exports);function hte(e){var t=e.match(lte);return t?{filename:t[2],functionName:t[1]||"",lineno:parseInt(t[3],10)||void 0,colno:parseInt(t[4],10)||void 0}:{}}function yu(e){var t=(e||{stack:""}).stack;if(!t)return[];var n,r=[],s=qp(t.split(`
|
|
139
|
-
`).slice(1));try{for(s.s();!(n=s.n()).done;){var a=hte(n.value);a&&r.push(a)}}catch(l){s.e(l)}finally{s.f()}return r.slice(0,10)}var Fs=function(e){return fte(e).toString()},v0=function(e){return e instanceof ErrorEvent?e.message==="Script error."?mu:gu:wl},pte=function(){function e(t){ud(this,e),si(this,"errorIdSet",new Set),this.webCoreIns=t,this.errorIdSet=new Set}return fd(e,[{key:"init",value:function(){var t;if(this.initJsError(),this.initResourceError(),this.initPromiseError(),this.initCorsError(),(t=window.__QAPM__)!==null&&t!==void 0&&(t=t.q)!==null&&t!==void 0&&t.length){var n={error:this.onJSError.bind(this),reject:this.onPromiseError.bind(this)};window.__QAPM__.q.forEach(function(){var r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},s=r.type,a=r.event,l=n[s];l&&l(a)}),window.__QAPM__.q=[]}}},{key:"initJsError",value:function(){var t=this;window.addEventListener("error",function(n){return t.onJSError(n)},!0)}},{key:"initResourceError",value:function(){var t=this;window.addEventListener("error",function(n){return t.onResourceError(n)},!0)}},{key:"initPromiseError",value:function(){var t=this;window.addEventListener("unhandledrejection",function(n){return t.onPromiseError(n)},!0)}},{key:"initCorsError",value:function(){var t=this;window.addEventListener("error",function(n){return function(r){if(v0(r)===mu){var s={errorType:mu,errorMessage:r.message,errorSummary:"CorsError",errorId:Fs("".concat(mu,"-").concat(r.message))};t.commit(s)}}(n)},!0)}},{key:"onResourceError",value:function(t){if(v0(t)===wl){var n=t.target||t.srcElement,r=n.src||n.href,s=JSON.stringify(wl+": "+r||"UnKnown Resource"),a={errorType:wl,errorMessage:s,errorSummary:"ResourceError",errorId:Fs("".concat(wl,"-").concat(s))};this.commit(a)}}},{key:"onJSError",value:function(t){var n,r;if(v0(t)===gu){var s=JSON.stringify(t.message),a=function(c){var u=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"unknown";if(!c)return u;try{var d=new URL(c);return d.pathname&&d.pathname.endsWith(".js")?c:u}catch(f){return c}}(t.filename,(n=this.webCoreIns.config)===null||n===void 0?void 0:n.appKey),l={errorType:gu,errorMessage:s,errorSummary:t.error&&((r=t.error)===null||r===void 0?void 0:r.name)||"UnKnown",errorStack:JSON.stringify(yu(t.error)),errorId:Fs("".concat(gu,"-").concat(s,"-").concat(a))};this.commit(l)}}},{key:"onPromiseError",value:function(t){var n,r,s=JSON.stringify(((n=t.reason)===null||n===void 0?void 0:n.message)||t.reason||"UnKnown"),a=((r=t.reason)===null||r===void 0?void 0:r.name)||"UnKnown",l={errorType:c5,errorMessage:s,errorSummary:a,errorStack:JSON.stringify(yu(t.reason)),errorId:Fs("".concat(c5,"-").concat(s,"-").concat(a))};this.commit(l)}},{key:"onVueError",value:function(t,n,r){var s=JSON.stringify(t.message),a={errorType:d5,errorMessage:s,errorSummary:t.name||"UnKnown",errorStack:JSON.stringify(yu(t)),errorId:Fs("".concat(d5,"-").concat(s,"-").concat(t.name))};this.commit(a)}},{key:"onReactError",value:function(t,n){var r=JSON.stringify(t.message),s={errorType:u5,errorMessage:r,errorSummary:t.name||"UnKnown",errorStack:JSON.stringify(yu(t)),errorId:Fs("".concat(u5,"-").concat(r,"-").concat(t.name))};this.commit(s)}},{key:"commit",value:function(t){var n=t.errorId;this.errorIdSet.has(n)||(this.errorIdSet.add(n),this.webCoreIns.commit(Ga({type:"error"},t)))}}]),e}(),gte=function(e){function t(){var s,a=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return ud(this,t),(s=fG(this,t,[a])).config=a,s.isReport()?(s.PerformancePluginInstance=new ete(Ka(s)),s.WhiteScreenPluginInstance=new ate(Ka(s)),s.ErrorPluginInstance=new pte(Ka(s)),s.plugins=[s.PerformancePluginInstance,s.WhiteScreenPluginInstance,s.ErrorPluginInstance],s.init(),q_(t,t,$s,Ka(s)),s):z_(s)}var n,r;return function(s,a){if(typeof a!="function"&&a!==null)throw new TypeError("Super expression must either be null or a function");s.prototype=Object.create(a&&a.prototype,{constructor:{value:s,writable:!0,configurable:!0}}),Object.defineProperty(s,"prototype",{writable:!1}),a&&jp(s,a)}(t,Vee),fd(t,[{key:"isReport",value:function(){var s=this.isIE(),a=this.calcRatio();return this.config.appKey&&a&&!s}},{key:"init",value:(r=Wa(ar().mark(function s(){return ar().wrap(function(a){for(;;)switch(a.prev=a.next){case 0:this.initTime(this.mixed()),this.plugins.forEach(function(l){try{l.init()}catch(c){console.error("initPlugin Error",c)}});case 2:case"end":return a.stop()}},s,this)})),function(){return r.apply(this,arguments)})},{key:"mixed",value:function(){var s=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},a=this.uid(),l=this.getTime(),c=l.time,u=l.date,d=this.getUA(),f=window.location,p=f.host,g=f.origin,v=f.pathname;return Ga(Ga({uid:a,sid:this.sid,url:window.location.href,host:p,fullPath:g+v,sdkVersion:this.sdkVersion,createDate:u,appKey:this.config.appKey,createTime:c,appVersion:this.appVersion,env:this.env},d),s)}},{key:"commit",value:(n=Wa(ar().mark(function s(a){var l,c;return ar().wrap(function(u){for(;;)switch(u.prev=u.next){case 0:try{l=this.mixed(a),c=new URL("".concat(window.location.protocol,"//").concat(this.host,"/log.gif")),Object.entries(l).map(function(d){var f=hG(d,2),p=f[0],g=f[1];c.searchParams.set(p,g)}),new Image().src=c.toString()}catch(d){console.log("commit Error",d)}case 1:case"end":return u.stop()}},s,this)})),function(s){return n.apply(this,arguments)})}],[{key:"install",value:function(s){var a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};pd(t,t,$s)||(s.config.errorHandler=function(l,c,u){pd(t,t,$s).ErrorPluginInstance.onVueError(l,c,u),console.error(l)},q_(t,t,$s,new t(a)))}},{key:"sendError",value:function(s){pd(t,t,$s)?pd(t,t,$s).ErrorPluginInstance.onReactError(s):console.error("QAPM: 请先初始化 QAPM!")}}]),t}(),$s={writable:!0,value:null};const Jse="",Xse="",mte={components:{InfoFilled:xf,ArrowRight:Sf},mixins:[kr],inject:["hasLevel"],props:{axis:{required:!0,type:Object,default:()=>({x:0,y:0})},show:{required:!0,type:Boolean,default:!1},nodeInfo:{required:!0,type:Array,default:()=>[]},menuOptions:{required:!0,type:Array,default:()=>[]},border:{type:Boolean,required:!1,default:!0},itemWidth:{type:Number,required:!1,default:206},itemHeight:{type:Number,required:!1,default:36},itemSize:{type:Number,required:!1,default:14},offset:{type:Object,required:!1,default:()=>({x:6,y:2})},borderWidth:{type:Number,required:!1,default:6},history:{type:Object,required:!0,default:()=>{}},moduleDetail:{type:Object,required:!0,default:()=>{}}},emits:["contextmenu-click"],data(){return{checkedItems:{},globalMenus:RM,maxMulti:6}},computed:{checkboxMenu(){return this.nodeInfo.length>1?[]:this.menuOptions},canGoDetail(){var e,t,n,r;return((t=(e=this.moduleDetail)==null?void 0:e.config)==null?void 0:t.jumpDetail)&&((r=this.moduleDetail)==null?void 0:r.config.jumpRule[(n=this.nodeInfo[0])==null?void 0:n.type])},systemMenu(){var r,s,a,l,c,u,d;const e=[];if(this.nodeInfo.length===1){const f=this.nodeInfo[0];f.type!=="aggregation"&&f.type!=="nodeType"&&(e.push(Yh),(r=this.history.keyNodeIds)!=null&&r.some(_=>_===f.id)||(e.push(Qh),(a=(s=this.moduleDetail)==null?void 0:s.config)!=null&&a.hideCollectMenu||e.push(f.collect?Xh:Jh),e.push(f.textProp==="name"?Gh:Hh),f.label&&e.push(f.textProp==="label"?Wh:Kh)),this.canGoDetail&&e.push(K2)),e.push(f.fx?qh:jh);const p=this.history.dataNow.links.some(w=>w.source.id===f.id&&w.target.type==="aggregation"),b=this.history.dataNow.links.filter(w=>w.source.id===f.id).map(w=>w.target).some(w=>{let _=0;return this.history.dataNow.links.map(C=>{C.source.id===w.id&&_++}),_===0});p||f.type==="aggregation"?e.push(H2):b&&e.push(q2),b&&e.push(j2),e.push(Zh)}else this.nodeInfo.length>1?(e.push(Qh,Yh),e.push(this.nodeInfo.some(p=>!p.collect)?Jh:Xh),this.nodeInfo.some(p=>p.label)&&e.push(this.nodeInfo.some(p=>p.textProp!=="label")?Kh:Wh),e.push(this.nodeInfo.some(p=>p.textProp!=="name")?Hh:Gh),e.push(this.nodeInfo.some(p=>!p.fx)?jh:qh),e.push(Zh)):this.nodeInfo.length===0&&(this.history.dataNow.nodes.some(p=>p.label)&&e.push(this.history.dataNow.nodes.some(p=>p.textProp!=="label")?$2:F2),e.push(this.history.dataNow.nodes.some(p=>p.textProp!=="name")?D2:M2),e.push(this.history.dataNow.nodes.some(p=>!p.fx)?R2:L2),this.history.currentIndex>0&&e.push(z2),this.history.currentIndex<this.history.length-1&&e.push(U2));const t=(l=this.nodeInfo[0])==null?void 0:l.type,n=(d=(u=(c=this.nodeInfo[0])==null?void 0:c.detail)==null?void 0:u.info)==null?void 0:d.extraNodeContextMenus;return t!=="nodeType"&&(n!=null&&n.length)&&(n.forEach(f=>{f.icon||(f.icon="button_edit_label")}),e.push(...n)),e},totalHeight(){let e=this.menuOptions.length*(this.itemHeight+5)+10+44+48+5,t=this.systemMenu.length*(this.itemHeight+5)+10+44+5;return e=this.menuOptions.length===0?0:44,t=this.systemMenu.length===0?0:44,e+t},axisComputed(){const e=document.getElementsByClassName("d3-container")[0],t=this.axis.top-e.offsetTop;return{top:(t<e.offsetHeight/2?Math.min(t+this.offset.y,Math.max(e.offsetHeight-this.totalHeight,e.getBoundingClientRect().top)):Math.max(t+this.offset.y,this.totalHeight+e.getBoundingClientRect().top))+"px",left:this.axis.left+this.offset.x+"px",transform:`translate(${this.axis.left>e.offsetWidth/2?"-100%":"0%"}, ${t>e.offsetHeight/2?"-100%":"0%"})`}},liStyle(){return{width:this.itemWidth+"px",height:this.itemHeight+"px",lineHeight:this.itemHeight+"px",fontSize:this.itemSize+"px"}},firstLeft(){const e=document.body.offsetWidth;return this.axis.left+this.itemWidth*2>=e},secondLeft(){const e=document.body.offsetWidth;return this.axis.left+this.itemWidth*3>=e},checkedItemsFinal(){return Object.keys(this.checkedItems).filter(e=>this.checkedItems[e]).map(e=>this.checkedItems[e])},haveInterface(){let e=!1;return this.menuOptions.map(t=>{t.type===1&&(e=!0)}),e}},watch:{show(){this.checkedItems={}}},methods:{handleCollapse(){},isSystemItem(e){return e.type===2},isExternalItem(e){return e.type===3},hasChildren(e){var t;return((t=e==null?void 0:e.children)==null?void 0:t.length)>0},onCheck(e,t){this.checkedItems[t.name]=e.currentTarget.checked?t:!1},secondBorderCheck(e,t=0){const n=document.body.offsetWidth,r=document.body.offsetHeight,s=this.axis.top+(e+t)*this.itemHeight;return{width:this.itemWidth*2+60+"px",left:this.axis.left+this.itemWidth*2>=n?"-100%":"100%",top:r>=s?0:"auto",bottom:r<s?0:"auto"}},thirdBorderCheck(e,t,n,r){const s=document.body.offsetWidth,a=document.body.offsetHeight,l=this.secondBorderCheck(e,n).top;let c;const u=(t+r)*this.itemHeight,d=u>180?180:u;return l===0?c=this.axis.top+e*this.itemHeight+d:c=this.axis.top-e*this.itemHeight+d,{left:this.axis.left+this.itemWidth*3>=s?"-100%":"100%",bottom:a>=c?0:"auto",top:a<c?0:"auto"}},handleClick(e,t){if(!t){if(Gt({cId:"contextMenu-"+e.name,c:"右键菜单-"+e.namec}),e.has_child>0)return!1;me(this,"contextmenu-click",{nodes:this.nodeInfo,api:e})}},handleDataClick(e,t){Gt({cId:"contextMenu-"+e.name,c:"右键菜单-"+e.namec}),me(this,"contextmenu-click",{nodes:this.nodeInfo,api:t,dataApi:e}),this.checkedItems={}}}},vte={"aria-hidden":"true",style:{position:"absolute",width:"0",height:"0",overflow:"hidden",display:"none"}},yte={class:"cm-list"},bte={class:"cm-ul"},wte={class:"hd"},_te=["src"],Cte={class:"bd"},Ste={class:"cm-ul cm-ul-level1"},Ete=["title"],xte=["title","onClick"],kte=["title","onClick"],Nte={key:0,class:"icon","aria-hidden":"true"},Tte=["title","onClick"],Ate=["src"],Ote=["title","onClick"],Ite={key:0,class:"fas el-icon-fa-cog"},Bte={key:1,class:"fas el-icon-fa-external-link-alt"},Pte={class:"text-wrapper"},Rte=["src"],Lte=["src"],Dte={key:3,class:"shortcut"},Mte={key:2,class:"icon","aria-hidden":"true"},Fte=["title","onClick"],$te={key:1,class:"icon","aria-hidden":"true"},zte=["title","onClick"];function Ute(e,t,n,r,s,a){const l=o.resolveComponent("ArrowRight"),c=Qe,u=o.resolveComponent("InfoFilled"),d=pn;return n.show?(o.openBlock(),o.createElementBlock("div",{key:0,class:"cm-container",style:o.normalizeStyle(a.axisComputed),onClick:t[1]||(t[1]=o.withModifiers((...f)=>a.handleCollapse&&a.handleCollapse(...f),["stop"]))},[(o.openBlock(),o.createElementBlock("svg",vte,t[2]||(t[2]=[o.createElementVNode("symbol",{id:"icon-arrow-right",viewBox:"0 0 1024 1024"},[o.createElementVNode("path",{d:"M288.791335 65.582671l446.41733 446.417329-446.41733 446.417329z"})],-1)]))),o.createElementVNode("div",yte,[o.createElementVNode("ul",bte,[a.checkboxMenu.length>0?(o.openBlock(),o.createElementBlock("li",{key:0,class:"cm-li data-opt-wrapper",style:o.normalizeStyle(a.liStyle)},[o.createElementVNode("div",wte,[o.createElementVNode("img",{src:e.imgPath["./public/d3svg1/button18/button_relation.svg"],style:{"margin-right":"10px"}},null,8,_te),t[3]||(t[3]=o.createTextVNode("按关系分类拓线")),o.createVNode(c,null,{default:o.withCtx(()=>[o.createVNode(l)]),_:1})]),o.createElementVNode("div",Cte,[o.createElementVNode("ul",Ste,[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(a.checkboxMenu,(f,p)=>(o.openBlock(),o.createElementBlock("li",{key:p,class:"cm-li context-one",style:o.normalizeStyle(a.liStyle)},[a.hasChildren(f)?(o.openBlock(),o.createElementBlock("div",{key:0,class:o.normalizeClass(["cm-item",a.firstLeft?"cm-left":""]),title:f.namec},[o.createElementVNode("span",null,o.toDisplayString(f.namec),1),t[4]||(t[4]=o.createElementVNode("svg",{class:"icon","aria-hidden":"true"},[o.createElementVNode("use",{"xlink:href":"#icon-arrow-right"})],-1))],10,Ete)):(o.openBlock(),o.createElementBlock("div",{key:1,class:o.normalizeClass(["cm-item",a.firstLeft?"cm-left":""]),title:f.namec,onClick:o.withModifiers(g=>a.handleDataClick(f,s.globalMenus.expandPartNode),["stop"])},[o.createElementVNode("span",null,o.toDisplayString(f.namec),1)],10,xte)),a.hasChildren(f)?(o.openBlock(),o.createElementBlock("ul",{key:2,class:"cm-ul cm-ul-level2",style:o.normalizeStyle(a.secondBorderCheck(p,f.children.length))},[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(f.children,(g,v)=>(o.openBlock(),o.createElementBlock("li",{key:v,class:"cm-li",style:o.normalizeStyle(a.liStyle)},[o.createElementVNode("div",{class:o.normalizeClass(["cm-item",a.secondLeft?"cm-left":""]),title:g.namec,onClick:o.withModifiers(b=>a.handleDataClick(g,s.globalMenus.expandPartNode),["stop"])},[o.createElementVNode("span",null,o.toDisplayString(g.namec),1),a.hasChildren(g)?(o.openBlock(),o.createElementBlock("svg",Nte,t[5]||(t[5]=[o.createElementVNode("use",{"xlink:href":"#icon-arrow-right"},null,-1)]))):o.createCommentVNode("",!0)],10,kte),a.hasChildren(g)?(o.openBlock(),o.createElementBlock("ul",{key:0,class:"cm-ul cm-ul-level3",style:o.normalizeStyle(a.thirdBorderCheck(p,v,f.children.length,g.children.length))},[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(g.children,(b,w)=>(o.openBlock(),o.createElementBlock("li",{key:w,class:"cm-li",style:o.normalizeStyle(a.liStyle)},[o.createElementVNode("div",{class:"cm-item",title:b.namec,onClick:o.withModifiers(_=>a.handleDataClick(b,s.globalMenus.expandPartNode),["stop"])},[o.createElementVNode("span",null,o.toDisplayString(b.namec),1)],8,Tte)],4))),128))],4)):o.createCommentVNode("",!0)],4))),128))],4)):o.createCommentVNode("",!0)],4))),128))])])],4)):n.nodeInfo.length>1&&n.nodeInfo.length<s.maxMulti?(o.openBlock(),o.createElementBlock("li",{key:1,class:"cm-li data-opt-wrapper data-opt-all",style:o.normalizeStyle(a.liStyle)},[o.createElementVNode("div",{class:"hd",onClick:t[0]||(t[0]=o.withModifiers(f=>a.handleDataClick(null,s.globalMenus.expandNode),["stop"]))},[o.createElementVNode("img",{src:e.imgPath["./public/d3svg1/button18/button_relation.svg"],style:{"margin-right":"10px"}},null,8,Ate),t[6]||(t[6]=o.createTextVNode("展开全部关系 "))]),t[7]||(t[7]=o.createElementVNode("div",{class:"bd"},null,-1))],4)):o.createCommentVNode("",!0),(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(a.systemMenu,(f,p)=>(o.openBlock(),o.createElementBlock("li",{key:p,class:"cm-li",style:o.normalizeStyle(a.liStyle)},[o.createElementVNode("div",{class:o.normalizeClass(["cm-item",{"cm-left":a.firstLeft,disabled:f.disabled}]),title:f.namec,onClick:o.withModifiers(g=>a.handleClick(f,f.disabled),["stop"])},[a.isSystemItem(f)?(o.openBlock(),o.createElementBlock("i",Ite)):a.isExternalItem(f)?(o.openBlock(),o.createElementBlock("i",Bte)):o.createCommentVNode("",!0),o.createElementVNode("div",Pte,[f.icon?(o.openBlock(),o.createElementBlock("img",{key:0,src:e.imgPath["./public/d3svg1/button18/"+f.icon+".svg"],class:"t-icon"},null,8,Rte)):(o.openBlock(),o.createElementBlock("img",{key:1,src:e.imgPath["./public/d3svg1/button18/button_"+f.name+".svg"],class:"t-icon"},null,8,Lte)),f.tooltip?(o.openBlock(),o.createBlock(d,{key:2,class:"el-icon-info",effect:"dark",content:f.tooltip,placement:"top-start"},{default:o.withCtx(()=>[o.createVNode(c,null,{default:o.withCtx(()=>[o.createVNode(u)]),_:1})]),_:2},1032,["content"])):o.createCommentVNode("",!0),o.createElementVNode("span",null,o.toDisplayString(f.namec),1),f.shortcut?(o.openBlock(),o.createElementBlock("span",Dte,o.toDisplayString(f.shortcut),1)):o.createCommentVNode("",!0)]),a.hasChildren(f)?(o.openBlock(),o.createElementBlock("svg",Mte,t[8]||(t[8]=[o.createElementVNode("use",{"xlink:href":"#icon-arrow-right"},null,-1)]))):o.createCommentVNode("",!0)],10,Ote),a.hasChildren(f)?(o.openBlock(),o.createElementBlock("ul",{key:0,class:"cm-ul cm-ul-level2",style:o.normalizeStyle(a.secondBorderCheck(p,f.children.length))},[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(f.children,(g,v)=>(o.openBlock(),o.createElementBlock("li",{key:v,class:"cm-li",style:o.normalizeStyle(a.liStyle)},[o.createElementVNode("div",{class:o.normalizeClass(["cm-item",{"cm-left":a.secondLeft,disabled:f.disabled||g.disabled}]),title:g.namec,onClick:o.withModifiers(b=>a.handleClick(g,f.disabled||g.disabled),["stop"])},[g.tooltip?(o.openBlock(),o.createBlock(d,{key:0,class:"el-icon-info",effect:"dark",content:g.tooltip,placement:"top-start"},{default:o.withCtx(()=>[o.createVNode(c,null,{default:o.withCtx(()=>[o.createVNode(u)]),_:1})]),_:2},1032,["content"])):o.createCommentVNode("",!0),o.createElementVNode("span",null,o.toDisplayString(g.namec),1),a.hasChildren(g)?(o.openBlock(),o.createElementBlock("svg",$te,t[9]||(t[9]=[o.createElementVNode("use",{"xlink:href":"#icon-arrow-right"},null,-1)]))):o.createCommentVNode("",!0)],10,Fte),a.hasChildren(g)?(o.openBlock(),o.createElementBlock("ul",{key:0,class:"cm-ul cm-ul-level3",style:o.normalizeStyle(a.thirdBorderCheck(p,v,f.children.length,g.children.length))},[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(g.children,(b,w)=>(o.openBlock(),o.createElementBlock("li",{key:w,class:"cm-li",style:o.normalizeStyle(a.liStyle)},[o.createElementVNode("div",{class:o.normalizeClass(["cm-item",{disabled:f.disabled||g.disabled||b.disabled}]),title:b.namec,onClick:o.withModifiers(_=>a.handleClick(b,f.disabled||g.disabled||b.disabled),["stop"])},[b.tooltip?(o.openBlock(),o.createBlock(d,{key:0,class:"el-icon-info",effect:"dark",content:b.tooltip,placement:"top-start"},{default:o.withCtx(()=>[o.createVNode(c,null,{default:o.withCtx(()=>[o.createVNode(u)]),_:1})]),_:2},1032,["content"])):o.createCommentVNode("",!0),o.createElementVNode("span",null,o.toDisplayString(b.namec),1)],10,zte)],4))),128))],4)):o.createCommentVNode("",!0)],4))),128))],4)):o.createCommentVNode("",!0)],4))),128))])])],4)):o.createCommentVNode("",!0)}const jte=xt(mte,[["render",Ute],["__scopeId","data-v-dfb39ec8"]]),Qse="",Zse="",Vse="",eae="",qte={name:"Popover",components:{ForceGraphSvgIcon:uo},mixins:[kr],inject:["levelList","hasLevel"],props:{showPopover:{type:Boolean,default:!1},mousePosition:{type:Object,default:()=>({left:0,top:0})},nodeInfo:{type:Object,default:()=>{}},type:{type:String,default:"node"},moduleDetail:{type:Object,default:()=>{}},data:{type:Object,default:()=>{}},darkMode:{type:Boolean,default:!0},history:{type:Object,default:()=>({})},customTooltip:{type:Function}},data(){return{isFunction:Rl,showSelf:!1,onPop:!1,position:null,aggregationList:[]}},computed:{show(){return this.showPopover||this.showSelf},name(){var e,t,n;return((n=(t=(e=this.nodeInfo)==null?void 0:e.detail)==null?void 0:t.info)==null?void 0:n.name)||this.nodeInfo.name},isNormalNode(){return this.nodeInfo.type!=="nodeType"&&this.nodeInfo.type!=="aggregation"},isNodeTypeNode(){return this.nodeInfo.type==="nodeType"},isAggregateNode(){return this.nodeInfo.type==="aggregation"},fieldMapThisType(){var e;return this.moduleDetail.detail_field_map&&this.moduleDetail.detail_field_map[`${(e=this.nodeInfo)==null?void 0:e.type}_detail_info`]},canGoDetail(){return["nodeType","aggregation","family","org","report","vul","thumbprint_md5","email","cert_https"].indexOf(this.nodeInfo.type)<0}},watch:{mousePosition(){setTimeout(()=>{var c,u,d;const e=this.mousePosition.left>document.body.offsetWidth/2,t=this.mousePosition.top>document.body.offsetHeight/2,n=(c=document.getElementsByClassName("popover-container")[0])==null?void 0:c.offsetHeight,r=(u=document.getElementsByClassName("d3-container")[0])==null?void 0:u.offsetHeight,s=(d=document.getElementsByClassName("d3-container")[0])==null?void 0:d.getBoundingClientRect().top;let a;t?a=Math.max(this.mousePosition.top,n+s)+5:a=Math.min(this.mousePosition.top,Math.max(r-n,s))-5;const l={left:(e?this.mousePosition.left+2:this.mousePosition.right-2)+"px",top:a+"px",transform:`translate(${e?"-100%":"0%"}, ${t?"-100%":"0%"})`};this.position=l},100)},nodeInfo:{handler:function(){var t;const e=(((t=this.nodeInfo)==null?void 0:t.list)||[]).map(n=>{var s,a,l;const r=n.detail;return de(te({},n),{name:((s=r==null?void 0:r.info)==null?void 0:s.name)||n.name,level:((l=(a=r==null?void 0:r.info)==null?void 0:a.basic)==null?void 0:l.level)||""})});e==null||e.sort((n,r)=>{var l,c;const s=(l=this.levelList.find(u=>u.level===n.level))==null?void 0:l.dangerNumber;return((c=this.levelList.find(u=>u.level===r.level))==null?void 0:c.dangerNumber)-s}),this.aggregationList=e},immediate:!0}},methods:{handleMouseEnter(){this.showSelf=!0},handleMouseLeave(){this.showSelf=!1},isSomething(e){return Ph(e)},getTypeZh(e){var n,r,s;let t=e;if(e==="nodeType")t="关系节点";else for(const a in(n=this.moduleDetail)==null?void 0:n.nodes)if(e===((r=this.moduleDetail)==null?void 0:r.nodes[a].name)){t=(s=this.moduleDetail)==null?void 0:s.nodes[a].namec;break}return t},getLevelClass(e){return kc(e,this.levelList)},getColorStyle(e){return fo(e,this.levelList,this.darkMode)},getNodeTypeChildNum(e){var s;const t=(s=this.data)==null?void 0:s.links,n=[],r=[];return t==null||t.map(a=>{a.source.id===e&&(n.push(a.target.id),a.target.detail&&AD(a.target.detail.info.basic.level,this.levelList)&&r.push(a.target.id))}),{allChildNum:n.length,dangerChildNum:r.length}},canShowField(e){const t=this.hasFieldValue(e);return!(t===void 0||e.hide_hover||e.hide_empty&&!t)},hasFieldValue(e){const t=this.nodeInfo.detail&&this.nodeInfo.detail.info&&this.nodeInfo.detail.info.basic[e.prop];if(t===null)return;const n=Array.isArray(t);return n&&t.length>0||!n&&t!==""&&t!=="无"},getFieldValue(e){const t=this.nodeInfo.detail.info.basic[e.prop],n=Array.isArray(t),r=this.isSomething(t);let s="-";return r&&(n?s=t.length?t.join("|"):"-":s=t||"-"),s},formatTags(e){return Oc(Ic(e))},addToGraph(e){const t={type:"addFromAggregation",addOne:{nodes:[e],links:[{source:this.nodeInfo.relationId,target:e.id}]}};if(this.aggregationList=this.aggregationList.filter(n=>n.id!==e.id),this.history.updateAggregationNode(this.aggregationList,this.nodeInfo.id),this.history.pushState(t),this.aggregationList.length)me(Pe,"emitDataLoaded");else{const n=this.nodeInfo,r={deleteOne:{nodes:[n],links:[{source:n.relationId,target:n.id}]},type:"aggregation"};setTimeout(()=>{this.history.pushState(r),me(Pe,"emitDataLoaded")},0)}}}},Hte={key:0},Gte=["innerHTML"],Wte={key:1,class:"node-info-container"},Kte={class:"popover-block popover-header"},Yte={key:0,class:"popover-collect"},Jte={key:1,class:"row-item"},Xte={class:"label"},Qte={key:2,class:"row-item"},Zte={class:"value"},Vte={class:"node-type-info"},ene={class:"name"},tne={key:3,class:"row-item"},nne={class:"value"},rne={class:"popover-block popover-fields"},ine={key:0,class:"node-detail top-border"},one={key:0,class:"row-item"},sne=["title"],ane={key:1,class:"row-item row-item-tag"},lne={class:"value"},cne={class:"graph-tags-box"},dne={key:0,class:"row-item"},une={class:"label"},fne=["title"],hne={key:1,class:"node-statistics top-border"},pne={class:"row-item node-num"},gne={class:"value"},mne={key:0},vne={class:"danger"},yne={key:2,class:"node-aggregation"},bne={class:"aggregation-title"},wne={class:"aggregation-box"},_ne={key:2,class:"node-info-container"},Cne={class:"popover-fields"},Sne={class:"top"};function Ene(e,t,n,r,s,a){const l=o.resolveComponent("force-graph-svg-icon"),c=pn,u=ka,d=EL,f=so,p=SL;return o.openBlock(),o.createElementBlock("div",{class:o.normalizeClass(["popover-container",a.show?"show-popover":"hide-popover"]),style:o.normalizeStyle(s.position),onMouseenter:t[0]||(t[0]=(...g)=>a.handleMouseEnter&&a.handleMouseEnter(...g)),onMouseleave:t[1]||(t[1]=(...g)=>a.handleMouseLeave&&a.handleMouseLeave(...g))},[o.createElementVNode("div",null,[a.show&&n.customTooltip&&s.isFunction(n.customTooltip)?(o.openBlock(),o.createElementBlock("div",Hte,[o.createElementVNode("div",{innerHTML:n.customTooltip({nodeInfo:n.nodeInfo,data:n.data,moduleDetail:n.moduleDetail})},null,8,Gte)])):n.type==="node"?(o.openBlock(),o.createElementBlock("div",Wte,[o.createElementVNode("div",Kte,[n.nodeInfo.collect?(o.openBlock(),o.createElementBlock("div",Yte,[o.createVNode(c,{content:"已收藏","popper-class":"el-tooltip-gray",placement:"left"},{default:o.withCtx(()=>[o.createVNode(l,{class:"button-img","icon-class":e.imgPath["./public/d3svg1/star.svg"]},null,8,["icon-class"])]),_:1})])):o.createCommentVNode("",!0),a.isNormalNode?(o.openBlock(),o.createElementBlock("div",Jte,[o.createElementVNode("div",Xte,o.toDisplayString(a.getTypeZh(n.nodeInfo.type))+":",1),o.createElementVNode("div",{class:o.normalizeClass(["value",{"star-next":n.nodeInfo.collect}])},o.toDisplayString(a.name),3)])):o.createCommentVNode("",!0),a.isNodeTypeNode?(o.openBlock(),o.createElementBlock("div",Qte,[t[2]||(t[2]=o.createElementVNode("div",{class:"label"},"关系节点:",-1)),o.createElementVNode("div",Zte,[o.createElementVNode("div",Vte,[o.createElementVNode("div",ene,o.toDisplayString(n.nodeInfo.name),1)])])])):o.createCommentVNode("",!0),n.nodeInfo.label?(o.openBlock(),o.createElementBlock("div",tne,[t[3]||(t[3]=o.createElementVNode("div",{class:"label"},"备注:",-1)),o.createElementVNode("div",nne,o.toDisplayString(n.nodeInfo.label),1)])):o.createCommentVNode("",!0)]),o.createElementVNode("div",rne,[a.isNormalNode&&n.nodeInfo.detail?(o.openBlock(),o.createElementBlock("div",ine,[a.canGoDetail&&a.hasLevel?(o.openBlock(),o.createElementBlock("div",one,[t[4]||(t[4]=o.createElementVNode("div",{class:"label"},"危险级别:",-1)),o.createElementVNode("div",{class:o.normalizeClass(["value level",a.getLevelClass(n.nodeInfo.detail&&n.nodeInfo.detail.info.basic.level)]),title:n.nodeInfo.detail&&n.nodeInfo.detail.info.basic.level||"--"},o.toDisplayString(n.nodeInfo.detail&&n.nodeInfo.detail.info.basic.level||"--"),11,sne)])):o.createCommentVNode("",!0),n.nodeInfo.detail&&n.nodeInfo.detail.tags&&n.nodeInfo.detail.tags.length>0?(o.openBlock(),o.createElementBlock("div",ane,[t[7]||(t[7]=o.createElementVNode("div",{class:"label"},"标签:",-1)),o.createElementVNode("div",lne,[o.createElementVNode("div",cne,[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(a.formatTags(n.nodeInfo.detail.tags),(g,v)=>(o.openBlock(),o.createBlock(c,{key:v,"popper-class":"el-tooltip-gray"},{content:o.withCtx(()=>[o.createElementVNode("div",null,[o.createTextVNode(o.toDisplayString(g.name===g.desc?g.name:g.name+":"+g.desc)+" ",1),g.disabled?(o.openBlock(),o.createElementBlock(o.Fragment,{key:0},[t[5]||(t[5]=o.createElementVNode("br",null,null,-1)),t[6]||(t[6]=o.createTextVNode(" 标签状态:失效 "))],64)):o.createCommentVNode("",!0)])]),default:o.withCtx(()=>[o.createElementVNode("span",null,[o.createVNode(u,{class:o.normalizeClass(["graph-tag-one",`${g.type||"unknown"} ${g.disabled?"tag-disable":""}`]),type:g.type||"info"},{default:o.withCtx(()=>[o.createTextVNode(o.toDisplayString(g.name),1)]),_:2},1032,["class","type"])])]),_:2},1024))),128))])])])):o.createCommentVNode("",!0),(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(a.fieldMapThisType,(g,v)=>(o.openBlock(),o.createElementBlock(o.Fragment,null,[a.canShowField(g)?(o.openBlock(),o.createElementBlock("div",dne,[o.createElementVNode("div",une,o.toDisplayString(g.zh)+":",1),o.createElementVNode("div",{class:o.normalizeClass(["value",{red:g.prop==="virus_name"}]),title:n.nodeInfo.detail.info.basic[v]},o.toDisplayString(a.getFieldValue(g)),11,fne)])):o.createCommentVNode("",!0)],64))),256))])):o.createCommentVNode("",!0),a.isNodeTypeNode?(o.openBlock(),o.createElementBlock("div",hne,[o.createElementVNode("div",pne,[t[9]||(t[9]=o.createElementVNode("div",{class:"label"},"拓展节点统计:",-1)),o.createElementVNode("div",gne,[a.getNodeTypeChildNum(n.nodeInfo.id).dangerChildNum>0?(o.openBlock(),o.createElementBlock("span",mne,[o.createElementVNode("span",vne,o.toDisplayString(a.getNodeTypeChildNum(n.nodeInfo.id).dangerChildNum),1),t[8]||(t[8]=o.createTextVNode("/"))])):o.createCommentVNode("",!0),o.createTextVNode(o.toDisplayString(a.getNodeTypeChildNum(n.nodeInfo.id).allChildNum),1)])])])):o.createCommentVNode("",!0),a.isAggregateNode?(o.openBlock(),o.createElementBlock("div",yne,[o.createElementVNode("div",bne,"聚合节点 ("+o.toDisplayString(s.aggregationList.length)+"个)",1),o.createElementVNode("div",wne,[o.createVNode(p,{data:s.aggregationList,style:{width:"100%"}},{default:o.withCtx(()=>[o.createVNode(d,{prop:"name","min-width":"200",label:"名称"}),o.createVNode(d,{sortable:"",prop:"type",label:"类型"}),o.createVNode(d,{sortable:"",prop:"level",width:"80",label:"级别"},{default:o.withCtx(g=>[o.createElementVNode("span",{style:o.normalizeStyle({color:a.getColorStyle(g.row.level)})},o.toDisplayString(g.row.level||"--"),5)]),_:1}),o.createVNode(d,{label:"操作"},{default:o.withCtx(g=>[o.createVNode(f,{class:"add-to-graph-btn",type:"primary",text:"",size:"small",onClick:v=>a.addToGraph(g.row)},{default:o.withCtx(()=>t[10]||(t[10]=[o.createTextVNode(" 添加到图谱 ")])),_:2},1032,["onClick"])]),_:1})]),_:1},8,["data"])])])):o.createCommentVNode("",!0)])])):(o.openBlock(),o.createElementBlock("div",_ne,[o.createElementVNode("div",Cne,[o.createElementVNode("div",Sne,o.toDisplayString(n.nodeInfo.apiName),1)])]))])],38)}const xne=xt(qte,[["render",Ene],["__scopeId","data-v-194a65c9"]]),kne=[{id:52,product_id:0,name:"copy",namec:"复制",parent_id:0,has_child:0,status:0,type:2,path:"0-52",pos:65,ctime:"0000-00-00 00:00:00",utime:"2019-06-04 16:49:38",children:[]},{id:62,product_id:0,name:"release_aggregation",namec:"释放聚合顶点",parent_id:0,has_child:0,status:0,is_sys:0,is_detail:0,type:2,path:"0-62",pos:1,ctime:"0000-00-00 00:00:00",utime:"2019-05-06 15:08:10",children:[]}],y0={name:"vue-safe-force-graph",version:"2.0.75",description:"force_graph in security area",author:"jason zhang",module:"./lib/vue-safe-force-graph.js",main:"./lib/vue-safe-force-graph.umd.cjs",type:"module",files:["/lib/"],exports:{".":{import:"./lib/vue-safe-force-graph.js",require:"./lib/vue-safe-force-graph.umd.cjs"},"./*":"./*"},scripts:{dev:"vite","dev:base64":"vite --mode development_base64",lib:"vite build","lib:base64":"vite build --mode production_base64","lib:webcomponent":"vite build --mode web_component",patch:'npm version patch -m "Upgrade to %s "',"patch:base64":'npm version patch -m "Upgrade to %s for base64"',p:"npm run patch && npm run lib && npm run lib:webcomponent && npm publish","p:base64":"npm run patch:base64 && npm run lib:base64 && npm publish",lint:"eslint --ext .js,.vue src",lintFix:"eslint --fix --ext .js,.vue src",imageToCdn:"node qcdn.cjs",imageToBase64:"node qcdn.cjs --buildtype=base64",changelog:"conventional-changelog -p angular -i CHANGELOG.md -s -r 0"},dependencies:{"@element-plus/icons-vue":"^2.1.0","@q/qapm":"^1.1.7","csv-parse":"^5.0.4",d3:"^7.8.5","d3-lasso":"0.0.5","element-plus":"^2.8.8",json2csv:"^5.0.7",konva:"^9.2.0","lodash-es":"^4.17.21","mime-types":"^2.1.35",minimist:"^1.2.6","radar-js-analytic-sdk":"^2.2.6",vue:"^3.5.3","vue-clipboard3":"^2.0.0","vue-router":"^4.1.6","vue-virtual-scroller":"^2.0.0-beta.8"},devDependencies:{"@babel/core":"^7.23.3","@babel/preset-env":"^7.23.3","@originjs/vite-plugin-commonjs":"^1.0.3","@q/qcdn":"^3.2.4","@vitejs/plugin-vue":"^4.1.0",axios:"^0.21.1","babel-eslint":"^10.1.0",eslint:"^7.32.0","eslint-plugin-vue":"^8.0.3",imageinfo:"^1.0.4",qs:"^6.10.1","rollup-plugin-visualizer":"^5.9.0",sass:"^1.62.0","unplugin-auto-import":"^0.15.2","unplugin-element-plus":"^0.8.0","unplugin-vue-components":"^0.24.1",vite:"^4.3.1"},browserslist:["> 1%","last 2 versions"],engines:{node:">=8.9",npm:">= 3.0.0"},license:"MIT"},mae="",{toClipboard:Nne}=Bc(),Tne="Arial,Helvetica Neue,Helvetica,PingFang SC,Hiragino Sans GB,Microsoft YaHei,sans-serif",Lr=1,Ane=["ip","intranet","internet"],b0=20,Yt={},One={name:"ForceGraphRenderByCanvas",components:{Popover:xne,NodeContextmenu:jte},mixins:[kr],provide:function(){return{levelList:this.levelList}},props:{data:{type:Object,default:()=>({nodes:[],links:[]})},history:{type:Object,default:()=>({})},linkDistance:{type:Number,default:120},strength:{type:Number,default:-600},isThreatPath:{type:Boolean,default:!1},requestGraphData:{type:Boolean,default:!1},moduleDetail:{type:Object,default:()=>{}},graphApi:{type:Object,default:()=>{}},alphaDecay:{type:Number,default:.0228},alphaMin:{type:Number,default:.001},darkMode:{type:Boolean,default:!0},levelList:{type:Array,default:()=>[{level:"未知",levelName:"未知",className:"unknown",normalColor:"#666",darkColor:"#c6cdd5",dangerNumber:0},{level:"危险",levelName:"危险",className:"warn",normalColor:"#CF1322",darkColor:"#fb2400",dangerNumber:1},{level:"普通",levelName:"普通",className:"normal",normalColor:"#007EE2",darkColor:"#0094ff",dangerNumber:-1},{level:"安全",levelName:"安全",className:"safe",normalColor:"#009A75",darkColor:"#00da90",dangerNumber:-2}]},nodeWidth:{type:Number},startNodeWidth:{type:Number},nodeTypeScale:{type:Number,default:1},nodeTypeList:{type:Array,default:()=>[]},manualTickNumber:{type:Number,default:500},startNodeAnimation:{type:Boolean,default:!0},customTooltip:{type:Function},enableScript:{type:Boolean,default:!1},edgeLabelMaxLength:{type:Number,default:10},customNodeImages:{type:Object,default:()=>{}}},emits:["handle-select-node","custom-contextmenu-click","flagFiles","updateSelection"],data(){return{prefix:"./public/",iconAllLoaded:!1,customIconLoaded:!1,iconSize:{},iconFiles:{},flagFiles:{},highlightRule:{},nodesRange:null,mousePosition:{left:0,top:0},hoverNodePosition:{},uniqueClass:"",showPopover:!1,popoverTimer:null,popoverType:"",popoverContent:{},popoverNode:{},showContextMenu:!1,contextMenuNode:{},menuOptions:[],isDragging:!1,originTransform:null,dragNodeFix:!1,destroyed:!1,actKey:rs()?"metaKey":"ctrlKey",levelHeight:100,actNum:0,scriptNow:null,scriptInited:!1,canAct:!1,isKeyUp:!0,initTimes:0,resizeObserver:null,canvasElement:null,stage:o.shallowRef(null),layer:o.shallowRef(null),nodesGroup:o.shallowRef({}),linksGroup:o.shallowRef({}),grab:o.shallowRef(null),simulation:o.shallowRef(null),nodes:o.shallowRef(null),links:o.shallowRef(null),hoveredNode:o.shallowRef(null),mouseDownNode:o.shallowRef(null),selectionRect:null,selection:[],scale:Lr,mousedownPos:null,mousedownNode:null,mouseupNode:null,dragLine:null,darkBgRect:null,inited:!1,hasSimulation:!1,nodesLength:0,ticking:!1,anim1:null,anim2:null,anim3:null}},computed:{isAutoTick(){var e;return((e=this.nodes)==null?void 0:e.length)<this.manualTickNumber},iconSizeComputed(){const e=Hr(this.iconSize);return this.nodeTypeList.forEach(t=>{e[t]=this.iconSize[t]*this.nodeTypeScale}),e},contextMenuNodes(){return this.contextMenuNode.id?this.selection.some(e=>e.id===this.contextMenuNode.id)?[...this.selection]:[this.contextMenuNode]:[]},showContextMenuFlag(){return this.requestGraphData?this.showContextMenu:!1}},watch:{data:{handler:function(){const e=this.nodesLength!==this.data.nodes.length;this.nodes=this.data.nodes,this.links=this.data.links,this.nodesLength=this.data.nodes.length,this.update(e)},deep:!0},moduleDetail:{handler:function(e){return ke(this,null,function*(){e!=null&&e.nodes&&!this.iconAllLoaded&&!this.customIconLoaded&&(yield this.loadCustomIcon(),yield this.loadIcons(),this.initForceGraph(),setTimeout(()=>{this.update()},50))})},deep:!0,immediate:!0},darkMode:{handler:function(e){return ke(this,null,function*(){const t=e?"dark":"light";setTimeout(()=>{this.update();const n=document.querySelectorAll(`.${this.uniqueClass}.render-container`);n!=null&&n.length&&(this.isThreatPath?n[0].setAttribute("data-theme",t):(n[0].setAttribute("data-theme",t),document.getElementsByClassName(this.uniqueClass+" render-container")[0].parentElement.parentElement.setAttribute("data-theme",t)))},200)})},immediate:!0}},created(){Qr.setProject("QH_10542_1724").getTrack(),console.log("组件版本: "+(y0==null?void 0:y0.version)),this.isThreatPath||this.initKeyEvent(),this.uniqueClass="unique"+new Date().getTime()+Math.floor(Math.random()*1e5)},mounted(){return ke(this,null,function*(){new gte({appKey:"fe-force-graph",ratio:50}),this.initForceGraph(),TD(this.levelList),!this.isThreatPath&&(Ei(Pe,"buttonClick",e=>{mn(e,"buttonClick msg"),this.handleContextMenuClick(e)}),Ei(Pe,"relationClick",e=>{this.handleContextMenuClick(e)}),Ei(Pe,"sendNodesRange",(e,t)=>{e!==void 0&&(this.nodesRange=e,this.updateNodeStyle())}))})},beforeUnmount(){xi(Pe,"buttonClick"),xi(Pe,"relationClick"),xi(Pe,"sendNodesRange"),this.unbindKeyEvent(),this.resetAll(),mn("destroy")},methods:{initForceGraph(){return ke(this,null,function*(){if(this.inited)return;const e=this.$refs.canvasContainer;let t=e.clientWidth,n=e.clientHeight;this.resizeObserver=new ResizeObserver(s=>{for(const a of s){if(t=a.contentRect.width,n=a.contentRect.height,mn(`新宽度: ${t}px, 新高度: ${n}px`),t===0||n===0)return;this.stage.width(t),this.stage.height(n),this.layer&&this.layer.batchDraw(),this.hasSimulation&&this.updateSimulation()}}),this.resizeObserver.observe(e),document.addEventListener("click",this.hideContextMenu,!1),this.nodes=this.data.nodes,this.links=this.data.links,this.stage=new tt.Stage({container:e,width:t,height:n,scaleX:Lr,scaleY:Lr}),this.layer=new tt.Layer,this.grab=new tt.Group({id:"grab",x:0,y:0}),this.layer.add(this.grab);const r=this.layer.getCanvas()._canvas;this.canvasElement=r,this.stage.on("mousemove",s=>{if(!this.mousedownNode||!s.evt[this.actKey]){if(this.resetMouseVars(),this.selectionRect&&s.evt.altKey){const a=this.stage.getPointerPosition(),l=(a.x-this.stage.x())/this.scale,c=(a.y-this.stage.y())/this.scale,u=l-this.selectionRect.x(),d=c-this.selectionRect.y();this.selectionRect.width(u),this.selectionRect.height(d),this.stage.batchDraw()}}else{const a=this.stage.getPointerPosition(),l=this.stage.scaleX(),c=(a.x-this.stage.x())/l,u=(a.y-this.stage.y())/l;this.dragLine.points([this.mousedownPos.x,this.mousedownPos.y,c,u]),this.layer.batchDraw()}}),this.stage.on("wheel",s=>{s.evt.preventDefault();const a=1.1,l=this.scale,c=s.evt.deltaY<0?l*a:l/a;this.scale=c;const u=this.stage.getPointerPosition(),d=this.stage.position(),f=u.x-(u.x-d.x)*(c/l),p=u.y-(u.y-d.y)*(c/l);this.stage.setAttrs({scaleX:c,scaleY:c,x:f,y:p}),this.layer.batchDraw()}),this.stage.on("mousedown",s=>{const a=s.target;if(a&&a.nodeType==="Stage"?this.stage.setDraggable(!0):this.stage.setDraggable(!1),s.evt.altKey){this.stage.setDraggable(!1);const l=this.stage.scaleX(),c=this.stage.getPointerPosition(),u=(c.x-this.stage.x())/l,d=(c.y-this.stage.y())/l;this.selectionRect=new tt.Rect({x:u,y:d,width:0,height:0,stroke:"rgb(80, 80, 80)",strokeWidth:2}),this.layer.add(this.selectionRect),this.stage.batchDraw()}}),this.stage.on("mouseup",s=>{if(this.stage.setDraggable(!1),this.selectionRect&&s.evt.altKey){const a=this.selectionRect.x(),l=this.selectionRect.y(),c=this.selectionRect.width(),u=this.selectionRect.height();this.selection=this.nodes.filter(d=>{const f={x:d.x,y:d.y},p=Math.min(a,a+c),g=Math.max(a,a+c),v=Math.min(l,l+u),b=Math.max(l,l+u);return f.x>=p&&f.x<=g&&f.y>=v&&f.y<=b}),this.updateSelection(),this.selectionRect.destroy(),this.selectionRect=null}}),this.stage.on("contextmenu",this.handleGlobalContextMenu),this.stage.on("click",s=>{s.target&&s.target.nodeType==="Stage"&&this.handleDeselectNode(s)}),this.setSimulation(),this.stage.add(this.layer),this.stage.draw(),this.update(),this.inited=!0})},setSimulation(){var n;if(this.hasSimulation||!((n=this.nodes)!=null&&n.length))return;const e=this.stage.width()/(2*Lr),t=this.stage.height()/(2*Lr);this.hasSimulation=!0,this.simulation=lG(this.nodes).force("link",KH(this.links).id(r=>r.id).distance(this.linkDistance).strength(1)).force("charge",cG().strength(this.strength)).force("x",dG()).force("y",uG()).force("center",S_(e,t)).alphaDecay(this.alphaDecay).alphaMin(this.alphaMin).stop(),this.nodeWidth&&this.simulation.force("collision",GH().radius(this.nodeWidth/2)),this.isAutoTick?(this.simulation.alpha(1).restart(),this.simulation.on("tick",this.ticked)):(this.simulation.on("tick",null),this.sendManualTick()),this.simulation.on("end",()=>{mn("simulation end time",Date.now()),this.isThreatPath&&this.centerAndZoom(1)})},sendManualTick(){var e;mn("sendManualTick",(e=this.nodes)==null?void 0:e.length),!this.ticking&&(this.ticking=!0,this.doClearCanvas(),this.simulation.alphaDecay(this.alphaDecay*2),this.simulation.alphaMin(this.alphaMin*5),this.simulation.alpha(1).restart(),setTimeout(()=>{console.time("tick");for(let t=0,n=Math.ceil(Math.log(this.simulation.alphaMin())/Math.log(1-this.simulation.alphaDecay()));t<n;++t)mn("tick"),this.simulation.tick();console.timeEnd("tick"),this.ticking=!1,this.update(),this.centerAndZoom()},1e3))},update(e=!1){return ke(this,null,function*(){var t,n,r;!this.iconAllLoaded&&((n=(t=this.moduleDetail)==null?void 0:t.nodes)!=null&&n.length)&&!this.customIconLoaded&&(yield this.loadIcons(),yield this.loadCustomIcon()),!this.destroyed&&(r=this.nodes)!=null&&r.length&&(this.initScript(),mn("update"),e&&this.updateSimulation(),this.doClearCanvas(),this.paintLinks(),this.paintNodes(),this.updateSelection(),this.ticked(),this.actNum===9&&setTimeout(()=>{this.centerAndZoom(.8)},200))})},doClearCanvas(){this.nodesGroup={},this.linksGroup={},this.layer.destroyChildren(),this.grab=new tt.Group({id:"grab",x:0,y:0}),this.layer.add(this.grab)},paintNodes(){const e=this.stage.width()/2,t=this.stage.height()/2,n=this.selection.map(r=>r.id);this.nodes.forEach(r=>ke(this,null,function*(){var _,C,N,S,E,k,A,O,I,z,P,M,K,j,Q,H,L,U,q,W,D,ae,re;const s=(C=(_=r.detail)==null?void 0:_.info)==null?void 0:C.icon_img;let a;r.type==="nodeType"?a=this.iconSizeComputed[r.icon]||this.iconSizeComputed.node_type:a=this.iconSize[r.icon]||this.iconSize[r.type]||24,r.startNode&&this.startNodeWidth&&(a=this.startNodeWidth);const l=((E=(S=(N=r==null?void 0:r.detail)==null?void 0:N.info)==null?void 0:S.basic)==null?void 0:E.level)||"",c=(O=(A=(k=r==null?void 0:r.detail)==null?void 0:k.info)==null?void 0:A.basic)==null?void 0:O.flag;let u;try{u=yield this.getNodeImage(r)}catch(Y){console.log(Y)}this.nodesGroup[r.id]&&((I=this.nodesGroup[r.id])==null||I.destroy());const d=new tt.Group({name:"nodeGroup",opacity:1,id:`${r.id}`,x:r.x?r.x:e,y:r.y?r.y:t,draggable:!0,visible:r.show});if(n.includes(r.id)&&d.addName("isSelected"),r.startNode&&this.startNodeAnimation){const Y=fo(l,this.levelList,this.darkMode),J=new tt.Circle({x:0,y:0,radius:20,fill:Y,opacity:0}),se=new tt.Circle({x:0,y:0,radius:20,fill:Y,opacity:0}),ie=new tt.Circle({x:0,y:0,radius:20,fill:Y,opacity:0});d.add(J),d.add(se),d.add(ie);const F=(G,ee)=>new tt.Animation(function(le){const ue=le.time;if(ue%ee/ee===0)return!1;const ye=.5-.5*(ue%ee)/ee,Ce=40*(ue%ee)/ee;G.radius(Ce||0),G.opacity(ye)},this.layer);(z=this.anim1)==null||z.stop(),(P=this.anim2)==null||P.stop(),(M=this.anim3)==null||M.stop(),this.anim1=F(J,1500),this.anim2=F(se,1500),this.anim3=F(ie,1500),(K=this.anim1)==null||K.start(),setTimeout(()=>{this.anim2.start()},500),setTimeout(()=>{this.anim3.start()},1e3)}else if(r.startNode&&!this.startNodeAnimation){const Y=fo(l,this.levelList,this.darkMode),J=new tt.Circle({x:0,y:0,radius:20,fill:Y,opacity:this.startNodeAnimation?0:.3});d.add(J)}if(!s&&(r.type==="ip"||r.type==="internet"||r.type==="country"||r.type==="target_country")){const Y=fo(l,this.levelList,this.darkMode),J=new tt.Circle({x:0,y:0,fill:this.darkMode?"#182628":"#fff",radius:a/2,stroke:Y,strokeWidth:2});d.add(J)}if(u){const Y=c||(Q=(j=r==null?void 0:r.detail)==null?void 0:j.info)!=null&&Q.inner_country?20:a,J=u&&new tt.Image({x:0,y:0,offsetX:Y/2,offsetY:Y/2,image:u,width:Y,height:Y,draggable:!1});d.add(J)}if(!s&&r.detail&&r.type==="md5"){const Y=((U=(L=(H=r.detail.info)==null?void 0:H.basic)==null?void 0:L.file_type)==null?void 0:U.toUpperCase())||"MD5",J=new tt.Text({name:"md5Text",x:0,y:0,text:Y,fontSize:4,fontWeight:700,fontFamily:Tne,fill:this.darkMode?"#182628":"#fff",align:"center",listening:!1});J.x(J.x()-J.width()/2),d.add(J)}const f=r.textProp||"name",p=f==="name"?((W=(q=r==null?void 0:r.detail)==null?void 0:q.info)==null?void 0:W.name)||r.name:r[f];let g=(p==null?void 0:p.length)>14&&!Ane.includes(r.type)?p.slice(0,7)+"..."+p.slice(-7):p;g=MD(g);const v=new tt.Text({offsetY:a/2,name:"konvaText",x:0,y:a+8,text:g,fontSize:12,fontFamily:"Calibri",fill:this.darkMode?"#cdd9da":"#000",align:"center",listening:!1,visible:!!r.textProp});v.x(v.x()-v.width()/2),d.add(v);const b=new tt.Circle({name:"border",x:0,y:0,radius:a/2,fill:"#5c6271",opacity:.4,visible:!1});if(d.add(b),(ae=(D=r.detail)==null?void 0:D.tags)!=null&&ae.length){const Y=new tt.Circle({x:((a/2||14)+5)*Math.sin(60*Math.PI/180),y:-((a/2||14)+5)*Math.cos(60*Math.PI/180),radius:3,fill:"#9300ff",listening:!1});d.add(Y)}if(r.type!=="nodeType"&&r.type!=="aggregation"){var w=new tt.Circle({name:"collect",x:((a/2||14)+5)*Math.sin(0*Math.PI/180),y:-((a/2||14)+5)*Math.cos(0*Math.PI/180),radius:3,fill:"#ffad00",visible:!!r.collect});d.add(w)}if(r.label){const Y=new tt.Circle({x:((a/2||14)+5)*Math.sin(30*Math.PI/180),y:-((a/2||14)+5)*Math.cos(30*Math.PI/180),radius:3,fill:"#0099ff",listening:!1});d.add(Y)}if(r.type==="nodeType"&&r.showTotal){const Y=(a/2||14)+5,J=70*Math.PI/180,se=Y*Math.sin(J),ie=-Y*Math.cos(J),F=new tt.Circle({x:se,y:ie,radius:10,fill:"#1890ff",stroke:"white",strokeWidth:2,listening:!1});d.add(F);const G=new tt.Text({x:se,y:ie,text:`${((re=r==null?void 0:r.children)==null?void 0:re.length)||0}`,fontSize:10,fontFamily:"Calibri",fill:"#fff",align:"center",verticalAlign:"middle",listening:!1});G.offsetX(G.width()/2),G.offsetY(G.height()/2),d.add(G)}d.on("dragstart",(Y,J)=>{Y.evt&&Y.evt[this.actKey]||(this.isAutoTick&&this.simulation.alphaTarget(.3).restart(),this.isDragging=!0)}),d.on("dragmove",Y=>{if(!(Y.evt&&Y.evt[this.actKey])){var J=this.simulation.nodes().find(se=>se.id===r.id);J&&(J.x=d.x(),J.fx=d.x(),J.y=d.y(),J.fy=d.y(),this.links.forEach(se=>{const ie=this.linksGroup[`${se.source.id}-${se.target.id}`],F=ie==null?void 0:ie.findOne(".konvaLine"),G=ie==null?void 0:ie.findOne(".linkArrow"),ee=ie==null?void 0:ie.findOne(".edgeLabel");let le,ue,ve,ye;if(se.source.id===J.id){if(!this.nodesGroup[se.target.id])return;le=J.x,ue=this.nodesGroup[se.target.id].x(),ve=J.y,ye=this.nodesGroup[se.target.id].y(),F.points([le,ve,ue,ye]);const Ce=Rh(le,ve,ue,ye,b0);G==null||G.x(Ce==null?void 0:Ce.x),G==null||G.y(Ce==null?void 0:Ce.y),G==null||G.rotation(Math.atan2(ye-ve,ue-le)*(180/Math.PI))}else if(se.target.id===J.id){if(!this.nodesGroup[se.source.id])return;le=this.nodesGroup[se.source.id].x()||0,ue=J.x||0,ve=this.nodesGroup[se.source.id].y()||0,ye=J.y||0,F.points([le,ve,ue,ye]);const Ce=Rh(le,ve,ue,ye,b0);G==null||G.x(Ce==null?void 0:Ce.x),G==null||G.y(Ce==null?void 0:Ce.y),G==null||G.rotation(Math.atan2(ye-ve,ue-le)*(180/Math.PI))}if(ee&&(se.source.id===J.id||se.target.id===J.id)){ee.x((le+ue)/2),ee.y((ve+ye)/2),ee.offsetX(ee.getWidth()/2||0),ee.offsetY(ee.getHeight()/2+8||0);const Ce=Math.atan2(ye-ve,ue-le)*(180/Math.PI);ue<le?ee.rotation(Ce+180):ee.rotation(Ce)}}),this.layer.batchDraw())}}),d.on("dragend",Y=>{Y.evt&&Y.evt[this.actKey]||(this.isAutoTick&&this.simulation.alphaTarget(0),this.isDragging=!1)}),d.on("click",Y=>{Y.evt.detail===2?this.expandNodes(Y,r):Y.evt.detail===1&&Y.evt.button===0&&this.handleNodeClick(Y,r)}),d.on("contextmenu",Y=>{Y.cancelBubble=!0,Y.evt.preventDefault(),Y.evt.stopPropagation(),this.handleNodeContextMenu(Y,r,d)}),d.on("mouseup",Y=>this.handleNodeMouseUp(Y,r)),d.on("mousedown",Y=>this.handleNodeMouseDown(Y,r)),d.on("mouseenter",Y=>this.handleNodeMouseEnter(Y,r)),d.on("mouseleave",Y=>this.handleNodeMouseLeave(Y,r)),this.grab.add(d),this.nodesGroup[r.id]=d})),this.stage.batchDraw()},paintLinks(){const e=this.stage.width()/2,t=this.stage.height()/2;this.links.forEach(n=>{this.linksGroup[`${n.source.id}-${n.target.id}`]&&this.linksGroup[`${n.source.id}-${n.target.id}`].destroy();const r=new tt.Group({opacity:1,id:`${n.source.id}-${n.target.id}`,visible:n.source.show&&n.target.show}),s=this.darkMode?"#445152":"#999",a=new tt.Arrow({name:"linkArrow",pointerLength:10,pointerWidth:10,x:e,y:t,fill:s});r.add(a);const l=n.source.x||0,c=n.source.y||0,u=n.target.x||0,d=n.target.y||0,f=new tt.Line({name:"konvaLine",id:`${n.source.id}-${n.target.id}`,points:[l,c,u,d],stroke:n.target.type==="org"?"#cf1322":s,strokeWidth:1,dash:n.diy===!0?[5,5]:null});if(n.edgeLabelProp){const p=n.edgeLabelProp.length>this.edgeLabelMaxLength?n.edgeLabelProp.substring(0,this.edgeLabelMaxLength)+"...":n.edgeLabelProp,g=new tt.Text({name:"edgeLabel customEdgeLabel",x:(l+u)/2,y:(c+d)/2,text:p,fontSize:12,fill:this.darkMode?"#cdd9da":"#000"});r.add(g)}if(n.target.type==="nodeType"){const p=n.target.relay_name||n.target.name,g=new tt.Text({name:"edgeLabel",x:(l+u)/2,y:(c+d)/2,text:p,fontSize:12,fill:this.darkMode?"#cdd9da":"#000"});r.add(g)}r.add(f),r.on("mouseenter",p=>this.handleLinkMouseEnter(p,n)),r.on("mouseleave",p=>this.handleLinkMouseLeave(p,n)),this.grab.add(r),r.moveToBottom(),this.linksGroup[`${n.source.id}-${n.target.id}`]=r}),this.stage.batchDraw()},updateSimulation(){var e,t;try{if(!this.simulation&&!this.hasSimulation){this.setSimulation();return}this.simulation.nodes(this.nodes),this.simulation.force("link").links(this.links),this.simulation.alpha(.4).restart(),this.history.layoutIndex===0?((e=this.nodes)==null?void 0:e.length)<this.manualTickNumber?this.simulation.on("tick",this.ticked):(this.simulation.on("tick",null),this.sendManualTick()):this.simulation.on("tick",this.ticked)}catch(n){console.log(n,"simulation-e1"),(t=this.simulation)==null||t.stop()}},ticked(){switch(mn("ticked"),this.history.layoutIndex){case 0:this.forceLayout();break;case 1:this.treeLayout();break;default:this.forceLayout();break}},forceLayout(){var t;if(!this.nodes.length||!this.links.length)return;let e=!0;for(let n=0;n<this.links.length;n++){const r=this.links[n],s=this.linksGroup[`${r.source.id}-${r.target.id}`],a=s==null?void 0:s.findOne(".konvaLine"),l=s==null?void 0:s.findOne(".linkArrow"),c=s==null?void 0:s.findOne(".edgeLabel");let u=r.source.x,d=r.source.y,f=r.target.x,p=r.target.y;const g=f-u||1,v=p-d||1,b=Math.sqrt(g*g+v*v),w=g/b||1,_=v/b||1,C=r.source.type==="nodeType"?(this.iconSizeComputed[r.source.icon]||14)/2-1:(this.iconSize[r.target.type]||14)/2-1,N=r.target.type==="nodeType"?(this.iconSizeComputed[r.target.icon]||14)/2-1:(this.iconSize[r.target.type]||14)/2-1;if(u=u+C*w,d=d+C*_,f=f-N*w,p=p-N*_,isNaN(u)||isNaN(d)||isNaN(f)||isNaN(p)){e=!1;break}if(a==null||a.points([u,d,f,p]),l){const S=Rh(u,d,f,p,b0);l==null||l.x((S==null?void 0:S.x)||0),l==null||l.y((S==null?void 0:S.y)||0),l==null||l.rotation(Math.atan2(p-d,f-u)*(180/Math.PI))}if(c){c.x((u+f)/2),c.y((d+p)/2),c.offsetX(c.getWidth()/2||0),c.offsetY(c.getHeight()/2+8||0);const S=Math.atan2(p-d,f-u)*(180/Math.PI);f<u?c.rotation(S+180):c.rotation(S)}}if(!e){mn("请点击自动布局按钮"),this.resetLayout();return}for(let n=0;n<this.nodes.length;n++){const r=this.nodes[n];(t=this.nodesGroup[r.id])==null||t.position({x:r.x||0,y:r.y||0})}},selectEdgesByNode(e){const t=e.map(n=>n.id);this.links.forEach(n=>{const r=this.linksGroup[`${n.source.id}-${n.target.id}`];t.includes(n==null?void 0:n.target.id)||t.includes(n==null?void 0:n.source.id)?r==null||r.addName("isSelected"):r==null||r.removeName("isSelected")})},showKeyWay(e){if(e.length!==1){this.links.forEach(r=>{const s=this.linksGroup[`${r.source.id}-${r.target.id}`];s==null||s.removeName("keyed")}),this.history.resetKeyLinksAndNodes();return}const{keyLinks:t,keyNodeIds:n}=this.history.findKeyLinksAndNodes(e[0].id,!0);this.links.forEach(r=>{const s=t.find(l=>l.source.id===r.source.id&&l.target.id===r.target.id),a=this.linksGroup[`${r.source.id}-${r.target.id}`];s?a==null||a.addName("keyed"):a==null||a.removeName("keyed")}),this.nodes.forEach(r=>{const s=this.nodesGroup[r.id];n.includes(r.id)?s==null||s.addName("keyed"):s==null||s.removeName("keyed")})},updateNodeStyle(){if(!this.iconAllLoaded)return;let e;this.nodesRange&&this.history.keyNodeIds?e=[...this.nodesRange.map(t=>t.id),...this.history.keyNodeIds]:this.nodesRange?e=this.nodesRange.map(t=>t.id):this.history.keyNodeIds&&(e=this.history.keyNodeIds),setTimeout(()=>{this.highlightByRule(this.highlightRule,e),this.updateNodesStyleByName(),this.updateLinksStyleByName()},0)},updateNodesStyleByName(){this.nodes.forEach(e=>{const t=this.nodesGroup[e.id];if(!t)return;const n=t==null?void 0:t.findOne(".border"),r=t==null?void 0:t.findOne(".konvaText"),s=this.darkMode?"#cdd9da":"#000";t!=null&&t.hasName("lowlight")?t==null||t.opacity(.4):t==null||t.opacity(1),t!=null&&t.hasName("isSelected")?(t.scale({x:8/7,y:8/7}),n==null||n.visible(!0)):(t.scale({x:1,y:1}),n==null||n.visible(!1)),e.type!=="nodeType"&&(t!=null&&t.hasName("isSelected")?(r==null||r.visible(!0),r==null||r.fill("#007ee2")):(r==null||r.visible(!!e.textProp),r==null||r.fill(s)))}),this.layer.batchDraw()},updateLinksStyleByName(){this.links.forEach(e=>{const t=this.linksGroup[`${e.source.id}-${e.target.id}`];if(!t)return;const n=t.findOne(".konvaLine"),r=t.findOne(".edgeLabel"),s=t.findOne(".linkArrow");t!=null&&t.hasName("lowlight")?t==null||t.opacity(.4):t==null||t.opacity(1);const a=this.darkMode?"#445152":"#999";if(t.hasName("isSelected")||t.hasName("keyed")){const l=e.target.type==="org"?"#cf1322":"#007ee2";n.stroke(l),s.fill(l),n.strokeWidth(1),t==null||t.opacity(1),r==null||r.fill("#007ee2"),t.hasName("keyed")?n.strokeWidth(3):n.strokeWidth(1)}else{const l=e.target.type==="org"?"#cf1322":a;this.linksGroup[`${e.source.id}-${e.target.id}`].removeName("isSelected"),n.strokeWidth(1),n.stroke(l),s.fill(l),r==null||r.fill(this.darkMode?"#cdd9da":"#000")}}),this.layer.batchDraw()},handleTableSelect(e=[]){this.selection=this.nodes.filter(t=>{let n;return e.length>1?n=e.indexOf(t.id)>=0&&t.type!=="nodeType"&&t.type!=="aggregation":n=e.indexOf(t.id)>=0,n}),this.updateSelection()},resetAll(){var e,t;document.removeEventListener("click",this.hideContextMenu),(e=this.simulation)==null||e.stop(),this.simulation=null,this.hasSimulation=!1,this.mousedownNode=null,this.mousedownPos=null,this.mouseupNode=null,this.$refs.canvasContainer&&((t=this.resizeObserver)==null||t.unobserve(this.$refs.canvasContainer)),this.nodes=[],this.links=[],this.resizeObserver=null,this.destroyed=!0,this.history.destroy&&this.history.destroy()},unbindKeyEvent(){this.initKeyEvent(1)},initKeyEvent(e=0){if(e){document.removeEventListener("keydown",this.keyDown),document.removeEventListener("keyup",this.keyUp);return}document.addEventListener("keydown",this.keyDown),document.addEventListener("keyup",this.keyUp),this.isKeyUp=!0},keyDown(e){const t=e.keyCode,n=e[this.actKey],r=e.shiftKey;if(this.isKeyUp)switch(t){case 17:break;case 16:this.toggleZoom(!1);break;case 38:break;case 40:this.goAction();break;case 67:if(window.getSelection().toString())return;n&&this.copyNodeText(this.selection);break;case 89:n&&!rs()&&this.$parent.historyForward();break;case 90:n&&r?this.$parent.historyForward():n&&this.$parent.historyBack();break;case 46:this.$parent.deleteNodes(this.selection);break}},keyUp(e){const t=e.keyCode,n=e.keyCode;if(rs())switch(n){case 17:break;case 16:this.toggleZoom(!0);break}else switch(t){case 17:break;case 16:this.toggleZoom(!0);break}this.isKeyUp=!0},initScript(){var r,s,a,l,c,u;if(!this.enableScript||this.scriptInited)return;((a=(s=(r=this.history)==null?void 0:r.dataNow)==null?void 0:s.nodes)==null?void 0:a.length)>0&&(this.scriptInited=!0);const e=["193.36.119.50","6cd7b91212983cc557c6e3e671734ff9"];let t=null;if((u=(c=(l=this.history)==null?void 0:l.dataNow)==null?void 0:c.nodes)==null||u.some(d=>{const f=e.indexOf(d.id);return f>=0&&d.startNode===!0&&(t=f),!0}),t===null)return;const n=[[{node:"193.36.119.50"},{node:"6cd7b91212983cc557c6e3e671734ff9"},{node:"http://9d1109ab.privatedns.org/download/FirefoxSetup.dll"},{node:"94.237.81.57"},{node:"chart.expocasheuro.com"}],[{node:"6cd7b91212983cc557c6e3e671734ff9"},{node:"http://9d1109ab.privatedns.org/download/FirefoxSetup.dll"},{node:"94.237.81.57"},{node:"chart.expocasheuro.com"},{node:"183.246.177.59"},{node:"e7db5b09a39e324d36e937d89f98fdb9122cd859"}]];this.scriptNow=n[t],this.canAct=!!this.scriptNow},goAction(){if(!this.scriptNow||this.actNum>(this.scriptNow.length-1)*2)return;if(this.actNum===(this.scriptNow.length-1)*2){this.centerAndZoom(),this.actNum++;return}const e=this.scriptNow[Math.floor(this.actNum/2)+1];if(this.actNum%2===0){if(!this.history.dataNow.nodes.some(t=>t.id===e.node))return;this.handleTableSelect(e.node),this.nodesMoveToCenterView([e.node]),this.actNum++}else this.$parent.expandNodes(this.selection[0]),setTimeout(()=>{this.nodesMoveToCenterView([this.selection[0].id])},100),this.actNum++},nodesMoveToCenterView(e,t=.9){if(e.length===0)return;const n=[],r=this.nodes.filter(N=>e.indexOf(N.id)>=0);r==null||r.forEach(function(N,S){const E=this.nodesGroup[N.id];n.push({bounds:(E==null?void 0:E.getClientRect())||{},fx:N.x||0,fy:N.y||0})});const s=this.getBounds(n);this.originTransform=this.originTransform={scaleX:this.stage.scaleX(),scaleY:this.stage.scaleY(),x:this.stage.x(),y:this.stage.y()};const a=this.stage.width(),l=this.stage.height()/1.5,c=s.width,u=s.height;if(c===0||u===0)return;let d=t/Math.max(c/a,u/l);d=Math.min(d,Lr)||Lr,this.scale=d;const f=this.stage.width()/(2*d),p=this.stage.height()/(2*d),g=this.nodesGroup[e[0]],v=g==null?void 0:g.getClientRect(),b=v.x*d,w=v.y*d,_=f-b,C=p-w;this.stage.setAttrs({scaleX:d,scaleY:d,x:_||0,y:C||0}),this.layer.batchDraw()},getBounds(e){let t,n,r,s;return e.map(a=>{const l=a.bounds,c=l.x+a.fx,u=l.y+a.fy;t=Math.min(c,t)||c,n=Math.min(u,n)||u,r=Math.max(c+l.width,r)||c+l.width,s=Math.max(u+l.height,s)||u+l.height}),{x:t,y:n,width:r-t,height:s-n}},resetMouseVars(){var e;this.mousedownNode=null,this.mousedownPos=null,this.mouseupNode=null,(e=this.dragLine)==null||e.destroy(),Object.keys(this.nodesGroup).forEach(t=>{this.nodesGroup[t].draggable(!0)})},loadCustomIcon(){if(this.customNodeImages&&!this.customIconLoaded){let e=0;const t=Object.keys(this.customNodeImages).length;Object.keys(this.customNodeImages).forEach(n=>ke(this,null,function*(){e++,Yt[n]=yield xr(this.customNodeImages[n]),e===t&&(this.customIconLoaded=!0)}))}else this.customIconLoaded=!0},loadIcons(){return new Promise((e,t)=>{const n=[],r=[];for(const u in this.moduleDetail.plugs){const d=this.moduleDetail.plugs[u];d==null||d.map(f=>{f.children?r.push(...f.children):r.push(f)})}n.push(...r.map(u=>u.icon)),n.push(...this.moduleDetail.nodes.map(u=>u.name)),n.push("node_type"),n.push("node"),n.push("aggregation");const s=this;let a=0;const l=n.filter(u=>this.imgPath[`${s.prefix}d3svg1/${u}.svg`]);function c(u){return{}.VITE_SVG_TYPE==="base64"?C2(u):w2(u)}l.map(u=>{c(this.imgPath[`${s.prefix}d3svg1/${u}.svg`]).then(d=>{s.iconFiles[u]=d;const f=FD(d).width;this.iconSize[u]=this.nodeWidth?this.nodeWidth:f,a++,a===l.length&&(s.iconAllLoaded=!0,e())}).catch(d=>{console.log(d,"e"),t()})})})},toggleZoom(e){},handleNodeContextMenu(e,t){var n,r;e.evt&&e.evt[this.actKey]||(clearTimeout(this.popoverTimer),this.showPopover=!1,this.contextMenuId++,this.contextMenuNode=t,this.mousePosition.left=e.evt.clientX,this.mousePosition.top=e.evt.clientY,this.showContextMenu=!0,e.currentTarget.type==="aggregation"?this.menuOptions=kne:this.menuOptions=(n=this.$parent.moduleDetail)!=null&&n.plugs[t.type]?Array.from((r=this.$parent.moduleDetail)==null?void 0:r.plugs[t.type]):[])},handleDeselectNode(e,t){me(this,"handle-select-node",{isSelected:!1,_node:o.toRaw(t)}),this.selection.length&&(this.selection=[],this.updateSelection()),this.setHighlightRule({}),this.hideContextMenu()},setHighlightRule({prop:e,type:t,value:n}){this.highlightRule={prop:e,type:t,value:n},this.updateNodeStyle(),t||yw(".legend-filter .out-box").classed("active",!1)},updateSelection(){const e=this.selection.map(t=>t.id);this.nodes.forEach(t=>{var n,r;e.includes(t.id)?(n=this.nodesGroup[t.id])==null||n.addName("isSelected"):(r=this.nodesGroup[t.id])==null||r.removeName("isSelected")}),me(this,"updateSelection")},toggleLayout(e){this.history.layoutIndex=e,this.nodes.map(t=>{t.fx=t.fy=null}),this.updateSimulation(),this.ticked(),setTimeout(()=>{this.centerAndZoom()},200)},handleNodeClick(e,t){Gt({cId:"handleNodeClick",c:"点击节点"}),this.canAct&&(t.type==="org"?window.open("http://bs.safe.360.net/starmap","__blank"):t.type==="nodeType"&&t.id.indexOf("org")>=0&&window.open("http://bs.safe.360.net/orglist?snapshot=true","__blank1")),this.hideContextMenu();const n=this.selection.some(s=>s.id===t.id);if(e.evt.shiftKey){if(t.type==="nodeType"||this.selection.some(s=>s.type==="nodeType"))return;n?this.selection=this.selection.filter(s=>s.id!==t.id):this.selection=[...this.selection,t]}else n?this.selection=[]:this.selection=[t];const r=this.selection.some(s=>s.id===t.id);me(this,"handle-select-node",{isSelected:r,_node:t}),this.updateSelection(),this.setHighlightRule(this.highlightRule)},handleNodeMouseEnter(e,t){if(!this.showContextMenu&&!e.evt[this.actKey]){const n=e.target.width(),r=e.target.height(),s=e.target,a=s.getAbsolutePosition(),c=s.getStage().container().getBoundingClientRect(),u=a.x-n/2+c.left,d=a.y-r/2+c.top,f=u,p=d,g=f,v=f+n,b=p,w=p+r;this.hoverNodePosition={top:b,right:v,bottom:w,left:g,width:n,height:r},this.popoverType="node",this.popoverContent={[t.type]:t.id},this.popoverNode=t,this.popoverTimer&&clearTimeout(this.popoverTimer),this.popoverTimer=setTimeout(()=>{this.showPopover=!0},200)}},handleNodeMouseLeave(e,t){this.showContextMenu||(clearTimeout(this.popoverTimer),this.showPopover=!1)},handleNodeMouseUp(e,t){var n;e.evt[this.actKey]&&this.mousedownNode&&(this.dragLine&&((n=this.dragLine)==null||n.destroy()),this.mouseupNode=t,this.mouseupNode.id===this.mousedownNode.id||this.mouseupNode.type==="aggregation"||this.mousedownNode.type==="aggregation"||this.$parent.addLink(this.mousedownNode,this.mouseupNode)),this.resetMouseVars()},handleNodeMouseDown(e,t){if(e.evt[this.actKey]){this.mousedownNode=t,this.nodesGroup[t.id].draggable(!1);const n=this.stage.scaleX(),r=this.stage.getPointerPosition(),s=(r.x-this.stage.x())/n,a=(r.y-this.stage.y())/n;this.mousedownPos={x:s,y:a},this.dragLine=new tt.Line({points:[s,a,s,a],stroke:"black",strokeWidth:1,dash:[5,5],opacity:.7,visible:!0}),this.layer.add(this.dragLine),this.stage.draw()}},handleLinkMouseEnter(e,t){if(t.target.type==="nodeType")return;const n=!!t.edgeLabelProp;let r;if(n?r=t.edgeLabelProp:r=t.target.relay_name||t.target.name,r.length<=this.edgeLabelMaxLength)return;const a=this.linksGroup[`${t.source.id}-${t.target.id}`].findOne(".edgeLabel"),l=t.source.x,c=t.source.y,u=t.target.x,d=t.target.y;a&&(a.text(r),a.x((l+u)/2),a.y((c+d)/2),a.offsetX(a.getWidth()/2||0),a.offsetY(a.getHeight()/2+8||0))},handleLinkMouseLeave(e,t){if(t.target.type==="nodeType")return;const n=!!t.edgeLabelProp;let r;if(n?r=t.edgeLabelProp:r=t.target.relay_name||t.target.name,r.length<=this.edgeLabelMaxLength)return;const a=this.linksGroup[`${t.source.id}-${t.target.id}`].findOne(".edgeLabel"),l=t.source.x,c=t.source.y,u=t.target.x,d=t.target.y;a&&(a.text(r.substring(0,this.edgeLabelMaxLength)+"..."),a.x((l+u)/2),a.y((c+d)/2),a.offsetX(a.getWidth()/2||0),a.offsetY(a.getHeight()/2+8||0))},treeLayout(){this.nodes.map(e=>{e.fx=e.pos,e.fy=e.levelNum*this.levelHeight}),this.forceLayout()},resetLayout(){var e,t;(e=this.simulation)!=null&&e.stop&&((t=this.simulation)==null||t.stop()),this.nodes.map(n=>{delete n.vx,delete n.vy,delete n.x,delete n.y,delete n.fx,delete n.fy}),this.updateSimulation()},selectSingleEdgeNode(e){const t=[];this.links.map(n=>{n.source.id===e.id&&t.push(n.target.id)});for(let n=t.length-1;n>=0;n--){let r=0,s=0;const a=t[n];this.links.map(l=>{l.source.id===a&&r++,l.target.id===a&&s++}),r>=1&&t.splice(n,1),s>=2&&t.splice(n,1)}return t},selectChildren(e){const t=[];this.links.map(n=>{n.source.id===e.id&&t.push(n.target.id)}),this.handleTableSelect(t)},selectParents(e){const t=[];this.links.map(n=>{n.target.id===e.id&&t.push(n.source.id)}),this.handleTableSelect(t)},handleGlobalContextMenu(e){this.mousePosition.left=e.evt.clientX,this.mousePosition.top=e.evt.clientY,this.menuOptions=[],this.showContextMenu=!0,this.showPopover=!1,this.contextMenuNode={},e.evt.preventDefault()},hideContextMenu(){this.showContextMenu=!1,this.contextMenuNode={}},centerAndZoom(e=.7,t=!1){var f,p,g;if(this.originTransform={scaleX:this.stage.scaleX(),scaleY:this.stage.scaleY(),x:this.stage.x(),y:this.stage.y()},!this.grab)return;const n=this.stage.width(),r=this.stage.height(),s=this.grab.getClientRect(),a=s.width/this.scale,l=s.height/this.scale;if(a===0||l===0)return;let c=e/Math.max(a/n,l/r);if(c=t?c:Math.min(c,Lr)||Lr,!t&&c>Lr)return;this.scale=c;const u=this.stage.width()/(2*c),d=this.stage.height()/(2*c);if((f=this.simulation)!=null&&f.force&&((p=this.simulation)==null||p.force("center",S_(u,d))),this.ticked(),this.stage.setAttrs({scaleX:c,scaleY:c,x:0,y:0}),this.layer.batchDraw(),this.history.layoutIndex===1){const v=this.grab.getClientRect(),b=(n-v.width)/2-v.x,w=(r-v.height)/2-v.y;this.stage.setAttrs({x:b,y:w}),this.layer.batchDraw(),(g=this.simulation)==null||g.stop()}},reset(){this.stage.setAttrs(this.originTransform)},handleContextMenuClick({nodes:e,api:t,dataApi:n}){if(this.requestGraphData){let r,s;const a={show_label:"label",all_show_label:"label",all_show_names:"name",show_names:"name"};switch(t&&t.name){case"edit_label":this.editLabel(e);break;case"single_edge_select":r=this.selectSingleEdgeNode(e[0]),this.selection=this.nodes.filter(l=>r.includes(l.id));break;case"hold_aggregation":s=this.selectSingleEdgeNode(e[0]),this.$parent.aggregationNodes(s,e[0]);break;case"release_aggregation":this.$parent.releaseAggregation(e[0]);break;case"show_label":case"show_names":e.map(l=>{l.textProp=a[t.name]}),this.update();break;case"all_show_label":case"all_show_names":this.nodes.map(l=>{l.textProp=a[t.name]}),this.update();break;case"un_show_names":case"un_show_label":e.map(l=>{l.textProp=null}),this.update();break;case"all_un_show_names":case"all_un_show_label":this.nodes.map(l=>{l.textProp=null}),this.update();break;case"all_show_edges_label":this.links.map(l=>{l.edgeLabelProp=l.edge_label}),this.update();break;case"all_hide_edges_label":this.links.map(l=>{l.edgeLabelProp=null}),this.update();break;case"copy":this.copyNodeText(e);break;case"node_star":e.map(l=>{this.starNode(l)});break;case"un_node_star":e.map(l=>{this.starNode(l,!1)});break;case"fix_nodes":e.map(l=>{this.toggleMove(l,!0)});break;case"un_fix_nodes":e.map(l=>{this.toggleMove(l,!1)}),this.updateSimulation();break;case"all_fix_nodes":this.fixAllNodes(!0);break;case"all_un_fix_nodes":this.fixAllNodes(!1);break;case"expand_node":e.map(l=>{this.$parent.expandNodes(l)});break;case"expand_part_node":e.map(l=>{this.$parent.expandNodes(l,n)});break;case"go_result":this.handleGoDetail(e);break;case"delete_node":this.$parent.deleteNodes(e);break;case"select_children":this.selectChildren(e[0]);break;case"select_parents":this.selectParents(e[0]);break;case"undo":this.$parent.historyBack();break;case"redo":this.$parent.historyForward();break;case"add_con_node":this.$parent.$refs.buttonList.addNode("diy",e[0]);break;case"add_link":this.$parent.$refs.buttonList.addNode("diy",e[0]);break;case"show_node":this.toggleShowNode(e[0],e[1],!0);break;case"hide_node":this.toggleShowNode(e[0],e[1],!1);break;case"show_nodes":this.toggleShowNodes(e,!0);break;case"hide_nodes":this.toggleShowNodes(e,!1);break;default:me(this,"custom-contextmenu-click",{eventName:t.name,customConfig:t.customConfig,nodes:e,allNodes:o.toRaw(this.history.dataNow.nodes)})}this.hideContextMenu(),setTimeout(()=>{this.updateSelection()},400)}else Ot({message:"无可操作权限",type:"warning"})},expandNodes(e,t){Gt({cId:"dblclick",c:"双击节点"}),this.requestGraphData?this.$parent.expandNodes(t):Ot({message:"无可操作权限",type:"warning"})},toggleShowNode(e,t,n=!0){this.history.toggleShowNode(e,null,n),this.selection.filter(s=>s.show).length>0||this.handleTableSelect([]),setTimeout(this.updateNodeStyle,100)},toggleShowNodes(e,t=!0){e.forEach(n=>{this.history.toggleShowNode(n,null,t)}),setTimeout(this.updateNodeStyle,100)},copyNodeText(e){let t="";e.filter(n=>n.type!=="aggregation"&&n.type!=="nodeType").map(n=>{t=t+n.id+`
|
|
140
|
-
`}),t&&Nne(t).then(()=>{Ot({message:"复制成功",type:"success"})},n=>{console.log("copy---e",n)})},toggleMove(e,t){e.fx=t?e.x:null,e.fy=t?e.y:null},autoDisplay(){this.nodes.map(e=>{e.fx=null,e.fy=null})},editLabel(e){var t;h2.prompt("修改备注",{confirmButtonText:"确定",cancelButtonText:"取消",inputValue:(t=e[0])==null?void 0:t.label,inputPlaceholder:"请输入备注,最多20字",inputValidator:n=>n.length>20?"已超过20字":!0}).then(({value:n})=>{e.map(r=>{r.label=n,this.showLabel(r,"label")}),this.updateNodeStyle()}).catch(n=>{console.log(n)})},showLabel(e,t){e.textProp=t,this.update()},hideLabel(e,t){e.textProp=null,this.update()},safeGet(e,t){return!e||!t?void 0:t.split(".").reduce((s,a)=>s&&s[a]?s[a]:void 0,e)},fixAllNodes(e=!0){this.nodes.map(t=>{this.toggleMove(t,e)}),!e&&this.isAutoTick&&this.updateSimulation()},highlightByRule(e,t){if(!e.prop&&!t){this.nodes.forEach(c=>{const u=this.nodesGroup[c.id];u==null||u.removeName("lowlight")}),this.links.forEach(c=>{const u=this.linksGroup[`${c.source.id}-${c.target.id}`];u==null||u.removeName("lowlight")});return}const{type:n,prop:r,value:s}=e,a=this,l=[];this.nodes.forEach(c=>{const u=this.nodesGroup[c.id];r?n==="include"?s.includes(a.safeGet(c,r))&&a.inNodesRange(t,c)?(u==null||u.removeName("lowlight"),l.push(c)):u==null||u.addName("lowlight"):n==="equal"?a.safeGet(c,r)===s&&a.inNodesRange(t,c)?(u==null||u.removeName("lowlight"),l.push(c)):u==null||u.addName("lowlight"):n==="boolean"&&(Ph(a.safeGet(c,r))&&a.inNodesRange(t,c)?(u==null||u.removeName("lowlight"),l.push(c)):u==null||u.addName("lowlight")):a.inNodesRange(t,c)?(u==null||u.removeName("lowlight"),l.push(c)):u==null||u.addName("lowlight")}),this.links.forEach(c=>{const u=this.linksGroup[`${c.source.id}-${c.target.id}`];l.some(f=>f.id===c.target.id)?u==null||u.removeName("lowlight"):u==null||u.addName("lowlight")})},handleCustomSelect(e){if(this.handleDeselectNode(),!e.prop)return;const{type:t,prop:n,value:r}=e,s=this;this.nodes.forEach(a=>{if(n&&t==="include"){let l;if(a.type==="nodeType"){const c=s.safeGet(a,"parents"),u=s.safeGet(a,"children"),d=c==null?void 0:c.some(p=>r.includes(p)),f=u==null?void 0:u.some(p=>r.includes(p));l=d&&f}(r.includes(s.safeGet(a,n))||l)&&this.selection.push(a)}}),this.updateSelection()},inNodesRange(e,t){return e?e.some(n=>n===t.id):!0},loadFlagFiles(e){return ke(this,null,function*(){return new Promise(t=>{this.flagFiles[e]?t(this.flagFiles[e]):(this.flagFiles[e]=this.imgPath[`${this.prefix}d3svg1/flags/${e}.png`],t(this.flagFiles[e]))})})},getNodeImage(e){return ke(this,null,function*(){var s,a,l,c,u,d,f,p,g,v,b,w;let t=null;const n=(l=(a=(s=e.detail)==null?void 0:s.info)==null?void 0:a.basic)==null?void 0:l.flag,r=(d=(u=(c=e==null?void 0:e.detail)==null?void 0:c.info)==null?void 0:u.basic)==null?void 0:d.level;if(this.customNodeImages&&this.customNodeImages[e.type]){if(Yt[e.type])return Yt[e.type];t=yield xr(this.customNodeImages[e.type]),Yt[e.type]=t}else if(e.detail&&((p=(f=e.detail)==null?void 0:f.info)!=null&&p.icon_img))try{t=yield xr(e.detail.info.icon_img)}catch(_){console.log("loadCompleted error",_)}else if(e.detail&&((v=(g=e.detail)==null?void 0:g.info)!=null&&v.inner_img))try{t=yield xr(e.detail.info.inner_img)}catch(_){console.log("loadCompleted error",_)}else if(e.type==="nodeType"||e.type==="aggregation"){if(e!=null&&e.icon_img)try{return t=yield xr(e.icon_img),t}catch(C){console.log("loadCompleted error",C)}const _=e.icon||"node_type";if(Yt[_])return t=Yt[_],t;t=this.iconFiles[_]?this.iconFiles[_]:this.iconFiles.node_type,t=yield xr("data:image/svg+xml,"+encodeURIComponent(t)),Yt[_]=t}else if(n&&(e.type==="ip"||e.type==="internet")){if(Yt[n])return t=Yt[n],t;yield this.loadFlagFiles(n),t=yield xr(this.flagFiles[n]),Yt[n]=t}else if((w=(b=e.detail)==null?void 0:b.info)!=null&&w.inner_country&&(e.type==="country"||e.type==="target_country")){const _=e.detail.info.inner_country;if(Yt[_])return t=Yt[_],t;yield this.loadFlagFiles(_),t=yield xr(this.flagFiles[_]),Yt[_]=t}else{const _=`${e.type||"node"}${r}${this.darkMode}`;if(Yt[_])return t=Yt[_],t;t=this.iconFiles[e.type]?this.iconFiles[e.type]:this.iconFiles.node;const C=fo(r,this.levelList,this.darkMode),N=this.darkMode?"#182628":"#fff";t=_2(t,C,N);try{t=yield xr("data:image/svg+xml,"+encodeURIComponent(t))}catch(S){console.log(S)}Yt[_]=t}return t})},handleGoDetail(e){e.forEach(t=>{if(t.isCluster)return;const n=t.type,r=this.moduleDetail.config.jumpRule[n];if(r)if(n==="org"){const s=t.id.split("(")[0];s.indexOf("APT")>=0&&window.open(r.split("${id}").join(s),t.id)}else{let s=t.origin&&t.origin[0]||t.id;(n==="url"||n==="virus")&&(s=encodeURIComponent(s)),window.open(r.split("${id}").join(s),t.id)}})},starNode(e,t=!0){e.collect=t,this.update()},handleAddBlack(e){this.showBlackType=!0,this.node=e},changeVisible(e){this.showBlackType=e},zoomIn(){this.adjustZoom(1.1)},zoomOut(){this.adjustZoom(.909)},adjustZoom(e){const n=this.stage.scaleX()*e;this.scale=n;const r={x:this.stage.width()/2,y:this.stage.height()/2},s={x:this.stage.getPointerPosition().x-this.stage.x(),y:this.stage.getPointerPosition().y-this.stage.y()},a={x:-(s.x-r.x)*(e-1),y:-(s.y-r.y)*(e-1)};this.stage.setAttrs({x:this.stage.x()+a.x,y:this.stage.y()+a.y,scaleX:n,scaleY:n}),this.layer.batchDraw()},addNodesDetail(e){return ke(this,null,function*(){const t=e.filter(s=>!s.detail&&s.noDetail!==!0&&s.type!=="aggregation"&&s.type!=="nodeType"),n={};t.map(s=>{n[s.type]?n[s.type].push(s):n[s.type]=[s]});const r=[];for(const s in n){const a=n[s],l={};a.map(c=>{c.origin&&(l[c.id]=c.origin)}),r.push(this.graphApi.getNodesDetail({api:this.moduleDetail.node_info[n[s][0].type],node_id:n[s].map(c=>c.id),origin:l}).then(c=>(c.data.records.map(d=>{const f=e.find(p=>p.id===d.info.id);f.detail=d}),Promise.resolve({}))))}})},addCanvasBg(){this.darkMode&&(this.darkBgRect=new tt.Rect({x:0,y:0,width:this.stage.width()/this.scale,height:this.stage.height()/this.scale,fill:"#021212",stroke:"#021212",listening:!1,draggable:!1}),this.layer.add(this.darkBgRect),this.darkBgRect.moveToBottom(),this.stage.draw())},removeCanvasBg(){this.darkBgRect&&this.darkBgRect.destroy(),this.darkBgRect=null,this.stage.draw()}}},Ine={class:"main-svg-box","element-loading-text":"布局中...","element-loading-background":"rgba(122, 122, 122)"},Bne={ref:"canvasContainer",class:"canvas-container"};function Pne(e,t,n,r,s,a){const l=o.resolveComponent("popover"),c=o.resolveComponent("node-contextmenu"),u=d2;return o.openBlock(),o.createElementBlock("div",{class:o.normalizeClass(["render-container",n.darkMode?"dark-theme "+s.uniqueClass:" "+s.uniqueClass])},[o.withDirectives((o.openBlock(),o.createElementBlock("div",Ine,[o.createElementVNode("div",Bne,null,512)])),[[u,s.ticking]]),o.createVNode(l,{"dark-mode":n.darkMode,"show-popover":s.showPopover&&!s.isDragging,"mouse-position":s.hoverNodePosition,"node-info":s.popoverNode,"module-detail":n.moduleDetail,type:s.popoverType,"custom-tooltip":n.customTooltip,history:n.history,data:n.history.dataNow},null,8,["dark-mode","show-popover","mouse-position","node-info","module-detail","type","custom-tooltip","history","data"]),n.isThreatPath?o.createCommentVNode("",!0):(o.openBlock(),o.createBlock(c,{key:0,show:a.showContextMenuFlag,axis:s.mousePosition,"node-info":a.contextMenuNodes,history:n.history,"menu-options":s.menuOptions,"module-detail":n.moduleDetail,onContextmenuClick:a.handleContextMenuClick},null,8,["show","axis","node-info","history","menu-options","module-detail","onContextmenuClick"]))],2)}const zs=xt(One,[["render",Pne]]),vae="",yae="",bae="",{toClipboard:m5}=Bc(),Rne={name:"SnapShotDialog",components:{},mixins:[],props:{snapshot:{type:Object,default:()=>{}},graphApi:{type:Object,default:()=>{}}},data(){return{dialogVisible:!1,origin:window.location.origin,ruleForm:{radio:"0",event:"",group:"",graphDesc:""},rules:{event:[{required:!0,message:"请选择安全事件",trigger:"change"}],group:[{required:!1,message:"请选择团队",trigger:"change"}]},eventOptions:[{value:"",label:""}],groupOptions:[{value:"",label:""}],hostList:["https://sc.360.net","https://sc.b.qihoo.net","http://sec.test.safe.qihoo.net"],isInnerAccount:!1,visibleSuccess:!1,eventUrl:null}},computed:{},watch:{snapshot:{handler:function(e,t){e.name&&(this.ruleForm.graphDesc=e.name)},immediate:!0,deep:!0}},mounted(){this.graphApi.getReportList&&this.graphApi.getReportList().then(e=>{e.data!==null&&(this.eventOptions=[],e.data.map(t=>{this.eventOptions.push({label:t.title,value:t.report_id})}))}),this.graphApi.getGroupList&&this.graphApi.getGroupList().then(e=>{e.data!==null?(this.groupOptions=[],e.data.map(t=>{this.groupOptions.push({label:t.group_name,value:t.group_id})}),this.isInnerAccount=!0):this.isInnerAccount=!1})},updated(){},beforeUnmount(){},methods:{hanleClickCopy(e){m5(e).then(t=>Ot({message:"复制成功",type:"success"}),t=>Ot.error("复制失败"))},show(){this.dialogVisible=!0},hide(){this.dialogVisible=!1,this.resetForm("ruleForm")},submitForm(e){this.$refs[e].validate(t=>{if(t){const n=this.hostList.some(c=>c===this.origin);let r=null;n?this.origin===this.hostList[1]?r=`${this.hostList[0]}/graph?snapshot_id=${this.snapshot.snapshot_id}&vcode=${this.snapshot.vcode}`:r=`${this.origin}/graph?snapshot_id=${this.snapshot.snapshot_id}&vcode=${this.snapshot.vcode}`:r=`http://test.sec.360.net/graph?snapshot_id=${this.snapshot.snapshot_id}&vcode=${this.snapshot.vcode}`,this.eventUrl=window.location.origin+"/event/"+this.ruleForm.event;const s=this.snapshot.thumb;let a=null;this.groupOptions.map(c=>{c.value===this.ruleForm.group&&(a=c.label)});const l={report_id:this.ruleForm.event,group_id:this.ruleForm.group,content:s,graph_url:r,group_name:a,acl:parseInt(this.ruleForm.radio),head:this.ruleForm.graphDesc};this.graphApi.addGraph(l).then(c=>{c.code==="0"?(m5(this.eventUrl),Ot({message:"分享成功! 分享事件地址已经复制",type:"success",showClose:!0,duration:5e3})):Ot({message:"分享失败",type:"error"})}).catch(()=>{Ot({message:"分享失败",type:"error"})}),this.resetForm(e),this.dialogVisible=!1}else return!1})},resetForm(e){this.$refs[e].resetFields(),this.snapshot.name=""}}},Lne={class:"sharetoEvents"},Dne={class:"lable-header"},Mne={class:"desc"},Fne={key:0,class:"desc-font"},$ne={key:1,class:"desc-font"},zne={class:"dialog-footer"};function Une(e,t,n,r,s,a){const l=dP,c=wc,u=bc,d=Kf,f=vi,p=Wf,g=so,v=Na;return o.openBlock(),o.createElementBlock("div",Lne,[o.createVNode(v,{title:"分享到安全事件","append-to-body":"","close-on-click-modal":!1,width:"25%",modelValue:s.dialogVisible,"onUpdate:modelValue":t[6]||(t[6]=b=>s.dialogVisible=b),class:"el-dialog-graph"},{footer:o.withCtx(()=>[o.createElementVNode("span",zne,[o.createVNode(g,{type:"primary",onClick:t[5]||(t[5]=b=>a.submitForm("ruleForm"))},{default:o.withCtx(()=>t[9]||(t[9]=[o.createTextVNode("确认分享")])),_:1}),o.createVNode(g,{onClick:a.hide},{default:o.withCtx(()=>t[10]||(t[10]=[o.createTextVNode("关闭")])),_:1},8,["onClick"])])]),default:o.withCtx(()=>[o.createVNode(p,{ref:"ruleForm",model:s.ruleForm,rules:s.rules,"label-width":"100px",class:"demo-ruleForm"},{default:o.withCtx(()=>[o.createElementVNode("div",Dne,[o.createVNode(l,{modelValue:s.ruleForm.radio,"onUpdate:modelValue":t[0]||(t[0]=b=>s.ruleForm.radio=b),class:"el-radio",label:"1",border:"",size:"medium"},{default:o.withCtx(()=>t[7]||(t[7]=[o.createTextVNode("付费可见")])),_:1},8,["modelValue"]),o.createVNode(l,{modelValue:s.ruleForm.radio,"onUpdate:modelValue":t[1]||(t[1]=b=>s.ruleForm.radio=b),label:"0",border:"",size:"medium"},{default:o.withCtx(()=>t[8]||(t[8]=[o.createTextVNode("开放")])),_:1},8,["modelValue"]),o.createElementVNode("div",Mne,[s.ruleForm.radio==="0"?(o.openBlock(),o.createElementBlock("span",Fne,"该Graph内容对所有用户可见。")):(o.openBlock(),o.createElementBlock("span",$ne,"该Graph内容对付费用户可见。"))])]),o.createVNode(d,{label:"安全事件",prop:"event"},{default:o.withCtx(()=>[o.createVNode(u,{modelValue:s.ruleForm.event,"onUpdate:modelValue":t[2]||(t[2]=b=>s.ruleForm.event=b),"popper-append-to-body":!1,filterable:"",placeholder:"请选择",class:"select-item"},{default:o.withCtx(()=>[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(s.eventOptions,b=>(o.openBlock(),o.createBlock(c,{key:b.value,label:b.label,value:b.value},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])]),_:1}),s.isInnerAccount?(o.openBlock(),o.createBlock(d,{key:0,label:"选择团队",prop:"group"},{default:o.withCtx(()=>[o.createVNode(u,{modelValue:s.ruleForm.group,"onUpdate:modelValue":t[3]||(t[3]=b=>s.ruleForm.group=b),class:"select-item",filterable:"",placeholder:"请选择"},{default:o.withCtx(()=>[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(s.groupOptions,b=>(o.openBlock(),o.createBlock(c,{key:b.value,label:b.label,value:b.value},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])]),_:1})):o.createCommentVNode("",!0),o.createVNode(d,{label:"Graph介绍",prop:"graphDesc"},{default:o.withCtx(()=>[o.createVNode(f,{modelValue:s.ruleForm.graphDesc,"onUpdate:modelValue":t[4]||(t[4]=b=>s.ruleForm.graphDesc=b),type:"textarea",rows:2,placeholder:"请输入内容",maxlength:"50",clearable:""},null,8,["modelValue"])]),_:1})]),_:1},8,["model","rules"])]),_:1},8,["modelValue"])])}const jne=xt(Rne,[["render",Une]]),wae="",{toClipboard:qne}=Bc(),Hne={name:"SnapShotDialog",components:{ShareToSecurityEvents:jne},mixins:[],props:{customCopyPathFn:{type:Function},graphUrlPath:{type:String,default:"/graph"},snapshot:{type:Object,default:()=>{}},graphApi:{type:Object,default:()=>{}}},data(){return{dialogVisible:!1,origin:window.location.origin,isInnerAccount:!1}},computed:{linkAddress(){return this.customCopyPathFn&&typeof this.customCopyPathFn=="function"?this.customCopyPathFn({snapshot_id:this.snapshot.snapshot_id}):`${this.origin}${this.graphUrlPath}?snapshot_id=${this.snapshot.snapshot_id}`},linkAddressAndCode(){return this.customCopyPathFn&&typeof this.customCopyPathFn=="function"?this.customCopyPathFn({snapshot_id:this.snapshot.snapshot_id,vcode:this.snapshot.vcode}):`${this.linkAddress}&vcode=${this.snapshot.vcode}`}},watch:{},created(){},mounted(){Ei(Pe,"sharePermission",e=>{this.isInnerAccount=e})},updated(){},beforeUnmount(){xi(Pe,"sharePermission")},methods:{hanleClickCopy(e){qne(e).then(t=>Ot({message:"复制成功",type:"success"}),t=>Ot.error("复制失败"))},show(){this.dialogVisible=!0},hide(){this.dialogVisible=!1},shareToEvents(){this.dialogVisible=!1,this.$refs.sharetoevents.show()}}},Gne={class:"snapshotdialog-container"},Wne={class:"dialog-footer"};function Kne(e,t,n,r,s,a){const l=vi,c=PP,u=so,d=Na,f=o.resolveComponent("ShareToSecurityEvents");return o.openBlock(),o.createElementBlock("div",Gne,[o.createVNode(d,{modelValue:s.dialogVisible,"onUpdate:modelValue":t[2]||(t[2]=p=>s.dialogVisible=p),title:"复制链接及提取码","append-to-body":"","close-on-click-modal":!1,class:"el-dialog-graph"},{footer:o.withCtx(()=>[o.createElementVNode("span",Wne,[s.isInnerAccount?(o.openBlock(),o.createBlock(u,{key:0,type:"primary",onClick:t[0]||(t[0]=p=>a.shareToEvents())},{default:o.withCtx(()=>t[5]||(t[5]=[o.createTextVNode("分享到安全事件")])),_:1})):o.createCommentVNode("",!0),o.createVNode(u,{type:"primary",onClick:t[1]||(t[1]=p=>a.hanleClickCopy(a.linkAddressAndCode))},{default:o.withCtx(()=>t[6]||(t[6]=[o.createTextVNode("复制链接及提取码")])),_:1}),o.createVNode(u,{onClick:a.hide},{default:o.withCtx(()=>t[7]||(t[7]=[o.createTextVNode("关闭")])),_:1},8,["onClick"])])]),default:o.withCtx(()=>[o.createVNode(l,{value:a.linkAddress,readonly:""},{prepend:o.withCtx(()=>t[3]||(t[3]=[o.createTextVNode("链接地址:")])),_:1},8,["value"]),o.createVNode(c),o.createVNode(l,{value:n.snapshot.vcode,readonly:""},{prepend:o.withCtx(()=>t[4]||(t[4]=[o.createTextVNode("提取码:")])),_:1},8,["value"])]),_:1},8,["modelValue"]),o.createVNode(f,{ref:"sharetoevents",snapshot:n.snapshot,"graph-api":n.graphApi},null,8,["snapshot","graph-api"])])}const Yne=xt(Hne,[["render",Kne]]),_ae="",Jne={name:"ForceGraphByCanvas",components:{Loading:zo,ForceGraphSvgIcon:uo,RenderByCanvas:zs,ButtonList:Gj,SnapShotDialog:Yne,RightMenu:f$,Legend:uU,NodeVisibleControl:vU},mixins:[kr],provide:function(){return{history:this.history,hasLevel:this.hasLevel,levelList:this.levelList,levelMap:this.levelMap,getDarkMode:()=>this.darkMode,requestGraphData:this.requestGraphData,moduleDetail:()=>this.moduleDetail}},props:{showPoint:{type:Boolean,default:!0},isRenderStartNode:{type:Boolean,default:!0},isDefaultSelectStartNode:{type:Boolean,default:!0},isShowRightMenu:{type:Boolean,default:!0},hideButtonList:{type:Array,default:()=>[]},showTopSearch:{type:Boolean,default:!1},customContextMenuEvent:{type:Function},handleSelectNodeEvent:{type:Function},handleDataLoaded:{type:Function},graphApi:{type:Object,default:()=>{}},graphUrlPath:{type:String,default:"/graph"},customCopyPathFn:{type:Function},snapshot_id:{type:String,default:""},vcode:{type:String,default:""},module:{type:String,default:""},startNode:{type:Array,default:()=>[]},enterStartNode:{type:Boolean,default:!1},hasLevel:{type:Boolean,default:!0},levelList:{type:Array,default:()=>[{level:"未知",levelName:"未知",className:"unknown",iconType:"",normalColor:"#666",darkColor:"#c6cdd5",dangerNumber:0},{level:"危险",levelName:"危险",className:"warn",iconType:"",normalColor:"#CF1322",darkColor:"#fb2400",dangerNumber:1},{level:"普通",levelName:"普通",className:"normal",iconType:"",normalColor:"#007EE2",darkColor:"#0094ff",dangerNumber:-1},{level:"安全",levelName:"安全",className:"safe",iconType:"",normalColor:"#009A75",darkColor:"#00da90",dangerNumber:-2}]},showLevelCount:{type:Boolean,default:!1},darkMode:{type:Boolean,default:!1},title:{type:String,default:""},isShowNodeMessage:{type:Boolean,default:!0},nodeWidth:{type:Number},startNodeWidth:{type:Number},linkDistance:{type:Number},strength:{type:Number},nodeTypeScale:{type:Number},singlesNodeMaxNum:{type:Number,default:100},startNodeAnimation:{type:Boolean,default:!0},customTooltip:{type:Function},enableScript:{type:Boolean,default:!1},edgeLabelMaxLength:{type:Number,default:10},hasNodeVisibleControl:{type:Boolean,default:!1},hasLegend:{type:Boolean,default:!0},customNodeImages:{type:Object,default:()=>{}},isShowNodeType:{type:Boolean,default:!0}},emits:["sharePermission","custom-contextmenu-click","handle-select-node","handle-data-loaded","outdate"],data(){return{history:new xD({isShowNodeMessage:this.isShowNodeMessage}),isLoading:!1,bigLoading:!1,loadingInfo:"数据加载中",moduleDetail:{},contextMenuNode:{},contextMenuId:0,isDragging:!1,isCtrlDown:!1,selection:[],snapshot:{},inited:!1,outdateTime:0,fullScreen:!1,generateUniqueIndexNow:this.generateUniqueIndex(),screenHeight:0,margin:"0",requestGraphData:!0,nodeTypeList:[]}},computed:{topFrame(){return window.top.location===window.location},levelMap(){const e={};return this.levelList.forEach(t=>{e[t.level]=t}),e}},watch:{startNode:{handler:function(e,t){this.moduleDetail.module&&this.searchStartNode()},immediate:!0,deep:!0},screenHeight:{deep:!0,handler:function(){this.margin=this.changeMargin()}},graphApi:{handler:function(){this.$nextTick(()=>{this.initializeGraphApi()})},deep:!0,immediate:!0}},unmounted(){window.onresize=null},mounted(){return ke(this,null,function*(){console.log('"2024/11/19 14:43:09"',"2024/11/19 14:43:09"),this.initializeGraphApi(),window.onresize=()=>{this.fullScreen=!!document.fullscreenElement,this.screenHeight=document.body.clientHeight},this.margin=this.changeMargin(),Ei(Pe,"emitDataLoaded",()=>{this.emitDataLoaded()})})},methods:{initializeGraphApi(){if(this.graphApi){if(this.snapshot_id)this.isLoading=!0,this.graphApi.getSnapshotDetail({snapshot_id:this.snapshot_id,vcode:this.vcode}).then(e=>{this.moduleDetail=e.data.config,this.history.initFromSnapshot(JSON.parse(e.data.data)),setTimeout(()=>{this.$refs.render.updateNodeStyle(),this.centerAndZoom(.8,!1)},1e3)}).catch(e=>{console.log(e,"e")}).finally(e=>{this.isLoading=!1});else if(this.module)this.initGraph();else{Ot.error("请传入模块名称");return}this.graphApi.userInfo&&this.graphApi.userInfo().then(e=>{e.data!==null&&(me(Pe,"sharePermission",e.data.access.graph_share),this.requestGraphData=e.data.access.request_graph_data)}).catch(e=>{this.onOutdate(e.res)})}},handleCustomContextMenuClick(e){this.customContextMenuEvent&&typeof this.customContextMenuEvent=="function"?this.customContextMenuEvent(o.toRaw(e)):me(this,"custom-contextmenu-click",o.toRaw(e))},handleSelectNode(e){this.handleSelectNodeEvent&&typeof this.handleSelectNodeEvent=="function"?this.handleSelectNodeEvent(o.toRaw(e),o.toRaw(this.history.dataNow)):me(this,"handle-select-node",o.toRaw(e))},searchStartNode(){this.startNode.length>0&&!this.inited&&this.startNode.map(e=>{const t={type:e.type,id:e.id,startNode:!0};this.inited=!0,this.moduleDetail.nodes.findIndex(n=>e.type===n.name)>=0?this.addNewNodesAndExpand(t):(Ot({message:"无相关数据",type:"warning"}),this.emitDataLoaded())})},initGraph(){return ke(this,null,function*(){var e;mn("initGraph"),(e=this.graphApi)==null||e.getGraphConfig({name:this.module}).then(t=>{const n=t.data||{},r=Ac(n==null?void 0:n.node_info),s=(n==null?void 0:n.nodes)||[];s.forEach(l=>{l.name=l.name.toLowerCase()});const a=Ac(n==null?void 0:n.plugs);n.node_info=r,n.nodes=s,n.plugs=a,this.moduleDetail=n,this.searchStartNode(),!this.inited&&this.enterStartNode&&this.$refs.buttonList.addNode("search")}).catch(t=>{this.onOutdate(t.res),this.emitDataLoaded(),console.log("e",t)})})},addNewNodesAndExpand(e){this.isLoading=!0,this.graphApi.getNodesDetail({api:this.moduleDetail.node_info[e.type],node_id:[e.id],nodeType:e.type,moduleDetail:this.moduleDetail}).then(t=>{var s,a,l;let n={id:(s=t.data.records[0])==null?void 0:s.info.id,type:(a=t.data.records[0])==null?void 0:a.info.type,startNode:!0,detail:t.data.records[0],group:e.id,name:((l=t.data.records[0])==null?void 0:l.info.name)||e.id};n=Zr(n,this.moduleDetail.plugs);const r={addOne:{nodes:[n],links:[]}};this.isRenderStartNode&&(this.history.pushState(r),this.history.updateData(t.data.records,[e.id]),setTimeout(()=>{this.isDefaultSelectStartNode&&(this.handleTableSelect([e.id]),setTimeout(()=>{this.selection.length&&this.handleSelectNode({isSelected:!0,_node:this.selection[0]})},0))},500)),this.expandNodes(n)}).catch(t=>{console.log(t,"e"),this.emitDataLoaded(),this.onOutdate(t.res),Ot({message:"无该节点信息",type:"warning"})}).finally(()=>{this.isLoading=!1})},onAction(e){this.history.pushState(e)},onOutdate(e){(e==null?void 0:e.code)==="AC100001"&&this.outdateTime<1&&(this.outdateTime++,me(this,"outdate"))},expandNodes(e,t){return ke(this,null,function*(){if(!(e!=null&&e.type))return;const n=this.moduleDetail.plugs[e==null?void 0:e.type];let r=[];t?(r=Array.isArray(t)?[...t]:[t],e.apis===void 0&&(e.apis=[]),e.apis.push(...r)):(e.expand=1,e.apis=[],e.apis.push({namec:"拓线全部",value:0,name:"",flagSelect:!0}),n==null||n.map(d=>{d.children?r.push(...d.children):r.push(d)}));const s=r.map(d=>this.graphApi.getGraphRequest({api:d.name,node_id:e.id,origin:e.origin,nodeType:e.type,moduleDetail:this.moduleDetail}).then(f=>Promise.resolve(de(te(te({},f),d),{api:d.name,apiC:d.relay_name,icon:d.icon,note_name:d.note_name,icon_img:d.icon_img,canLoop:d.canloop,showTotal:d.show_total}))).catch(f=>Promise.resolve(f)));this.isLoading=!0;let a;yield Promise.all(s).then(d=>{if(d.some(p=>{var g;return((g=p.res)==null?void 0:g.code)==="AC100001"})){this.onOutdate({code:"AC100001"});return}a=d.filter(p=>p.code==="0"||p.code===0)}).catch(d=>{console.log(d,"e")}).finally(d=>{this.isLoading=!1});const l=[];let c=[];if(a&&a.forEach(d=>{var S;if(e.getData[d.api]=!0,this.history.dataNow.nodes.find(k=>k.id===e.id)&&(this.history.dataNow.nodes.find(k=>k.id===e.id).getData[d.api]=!0),!d.data)return;let f;const p=(S=d.data.nodes||[])==null?void 0:S.map(k=>(k.group=e.id+"-"+d.api,k.groupC=d.apiC,k=Zr(k,this.moduleDetail.plugs),k));if(!this.isShowNodeType){f=d.data.links||[],l.push(...d.data.nodes||[]),c.push(...f||[]);return}const g=e.id+"-"+d.api;let v={id:g,name:d.apiC,note_name:d.note_name,type:"nodeType",icon:d.icon,showTotal:d.showTotal,icon_img:d.icon_img};const E=d,{code:b,msg:w,data:_}=E,C=fi(E,["code","msg","data"]);v=te(te({},C),v);const N={source:e.id,target:g};if(v=Zr(v,this.moduleDetail.plugs),this.nodeTypeList.push(d.icon||"node_type"),p.length>0&&this.isRenderStartNode){if(f=(d.data.links||[]).map(k=>{let A;if(k.source===e.id){const O=this.history.dataNow.nodes.filter(I=>I.id===k.target);if(O.length>0&&(A=this.findGrandSonNodeIds(O[0]).indexOf(k.source)>=0),!d.api.canLoop&&A)return;k.source=g}else k.target===e.id&&(k.target=g);return k.edgeLabelProp=k.edge_label,k}).filter(k=>k),f.length===0)return;f.push(N)}else f=d.data.links||[];if(this.isRenderStartNode&&p.length>=this.singlesNodeMaxNum){let k=null,A=null;const O=String(Math.floor(new Date().getTime()));k={id:O,list:p,type:"aggregation",name:"聚合",relationId:v.id},k=Zr(k,this.moduleDetail.plugs),A={source:v.id,target:O,uniqueIndex:this.generateUniqueIndexNow()};const I={addOne:{nodes:[v,k],links:[N,A]},type:"aggregation"};this.history.pushState(I),this.getNodeDetail(k.list,k.id)}else f.length&&this.isRenderStartNode&&p.push(v),l.push(...p||[]),c.push(...f||[])}),!this.isRenderStartNode){const d={},f={},p=[];this.nodeTypeList.push("node_type"),c.forEach(g=>{const v=g.source+"-"+g.name;if(!d[v]){let b={id:v,name:g.name,type:"nodeType",icon:g.feature.icon};b=Zr(b,this.moduleDetail.plugs),d[v]=b}f[v]?f[v].push(g):f[v]=[g]});for(const g in d)l.push(d[g]);for(const g in f)f[g].forEach(b=>{const w=de(te({},b),{source:b.source,target:g}),_=de(te({},b),{source:g,target:b.target});p.push(w),p.push(_)});c=p}c.map(d=>{d.uniqueIndex=this.generateUniqueIndexNow()});const u={addOne:{nodes:l,links:c}};(l.length>0||c.length>0)&&this.history.pushState(u),this.history.length===2&&setTimeout(()=>{this.centerAndZoom(.8,!1)},1e3),this.getNodeDetail(l)})},findGrandSonNodeIds(e){return this.history.dataNow.nodes.filter(r=>{var s;return((s=e.children)==null?void 0:s.indexOf(r.id))>=0}).reduce((r,s)=>(r.push(...s.children||[]),r),[])||[]},centerAndZoom(e,t){var n;(n=this.$refs.render)==null||n.centerAndZoom(e,t)},generateUniqueIndex(){let e=0;return function(){return e++}},reset(){this.$refs.render.reset()},getNodeDetail(e,t){const r=this.history.dataNow.nodes.filter(l=>e.findIndex(c=>c.id===l.id)>=0).filter(l=>!l.detail&&l.noDetail!==!0&&l.type!=="aggregation"&&l.type!=="nodeType"),s={};r.map(l=>{s[l.type]?s[l.type].push(l):s[l.type]=[l]});let a=Object.keys(s).length;for(const l in s){const c=s[l],u={};c.map(d=>{d.origin&&(u[d.id]=d.origin)}),this.graphApi.getNodesDetail({api:this.moduleDetail.node_info[s[l][0].type],node_id:s[l].map(d=>d.id),origin:u,nodeType:s[l][0].type,moduleDetail:this.moduleDetail}).then(d=>{const f=d.data.records;t?this.history.updateAggregationDetail(f,s[l].map(p=>p.id),t):this.history.updateData(f,s[l].map(p=>p.id))}).catch(d=>{this.onOutdate(d.res)}).finally(()=>{a=a-1,a===0&&(mn(" 数据加载完"),this.emitDataLoaded())})}Object.keys(s).length||this.emitDataLoaded()},emitDataLoaded(){this.handleDataLoaded&&typeof this.handleDataLoaded=="function"?this.handleDataLoaded({dataNow:o.toRaw(this.history.dataNow)}):me(this,"handle-data-loaded",{dataNow:o.toRaw(this.history.dataNow)})},addNode({node:e,type:t,connectNode:n}){if(this.history.dataNow.nodes.findIndex(a=>a.id===e.id)>-1){Ot({type:"warning",message:"该节点已存在,添加失败"});return}let s;if(t==="diy"&&e.type==="nodeType"){let a=de(te({},e),{detail:null,diy:!0,group:e.id});a=Zr(a,this.moduleDetail.plugs);const l=n?{source:n.id,target:e.id,uniqueIndex:this.generateUniqueIndexNow()}:null;s={addOne:{nodes:[a],links:l?[l]:[]}},this.history.pushState(s)}else t==="diy"?this.graphApi.getNodesDetail({api:this.moduleDetail.node_info[e.type],node_id:[e.id],nodeType:e.type,moduleDetail:this.moduleDetail}).then(a=>{var u,d,f;let l={id:(u=a.data.records[0])==null?void 0:u.info.id,type:(d=a.data.records[0])==null?void 0:d.info.type,detail:a.data.records[0],group:e.id,name:((f=a.data.records[0])==null?void 0:f.info.name)||e.id};l=Zr(l,this.moduleDetail.plugs);const c=n?{source:n.id,target:e.id,uniqueIndex:this.generateUniqueIndexNow()}:null;s={addOne:{nodes:[l],links:c?[c]:[]}},this.history.pushState(s)}).catch(a=>{this.onOutdate(a.res);let l=de(te({},e),{detail:null,diy:!0,group:e.id});l=Zr(l,this.moduleDetail.plugs);const c=n?{source:n.id,target:e.id,uniqueIndex:this.generateUniqueIndexNow()}:null;s={addOne:{nodes:[l],links:c?[c]:[]}},this.history.pushState(s)}).finally(a=>{setTimeout(()=>{},500)}):this.addNewNodesAndExpand(e)},addLink(e,t){if(!([e,t].filter(a=>a.type==="nodeType").length===1))return;const r={source:e.id,target:t.id,uniqueIndex:this.generateUniqueIndexNow(),diy:!0};let s=!1;if(this.history.dataNow.links.map(a=>{a.source.id===e.id&&a.target.id===t.id&&(s=!0)}),!s){const a={addOne:{links:[r]}};this.onAction(a)}},expandSelectedNodes(e){e.map(t=>{this.expandNodes(t)})},handleTableSelect(e=[]){this.$refs.render.handleTableSelect(e)},updateSelection(){this.selection=this.$refs.render.selection,this.$refs.render.selectEdgesByNode(this.selection),this.$refs.render.showKeyWay(this.selection),this.$refs.render.updateNodeStyle()},aggregationNodes(e,t){if(e.length===0)return;const n=[];for(const l in this.history.dataNow.nodes)e.findIndex((u,d,f)=>u===this.history.dataNow.nodes[l].id)>=0&&n.push(JSON.parse(JSON.stringify(this.history.dataNow.nodes[l])));const r=String(Math.floor(new Date().getTime()));let s={id:r,list:n,type:"aggregation",name:"聚合",relationId:t.id};s=Zr(s,this.moduleDetail.plugs);const a={addOne:{nodes:[s],links:[{source:t.id,target:r,uniqueIndex:this.generateUniqueIndexNow()}]},deleteOne:{nodes:n,links:n.map(l=>({source:t.id,target:l.id}))},type:"aggregation"};this.history.pushState(a),this.emitDataLoaded()},releaseAggregation(e){let t;if(e.type==="aggregation"&&(t=e),this.history.dataNow.links.map(n=>{n.source.id===e.id&&n.target.type==="aggregation"&&(t=t||n.target,n.source)}),t){const n={deleteOne:{nodes:[t],links:[{source:t.relationId,target:t.id}]},addOne:{nodes:t.list,links:t.list.map(r=>({source:t.relationId,target:r.id}))},type:"aggregation"};for(const r in this.history.dataNow.nodes)t.list.findIndex((a,l,c)=>a===this.history.dataNow.nodes[r].id)>=0&&(this.history.dataNow.nodes[r].aggregation=!1);this.history.pushState(n),this.emitDataLoaded()}},saveSnapshot(){return ke(this,null,function*(){h2.prompt(null,"添加快照",{confirmButtonText:"确定",cancelButtonText:"取消",inputPattern:/^.{1,20}$/,inputPlaceholder:"请输入20字以内快照名称",inputErrorMessage:"请输入20字以内快照名称"}).then(t=>ke(this,[t],function*({value:e}){this.bigLoading=!0,setTimeout(()=>ke(this,null,function*(){try{const n=yield this.$refs.buttonList.svgToBlob(),r=new FormData;r.append("data",this.history.toString()),r.append("name",e),r.append("thumb",n),this.graphApi.addSnapshot1(r).then(s=>{this.snapshot=s.data,this.snapshot.name=e,this.$refs.snapshot.show()}).catch(s=>{this.onOutdate(s.res)}).finally(s=>{this.bigLoading=!1})}catch(n){this.bigLoading=!1,console.log(n)}}),100)})).catch(()=>{Ot({type:"info",message:"取消输入"})})})},autoDisplay(){this.$refs.render.autoDisplay()},deleteNodes(e=this.selection){const t={deleteOne:{nodes:e}};this.history.pushState(t),this.emitDataLoaded();const n=e.map(r=>r.id);this.$refs.render.selection=this.selection.filter(r=>!n.includes(r.id)),setTimeout(()=>{this.updateSelection()},300)},historyForward(){this.history.forward(),setTimeout(()=>{this.updateSelection()},100)},historyBack(){this.history.back(),setTimeout(()=>{this.updateSelection()},100)},toggleFullScreen(){Gt({cId:"toggleFullScreen",c:"切换全屏"}),document.fullscreenElement?document.exitFullscreen&&document.exitFullscreen():this.$refs["force-d3-container"].requestFullscreen()},zoomView(e="in"){e==="in"?(Gt({cId:"zoomIn",c:"zoomIn"}),this.$refs.render.zoomIn()):(Gt({cId:"zoomOut",c:"zoomOut"}),this.$refs.render.zoomOut())},fitScreen(){var e;Gt({cId:"centerAndZoom",c:"centerAndZoom"}),(e=this.$refs.render)==null||e.centerAndZoom()},changeMargin(){let e=0;const t=document.body.clientHeight;return e=Math.floor(((t-50)/20-22)/2),e>8?"8px 0":e+"px 0"},handleHighLight(e,t,n){this.$refs.render.setHighlightRule({type:e,prop:t,value:n})},handleCustomSelect(e,t,n){this.$refs.render.handleCustomSelect({type:e,prop:t,value:n})},fixAllNodes(e){this.$refs.render.fixAllNodes(e)},toggleLayout(e){this.$refs.render.toggleLayout(e)},importCsvData(e){for(const t in e.nodes)delete e.nodes[t].vx,delete e.nodes[t].vy,delete e.nodes[t].x,delete e.nodes[t].y;this.history.dataNow=Object.assign({},e)},getCanvasStage(){var e;return(e=this.$refs.render)==null?void 0:e.stage},addCanvasBg(){var e;(e=this.$refs.render)==null||e.addCanvasBg()},removeCanvasBg(){var e;(e=this.$refs.render)==null||e.removeCanvasBg()},controlOperation(e){var t;(t=this.$refs.render)==null||t.handleContextMenuClick(e)}}},Xne={key:0,ref:"force-d3-container",class:"d3-container"},Qne=["innerHTML"],Zne={class:"top-item"},Vne={class:"top-line"},ere={key:1,class:"select-num"},tre={class:"highlight"},nre={class:"loading-container"},rre={class:"corner-button-box"};function ire(e,t,n,r,s,a){const l=o.resolveComponent("ButtonList"),c=o.resolveComponent("RenderByCanvas"),u=o.resolveComponent("Loading"),d=Qe,f=o.resolveComponent("Legend"),p=o.resolveComponent("NodeVisibleControl"),g=o.resolveComponent("force-graph-svg-icon"),v=pn,b=o.resolveComponent("RightMenu"),w=o.resolveComponent("SnapShotDialog"),_=d2;return n.graphApi?o.withDirectives((o.openBlock(),o.createElementBlock("div",Xne,[o.createElementVNode("div",{class:o.normalizeClass(["graph-box",{"hide-right-menu":!n.isShowRightMenu}])},[n.title?(o.openBlock(),o.createElementBlock("div",{key:0,class:"safe-force-title",innerHTML:n.title},null,8,Qne)):o.createCommentVNode("",!0),t[4]||(t[4]=o.createElementVNode("div",{class:"top-line-bg"},null,-1)),o.createElementVNode("div",Zne,[o.createElementVNode("div",Vne,[o.createVNode(l,{ref:"buttonList","hide-button-list":n.hideButtonList,selection:s.selection,history:s.history,"module-detail":s.moduleDetail,"request-graph-data":s.requestGraphData,"show-top-search":n.showTopSearch,onSaveSnapshot:a.saveSnapshot,onAddNodes:a.addNode,onAutoDisplay:a.autoDisplay,onDeleteNodes:a.deleteNodes,onFixNodes:a.fixAllNodes,onToggleLayout:a.toggleLayout,onImportCsvData:a.importCsvData},null,8,["hide-button-list","selection","history","module-detail","request-graph-data","show-top-search","onSaveSnapshot","onAddNodes","onAutoDisplay","onDeleteNodes","onFixNodes","onToggleLayout","onImportCsvData"])])]),o.createVNode(c,{ref:"render","enable-script":n.enableScript,"module-detail":s.moduleDetail,history:s.history,"level-list":n.levelList,selection:s.selection,data:s.history.dataNow,"request-graph-data":s.requestGraphData,"dark-mode":n.darkMode,"node-type-scale":n.nodeTypeScale,"node-type-list":s.nodeTypeList,"link-distance":n.linkDistance,strength:n.strength,"node-width":n.nodeWidth,"start-node-width":n.startNodeWidth,"start-node-animation":n.startNodeAnimation,"custom-tooltip":n.customTooltip,"edge-label-max-length":n.edgeLabelMaxLength,"custom-node-images":n.customNodeImages,onUpdateSelection:a.updateSelection,onOnaction:a.onAction,onHandleSelectNode:a.handleSelectNode,onCustomContextmenuClick:a.handleCustomContextMenuClick},null,8,["enable-script","module-detail","history","level-list","selection","data","request-graph-data","dark-mode","node-type-scale","node-type-list","link-distance","strength","node-width","start-node-width","start-node-animation","custom-tooltip","edge-label-max-length","custom-node-images","onUpdateSelection","onOnaction","onHandleSelectNode","onCustomContextmenuClick"]),s.selection.length>0?(o.openBlock(),o.createElementBlock("p",ere,[t[2]||(t[2]=o.createTextVNode(" 已选择")),o.createElementVNode("span",tre,o.toDisplayString(s.selection.length),1),t[3]||(t[3]=o.createTextVNode("项 "))])):o.createCommentVNode("",!0),o.withDirectives(o.createElementVNode("div",nre,[o.createElementVNode("span",null,o.toDisplayString(s.loadingInfo),1),o.createVNode(d,{class:"is-loading"},{default:o.withCtx(()=>[o.createVNode(u)]),_:1})],512),[[o.vShow,s.isLoading]]),n.hasLegend?(o.openBlock(),o.createBlock(f,{key:2,"show-point":n.showPoint,history:s.history,"module-detail":s.moduleDetail,"has-level":n.hasLevel,"show-level-count":n.showLevelCount,margin:s.margin,onHighLight:a.handleHighLight},null,8,["show-point","history","module-detail","has-level","show-level-count","margin","onHighLight"])):o.createCommentVNode("",!0),n.hasNodeVisibleControl?(o.openBlock(),o.createBlock(p,{key:3,history:s.history,"module-detail":s.moduleDetail,"start-node":n.startNode,"custom-node-images":n.customNodeImages},null,8,["history","module-detail","start-node","custom-node-images"])):o.createCommentVNode("",!0),o.createElementVNode("div",rre,[!s.fullScreen&&a.topFrame?(o.openBlock(),o.createBlock(v,{key:0,content:"进入全屏",placement:"left","popper-class":"el-tooltip-gray"},{default:o.withCtx(()=>[o.createVNode(g,{"icon-class":e.imgPath["./public/d3svg1/button18/full_button.svg"],alt:"",class:"corner-button",onClick:a.toggleFullScreen},null,8,["icon-class","onClick"])]),_:1})):o.createCommentVNode("",!0),s.fullScreen&&a.topFrame?(o.openBlock(),o.createBlock(v,{key:1,content:"退出全屏",placement:"left","popper-class":"el-tooltip-gray"},{default:o.withCtx(()=>[o.createVNode(g,{"icon-class":e.imgPath["./public/d3svg1/button18/un_full_button.svg"],alt:"",class:"corner-button",onClick:a.toggleFullScreen},null,8,["icon-class","onClick"])]),_:1})):o.createCommentVNode("",!0),o.createVNode(v,{content:"适应屏幕",placement:"left","popper-class":"el-tooltip-gray"},{default:o.withCtx(()=>[o.createVNode(g,{"icon-class":e.imgPath["./public/d3svg1/button18/fit_button.svg"],alt:"",class:"corner-button",onClick:a.fitScreen},null,8,["icon-class","onClick"])]),_:1}),o.createVNode(v,{content:"放大",placement:"left","popper-class":"el-tooltip-gray"},{default:o.withCtx(()=>[o.createVNode(g,{"icon-class":e.imgPath["./public/d3svg1/button18/zoom_in_button.svg"],alt:"",class:"corner-button",onClick:t[0]||(t[0]=C=>a.zoomView("in"))},null,8,["icon-class"])]),_:1}),o.createVNode(v,{content:"缩小",placement:"left","popper-class":"el-tooltip-gray"},{default:o.withCtx(()=>[o.createVNode(g,{"icon-class":e.imgPath["./public/d3svg1/button18/zoom_out_button.svg"],alt:"",class:"corner-button",onClick:t[1]||(t[1]=C=>a.zoomView("out"))},null,8,["icon-class"])]),_:1})])],2),n.isShowRightMenu?(o.openBlock(),o.createBlock(b,{key:0,"graph-data":s.history.dataNow,"selected-nodes":s.selection,"request-graph-data":s.requestGraphData,onChangeBox:a.handleTableSelect},null,8,["graph-data","selected-nodes","request-graph-data","onChangeBox"])):o.createCommentVNode("",!0),o.createVNode(w,{ref:"snapshot",snapshot:s.snapshot,"graph-api":n.graphApi,"graph-url-path":n.graphUrlPath,"custom-copy-path-fn":n.customCopyPathFn},null,8,["snapshot","graph-api","graph-url-path","custom-copy-path-fn"])])),[[_,s.bigLoading]]):o.createCommentVNode("",!0)}const bu=xt(Jne,[["render",ire]]),Cae="",w0={props:bu.props,setup(e){return()=>o.h(UA,{namespace:"force-graph-el"},{default:()=>o.h(bu,e)})}};bu.install=function(e){e.component(bu.name,w0)},zs.install=function(e){e.component(zs.name,zs)};const Sae="",ore=[w0,zs],sre={install:function(e,t={}){ore.forEach(n=>{e.component(n.name,n)})}};De.Graph=w0,De.Render=zs,De.default=sre,Object.defineProperties(De,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
|
|
139
|
+
`).slice(1));try{for(s.s();!(n=s.n()).done;){var a=hte(n.value);a&&r.push(a)}}catch(l){s.e(l)}finally{s.f()}return r.slice(0,10)}var Fs=function(e){return fte(e).toString()},v0=function(e){return e instanceof ErrorEvent?e.message==="Script error."?mu:gu:wl},pte=function(){function e(t){ud(this,e),si(this,"errorIdSet",new Set),this.webCoreIns=t,this.errorIdSet=new Set}return fd(e,[{key:"init",value:function(){var t;if(this.initJsError(),this.initResourceError(),this.initPromiseError(),this.initCorsError(),(t=window.__QAPM__)!==null&&t!==void 0&&(t=t.q)!==null&&t!==void 0&&t.length){var n={error:this.onJSError.bind(this),reject:this.onPromiseError.bind(this)};window.__QAPM__.q.forEach(function(){var r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},s=r.type,a=r.event,l=n[s];l&&l(a)}),window.__QAPM__.q=[]}}},{key:"initJsError",value:function(){var t=this;window.addEventListener("error",function(n){return t.onJSError(n)},!0)}},{key:"initResourceError",value:function(){var t=this;window.addEventListener("error",function(n){return t.onResourceError(n)},!0)}},{key:"initPromiseError",value:function(){var t=this;window.addEventListener("unhandledrejection",function(n){return t.onPromiseError(n)},!0)}},{key:"initCorsError",value:function(){var t=this;window.addEventListener("error",function(n){return function(r){if(v0(r)===mu){var s={errorType:mu,errorMessage:r.message,errorSummary:"CorsError",errorId:Fs("".concat(mu,"-").concat(r.message))};t.commit(s)}}(n)},!0)}},{key:"onResourceError",value:function(t){if(v0(t)===wl){var n=t.target||t.srcElement,r=n.src||n.href,s=JSON.stringify(wl+": "+r||"UnKnown Resource"),a={errorType:wl,errorMessage:s,errorSummary:"ResourceError",errorId:Fs("".concat(wl,"-").concat(s))};this.commit(a)}}},{key:"onJSError",value:function(t){var n,r;if(v0(t)===gu){var s=JSON.stringify(t.message),a=function(c){var u=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"unknown";if(!c)return u;try{var d=new URL(c);return d.pathname&&d.pathname.endsWith(".js")?c:u}catch(f){return c}}(t.filename,(n=this.webCoreIns.config)===null||n===void 0?void 0:n.appKey),l={errorType:gu,errorMessage:s,errorSummary:t.error&&((r=t.error)===null||r===void 0?void 0:r.name)||"UnKnown",errorStack:JSON.stringify(yu(t.error)),errorId:Fs("".concat(gu,"-").concat(s,"-").concat(a))};this.commit(l)}}},{key:"onPromiseError",value:function(t){var n,r,s=JSON.stringify(((n=t.reason)===null||n===void 0?void 0:n.message)||t.reason||"UnKnown"),a=((r=t.reason)===null||r===void 0?void 0:r.name)||"UnKnown",l={errorType:c5,errorMessage:s,errorSummary:a,errorStack:JSON.stringify(yu(t.reason)),errorId:Fs("".concat(c5,"-").concat(s,"-").concat(a))};this.commit(l)}},{key:"onVueError",value:function(t,n,r){var s=JSON.stringify(t.message),a={errorType:d5,errorMessage:s,errorSummary:t.name||"UnKnown",errorStack:JSON.stringify(yu(t)),errorId:Fs("".concat(d5,"-").concat(s,"-").concat(t.name))};this.commit(a)}},{key:"onReactError",value:function(t,n){var r=JSON.stringify(t.message),s={errorType:u5,errorMessage:r,errorSummary:t.name||"UnKnown",errorStack:JSON.stringify(yu(t)),errorId:Fs("".concat(u5,"-").concat(r,"-").concat(t.name))};this.commit(s)}},{key:"commit",value:function(t){var n=t.errorId;this.errorIdSet.has(n)||(this.errorIdSet.add(n),this.webCoreIns.commit(Ga({type:"error"},t)))}}]),e}(),gte=function(e){function t(){var s,a=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return ud(this,t),(s=fG(this,t,[a])).config=a,s.isReport()?(s.PerformancePluginInstance=new ete(Ka(s)),s.WhiteScreenPluginInstance=new ate(Ka(s)),s.ErrorPluginInstance=new pte(Ka(s)),s.plugins=[s.PerformancePluginInstance,s.WhiteScreenPluginInstance,s.ErrorPluginInstance],s.init(),q_(t,t,$s,Ka(s)),s):z_(s)}var n,r;return function(s,a){if(typeof a!="function"&&a!==null)throw new TypeError("Super expression must either be null or a function");s.prototype=Object.create(a&&a.prototype,{constructor:{value:s,writable:!0,configurable:!0}}),Object.defineProperty(s,"prototype",{writable:!1}),a&&jp(s,a)}(t,Vee),fd(t,[{key:"isReport",value:function(){var s=this.isIE(),a=this.calcRatio();return this.config.appKey&&a&&!s}},{key:"init",value:(r=Wa(ar().mark(function s(){return ar().wrap(function(a){for(;;)switch(a.prev=a.next){case 0:this.initTime(this.mixed()),this.plugins.forEach(function(l){try{l.init()}catch(c){console.error("initPlugin Error",c)}});case 2:case"end":return a.stop()}},s,this)})),function(){return r.apply(this,arguments)})},{key:"mixed",value:function(){var s=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},a=this.uid(),l=this.getTime(),c=l.time,u=l.date,d=this.getUA(),f=window.location,p=f.host,g=f.origin,v=f.pathname;return Ga(Ga({uid:a,sid:this.sid,url:window.location.href,host:p,fullPath:g+v,sdkVersion:this.sdkVersion,createDate:u,appKey:this.config.appKey,createTime:c,appVersion:this.appVersion,env:this.env},d),s)}},{key:"commit",value:(n=Wa(ar().mark(function s(a){var l,c;return ar().wrap(function(u){for(;;)switch(u.prev=u.next){case 0:try{l=this.mixed(a),c=new URL("".concat(window.location.protocol,"//").concat(this.host,"/log.gif")),Object.entries(l).map(function(d){var f=hG(d,2),p=f[0],g=f[1];c.searchParams.set(p,g)}),new Image().src=c.toString()}catch(d){console.log("commit Error",d)}case 1:case"end":return u.stop()}},s,this)})),function(s){return n.apply(this,arguments)})}],[{key:"install",value:function(s){var a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};pd(t,t,$s)||(s.config.errorHandler=function(l,c,u){pd(t,t,$s).ErrorPluginInstance.onVueError(l,c,u),console.error(l)},q_(t,t,$s,new t(a)))}},{key:"sendError",value:function(s){pd(t,t,$s)?pd(t,t,$s).ErrorPluginInstance.onReactError(s):console.error("QAPM: 请先初始化 QAPM!")}}]),t}(),$s={writable:!0,value:null};const Jse="",Xse="",mte={components:{InfoFilled:xf,ArrowRight:Sf},mixins:[kr],inject:["hasLevel"],props:{axis:{required:!0,type:Object,default:()=>({x:0,y:0})},show:{required:!0,type:Boolean,default:!1},nodeInfo:{required:!0,type:Array,default:()=>[]},menuOptions:{required:!0,type:Array,default:()=>[]},border:{type:Boolean,required:!1,default:!0},itemWidth:{type:Number,required:!1,default:206},itemHeight:{type:Number,required:!1,default:36},itemSize:{type:Number,required:!1,default:14},offset:{type:Object,required:!1,default:()=>({x:6,y:2})},borderWidth:{type:Number,required:!1,default:6},history:{type:Object,required:!0,default:()=>{}},moduleDetail:{type:Object,required:!0,default:()=>{}}},emits:["contextmenu-click"],data(){return{checkedItems:{},globalMenus:RM,maxMulti:6}},computed:{checkboxMenu(){return this.nodeInfo.length>1?[]:this.menuOptions},canGoDetail(){var e,t,n,r;return((t=(e=this.moduleDetail)==null?void 0:e.config)==null?void 0:t.jumpDetail)&&((r=this.moduleDetail)==null?void 0:r.config.jumpRule[(n=this.nodeInfo[0])==null?void 0:n.type])},systemMenu(){var r,s,a,l,c,u,d;const e=[];if(this.nodeInfo.length===1){const f=this.nodeInfo[0];f.type!=="aggregation"&&f.type!=="nodeType"&&(e.push(Yh),(r=this.history.keyNodeIds)!=null&&r.some(_=>_===f.id)||(e.push(Qh),(a=(s=this.moduleDetail)==null?void 0:s.config)!=null&&a.hideCollectMenu||e.push(f.collect?Xh:Jh),e.push(f.textProp==="name"?Gh:Hh),f.label&&e.push(f.textProp==="label"?Wh:Kh)),this.canGoDetail&&e.push(K2)),e.push(f.fx?qh:jh);const p=this.history.dataNow.links.some(w=>w.source.id===f.id&&w.target.type==="aggregation"),b=this.history.dataNow.links.filter(w=>w.source.id===f.id).map(w=>w.target).some(w=>{let _=0;return this.history.dataNow.links.map(C=>{C.source.id===w.id&&_++}),_===0});p||f.type==="aggregation"?e.push(H2):b&&e.push(q2),b&&e.push(j2),e.push(Zh)}else this.nodeInfo.length>1?(e.push(Qh,Yh),e.push(this.nodeInfo.some(p=>!p.collect)?Jh:Xh),this.nodeInfo.some(p=>p.label)&&e.push(this.nodeInfo.some(p=>p.textProp!=="label")?Kh:Wh),e.push(this.nodeInfo.some(p=>p.textProp!=="name")?Hh:Gh),e.push(this.nodeInfo.some(p=>!p.fx)?jh:qh),e.push(Zh)):this.nodeInfo.length===0&&(this.history.dataNow.nodes.some(p=>p.label)&&e.push(this.history.dataNow.nodes.some(p=>p.textProp!=="label")?$2:F2),e.push(this.history.dataNow.nodes.some(p=>p.textProp!=="name")?D2:M2),e.push(this.history.dataNow.nodes.some(p=>!p.fx)?R2:L2),this.history.currentIndex>0&&e.push(z2),this.history.currentIndex<this.history.length-1&&e.push(U2));const t=(l=this.nodeInfo[0])==null?void 0:l.type,n=(d=(u=(c=this.nodeInfo[0])==null?void 0:c.detail)==null?void 0:u.info)==null?void 0:d.extraNodeContextMenus;return t!=="nodeType"&&(n!=null&&n.length)&&(n.forEach(f=>{f.icon||(f.icon="button_edit_label")}),e.push(...n)),e},totalHeight(){let e=this.menuOptions.length*(this.itemHeight+5)+10+44+48+5,t=this.systemMenu.length*(this.itemHeight+5)+10+44+5;return e=this.menuOptions.length===0?0:44,t=this.systemMenu.length===0?0:44,e+t},axisComputed(){const e=document.getElementsByClassName("d3-container")[0],t=this.axis.top-e.offsetTop;return{top:(t<e.offsetHeight/2?Math.min(t+this.offset.y,Math.max(e.offsetHeight-this.totalHeight,e.getBoundingClientRect().top)):Math.max(t+this.offset.y,this.totalHeight+e.getBoundingClientRect().top))+"px",left:this.axis.left+this.offset.x+"px",transform:`translate(${this.axis.left>e.offsetWidth/2?"-100%":"0%"}, ${t>e.offsetHeight/2?"-100%":"0%"})`}},liStyle(){return{width:this.itemWidth+"px",height:this.itemHeight+"px",lineHeight:this.itemHeight+"px",fontSize:this.itemSize+"px"}},firstLeft(){const e=document.body.offsetWidth;return this.axis.left+this.itemWidth*2>=e},secondLeft(){const e=document.body.offsetWidth;return this.axis.left+this.itemWidth*3>=e},checkedItemsFinal(){return Object.keys(this.checkedItems).filter(e=>this.checkedItems[e]).map(e=>this.checkedItems[e])},haveInterface(){let e=!1;return this.menuOptions.map(t=>{t.type===1&&(e=!0)}),e}},watch:{show(){this.checkedItems={}}},methods:{handleCollapse(){},isSystemItem(e){return e.type===2},isExternalItem(e){return e.type===3},hasChildren(e){var t;return((t=e==null?void 0:e.children)==null?void 0:t.length)>0},onCheck(e,t){this.checkedItems[t.name]=e.currentTarget.checked?t:!1},secondBorderCheck(e,t=0){const n=document.body.offsetWidth,r=document.body.offsetHeight,s=this.axis.top+(e+t)*this.itemHeight;return{width:this.itemWidth*2+60+"px",left:this.axis.left+this.itemWidth*2>=n?"-100%":"100%",top:r>=s?0:"auto",bottom:r<s?0:"auto"}},thirdBorderCheck(e,t,n,r){const s=document.body.offsetWidth,a=document.body.offsetHeight,l=this.secondBorderCheck(e,n).top;let c;const u=(t+r)*this.itemHeight,d=u>180?180:u;return l===0?c=this.axis.top+e*this.itemHeight+d:c=this.axis.top-e*this.itemHeight+d,{left:this.axis.left+this.itemWidth*3>=s?"-100%":"100%",bottom:a>=c?0:"auto",top:a<c?0:"auto"}},handleClick(e,t){if(!t){if(Gt({cId:"contextMenu-"+e.name,c:"右键菜单-"+e.namec}),e.has_child>0)return!1;me(this,"contextmenu-click",{nodes:this.nodeInfo,api:e})}},handleDataClick(e,t){Gt({cId:"contextMenu-"+e.name,c:"右键菜单-"+e.namec}),me(this,"contextmenu-click",{nodes:this.nodeInfo,api:t,dataApi:e}),this.checkedItems={}}}},vte={"aria-hidden":"true",style:{position:"absolute",width:"0",height:"0",overflow:"hidden",display:"none"}},yte={class:"cm-list"},bte={class:"cm-ul"},wte={class:"hd"},_te=["src"],Cte={class:"bd"},Ste={class:"cm-ul cm-ul-level1"},Ete=["title"],xte=["title","onClick"],kte=["title","onClick"],Nte={key:0,class:"icon","aria-hidden":"true"},Tte=["title","onClick"],Ate=["src"],Ote=["title","onClick"],Ite={key:0,class:"fas el-icon-fa-cog"},Bte={key:1,class:"fas el-icon-fa-external-link-alt"},Pte={class:"text-wrapper"},Rte=["src"],Lte=["src"],Dte={key:3,class:"shortcut"},Mte={key:2,class:"icon","aria-hidden":"true"},Fte=["title","onClick"],$te={key:1,class:"icon","aria-hidden":"true"},zte=["title","onClick"];function Ute(e,t,n,r,s,a){const l=o.resolveComponent("ArrowRight"),c=Qe,u=o.resolveComponent("InfoFilled"),d=pn;return n.show?(o.openBlock(),o.createElementBlock("div",{key:0,class:"cm-container",style:o.normalizeStyle(a.axisComputed),onClick:t[1]||(t[1]=o.withModifiers((...f)=>a.handleCollapse&&a.handleCollapse(...f),["stop"]))},[(o.openBlock(),o.createElementBlock("svg",vte,t[2]||(t[2]=[o.createElementVNode("symbol",{id:"icon-arrow-right",viewBox:"0 0 1024 1024"},[o.createElementVNode("path",{d:"M288.791335 65.582671l446.41733 446.417329-446.41733 446.417329z"})],-1)]))),o.createElementVNode("div",yte,[o.createElementVNode("ul",bte,[a.checkboxMenu.length>0?(o.openBlock(),o.createElementBlock("li",{key:0,class:"cm-li data-opt-wrapper",style:o.normalizeStyle(a.liStyle)},[o.createElementVNode("div",wte,[o.createElementVNode("img",{src:e.imgPath["./public/d3svg1/button18/button_relation.svg"],style:{"margin-right":"10px"}},null,8,_te),t[3]||(t[3]=o.createTextVNode("按关系分类拓线")),o.createVNode(c,null,{default:o.withCtx(()=>[o.createVNode(l)]),_:1})]),o.createElementVNode("div",Cte,[o.createElementVNode("ul",Ste,[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(a.checkboxMenu,(f,p)=>(o.openBlock(),o.createElementBlock("li",{key:p,class:"cm-li context-one",style:o.normalizeStyle(a.liStyle)},[a.hasChildren(f)?(o.openBlock(),o.createElementBlock("div",{key:0,class:o.normalizeClass(["cm-item",a.firstLeft?"cm-left":""]),title:f.namec},[o.createElementVNode("span",null,o.toDisplayString(f.namec),1),t[4]||(t[4]=o.createElementVNode("svg",{class:"icon","aria-hidden":"true"},[o.createElementVNode("use",{"xlink:href":"#icon-arrow-right"})],-1))],10,Ete)):(o.openBlock(),o.createElementBlock("div",{key:1,class:o.normalizeClass(["cm-item",a.firstLeft?"cm-left":""]),title:f.namec,onClick:o.withModifiers(g=>a.handleDataClick(f,s.globalMenus.expandPartNode),["stop"])},[o.createElementVNode("span",null,o.toDisplayString(f.namec),1)],10,xte)),a.hasChildren(f)?(o.openBlock(),o.createElementBlock("ul",{key:2,class:"cm-ul cm-ul-level2",style:o.normalizeStyle(a.secondBorderCheck(p,f.children.length))},[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(f.children,(g,v)=>(o.openBlock(),o.createElementBlock("li",{key:v,class:"cm-li",style:o.normalizeStyle(a.liStyle)},[o.createElementVNode("div",{class:o.normalizeClass(["cm-item",a.secondLeft?"cm-left":""]),title:g.namec,onClick:o.withModifiers(b=>a.handleDataClick(g,s.globalMenus.expandPartNode),["stop"])},[o.createElementVNode("span",null,o.toDisplayString(g.namec),1),a.hasChildren(g)?(o.openBlock(),o.createElementBlock("svg",Nte,t[5]||(t[5]=[o.createElementVNode("use",{"xlink:href":"#icon-arrow-right"},null,-1)]))):o.createCommentVNode("",!0)],10,kte),a.hasChildren(g)?(o.openBlock(),o.createElementBlock("ul",{key:0,class:"cm-ul cm-ul-level3",style:o.normalizeStyle(a.thirdBorderCheck(p,v,f.children.length,g.children.length))},[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(g.children,(b,w)=>(o.openBlock(),o.createElementBlock("li",{key:w,class:"cm-li",style:o.normalizeStyle(a.liStyle)},[o.createElementVNode("div",{class:"cm-item",title:b.namec,onClick:o.withModifiers(_=>a.handleDataClick(b,s.globalMenus.expandPartNode),["stop"])},[o.createElementVNode("span",null,o.toDisplayString(b.namec),1)],8,Tte)],4))),128))],4)):o.createCommentVNode("",!0)],4))),128))],4)):o.createCommentVNode("",!0)],4))),128))])])],4)):n.nodeInfo.length>1&&n.nodeInfo.length<s.maxMulti?(o.openBlock(),o.createElementBlock("li",{key:1,class:"cm-li data-opt-wrapper data-opt-all",style:o.normalizeStyle(a.liStyle)},[o.createElementVNode("div",{class:"hd",onClick:t[0]||(t[0]=o.withModifiers(f=>a.handleDataClick(null,s.globalMenus.expandNode),["stop"]))},[o.createElementVNode("img",{src:e.imgPath["./public/d3svg1/button18/button_relation.svg"],style:{"margin-right":"10px"}},null,8,Ate),t[6]||(t[6]=o.createTextVNode("展开全部关系 "))]),t[7]||(t[7]=o.createElementVNode("div",{class:"bd"},null,-1))],4)):o.createCommentVNode("",!0),(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(a.systemMenu,(f,p)=>(o.openBlock(),o.createElementBlock("li",{key:p,class:"cm-li",style:o.normalizeStyle(a.liStyle)},[o.createElementVNode("div",{class:o.normalizeClass(["cm-item",{"cm-left":a.firstLeft,disabled:f.disabled}]),title:f.namec,onClick:o.withModifiers(g=>a.handleClick(f,f.disabled),["stop"])},[a.isSystemItem(f)?(o.openBlock(),o.createElementBlock("i",Ite)):a.isExternalItem(f)?(o.openBlock(),o.createElementBlock("i",Bte)):o.createCommentVNode("",!0),o.createElementVNode("div",Pte,[f.icon?(o.openBlock(),o.createElementBlock("img",{key:0,src:e.imgPath["./public/d3svg1/button18/"+f.icon+".svg"],class:"t-icon"},null,8,Rte)):(o.openBlock(),o.createElementBlock("img",{key:1,src:e.imgPath["./public/d3svg1/button18/button_"+f.name+".svg"],class:"t-icon"},null,8,Lte)),f.tooltip?(o.openBlock(),o.createBlock(d,{key:2,class:"el-icon-info",effect:"dark",content:f.tooltip,placement:"top-start"},{default:o.withCtx(()=>[o.createVNode(c,null,{default:o.withCtx(()=>[o.createVNode(u)]),_:1})]),_:2},1032,["content"])):o.createCommentVNode("",!0),o.createElementVNode("span",null,o.toDisplayString(f.namec),1),f.shortcut?(o.openBlock(),o.createElementBlock("span",Dte,o.toDisplayString(f.shortcut),1)):o.createCommentVNode("",!0)]),a.hasChildren(f)?(o.openBlock(),o.createElementBlock("svg",Mte,t[8]||(t[8]=[o.createElementVNode("use",{"xlink:href":"#icon-arrow-right"},null,-1)]))):o.createCommentVNode("",!0)],10,Ote),a.hasChildren(f)?(o.openBlock(),o.createElementBlock("ul",{key:0,class:"cm-ul cm-ul-level2",style:o.normalizeStyle(a.secondBorderCheck(p,f.children.length))},[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(f.children,(g,v)=>(o.openBlock(),o.createElementBlock("li",{key:v,class:"cm-li",style:o.normalizeStyle(a.liStyle)},[o.createElementVNode("div",{class:o.normalizeClass(["cm-item",{"cm-left":a.secondLeft,disabled:f.disabled||g.disabled}]),title:g.namec,onClick:o.withModifiers(b=>a.handleClick(g,f.disabled||g.disabled),["stop"])},[g.tooltip?(o.openBlock(),o.createBlock(d,{key:0,class:"el-icon-info",effect:"dark",content:g.tooltip,placement:"top-start"},{default:o.withCtx(()=>[o.createVNode(c,null,{default:o.withCtx(()=>[o.createVNode(u)]),_:1})]),_:2},1032,["content"])):o.createCommentVNode("",!0),o.createElementVNode("span",null,o.toDisplayString(g.namec),1),a.hasChildren(g)?(o.openBlock(),o.createElementBlock("svg",$te,t[9]||(t[9]=[o.createElementVNode("use",{"xlink:href":"#icon-arrow-right"},null,-1)]))):o.createCommentVNode("",!0)],10,Fte),a.hasChildren(g)?(o.openBlock(),o.createElementBlock("ul",{key:0,class:"cm-ul cm-ul-level3",style:o.normalizeStyle(a.thirdBorderCheck(p,v,f.children.length,g.children.length))},[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(g.children,(b,w)=>(o.openBlock(),o.createElementBlock("li",{key:w,class:"cm-li",style:o.normalizeStyle(a.liStyle)},[o.createElementVNode("div",{class:o.normalizeClass(["cm-item",{disabled:f.disabled||g.disabled||b.disabled}]),title:b.namec,onClick:o.withModifiers(_=>a.handleClick(b,f.disabled||g.disabled||b.disabled),["stop"])},[b.tooltip?(o.openBlock(),o.createBlock(d,{key:0,class:"el-icon-info",effect:"dark",content:b.tooltip,placement:"top-start"},{default:o.withCtx(()=>[o.createVNode(c,null,{default:o.withCtx(()=>[o.createVNode(u)]),_:1})]),_:2},1032,["content"])):o.createCommentVNode("",!0),o.createElementVNode("span",null,o.toDisplayString(b.namec),1)],10,zte)],4))),128))],4)):o.createCommentVNode("",!0)],4))),128))],4)):o.createCommentVNode("",!0)],4))),128))])])],4)):o.createCommentVNode("",!0)}const jte=xt(mte,[["render",Ute],["__scopeId","data-v-dfb39ec8"]]),Qse="",Zse="",Vse="",eae="",qte={name:"Popover",components:{ForceGraphSvgIcon:uo},mixins:[kr],inject:["levelList","hasLevel"],props:{showPopover:{type:Boolean,default:!1},mousePosition:{type:Object,default:()=>({left:0,top:0})},nodeInfo:{type:Object,default:()=>{}},type:{type:String,default:"node"},moduleDetail:{type:Object,default:()=>{}},data:{type:Object,default:()=>{}},darkMode:{type:Boolean,default:!0},history:{type:Object,default:()=>({})},customTooltip:{type:Function}},data(){return{isFunction:Rl,showSelf:!1,onPop:!1,position:null,aggregationList:[]}},computed:{show(){return this.showPopover||this.showSelf},name(){var e,t,n;return((n=(t=(e=this.nodeInfo)==null?void 0:e.detail)==null?void 0:t.info)==null?void 0:n.name)||this.nodeInfo.name},isNormalNode(){return this.nodeInfo.type!=="nodeType"&&this.nodeInfo.type!=="aggregation"},isNodeTypeNode(){return this.nodeInfo.type==="nodeType"},isAggregateNode(){return this.nodeInfo.type==="aggregation"},fieldMapThisType(){var e;return this.moduleDetail.detail_field_map&&this.moduleDetail.detail_field_map[`${(e=this.nodeInfo)==null?void 0:e.type}_detail_info`]},canGoDetail(){return["nodeType","aggregation","family","org","report","vul","thumbprint_md5","email","cert_https"].indexOf(this.nodeInfo.type)<0}},watch:{mousePosition(){setTimeout(()=>{var c,u,d;const e=this.mousePosition.left>document.body.offsetWidth/2,t=this.mousePosition.top>document.body.offsetHeight/2,n=(c=document.getElementsByClassName("popover-container")[0])==null?void 0:c.offsetHeight,r=(u=document.getElementsByClassName("d3-container")[0])==null?void 0:u.offsetHeight,s=(d=document.getElementsByClassName("d3-container")[0])==null?void 0:d.getBoundingClientRect().top;let a;t?a=Math.max(this.mousePosition.top,n+s)+5:a=Math.min(this.mousePosition.top,Math.max(r-n,s))-5;const l={left:(e?this.mousePosition.left+2:this.mousePosition.right-2)+"px",top:a+"px",transform:`translate(${e?"-100%":"0%"}, ${t?"-100%":"0%"})`};this.position=l},100)},nodeInfo:{handler:function(){var t;const e=(((t=this.nodeInfo)==null?void 0:t.list)||[]).map(n=>{var s,a,l;const r=n.detail;return de(te({},n),{name:((s=r==null?void 0:r.info)==null?void 0:s.name)||n.name,level:((l=(a=r==null?void 0:r.info)==null?void 0:a.basic)==null?void 0:l.level)||""})});e==null||e.sort((n,r)=>{var l,c;const s=(l=this.levelList.find(u=>u.level===n.level))==null?void 0:l.dangerNumber;return((c=this.levelList.find(u=>u.level===r.level))==null?void 0:c.dangerNumber)-s}),this.aggregationList=e},immediate:!0}},methods:{handleMouseEnter(){this.showSelf=!0},handleMouseLeave(){this.showSelf=!1},isSomething(e){return Ph(e)},getTypeZh(e){var n,r,s;let t=e;if(e==="nodeType")t="关系节点";else for(const a in(n=this.moduleDetail)==null?void 0:n.nodes)if(e===((r=this.moduleDetail)==null?void 0:r.nodes[a].name)){t=(s=this.moduleDetail)==null?void 0:s.nodes[a].namec;break}return t},getLevelClass(e){return kc(e,this.levelList)},getColorStyle(e){return fo(e,this.levelList,this.darkMode)},getNodeTypeChildNum(e){var s;const t=(s=this.data)==null?void 0:s.links,n=[],r=[];return t==null||t.map(a=>{a.source.id===e&&(n.push(a.target.id),a.target.detail&&AD(a.target.detail.info.basic.level,this.levelList)&&r.push(a.target.id))}),{allChildNum:n.length,dangerChildNum:r.length}},canShowField(e){const t=this.hasFieldValue(e);return!(t===void 0||e.hide_hover||e.hide_empty&&!t)},hasFieldValue(e){const t=this.nodeInfo.detail&&this.nodeInfo.detail.info&&this.nodeInfo.detail.info.basic[e.prop];if(t===null)return;const n=Array.isArray(t);return n&&t.length>0||!n&&t!==""&&t!=="无"},getFieldValue(e){const t=this.nodeInfo.detail.info.basic[e.prop],n=Array.isArray(t),r=this.isSomething(t);let s="-";return r&&(n?s=t.length?t.join("|"):"-":s=t||"-"),s},formatTags(e){return Oc(Ic(e))},addToGraph(e){const t={type:"addFromAggregation",addOne:{nodes:[e],links:[{source:this.nodeInfo.relationId,target:e.id}]}};if(this.aggregationList=this.aggregationList.filter(n=>n.id!==e.id),this.history.updateAggregationNode(this.aggregationList,this.nodeInfo.id),this.history.pushState(t),this.aggregationList.length)me(Pe,"emitDataLoaded");else{const n=this.nodeInfo,r={deleteOne:{nodes:[n],links:[{source:n.relationId,target:n.id}]},type:"aggregation"};setTimeout(()=>{this.history.pushState(r),me(Pe,"emitDataLoaded")},0)}}}},Hte={key:0},Gte=["innerHTML"],Wte={key:1,class:"node-info-container"},Kte={class:"popover-block popover-header"},Yte={key:0,class:"popover-collect"},Jte={key:1,class:"row-item"},Xte={class:"label"},Qte={key:2,class:"row-item"},Zte={class:"value"},Vte={class:"node-type-info"},ene={class:"name"},tne={key:3,class:"row-item"},nne={class:"value"},rne={class:"popover-block popover-fields"},ine={key:0,class:"node-detail top-border"},one={key:0,class:"row-item"},sne=["title"],ane={key:1,class:"row-item row-item-tag"},lne={class:"value"},cne={class:"graph-tags-box"},dne={key:0,class:"row-item"},une={class:"label"},fne=["title"],hne={key:1,class:"node-statistics top-border"},pne={class:"row-item node-num"},gne={class:"value"},mne={key:0},vne={class:"danger"},yne={key:2,class:"node-aggregation"},bne={class:"aggregation-title"},wne={class:"aggregation-box"},_ne={key:2,class:"node-info-container"},Cne={class:"popover-fields"},Sne={class:"top"};function Ene(e,t,n,r,s,a){const l=o.resolveComponent("force-graph-svg-icon"),c=pn,u=ka,d=EL,f=so,p=SL;return o.openBlock(),o.createElementBlock("div",{class:o.normalizeClass(["popover-container",a.show?"show-popover":"hide-popover"]),style:o.normalizeStyle(s.position),onMouseenter:t[0]||(t[0]=(...g)=>a.handleMouseEnter&&a.handleMouseEnter(...g)),onMouseleave:t[1]||(t[1]=(...g)=>a.handleMouseLeave&&a.handleMouseLeave(...g))},[o.createElementVNode("div",null,[a.show&&n.customTooltip&&s.isFunction(n.customTooltip)?(o.openBlock(),o.createElementBlock("div",Hte,[o.createElementVNode("div",{innerHTML:n.customTooltip({nodeInfo:n.nodeInfo,data:n.data,moduleDetail:n.moduleDetail})},null,8,Gte)])):n.type==="node"?(o.openBlock(),o.createElementBlock("div",Wte,[o.createElementVNode("div",Kte,[n.nodeInfo.collect?(o.openBlock(),o.createElementBlock("div",Yte,[o.createVNode(c,{content:"已收藏","popper-class":"el-tooltip-gray",placement:"left"},{default:o.withCtx(()=>[o.createVNode(l,{class:"button-img","icon-class":e.imgPath["./public/d3svg1/star.svg"]},null,8,["icon-class"])]),_:1})])):o.createCommentVNode("",!0),a.isNormalNode?(o.openBlock(),o.createElementBlock("div",Jte,[o.createElementVNode("div",Xte,o.toDisplayString(a.getTypeZh(n.nodeInfo.type))+":",1),o.createElementVNode("div",{class:o.normalizeClass(["value",{"star-next":n.nodeInfo.collect}])},o.toDisplayString(a.name),3)])):o.createCommentVNode("",!0),a.isNodeTypeNode?(o.openBlock(),o.createElementBlock("div",Qte,[t[2]||(t[2]=o.createElementVNode("div",{class:"label"},"关系节点:",-1)),o.createElementVNode("div",Zte,[o.createElementVNode("div",Vte,[o.createElementVNode("div",ene,o.toDisplayString(n.nodeInfo.name),1)])])])):o.createCommentVNode("",!0),n.nodeInfo.label?(o.openBlock(),o.createElementBlock("div",tne,[t[3]||(t[3]=o.createElementVNode("div",{class:"label"},"备注:",-1)),o.createElementVNode("div",nne,o.toDisplayString(n.nodeInfo.label),1)])):o.createCommentVNode("",!0)]),o.createElementVNode("div",rne,[a.isNormalNode&&n.nodeInfo.detail?(o.openBlock(),o.createElementBlock("div",ine,[a.canGoDetail&&a.hasLevel?(o.openBlock(),o.createElementBlock("div",one,[t[4]||(t[4]=o.createElementVNode("div",{class:"label"},"危险级别:",-1)),o.createElementVNode("div",{class:o.normalizeClass(["value level",a.getLevelClass(n.nodeInfo.detail&&n.nodeInfo.detail.info.basic.level)]),title:n.nodeInfo.detail&&n.nodeInfo.detail.info.basic.level||"--"},o.toDisplayString(n.nodeInfo.detail&&n.nodeInfo.detail.info.basic.level||"--"),11,sne)])):o.createCommentVNode("",!0),n.nodeInfo.detail&&n.nodeInfo.detail.tags&&n.nodeInfo.detail.tags.length>0?(o.openBlock(),o.createElementBlock("div",ane,[t[7]||(t[7]=o.createElementVNode("div",{class:"label"},"标签:",-1)),o.createElementVNode("div",lne,[o.createElementVNode("div",cne,[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(a.formatTags(n.nodeInfo.detail.tags),(g,v)=>(o.openBlock(),o.createBlock(c,{key:v,"popper-class":"el-tooltip-gray"},{content:o.withCtx(()=>[o.createElementVNode("div",null,[o.createTextVNode(o.toDisplayString(g.name===g.desc?g.name:g.name+":"+g.desc)+" ",1),g.disabled?(o.openBlock(),o.createElementBlock(o.Fragment,{key:0},[t[5]||(t[5]=o.createElementVNode("br",null,null,-1)),t[6]||(t[6]=o.createTextVNode(" 标签状态:失效 "))],64)):o.createCommentVNode("",!0)])]),default:o.withCtx(()=>[o.createElementVNode("span",null,[o.createVNode(u,{class:o.normalizeClass(["graph-tag-one",`${g.type||"unknown"} ${g.disabled?"tag-disable":""}`]),type:g.type||"info"},{default:o.withCtx(()=>[o.createTextVNode(o.toDisplayString(g.name),1)]),_:2},1032,["class","type"])])]),_:2},1024))),128))])])])):o.createCommentVNode("",!0),(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(a.fieldMapThisType,(g,v)=>(o.openBlock(),o.createElementBlock(o.Fragment,null,[a.canShowField(g)?(o.openBlock(),o.createElementBlock("div",dne,[o.createElementVNode("div",une,o.toDisplayString(g.zh)+":",1),o.createElementVNode("div",{class:o.normalizeClass(["value",{red:g.prop==="virus_name"}]),title:n.nodeInfo.detail.info.basic[v]},o.toDisplayString(a.getFieldValue(g)),11,fne)])):o.createCommentVNode("",!0)],64))),256))])):o.createCommentVNode("",!0),a.isNodeTypeNode?(o.openBlock(),o.createElementBlock("div",hne,[o.createElementVNode("div",pne,[t[9]||(t[9]=o.createElementVNode("div",{class:"label"},"拓展节点统计:",-1)),o.createElementVNode("div",gne,[a.getNodeTypeChildNum(n.nodeInfo.id).dangerChildNum>0?(o.openBlock(),o.createElementBlock("span",mne,[o.createElementVNode("span",vne,o.toDisplayString(a.getNodeTypeChildNum(n.nodeInfo.id).dangerChildNum),1),t[8]||(t[8]=o.createTextVNode("/"))])):o.createCommentVNode("",!0),o.createTextVNode(o.toDisplayString(a.getNodeTypeChildNum(n.nodeInfo.id).allChildNum),1)])])])):o.createCommentVNode("",!0),a.isAggregateNode?(o.openBlock(),o.createElementBlock("div",yne,[o.createElementVNode("div",bne,"聚合节点 ("+o.toDisplayString(s.aggregationList.length)+"个)",1),o.createElementVNode("div",wne,[o.createVNode(p,{data:s.aggregationList,style:{width:"100%"}},{default:o.withCtx(()=>[o.createVNode(d,{prop:"name","min-width":"200",label:"名称"}),o.createVNode(d,{sortable:"",prop:"type",label:"类型"}),o.createVNode(d,{sortable:"",prop:"level",width:"80",label:"级别"},{default:o.withCtx(g=>[o.createElementVNode("span",{style:o.normalizeStyle({color:a.getColorStyle(g.row.level)})},o.toDisplayString(g.row.level||"--"),5)]),_:1}),o.createVNode(d,{label:"操作"},{default:o.withCtx(g=>[o.createVNode(f,{class:"add-to-graph-btn",type:"primary",text:"",size:"small",onClick:v=>a.addToGraph(g.row)},{default:o.withCtx(()=>t[10]||(t[10]=[o.createTextVNode(" 添加到图谱 ")])),_:2},1032,["onClick"])]),_:1})]),_:1},8,["data"])])])):o.createCommentVNode("",!0)])])):(o.openBlock(),o.createElementBlock("div",_ne,[o.createElementVNode("div",Cne,[o.createElementVNode("div",Sne,o.toDisplayString(n.nodeInfo.apiName),1)])]))])],38)}const xne=xt(qte,[["render",Ene],["__scopeId","data-v-194a65c9"]]),kne=[{id:52,product_id:0,name:"copy",namec:"复制",parent_id:0,has_child:0,status:0,type:2,path:"0-52",pos:65,ctime:"0000-00-00 00:00:00",utime:"2019-06-04 16:49:38",children:[]},{id:62,product_id:0,name:"release_aggregation",namec:"释放聚合顶点",parent_id:0,has_child:0,status:0,is_sys:0,is_detail:0,type:2,path:"0-62",pos:1,ctime:"0000-00-00 00:00:00",utime:"2019-05-06 15:08:10",children:[]}],y0={name:"vue-safe-force-graph",version:"2.0.76",description:"force_graph in security area",author:"jason zhang",module:"./lib/vue-safe-force-graph.js",main:"./lib/vue-safe-force-graph.umd.cjs",type:"module",files:["/lib/"],exports:{".":{import:"./lib/vue-safe-force-graph.js",require:"./lib/vue-safe-force-graph.umd.cjs"},"./*":"./*"},scripts:{dev:"vite","dev:base64":"vite --mode development_base64",lib:"vite build","lib:base64":"vite build --mode production_base64","lib:webcomponent":"vite build --mode web_component",patch:'npm version patch -m "Upgrade to %s "',"patch:base64":'npm version patch -m "Upgrade to %s for base64"',p:"npm run patch && npm run lib && npm run lib:webcomponent && npm publish","p:base64":"npm run patch:base64 && npm run lib:base64 && npm publish",lint:"eslint --ext .js,.vue src",lintFix:"eslint --fix --ext .js,.vue src",imageToCdn:"node qcdn.cjs",imageToBase64:"node qcdn.cjs --buildtype=base64",changelog:"conventional-changelog -p angular -i CHANGELOG.md -s -r 0"},dependencies:{"@element-plus/icons-vue":"^2.1.0","@q/qapm":"^1.1.7","csv-parse":"^5.0.4",d3:"^7.8.5","d3-lasso":"0.0.5","element-plus":"^2.8.8",json2csv:"^5.0.7",konva:"^9.2.0","lodash-es":"^4.17.21","mime-types":"^2.1.35",minimist:"^1.2.6","radar-js-analytic-sdk":"^2.2.6",vue:"^3.5.3","vue-clipboard3":"^2.0.0","vue-router":"^4.1.6","vue-virtual-scroller":"^2.0.0-beta.8"},devDependencies:{"@babel/core":"^7.23.3","@babel/preset-env":"^7.23.3","@originjs/vite-plugin-commonjs":"^1.0.3","@q/qcdn":"^3.2.4","@vitejs/plugin-vue":"^4.1.0",axios:"^0.21.1","babel-eslint":"^10.1.0",eslint:"^7.32.0","eslint-plugin-vue":"^8.0.3",imageinfo:"^1.0.4",qs:"^6.10.1","rollup-plugin-visualizer":"^5.9.0",sass:"^1.62.0","unplugin-auto-import":"^0.15.2","unplugin-element-plus":"^0.8.0","unplugin-vue-components":"^0.24.1",vite:"^4.3.1"},browserslist:["> 1%","last 2 versions"],engines:{node:">=8.9",npm:">= 3.0.0"},license:"MIT"},mae="",{toClipboard:Nne}=Bc(),Tne="Arial,Helvetica Neue,Helvetica,PingFang SC,Hiragino Sans GB,Microsoft YaHei,sans-serif",Lr=1,Ane=["ip","intranet","internet"],b0=20,Yt={},One={name:"ForceGraphRenderByCanvas",components:{Popover:xne,NodeContextmenu:jte},mixins:[kr],provide:function(){return{levelList:this.levelList}},props:{data:{type:Object,default:()=>({nodes:[],links:[]})},history:{type:Object,default:()=>({})},linkDistance:{type:Number,default:120},strength:{type:Number,default:-600},isThreatPath:{type:Boolean,default:!1},requestGraphData:{type:Boolean,default:!1},moduleDetail:{type:Object,default:()=>{}},graphApi:{type:Object,default:()=>{}},alphaDecay:{type:Number,default:.0228},alphaMin:{type:Number,default:.001},darkMode:{type:Boolean,default:!0},levelList:{type:Array,default:()=>[{level:"未知",levelName:"未知",className:"unknown",normalColor:"#666",darkColor:"#c6cdd5",dangerNumber:0},{level:"危险",levelName:"危险",className:"warn",normalColor:"#CF1322",darkColor:"#fb2400",dangerNumber:1},{level:"普通",levelName:"普通",className:"normal",normalColor:"#007EE2",darkColor:"#0094ff",dangerNumber:-1},{level:"安全",levelName:"安全",className:"safe",normalColor:"#009A75",darkColor:"#00da90",dangerNumber:-2}]},nodeWidth:{type:Number},startNodeWidth:{type:Number},nodeTypeScale:{type:Number,default:1},nodeTypeList:{type:Array,default:()=>[]},manualTickNumber:{type:Number,default:500},startNodeAnimation:{type:Boolean,default:!0},customTooltip:{type:Function},enableScript:{type:Boolean,default:!1},edgeLabelMaxLength:{type:Number,default:10},customNodeImages:{type:Object,default:()=>{}}},emits:["handle-select-node","custom-contextmenu-click","flagFiles","updateSelection"],data(){return{prefix:"./public/",iconAllLoaded:!1,customIconLoaded:!1,iconSize:{},iconFiles:{},flagFiles:{},highlightRule:{},nodesRange:null,mousePosition:{left:0,top:0},hoverNodePosition:{},uniqueClass:"",showPopover:!1,popoverTimer:null,popoverType:"",popoverContent:{},popoverNode:{},showContextMenu:!1,contextMenuNode:{},menuOptions:[],isDragging:!1,originTransform:null,dragNodeFix:!1,destroyed:!1,actKey:rs()?"metaKey":"ctrlKey",levelHeight:100,actNum:0,scriptNow:null,scriptInited:!1,canAct:!1,isKeyUp:!0,initTimes:0,resizeObserver:null,canvasElement:null,stage:o.shallowRef(null),layer:o.shallowRef(null),nodesGroup:o.shallowRef({}),linksGroup:o.shallowRef({}),grab:o.shallowRef(null),simulation:o.shallowRef(null),nodes:o.shallowRef(null),links:o.shallowRef(null),hoveredNode:o.shallowRef(null),mouseDownNode:o.shallowRef(null),selectionRect:null,selection:[],scale:Lr,mousedownPos:null,mousedownNode:null,mouseupNode:null,dragLine:null,darkBgRect:null,inited:!1,hasSimulation:!1,nodesLength:0,ticking:!1,anim1:null,anim2:null,anim3:null}},computed:{isAutoTick(){var e;return((e=this.nodes)==null?void 0:e.length)<this.manualTickNumber},iconSizeComputed(){const e=Hr(this.iconSize);return this.nodeTypeList.forEach(t=>{e[t]=this.iconSize[t]*this.nodeTypeScale}),e},contextMenuNodes(){return this.contextMenuNode.id?this.selection.some(e=>e.id===this.contextMenuNode.id)?[...this.selection]:[this.contextMenuNode]:[]},showContextMenuFlag(){return this.requestGraphData?this.showContextMenu:!1}},watch:{data:{handler:function(){const e=this.nodesLength!==this.data.nodes.length;this.nodes=this.data.nodes,this.links=this.data.links,this.nodesLength=this.data.nodes.length,this.update(e)},deep:!0},moduleDetail:{handler:function(e){return ke(this,null,function*(){e!=null&&e.nodes&&!this.iconAllLoaded&&!this.customIconLoaded&&(yield this.loadCustomIcon(),yield this.loadIcons(),this.initForceGraph(),setTimeout(()=>{this.update()},50))})},deep:!0,immediate:!0},darkMode:{handler:function(e){return ke(this,null,function*(){const t=e?"dark":"light";setTimeout(()=>{this.update();const n=document.querySelectorAll(`.${this.uniqueClass}.render-container`);n!=null&&n.length&&(this.isThreatPath?n[0].setAttribute("data-theme",t):(n[0].setAttribute("data-theme",t),document.getElementsByClassName(this.uniqueClass+" render-container")[0].parentElement.parentElement.setAttribute("data-theme",t)))},200)})},immediate:!0}},created(){Qr.setProject("QH_10542_1724").getTrack(),console.log("组件版本: "+(y0==null?void 0:y0.version)),this.isThreatPath||this.initKeyEvent(),this.uniqueClass="unique"+new Date().getTime()+Math.floor(Math.random()*1e5)},mounted(){return ke(this,null,function*(){new gte({appKey:"fe-force-graph",ratio:50}),this.initForceGraph(),TD(this.levelList),!this.isThreatPath&&(Ei(Pe,"buttonClick",e=>{mn(e,"buttonClick msg"),this.handleContextMenuClick(e)}),Ei(Pe,"relationClick",e=>{this.handleContextMenuClick(e)}),Ei(Pe,"sendNodesRange",(e,t)=>{e!==void 0&&(this.nodesRange=e,this.updateNodeStyle())}))})},beforeUnmount(){xi(Pe,"buttonClick"),xi(Pe,"relationClick"),xi(Pe,"sendNodesRange"),this.unbindKeyEvent(),this.resetAll(),mn("destroy")},methods:{initForceGraph(){return ke(this,null,function*(){if(this.inited)return;const e=this.$refs.canvasContainer;let t=e.clientWidth,n=e.clientHeight;this.resizeObserver=new ResizeObserver(s=>{for(const a of s){if(t=a.contentRect.width,n=a.contentRect.height,mn(`新宽度: ${t}px, 新高度: ${n}px`),t===0||n===0)return;this.stage.width(t),this.stage.height(n),this.layer&&this.layer.batchDraw(),this.hasSimulation&&this.updateSimulation()}}),this.resizeObserver.observe(e),document.addEventListener("click",this.hideContextMenu,!1),this.nodes=this.data.nodes,this.links=this.data.links,this.stage=new tt.Stage({container:e,width:t,height:n,scaleX:Lr,scaleY:Lr}),this.layer=new tt.Layer,this.grab=new tt.Group({id:"grab",x:0,y:0}),this.layer.add(this.grab);const r=this.layer.getCanvas()._canvas;this.canvasElement=r,this.stage.on("mousemove",s=>{if(!this.mousedownNode||!s.evt[this.actKey]){if(this.resetMouseVars(),this.selectionRect&&s.evt.altKey){const a=this.stage.getPointerPosition(),l=(a.x-this.stage.x())/this.scale,c=(a.y-this.stage.y())/this.scale,u=l-this.selectionRect.x(),d=c-this.selectionRect.y();this.selectionRect.width(u),this.selectionRect.height(d),this.stage.batchDraw()}}else{const a=this.stage.getPointerPosition(),l=this.stage.scaleX(),c=(a.x-this.stage.x())/l,u=(a.y-this.stage.y())/l;this.dragLine.points([this.mousedownPos.x,this.mousedownPos.y,c,u]),this.layer.batchDraw()}}),this.stage.on("wheel",s=>{s.evt.preventDefault();const a=1.1,l=this.scale,c=s.evt.deltaY<0?l*a:l/a;this.scale=c;const u=this.stage.getPointerPosition(),d=this.stage.position(),f=u.x-(u.x-d.x)*(c/l),p=u.y-(u.y-d.y)*(c/l);this.stage.setAttrs({scaleX:c,scaleY:c,x:f,y:p}),this.layer.batchDraw()}),this.stage.on("mousedown",s=>{const a=s.target;if(a&&a.nodeType==="Stage"?this.stage.setDraggable(!0):this.stage.setDraggable(!1),s.evt.altKey){this.stage.setDraggable(!1);const l=this.stage.scaleX(),c=this.stage.getPointerPosition(),u=(c.x-this.stage.x())/l,d=(c.y-this.stage.y())/l;this.selectionRect=new tt.Rect({x:u,y:d,width:0,height:0,stroke:"rgb(80, 80, 80)",strokeWidth:2}),this.layer.add(this.selectionRect),this.stage.batchDraw()}}),this.stage.on("mouseup",s=>{if(this.stage.setDraggable(!1),this.selectionRect&&s.evt.altKey){const a=this.selectionRect.x(),l=this.selectionRect.y(),c=this.selectionRect.width(),u=this.selectionRect.height();this.selection=this.nodes.filter(d=>{const f={x:d.x,y:d.y},p=Math.min(a,a+c),g=Math.max(a,a+c),v=Math.min(l,l+u),b=Math.max(l,l+u);return f.x>=p&&f.x<=g&&f.y>=v&&f.y<=b}),this.updateSelection(),this.selectionRect.destroy(),this.selectionRect=null}}),this.stage.on("contextmenu",this.handleGlobalContextMenu),this.stage.on("click",s=>{s.target&&s.target.nodeType==="Stage"&&this.handleDeselectNode(s)}),this.setSimulation(),this.stage.add(this.layer),this.stage.draw(),this.update(),this.inited=!0})},setSimulation(){var n;if(this.hasSimulation||!((n=this.nodes)!=null&&n.length))return;const e=this.stage.width()/(2*Lr),t=this.stage.height()/(2*Lr);this.hasSimulation=!0,this.simulation=lG(this.nodes).force("link",KH(this.links).id(r=>r.id).distance(this.linkDistance).strength(1)).force("charge",cG().strength(this.strength)).force("x",dG()).force("y",uG()).force("center",S_(e,t)).alphaDecay(this.alphaDecay).alphaMin(this.alphaMin).stop(),this.nodeWidth&&this.simulation.force("collision",GH().radius(this.nodeWidth/2)),this.isAutoTick?(this.simulation.alpha(1).restart(),this.simulation.on("tick",this.ticked)):(this.simulation.on("tick",null),this.sendManualTick()),this.simulation.on("end",()=>{mn("simulation end time",Date.now()),this.isThreatPath&&this.centerAndZoom(1)})},sendManualTick(){var e;mn("sendManualTick",(e=this.nodes)==null?void 0:e.length),!this.ticking&&(this.ticking=!0,this.doClearCanvas(),this.simulation.alphaDecay(this.alphaDecay*2),this.simulation.alphaMin(this.alphaMin*5),this.simulation.alpha(1).restart(),setTimeout(()=>{console.time("tick");for(let t=0,n=Math.ceil(Math.log(this.simulation.alphaMin())/Math.log(1-this.simulation.alphaDecay()));t<n;++t)mn("tick"),this.simulation.tick();console.timeEnd("tick"),this.ticking=!1,this.update(),this.centerAndZoom()},1e3))},update(e=!1){return ke(this,null,function*(){var t,n,r;!this.iconAllLoaded&&((n=(t=this.moduleDetail)==null?void 0:t.nodes)!=null&&n.length)&&!this.customIconLoaded&&(yield this.loadIcons(),yield this.loadCustomIcon()),!this.destroyed&&(r=this.nodes)!=null&&r.length&&(this.initScript(),mn("update"),e&&this.updateSimulation(),this.doClearCanvas(),this.paintLinks(),this.paintNodes(),this.updateSelection(),this.ticked(),this.actNum===9&&setTimeout(()=>{this.centerAndZoom(.8)},200))})},doClearCanvas(){this.nodesGroup={},this.linksGroup={},this.layer.destroyChildren(),this.grab=new tt.Group({id:"grab",x:0,y:0}),this.layer.add(this.grab)},paintNodes(){const e=this.stage.width()/2,t=this.stage.height()/2,n=this.selection.map(r=>r.id);this.nodes.forEach(r=>ke(this,null,function*(){var _,C,N,S,E,k,A,O,I,z,P,M,K,j,Q,H,L,U,q,W,D,ae,re;const s=(C=(_=r.detail)==null?void 0:_.info)==null?void 0:C.icon_img;let a;r.type==="nodeType"?a=this.iconSizeComputed[r.icon]||this.iconSizeComputed.node_type:a=this.iconSize[r.icon]||this.iconSize[r.type]||24,r.startNode&&this.startNodeWidth&&(a=this.startNodeWidth);const l=((E=(S=(N=r==null?void 0:r.detail)==null?void 0:N.info)==null?void 0:S.basic)==null?void 0:E.level)||"",c=(O=(A=(k=r==null?void 0:r.detail)==null?void 0:k.info)==null?void 0:A.basic)==null?void 0:O.flag;let u;try{u=yield this.getNodeImage(r)}catch(Y){console.log(Y)}this.nodesGroup[r.id]&&((I=this.nodesGroup[r.id])==null||I.destroy());const d=new tt.Group({name:"nodeGroup",opacity:1,id:`${r.id}`,x:r.x?r.x:e,y:r.y?r.y:t,draggable:!0,visible:r.show});if(n.includes(r.id)&&d.addName("isSelected"),r.startNode&&this.startNodeAnimation){const Y=fo(l,this.levelList,this.darkMode),J=new tt.Circle({x:0,y:0,radius:20,fill:Y,opacity:0}),se=new tt.Circle({x:0,y:0,radius:20,fill:Y,opacity:0}),ie=new tt.Circle({x:0,y:0,radius:20,fill:Y,opacity:0});d.add(J),d.add(se),d.add(ie);const F=(G,ee)=>new tt.Animation(function(le){const ue=le.time;if(ue%ee/ee===0)return!1;const ye=.5-.5*(ue%ee)/ee,Ce=40*(ue%ee)/ee;G.radius(Ce||0),G.opacity(ye)},this.layer);(z=this.anim1)==null||z.stop(),(P=this.anim2)==null||P.stop(),(M=this.anim3)==null||M.stop(),this.anim1=F(J,1500),this.anim2=F(se,1500),this.anim3=F(ie,1500),(K=this.anim1)==null||K.start(),setTimeout(()=>{this.anim2.start()},500),setTimeout(()=>{this.anim3.start()},1e3)}else if(r.startNode&&!this.startNodeAnimation){const Y=fo(l,this.levelList,this.darkMode),J=new tt.Circle({x:0,y:0,radius:20,fill:Y,opacity:this.startNodeAnimation?0:.3});d.add(J)}if(!s&&(r.type==="ip"||r.type==="internet"||r.type==="country"||r.type==="target_country")){const Y=fo(l,this.levelList,this.darkMode),J=new tt.Circle({x:0,y:0,fill:this.darkMode?"#182628":"#fff",radius:a/2,stroke:Y,strokeWidth:2});d.add(J)}if(u){const Y=c||(Q=(j=r==null?void 0:r.detail)==null?void 0:j.info)!=null&&Q.inner_country?20:a,J=u&&new tt.Image({x:0,y:0,offsetX:Y/2,offsetY:Y/2,image:u,width:Y,height:Y,draggable:!1});d.add(J)}if(!s&&r.detail&&r.type==="md5"){const Y=((U=(L=(H=r.detail.info)==null?void 0:H.basic)==null?void 0:L.file_type)==null?void 0:U.toUpperCase())||"MD5",J=new tt.Text({name:"md5Text",x:0,y:0,text:Y,fontSize:4,fontWeight:700,fontFamily:Tne,fill:this.darkMode?"#182628":"#fff",align:"center",listening:!1});J.x(J.x()-J.width()/2),d.add(J)}const f=r.textProp||"name",p=f==="name"?((W=(q=r==null?void 0:r.detail)==null?void 0:q.info)==null?void 0:W.name)||r.name:r[f];let g=(p==null?void 0:p.length)>14&&!Ane.includes(r.type)?p.slice(0,7)+"..."+p.slice(-7):p;g=MD(g);const v=new tt.Text({offsetY:a/2,name:"konvaText",x:0,y:a+8,text:g,fontSize:12,fontFamily:"Calibri",fill:this.darkMode?"#cdd9da":"#000",align:"center",listening:!1,visible:!!r.textProp});v.x(v.x()-v.width()/2),d.add(v);const b=new tt.Circle({name:"border",x:0,y:0,radius:a/2,fill:"#5c6271",opacity:.4,visible:!1});if(d.add(b),(ae=(D=r.detail)==null?void 0:D.tags)!=null&&ae.length){const Y=new tt.Circle({x:((a/2||14)+5)*Math.sin(60*Math.PI/180),y:-((a/2||14)+5)*Math.cos(60*Math.PI/180),radius:3,fill:"#9300ff",listening:!1});d.add(Y)}if(r.type!=="nodeType"&&r.type!=="aggregation"){var w=new tt.Circle({name:"collect",x:((a/2||14)+5)*Math.sin(0*Math.PI/180),y:-((a/2||14)+5)*Math.cos(0*Math.PI/180),radius:3,fill:"#ffad00",visible:!!r.collect});d.add(w)}if(r.label){const Y=new tt.Circle({x:((a/2||14)+5)*Math.sin(30*Math.PI/180),y:-((a/2||14)+5)*Math.cos(30*Math.PI/180),radius:3,fill:"#0099ff",listening:!1});d.add(Y)}if(r.type==="nodeType"&&r.showTotal){const Y=(a/2||14)+5,J=70*Math.PI/180,se=Y*Math.sin(J),ie=-Y*Math.cos(J),F=new tt.Circle({x:se,y:ie,radius:10,fill:"#1890ff",stroke:"white",strokeWidth:2,listening:!1});d.add(F);const G=new tt.Text({x:se,y:ie,text:`${((re=r==null?void 0:r.children)==null?void 0:re.length)||0}`,fontSize:10,fontFamily:"Calibri",fill:"#fff",align:"center",verticalAlign:"middle",listening:!1});G.offsetX(G.width()/2),G.offsetY(G.height()/2),d.add(G)}d.on("dragstart",(Y,J)=>{Y.evt&&Y.evt[this.actKey]||(this.isAutoTick&&this.simulation.alphaTarget(.3).restart(),this.isDragging=!0)}),d.on("dragmove",Y=>{if(!(Y.evt&&Y.evt[this.actKey])){var J=this.simulation.nodes().find(se=>se.id===r.id);J&&(J.x=d.x(),J.fx=d.x(),J.y=d.y(),J.fy=d.y(),this.links.forEach(se=>{const ie=this.linksGroup[`${se.source.id}-${se.target.id}`],F=ie==null?void 0:ie.findOne(".konvaLine"),G=ie==null?void 0:ie.findOne(".linkArrow"),ee=ie==null?void 0:ie.findOne(".edgeLabel");let le,ue,ve,ye;if(se.source.id===J.id){if(!this.nodesGroup[se.target.id])return;le=J.x,ue=this.nodesGroup[se.target.id].x(),ve=J.y,ye=this.nodesGroup[se.target.id].y(),F.points([le,ve,ue,ye]);const Ce=Rh(le,ve,ue,ye,b0);G==null||G.x(Ce==null?void 0:Ce.x),G==null||G.y(Ce==null?void 0:Ce.y),G==null||G.rotation(Math.atan2(ye-ve,ue-le)*(180/Math.PI))}else if(se.target.id===J.id){if(!this.nodesGroup[se.source.id])return;le=this.nodesGroup[se.source.id].x()||0,ue=J.x||0,ve=this.nodesGroup[se.source.id].y()||0,ye=J.y||0,F.points([le,ve,ue,ye]);const Ce=Rh(le,ve,ue,ye,b0);G==null||G.x(Ce==null?void 0:Ce.x),G==null||G.y(Ce==null?void 0:Ce.y),G==null||G.rotation(Math.atan2(ye-ve,ue-le)*(180/Math.PI))}if(ee&&(se.source.id===J.id||se.target.id===J.id)){ee.x((le+ue)/2),ee.y((ve+ye)/2),ee.offsetX(ee.getWidth()/2||0),ee.offsetY(ee.getHeight()/2+8||0);const Ce=Math.atan2(ye-ve,ue-le)*(180/Math.PI);ue<le?ee.rotation(Ce+180):ee.rotation(Ce)}}),this.layer.batchDraw())}}),d.on("dragend",Y=>{Y.evt&&Y.evt[this.actKey]||(this.isAutoTick&&this.simulation.alphaTarget(0),this.isDragging=!1)}),d.on("click",Y=>{Y.evt.detail===2?this.expandNodes(Y,r):Y.evt.detail===1&&Y.evt.button===0&&this.handleNodeClick(Y,r)}),d.on("contextmenu",Y=>{Y.cancelBubble=!0,Y.evt.preventDefault(),Y.evt.stopPropagation(),this.handleNodeContextMenu(Y,r,d)}),d.on("mouseup",Y=>this.handleNodeMouseUp(Y,r)),d.on("mousedown",Y=>this.handleNodeMouseDown(Y,r)),d.on("mouseenter",Y=>this.handleNodeMouseEnter(Y,r)),d.on("mouseleave",Y=>this.handleNodeMouseLeave(Y,r)),this.grab.add(d),this.nodesGroup[r.id]=d})),this.stage.batchDraw()},paintLinks(){const e=this.stage.width()/2,t=this.stage.height()/2;this.links.forEach(n=>{this.linksGroup[`${n.source.id}-${n.target.id}`]&&this.linksGroup[`${n.source.id}-${n.target.id}`].destroy();const r=new tt.Group({opacity:1,id:`${n.source.id}-${n.target.id}`,visible:n.source.show&&n.target.show}),s=this.darkMode?"#445152":"#999",a=new tt.Arrow({name:"linkArrow",pointerLength:10,pointerWidth:10,x:e,y:t,fill:s});r.add(a);const l=n.source.x||0,c=n.source.y||0,u=n.target.x||0,d=n.target.y||0,f=new tt.Line({name:"konvaLine",id:`${n.source.id}-${n.target.id}`,points:[l,c,u,d],stroke:n.target.type==="org"?"#cf1322":s,strokeWidth:1,dash:n.diy===!0?[5,5]:null});if(n.edgeLabelProp){const p=n.edgeLabelProp.length>this.edgeLabelMaxLength?n.edgeLabelProp.substring(0,this.edgeLabelMaxLength)+"...":n.edgeLabelProp,g=new tt.Text({name:"edgeLabel customEdgeLabel",x:(l+u)/2,y:(c+d)/2,text:p,fontSize:12,fill:this.darkMode?"#cdd9da":"#000"});r.add(g)}if(n.target.type==="nodeType"){const p=n.target.relay_name||n.target.name,g=new tt.Text({name:"edgeLabel",x:(l+u)/2,y:(c+d)/2,text:p,fontSize:12,fill:this.darkMode?"#cdd9da":"#000"});r.add(g)}r.add(f),r.on("mouseenter",p=>this.handleLinkMouseEnter(p,n)),r.on("mouseleave",p=>this.handleLinkMouseLeave(p,n)),this.grab.add(r),r.moveToBottom(),this.linksGroup[`${n.source.id}-${n.target.id}`]=r}),this.stage.batchDraw()},updateSimulation(){var e,t;try{if(!this.simulation&&!this.hasSimulation){this.setSimulation();return}this.simulation.nodes(this.nodes),this.simulation.force("link").links(this.links),this.simulation.alpha(.4).restart(),this.history.layoutIndex===0?((e=this.nodes)==null?void 0:e.length)<this.manualTickNumber?this.simulation.on("tick",this.ticked):(this.simulation.on("tick",null),this.sendManualTick()):this.simulation.on("tick",this.ticked)}catch(n){console.log(n,"simulation-e1"),(t=this.simulation)==null||t.stop()}},ticked(){switch(mn("ticked"),this.history.layoutIndex){case 0:this.forceLayout();break;case 1:this.treeLayout();break;default:this.forceLayout();break}},forceLayout(){var t;if(!this.nodes.length||!this.links.length)return;let e=!0;for(let n=0;n<this.links.length;n++){const r=this.links[n],s=this.linksGroup[`${r.source.id}-${r.target.id}`],a=s==null?void 0:s.findOne(".konvaLine"),l=s==null?void 0:s.findOne(".linkArrow"),c=s==null?void 0:s.findOne(".edgeLabel");let u=r.source.x,d=r.source.y,f=r.target.x,p=r.target.y;const g=f-u||1,v=p-d||1,b=Math.sqrt(g*g+v*v),w=g/b||1,_=v/b||1,C=r.source.type==="nodeType"?(this.iconSizeComputed[r.source.icon]||14)/2-1:(this.iconSize[r.target.type]||14)/2-1,N=r.target.type==="nodeType"?(this.iconSizeComputed[r.target.icon]||14)/2-1:(this.iconSize[r.target.type]||14)/2-1;if(u=u+C*w,d=d+C*_,f=f-N*w,p=p-N*_,isNaN(u)||isNaN(d)||isNaN(f)||isNaN(p)){e=!1;break}if(a==null||a.points([u,d,f,p]),l){const S=Rh(u,d,f,p,b0);l==null||l.x((S==null?void 0:S.x)||0),l==null||l.y((S==null?void 0:S.y)||0),l==null||l.rotation(Math.atan2(p-d,f-u)*(180/Math.PI))}if(c){c.x((u+f)/2),c.y((d+p)/2),c.offsetX(c.getWidth()/2||0),c.offsetY(c.getHeight()/2+8||0);const S=Math.atan2(p-d,f-u)*(180/Math.PI);f<u?c.rotation(S+180):c.rotation(S)}}if(!e){mn("请点击自动布局按钮"),this.resetLayout();return}for(let n=0;n<this.nodes.length;n++){const r=this.nodes[n];(t=this.nodesGroup[r.id])==null||t.position({x:r.x||0,y:r.y||0})}},selectEdgesByNode(e){const t=e.map(n=>n.id);this.links.forEach(n=>{const r=this.linksGroup[`${n.source.id}-${n.target.id}`];t.includes(n==null?void 0:n.target.id)||t.includes(n==null?void 0:n.source.id)?r==null||r.addName("isSelected"):r==null||r.removeName("isSelected")})},showKeyWay(e){if(e.length!==1){this.links.forEach(r=>{const s=this.linksGroup[`${r.source.id}-${r.target.id}`];s==null||s.removeName("keyed")}),this.history.resetKeyLinksAndNodes();return}const{keyLinks:t,keyNodeIds:n}=this.history.findKeyLinksAndNodes(e[0].id,!0);this.links.forEach(r=>{const s=t.find(l=>l.source.id===r.source.id&&l.target.id===r.target.id),a=this.linksGroup[`${r.source.id}-${r.target.id}`];s?a==null||a.addName("keyed"):a==null||a.removeName("keyed")}),this.nodes.forEach(r=>{const s=this.nodesGroup[r.id];n.includes(r.id)?s==null||s.addName("keyed"):s==null||s.removeName("keyed")})},updateNodeStyle(){if(!this.iconAllLoaded)return;let e;this.nodesRange&&this.history.keyNodeIds?e=[...this.nodesRange.map(t=>t.id),...this.history.keyNodeIds]:this.nodesRange?e=this.nodesRange.map(t=>t.id):this.history.keyNodeIds&&(e=this.history.keyNodeIds),setTimeout(()=>{this.highlightByRule(this.highlightRule,e),this.updateNodesStyleByName(),this.updateLinksStyleByName()},0)},updateNodesStyleByName(){this.nodes.forEach(e=>{const t=this.nodesGroup[e.id];if(!t)return;const n=t==null?void 0:t.findOne(".border"),r=t==null?void 0:t.findOne(".konvaText"),s=this.darkMode?"#cdd9da":"#000";t!=null&&t.hasName("lowlight")?t==null||t.opacity(.4):t==null||t.opacity(1),t!=null&&t.hasName("isSelected")?(t.scale({x:8/7,y:8/7}),n==null||n.visible(!0)):(t.scale({x:1,y:1}),n==null||n.visible(!1)),e.type!=="nodeType"&&(t!=null&&t.hasName("isSelected")?(r==null||r.visible(!0),r==null||r.fill("#007ee2")):(r==null||r.visible(!!e.textProp),r==null||r.fill(s)))}),this.layer.batchDraw()},updateLinksStyleByName(){this.links.forEach(e=>{const t=this.linksGroup[`${e.source.id}-${e.target.id}`];if(!t)return;const n=t.findOne(".konvaLine"),r=t.findOne(".edgeLabel"),s=t.findOne(".linkArrow");t!=null&&t.hasName("lowlight")?t==null||t.opacity(.4):t==null||t.opacity(1);const a=this.darkMode?"#445152":"#999";if(t.hasName("isSelected")||t.hasName("keyed")){const l=e.target.type==="org"?"#cf1322":"#007ee2";n.stroke(l),s.fill(l),n.strokeWidth(1),t==null||t.opacity(1),r==null||r.fill("#007ee2"),t.hasName("keyed")?n.strokeWidth(3):n.strokeWidth(1)}else{const l=e.target.type==="org"?"#cf1322":a;this.linksGroup[`${e.source.id}-${e.target.id}`].removeName("isSelected"),n.strokeWidth(1),n.stroke(l),s.fill(l),r==null||r.fill(this.darkMode?"#cdd9da":"#000")}}),this.layer.batchDraw()},handleTableSelect(e=[]){this.selection=this.nodes.filter(t=>{let n;return e.length>1?n=e.indexOf(t.id)>=0&&t.type!=="nodeType"&&t.type!=="aggregation":n=e.indexOf(t.id)>=0,n}),this.updateSelection()},resetAll(){var e,t;document.removeEventListener("click",this.hideContextMenu),(e=this.simulation)==null||e.stop(),this.simulation=null,this.hasSimulation=!1,this.mousedownNode=null,this.mousedownPos=null,this.mouseupNode=null,this.$refs.canvasContainer&&((t=this.resizeObserver)==null||t.unobserve(this.$refs.canvasContainer)),this.nodes=[],this.links=[],this.resizeObserver=null,this.destroyed=!0,this.history.destroy&&this.history.destroy()},unbindKeyEvent(){this.initKeyEvent(1)},initKeyEvent(e=0){if(e){document.removeEventListener("keydown",this.keyDown),document.removeEventListener("keyup",this.keyUp);return}document.addEventListener("keydown",this.keyDown),document.addEventListener("keyup",this.keyUp),this.isKeyUp=!0},keyDown(e){const t=e.keyCode,n=e[this.actKey],r=e.shiftKey;if(this.isKeyUp)switch(t){case 17:break;case 16:this.toggleZoom(!1);break;case 38:break;case 40:this.goAction();break;case 67:if(window.getSelection().toString())return;n&&this.copyNodeText(this.selection);break;case 89:n&&!rs()&&this.$parent.historyForward();break;case 90:n&&r?this.$parent.historyForward():n&&this.$parent.historyBack();break;case 46:this.$parent.deleteNodes(this.selection);break}},keyUp(e){const t=e.keyCode,n=e.keyCode;if(rs())switch(n){case 17:break;case 16:this.toggleZoom(!0);break}else switch(t){case 17:break;case 16:this.toggleZoom(!0);break}this.isKeyUp=!0},initScript(){var r,s,a,l,c,u;if(!this.enableScript||this.scriptInited)return;((a=(s=(r=this.history)==null?void 0:r.dataNow)==null?void 0:s.nodes)==null?void 0:a.length)>0&&(this.scriptInited=!0);const e=["193.36.119.50","6cd7b91212983cc557c6e3e671734ff9"];let t=null;if((u=(c=(l=this.history)==null?void 0:l.dataNow)==null?void 0:c.nodes)==null||u.some(d=>{const f=e.indexOf(d.id);return f>=0&&d.startNode===!0&&(t=f),!0}),t===null)return;const n=[[{node:"193.36.119.50"},{node:"6cd7b91212983cc557c6e3e671734ff9"},{node:"http://9d1109ab.privatedns.org/download/FirefoxSetup.dll"},{node:"94.237.81.57"},{node:"chart.expocasheuro.com"}],[{node:"6cd7b91212983cc557c6e3e671734ff9"},{node:"http://9d1109ab.privatedns.org/download/FirefoxSetup.dll"},{node:"94.237.81.57"},{node:"chart.expocasheuro.com"},{node:"183.246.177.59"},{node:"e7db5b09a39e324d36e937d89f98fdb9122cd859"}]];this.scriptNow=n[t],this.canAct=!!this.scriptNow},goAction(){if(!this.scriptNow||this.actNum>(this.scriptNow.length-1)*2)return;if(this.actNum===(this.scriptNow.length-1)*2){this.centerAndZoom(),this.actNum++;return}const e=this.scriptNow[Math.floor(this.actNum/2)+1];if(this.actNum%2===0){if(!this.history.dataNow.nodes.some(t=>t.id===e.node))return;this.handleTableSelect(e.node),this.nodesMoveToCenterView([e.node]),this.actNum++}else this.$parent.expandNodes(this.selection[0]),setTimeout(()=>{this.nodesMoveToCenterView([this.selection[0].id])},100),this.actNum++},nodesMoveToCenterView(e,t=.9){if(e.length===0)return;const n=[],r=this.nodes.filter(N=>e.indexOf(N.id)>=0);r==null||r.forEach(function(N,S){const E=this.nodesGroup[N.id];n.push({bounds:(E==null?void 0:E.getClientRect())||{},fx:N.x||0,fy:N.y||0})});const s=this.getBounds(n);this.originTransform=this.originTransform={scaleX:this.stage.scaleX(),scaleY:this.stage.scaleY(),x:this.stage.x(),y:this.stage.y()};const a=this.stage.width(),l=this.stage.height()/1.5,c=s.width,u=s.height;if(c===0||u===0)return;let d=t/Math.max(c/a,u/l);d=Math.min(d,Lr)||Lr,this.scale=d;const f=this.stage.width()/(2*d),p=this.stage.height()/(2*d),g=this.nodesGroup[e[0]],v=g==null?void 0:g.getClientRect(),b=v.x*d,w=v.y*d,_=f-b,C=p-w;this.stage.setAttrs({scaleX:d,scaleY:d,x:_||0,y:C||0}),this.layer.batchDraw()},getBounds(e){let t,n,r,s;return e.map(a=>{const l=a.bounds,c=l.x+a.fx,u=l.y+a.fy;t=Math.min(c,t)||c,n=Math.min(u,n)||u,r=Math.max(c+l.width,r)||c+l.width,s=Math.max(u+l.height,s)||u+l.height}),{x:t,y:n,width:r-t,height:s-n}},resetMouseVars(){var e;this.mousedownNode=null,this.mousedownPos=null,this.mouseupNode=null,(e=this.dragLine)==null||e.destroy(),Object.keys(this.nodesGroup).forEach(t=>{this.nodesGroup[t].draggable(!0)})},loadCustomIcon(){if(this.customNodeImages&&!this.customIconLoaded){let e=0;const t=Object.keys(this.customNodeImages).length;Object.keys(this.customNodeImages).forEach(n=>ke(this,null,function*(){e++,Yt[n]=yield xr(this.customNodeImages[n]),e===t&&(this.customIconLoaded=!0)}))}else this.customIconLoaded=!0},loadIcons(){return new Promise((e,t)=>{const n=[],r=[];for(const u in this.moduleDetail.plugs){const d=this.moduleDetail.plugs[u];d==null||d.map(f=>{f.children?r.push(...f.children):r.push(f)})}n.push(...r.map(u=>u.icon)),n.push(...this.moduleDetail.nodes.map(u=>u.name)),n.push("node_type"),n.push("node"),n.push("aggregation");const s=this;let a=0;const l=n.filter(u=>this.imgPath[`${s.prefix}d3svg1/${u}.svg`]);function c(u){return{}.VITE_SVG_TYPE==="base64"?C2(u):w2(u)}l.map(u=>{c(this.imgPath[`${s.prefix}d3svg1/${u}.svg`]).then(d=>{s.iconFiles[u]=d;const f=FD(d).width;this.iconSize[u]=this.nodeWidth?this.nodeWidth:f,a++,a===l.length&&(s.iconAllLoaded=!0,e())}).catch(d=>{console.log(d,"e"),t()})})})},toggleZoom(e){},handleNodeContextMenu(e,t){var n,r;e.evt&&e.evt[this.actKey]||(clearTimeout(this.popoverTimer),this.showPopover=!1,this.contextMenuId++,this.contextMenuNode=t,this.mousePosition.left=e.evt.clientX,this.mousePosition.top=e.evt.clientY,this.showContextMenu=!0,e.currentTarget.type==="aggregation"?this.menuOptions=kne:this.menuOptions=(n=this.$parent.moduleDetail)!=null&&n.plugs[t.type]?Array.from((r=this.$parent.moduleDetail)==null?void 0:r.plugs[t.type]):[])},handleDeselectNode(e,t){me(this,"handle-select-node",{isSelected:!1,_node:o.toRaw(t)}),this.selection.length&&(this.selection=[],this.updateSelection()),this.setHighlightRule({}),this.hideContextMenu()},setHighlightRule({prop:e,type:t,value:n}){this.highlightRule={prop:e,type:t,value:n},this.updateNodeStyle(),t||yw(".legend-filter .out-box").classed("active",!1)},updateSelection(){const e=this.selection.map(t=>t.id);this.nodes.forEach(t=>{var n,r;e.includes(t.id)?(n=this.nodesGroup[t.id])==null||n.addName("isSelected"):(r=this.nodesGroup[t.id])==null||r.removeName("isSelected")}),me(this,"updateSelection")},toggleLayout(e){this.history.layoutIndex=e,this.nodes.map(t=>{t.fx=t.fy=null}),this.updateSimulation(),this.ticked(),setTimeout(()=>{this.centerAndZoom()},200)},handleNodeClick(e,t){Gt({cId:"handleNodeClick",c:"点击节点"}),this.canAct&&(t.type==="org"?window.open("http://bs.safe.360.net/starmap","__blank"):t.type==="nodeType"&&t.id.indexOf("org")>=0&&window.open("http://bs.safe.360.net/orglist?snapshot=true","__blank1")),this.hideContextMenu();const n=this.selection.some(s=>s.id===t.id);if(e.evt.shiftKey){if(t.type==="nodeType"||this.selection.some(s=>s.type==="nodeType"))return;n?this.selection=this.selection.filter(s=>s.id!==t.id):this.selection=[...this.selection,t]}else n?this.selection=[]:this.selection=[t];const r=this.selection.some(s=>s.id===t.id);me(this,"handle-select-node",{isSelected:r,_node:t}),this.updateSelection(),this.setHighlightRule(this.highlightRule)},handleNodeMouseEnter(e,t){if(!this.showContextMenu&&!e.evt[this.actKey]){const n=e.target.width(),r=e.target.height(),s=e.target,a=s.getAbsolutePosition(),c=s.getStage().container().getBoundingClientRect(),u=a.x-n/2+c.left,d=a.y-r/2+c.top,f=u,p=d,g=f,v=f+n,b=p,w=p+r;this.hoverNodePosition={top:b,right:v,bottom:w,left:g,width:n,height:r},this.popoverType="node",this.popoverContent={[t.type]:t.id},this.popoverNode=t,this.popoverTimer&&clearTimeout(this.popoverTimer),this.popoverTimer=setTimeout(()=>{this.showPopover=!0},200)}},handleNodeMouseLeave(e,t){this.showContextMenu||(clearTimeout(this.popoverTimer),this.showPopover=!1)},handleNodeMouseUp(e,t){var n;e.evt[this.actKey]&&this.mousedownNode&&(this.dragLine&&((n=this.dragLine)==null||n.destroy()),this.mouseupNode=t,this.mouseupNode.id===this.mousedownNode.id||this.mouseupNode.type==="aggregation"||this.mousedownNode.type==="aggregation"||this.$parent.addLink(this.mousedownNode,this.mouseupNode)),this.resetMouseVars()},handleNodeMouseDown(e,t){if(e.evt[this.actKey]){this.mousedownNode=t,this.nodesGroup[t.id].draggable(!1);const n=this.stage.scaleX(),r=this.stage.getPointerPosition(),s=(r.x-this.stage.x())/n,a=(r.y-this.stage.y())/n;this.mousedownPos={x:s,y:a},this.dragLine=new tt.Line({points:[s,a,s,a],stroke:"black",strokeWidth:1,dash:[5,5],opacity:.7,visible:!0}),this.layer.add(this.dragLine),this.stage.draw()}},handleLinkMouseEnter(e,t){if(t.target.type==="nodeType")return;const n=!!t.edgeLabelProp;let r;if(n?r=t.edgeLabelProp:r=t.target.relay_name||t.target.name,r.length<=this.edgeLabelMaxLength)return;const a=this.linksGroup[`${t.source.id}-${t.target.id}`].findOne(".edgeLabel"),l=t.source.x,c=t.source.y,u=t.target.x,d=t.target.y;a&&(a.text(r),a.x((l+u)/2),a.y((c+d)/2),a.offsetX(a.getWidth()/2||0),a.offsetY(a.getHeight()/2+8||0))},handleLinkMouseLeave(e,t){if(t.target.type==="nodeType")return;const n=!!t.edgeLabelProp;let r;if(n?r=t.edgeLabelProp:r=t.target.relay_name||t.target.name,r.length<=this.edgeLabelMaxLength)return;const a=this.linksGroup[`${t.source.id}-${t.target.id}`].findOne(".edgeLabel"),l=t.source.x,c=t.source.y,u=t.target.x,d=t.target.y;a&&(a.text(r.substring(0,this.edgeLabelMaxLength)+"..."),a.x((l+u)/2),a.y((c+d)/2),a.offsetX(a.getWidth()/2||0),a.offsetY(a.getHeight()/2+8||0))},treeLayout(){this.nodes.map(e=>{e.fx=e.pos,e.fy=e.levelNum*this.levelHeight}),this.forceLayout()},resetLayout(){var e,t;(e=this.simulation)!=null&&e.stop&&((t=this.simulation)==null||t.stop()),this.nodes.map(n=>{delete n.vx,delete n.vy,delete n.x,delete n.y,delete n.fx,delete n.fy}),this.updateSimulation()},selectSingleEdgeNode(e){const t=[];this.links.map(n=>{n.source.id===e.id&&t.push(n.target.id)});for(let n=t.length-1;n>=0;n--){let r=0,s=0;const a=t[n];this.links.map(l=>{l.source.id===a&&r++,l.target.id===a&&s++}),r>=1&&t.splice(n,1),s>=2&&t.splice(n,1)}return t},selectChildren(e){const t=[];this.links.map(n=>{n.source.id===e.id&&t.push(n.target.id)}),this.handleTableSelect(t)},selectParents(e){const t=[];this.links.map(n=>{n.target.id===e.id&&t.push(n.source.id)}),this.handleTableSelect(t)},handleGlobalContextMenu(e){this.mousePosition.left=e.evt.clientX,this.mousePosition.top=e.evt.clientY,this.menuOptions=[],this.showContextMenu=!0,this.showPopover=!1,this.contextMenuNode={},e.evt.preventDefault()},hideContextMenu(){this.showContextMenu=!1,this.contextMenuNode={}},centerAndZoom(e=.7,t=!1){var f,p,g;if(this.originTransform={scaleX:this.stage.scaleX(),scaleY:this.stage.scaleY(),x:this.stage.x(),y:this.stage.y()},!this.grab)return;const n=this.stage.width(),r=this.stage.height(),s=this.grab.getClientRect(),a=s.width/this.scale,l=s.height/this.scale;if(a===0||l===0)return;let c=e/Math.max(a/n,l/r);if(c=t?c:Math.min(c,Lr)||Lr,!t&&c>Lr)return;this.scale=c;const u=this.stage.width()/(2*c),d=this.stage.height()/(2*c);if((f=this.simulation)!=null&&f.force&&((p=this.simulation)==null||p.force("center",S_(u,d))),this.ticked(),this.stage.setAttrs({scaleX:c,scaleY:c,x:0,y:0}),this.layer.batchDraw(),this.history.layoutIndex===1){const v=this.grab.getClientRect(),b=(n-v.width)/2-v.x,w=(r-v.height)/2-v.y;this.stage.setAttrs({x:b,y:w}),this.layer.batchDraw(),(g=this.simulation)==null||g.stop()}},reset(){this.stage.setAttrs(this.originTransform)},handleContextMenuClick({nodes:e,api:t,dataApi:n}){if(this.requestGraphData){let r,s;const a={show_label:"label",all_show_label:"label",all_show_names:"name",show_names:"name"};switch(t&&t.name){case"edit_label":this.editLabel(e);break;case"single_edge_select":r=this.selectSingleEdgeNode(e[0]),this.selection=this.nodes.filter(l=>r.includes(l.id));break;case"hold_aggregation":s=this.selectSingleEdgeNode(e[0]),this.$parent.aggregationNodes(s,e[0]);break;case"release_aggregation":this.$parent.releaseAggregation(e[0]);break;case"show_label":case"show_names":e.map(l=>{l.textProp=a[t.name]}),this.update();break;case"all_show_label":case"all_show_names":this.nodes.map(l=>{l.textProp=a[t.name]}),this.update();break;case"un_show_names":case"un_show_label":e.map(l=>{l.textProp=null}),this.update();break;case"all_un_show_names":case"all_un_show_label":this.nodes.map(l=>{l.textProp=null}),this.update();break;case"all_show_edges_label":this.links.map(l=>{l.edgeLabelProp=l.edge_label}),this.update();break;case"all_hide_edges_label":this.links.map(l=>{l.edgeLabelProp=null}),this.update();break;case"copy":this.copyNodeText(e);break;case"node_star":e.map(l=>{this.starNode(l)});break;case"un_node_star":e.map(l=>{this.starNode(l,!1)});break;case"fix_nodes":e.map(l=>{this.toggleMove(l,!0)});break;case"un_fix_nodes":e.map(l=>{this.toggleMove(l,!1)}),this.updateSimulation();break;case"all_fix_nodes":this.fixAllNodes(!0);break;case"all_un_fix_nodes":this.fixAllNodes(!1);break;case"expand_node":e.map(l=>{this.$parent.expandNodes(l)});break;case"expand_part_node":e.map(l=>{this.$parent.expandNodes(l,n)});break;case"go_result":this.handleGoDetail(e);break;case"delete_node":this.$parent.deleteNodes(e);break;case"select_children":this.selectChildren(e[0]);break;case"select_parents":this.selectParents(e[0]);break;case"undo":this.$parent.historyBack();break;case"redo":this.$parent.historyForward();break;case"add_con_node":this.$parent.$refs.buttonList.addNode("diy",e[0]);break;case"add_link":this.$parent.$refs.buttonList.addNode("diy",e[0]);break;case"show_node":this.toggleShowNode(e[0],e[1],!0);break;case"hide_node":this.toggleShowNode(e[0],e[1],!1);break;case"show_nodes":this.toggleShowNodes(e,!0);break;case"hide_nodes":this.toggleShowNodes(e,!1);break;default:me(this,"custom-contextmenu-click",{eventName:t.name,customConfig:t.customConfig,nodes:e,allNodes:o.toRaw(this.history.dataNow.nodes)})}this.hideContextMenu(),setTimeout(()=>{this.updateSelection()},400)}else Ot({message:"无可操作权限",type:"warning"})},expandNodes(e,t){Gt({cId:"dblclick",c:"双击节点"}),this.requestGraphData?this.$parent.expandNodes(t):Ot({message:"无可操作权限",type:"warning"})},toggleShowNode(e,t,n=!0){this.history.toggleShowNode(e,null,n),this.selection.filter(s=>s.show).length>0||this.handleTableSelect([]),setTimeout(this.updateNodeStyle,100)},toggleShowNodes(e,t=!0){e.forEach(n=>{this.history.toggleShowNode(n,null,t)}),setTimeout(this.updateNodeStyle,100)},copyNodeText(e){let t="";e.filter(n=>n.type!=="aggregation"&&n.type!=="nodeType").map(n=>{t=t+n.id+`
|
|
140
|
+
`}),t&&Nne(t).then(()=>{Ot({message:"复制成功",type:"success"})},n=>{console.log("copy---e",n)})},toggleMove(e,t){e.fx=t?e.x:null,e.fy=t?e.y:null},autoDisplay(){this.nodes.map(e=>{e.fx=null,e.fy=null})},editLabel(e){var t;h2.prompt("修改备注",{confirmButtonText:"确定",cancelButtonText:"取消",inputValue:(t=e[0])==null?void 0:t.label,inputPlaceholder:"请输入备注,最多20字",inputValidator:n=>n.length>20?"已超过20字":!0}).then(({value:n})=>{e.map(r=>{r.label=n,this.showLabel(r,"label")}),this.updateNodeStyle()}).catch(n=>{console.log(n)})},showLabel(e,t){e.textProp=t,this.update()},hideLabel(e,t){e.textProp=null,this.update()},safeGet(e,t){return!e||!t?void 0:t.split(".").reduce((s,a)=>s&&s[a]?s[a]:void 0,e)},fixAllNodes(e=!0){this.nodes.map(t=>{this.toggleMove(t,e)}),!e&&this.isAutoTick&&this.updateSimulation()},highlightByRule(e,t){if(!e.prop&&!t){this.nodes.forEach(c=>{const u=this.nodesGroup[c.id];u==null||u.removeName("lowlight")}),this.links.forEach(c=>{const u=this.linksGroup[`${c.source.id}-${c.target.id}`];u==null||u.removeName("lowlight")});return}const{type:n,prop:r,value:s}=e,a=this,l=[];this.nodes.forEach(c=>{const u=this.nodesGroup[c.id];r?n==="include"?s.includes(a.safeGet(c,r))&&a.inNodesRange(t,c)?(u==null||u.removeName("lowlight"),l.push(c)):u==null||u.addName("lowlight"):n==="equal"?a.safeGet(c,r)===s&&a.inNodesRange(t,c)?(u==null||u.removeName("lowlight"),l.push(c)):u==null||u.addName("lowlight"):n==="boolean"&&(Ph(a.safeGet(c,r))&&a.inNodesRange(t,c)?(u==null||u.removeName("lowlight"),l.push(c)):u==null||u.addName("lowlight")):a.inNodesRange(t,c)?(u==null||u.removeName("lowlight"),l.push(c)):u==null||u.addName("lowlight")}),this.links.forEach(c=>{const u=this.linksGroup[`${c.source.id}-${c.target.id}`];l.some(f=>f.id===c.target.id)?u==null||u.removeName("lowlight"):u==null||u.addName("lowlight")})},handleCustomSelect(e){if(this.handleDeselectNode(),!e.prop)return;const{type:t,prop:n,value:r}=e,s=this;this.nodes.forEach(a=>{if(n&&t==="include"){let l;if(a.type==="nodeType"){const c=s.safeGet(a,"parents"),u=s.safeGet(a,"children"),d=c==null?void 0:c.some(p=>r.includes(p)),f=u==null?void 0:u.some(p=>r.includes(p));l=d&&f}(r.includes(s.safeGet(a,n))||l)&&this.selection.push(a)}}),this.updateSelection()},inNodesRange(e,t){return e?e.some(n=>n===t.id):!0},loadFlagFiles(e){return ke(this,null,function*(){return new Promise(t=>{this.flagFiles[e]?t(this.flagFiles[e]):(this.flagFiles[e]=this.imgPath[`${this.prefix}d3svg1/flags/${e}.png`],t(this.flagFiles[e]))})})},getNodeImage(e){return ke(this,null,function*(){var s,a,l,c,u,d,f,p,g,v,b,w;let t=null;const n=(l=(a=(s=e.detail)==null?void 0:s.info)==null?void 0:a.basic)==null?void 0:l.flag,r=(d=(u=(c=e==null?void 0:e.detail)==null?void 0:c.info)==null?void 0:u.basic)==null?void 0:d.level;if(this.customNodeImages&&this.customNodeImages[e.type]){if(Yt[e.type])return Yt[e.type];t=yield xr(this.customNodeImages[e.type]),Yt[e.type]=t}else if(e.detail&&((p=(f=e.detail)==null?void 0:f.info)!=null&&p.icon_img))try{t=yield xr(e.detail.info.icon_img)}catch(_){console.log("loadCompleted error",_)}else if(e.detail&&((v=(g=e.detail)==null?void 0:g.info)!=null&&v.inner_img))try{t=yield xr(e.detail.info.inner_img)}catch(_){console.log("loadCompleted error",_)}else if(e.type==="nodeType"||e.type==="aggregation"){if(e!=null&&e.icon_img)try{return t=yield xr(e.icon_img),t}catch(C){console.log("loadCompleted error",C)}const _=e.icon||"node_type";if(Yt[_])return t=Yt[_],t;t=this.iconFiles[_]?this.iconFiles[_]:this.iconFiles.node_type,t=yield xr("data:image/svg+xml,"+encodeURIComponent(t)),Yt[_]=t}else if(n&&(e.type==="ip"||e.type==="internet")){if(Yt[n])return t=Yt[n],t;yield this.loadFlagFiles(n),t=yield xr(this.flagFiles[n]),Yt[n]=t}else if((w=(b=e.detail)==null?void 0:b.info)!=null&&w.inner_country&&(e.type==="country"||e.type==="target_country")){const _=e.detail.info.inner_country;if(Yt[_])return t=Yt[_],t;yield this.loadFlagFiles(_),t=yield xr(this.flagFiles[_]),Yt[_]=t}else{const _=`${e.type||"node"}${r}${this.darkMode}`;if(Yt[_])return t=Yt[_],t;t=this.iconFiles[e.type]?this.iconFiles[e.type]:this.iconFiles.node;const C=fo(r,this.levelList,this.darkMode),N=this.darkMode?"#182628":"#fff";t=_2(t,C,N);try{t=yield xr("data:image/svg+xml,"+encodeURIComponent(t))}catch(S){console.log(S)}Yt[_]=t}return t})},handleGoDetail(e){e.forEach(t=>{if(t.isCluster)return;const n=t.type,r=this.moduleDetail.config.jumpRule[n];if(r)if(n==="org"){const s=t.id.split("(")[0];s.indexOf("APT")>=0&&window.open(r.split("${id}").join(s),t.id)}else{let s=t.origin&&t.origin[0]||t.id;(n==="url"||n==="virus")&&(s=encodeURIComponent(s)),window.open(r.split("${id}").join(s),t.id)}})},starNode(e,t=!0){e.collect=t,this.update()},handleAddBlack(e){this.showBlackType=!0,this.node=e},changeVisible(e){this.showBlackType=e},zoomIn(){this.adjustZoom(1.1)},zoomOut(){this.adjustZoom(.909)},adjustZoom(e){const n=this.stage.scaleX()*e;this.scale=n;const r={x:this.stage.width()/2,y:this.stage.height()/2},s={x:this.stage.getPointerPosition().x-this.stage.x(),y:this.stage.getPointerPosition().y-this.stage.y()},a={x:-(s.x-r.x)*(e-1),y:-(s.y-r.y)*(e-1)};this.stage.setAttrs({x:this.stage.x()+a.x,y:this.stage.y()+a.y,scaleX:n,scaleY:n}),this.layer.batchDraw()},addNodesDetail(e){return ke(this,null,function*(){const t=e.filter(s=>!s.detail&&s.noDetail!==!0&&s.type!=="aggregation"&&s.type!=="nodeType"),n={};t.map(s=>{n[s.type]?n[s.type].push(s):n[s.type]=[s]});const r=[];for(const s in n){const a=n[s],l={};a.map(c=>{c.origin&&(l[c.id]=c.origin)}),r.push(this.graphApi.getNodesDetail({api:this.moduleDetail.node_info[n[s][0].type],node_id:n[s].map(c=>c.id),origin:l}).then(c=>(c.data.records.map(d=>{const f=e.find(p=>p.id===d.info.id);f.detail=d}),Promise.resolve({}))))}})},addCanvasBg(){this.darkMode&&(this.darkBgRect=new tt.Rect({x:0,y:0,width:this.stage.width()/this.scale,height:this.stage.height()/this.scale,fill:"#021212",stroke:"#021212",listening:!1,draggable:!1}),this.layer.add(this.darkBgRect),this.darkBgRect.moveToBottom(),this.stage.draw())},removeCanvasBg(){this.darkBgRect&&this.darkBgRect.destroy(),this.darkBgRect=null,this.stage.draw()}}},Ine={class:"main-svg-box","element-loading-text":"布局中...","element-loading-background":"rgba(122, 122, 122)"},Bne={ref:"canvasContainer",class:"canvas-container"};function Pne(e,t,n,r,s,a){const l=o.resolveComponent("popover"),c=o.resolveComponent("node-contextmenu"),u=d2;return o.openBlock(),o.createElementBlock("div",{class:o.normalizeClass(["render-container",n.darkMode?"dark-theme "+s.uniqueClass:" "+s.uniqueClass])},[o.withDirectives((o.openBlock(),o.createElementBlock("div",Ine,[o.createElementVNode("div",Bne,null,512)])),[[u,s.ticking]]),o.createVNode(l,{"dark-mode":n.darkMode,"show-popover":s.showPopover&&!s.isDragging,"mouse-position":s.hoverNodePosition,"node-info":s.popoverNode,"module-detail":n.moduleDetail,type:s.popoverType,"custom-tooltip":n.customTooltip,history:n.history,data:n.history.dataNow},null,8,["dark-mode","show-popover","mouse-position","node-info","module-detail","type","custom-tooltip","history","data"]),n.isThreatPath?o.createCommentVNode("",!0):(o.openBlock(),o.createBlock(c,{key:0,show:a.showContextMenuFlag,axis:s.mousePosition,"node-info":a.contextMenuNodes,history:n.history,"menu-options":s.menuOptions,"module-detail":n.moduleDetail,onContextmenuClick:a.handleContextMenuClick},null,8,["show","axis","node-info","history","menu-options","module-detail","onContextmenuClick"]))],2)}const zs=xt(One,[["render",Pne]]),vae="",yae="",bae="",{toClipboard:m5}=Bc(),Rne={name:"SnapShotDialog",components:{},mixins:[],props:{snapshot:{type:Object,default:()=>{}},graphApi:{type:Object,default:()=>{}}},data(){return{dialogVisible:!1,origin:window.location.origin,ruleForm:{radio:"0",event:"",group:"",graphDesc:""},rules:{event:[{required:!0,message:"请选择安全事件",trigger:"change"}],group:[{required:!1,message:"请选择团队",trigger:"change"}]},eventOptions:[{value:"",label:""}],groupOptions:[{value:"",label:""}],hostList:["https://sc.360.net","https://sc.b.qihoo.net","http://sec.test.safe.qihoo.net"],isInnerAccount:!1,visibleSuccess:!1,eventUrl:null}},computed:{},watch:{snapshot:{handler:function(e,t){e.name&&(this.ruleForm.graphDesc=e.name)},immediate:!0,deep:!0}},mounted(){this.graphApi.getReportList&&this.graphApi.getReportList().then(e=>{e.data!==null&&(this.eventOptions=[],e.data.map(t=>{this.eventOptions.push({label:t.title,value:t.report_id})}))}),this.graphApi.getGroupList&&this.graphApi.getGroupList().then(e=>{e.data!==null?(this.groupOptions=[],e.data.map(t=>{this.groupOptions.push({label:t.group_name,value:t.group_id})}),this.isInnerAccount=!0):this.isInnerAccount=!1})},updated(){},beforeUnmount(){},methods:{hanleClickCopy(e){m5(e).then(t=>Ot({message:"复制成功",type:"success"}),t=>Ot.error("复制失败"))},show(){this.dialogVisible=!0},hide(){this.dialogVisible=!1,this.resetForm("ruleForm")},submitForm(e){this.$refs[e].validate(t=>{if(t){const n=this.hostList.some(c=>c===this.origin);let r=null;n?this.origin===this.hostList[1]?r=`${this.hostList[0]}/graph?snapshot_id=${this.snapshot.snapshot_id}&vcode=${this.snapshot.vcode}`:r=`${this.origin}/graph?snapshot_id=${this.snapshot.snapshot_id}&vcode=${this.snapshot.vcode}`:r=`http://test.sec.360.net/graph?snapshot_id=${this.snapshot.snapshot_id}&vcode=${this.snapshot.vcode}`,this.eventUrl=window.location.origin+"/event/"+this.ruleForm.event;const s=this.snapshot.thumb;let a=null;this.groupOptions.map(c=>{c.value===this.ruleForm.group&&(a=c.label)});const l={report_id:this.ruleForm.event,group_id:this.ruleForm.group,content:s,graph_url:r,group_name:a,acl:parseInt(this.ruleForm.radio),head:this.ruleForm.graphDesc};this.graphApi.addGraph(l).then(c=>{c.code==="0"?(m5(this.eventUrl),Ot({message:"分享成功! 分享事件地址已经复制",type:"success",showClose:!0,duration:5e3})):Ot({message:"分享失败",type:"error"})}).catch(()=>{Ot({message:"分享失败",type:"error"})}),this.resetForm(e),this.dialogVisible=!1}else return!1})},resetForm(e){this.$refs[e].resetFields(),this.snapshot.name=""}}},Lne={class:"sharetoEvents"},Dne={class:"lable-header"},Mne={class:"desc"},Fne={key:0,class:"desc-font"},$ne={key:1,class:"desc-font"},zne={class:"dialog-footer"};function Une(e,t,n,r,s,a){const l=dP,c=wc,u=bc,d=Kf,f=vi,p=Wf,g=so,v=Na;return o.openBlock(),o.createElementBlock("div",Lne,[o.createVNode(v,{title:"分享到安全事件","append-to-body":"","close-on-click-modal":!1,width:"25%",modelValue:s.dialogVisible,"onUpdate:modelValue":t[6]||(t[6]=b=>s.dialogVisible=b),class:"el-dialog-graph"},{footer:o.withCtx(()=>[o.createElementVNode("span",zne,[o.createVNode(g,{type:"primary",onClick:t[5]||(t[5]=b=>a.submitForm("ruleForm"))},{default:o.withCtx(()=>t[9]||(t[9]=[o.createTextVNode("确认分享")])),_:1}),o.createVNode(g,{onClick:a.hide},{default:o.withCtx(()=>t[10]||(t[10]=[o.createTextVNode("关闭")])),_:1},8,["onClick"])])]),default:o.withCtx(()=>[o.createVNode(p,{ref:"ruleForm",model:s.ruleForm,rules:s.rules,"label-width":"100px",class:"demo-ruleForm"},{default:o.withCtx(()=>[o.createElementVNode("div",Dne,[o.createVNode(l,{modelValue:s.ruleForm.radio,"onUpdate:modelValue":t[0]||(t[0]=b=>s.ruleForm.radio=b),class:"el-radio",label:"1",border:"",size:"medium"},{default:o.withCtx(()=>t[7]||(t[7]=[o.createTextVNode("付费可见")])),_:1},8,["modelValue"]),o.createVNode(l,{modelValue:s.ruleForm.radio,"onUpdate:modelValue":t[1]||(t[1]=b=>s.ruleForm.radio=b),label:"0",border:"",size:"medium"},{default:o.withCtx(()=>t[8]||(t[8]=[o.createTextVNode("开放")])),_:1},8,["modelValue"]),o.createElementVNode("div",Mne,[s.ruleForm.radio==="0"?(o.openBlock(),o.createElementBlock("span",Fne,"该Graph内容对所有用户可见。")):(o.openBlock(),o.createElementBlock("span",$ne,"该Graph内容对付费用户可见。"))])]),o.createVNode(d,{label:"安全事件",prop:"event"},{default:o.withCtx(()=>[o.createVNode(u,{modelValue:s.ruleForm.event,"onUpdate:modelValue":t[2]||(t[2]=b=>s.ruleForm.event=b),"popper-append-to-body":!1,filterable:"",placeholder:"请选择",class:"select-item"},{default:o.withCtx(()=>[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(s.eventOptions,b=>(o.openBlock(),o.createBlock(c,{key:b.value,label:b.label,value:b.value},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])]),_:1}),s.isInnerAccount?(o.openBlock(),o.createBlock(d,{key:0,label:"选择团队",prop:"group"},{default:o.withCtx(()=>[o.createVNode(u,{modelValue:s.ruleForm.group,"onUpdate:modelValue":t[3]||(t[3]=b=>s.ruleForm.group=b),class:"select-item",filterable:"",placeholder:"请选择"},{default:o.withCtx(()=>[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(s.groupOptions,b=>(o.openBlock(),o.createBlock(c,{key:b.value,label:b.label,value:b.value},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])]),_:1})):o.createCommentVNode("",!0),o.createVNode(d,{label:"Graph介绍",prop:"graphDesc"},{default:o.withCtx(()=>[o.createVNode(f,{modelValue:s.ruleForm.graphDesc,"onUpdate:modelValue":t[4]||(t[4]=b=>s.ruleForm.graphDesc=b),type:"textarea",rows:2,placeholder:"请输入内容",maxlength:"50",clearable:""},null,8,["modelValue"])]),_:1})]),_:1},8,["model","rules"])]),_:1},8,["modelValue"])])}const jne=xt(Rne,[["render",Une]]),wae="",{toClipboard:qne}=Bc(),Hne={name:"SnapShotDialog",components:{ShareToSecurityEvents:jne},mixins:[],props:{customCopyPathFn:{type:Function},graphUrlPath:{type:String,default:"/graph"},snapshot:{type:Object,default:()=>{}},graphApi:{type:Object,default:()=>{}}},data(){return{dialogVisible:!1,origin:window.location.origin,isInnerAccount:!1}},computed:{linkAddress(){return this.customCopyPathFn&&typeof this.customCopyPathFn=="function"?this.customCopyPathFn({snapshot_id:this.snapshot.snapshot_id}):`${this.origin}${this.graphUrlPath}?snapshot_id=${this.snapshot.snapshot_id}`},linkAddressAndCode(){return this.customCopyPathFn&&typeof this.customCopyPathFn=="function"?this.customCopyPathFn({snapshot_id:this.snapshot.snapshot_id,vcode:this.snapshot.vcode}):`${this.linkAddress}&vcode=${this.snapshot.vcode}`}},watch:{},created(){},mounted(){Ei(Pe,"sharePermission",e=>{this.isInnerAccount=e})},updated(){},beforeUnmount(){xi(Pe,"sharePermission")},methods:{hanleClickCopy(e){qne(e).then(t=>Ot({message:"复制成功",type:"success"}),t=>Ot.error("复制失败"))},show(){this.dialogVisible=!0},hide(){this.dialogVisible=!1},shareToEvents(){this.dialogVisible=!1,this.$refs.sharetoevents.show()}}},Gne={class:"snapshotdialog-container"},Wne={class:"dialog-footer"};function Kne(e,t,n,r,s,a){const l=vi,c=PP,u=so,d=Na,f=o.resolveComponent("ShareToSecurityEvents");return o.openBlock(),o.createElementBlock("div",Gne,[o.createVNode(d,{modelValue:s.dialogVisible,"onUpdate:modelValue":t[2]||(t[2]=p=>s.dialogVisible=p),title:"复制链接及提取码","append-to-body":"","close-on-click-modal":!1,class:"el-dialog-graph"},{footer:o.withCtx(()=>[o.createElementVNode("span",Wne,[s.isInnerAccount?(o.openBlock(),o.createBlock(u,{key:0,type:"primary",onClick:t[0]||(t[0]=p=>a.shareToEvents())},{default:o.withCtx(()=>t[5]||(t[5]=[o.createTextVNode("分享到安全事件")])),_:1})):o.createCommentVNode("",!0),o.createVNode(u,{type:"primary",onClick:t[1]||(t[1]=p=>a.hanleClickCopy(a.linkAddressAndCode))},{default:o.withCtx(()=>t[6]||(t[6]=[o.createTextVNode("复制链接及提取码")])),_:1}),o.createVNode(u,{onClick:a.hide},{default:o.withCtx(()=>t[7]||(t[7]=[o.createTextVNode("关闭")])),_:1},8,["onClick"])])]),default:o.withCtx(()=>[o.createVNode(l,{value:a.linkAddress,readonly:""},{prepend:o.withCtx(()=>t[3]||(t[3]=[o.createTextVNode("链接地址:")])),_:1},8,["value"]),o.createVNode(c),o.createVNode(l,{value:n.snapshot.vcode,readonly:""},{prepend:o.withCtx(()=>t[4]||(t[4]=[o.createTextVNode("提取码:")])),_:1},8,["value"])]),_:1},8,["modelValue"]),o.createVNode(f,{ref:"sharetoevents",snapshot:n.snapshot,"graph-api":n.graphApi},null,8,["snapshot","graph-api"])])}const Yne=xt(Hne,[["render",Kne]]),_ae="",Jne={name:"ForceGraphByCanvas",components:{Loading:zo,ForceGraphSvgIcon:uo,RenderByCanvas:zs,ButtonList:Gj,SnapShotDialog:Yne,RightMenu:f$,Legend:uU,NodeVisibleControl:vU},mixins:[kr],provide:function(){return{history:this.history,hasLevel:this.hasLevel,levelList:this.levelList,levelMap:this.levelMap,getDarkMode:()=>this.darkMode,requestGraphData:this.requestGraphData,moduleDetail:()=>this.moduleDetail}},props:{showPoint:{type:Boolean,default:!0},isRenderStartNode:{type:Boolean,default:!0},isDefaultSelectStartNode:{type:Boolean,default:!0},isShowRightMenu:{type:Boolean,default:!0},hideButtonList:{type:Array,default:()=>[]},showTopSearch:{type:Boolean,default:!1},customContextMenuEvent:{type:Function},handleSelectNodeEvent:{type:Function},handleDataLoaded:{type:Function},graphApi:{type:Object,default:()=>{}},graphUrlPath:{type:String,default:"/graph"},customCopyPathFn:{type:Function},snapshot_id:{type:String,default:""},vcode:{type:String,default:""},module:{type:String,default:""},startNode:{type:Array,default:()=>[]},enterStartNode:{type:Boolean,default:!1},hasLevel:{type:Boolean,default:!0},levelList:{type:Array,default:()=>[{level:"未知",levelName:"未知",className:"unknown",iconType:"",normalColor:"#666",darkColor:"#c6cdd5",dangerNumber:0},{level:"危险",levelName:"危险",className:"warn",iconType:"",normalColor:"#CF1322",darkColor:"#fb2400",dangerNumber:1},{level:"普通",levelName:"普通",className:"normal",iconType:"",normalColor:"#007EE2",darkColor:"#0094ff",dangerNumber:-1},{level:"安全",levelName:"安全",className:"safe",iconType:"",normalColor:"#009A75",darkColor:"#00da90",dangerNumber:-2}]},showLevelCount:{type:Boolean,default:!1},darkMode:{type:Boolean,default:!1},title:{type:String,default:""},isShowNodeMessage:{type:Boolean,default:!0},nodeWidth:{type:Number},startNodeWidth:{type:Number},linkDistance:{type:Number},strength:{type:Number},nodeTypeScale:{type:Number},singlesNodeMaxNum:{type:Number,default:100},startNodeAnimation:{type:Boolean,default:!0},customTooltip:{type:Function},enableScript:{type:Boolean,default:!1},edgeLabelMaxLength:{type:Number,default:10},hasNodeVisibleControl:{type:Boolean,default:!1},hasLegend:{type:Boolean,default:!0},customNodeImages:{type:Object,default:()=>{}},isShowNodeType:{type:Boolean,default:!0}},emits:["sharePermission","custom-contextmenu-click","handle-select-node","handle-data-loaded","outdate"],data(){return{history:new xD({isShowNodeMessage:this.isShowNodeMessage}),isLoading:!1,bigLoading:!1,loadingInfo:"数据加载中",moduleDetail:{},contextMenuNode:{},contextMenuId:0,isDragging:!1,isCtrlDown:!1,selection:[],snapshot:{},inited:!1,outdateTime:0,fullScreen:!1,generateUniqueIndexNow:this.generateUniqueIndex(),screenHeight:0,margin:"0",requestGraphData:!0,nodeTypeList:[]}},computed:{topFrame(){return window.top.location===window.location},levelMap(){const e={};return this.levelList.forEach(t=>{e[t.level]=t}),e}},watch:{startNode:{handler:function(e,t){this.moduleDetail.module&&this.searchStartNode()},immediate:!0,deep:!0},screenHeight:{deep:!0,handler:function(){this.margin=this.changeMargin()}},graphApi:{handler:function(){this.$nextTick(()=>{this.initializeGraphApi()})},deep:!0,immediate:!0}},unmounted(){window.onresize=null},mounted(){return ke(this,null,function*(){console.log('"2024/11/19 15:03:57"',"2024/11/19 15:03:57"),this.initializeGraphApi(),window.onresize=()=>{this.fullScreen=!!document.fullscreenElement,this.screenHeight=document.body.clientHeight},this.margin=this.changeMargin(),Ei(Pe,"emitDataLoaded",()=>{this.emitDataLoaded()})})},methods:{initializeGraphApi(){if(this.graphApi){if(this.snapshot_id)this.isLoading=!0,this.graphApi.getSnapshotDetail({snapshot_id:this.snapshot_id,vcode:this.vcode}).then(e=>{this.moduleDetail=e.data.config,this.history.initFromSnapshot(JSON.parse(e.data.data)),setTimeout(()=>{this.$refs.render.updateNodeStyle(),this.centerAndZoom(.8,!1)},1e3)}).catch(e=>{console.log(e,"e")}).finally(e=>{this.isLoading=!1});else if(this.module)this.initGraph();else{Ot.error("请传入模块名称");return}this.graphApi.userInfo&&this.graphApi.userInfo().then(e=>{e.data!==null&&(me(Pe,"sharePermission",e.data.access.graph_share),this.requestGraphData=e.data.access.request_graph_data)}).catch(e=>{this.onOutdate(e.res)})}},handleCustomContextMenuClick(e){this.customContextMenuEvent&&typeof this.customContextMenuEvent=="function"?this.customContextMenuEvent(o.toRaw(e)):me(this,"custom-contextmenu-click",o.toRaw(e))},handleSelectNode(e){this.handleSelectNodeEvent&&typeof this.handleSelectNodeEvent=="function"?this.handleSelectNodeEvent(o.toRaw(e),o.toRaw(this.history.dataNow)):me(this,"handle-select-node",o.toRaw(e))},searchStartNode(){this.startNode.length>0&&!this.inited&&this.startNode.map(e=>{const t={type:e.type,id:e.id,startNode:!0};this.inited=!0,this.moduleDetail.nodes.findIndex(n=>e.type===n.name)>=0?this.addNewNodesAndExpand(t):(Ot({message:"无相关数据",type:"warning"}),this.emitDataLoaded())})},initGraph(){return ke(this,null,function*(){var e;mn("initGraph"),(e=this.graphApi)==null||e.getGraphConfig({name:this.module}).then(t=>{const n=t.data||{},r=Ac(n==null?void 0:n.node_info),s=(n==null?void 0:n.nodes)||[];s.forEach(l=>{l.name=l.name.toLowerCase()});const a=Ac(n==null?void 0:n.plugs);n.node_info=r,n.nodes=s,n.plugs=a,this.moduleDetail=n,this.searchStartNode(),!this.inited&&this.enterStartNode&&this.$refs.buttonList.addNode("search")}).catch(t=>{this.onOutdate(t.res),this.emitDataLoaded(),console.log("e",t)})})},addNewNodesAndExpand(e){this.isLoading=!0,this.graphApi.getNodesDetail({api:this.moduleDetail.node_info[e.type],node_id:[e.id],nodeType:e.type,moduleDetail:this.moduleDetail}).then(t=>{var s,a,l;let n={id:(s=t.data.records[0])==null?void 0:s.info.id,type:(a=t.data.records[0])==null?void 0:a.info.type,startNode:!0,detail:t.data.records[0],group:e.id,name:((l=t.data.records[0])==null?void 0:l.info.name)||e.id};n=Zr(n,this.moduleDetail.plugs);const r={addOne:{nodes:[n],links:[]}};this.isRenderStartNode&&(this.history.pushState(r),this.history.updateData(t.data.records,[e.id]),setTimeout(()=>{this.isDefaultSelectStartNode&&(this.handleTableSelect([e.id]),setTimeout(()=>{this.selection.length&&this.handleSelectNode({isSelected:!0,_node:this.selection[0]})},0))},500)),this.expandNodes(n)}).catch(t=>{console.log(t,"e"),this.emitDataLoaded(),this.onOutdate(t.res),Ot({message:"无该节点信息",type:"warning"})}).finally(()=>{this.isLoading=!1})},onAction(e){this.history.pushState(e)},onOutdate(e){(e==null?void 0:e.code)==="AC100001"&&this.outdateTime<1&&(this.outdateTime++,me(this,"outdate"))},expandNodes(e,t){return ke(this,null,function*(){if(!(e!=null&&e.type))return;const n=this.moduleDetail.plugs[e==null?void 0:e.type];let r=[];t?(r=Array.isArray(t)?[...t]:[t],e.apis===void 0&&(e.apis=[]),e.apis.push(...r)):(e.expand=1,e.apis=[],e.apis.push({namec:"拓线全部",value:0,name:"",flagSelect:!0}),n==null||n.map(d=>{d.children?r.push(...d.children):r.push(d)}));const s=r.map(d=>this.graphApi.getGraphRequest({api:d.name,node_id:e.id,origin:e.origin,nodeType:e.type,moduleDetail:this.moduleDetail}).then(f=>Promise.resolve(de(te(te({},f),d),{api:d.name,apiC:d.relay_name,icon:d.icon,note_name:d.note_name,icon_img:d.icon_img,canLoop:d.canloop,showTotal:d.show_total}))).catch(f=>Promise.resolve(f)));this.isLoading=!0;let a;yield Promise.all(s).then(d=>{if(d.some(p=>{var g;return((g=p.res)==null?void 0:g.code)==="AC100001"})){this.onOutdate({code:"AC100001"});return}a=d.filter(p=>p.code==="0"||p.code===0)}).catch(d=>{console.log(d,"e")}).finally(d=>{this.isLoading=!1});const l=[];let c=[];if(a&&a.forEach(d=>{var S;if(e.getData[d.api]=!0,this.history.dataNow.nodes.find(k=>k.id===e.id)&&(this.history.dataNow.nodes.find(k=>k.id===e.id).getData[d.api]=!0),!d.data)return;let f;const p=(S=d.data.nodes||[])==null?void 0:S.map(k=>(k.group=e.id+"-"+d.api,k.groupC=d.apiC,k=Zr(k,this.moduleDetail.plugs),k));if(!this.isShowNodeType){f=d.data.links||[],l.push(...d.data.nodes||[]),c.push(...f||[]);return}const g=e.id+"-"+d.api;let v={id:g,name:d.apiC,note_name:d.note_name,type:"nodeType",icon:d.icon,showTotal:d.showTotal,icon_img:d.icon_img};const E=d,{code:b,msg:w,data:_}=E,C=fi(E,["code","msg","data"]);v=te(te({},C),v);const N={source:e.id,target:g};if(v=Zr(v,this.moduleDetail.plugs),this.nodeTypeList.push(d.icon||"node_type"),p.length>0&&this.isRenderStartNode){if(f=(d.data.links||[]).map(k=>{let A;if(k.source===e.id){const O=this.history.dataNow.nodes.filter(I=>I.id===k.target);if(O.length>0&&(A=this.findGrandSonNodeIds(O[0]).indexOf(k.source)>=0),!d.api.canLoop&&A)return;k.source=g}else k.target===e.id&&(k.target=g);return k.edgeLabelProp=k.edge_label,k}).filter(k=>k),f.length===0)return;f.push(N)}else f=d.data.links||[];if(this.isRenderStartNode&&p.length>=this.singlesNodeMaxNum){let k=null,A=null;const O=String(Math.floor(new Date().getTime()));k={id:O,list:p,type:"aggregation",name:"聚合",relationId:v.id},k=Zr(k,this.moduleDetail.plugs),A={source:v.id,target:O,uniqueIndex:this.generateUniqueIndexNow()};const I={addOne:{nodes:[v,k],links:[N,A]},type:"aggregation"};this.history.pushState(I),this.getNodeDetail(k.list,k.id)}else f.length&&this.isRenderStartNode&&p.push(v),l.push(...p||[]),c.push(...f||[])}),!this.isRenderStartNode){const d={},f={},p=[];this.nodeTypeList.push("node_type"),c.forEach(g=>{const v=g.source+"-"+g.name;if(!d[v]){let b={id:v,name:g.name,type:"nodeType",icon:g.feature.icon};b=Zr(b,this.moduleDetail.plugs),d[v]=b}f[v]?f[v].push(g):f[v]=[g]});for(const g in d)l.push(d[g]);for(const g in f)f[g].forEach(b=>{const w=de(te({},b),{source:b.source,target:g}),_=de(te({},b),{source:g,target:b.target});p.push(w),p.push(_)});c=p}c.map(d=>{d.uniqueIndex=this.generateUniqueIndexNow()});const u={addOne:{nodes:l,links:c}};(l.length>0||c.length>0)&&this.history.pushState(u),this.history.length===2&&setTimeout(()=>{this.centerAndZoom(.8,!1)},1e3),this.getNodeDetail(l)})},findGrandSonNodeIds(e){return this.history.dataNow.nodes.filter(r=>{var s;return((s=e.children)==null?void 0:s.indexOf(r.id))>=0}).reduce((r,s)=>(r.push(...s.children||[]),r),[])||[]},centerAndZoom(e,t){var n;(n=this.$refs.render)==null||n.centerAndZoom(e,t)},generateUniqueIndex(){let e=0;return function(){return e++}},reset(){this.$refs.render.reset()},getNodeDetail(e,t){const r=this.history.dataNow.nodes.filter(l=>e.findIndex(c=>c.id===l.id)>=0).filter(l=>!l.detail&&l.noDetail!==!0&&l.type!=="aggregation"&&l.type!=="nodeType"),s={};r.map(l=>{s[l.type]?s[l.type].push(l):s[l.type]=[l]});let a=Object.keys(s).length;for(const l in s){const c=s[l],u={};c.map(d=>{d.origin&&(u[d.id]=d.origin)}),this.graphApi.getNodesDetail({api:this.moduleDetail.node_info[s[l][0].type],node_id:s[l].map(d=>d.id),origin:u,nodeType:s[l][0].type,moduleDetail:this.moduleDetail}).then(d=>{const f=d.data.records;t?this.history.updateAggregationDetail(f,s[l].map(p=>p.id),t):this.history.updateData(f,s[l].map(p=>p.id))}).catch(d=>{this.onOutdate(d.res)}).finally(()=>{a=a-1,a===0&&(mn(" 数据加载完"),this.emitDataLoaded())})}Object.keys(s).length||this.emitDataLoaded()},emitDataLoaded(){this.handleDataLoaded&&typeof this.handleDataLoaded=="function"?this.handleDataLoaded({dataNow:o.toRaw(this.history.dataNow)}):me(this,"handle-data-loaded",{dataNow:o.toRaw(this.history.dataNow)})},addNode({node:e,type:t,connectNode:n}){if(this.history.dataNow.nodes.findIndex(a=>a.id===e.id)>-1){Ot({type:"warning",message:"该节点已存在,添加失败"});return}let s;if(t==="diy"&&e.type==="nodeType"){let a=de(te({},e),{detail:null,diy:!0,group:e.id});a=Zr(a,this.moduleDetail.plugs);const l=n?{source:n.id,target:e.id,uniqueIndex:this.generateUniqueIndexNow()}:null;s={addOne:{nodes:[a],links:l?[l]:[]}},this.history.pushState(s)}else t==="diy"?this.graphApi.getNodesDetail({api:this.moduleDetail.node_info[e.type],node_id:[e.id],nodeType:e.type,moduleDetail:this.moduleDetail}).then(a=>{var u,d,f;let l={id:(u=a.data.records[0])==null?void 0:u.info.id,type:(d=a.data.records[0])==null?void 0:d.info.type,detail:a.data.records[0],group:e.id,name:((f=a.data.records[0])==null?void 0:f.info.name)||e.id};l=Zr(l,this.moduleDetail.plugs);const c=n?{source:n.id,target:e.id,uniqueIndex:this.generateUniqueIndexNow()}:null;s={addOne:{nodes:[l],links:c?[c]:[]}},this.history.pushState(s)}).catch(a=>{this.onOutdate(a.res);let l=de(te({},e),{detail:null,diy:!0,group:e.id});l=Zr(l,this.moduleDetail.plugs);const c=n?{source:n.id,target:e.id,uniqueIndex:this.generateUniqueIndexNow()}:null;s={addOne:{nodes:[l],links:c?[c]:[]}},this.history.pushState(s)}).finally(a=>{setTimeout(()=>{},500)}):this.addNewNodesAndExpand(e)},addLink(e,t){if(!([e,t].filter(a=>a.type==="nodeType").length===1))return;const r={source:e.id,target:t.id,uniqueIndex:this.generateUniqueIndexNow(),diy:!0};let s=!1;if(this.history.dataNow.links.map(a=>{a.source.id===e.id&&a.target.id===t.id&&(s=!0)}),!s){const a={addOne:{links:[r]}};this.onAction(a)}},expandSelectedNodes(e){e.map(t=>{this.expandNodes(t)})},handleTableSelect(e=[]){this.$refs.render.handleTableSelect(e)},updateSelection(){this.selection=this.$refs.render.selection,this.$refs.render.selectEdgesByNode(this.selection),this.$refs.render.showKeyWay(this.selection),this.$refs.render.updateNodeStyle()},aggregationNodes(e,t){if(e.length===0)return;const n=[];for(const l in this.history.dataNow.nodes)e.findIndex((u,d,f)=>u===this.history.dataNow.nodes[l].id)>=0&&n.push(JSON.parse(JSON.stringify(this.history.dataNow.nodes[l])));const r=String(Math.floor(new Date().getTime()));let s={id:r,list:n,type:"aggregation",name:"聚合",relationId:t.id};s=Zr(s,this.moduleDetail.plugs);const a={addOne:{nodes:[s],links:[{source:t.id,target:r,uniqueIndex:this.generateUniqueIndexNow()}]},deleteOne:{nodes:n,links:n.map(l=>({source:t.id,target:l.id}))},type:"aggregation"};this.history.pushState(a),this.emitDataLoaded()},releaseAggregation(e){let t;if(e.type==="aggregation"&&(t=e),this.history.dataNow.links.map(n=>{n.source.id===e.id&&n.target.type==="aggregation"&&(t=t||n.target,n.source)}),t){const n={deleteOne:{nodes:[t],links:[{source:t.relationId,target:t.id}]},addOne:{nodes:t.list,links:t.list.map(r=>({source:t.relationId,target:r.id}))},type:"aggregation"};for(const r in this.history.dataNow.nodes)t.list.findIndex((a,l,c)=>a===this.history.dataNow.nodes[r].id)>=0&&(this.history.dataNow.nodes[r].aggregation=!1);this.history.pushState(n),this.emitDataLoaded()}},saveSnapshot(){return ke(this,null,function*(){h2.prompt(null,"添加快照",{confirmButtonText:"确定",cancelButtonText:"取消",inputPattern:/^.{1,20}$/,inputPlaceholder:"请输入20字以内快照名称",inputErrorMessage:"请输入20字以内快照名称"}).then(t=>ke(this,[t],function*({value:e}){this.bigLoading=!0,setTimeout(()=>ke(this,null,function*(){try{const n=yield this.$refs.buttonList.svgToBlob(),r=new FormData;r.append("data",this.history.toString()),r.append("name",e),r.append("thumb",n),this.graphApi.addSnapshot1(r).then(s=>{this.snapshot=s.data,this.snapshot.name=e,this.$refs.snapshot.show()}).catch(s=>{this.onOutdate(s.res)}).finally(s=>{this.bigLoading=!1})}catch(n){this.bigLoading=!1,console.log(n)}}),100)})).catch(()=>{Ot({type:"info",message:"取消输入"})})})},autoDisplay(){this.$refs.render.autoDisplay()},deleteNodes(e=this.selection){const t={deleteOne:{nodes:e}};this.history.pushState(t),this.emitDataLoaded();const n=e.map(r=>r.id);this.$refs.render.selection=this.selection.filter(r=>!n.includes(r.id)),setTimeout(()=>{this.updateSelection()},300)},historyForward(){this.history.forward(),setTimeout(()=>{this.updateSelection()},100)},historyBack(){this.history.back(),setTimeout(()=>{this.updateSelection()},100)},toggleFullScreen(){Gt({cId:"toggleFullScreen",c:"切换全屏"}),document.fullscreenElement?document.exitFullscreen&&document.exitFullscreen():this.$refs["force-d3-container"].requestFullscreen()},zoomView(e="in"){e==="in"?(Gt({cId:"zoomIn",c:"zoomIn"}),this.$refs.render.zoomIn()):(Gt({cId:"zoomOut",c:"zoomOut"}),this.$refs.render.zoomOut())},fitScreen(){var e;Gt({cId:"centerAndZoom",c:"centerAndZoom"}),(e=this.$refs.render)==null||e.centerAndZoom()},changeMargin(){let e=0;const t=document.body.clientHeight;return e=Math.floor(((t-50)/20-22)/2),e>8?"8px 0":e+"px 0"},handleHighLight(e,t,n){this.$refs.render.setHighlightRule({type:e,prop:t,value:n})},handleCustomSelect(e,t,n){this.$refs.render.handleCustomSelect({type:e,prop:t,value:n})},fixAllNodes(e){this.$refs.render.fixAllNodes(e)},toggleLayout(e){this.$refs.render.toggleLayout(e)},importCsvData(e){for(const t in e.nodes)delete e.nodes[t].vx,delete e.nodes[t].vy,delete e.nodes[t].x,delete e.nodes[t].y;this.history.dataNow=Object.assign({},e)},getCanvasStage(){var e;return(e=this.$refs.render)==null?void 0:e.stage},addCanvasBg(){var e;(e=this.$refs.render)==null||e.addCanvasBg()},removeCanvasBg(){var e;(e=this.$refs.render)==null||e.removeCanvasBg()},controlOperation(e){var t;(t=this.$refs.render)==null||t.handleContextMenuClick(e)}}},Xne={key:0,ref:"force-d3-container",class:"d3-container"},Qne=["innerHTML"],Zne={class:"top-item"},Vne={class:"top-line"},ere={key:1,class:"select-num"},tre={class:"highlight"},nre={class:"loading-container"},rre={class:"corner-button-box"};function ire(e,t,n,r,s,a){const l=o.resolveComponent("ButtonList"),c=o.resolveComponent("RenderByCanvas"),u=o.resolveComponent("Loading"),d=Qe,f=o.resolveComponent("Legend"),p=o.resolveComponent("NodeVisibleControl"),g=o.resolveComponent("force-graph-svg-icon"),v=pn,b=o.resolveComponent("RightMenu"),w=o.resolveComponent("SnapShotDialog"),_=d2;return n.graphApi?o.withDirectives((o.openBlock(),o.createElementBlock("div",Xne,[o.createElementVNode("div",{class:o.normalizeClass(["graph-box",{"hide-right-menu":!n.isShowRightMenu}])},[n.title?(o.openBlock(),o.createElementBlock("div",{key:0,class:"safe-force-title",innerHTML:n.title},null,8,Qne)):o.createCommentVNode("",!0),t[4]||(t[4]=o.createElementVNode("div",{class:"top-line-bg"},null,-1)),o.createElementVNode("div",Zne,[o.createElementVNode("div",Vne,[o.createVNode(l,{ref:"buttonList","hide-button-list":n.hideButtonList,selection:s.selection,history:s.history,"module-detail":s.moduleDetail,"request-graph-data":s.requestGraphData,"show-top-search":n.showTopSearch,onSaveSnapshot:a.saveSnapshot,onAddNodes:a.addNode,onAutoDisplay:a.autoDisplay,onDeleteNodes:a.deleteNodes,onFixNodes:a.fixAllNodes,onToggleLayout:a.toggleLayout,onImportCsvData:a.importCsvData},null,8,["hide-button-list","selection","history","module-detail","request-graph-data","show-top-search","onSaveSnapshot","onAddNodes","onAutoDisplay","onDeleteNodes","onFixNodes","onToggleLayout","onImportCsvData"])])]),o.createVNode(c,{ref:"render","enable-script":n.enableScript,"module-detail":s.moduleDetail,history:s.history,"level-list":n.levelList,selection:s.selection,data:s.history.dataNow,"request-graph-data":s.requestGraphData,"dark-mode":n.darkMode,"node-type-scale":n.nodeTypeScale,"node-type-list":s.nodeTypeList,"link-distance":n.linkDistance,strength:n.strength,"node-width":n.nodeWidth,"start-node-width":n.startNodeWidth,"start-node-animation":n.startNodeAnimation,"custom-tooltip":n.customTooltip,"edge-label-max-length":n.edgeLabelMaxLength,"custom-node-images":n.customNodeImages,onUpdateSelection:a.updateSelection,onOnaction:a.onAction,onHandleSelectNode:a.handleSelectNode,onCustomContextmenuClick:a.handleCustomContextMenuClick},null,8,["enable-script","module-detail","history","level-list","selection","data","request-graph-data","dark-mode","node-type-scale","node-type-list","link-distance","strength","node-width","start-node-width","start-node-animation","custom-tooltip","edge-label-max-length","custom-node-images","onUpdateSelection","onOnaction","onHandleSelectNode","onCustomContextmenuClick"]),s.selection.length>0?(o.openBlock(),o.createElementBlock("p",ere,[t[2]||(t[2]=o.createTextVNode(" 已选择")),o.createElementVNode("span",tre,o.toDisplayString(s.selection.length),1),t[3]||(t[3]=o.createTextVNode("项 "))])):o.createCommentVNode("",!0),o.withDirectives(o.createElementVNode("div",nre,[o.createElementVNode("span",null,o.toDisplayString(s.loadingInfo),1),o.createVNode(d,{class:"is-loading"},{default:o.withCtx(()=>[o.createVNode(u)]),_:1})],512),[[o.vShow,s.isLoading]]),n.hasLegend?(o.openBlock(),o.createBlock(f,{key:2,"show-point":n.showPoint,history:s.history,"module-detail":s.moduleDetail,"has-level":n.hasLevel,"show-level-count":n.showLevelCount,margin:s.margin,onHighLight:a.handleHighLight},null,8,["show-point","history","module-detail","has-level","show-level-count","margin","onHighLight"])):o.createCommentVNode("",!0),n.hasNodeVisibleControl?(o.openBlock(),o.createBlock(p,{key:3,history:s.history,"module-detail":s.moduleDetail,"start-node":n.startNode,"custom-node-images":n.customNodeImages},null,8,["history","module-detail","start-node","custom-node-images"])):o.createCommentVNode("",!0),o.createElementVNode("div",rre,[!s.fullScreen&&a.topFrame?(o.openBlock(),o.createBlock(v,{key:0,content:"进入全屏",placement:"left","popper-class":"el-tooltip-gray"},{default:o.withCtx(()=>[o.createVNode(g,{"icon-class":e.imgPath["./public/d3svg1/button18/full_button.svg"],alt:"",class:"corner-button",onClick:a.toggleFullScreen},null,8,["icon-class","onClick"])]),_:1})):o.createCommentVNode("",!0),s.fullScreen&&a.topFrame?(o.openBlock(),o.createBlock(v,{key:1,content:"退出全屏",placement:"left","popper-class":"el-tooltip-gray"},{default:o.withCtx(()=>[o.createVNode(g,{"icon-class":e.imgPath["./public/d3svg1/button18/un_full_button.svg"],alt:"",class:"corner-button",onClick:a.toggleFullScreen},null,8,["icon-class","onClick"])]),_:1})):o.createCommentVNode("",!0),o.createVNode(v,{content:"适应屏幕",placement:"left","popper-class":"el-tooltip-gray"},{default:o.withCtx(()=>[o.createVNode(g,{"icon-class":e.imgPath["./public/d3svg1/button18/fit_button.svg"],alt:"",class:"corner-button",onClick:a.fitScreen},null,8,["icon-class","onClick"])]),_:1}),o.createVNode(v,{content:"放大",placement:"left","popper-class":"el-tooltip-gray"},{default:o.withCtx(()=>[o.createVNode(g,{"icon-class":e.imgPath["./public/d3svg1/button18/zoom_in_button.svg"],alt:"",class:"corner-button",onClick:t[0]||(t[0]=C=>a.zoomView("in"))},null,8,["icon-class"])]),_:1}),o.createVNode(v,{content:"缩小",placement:"left","popper-class":"el-tooltip-gray"},{default:o.withCtx(()=>[o.createVNode(g,{"icon-class":e.imgPath["./public/d3svg1/button18/zoom_out_button.svg"],alt:"",class:"corner-button",onClick:t[1]||(t[1]=C=>a.zoomView("out"))},null,8,["icon-class"])]),_:1})])],2),n.isShowRightMenu?(o.openBlock(),o.createBlock(b,{key:0,"graph-data":s.history.dataNow,"selected-nodes":s.selection,"request-graph-data":s.requestGraphData,onChangeBox:a.handleTableSelect},null,8,["graph-data","selected-nodes","request-graph-data","onChangeBox"])):o.createCommentVNode("",!0),o.createVNode(w,{ref:"snapshot",snapshot:s.snapshot,"graph-api":n.graphApi,"graph-url-path":n.graphUrlPath,"custom-copy-path-fn":n.customCopyPathFn},null,8,["snapshot","graph-api","graph-url-path","custom-copy-path-fn"])])),[[_,s.bigLoading]]):o.createCommentVNode("",!0)}const bu=xt(Jne,[["render",ire]]),Cae="",w0={props:bu.props,setup(e){return()=>o.h(UA,{namespace:"force-graph-el"},{default:()=>o.h(bu,e)})}};bu.install=function(e){e.component(bu.name,w0)},zs.install=function(e){e.component(zs.name,zs)};const Sae="",ore=[w0,zs],sre={install:function(e,t={}){ore.forEach(n=>{e.component(n.name,n)})}};De.Graph=w0,De.Render=zs,De.default=sre,Object.defineProperties(De,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
|