vue-safe-force-graph 2.0.28 → 2.0.29

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.
@@ -22664,7 +22664,10 @@ const q0e = {
22664
22664
  return !e;
22665
22665
  },
22666
22666
  hasFoldIcon() {
22667
- return !this.isAggregation && this.relationDataList.some((e) => e.childList.length);
22667
+ return !this.isAggregation && this.relationDataList.some((e) => {
22668
+ var t;
22669
+ return (t = e.childList) == null ? void 0 : t.length;
22670
+ });
22668
22671
  }
22669
22672
  },
22670
22673
  watch: {
@@ -45094,7 +45097,7 @@ const bWe = /* @__PURE__ */ ot(RGe, [["render", yWe], ["__scopeId", "data-v-1e5e
45094
45097
  utime: "2019-05-06 15:08:10",
45095
45098
  children: []
45096
45099
  }
45097
- ], wWe = "vue-safe-force-graph", SWe = "2.0.28", CWe = "force_graph in security area", xWe = "jason zhang", EWe = "./lib/vue-safe-force-graph.js", TWe = "./lib/vue-safe-force-graph.umd.cjs", kWe = "module", AWe = [
45100
+ ], wWe = "vue-safe-force-graph", SWe = "2.0.29", CWe = "force_graph in security area", xWe = "jason zhang", EWe = "./lib/vue-safe-force-graph.js", TWe = "./lib/vue-safe-force-graph.umd.cjs", kWe = "module", AWe = [
45098
45101
  "/lib/"
45099
45102
  ], NWe = {
45100
45103
  ".": {
@@ -45493,8 +45496,8 @@ const Br = {}, jWe = {
45493
45496
  if (this.stage.setDraggable(!1), this.selectionRect && o.evt.altKey) {
45494
45497
  const s = this.selectionRect.x(), l = this.selectionRect.y(), a = this.selectionRect.width(), c = this.selectionRect.height();
45495
45498
  this.selection = this.nodes.filter((u) => {
45496
- const d = { x: u.x, y: u.y };
45497
- return d.x >= s && d.x <= s + a && d.y >= l && d.y <= l + c;
45499
+ const d = { x: u.x, y: u.y }, f = Math.min(s, s + a), h = Math.max(s, s + a), p = Math.min(l, l + c), v = Math.max(l, l + c);
45500
+ return d.x >= f && d.x <= h && d.y >= p && d.y <= v;
45498
45501
  }), this.updateSelection(), this.selectionRect.destroy(), this.selectionRect = null;
45499
45502
  }
45500
45503
  }), this.stage.on("contextmenu", this.handleGlobalContextMenu), this.stage.on("click", (o) => {
@@ -104,7 +104,7 @@
104
104
  *
105
105
  * Licensed MIT © Zeno Rocha
106
106
  */(function(e,t){(function(r,o){e.exports=o()})(rr,function(){return function(){var n={686:function(s,c,l){l.d(c,{default:function(){return Z}});var d=l(279),u=l.n(d),f=l(370),h=l.n(f),p=l(817),g=l.n(p);function y(J){try{return document.execCommand(J)}catch(te){return!1}}var b=function(te){var V=g()(te);return y("cut"),V},w=b;function C(J){var te=document.documentElement.getAttribute("dir")==="rtl",V=document.createElement("textarea");V.style.fontSize="12pt",V.style.border="0",V.style.padding="0",V.style.margin="0",V.style.position="absolute",V.style[te?"right":"left"]="-9999px";var le=window.pageYOffset||document.documentElement.scrollTop;return V.style.top="".concat(le,"px"),V.setAttribute("readonly",""),V.value=J,V}var E=function(te,V){var le=C(te);V.container.appendChild(le);var ae=g()(le);return y("copy"),le.remove(),ae},S=function(te){var V=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{container:document.body},le="";return typeof te=="string"?le=E(te,V):te instanceof HTMLInputElement&&!["text","search","url","tel","password"].includes(te==null?void 0:te.type)?le=E(te.value,V):(le=g()(te),y("copy")),le},x=S;function N(J){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?N=function(V){return typeof V}:N=function(V){return V&&typeof Symbol=="function"&&V.constructor===Symbol&&V!==Symbol.prototype?"symbol":typeof V},N(J)}var A=function(){var te=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},V=te.action,le=V===void 0?"copy":V,ae=te.container,M=te.target,K=te.text;if(le!=="copy"&&le!=="cut")throw new Error('Invalid "action" value, use either "copy" or "cut"');if(M!==void 0)if(M&&N(M)==="object"&&M.nodeType===1){if(le==="copy"&&M.hasAttribute("disabled"))throw new Error('Invalid "target" attribute. Please use "readonly" instead of "disabled" attribute');if(le==="cut"&&(M.hasAttribute("readonly")||M.hasAttribute("disabled")))throw new Error(`Invalid "target" attribute. You can't cut text from elements with "readonly" or "disabled" attributes`)}else throw new Error('Invalid "target" value, use a valid Element');if(K)return x(K,{container:ae});if(M)return le==="cut"?w(M):x(M,{container:ae})},O=A;function P(J){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?P=function(V){return typeof V}:P=function(V){return V&&typeof Symbol=="function"&&V.constructor===Symbol&&V!==Symbol.prototype?"symbol":typeof V},P(J)}function F(J,te){if(!(J instanceof te))throw new TypeError("Cannot call a class as a function")}function I(J,te){for(var V=0;V<te.length;V++){var le=te[V];le.enumerable=le.enumerable||!1,le.configurable=!0,"value"in le&&(le.writable=!0),Object.defineProperty(J,le.key,le)}}function U(J,te,V){return te&&I(J.prototype,te),V&&I(J,V),J}function D(J,te){if(typeof te!="function"&&te!==null)throw new TypeError("Super expression must either be null or a function");J.prototype=Object.create(te&&te.prototype,{constructor:{value:J,writable:!0,configurable:!0}}),te&&j(J,te)}function j(J,te){return j=Object.setPrototypeOf||function(le,ae){return le.__proto__=ae,le},j(J,te)}function W(J){var te=z();return function(){var le=H(J),ae;if(te){var M=H(this).constructor;ae=Reflect.construct(le,arguments,M)}else ae=le.apply(this,arguments);return X(this,ae)}}function X(J,te){return te&&(P(te)==="object"||typeof te=="function")?te:q(J)}function q(J){if(J===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return J}function z(){if(typeof Reflect=="undefined"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch(J){return!1}}function H(J){return H=Object.setPrototypeOf?Object.getPrototypeOf:function(V){return V.__proto__||Object.getPrototypeOf(V)},H(J)}function G(J,te){var V="data-clipboard-".concat(J);if(te.hasAttribute(V))return te.getAttribute(V)}var B=function(J){D(V,J);var te=W(V);function V(le,ae){var M;return F(this,V),M=te.call(this),M.resolveOptions(ae),M.listenClick(le),M}return U(V,[{key:"resolveOptions",value:function(){var ae=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.action=typeof ae.action=="function"?ae.action:this.defaultAction,this.target=typeof ae.target=="function"?ae.target:this.defaultTarget,this.text=typeof ae.text=="function"?ae.text:this.defaultText,this.container=P(ae.container)==="object"?ae.container:document.body}},{key:"listenClick",value:function(ae){var M=this;this.listener=h()(ae,"click",function(K){return M.onClick(K)})}},{key:"onClick",value:function(ae){var M=ae.delegateTarget||ae.currentTarget,K=this.action(M)||"copy",ie=O({action:K,container:this.container,target:this.target(M),text:this.text(M)});this.emit(ie?"success":"error",{action:K,text:ie,trigger:M,clearSelection:function(){M&&M.focus(),window.getSelection().removeAllRanges()}})}},{key:"defaultAction",value:function(ae){return G("action",ae)}},{key:"defaultTarget",value:function(ae){var M=G("target",ae);if(M)return document.querySelector(M)}},{key:"defaultText",value:function(ae){return G("text",ae)}},{key:"destroy",value:function(){this.listener.destroy()}}],[{key:"copy",value:function(ae){var M=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{container:document.body};return x(ae,M)}},{key:"cut",value:function(ae){return w(ae)}},{key:"isSupported",value:function(){var ae=arguments.length>0&&arguments[0]!==void 0?arguments[0]:["copy","cut"],M=typeof ae=="string"?[ae]:ae,K=!!document.queryCommandSupported;return M.forEach(function(ie){K=K&&!!document.queryCommandSupported(ie)}),K}}]),V}(u()),Z=B},828:function(s){var c=9;if(typeof Element!="undefined"&&!Element.prototype.matches){var l=Element.prototype;l.matches=l.matchesSelector||l.mozMatchesSelector||l.msMatchesSelector||l.oMatchesSelector||l.webkitMatchesSelector}function d(u,f){for(;u&&u.nodeType!==c;){if(typeof u.matches=="function"&&u.matches(f))return u;u=u.parentNode}}s.exports=d},438:function(s,c,l){var d=l(828);function u(p,g,y,b,w){var C=h.apply(this,arguments);return p.addEventListener(y,C,w),{destroy:function(){p.removeEventListener(y,C,w)}}}function f(p,g,y,b,w){return typeof p.addEventListener=="function"?u.apply(null,arguments):typeof y=="function"?u.bind(null,document).apply(null,arguments):(typeof p=="string"&&(p=document.querySelectorAll(p)),Array.prototype.map.call(p,function(C){return u(C,g,y,b,w)}))}function h(p,g,y,b){return function(w){w.delegateTarget=d(w.target,g),w.delegateTarget&&b.call(p,w)}}s.exports=f},879:function(s,c){c.node=function(l){return l!==void 0&&l instanceof HTMLElement&&l.nodeType===1},c.nodeList=function(l){var d=Object.prototype.toString.call(l);return l!==void 0&&(d==="[object NodeList]"||d==="[object HTMLCollection]")&&"length"in l&&(l.length===0||c.node(l[0]))},c.string=function(l){return typeof l=="string"||l instanceof String},c.fn=function(l){var d=Object.prototype.toString.call(l);return d==="[object Function]"}},370:function(s,c,l){var d=l(879),u=l(438);function f(y,b,w){if(!y&&!b&&!w)throw new Error("Missing required arguments");if(!d.string(b))throw new TypeError("Second argument must be a String");if(!d.fn(w))throw new TypeError("Third argument must be a Function");if(d.node(y))return h(y,b,w);if(d.nodeList(y))return p(y,b,w);if(d.string(y))return g(y,b,w);throw new TypeError("First argument must be a String, HTMLElement, HTMLCollection, or NodeList")}function h(y,b,w){return y.addEventListener(b,w),{destroy:function(){y.removeEventListener(b,w)}}}function p(y,b,w){return Array.prototype.forEach.call(y,function(C){C.addEventListener(b,w)}),{destroy:function(){Array.prototype.forEach.call(y,function(C){C.removeEventListener(b,w)})}}}function g(y,b,w){return u(document.body,y,b,w)}s.exports=f},817:function(s){function c(l){var d;if(l.nodeName==="SELECT")l.focus(),d=l.value;else if(l.nodeName==="INPUT"||l.nodeName==="TEXTAREA"){var u=l.hasAttribute("readonly");u||l.setAttribute("readonly",""),l.select(),l.setSelectionRange(0,l.value.length),u||l.removeAttribute("readonly"),d=l.value}else{l.hasAttribute("contenteditable")&&l.focus();var f=window.getSelection(),h=document.createRange();h.selectNodeContents(l),f.removeAllRanges(),f.addRange(h),d=f.toString()}return d}s.exports=c},279:function(s){function c(){}c.prototype={on:function(l,d,u){var f=this.e||(this.e={});return(f[l]||(f[l]=[])).push({fn:d,ctx:u}),this},once:function(l,d,u){var f=this;function h(){f.off(l,h),d.apply(u,arguments)}return h._=d,this.on(l,h,u)},emit:function(l){var d=[].slice.call(arguments,1),u=((this.e||(this.e={}))[l]||[]).slice(),f=0,h=u.length;for(f;f<h;f++)u[f].fn.apply(u[f].ctx,d);return this},off:function(l,d){var u=this.e||(this.e={}),f=u[l],h=[];if(f&&d)for(var p=0,g=f.length;p<g;p++)f[p].fn!==d&&f[p].fn._!==d&&h.push(f[p]);return h.length?u[l]=h:delete u[l],this}},s.exports=c,s.exports.TinyEmitter=c}},r={};function o(s){if(r[s])return r[s].exports;var c=r[s]={exports:{}};return n[s](c,c.exports,o),c.exports}return function(){o.n=function(s){var c=s&&s.__esModule?function(){return s.default}:function(){return s};return o.d(c,{a:c}),c}}(),function(){o.d=function(s,c){for(var l in c)o.o(c,l)&&!o.o(s,l)&&Object.defineProperty(s,l,{enumerable:!0,get:c[l]})}}(),function(){o.o=function(s,c){return Object.prototype.hasOwnProperty.call(s,c)}}(),o(686)}().default})})(ile);const ole=b7(F2),Xh=e=>{const t=(e==null?void 0:e.appendToBody)===void 0?!0:e.appendToBody;return{toClipboard(n,r){return new Promise((o,s)=>{const c=document.createElement("button"),l=new ole(c,{text:()=>n,action:()=>"copy",container:r!==void 0?r:document.body});l.on("success",d=>{l.destroy(),o(d)}),l.on("error",d=>{l.destroy(),s(d)}),t&&document.body.appendChild(c),c.click(),t&&document.body.removeChild(c)})}}},BWe="",{toClipboard:ale}=Xh(),sle={name:"NodeDetail",components:{QuestionFilled:jw,ForceGraphSvgIcon:Ia,domainSvg:Ah,svgBase:Th,aggregationSvg:Oh,familySvg:Ph,ipSvg:Ih,md5Svg:Rh,orgSvg:Mh,urlSvg:$h,reportSvg:Fh,thumbprint_md5Svg:Dh,emailSvg:zh,cert_md5Svg:jh,cert_httpsSvg:Uh,vulSvg:qh,midSvg:Bh,macSvg:Lh},mixins:[oi],inject:["hasLevel","history","moduleDetail","levelMap"],props:{data:{type:Object,default:()=>({type:"domain",id:"deftsecurity.com",detail:{},name:"deftsecurity.com",fieldMap:{},index:0,fx:null,fy:null})},selectedNodes:{required:!1,type:Array,default:()=>[]},requestGraphData:{type:Boolean,default:!1}},emits:["buttonClick"],data(){return{controls:[],childNodesLength:0,current:null,flagFiles:{},valueDetail:!0,aggregationName:null,childList:null,moduleDetailNow:{}}},computed:{module(){return this.moduleDetail()},fieldMapThisType(){var e;return this.moduleDetailNow&&this.moduleDetailNow.detail_field_map&&this.moduleDetailNow.detail_field_map[`${(e=this.data)==null?void 0:e.type}_detail_info`]},levelClassName(){return this.data&&this.data.type==="family"?"":Kh(this.data.detail&&this.data.detail.info.basic.level,this.levelMap)},aggregationList(){var e,t;return(t=(e=this.data)==null?void 0:e.list)==null?void 0:t.map(n=>n.name)},canGoDetail(){return["nodeType","aggregation","family","org","report","vul","thumbprint_md5","email","cert_https"].indexOf(this.data.type)<0&&this.hasLevel},canGoUrl(){var e,t,n;return((t=(e=this.moduleDetailNow)==null?void 0:e.config)==null?void 0:t.jumpDetail)&&((n=this.moduleDetailNow)==null?void 0:n.config.jumpRule[this.data.type])}},watch:{data:{deep:!0,immediate:!0,handler:function(){var t,n;const e=[];if(this.selectedNodes.length>1)this.selectedNodes.length<6&&e.push(Ase),e.push(AS),e.push(Nse),e.push(this.data.collect?TS:NS),e.push(this.data.textProp==="name"?xse:Sse),e.push(this.data.fx?L2:B2),e.push(M2),this.data.label&&e.push(this.data.textProp==="label"?Ese:kse);else if(this.selectedNodes.length===1&&this.selectedNodes[0].type==="aggregation"){const r=this.history.dataNow.links.some(o=>o.source.id===this.data.id&&o.target.type==="aggregation");e.push(r||this.data.type==="aggregation"?kS:ES),e.push(this.data.fx?L2:B2),e.push(M2)}else{const r=this.history.dataNow.links.some(u=>u.source.id===this.data.id&&u.target.type==="aggregation"),o=this.history.dataNow.links.filter(u=>u.source.id===this.data.id),s=this.history.dataNow.links.filter(u=>u.target.id===this.data.id),c=o.map(u=>u.target),l=s.map(u=>u.source),d=c.some(u=>{let f=0;return this.history.dataNow.links.map(h=>{h.source.id===u.id&&f++}),f===0});this.data.type!=="aggregation"&&this.data.type!=="nodeType"?(e.push(AS),e.push(this.data.collect?TS:NS),c.length===1&&e.push(OS),l.length===1&&e.push(PS)):(c.length>0&&e.push(OS),l.length>0&&e.push(PS)),e.push(this.data.fx?L2:B2),r||this.data.type==="aggregation"?e.push(kS):d&&e.push(ES),e.push(Tse),e.push(M2)}this.controls=e,this.flage=!(((n=(t=this.data)==null?void 0:t.name)==null?void 0:n.length)>52)}},module:{deep:!0,immediate:!0,handler(e){this.moduleDetailNow=e}}},created(){Ro(Ke,"flagIcon",e=>{this.flagFiles={},e!==void 0&&(this.flagFiles=e)})},mounted(){Ro(Ke,"relationNum",e=>{var t;(e==null?void 0:e.childList)!==void 0&&(this.childNodesLength=(t=e.childList)==null?void 0:t.length,this.aggregationName=e.name,this.childList=e.childList)})},updated(){},beforeUnmount(){Bo(Ke,"flagIcon"),Bo(Ke,"relationNum")},methods:{isSomething(e){return P2(e)},hover(e){this.current=e},out(){this.current=null},handleButtonClick(e){un({cId:"rightMenu-"+e.name,c:"右侧菜单-"+e.namec}),this.selectedNodes.length>1?be(Ke,"buttonClick",{nodes:[...this.selectedNodes],api:e}):this.data.type!=="nodeType"?be(Ke,"buttonClick",{nodes:[...this.selectedNodes],api:e}):be(Ke,"buttonClick",{nodes:[...this.selectedNodes],api:e})},copyText(e){un({cId:"copyText",c:"复制"}),ale(e).then(t=>qt({message:"复制成功",type:"success"}),t=>qt.error("复制失败"))},goDetailUrl(e,t){var n,r;return(this.selectedNodes[0].type==="cert_https"||this.selectedNodes[0].type==="thumbprint_md5")&&["md5","sha1","sha256"].indexOf(e)>=0?"/cert/cert:"+t:((r=(n=this.moduleDetailNow)==null?void 0:n.config)!=null&&r.jumpDetail,!1)},getViewBox(e,t){const n=[];switch(e){case"org":n.push(47,54);break;case"family":n.push(38,38);break;case"vul":n.push(38,38);break;default:n.push(28,28)}return t===3?n[0]:n[1]},changeValue(){this.valueDetail=!this.valueDetail},changeFlag(e){return e.detail.info.basic.flag===""&&(e.detail.info.basic.flag="ip"),e.detail.info.basic.flag},cutName(e=""){let t=0;for(let n=0;n<e.length;n++)escape(e[n]).indexOf("%u")>=0?t+=2:t+=1;return t<60?e:(e==null?void 0:e.split("").splice(0,56).join(""))+"..."},canShowField(e){const t=this.hasFieldValue(e);return!(t===void 0||e.hide_empty&&!t)},hasFieldValue(e){const t=this.data.detail&&this.data.detail.info&&this.data.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.data.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},getUsageTypeContent(e){if(!e)return"";const t={COM:"Commercial(商业企业)",ORG:"Organization(社会团体)",GOV:"Government(政府部门)",MIL:"Military(军事机构)",EDU:"University/College/School(教育机构)",LIB:"Library(科研机构)",CDN:"Content Delivery Network(内容分发网络)",ISP:"Fixed Line ISP(固网服务商)",MOB:"Mobile ISP(移动网服务商)",DCH:"Data Center/Web Hosting/Transit(数据中心)",SES:"Search Engine Spider(搜索引擎爬虫)",RSV:"Reserved(保留地址)"};return t[e]?t[e]:""},formatTags(e){return Hh(Gh(e))}}},lle={class:"node-detail-block"},cle={class:"node-preview"},dle={class:"left"},ule={class:"icon-group"},fle=["src"],hle=["src"],ple=["src"],gle={key:4,class:"md5-type"},mle=["src"],vle=["title"],yle={class:"right"},ble=["title"],_le={class:"title-top"},wle={key:0,class:"node-num"},Cle={class:"opt-btns"},Sle={key:0,class:"node-num"},xle={class:"opt-btns"},Ele={class:"node-field-list"},kle={key:0,class:"row-item row-item-tag"},Nle=a.createElementVNode("div",{class:"label"},"标签:",-1),Tle={class:"value"},Ale={class:"graph-tags-box"},Ole=a.createElementVNode("br",null,null,-1),Ple={key:0,class:"row-item"},Ile={class:"label"},Rle=["title"],Ble={class:"detail"},Lle=["title"],Mle=["title"],$le={key:1,class:"select-mults"},Fle={class:"title-top"},Dle={class:"node-num"},zle={class:"controls-box"},jle=["onMouseenter"];function Ule(e,t,n,r,o,s){const c=a.resolveComponent("svgBase"),l=nr,d=yd,u=a.resolveComponent("QuestionFilled"),f=tt,h=a.resolveComponent("force-graph-svg-icon");return a.openBlock(),a.createElementBlock("div",lle,[n.selectedNodes.length===1?(a.openBlock(),a.createElementBlock(a.Fragment,{key:0},[a.createElementVNode("div",cle,[a.createElementVNode("div",dle,[a.createElementVNode("div",ule,[n.data.type!=="nodeType"&&n.data.type!=="aggregation"&&s.hasLevel?(a.openBlock(),a.createBlock(c,{key:0,"view-box3":s.getViewBox(n.data.type,3),"view-box4":s.getViewBox(n.data.type,4),class:a.normalizeClass(n.data.type),width:34,height:34},{default:a.withCtx(()=>[(a.openBlock(),a.createBlock(a.resolveDynamicComponent(n.data.type+"Svg"),{class:a.normalizeClass(["node-name-svg",s.canGoDetail?n.data.type+" "+s.levelClassName:""])},null,8,["class"]))]),_:1},8,["view-box3","view-box4","class"])):n.data.type!=="nodeType"&&n.data.type!=="aggregation"?(a.openBlock(),a.createElementBlock("img",{key:1,src:e.imgPath["./public/d3svg1/"+n.data.type+".svg"]||e.imgPath["./public/d3svg1/node.svg"],alt:""},null,8,fle)):n.data.type==="aggregation"?(a.openBlock(),a.createElementBlock("img",{key:2,src:e.imgPath["./public/d3svg1/aggregation.svg"],alt:""},null,8,hle)):(a.openBlock(),a.createElementBlock("img",{key:3,src:e.imgPath["./public/d3svg1/"+n.data.icon+".svg"]||e.imgPath["./public/d3svg1/node_type.svg"],alt:""},null,8,ple)),n.data.type==="md5"?(a.openBlock(),a.createElementBlock("p",gle,a.toDisplayString(n.data.detail&&n.data.detail.info.basic.file_type.toUpperCase()||"MD5"),1)):a.createCommentVNode("",!0),n.data.type==="ip"&&n.data.detail&&n.data.detail.info!==null?(a.openBlock(),a.createElementBlock("img",{key:5,class:"ip-type",src:e.imgPath["./public/d3svg1/flags/"+s.changeFlag(n.data)+".png"],alt:""},null,8,mle)):a.createCommentVNode("",!0)]),s.canGoDetail&&n.data.detail&&n.data.detail.info.basic.level?(a.openBlock(),a.createElementBlock("div",{key:0,class:a.normalizeClass(["level-text",s.levelClassName]),title:n.data.detail&&n.data.detail.info.basic.level},a.toDisplayString(n.data.detail&&n.data.detail.info.basic.level),11,vle)):a.createCommentVNode("",!0)]),a.createElementVNode("div",yle,[a.createElementVNode("div",{class:a.normalizeClass(["id-box",n.data.type==="nodeType"||n.data.type==="aggregation"?"id-box2":""]),title:n.data.name},[a.createElementVNode("h3",_le,[s.canGoUrl?(a.openBlock(),a.createElementBlock(a.Fragment,{key:0},[a.createElementVNode("span",{class:"go-result",onClick:t[0]||(t[0]=p=>s.handleButtonClick({name:"go_result",namec:"详情页查看",type:2}))},[a.createTextVNode(a.toDisplayString(s.cutName(n.data.name==="聚合"?"聚合节点":n.data.name))+" ",1),n.data.type==="nodeType"||n.data.type==="aggregation"?(a.openBlock(),a.createElementBlock("span",wle,a.toDisplayString(o.childNodesLength),1)):a.createCommentVNode("",!0)]),a.createElementVNode("span",Cle,[a.createVNode(l,{content:"复制","popper-class":"el-tooltip-gray"},{default:a.withCtx(()=>[a.createElementVNode("img",{src:"https://s7.qhres2.com/static/d42d48bb495c87dc.svg",class:"id-copy",onClick:t[1]||(t[1]=a.withModifiers(p=>s.copyText(n.data.name),["prevent"]))})]),_:1})])],64)):(a.openBlock(),a.createElementBlock(a.Fragment,{key:1},[a.createTextVNode(a.toDisplayString(s.cutName(n.data.name==="聚合"?"聚合节点":n.data.name))+" ",1),n.data.type==="nodeType"||n.data.type==="aggregation"?(a.openBlock(),a.createElementBlock("span",Sle,a.toDisplayString(o.childNodesLength),1)):a.createCommentVNode("",!0),a.createElementVNode("span",xle,[a.createVNode(l,{content:"复制","popper-class":"el-tooltip-gray"},{default:a.withCtx(()=>[a.createElementVNode("img",{src:"https://s7.qhres2.com/static/d42d48bb495c87dc.svg",class:"id-copy",onClick:t[2]||(t[2]=p=>s.copyText(n.data.name))})]),_:1})])],64))])],10,ble)])]),a.createElementVNode("div",Ele,[n.data.detail&&n.data.detail.tags&&n.data.detail.tags.length>0?(a.openBlock(),a.createElementBlock("div",kle,[Nle,a.createElementVNode("div",Tle,[a.createElementVNode("div",Ale,[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(s.formatTags(n.data.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},[Ole,a.createTextVNode(" 标签状态:失效 ")],64)):a.createCommentVNode("",!0)])]),default:a.withCtx(()=>[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",Ple,[a.createElementVNode("div",Ile,a.toDisplayString(p.zh)+":",1),a.createElementVNode("div",{class:a.normalizeClass(["value",{virus:p.prop==="virus_name"}]),title:n.data.detail.info.basic[g]},[a.createElementVNode("p",Ble,[Array.isArray(n.data.detail.info.basic[p.prop])?(a.openBlock(),a.createElementBlock("span",{key:0,class:"item",title:n.data.detail.info.basic[g]},a.toDisplayString(s.getFieldValue(p)),9,Lle)):(a.openBlock(),a.createElementBlock("span",{key:1,class:a.normalizeClass(["item",{desc:p.show_all}]),title:n.data.detail.info.basic[g]},[a.createTextVNode(a.toDisplayString(s.getFieldValue(p))+" ",1),p.zh==="应用类型"&&s.getUsageTypeContent(n.data.detail.info.basic[p.prop])?(a.openBlock(),a.createBlock(l,{key:0,content:s.getUsageTypeContent(n.data.detail.info.basic[p.prop]),placement:"bottom","popper-class":"el-tooltip-gray"},{default:a.withCtx(()=>[a.createVNode(f,null,{default:a.withCtx(()=>[a.createVNode(u)]),_:1})]),_:2},1032,["content"])):a.createCommentVNode("",!0)],10,Mle))])],10,Rle)])):a.createCommentVNode("",!0)],64))),256))])],64)):n.selectedNodes.length>1?(a.openBlock(),a.createElementBlock("div",$le,[a.createElementVNode("h3",Fle,[a.createTextVNode(" 选中节点"),a.createElementVNode("span",Dle,a.toDisplayString(n.selectedNodes.length),1)])])):a.createCommentVNode("",!0),a.withDirectives(a.createElementVNode("div",zle,[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(o.controls,(p,g)=>(a.openBlock(),a.createElementBlock("div",{key:g,class:"image-list",onMouseenter:y=>s.hover(g),onMouseleave:t[3]||(t[3]=y=>s.out())},[a.createVNode(l,{content:p.namec,"popper-class":"el-tooltip-gray"},{default:a.withCtx(()=>[a.createVNode(h,{class:a.normalizeClass(["button-img",n.requestGraphData?o.controls.length>9?"button-img-more ":"":"disabled"]),"icon-class":e.imgPath["./public/d3svg1/button22/button_"+p.name+".svg"],onClick:y=>s.handleButtonClick(p)},null,8,["icon-class","class","onClick"])]),_:2},1032,["content"])],40,jle))),128))],512),[[a.vShow,o.controls.length>0]])])}const qle=De(sle,[["render",Ule]]),LWe="",D2={name:"fix_nodes",namec:"固定节点",type:2},z2={name:"un_fix_nodes",namec:"解除固定",type:2},IS={name:"all_fix_nodes",namec:"全部固定节点",type:2},RS={name:"all_un_fix_nodes",namec:"全部解除固定",type:2},j2={name:"show_names",namec:"显示名称",type:2},U2={name:"un_show_names",namec:"隐藏名称",type:2},q2={name:"un_show_label",namec:"隐藏备注",type:2},H2={name:"show_label",namec:"显示备注",type:2},BS={name:"all_show_names",namec:"全部显示名称",type:2},LS={name:"all_un_show_names",namec:"全部隐藏名称",type:2},MS={name:"all_un_show_label",namec:"全部隐藏备注",type:2},$S={name:"all_show_label",namec:"全部显示备注",type:2},FS={name:"undo",namec:"撤销",type:2},DS={name:"redo",namec:"恢复",type:2},zS={name:"single_edge_select",namec:"单边子顶点选择",type:2},jS={name:"hold_aggregation",namec:"单边子顶点聚合",type:2},US={name:"release_aggregation",namec:"聚合顶点释放",type:2},G2={name:"copy",namec:"复制",type:2,shortcut:"Ctrl+c"},W2={name:"node_star",namec:"收藏",type:2},K2={name:"un_node_star",namec:"取消收藏",type:2},Y2={name:"edit_label",namec:"修改备注",type:2},qS={name:"expand_node",namec:"完整展开",type:2},HS={name:"expand_part_node",namec:"部分展开",type:2},GS={name:"go_result",namec:"详情页查看",type:2},Hle={name:"show_group",namec:"分组显示",type:2},Gle={name:"hide_group",namec:"隐藏分组",type:2},X2={name:"delete_node",namec:"删除",type:2,shortcut:"Delete"},Wle=Object.freeze(Object.defineProperty({__proto__:null,allFixNodes:IS,allShowLabel:$S,allShowNames:BS,allUnFixNodes:RS,allUnShowLabel:MS,allUnShowNames:LS,copy:G2,deleteNode:X2,editLabel:Y2,expandNode:qS,expandPartNode:HS,fixNodes:D2,goResult:GS,hideGroup:Gle,holdAggregation:jS,nodeStar:W2,redo:DS,releaseAggregation:US,showGroup:Hle,showLabel:H2,showNames:j2,singleEdgeSelect:zS,unFixNodes:z2,unNodeStar:K2,unShowLabel:q2,unShowNames:U2,undo:FS},Symbol.toStringTag,{value:"Module"})),WS={org:[47,54],family:[38,38],vul:[38,38],default:[28,28]},MWe="",Kle={name:"SelectSingle",components:{ForceGraphSvgIcon:Ia,svgBase:Th,domainSvg:Ah,aggregationSvg:Oh,familySvg:Ph,ipSvg:Ih,md5Svg:Rh,midSvg:Bh,macSvg:Lh,orgSvg:Mh,urlSvg:$h,reportSvg:Fh,thumbprint_md5Svg:Dh,emailSvg:zh,cert_md5Svg:jh,cert_httpsSvg:Uh,vulSvg:qh},mixins:[oi],inject:["levelMap"],props:{filterData:{type:Object,required:!0},uniqueKey:{required:!0,type:Number},value:{required:!1,type:Boolean,default:!1},rootNode:{required:!0,type:Object},isMoreSelect:{required:!1,type:Boolean,default:!1},isRelation:{required:!1,type:Boolean,default:!1},isAggregation:{required:!1,type:Boolean,default:!1},flagDiv:{required:!0,type:Number},isCombineData:{required:!1,type:Boolean,default:!1}},emits:["flagIcon","toggle-fold","toggle-eye","show-detail","relation-click","update:value"],data(){return{getClassNameByLevel:Kh,data:null,nodeKey:0,disable:!1,flagIcon:{def:0},dangerNodeNum:0}},computed:{hasParentNode(){return this.data.parentNode&&this.data.parentNode.type!==void 0},isShowFirstLevel(){return(this.rootNode.type==="nodeType"||!this.isRelation||this.data.isExtentNode)&&!this.isMoreSelect&&!this.isAggregation&&this.data.parentNode&&this.data.parentNode.type!==void 0}},watch:{filterData:{handler(e,t){this.data=e},deep:!0,immediate:!0},uniqueKey:{deep:!0,handler(e,t){this.nodeKey=e}},"data.childList":{handler(){setTimeout(()=>{this.dangerNodeNum=this.calculateDangerNodeNum(this.data.childList)},0)},deep:!0,immediate:!0}},mounted(){},beforeUpdate(){this.$arrRefs&&(this.$arrRefs={})},methods:{getIcon(e){e.detail.info.basic.flag===""?(e.detail.info.basic.flag="ip",Ld(this.imgPath["./public/d3svg1/flags/ip.png"]).then(t=>{this.flagIcon[e]=t})):Ld(this.imgPath[`./public/d3svg1/flags/${e}.png`]).then(t=>{this.flagIcon[e]=t}),be(Ke,"flagIcon",this.flagIcon)},getViewBox(e,t){const n=WS[e]||WS.default;return t===3?n[0]:n[1]},canShow(e,t){return!!(e.show&&t.show)},canGoDetail(e){return["family","org","report","vul","thumbprint_md5","email","cert_https"].indexOf(e.type)<0},handleToggleFold(e){be(this,"toggle-fold",e)},handleToggleEye(e,t,n){be(this,"toggle-eye",e,t,n)},handleShowDetail(e,t){be(this,"show-detail",e,t)},calculateDangerNodeNum(e){let t=[];return e&&e.length>0&&(t=e.filter(n=>{var r;if(n.detail&&n.detail.info.basic.level)return((r=this.levelMap[n.detail.info.basic.level])==null?void 0:r.dangerNumber)>0})),t.length},handleRelationClick(e){be(this,"relation-click",e)},formatTags(e){return Hh(Gh(e))},getRefSetter(e){return t=>{!this.$arrRefs&&(this.$arrRefs={}),!this.$arrRefs[e]&&(this.$arrRefs[e]=[]),t&&this.$arrRefs[e].push(t)}}}},Yle={key:0,class:"row-item row-parent"},Xle={class:"left"},Jle={key:0,class:"image-icon"},Qle=["src"],Zle=["src"],Vle={key:3,class:"md5-type"},ece={class:"mid"},tce=["title","textContent"],nce={class:"left"},rce=["src"],ice={class:"mid"},oce={class:"text-name"},ace={key:0,class:"count-wrapper"},sce={key:0,class:"num-wrapper"},lce={class:"num"},cce={key:1,class:"count-wrapper"},dce={key:0,class:"num-wrapper"},uce={class:"num"},fce={class:"right"},hce={key:0,class:"extent-icon"},pce={class:"left"},gce=["src"],mce=["getIcon","src"],vce={key:3,class:"md5-type"},yce={class:"mid"},bce=["onClick","textContent"],_ce={key:0,class:"detail-box"},wce={key:0,class:"segment"},Cce={key:1,class:"graph-tags-box"},Sce={class:"right"},xce=["onClick"];function Ece(e,t,n,r,o,s){const c=a.resolveComponent("svgBase"),l=a.resolveComponent("force-graph-svg-icon"),d=nr,u=yd;return a.openBlock(),a.createElementBlock("div",{class:a.normalizeClass(["relation-item-single",{"aggregation-item":n.isAggregation}])},[a.createElementVNode("div",{class:a.normalizeClass([{"has-parent":s.isShowFirstLevel},"line-icon-relation"])},null,2),s.isShowFirstLevel?(a.openBlock(),a.createElementBlock("div",Yle,[a.createElementVNode("div",Xle,[s.hasParentNode?(a.openBlock(),a.createElementBlock("div",Jle,[o.data.parentNode.type!=="nodeType"?(a.openBlock(),a.createBlock(c,{key:0,"view-box3":s.getViewBox(o.data.parentNode.type,3),"view-box4":s.getViewBox(o.data.parentNode.type,4),class:a.normalizeClass(["svgBase",`svgBase-${o.data.parentNode.type}`])},{default:a.withCtx(()=>[(a.openBlock(),a.createBlock(a.resolveDynamicComponent(o.data.parentNode.type+"Svg"),{class:a.normalizeClass(o.data.parentNode.type+" "+o.getClassNameByLevel(o.data.parentNode.level,s.levelMap))},null,8,["class"]))]),_:1},8,["view-box3","view-box4","class"])):n.isAggregation?(a.openBlock(),a.createElementBlock("img",{key:1,src:e.imgPath["./public/d3svg1/aggregation.svg"],alt:""},null,8,Qle)):a.createCommentVNode("",!0),o.data.parentNode.type==="ip"&&o.data.parentNode.detail!==null&&o.data.parentNode.detail.info!==null&&o.data.parentNode.detail.info.basic!==null?(a.openBlock(),a.createElementBlock("img",{key:2,class:"image-ip-child",src:e.imgPath["./public/d3svg1/flags/"+o.data.parentNode.detail.info.basic.flag+".png"],alt:""},null,8,Zle)):a.createCommentVNode("",!0),o.data.parentNode.type==="md5"?(a.openBlock(),a.createElementBlock("p",Vle,a.toDisplayString(o.data.parentNode.detail&&o.data.parentNode.detail.info.basic.file_type.toUpperCase()||"MD5"),1)):a.createCommentVNode("",!0)])):a.createCommentVNode("",!0)]),a.createElementVNode("div",ece,[a.createElementVNode("div",{class:"text-name",title:o.data.parentNode&&o.data.parentNode.name,textContent:a.toDisplayString(o.data.parentNode&&o.data.parentNode.name)},null,8,tce)])])):a.createCommentVNode("",!0),a.createElementVNode("div",{class:a.normalizeClass(["row-item row-nodetype",{"extent-nodetype":o.data.isExtentNode&&!n.isCombineData,"extent-data":o.data.isExtentNode&&o.data.hasExtention,"extent-disabled":o.data.noExtentNode}])},[a.createElementVNode("div",nce,[!n.isAggregation&&o.data.childList.length>0?(a.openBlock(),a.createElementBlock("div",{key:0,class:a.normalizeClass(["image-icon-down",n.rootNode.type!=="nodeType"&&n.isRelation?"icon-left":""]),style:a.normalizeStyle({transform:o.data.showChild?"":"rotate(450deg)"}),onClick:t[0]||(t[0]=f=>s.handleToggleFold(o.data))},[a.createVNode(l,{"icon-class":e.imgPath["./public/d3svg1/jiantou.svg"],alt:""},null,8,["icon-class"])],6)):a.createCommentVNode("",!0),(a.openBlock(),a.createElementBlock("div",{key:n.value,class:"image-icon"},[a.createElementVNode("img",{src:e.imgPath["./public/d3svg1/"+o.data.icon+".svg"]||e.imgPath["./public/d3svg1/node_type.svg"],alt:""},null,8,rce)]))]),a.createElementVNode("div",ice,[a.createElementVNode("div",oce,[a.createTextVNode(a.toDisplayString(o.data.name==="聚合"?"相似同源样本":o.data.name)+" ",1),o.data.isExtentNode&&o.data.hasExtention?(a.openBlock(),a.createElementBlock("span",ace,[o.dangerNodeNum?(a.openBlock(),a.createElementBlock("span",sce,[a.createElementVNode("span",lce,a.toDisplayString(o.dangerNodeNum),1),a.createTextVNode("/")])):a.createCommentVNode("",!0),a.createTextVNode(a.toDisplayString(o.data.childList.length),1)])):a.createCommentVNode("",!0),(o.data.type==="nodeType"||n.isAggregation)&&!o.data.isExtentNode?(a.openBlock(),a.createElementBlock("span",cce,[o.dangerNodeNum?(a.openBlock(),a.createElementBlock("span",dce,[a.createElementVNode("span",uce,a.toDisplayString(o.dangerNodeNum),1),a.createTextVNode("/")])):a.createCommentVNode("",!0),a.createTextVNode(a.toDisplayString(o.data.childList.length),1)])):a.createCommentVNode("",!0)])]),a.createElementVNode("div",fce,[o.data.isExtentNode?(a.openBlock(),a.createElementBlock("div",hce,[!o.data.hasExtention||o.data.hasExtention&&o.data.childList.length===0?(a.openBlock(),a.createBlock(d,{key:0,content:"拓线","popper-class":"el-tooltip-gray",placement:"left"},{default:a.withCtx(()=>[a.createVNode(l,{class:"button-img","icon-class":e.imgPath["./public/d3svg1/button22/button_select_all.svg"],onClick:t[1]||(t[1]=f=>s.handleRelationClick(o.data))},null,8,["icon-class"])]),_:1})):(a.openBlock(),a.createBlock(d,{key:1,content:o.data.show?"显示":"隐藏","popper-class":"el-tooltip-gray",placement:"left"},{default:a.withCtx(()=>[a.createVNode(l,{class:"button-img","icon-class":o.data.show?e.imgPath["./public/d3svg1/button22/button_eye_open.svg"]:e.imgPath["./public/d3svg1/button22/button_eye_close.svg"]},null,8,["icon-class"])]),_:1},8,["content"]))])):n.isAggregation?a.createCommentVNode("",!0):(a.openBlock(),a.createElementBlock("div",{key:1,class:"right-icon",onClick:t[2]||(t[2]=f=>s.handleToggleEye(f,o.data,o.data.parentNode))},[a.createVNode(d,{content:o.data.show?"显示":"隐藏","popper-class":"el-tooltip-gray",placement:"left"},{default:a.withCtx(()=>[a.createVNode(l,{class:"button-img","icon-class":o.data.show?e.imgPath["./public/d3svg1/button22/button_eye_open.svg"]:e.imgPath["./public/d3svg1/button22/button_eye_close.svg"]},null,8,["icon-class"])]),_:1},8,["content"])]))])],2),o.data.showChild?a.createCommentVNode("",!0):(a.openBlock(!0),a.createElementBlock(a.Fragment,{key:1},a.renderList(o.data.childList,(f,h)=>(a.openBlock(),a.createElementBlock("div",{key:"info2"+h,class:"row-item row-child"},[a.createElementVNode("div",pce,[a.createElementVNode("div",{class:a.normalizeClass(["image-icon",{"image-icom-left":n.rootNode.type==="nodeType"&&n.isRelation}])},[f.type!=="nodeType"||f.type!=="aggregation"?(a.openBlock(),a.createBlock(c,{key:0,"view-box3":s.getViewBox(f.type,3),"view-box4":s.getViewBox(f.type,4),class:a.normalizeClass(["svgBase",f.type])},{default:a.withCtx(()=>[(a.openBlock(),a.createBlock(a.resolveDynamicComponent(f.type+"Svg"),{class:a.normalizeClass(s.canShow(f,o.data)?f.type+" "+o.getClassNameByLevel(f.level,s.levelMap):f.type+" unselect-color-ip")},null,8,["class"]))]),_:2},1032,["view-box3","view-box4","class"])):f.type==="aggregation"?(a.openBlock(),a.createElementBlock("img",{key:1,src:e.imgPath["./public/d3svg1/aggregation.svg"],alt:""},null,8,gce)):a.createCommentVNode("",!0),f.type==="ip"&&f.detail!==null&&f.detail.info!==null&&f.detail.info.basic!==null?(a.openBlock(),a.createElementBlock("img",{key:2,class:"image-ip-child",getIcon:s.getIcon(f),src:e.imgPath["./public/d3svg1/flags/"+f.detail.info.basic.flag+".png"],alt:""},null,8,mce)):a.createCommentVNode("",!0),f.type==="md5"?(a.openBlock(),a.createElementBlock("p",vce,a.toDisplayString(f.detail&&f.detail.info.basic.file_type.toUpperCase()||"MD5"),1)):a.createCommentVNode("",!0)],2)]),a.createElementVNode("div",yce,[a.createVNode(d,{ref_for:!0,ref:"tooltip",disabled:o.disable,content:f.name,placement:"top","open-delay":400,"popper-class":"el-tooltip-gray"},{default:a.withCtx(()=>[a.createElementVNode("div",{class:a.normalizeClass(["text-name",s.canShow(f,o.data)?"":"unselect-color"]),onClick:p=>s.handleShowDetail(f,s.canShow(f,o.data)),textContent:a.toDisplayString(f.name)},null,10,bce)]),_:2},1032,["disabled","content"]),f.detail&&f.detail.brief!==null?(a.openBlock(),a.createElementBlock("div",_ce,[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(f.detail.brief,(p,g)=>(a.openBlock(),a.createBlock(d,{key:g,disabled:!!s.canGoDetail(f),content:p,placement:"top","popper-class":"el-tooltip-gray"},{default:a.withCtx(()=>[a.createElementVNode("div",{class:a.normalizeClass([s.canShow(f,o.data)?"":"unselect-color","text"])},[a.createTextVNode(a.toDisplayString(p)+" ",1),g!==f.detail.brief.length-1?(a.openBlock(),a.createElementBlock("span",wce,"|")):a.createCommentVNode("",!0)],2)]),_:2},1032,["disabled","content"]))),128))])):a.createCommentVNode("",!0),f.detail&&f.detail.tags&&f.detail.tags.length>0?(a.openBlock(),a.createElementBlock("div",Cce,[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(s.formatTags(f.detail.tags),(p,g)=>(a.openBlock(),a.createBlock(d,{ref_for:!0,ref:s.getRefSetter("tooltip"),key:g,"open-delay":400,disabled:f.type!=="md5",content:p.desc||p.name,"popper-class":"el-tooltip-gray"},{default:a.withCtx(()=>[a.createVNode(u,{class:a.normalizeClass(["graph-tag-one",p.type||"unknown"]),type:p.type||"info"},{default:a.withCtx(()=>[a.createTextVNode(a.toDisplayString(p.name),1)]),_:2},1032,["class","type"])]),_:2},1032,["disabled","content"]))),128))])):a.createCommentVNode("",!0)]),a.createElementVNode("div",Sce,[n.isAggregation?a.createCommentVNode("",!0):(a.openBlock(),a.createElementBlock("div",{key:0,class:"right-icon",onClick:p=>s.handleToggleEye(p,f,o.data)},[a.createVNode(d,{content:o.data.show?"显示":"隐藏","popper-class":"el-tooltip-gray",placement:"left"},{default:a.withCtx(()=>[a.createVNode(l,{class:"button-img","icon-class":s.canShow(f,o.data)?e.imgPath["./public/d3svg1/button22/button_eye_open.svg"]:e.imgPath["./public/d3svg1/button22/button_eye_close.svg"]},null,8,["icon-class"])]),_:2},1032,["content"])],8,xce))])]))),128))],2)}const kce=De(Kle,[["render",Ece],["__scopeId","data-v-ad4af8b5"]]),$We="",Nce={name:"SelectMults",components:{svgBase:Th,domainSvg:Ah,aggregationSvg:Oh,familySvg:Ph,ipSvg:Ih,md5Svg:Rh,midSvg:Bh,macSvg:Lh,orgSvg:Mh,urlSvg:$h,reportSvg:Fh,thumbprint_md5Svg:Dh,emailSvg:zh,cert_md5Svg:jh,cert_httpsSvg:Uh,vulSvg:qh},mixins:[oi],inject:["levelMap"],props:{filterData:{type:Object,required:!0},rootNode:{required:!0,type:Object},isMoreSelect:{required:!1,type:Boolean,default:!1},isRelation:{required:!1,type:Boolean,default:!1}},emits:["flagIcon","show-detail"],data(){return{data:null,disable:!1}},watch:{filterData:{handler(e,t){this.data=e},deep:!0,immediate:!0}},mounted(){},methods:{classNow(e){return Kh(e,this.levelMap)},getIcon(e){e.detail.info.basic.flag===""?(e.detail.info.basic.flag="ip",Ld(this.imgPath["./public/d3svg1/flags/ip.png"]).then(t=>{this.flagIcon[e]=t})):Ld(this.imgPath[`./public/d3svg1/flags/${e}.png`]).then(t=>{this.flagIcon[e]=t}),be(Ke,"flagIcon",this.flagIcon)},getViewBox(e,t){const n=[];switch(e){case"org":n.push(47,54);break;case"family":n.push(38,38);break;case"vul":n.push(38,38);break;default:n.push(28,28)}return t===3?n[0]:n[1]},canGoDetail(e){return["family","org","report","vul","thumbprint_md5","email","cert_https"].indexOf(e.type)<0},handleShowDetail(e,t){be(this,"show-detail",e,t)},formatTags(e){return Hh(Gh(e))}}},Tce={class:"relation-item-mults"},Ace={class:"row-item"},Oce={class:"left"},Pce={class:"grid-content bg-purple"},Ice={class:"image-icon"},Rce=["src"],Bce=["getIcon","src"],Lce={key:3,class:"md5-type"},Mce={class:"mid"},$ce={class:"grid-content bg-purple"},Fce=["textContent"],Dce={key:0,class:"detail-box"},zce={class:"text"},jce={key:0,class:"segment"},Uce={class:"graph-tags-box"};function qce(e,t,n,r,o,s){const c=a.resolveComponent("svgBase"),l=nr,d=yd;return a.openBlock(),a.createElementBlock("div",Tce,[a.createElementVNode("div",Ace,[a.createElementVNode("div",Oce,[a.createElementVNode("div",Pce,[a.createElementVNode("div",Ice,[o.data.type!=="nodeType"||o.data.type!=="aggregation"?(a.openBlock(),a.createBlock(c,{key:0,"view-box3":s.getViewBox(o.data.type,3),"view-box4":s.getViewBox(o.data.type,4),class:a.normalizeClass(["svgBase",`svgBase-${o.data.type}`])},{default:a.withCtx(()=>[(a.openBlock(),a.createBlock(a.resolveDynamicComponent(o.data.type+"Svg"),{class:a.normalizeClass(o.data.type+" "+s.classNow(o.data.level))},null,8,["class"]))]),_:1},8,["view-box3","view-box4","class"])):o.data.type==="aggregation"?(a.openBlock(),a.createElementBlock("img",{key:1,src:e.imgPath["./public/d3svg1/aggregation.svg"],alt:""},null,8,Rce)):a.createCommentVNode("",!0),o.data.type==="ip"&&o.data.detail!==null&&o.data.detail.info!==null?(a.openBlock(),a.createElementBlock("img",{key:2,class:"image-ip-child",getIcon:s.getIcon(o.data),src:e.imgPath["./public/d3svg1/flags/"+o.data.detail.info.basic.flag+".png"],alt:""},null,8,Bce)):a.createCommentVNode("",!0),o.data.type==="md5"?(a.openBlock(),a.createElementBlock("p",Lce,a.toDisplayString(o.data.detail&&o.data.detail.info.basic.file_type.toUpperCase()||"MD5"),1)):a.createCommentVNode("",!0)])])]),a.createElementVNode("div",Mce,[a.createElementVNode("div",$ce,[a.createVNode(l,{ref:"tooltip",disabled:o.disable,"open-delay":400,content:o.data.name,placement:"top","popper-class":"el-tooltip-gray"},{default:a.withCtx(()=>[a.createElementVNode("div",{class:"text-name text-more-select",onClick:t[0]||(t[0]=u=>s.handleShowDetail(o.data,!0)),textContent:a.toDisplayString(o.data.name)},null,8,Fce)]),_:1},8,["disabled","content"]),o.data.detail&&o.data.detail.brief!==null?(a.openBlock(),a.createElementBlock("div",Dce,[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(o.data.detail.brief,(u,f)=>(a.openBlock(),a.createBlock(l,{key:f,disabled:!!s.canGoDetail(o.data),content:u,placement:"top","popper-class":"el-tooltip-gray"},{default:a.withCtx(()=>[a.createElementVNode("div",zce,[a.createTextVNode(a.toDisplayString(u),1),f!==o.data.detail.brief.length-1?(a.openBlock(),a.createElementBlock("span",jce,"|")):a.createCommentVNode("",!0)])]),_:2},1032,["disabled","content"]))),128))])):a.createCommentVNode("",!0),a.withDirectives(a.createElementVNode("div",Uce,[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(s.formatTags(o.data.detail&&o.data.detail.tags),(u,f)=>(a.openBlock(),a.createBlock(l,{key:f,disabled:o.data.type!=="md5",content:u.desc||u.name,"popper-class":"el-tooltip-gray"},{default:a.withCtx(()=>[a.createVNode(d,{class:a.normalizeClass(["graph-tag-one",u.type||"unknown"]),type:u.type||"info"},{default:a.withCtx(()=>[a.createTextVNode(a.toDisplayString(u.name),1)]),_:2},1032,["class","type"])]),_:2},1032,["disabled","content"]))),128))],512),[[a.vShow,o.data.detail&&o.data.detail.tags&&o.data.detail.tags.length>0]])])])])])}const Hce=De(Nce,[["render",qce],["__scopeId","data-v-0d972009"]]);function Gce(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}var Md=Gce,Wce=typeof rr=="object"&&rr&&rr.Object===Object&&rr,KS=Wce,Kce=KS,Yce=typeof self=="object"&&self&&self.Object===Object&&self,Xce=Kce||Yce||Function("return this")(),ai=Xce,Jce=ai,Qce=Jce.Symbol,J2=Qce,YS=J2,XS=Object.prototype,Zce=XS.hasOwnProperty,Vce=XS.toString,$d=YS?YS.toStringTag:void 0;function ede(e){var t=Zce.call(e,$d),n=e[$d];try{e[$d]=void 0;var r=!0}catch(s){}var o=Vce.call(e);return r&&(t?e[$d]=n:delete e[$d]),o}var tde=ede,nde=Object.prototype,rde=nde.toString;function ide(e){return rde.call(e)}var ode=ide,JS=J2,ade=tde,sde=ode,lde="[object Null]",cde="[object Undefined]",QS=JS?JS.toStringTag:void 0;function dde(e){return e==null?e===void 0?cde:lde:QS&&QS in Object(e)?ade(e):sde(e)}var Jh=dde;function ude(e){return e!=null&&typeof e=="object"}var Fd=ude;function fde(){var e=window.navigator.userAgent,t=e.indexOf("MSIE ");if(t>0)return parseInt(e.substring(t+5,e.indexOf(".",t)),10);var n=e.indexOf("Trident/");if(n>0){var r=e.indexOf("rv:");return parseInt(e.substring(r+3,e.indexOf(".",r)),10)}var o=e.indexOf("Edge/");return o>0?parseInt(e.substring(o+5,e.indexOf(".",o)),10):-1}let Qh;function Q2(){Q2.init||(Q2.init=!0,Qh=fde()!==-1)}var Zh={name:"ResizeObserver",props:{emitOnMount:{type:Boolean,default:!1},ignoreWidth:{type:Boolean,default:!1},ignoreHeight:{type:Boolean,default:!1}},emits:["notify"],mounted(){Q2(),a.nextTick(()=>{this._w=this.$el.offsetWidth,this._h=this.$el.offsetHeight,this.emitOnMount&&this.emitSize()});const e=document.createElement("object");this._resizeObject=e,e.setAttribute("aria-hidden","true"),e.setAttribute("tabindex",-1),e.onload=this.addResizeHandlers,e.type="text/html",Qh&&this.$el.appendChild(e),e.data="about:blank",Qh||this.$el.appendChild(e)},beforeUnmount(){this.removeResizeHandlers()},methods:{compareAndNotify(){(!this.ignoreWidth&&this._w!==this.$el.offsetWidth||!this.ignoreHeight&&this._h!==this.$el.offsetHeight)&&(this._w=this.$el.offsetWidth,this._h=this.$el.offsetHeight,this.emitSize())},emitSize(){this.$emit("notify",{width:this._w,height:this._h})},addResizeHandlers(){this._resizeObject.contentDocument.defaultView.addEventListener("resize",this.compareAndNotify),this.compareAndNotify()},removeResizeHandlers(){this._resizeObject&&this._resizeObject.onload&&(!Qh&&this._resizeObject.contentDocument&&this._resizeObject.contentDocument.defaultView.removeEventListener("resize",this.compareAndNotify),this.$el.removeChild(this._resizeObject),this._resizeObject.onload=null,this._resizeObject=null)}}};const hde=a.withScopeId("data-v-b329ee4c");a.pushScopeId("data-v-b329ee4c");const pde={class:"resize-observer",tabindex:"-1"};a.popScopeId();const gde=hde((e,t,n,r,o,s)=>(a.openBlock(),a.createBlock("div",pde)));Zh.render=gde,Zh.__scopeId="data-v-b329ee4c",Zh.__file="src/components/ResizeObserver.vue";function Vh(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Vh=function(t){return typeof t}:Vh=function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Vh(e)}function mde(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function ZS(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function vde(e,t,n){return t&&ZS(e.prototype,t),n&&ZS(e,n),e}function VS(e){return yde(e)||bde(e)||_de(e)||wde()}function yde(e){if(Array.isArray(e))return Z2(e)}function bde(e){if(typeof Symbol!="undefined"&&Symbol.iterator in Object(e))return Array.from(e)}function _de(e,t){if(e){if(typeof e=="string")return Z2(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Z2(e,t)}}function Z2(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function wde(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
107
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Cde(e){var t;return typeof e=="function"?t={callback:e}:t=e,t}function Sde(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},r,o,s,c=function(d){for(var u=arguments.length,f=new Array(u>1?u-1:0),h=1;h<u;h++)f[h-1]=arguments[h];if(s=f,!(r&&d===o)){var p=n.leading;typeof p=="function"&&(p=p(d,o)),(!r||d!==o)&&p&&e.apply(void 0,[d].concat(VS(s))),o=d,clearTimeout(r),r=setTimeout(function(){e.apply(void 0,[d].concat(VS(s))),r=0},t)}};return c._clear=function(){clearTimeout(r),r=null},c}function ex(e,t){if(e===t)return!0;if(Vh(e)==="object"){for(var n in e)if(!ex(e[n],t[n]))return!1;return!0}return!1}var xde=function(){function e(t,n,r){mde(this,e),this.el=t,this.observer=null,this.frozen=!1,this.createObserver(n,r)}return vde(e,[{key:"createObserver",value:function(n,r){var o=this;if(this.observer&&this.destroyObserver(),!this.frozen){if(this.options=Cde(n),this.callback=function(l,d){o.options.callback(l,d),l&&o.options.once&&(o.frozen=!0,o.destroyObserver())},this.callback&&this.options.throttle){var s=this.options.throttleOptions||{},c=s.leading;this.callback=Sde(this.callback,this.options.throttle,{leading:function(d){return c==="both"||c==="visible"&&d||c==="hidden"&&!d}})}this.oldResult=void 0,this.observer=new IntersectionObserver(function(l){var d=l[0];if(l.length>1){var u=l.find(function(h){return h.isIntersecting});u&&(d=u)}if(o.callback){var f=d.isIntersecting&&d.intersectionRatio>=o.threshold;if(f===o.oldResult)return;o.oldResult=f,o.callback(f,d)}},this.options.intersection),a.nextTick(function(){o.observer&&o.observer.observe(o.el)})}}},{key:"destroyObserver",value:function(){this.observer&&(this.observer.disconnect(),this.observer=null),this.callback&&this.callback._clear&&(this.callback._clear(),this.callback=null)}},{key:"threshold",get:function(){return this.options.intersection&&typeof this.options.intersection.threshold=="number"?this.options.intersection.threshold:0}}]),e}();function tx(e,t,n){var r=t.value;if(r)if(typeof IntersectionObserver=="undefined")console.warn("[vue-observe-visibility] IntersectionObserver API is not available in your browser. Please install this polyfill: https://github.com/w3c/IntersectionObserver/tree/master/polyfill");else{var o=new xde(e,r,n);e._vue_visibilityState=o}}function Ede(e,t,n){var r=t.value,o=t.oldValue;if(!ex(r,o)){var s=e._vue_visibilityState;if(!r){nx(e);return}s?s.createObserver(r,n):tx(e,{value:r},n)}}function nx(e){var t=e._vue_visibilityState;t&&(t.destroyObserver(),delete e._vue_visibilityState)}var kde={beforeMount:tx,updated:Ede,unmounted:nx};function Nde(e){return{all:e=e||new Map,on:function(t,n){var r=e.get(t);r&&r.push(n)||e.set(t,[n])},off:function(t,n){var r=e.get(t);r&&r.splice(r.indexOf(n)>>>0,1)},emit:function(t,n){(e.get(t)||[]).slice().map(function(r){r(n)}),(e.get("*")||[]).slice().map(function(r){r(t,n)})}}}var Tde={itemsLimit:1e3},Ade=/(auto|scroll)/;function rx(e,t){return e.parentNode===null?t:rx(e.parentNode,t.concat([e]))}var V2=function(t,n){return getComputedStyle(t,null).getPropertyValue(n)},Ode=function(t){return V2(t,"overflow")+V2(t,"overflow-y")+V2(t,"overflow-x")},Pde=function(t){return Ade.test(Ode(t))};function ix(e){if(e instanceof HTMLElement||e instanceof SVGElement){for(var t=rx(e.parentNode,[]),n=0;n<t.length;n+=1)if(Pde(t[n]))return t[n];return document.scrollingElement||document.documentElement}}function ey(e){return ey=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ey(e)}var ox={items:{type:Array,required:!0},keyField:{type:String,default:"id"},direction:{type:String,default:"vertical",validator:function(t){return["vertical","horizontal"].includes(t)}},listTag:{type:String,default:"div"},itemTag:{type:String,default:"div"}};function ax(){return this.items.length&&ey(this.items[0])!=="object"}var ty=!1;if(typeof window!="undefined"){ty=!1;try{var Ide=Object.defineProperty({},"passive",{get:function(){ty=!0}});window.addEventListener("test",null,Ide)}catch(e){}}let Rde=0;var ny={name:"RecycleScroller",components:{ResizeObserver:Zh},directives:{ObserveVisibility:kde},props:de(oe({},ox),{itemSize:{type:Number,default:null},gridItems:{type:Number,default:void 0},itemSecondarySize:{type:Number,default:void 0},minItemSize:{type:[Number,String],default:null},sizeField:{type:String,default:"size"},typeField:{type:String,default:"type"},buffer:{type:Number,default:200},pageMode:{type:Boolean,default:!1},prerender:{type:Number,default:0},emitUpdate:{type:Boolean,default:!1},updateInterval:{type:Number,default:0},skipHover:{type:Boolean,default:!1},listTag:{type:String,default:"div"},itemTag:{type:String,default:"div"},listClass:{type:[String,Object,Array],default:""},itemClass:{type:[String,Object,Array],default:""}}),emits:["resize","visible","hidden","update","scroll-start","scroll-end"],data(){return{pool:[],totalSize:0,ready:!1,hoverKey:null}},computed:{sizes(){if(this.itemSize===null){const e={"-1":{accumulator:0}},t=this.items,n=this.sizeField,r=this.minItemSize;let o=1e4,s=0,c;for(let l=0,d=t.length;l<d;l++)c=t[l][n]||r,c<o&&(o=c),s+=c,e[l]={accumulator:s,size:c};return this.$_computedMinItemSize=o,e}return[]},simpleArray:ax,itemIndexByKey(){const{keyField:e,items:t}=this,n={};for(let r=0,o=t.length;r<o;r++)n[t[r][e]]=r;return n}},watch:{items(){this.updateVisibleItems(!0)},pageMode(){this.applyPageMode(),this.updateVisibleItems(!1)},sizes:{handler(){this.updateVisibleItems(!1)},deep:!0},gridItems(){this.updateVisibleItems(!0)},itemSecondarySize(){this.updateVisibleItems(!0)}},created(){this.$_startIndex=0,this.$_endIndex=0,this.$_views=new Map,this.$_unusedViews=new Map,this.$_scrollDirty=!1,this.$_lastUpdateScrollPosition=0,this.prerender&&(this.$_prerender=!0,this.updateVisibleItems(!1)),this.gridItems&&!this.itemSize&&console.error("[vue-recycle-scroller] You must provide an itemSize when using gridItems")},mounted(){this.applyPageMode(),this.$nextTick(()=>{this.$_prerender=!1,this.updateVisibleItems(!0),this.ready=!0})},activated(){const e=this.$_lastUpdateScrollPosition;typeof e=="number"&&this.$nextTick(()=>{this.scrollToPosition(e)})},beforeUnmount(){this.removeListeners()},methods:{addView(e,t,n,r,o){const s=a.markRaw({id:Rde++,index:t,used:!0,key:r,type:o}),c=a.shallowReactive({item:n,position:0,nr:s});return e.push(c),c},unuseView(e,t=!1){const n=this.$_unusedViews,r=e.nr.type;let o=n.get(r);o||(o=[],n.set(r,o)),o.push(e),t||(e.nr.used=!1,e.position=-9999)},handleResize(){this.$emit("resize"),this.ready&&this.updateVisibleItems(!1)},handleScroll(e){if(!this.$_scrollDirty){if(this.$_scrollDirty=!0,this.$_updateTimeout)return;const t=()=>requestAnimationFrame(()=>{this.$_scrollDirty=!1;const{continuous:n}=this.updateVisibleItems(!1,!0);n||(clearTimeout(this.$_refreshTimout),this.$_refreshTimout=setTimeout(this.handleScroll,this.updateInterval+100))});t(),this.updateInterval&&(this.$_updateTimeout=setTimeout(()=>{this.$_updateTimeout=0,this.$_scrollDirty&&t()},this.updateInterval))}},handleVisibilityChange(e,t){this.ready&&(e||t.boundingClientRect.width!==0||t.boundingClientRect.height!==0?(this.$emit("visible"),requestAnimationFrame(()=>{this.updateVisibleItems(!1)})):this.$emit("hidden"))},updateVisibleItems(e,t=!1){const n=this.itemSize,r=this.gridItems||1,o=this.itemSecondarySize||n,s=this.$_computedMinItemSize,c=this.typeField,l=this.simpleArray?null:this.keyField,d=this.items,u=d.length,f=this.sizes,h=this.$_views,p=this.$_unusedViews,g=this.pool,y=this.itemIndexByKey;let b,w,C,E,S;if(!u)b=w=E=S=C=0;else if(this.$_prerender)b=E=0,w=S=Math.min(this.prerender,d.length),C=null;else{const I=this.getScroll();if(t){let j=I.start-this.$_lastUpdateScrollPosition;if(j<0&&(j=-j),n===null&&j<s||j<n)return{continuous:!0}}this.$_lastUpdateScrollPosition=I.start;const U=this.buffer;I.start-=U,I.end+=U;let D=0;if(this.$refs.before&&(D=this.$refs.before.scrollHeight,I.start-=D),this.$refs.after){const j=this.$refs.after.scrollHeight;I.end+=j}if(n===null){let j,W=0,X=u-1,q=~~(u/2),z;do z=q,j=f[q].accumulator,j<I.start?W=q:q<u-1&&f[q+1].accumulator>I.start&&(X=q),q=~~((W+X)/2);while(q!==z);for(q<0&&(q=0),b=q,C=f[u-1].accumulator,w=q;w<u&&f[w].accumulator<I.end;w++);for(w===-1?w=d.length-1:(w++,w>u&&(w=u)),E=b;E<u&&D+f[E].accumulator<I.start;E++);for(S=E;S<u&&D+f[S].accumulator<I.end;S++);}else{b=~~(I.start/n*r);const j=b%r;b-=j,w=Math.ceil(I.end/n*r),E=Math.max(0,Math.floor((I.start-D)/n*r)),S=Math.floor((I.end-D)/n*r),b<0&&(b=0),w>u&&(w=u),E<0&&(E=0),S>u&&(S=u),C=Math.ceil(u/r)*n}}w-b>Tde.itemsLimit&&this.itemsLimitError(),this.totalSize=C;let x;const N=b<=this.$_endIndex&&w>=this.$_startIndex;if(N)for(let I=0,U=g.length;I<U;I++)x=g[I],x.nr.used&&(e&&(x.nr.index=y[x.item[l]]),(x.nr.index==null||x.nr.index<b||x.nr.index>=w)&&this.unuseView(x));const A=N?null:new Map;let O,P,F;for(let I=b;I<w;I++){O=d[I];const U=l?O[l]:O;if(U==null)throw new Error(`Key is ${U} on item (keyField is '${l}')`);if(x=h.get(U),!n&&!f[I].size){x&&this.unuseView(x);continue}P=O[c];let D=p.get(P),j=!1;if(!x)N?D&&D.length?x=D.pop():x=this.addView(g,I,O,U,P):(F=A.get(P)||0,(!D||F>=D.length)&&(x=this.addView(g,I,O,U,P),this.unuseView(x,!0),D=p.get(P)),x=D[F],A.set(P,F+1)),h.delete(x.nr.key),x.nr.used=!0,x.nr.index=I,x.nr.key=U,x.nr.type=P,h.set(U,x),j=!0;else if(!x.nr.used&&(x.nr.used=!0,j=!0,D)){const W=D.indexOf(x);W!==-1&&D.splice(W,1)}x.item=O,j&&(I===d.length-1&&this.$emit("scroll-end"),I===0&&this.$emit("scroll-start")),n===null?(x.position=f[I-1].accumulator,x.offset=0):(x.position=Math.floor(I/r)*n,x.offset=I%r*o)}return this.$_startIndex=b,this.$_endIndex=w,this.emitUpdate&&this.$emit("update",b,w,E,S),clearTimeout(this.$_sortTimer),this.$_sortTimer=setTimeout(this.sortViews,this.updateInterval+300),{continuous:N}},getListenerTarget(){let e=ix(this.$el);return window.document&&(e===window.document.documentElement||e===window.document.body)&&(e=window),e},getScroll(){const{$el:e,direction:t}=this,n=t==="vertical";let r;if(this.pageMode){const o=e.getBoundingClientRect(),s=n?o.height:o.width;let c=-(n?o.top:o.left),l=n?window.innerHeight:window.innerWidth;c<0&&(l+=c,c=0),c+l>s&&(l=s-c),r={start:c,end:c+l}}else n?r={start:e.scrollTop,end:e.scrollTop+e.clientHeight}:r={start:e.scrollLeft,end:e.scrollLeft+e.clientWidth};return r},applyPageMode(){this.pageMode?this.addListeners():this.removeListeners()},addListeners(){this.listenerTarget=this.getListenerTarget(),this.listenerTarget.addEventListener("scroll",this.handleScroll,ty?{passive:!0}:!1),this.listenerTarget.addEventListener("resize",this.handleResize)},removeListeners(){this.listenerTarget&&(this.listenerTarget.removeEventListener("scroll",this.handleScroll),this.listenerTarget.removeEventListener("resize",this.handleResize),this.listenerTarget=null)},scrollToItem(e){let t;const n=this.gridItems||1;this.itemSize===null?t=e>0?this.sizes[e-1].accumulator:0:t=Math.floor(e/n)*this.itemSize,this.scrollToPosition(t)},scrollToPosition(e){const t=this.direction==="vertical"?{scroll:"scrollTop",start:"top"}:{scroll:"scrollLeft",start:"left"};let n,r,o;if(this.pageMode){const s=ix(this.$el),c=s.tagName==="HTML"?0:s[t.scroll],l=s.getBoundingClientRect(),u=this.$el.getBoundingClientRect()[t.start]-l[t.start];n=s,r=t.scroll,o=e+c+u}else n=this.$el,r=t.scroll,o=e;n[r]=o},itemsLimitError(){throw setTimeout(()=>{console.log("It seems the scroller element isn't scrolling, so it tries to render all the items at once.","Scroller:",this.$el),console.log("Make sure the scroller has a fixed height (or width) and 'overflow-y' (or 'overflow-x') set to 'auto' so it can scroll correctly and only render the items visible in the scroll viewport.")}),new Error("Rendered items limit reached")},sortViews(){this.pool.sort((e,t)=>e.nr.index-t.nr.index)}}};const Bde={key:0,ref:"before",class:"vue-recycle-scroller__slot"},Lde={key:1,ref:"after",class:"vue-recycle-scroller__slot"};function Mde(e,t,n,r,o,s){const c=a.resolveComponent("ResizeObserver"),l=a.resolveDirective("observe-visibility");return a.withDirectives((a.openBlock(),a.createElementBlock("div",{class:a.normalizeClass(["vue-recycle-scroller",{ready:o.ready,"page-mode":n.pageMode,[`direction-${e.direction}`]:!0}]),onScrollPassive:t[0]||(t[0]=(...d)=>s.handleScroll&&s.handleScroll(...d))},[e.$slots.before?(a.openBlock(),a.createElementBlock("div",Bde,[a.renderSlot(e.$slots,"before")],512)):a.createCommentVNode("v-if",!0),(a.openBlock(),a.createBlock(a.resolveDynamicComponent(n.listTag),{ref:"wrapper",style:a.normalizeStyle({[e.direction==="vertical"?"minHeight":"minWidth"]:o.totalSize+"px"}),class:a.normalizeClass(["vue-recycle-scroller__item-wrapper",n.listClass])},{default:a.withCtx(()=>[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(o.pool,d=>(a.openBlock(),a.createBlock(a.resolveDynamicComponent(n.itemTag),a.mergeProps({key:d.nr.id,style:o.ready?{transform:`translate${e.direction==="vertical"?"Y":"X"}(${d.position}px) translate${e.direction==="vertical"?"X":"Y"}(${d.offset}px)`,width:n.gridItems?`${e.direction==="vertical"&&n.itemSecondarySize||n.itemSize}px`:void 0,height:n.gridItems?`${e.direction==="horizontal"&&n.itemSecondarySize||n.itemSize}px`:void 0}:null,class:["vue-recycle-scroller__item-view",[n.itemClass,{hover:!n.skipHover&&o.hoverKey===d.nr.key}]]},a.toHandlers(n.skipHover?{}:{mouseenter:()=>{o.hoverKey=d.nr.key},mouseleave:()=>{o.hoverKey=null}})),{default:a.withCtx(()=>[a.renderSlot(e.$slots,"default",{item:d.item,index:d.nr.index,active:d.nr.used})]),_:2},1040,["style","class"]))),128)),a.renderSlot(e.$slots,"empty")]),_:3},8,["style","class"])),e.$slots.after?(a.openBlock(),a.createElementBlock("div",Lde,[a.renderSlot(e.$slots,"after")],512)):a.createCommentVNode("v-if",!0),a.createVNode(c,{onNotify:s.handleResize},null,8,["onNotify"])],34)),[[l,s.handleVisibilityChange]])}ny.render=Mde,ny.__file="src/components/RecycleScroller.vue";var ry={name:"DynamicScroller",components:{RecycleScroller:ny},provide(){return typeof ResizeObserver!="undefined"&&(this.$_resizeObserver=new ResizeObserver(e=>{requestAnimationFrame(()=>{if(Array.isArray(e)){for(const t of e)if(t.target&&t.target.$_vs_onResize){let n,r;if(t.borderBoxSize){const o=t.borderBoxSize[0];n=o.inlineSize,r=o.blockSize}else n=t.contentRect.width,r=t.contentRect.height;t.target.$_vs_onResize(t.target.$_vs_id,n,r)}}})})),{vscrollData:this.vscrollData,vscrollParent:this,vscrollResizeObserver:this.$_resizeObserver}},inheritAttrs:!1,props:de(oe({},ox),{minItemSize:{type:[Number,String],required:!0}}),emits:["resize","visible"],data(){return{vscrollData:{active:!0,sizes:{},keyField:this.keyField,simpleArray:!1}}},computed:{simpleArray:ax,itemsWithSize(){const e=[],{items:t,keyField:n,simpleArray:r}=this,o=this.vscrollData.sizes,s=t.length;for(let c=0;c<s;c++){const l=t[c],d=r?c:l[n];let u=o[d];typeof u=="undefined"&&!this.$_undefinedMap[d]&&(u=0),e.push({item:l,id:d,size:u})}return e}},watch:{items(){this.forceUpdate()},simpleArray:{handler(e){this.vscrollData.simpleArray=e},immediate:!0},direction(e){this.forceUpdate(!0)},itemsWithSize(e,t){const n=this.$el.scrollTop;let r=0,o=0;const s=Math.min(e.length,t.length);for(let l=0;l<s&&!(r>=n);l++)r+=t[l].size||this.minItemSize,o+=e[l].size||this.minItemSize;const c=o-r;c!==0&&(this.$el.scrollTop+=c)}},beforeCreate(){this.$_updates=[],this.$_undefinedSizes=0,this.$_undefinedMap={},this.$_events=Nde()},activated(){this.vscrollData.active=!0},deactivated(){this.vscrollData.active=!1},unmounted(){this.$_events.all.clear()},methods:{onScrollerResize(){this.$refs.scroller&&this.forceUpdate(),this.$emit("resize")},onScrollerVisible(){this.$_events.emit("vscroll:update",{force:!1}),this.$emit("visible")},forceUpdate(e=!1){(e||this.simpleArray)&&(this.vscrollData.sizes={}),this.$_events.emit("vscroll:update",{force:!0})},scrollToItem(e){const t=this.$refs.scroller;t&&t.scrollToItem(e)},getItemSize(e,t=void 0){const n=this.simpleArray?t!=null?t:this.items.indexOf(e):e[this.keyField];return this.vscrollData.sizes[n]||0},scrollToBottom(){if(this.$_scrollingToBottom)return;this.$_scrollingToBottom=!0;const e=this.$el;this.$nextTick(()=>{e.scrollTop=e.scrollHeight+5e3;const t=()=>{e.scrollTop=e.scrollHeight+5e3,requestAnimationFrame(()=>{e.scrollTop=e.scrollHeight+5e3,this.$_undefinedSizes===0?this.$_scrollingToBottom=!1:requestAnimationFrame(t)})};requestAnimationFrame(t)})}}};function $de(e,t,n,r,o,s){const c=a.resolveComponent("RecycleScroller");return a.openBlock(),a.createBlock(c,a.mergeProps({ref:"scroller",items:s.itemsWithSize,"min-item-size":n.minItemSize,direction:e.direction,"key-field":"id","list-tag":e.listTag,"item-tag":e.itemTag},e.$attrs,{onResize:s.onScrollerResize,onVisible:s.onScrollerVisible}),{default:a.withCtx(({item:l,index:d,active:u})=>[a.renderSlot(e.$slots,"default",a.normalizeProps(a.guardReactiveProps({item:l.item,index:d,active:u,itemWithSize:l})))]),before:a.withCtx(()=>[a.renderSlot(e.$slots,"before")]),after:a.withCtx(()=>[a.renderSlot(e.$slots,"after")]),empty:a.withCtx(()=>[a.renderSlot(e.$slots,"empty")]),_:3},16,["items","min-item-size","direction","list-tag","item-tag","onResize","onVisible"])}ry.render=$de,ry.__file="src/components/DynamicScroller.vue";var sx={name:"DynamicScrollerItem",inject:["vscrollData","vscrollParent","vscrollResizeObserver"],props:{item:{required:!0},watchData:{type:Boolean,default:!1},active:{type:Boolean,required:!0},index:{type:Number,default:void 0},sizeDependencies:{type:[Array,Object],default:null},emitResize:{type:Boolean,default:!1},tag:{type:String,default:"div"}},emits:["resize"],computed:{id(){if(this.vscrollData.simpleArray)return this.index;if(this.vscrollData.keyField in this.item)return this.item[this.vscrollData.keyField];throw new Error(`keyField '${this.vscrollData.keyField}' not found in your item. You should set a valid keyField prop on your Scroller`)},size(){return this.vscrollData.sizes[this.id]||0},finalActive(){return this.active&&this.vscrollData.active}},watch:{watchData:"updateWatchData",id(e,t){if(this.$el.$_vs_id=this.id,this.size||this.onDataUpdate(),this.$_sizeObserved){const n=this.vscrollData.sizes[t],r=this.vscrollData.sizes[e];n!=null&&n!==r&&this.applySize(n)}},finalActive(e){this.size||(e?this.vscrollParent.$_undefinedMap[this.id]||(this.vscrollParent.$_undefinedSizes++,this.vscrollParent.$_undefinedMap[this.id]=!0):this.vscrollParent.$_undefinedMap[this.id]&&(this.vscrollParent.$_undefinedSizes--,this.vscrollParent.$_undefinedMap[this.id]=!1)),this.vscrollResizeObserver?e?this.observeSize():this.unobserveSize():e&&this.$_pendingVScrollUpdate===this.id&&this.updateSize()}},created(){if(!this.$isServer&&(this.$_forceNextVScrollUpdate=null,this.updateWatchData(),!this.vscrollResizeObserver)){for(const e in this.sizeDependencies)this.$watch(()=>this.sizeDependencies[e],this.onDataUpdate);this.vscrollParent.$_events.on("vscroll:update",this.onVscrollUpdate)}},mounted(){this.finalActive&&(this.updateSize(),this.observeSize())},beforeUnmount(){this.vscrollParent.$_events.off("vscroll:update",this.onVscrollUpdate),this.unobserveSize()},methods:{updateSize(){this.finalActive?this.$_pendingSizeUpdate!==this.id&&(this.$_pendingSizeUpdate=this.id,this.$_forceNextVScrollUpdate=null,this.$_pendingVScrollUpdate=null,this.computeSize(this.id)):this.$_forceNextVScrollUpdate=this.id},updateWatchData(){this.watchData&&!this.vscrollResizeObserver?this.$_watchData=this.$watch("item",()=>{this.onDataUpdate()},{deep:!0}):this.$_watchData&&(this.$_watchData(),this.$_watchData=null)},onVscrollUpdate({force:e}){!this.finalActive&&e&&(this.$_pendingVScrollUpdate=this.id),(this.$_forceNextVScrollUpdate===this.id||e||!this.size)&&this.updateSize()},onDataUpdate(){this.updateSize()},computeSize(e){this.$nextTick(()=>{if(this.id===e){const t=this.$el.offsetWidth,n=this.$el.offsetHeight;this.applyWidthHeight(t,n)}this.$_pendingSizeUpdate=null})},applyWidthHeight(e,t){const n=~~(this.vscrollParent.direction==="vertical"?t:e);n&&this.size!==n&&this.applySize(n)},applySize(e){this.vscrollParent.$_undefinedMap[this.id]&&(this.vscrollParent.$_undefinedSizes--,this.vscrollParent.$_undefinedMap[this.id]=void 0),this.vscrollData.sizes[this.id]=e,this.emitResize&&this.$emit("resize",this.id)},observeSize(){this.vscrollResizeObserver&&(this.$_sizeObserved||(this.vscrollResizeObserver.observe(this.$el),this.$el.$_vs_id=this.id,this.$el.$_vs_onResize=this.onResize,this.$_sizeObserved=!0))},unobserveSize(){this.vscrollResizeObserver&&this.$_sizeObserved&&(this.vscrollResizeObserver.unobserve(this.$el),this.$el.$_vs_onResize=void 0,this.$_sizeObserved=!1)},onResize(e,t,n){this.id===e&&this.applyWidthHeight(t,n)}},render(){return a.h(this.tag,this.$slots.default())}};sx.__file="src/components/DynamicScrollerItem.vue";const FWe="",DWe="",Fde={components:{ForceGraphSvgIcon:Ia,selectSingle:kce,selectMults:Hce,DynamicScroller:ry,DynamicScrollerItem:sx},mixins:[oi],inject:["hasLevel","history","levelMap"],props:{data:{required:!0,type:Object,default:()=>({nodes:[],links:[]})},selectedNodes:{required:!1,type:Array,default:()=>[]},isRelation:{required:!1,type:Boolean,default:!1},moduleDetail:{type:Object,default:()=>{}},requestGraphData:{type:Boolean,default:!1},canSearch:{required:!1,type:Boolean,default:!1}},emits:["relationNum","sendNodesRange","row-click","selection-change","relationClick","buttonClick"],data(){return{filterValues:"",filteredDataList:[],isMoreSelect:!1,isAggregation:!1,allOptions:null,extentDataList:[],relationDataList:[],currentSelectStatus:-1,currentSelectNode:null,isCombineData:!1,selection:{},oldScrollTop:0,scrollTop:0,flagDiv:1,divObject:null,relationList:[],rootNode:{type:""},menuOptions:null,lineShow:!1,tableKey:"table",value:!0,selectList:[]}},computed:{historyData(){var r,o,s,c,l,d;const e=(s=(o=(r=this.history)==null?void 0:r.dataNow)==null?void 0:o.nodes)==null?void 0:s.map(u=>{const b=u,{x:f,y:h,vx:p,vy:g}=b;return ks(b,["x","y","vx","vy"])}),t=(d=(l=(c=this.history)==null?void 0:c.dataNow)==null?void 0:l.links)==null?void 0:d.map(u=>{const O=u,{source:f,target:h}=O,p=ks(O,["source","target"]),P=f,{x:g,y,vx:b,vy:w}=P,C=ks(P,["x","y","vx","vy"]),F=h,{x:E,y:S,vx:x,vy:N}=F,A=ks(F,["x","y","vx","vy"]);return oe({sourceRest:C,targetRest:A},p)});return JSON.stringify({nodes:e,links:t})},noSelectNodes(){return this.getNoSelectNodes()},showAllExtent(){let e=!1;if(this.selectedNodes&&this.selectedNodes.length===1){const t=this.selectedNodes[0].getData;t&&(e=!(Object.values(t).filter(r=>r===!1).length>0))}return!e},hasFoldIcon(){return!this.isAggregation&&this.relationDataList.some(e=>e.childList.length)}},watch:{filterValues:{deep:!0,handler(e,t){var o;const n=this.filterValues.split("-");this.filterValues=n[0];const r=this.clone((o=this.history.dataNow)==null?void 0:o.links);if(R2.filterValues=n[0],this.selectedNodes.length===1){const s=this.clone(this.selectedNodes[0]);this.filteredDataList=this.getSelectOneNodes(s)}else this.selectedNodes.length===0&&(this.filteredDataList=this.noSelectNodes);if(this.filterValues!==""&&(un({cId:"rightMenu-filterValues",c:"右侧菜单搜索"}),this.filteredDataList=this.filteredDataList.filter(s=>this.filterValues!==""?(s.parentNode=this.searchParent(s,r),s.childList=s.childList.filter(c=>{var l,d,u,f;if(c.name.toLowerCase().indexOf(this.filterValues.toLowerCase())>-1)return!0;if(c.detail!==null){for(const h in c.detail.brief)if(String((l=c==null?void 0:c.detail)==null?void 0:l.brief[h]).toLowerCase().indexOf(this.filterValues.toLowerCase())>-1)return!0;for(let h=0;h<((u=(d=c==null?void 0:c.detail)==null?void 0:d.tags)==null?void 0:u.length);h++){const p=(f=c==null?void 0:c.detail)==null?void 0:f.tags[h];if(String(p.name).toLowerCase().indexOf(this.filterValues.toLowerCase())>-1)return!0}}else return!1}),s.childList.length>0):!0),this.filteredDataList=this.deleteParentItem(this.filteredDataList)),this.selectedNodes.length===1&&be(Ke,"relationNum",this.filteredDataList[0]),this.selectedNodes.length!==0){const s=[];s.push(this.rootNode),this.filteredDataList.forEach(c=>{s.push(...c.childList),s.push(c)}),be(Ke,"sendNodesRange",s)}else{const s=[];this.filteredDataList.forEach(c=>{s.push(this.searchParent(c,r)),s.push(...c.childList),s.push(c)}),be(Ke,"sendNodesRange",s)}}},selectedNodes:{handler(e,t){var n;if(e!==t){const r=e||[],o=this.clone(r);if(this.filterValues="",this.isMoreSelect=!1,this.allOptions=[],this.initShowDiv(),o.length===0)setTimeout(()=>{this.currentSelectStatus=0,this.filteredDataList=this.noSelectNodes,this.setFilteredDataList(),be(Ke,"sendNodesRange",null)},0);else if(o.length===1){this.currentSelectNode=o[0],this.currentSelectStatus=1,this.filteredDataList=this.getSelectOneNodes(o[0]);const s=[];s.push(this.rootNode),this.filteredDataList.map(c=>{s.push(...c.childList),s.push(c)}),this.setFilteredDataList(),be(Ke,"sendNodesRange",s)}else{this.currentSelectStatus=2;const s=[],c=this.clone((n=this.history.dataNow)==null?void 0:n.links),l=o==null?void 0:o.map(d=>{var u;return d.level=this.levelNow(d),d.dangerNumber=((u=this.levelMap[d.level])==null?void 0:u.dangerNumber)||0,d.parentNode=this.searchParent(d,c),s.push(d),d});l.sort(this.handle("dangerNumber")),this.filteredDataList=l,this.setFilteredDataList(),be(Ke,"sendNodesRange",s),this.isMoreSelect=!0}}},immediate:!0,deep:!0},historyData(){this.setFilteredDataList()},filteredDataList:{handler(e,t){setTimeout(()=>{this.setRelationDataList()},0)},deep:!0}},created(){},mounted(){},beforeUnmount(){Bo(Ke,"flagFiles")},methods:{searchChildren(e,t){const n=t,r=[];return n&&n.forEach(o=>{var s;o.source.id===e.id&&(o.target.level=this.levelNow(o.target),o.target.dangerNumber=((s=this.levelMap[o.target.level])==null?void 0:s.dangerNumber)||0,r.push(o.target))}),r},searchParent(e,t){const n=t;let r=[];return n&&n.forEach(o=>{var s;o.target.id===e.id&&(o.source.level=this.levelNow(o.source),o.source.dangerNumber=((s=this.levelMap[o.source.level])==null?void 0:s.dangerNumber)||0,r=o.source)}),r},setFilteredDataList(){if(R2.filterValues===void 0||R2.filterValues==="")if(this.selectedNodes.length===0)this.currentSelectStatus=0,this.filteredDataList=this.noSelectNodes,be(Ke,"sendNodesRange",null);else if(this.selectedNodes.length===1){const e=this.clone(this.selectedNodes[0]);this.currentSelectStatus=1,this.currentSelectNode=e,this.filteredDataList=this.getSelectOneNodes(e);const t=[];t.push(this.rootNode),this.filteredDataList.map(n=>{t.push(...n.childList),t.push(n)}),be(Ke,"sendNodesRange",t)}else this.currentSelectStatus=2;this.setRelationDataList()},setRelationDataList(){if(this.currentSelectStatus!==1){this.relationDataList=this.filteredDataList;return}const e=this.checkExtentStatus();switch(this.isCombineData=!1,e){case 3:{this.initExtentData(),this.relationDataList=this.extentDataList;break}case 2:case 1:{this.isCombineData=!0,this.relationDataList=this.filteredDataList.concat(this.getCombineDataList());break}case 0:this.relationDataList=this.filteredDataList}},levelNow(e){let t=e.detail&&e.detail.info.basic.level;return e.type==="family"&&(t=""),t},handleRowClick(e,t){if(t&&t.type==="selection")return!1;be(this,"row-click",e)},handleSelectionChange(e){this.selection=e,be(this,"selection-change",e)},getModuleDetail(e,t){const n=[],r=[],o=e.apis;this.menuOptions=[];let s=this.$parent.$parent.$parent.moduleDetail;s=s!=null&&s.plugs[e.type]?Array.from(s==null?void 0:s.plugs[e.type]):[],s.filter(l=>{l.value=0,l.children?l.children.map(d=>(d.value=0,this.menuOptions.push(d),d)):this.menuOptions.push(l)}),s.length!==0&&this.menuOptions.unshift({namec:"拓线全部",value:0,name:"",flagSelect:!1}),this.allOptions=[];let c;if(this.menuOptions.map(l=>{c=0;for(let d=0;d<t.length;d++){const u=t[d];c+=u.childList.length,u.id.split("-").pop()===l.name&&(l.value=u.childList.length)}return t.length===0&&(l.value=0),l.namec==="拓线全部"?this.allOptions.push({namec:l.namec,value:c,name:l.name,flagSelect:l.flagSelect}):this.allOptions.push({namec:l.namec,value:l.value,icon:l.icon,name:l.name,relay_name:l.relay_name}),l}),o){for(let l=0;l<o.length;l++)n[o[l].name]=!0;for(let l=0;l<this.allOptions.length;l++)n[this.allOptions[l].name]?(this.allOptions[l].flagSelect=!0,r.push(this.allOptions[l])):(this.allOptions[l].flagSelect=!1,r.push(this.allOptions[l]))}e.menuOptions=this.allOptions},clone(e){return JSON.parse(JSON.stringify(e))},getNoSelectNodes(){var o;this.isAggregation=!1;const e=this.clone(this.history.dataNow.nodes),t=this.clone((o=this.history.dataNow)==null?void 0:o.links),n=e.filter(s=>{if((s==null?void 0:s.type)==="nodeType")return s.childList=this.searchChildren(s,t),s.parentNode=this.searchParent(s,t),s.childList.sort(this.handle("dangerNumber")),!0});return this.deleteParentItem(n)},getSelectOneNodes(e){var n;const t=this.clone((n=this.history.dataNow)==null?void 0:n.links);if(e.type==="nodeType"){const r=[];return this.isAggregation=!1,this.rootNode=e,e.childList=this.searchChildren(e,t),e.parentNode=this.searchParent(e,t),e.childList.sort(this.handle("dangerNumber")),r.push(e),this.getModuleDetail(e,r),be(Ke,"relationNum",e),r}else if(e.type==="aggregation"){const r=[];this.isAggregation=!0;const o=[...e.list];return e.childList=o.map(s=>{var c;return s.level=this.levelNow(s),s.dangerNumber=((c=this.levelMap[s.level])==null?void 0:c.dangerNumber)||0,s}),e.childList.sort(this.handle("dangerNumber")),e.name=this.searchParent(e,t).name,r.push(e),be(Ke,"relationNum",e),r}else{this.rootNode=e,this.isAggregation=!1;const r=this.searchChildren(e,t);return r.map(o=>(o.childList=this.searchChildren(o,t),o.parentNode=this.searchParent(o,t),o.childList.sort(this.handle("dangerNumber")),o)),this.getModuleDetail(e,r),r}},handle(e){return function(t,n){const r=parseInt(t[e]),o=parseInt(n[e]);return r==null?-1:o==null?1:n[e]-t[e]}},showDetail(e,t){var r,o,s,c,l,d,u,f,h,p,g,y,b,w;const n=[];n.push(e.id),t&&(this.selectedNodes.length===0?(s=(o=(r=this.$parent)==null?void 0:r.$parent)==null?void 0:o.$parent)!=null&&s.handleTableSelect&&((d=(l=(c=this.$parent)==null?void 0:c.$parent)==null?void 0:l.$parent)==null||d.handleTableSelect(n)):(p=(h=(f=(u=this.$parent)==null?void 0:u.$parent)==null?void 0:f.$parent)==null?void 0:h.$parent)!=null&&p.handleTableSelect&&((w=(b=(y=(g=this.$parent)==null?void 0:g.$parent)==null?void 0:y.$parent)==null?void 0:b.$parent)==null||w.handleTableSelect(n)))},scalarArrayEquals(e,t){return(e==null?void 0:e.length)===(t==null?void 0:t.length)&&e.every(function(n,r){return n===t[r]})},initShowDiv(){var t;const e=(t=this.history.dataNow)==null?void 0:t.links;e&&e.map(n=>{n.source.showChild=!1,n.target.showChild=!1})},groupBy(e,t){const n={};return e.forEach(function(r){const o=JSON.stringify(t(r));n[o]=n[o]||[],n[o].push(r)}),Object.keys(n).map(function(r){return n[r]})},deleteParentItem(e){let t=[];const n=[];return this.groupBy(e,function(r){return[r.parentNode.id]}).map(r=>{t.push(...r)}),t=t.map(r=>(n.some(s=>s===r.parentNode.id)?r.parentNode="":n.push(r.parentNode.id),r)),t},relationClick(e){un({cId:"relationClick",c:"点击拓线"});const n=this.allOptions.filter(r=>r.namec===e.namec)[0];this.value=!this.value,n.flagSelect=!1,n.namec==="拓线全部"?be(Ke,"relationClick",{nodes:[this.rootNode],api:qS,dataApi:null}):be(Ke,"relationClick",{nodes:[this.rootNode],api:HS,dataApi:n})},toggleFold(e){un({cId:"rightMenu-toggleFold",c:"rightMenu-toggleFold"}),this.history.dataNow.nodes.map(t=>(t.id===e.id&&(t.showChild=!e.showChild),t)),this.filterValues=this.filterValues+"-i"},toggleEye(e,t,n){this.filterValues=this.filterValues+"-i";const r=t.show;this.value=!this.value,r===!0?(un({cId:"rightMenu-toggleEye",c:"rightMenu-toggleEye"}),be(Ke,"buttonClick",{nodes:[t,n],api:{name:"hide_node"}})):be(Ke,"buttonClick",{nodes:[t,n],api:{name:"show_node"}})},checkExtentStatus(){const e=this.currentSelectNode.getData;let t,n=!0,r=!0;if(e===void 0)t=0;else{for(const o in e)e[o]===!1&&(n=!1),e[o]===!0&&(r=!1);n===!0?t=1:t=r===!0?3:2}return t},getCombineDataList(){const e=this.allOptions.filter(r=>r.namec!=="拓线全部"),t=[];let n={};return e.map((r,o)=>{const s=this.checkNodeExtentStatus(r),c=this.checkExtentData(r),l=xS();s&&!c&&(n={id:l,type:"nodeType",icon:r.icon,name:r.namec,namec:r.namec,show:!1,showChild:!1,childList:[],parentNode:"",isExtentNode:!0,hasExtention:!0,noExtentNode:!0},t.push(n)),s||(n={id:l,type:"nodeType",icon:r.icon,name:r.namec,namec:r.namec,show:!1,showChild:!1,childList:[],parentNode:"",isExtentNode:!0,hasExtention:!1,noExtentNode:!1},t.push(n))}),t},initExtentData(){const e=[],t=this.allOptions.filter(r=>r.namec!=="拓线全部"),n=this.rootNode;t.forEach((r,o)=>{const s=xS();e.push({id:s,type:"nodeType",icon:r.icon,name:r.namec,namec:r.namec,show:!1,showChild:!1,childList:[],parentNode:o===0?n:"",hasExtention:!1,isExtentNode:!0,noExtentNode:!1})}),this.extentDataList=e},checkNodeExtentStatus(e){return this.currentSelectNode.getData[e.name]},checkExtentData(e){return this.filteredDataList.filter(n=>e.namec===n.name).length>0}}},Dde={class:"node-relation-block"},zde={key:0,class:"textarea-wrapper"},jde={key:1,class:"relation-title"},Ude=a.createElementVNode("h3",{class:"title-top"},"关联列表",-1),qde={key:0,class:"extent-icon"},Hde={key:2,class:"nodata"},Gde=[a.createElementVNode("span",{class:"el-table__empty-text"},"暂无数据",-1)];function Wde(e,t,n,r,o,s){const c=ka,l=a.resolveComponent("force-graph-svg-icon"),d=nr,u=a.resolveComponent("select-single"),f=a.resolveComponent("select-mults"),h=a.resolveComponent("DynamicScrollerItem"),p=a.resolveComponent("DynamicScroller");return a.openBlock(),a.createElementBlock("div",Dde,[o.isMoreSelect?a.createCommentVNode("",!0):(a.openBlock(),a.createElementBlock(a.Fragment,{key:0},[n.canSearch?(a.openBlock(),a.createElementBlock("div",zde,[a.createVNode(c,{modelValue:o.filterValues,"onUpdate:modelValue":t[0]||(t[0]=g=>o.filterValues=g),modelModifiers:{trim:!0},class:"search-content",placeholder:"请输入搜索内容",clearable:""},null,8,["modelValue"])])):a.createCommentVNode("",!0),o.rootNode.type!=="nodeType"&&!o.isAggregation?(a.openBlock(),a.createElementBlock("div",jde,[Ude,s.showAllExtent?(a.openBlock(),a.createElementBlock("div",qde,[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(o.allOptions,(g,y)=>(a.openBlock(),a.createElementBlock("div",{key:y},[g.namec==="拓线全部"?(a.openBlock(),a.createBlock(d,{key:0,content:g.namec,"popper-class":"el-tooltip-gray",placement:"left"},{default:a.withCtx(()=>[a.createVNode(l,{class:"button-img","icon-class":e.imgPath["./public/d3svg1/button22/button_select_all.svg"],onClick:b=>s.relationClick(g)},null,8,["icon-class","onClick"])]),_:2},1032,["content"])):a.createCommentVNode("",!0)]))),128))])):a.createCommentVNode("",!0)])):a.createCommentVNode("",!0)],64)),o.relationDataList.length>0?(a.openBlock(),a.createElementBlock(a.Fragment,{key:1},[n.selectedNodes.length?(a.openBlock(),a.createElementBlock("div",{key:0,ref:"rightList",class:a.normalizeClass({"has-selected":n.selectedNodes.length,"has-fold-icon":s.hasFoldIcon})},[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(o.relationDataList,(g,y)=>(a.openBlock(),a.createElementBlock("div",{key:y,class:a.normalizeClass(["relation-item",!o.isMoreSelect&&(o.rootNode.type==="nodeType"||!n.isRelation)?"offset-div-1":"offset-div-2"])},[o.isMoreSelect?(a.openBlock(),a.createBlock(f,{key:1,"filter-data":g,"root-node":o.rootNode,"is-more-select":o.isMoreSelect,"is-relation":n.isRelation,onShowDetail:s.showDetail},null,8,["filter-data","root-node","is-more-select","is-relation","onShowDetail"])):(a.openBlock(),a.createBlock(u,{key:0,"filter-data":g,"unique-key":y,value:o.value,"root-node":o.rootNode,"is-more-select":o.isMoreSelect,"is-relation":n.isRelation,"is-aggregation":o.isAggregation,"flag-div":o.flagDiv,"is-combine-data":o.isCombineData,onShowDetail:s.showDetail,onToggleFold:s.toggleFold,onToggleEye:s.toggleEye,onRelationClick:s.relationClick},null,8,["filter-data","unique-key","value","root-node","is-more-select","is-relation","is-aggregation","flag-div","is-combine-data","onShowDetail","onToggleFold","onToggleEye","onRelationClick"]))],2))),128))],2)):(a.openBlock(),a.createElementBlock("div",{key:1,ref:"rightList",class:a.normalizeClass(["relation-data-list",{"no-selected":!n.selectedNodes.length}])},[a.createVNode(p,{items:o.relationDataList,"min-item-size":54,class:"scroller","key-field":"id"},{default:a.withCtx(({item:g,index:y,active:b})=>[a.createVNode(h,{item:g,active:b,"size-dependencies":[g],"data-index":y,class:a.normalizeClass(["relation-item",!o.isMoreSelect&&(o.rootNode.type==="nodeType"||!n.isRelation)?"offset-div-1":"offset-div-2"])},{default:a.withCtx(()=>[o.isMoreSelect?(a.openBlock(),a.createBlock(f,{key:1,"filter-data":g,"root-node":o.rootNode,"is-more-select":o.isMoreSelect,"is-relation":n.isRelation,onShowDetail:s.showDetail},null,8,["filter-data","root-node","is-more-select","is-relation","onShowDetail"])):(a.openBlock(),a.createBlock(u,{key:0,"filter-data":g,"unique-key":y,value:o.value,"root-node":o.rootNode,"is-more-select":o.isMoreSelect,"is-relation":n.isRelation,"is-aggregation":o.isAggregation,"flag-div":o.flagDiv,"is-combine-data":o.isCombineData,onShowDetail:s.showDetail,onToggleFold:s.toggleFold,onToggleEye:s.toggleEye,onRelationClick:s.relationClick},null,8,["filter-data","unique-key","value","root-node","is-more-select","is-relation","is-aggregation","flag-div","is-combine-data","onShowDetail","onToggleFold","onToggleEye","onRelationClick"]))]),_:2},1032,["item","active","size-dependencies","data-index","class"])]),_:1},8,["items"])],2))],64)):(a.openBlock(),a.createElementBlock("div",Hde,Gde))])}const Kde={components:{NodeDetail:qle,NodesRelation:De(Fde,[["render",Wde]])},props:{data:{required:!0,type:Object,default:()=>{}},selectedNodes:{required:!1,type:Array,default:()=>[]},relations:{required:!1,type:Array,default:()=>[]},requestGraphData:{type:Boolean,default:!1}},data(){return{}},computed:{showDetail(){return this.selectedNodes.length!==0},relationData(){const e=[];return this.selectedNodes.length!==1?{nodes:[]}:(this.data.links.map(t=>{t.source.id===this.selectedNodes[0].id?e.push(t.target):t.target.id===this.selectedNodes[0].id&&e.push(t.source)}),{nodes:e})}},methods:{handleBack(){be(this,"change-box",[],!0),this.scrollTop>0&&setTimeout(()=>this.$refs.rightMenu.scrollTo(0,this.scrollTop))},handleSelectionChange(e){be(this,"change-box",e)},handleRowClick(e){this.scrollTop=this.$refs.rightMenu.scrollTop,be(this,"change-box",[e.id],!0)}},emits:["change-box"]},Yde={class:"node-data-wrapper"};function Xde(e,t,n,r,o,s){const c=a.resolveComponent("node-detail"),l=a.resolveComponent("nodes-relation");return a.openBlock(),a.createElementBlock("div",Yde,[s.showDetail?(a.openBlock(),a.createElementBlock(a.Fragment,{key:0},[a.createVNode(c,{data:n.selectedNodes[0]||{},"selected-nodes":n.selectedNodes,"request-graph-data":n.requestGraphData},null,8,["data","selected-nodes","request-graph-data"]),a.createVNode(l,{data:s.relationData,"selected-nodes":n.selectedNodes,"request-graph-data":n.requestGraphData,"is-relation":!0},null,8,["data","selected-nodes","request-graph-data"])],64)):(a.openBlock(),a.createBlock(l,{key:1,data:n.data,"selected-nodes":n.selectedNodes,"request-graph-data":n.requestGraphData,"can-search":!0,onRowClick:s.handleRowClick,onSelectionChange:s.handleSelectionChange},null,8,["data","selected-nodes","request-graph-data","onRowClick","onSelectionChange"]))])}const Jde=De(Kde,[["render",Xde]]),UWe="",Qde={name:"RightMenu",components:{NodeData:Jde},props:{graphData:{type:Object,required:!0},selectedNodes:{type:Array,required:!0},requestGraphData:{type:Boolean,default:!1}},emits:["change-box"],data(){return{scrollTop:0}},methods:{handleBack(){be(this,"change-box",[],!0),this.scrollTop>0&&setTimeout(()=>this.$refs.rightMenu.scrollTo(0,this.scrollTop))},handleSelectionChange(e){be(this,"change-box",e)},handleRowClick(e){this.scrollTop=this.$refs.rightMenu.scrollTop,be(this,"change-box",[e.id],!0)}}};function Zde(e,t,n,r,o,s){const c=a.resolveComponent("node-data");return a.openBlock(),a.createElementBlock("div",{ref:"rightMenu",class:a.normalizeClass(["right-menu-box",{"no-select":!n.selectedNodes.length}])},[a.createVNode(c,{data:n.graphData,"selected-nodes":n.selectedNodes,"request-graph-data":n.requestGraphData,onRowClick:s.handleRowClick,onSelectionChange:s.handleSelectionChange,onGoBack:s.handleBack},null,8,["data","selected-nodes","request-graph-data","onRowClick","onSelectionChange","onGoBack"])],2)}const Vde=De(Qde,[["render",Zde]]),eue={},tue={x:"0px",y:"0px",viewBox:"0 0 60 60"},nue=[a.createElementVNode("path",{id:"椭圆形",d:`M30,0c16.6,0,30,13.4,30,30S46.6,60,30,60S0,46.6,0,30S13.4,0,30,0z M30,4C15.6,4,4,15.6,4,30s11.6,26,26,26\r
107
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Cde(e){var t;return typeof e=="function"?t={callback:e}:t=e,t}function Sde(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},r,o,s,c=function(d){for(var u=arguments.length,f=new Array(u>1?u-1:0),h=1;h<u;h++)f[h-1]=arguments[h];if(s=f,!(r&&d===o)){var p=n.leading;typeof p=="function"&&(p=p(d,o)),(!r||d!==o)&&p&&e.apply(void 0,[d].concat(VS(s))),o=d,clearTimeout(r),r=setTimeout(function(){e.apply(void 0,[d].concat(VS(s))),r=0},t)}};return c._clear=function(){clearTimeout(r),r=null},c}function ex(e,t){if(e===t)return!0;if(Vh(e)==="object"){for(var n in e)if(!ex(e[n],t[n]))return!1;return!0}return!1}var xde=function(){function e(t,n,r){mde(this,e),this.el=t,this.observer=null,this.frozen=!1,this.createObserver(n,r)}return vde(e,[{key:"createObserver",value:function(n,r){var o=this;if(this.observer&&this.destroyObserver(),!this.frozen){if(this.options=Cde(n),this.callback=function(l,d){o.options.callback(l,d),l&&o.options.once&&(o.frozen=!0,o.destroyObserver())},this.callback&&this.options.throttle){var s=this.options.throttleOptions||{},c=s.leading;this.callback=Sde(this.callback,this.options.throttle,{leading:function(d){return c==="both"||c==="visible"&&d||c==="hidden"&&!d}})}this.oldResult=void 0,this.observer=new IntersectionObserver(function(l){var d=l[0];if(l.length>1){var u=l.find(function(h){return h.isIntersecting});u&&(d=u)}if(o.callback){var f=d.isIntersecting&&d.intersectionRatio>=o.threshold;if(f===o.oldResult)return;o.oldResult=f,o.callback(f,d)}},this.options.intersection),a.nextTick(function(){o.observer&&o.observer.observe(o.el)})}}},{key:"destroyObserver",value:function(){this.observer&&(this.observer.disconnect(),this.observer=null),this.callback&&this.callback._clear&&(this.callback._clear(),this.callback=null)}},{key:"threshold",get:function(){return this.options.intersection&&typeof this.options.intersection.threshold=="number"?this.options.intersection.threshold:0}}]),e}();function tx(e,t,n){var r=t.value;if(r)if(typeof IntersectionObserver=="undefined")console.warn("[vue-observe-visibility] IntersectionObserver API is not available in your browser. Please install this polyfill: https://github.com/w3c/IntersectionObserver/tree/master/polyfill");else{var o=new xde(e,r,n);e._vue_visibilityState=o}}function Ede(e,t,n){var r=t.value,o=t.oldValue;if(!ex(r,o)){var s=e._vue_visibilityState;if(!r){nx(e);return}s?s.createObserver(r,n):tx(e,{value:r},n)}}function nx(e){var t=e._vue_visibilityState;t&&(t.destroyObserver(),delete e._vue_visibilityState)}var kde={beforeMount:tx,updated:Ede,unmounted:nx};function Nde(e){return{all:e=e||new Map,on:function(t,n){var r=e.get(t);r&&r.push(n)||e.set(t,[n])},off:function(t,n){var r=e.get(t);r&&r.splice(r.indexOf(n)>>>0,1)},emit:function(t,n){(e.get(t)||[]).slice().map(function(r){r(n)}),(e.get("*")||[]).slice().map(function(r){r(t,n)})}}}var Tde={itemsLimit:1e3},Ade=/(auto|scroll)/;function rx(e,t){return e.parentNode===null?t:rx(e.parentNode,t.concat([e]))}var V2=function(t,n){return getComputedStyle(t,null).getPropertyValue(n)},Ode=function(t){return V2(t,"overflow")+V2(t,"overflow-y")+V2(t,"overflow-x")},Pde=function(t){return Ade.test(Ode(t))};function ix(e){if(e instanceof HTMLElement||e instanceof SVGElement){for(var t=rx(e.parentNode,[]),n=0;n<t.length;n+=1)if(Pde(t[n]))return t[n];return document.scrollingElement||document.documentElement}}function ey(e){return ey=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ey(e)}var ox={items:{type:Array,required:!0},keyField:{type:String,default:"id"},direction:{type:String,default:"vertical",validator:function(t){return["vertical","horizontal"].includes(t)}},listTag:{type:String,default:"div"},itemTag:{type:String,default:"div"}};function ax(){return this.items.length&&ey(this.items[0])!=="object"}var ty=!1;if(typeof window!="undefined"){ty=!1;try{var Ide=Object.defineProperty({},"passive",{get:function(){ty=!0}});window.addEventListener("test",null,Ide)}catch(e){}}let Rde=0;var ny={name:"RecycleScroller",components:{ResizeObserver:Zh},directives:{ObserveVisibility:kde},props:de(oe({},ox),{itemSize:{type:Number,default:null},gridItems:{type:Number,default:void 0},itemSecondarySize:{type:Number,default:void 0},minItemSize:{type:[Number,String],default:null},sizeField:{type:String,default:"size"},typeField:{type:String,default:"type"},buffer:{type:Number,default:200},pageMode:{type:Boolean,default:!1},prerender:{type:Number,default:0},emitUpdate:{type:Boolean,default:!1},updateInterval:{type:Number,default:0},skipHover:{type:Boolean,default:!1},listTag:{type:String,default:"div"},itemTag:{type:String,default:"div"},listClass:{type:[String,Object,Array],default:""},itemClass:{type:[String,Object,Array],default:""}}),emits:["resize","visible","hidden","update","scroll-start","scroll-end"],data(){return{pool:[],totalSize:0,ready:!1,hoverKey:null}},computed:{sizes(){if(this.itemSize===null){const e={"-1":{accumulator:0}},t=this.items,n=this.sizeField,r=this.minItemSize;let o=1e4,s=0,c;for(let l=0,d=t.length;l<d;l++)c=t[l][n]||r,c<o&&(o=c),s+=c,e[l]={accumulator:s,size:c};return this.$_computedMinItemSize=o,e}return[]},simpleArray:ax,itemIndexByKey(){const{keyField:e,items:t}=this,n={};for(let r=0,o=t.length;r<o;r++)n[t[r][e]]=r;return n}},watch:{items(){this.updateVisibleItems(!0)},pageMode(){this.applyPageMode(),this.updateVisibleItems(!1)},sizes:{handler(){this.updateVisibleItems(!1)},deep:!0},gridItems(){this.updateVisibleItems(!0)},itemSecondarySize(){this.updateVisibleItems(!0)}},created(){this.$_startIndex=0,this.$_endIndex=0,this.$_views=new Map,this.$_unusedViews=new Map,this.$_scrollDirty=!1,this.$_lastUpdateScrollPosition=0,this.prerender&&(this.$_prerender=!0,this.updateVisibleItems(!1)),this.gridItems&&!this.itemSize&&console.error("[vue-recycle-scroller] You must provide an itemSize when using gridItems")},mounted(){this.applyPageMode(),this.$nextTick(()=>{this.$_prerender=!1,this.updateVisibleItems(!0),this.ready=!0})},activated(){const e=this.$_lastUpdateScrollPosition;typeof e=="number"&&this.$nextTick(()=>{this.scrollToPosition(e)})},beforeUnmount(){this.removeListeners()},methods:{addView(e,t,n,r,o){const s=a.markRaw({id:Rde++,index:t,used:!0,key:r,type:o}),c=a.shallowReactive({item:n,position:0,nr:s});return e.push(c),c},unuseView(e,t=!1){const n=this.$_unusedViews,r=e.nr.type;let o=n.get(r);o||(o=[],n.set(r,o)),o.push(e),t||(e.nr.used=!1,e.position=-9999)},handleResize(){this.$emit("resize"),this.ready&&this.updateVisibleItems(!1)},handleScroll(e){if(!this.$_scrollDirty){if(this.$_scrollDirty=!0,this.$_updateTimeout)return;const t=()=>requestAnimationFrame(()=>{this.$_scrollDirty=!1;const{continuous:n}=this.updateVisibleItems(!1,!0);n||(clearTimeout(this.$_refreshTimout),this.$_refreshTimout=setTimeout(this.handleScroll,this.updateInterval+100))});t(),this.updateInterval&&(this.$_updateTimeout=setTimeout(()=>{this.$_updateTimeout=0,this.$_scrollDirty&&t()},this.updateInterval))}},handleVisibilityChange(e,t){this.ready&&(e||t.boundingClientRect.width!==0||t.boundingClientRect.height!==0?(this.$emit("visible"),requestAnimationFrame(()=>{this.updateVisibleItems(!1)})):this.$emit("hidden"))},updateVisibleItems(e,t=!1){const n=this.itemSize,r=this.gridItems||1,o=this.itemSecondarySize||n,s=this.$_computedMinItemSize,c=this.typeField,l=this.simpleArray?null:this.keyField,d=this.items,u=d.length,f=this.sizes,h=this.$_views,p=this.$_unusedViews,g=this.pool,y=this.itemIndexByKey;let b,w,C,E,S;if(!u)b=w=E=S=C=0;else if(this.$_prerender)b=E=0,w=S=Math.min(this.prerender,d.length),C=null;else{const I=this.getScroll();if(t){let j=I.start-this.$_lastUpdateScrollPosition;if(j<0&&(j=-j),n===null&&j<s||j<n)return{continuous:!0}}this.$_lastUpdateScrollPosition=I.start;const U=this.buffer;I.start-=U,I.end+=U;let D=0;if(this.$refs.before&&(D=this.$refs.before.scrollHeight,I.start-=D),this.$refs.after){const j=this.$refs.after.scrollHeight;I.end+=j}if(n===null){let j,W=0,X=u-1,q=~~(u/2),z;do z=q,j=f[q].accumulator,j<I.start?W=q:q<u-1&&f[q+1].accumulator>I.start&&(X=q),q=~~((W+X)/2);while(q!==z);for(q<0&&(q=0),b=q,C=f[u-1].accumulator,w=q;w<u&&f[w].accumulator<I.end;w++);for(w===-1?w=d.length-1:(w++,w>u&&(w=u)),E=b;E<u&&D+f[E].accumulator<I.start;E++);for(S=E;S<u&&D+f[S].accumulator<I.end;S++);}else{b=~~(I.start/n*r);const j=b%r;b-=j,w=Math.ceil(I.end/n*r),E=Math.max(0,Math.floor((I.start-D)/n*r)),S=Math.floor((I.end-D)/n*r),b<0&&(b=0),w>u&&(w=u),E<0&&(E=0),S>u&&(S=u),C=Math.ceil(u/r)*n}}w-b>Tde.itemsLimit&&this.itemsLimitError(),this.totalSize=C;let x;const N=b<=this.$_endIndex&&w>=this.$_startIndex;if(N)for(let I=0,U=g.length;I<U;I++)x=g[I],x.nr.used&&(e&&(x.nr.index=y[x.item[l]]),(x.nr.index==null||x.nr.index<b||x.nr.index>=w)&&this.unuseView(x));const A=N?null:new Map;let O,P,F;for(let I=b;I<w;I++){O=d[I];const U=l?O[l]:O;if(U==null)throw new Error(`Key is ${U} on item (keyField is '${l}')`);if(x=h.get(U),!n&&!f[I].size){x&&this.unuseView(x);continue}P=O[c];let D=p.get(P),j=!1;if(!x)N?D&&D.length?x=D.pop():x=this.addView(g,I,O,U,P):(F=A.get(P)||0,(!D||F>=D.length)&&(x=this.addView(g,I,O,U,P),this.unuseView(x,!0),D=p.get(P)),x=D[F],A.set(P,F+1)),h.delete(x.nr.key),x.nr.used=!0,x.nr.index=I,x.nr.key=U,x.nr.type=P,h.set(U,x),j=!0;else if(!x.nr.used&&(x.nr.used=!0,j=!0,D)){const W=D.indexOf(x);W!==-1&&D.splice(W,1)}x.item=O,j&&(I===d.length-1&&this.$emit("scroll-end"),I===0&&this.$emit("scroll-start")),n===null?(x.position=f[I-1].accumulator,x.offset=0):(x.position=Math.floor(I/r)*n,x.offset=I%r*o)}return this.$_startIndex=b,this.$_endIndex=w,this.emitUpdate&&this.$emit("update",b,w,E,S),clearTimeout(this.$_sortTimer),this.$_sortTimer=setTimeout(this.sortViews,this.updateInterval+300),{continuous:N}},getListenerTarget(){let e=ix(this.$el);return window.document&&(e===window.document.documentElement||e===window.document.body)&&(e=window),e},getScroll(){const{$el:e,direction:t}=this,n=t==="vertical";let r;if(this.pageMode){const o=e.getBoundingClientRect(),s=n?o.height:o.width;let c=-(n?o.top:o.left),l=n?window.innerHeight:window.innerWidth;c<0&&(l+=c,c=0),c+l>s&&(l=s-c),r={start:c,end:c+l}}else n?r={start:e.scrollTop,end:e.scrollTop+e.clientHeight}:r={start:e.scrollLeft,end:e.scrollLeft+e.clientWidth};return r},applyPageMode(){this.pageMode?this.addListeners():this.removeListeners()},addListeners(){this.listenerTarget=this.getListenerTarget(),this.listenerTarget.addEventListener("scroll",this.handleScroll,ty?{passive:!0}:!1),this.listenerTarget.addEventListener("resize",this.handleResize)},removeListeners(){this.listenerTarget&&(this.listenerTarget.removeEventListener("scroll",this.handleScroll),this.listenerTarget.removeEventListener("resize",this.handleResize),this.listenerTarget=null)},scrollToItem(e){let t;const n=this.gridItems||1;this.itemSize===null?t=e>0?this.sizes[e-1].accumulator:0:t=Math.floor(e/n)*this.itemSize,this.scrollToPosition(t)},scrollToPosition(e){const t=this.direction==="vertical"?{scroll:"scrollTop",start:"top"}:{scroll:"scrollLeft",start:"left"};let n,r,o;if(this.pageMode){const s=ix(this.$el),c=s.tagName==="HTML"?0:s[t.scroll],l=s.getBoundingClientRect(),u=this.$el.getBoundingClientRect()[t.start]-l[t.start];n=s,r=t.scroll,o=e+c+u}else n=this.$el,r=t.scroll,o=e;n[r]=o},itemsLimitError(){throw setTimeout(()=>{console.log("It seems the scroller element isn't scrolling, so it tries to render all the items at once.","Scroller:",this.$el),console.log("Make sure the scroller has a fixed height (or width) and 'overflow-y' (or 'overflow-x') set to 'auto' so it can scroll correctly and only render the items visible in the scroll viewport.")}),new Error("Rendered items limit reached")},sortViews(){this.pool.sort((e,t)=>e.nr.index-t.nr.index)}}};const Bde={key:0,ref:"before",class:"vue-recycle-scroller__slot"},Lde={key:1,ref:"after",class:"vue-recycle-scroller__slot"};function Mde(e,t,n,r,o,s){const c=a.resolveComponent("ResizeObserver"),l=a.resolveDirective("observe-visibility");return a.withDirectives((a.openBlock(),a.createElementBlock("div",{class:a.normalizeClass(["vue-recycle-scroller",{ready:o.ready,"page-mode":n.pageMode,[`direction-${e.direction}`]:!0}]),onScrollPassive:t[0]||(t[0]=(...d)=>s.handleScroll&&s.handleScroll(...d))},[e.$slots.before?(a.openBlock(),a.createElementBlock("div",Bde,[a.renderSlot(e.$slots,"before")],512)):a.createCommentVNode("v-if",!0),(a.openBlock(),a.createBlock(a.resolveDynamicComponent(n.listTag),{ref:"wrapper",style:a.normalizeStyle({[e.direction==="vertical"?"minHeight":"minWidth"]:o.totalSize+"px"}),class:a.normalizeClass(["vue-recycle-scroller__item-wrapper",n.listClass])},{default:a.withCtx(()=>[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(o.pool,d=>(a.openBlock(),a.createBlock(a.resolveDynamicComponent(n.itemTag),a.mergeProps({key:d.nr.id,style:o.ready?{transform:`translate${e.direction==="vertical"?"Y":"X"}(${d.position}px) translate${e.direction==="vertical"?"X":"Y"}(${d.offset}px)`,width:n.gridItems?`${e.direction==="vertical"&&n.itemSecondarySize||n.itemSize}px`:void 0,height:n.gridItems?`${e.direction==="horizontal"&&n.itemSecondarySize||n.itemSize}px`:void 0}:null,class:["vue-recycle-scroller__item-view",[n.itemClass,{hover:!n.skipHover&&o.hoverKey===d.nr.key}]]},a.toHandlers(n.skipHover?{}:{mouseenter:()=>{o.hoverKey=d.nr.key},mouseleave:()=>{o.hoverKey=null}})),{default:a.withCtx(()=>[a.renderSlot(e.$slots,"default",{item:d.item,index:d.nr.index,active:d.nr.used})]),_:2},1040,["style","class"]))),128)),a.renderSlot(e.$slots,"empty")]),_:3},8,["style","class"])),e.$slots.after?(a.openBlock(),a.createElementBlock("div",Lde,[a.renderSlot(e.$slots,"after")],512)):a.createCommentVNode("v-if",!0),a.createVNode(c,{onNotify:s.handleResize},null,8,["onNotify"])],34)),[[l,s.handleVisibilityChange]])}ny.render=Mde,ny.__file="src/components/RecycleScroller.vue";var ry={name:"DynamicScroller",components:{RecycleScroller:ny},provide(){return typeof ResizeObserver!="undefined"&&(this.$_resizeObserver=new ResizeObserver(e=>{requestAnimationFrame(()=>{if(Array.isArray(e)){for(const t of e)if(t.target&&t.target.$_vs_onResize){let n,r;if(t.borderBoxSize){const o=t.borderBoxSize[0];n=o.inlineSize,r=o.blockSize}else n=t.contentRect.width,r=t.contentRect.height;t.target.$_vs_onResize(t.target.$_vs_id,n,r)}}})})),{vscrollData:this.vscrollData,vscrollParent:this,vscrollResizeObserver:this.$_resizeObserver}},inheritAttrs:!1,props:de(oe({},ox),{minItemSize:{type:[Number,String],required:!0}}),emits:["resize","visible"],data(){return{vscrollData:{active:!0,sizes:{},keyField:this.keyField,simpleArray:!1}}},computed:{simpleArray:ax,itemsWithSize(){const e=[],{items:t,keyField:n,simpleArray:r}=this,o=this.vscrollData.sizes,s=t.length;for(let c=0;c<s;c++){const l=t[c],d=r?c:l[n];let u=o[d];typeof u=="undefined"&&!this.$_undefinedMap[d]&&(u=0),e.push({item:l,id:d,size:u})}return e}},watch:{items(){this.forceUpdate()},simpleArray:{handler(e){this.vscrollData.simpleArray=e},immediate:!0},direction(e){this.forceUpdate(!0)},itemsWithSize(e,t){const n=this.$el.scrollTop;let r=0,o=0;const s=Math.min(e.length,t.length);for(let l=0;l<s&&!(r>=n);l++)r+=t[l].size||this.minItemSize,o+=e[l].size||this.minItemSize;const c=o-r;c!==0&&(this.$el.scrollTop+=c)}},beforeCreate(){this.$_updates=[],this.$_undefinedSizes=0,this.$_undefinedMap={},this.$_events=Nde()},activated(){this.vscrollData.active=!0},deactivated(){this.vscrollData.active=!1},unmounted(){this.$_events.all.clear()},methods:{onScrollerResize(){this.$refs.scroller&&this.forceUpdate(),this.$emit("resize")},onScrollerVisible(){this.$_events.emit("vscroll:update",{force:!1}),this.$emit("visible")},forceUpdate(e=!1){(e||this.simpleArray)&&(this.vscrollData.sizes={}),this.$_events.emit("vscroll:update",{force:!0})},scrollToItem(e){const t=this.$refs.scroller;t&&t.scrollToItem(e)},getItemSize(e,t=void 0){const n=this.simpleArray?t!=null?t:this.items.indexOf(e):e[this.keyField];return this.vscrollData.sizes[n]||0},scrollToBottom(){if(this.$_scrollingToBottom)return;this.$_scrollingToBottom=!0;const e=this.$el;this.$nextTick(()=>{e.scrollTop=e.scrollHeight+5e3;const t=()=>{e.scrollTop=e.scrollHeight+5e3,requestAnimationFrame(()=>{e.scrollTop=e.scrollHeight+5e3,this.$_undefinedSizes===0?this.$_scrollingToBottom=!1:requestAnimationFrame(t)})};requestAnimationFrame(t)})}}};function $de(e,t,n,r,o,s){const c=a.resolveComponent("RecycleScroller");return a.openBlock(),a.createBlock(c,a.mergeProps({ref:"scroller",items:s.itemsWithSize,"min-item-size":n.minItemSize,direction:e.direction,"key-field":"id","list-tag":e.listTag,"item-tag":e.itemTag},e.$attrs,{onResize:s.onScrollerResize,onVisible:s.onScrollerVisible}),{default:a.withCtx(({item:l,index:d,active:u})=>[a.renderSlot(e.$slots,"default",a.normalizeProps(a.guardReactiveProps({item:l.item,index:d,active:u,itemWithSize:l})))]),before:a.withCtx(()=>[a.renderSlot(e.$slots,"before")]),after:a.withCtx(()=>[a.renderSlot(e.$slots,"after")]),empty:a.withCtx(()=>[a.renderSlot(e.$slots,"empty")]),_:3},16,["items","min-item-size","direction","list-tag","item-tag","onResize","onVisible"])}ry.render=$de,ry.__file="src/components/DynamicScroller.vue";var sx={name:"DynamicScrollerItem",inject:["vscrollData","vscrollParent","vscrollResizeObserver"],props:{item:{required:!0},watchData:{type:Boolean,default:!1},active:{type:Boolean,required:!0},index:{type:Number,default:void 0},sizeDependencies:{type:[Array,Object],default:null},emitResize:{type:Boolean,default:!1},tag:{type:String,default:"div"}},emits:["resize"],computed:{id(){if(this.vscrollData.simpleArray)return this.index;if(this.vscrollData.keyField in this.item)return this.item[this.vscrollData.keyField];throw new Error(`keyField '${this.vscrollData.keyField}' not found in your item. You should set a valid keyField prop on your Scroller`)},size(){return this.vscrollData.sizes[this.id]||0},finalActive(){return this.active&&this.vscrollData.active}},watch:{watchData:"updateWatchData",id(e,t){if(this.$el.$_vs_id=this.id,this.size||this.onDataUpdate(),this.$_sizeObserved){const n=this.vscrollData.sizes[t],r=this.vscrollData.sizes[e];n!=null&&n!==r&&this.applySize(n)}},finalActive(e){this.size||(e?this.vscrollParent.$_undefinedMap[this.id]||(this.vscrollParent.$_undefinedSizes++,this.vscrollParent.$_undefinedMap[this.id]=!0):this.vscrollParent.$_undefinedMap[this.id]&&(this.vscrollParent.$_undefinedSizes--,this.vscrollParent.$_undefinedMap[this.id]=!1)),this.vscrollResizeObserver?e?this.observeSize():this.unobserveSize():e&&this.$_pendingVScrollUpdate===this.id&&this.updateSize()}},created(){if(!this.$isServer&&(this.$_forceNextVScrollUpdate=null,this.updateWatchData(),!this.vscrollResizeObserver)){for(const e in this.sizeDependencies)this.$watch(()=>this.sizeDependencies[e],this.onDataUpdate);this.vscrollParent.$_events.on("vscroll:update",this.onVscrollUpdate)}},mounted(){this.finalActive&&(this.updateSize(),this.observeSize())},beforeUnmount(){this.vscrollParent.$_events.off("vscroll:update",this.onVscrollUpdate),this.unobserveSize()},methods:{updateSize(){this.finalActive?this.$_pendingSizeUpdate!==this.id&&(this.$_pendingSizeUpdate=this.id,this.$_forceNextVScrollUpdate=null,this.$_pendingVScrollUpdate=null,this.computeSize(this.id)):this.$_forceNextVScrollUpdate=this.id},updateWatchData(){this.watchData&&!this.vscrollResizeObserver?this.$_watchData=this.$watch("item",()=>{this.onDataUpdate()},{deep:!0}):this.$_watchData&&(this.$_watchData(),this.$_watchData=null)},onVscrollUpdate({force:e}){!this.finalActive&&e&&(this.$_pendingVScrollUpdate=this.id),(this.$_forceNextVScrollUpdate===this.id||e||!this.size)&&this.updateSize()},onDataUpdate(){this.updateSize()},computeSize(e){this.$nextTick(()=>{if(this.id===e){const t=this.$el.offsetWidth,n=this.$el.offsetHeight;this.applyWidthHeight(t,n)}this.$_pendingSizeUpdate=null})},applyWidthHeight(e,t){const n=~~(this.vscrollParent.direction==="vertical"?t:e);n&&this.size!==n&&this.applySize(n)},applySize(e){this.vscrollParent.$_undefinedMap[this.id]&&(this.vscrollParent.$_undefinedSizes--,this.vscrollParent.$_undefinedMap[this.id]=void 0),this.vscrollData.sizes[this.id]=e,this.emitResize&&this.$emit("resize",this.id)},observeSize(){this.vscrollResizeObserver&&(this.$_sizeObserved||(this.vscrollResizeObserver.observe(this.$el),this.$el.$_vs_id=this.id,this.$el.$_vs_onResize=this.onResize,this.$_sizeObserved=!0))},unobserveSize(){this.vscrollResizeObserver&&this.$_sizeObserved&&(this.vscrollResizeObserver.unobserve(this.$el),this.$el.$_vs_onResize=void 0,this.$_sizeObserved=!1)},onResize(e,t,n){this.id===e&&this.applyWidthHeight(t,n)}},render(){return a.h(this.tag,this.$slots.default())}};sx.__file="src/components/DynamicScrollerItem.vue";const FWe="",DWe="",Fde={components:{ForceGraphSvgIcon:Ia,selectSingle:kce,selectMults:Hce,DynamicScroller:ry,DynamicScrollerItem:sx},mixins:[oi],inject:["hasLevel","history","levelMap"],props:{data:{required:!0,type:Object,default:()=>({nodes:[],links:[]})},selectedNodes:{required:!1,type:Array,default:()=>[]},isRelation:{required:!1,type:Boolean,default:!1},moduleDetail:{type:Object,default:()=>{}},requestGraphData:{type:Boolean,default:!1},canSearch:{required:!1,type:Boolean,default:!1}},emits:["relationNum","sendNodesRange","row-click","selection-change","relationClick","buttonClick"],data(){return{filterValues:"",filteredDataList:[],isMoreSelect:!1,isAggregation:!1,allOptions:null,extentDataList:[],relationDataList:[],currentSelectStatus:-1,currentSelectNode:null,isCombineData:!1,selection:{},oldScrollTop:0,scrollTop:0,flagDiv:1,divObject:null,relationList:[],rootNode:{type:""},menuOptions:null,lineShow:!1,tableKey:"table",value:!0,selectList:[]}},computed:{historyData(){var r,o,s,c,l,d;const e=(s=(o=(r=this.history)==null?void 0:r.dataNow)==null?void 0:o.nodes)==null?void 0:s.map(u=>{const b=u,{x:f,y:h,vx:p,vy:g}=b;return ks(b,["x","y","vx","vy"])}),t=(d=(l=(c=this.history)==null?void 0:c.dataNow)==null?void 0:l.links)==null?void 0:d.map(u=>{const O=u,{source:f,target:h}=O,p=ks(O,["source","target"]),P=f,{x:g,y,vx:b,vy:w}=P,C=ks(P,["x","y","vx","vy"]),F=h,{x:E,y:S,vx:x,vy:N}=F,A=ks(F,["x","y","vx","vy"]);return oe({sourceRest:C,targetRest:A},p)});return JSON.stringify({nodes:e,links:t})},noSelectNodes(){return this.getNoSelectNodes()},showAllExtent(){let e=!1;if(this.selectedNodes&&this.selectedNodes.length===1){const t=this.selectedNodes[0].getData;t&&(e=!(Object.values(t).filter(r=>r===!1).length>0))}return!e},hasFoldIcon(){return!this.isAggregation&&this.relationDataList.some(e=>{var t;return(t=e.childList)==null?void 0:t.length})}},watch:{filterValues:{deep:!0,handler(e,t){var o;const n=this.filterValues.split("-");this.filterValues=n[0];const r=this.clone((o=this.history.dataNow)==null?void 0:o.links);if(R2.filterValues=n[0],this.selectedNodes.length===1){const s=this.clone(this.selectedNodes[0]);this.filteredDataList=this.getSelectOneNodes(s)}else this.selectedNodes.length===0&&(this.filteredDataList=this.noSelectNodes);if(this.filterValues!==""&&(un({cId:"rightMenu-filterValues",c:"右侧菜单搜索"}),this.filteredDataList=this.filteredDataList.filter(s=>this.filterValues!==""?(s.parentNode=this.searchParent(s,r),s.childList=s.childList.filter(c=>{var l,d,u,f;if(c.name.toLowerCase().indexOf(this.filterValues.toLowerCase())>-1)return!0;if(c.detail!==null){for(const h in c.detail.brief)if(String((l=c==null?void 0:c.detail)==null?void 0:l.brief[h]).toLowerCase().indexOf(this.filterValues.toLowerCase())>-1)return!0;for(let h=0;h<((u=(d=c==null?void 0:c.detail)==null?void 0:d.tags)==null?void 0:u.length);h++){const p=(f=c==null?void 0:c.detail)==null?void 0:f.tags[h];if(String(p.name).toLowerCase().indexOf(this.filterValues.toLowerCase())>-1)return!0}}else return!1}),s.childList.length>0):!0),this.filteredDataList=this.deleteParentItem(this.filteredDataList)),this.selectedNodes.length===1&&be(Ke,"relationNum",this.filteredDataList[0]),this.selectedNodes.length!==0){const s=[];s.push(this.rootNode),this.filteredDataList.forEach(c=>{s.push(...c.childList),s.push(c)}),be(Ke,"sendNodesRange",s)}else{const s=[];this.filteredDataList.forEach(c=>{s.push(this.searchParent(c,r)),s.push(...c.childList),s.push(c)}),be(Ke,"sendNodesRange",s)}}},selectedNodes:{handler(e,t){var n;if(e!==t){const r=e||[],o=this.clone(r);if(this.filterValues="",this.isMoreSelect=!1,this.allOptions=[],this.initShowDiv(),o.length===0)setTimeout(()=>{this.currentSelectStatus=0,this.filteredDataList=this.noSelectNodes,this.setFilteredDataList(),be(Ke,"sendNodesRange",null)},0);else if(o.length===1){this.currentSelectNode=o[0],this.currentSelectStatus=1,this.filteredDataList=this.getSelectOneNodes(o[0]);const s=[];s.push(this.rootNode),this.filteredDataList.map(c=>{s.push(...c.childList),s.push(c)}),this.setFilteredDataList(),be(Ke,"sendNodesRange",s)}else{this.currentSelectStatus=2;const s=[],c=this.clone((n=this.history.dataNow)==null?void 0:n.links),l=o==null?void 0:o.map(d=>{var u;return d.level=this.levelNow(d),d.dangerNumber=((u=this.levelMap[d.level])==null?void 0:u.dangerNumber)||0,d.parentNode=this.searchParent(d,c),s.push(d),d});l.sort(this.handle("dangerNumber")),this.filteredDataList=l,this.setFilteredDataList(),be(Ke,"sendNodesRange",s),this.isMoreSelect=!0}}},immediate:!0,deep:!0},historyData(){this.setFilteredDataList()},filteredDataList:{handler(e,t){setTimeout(()=>{this.setRelationDataList()},0)},deep:!0}},created(){},mounted(){},beforeUnmount(){Bo(Ke,"flagFiles")},methods:{searchChildren(e,t){const n=t,r=[];return n&&n.forEach(o=>{var s;o.source.id===e.id&&(o.target.level=this.levelNow(o.target),o.target.dangerNumber=((s=this.levelMap[o.target.level])==null?void 0:s.dangerNumber)||0,r.push(o.target))}),r},searchParent(e,t){const n=t;let r=[];return n&&n.forEach(o=>{var s;o.target.id===e.id&&(o.source.level=this.levelNow(o.source),o.source.dangerNumber=((s=this.levelMap[o.source.level])==null?void 0:s.dangerNumber)||0,r=o.source)}),r},setFilteredDataList(){if(R2.filterValues===void 0||R2.filterValues==="")if(this.selectedNodes.length===0)this.currentSelectStatus=0,this.filteredDataList=this.noSelectNodes,be(Ke,"sendNodesRange",null);else if(this.selectedNodes.length===1){const e=this.clone(this.selectedNodes[0]);this.currentSelectStatus=1,this.currentSelectNode=e,this.filteredDataList=this.getSelectOneNodes(e);const t=[];t.push(this.rootNode),this.filteredDataList.map(n=>{t.push(...n.childList),t.push(n)}),be(Ke,"sendNodesRange",t)}else this.currentSelectStatus=2;this.setRelationDataList()},setRelationDataList(){if(this.currentSelectStatus!==1){this.relationDataList=this.filteredDataList;return}const e=this.checkExtentStatus();switch(this.isCombineData=!1,e){case 3:{this.initExtentData(),this.relationDataList=this.extentDataList;break}case 2:case 1:{this.isCombineData=!0,this.relationDataList=this.filteredDataList.concat(this.getCombineDataList());break}case 0:this.relationDataList=this.filteredDataList}},levelNow(e){let t=e.detail&&e.detail.info.basic.level;return e.type==="family"&&(t=""),t},handleRowClick(e,t){if(t&&t.type==="selection")return!1;be(this,"row-click",e)},handleSelectionChange(e){this.selection=e,be(this,"selection-change",e)},getModuleDetail(e,t){const n=[],r=[],o=e.apis;this.menuOptions=[];let s=this.$parent.$parent.$parent.moduleDetail;s=s!=null&&s.plugs[e.type]?Array.from(s==null?void 0:s.plugs[e.type]):[],s.filter(l=>{l.value=0,l.children?l.children.map(d=>(d.value=0,this.menuOptions.push(d),d)):this.menuOptions.push(l)}),s.length!==0&&this.menuOptions.unshift({namec:"拓线全部",value:0,name:"",flagSelect:!1}),this.allOptions=[];let c;if(this.menuOptions.map(l=>{c=0;for(let d=0;d<t.length;d++){const u=t[d];c+=u.childList.length,u.id.split("-").pop()===l.name&&(l.value=u.childList.length)}return t.length===0&&(l.value=0),l.namec==="拓线全部"?this.allOptions.push({namec:l.namec,value:c,name:l.name,flagSelect:l.flagSelect}):this.allOptions.push({namec:l.namec,value:l.value,icon:l.icon,name:l.name,relay_name:l.relay_name}),l}),o){for(let l=0;l<o.length;l++)n[o[l].name]=!0;for(let l=0;l<this.allOptions.length;l++)n[this.allOptions[l].name]?(this.allOptions[l].flagSelect=!0,r.push(this.allOptions[l])):(this.allOptions[l].flagSelect=!1,r.push(this.allOptions[l]))}e.menuOptions=this.allOptions},clone(e){return JSON.parse(JSON.stringify(e))},getNoSelectNodes(){var o;this.isAggregation=!1;const e=this.clone(this.history.dataNow.nodes),t=this.clone((o=this.history.dataNow)==null?void 0:o.links),n=e.filter(s=>{if((s==null?void 0:s.type)==="nodeType")return s.childList=this.searchChildren(s,t),s.parentNode=this.searchParent(s,t),s.childList.sort(this.handle("dangerNumber")),!0});return this.deleteParentItem(n)},getSelectOneNodes(e){var n;const t=this.clone((n=this.history.dataNow)==null?void 0:n.links);if(e.type==="nodeType"){const r=[];return this.isAggregation=!1,this.rootNode=e,e.childList=this.searchChildren(e,t),e.parentNode=this.searchParent(e,t),e.childList.sort(this.handle("dangerNumber")),r.push(e),this.getModuleDetail(e,r),be(Ke,"relationNum",e),r}else if(e.type==="aggregation"){const r=[];this.isAggregation=!0;const o=[...e.list];return e.childList=o.map(s=>{var c;return s.level=this.levelNow(s),s.dangerNumber=((c=this.levelMap[s.level])==null?void 0:c.dangerNumber)||0,s}),e.childList.sort(this.handle("dangerNumber")),e.name=this.searchParent(e,t).name,r.push(e),be(Ke,"relationNum",e),r}else{this.rootNode=e,this.isAggregation=!1;const r=this.searchChildren(e,t);return r.map(o=>(o.childList=this.searchChildren(o,t),o.parentNode=this.searchParent(o,t),o.childList.sort(this.handle("dangerNumber")),o)),this.getModuleDetail(e,r),r}},handle(e){return function(t,n){const r=parseInt(t[e]),o=parseInt(n[e]);return r==null?-1:o==null?1:n[e]-t[e]}},showDetail(e,t){var r,o,s,c,l,d,u,f,h,p,g,y,b,w;const n=[];n.push(e.id),t&&(this.selectedNodes.length===0?(s=(o=(r=this.$parent)==null?void 0:r.$parent)==null?void 0:o.$parent)!=null&&s.handleTableSelect&&((d=(l=(c=this.$parent)==null?void 0:c.$parent)==null?void 0:l.$parent)==null||d.handleTableSelect(n)):(p=(h=(f=(u=this.$parent)==null?void 0:u.$parent)==null?void 0:f.$parent)==null?void 0:h.$parent)!=null&&p.handleTableSelect&&((w=(b=(y=(g=this.$parent)==null?void 0:g.$parent)==null?void 0:y.$parent)==null?void 0:b.$parent)==null||w.handleTableSelect(n)))},scalarArrayEquals(e,t){return(e==null?void 0:e.length)===(t==null?void 0:t.length)&&e.every(function(n,r){return n===t[r]})},initShowDiv(){var t;const e=(t=this.history.dataNow)==null?void 0:t.links;e&&e.map(n=>{n.source.showChild=!1,n.target.showChild=!1})},groupBy(e,t){const n={};return e.forEach(function(r){const o=JSON.stringify(t(r));n[o]=n[o]||[],n[o].push(r)}),Object.keys(n).map(function(r){return n[r]})},deleteParentItem(e){let t=[];const n=[];return this.groupBy(e,function(r){return[r.parentNode.id]}).map(r=>{t.push(...r)}),t=t.map(r=>(n.some(s=>s===r.parentNode.id)?r.parentNode="":n.push(r.parentNode.id),r)),t},relationClick(e){un({cId:"relationClick",c:"点击拓线"});const n=this.allOptions.filter(r=>r.namec===e.namec)[0];this.value=!this.value,n.flagSelect=!1,n.namec==="拓线全部"?be(Ke,"relationClick",{nodes:[this.rootNode],api:qS,dataApi:null}):be(Ke,"relationClick",{nodes:[this.rootNode],api:HS,dataApi:n})},toggleFold(e){un({cId:"rightMenu-toggleFold",c:"rightMenu-toggleFold"}),this.history.dataNow.nodes.map(t=>(t.id===e.id&&(t.showChild=!e.showChild),t)),this.filterValues=this.filterValues+"-i"},toggleEye(e,t,n){this.filterValues=this.filterValues+"-i";const r=t.show;this.value=!this.value,r===!0?(un({cId:"rightMenu-toggleEye",c:"rightMenu-toggleEye"}),be(Ke,"buttonClick",{nodes:[t,n],api:{name:"hide_node"}})):be(Ke,"buttonClick",{nodes:[t,n],api:{name:"show_node"}})},checkExtentStatus(){const e=this.currentSelectNode.getData;let t,n=!0,r=!0;if(e===void 0)t=0;else{for(const o in e)e[o]===!1&&(n=!1),e[o]===!0&&(r=!1);n===!0?t=1:t=r===!0?3:2}return t},getCombineDataList(){const e=this.allOptions.filter(r=>r.namec!=="拓线全部"),t=[];let n={};return e.map((r,o)=>{const s=this.checkNodeExtentStatus(r),c=this.checkExtentData(r),l=xS();s&&!c&&(n={id:l,type:"nodeType",icon:r.icon,name:r.namec,namec:r.namec,show:!1,showChild:!1,childList:[],parentNode:"",isExtentNode:!0,hasExtention:!0,noExtentNode:!0},t.push(n)),s||(n={id:l,type:"nodeType",icon:r.icon,name:r.namec,namec:r.namec,show:!1,showChild:!1,childList:[],parentNode:"",isExtentNode:!0,hasExtention:!1,noExtentNode:!1},t.push(n))}),t},initExtentData(){const e=[],t=this.allOptions.filter(r=>r.namec!=="拓线全部"),n=this.rootNode;t.forEach((r,o)=>{const s=xS();e.push({id:s,type:"nodeType",icon:r.icon,name:r.namec,namec:r.namec,show:!1,showChild:!1,childList:[],parentNode:o===0?n:"",hasExtention:!1,isExtentNode:!0,noExtentNode:!1})}),this.extentDataList=e},checkNodeExtentStatus(e){return this.currentSelectNode.getData[e.name]},checkExtentData(e){return this.filteredDataList.filter(n=>e.namec===n.name).length>0}}},Dde={class:"node-relation-block"},zde={key:0,class:"textarea-wrapper"},jde={key:1,class:"relation-title"},Ude=a.createElementVNode("h3",{class:"title-top"},"关联列表",-1),qde={key:0,class:"extent-icon"},Hde={key:2,class:"nodata"},Gde=[a.createElementVNode("span",{class:"el-table__empty-text"},"暂无数据",-1)];function Wde(e,t,n,r,o,s){const c=ka,l=a.resolveComponent("force-graph-svg-icon"),d=nr,u=a.resolveComponent("select-single"),f=a.resolveComponent("select-mults"),h=a.resolveComponent("DynamicScrollerItem"),p=a.resolveComponent("DynamicScroller");return a.openBlock(),a.createElementBlock("div",Dde,[o.isMoreSelect?a.createCommentVNode("",!0):(a.openBlock(),a.createElementBlock(a.Fragment,{key:0},[n.canSearch?(a.openBlock(),a.createElementBlock("div",zde,[a.createVNode(c,{modelValue:o.filterValues,"onUpdate:modelValue":t[0]||(t[0]=g=>o.filterValues=g),modelModifiers:{trim:!0},class:"search-content",placeholder:"请输入搜索内容",clearable:""},null,8,["modelValue"])])):a.createCommentVNode("",!0),o.rootNode.type!=="nodeType"&&!o.isAggregation?(a.openBlock(),a.createElementBlock("div",jde,[Ude,s.showAllExtent?(a.openBlock(),a.createElementBlock("div",qde,[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(o.allOptions,(g,y)=>(a.openBlock(),a.createElementBlock("div",{key:y},[g.namec==="拓线全部"?(a.openBlock(),a.createBlock(d,{key:0,content:g.namec,"popper-class":"el-tooltip-gray",placement:"left"},{default:a.withCtx(()=>[a.createVNode(l,{class:"button-img","icon-class":e.imgPath["./public/d3svg1/button22/button_select_all.svg"],onClick:b=>s.relationClick(g)},null,8,["icon-class","onClick"])]),_:2},1032,["content"])):a.createCommentVNode("",!0)]))),128))])):a.createCommentVNode("",!0)])):a.createCommentVNode("",!0)],64)),o.relationDataList.length>0?(a.openBlock(),a.createElementBlock(a.Fragment,{key:1},[n.selectedNodes.length?(a.openBlock(),a.createElementBlock("div",{key:0,ref:"rightList",class:a.normalizeClass({"has-selected":n.selectedNodes.length,"has-fold-icon":s.hasFoldIcon})},[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(o.relationDataList,(g,y)=>(a.openBlock(),a.createElementBlock("div",{key:y,class:a.normalizeClass(["relation-item",!o.isMoreSelect&&(o.rootNode.type==="nodeType"||!n.isRelation)?"offset-div-1":"offset-div-2"])},[o.isMoreSelect?(a.openBlock(),a.createBlock(f,{key:1,"filter-data":g,"root-node":o.rootNode,"is-more-select":o.isMoreSelect,"is-relation":n.isRelation,onShowDetail:s.showDetail},null,8,["filter-data","root-node","is-more-select","is-relation","onShowDetail"])):(a.openBlock(),a.createBlock(u,{key:0,"filter-data":g,"unique-key":y,value:o.value,"root-node":o.rootNode,"is-more-select":o.isMoreSelect,"is-relation":n.isRelation,"is-aggregation":o.isAggregation,"flag-div":o.flagDiv,"is-combine-data":o.isCombineData,onShowDetail:s.showDetail,onToggleFold:s.toggleFold,onToggleEye:s.toggleEye,onRelationClick:s.relationClick},null,8,["filter-data","unique-key","value","root-node","is-more-select","is-relation","is-aggregation","flag-div","is-combine-data","onShowDetail","onToggleFold","onToggleEye","onRelationClick"]))],2))),128))],2)):(a.openBlock(),a.createElementBlock("div",{key:1,ref:"rightList",class:a.normalizeClass(["relation-data-list",{"no-selected":!n.selectedNodes.length}])},[a.createVNode(p,{items:o.relationDataList,"min-item-size":54,class:"scroller","key-field":"id"},{default:a.withCtx(({item:g,index:y,active:b})=>[a.createVNode(h,{item:g,active:b,"size-dependencies":[g],"data-index":y,class:a.normalizeClass(["relation-item",!o.isMoreSelect&&(o.rootNode.type==="nodeType"||!n.isRelation)?"offset-div-1":"offset-div-2"])},{default:a.withCtx(()=>[o.isMoreSelect?(a.openBlock(),a.createBlock(f,{key:1,"filter-data":g,"root-node":o.rootNode,"is-more-select":o.isMoreSelect,"is-relation":n.isRelation,onShowDetail:s.showDetail},null,8,["filter-data","root-node","is-more-select","is-relation","onShowDetail"])):(a.openBlock(),a.createBlock(u,{key:0,"filter-data":g,"unique-key":y,value:o.value,"root-node":o.rootNode,"is-more-select":o.isMoreSelect,"is-relation":n.isRelation,"is-aggregation":o.isAggregation,"flag-div":o.flagDiv,"is-combine-data":o.isCombineData,onShowDetail:s.showDetail,onToggleFold:s.toggleFold,onToggleEye:s.toggleEye,onRelationClick:s.relationClick},null,8,["filter-data","unique-key","value","root-node","is-more-select","is-relation","is-aggregation","flag-div","is-combine-data","onShowDetail","onToggleFold","onToggleEye","onRelationClick"]))]),_:2},1032,["item","active","size-dependencies","data-index","class"])]),_:1},8,["items"])],2))],64)):(a.openBlock(),a.createElementBlock("div",Hde,Gde))])}const Kde={components:{NodeDetail:qle,NodesRelation:De(Fde,[["render",Wde]])},props:{data:{required:!0,type:Object,default:()=>{}},selectedNodes:{required:!1,type:Array,default:()=>[]},relations:{required:!1,type:Array,default:()=>[]},requestGraphData:{type:Boolean,default:!1}},data(){return{}},computed:{showDetail(){return this.selectedNodes.length!==0},relationData(){const e=[];return this.selectedNodes.length!==1?{nodes:[]}:(this.data.links.map(t=>{t.source.id===this.selectedNodes[0].id?e.push(t.target):t.target.id===this.selectedNodes[0].id&&e.push(t.source)}),{nodes:e})}},methods:{handleBack(){be(this,"change-box",[],!0),this.scrollTop>0&&setTimeout(()=>this.$refs.rightMenu.scrollTo(0,this.scrollTop))},handleSelectionChange(e){be(this,"change-box",e)},handleRowClick(e){this.scrollTop=this.$refs.rightMenu.scrollTop,be(this,"change-box",[e.id],!0)}},emits:["change-box"]},Yde={class:"node-data-wrapper"};function Xde(e,t,n,r,o,s){const c=a.resolveComponent("node-detail"),l=a.resolveComponent("nodes-relation");return a.openBlock(),a.createElementBlock("div",Yde,[s.showDetail?(a.openBlock(),a.createElementBlock(a.Fragment,{key:0},[a.createVNode(c,{data:n.selectedNodes[0]||{},"selected-nodes":n.selectedNodes,"request-graph-data":n.requestGraphData},null,8,["data","selected-nodes","request-graph-data"]),a.createVNode(l,{data:s.relationData,"selected-nodes":n.selectedNodes,"request-graph-data":n.requestGraphData,"is-relation":!0},null,8,["data","selected-nodes","request-graph-data"])],64)):(a.openBlock(),a.createBlock(l,{key:1,data:n.data,"selected-nodes":n.selectedNodes,"request-graph-data":n.requestGraphData,"can-search":!0,onRowClick:s.handleRowClick,onSelectionChange:s.handleSelectionChange},null,8,["data","selected-nodes","request-graph-data","onRowClick","onSelectionChange"]))])}const Jde=De(Kde,[["render",Xde]]),UWe="",Qde={name:"RightMenu",components:{NodeData:Jde},props:{graphData:{type:Object,required:!0},selectedNodes:{type:Array,required:!0},requestGraphData:{type:Boolean,default:!1}},emits:["change-box"],data(){return{scrollTop:0}},methods:{handleBack(){be(this,"change-box",[],!0),this.scrollTop>0&&setTimeout(()=>this.$refs.rightMenu.scrollTo(0,this.scrollTop))},handleSelectionChange(e){be(this,"change-box",e)},handleRowClick(e){this.scrollTop=this.$refs.rightMenu.scrollTop,be(this,"change-box",[e.id],!0)}}};function Zde(e,t,n,r,o,s){const c=a.resolveComponent("node-data");return a.openBlock(),a.createElementBlock("div",{ref:"rightMenu",class:a.normalizeClass(["right-menu-box",{"no-select":!n.selectedNodes.length}])},[a.createVNode(c,{data:n.graphData,"selected-nodes":n.selectedNodes,"request-graph-data":n.requestGraphData,onRowClick:s.handleRowClick,onSelectionChange:s.handleSelectionChange,onGoBack:s.handleBack},null,8,["data","selected-nodes","request-graph-data","onRowClick","onSelectionChange","onGoBack"])],2)}const Vde=De(Qde,[["render",Zde]]),eue={},tue={x:"0px",y:"0px",viewBox:"0 0 60 60"},nue=[a.createElementVNode("path",{id:"椭圆形",d:`M30,0c16.6,0,30,13.4,30,30S46.6,60,30,60S0,46.6,0,30S13.4,0,30,0z M30,4C15.6,4,4,15.6,4,30s11.6,26,26,26\r
108
108
  s26-11.6,26-26S44.4,4,30,4z`},null,-1),a.createElementVNode("path",{id:"形状结合",class:"st0",d:`M19,45V15h22v30H19z M23,19h14v2H23V19z M30,30c1.4,0,2.5,1.1,2.5,2.5c0,1.4-1.1,2.5-2.5,2.5\r
109
109
  s-2.5-1.1-2.5-2.5C27.5,31.1,28.6,30,30,30z M37,24v2H23v-2H37z`},null,-1)];function rue(e,t){return a.openBlock(),a.createElementBlock("svg",tue,nue)}const iue=De(eue,[["render",rue]]),oue={},aue={x:"0px",y:"0px",viewBox:"0 0 60 60"},sue=[a.createElementVNode("path",{id:"椭圆形",d:`M30,0c16.6,0,30,13.4,30,30S46.6,60,30,60S0,46.6,0,30S13.4,0,30,0z M30,4C15.6,4,4,15.6,4,30s11.6,26,26,26\r
110
110
  s26-11.6,26-26S44.4,4,30,4z`},null,-1),a.createElementVNode("path",{id:"形状结合",class:"st0",d:"M39,40v3H21v-3h7v-2H15V17h30v21H32v2H39z M19,21h22v13H19V21z"},null,-1)];function lue(e,t){return a.openBlock(),a.createElementBlock("svg",aue,sue)}const cue=De(oue,[["render",lue]]),due={},uue={version:"1.1",xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",x:"0px",y:"0px",viewBox:"0 0 60 60",style:{"enable-background":"new 0 0 60 60"},"xml:space":"preserve"},fue=[a.createElementVNode("path",{id:"椭圆形",d:`M30,0c16.6,0,30,13.4,30,30S46.6,60,30,60S0,46.6,0,30S13.4,0,30,0z M30,4C15.6,4,4,15.6,4,30s11.6,26,26,26\r
@@ -148,5 +148,5 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
148
148
  \v\f\r                 \u2028\u2029\uFEFF`,sL=Je("".replace),EBe=RegExp("^["+$5+"]+"),kBe=RegExp("(^|[^"+$5+"])["+$5+"]+$"),F5=function(e){return function(t){var n=xBe(SBe(t));return 1&e&&(n=sL(n,EBe,"")),2&e&&(n=sL(n,kBe,"$1")),n}},NBe={start:F5(1),end:F5(2),trim:F5(3)},TBe=Ct,ABe=At,lL=Xe,cL=_Be,dL=Je,OBe=G0,uL=on,PBe=S1,IBe=Va,RBe=A0,fL=b3,BBe=je,LBe=Nl.f,MBe=kl.f,$Be=qn.f,FBe=aL,DBe=NBe.trim,x1="Number",yc=lL[x1];cL[x1];var D5=yc.prototype,zBe=lL.TypeError,jBe=dL("".slice),E1=dL("".charCodeAt),UBe=function(e){var t,n,r,o,s,c,l,d,u=fL(e,"number");if(RBe(u))throw new zBe("Cannot convert a Symbol value to a number");if(typeof u=="string"&&u.length>2){if(u=DBe(u),(t=E1(u,0))===43||t===45){if((n=E1(u,2))===88||n===120)return NaN}else if(t===48){switch(E1(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=jBe(u,2)).length,l=0;l<c;l++)if((d=E1(s,l))<48||d>o)return NaN;return parseInt(s,r)}}return+u},z5=OBe(x1,!yc(" 0o1")||!yc("0b1")||yc("+0x1")),k1=function(e){var t,n=arguments.length<1?0:yc(function(r){var o=fL(r,"number");return typeof o=="bigint"?o:UBe(o)}(e));return IBe(D5,t=this)&&BBe(function(){FBe(t)})?PBe(Object(n),this,k1):n};k1.prototype=D5,z5&&(D5.constructor=k1),TBe({global:!0,constructor:!0,wrap:!0,forced:z5},{Number:k1}),z5&&function(e,t){for(var n,r=ABe?LBe(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++)uL(t,n=r[o])&&!uL(e,n)&&$Be(e,n,MBe(t,n))}(cL[x1],yc);var qBe=no,HBe=zr,GBe=Go,WBe=RangeError,KBe=Ct,j5=Je,YBe=no,XBe=aL,JBe=function(e){var t=HBe(GBe(this)),n="",r=qBe(e);if(r<0||r===1/0)throw new WBe("Wrong number of repetitions");for(;r>0;(r>>>=1)&&(t+=t))1&r&&(n+=t);return n},hL=je,QBe=RangeError,pL=String,gL=Math.floor,U5=j5(JBe),mL=j5("".slice),Yu=j5(1 .toFixed),bc=function(e,t,n){return t===0?n:t%2==1?bc(e,t-1,n*e):bc(e*e,t/2,n)},_c=function(e,t,n){for(var r=-1,o=n;++r<6;)o+=t*e[r],e[r]=o%1e7,o=gL(o/1e7)},q5=function(e,t){for(var n=6,r=0;--n>=0;)r+=e[n],e[n]=gL(r/t),r=r%t*1e7},vL=function(e){for(var t=6,n="";--t>=0;)if(n!==""||t===0||e[t]!==0){var r=pL(e[t]);n=n===""?r:n+U5("0",7-r.length)+r}return n};KBe({target:"Number",proto:!0,forced:hL(function(){return Yu(8e-5,3)!=="0.000"||Yu(.9,0)!=="1"||Yu(1.255,2)!=="1.25"||Yu(0xde0b6b3a7640080,0)!=="1000000000000000128"})||!hL(function(){Yu({})})},{toFixed:function(e){var t,n,r,o,s=XBe(this),c=YBe(e),l=[0,0,0,0,0,0],d="",u="0";if(c<0||c>20)throw new QBe("Incorrect fraction digits");if(s!=s)return"NaN";if(s<=-1e21||s>=1e21)return pL(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*bc(2,69,1))-69,n=t<0?s*bc(2,-t,1):s/bc(2,t,1),n*=4503599627370496,(t=52-t)>0){for(_c(l,0,n),r=c;r>=7;)_c(l,1e7,0),r-=7;for(_c(l,bc(10,r,1),0),r=t-1;r>=23;)q5(l,1<<23),r-=23;q5(l,1<<r),_c(l,1,1),q5(l,2),u=vL(l)}else _c(l,0,n),_c(l,1<<-t,0),u=vL(l)+U5("0",c);return u=c>0?d+((o=u.length)<=c?"0."+U5("0",c-o)+u:mL(u,0,o-c)+"."+mL(u,o-c)):d+u}});var yL=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=Dr.filter;Ct({target:"Array",proto:!0,forced:!cg("filter")},{filter:function(e){return ZBe(this,e,arguments.length>1?arguments[1]:void 0)}});var VBe=function(){function e(t){b0(this,e),Qi(this,"performanceData",{fcp:0,fp:0,lcp:0}),Qi(this,"commit",function(){}),this.webCoreIns=t}return _0(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),b=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:b,domParseTime:C,tti:y,domReadyTime:w,loadEventTime:S,loadFinishTime:x,loadResourceTime:E,resource:""})}else s=setTimeout(c,100)},!1)}),new Promise(function(n,r){yL("paint",function(o){var s=0,c=0;if(o!=="err"){var l,d=o3(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){yL("largest-contentful-paint",function(o){if(o=="err")n({lcp:0});else{var s,c=o3(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 Jd(Jd({},r),o)},t.performanceData);n.type="performance",t.webCoreIns.commit(n)}).catch(function(n){console.log(n)})}},{key:"calcResourceTime",value:function(){}}]),e}(),eLe=["SCRIPT","STYLE","META","HEAD"];function H5(){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||eLe.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 H5(l,t+1,c,r,o)},n+s)}var bL,G5,W5=je,K5=Xe.RegExp,Y5=W5(function(){var e=K5("a","y");return e.lastIndex=2,e.exec("abcd")!==null}),tLe=Y5||W5(function(){return!K5("a","y").sticky}),nLe=Y5||W5(function(){var e=K5("^r","gy");return e.lastIndex=2,e.exec("str")!==null}),rLe={BROKEN_CARET:nLe,MISSED_STICKY:tLe,UNSUPPORTED_Y:Y5},iLe=je,oLe=Xe.RegExp,aLe=iLe(function(){var e=oLe(".","s");return!(e.dotAll&&e.test(`
149
149
  `)&&e.flags==="s")}),sLe=je,lLe=Xe.RegExp,cLe=sLe(function(){var e=lLe("(?<a>b)","g");return e.exec("b").groups.a!=="b"||"b".replace(e,"$<a>c")!=="bc"}),wc=Dt,N1=Je,dLe=zr,uLe=LA,fLe=rLe,hLe=El,pLe=hn.get,gLe=aLe,mLe=cLe,vLe=l3("native-string-replace",String.prototype.replace),T1=RegExp.prototype.exec,X5=T1,yLe=N1("".charAt),bLe=N1("".indexOf),_Le=N1("".replace),J5=N1("".slice),Q5=(G5=/b*/g,wc(T1,bL=/a/,"a"),wc(T1,G5,"a"),bL.lastIndex!==0||G5.lastIndex!==0),_L=fLe.BROKEN_CARET,Z5=/()??/.exec("")[1]!==void 0;(Q5||Z5||_L||gLe||mLe)&&(X5=function(e){var t,n,r,o,s,c,l,d=this,u=pLe(d),f=dLe(e),h=u.raw;if(h)return h.lastIndex=d.lastIndex,t=wc(X5,h,f),d.lastIndex=h.lastIndex,t;var p=u.groups,g=_L&&d.sticky,y=wc(uLe,d),b=d.source,w=0,C=f;if(g&&(y=_Le(y,"y",""),bLe(y,"g")===-1&&(y+="g"),C=J5(f,d.lastIndex),d.lastIndex>0&&(!d.multiline||d.multiline&&yLe(f,d.lastIndex-1)!==`
150
150
  `)&&(b="(?: "+b+")",C=" "+C,w++),n=new RegExp("^(?:"+b+")",y)),Z5&&(n=new RegExp("^"+b+"$(?!\\s)",y)),Q5&&(r=d.lastIndex),o=wc(T1,g?n:d,C),g?o?(o.input=J5(o.input,w),o[0]=J5(o[0],w),o.index=d.lastIndex,d.lastIndex+=o[0].length):d.lastIndex=0:Q5&&o&&(d.lastIndex=d.global?o.index+o[0].length:r),Z5&&o&&o.length>1&&wc(vLe,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=hLe(null),s=0;s<p.length;s++)c[(l=p[s])[0]]=o[l[1]];return o});var A1=X5;Ct({target:"RegExp",proto:!0,forced:/./.exec!==A1},{exec:A1});var wL=nu,CL=Hn,wLe=A1,SL=je,xL=mt,CLe=Zi,SLe=xL("species"),V5=RegExp.prototype,xLe=rb.charAt,EL=Dt,ELe=fn,kLe=wt,NLe=Vi,TLe=A1,ALe=TypeError,OLe=Dt,PLe=function(e,t,n,r){var o=xL(e),s=!SL(function(){var u={};return u[o]=function(){return 7},""[e](u)!==7}),c=s&&!SL(function(){var u=!1,f=/a/;return e==="split"&&((f={}).constructor={},f.constructor[SLe]=function(){return f},f.flags="",f[o]=/./[o]),f.exec=function(){return u=!0,null},f[o](""),!u});if(!s||!c||n){var l=wL(/./[o]),d=t(o,""[e],function(u,f,h,p,g){var y=wL(u),b=f.exec;return b===wLe||b===V5.exec?s&&!g?{done:!0,value:l(f,h,p)}:{done:!0,value:y(h,f,p)}:{done:!1}});CL(String.prototype,e,d[0]),CL(V5,o,d[1])}r&&CLe(V5[o],"sham",!0)},ILe=fn,RLe=Ja,BLe=ts,e6=zr,LLe=Go,MLe=O0,$Le=function(e,t,n){return t+(n?xLe(e,t).length:1)},kL=function(e,t){var n=e.exec;if(kLe(n)){var r=EL(n,e,t);return r!==null&&ELe(r),r}if(NLe(e)==="RegExp")return EL(TLe,e,t);throw new ALe("RegExp#exec called on incompatible receiver")};PLe("match",function(e,t,n){return[function(r){var o=LLe(this),s=RLe(r)?void 0:MLe(r,e);return s?OLe(s,r,o):new RegExp(r)[e](e6(o))},function(r){var o=ILe(this),s=e6(r),c=n(t,o,s);if(c.done)return c.value;if(!o.global)return kL(o,s);var l=o.unicode;o.lastIndex=0;for(var d,u=[],f=0;(d=kL(o,s))!==null;){var h=e6(d[0]);u[f]=h,h===""&&(o.lastIndex=$Le(s,BLe(o.lastIndex),l)),f++}return f===0?null:u}]});var Bn,Cc,O1,t6={exports:{}},NL=typeof ArrayBuffer!="undefined"&&typeof DataView!="undefined",FLe=NL,n6=At,En=Xe,TL=wt,P1=Ft,aa=on,r6=eo,DLe=Cl,zLe=Zi,i6=Hn,jLe=Yo,ULe=Va,I1=su,Sc=Tl,qLe=mt,HLe=k0,AL=hn.enforce,GLe=hn.get,R1=En.Int8Array,o6=R1&&R1.prototype,OL=En.Uint8ClampedArray,PL=OL&&OL.prototype,_i=R1&&I1(R1),Wr=o6&&I1(o6),WLe=Object.prototype,a6=En.TypeError,IL=qLe("toStringTag"),s6=HLe("TYPED_ARRAY_TAG"),B1="TypedArrayConstructor",lo=FLe&&!!Sc&&r6(En.opera)!=="Opera",RL=!1,co={Int8Array:1,Uint8Array:1,Uint8ClampedArray:1,Int16Array:2,Uint16Array:2,Int32Array:4,Uint32Array:4,Float32Array:4,Float64Array:8},l6={BigInt64Array:8,BigUint64Array:8},BL=function(e){var t=I1(e);if(P1(t)){var n=GLe(t);return n&&aa(n,B1)?n[B1]:BL(t)}},LL=function(e){if(!P1(e))return!1;var t=r6(e);return aa(co,t)||aa(l6,t)};for(Bn in co)(O1=(Cc=En[Bn])&&Cc.prototype)?AL(O1)[B1]=Cc:lo=!1;for(Bn in l6)(O1=(Cc=En[Bn])&&Cc.prototype)&&(AL(O1)[B1]=Cc);if((!lo||!TL(_i)||_i===Function.prototype)&&(_i=function(){throw new a6("Incorrect invocation")},lo))for(Bn in co)En[Bn]&&Sc(En[Bn],_i);if((!lo||!Wr||Wr===WLe)&&(Wr=_i.prototype,lo))for(Bn in co)En[Bn]&&Sc(En[Bn].prototype,Wr);if(lo&&I1(PL)!==Wr&&Sc(PL,Wr),n6&&!aa(Wr,IL))for(Bn in RL=!0,jLe(Wr,IL,{configurable:!0,get:function(){return P1(this)?this[s6]:void 0}}),co)En[Bn]&&zLe(En[Bn],s6,Bn);var Oe={NATIVE_ARRAY_BUFFER_VIEWS:lo,TYPED_ARRAY_TAG:RL&&s6,aTypedArray:function(e){if(LL(e))return e;throw new a6("Target is not a typed array")},aTypedArrayConstructor:function(e){if(TL(e)&&(!Sc||ULe(_i,e)))return e;throw new a6(DLe(e)+" is not a typed array constructor")},exportTypedArrayMethod:function(e,t,n,r){if(n6){if(n)for(var o in co){var s=En[o];if(s&&aa(s.prototype,e))try{delete s.prototype[e]}catch(c){try{s.prototype[e]=t}catch(l){}}}Wr[e]&&!n||i6(Wr,e,n?t:lo&&o6[e]||t,r)}},exportTypedArrayStaticMethod:function(e,t,n){var r,o;if(n6){if(Sc){if(n){for(r in co)if((o=En[r])&&aa(o,e))try{delete o[e]}catch(s){}}if(_i[e]&&!n)return;try{return i6(_i,e,n?t:lo&&_i[e]||t)}catch(s){}}for(r in co)!(o=En[r])||o[e]&&!n||i6(o,e,t)}},getTypedArrayConstructor:BL,isView:function(e){if(!P1(e))return!1;var t=r6(e);return t==="DataView"||aa(co,t)||aa(l6,t)},isTypedArray:LL,TypedArray:_i,TypedArrayPrototype:Wr},ML=Xe,c6=je,KLe=L5,YLe=Oe.NATIVE_ARRAY_BUFFER_VIEWS,XLe=ML.ArrayBuffer,bs=ML.Int8Array,JLe=!YLe||!c6(function(){bs(1)})||!c6(function(){new bs(-1)})||!KLe(function(e){new bs,new bs(null),new bs(1.5),new bs(e)},!0)||c6(function(){return new bs(new XLe(2),1,void 0).length!==1}),QLe=no,ZLe=ts,VLe=RangeError,$L=function(e){if(e===void 0)return 0;var t=QLe(e),n=ZLe(t);if(t!==n)throw new VLe("Wrong length or index");return n},eMe=Math.sign||function(e){var t=+e;return t===0||t!=t?t:t<0?-1:1},tMe=eMe,nMe=Math.abs,FL=2220446049250313e-31,DL=1/FL,rMe=function(e,t,n,r){var o=+e,s=nMe(o),c=tMe(o);if(s<r)return c*function(u){return u+DL-DL}(s/r/t)*r*t;var l=(1+t/FL)*s,d=l-(l-s);return d>n||d!=d?c*(1/0):c*d},iMe=Math.fround||function(e){return rMe(e,11920928955078125e-23,34028234663852886e22,11754943508222875e-54)},oMe=Array,aMe=Math.abs,uo=Math.pow,sMe=Math.floor,lMe=Math.log,cMe=Math.LN2,dMe={pack:function(e,t,n){var r,o,s,c=oMe(n),l=8*n-t-1,d=(1<<l)-1,u=d>>1,f=t===23?uo(2,-24)-uo(2,-77):0,h=e<0||e===0&&1/e<0?1:0,p=0;for((e=aMe(e))!=e||e===1/0?(o=e!=e?1:0,r=d):(r=sMe(lMe(e)/cMe),e*(s=uo(2,-r))<1&&(r--,s*=2),(e+=r+u>=1?f/s:f*uo(2,1-u))*s>=2&&(r++,s/=2),r+u>=d?(o=0,r=d):r+u>=1?(o=(e*s-1)*uo(2,t),r+=u):(o=e*uo(2,u-1)*uo(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+=uo(2,t),f-=c}return(u?-1:1)*n*uo(2,f-t)}},uMe=Fr,zL=iu,fMe=Gn,jL=function(e){for(var t=uMe(this),n=fMe(t),r=arguments.length,o=zL(r>1?arguments[1]:void 0,n),s=r>2?arguments[2]:void 0,c=s===void 0?n:zL(s,n);c>o;)t[o++]=e;return t},L1=Xe,d6=Je,u6=At,hMe=NL,pMe=Zi,gMe=Yo,UL=hb,f6=je,M1=rs,mMe=no,vMe=ts,$1=$L,yMe=iMe,qL=dMe,bMe=su,HL=Tl,_Me=jL,wMe=Xo,CMe=S1,SMe=eT,GL=Ko,h6=hn,xMe=es.PROPER,WL=es.CONFIGURABLE,xc="ArrayBuffer",F1="DataView",Ec="prototype",KL="Wrong index",YL=h6.getterFor(xc),Xu=h6.getterFor(F1),XL=h6.set,Kr=L1[xc],Yr=Kr,kc=Yr&&Yr[Ec],fo=L1[F1],_s=fo&&fo[Ec],JL=Object.prototype,EMe=L1.Array,D1=L1.RangeError,kMe=d6(_Me),NMe=d6([].reverse),QL=qL.pack,ZL=qL.unpack,VL=function(e){return[255&e]},eM=function(e){return[255&e,e>>8&255]},tM=function(e){return[255&e,e>>8&255,e>>16&255,e>>24&255]},nM=function(e){return e[3]<<24|e[2]<<16|e[1]<<8|e[0]},TMe=function(e){return QL(yMe(e),23,4)},AMe=function(e){return QL(e,52,8)},z1=function(e,t,n){gMe(e[Ec],t,{configurable:!0,get:function(){return n(this)[t]}})},sa=function(e,t,n,r){var o=Xu(e),s=$1(n),c=!!r;if(s+t>o.byteLength)throw new D1(KL);var l=o.bytes,d=s+o.byteOffset,u=wMe(l,d,d+t);return c?u:NMe(u)},la=function(e,t,n,r,o,s){var c=Xu(e),l=$1(n),d=r(+o),u=!!s;if(l+t>c.byteLength)throw new D1(KL);for(var f=c.bytes,h=l+c.byteOffset,p=0;p<t;p++)f[h+p]=d[u?p:t-p-1]};if(hMe){var rM=xMe&&Kr.name!==xc;f6(function(){Kr(1)})&&f6(function(){new Kr(-1)})&&!f6(function(){return new Kr,new Kr(1.5),new Kr(NaN),Kr.length!==1||rM&&!WL})?rM&&WL&&pMe(Kr,"name",xc):((Yr=function(e){return M1(this,kc),CMe(new Kr($1(e)),this,Yr)})[Ec]=kc,kc.constructor=Yr,SMe(Yr,Kr)),HL&&bMe(_s)!==JL&&HL(_s,JL);var j1=new fo(new Yr(2)),iM=d6(_s.setInt8);j1.setInt8(0,2147483648),j1.setInt8(1,2147483649),!j1.getInt8(0)&&j1.getInt8(1)||UL(_s,{setInt8:function(e,t){iM(this,e,t<<24>>24)},setUint8:function(e,t){iM(this,e,t<<24>>24)}},{unsafe:!0})}else kc=(Yr=function(e){M1(this,kc);var t=$1(e);XL(this,{type:xc,bytes:kMe(EMe(t),0),byteLength:t}),u6||(this.byteLength=t,this.detached=!1)})[Ec],_s=(fo=function(e,t,n){M1(this,_s),M1(e,kc);var r=YL(e),o=r.byteLength,s=mMe(t);if(s<0||s>o)throw new D1("Wrong offset");if(s+(n=n===void 0?o-s:vMe(n))>o)throw new D1("Wrong length");XL(this,{type:F1,buffer:e,byteLength:n,byteOffset:s,bytes:r.bytes}),u6||(this.buffer=e,this.byteLength=n,this.byteOffset=s)})[Ec],u6&&(z1(Yr,"byteLength",YL),z1(fo,"buffer",Xu),z1(fo,"byteLength",Xu),z1(fo,"byteOffset",Xu)),UL(_s,{getInt8:function(e){return sa(this,1,e)[0]<<24>>24},getUint8:function(e){return sa(this,1,e)[0]},getInt16:function(e){var t=sa(this,2,e,arguments.length>1&&arguments[1]);return(t[1]<<8|t[0])<<16>>16},getUint16:function(e){var t=sa(this,2,e,arguments.length>1&&arguments[1]);return t[1]<<8|t[0]},getInt32:function(e){return nM(sa(this,4,e,arguments.length>1&&arguments[1]))},getUint32:function(e){return nM(sa(this,4,e,arguments.length>1&&arguments[1]))>>>0},getFloat32:function(e){return ZL(sa(this,4,e,arguments.length>1&&arguments[1]),23)},getFloat64:function(e){return ZL(sa(this,8,e,arguments.length>1&&arguments[1]),52)},setInt8:function(e,t){la(this,1,e,VL,t)},setUint8:function(e,t){la(this,1,e,VL,t)},setInt16:function(e,t){la(this,2,e,eM,t,arguments.length>2&&arguments[2])},setUint16:function(e,t){la(this,2,e,eM,t,arguments.length>2&&arguments[2])},setInt32:function(e,t){la(this,4,e,tM,t,arguments.length>2&&arguments[2])},setUint32:function(e,t){la(this,4,e,tM,t,arguments.length>2&&arguments[2])},setFloat32:function(e,t){la(this,4,e,TMe,t,arguments.length>2&&arguments[2])},setFloat64:function(e,t){la(this,8,e,AMe,t,arguments.length>2&&arguments[2])}});GL(Yr,xc),GL(fo,F1);var OMe={ArrayBuffer:Yr,DataView:fo},PMe=Ft,IMe=Math.floor,RMe=Number.isInteger||function(e){return!PMe(e)&&isFinite(e)&&IMe(e)===e},BMe=no,LMe=RangeError,MMe=function(e){var t=BMe(e);if(t<0)throw new LMe("The argument can't be less than 0");return t},$Me=RangeError,oM=function(e,t){var n=MMe(e);if(n%t)throw new $Me("Wrong offset");return n},FMe=Math.round,DMe=eo,zMe=b3,jMe=TypeError,aM=function(e){var t=zMe(e,"number");if(typeof t=="number")throw new jMe("Can't convert number to bigint");return BigInt(t)},UMe=to,qMe=Dt,HMe=nB,GMe=Fr,WMe=Gn,KMe=X0,YMe=uu,XMe=lb,JMe=function(e){var t=DMe(e);return t==="BigInt64Array"||t==="BigUint64Array"},QMe=Oe.aTypedArrayConstructor,ZMe=aM,VMe=Gn,sM=function(e,t,n){for(var r=0,o=arguments.length>2?n:VMe(t),s=new e(o);o>r;)s[r]=t[r++];return s},lM=Ct,cM=Xe,dM=Dt,e$e=At,t$e=JLe,Ju=Oe,uM=OMe,fM=rs,n$e=Sl,Qu=Zi,r$e=RMe,i$e=ts,hM=$L,p6=oM,o$e=function(e){var t=FMe(e);return t<0?0:t>255?255:255&t},pM=P0,Zu=on,a$e=eo,g6=Ft,s$e=A0,l$e=El,c$e=Va,U1=Tl,d$e=Nl.f,gM=function(e){var t,n,r,o,s,c,l,d,u=HMe(this),f=GMe(e),h=arguments.length,p=h>1?arguments[1]:void 0,g=p!==void 0,y=YMe(f);if(y&&!XMe(y))for(d=(l=KMe(f,y)).next,f=[];!(c=qMe(d,l)).done;)f.push(c.value);for(g&&h>2&&(p=UMe(p,arguments[2])),n=WMe(f),r=new(QMe(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},u$e=Dr.forEach,f$e=h5,h$e=Yo,mM=qn,vM=kl,yM=sM,p$e=S1,m6=hn.get,g$e=hn.set,m$e=hn.enforce,bM=mM.f,v$e=vM.f,v6=cM.RangeError,_M=uM.ArrayBuffer,y$e=_M.prototype,b$e=uM.DataView,q1=Ju.NATIVE_ARRAY_BUFFER_VIEWS,wM=Ju.TYPED_ARRAY_TAG,CM=Ju.TypedArray,Vu=Ju.TypedArrayPrototype,y6=Ju.isTypedArray,H1="BYTES_PER_ELEMENT",b6="Wrong length",G1=function(e,t){h$e(e,t,{configurable:!0,get:function(){return m6(this)[t]}})},SM=function(e){var t;return c$e(y$e,e)||(t=a$e(e))==="ArrayBuffer"||t==="SharedArrayBuffer"},xM=function(e,t){return y6(e)&&!s$e(t)&&t in e&&r$e(+t)&&t>=0},EM=function(e,t){return t=pM(t),xM(e,t)?n$e(2,e[t]):v$e(e,t)},kM=function(e,t,n){return t=pM(t),!(xM(e,t)&&g6(n)&&Zu(n,"value"))||Zu(n,"get")||Zu(n,"set")||n.configurable||Zu(n,"writable")&&!n.writable||Zu(n,"enumerable")&&!n.enumerable?bM(e,t,n):(e[t]=n.value,e)};e$e?(q1||(vM.f=EM,mM.f=kM,G1(Vu,"buffer"),G1(Vu,"byteOffset"),G1(Vu,"byteLength"),G1(Vu,"length")),lM({target:"Object",stat:!0,forced:!q1},{getOwnPropertyDescriptor:EM,defineProperty:kM}),t6.exports=function(e,t,n){var r=e.match(/\d+/)[0]/8,o=e+(n?"Clamped":"")+"Array",s="get"+e,c="set"+e,l=cM[o],d=l,u=d&&d.prototype,f={},h=function(g,y){bM(g,y,{get:function(){return function(b,w){var C=m6(b);return C.view[s](w*r+C.byteOffset,!0)}(this,y)},set:function(b){return function(w,C,E){var S=m6(w);S.view[c](C*r+S.byteOffset,n?o$e(E):E,!0)}(this,y,b)},enumerable:!0})};q1?t$e&&(d=t(function(g,y,b,w){return fM(g,u),p$e(g6(y)?SM(y)?w!==void 0?new l(y,p6(b,r),w):b!==void 0?new l(y,p6(b,r)):new l(y):y6(y)?yM(d,y):dM(gM,d,y):new l(hM(y)),g,d)}),U1&&U1(d,CM),u$e(d$e(l),function(g){g in d||Qu(d,g,l[g])}),d.prototype=u):(d=t(function(g,y,b,w){fM(g,u);var C,E,S,x=0,N=0;if(g6(y)){if(!SM(y))return y6(y)?yM(d,y):dM(gM,d,y);C=y,N=p6(b,r);var A=y.byteLength;if(w===void 0){if(A%r)throw new v6(b6);if((E=A-N)<0)throw new v6(b6)}else if((E=i$e(w)*r)+N>A)throw new v6(b6);S=E/r}else S=hM(y),C=new _M(E=S*r);for(g$e(g,{buffer:C,byteOffset:N,byteLength:E,length:S,view:new b$e(C)});x<S;)h(g,x++)}),U1&&U1(d,CM),u=d.prototype=l$e(Vu)),u.constructor!==d&&Qu(u,"constructor",d),m$e(u).TypedArrayConstructor=d,wM&&Qu(u,wM,o);var p=d!==l;f[o]=d,lM({global:!0,constructor:!0,forced:p,sham:!q1},f),H1 in d||Qu(d,H1,r),H1 in u||Qu(u,H1,r),f$e(o)}):t6.exports=function(){},(0,t6.exports)("Uint8",function(e){return function(t,n,r){return e(this,t,n,r)}});var NM=Cl,_$e=TypeError,w$e=Fr,_6=iu,C$e=Gn,S$e=function(e,t){if(!delete e[t])throw new _$e("Cannot delete property "+NM(t)+" of "+NM(e))},x$e=Math.min,E$e=[].copyWithin||function(e,t){var n=w$e(this),r=C$e(n),o=_6(e,r),s=_6(t,r),c=arguments.length>2?arguments[2]:void 0,l=x$e((c===void 0?r:_6(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]:S$e(n,o),o+=d,s+=d;return n},TM=Oe,k$e=Je(E$e),N$e=TM.aTypedArray;(0,TM.exportTypedArrayMethod)("copyWithin",function(e,t){return k$e(N$e(this),e,t,arguments.length>2?arguments[2]:void 0)});var T$e=Dr.every,A$e=Oe.aTypedArray;(0,Oe.exportTypedArrayMethod)("every",function(e){return T$e(A$e(this),e,arguments.length>1?arguments[1]:void 0)});var O$e=jL,P$e=aM,I$e=eo,R$e=Dt,B$e=je,L$e=Oe.aTypedArray,M$e=Oe.exportTypedArrayMethod,$$e=Je("".slice);M$e("fill",function(e){var t=arguments.length;L$e(this);var n=$$e(I$e(this),0,3)==="Big"?P$e(e):+e;return R$e(O$e,this,n,t>1?arguments[1]:void 0,t>2?arguments[2]:void 0)},B$e(function(){var e=0;return new Int8Array(2).fill({valueOf:function(){return e++}}),e!==1}));var F$e=iB,D$e=Oe.aTypedArrayConstructor,z$e=Oe.getTypedArrayConstructor,W1=function(e){return D$e(F$e(e,z$e(e)))},j$e=sM,U$e=W1,q$e=Dr.filter,H$e=function(e,t){return j$e(U$e(e),t)},G$e=Oe.aTypedArray;(0,Oe.exportTypedArrayMethod)("filter",function(e){var t=q$e(G$e(this),e,arguments.length>1?arguments[1]:void 0);return H$e(this,t)});var W$e=Dr.find,K$e=Oe.aTypedArray;(0,Oe.exportTypedArrayMethod)("find",function(e){return W$e(K$e(this),e,arguments.length>1?arguments[1]:void 0)});var Y$e=Dr.findIndex,X$e=Oe.aTypedArray;(0,Oe.exportTypedArrayMethod)("findIndex",function(e){return Y$e(X$e(this),e,arguments.length>1?arguments[1]:void 0)});var J$e=Dr.forEach,Q$e=Oe.aTypedArray;(0,Oe.exportTypedArrayMethod)("forEach",function(e){J$e(Q$e(this),e,arguments.length>1?arguments[1]:void 0)});var Z$e=j0.includes,V$e=Oe.aTypedArray;(0,Oe.exportTypedArrayMethod)("includes",function(e){return Z$e(V$e(this),e,arguments.length>1?arguments[1]:void 0)});var eFe=j0.indexOf,tFe=Oe.aTypedArray;(0,Oe.exportTypedArrayMethod)("indexOf",function(e){return eFe(tFe(this),e,arguments.length>1?arguments[1]:void 0)});var nFe=Xe,rFe=je,w6=Je,AM=Oe,C6=pT,S6=mt("iterator"),OM=nFe.Uint8Array,iFe=w6(C6.values),oFe=w6(C6.keys),aFe=w6(C6.entries),x6=AM.aTypedArray,K1=AM.exportTypedArrayMethod,Nc=OM&&OM.prototype,Y1=!rFe(function(){Nc[S6].call([1])}),PM=!!Nc&&Nc.values&&Nc[S6]===Nc.values&&Nc.values.name==="values",IM=function(){return iFe(x6(this))};K1("entries",function(){return aFe(x6(this))},Y1),K1("keys",function(){return oFe(x6(this))},Y1),K1("values",IM,Y1||!PM,{name:"values"}),K1(S6,IM,Y1||!PM,{name:"values"});var sFe=Oe.aTypedArray,lFe=Oe.exportTypedArrayMethod,cFe=Je([].join);lFe("join",function(e){return cFe(sFe(this),e)});var dFe=u1,uFe=ro,fFe=no,hFe=Gn,pFe=BN,gFe=Math.min,E6=[].lastIndexOf,RM=!!E6&&1/[1].lastIndexOf(1,-0)<0,mFe=pFe("lastIndexOf"),vFe=RM||!mFe?function(e){if(RM)return dFe(E6,this,arguments)||0;var t=uFe(this),n=hFe(t),r=n-1;for(arguments.length>1&&(r=gFe(r,fFe(arguments[1]))),r<0&&(r=n+r);r>=0;r--)if(r in t&&t[r]===e)return r||0;return-1}:E6,yFe=u1,bFe=vFe,_Fe=Oe.aTypedArray;(0,Oe.exportTypedArrayMethod)("lastIndexOf",function(e){var t=arguments.length;return yFe(bFe,_Fe(this),t>1?[e,arguments[1]]:[e])});var wFe=Dr.map,CFe=W1,SFe=Oe.aTypedArray;(0,Oe.exportTypedArrayMethod)("map",function(e){return wFe(SFe(this),e,arguments.length>1?arguments[1]:void 0,function(t,n){return new(CFe(t))(n)})});var xFe=fi,EFe=Fr,kFe=D0,NFe=Gn,TFe=TypeError,BM=function(e){return function(t,n,r,o){var s=EFe(t),c=kFe(s),l=NFe(s);xFe(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 TFe("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}},LM={left:BM(!1),right:BM(!0)},AFe=LM.left,OFe=Oe.aTypedArray;(0,Oe.exportTypedArrayMethod)("reduce",function(e){var t=arguments.length;return AFe(OFe(this),e,t,t>1?arguments[1]:void 0)});var PFe=LM.right,IFe=Oe.aTypedArray;(0,Oe.exportTypedArrayMethod)("reduceRight",function(e){var t=arguments.length;return PFe(IFe(this),e,t,t>1?arguments[1]:void 0)});var RFe=Oe.aTypedArray,BFe=Oe.exportTypedArrayMethod,LFe=Math.floor;BFe("reverse",function(){for(var e,t=this,n=RFe(t).length,r=LFe(n/2),o=0;o<r;)e=t[o],t[o++]=t[--n],t[n]=e;return t});var MM=Xe,$M=Dt,k6=Oe,MFe=Gn,$Fe=oM,FFe=Fr,FM=je,DFe=MM.RangeError,N6=MM.Int8Array,DM=N6&&N6.prototype,zM=DM&&DM.set,zFe=k6.aTypedArray,jFe=k6.exportTypedArrayMethod,T6=!FM(function(){var e=new Uint8ClampedArray(2);return $M(zM,e,{length:1,0:3},1),e[1]!==3}),UFe=T6&&k6.NATIVE_ARRAY_BUFFER_VIEWS&&FM(function(){var e=new N6(2);return e.set(1),e.set("2",1),e[0]!==0||e[1]!==2});jFe("set",function(e){zFe(this);var t=$Fe(arguments.length>1?arguments[1]:void 0,1),n=FFe(e);if(T6)return $M(zM,this,n,t);var r=this.length,o=MFe(n),s=0;if(o+t>r)throw new DFe("Wrong length");for(;s<o;)this[t+s]=n[s++]},!T6||UFe);var qFe=W1,HFe=Xo,GFe=Oe.aTypedArray;(0,Oe.exportTypedArrayMethod)("slice",function(e,t){for(var n=HFe(GFe(this),e,t),r=qFe(this),o=0,s=n.length,c=new r(s);s>o;)c[o]=n[o++];return c},je(function(){new Int8Array(1).slice()}));var WFe=Dr.some,KFe=Oe.aTypedArray;(0,Oe.exportTypedArrayMethod)("some",function(e){return WFe(KFe(this),e,arguments.length>1?arguments[1]:void 0)});var jM=Qa.match(/firefox\/(\d+)/i),YFe=!!jM&&+jM[1],XFe=/MSIE|Trident/.test(Qa),UM=Qa.match(/AppleWebKit\/(\d+)\./),JFe=!!UM&&+UM[1],QFe=nu,A6=je,ZFe=fi,VFe=qT,qM=YFe,eDe=XFe,HM=eu,GM=JFe,tDe=Oe.aTypedArray,nDe=Oe.exportTypedArrayMethod,ef=Xe.Uint16Array,Tc=ef&&QFe(ef.prototype.sort),rDe=!(!Tc||A6(function(){Tc(new ef(2),null)})&&A6(function(){Tc(new ef(2),{})})),WM=!!Tc&&!A6(function(){if(HM)return HM<74;if(qM)return qM<67;if(eDe)return!0;if(GM)return GM<602;var e,t,n=new ef(516),r=Array(516);for(e=0;e<516;e++)t=e%4,n[e]=515-e,r[e]=e-2*t+3;for(Tc(n,function(o,s){return(o/4|0)-(s/4|0)}),e=0;e<516;e++)if(n[e]!==r[e])return!0});nDe("sort",function(e){return e!==void 0&&ZFe(e),WM?Tc(this,e):VFe(tDe(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))},!WM||rDe);var iDe=ts,KM=iu,oDe=W1,aDe=Oe.aTypedArray;(0,Oe.exportTypedArrayMethod)("subarray",function(e,t){var n=aDe(this),r=n.length,o=KM(e,r);return new(oDe(n))(n.buffer,n.byteOffset+o*n.BYTES_PER_ELEMENT,iDe((t===void 0?r:KM(t,r))-o))});var sDe=u1,YM=Oe,O6=je,XM=Xo,X1=Xe.Int8Array,JM=YM.aTypedArray,lDe=YM.exportTypedArrayMethod,QM=[].toLocaleString,cDe=!!X1&&O6(function(){QM.call(new X1(1))});lDe("toLocaleString",function(){return sDe(QM,cDe?XM(JM(this)):JM(this),XM(arguments))},O6(function(){return[1,2].toLocaleString()!==new X1([1,2]).toLocaleString()})||!O6(function(){X1.prototype.toLocaleString.call([1,2])}));var dDe=Oe.exportTypedArrayMethod,uDe=je,fDe=Je,ZM=Xe.Uint8Array,hDe=ZM&&ZM.prototype||{},J1=[].toString,pDe=fDe([].join);uDe(function(){J1.call({})})&&(J1=function(){return pDe(this)});var gDe=hDe.toString!==J1;dDe("toString",J1,gDe);var mDe=0,P6={},vDe=function(e){if(!e)return Promise.reject("empty url");var t=P6[e];return t?Promise.resolve(t):new Promise(function(n,r){var o=document.createElement("script");if(o.id="script".concat(mDe++),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,P6[e]=s,n(s))}:o.onload=function(s){P6[e]=s,n(s)},document.body.appendChild(o)})};function yDe(e,t){return VM.apply(this,arguments)}function VM(){return(VM=Qd($r().mark(function e(t,n){var r,o,s;return $r().wrap(function(c){for(;;)switch(c.prev=c.next){case 0:return c.next=2,vDe("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=bDe(o),c.next=9,_De(s,t,n);case 9:return c.abrupt("return",c.sent);case 10:case"end":return c.stop()}},e)}))).apply(this,arguments)}function bDe(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 _De(e,t,n){return e$.apply(this,arguments)}function e$(){return(e$=Qd($r().mark(function e(t,n,r){var o,s;return $r().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 wDe=function(){function e(n){b0(this,e),Qi(this,"isLoaded",!1),Qi(this,"timer",null),Qi(this,"whiteCount",0),Qi(this,"maxLoopNumber",2),Qi(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 _0(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=H5(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=H5(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=Qd($r().mark(function n(r){return $r().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&&yDe(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}(),t$={exports:{}},n$={},CDe=Vi,SDe=ro,r$=Nl.f,xDe=Xo,i$=typeof window=="object"&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[];n$.f=function(e){return i$&&CDe(e)==="Window"?function(t){try{return r$(t)}catch(n){return xDe(i$)}}(e):r$(SDe(e))};var EDe=je(function(){if(typeof ArrayBuffer=="function"){var e=new ArrayBuffer(8);Object.isExtensible(e)&&Object.defineProperty(e,"a",{value:8})}}),kDe=je,NDe=Ft,TDe=Vi,o$=EDe,Q1=Object.isExtensible,ADe=kDe(function(){Q1(1)})||o$?function(e){return!!NDe(e)&&(!o$||TDe(e)!=="ArrayBuffer")&&(!Q1||Q1(e))}:Q1,ODe=!je(function(){return Object.isExtensible(Object.preventExtensions({}))}),PDe=Ct,IDe=Je,RDe=L0,BDe=Ft,I6=on,LDe=qn.f,a$=Nl,MDe=n$,R6=ADe,$De=ODe,s$=!1,ho=k0("meta"),FDe=0,B6=function(e){LDe(e,ho,{value:{objectID:"O"+FDe++,weakData:{}}})},DDe=t$.exports={enable:function(){DDe.enable=function(){},s$=!0;var e=a$.f,t=IDe([].splice),n={};n[ho]=1,e(n).length&&(a$.f=function(r){for(var o=e(r),s=0,c=o.length;s<c;s++)if(o[s]===ho){t(o,s,1);break}return o},PDe({target:"Object",stat:!0,forced:!0},{getOwnPropertyNames:MDe.f}))},fastKey:function(e,t){if(!BDe(e))return typeof e=="symbol"?e:(typeof e=="string"?"S":"P")+e;if(!I6(e,ho)){if(!R6(e))return"F";if(!t)return"E";B6(e)}return e[ho].objectID},getWeakData:function(e,t){if(!I6(e,ho)){if(!R6(e))return!0;if(!t)return!1;B6(e)}return e[ho].weakData},onFreeze:function(e){return $De&&s$&&R6(e)&&!I6(e,ho)&&B6(e),e}};RDe[ho]=!0;var l$=t$.exports,zDe=Ct,jDe=Xe,UDe=Je,c$=G0,qDe=Hn,HDe=l$,GDe=C1,WDe=rs,KDe=wt,YDe=Ja,L6=Ft,M6=je,XDe=L5,JDe=Ko,QDe=S1,d$=El,ZDe=Yo,u$=hb,VDe=to,eze=rs,tze=Ja,nze=C1,rze=eb,f$=K0,ize=h5,tf=At,h$=l$.fastKey,p$=hn.set,$6=hn.getterFor,oze={getConstructor:function(e,t,n,r){var o=e(function(u,f){eze(u,s),p$(u,{type:t,index:d$(null),first:void 0,last:void 0,size:0}),tf||(u.size=0),tze(f)||nze(f,u[r],{that:u,AS_ENTRIES:n})}),s=o.prototype,c=$6(t),l=function(u,f,h){var p,g,y=c(u),b=d(u,f);return b?b.value=h:(y.last=b={index:g=h$(f,!0),key:f,value:h,previous:p=y.last,next:void 0,removed:!1},y.first||(y.first=b),p&&(p.next=b),tf?y.size++:u.size++,g!=="F"&&(y.index[g]=b)),u},d=function(u,f){var h,p=c(u),g=h$(f);if(g!=="F")return p.index[g];for(h=p.first;h;h=h.next)if(h.key===f)return h};return u$(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=d$(null),tf?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),tf?h.size--:f.size--}return!!p},forEach:function(u){for(var f,h=c(this),p=VDe(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)}}),u$(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)}}),tf&&ZDe(s,"size",{configurable:!0,get:function(){return c(this).size}}),o},setStrong:function(e,t,n){var r=t+" Iterator",o=$6(t),s=$6(r);rze(e,t,function(c,l){p$(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)?f$(l==="keys"?d.key:l==="values"?d.value:[d.key,d.value],!1):(c.target=void 0,f$(void 0,!0))},n?"entries":"values",!n,!0),ize(t)}},aze=function(e,t,n){var r=e.indexOf("Map")!==-1,o=e.indexOf("Weak")!==-1,s=r?"set":"add",c=jDe[e],l=c&&c.prototype,d=c,u={},f=function(w){var C=UDe(l[w]);qDe(l,w,w==="add"?function(E){return C(this,E===0?0:E),this}:w==="delete"?function(E){return!(o&&!L6(E))&&C(this,E===0?0:E)}:w==="get"?function(E){return o&&!L6(E)?void 0:C(this,E===0?0:E)}:w==="has"?function(E){return!(o&&!L6(E))&&C(this,E===0?0:E)}:function(E,S){return C(this,E===0?0:E,S),this})};if(c$(e,!KDe(c)||!(o||l.forEach&&!M6(function(){new c().entries().next()}))))d=n.getConstructor(t,e,r,s),HDe.enable();else if(c$(e,!0)){var h=new d,p=h[s](o?{}:-0,1)!==h,g=M6(function(){h.has(1)}),y=XDe(function(w){new c(w)}),b=!o&&M6(function(){for(var w=new c,C=5;C--;)w[s](C,C);return!w.has(-0)});y||((d=t(function(w,C){WDe(w,l);var E=QDe(new c,w,d);return YDe(C)||GDe(C,E[s],{that:E,AS_ENTRIES:r}),E})).prototype=l,l.constructor=d),(g||b)&&(f("delete"),f("has"),r&&f("get")),(b||p)&&f(s),o&&l.clear&&delete l.clear}return u[e]=d,zDe({global:!0,constructor:!0,forced:d!==c},u),JDe(d,e),o||n.setStrong(d,e,r),d};aze("Set",function(e){return function(){return e(this,arguments.length?arguments[0]:void 0)}},oze);var sze=Ct,g$=M3,lze=z0,cze=Ft,m$=iu,dze=Gn,uze=ro,fze=cb,hze=mt,pze=Xo,gze=cg("slice"),mze=hze("species"),F6=Array,vze=Math.max;sze({target:"Array",proto:!0,forced:!gze},{slice:function(e,t){var n,r,o,s=uze(this),c=dze(s),l=m$(e,c),d=m$(t===void 0?c:t,c);if(g$(s)&&(n=s.constructor,(lze(n)&&(n===F6||g$(n.prototype))||cze(n)&&(n=n[mze])===null)&&(n=void 0),n===F6||n===void 0))return pze(s,l,d);for(r=new(n===void 0?F6:n)(vze(d-l,0)),o=0;l<d;l++,o++)l in s&&fze(r,o,s[l]);return r.length=o,r}});var D6,yze=Ct,bze=nu,_ze=kl.f,wze=ts,v$=zr,Cze=nL,Sze=Go,xze=rL,Eze=bze("".slice),kze=Math.min,y$=xze("endsWith");yze({target:"String",proto:!0,forced:!!(y$||(D6=_ze(String.prototype,"endsWith"),!D6||D6.writable))&&!y$},{endsWith:function(e){var t=v$(Sze(this));Cze(e);var n=arguments.length>1?arguments[1]:void 0,r=t.length,o=n===void 0?r:kze(wze(n),r),s=v$(e);return Eze(t,o-s.length,o)===s}});var Z1,nf,Nze=/^\s*at (?:(.*?) ?\()?((?:file|https?|blob|chrome-extension|address|native|eval|webpack|<anonymous>|[-a-z]+:|.*bundle|\/).*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,V1="js",rf="resource",b$="unhandledrejection",em="cors",_$="vue",w$="react",C$={exports:{}},S$={exports:{}};Z1="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",nf={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&nf.rotl(e,8)|4278255360&nf.rotl(e,24);for(var t=0;t<e.length;t++)e[t]=nf.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(Z1.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((Z1.indexOf(e.charAt(n-1))&Math.pow(2,-2*r+8)-1)<<2*r|Z1.indexOf(e.charAt(n))>>>6-2*r);return t}},S$.exports=nf;var Tze=S$.exports,z6={utf8:{stringToBytes:function(e){return z6.bin.stringToBytes(unescape(encodeURIComponent(e)))},bytesToString:function(e){return decodeURIComponent(escape(z6.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("")}}},x$=z6,Aze=function(e){return e!=null&&(E$(e)||function(t){return typeof t.readFloatLE=="function"&&typeof t.slice=="function"&&E$(t.slice(0,0))}(e)||!!e._isBuffer)};function E$(e){return!!e.constructor&&typeof e.constructor.isBuffer=="function"&&e.constructor.isBuffer(e)}(function(){var e=Tze,t=x$.utf8,n=Aze,r=x$.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,b=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=b(u,f=y(f,h,p,u,l[g+15],22,1236535329),h,p,l[g+1],5,-165796510),p=b(p,u,f,h,l[g+6],9,-1069501632),h=b(h,p,u,f,l[g+11],14,643717713),f=b(f,h,p,u,l[g+0],20,-373897302),u=b(u,f,h,p,l[g+5],5,-701558691),p=b(p,u,f,h,l[g+10],9,38016083),h=b(h,p,u,f,l[g+15],14,-660478335),f=b(f,h,p,u,l[g+4],20,-405537848),u=b(u,f,h,p,l[g+9],5,568446438),p=b(p,u,f,h,l[g+14],9,-1019803690),h=b(h,p,u,f,l[g+3],14,-187363961),f=b(f,h,p,u,l[g+8],20,1163531501),u=b(u,f,h,p,l[g+13],5,-1444681467),p=b(p,u,f,h,l[g+2],9,-51403784),h=b(h,p,u,f,l[g+7],14,1735328473),u=w(u,f=b(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,C$.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 Oze=C4e(C$.exports);function Pze(e){var t=e.match(Nze);return t?{filename:t[2],functionName:t[1]||"",lineno:parseInt(t[3],10)||void 0,colno:parseInt(t[4],10)||void 0}:{}}function tm(e){var t=(e||{stack:""}).stack;if(!t)return[];var n,r=[],o=o3(t.split(`
151
- `).slice(1));try{for(o.s();!(n=o.n()).done;){var s=Pze(n.value);s&&r.push(s)}}catch(c){o.e(c)}finally{o.f()}return r.slice(0,10)}var Ac=function(e){return Oze(e).toString()},j6=function(e){return e instanceof ErrorEvent?e.message==="Script error."?em:V1:rf},Ize=function(){function e(t){b0(this,e),Qi(this,"errorIdSet",new Set),this.webCoreIns=t,this.errorIdSet=new Set}return _0(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(j6(r)===em){var o={errorType:em,errorMessage:r.message,errorSummary:"CorsError",errorId:Ac("".concat(em,"-").concat(r.message))};t.commit(o)}}(n)},!0)}},{key:"onResourceError",value:function(t){if(j6(t)===rf){var n=t.target||t.srcElement,r=n.src||n.href,o=JSON.stringify(rf+": "+r||"UnKnown Resource"),s={errorType:rf,errorMessage:o,errorSummary:"ResourceError",errorId:Ac("".concat(rf,"-").concat(o))};this.commit(s)}}},{key:"onJSError",value:function(t){var n,r;if(j6(t)===V1){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:V1,errorMessage:o,errorSummary:t.error&&((r=t.error)===null||r===void 0?void 0:r.name)||"UnKnown",errorStack:JSON.stringify(tm(t.error)),errorId:Ac("".concat(V1,"-").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:b$,errorMessage:o,errorSummary:s,errorStack:JSON.stringify(tm(t.reason)),errorId:Ac("".concat(b$,"-").concat(o,"-").concat(s))};this.commit(c)}},{key:"onVueError",value:function(t,n,r){var o=JSON.stringify(t.message),s={errorType:_$,errorMessage:o,errorSummary:t.name||"UnKnown",errorStack:JSON.stringify(tm(t)),errorId:Ac("".concat(_$,"-").concat(o,"-").concat(t.name))};this.commit(s)}},{key:"onReactError",value:function(t,n){var r=JSON.stringify(t.message),o={errorType:w$,errorMessage:r,errorSummary:t.name||"UnKnown",errorStack:JSON.stringify(tm(t)),errorId:Ac("".concat(w$,"-").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(Jd({type:"error"},t)))}}]),e}(),Rze=function(e){function t(){var o,s=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return b0(this,t),(o=_4e(this,t,[s])).config=s,o.isReport()?(o.PerformancePluginInstance=new VBe(Zd(o)),o.WhiteScreenPluginInstance=new wDe(Zd(o)),o.ErrorPluginInstance=new Ize(Zd(o)),o.plugins=[o.PerformancePluginInstance,o.WhiteScreenPluginInstance,o.ErrorPluginInstance],o.init(),qk(t,t,Oc,Zd(o)),o):zk(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&&i3(o,s)}(t,bIe),_0(t,[{key:"isReport",value:function(){var o=this.isIE(),s=this.calcRatio();return this.config.appKey&&s&&!o}},{key:"init",value:(r=Qd($r().mark(function o(){return $r().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 Jd(Jd({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=Qd($r().mark(function o(s){var c,l;return $r().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=w4e(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]:{};C0(t,t,Oc)||(o.config.errorHandler=function(c,l,d){C0(t,t,Oc).ErrorPluginInstance.onVueError(c,l,d),console.error(c)},qk(t,t,Oc,new t(s)))}},{key:"sendError",value:function(o){C0(t,t,Oc)?C0(t,t,Oc).ErrorPluginInstance.onReactError(o):console.error("QAPM: 请先初始化 QAPM!")}}]),t}(),Oc={writable:!0,value:null};const vKe="",yKe="",Bze={components:{InfoFilled:ov,ArrowRight:rv},mixins:[oi],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:Wle,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(G2),(r=this.history.keyNodeIds)!=null&&r.some(w=>w===f.id)||(e.push(Y2),(s=(o=this.moduleDetail)==null?void 0:o.config)!=null&&s.hideCollectMenu||e.push(f.collect?K2:W2),e.push(f.textProp==="name"?U2:j2),f.label&&e.push(f.textProp==="label"?q2:H2)),this.canGoDetail&&e.push(GS)),e.push(f.fx?z2:D2);const h=this.history.dataNow.links.some(b=>b.source.id===f.id&&b.target.type==="aggregation"),y=this.history.dataNow.links.filter(b=>b.source.id===f.id).map(b=>b.target).some(b=>{let w=0;return this.history.dataNow.links.map(C=>{C.source.id===b.id&&w++}),w===0});h||f.type==="aggregation"?e.push(US):y&&e.push(jS),y&&e.push(zS),e.push(X2)}else this.nodeInfo.length>1?(e.push(Y2,G2),e.push(this.nodeInfo.some(h=>!h.collect)?W2:K2),this.nodeInfo.some(h=>h.label)&&e.push(this.nodeInfo.some(h=>h.textProp!=="label")?H2:q2),e.push(this.nodeInfo.some(h=>h.textProp!=="name")?j2:U2),e.push(this.nodeInfo.some(h=>!h.fx)?D2:z2),e.push(X2)):this.nodeInfo.length===0&&(this.history.dataNow.nodes.some(h=>h.label)&&e.push(this.history.dataNow.nodes.some(h=>h.textProp!=="label")?$S:MS),e.push(this.history.dataNow.nodes.some(h=>h.textProp!=="name")?BS:LS),e.push(this.history.dataNow.nodes.some(h=>!h.fx)?IS:RS),this.history.currentIndex>0&&e.push(FS),this.history.currentIndex<this.history.length-1&&e.push(DS));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(un({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){un({cId:"contextMenu-"+e.name,c:"右键菜单-"+e.namec}),be(this,"contextmenu-click",{nodes:this.nodeInfo,api:t,dataApi:e}),this.checkedItems={}}}},Pc=e=>(a.pushScopeId("data-v-10144870"),e=e(),a.popScopeId(),e),Lze={"aria-hidden":"true",style:{position:"absolute",width:"0",height:"0",overflow:"hidden",display:"none"}},Mze=[Pc(()=>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))],$ze={class:"cm-list"},Fze={class:"cm-ul"},Dze={class:"hd"},zze=["src"],jze={class:"bd"},Uze={class:"cm-ul cm-ul-level1"},qze=["title"],Hze=Pc(()=>a.createElementVNode("svg",{class:"icon","aria-hidden":"true"},[a.createElementVNode("use",{"xlink:href":"#icon-arrow-right"})],-1)),Gze=["title","onClick"],Wze=["title","onClick"],Kze={key:0,class:"icon","aria-hidden":"true"},Yze=[Pc(()=>a.createElementVNode("use",{"xlink:href":"#icon-arrow-right"},null,-1))],Xze=["title","onClick"],Jze=["src"],Qze=Pc(()=>a.createElementVNode("div",{class:"bd"},null,-1)),Zze=["title","onClick"],Vze={key:0,class:"fas el-icon-fa-cog"},eje={key:1,class:"fas el-icon-fa-external-link-alt"},tje={class:"text-wrapper"},nje=["src"],rje=["src"],ije={key:3,class:"shortcut"},oje={key:2,class:"icon","aria-hidden":"true"},aje=[Pc(()=>a.createElementVNode("use",{"xlink:href":"#icon-arrow-right"},null,-1))],sje=["title","onClick"],lje={key:1,class:"icon","aria-hidden":"true"},cje=[Pc(()=>a.createElementVNode("use",{"xlink:href":"#icon-arrow-right"},null,-1))],dje=["title","onClick"];function uje(e,t,n,r,o,s){const c=a.resolveComponent("ArrowRight"),l=tt,d=a.resolveComponent("InfoFilled"),u=nr;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",Lze,Mze)),a.createElementVNode("div",$ze,[a.createElementVNode("ul",Fze,[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",Dze,[a.createElementVNode("img",{src:e.imgPath["./public/d3svg1/button18/button_relation.svg"],style:{"margin-right":"10px"}},null,8,zze),a.createTextVNode("按关系分类拓线"),a.createVNode(l,null,{default:a.withCtx(()=>[a.createVNode(c)]),_:1})]),a.createElementVNode("div",jze,[a.createElementVNode("ul",Uze,[(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),Hze],10,qze)):(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,Gze)),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",Kze,Yze)):a.createCommentVNode("",!0)],10,Wze),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,b)=>(a.openBlock(),a.createElementBlock("li",{key:b,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,Xze)],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,Jze),a.createTextVNode("展开全部关系 ")]),Qze],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",Vze)):s.isExternalItem(f)?(a.openBlock(),a.createElementBlock("i",eje)):a.createCommentVNode("",!0),a.createElementVNode("div",tje,[f.icon?(a.openBlock(),a.createElementBlock("img",{key:0,src:e.imgPath["./public/d3svg1/button18/"+f.icon+".svg"],class:"t-icon"},null,8,nje)):(a.openBlock(),a.createElementBlock("img",{key:1,src:e.imgPath["./public/d3svg1/button18/button_"+f.name+".svg"],class:"t-icon"},null,8,rje)),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",ije,a.toDisplayString(f.shortcut),1)):a.createCommentVNode("",!0)]),s.hasChildren(f)?(a.openBlock(),a.createElementBlock("svg",oje,aje)):a.createCommentVNode("",!0)],10,Zze),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",lje,cje)):a.createCommentVNode("",!0)],10,sje),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,b)=>(a.openBlock(),a.createElementBlock("li",{key:b,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,dje)],4))),128))],4)):a.createCommentVNode("",!0)],4))),128))],4)):a.createCommentVNode("",!0)],4))),128))])])],4)):a.createCommentVNode("",!0)}const fje=De(Bze,[["render",uje],["__scopeId","data-v-10144870"]]),SKe="",xKe="",EKe="",kKe="",hje={name:"Popover",components:{ForceGraphSvgIcon:Ia},mixins:[oi],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(oe({},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 P2(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 Kh(e,this.levelList)},getColorStyle(e){return Yh(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&&rle(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(Gh(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)}}}},Ic=e=>(a.pushScopeId("data-v-1e5ef54c"),e=e(),a.popScopeId(),e),pje={key:0,class:"node-info-container"},gje={class:"popover-block popover-header"},mje={key:0,class:"popover-collect"},vje={key:1,class:"row-item"},yje={class:"label"},bje={key:2,class:"row-item"},_je=Ic(()=>a.createElementVNode("div",{class:"label"},"关系节点:",-1)),wje={class:"value"},Cje={class:"node-type-info"},Sje={class:"name"},xje={key:3,class:"row-item"},Eje=Ic(()=>a.createElementVNode("div",{class:"label"},"备注:",-1)),kje={class:"value"},Nje={class:"popover-block popover-fields"},Tje={key:0,class:"node-detail top-border"},Aje={key:0,class:"row-item"},Oje=Ic(()=>a.createElementVNode("div",{class:"label"},"危险级别:",-1)),Pje=["title"],Ije={key:1,class:"row-item row-item-tag"},Rje=Ic(()=>a.createElementVNode("div",{class:"label"},"标签:",-1)),Bje={class:"value"},Lje={class:"graph-tags-box"},Mje=Ic(()=>a.createElementVNode("br",null,null,-1)),$je={key:0,class:"row-item"},Fje={class:"label"},Dje=["title"],zje={key:1,class:"node-statistics top-border"},jje={class:"row-item node-num"},Uje=Ic(()=>a.createElementVNode("div",{class:"label"},"拓展节点统计:",-1)),qje={class:"value"},Hje={key:0},Gje={class:"danger"},Wje={key:2,class:"node-aggregation"},Kje={class:"aggregation-title"},Yje={class:"aggregation-box"},Xje={key:1,class:"node-info-container"},Jje={class:"popover-fields"},Qje={class:"top"};function Zje(e,t,n,r,o,s){const c=a.resolveComponent("force-graph-svg-icon"),l=nr,d=yd,u=_te,f=Ta,h=bte;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",pje,[a.createElementVNode("div",gje,[n.nodeInfo.collect?(a.openBlock(),a.createElementBlock("div",mje,[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",vje,[a.createElementVNode("div",yje,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",bje,[_je,a.createElementVNode("div",wje,[a.createElementVNode("div",Cje,[a.createElementVNode("div",Sje,a.toDisplayString(n.nodeInfo.name),1)])])])):a.createCommentVNode("",!0),n.nodeInfo.label?(a.openBlock(),a.createElementBlock("div",xje,[Eje,a.createElementVNode("div",kje,a.toDisplayString(n.nodeInfo.label),1)])):a.createCommentVNode("",!0)]),a.createElementVNode("div",Nje,[s.isNormalNode&&n.nodeInfo.detail?(a.openBlock(),a.createElementBlock("div",Tje,[s.canGoDetail?(a.openBlock(),a.createElementBlock("div",Aje,[Oje,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,Pje)])):a.createCommentVNode("",!0),n.nodeInfo.detail&&n.nodeInfo.detail.tags&&n.nodeInfo.detail.tags.length>0?(a.openBlock(),a.createElementBlock("div",Ije,[Rje,a.createElementVNode("div",Bje,[a.createElementVNode("div",Lje,[(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},[Mje,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",$je,[a.createElementVNode("div",Fje,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,Dje)])):a.createCommentVNode("",!0)],64))),256))])):a.createCommentVNode("",!0),s.isNodeTypeNode?(a.openBlock(),a.createElementBlock("div",zje,[a.createElementVNode("div",jje,[Uje,a.createElementVNode("div",qje,[s.getNodeTypeChildNum(n.nodeInfo.id).dangerChildNum>0?(a.openBlock(),a.createElementBlock("span",Hje,[a.createElementVNode("span",Gje,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",Wje,[a.createElementVNode("div",Kje,"聚合节点 ("+a.toDisplayString(o.aggregationList.length)+"个)",1),a.createElementVNode("div",Yje,[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",Xje,[a.createElementVNode("div",Jje,[a.createElementVNode("div",Qje,a.toDisplayString(n.nodeInfo.apiName),1)])]))])],38)}const Vje=De(hje,[["render",Zje],["__scopeId","data-v-1e5ef54c"]]),eUe=[{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:[]}],tUe={name:"vue-safe-force-graph",version:"2.0.28",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","vue-virtual-scroller":"^2.0.0-beta.8"},devDependencies:{"@babel/core":"^7.23.3","@babel/preset-env":"^7.23.3","@originjs/vite-plugin-commonjs":"^1.0.3","@q/qcdn":"^3.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"},UKe="",qKe="",HKe="",{toClipboard:nUe}=Xh(),rUe="Arial,Helvetica Neue,Helvetica,PingFang SC,Hiragino Sans GB,Microsoft YaHei,sans-serif",U6={},wi=1,iUe=["ip","intranet","internet"],q6=20;let Ht={},Ln={},po=null;const _r={},oUe={name:"ForceGraphRenderByCanvas",components:{Popover:Vje,NodeContextmenu:fje},mixins:[oi],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:el()?"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:wi,mousedownPos:null,mousedownNode:null,mouseupNode:null,dragLine:null,darkBgRect:null,inited:!1,hasSimulation:!1,nodesLength:0}},computed:{iconSizeComputed(){const e=b4e(U6);return this.nodeTypeList.forEach(t=>{e[t]=U6[t]*this.nodeTypeScale}),e},contextMenuNodes(){return this.contextMenuNode.id?this.selection.some(e=>e.id===this.contextMenuNode.id)?[...this.selection]:[this.contextMenuNode]:[]},showContextMenuFlag(){return this.requestGraphData?this.showContextMenu:!1}},watch:{data:{handler:function(){const e=this.nodesLength!==this.data.nodes.length;this.nodes=this.data.nodes,this.links=this.data.links,this.nodesLength=this.data.nodes.length,this.update(e)},deep:!0},moduleDetail:{handler:function(e){return 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(){tl("graph created time",Date.now()),ji.setProject("QH_10542_1724").getTrack(),localStorage.getItem("showSafeForceGraphLog")&&tl("组件版本: "+tUe.version),this.isThreatPath||this.initKeyEvent(),this.uniqueClass="unique"+new Date().getTime()+Math.floor(Math.random()*1e5)},mounted(){return Pe(this,null,function*(){new Rze({appKey:"fe-force-graph",ratio:50}),this.initForceGraph(),nle(this.levelList),!this.isThreatPath&&(Ro(Ke,"buttonClick",e=>{this.handleContextMenuClick(e)}),Ro(Ke,"relationClick",e=>{this.handleContextMenuClick(e)}),Ro(Ke,"sendNodesRange",(e,t)=>{e!==void 0&&(this.nodesRange=e,this.updateNodeStyle())}))})},beforeUnmount(){Bo(Ke,"buttonClick"),Bo(Ke,"relationClick"),Bo(Ke,"sendNodesRange"),this.unbindKeyEvent(),this.resetAll(),tl("destroy")},methods:{initForceGraph(){return Pe(this,null,function*(){if(this.inited)return;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.hasSimulation&&this.updateSimulation()}),this.resizeObserver.observe(e),document.addEventListener("click",this.hideContextMenu,!1),this.nodes=this.data.nodes,this.links=this.data.links,this.stage=new _t.Stage({container:e,width:t,height:n,scaleX:wi,scaleY:wi}),this.layer=new _t.Layer,po=new _t.Group({id:"grab",x:0,y:0}),this.layer.add(po);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(),this.inited=!0})},setSimulation(){var n;if(this.hasSimulation||!((n=this.nodes)!=null&&n.length))return;const e=this.stage.width()/(2*wi),t=this.stage.height()/(2*wi);this.hasSimulation=!0,this.simulation=Sae(this.nodes).force("link",gae(this.links).id(r=>r.id).distance(120).strength(1)).force("charge",xae().strength(-600)).force("x",Eae()).force("y",kae()).force("center",pS(e,t)).alphaDecay(this.alphaDecay).alphaMin(this.alphaMin).on("tick",this.ticked),this.simulation.on("end",()=>{tl("simulation end time",Date.now()),this.isThreatPath&&this.centerAndZoom(1)})},update(e=!1){var t;this.destroyed||(t=this.nodes)!=null&&t.length&&(this.initScript(),e&&this.updateSimulation(),this.doClearCanvas(),this.paintLinks(),this.paintNodes(),this.updateSelection(),this.ticked(),this.actNum===9&&setTimeout(()=>{this.centerAndZoom(.8)},200))},doClearCanvas(){Ht={},Ln={},this.layer.destroyChildren(),po=new _t.Group({id:"grab",x:0,y:0}),this.layer.add(po)},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 b,w,C,E,S,x,N,A,O,P,F,I,U,D;const o=(r.type==="nodeType"?this.iconSizeComputed[r.icon]||this.iconSizeComputed.node_type:this.iconSizeComputed[r.type])||24,s=(C=(w=(b=r==null?void 0:r.detail)==null?void 0:b.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);Ht[r.id]&&((N=Ht[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 j=Yh(s,this.levelList,this.darkMode),W=new _t.Circle({x:0,y:0,radius:20,fill:j,opacity:0}),X=new _t.Circle({x:0,y:0,radius:20,fill:j,opacity:0}),q=new _t.Circle({x:0,y:0,radius:20,fill:j,opacity:0});d.add(W),d.add(X),d.add(q);const z=(Z,J)=>new _t.Animation(function(te){const V=te.time,le=.5-.5*(V%J)/J,ae=40*(V%J)/J;Z.radius(ae||0),Z.opacity(le)},this.layer),H=z(W,1500),G=z(X,1500),B=z(q,1500);H.start(),setTimeout(function(){G.start()},500),setTimeout(function(){B.start()},1e3)}if(r.type==="ip"||r.type==="internet"){const j=new _t.Circle({x:0,y:0,fill:this.darkMode?"#182628":"#fff",radius:o/2,stroke:Yh(s,this.levelList),strokeWidth:2});d.add(j)}if(l){const j=(c?20:o)||24,W=l&&new _t.Image({x:0,y:0,offsetX:j/2,offsetY:j/2,image:l,width:j,height:j,draggable:!1});d.add(W)}if(r.detail&&r.type==="md5"){const j=((P=(O=(A=r.detail.info)==null?void 0:A.basic)==null?void 0:O.file_type)==null?void 0:P.toUpperCase())||"MD5",W=new _t.Text({name:"md5Text",x:0,y:0,text:j,fontSize:4,fontWeight:700,fontFamily:rUe,fill:this.darkMode?"#182628":"#fff",align:"center",listening:!1});W.x(W.x()-W.width()/2),d.add(W)}const u=r.textProp||"name",f=u==="name"?((I=(F=r==null?void 0:r.detail)==null?void 0:F.info)==null?void 0:I.name)||r.name:r[u];let h=f.length>14&&!iUe.includes(r.type)?f.slice(0,7)+"..."+f.slice(-7):f;h=Bae(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),(D=(U=r.detail)==null?void 0:U.tags)!=null&&D.length){const j=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(j)}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 j=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(j)}d.on("dragstart",(j,W)=>{j.evt[this.actKey]||(this.simulation.alpha(.8).restart(),this.isDragging=!0)}),d.on("dragmove",j=>{if(!j.evt[this.actKey]){var W=this.simulation.nodes().find(X=>X.id===r.id);W.x=d.x(),W.fx=d.x(),W.y=d.y(),W.fy=d.y(),this.links.forEach(X=>{const q=Ln[`${X.source.id}-${X.target.id}`].findOne(".konvaLine"),z=Ln[`${X.source.id}-${X.target.id}`].findOne(".linkArrow");if(X.source.id===W.id){const H=W.x,G=Ht[X.target.id].x(),B=W.y,Z=Ht[X.target.id].y();q.points([H,B,G,Z]);const J=I2(H,B,G,Z,q6);z==null||z.x(J==null?void 0:J.x),z==null||z.y(J==null?void 0:J.y),z==null||z.rotation(Math.atan2(Z-B,G-H)*(180/Math.PI))}else if(X.target.id===W.id){const H=Ht[X.source.id].x()||0,G=W.x||0,B=Ht[X.source.id].y()||0,Z=W.y||0;q.points([H,B,G,Z]);const J=I2(H,B,G,Z,q6);z==null||z.x(J==null?void 0:J.x),z==null||z.y(J==null?void 0:J.y),z==null||z.rotation(Math.atan2(Z-B,G-H)*(180/Math.PI))}}),this.layer.batchDraw()}}),d.on("dragend",j=>{j.evt[this.actKey]||(this.isDragging=!1)}),d.on("click",j=>{j.evt.detail===2?this.expandNodes(j,r):j.evt.detail===1&&j.evt.button===0&&this.handleNodeClick(j,r)}),d.on("contextmenu",j=>{j.cancelBubble=!0,j.evt.preventDefault(),j.evt.stopPropagation(),this.handleNodeContextMenu(j,r,d)}),d.on("mouseup",j=>this.handleNodeMouseUp(j,r)),d.on("mousedown",j=>this.handleNodeMouseDown(j,r)),d.on("mouseenter",j=>this.handleNodeMouseEnter(j,r)),d.on("mouseleave",j=>this.handleNodeMouseLeave(j,r)),po.add(d),Ht[r.id]=d})),this.stage.batchDraw()},paintLinks(){const e=this.stage.width()/2,t=this.stage.height()/2;this.links.forEach(n=>{Ln[`${n.source.id}-${n.target.id}`]&&Ln[`${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),po.add(r),r.moveToBottom(),Ln[`${n.source.id}-${n.target.id}`]=r}),this.stage.batchDraw()},updateSimulation(){var e;try{if(!this.simulation&&!this.hasSimulation){this.setSimulation();return}this.simulation.nodes(this.nodes),this.simulation.force("link").links(this.links),this.simulation.alpha(.8).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=Ln[`${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),b=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*b,u=u+C*w,f=f-E*b,h=h-E*w,isNaN(d)||isNaN(u)||isNaN(f)||isNaN(h)){e=!1;break}if(s==null||s.points([d,u,f,h]),c){const S=I2(d,u,f,h,q6);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))}if(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 S=Math.atan2(h-u,f-d)*(180/Math.PI);f<d?l.rotation(S+180):l.rotation(S)}}if(!e){console.log("请点击自动布局按钮"),this.resetLayout();return}for(let n=0;n<this.nodes.length;n++){const r=this.nodes[n];(t=Ht[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=Ln[`${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=Ln[`${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=Ln[`${r.source.id}-${r.target.id}`];o?s==null||s.addName("keyed"):s==null||s.removeName("keyed")}),this.nodes.forEach(r=>{const o=Ht[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=Ht[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=Ln[`${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;Ln[`${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.hasSimulation=!1,this.mousedownNode=null,this.mousedownPos=null,this.mouseupNode=null,this.$refs.canvasContainer&&((t=this.resizeObserver)==null||t.unobserve(this.$refs.canvasContainer)),this.nodes=[],this.links=[],this.resizeObserver=null,this.destroyed=!0,this.history.destroy&&this.history.destroy()},unbindKeyEvent(){this.initKeyEvent(1)},initKeyEvent(e=0){if(e){document.removeEventListener("keydown",this.keyDown),document.removeEventListener("keyup",this.keyUp);return}document.addEventListener("keydown",this.keyDown),document.addEventListener("keyup",this.keyUp),this.isKeyUp=!0},keyDown(e){const t=e.keyCode,n=e[this.actKey],r=e.shiftKey;if(this.isKeyUp)switch(t){case 17:break;case 16:this.toggleZoom(!1);break;case 38:break;case 40:this.goAction();break;case 67:if(window.getSelection().toString())return;n&&this.copyNodeText(this.selection);break;case 89:n&&!el()&&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(el())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(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=Ht[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,wi)||wi,this.scale=u;const f=this.stage.width()/(2*u),h=this.stage.height()/(2*u),p=Ht[e[0]],g=p==null?void 0:p.getClientRect(),y=g.x*u,b=g.y*u,w=f-y,C=h-b;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(Ht).forEach(t=>{Ht[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"?$ae(d):Qoe(d)}c.map(d=>{l(this.imgPath[`${o.prefix}d3svg1/${d}.svg`]).then(function(u){o.iconFiles[d]=u;const f=Mae(u).width;U6[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=eUe: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||jC(".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=Ht[t.id])==null||n.addName("isSelected"):(r=Ht[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({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,b=h+r;this.hoverNodePosition={top:y,right:g,bottom:b,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,Ht[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()},!po)return;const n=this.stage.width(),r=this.stage.height(),o=po.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,wi)||wi,!t&&l>wi)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",pS(d,u))),this.stage.setAttrs({scaleX:l,scaleY:l,x:0,y:0}),this.layer.batchDraw(),this.history.layoutIndex===1){const g=po.getClientRect(),y=(n-g.width)/2-g.x,b=(r-g.height)/2-g.y;this.stage.setAttrs({x:y,y:b}),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){un({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
+ `).slice(1));try{for(o.s();!(n=o.n()).done;){var s=Pze(n.value);s&&r.push(s)}}catch(c){o.e(c)}finally{o.f()}return r.slice(0,10)}var Ac=function(e){return Oze(e).toString()},j6=function(e){return e instanceof ErrorEvent?e.message==="Script error."?em:V1:rf},Ize=function(){function e(t){b0(this,e),Qi(this,"errorIdSet",new Set),this.webCoreIns=t,this.errorIdSet=new Set}return _0(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(j6(r)===em){var o={errorType:em,errorMessage:r.message,errorSummary:"CorsError",errorId:Ac("".concat(em,"-").concat(r.message))};t.commit(o)}}(n)},!0)}},{key:"onResourceError",value:function(t){if(j6(t)===rf){var n=t.target||t.srcElement,r=n.src||n.href,o=JSON.stringify(rf+": "+r||"UnKnown Resource"),s={errorType:rf,errorMessage:o,errorSummary:"ResourceError",errorId:Ac("".concat(rf,"-").concat(o))};this.commit(s)}}},{key:"onJSError",value:function(t){var n,r;if(j6(t)===V1){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:V1,errorMessage:o,errorSummary:t.error&&((r=t.error)===null||r===void 0?void 0:r.name)||"UnKnown",errorStack:JSON.stringify(tm(t.error)),errorId:Ac("".concat(V1,"-").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:b$,errorMessage:o,errorSummary:s,errorStack:JSON.stringify(tm(t.reason)),errorId:Ac("".concat(b$,"-").concat(o,"-").concat(s))};this.commit(c)}},{key:"onVueError",value:function(t,n,r){var o=JSON.stringify(t.message),s={errorType:_$,errorMessage:o,errorSummary:t.name||"UnKnown",errorStack:JSON.stringify(tm(t)),errorId:Ac("".concat(_$,"-").concat(o,"-").concat(t.name))};this.commit(s)}},{key:"onReactError",value:function(t,n){var r=JSON.stringify(t.message),o={errorType:w$,errorMessage:r,errorSummary:t.name||"UnKnown",errorStack:JSON.stringify(tm(t)),errorId:Ac("".concat(w$,"-").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(Jd({type:"error"},t)))}}]),e}(),Rze=function(e){function t(){var o,s=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return b0(this,t),(o=_4e(this,t,[s])).config=s,o.isReport()?(o.PerformancePluginInstance=new VBe(Zd(o)),o.WhiteScreenPluginInstance=new wDe(Zd(o)),o.ErrorPluginInstance=new Ize(Zd(o)),o.plugins=[o.PerformancePluginInstance,o.WhiteScreenPluginInstance,o.ErrorPluginInstance],o.init(),qk(t,t,Oc,Zd(o)),o):zk(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&&i3(o,s)}(t,bIe),_0(t,[{key:"isReport",value:function(){var o=this.isIE(),s=this.calcRatio();return this.config.appKey&&s&&!o}},{key:"init",value:(r=Qd($r().mark(function o(){return $r().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 Jd(Jd({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=Qd($r().mark(function o(s){var c,l;return $r().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=w4e(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]:{};C0(t,t,Oc)||(o.config.errorHandler=function(c,l,d){C0(t,t,Oc).ErrorPluginInstance.onVueError(c,l,d),console.error(c)},qk(t,t,Oc,new t(s)))}},{key:"sendError",value:function(o){C0(t,t,Oc)?C0(t,t,Oc).ErrorPluginInstance.onReactError(o):console.error("QAPM: 请先初始化 QAPM!")}}]),t}(),Oc={writable:!0,value:null};const vKe="",yKe="",Bze={components:{InfoFilled:ov,ArrowRight:rv},mixins:[oi],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:Wle,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(G2),(r=this.history.keyNodeIds)!=null&&r.some(w=>w===f.id)||(e.push(Y2),(s=(o=this.moduleDetail)==null?void 0:o.config)!=null&&s.hideCollectMenu||e.push(f.collect?K2:W2),e.push(f.textProp==="name"?U2:j2),f.label&&e.push(f.textProp==="label"?q2:H2)),this.canGoDetail&&e.push(GS)),e.push(f.fx?z2:D2);const h=this.history.dataNow.links.some(b=>b.source.id===f.id&&b.target.type==="aggregation"),y=this.history.dataNow.links.filter(b=>b.source.id===f.id).map(b=>b.target).some(b=>{let w=0;return this.history.dataNow.links.map(C=>{C.source.id===b.id&&w++}),w===0});h||f.type==="aggregation"?e.push(US):y&&e.push(jS),y&&e.push(zS),e.push(X2)}else this.nodeInfo.length>1?(e.push(Y2,G2),e.push(this.nodeInfo.some(h=>!h.collect)?W2:K2),this.nodeInfo.some(h=>h.label)&&e.push(this.nodeInfo.some(h=>h.textProp!=="label")?H2:q2),e.push(this.nodeInfo.some(h=>h.textProp!=="name")?j2:U2),e.push(this.nodeInfo.some(h=>!h.fx)?D2:z2),e.push(X2)):this.nodeInfo.length===0&&(this.history.dataNow.nodes.some(h=>h.label)&&e.push(this.history.dataNow.nodes.some(h=>h.textProp!=="label")?$S:MS),e.push(this.history.dataNow.nodes.some(h=>h.textProp!=="name")?BS:LS),e.push(this.history.dataNow.nodes.some(h=>!h.fx)?IS:RS),this.history.currentIndex>0&&e.push(FS),this.history.currentIndex<this.history.length-1&&e.push(DS));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(un({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){un({cId:"contextMenu-"+e.name,c:"右键菜单-"+e.namec}),be(this,"contextmenu-click",{nodes:this.nodeInfo,api:t,dataApi:e}),this.checkedItems={}}}},Pc=e=>(a.pushScopeId("data-v-10144870"),e=e(),a.popScopeId(),e),Lze={"aria-hidden":"true",style:{position:"absolute",width:"0",height:"0",overflow:"hidden",display:"none"}},Mze=[Pc(()=>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))],$ze={class:"cm-list"},Fze={class:"cm-ul"},Dze={class:"hd"},zze=["src"],jze={class:"bd"},Uze={class:"cm-ul cm-ul-level1"},qze=["title"],Hze=Pc(()=>a.createElementVNode("svg",{class:"icon","aria-hidden":"true"},[a.createElementVNode("use",{"xlink:href":"#icon-arrow-right"})],-1)),Gze=["title","onClick"],Wze=["title","onClick"],Kze={key:0,class:"icon","aria-hidden":"true"},Yze=[Pc(()=>a.createElementVNode("use",{"xlink:href":"#icon-arrow-right"},null,-1))],Xze=["title","onClick"],Jze=["src"],Qze=Pc(()=>a.createElementVNode("div",{class:"bd"},null,-1)),Zze=["title","onClick"],Vze={key:0,class:"fas el-icon-fa-cog"},eje={key:1,class:"fas el-icon-fa-external-link-alt"},tje={class:"text-wrapper"},nje=["src"],rje=["src"],ije={key:3,class:"shortcut"},oje={key:2,class:"icon","aria-hidden":"true"},aje=[Pc(()=>a.createElementVNode("use",{"xlink:href":"#icon-arrow-right"},null,-1))],sje=["title","onClick"],lje={key:1,class:"icon","aria-hidden":"true"},cje=[Pc(()=>a.createElementVNode("use",{"xlink:href":"#icon-arrow-right"},null,-1))],dje=["title","onClick"];function uje(e,t,n,r,o,s){const c=a.resolveComponent("ArrowRight"),l=tt,d=a.resolveComponent("InfoFilled"),u=nr;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",Lze,Mze)),a.createElementVNode("div",$ze,[a.createElementVNode("ul",Fze,[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",Dze,[a.createElementVNode("img",{src:e.imgPath["./public/d3svg1/button18/button_relation.svg"],style:{"margin-right":"10px"}},null,8,zze),a.createTextVNode("按关系分类拓线"),a.createVNode(l,null,{default:a.withCtx(()=>[a.createVNode(c)]),_:1})]),a.createElementVNode("div",jze,[a.createElementVNode("ul",Uze,[(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),Hze],10,qze)):(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,Gze)),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",Kze,Yze)):a.createCommentVNode("",!0)],10,Wze),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,b)=>(a.openBlock(),a.createElementBlock("li",{key:b,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,Xze)],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,Jze),a.createTextVNode("展开全部关系 ")]),Qze],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",Vze)):s.isExternalItem(f)?(a.openBlock(),a.createElementBlock("i",eje)):a.createCommentVNode("",!0),a.createElementVNode("div",tje,[f.icon?(a.openBlock(),a.createElementBlock("img",{key:0,src:e.imgPath["./public/d3svg1/button18/"+f.icon+".svg"],class:"t-icon"},null,8,nje)):(a.openBlock(),a.createElementBlock("img",{key:1,src:e.imgPath["./public/d3svg1/button18/button_"+f.name+".svg"],class:"t-icon"},null,8,rje)),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",ije,a.toDisplayString(f.shortcut),1)):a.createCommentVNode("",!0)]),s.hasChildren(f)?(a.openBlock(),a.createElementBlock("svg",oje,aje)):a.createCommentVNode("",!0)],10,Zze),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",lje,cje)):a.createCommentVNode("",!0)],10,sje),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,b)=>(a.openBlock(),a.createElementBlock("li",{key:b,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,dje)],4))),128))],4)):a.createCommentVNode("",!0)],4))),128))],4)):a.createCommentVNode("",!0)],4))),128))])])],4)):a.createCommentVNode("",!0)}const fje=De(Bze,[["render",uje],["__scopeId","data-v-10144870"]]),SKe="",xKe="",EKe="",kKe="",hje={name:"Popover",components:{ForceGraphSvgIcon:Ia},mixins:[oi],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(oe({},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 P2(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 Kh(e,this.levelList)},getColorStyle(e){return Yh(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&&rle(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(Gh(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)}}}},Ic=e=>(a.pushScopeId("data-v-1e5ef54c"),e=e(),a.popScopeId(),e),pje={key:0,class:"node-info-container"},gje={class:"popover-block popover-header"},mje={key:0,class:"popover-collect"},vje={key:1,class:"row-item"},yje={class:"label"},bje={key:2,class:"row-item"},_je=Ic(()=>a.createElementVNode("div",{class:"label"},"关系节点:",-1)),wje={class:"value"},Cje={class:"node-type-info"},Sje={class:"name"},xje={key:3,class:"row-item"},Eje=Ic(()=>a.createElementVNode("div",{class:"label"},"备注:",-1)),kje={class:"value"},Nje={class:"popover-block popover-fields"},Tje={key:0,class:"node-detail top-border"},Aje={key:0,class:"row-item"},Oje=Ic(()=>a.createElementVNode("div",{class:"label"},"危险级别:",-1)),Pje=["title"],Ije={key:1,class:"row-item row-item-tag"},Rje=Ic(()=>a.createElementVNode("div",{class:"label"},"标签:",-1)),Bje={class:"value"},Lje={class:"graph-tags-box"},Mje=Ic(()=>a.createElementVNode("br",null,null,-1)),$je={key:0,class:"row-item"},Fje={class:"label"},Dje=["title"],zje={key:1,class:"node-statistics top-border"},jje={class:"row-item node-num"},Uje=Ic(()=>a.createElementVNode("div",{class:"label"},"拓展节点统计:",-1)),qje={class:"value"},Hje={key:0},Gje={class:"danger"},Wje={key:2,class:"node-aggregation"},Kje={class:"aggregation-title"},Yje={class:"aggregation-box"},Xje={key:1,class:"node-info-container"},Jje={class:"popover-fields"},Qje={class:"top"};function Zje(e,t,n,r,o,s){const c=a.resolveComponent("force-graph-svg-icon"),l=nr,d=yd,u=_te,f=Ta,h=bte;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",pje,[a.createElementVNode("div",gje,[n.nodeInfo.collect?(a.openBlock(),a.createElementBlock("div",mje,[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",vje,[a.createElementVNode("div",yje,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",bje,[_je,a.createElementVNode("div",wje,[a.createElementVNode("div",Cje,[a.createElementVNode("div",Sje,a.toDisplayString(n.nodeInfo.name),1)])])])):a.createCommentVNode("",!0),n.nodeInfo.label?(a.openBlock(),a.createElementBlock("div",xje,[Eje,a.createElementVNode("div",kje,a.toDisplayString(n.nodeInfo.label),1)])):a.createCommentVNode("",!0)]),a.createElementVNode("div",Nje,[s.isNormalNode&&n.nodeInfo.detail?(a.openBlock(),a.createElementBlock("div",Tje,[s.canGoDetail?(a.openBlock(),a.createElementBlock("div",Aje,[Oje,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,Pje)])):a.createCommentVNode("",!0),n.nodeInfo.detail&&n.nodeInfo.detail.tags&&n.nodeInfo.detail.tags.length>0?(a.openBlock(),a.createElementBlock("div",Ije,[Rje,a.createElementVNode("div",Bje,[a.createElementVNode("div",Lje,[(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},[Mje,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",$je,[a.createElementVNode("div",Fje,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,Dje)])):a.createCommentVNode("",!0)],64))),256))])):a.createCommentVNode("",!0),s.isNodeTypeNode?(a.openBlock(),a.createElementBlock("div",zje,[a.createElementVNode("div",jje,[Uje,a.createElementVNode("div",qje,[s.getNodeTypeChildNum(n.nodeInfo.id).dangerChildNum>0?(a.openBlock(),a.createElementBlock("span",Hje,[a.createElementVNode("span",Gje,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",Wje,[a.createElementVNode("div",Kje,"聚合节点 ("+a.toDisplayString(o.aggregationList.length)+"个)",1),a.createElementVNode("div",Yje,[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",Xje,[a.createElementVNode("div",Jje,[a.createElementVNode("div",Qje,a.toDisplayString(n.nodeInfo.apiName),1)])]))])],38)}const Vje=De(hje,[["render",Zje],["__scopeId","data-v-1e5ef54c"]]),eUe=[{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:[]}],tUe={name:"vue-safe-force-graph",version:"2.0.29",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","vue-virtual-scroller":"^2.0.0-beta.8"},devDependencies:{"@babel/core":"^7.23.3","@babel/preset-env":"^7.23.3","@originjs/vite-plugin-commonjs":"^1.0.3","@q/qcdn":"^3.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"},UKe="",qKe="",HKe="",{toClipboard:nUe}=Xh(),rUe="Arial,Helvetica Neue,Helvetica,PingFang SC,Hiragino Sans GB,Microsoft YaHei,sans-serif",U6={},wi=1,iUe=["ip","intranet","internet"],q6=20;let Ht={},Ln={},po=null;const _r={},oUe={name:"ForceGraphRenderByCanvas",components:{Popover:Vje,NodeContextmenu:fje},mixins:[oi],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:el()?"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:wi,mousedownPos:null,mousedownNode:null,mouseupNode:null,dragLine:null,darkBgRect:null,inited:!1,hasSimulation:!1,nodesLength:0}},computed:{iconSizeComputed(){const e=b4e(U6);return this.nodeTypeList.forEach(t=>{e[t]=U6[t]*this.nodeTypeScale}),e},contextMenuNodes(){return this.contextMenuNode.id?this.selection.some(e=>e.id===this.contextMenuNode.id)?[...this.selection]:[this.contextMenuNode]:[]},showContextMenuFlag(){return this.requestGraphData?this.showContextMenu:!1}},watch:{data:{handler:function(){const e=this.nodesLength!==this.data.nodes.length;this.nodes=this.data.nodes,this.links=this.data.links,this.nodesLength=this.data.nodes.length,this.update(e)},deep:!0},moduleDetail:{handler:function(e){return 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(){tl("graph created time",Date.now()),ji.setProject("QH_10542_1724").getTrack(),localStorage.getItem("showSafeForceGraphLog")&&tl("组件版本: "+tUe.version),this.isThreatPath||this.initKeyEvent(),this.uniqueClass="unique"+new Date().getTime()+Math.floor(Math.random()*1e5)},mounted(){return Pe(this,null,function*(){new Rze({appKey:"fe-force-graph",ratio:50}),this.initForceGraph(),nle(this.levelList),!this.isThreatPath&&(Ro(Ke,"buttonClick",e=>{this.handleContextMenuClick(e)}),Ro(Ke,"relationClick",e=>{this.handleContextMenuClick(e)}),Ro(Ke,"sendNodesRange",(e,t)=>{e!==void 0&&(this.nodesRange=e,this.updateNodeStyle())}))})},beforeUnmount(){Bo(Ke,"buttonClick"),Bo(Ke,"relationClick"),Bo(Ke,"sendNodesRange"),this.unbindKeyEvent(),this.resetAll(),tl("destroy")},methods:{initForceGraph(){return Pe(this,null,function*(){if(this.inited)return;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.hasSimulation&&this.updateSimulation()}),this.resizeObserver.observe(e),document.addEventListener("click",this.hideContextMenu,!1),this.nodes=this.data.nodes,this.links=this.data.links,this.stage=new _t.Stage({container:e,width:t,height:n,scaleX:wi,scaleY:wi}),this.layer=new _t.Layer,po=new _t.Group({id:"grab",x:0,y:0}),this.layer.add(po);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},h=Math.min(s,s+l),p=Math.max(s,s+l),g=Math.min(c,c+d),y=Math.max(c,c+d);return f.x>=h&&f.x<=p&&f.y>=g&&f.y<=y}),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(),this.inited=!0})},setSimulation(){var n;if(this.hasSimulation||!((n=this.nodes)!=null&&n.length))return;const e=this.stage.width()/(2*wi),t=this.stage.height()/(2*wi);this.hasSimulation=!0,this.simulation=Sae(this.nodes).force("link",gae(this.links).id(r=>r.id).distance(120).strength(1)).force("charge",xae().strength(-600)).force("x",Eae()).force("y",kae()).force("center",pS(e,t)).alphaDecay(this.alphaDecay).alphaMin(this.alphaMin).on("tick",this.ticked),this.simulation.on("end",()=>{tl("simulation end time",Date.now()),this.isThreatPath&&this.centerAndZoom(1)})},update(e=!1){var t;this.destroyed||(t=this.nodes)!=null&&t.length&&(this.initScript(),e&&this.updateSimulation(),this.doClearCanvas(),this.paintLinks(),this.paintNodes(),this.updateSelection(),this.ticked(),this.actNum===9&&setTimeout(()=>{this.centerAndZoom(.8)},200))},doClearCanvas(){Ht={},Ln={},this.layer.destroyChildren(),po=new _t.Group({id:"grab",x:0,y:0}),this.layer.add(po)},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 b,w,C,E,S,x,N,A,O,P,F,I,U,D;const o=(r.type==="nodeType"?this.iconSizeComputed[r.icon]||this.iconSizeComputed.node_type:this.iconSizeComputed[r.type])||24,s=(C=(w=(b=r==null?void 0:r.detail)==null?void 0:b.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);Ht[r.id]&&((N=Ht[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 j=Yh(s,this.levelList,this.darkMode),W=new _t.Circle({x:0,y:0,radius:20,fill:j,opacity:0}),X=new _t.Circle({x:0,y:0,radius:20,fill:j,opacity:0}),q=new _t.Circle({x:0,y:0,radius:20,fill:j,opacity:0});d.add(W),d.add(X),d.add(q);const z=(Z,J)=>new _t.Animation(function(te){const V=te.time,le=.5-.5*(V%J)/J,ae=40*(V%J)/J;Z.radius(ae||0),Z.opacity(le)},this.layer),H=z(W,1500),G=z(X,1500),B=z(q,1500);H.start(),setTimeout(function(){G.start()},500),setTimeout(function(){B.start()},1e3)}if(r.type==="ip"||r.type==="internet"){const j=new _t.Circle({x:0,y:0,fill:this.darkMode?"#182628":"#fff",radius:o/2,stroke:Yh(s,this.levelList),strokeWidth:2});d.add(j)}if(l){const j=(c?20:o)||24,W=l&&new _t.Image({x:0,y:0,offsetX:j/2,offsetY:j/2,image:l,width:j,height:j,draggable:!1});d.add(W)}if(r.detail&&r.type==="md5"){const j=((P=(O=(A=r.detail.info)==null?void 0:A.basic)==null?void 0:O.file_type)==null?void 0:P.toUpperCase())||"MD5",W=new _t.Text({name:"md5Text",x:0,y:0,text:j,fontSize:4,fontWeight:700,fontFamily:rUe,fill:this.darkMode?"#182628":"#fff",align:"center",listening:!1});W.x(W.x()-W.width()/2),d.add(W)}const u=r.textProp||"name",f=u==="name"?((I=(F=r==null?void 0:r.detail)==null?void 0:F.info)==null?void 0:I.name)||r.name:r[u];let h=f.length>14&&!iUe.includes(r.type)?f.slice(0,7)+"..."+f.slice(-7):f;h=Bae(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),(D=(U=r.detail)==null?void 0:U.tags)!=null&&D.length){const j=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(j)}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 j=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(j)}d.on("dragstart",(j,W)=>{j.evt[this.actKey]||(this.simulation.alpha(.8).restart(),this.isDragging=!0)}),d.on("dragmove",j=>{if(!j.evt[this.actKey]){var W=this.simulation.nodes().find(X=>X.id===r.id);W.x=d.x(),W.fx=d.x(),W.y=d.y(),W.fy=d.y(),this.links.forEach(X=>{const q=Ln[`${X.source.id}-${X.target.id}`].findOne(".konvaLine"),z=Ln[`${X.source.id}-${X.target.id}`].findOne(".linkArrow");if(X.source.id===W.id){const H=W.x,G=Ht[X.target.id].x(),B=W.y,Z=Ht[X.target.id].y();q.points([H,B,G,Z]);const J=I2(H,B,G,Z,q6);z==null||z.x(J==null?void 0:J.x),z==null||z.y(J==null?void 0:J.y),z==null||z.rotation(Math.atan2(Z-B,G-H)*(180/Math.PI))}else if(X.target.id===W.id){const H=Ht[X.source.id].x()||0,G=W.x||0,B=Ht[X.source.id].y()||0,Z=W.y||0;q.points([H,B,G,Z]);const J=I2(H,B,G,Z,q6);z==null||z.x(J==null?void 0:J.x),z==null||z.y(J==null?void 0:J.y),z==null||z.rotation(Math.atan2(Z-B,G-H)*(180/Math.PI))}}),this.layer.batchDraw()}}),d.on("dragend",j=>{j.evt[this.actKey]||(this.isDragging=!1)}),d.on("click",j=>{j.evt.detail===2?this.expandNodes(j,r):j.evt.detail===1&&j.evt.button===0&&this.handleNodeClick(j,r)}),d.on("contextmenu",j=>{j.cancelBubble=!0,j.evt.preventDefault(),j.evt.stopPropagation(),this.handleNodeContextMenu(j,r,d)}),d.on("mouseup",j=>this.handleNodeMouseUp(j,r)),d.on("mousedown",j=>this.handleNodeMouseDown(j,r)),d.on("mouseenter",j=>this.handleNodeMouseEnter(j,r)),d.on("mouseleave",j=>this.handleNodeMouseLeave(j,r)),po.add(d),Ht[r.id]=d})),this.stage.batchDraw()},paintLinks(){const e=this.stage.width()/2,t=this.stage.height()/2;this.links.forEach(n=>{Ln[`${n.source.id}-${n.target.id}`]&&Ln[`${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),po.add(r),r.moveToBottom(),Ln[`${n.source.id}-${n.target.id}`]=r}),this.stage.batchDraw()},updateSimulation(){var e;try{if(!this.simulation&&!this.hasSimulation){this.setSimulation();return}this.simulation.nodes(this.nodes),this.simulation.force("link").links(this.links),this.simulation.alpha(.8).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=Ln[`${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),b=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*b,u=u+C*w,f=f-E*b,h=h-E*w,isNaN(d)||isNaN(u)||isNaN(f)||isNaN(h)){e=!1;break}if(s==null||s.points([d,u,f,h]),c){const S=I2(d,u,f,h,q6);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))}if(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 S=Math.atan2(h-u,f-d)*(180/Math.PI);f<d?l.rotation(S+180):l.rotation(S)}}if(!e){console.log("请点击自动布局按钮"),this.resetLayout();return}for(let n=0;n<this.nodes.length;n++){const r=this.nodes[n];(t=Ht[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=Ln[`${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=Ln[`${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=Ln[`${r.source.id}-${r.target.id}`];o?s==null||s.addName("keyed"):s==null||s.removeName("keyed")}),this.nodes.forEach(r=>{const o=Ht[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=Ht[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=Ln[`${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;Ln[`${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.hasSimulation=!1,this.mousedownNode=null,this.mousedownPos=null,this.mouseupNode=null,this.$refs.canvasContainer&&((t=this.resizeObserver)==null||t.unobserve(this.$refs.canvasContainer)),this.nodes=[],this.links=[],this.resizeObserver=null,this.destroyed=!0,this.history.destroy&&this.history.destroy()},unbindKeyEvent(){this.initKeyEvent(1)},initKeyEvent(e=0){if(e){document.removeEventListener("keydown",this.keyDown),document.removeEventListener("keyup",this.keyUp);return}document.addEventListener("keydown",this.keyDown),document.addEventListener("keyup",this.keyUp),this.isKeyUp=!0},keyDown(e){const t=e.keyCode,n=e[this.actKey],r=e.shiftKey;if(this.isKeyUp)switch(t){case 17:break;case 16:this.toggleZoom(!1);break;case 38:break;case 40:this.goAction();break;case 67:if(window.getSelection().toString())return;n&&this.copyNodeText(this.selection);break;case 89:n&&!el()&&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(el())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(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=Ht[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,wi)||wi,this.scale=u;const f=this.stage.width()/(2*u),h=this.stage.height()/(2*u),p=Ht[e[0]],g=p==null?void 0:p.getClientRect(),y=g.x*u,b=g.y*u,w=f-y,C=h-b;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(Ht).forEach(t=>{Ht[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"?$ae(d):Qoe(d)}c.map(d=>{l(this.imgPath[`${o.prefix}d3svg1/${d}.svg`]).then(function(u){o.iconFiles[d]=u;const f=Mae(u).width;U6[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=eUe: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||jC(".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=Ht[t.id])==null||n.addName("isSelected"):(r=Ht[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({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,b=h+r;this.hoverNodePosition={top:y,right:g,bottom:b,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,Ht[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()},!po)return;const n=this.stage.width(),r=this.stage.height(),o=po.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,wi)||wi,!t&&l>wi)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",pS(d,u))),this.stage.setAttrs({scaleX:l,scaleY:l,x:0,y:0}),this.layer.batchDraw(),this.history.layoutIndex===1){const g=po.getClientRect(),y=(n-g.width)/2-g.x,b=(r-g.height)/2-g.y;this.stage.setAttrs({x:y,y:b}),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){un({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+`
152
152
  `}),t&&nUe(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;EC.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=Ht[l.id];d==null||d.removeName("lowlight")}),this.links.forEach(l=>{const d=Ln[`${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=Ht[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"&&(P2(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=Ln[`${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():Ld(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,f,h;let t=null;const n=(c=(s=(o=e.detail)==null?void 0:o.info)==null?void 0:s.basic)==null?void 0:c.flag,r=((u=(d=(l=e==null?void 0:e.detail)==null?void 0:l.info)==null?void 0:d.basic)==null?void 0:u.level)||"未知";if(e.detail&&((h=(f=e.detail)==null?void 0:f.info)!=null&&h.inner_img))t=yield Vs(e.detail.info.inner_img);else if(e.type==="nodeType"||e.type==="aggregation"){const p=e.icon||"node_type";if(_r[p])return t=_r[p],t;t=this.iconFiles[p]?this.iconFiles[p]:this.iconFiles.node_type,t=yield Vs("data:image/svg+xml,"+encodeURIComponent(t)),_r[p]=t}else if(n&&(e.type==="ip"||e.type==="internet")){if(_r[n])return t=_r[n],t;yield this.loadFlagFiles(n),t=yield Vs(this.flagFiles[n]),_r[n]=t}else if(e.detail&&(e.type==="country"||e.type==="target_country")){const p=e.detail.info.inner_country;if(_r[p])return t=_r[p],t;yield this.loadFlagFiles(p),t=yield Vs(this.flagFiles[p]),_r[p]=t}else{const p=`${e.type||"node"}${r}${this.darkMode}`;if(_r[p])return t=_r[p],t;t=this.iconFiles[e.type]?this.iconFiles[e.type]:this.iconFiles.node;const g=Yh(r,this.levelList,this.darkMode),y=this.darkMode?"#182628":"#fff";t=Lae(t,g,y),t=yield Vs("data:image/svg+xml,"+encodeURIComponent(t)),_r[p]=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()}}},aUe={class:"main-svg-box"},sUe={ref:"canvasContainer",class:"canvas-container"};function lUe(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",aUe,[a.createElementVNode("div",sUe,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 Rc=De(oUe,[["render",lUe]]),GKe="",WKe="",KKe="",{toClipboard:k$}=Xh(),cUe={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){k$(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"?(k$(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=""}}},dUe={class:"sharetoEvents"},uUe={class:"lable-header"},fUe={class:"desc"},hUe={key:0,class:"desc-font"},pUe={key:1,class:"desc-font"},gUe={class:"dialog-footer"};function mUe(e,t,n,r,o,s){const c=JZ,l=ch,d=lh,u=Av,f=ka,h=Tv,p=Ta,g=bd;return a.openBlock(),a.createElementBlock("div",dUe,[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",gUe,[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",uUe,[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",fUe,[o.ruleForm.radio==="0"?(a.openBlock(),a.createElementBlock("span",hUe,"该Graph内容对所有用户可见。")):(a.openBlock(),a.createElementBlock("span",pUe,"该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 vUe=De(cUe,[["render",mUe]]),YKe="",{toClipboard:yUe}=Xh(),bUe={name:"SnapShotDialog",components:{ShareToSecurityEvents:vUe},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(){Ro(Ke,"sharePermission",e=>{this.isInnerAccount=e})},updated(){},beforeUnmount(){Bo(Ke,"sharePermission")},methods:{hanleClickCopy(e){yUe(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()}}},_Ue={class:"snapshotdialog-container"},wUe={class:"dialog-footer"};function CUe(e,t,n,r,o,s){const c=ka,l=CV,d=Ta,u=bd,f=a.resolveComponent("ShareToSecurityEvents");return a.openBlock(),a.createElementBlock("div",_Ue,[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",wUe,[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 SUe=De(bUe,[["render",CUe]]),XKe="",xUe={name:"ForceGraphByCanvas",components:{Loading:If,ForceGraphSvgIcon:Ia,RenderByCanvas:Rc,ButtonList:uhe,SnapShotDialog:SUe,RightMenu:Vde,Legend:zue},mixins:[oi],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 Nae({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(),Ro(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=>{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;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=Ui(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(oe({},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});const c=[];let l=[];if(s&&s.forEach(u=>{if(e.getData[u.api]=!0,this.history.dataNow.nodes.find(b=>b.id===e.id)&&(this.history.dataNow.nodes.find(b=>b.id===e.id).getData[u.api]=!0),!u.data)return;let f;const h=u.data.nodes.map(b=>(b.group=e.id+"-"+u.api,b.groupC=u.apiC,b=Ui(b,this.moduleDetail.plugs),b)),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=Ui(g,this.moduleDetail.plugs),this.nodeTypeList.push(u.icon||"node_type"),h.length>0&&this.isRenderStartNode){if(f=u.data.links.map(b=>{let w;if(b.source===e.id){const C=this.history.dataNow.nodes.filter(E=>E.id===b.target);if(C.length>0&&(w=this.findGrandSonNodeIds(C[0]).indexOf(b.source)>=0),!u.api.canLoop&&w)return;b.source=p}else b.target===e.id&&(b.target=p);return b}).filter(b=>b),f.length===0)return;f.push(y)}else f=u.data.links;if(this.isRenderStartNode&&h.length>=this.singlesNodeMaxNum){let b=null,w=null;const C=String(Math.floor(new Date().getTime()));b={id:C,list:h,type:"aggregation",name:"聚合",relationId:g.id},b=Ui(b,this.moduleDetail.plugs),w={source:g.id,target:C,uniqueIndex:this.generateUniqueIndexNow()};const E={addOne:{nodes:[g,b],links:[y,w]},type:"aggregation"};this.history.pushState(E),this.getNodeDetail(b.list,b.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=Ui(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 b=de(oe({},y),{source:y.source,target:p}),w=de(oe({},y),{source:p,target:y.target});h.push(b),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&&(tl(" 数据加载完"),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(oe({},e),{detail:null,diy:!0,group:e.id});s=Ui(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=Ui(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(oe({},e),{detail:null,diy:!0,group:e.id});c=Ui(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=Ui(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*(){EC.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(){un({cId:"toggleFullScreen",c:"切换全屏"}),document.fullscreenElement?document.exitFullscreen&&document.exitFullscreen():document.getElementById("force-d3-container").requestFullscreen()},zoomView(e="in"){e==="in"?(un({cId:"zoomIn",c:"zoomIn"}),this.$refs.render.zoomIn()):(un({cId:"zoomOut",c:"zoomOut"}),this.$refs.render.zoomOut())},fitScreen(){var e;un({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()}}},EUe={id:"force-d3-container",class:"d3-container"},kUe=["innerHTML"],NUe=a.createElementVNode("div",{class:"top-line-bg"},null,-1),TUe={class:"top-item"},AUe={class:"top-line"},OUe={key:1,class:"select-num"},PUe={class:"highlight"},IUe={class:"loading-container"},RUe={class:"corner-button-box"};function BUe(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=nr,g=a.resolveComponent("RightMenu"),y=a.resolveComponent("SnapShotDialog"),b=ine;return a.withDirectives((a.openBlock(),a.createElementBlock("div",EUe,[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,kUe)):a.createCommentVNode("",!0),NUe,a.createElementVNode("div",TUe,[a.createElementVNode("div",AUe,[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",OUe,[a.createTextVNode(" 已选择"),a.createElementVNode("span",PUe,a.toDisplayString(o.selection.length),1),a.createTextVNode("项 ")])):a.createCommentVNode("",!0),a.withDirectives(a.createElementVNode("div",IUe,[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,"show-level-count":n.showLevelCount,margin:o.margin,onHighLight:s.handleHighLight},null,8,["show-point","history","module-detail","has-level","show-level-count","margin","onHighLight"]),a.createElementVNode("div",RUe,[!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"])])),[[b,o.bigLoading]])}const of=De(xUe,[["render",BUe]]);of.install=function(e){e.component(of.name,of)},Rc.install=function(e){e.component(Rc.name,Rc)};const JKe="",LUe=[of,Rc],MUe={install:function(e,t={}){LUe.forEach(n=>{e.component(n.name,n)})}};Me.Graph=of,Me.Render=Rc,Me.default=MUe,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.28",
3
+ "version": "2.0.29",
4
4
  "description": "force_graph in security area",
5
5
  "author": "jason zhang",
6
6
  "module": "./lib/vue-safe-force-graph.js",