vue-safe-force-graph 2.0.22 → 2.0.24

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.
@@ -44100,7 +44100,7 @@ const iWe = /* @__PURE__ */ ot(yHe, [["render", rWe], ["__scopeId", "data-v-4d80
44100
44100
  utime: "2019-05-06 15:08:10",
44101
44101
  children: []
44102
44102
  }
44103
- ], sWe = "vue-safe-force-graph", aWe = "2.0.22", lWe = "force_graph in security area", uWe = "jason zhang", cWe = "./lib/vue-safe-force-graph.js", dWe = "./lib/vue-safe-force-graph.umd.cjs", fWe = "module", hWe = [
44103
+ ], sWe = "vue-safe-force-graph", aWe = "2.0.24", lWe = "force_graph in security area", uWe = "jason zhang", cWe = "./lib/vue-safe-force-graph.js", dWe = "./lib/vue-safe-force-graph.umd.cjs", fWe = "module", hWe = [
44104
44104
  "/lib/"
44105
44105
  ], pWe = {
44106
44106
  ".": {
@@ -44440,7 +44440,7 @@ const jr = {}, xWe = {
44440
44440
  let t = e.clientWidth, n = e.clientHeight;
44441
44441
  this.resizeObserver = new ResizeObserver((o) => {
44442
44442
  for (const s of o)
44443
- t = s.contentRect.width, n = s.contentRect.height, this.stage.width(t), this.stage.height(n), this.layer && this.layer.batchDraw(), this.centerAndZoom(), Un(`新宽度: ${t}px, 新高度: ${n}px`);
44443
+ t = s.contentRect.width, n = s.contentRect.height, this.stage.width(t), this.stage.height(n), this.layer && this.layer.batchDraw(), this.updateSimulation(), Un(`新宽度: ${t}px, 新高度: ${n}px`);
44444
44444
  }), this.resizeObserver.observe(e), document.addEventListener("click", this.hideContextMenu, !1), this.nodes = this.data.nodes, this.links = this.data.links, this.stage = new zt.Stage({
44445
44445
  container: e,
44446
44446
  width: t,
@@ -44757,7 +44757,9 @@ const jr = {}, xWe = {
44757
44757
  updateSimulation() {
44758
44758
  var e;
44759
44759
  try {
44760
- this.simulation.stop(), this.simulation.nodes(this.nodes), this.simulation.force("link").links(this.links), this.simulation.alpha(0.4).restart(), this.simulation.on("tick", this.ticked);
44760
+ this.simulation.stop(), this.simulation.nodes(this.nodes), this.simulation.force("link").links(this.links), this.simulation.alpha(0.4).restart(), this.simulation.on("tick", this.ticked), this.simulation.on("end", () => {
44761
+ this.isThreatPath && this.centerAndZoom(1);
44762
+ });
44761
44763
  } catch (t) {
44762
44764
  console.log(t, "simulation-e1"), (e = this.simulation) == null || e.stop();
44763
44765
  }
@@ -46411,7 +46413,7 @@ const VWe = {
46411
46413
  });
46412
46414
  },
46413
46415
  addNewNodesAndExpand(e) {
46414
- this.graphApi.getNodesDetail({
46416
+ this.isLoading = !0, this.graphApi.getNodesDetail({
46415
46417
  api: this.moduleDetail.node_info[e.type],
46416
46418
  node_id: [e.id],
46417
46419
  nodeType: e.type,
@@ -46447,6 +46449,8 @@ const VWe = {
46447
46449
  message: "无该节点信息",
46448
46450
  type: "warning"
46449
46451
  });
46452
+ }).finally(() => {
46453
+ this.isLoading = !1;
46450
46454
  });
46451
46455
  },
46452
46456
  onAction(e) {
@@ -147,5 +147,5 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
147
147
  \v\f\r                 \u2028\u2029\uFEFF`,GB=Je("".replace),gBe=RegExp("^["+T6+"]+"),mBe=RegExp("(^|[^"+T6+"])["+T6+"]+$"),A6=function(e){return function(t){var n=pBe(hBe(t));return 1&e&&(n=GB(n,gBe,"")),2&e&&(n=GB(n,mBe,"$1")),n}},vBe={start:A6(1),end:A6(2),trim:A6(3)},yBe=Ct,bBe=At,HB=Xe,WB=dBe,KB=Je,_Be=z0,YB=on,wBe=_g,CBe=ts,SBe=k0,XB=d3,xBe=Ue,EBe=Al.f,kBe=Tl.f,NBe=Gn.f,TBe=qB,ABe=vBe.trim,wg="Number",_c=HB[wg];WB[wg];var O6=_c.prototype,OBe=HB.TypeError,PBe=KB("".slice),Cg=KB("".charCodeAt),RBe=function(e){var t,n,r,o,s,c,l,d,u=XB(e,"number");if(SBe(u))throw new OBe("Cannot convert a Symbol value to a number");if(typeof u=="string"&&u.length>2){if(u=ABe(u),(t=Cg(u,0))===43||t===45){if((n=Cg(u,2))===88||n===120)return NaN}else if(t===48){switch(Cg(u,1)){case 66:case 98:r=2,o=49;break;case 79:case 111:r=8,o=55;break;default:return+u}for(c=(s=PBe(u,2)).length,l=0;l<c;l++)if((d=Cg(s,l))<48||d>o)return NaN;return parseInt(s,r)}}return+u},P6=_Be(wg,!_c(" 0o1")||!_c("0b1")||_c("+0x1")),Sg=function(e){var t,n=arguments.length<1?0:_c(function(r){var o=XB(r,"number");return typeof o=="bigint"?o:RBe(o)}(e));return CBe(O6,t=this)&&xBe(function(){TBe(t)})?wBe(Object(n),this,Sg):n};Sg.prototype=O6,P6&&(O6.constructor=Sg),yBe({global:!0,constructor:!0,wrap:!0,forced:P6},{Number:Sg}),P6&&function(e,t){for(var n,r=bBe?EBe(t):"MAX_VALUE,MIN_VALUE,NaN,NEGATIVE_INFINITY,POSITIVE_INFINITY,EPSILON,MAX_SAFE_INTEGER,MIN_SAFE_INTEGER,isFinite,isInteger,isNaN,isSafeInteger,parseFloat,parseInt,fromString,range".split(","),o=0;r.length>o;o++)YB(t,n=r[o])&&!YB(e,n)&&NBe(e,n,kBe(t,n))}(WB[wg],_c);var IBe=ro,BBe=zr,LBe=Wo,MBe=RangeError,$Be=Ct,R6=Je,FBe=ro,DBe=qB,jBe=function(e){var t=BBe(LBe(this)),n="",r=IBe(e);if(r<0||r===1/0)throw new MBe("Wrong number of repetitions");for(;r>0;(r>>>=1)&&(t+=t))1&r&&(n+=t);return n},JB=Ue,UBe=RangeError,QB=String,ZB=Math.floor,I6=R6(jBe),VB=R6("".slice),Xu=R6(1 .toFixed),wc=function(e,t,n){return t===0?n:t%2==1?wc(e,t-1,n*e):wc(e*e,t/2,n)},Cc=function(e,t,n){for(var r=-1,o=n;++r<6;)o+=t*e[r],e[r]=o%1e7,o=ZB(o/1e7)},B6=function(e,t){for(var n=6,r=0;--n>=0;)r+=e[n],e[n]=ZB(r/t),r=r%t*1e7},eL=function(e){for(var t=6,n="";--t>=0;)if(n!==""||t===0||e[t]!==0){var r=QB(e[t]);n=n===""?r:n+I6("0",7-r.length)+r}return n};$Be({target:"Number",proto:!0,forced:JB(function(){return Xu(8e-5,3)!=="0.000"||Xu(.9,0)!=="1"||Xu(1.255,2)!=="1.25"||Xu(0xde0b6b3a7640080,0)!=="1000000000000000128"})||!JB(function(){Xu({})})},{toFixed:function(e){var t,n,r,o,s=DBe(this),c=FBe(e),l=[0,0,0,0,0,0],d="",u="0";if(c<0||c>20)throw new UBe("Incorrect fraction digits");if(s!=s)return"NaN";if(s<=-1e21||s>=1e21)return QB(s);if(s<0&&(d="-",s=-s),s>1e-21)if(t=function(f){for(var h=0,p=f;p>=4096;)h+=12,p/=4096;for(;p>=2;)h+=1,p/=2;return h}(s*wc(2,69,1))-69,n=t<0?s*wc(2,-t,1):s/wc(2,t,1),n*=4503599627370496,(t=52-t)>0){for(Cc(l,0,n),r=c;r>=7;)Cc(l,1e7,0),r-=7;for(Cc(l,wc(10,r,1),0),r=t-1;r>=23;)B6(l,1<<23),r-=23;B6(l,1<<r),Cc(l,1,1),B6(l,2),u=eL(l)}else Cc(l,0,n),Cc(l,1<<-t,0),u=eL(l)+I6("0",c);return u=c>0?d+((o=u.length)<=c?"0."+I6("0",c-o)+u:VB(u,0,o-c)+"."+VB(u,o-c)):d+u}});var tL=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")},ln=function(e){var t=Math.min(Math.max(e,0),15e3);return Number.isNaN(t)?0:t%1!=0?Number(t.toFixed(2)):t},zBe=Ur.filter;Ct({target:"Array",proto:!0,forced:!a1("filter")},{filter:function(e){return zBe(this,e,arguments.length>1?arguments[1]:void 0)}});var qBe=function(){function e(t){m0(this,e),Zi(this,"performanceData",{fcp:0,fp:0,lcp:0}),Zi(this,"commit",function(){}),this.webCoreIns=t}return v0(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 o=window.performance.timing,s=null;window.addEventListener("load",function c(){if(o.loadEventEnd>0){clearTimeout(s);var l=ln(o.unloadEnd-o.unloadStart),d=ln(o.redirectStart-o.redirectEnd),u=ln(o.domainLookupStart-o.fetchStart),f=ln(o.domainLookupEnd-o.domainLookupStart),h=ln(o.connectEnd-o.connectStart),p=ln(o.secureConnectionStart==0?0:o.connectEnd-o.secureConnectionStart),g=ln(o.responseStart-o.requestStart),y=ln(o.domInteractive-o.fetchStart),_=ln(o.responseEnd-o.responseStart),w=ln(o.domContentLoadedEventEnd-o.fetchStart),C=ln(o.domInteractive-o.responseEnd),E=ln(o.loadEventStart-o.domContentLoadedEventEnd),S=ln(o.loadEventEnd-o.loadEventStart),x=ln(o.loadEventEnd-o.fetchStart);n({unloadTime:l,redirectTime:d,appCacheTime:u,dnsTime:f,tcpTime:h,sslTime:p,ttfb:g,contentTime:_,domParseTime:C,tti:y,domReadyTime:w,loadEventTime:S,loadFinishTime:x,loadResourceTime:E,resource:""})}else s=setTimeout(c,100)},!1)}),new Promise(function(n,r){tL("paint",function(o){var s=0,c=0;if(o!=="err"){var l,d=Jy(o.getEntries());try{for(d.s();!(l=d.n()).done;){var u=l.value,f=u.name,h=u.startTime;f==="first-paint"&&(s=ln(h)),f==="first-contentful-paint"&&(c=ln(h))}}catch(p){d.e(p)}finally{d.f()}}n({fp:s,fcp:c})})}).catch(function(n){return console.log(n)}),new Promise(function(n,r){tL("largest-contentful-paint",function(o){if(o=="err")n({lcp:0});else{var s,c=Jy(o.getEntries());try{for(c.s();!(s=c.n()).done;){var l=s.value;n({lcp:ln(l.startTime)})}}catch(d){c.e(d)}finally{c.f()}}})}).catch(function(n){return console.log(n)})]).then(function(){var n=(arguments.length>0&&arguments[0]!==void 0?arguments[0]:[]).reduce(function(r,o){return Qd(Qd({},r),o)},t.performanceData);n.type="performance",t.webCoreIns.commit(n)}).catch(function(n){console.log(n)})}},{key:"calcResourceTime",value:function(){}}]),e}(),GBe=["SCRIPT","STYLE","META","HEAD"];function L6(){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,o=arguments.length>4?arguments[4]:void 0;if(!e||n>r||GBe.indexOf(e.tagName)>-1||o&&t>o)return n;var s=function(c,l){if(!l||!document.querySelector(c.tagName))return 0;var d=c.getBoundingClientRect(),u=d.top,f=d.height;return u>window.innerHeight||f<=0?0:1/Math.pow(2,l-1)}(e,t);return[].reduceRight.call(e.children,function(c,l){return L6(l,t+1,c,r,o)},n+s)}var nL,M6,$6=Ue,F6=Xe.RegExp,D6=$6(function(){var e=F6("a","y");return e.lastIndex=2,e.exec("abcd")!==null}),HBe=D6||$6(function(){return!F6("a","y").sticky}),WBe=D6||$6(function(){var e=F6("^r","gy");return e.lastIndex=2,e.exec("str")!==null}),KBe={BROKEN_CARET:WBe,MISSED_STICKY:HBe,UNSUPPORTED_Y:D6},YBe=Ue,XBe=Xe.RegExp,JBe=YBe(function(){var e=XBe(".","s");return!(e.dotAll&&e.test(`
148
148
  `)&&e.flags==="s")}),QBe=Ue,ZBe=Xe.RegExp,VBe=QBe(function(){var e=ZBe("(?<a>b)","g");return e.exec("b").groups.a!=="b"||"b".replace(e,"$<a>c")!=="bc"}),Sc=Dt,xg=Je,eLe=zr,tLe=yA,nLe=KBe,rLe=Nl,iLe=pn.get,oLe=JBe,aLe=VBe,sLe=Vy("native-string-replace",String.prototype.replace),Eg=RegExp.prototype.exec,j6=Eg,lLe=xg("".charAt),cLe=xg("".indexOf),dLe=xg("".replace),U6=xg("".slice),z6=(M6=/b*/g,Sc(Eg,nL=/a/,"a"),Sc(Eg,M6,"a"),nL.lastIndex!==0||M6.lastIndex!==0),rL=nLe.BROKEN_CARET,q6=/()??/.exec("")[1]!==void 0;(z6||q6||rL||oLe||aLe)&&(j6=function(e){var t,n,r,o,s,c,l,d=this,u=iLe(d),f=eLe(e),h=u.raw;if(h)return h.lastIndex=d.lastIndex,t=Sc(j6,h,f),d.lastIndex=h.lastIndex,t;var p=u.groups,g=rL&&d.sticky,y=Sc(tLe,d),_=d.source,w=0,C=f;if(g&&(y=dLe(y,"y",""),cLe(y,"g")===-1&&(y+="g"),C=U6(f,d.lastIndex),d.lastIndex>0&&(!d.multiline||d.multiline&&lLe(f,d.lastIndex-1)!==`
149
149
  `)&&(_="(?: "+_+")",C=" "+C,w++),n=new RegExp("^(?:"+_+")",y)),q6&&(n=new RegExp("^"+_+"$(?!\\s)",y)),z6&&(r=d.lastIndex),o=Sc(Eg,g?n:d,C),g?o?(o.input=U6(o.input,w),o[0]=U6(o[0],w),o.index=d.lastIndex,d.lastIndex+=o[0].length):d.lastIndex=0:z6&&o&&(d.lastIndex=d.global?o.index+o[0].length:r),q6&&o&&o.length>1&&Sc(sLe,o[0],n,function(){for(s=1;s<arguments.length-2;s++)arguments[s]===void 0&&(o[s]=void 0)}),o&&p)for(o.groups=c=rLe(null),s=0;s<p.length;s++)c[(l=p[s])[0]]=o[l[1]];return o});var kg=j6;Ct({target:"RegExp",proto:!0,forced:/./.exec!==kg},{exec:kg});var iL=ru,oL=Hn,uLe=kg,aL=Ue,sL=mt,fLe=Vi,hLe=sL("species"),G6=RegExp.prototype,pLe=Y3.charAt,lL=Dt,gLe=hn,mLe=wt,vLe=eo,yLe=kg,bLe=TypeError,_Le=Dt,wLe=function(e,t,n,r){var o=sL(e),s=!aL(function(){var u={};return u[o]=function(){return 7},""[e](u)!==7}),c=s&&!aL(function(){var u=!1,f=/a/;return e==="split"&&((f={}).constructor={},f.constructor[hLe]=function(){return f},f.flags="",f[o]=/./[o]),f.exec=function(){return u=!0,null},f[o](""),!u});if(!s||!c||n){var l=iL(/./[o]),d=t(o,""[e],function(u,f,h,p,g){var y=iL(u),_=f.exec;return _===uLe||_===G6.exec?s&&!g?{done:!0,value:l(f,h,p)}:{done:!0,value:y(h,f,p)}:{done:!1}});oL(String.prototype,e,d[0]),oL(G6,o,d[1])}r&&fLe(G6[o],"sham",!0)},CLe=hn,SLe=Za,xLe=rs,H6=zr,ELe=Wo,kLe=N0,NLe=function(e,t,n){return t+(n?pLe(e,t).length:1)},cL=function(e,t){var n=e.exec;if(mLe(n)){var r=lL(n,e,t);return r!==null&&gLe(r),r}if(vLe(e)==="RegExp")return lL(yLe,e,t);throw new bLe("RegExp#exec called on incompatible receiver")};wLe("match",function(e,t,n){return[function(r){var o=ELe(this),s=SLe(r)?void 0:kLe(r,e);return s?_Le(s,r,o):new RegExp(r)[e](H6(o))},function(r){var o=CLe(this),s=H6(r),c=n(t,o,s);if(c.done)return c.value;if(!o.global)return cL(o,s);var l=o.unicode;o.lastIndex=0;for(var d,u=[],f=0;(d=cL(o,s))!==null;){var h=H6(d[0]);u[f]=h,h===""&&(o.lastIndex=NLe(s,xLe(o.lastIndex),l)),f++}return f===0?null:u}]});var Ln,xc,Ng,W6={exports:{}},dL=typeof ArrayBuffer!="undefined"&&typeof DataView!="undefined",TLe=dL,K6=At,kn=Xe,uL=wt,Tg=Ft,sa=on,Y6=to,ALe=xl,OLe=Vi,X6=Hn,PLe=Xo,RLe=ts,Ag=lu,Ec=Ol,ILe=mt,BLe=S0,fL=pn.enforce,LLe=pn.get,Og=kn.Int8Array,J6=Og&&Og.prototype,hL=kn.Uint8ClampedArray,pL=hL&&hL.prototype,wi=Og&&Ag(Og),Yr=J6&&Ag(J6),MLe=Object.prototype,Q6=kn.TypeError,gL=ILe("toStringTag"),Z6=BLe("TYPED_ARRAY_TAG"),Pg="TypedArrayConstructor",co=TLe&&!!Ec&&Y6(kn.opera)!=="Opera",mL=!1,uo={Int8Array:1,Uint8Array:1,Uint8ClampedArray:1,Int16Array:2,Uint16Array:2,Int32Array:4,Uint32Array:4,Float32Array:4,Float64Array:8},V6={BigInt64Array:8,BigUint64Array:8},vL=function(e){var t=Ag(e);if(Tg(t)){var n=LLe(t);return n&&sa(n,Pg)?n[Pg]:vL(t)}},yL=function(e){if(!Tg(e))return!1;var t=Y6(e);return sa(uo,t)||sa(V6,t)};for(Ln in uo)(Ng=(xc=kn[Ln])&&xc.prototype)?fL(Ng)[Pg]=xc:co=!1;for(Ln in V6)(Ng=(xc=kn[Ln])&&xc.prototype)&&(fL(Ng)[Pg]=xc);if((!co||!uL(wi)||wi===Function.prototype)&&(wi=function(){throw new Q6("Incorrect invocation")},co))for(Ln in uo)kn[Ln]&&Ec(kn[Ln],wi);if((!co||!Yr||Yr===MLe)&&(Yr=wi.prototype,co))for(Ln in uo)kn[Ln]&&Ec(kn[Ln].prototype,Yr);if(co&&Ag(pL)!==Yr&&Ec(pL,Yr),K6&&!sa(Yr,gL))for(Ln in mL=!0,PLe(Yr,gL,{configurable:!0,get:function(){return Tg(this)?this[Z6]:void 0}}),uo)kn[Ln]&&OLe(kn[Ln],Z6,Ln);var Oe={NATIVE_ARRAY_BUFFER_VIEWS:co,TYPED_ARRAY_TAG:mL&&Z6,aTypedArray:function(e){if(yL(e))return e;throw new Q6("Target is not a typed array")},aTypedArrayConstructor:function(e){if(uL(e)&&(!Ec||RLe(wi,e)))return e;throw new Q6(ALe(e)+" is not a typed array constructor")},exportTypedArrayMethod:function(e,t,n,r){if(K6){if(n)for(var o in uo){var s=kn[o];if(s&&sa(s.prototype,e))try{delete s.prototype[e]}catch(c){try{s.prototype[e]=t}catch(l){}}}Yr[e]&&!n||X6(Yr,e,n?t:co&&J6[e]||t,r)}},exportTypedArrayStaticMethod:function(e,t,n){var r,o;if(K6){if(Ec){if(n){for(r in uo)if((o=kn[r])&&sa(o,e))try{delete o[e]}catch(s){}}if(wi[e]&&!n)return;try{return X6(wi,e,n?t:co&&wi[e]||t)}catch(s){}}for(r in uo)!(o=kn[r])||o[e]&&!n||X6(o,e,t)}},getTypedArrayConstructor:vL,isView:function(e){if(!Tg(e))return!1;var t=Y6(e);return t==="DataView"||sa(uo,t)||sa(V6,t)},isTypedArray:yL,TypedArray:wi,TypedArrayPrototype:Yr},bL=Xe,e8=Ue,$Le=k6,FLe=Oe.NATIVE_ARRAY_BUFFER_VIEWS,DLe=bL.ArrayBuffer,ws=bL.Int8Array,jLe=!FLe||!e8(function(){ws(1)})||!e8(function(){new ws(-1)})||!$Le(function(e){new ws,new ws(null),new ws(1.5),new ws(e)},!0)||e8(function(){return new ws(new DLe(2),1,void 0).length!==1}),ULe=ro,zLe=rs,qLe=RangeError,_L=function(e){if(e===void 0)return 0;var t=ULe(e),n=zLe(t);if(t!==n)throw new qLe("Wrong length or index");return n},GLe=Math.sign||function(e){var t=+e;return t===0||t!=t?t:t<0?-1:1},HLe=GLe,WLe=Math.abs,wL=2220446049250313e-31,CL=1/wL,KLe=function(e,t,n,r){var o=+e,s=WLe(o),c=HLe(o);if(s<r)return c*function(u){return u+CL-CL}(s/r/t)*r*t;var l=(1+t/wL)*s,d=l-(l-s);return d>n||d!=d?c*(1/0):c*d},YLe=Math.fround||function(e){return KLe(e,11920928955078125e-23,34028234663852886e22,11754943508222875e-54)},XLe=Array,JLe=Math.abs,fo=Math.pow,QLe=Math.floor,ZLe=Math.log,VLe=Math.LN2,eMe={pack:function(e,t,n){var r,o,s,c=XLe(n),l=8*n-t-1,d=(1<<l)-1,u=d>>1,f=t===23?fo(2,-24)-fo(2,-77):0,h=e<0||e===0&&1/e<0?1:0,p=0;for((e=JLe(e))!=e||e===1/0?(o=e!=e?1:0,r=d):(r=QLe(ZLe(e)/VLe),e*(s=fo(2,-r))<1&&(r--,s*=2),(e+=r+u>=1?f/s:f*fo(2,1-u))*s>=2&&(r++,s/=2),r+u>=d?(o=0,r=d):r+u>=1?(o=(e*s-1)*fo(2,t),r+=u):(o=e*fo(2,u-1)*fo(2,t),r=0));t>=8;)c[p++]=255&o,o/=256,t-=8;for(r=r<<t|o,l+=t;l>0;)c[p++]=255&r,r/=256,l-=8;return c[--p]|=128*h,c},unpack:function(e,t){var n,r=e.length,o=8*r-t-1,s=(1<<o)-1,c=s>>1,l=o-7,d=r-1,u=e[d--],f=127&u;for(u>>=7;l>0;)f=256*f+e[d--],l-=8;for(n=f&(1<<-l)-1,f>>=-l,l+=t;l>0;)n=256*n+e[d--],l-=8;if(f===0)f=1-c;else{if(f===s)return n?NaN:u?-1/0:1/0;n+=fo(2,t),f-=c}return(u?-1:1)*n*fo(2,f-t)}},tMe=jr,SL=ou,nMe=Wn,xL=function(e){for(var t=tMe(this),n=nMe(t),r=arguments.length,o=SL(r>1?arguments[1]:void 0,n),s=r>2?arguments[2]:void 0,c=s===void 0?n:SL(s,n);c>o;)t[o++]=e;return t},Rg=Xe,t8=Je,n8=At,rMe=dL,iMe=Vi,oMe=Xo,EL=ib,r8=Ue,Ig=os,aMe=ro,sMe=rs,Bg=_L,lMe=YLe,kL=eMe,cMe=lu,NL=Ol,dMe=xL,uMe=Jo,fMe=_g,hMe=$N,TL=Yo,i8=pn,pMe=ns.PROPER,AL=ns.CONFIGURABLE,kc="ArrayBuffer",Lg="DataView",Nc="prototype",OL="Wrong index",PL=i8.getterFor(kc),Ju=i8.getterFor(Lg),RL=i8.set,Xr=Rg[kc],Jr=Xr,Tc=Jr&&Jr[Nc],ho=Rg[Lg],Cs=ho&&ho[Nc],IL=Object.prototype,gMe=Rg.Array,Mg=Rg.RangeError,mMe=t8(dMe),vMe=t8([].reverse),BL=kL.pack,LL=kL.unpack,ML=function(e){return[255&e]},$L=function(e){return[255&e,e>>8&255]},FL=function(e){return[255&e,e>>8&255,e>>16&255,e>>24&255]},DL=function(e){return e[3]<<24|e[2]<<16|e[1]<<8|e[0]},yMe=function(e){return BL(lMe(e),23,4)},bMe=function(e){return BL(e,52,8)},$g=function(e,t,n){oMe(e[Nc],t,{configurable:!0,get:function(){return n(this)[t]}})},la=function(e,t,n,r){var o=Ju(e),s=Bg(n),c=!!r;if(s+t>o.byteLength)throw new Mg(OL);var l=o.bytes,d=s+o.byteOffset,u=uMe(l,d,d+t);return c?u:vMe(u)},ca=function(e,t,n,r,o,s){var c=Ju(e),l=Bg(n),d=r(+o),u=!!s;if(l+t>c.byteLength)throw new Mg(OL);for(var f=c.bytes,h=l+c.byteOffset,p=0;p<t;p++)f[h+p]=d[u?p:t-p-1]};if(rMe){var jL=pMe&&Xr.name!==kc;r8(function(){Xr(1)})&&r8(function(){new Xr(-1)})&&!r8(function(){return new Xr,new Xr(1.5),new Xr(NaN),Xr.length!==1||jL&&!AL})?jL&&AL&&iMe(Xr,"name",kc):((Jr=function(e){return Ig(this,Tc),fMe(new Xr(Bg(e)),this,Jr)})[Nc]=Tc,Tc.constructor=Jr,hMe(Jr,Xr)),NL&&cMe(Cs)!==IL&&NL(Cs,IL);var Fg=new ho(new Jr(2)),UL=t8(Cs.setInt8);Fg.setInt8(0,2147483648),Fg.setInt8(1,2147483649),!Fg.getInt8(0)&&Fg.getInt8(1)||EL(Cs,{setInt8:function(e,t){UL(this,e,t<<24>>24)},setUint8:function(e,t){UL(this,e,t<<24>>24)}},{unsafe:!0})}else Tc=(Jr=function(e){Ig(this,Tc);var t=Bg(e);RL(this,{type:kc,bytes:mMe(gMe(t),0),byteLength:t}),n8||(this.byteLength=t,this.detached=!1)})[Nc],Cs=(ho=function(e,t,n){Ig(this,Cs),Ig(e,Tc);var r=PL(e),o=r.byteLength,s=aMe(t);if(s<0||s>o)throw new Mg("Wrong offset");if(s+(n=n===void 0?o-s:sMe(n))>o)throw new Mg("Wrong length");RL(this,{type:Lg,buffer:e,byteLength:n,byteOffset:s,bytes:r.bytes}),n8||(this.buffer=e,this.byteLength=n,this.byteOffset=s)})[Nc],n8&&($g(Jr,"byteLength",PL),$g(ho,"buffer",Ju),$g(ho,"byteLength",Ju),$g(ho,"byteOffset",Ju)),EL(Cs,{getInt8:function(e){return la(this,1,e)[0]<<24>>24},getUint8:function(e){return la(this,1,e)[0]},getInt16:function(e){var t=la(this,2,e,arguments.length>1&&arguments[1]);return(t[1]<<8|t[0])<<16>>16},getUint16:function(e){var t=la(this,2,e,arguments.length>1&&arguments[1]);return t[1]<<8|t[0]},getInt32:function(e){return DL(la(this,4,e,arguments.length>1&&arguments[1]))},getUint32:function(e){return DL(la(this,4,e,arguments.length>1&&arguments[1]))>>>0},getFloat32:function(e){return LL(la(this,4,e,arguments.length>1&&arguments[1]),23)},getFloat64:function(e){return LL(la(this,8,e,arguments.length>1&&arguments[1]),52)},setInt8:function(e,t){ca(this,1,e,ML,t)},setUint8:function(e,t){ca(this,1,e,ML,t)},setInt16:function(e,t){ca(this,2,e,$L,t,arguments.length>2&&arguments[2])},setUint16:function(e,t){ca(this,2,e,$L,t,arguments.length>2&&arguments[2])},setInt32:function(e,t){ca(this,4,e,FL,t,arguments.length>2&&arguments[2])},setUint32:function(e,t){ca(this,4,e,FL,t,arguments.length>2&&arguments[2])},setFloat32:function(e,t){ca(this,4,e,yMe,t,arguments.length>2&&arguments[2])},setFloat64:function(e,t){ca(this,8,e,bMe,t,arguments.length>2&&arguments[2])}});TL(Jr,kc),TL(ho,Lg);var _Me={ArrayBuffer:Jr,DataView:ho},wMe=Ft,CMe=Math.floor,SMe=Number.isInteger||function(e){return!wMe(e)&&isFinite(e)&&CMe(e)===e},xMe=ro,EMe=RangeError,kMe=function(e){var t=xMe(e);if(t<0)throw new EMe("The argument can't be less than 0");return t},NMe=RangeError,zL=function(e,t){var n=kMe(e);if(n%t)throw new NMe("Wrong offset");return n},TMe=Math.round,AMe=to,OMe=d3,PMe=TypeError,qL=function(e){var t=OMe(e,"number");if(typeof t=="number")throw new PMe("Can't convert number to bigint");return BigInt(t)},RMe=no,IMe=Dt,BMe=DI,LMe=jr,MMe=Wn,$Me=W0,FMe=fu,DMe=V3,jMe=function(e){var t=AMe(e);return t==="BigInt64Array"||t==="BigUint64Array"},UMe=Oe.aTypedArrayConstructor,zMe=qL,qMe=Wn,GL=function(e,t,n){for(var r=0,o=arguments.length>2?n:qMe(t),s=new e(o);o>r;)s[r]=t[r++];return s},HL=Ct,WL=Xe,KL=Dt,GMe=At,HMe=jLe,Qu=Oe,YL=_Me,XL=os,WMe=El,Zu=Vi,KMe=SMe,YMe=rs,JL=_L,o8=zL,XMe=function(e){var t=TMe(e);return t<0?0:t>255?255:255&t},QL=T0,Vu=on,JMe=to,a8=Ft,QMe=k0,ZMe=Nl,VMe=ts,Dg=Ol,e$e=Al.f,ZL=function(e){var t,n,r,o,s,c,l,d,u=BMe(this),f=LMe(e),h=arguments.length,p=h>1?arguments[1]:void 0,g=p!==void 0,y=FMe(f);if(y&&!DMe(y))for(d=(l=$Me(f,y)).next,f=[];!(c=IMe(d,l)).done;)f.push(c.value);for(g&&h>2&&(p=RMe(p,arguments[2])),n=MMe(f),r=new(UMe(u))(n),o=jMe(r),t=0;n>t;t++)s=g?p(f[t],t):f[t],r[t]=o?zMe(s):+s;return r},t$e=Ur.forEach,n$e=i6,r$e=Xo,VL=Gn,eM=Tl,tM=GL,i$e=_g,s8=pn.get,o$e=pn.set,a$e=pn.enforce,nM=VL.f,s$e=eM.f,l8=WL.RangeError,rM=YL.ArrayBuffer,l$e=rM.prototype,c$e=YL.DataView,jg=Qu.NATIVE_ARRAY_BUFFER_VIEWS,iM=Qu.TYPED_ARRAY_TAG,oM=Qu.TypedArray,ef=Qu.TypedArrayPrototype,c8=Qu.isTypedArray,Ug="BYTES_PER_ELEMENT",d8="Wrong length",zg=function(e,t){r$e(e,t,{configurable:!0,get:function(){return s8(this)[t]}})},aM=function(e){var t;return VMe(l$e,e)||(t=JMe(e))==="ArrayBuffer"||t==="SharedArrayBuffer"},sM=function(e,t){return c8(e)&&!QMe(t)&&t in e&&KMe(+t)&&t>=0},lM=function(e,t){return t=QL(t),sM(e,t)?WMe(2,e[t]):s$e(e,t)},cM=function(e,t,n){return t=QL(t),!(sM(e,t)&&a8(n)&&Vu(n,"value"))||Vu(n,"get")||Vu(n,"set")||n.configurable||Vu(n,"writable")&&!n.writable||Vu(n,"enumerable")&&!n.enumerable?nM(e,t,n):(e[t]=n.value,e)};GMe?(jg||(eM.f=lM,VL.f=cM,zg(ef,"buffer"),zg(ef,"byteOffset"),zg(ef,"byteLength"),zg(ef,"length")),HL({target:"Object",stat:!0,forced:!jg},{getOwnPropertyDescriptor:lM,defineProperty:cM}),W6.exports=function(e,t,n){var r=e.match(/\d+/)[0]/8,o=e+(n?"Clamped":"")+"Array",s="get"+e,c="set"+e,l=WL[o],d=l,u=d&&d.prototype,f={},h=function(g,y){nM(g,y,{get:function(){return function(_,w){var C=s8(_);return C.view[s](w*r+C.byteOffset,!0)}(this,y)},set:function(_){return function(w,C,E){var S=s8(w);S.view[c](C*r+S.byteOffset,n?XMe(E):E,!0)}(this,y,_)},enumerable:!0})};jg?HMe&&(d=t(function(g,y,_,w){return XL(g,u),i$e(a8(y)?aM(y)?w!==void 0?new l(y,o8(_,r),w):_!==void 0?new l(y,o8(_,r)):new l(y):c8(y)?tM(d,y):KL(ZL,d,y):new l(JL(y)),g,d)}),Dg&&Dg(d,oM),t$e(e$e(l),function(g){g in d||Zu(d,g,l[g])}),d.prototype=u):(d=t(function(g,y,_,w){XL(g,u);var C,E,S,x=0,N=0;if(a8(y)){if(!aM(y))return c8(y)?tM(d,y):KL(ZL,d,y);C=y,N=o8(_,r);var A=y.byteLength;if(w===void 0){if(A%r)throw new l8(d8);if((E=A-N)<0)throw new l8(d8)}else if((E=YMe(w)*r)+N>A)throw new l8(d8);S=E/r}else S=JL(y),C=new rM(E=S*r);for(o$e(g,{buffer:C,byteOffset:N,byteLength:E,length:S,view:new c$e(C)});x<S;)h(g,x++)}),Dg&&Dg(d,oM),u=d.prototype=ZMe(ef)),u.constructor!==d&&Zu(u,"constructor",d),a$e(u).TypedArrayConstructor=d,iM&&Zu(u,iM,o);var p=d!==l;f[o]=d,HL({global:!0,constructor:!0,forced:p,sham:!jg},f),Ug in d||Zu(d,Ug,r),Ug in u||Zu(u,Ug,r),n$e(o)}):W6.exports=function(){},(0,W6.exports)("Uint8",function(e){return function(t,n,r){return e(this,t,n,r)}});var dM=xl,d$e=TypeError,u$e=jr,u8=ou,f$e=Wn,h$e=function(e,t){if(!delete e[t])throw new d$e("Cannot delete property "+dM(t)+" of "+dM(e))},p$e=Math.min,g$e=[].copyWithin||function(e,t){var n=u$e(this),r=f$e(n),o=u8(e,r),s=u8(t,r),c=arguments.length>2?arguments[2]:void 0,l=p$e((c===void 0?r:u8(c,r))-s,r-o),d=1;for(s<o&&o<s+l&&(d=-1,s+=l-1,o+=l-1);l-- >0;)s in n?n[o]=n[s]:h$e(n,o),o+=d,s+=d;return n},uM=Oe,m$e=Je(g$e),v$e=uM.aTypedArray;(0,uM.exportTypedArrayMethod)("copyWithin",function(e,t){return m$e(v$e(this),e,t,arguments.length>2?arguments[2]:void 0)});var y$e=Ur.every,b$e=Oe.aTypedArray;(0,Oe.exportTypedArrayMethod)("every",function(e){return y$e(b$e(this),e,arguments.length>1?arguments[1]:void 0)});var _$e=xL,w$e=qL,C$e=to,S$e=Dt,x$e=Ue,E$e=Oe.aTypedArray,k$e=Oe.exportTypedArrayMethod,N$e=Je("".slice);k$e("fill",function(e){var t=arguments.length;E$e(this);var n=N$e(C$e(this),0,3)==="Big"?w$e(e):+e;return S$e(_$e,this,n,t>1?arguments[1]:void 0,t>2?arguments[2]:void 0)},x$e(function(){var e=0;return new Int8Array(2).fill({valueOf:function(){return e++}}),e!==1}));var T$e=UI,A$e=Oe.aTypedArrayConstructor,O$e=Oe.getTypedArrayConstructor,qg=function(e){return A$e(T$e(e,O$e(e)))},P$e=GL,R$e=qg,I$e=Ur.filter,B$e=function(e,t){return P$e(R$e(e),t)},L$e=Oe.aTypedArray;(0,Oe.exportTypedArrayMethod)("filter",function(e){var t=I$e(L$e(this),e,arguments.length>1?arguments[1]:void 0);return B$e(this,t)});var M$e=Ur.find,$$e=Oe.aTypedArray;(0,Oe.exportTypedArrayMethod)("find",function(e){return M$e($$e(this),e,arguments.length>1?arguments[1]:void 0)});var F$e=Ur.findIndex,D$e=Oe.aTypedArray;(0,Oe.exportTypedArrayMethod)("findIndex",function(e){return F$e(D$e(this),e,arguments.length>1?arguments[1]:void 0)});var j$e=Ur.forEach,U$e=Oe.aTypedArray;(0,Oe.exportTypedArrayMethod)("forEach",function(e){j$e(U$e(this),e,arguments.length>1?arguments[1]:void 0)});var z$e=F0.includes,q$e=Oe.aTypedArray;(0,Oe.exportTypedArrayMethod)("includes",function(e){return z$e(q$e(this),e,arguments.length>1?arguments[1]:void 0)});var G$e=F0.indexOf,H$e=Oe.aTypedArray;(0,Oe.exportTypedArrayMethod)("indexOf",function(e){return G$e(H$e(this),e,arguments.length>1?arguments[1]:void 0)});var W$e=Xe,K$e=Ue,f8=Je,fM=Oe,h8=QN,p8=mt("iterator"),hM=W$e.Uint8Array,Y$e=f8(h8.values),X$e=f8(h8.keys),J$e=f8(h8.entries),g8=fM.aTypedArray,Gg=fM.exportTypedArrayMethod,Ac=hM&&hM.prototype,Hg=!K$e(function(){Ac[p8].call([1])}),pM=!!Ac&&Ac.values&&Ac[p8]===Ac.values&&Ac.values.name==="values",gM=function(){return Y$e(g8(this))};Gg("entries",function(){return J$e(g8(this))},Hg),Gg("keys",function(){return X$e(g8(this))},Hg),Gg("values",gM,Hg||!pM,{name:"values"}),Gg(p8,gM,Hg||!pM,{name:"values"});var Q$e=Oe.aTypedArray,Z$e=Oe.exportTypedArrayMethod,V$e=Je([].join);Z$e("join",function(e){return V$e(Q$e(this),e)});var eFe=lg,tFe=io,nFe=ro,rFe=Wn,iFe=vN,oFe=Math.min,m8=[].lastIndexOf,mM=!!m8&&1/[1].lastIndexOf(1,-0)<0,aFe=iFe("lastIndexOf"),sFe=mM||!aFe?function(e){if(mM)return eFe(m8,this,arguments)||0;var t=tFe(this),n=rFe(t),r=n-1;for(arguments.length>1&&(r=oFe(r,nFe(arguments[1]))),r<0&&(r=n+r);r>=0;r--)if(r in t&&t[r]===e)return r||0;return-1}:m8,lFe=lg,cFe=sFe,dFe=Oe.aTypedArray;(0,Oe.exportTypedArrayMethod)("lastIndexOf",function(e){var t=arguments.length;return lFe(cFe,dFe(this),t>1?[e,arguments[1]]:[e])});var uFe=Ur.map,fFe=qg,hFe=Oe.aTypedArray;(0,Oe.exportTypedArrayMethod)("map",function(e){return uFe(hFe(this),e,arguments.length>1?arguments[1]:void 0,function(t,n){return new(fFe(t))(n)})});var pFe=hi,gFe=jr,mFe=M0,vFe=Wn,yFe=TypeError,vM=function(e){return function(t,n,r,o){var s=gFe(t),c=mFe(s),l=vFe(s);pFe(n);var d=e?l-1:0,u=e?-1:1;if(r<2)for(;;){if(d in c){o=c[d],d+=u;break}if(d+=u,e?d<0:l<=d)throw new yFe("Reduce of empty array with no initial value")}for(;e?d>=0:l>d;d+=u)d in c&&(o=n(o,c[d],d,s));return o}},yM={left:vM(!1),right:vM(!0)},bFe=yM.left,_Fe=Oe.aTypedArray;(0,Oe.exportTypedArrayMethod)("reduce",function(e){var t=arguments.length;return bFe(_Fe(this),e,t,t>1?arguments[1]:void 0)});var wFe=yM.right,CFe=Oe.aTypedArray;(0,Oe.exportTypedArrayMethod)("reduceRight",function(e){var t=arguments.length;return wFe(CFe(this),e,t,t>1?arguments[1]:void 0)});var SFe=Oe.aTypedArray,xFe=Oe.exportTypedArrayMethod,EFe=Math.floor;xFe("reverse",function(){for(var e,t=this,n=SFe(t).length,r=EFe(n/2),o=0;o<r;)e=t[o],t[o++]=t[--n],t[n]=e;return t});var bM=Xe,_M=Dt,v8=Oe,kFe=Wn,NFe=zL,TFe=jr,wM=Ue,AFe=bM.RangeError,y8=bM.Int8Array,CM=y8&&y8.prototype,SM=CM&&CM.set,OFe=v8.aTypedArray,PFe=v8.exportTypedArrayMethod,b8=!wM(function(){var e=new Uint8ClampedArray(2);return _M(SM,e,{length:1,0:3},1),e[1]!==3}),RFe=b8&&v8.NATIVE_ARRAY_BUFFER_VIEWS&&wM(function(){var e=new y8(2);return e.set(1),e.set("2",1),e[0]!==0||e[1]!==2});PFe("set",function(e){OFe(this);var t=NFe(arguments.length>1?arguments[1]:void 0,1),n=TFe(e);if(b8)return _M(SM,this,n,t);var r=this.length,o=kFe(n),s=0;if(o+t>r)throw new AFe("Wrong length");for(;s<o;)this[t+s]=n[s++]},!b8||RFe);var IFe=qg,BFe=Jo,LFe=Oe.aTypedArray;(0,Oe.exportTypedArrayMethod)("slice",function(e,t){for(var n=BFe(LFe(this),e,t),r=IFe(this),o=0,s=n.length,c=new r(s);s>o;)c[o]=n[o++];return c},Ue(function(){new Int8Array(1).slice()}));var MFe=Ur.some,$Fe=Oe.aTypedArray;(0,Oe.exportTypedArrayMethod)("some",function(e){return MFe($Fe(this),e,arguments.length>1?arguments[1]:void 0)});var xM=Va.match(/firefox\/(\d+)/i),FFe=!!xM&&+xM[1],DFe=/MSIE|Trident/.test(Va),EM=Va.match(/AppleWebKit\/(\d+)\./),jFe=!!EM&&+EM[1],UFe=ru,_8=Ue,zFe=hi,qFe=kT,kM=FFe,GFe=DFe,NM=tu,TM=jFe,HFe=Oe.aTypedArray,WFe=Oe.exportTypedArrayMethod,tf=Xe.Uint16Array,Oc=tf&&UFe(tf.prototype.sort),KFe=!(!Oc||_8(function(){Oc(new tf(2),null)})&&_8(function(){Oc(new tf(2),{})})),AM=!!Oc&&!_8(function(){if(NM)return NM<74;if(kM)return kM<67;if(GFe)return!0;if(TM)return TM<602;var e,t,n=new tf(516),r=Array(516);for(e=0;e<516;e++)t=e%4,n[e]=515-e,r[e]=e-2*t+3;for(Oc(n,function(o,s){return(o/4|0)-(s/4|0)}),e=0;e<516;e++)if(n[e]!==r[e])return!0});WFe("sort",function(e){return e!==void 0&&zFe(e),AM?Oc(this,e):qFe(HFe(this),function(t){return function(n,r){return t!==void 0?+t(n,r)||0:r!=r?-1:n!=n?1:n===0&&r===0?1/n>0&&1/r<0?1:-1:n>r}}(e))},!AM||KFe);var YFe=rs,OM=ou,XFe=qg,JFe=Oe.aTypedArray;(0,Oe.exportTypedArrayMethod)("subarray",function(e,t){var n=JFe(this),r=n.length,o=OM(e,r);return new(XFe(n))(n.buffer,n.byteOffset+o*n.BYTES_PER_ELEMENT,YFe((t===void 0?r:OM(t,r))-o))});var QFe=lg,PM=Oe,w8=Ue,RM=Jo,Wg=Xe.Int8Array,IM=PM.aTypedArray,ZFe=PM.exportTypedArrayMethod,BM=[].toLocaleString,VFe=!!Wg&&w8(function(){BM.call(new Wg(1))});ZFe("toLocaleString",function(){return QFe(BM,VFe?RM(IM(this)):IM(this),RM(arguments))},w8(function(){return[1,2].toLocaleString()!==new Wg([1,2]).toLocaleString()})||!w8(function(){Wg.prototype.toLocaleString.call([1,2])}));var eDe=Oe.exportTypedArrayMethod,tDe=Ue,nDe=Je,LM=Xe.Uint8Array,rDe=LM&&LM.prototype||{},Kg=[].toString,iDe=nDe([].join);tDe(function(){Kg.call({})})&&(Kg=function(){return iDe(this)});var oDe=rDe.toString!==Kg;eDe("toString",Kg,oDe);var aDe=0,C8={},sDe=function(e){if(!e)return Promise.reject("empty url");var t=C8[e];return t?Promise.resolve(t):new Promise(function(n,r){var o=document.createElement("script");if(o.id="script".concat(aDe++),o.src=e,o.async="async",o.src.indexOf("http")!==0)throw Error("load-script只能加载http/https协议的url,当前协议是".concat(location.protocol));o.onerror=function(s){$("#".concat(o.id)).remove(),r(s)},o.readyState?o.onreadystatechange=function(s){o.readyState!="loaded"&&o.readyState!="complete"||(o.onreadystatechange=null,C8[e]=s,n(s))}:o.onload=function(s){C8[e]=s,n(s)},document.body.appendChild(o)})};function lDe(e,t){return MM.apply(this,arguments)}function MM(){return(MM=Zd(Dr().mark(function e(t,n){var r,o,s;return Dr().wrap(function(c){for(;;)switch(c.prev=c.next){case 0:return c.next=2,sDe("https://html2canvas.hertzen.com/dist/html2canvas.min.js");case 2:return c.next=4,html2canvas(document.body,{useCORS:!0});case 4:return r=c.sent,o=r.toDataURL("image/jpeg",.3),s=cDe(o),c.next=9,dDe(s,t,n);case 9:return c.abrupt("return",c.sent);case 10:case"end":return c.stop()}},e)}))).apply(this,arguments)}function cDe(e){for(var t=e.split(","),n=t[0].match(/:(.*?);/)[1],r=atob(t[1]),o=r.length,s=new Uint8Array(o);o--;)s[o]=r.charCodeAt(o);return new Blob([s],{type:n})}function dDe(e,t,n){return $M.apply(this,arguments)}function $M(){return($M=Zd(Dr().mark(function e(t,n,r){var o,s;return Dr().wrap(function(c){for(;;)switch(c.prev=c.next){case 0:return(o=new FormData).append("filename",t,"".concat(r,".png")),o.append("https",1),c.next=5,n("//qapm.360.cn/api/upload/uploadImg",{method:"POST",body:o,keepalive:!0}).then(function(l){return l.json()});case 5:return s=c.sent,c.abrupt("return",s);case 7:case"end":return c.stop()}},e)}))).apply(this,arguments)}var uDe=function(){function e(n){m0(this,e),Zi(this,"isLoaded",!1),Zi(this,"timer",null),Zi(this,"whiteCount",0),Zi(this,"maxLoopNumber",2),Zi(this,"isReport",!1),this.webCoreIns=n;var r=n.config.whiteScreenConfig||{},o=r.target,s=r.score,c=s===void 0?1.5:s;r.screenshot;var l=r.domDepth,d=l===void 0?6:l;this.target=o,this.score=c,this.screenshot=!1,this.domDepth=d,this.fetch=n.fetch}var t;return v0(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=L6(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 o=L6(r.target,0,0,r.score,r.domDepth);r.whiteCount+=1,o<=r.score?(clearTimeout(r.timer),r.timer=null,r.openLoopToJudge(o)):(clearTimeout(r.timer),r.timer=null,r.whiteCount=0)},1e3)}},{key:"commit",value:(t=Zd(Dr().mark(function n(r){return Dr().wrap(function(o){for(;;)switch(o.prev=o.next){case 0:if(!this.isReport){o.next=2;break}return o.abrupt("return");case 2:this.isReport=!0,this.screenshot&&lDe(this.fetch,this.webCoreIns.sid),this.webCoreIns.commit({type:"whiteScreen",score:r});case 5:case"end":return o.stop()}},n,this)})),function(n){return t.apply(this,arguments)})}]),e}(),FM={exports:{}},DM={},fDe=eo,hDe=io,jM=Al.f,pDe=Jo,UM=typeof window=="object"&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[];DM.f=function(e){return UM&&fDe(e)==="Window"?function(t){try{return jM(t)}catch(n){return pDe(UM)}}(e):jM(hDe(e))};var gDe=Ue(function(){if(typeof ArrayBuffer=="function"){var e=new ArrayBuffer(8);Object.isExtensible(e)&&Object.defineProperty(e,"a",{value:8})}}),mDe=Ue,vDe=Ft,yDe=eo,zM=gDe,Yg=Object.isExtensible,bDe=mDe(function(){Yg(1)})||zM?function(e){return!!vDe(e)&&(!zM||yDe(e)!=="ArrayBuffer")&&(!Yg||Yg(e))}:Yg,_De=!Ue(function(){return Object.isExtensible(Object.preventExtensions({}))}),wDe=Ct,CDe=Je,SDe=R0,xDe=Ft,S8=on,EDe=Gn.f,qM=Al,kDe=DM,x8=bDe,NDe=_De,GM=!1,po=S0("meta"),TDe=0,E8=function(e){EDe(e,po,{value:{objectID:"O"+TDe++,weakData:{}}})},ADe=FM.exports={enable:function(){ADe.enable=function(){},GM=!0;var e=qM.f,t=CDe([].splice),n={};n[po]=1,e(n).length&&(qM.f=function(r){for(var o=e(r),s=0,c=o.length;s<c;s++)if(o[s]===po){t(o,s,1);break}return o},wDe({target:"Object",stat:!0,forced:!0},{getOwnPropertyNames:kDe.f}))},fastKey:function(e,t){if(!xDe(e))return typeof e=="symbol"?e:(typeof e=="string"?"S":"P")+e;if(!S8(e,po)){if(!x8(e))return"F";if(!t)return"E";E8(e)}return e[po].objectID},getWeakData:function(e,t){if(!S8(e,po)){if(!x8(e))return!0;if(!t)return!1;E8(e)}return e[po].weakData},onFreeze:function(e){return NDe&&GM&&x8(e)&&!S8(e,po)&&E8(e),e}};SDe[po]=!0;var HM=FM.exports,ODe=Ct,PDe=Xe,RDe=Je,WM=z0,IDe=Hn,BDe=HM,LDe=bg,MDe=os,$De=wt,FDe=Za,k8=Ft,N8=Ue,DDe=k6,jDe=Yo,UDe=_g,KM=Nl,zDe=Xo,YM=ib,qDe=no,GDe=os,HDe=Za,WDe=bg,KDe=H3,XM=G0,YDe=i6,nf=At,JM=HM.fastKey,QM=pn.set,T8=pn.getterFor,XDe={getConstructor:function(e,t,n,r){var o=e(function(u,f){GDe(u,s),QM(u,{type:t,index:KM(null),first:void 0,last:void 0,size:0}),nf||(u.size=0),HDe(f)||WDe(f,u[r],{that:u,AS_ENTRIES:n})}),s=o.prototype,c=T8(t),l=function(u,f,h){var p,g,y=c(u),_=d(u,f);return _?_.value=h:(y.last=_={index:g=JM(f,!0),key:f,value:h,previous:p=y.last,next:void 0,removed:!1},y.first||(y.first=_),p&&(p.next=_),nf?y.size++:u.size++,g!=="F"&&(y.index[g]=_)),u},d=function(u,f){var h,p=c(u),g=JM(f);if(g!=="F")return p.index[g];for(h=p.first;h;h=h.next)if(h.key===f)return h};return YM(s,{clear:function(){for(var u=c(this),f=u.first;f;)f.removed=!0,f.previous&&(f.previous=f.previous.next=void 0),f=f.next;u.first=u.last=void 0,u.index=KM(null),nf?u.size=0:this.size=0},delete:function(u){var f=this,h=c(f),p=d(f,u);if(p){var g=p.next,y=p.previous;delete h.index[p.index],p.removed=!0,y&&(y.next=g),g&&(g.previous=y),h.first===p&&(h.first=g),h.last===p&&(h.last=y),nf?h.size--:f.size--}return!!p},forEach:function(u){for(var f,h=c(this),p=qDe(u,arguments.length>1?arguments[1]:void 0);f=f?f.next:h.first;)for(p(f.value,f.key,this);f&&f.removed;)f=f.previous},has:function(u){return!!d(this,u)}}),YM(s,n?{get:function(u){var f=d(this,u);return f&&f.value},set:function(u,f){return l(this,u===0?0:u,f)}}:{add:function(u){return l(this,u=u===0?0:u,u)}}),nf&&zDe(s,"size",{configurable:!0,get:function(){return c(this).size}}),o},setStrong:function(e,t,n){var r=t+" Iterator",o=T8(t),s=T8(r);KDe(e,t,function(c,l){QM(this,{type:r,target:c,state:o(c),kind:l,last:void 0})},function(){for(var c=s(this),l=c.kind,d=c.last;d&&d.removed;)d=d.previous;return c.target&&(c.last=d=d?d.next:c.state.first)?XM(l==="keys"?d.key:l==="values"?d.value:[d.key,d.value],!1):(c.target=void 0,XM(void 0,!0))},n?"entries":"values",!n,!0),YDe(t)}},JDe=function(e,t,n){var r=e.indexOf("Map")!==-1,o=e.indexOf("Weak")!==-1,s=r?"set":"add",c=PDe[e],l=c&&c.prototype,d=c,u={},f=function(w){var C=RDe(l[w]);IDe(l,w,w==="add"?function(E){return C(this,E===0?0:E),this}:w==="delete"?function(E){return!(o&&!k8(E))&&C(this,E===0?0:E)}:w==="get"?function(E){return o&&!k8(E)?void 0:C(this,E===0?0:E)}:w==="has"?function(E){return!(o&&!k8(E))&&C(this,E===0?0:E)}:function(E,S){return C(this,E===0?0:E,S),this})};if(WM(e,!$De(c)||!(o||l.forEach&&!N8(function(){new c().entries().next()}))))d=n.getConstructor(t,e,r,s),BDe.enable();else if(WM(e,!0)){var h=new d,p=h[s](o?{}:-0,1)!==h,g=N8(function(){h.has(1)}),y=DDe(function(w){new c(w)}),_=!o&&N8(function(){for(var w=new c,C=5;C--;)w[s](C,C);return!w.has(-0)});y||((d=t(function(w,C){MDe(w,l);var E=UDe(new c,w,d);return FDe(C)||LDe(C,E[s],{that:E,AS_ENTRIES:r}),E})).prototype=l,l.constructor=d),(g||_)&&(f("delete"),f("has"),r&&f("get")),(_||p)&&f(s),o&&l.clear&&delete l.clear}return u[e]=d,ODe({global:!0,constructor:!0,forced:d!==c},u),jDe(d,e),o||n.setStrong(d,e,r),d};JDe("Set",function(e){return function(){return e(this,arguments.length?arguments[0]:void 0)}},XDe);var QDe=Ct,ZM=N3,ZDe=$0,VDe=Ft,VM=ou,eje=Wn,tje=io,nje=eb,rje=mt,ije=Jo,oje=a1("slice"),aje=rje("species"),A8=Array,sje=Math.max;QDe({target:"Array",proto:!0,forced:!oje},{slice:function(e,t){var n,r,o,s=tje(this),c=eje(s),l=VM(e,c),d=VM(t===void 0?c:t,c);if(ZM(s)&&(n=s.constructor,(ZDe(n)&&(n===A8||ZM(n.prototype))||VDe(n)&&(n=n[aje])===null)&&(n=void 0),n===A8||n===void 0))return ije(s,l,d);for(r=new(n===void 0?A8:n)(sje(d-l,0)),o=0;l<d;l++,o++)l in s&&nje(r,o,s[l]);return r.length=o,r}});var O8,lje=Ct,cje=ru,dje=Tl.f,uje=rs,e$=zr,fje=DB,hje=Wo,pje=jB,gje=cje("".slice),mje=Math.min,t$=pje("endsWith");lje({target:"String",proto:!0,forced:!!(t$||(O8=dje(String.prototype,"endsWith"),!O8||O8.writable))&&!t$},{endsWith:function(e){var t=e$(hje(this));fje(e);var n=arguments.length>1?arguments[1]:void 0,r=t.length,o=n===void 0?r:mje(uje(n),r),s=e$(e);return gje(t,o-s.length,o)===s}});var Xg,rf,vje=/^\s*at (?:(.*?) ?\()?((?:file|https?|blob|chrome-extension|address|native|eval|webpack|<anonymous>|[-a-z]+:|.*bundle|\/).*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,Jg="js",of="resource",n$="unhandledrejection",Qg="cors",r$="vue",i$="react",o$={exports:{}},a$={exports:{}};Xg="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",rf={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&rf.rotl(e,8)|4278255360&rf.rotl(e,24);for(var t=0;t<e.length;t++)e[t]=rf.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],o=0;o<4;o++)8*n+6*o<=8*e.length?t.push(Xg.charAt(r>>>6*(3-o)&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((Xg.indexOf(e.charAt(n-1))&Math.pow(2,-2*r+8)-1)<<2*r|Xg.indexOf(e.charAt(n))>>>6-2*r);return t}},a$.exports=rf;var yje=a$.exports,P8={utf8:{stringToBytes:function(e){return P8.bin.stringToBytes(unescape(encodeURIComponent(e)))},bytesToString:function(e){return decodeURIComponent(escape(P8.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("")}}},s$=P8,bje=function(e){return e!=null&&(l$(e)||function(t){return typeof t.readFloatLE=="function"&&typeof t.slice=="function"&&l$(t.slice(0,0))}(e)||!!e._isBuffer)};function l$(e){return!!e.constructor&&typeof e.constructor.isBuffer=="function"&&e.constructor.isBuffer(e)}(function(){var e=yje,t=s$.utf8,n=bje,r=s$.bin,o=function(s,c){s.constructor==String?s=c&&c.encoding==="binary"?r.stringToBytes(s):t.stringToBytes(s):n(s)?s=Array.prototype.slice.call(s,0):Array.isArray(s)||s.constructor===Uint8Array||(s=s.toString());for(var l=e.bytesToWords(s),d=8*s.length,u=1732584193,f=-271733879,h=-1732584194,p=271733878,g=0;g<l.length;g++)l[g]=16711935&(l[g]<<8|l[g]>>>24)|4278255360&(l[g]<<24|l[g]>>>8);l[d>>>5]|=128<<d%32,l[14+(d+64>>>9<<4)]=d;var y=o._ff,_=o._gg,w=o._hh,C=o._ii;for(g=0;g<l.length;g+=16){var E=u,S=f,x=h,N=p;u=y(u,f,h,p,l[g+0],7,-680876936),p=y(p,u,f,h,l[g+1],12,-389564586),h=y(h,p,u,f,l[g+2],17,606105819),f=y(f,h,p,u,l[g+3],22,-1044525330),u=y(u,f,h,p,l[g+4],7,-176418897),p=y(p,u,f,h,l[g+5],12,1200080426),h=y(h,p,u,f,l[g+6],17,-1473231341),f=y(f,h,p,u,l[g+7],22,-45705983),u=y(u,f,h,p,l[g+8],7,1770035416),p=y(p,u,f,h,l[g+9],12,-1958414417),h=y(h,p,u,f,l[g+10],17,-42063),f=y(f,h,p,u,l[g+11],22,-1990404162),u=y(u,f,h,p,l[g+12],7,1804603682),p=y(p,u,f,h,l[g+13],12,-40341101),h=y(h,p,u,f,l[g+14],17,-1502002290),u=_(u,f=y(f,h,p,u,l[g+15],22,1236535329),h,p,l[g+1],5,-165796510),p=_(p,u,f,h,l[g+6],9,-1069501632),h=_(h,p,u,f,l[g+11],14,643717713),f=_(f,h,p,u,l[g+0],20,-373897302),u=_(u,f,h,p,l[g+5],5,-701558691),p=_(p,u,f,h,l[g+10],9,38016083),h=_(h,p,u,f,l[g+15],14,-660478335),f=_(f,h,p,u,l[g+4],20,-405537848),u=_(u,f,h,p,l[g+9],5,568446438),p=_(p,u,f,h,l[g+14],9,-1019803690),h=_(h,p,u,f,l[g+3],14,-187363961),f=_(f,h,p,u,l[g+8],20,1163531501),u=_(u,f,h,p,l[g+13],5,-1444681467),p=_(p,u,f,h,l[g+2],9,-51403784),h=_(h,p,u,f,l[g+7],14,1735328473),u=w(u,f=_(f,h,p,u,l[g+12],20,-1926607734),h,p,l[g+5],4,-378558),p=w(p,u,f,h,l[g+8],11,-2022574463),h=w(h,p,u,f,l[g+11],16,1839030562),f=w(f,h,p,u,l[g+14],23,-35309556),u=w(u,f,h,p,l[g+1],4,-1530992060),p=w(p,u,f,h,l[g+4],11,1272893353),h=w(h,p,u,f,l[g+7],16,-155497632),f=w(f,h,p,u,l[g+10],23,-1094730640),u=w(u,f,h,p,l[g+13],4,681279174),p=w(p,u,f,h,l[g+0],11,-358537222),h=w(h,p,u,f,l[g+3],16,-722521979),f=w(f,h,p,u,l[g+6],23,76029189),u=w(u,f,h,p,l[g+9],4,-640364487),p=w(p,u,f,h,l[g+12],11,-421815835),h=w(h,p,u,f,l[g+15],16,530742520),u=C(u,f=w(f,h,p,u,l[g+2],23,-995338651),h,p,l[g+0],6,-198630844),p=C(p,u,f,h,l[g+7],10,1126891415),h=C(h,p,u,f,l[g+14],15,-1416354905),f=C(f,h,p,u,l[g+5],21,-57434055),u=C(u,f,h,p,l[g+12],6,1700485571),p=C(p,u,f,h,l[g+3],10,-1894986606),h=C(h,p,u,f,l[g+10],15,-1051523),f=C(f,h,p,u,l[g+1],21,-2054922799),u=C(u,f,h,p,l[g+8],6,1873313359),p=C(p,u,f,h,l[g+15],10,-30611744),h=C(h,p,u,f,l[g+6],15,-1560198380),f=C(f,h,p,u,l[g+13],21,1309151649),u=C(u,f,h,p,l[g+4],6,-145523070),p=C(p,u,f,h,l[g+11],10,-1120210379),h=C(h,p,u,f,l[g+2],15,718787259),f=C(f,h,p,u,l[g+9],21,-343485551),u=u+E>>>0,f=f+S>>>0,h=h+x>>>0,p=p+N>>>0}return e.endian([u,f,h,p])};o._ff=function(s,c,l,d,u,f,h){var p=s+(c&l|~c&d)+(u>>>0)+h;return(p<<f|p>>>32-f)+c},o._gg=function(s,c,l,d,u,f,h){var p=s+(c&d|l&~d)+(u>>>0)+h;return(p<<f|p>>>32-f)+c},o._hh=function(s,c,l,d,u,f,h){var p=s+(c^l^d)+(u>>>0)+h;return(p<<f|p>>>32-f)+c},o._ii=function(s,c,l,d,u,f,h){var p=s+(l^(c|~d))+(u>>>0)+h;return(p<<f|p>>>32-f)+c},o._blocksize=16,o._digestsize=16,o$.exports=function(s,c){if(s==null)throw new Error("Illegal argument "+s);var l=e.wordsToBytes(o(s,c));return c&&c.asBytes?l:c&&c.asString?r.bytesToString(l):e.bytesToHex(l)}})();var _je=f5e(o$.exports);function wje(e){var t=e.match(vje);return t?{filename:t[2],functionName:t[1]||"",lineno:parseInt(t[3],10)||void 0,colno:parseInt(t[4],10)||void 0}:{}}function Zg(e){var t=(e||{stack:""}).stack;if(!t)return[];var n,r=[],o=Jy(t.split(`
150
- `).slice(1));try{for(o.s();!(n=o.n()).done;){var s=wje(n.value);s&&r.push(s)}}catch(c){o.e(c)}finally{o.f()}return r.slice(0,10)}var Pc=function(e){return _je(e).toString()},R8=function(e){return e instanceof ErrorEvent?e.message==="Script error."?Qg:Jg:of},Cje=function(){function e(t){m0(this,e),Zi(this,"errorIdSet",new Set),this.webCoreIns=t,this.errorIdSet=new Set}return v0(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]:{},o=r.type,s=r.event,c=n[o];c&&c(s)}),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(R8(r)===Qg){var o={errorType:Qg,errorMessage:r.message,errorSummary:"CorsError",errorId:Pc("".concat(Qg,"-").concat(r.message))};t.commit(o)}}(n)},!0)}},{key:"onResourceError",value:function(t){if(R8(t)===of){var n=t.target||t.srcElement,r=n.src||n.href,o=JSON.stringify(of+": "+r||"UnKnown Resource"),s={errorType:of,errorMessage:o,errorSummary:"ResourceError",errorId:Pc("".concat(of,"-").concat(o))};this.commit(s)}}},{key:"onJSError",value:function(t){var n,r;if(R8(t)===Jg){var o=JSON.stringify(t.message),s=function(l){var d=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"unknown";if(!l)return d;try{var u=new URL(l);return u.pathname&&u.pathname.endsWith(".js")?l:d}catch(f){return l}}(t.filename,(n=this.webCoreIns.config)===null||n===void 0?void 0:n.appKey),c={errorType:Jg,errorMessage:o,errorSummary:t.error&&((r=t.error)===null||r===void 0?void 0:r.name)||"UnKnown",errorStack:JSON.stringify(Zg(t.error)),errorId:Pc("".concat(Jg,"-").concat(o,"-").concat(s))};this.commit(c)}}},{key:"onPromiseError",value:function(t){var n,r,o=JSON.stringify(((n=t.reason)===null||n===void 0?void 0:n.message)||t.reason||"UnKnown"),s=((r=t.reason)===null||r===void 0?void 0:r.name)||"UnKnown",c={errorType:n$,errorMessage:o,errorSummary:s,errorStack:JSON.stringify(Zg(t.reason)),errorId:Pc("".concat(n$,"-").concat(o,"-").concat(s))};this.commit(c)}},{key:"onVueError",value:function(t,n,r){var o=JSON.stringify(t.message),s={errorType:r$,errorMessage:o,errorSummary:t.name||"UnKnown",errorStack:JSON.stringify(Zg(t)),errorId:Pc("".concat(r$,"-").concat(o,"-").concat(t.name))};this.commit(s)}},{key:"onReactError",value:function(t,n){var r=JSON.stringify(t.message),o={errorType:i$,errorMessage:r,errorSummary:t.name||"UnKnown",errorStack:JSON.stringify(Zg(t)),errorId:Pc("".concat(i$,"-").concat(r,"-").concat(t.name))};console.log(o),this.commit(o)}},{key:"commit",value:function(t){var n=t.errorId;this.errorIdSet.has(n)||(this.errorIdSet.add(n),this.webCoreIns.commit(Qd({type:"error"},t)))}}]),e}(),Sje=function(e){function t(){var o,s=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return m0(this,t),(o=d5e(this,t,[s])).config=s,o.isReport()?(o.PerformancePluginInstance=new qBe(Vd(o)),o.WhiteScreenPluginInstance=new uDe(Vd(o)),o.ErrorPluginInstance=new Cje(Vd(o)),o.plugins=[o.PerformancePluginInstance,o.WhiteScreenPluginInstance,o.ErrorPluginInstance],o.init(),kk(t,t,Rc,Vd(o)),o):Sk(o)}var n,r;return function(o,s){if(typeof s!="function"&&s!==null)throw new TypeError("Super expression must either be null or a function");o.prototype=Object.create(s&&s.prototype,{constructor:{value:o,writable:!0,configurable:!0}}),Object.defineProperty(o,"prototype",{writable:!1}),s&&Xy(o,s)}(t,cRe),v0(t,[{key:"isReport",value:function(){var o=this.isIE(),s=this.calcRatio();return this.config.appKey&&s&&!o}},{key:"init",value:(r=Zd(Dr().mark(function o(){return Dr().wrap(function(s){for(;;)switch(s.prev=s.next){case 0:this.initTime(this.mixed()),this.plugins.forEach(function(c){c.init()});case 2:case"end":return s.stop()}},o,this)})),function(){return r.apply(this,arguments)})},{key:"mixed",value:function(){var o=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},s=this.uid(),c=this.getTime(),l=c.time,d=c.date,u=this.getUA(),f=window.location,h=f.host,p=f.origin,g=f.pathname;return Qd(Qd({uid:s,sid:this.sid,url:window.location.href,host:h,fullPath:p+g,sdkVersion:this.sdkVersion,createDate:d,appKey:this.config.appKey,createTime:l,appVersion:this.appVersion,env:this.env},u),o)}},{key:"commit",value:(n=Zd(Dr().mark(function o(s){var c,l;return Dr().wrap(function(d){for(;;)switch(d.prev=d.next){case 0:c=this.mixed(s),l=new URL("".concat(window.location.protocol,"//").concat(this.host,"/log.gif")),Object.entries(c).map(function(u){var f=u5e(u,2),h=f[0],p=f[1];l.searchParams.set(h,p)}),new Image().src=l.toString();case 5:case"end":return d.stop()}},o,this)})),function(o){return n.apply(this,arguments)})}],[{key:"install",value:function(o){var s=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};b0(t,t,Rc)||(o.config.errorHandler=function(c,l,d){b0(t,t,Rc).ErrorPluginInstance.onVueError(c,l,d),console.error(c)},kk(t,t,Rc,new t(s)))}},{key:"sendError",value:function(o){b0(t,t,Rc)?b0(t,t,Rc).ErrorPluginInstance.onReactError(o):console.error("QAPM: 请先初始化 QAPM!")}}]),t}(),Rc={writable:!0,value:null};const oKe="",aKe="",xje={components:{InfoFilled:nv,ArrowRight:ev},mixins:[si],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:Ole,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,o,s,c,l,d,u;const e=[];if(this.nodeInfo.length===1){const f=this.nodeInfo[0];f.type!=="aggregation"&&f.type!=="nodeType"&&(e.push(z2),(r=this.history.keyNodeIds)!=null&&r.some(w=>w===f.id)||(e.push(H2),(s=(o=this.moduleDetail)==null?void 0:o.config)!=null&&s.hideCollectMenu||e.push(f.collect?G2:q2),e.push(f.textProp==="name"?D2:F2),f.label&&e.push(f.textProp==="label"?j2:U2)),this.canGoDetail&&e.push(LS)),e.push(f.fx?$2:M2);const h=this.history.dataNow.links.some(_=>_.source.id===f.id&&_.target.type==="aggregation"),y=this.history.dataNow.links.filter(_=>_.source.id===f.id).map(_=>_.target).some(_=>{let w=0;return this.history.dataNow.links.map(C=>{C.source.id===_.id&&w++}),w===0});h||f.type==="aggregation"?e.push(RS):y&&e.push(PS),y&&e.push(OS),e.push(W2)}else this.nodeInfo.length>1?(e.push(H2,z2),e.push(this.nodeInfo.some(h=>!h.collect)?q2:G2),this.nodeInfo.some(h=>h.label)&&e.push(this.nodeInfo.some(h=>h.textProp!=="label")?U2:j2),e.push(this.nodeInfo.some(h=>h.textProp!=="name")?F2:D2),e.push(this.nodeInfo.some(h=>!h.fx)?M2:$2),e.push(W2)):this.nodeInfo.length===0&&(this.history.dataNow.nodes.some(h=>h.label)&&e.push(this.history.dataNow.nodes.some(h=>h.textProp!=="label")?NS:kS),e.push(this.history.dataNow.nodes.some(h=>h.textProp!=="name")?xS:ES),e.push(this.history.dataNow.nodes.some(h=>!h.fx)?CS:SS),this.history.currentIndex>0&&e.push(TS),this.history.currentIndex<this.history.length-1&&e.push(AS));const t=(c=this.nodeInfo[0])==null?void 0:c.type,n=(u=(d=(l=this.nodeInfo[0])==null?void 0:l.detail)==null?void 0:d.info)==null?void 0:u.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,o=this.axis.top+(e+t)*this.itemHeight;return{left:this.axis.left+this.itemWidth*2>=n?"-100%":"100%",top:r>=o?0:"auto",bottom:r<o?0:"auto"}},thirdBorderCheck(e,t,n,r){const o=document.body.offsetWidth,s=document.body.offsetHeight,c=this.secondBorderCheck(e,n).top;let l;const d=(t+r)*this.itemHeight,u=d>180?180:d;return c===0?l=this.axis.top+e*this.itemHeight+u:l=this.axis.top-e*this.itemHeight+u,{left:this.axis.left+this.itemWidth*3>=o?"-100%":"100%",bottom:s>=l?0:"auto",top:s<l?0:"auto"}},handleClick(e,t){if(!t){if(fn({cId:"contextMenu-"+e.name,c:"右键菜单-"+e.namec}),e.has_child>0)return!1;be(this,"contextmenu-click",{nodes:this.nodeInfo,api:e})}},handleDataClick(e,t){fn({cId:"contextMenu-"+e.name,c:"右键菜单-"+e.namec}),be(this,"contextmenu-click",{nodes:this.nodeInfo,api:t,dataApi:e}),this.checkedItems={}}}},Ic=e=>(a.pushScopeId("data-v-10144870"),e=e(),a.popScopeId(),e),Eje={"aria-hidden":"true",style:{position:"absolute",width:"0",height:"0",overflow:"hidden",display:"none"}},kje=[Ic(()=>a.createElementVNode("symbol",{id:"icon-arrow-right",viewBox:"0 0 1024 1024"},[a.createElementVNode("path",{d:"M288.791335 65.582671l446.41733 446.417329-446.41733 446.417329z"})],-1))],Nje={class:"cm-list"},Tje={class:"cm-ul"},Aje={class:"hd"},Oje=["src"],Pje={class:"bd"},Rje={class:"cm-ul cm-ul-level1"},Ije=["title"],Bje=Ic(()=>a.createElementVNode("svg",{class:"icon","aria-hidden":"true"},[a.createElementVNode("use",{"xlink:href":"#icon-arrow-right"})],-1)),Lje=["title","onClick"],Mje=["title","onClick"],$je={key:0,class:"icon","aria-hidden":"true"},Fje=[Ic(()=>a.createElementVNode("use",{"xlink:href":"#icon-arrow-right"},null,-1))],Dje=["title","onClick"],jje=["src"],Uje=Ic(()=>a.createElementVNode("div",{class:"bd"},null,-1)),zje=["title","onClick"],qje={key:0,class:"fas el-icon-fa-cog"},Gje={key:1,class:"fas el-icon-fa-external-link-alt"},Hje={class:"text-wrapper"},Wje=["src"],Kje=["src"],Yje={key:3,class:"shortcut"},Xje={key:2,class:"icon","aria-hidden":"true"},Jje=[Ic(()=>a.createElementVNode("use",{"xlink:href":"#icon-arrow-right"},null,-1))],Qje=["title","onClick"],Zje={key:1,class:"icon","aria-hidden":"true"},Vje=[Ic(()=>a.createElementVNode("use",{"xlink:href":"#icon-arrow-right"},null,-1))],eUe=["title","onClick"];function tUe(e,t,n,r,o,s){const c=a.resolveComponent("ArrowRight"),l=tt,d=a.resolveComponent("InfoFilled"),u=rr;return n.show?(a.openBlock(),a.createElementBlock("div",{key:0,class:"cm-container",style:a.normalizeStyle(s.axisComputed),onClick:t[1]||(t[1]=a.withModifiers((...f)=>s.handleCollapse&&s.handleCollapse(...f),["stop"]))},[(a.openBlock(),a.createElementBlock("svg",Eje,kje)),a.createElementVNode("div",Nje,[a.createElementVNode("ul",Tje,[s.checkboxMenu.length>0?(a.openBlock(),a.createElementBlock("li",{key:0,class:"cm-li data-opt-wrapper",style:a.normalizeStyle(s.liStyle)},[a.createElementVNode("div",Aje,[a.createElementVNode("img",{src:e.imgPath["./public/d3svg1/button18/button_relation.svg"],style:{"margin-right":"10px"}},null,8,Oje),a.createTextVNode("按关系分类拓线"),a.createVNode(l,null,{default:a.withCtx(()=>[a.createVNode(c)]),_:1})]),a.createElementVNode("div",Pje,[a.createElementVNode("ul",Rje,[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(s.checkboxMenu,(f,h)=>(a.openBlock(),a.createElementBlock("li",{key:h,class:"cm-li context-one",style:a.normalizeStyle(s.liStyle)},[s.hasChildren(f)?(a.openBlock(),a.createElementBlock("div",{key:0,class:a.normalizeClass(["cm-item",s.firstLeft?"cm-left":""]),title:f.namec},[a.createElementVNode("span",null,a.toDisplayString(f.namec),1),Bje],10,Ije)):(a.openBlock(),a.createElementBlock("div",{key:1,class:a.normalizeClass(["cm-item",s.firstLeft?"cm-left":""]),title:f.namec,onClick:a.withModifiers(p=>s.handleDataClick(f,o.globalMenus.expandPartNode),["stop"])},[a.createElementVNode("span",null,a.toDisplayString(f.namec),1)],10,Lje)),s.hasChildren(f)?(a.openBlock(),a.createElementBlock("ul",{key:2,class:"cm-ul cm-ul-level2",style:a.normalizeStyle(s.secondBorderCheck(h,f.children.length))},[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(f.children,(p,g)=>(a.openBlock(),a.createElementBlock("li",{key:g,class:"cm-li",style:a.normalizeStyle(s.liStyle)},[a.createElementVNode("div",{class:a.normalizeClass(["cm-item",s.secondLeft?"cm-left":""]),title:p.namec,onClick:a.withModifiers(y=>s.handleDataClick(p,o.globalMenus.expandPartNode),["stop"])},[a.createElementVNode("span",null,a.toDisplayString(p.namec),1),s.hasChildren(p)?(a.openBlock(),a.createElementBlock("svg",$je,Fje)):a.createCommentVNode("",!0)],10,Mje),s.hasChildren(p)?(a.openBlock(),a.createElementBlock("ul",{key:0,class:"cm-ul cm-ul-level3",style:a.normalizeStyle(s.thirdBorderCheck(h,g,f.children.length,p.children.length))},[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(p.children,(y,_)=>(a.openBlock(),a.createElementBlock("li",{key:_,class:"cm-li",style:a.normalizeStyle(s.liStyle)},[a.createElementVNode("div",{class:"cm-item",title:y.namec,onClick:a.withModifiers(w=>s.handleDataClick(y,o.globalMenus.expandPartNode),["stop"])},[a.createElementVNode("span",null,a.toDisplayString(y.namec),1)],8,Dje)],4))),128))],4)):a.createCommentVNode("",!0)],4))),128))],4)):a.createCommentVNode("",!0)],4))),128))])])],4)):n.nodeInfo.length>1&&n.nodeInfo.length<o.maxMulti?(a.openBlock(),a.createElementBlock("li",{key:1,class:"cm-li data-opt-wrapper data-opt-all",style:a.normalizeStyle(s.liStyle)},[a.createElementVNode("div",{class:"hd",onClick:t[0]||(t[0]=a.withModifiers(f=>s.handleDataClick(null,o.globalMenus.expandNode),["stop"]))},[a.createElementVNode("img",{src:e.imgPath["./public/d3svg1/button18/button_relation.svg"],style:{"margin-right":"10px"}},null,8,jje),a.createTextVNode("展开全部关系 ")]),Uje],4)):a.createCommentVNode("",!0),(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(s.systemMenu,(f,h)=>(a.openBlock(),a.createElementBlock("li",{key:h,class:"cm-li",style:a.normalizeStyle(s.liStyle)},[a.createElementVNode("div",{class:a.normalizeClass(["cm-item",{"cm-left":s.firstLeft,disabled:f.disabled}]),title:f.namec,onClick:a.withModifiers(p=>s.handleClick(f,f.disabled),["stop"])},[s.isSystemItem(f)?(a.openBlock(),a.createElementBlock("i",qje)):s.isExternalItem(f)?(a.openBlock(),a.createElementBlock("i",Gje)):a.createCommentVNode("",!0),a.createElementVNode("div",Hje,[f.icon?(a.openBlock(),a.createElementBlock("img",{key:0,src:e.imgPath["./public/d3svg1/button18/"+f.icon+".svg"],class:"t-icon"},null,8,Wje)):(a.openBlock(),a.createElementBlock("img",{key:1,src:e.imgPath["./public/d3svg1/button18/button_"+f.name+".svg"],class:"t-icon"},null,8,Kje)),f.tooltip?(a.openBlock(),a.createBlock(u,{key:2,class:"el-icon-info",effect:"dark",content:f.tooltip,placement:"top-start"},{default:a.withCtx(()=>[a.createVNode(l,null,{default:a.withCtx(()=>[a.createVNode(d)]),_:1})]),_:2},1032,["content"])):a.createCommentVNode("",!0),a.createElementVNode("span",null,a.toDisplayString(f.namec),1),f.shortcut?(a.openBlock(),a.createElementBlock("span",Yje,a.toDisplayString(f.shortcut),1)):a.createCommentVNode("",!0)]),s.hasChildren(f)?(a.openBlock(),a.createElementBlock("svg",Xje,Jje)):a.createCommentVNode("",!0)],10,zje),s.hasChildren(f)?(a.openBlock(),a.createElementBlock("ul",{key:0,class:"cm-ul cm-ul-level2",style:a.normalizeStyle(s.secondBorderCheck(h,f.children.length))},[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(f.children,(p,g)=>(a.openBlock(),a.createElementBlock("li",{key:g,class:"cm-li",style:a.normalizeStyle(s.liStyle)},[a.createElementVNode("div",{class:a.normalizeClass(["cm-item",{"cm-left":s.secondLeft,disabled:f.disabled||p.disabled}]),title:p.namec,onClick:a.withModifiers(y=>s.handleClick(p,f.disabled||p.disabled),["stop"])},[p.tooltip?(a.openBlock(),a.createBlock(u,{key:0,class:"el-icon-info",effect:"dark",content:p.tooltip,placement:"top-start"},{default:a.withCtx(()=>[a.createVNode(l,null,{default:a.withCtx(()=>[a.createVNode(d)]),_:1})]),_:2},1032,["content"])):a.createCommentVNode("",!0),a.createElementVNode("span",null,a.toDisplayString(p.namec),1),s.hasChildren(p)?(a.openBlock(),a.createElementBlock("svg",Zje,Vje)):a.createCommentVNode("",!0)],10,Qje),s.hasChildren(p)?(a.openBlock(),a.createElementBlock("ul",{key:0,class:"cm-ul cm-ul-level3",style:a.normalizeStyle(s.thirdBorderCheck(h,g,f.children.length,p.children.length))},[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(p.children,(y,_)=>(a.openBlock(),a.createElementBlock("li",{key:_,class:"cm-li",style:a.normalizeStyle(s.liStyle)},[a.createElementVNode("div",{class:a.normalizeClass(["cm-item",{disabled:f.disabled||p.disabled||y.disabled}]),title:y.namec,onClick:a.withModifiers(w=>s.handleClick(y,f.disabled||p.disabled||y.disabled),["stop"])},[y.tooltip?(a.openBlock(),a.createBlock(u,{key:0,class:"el-icon-info",effect:"dark",content:y.tooltip,placement:"top-start"},{default:a.withCtx(()=>[a.createVNode(l,null,{default:a.withCtx(()=>[a.createVNode(d)]),_:1})]),_:2},1032,["content"])):a.createCommentVNode("",!0),a.createElementVNode("span",null,a.toDisplayString(y.namec),1)],10,eUe)],4))),128))],4)):a.createCommentVNode("",!0)],4))),128))],4)):a.createCommentVNode("",!0)],4))),128))])])],4)):a.createCommentVNode("",!0)}const nUe=De(xje,[["render",tUe],["__scopeId","data-v-10144870"]]),uKe="",fKe="",hKe="",pKe="",rUe={name:"Popover",components:{ForceGraphSvgIcon:Ia},mixins:[si],inject:["levelList"],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:()=>({})}},data(){return{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 l,d,u;const e=this.mousePosition.left>document.body.offsetWidth/2,t=this.mousePosition.top>document.body.offsetHeight/2,n=(l=document.getElementsByClassName("popover-container")[0])==null?void 0:l.offsetHeight,r=(d=document.getElementsByClassName("d3-container")[0])==null?void 0:d.offsetHeight,o=(u=document.getElementsByClassName("d3-container")[0])==null?void 0:u.getBoundingClientRect().top;let s;t?s=Math.max(this.mousePosition.top,n+o)+5:s=Math.min(this.mousePosition.top,Math.max(r-n,o))-5;const c={left:(e?this.mousePosition.left+2:this.mousePosition.right-2)+"px",top:s+"px",transform:`translate(${e?"-100%":"0%"}, ${t?"-100%":"0%"})`};this.position=c},100)},nodeInfo:{handler:function(){var t;const e=(((t=this.nodeInfo)==null?void 0:t.list)||[]).map(n=>{var o,s,c;const r=n.detail;return de(se({},n),{name:((o=r==null?void 0:r.info)==null?void 0:o.name)||n.name,level:((c=(s=r==null?void 0:r.info)==null?void 0:s.basic)==null?void 0:c.level)||""})});e==null||e.sort((n,r)=>{var c,l;const o=(c=this.levelList.find(d=>d.level===n.level))==null?void 0:c.dangerNumber;return((l=this.levelList.find(d=>d.level===r.level))==null?void 0:l.dangerNumber)-o}),this.aggregationList=e},immediate:!0}},methods:{handleMouseEnter(){this.showSelf=!0},handleMouseLeave(){this.showSelf=!1},isSomething(e){return T2(e)},getTypeZh(e){var n,r,o;let t=e;if(e==="nodeType")t="关系节点";else for(const s in(n=this.moduleDetail)==null?void 0:n.nodes)if(e===((r=this.moduleDetail)==null?void 0:r.nodes[s].name)){t=(o=this.moduleDetail)==null?void 0:o.nodes[s].namec;break}return t},getLevelClass(e){return Yh(e,this.levelList)},getColorStyle(e){return Xh(e,this.levelList,this.darkMode)},getNodeTypeChildNum(e){var o;const t=(o=this.data)==null?void 0:o.links,n=[],r=[];return t==null||t.map(s=>{s.source.id===e&&(n.push(s.target.id),s.target.detail&&Use(s.target.detail.info.basic.level,this.levelList)&&r.push(s.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 o="-";return r&&(n?o=t.length?t.join("|"):"-":o=t||"-"),o},formatTags(e){return Hh(Wh(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)be(Ke,"emitDataLoaded");else{const n=this.nodeInfo,r={deleteOne:{nodes:[n],links:[{source:n.relationId,target:n.id}]},type:"aggregation"};setTimeout(()=>{this.history.pushState(r),be(Ke,"emitDataLoaded")},0)}}}},Bc=e=>(a.pushScopeId("data-v-4d80bc6d"),e=e(),a.popScopeId(),e),iUe={key:0,class:"node-info-container"},oUe={class:"popover-block popover-header"},aUe={key:0,class:"popover-collect"},sUe={key:1,class:"row-item"},lUe={class:"label"},cUe={key:2,class:"row-item"},dUe=Bc(()=>a.createElementVNode("div",{class:"label"},"关系节点:",-1)),uUe={class:"value"},fUe={class:"node-type-info"},hUe={class:"name"},pUe={key:3,class:"row-item"},gUe=Bc(()=>a.createElementVNode("div",{class:"label"},"备注:",-1)),mUe={class:"value"},vUe={class:"popover-block popover-fields"},yUe={key:0,class:"node-detail top-border"},bUe={key:0,class:"row-item"},_Ue=Bc(()=>a.createElementVNode("div",{class:"label"},"危险级别:",-1)),wUe=["title"],CUe={key:1,class:"row-item row-item-tag"},SUe=Bc(()=>a.createElementVNode("div",{class:"label"},"标签:",-1)),xUe={class:"value"},EUe={class:"graph-tags-box"},kUe=Bc(()=>a.createElementVNode("br",null,null,-1)),NUe={key:0,class:"row-item"},TUe={class:"label"},AUe=["title"],OUe={key:1,class:"node-statistics top-border"},PUe={class:"row-item node-num"},RUe=Bc(()=>a.createElementVNode("div",{class:"label"},"拓展节点统计:",-1)),IUe={class:"value"},BUe={key:0},LUe={class:"danger"},MUe={key:2,class:"node-aggregation"},$Ue={class:"aggregation-title"},FUe={class:"aggregation-box"},DUe={key:1,class:"node-info-container"},jUe={class:"popover-fields"},UUe={class:"top"};function zUe(e,t,n,r,o,s){const c=a.resolveComponent("force-graph-svg-icon"),l=rr,d=_d,u=ite,f=Aa,h=rte;return a.openBlock(),a.createElementBlock("div",{class:a.normalizeClass(["popover-container",s.show?"show-popover":"hide-popover"]),style:a.normalizeStyle(o.position),onMouseenter:t[0]||(t[0]=(...p)=>s.handleMouseEnter&&s.handleMouseEnter(...p)),onMouseleave:t[1]||(t[1]=(...p)=>s.handleMouseLeave&&s.handleMouseLeave(...p))},[a.createElementVNode("div",null,[n.type==="node"?(a.openBlock(),a.createElementBlock("div",iUe,[a.createElementVNode("div",oUe,[n.nodeInfo.collect?(a.openBlock(),a.createElementBlock("div",aUe,[a.createVNode(l,{content:"已收藏","popper-class":"el-tooltip-gray",placement:"left"},{default:a.withCtx(()=>[a.createVNode(c,{class:"button-img","icon-class":e.imgPath["./public/d3svg1/star.svg"]},null,8,["icon-class"])]),_:1})])):a.createCommentVNode("",!0),s.isNormalNode?(a.openBlock(),a.createElementBlock("div",sUe,[a.createElementVNode("div",lUe,a.toDisplayString(s.getTypeZh(n.nodeInfo.type))+":",1),a.createElementVNode("div",{class:a.normalizeClass(["value",{"star-next":n.nodeInfo.collect}])},a.toDisplayString(s.name),3)])):a.createCommentVNode("",!0),s.isNodeTypeNode?(a.openBlock(),a.createElementBlock("div",cUe,[dUe,a.createElementVNode("div",uUe,[a.createElementVNode("div",fUe,[a.createElementVNode("div",hUe,a.toDisplayString(n.nodeInfo.name),1)])])])):a.createCommentVNode("",!0),n.nodeInfo.label?(a.openBlock(),a.createElementBlock("div",pUe,[gUe,a.createElementVNode("div",mUe,a.toDisplayString(n.nodeInfo.label),1)])):a.createCommentVNode("",!0)]),a.createElementVNode("div",vUe,[s.isNormalNode&&n.nodeInfo.detail?(a.openBlock(),a.createElementBlock("div",yUe,[s.canGoDetail?(a.openBlock(),a.createElementBlock("div",bUe,[_Ue,a.createElementVNode("div",{class:a.normalizeClass(["value level",s.getLevelClass(n.nodeInfo.detail&&n.nodeInfo.detail.info.basic.level)]),title:n.nodeInfo.detail&&n.nodeInfo.detail.info.basic.level||"--"},a.toDisplayString(n.nodeInfo.detail&&n.nodeInfo.detail.info.basic.level||"--"),11,wUe)])):a.createCommentVNode("",!0),n.nodeInfo.detail&&n.nodeInfo.detail.tags&&n.nodeInfo.detail.tags.length>0?(a.openBlock(),a.createElementBlock("div",CUe,[SUe,a.createElementVNode("div",xUe,[a.createElementVNode("div",EUe,[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(s.formatTags(n.nodeInfo.detail.tags),(p,g)=>(a.openBlock(),a.createBlock(l,{key:g,"popper-class":"el-tooltip-gray"},{content:a.withCtx(()=>[a.createElementVNode("div",null,[a.createTextVNode(a.toDisplayString(p.name===p.desc?p.name:p.name+":"+p.desc)+" ",1),p.disabled?(a.openBlock(),a.createElementBlock(a.Fragment,{key:0},[kUe,a.createTextVNode(" 标签状态:失效 ")],64)):a.createCommentVNode("",!0)])]),default:a.withCtx(()=>[a.createElementVNode("span",null,[a.createVNode(d,{class:a.normalizeClass(["graph-tag-one",`${p.type||"unknown"} ${p.disabled?"tag-disable":""}`]),type:p.type||"info"},{default:a.withCtx(()=>[a.createTextVNode(a.toDisplayString(p.name),1)]),_:2},1032,["class","type"])])]),_:2},1024))),128))])])])):a.createCommentVNode("",!0),(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(s.fieldMapThisType,(p,g)=>(a.openBlock(),a.createElementBlock(a.Fragment,null,[s.canShowField(p)?(a.openBlock(),a.createElementBlock("div",NUe,[a.createElementVNode("div",TUe,a.toDisplayString(p.zh)+":",1),a.createElementVNode("div",{class:a.normalizeClass(["value",{red:p.prop==="virus_name"}]),title:n.nodeInfo.detail.info.basic[g]},a.toDisplayString(s.getFieldValue(p)),11,AUe)])):a.createCommentVNode("",!0)],64))),256))])):a.createCommentVNode("",!0),s.isNodeTypeNode?(a.openBlock(),a.createElementBlock("div",OUe,[a.createElementVNode("div",PUe,[RUe,a.createElementVNode("div",IUe,[s.getNodeTypeChildNum(n.nodeInfo.id).dangerChildNum>0?(a.openBlock(),a.createElementBlock("span",BUe,[a.createElementVNode("span",LUe,a.toDisplayString(s.getNodeTypeChildNum(n.nodeInfo.id).dangerChildNum),1),a.createTextVNode("/")])):a.createCommentVNode("",!0),a.createTextVNode(a.toDisplayString(s.getNodeTypeChildNum(n.nodeInfo.id).allChildNum),1)])])])):a.createCommentVNode("",!0),s.isAggregateNode?(a.openBlock(),a.createElementBlock("div",MUe,[a.createElementVNode("div",$Ue,"聚合节点 ("+a.toDisplayString(o.aggregationList.length)+"个)",1),a.createElementVNode("div",FUe,[a.createVNode(h,{data:o.aggregationList,style:{width:"100%"}},{default:a.withCtx(()=>[a.createVNode(u,{prop:"name","min-width":"200",label:"名称"}),a.createVNode(u,{sortable:"",prop:"type",label:"类型"}),a.createVNode(u,{sortable:"",prop:"level",width:"80",label:"级别"},{default:a.withCtx(p=>[a.createElementVNode("span",{style:a.normalizeStyle({color:s.getColorStyle(p.row.level)})},a.toDisplayString(p.row.level||"--"),5)]),_:1}),a.createVNode(u,{label:"操作"},{default:a.withCtx(p=>[a.createVNode(f,{class:"add-to-graph-btn",type:"primary",text:"",size:"small",onClick:g=>s.addToGraph(p.row)},{default:a.withCtx(()=>[a.createTextVNode(" 添加到图谱 ")]),_:2},1032,["onClick"])]),_:1})]),_:1},8,["data"])])])):a.createCommentVNode("",!0)])])):(a.openBlock(),a.createElementBlock("div",DUe,[a.createElementVNode("div",jUe,[a.createElementVNode("div",UUe,a.toDisplayString(n.nodeInfo.apiName),1)])]))])],38)}const qUe=De(rUe,[["render",zUe],["__scopeId","data-v-4d80bc6d"]]),GUe=[{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:[]}],c$={name:"vue-safe-force-graph",version:"2.0.22",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",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 publish","p:base64":"npm run patch:base64 && npm run lib:base64 && npm publish",svgo:"svgo -f src/icons/svg --config=src/icons/svgo.yml",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.5","core-js":"^3.29.1","csv-parse":"^5.0.4",d3:"^7.8.5","d3-lasso":"0.0.5","element-plus":"^2.3.0",html2canvas:"^1.0.0-rc.7",json2csv:"^5.0.7",konva:"^9.2.0",lodash:"^4.17.21","mime-types":"^2.1.35",minimist:"^1.2.6","radar-js-analytic-sdk":"^2.2.6",vue:"^3.2.47","vue-clipboard3":"^2.0.0","vue-router":"^4.1.6"},devDependencies:{"@babel/core":"^7.23.3","@babel/preset-env":"^7.23.3","@originjs/vite-plugin-commonjs":"^1.0.3","@q/qcdn":"^3.1.6","@vitejs/plugin-vue":"^4.1.0",autoprefixer:"9.5.1",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",svgo:"1.2.2","unplugin-auto-import":"^0.15.2","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"},OKe="",PKe="",RKe="",{toClipboard:HUe}=Jh(),WUe="Arial,Helvetica Neue,Helvetica,PingFang SC,Hiragino Sans GB,Microsoft YaHei,sans-serif",I8={},Ci=1,KUe=["ip","intranet","internet"],B8=20;let Gt={},Mn={},go=null;const wr={},YUe={name:"ForceGraphRenderByCanvas",components:{Popover:qUe,NodeContextmenu:nUe},mixins:[si],provide:function(){return{levelList:this.levelList}},props:{data:{type:Object,default:()=>({nodes:[],links:[]})},history:{type:Object,default:()=>({})},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}]},nodeTypeScale:{type:Number,default:1},nodeTypeList:{type:Array,default:()=>[]}},emits:["handle-select-node","custom-contextmenu-click","flagFiles","updateSelection"],data(){return{prefix:"./public/",iconAllLoaded:!1,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:nl()?"metaKey":"ctrlKey",levelHeight:100,actNum:0,scriptNow:null,scriptInited:!1,canAct:!1,isKeyUp:!0,initTimes:0,resizeObserver:null,canvasElement:null,stage:a.shallowRef(null),layer:a.shallowRef(null),simulation:a.shallowRef(null),nodes:a.shallowRef(null),links:a.shallowRef(null),hoveredNode:a.shallowRef(null),mouseDownNode:a.shallowRef(null),selectionRect:null,selection:[],scale:Ci,mousedownPos:null,mousedownNode:null,mouseupNode:null,dragLine:null,darkBgRect:null}},computed:{iconSizeComputed(){const e=c5e(I8);return this.nodeTypeList.forEach(t=>{e[t]=I8[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(){this.nodes=this.data.nodes,this.links=this.data.links,this.update()},deep:!0},moduleDetail:{handler:function(e){return Pe(this,null,function*(){e!=null&&e.nodes&&!this.iconAllLoaded&&(yield this.loadIcons(),this.initForceGraph(),setTimeout(()=>{this.update()},50))})},deep:!0,immediate:!0},darkMode:{handler:function(e){return Pe(this,null,function*(){const t=e?"dark":"light";setTimeout(()=>{this.update(),this.isThreatPath?document.querySelectorAll(`.${this.uniqueClass}.render-container`)[0].setAttribute("data-theme",t):(document.querySelectorAll(`.${this.uniqueClass}.render-container`)[0].setAttribute("data-theme",t),document.getElementsByClassName(this.uniqueClass+" render-container")[0].parentElement.parentElement.setAttribute("data-theme",t))},200)})},immediate:!0}},created(){un("graph created time",Date.now()),zi.setProject("QH_10542_1724").getTrack(),localStorage.getItem("showSafeForceGraphLog")&&(un("组件名称: "+c$.name),un("组件版本: "+c$.version),un("环境变量",{VITE_LOCAL_ONLY:"false",VITE_APP_BASE_API:"/",BASE_URL:"/",MODE:"production",DEV:!1,PROD:!0,SSR:!1})),this.isThreatPath||this.initKeyEvent(),this.uniqueClass="unique"+new Date().getTime()+Math.floor(Math.random()*1e5)},mounted(){return Pe(this,null,function*(){new Sje({appKey:"fe-force-graph",ratio:50}),this.initForceGraph(),jse(this.levelList),!this.isThreatPath&&(Bo(Ke,"buttonClick",e=>{un(e,"buttonClick msg"),this.handleContextMenuClick(e)}),Bo(Ke,"relationClick",e=>{this.handleContextMenuClick(e)}),Bo(Ke,"sendNodesRange",(e,t)=>{e!==void 0&&(this.nodesRange=e,this.updateNodeStyle())}))})},beforeUnmount(){Lo(Ke,"buttonClick"),Lo(Ke,"relationClick"),Lo(Ke,"sendNodesRange"),this.unbindKeyEvent(),this.resetAll(),un("destroy")},methods:{initForceGraph(){return Pe(this,null,function*(){const e=this.$refs.canvasContainer;let t=e.clientWidth,n=e.clientHeight;this.resizeObserver=new ResizeObserver(o=>{for(const s of o)t=s.contentRect.width,n=s.contentRect.height,this.stage.width(t),this.stage.height(n),this.layer&&this.layer.batchDraw(),this.centerAndZoom(),un(`新宽度: ${t}px, 新高度: ${n}px`)}),this.resizeObserver.observe(e),document.addEventListener("click",this.hideContextMenu,!1),this.nodes=this.data.nodes,this.links=this.data.links,this.stage=new _t.Stage({container:e,width:t,height:n,scaleX:Ci,scaleY:Ci}),this.layer=new _t.Layer,go=new _t.Group({id:"grab",x:0,y:0}),this.layer.add(go);const r=this.layer.getCanvas()._canvas;this.canvasElement=r,this.stage.on("mousemove",o=>{if(!this.mousedownNode||!o.evt[this.actKey]){if(this.resetMouseVars(),this.selectionRect&&o.evt.altKey){const s=this.stage.getPointerPosition(),c=(s.x-this.stage.x())/this.scale,l=(s.y-this.stage.y())/this.scale,d=c-this.selectionRect.x(),u=l-this.selectionRect.y();this.selectionRect.width(d),this.selectionRect.height(u),this.stage.batchDraw()}}else{const s=this.stage.getPointerPosition(),c=this.stage.scaleX(),l=(s.x-this.stage.x())/c,d=(s.y-this.stage.y())/c;this.dragLine.points([this.mousedownPos.x,this.mousedownPos.y,l,d]),this.layer.batchDraw()}}),this.stage.on("wheel",o=>{o.evt.preventDefault();const s=1.1,c=this.scale,l=o.evt.deltaY<0?c*s:c/s;this.scale=l;const d=this.stage.getPointerPosition(),u=this.stage.position(),f=d.x-(d.x-u.x)*(l/c),h=d.y-(d.y-u.y)*(l/c);this.stage.setAttrs({scaleX:l,scaleY:l,x:f,y:h}),this.layer.batchDraw()}),this.stage.on("mousedown",o=>{const s=o.target;if(s&&s.nodeType==="Stage"?this.stage.setDraggable(!0):this.stage.setDraggable(!1),o.evt.altKey){this.stage.setDraggable(!1);const c=this.stage.scaleX(),l=this.stage.getPointerPosition(),d=(l.x-this.stage.x())/c,u=(l.y-this.stage.y())/c;this.selectionRect=new _t.Rect({x:d,y:u,width:0,height:0,stroke:"rgb(80, 80, 80)",strokeWidth:2}),this.layer.add(this.selectionRect),this.stage.batchDraw()}}),this.stage.on("mouseup",o=>{if(this.stage.setDraggable(!1),this.selectionRect&&o.evt.altKey){const s=this.selectionRect.x(),c=this.selectionRect.y(),l=this.selectionRect.width(),d=this.selectionRect.height();this.selection=this.nodes.filter(u=>{const f={x:u.x,y:u.y};return f.x>=s&&f.x<=s+l&&f.y>=c&&f.y<=c+d}),this.updateSelection(),this.selectionRect.destroy(),this.selectionRect=null}}),this.stage.on("contextmenu",this.handleGlobalContextMenu),this.stage.on("click",o=>{o.target&&o.target.nodeType==="Stage"&&this.handleDeselectNode(o)}),this.setSimulation(),this.stage.add(this.layer),this.stage.draw(),this.update()})},setSimulation(){var n;if(!((n=this.nodes)!=null&&n.length)){un("setSimulation 无数据");return}const e=this.stage.width()/(2*Ci),t=this.stage.height()/(2*Ci);this.simulation=sae(this.nodes).force("link",Voe(this.links).id(r=>r.id).distance(120).strength(1)).force("charge",lae().strength(-600)).force("x",cae()).force("y",dae()).force("center",oS(e,t)).on("tick",this.ticked),this.simulation.alphaDecay=this.alphaDecay*1,this.simulation.alphaMin=this.alphaMin*1,this.simulation.on("end",()=>{un("simulation end time",Date.now()),un("node count",this.nodes.filter(r=>r.type!=="nodeType").length),this.isThreatPath&&this.centerAndZoom(1)})},update(){var e;this.destroyed||(e=this.nodes)!=null&&e.length&&(this.initScript(),this.simulation?this.updateSimulation():this.setSimulation(),this.doClearCanvas(),this.paintLinks(),this.paintNodes(),this.updateSelection(),this.actNum===9&&setTimeout(()=>{this.centerAndZoom(.8)},200))},doClearCanvas(){Gt={},Mn={},this.layer.destroyChildren(),go=new _t.Group({id:"grab",x:0,y:0}),this.layer.add(go)},paintNodes(){const e=this.stage.width()/2,t=this.stage.height()/2,n=this.selection.map(r=>r.id);this.nodes.forEach(r=>Pe(this,null,function*(){var _,w,C,E,S,x,N,A,O,P,F,R,U,j;const o=(r.type==="nodeType"?this.iconSizeComputed[r.icon]||this.iconSizeComputed.node_type:this.iconSizeComputed[r.type])||24,s=(C=(w=(_=r==null?void 0:r.detail)==null?void 0:_.info)==null?void 0:w.basic)==null?void 0:C.level,c=(x=(S=(E=r==null?void 0:r.detail)==null?void 0:E.info)==null?void 0:S.basic)==null?void 0:x.flag,l=yield this.getNodeImage(r);Gt[r.id]&&((N=Gt[r.id])==null||N.destroy());const d=new _t.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){const q=Xh(s,this.levelList,this.darkMode),K=new _t.Circle({x:0,y:0,radius:20,fill:q,opacity:0}),J=new _t.Circle({x:0,y:0,radius:20,fill:q,opacity:0}),z=new _t.Circle({x:0,y:0,radius:20,fill:q,opacity:0});d.add(K),d.add(J),d.add(z);const D=(Z,X)=>new _t.Animation(function(te){const V=te.time,le=.5-.5*(V%X)/X,oe=40*(V%X)/X;Z.radius(oe||0),Z.opacity(le)},this.layer),G=D(K,1500),H=D(J,1500),B=D(z,1500);G.start(),setTimeout(function(){H.start()},500),setTimeout(function(){B.start()},1e3)}if(r.type==="ip"||r.type==="internet"){const q=new _t.Circle({x:0,y:0,fill:this.darkMode?"#182628":"#fff",radius:o/2,stroke:Xh(s,this.levelList),strokeWidth:2});d.add(q)}if(l){const q=(c?20:o)||24,K=l&&new _t.Image({x:0,y:0,offsetX:q/2,offsetY:q/2,image:l,width:q,height:q,draggable:!1});d.add(K)}if(r.detail&&r.type==="md5"){const q=((P=(O=(A=r.detail.info)==null?void 0:A.basic)==null?void 0:O.file_type)==null?void 0:P.toUpperCase())||"MD5",K=new _t.Text({name:"md5Text",x:0,y:0,text:q,fontSize:4,fontWeight:700,fontFamily:WUe,fill:this.darkMode?"#182628":"#fff",align:"center",listening:!1});K.x(K.x()-K.width()/2),d.add(K)}const u=r.textProp||"name",f=u==="name"?((R=(F=r==null?void 0:r.detail)==null?void 0:F.info)==null?void 0:R.name)||r.name:r[u];let h=f.length>14&&!KUe.includes(r.type)?f.slice(0,7)+"..."+f.slice(-7):f;h=yae(h);const p=new _t.Text({offsetY:o/2,name:"konvaText",x:0,y:o+8,text:h,fontSize:12,fontFamily:"Calibri",fill:this.darkMode?"#cdd9da":"#000",align:"center",listening:!1,visible:!!r.textProp});p.x(p.x()-p.width()/2),d.add(p);const g=new _t.Circle({name:"border",x:0,y:0,radius:o/2,fill:"#5c6271",opacity:.4,visible:!1});if(d.add(g),(j=(U=r.detail)==null?void 0:U.tags)!=null&&j.length){const q=new _t.Circle({x:((o/2||14)+5)*Math.sin(60*Math.PI/180),y:-((o/2||14)+5)*Math.cos(60*Math.PI/180),radius:3,fill:"#9300ff",listening:!1});d.add(q)}if(r.type!=="nodeType"&&r.type!=="aggregation"){var y=new _t.Circle({name:"collect",x:((o/2||14)+5)*Math.sin(0*Math.PI/180),y:-((o/2||14)+5)*Math.cos(0*Math.PI/180),radius:3,fill:"#ffad00",visible:!!r.collect});d.add(y)}if(r.label){const q=new _t.Circle({x:((o/2||14)+5)*Math.sin(30*Math.PI/180),y:-((o/2||14)+5)*Math.cos(30*Math.PI/180),radius:3,fill:"#0099ff",listening:!1});d.add(q)}d.on("dragstart",(q,K)=>{q.evt[this.actKey]||(this.simulation.alphaTarget(.3).restart(),this.isDragging=!0)}),d.on("dragmove",q=>{if(!q.evt[this.actKey]){var K=this.simulation.nodes().find(J=>J.id===r.id);K.x=d.x(),K.fx=d.x(),K.y=d.y(),K.fy=d.y(),this.links.forEach(J=>{const z=Mn[`${J.source.id}-${J.target.id}`].findOne(".konvaLine"),D=Mn[`${J.source.id}-${J.target.id}`].findOne(".linkArrow");if(J.source.id===K.id){const G=K.x,H=Gt[J.target.id].x(),B=K.y,Z=Gt[J.target.id].y();z.points([G,B,H,Z]);const X=A2(G,B,H,Z,B8);D==null||D.x(X==null?void 0:X.x),D==null||D.y(X==null?void 0:X.y),D==null||D.rotation(Math.atan2(Z-B,H-G)*(180/Math.PI))}else if(J.target.id===K.id){const G=Gt[J.source.id].x()||0,H=K.x||0,B=Gt[J.source.id].y()||0,Z=K.y||0;z.points([G,B,H,Z]);const X=A2(G,B,H,Z,B8);D==null||D.x(X==null?void 0:X.x),D==null||D.y(X==null?void 0:X.y),D==null||D.rotation(Math.atan2(Z-B,H-G)*(180/Math.PI))}}),this.layer.batchDraw()}}),d.on("dragend",q=>{q.evt[this.actKey]||(this.isDragging=!1)}),d.on("click",q=>{q.evt.detail===2?this.expandNodes(q,r):q.evt.detail===1&&q.evt.button===0&&this.handleNodeClick(q,r)}),d.on("contextmenu",q=>{q.cancelBubble=!0,q.evt.preventDefault(),q.evt.stopPropagation(),this.handleNodeContextMenu(q,r,d)}),d.on("mouseup",q=>this.handleNodeMouseUp(q,r)),d.on("mousedown",q=>this.handleNodeMouseDown(q,r)),d.on("mouseenter",q=>this.handleNodeMouseEnter(q,r)),d.on("mouseleave",q=>this.handleNodeMouseLeave(q,r)),go.add(d),Gt[r.id]=d})),this.stage.batchDraw()},paintLinks(){const e=this.stage.width()/2,t=this.stage.height()/2;this.links.forEach(n=>{Mn[`${n.source.id}-${n.target.id}`]&&Mn[`${n.source.id}-${n.target.id}`].destroy();const r=new _t.Group({opacity:1,id:`${n.source.id}-${n.target.id}`,visible:n.source.show&&n.target.show}),o=this.darkMode?"#445152":"#999",s=new _t.Arrow({name:"linkArrow",pointerLength:10,pointerWidth:10,x:e,y:t,fill:o});r.add(s);const c=n.source.x||0,l=n.source.y||0,d=n.target.x||0,u=n.target.y||0,f=new _t.Line({name:"konvaLine",id:`${n.source.id}-${n.target.id}`,points:[c,l,d,u],stroke:n.target.type==="org"?"#cf1322":o,strokeWidth:1,dash:n.diy===!0?[5,5]:null});if(n.target.type==="nodeType"){const h=new _t.Text({name:"edgeLabel",x:(c+d)/2,y:(l+u)/2,text:n.target.name,fontSize:12,fill:this.darkMode?"#cdd9da":"#000"});r.add(h)}r.add(f),go.add(r),r.moveToBottom(),Mn[`${n.source.id}-${n.target.id}`]=r}),this.stage.batchDraw()},updateSimulation(){var e;try{this.simulation.stop(),this.simulation.nodes(this.nodes),this.simulation.force("link").links(this.links),this.simulation.alpha(.4).restart(),this.simulation.on("tick",this.ticked)}catch(t){console.log(t,"simulation-e1"),(e=this.simulation)==null||e.stop()}},ticked(){switch(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],o=Mn[`${r.source.id}-${r.target.id}`],s=o==null?void 0:o.findOne(".konvaLine"),c=o==null?void 0:o.findOne(".linkArrow"),l=o==null?void 0:o.findOne(".edgeLabel");let d=r.source.x,u=r.source.y,f=r.target.x,h=r.target.y;const p=f-d||1,g=h-u||1,y=Math.sqrt(p*p+g*g),_=p/y||1,w=g/y||1,C=r.source.type==="nodeType"?(this.iconSizeComputed[r.source.icon]||14)/2-1:(this.iconSizeComputed[r.target.type]||14)/2-1,E=r.target.type==="nodeType"?(this.iconSizeComputed[r.target.icon]||14)/2-1:(this.iconSizeComputed[r.target.type]||14)/2-1;if(d=d+C*_,u=u+C*w,f=f-E*_,h=h-E*w,isNaN(d)||isNaN(u)||isNaN(f)||isNaN(h)){e=!1;break}s==null||s.points([d,u,f,h]);const S=A2(d,u,f,h,B8);if(c==null||c.x((S==null?void 0:S.x)||0),c==null||c.y((S==null?void 0:S.y)||0),c==null||c.rotation(Math.atan2(h-u,f-d)*(180/Math.PI)),l){l.x((d+f)/2),l.y((u+h)/2),l.offsetX(l.getWidth()/2||0),l.offsetY(l.getHeight()/2+8||0);const x=Math.atan2(h-u,f-d)*(180/Math.PI);f<d?l.rotation(x+180):l.rotation(x)}}if(!e){console.log("请点击自动布局按钮"),this.resetLayout();return}for(let n=0;n<this.nodes.length;n++){const r=this.nodes[n];(t=Gt[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=Mn[`${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 o=Mn[`${r.source.id}-${r.target.id}`];o==null||o.removeName("keyed")}),this.history.resetKeyLinksAndNodes();return}const{keyLinks:t,keyNodeIds:n}=this.history.findKeyLinksAndNodes(e[0].id,!0);this.links.forEach(r=>{const o=t.find(c=>c.source.id===r.source.id&&c.target.id===r.target.id),s=Mn[`${r.source.id}-${r.target.id}`];o?s==null||s.addName("keyed"):s==null||s.removeName("keyed")}),this.nodes.forEach(r=>{const o=Gt[r.id];n.includes(r.id)?o==null||o.addName("keyed"):o==null||o.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=Gt[e.id];if(!t)return;const n=t==null?void 0:t.findOne(".border"),r=t==null?void 0:t.findOne(".konvaText"),o=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(o)))}),this.layer.batchDraw()},updateLinksStyleByName(){this.links.forEach(e=>{const t=Mn[`${e.source.id}-${e.target.id}`];if(!t)return;const n=t.findOne(".konvaLine"),r=t.findOne(".edgeLabel"),o=t.findOne(".linkArrow");t!=null&&t.hasName("lowlight")?t==null||t.opacity(.4):t==null||t.opacity(1);const s=this.darkMode?"#445152":"#999";if(t.hasName("isSelected")||t.hasName("keyed")){const c=e.target.type==="org"?"#cf1322":"#007ee2";n.stroke(c),o.fill(c),n.strokeWidth(1),t==null||t.opacity(1),r==null||r.fill("#007ee2"),t.hasName("keyed")?n.strokeWidth(3):n.strokeWidth(1)}else{const c=e.target.type==="org"?"#cf1322":s;Mn[`${e.source.id}-${e.target.id}`].removeName("isSelected"),n.strokeWidth(1),n.stroke(c),o.fill(c),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.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&&!nl()&&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(nl())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,o,s,c,l,d;if(this.scriptInited)return;((s=(o=(r=this.history)==null?void 0:r.dataNow)==null?void 0:o.nodes)==null?void 0:s.length)>0&&(this.scriptInited=!0);const e=["193.36.119.50","6cd7b91212983cc557c6e3e671734ff9"];let t=null;if((d=(l=(c=this.history)==null?void 0:c.dataNow)==null?void 0:l.nodes)==null||d.some(u=>{const f=e.indexOf(u.id);return f>=0&&u.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(console.log("nodesMoveToCenterView"),e.length===0)return;const n=[],r=this.nodes.filter(E=>e.indexOf(E.id)>=0);r==null||r.forEach(function(E,S){const x=Gt[E.id];n.push({bounds:(x==null?void 0:x.getClientRect())||{},fx:E.x||0,fy:E.y||0})});const o=this.getBounds(n);this.originTransform=this.originTransform={scaleX:this.stage.scaleX(),scaleY:this.stage.scaleY(),x:this.stage.x(),y:this.stage.y()};const s=this.stage.width(),c=this.stage.height()/1.5,l=o.width,d=o.height;if(l===0||d===0)return;let u=t/Math.max(l/s,d/c);u=Math.min(u,Ci)||Ci,this.scale=u;const f=this.stage.width()/(2*u),h=this.stage.height()/(2*u),p=Gt[e[0]],g=p==null?void 0:p.getClientRect(),y=g.x*u,_=g.y*u,w=f-y,C=h-_;this.stage.setAttrs({scaleX:u,scaleY:u,x:w||0,y:C||0}),this.layer.batchDraw()},getBounds(e){let t,n,r,o;return e.map(s=>{const c=s.bounds,l=c.x+s.fx,d=c.y+s.fy;t=Math.min(l,t)||l,n=Math.min(d,n)||d,r=Math.max(l+c.width,r)||l+c.width,o=Math.max(d+c.height,o)||d+c.height}),{x:t,y:n,width:r-t,height:o-n}},resetMouseVars(){var e;this.mousedownNode=null,this.mousedownPos=null,this.mouseupNode=null,(e=this.dragLine)==null||e.destroy(),Object.keys(Gt).forEach(t=>{Gt[t].draggable(!0)})},loadIcons(){return new Promise((e,t)=>{const n=[],r=[];for(const d in this.moduleDetail.plugs){const u=this.moduleDetail.plugs[d];u==null||u.map(f=>{f.children?r.push(...f.children):r.push(f)})}n.push(...r.map(d=>d.icon)),n.push(...this.moduleDetail.nodes.map(d=>d.name)),n.push("node_type"),n.push("node"),n.push("aggregation");const o=this;let s=0;const c=n.filter(d=>this.imgPath[`${o.prefix}d3svg1/${d}.svg`]);function l(d){return{}.VITE_SVG_TYPE==="base64"?wae(d):Loe(d)}c.map(d=>{l(this.imgPath[`${o.prefix}d3svg1/${d}.svg`]).then(function(u){o.iconFiles[d]=u;const f=_ae(u).width;I8[d]=f,s++,s===c.length&&(o.iconAllLoaded=!0,e())}).catch(u=>{console.log(u,"e"),t()})})})},toggleZoom(e){},handleNodeContextMenu(e,t){var n,r;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=GUe: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){be(this,"handle-select-node",{isSelected:!1,_node:a.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||RC(".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=Gt[t.id])==null||n.addName("isSelected"):(r=Gt[t.id])==null||r.removeName("isSelected")}),be(this,"updateSelection")},toggleLayout(e){this.history.layoutIndex=e,this.history.dataNow.nodes.map(t=>{t.fx=t.fy=null}),this.updateSimulation(),this.ticked(),setTimeout(()=>{this.centerAndZoom()},200)},handleNodeClick(e,t){un("click",e,t),fn({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(o=>o.id===t.id);if(e.evt.shiftKey){if(t.type==="nodeType"||this.selection.some(o=>o.type==="nodeType"))return;n?this.selection=this.selection.filter(o=>o.id!==t.id):this.selection=[...this.selection,t]}else n?this.selection=[]:this.selection=[t];const r=this.selection.some(o=>o.id===t.id);be(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(),o=e.target,s=o.getAbsolutePosition(),l=o.getStage().container().getBoundingClientRect(),d=s.x-n/2+l.left,u=s.y-r/2+l.top,f=d,h=u,p=f,g=f+n,y=h,_=h+r;this.hoverNodePosition={top:y,right:g,bottom:_,left:p,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,Gt[t.id].draggable(!1);const n=this.stage.scaleX(),r=this.stage.getPointerPosition(),o=(r.x-this.stage.x())/n,s=(r.y-this.stage.y())/n;this.mousedownPos={x:o,y:s},this.dragLine=new _t.Line({points:[o,s,o,s],stroke:"black",strokeWidth:1,dash:[5,5],opacity:.7,visible:!0}),this.layer.add(this.dragLine),this.stage.draw()}},treeLayout(){this.nodes.map(e=>{e.fx=e.pos,e.fy=e.levelNum*this.levelHeight}),this.forceLayout()},resetLayout(){this.simulation.stop(),this.nodes.map(e=>{delete e.vx,delete e.vy,delete e.x,delete e.y,delete e.fx,delete e.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,o=0;const s=t[n];this.links.map(c=>{c.source.id===s&&r++,c.target.id===s&&o++}),r>=1&&t.splice(n,1),o>=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,h,p;if(this.originTransform={scaleX:this.stage.scaleX(),scaleY:this.stage.scaleY(),x:this.stage.x(),y:this.stage.y()},!go)return;const n=this.stage.width(),r=this.stage.height(),o=go.getClientRect(),s=o.width/this.scale,c=o.height/this.scale;if(s===0||c===0)return;let l=e/Math.max(s/n,c/r);if(l=t?l:Math.min(l,Ci)||Ci,!t&&l>Ci)return;this.scale=l;const d=this.stage.width()/(2*l),u=this.stage.height()/(2*l);if((f=this.simulation)!=null&&f.force&&((h=this.simulation)==null||h.force("center",oS(d,u))),this.stage.setAttrs({scaleX:l,scaleY:l,x:0,y:0}),this.layer.batchDraw(),this.history.layoutIndex===1){const g=go.getClientRect(),y=(n-g.width)/2-g.x,_=(r-g.height)/2-g.y;this.stage.setAttrs({x:y,y:_}),this.layer.batchDraw(),(p=this.simulation)==null||p.stop()}},reset(){this.stage.setAttrs(this.originTransform)},handleContextMenuClick({nodes:e,api:t,dataApi:n}){if(this.requestGraphData){let r,o;const s={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(c=>r.includes(c.id));break;case"hold_aggregation":o=this.selectSingleEdgeNode(e[0]),this.$parent.aggregationNodes(o,e[0]);break;case"release_aggregation":this.$parent.releaseAggregation(e[0]);break;case"show_label":case"show_names":e.map(c=>{this.showLabel(c,s[t.name])});break;case"all_show_label":case"all_show_names":this.nodes.map(c=>{this.showLabel(c,s[t.name])});break;case"un_show_names":case"un_show_label":e.map(c=>{this.hideLabel(c)});break;case"all_un_show_names":case"all_un_show_label":this.nodes.map(c=>{this.hideLabel(c)});break;case"copy":this.copyNodeText(e);break;case"node_star":e.map(c=>{this.starNode(c)});break;case"un_node_star":e.map(c=>{this.starNode(c,!1)});break;case"fix_nodes":e.map(c=>{this.toggleMove(c,!0)});break;case"un_fix_nodes":e.map(c=>{this.toggleMove(c,!1)});break;case"all_fix_nodes":this.fixAllNodes(!0);break;case"all_un_fix_nodes":this.fixAllNodes(!1);break;case"expand_node":e.map(c=>{this.$parent.expandNodes(c)});break;case"expand_part_node":e.map(c=>{this.$parent.expandNodes(c,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;default:be(this,"custom-contextmenu-click",{eventName:t.name,customConfig:t.customConfig,nodes:e,allNodes:a.toRaw(this.history.dataNow.nodes)})}this.hideContextMenu(),setTimeout(()=>{this.updateSelection()},400)}else qt({message:"无可操作权限",type:"warning"})},expandNodes(e,t){console.log("dblclick"),fn({cId:"dblclick",c:"双击节点"}),this.requestGraphData?this.$parent.expandNodes(t):qt({message:"无可操作权限",type:"warning"})},toggleShowNode(e,t,n=!0){this.history.toggleShowNode(e,t,n),this.selection.filter(o=>o.show).length>0||this.handleTableSelect([]),setTimeout(this.updateNodeStyle,100)},copyNodeText(e){let t="";e.filter(n=>n.type!=="aggregation"&&n.type!=="nodeType").map(n=>{t=t+n.id+`
151
- `}),t&&HUe(t).then(()=>{qt({message:"复制成功",type:"success"})},n=>{console.log("copy---e",n)})},toggleMove(e,t){e.fx=t?e.x:null,e.fy=t?e.y:null,this.updateSimulation()},autoDisplay(){this.nodes.map(e=>{e.fx=null,e.fy=null})},editLabel(e){var t;mC.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((o,s)=>o&&o[s]?o[s]:void 0,e)},fixAllNodes(e=!0){this.nodes.map(t=>{this.toggleMove(t,e)})},highlightByRule(e,t){if(!e.prop&&!t){this.nodes.forEach(l=>{const d=Gt[l.id];d==null||d.removeName("lowlight")}),this.links.forEach(l=>{const d=Mn[`${l.source.id}-${l.target.id}`];d==null||d.removeName("lowlight")});return}const{type:n,prop:r,value:o}=e,s=this,c=[];this.nodes.forEach(function(l){const d=Gt[l.id];r?n==="include"?o.includes(s.safeGet(l,r))&&s.inNodesRange(t,l)?(d==null||d.removeName("lowlight"),c.push(l)):d==null||d.addName("lowlight"):n==="equal"?s.safeGet(l,r)===o&&s.inNodesRange(t,l)?(d==null||d.removeName("lowlight"),c.push(l)):d==null||d.addName("lowlight"):n==="boolean"&&(T2(s.safeGet(l,r))&&s.inNodesRange(t,l)?(d==null||d.removeName("lowlight"),c.push(l)):d==null||d.addName("lowlight")):s.inNodesRange(t,l)?(d==null||d.removeName("lowlight"),c.push(l)):d==null||d.addName("lowlight")}),this.links.forEach(function(l){const d=Mn[`${l.source.id}-${l.target.id}`];c.some(f=>f.id===l.target.id)?d==null||d.removeName("lowlight"):d==null||d.addName("lowlight")})},handleCustomSelect(e){if(this.handleDeselectNode(),!e.prop)return;const{type:t,prop:n,value:r}=e,o=this;this.nodes.forEach(s=>{if(n&&t==="include"){let c;if(s.type==="nodeType"){const l=o.safeGet(s,"parents"),d=o.safeGet(s,"children"),u=l==null?void 0:l.some(h=>r.includes(h)),f=d==null?void 0:d.some(h=>r.includes(h));c=u&&f}(r.includes(o.safeGet(s,n))||c)&&this.selection.push(s)}}),this.updateSelection()},inNodesRange(e,t){return e?e.some(n=>n===t.id):!0},loadFlagFiles(e){return Pe(this,null,function*(){return new Promise(t=>{this.flagFiles[e]?t():$d(this.imgPath[`${this.prefix}d3svg1/flags/${e}.png`]).then(n=>{this.flagFiles[e]=n,t()})})})},getNodeImage(e){return Pe(this,null,function*(){var o,s,c,l,d,u;let t=null;const n=(o=e.detail)==null?void 0:o.info.basic.flag,r=((l=(c=(s=e==null?void 0:e.detail)==null?void 0:s.info)==null?void 0:c.basic)==null?void 0:l.level)||"未知";if(e.detail&&((u=(d=e.detail)==null?void 0:d.info)!=null&&u.inner_img))t=yield tl(e.detail.info.inner_img);else if(e.type==="nodeType"||e.type==="aggregation"){const f=e.icon||"node_type";if(wr[f])return t=wr[f],t;t=this.iconFiles[f]?this.iconFiles[f]:this.iconFiles.node_type,t=yield tl("data:image/svg+xml,"+encodeURIComponent(t)),wr[f]=t}else if(n&&(e.type==="ip"||e.type==="internet")){if(wr[n])return t=wr[n],t;yield this.loadFlagFiles(n),t=yield tl(this.flagFiles[n]),wr[n]=t}else if(e.detail&&(e.type==="country"||e.type==="target_country")){const f=e.detail.info.inner_country;if(wr[f])return t=wr[f],t;yield this.loadFlagFiles(f),t=yield tl(this.flagFiles[f]),wr[f]=t}else{const f=`${e.type||"node"}${r}${this.darkMode}`;if(wr[f])return t=wr[f],t;t=this.iconFiles[e.type]?this.iconFiles[e.type]:this.iconFiles.node;const h=Xh(r,this.levelList,this.darkMode),p=this.darkMode?"#182628":"#fff";t=bae(t,h,p),t=yield tl("data:image/svg+xml,"+encodeURIComponent(t)),wr[f]=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 o=t.id.split("(")[0];o.indexOf("APT")>=0&&window.open(r.split("${id}").join(o),t.id)}else{let o=t.origin&&t.origin[0]||t.id;(n==="url"||n==="virus")&&(o=encodeURIComponent(o)),window.open(r.split("${id}").join(o),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},o={x:this.stage.getPointerPosition().x-this.stage.x(),y:this.stage.getPointerPosition().y-this.stage.y()},s={x:-(o.x-r.x)*(e-1),y:-(o.y-r.y)*(e-1)};this.stage.setAttrs({x:this.stage.x()+s.x,y:this.stage.y()+s.y,scaleX:n,scaleY:n}),this.layer.batchDraw()},addNodesDetail(e){return Pe(this,null,function*(){const t=e.filter(o=>!o.detail&&o.noDetail!==!0&&o.type!=="aggregation"&&o.type!=="nodeType"),n={};t.map(o=>{n[o.type]?n[o.type].push(o):n[o.type]=[o]});const r=[];for(const o in n){const s=n[o],c={};s.map(l=>{l.origin&&(c[l.id]=l.origin)}),r.push(this.graphApi.getNodesDetail({api:this.moduleDetail.node_info[n[o][0].type],node_id:n[o].map(l=>l.id),origin:c}).then(l=>(l.data.records.map(u=>{const f=e.find(h=>h.id===u.info.id);f.detail=u}),Promise.resolve({}))))}})},addCanvasBg(){this.darkMode&&(this.darkBgRect=new _t.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()}}},XUe={class:"main-svg-box"},JUe={ref:"canvasContainer",class:"canvas-container"};function QUe(e,t,n,r,o,s){const c=a.resolveComponent("popover"),l=a.resolveComponent("node-contextmenu");return a.openBlock(),a.createElementBlock("div",{class:a.normalizeClass(["render-container",n.darkMode?"dark-theme "+o.uniqueClass:" "+o.uniqueClass])},[a.createElementVNode("div",XUe,[a.createElementVNode("div",JUe,null,512)]),a.createVNode(c,{"dark-mode":n.darkMode,"show-popover":o.showPopover&&!o.isDragging,"mouse-position":o.hoverNodePosition,"node-info":o.popoverNode,"module-detail":n.moduleDetail,type:o.popoverType,history:n.history,data:n.history.dataNow},null,8,["dark-mode","show-popover","mouse-position","node-info","module-detail","type","history","data"]),n.isThreatPath?a.createCommentVNode("",!0):(a.openBlock(),a.createBlock(l,{key:0,show:s.showContextMenuFlag,axis:o.mousePosition,"node-info":s.contextMenuNodes,history:n.history,"menu-options":o.menuOptions,"module-detail":n.moduleDetail,onContextmenuClick:s.handleContextMenuClick},null,8,["show","axis","node-info","history","menu-options","module-detail","onContextmenuClick"]))],2)}const Lc=De(YUe,[["render",QUe]]),IKe="",BKe="",LKe="",{toClipboard:d$}=Jh(),ZUe={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}},created(){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})},mounted(){},updated(){},beforeUnmount(){},methods:{hanleClickCopy(e){d$(e).then(t=>qt({message:"复制成功",type:"success"}),t=>qt.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(l=>l===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 o=this.snapshot.thumb;let s=null;this.groupOptions.map(l=>{l.value===this.ruleForm.group&&(s=l.label)});const c={report_id:this.ruleForm.event,group_id:this.ruleForm.group,content:o,graph_url:r,group_name:s,acl:parseInt(this.ruleForm.radio),head:this.ruleForm.graphDesc};this.graphApi.addGraph(c).then(l=>{l.code==="0"?(d$(this.eventUrl),qt({message:"分享成功! 分享事件地址已经复制",type:"success",showClose:!0,duration:5e3})):qt({message:"分享失败",type:"error"})}).catch(()=>{qt({message:"分享失败",type:"error"})}),this.resetForm(e),this.dialogVisible=!1}else return!1})},resetForm(e){this.$refs[e].resetFields(),this.snapshot.name=""}}},VUe={class:"sharetoEvents"},eze={class:"lable-header"},tze={class:"desc"},nze={key:0,class:"desc-font"},rze={key:1,class:"desc-font"},ize={class:"dialog-footer"};function oze(e,t,n,r,o,s){const c=BZ,l=dh,d=ch,u=kv,f=Na,h=Ev,p=Aa,g=wd;return a.openBlock(),a.createElementBlock("div",VUe,[a.createVNode(g,{title:"分享到安全事件","append-to-body":"","close-on-click-modal":!1,width:"25%",modelValue:o.dialogVisible,"onUpdate:modelValue":t[6]||(t[6]=y=>o.dialogVisible=y),class:"el-dialog-graph"},{footer:a.withCtx(()=>[a.createElementVNode("span",ize,[a.createVNode(p,{type:"primary",onClick:t[5]||(t[5]=y=>s.submitForm("ruleForm"))},{default:a.withCtx(()=>[a.createTextVNode("确认分享")]),_:1}),a.createVNode(p,{onClick:s.hide},{default:a.withCtx(()=>[a.createTextVNode("关闭")]),_:1},8,["onClick"])])]),default:a.withCtx(()=>[a.createVNode(h,{ref:"ruleForm",model:o.ruleForm,rules:o.rules,"label-width":"100px",class:"demo-ruleForm"},{default:a.withCtx(()=>[a.createElementVNode("div",eze,[a.createVNode(c,{modelValue:o.ruleForm.radio,"onUpdate:modelValue":t[0]||(t[0]=y=>o.ruleForm.radio=y),class:"el-radio",label:"1",border:"",size:"medium"},{default:a.withCtx(()=>[a.createTextVNode("付费可见")]),_:1},8,["modelValue"]),a.createVNode(c,{modelValue:o.ruleForm.radio,"onUpdate:modelValue":t[1]||(t[1]=y=>o.ruleForm.radio=y),label:"0",border:"",size:"medium"},{default:a.withCtx(()=>[a.createTextVNode("开放")]),_:1},8,["modelValue"]),a.createElementVNode("div",tze,[o.ruleForm.radio==="0"?(a.openBlock(),a.createElementBlock("span",nze,"该Graph内容对所有用户可见。")):(a.openBlock(),a.createElementBlock("span",rze,"该Graph内容对付费用户可见。"))])]),a.createVNode(u,{label:"安全事件",prop:"event"},{default:a.withCtx(()=>[a.createVNode(d,{modelValue:o.ruleForm.event,"onUpdate:modelValue":t[2]||(t[2]=y=>o.ruleForm.event=y),"popper-append-to-body":!1,filterable:"",placeholder:"请选择",class:"select-item"},{default:a.withCtx(()=>[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(o.eventOptions,y=>(a.openBlock(),a.createBlock(l,{key:y.value,label:y.label,value:y.value},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])]),_:1}),o.isInnerAccount?(a.openBlock(),a.createBlock(u,{key:0,label:"选择团队",prop:"group"},{default:a.withCtx(()=>[a.createVNode(d,{modelValue:o.ruleForm.group,"onUpdate:modelValue":t[3]||(t[3]=y=>o.ruleForm.group=y),class:"select-item",filterable:"",placeholder:"请选择"},{default:a.withCtx(()=>[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(o.groupOptions,y=>(a.openBlock(),a.createBlock(l,{key:y.value,label:y.label,value:y.value},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])]),_:1})):a.createCommentVNode("",!0),a.createVNode(u,{label:"Graph介绍",prop:"graphDesc"},{default:a.withCtx(()=>[a.createVNode(f,{modelValue:o.ruleForm.graphDesc,"onUpdate:modelValue":t[4]||(t[4]=y=>o.ruleForm.graphDesc=y),type:"textarea",rows:2,placeholder:"请输入内容",maxlength:"50",clearable:""},null,8,["modelValue"])]),_:1})]),_:1},8,["model","rules"])]),_:1},8,["modelValue"])])}const aze=De(ZUe,[["render",oze]]),MKe="",{toClipboard:sze}=Jh(),lze={name:"SnapShotDialog",components:{ShareToSecurityEvents:aze},mixins:[],props:{graphUrlPath:{type:String,default:"/graph"},snapshot:{type:Object,default:()=>{}},graphApi:{type:Object,default:()=>{}}},data(){return{dialogVisible:!1,origin:window.location.origin,isInnerAccount:!1}},computed:{},watch:{},created(){},mounted(){Bo(Ke,"sharePermission",e=>{this.isInnerAccount=e})},updated(){},beforeUnmount(){Lo(Ke,"sharePermission")},methods:{hanleClickCopy(e){sze(e).then(t=>qt({message:"复制成功",type:"success"}),t=>qt.error("复制失败"))},show(){this.dialogVisible=!0},hide(){this.dialogVisible=!1},shareToEvents(){this.dialogVisible=!1,this.$refs.sharetoevents.show()}}},cze={class:"snapshotdialog-container"},dze={class:"dialog-footer"};function uze(e,t,n,r,o,s){const c=Na,l=aV,d=Aa,u=wd,f=a.resolveComponent("ShareToSecurityEvents");return a.openBlock(),a.createElementBlock("div",cze,[a.createVNode(u,{title:"复制链接及提取码","append-to-body":"",modelValue:o.dialogVisible,"onUpdate:modelValue":t[2]||(t[2]=h=>o.dialogVisible=h),"close-on-click-modal":!1,class:"el-dialog-graph"},{footer:a.withCtx(()=>[a.createElementVNode("span",dze,[o.isInnerAccount?(a.openBlock(),a.createBlock(d,{key:0,type:"primary",onClick:t[0]||(t[0]=h=>s.shareToEvents())},{default:a.withCtx(()=>[a.createTextVNode("分享到安全事件")]),_:1})):a.createCommentVNode("",!0),a.createVNode(d,{type:"primary",onClick:t[1]||(t[1]=h=>s.hanleClickCopy(`${o.origin}${n.graphUrlPath}?snapshot_id=${n.snapshot.snapshot_id}&vcode=${n.snapshot.vcode}`))},{default:a.withCtx(()=>[a.createTextVNode("复制链接及提取码")]),_:1}),a.createVNode(d,{onClick:s.hide},{default:a.withCtx(()=>[a.createTextVNode("关闭")]),_:1},8,["onClick"])])]),default:a.withCtx(()=>[a.createVNode(c,{value:`${o.origin}${n.graphUrlPath}?snapshot_id=${n.snapshot.snapshot_id}`},{prepend:a.withCtx(()=>[a.createTextVNode("链接地址:")]),_:1},8,["value"]),a.createVNode(l),a.createVNode(c,{value:n.snapshot.vcode},{prepend:a.withCtx(()=>[a.createTextVNode("提取码:")]),_:1},8,["value"])]),_:1},8,["modelValue"]),a.createVNode(f,{ref:"sharetoevents",snapshot:n.snapshot,"graph-api":n.graphApi},null,8,["snapshot","graph-api"])])}const fze=De(lze,[["render",uze]]),$Ke="",hze={name:"ForceGraphByCanvas",components:{Loading:If,ForceGraphSvgIcon:Ia,RenderByCanvas:Lc,ButtonList:the,SnapShotDialog:fze,RightMenu:qde,Legend:Oue},mixins:[si],provide:function(){return{history:this.history,hasLevel:this.hasLevel,levelList:this.levelList,levelMap:this.levelMap,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:()=>[]},customContextMenuEvent:{type:Function},handleSelectNodeEvent:{type:Function},handleDataLoaded:{type:Function},graphApi:{type:Object,default:()=>{}},graphUrlPath:{type:String,default:"/graph"},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},nodeTypeScale:{type:Number},singlesNodeMaxNum:{type:Number,default:100}},emits:["sharePermission","custom-contextmenu-click","handle-select-node","handle-data-loaded","outdate"],data(){return{history:new uae({isShowNodeMessage:this.isShowNodeMessage}),isLoading:!1,bigLoading:!1,loadingInfo:"数据加载中",moduleDetail:{},contextMenuNode:{},contextMenuId:0,isDragging:!1,isCtrlDown:!1,selection:[],detailLoaded:{},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()}}},created(){return Pe(this,null,function*(){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{qt.error("请传入模块名称");return}this.graphApi.userInfo&&this.graphApi.userInfo().then(e=>{e.data!==null&&(be(Ke,"sharePermission",e.data.access.graph_share),this.requestGraphData=e.data.access.request_graph_data)}).catch(e=>{this.onOutdate(e.res)})})},unmounted(){window.onresize=null},mounted(){return Pe(this,null,function*(){window.onresize=()=>{this.fullScreen=!!document.fullscreenElement,this.screenHeight=document.body.clientHeight},this.margin=this.changeMargin(),Bo(Ke,"emitDataLoaded",()=>{this.emitDataLoaded()})})},methods:{handleCustomContextMenuClick(e){this.customContextMenuEvent&&typeof this.customContextMenuEvent=="function"?this.customContextMenuEvent(a.toRaw(e)):be(this,"custom-contextmenu-click",a.toRaw(e))},handleSelectNode(e){this.handleSelectNodeEvent&&typeof this.handleSelectNodeEvent=="function"?this.handleSelectNodeEvent(a.toRaw(e),a.toRaw(this.history.dataNow)):be(this,"handle-select-node",a.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):(qt({message:"无相关数据",type:"warning"}),this.emitDataLoaded())})},initGraph(){return Pe(this,null,function*(){var e;(e=this.graphApi)==null||e.getGraphConfig({name:this.module}).then(t=>{un("getGraphConfig",t),this.moduleDetail=t.data,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.graphApi.getNodesDetail({api:this.moduleDetail.node_info[e.type],node_id:[e.id],nodeType:e.type,moduleDetail:this.moduleDetail}).then(t=>{var o,s,c;un(`getNodesDetail${this.moduleDetail.node_info[e.type]}`,t);let n={id:(o=t.data.records[0])==null?void 0:o.info.id,type:(s=t.data.records[0])==null?void 0:s.info.type,startNode:!0,detail:t.data.records[0],group:e.id,name:((c=t.data.records[0])==null?void 0:c.info.name)||e.id};n=qi(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),qt({message:"无该节点信息",type:"warning"})})},onAction(e){this.history.pushState(e)},onOutdate(e){(e==null?void 0:e.code)==="AC100001"&&this.outdateTime<1&&(this.outdateTime++,be(this,"outdate"))},expandNodes(e,t){return Pe(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(u=>{u.children?r.push(...u.children):r.push(u)}));const o=r.map(u=>this.graphApi.getGraphRequest({api:u.name,node_id:e.id,origin:e.origin,nodeType:e.type,moduleDetail:this.moduleDetail}).then(f=>Promise.resolve(de(se({},f),{api:u.name,apiC:u.relay_name,icon:u.icon,note_name:u.note_name,canLoop:u.canloop}))).catch(f=>Promise.resolve(f)));this.isLoading=!0;let s;yield Promise.all(o).then(u=>{if(u.some(h=>{var p;return((p=h.res)==null?void 0:p.code)==="AC100001"})){this.onOutdate({code:"AC100001"});return}s=u.filter(h=>h.code==="0"||h.code===0)}).catch(u=>{console.log(u,"e")}).finally(u=>{this.isLoading=!1}),un("resultArray",s);const c=[];let l=[];if(s&&s.forEach(u=>{if(e.getData[u.api]=!0,this.history.dataNow.nodes.find(_=>_.id===e.id)&&(this.history.dataNow.nodes.find(_=>_.id===e.id).getData[u.api]=!0),!u.data)return;let f;const h=u.data.nodes.map(_=>(_.group=e.id+"-"+u.api,_.groupC=u.apiC,_=qi(_,this.moduleDetail.plugs),_)),p=e.id+"-"+u.api;let g={id:p,name:u.apiC,note_name:u.note_name,type:"nodeType",icon:u.icon};const y={source:e.id,target:p};if(g=qi(g,this.moduleDetail.plugs),this.nodeTypeList.push(u.icon||"node_type"),h.length>0&&this.isRenderStartNode){if(f=u.data.links.map(_=>{let w;if(_.source===e.id){const C=this.history.dataNow.nodes.filter(E=>E.id===_.target);if(C.length>0&&(w=this.findGrandSonNodeIds(C[0]).indexOf(_.source)>=0),!u.api.canLoop&&w)return;_.source=p}else _.target===e.id&&(_.target=p);return _}).filter(_=>_),f.length===0)return;f.push(y)}else f=u.data.links;if(this.isRenderStartNode&&h.length>=this.singlesNodeMaxNum){let _=null,w=null;const C=String(Math.floor(new Date().getTime()));_={id:C,list:h,type:"aggregation",name:"聚合",relationId:g.id},_=qi(_,this.moduleDetail.plugs),w={source:g.id,target:C,uniqueIndex:this.generateUniqueIndexNow()};const E={addOne:{nodes:[g,_],links:[y,w]},type:"aggregation"};this.history.pushState(E),this.getNodeDetail(_.list,_.id)}else f.length&&this.isRenderStartNode&&h.push(g),c.push(...h||[]),l.push(...f||[])}),!this.isRenderStartNode){const u={},f={},h=[];l.forEach(p=>{const g=p.source+"-"+p.name;if(!u[g]){let y={id:g,name:p.name,type:"nodeType",icon:p.feature.icon};y=qi(y,this.moduleDetail.plugs),u[g]=y}f[g]?f[g].push(p):f[g]=[p]});for(const p in u)c.push(u[p]);for(const p in f)f[p].forEach(y=>{const _=de(se({},y),{source:y.source,target:p}),w=de(se({},y),{source:p,target:y.target});h.push(_),h.push(w)});l=h}l.map(u=>{u.uniqueIndex=this.generateUniqueIndexNow()});const d={addOne:{nodes:c,links:l}};(c.length>0||l.length>0)&&this.history.pushState(d),this.history.length===2&&setTimeout(()=>{this.centerAndZoom(.8,!1)},1e3),this.getNodeDetail(c)})},findGrandSonNodeIds(e){return this.history.dataNow.nodes.filter(r=>{var o;return((o=e.children)==null?void 0:o.indexOf(r.id))>=0}).reduce((r,o)=>(r.push(...o.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 n=e.filter(s=>!s.detail&&s.noDetail!==!0&&!this.detailLoaded[s.id]&&s.type!=="aggregation"&&s.type!=="nodeType"),r={};n.map(s=>{r[s.type]?r[s.type].push(s):r[s.type]=[s]});let o=Object.keys(r).length;for(const s in r){const c=r[s],l={};c.map(d=>{d.origin&&(l[d.id]=d.origin)}),this.graphApi.getNodesDetail({api:this.moduleDetail.node_info[r[s][0].type],node_id:r[s].map(d=>d.id),origin:l,nodeType:r[s][0].type,moduleDetail:this.moduleDetail}).then(d=>{const u=d.data.records;t?this.history.updateAggregationDetail(u,r[s].map(f=>f.id),t):this.history.updateData(u,r[s].map(f=>f.id))}).catch(d=>{this.onOutdate(d.res)}).finally(()=>{o=o-1,o===0&&this.emitDataLoaded()})}Object.keys(r).length||this.emitDataLoaded()},emitDataLoaded(){this.handleDataLoaded&&typeof this.handleDataLoaded=="function"?this.handleDataLoaded({dataNow:a.toRaw(this.history.dataNow)}):be(this,"handle-data-loaded",{dataNow:a.toRaw(this.history.dataNow)})},addNode({node:e,type:t,connectNode:n}){if(this.history.dataNow.nodes.findIndex(s=>s.id===e.id)>-1){qt({type:"warning",message:"该节点已存在,添加失败"});return}let o;if(t==="diy"&&e.type==="nodeType"){let s=de(se({},e),{detail:null,diy:!0,group:e.id});s=qi(s,this.moduleDetail.plugs);const c=n?{source:n.id,target:e.id,uniqueIndex:this.generateUniqueIndexNow()}:null;o={addOne:{nodes:[s],links:c?[c]:[]}},this.history.pushState(o)}else t==="diy"?this.graphApi.getNodesDetail({api:this.moduleDetail.node_info[e.type],node_id:[e.id],nodeType:e.type,moduleDetail:this.moduleDetail}).then(s=>{var d,u,f;let c={id:(d=s.data.records[0])==null?void 0:d.info.id,type:(u=s.data.records[0])==null?void 0:u.info.type,detail:s.data.records[0],group:e.id,name:((f=s.data.records[0])==null?void 0:f.info.name)||e.id};c=qi(c,this.moduleDetail.plugs);const l=n?{source:n.id,target:e.id,uniqueIndex:this.generateUniqueIndexNow()}:null;o={addOne:{nodes:[c],links:l?[l]:[]}},this.history.pushState(o)}).catch(s=>{this.onOutdate(s.res);let c=de(se({},e),{detail:null,diy:!0,group:e.id});c=qi(c,this.moduleDetail.plugs);const l=n?{source:n.id,target:e.id,uniqueIndex:this.generateUniqueIndexNow()}:null;o={addOne:{nodes:[c],links:l?[l]:[]}},this.history.pushState(o)}).finally(s=>{setTimeout(()=>{},500)}):this.addNewNodesAndExpand(e)},addLink(e,t){if(!([e,t].filter(s=>s.type==="nodeType").length===1))return;const r={source:e.id,target:t.id,uniqueIndex:this.generateUniqueIndexNow(),diy:!0};let o=!1;if(this.history.dataNow.links.map(s=>{s.source.id===e.id&&s.target.id===t.id&&(o=!0)}),!o){const s={addOne:{links:[r]}};this.onAction(s)}},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 c in this.history.dataNow.nodes)e.findIndex((d,u,f)=>d===this.history.dataNow.nodes[c].id)>=0&&n.push(JSON.parse(JSON.stringify(this.history.dataNow.nodes[c])));const r=String(Math.floor(new Date().getTime()));let o={id:r,list:n,type:"aggregation",name:"聚合",relationId:t.id};o=qi(o,this.moduleDetail.plugs);const s={addOne:{nodes:[o],links:[{source:t.id,target:r,uniqueIndex:this.generateUniqueIndexNow()}]},deleteOne:{nodes:n,links:n.map(c=>({source:t.id,target:c.id}))},type:"aggregation"};this.history.pushState(s),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((s,c,l)=>s===this.history.dataNow.nodes[r].id)>=0&&(this.history.dataNow.nodes[r].aggregation=!1);this.history.pushState(n),this.emitDataLoaded()}},saveSnapshot(){return Pe(this,null,function*(){mC.prompt(null,"添加快照",{confirmButtonText:"确定",cancelButtonText:"取消",inputPattern:/^.{1,20}$/,inputPlaceholder:"请输入20字以内快照名称",inputErrorMessage:"请输入20字以内快照名称"}).then(t=>Pe(this,[t],function*({value:e}){this.bigLoading=!0,setTimeout(()=>Pe(this,null,function*(){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(o=>{this.snapshot=o.data,this.snapshot.name=e,this.$refs.snapshot.show()}).catch(o=>{this.onOutdate(o.res)}).finally(o=>{this.bigLoading=!1})}),100)})).catch(()=>{qt({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(){fn({cId:"toggleFullScreen",c:"切换全屏"}),document.fullscreenElement?document.exitFullscreen&&document.exitFullscreen():document.getElementById("force-d3-container").requestFullscreen()},zoomView(e="in"){e==="in"?(fn({cId:"zoomIn",c:"zoomIn"}),this.$refs.render.zoomIn()):(fn({cId:"zoomOut",c:"zoomOut"}),this.$refs.render.zoomOut())},fitScreen(){var e;fn({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()}}},pze={class:"d3-container",id:"force-d3-container"},gze=["innerHTML"],mze=a.createElementVNode("div",{class:"top-line-bg"},null,-1),vze={class:"top-item"},yze={class:"top-line"},bze={key:1,class:"select-num"},_ze={class:"highlight"},wze={class:"loading-container"},Cze={class:"corner-button-box"};function Sze(e,t,n,r,o,s){const c=a.resolveComponent("ButtonList"),l=a.resolveComponent("RenderByCanvas"),d=a.resolveComponent("Loading"),u=tt,f=a.resolveComponent("Legend"),h=a.resolveComponent("force-graph-svg-icon"),p=rr,g=a.resolveComponent("RightMenu"),y=a.resolveComponent("SnapShotDialog"),_=zte;return a.withDirectives((a.openBlock(),a.createElementBlock("div",pze,[a.createElementVNode("div",{class:a.normalizeClass(["graph-box",{"hide-right-menu":!n.isShowRightMenu}])},[n.title?(a.openBlock(),a.createElementBlock("div",{key:0,class:"safe-force-title",innerHTML:n.title},null,8,gze)):a.createCommentVNode("",!0),mze,a.createElementVNode("div",vze,[a.createElementVNode("div",yze,[a.createVNode(c,{ref:"buttonList","hide-button-list":n.hideButtonList,selection:o.selection,history:o.history,"module-detail":o.moduleDetail,"request-graph-data":o.requestGraphData,onSaveSnapshot:s.saveSnapshot,onAddNodes:s.addNode,onAutoDisplay:s.autoDisplay,onDeleteNodes:s.deleteNodes,onFixNodes:s.fixAllNodes,onToggleLayout:s.toggleLayout,onImportCsvData:s.importCsvData},null,8,["hide-button-list","selection","history","module-detail","request-graph-data","onSaveSnapshot","onAddNodes","onAutoDisplay","onDeleteNodes","onFixNodes","onToggleLayout","onImportCsvData"])])]),a.createVNode(l,{ref:"render","module-detail":o.moduleDetail,history:o.history,"level-list":n.levelList,selection:o.selection,data:o.history.dataNow,"request-graph-data":o.requestGraphData,"dark-mode":n.darkMode,"node-type-scale":n.nodeTypeScale,"node-type-list":o.nodeTypeList,onUpdateSelection:s.updateSelection,onOnaction:s.onAction,onHandleSelectNode:s.handleSelectNode,onCustomContextmenuClick:s.handleCustomContextMenuClick},null,8,["module-detail","history","level-list","selection","data","request-graph-data","dark-mode","node-type-scale","node-type-list","onUpdateSelection","onOnaction","onHandleSelectNode","onCustomContextmenuClick"]),o.selection.length>0?(a.openBlock(),a.createElementBlock("p",bze,[a.createTextVNode(" 已选择"),a.createElementVNode("span",_ze,a.toDisplayString(o.selection.length),1),a.createTextVNode("项 ")])):a.createCommentVNode("",!0),a.withDirectives(a.createElementVNode("div",wze,[a.createElementVNode("span",null,a.toDisplayString(o.loadingInfo),1),a.createVNode(u,{class:"is-loading"},{default:a.withCtx(()=>[a.createVNode(d)]),_:1})],512),[[a.vShow,o.isLoading]]),a.createVNode(f,{"show-point":n.showPoint,history:o.history,"module-detail":o.moduleDetail,"has-level":n.hasLevel,showLevelCount:n.showLevelCount,margin:o.margin,onHighLight:s.handleHighLight},null,8,["show-point","history","module-detail","has-level","showLevelCount","margin","onHighLight"]),a.createElementVNode("div",Cze,[!o.fullScreen&&s.topFrame?(a.openBlock(),a.createBlock(p,{key:0,content:"进入全屏",placement:"left","popper-class":"el-tooltip-gray"},{default:a.withCtx(()=>[a.createVNode(h,{"icon-class":e.imgPath["./public/d3svg1/button18/full_button.svg"],alt:"",class:"corner-button",onClick:s.toggleFullScreen},null,8,["icon-class","onClick"])]),_:1})):a.createCommentVNode("",!0),o.fullScreen&&s.topFrame?(a.openBlock(),a.createBlock(p,{key:1,content:"退出全屏",placement:"left","popper-class":"el-tooltip-gray"},{default:a.withCtx(()=>[a.createVNode(h,{"icon-class":e.imgPath["./public/d3svg1/button18/un_full_button.svg"],alt:"",class:"corner-button",onClick:s.toggleFullScreen},null,8,["icon-class","onClick"])]),_:1})):a.createCommentVNode("",!0),a.createVNode(p,{content:"适应屏幕",placement:"left","popper-class":"el-tooltip-gray"},{default:a.withCtx(()=>[a.createVNode(h,{"icon-class":e.imgPath["./public/d3svg1/button18/fit_button.svg"],alt:"",class:"corner-button",onClick:s.fitScreen},null,8,["icon-class","onClick"])]),_:1}),a.createVNode(p,{content:"放大",placement:"left","popper-class":"el-tooltip-gray"},{default:a.withCtx(()=>[a.createVNode(h,{"icon-class":e.imgPath["./public/d3svg1/button18/zoom_in_button.svg"],alt:"",class:"corner-button",onClick:t[0]||(t[0]=w=>s.zoomView("in"))},null,8,["icon-class"])]),_:1}),a.createVNode(p,{content:"缩小",placement:"left","popper-class":"el-tooltip-gray"},{default:a.withCtx(()=>[a.createVNode(h,{"icon-class":e.imgPath["./public/d3svg1/button18/zoom_out_button.svg"],alt:"",class:"corner-button",onClick:t[1]||(t[1]=w=>s.zoomView("out"))},null,8,["icon-class"])]),_:1})])],2),n.isShowRightMenu?(a.openBlock(),a.createBlock(g,{key:0,"graph-data":o.history.dataNow,"selected-nodes":o.selection,"request-graph-data":o.requestGraphData,onChangeBox:s.handleTableSelect},null,8,["graph-data","selected-nodes","request-graph-data","onChangeBox"])):a.createCommentVNode("",!0),a.createVNode(y,{ref:"snapshot",snapshot:o.snapshot,"graph-api":n.graphApi,"graph-url-path":n.graphUrlPath},null,8,["snapshot","graph-api","graph-url-path"])])),[[_,o.bigLoading]])}const af=De(hze,[["render",Sze]]);af.install=function(e){e.component(af.name,af)},Lc.install=function(e){e.component(Lc.name,Lc)};const FKe="",xze=[af,Lc],Eze={install:function(e,t={}){xze.forEach(n=>{e.component(n.name,n)})}};Me.ForceGraphByCanvas=af,Me.RenderByCanvas=Lc,Me.default=Eze,Object.defineProperties(Me,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
150
+ `).slice(1));try{for(o.s();!(n=o.n()).done;){var s=wje(n.value);s&&r.push(s)}}catch(c){o.e(c)}finally{o.f()}return r.slice(0,10)}var Pc=function(e){return _je(e).toString()},R8=function(e){return e instanceof ErrorEvent?e.message==="Script error."?Qg:Jg:of},Cje=function(){function e(t){m0(this,e),Zi(this,"errorIdSet",new Set),this.webCoreIns=t,this.errorIdSet=new Set}return v0(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]:{},o=r.type,s=r.event,c=n[o];c&&c(s)}),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(R8(r)===Qg){var o={errorType:Qg,errorMessage:r.message,errorSummary:"CorsError",errorId:Pc("".concat(Qg,"-").concat(r.message))};t.commit(o)}}(n)},!0)}},{key:"onResourceError",value:function(t){if(R8(t)===of){var n=t.target||t.srcElement,r=n.src||n.href,o=JSON.stringify(of+": "+r||"UnKnown Resource"),s={errorType:of,errorMessage:o,errorSummary:"ResourceError",errorId:Pc("".concat(of,"-").concat(o))};this.commit(s)}}},{key:"onJSError",value:function(t){var n,r;if(R8(t)===Jg){var o=JSON.stringify(t.message),s=function(l){var d=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"unknown";if(!l)return d;try{var u=new URL(l);return u.pathname&&u.pathname.endsWith(".js")?l:d}catch(f){return l}}(t.filename,(n=this.webCoreIns.config)===null||n===void 0?void 0:n.appKey),c={errorType:Jg,errorMessage:o,errorSummary:t.error&&((r=t.error)===null||r===void 0?void 0:r.name)||"UnKnown",errorStack:JSON.stringify(Zg(t.error)),errorId:Pc("".concat(Jg,"-").concat(o,"-").concat(s))};this.commit(c)}}},{key:"onPromiseError",value:function(t){var n,r,o=JSON.stringify(((n=t.reason)===null||n===void 0?void 0:n.message)||t.reason||"UnKnown"),s=((r=t.reason)===null||r===void 0?void 0:r.name)||"UnKnown",c={errorType:n$,errorMessage:o,errorSummary:s,errorStack:JSON.stringify(Zg(t.reason)),errorId:Pc("".concat(n$,"-").concat(o,"-").concat(s))};this.commit(c)}},{key:"onVueError",value:function(t,n,r){var o=JSON.stringify(t.message),s={errorType:r$,errorMessage:o,errorSummary:t.name||"UnKnown",errorStack:JSON.stringify(Zg(t)),errorId:Pc("".concat(r$,"-").concat(o,"-").concat(t.name))};this.commit(s)}},{key:"onReactError",value:function(t,n){var r=JSON.stringify(t.message),o={errorType:i$,errorMessage:r,errorSummary:t.name||"UnKnown",errorStack:JSON.stringify(Zg(t)),errorId:Pc("".concat(i$,"-").concat(r,"-").concat(t.name))};console.log(o),this.commit(o)}},{key:"commit",value:function(t){var n=t.errorId;this.errorIdSet.has(n)||(this.errorIdSet.add(n),this.webCoreIns.commit(Qd({type:"error"},t)))}}]),e}(),Sje=function(e){function t(){var o,s=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return m0(this,t),(o=d5e(this,t,[s])).config=s,o.isReport()?(o.PerformancePluginInstance=new qBe(Vd(o)),o.WhiteScreenPluginInstance=new uDe(Vd(o)),o.ErrorPluginInstance=new Cje(Vd(o)),o.plugins=[o.PerformancePluginInstance,o.WhiteScreenPluginInstance,o.ErrorPluginInstance],o.init(),kk(t,t,Rc,Vd(o)),o):Sk(o)}var n,r;return function(o,s){if(typeof s!="function"&&s!==null)throw new TypeError("Super expression must either be null or a function");o.prototype=Object.create(s&&s.prototype,{constructor:{value:o,writable:!0,configurable:!0}}),Object.defineProperty(o,"prototype",{writable:!1}),s&&Xy(o,s)}(t,cRe),v0(t,[{key:"isReport",value:function(){var o=this.isIE(),s=this.calcRatio();return this.config.appKey&&s&&!o}},{key:"init",value:(r=Zd(Dr().mark(function o(){return Dr().wrap(function(s){for(;;)switch(s.prev=s.next){case 0:this.initTime(this.mixed()),this.plugins.forEach(function(c){c.init()});case 2:case"end":return s.stop()}},o,this)})),function(){return r.apply(this,arguments)})},{key:"mixed",value:function(){var o=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},s=this.uid(),c=this.getTime(),l=c.time,d=c.date,u=this.getUA(),f=window.location,h=f.host,p=f.origin,g=f.pathname;return Qd(Qd({uid:s,sid:this.sid,url:window.location.href,host:h,fullPath:p+g,sdkVersion:this.sdkVersion,createDate:d,appKey:this.config.appKey,createTime:l,appVersion:this.appVersion,env:this.env},u),o)}},{key:"commit",value:(n=Zd(Dr().mark(function o(s){var c,l;return Dr().wrap(function(d){for(;;)switch(d.prev=d.next){case 0:c=this.mixed(s),l=new URL("".concat(window.location.protocol,"//").concat(this.host,"/log.gif")),Object.entries(c).map(function(u){var f=u5e(u,2),h=f[0],p=f[1];l.searchParams.set(h,p)}),new Image().src=l.toString();case 5:case"end":return d.stop()}},o,this)})),function(o){return n.apply(this,arguments)})}],[{key:"install",value:function(o){var s=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};b0(t,t,Rc)||(o.config.errorHandler=function(c,l,d){b0(t,t,Rc).ErrorPluginInstance.onVueError(c,l,d),console.error(c)},kk(t,t,Rc,new t(s)))}},{key:"sendError",value:function(o){b0(t,t,Rc)?b0(t,t,Rc).ErrorPluginInstance.onReactError(o):console.error("QAPM: 请先初始化 QAPM!")}}]),t}(),Rc={writable:!0,value:null};const oKe="",aKe="",xje={components:{InfoFilled:nv,ArrowRight:ev},mixins:[si],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:Ole,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,o,s,c,l,d,u;const e=[];if(this.nodeInfo.length===1){const f=this.nodeInfo[0];f.type!=="aggregation"&&f.type!=="nodeType"&&(e.push(z2),(r=this.history.keyNodeIds)!=null&&r.some(w=>w===f.id)||(e.push(H2),(s=(o=this.moduleDetail)==null?void 0:o.config)!=null&&s.hideCollectMenu||e.push(f.collect?G2:q2),e.push(f.textProp==="name"?D2:F2),f.label&&e.push(f.textProp==="label"?j2:U2)),this.canGoDetail&&e.push(LS)),e.push(f.fx?$2:M2);const h=this.history.dataNow.links.some(_=>_.source.id===f.id&&_.target.type==="aggregation"),y=this.history.dataNow.links.filter(_=>_.source.id===f.id).map(_=>_.target).some(_=>{let w=0;return this.history.dataNow.links.map(C=>{C.source.id===_.id&&w++}),w===0});h||f.type==="aggregation"?e.push(RS):y&&e.push(PS),y&&e.push(OS),e.push(W2)}else this.nodeInfo.length>1?(e.push(H2,z2),e.push(this.nodeInfo.some(h=>!h.collect)?q2:G2),this.nodeInfo.some(h=>h.label)&&e.push(this.nodeInfo.some(h=>h.textProp!=="label")?U2:j2),e.push(this.nodeInfo.some(h=>h.textProp!=="name")?F2:D2),e.push(this.nodeInfo.some(h=>!h.fx)?M2:$2),e.push(W2)):this.nodeInfo.length===0&&(this.history.dataNow.nodes.some(h=>h.label)&&e.push(this.history.dataNow.nodes.some(h=>h.textProp!=="label")?NS:kS),e.push(this.history.dataNow.nodes.some(h=>h.textProp!=="name")?xS:ES),e.push(this.history.dataNow.nodes.some(h=>!h.fx)?CS:SS),this.history.currentIndex>0&&e.push(TS),this.history.currentIndex<this.history.length-1&&e.push(AS));const t=(c=this.nodeInfo[0])==null?void 0:c.type,n=(u=(d=(l=this.nodeInfo[0])==null?void 0:l.detail)==null?void 0:d.info)==null?void 0:u.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,o=this.axis.top+(e+t)*this.itemHeight;return{left:this.axis.left+this.itemWidth*2>=n?"-100%":"100%",top:r>=o?0:"auto",bottom:r<o?0:"auto"}},thirdBorderCheck(e,t,n,r){const o=document.body.offsetWidth,s=document.body.offsetHeight,c=this.secondBorderCheck(e,n).top;let l;const d=(t+r)*this.itemHeight,u=d>180?180:d;return c===0?l=this.axis.top+e*this.itemHeight+u:l=this.axis.top-e*this.itemHeight+u,{left:this.axis.left+this.itemWidth*3>=o?"-100%":"100%",bottom:s>=l?0:"auto",top:s<l?0:"auto"}},handleClick(e,t){if(!t){if(fn({cId:"contextMenu-"+e.name,c:"右键菜单-"+e.namec}),e.has_child>0)return!1;be(this,"contextmenu-click",{nodes:this.nodeInfo,api:e})}},handleDataClick(e,t){fn({cId:"contextMenu-"+e.name,c:"右键菜单-"+e.namec}),be(this,"contextmenu-click",{nodes:this.nodeInfo,api:t,dataApi:e}),this.checkedItems={}}}},Ic=e=>(a.pushScopeId("data-v-10144870"),e=e(),a.popScopeId(),e),Eje={"aria-hidden":"true",style:{position:"absolute",width:"0",height:"0",overflow:"hidden",display:"none"}},kje=[Ic(()=>a.createElementVNode("symbol",{id:"icon-arrow-right",viewBox:"0 0 1024 1024"},[a.createElementVNode("path",{d:"M288.791335 65.582671l446.41733 446.417329-446.41733 446.417329z"})],-1))],Nje={class:"cm-list"},Tje={class:"cm-ul"},Aje={class:"hd"},Oje=["src"],Pje={class:"bd"},Rje={class:"cm-ul cm-ul-level1"},Ije=["title"],Bje=Ic(()=>a.createElementVNode("svg",{class:"icon","aria-hidden":"true"},[a.createElementVNode("use",{"xlink:href":"#icon-arrow-right"})],-1)),Lje=["title","onClick"],Mje=["title","onClick"],$je={key:0,class:"icon","aria-hidden":"true"},Fje=[Ic(()=>a.createElementVNode("use",{"xlink:href":"#icon-arrow-right"},null,-1))],Dje=["title","onClick"],jje=["src"],Uje=Ic(()=>a.createElementVNode("div",{class:"bd"},null,-1)),zje=["title","onClick"],qje={key:0,class:"fas el-icon-fa-cog"},Gje={key:1,class:"fas el-icon-fa-external-link-alt"},Hje={class:"text-wrapper"},Wje=["src"],Kje=["src"],Yje={key:3,class:"shortcut"},Xje={key:2,class:"icon","aria-hidden":"true"},Jje=[Ic(()=>a.createElementVNode("use",{"xlink:href":"#icon-arrow-right"},null,-1))],Qje=["title","onClick"],Zje={key:1,class:"icon","aria-hidden":"true"},Vje=[Ic(()=>a.createElementVNode("use",{"xlink:href":"#icon-arrow-right"},null,-1))],eUe=["title","onClick"];function tUe(e,t,n,r,o,s){const c=a.resolveComponent("ArrowRight"),l=tt,d=a.resolveComponent("InfoFilled"),u=rr;return n.show?(a.openBlock(),a.createElementBlock("div",{key:0,class:"cm-container",style:a.normalizeStyle(s.axisComputed),onClick:t[1]||(t[1]=a.withModifiers((...f)=>s.handleCollapse&&s.handleCollapse(...f),["stop"]))},[(a.openBlock(),a.createElementBlock("svg",Eje,kje)),a.createElementVNode("div",Nje,[a.createElementVNode("ul",Tje,[s.checkboxMenu.length>0?(a.openBlock(),a.createElementBlock("li",{key:0,class:"cm-li data-opt-wrapper",style:a.normalizeStyle(s.liStyle)},[a.createElementVNode("div",Aje,[a.createElementVNode("img",{src:e.imgPath["./public/d3svg1/button18/button_relation.svg"],style:{"margin-right":"10px"}},null,8,Oje),a.createTextVNode("按关系分类拓线"),a.createVNode(l,null,{default:a.withCtx(()=>[a.createVNode(c)]),_:1})]),a.createElementVNode("div",Pje,[a.createElementVNode("ul",Rje,[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(s.checkboxMenu,(f,h)=>(a.openBlock(),a.createElementBlock("li",{key:h,class:"cm-li context-one",style:a.normalizeStyle(s.liStyle)},[s.hasChildren(f)?(a.openBlock(),a.createElementBlock("div",{key:0,class:a.normalizeClass(["cm-item",s.firstLeft?"cm-left":""]),title:f.namec},[a.createElementVNode("span",null,a.toDisplayString(f.namec),1),Bje],10,Ije)):(a.openBlock(),a.createElementBlock("div",{key:1,class:a.normalizeClass(["cm-item",s.firstLeft?"cm-left":""]),title:f.namec,onClick:a.withModifiers(p=>s.handleDataClick(f,o.globalMenus.expandPartNode),["stop"])},[a.createElementVNode("span",null,a.toDisplayString(f.namec),1)],10,Lje)),s.hasChildren(f)?(a.openBlock(),a.createElementBlock("ul",{key:2,class:"cm-ul cm-ul-level2",style:a.normalizeStyle(s.secondBorderCheck(h,f.children.length))},[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(f.children,(p,g)=>(a.openBlock(),a.createElementBlock("li",{key:g,class:"cm-li",style:a.normalizeStyle(s.liStyle)},[a.createElementVNode("div",{class:a.normalizeClass(["cm-item",s.secondLeft?"cm-left":""]),title:p.namec,onClick:a.withModifiers(y=>s.handleDataClick(p,o.globalMenus.expandPartNode),["stop"])},[a.createElementVNode("span",null,a.toDisplayString(p.namec),1),s.hasChildren(p)?(a.openBlock(),a.createElementBlock("svg",$je,Fje)):a.createCommentVNode("",!0)],10,Mje),s.hasChildren(p)?(a.openBlock(),a.createElementBlock("ul",{key:0,class:"cm-ul cm-ul-level3",style:a.normalizeStyle(s.thirdBorderCheck(h,g,f.children.length,p.children.length))},[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(p.children,(y,_)=>(a.openBlock(),a.createElementBlock("li",{key:_,class:"cm-li",style:a.normalizeStyle(s.liStyle)},[a.createElementVNode("div",{class:"cm-item",title:y.namec,onClick:a.withModifiers(w=>s.handleDataClick(y,o.globalMenus.expandPartNode),["stop"])},[a.createElementVNode("span",null,a.toDisplayString(y.namec),1)],8,Dje)],4))),128))],4)):a.createCommentVNode("",!0)],4))),128))],4)):a.createCommentVNode("",!0)],4))),128))])])],4)):n.nodeInfo.length>1&&n.nodeInfo.length<o.maxMulti?(a.openBlock(),a.createElementBlock("li",{key:1,class:"cm-li data-opt-wrapper data-opt-all",style:a.normalizeStyle(s.liStyle)},[a.createElementVNode("div",{class:"hd",onClick:t[0]||(t[0]=a.withModifiers(f=>s.handleDataClick(null,o.globalMenus.expandNode),["stop"]))},[a.createElementVNode("img",{src:e.imgPath["./public/d3svg1/button18/button_relation.svg"],style:{"margin-right":"10px"}},null,8,jje),a.createTextVNode("展开全部关系 ")]),Uje],4)):a.createCommentVNode("",!0),(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(s.systemMenu,(f,h)=>(a.openBlock(),a.createElementBlock("li",{key:h,class:"cm-li",style:a.normalizeStyle(s.liStyle)},[a.createElementVNode("div",{class:a.normalizeClass(["cm-item",{"cm-left":s.firstLeft,disabled:f.disabled}]),title:f.namec,onClick:a.withModifiers(p=>s.handleClick(f,f.disabled),["stop"])},[s.isSystemItem(f)?(a.openBlock(),a.createElementBlock("i",qje)):s.isExternalItem(f)?(a.openBlock(),a.createElementBlock("i",Gje)):a.createCommentVNode("",!0),a.createElementVNode("div",Hje,[f.icon?(a.openBlock(),a.createElementBlock("img",{key:0,src:e.imgPath["./public/d3svg1/button18/"+f.icon+".svg"],class:"t-icon"},null,8,Wje)):(a.openBlock(),a.createElementBlock("img",{key:1,src:e.imgPath["./public/d3svg1/button18/button_"+f.name+".svg"],class:"t-icon"},null,8,Kje)),f.tooltip?(a.openBlock(),a.createBlock(u,{key:2,class:"el-icon-info",effect:"dark",content:f.tooltip,placement:"top-start"},{default:a.withCtx(()=>[a.createVNode(l,null,{default:a.withCtx(()=>[a.createVNode(d)]),_:1})]),_:2},1032,["content"])):a.createCommentVNode("",!0),a.createElementVNode("span",null,a.toDisplayString(f.namec),1),f.shortcut?(a.openBlock(),a.createElementBlock("span",Yje,a.toDisplayString(f.shortcut),1)):a.createCommentVNode("",!0)]),s.hasChildren(f)?(a.openBlock(),a.createElementBlock("svg",Xje,Jje)):a.createCommentVNode("",!0)],10,zje),s.hasChildren(f)?(a.openBlock(),a.createElementBlock("ul",{key:0,class:"cm-ul cm-ul-level2",style:a.normalizeStyle(s.secondBorderCheck(h,f.children.length))},[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(f.children,(p,g)=>(a.openBlock(),a.createElementBlock("li",{key:g,class:"cm-li",style:a.normalizeStyle(s.liStyle)},[a.createElementVNode("div",{class:a.normalizeClass(["cm-item",{"cm-left":s.secondLeft,disabled:f.disabled||p.disabled}]),title:p.namec,onClick:a.withModifiers(y=>s.handleClick(p,f.disabled||p.disabled),["stop"])},[p.tooltip?(a.openBlock(),a.createBlock(u,{key:0,class:"el-icon-info",effect:"dark",content:p.tooltip,placement:"top-start"},{default:a.withCtx(()=>[a.createVNode(l,null,{default:a.withCtx(()=>[a.createVNode(d)]),_:1})]),_:2},1032,["content"])):a.createCommentVNode("",!0),a.createElementVNode("span",null,a.toDisplayString(p.namec),1),s.hasChildren(p)?(a.openBlock(),a.createElementBlock("svg",Zje,Vje)):a.createCommentVNode("",!0)],10,Qje),s.hasChildren(p)?(a.openBlock(),a.createElementBlock("ul",{key:0,class:"cm-ul cm-ul-level3",style:a.normalizeStyle(s.thirdBorderCheck(h,g,f.children.length,p.children.length))},[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(p.children,(y,_)=>(a.openBlock(),a.createElementBlock("li",{key:_,class:"cm-li",style:a.normalizeStyle(s.liStyle)},[a.createElementVNode("div",{class:a.normalizeClass(["cm-item",{disabled:f.disabled||p.disabled||y.disabled}]),title:y.namec,onClick:a.withModifiers(w=>s.handleClick(y,f.disabled||p.disabled||y.disabled),["stop"])},[y.tooltip?(a.openBlock(),a.createBlock(u,{key:0,class:"el-icon-info",effect:"dark",content:y.tooltip,placement:"top-start"},{default:a.withCtx(()=>[a.createVNode(l,null,{default:a.withCtx(()=>[a.createVNode(d)]),_:1})]),_:2},1032,["content"])):a.createCommentVNode("",!0),a.createElementVNode("span",null,a.toDisplayString(y.namec),1)],10,eUe)],4))),128))],4)):a.createCommentVNode("",!0)],4))),128))],4)):a.createCommentVNode("",!0)],4))),128))])])],4)):a.createCommentVNode("",!0)}const nUe=De(xje,[["render",tUe],["__scopeId","data-v-10144870"]]),uKe="",fKe="",hKe="",pKe="",rUe={name:"Popover",components:{ForceGraphSvgIcon:Ia},mixins:[si],inject:["levelList"],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:()=>({})}},data(){return{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 l,d,u;const e=this.mousePosition.left>document.body.offsetWidth/2,t=this.mousePosition.top>document.body.offsetHeight/2,n=(l=document.getElementsByClassName("popover-container")[0])==null?void 0:l.offsetHeight,r=(d=document.getElementsByClassName("d3-container")[0])==null?void 0:d.offsetHeight,o=(u=document.getElementsByClassName("d3-container")[0])==null?void 0:u.getBoundingClientRect().top;let s;t?s=Math.max(this.mousePosition.top,n+o)+5:s=Math.min(this.mousePosition.top,Math.max(r-n,o))-5;const c={left:(e?this.mousePosition.left+2:this.mousePosition.right-2)+"px",top:s+"px",transform:`translate(${e?"-100%":"0%"}, ${t?"-100%":"0%"})`};this.position=c},100)},nodeInfo:{handler:function(){var t;const e=(((t=this.nodeInfo)==null?void 0:t.list)||[]).map(n=>{var o,s,c;const r=n.detail;return de(se({},n),{name:((o=r==null?void 0:r.info)==null?void 0:o.name)||n.name,level:((c=(s=r==null?void 0:r.info)==null?void 0:s.basic)==null?void 0:c.level)||""})});e==null||e.sort((n,r)=>{var c,l;const o=(c=this.levelList.find(d=>d.level===n.level))==null?void 0:c.dangerNumber;return((l=this.levelList.find(d=>d.level===r.level))==null?void 0:l.dangerNumber)-o}),this.aggregationList=e},immediate:!0}},methods:{handleMouseEnter(){this.showSelf=!0},handleMouseLeave(){this.showSelf=!1},isSomething(e){return T2(e)},getTypeZh(e){var n,r,o;let t=e;if(e==="nodeType")t="关系节点";else for(const s in(n=this.moduleDetail)==null?void 0:n.nodes)if(e===((r=this.moduleDetail)==null?void 0:r.nodes[s].name)){t=(o=this.moduleDetail)==null?void 0:o.nodes[s].namec;break}return t},getLevelClass(e){return Yh(e,this.levelList)},getColorStyle(e){return Xh(e,this.levelList,this.darkMode)},getNodeTypeChildNum(e){var o;const t=(o=this.data)==null?void 0:o.links,n=[],r=[];return t==null||t.map(s=>{s.source.id===e&&(n.push(s.target.id),s.target.detail&&Use(s.target.detail.info.basic.level,this.levelList)&&r.push(s.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 o="-";return r&&(n?o=t.length?t.join("|"):"-":o=t||"-"),o},formatTags(e){return Hh(Wh(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)be(Ke,"emitDataLoaded");else{const n=this.nodeInfo,r={deleteOne:{nodes:[n],links:[{source:n.relationId,target:n.id}]},type:"aggregation"};setTimeout(()=>{this.history.pushState(r),be(Ke,"emitDataLoaded")},0)}}}},Bc=e=>(a.pushScopeId("data-v-4d80bc6d"),e=e(),a.popScopeId(),e),iUe={key:0,class:"node-info-container"},oUe={class:"popover-block popover-header"},aUe={key:0,class:"popover-collect"},sUe={key:1,class:"row-item"},lUe={class:"label"},cUe={key:2,class:"row-item"},dUe=Bc(()=>a.createElementVNode("div",{class:"label"},"关系节点:",-1)),uUe={class:"value"},fUe={class:"node-type-info"},hUe={class:"name"},pUe={key:3,class:"row-item"},gUe=Bc(()=>a.createElementVNode("div",{class:"label"},"备注:",-1)),mUe={class:"value"},vUe={class:"popover-block popover-fields"},yUe={key:0,class:"node-detail top-border"},bUe={key:0,class:"row-item"},_Ue=Bc(()=>a.createElementVNode("div",{class:"label"},"危险级别:",-1)),wUe=["title"],CUe={key:1,class:"row-item row-item-tag"},SUe=Bc(()=>a.createElementVNode("div",{class:"label"},"标签:",-1)),xUe={class:"value"},EUe={class:"graph-tags-box"},kUe=Bc(()=>a.createElementVNode("br",null,null,-1)),NUe={key:0,class:"row-item"},TUe={class:"label"},AUe=["title"],OUe={key:1,class:"node-statistics top-border"},PUe={class:"row-item node-num"},RUe=Bc(()=>a.createElementVNode("div",{class:"label"},"拓展节点统计:",-1)),IUe={class:"value"},BUe={key:0},LUe={class:"danger"},MUe={key:2,class:"node-aggregation"},$Ue={class:"aggregation-title"},FUe={class:"aggregation-box"},DUe={key:1,class:"node-info-container"},jUe={class:"popover-fields"},UUe={class:"top"};function zUe(e,t,n,r,o,s){const c=a.resolveComponent("force-graph-svg-icon"),l=rr,d=_d,u=ite,f=Aa,h=rte;return a.openBlock(),a.createElementBlock("div",{class:a.normalizeClass(["popover-container",s.show?"show-popover":"hide-popover"]),style:a.normalizeStyle(o.position),onMouseenter:t[0]||(t[0]=(...p)=>s.handleMouseEnter&&s.handleMouseEnter(...p)),onMouseleave:t[1]||(t[1]=(...p)=>s.handleMouseLeave&&s.handleMouseLeave(...p))},[a.createElementVNode("div",null,[n.type==="node"?(a.openBlock(),a.createElementBlock("div",iUe,[a.createElementVNode("div",oUe,[n.nodeInfo.collect?(a.openBlock(),a.createElementBlock("div",aUe,[a.createVNode(l,{content:"已收藏","popper-class":"el-tooltip-gray",placement:"left"},{default:a.withCtx(()=>[a.createVNode(c,{class:"button-img","icon-class":e.imgPath["./public/d3svg1/star.svg"]},null,8,["icon-class"])]),_:1})])):a.createCommentVNode("",!0),s.isNormalNode?(a.openBlock(),a.createElementBlock("div",sUe,[a.createElementVNode("div",lUe,a.toDisplayString(s.getTypeZh(n.nodeInfo.type))+":",1),a.createElementVNode("div",{class:a.normalizeClass(["value",{"star-next":n.nodeInfo.collect}])},a.toDisplayString(s.name),3)])):a.createCommentVNode("",!0),s.isNodeTypeNode?(a.openBlock(),a.createElementBlock("div",cUe,[dUe,a.createElementVNode("div",uUe,[a.createElementVNode("div",fUe,[a.createElementVNode("div",hUe,a.toDisplayString(n.nodeInfo.name),1)])])])):a.createCommentVNode("",!0),n.nodeInfo.label?(a.openBlock(),a.createElementBlock("div",pUe,[gUe,a.createElementVNode("div",mUe,a.toDisplayString(n.nodeInfo.label),1)])):a.createCommentVNode("",!0)]),a.createElementVNode("div",vUe,[s.isNormalNode&&n.nodeInfo.detail?(a.openBlock(),a.createElementBlock("div",yUe,[s.canGoDetail?(a.openBlock(),a.createElementBlock("div",bUe,[_Ue,a.createElementVNode("div",{class:a.normalizeClass(["value level",s.getLevelClass(n.nodeInfo.detail&&n.nodeInfo.detail.info.basic.level)]),title:n.nodeInfo.detail&&n.nodeInfo.detail.info.basic.level||"--"},a.toDisplayString(n.nodeInfo.detail&&n.nodeInfo.detail.info.basic.level||"--"),11,wUe)])):a.createCommentVNode("",!0),n.nodeInfo.detail&&n.nodeInfo.detail.tags&&n.nodeInfo.detail.tags.length>0?(a.openBlock(),a.createElementBlock("div",CUe,[SUe,a.createElementVNode("div",xUe,[a.createElementVNode("div",EUe,[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(s.formatTags(n.nodeInfo.detail.tags),(p,g)=>(a.openBlock(),a.createBlock(l,{key:g,"popper-class":"el-tooltip-gray"},{content:a.withCtx(()=>[a.createElementVNode("div",null,[a.createTextVNode(a.toDisplayString(p.name===p.desc?p.name:p.name+":"+p.desc)+" ",1),p.disabled?(a.openBlock(),a.createElementBlock(a.Fragment,{key:0},[kUe,a.createTextVNode(" 标签状态:失效 ")],64)):a.createCommentVNode("",!0)])]),default:a.withCtx(()=>[a.createElementVNode("span",null,[a.createVNode(d,{class:a.normalizeClass(["graph-tag-one",`${p.type||"unknown"} ${p.disabled?"tag-disable":""}`]),type:p.type||"info"},{default:a.withCtx(()=>[a.createTextVNode(a.toDisplayString(p.name),1)]),_:2},1032,["class","type"])])]),_:2},1024))),128))])])])):a.createCommentVNode("",!0),(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(s.fieldMapThisType,(p,g)=>(a.openBlock(),a.createElementBlock(a.Fragment,null,[s.canShowField(p)?(a.openBlock(),a.createElementBlock("div",NUe,[a.createElementVNode("div",TUe,a.toDisplayString(p.zh)+":",1),a.createElementVNode("div",{class:a.normalizeClass(["value",{red:p.prop==="virus_name"}]),title:n.nodeInfo.detail.info.basic[g]},a.toDisplayString(s.getFieldValue(p)),11,AUe)])):a.createCommentVNode("",!0)],64))),256))])):a.createCommentVNode("",!0),s.isNodeTypeNode?(a.openBlock(),a.createElementBlock("div",OUe,[a.createElementVNode("div",PUe,[RUe,a.createElementVNode("div",IUe,[s.getNodeTypeChildNum(n.nodeInfo.id).dangerChildNum>0?(a.openBlock(),a.createElementBlock("span",BUe,[a.createElementVNode("span",LUe,a.toDisplayString(s.getNodeTypeChildNum(n.nodeInfo.id).dangerChildNum),1),a.createTextVNode("/")])):a.createCommentVNode("",!0),a.createTextVNode(a.toDisplayString(s.getNodeTypeChildNum(n.nodeInfo.id).allChildNum),1)])])])):a.createCommentVNode("",!0),s.isAggregateNode?(a.openBlock(),a.createElementBlock("div",MUe,[a.createElementVNode("div",$Ue,"聚合节点 ("+a.toDisplayString(o.aggregationList.length)+"个)",1),a.createElementVNode("div",FUe,[a.createVNode(h,{data:o.aggregationList,style:{width:"100%"}},{default:a.withCtx(()=>[a.createVNode(u,{prop:"name","min-width":"200",label:"名称"}),a.createVNode(u,{sortable:"",prop:"type",label:"类型"}),a.createVNode(u,{sortable:"",prop:"level",width:"80",label:"级别"},{default:a.withCtx(p=>[a.createElementVNode("span",{style:a.normalizeStyle({color:s.getColorStyle(p.row.level)})},a.toDisplayString(p.row.level||"--"),5)]),_:1}),a.createVNode(u,{label:"操作"},{default:a.withCtx(p=>[a.createVNode(f,{class:"add-to-graph-btn",type:"primary",text:"",size:"small",onClick:g=>s.addToGraph(p.row)},{default:a.withCtx(()=>[a.createTextVNode(" 添加到图谱 ")]),_:2},1032,["onClick"])]),_:1})]),_:1},8,["data"])])])):a.createCommentVNode("",!0)])])):(a.openBlock(),a.createElementBlock("div",DUe,[a.createElementVNode("div",jUe,[a.createElementVNode("div",UUe,a.toDisplayString(n.nodeInfo.apiName),1)])]))])],38)}const qUe=De(rUe,[["render",zUe],["__scopeId","data-v-4d80bc6d"]]),GUe=[{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:[]}],c$={name:"vue-safe-force-graph",version:"2.0.24",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",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 publish","p:base64":"npm run patch:base64 && npm run lib:base64 && npm publish",svgo:"svgo -f src/icons/svg --config=src/icons/svgo.yml",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.5","core-js":"^3.29.1","csv-parse":"^5.0.4",d3:"^7.8.5","d3-lasso":"0.0.5","element-plus":"^2.3.0",html2canvas:"^1.0.0-rc.7",json2csv:"^5.0.7",konva:"^9.2.0",lodash:"^4.17.21","mime-types":"^2.1.35",minimist:"^1.2.6","radar-js-analytic-sdk":"^2.2.6",vue:"^3.2.47","vue-clipboard3":"^2.0.0","vue-router":"^4.1.6"},devDependencies:{"@babel/core":"^7.23.3","@babel/preset-env":"^7.23.3","@originjs/vite-plugin-commonjs":"^1.0.3","@q/qcdn":"^3.1.6","@vitejs/plugin-vue":"^4.1.0",autoprefixer:"9.5.1",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",svgo:"1.2.2","unplugin-auto-import":"^0.15.2","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"},OKe="",PKe="",RKe="",{toClipboard:HUe}=Jh(),WUe="Arial,Helvetica Neue,Helvetica,PingFang SC,Hiragino Sans GB,Microsoft YaHei,sans-serif",I8={},Ci=1,KUe=["ip","intranet","internet"],B8=20;let Gt={},Mn={},go=null;const wr={},YUe={name:"ForceGraphRenderByCanvas",components:{Popover:qUe,NodeContextmenu:nUe},mixins:[si],provide:function(){return{levelList:this.levelList}},props:{data:{type:Object,default:()=>({nodes:[],links:[]})},history:{type:Object,default:()=>({})},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}]},nodeTypeScale:{type:Number,default:1},nodeTypeList:{type:Array,default:()=>[]}},emits:["handle-select-node","custom-contextmenu-click","flagFiles","updateSelection"],data(){return{prefix:"./public/",iconAllLoaded:!1,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:nl()?"metaKey":"ctrlKey",levelHeight:100,actNum:0,scriptNow:null,scriptInited:!1,canAct:!1,isKeyUp:!0,initTimes:0,resizeObserver:null,canvasElement:null,stage:a.shallowRef(null),layer:a.shallowRef(null),simulation:a.shallowRef(null),nodes:a.shallowRef(null),links:a.shallowRef(null),hoveredNode:a.shallowRef(null),mouseDownNode:a.shallowRef(null),selectionRect:null,selection:[],scale:Ci,mousedownPos:null,mousedownNode:null,mouseupNode:null,dragLine:null,darkBgRect:null}},computed:{iconSizeComputed(){const e=c5e(I8);return this.nodeTypeList.forEach(t=>{e[t]=I8[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(){this.nodes=this.data.nodes,this.links=this.data.links,this.update()},deep:!0},moduleDetail:{handler:function(e){return Pe(this,null,function*(){e!=null&&e.nodes&&!this.iconAllLoaded&&(yield this.loadIcons(),this.initForceGraph(),setTimeout(()=>{this.update()},50))})},deep:!0,immediate:!0},darkMode:{handler:function(e){return Pe(this,null,function*(){const t=e?"dark":"light";setTimeout(()=>{this.update(),this.isThreatPath?document.querySelectorAll(`.${this.uniqueClass}.render-container`)[0].setAttribute("data-theme",t):(document.querySelectorAll(`.${this.uniqueClass}.render-container`)[0].setAttribute("data-theme",t),document.getElementsByClassName(this.uniqueClass+" render-container")[0].parentElement.parentElement.setAttribute("data-theme",t))},200)})},immediate:!0}},created(){un("graph created time",Date.now()),zi.setProject("QH_10542_1724").getTrack(),localStorage.getItem("showSafeForceGraphLog")&&(un("组件名称: "+c$.name),un("组件版本: "+c$.version),un("环境变量",{VITE_LOCAL_ONLY:"false",VITE_APP_BASE_API:"/",BASE_URL:"/",MODE:"production",DEV:!1,PROD:!0,SSR:!1})),this.isThreatPath||this.initKeyEvent(),this.uniqueClass="unique"+new Date().getTime()+Math.floor(Math.random()*1e5)},mounted(){return Pe(this,null,function*(){new Sje({appKey:"fe-force-graph",ratio:50}),this.initForceGraph(),jse(this.levelList),!this.isThreatPath&&(Bo(Ke,"buttonClick",e=>{un(e,"buttonClick msg"),this.handleContextMenuClick(e)}),Bo(Ke,"relationClick",e=>{this.handleContextMenuClick(e)}),Bo(Ke,"sendNodesRange",(e,t)=>{e!==void 0&&(this.nodesRange=e,this.updateNodeStyle())}))})},beforeUnmount(){Lo(Ke,"buttonClick"),Lo(Ke,"relationClick"),Lo(Ke,"sendNodesRange"),this.unbindKeyEvent(),this.resetAll(),un("destroy")},methods:{initForceGraph(){return Pe(this,null,function*(){const e=this.$refs.canvasContainer;let t=e.clientWidth,n=e.clientHeight;this.resizeObserver=new ResizeObserver(o=>{for(const s of o)t=s.contentRect.width,n=s.contentRect.height,this.stage.width(t),this.stage.height(n),this.layer&&this.layer.batchDraw(),this.updateSimulation(),un(`新宽度: ${t}px, 新高度: ${n}px`)}),this.resizeObserver.observe(e),document.addEventListener("click",this.hideContextMenu,!1),this.nodes=this.data.nodes,this.links=this.data.links,this.stage=new _t.Stage({container:e,width:t,height:n,scaleX:Ci,scaleY:Ci}),this.layer=new _t.Layer,go=new _t.Group({id:"grab",x:0,y:0}),this.layer.add(go);const r=this.layer.getCanvas()._canvas;this.canvasElement=r,this.stage.on("mousemove",o=>{if(!this.mousedownNode||!o.evt[this.actKey]){if(this.resetMouseVars(),this.selectionRect&&o.evt.altKey){const s=this.stage.getPointerPosition(),c=(s.x-this.stage.x())/this.scale,l=(s.y-this.stage.y())/this.scale,d=c-this.selectionRect.x(),u=l-this.selectionRect.y();this.selectionRect.width(d),this.selectionRect.height(u),this.stage.batchDraw()}}else{const s=this.stage.getPointerPosition(),c=this.stage.scaleX(),l=(s.x-this.stage.x())/c,d=(s.y-this.stage.y())/c;this.dragLine.points([this.mousedownPos.x,this.mousedownPos.y,l,d]),this.layer.batchDraw()}}),this.stage.on("wheel",o=>{o.evt.preventDefault();const s=1.1,c=this.scale,l=o.evt.deltaY<0?c*s:c/s;this.scale=l;const d=this.stage.getPointerPosition(),u=this.stage.position(),f=d.x-(d.x-u.x)*(l/c),h=d.y-(d.y-u.y)*(l/c);this.stage.setAttrs({scaleX:l,scaleY:l,x:f,y:h}),this.layer.batchDraw()}),this.stage.on("mousedown",o=>{const s=o.target;if(s&&s.nodeType==="Stage"?this.stage.setDraggable(!0):this.stage.setDraggable(!1),o.evt.altKey){this.stage.setDraggable(!1);const c=this.stage.scaleX(),l=this.stage.getPointerPosition(),d=(l.x-this.stage.x())/c,u=(l.y-this.stage.y())/c;this.selectionRect=new _t.Rect({x:d,y:u,width:0,height:0,stroke:"rgb(80, 80, 80)",strokeWidth:2}),this.layer.add(this.selectionRect),this.stage.batchDraw()}}),this.stage.on("mouseup",o=>{if(this.stage.setDraggable(!1),this.selectionRect&&o.evt.altKey){const s=this.selectionRect.x(),c=this.selectionRect.y(),l=this.selectionRect.width(),d=this.selectionRect.height();this.selection=this.nodes.filter(u=>{const f={x:u.x,y:u.y};return f.x>=s&&f.x<=s+l&&f.y>=c&&f.y<=c+d}),this.updateSelection(),this.selectionRect.destroy(),this.selectionRect=null}}),this.stage.on("contextmenu",this.handleGlobalContextMenu),this.stage.on("click",o=>{o.target&&o.target.nodeType==="Stage"&&this.handleDeselectNode(o)}),this.setSimulation(),this.stage.add(this.layer),this.stage.draw(),this.update()})},setSimulation(){var n;if(!((n=this.nodes)!=null&&n.length)){un("setSimulation 无数据");return}const e=this.stage.width()/(2*Ci),t=this.stage.height()/(2*Ci);this.simulation=sae(this.nodes).force("link",Voe(this.links).id(r=>r.id).distance(120).strength(1)).force("charge",lae().strength(-600)).force("x",cae()).force("y",dae()).force("center",oS(e,t)).on("tick",this.ticked),this.simulation.alphaDecay=this.alphaDecay*1,this.simulation.alphaMin=this.alphaMin*1,this.simulation.on("end",()=>{un("simulation end time",Date.now()),un("node count",this.nodes.filter(r=>r.type!=="nodeType").length),this.isThreatPath&&this.centerAndZoom(1)})},update(){var e;this.destroyed||(e=this.nodes)!=null&&e.length&&(this.initScript(),this.simulation?this.updateSimulation():this.setSimulation(),this.doClearCanvas(),this.paintLinks(),this.paintNodes(),this.updateSelection(),this.actNum===9&&setTimeout(()=>{this.centerAndZoom(.8)},200))},doClearCanvas(){Gt={},Mn={},this.layer.destroyChildren(),go=new _t.Group({id:"grab",x:0,y:0}),this.layer.add(go)},paintNodes(){const e=this.stage.width()/2,t=this.stage.height()/2,n=this.selection.map(r=>r.id);this.nodes.forEach(r=>Pe(this,null,function*(){var _,w,C,E,S,x,N,A,O,P,F,R,U,j;const o=(r.type==="nodeType"?this.iconSizeComputed[r.icon]||this.iconSizeComputed.node_type:this.iconSizeComputed[r.type])||24,s=(C=(w=(_=r==null?void 0:r.detail)==null?void 0:_.info)==null?void 0:w.basic)==null?void 0:C.level,c=(x=(S=(E=r==null?void 0:r.detail)==null?void 0:E.info)==null?void 0:S.basic)==null?void 0:x.flag,l=yield this.getNodeImage(r);Gt[r.id]&&((N=Gt[r.id])==null||N.destroy());const d=new _t.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){const q=Xh(s,this.levelList,this.darkMode),K=new _t.Circle({x:0,y:0,radius:20,fill:q,opacity:0}),J=new _t.Circle({x:0,y:0,radius:20,fill:q,opacity:0}),z=new _t.Circle({x:0,y:0,radius:20,fill:q,opacity:0});d.add(K),d.add(J),d.add(z);const D=(Z,X)=>new _t.Animation(function(te){const V=te.time,le=.5-.5*(V%X)/X,oe=40*(V%X)/X;Z.radius(oe||0),Z.opacity(le)},this.layer),G=D(K,1500),H=D(J,1500),B=D(z,1500);G.start(),setTimeout(function(){H.start()},500),setTimeout(function(){B.start()},1e3)}if(r.type==="ip"||r.type==="internet"){const q=new _t.Circle({x:0,y:0,fill:this.darkMode?"#182628":"#fff",radius:o/2,stroke:Xh(s,this.levelList),strokeWidth:2});d.add(q)}if(l){const q=(c?20:o)||24,K=l&&new _t.Image({x:0,y:0,offsetX:q/2,offsetY:q/2,image:l,width:q,height:q,draggable:!1});d.add(K)}if(r.detail&&r.type==="md5"){const q=((P=(O=(A=r.detail.info)==null?void 0:A.basic)==null?void 0:O.file_type)==null?void 0:P.toUpperCase())||"MD5",K=new _t.Text({name:"md5Text",x:0,y:0,text:q,fontSize:4,fontWeight:700,fontFamily:WUe,fill:this.darkMode?"#182628":"#fff",align:"center",listening:!1});K.x(K.x()-K.width()/2),d.add(K)}const u=r.textProp||"name",f=u==="name"?((R=(F=r==null?void 0:r.detail)==null?void 0:F.info)==null?void 0:R.name)||r.name:r[u];let h=f.length>14&&!KUe.includes(r.type)?f.slice(0,7)+"..."+f.slice(-7):f;h=yae(h);const p=new _t.Text({offsetY:o/2,name:"konvaText",x:0,y:o+8,text:h,fontSize:12,fontFamily:"Calibri",fill:this.darkMode?"#cdd9da":"#000",align:"center",listening:!1,visible:!!r.textProp});p.x(p.x()-p.width()/2),d.add(p);const g=new _t.Circle({name:"border",x:0,y:0,radius:o/2,fill:"#5c6271",opacity:.4,visible:!1});if(d.add(g),(j=(U=r.detail)==null?void 0:U.tags)!=null&&j.length){const q=new _t.Circle({x:((o/2||14)+5)*Math.sin(60*Math.PI/180),y:-((o/2||14)+5)*Math.cos(60*Math.PI/180),radius:3,fill:"#9300ff",listening:!1});d.add(q)}if(r.type!=="nodeType"&&r.type!=="aggregation"){var y=new _t.Circle({name:"collect",x:((o/2||14)+5)*Math.sin(0*Math.PI/180),y:-((o/2||14)+5)*Math.cos(0*Math.PI/180),radius:3,fill:"#ffad00",visible:!!r.collect});d.add(y)}if(r.label){const q=new _t.Circle({x:((o/2||14)+5)*Math.sin(30*Math.PI/180),y:-((o/2||14)+5)*Math.cos(30*Math.PI/180),radius:3,fill:"#0099ff",listening:!1});d.add(q)}d.on("dragstart",(q,K)=>{q.evt[this.actKey]||(this.simulation.alphaTarget(.3).restart(),this.isDragging=!0)}),d.on("dragmove",q=>{if(!q.evt[this.actKey]){var K=this.simulation.nodes().find(J=>J.id===r.id);K.x=d.x(),K.fx=d.x(),K.y=d.y(),K.fy=d.y(),this.links.forEach(J=>{const z=Mn[`${J.source.id}-${J.target.id}`].findOne(".konvaLine"),D=Mn[`${J.source.id}-${J.target.id}`].findOne(".linkArrow");if(J.source.id===K.id){const G=K.x,H=Gt[J.target.id].x(),B=K.y,Z=Gt[J.target.id].y();z.points([G,B,H,Z]);const X=A2(G,B,H,Z,B8);D==null||D.x(X==null?void 0:X.x),D==null||D.y(X==null?void 0:X.y),D==null||D.rotation(Math.atan2(Z-B,H-G)*(180/Math.PI))}else if(J.target.id===K.id){const G=Gt[J.source.id].x()||0,H=K.x||0,B=Gt[J.source.id].y()||0,Z=K.y||0;z.points([G,B,H,Z]);const X=A2(G,B,H,Z,B8);D==null||D.x(X==null?void 0:X.x),D==null||D.y(X==null?void 0:X.y),D==null||D.rotation(Math.atan2(Z-B,H-G)*(180/Math.PI))}}),this.layer.batchDraw()}}),d.on("dragend",q=>{q.evt[this.actKey]||(this.isDragging=!1)}),d.on("click",q=>{q.evt.detail===2?this.expandNodes(q,r):q.evt.detail===1&&q.evt.button===0&&this.handleNodeClick(q,r)}),d.on("contextmenu",q=>{q.cancelBubble=!0,q.evt.preventDefault(),q.evt.stopPropagation(),this.handleNodeContextMenu(q,r,d)}),d.on("mouseup",q=>this.handleNodeMouseUp(q,r)),d.on("mousedown",q=>this.handleNodeMouseDown(q,r)),d.on("mouseenter",q=>this.handleNodeMouseEnter(q,r)),d.on("mouseleave",q=>this.handleNodeMouseLeave(q,r)),go.add(d),Gt[r.id]=d})),this.stage.batchDraw()},paintLinks(){const e=this.stage.width()/2,t=this.stage.height()/2;this.links.forEach(n=>{Mn[`${n.source.id}-${n.target.id}`]&&Mn[`${n.source.id}-${n.target.id}`].destroy();const r=new _t.Group({opacity:1,id:`${n.source.id}-${n.target.id}`,visible:n.source.show&&n.target.show}),o=this.darkMode?"#445152":"#999",s=new _t.Arrow({name:"linkArrow",pointerLength:10,pointerWidth:10,x:e,y:t,fill:o});r.add(s);const c=n.source.x||0,l=n.source.y||0,d=n.target.x||0,u=n.target.y||0,f=new _t.Line({name:"konvaLine",id:`${n.source.id}-${n.target.id}`,points:[c,l,d,u],stroke:n.target.type==="org"?"#cf1322":o,strokeWidth:1,dash:n.diy===!0?[5,5]:null});if(n.target.type==="nodeType"){const h=new _t.Text({name:"edgeLabel",x:(c+d)/2,y:(l+u)/2,text:n.target.name,fontSize:12,fill:this.darkMode?"#cdd9da":"#000"});r.add(h)}r.add(f),go.add(r),r.moveToBottom(),Mn[`${n.source.id}-${n.target.id}`]=r}),this.stage.batchDraw()},updateSimulation(){var e;try{this.simulation.stop(),this.simulation.nodes(this.nodes),this.simulation.force("link").links(this.links),this.simulation.alpha(.4).restart(),this.simulation.on("tick",this.ticked),this.simulation.on("end",()=>{this.isThreatPath&&this.centerAndZoom(1)})}catch(t){console.log(t,"simulation-e1"),(e=this.simulation)==null||e.stop()}},ticked(){switch(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],o=Mn[`${r.source.id}-${r.target.id}`],s=o==null?void 0:o.findOne(".konvaLine"),c=o==null?void 0:o.findOne(".linkArrow"),l=o==null?void 0:o.findOne(".edgeLabel");let d=r.source.x,u=r.source.y,f=r.target.x,h=r.target.y;const p=f-d||1,g=h-u||1,y=Math.sqrt(p*p+g*g),_=p/y||1,w=g/y||1,C=r.source.type==="nodeType"?(this.iconSizeComputed[r.source.icon]||14)/2-1:(this.iconSizeComputed[r.target.type]||14)/2-1,E=r.target.type==="nodeType"?(this.iconSizeComputed[r.target.icon]||14)/2-1:(this.iconSizeComputed[r.target.type]||14)/2-1;if(d=d+C*_,u=u+C*w,f=f-E*_,h=h-E*w,isNaN(d)||isNaN(u)||isNaN(f)||isNaN(h)){e=!1;break}s==null||s.points([d,u,f,h]);const S=A2(d,u,f,h,B8);if(c==null||c.x((S==null?void 0:S.x)||0),c==null||c.y((S==null?void 0:S.y)||0),c==null||c.rotation(Math.atan2(h-u,f-d)*(180/Math.PI)),l){l.x((d+f)/2),l.y((u+h)/2),l.offsetX(l.getWidth()/2||0),l.offsetY(l.getHeight()/2+8||0);const x=Math.atan2(h-u,f-d)*(180/Math.PI);f<d?l.rotation(x+180):l.rotation(x)}}if(!e){console.log("请点击自动布局按钮"),this.resetLayout();return}for(let n=0;n<this.nodes.length;n++){const r=this.nodes[n];(t=Gt[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=Mn[`${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 o=Mn[`${r.source.id}-${r.target.id}`];o==null||o.removeName("keyed")}),this.history.resetKeyLinksAndNodes();return}const{keyLinks:t,keyNodeIds:n}=this.history.findKeyLinksAndNodes(e[0].id,!0);this.links.forEach(r=>{const o=t.find(c=>c.source.id===r.source.id&&c.target.id===r.target.id),s=Mn[`${r.source.id}-${r.target.id}`];o?s==null||s.addName("keyed"):s==null||s.removeName("keyed")}),this.nodes.forEach(r=>{const o=Gt[r.id];n.includes(r.id)?o==null||o.addName("keyed"):o==null||o.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=Gt[e.id];if(!t)return;const n=t==null?void 0:t.findOne(".border"),r=t==null?void 0:t.findOne(".konvaText"),o=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(o)))}),this.layer.batchDraw()},updateLinksStyleByName(){this.links.forEach(e=>{const t=Mn[`${e.source.id}-${e.target.id}`];if(!t)return;const n=t.findOne(".konvaLine"),r=t.findOne(".edgeLabel"),o=t.findOne(".linkArrow");t!=null&&t.hasName("lowlight")?t==null||t.opacity(.4):t==null||t.opacity(1);const s=this.darkMode?"#445152":"#999";if(t.hasName("isSelected")||t.hasName("keyed")){const c=e.target.type==="org"?"#cf1322":"#007ee2";n.stroke(c),o.fill(c),n.strokeWidth(1),t==null||t.opacity(1),r==null||r.fill("#007ee2"),t.hasName("keyed")?n.strokeWidth(3):n.strokeWidth(1)}else{const c=e.target.type==="org"?"#cf1322":s;Mn[`${e.source.id}-${e.target.id}`].removeName("isSelected"),n.strokeWidth(1),n.stroke(c),o.fill(c),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.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&&!nl()&&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(nl())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,o,s,c,l,d;if(this.scriptInited)return;((s=(o=(r=this.history)==null?void 0:r.dataNow)==null?void 0:o.nodes)==null?void 0:s.length)>0&&(this.scriptInited=!0);const e=["193.36.119.50","6cd7b91212983cc557c6e3e671734ff9"];let t=null;if((d=(l=(c=this.history)==null?void 0:c.dataNow)==null?void 0:l.nodes)==null||d.some(u=>{const f=e.indexOf(u.id);return f>=0&&u.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(console.log("nodesMoveToCenterView"),e.length===0)return;const n=[],r=this.nodes.filter(E=>e.indexOf(E.id)>=0);r==null||r.forEach(function(E,S){const x=Gt[E.id];n.push({bounds:(x==null?void 0:x.getClientRect())||{},fx:E.x||0,fy:E.y||0})});const o=this.getBounds(n);this.originTransform=this.originTransform={scaleX:this.stage.scaleX(),scaleY:this.stage.scaleY(),x:this.stage.x(),y:this.stage.y()};const s=this.stage.width(),c=this.stage.height()/1.5,l=o.width,d=o.height;if(l===0||d===0)return;let u=t/Math.max(l/s,d/c);u=Math.min(u,Ci)||Ci,this.scale=u;const f=this.stage.width()/(2*u),h=this.stage.height()/(2*u),p=Gt[e[0]],g=p==null?void 0:p.getClientRect(),y=g.x*u,_=g.y*u,w=f-y,C=h-_;this.stage.setAttrs({scaleX:u,scaleY:u,x:w||0,y:C||0}),this.layer.batchDraw()},getBounds(e){let t,n,r,o;return e.map(s=>{const c=s.bounds,l=c.x+s.fx,d=c.y+s.fy;t=Math.min(l,t)||l,n=Math.min(d,n)||d,r=Math.max(l+c.width,r)||l+c.width,o=Math.max(d+c.height,o)||d+c.height}),{x:t,y:n,width:r-t,height:o-n}},resetMouseVars(){var e;this.mousedownNode=null,this.mousedownPos=null,this.mouseupNode=null,(e=this.dragLine)==null||e.destroy(),Object.keys(Gt).forEach(t=>{Gt[t].draggable(!0)})},loadIcons(){return new Promise((e,t)=>{const n=[],r=[];for(const d in this.moduleDetail.plugs){const u=this.moduleDetail.plugs[d];u==null||u.map(f=>{f.children?r.push(...f.children):r.push(f)})}n.push(...r.map(d=>d.icon)),n.push(...this.moduleDetail.nodes.map(d=>d.name)),n.push("node_type"),n.push("node"),n.push("aggregation");const o=this;let s=0;const c=n.filter(d=>this.imgPath[`${o.prefix}d3svg1/${d}.svg`]);function l(d){return{}.VITE_SVG_TYPE==="base64"?wae(d):Loe(d)}c.map(d=>{l(this.imgPath[`${o.prefix}d3svg1/${d}.svg`]).then(function(u){o.iconFiles[d]=u;const f=_ae(u).width;I8[d]=f,s++,s===c.length&&(o.iconAllLoaded=!0,e())}).catch(u=>{console.log(u,"e"),t()})})})},toggleZoom(e){},handleNodeContextMenu(e,t){var n,r;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=GUe: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){be(this,"handle-select-node",{isSelected:!1,_node:a.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||RC(".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=Gt[t.id])==null||n.addName("isSelected"):(r=Gt[t.id])==null||r.removeName("isSelected")}),be(this,"updateSelection")},toggleLayout(e){this.history.layoutIndex=e,this.history.dataNow.nodes.map(t=>{t.fx=t.fy=null}),this.updateSimulation(),this.ticked(),setTimeout(()=>{this.centerAndZoom()},200)},handleNodeClick(e,t){un("click",e,t),fn({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(o=>o.id===t.id);if(e.evt.shiftKey){if(t.type==="nodeType"||this.selection.some(o=>o.type==="nodeType"))return;n?this.selection=this.selection.filter(o=>o.id!==t.id):this.selection=[...this.selection,t]}else n?this.selection=[]:this.selection=[t];const r=this.selection.some(o=>o.id===t.id);be(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(),o=e.target,s=o.getAbsolutePosition(),l=o.getStage().container().getBoundingClientRect(),d=s.x-n/2+l.left,u=s.y-r/2+l.top,f=d,h=u,p=f,g=f+n,y=h,_=h+r;this.hoverNodePosition={top:y,right:g,bottom:_,left:p,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,Gt[t.id].draggable(!1);const n=this.stage.scaleX(),r=this.stage.getPointerPosition(),o=(r.x-this.stage.x())/n,s=(r.y-this.stage.y())/n;this.mousedownPos={x:o,y:s},this.dragLine=new _t.Line({points:[o,s,o,s],stroke:"black",strokeWidth:1,dash:[5,5],opacity:.7,visible:!0}),this.layer.add(this.dragLine),this.stage.draw()}},treeLayout(){this.nodes.map(e=>{e.fx=e.pos,e.fy=e.levelNum*this.levelHeight}),this.forceLayout()},resetLayout(){this.simulation.stop(),this.nodes.map(e=>{delete e.vx,delete e.vy,delete e.x,delete e.y,delete e.fx,delete e.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,o=0;const s=t[n];this.links.map(c=>{c.source.id===s&&r++,c.target.id===s&&o++}),r>=1&&t.splice(n,1),o>=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,h,p;if(this.originTransform={scaleX:this.stage.scaleX(),scaleY:this.stage.scaleY(),x:this.stage.x(),y:this.stage.y()},!go)return;const n=this.stage.width(),r=this.stage.height(),o=go.getClientRect(),s=o.width/this.scale,c=o.height/this.scale;if(s===0||c===0)return;let l=e/Math.max(s/n,c/r);if(l=t?l:Math.min(l,Ci)||Ci,!t&&l>Ci)return;this.scale=l;const d=this.stage.width()/(2*l),u=this.stage.height()/(2*l);if((f=this.simulation)!=null&&f.force&&((h=this.simulation)==null||h.force("center",oS(d,u))),this.stage.setAttrs({scaleX:l,scaleY:l,x:0,y:0}),this.layer.batchDraw(),this.history.layoutIndex===1){const g=go.getClientRect(),y=(n-g.width)/2-g.x,_=(r-g.height)/2-g.y;this.stage.setAttrs({x:y,y:_}),this.layer.batchDraw(),(p=this.simulation)==null||p.stop()}},reset(){this.stage.setAttrs(this.originTransform)},handleContextMenuClick({nodes:e,api:t,dataApi:n}){if(this.requestGraphData){let r,o;const s={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(c=>r.includes(c.id));break;case"hold_aggregation":o=this.selectSingleEdgeNode(e[0]),this.$parent.aggregationNodes(o,e[0]);break;case"release_aggregation":this.$parent.releaseAggregation(e[0]);break;case"show_label":case"show_names":e.map(c=>{this.showLabel(c,s[t.name])});break;case"all_show_label":case"all_show_names":this.nodes.map(c=>{this.showLabel(c,s[t.name])});break;case"un_show_names":case"un_show_label":e.map(c=>{this.hideLabel(c)});break;case"all_un_show_names":case"all_un_show_label":this.nodes.map(c=>{this.hideLabel(c)});break;case"copy":this.copyNodeText(e);break;case"node_star":e.map(c=>{this.starNode(c)});break;case"un_node_star":e.map(c=>{this.starNode(c,!1)});break;case"fix_nodes":e.map(c=>{this.toggleMove(c,!0)});break;case"un_fix_nodes":e.map(c=>{this.toggleMove(c,!1)});break;case"all_fix_nodes":this.fixAllNodes(!0);break;case"all_un_fix_nodes":this.fixAllNodes(!1);break;case"expand_node":e.map(c=>{this.$parent.expandNodes(c)});break;case"expand_part_node":e.map(c=>{this.$parent.expandNodes(c,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;default:be(this,"custom-contextmenu-click",{eventName:t.name,customConfig:t.customConfig,nodes:e,allNodes:a.toRaw(this.history.dataNow.nodes)})}this.hideContextMenu(),setTimeout(()=>{this.updateSelection()},400)}else qt({message:"无可操作权限",type:"warning"})},expandNodes(e,t){console.log("dblclick"),fn({cId:"dblclick",c:"双击节点"}),this.requestGraphData?this.$parent.expandNodes(t):qt({message:"无可操作权限",type:"warning"})},toggleShowNode(e,t,n=!0){this.history.toggleShowNode(e,t,n),this.selection.filter(o=>o.show).length>0||this.handleTableSelect([]),setTimeout(this.updateNodeStyle,100)},copyNodeText(e){let t="";e.filter(n=>n.type!=="aggregation"&&n.type!=="nodeType").map(n=>{t=t+n.id+`
151
+ `}),t&&HUe(t).then(()=>{qt({message:"复制成功",type:"success"})},n=>{console.log("copy---e",n)})},toggleMove(e,t){e.fx=t?e.x:null,e.fy=t?e.y:null,this.updateSimulation()},autoDisplay(){this.nodes.map(e=>{e.fx=null,e.fy=null})},editLabel(e){var t;mC.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((o,s)=>o&&o[s]?o[s]:void 0,e)},fixAllNodes(e=!0){this.nodes.map(t=>{this.toggleMove(t,e)})},highlightByRule(e,t){if(!e.prop&&!t){this.nodes.forEach(l=>{const d=Gt[l.id];d==null||d.removeName("lowlight")}),this.links.forEach(l=>{const d=Mn[`${l.source.id}-${l.target.id}`];d==null||d.removeName("lowlight")});return}const{type:n,prop:r,value:o}=e,s=this,c=[];this.nodes.forEach(function(l){const d=Gt[l.id];r?n==="include"?o.includes(s.safeGet(l,r))&&s.inNodesRange(t,l)?(d==null||d.removeName("lowlight"),c.push(l)):d==null||d.addName("lowlight"):n==="equal"?s.safeGet(l,r)===o&&s.inNodesRange(t,l)?(d==null||d.removeName("lowlight"),c.push(l)):d==null||d.addName("lowlight"):n==="boolean"&&(T2(s.safeGet(l,r))&&s.inNodesRange(t,l)?(d==null||d.removeName("lowlight"),c.push(l)):d==null||d.addName("lowlight")):s.inNodesRange(t,l)?(d==null||d.removeName("lowlight"),c.push(l)):d==null||d.addName("lowlight")}),this.links.forEach(function(l){const d=Mn[`${l.source.id}-${l.target.id}`];c.some(f=>f.id===l.target.id)?d==null||d.removeName("lowlight"):d==null||d.addName("lowlight")})},handleCustomSelect(e){if(this.handleDeselectNode(),!e.prop)return;const{type:t,prop:n,value:r}=e,o=this;this.nodes.forEach(s=>{if(n&&t==="include"){let c;if(s.type==="nodeType"){const l=o.safeGet(s,"parents"),d=o.safeGet(s,"children"),u=l==null?void 0:l.some(h=>r.includes(h)),f=d==null?void 0:d.some(h=>r.includes(h));c=u&&f}(r.includes(o.safeGet(s,n))||c)&&this.selection.push(s)}}),this.updateSelection()},inNodesRange(e,t){return e?e.some(n=>n===t.id):!0},loadFlagFiles(e){return Pe(this,null,function*(){return new Promise(t=>{this.flagFiles[e]?t():$d(this.imgPath[`${this.prefix}d3svg1/flags/${e}.png`]).then(n=>{this.flagFiles[e]=n,t()})})})},getNodeImage(e){return Pe(this,null,function*(){var o,s,c,l,d,u;let t=null;const n=(o=e.detail)==null?void 0:o.info.basic.flag,r=((l=(c=(s=e==null?void 0:e.detail)==null?void 0:s.info)==null?void 0:c.basic)==null?void 0:l.level)||"未知";if(e.detail&&((u=(d=e.detail)==null?void 0:d.info)!=null&&u.inner_img))t=yield tl(e.detail.info.inner_img);else if(e.type==="nodeType"||e.type==="aggregation"){const f=e.icon||"node_type";if(wr[f])return t=wr[f],t;t=this.iconFiles[f]?this.iconFiles[f]:this.iconFiles.node_type,t=yield tl("data:image/svg+xml,"+encodeURIComponent(t)),wr[f]=t}else if(n&&(e.type==="ip"||e.type==="internet")){if(wr[n])return t=wr[n],t;yield this.loadFlagFiles(n),t=yield tl(this.flagFiles[n]),wr[n]=t}else if(e.detail&&(e.type==="country"||e.type==="target_country")){const f=e.detail.info.inner_country;if(wr[f])return t=wr[f],t;yield this.loadFlagFiles(f),t=yield tl(this.flagFiles[f]),wr[f]=t}else{const f=`${e.type||"node"}${r}${this.darkMode}`;if(wr[f])return t=wr[f],t;t=this.iconFiles[e.type]?this.iconFiles[e.type]:this.iconFiles.node;const h=Xh(r,this.levelList,this.darkMode),p=this.darkMode?"#182628":"#fff";t=bae(t,h,p),t=yield tl("data:image/svg+xml,"+encodeURIComponent(t)),wr[f]=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 o=t.id.split("(")[0];o.indexOf("APT")>=0&&window.open(r.split("${id}").join(o),t.id)}else{let o=t.origin&&t.origin[0]||t.id;(n==="url"||n==="virus")&&(o=encodeURIComponent(o)),window.open(r.split("${id}").join(o),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},o={x:this.stage.getPointerPosition().x-this.stage.x(),y:this.stage.getPointerPosition().y-this.stage.y()},s={x:-(o.x-r.x)*(e-1),y:-(o.y-r.y)*(e-1)};this.stage.setAttrs({x:this.stage.x()+s.x,y:this.stage.y()+s.y,scaleX:n,scaleY:n}),this.layer.batchDraw()},addNodesDetail(e){return Pe(this,null,function*(){const t=e.filter(o=>!o.detail&&o.noDetail!==!0&&o.type!=="aggregation"&&o.type!=="nodeType"),n={};t.map(o=>{n[o.type]?n[o.type].push(o):n[o.type]=[o]});const r=[];for(const o in n){const s=n[o],c={};s.map(l=>{l.origin&&(c[l.id]=l.origin)}),r.push(this.graphApi.getNodesDetail({api:this.moduleDetail.node_info[n[o][0].type],node_id:n[o].map(l=>l.id),origin:c}).then(l=>(l.data.records.map(u=>{const f=e.find(h=>h.id===u.info.id);f.detail=u}),Promise.resolve({}))))}})},addCanvasBg(){this.darkMode&&(this.darkBgRect=new _t.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()}}},XUe={class:"main-svg-box"},JUe={ref:"canvasContainer",class:"canvas-container"};function QUe(e,t,n,r,o,s){const c=a.resolveComponent("popover"),l=a.resolveComponent("node-contextmenu");return a.openBlock(),a.createElementBlock("div",{class:a.normalizeClass(["render-container",n.darkMode?"dark-theme "+o.uniqueClass:" "+o.uniqueClass])},[a.createElementVNode("div",XUe,[a.createElementVNode("div",JUe,null,512)]),a.createVNode(c,{"dark-mode":n.darkMode,"show-popover":o.showPopover&&!o.isDragging,"mouse-position":o.hoverNodePosition,"node-info":o.popoverNode,"module-detail":n.moduleDetail,type:o.popoverType,history:n.history,data:n.history.dataNow},null,8,["dark-mode","show-popover","mouse-position","node-info","module-detail","type","history","data"]),n.isThreatPath?a.createCommentVNode("",!0):(a.openBlock(),a.createBlock(l,{key:0,show:s.showContextMenuFlag,axis:o.mousePosition,"node-info":s.contextMenuNodes,history:n.history,"menu-options":o.menuOptions,"module-detail":n.moduleDetail,onContextmenuClick:s.handleContextMenuClick},null,8,["show","axis","node-info","history","menu-options","module-detail","onContextmenuClick"]))],2)}const Lc=De(YUe,[["render",QUe]]),IKe="",BKe="",LKe="",{toClipboard:d$}=Jh(),ZUe={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}},created(){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})},mounted(){},updated(){},beforeUnmount(){},methods:{hanleClickCopy(e){d$(e).then(t=>qt({message:"复制成功",type:"success"}),t=>qt.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(l=>l===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 o=this.snapshot.thumb;let s=null;this.groupOptions.map(l=>{l.value===this.ruleForm.group&&(s=l.label)});const c={report_id:this.ruleForm.event,group_id:this.ruleForm.group,content:o,graph_url:r,group_name:s,acl:parseInt(this.ruleForm.radio),head:this.ruleForm.graphDesc};this.graphApi.addGraph(c).then(l=>{l.code==="0"?(d$(this.eventUrl),qt({message:"分享成功! 分享事件地址已经复制",type:"success",showClose:!0,duration:5e3})):qt({message:"分享失败",type:"error"})}).catch(()=>{qt({message:"分享失败",type:"error"})}),this.resetForm(e),this.dialogVisible=!1}else return!1})},resetForm(e){this.$refs[e].resetFields(),this.snapshot.name=""}}},VUe={class:"sharetoEvents"},eze={class:"lable-header"},tze={class:"desc"},nze={key:0,class:"desc-font"},rze={key:1,class:"desc-font"},ize={class:"dialog-footer"};function oze(e,t,n,r,o,s){const c=BZ,l=dh,d=ch,u=kv,f=Na,h=Ev,p=Aa,g=wd;return a.openBlock(),a.createElementBlock("div",VUe,[a.createVNode(g,{title:"分享到安全事件","append-to-body":"","close-on-click-modal":!1,width:"25%",modelValue:o.dialogVisible,"onUpdate:modelValue":t[6]||(t[6]=y=>o.dialogVisible=y),class:"el-dialog-graph"},{footer:a.withCtx(()=>[a.createElementVNode("span",ize,[a.createVNode(p,{type:"primary",onClick:t[5]||(t[5]=y=>s.submitForm("ruleForm"))},{default:a.withCtx(()=>[a.createTextVNode("确认分享")]),_:1}),a.createVNode(p,{onClick:s.hide},{default:a.withCtx(()=>[a.createTextVNode("关闭")]),_:1},8,["onClick"])])]),default:a.withCtx(()=>[a.createVNode(h,{ref:"ruleForm",model:o.ruleForm,rules:o.rules,"label-width":"100px",class:"demo-ruleForm"},{default:a.withCtx(()=>[a.createElementVNode("div",eze,[a.createVNode(c,{modelValue:o.ruleForm.radio,"onUpdate:modelValue":t[0]||(t[0]=y=>o.ruleForm.radio=y),class:"el-radio",label:"1",border:"",size:"medium"},{default:a.withCtx(()=>[a.createTextVNode("付费可见")]),_:1},8,["modelValue"]),a.createVNode(c,{modelValue:o.ruleForm.radio,"onUpdate:modelValue":t[1]||(t[1]=y=>o.ruleForm.radio=y),label:"0",border:"",size:"medium"},{default:a.withCtx(()=>[a.createTextVNode("开放")]),_:1},8,["modelValue"]),a.createElementVNode("div",tze,[o.ruleForm.radio==="0"?(a.openBlock(),a.createElementBlock("span",nze,"该Graph内容对所有用户可见。")):(a.openBlock(),a.createElementBlock("span",rze,"该Graph内容对付费用户可见。"))])]),a.createVNode(u,{label:"安全事件",prop:"event"},{default:a.withCtx(()=>[a.createVNode(d,{modelValue:o.ruleForm.event,"onUpdate:modelValue":t[2]||(t[2]=y=>o.ruleForm.event=y),"popper-append-to-body":!1,filterable:"",placeholder:"请选择",class:"select-item"},{default:a.withCtx(()=>[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(o.eventOptions,y=>(a.openBlock(),a.createBlock(l,{key:y.value,label:y.label,value:y.value},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])]),_:1}),o.isInnerAccount?(a.openBlock(),a.createBlock(u,{key:0,label:"选择团队",prop:"group"},{default:a.withCtx(()=>[a.createVNode(d,{modelValue:o.ruleForm.group,"onUpdate:modelValue":t[3]||(t[3]=y=>o.ruleForm.group=y),class:"select-item",filterable:"",placeholder:"请选择"},{default:a.withCtx(()=>[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(o.groupOptions,y=>(a.openBlock(),a.createBlock(l,{key:y.value,label:y.label,value:y.value},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])]),_:1})):a.createCommentVNode("",!0),a.createVNode(u,{label:"Graph介绍",prop:"graphDesc"},{default:a.withCtx(()=>[a.createVNode(f,{modelValue:o.ruleForm.graphDesc,"onUpdate:modelValue":t[4]||(t[4]=y=>o.ruleForm.graphDesc=y),type:"textarea",rows:2,placeholder:"请输入内容",maxlength:"50",clearable:""},null,8,["modelValue"])]),_:1})]),_:1},8,["model","rules"])]),_:1},8,["modelValue"])])}const aze=De(ZUe,[["render",oze]]),MKe="",{toClipboard:sze}=Jh(),lze={name:"SnapShotDialog",components:{ShareToSecurityEvents:aze},mixins:[],props:{graphUrlPath:{type:String,default:"/graph"},snapshot:{type:Object,default:()=>{}},graphApi:{type:Object,default:()=>{}}},data(){return{dialogVisible:!1,origin:window.location.origin,isInnerAccount:!1}},computed:{},watch:{},created(){},mounted(){Bo(Ke,"sharePermission",e=>{this.isInnerAccount=e})},updated(){},beforeUnmount(){Lo(Ke,"sharePermission")},methods:{hanleClickCopy(e){sze(e).then(t=>qt({message:"复制成功",type:"success"}),t=>qt.error("复制失败"))},show(){this.dialogVisible=!0},hide(){this.dialogVisible=!1},shareToEvents(){this.dialogVisible=!1,this.$refs.sharetoevents.show()}}},cze={class:"snapshotdialog-container"},dze={class:"dialog-footer"};function uze(e,t,n,r,o,s){const c=Na,l=aV,d=Aa,u=wd,f=a.resolveComponent("ShareToSecurityEvents");return a.openBlock(),a.createElementBlock("div",cze,[a.createVNode(u,{title:"复制链接及提取码","append-to-body":"",modelValue:o.dialogVisible,"onUpdate:modelValue":t[2]||(t[2]=h=>o.dialogVisible=h),"close-on-click-modal":!1,class:"el-dialog-graph"},{footer:a.withCtx(()=>[a.createElementVNode("span",dze,[o.isInnerAccount?(a.openBlock(),a.createBlock(d,{key:0,type:"primary",onClick:t[0]||(t[0]=h=>s.shareToEvents())},{default:a.withCtx(()=>[a.createTextVNode("分享到安全事件")]),_:1})):a.createCommentVNode("",!0),a.createVNode(d,{type:"primary",onClick:t[1]||(t[1]=h=>s.hanleClickCopy(`${o.origin}${n.graphUrlPath}?snapshot_id=${n.snapshot.snapshot_id}&vcode=${n.snapshot.vcode}`))},{default:a.withCtx(()=>[a.createTextVNode("复制链接及提取码")]),_:1}),a.createVNode(d,{onClick:s.hide},{default:a.withCtx(()=>[a.createTextVNode("关闭")]),_:1},8,["onClick"])])]),default:a.withCtx(()=>[a.createVNode(c,{value:`${o.origin}${n.graphUrlPath}?snapshot_id=${n.snapshot.snapshot_id}`},{prepend:a.withCtx(()=>[a.createTextVNode("链接地址:")]),_:1},8,["value"]),a.createVNode(l),a.createVNode(c,{value:n.snapshot.vcode},{prepend:a.withCtx(()=>[a.createTextVNode("提取码:")]),_:1},8,["value"])]),_:1},8,["modelValue"]),a.createVNode(f,{ref:"sharetoevents",snapshot:n.snapshot,"graph-api":n.graphApi},null,8,["snapshot","graph-api"])])}const fze=De(lze,[["render",uze]]),$Ke="",hze={name:"ForceGraphByCanvas",components:{Loading:If,ForceGraphSvgIcon:Ia,RenderByCanvas:Lc,ButtonList:the,SnapShotDialog:fze,RightMenu:qde,Legend:Oue},mixins:[si],provide:function(){return{history:this.history,hasLevel:this.hasLevel,levelList:this.levelList,levelMap:this.levelMap,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:()=>[]},customContextMenuEvent:{type:Function},handleSelectNodeEvent:{type:Function},handleDataLoaded:{type:Function},graphApi:{type:Object,default:()=>{}},graphUrlPath:{type:String,default:"/graph"},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},nodeTypeScale:{type:Number},singlesNodeMaxNum:{type:Number,default:100}},emits:["sharePermission","custom-contextmenu-click","handle-select-node","handle-data-loaded","outdate"],data(){return{history:new uae({isShowNodeMessage:this.isShowNodeMessage}),isLoading:!1,bigLoading:!1,loadingInfo:"数据加载中",moduleDetail:{},contextMenuNode:{},contextMenuId:0,isDragging:!1,isCtrlDown:!1,selection:[],detailLoaded:{},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()}}},created(){return Pe(this,null,function*(){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{qt.error("请传入模块名称");return}this.graphApi.userInfo&&this.graphApi.userInfo().then(e=>{e.data!==null&&(be(Ke,"sharePermission",e.data.access.graph_share),this.requestGraphData=e.data.access.request_graph_data)}).catch(e=>{this.onOutdate(e.res)})})},unmounted(){window.onresize=null},mounted(){return Pe(this,null,function*(){window.onresize=()=>{this.fullScreen=!!document.fullscreenElement,this.screenHeight=document.body.clientHeight},this.margin=this.changeMargin(),Bo(Ke,"emitDataLoaded",()=>{this.emitDataLoaded()})})},methods:{handleCustomContextMenuClick(e){this.customContextMenuEvent&&typeof this.customContextMenuEvent=="function"?this.customContextMenuEvent(a.toRaw(e)):be(this,"custom-contextmenu-click",a.toRaw(e))},handleSelectNode(e){this.handleSelectNodeEvent&&typeof this.handleSelectNodeEvent=="function"?this.handleSelectNodeEvent(a.toRaw(e),a.toRaw(this.history.dataNow)):be(this,"handle-select-node",a.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):(qt({message:"无相关数据",type:"warning"}),this.emitDataLoaded())})},initGraph(){return Pe(this,null,function*(){var e;(e=this.graphApi)==null||e.getGraphConfig({name:this.module}).then(t=>{un("getGraphConfig",t),this.moduleDetail=t.data,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 o,s,c;un(`getNodesDetail${this.moduleDetail.node_info[e.type]}`,t);let n={id:(o=t.data.records[0])==null?void 0:o.info.id,type:(s=t.data.records[0])==null?void 0:s.info.type,startNode:!0,detail:t.data.records[0],group:e.id,name:((c=t.data.records[0])==null?void 0:c.info.name)||e.id};n=qi(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),qt({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++,be(this,"outdate"))},expandNodes(e,t){return Pe(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(u=>{u.children?r.push(...u.children):r.push(u)}));const o=r.map(u=>this.graphApi.getGraphRequest({api:u.name,node_id:e.id,origin:e.origin,nodeType:e.type,moduleDetail:this.moduleDetail}).then(f=>Promise.resolve(de(se({},f),{api:u.name,apiC:u.relay_name,icon:u.icon,note_name:u.note_name,canLoop:u.canloop}))).catch(f=>Promise.resolve(f)));this.isLoading=!0;let s;yield Promise.all(o).then(u=>{if(u.some(h=>{var p;return((p=h.res)==null?void 0:p.code)==="AC100001"})){this.onOutdate({code:"AC100001"});return}s=u.filter(h=>h.code==="0"||h.code===0)}).catch(u=>{console.log(u,"e")}).finally(u=>{this.isLoading=!1}),un("resultArray",s);const c=[];let l=[];if(s&&s.forEach(u=>{if(e.getData[u.api]=!0,this.history.dataNow.nodes.find(_=>_.id===e.id)&&(this.history.dataNow.nodes.find(_=>_.id===e.id).getData[u.api]=!0),!u.data)return;let f;const h=u.data.nodes.map(_=>(_.group=e.id+"-"+u.api,_.groupC=u.apiC,_=qi(_,this.moduleDetail.plugs),_)),p=e.id+"-"+u.api;let g={id:p,name:u.apiC,note_name:u.note_name,type:"nodeType",icon:u.icon};const y={source:e.id,target:p};if(g=qi(g,this.moduleDetail.plugs),this.nodeTypeList.push(u.icon||"node_type"),h.length>0&&this.isRenderStartNode){if(f=u.data.links.map(_=>{let w;if(_.source===e.id){const C=this.history.dataNow.nodes.filter(E=>E.id===_.target);if(C.length>0&&(w=this.findGrandSonNodeIds(C[0]).indexOf(_.source)>=0),!u.api.canLoop&&w)return;_.source=p}else _.target===e.id&&(_.target=p);return _}).filter(_=>_),f.length===0)return;f.push(y)}else f=u.data.links;if(this.isRenderStartNode&&h.length>=this.singlesNodeMaxNum){let _=null,w=null;const C=String(Math.floor(new Date().getTime()));_={id:C,list:h,type:"aggregation",name:"聚合",relationId:g.id},_=qi(_,this.moduleDetail.plugs),w={source:g.id,target:C,uniqueIndex:this.generateUniqueIndexNow()};const E={addOne:{nodes:[g,_],links:[y,w]},type:"aggregation"};this.history.pushState(E),this.getNodeDetail(_.list,_.id)}else f.length&&this.isRenderStartNode&&h.push(g),c.push(...h||[]),l.push(...f||[])}),!this.isRenderStartNode){const u={},f={},h=[];l.forEach(p=>{const g=p.source+"-"+p.name;if(!u[g]){let y={id:g,name:p.name,type:"nodeType",icon:p.feature.icon};y=qi(y,this.moduleDetail.plugs),u[g]=y}f[g]?f[g].push(p):f[g]=[p]});for(const p in u)c.push(u[p]);for(const p in f)f[p].forEach(y=>{const _=de(se({},y),{source:y.source,target:p}),w=de(se({},y),{source:p,target:y.target});h.push(_),h.push(w)});l=h}l.map(u=>{u.uniqueIndex=this.generateUniqueIndexNow()});const d={addOne:{nodes:c,links:l}};(c.length>0||l.length>0)&&this.history.pushState(d),this.history.length===2&&setTimeout(()=>{this.centerAndZoom(.8,!1)},1e3),this.getNodeDetail(c)})},findGrandSonNodeIds(e){return this.history.dataNow.nodes.filter(r=>{var o;return((o=e.children)==null?void 0:o.indexOf(r.id))>=0}).reduce((r,o)=>(r.push(...o.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 n=e.filter(s=>!s.detail&&s.noDetail!==!0&&!this.detailLoaded[s.id]&&s.type!=="aggregation"&&s.type!=="nodeType"),r={};n.map(s=>{r[s.type]?r[s.type].push(s):r[s.type]=[s]});let o=Object.keys(r).length;for(const s in r){const c=r[s],l={};c.map(d=>{d.origin&&(l[d.id]=d.origin)}),this.graphApi.getNodesDetail({api:this.moduleDetail.node_info[r[s][0].type],node_id:r[s].map(d=>d.id),origin:l,nodeType:r[s][0].type,moduleDetail:this.moduleDetail}).then(d=>{const u=d.data.records;t?this.history.updateAggregationDetail(u,r[s].map(f=>f.id),t):this.history.updateData(u,r[s].map(f=>f.id))}).catch(d=>{this.onOutdate(d.res)}).finally(()=>{o=o-1,o===0&&this.emitDataLoaded()})}Object.keys(r).length||this.emitDataLoaded()},emitDataLoaded(){this.handleDataLoaded&&typeof this.handleDataLoaded=="function"?this.handleDataLoaded({dataNow:a.toRaw(this.history.dataNow)}):be(this,"handle-data-loaded",{dataNow:a.toRaw(this.history.dataNow)})},addNode({node:e,type:t,connectNode:n}){if(this.history.dataNow.nodes.findIndex(s=>s.id===e.id)>-1){qt({type:"warning",message:"该节点已存在,添加失败"});return}let o;if(t==="diy"&&e.type==="nodeType"){let s=de(se({},e),{detail:null,diy:!0,group:e.id});s=qi(s,this.moduleDetail.plugs);const c=n?{source:n.id,target:e.id,uniqueIndex:this.generateUniqueIndexNow()}:null;o={addOne:{nodes:[s],links:c?[c]:[]}},this.history.pushState(o)}else t==="diy"?this.graphApi.getNodesDetail({api:this.moduleDetail.node_info[e.type],node_id:[e.id],nodeType:e.type,moduleDetail:this.moduleDetail}).then(s=>{var d,u,f;let c={id:(d=s.data.records[0])==null?void 0:d.info.id,type:(u=s.data.records[0])==null?void 0:u.info.type,detail:s.data.records[0],group:e.id,name:((f=s.data.records[0])==null?void 0:f.info.name)||e.id};c=qi(c,this.moduleDetail.plugs);const l=n?{source:n.id,target:e.id,uniqueIndex:this.generateUniqueIndexNow()}:null;o={addOne:{nodes:[c],links:l?[l]:[]}},this.history.pushState(o)}).catch(s=>{this.onOutdate(s.res);let c=de(se({},e),{detail:null,diy:!0,group:e.id});c=qi(c,this.moduleDetail.plugs);const l=n?{source:n.id,target:e.id,uniqueIndex:this.generateUniqueIndexNow()}:null;o={addOne:{nodes:[c],links:l?[l]:[]}},this.history.pushState(o)}).finally(s=>{setTimeout(()=>{},500)}):this.addNewNodesAndExpand(e)},addLink(e,t){if(!([e,t].filter(s=>s.type==="nodeType").length===1))return;const r={source:e.id,target:t.id,uniqueIndex:this.generateUniqueIndexNow(),diy:!0};let o=!1;if(this.history.dataNow.links.map(s=>{s.source.id===e.id&&s.target.id===t.id&&(o=!0)}),!o){const s={addOne:{links:[r]}};this.onAction(s)}},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 c in this.history.dataNow.nodes)e.findIndex((d,u,f)=>d===this.history.dataNow.nodes[c].id)>=0&&n.push(JSON.parse(JSON.stringify(this.history.dataNow.nodes[c])));const r=String(Math.floor(new Date().getTime()));let o={id:r,list:n,type:"aggregation",name:"聚合",relationId:t.id};o=qi(o,this.moduleDetail.plugs);const s={addOne:{nodes:[o],links:[{source:t.id,target:r,uniqueIndex:this.generateUniqueIndexNow()}]},deleteOne:{nodes:n,links:n.map(c=>({source:t.id,target:c.id}))},type:"aggregation"};this.history.pushState(s),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((s,c,l)=>s===this.history.dataNow.nodes[r].id)>=0&&(this.history.dataNow.nodes[r].aggregation=!1);this.history.pushState(n),this.emitDataLoaded()}},saveSnapshot(){return Pe(this,null,function*(){mC.prompt(null,"添加快照",{confirmButtonText:"确定",cancelButtonText:"取消",inputPattern:/^.{1,20}$/,inputPlaceholder:"请输入20字以内快照名称",inputErrorMessage:"请输入20字以内快照名称"}).then(t=>Pe(this,[t],function*({value:e}){this.bigLoading=!0,setTimeout(()=>Pe(this,null,function*(){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(o=>{this.snapshot=o.data,this.snapshot.name=e,this.$refs.snapshot.show()}).catch(o=>{this.onOutdate(o.res)}).finally(o=>{this.bigLoading=!1})}),100)})).catch(()=>{qt({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(){fn({cId:"toggleFullScreen",c:"切换全屏"}),document.fullscreenElement?document.exitFullscreen&&document.exitFullscreen():document.getElementById("force-d3-container").requestFullscreen()},zoomView(e="in"){e==="in"?(fn({cId:"zoomIn",c:"zoomIn"}),this.$refs.render.zoomIn()):(fn({cId:"zoomOut",c:"zoomOut"}),this.$refs.render.zoomOut())},fitScreen(){var e;fn({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()}}},pze={class:"d3-container",id:"force-d3-container"},gze=["innerHTML"],mze=a.createElementVNode("div",{class:"top-line-bg"},null,-1),vze={class:"top-item"},yze={class:"top-line"},bze={key:1,class:"select-num"},_ze={class:"highlight"},wze={class:"loading-container"},Cze={class:"corner-button-box"};function Sze(e,t,n,r,o,s){const c=a.resolveComponent("ButtonList"),l=a.resolveComponent("RenderByCanvas"),d=a.resolveComponent("Loading"),u=tt,f=a.resolveComponent("Legend"),h=a.resolveComponent("force-graph-svg-icon"),p=rr,g=a.resolveComponent("RightMenu"),y=a.resolveComponent("SnapShotDialog"),_=zte;return a.withDirectives((a.openBlock(),a.createElementBlock("div",pze,[a.createElementVNode("div",{class:a.normalizeClass(["graph-box",{"hide-right-menu":!n.isShowRightMenu}])},[n.title?(a.openBlock(),a.createElementBlock("div",{key:0,class:"safe-force-title",innerHTML:n.title},null,8,gze)):a.createCommentVNode("",!0),mze,a.createElementVNode("div",vze,[a.createElementVNode("div",yze,[a.createVNode(c,{ref:"buttonList","hide-button-list":n.hideButtonList,selection:o.selection,history:o.history,"module-detail":o.moduleDetail,"request-graph-data":o.requestGraphData,onSaveSnapshot:s.saveSnapshot,onAddNodes:s.addNode,onAutoDisplay:s.autoDisplay,onDeleteNodes:s.deleteNodes,onFixNodes:s.fixAllNodes,onToggleLayout:s.toggleLayout,onImportCsvData:s.importCsvData},null,8,["hide-button-list","selection","history","module-detail","request-graph-data","onSaveSnapshot","onAddNodes","onAutoDisplay","onDeleteNodes","onFixNodes","onToggleLayout","onImportCsvData"])])]),a.createVNode(l,{ref:"render","module-detail":o.moduleDetail,history:o.history,"level-list":n.levelList,selection:o.selection,data:o.history.dataNow,"request-graph-data":o.requestGraphData,"dark-mode":n.darkMode,"node-type-scale":n.nodeTypeScale,"node-type-list":o.nodeTypeList,onUpdateSelection:s.updateSelection,onOnaction:s.onAction,onHandleSelectNode:s.handleSelectNode,onCustomContextmenuClick:s.handleCustomContextMenuClick},null,8,["module-detail","history","level-list","selection","data","request-graph-data","dark-mode","node-type-scale","node-type-list","onUpdateSelection","onOnaction","onHandleSelectNode","onCustomContextmenuClick"]),o.selection.length>0?(a.openBlock(),a.createElementBlock("p",bze,[a.createTextVNode(" 已选择"),a.createElementVNode("span",_ze,a.toDisplayString(o.selection.length),1),a.createTextVNode("项 ")])):a.createCommentVNode("",!0),a.withDirectives(a.createElementVNode("div",wze,[a.createElementVNode("span",null,a.toDisplayString(o.loadingInfo),1),a.createVNode(u,{class:"is-loading"},{default:a.withCtx(()=>[a.createVNode(d)]),_:1})],512),[[a.vShow,o.isLoading]]),a.createVNode(f,{"show-point":n.showPoint,history:o.history,"module-detail":o.moduleDetail,"has-level":n.hasLevel,showLevelCount:n.showLevelCount,margin:o.margin,onHighLight:s.handleHighLight},null,8,["show-point","history","module-detail","has-level","showLevelCount","margin","onHighLight"]),a.createElementVNode("div",Cze,[!o.fullScreen&&s.topFrame?(a.openBlock(),a.createBlock(p,{key:0,content:"进入全屏",placement:"left","popper-class":"el-tooltip-gray"},{default:a.withCtx(()=>[a.createVNode(h,{"icon-class":e.imgPath["./public/d3svg1/button18/full_button.svg"],alt:"",class:"corner-button",onClick:s.toggleFullScreen},null,8,["icon-class","onClick"])]),_:1})):a.createCommentVNode("",!0),o.fullScreen&&s.topFrame?(a.openBlock(),a.createBlock(p,{key:1,content:"退出全屏",placement:"left","popper-class":"el-tooltip-gray"},{default:a.withCtx(()=>[a.createVNode(h,{"icon-class":e.imgPath["./public/d3svg1/button18/un_full_button.svg"],alt:"",class:"corner-button",onClick:s.toggleFullScreen},null,8,["icon-class","onClick"])]),_:1})):a.createCommentVNode("",!0),a.createVNode(p,{content:"适应屏幕",placement:"left","popper-class":"el-tooltip-gray"},{default:a.withCtx(()=>[a.createVNode(h,{"icon-class":e.imgPath["./public/d3svg1/button18/fit_button.svg"],alt:"",class:"corner-button",onClick:s.fitScreen},null,8,["icon-class","onClick"])]),_:1}),a.createVNode(p,{content:"放大",placement:"left","popper-class":"el-tooltip-gray"},{default:a.withCtx(()=>[a.createVNode(h,{"icon-class":e.imgPath["./public/d3svg1/button18/zoom_in_button.svg"],alt:"",class:"corner-button",onClick:t[0]||(t[0]=w=>s.zoomView("in"))},null,8,["icon-class"])]),_:1}),a.createVNode(p,{content:"缩小",placement:"left","popper-class":"el-tooltip-gray"},{default:a.withCtx(()=>[a.createVNode(h,{"icon-class":e.imgPath["./public/d3svg1/button18/zoom_out_button.svg"],alt:"",class:"corner-button",onClick:t[1]||(t[1]=w=>s.zoomView("out"))},null,8,["icon-class"])]),_:1})])],2),n.isShowRightMenu?(a.openBlock(),a.createBlock(g,{key:0,"graph-data":o.history.dataNow,"selected-nodes":o.selection,"request-graph-data":o.requestGraphData,onChangeBox:s.handleTableSelect},null,8,["graph-data","selected-nodes","request-graph-data","onChangeBox"])):a.createCommentVNode("",!0),a.createVNode(y,{ref:"snapshot",snapshot:o.snapshot,"graph-api":n.graphApi,"graph-url-path":n.graphUrlPath},null,8,["snapshot","graph-api","graph-url-path"])])),[[_,o.bigLoading]])}const af=De(hze,[["render",Sze]]);af.install=function(e){e.component(af.name,af)},Lc.install=function(e){e.component(Lc.name,Lc)};const FKe="",xze=[af,Lc],Eze={install:function(e,t={}){xze.forEach(n=>{e.component(n.name,n)})}};Me.ForceGraphByCanvas=af,Me.RenderByCanvas=Lc,Me.default=Eze,Object.defineProperties(Me,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "vue-safe-force-graph",
3
- "version": "2.0.22",
3
+ "version": "2.0.24",
4
4
  "description": "force_graph in security area",
5
5
  "author": "jason zhang",
6
6
  "module": "./lib/vue-safe-force-graph.js",