vue-safe-force-graph 2.0.72 → 2.0.73
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.
- package/lib/style.css +1 -1
- package/lib/vue-safe-force-graph.js +3 -2
- package/lib/vue-safe-force-graph.umd.cjs +9 -9
- package/lib/web-component/style.css +1 -1
- package/lib/web-component/vue-safe-force-graph.js +239 -238
- package/lib/web-component/vue-safe-force-graph.umd.cjs +25 -25
- package/package.json +2 -1
|
@@ -39,7 +39,7 @@
|
|
|
39
39
|
m 0 ${E?"":"-"}${S}
|
|
40
40
|
a ${S} ${S} 0 1 1 0 ${E?"-":""}${S*2}
|
|
41
41
|
a ${S} ${S} 0 1 1 0 ${E?"":"-"}${S*2}
|
|
42
|
-
`}),u=o.computed(()=>2*Math.PI*l.value),d=o.computed(()=>t.type==="dashboard"?.75:1),f=o.computed(()=>`${-1*u.value*(1-d.value)/2}px`),p=o.computed(()=>({strokeDasharray:`${u.value*d.value}px, ${u.value}px`,strokeDashoffset:f.value})),g=o.computed(()=>({strokeDasharray:`${u.value*d.value*(t.percentage/100)}px, ${u.value}px`,strokeDashoffset:f.value,transition:"stroke-dasharray 0.6s ease 0s, stroke 0.6s ease, opacity ease 0.6s"})),v=o.computed(()=>{let S;return t.color?S=k(t.percentage):S=n[t.status]||n.default,S}),b=o.computed(()=>t.status==="warning"?xf:t.type==="line"?t.status==="success"?Sf:Hl:t.status==="success"?_1:Do),w=o.computed(()=>t.type==="line"?12+t.strokeWidth*.4:t.width*.111111+2),_=o.computed(()=>t.format(t.percentage));function C(S){const E=100/S.length;return S.map((A,I)=>ct(A)?{color:A,percentage:(I+1)*E}:A).sort((A,I)=>A.percentage-I.percentage)}const k=S=>{var E;const{color:N}=t;if(it(N))return N(S);if(ct(N))return N;{const A=C(N);for(const I of A)if(I.percentage>S)return I.color;return(E=A[A.length-1])==null?void 0:E.color}};return(S,E)=>(o.openBlock(),o.createElementBlock("div",{class:o.normalizeClass([o.unref(r).b(),o.unref(r).m(S.type),o.unref(r).is(S.status),{[o.unref(r).m("without-text")]:!S.showText,[o.unref(r).m("text-inside")]:S.textInside}]),role:"progressbar","aria-valuenow":S.percentage,"aria-valuemin":"0","aria-valuemax":"100"},[S.type==="line"?(o.openBlock(),o.createElementBlock("div",{key:0,class:o.normalizeClass(o.unref(r).b("bar"))},[o.createElementVNode("div",{class:o.normalizeClass(o.unref(r).be("bar","outer")),style:o.normalizeStyle({height:`${S.strokeWidth}px`})},[o.createElementVNode("div",{class:o.normalizeClass([o.unref(r).be("bar","inner"),{[o.unref(r).bem("bar","inner","indeterminate")]:S.indeterminate},{[o.unref(r).bem("bar","inner","striped")]:S.striped},{[o.unref(r).bem("bar","inner","striped-flow")]:S.stripedFlow}]),style:o.normalizeStyle(o.unref(s))},[(S.showText||S.$slots.default)&&S.textInside?(o.openBlock(),o.createElementBlock("div",{key:0,class:o.normalizeClass(o.unref(r).be("bar","innerText"))},[o.renderSlot(S.$slots,"default",{percentage:S.percentage},()=>[o.createElementVNode("span",null,o.toDisplayString(o.unref(_)),1)])],2)):o.createCommentVNode("v-if",!0)],6)],6)],2)):(o.openBlock(),o.createElementBlock("div",{key:1,class:o.normalizeClass(o.unref(r).b("circle")),style:o.normalizeStyle({height:`${S.width}px`,width:`${S.width}px`})},[(o.openBlock(),o.createElementBlock("svg",{viewBox:"0 0 100 100"},[o.createElementVNode("path",{class:o.normalizeClass(o.unref(r).be("circle","track")),d:o.unref(c),stroke:`var(${o.unref(r).cssVarName("fill-color-light")}, #e5e9f2)`,"stroke-linecap":S.strokeLinecap,"stroke-width":o.unref(a),fill:"none",style:o.normalizeStyle(o.unref(p))},null,14,["d","stroke","stroke-linecap","stroke-width"]),o.createElementVNode("path",{class:o.normalizeClass(o.unref(r).be("circle","path")),d:o.unref(c),stroke:o.unref(v),fill:"none",opacity:S.percentage?1:0,"stroke-linecap":S.strokeLinecap,"stroke-width":o.unref(a),style:o.normalizeStyle(o.unref(g))},null,14,["d","stroke","opacity","stroke-linecap","stroke-width"])]))],6)),(S.showText||S.$slots.default)&&!S.textInside?(o.openBlock(),o.createElementBlock("div",{key:2,class:o.normalizeClass(o.unref(r).e("text")),style:o.normalizeStyle({fontSize:`${o.unref(w)}px`})},[o.renderSlot(S.$slots,"default",{percentage:S.percentage},()=>[S.status?(o.openBlock(),o.createBlock(o.unref(Ye),{key:1},{default:o.withCtx(()=>[(o.openBlock(),o.createBlock(o.resolveDynamicComponent(o.unref(b))))]),_:1})):(o.openBlock(),o.createElementBlock("span",{key:0},o.toDisplayString(o.unref(_)),1))])],6)):o.createCommentVNode("v-if",!0)],10,["aria-valuenow"]))}}));var aR=Oe(sR,[["__file","progress.vue"]]);const lR=kt(aR),bh=function(e){var t;return(t=e.target)==null?void 0:t.closest("td")},cR=function(e,t,n,r,s){if(!t&&!r&&(!s||Array.isArray(s)&&!s.length))return e;typeof n=="string"?n=n==="descending"?-1:1:n=n&&n<0?-1:1;const a=r?null:function(c,u){return s?(Array.isArray(s)||(s=[s]),s.map(d=>typeof d=="string"?kn(c,d):d(c,u,e))):(t!=="$key"&&Lt(c)&&"$value"in c&&(c=c.$value),[Lt(c)?kn(c,t):c])},l=function(c,u){if(r)return r(c.value,u.value);for(let d=0,f=c.key.length;d<f;d++){if(c.key[d]<u.key[d])return-1;if(c.key[d]>u.key[d])return 1}return 0};return e.map((c,u)=>({value:c,index:u,key:a?a(c,u):null})).sort((c,u)=>{let d=l(c,u);return d||(d=c.index-u.index),d*+n}).map(c=>c.value)},Lb=function(e,t){let n=null;return e.columns.forEach(r=>{r.id===t&&(n=r)}),n},dR=function(e,t){let n=null;for(let r=0;r<e.columns.length;r++){const s=e.columns[r];if(s.columnKey===t){n=s;break}}return n||hi("ElTable",`No column matching with column-key: ${t}`),n},Rb=function(e,t,n){const r=(t.className||"").match(new RegExp(`${n}-table_[^\\s]+`,"gm"));return r?Lb(e,r[0]):null},Ut=(e,t)=>{if(!e)throw new Error("Row is required when get row identity");if(typeof t=="string"){if(!t.includes("."))return`${e[t]}`;const n=t.split(".");let r=e;for(const s of n)r=r[s];return`${r}`}else if(typeof t=="function")return t.call(null,e)},oo=function(e,t){const n={};return(e||[]).forEach((r,s)=>{n[Ut(r,t)]={row:r,index:s}}),n};function uR(e,t){const n={};let r;for(r in e)n[r]=e[r];for(r in t)if(zr(t,r)){const s=t[r];typeof s!="undefined"&&(n[r]=s)}return n}function wh(e){return e===""||e!==void 0&&(e=Number.parseInt(e,10),Number.isNaN(e)&&(e="")),e}function Pb(e){return e===""||e!==void 0&&(e=wh(e),Number.isNaN(e)&&(e=80)),e}function fR(e){return typeof e=="number"?e:typeof e=="string"?/^\d+(?:px)?$/.test(e)?Number.parseInt(e,10):e:null}function hR(...e){return e.length===0?t=>t:e.length===1?e[0]:e.reduce((t,n)=>(...r)=>t(n(...r)))}function yc(e,t,n,r,s,a){let l=a!=null?a:0,c=!1;const u=e.indexOf(t),d=u!==-1,f=s==null?void 0:s.call(null,t,a),p=v=>{v==="add"?e.push(t):e.splice(u,1),c=!0},g=v=>{let b=0;const w=(r==null?void 0:r.children)&&v[r.children];return w&&Tt(w)&&(b+=w.length,w.forEach(_=>{b+=g(_)})),b};return(!s||f)&&(rn(n)?n&&!d?p("add"):!n&&d&&p("remove"):p(d?"remove":"add")),!(r!=null&&r.checkStrictly)&&(r!=null&&r.children)&&Tt(t[r.children])&&t[r.children].forEach(v=>{yc(e,v,n!=null?n:!d,r,s,l+1),l+=g(v)+1}),c}function pR(e,t,n="children",r="hasChildren"){const s=l=>!(Array.isArray(l)&&l.length);function a(l,c,u){t(l,c,u),c.forEach(d=>{if(d[r]){t(d,null,u+1);return}const f=d[n];s(f)||a(d,f,u+1)})}e.forEach(l=>{if(l[r]){t(l,null,0);return}const c=l[n];s(c)||a(l,c,0)})}let In=null;function gR(e,t,n,r){if((In==null?void 0:In.trigger)===n)return;In==null||In();const s=r==null?void 0:r.refs.tableWrapper,a=s==null?void 0:s.dataset.prefix,l=ne({strategy:"fixed"},e.popperOptions),c=o.createVNode(gn,fe(ne({content:t,virtualTriggering:!0,virtualRef:n,appendTo:s,placement:"top",transition:"none",offset:0,hideAfter:0},e),{popperOptions:l,onHide:()=>{In==null||In()}}));c.appContext=ne(ne({},r.appContext),r);const u=document.createElement("div");o.render(c,u),c.component.exposed.onOpen();const d=s==null?void 0:s.querySelector(`.${a}-scrollbar__wrap`);In=()=>{o.render(null,u),d==null||d.removeEventListener("scroll",In),In=null},In.trigger=n,d==null||d.addEventListener("scroll",In)}function Db(e){return e.children?nN(e.children,Db):[e]}function Mb(e,t){return e+t.colSpan}const Fb=(e,t,n,r)=>{let s=0,a=e;const l=n.states.columns.value;if(r){const u=Db(r[e]);s=l.slice(0,l.indexOf(u[0])).reduce(Mb,0),a=s+u.reduce(Mb,0)-1}else s=e;let c;switch(t){case"left":a<n.states.fixedLeafColumnsLength.value&&(c="left");break;case"right":s>=l.length-n.states.rightFixedLeafColumnsLength.value&&(c="right");break;default:a<n.states.fixedLeafColumnsLength.value?c="left":s>=l.length-n.states.rightFixedLeafColumnsLength.value&&(c="right")}return c?{direction:c,start:s,after:a}:{}},_h=(e,t,n,r,s,a=0)=>{const l=[],{direction:c,start:u,after:d}=Fb(t,n,r,s);if(c){const f=c==="left";l.push(`${e}-fixed-column--${c}`),f&&d+a===r.states.fixedLeafColumnsLength.value-1?l.push("is-last-column"):!f&&u-a===r.states.columns.value.length-r.states.rightFixedLeafColumnsLength.value&&l.push("is-first-column")}return l};function $b(e,t){return e+(t.realWidth===null||Number.isNaN(t.realWidth)?Number(t.width):t.realWidth)}const Ch=(e,t,n,r)=>{const{direction:s,start:a=0,after:l=0}=Fb(e,t,n,r);if(!s)return;const c={},u=s==="left",d=n.states.columns.value;return u?c.left=d.slice(0,a).reduce($b,0):c.right=d.slice(l+1).reverse().reduce($b,0),c},Qo=(e,t)=>{e&&(Number.isNaN(e[t])||(e[t]=`${e[t]}px`))};function mR(e){const t=o.getCurrentInstance(),n=o.ref(!1),r=o.ref([]);return{updateExpandRows:()=>{const u=e.data.value||[],d=e.rowKey.value;if(n.value)r.value=u.slice();else if(d){const f=oo(r.value,d);r.value=u.reduce((p,g)=>{const v=Ut(g,d);return f[v]&&p.push(g),p},[])}else r.value=[]},toggleRowExpansion:(u,d)=>{yc(r.value,u,d)&&t.emit("expand-change",u,r.value.slice())},setExpandRowKeys:u=>{t.store.assertRowKey();const d=e.data.value||[],f=e.rowKey.value,p=oo(d,f);r.value=u.reduce((g,v)=>{const b=p[v];return b&&g.push(b.row),g},[])},isRowExpanded:u=>{const d=e.rowKey.value;return d?!!oo(r.value,d)[Ut(u,d)]:r.value.includes(u)},states:{expandRows:r,defaultExpandAll:n}}}function vR(e){const t=o.getCurrentInstance(),n=o.ref(null),r=o.ref(null),s=d=>{t.store.assertRowKey(),n.value=d,l(d)},a=()=>{n.value=null},l=d=>{const{data:f,rowKey:p}=e;let g=null;p.value&&(g=(o.unref(f)||[]).find(v=>Ut(v,p.value)===d)),r.value=g,t.emit("current-change",r.value,null)};return{setCurrentRowKey:s,restoreCurrentRowKey:a,setCurrentRowByKey:l,updateCurrentRow:d=>{const f=r.value;if(d&&d!==f){r.value=d,t.emit("current-change",r.value,f);return}!d&&f&&(r.value=null,t.emit("current-change",null,f))},updateCurrentRowData:()=>{const d=e.rowKey.value,f=e.data.value||[],p=r.value;if(!f.includes(p)&&p){if(d){const g=Ut(p,d);l(g)}else r.value=null;r.value===null&&t.emit("current-change",null,p)}else n.value&&(l(n.value),a())},states:{_currentRowKey:n,currentRow:r}}}function yR(e){const t=o.ref([]),n=o.ref({}),r=o.ref(16),s=o.ref(!1),a=o.ref({}),l=o.ref("hasChildren"),c=o.ref("children"),u=o.ref(!1),d=o.getCurrentInstance(),f=o.computed(()=>{if(!e.rowKey.value)return{};const k=e.data.value||[];return g(k)}),p=o.computed(()=>{const k=e.rowKey.value,S=Object.keys(a.value),E={};return S.length&&S.forEach(N=>{if(a.value[N].length){const A={children:[]};a.value[N].forEach(I=>{const O=Ut(I,k);A.children.push(O),I[l.value]&&!E[O]&&(E[O]={children:[]})}),E[N]=A}}),E}),g=k=>{const S=e.rowKey.value,E={};return pR(k,(N,A,I)=>{const O=Ut(N,S);Array.isArray(A)?E[O]={children:A.map(F=>Ut(F,S)),level:I}:s.value&&(E[O]={children:[],lazy:!0,level:I})},c.value,l.value),E},v=(k=!1,S=(E=>(E=d.store)==null?void 0:E.states.defaultExpandAll.value)())=>{var E;const N=f.value,A=p.value,I=Object.keys(N),O={};if(I.length){const F=o.unref(n),P=[],M=(U,Q)=>{if(k)return t.value?S||t.value.includes(Q):!!(S||U!=null&&U.expanded);{const q=S||t.value&&t.value.includes(Q);return!!(U!=null&&U.expanded||q)}};I.forEach(U=>{const Q=F[U],q=ne({},N[U]);if(q.expanded=M(Q,U),q.lazy){const{loaded:D=!1,loading:j=!1}=Q||{};q.loaded=!!D,q.loading=!!j,P.push(U)}O[U]=q});const W=Object.keys(A);s.value&&W.length&&P.length&&W.forEach(U=>{const Q=F[U],q=A[U].children;if(P.includes(U)){if(O[U].children.length!==0)throw new Error("[ElTable]children must be an empty array.");O[U].children=q}else{const{loaded:D=!1,loading:j=!1}=Q||{};O[U]={lazy:!0,loaded:!!D,loading:!!j,expanded:M(Q,U),children:q,level:""}}})}n.value=O,(E=d.store)==null||E.updateTableScrollY()};o.watch(()=>t.value,()=>{v(!0)}),o.watch(()=>f.value,()=>{v()}),o.watch(()=>p.value,()=>{v()});const b=k=>{t.value=k,v()},w=(k,S)=>{d.store.assertRowKey();const E=e.rowKey.value,N=Ut(k,E),A=N&&n.value[N];if(N&&A&&"expanded"in A){const I=A.expanded;S=typeof S=="undefined"?!A.expanded:S,n.value[N].expanded=S,I!==S&&d.emit("expand-change",k,S),d.store.updateTableScrollY()}},_=k=>{d.store.assertRowKey();const S=e.rowKey.value,E=Ut(k,S),N=n.value[E];s.value&&N&&"loaded"in N&&!N.loaded?C(k,E,N):w(k,void 0)},C=(k,S,E)=>{const{load:N}=d.props;N&&!n.value[S].loaded&&(n.value[S].loading=!0,N(k,E,A=>{if(!Array.isArray(A))throw new TypeError("[ElTable] data must be an array");n.value[S].loading=!1,n.value[S].loaded=!0,n.value[S].expanded=!0,A.length&&(a.value[S]=A),d.emit("expand-change",k,!0)}))};return{loadData:C,loadOrToggle:_,toggleTreeExpansion:w,updateTreeExpandKeys:b,updateTreeData:v,normalize:g,states:{expandRowKeys:t,treeData:n,indent:r,lazy:s,lazyTreeNodeMap:a,lazyColumnIdentifier:l,childrenColumnName:c,checkStrictly:u}}}const bR=(e,t)=>{const n=t.sortingColumn;return!n||typeof n.sortable=="string"?e:cR(e,t.sortProp,t.sortOrder,n.sortMethod,n.sortBy)},bc=e=>{const t=[];return e.forEach(n=>{n.children&&n.children.length>0?t.push.apply(t,bc(n.children)):t.push(n)}),t};function wR(){var e;const t=o.getCurrentInstance(),{size:n}=o.toRefs((e=t.proxy)==null?void 0:e.$props),r=o.ref(null),s=o.ref([]),a=o.ref([]),l=o.ref(!1),c=o.ref([]),u=o.ref([]),d=o.ref([]),f=o.ref([]),p=o.ref([]),g=o.ref([]),v=o.ref([]),b=o.ref([]),w=[],_=o.ref(0),C=o.ref(0),k=o.ref(0),S=o.ref(!1),E=o.ref([]),N=o.ref(!1),A=o.ref(!1),I=o.ref(null),O=o.ref({}),F=o.ref(null),P=o.ref(null),M=o.ref(null),W=o.ref(null),U=o.ref(null);o.watch(s,()=>t.state&&K(!1),{deep:!0});const Q=()=>{if(!r.value)throw new Error("[ElTable] prop row-key is required")},q=he=>{var Ce;(Ce=he.children)==null||Ce.forEach(Fe=>{Fe.fixed=he.fixed,q(Fe)})};let D;const j=()=>{c.value.forEach(He=>{q(He)}),f.value=c.value.filter(He=>He.fixed===!0||He.fixed==="left"),p.value=c.value.filter(He=>He.fixed==="right"),Xt(D)&&c.value[0]&&c.value[0].type==="selection"&&(D=!!c.value[0].fixed),f.value.length>0&&c.value[0]&&c.value[0].type==="selection"&&(c.value[0].fixed?f.value.some(rt=>rt.type!=="selection")?D=void 0:(c.value[0].fixed=D,D||f.value.shift()):(c.value[0].fixed=!0,f.value.unshift(c.value[0])));const he=c.value.filter(He=>!He.fixed);u.value=[].concat(f.value).concat(he).concat(p.value);const Ce=bc(he),Fe=bc(f.value),Pe=bc(p.value);_.value=Ce.length,C.value=Fe.length,k.value=Pe.length,d.value=[].concat(Fe).concat(Ce).concat(Pe),l.value=f.value.length>0||p.value.length>0},K=(he,Ce=!1)=>{he&&j(),Ce?t.state.doLayout():t.state.debouncedUpdateLayout()},H=he=>E.value.some(Ce=>Ro(Ce,he)),R=()=>{S.value=!1;const he=E.value;E.value=[],he.length&&t.emit("selection-change",[])},ie=()=>{let he;if(r.value){he=[];const Ce=oo(E.value,r.value),Fe=oo(s.value,r.value);for(const Pe in Ce)zr(Ce,Pe)&&!Fe[Pe]&&he.push(Ce[Pe].row)}else he=E.value.filter(Ce=>!s.value.includes(Ce));if(he.length){const Ce=E.value.filter(Fe=>!he.includes(Fe));E.value=Ce,t.emit("selection-change",Ce.slice())}},ee=()=>(E.value||[]).slice(),Y=(he,Ce,Fe=!0,Pe=!1)=>{var He,rt,Kt,Hn;const Cn={children:(rt=(He=t==null?void 0:t.store)==null?void 0:He.states)==null?void 0:rt.childrenColumnName.value,checkStrictly:(Hn=(Kt=t==null?void 0:t.store)==null?void 0:Kt.states)==null?void 0:Hn.checkStrictly.value};if(yc(E.value,he,Ce,Cn,Pe?void 0:I.value)){const It=(E.value||[]).slice();Fe&&t.emit("select",It,he),t.emit("selection-change",It)}},J=()=>{var he,Ce;const Fe=A.value?!S.value:!(S.value||E.value.length);S.value=Fe;let Pe=!1,He=0;const rt=(Ce=(he=t==null?void 0:t.store)==null?void 0:he.states)==null?void 0:Ce.rowKey.value,{childrenColumnName:Kt}=t.store.states,Hn={children:Kt.value,checkStrictly:!1};s.value.forEach((Cn,li)=>{const It=li+He;yc(E.value,Cn,Fe,Hn,I.value,It)&&(Pe=!0),He+=z(Ut(Cn,rt))}),Pe&&t.emit("selection-change",E.value?E.value.slice():[]),t.emit("select-all",(E.value||[]).slice())},oe=()=>{const he=oo(E.value,r.value);s.value.forEach(Ce=>{const Fe=Ut(Ce,r.value),Pe=he[Fe];Pe&&(E.value[Pe.index]=Ce)})},re=()=>{var he;if(((he=s.value)==null?void 0:he.length)===0){S.value=!1;return}const{childrenColumnName:Ce}=t.store.states,Fe=r.value?oo(E.value,r.value):void 0;let Pe=0,He=0;const rt=Cn=>Fe?!!Fe[Ut(Cn,r.value)]:E.value.includes(Cn),Kt=Cn=>{var li;for(const It of Cn){const Fs=I.value&&I.value.call(null,It,Pe);if(rt(It))He++;else if(!I.value||Fs)return!1;if(Pe++,(li=It[Ce.value])!=null&&li.length&&!Kt(It[Ce.value]))return!1}return!0},Hn=Kt(s.value||[]);S.value=He===0?!1:Hn},z=he=>{var Ce;if(!t||!t.store)return 0;const{treeData:Fe}=t.store.states;let Pe=0;const He=(Ce=Fe.value[he])==null?void 0:Ce.children;return He&&(Pe+=He.length,He.forEach(rt=>{Pe+=z(rt)})),Pe},G=(he,Ce)=>{Array.isArray(he)||(he=[he]);const Fe={};return he.forEach(Pe=>{O.value[Pe.id]=Ce,Fe[Pe.columnKey||Pe.id]=Ce}),Fe},te=(he,Ce,Fe)=>{P.value&&P.value!==he&&(P.value.order=null),P.value=he,M.value=Ce,W.value=Fe},le=()=>{let he=o.unref(a);Object.keys(O.value).forEach(Ce=>{const Fe=O.value[Ce];if(!Fe||Fe.length===0)return;const Pe=Lb({columns:d.value},Ce);Pe&&Pe.filterMethod&&(he=he.filter(He=>Fe.some(rt=>Pe.filterMethod.call(null,rt,He,Pe))))}),F.value=he},de=()=>{s.value=bR(F.value,{sortingColumn:P.value,sortProp:M.value,sortOrder:W.value})},ye=(he=void 0)=>{he&&he.filter||le(),de()},be=he=>{const{tableHeaderRef:Ce}=t.refs;if(!Ce)return;const Fe=Object.assign({},Ce.filterPanels),Pe=Object.keys(Fe);if(Pe.length)if(typeof he=="string"&&(he=[he]),Array.isArray(he)){const He=he.map(rt=>dR({columns:d.value},rt));Pe.forEach(rt=>{const Kt=He.find(Hn=>Hn.id===rt);Kt&&(Kt.filteredValue=[])}),t.store.commit("filterChange",{column:He,values:[],silent:!0,multi:!0})}else Pe.forEach(He=>{const rt=d.value.find(Kt=>Kt.id===He);rt&&(rt.filteredValue=[])}),O.value={},t.store.commit("filterChange",{column:{},values:[],silent:!0})},Se=()=>{P.value&&(te(null,null,null),t.store.commit("changeSortCondition",{silent:!0}))},{setExpandRowKeys:Be,toggleRowExpansion:tt,updateExpandRows:Ee,states:Te,isRowExpanded:ke}=mR({data:s,rowKey:r}),{updateTreeExpandKeys:We,toggleTreeExpansion:gt,updateTreeData:Le,loadOrToggle:Et,states:ge}=yR({data:s,rowKey:r}),{updateCurrentRowData:ae,updateCurrentRow:Me,setCurrentRowKey:nt,states:qn}=vR({data:s,rowKey:r});return{assertRowKey:Q,updateColumns:j,scheduleLayout:K,isSelected:H,clearSelection:R,cleanSelection:ie,getSelectionRows:ee,toggleRowSelection:Y,_toggleAllSelection:J,toggleAllSelection:null,updateSelectionByRowKey:oe,updateAllSelected:re,updateFilters:G,updateCurrentRow:Me,updateSort:te,execFilter:le,execSort:de,execQuery:ye,clearFilter:be,clearSort:Se,toggleRowExpansion:tt,setExpandRowKeysAdapter:he=>{Be(he),We(he)},setCurrentRowKey:nt,toggleRowExpansionAdapter:(he,Ce)=>{d.value.some(({type:Pe})=>Pe==="expand")?tt(he,Ce):gt(he,Ce)},isRowExpanded:ke,updateExpandRows:Ee,updateCurrentRowData:ae,loadOrToggle:Et,updateTreeData:Le,states:ne(ne(ne({tableSize:n,rowKey:r,data:s,_data:a,isComplex:l,_columns:c,originColumns:u,columns:d,fixedColumns:f,rightFixedColumns:p,leafColumns:g,fixedLeafColumns:v,rightFixedLeafColumns:b,updateOrderFns:w,leafColumnsLength:_,fixedLeafColumnsLength:C,rightFixedLeafColumnsLength:k,isAllSelected:S,selection:E,reserveSelection:N,selectOnIndeterminate:A,selectable:I,filters:O,filteredData:F,sortingColumn:P,sortProp:M,sortOrder:W,hoverRow:U},Te),ge),qn)}}function Sh(e,t){return e.map(n=>{var r;return n.id===t.id?t:((r=n.children)!=null&&r.length&&(n.children=Sh(n.children,t)),n)})}function Eh(e){e.forEach(t=>{var n,r;t.no=(n=t.getColumnIndex)==null?void 0:n.call(t),(r=t.children)!=null&&r.length&&Eh(t.children)}),e.sort((t,n)=>t.no-n.no)}function _R(){const e=o.getCurrentInstance(),t=wR(),n=_e("table"),r={setData(l,c){const u=o.unref(l._data)!==c;l.data.value=c,l._data.value=c,e.store.execQuery(),e.store.updateCurrentRowData(),e.store.updateExpandRows(),e.store.updateTreeData(e.store.states.defaultExpandAll.value),o.unref(l.reserveSelection)?(e.store.assertRowKey(),e.store.updateSelectionByRowKey()):u?e.store.clearSelection():e.store.cleanSelection(),e.store.updateAllSelected(),e.$ready&&e.store.scheduleLayout()},insertColumn(l,c,u,d){const f=o.unref(l._columns);let p=[];u?(u&&!u.children&&(u.children=[]),u.children.push(c),p=Sh(f,u)):(f.push(c),p=f),Eh(p),l._columns.value=p,l.updateOrderFns.push(d),c.type==="selection"&&(l.selectable.value=c.selectable,l.reserveSelection.value=c.reserveSelection),e.$ready&&(e.store.updateColumns(),e.store.scheduleLayout())},updateColumnOrder(l,c){var u;((u=c.getColumnIndex)==null?void 0:u.call(c))!==c.no&&(Eh(l._columns.value),e.$ready&&e.store.updateColumns())},removeColumn(l,c,u,d){const f=o.unref(l._columns)||[];if(u)u.children.splice(u.children.findIndex(g=>g.id===c.id),1),o.nextTick(()=>{var g;((g=u.children)==null?void 0:g.length)===0&&delete u.children}),l._columns.value=Sh(f,u);else{const g=f.indexOf(c);g>-1&&(f.splice(g,1),l._columns.value=f)}const p=l.updateOrderFns.indexOf(d);p>-1&&l.updateOrderFns.splice(p,1),e.$ready&&(e.store.updateColumns(),e.store.scheduleLayout())},sort(l,c){const{prop:u,order:d,init:f}=c;if(u){const p=o.unref(l.columns).find(g=>g.property===u);p&&(p.order=d,e.store.updateSort(p,u,d),e.store.commit("changeSortCondition",{init:f}))}},changeSortCondition(l,c){const{sortingColumn:u,sortProp:d,sortOrder:f}=l,p=o.unref(u),g=o.unref(d),v=o.unref(f);v===null&&(l.sortingColumn.value=null,l.sortProp.value=null);const b={filter:!0};e.store.execQuery(b),(!c||!(c.silent||c.init))&&e.emit("sort-change",{column:p,prop:g,order:v}),e.store.updateTableScrollY()},filterChange(l,c){const{column:u,values:d,silent:f}=c,p=e.store.updateFilters(u,d);e.store.execQuery(),f||e.emit("filter-change",p),e.store.updateTableScrollY()},toggleAllSelection(){e.store.toggleAllSelection()},rowSelectedChanged(l,c){e.store.toggleRowSelection(c),e.store.updateAllSelected()},setHoverRow(l,c){l.hoverRow.value=c},setCurrentRow(l,c){e.store.updateCurrentRow(c)}},s=function(l,...c){const u=e.store.mutations;if(u[l])u[l].apply(e,[e.store.states].concat(c));else throw new Error(`Action not found: ${l}`)},a=function(){o.nextTick(()=>e.layout.updateScrollY.apply(e.layout))};return fe(ne({ns:n},t),{mutations:r,commit:s,updateTableScrollY:a})}const ka={rowKey:"rowKey",defaultExpandAll:"defaultExpandAll",selectOnIndeterminate:"selectOnIndeterminate",indent:"indent",lazy:"lazy",data:"data","treeProps.hasChildren":{key:"lazyColumnIdentifier",default:"hasChildren"},"treeProps.children":{key:"childrenColumnName",default:"children"},"treeProps.checkStrictly":{key:"checkStrictly",default:!1}};function CR(e,t){if(!e)throw new Error("Table is required.");const n=_R();return n.toggleAllSelection=Wi(n._toggleAllSelection,10),Object.keys(ka).forEach(r=>{zb(Ub(t,r),r,n)}),SR(n,t),n}function SR(e,t){Object.keys(ka).forEach(n=>{o.watch(()=>Ub(t,n),r=>{zb(r,n,e)})})}function zb(e,t,n){let r=e,s=ka[t];typeof ka[t]=="object"&&(s=s.key,r=r||ka[t].default),n.states[s].value=r}function Ub(e,t){if(t.includes(".")){const n=t.split(".");let r=e;return n.forEach(s=>{r=r[s]}),r}else return e[t]}class ER{constructor(t){this.observers=[],this.table=null,this.store=null,this.columns=[],this.fit=!0,this.showHeader=!0,this.height=o.ref(null),this.scrollX=o.ref(!1),this.scrollY=o.ref(!1),this.bodyWidth=o.ref(null),this.fixedWidth=o.ref(null),this.rightFixedWidth=o.ref(null),this.gutterWidth=0;for(const n in t)zr(t,n)&&(o.isRef(this[n])?this[n].value=t[n]:this[n]=t[n]);if(!this.table)throw new Error("Table is required for Table Layout");if(!this.store)throw new Error("Store is required for Table Layout")}updateScrollY(){if(this.height.value===null)return!1;const n=this.table.refs.scrollBarRef;if(this.table.vnode.el&&(n!=null&&n.wrapRef)){let r=!0;const s=this.scrollY.value;return r=n.wrapRef.scrollHeight>n.wrapRef.clientHeight,this.scrollY.value=r,s!==r}return!1}setHeight(t,n="height"){if(!Ke)return;const r=this.table.vnode.el;if(t=fR(t),this.height.value=Number(t),!r&&(t||t===0))return o.nextTick(()=>this.setHeight(t,n));typeof t=="number"?(r.style[n]=`${t}px`,this.updateElsHeight()):typeof t=="string"&&(r.style[n]=t,this.updateElsHeight())}setMaxHeight(t){this.setHeight(t,"max-height")}getFlattenColumns(){const t=[];return this.table.store.states.columns.value.forEach(r=>{r.isColumnGroup?t.push.apply(t,r.columns):t.push(r)}),t}updateElsHeight(){this.updateScrollY(),this.notifyObservers("scrollable")}headerDisplayNone(t){if(!t)return!0;let n=t;for(;n.tagName!=="DIV";){if(getComputedStyle(n).display==="none")return!0;n=n.parentElement}return!1}updateColumnsWidth(){if(!Ke)return;const t=this.fit,n=this.table.vnode.el.clientWidth;let r=0;const s=this.getFlattenColumns(),a=s.filter(u=>typeof u.width!="number");if(s.forEach(u=>{typeof u.width=="number"&&u.realWidth&&(u.realWidth=null)}),a.length>0&&t){if(s.forEach(u=>{r+=Number(u.width||u.minWidth||80)}),r<=n){this.scrollX.value=!1;const u=n-r;if(a.length===1)a[0].realWidth=Number(a[0].minWidth||80)+u;else{const d=a.reduce((g,v)=>g+Number(v.minWidth||80),0),f=u/d;let p=0;a.forEach((g,v)=>{if(v===0)return;const b=Math.floor(Number(g.minWidth||80)*f);p+=b,g.realWidth=Number(g.minWidth||80)+b}),a[0].realWidth=Number(a[0].minWidth||80)+u-p}}else this.scrollX.value=!0,a.forEach(u=>{u.realWidth=Number(u.minWidth)});this.bodyWidth.value=Math.max(r,n),this.table.state.resizeState.value.width=this.bodyWidth.value}else s.forEach(u=>{!u.width&&!u.minWidth?u.realWidth=80:u.realWidth=Number(u.width||u.minWidth),r+=u.realWidth}),this.scrollX.value=r>n,this.bodyWidth.value=r;const l=this.store.states.fixedColumns.value;if(l.length>0){let u=0;l.forEach(d=>{u+=Number(d.realWidth||d.width)}),this.fixedWidth.value=u}const c=this.store.states.rightFixedColumns.value;if(c.length>0){let u=0;c.forEach(d=>{u+=Number(d.realWidth||d.width)}),this.rightFixedWidth.value=u}this.notifyObservers("columns")}addObserver(t){this.observers.push(t)}removeObserver(t){const n=this.observers.indexOf(t);n!==-1&&this.observers.splice(n,1)}notifyObservers(t){this.observers.forEach(r=>{var s,a;switch(t){case"columns":(s=r.state)==null||s.onColumnsChange(this);break;case"scrollable":(a=r.state)==null||a.onScrollableChange(this);break;default:throw new Error(`Table Layout don't have event ${t}.`)}})}}const{CheckboxGroup:xR}=Xo,kR=o.defineComponent({name:"ElTableFilterPanel",components:{ElCheckbox:Xo,ElCheckboxGroup:xR,ElScrollbar:Yf,ElTooltip:gn,ElIcon:Ye,ArrowDown:_f,ArrowUp:w1},directives:{ClickOutside:tb},props:{placement:{type:String,default:"bottom-start"},store:{type:Object},column:{type:Object},upDataColumn:{type:Function}},setup(e){const t=o.getCurrentInstance(),{t:n}=Xi(),r=_e("table-filter"),s=t==null?void 0:t.parent;s.filterPanels.value[e.column.id]||(s.filterPanels.value[e.column.id]=t);const a=o.ref(!1),l=o.ref(null),c=o.computed(()=>e.column&&e.column.filters),u=o.computed(()=>e.column.filterClassName?`${r.b()} ${e.column.filterClassName}`:r.b()),d=o.computed({get:()=>{var N;return(((N=e.column)==null?void 0:N.filteredValue)||[])[0]},set:N=>{f.value&&(typeof N!="undefined"&&N!==null?f.value.splice(0,1,N):f.value.splice(0,1))}}),f=o.computed({get(){return e.column?e.column.filteredValue||[]:[]},set(N){e.column&&e.upDataColumn("filteredValue",N)}}),p=o.computed(()=>e.column?e.column.filterMultiple:!0),g=N=>N.value===d.value,v=()=>{a.value=!1},b=N=>{N.stopPropagation(),a.value=!a.value},w=()=>{a.value=!1},_=()=>{S(f.value),v()},C=()=>{f.value=[],S(f.value),v()},k=N=>{d.value=N,S(typeof N!="undefined"&&N!==null?f.value:[]),v()},S=N=>{e.store.commit("filterChange",{column:e.column,values:N}),e.store.updateAllSelected()};o.watch(a,N=>{e.column&&e.upDataColumn("filterOpened",N)},{immediate:!0});const E=o.computed(()=>{var N,A;return(A=(N=l.value)==null?void 0:N.popperRef)==null?void 0:A.contentRef});return{tooltipVisible:a,multiple:p,filterClassName:u,filteredValue:f,filterValue:d,filters:c,handleConfirm:_,handleReset:C,handleSelect:k,isActive:g,t:n,ns:r,showFilterPanel:b,hideFilterPanel:w,popperPaneRef:E,tooltip:l}}});function NR(e,t,n,r,s,a){const l=o.resolveComponent("el-checkbox"),c=o.resolveComponent("el-checkbox-group"),u=o.resolveComponent("el-scrollbar"),d=o.resolveComponent("arrow-up"),f=o.resolveComponent("arrow-down"),p=o.resolveComponent("el-icon"),g=o.resolveComponent("el-tooltip"),v=o.resolveDirective("click-outside");return o.openBlock(),o.createBlock(g,{ref:"tooltip",visible:e.tooltipVisible,offset:0,placement:e.placement,"show-arrow":!1,"stop-popper-mouse-event":!1,teleported:"",effect:"light",pure:"","popper-class":e.filterClassName,persistent:""},{content:o.withCtx(()=>[e.multiple?(o.openBlock(),o.createElementBlock("div",{key:0},[o.createElementVNode("div",{class:o.normalizeClass(e.ns.e("content"))},[o.createVNode(u,{"wrap-class":e.ns.e("wrap")},{default:o.withCtx(()=>[o.createVNode(c,{modelValue:e.filteredValue,"onUpdate:modelValue":b=>e.filteredValue=b,class:o.normalizeClass(e.ns.e("checkbox-group"))},{default:o.withCtx(()=>[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(e.filters,b=>(o.openBlock(),o.createBlock(l,{key:b.value,value:b.value},{default:o.withCtx(()=>[o.createTextVNode(o.toDisplayString(b.text),1)]),_:2},1032,["value"]))),128))]),_:1},8,["modelValue","onUpdate:modelValue","class"])]),_:1},8,["wrap-class"])],2),o.createElementVNode("div",{class:o.normalizeClass(e.ns.e("bottom"))},[o.createElementVNode("button",{class:o.normalizeClass({[e.ns.is("disabled")]:e.filteredValue.length===0}),disabled:e.filteredValue.length===0,type:"button",onClick:e.handleConfirm},o.toDisplayString(e.t("el.table.confirmFilter")),11,["disabled","onClick"]),o.createElementVNode("button",{type:"button",onClick:e.handleReset},o.toDisplayString(e.t("el.table.resetFilter")),9,["onClick"])],2)])):(o.openBlock(),o.createElementBlock("ul",{key:1,class:o.normalizeClass(e.ns.e("list"))},[o.createElementVNode("li",{class:o.normalizeClass([e.ns.e("list-item"),{[e.ns.is("active")]:e.filterValue===void 0||e.filterValue===null}]),onClick:b=>e.handleSelect(null)},o.toDisplayString(e.t("el.table.clearFilter")),11,["onClick"]),(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(e.filters,b=>(o.openBlock(),o.createElementBlock("li",{key:b.value,class:o.normalizeClass([e.ns.e("list-item"),e.ns.is("active",e.isActive(b))]),label:b.value,onClick:w=>e.handleSelect(b.value)},o.toDisplayString(b.text),11,["label","onClick"]))),128))],2))]),default:o.withCtx(()=>[o.withDirectives((o.openBlock(),o.createElementBlock("span",{class:o.normalizeClass([`${e.ns.namespace.value}-table__column-filter-trigger`,`${e.ns.namespace.value}-none-outline`]),onClick:e.showFilterPanel},[o.createVNode(p,null,{default:o.withCtx(()=>[o.renderSlot(e.$slots,"filter-icon",{},()=>[e.column.filterOpened?(o.openBlock(),o.createBlock(d,{key:0})):(o.openBlock(),o.createBlock(f,{key:1}))])]),_:3})],10,["onClick"])),[[v,e.hideFilterPanel,e.popperPaneRef]])]),_:3},8,["visible","placement","popper-class"])}var TR=Oe(kR,[["render",NR],["__file","filter-panel.vue"]]);function jb(e){const t=o.getCurrentInstance();o.onBeforeMount(()=>{n.value.addObserver(t)}),o.onMounted(()=>{r(n.value),s(n.value)}),o.onUpdated(()=>{r(n.value),s(n.value)}),o.onUnmounted(()=>{n.value.removeObserver(t)});const n=o.computed(()=>{const a=e.layout;if(!a)throw new Error("Can not find table layout.");return a}),r=a=>{var l;const c=((l=e.vnode.el)==null?void 0:l.querySelectorAll("colgroup > col"))||[];if(!c.length)return;const u=a.getFlattenColumns(),d={};u.forEach(f=>{d[f.id]=f});for(let f=0,p=c.length;f<p;f++){const g=c[f],v=g.getAttribute("name"),b=d[v];b&&g.setAttribute("width",b.realWidth||b.width)}},s=a=>{var l,c;const u=((l=e.vnode.el)==null?void 0:l.querySelectorAll("colgroup > col[name=gutter]"))||[];for(let f=0,p=u.length;f<p;f++)u[f].setAttribute("width",a.scrollY.value?a.gutterWidth:"0");const d=((c=e.vnode.el)==null?void 0:c.querySelectorAll("th.gutter"))||[];for(let f=0,p=d.length;f<p;f++){const g=d[f];g.style.width=a.scrollY.value?`${a.gutterWidth}px`:"0",g.style.display=a.scrollY.value?"":"none"}};return{tableLayout:n.value,onColumnsChange:r,onScrollableChange:s}}const Cr=Symbol("ElTable");function AR(e,t){const n=o.getCurrentInstance(),r=o.inject(Cr),s=w=>{w.stopPropagation()},a=(w,_)=>{!_.filters&&_.sortable?b(w,_,!1):_.filterable&&!_.sortable&&s(w),r==null||r.emit("header-click",_,w)},l=(w,_)=>{r==null||r.emit("header-contextmenu",_,w)},c=o.ref(null),u=o.ref(!1),d=o.ref({}),f=(w,_)=>{if(Ke&&!(_.children&&_.children.length>0)&&c.value&&e.border){u.value=!0;const C=r;t("set-drag-visible",!0);const S=(C==null?void 0:C.vnode.el).getBoundingClientRect().left,E=n.vnode.el.querySelector(`th.${_.id}`),N=E.getBoundingClientRect(),A=N.left-S+30;Yi(E,"noclick"),d.value={startMouseLeft:w.clientX,startLeft:N.right-S,startColumnLeft:N.left-S,tableLeft:S};const I=C==null?void 0:C.refs.resizeProxy;I.style.left=`${d.value.startLeft}px`,document.onselectstart=function(){return!1},document.ondragstart=function(){return!1};const O=P=>{const M=P.clientX-d.value.startMouseLeft,W=d.value.startLeft+M;I.style.left=`${Math.max(A,W)}px`},F=()=>{if(u.value){const{startColumnLeft:P,startLeft:M}=d.value,U=Number.parseInt(I.style.left,10)-P;_.width=_.realWidth=U,C==null||C.emit("header-dragend",_.width,M-P,_,w),requestAnimationFrame(()=>{e.store.scheduleLayout(!1,!0)}),document.body.style.cursor="",u.value=!1,c.value=null,d.value={},t("set-drag-visible",!1)}document.removeEventListener("mousemove",O),document.removeEventListener("mouseup",F),document.onselectstart=null,document.ondragstart=null,setTimeout(()=>{mr(E,"noclick")},0)};document.addEventListener("mousemove",O),document.addEventListener("mouseup",F)}},p=(w,_)=>{if(_.children&&_.children.length>0)return;const C=w.target;if(!gr(C))return;const k=C==null?void 0:C.closest("th");if(!(!_||!_.resizable)&&!u.value&&e.border){const S=k.getBoundingClientRect(),E=document.body.style;S.width>12&&S.right-w.pageX<8?(E.cursor="col-resize",Ki(k,"is-sortable")&&(k.style.cursor="col-resize"),c.value=_):u.value||(E.cursor="",Ki(k,"is-sortable")&&(k.style.cursor="pointer"),c.value=null)}},g=()=>{Ke&&(document.body.style.cursor="")},v=({order:w,sortOrders:_})=>{if(w==="")return _[0];const C=_.indexOf(w||null);return _[C>_.length-2?0:C+1]},b=(w,_,C)=>{var k;w.stopPropagation();const S=_.order===C?null:C||v(_),E=(k=w.target)==null?void 0:k.closest("th");if(E&&Ki(E,"noclick")){mr(E,"noclick");return}if(!_.sortable)return;const N=w.currentTarget;if(["ascending","descending"].some(P=>Ki(N,P)&&!_.sortOrders.includes(P)))return;const A=e.store.states;let I=A.sortProp.value,O;const F=A.sortingColumn.value;(F!==_||F===_&&F.order===null)&&(F&&(F.order=null),A.sortingColumn.value=_,I=_.property),S?O=_.order=S:O=_.order=null,A.sortProp.value=I,A.sortOrder.value=O,r==null||r.store.commit("changeSortCondition")};return{handleHeaderClick:a,handleHeaderContextMenu:l,handleMouseDown:f,handleMouseMove:p,handleMouseOut:g,handleSortClick:b,handleFilterClick:s}}function OR(e){const t=o.inject(Cr),n=_e("table");return{getHeaderRowStyle:c=>{const u=t==null?void 0:t.props.headerRowStyle;return typeof u=="function"?u.call(null,{rowIndex:c}):u},getHeaderRowClass:c=>{const u=[],d=t==null?void 0:t.props.headerRowClassName;return typeof d=="string"?u.push(d):typeof d=="function"&&u.push(d.call(null,{rowIndex:c})),u.join(" ")},getHeaderCellStyle:(c,u,d,f)=>{var p;let g=(p=t==null?void 0:t.props.headerCellStyle)!=null?p:{};typeof g=="function"&&(g=g.call(null,{rowIndex:c,columnIndex:u,row:d,column:f}));const v=Ch(u,f.fixed,e.store,d);return Qo(v,"left"),Qo(v,"right"),Object.assign({},g,v)},getHeaderCellClass:(c,u,d,f)=>{const p=_h(n.b(),u,f.fixed,e.store,d),g=[f.id,f.order,f.headerAlign,f.className,f.labelClassName,...p];f.children||g.push("is-leaf"),f.sortable&&g.push("is-sortable");const v=t==null?void 0:t.props.headerCellClassName;return typeof v=="string"?g.push(v):typeof v=="function"&&g.push(v.call(null,{rowIndex:c,columnIndex:u,row:d,column:f})),g.push(n.e("cell")),g.filter(b=>!!b).join(" ")}}}const qb=e=>{const t=[];return e.forEach(n=>{n.children?(t.push(n),t.push.apply(t,qb(n.children))):t.push(n)}),t},Hb=e=>{let t=1;const n=(a,l)=>{if(l&&(a.level=l.level+1,t<a.level&&(t=a.level)),a.children){let c=0;a.children.forEach(u=>{n(u,a),c+=u.colSpan}),a.colSpan=c}else a.colSpan=1};e.forEach(a=>{a.level=1,n(a,void 0)});const r=[];for(let a=0;a<t;a++)r.push([]);return qb(e).forEach(a=>{a.children?(a.rowSpan=1,a.children.forEach(l=>l.isSubColumn=!0)):a.rowSpan=t-a.level+1,r[a.level-1].push(a)}),r};function IR(e){const t=o.inject(Cr),n=o.computed(()=>Hb(e.store.states.originColumns.value));return{isGroup:o.computed(()=>{const a=n.value.length>1;return a&&t&&(t.state.isGroup.value=!0),a}),toggleAllSelection:a=>{a.stopPropagation(),t==null||t.store.commit("toggleAllSelection")},columnRows:n}}var BR=o.defineComponent({name:"ElTableHeader",components:{ElCheckbox:Xo},props:{fixed:{type:String,default:""},store:{required:!0,type:Object},border:Boolean,defaultSort:{type:Object,default:()=>({prop:"",order:""})}},setup(e,{emit:t}){const n=o.getCurrentInstance(),r=o.inject(Cr),s=_e("table"),a=o.ref({}),{onColumnsChange:l,onScrollableChange:c}=jb(r);o.onMounted(()=>Ne(this,null,function*(){yield o.nextTick(),yield o.nextTick();const{prop:A,order:I}=e.defaultSort;r==null||r.store.commit("sort",{prop:A,order:I,init:!0})}));const{handleHeaderClick:u,handleHeaderContextMenu:d,handleMouseDown:f,handleMouseMove:p,handleMouseOut:g,handleSortClick:v,handleFilterClick:b}=AR(e,t),{getHeaderRowStyle:w,getHeaderRowClass:_,getHeaderCellStyle:C,getHeaderCellClass:k}=OR(e),{isGroup:S,toggleAllSelection:E,columnRows:N}=IR(e);return n.state={onColumnsChange:l,onScrollableChange:c},n.filterPanels=a,{ns:s,filterPanels:a,onColumnsChange:l,onScrollableChange:c,columnRows:N,getHeaderRowClass:_,getHeaderRowStyle:w,getHeaderCellClass:k,getHeaderCellStyle:C,handleHeaderClick:u,handleHeaderContextMenu:d,handleMouseDown:f,handleMouseMove:p,handleMouseOut:g,handleSortClick:v,handleFilterClick:b,isGroup:S,toggleAllSelection:E}},render(){const{ns:e,isGroup:t,columnRows:n,getHeaderCellStyle:r,getHeaderCellClass:s,getHeaderRowClass:a,getHeaderRowStyle:l,handleHeaderClick:c,handleHeaderContextMenu:u,handleMouseDown:d,handleMouseMove:f,handleSortClick:p,handleMouseOut:g,store:v,$parent:b}=this;let w=1;return o.h("thead",{class:{[e.is("group")]:t}},n.map((_,C)=>o.h("tr",{class:a(C),key:C,style:l(C)},_.map((k,S)=>(k.rowSpan>w&&(w=k.rowSpan),o.h("th",{class:s(C,S,_,k),colspan:k.colSpan,key:`${k.id}-thead`,rowspan:k.rowSpan,style:r(C,S,_,k),onClick:E=>{E.currentTarget.classList.contains("noclick")||c(E,k)},onContextmenu:E=>u(E,k),onMousedown:E=>d(E,k),onMousemove:E=>f(E,k),onMouseout:g},[o.h("div",{class:["cell",k.filteredValue&&k.filteredValue.length>0?"highlight":""]},[k.renderHeader?k.renderHeader({column:k,$index:S,store:v,_self:b}):k.label,k.sortable&&o.h("span",{onClick:E=>p(E,k),class:"caret-wrapper"},[o.h("i",{onClick:E=>p(E,k,"ascending"),class:"sort-caret ascending"}),o.h("i",{onClick:E=>p(E,k,"descending"),class:"sort-caret descending"})]),k.filterable&&o.h(TR,{store:v,placement:k.filterPlacement||"bottom-start",column:k,upDataColumn:(E,N)=>{k[E]=N}},{"filter-icon":()=>k.renderFilterIcon?k.renderFilterIcon({filterOpened:k.filterOpened}):null})])]))))))}});function xh(e,t,n=.03){return e-t>n}function LR(e){const t=o.inject(Cr),n=o.ref(""),r=o.ref(o.h("div")),s=(b,w,_)=>{var C;const k=t,S=bh(b);let E;const N=(C=k==null?void 0:k.vnode.el)==null?void 0:C.dataset.prefix;S&&(E=Rb({columns:e.store.states.columns.value},S,N),E&&(k==null||k.emit(`cell-${_}`,w,E,S,b))),k==null||k.emit(`row-${_}`,w,E,b)},a=(b,w)=>{s(b,w,"dblclick")},l=(b,w)=>{e.store.commit("setCurrentRow",w),s(b,w,"click")},c=(b,w)=>{s(b,w,"contextmenu")},u=Wi(b=>{e.store.commit("setHoverRow",b)},30),d=Wi(()=>{e.store.commit("setHoverRow",null)},30),f=b=>{const w=window.getComputedStyle(b,null),_=Number.parseInt(w.paddingLeft,10)||0,C=Number.parseInt(w.paddingRight,10)||0,k=Number.parseInt(w.paddingTop,10)||0,S=Number.parseInt(w.paddingBottom,10)||0;return{left:_,right:C,top:k,bottom:S}},p=(b,w,_)=>{let C=w.target.parentNode;for(;b>1&&(C=C==null?void 0:C.nextSibling,!(!C||C.nodeName!=="TR"));)_(C,"hover-row hover-fixed-row"),b--};return{handleDoubleClick:a,handleClick:l,handleContextMenu:c,handleMouseEnter:u,handleMouseLeave:d,handleCellMouseEnter:(b,w,_)=>{var C;const k=t,S=bh(b),E=(C=k==null?void 0:k.vnode.el)==null?void 0:C.dataset.prefix;if(S){const j=Rb({columns:e.store.states.columns.value},S,E);S.rowSpan>1&&p(S.rowSpan,b,Yi);const K=k.hoverState={cell:S,column:j,row:w};k==null||k.emit("cell-mouse-enter",K.row,K.column,K.cell,b)}if(!_)return;const N=b.target.querySelector(".cell");if(!(Ki(N,`${E}-tooltip`)&&N.childNodes.length))return;const A=document.createRange();A.setStart(N,0),A.setEnd(N,N.childNodes.length);const{width:I,height:O}=A.getBoundingClientRect(),{width:F,height:P}=N.getBoundingClientRect(),{top:M,left:W,right:U,bottom:Q}=f(N),q=W+U,D=M+Q;(xh(I+q,F)||xh(O+D,P)||xh(N.scrollWidth,F))&&gR(_,S.innerText||S.textContent,S,k)},handleCellMouseLeave:b=>{const w=bh(b);if(!w)return;w.rowSpan>1&&p(w.rowSpan,b,mr);const _=t==null?void 0:t.hoverState;t==null||t.emit("cell-mouse-leave",_==null?void 0:_.row,_==null?void 0:_.column,_==null?void 0:_.cell,b)},tooltipContent:n,tooltipTrigger:r}}function RR(e){const t=o.inject(Cr),n=_e("table");return{getRowStyle:(d,f)=>{const p=t==null?void 0:t.props.rowStyle;return typeof p=="function"?p.call(null,{row:d,rowIndex:f}):p||null},getRowClass:(d,f)=>{const p=[n.e("row")];t!=null&&t.props.highlightCurrentRow&&d===e.store.states.currentRow.value&&p.push("current-row"),e.stripe&&f%2===1&&p.push(n.em("row","striped"));const g=t==null?void 0:t.props.rowClassName;return typeof g=="string"?p.push(g):typeof g=="function"&&p.push(g.call(null,{row:d,rowIndex:f})),p},getCellStyle:(d,f,p,g)=>{const v=t==null?void 0:t.props.cellStyle;let b=v!=null?v:{};typeof v=="function"&&(b=v.call(null,{rowIndex:d,columnIndex:f,row:p,column:g}));const w=Ch(f,e==null?void 0:e.fixed,e.store);return Qo(w,"left"),Qo(w,"right"),Object.assign({},b,w)},getCellClass:(d,f,p,g,v)=>{const b=_h(n.b(),f,e==null?void 0:e.fixed,e.store,void 0,v),w=[g.id,g.align,g.className,...b],_=t==null?void 0:t.props.cellClassName;return typeof _=="string"?w.push(_):typeof _=="function"&&w.push(_.call(null,{rowIndex:d,columnIndex:f,row:p,column:g})),w.push(n.e("cell")),w.filter(C=>!!C).join(" ")},getSpan:(d,f,p,g)=>{let v=1,b=1;const w=t==null?void 0:t.props.spanMethod;if(typeof w=="function"){const _=w({row:d,column:f,rowIndex:p,columnIndex:g});Array.isArray(_)?(v=_[0],b=_[1]):typeof _=="object"&&(v=_.rowspan,b=_.colspan)}return{rowspan:v,colspan:b}},getColspanRealWidth:(d,f,p)=>{if(f<1)return d[p].realWidth;const g=d.map(({realWidth:v,width:b})=>v||b).slice(p,p+f);return Number(g.reduce((v,b)=>Number(v)+Number(b),-1))}}}function PR(e){const t=o.inject(Cr),n=_e("table"),{handleDoubleClick:r,handleClick:s,handleContextMenu:a,handleMouseEnter:l,handleMouseLeave:c,handleCellMouseEnter:u,handleCellMouseLeave:d,tooltipContent:f,tooltipTrigger:p}=LR(e),{getRowStyle:g,getRowClass:v,getCellStyle:b,getCellClass:w,getSpan:_,getColspanRealWidth:C}=RR(e),k=o.computed(()=>e.store.states.columns.value.findIndex(({type:I})=>I==="default")),S=(I,O)=>{const F=t.props.rowKey;return F?Ut(I,F):O},E=(I,O,F,P=!1)=>{const{tooltipEffect:M,tooltipOptions:W,store:U}=e,{indent:Q,columns:q}=U.states,D=v(I,O);let j=!0;F&&(D.push(n.em("row",`level-${F.level}`)),j=F.display);const K=j?null:{display:"none"};return o.h("tr",{style:[K,g(I,O)],class:D,key:S(I,O),onDblclick:H=>r(H,I),onClick:H=>s(H,I),onContextmenu:H=>a(H,I),onMouseenter:()=>l(O),onMouseleave:c},q.value.map((H,R)=>{const{rowspan:ie,colspan:ee}=_(I,H,O,R);if(!ie||!ee)return null;const Y=Object.assign({},H);Y.realWidth=C(q.value,ee,R);const J={store:e.store,_self:e.context||t,column:Y,row:I,$index:O,cellIndex:R,expanded:P};R===k.value&&F&&(J.treeNode={indent:F.level*Q.value,level:F.level},typeof F.expanded=="boolean"&&(J.treeNode.expanded=F.expanded,"loading"in F&&(J.treeNode.loading=F.loading),"noLazyChildren"in F&&(J.treeNode.noLazyChildren=F.noLazyChildren)));const oe=`${S(I,O)},${R}`,re=Y.columnKey||Y.rawColumnKey||"",z=N(R,H,J),G=H.showOverflowTooltip&&iN({effect:M},W,H.showOverflowTooltip);return o.h("td",{style:b(O,R,I,H),class:w(O,R,I,H,ee-1),key:`${re}${oe}`,rowspan:ie,colspan:ee,onMouseenter:te=>u(te,I,G),onMouseleave:d},[z])}))},N=(I,O,F)=>O.renderCell(F);return{wrappedRowRender:(I,O)=>{const F=e.store,{isRowExpanded:P,assertRowKey:M}=F,{treeData:W,lazyTreeNodeMap:U,childrenColumnName:Q,rowKey:q}=F.states,D=F.states.columns.value;if(D.some(({type:K})=>K==="expand")){const K=P(I),H=E(I,O,void 0,K),R=t.renderExpanded;return K?R?[[H,o.h("tr",{key:`expanded-row__${H.key}`},[o.h("td",{colspan:D.length,class:`${n.e("cell")} ${n.e("expanded-cell")}`},[R({row:I,$index:O,store:F,expanded:K})])])]]:(console.error("[Element Error]renderExpanded is required."),H):[[H]]}else if(Object.keys(W.value).length){M();const K=Ut(I,q.value);let H=W.value[K],R=null;H&&(R={expanded:H.expanded,level:H.level,display:!0},typeof H.lazy=="boolean"&&(typeof H.loaded=="boolean"&&H.loaded&&(R.noLazyChildren=!(H.children&&H.children.length)),R.loading=H.loading));const ie=[E(I,O,R)];if(H){let ee=0;const Y=(oe,re)=>{oe&&oe.length&&re&&oe.forEach(z=>{const G={display:re.display&&re.expanded,level:re.level+1,expanded:!1,noLazyChildren:!1,loading:!1},te=Ut(z,q.value);if(te==null)throw new Error("For nested data item, row-key is required.");if(H=ne({},W.value[te]),H&&(G.expanded=H.expanded,H.level=H.level||G.level,H.display=!!(H.expanded&&G.display),typeof H.lazy=="boolean"&&(typeof H.loaded=="boolean"&&H.loaded&&(G.noLazyChildren=!(H.children&&H.children.length)),G.loading=H.loading)),ee++,ie.push(E(z,O+ee,G)),H){const le=U.value[te]||z[Q.value];Y(le,H)}})};H.display=!0;const J=U.value[K]||I[Q.value];Y(J,H)}return ie}else return E(I,O,void 0)},tooltipContent:f,tooltipTrigger:p}}const DR={store:{required:!0,type:Object},stripe:Boolean,tooltipEffect:String,tooltipOptions:{type:Object},context:{default:()=>({}),type:Object},rowClassName:[String,Function],rowStyle:[Object,Function],fixed:{type:String,default:""},highlight:Boolean};var MR=o.defineComponent({name:"ElTableBody",props:DR,setup(e){const t=o.getCurrentInstance(),n=o.inject(Cr),r=_e("table"),{wrappedRowRender:s,tooltipContent:a,tooltipTrigger:l}=PR(e),{onColumnsChange:c,onScrollableChange:u}=jb(n),d=[];return o.watch(e.store.states.hoverRow,(f,p)=>{var g;const v=t==null?void 0:t.vnode.el,b=Array.from((v==null?void 0:v.children)||[]).filter(C=>C==null?void 0:C.classList.contains(`${r.e("row")}`));let w=f;const _=(g=b[w])==null?void 0:g.childNodes;if(_!=null&&_.length){let C=0;Array.from(_).reduce((S,E,N)=>{var A,I;return((A=_[N])==null?void 0:A.colSpan)>1&&(C=(I=_[N])==null?void 0:I.colSpan),E.nodeName!=="TD"&&C===0&&S.push(N),C>0&&C--,S},[]).forEach(S=>{var E;for(w=f;w>0;){const N=(E=b[w-1])==null?void 0:E.childNodes;if(N[S]&&N[S].nodeName==="TD"&&N[S].rowSpan>1){Yi(N[S],"hover-cell"),d.push(N[S]);break}w--}})}else d.forEach(C=>mr(C,"hover-cell")),d.length=0;!e.store.states.isComplex.value||!Ke||dN(()=>{const C=b[p],k=b[f];C&&!C.classList.contains("hover-fixed-row")&&mr(C,"hover-row"),k&&Yi(k,"hover-row")})}),o.onUnmounted(()=>{var f;(f=In)==null||f()}),{ns:r,onColumnsChange:c,onScrollableChange:u,wrappedRowRender:s,tooltipContent:a,tooltipTrigger:l}},render(){const{wrappedRowRender:e,store:t}=this,n=t.states.data.value||[];return o.h("tbody",{tabIndex:-1},[n.reduce((r,s)=>r.concat(e(s,r.length)),[])])}});function FR(){const e=o.inject(Cr),t=e==null?void 0:e.store,n=o.computed(()=>t.states.fixedLeafColumnsLength.value),r=o.computed(()=>t.states.rightFixedColumns.value.length),s=o.computed(()=>t.states.columns.value.length),a=o.computed(()=>t.states.fixedColumns.value.length),l=o.computed(()=>t.states.rightFixedColumns.value.length);return{leftFixedLeafCount:n,rightFixedLeafCount:r,columnsCount:s,leftFixedCount:a,rightFixedCount:l,columns:t.states.columns}}function $R(e){const{columns:t}=FR(),n=_e("table");return{getCellClasses:(a,l)=>{const c=a[l],u=[n.e("cell"),c.id,c.align,c.labelClassName,..._h(n.b(),l,c.fixed,e.store)];return c.className&&u.push(c.className),c.children||u.push(n.is("leaf")),u},getCellStyles:(a,l)=>{const c=Ch(l,a.fixed,e.store);return Qo(c,"left"),Qo(c,"right"),c},columns:t}}var zR=o.defineComponent({name:"ElTableFooter",props:{fixed:{type:String,default:""},store:{required:!0,type:Object},summaryMethod:Function,sumText:String,border:Boolean,defaultSort:{type:Object,default:()=>({prop:"",order:""})}},setup(e){const{getCellClasses:t,getCellStyles:n,columns:r}=$R(e);return{ns:_e("table"),getCellClasses:t,getCellStyles:n,columns:r}},render(){const{columns:e,getCellStyles:t,getCellClasses:n,summaryMethod:r,sumText:s}=this,a=this.store.states.data.value;let l=[];return r?l=r({columns:e,data:a}):e.forEach((c,u)=>{if(u===0){l[u]=s;return}const d=a.map(v=>Number(v[c.property])),f=[];let p=!0;d.forEach(v=>{if(!Number.isNaN(+v)){p=!1;const b=`${v}`.split(".")[1];f.push(b?b.length:0)}});const g=Math.max.apply(null,f);p?l[u]="":l[u]=d.reduce((v,b)=>{const w=Number(b);return Number.isNaN(+w)?v:Number.parseFloat((v+b).toFixed(Math.min(g,20)))},0)}),o.h(o.h("tfoot",[o.h("tr",{},[...e.map((c,u)=>o.h("td",{key:u,colspan:c.colSpan,rowspan:c.rowSpan,class:n(e,u),style:t(c,u)},[o.h("div",{class:["cell",c.labelClassName]},[l[u]])]))])]))}});function UR(e){return{setCurrentRow:f=>{e.commit("setCurrentRow",f)},getSelectionRows:()=>e.getSelectionRows(),toggleRowSelection:(f,p,g=!0)=>{e.toggleRowSelection(f,p,!1,g),e.updateAllSelected()},clearSelection:()=>{e.clearSelection()},clearFilter:f=>{e.clearFilter(f)},toggleAllSelection:()=>{e.commit("toggleAllSelection")},toggleRowExpansion:(f,p)=>{e.toggleRowExpansionAdapter(f,p)},clearSort:()=>{e.clearSort()},sort:(f,p)=>{e.commit("sort",{prop:f,order:p})}}}function jR(e,t,n,r){const s=o.ref(!1),a=o.ref(null),l=o.ref(!1),c=H=>{l.value=H},u=o.ref({width:null,height:null,headerHeight:null}),d=o.ref(!1),f={display:"inline-block",verticalAlign:"middle"},p=o.ref(),g=o.ref(0),v=o.ref(0),b=o.ref(0),w=o.ref(0),_=o.ref(0);o.watchEffect(()=>{t.setHeight(e.height)}),o.watchEffect(()=>{t.setMaxHeight(e.maxHeight)}),o.watch(()=>[e.currentRowKey,n.states.rowKey],([H,R])=>{!o.unref(R)||!o.unref(H)||n.setCurrentRowKey(`${H}`)},{immediate:!0}),o.watch(()=>e.data,H=>{r.store.commit("setData",H)},{immediate:!0,deep:!0}),o.watchEffect(()=>{e.expandRowKeys&&n.setExpandRowKeysAdapter(e.expandRowKeys)});const C=()=>{r.store.commit("setHoverRow",null),r.hoverState&&(r.hoverState=null)},k=(H,R)=>{const{pixelX:ie,pixelY:ee}=R;Math.abs(ie)>=Math.abs(ee)&&(r.refs.bodyWrapper.scrollLeft+=R.pixelX/5)},S=o.computed(()=>e.height||e.maxHeight||n.states.fixedColumns.value.length>0||n.states.rightFixedColumns.value.length>0),E=o.computed(()=>({width:t.bodyWidth.value?`${t.bodyWidth.value}px`:""})),N=()=>{S.value&&t.updateElsHeight(),t.updateColumnsWidth(),requestAnimationFrame(F)};o.onMounted(()=>Ne(this,null,function*(){yield o.nextTick(),n.updateColumns(),P(),requestAnimationFrame(N);const H=r.vnode.el,R=r.refs.headerWrapper;e.flexible&&H&&H.parentElement&&(H.parentElement.style.minWidth="0"),u.value={width:p.value=H.offsetWidth,height:H.offsetHeight,headerHeight:e.showHeader&&R?R.offsetHeight:null},n.states.columns.value.forEach(ie=>{ie.filteredValue&&ie.filteredValue.length&&r.store.commit("filterChange",{column:ie,values:ie.filteredValue,silent:!0})}),r.$ready=!0}));const A=(H,R)=>{if(!H)return;const ie=Array.from(H.classList).filter(ee=>!ee.startsWith("is-scrolling-"));ie.push(t.scrollX.value?R:"is-scrolling-none"),H.className=ie.join(" ")},I=H=>{const{tableWrapper:R}=r.refs;A(R,H)},O=H=>{const{tableWrapper:R}=r.refs;return!!(R&&R.classList.contains(H))},F=function(){if(!r.refs.scrollBarRef)return;if(!t.scrollX.value){const re="is-scrolling-none";O(re)||I(re);return}const H=r.refs.scrollBarRef.wrapRef;if(!H)return;const{scrollLeft:R,offsetWidth:ie,scrollWidth:ee}=H,{headerWrapper:Y,footerWrapper:J}=r.refs;Y&&(Y.scrollLeft=R),J&&(J.scrollLeft=R);const oe=ee-ie-1;R>=oe?I("is-scrolling-right"):I(R===0?"is-scrolling-left":"is-scrolling-middle")},P=()=>{r.refs.scrollBarRef&&(r.refs.scrollBarRef.wrapRef&&En(r.refs.scrollBarRef.wrapRef,"scroll",F,{passive:!0}),e.fit?fn(r.vnode.el,M):En(window,"resize",M),fn(r.refs.bodyWrapper,()=>{var H,R;M(),(R=(H=r.refs)==null?void 0:H.scrollBarRef)==null||R.update()}))},M=()=>{var H,R,ie,ee;const Y=r.vnode.el;if(!r.$ready||!Y)return;let J=!1;const{width:oe,height:re,headerHeight:z}=u.value,G=p.value=Y.offsetWidth;oe!==G&&(J=!0);const te=Y.offsetHeight;(e.height||S.value)&&re!==te&&(J=!0);const le=e.tableLayout==="fixed"?r.refs.headerWrapper:(H=r.refs.tableHeaderRef)==null?void 0:H.$el;e.showHeader&&(le==null?void 0:le.offsetHeight)!==z&&(J=!0),g.value=((R=r.refs.tableWrapper)==null?void 0:R.scrollHeight)||0,b.value=(le==null?void 0:le.scrollHeight)||0,w.value=((ie=r.refs.footerWrapper)==null?void 0:ie.offsetHeight)||0,_.value=((ee=r.refs.appendWrapper)==null?void 0:ee.offsetHeight)||0,v.value=g.value-b.value-w.value-_.value,J&&(u.value={width:G,height:te,headerHeight:e.showHeader&&(le==null?void 0:le.offsetHeight)||0},N())},W=er(),U=o.computed(()=>{const{bodyWidth:H,scrollY:R,gutterWidth:ie}=t;return H.value?`${H.value-(R.value?ie:0)}px`:""}),Q=o.computed(()=>e.maxHeight?"fixed":e.tableLayout),q=o.computed(()=>{if(e.data&&e.data.length)return null;let H="100%";e.height&&v.value&&(H=`${v.value}px`);const R=p.value;return{width:R?`${R}px`:"",height:H}}),D=o.computed(()=>e.height?{height:Number.isNaN(Number(e.height))?e.height:`${e.height}px`}:e.maxHeight?{maxHeight:Number.isNaN(Number(e.maxHeight))?e.maxHeight:`${e.maxHeight}px`}:{}),j=o.computed(()=>e.height?{height:"100%"}:e.maxHeight?Number.isNaN(Number(e.maxHeight))?{maxHeight:`calc(${e.maxHeight} - ${b.value+w.value}px)`}:{maxHeight:`${e.maxHeight-b.value-w.value}px`}:{});return{isHidden:s,renderExpanded:a,setDragVisible:c,isGroup:d,handleMouseLeave:C,handleHeaderFooterMousewheel:k,tableSize:W,emptyBlockStyle:q,handleFixedMousewheel:(H,R)=>{const ie=r.refs.bodyWrapper;if(Math.abs(R.spinY)>0){const ee=ie.scrollTop;R.pixelY<0&&ee!==0&&H.preventDefault(),R.pixelY>0&&ie.scrollHeight-ie.clientHeight>ee&&H.preventDefault(),ie.scrollTop+=Math.ceil(R.pixelY/5)}else ie.scrollLeft+=Math.ceil(R.pixelX/5)},resizeProxyVisible:l,bodyWidth:U,resizeState:u,doLayout:N,tableBodyStyles:E,tableLayout:Q,scrollbarViewStyle:f,tableInnerStyle:D,scrollbarStyle:j}}function qR(e){const t=o.ref(),n=()=>{const s=e.vnode.el.querySelector(".hidden-columns"),a={childList:!0,subtree:!0},l=e.store.states.updateOrderFns;t.value=new MutationObserver(()=>{l.forEach(c=>c())}),t.value.observe(s,a)};o.onMounted(()=>{n()}),o.onUnmounted(()=>{var r;(r=t.value)==null||r.disconnect()})}var HR={data:{type:Array,default:()=>[]},size:wr,width:[String,Number],height:[String,Number],maxHeight:[String,Number],fit:{type:Boolean,default:!0},stripe:Boolean,border:Boolean,rowKey:[String,Function],showHeader:{type:Boolean,default:!0},showSummary:Boolean,sumText:String,summaryMethod:Function,rowClassName:[String,Function],rowStyle:[Object,Function],cellClassName:[String,Function],cellStyle:[Object,Function],headerRowClassName:[String,Function],headerRowStyle:[Object,Function],headerCellClassName:[String,Function],headerCellStyle:[Object,Function],highlightCurrentRow:Boolean,currentRowKey:[String,Number],emptyText:String,expandRowKeys:Array,defaultExpandAll:Boolean,defaultSort:Object,tooltipEffect:String,tooltipOptions:Object,spanMethod:Function,selectOnIndeterminate:{type:Boolean,default:!0},indent:{type:Number,default:16},treeProps:{type:Object,default:()=>({hasChildren:"hasChildren",children:"children",checkStrictly:!1})},lazy:Boolean,load:Function,style:{type:Object,default:()=>({})},className:{type:String,default:""},tableLayout:{type:String,default:"fixed"},scrollbarAlwaysOn:Boolean,flexible:Boolean,showOverflowTooltip:[Boolean,Object],scrollbarTabindex:{type:[Number,String],default:void 0}};function Gb(e){const t=e.tableLayout==="auto";let n=e.columns||[];t&&n.every(s=>s.width===void 0)&&(n=[]);const r=s=>{const a={key:`${e.tableLayout}_${s.id}`,style:{},name:void 0};return t?a.style={width:`${s.width}px`}:a.name=s.id,a};return o.h("colgroup",{},n.map(s=>o.h("col",r(s))))}Gb.props=["columns","tableLayout"];const GR=()=>{const e=o.ref(),t=(a,l)=>{const c=e.value;c&&c.scrollTo(a,l)},n=(a,l)=>{const c=e.value;c&&Ge(l)&&["Top","Left"].includes(a)&&c[`setScroll${a}`](l)};return{scrollBarRef:e,scrollTo:t,setScrollTop:a=>n("Top",a),setScrollLeft:a=>n("Left",a)}};let WR=1;const KR=o.defineComponent({name:"ElTable",directives:{Mousewheel:xB},components:{TableHeader:BR,TableBody:MR,TableFooter:zR,ElScrollbar:Yf,hColgroup:Gb},props:HR,emits:["select","select-all","selection-change","cell-mouse-enter","cell-mouse-leave","cell-contextmenu","cell-click","cell-dblclick","row-click","row-contextmenu","row-dblclick","header-click","header-contextmenu","sort-change","filter-change","current-change","header-dragend","expand-change"],setup(e){const{t}=Xi(),n=_e("table"),r=o.getCurrentInstance();o.provide(Cr,r);const s=CR(r,e);r.store=s;const a=new ER({store:r.store,table:r,fit:e.fit,showHeader:e.showHeader});r.layout=a;const l=o.computed(()=>(s.states.data.value||[]).length===0),{setCurrentRow:c,getSelectionRows:u,toggleRowSelection:d,clearSelection:f,clearFilter:p,toggleAllSelection:g,toggleRowExpansion:v,clearSort:b,sort:w}=UR(s),{isHidden:_,renderExpanded:C,setDragVisible:k,isGroup:S,handleMouseLeave:E,handleHeaderFooterMousewheel:N,tableSize:A,emptyBlockStyle:I,handleFixedMousewheel:O,resizeProxyVisible:F,bodyWidth:P,resizeState:M,doLayout:W,tableBodyStyles:U,tableLayout:Q,scrollbarViewStyle:q,tableInnerStyle:D,scrollbarStyle:j}=jR(e,a,s,r),{scrollBarRef:K,scrollTo:H,setScrollLeft:R,setScrollTop:ie}=GR(),ee=Wi(W,50),Y=`${n.namespace.value}-table_${WR++}`;r.tableId=Y,r.state={isGroup:S,resizeState:M,doLayout:W,debouncedUpdateLayout:ee};const J=o.computed(()=>{var z;return(z=e.sumText)!=null?z:t("el.table.sumText")}),oe=o.computed(()=>{var z;return(z=e.emptyText)!=null?z:t("el.table.emptyText")}),re=o.computed(()=>Hb(s.states.originColumns.value)[0]);return qR(r),{ns:n,layout:a,store:s,columns:re,handleHeaderFooterMousewheel:N,handleMouseLeave:E,tableId:Y,tableSize:A,isHidden:_,isEmpty:l,renderExpanded:C,resizeProxyVisible:F,resizeState:M,isGroup:S,bodyWidth:P,tableBodyStyles:U,emptyBlockStyle:I,debouncedUpdateLayout:ee,handleFixedMousewheel:O,setCurrentRow:c,getSelectionRows:u,toggleRowSelection:d,clearSelection:f,clearFilter:p,toggleAllSelection:g,toggleRowExpansion:v,clearSort:b,doLayout:W,sort:w,t,setDragVisible:k,context:r,computedSumText:J,computedEmptyText:oe,tableLayout:Q,scrollbarViewStyle:q,tableInnerStyle:D,scrollbarStyle:j,scrollBarRef:K,scrollTo:H,setScrollLeft:R,setScrollTop:ie}}});function YR(e,t,n,r,s,a){const l=o.resolveComponent("hColgroup"),c=o.resolveComponent("table-header"),u=o.resolveComponent("table-body"),d=o.resolveComponent("table-footer"),f=o.resolveComponent("el-scrollbar"),p=o.resolveDirective("mousewheel");return o.openBlock(),o.createElementBlock("div",{ref:"tableWrapper",class:o.normalizeClass([{[e.ns.m("fit")]:e.fit,[e.ns.m("striped")]:e.stripe,[e.ns.m("border")]:e.border||e.isGroup,[e.ns.m("hidden")]:e.isHidden,[e.ns.m("group")]:e.isGroup,[e.ns.m("fluid-height")]:e.maxHeight,[e.ns.m("scrollable-x")]:e.layout.scrollX.value,[e.ns.m("scrollable-y")]:e.layout.scrollY.value,[e.ns.m("enable-row-hover")]:!e.store.states.isComplex.value,[e.ns.m("enable-row-transition")]:(e.store.states.data.value||[]).length!==0&&(e.store.states.data.value||[]).length<100,"has-footer":e.showSummary},e.ns.m(e.tableSize),e.className,e.ns.b(),e.ns.m(`layout-${e.tableLayout}`)]),style:o.normalizeStyle(e.style),"data-prefix":e.ns.namespace.value,onMouseleave:e.handleMouseLeave},[o.createElementVNode("div",{class:o.normalizeClass(e.ns.e("inner-wrapper")),style:o.normalizeStyle(e.tableInnerStyle)},[o.createElementVNode("div",{ref:"hiddenColumns",class:"hidden-columns"},[o.renderSlot(e.$slots,"default")],512),e.showHeader&&e.tableLayout==="fixed"?o.withDirectives((o.openBlock(),o.createElementBlock("div",{key:0,ref:"headerWrapper",class:o.normalizeClass(e.ns.e("header-wrapper"))},[o.createElementVNode("table",{ref:"tableHeader",class:o.normalizeClass(e.ns.e("header")),style:o.normalizeStyle(e.tableBodyStyles),border:"0",cellpadding:"0",cellspacing:"0"},[o.createVNode(l,{columns:e.store.states.columns.value,"table-layout":e.tableLayout},null,8,["columns","table-layout"]),o.createVNode(c,{ref:"tableHeaderRef",border:e.border,"default-sort":e.defaultSort,store:e.store,onSetDragVisible:e.setDragVisible},null,8,["border","default-sort","store","onSetDragVisible"])],6)],2)),[[p,e.handleHeaderFooterMousewheel]]):o.createCommentVNode("v-if",!0),o.createElementVNode("div",{ref:"bodyWrapper",class:o.normalizeClass(e.ns.e("body-wrapper"))},[o.createVNode(f,{ref:"scrollBarRef","view-style":e.scrollbarViewStyle,"wrap-style":e.scrollbarStyle,always:e.scrollbarAlwaysOn,tabindex:e.scrollbarTabindex},{default:o.withCtx(()=>[o.createElementVNode("table",{ref:"tableBody",class:o.normalizeClass(e.ns.e("body")),cellspacing:"0",cellpadding:"0",border:"0",style:o.normalizeStyle({width:e.bodyWidth,tableLayout:e.tableLayout})},[o.createVNode(l,{columns:e.store.states.columns.value,"table-layout":e.tableLayout},null,8,["columns","table-layout"]),e.showHeader&&e.tableLayout==="auto"?(o.openBlock(),o.createBlock(c,{key:0,ref:"tableHeaderRef",class:o.normalizeClass(e.ns.e("body-header")),border:e.border,"default-sort":e.defaultSort,store:e.store,onSetDragVisible:e.setDragVisible},null,8,["class","border","default-sort","store","onSetDragVisible"])):o.createCommentVNode("v-if",!0),o.createVNode(u,{context:e.context,highlight:e.highlightCurrentRow,"row-class-name":e.rowClassName,"tooltip-effect":e.tooltipEffect,"tooltip-options":e.tooltipOptions,"row-style":e.rowStyle,store:e.store,stripe:e.stripe},null,8,["context","highlight","row-class-name","tooltip-effect","tooltip-options","row-style","store","stripe"]),e.showSummary&&e.tableLayout==="auto"?(o.openBlock(),o.createBlock(d,{key:1,class:o.normalizeClass(e.ns.e("body-footer")),border:e.border,"default-sort":e.defaultSort,store:e.store,"sum-text":e.computedSumText,"summary-method":e.summaryMethod},null,8,["class","border","default-sort","store","sum-text","summary-method"])):o.createCommentVNode("v-if",!0)],6),e.isEmpty?(o.openBlock(),o.createElementBlock("div",{key:0,ref:"emptyBlock",style:o.normalizeStyle(e.emptyBlockStyle),class:o.normalizeClass(e.ns.e("empty-block"))},[o.createElementVNode("span",{class:o.normalizeClass(e.ns.e("empty-text"))},[o.renderSlot(e.$slots,"empty",{},()=>[o.createTextVNode(o.toDisplayString(e.computedEmptyText),1)])],2)],6)):o.createCommentVNode("v-if",!0),e.$slots.append?(o.openBlock(),o.createElementBlock("div",{key:1,ref:"appendWrapper",class:o.normalizeClass(e.ns.e("append-wrapper"))},[o.renderSlot(e.$slots,"append")],2)):o.createCommentVNode("v-if",!0)]),_:3},8,["view-style","wrap-style","always","tabindex"])],2),e.showSummary&&e.tableLayout==="fixed"?o.withDirectives((o.openBlock(),o.createElementBlock("div",{key:1,ref:"footerWrapper",class:o.normalizeClass(e.ns.e("footer-wrapper"))},[o.createElementVNode("table",{class:o.normalizeClass(e.ns.e("footer")),cellspacing:"0",cellpadding:"0",border:"0",style:o.normalizeStyle(e.tableBodyStyles)},[o.createVNode(l,{columns:e.store.states.columns.value,"table-layout":e.tableLayout},null,8,["columns","table-layout"]),o.createVNode(d,{border:e.border,"default-sort":e.defaultSort,store:e.store,"sum-text":e.computedSumText,"summary-method":e.summaryMethod},null,8,["border","default-sort","store","sum-text","summary-method"])],6)],2)),[[o.vShow,!e.isEmpty],[p,e.handleHeaderFooterMousewheel]]):o.createCommentVNode("v-if",!0),e.border||e.isGroup?(o.openBlock(),o.createElementBlock("div",{key:2,class:o.normalizeClass(e.ns.e("border-left-patch"))},null,2)):o.createCommentVNode("v-if",!0)],6),o.withDirectives(o.createElementVNode("div",{ref:"resizeProxy",class:o.normalizeClass(e.ns.e("column-resize-proxy"))},null,2),[[o.vShow,e.resizeProxyVisible]])],46,["data-prefix","onMouseleave"])}var JR=Oe(KR,[["render",YR],["__file","table.vue"]]);const XR={selection:"table-column--selection",expand:"table__expand-column"},QR={default:{order:""},selection:{width:48,minWidth:48,realWidth:48,order:""},expand:{width:48,minWidth:48,realWidth:48,order:""},index:{width:48,minWidth:48,realWidth:48,order:""}},ZR=e=>XR[e]||"",VR={selection:{renderHeader({store:e,column:t}){function n(){return e.states.data.value&&e.states.data.value.length===0}return o.h(Xo,{disabled:n(),size:e.states.tableSize.value,indeterminate:e.states.selection.value.length>0&&!e.states.isAllSelected.value,"onUpdate:modelValue":e.toggleAllSelection,modelValue:e.states.isAllSelected.value,ariaLabel:t.label})},renderCell({row:e,column:t,store:n,$index:r}){return o.h(Xo,{disabled:t.selectable?!t.selectable.call(null,e,r):!1,size:n.states.tableSize.value,onChange:()=>{n.commit("rowSelectedChanged",e)},onClick:s=>s.stopPropagation(),modelValue:n.isSelected(e),ariaLabel:t.label})},sortable:!1,resizable:!1},index:{renderHeader({column:e}){return e.label||"#"},renderCell({column:e,$index:t}){let n=t+1;const r=e.index;return typeof r=="number"?n=t+r:typeof r=="function"&&(n=r(t)),o.h("div",{},[n])},sortable:!1},expand:{renderHeader({column:e}){return e.label||""},renderCell({row:e,store:t,expanded:n}){const{ns:r}=t,s=[r.e("expand-icon")];n&&s.push(r.em("expand-icon","expanded"));const a=function(l){l.stopPropagation(),t.toggleRowExpansion(e)};return o.h("div",{class:s,onClick:a},{default:()=>[o.h(Ye,null,{default:()=>[o.h(Cf)]})]})},sortable:!1,resizable:!1}};function eP({row:e,column:t,$index:n}){var r;const s=t.property,a=s&&jl(e,s).value;return t&&t.formatter?t.formatter(e,t,a,n):((r=a==null?void 0:a.toString)==null?void 0:r.call(a))||""}function tP({row:e,treeNode:t,store:n},r=!1){const{ns:s}=n;if(!t)return r?[o.h("span",{class:s.e("placeholder")})]:null;const a=[],l=function(c){c.stopPropagation(),!t.loading&&n.loadOrToggle(e)};if(t.indent&&a.push(o.h("span",{class:s.e("indent"),style:{"padding-left":`${t.indent}px`}})),typeof t.expanded=="boolean"&&!t.noLazyChildren){const c=[s.e("expand-icon"),t.expanded?s.em("expand-icon","expanded"):""];let u=Cf;t.loading&&(u=Mo),a.push(o.h("div",{class:c,onClick:l},{default:()=>[o.h(Ye,{class:{[s.is("loading")]:t.loading}},{default:()=>[o.h(u)]})]}))}else a.push(o.h("span",{class:s.e("placeholder")}));return a}function Wb(e,t){return e.reduce((n,r)=>(n[r]=r,n),t)}function nP(e,t){const n=o.getCurrentInstance();return{registerComplexWatchers:()=>{const a=["fixed"],l={realWidth:"width",realMinWidth:"minWidth"},c=Wb(a,l);Object.keys(c).forEach(u=>{const d=l[u];zr(t,d)&&o.watch(()=>t[d],f=>{let p=f;d==="width"&&u==="realWidth"&&(p=wh(f)),d==="minWidth"&&u==="realMinWidth"&&(p=Pb(f)),n.columnConfig.value[d]=p,n.columnConfig.value[u]=p;const g=d==="fixed";e.value.store.scheduleLayout(g)})})},registerNormalWatchers:()=>{const a=["label","filters","filterMultiple","filteredValue","sortable","index","formatter","className","labelClassName","filterClassName","showOverflowTooltip"],l={property:"prop",align:"realAlign",headerAlign:"realHeaderAlign"},c=Wb(a,l);Object.keys(c).forEach(u=>{const d=l[u];zr(t,d)&&o.watch(()=>t[d],f=>{n.columnConfig.value[u]=f})})}}}function rP(e,t,n){const r=o.getCurrentInstance(),s=o.ref(""),a=o.ref(!1),l=o.ref(),c=o.ref(),u=_e("table");o.watchEffect(()=>{l.value=e.align?`is-${e.align}`:null,l.value}),o.watchEffect(()=>{c.value=e.headerAlign?`is-${e.headerAlign}`:l.value,c.value});const d=o.computed(()=>{let E=r.vnode.vParent||r.parent;for(;E&&!E.tableId&&!E.columnId;)E=E.vnode.vParent||E.parent;return E}),f=o.computed(()=>{const{store:E}=r.parent;if(!E)return!1;const{treeData:N}=E.states,A=N.value;return A&&Object.keys(A).length>0}),p=o.ref(wh(e.width)),g=o.ref(Pb(e.minWidth)),v=E=>(p.value&&(E.width=p.value),g.value&&(E.minWidth=g.value),!p.value&&g.value&&(E.width=void 0),E.minWidth||(E.minWidth=80),E.realWidth=Number(E.width===void 0?E.minWidth:E.width),E),b=E=>{const N=E.type,A=VR[N]||{};Object.keys(A).forEach(O=>{const F=A[O];O!=="className"&&F!==void 0&&(E[O]=F)});const I=ZR(N);if(I){const O=`${o.unref(u.namespace)}-${I}`;E.className=E.className?`${E.className} ${O}`:O}return E},w=E=>{Array.isArray(E)?E.forEach(A=>N(A)):N(E);function N(A){var I;((I=A==null?void 0:A.type)==null?void 0:I.name)==="ElTableColumn"&&(A.vParent=r)}};return{columnId:s,realAlign:l,isSubColumn:a,realHeaderAlign:c,columnOrTableParent:d,setColumnWidth:v,setColumnForcedProps:b,setColumnRenders:E=>{e.renderHeader||E.type!=="selection"&&(E.renderHeader=A=>(r.columnConfig.value.label,o.renderSlot(t,"header",A,()=>[E.label]))),t["filter-icon"]&&(E.renderFilterIcon=A=>o.renderSlot(t,"filter-icon",A));let N=E.renderCell;return E.type==="expand"?(E.renderCell=A=>o.h("div",{class:"cell"},[N(A)]),n.value.renderExpanded=A=>t.default?t.default(A):t.default):(N=N||eP,E.renderCell=A=>{let I=null;if(t.default){const U=t.default(A);I=U.some(Q=>Q.type!==o.Comment)?U:N(A)}else I=N(A);const{columns:O}=n.value.store.states,F=O.value.findIndex(U=>U.type==="default"),P=f.value&&A.cellIndex===F,M=tP(A,P),W={class:"cell",style:{}};return E.showOverflowTooltip&&(W.class=`${W.class} ${o.unref(u.namespace)}-tooltip`,W.style={width:`${(A.column.realWidth||Number(A.column.width))-1}px`}),w(I),o.h("div",W,[M,I])}),E},getPropsData:(...E)=>E.reduce((N,A)=>(Array.isArray(A)&&A.forEach(I=>{N[I]=e[I]}),N),{}),getColumnElIndex:(E,N)=>Array.prototype.indexOf.call(E,N),updateColumnOrder:()=>{n.value.store.commit("updateColumnOrder",r.columnConfig.value)}}}var iP={type:{type:String,default:"default"},label:String,className:String,labelClassName:String,property:String,prop:String,width:{type:[String,Number],default:""},minWidth:{type:[String,Number],default:""},renderHeader:Function,sortable:{type:[Boolean,String],default:!1},sortMethod:Function,sortBy:[String,Function,Array],resizable:{type:Boolean,default:!0},columnKey:String,align:String,headerAlign:String,showOverflowTooltip:{type:[Boolean,Object],default:void 0},fixed:[Boolean,String],formatter:Function,selectable:Function,reserveSelection:Boolean,filterMethod:Function,filteredValue:Array,filters:Array,filterPlacement:String,filterMultiple:{type:Boolean,default:!0},filterClassName:String,index:[Number,Function],sortOrders:{type:Array,default:()=>["ascending","descending",null],validator:e=>e.every(t=>["ascending","descending",null].includes(t))}};let oP=1;var Kb=o.defineComponent({name:"ElTableColumn",components:{ElCheckbox:Xo},props:iP,setup(e,{slots:t}){const n=o.getCurrentInstance(),r=o.ref({}),s=o.computed(()=>{let S=n.parent;for(;S&&!S.tableId;)S=S.parent;return S}),{registerNormalWatchers:a,registerComplexWatchers:l}=nP(s,e),{columnId:c,isSubColumn:u,realHeaderAlign:d,columnOrTableParent:f,setColumnWidth:p,setColumnForcedProps:g,setColumnRenders:v,getPropsData:b,getColumnElIndex:w,realAlign:_,updateColumnOrder:C}=rP(e,t,s),k=f.value;c.value=`${k.tableId||k.columnId}_column_${oP++}`,o.onBeforeMount(()=>{u.value=s.value!==k;const S=e.type||"default",E=e.sortable===""?!0:e.sortable,N=Xt(e.showOverflowTooltip)?k.props.showOverflowTooltip:e.showOverflowTooltip,A=fe(ne({},QR[S]),{id:c.value,type:S,property:e.prop||e.property,align:_,headerAlign:d,showOverflowTooltip:N,filterable:e.filters||e.filterMethod,filteredValue:[],filterPlacement:"",filterClassName:"",isColumnGroup:!1,isSubColumn:!1,filterOpened:!1,sortable:E,index:e.index,rawColumnKey:n.vnode.key});let M=b(["columnKey","label","className","labelClassName","type","renderHeader","formatter","fixed","resizable"],["sortMethod","sortBy","sortOrders"],["selectable","reserveSelection"],["filterMethod","filters","filterMultiple","filterOpened","filteredValue","filterPlacement","filterClassName"]);M=uR(A,M),M=hR(v,p,g)(M),r.value=M,a(),l()}),o.onMounted(()=>{var S;const E=f.value,N=u.value?E.vnode.el.children:(S=E.refs.hiddenColumns)==null?void 0:S.children,A=()=>w(N||[],n.vnode.el);r.value.getColumnIndex=A,A()>-1&&s.value.store.commit("insertColumn",r.value,u.value?E.columnConfig.value:null,C)}),o.onBeforeUnmount(()=>{const S=r.value.getColumnIndex;(S?S():-1)>-1&&s.value.store.commit("removeColumn",r.value,u.value?k.columnConfig.value:null,C)}),n.columnId=c.value,n.columnConfig=r},render(){var e,t,n;try{const r=(t=(e=this.$slots).default)==null?void 0:t.call(e,{row:{},column:{},$index:-1}),s=[];if(Array.isArray(r))for(const l of r)((n=l.type)==null?void 0:n.name)==="ElTableColumn"||l.shapeFlag&2?s.push(l):l.type===o.Fragment&&Array.isArray(l.children)&&l.children.forEach(c=>{(c==null?void 0:c.patchFlag)!==1024&&!ct(c==null?void 0:c.children)&&s.push(c)});return o.h("div",s)}catch(r){return o.h("div",[])}}});const sP=kt(JR,{TableColumn:Kb}),aP=Gr(Kb),Yb=Symbol("uploadContextKey"),lP="ElUpload";class cP extends Error{constructor(t,n,r,s){super(t),this.name="UploadAjaxError",this.status=n,this.method=r,this.url=s}}function Jb(e,t,n){let r;return n.response?r=`${n.response.error||n.response}`:n.responseText?r=`${n.responseText}`:r=`fail to ${t.method} ${e} ${n.status}`,new cP(r,n.status,t.method,e)}function dP(e){const t=e.responseText||e.response;if(!t)return t;try{return JSON.parse(t)}catch(n){return t}}const uP=e=>{typeof XMLHttpRequest=="undefined"&&hi(lP,"XMLHttpRequest is undefined");const t=new XMLHttpRequest,n=e.action;t.upload&&t.upload.addEventListener("progress",a=>{const l=a;l.percent=a.total>0?a.loaded/a.total*100:0,e.onProgress(l)});const r=new FormData;if(e.data)for(const[a,l]of Object.entries(e.data))Tt(l)&&l.length?r.append(a,...l):r.append(a,l);r.append(e.filename,e.file,e.file.name),t.addEventListener("error",()=>{e.onError(Jb(n,e,t))}),t.addEventListener("load",()=>{if(t.status<200||t.status>=300)return e.onError(Jb(n,e,t));e.onSuccess(dP(t))}),t.open(e.method,n,!0),e.withCredentials&&"withCredentials"in t&&(t.withCredentials=!0);const s=e.headers||{};if(s instanceof Headers)s.forEach((a,l)=>t.setRequestHeader(l,a));else for(const[a,l]of Object.entries(s))Nn(l)||t.setRequestHeader(a,String(l));return t.send(r),t},Xb=["text","picture","picture-card"];let fP=1;const kh=()=>Date.now()+fP++,Qb=Ae({action:{type:String,default:"#"},headers:{type:ce(Object)},method:{type:String,default:"post"},data:{type:ce([Object,Function,Promise]),default:()=>ca({})},multiple:Boolean,name:{type:String,default:"file"},drag:Boolean,withCredentials:Boolean,showFileList:{type:Boolean,default:!0},accept:{type:String,default:""},fileList:{type:ce(Array),default:()=>ca([])},autoUpload:{type:Boolean,default:!0},listType:{type:String,values:Xb,default:"text"},httpRequest:{type:ce(Function),default:uP},disabled:Boolean,limit:Number}),hP=Ae(fe(ne({},Qb),{beforeUpload:{type:ce(Function),default:lt},beforeRemove:{type:ce(Function)},onRemove:{type:ce(Function),default:lt},onChange:{type:ce(Function),default:lt},onPreview:{type:ce(Function),default:lt},onSuccess:{type:ce(Function),default:lt},onProgress:{type:ce(Function),default:lt},onError:{type:ce(Function),default:lt},onExceed:{type:ce(Function),default:lt},crossorigin:{type:ce(String)}})),pP=Ae({files:{type:ce(Array),default:()=>ca([])},disabled:{type:Boolean,default:!1},handlePreview:{type:ce(Function),default:lt},listType:{type:String,values:Xb,default:"text"},crossorigin:{type:ce(String)}}),gP={remove:e=>!!e},mP=o.defineComponent({name:"ElUploadList"}),vP=o.defineComponent(fe(ne({},mP),{props:pP,emits:gP,setup(e,{emit:t}){const n=e,{t:r}=Xi(),s=_e("upload"),a=_e("icon"),l=_e("list"),c=_r(),u=o.ref(!1),d=o.computed(()=>[s.b("list"),s.bm("list",n.listType),s.is("disabled",n.disabled)]),f=p=>{t("remove",p)};return(p,g)=>(o.openBlock(),o.createBlock(o.TransitionGroup,{tag:"ul",class:o.normalizeClass(o.unref(d)),name:o.unref(l).b()},{default:o.withCtx(()=>[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(p.files,(v,b)=>(o.openBlock(),o.createElementBlock("li",{key:v.uid||v.name,class:o.normalizeClass([o.unref(s).be("list","item"),o.unref(s).is(v.status),{focusing:u.value}]),tabindex:"0",onKeydown:o.withKeys(w=>!o.unref(c)&&f(v),["delete"]),onFocus:w=>u.value=!0,onBlur:w=>u.value=!1,onClick:w=>u.value=!1},[o.renderSlot(p.$slots,"default",{file:v,index:b},()=>[p.listType==="picture"||v.status!=="uploading"&&p.listType==="picture-card"?(o.openBlock(),o.createElementBlock("img",{key:0,class:o.normalizeClass(o.unref(s).be("list","item-thumbnail")),src:v.url,crossorigin:p.crossorigin,alt:""},null,10,["src","crossorigin"])):o.createCommentVNode("v-if",!0),v.status==="uploading"||p.listType!=="picture-card"?(o.openBlock(),o.createElementBlock("div",{key:1,class:o.normalizeClass(o.unref(s).be("list","item-info"))},[o.createElementVNode("a",{class:o.normalizeClass(o.unref(s).be("list","item-name")),onClick:o.withModifiers(w=>p.handlePreview(v),["prevent"])},[o.createVNode(o.unref(Ye),{class:o.normalizeClass(o.unref(a).m("document"))},{default:o.withCtx(()=>[o.createVNode(o.unref(NN))]),_:1},8,["class"]),o.createElementVNode("span",{class:o.normalizeClass(o.unref(s).be("list","item-file-name")),title:v.name},o.toDisplayString(v.name),11,["title"])],10,["onClick"]),v.status==="uploading"?(o.openBlock(),o.createBlock(o.unref(lR),{key:0,type:p.listType==="picture-card"?"circle":"line","stroke-width":p.listType==="picture-card"?6:2,percentage:Number(v.percentage),style:o.normalizeStyle(p.listType==="picture-card"?"":"margin-top: 0.5rem")},null,8,["type","stroke-width","percentage","style"])):o.createCommentVNode("v-if",!0)],2)):o.createCommentVNode("v-if",!0),o.createElementVNode("label",{class:o.normalizeClass(o.unref(s).be("list","item-status-label"))},[p.listType==="text"?(o.openBlock(),o.createBlock(o.unref(Ye),{key:0,class:o.normalizeClass([o.unref(a).m("upload-success"),o.unref(a).m("circle-check")])},{default:o.withCtx(()=>[o.createVNode(o.unref(Sf))]),_:1},8,["class"])):["picture-card","picture"].includes(p.listType)?(o.openBlock(),o.createBlock(o.unref(Ye),{key:1,class:o.normalizeClass([o.unref(a).m("upload-success"),o.unref(a).m("check")])},{default:o.withCtx(()=>[o.createVNode(o.unref(_1))]),_:1},8,["class"])):o.createCommentVNode("v-if",!0)],2),o.unref(c)?o.createCommentVNode("v-if",!0):(o.openBlock(),o.createBlock(o.unref(Ye),{key:2,class:o.normalizeClass(o.unref(a).m("close")),onClick:w=>f(v)},{default:o.withCtx(()=>[o.createVNode(o.unref(Do))]),_:2},1032,["class","onClick"])),o.createCommentVNode(" Due to close btn only appears when li gets focused disappears after li gets blurred, thus keyboard navigation can never reach close btn"),o.createCommentVNode(" This is a bug which needs to be fixed "),o.createCommentVNode(" TODO: Fix the incorrect navigation interaction "),o.unref(c)?o.createCommentVNode("v-if",!0):(o.openBlock(),o.createElementBlock("i",{key:3,class:o.normalizeClass(o.unref(a).m("close-tip"))},o.toDisplayString(o.unref(r)("el.upload.deleteTip")),3)),p.listType==="picture-card"?(o.openBlock(),o.createElementBlock("span",{key:4,class:o.normalizeClass(o.unref(s).be("list","item-actions"))},[o.createElementVNode("span",{class:o.normalizeClass(o.unref(s).be("list","item-preview")),onClick:w=>p.handlePreview(v)},[o.createVNode(o.unref(Ye),{class:o.normalizeClass(o.unref(a).m("zoom-in"))},{default:o.withCtx(()=>[o.createVNode(o.unref(HN))]),_:1},8,["class"])],10,["onClick"]),o.unref(c)?o.createCommentVNode("v-if",!0):(o.openBlock(),o.createElementBlock("span",{key:0,class:o.normalizeClass(o.unref(s).be("list","item-delete")),onClick:w=>f(v)},[o.createVNode(o.unref(Ye),{class:o.normalizeClass(o.unref(a).m("delete"))},{default:o.withCtx(()=>[o.createVNode(o.unref(xN))]),_:1},8,["class"])],10,["onClick"]))],2)):o.createCommentVNode("v-if",!0)])],42,["onKeydown","onFocus","onBlur","onClick"]))),128)),o.renderSlot(p.$slots,"append")]),_:3},8,["class","name"]))}}));var Zb=Oe(vP,[["__file","upload-list.vue"]]);const yP=Ae({disabled:{type:Boolean,default:!1}}),bP={file:e=>Tt(e)},Vb="ElUploadDrag",wP=o.defineComponent({name:Vb}),_P=o.defineComponent(fe(ne({},wP),{props:yP,emits:bP,setup(e,{emit:t}){o.inject(Yb)||hi(Vb,"usage: <el-upload><el-upload-dragger /></el-upload>");const r=_e("upload"),s=o.ref(!1),a=_r(),l=u=>{if(a.value)return;s.value=!1,u.stopPropagation();const d=Array.from(u.dataTransfer.files);t("file",d)},c=()=>{a.value||(s.value=!0)};return(u,d)=>(o.openBlock(),o.createElementBlock("div",{class:o.normalizeClass([o.unref(r).b("dragger"),o.unref(r).is("dragover",s.value)]),onDrop:o.withModifiers(l,["prevent"]),onDragover:o.withModifiers(c,["prevent"]),onDragleave:o.withModifiers(f=>s.value=!1,["prevent"])},[o.renderSlot(u.$slots,"default")],42,["onDrop","onDragover","onDragleave"]))}}));var CP=Oe(_P,[["__file","upload-dragger.vue"]]);const SP=Ae(fe(ne({},Qb),{beforeUpload:{type:ce(Function),default:lt},onRemove:{type:ce(Function),default:lt},onStart:{type:ce(Function),default:lt},onSuccess:{type:ce(Function),default:lt},onProgress:{type:ce(Function),default:lt},onError:{type:ce(Function),default:lt},onExceed:{type:ce(Function),default:lt}})),EP=o.defineComponent({name:"ElUploadContent",inheritAttrs:!1}),xP=o.defineComponent(fe(ne({},EP),{props:SP,setup(e,{expose:t}){const n=e,r=_e("upload"),s=_r(),a=o.shallowRef({}),l=o.shallowRef(),c=w=>{if(w.length===0)return;const{autoUpload:_,limit:C,fileList:k,multiple:S,onStart:E,onExceed:N}=n;if(C&&k.length+w.length>C){N(w,k);return}S||(w=w.slice(0,1));for(const A of w){const I=A;I.uid=kh(),E(I),_&&u(I)}},u=w=>Ne(this,null,function*(){if(l.value.value="",!n.beforeUpload)return f(w);let _,C={};try{const S=n.data,E=n.beforeUpload(w);C=sv(n.data)?qr(n.data):n.data,_=yield E,sv(n.data)&&Ro(S,C)&&(C=qr(n.data))}catch(S){_=!1}if(_===!1){n.onRemove(w);return}let k=w;_ instanceof Blob&&(_ instanceof File?k=_:k=new File([_],w.name,{type:w.type})),f(Object.assign(k,{uid:w.uid}),C)}),d=(w,_)=>Ne(this,null,function*(){return it(w)?w(_):w}),f=(w,_)=>Ne(this,null,function*(){const{headers:C,data:k,method:S,withCredentials:E,name:N,action:A,onProgress:I,onSuccess:O,onError:F,httpRequest:P}=n;try{_=yield d(_!=null?_:k,w)}catch(Q){n.onRemove(w);return}const{uid:M}=w,W={headers:C||{},withCredentials:E,file:w,data:_,method:S,filename:N,action:A,onProgress:Q=>{I(Q,w)},onSuccess:Q=>{O(Q,w),delete a.value[M]},onError:Q=>{F(Q,w),delete a.value[M]}},U=P(W);a.value[M]=U,U instanceof Promise&&U.then(W.onSuccess,W.onError)}),p=w=>{const _=w.target.files;_&&c(Array.from(_))},g=()=>{s.value||(l.value.value="",l.value.click())},v=()=>{g()};return t({abort:w=>{fN(a.value).filter(w?([C])=>String(w.uid)===C:()=>!0).forEach(([C,k])=>{k instanceof XMLHttpRequest&&k.abort(),delete a.value[C]})},upload:u}),(w,_)=>(o.openBlock(),o.createElementBlock("div",{class:o.normalizeClass([o.unref(r).b(),o.unref(r).m(w.listType),o.unref(r).is("drag",w.drag),o.unref(r).is("disabled",o.unref(s))]),tabindex:o.unref(s)?"-1":"0",onClick:g,onKeydown:o.withKeys(o.withModifiers(v,["self"]),["enter","space"])},[w.drag?(o.openBlock(),o.createBlock(CP,{key:0,disabled:o.unref(s),onFile:c},{default:o.withCtx(()=>[o.renderSlot(w.$slots,"default")]),_:3},8,["disabled"])):o.renderSlot(w.$slots,"default",{key:1}),o.createElementVNode("input",{ref_key:"inputRef",ref:l,class:o.normalizeClass(o.unref(r).e("input")),name:w.name,disabled:o.unref(s),multiple:w.multiple,accept:w.accept,type:"file",onChange:p,onClick:o.withModifiers(()=>{},["stop"])},null,42,["name","disabled","multiple","accept","onClick"])],42,["tabindex","onKeydown"]))}}));var e2=Oe(xP,[["__file","upload-content.vue"]]);const t2="ElUpload",n2=e=>{var t;(t=e.url)!=null&&t.startsWith("blob:")&&URL.revokeObjectURL(e.url)},kP=(e,t)=>{const n=iS(e,"fileList",void 0,{passive:!0}),r=v=>n.value.find(b=>b.uid===v.uid);function s(v){var b;(b=t.value)==null||b.abort(v)}function a(v=["ready","uploading","success","fail"]){n.value=n.value.filter(b=>!v.includes(b.status))}function l(v){n.value=n.value.filter(b=>b!==v)}const c=(v,b)=>{const w=r(b);w&&(console.error(v),w.status="fail",l(w),e.onError(v,w,n.value),e.onChange(w,n.value))},u=(v,b)=>{const w=r(b);w&&(e.onProgress(v,w,n.value),w.status="uploading",w.percentage=Math.round(v.percent))},d=(v,b)=>{const w=r(b);w&&(w.status="success",w.response=v,e.onSuccess(v,w,n.value),e.onChange(w,n.value))},f=v=>{Nn(v.uid)&&(v.uid=kh());const b={name:v.name,percentage:0,status:"ready",size:v.size,raw:v,uid:v.uid};if(e.listType==="picture-card"||e.listType==="picture")try{b.url=URL.createObjectURL(v)}catch(w){w.message,e.onError(w,b,n.value)}n.value=[...n.value,b],e.onChange(b,n.value)},p=v=>Ne(this,null,function*(){const b=v instanceof File?r(v):v;b||hi(t2,"file to be removed not found");const w=_=>{s(_),l(_),e.onRemove(_,n.value),n2(_)};e.beforeRemove?(yield e.beforeRemove(b,n.value))!==!1&&w(b):w(b)});function g(){n.value.filter(({status:v})=>v==="ready").forEach(({raw:v})=>{var b;return v&&((b=t.value)==null?void 0:b.upload(v))})}return o.watch(()=>e.listType,v=>{v!=="picture-card"&&v!=="picture"||(n.value=n.value.map(b=>{const{raw:w,url:_}=b;if(!_&&w)try{b.url=URL.createObjectURL(w)}catch(C){e.onError(C,b,n.value)}return b}))}),o.watch(n,v=>{for(const b of v)b.uid||(b.uid=kh()),b.status||(b.status="success")},{immediate:!0,deep:!0}),{uploadFiles:n,abort:s,clearFiles:a,handleError:c,handleProgress:u,handleStart:f,handleSuccess:d,handleRemove:p,submit:g,revokeFileObjectURL:n2}},NP=o.defineComponent({name:"ElUpload"}),TP=o.defineComponent(fe(ne({},NP),{props:hP,setup(e,{expose:t}){const n=e,r=_r(),s=o.shallowRef(),{abort:a,submit:l,clearFiles:c,uploadFiles:u,handleStart:d,handleError:f,handleRemove:p,handleSuccess:g,handleProgress:v,revokeFileObjectURL:b}=kP(n,s),w=o.computed(()=>n.listType==="picture-card"),_=o.computed(()=>fe(ne({},n),{fileList:u.value,onStart:d,onProgress:v,onSuccess:g,onError:f,onRemove:p}));return o.onBeforeUnmount(()=>{u.value.forEach(b)}),o.provide(Yb,{accept:o.toRef(n,"accept")}),t({abort:a,submit:l,clearFiles:c,handleStart:d,handleRemove:p}),(C,k)=>(o.openBlock(),o.createElementBlock("div",null,[o.unref(w)&&C.showFileList?(o.openBlock(),o.createBlock(Zb,{key:0,disabled:o.unref(r),"list-type":C.listType,files:o.unref(u),crossorigin:C.crossorigin,"handle-preview":C.onPreview,onRemove:o.unref(p)},o.createSlots({append:o.withCtx(()=>[o.createVNode(e2,o.mergeProps({ref_key:"uploadRef",ref:s},o.unref(_)),{default:o.withCtx(()=>[C.$slots.trigger?o.renderSlot(C.$slots,"trigger",{key:0}):o.createCommentVNode("v-if",!0),!C.$slots.trigger&&C.$slots.default?o.renderSlot(C.$slots,"default",{key:1}):o.createCommentVNode("v-if",!0)]),_:3},16)]),_:2},[C.$slots.file?{name:"default",fn:o.withCtx(({file:S,index:E})=>[o.renderSlot(C.$slots,"file",{file:S,index:E})])}:void 0]),1032,["disabled","list-type","files","crossorigin","handle-preview","onRemove"])):o.createCommentVNode("v-if",!0),!o.unref(w)||o.unref(w)&&!C.showFileList?(o.openBlock(),o.createBlock(e2,o.mergeProps({key:1,ref_key:"uploadRef",ref:s},o.unref(_)),{default:o.withCtx(()=>[C.$slots.trigger?o.renderSlot(C.$slots,"trigger",{key:0}):o.createCommentVNode("v-if",!0),!C.$slots.trigger&&C.$slots.default?o.renderSlot(C.$slots,"default",{key:1}):o.createCommentVNode("v-if",!0)]),_:3},16)):o.createCommentVNode("v-if",!0),C.$slots.trigger?o.renderSlot(C.$slots,"default",{key:2}):o.createCommentVNode("v-if",!0),o.renderSlot(C.$slots,"tip"),!o.unref(w)&&C.showFileList?(o.openBlock(),o.createBlock(Zb,{key:3,disabled:o.unref(r),"list-type":C.listType,files:o.unref(u),crossorigin:C.crossorigin,"handle-preview":C.onPreview,onRemove:o.unref(p)},o.createSlots({_:2},[C.$slots.file?{name:"default",fn:o.withCtx(({file:S,index:E})=>[o.renderSlot(C.$slots,"file",{file:S,index:E})])}:void 0]),1032,["disabled","list-type","files","crossorigin","handle-preview","onRemove"])):o.createCommentVNode("v-if",!0)]))}}));var AP=Oe(TP,[["__file","upload.vue"]]);const OP=kt(AP);function IP(e){let t;const n=o.ref(!1),r=o.reactive(fe(ne({},e),{originalPosition:"",originalOverflow:"",visible:!1}));function s(g){r.text=g}function a(){const g=r.parent,v=p.ns;if(!g.vLoadingAddClassList){let b=g.getAttribute("loading-number");b=Number.parseInt(b)-1,b?g.setAttribute("loading-number",b.toString()):(mr(g,v.bm("parent","relative")),g.removeAttribute("loading-number")),mr(g,v.bm("parent","hidden"))}l(),f.unmount()}function l(){var g,v;(v=(g=p.$el)==null?void 0:g.parentNode)==null||v.removeChild(p.$el)}function c(){var g;e.beforeClose&&!e.beforeClose()||(n.value=!0,clearTimeout(t),t=setTimeout(u,400),r.visible=!1,(g=e.closed)==null||g.call(e))}function u(){if(!n.value)return;const g=r.parent;n.value=!1,g.vLoadingAddClassList=void 0,a()}const d=o.defineComponent({name:"ElLoading",setup(g,{expose:v}){const{ns:b,zIndex:w}=Ff("loading");return v({ns:b,zIndex:w}),()=>{const _=r.spinner||r.svg,C=o.h("svg",ne({class:"circular",viewBox:r.svgViewBox?r.svgViewBox:"0 0 50 50"},_?{innerHTML:_}:{}),[o.h("circle",{class:"path",cx:"25",cy:"25",r:"20",fill:"none"})]),k=r.text?o.h("p",{class:b.b("text")},[r.text]):void 0;return o.h(o.Transition,{name:b.b("fade"),onAfterLeave:u},{default:o.withCtx(()=>[o.withDirectives(o.createVNode("div",{style:{backgroundColor:r.background||""},class:[b.b("mask"),r.customClass,r.fullscreen?"is-fullscreen":""]},[o.h("div",{class:b.b("spinner")},[C,k])]),[[o.vShow,r.visible]])])})}}}),f=o.createApp(d),p=f.mount(document.createElement("div"));return fe(ne({},o.toRefs(r)),{setText:s,removeElLoadingChild:l,close:c,handleAfterLeave:u,vm:p,get $el(){return p.$el}})}let wc;const BP=function(e={}){if(!Ke)return;const t=LP(e);if(t.fullscreen&&wc)return wc;const n=IP(fe(ne({},t),{closed:()=>{var s;(s=t.closed)==null||s.call(t),t.fullscreen&&(wc=void 0)}}));RP(t,t.parent,n),r2(t,t.parent,n),t.parent.vLoadingAddClassList=()=>r2(t,t.parent,n);let r=t.parent.getAttribute("loading-number");return r?r=`${Number.parseInt(r)+1}`:r="1",t.parent.setAttribute("loading-number",r),t.parent.appendChild(n.$el),o.nextTick(()=>n.visible.value=t.visible),t.fullscreen&&(wc=n),n},LP=e=>{var t,n,r,s;let a;return ct(e.target)?a=(t=document.querySelector(e.target))!=null?t:document.body:a=e.target||document.body,{parent:a===document.body||e.body?document.body:a,background:e.background||"",svg:e.svg||"",svgViewBox:e.svgViewBox||"",spinner:e.spinner||!1,text:e.text||"",fullscreen:a===document.body&&((n=e.fullscreen)!=null?n:!0),lock:(r=e.lock)!=null?r:!1,customClass:e.customClass||"",visible:(s=e.visible)!=null?s:!0,beforeClose:e.beforeClose,closed:e.closed,target:a}},RP=(e,t,n)=>Ne(this,null,function*(){const{nextZIndex:r}=n.vm.zIndex||n.vm._.exposed.zIndex,s={};if(e.fullscreen)n.originalPosition.value=Po(document.body,"position"),n.originalOverflow.value=Po(document.body,"overflow"),s.zIndex=r();else if(e.parent===document.body){n.originalPosition.value=Po(document.body,"position"),yield o.nextTick();for(const a of["top","left"]){const l=a==="top"?"scrollTop":"scrollLeft";s[a]=`${e.target.getBoundingClientRect()[a]+document.body[l]+document.documentElement[l]-Number.parseInt(Po(document.body,`margin-${a}`),10)}px`}for(const a of["height","width"])s[a]=`${e.target.getBoundingClientRect()[a]}px`}else n.originalPosition.value=Po(t,"position");for(const[a,l]of Object.entries(s))n.$el.style[a]=l}),r2=(e,t,n)=>{const r=n.vm.ns||n.vm._.exposed.ns;["absolute","fixed","sticky"].includes(n.originalPosition.value)?mr(t,r.bm("parent","relative")):Yi(t,r.bm("parent","relative")),e.fullscreen&&e.lock?Yi(t,r.bm("parent","hidden")):mr(t,r.bm("parent","hidden"))},_c=Symbol("ElLoading"),i2=(e,t)=>{var n,r,s,a;const l=t.instance,c=g=>Lt(t.value)?t.value[g]:void 0,u=g=>{const v=ct(g)&&(l==null?void 0:l[g])||g;return v&&o.ref(v)},d=g=>u(c(g)||e.getAttribute(`element-loading-${uS(g)}`)),f=(n=c("fullscreen"))!=null?n:t.modifiers.fullscreen,p={text:d("text"),svg:d("svg"),svgViewBox:d("svgViewBox"),spinner:d("spinner"),background:d("background"),customClass:d("customClass"),fullscreen:f,target:(r=c("target"))!=null?r:f?void 0:e,body:(s=c("body"))!=null?s:t.modifiers.body,lock:(a=c("lock"))!=null?a:t.modifiers.lock};e[_c]={options:p,instance:BP(p)}},PP=(e,t)=>{for(const n of Object.keys(t))o.isRef(t[n])&&(t[n].value=e[n])},o2={mounted(e,t){t.value&&i2(e,t)},updated(e,t){const n=e[_c];t.oldValue!==t.value&&(t.value&&!t.oldValue?i2(e,t):t.value&&t.oldValue?Lt(t.value)&&PP(t.value,n.options):n==null||n.instance.close())},unmounted(e){var t;(t=e[_c])==null||t.instance.close(),e[_c]=null}},s2=["success","info","warning","error"],jt=ca({customClass:"",center:!1,dangerouslyUseHTMLString:!1,duration:3e3,icon:void 0,id:"",message:"",onClose:void 0,showClose:!1,type:"info",plain:!1,offset:16,zIndex:0,grouping:!1,repeatNum:1,appendTo:Ke?document.body:void 0}),DP=Ae({customClass:{type:String,default:jt.customClass},center:{type:Boolean,default:jt.center},dangerouslyUseHTMLString:{type:Boolean,default:jt.dangerouslyUseHTMLString},duration:{type:Number,default:jt.duration},icon:{type:Hr,default:jt.icon},id:{type:String,default:jt.id},message:{type:ce([String,Object,Function]),default:jt.message},onClose:{type:ce(Function),default:jt.onClose},showClose:{type:Boolean,default:jt.showClose},type:{type:String,values:s2,default:jt.type},plain:{type:Boolean,default:jt.plain},offset:{type:Number,default:jt.offset},zIndex:{type:Number,default:jt.zIndex},grouping:{type:Boolean,default:jt.grouping},repeatNum:{type:Number,default:jt.repeatNum}}),MP={destroy:()=>!0},rr=o.shallowReactive([]),FP=e=>{const t=rr.findIndex(s=>s.id===e),n=rr[t];let r;return t>0&&(r=rr[t-1]),{current:n,prev:r}},$P=e=>{const{prev:t}=FP(e);return t?t.vm.exposed.bottom.value:0},zP=(e,t)=>rr.findIndex(r=>r.id===e)>0?16:t,UP=o.defineComponent({name:"ElMessage"}),jP=o.defineComponent(fe(ne({},UP),{props:DP,emits:MP,setup(e,{expose:t}){const n=e,{Close:r}=k1,{ns:s,zIndex:a}=Ff("message"),{currentZIndex:l,nextZIndex:c}=a,u=o.ref(),d=o.ref(!1),f=o.ref(0);let p;const g=o.computed(()=>n.type?n.type==="error"?"danger":n.type:"info"),v=o.computed(()=>{const I=n.type;return{[s.bm("icon",I)]:I&&Wl[I]}}),b=o.computed(()=>n.icon||Wl[n.type]||""),w=o.computed(()=>$P(n.id)),_=o.computed(()=>zP(n.id,n.offset)+w.value),C=o.computed(()=>f.value+_.value),k=o.computed(()=>({top:`${_.value}px`,zIndex:l.value}));function S(){n.duration!==0&&({stop:p}=Gu(()=>{N()},n.duration))}function E(){p==null||p()}function N(){d.value=!1}function A({code:I}){I===Ji.esc&&N()}return o.onMounted(()=>{S(),c(),d.value=!0}),o.watch(()=>n.repeatNum,()=>{E(),S()}),En(document,"keydown",A),fn(u,()=>{f.value=u.value.getBoundingClientRect().height}),t({visible:d,bottom:C,close:N}),(I,O)=>(o.openBlock(),o.createBlock(o.Transition,{name:o.unref(s).b("fade"),onBeforeLeave:I.onClose,onAfterLeave:F=>I.$emit("destroy"),persisted:""},{default:o.withCtx(()=>[o.withDirectives(o.createElementVNode("div",{id:I.id,ref_key:"messageRef",ref:u,class:o.normalizeClass([o.unref(s).b(),{[o.unref(s).m(I.type)]:I.type},o.unref(s).is("center",I.center),o.unref(s).is("closable",I.showClose),o.unref(s).is("plain",I.plain),I.customClass]),style:o.normalizeStyle(o.unref(k)),role:"alert",onMouseenter:E,onMouseleave:S},[I.repeatNum>1?(o.openBlock(),o.createBlock(o.unref(KI),{key:0,value:I.repeatNum,type:o.unref(g),class:o.normalizeClass(o.unref(s).e("badge"))},null,8,["value","type","class"])):o.createCommentVNode("v-if",!0),o.unref(b)?(o.openBlock(),o.createBlock(o.unref(Ye),{key:1,class:o.normalizeClass([o.unref(s).e("icon"),o.unref(v)])},{default:o.withCtx(()=>[(o.openBlock(),o.createBlock(o.resolveDynamicComponent(o.unref(b))))]),_:1},8,["class"])):o.createCommentVNode("v-if",!0),o.renderSlot(I.$slots,"default",{},()=>[I.dangerouslyUseHTMLString?(o.openBlock(),o.createElementBlock(o.Fragment,{key:1},[o.createCommentVNode(" Caution here, message could've been compromised, never use user's input as message "),o.createElementVNode("p",{class:o.normalizeClass(o.unref(s).e("content")),innerHTML:I.message},null,10,["innerHTML"])],2112)):(o.openBlock(),o.createElementBlock("p",{key:0,class:o.normalizeClass(o.unref(s).e("content"))},o.toDisplayString(I.message),3))]),I.showClose?(o.openBlock(),o.createBlock(o.unref(Ye),{key:2,class:o.normalizeClass(o.unref(s).e("closeBtn")),onClick:o.withModifiers(N,["stop"])},{default:o.withCtx(()=>[o.createVNode(o.unref(r))]),_:1},8,["class","onClick"])):o.createCommentVNode("v-if",!0)],46,["id"]),[[o.vShow,d.value]])]),_:3},8,["name","onBeforeLeave","onAfterLeave"]))}}));var qP=Oe(jP,[["__file","message.vue"]]);let HP=1;const a2=e=>{const t=!e||ct(e)||o.isVNode(e)||it(e)?{message:e}:e,n=ne(ne({},jt),t);if(!n.appendTo)n.appendTo=document.body;else if(ct(n.appendTo)){let r=document.querySelector(n.appendTo);gr(r)||(r=document.body),n.appendTo=r}return rn(Vn.grouping)&&!n.grouping&&(n.grouping=Vn.grouping),Ge(Vn.duration)&&n.duration===3e3&&(n.duration=Vn.duration),Ge(Vn.offset)&&n.offset===16&&(n.offset=Vn.offset),rn(Vn.showClose)&&!n.showClose&&(n.showClose=Vn.showClose),n},GP=e=>{const t=rr.indexOf(e);if(t===-1)return;rr.splice(t,1);const{handler:n}=e;n.close()},WP=(r,n)=>{var s=r,{appendTo:e}=s,t=fi(s,["appendTo"]);const a=`message_${HP++}`,l=t.onClose,c=document.createElement("div"),u=fe(ne({},t),{id:a,onClose:()=>{l==null||l(),GP(g)},onDestroy:()=>{o.render(null,c)}}),d=o.createVNode(qP,u,it(u.message)||o.isVNode(u.message)?{default:it(u.message)?u.message:()=>u.message}:null);d.appContext=n||Zo._context,o.render(d,c),e.appendChild(c.firstElementChild);const f=d.component,g={id:a,vnode:d,vm:f,handler:{close:()=>{f.exposed.visible.value=!1}},props:d.component.props};return g},Zo=(e={},t)=>{if(!Ke)return{close:()=>{}};const n=a2(e);if(n.grouping&&rr.length){const s=rr.find(({vnode:a})=>{var l;return((l=a.props)==null?void 0:l.message)===n.message});if(s)return s.props.repeatNum+=1,s.props.type=n.type,s.handler}if(Ge(Vn.max)&&rr.length>=Vn.max)return{close:()=>{}};const r=WP(n,t);return rr.push(r),r.handler};s2.forEach(e=>{Zo[e]=(t={},n)=>{const r=a2(t);return Zo(fe(ne({},r),{type:e}),n)}});function KP(e){for(const t of rr)(!e||e===t.props.type)&&t.handler.close()}Zo.closeAll=KP,Zo._context=null;const Nt=KN(Zo,"$message"),YP=o.defineComponent({name:"ElMessageBox",directives:{TrapFocus:yB},components:ne({ElButton:no,ElFocusTrap:eh,ElInput:mi,ElOverlay:kb,ElIcon:Ye},k1),inheritAttrs:!1,props:{buttonSize:{type:String,validator:XN},modal:{type:Boolean,default:!0},lockScroll:{type:Boolean,default:!0},showClose:{type:Boolean,default:!0},closeOnClickModal:{type:Boolean,default:!0},closeOnPressEscape:{type:Boolean,default:!0},closeOnHashChange:{type:Boolean,default:!0},center:Boolean,draggable:Boolean,overflow:Boolean,roundButton:{default:!1,type:Boolean},container:{type:String,default:"body"},boxType:{type:String,default:""}},emits:["vanish","action"],setup(e,{emit:t}){const{locale:n,zIndex:r,ns:s,size:a}=Ff("message-box",o.computed(()=>e.buttonSize)),{t:l}=n,{nextZIndex:c}=r,u=o.ref(!1),d=o.reactive({autofocus:!0,beforeClose:null,callback:null,cancelButtonText:"",cancelButtonClass:"",confirmButtonText:"",confirmButtonClass:"",customClass:"",customStyle:{},dangerouslyUseHTMLString:!1,distinguishCancelAndClose:!1,icon:"",inputPattern:null,inputPlaceholder:"",inputType:"text",inputValue:null,inputValidator:null,inputErrorMessage:"",message:null,modalFade:!0,modalClass:"",showCancelButton:!1,showConfirmButton:!0,type:"",title:void 0,showInput:!1,action:"",confirmButtonLoading:!1,cancelButtonLoading:!1,confirmButtonLoadingIcon:o.markRaw(Mo),cancelButtonLoadingIcon:o.markRaw(Mo),confirmButtonDisabled:!1,editorErrorMessage:"",validateError:!1,zIndex:c()}),f=o.computed(()=>{const D=d.type;return{[s.bm("icon",D)]:D&&Wl[D]}}),p=br(),g=br(),v=o.computed(()=>d.icon||Wl[d.type]||""),b=o.computed(()=>!!d.message),w=o.ref(),_=o.ref(),C=o.ref(),k=o.ref(),S=o.ref(),E=o.computed(()=>d.confirmButtonClass);o.watch(()=>d.inputValue,D=>Ne(this,null,function*(){yield o.nextTick(),e.boxType==="prompt"&&D!==null&&W()}),{immediate:!0}),o.watch(()=>u.value,D=>{var j,K;D&&(e.boxType!=="prompt"&&(d.autofocus?C.value=(K=(j=S.value)==null?void 0:j.$el)!=null?K:w.value:C.value=w.value),d.zIndex=c()),e.boxType==="prompt"&&(D?o.nextTick().then(()=>{var H;k.value&&k.value.$el&&(d.autofocus?C.value=(H=U())!=null?H:w.value:C.value=w.value)}):(d.editorErrorMessage="",d.validateError=!1))});const N=o.computed(()=>e.draggable),A=o.computed(()=>e.overflow);T1(w,_,N,A),o.onMounted(()=>Ne(this,null,function*(){yield o.nextTick(),e.closeOnHashChange&&window.addEventListener("hashchange",I)})),o.onBeforeUnmount(()=>{e.closeOnHashChange&&window.removeEventListener("hashchange",I)});function I(){u.value&&(u.value=!1,o.nextTick(()=>{d.action&&t("action",d.action)}))}const O=()=>{e.closeOnClickModal&&M(d.distinguishCancelAndClose?"close":"cancel")},F=Df(O),P=D=>{if(d.inputType!=="textarea")return D.preventDefault(),M("confirm")},M=D=>{var j;e.boxType==="prompt"&&D==="confirm"&&!W()||(d.action=D,d.beforeClose?(j=d.beforeClose)==null||j.call(d,D,d,I):I())},W=()=>{if(e.boxType==="prompt"){const D=d.inputPattern;if(D&&!D.test(d.inputValue||""))return d.editorErrorMessage=d.inputErrorMessage||l("el.messagebox.error"),d.validateError=!0,!1;const j=d.inputValidator;if(typeof j=="function"){const K=j(d.inputValue);if(K===!1)return d.editorErrorMessage=d.inputErrorMessage||l("el.messagebox.error"),d.validateError=!0,!1;if(typeof K=="string")return d.editorErrorMessage=K,d.validateError=!0,!1}}return d.editorErrorMessage="",d.validateError=!1,!0},U=()=>{const D=k.value.$refs;return D.input||D.textarea},Q=()=>{M("close")},q=()=>{e.closeOnPressEscape&&Q()};return e.lockScroll&&I1(u),fe(ne({},o.toRefs(d)),{ns:s,overlayEvent:F,visible:u,hasMessage:b,typeClass:f,contentId:p,inputId:g,btnSize:a,iconComponent:v,confirmButtonClasses:E,rootRef:w,focusStartRef:C,headerRef:_,inputRef:k,confirmRef:S,doClose:I,handleClose:Q,onCloseRequested:q,handleWrapperClick:O,handleInputEnter:P,handleAction:M,t:l})}});function JP(e,t,n,r,s,a){const l=o.resolveComponent("el-icon"),c=o.resolveComponent("close"),u=o.resolveComponent("el-input"),d=o.resolveComponent("el-button"),f=o.resolveComponent("el-focus-trap"),p=o.resolveComponent("el-overlay");return o.openBlock(),o.createBlock(o.Transition,{name:"fade-in-linear",onAfterLeave:g=>e.$emit("vanish"),persisted:""},{default:o.withCtx(()=>[o.withDirectives(o.createVNode(p,{"z-index":e.zIndex,"overlay-class":[e.ns.is("message-box"),e.modalClass],mask:e.modal},{default:o.withCtx(()=>[o.createElementVNode("div",{role:"dialog","aria-label":e.title,"aria-modal":"true","aria-describedby":e.showInput?void 0:e.contentId,class:o.normalizeClass(`${e.ns.namespace.value}-overlay-message-box`),onClick:e.overlayEvent.onClick,onMousedown:e.overlayEvent.onMousedown,onMouseup:e.overlayEvent.onMouseup},[o.createVNode(f,{loop:"",trapped:e.visible,"focus-trap-el":e.rootRef,"focus-start-el":e.focusStartRef,onReleaseRequested:e.onCloseRequested},{default:o.withCtx(()=>[o.createElementVNode("div",{ref:"rootRef",class:o.normalizeClass([e.ns.b(),e.customClass,e.ns.is("draggable",e.draggable),{[e.ns.m("center")]:e.center}]),style:o.normalizeStyle(e.customStyle),tabindex:"-1",onClick:o.withModifiers(()=>{},["stop"])},[e.title!==null&&e.title!==void 0?(o.openBlock(),o.createElementBlock("div",{key:0,ref:"headerRef",class:o.normalizeClass([e.ns.e("header"),{"show-close":e.showClose}])},[o.createElementVNode("div",{class:o.normalizeClass(e.ns.e("title"))},[e.iconComponent&&e.center?(o.openBlock(),o.createBlock(l,{key:0,class:o.normalizeClass([e.ns.e("status"),e.typeClass])},{default:o.withCtx(()=>[(o.openBlock(),o.createBlock(o.resolveDynamicComponent(e.iconComponent)))]),_:1},8,["class"])):o.createCommentVNode("v-if",!0),o.createElementVNode("span",null,o.toDisplayString(e.title),1)],2),e.showClose?(o.openBlock(),o.createElementBlock("button",{key:0,type:"button",class:o.normalizeClass(e.ns.e("headerbtn")),"aria-label":e.t("el.messagebox.close"),onClick:g=>e.handleAction(e.distinguishCancelAndClose?"close":"cancel"),onKeydown:o.withKeys(o.withModifiers(g=>e.handleAction(e.distinguishCancelAndClose?"close":"cancel"),["prevent"]),["enter"])},[o.createVNode(l,{class:o.normalizeClass(e.ns.e("close"))},{default:o.withCtx(()=>[o.createVNode(c)]),_:1},8,["class"])],42,["aria-label","onClick","onKeydown"])):o.createCommentVNode("v-if",!0)],2)):o.createCommentVNode("v-if",!0),o.createElementVNode("div",{id:e.contentId,class:o.normalizeClass(e.ns.e("content"))},[o.createElementVNode("div",{class:o.normalizeClass(e.ns.e("container"))},[e.iconComponent&&!e.center&&e.hasMessage?(o.openBlock(),o.createBlock(l,{key:0,class:o.normalizeClass([e.ns.e("status"),e.typeClass])},{default:o.withCtx(()=>[(o.openBlock(),o.createBlock(o.resolveDynamicComponent(e.iconComponent)))]),_:1},8,["class"])):o.createCommentVNode("v-if",!0),e.hasMessage?(o.openBlock(),o.createElementBlock("div",{key:1,class:o.normalizeClass(e.ns.e("message"))},[o.renderSlot(e.$slots,"default",{},()=>[e.dangerouslyUseHTMLString?(o.openBlock(),o.createBlock(o.resolveDynamicComponent(e.showInput?"label":"p"),{key:1,for:e.showInput?e.inputId:void 0,innerHTML:e.message},null,8,["for","innerHTML"])):(o.openBlock(),o.createBlock(o.resolveDynamicComponent(e.showInput?"label":"p"),{key:0,for:e.showInput?e.inputId:void 0},{default:o.withCtx(()=>[o.createTextVNode(o.toDisplayString(e.dangerouslyUseHTMLString?"":e.message),1)]),_:1},8,["for"]))])],2)):o.createCommentVNode("v-if",!0)],2),o.withDirectives(o.createElementVNode("div",{class:o.normalizeClass(e.ns.e("input"))},[o.createVNode(u,{id:e.inputId,ref:"inputRef",modelValue:e.inputValue,"onUpdate:modelValue":g=>e.inputValue=g,type:e.inputType,placeholder:e.inputPlaceholder,"aria-invalid":e.validateError,class:o.normalizeClass({invalid:e.validateError}),onKeydown:o.withKeys(e.handleInputEnter,["enter"])},null,8,["id","modelValue","onUpdate:modelValue","type","placeholder","aria-invalid","class","onKeydown"]),o.createElementVNode("div",{class:o.normalizeClass(e.ns.e("errormsg")),style:o.normalizeStyle({visibility:e.editorErrorMessage?"visible":"hidden"})},o.toDisplayString(e.editorErrorMessage),7)],2),[[o.vShow,e.showInput]])],10,["id"]),o.createElementVNode("div",{class:o.normalizeClass(e.ns.e("btns"))},[e.showCancelButton?(o.openBlock(),o.createBlock(d,{key:0,loading:e.cancelButtonLoading,"loading-icon":e.cancelButtonLoadingIcon,class:o.normalizeClass([e.cancelButtonClass]),round:e.roundButton,size:e.btnSize,onClick:g=>e.handleAction("cancel"),onKeydown:o.withKeys(o.withModifiers(g=>e.handleAction("cancel"),["prevent"]),["enter"])},{default:o.withCtx(()=>[o.createTextVNode(o.toDisplayString(e.cancelButtonText||e.t("el.messagebox.cancel")),1)]),_:1},8,["loading","loading-icon","class","round","size","onClick","onKeydown"])):o.createCommentVNode("v-if",!0),o.withDirectives(o.createVNode(d,{ref:"confirmRef",type:"primary",loading:e.confirmButtonLoading,"loading-icon":e.confirmButtonLoadingIcon,class:o.normalizeClass([e.confirmButtonClasses]),round:e.roundButton,disabled:e.confirmButtonDisabled,size:e.btnSize,onClick:g=>e.handleAction("confirm"),onKeydown:o.withKeys(o.withModifiers(g=>e.handleAction("confirm"),["prevent"]),["enter"])},{default:o.withCtx(()=>[o.createTextVNode(o.toDisplayString(e.confirmButtonText||e.t("el.messagebox.confirm")),1)]),_:1},8,["loading","loading-icon","class","round","disabled","size","onClick","onKeydown"]),[[o.vShow,e.showConfirmButton]])],2)],14,["onClick"])]),_:3},8,["trapped","focus-trap-el","focus-start-el","onReleaseRequested"])],42,["aria-label","aria-describedby","onClick","onMousedown","onMouseup"])]),_:3},8,["z-index","overlay-class","mask"]),[[o.vShow,e.visible]])]),_:3},8,["onAfterLeave"])}var XP=Oe(YP,[["render",JP],["__file","index.vue"]]);const Na=new Map,QP=e=>{let t=document.body;return e.appendTo&&(ct(e.appendTo)&&(t=document.querySelector(e.appendTo)),gr(e.appendTo)&&(t=e.appendTo),gr(t)||(t=document.body)),t},ZP=(e,t,n=null)=>{const r=o.createVNode(XP,e,it(e.message)||o.isVNode(e.message)?{default:it(e.message)?e.message:()=>e.message}:null);return r.appContext=n,o.render(r,t),QP(e).appendChild(t.firstElementChild),r.component},VP=()=>document.createElement("div"),eD=(e,t)=>{const n=VP();e.onVanish=()=>{o.render(null,n),Na.delete(s)},e.onAction=a=>{const l=Na.get(s);let c;e.showInput?c={value:s.inputValue,action:a}:c=a,e.callback?e.callback(c,r.proxy):a==="cancel"||a==="close"?e.distinguishCancelAndClose&&a!=="cancel"?l.reject("close"):l.reject("cancel"):l.resolve(c)};const r=ZP(e,n,t),s=r.proxy;for(const a in e)zr(e,a)&&!zr(s.$props,a)&&(s[a]=e[a]);return s.visible=!0,s};function Vo(e,t=null){if(!Ke)return Promise.reject();let n;return ct(e)||o.isVNode(e)?e={message:e}:n=e.callback,new Promise((r,s)=>{const a=eD(e,t!=null?t:Vo._context);Na.set(a,{options:e,callback:n,resolve:r,reject:s})})}const tD=["alert","confirm","prompt"],nD={alert:{closeOnPressEscape:!1,closeOnClickModal:!1},confirm:{showCancelButton:!0},prompt:{showCancelButton:!0,showInput:!0}};tD.forEach(e=>{Vo[e]=rD(e)});function rD(e){return(t,n,r,s)=>{let a="";return Lt(n)?(r=n,a=""):Xt(n)?a="":a=n,Vo(Object.assign(ne({title:a,message:t,type:""},nD[e]),r,{boxType:e}),s)}}Vo.close=()=>{Na.forEach((e,t)=>{t.doClose()}),Na.clear()},Vo._context=null;const Ci=Vo;Ci.install=e=>{Ci._context=e._context,e.config.globalProperties.$msgbox=Ci,e.config.globalProperties.$messageBox=Ci,e.config.globalProperties.$alert=Ci.alert,e.config.globalProperties.$confirm=Ci.confirm,e.config.globalProperties.$prompt=Ci.prompt};const l2=Ci,Hoe="",Goe="",Woe="",Koe="",Nh=new WeakMap;function Th(e){let t=Nh.get(e);return t||Nh.set(e,t=Object.create(null)),t}function Si(e,t,n){if(Array.isArray(t))t.forEach(r=>Si(e,r,n));else{const r=Th(e);(r[t]||(r[t]=[])).push(n)}return e}function Ei(e,t,n){const r=e;if(!t)return Nh.set(e,Object.create(null)),r;if(Array.isArray(t))return t.forEach(l=>Ei(e,l,n)),r;const s=Th(e),a=s[t];return a?n?(s[t]=a.filter(l=>!(l===n||l.fn===n)),r):(s[t]=void 0,r):r}function ve(e,t,...n){e&&e.$emit&&e.$emit(t,...n);const r=Th(e)[t];return r&&r.map(s=>s.apply(e,n)),e}function iD(e){return/^(https?:|mailto:|tel:)/.test(e)}const Yoe="",_t=(e,t)=>{const n=e.__vccOpts||e;for(const[r,s]of t)n[r]=s;return n},oD={name:"ForceGraphSvgIcon",props:{iconClass:{type:String,required:!0},className:{type:String,default:""}},computed:{isExternal(){return iD(this.iconClass)||this.iconClass.startsWith("data:image")||!1},iconName(){return`#icon-${this.iconClass}`},svgClass(){return this.className?"svg-icon "+this.className:"svg-icon"},styleExternalIcon(){return{mask:`url(${this.iconClass}) no-repeat 50% 50%`,"-webkit-mask":`url(${this.iconClass}) no-repeat 50% 50%`}}}},sD=["xlink:href"];function aD(e,t,n,r,s,a){return a.isExternal?(o.openBlock(),o.createElementBlock("div",o.mergeProps({key:0},e.$attrs,{style:a.styleExternalIcon,class:"svg-external-icon svg-icon"}),null,16)):(o.openBlock(),o.createElementBlock("svg",o.mergeProps({key:1},e.$attrs,{class:a.svgClass,"aria-hidden":"true"}),[o.createElementVNode("use",{"xlink:href":a.iconName},null,8,sD)],16))}const so=_t(oD,[["render",aD],["__scopeId","data-v-73ac1940"]]);class lD{constructor(t){this.init(t)}init(t){this.length=0,this.all=[],this.currentIndex=0,this.dataOrigin={nodes:{},links:{},groups:{}},this.nodeTree={},this.nodeParent={},this.dataNow={nodes:[],links:[],groups:[]},this.showInfo={nodes:0,links:0,timeOut:null,time:100},this.keyNodeIds=null,this.levels=[],this.nodeWidth=40,this.nodeMargin=40,this.layout=["forceLayout","treeLayout"],this.layoutIndex=0,this.isShowNodeMessage=t.isShowNodeMessage}initFromSnapshot({length:t,all:n,currentIndex:r,dataOrigin:s,dataNow:a,showInfo:l,nodeTree:c,nodeParent:u,keyNodeIds:d,layoutIndex:f}){this.length=t,this.all=n,this.currentIndex=r,this.dataOrigin=s,this.nodeTree=c,this.nodeParent=u,this.keyNodeIds=d,this.layoutIndex=f;for(const p in a.nodes)delete a.nodes[p].vx,delete a.nodes[p].vy,delete a.nodes[p].x,delete a.nodes[p].y;this.dataNow=a,this.dataNow.links.map(p=>{p.source=p.source.id,p.target=p.target.id}),this.dataNow=Object.assign({},this.dataNow,{}),this.showInfo=JSON.parse(JSON.stringify(l))}forward(){this.currentIndex<this.length-1&&(this.currentIndex=this.currentIndex+1,this.onAction(this.all[this.currentIndex],!0))}back(){this.currentIndex>=0&&(this.resumeAction(this.all[this.currentIndex]),this.currentIndex=this.currentIndex-1)}pushState(t){this.all=this.all.slice(0,this.currentIndex+1);const n=this.onAction(t);this.all.push(n),this.length=this.all.length,this.currentIndex=this.all.length-1}updateGroups(){const t={};this.dataNow.nodes.map(r=>{var s;t[r.group]?t[r.group].nodes.push(r):t[r.group]={nodes:[r],id:r.group,api:(s=r.group)==null?void 0:s.split("~")[1],apiName:r.groupC}});const n=Object.values(t);this.dataNow.groups=n}onAction(t,n=!1){const r=this,s=this.dataNow.nodes.length,a=this.dataNow.links.length,{addOne:l,updateOne:c,deleteOne:u,type:d}=t;l&&(l.originNodes=[],l.nodes&&l.nodes.map(v=>{(!this.dataOrigin.nodes[v.id]||d==="aggregation"||d==="addFromAggregation")&&(this.dataOrigin.nodes[v.id]=!0,delete v.vx,delete v.vy,delete v.x,delete v.y,this.dataNow.nodes.push(v),l.originNodes.push(v))}),l.links&&l.links.map(v=>{v.source=v.source.id?v.source.id:v.source,v.target=v.target.id?v.target.id:v.target,(!this.dataOrigin.links[`${v.source}+${v.target}`]&&!this.dataOrigin.links[`${v.target}+${v.source}`]||d==="aggregation"||d==="addFromAggregation")&&(this.dataOrigin.links[`${v.source}+${v.target}`]=!0,this.dataNow.links.push(v),this.updateNodeTree(v),this.updateNodeParent(v))})),c&&(c.originNodes=[],c.originLinks=[],c.nodes&&c.nodes.map(v=>{for(const b in this.dataNow.nodes)if(v.id===this.dataNow.nodes[b].id){const w=[];v.keyVals.map(_=>{w.push({key:_.key,value:JSON.parse(JSON.stringify(this.dataNow.nodes[b][_.key]))})}),c.originNodes.push({id:v.id,keyVals:w}),v.keyVals.map(_=>{this.dataNow.nodes[b][_.key]=_.value});break}}),c.links&&c.links.map(v=>{for(const b in this.dataNow.links)if(v.source===this.dataNow.links[b].source&&v.target===this.dataNow.links[b].target){c.originLinks.push(this.dataNow.links[b]),this.dataNow.links[b]=v;break}}));function f(v){v&&v.map(b=>{var w;for(const _ in r.dataNow.nodes)if(b.id===r.dataNow.nodes[_].id){u.originNodes.push(r.dataNow.nodes[_]),d!=="aggregation"&&(r.dataOrigin.nodes[`${r.dataNow.nodes[_].id}`]=!1),r.dataNow.nodes.splice(_,1);const C=JSON.parse(JSON.stringify(r.dataNow.links));for(let k=C.length-1;k>=0;k--)if((b.id===C[k].source.id||b.id===C[k].target.id)&&(u.originLinks.push(C[k]),d!=="aggregation"&&(r.dataOrigin.links[`${C[k].source.id}+${C[k].target.id}`]=!1),r.dataNow.links.splice(k,1),r.updateNodeTree(C[k],"delete"),r.updateNodeParent(C[k],"delete"),b.id===C[k].target.id&&C[k].source.type==="nodeType"&&!r.nodeTree[C[k].source.id]&&f([C[k].source]),b.id===C[k].source.id)){const S=C[k].target;((w=r.nodeParent[S.id])==null?void 0:w.length)>=1?r.nodeParent[S.id].some(N=>u.originNodes.map(A=>A.id).indexOf(N)<0)||f([S]):f([S])}break}})}u&&(u.originNodes=[],u.originLinks=[],f(u.nodes),u.links&&u.links.map(v=>{for(const b in this.dataNow.links)if(v.source===this.dataNow.links[b].source&&v.target===this.dataNow.links[b].target){u.originLinks.push(this.dataNow.links[b]),d!=="aggregation"&&(this.dataOrigin.links[`${this.dataNow.links[b].source.id}+${this.dataNow.links[b].target.id}`]=!1),this.dataNow.links.splice(b,1),this.updateNodeTree(v,"delete"),this.updateNodeParent(v,"delete");break}})),this.updateGroups(),this.computePos();const p=this.dataNow.nodes.length,g=this.dataNow.links.length;return d!=="aggregation"&&this.showMessage(p-s,g-a),t}resumeAction(t){var f,p;const{addOne:n,updateOne:r,deleteOne:s,type:a}=t,l=this.dataNow.nodes.length,c=this.dataNow.links.length;n&&(n.nodes&&n.originNodes.map(g=>{for(const v in this.dataNow.nodes)if(g.id===this.dataNow.nodes[v].id){this.dataOrigin.nodes[`${this.dataNow.nodes[v].id}`]=!1,this.dataNow.nodes.splice(v,1);break}}),n.links&&n.links.map(g=>{var v,b,w,_;for(const C in this.dataNow.links){const k=(v=g.source)!=null&&v.id?g.source.id:g.source,S=(b=g.target)!=null&&b.id?g.target.id:g.target,E=(w=this.dataNow.links[C].source)!=null&&w.id?this.dataNow.links[C].source.id:this.dataNow.links[C].source,N=(_=this.dataNow.links[C].target)!=null&&_.id?this.dataNow.links[C].target.id:this.dataNow.links[C].target;if(k===E&&S===N){this.dataOrigin.links[`${E}+${N}`]=!1,this.dataNow.links.splice(C,1),this.updateNodeTree(g,"delete"),this.updateNodeParent(g,"delete");break}}})),r&&(r.originNodes&&r.originNodes.map(g=>{for(const v in this.dataNow.nodes)if(g.id===this.dataNow.nodes[v].id){g.keyVals.map(b=>{this.dataNow.nodes[v][b.key]=b.value});break}}),r.originLinks&&r.originLinks.map(g=>{for(const v in this.dataNow.links)if(g.source.id===this.dataNow.links[v].source.id&&g.target.id===this.dataNow.links[v].target.id){g.keyVals.map(b=>{this.dataNow.links[v][b.key]=b.value});break}})),s&&(s.originNodes&&s.originNodes.map(g=>{(!this.dataOrigin.nodes[g.id]||a==="aggregation")&&(this.dataOrigin.nodes[g.id]=!0,this.dataNow.nodes.push(g))}),s.originLinks&&s.originLinks.map(g=>{(!this.dataOrigin.links[`${g.source}+${g.target}`]&&!this.dataOrigin.links[`${g.target}+${g.source}`]||a==="aggregation")&&(this.dataOrigin.links[`${g.source.id}+${g.target.id}`]=!0,this.dataNow.links.push(g),this.updateNodeTree(g),this.updateNodeParent(g))}));for(const g in this.dataNow.links)this.dataNow.links[g].source=(f=this.dataNow.links[g].source)!=null&&f.id?this.dataNow.links[g].source.id:this.dataNow.links[g].source,this.dataNow.links[g].target=(p=this.dataNow.links[g].target)!=null&&p.id?this.dataNow.links[g].target.id:this.dataNow.links[g].target;this.updateGroups(),this.computePos();const u=this.dataNow.nodes.length,d=this.dataNow.links.length;a!=="aggregation"&&this.showMessage(u-l,d-c)}showMessage(t,n){if(!this.isShowNodeMessage)return;this.showInfo.nodes+=t,this.showInfo.links+=n;const r=this.showInfo.nodes>=0?"新增"+this.showInfo.nodes:"减少"+-this.showInfo.nodes,s=this.showInfo.links>=0?"新增"+this.showInfo.links:"减少"+-this.showInfo.links;Nt({message:`${r}个节点, ${s}条边`,type:"info"}),this.showInfo.nodes=0,this.showInfo.links=0}updateData(t,n){t.map(s=>{const a=this.dataNow.nodes.findIndex(l=>{var c;return(l==null?void 0:l.id)===((c=s.info)==null?void 0:c.id)});a<0||(this.dataNow.nodes[a].detail=JSON.parse(JSON.stringify(s)))}),(n==null?void 0:n.filter(s=>t.findIndex(a=>{var l;return((l=a.info)==null?void 0:l.id)===s}))).map(s=>{const a=this.dataNow.nodes.findIndex(l=>l.id===s);a<0||(this.dataNow.nodes[a].noDetail=!0)}),this.dataNow=Object.assign({},this.dataNow,{})}updateAggregationDetail(t,n,r){var l;const s=(l=this.dataNow.nodes.find(c=>c.id===r))==null?void 0:l.list;t.map(c=>{const u=s.findIndex(d=>{var f;return(d==null?void 0:d.id)===((f=c.info)==null?void 0:f.id)});u<0||(s[u].detail=JSON.parse(JSON.stringify(c)))}),(n==null?void 0:n.filter(c=>t.findIndex(u=>{var d;return((d=u.info)==null?void 0:d.id)===c}))).map(c=>{const u=s.findIndex(d=>d.id===c);u<0||(s[u].noDetail=!0)}),this.dataNow=Object.assign({},this.dataNow,{})}updateAggregationNode(t,n){const r=this.dataNow.nodes.find(s=>s.id===n);r.list=t,this.dataNow=Object.assign({},this.dataNow,{})}toString(){const t={length:this.length,all:this.all,currentIndex:this.currentIndex,dataOrigin:this.dataOrigin,dataNow:this.dataNow,showInfo:this.showInfo,nodeTree:this.nodeTree,nodeParent:this.nodeParent,keyNodeIds:this.keyNodeIds,layoutIndex:this.layoutIndex};return JSON.stringify(t)}updateNodeTree(t,n="add"){var a,l;const r=t.target.id?t.target.id:t.target,s=t.source.id?t.source.id:t.source;if(n==="add")this.nodeTree[s]?this.nodeTree[s].push(r):this.nodeTree[s]=[r];else if(((a=this.nodeTree[s])==null?void 0:a.length)===1)this.nodeTree[s]=null;else if(((l=this.nodeTree[s])==null?void 0:l.length)>1){const c=this.nodeTree[s].indexOf(r);this.nodeTree[s].splice(c,1)}}updateNodeParent(t,n="add"){var a,l;const r=t.target.id?t.target.id:t.target,s=t.source.id?t.source.id:t.source;if(n==="add")this.nodeParent[r]&&this.nodeParent[r].indexOf(s)<0?this.nodeParent[r].push(s):this.nodeParent[r]=[s];else if(((a=this.nodeParent[r])==null?void 0:a.length)===1)this.nodeParent[r]=null;else if(((l=this.nodeParent[r])==null?void 0:l.length)>1){const c=this.nodeParent[r].indexOf(s);this.nodeParent[r].splice(c,1)}}toggleShowNode(t,n,r=!1){const s=this.dataNow.links,a=this;function l(f){var p;if(f.show!==!1){f.show=!1;for(let g=s.length-1;g>=0;g--)if(f.id===s[g].target.id&&s[g].source.type==="nodeType"&&a.dataNow.nodes.filter(b=>a.nodeTree[s[g].source.id].indexOf(b.id)>=0&&b.show===!0).length===0&&l(s[g].source),f.id===s[g].source.id){const v=s[g].target;if(((p=a.nodeParent[v.id])==null?void 0:p.length)>=1){const w=a.dataNow.nodes.filter(C=>a.nodeParent[v.id].indexOf(C.id)>=0&&C.show===!0).length,_=a.dataNow.nodes.some(C=>C.id===v.id&&C.startNode===!0);w===0&&!_&&l(v)}}}}function c(f){f.show=!0;for(let g=s.length-1;g>=0;g--)s[g].source.id===f.id&&s[g].target.show===!1&&(s[g].target.show=!0,c(s[g].target));const{keyNodeIds:p}=a.findKeyLinksAndNodes(f.id);a.dataNow.nodes.map(g=>{p.indexOf(g.id)>=0&&!g.show&&(g.show=!0)})}const u=this.dataNow.nodes.findIndex(f=>f.id===t.id),d=this.dataNow.nodes[u];r?c(d):l(d)}findKeyLinksAndNodes(t,n=!1){const r=[],s=[t],a=this;function l(c){if(a.dataNow.nodes.some(f=>f.id===c&&f.startNode===!0))return;const d=a.getParentLink(c);d&&r.findIndex(f=>f.index===d.index)<0&&(r.push(d),l(d.source.id))}return l(t),this.dataNow.links.map(c=>{r.find(d=>d.source.id===c.source.id&&d.target.id===c.target.id)&&s.push(c.source.id)}),n&&(this.keyNodeIds=s),{keyLinks:r,keyNodeIds:s}}resetKeyLinksAndNodes(){this.keyNodeIds=null}getParentLink(t){return this.dataNow.links.find(n=>n.target.id===t)}initPosId(){const t=this,n=this.dataNow.nodes.filter(l=>l.startNode===!0),r=[],s=n.map(l=>l.id);a(s,0);function a(l,c){for(let f=0;f<l.length;f++){const p=l[f];p!=null&&p.indexPos||(r[c]?r[c].push(p):r[c]=[p])}if(!r[c])return;const u={};t.dataNow.nodes.map(f=>{r[c].indexOf(f.id)>=0&&(u[f.id]=f)}),r[c].sort((f,p)=>{var b,w;const g=t.dataNow.nodes.find(_=>_.id===u[f].parents&&u[f].parents[0]),v=t.dataNow.nodes.find(_=>_.id===u[p].parents&&u[p].parents[0]);return((b=g==null?void 0:g.indexPos)==null?void 0:b.split("-").pop())*1-((w=v==null?void 0:v.indexPos)==null?void 0:w.split("-").pop())*1||-1}),t.dataNow.nodes.map(f=>{const p=r[c].indexOf(f.id);if(p>=0){if(f.levelNum&&f.levelNum!==c)return;f.indexPos=c+"-"+p,f.levelNum=c}t.dataNow.links.map(g=>{g.target===f.id&&(g.indexPos=f.indexPos)})});const d=t.dataNow.links.filter(f=>{const p=r[c].indexOf(f.source.id?f.source.id:f.source)>=0,g=r.flat().indexOf(f.target.id?f.target.id:f.target)<0;return p&&g}).map(f=>f.target.id?f.target.id:f.target);d.length>0&&a(d,c+1)}this.levels=r}computeFamilyRelation(){this.dataNow.nodes.map(t=>{t.children=null,t.parents=null}),this.dataNow.links.map(t=>{const n=this.dataNow.nodes.find(s=>s.id===(t.source.id?t.source.id:t.source)),r=this.dataNow.nodes.find(s=>s.id===(t.target.id?t.target.id:t.target));n&&r&&(n.children?n.children.push(r.id):n.children=[r.id]),r&&n&&(r.parents?r.parents.push(n.id):r.parents=[n.id])}),this.dataNow.nodes.map(t=>{t.startNode===!0&&(t.parents=["virtualOne"])})}computeWidth(){this.nodeWidth;const t=this.nodeMargin,n=this;r(this.levels,this.levels.length-1);function r(s,a){const l=s[a];if(!l)return;const c=l.map(d=>n.dataNow.nodes.find(f=>f.id===d));l.map(d=>{var g,v;const f=n.dataNow.nodes.find(b=>b.id===d),p=(g=f.children)==null?void 0:g.reduce((b,w)=>(n.dataNow.nodes.find(C=>w===C.id).widthBefore||0)+b,0);f.levelWidth=p+(((v=f.children)==null?void 0:v.length)-1)*t||0});let u;l.map((d,f)=>{const p=n.dataNow.nodes.find(g=>g.id===d);p.widthBefore=0,p.children&&(u>=0&&(p.widthBefore=Math.max(0,p.levelWidth/2-(f-u-1)*t+c[u].levelWidth/2)),u=f)}),r(s,a-1)}}computeOneLevelPos(t,n){this.nodeWidth;const r=this.nodeMargin,s=t[n],a=this;if(!s)return;const l={};this.dataNow.nodes.filter(u=>s.indexOf(u.id)>=0).map(u=>{u.parents||(u.parents=[]),l[u.parents[0]]?l[u.parents[0]].push(u):l[u.parents[0]]=[u]});for(const u in l)l[u].sort((d,f)=>{var p,g;return((p=d.indexPos)==null?void 0:p.split("-").pop())*1-((g=f.indexPos)==null?void 0:g.split("-").pop())*1}),c(l[u]);function c(u){var g,v;const d=((g=a.dataNow.nodes.find(b=>u[0].parents[0]===b.id))==null?void 0:g.levelWidth)||0,f=((v=a.dataNow.nodes.find(b=>u[0].parents[0]===b.id))==null?void 0:v.pos)||0;let p=0;u.map((b,w)=>{b.pos=p+b.widthBefore-d/2+f,p=p+b.widthBefore+r})}this.computeOneLevelPos(t,n+1)}computePos(){this.computeFamilyRelation(),this.initPosId(),this.computeWidth(),this.dataNow.nodes[0]&&(this.dataNow.nodes[0].pos=0,this.dataNow.nodes[0].levelNum=0),this.computeOneLevelPos(this.levels,0)}destroy(){this.length=0,this.all=[],this.currentIndex=0,this.dataOrigin={nodes:{},links:{},groups:{}},this.nodeTree={},this.nodeParent={},this.dataNow={nodes:[],links:[],groups:[]},this.showInfo={nodes:0,links:0,timeOut:null,time:100},this.keyNodeIds=null,this.levels=[],this.nodeWidth=40,this.nodeMargin=40,this.layout=["forceLayout","treeLayout"],this.layoutIndex=0}}const Joe="",Cc="graph-node-level-",Ah="legend-level-";function cD(e){let t="",n="",r="";return e.forEach(s=>{const a=s.className,l=s.normalColor,c=s.darkColor?s.darkColor:s.normalColor,u=Cc+a,d=`--graph-level-${a}`;n+=`${d}: ${l};`,r+=`${d}: ${c};`,t+=`
|
|
42
|
+
`}),u=o.computed(()=>2*Math.PI*l.value),d=o.computed(()=>t.type==="dashboard"?.75:1),f=o.computed(()=>`${-1*u.value*(1-d.value)/2}px`),p=o.computed(()=>({strokeDasharray:`${u.value*d.value}px, ${u.value}px`,strokeDashoffset:f.value})),g=o.computed(()=>({strokeDasharray:`${u.value*d.value*(t.percentage/100)}px, ${u.value}px`,strokeDashoffset:f.value,transition:"stroke-dasharray 0.6s ease 0s, stroke 0.6s ease, opacity ease 0.6s"})),v=o.computed(()=>{let S;return t.color?S=k(t.percentage):S=n[t.status]||n.default,S}),b=o.computed(()=>t.status==="warning"?xf:t.type==="line"?t.status==="success"?Sf:Hl:t.status==="success"?_1:Do),w=o.computed(()=>t.type==="line"?12+t.strokeWidth*.4:t.width*.111111+2),_=o.computed(()=>t.format(t.percentage));function C(S){const E=100/S.length;return S.map((A,I)=>ct(A)?{color:A,percentage:(I+1)*E}:A).sort((A,I)=>A.percentage-I.percentage)}const k=S=>{var E;const{color:N}=t;if(it(N))return N(S);if(ct(N))return N;{const A=C(N);for(const I of A)if(I.percentage>S)return I.color;return(E=A[A.length-1])==null?void 0:E.color}};return(S,E)=>(o.openBlock(),o.createElementBlock("div",{class:o.normalizeClass([o.unref(r).b(),o.unref(r).m(S.type),o.unref(r).is(S.status),{[o.unref(r).m("without-text")]:!S.showText,[o.unref(r).m("text-inside")]:S.textInside}]),role:"progressbar","aria-valuenow":S.percentage,"aria-valuemin":"0","aria-valuemax":"100"},[S.type==="line"?(o.openBlock(),o.createElementBlock("div",{key:0,class:o.normalizeClass(o.unref(r).b("bar"))},[o.createElementVNode("div",{class:o.normalizeClass(o.unref(r).be("bar","outer")),style:o.normalizeStyle({height:`${S.strokeWidth}px`})},[o.createElementVNode("div",{class:o.normalizeClass([o.unref(r).be("bar","inner"),{[o.unref(r).bem("bar","inner","indeterminate")]:S.indeterminate},{[o.unref(r).bem("bar","inner","striped")]:S.striped},{[o.unref(r).bem("bar","inner","striped-flow")]:S.stripedFlow}]),style:o.normalizeStyle(o.unref(s))},[(S.showText||S.$slots.default)&&S.textInside?(o.openBlock(),o.createElementBlock("div",{key:0,class:o.normalizeClass(o.unref(r).be("bar","innerText"))},[o.renderSlot(S.$slots,"default",{percentage:S.percentage},()=>[o.createElementVNode("span",null,o.toDisplayString(o.unref(_)),1)])],2)):o.createCommentVNode("v-if",!0)],6)],6)],2)):(o.openBlock(),o.createElementBlock("div",{key:1,class:o.normalizeClass(o.unref(r).b("circle")),style:o.normalizeStyle({height:`${S.width}px`,width:`${S.width}px`})},[(o.openBlock(),o.createElementBlock("svg",{viewBox:"0 0 100 100"},[o.createElementVNode("path",{class:o.normalizeClass(o.unref(r).be("circle","track")),d:o.unref(c),stroke:`var(${o.unref(r).cssVarName("fill-color-light")}, #e5e9f2)`,"stroke-linecap":S.strokeLinecap,"stroke-width":o.unref(a),fill:"none",style:o.normalizeStyle(o.unref(p))},null,14,["d","stroke","stroke-linecap","stroke-width"]),o.createElementVNode("path",{class:o.normalizeClass(o.unref(r).be("circle","path")),d:o.unref(c),stroke:o.unref(v),fill:"none",opacity:S.percentage?1:0,"stroke-linecap":S.strokeLinecap,"stroke-width":o.unref(a),style:o.normalizeStyle(o.unref(g))},null,14,["d","stroke","opacity","stroke-linecap","stroke-width"])]))],6)),(S.showText||S.$slots.default)&&!S.textInside?(o.openBlock(),o.createElementBlock("div",{key:2,class:o.normalizeClass(o.unref(r).e("text")),style:o.normalizeStyle({fontSize:`${o.unref(w)}px`})},[o.renderSlot(S.$slots,"default",{percentage:S.percentage},()=>[S.status?(o.openBlock(),o.createBlock(o.unref(Ye),{key:1},{default:o.withCtx(()=>[(o.openBlock(),o.createBlock(o.resolveDynamicComponent(o.unref(b))))]),_:1})):(o.openBlock(),o.createElementBlock("span",{key:0},o.toDisplayString(o.unref(_)),1))])],6)):o.createCommentVNode("v-if",!0)],10,["aria-valuenow"]))}}));var aR=Oe(sR,[["__file","progress.vue"]]);const lR=kt(aR),bh=function(e){var t;return(t=e.target)==null?void 0:t.closest("td")},cR=function(e,t,n,r,s){if(!t&&!r&&(!s||Array.isArray(s)&&!s.length))return e;typeof n=="string"?n=n==="descending"?-1:1:n=n&&n<0?-1:1;const a=r?null:function(c,u){return s?(Array.isArray(s)||(s=[s]),s.map(d=>typeof d=="string"?kn(c,d):d(c,u,e))):(t!=="$key"&&Lt(c)&&"$value"in c&&(c=c.$value),[Lt(c)?kn(c,t):c])},l=function(c,u){if(r)return r(c.value,u.value);for(let d=0,f=c.key.length;d<f;d++){if(c.key[d]<u.key[d])return-1;if(c.key[d]>u.key[d])return 1}return 0};return e.map((c,u)=>({value:c,index:u,key:a?a(c,u):null})).sort((c,u)=>{let d=l(c,u);return d||(d=c.index-u.index),d*+n}).map(c=>c.value)},Lb=function(e,t){let n=null;return e.columns.forEach(r=>{r.id===t&&(n=r)}),n},dR=function(e,t){let n=null;for(let r=0;r<e.columns.length;r++){const s=e.columns[r];if(s.columnKey===t){n=s;break}}return n||hi("ElTable",`No column matching with column-key: ${t}`),n},Rb=function(e,t,n){const r=(t.className||"").match(new RegExp(`${n}-table_[^\\s]+`,"gm"));return r?Lb(e,r[0]):null},Ut=(e,t)=>{if(!e)throw new Error("Row is required when get row identity");if(typeof t=="string"){if(!t.includes("."))return`${e[t]}`;const n=t.split(".");let r=e;for(const s of n)r=r[s];return`${r}`}else if(typeof t=="function")return t.call(null,e)},oo=function(e,t){const n={};return(e||[]).forEach((r,s)=>{n[Ut(r,t)]={row:r,index:s}}),n};function uR(e,t){const n={};let r;for(r in e)n[r]=e[r];for(r in t)if(zr(t,r)){const s=t[r];typeof s!="undefined"&&(n[r]=s)}return n}function wh(e){return e===""||e!==void 0&&(e=Number.parseInt(e,10),Number.isNaN(e)&&(e="")),e}function Pb(e){return e===""||e!==void 0&&(e=wh(e),Number.isNaN(e)&&(e=80)),e}function fR(e){return typeof e=="number"?e:typeof e=="string"?/^\d+(?:px)?$/.test(e)?Number.parseInt(e,10):e:null}function hR(...e){return e.length===0?t=>t:e.length===1?e[0]:e.reduce((t,n)=>(...r)=>t(n(...r)))}function yc(e,t,n,r,s,a){let l=a!=null?a:0,c=!1;const u=e.indexOf(t),d=u!==-1,f=s==null?void 0:s.call(null,t,a),p=v=>{v==="add"?e.push(t):e.splice(u,1),c=!0},g=v=>{let b=0;const w=(r==null?void 0:r.children)&&v[r.children];return w&&Tt(w)&&(b+=w.length,w.forEach(_=>{b+=g(_)})),b};return(!s||f)&&(rn(n)?n&&!d?p("add"):!n&&d&&p("remove"):p(d?"remove":"add")),!(r!=null&&r.checkStrictly)&&(r!=null&&r.children)&&Tt(t[r.children])&&t[r.children].forEach(v=>{yc(e,v,n!=null?n:!d,r,s,l+1),l+=g(v)+1}),c}function pR(e,t,n="children",r="hasChildren"){const s=l=>!(Array.isArray(l)&&l.length);function a(l,c,u){t(l,c,u),c.forEach(d=>{if(d[r]){t(d,null,u+1);return}const f=d[n];s(f)||a(d,f,u+1)})}e.forEach(l=>{if(l[r]){t(l,null,0);return}const c=l[n];s(c)||a(l,c,0)})}let In=null;function gR(e,t,n,r){if((In==null?void 0:In.trigger)===n)return;In==null||In();const s=r==null?void 0:r.refs.tableWrapper,a=s==null?void 0:s.dataset.prefix,l=ne({strategy:"fixed"},e.popperOptions),c=o.createVNode(gn,fe(ne({content:t,virtualTriggering:!0,virtualRef:n,appendTo:s,placement:"top",transition:"none",offset:0,hideAfter:0},e),{popperOptions:l,onHide:()=>{In==null||In()}}));c.appContext=ne(ne({},r.appContext),r);const u=document.createElement("div");o.render(c,u),c.component.exposed.onOpen();const d=s==null?void 0:s.querySelector(`.${a}-scrollbar__wrap`);In=()=>{o.render(null,u),d==null||d.removeEventListener("scroll",In),In=null},In.trigger=n,d==null||d.addEventListener("scroll",In)}function Db(e){return e.children?nN(e.children,Db):[e]}function Mb(e,t){return e+t.colSpan}const Fb=(e,t,n,r)=>{let s=0,a=e;const l=n.states.columns.value;if(r){const u=Db(r[e]);s=l.slice(0,l.indexOf(u[0])).reduce(Mb,0),a=s+u.reduce(Mb,0)-1}else s=e;let c;switch(t){case"left":a<n.states.fixedLeafColumnsLength.value&&(c="left");break;case"right":s>=l.length-n.states.rightFixedLeafColumnsLength.value&&(c="right");break;default:a<n.states.fixedLeafColumnsLength.value?c="left":s>=l.length-n.states.rightFixedLeafColumnsLength.value&&(c="right")}return c?{direction:c,start:s,after:a}:{}},_h=(e,t,n,r,s,a=0)=>{const l=[],{direction:c,start:u,after:d}=Fb(t,n,r,s);if(c){const f=c==="left";l.push(`${e}-fixed-column--${c}`),f&&d+a===r.states.fixedLeafColumnsLength.value-1?l.push("is-last-column"):!f&&u-a===r.states.columns.value.length-r.states.rightFixedLeafColumnsLength.value&&l.push("is-first-column")}return l};function $b(e,t){return e+(t.realWidth===null||Number.isNaN(t.realWidth)?Number(t.width):t.realWidth)}const Ch=(e,t,n,r)=>{const{direction:s,start:a=0,after:l=0}=Fb(e,t,n,r);if(!s)return;const c={},u=s==="left",d=n.states.columns.value;return u?c.left=d.slice(0,a).reduce($b,0):c.right=d.slice(l+1).reverse().reduce($b,0),c},Qo=(e,t)=>{e&&(Number.isNaN(e[t])||(e[t]=`${e[t]}px`))};function mR(e){const t=o.getCurrentInstance(),n=o.ref(!1),r=o.ref([]);return{updateExpandRows:()=>{const u=e.data.value||[],d=e.rowKey.value;if(n.value)r.value=u.slice();else if(d){const f=oo(r.value,d);r.value=u.reduce((p,g)=>{const v=Ut(g,d);return f[v]&&p.push(g),p},[])}else r.value=[]},toggleRowExpansion:(u,d)=>{yc(r.value,u,d)&&t.emit("expand-change",u,r.value.slice())},setExpandRowKeys:u=>{t.store.assertRowKey();const d=e.data.value||[],f=e.rowKey.value,p=oo(d,f);r.value=u.reduce((g,v)=>{const b=p[v];return b&&g.push(b.row),g},[])},isRowExpanded:u=>{const d=e.rowKey.value;return d?!!oo(r.value,d)[Ut(u,d)]:r.value.includes(u)},states:{expandRows:r,defaultExpandAll:n}}}function vR(e){const t=o.getCurrentInstance(),n=o.ref(null),r=o.ref(null),s=d=>{t.store.assertRowKey(),n.value=d,l(d)},a=()=>{n.value=null},l=d=>{const{data:f,rowKey:p}=e;let g=null;p.value&&(g=(o.unref(f)||[]).find(v=>Ut(v,p.value)===d)),r.value=g,t.emit("current-change",r.value,null)};return{setCurrentRowKey:s,restoreCurrentRowKey:a,setCurrentRowByKey:l,updateCurrentRow:d=>{const f=r.value;if(d&&d!==f){r.value=d,t.emit("current-change",r.value,f);return}!d&&f&&(r.value=null,t.emit("current-change",null,f))},updateCurrentRowData:()=>{const d=e.rowKey.value,f=e.data.value||[],p=r.value;if(!f.includes(p)&&p){if(d){const g=Ut(p,d);l(g)}else r.value=null;r.value===null&&t.emit("current-change",null,p)}else n.value&&(l(n.value),a())},states:{_currentRowKey:n,currentRow:r}}}function yR(e){const t=o.ref([]),n=o.ref({}),r=o.ref(16),s=o.ref(!1),a=o.ref({}),l=o.ref("hasChildren"),c=o.ref("children"),u=o.ref(!1),d=o.getCurrentInstance(),f=o.computed(()=>{if(!e.rowKey.value)return{};const k=e.data.value||[];return g(k)}),p=o.computed(()=>{const k=e.rowKey.value,S=Object.keys(a.value),E={};return S.length&&S.forEach(N=>{if(a.value[N].length){const A={children:[]};a.value[N].forEach(I=>{const O=Ut(I,k);A.children.push(O),I[l.value]&&!E[O]&&(E[O]={children:[]})}),E[N]=A}}),E}),g=k=>{const S=e.rowKey.value,E={};return pR(k,(N,A,I)=>{const O=Ut(N,S);Array.isArray(A)?E[O]={children:A.map(F=>Ut(F,S)),level:I}:s.value&&(E[O]={children:[],lazy:!0,level:I})},c.value,l.value),E},v=(k=!1,S=(E=>(E=d.store)==null?void 0:E.states.defaultExpandAll.value)())=>{var E;const N=f.value,A=p.value,I=Object.keys(N),O={};if(I.length){const F=o.unref(n),P=[],M=(U,Q)=>{if(k)return t.value?S||t.value.includes(Q):!!(S||U!=null&&U.expanded);{const q=S||t.value&&t.value.includes(Q);return!!(U!=null&&U.expanded||q)}};I.forEach(U=>{const Q=F[U],q=ne({},N[U]);if(q.expanded=M(Q,U),q.lazy){const{loaded:D=!1,loading:j=!1}=Q||{};q.loaded=!!D,q.loading=!!j,P.push(U)}O[U]=q});const W=Object.keys(A);s.value&&W.length&&P.length&&W.forEach(U=>{const Q=F[U],q=A[U].children;if(P.includes(U)){if(O[U].children.length!==0)throw new Error("[ElTable]children must be an empty array.");O[U].children=q}else{const{loaded:D=!1,loading:j=!1}=Q||{};O[U]={lazy:!0,loaded:!!D,loading:!!j,expanded:M(Q,U),children:q,level:""}}})}n.value=O,(E=d.store)==null||E.updateTableScrollY()};o.watch(()=>t.value,()=>{v(!0)}),o.watch(()=>f.value,()=>{v()}),o.watch(()=>p.value,()=>{v()});const b=k=>{t.value=k,v()},w=(k,S)=>{d.store.assertRowKey();const E=e.rowKey.value,N=Ut(k,E),A=N&&n.value[N];if(N&&A&&"expanded"in A){const I=A.expanded;S=typeof S=="undefined"?!A.expanded:S,n.value[N].expanded=S,I!==S&&d.emit("expand-change",k,S),d.store.updateTableScrollY()}},_=k=>{d.store.assertRowKey();const S=e.rowKey.value,E=Ut(k,S),N=n.value[E];s.value&&N&&"loaded"in N&&!N.loaded?C(k,E,N):w(k,void 0)},C=(k,S,E)=>{const{load:N}=d.props;N&&!n.value[S].loaded&&(n.value[S].loading=!0,N(k,E,A=>{if(!Array.isArray(A))throw new TypeError("[ElTable] data must be an array");n.value[S].loading=!1,n.value[S].loaded=!0,n.value[S].expanded=!0,A.length&&(a.value[S]=A),d.emit("expand-change",k,!0)}))};return{loadData:C,loadOrToggle:_,toggleTreeExpansion:w,updateTreeExpandKeys:b,updateTreeData:v,normalize:g,states:{expandRowKeys:t,treeData:n,indent:r,lazy:s,lazyTreeNodeMap:a,lazyColumnIdentifier:l,childrenColumnName:c,checkStrictly:u}}}const bR=(e,t)=>{const n=t.sortingColumn;return!n||typeof n.sortable=="string"?e:cR(e,t.sortProp,t.sortOrder,n.sortMethod,n.sortBy)},bc=e=>{const t=[];return e.forEach(n=>{n.children&&n.children.length>0?t.push.apply(t,bc(n.children)):t.push(n)}),t};function wR(){var e;const t=o.getCurrentInstance(),{size:n}=o.toRefs((e=t.proxy)==null?void 0:e.$props),r=o.ref(null),s=o.ref([]),a=o.ref([]),l=o.ref(!1),c=o.ref([]),u=o.ref([]),d=o.ref([]),f=o.ref([]),p=o.ref([]),g=o.ref([]),v=o.ref([]),b=o.ref([]),w=[],_=o.ref(0),C=o.ref(0),k=o.ref(0),S=o.ref(!1),E=o.ref([]),N=o.ref(!1),A=o.ref(!1),I=o.ref(null),O=o.ref({}),F=o.ref(null),P=o.ref(null),M=o.ref(null),W=o.ref(null),U=o.ref(null);o.watch(s,()=>t.state&&K(!1),{deep:!0});const Q=()=>{if(!r.value)throw new Error("[ElTable] prop row-key is required")},q=he=>{var Ce;(Ce=he.children)==null||Ce.forEach(Fe=>{Fe.fixed=he.fixed,q(Fe)})};let D;const j=()=>{c.value.forEach(He=>{q(He)}),f.value=c.value.filter(He=>He.fixed===!0||He.fixed==="left"),p.value=c.value.filter(He=>He.fixed==="right"),Xt(D)&&c.value[0]&&c.value[0].type==="selection"&&(D=!!c.value[0].fixed),f.value.length>0&&c.value[0]&&c.value[0].type==="selection"&&(c.value[0].fixed?f.value.some(rt=>rt.type!=="selection")?D=void 0:(c.value[0].fixed=D,D||f.value.shift()):(c.value[0].fixed=!0,f.value.unshift(c.value[0])));const he=c.value.filter(He=>!He.fixed);u.value=[].concat(f.value).concat(he).concat(p.value);const Ce=bc(he),Fe=bc(f.value),Pe=bc(p.value);_.value=Ce.length,C.value=Fe.length,k.value=Pe.length,d.value=[].concat(Fe).concat(Ce).concat(Pe),l.value=f.value.length>0||p.value.length>0},K=(he,Ce=!1)=>{he&&j(),Ce?t.state.doLayout():t.state.debouncedUpdateLayout()},H=he=>E.value.some(Ce=>Ro(Ce,he)),R=()=>{S.value=!1;const he=E.value;E.value=[],he.length&&t.emit("selection-change",[])},ie=()=>{let he;if(r.value){he=[];const Ce=oo(E.value,r.value),Fe=oo(s.value,r.value);for(const Pe in Ce)zr(Ce,Pe)&&!Fe[Pe]&&he.push(Ce[Pe].row)}else he=E.value.filter(Ce=>!s.value.includes(Ce));if(he.length){const Ce=E.value.filter(Fe=>!he.includes(Fe));E.value=Ce,t.emit("selection-change",Ce.slice())}},ee=()=>(E.value||[]).slice(),Y=(he,Ce,Fe=!0,Pe=!1)=>{var He,rt,Kt,Hn;const Cn={children:(rt=(He=t==null?void 0:t.store)==null?void 0:He.states)==null?void 0:rt.childrenColumnName.value,checkStrictly:(Hn=(Kt=t==null?void 0:t.store)==null?void 0:Kt.states)==null?void 0:Hn.checkStrictly.value};if(yc(E.value,he,Ce,Cn,Pe?void 0:I.value)){const It=(E.value||[]).slice();Fe&&t.emit("select",It,he),t.emit("selection-change",It)}},J=()=>{var he,Ce;const Fe=A.value?!S.value:!(S.value||E.value.length);S.value=Fe;let Pe=!1,He=0;const rt=(Ce=(he=t==null?void 0:t.store)==null?void 0:he.states)==null?void 0:Ce.rowKey.value,{childrenColumnName:Kt}=t.store.states,Hn={children:Kt.value,checkStrictly:!1};s.value.forEach((Cn,li)=>{const It=li+He;yc(E.value,Cn,Fe,Hn,I.value,It)&&(Pe=!0),He+=z(Ut(Cn,rt))}),Pe&&t.emit("selection-change",E.value?E.value.slice():[]),t.emit("select-all",(E.value||[]).slice())},oe=()=>{const he=oo(E.value,r.value);s.value.forEach(Ce=>{const Fe=Ut(Ce,r.value),Pe=he[Fe];Pe&&(E.value[Pe.index]=Ce)})},re=()=>{var he;if(((he=s.value)==null?void 0:he.length)===0){S.value=!1;return}const{childrenColumnName:Ce}=t.store.states,Fe=r.value?oo(E.value,r.value):void 0;let Pe=0,He=0;const rt=Cn=>Fe?!!Fe[Ut(Cn,r.value)]:E.value.includes(Cn),Kt=Cn=>{var li;for(const It of Cn){const Fs=I.value&&I.value.call(null,It,Pe);if(rt(It))He++;else if(!I.value||Fs)return!1;if(Pe++,(li=It[Ce.value])!=null&&li.length&&!Kt(It[Ce.value]))return!1}return!0},Hn=Kt(s.value||[]);S.value=He===0?!1:Hn},z=he=>{var Ce;if(!t||!t.store)return 0;const{treeData:Fe}=t.store.states;let Pe=0;const He=(Ce=Fe.value[he])==null?void 0:Ce.children;return He&&(Pe+=He.length,He.forEach(rt=>{Pe+=z(rt)})),Pe},G=(he,Ce)=>{Array.isArray(he)||(he=[he]);const Fe={};return he.forEach(Pe=>{O.value[Pe.id]=Ce,Fe[Pe.columnKey||Pe.id]=Ce}),Fe},te=(he,Ce,Fe)=>{P.value&&P.value!==he&&(P.value.order=null),P.value=he,M.value=Ce,W.value=Fe},le=()=>{let he=o.unref(a);Object.keys(O.value).forEach(Ce=>{const Fe=O.value[Ce];if(!Fe||Fe.length===0)return;const Pe=Lb({columns:d.value},Ce);Pe&&Pe.filterMethod&&(he=he.filter(He=>Fe.some(rt=>Pe.filterMethod.call(null,rt,He,Pe))))}),F.value=he},de=()=>{s.value=bR(F.value,{sortingColumn:P.value,sortProp:M.value,sortOrder:W.value})},ye=(he=void 0)=>{he&&he.filter||le(),de()},be=he=>{const{tableHeaderRef:Ce}=t.refs;if(!Ce)return;const Fe=Object.assign({},Ce.filterPanels),Pe=Object.keys(Fe);if(Pe.length)if(typeof he=="string"&&(he=[he]),Array.isArray(he)){const He=he.map(rt=>dR({columns:d.value},rt));Pe.forEach(rt=>{const Kt=He.find(Hn=>Hn.id===rt);Kt&&(Kt.filteredValue=[])}),t.store.commit("filterChange",{column:He,values:[],silent:!0,multi:!0})}else Pe.forEach(He=>{const rt=d.value.find(Kt=>Kt.id===He);rt&&(rt.filteredValue=[])}),O.value={},t.store.commit("filterChange",{column:{},values:[],silent:!0})},Se=()=>{P.value&&(te(null,null,null),t.store.commit("changeSortCondition",{silent:!0}))},{setExpandRowKeys:Be,toggleRowExpansion:tt,updateExpandRows:Ee,states:Te,isRowExpanded:ke}=mR({data:s,rowKey:r}),{updateTreeExpandKeys:We,toggleTreeExpansion:gt,updateTreeData:Le,loadOrToggle:Et,states:ge}=yR({data:s,rowKey:r}),{updateCurrentRowData:ae,updateCurrentRow:Me,setCurrentRowKey:nt,states:qn}=vR({data:s,rowKey:r});return{assertRowKey:Q,updateColumns:j,scheduleLayout:K,isSelected:H,clearSelection:R,cleanSelection:ie,getSelectionRows:ee,toggleRowSelection:Y,_toggleAllSelection:J,toggleAllSelection:null,updateSelectionByRowKey:oe,updateAllSelected:re,updateFilters:G,updateCurrentRow:Me,updateSort:te,execFilter:le,execSort:de,execQuery:ye,clearFilter:be,clearSort:Se,toggleRowExpansion:tt,setExpandRowKeysAdapter:he=>{Be(he),We(he)},setCurrentRowKey:nt,toggleRowExpansionAdapter:(he,Ce)=>{d.value.some(({type:Pe})=>Pe==="expand")?tt(he,Ce):gt(he,Ce)},isRowExpanded:ke,updateExpandRows:Ee,updateCurrentRowData:ae,loadOrToggle:Et,updateTreeData:Le,states:ne(ne(ne({tableSize:n,rowKey:r,data:s,_data:a,isComplex:l,_columns:c,originColumns:u,columns:d,fixedColumns:f,rightFixedColumns:p,leafColumns:g,fixedLeafColumns:v,rightFixedLeafColumns:b,updateOrderFns:w,leafColumnsLength:_,fixedLeafColumnsLength:C,rightFixedLeafColumnsLength:k,isAllSelected:S,selection:E,reserveSelection:N,selectOnIndeterminate:A,selectable:I,filters:O,filteredData:F,sortingColumn:P,sortProp:M,sortOrder:W,hoverRow:U},Te),ge),qn)}}function Sh(e,t){return e.map(n=>{var r;return n.id===t.id?t:((r=n.children)!=null&&r.length&&(n.children=Sh(n.children,t)),n)})}function Eh(e){e.forEach(t=>{var n,r;t.no=(n=t.getColumnIndex)==null?void 0:n.call(t),(r=t.children)!=null&&r.length&&Eh(t.children)}),e.sort((t,n)=>t.no-n.no)}function _R(){const e=o.getCurrentInstance(),t=wR(),n=_e("table"),r={setData(l,c){const u=o.unref(l._data)!==c;l.data.value=c,l._data.value=c,e.store.execQuery(),e.store.updateCurrentRowData(),e.store.updateExpandRows(),e.store.updateTreeData(e.store.states.defaultExpandAll.value),o.unref(l.reserveSelection)?(e.store.assertRowKey(),e.store.updateSelectionByRowKey()):u?e.store.clearSelection():e.store.cleanSelection(),e.store.updateAllSelected(),e.$ready&&e.store.scheduleLayout()},insertColumn(l,c,u,d){const f=o.unref(l._columns);let p=[];u?(u&&!u.children&&(u.children=[]),u.children.push(c),p=Sh(f,u)):(f.push(c),p=f),Eh(p),l._columns.value=p,l.updateOrderFns.push(d),c.type==="selection"&&(l.selectable.value=c.selectable,l.reserveSelection.value=c.reserveSelection),e.$ready&&(e.store.updateColumns(),e.store.scheduleLayout())},updateColumnOrder(l,c){var u;((u=c.getColumnIndex)==null?void 0:u.call(c))!==c.no&&(Eh(l._columns.value),e.$ready&&e.store.updateColumns())},removeColumn(l,c,u,d){const f=o.unref(l._columns)||[];if(u)u.children.splice(u.children.findIndex(g=>g.id===c.id),1),o.nextTick(()=>{var g;((g=u.children)==null?void 0:g.length)===0&&delete u.children}),l._columns.value=Sh(f,u);else{const g=f.indexOf(c);g>-1&&(f.splice(g,1),l._columns.value=f)}const p=l.updateOrderFns.indexOf(d);p>-1&&l.updateOrderFns.splice(p,1),e.$ready&&(e.store.updateColumns(),e.store.scheduleLayout())},sort(l,c){const{prop:u,order:d,init:f}=c;if(u){const p=o.unref(l.columns).find(g=>g.property===u);p&&(p.order=d,e.store.updateSort(p,u,d),e.store.commit("changeSortCondition",{init:f}))}},changeSortCondition(l,c){const{sortingColumn:u,sortProp:d,sortOrder:f}=l,p=o.unref(u),g=o.unref(d),v=o.unref(f);v===null&&(l.sortingColumn.value=null,l.sortProp.value=null);const b={filter:!0};e.store.execQuery(b),(!c||!(c.silent||c.init))&&e.emit("sort-change",{column:p,prop:g,order:v}),e.store.updateTableScrollY()},filterChange(l,c){const{column:u,values:d,silent:f}=c,p=e.store.updateFilters(u,d);e.store.execQuery(),f||e.emit("filter-change",p),e.store.updateTableScrollY()},toggleAllSelection(){e.store.toggleAllSelection()},rowSelectedChanged(l,c){e.store.toggleRowSelection(c),e.store.updateAllSelected()},setHoverRow(l,c){l.hoverRow.value=c},setCurrentRow(l,c){e.store.updateCurrentRow(c)}},s=function(l,...c){const u=e.store.mutations;if(u[l])u[l].apply(e,[e.store.states].concat(c));else throw new Error(`Action not found: ${l}`)},a=function(){o.nextTick(()=>e.layout.updateScrollY.apply(e.layout))};return fe(ne({ns:n},t),{mutations:r,commit:s,updateTableScrollY:a})}const ka={rowKey:"rowKey",defaultExpandAll:"defaultExpandAll",selectOnIndeterminate:"selectOnIndeterminate",indent:"indent",lazy:"lazy",data:"data","treeProps.hasChildren":{key:"lazyColumnIdentifier",default:"hasChildren"},"treeProps.children":{key:"childrenColumnName",default:"children"},"treeProps.checkStrictly":{key:"checkStrictly",default:!1}};function CR(e,t){if(!e)throw new Error("Table is required.");const n=_R();return n.toggleAllSelection=Wi(n._toggleAllSelection,10),Object.keys(ka).forEach(r=>{zb(Ub(t,r),r,n)}),SR(n,t),n}function SR(e,t){Object.keys(ka).forEach(n=>{o.watch(()=>Ub(t,n),r=>{zb(r,n,e)})})}function zb(e,t,n){let r=e,s=ka[t];typeof ka[t]=="object"&&(s=s.key,r=r||ka[t].default),n.states[s].value=r}function Ub(e,t){if(t.includes(".")){const n=t.split(".");let r=e;return n.forEach(s=>{r=r[s]}),r}else return e[t]}class ER{constructor(t){this.observers=[],this.table=null,this.store=null,this.columns=[],this.fit=!0,this.showHeader=!0,this.height=o.ref(null),this.scrollX=o.ref(!1),this.scrollY=o.ref(!1),this.bodyWidth=o.ref(null),this.fixedWidth=o.ref(null),this.rightFixedWidth=o.ref(null),this.gutterWidth=0;for(const n in t)zr(t,n)&&(o.isRef(this[n])?this[n].value=t[n]:this[n]=t[n]);if(!this.table)throw new Error("Table is required for Table Layout");if(!this.store)throw new Error("Store is required for Table Layout")}updateScrollY(){if(this.height.value===null)return!1;const n=this.table.refs.scrollBarRef;if(this.table.vnode.el&&(n!=null&&n.wrapRef)){let r=!0;const s=this.scrollY.value;return r=n.wrapRef.scrollHeight>n.wrapRef.clientHeight,this.scrollY.value=r,s!==r}return!1}setHeight(t,n="height"){if(!Ke)return;const r=this.table.vnode.el;if(t=fR(t),this.height.value=Number(t),!r&&(t||t===0))return o.nextTick(()=>this.setHeight(t,n));typeof t=="number"?(r.style[n]=`${t}px`,this.updateElsHeight()):typeof t=="string"&&(r.style[n]=t,this.updateElsHeight())}setMaxHeight(t){this.setHeight(t,"max-height")}getFlattenColumns(){const t=[];return this.table.store.states.columns.value.forEach(r=>{r.isColumnGroup?t.push.apply(t,r.columns):t.push(r)}),t}updateElsHeight(){this.updateScrollY(),this.notifyObservers("scrollable")}headerDisplayNone(t){if(!t)return!0;let n=t;for(;n.tagName!=="DIV";){if(getComputedStyle(n).display==="none")return!0;n=n.parentElement}return!1}updateColumnsWidth(){if(!Ke)return;const t=this.fit,n=this.table.vnode.el.clientWidth;let r=0;const s=this.getFlattenColumns(),a=s.filter(u=>typeof u.width!="number");if(s.forEach(u=>{typeof u.width=="number"&&u.realWidth&&(u.realWidth=null)}),a.length>0&&t){if(s.forEach(u=>{r+=Number(u.width||u.minWidth||80)}),r<=n){this.scrollX.value=!1;const u=n-r;if(a.length===1)a[0].realWidth=Number(a[0].minWidth||80)+u;else{const d=a.reduce((g,v)=>g+Number(v.minWidth||80),0),f=u/d;let p=0;a.forEach((g,v)=>{if(v===0)return;const b=Math.floor(Number(g.minWidth||80)*f);p+=b,g.realWidth=Number(g.minWidth||80)+b}),a[0].realWidth=Number(a[0].minWidth||80)+u-p}}else this.scrollX.value=!0,a.forEach(u=>{u.realWidth=Number(u.minWidth)});this.bodyWidth.value=Math.max(r,n),this.table.state.resizeState.value.width=this.bodyWidth.value}else s.forEach(u=>{!u.width&&!u.minWidth?u.realWidth=80:u.realWidth=Number(u.width||u.minWidth),r+=u.realWidth}),this.scrollX.value=r>n,this.bodyWidth.value=r;const l=this.store.states.fixedColumns.value;if(l.length>0){let u=0;l.forEach(d=>{u+=Number(d.realWidth||d.width)}),this.fixedWidth.value=u}const c=this.store.states.rightFixedColumns.value;if(c.length>0){let u=0;c.forEach(d=>{u+=Number(d.realWidth||d.width)}),this.rightFixedWidth.value=u}this.notifyObservers("columns")}addObserver(t){this.observers.push(t)}removeObserver(t){const n=this.observers.indexOf(t);n!==-1&&this.observers.splice(n,1)}notifyObservers(t){this.observers.forEach(r=>{var s,a;switch(t){case"columns":(s=r.state)==null||s.onColumnsChange(this);break;case"scrollable":(a=r.state)==null||a.onScrollableChange(this);break;default:throw new Error(`Table Layout don't have event ${t}.`)}})}}const{CheckboxGroup:xR}=Xo,kR=o.defineComponent({name:"ElTableFilterPanel",components:{ElCheckbox:Xo,ElCheckboxGroup:xR,ElScrollbar:Yf,ElTooltip:gn,ElIcon:Ye,ArrowDown:_f,ArrowUp:w1},directives:{ClickOutside:tb},props:{placement:{type:String,default:"bottom-start"},store:{type:Object},column:{type:Object},upDataColumn:{type:Function}},setup(e){const t=o.getCurrentInstance(),{t:n}=Xi(),r=_e("table-filter"),s=t==null?void 0:t.parent;s.filterPanels.value[e.column.id]||(s.filterPanels.value[e.column.id]=t);const a=o.ref(!1),l=o.ref(null),c=o.computed(()=>e.column&&e.column.filters),u=o.computed(()=>e.column.filterClassName?`${r.b()} ${e.column.filterClassName}`:r.b()),d=o.computed({get:()=>{var N;return(((N=e.column)==null?void 0:N.filteredValue)||[])[0]},set:N=>{f.value&&(typeof N!="undefined"&&N!==null?f.value.splice(0,1,N):f.value.splice(0,1))}}),f=o.computed({get(){return e.column?e.column.filteredValue||[]:[]},set(N){e.column&&e.upDataColumn("filteredValue",N)}}),p=o.computed(()=>e.column?e.column.filterMultiple:!0),g=N=>N.value===d.value,v=()=>{a.value=!1},b=N=>{N.stopPropagation(),a.value=!a.value},w=()=>{a.value=!1},_=()=>{S(f.value),v()},C=()=>{f.value=[],S(f.value),v()},k=N=>{d.value=N,S(typeof N!="undefined"&&N!==null?f.value:[]),v()},S=N=>{e.store.commit("filterChange",{column:e.column,values:N}),e.store.updateAllSelected()};o.watch(a,N=>{e.column&&e.upDataColumn("filterOpened",N)},{immediate:!0});const E=o.computed(()=>{var N,A;return(A=(N=l.value)==null?void 0:N.popperRef)==null?void 0:A.contentRef});return{tooltipVisible:a,multiple:p,filterClassName:u,filteredValue:f,filterValue:d,filters:c,handleConfirm:_,handleReset:C,handleSelect:k,isActive:g,t:n,ns:r,showFilterPanel:b,hideFilterPanel:w,popperPaneRef:E,tooltip:l}}});function NR(e,t,n,r,s,a){const l=o.resolveComponent("el-checkbox"),c=o.resolveComponent("el-checkbox-group"),u=o.resolveComponent("el-scrollbar"),d=o.resolveComponent("arrow-up"),f=o.resolveComponent("arrow-down"),p=o.resolveComponent("el-icon"),g=o.resolveComponent("el-tooltip"),v=o.resolveDirective("click-outside");return o.openBlock(),o.createBlock(g,{ref:"tooltip",visible:e.tooltipVisible,offset:0,placement:e.placement,"show-arrow":!1,"stop-popper-mouse-event":!1,teleported:"",effect:"light",pure:"","popper-class":e.filterClassName,persistent:""},{content:o.withCtx(()=>[e.multiple?(o.openBlock(),o.createElementBlock("div",{key:0},[o.createElementVNode("div",{class:o.normalizeClass(e.ns.e("content"))},[o.createVNode(u,{"wrap-class":e.ns.e("wrap")},{default:o.withCtx(()=>[o.createVNode(c,{modelValue:e.filteredValue,"onUpdate:modelValue":b=>e.filteredValue=b,class:o.normalizeClass(e.ns.e("checkbox-group"))},{default:o.withCtx(()=>[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(e.filters,b=>(o.openBlock(),o.createBlock(l,{key:b.value,value:b.value},{default:o.withCtx(()=>[o.createTextVNode(o.toDisplayString(b.text),1)]),_:2},1032,["value"]))),128))]),_:1},8,["modelValue","onUpdate:modelValue","class"])]),_:1},8,["wrap-class"])],2),o.createElementVNode("div",{class:o.normalizeClass(e.ns.e("bottom"))},[o.createElementVNode("button",{class:o.normalizeClass({[e.ns.is("disabled")]:e.filteredValue.length===0}),disabled:e.filteredValue.length===0,type:"button",onClick:e.handleConfirm},o.toDisplayString(e.t("el.table.confirmFilter")),11,["disabled","onClick"]),o.createElementVNode("button",{type:"button",onClick:e.handleReset},o.toDisplayString(e.t("el.table.resetFilter")),9,["onClick"])],2)])):(o.openBlock(),o.createElementBlock("ul",{key:1,class:o.normalizeClass(e.ns.e("list"))},[o.createElementVNode("li",{class:o.normalizeClass([e.ns.e("list-item"),{[e.ns.is("active")]:e.filterValue===void 0||e.filterValue===null}]),onClick:b=>e.handleSelect(null)},o.toDisplayString(e.t("el.table.clearFilter")),11,["onClick"]),(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(e.filters,b=>(o.openBlock(),o.createElementBlock("li",{key:b.value,class:o.normalizeClass([e.ns.e("list-item"),e.ns.is("active",e.isActive(b))]),label:b.value,onClick:w=>e.handleSelect(b.value)},o.toDisplayString(b.text),11,["label","onClick"]))),128))],2))]),default:o.withCtx(()=>[o.withDirectives((o.openBlock(),o.createElementBlock("span",{class:o.normalizeClass([`${e.ns.namespace.value}-table__column-filter-trigger`,`${e.ns.namespace.value}-none-outline`]),onClick:e.showFilterPanel},[o.createVNode(p,null,{default:o.withCtx(()=>[o.renderSlot(e.$slots,"filter-icon",{},()=>[e.column.filterOpened?(o.openBlock(),o.createBlock(d,{key:0})):(o.openBlock(),o.createBlock(f,{key:1}))])]),_:3})],10,["onClick"])),[[v,e.hideFilterPanel,e.popperPaneRef]])]),_:3},8,["visible","placement","popper-class"])}var TR=Oe(kR,[["render",NR],["__file","filter-panel.vue"]]);function jb(e){const t=o.getCurrentInstance();o.onBeforeMount(()=>{n.value.addObserver(t)}),o.onMounted(()=>{r(n.value),s(n.value)}),o.onUpdated(()=>{r(n.value),s(n.value)}),o.onUnmounted(()=>{n.value.removeObserver(t)});const n=o.computed(()=>{const a=e.layout;if(!a)throw new Error("Can not find table layout.");return a}),r=a=>{var l;const c=((l=e.vnode.el)==null?void 0:l.querySelectorAll("colgroup > col"))||[];if(!c.length)return;const u=a.getFlattenColumns(),d={};u.forEach(f=>{d[f.id]=f});for(let f=0,p=c.length;f<p;f++){const g=c[f],v=g.getAttribute("name"),b=d[v];b&&g.setAttribute("width",b.realWidth||b.width)}},s=a=>{var l,c;const u=((l=e.vnode.el)==null?void 0:l.querySelectorAll("colgroup > col[name=gutter]"))||[];for(let f=0,p=u.length;f<p;f++)u[f].setAttribute("width",a.scrollY.value?a.gutterWidth:"0");const d=((c=e.vnode.el)==null?void 0:c.querySelectorAll("th.gutter"))||[];for(let f=0,p=d.length;f<p;f++){const g=d[f];g.style.width=a.scrollY.value?`${a.gutterWidth}px`:"0",g.style.display=a.scrollY.value?"":"none"}};return{tableLayout:n.value,onColumnsChange:r,onScrollableChange:s}}const Cr=Symbol("ElTable");function AR(e,t){const n=o.getCurrentInstance(),r=o.inject(Cr),s=w=>{w.stopPropagation()},a=(w,_)=>{!_.filters&&_.sortable?b(w,_,!1):_.filterable&&!_.sortable&&s(w),r==null||r.emit("header-click",_,w)},l=(w,_)=>{r==null||r.emit("header-contextmenu",_,w)},c=o.ref(null),u=o.ref(!1),d=o.ref({}),f=(w,_)=>{if(Ke&&!(_.children&&_.children.length>0)&&c.value&&e.border){u.value=!0;const C=r;t("set-drag-visible",!0);const S=(C==null?void 0:C.vnode.el).getBoundingClientRect().left,E=n.vnode.el.querySelector(`th.${_.id}`),N=E.getBoundingClientRect(),A=N.left-S+30;Yi(E,"noclick"),d.value={startMouseLeft:w.clientX,startLeft:N.right-S,startColumnLeft:N.left-S,tableLeft:S};const I=C==null?void 0:C.refs.resizeProxy;I.style.left=`${d.value.startLeft}px`,document.onselectstart=function(){return!1},document.ondragstart=function(){return!1};const O=P=>{const M=P.clientX-d.value.startMouseLeft,W=d.value.startLeft+M;I.style.left=`${Math.max(A,W)}px`},F=()=>{if(u.value){const{startColumnLeft:P,startLeft:M}=d.value,U=Number.parseInt(I.style.left,10)-P;_.width=_.realWidth=U,C==null||C.emit("header-dragend",_.width,M-P,_,w),requestAnimationFrame(()=>{e.store.scheduleLayout(!1,!0)}),document.body.style.cursor="",u.value=!1,c.value=null,d.value={},t("set-drag-visible",!1)}document.removeEventListener("mousemove",O),document.removeEventListener("mouseup",F),document.onselectstart=null,document.ondragstart=null,setTimeout(()=>{mr(E,"noclick")},0)};document.addEventListener("mousemove",O),document.addEventListener("mouseup",F)}},p=(w,_)=>{if(_.children&&_.children.length>0)return;const C=w.target;if(!gr(C))return;const k=C==null?void 0:C.closest("th");if(!(!_||!_.resizable)&&!u.value&&e.border){const S=k.getBoundingClientRect(),E=document.body.style;S.width>12&&S.right-w.pageX<8?(E.cursor="col-resize",Ki(k,"is-sortable")&&(k.style.cursor="col-resize"),c.value=_):u.value||(E.cursor="",Ki(k,"is-sortable")&&(k.style.cursor="pointer"),c.value=null)}},g=()=>{Ke&&(document.body.style.cursor="")},v=({order:w,sortOrders:_})=>{if(w==="")return _[0];const C=_.indexOf(w||null);return _[C>_.length-2?0:C+1]},b=(w,_,C)=>{var k;w.stopPropagation();const S=_.order===C?null:C||v(_),E=(k=w.target)==null?void 0:k.closest("th");if(E&&Ki(E,"noclick")){mr(E,"noclick");return}if(!_.sortable)return;const N=w.currentTarget;if(["ascending","descending"].some(P=>Ki(N,P)&&!_.sortOrders.includes(P)))return;const A=e.store.states;let I=A.sortProp.value,O;const F=A.sortingColumn.value;(F!==_||F===_&&F.order===null)&&(F&&(F.order=null),A.sortingColumn.value=_,I=_.property),S?O=_.order=S:O=_.order=null,A.sortProp.value=I,A.sortOrder.value=O,r==null||r.store.commit("changeSortCondition")};return{handleHeaderClick:a,handleHeaderContextMenu:l,handleMouseDown:f,handleMouseMove:p,handleMouseOut:g,handleSortClick:b,handleFilterClick:s}}function OR(e){const t=o.inject(Cr),n=_e("table");return{getHeaderRowStyle:c=>{const u=t==null?void 0:t.props.headerRowStyle;return typeof u=="function"?u.call(null,{rowIndex:c}):u},getHeaderRowClass:c=>{const u=[],d=t==null?void 0:t.props.headerRowClassName;return typeof d=="string"?u.push(d):typeof d=="function"&&u.push(d.call(null,{rowIndex:c})),u.join(" ")},getHeaderCellStyle:(c,u,d,f)=>{var p;let g=(p=t==null?void 0:t.props.headerCellStyle)!=null?p:{};typeof g=="function"&&(g=g.call(null,{rowIndex:c,columnIndex:u,row:d,column:f}));const v=Ch(u,f.fixed,e.store,d);return Qo(v,"left"),Qo(v,"right"),Object.assign({},g,v)},getHeaderCellClass:(c,u,d,f)=>{const p=_h(n.b(),u,f.fixed,e.store,d),g=[f.id,f.order,f.headerAlign,f.className,f.labelClassName,...p];f.children||g.push("is-leaf"),f.sortable&&g.push("is-sortable");const v=t==null?void 0:t.props.headerCellClassName;return typeof v=="string"?g.push(v):typeof v=="function"&&g.push(v.call(null,{rowIndex:c,columnIndex:u,row:d,column:f})),g.push(n.e("cell")),g.filter(b=>!!b).join(" ")}}}const qb=e=>{const t=[];return e.forEach(n=>{n.children?(t.push(n),t.push.apply(t,qb(n.children))):t.push(n)}),t},Hb=e=>{let t=1;const n=(a,l)=>{if(l&&(a.level=l.level+1,t<a.level&&(t=a.level)),a.children){let c=0;a.children.forEach(u=>{n(u,a),c+=u.colSpan}),a.colSpan=c}else a.colSpan=1};e.forEach(a=>{a.level=1,n(a,void 0)});const r=[];for(let a=0;a<t;a++)r.push([]);return qb(e).forEach(a=>{a.children?(a.rowSpan=1,a.children.forEach(l=>l.isSubColumn=!0)):a.rowSpan=t-a.level+1,r[a.level-1].push(a)}),r};function IR(e){const t=o.inject(Cr),n=o.computed(()=>Hb(e.store.states.originColumns.value));return{isGroup:o.computed(()=>{const a=n.value.length>1;return a&&t&&(t.state.isGroup.value=!0),a}),toggleAllSelection:a=>{a.stopPropagation(),t==null||t.store.commit("toggleAllSelection")},columnRows:n}}var BR=o.defineComponent({name:"ElTableHeader",components:{ElCheckbox:Xo},props:{fixed:{type:String,default:""},store:{required:!0,type:Object},border:Boolean,defaultSort:{type:Object,default:()=>({prop:"",order:""})}},setup(e,{emit:t}){const n=o.getCurrentInstance(),r=o.inject(Cr),s=_e("table"),a=o.ref({}),{onColumnsChange:l,onScrollableChange:c}=jb(r);o.onMounted(()=>Ne(this,null,function*(){yield o.nextTick(),yield o.nextTick();const{prop:A,order:I}=e.defaultSort;r==null||r.store.commit("sort",{prop:A,order:I,init:!0})}));const{handleHeaderClick:u,handleHeaderContextMenu:d,handleMouseDown:f,handleMouseMove:p,handleMouseOut:g,handleSortClick:v,handleFilterClick:b}=AR(e,t),{getHeaderRowStyle:w,getHeaderRowClass:_,getHeaderCellStyle:C,getHeaderCellClass:k}=OR(e),{isGroup:S,toggleAllSelection:E,columnRows:N}=IR(e);return n.state={onColumnsChange:l,onScrollableChange:c},n.filterPanels=a,{ns:s,filterPanels:a,onColumnsChange:l,onScrollableChange:c,columnRows:N,getHeaderRowClass:_,getHeaderRowStyle:w,getHeaderCellClass:k,getHeaderCellStyle:C,handleHeaderClick:u,handleHeaderContextMenu:d,handleMouseDown:f,handleMouseMove:p,handleMouseOut:g,handleSortClick:v,handleFilterClick:b,isGroup:S,toggleAllSelection:E}},render(){const{ns:e,isGroup:t,columnRows:n,getHeaderCellStyle:r,getHeaderCellClass:s,getHeaderRowClass:a,getHeaderRowStyle:l,handleHeaderClick:c,handleHeaderContextMenu:u,handleMouseDown:d,handleMouseMove:f,handleSortClick:p,handleMouseOut:g,store:v,$parent:b}=this;let w=1;return o.h("thead",{class:{[e.is("group")]:t}},n.map((_,C)=>o.h("tr",{class:a(C),key:C,style:l(C)},_.map((k,S)=>(k.rowSpan>w&&(w=k.rowSpan),o.h("th",{class:s(C,S,_,k),colspan:k.colSpan,key:`${k.id}-thead`,rowspan:k.rowSpan,style:r(C,S,_,k),onClick:E=>{E.currentTarget.classList.contains("noclick")||c(E,k)},onContextmenu:E=>u(E,k),onMousedown:E=>d(E,k),onMousemove:E=>f(E,k),onMouseout:g},[o.h("div",{class:["cell",k.filteredValue&&k.filteredValue.length>0?"highlight":""]},[k.renderHeader?k.renderHeader({column:k,$index:S,store:v,_self:b}):k.label,k.sortable&&o.h("span",{onClick:E=>p(E,k),class:"caret-wrapper"},[o.h("i",{onClick:E=>p(E,k,"ascending"),class:"sort-caret ascending"}),o.h("i",{onClick:E=>p(E,k,"descending"),class:"sort-caret descending"})]),k.filterable&&o.h(TR,{store:v,placement:k.filterPlacement||"bottom-start",column:k,upDataColumn:(E,N)=>{k[E]=N}},{"filter-icon":()=>k.renderFilterIcon?k.renderFilterIcon({filterOpened:k.filterOpened}):null})])]))))))}});function xh(e,t,n=.03){return e-t>n}function LR(e){const t=o.inject(Cr),n=o.ref(""),r=o.ref(o.h("div")),s=(b,w,_)=>{var C;const k=t,S=bh(b);let E;const N=(C=k==null?void 0:k.vnode.el)==null?void 0:C.dataset.prefix;S&&(E=Rb({columns:e.store.states.columns.value},S,N),E&&(k==null||k.emit(`cell-${_}`,w,E,S,b))),k==null||k.emit(`row-${_}`,w,E,b)},a=(b,w)=>{s(b,w,"dblclick")},l=(b,w)=>{e.store.commit("setCurrentRow",w),s(b,w,"click")},c=(b,w)=>{s(b,w,"contextmenu")},u=Wi(b=>{e.store.commit("setHoverRow",b)},30),d=Wi(()=>{e.store.commit("setHoverRow",null)},30),f=b=>{const w=window.getComputedStyle(b,null),_=Number.parseInt(w.paddingLeft,10)||0,C=Number.parseInt(w.paddingRight,10)||0,k=Number.parseInt(w.paddingTop,10)||0,S=Number.parseInt(w.paddingBottom,10)||0;return{left:_,right:C,top:k,bottom:S}},p=(b,w,_)=>{let C=w.target.parentNode;for(;b>1&&(C=C==null?void 0:C.nextSibling,!(!C||C.nodeName!=="TR"));)_(C,"hover-row hover-fixed-row"),b--};return{handleDoubleClick:a,handleClick:l,handleContextMenu:c,handleMouseEnter:u,handleMouseLeave:d,handleCellMouseEnter:(b,w,_)=>{var C;const k=t,S=bh(b),E=(C=k==null?void 0:k.vnode.el)==null?void 0:C.dataset.prefix;if(S){const j=Rb({columns:e.store.states.columns.value},S,E);S.rowSpan>1&&p(S.rowSpan,b,Yi);const K=k.hoverState={cell:S,column:j,row:w};k==null||k.emit("cell-mouse-enter",K.row,K.column,K.cell,b)}if(!_)return;const N=b.target.querySelector(".cell");if(!(Ki(N,`${E}-tooltip`)&&N.childNodes.length))return;const A=document.createRange();A.setStart(N,0),A.setEnd(N,N.childNodes.length);const{width:I,height:O}=A.getBoundingClientRect(),{width:F,height:P}=N.getBoundingClientRect(),{top:M,left:W,right:U,bottom:Q}=f(N),q=W+U,D=M+Q;(xh(I+q,F)||xh(O+D,P)||xh(N.scrollWidth,F))&&gR(_,S.innerText||S.textContent,S,k)},handleCellMouseLeave:b=>{const w=bh(b);if(!w)return;w.rowSpan>1&&p(w.rowSpan,b,mr);const _=t==null?void 0:t.hoverState;t==null||t.emit("cell-mouse-leave",_==null?void 0:_.row,_==null?void 0:_.column,_==null?void 0:_.cell,b)},tooltipContent:n,tooltipTrigger:r}}function RR(e){const t=o.inject(Cr),n=_e("table");return{getRowStyle:(d,f)=>{const p=t==null?void 0:t.props.rowStyle;return typeof p=="function"?p.call(null,{row:d,rowIndex:f}):p||null},getRowClass:(d,f)=>{const p=[n.e("row")];t!=null&&t.props.highlightCurrentRow&&d===e.store.states.currentRow.value&&p.push("current-row"),e.stripe&&f%2===1&&p.push(n.em("row","striped"));const g=t==null?void 0:t.props.rowClassName;return typeof g=="string"?p.push(g):typeof g=="function"&&p.push(g.call(null,{row:d,rowIndex:f})),p},getCellStyle:(d,f,p,g)=>{const v=t==null?void 0:t.props.cellStyle;let b=v!=null?v:{};typeof v=="function"&&(b=v.call(null,{rowIndex:d,columnIndex:f,row:p,column:g}));const w=Ch(f,e==null?void 0:e.fixed,e.store);return Qo(w,"left"),Qo(w,"right"),Object.assign({},b,w)},getCellClass:(d,f,p,g,v)=>{const b=_h(n.b(),f,e==null?void 0:e.fixed,e.store,void 0,v),w=[g.id,g.align,g.className,...b],_=t==null?void 0:t.props.cellClassName;return typeof _=="string"?w.push(_):typeof _=="function"&&w.push(_.call(null,{rowIndex:d,columnIndex:f,row:p,column:g})),w.push(n.e("cell")),w.filter(C=>!!C).join(" ")},getSpan:(d,f,p,g)=>{let v=1,b=1;const w=t==null?void 0:t.props.spanMethod;if(typeof w=="function"){const _=w({row:d,column:f,rowIndex:p,columnIndex:g});Array.isArray(_)?(v=_[0],b=_[1]):typeof _=="object"&&(v=_.rowspan,b=_.colspan)}return{rowspan:v,colspan:b}},getColspanRealWidth:(d,f,p)=>{if(f<1)return d[p].realWidth;const g=d.map(({realWidth:v,width:b})=>v||b).slice(p,p+f);return Number(g.reduce((v,b)=>Number(v)+Number(b),-1))}}}function PR(e){const t=o.inject(Cr),n=_e("table"),{handleDoubleClick:r,handleClick:s,handleContextMenu:a,handleMouseEnter:l,handleMouseLeave:c,handleCellMouseEnter:u,handleCellMouseLeave:d,tooltipContent:f,tooltipTrigger:p}=LR(e),{getRowStyle:g,getRowClass:v,getCellStyle:b,getCellClass:w,getSpan:_,getColspanRealWidth:C}=RR(e),k=o.computed(()=>e.store.states.columns.value.findIndex(({type:I})=>I==="default")),S=(I,O)=>{const F=t.props.rowKey;return F?Ut(I,F):O},E=(I,O,F,P=!1)=>{const{tooltipEffect:M,tooltipOptions:W,store:U}=e,{indent:Q,columns:q}=U.states,D=v(I,O);let j=!0;F&&(D.push(n.em("row",`level-${F.level}`)),j=F.display);const K=j?null:{display:"none"};return o.h("tr",{style:[K,g(I,O)],class:D,key:S(I,O),onDblclick:H=>r(H,I),onClick:H=>s(H,I),onContextmenu:H=>a(H,I),onMouseenter:()=>l(O),onMouseleave:c},q.value.map((H,R)=>{const{rowspan:ie,colspan:ee}=_(I,H,O,R);if(!ie||!ee)return null;const Y=Object.assign({},H);Y.realWidth=C(q.value,ee,R);const J={store:e.store,_self:e.context||t,column:Y,row:I,$index:O,cellIndex:R,expanded:P};R===k.value&&F&&(J.treeNode={indent:F.level*Q.value,level:F.level},typeof F.expanded=="boolean"&&(J.treeNode.expanded=F.expanded,"loading"in F&&(J.treeNode.loading=F.loading),"noLazyChildren"in F&&(J.treeNode.noLazyChildren=F.noLazyChildren)));const oe=`${S(I,O)},${R}`,re=Y.columnKey||Y.rawColumnKey||"",z=N(R,H,J),G=H.showOverflowTooltip&&iN({effect:M},W,H.showOverflowTooltip);return o.h("td",{style:b(O,R,I,H),class:w(O,R,I,H,ee-1),key:`${re}${oe}`,rowspan:ie,colspan:ee,onMouseenter:te=>u(te,I,G),onMouseleave:d},[z])}))},N=(I,O,F)=>O.renderCell(F);return{wrappedRowRender:(I,O)=>{const F=e.store,{isRowExpanded:P,assertRowKey:M}=F,{treeData:W,lazyTreeNodeMap:U,childrenColumnName:Q,rowKey:q}=F.states,D=F.states.columns.value;if(D.some(({type:K})=>K==="expand")){const K=P(I),H=E(I,O,void 0,K),R=t.renderExpanded;return K?R?[[H,o.h("tr",{key:`expanded-row__${H.key}`},[o.h("td",{colspan:D.length,class:`${n.e("cell")} ${n.e("expanded-cell")}`},[R({row:I,$index:O,store:F,expanded:K})])])]]:(console.error("[Element Error]renderExpanded is required."),H):[[H]]}else if(Object.keys(W.value).length){M();const K=Ut(I,q.value);let H=W.value[K],R=null;H&&(R={expanded:H.expanded,level:H.level,display:!0},typeof H.lazy=="boolean"&&(typeof H.loaded=="boolean"&&H.loaded&&(R.noLazyChildren=!(H.children&&H.children.length)),R.loading=H.loading));const ie=[E(I,O,R)];if(H){let ee=0;const Y=(oe,re)=>{oe&&oe.length&&re&&oe.forEach(z=>{const G={display:re.display&&re.expanded,level:re.level+1,expanded:!1,noLazyChildren:!1,loading:!1},te=Ut(z,q.value);if(te==null)throw new Error("For nested data item, row-key is required.");if(H=ne({},W.value[te]),H&&(G.expanded=H.expanded,H.level=H.level||G.level,H.display=!!(H.expanded&&G.display),typeof H.lazy=="boolean"&&(typeof H.loaded=="boolean"&&H.loaded&&(G.noLazyChildren=!(H.children&&H.children.length)),G.loading=H.loading)),ee++,ie.push(E(z,O+ee,G)),H){const le=U.value[te]||z[Q.value];Y(le,H)}})};H.display=!0;const J=U.value[K]||I[Q.value];Y(J,H)}return ie}else return E(I,O,void 0)},tooltipContent:f,tooltipTrigger:p}}const DR={store:{required:!0,type:Object},stripe:Boolean,tooltipEffect:String,tooltipOptions:{type:Object},context:{default:()=>({}),type:Object},rowClassName:[String,Function],rowStyle:[Object,Function],fixed:{type:String,default:""},highlight:Boolean};var MR=o.defineComponent({name:"ElTableBody",props:DR,setup(e){const t=o.getCurrentInstance(),n=o.inject(Cr),r=_e("table"),{wrappedRowRender:s,tooltipContent:a,tooltipTrigger:l}=PR(e),{onColumnsChange:c,onScrollableChange:u}=jb(n),d=[];return o.watch(e.store.states.hoverRow,(f,p)=>{var g;const v=t==null?void 0:t.vnode.el,b=Array.from((v==null?void 0:v.children)||[]).filter(C=>C==null?void 0:C.classList.contains(`${r.e("row")}`));let w=f;const _=(g=b[w])==null?void 0:g.childNodes;if(_!=null&&_.length){let C=0;Array.from(_).reduce((S,E,N)=>{var A,I;return((A=_[N])==null?void 0:A.colSpan)>1&&(C=(I=_[N])==null?void 0:I.colSpan),E.nodeName!=="TD"&&C===0&&S.push(N),C>0&&C--,S},[]).forEach(S=>{var E;for(w=f;w>0;){const N=(E=b[w-1])==null?void 0:E.childNodes;if(N[S]&&N[S].nodeName==="TD"&&N[S].rowSpan>1){Yi(N[S],"hover-cell"),d.push(N[S]);break}w--}})}else d.forEach(C=>mr(C,"hover-cell")),d.length=0;!e.store.states.isComplex.value||!Ke||dN(()=>{const C=b[p],k=b[f];C&&!C.classList.contains("hover-fixed-row")&&mr(C,"hover-row"),k&&Yi(k,"hover-row")})}),o.onUnmounted(()=>{var f;(f=In)==null||f()}),{ns:r,onColumnsChange:c,onScrollableChange:u,wrappedRowRender:s,tooltipContent:a,tooltipTrigger:l}},render(){const{wrappedRowRender:e,store:t}=this,n=t.states.data.value||[];return o.h("tbody",{tabIndex:-1},[n.reduce((r,s)=>r.concat(e(s,r.length)),[])])}});function FR(){const e=o.inject(Cr),t=e==null?void 0:e.store,n=o.computed(()=>t.states.fixedLeafColumnsLength.value),r=o.computed(()=>t.states.rightFixedColumns.value.length),s=o.computed(()=>t.states.columns.value.length),a=o.computed(()=>t.states.fixedColumns.value.length),l=o.computed(()=>t.states.rightFixedColumns.value.length);return{leftFixedLeafCount:n,rightFixedLeafCount:r,columnsCount:s,leftFixedCount:a,rightFixedCount:l,columns:t.states.columns}}function $R(e){const{columns:t}=FR(),n=_e("table");return{getCellClasses:(a,l)=>{const c=a[l],u=[n.e("cell"),c.id,c.align,c.labelClassName,..._h(n.b(),l,c.fixed,e.store)];return c.className&&u.push(c.className),c.children||u.push(n.is("leaf")),u},getCellStyles:(a,l)=>{const c=Ch(l,a.fixed,e.store);return Qo(c,"left"),Qo(c,"right"),c},columns:t}}var zR=o.defineComponent({name:"ElTableFooter",props:{fixed:{type:String,default:""},store:{required:!0,type:Object},summaryMethod:Function,sumText:String,border:Boolean,defaultSort:{type:Object,default:()=>({prop:"",order:""})}},setup(e){const{getCellClasses:t,getCellStyles:n,columns:r}=$R(e);return{ns:_e("table"),getCellClasses:t,getCellStyles:n,columns:r}},render(){const{columns:e,getCellStyles:t,getCellClasses:n,summaryMethod:r,sumText:s}=this,a=this.store.states.data.value;let l=[];return r?l=r({columns:e,data:a}):e.forEach((c,u)=>{if(u===0){l[u]=s;return}const d=a.map(v=>Number(v[c.property])),f=[];let p=!0;d.forEach(v=>{if(!Number.isNaN(+v)){p=!1;const b=`${v}`.split(".")[1];f.push(b?b.length:0)}});const g=Math.max.apply(null,f);p?l[u]="":l[u]=d.reduce((v,b)=>{const w=Number(b);return Number.isNaN(+w)?v:Number.parseFloat((v+b).toFixed(Math.min(g,20)))},0)}),o.h(o.h("tfoot",[o.h("tr",{},[...e.map((c,u)=>o.h("td",{key:u,colspan:c.colSpan,rowspan:c.rowSpan,class:n(e,u),style:t(c,u)},[o.h("div",{class:["cell",c.labelClassName]},[l[u]])]))])]))}});function UR(e){return{setCurrentRow:f=>{e.commit("setCurrentRow",f)},getSelectionRows:()=>e.getSelectionRows(),toggleRowSelection:(f,p,g=!0)=>{e.toggleRowSelection(f,p,!1,g),e.updateAllSelected()},clearSelection:()=>{e.clearSelection()},clearFilter:f=>{e.clearFilter(f)},toggleAllSelection:()=>{e.commit("toggleAllSelection")},toggleRowExpansion:(f,p)=>{e.toggleRowExpansionAdapter(f,p)},clearSort:()=>{e.clearSort()},sort:(f,p)=>{e.commit("sort",{prop:f,order:p})}}}function jR(e,t,n,r){const s=o.ref(!1),a=o.ref(null),l=o.ref(!1),c=H=>{l.value=H},u=o.ref({width:null,height:null,headerHeight:null}),d=o.ref(!1),f={display:"inline-block",verticalAlign:"middle"},p=o.ref(),g=o.ref(0),v=o.ref(0),b=o.ref(0),w=o.ref(0),_=o.ref(0);o.watchEffect(()=>{t.setHeight(e.height)}),o.watchEffect(()=>{t.setMaxHeight(e.maxHeight)}),o.watch(()=>[e.currentRowKey,n.states.rowKey],([H,R])=>{!o.unref(R)||!o.unref(H)||n.setCurrentRowKey(`${H}`)},{immediate:!0}),o.watch(()=>e.data,H=>{r.store.commit("setData",H)},{immediate:!0,deep:!0}),o.watchEffect(()=>{e.expandRowKeys&&n.setExpandRowKeysAdapter(e.expandRowKeys)});const C=()=>{r.store.commit("setHoverRow",null),r.hoverState&&(r.hoverState=null)},k=(H,R)=>{const{pixelX:ie,pixelY:ee}=R;Math.abs(ie)>=Math.abs(ee)&&(r.refs.bodyWrapper.scrollLeft+=R.pixelX/5)},S=o.computed(()=>e.height||e.maxHeight||n.states.fixedColumns.value.length>0||n.states.rightFixedColumns.value.length>0),E=o.computed(()=>({width:t.bodyWidth.value?`${t.bodyWidth.value}px`:""})),N=()=>{S.value&&t.updateElsHeight(),t.updateColumnsWidth(),requestAnimationFrame(F)};o.onMounted(()=>Ne(this,null,function*(){yield o.nextTick(),n.updateColumns(),P(),requestAnimationFrame(N);const H=r.vnode.el,R=r.refs.headerWrapper;e.flexible&&H&&H.parentElement&&(H.parentElement.style.minWidth="0"),u.value={width:p.value=H.offsetWidth,height:H.offsetHeight,headerHeight:e.showHeader&&R?R.offsetHeight:null},n.states.columns.value.forEach(ie=>{ie.filteredValue&&ie.filteredValue.length&&r.store.commit("filterChange",{column:ie,values:ie.filteredValue,silent:!0})}),r.$ready=!0}));const A=(H,R)=>{if(!H)return;const ie=Array.from(H.classList).filter(ee=>!ee.startsWith("is-scrolling-"));ie.push(t.scrollX.value?R:"is-scrolling-none"),H.className=ie.join(" ")},I=H=>{const{tableWrapper:R}=r.refs;A(R,H)},O=H=>{const{tableWrapper:R}=r.refs;return!!(R&&R.classList.contains(H))},F=function(){if(!r.refs.scrollBarRef)return;if(!t.scrollX.value){const re="is-scrolling-none";O(re)||I(re);return}const H=r.refs.scrollBarRef.wrapRef;if(!H)return;const{scrollLeft:R,offsetWidth:ie,scrollWidth:ee}=H,{headerWrapper:Y,footerWrapper:J}=r.refs;Y&&(Y.scrollLeft=R),J&&(J.scrollLeft=R);const oe=ee-ie-1;R>=oe?I("is-scrolling-right"):I(R===0?"is-scrolling-left":"is-scrolling-middle")},P=()=>{r.refs.scrollBarRef&&(r.refs.scrollBarRef.wrapRef&&En(r.refs.scrollBarRef.wrapRef,"scroll",F,{passive:!0}),e.fit?fn(r.vnode.el,M):En(window,"resize",M),fn(r.refs.bodyWrapper,()=>{var H,R;M(),(R=(H=r.refs)==null?void 0:H.scrollBarRef)==null||R.update()}))},M=()=>{var H,R,ie,ee;const Y=r.vnode.el;if(!r.$ready||!Y)return;let J=!1;const{width:oe,height:re,headerHeight:z}=u.value,G=p.value=Y.offsetWidth;oe!==G&&(J=!0);const te=Y.offsetHeight;(e.height||S.value)&&re!==te&&(J=!0);const le=e.tableLayout==="fixed"?r.refs.headerWrapper:(H=r.refs.tableHeaderRef)==null?void 0:H.$el;e.showHeader&&(le==null?void 0:le.offsetHeight)!==z&&(J=!0),g.value=((R=r.refs.tableWrapper)==null?void 0:R.scrollHeight)||0,b.value=(le==null?void 0:le.scrollHeight)||0,w.value=((ie=r.refs.footerWrapper)==null?void 0:ie.offsetHeight)||0,_.value=((ee=r.refs.appendWrapper)==null?void 0:ee.offsetHeight)||0,v.value=g.value-b.value-w.value-_.value,J&&(u.value={width:G,height:te,headerHeight:e.showHeader&&(le==null?void 0:le.offsetHeight)||0},N())},W=er(),U=o.computed(()=>{const{bodyWidth:H,scrollY:R,gutterWidth:ie}=t;return H.value?`${H.value-(R.value?ie:0)}px`:""}),Q=o.computed(()=>e.maxHeight?"fixed":e.tableLayout),q=o.computed(()=>{if(e.data&&e.data.length)return null;let H="100%";e.height&&v.value&&(H=`${v.value}px`);const R=p.value;return{width:R?`${R}px`:"",height:H}}),D=o.computed(()=>e.height?{height:Number.isNaN(Number(e.height))?e.height:`${e.height}px`}:e.maxHeight?{maxHeight:Number.isNaN(Number(e.maxHeight))?e.maxHeight:`${e.maxHeight}px`}:{}),j=o.computed(()=>e.height?{height:"100%"}:e.maxHeight?Number.isNaN(Number(e.maxHeight))?{maxHeight:`calc(${e.maxHeight} - ${b.value+w.value}px)`}:{maxHeight:`${e.maxHeight-b.value-w.value}px`}:{});return{isHidden:s,renderExpanded:a,setDragVisible:c,isGroup:d,handleMouseLeave:C,handleHeaderFooterMousewheel:k,tableSize:W,emptyBlockStyle:q,handleFixedMousewheel:(H,R)=>{const ie=r.refs.bodyWrapper;if(Math.abs(R.spinY)>0){const ee=ie.scrollTop;R.pixelY<0&&ee!==0&&H.preventDefault(),R.pixelY>0&&ie.scrollHeight-ie.clientHeight>ee&&H.preventDefault(),ie.scrollTop+=Math.ceil(R.pixelY/5)}else ie.scrollLeft+=Math.ceil(R.pixelX/5)},resizeProxyVisible:l,bodyWidth:U,resizeState:u,doLayout:N,tableBodyStyles:E,tableLayout:Q,scrollbarViewStyle:f,tableInnerStyle:D,scrollbarStyle:j}}function qR(e){const t=o.ref(),n=()=>{const s=e.vnode.el.querySelector(".hidden-columns"),a={childList:!0,subtree:!0},l=e.store.states.updateOrderFns;t.value=new MutationObserver(()=>{l.forEach(c=>c())}),t.value.observe(s,a)};o.onMounted(()=>{n()}),o.onUnmounted(()=>{var r;(r=t.value)==null||r.disconnect()})}var HR={data:{type:Array,default:()=>[]},size:wr,width:[String,Number],height:[String,Number],maxHeight:[String,Number],fit:{type:Boolean,default:!0},stripe:Boolean,border:Boolean,rowKey:[String,Function],showHeader:{type:Boolean,default:!0},showSummary:Boolean,sumText:String,summaryMethod:Function,rowClassName:[String,Function],rowStyle:[Object,Function],cellClassName:[String,Function],cellStyle:[Object,Function],headerRowClassName:[String,Function],headerRowStyle:[Object,Function],headerCellClassName:[String,Function],headerCellStyle:[Object,Function],highlightCurrentRow:Boolean,currentRowKey:[String,Number],emptyText:String,expandRowKeys:Array,defaultExpandAll:Boolean,defaultSort:Object,tooltipEffect:String,tooltipOptions:Object,spanMethod:Function,selectOnIndeterminate:{type:Boolean,default:!0},indent:{type:Number,default:16},treeProps:{type:Object,default:()=>({hasChildren:"hasChildren",children:"children",checkStrictly:!1})},lazy:Boolean,load:Function,style:{type:Object,default:()=>({})},className:{type:String,default:""},tableLayout:{type:String,default:"fixed"},scrollbarAlwaysOn:Boolean,flexible:Boolean,showOverflowTooltip:[Boolean,Object],scrollbarTabindex:{type:[Number,String],default:void 0}};function Gb(e){const t=e.tableLayout==="auto";let n=e.columns||[];t&&n.every(s=>s.width===void 0)&&(n=[]);const r=s=>{const a={key:`${e.tableLayout}_${s.id}`,style:{},name:void 0};return t?a.style={width:`${s.width}px`}:a.name=s.id,a};return o.h("colgroup",{},n.map(s=>o.h("col",r(s))))}Gb.props=["columns","tableLayout"];const GR=()=>{const e=o.ref(),t=(a,l)=>{const c=e.value;c&&c.scrollTo(a,l)},n=(a,l)=>{const c=e.value;c&&Ge(l)&&["Top","Left"].includes(a)&&c[`setScroll${a}`](l)};return{scrollBarRef:e,scrollTo:t,setScrollTop:a=>n("Top",a),setScrollLeft:a=>n("Left",a)}};let WR=1;const KR=o.defineComponent({name:"ElTable",directives:{Mousewheel:xB},components:{TableHeader:BR,TableBody:MR,TableFooter:zR,ElScrollbar:Yf,hColgroup:Gb},props:HR,emits:["select","select-all","selection-change","cell-mouse-enter","cell-mouse-leave","cell-contextmenu","cell-click","cell-dblclick","row-click","row-contextmenu","row-dblclick","header-click","header-contextmenu","sort-change","filter-change","current-change","header-dragend","expand-change"],setup(e){const{t}=Xi(),n=_e("table"),r=o.getCurrentInstance();o.provide(Cr,r);const s=CR(r,e);r.store=s;const a=new ER({store:r.store,table:r,fit:e.fit,showHeader:e.showHeader});r.layout=a;const l=o.computed(()=>(s.states.data.value||[]).length===0),{setCurrentRow:c,getSelectionRows:u,toggleRowSelection:d,clearSelection:f,clearFilter:p,toggleAllSelection:g,toggleRowExpansion:v,clearSort:b,sort:w}=UR(s),{isHidden:_,renderExpanded:C,setDragVisible:k,isGroup:S,handleMouseLeave:E,handleHeaderFooterMousewheel:N,tableSize:A,emptyBlockStyle:I,handleFixedMousewheel:O,resizeProxyVisible:F,bodyWidth:P,resizeState:M,doLayout:W,tableBodyStyles:U,tableLayout:Q,scrollbarViewStyle:q,tableInnerStyle:D,scrollbarStyle:j}=jR(e,a,s,r),{scrollBarRef:K,scrollTo:H,setScrollLeft:R,setScrollTop:ie}=GR(),ee=Wi(W,50),Y=`${n.namespace.value}-table_${WR++}`;r.tableId=Y,r.state={isGroup:S,resizeState:M,doLayout:W,debouncedUpdateLayout:ee};const J=o.computed(()=>{var z;return(z=e.sumText)!=null?z:t("el.table.sumText")}),oe=o.computed(()=>{var z;return(z=e.emptyText)!=null?z:t("el.table.emptyText")}),re=o.computed(()=>Hb(s.states.originColumns.value)[0]);return qR(r),{ns:n,layout:a,store:s,columns:re,handleHeaderFooterMousewheel:N,handleMouseLeave:E,tableId:Y,tableSize:A,isHidden:_,isEmpty:l,renderExpanded:C,resizeProxyVisible:F,resizeState:M,isGroup:S,bodyWidth:P,tableBodyStyles:U,emptyBlockStyle:I,debouncedUpdateLayout:ee,handleFixedMousewheel:O,setCurrentRow:c,getSelectionRows:u,toggleRowSelection:d,clearSelection:f,clearFilter:p,toggleAllSelection:g,toggleRowExpansion:v,clearSort:b,doLayout:W,sort:w,t,setDragVisible:k,context:r,computedSumText:J,computedEmptyText:oe,tableLayout:Q,scrollbarViewStyle:q,tableInnerStyle:D,scrollbarStyle:j,scrollBarRef:K,scrollTo:H,setScrollLeft:R,setScrollTop:ie}}});function YR(e,t,n,r,s,a){const l=o.resolveComponent("hColgroup"),c=o.resolveComponent("table-header"),u=o.resolveComponent("table-body"),d=o.resolveComponent("table-footer"),f=o.resolveComponent("el-scrollbar"),p=o.resolveDirective("mousewheel");return o.openBlock(),o.createElementBlock("div",{ref:"tableWrapper",class:o.normalizeClass([{[e.ns.m("fit")]:e.fit,[e.ns.m("striped")]:e.stripe,[e.ns.m("border")]:e.border||e.isGroup,[e.ns.m("hidden")]:e.isHidden,[e.ns.m("group")]:e.isGroup,[e.ns.m("fluid-height")]:e.maxHeight,[e.ns.m("scrollable-x")]:e.layout.scrollX.value,[e.ns.m("scrollable-y")]:e.layout.scrollY.value,[e.ns.m("enable-row-hover")]:!e.store.states.isComplex.value,[e.ns.m("enable-row-transition")]:(e.store.states.data.value||[]).length!==0&&(e.store.states.data.value||[]).length<100,"has-footer":e.showSummary},e.ns.m(e.tableSize),e.className,e.ns.b(),e.ns.m(`layout-${e.tableLayout}`)]),style:o.normalizeStyle(e.style),"data-prefix":e.ns.namespace.value,onMouseleave:e.handleMouseLeave},[o.createElementVNode("div",{class:o.normalizeClass(e.ns.e("inner-wrapper")),style:o.normalizeStyle(e.tableInnerStyle)},[o.createElementVNode("div",{ref:"hiddenColumns",class:"hidden-columns"},[o.renderSlot(e.$slots,"default")],512),e.showHeader&&e.tableLayout==="fixed"?o.withDirectives((o.openBlock(),o.createElementBlock("div",{key:0,ref:"headerWrapper",class:o.normalizeClass(e.ns.e("header-wrapper"))},[o.createElementVNode("table",{ref:"tableHeader",class:o.normalizeClass(e.ns.e("header")),style:o.normalizeStyle(e.tableBodyStyles),border:"0",cellpadding:"0",cellspacing:"0"},[o.createVNode(l,{columns:e.store.states.columns.value,"table-layout":e.tableLayout},null,8,["columns","table-layout"]),o.createVNode(c,{ref:"tableHeaderRef",border:e.border,"default-sort":e.defaultSort,store:e.store,onSetDragVisible:e.setDragVisible},null,8,["border","default-sort","store","onSetDragVisible"])],6)],2)),[[p,e.handleHeaderFooterMousewheel]]):o.createCommentVNode("v-if",!0),o.createElementVNode("div",{ref:"bodyWrapper",class:o.normalizeClass(e.ns.e("body-wrapper"))},[o.createVNode(f,{ref:"scrollBarRef","view-style":e.scrollbarViewStyle,"wrap-style":e.scrollbarStyle,always:e.scrollbarAlwaysOn,tabindex:e.scrollbarTabindex},{default:o.withCtx(()=>[o.createElementVNode("table",{ref:"tableBody",class:o.normalizeClass(e.ns.e("body")),cellspacing:"0",cellpadding:"0",border:"0",style:o.normalizeStyle({width:e.bodyWidth,tableLayout:e.tableLayout})},[o.createVNode(l,{columns:e.store.states.columns.value,"table-layout":e.tableLayout},null,8,["columns","table-layout"]),e.showHeader&&e.tableLayout==="auto"?(o.openBlock(),o.createBlock(c,{key:0,ref:"tableHeaderRef",class:o.normalizeClass(e.ns.e("body-header")),border:e.border,"default-sort":e.defaultSort,store:e.store,onSetDragVisible:e.setDragVisible},null,8,["class","border","default-sort","store","onSetDragVisible"])):o.createCommentVNode("v-if",!0),o.createVNode(u,{context:e.context,highlight:e.highlightCurrentRow,"row-class-name":e.rowClassName,"tooltip-effect":e.tooltipEffect,"tooltip-options":e.tooltipOptions,"row-style":e.rowStyle,store:e.store,stripe:e.stripe},null,8,["context","highlight","row-class-name","tooltip-effect","tooltip-options","row-style","store","stripe"]),e.showSummary&&e.tableLayout==="auto"?(o.openBlock(),o.createBlock(d,{key:1,class:o.normalizeClass(e.ns.e("body-footer")),border:e.border,"default-sort":e.defaultSort,store:e.store,"sum-text":e.computedSumText,"summary-method":e.summaryMethod},null,8,["class","border","default-sort","store","sum-text","summary-method"])):o.createCommentVNode("v-if",!0)],6),e.isEmpty?(o.openBlock(),o.createElementBlock("div",{key:0,ref:"emptyBlock",style:o.normalizeStyle(e.emptyBlockStyle),class:o.normalizeClass(e.ns.e("empty-block"))},[o.createElementVNode("span",{class:o.normalizeClass(e.ns.e("empty-text"))},[o.renderSlot(e.$slots,"empty",{},()=>[o.createTextVNode(o.toDisplayString(e.computedEmptyText),1)])],2)],6)):o.createCommentVNode("v-if",!0),e.$slots.append?(o.openBlock(),o.createElementBlock("div",{key:1,ref:"appendWrapper",class:o.normalizeClass(e.ns.e("append-wrapper"))},[o.renderSlot(e.$slots,"append")],2)):o.createCommentVNode("v-if",!0)]),_:3},8,["view-style","wrap-style","always","tabindex"])],2),e.showSummary&&e.tableLayout==="fixed"?o.withDirectives((o.openBlock(),o.createElementBlock("div",{key:1,ref:"footerWrapper",class:o.normalizeClass(e.ns.e("footer-wrapper"))},[o.createElementVNode("table",{class:o.normalizeClass(e.ns.e("footer")),cellspacing:"0",cellpadding:"0",border:"0",style:o.normalizeStyle(e.tableBodyStyles)},[o.createVNode(l,{columns:e.store.states.columns.value,"table-layout":e.tableLayout},null,8,["columns","table-layout"]),o.createVNode(d,{border:e.border,"default-sort":e.defaultSort,store:e.store,"sum-text":e.computedSumText,"summary-method":e.summaryMethod},null,8,["border","default-sort","store","sum-text","summary-method"])],6)],2)),[[o.vShow,!e.isEmpty],[p,e.handleHeaderFooterMousewheel]]):o.createCommentVNode("v-if",!0),e.border||e.isGroup?(o.openBlock(),o.createElementBlock("div",{key:2,class:o.normalizeClass(e.ns.e("border-left-patch"))},null,2)):o.createCommentVNode("v-if",!0)],6),o.withDirectives(o.createElementVNode("div",{ref:"resizeProxy",class:o.normalizeClass(e.ns.e("column-resize-proxy"))},null,2),[[o.vShow,e.resizeProxyVisible]])],46,["data-prefix","onMouseleave"])}var JR=Oe(KR,[["render",YR],["__file","table.vue"]]);const XR={selection:"table-column--selection",expand:"table__expand-column"},QR={default:{order:""},selection:{width:48,minWidth:48,realWidth:48,order:""},expand:{width:48,minWidth:48,realWidth:48,order:""},index:{width:48,minWidth:48,realWidth:48,order:""}},ZR=e=>XR[e]||"",VR={selection:{renderHeader({store:e,column:t}){function n(){return e.states.data.value&&e.states.data.value.length===0}return o.h(Xo,{disabled:n(),size:e.states.tableSize.value,indeterminate:e.states.selection.value.length>0&&!e.states.isAllSelected.value,"onUpdate:modelValue":e.toggleAllSelection,modelValue:e.states.isAllSelected.value,ariaLabel:t.label})},renderCell({row:e,column:t,store:n,$index:r}){return o.h(Xo,{disabled:t.selectable?!t.selectable.call(null,e,r):!1,size:n.states.tableSize.value,onChange:()=>{n.commit("rowSelectedChanged",e)},onClick:s=>s.stopPropagation(),modelValue:n.isSelected(e),ariaLabel:t.label})},sortable:!1,resizable:!1},index:{renderHeader({column:e}){return e.label||"#"},renderCell({column:e,$index:t}){let n=t+1;const r=e.index;return typeof r=="number"?n=t+r:typeof r=="function"&&(n=r(t)),o.h("div",{},[n])},sortable:!1},expand:{renderHeader({column:e}){return e.label||""},renderCell({row:e,store:t,expanded:n}){const{ns:r}=t,s=[r.e("expand-icon")];n&&s.push(r.em("expand-icon","expanded"));const a=function(l){l.stopPropagation(),t.toggleRowExpansion(e)};return o.h("div",{class:s,onClick:a},{default:()=>[o.h(Ye,null,{default:()=>[o.h(Cf)]})]})},sortable:!1,resizable:!1}};function eP({row:e,column:t,$index:n}){var r;const s=t.property,a=s&&jl(e,s).value;return t&&t.formatter?t.formatter(e,t,a,n):((r=a==null?void 0:a.toString)==null?void 0:r.call(a))||""}function tP({row:e,treeNode:t,store:n},r=!1){const{ns:s}=n;if(!t)return r?[o.h("span",{class:s.e("placeholder")})]:null;const a=[],l=function(c){c.stopPropagation(),!t.loading&&n.loadOrToggle(e)};if(t.indent&&a.push(o.h("span",{class:s.e("indent"),style:{"padding-left":`${t.indent}px`}})),typeof t.expanded=="boolean"&&!t.noLazyChildren){const c=[s.e("expand-icon"),t.expanded?s.em("expand-icon","expanded"):""];let u=Cf;t.loading&&(u=Mo),a.push(o.h("div",{class:c,onClick:l},{default:()=>[o.h(Ye,{class:{[s.is("loading")]:t.loading}},{default:()=>[o.h(u)]})]}))}else a.push(o.h("span",{class:s.e("placeholder")}));return a}function Wb(e,t){return e.reduce((n,r)=>(n[r]=r,n),t)}function nP(e,t){const n=o.getCurrentInstance();return{registerComplexWatchers:()=>{const a=["fixed"],l={realWidth:"width",realMinWidth:"minWidth"},c=Wb(a,l);Object.keys(c).forEach(u=>{const d=l[u];zr(t,d)&&o.watch(()=>t[d],f=>{let p=f;d==="width"&&u==="realWidth"&&(p=wh(f)),d==="minWidth"&&u==="realMinWidth"&&(p=Pb(f)),n.columnConfig.value[d]=p,n.columnConfig.value[u]=p;const g=d==="fixed";e.value.store.scheduleLayout(g)})})},registerNormalWatchers:()=>{const a=["label","filters","filterMultiple","filteredValue","sortable","index","formatter","className","labelClassName","filterClassName","showOverflowTooltip"],l={property:"prop",align:"realAlign",headerAlign:"realHeaderAlign"},c=Wb(a,l);Object.keys(c).forEach(u=>{const d=l[u];zr(t,d)&&o.watch(()=>t[d],f=>{n.columnConfig.value[u]=f})})}}}function rP(e,t,n){const r=o.getCurrentInstance(),s=o.ref(""),a=o.ref(!1),l=o.ref(),c=o.ref(),u=_e("table");o.watchEffect(()=>{l.value=e.align?`is-${e.align}`:null,l.value}),o.watchEffect(()=>{c.value=e.headerAlign?`is-${e.headerAlign}`:l.value,c.value});const d=o.computed(()=>{let E=r.vnode.vParent||r.parent;for(;E&&!E.tableId&&!E.columnId;)E=E.vnode.vParent||E.parent;return E}),f=o.computed(()=>{const{store:E}=r.parent;if(!E)return!1;const{treeData:N}=E.states,A=N.value;return A&&Object.keys(A).length>0}),p=o.ref(wh(e.width)),g=o.ref(Pb(e.minWidth)),v=E=>(p.value&&(E.width=p.value),g.value&&(E.minWidth=g.value),!p.value&&g.value&&(E.width=void 0),E.minWidth||(E.minWidth=80),E.realWidth=Number(E.width===void 0?E.minWidth:E.width),E),b=E=>{const N=E.type,A=VR[N]||{};Object.keys(A).forEach(O=>{const F=A[O];O!=="className"&&F!==void 0&&(E[O]=F)});const I=ZR(N);if(I){const O=`${o.unref(u.namespace)}-${I}`;E.className=E.className?`${E.className} ${O}`:O}return E},w=E=>{Array.isArray(E)?E.forEach(A=>N(A)):N(E);function N(A){var I;((I=A==null?void 0:A.type)==null?void 0:I.name)==="ElTableColumn"&&(A.vParent=r)}};return{columnId:s,realAlign:l,isSubColumn:a,realHeaderAlign:c,columnOrTableParent:d,setColumnWidth:v,setColumnForcedProps:b,setColumnRenders:E=>{e.renderHeader||E.type!=="selection"&&(E.renderHeader=A=>(r.columnConfig.value.label,o.renderSlot(t,"header",A,()=>[E.label]))),t["filter-icon"]&&(E.renderFilterIcon=A=>o.renderSlot(t,"filter-icon",A));let N=E.renderCell;return E.type==="expand"?(E.renderCell=A=>o.h("div",{class:"cell"},[N(A)]),n.value.renderExpanded=A=>t.default?t.default(A):t.default):(N=N||eP,E.renderCell=A=>{let I=null;if(t.default){const U=t.default(A);I=U.some(Q=>Q.type!==o.Comment)?U:N(A)}else I=N(A);const{columns:O}=n.value.store.states,F=O.value.findIndex(U=>U.type==="default"),P=f.value&&A.cellIndex===F,M=tP(A,P),W={class:"cell",style:{}};return E.showOverflowTooltip&&(W.class=`${W.class} ${o.unref(u.namespace)}-tooltip`,W.style={width:`${(A.column.realWidth||Number(A.column.width))-1}px`}),w(I),o.h("div",W,[M,I])}),E},getPropsData:(...E)=>E.reduce((N,A)=>(Array.isArray(A)&&A.forEach(I=>{N[I]=e[I]}),N),{}),getColumnElIndex:(E,N)=>Array.prototype.indexOf.call(E,N),updateColumnOrder:()=>{n.value.store.commit("updateColumnOrder",r.columnConfig.value)}}}var iP={type:{type:String,default:"default"},label:String,className:String,labelClassName:String,property:String,prop:String,width:{type:[String,Number],default:""},minWidth:{type:[String,Number],default:""},renderHeader:Function,sortable:{type:[Boolean,String],default:!1},sortMethod:Function,sortBy:[String,Function,Array],resizable:{type:Boolean,default:!0},columnKey:String,align:String,headerAlign:String,showOverflowTooltip:{type:[Boolean,Object],default:void 0},fixed:[Boolean,String],formatter:Function,selectable:Function,reserveSelection:Boolean,filterMethod:Function,filteredValue:Array,filters:Array,filterPlacement:String,filterMultiple:{type:Boolean,default:!0},filterClassName:String,index:[Number,Function],sortOrders:{type:Array,default:()=>["ascending","descending",null],validator:e=>e.every(t=>["ascending","descending",null].includes(t))}};let oP=1;var Kb=o.defineComponent({name:"ElTableColumn",components:{ElCheckbox:Xo},props:iP,setup(e,{slots:t}){const n=o.getCurrentInstance(),r=o.ref({}),s=o.computed(()=>{let S=n.parent;for(;S&&!S.tableId;)S=S.parent;return S}),{registerNormalWatchers:a,registerComplexWatchers:l}=nP(s,e),{columnId:c,isSubColumn:u,realHeaderAlign:d,columnOrTableParent:f,setColumnWidth:p,setColumnForcedProps:g,setColumnRenders:v,getPropsData:b,getColumnElIndex:w,realAlign:_,updateColumnOrder:C}=rP(e,t,s),k=f.value;c.value=`${k.tableId||k.columnId}_column_${oP++}`,o.onBeforeMount(()=>{u.value=s.value!==k;const S=e.type||"default",E=e.sortable===""?!0:e.sortable,N=Xt(e.showOverflowTooltip)?k.props.showOverflowTooltip:e.showOverflowTooltip,A=fe(ne({},QR[S]),{id:c.value,type:S,property:e.prop||e.property,align:_,headerAlign:d,showOverflowTooltip:N,filterable:e.filters||e.filterMethod,filteredValue:[],filterPlacement:"",filterClassName:"",isColumnGroup:!1,isSubColumn:!1,filterOpened:!1,sortable:E,index:e.index,rawColumnKey:n.vnode.key});let M=b(["columnKey","label","className","labelClassName","type","renderHeader","formatter","fixed","resizable"],["sortMethod","sortBy","sortOrders"],["selectable","reserveSelection"],["filterMethod","filters","filterMultiple","filterOpened","filteredValue","filterPlacement","filterClassName"]);M=uR(A,M),M=hR(v,p,g)(M),r.value=M,a(),l()}),o.onMounted(()=>{var S;const E=f.value,N=u.value?E.vnode.el.children:(S=E.refs.hiddenColumns)==null?void 0:S.children,A=()=>w(N||[],n.vnode.el);r.value.getColumnIndex=A,A()>-1&&s.value.store.commit("insertColumn",r.value,u.value?E.columnConfig.value:null,C)}),o.onBeforeUnmount(()=>{const S=r.value.getColumnIndex;(S?S():-1)>-1&&s.value.store.commit("removeColumn",r.value,u.value?k.columnConfig.value:null,C)}),n.columnId=c.value,n.columnConfig=r},render(){var e,t,n;try{const r=(t=(e=this.$slots).default)==null?void 0:t.call(e,{row:{},column:{},$index:-1}),s=[];if(Array.isArray(r))for(const l of r)((n=l.type)==null?void 0:n.name)==="ElTableColumn"||l.shapeFlag&2?s.push(l):l.type===o.Fragment&&Array.isArray(l.children)&&l.children.forEach(c=>{(c==null?void 0:c.patchFlag)!==1024&&!ct(c==null?void 0:c.children)&&s.push(c)});return o.h("div",s)}catch(r){return o.h("div",[])}}});const sP=kt(JR,{TableColumn:Kb}),aP=Gr(Kb),Yb=Symbol("uploadContextKey"),lP="ElUpload";class cP extends Error{constructor(t,n,r,s){super(t),this.name="UploadAjaxError",this.status=n,this.method=r,this.url=s}}function Jb(e,t,n){let r;return n.response?r=`${n.response.error||n.response}`:n.responseText?r=`${n.responseText}`:r=`fail to ${t.method} ${e} ${n.status}`,new cP(r,n.status,t.method,e)}function dP(e){const t=e.responseText||e.response;if(!t)return t;try{return JSON.parse(t)}catch(n){return t}}const uP=e=>{typeof XMLHttpRequest=="undefined"&&hi(lP,"XMLHttpRequest is undefined");const t=new XMLHttpRequest,n=e.action;t.upload&&t.upload.addEventListener("progress",a=>{const l=a;l.percent=a.total>0?a.loaded/a.total*100:0,e.onProgress(l)});const r=new FormData;if(e.data)for(const[a,l]of Object.entries(e.data))Tt(l)&&l.length?r.append(a,...l):r.append(a,l);r.append(e.filename,e.file,e.file.name),t.addEventListener("error",()=>{e.onError(Jb(n,e,t))}),t.addEventListener("load",()=>{if(t.status<200||t.status>=300)return e.onError(Jb(n,e,t));e.onSuccess(dP(t))}),t.open(e.method,n,!0),e.withCredentials&&"withCredentials"in t&&(t.withCredentials=!0);const s=e.headers||{};if(s instanceof Headers)s.forEach((a,l)=>t.setRequestHeader(l,a));else for(const[a,l]of Object.entries(s))Nn(l)||t.setRequestHeader(a,String(l));return t.send(r),t},Xb=["text","picture","picture-card"];let fP=1;const kh=()=>Date.now()+fP++,Qb=Ae({action:{type:String,default:"#"},headers:{type:ce(Object)},method:{type:String,default:"post"},data:{type:ce([Object,Function,Promise]),default:()=>ca({})},multiple:Boolean,name:{type:String,default:"file"},drag:Boolean,withCredentials:Boolean,showFileList:{type:Boolean,default:!0},accept:{type:String,default:""},fileList:{type:ce(Array),default:()=>ca([])},autoUpload:{type:Boolean,default:!0},listType:{type:String,values:Xb,default:"text"},httpRequest:{type:ce(Function),default:uP},disabled:Boolean,limit:Number}),hP=Ae(fe(ne({},Qb),{beforeUpload:{type:ce(Function),default:lt},beforeRemove:{type:ce(Function)},onRemove:{type:ce(Function),default:lt},onChange:{type:ce(Function),default:lt},onPreview:{type:ce(Function),default:lt},onSuccess:{type:ce(Function),default:lt},onProgress:{type:ce(Function),default:lt},onError:{type:ce(Function),default:lt},onExceed:{type:ce(Function),default:lt},crossorigin:{type:ce(String)}})),pP=Ae({files:{type:ce(Array),default:()=>ca([])},disabled:{type:Boolean,default:!1},handlePreview:{type:ce(Function),default:lt},listType:{type:String,values:Xb,default:"text"},crossorigin:{type:ce(String)}}),gP={remove:e=>!!e},mP=o.defineComponent({name:"ElUploadList"}),vP=o.defineComponent(fe(ne({},mP),{props:pP,emits:gP,setup(e,{emit:t}){const n=e,{t:r}=Xi(),s=_e("upload"),a=_e("icon"),l=_e("list"),c=_r(),u=o.ref(!1),d=o.computed(()=>[s.b("list"),s.bm("list",n.listType),s.is("disabled",n.disabled)]),f=p=>{t("remove",p)};return(p,g)=>(o.openBlock(),o.createBlock(o.TransitionGroup,{tag:"ul",class:o.normalizeClass(o.unref(d)),name:o.unref(l).b()},{default:o.withCtx(()=>[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(p.files,(v,b)=>(o.openBlock(),o.createElementBlock("li",{key:v.uid||v.name,class:o.normalizeClass([o.unref(s).be("list","item"),o.unref(s).is(v.status),{focusing:u.value}]),tabindex:"0",onKeydown:o.withKeys(w=>!o.unref(c)&&f(v),["delete"]),onFocus:w=>u.value=!0,onBlur:w=>u.value=!1,onClick:w=>u.value=!1},[o.renderSlot(p.$slots,"default",{file:v,index:b},()=>[p.listType==="picture"||v.status!=="uploading"&&p.listType==="picture-card"?(o.openBlock(),o.createElementBlock("img",{key:0,class:o.normalizeClass(o.unref(s).be("list","item-thumbnail")),src:v.url,crossorigin:p.crossorigin,alt:""},null,10,["src","crossorigin"])):o.createCommentVNode("v-if",!0),v.status==="uploading"||p.listType!=="picture-card"?(o.openBlock(),o.createElementBlock("div",{key:1,class:o.normalizeClass(o.unref(s).be("list","item-info"))},[o.createElementVNode("a",{class:o.normalizeClass(o.unref(s).be("list","item-name")),onClick:o.withModifiers(w=>p.handlePreview(v),["prevent"])},[o.createVNode(o.unref(Ye),{class:o.normalizeClass(o.unref(a).m("document"))},{default:o.withCtx(()=>[o.createVNode(o.unref(NN))]),_:1},8,["class"]),o.createElementVNode("span",{class:o.normalizeClass(o.unref(s).be("list","item-file-name")),title:v.name},o.toDisplayString(v.name),11,["title"])],10,["onClick"]),v.status==="uploading"?(o.openBlock(),o.createBlock(o.unref(lR),{key:0,type:p.listType==="picture-card"?"circle":"line","stroke-width":p.listType==="picture-card"?6:2,percentage:Number(v.percentage),style:o.normalizeStyle(p.listType==="picture-card"?"":"margin-top: 0.5rem")},null,8,["type","stroke-width","percentage","style"])):o.createCommentVNode("v-if",!0)],2)):o.createCommentVNode("v-if",!0),o.createElementVNode("label",{class:o.normalizeClass(o.unref(s).be("list","item-status-label"))},[p.listType==="text"?(o.openBlock(),o.createBlock(o.unref(Ye),{key:0,class:o.normalizeClass([o.unref(a).m("upload-success"),o.unref(a).m("circle-check")])},{default:o.withCtx(()=>[o.createVNode(o.unref(Sf))]),_:1},8,["class"])):["picture-card","picture"].includes(p.listType)?(o.openBlock(),o.createBlock(o.unref(Ye),{key:1,class:o.normalizeClass([o.unref(a).m("upload-success"),o.unref(a).m("check")])},{default:o.withCtx(()=>[o.createVNode(o.unref(_1))]),_:1},8,["class"])):o.createCommentVNode("v-if",!0)],2),o.unref(c)?o.createCommentVNode("v-if",!0):(o.openBlock(),o.createBlock(o.unref(Ye),{key:2,class:o.normalizeClass(o.unref(a).m("close")),onClick:w=>f(v)},{default:o.withCtx(()=>[o.createVNode(o.unref(Do))]),_:2},1032,["class","onClick"])),o.createCommentVNode(" Due to close btn only appears when li gets focused disappears after li gets blurred, thus keyboard navigation can never reach close btn"),o.createCommentVNode(" This is a bug which needs to be fixed "),o.createCommentVNode(" TODO: Fix the incorrect navigation interaction "),o.unref(c)?o.createCommentVNode("v-if",!0):(o.openBlock(),o.createElementBlock("i",{key:3,class:o.normalizeClass(o.unref(a).m("close-tip"))},o.toDisplayString(o.unref(r)("el.upload.deleteTip")),3)),p.listType==="picture-card"?(o.openBlock(),o.createElementBlock("span",{key:4,class:o.normalizeClass(o.unref(s).be("list","item-actions"))},[o.createElementVNode("span",{class:o.normalizeClass(o.unref(s).be("list","item-preview")),onClick:w=>p.handlePreview(v)},[o.createVNode(o.unref(Ye),{class:o.normalizeClass(o.unref(a).m("zoom-in"))},{default:o.withCtx(()=>[o.createVNode(o.unref(HN))]),_:1},8,["class"])],10,["onClick"]),o.unref(c)?o.createCommentVNode("v-if",!0):(o.openBlock(),o.createElementBlock("span",{key:0,class:o.normalizeClass(o.unref(s).be("list","item-delete")),onClick:w=>f(v)},[o.createVNode(o.unref(Ye),{class:o.normalizeClass(o.unref(a).m("delete"))},{default:o.withCtx(()=>[o.createVNode(o.unref(xN))]),_:1},8,["class"])],10,["onClick"]))],2)):o.createCommentVNode("v-if",!0)])],42,["onKeydown","onFocus","onBlur","onClick"]))),128)),o.renderSlot(p.$slots,"append")]),_:3},8,["class","name"]))}}));var Zb=Oe(vP,[["__file","upload-list.vue"]]);const yP=Ae({disabled:{type:Boolean,default:!1}}),bP={file:e=>Tt(e)},Vb="ElUploadDrag",wP=o.defineComponent({name:Vb}),_P=o.defineComponent(fe(ne({},wP),{props:yP,emits:bP,setup(e,{emit:t}){o.inject(Yb)||hi(Vb,"usage: <el-upload><el-upload-dragger /></el-upload>");const r=_e("upload"),s=o.ref(!1),a=_r(),l=u=>{if(a.value)return;s.value=!1,u.stopPropagation();const d=Array.from(u.dataTransfer.files);t("file",d)},c=()=>{a.value||(s.value=!0)};return(u,d)=>(o.openBlock(),o.createElementBlock("div",{class:o.normalizeClass([o.unref(r).b("dragger"),o.unref(r).is("dragover",s.value)]),onDrop:o.withModifiers(l,["prevent"]),onDragover:o.withModifiers(c,["prevent"]),onDragleave:o.withModifiers(f=>s.value=!1,["prevent"])},[o.renderSlot(u.$slots,"default")],42,["onDrop","onDragover","onDragleave"]))}}));var CP=Oe(_P,[["__file","upload-dragger.vue"]]);const SP=Ae(fe(ne({},Qb),{beforeUpload:{type:ce(Function),default:lt},onRemove:{type:ce(Function),default:lt},onStart:{type:ce(Function),default:lt},onSuccess:{type:ce(Function),default:lt},onProgress:{type:ce(Function),default:lt},onError:{type:ce(Function),default:lt},onExceed:{type:ce(Function),default:lt}})),EP=o.defineComponent({name:"ElUploadContent",inheritAttrs:!1}),xP=o.defineComponent(fe(ne({},EP),{props:SP,setup(e,{expose:t}){const n=e,r=_e("upload"),s=_r(),a=o.shallowRef({}),l=o.shallowRef(),c=w=>{if(w.length===0)return;const{autoUpload:_,limit:C,fileList:k,multiple:S,onStart:E,onExceed:N}=n;if(C&&k.length+w.length>C){N(w,k);return}S||(w=w.slice(0,1));for(const A of w){const I=A;I.uid=kh(),E(I),_&&u(I)}},u=w=>Ne(this,null,function*(){if(l.value.value="",!n.beforeUpload)return f(w);let _,C={};try{const S=n.data,E=n.beforeUpload(w);C=sv(n.data)?qr(n.data):n.data,_=yield E,sv(n.data)&&Ro(S,C)&&(C=qr(n.data))}catch(S){_=!1}if(_===!1){n.onRemove(w);return}let k=w;_ instanceof Blob&&(_ instanceof File?k=_:k=new File([_],w.name,{type:w.type})),f(Object.assign(k,{uid:w.uid}),C)}),d=(w,_)=>Ne(this,null,function*(){return it(w)?w(_):w}),f=(w,_)=>Ne(this,null,function*(){const{headers:C,data:k,method:S,withCredentials:E,name:N,action:A,onProgress:I,onSuccess:O,onError:F,httpRequest:P}=n;try{_=yield d(_!=null?_:k,w)}catch(Q){n.onRemove(w);return}const{uid:M}=w,W={headers:C||{},withCredentials:E,file:w,data:_,method:S,filename:N,action:A,onProgress:Q=>{I(Q,w)},onSuccess:Q=>{O(Q,w),delete a.value[M]},onError:Q=>{F(Q,w),delete a.value[M]}},U=P(W);a.value[M]=U,U instanceof Promise&&U.then(W.onSuccess,W.onError)}),p=w=>{const _=w.target.files;_&&c(Array.from(_))},g=()=>{s.value||(l.value.value="",l.value.click())},v=()=>{g()};return t({abort:w=>{fN(a.value).filter(w?([C])=>String(w.uid)===C:()=>!0).forEach(([C,k])=>{k instanceof XMLHttpRequest&&k.abort(),delete a.value[C]})},upload:u}),(w,_)=>(o.openBlock(),o.createElementBlock("div",{class:o.normalizeClass([o.unref(r).b(),o.unref(r).m(w.listType),o.unref(r).is("drag",w.drag),o.unref(r).is("disabled",o.unref(s))]),tabindex:o.unref(s)?"-1":"0",onClick:g,onKeydown:o.withKeys(o.withModifiers(v,["self"]),["enter","space"])},[w.drag?(o.openBlock(),o.createBlock(CP,{key:0,disabled:o.unref(s),onFile:c},{default:o.withCtx(()=>[o.renderSlot(w.$slots,"default")]),_:3},8,["disabled"])):o.renderSlot(w.$slots,"default",{key:1}),o.createElementVNode("input",{ref_key:"inputRef",ref:l,class:o.normalizeClass(o.unref(r).e("input")),name:w.name,disabled:o.unref(s),multiple:w.multiple,accept:w.accept,type:"file",onChange:p,onClick:o.withModifiers(()=>{},["stop"])},null,42,["name","disabled","multiple","accept","onClick"])],42,["tabindex","onKeydown"]))}}));var e2=Oe(xP,[["__file","upload-content.vue"]]);const t2="ElUpload",n2=e=>{var t;(t=e.url)!=null&&t.startsWith("blob:")&&URL.revokeObjectURL(e.url)},kP=(e,t)=>{const n=iS(e,"fileList",void 0,{passive:!0}),r=v=>n.value.find(b=>b.uid===v.uid);function s(v){var b;(b=t.value)==null||b.abort(v)}function a(v=["ready","uploading","success","fail"]){n.value=n.value.filter(b=>!v.includes(b.status))}function l(v){n.value=n.value.filter(b=>b!==v)}const c=(v,b)=>{const w=r(b);w&&(console.error(v),w.status="fail",l(w),e.onError(v,w,n.value),e.onChange(w,n.value))},u=(v,b)=>{const w=r(b);w&&(e.onProgress(v,w,n.value),w.status="uploading",w.percentage=Math.round(v.percent))},d=(v,b)=>{const w=r(b);w&&(w.status="success",w.response=v,e.onSuccess(v,w,n.value),e.onChange(w,n.value))},f=v=>{Nn(v.uid)&&(v.uid=kh());const b={name:v.name,percentage:0,status:"ready",size:v.size,raw:v,uid:v.uid};if(e.listType==="picture-card"||e.listType==="picture")try{b.url=URL.createObjectURL(v)}catch(w){w.message,e.onError(w,b,n.value)}n.value=[...n.value,b],e.onChange(b,n.value)},p=v=>Ne(this,null,function*(){const b=v instanceof File?r(v):v;b||hi(t2,"file to be removed not found");const w=_=>{s(_),l(_),e.onRemove(_,n.value),n2(_)};e.beforeRemove?(yield e.beforeRemove(b,n.value))!==!1&&w(b):w(b)});function g(){n.value.filter(({status:v})=>v==="ready").forEach(({raw:v})=>{var b;return v&&((b=t.value)==null?void 0:b.upload(v))})}return o.watch(()=>e.listType,v=>{v!=="picture-card"&&v!=="picture"||(n.value=n.value.map(b=>{const{raw:w,url:_}=b;if(!_&&w)try{b.url=URL.createObjectURL(w)}catch(C){e.onError(C,b,n.value)}return b}))}),o.watch(n,v=>{for(const b of v)b.uid||(b.uid=kh()),b.status||(b.status="success")},{immediate:!0,deep:!0}),{uploadFiles:n,abort:s,clearFiles:a,handleError:c,handleProgress:u,handleStart:f,handleSuccess:d,handleRemove:p,submit:g,revokeFileObjectURL:n2}},NP=o.defineComponent({name:"ElUpload"}),TP=o.defineComponent(fe(ne({},NP),{props:hP,setup(e,{expose:t}){const n=e,r=_r(),s=o.shallowRef(),{abort:a,submit:l,clearFiles:c,uploadFiles:u,handleStart:d,handleError:f,handleRemove:p,handleSuccess:g,handleProgress:v,revokeFileObjectURL:b}=kP(n,s),w=o.computed(()=>n.listType==="picture-card"),_=o.computed(()=>fe(ne({},n),{fileList:u.value,onStart:d,onProgress:v,onSuccess:g,onError:f,onRemove:p}));return o.onBeforeUnmount(()=>{u.value.forEach(b)}),o.provide(Yb,{accept:o.toRef(n,"accept")}),t({abort:a,submit:l,clearFiles:c,handleStart:d,handleRemove:p}),(C,k)=>(o.openBlock(),o.createElementBlock("div",null,[o.unref(w)&&C.showFileList?(o.openBlock(),o.createBlock(Zb,{key:0,disabled:o.unref(r),"list-type":C.listType,files:o.unref(u),crossorigin:C.crossorigin,"handle-preview":C.onPreview,onRemove:o.unref(p)},o.createSlots({append:o.withCtx(()=>[o.createVNode(e2,o.mergeProps({ref_key:"uploadRef",ref:s},o.unref(_)),{default:o.withCtx(()=>[C.$slots.trigger?o.renderSlot(C.$slots,"trigger",{key:0}):o.createCommentVNode("v-if",!0),!C.$slots.trigger&&C.$slots.default?o.renderSlot(C.$slots,"default",{key:1}):o.createCommentVNode("v-if",!0)]),_:3},16)]),_:2},[C.$slots.file?{name:"default",fn:o.withCtx(({file:S,index:E})=>[o.renderSlot(C.$slots,"file",{file:S,index:E})])}:void 0]),1032,["disabled","list-type","files","crossorigin","handle-preview","onRemove"])):o.createCommentVNode("v-if",!0),!o.unref(w)||o.unref(w)&&!C.showFileList?(o.openBlock(),o.createBlock(e2,o.mergeProps({key:1,ref_key:"uploadRef",ref:s},o.unref(_)),{default:o.withCtx(()=>[C.$slots.trigger?o.renderSlot(C.$slots,"trigger",{key:0}):o.createCommentVNode("v-if",!0),!C.$slots.trigger&&C.$slots.default?o.renderSlot(C.$slots,"default",{key:1}):o.createCommentVNode("v-if",!0)]),_:3},16)):o.createCommentVNode("v-if",!0),C.$slots.trigger?o.renderSlot(C.$slots,"default",{key:2}):o.createCommentVNode("v-if",!0),o.renderSlot(C.$slots,"tip"),!o.unref(w)&&C.showFileList?(o.openBlock(),o.createBlock(Zb,{key:3,disabled:o.unref(r),"list-type":C.listType,files:o.unref(u),crossorigin:C.crossorigin,"handle-preview":C.onPreview,onRemove:o.unref(p)},o.createSlots({_:2},[C.$slots.file?{name:"default",fn:o.withCtx(({file:S,index:E})=>[o.renderSlot(C.$slots,"file",{file:S,index:E})])}:void 0]),1032,["disabled","list-type","files","crossorigin","handle-preview","onRemove"])):o.createCommentVNode("v-if",!0)]))}}));var AP=Oe(TP,[["__file","upload.vue"]]);const OP=kt(AP);function IP(e){let t;const n=o.ref(!1),r=o.reactive(fe(ne({},e),{originalPosition:"",originalOverflow:"",visible:!1}));function s(g){r.text=g}function a(){const g=r.parent,v=p.ns;if(!g.vLoadingAddClassList){let b=g.getAttribute("loading-number");b=Number.parseInt(b)-1,b?g.setAttribute("loading-number",b.toString()):(mr(g,v.bm("parent","relative")),g.removeAttribute("loading-number")),mr(g,v.bm("parent","hidden"))}l(),f.unmount()}function l(){var g,v;(v=(g=p.$el)==null?void 0:g.parentNode)==null||v.removeChild(p.$el)}function c(){var g;e.beforeClose&&!e.beforeClose()||(n.value=!0,clearTimeout(t),t=setTimeout(u,400),r.visible=!1,(g=e.closed)==null||g.call(e))}function u(){if(!n.value)return;const g=r.parent;n.value=!1,g.vLoadingAddClassList=void 0,a()}const d=o.defineComponent({name:"ElLoading",setup(g,{expose:v}){const{ns:b,zIndex:w}=Ff("loading");return v({ns:b,zIndex:w}),()=>{const _=r.spinner||r.svg,C=o.h("svg",ne({class:"circular",viewBox:r.svgViewBox?r.svgViewBox:"0 0 50 50"},_?{innerHTML:_}:{}),[o.h("circle",{class:"path",cx:"25",cy:"25",r:"20",fill:"none"})]),k=r.text?o.h("p",{class:b.b("text")},[r.text]):void 0;return o.h(o.Transition,{name:b.b("fade"),onAfterLeave:u},{default:o.withCtx(()=>[o.withDirectives(o.createVNode("div",{style:{backgroundColor:r.background||""},class:[b.b("mask"),r.customClass,r.fullscreen?"is-fullscreen":""]},[o.h("div",{class:b.b("spinner")},[C,k])]),[[o.vShow,r.visible]])])})}}}),f=o.createApp(d),p=f.mount(document.createElement("div"));return fe(ne({},o.toRefs(r)),{setText:s,removeElLoadingChild:l,close:c,handleAfterLeave:u,vm:p,get $el(){return p.$el}})}let wc;const BP=function(e={}){if(!Ke)return;const t=LP(e);if(t.fullscreen&&wc)return wc;const n=IP(fe(ne({},t),{closed:()=>{var s;(s=t.closed)==null||s.call(t),t.fullscreen&&(wc=void 0)}}));RP(t,t.parent,n),r2(t,t.parent,n),t.parent.vLoadingAddClassList=()=>r2(t,t.parent,n);let r=t.parent.getAttribute("loading-number");return r?r=`${Number.parseInt(r)+1}`:r="1",t.parent.setAttribute("loading-number",r),t.parent.appendChild(n.$el),o.nextTick(()=>n.visible.value=t.visible),t.fullscreen&&(wc=n),n},LP=e=>{var t,n,r,s;let a;return ct(e.target)?a=(t=document.querySelector(e.target))!=null?t:document.body:a=e.target||document.body,{parent:a===document.body||e.body?document.body:a,background:e.background||"",svg:e.svg||"",svgViewBox:e.svgViewBox||"",spinner:e.spinner||!1,text:e.text||"",fullscreen:a===document.body&&((n=e.fullscreen)!=null?n:!0),lock:(r=e.lock)!=null?r:!1,customClass:e.customClass||"",visible:(s=e.visible)!=null?s:!0,beforeClose:e.beforeClose,closed:e.closed,target:a}},RP=(e,t,n)=>Ne(this,null,function*(){const{nextZIndex:r}=n.vm.zIndex||n.vm._.exposed.zIndex,s={};if(e.fullscreen)n.originalPosition.value=Po(document.body,"position"),n.originalOverflow.value=Po(document.body,"overflow"),s.zIndex=r();else if(e.parent===document.body){n.originalPosition.value=Po(document.body,"position"),yield o.nextTick();for(const a of["top","left"]){const l=a==="top"?"scrollTop":"scrollLeft";s[a]=`${e.target.getBoundingClientRect()[a]+document.body[l]+document.documentElement[l]-Number.parseInt(Po(document.body,`margin-${a}`),10)}px`}for(const a of["height","width"])s[a]=`${e.target.getBoundingClientRect()[a]}px`}else n.originalPosition.value=Po(t,"position");for(const[a,l]of Object.entries(s))n.$el.style[a]=l}),r2=(e,t,n)=>{const r=n.vm.ns||n.vm._.exposed.ns;["absolute","fixed","sticky"].includes(n.originalPosition.value)?mr(t,r.bm("parent","relative")):Yi(t,r.bm("parent","relative")),e.fullscreen&&e.lock?Yi(t,r.bm("parent","hidden")):mr(t,r.bm("parent","hidden"))},_c=Symbol("ElLoading"),i2=(e,t)=>{var n,r,s,a;const l=t.instance,c=g=>Lt(t.value)?t.value[g]:void 0,u=g=>{const v=ct(g)&&(l==null?void 0:l[g])||g;return v&&o.ref(v)},d=g=>u(c(g)||e.getAttribute(`element-loading-${uS(g)}`)),f=(n=c("fullscreen"))!=null?n:t.modifiers.fullscreen,p={text:d("text"),svg:d("svg"),svgViewBox:d("svgViewBox"),spinner:d("spinner"),background:d("background"),customClass:d("customClass"),fullscreen:f,target:(r=c("target"))!=null?r:f?void 0:e,body:(s=c("body"))!=null?s:t.modifiers.body,lock:(a=c("lock"))!=null?a:t.modifiers.lock};e[_c]={options:p,instance:BP(p)}},PP=(e,t)=>{for(const n of Object.keys(t))o.isRef(t[n])&&(t[n].value=e[n])},o2={mounted(e,t){t.value&&i2(e,t)},updated(e,t){const n=e[_c];t.oldValue!==t.value&&(t.value&&!t.oldValue?i2(e,t):t.value&&t.oldValue?Lt(t.value)&&PP(t.value,n.options):n==null||n.instance.close())},unmounted(e){var t;(t=e[_c])==null||t.instance.close(),e[_c]=null}},s2=["success","info","warning","error"],jt=ca({customClass:"",center:!1,dangerouslyUseHTMLString:!1,duration:3e3,icon:void 0,id:"",message:"",onClose:void 0,showClose:!1,type:"info",plain:!1,offset:16,zIndex:0,grouping:!1,repeatNum:1,appendTo:Ke?document.body:void 0}),DP=Ae({customClass:{type:String,default:jt.customClass},center:{type:Boolean,default:jt.center},dangerouslyUseHTMLString:{type:Boolean,default:jt.dangerouslyUseHTMLString},duration:{type:Number,default:jt.duration},icon:{type:Hr,default:jt.icon},id:{type:String,default:jt.id},message:{type:ce([String,Object,Function]),default:jt.message},onClose:{type:ce(Function),default:jt.onClose},showClose:{type:Boolean,default:jt.showClose},type:{type:String,values:s2,default:jt.type},plain:{type:Boolean,default:jt.plain},offset:{type:Number,default:jt.offset},zIndex:{type:Number,default:jt.zIndex},grouping:{type:Boolean,default:jt.grouping},repeatNum:{type:Number,default:jt.repeatNum}}),MP={destroy:()=>!0},rr=o.shallowReactive([]),FP=e=>{const t=rr.findIndex(s=>s.id===e),n=rr[t];let r;return t>0&&(r=rr[t-1]),{current:n,prev:r}},$P=e=>{const{prev:t}=FP(e);return t?t.vm.exposed.bottom.value:0},zP=(e,t)=>rr.findIndex(r=>r.id===e)>0?16:t,UP=o.defineComponent({name:"ElMessage"}),jP=o.defineComponent(fe(ne({},UP),{props:DP,emits:MP,setup(e,{expose:t}){const n=e,{Close:r}=k1,{ns:s,zIndex:a}=Ff("message"),{currentZIndex:l,nextZIndex:c}=a,u=o.ref(),d=o.ref(!1),f=o.ref(0);let p;const g=o.computed(()=>n.type?n.type==="error"?"danger":n.type:"info"),v=o.computed(()=>{const I=n.type;return{[s.bm("icon",I)]:I&&Wl[I]}}),b=o.computed(()=>n.icon||Wl[n.type]||""),w=o.computed(()=>$P(n.id)),_=o.computed(()=>zP(n.id,n.offset)+w.value),C=o.computed(()=>f.value+_.value),k=o.computed(()=>({top:`${_.value}px`,zIndex:l.value}));function S(){n.duration!==0&&({stop:p}=Gu(()=>{N()},n.duration))}function E(){p==null||p()}function N(){d.value=!1}function A({code:I}){I===Ji.esc&&N()}return o.onMounted(()=>{S(),c(),d.value=!0}),o.watch(()=>n.repeatNum,()=>{E(),S()}),En(document,"keydown",A),fn(u,()=>{f.value=u.value.getBoundingClientRect().height}),t({visible:d,bottom:C,close:N}),(I,O)=>(o.openBlock(),o.createBlock(o.Transition,{name:o.unref(s).b("fade"),onBeforeLeave:I.onClose,onAfterLeave:F=>I.$emit("destroy"),persisted:""},{default:o.withCtx(()=>[o.withDirectives(o.createElementVNode("div",{id:I.id,ref_key:"messageRef",ref:u,class:o.normalizeClass([o.unref(s).b(),{[o.unref(s).m(I.type)]:I.type},o.unref(s).is("center",I.center),o.unref(s).is("closable",I.showClose),o.unref(s).is("plain",I.plain),I.customClass]),style:o.normalizeStyle(o.unref(k)),role:"alert",onMouseenter:E,onMouseleave:S},[I.repeatNum>1?(o.openBlock(),o.createBlock(o.unref(KI),{key:0,value:I.repeatNum,type:o.unref(g),class:o.normalizeClass(o.unref(s).e("badge"))},null,8,["value","type","class"])):o.createCommentVNode("v-if",!0),o.unref(b)?(o.openBlock(),o.createBlock(o.unref(Ye),{key:1,class:o.normalizeClass([o.unref(s).e("icon"),o.unref(v)])},{default:o.withCtx(()=>[(o.openBlock(),o.createBlock(o.resolveDynamicComponent(o.unref(b))))]),_:1},8,["class"])):o.createCommentVNode("v-if",!0),o.renderSlot(I.$slots,"default",{},()=>[I.dangerouslyUseHTMLString?(o.openBlock(),o.createElementBlock(o.Fragment,{key:1},[o.createCommentVNode(" Caution here, message could've been compromised, never use user's input as message "),o.createElementVNode("p",{class:o.normalizeClass(o.unref(s).e("content")),innerHTML:I.message},null,10,["innerHTML"])],2112)):(o.openBlock(),o.createElementBlock("p",{key:0,class:o.normalizeClass(o.unref(s).e("content"))},o.toDisplayString(I.message),3))]),I.showClose?(o.openBlock(),o.createBlock(o.unref(Ye),{key:2,class:o.normalizeClass(o.unref(s).e("closeBtn")),onClick:o.withModifiers(N,["stop"])},{default:o.withCtx(()=>[o.createVNode(o.unref(r))]),_:1},8,["class","onClick"])):o.createCommentVNode("v-if",!0)],46,["id"]),[[o.vShow,d.value]])]),_:3},8,["name","onBeforeLeave","onAfterLeave"]))}}));var qP=Oe(jP,[["__file","message.vue"]]);let HP=1;const a2=e=>{const t=!e||ct(e)||o.isVNode(e)||it(e)?{message:e}:e,n=ne(ne({},jt),t);if(!n.appendTo)n.appendTo=document.body;else if(ct(n.appendTo)){let r=document.querySelector(n.appendTo);gr(r)||(r=document.body),n.appendTo=r}return rn(Vn.grouping)&&!n.grouping&&(n.grouping=Vn.grouping),Ge(Vn.duration)&&n.duration===3e3&&(n.duration=Vn.duration),Ge(Vn.offset)&&n.offset===16&&(n.offset=Vn.offset),rn(Vn.showClose)&&!n.showClose&&(n.showClose=Vn.showClose),n},GP=e=>{const t=rr.indexOf(e);if(t===-1)return;rr.splice(t,1);const{handler:n}=e;n.close()},WP=(r,n)=>{var s=r,{appendTo:e}=s,t=fi(s,["appendTo"]);const a=`message_${HP++}`,l=t.onClose,c=document.createElement("div"),u=fe(ne({},t),{id:a,onClose:()=>{l==null||l(),GP(g)},onDestroy:()=>{o.render(null,c)}}),d=o.createVNode(qP,u,it(u.message)||o.isVNode(u.message)?{default:it(u.message)?u.message:()=>u.message}:null);d.appContext=n||Zo._context,o.render(d,c),e.appendChild(c.firstElementChild);const f=d.component,g={id:a,vnode:d,vm:f,handler:{close:()=>{f.exposed.visible.value=!1}},props:d.component.props};return g},Zo=(e={},t)=>{if(!Ke)return{close:()=>{}};const n=a2(e);if(n.grouping&&rr.length){const s=rr.find(({vnode:a})=>{var l;return((l=a.props)==null?void 0:l.message)===n.message});if(s)return s.props.repeatNum+=1,s.props.type=n.type,s.handler}if(Ge(Vn.max)&&rr.length>=Vn.max)return{close:()=>{}};const r=WP(n,t);return rr.push(r),r.handler};s2.forEach(e=>{Zo[e]=(t={},n)=>{const r=a2(t);return Zo(fe(ne({},r),{type:e}),n)}});function KP(e){for(const t of rr)(!e||e===t.props.type)&&t.handler.close()}Zo.closeAll=KP,Zo._context=null;const Nt=KN(Zo,"$message"),YP=o.defineComponent({name:"ElMessageBox",directives:{TrapFocus:yB},components:ne({ElButton:no,ElFocusTrap:eh,ElInput:mi,ElOverlay:kb,ElIcon:Ye},k1),inheritAttrs:!1,props:{buttonSize:{type:String,validator:XN},modal:{type:Boolean,default:!0},lockScroll:{type:Boolean,default:!0},showClose:{type:Boolean,default:!0},closeOnClickModal:{type:Boolean,default:!0},closeOnPressEscape:{type:Boolean,default:!0},closeOnHashChange:{type:Boolean,default:!0},center:Boolean,draggable:Boolean,overflow:Boolean,roundButton:{default:!1,type:Boolean},container:{type:String,default:"body"},boxType:{type:String,default:""}},emits:["vanish","action"],setup(e,{emit:t}){const{locale:n,zIndex:r,ns:s,size:a}=Ff("message-box",o.computed(()=>e.buttonSize)),{t:l}=n,{nextZIndex:c}=r,u=o.ref(!1),d=o.reactive({autofocus:!0,beforeClose:null,callback:null,cancelButtonText:"",cancelButtonClass:"",confirmButtonText:"",confirmButtonClass:"",customClass:"",customStyle:{},dangerouslyUseHTMLString:!1,distinguishCancelAndClose:!1,icon:"",inputPattern:null,inputPlaceholder:"",inputType:"text",inputValue:null,inputValidator:null,inputErrorMessage:"",message:null,modalFade:!0,modalClass:"",showCancelButton:!1,showConfirmButton:!0,type:"",title:void 0,showInput:!1,action:"",confirmButtonLoading:!1,cancelButtonLoading:!1,confirmButtonLoadingIcon:o.markRaw(Mo),cancelButtonLoadingIcon:o.markRaw(Mo),confirmButtonDisabled:!1,editorErrorMessage:"",validateError:!1,zIndex:c()}),f=o.computed(()=>{const D=d.type;return{[s.bm("icon",D)]:D&&Wl[D]}}),p=br(),g=br(),v=o.computed(()=>d.icon||Wl[d.type]||""),b=o.computed(()=>!!d.message),w=o.ref(),_=o.ref(),C=o.ref(),k=o.ref(),S=o.ref(),E=o.computed(()=>d.confirmButtonClass);o.watch(()=>d.inputValue,D=>Ne(this,null,function*(){yield o.nextTick(),e.boxType==="prompt"&&D!==null&&W()}),{immediate:!0}),o.watch(()=>u.value,D=>{var j,K;D&&(e.boxType!=="prompt"&&(d.autofocus?C.value=(K=(j=S.value)==null?void 0:j.$el)!=null?K:w.value:C.value=w.value),d.zIndex=c()),e.boxType==="prompt"&&(D?o.nextTick().then(()=>{var H;k.value&&k.value.$el&&(d.autofocus?C.value=(H=U())!=null?H:w.value:C.value=w.value)}):(d.editorErrorMessage="",d.validateError=!1))});const N=o.computed(()=>e.draggable),A=o.computed(()=>e.overflow);T1(w,_,N,A),o.onMounted(()=>Ne(this,null,function*(){yield o.nextTick(),e.closeOnHashChange&&window.addEventListener("hashchange",I)})),o.onBeforeUnmount(()=>{e.closeOnHashChange&&window.removeEventListener("hashchange",I)});function I(){u.value&&(u.value=!1,o.nextTick(()=>{d.action&&t("action",d.action)}))}const O=()=>{e.closeOnClickModal&&M(d.distinguishCancelAndClose?"close":"cancel")},F=Df(O),P=D=>{if(d.inputType!=="textarea")return D.preventDefault(),M("confirm")},M=D=>{var j;e.boxType==="prompt"&&D==="confirm"&&!W()||(d.action=D,d.beforeClose?(j=d.beforeClose)==null||j.call(d,D,d,I):I())},W=()=>{if(e.boxType==="prompt"){const D=d.inputPattern;if(D&&!D.test(d.inputValue||""))return d.editorErrorMessage=d.inputErrorMessage||l("el.messagebox.error"),d.validateError=!0,!1;const j=d.inputValidator;if(typeof j=="function"){const K=j(d.inputValue);if(K===!1)return d.editorErrorMessage=d.inputErrorMessage||l("el.messagebox.error"),d.validateError=!0,!1;if(typeof K=="string")return d.editorErrorMessage=K,d.validateError=!0,!1}}return d.editorErrorMessage="",d.validateError=!1,!0},U=()=>{const D=k.value.$refs;return D.input||D.textarea},Q=()=>{M("close")},q=()=>{e.closeOnPressEscape&&Q()};return e.lockScroll&&I1(u),fe(ne({},o.toRefs(d)),{ns:s,overlayEvent:F,visible:u,hasMessage:b,typeClass:f,contentId:p,inputId:g,btnSize:a,iconComponent:v,confirmButtonClasses:E,rootRef:w,focusStartRef:C,headerRef:_,inputRef:k,confirmRef:S,doClose:I,handleClose:Q,onCloseRequested:q,handleWrapperClick:O,handleInputEnter:P,handleAction:M,t:l})}});function JP(e,t,n,r,s,a){const l=o.resolveComponent("el-icon"),c=o.resolveComponent("close"),u=o.resolveComponent("el-input"),d=o.resolveComponent("el-button"),f=o.resolveComponent("el-focus-trap"),p=o.resolveComponent("el-overlay");return o.openBlock(),o.createBlock(o.Transition,{name:"fade-in-linear",onAfterLeave:g=>e.$emit("vanish"),persisted:""},{default:o.withCtx(()=>[o.withDirectives(o.createVNode(p,{"z-index":e.zIndex,"overlay-class":[e.ns.is("message-box"),e.modalClass],mask:e.modal},{default:o.withCtx(()=>[o.createElementVNode("div",{role:"dialog","aria-label":e.title,"aria-modal":"true","aria-describedby":e.showInput?void 0:e.contentId,class:o.normalizeClass(`${e.ns.namespace.value}-overlay-message-box`),onClick:e.overlayEvent.onClick,onMousedown:e.overlayEvent.onMousedown,onMouseup:e.overlayEvent.onMouseup},[o.createVNode(f,{loop:"",trapped:e.visible,"focus-trap-el":e.rootRef,"focus-start-el":e.focusStartRef,onReleaseRequested:e.onCloseRequested},{default:o.withCtx(()=>[o.createElementVNode("div",{ref:"rootRef",class:o.normalizeClass([e.ns.b(),e.customClass,e.ns.is("draggable",e.draggable),{[e.ns.m("center")]:e.center}]),style:o.normalizeStyle(e.customStyle),tabindex:"-1",onClick:o.withModifiers(()=>{},["stop"])},[e.title!==null&&e.title!==void 0?(o.openBlock(),o.createElementBlock("div",{key:0,ref:"headerRef",class:o.normalizeClass([e.ns.e("header"),{"show-close":e.showClose}])},[o.createElementVNode("div",{class:o.normalizeClass(e.ns.e("title"))},[e.iconComponent&&e.center?(o.openBlock(),o.createBlock(l,{key:0,class:o.normalizeClass([e.ns.e("status"),e.typeClass])},{default:o.withCtx(()=>[(o.openBlock(),o.createBlock(o.resolveDynamicComponent(e.iconComponent)))]),_:1},8,["class"])):o.createCommentVNode("v-if",!0),o.createElementVNode("span",null,o.toDisplayString(e.title),1)],2),e.showClose?(o.openBlock(),o.createElementBlock("button",{key:0,type:"button",class:o.normalizeClass(e.ns.e("headerbtn")),"aria-label":e.t("el.messagebox.close"),onClick:g=>e.handleAction(e.distinguishCancelAndClose?"close":"cancel"),onKeydown:o.withKeys(o.withModifiers(g=>e.handleAction(e.distinguishCancelAndClose?"close":"cancel"),["prevent"]),["enter"])},[o.createVNode(l,{class:o.normalizeClass(e.ns.e("close"))},{default:o.withCtx(()=>[o.createVNode(c)]),_:1},8,["class"])],42,["aria-label","onClick","onKeydown"])):o.createCommentVNode("v-if",!0)],2)):o.createCommentVNode("v-if",!0),o.createElementVNode("div",{id:e.contentId,class:o.normalizeClass(e.ns.e("content"))},[o.createElementVNode("div",{class:o.normalizeClass(e.ns.e("container"))},[e.iconComponent&&!e.center&&e.hasMessage?(o.openBlock(),o.createBlock(l,{key:0,class:o.normalizeClass([e.ns.e("status"),e.typeClass])},{default:o.withCtx(()=>[(o.openBlock(),o.createBlock(o.resolveDynamicComponent(e.iconComponent)))]),_:1},8,["class"])):o.createCommentVNode("v-if",!0),e.hasMessage?(o.openBlock(),o.createElementBlock("div",{key:1,class:o.normalizeClass(e.ns.e("message"))},[o.renderSlot(e.$slots,"default",{},()=>[e.dangerouslyUseHTMLString?(o.openBlock(),o.createBlock(o.resolveDynamicComponent(e.showInput?"label":"p"),{key:1,for:e.showInput?e.inputId:void 0,innerHTML:e.message},null,8,["for","innerHTML"])):(o.openBlock(),o.createBlock(o.resolveDynamicComponent(e.showInput?"label":"p"),{key:0,for:e.showInput?e.inputId:void 0},{default:o.withCtx(()=>[o.createTextVNode(o.toDisplayString(e.dangerouslyUseHTMLString?"":e.message),1)]),_:1},8,["for"]))])],2)):o.createCommentVNode("v-if",!0)],2),o.withDirectives(o.createElementVNode("div",{class:o.normalizeClass(e.ns.e("input"))},[o.createVNode(u,{id:e.inputId,ref:"inputRef",modelValue:e.inputValue,"onUpdate:modelValue":g=>e.inputValue=g,type:e.inputType,placeholder:e.inputPlaceholder,"aria-invalid":e.validateError,class:o.normalizeClass({invalid:e.validateError}),onKeydown:o.withKeys(e.handleInputEnter,["enter"])},null,8,["id","modelValue","onUpdate:modelValue","type","placeholder","aria-invalid","class","onKeydown"]),o.createElementVNode("div",{class:o.normalizeClass(e.ns.e("errormsg")),style:o.normalizeStyle({visibility:e.editorErrorMessage?"visible":"hidden"})},o.toDisplayString(e.editorErrorMessage),7)],2),[[o.vShow,e.showInput]])],10,["id"]),o.createElementVNode("div",{class:o.normalizeClass(e.ns.e("btns"))},[e.showCancelButton?(o.openBlock(),o.createBlock(d,{key:0,loading:e.cancelButtonLoading,"loading-icon":e.cancelButtonLoadingIcon,class:o.normalizeClass([e.cancelButtonClass]),round:e.roundButton,size:e.btnSize,onClick:g=>e.handleAction("cancel"),onKeydown:o.withKeys(o.withModifiers(g=>e.handleAction("cancel"),["prevent"]),["enter"])},{default:o.withCtx(()=>[o.createTextVNode(o.toDisplayString(e.cancelButtonText||e.t("el.messagebox.cancel")),1)]),_:1},8,["loading","loading-icon","class","round","size","onClick","onKeydown"])):o.createCommentVNode("v-if",!0),o.withDirectives(o.createVNode(d,{ref:"confirmRef",type:"primary",loading:e.confirmButtonLoading,"loading-icon":e.confirmButtonLoadingIcon,class:o.normalizeClass([e.confirmButtonClasses]),round:e.roundButton,disabled:e.confirmButtonDisabled,size:e.btnSize,onClick:g=>e.handleAction("confirm"),onKeydown:o.withKeys(o.withModifiers(g=>e.handleAction("confirm"),["prevent"]),["enter"])},{default:o.withCtx(()=>[o.createTextVNode(o.toDisplayString(e.confirmButtonText||e.t("el.messagebox.confirm")),1)]),_:1},8,["loading","loading-icon","class","round","disabled","size","onClick","onKeydown"]),[[o.vShow,e.showConfirmButton]])],2)],14,["onClick"])]),_:3},8,["trapped","focus-trap-el","focus-start-el","onReleaseRequested"])],42,["aria-label","aria-describedby","onClick","onMousedown","onMouseup"])]),_:3},8,["z-index","overlay-class","mask"]),[[o.vShow,e.visible]])]),_:3},8,["onAfterLeave"])}var XP=Oe(YP,[["render",JP],["__file","index.vue"]]);const Na=new Map,QP=e=>{let t=document.body;return e.appendTo&&(ct(e.appendTo)&&(t=document.querySelector(e.appendTo)),gr(e.appendTo)&&(t=e.appendTo),gr(t)||(t=document.body)),t},ZP=(e,t,n=null)=>{const r=o.createVNode(XP,e,it(e.message)||o.isVNode(e.message)?{default:it(e.message)?e.message:()=>e.message}:null);return r.appContext=n,o.render(r,t),QP(e).appendChild(t.firstElementChild),r.component},VP=()=>document.createElement("div"),eD=(e,t)=>{const n=VP();e.onVanish=()=>{o.render(null,n),Na.delete(s)},e.onAction=a=>{const l=Na.get(s);let c;e.showInput?c={value:s.inputValue,action:a}:c=a,e.callback?e.callback(c,r.proxy):a==="cancel"||a==="close"?e.distinguishCancelAndClose&&a!=="cancel"?l.reject("close"):l.reject("cancel"):l.resolve(c)};const r=ZP(e,n,t),s=r.proxy;for(const a in e)zr(e,a)&&!zr(s.$props,a)&&(s[a]=e[a]);return s.visible=!0,s};function Vo(e,t=null){if(!Ke)return Promise.reject();let n;return ct(e)||o.isVNode(e)?e={message:e}:n=e.callback,new Promise((r,s)=>{const a=eD(e,t!=null?t:Vo._context);Na.set(a,{options:e,callback:n,resolve:r,reject:s})})}const tD=["alert","confirm","prompt"],nD={alert:{closeOnPressEscape:!1,closeOnClickModal:!1},confirm:{showCancelButton:!0},prompt:{showCancelButton:!0,showInput:!0}};tD.forEach(e=>{Vo[e]=rD(e)});function rD(e){return(t,n,r,s)=>{let a="";return Lt(n)?(r=n,a=""):Xt(n)?a="":a=n,Vo(Object.assign(ne({title:a,message:t,type:""},nD[e]),r,{boxType:e}),s)}}Vo.close=()=>{Na.forEach((e,t)=>{t.doClose()}),Na.clear()},Vo._context=null;const Ci=Vo;Ci.install=e=>{Ci._context=e._context,e.config.globalProperties.$msgbox=Ci,e.config.globalProperties.$messageBox=Ci,e.config.globalProperties.$alert=Ci.alert,e.config.globalProperties.$confirm=Ci.confirm,e.config.globalProperties.$prompt=Ci.prompt};const l2=Ci,Hoe="",Goe="",Woe="",Koe="",Nh=new WeakMap;function Th(e){let t=Nh.get(e);return t||Nh.set(e,t=Object.create(null)),t}function Si(e,t,n){if(Array.isArray(t))t.forEach(r=>Si(e,r,n));else{const r=Th(e);(r[t]||(r[t]=[])).push(n)}return e}function Ei(e,t,n){const r=e;if(!t)return Nh.set(e,Object.create(null)),r;if(Array.isArray(t))return t.forEach(l=>Ei(e,l,n)),r;const s=Th(e),a=s[t];return a?n?(s[t]=a.filter(l=>!(l===n||l.fn===n)),r):(s[t]=void 0,r):r}function ve(e,t,...n){e&&e.$emit&&e.$emit(t,...n);const r=Th(e)[t];return r&&r.map(s=>s.apply(e,n)),e}function iD(e){return/^(https?:|mailto:|tel:)/.test(e)}const Yoe="",_t=(e,t)=>{const n=e.__vccOpts||e;for(const[r,s]of t)n[r]=s;return n},oD={name:"ForceGraphSvgIcon",props:{iconClass:{type:String,required:!0},className:{type:String,default:""}},computed:{isExternal(){return iD(this.iconClass)||this.iconClass.startsWith("data:image")||!1},iconName(){return`#icon-${this.iconClass}`},svgClass(){return this.className?"svg-icon "+this.className:"svg-icon"},styleExternalIcon(){return{mask:`url(${this.iconClass}) no-repeat 50% 50%`,"-webkit-mask":`url(${this.iconClass}) no-repeat 50% 50%`}}}},sD=["xlink:href"];function aD(e,t,n,r,s,a){return a.isExternal?(o.openBlock(),o.createElementBlock("div",o.mergeProps({key:0},e.$attrs,{style:a.styleExternalIcon,class:"svg-external-icon svg-icon"}),null,16)):(o.openBlock(),o.createElementBlock("svg",o.mergeProps({key:1},e.$attrs,{class:a.svgClass,"aria-hidden":"true"}),[o.createElementVNode("use",{"xlink:href":a.iconName},null,8,sD)],16))}const so=_t(oD,[["render",aD],["__scopeId","data-v-73ac1940"]]),Joe="",Xoe="";class lD{constructor(t){this.init(t)}init(t){this.length=0,this.all=[],this.currentIndex=0,this.dataOrigin={nodes:{},links:{},groups:{}},this.nodeTree={},this.nodeParent={},this.dataNow={nodes:[],links:[],groups:[]},this.showInfo={nodes:0,links:0,timeOut:null,time:100},this.keyNodeIds=null,this.levels=[],this.nodeWidth=40,this.nodeMargin=40,this.layout=["forceLayout","treeLayout"],this.layoutIndex=0,this.isShowNodeMessage=t.isShowNodeMessage}initFromSnapshot({length:t,all:n,currentIndex:r,dataOrigin:s,dataNow:a,showInfo:l,nodeTree:c,nodeParent:u,keyNodeIds:d,layoutIndex:f}){this.length=t,this.all=n,this.currentIndex=r,this.dataOrigin=s,this.nodeTree=c,this.nodeParent=u,this.keyNodeIds=d,this.layoutIndex=f;for(const p in a.nodes)delete a.nodes[p].vx,delete a.nodes[p].vy,delete a.nodes[p].x,delete a.nodes[p].y;this.dataNow=a,this.dataNow.links.map(p=>{p.source=p.source.id,p.target=p.target.id}),this.dataNow=Object.assign({},this.dataNow,{}),this.showInfo=JSON.parse(JSON.stringify(l))}forward(){this.currentIndex<this.length-1&&(this.currentIndex=this.currentIndex+1,this.onAction(this.all[this.currentIndex],!0))}back(){this.currentIndex>=0&&(this.resumeAction(this.all[this.currentIndex]),this.currentIndex=this.currentIndex-1)}pushState(t){this.all=this.all.slice(0,this.currentIndex+1);const n=this.onAction(t);this.all.push(n),this.length=this.all.length,this.currentIndex=this.all.length-1}updateGroups(){const t={};this.dataNow.nodes.map(r=>{var s;t[r.group]?t[r.group].nodes.push(r):t[r.group]={nodes:[r],id:r.group,api:(s=r.group)==null?void 0:s.split("~")[1],apiName:r.groupC}});const n=Object.values(t);this.dataNow.groups=n}onAction(t,n=!1){const r=this,s=this.dataNow.nodes.length,a=this.dataNow.links.length,{addOne:l,updateOne:c,deleteOne:u,type:d}=t;l&&(l.originNodes=[],l.nodes&&l.nodes.map(v=>{(!this.dataOrigin.nodes[v.id]||d==="aggregation"||d==="addFromAggregation")&&(this.dataOrigin.nodes[v.id]=!0,delete v.vx,delete v.vy,delete v.x,delete v.y,this.dataNow.nodes.push(v),l.originNodes.push(v))}),l.links&&l.links.map(v=>{v.source=v.source.id?v.source.id:v.source,v.target=v.target.id?v.target.id:v.target,(!this.dataOrigin.links[`${v.source}+${v.target}`]&&!this.dataOrigin.links[`${v.target}+${v.source}`]||d==="aggregation"||d==="addFromAggregation")&&(this.dataOrigin.links[`${v.source}+${v.target}`]=!0,this.dataNow.links.push(v),this.updateNodeTree(v),this.updateNodeParent(v))})),c&&(c.originNodes=[],c.originLinks=[],c.nodes&&c.nodes.map(v=>{for(const b in this.dataNow.nodes)if(v.id===this.dataNow.nodes[b].id){const w=[];v.keyVals.map(_=>{w.push({key:_.key,value:JSON.parse(JSON.stringify(this.dataNow.nodes[b][_.key]))})}),c.originNodes.push({id:v.id,keyVals:w}),v.keyVals.map(_=>{this.dataNow.nodes[b][_.key]=_.value});break}}),c.links&&c.links.map(v=>{for(const b in this.dataNow.links)if(v.source===this.dataNow.links[b].source&&v.target===this.dataNow.links[b].target){c.originLinks.push(this.dataNow.links[b]),this.dataNow.links[b]=v;break}}));function f(v){v&&v.map(b=>{var w;for(const _ in r.dataNow.nodes)if(b.id===r.dataNow.nodes[_].id){u.originNodes.push(r.dataNow.nodes[_]),d!=="aggregation"&&(r.dataOrigin.nodes[`${r.dataNow.nodes[_].id}`]=!1),r.dataNow.nodes.splice(_,1);const C=JSON.parse(JSON.stringify(r.dataNow.links));for(let k=C.length-1;k>=0;k--)if((b.id===C[k].source.id||b.id===C[k].target.id)&&(u.originLinks.push(C[k]),d!=="aggregation"&&(r.dataOrigin.links[`${C[k].source.id}+${C[k].target.id}`]=!1),r.dataNow.links.splice(k,1),r.updateNodeTree(C[k],"delete"),r.updateNodeParent(C[k],"delete"),b.id===C[k].target.id&&C[k].source.type==="nodeType"&&!r.nodeTree[C[k].source.id]&&f([C[k].source]),b.id===C[k].source.id)){const S=C[k].target;((w=r.nodeParent[S.id])==null?void 0:w.length)>=1?r.nodeParent[S.id].some(N=>u.originNodes.map(A=>A.id).indexOf(N)<0)||f([S]):f([S])}break}})}u&&(u.originNodes=[],u.originLinks=[],f(u.nodes),u.links&&u.links.map(v=>{for(const b in this.dataNow.links)if(v.source===this.dataNow.links[b].source&&v.target===this.dataNow.links[b].target){u.originLinks.push(this.dataNow.links[b]),d!=="aggregation"&&(this.dataOrigin.links[`${this.dataNow.links[b].source.id}+${this.dataNow.links[b].target.id}`]=!1),this.dataNow.links.splice(b,1),this.updateNodeTree(v,"delete"),this.updateNodeParent(v,"delete");break}})),this.updateGroups(),this.computePos();const p=this.dataNow.nodes.length,g=this.dataNow.links.length;return d!=="aggregation"&&this.showMessage(p-s,g-a),t}resumeAction(t){var f,p;const{addOne:n,updateOne:r,deleteOne:s,type:a}=t,l=this.dataNow.nodes.length,c=this.dataNow.links.length;n&&(n.nodes&&n.originNodes.map(g=>{for(const v in this.dataNow.nodes)if(g.id===this.dataNow.nodes[v].id){this.dataOrigin.nodes[`${this.dataNow.nodes[v].id}`]=!1,this.dataNow.nodes.splice(v,1);break}}),n.links&&n.links.map(g=>{var v,b,w,_;for(const C in this.dataNow.links){const k=(v=g.source)!=null&&v.id?g.source.id:g.source,S=(b=g.target)!=null&&b.id?g.target.id:g.target,E=(w=this.dataNow.links[C].source)!=null&&w.id?this.dataNow.links[C].source.id:this.dataNow.links[C].source,N=(_=this.dataNow.links[C].target)!=null&&_.id?this.dataNow.links[C].target.id:this.dataNow.links[C].target;if(k===E&&S===N){this.dataOrigin.links[`${E}+${N}`]=!1,this.dataNow.links.splice(C,1),this.updateNodeTree(g,"delete"),this.updateNodeParent(g,"delete");break}}})),r&&(r.originNodes&&r.originNodes.map(g=>{for(const v in this.dataNow.nodes)if(g.id===this.dataNow.nodes[v].id){g.keyVals.map(b=>{this.dataNow.nodes[v][b.key]=b.value});break}}),r.originLinks&&r.originLinks.map(g=>{for(const v in this.dataNow.links)if(g.source.id===this.dataNow.links[v].source.id&&g.target.id===this.dataNow.links[v].target.id){g.keyVals.map(b=>{this.dataNow.links[v][b.key]=b.value});break}})),s&&(s.originNodes&&s.originNodes.map(g=>{(!this.dataOrigin.nodes[g.id]||a==="aggregation")&&(this.dataOrigin.nodes[g.id]=!0,this.dataNow.nodes.push(g))}),s.originLinks&&s.originLinks.map(g=>{(!this.dataOrigin.links[`${g.source}+${g.target}`]&&!this.dataOrigin.links[`${g.target}+${g.source}`]||a==="aggregation")&&(this.dataOrigin.links[`${g.source.id}+${g.target.id}`]=!0,this.dataNow.links.push(g),this.updateNodeTree(g),this.updateNodeParent(g))}));for(const g in this.dataNow.links)this.dataNow.links[g].source=(f=this.dataNow.links[g].source)!=null&&f.id?this.dataNow.links[g].source.id:this.dataNow.links[g].source,this.dataNow.links[g].target=(p=this.dataNow.links[g].target)!=null&&p.id?this.dataNow.links[g].target.id:this.dataNow.links[g].target;this.updateGroups(),this.computePos();const u=this.dataNow.nodes.length,d=this.dataNow.links.length;a!=="aggregation"&&this.showMessage(u-l,d-c)}showMessage(t,n){if(!this.isShowNodeMessage)return;this.showInfo.nodes+=t,this.showInfo.links+=n;const r=this.showInfo.nodes>=0?"新增"+this.showInfo.nodes:"减少"+-this.showInfo.nodes,s=this.showInfo.links>=0?"新增"+this.showInfo.links:"减少"+-this.showInfo.links;Nt({message:`${r}个节点, ${s}条边`,type:"info"}),this.showInfo.nodes=0,this.showInfo.links=0}updateData(t,n){t.map(s=>{const a=this.dataNow.nodes.findIndex(l=>{var c;return(l==null?void 0:l.id)===((c=s.info)==null?void 0:c.id)});a<0||(this.dataNow.nodes[a].detail=JSON.parse(JSON.stringify(s)))}),(n==null?void 0:n.filter(s=>t.findIndex(a=>{var l;return((l=a.info)==null?void 0:l.id)===s}))).map(s=>{const a=this.dataNow.nodes.findIndex(l=>l.id===s);a<0||(this.dataNow.nodes[a].noDetail=!0)}),this.dataNow=Object.assign({},this.dataNow,{})}updateAggregationDetail(t,n,r){var l;const s=(l=this.dataNow.nodes.find(c=>c.id===r))==null?void 0:l.list;t.map(c=>{const u=s.findIndex(d=>{var f;return(d==null?void 0:d.id)===((f=c.info)==null?void 0:f.id)});u<0||(s[u].detail=JSON.parse(JSON.stringify(c)))}),(n==null?void 0:n.filter(c=>t.findIndex(u=>{var d;return((d=u.info)==null?void 0:d.id)===c}))).map(c=>{const u=s.findIndex(d=>d.id===c);u<0||(s[u].noDetail=!0)}),this.dataNow=Object.assign({},this.dataNow,{})}updateAggregationNode(t,n){const r=this.dataNow.nodes.find(s=>s.id===n);r.list=t,this.dataNow=Object.assign({},this.dataNow,{})}toString(){const t={length:this.length,all:this.all,currentIndex:this.currentIndex,dataOrigin:this.dataOrigin,dataNow:this.dataNow,showInfo:this.showInfo,nodeTree:this.nodeTree,nodeParent:this.nodeParent,keyNodeIds:this.keyNodeIds,layoutIndex:this.layoutIndex};return JSON.stringify(t)}updateNodeTree(t,n="add"){var a,l;const r=t.target.id?t.target.id:t.target,s=t.source.id?t.source.id:t.source;if(n==="add")this.nodeTree[s]?this.nodeTree[s].push(r):this.nodeTree[s]=[r];else if(((a=this.nodeTree[s])==null?void 0:a.length)===1)this.nodeTree[s]=null;else if(((l=this.nodeTree[s])==null?void 0:l.length)>1){const c=this.nodeTree[s].indexOf(r);this.nodeTree[s].splice(c,1)}}updateNodeParent(t,n="add"){var a,l;const r=t.target.id?t.target.id:t.target,s=t.source.id?t.source.id:t.source;if(n==="add")this.nodeParent[r]&&this.nodeParent[r].indexOf(s)<0?this.nodeParent[r].push(s):this.nodeParent[r]=[s];else if(((a=this.nodeParent[r])==null?void 0:a.length)===1)this.nodeParent[r]=null;else if(((l=this.nodeParent[r])==null?void 0:l.length)>1){const c=this.nodeParent[r].indexOf(s);this.nodeParent[r].splice(c,1)}}toggleShowNode(t,n,r=!1){const s=this.dataNow.links,a=this;function l(f){var p;if(f.show!==!1){f.show=!1;for(let g=s.length-1;g>=0;g--)if(f.id===s[g].target.id&&s[g].source.type==="nodeType"&&a.dataNow.nodes.filter(b=>a.nodeTree[s[g].source.id].indexOf(b.id)>=0&&b.show===!0).length===0&&l(s[g].source),f.id===s[g].source.id){const v=s[g].target;if(((p=a.nodeParent[v.id])==null?void 0:p.length)>=1){const w=a.dataNow.nodes.filter(C=>a.nodeParent[v.id].indexOf(C.id)>=0&&C.show===!0).length,_=a.dataNow.nodes.some(C=>C.id===v.id&&C.startNode===!0);w===0&&!_&&l(v)}}}}function c(f){f.show=!0;for(let g=s.length-1;g>=0;g--)s[g].source.id===f.id&&s[g].target.show===!1&&(s[g].target.show=!0,c(s[g].target));const{keyNodeIds:p}=a.findKeyLinksAndNodes(f.id);a.dataNow.nodes.map(g=>{p.indexOf(g.id)>=0&&!g.show&&(g.show=!0)})}const u=this.dataNow.nodes.findIndex(f=>f.id===t.id),d=this.dataNow.nodes[u];r?c(d):l(d)}findKeyLinksAndNodes(t,n=!1){const r=[],s=[t],a=this;function l(c){if(a.dataNow.nodes.some(f=>f.id===c&&f.startNode===!0))return;const d=a.getParentLink(c);d&&r.findIndex(f=>f.index===d.index)<0&&(r.push(d),l(d.source.id))}return l(t),this.dataNow.links.map(c=>{r.find(d=>d.source.id===c.source.id&&d.target.id===c.target.id)&&s.push(c.source.id)}),n&&(this.keyNodeIds=s),{keyLinks:r,keyNodeIds:s}}resetKeyLinksAndNodes(){this.keyNodeIds=null}getParentLink(t){return this.dataNow.links.find(n=>n.target.id===t)}initPosId(){const t=this,n=this.dataNow.nodes.filter(l=>l.startNode===!0),r=[],s=n.map(l=>l.id);a(s,0);function a(l,c){for(let f=0;f<l.length;f++){const p=l[f];p!=null&&p.indexPos||(r[c]?r[c].push(p):r[c]=[p])}if(!r[c])return;const u={};t.dataNow.nodes.map(f=>{r[c].indexOf(f.id)>=0&&(u[f.id]=f)}),r[c].sort((f,p)=>{var b,w;const g=t.dataNow.nodes.find(_=>_.id===u[f].parents&&u[f].parents[0]),v=t.dataNow.nodes.find(_=>_.id===u[p].parents&&u[p].parents[0]);return((b=g==null?void 0:g.indexPos)==null?void 0:b.split("-").pop())*1-((w=v==null?void 0:v.indexPos)==null?void 0:w.split("-").pop())*1||-1}),t.dataNow.nodes.map(f=>{const p=r[c].indexOf(f.id);if(p>=0){if(f.levelNum&&f.levelNum!==c)return;f.indexPos=c+"-"+p,f.levelNum=c}t.dataNow.links.map(g=>{g.target===f.id&&(g.indexPos=f.indexPos)})});const d=t.dataNow.links.filter(f=>{const p=r[c].indexOf(f.source.id?f.source.id:f.source)>=0,g=r.flat().indexOf(f.target.id?f.target.id:f.target)<0;return p&&g}).map(f=>f.target.id?f.target.id:f.target);d.length>0&&a(d,c+1)}this.levels=r}computeFamilyRelation(){this.dataNow.nodes.map(t=>{t.children=null,t.parents=null}),this.dataNow.links.map(t=>{const n=this.dataNow.nodes.find(s=>s.id===(t.source.id?t.source.id:t.source)),r=this.dataNow.nodes.find(s=>s.id===(t.target.id?t.target.id:t.target));n&&r&&(n.children?n.children.push(r.id):n.children=[r.id]),r&&n&&(r.parents?r.parents.push(n.id):r.parents=[n.id])}),this.dataNow.nodes.map(t=>{t.startNode===!0&&(t.parents=["virtualOne"])})}computeWidth(){this.nodeWidth;const t=this.nodeMargin,n=this;r(this.levels,this.levels.length-1);function r(s,a){const l=s[a];if(!l)return;const c=l.map(d=>n.dataNow.nodes.find(f=>f.id===d));l.map(d=>{var g,v;const f=n.dataNow.nodes.find(b=>b.id===d),p=(g=f.children)==null?void 0:g.reduce((b,w)=>(n.dataNow.nodes.find(C=>w===C.id).widthBefore||0)+b,0);f.levelWidth=p+(((v=f.children)==null?void 0:v.length)-1)*t||0});let u;l.map((d,f)=>{const p=n.dataNow.nodes.find(g=>g.id===d);p.widthBefore=0,p.children&&(u>=0&&(p.widthBefore=Math.max(0,p.levelWidth/2-(f-u-1)*t+c[u].levelWidth/2)),u=f)}),r(s,a-1)}}computeOneLevelPos(t,n){this.nodeWidth;const r=this.nodeMargin,s=t[n],a=this;if(!s)return;const l={};this.dataNow.nodes.filter(u=>s.indexOf(u.id)>=0).map(u=>{u.parents||(u.parents=[]),l[u.parents[0]]?l[u.parents[0]].push(u):l[u.parents[0]]=[u]});for(const u in l)l[u].sort((d,f)=>{var p,g;return((p=d.indexPos)==null?void 0:p.split("-").pop())*1-((g=f.indexPos)==null?void 0:g.split("-").pop())*1}),c(l[u]);function c(u){var g,v;const d=((g=a.dataNow.nodes.find(b=>u[0].parents[0]===b.id))==null?void 0:g.levelWidth)||0,f=((v=a.dataNow.nodes.find(b=>u[0].parents[0]===b.id))==null?void 0:v.pos)||0;let p=0;u.map((b,w)=>{b.pos=p+b.widthBefore-d/2+f,p=p+b.widthBefore+r})}this.computeOneLevelPos(t,n+1)}computePos(){this.computeFamilyRelation(),this.initPosId(),this.computeWidth(),this.dataNow.nodes[0]&&(this.dataNow.nodes[0].pos=0,this.dataNow.nodes[0].levelNum=0),this.computeOneLevelPos(this.levels,0)}destroy(){this.length=0,this.all=[],this.currentIndex=0,this.dataOrigin={nodes:{},links:{},groups:{}},this.nodeTree={},this.nodeParent={},this.dataNow={nodes:[],links:[],groups:[]},this.showInfo={nodes:0,links:0,timeOut:null,time:100},this.keyNodeIds=null,this.levels=[],this.nodeWidth=40,this.nodeMargin=40,this.layout=["forceLayout","treeLayout"],this.layoutIndex=0}}const Qoe="",Cc="graph-node-level-",Ah="legend-level-";function cD(e){let t="",n="",r="";return e.forEach(s=>{const a=s.className,l=s.normalColor,c=s.darkColor?s.darkColor:s.normalColor,u=Cc+a,d=`--graph-level-${a}`;n+=`${d}: ${l};`,r+=`${d}: ${c};`,t+=`
|
|
43
43
|
// 没有level时的默认样式
|
|
44
44
|
.d3-container .${Cc}unknown {
|
|
45
45
|
stroke: var(--graph-unknown);
|
|
@@ -96,15 +96,15 @@
|
|
|
96
96
|
.popover-container .popover-block .row-item .level.${u} {
|
|
97
97
|
color: var(${d});
|
|
98
98
|
}
|
|
99
|
-
`}),n=`:root {${n}}`,r=`[data-theme="dark"] { ${r}}`,n+r+t}function dD(e){const t=document.createElement("style");t.innerHTML=e,document.head.appendChild(t),window.insertSafeForceGraphStyle=!0}function uD(e){if(window.insertSafeForceGraphStyle){vn("已存在样式");return}const t=cD(e);dD(t)}function Sc(e,t){var r;if(e==null||e==="")return Cc+"unknown";const n=(r=t[e])==null?void 0:r.className;return n?Cc+n:""}function ao(e,t,n){if(e==null||e==="")return n?"#c6cdd5":"#666";const r=t==null?void 0:t.find(s=>s.level===e);return n?r==null?void 0:r.darkColor:r==null?void 0:r.normalColor}function fD(e,t){var r;return((r=t.find(s=>s.level===e))==null?void 0:r.dangerNumber)>0}const c2={"./public/d3svg1/85.svg":"https://s8.qhres2.com/static/92a77a4cfe45315b.svg","./public/d3svg1/address.svg":"https://s8.qhres2.com/static/49af0232ce8bf04c.svg","./public/d3svg1/aggregation.svg":"https://s7.qhres2.com/static/78f28ebf024a1fc3.svg","./public/d3svg1/button/hm_icon_add.svg":"https://s5.qhres2.com/static/4fb5006e9082eb79.svg","./public/d3svg1/button/hm_icon_add_more.svg":"https://s8.qhres2.com/static/3069a945cf205172.svg","./public/d3svg1/button/hm_icon_intro.svg":"https://s6.qhres2.com/static/e3a9174af2a35626.svg","./public/d3svg1/button/hm_icon_search.svg":"https://s6.qhres2.com/static/87920114f746d11b.svg","./public/d3svg1/button/hm_icon_snapshot.svg":"https://s9.qhres2.com/static/87bd8cd6660f76eb.svg","./public/d3svg1/button18/button_all_fix_nodes.svg":"https://s6.qhres2.com/static/b0289b2eb89201c9.svg","./public/d3svg1/button18/button_all_show_label.svg":"https://s9.qhres2.com/static/212e1c47d101e979.svg","./public/d3svg1/button18/button_all_show_names.svg":"https://s9.qhres2.com/static/5662f90b2fd37b8e.svg","./public/d3svg1/button18/button_all_un_fix_nodes.svg":"https://s8.qhres2.com/static/062f773b8bf7a9b1.svg","./public/d3svg1/button18/button_all_un_show_label.svg":"https://s5.qhres2.com/static/ab90216e9f7a6f47.svg","./public/d3svg1/button18/button_all_un_show_names.svg":"https://s9.qhres2.com/static/ee92ef3b7c76c4ad.svg","./public/d3svg1/button18/button_copy.svg":"https://s8.qhres2.com/static/b10151262d77f531.svg","./public/d3svg1/button18/button_delete_node.svg":"https://s8.qhres2.com/static/4ae033e0515de4f6.svg","./public/d3svg1/button18/button_edit_label.svg":"https://s6.qhres2.com/static/3986fc6c0e079f57.svg","./public/d3svg1/button18/button_fix_nodes.svg":"https://s8.qhres2.com/static/fa0d1980cb1bf492.svg","./public/d3svg1/button18/button_go_result.svg":"https://s7.qhres2.com/static/62f48cc3630090d2.svg","./public/d3svg1/button18/button_hold_aggregation.svg":"https://s9.qhres2.com/static/0491c4b71553e3c3.svg","./public/d3svg1/button18/button_node_star.svg":"https://s5.qhres2.com/static/ea5b0c1f75783964.svg","./public/d3svg1/button18/button_redo.svg":"https://s5.qhres2.com/static/8dbda7152025c98d.svg","./public/d3svg1/button18/button_relation.svg":"https://s7.qhres2.com/static/d3881ed52b32dc1f.svg","./public/d3svg1/button18/button_release_aggregation.svg":"https://s7.qhres2.com/static/ba06fa8a8db4569a.svg","./public/d3svg1/button18/button_show_label.svg":"https://s7.qhres2.com/static/2abe1d60abb61fa9.svg","./public/d3svg1/button18/button_show_names.svg":"https://s6.qhres2.com/static/c36a1eae354aaaa2.svg","./public/d3svg1/button18/button_single_edge_select.svg":"https://s6.qhres2.com/static/d7743402fc6d09da.svg","./public/d3svg1/button18/button_undo.svg":"https://s9.qhres2.com/static/6e72dfa93353d2f8.svg","./public/d3svg1/button18/button_un_fix_nodes.svg":"https://s6.qhres2.com/static/60ffc34cad1d659b.svg","./public/d3svg1/button18/button_un_node_star.svg":"https://s8.qhres2.com/static/c565f0ec8a880690.svg","./public/d3svg1/button18/button_un_show_label.svg":"https://s8.qhres2.com/static/71fff9dca19fbecc.svg","./public/d3svg1/button18/button_un_show_names.svg":"https://s6.qhres2.com/static/f4669f0b6c14e809.svg","./public/d3svg1/button18/fit_button.svg":"https://s5.qhres2.com/static/c08f73410838a252.svg","./public/d3svg1/button18/full_button.svg":"https://s6.qhres2.com/static/0f4cb1e63de23dc5.svg","./public/d3svg1/button18/un_full_button.svg":"https://s9.qhres2.com/static/9451379f77771234.svg","./public/d3svg1/button18/zoom_in_button.svg":"https://s8.qhres2.com/static/a0d01d2a34694b6c.svg","./public/d3svg1/button18/zoom_out_button.svg":"https://s9.qhres2.com/static/c3955d07bb42785e.svg","./public/d3svg1/button22/button_add_con_node.svg":"https://s6.qhres2.com/static/eba662b3d6dd3e14.svg","./public/d3svg1/button22/button_center_view.svg":"https://s7.qhres2.com/static/394b502b897ab7ac.svg","./public/d3svg1/button22/button_copy.svg":"https://s7.qhres2.com/static/1079057f47388143.svg","./public/d3svg1/button22/button_delete_node.svg":"https://s7.qhres2.com/static/2ded0a5330325385.svg","./public/d3svg1/button22/button_edit_label.svg":"https://s5.qhres2.com/static/975e072dead6e9fa.svg","./public/d3svg1/button22/button_expand_node.svg":"https://s7.qhres2.com/static/057558aff373fb6e.svg","./public/d3svg1/button22/button_eye_close.svg":"https://s7.qhres2.com/static/af3940bd635bf5cc.svg","./public/d3svg1/button22/button_eye_open.svg":"https://s6.qhres2.com/static/8fcb2638123571e3.svg","./public/d3svg1/button22/button_fix_nodes.svg":"https://s6.qhres2.com/static/baf03da46465cdd6.svg","./public/d3svg1/button22/button_highlight.svg":"https://s8.qhres2.com/static/0e54b564417081b8.svg","./public/d3svg1/button22/button_hold_aggregation.svg":"https://s7.qhres2.com/static/f881ab3ebcf70fc1.svg","./public/d3svg1/button22/button_node_star.svg":"https://s8.qhres2.com/static/113de2517f47e4f9.svg","./public/d3svg1/button22/button_release_aggregation.svg":"https://s9.qhres2.com/static/dd2b3a84e0651662.svg","./public/d3svg1/button22/button_select_all.svg":"https://s8.qhres2.com/static/fb1bab113d4d18ba.svg","./public/d3svg1/button22/button_select_children.svg":"https://s7.qhres2.com/static/494fdd768d816653.svg","./public/d3svg1/button22/button_select_parents.svg":"https://s5.qhres2.com/static/3cbe3439eee235d6.svg","./public/d3svg1/button22/button_show_label.svg":"https://s8.qhres2.com/static/f13914e64f8f3e5a.svg","./public/d3svg1/button22/button_show_names.svg":"https://s5.qhres2.com/static/f4d81384382cd033.svg","./public/d3svg1/button22/button_un_fix_nodes.svg":"https://s7.qhres2.com/static/ea8a1159fe64af2b.svg","./public/d3svg1/button22/button_un_node_star.svg":"https://s9.qhres2.com/static/03975ae87086cd88.svg","./public/d3svg1/button22/button_un_show_label.svg":"https://s7.qhres2.com/static/9391e814e0f764d5.svg","./public/d3svg1/button22/button_un_show_names.svg":"https://s7.qhres2.com/static/5c50b21de64f4c5e.svg","./public/d3svg1/button22/hm_icon_add.svg":"https://s5.qhres2.com/static/852af5cf3c637cef.svg","./public/d3svg1/button22/hm_icon_alias.svg":"https://s6.qhres2.com/static/36fcd0ab7eb1d512.svg","./public/d3svg1/button22/hm_icon_alias_colse.svg":"https://s8.qhres2.com/static/4d38830be1599afc.svg","./public/d3svg1/button22/hm_icon_auto.svg":"https://s7.qhres2.com/static/e08583939b92f508.svg","./public/d3svg1/button22/hm_icon_del.svg":"https://s7.qhres2.com/static/2ded0a5330325385.svg","./public/d3svg1/button22/hm_icon_export.svg":"https://s8.qhres2.com/static/71556fb91f5648f7.svg","./public/d3svg1/button22/hm_icon_fix.svg":"https://s6.qhres2.com/static/baf03da46465cdd6.svg","./public/d3svg1/button22/hm_icon_force.svg":"https://s9.qhres2.com/static/91132a6bf978400c.svg","./public/d3svg1/button22/hm_icon_help.svg":"https://s7.qhres2.com/static/2aa090c82f498cb9.svg","./public/d3svg1/button22/hm_icon_hightLight.svg":"https://s5.qhres2.com/static/e2369714ebf8324d.svg","./public/d3svg1/button22/hm_icon_img.svg":"https://s5.qhres2.com/static/572193e4146fd076.svg","./public/d3svg1/button22/hm_icon_import.svg":"https://s7.qhres2.com/static/3bbcefca466a9108.svg","./public/d3svg1/button22/hm_icon_redo.svg":"https://s6.qhres2.com/static/d47c5779b67388ca.svg","./public/d3svg1/button22/hm_icon_save.svg":"https://s7.qhres2.com/static/2992a856a97d5b85.svg","./public/d3svg1/button22/hm_icon_snapshot.svg":"https://s6.qhres2.com/static/6109b5e11a9f2631.svg","./public/d3svg1/button22/hm_icon_tree.svg":"https://s6.qhres2.com/static/274890d02e511166.svg","./public/d3svg1/button22/hm_icon_undo.svg":"https://s6.qhres2.com/static/736f72642af1abc9.svg","./public/d3svg1/button22/hm_icon_unfix.svg":"https://s7.qhres2.com/static/ea8a1159fe64af2b.svg","./public/d3svg1/button_un_show_label.svg":"https://s6.qhres2.com/static/b19a5b41cfffbc0b.svg","./public/d3svg1/cert.svg":"https://s8.qhres2.com/static/8e9252db9ca5f789.svg","./public/d3svg1/cert_code.svg":"https://s8.qhres2.com/static/b034794ce279efc0.svg","./public/d3svg1/cert_https.svg":"https://s7.qhres2.com/static/fb425c625c9106d9.svg","./public/d3svg1/cert_md5.svg":"https://s8.qhres2.com/static/df826bcca1d0fb18.svg","./public/d3svg1/cloud.svg":"https://s9.qhres2.com/static/633cc96ec9bff2e6.svg","./public/d3svg1/company.svg":"https://s9.qhres2.com/static/4b09c9ca105cf6a4.svg","./public/d3svg1/country.svg":"https://s5.qhres2.com/static/1a7736c5b478e07b.svg","./public/d3svg1/dns.svg":"https://s8.qhres2.com/static/1089289f6729cade.svg","./public/d3svg1/dns_domain.svg":"https://s6.qhres2.com/static/fc636fd5af0c0c05.svg","./public/d3svg1/dns_ip.svg":"https://s6.qhres2.com/static/945d97b0460770aa.svg","./public/d3svg1/domain.svg":"https://s8.qhres2.com/static/d15450a9035991ba.svg","./public/d3svg1/down.svg":"https://s8.qhres2.com/static/1129404c0a0a7a23.svg","./public/d3svg1/download.svg":"https://s7.qhres2.com/static/2ea12e3c04d70b6e.svg","./public/d3svg1/email.svg":"https://s6.qhres2.com/static/1feb3629d4b23c7d.svg","./public/d3svg1/event.svg":"https://s8.qhres2.com/static/638b2ce39606388a.svg","./public/d3svg1/family.svg":"https://s9.qhres2.com/static/4cd5109f631b74af.svg","./public/d3svg1/file.svg":"https://s9.qhres2.com/static/5464eee7f1212b95.svg","./public/d3svg1/file_md5.svg":"https://s6.qhres2.com/static/3882a8f6cc25a1fa.svg","./public/d3svg1/find_country.svg":"https://s6.qhres2.com/static/2775367e4febc238.svg","./public/d3svg1/find_group.svg":"https://s7.qhres2.com/static/73c08baa1232ab15.svg","./public/d3svg1/find_ioc.svg":"https://s5.qhres2.com/static/b324dc9874d2f64a.svg","./public/d3svg1/find_report.svg":"https://s5.qhres2.com/static/7e8b93e787606859.svg","./public/d3svg1/find_target_country.svg":"https://s6.qhres2.com/static/1bf440bf280e9186.svg","./public/d3svg1/find_target_industry.svg":"https://s5.qhres2.com/static/0ea145e0bc9844f1.svg","./public/d3svg1/find_ttp.svg":"https://s6.qhres2.com/static/d3555f80211bdd20.svg","./public/d3svg1/find_vendor.svg":"https://s5.qhres2.com/static/35936579d6cec419.svg","./public/d3svg1/flags/abu_dhabi.png":"https://p0.ssl.qhimg.com/t11b673bcd600b7420ed9d3b0fc.png","./public/d3svg1/flags/afghanistan.png":"https://p5.ssl.qhimg.com/t11b673bcd66b73f84b7152db62.png","./public/d3svg1/flags/albania.png":"https://p0.ssl.qhimg.com/t11b673bcd6554ace32f912d567.png","./public/d3svg1/flags/algeria.png":"https://p3.ssl.qhimg.com/t11b673bcd622422b6d071ccc22.png","./public/d3svg1/flags/american_samoa.png":"https://p1.ssl.qhimg.com/t11b673bcd6c595535d38c2c488.png","./public/d3svg1/flags/andorra.png":"https://p0.ssl.qhimg.com/t11b673bcd6805f7f0ae834fc32.png","./public/d3svg1/flags/angola.png":"https://p3.ssl.qhimg.com/t11b673bcd64152de70c5b45254.png","./public/d3svg1/flags/anguilla.png":"https://p2.ssl.qhimg.com/t11b673bcd655dd08b9abd92436.png","./public/d3svg1/flags/antigua_and_barbuda.png":"https://p4.ssl.qhimg.com/t11b673bcd6c42483ae1c05b5ae.png","./public/d3svg1/flags/argentina.png":"https://p0.ssl.qhimg.com/t11b673bcd64d3f8c0d28624343.png","./public/d3svg1/flags/armenia.png":"https://p1.ssl.qhimg.com/t11b673bcd6ffddd18f6213fbe8.png","./public/d3svg1/flags/aruba.png":"https://p5.ssl.qhimg.com/t11b673bcd6a954f4ebda2b2aaf.png","./public/d3svg1/flags/australia.png":"https://p1.ssl.qhimg.com/t11b673bcd6c024c65ff1cc8a8d.png","./public/d3svg1/flags/austria.png":"https://p0.ssl.qhimg.com/t11b673bcd6e6a215b0a4a0077d.png","./public/d3svg1/flags/azerbaijan.png":"https://p4.ssl.qhimg.com/t11b673bcd6b2f598ca0633bab4.png","./public/d3svg1/flags/bahamas.png":"https://p1.ssl.qhimg.com/t11b673bcd64389c5b895aeb8cb.png","./public/d3svg1/flags/bahrain.png":"https://p5.ssl.qhimg.com/t11b673bcd6e9aea3791db558e2.png","./public/d3svg1/flags/bangladesh.png":"https://p4.ssl.qhimg.com/t11b673bcd656bcda81bdeb333e.png","./public/d3svg1/flags/barbados.png":"https://p3.ssl.qhimg.com/t11b673bcd6e173975ff3435533.png","./public/d3svg1/flags/belarus.png":"https://p4.ssl.qhimg.com/t11b673bcd6c6bd61585df5dc66.png","./public/d3svg1/flags/belgium.png":"https://p5.ssl.qhimg.com/t11b673bcd6bc981724a92fd288.png","./public/d3svg1/flags/belize.png":"https://p3.ssl.qhimg.com/t11b673bcd657e3a5a5e9e6d0dc.png","./public/d3svg1/flags/benin.png":"https://p4.ssl.qhimg.com/t11b673bcd60fe48ceb0d83f1db.png","./public/d3svg1/flags/bermuda.png":"https://p4.ssl.qhimg.com/t11b673bcd6991a5555e2951383.png","./public/d3svg1/flags/bhutan.png":"https://p1.ssl.qhimg.com/t11b673bcd6c1a09b104cbbf155.png","./public/d3svg1/flags/bolivia.png":"https://p4.ssl.qhimg.com/t11b673bcd6f14d83bf204a3484.png","./public/d3svg1/flags/bosnia_and_herzegovina.png":"https://p2.ssl.qhimg.com/t11b673bcd60c6298b82cba538c.png","./public/d3svg1/flags/botswana.png":"https://p5.ssl.qhimg.com/t11b673bcd6c857af3514756b8f.png","./public/d3svg1/flags/brazil.png":"https://p0.ssl.qhimg.com/t11b673bcd65ca6cd0fb5c7cc59.png","./public/d3svg1/flags/british_virgin_islands.png":"https://p4.ssl.qhimg.com/t11b673bcd604bceae11fd2f580.png","./public/d3svg1/flags/brunei.png":"https://p3.ssl.qhimg.com/t11b673bcd6f920666ff379bb8a.png","./public/d3svg1/flags/bulgaria.png":"https://p5.ssl.qhimg.com/t11b673bcd6766409ab0d88cc13.png","./public/d3svg1/flags/burkina_faso.png":"https://p4.ssl.qhimg.com/t11b673bcd6366f1d500c9f0c26.png","./public/d3svg1/flags/burundi.png":"https://p0.ssl.qhimg.com/t11b673bcd6ef92224393d4789c.png","./public/d3svg1/flags/cambodia.png":"https://p2.ssl.qhimg.com/t11b673bcd689fddeb63273c902.png","./public/d3svg1/flags/cameroon.png":"https://p3.ssl.qhimg.com/t11b673bcd61b97aca53d096ec7.png","./public/d3svg1/flags/canada.png":"https://p4.ssl.qhimg.com/t11b673bcd607f2e3664cc586a9.png","./public/d3svg1/flags/cape_verde.png":"https://p5.ssl.qhimg.com/t11b673bcd6bcd5521b34abe933.png","./public/d3svg1/flags/cayman_islands.png":"https://p4.ssl.qhimg.com/t11b673bcd659643bbfdae25503.png","./public/d3svg1/flags/central_african_republic.png":"https://p2.ssl.qhimg.com/t11b673bcd6689eb3ad435ebb68.png","./public/d3svg1/flags/chad.png":"https://p4.ssl.qhimg.com/t11b673bcd69e06a9ad5a86a48b.png","./public/d3svg1/flags/chile.png":"https://p0.ssl.qhimg.com/t11b673bcd6da100a223247567f.png","./public/d3svg1/flags/china.png":"https://p5.ssl.qhimg.com/t11b673bcd6304bcd201fd23df6.png","./public/d3svg1/flags/christmas_island.png":"https://p2.ssl.qhimg.com/t11b673bcd6e7874db308ac2252.png","./public/d3svg1/flags/cocos_islands.png":"https://p0.ssl.qhimg.com/t11b673bcd6c0b7f434b6919f3f.png","./public/d3svg1/flags/colombia.png":"https://p4.ssl.qhimg.com/t11b673bcd64067c703a78dce3b.png","./public/d3svg1/flags/comoros.png":"https://p0.ssl.qhimg.com/t11b673bcd669a07d86c511072b.png","./public/d3svg1/flags/congo_democratic_republic.png":"https://p4.ssl.qhimg.com/t11b673bcd683ac60001ce46f1f.png","./public/d3svg1/flags/congo_republic.png":"https://p1.ssl.qhimg.com/t11b673bcd63046ae1b2eaa2e03.png","./public/d3svg1/flags/costa_rica.png":"https://p3.ssl.qhimg.com/t11b673bcd626df8804c76f2fd6.png","./public/d3svg1/flags/cote_d'ivoire.png":"https://p3.ssl.qhimg.com/t11b673bcd6bcd9188af99a7148.png","./public/d3svg1/flags/croatia.png":"https://p1.ssl.qhimg.com/t11b673bcd6d3566b33a31ee615.png","./public/d3svg1/flags/cuba.png":"https://p0.ssl.qhimg.com/t11b673bcd6dc80791b9bc8e11c.png","./public/d3svg1/flags/curacao.png":"https://p0.ssl.qhimg.com/t11b673bcd61f17f8ec93fecd34.png","./public/d3svg1/flags/cyprus.png":"https://p2.ssl.qhimg.com/t11b673bcd69a4c05b99a9c64be.png","./public/d3svg1/flags/czech_republic.png":"https://p1.ssl.qhimg.com/t11b673bcd63224c0c67639351f.png","./public/d3svg1/flags/denmark.png":"https://p4.ssl.qhimg.com/t11b673bcd6b0f04b65a97f8028.png","./public/d3svg1/flags/djibouti.png":"https://p0.ssl.qhimg.com/t11b673bcd6e4796ea6f99dd948.png","./public/d3svg1/flags/dominica.png":"https://p3.ssl.qhimg.com/t11b673bcd6b3867bd167f1d976.png","./public/d3svg1/flags/dominican_republic.png":"https://p4.ssl.qhimg.com/t11b673bcd64378d5ead5b5e6ec.png","./public/d3svg1/flags/east_timor.png":"https://p5.ssl.qhimg.com/t11b673bcd6e8e5fb8405dec7e3.png","./public/d3svg1/flags/ecuador.png":"https://p2.ssl.qhimg.com/t11b673bcd6395fb935fa0f0e3a.png","./public/d3svg1/flags/egypt.png":"https://p3.ssl.qhimg.com/t11b673bcd601fe13f0f24008e9.png","./public/d3svg1/flags/el_salvador.png":"https://p4.ssl.qhimg.com/t11b673bcd60104541f9c7a0c99.png","./public/d3svg1/flags/england.png":"https://p5.ssl.qhimg.com/t11b673bcd643b14e971b5b3cb6.png","./public/d3svg1/flags/equatorial_guinea.png":"https://p5.ssl.qhimg.com/t11b673bcd6a74942f5afd0b3a4.png","./public/d3svg1/flags/eritrea.png":"https://p4.ssl.qhimg.com/t11b673bcd6ce53472f50f44f5b.png","./public/d3svg1/flags/estonia.png":"https://p5.ssl.qhimg.com/t11b673bcd66d527c4a923153eb.png","./public/d3svg1/flags/ethiopia.png":"https://p4.ssl.qhimg.com/t11b673bcd692b527f6a90ddbe0.png","./public/d3svg1/flags/europe.png":"https://p4.ssl.qhimg.com/t11b673bcd65bb42e201aa13efa.png","./public/d3svg1/flags/falkland_islands.png":"https://p1.ssl.qhimg.com/t11b673bcd60ae1bba78b7eb7a6.png","./public/d3svg1/flags/fiji.png":"https://p5.ssl.qhimg.com/t11b673bcd6ffb03de7e05ae7aa.png","./public/d3svg1/flags/finland.png":"https://p4.ssl.qhimg.com/t11b673bcd695f5d1feacba8397.png","./public/d3svg1/flags/france.png":"https://p1.ssl.qhimg.com/t11b673bcd6f697a973b72a98e7.png","./public/d3svg1/flags/french_guiana.png":"https://p3.ssl.qhimg.com/t11b673bcd66346509b6df42a07.png","./public/d3svg1/flags/french_polynesia.png":"https://p3.ssl.qhimg.com/t11b673bcd6932beb0a7b52f3da.png","./public/d3svg1/flags/gabon.png":"https://p2.ssl.qhimg.com/t11b673bcd632f298a0f193b661.png","./public/d3svg1/flags/gambia.png":"https://p4.ssl.qhimg.com/t11b673bcd61564ba1c6e0c96ed.png","./public/d3svg1/flags/georgia.png":"https://p2.ssl.qhimg.com/t11b673bcd6eea60bad5abefdba.png","./public/d3svg1/flags/germany.png":"https://p1.ssl.qhimg.com/t11b673bcd684b3001d906d19c7.png","./public/d3svg1/flags/ghana.png":"https://p2.ssl.qhimg.com/t11b673bcd6f7dcd42afd3fc0ff.png","./public/d3svg1/flags/gibraltar.png":"https://p3.ssl.qhimg.com/t11b673bcd6ed767f13c90a732f.png","./public/d3svg1/flags/greece.png":"https://p0.ssl.qhimg.com/t11b673bcd6da5d5973a17cc048.png","./public/d3svg1/flags/greenland.png":"https://p1.ssl.qhimg.com/t11b673bcd6d3f1604dea436593.png","./public/d3svg1/flags/grenada.png":"https://p5.ssl.qhimg.com/t11b673bcd670078c4c722961d5.png","./public/d3svg1/flags/guam.png":"https://p1.ssl.qhimg.com/t11b673bcd6fe323aa0e62d3c0c.png","./public/d3svg1/flags/guatemala.png":"https://p3.ssl.qhimg.com/t11b673bcd63743b6c563848d07.png","./public/d3svg1/flags/guernsey.png":"https://p0.ssl.qhimg.com/t11b673bcd6f86e78de635ff50c.png","./public/d3svg1/flags/guinea.png":"https://p0.ssl.qhimg.com/t11b673bcd6d4f635060a97fb49.png","./public/d3svg1/flags/guinea_bissau.png":"https://p4.ssl.qhimg.com/t11b673bcd64ee5f7086bb14c1e.png","./public/d3svg1/flags/guyana.png":"https://p0.ssl.qhimg.com/t11b673bcd6e7d086533c3f87f2.png","./public/d3svg1/flags/haiti.png":"https://p5.ssl.qhimg.com/t11b673bcd6159c94d32253d312.png","./public/d3svg1/flags/honduras.png":"https://p5.ssl.qhimg.com/t11b673bcd6796b21e7e87b5254.png","./public/d3svg1/flags/hongkong.png":"https://p0.ssl.qhimg.com/t11b673bcd621cfe81da15a2878.png","./public/d3svg1/flags/hungary.png":"https://p4.ssl.qhimg.com/t11b673bcd6b5087e47ff53250a.png","./public/d3svg1/flags/iceland.png":"https://p0.ssl.qhimg.com/t11b673bcd60178e8a27cf4f660.png","./public/d3svg1/flags/india.png":"https://p1.ssl.qhimg.com/t11b673bcd68213e7e6dc2a3368.png","./public/d3svg1/flags/indonesia.png":"https://p4.ssl.qhimg.com/t11b673bcd6bcb4661812d6e2dd.png","./public/d3svg1/flags/ip.png":"https://p4.ssl.qhimg.com/t11b673bcd62e2c50a4c424fd37.png","./public/d3svg1/flags/iran.png":"https://p1.ssl.qhimg.com/t11b673bcd61a5bca45b65c6bda.png","./public/d3svg1/flags/iraq.png":"https://p3.ssl.qhimg.com/t11b673bcd6c351fb6799b43b8e.png","./public/d3svg1/flags/ireland.png":"https://p2.ssl.qhimg.com/t11b673bcd6c19ffc4e51b1b821.png","./public/d3svg1/flags/isle_of_man.png":"https://p1.ssl.qhimg.com/t11b673bcd67cc3b83618827640.png","./public/d3svg1/flags/israel.png":"https://p5.ssl.qhimg.com/t11b673bcd60f3fe6361aebe345.png","./public/d3svg1/flags/italy.png":"https://p0.ssl.qhimg.com/t11b673bcd6259e5daf0549a262.png","./public/d3svg1/flags/jamaica.png":"https://p4.ssl.qhimg.com/t11b673bcd6fe1c1722f1aadb19.png","./public/d3svg1/flags/japan.png":"https://p5.ssl.qhimg.com/t11b673bcd62be27ee2e0144814.png","./public/d3svg1/flags/jersey.png":"https://p5.ssl.qhimg.com/t11b673bcd6e6808ce8980d8153.png","./public/d3svg1/flags/jordan.png":"https://p4.ssl.qhimg.com/t11b673bcd63b03a35b35e93112.png","./public/d3svg1/flags/kazakhstan.png":"https://p1.ssl.qhimg.com/t11b673bcd65c547f69f6914068.png","./public/d3svg1/flags/kenya.png":"https://p5.ssl.qhimg.com/t11b673bcd6c139207c1af5796e.png","./public/d3svg1/flags/kiribati.png":"https://p4.ssl.qhimg.com/t11b673bcd6fa801f19411d0845.png","./public/d3svg1/flags/kosovo.png":"https://p5.ssl.qhimg.com/t11b673bcd67a2248e71b96fe50.png","./public/d3svg1/flags/kuwait.png":"https://p1.ssl.qhimg.com/t11b673bcd644ba519b64e3b8d5.png","./public/d3svg1/flags/kyrgyzstan.png":"https://p2.ssl.qhimg.com/t11b673bcd6586d16c82fd0d335.png","./public/d3svg1/flags/laos.png":"https://p5.ssl.qhimg.com/t11b673bcd6c625355323458017.png","./public/d3svg1/flags/latvia.png":"https://p0.ssl.qhimg.com/t11b673bcd6ea8a114edbe5ec64.png","./public/d3svg1/flags/lebanon.png":"https://p4.ssl.qhimg.com/t11b673bcd6ffbeb21378af699a.png","./public/d3svg1/flags/lesotho.png":"https://p0.ssl.qhimg.com/t11b673bcd6d373c8167c1bbc61.png","./public/d3svg1/flags/liberia.png":"https://p0.ssl.qhimg.com/t11b673bcd6f36c69ecf34bcb61.png","./public/d3svg1/flags/libya.png":"https://p0.ssl.qhimg.com/t11b673bcd6d20838c79c8f3ba6.png","./public/d3svg1/flags/liechtenstein.png":"https://p5.ssl.qhimg.com/t11b673bcd696b0707e4ac337b5.png","./public/d3svg1/flags/lithuania.png":"https://p5.ssl.qhimg.com/t11b673bcd6b414cecd90415a6a.png","./public/d3svg1/flags/luxembourg.png":"https://p1.ssl.qhimg.com/t11b673bcd63d9dda633fc50ffd.png","./public/d3svg1/flags/macau.png":"https://p1.ssl.qhimg.com/t11b673bcd6a892679802369212.png","./public/d3svg1/flags/macedonia.png":"https://p2.ssl.qhimg.com/t11b673bcd623808f60cf668fc9.png","./public/d3svg1/flags/madagascar.png":"https://p0.ssl.qhimg.com/t11b673bcd64d15e974516d5cb3.png","./public/d3svg1/flags/malawi.png":"https://p5.ssl.qhimg.com/t11b673bcd62db076a05806722c.png","./public/d3svg1/flags/malaysia.png":"https://p4.ssl.qhimg.com/t11b673bcd6f9a3c22f13fd96c5.png","./public/d3svg1/flags/maldives.png":"https://p3.ssl.qhimg.com/t11b673bcd6fde5890555898b6f.png","./public/d3svg1/flags/mali.png":"https://p1.ssl.qhimg.com/t11b673bcd6422870677e8b5bce.png","./public/d3svg1/flags/malta.png":"https://p4.ssl.qhimg.com/t11b673bcd672c88550dc2c333e.png","./public/d3svg1/flags/marshall_islands.png":"https://p0.ssl.qhimg.com/t11b673bcd6646846cbbf3a4735.png","./public/d3svg1/flags/mauritania.png":"https://p5.ssl.qhimg.com/t11b673bcd6c3ade924f1cef885.png","./public/d3svg1/flags/mauritius.png":"https://p0.ssl.qhimg.com/t11b673bcd629026fcfcd64601f.png","./public/d3svg1/flags/mexico.png":"https://p2.ssl.qhimg.com/t11b673bcd6e06d39e098fc8ccb.png","./public/d3svg1/flags/micronesia.png":"https://p1.ssl.qhimg.com/t11b673bcd6c1b247a750439a7e.png","./public/d3svg1/flags/moldova.png":"https://p5.ssl.qhimg.com/t11b673bcd650c6f75d4d3eee8b.png","./public/d3svg1/flags/monaco.png":"https://p4.ssl.qhimg.com/t11b673bcd6bcb4661812d6e2dd.png","./public/d3svg1/flags/mongolia.png":"https://p4.ssl.qhimg.com/t11b673bcd62cfc9fa747237289.png","./public/d3svg1/flags/montenegro.png":"https://p4.ssl.qhimg.com/t11b673bcd66462c01ca1bafac0.png","./public/d3svg1/flags/montserrat.png":"https://p3.ssl.qhimg.com/t11b673bcd60c8845d6d090c447.png","./public/d3svg1/flags/morocco.png":"https://p0.ssl.qhimg.com/t11b673bcd69897bbe03901a57a.png","./public/d3svg1/flags/mozambique.png":"https://p5.ssl.qhimg.com/t11b673bcd65f93036ad9aec89c.png","./public/d3svg1/flags/myanmar_burma.png":"https://p2.ssl.qhimg.com/t11b673bcd63ee76060475fe0b0.png","./public/d3svg1/flags/namibia.png":"https://p2.ssl.qhimg.com/t11b673bcd65e0bbc1fec4908a9.png","./public/d3svg1/flags/nauru.png":"https://p0.ssl.qhimg.com/t11b673bcd674083d9b9b5e0069.png","./public/d3svg1/flags/nepal.png":"https://p0.ssl.qhimg.com/t11b673bcd67808e1379fc17470.png","./public/d3svg1/flags/netherlands.png":"https://p5.ssl.qhimg.com/t11b673bcd6d592b75467b0db7b.png","./public/d3svg1/flags/netherlands_antilles.png":"https://p5.ssl.qhimg.com/t11b673bcd63bbf175457b12c12.png","./public/d3svg1/flags/new_caledonia.png":"https://p1.ssl.qhimg.com/t11b673bcd62231079a91d351eb.png","./public/d3svg1/flags/new_zealand.png":"https://p4.ssl.qhimg.com/t11b673bcd649ee6eb1c37a282a.png","./public/d3svg1/flags/nicaragua.png":"https://p2.ssl.qhimg.com/t11b673bcd63d155996d8c986c9.png","./public/d3svg1/flags/niger.png":"https://p5.ssl.qhimg.com/t11b673bcd64f4d87e9952a272b.png","./public/d3svg1/flags/nigeria.png":"https://p2.ssl.qhimg.com/t11b673bcd6964d810f5fe6b404.png","./public/d3svg1/flags/niue.png":"https://p5.ssl.qhimg.com/t11b673bcd6f23318f87536e3be.png","./public/d3svg1/flags/norfolk_island.png":"https://p0.ssl.qhimg.com/t11b673bcd66bb5e86248642b36.png","./public/d3svg1/flags/northern_cyprus.png":"https://p5.ssl.qhimg.com/t11b673bcd61b7548ce349c2c59.png","./public/d3svg1/flags/northern_ireland.png":"https://p5.ssl.qhimg.com/t11b673bcd6ea43c093d6f4f449.png","./public/d3svg1/flags/north_korea.png":"https://p4.ssl.qhimg.com/t11b673bcd67327fd94e8b6a5a3.png","./public/d3svg1/flags/norway.png":"https://p0.ssl.qhimg.com/t11b673bcd6c987d9dd507bfdd6.png","./public/d3svg1/flags/oman.png":"https://p3.ssl.qhimg.com/t11b673bcd6808d4462b6f3a218.png","./public/d3svg1/flags/pakistan.png":"https://p2.ssl.qhimg.com/t11b673bcd6cf5e993ade4f2964.png","./public/d3svg1/flags/palau.png":"https://p3.ssl.qhimg.com/t11b673bcd6c068865ac2e2b031.png","./public/d3svg1/flags/palestine.png":"https://p1.ssl.qhimg.com/t11b673bcd6eead994da457cb04.png","./public/d3svg1/flags/panama.png":"https://p2.ssl.qhimg.com/t11b673bcd6cc4745092f80ccfb.png","./public/d3svg1/flags/papua_new_guinea.png":"https://p0.ssl.qhimg.com/t11b673bcd644673a8e2c3ef051.png","./public/d3svg1/flags/paraguay.png":"https://p1.ssl.qhimg.com/t11b673bcd6dda2a735d20519e7.png","./public/d3svg1/flags/peru.png":"https://p2.ssl.qhimg.com/t11b673bcd633af174deb1560d5.png","./public/d3svg1/flags/philippines.png":"https://p4.ssl.qhimg.com/t11b673bcd6f5f86e3429cb4c81.png","./public/d3svg1/flags/pitcairn_islands.png":"https://p1.ssl.qhimg.com/t11b673bcd64517b95359047675.png","./public/d3svg1/flags/poland.png":"https://p3.ssl.qhimg.com/t11b673bcd6069ed918cdd98767.png","./public/d3svg1/flags/portugal.png":"https://p4.ssl.qhimg.com/t11b673bcd68cefa1ac33d50290.png","./public/d3svg1/flags/puerto_rico.png":"https://p2.ssl.qhimg.com/t11b673bcd6659a3560240c8a4e.png","./public/d3svg1/flags/qatar.png":"https://p3.ssl.qhimg.com/t11b673bcd669854fcdd37ed962.png","./public/d3svg1/flags/romania.png":"https://p2.ssl.qhimg.com/t11b673bcd6208b9341dba47f11.png","./public/d3svg1/flags/russia.png":"https://p0.ssl.qhimg.com/t11b673bcd66b8ee4de7e5d9e69.png","./public/d3svg1/flags/rwanda.png":"https://p3.ssl.qhimg.com/t11b673bcd61c8a95a7340b4dae.png","./public/d3svg1/flags/sahrawi_arab.png":"https://p0.ssl.qhimg.com/t11b673bcd6833624156c42e3ab.png","./public/d3svg1/flags/saint_kitts_and_nevis.png":"https://p2.ssl.qhimg.com/t11b673bcd6bb701bf8e688e076.png","./public/d3svg1/flags/saint_lucia.png":"https://p2.ssl.qhimg.com/t11b673bcd6be47edaa16e3efdb.png","./public/d3svg1/flags/saint_vincent_and_grenadines.png":"https://p5.ssl.qhimg.com/t11b673bcd6356376d62ad2fb08.png","./public/d3svg1/flags/samoa.png":"https://p0.ssl.qhimg.com/t11b673bcd65099091e7ff643a2.png","./public/d3svg1/flags/san_marino.png":"https://p1.ssl.qhimg.com/t11b673bcd6c7d8eaf79bd11950.png","./public/d3svg1/flags/sao_tome_principe.png":"https://p0.ssl.qhimg.com/t11b673bcd65ed5322e52b33883.png","./public/d3svg1/flags/saudi_arabia.png":"https://p4.ssl.qhimg.com/t11b673bcd65ef983618f3dad1d.png","./public/d3svg1/flags/scotland.png":"https://p2.ssl.qhimg.com/t11b673bcd632d8efbdc309befc.png","./public/d3svg1/flags/senegal.png":"https://p5.ssl.qhimg.com/t11b673bcd6ed2aa2fac6a327f1.png","./public/d3svg1/flags/serbia.png":"https://p1.ssl.qhimg.com/t11b673bcd6f87c8ab028617f5b.png","./public/d3svg1/flags/seychelles.png":"https://p1.ssl.qhimg.com/t11b673bcd621e9aa4597a2c5d2.png","./public/d3svg1/flags/sierra_leone.png":"https://p5.ssl.qhimg.com/t11b673bcd60afc938f22552079.png","./public/d3svg1/flags/singapore.png":"https://p1.ssl.qhimg.com/t11b673bcd640999577dd24227e.png","./public/d3svg1/flags/sint_maarten.png":"https://p4.ssl.qhimg.com/t11b673bcd615986c65ec59b44c.png","./public/d3svg1/flags/slovakia.png":"https://p0.ssl.qhimg.com/t11b673bcd61e49878fdeda9e6c.png","./public/d3svg1/flags/slovenia.png":"https://p3.ssl.qhimg.com/t11b673bcd6ef90cb0d44c02757.png","./public/d3svg1/flags/solomon_islands.png":"https://p1.ssl.qhimg.com/t11b673bcd6066406f4b1266571.png","./public/d3svg1/flags/somalia.png":"https://p5.ssl.qhimg.com/t11b673bcd63c470e6e15a1a963.png","./public/d3svg1/flags/south_africa.png":"https://p2.ssl.qhimg.com/t11b673bcd6aaa44743ad66ca71.png","./public/d3svg1/flags/south_korea.png":"https://p2.ssl.qhimg.com/t11b673bcd6207c734bc93ffca7.png","./public/d3svg1/flags/south_sudan.png":"https://p1.ssl.qhimg.com/t11b673bcd61c283fad96263e62.png","./public/d3svg1/flags/spain.png":"https://p5.ssl.qhimg.com/t11b673bcd68316992b1c22281d.png","./public/d3svg1/flags/sri_lanka.png":"https://p4.ssl.qhimg.com/t11b673bcd6fb7bcacef951feed.png","./public/d3svg1/flags/sudan.png":"https://p1.ssl.qhimg.com/t11b673bcd6f129ac747600e082.png","./public/d3svg1/flags/suriname.png":"https://p5.ssl.qhimg.com/t11b673bcd67a12641513ab7d34.png","./public/d3svg1/flags/swaziland.png":"https://p0.ssl.qhimg.com/t11b673bcd6936216cc45eeff7b.png","./public/d3svg1/flags/sweden.png":"https://p0.ssl.qhimg.com/t11b673bcd666958e31ac92957e.png","./public/d3svg1/flags/switzeland.png":"https://p2.ssl.qhimg.com/t11b673bcd6122ada53eb1b807e.png","./public/d3svg1/flags/syria.png":"https://p1.ssl.qhimg.com/t11b673bcd6953c86d18052c932.png","./public/d3svg1/flags/taiwan.png":"https://p5.ssl.qhimg.com/t11b673bcd6304bcd201fd23df6.png","./public/d3svg1/flags/tajikistan.png":"https://p4.ssl.qhimg.com/t11b673bcd698c5c84a62b12388.png","./public/d3svg1/flags/tanzania.png":"https://p3.ssl.qhimg.com/t11b673bcd6d537b34d56658c98.png","./public/d3svg1/flags/thailand.png":"https://p1.ssl.qhimg.com/t11b673bcd60050f650fff9bd66.png","./public/d3svg1/flags/the_cook_islands.png":"https://p4.ssl.qhimg.com/t11b673bcd61292a8f19147f865.png","./public/d3svg1/flags/the_faroe_islands.png":"https://p0.ssl.qhimg.com/t11b673bcd6cda6e9ec5b5bc8f6.png","./public/d3svg1/flags/the_turks_and_caicos_islands.png":"https://p2.ssl.qhimg.com/t11b673bcd614fca92287df5c95.png","./public/d3svg1/flags/togo.png":"https://p5.ssl.qhimg.com/t11b673bcd682ba165ebbbca70a.png","./public/d3svg1/flags/tokelau.png":"https://p1.ssl.qhimg.com/t11b673bcd67e4bae219b59d6e6.png","./public/d3svg1/flags/tonga.png":"https://p0.ssl.qhimg.com/t11b673bcd6998933793d4d8fbc.png","./public/d3svg1/flags/transnistria.png":"https://p0.ssl.qhimg.com/t11b673bcd62dc7b17601baa895.png","./public/d3svg1/flags/trinidad_and_tobago.png":"https://p3.ssl.qhimg.com/t11b673bcd67371391609bf78d7.png","./public/d3svg1/flags/tunisia.png":"https://p3.ssl.qhimg.com/t11b673bcd624cb2d7bf0797501.png","./public/d3svg1/flags/turkey.png":"https://p5.ssl.qhimg.com/t11b673bcd6b51b544b5e683846.png","./public/d3svg1/flags/turkmenistan.png":"https://p2.ssl.qhimg.com/t11b673bcd680705dbb5d2590e1.png","./public/d3svg1/flags/tuvalu.png":"https://p5.ssl.qhimg.com/t11b673bcd6eb80c5b0e6b4cf9d.png","./public/d3svg1/flags/uganda.png":"https://p2.ssl.qhimg.com/t11b673bcd6a42822abbcef11ef.png","./public/d3svg1/flags/ukraine.png":"https://p5.ssl.qhimg.com/t11b673bcd6a18c73c5e309e867.png","./public/d3svg1/flags/united_arab_emirates_uae.png":"https://p0.ssl.qhimg.com/t11b673bcd6d6ac620490436646.png","./public/d3svg1/flags/united_kingdom.png":"https://p0.ssl.qhimg.com/t11b673bcd6b2dab8383fd03d16.png","./public/d3svg1/flags/united_states.png":"https://p4.ssl.qhimg.com/t11b673bcd6ac4aab9abb62470d.png","./public/d3svg1/flags/united_states_virgin_islands.png":"https://p0.ssl.qhimg.com/t11b673bcd60e706830471605ae.png","./public/d3svg1/flags/uruguay.png":"https://p1.ssl.qhimg.com/t11b673bcd673c8556316268f27.png","./public/d3svg1/flags/uzbekistan.png":"https://p5.ssl.qhimg.com/t11b673bcd6692a87d0deaa0cd4.png","./public/d3svg1/flags/vanuatu.png":"https://p3.ssl.qhimg.com/t11b673bcd6dfe59d18beb502ed.png","./public/d3svg1/flags/vatican.png":"https://p2.ssl.qhimg.com/t11b673bcd65204ea5b7e60deae.png","./public/d3svg1/flags/venezuela.png":"https://p3.ssl.qhimg.com/t11b673bcd6d6d7092d46e0d7c3.png","./public/d3svg1/flags/vietnam.png":"https://p3.ssl.qhimg.com/t11b673bcd668708c0e4043f8a0.png","./public/d3svg1/flags/wales.png":"https://p2.ssl.qhimg.com/t11b673bcd60c0cbfacd5576ddd.png","./public/d3svg1/flags/wallis_and_futuna.png":"https://p5.ssl.qhimg.com/t11b673bcd68351271fd687e442.png","./public/d3svg1/flags/yemen.png":"https://p2.ssl.qhimg.com/t11b673bcd6b506ff3ca76f158a.png","./public/d3svg1/flags/zambia.png":"https://p4.ssl.qhimg.com/t11b673bcd614f327cbfbe2c728.png","./public/d3svg1/flags/zimbabwe.png":"https://p0.ssl.qhimg.com/t11b673bcd6704ad2c0a3c95fd1.png","./public/d3svg1/fold-left.svg":"https://s5.qhres2.com/static/64c3e01294203a68.svg","./public/d3svg1/fold-right.svg":"https://s9.qhres2.com/static/3538c207c3fe91e2.svg","./public/d3svg1/group.svg":"https://s5.qhres2.com/static/5f3286f6d9f3faab.svg","./public/d3svg1/host.svg":"https://s8.qhres2.com/static/1c0a4b2bfee6e157.svg","./public/d3svg1/icon_ thumbprint.svg":"https://s9.qhres2.com/static/4604a52bd2797688.svg","./public/d3svg1/icon_cert_md5.svg":"https://s8.qhres2.com/static/50f33f15365a638a.svg","./public/d3svg1/icon_email.svg":"https://s8.qhres2.com/static/6ca54d23816f6bab.svg","./public/d3svg1/icon_family.svg":"https://s5.qhres2.com/static/df16a4bb42ef04f8.svg","./public/d3svg1/icon_files.svg":"https://s6.qhres2.com/static/7a779b0e4bdb8823.svg","./public/d3svg1/icon_host.svg":"https://s9.qhres2.com/static/8d1207bc7ff6821e.svg","./public/d3svg1/icon_ip.svg":"https://s9.qhres2.com/static/2dd1f32c1f2925b6.svg","./public/d3svg1/icon_issuer.svg":"https://s9.qhres2.com/static/64f9af8918b80390.svg","./public/d3svg1/icon_mac.svg":"https://s6.qhres2.com/static/afa1897aa3157b79.svg","./public/d3svg1/icon_mid.svg":"https://s6.qhres2.com/static/f8b70764e209d1b0.svg","./public/d3svg1/icon_org.svg":"https://s8.qhres2.com/static/8a788cf726c4be74.svg","./public/d3svg1/icon_report.svg":"https://s8.qhres2.com/static/307389647f167f5a.svg","./public/d3svg1/icon_search.svg":"https://s7.qhres2.com/static/3ebec436a55a4e02.svg","./public/d3svg1/icon_subject.svg":"https://s5.qhres2.com/static/dc50dc3eb65359c6.svg","./public/d3svg1/icon_vul.svg":"https://s7.qhres2.com/static/6178e21d4df882e5.svg","./public/d3svg1/innerip.svg":"https://s9.qhres2.com/static/b2ba46a37e51ac7c.svg","./public/d3svg1/internet.svg":"https://s5.qhres2.com/static/329ba4f0d5d5a38e.svg","./public/d3svg1/intranet.svg":"https://s8.qhres2.com/static/d57dc307ea030e67.svg","./public/d3svg1/ioc.svg":"https://s6.qhres2.com/static/c3c9db7bbc3e5bf5.svg","./public/d3svg1/ip copy.svg":"https://s5.qhres2.com/static/f30c7317dd483dbd.svg","./public/d3svg1/ip.svg":"https://s8.qhres2.com/static/e9aa6d49edb6c705.svg","./public/d3svg1/ips.svg":"https://s9.qhres2.com/static/9c1cb66938613669.svg","./public/d3svg1/jiantou.svg":"https://s9.qhres2.com/static/2782d2c0cf2735b3.svg","./public/d3svg1/jiantou_active.svg":"https://s7.qhres2.com/static/66b48ee2c7ac8fa1.svg","./public/d3svg1/loop.svg":"https://s8.qhres2.com/static/f8fae0b477ae23f8.svg","./public/d3svg1/mac.svg":"https://s7.qhres2.com/static/9cf115d3f6ac3d2c.svg","./public/d3svg1/mail.svg":"https://s9.qhres2.com/static/998d1f1f7829350c.svg","./public/d3svg1/md5.svg":"https://s9.qhres2.com/static/e9c970724261e663.svg","./public/d3svg1/md51.svg":"https://s7.qhres2.com/static/57466b9085fcc2ea.svg","./public/d3svg1/md52.svg":"https://s5.qhres2.com/static/4bdced7a2e104377.svg","./public/d3svg1/md53.svg":"https://s7.qhres2.com/static/273f73f17afdcac5.svg","./public/d3svg1/md54.svg":"https://s6.qhres2.com/static/51c845288534d905.svg","./public/d3svg1/mid.svg":"https://s9.qhres2.com/static/21d3e21e0ca0faba.svg","./public/d3svg1/name.svg":"https://s5.qhres2.com/static/021ce05cc89c45ac.svg","./public/d3svg1/net.svg":"https://s5.qhres2.com/static/35b12ea3c8a5a69c.svg","./public/d3svg1/node.svg":"https://s9.qhres2.com/static/169d2bd7d9c9aa0a.svg","./public/d3svg1/node_type.svg":"https://s9.qhres2.com/static/97c1c618f9e222cf.svg","./public/d3svg1/org.svg":"https://s9.qhres2.com/static/76b597c211ea4d94.svg","./public/d3svg1/organization.svg":"https://s9.qhres2.com/static/e08c31cd00a3b926.svg","./public/d3svg1/outerip.svg":"https://s8.qhres2.com/static/7ff10a0d571809ad.svg","./public/d3svg1/proc.svg":"https://s5.qhres2.com/static/8abbf12fa662b659.svg","./public/d3svg1/proc_md5.svg":"https://s8.qhres2.com/static/e86f71a748180b4e.svg","./public/d3svg1/relate_ip.svg":"https://s6.qhres2.com/static/13610168689342fd.svg","./public/d3svg1/report.svg":"https://s7.qhres2.com/static/ecf1a790525d5848.svg","./public/d3svg1/router_mac.svg":"https://s6.qhres2.com/static/ccde05c4a61f0356.svg","./public/d3svg1/star.svg":"https://s8.qhres2.com/static/9dece9fb0beb1f0e.svg","./public/d3svg1/sys_icon.svg":"https://s8.qhres2.com/static/1df923965bc3ddc4.svg","./public/d3svg1/target_country.svg":"https://s8.qhres2.com/static/b9262dc9c2f7e0f1.svg","./public/d3svg1/target_industry.svg":"https://s9.qhres2.com/static/571b52805d048d92.svg","./public/d3svg1/thumbprint_md5.svg":"https://s5.qhres2.com/static/02dfbd0ae2c0e573.svg","./public/d3svg1/ttp.svg":"https://s5.qhres2.com/static/b95adbab7c0641d1.svg","./public/d3svg1/url.svg":"https://s8.qhres2.com/static/523349cc292da6b5.svg","./public/d3svg1/user_name.svg":"https://s8.qhres2.com/static/f701f463bc1e30c0.svg","./public/d3svg1/vendor.svg":"https://s8.qhres2.com/static/64d55f39fd1c821f.svg","./public/d3svg1/vul.svg":"https://s6.qhres2.com/static/d45444d8a175ead3.svg"};function Jr(e){try{var t,n=new RegExp("(^| )"+e+"=([^;]*)(;|$)");return(t=document.cookie.match(n))?unescape(t[2]):""}catch(r){return""}}function Oh(e,t,n){var r=(n=n||{}).expires;typeof r=="number"&&(r=new Date).setTime(r.getTime()+n.expires);try{document.cookie=e+"="+escape(t)+(r?";expires="+r.toGMTString():"")+(n.path?";path="+n.path:"")+(n.domain?"; domain="+n.domain:"")}catch(s){}}function d2(e){return e!=null&&e.constructor!=null?Object.prototype.toString.call(e).slice(8,-1):""}function u2(e){return d2(e)=="Array"}function Ta(e){return d2(e)=="Function"}function Sr(e){return e!==null&&typeof e=="object"}function Er(e,t,n){for(var r in t)(n||!e[r]&&!(r in e))&&(e[r]=t[r]);return e}const f2={"360se-ua":"360se","360ee":"360ee",edge:"edg",edge:"edga",edge:"edgios",TT:"tencenttraveler",Maxthon:"maxthon",GreenBrowser:"greenbrowser",Sogou:"se 2.x",TheWorld:"theworld"},hD=["Baiduspider","Googlebot","360Spider","Sosospider","Yahoo! Slurp China","Yahoo!","YoudaoBot","YodaoBot","Sogou web spider","Sogou inst spider","Sogou spider2","Sogou blog","Sogou News Spider","Sogou Orion spider","msnbot","msnbot-media","bingbot","bingpreview","YisouSpider","ia_archiver","EasouSpider","JikeSpider","Bytespider"];var xe=new class{constructor(){this._activeTime="",this.appkey="",this.trackId="",this.mid="",this.m2="",this.asc="",this.asc2="",this.debug=!1,this.heartbeatTimers={},this.config={wpoUrl:null,trackUrl:null,clickUrl:null,heartbeatUrl:null,clickHeatMapUrl:null,areaIds:null}}log(){if(!this.debug)return;const[e,...t]=arguments,n="[RadarMonitor] "+e;try{return console.log.apply(console,[n,...t])}catch(r){}}userAgentIsExitsSpiders(){const e=this.getUserAgent().toLowerCase();var t=!1;return hD.map(n=>{e.indexOf(n.toLowerCase())>=0&&(t=!0)}),t}setUtilActiveTime(e){this._activeTime=e}setHeartBeatStartTime(e,t){Er(this.getHeartBeatById(e),{startTime:t},!0)}setHeartBeatTimer(e,t){Er(this.getHeartBeatById(e),{timer:t},!0)}getHeartBeatStartTime(e){return this.getHeartBeatById(e).startTime}getHeartBeatTimer(e){return this.getHeartBeatById(e).timer}getHeartBeatById(e){return Sr(this.heartbeatTimers[e])||(this.heartbeatTimers[e]={}),this.heartbeatTimers[e]}deleteHeartBeat(e){delete this.heartbeatTimers[e]}setUtilConf(e,t){var n={};Sr(e)?n=e:n[e]=t,this.config=Er(this.config,n,!0)}getUtilConf(){return this.config}getColorDepth(){return window.screen.colorDepth+"-bit"}getLanguage(){return(navigator.language||navigator.browserLanguage).toLowerCase()}getUserAgent(){return navigator.userAgent}getScreenSize(){return window.screen.width+"x"+window.screen.height}getProject(){return this.appkey}setAppKey(e){/QH_[0-9]+_[0-9]*\#?[0-9]{1,}$/.test(e)?this.appkey=e:e&&this.log("当前写入的appkey: ",e," 格式异常,请前往雷达分析平台确认.")}getReferrer(){var e=document.referrer||"";return e.indexOf("pass")>-1||e.indexOf("pwd")>-1?"403":e}getBrowser(){var e=navigator.userAgent.toLowerCase(),t=!1;for(var n in f2)if(e.indexOf(f2[n])>-1)return n;try{+external.twGetVersion(external.twGetSecurityID(window)).replace(/\./g,"")>1013&&(t=!0)}catch(s){}if(t)return"360se-noua";var r=e.match(/(msie|chrome|safari|firefox|opera|trident)/);return(r=r?r[0]:"")=="msie"?r=e.match(/msie[^;]+/)+"":r=="trident"&&e.replace(/trident\/[0-9].*rv[ :]([0-9.]+)/gi,function(s,a){r="msie "+a}),r}getReferrerKeyWord(){const e=document.referrer;var t={q:"",eqid:""};if(!e)return t;for(var n=new URL(e).search.substring(1).split("&"),r={},s=0;s<n.length;s++){var a=n[s].split("=");r[a[0]]=a[1]}return e.indexOf("baidu.com")>-1?(t.q=r.wd,t.eqid=r.eqid):(e.indexOf("so.com")>-1||e.indexOf("sm.cn")>-1)&&(t.q=r.q),t.q||(t.q=""),t}getLocation(e){e||(e="");try{e=location.href}catch(t){(e=document.createElement("a")).href="",e=e.href}return e=/\.(s?htm|php)/.test(e)?e:e.replace(/\/$/,"")+"/"}hash(e){for(var t=0,n=0,r=e.length-1;r>=0;r--){var s=parseInt(e.charCodeAt(r),10);(n=266338304&(t=(t<<6&268435455)+s+(s<<14)))!=0&&(t^=n>>21)}return t}guid(){for(var e=[navigator.appName,navigator.version,navigator.language||navigator.browserLanguage,navigator.platform,navigator.userAgent,window.screen.width,"x",window.screen.height,window.screen.colorDepth,document.referrer].join(""),t=e.length,n=window.history.length;n;)e+=n--^t++;return 2147483647*(Math.round(2147483647*Math.random())^this.hash(e))}isLocal(){try{var e=location.protocol.toLowerCase();if(e=="http:"||e=="https:")return!1}catch(t){}return!0}getSid(){var e="__DC_sid",t=Jr(e);return!t&&(t=Jr("__sid"))&&t.split(".").length!==4&&(t=null),t||(t=[this.hash(this.isLocal()?"":document.domain),this.guid(),+new Date+Math.random()].join(".")),Oh(e,t,{expires:60*(this._activeTime||30)*1e3,path:"/"}),t}setUtilTrackId(e){this.trackId=e}getGid(e=!1){var t="__DC_gid",n=Jr(t);if(!n&&(n=Jr("__gid"))&&n.split(".").length!==5&&(n=null),n||(n=function(s){try{return JSON.parse(window.localStorage.getItem(s))}catch(a){return[]}}(t)),n)(n=n.split("."))[3]=new Date().getTime(),e&&(n[4]=(parseInt(n[4])||0)+1),n=n.join(".");else{var r=e?1:0;n=this.trackId?[this.trackId,1,1,new Date().getTime(),r].join("."):[this.hash(this.isLocal()?"":document.domain),Math.floor(1e9*Math.random()),new Date().getTime(),new Date().getTime(),r].join(".")}return function(s,a){try{window.localStorage.setItem(s,JSON.stringify(a))}catch(l){}}(t,n),Oh(t,n,{expires:63072e6,path:"/"}),n}getBrowserID(){return Ne(this,null,function*(){return new Promise((e,t)=>Ne(this,null,function*(){const n=this.getMid(),r=this.getASC(),[s,a]=yield Promise.all([this.getM2(),this.getASC2()]);return e({mid:n,m2:s,asc:r,asc2:a})}))})}getMid(){var e=this.mid;try{e=external.GetMID(external.GetSID(window)),this._setMid(e)}catch(t){}try{e.length!==32&&(e=window.wdextcmd.GetMid(),this._setMid(e))}catch(t){}return e}_setMid(e){this.mid=e}getM2(){return new Promise((e,t)=>{try{if(this.m2.length===0){const n=(r,s)=>{this.setM2(s),e(s)};external.AppCmd(external.GetSID(window),"","GetMID2","","",n)}}catch(n){}setTimeout(()=>{var n=this.m2;if(n===void 0)try{n=window.wdextcmd.GetMidV2(),this.setM2(n),e(n)}catch(r){}e(n)},500)})}setM2(e){this.m2=e}getASC(){var e=this.asc;try{e=external.GetASC(external.GetSID(window)),this.setASC(e)}catch(t){}try{e.length===0&&(e=window.wdextcmd.GetASC(),this.setASC(e))}catch(t){}try{e.length===0&&(e=Jr("__asc"),this.setASC(e))}catch(t){}return e}setASC(e){this.asc=e}getASC2(){return new Promise((e,t)=>{try{if(this.asc2.length===0){const n=(r,s)=>{this.setASC2(s),e(s)};external.AppCmd(external.GetSID(window),"","GetASC2","","",n)}}catch(n){}setTimeout(()=>{var n=this.asc2;try{n===void 0&&(n=window.wdextcmd.GetASC2(),this.setASC2(n))}catch(r){}try{n.length===0&&(n=Jr("__asc2"),this.setASC2(n))}catch(r){}e(n)},500)})}setASC2(e){this.asc2=e}getCount(){var e="__DC_monitor_count",t=Jr(e);return t||(t=Jr("monitor_count")),Oh(e,t=(parseInt(t)||0)+1,{expires:864e5,path:"/"}),t}getFlashVer(){var e=-1;if(navigator.plugins&&navigator.mimeTypes.length){var t=navigator.plugins["Shockwave Flash"];t&&t.description&&(e=t.description.replace(/([a-zA-Z]|\s)+/,"").replace(/(\s)+r/,".")+".0")}else if(window.ActiveXObject&&!window.opera)try{var n=new ActiveXObject("ShockwaveFlash.ShockwaveFlash");n&&(e=n.GetVariable("$version").replace(/WIN/g,"").replace(/,/g,"."))}catch(r){}return e=parseInt(e,10)}getContainerId(e){var t,n;for(this.getUtilConf().areaIds&&(t=new RegExp("^("+this.getUtilConf().areaIds.join("|")+")$","ig"));e;){if(e.attributes&&("bk"in e.attributes||"data-bk"in e.attributes)){if(n=e.getAttribute("bk")||e.getAttribute("data-bk"))return(n="bk:"+n).substr(0,100);if(e.id)return(n=e.getAttribute("data-desc")||e.id).substr(0,100)}else if(t&&e.id&&t.test(e.id))return(n=e.getAttribute("data-desc")||e.id).substr(0,100);e=e.parentNode}return""}trim(e){return e.replace(/^[\s\xa0\u3000]+|[\u3000\xa0\s]+$/g,"")}getText(e){var t="";return t=e.tagName.toLowerCase()=="input"?e.getAttribute("text")||e.getAttribute("data-text")||e.value||e.title||"":e.getAttribute("text")||e.getAttribute("data-text")||e.innerText||e.textContent||e.title||"",this.trim(t).substr(0,100)}getHref(e){try{return e.getAttribute("data-href")||e.href||""}catch(t){return""}}};function Ec(e,t,n){e.addEventListener?e&&e.addEventListener(t,n,!1):e&&e.attachEvent("on"+t,n)}function Ih(e,t,n){for(n=n||5,t=t.toUpperCase();e&&n-- >0;){if(e.tagName===t)return e;e=e.parentNode}return null}var Aa=[];function h2(e){Ta(e)&&Aa.push(e)}function pD(e){var t,n;if(u2(e))for(n=e.length,t=0;t<n;t++)h2(e[t]);else h2(e);(function(r){Aa.splice(Aa.indexOf(r),1)})(e),e=null}function p2(e){if(!("target"in e)){var t=e.srcElement||e.target;t&&t.nodeType==3&&(t=t.parentNode),e.target=t}return e}let gD=class{constructor(){this.baseExtend={},this.title="",this.placeholder=[]}getBase(t=!1){var n={p:xe.getProject(),u:xe.getLocation(),gid:xe.getGid(t),sid:xe.getSid(),title:this.getTitle()},r=xe.getReferrerKeyWord();return r&&(n.q=r.q,n.eqid=r.eqid),n}getBaseTrack(t){var n=xe.getSid()==xe.getSid()?1:0,r={b:xe.getBrowser(),c:xe.getCount(),r:xe.getReferrer(),fl:xe.getFlashVer(),sd:xe.getColorDepth(),sr:xe.getScreenSize(),ul:xe.getLanguage(),ua:xe.getUserAgent(),ce:n};if(t)try{t=t.split(",");for(var s=[],a=0,l=t.length;a<l;a++){var c=Jr(t[a]);s.push(t[a]+"="+encodeURIComponent(c))}r.uc=encodeURIComponent(s.join("&"))}catch(u){}return r}getClick(t){var n,r,s=(t=p2(t||event)).target,a=s.tagName,l=xe.getContainerId(s);if(l=="bk:noupload")return!1;if(!s.type||s.type!="submit"&&s.type!="button")return a=="AREA"?{f:xe.getHref(s),c:"area:"+s.parentNode.name,cId:l}:(a=="IMG"&&(n=s),!!(s=Ih(s,"A"))&&(r=xe.getText(s),{f:xe.getHref(s),c:r||(n?n.src.match(/[^\/]+$/):""),cId:l}));var c=Ih(s,"FORM"),u={};if(c){var d=c.id||"",f=s.id;if(u={f:c.action,c:"form:"+(c.name||d),cId:l},!(d!="search-form"&&d!="searchForm"||f!="searchBtn"&&f!="search-btn")){var p=$("kw")||$("search-kw")||$("kw1");u.w=p?p.value:""}}else u={f:xe.getHref(s),c:xe.getText(s),cId:l};return u}getKeydown(t){if((t=p2(t||event)).keyCode!=13)return!1;var n=t.target,r=n.tagName,s=xe.getContainerId(n);if(r=="INPUT"){var a=Ih(n,"FORM");if(a){var l=a.id||"",c=n.id,u={f:a.action,c:"form:"+(a.name||l),cId:s};return c!="kw"&&c!="search-kw"&&c!="kw1"||(u.w=n.value),u}}return!1}getBaseExtend(t){return t&&(this.baseExtend=t),this.baseExtend}getTitle(){return this.title||(this.title=document.title),this.title}setBaseTitle(t){this.title=t}},mD=class{constructor(t){this.master=t,this.lastLocation=xe.getLocation(),this.isStarted=!1}start(){if(!this.isStarted){var t="pushState"in window.history?"popstate":"hashchange",n=this;this.isStarted=!0,this.master.util.log("autoTrackPageChange"),this.master.util.log("hashEvent:",t),Ec(window,t,a=>{this.master.util.log(t+": "+document.location+", state: "+JSON.stringify(a.state)),n.lastLocation!==window.location.href&&(n.lastLocation=window.location.href,n.master.autoTrackEvent())});var r=window.history.pushState;Ta(history.pushState)&&r&&(history.pushState=function(a){r.apply(window.history,arguments),n.master.util.log("history.pushState",a),n.lastLocation=window.location.href,n.master.autoTrackEvent()});var s=window.history.replaceState;Ta(history.replaceState)&&s&&(history.replaceState=function(a){s.apply(window.history,arguments),n.master.util.log("history.replaceState",a),n.lastLocation=window.location.href,n.master.autoTrackEvent()})}}};var vD="2.4.0";const Xr=new class{constructor(){this.version=vD,this.data=new gD,this.util=xe,this.heatmap_enable=!1,this.disable_autoPV=!1,this.manualPV_enable=!1,this.autopv=new mD(this)}setAscAndAsc2(e,t){if(this.data.placeholder.length>0)return;const n=e||"",r=t||"";this.data.placeholder.push({asc:n},{asc2:r})}setThirdProps(e,t){if(!e||!t)return;const n={[e]:t};this.data.placeholder.length==2||this.setAscAndAsc2(),this.data.placeholder.push(n)}setFourthProps(e,t){e&&t&&(this.data.placeholder.length==3?this.data.placeholder.push({[e]:t}):xe.log("确认必须先调用setAscAndAsc2和setThirdProps接口"))}getLibVersion(){return this.version}setTitle(e){return this.data.setBaseTitle(e),this}setTrackId(e){return xe.setUtilTrackId(e.replace(/\./g,"")),this}getBrowserID(e){return Ne(this,null,function*(){return new Promise((t,n)=>Ne(this,null,function*(){if(e){if(this.data.placeholder.length<=0){const{mid:r,m2:s,asc:a,asc2:l}=yield xe.getBrowserID();this.data.placeholder=[{mid:r},{m2:s},{asc:a},{asc2:l}]}t(function(r){for(var s=[],a=0;a<r.length;a++)s.push(encodeURIComponent(Object.keys(r[a]))+"="+encodeURIComponent(Object.values(r[a])));return s.join("&")}(this.data.placeholder)+"&")}else n("")}))})}sendLog(e){window.__radar_monitor_imgs={};var t="log_"+ +new Date,n=window.__radar_monitor_imgs[t]=new Image;n.onload=n.onerror=()=>{window.__radar_monitor_imgs&&window.__radar_monitor_imgs[t]&&(window.__radar_monitor_imgs[t]=null,delete window.__radar_monitor_imgs[t])},n.src=e}buildLog(e,t=""){return Ne(this,null,function*(){var n="";if(e===!1)return;const r=t===this.getConf().trackUrl;e=e||{};var s,a=Er(this.data.getBase(r),this.data.getBaseExtend(),!0);e=Er(a,e,!0);try{s=yield this.getBrowserID(r)}catch(l){s=""}s+=function(l){var c=[];for(var u in l)l[u]!=null&&c.push(encodeURIComponent(u)+"="+encodeURIComponent(l[u]));return c.join("&")}(e),s+="&t="+ +new Date,(t=t.indexOf("?")>-1?t+"&"+s:t+"?"+s)!=n&&(n=t,setTimeout(()=>{n=""},100),this.sendLog(t))})}log(e,t){t=t||"click";const n=this.getConf()[t+"Url"];n?xe.userAgentIsExitsSpiders()||this.buildLog(function(r,s){var a,l=Aa.length,c=s;for(a=0;a<l;a++)try{c=Er(c,Aa[a].beforeLog(r,s))}catch(u){}return c}(t,e),n):xe.log("Error : the "+t+" url does not exist!")}setConf(e,t){return xe.setUtilConf(e,t),this}getConf(){return xe.getUtilConf()}setUrl(e){if(e)return xe.getLocation(e)}extendBase(e){if(e&&Sr(e)){var t=Er(this.data.getBaseExtend(),e,!0);this.data.getBaseExtend(t)}}setProject(e,t,n){return xe.setAppKey(e),this.extendBase(t),this.init(n),this}setDebug(e=!0,t,n,r){return xe.debug=e,e&&(xe.log("当前已开启debug模式,可能会输出log,发布前请关闭!!!"),xe.log("当前配置测试appkey:",t),xe.setAppKey(t),this.extendBase(n),this.init(r)),this}setTrackId(e){return xe.setUtilTrackId(e.replace(/\./g,"")),this}setId(e){for(var t=[];e=arguments[i++];)u2(e)?t=t.concat(e):t.push(e);return this.setConf("areaIds",t),this}init(e){var{trackForInit:t=!0}=e||{},n=location.protocol.toLowerCase()==="https:"?"https:":"http:";this.setConf({trackUrl:n+"//s.360.cn/qdas/s.htm",clickUrl:n+"//s.360.cn/qdas/c.htm",clickHeatMapUrl:n+"//s.360.cn/qdas/t.htm",wpoUrl:n+"//s.360.cn/qdas/p.htm",heartbeatUrl:n+"//s.360.cn/qdas/h.htm"}),t&&this.log(this.data.getBaseTrack(),"track")}setDisableAutoPV(e=!0){return this.disable_autoPV=e,this}setManualPVEnable(e=!0){return this.manualPV_enable=e,this}autoTrackEvent(){if(!this.disable_autoPV){var e=this.data.getBaseTrack();this.log(e,"track")}}getAutoTrack(){return this.autopv.start(),this}getTrack(e,t,n){var{enableMenualOnce:r=!1}=e||{};if(!r&&!this.manualPV_enable)return this;var s=this.data.getBaseTrack(n);return Sr(t)&&(s=Er(s,t,!0)),this.log(s,"track"),this}getClickHeatmap(e,t){if(!this.heatmap_enable){this.heatmap_enable=!0;var n=this,r=[];e=e||10,t=t||5;var s=0,a=l=>{if(clearTimeout(s),l||r.length>e)return r.length?(n.log({pos:r.join(","),sr:xe.getScreenSize()},"clickHeatMap"),void(r=[])):void 0;s=setTimeout(()=>{a(!0)},60*t*1e3)};return Ec(document,"mousedown",l=>{var c=l.pageX+"."+l.pageY;r.push(c),a()}),this}}getClickAndKeydown(){return Ec(document,"mousedown",e=>{var t=this.data.getClick(e);this.log(t,"click")}),Ec(document,"keydown",e=>{var t=this.data.getKeydown(e);this.log(t,"click")}),this}beginHeartBeat(e,t,n){var r={};r.id=e,Sr(t)&&(r=Er(r,t,!1)),(n=isNaN(n)?10:n)>60?n=60:n<5&&(n=5);var s=this;xe.setHeartBeatStartTime(e,Date.parse(new Date));var a=l=>{r.steptime=l,s.steptime=l,s.log(r,"heartbeat"),clearTimeout(xe.getHeartBeatTimer(e)),xe.setHeartBeatTimer(e,setTimeout(()=>{var c=(Date.parse(new Date)-xe.getHeartBeatStartTime(e))/1e3;a(c)},1e3*n))};a(0)}endHeartBeat(e,t){var n=xe.getHeartBeatStartTime(e);if(n!=null){var r={};r.id=e,Sr(t)&&(r=Er(r,t,!1)),clearTimeout(xe.getHeartBeatTimer(e));var s=(Date.parse(new Date)-n)/1e3;r.steptime=s,this.log(r,"heartbeat"),xe.deleteHeartBeat(e)}}setActiveTime(e){return xe.setUtilActiveTime(e),this}addPlugin(e){return pD(e)}use(e,t){return typeof(n=e)=="string"||n instanceof String?Sr(window.RADAR_MONITOR_WEBJSSDKPLUGIN)&&Sr(window.RADAR_MONITOR_WEBJSSDKPLUGIN[e])&&Ta(window.RADAR_MONITOR_WEBJSSDKPLUGIN[e].init)?(window.RADAR_MONITOR_WEBJSSDKPLUGIN[e].init(Xr,t),window.RADAR_MONITOR_WEBJSSDKPLUGIN[e]):Sr(Xr.modules)&&Sr(Xr.modules[e])&&Ta(Xr.modules[e].init)?(Xr.modules[e].init(Xr,t),Xr.modules[e]):void xe.log(e+"没有获取到,请查阅文档,调整"+e+"的引入顺序!"):(xe.log("use插件名称必须是字符串!"),!1);var n}};function yD(e){if(!e.ok)throw new Error(e.status+" "+e.statusText);return e.text()}function g2(e,t){return fetch(e,t).then(yD)}const bD=(e,t)=>{const n=document.createElement("a");n.download=t,n.style.display="none";const r=new window.Blob([e]);n.href=window.URL.createObjectURL(r),document.body.appendChild(n),n.click(),document.body.removeChild(n)},xc=(e,t)=>Ne(this,null,function*(){let n;return yield xr(e).then(r=>{const s=document.createElement("canvas");s.width=r.width,s.height=r.height,s.getContext("2d").drawImage(r,0,0,r.width,r.height),n=s.toDataURL("image/png")}),n});function xr(e){return Ne(this,null,function*(){return new Promise((t,n)=>{const r=new Image;r.crossOrigin="anonymous",r.onload=()=>{t(r)},r.onerror=s=>{n(s)},r.src=e})})}function Bh(e){if(typeof e=="number"||e===!0)return!0;var t=e===!1||e===null||e===void 0||Object.keys(e).length===0||/^\s*$/gim.test(e.toString());return!t}function es(){var e=/macintosh|mac os x/i.test(navigator.userAgent);return e}function Qr(e,t){var a;["label","textProp","detail","collect","fx","fy"].map(l=>{e[l]=e[l]?e[l]:null}),e.show=e.show?e.show:!0,e.type&&e.type!=="nodeType"&&(e.type=e.type.toLowerCase()),(["org","vul","email","family"].indexOf(e.type)>=0||e.startNode===!0)&&(e.textProp="name");const s={};if(e.type!=="nodeType"&&e.type!=="aggregation"&&((a=t[e.type])!=null&&a.length)){for(let l=0;l<t[e.type].length;l++){const c=t[e.type][l];s[c.name]=!1}e.getData=s}return e}function wD(e){return e&&e.replace(/[^\x09\x0A\x0D\x20-\xFF\x85\xA0-\uD7FF\uE000-\uFDCF\uFDE0-\uFFFD]/gm,"")}function vn(...e){localStorage.getItem("showSafeForceGraphLog")&&console.log(...e)}function qt(e){Xr.log(e,"click")}function Lh(e,t,n,r,s){const a=n-e,l=r-t,c=Math.sqrt(a*a+l*l),u=e+a/c*(c-s),d=t+l/c*(c-s);return{x:u||0,y:d||0}}function m2(e,t="#666",n="#fff"){if(!e)return e;const s=new DOMParser().parseFromString(e,"image/svg+xml"),a=s.querySelector("g");return a?(a.setAttribute("color",n),s.querySelectorAll("[stroke]").forEach(f=>{f.getAttribute("stroke")!=="none"&&f.setAttribute("stroke",t)}),s.querySelectorAll("[class]").forEach(f=>{f.getAttribute("class").split(" ").includes("no-stroke")&&f.setAttribute("stroke","none")}),s.querySelectorAll(".text-bg").forEach(f=>{f.getAttribute("fill")!=="none"&&f.setAttribute("fill",t)}),new XMLSerializer().serializeToString(s)):void 0}function _D(e){if(!e)return e;const r=new DOMParser().parseFromString(e,"image/svg+xml").querySelector("svg"),s=r.getAttribute("width"),a=r.getAttribute("height");return{width:parseInt(s),height:parseInt(a)}}function v2(e){return new Promise((t,n)=>{try{const r="data:image/svg+xml;base64,";e=e.replace(r,"");const s=atob(e);t(s)}catch(r){n(r)}})}function y2(e){const t="0123456789abcdefghijklmnopqrstuvwxyz",n=t.length;let r="";for(let s=0;s<e;s++)r+=t.charAt(Math.ceil(Math.random()*(n-1)));return r}function CD(e){return{}.VITE_SVG_TYPE==="base64"?v2(e):g2(e)}function Rh(e){let t={};return t=c2,t[e]}function ts(e){return Rh(`./public/d3svg1/${e}.svg`)}const Ph={};function SD(r){return Ne(this,arguments,function*({node:e,levelList:t,darkMode:n}){var c,u,d,f,p,g,v,b,w,_;let s=null;const a=(d=(u=(c=e.detail)==null?void 0:c.info)==null?void 0:u.basic)==null?void 0:d.flag,l=((g=(p=(f=e==null?void 0:e.detail)==null?void 0:f.info)==null?void 0:p.basic)==null?void 0:g.level)||"";if(e.detail&&((b=(v=e.detail)==null?void 0:v.info)!=null&&b.inner_img))try{s=e.detail.info.inner_img}catch(C){console.log("loadCompleted error",C)}else if(e.type==="nodeType"||e.type==="aggregation"){const C=e.icon||"node_type";s=ts(C)?ts(C):ts("node_type")}else if(a&&(e.type==="ip"||e.type==="internet"))s=Rh(`./public/d3svg1/flags/${a}.png`);else if((_=(w=e.detail)==null?void 0:w.info)!=null&&_.inner_country&&(e.type==="country"||e.type==="target_country")){const C=e.detail.info.inner_country;s=Rh(`./public/d3svg1/flags/${C}.png`)}else{const C=`${e.type||"node"}${l}${n}`;if(Ph[C])return s=Ph[C],s;const k=ts(e.type)?ts(e.type):ts("node"),S=yield CD(k),E=ao(l,t,n);s=m2(S,E,n?"#182628":"#fff"),s="data:image/svg+xml,"+encodeURIComponent(s),Ph[C]=s}return s})}function kc(e){return typeof e!="object"||e===null||!e?e:Array.isArray(e)?e.map(t=>kc(t)):Object.keys(e).reduce((t,n)=>(t[n.toLowerCase()]=kc(e[n]),t),{})}const Xoe="",Dh={inject:["levelList","getDarkMode"],props:{nodeInfo:{type:Object,default:()=>{}}},data(){return{imgUrl:"",strokeColor:""}},computed:{darkMode(){return this.getDarkMode()},isCountryFlag(){var r,s,a,l,c,u,d,f;const e=(a=(s=(r=this.nodeInfo)==null?void 0:r.detail)==null?void 0:s.info)==null?void 0:a.inner_country,t=(d=(u=(c=(l=this.nodeInfo)==null?void 0:l.detail)==null?void 0:c.info)==null?void 0:u.basic)==null?void 0:d.flag,n=(f=this.nodeInfo)==null?void 0:f.type;return t&&(n==="ip"||n==="internet")||e&&(n==="country"||n==="target_country")}},watch:{darkMode:{handler(){this.handleImgUrl()}},nodeInfo:{handler(){this.handleImgUrl()},deep:!0}},created(){this.handleImgUrl()},methods:{handleImgUrl(){var t,n,r,s;SD({node:this.nodeInfo,levelList:this.levelList,darkMode:this.darkMode}).then(a=>{this.imgUrl=a});const e=(s=(r=(n=(t=this.nodeInfo)==null?void 0:t.detail)==null?void 0:n.info)==null?void 0:r.basic)==null?void 0:s.level;this.strokeColor=ao(e,this.levelList,this.darkMode)}}},b2=()=>{o.useCssVars(e=>({"20587f86":e.strokeColor}))},w2=Dh.setup;Dh.setup=w2?(e,t)=>(b2(),w2(e,t)):b2;const ED={key:0,class:"flag-border"},xD=["src"],kD=["src"];function ND(e,t,n,r,s,a){return a.isCountryFlag?(o.openBlock(),o.createElementBlock("div",ED,[o.createElementVNode("img",{class:"node-img",src:s.imgUrl},null,8,xD)])):(o.openBlock(),o.createElementBlock("img",{key:1,class:"node-img",src:s.imgUrl},null,8,kD))}const Oa=_t(Dh,[["render",ND],["__scopeId","data-v-5fdfe48e"]]),kr={computed:{imgPath(){let e={};return e=c2,e}}},Re={},Mh=un.reactive({filterValues:""}),Fh={name:"fix_nodes",namec:"固定节点"},$h={name:"un_fix_nodes",namec:"解除固定"},TD={name:"show_names",namec:"显示名称"},AD={name:"un_show_names",namec:"隐藏名称"},OD={name:"un_show_label",namec:"隐藏备注"},ID={name:"show_label",namec:"显示备注"},_2={name:"hold_aggregation",namec:"单边子顶点聚合"},C2={name:"release_aggregation",namec:"聚合顶点释放"},BD={name:"copy",namec:"复制"},S2={name:"node_star",namec:"收藏"},E2={name:"un_node_star",namec:"取消收藏"},x2={name:"edit_label",namec:"修改备注"},zh={name:"delete_node",namec:"删除"},k2={name:"select_children",namec:"子顶点选择"},N2={name:"select_parents",namec:"父顶点选择"},LD={name:"add_con_node",namec:"添加关联节点"},RD={name:"expand_node",namec:"展开全部关系"};function Nc(e){var c;const t=[],n=[],r=[],s=["APT攻击","海莲花","Generic","Cometer","勒索软件","恶意下载链接","僵尸网络","后门软件","流氓推广","Ewind","alexa_top10k","Panda","Operation_2020_Model","Zenpak","Ewind","Boogr"],a=["APT-C-00","Trojan","木马"],l=e.length;for(let u=0;u<l;u++)s.includes((c=e[u])==null?void 0:c.name)?(e[u].typeLevel="danger",t.push(e[u])):e[u].name.toLowerCase().indexOf("cve")===0?(e[u].typeLevel="cve",n.push(e[u])):a.some(d=>e[u].name.indexOf(d)>=0)?(e[u].typeLevel="danger",t.push(e[u])):(e[u].typeLevel="other",r.push(e[u]));return[...t,...n,...r]}function Tc(e){if(!e)return[];const t=[void 0,"danger","warning","info","success",void 0],n=[],r=[];return e.forEach(s=>{let a,l,c,u,d,f;typeof s=="object"?(a=s.name||s.tag,l=s.desc,c=s.user||void 0,u=s.type>0?t[s.type]||t[s.type-10]:void 0,f=s.type>=10,d=s.source_name?s.source_name:""):(a=s,l=""),r.indexOf(a)<0&&(r.push(a),n.push({name:a,desc:l,user:c,type:u,disabled:f,source_name:d}))}),n}var T2={exports:{}};/*!
|
|
99
|
+
`}),n=`:root {${n}}`,r=`[data-theme="dark"] { ${r}}`,n+r+t}function dD(e){const t=document.createElement("style");t.innerHTML=e,document.head.appendChild(t),window.insertSafeForceGraphStyle=!0}function uD(e){if(window.insertSafeForceGraphStyle){vn("已存在样式");return}const t=cD(e);dD(t)}function Sc(e,t){var r;if(e==null||e==="")return Cc+"unknown";const n=(r=t[e])==null?void 0:r.className;return n?Cc+n:""}function ao(e,t,n){if(e==null||e==="")return n?"#c6cdd5":"#666";const r=t==null?void 0:t.find(s=>s.level===e);return n?r==null?void 0:r.darkColor:r==null?void 0:r.normalColor}function fD(e,t){var r;return((r=t.find(s=>s.level===e))==null?void 0:r.dangerNumber)>0}const c2={"./public/d3svg1/85.svg":"https://s8.qhres2.com/static/92a77a4cfe45315b.svg","./public/d3svg1/address.svg":"https://s8.qhres2.com/static/49af0232ce8bf04c.svg","./public/d3svg1/aggregation.svg":"https://s7.qhres2.com/static/78f28ebf024a1fc3.svg","./public/d3svg1/button/hm_icon_add.svg":"https://s5.qhres2.com/static/4fb5006e9082eb79.svg","./public/d3svg1/button/hm_icon_add_more.svg":"https://s8.qhres2.com/static/3069a945cf205172.svg","./public/d3svg1/button/hm_icon_intro.svg":"https://s6.qhres2.com/static/e3a9174af2a35626.svg","./public/d3svg1/button/hm_icon_search.svg":"https://s6.qhres2.com/static/87920114f746d11b.svg","./public/d3svg1/button/hm_icon_snapshot.svg":"https://s9.qhres2.com/static/87bd8cd6660f76eb.svg","./public/d3svg1/button18/button_all_fix_nodes.svg":"https://s6.qhres2.com/static/b0289b2eb89201c9.svg","./public/d3svg1/button18/button_all_show_label.svg":"https://s9.qhres2.com/static/212e1c47d101e979.svg","./public/d3svg1/button18/button_all_show_names.svg":"https://s9.qhres2.com/static/5662f90b2fd37b8e.svg","./public/d3svg1/button18/button_all_un_fix_nodes.svg":"https://s8.qhres2.com/static/062f773b8bf7a9b1.svg","./public/d3svg1/button18/button_all_un_show_label.svg":"https://s5.qhres2.com/static/ab90216e9f7a6f47.svg","./public/d3svg1/button18/button_all_un_show_names.svg":"https://s9.qhres2.com/static/ee92ef3b7c76c4ad.svg","./public/d3svg1/button18/button_copy.svg":"https://s8.qhres2.com/static/b10151262d77f531.svg","./public/d3svg1/button18/button_delete_node.svg":"https://s8.qhres2.com/static/4ae033e0515de4f6.svg","./public/d3svg1/button18/button_edit_label.svg":"https://s6.qhres2.com/static/3986fc6c0e079f57.svg","./public/d3svg1/button18/button_fix_nodes.svg":"https://s8.qhres2.com/static/fa0d1980cb1bf492.svg","./public/d3svg1/button18/button_go_result.svg":"https://s7.qhres2.com/static/62f48cc3630090d2.svg","./public/d3svg1/button18/button_hold_aggregation.svg":"https://s9.qhres2.com/static/0491c4b71553e3c3.svg","./public/d3svg1/button18/button_node_star.svg":"https://s5.qhres2.com/static/ea5b0c1f75783964.svg","./public/d3svg1/button18/button_redo.svg":"https://s5.qhres2.com/static/8dbda7152025c98d.svg","./public/d3svg1/button18/button_relation.svg":"https://s7.qhres2.com/static/d3881ed52b32dc1f.svg","./public/d3svg1/button18/button_release_aggregation.svg":"https://s7.qhres2.com/static/ba06fa8a8db4569a.svg","./public/d3svg1/button18/button_show_label.svg":"https://s7.qhres2.com/static/2abe1d60abb61fa9.svg","./public/d3svg1/button18/button_show_names.svg":"https://s6.qhres2.com/static/c36a1eae354aaaa2.svg","./public/d3svg1/button18/button_single_edge_select.svg":"https://s6.qhres2.com/static/d7743402fc6d09da.svg","./public/d3svg1/button18/button_undo.svg":"https://s9.qhres2.com/static/6e72dfa93353d2f8.svg","./public/d3svg1/button18/button_un_fix_nodes.svg":"https://s6.qhres2.com/static/60ffc34cad1d659b.svg","./public/d3svg1/button18/button_un_node_star.svg":"https://s8.qhres2.com/static/c565f0ec8a880690.svg","./public/d3svg1/button18/button_un_show_label.svg":"https://s8.qhres2.com/static/71fff9dca19fbecc.svg","./public/d3svg1/button18/button_un_show_names.svg":"https://s6.qhres2.com/static/f4669f0b6c14e809.svg","./public/d3svg1/button18/fit_button.svg":"https://s5.qhres2.com/static/c08f73410838a252.svg","./public/d3svg1/button18/full_button.svg":"https://s6.qhres2.com/static/0f4cb1e63de23dc5.svg","./public/d3svg1/button18/un_full_button.svg":"https://s9.qhres2.com/static/9451379f77771234.svg","./public/d3svg1/button18/zoom_in_button.svg":"https://s8.qhres2.com/static/a0d01d2a34694b6c.svg","./public/d3svg1/button18/zoom_out_button.svg":"https://s9.qhres2.com/static/c3955d07bb42785e.svg","./public/d3svg1/button22/button_add_con_node.svg":"https://s6.qhres2.com/static/eba662b3d6dd3e14.svg","./public/d3svg1/button22/button_center_view.svg":"https://s7.qhres2.com/static/394b502b897ab7ac.svg","./public/d3svg1/button22/button_copy.svg":"https://s7.qhres2.com/static/1079057f47388143.svg","./public/d3svg1/button22/button_delete_node.svg":"https://s7.qhres2.com/static/2ded0a5330325385.svg","./public/d3svg1/button22/button_edit_label.svg":"https://s5.qhres2.com/static/975e072dead6e9fa.svg","./public/d3svg1/button22/button_expand_node.svg":"https://s7.qhres2.com/static/057558aff373fb6e.svg","./public/d3svg1/button22/button_eye_close.svg":"https://s7.qhres2.com/static/af3940bd635bf5cc.svg","./public/d3svg1/button22/button_eye_open.svg":"https://s6.qhres2.com/static/8fcb2638123571e3.svg","./public/d3svg1/button22/button_fix_nodes.svg":"https://s6.qhres2.com/static/baf03da46465cdd6.svg","./public/d3svg1/button22/button_highlight.svg":"https://s8.qhres2.com/static/0e54b564417081b8.svg","./public/d3svg1/button22/button_hold_aggregation.svg":"https://s7.qhres2.com/static/f881ab3ebcf70fc1.svg","./public/d3svg1/button22/button_node_star.svg":"https://s8.qhres2.com/static/113de2517f47e4f9.svg","./public/d3svg1/button22/button_release_aggregation.svg":"https://s9.qhres2.com/static/dd2b3a84e0651662.svg","./public/d3svg1/button22/button_select_all.svg":"https://s8.qhres2.com/static/fb1bab113d4d18ba.svg","./public/d3svg1/button22/button_select_children.svg":"https://s7.qhres2.com/static/494fdd768d816653.svg","./public/d3svg1/button22/button_select_parents.svg":"https://s5.qhres2.com/static/3cbe3439eee235d6.svg","./public/d3svg1/button22/button_show_label.svg":"https://s8.qhres2.com/static/f13914e64f8f3e5a.svg","./public/d3svg1/button22/button_show_names.svg":"https://s5.qhres2.com/static/f4d81384382cd033.svg","./public/d3svg1/button22/button_un_fix_nodes.svg":"https://s7.qhres2.com/static/ea8a1159fe64af2b.svg","./public/d3svg1/button22/button_un_node_star.svg":"https://s9.qhres2.com/static/03975ae87086cd88.svg","./public/d3svg1/button22/button_un_show_label.svg":"https://s7.qhres2.com/static/9391e814e0f764d5.svg","./public/d3svg1/button22/button_un_show_names.svg":"https://s7.qhres2.com/static/5c50b21de64f4c5e.svg","./public/d3svg1/button22/hm_icon_add.svg":"https://s5.qhres2.com/static/852af5cf3c637cef.svg","./public/d3svg1/button22/hm_icon_alias.svg":"https://s6.qhres2.com/static/36fcd0ab7eb1d512.svg","./public/d3svg1/button22/hm_icon_alias_colse.svg":"https://s8.qhres2.com/static/4d38830be1599afc.svg","./public/d3svg1/button22/hm_icon_auto.svg":"https://s7.qhres2.com/static/e08583939b92f508.svg","./public/d3svg1/button22/hm_icon_del.svg":"https://s7.qhres2.com/static/2ded0a5330325385.svg","./public/d3svg1/button22/hm_icon_export.svg":"https://s8.qhres2.com/static/71556fb91f5648f7.svg","./public/d3svg1/button22/hm_icon_fix.svg":"https://s6.qhres2.com/static/baf03da46465cdd6.svg","./public/d3svg1/button22/hm_icon_force.svg":"https://s9.qhres2.com/static/91132a6bf978400c.svg","./public/d3svg1/button22/hm_icon_help.svg":"https://s7.qhres2.com/static/2aa090c82f498cb9.svg","./public/d3svg1/button22/hm_icon_hightLight.svg":"https://s5.qhres2.com/static/e2369714ebf8324d.svg","./public/d3svg1/button22/hm_icon_img.svg":"https://s5.qhres2.com/static/572193e4146fd076.svg","./public/d3svg1/button22/hm_icon_import.svg":"https://s7.qhres2.com/static/3bbcefca466a9108.svg","./public/d3svg1/button22/hm_icon_redo.svg":"https://s6.qhres2.com/static/d47c5779b67388ca.svg","./public/d3svg1/button22/hm_icon_save.svg":"https://s7.qhres2.com/static/2992a856a97d5b85.svg","./public/d3svg1/button22/hm_icon_snapshot.svg":"https://s6.qhres2.com/static/6109b5e11a9f2631.svg","./public/d3svg1/button22/hm_icon_tree.svg":"https://s6.qhres2.com/static/274890d02e511166.svg","./public/d3svg1/button22/hm_icon_undo.svg":"https://s6.qhres2.com/static/736f72642af1abc9.svg","./public/d3svg1/button22/hm_icon_unfix.svg":"https://s7.qhres2.com/static/ea8a1159fe64af2b.svg","./public/d3svg1/button_un_show_label.svg":"https://s6.qhres2.com/static/b19a5b41cfffbc0b.svg","./public/d3svg1/cert.svg":"https://s8.qhres2.com/static/8e9252db9ca5f789.svg","./public/d3svg1/cert_code.svg":"https://s8.qhres2.com/static/b034794ce279efc0.svg","./public/d3svg1/cert_https.svg":"https://s7.qhres2.com/static/fb425c625c9106d9.svg","./public/d3svg1/cert_md5.svg":"https://s8.qhres2.com/static/df826bcca1d0fb18.svg","./public/d3svg1/cloud.svg":"https://s9.qhres2.com/static/633cc96ec9bff2e6.svg","./public/d3svg1/company.svg":"https://s9.qhres2.com/static/4b09c9ca105cf6a4.svg","./public/d3svg1/country.svg":"https://s5.qhres2.com/static/1a7736c5b478e07b.svg","./public/d3svg1/dns.svg":"https://s8.qhres2.com/static/1089289f6729cade.svg","./public/d3svg1/dns_domain.svg":"https://s6.qhres2.com/static/fc636fd5af0c0c05.svg","./public/d3svg1/dns_ip.svg":"https://s6.qhres2.com/static/945d97b0460770aa.svg","./public/d3svg1/domain.svg":"https://s8.qhres2.com/static/d15450a9035991ba.svg","./public/d3svg1/down.svg":"https://s8.qhres2.com/static/1129404c0a0a7a23.svg","./public/d3svg1/download.svg":"https://s7.qhres2.com/static/2ea12e3c04d70b6e.svg","./public/d3svg1/email.svg":"https://s6.qhres2.com/static/1feb3629d4b23c7d.svg","./public/d3svg1/event.svg":"https://s8.qhres2.com/static/638b2ce39606388a.svg","./public/d3svg1/family.svg":"https://s9.qhres2.com/static/4cd5109f631b74af.svg","./public/d3svg1/file.svg":"https://s9.qhres2.com/static/5464eee7f1212b95.svg","./public/d3svg1/file_md5.svg":"https://s6.qhres2.com/static/3882a8f6cc25a1fa.svg","./public/d3svg1/find_country.svg":"https://s6.qhres2.com/static/2775367e4febc238.svg","./public/d3svg1/find_group.svg":"https://s7.qhres2.com/static/73c08baa1232ab15.svg","./public/d3svg1/find_ioc.svg":"https://s5.qhres2.com/static/b324dc9874d2f64a.svg","./public/d3svg1/find_report.svg":"https://s5.qhres2.com/static/7e8b93e787606859.svg","./public/d3svg1/find_target_country.svg":"https://s6.qhres2.com/static/1bf440bf280e9186.svg","./public/d3svg1/find_target_industry.svg":"https://s5.qhres2.com/static/0ea145e0bc9844f1.svg","./public/d3svg1/find_ttp.svg":"https://s6.qhres2.com/static/d3555f80211bdd20.svg","./public/d3svg1/find_vendor.svg":"https://s5.qhres2.com/static/35936579d6cec419.svg","./public/d3svg1/flags/abu_dhabi.png":"https://p0.ssl.qhimg.com/t11b673bcd600b7420ed9d3b0fc.png","./public/d3svg1/flags/afghanistan.png":"https://p5.ssl.qhimg.com/t11b673bcd66b73f84b7152db62.png","./public/d3svg1/flags/albania.png":"https://p0.ssl.qhimg.com/t11b673bcd6554ace32f912d567.png","./public/d3svg1/flags/algeria.png":"https://p3.ssl.qhimg.com/t11b673bcd622422b6d071ccc22.png","./public/d3svg1/flags/american_samoa.png":"https://p1.ssl.qhimg.com/t11b673bcd6c595535d38c2c488.png","./public/d3svg1/flags/andorra.png":"https://p0.ssl.qhimg.com/t11b673bcd6805f7f0ae834fc32.png","./public/d3svg1/flags/angola.png":"https://p3.ssl.qhimg.com/t11b673bcd64152de70c5b45254.png","./public/d3svg1/flags/anguilla.png":"https://p2.ssl.qhimg.com/t11b673bcd655dd08b9abd92436.png","./public/d3svg1/flags/antigua_and_barbuda.png":"https://p4.ssl.qhimg.com/t11b673bcd6c42483ae1c05b5ae.png","./public/d3svg1/flags/argentina.png":"https://p0.ssl.qhimg.com/t11b673bcd64d3f8c0d28624343.png","./public/d3svg1/flags/armenia.png":"https://p1.ssl.qhimg.com/t11b673bcd6ffddd18f6213fbe8.png","./public/d3svg1/flags/aruba.png":"https://p5.ssl.qhimg.com/t11b673bcd6a954f4ebda2b2aaf.png","./public/d3svg1/flags/australia.png":"https://p1.ssl.qhimg.com/t11b673bcd6c024c65ff1cc8a8d.png","./public/d3svg1/flags/austria.png":"https://p0.ssl.qhimg.com/t11b673bcd6e6a215b0a4a0077d.png","./public/d3svg1/flags/azerbaijan.png":"https://p4.ssl.qhimg.com/t11b673bcd6b2f598ca0633bab4.png","./public/d3svg1/flags/bahamas.png":"https://p1.ssl.qhimg.com/t11b673bcd64389c5b895aeb8cb.png","./public/d3svg1/flags/bahrain.png":"https://p5.ssl.qhimg.com/t11b673bcd6e9aea3791db558e2.png","./public/d3svg1/flags/bangladesh.png":"https://p4.ssl.qhimg.com/t11b673bcd656bcda81bdeb333e.png","./public/d3svg1/flags/barbados.png":"https://p3.ssl.qhimg.com/t11b673bcd6e173975ff3435533.png","./public/d3svg1/flags/belarus.png":"https://p4.ssl.qhimg.com/t11b673bcd6c6bd61585df5dc66.png","./public/d3svg1/flags/belgium.png":"https://p5.ssl.qhimg.com/t11b673bcd6bc981724a92fd288.png","./public/d3svg1/flags/belize.png":"https://p3.ssl.qhimg.com/t11b673bcd657e3a5a5e9e6d0dc.png","./public/d3svg1/flags/benin.png":"https://p4.ssl.qhimg.com/t11b673bcd60fe48ceb0d83f1db.png","./public/d3svg1/flags/bermuda.png":"https://p4.ssl.qhimg.com/t11b673bcd6991a5555e2951383.png","./public/d3svg1/flags/bhutan.png":"https://p1.ssl.qhimg.com/t11b673bcd6c1a09b104cbbf155.png","./public/d3svg1/flags/bolivia.png":"https://p4.ssl.qhimg.com/t11b673bcd6f14d83bf204a3484.png","./public/d3svg1/flags/bosnia_and_herzegovina.png":"https://p2.ssl.qhimg.com/t11b673bcd60c6298b82cba538c.png","./public/d3svg1/flags/botswana.png":"https://p5.ssl.qhimg.com/t11b673bcd6c857af3514756b8f.png","./public/d3svg1/flags/brazil.png":"https://p0.ssl.qhimg.com/t11b673bcd65ca6cd0fb5c7cc59.png","./public/d3svg1/flags/british_virgin_islands.png":"https://p4.ssl.qhimg.com/t11b673bcd604bceae11fd2f580.png","./public/d3svg1/flags/brunei.png":"https://p3.ssl.qhimg.com/t11b673bcd6f920666ff379bb8a.png","./public/d3svg1/flags/bulgaria.png":"https://p5.ssl.qhimg.com/t11b673bcd6766409ab0d88cc13.png","./public/d3svg1/flags/burkina_faso.png":"https://p4.ssl.qhimg.com/t11b673bcd6366f1d500c9f0c26.png","./public/d3svg1/flags/burundi.png":"https://p0.ssl.qhimg.com/t11b673bcd6ef92224393d4789c.png","./public/d3svg1/flags/cambodia.png":"https://p2.ssl.qhimg.com/t11b673bcd689fddeb63273c902.png","./public/d3svg1/flags/cameroon.png":"https://p3.ssl.qhimg.com/t11b673bcd61b97aca53d096ec7.png","./public/d3svg1/flags/canada.png":"https://p4.ssl.qhimg.com/t11b673bcd607f2e3664cc586a9.png","./public/d3svg1/flags/cape_verde.png":"https://p5.ssl.qhimg.com/t11b673bcd6bcd5521b34abe933.png","./public/d3svg1/flags/cayman_islands.png":"https://p4.ssl.qhimg.com/t11b673bcd659643bbfdae25503.png","./public/d3svg1/flags/central_african_republic.png":"https://p2.ssl.qhimg.com/t11b673bcd6689eb3ad435ebb68.png","./public/d3svg1/flags/chad.png":"https://p4.ssl.qhimg.com/t11b673bcd69e06a9ad5a86a48b.png","./public/d3svg1/flags/chile.png":"https://p0.ssl.qhimg.com/t11b673bcd6da100a223247567f.png","./public/d3svg1/flags/china.png":"https://p5.ssl.qhimg.com/t11b673bcd6304bcd201fd23df6.png","./public/d3svg1/flags/christmas_island.png":"https://p2.ssl.qhimg.com/t11b673bcd6e7874db308ac2252.png","./public/d3svg1/flags/cocos_islands.png":"https://p0.ssl.qhimg.com/t11b673bcd6c0b7f434b6919f3f.png","./public/d3svg1/flags/colombia.png":"https://p4.ssl.qhimg.com/t11b673bcd64067c703a78dce3b.png","./public/d3svg1/flags/comoros.png":"https://p0.ssl.qhimg.com/t11b673bcd669a07d86c511072b.png","./public/d3svg1/flags/congo_democratic_republic.png":"https://p4.ssl.qhimg.com/t11b673bcd683ac60001ce46f1f.png","./public/d3svg1/flags/congo_republic.png":"https://p1.ssl.qhimg.com/t11b673bcd63046ae1b2eaa2e03.png","./public/d3svg1/flags/costa_rica.png":"https://p3.ssl.qhimg.com/t11b673bcd626df8804c76f2fd6.png","./public/d3svg1/flags/cote_d'ivoire.png":"https://p3.ssl.qhimg.com/t11b673bcd6bcd9188af99a7148.png","./public/d3svg1/flags/croatia.png":"https://p1.ssl.qhimg.com/t11b673bcd6d3566b33a31ee615.png","./public/d3svg1/flags/cuba.png":"https://p0.ssl.qhimg.com/t11b673bcd6dc80791b9bc8e11c.png","./public/d3svg1/flags/curacao.png":"https://p0.ssl.qhimg.com/t11b673bcd61f17f8ec93fecd34.png","./public/d3svg1/flags/cyprus.png":"https://p2.ssl.qhimg.com/t11b673bcd69a4c05b99a9c64be.png","./public/d3svg1/flags/czech_republic.png":"https://p1.ssl.qhimg.com/t11b673bcd63224c0c67639351f.png","./public/d3svg1/flags/denmark.png":"https://p4.ssl.qhimg.com/t11b673bcd6b0f04b65a97f8028.png","./public/d3svg1/flags/djibouti.png":"https://p0.ssl.qhimg.com/t11b673bcd6e4796ea6f99dd948.png","./public/d3svg1/flags/dominica.png":"https://p3.ssl.qhimg.com/t11b673bcd6b3867bd167f1d976.png","./public/d3svg1/flags/dominican_republic.png":"https://p4.ssl.qhimg.com/t11b673bcd64378d5ead5b5e6ec.png","./public/d3svg1/flags/east_timor.png":"https://p5.ssl.qhimg.com/t11b673bcd6e8e5fb8405dec7e3.png","./public/d3svg1/flags/ecuador.png":"https://p2.ssl.qhimg.com/t11b673bcd6395fb935fa0f0e3a.png","./public/d3svg1/flags/egypt.png":"https://p3.ssl.qhimg.com/t11b673bcd601fe13f0f24008e9.png","./public/d3svg1/flags/el_salvador.png":"https://p4.ssl.qhimg.com/t11b673bcd60104541f9c7a0c99.png","./public/d3svg1/flags/england.png":"https://p5.ssl.qhimg.com/t11b673bcd643b14e971b5b3cb6.png","./public/d3svg1/flags/equatorial_guinea.png":"https://p5.ssl.qhimg.com/t11b673bcd6a74942f5afd0b3a4.png","./public/d3svg1/flags/eritrea.png":"https://p4.ssl.qhimg.com/t11b673bcd6ce53472f50f44f5b.png","./public/d3svg1/flags/estonia.png":"https://p5.ssl.qhimg.com/t11b673bcd66d527c4a923153eb.png","./public/d3svg1/flags/ethiopia.png":"https://p4.ssl.qhimg.com/t11b673bcd692b527f6a90ddbe0.png","./public/d3svg1/flags/europe.png":"https://p4.ssl.qhimg.com/t11b673bcd65bb42e201aa13efa.png","./public/d3svg1/flags/falkland_islands.png":"https://p1.ssl.qhimg.com/t11b673bcd60ae1bba78b7eb7a6.png","./public/d3svg1/flags/fiji.png":"https://p5.ssl.qhimg.com/t11b673bcd6ffb03de7e05ae7aa.png","./public/d3svg1/flags/finland.png":"https://p4.ssl.qhimg.com/t11b673bcd695f5d1feacba8397.png","./public/d3svg1/flags/france.png":"https://p1.ssl.qhimg.com/t11b673bcd6f697a973b72a98e7.png","./public/d3svg1/flags/french_guiana.png":"https://p3.ssl.qhimg.com/t11b673bcd66346509b6df42a07.png","./public/d3svg1/flags/french_polynesia.png":"https://p3.ssl.qhimg.com/t11b673bcd6932beb0a7b52f3da.png","./public/d3svg1/flags/gabon.png":"https://p2.ssl.qhimg.com/t11b673bcd632f298a0f193b661.png","./public/d3svg1/flags/gambia.png":"https://p4.ssl.qhimg.com/t11b673bcd61564ba1c6e0c96ed.png","./public/d3svg1/flags/georgia.png":"https://p2.ssl.qhimg.com/t11b673bcd6eea60bad5abefdba.png","./public/d3svg1/flags/germany.png":"https://p1.ssl.qhimg.com/t11b673bcd684b3001d906d19c7.png","./public/d3svg1/flags/ghana.png":"https://p2.ssl.qhimg.com/t11b673bcd6f7dcd42afd3fc0ff.png","./public/d3svg1/flags/gibraltar.png":"https://p3.ssl.qhimg.com/t11b673bcd6ed767f13c90a732f.png","./public/d3svg1/flags/greece.png":"https://p0.ssl.qhimg.com/t11b673bcd6da5d5973a17cc048.png","./public/d3svg1/flags/greenland.png":"https://p1.ssl.qhimg.com/t11b673bcd6d3f1604dea436593.png","./public/d3svg1/flags/grenada.png":"https://p5.ssl.qhimg.com/t11b673bcd670078c4c722961d5.png","./public/d3svg1/flags/guam.png":"https://p1.ssl.qhimg.com/t11b673bcd6fe323aa0e62d3c0c.png","./public/d3svg1/flags/guatemala.png":"https://p3.ssl.qhimg.com/t11b673bcd63743b6c563848d07.png","./public/d3svg1/flags/guernsey.png":"https://p0.ssl.qhimg.com/t11b673bcd6f86e78de635ff50c.png","./public/d3svg1/flags/guinea.png":"https://p0.ssl.qhimg.com/t11b673bcd6d4f635060a97fb49.png","./public/d3svg1/flags/guinea_bissau.png":"https://p4.ssl.qhimg.com/t11b673bcd64ee5f7086bb14c1e.png","./public/d3svg1/flags/guyana.png":"https://p0.ssl.qhimg.com/t11b673bcd6e7d086533c3f87f2.png","./public/d3svg1/flags/haiti.png":"https://p5.ssl.qhimg.com/t11b673bcd6159c94d32253d312.png","./public/d3svg1/flags/honduras.png":"https://p5.ssl.qhimg.com/t11b673bcd6796b21e7e87b5254.png","./public/d3svg1/flags/hongkong.png":"https://p0.ssl.qhimg.com/t11b673bcd621cfe81da15a2878.png","./public/d3svg1/flags/hungary.png":"https://p4.ssl.qhimg.com/t11b673bcd6b5087e47ff53250a.png","./public/d3svg1/flags/iceland.png":"https://p0.ssl.qhimg.com/t11b673bcd60178e8a27cf4f660.png","./public/d3svg1/flags/india.png":"https://p1.ssl.qhimg.com/t11b673bcd68213e7e6dc2a3368.png","./public/d3svg1/flags/indonesia.png":"https://p4.ssl.qhimg.com/t11b673bcd6bcb4661812d6e2dd.png","./public/d3svg1/flags/ip.png":"https://p4.ssl.qhimg.com/t11b673bcd62e2c50a4c424fd37.png","./public/d3svg1/flags/iran.png":"https://p1.ssl.qhimg.com/t11b673bcd61a5bca45b65c6bda.png","./public/d3svg1/flags/iraq.png":"https://p3.ssl.qhimg.com/t11b673bcd6c351fb6799b43b8e.png","./public/d3svg1/flags/ireland.png":"https://p2.ssl.qhimg.com/t11b673bcd6c19ffc4e51b1b821.png","./public/d3svg1/flags/isle_of_man.png":"https://p1.ssl.qhimg.com/t11b673bcd67cc3b83618827640.png","./public/d3svg1/flags/israel.png":"https://p5.ssl.qhimg.com/t11b673bcd60f3fe6361aebe345.png","./public/d3svg1/flags/italy.png":"https://p0.ssl.qhimg.com/t11b673bcd6259e5daf0549a262.png","./public/d3svg1/flags/jamaica.png":"https://p4.ssl.qhimg.com/t11b673bcd6fe1c1722f1aadb19.png","./public/d3svg1/flags/japan.png":"https://p5.ssl.qhimg.com/t11b673bcd62be27ee2e0144814.png","./public/d3svg1/flags/jersey.png":"https://p5.ssl.qhimg.com/t11b673bcd6e6808ce8980d8153.png","./public/d3svg1/flags/jordan.png":"https://p4.ssl.qhimg.com/t11b673bcd63b03a35b35e93112.png","./public/d3svg1/flags/kazakhstan.png":"https://p1.ssl.qhimg.com/t11b673bcd65c547f69f6914068.png","./public/d3svg1/flags/kenya.png":"https://p5.ssl.qhimg.com/t11b673bcd6c139207c1af5796e.png","./public/d3svg1/flags/kiribati.png":"https://p4.ssl.qhimg.com/t11b673bcd6fa801f19411d0845.png","./public/d3svg1/flags/kosovo.png":"https://p5.ssl.qhimg.com/t11b673bcd67a2248e71b96fe50.png","./public/d3svg1/flags/kuwait.png":"https://p1.ssl.qhimg.com/t11b673bcd644ba519b64e3b8d5.png","./public/d3svg1/flags/kyrgyzstan.png":"https://p2.ssl.qhimg.com/t11b673bcd6586d16c82fd0d335.png","./public/d3svg1/flags/laos.png":"https://p5.ssl.qhimg.com/t11b673bcd6c625355323458017.png","./public/d3svg1/flags/latvia.png":"https://p0.ssl.qhimg.com/t11b673bcd6ea8a114edbe5ec64.png","./public/d3svg1/flags/lebanon.png":"https://p4.ssl.qhimg.com/t11b673bcd6ffbeb21378af699a.png","./public/d3svg1/flags/lesotho.png":"https://p0.ssl.qhimg.com/t11b673bcd6d373c8167c1bbc61.png","./public/d3svg1/flags/liberia.png":"https://p0.ssl.qhimg.com/t11b673bcd6f36c69ecf34bcb61.png","./public/d3svg1/flags/libya.png":"https://p0.ssl.qhimg.com/t11b673bcd6d20838c79c8f3ba6.png","./public/d3svg1/flags/liechtenstein.png":"https://p5.ssl.qhimg.com/t11b673bcd696b0707e4ac337b5.png","./public/d3svg1/flags/lithuania.png":"https://p5.ssl.qhimg.com/t11b673bcd6b414cecd90415a6a.png","./public/d3svg1/flags/luxembourg.png":"https://p1.ssl.qhimg.com/t11b673bcd63d9dda633fc50ffd.png","./public/d3svg1/flags/macau.png":"https://p1.ssl.qhimg.com/t11b673bcd6a892679802369212.png","./public/d3svg1/flags/macedonia.png":"https://p2.ssl.qhimg.com/t11b673bcd623808f60cf668fc9.png","./public/d3svg1/flags/madagascar.png":"https://p0.ssl.qhimg.com/t11b673bcd64d15e974516d5cb3.png","./public/d3svg1/flags/malawi.png":"https://p5.ssl.qhimg.com/t11b673bcd62db076a05806722c.png","./public/d3svg1/flags/malaysia.png":"https://p4.ssl.qhimg.com/t11b673bcd6f9a3c22f13fd96c5.png","./public/d3svg1/flags/maldives.png":"https://p3.ssl.qhimg.com/t11b673bcd6fde5890555898b6f.png","./public/d3svg1/flags/mali.png":"https://p1.ssl.qhimg.com/t11b673bcd6422870677e8b5bce.png","./public/d3svg1/flags/malta.png":"https://p4.ssl.qhimg.com/t11b673bcd672c88550dc2c333e.png","./public/d3svg1/flags/marshall_islands.png":"https://p0.ssl.qhimg.com/t11b673bcd6646846cbbf3a4735.png","./public/d3svg1/flags/mauritania.png":"https://p5.ssl.qhimg.com/t11b673bcd6c3ade924f1cef885.png","./public/d3svg1/flags/mauritius.png":"https://p0.ssl.qhimg.com/t11b673bcd629026fcfcd64601f.png","./public/d3svg1/flags/mexico.png":"https://p2.ssl.qhimg.com/t11b673bcd6e06d39e098fc8ccb.png","./public/d3svg1/flags/micronesia.png":"https://p1.ssl.qhimg.com/t11b673bcd6c1b247a750439a7e.png","./public/d3svg1/flags/moldova.png":"https://p5.ssl.qhimg.com/t11b673bcd650c6f75d4d3eee8b.png","./public/d3svg1/flags/monaco.png":"https://p4.ssl.qhimg.com/t11b673bcd6bcb4661812d6e2dd.png","./public/d3svg1/flags/mongolia.png":"https://p4.ssl.qhimg.com/t11b673bcd62cfc9fa747237289.png","./public/d3svg1/flags/montenegro.png":"https://p4.ssl.qhimg.com/t11b673bcd66462c01ca1bafac0.png","./public/d3svg1/flags/montserrat.png":"https://p3.ssl.qhimg.com/t11b673bcd60c8845d6d090c447.png","./public/d3svg1/flags/morocco.png":"https://p0.ssl.qhimg.com/t11b673bcd69897bbe03901a57a.png","./public/d3svg1/flags/mozambique.png":"https://p5.ssl.qhimg.com/t11b673bcd65f93036ad9aec89c.png","./public/d3svg1/flags/myanmar_burma.png":"https://p2.ssl.qhimg.com/t11b673bcd63ee76060475fe0b0.png","./public/d3svg1/flags/namibia.png":"https://p2.ssl.qhimg.com/t11b673bcd65e0bbc1fec4908a9.png","./public/d3svg1/flags/nauru.png":"https://p0.ssl.qhimg.com/t11b673bcd674083d9b9b5e0069.png","./public/d3svg1/flags/nepal.png":"https://p0.ssl.qhimg.com/t11b673bcd67808e1379fc17470.png","./public/d3svg1/flags/netherlands.png":"https://p5.ssl.qhimg.com/t11b673bcd6d592b75467b0db7b.png","./public/d3svg1/flags/netherlands_antilles.png":"https://p5.ssl.qhimg.com/t11b673bcd63bbf175457b12c12.png","./public/d3svg1/flags/new_caledonia.png":"https://p1.ssl.qhimg.com/t11b673bcd62231079a91d351eb.png","./public/d3svg1/flags/new_zealand.png":"https://p4.ssl.qhimg.com/t11b673bcd649ee6eb1c37a282a.png","./public/d3svg1/flags/nicaragua.png":"https://p2.ssl.qhimg.com/t11b673bcd63d155996d8c986c9.png","./public/d3svg1/flags/niger.png":"https://p5.ssl.qhimg.com/t11b673bcd64f4d87e9952a272b.png","./public/d3svg1/flags/nigeria.png":"https://p2.ssl.qhimg.com/t11b673bcd6964d810f5fe6b404.png","./public/d3svg1/flags/niue.png":"https://p5.ssl.qhimg.com/t11b673bcd6f23318f87536e3be.png","./public/d3svg1/flags/norfolk_island.png":"https://p0.ssl.qhimg.com/t11b673bcd66bb5e86248642b36.png","./public/d3svg1/flags/northern_cyprus.png":"https://p5.ssl.qhimg.com/t11b673bcd61b7548ce349c2c59.png","./public/d3svg1/flags/northern_ireland.png":"https://p5.ssl.qhimg.com/t11b673bcd6ea43c093d6f4f449.png","./public/d3svg1/flags/north_korea.png":"https://p4.ssl.qhimg.com/t11b673bcd67327fd94e8b6a5a3.png","./public/d3svg1/flags/norway.png":"https://p0.ssl.qhimg.com/t11b673bcd6c987d9dd507bfdd6.png","./public/d3svg1/flags/oman.png":"https://p3.ssl.qhimg.com/t11b673bcd6808d4462b6f3a218.png","./public/d3svg1/flags/pakistan.png":"https://p2.ssl.qhimg.com/t11b673bcd6cf5e993ade4f2964.png","./public/d3svg1/flags/palau.png":"https://p3.ssl.qhimg.com/t11b673bcd6c068865ac2e2b031.png","./public/d3svg1/flags/palestine.png":"https://p1.ssl.qhimg.com/t11b673bcd6eead994da457cb04.png","./public/d3svg1/flags/panama.png":"https://p2.ssl.qhimg.com/t11b673bcd6cc4745092f80ccfb.png","./public/d3svg1/flags/papua_new_guinea.png":"https://p0.ssl.qhimg.com/t11b673bcd644673a8e2c3ef051.png","./public/d3svg1/flags/paraguay.png":"https://p1.ssl.qhimg.com/t11b673bcd6dda2a735d20519e7.png","./public/d3svg1/flags/peru.png":"https://p2.ssl.qhimg.com/t11b673bcd633af174deb1560d5.png","./public/d3svg1/flags/philippines.png":"https://p4.ssl.qhimg.com/t11b673bcd6f5f86e3429cb4c81.png","./public/d3svg1/flags/pitcairn_islands.png":"https://p1.ssl.qhimg.com/t11b673bcd64517b95359047675.png","./public/d3svg1/flags/poland.png":"https://p3.ssl.qhimg.com/t11b673bcd6069ed918cdd98767.png","./public/d3svg1/flags/portugal.png":"https://p4.ssl.qhimg.com/t11b673bcd68cefa1ac33d50290.png","./public/d3svg1/flags/puerto_rico.png":"https://p2.ssl.qhimg.com/t11b673bcd6659a3560240c8a4e.png","./public/d3svg1/flags/qatar.png":"https://p3.ssl.qhimg.com/t11b673bcd669854fcdd37ed962.png","./public/d3svg1/flags/romania.png":"https://p2.ssl.qhimg.com/t11b673bcd6208b9341dba47f11.png","./public/d3svg1/flags/russia.png":"https://p0.ssl.qhimg.com/t11b673bcd66b8ee4de7e5d9e69.png","./public/d3svg1/flags/rwanda.png":"https://p3.ssl.qhimg.com/t11b673bcd61c8a95a7340b4dae.png","./public/d3svg1/flags/sahrawi_arab.png":"https://p0.ssl.qhimg.com/t11b673bcd6833624156c42e3ab.png","./public/d3svg1/flags/saint_kitts_and_nevis.png":"https://p2.ssl.qhimg.com/t11b673bcd6bb701bf8e688e076.png","./public/d3svg1/flags/saint_lucia.png":"https://p2.ssl.qhimg.com/t11b673bcd6be47edaa16e3efdb.png","./public/d3svg1/flags/saint_vincent_and_grenadines.png":"https://p5.ssl.qhimg.com/t11b673bcd6356376d62ad2fb08.png","./public/d3svg1/flags/samoa.png":"https://p0.ssl.qhimg.com/t11b673bcd65099091e7ff643a2.png","./public/d3svg1/flags/san_marino.png":"https://p1.ssl.qhimg.com/t11b673bcd6c7d8eaf79bd11950.png","./public/d3svg1/flags/sao_tome_principe.png":"https://p0.ssl.qhimg.com/t11b673bcd65ed5322e52b33883.png","./public/d3svg1/flags/saudi_arabia.png":"https://p4.ssl.qhimg.com/t11b673bcd65ef983618f3dad1d.png","./public/d3svg1/flags/scotland.png":"https://p2.ssl.qhimg.com/t11b673bcd632d8efbdc309befc.png","./public/d3svg1/flags/senegal.png":"https://p5.ssl.qhimg.com/t11b673bcd6ed2aa2fac6a327f1.png","./public/d3svg1/flags/serbia.png":"https://p1.ssl.qhimg.com/t11b673bcd6f87c8ab028617f5b.png","./public/d3svg1/flags/seychelles.png":"https://p1.ssl.qhimg.com/t11b673bcd621e9aa4597a2c5d2.png","./public/d3svg1/flags/sierra_leone.png":"https://p5.ssl.qhimg.com/t11b673bcd60afc938f22552079.png","./public/d3svg1/flags/singapore.png":"https://p1.ssl.qhimg.com/t11b673bcd640999577dd24227e.png","./public/d3svg1/flags/sint_maarten.png":"https://p4.ssl.qhimg.com/t11b673bcd615986c65ec59b44c.png","./public/d3svg1/flags/slovakia.png":"https://p0.ssl.qhimg.com/t11b673bcd61e49878fdeda9e6c.png","./public/d3svg1/flags/slovenia.png":"https://p3.ssl.qhimg.com/t11b673bcd6ef90cb0d44c02757.png","./public/d3svg1/flags/solomon_islands.png":"https://p1.ssl.qhimg.com/t11b673bcd6066406f4b1266571.png","./public/d3svg1/flags/somalia.png":"https://p5.ssl.qhimg.com/t11b673bcd63c470e6e15a1a963.png","./public/d3svg1/flags/south_africa.png":"https://p2.ssl.qhimg.com/t11b673bcd6aaa44743ad66ca71.png","./public/d3svg1/flags/south_korea.png":"https://p2.ssl.qhimg.com/t11b673bcd6207c734bc93ffca7.png","./public/d3svg1/flags/south_sudan.png":"https://p1.ssl.qhimg.com/t11b673bcd61c283fad96263e62.png","./public/d3svg1/flags/spain.png":"https://p5.ssl.qhimg.com/t11b673bcd68316992b1c22281d.png","./public/d3svg1/flags/sri_lanka.png":"https://p4.ssl.qhimg.com/t11b673bcd6fb7bcacef951feed.png","./public/d3svg1/flags/sudan.png":"https://p1.ssl.qhimg.com/t11b673bcd6f129ac747600e082.png","./public/d3svg1/flags/suriname.png":"https://p5.ssl.qhimg.com/t11b673bcd67a12641513ab7d34.png","./public/d3svg1/flags/swaziland.png":"https://p0.ssl.qhimg.com/t11b673bcd6936216cc45eeff7b.png","./public/d3svg1/flags/sweden.png":"https://p0.ssl.qhimg.com/t11b673bcd666958e31ac92957e.png","./public/d3svg1/flags/switzeland.png":"https://p2.ssl.qhimg.com/t11b673bcd6122ada53eb1b807e.png","./public/d3svg1/flags/syria.png":"https://p1.ssl.qhimg.com/t11b673bcd6953c86d18052c932.png","./public/d3svg1/flags/taiwan.png":"https://p5.ssl.qhimg.com/t11b673bcd6304bcd201fd23df6.png","./public/d3svg1/flags/tajikistan.png":"https://p4.ssl.qhimg.com/t11b673bcd698c5c84a62b12388.png","./public/d3svg1/flags/tanzania.png":"https://p3.ssl.qhimg.com/t11b673bcd6d537b34d56658c98.png","./public/d3svg1/flags/thailand.png":"https://p1.ssl.qhimg.com/t11b673bcd60050f650fff9bd66.png","./public/d3svg1/flags/the_cook_islands.png":"https://p4.ssl.qhimg.com/t11b673bcd61292a8f19147f865.png","./public/d3svg1/flags/the_faroe_islands.png":"https://p0.ssl.qhimg.com/t11b673bcd6cda6e9ec5b5bc8f6.png","./public/d3svg1/flags/the_turks_and_caicos_islands.png":"https://p2.ssl.qhimg.com/t11b673bcd614fca92287df5c95.png","./public/d3svg1/flags/togo.png":"https://p5.ssl.qhimg.com/t11b673bcd682ba165ebbbca70a.png","./public/d3svg1/flags/tokelau.png":"https://p1.ssl.qhimg.com/t11b673bcd67e4bae219b59d6e6.png","./public/d3svg1/flags/tonga.png":"https://p0.ssl.qhimg.com/t11b673bcd6998933793d4d8fbc.png","./public/d3svg1/flags/transnistria.png":"https://p0.ssl.qhimg.com/t11b673bcd62dc7b17601baa895.png","./public/d3svg1/flags/trinidad_and_tobago.png":"https://p3.ssl.qhimg.com/t11b673bcd67371391609bf78d7.png","./public/d3svg1/flags/tunisia.png":"https://p3.ssl.qhimg.com/t11b673bcd624cb2d7bf0797501.png","./public/d3svg1/flags/turkey.png":"https://p5.ssl.qhimg.com/t11b673bcd6b51b544b5e683846.png","./public/d3svg1/flags/turkmenistan.png":"https://p2.ssl.qhimg.com/t11b673bcd680705dbb5d2590e1.png","./public/d3svg1/flags/tuvalu.png":"https://p5.ssl.qhimg.com/t11b673bcd6eb80c5b0e6b4cf9d.png","./public/d3svg1/flags/uganda.png":"https://p2.ssl.qhimg.com/t11b673bcd6a42822abbcef11ef.png","./public/d3svg1/flags/ukraine.png":"https://p5.ssl.qhimg.com/t11b673bcd6a18c73c5e309e867.png","./public/d3svg1/flags/united_arab_emirates_uae.png":"https://p0.ssl.qhimg.com/t11b673bcd6d6ac620490436646.png","./public/d3svg1/flags/united_kingdom.png":"https://p0.ssl.qhimg.com/t11b673bcd6b2dab8383fd03d16.png","./public/d3svg1/flags/united_states.png":"https://p4.ssl.qhimg.com/t11b673bcd6ac4aab9abb62470d.png","./public/d3svg1/flags/united_states_virgin_islands.png":"https://p0.ssl.qhimg.com/t11b673bcd60e706830471605ae.png","./public/d3svg1/flags/uruguay.png":"https://p1.ssl.qhimg.com/t11b673bcd673c8556316268f27.png","./public/d3svg1/flags/uzbekistan.png":"https://p5.ssl.qhimg.com/t11b673bcd6692a87d0deaa0cd4.png","./public/d3svg1/flags/vanuatu.png":"https://p3.ssl.qhimg.com/t11b673bcd6dfe59d18beb502ed.png","./public/d3svg1/flags/vatican.png":"https://p2.ssl.qhimg.com/t11b673bcd65204ea5b7e60deae.png","./public/d3svg1/flags/venezuela.png":"https://p3.ssl.qhimg.com/t11b673bcd6d6d7092d46e0d7c3.png","./public/d3svg1/flags/vietnam.png":"https://p3.ssl.qhimg.com/t11b673bcd668708c0e4043f8a0.png","./public/d3svg1/flags/wales.png":"https://p2.ssl.qhimg.com/t11b673bcd60c0cbfacd5576ddd.png","./public/d3svg1/flags/wallis_and_futuna.png":"https://p5.ssl.qhimg.com/t11b673bcd68351271fd687e442.png","./public/d3svg1/flags/yemen.png":"https://p2.ssl.qhimg.com/t11b673bcd6b506ff3ca76f158a.png","./public/d3svg1/flags/zambia.png":"https://p4.ssl.qhimg.com/t11b673bcd614f327cbfbe2c728.png","./public/d3svg1/flags/zimbabwe.png":"https://p0.ssl.qhimg.com/t11b673bcd6704ad2c0a3c95fd1.png","./public/d3svg1/fold-left.svg":"https://s5.qhres2.com/static/64c3e01294203a68.svg","./public/d3svg1/fold-right.svg":"https://s9.qhres2.com/static/3538c207c3fe91e2.svg","./public/d3svg1/group.svg":"https://s5.qhres2.com/static/5f3286f6d9f3faab.svg","./public/d3svg1/host.svg":"https://s8.qhres2.com/static/1c0a4b2bfee6e157.svg","./public/d3svg1/icon_ thumbprint.svg":"https://s9.qhres2.com/static/4604a52bd2797688.svg","./public/d3svg1/icon_cert_md5.svg":"https://s8.qhres2.com/static/50f33f15365a638a.svg","./public/d3svg1/icon_email.svg":"https://s8.qhres2.com/static/6ca54d23816f6bab.svg","./public/d3svg1/icon_family.svg":"https://s5.qhres2.com/static/df16a4bb42ef04f8.svg","./public/d3svg1/icon_files.svg":"https://s6.qhres2.com/static/7a779b0e4bdb8823.svg","./public/d3svg1/icon_host.svg":"https://s9.qhres2.com/static/8d1207bc7ff6821e.svg","./public/d3svg1/icon_ip.svg":"https://s9.qhres2.com/static/2dd1f32c1f2925b6.svg","./public/d3svg1/icon_issuer.svg":"https://s9.qhres2.com/static/64f9af8918b80390.svg","./public/d3svg1/icon_mac.svg":"https://s6.qhres2.com/static/afa1897aa3157b79.svg","./public/d3svg1/icon_mid.svg":"https://s6.qhres2.com/static/f8b70764e209d1b0.svg","./public/d3svg1/icon_org.svg":"https://s8.qhres2.com/static/8a788cf726c4be74.svg","./public/d3svg1/icon_report.svg":"https://s8.qhres2.com/static/307389647f167f5a.svg","./public/d3svg1/icon_search.svg":"https://s7.qhres2.com/static/3ebec436a55a4e02.svg","./public/d3svg1/icon_subject.svg":"https://s5.qhres2.com/static/dc50dc3eb65359c6.svg","./public/d3svg1/icon_vul.svg":"https://s7.qhres2.com/static/6178e21d4df882e5.svg","./public/d3svg1/innerip.svg":"https://s9.qhres2.com/static/b2ba46a37e51ac7c.svg","./public/d3svg1/internet.svg":"https://s5.qhres2.com/static/329ba4f0d5d5a38e.svg","./public/d3svg1/intranet.svg":"https://s8.qhres2.com/static/d57dc307ea030e67.svg","./public/d3svg1/ioc.svg":"https://s6.qhres2.com/static/c3c9db7bbc3e5bf5.svg","./public/d3svg1/ip copy.svg":"https://s5.qhres2.com/static/f30c7317dd483dbd.svg","./public/d3svg1/ip.svg":"https://s8.qhres2.com/static/e9aa6d49edb6c705.svg","./public/d3svg1/ips.svg":"https://s9.qhres2.com/static/9c1cb66938613669.svg","./public/d3svg1/jiantou.svg":"https://s9.qhres2.com/static/2782d2c0cf2735b3.svg","./public/d3svg1/jiantou_active.svg":"https://s7.qhres2.com/static/66b48ee2c7ac8fa1.svg","./public/d3svg1/loop.svg":"https://s8.qhres2.com/static/f8fae0b477ae23f8.svg","./public/d3svg1/mac.svg":"https://s7.qhres2.com/static/9cf115d3f6ac3d2c.svg","./public/d3svg1/mail.svg":"https://s9.qhres2.com/static/998d1f1f7829350c.svg","./public/d3svg1/md5.svg":"https://s9.qhres2.com/static/e9c970724261e663.svg","./public/d3svg1/md51.svg":"https://s7.qhres2.com/static/57466b9085fcc2ea.svg","./public/d3svg1/md52.svg":"https://s5.qhres2.com/static/4bdced7a2e104377.svg","./public/d3svg1/md53.svg":"https://s7.qhres2.com/static/273f73f17afdcac5.svg","./public/d3svg1/md54.svg":"https://s6.qhres2.com/static/51c845288534d905.svg","./public/d3svg1/mid.svg":"https://s9.qhres2.com/static/21d3e21e0ca0faba.svg","./public/d3svg1/name.svg":"https://s5.qhres2.com/static/021ce05cc89c45ac.svg","./public/d3svg1/net.svg":"https://s5.qhres2.com/static/35b12ea3c8a5a69c.svg","./public/d3svg1/node.svg":"https://s9.qhres2.com/static/169d2bd7d9c9aa0a.svg","./public/d3svg1/node_type.svg":"https://s9.qhres2.com/static/97c1c618f9e222cf.svg","./public/d3svg1/org.svg":"https://s9.qhres2.com/static/76b597c211ea4d94.svg","./public/d3svg1/organization.svg":"https://s9.qhres2.com/static/e08c31cd00a3b926.svg","./public/d3svg1/outerip.svg":"https://s8.qhres2.com/static/7ff10a0d571809ad.svg","./public/d3svg1/proc.svg":"https://s5.qhres2.com/static/8abbf12fa662b659.svg","./public/d3svg1/proc_md5.svg":"https://s8.qhres2.com/static/e86f71a748180b4e.svg","./public/d3svg1/relate_ip.svg":"https://s6.qhres2.com/static/13610168689342fd.svg","./public/d3svg1/report.svg":"https://s7.qhres2.com/static/ecf1a790525d5848.svg","./public/d3svg1/router_mac.svg":"https://s6.qhres2.com/static/ccde05c4a61f0356.svg","./public/d3svg1/star.svg":"https://s8.qhres2.com/static/9dece9fb0beb1f0e.svg","./public/d3svg1/sys_icon.svg":"https://s8.qhres2.com/static/1df923965bc3ddc4.svg","./public/d3svg1/target_country.svg":"https://s8.qhres2.com/static/b9262dc9c2f7e0f1.svg","./public/d3svg1/target_industry.svg":"https://s9.qhres2.com/static/571b52805d048d92.svg","./public/d3svg1/thumbprint_md5.svg":"https://s5.qhres2.com/static/02dfbd0ae2c0e573.svg","./public/d3svg1/ttp.svg":"https://s5.qhres2.com/static/b95adbab7c0641d1.svg","./public/d3svg1/url.svg":"https://s8.qhres2.com/static/523349cc292da6b5.svg","./public/d3svg1/user_name.svg":"https://s8.qhres2.com/static/f701f463bc1e30c0.svg","./public/d3svg1/vendor.svg":"https://s8.qhres2.com/static/64d55f39fd1c821f.svg","./public/d3svg1/vul.svg":"https://s6.qhres2.com/static/d45444d8a175ead3.svg"};function Jr(e){try{var t,n=new RegExp("(^| )"+e+"=([^;]*)(;|$)");return(t=document.cookie.match(n))?unescape(t[2]):""}catch(r){return""}}function Oh(e,t,n){var r=(n=n||{}).expires;typeof r=="number"&&(r=new Date).setTime(r.getTime()+n.expires);try{document.cookie=e+"="+escape(t)+(r?";expires="+r.toGMTString():"")+(n.path?";path="+n.path:"")+(n.domain?"; domain="+n.domain:"")}catch(s){}}function d2(e){return e!=null&&e.constructor!=null?Object.prototype.toString.call(e).slice(8,-1):""}function u2(e){return d2(e)=="Array"}function Ta(e){return d2(e)=="Function"}function Sr(e){return e!==null&&typeof e=="object"}function Er(e,t,n){for(var r in t)(n||!e[r]&&!(r in e))&&(e[r]=t[r]);return e}const f2={"360se-ua":"360se","360ee":"360ee",edge:"edg",edge:"edga",edge:"edgios",TT:"tencenttraveler",Maxthon:"maxthon",GreenBrowser:"greenbrowser",Sogou:"se 2.x",TheWorld:"theworld"},hD=["Baiduspider","Googlebot","360Spider","Sosospider","Yahoo! Slurp China","Yahoo!","YoudaoBot","YodaoBot","Sogou web spider","Sogou inst spider","Sogou spider2","Sogou blog","Sogou News Spider","Sogou Orion spider","msnbot","msnbot-media","bingbot","bingpreview","YisouSpider","ia_archiver","EasouSpider","JikeSpider","Bytespider"];var xe=new class{constructor(){this._activeTime="",this.appkey="",this.trackId="",this.mid="",this.m2="",this.asc="",this.asc2="",this.debug=!1,this.heartbeatTimers={},this.config={wpoUrl:null,trackUrl:null,clickUrl:null,heartbeatUrl:null,clickHeatMapUrl:null,areaIds:null}}log(){if(!this.debug)return;const[e,...t]=arguments,n="[RadarMonitor] "+e;try{return console.log.apply(console,[n,...t])}catch(r){}}userAgentIsExitsSpiders(){const e=this.getUserAgent().toLowerCase();var t=!1;return hD.map(n=>{e.indexOf(n.toLowerCase())>=0&&(t=!0)}),t}setUtilActiveTime(e){this._activeTime=e}setHeartBeatStartTime(e,t){Er(this.getHeartBeatById(e),{startTime:t},!0)}setHeartBeatTimer(e,t){Er(this.getHeartBeatById(e),{timer:t},!0)}getHeartBeatStartTime(e){return this.getHeartBeatById(e).startTime}getHeartBeatTimer(e){return this.getHeartBeatById(e).timer}getHeartBeatById(e){return Sr(this.heartbeatTimers[e])||(this.heartbeatTimers[e]={}),this.heartbeatTimers[e]}deleteHeartBeat(e){delete this.heartbeatTimers[e]}setUtilConf(e,t){var n={};Sr(e)?n=e:n[e]=t,this.config=Er(this.config,n,!0)}getUtilConf(){return this.config}getColorDepth(){return window.screen.colorDepth+"-bit"}getLanguage(){return(navigator.language||navigator.browserLanguage).toLowerCase()}getUserAgent(){return navigator.userAgent}getScreenSize(){return window.screen.width+"x"+window.screen.height}getProject(){return this.appkey}setAppKey(e){/QH_[0-9]+_[0-9]*\#?[0-9]{1,}$/.test(e)?this.appkey=e:e&&this.log("当前写入的appkey: ",e," 格式异常,请前往雷达分析平台确认.")}getReferrer(){var e=document.referrer||"";return e.indexOf("pass")>-1||e.indexOf("pwd")>-1?"403":e}getBrowser(){var e=navigator.userAgent.toLowerCase(),t=!1;for(var n in f2)if(e.indexOf(f2[n])>-1)return n;try{+external.twGetVersion(external.twGetSecurityID(window)).replace(/\./g,"")>1013&&(t=!0)}catch(s){}if(t)return"360se-noua";var r=e.match(/(msie|chrome|safari|firefox|opera|trident)/);return(r=r?r[0]:"")=="msie"?r=e.match(/msie[^;]+/)+"":r=="trident"&&e.replace(/trident\/[0-9].*rv[ :]([0-9.]+)/gi,function(s,a){r="msie "+a}),r}getReferrerKeyWord(){const e=document.referrer;var t={q:"",eqid:""};if(!e)return t;for(var n=new URL(e).search.substring(1).split("&"),r={},s=0;s<n.length;s++){var a=n[s].split("=");r[a[0]]=a[1]}return e.indexOf("baidu.com")>-1?(t.q=r.wd,t.eqid=r.eqid):(e.indexOf("so.com")>-1||e.indexOf("sm.cn")>-1)&&(t.q=r.q),t.q||(t.q=""),t}getLocation(e){e||(e="");try{e=location.href}catch(t){(e=document.createElement("a")).href="",e=e.href}return e=/\.(s?htm|php)/.test(e)?e:e.replace(/\/$/,"")+"/"}hash(e){for(var t=0,n=0,r=e.length-1;r>=0;r--){var s=parseInt(e.charCodeAt(r),10);(n=266338304&(t=(t<<6&268435455)+s+(s<<14)))!=0&&(t^=n>>21)}return t}guid(){for(var e=[navigator.appName,navigator.version,navigator.language||navigator.browserLanguage,navigator.platform,navigator.userAgent,window.screen.width,"x",window.screen.height,window.screen.colorDepth,document.referrer].join(""),t=e.length,n=window.history.length;n;)e+=n--^t++;return 2147483647*(Math.round(2147483647*Math.random())^this.hash(e))}isLocal(){try{var e=location.protocol.toLowerCase();if(e=="http:"||e=="https:")return!1}catch(t){}return!0}getSid(){var e="__DC_sid",t=Jr(e);return!t&&(t=Jr("__sid"))&&t.split(".").length!==4&&(t=null),t||(t=[this.hash(this.isLocal()?"":document.domain),this.guid(),+new Date+Math.random()].join(".")),Oh(e,t,{expires:60*(this._activeTime||30)*1e3,path:"/"}),t}setUtilTrackId(e){this.trackId=e}getGid(e=!1){var t="__DC_gid",n=Jr(t);if(!n&&(n=Jr("__gid"))&&n.split(".").length!==5&&(n=null),n||(n=function(s){try{return JSON.parse(window.localStorage.getItem(s))}catch(a){return[]}}(t)),n)(n=n.split("."))[3]=new Date().getTime(),e&&(n[4]=(parseInt(n[4])||0)+1),n=n.join(".");else{var r=e?1:0;n=this.trackId?[this.trackId,1,1,new Date().getTime(),r].join("."):[this.hash(this.isLocal()?"":document.domain),Math.floor(1e9*Math.random()),new Date().getTime(),new Date().getTime(),r].join(".")}return function(s,a){try{window.localStorage.setItem(s,JSON.stringify(a))}catch(l){}}(t,n),Oh(t,n,{expires:63072e6,path:"/"}),n}getBrowserID(){return Ne(this,null,function*(){return new Promise((e,t)=>Ne(this,null,function*(){const n=this.getMid(),r=this.getASC(),[s,a]=yield Promise.all([this.getM2(),this.getASC2()]);return e({mid:n,m2:s,asc:r,asc2:a})}))})}getMid(){var e=this.mid;try{e=external.GetMID(external.GetSID(window)),this._setMid(e)}catch(t){}try{e.length!==32&&(e=window.wdextcmd.GetMid(),this._setMid(e))}catch(t){}return e}_setMid(e){this.mid=e}getM2(){return new Promise((e,t)=>{try{if(this.m2.length===0){const n=(r,s)=>{this.setM2(s),e(s)};external.AppCmd(external.GetSID(window),"","GetMID2","","",n)}}catch(n){}setTimeout(()=>{var n=this.m2;if(n===void 0)try{n=window.wdextcmd.GetMidV2(),this.setM2(n),e(n)}catch(r){}e(n)},500)})}setM2(e){this.m2=e}getASC(){var e=this.asc;try{e=external.GetASC(external.GetSID(window)),this.setASC(e)}catch(t){}try{e.length===0&&(e=window.wdextcmd.GetASC(),this.setASC(e))}catch(t){}try{e.length===0&&(e=Jr("__asc"),this.setASC(e))}catch(t){}return e}setASC(e){this.asc=e}getASC2(){return new Promise((e,t)=>{try{if(this.asc2.length===0){const n=(r,s)=>{this.setASC2(s),e(s)};external.AppCmd(external.GetSID(window),"","GetASC2","","",n)}}catch(n){}setTimeout(()=>{var n=this.asc2;try{n===void 0&&(n=window.wdextcmd.GetASC2(),this.setASC2(n))}catch(r){}try{n.length===0&&(n=Jr("__asc2"),this.setASC2(n))}catch(r){}e(n)},500)})}setASC2(e){this.asc2=e}getCount(){var e="__DC_monitor_count",t=Jr(e);return t||(t=Jr("monitor_count")),Oh(e,t=(parseInt(t)||0)+1,{expires:864e5,path:"/"}),t}getFlashVer(){var e=-1;if(navigator.plugins&&navigator.mimeTypes.length){var t=navigator.plugins["Shockwave Flash"];t&&t.description&&(e=t.description.replace(/([a-zA-Z]|\s)+/,"").replace(/(\s)+r/,".")+".0")}else if(window.ActiveXObject&&!window.opera)try{var n=new ActiveXObject("ShockwaveFlash.ShockwaveFlash");n&&(e=n.GetVariable("$version").replace(/WIN/g,"").replace(/,/g,"."))}catch(r){}return e=parseInt(e,10)}getContainerId(e){var t,n;for(this.getUtilConf().areaIds&&(t=new RegExp("^("+this.getUtilConf().areaIds.join("|")+")$","ig"));e;){if(e.attributes&&("bk"in e.attributes||"data-bk"in e.attributes)){if(n=e.getAttribute("bk")||e.getAttribute("data-bk"))return(n="bk:"+n).substr(0,100);if(e.id)return(n=e.getAttribute("data-desc")||e.id).substr(0,100)}else if(t&&e.id&&t.test(e.id))return(n=e.getAttribute("data-desc")||e.id).substr(0,100);e=e.parentNode}return""}trim(e){return e.replace(/^[\s\xa0\u3000]+|[\u3000\xa0\s]+$/g,"")}getText(e){var t="";return t=e.tagName.toLowerCase()=="input"?e.getAttribute("text")||e.getAttribute("data-text")||e.value||e.title||"":e.getAttribute("text")||e.getAttribute("data-text")||e.innerText||e.textContent||e.title||"",this.trim(t).substr(0,100)}getHref(e){try{return e.getAttribute("data-href")||e.href||""}catch(t){return""}}};function Ec(e,t,n){e.addEventListener?e&&e.addEventListener(t,n,!1):e&&e.attachEvent("on"+t,n)}function Ih(e,t,n){for(n=n||5,t=t.toUpperCase();e&&n-- >0;){if(e.tagName===t)return e;e=e.parentNode}return null}var Aa=[];function h2(e){Ta(e)&&Aa.push(e)}function pD(e){var t,n;if(u2(e))for(n=e.length,t=0;t<n;t++)h2(e[t]);else h2(e);(function(r){Aa.splice(Aa.indexOf(r),1)})(e),e=null}function p2(e){if(!("target"in e)){var t=e.srcElement||e.target;t&&t.nodeType==3&&(t=t.parentNode),e.target=t}return e}let gD=class{constructor(){this.baseExtend={},this.title="",this.placeholder=[]}getBase(t=!1){var n={p:xe.getProject(),u:xe.getLocation(),gid:xe.getGid(t),sid:xe.getSid(),title:this.getTitle()},r=xe.getReferrerKeyWord();return r&&(n.q=r.q,n.eqid=r.eqid),n}getBaseTrack(t){var n=xe.getSid()==xe.getSid()?1:0,r={b:xe.getBrowser(),c:xe.getCount(),r:xe.getReferrer(),fl:xe.getFlashVer(),sd:xe.getColorDepth(),sr:xe.getScreenSize(),ul:xe.getLanguage(),ua:xe.getUserAgent(),ce:n};if(t)try{t=t.split(",");for(var s=[],a=0,l=t.length;a<l;a++){var c=Jr(t[a]);s.push(t[a]+"="+encodeURIComponent(c))}r.uc=encodeURIComponent(s.join("&"))}catch(u){}return r}getClick(t){var n,r,s=(t=p2(t||event)).target,a=s.tagName,l=xe.getContainerId(s);if(l=="bk:noupload")return!1;if(!s.type||s.type!="submit"&&s.type!="button")return a=="AREA"?{f:xe.getHref(s),c:"area:"+s.parentNode.name,cId:l}:(a=="IMG"&&(n=s),!!(s=Ih(s,"A"))&&(r=xe.getText(s),{f:xe.getHref(s),c:r||(n?n.src.match(/[^\/]+$/):""),cId:l}));var c=Ih(s,"FORM"),u={};if(c){var d=c.id||"",f=s.id;if(u={f:c.action,c:"form:"+(c.name||d),cId:l},!(d!="search-form"&&d!="searchForm"||f!="searchBtn"&&f!="search-btn")){var p=$("kw")||$("search-kw")||$("kw1");u.w=p?p.value:""}}else u={f:xe.getHref(s),c:xe.getText(s),cId:l};return u}getKeydown(t){if((t=p2(t||event)).keyCode!=13)return!1;var n=t.target,r=n.tagName,s=xe.getContainerId(n);if(r=="INPUT"){var a=Ih(n,"FORM");if(a){var l=a.id||"",c=n.id,u={f:a.action,c:"form:"+(a.name||l),cId:s};return c!="kw"&&c!="search-kw"&&c!="kw1"||(u.w=n.value),u}}return!1}getBaseExtend(t){return t&&(this.baseExtend=t),this.baseExtend}getTitle(){return this.title||(this.title=document.title),this.title}setBaseTitle(t){this.title=t}},mD=class{constructor(t){this.master=t,this.lastLocation=xe.getLocation(),this.isStarted=!1}start(){if(!this.isStarted){var t="pushState"in window.history?"popstate":"hashchange",n=this;this.isStarted=!0,this.master.util.log("autoTrackPageChange"),this.master.util.log("hashEvent:",t),Ec(window,t,a=>{this.master.util.log(t+": "+document.location+", state: "+JSON.stringify(a.state)),n.lastLocation!==window.location.href&&(n.lastLocation=window.location.href,n.master.autoTrackEvent())});var r=window.history.pushState;Ta(history.pushState)&&r&&(history.pushState=function(a){r.apply(window.history,arguments),n.master.util.log("history.pushState",a),n.lastLocation=window.location.href,n.master.autoTrackEvent()});var s=window.history.replaceState;Ta(history.replaceState)&&s&&(history.replaceState=function(a){s.apply(window.history,arguments),n.master.util.log("history.replaceState",a),n.lastLocation=window.location.href,n.master.autoTrackEvent()})}}};var vD="2.4.0";const Xr=new class{constructor(){this.version=vD,this.data=new gD,this.util=xe,this.heatmap_enable=!1,this.disable_autoPV=!1,this.manualPV_enable=!1,this.autopv=new mD(this)}setAscAndAsc2(e,t){if(this.data.placeholder.length>0)return;const n=e||"",r=t||"";this.data.placeholder.push({asc:n},{asc2:r})}setThirdProps(e,t){if(!e||!t)return;const n={[e]:t};this.data.placeholder.length==2||this.setAscAndAsc2(),this.data.placeholder.push(n)}setFourthProps(e,t){e&&t&&(this.data.placeholder.length==3?this.data.placeholder.push({[e]:t}):xe.log("确认必须先调用setAscAndAsc2和setThirdProps接口"))}getLibVersion(){return this.version}setTitle(e){return this.data.setBaseTitle(e),this}setTrackId(e){return xe.setUtilTrackId(e.replace(/\./g,"")),this}getBrowserID(e){return Ne(this,null,function*(){return new Promise((t,n)=>Ne(this,null,function*(){if(e){if(this.data.placeholder.length<=0){const{mid:r,m2:s,asc:a,asc2:l}=yield xe.getBrowserID();this.data.placeholder=[{mid:r},{m2:s},{asc:a},{asc2:l}]}t(function(r){for(var s=[],a=0;a<r.length;a++)s.push(encodeURIComponent(Object.keys(r[a]))+"="+encodeURIComponent(Object.values(r[a])));return s.join("&")}(this.data.placeholder)+"&")}else n("")}))})}sendLog(e){window.__radar_monitor_imgs={};var t="log_"+ +new Date,n=window.__radar_monitor_imgs[t]=new Image;n.onload=n.onerror=()=>{window.__radar_monitor_imgs&&window.__radar_monitor_imgs[t]&&(window.__radar_monitor_imgs[t]=null,delete window.__radar_monitor_imgs[t])},n.src=e}buildLog(e,t=""){return Ne(this,null,function*(){var n="";if(e===!1)return;const r=t===this.getConf().trackUrl;e=e||{};var s,a=Er(this.data.getBase(r),this.data.getBaseExtend(),!0);e=Er(a,e,!0);try{s=yield this.getBrowserID(r)}catch(l){s=""}s+=function(l){var c=[];for(var u in l)l[u]!=null&&c.push(encodeURIComponent(u)+"="+encodeURIComponent(l[u]));return c.join("&")}(e),s+="&t="+ +new Date,(t=t.indexOf("?")>-1?t+"&"+s:t+"?"+s)!=n&&(n=t,setTimeout(()=>{n=""},100),this.sendLog(t))})}log(e,t){t=t||"click";const n=this.getConf()[t+"Url"];n?xe.userAgentIsExitsSpiders()||this.buildLog(function(r,s){var a,l=Aa.length,c=s;for(a=0;a<l;a++)try{c=Er(c,Aa[a].beforeLog(r,s))}catch(u){}return c}(t,e),n):xe.log("Error : the "+t+" url does not exist!")}setConf(e,t){return xe.setUtilConf(e,t),this}getConf(){return xe.getUtilConf()}setUrl(e){if(e)return xe.getLocation(e)}extendBase(e){if(e&&Sr(e)){var t=Er(this.data.getBaseExtend(),e,!0);this.data.getBaseExtend(t)}}setProject(e,t,n){return xe.setAppKey(e),this.extendBase(t),this.init(n),this}setDebug(e=!0,t,n,r){return xe.debug=e,e&&(xe.log("当前已开启debug模式,可能会输出log,发布前请关闭!!!"),xe.log("当前配置测试appkey:",t),xe.setAppKey(t),this.extendBase(n),this.init(r)),this}setTrackId(e){return xe.setUtilTrackId(e.replace(/\./g,"")),this}setId(e){for(var t=[];e=arguments[i++];)u2(e)?t=t.concat(e):t.push(e);return this.setConf("areaIds",t),this}init(e){var{trackForInit:t=!0}=e||{},n=location.protocol.toLowerCase()==="https:"?"https:":"http:";this.setConf({trackUrl:n+"//s.360.cn/qdas/s.htm",clickUrl:n+"//s.360.cn/qdas/c.htm",clickHeatMapUrl:n+"//s.360.cn/qdas/t.htm",wpoUrl:n+"//s.360.cn/qdas/p.htm",heartbeatUrl:n+"//s.360.cn/qdas/h.htm"}),t&&this.log(this.data.getBaseTrack(),"track")}setDisableAutoPV(e=!0){return this.disable_autoPV=e,this}setManualPVEnable(e=!0){return this.manualPV_enable=e,this}autoTrackEvent(){if(!this.disable_autoPV){var e=this.data.getBaseTrack();this.log(e,"track")}}getAutoTrack(){return this.autopv.start(),this}getTrack(e,t,n){var{enableMenualOnce:r=!1}=e||{};if(!r&&!this.manualPV_enable)return this;var s=this.data.getBaseTrack(n);return Sr(t)&&(s=Er(s,t,!0)),this.log(s,"track"),this}getClickHeatmap(e,t){if(!this.heatmap_enable){this.heatmap_enable=!0;var n=this,r=[];e=e||10,t=t||5;var s=0,a=l=>{if(clearTimeout(s),l||r.length>e)return r.length?(n.log({pos:r.join(","),sr:xe.getScreenSize()},"clickHeatMap"),void(r=[])):void 0;s=setTimeout(()=>{a(!0)},60*t*1e3)};return Ec(document,"mousedown",l=>{var c=l.pageX+"."+l.pageY;r.push(c),a()}),this}}getClickAndKeydown(){return Ec(document,"mousedown",e=>{var t=this.data.getClick(e);this.log(t,"click")}),Ec(document,"keydown",e=>{var t=this.data.getKeydown(e);this.log(t,"click")}),this}beginHeartBeat(e,t,n){var r={};r.id=e,Sr(t)&&(r=Er(r,t,!1)),(n=isNaN(n)?10:n)>60?n=60:n<5&&(n=5);var s=this;xe.setHeartBeatStartTime(e,Date.parse(new Date));var a=l=>{r.steptime=l,s.steptime=l,s.log(r,"heartbeat"),clearTimeout(xe.getHeartBeatTimer(e)),xe.setHeartBeatTimer(e,setTimeout(()=>{var c=(Date.parse(new Date)-xe.getHeartBeatStartTime(e))/1e3;a(c)},1e3*n))};a(0)}endHeartBeat(e,t){var n=xe.getHeartBeatStartTime(e);if(n!=null){var r={};r.id=e,Sr(t)&&(r=Er(r,t,!1)),clearTimeout(xe.getHeartBeatTimer(e));var s=(Date.parse(new Date)-n)/1e3;r.steptime=s,this.log(r,"heartbeat"),xe.deleteHeartBeat(e)}}setActiveTime(e){return xe.setUtilActiveTime(e),this}addPlugin(e){return pD(e)}use(e,t){return typeof(n=e)=="string"||n instanceof String?Sr(window.RADAR_MONITOR_WEBJSSDKPLUGIN)&&Sr(window.RADAR_MONITOR_WEBJSSDKPLUGIN[e])&&Ta(window.RADAR_MONITOR_WEBJSSDKPLUGIN[e].init)?(window.RADAR_MONITOR_WEBJSSDKPLUGIN[e].init(Xr,t),window.RADAR_MONITOR_WEBJSSDKPLUGIN[e]):Sr(Xr.modules)&&Sr(Xr.modules[e])&&Ta(Xr.modules[e].init)?(Xr.modules[e].init(Xr,t),Xr.modules[e]):void xe.log(e+"没有获取到,请查阅文档,调整"+e+"的引入顺序!"):(xe.log("use插件名称必须是字符串!"),!1);var n}};function yD(e){if(!e.ok)throw new Error(e.status+" "+e.statusText);return e.text()}function g2(e,t){return fetch(e,t).then(yD)}const bD=(e,t)=>{const n=document.createElement("a");n.download=t,n.style.display="none";const r=new window.Blob([e]);n.href=window.URL.createObjectURL(r),document.body.appendChild(n),n.click(),document.body.removeChild(n)},xc=(e,t)=>Ne(this,null,function*(){let n;return yield xr(e).then(r=>{const s=document.createElement("canvas");s.width=r.width,s.height=r.height,s.getContext("2d").drawImage(r,0,0,r.width,r.height),n=s.toDataURL("image/png")}),n});function xr(e){return Ne(this,null,function*(){return new Promise((t,n)=>{const r=new Image;r.crossOrigin="anonymous",r.onload=()=>{t(r)},r.onerror=s=>{n(s)},r.src=e})})}function Bh(e){if(typeof e=="number"||e===!0)return!0;var t=e===!1||e===null||e===void 0||Object.keys(e).length===0||/^\s*$/gim.test(e.toString());return!t}function es(){var e=/macintosh|mac os x/i.test(navigator.userAgent);return e}function Qr(e,t){var a;["label","textProp","detail","collect","fx","fy"].map(l=>{e[l]=e[l]?e[l]:null}),e.show=e.show?e.show:!0,e.type&&e.type!=="nodeType"&&(e.type=e.type.toLowerCase()),(["org","vul","email","family"].indexOf(e.type)>=0||e.startNode===!0)&&(e.textProp="name");const s={};if(e.type!=="nodeType"&&e.type!=="aggregation"&&((a=t[e.type])!=null&&a.length)){for(let l=0;l<t[e.type].length;l++){const c=t[e.type][l];s[c.name]=!1}e.getData=s}return e}function wD(e){return e&&e.replace(/[^\x09\x0A\x0D\x20-\xFF\x85\xA0-\uD7FF\uE000-\uFDCF\uFDE0-\uFFFD]/gm,"")}function vn(...e){localStorage.getItem("showSafeForceGraphLog")&&console.log(...e)}function qt(e){Xr.log(e,"click")}function Lh(e,t,n,r,s){const a=n-e,l=r-t,c=Math.sqrt(a*a+l*l),u=e+a/c*(c-s),d=t+l/c*(c-s);return{x:u||0,y:d||0}}function m2(e,t="#666",n="#fff"){if(!e)return e;const s=new DOMParser().parseFromString(e,"image/svg+xml"),a=s.querySelector("g");return a?(a.setAttribute("color",n),s.querySelectorAll("[stroke]").forEach(f=>{f.getAttribute("stroke")!=="none"&&f.setAttribute("stroke",t)}),s.querySelectorAll("[class]").forEach(f=>{f.getAttribute("class").split(" ").includes("no-stroke")&&f.setAttribute("stroke","none")}),s.querySelectorAll(".text-bg").forEach(f=>{f.getAttribute("fill")!=="none"&&f.setAttribute("fill",t)}),new XMLSerializer().serializeToString(s)):void 0}function _D(e){if(!e)return e;const r=new DOMParser().parseFromString(e,"image/svg+xml").querySelector("svg"),s=r.getAttribute("width"),a=r.getAttribute("height");return{width:parseInt(s),height:parseInt(a)}}function v2(e){return new Promise((t,n)=>{try{const r="data:image/svg+xml;base64,";e=e.replace(r,"");const s=atob(e);t(s)}catch(r){n(r)}})}function y2(e){const t="0123456789abcdefghijklmnopqrstuvwxyz",n=t.length;let r="";for(let s=0;s<e;s++)r+=t.charAt(Math.ceil(Math.random()*(n-1)));return r}function CD(e){return{}.VITE_SVG_TYPE==="base64"?v2(e):g2(e)}function Rh(e){let t={};return t=c2,t[e]}function ts(e){return Rh(`./public/d3svg1/${e}.svg`)}const Ph={};function SD(r){return Ne(this,arguments,function*({node:e,levelList:t,darkMode:n}){var c,u,d,f,p,g,v,b,w,_;let s=null;const a=(d=(u=(c=e.detail)==null?void 0:c.info)==null?void 0:u.basic)==null?void 0:d.flag,l=((g=(p=(f=e==null?void 0:e.detail)==null?void 0:f.info)==null?void 0:p.basic)==null?void 0:g.level)||"";if(e.detail&&((b=(v=e.detail)==null?void 0:v.info)!=null&&b.inner_img))try{s=e.detail.info.inner_img}catch(C){console.log("loadCompleted error",C)}else if(e.type==="nodeType"||e.type==="aggregation"){const C=e.icon||"node_type";s=ts(C)?ts(C):ts("node_type")}else if(a&&(e.type==="ip"||e.type==="internet"))s=Rh(`./public/d3svg1/flags/${a}.png`);else if((_=(w=e.detail)==null?void 0:w.info)!=null&&_.inner_country&&(e.type==="country"||e.type==="target_country")){const C=e.detail.info.inner_country;s=Rh(`./public/d3svg1/flags/${C}.png`)}else{const C=`${e.type||"node"}${l}${n}`;if(Ph[C])return s=Ph[C],s;const k=ts(e.type)?ts(e.type):ts("node"),S=yield CD(k),E=ao(l,t,n);s=m2(S,E,n?"#182628":"#fff"),s="data:image/svg+xml,"+encodeURIComponent(s),Ph[C]=s}return s})}function kc(e){return typeof e!="object"||e===null||!e?e:Array.isArray(e)?e.map(t=>kc(t)):Object.keys(e).reduce((t,n)=>(t[n.toLowerCase()]=kc(e[n]),t),{})}const Zoe="",Dh={inject:["levelList","getDarkMode"],props:{nodeInfo:{type:Object,default:()=>{}}},data(){return{imgUrl:"",strokeColor:""}},computed:{darkMode(){return this.getDarkMode()},isCountryFlag(){var r,s,a,l,c,u,d,f;const e=(a=(s=(r=this.nodeInfo)==null?void 0:r.detail)==null?void 0:s.info)==null?void 0:a.inner_country,t=(d=(u=(c=(l=this.nodeInfo)==null?void 0:l.detail)==null?void 0:c.info)==null?void 0:u.basic)==null?void 0:d.flag,n=(f=this.nodeInfo)==null?void 0:f.type;return t&&(n==="ip"||n==="internet")||e&&(n==="country"||n==="target_country")}},watch:{darkMode:{handler(){this.handleImgUrl()}},nodeInfo:{handler(){this.handleImgUrl()},deep:!0}},created(){this.handleImgUrl()},methods:{handleImgUrl(){var t,n,r,s;SD({node:this.nodeInfo,levelList:this.levelList,darkMode:this.darkMode}).then(a=>{this.imgUrl=a});const e=(s=(r=(n=(t=this.nodeInfo)==null?void 0:t.detail)==null?void 0:n.info)==null?void 0:r.basic)==null?void 0:s.level;this.strokeColor=ao(e,this.levelList,this.darkMode)}}},b2=()=>{o.useCssVars(e=>({"20587f86":e.strokeColor}))},w2=Dh.setup;Dh.setup=w2?(e,t)=>(b2(),w2(e,t)):b2;const ED={key:0,class:"flag-border"},xD=["src"],kD=["src"];function ND(e,t,n,r,s,a){return a.isCountryFlag?(o.openBlock(),o.createElementBlock("div",ED,[o.createElementVNode("img",{class:"node-img",src:s.imgUrl},null,8,xD)])):(o.openBlock(),o.createElementBlock("img",{key:1,class:"node-img",src:s.imgUrl},null,8,kD))}const Oa=_t(Dh,[["render",ND],["__scopeId","data-v-5fdfe48e"]]),kr={computed:{imgPath(){let e={};return e=c2,e}}},Re={},Mh=un.reactive({filterValues:""}),Fh={name:"fix_nodes",namec:"固定节点"},$h={name:"un_fix_nodes",namec:"解除固定"},TD={name:"show_names",namec:"显示名称"},AD={name:"un_show_names",namec:"隐藏名称"},OD={name:"un_show_label",namec:"隐藏备注"},ID={name:"show_label",namec:"显示备注"},_2={name:"hold_aggregation",namec:"单边子顶点聚合"},C2={name:"release_aggregation",namec:"聚合顶点释放"},BD={name:"copy",namec:"复制"},S2={name:"node_star",namec:"收藏"},E2={name:"un_node_star",namec:"取消收藏"},x2={name:"edit_label",namec:"修改备注"},zh={name:"delete_node",namec:"删除"},k2={name:"select_children",namec:"子顶点选择"},N2={name:"select_parents",namec:"父顶点选择"},LD={name:"add_con_node",namec:"添加关联节点"},RD={name:"expand_node",namec:"展开全部关系"};function Nc(e){var c;const t=[],n=[],r=[],s=["APT攻击","海莲花","Generic","Cometer","勒索软件","恶意下载链接","僵尸网络","后门软件","流氓推广","Ewind","alexa_top10k","Panda","Operation_2020_Model","Zenpak","Ewind","Boogr"],a=["APT-C-00","Trojan","木马"],l=e.length;for(let u=0;u<l;u++)s.includes((c=e[u])==null?void 0:c.name)?(e[u].typeLevel="danger",t.push(e[u])):e[u].name.toLowerCase().indexOf("cve")===0?(e[u].typeLevel="cve",n.push(e[u])):a.some(d=>e[u].name.indexOf(d)>=0)?(e[u].typeLevel="danger",t.push(e[u])):(e[u].typeLevel="other",r.push(e[u]));return[...t,...n,...r]}function Tc(e){if(!e)return[];const t=[void 0,"danger","warning","info","success",void 0],n=[],r=[];return e.forEach(s=>{let a,l,c,u,d,f;typeof s=="object"?(a=s.name||s.tag,l=s.desc,c=s.user||void 0,u=s.type>0?t[s.type]||t[s.type-10]:void 0,f=s.type>=10,d=s.source_name?s.source_name:""):(a=s,l=""),r.indexOf(a)<0&&(r.push(a),n.push({name:a,desc:l,user:c,type:u,disabled:f,source_name:d}))}),n}var T2={exports:{}};/*!
|
|
100
100
|
* clipboard.js v2.0.11
|
|
101
101
|
* https://clipboardjs.com/
|
|
102
102
|
*
|
|
103
103
|
* Licensed MIT © Zeno Rocha
|
|
104
|
-
*/(function(e,t){(function(r,s){e.exports=s()})(wi,function(){return function(){var n={686:function(a,l,c){c.d(l,{default:function(){return ie}});var u=c(279),d=c.n(u),f=c(370),p=c.n(f),g=c(817),v=c.n(g);function b(ee){try{return document.execCommand(ee)}catch(Y){return!1}}var w=function(Y){var J=v()(Y);return b("cut"),J},_=w;function C(ee){var Y=document.documentElement.getAttribute("dir")==="rtl",J=document.createElement("textarea");J.style.fontSize="12pt",J.style.border="0",J.style.padding="0",J.style.margin="0",J.style.position="absolute",J.style[Y?"right":"left"]="-9999px";var oe=window.pageYOffset||document.documentElement.scrollTop;return J.style.top="".concat(oe,"px"),J.setAttribute("readonly",""),J.value=ee,J}var k=function(Y,J){var oe=C(Y);J.container.appendChild(oe);var re=v()(oe);return b("copy"),oe.remove(),re},S=function(Y){var J=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{container:document.body},oe="";return typeof Y=="string"?oe=k(Y,J):Y instanceof HTMLInputElement&&!["text","search","url","tel","password"].includes(Y==null?void 0:Y.type)?oe=k(Y.value,J):(oe=v()(Y),b("copy")),oe},E=S;function N(ee){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?N=function(J){return typeof J}:N=function(J){return J&&typeof Symbol=="function"&&J.constructor===Symbol&&J!==Symbol.prototype?"symbol":typeof J},N(ee)}var A=function(){var Y=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},J=Y.action,oe=J===void 0?"copy":J,re=Y.container,z=Y.target,G=Y.text;if(oe!=="copy"&&oe!=="cut")throw new Error('Invalid "action" value, use either "copy" or "cut"');if(z!==void 0)if(z&&N(z)==="object"&&z.nodeType===1){if(oe==="copy"&&z.hasAttribute("disabled"))throw new Error('Invalid "target" attribute. Please use "readonly" instead of "disabled" attribute');if(oe==="cut"&&(z.hasAttribute("readonly")||z.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(G)return E(G,{container:re});if(z)return oe==="cut"?_(z):E(z,{container:re})},I=A;function O(ee){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?O=function(J){return typeof J}:O=function(J){return J&&typeof Symbol=="function"&&J.constructor===Symbol&&J!==Symbol.prototype?"symbol":typeof J},O(ee)}function F(ee,Y){if(!(ee instanceof Y))throw new TypeError("Cannot call a class as a function")}function P(ee,Y){for(var J=0;J<Y.length;J++){var oe=Y[J];oe.enumerable=oe.enumerable||!1,oe.configurable=!0,"value"in oe&&(oe.writable=!0),Object.defineProperty(ee,oe.key,oe)}}function M(ee,Y,J){return Y&&P(ee.prototype,Y),J&&P(ee,J),ee}function W(ee,Y){if(typeof Y!="function"&&Y!==null)throw new TypeError("Super expression must either be null or a function");ee.prototype=Object.create(Y&&Y.prototype,{constructor:{value:ee,writable:!0,configurable:!0}}),Y&&U(ee,Y)}function U(ee,Y){return U=Object.setPrototypeOf||function(oe,re){return oe.__proto__=re,oe},U(ee,Y)}function Q(ee){var Y=j();return function(){var oe=K(ee),re;if(Y){var z=K(this).constructor;re=Reflect.construct(oe,arguments,z)}else re=oe.apply(this,arguments);return q(this,re)}}function q(ee,Y){return Y&&(O(Y)==="object"||typeof Y=="function")?Y:D(ee)}function D(ee){if(ee===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return ee}function j(){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(ee){return!1}}function K(ee){return K=Object.setPrototypeOf?Object.getPrototypeOf:function(J){return J.__proto__||Object.getPrototypeOf(J)},K(ee)}function H(ee,Y){var J="data-clipboard-".concat(ee);if(Y.hasAttribute(J))return Y.getAttribute(J)}var R=function(ee){W(J,ee);var Y=Q(J);function J(oe,re){var z;return F(this,J),z=Y.call(this),z.resolveOptions(re),z.listenClick(oe),z}return M(J,[{key:"resolveOptions",value:function(){var re=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.action=typeof re.action=="function"?re.action:this.defaultAction,this.target=typeof re.target=="function"?re.target:this.defaultTarget,this.text=typeof re.text=="function"?re.text:this.defaultText,this.container=O(re.container)==="object"?re.container:document.body}},{key:"listenClick",value:function(re){var z=this;this.listener=p()(re,"click",function(G){return z.onClick(G)})}},{key:"onClick",value:function(re){var z=re.delegateTarget||re.currentTarget,G=this.action(z)||"copy",te=I({action:G,container:this.container,target:this.target(z),text:this.text(z)});this.emit(te?"success":"error",{action:G,text:te,trigger:z,clearSelection:function(){z&&z.focus(),window.getSelection().removeAllRanges()}})}},{key:"defaultAction",value:function(re){return H("action",re)}},{key:"defaultTarget",value:function(re){var z=H("target",re);if(z)return document.querySelector(z)}},{key:"defaultText",value:function(re){return H("text",re)}},{key:"destroy",value:function(){this.listener.destroy()}}],[{key:"copy",value:function(re){var z=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{container:document.body};return E(re,z)}},{key:"cut",value:function(re){return _(re)}},{key:"isSupported",value:function(){var re=arguments.length>0&&arguments[0]!==void 0?arguments[0]:["copy","cut"],z=typeof re=="string"?[re]:re,G=!!document.queryCommandSupported;return z.forEach(function(te){G=G&&!!document.queryCommandSupported(te)}),G}}]),J}(d()),ie=R},828:function(a){var l=9;if(typeof Element!="undefined"&&!Element.prototype.matches){var c=Element.prototype;c.matches=c.matchesSelector||c.mozMatchesSelector||c.msMatchesSelector||c.oMatchesSelector||c.webkitMatchesSelector}function u(d,f){for(;d&&d.nodeType!==l;){if(typeof d.matches=="function"&&d.matches(f))return d;d=d.parentNode}}a.exports=u},438:function(a,l,c){var u=c(828);function d(g,v,b,w,_){var C=p.apply(this,arguments);return g.addEventListener(b,C,_),{destroy:function(){g.removeEventListener(b,C,_)}}}function f(g,v,b,w,_){return typeof g.addEventListener=="function"?d.apply(null,arguments):typeof b=="function"?d.bind(null,document).apply(null,arguments):(typeof g=="string"&&(g=document.querySelectorAll(g)),Array.prototype.map.call(g,function(C){return d(C,v,b,w,_)}))}function p(g,v,b,w){return function(_){_.delegateTarget=u(_.target,v),_.delegateTarget&&w.call(g,_)}}a.exports=f},879:function(a,l){l.node=function(c){return c!==void 0&&c instanceof HTMLElement&&c.nodeType===1},l.nodeList=function(c){var u=Object.prototype.toString.call(c);return c!==void 0&&(u==="[object NodeList]"||u==="[object HTMLCollection]")&&"length"in c&&(c.length===0||l.node(c[0]))},l.string=function(c){return typeof c=="string"||c instanceof String},l.fn=function(c){var u=Object.prototype.toString.call(c);return u==="[object Function]"}},370:function(a,l,c){var u=c(879),d=c(438);function f(b,w,_){if(!b&&!w&&!_)throw new Error("Missing required arguments");if(!u.string(w))throw new TypeError("Second argument must be a String");if(!u.fn(_))throw new TypeError("Third argument must be a Function");if(u.node(b))return p(b,w,_);if(u.nodeList(b))return g(b,w,_);if(u.string(b))return v(b,w,_);throw new TypeError("First argument must be a String, HTMLElement, HTMLCollection, or NodeList")}function p(b,w,_){return b.addEventListener(w,_),{destroy:function(){b.removeEventListener(w,_)}}}function g(b,w,_){return Array.prototype.forEach.call(b,function(C){C.addEventListener(w,_)}),{destroy:function(){Array.prototype.forEach.call(b,function(C){C.removeEventListener(w,_)})}}}function v(b,w,_){return d(document.body,b,w,_)}a.exports=f},817:function(a){function l(c){var u;if(c.nodeName==="SELECT")c.focus(),u=c.value;else if(c.nodeName==="INPUT"||c.nodeName==="TEXTAREA"){var d=c.hasAttribute("readonly");d||c.setAttribute("readonly",""),c.select(),c.setSelectionRange(0,c.value.length),d||c.removeAttribute("readonly"),u=c.value}else{c.hasAttribute("contenteditable")&&c.focus();var f=window.getSelection(),p=document.createRange();p.selectNodeContents(c),f.removeAllRanges(),f.addRange(p),u=f.toString()}return u}a.exports=l},279:function(a){function l(){}l.prototype={on:function(c,u,d){var f=this.e||(this.e={});return(f[c]||(f[c]=[])).push({fn:u,ctx:d}),this},once:function(c,u,d){var f=this;function p(){f.off(c,p),u.apply(d,arguments)}return p._=u,this.on(c,p,d)},emit:function(c){var u=[].slice.call(arguments,1),d=((this.e||(this.e={}))[c]||[]).slice(),f=0,p=d.length;for(f;f<p;f++)d[f].fn.apply(d[f].ctx,u);return this},off:function(c,u){var d=this.e||(this.e={}),f=d[c],p=[];if(f&&u)for(var g=0,v=f.length;g<v;g++)f[g].fn!==u&&f[g].fn._!==u&&p.push(f[g]);return p.length?d[c]=p:delete d[c],this}},a.exports=l,a.exports.TinyEmitter=l}},r={};function s(a){if(r[a])return r[a].exports;var l=r[a]={exports:{}};return n[a](l,l.exports,s),l.exports}return function(){s.n=function(a){var l=a&&a.__esModule?function(){return a.default}:function(){return a};return s.d(l,{a:l}),l}}(),function(){s.d=function(a,l){for(var c in l)s.o(l,c)&&!s.o(a,c)&&Object.defineProperty(a,c,{enumerable:!0,get:l[c]})}}(),function(){s.o=function(a,l){return Object.prototype.hasOwnProperty.call(a,l)}}(),s(686)}().default})})(T2);var PD=T2.exports;const DD=Vy(PD),Ac=e=>{const t=(e==null?void 0:e.appendToBody)===void 0?!0:e.appendToBody;return{toClipboard(n,r){return new Promise((s,a)=>{const l=document.createElement("button"),c=new DD(l,{text:()=>n,action:()=>"copy",container:r!==void 0?r:document.body});c.on("success",u=>{c.destroy(),s(u)}),c.on("error",u=>{c.destroy(),a(u)}),t&&document.body.appendChild(l),l.click(),t&&document.body.removeChild(l)})}}},Qoe="",{toClipboard:MD}=Ac(),FD={name:"NodeDetail",components:{NodeIcon:Oa,QuestionFilled:S1,ForceGraphSvgIcon:so},mixins:[kr],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"?"":Sc(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(RD),e.push(x2),e.push(BD),e.push(this.data.collect?E2:S2),e.push(this.data.textProp==="name"?AD:TD),e.push(this.data.fx?$h:Fh),e.push(zh),this.data.label&&e.push(this.data.textProp==="label"?OD:ID);else if(this.selectedNodes.length===1&&this.selectedNodes[0].type==="aggregation"){const r=this.history.dataNow.links.some(s=>s.source.id===this.data.id&&s.target.type==="aggregation");e.push(r||this.data.type==="aggregation"?C2:_2),e.push(this.data.fx?$h:Fh),e.push(zh)}else{const r=this.history.dataNow.links.some(d=>d.source.id===this.data.id&&d.target.type==="aggregation"),s=this.history.dataNow.links.filter(d=>d.source.id===this.data.id),a=this.history.dataNow.links.filter(d=>d.target.id===this.data.id),l=s.map(d=>d.target),c=a.map(d=>d.source),u=l.some(d=>{let f=0;return this.history.dataNow.links.map(p=>{p.source.id===d.id&&f++}),f===0});this.data.type!=="aggregation"&&this.data.type!=="nodeType"?(e.push(x2),e.push(this.data.collect?E2:S2),l.length===1&&e.push(k2),c.length===1&&e.push(N2)):(l.length>0&&e.push(k2),c.length>0&&e.push(N2)),e.push(this.data.fx?$h:Fh),r||this.data.type==="aggregation"?e.push(C2):u&&e.push(_2),e.push(LD),e.push(zh)}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(){Si(Re,"flagIcon",e=>{this.flagFiles={},e!==void 0&&(this.flagFiles=e)})},mounted(){Si(Re,"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(){Ei(Re,"flagIcon"),Ei(Re,"relationNum")},methods:{isSomething(e){return Bh(e)},hover(e){this.current=e},out(){this.current=null},handleButtonClick(e){qt({cId:"rightMenu-"+e.name,c:"右侧菜单-"+e.namec}),this.selectedNodes.length>1?ve(Re,"buttonClick",{nodes:[...this.selectedNodes],api:e}):this.data.type!=="nodeType"?ve(Re,"buttonClick",{nodes:[...this.selectedNodes],api:e}):ve(Re,"buttonClick",{nodes:[...this.selectedNodes],api:e})},copyText(e){qt({cId:"copyText",c:"复制"}),MD(e).then(t=>Nt({message:"复制成功",type:"success"}),t=>Nt.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 s="-";return r&&(n?s=t.length?t.join("|"):"-":s=t||"-"),s},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 Nc(Tc(e))}}},$D={class:"node-detail-block"},zD={class:"node-preview"},UD={class:"left"},jD={class:"icon-group"},qD={key:0,class:"md5-type"},HD=["title"],GD={class:"right"},WD=["title"],KD={class:"title-top"},YD={key:0,class:"node-num"},JD={class:"opt-btns"},XD={key:0,class:"node-num"},QD={class:"opt-btns"},ZD={class:"node-field-list"},VD={key:0,class:"row-item row-item-tag"},eM={class:"value"},tM={class:"graph-tags-box"},nM={key:0,class:"row-item"},rM={class:"label"},iM=["title"],oM={class:"detail"},sM=["title"],aM=["title"],lM={key:1,class:"select-mults"},cM={class:"title-top"},dM={class:"node-num"},uM={class:"controls-box"},fM=["onMouseenter"];function hM(e,t,n,r,s,a){const l=o.resolveComponent("NodeIcon"),c=gn,u=Ea,d=o.resolveComponent("QuestionFilled"),f=Ye,p=o.resolveComponent("force-graph-svg-icon");return o.openBlock(),o.createElementBlock("div",$D,[n.selectedNodes.length===1?(o.openBlock(),o.createElementBlock(o.Fragment,{key:0},[o.createElementVNode("div",zD,[o.createElementVNode("div",UD,[o.createElementVNode("div",jD,[o.createVNode(l,{class:"node-icon","node-info":n.data},null,8,["node-info"]),n.data.type==="md5"?(o.openBlock(),o.createElementBlock("p",qD,o.toDisplayString(n.data.detail&&n.data.detail.info.basic.file_type.toUpperCase()||"MD5"),1)):o.createCommentVNode("",!0)]),a.canGoDetail&&n.data.detail&&n.data.detail.info.basic.level?(o.openBlock(),o.createElementBlock("div",{key:0,class:o.normalizeClass(["level-text",a.levelClassName]),title:n.data.detail&&n.data.detail.info.basic.level},o.toDisplayString(n.data.detail&&n.data.detail.info.basic.level),11,HD)):o.createCommentVNode("",!0)]),o.createElementVNode("div",GD,[o.createElementVNode("div",{class:o.normalizeClass(["id-box",n.data.type==="nodeType"||n.data.type==="aggregation"?"id-box2":""]),title:n.data.name},[o.createElementVNode("h3",KD,[a.canGoUrl?(o.openBlock(),o.createElementBlock(o.Fragment,{key:0},[o.createElementVNode("span",{class:"go-result",onClick:t[0]||(t[0]=g=>a.handleButtonClick({name:"go_result",namec:"详情页查看",type:2}))},[o.createTextVNode(o.toDisplayString(a.cutName(n.data.name==="聚合"?"聚合节点":n.data.name))+" ",1),n.data.type==="nodeType"||n.data.type==="aggregation"?(o.openBlock(),o.createElementBlock("span",YD,o.toDisplayString(s.childNodesLength),1)):o.createCommentVNode("",!0)]),o.createElementVNode("span",JD,[o.createVNode(c,{content:"复制","popper-class":"el-tooltip-gray"},{default:o.withCtx(()=>[o.createElementVNode("img",{src:"https://s7.qhres2.com/static/d42d48bb495c87dc.svg",class:"id-copy",onClick:t[1]||(t[1]=o.withModifiers(g=>a.copyText(n.data.name),["prevent"]))})]),_:1})])],64)):(o.openBlock(),o.createElementBlock(o.Fragment,{key:1},[o.createTextVNode(o.toDisplayString(a.cutName(n.data.name==="聚合"?"聚合节点":n.data.name))+" ",1),n.data.type==="nodeType"||n.data.type==="aggregation"?(o.openBlock(),o.createElementBlock("span",XD,o.toDisplayString(s.childNodesLength),1)):o.createCommentVNode("",!0),o.createElementVNode("span",QD,[o.createVNode(c,{content:"复制","popper-class":"el-tooltip-gray"},{default:o.withCtx(()=>[o.createElementVNode("img",{src:"https://s7.qhres2.com/static/d42d48bb495c87dc.svg",class:"id-copy",onClick:t[2]||(t[2]=g=>a.copyText(n.data.name))})]),_:1})])],64))])],10,WD)])]),o.createElementVNode("div",ZD,[n.data.detail&&n.data.detail.tags&&n.data.detail.tags.length>0?(o.openBlock(),o.createElementBlock("div",VD,[t[6]||(t[6]=o.createElementVNode("div",{class:"label"},"标签:",-1)),o.createElementVNode("div",eM,[o.createElementVNode("div",tM,[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(a.formatTags(n.data.detail.tags),(g,v)=>(o.openBlock(),o.createBlock(c,{key:v,"popper-class":"el-tooltip-gray"},{content:o.withCtx(()=>[o.createElementVNode("div",null,[o.createTextVNode(o.toDisplayString(g.name===g.desc?g.name:g.name+":"+g.desc)+" ",1),g.disabled?(o.openBlock(),o.createElementBlock(o.Fragment,{key:0},[t[4]||(t[4]=o.createElementVNode("br",null,null,-1)),t[5]||(t[5]=o.createTextVNode(" 标签状态:失效 "))],64)):o.createCommentVNode("",!0)])]),default:o.withCtx(()=>[o.createVNode(u,{class:o.normalizeClass(["graph-tag-one",`${g.type||"unknown"} ${g.disabled?"tag-disable":""}`]),type:g.type||"info"},{default:o.withCtx(()=>[o.createTextVNode(o.toDisplayString(g.name),1)]),_:2},1032,["class","type"])]),_:2},1024))),128))])])])):o.createCommentVNode("",!0),(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(a.fieldMapThisType,(g,v)=>(o.openBlock(),o.createElementBlock(o.Fragment,null,[a.canShowField(g)?(o.openBlock(),o.createElementBlock("div",nM,[o.createElementVNode("div",rM,o.toDisplayString(g.zh)+":",1),o.createElementVNode("div",{class:o.normalizeClass(["value",{virus:g.prop==="virus_name"}]),title:n.data.detail.info.basic[v]},[o.createElementVNode("p",oM,[Array.isArray(n.data.detail.info.basic[g.prop])?(o.openBlock(),o.createElementBlock("span",{key:0,class:"item",title:n.data.detail.info.basic[v]},o.toDisplayString(a.getFieldValue(g)),9,sM)):(o.openBlock(),o.createElementBlock("span",{key:1,class:o.normalizeClass(["item",{desc:g.show_all}]),title:n.data.detail.info.basic[v]},[o.createTextVNode(o.toDisplayString(a.getFieldValue(g))+" ",1),g.zh==="应用类型"&&a.getUsageTypeContent(n.data.detail.info.basic[g.prop])?(o.openBlock(),o.createBlock(c,{key:0,content:a.getUsageTypeContent(n.data.detail.info.basic[g.prop]),placement:"bottom","popper-class":"el-tooltip-gray"},{default:o.withCtx(()=>[o.createVNode(f,null,{default:o.withCtx(()=>[o.createVNode(d)]),_:1})]),_:2},1032,["content"])):o.createCommentVNode("",!0)],10,aM))])],10,iM)])):o.createCommentVNode("",!0)],64))),256))])],64)):n.selectedNodes.length>1?(o.openBlock(),o.createElementBlock("div",lM,[o.createElementVNode("h3",cM,[t[7]||(t[7]=o.createTextVNode(" 选中节点")),o.createElementVNode("span",dM,o.toDisplayString(n.selectedNodes.length),1)])])):o.createCommentVNode("",!0),o.withDirectives(o.createElementVNode("div",uM,[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(s.controls,(g,v)=>(o.openBlock(),o.createElementBlock("div",{key:v,class:"image-list",onMouseenter:b=>a.hover(v),onMouseleave:t[3]||(t[3]=b=>a.out())},[o.createVNode(c,{content:g.namec,"popper-class":"el-tooltip-gray"},{default:o.withCtx(()=>[o.createVNode(p,{class:o.normalizeClass(["button-img",n.requestGraphData?s.controls.length>9?"button-img-more ":"":"disabled"]),"icon-class":e.imgPath["./public/d3svg1/button22/button_"+g.name+".svg"],onClick:b=>a.handleButtonClick(g)},null,8,["icon-class","class","onClick"])]),_:2},1032,["content"])],40,fM))),128))],512),[[o.vShow,s.controls.length>0]])])}const pM=_t(FD,[["render",hM]]),Zoe="",Uh={name:"fix_nodes",namec:"固定节点",type:2},jh={name:"un_fix_nodes",namec:"解除固定",type:2},A2={name:"all_fix_nodes",namec:"全部固定节点",type:2},O2={name:"all_un_fix_nodes",namec:"全部解除固定",type:2},qh={name:"show_names",namec:"显示名称",type:2},Hh={name:"un_show_names",namec:"隐藏名称",type:2},Gh={name:"un_show_label",namec:"隐藏备注",type:2},Wh={name:"show_label",namec:"显示备注",type:2},I2={name:"all_show_names",namec:"全部显示名称",type:2},B2={name:"all_un_show_names",namec:"全部隐藏名称",type:2},L2={name:"all_un_show_label",namec:"全部隐藏备注",type:2},R2={name:"all_show_label",namec:"全部显示备注",type:2},P2={name:"undo",namec:"撤销",type:2},D2={name:"redo",namec:"恢复",type:2},M2={name:"single_edge_select",namec:"单边子顶点选择",type:2},F2={name:"hold_aggregation",namec:"单边子顶点聚合",type:2},$2={name:"release_aggregation",namec:"聚合顶点释放",type:2},Kh={name:"copy",namec:"复制",type:2,shortcut:"Ctrl+c"},Yh={name:"node_star",namec:"收藏",type:2},Jh={name:"un_node_star",namec:"取消收藏",type:2},Xh={name:"edit_label",namec:"修改备注",type:2},z2={name:"expand_node",namec:"完整展开",type:2},U2={name:"expand_part_node",namec:"部分展开",type:2},j2={name:"go_result",namec:"详情页查看",type:2},gM={name:"show_group",namec:"分组显示",type:2},mM={name:"hide_group",namec:"隐藏分组",type:2},Qh={name:"delete_node",namec:"删除",type:2,shortcut:"Delete"},vM=Object.freeze(Object.defineProperty({__proto__:null,allFixNodes:A2,allShowLabel:R2,allShowNames:I2,allUnFixNodes:O2,allUnShowLabel:L2,allUnShowNames:B2,copy:Kh,deleteNode:Qh,editLabel:Xh,expandNode:z2,expandPartNode:U2,fixNodes:Uh,goResult:j2,hideGroup:mM,holdAggregation:F2,nodeStar:Yh,redo:D2,releaseAggregation:$2,showGroup:gM,showLabel:Wh,showNames:qh,singleEdgeSelect:M2,unFixNodes:jh,unNodeStar:Jh,unShowLabel:Gh,unShowNames:Hh,undo:P2},Symbol.toStringTag,{value:"Module"})),q2={org:[47,54],family:[38,38],vul:[38,38],default:[28,28]},Voe="",yM={name:"SelectSingle",components:{NodeIcon:Oa,ForceGraphSvgIcon:so},mixins:[kr],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:Sc,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",xc(this.imgPath["./public/d3svg1/flags/ip.png"]).then(t=>{this.flagIcon[e]=t})):xc(this.imgPath[`./public/d3svg1/flags/${e}.png`]).then(t=>{this.flagIcon[e]=t}),ve(Re,"flagIcon",this.flagIcon)},getViewBox(e,t){const n=q2[e]||q2.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){ve(this,"toggle-fold",e)},handleToggleEye(e,t,n){ve(this,"toggle-eye",e,t,n)},handleShowDetail(e,t){ve(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){ve(this,"relation-click",e)},formatTags(e){return Nc(Tc(e))},getRefSetter(e){return t=>{!this.$arrRefs&&(this.$arrRefs={}),!this.$arrRefs[e]&&(this.$arrRefs[e]=[]),t&&this.$arrRefs[e].push(t)}}}},bM={key:0,class:"row-item row-parent"},wM={class:"left"},_M={key:0,class:"image-icon"},CM={key:0,class:"md5-type"},SM={class:"mid"},EM=["title","textContent"],xM={class:"left"},kM=["src"],NM={class:"mid"},TM={class:"text-name"},AM={key:0,class:"count-wrapper"},OM={key:0,class:"num-wrapper"},IM={class:"num"},BM={key:1,class:"count-wrapper"},LM={key:0,class:"num-wrapper"},RM={class:"num"},PM={class:"right"},DM={key:0,class:"extent-icon"},MM={class:"left"},FM={key:0,class:"md5-type"},$M={class:"mid"},zM=["onClick","textContent"],UM={key:0,class:"detail-box"},jM={key:0,class:"segment"},qM={key:1,class:"graph-tags-box"},HM={class:"right"},GM=["onClick"];function WM(e,t,n,r,s,a){const l=o.resolveComponent("NodeIcon"),c=o.resolveComponent("force-graph-svg-icon"),u=gn,d=Ea;return o.openBlock(),o.createElementBlock("div",{class:o.normalizeClass(["relation-item-single",{"aggregation-item":n.isAggregation}])},[o.createElementVNode("div",{class:o.normalizeClass([{"has-parent":a.isShowFirstLevel},"line-icon-relation"])},null,2),a.isShowFirstLevel?(o.openBlock(),o.createElementBlock("div",bM,[o.createElementVNode("div",wM,[a.hasParentNode?(o.openBlock(),o.createElementBlock("div",_M,[o.createVNode(l,{class:"svgBase","node-info":s.data.parentNode},null,8,["node-info"]),s.data.parentNode.type==="md5"?(o.openBlock(),o.createElementBlock("p",CM,o.toDisplayString(s.data.parentNode.detail&&s.data.parentNode.detail.info.basic.file_type.toUpperCase()||"MD5"),1)):o.createCommentVNode("",!0)])):o.createCommentVNode("",!0)]),o.createElementVNode("div",SM,[o.createElementVNode("div",{class:"text-name",title:s.data.parentNode&&s.data.parentNode.name,textContent:o.toDisplayString(s.data.parentNode&&s.data.parentNode.name)},null,8,EM)])])):o.createCommentVNode("",!0),o.createElementVNode("div",{class:o.normalizeClass(["row-item row-nodetype",{"extent-nodetype":s.data.isExtentNode&&!n.isCombineData,"extent-data":s.data.isExtentNode&&s.data.hasExtention,"extent-disabled":s.data.noExtentNode}])},[o.createElementVNode("div",xM,[!n.isAggregation&&s.data.childList.length>0?(o.openBlock(),o.createElementBlock("div",{key:0,class:o.normalizeClass(["image-icon-down",n.rootNode.type!=="nodeType"&&n.isRelation?"icon-left":""]),style:o.normalizeStyle({transform:s.data.showChild?"":"rotate(450deg)"}),onClick:t[0]||(t[0]=f=>a.handleToggleFold(s.data))},[o.createVNode(c,{"icon-class":e.imgPath["./public/d3svg1/jiantou.svg"],alt:""},null,8,["icon-class"])],6)):o.createCommentVNode("",!0),(o.openBlock(),o.createElementBlock("div",{key:n.value,class:"image-icon"},[o.createElementVNode("img",{src:e.imgPath["./public/d3svg1/"+s.data.icon+".svg"]||e.imgPath["./public/d3svg1/node_type.svg"],alt:""},null,8,kM)]))]),o.createElementVNode("div",NM,[o.createElementVNode("div",TM,[o.createTextVNode(o.toDisplayString(s.data.name==="聚合"?"相似同源样本":s.data.name)+" ",1),s.data.isExtentNode&&s.data.hasExtention?(o.openBlock(),o.createElementBlock("span",AM,[s.dangerNodeNum?(o.openBlock(),o.createElementBlock("span",OM,[o.createElementVNode("span",IM,o.toDisplayString(s.dangerNodeNum),1),t[3]||(t[3]=o.createTextVNode("/"))])):o.createCommentVNode("",!0),o.createTextVNode(o.toDisplayString(s.data.childList.length),1)])):o.createCommentVNode("",!0),(s.data.type==="nodeType"||n.isAggregation)&&!s.data.isExtentNode?(o.openBlock(),o.createElementBlock("span",BM,[s.dangerNodeNum?(o.openBlock(),o.createElementBlock("span",LM,[o.createElementVNode("span",RM,o.toDisplayString(s.dangerNodeNum),1),t[4]||(t[4]=o.createTextVNode("/"))])):o.createCommentVNode("",!0),o.createTextVNode(o.toDisplayString(s.data.childList.length),1)])):o.createCommentVNode("",!0)])]),o.createElementVNode("div",PM,[s.data.isExtentNode?(o.openBlock(),o.createElementBlock("div",DM,[!s.data.hasExtention||s.data.hasExtention&&s.data.childList.length===0?(o.openBlock(),o.createBlock(u,{key:0,content:"拓线","popper-class":"el-tooltip-gray",placement:"left"},{default:o.withCtx(()=>[o.createVNode(c,{class:"button-img","icon-class":e.imgPath["./public/d3svg1/button22/button_select_all.svg"],onClick:t[1]||(t[1]=f=>a.handleRelationClick(s.data))},null,8,["icon-class"])]),_:1})):(o.openBlock(),o.createBlock(u,{key:1,content:s.data.show?"显示":"隐藏","popper-class":"el-tooltip-gray",placement:"left"},{default:o.withCtx(()=>[o.createVNode(c,{class:"button-img","icon-class":s.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?o.createCommentVNode("",!0):(o.openBlock(),o.createElementBlock("div",{key:1,class:"right-icon",onClick:t[2]||(t[2]=f=>a.handleToggleEye(f,s.data,s.data.parentNode))},[o.createVNode(u,{content:s.data.show?"显示":"隐藏","popper-class":"el-tooltip-gray",placement:"left"},{default:o.withCtx(()=>[o.createVNode(c,{class:"button-img","icon-class":s.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),s.data.showChild?o.createCommentVNode("",!0):(o.openBlock(!0),o.createElementBlock(o.Fragment,{key:1},o.renderList(s.data.childList,(f,p)=>(o.openBlock(),o.createElementBlock("div",{key:"info2"+p,class:"row-item row-child"},[o.createElementVNode("div",MM,[o.createElementVNode("div",{class:o.normalizeClass(["image-icon",{"image-icom-left":n.rootNode.type==="nodeType"&&n.isRelation}])},[o.createVNode(l,{class:"svgBase","node-info":f},null,8,["node-info"]),f.type==="md5"?(o.openBlock(),o.createElementBlock("p",FM,o.toDisplayString(f.detail&&f.detail.info.basic.file_type.toUpperCase()||"MD5"),1)):o.createCommentVNode("",!0)],2)]),o.createElementVNode("div",$M,[o.createVNode(u,{ref_for:!0,ref:"tooltip",disabled:s.disable,content:f.name,placement:"top","open-delay":400,"popper-class":"el-tooltip-gray"},{default:o.withCtx(()=>[o.createElementVNode("div",{class:o.normalizeClass(["text-name",a.canShow(f,s.data)?"":"unselect-color"]),onClick:g=>a.handleShowDetail(f,a.canShow(f,s.data)),textContent:o.toDisplayString(f.name)},null,10,zM)]),_:2},1032,["disabled","content"]),f.detail&&f.detail.brief!==null?(o.openBlock(),o.createElementBlock("div",UM,[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(f.detail.brief,(g,v)=>(o.openBlock(),o.createBlock(u,{key:v,disabled:!!a.canGoDetail(f),content:g,placement:"top","popper-class":"el-tooltip-gray"},{default:o.withCtx(()=>[o.createElementVNode("div",{class:o.normalizeClass([a.canShow(f,s.data)?"":"unselect-color","text"])},[o.createTextVNode(o.toDisplayString(g)+" ",1),v!==f.detail.brief.length-1?(o.openBlock(),o.createElementBlock("span",jM,"|")):o.createCommentVNode("",!0)],2)]),_:2},1032,["disabled","content"]))),128))])):o.createCommentVNode("",!0),f.detail&&f.detail.tags&&f.detail.tags.length>0?(o.openBlock(),o.createElementBlock("div",qM,[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(a.formatTags(f.detail.tags),(g,v)=>(o.openBlock(),o.createBlock(u,{ref_for:!0,ref:a.getRefSetter("tooltip"),key:v,"open-delay":400,disabled:f.type!=="md5",content:g.desc||g.name,"popper-class":"el-tooltip-gray"},{default:o.withCtx(()=>[o.createVNode(d,{class:o.normalizeClass(["graph-tag-one",g.type||"unknown"]),type:g.type||"info"},{default:o.withCtx(()=>[o.createTextVNode(o.toDisplayString(g.name),1)]),_:2},1032,["class","type"])]),_:2},1032,["disabled","content"]))),128))])):o.createCommentVNode("",!0)]),o.createElementVNode("div",HM,[n.isAggregation?o.createCommentVNode("",!0):(o.openBlock(),o.createElementBlock("div",{key:0,class:"right-icon",onClick:g=>a.handleToggleEye(g,f,s.data)},[o.createVNode(u,{content:s.data.show?"显示":"隐藏","popper-class":"el-tooltip-gray",placement:"left"},{default:o.withCtx(()=>[o.createVNode(c,{class:"button-img","icon-class":a.canShow(f,s.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,GM))])]))),128))],2)}const KM=_t(yM,[["render",WM],["__scopeId","data-v-4e03a9d0"]]),ese="",YM={name:"SelectMults",components:{NodeIcon:Oa},mixins:[kr],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 Sc(e,this.levelMap)},getIcon(e){e.detail.info.basic.flag===""?(e.detail.info.basic.flag="ip",xc(this.imgPath["./public/d3svg1/flags/ip.png"]).then(t=>{this.flagIcon[e]=t})):xc(this.imgPath[`./public/d3svg1/flags/${e}.png`]).then(t=>{this.flagIcon[e]=t}),ve(Re,"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){ve(this,"show-detail",e,t)},formatTags(e){return Nc(Tc(e))}}},JM={class:"relation-item-mults"},XM={class:"row-item"},QM={class:"left"},ZM={class:"grid-content bg-purple"},VM={class:"image-icon"},eF={key:0,class:"md5-type"},tF={class:"mid"},nF={class:"grid-content bg-purple"},rF=["textContent"],iF={key:0,class:"detail-box"},oF={class:"text"},sF={key:0,class:"segment"},aF={class:"graph-tags-box"};function lF(e,t,n,r,s,a){const l=o.resolveComponent("NodeIcon"),c=gn,u=Ea;return o.openBlock(),o.createElementBlock("div",JM,[o.createElementVNode("div",XM,[o.createElementVNode("div",QM,[o.createElementVNode("div",ZM,[o.createElementVNode("div",VM,[o.createVNode(l,{class:"svgBase","node-info":s.data},null,8,["node-info"]),s.data.type==="md5"?(o.openBlock(),o.createElementBlock("p",eF,o.toDisplayString(s.data.detail&&s.data.detail.info.basic.file_type.toUpperCase()||"MD5"),1)):o.createCommentVNode("",!0)])])]),o.createElementVNode("div",tF,[o.createElementVNode("div",nF,[o.createVNode(c,{ref:"tooltip",disabled:s.disable,"open-delay":400,content:s.data.name,placement:"top","popper-class":"el-tooltip-gray"},{default:o.withCtx(()=>[o.createElementVNode("div",{class:"text-name text-more-select",onClick:t[0]||(t[0]=d=>a.handleShowDetail(s.data,!0)),textContent:o.toDisplayString(s.data.name)},null,8,rF)]),_:1},8,["disabled","content"]),s.data.detail&&s.data.detail.brief!==null?(o.openBlock(),o.createElementBlock("div",iF,[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(s.data.detail.brief,(d,f)=>(o.openBlock(),o.createBlock(c,{key:f,disabled:!!a.canGoDetail(s.data),content:d,placement:"top","popper-class":"el-tooltip-gray"},{default:o.withCtx(()=>[o.createElementVNode("div",oF,[o.createTextVNode(o.toDisplayString(d),1),f!==s.data.detail.brief.length-1?(o.openBlock(),o.createElementBlock("span",sF,"|")):o.createCommentVNode("",!0)])]),_:2},1032,["disabled","content"]))),128))])):o.createCommentVNode("",!0),o.withDirectives(o.createElementVNode("div",aF,[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(a.formatTags(s.data.detail&&s.data.detail.tags),(d,f)=>(o.openBlock(),o.createBlock(c,{key:f,disabled:s.data.type!=="md5",content:d.desc||d.name,"popper-class":"el-tooltip-gray"},{default:o.withCtx(()=>[o.createVNode(u,{class:o.normalizeClass(["graph-tag-one",d.type||"unknown"]),type:d.type||"info"},{default:o.withCtx(()=>[o.createTextVNode(o.toDisplayString(d.name),1)]),_:2},1032,["class","type"])]),_:2},1032,["disabled","content"]))),128))],512),[[o.vShow,s.data.detail&&s.data.detail.tags&&s.data.detail.tags.length>0]])])])])])}const cF=_t(YM,[["render",lF],["__scopeId","data-v-64a51e7d"]]);function dF(){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 s=e.indexOf("Edge/");return s>0?parseInt(e.substring(s+5,e.indexOf(".",s)),10):-1}let Oc;function Zh(){Zh.init||(Zh.init=!0,Oc=dF()!==-1)}var Ic={name:"ResizeObserver",props:{emitOnMount:{type:Boolean,default:!1},ignoreWidth:{type:Boolean,default:!1},ignoreHeight:{type:Boolean,default:!1}},emits:["notify"],mounted(){Zh(),o.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",Oc&&this.$el.appendChild(e),e.data="about:blank",Oc||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&&(!Oc&&this._resizeObject.contentDocument&&this._resizeObject.contentDocument.defaultView.removeEventListener("resize",this.compareAndNotify),this.$el.removeChild(this._resizeObject),this._resizeObject.onload=null,this._resizeObject=null)}}};const uF=o.withScopeId("data-v-b329ee4c");o.pushScopeId("data-v-b329ee4c");const fF={class:"resize-observer",tabindex:"-1"};o.popScopeId();const hF=uF((e,t,n,r,s,a)=>(o.openBlock(),o.createBlock("div",fF)));Ic.render=hF,Ic.__scopeId="data-v-b329ee4c",Ic.__file="src/components/ResizeObserver.vue";function Bc(e){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Bc=function(t){return typeof t}:Bc=function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Bc(e)}function pF(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function H2(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 gF(e,t,n){return t&&H2(e.prototype,t),n&&H2(e,n),e}function G2(e){return mF(e)||vF(e)||yF(e)||bF()}function mF(e){if(Array.isArray(e))return Vh(e)}function vF(e){if(typeof Symbol!="undefined"&&Symbol.iterator in Object(e))return Array.from(e)}function yF(e,t){if(e){if(typeof e=="string")return Vh(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 Vh(e,t)}}function Vh(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 bF(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
105
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function wF(e){var t;return typeof e=="function"?t={callback:e}:t=e,t}function _F(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},r,s,a,l=function(u){for(var d=arguments.length,f=new Array(d>1?d-1:0),p=1;p<d;p++)f[p-1]=arguments[p];if(a=f,!(r&&u===s)){var g=n.leading;typeof g=="function"&&(g=g(u,s)),(!r||u!==s)&&g&&e.apply(void 0,[u].concat(G2(a))),s=u,clearTimeout(r),r=setTimeout(function(){e.apply(void 0,[u].concat(G2(a))),r=0},t)}};return l._clear=function(){clearTimeout(r),r=null},l}function W2(e,t){if(e===t)return!0;if(Bc(e)==="object"){for(var n in e)if(!W2(e[n],t[n]))return!1;return!0}return!1}var CF=function(){function e(t,n,r){pF(this,e),this.el=t,this.observer=null,this.frozen=!1,this.createObserver(n,r)}return gF(e,[{key:"createObserver",value:function(n,r){var s=this;if(this.observer&&this.destroyObserver(),!this.frozen){if(this.options=wF(n),this.callback=function(c,u){s.options.callback(c,u),c&&s.options.once&&(s.frozen=!0,s.destroyObserver())},this.callback&&this.options.throttle){var a=this.options.throttleOptions||{},l=a.leading;this.callback=_F(this.callback,this.options.throttle,{leading:function(u){return l==="both"||l==="visible"&&u||l==="hidden"&&!u}})}this.oldResult=void 0,this.observer=new IntersectionObserver(function(c){var u=c[0];if(c.length>1){var d=c.find(function(p){return p.isIntersecting});d&&(u=d)}if(s.callback){var f=u.isIntersecting&&u.intersectionRatio>=s.threshold;if(f===s.oldResult)return;s.oldResult=f,s.callback(f,u)}},this.options.intersection),o.nextTick(function(){s.observer&&s.observer.observe(s.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 K2(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 s=new CF(e,r,n);e._vue_visibilityState=s}}function SF(e,t,n){var r=t.value,s=t.oldValue;if(!W2(r,s)){var a=e._vue_visibilityState;if(!r){Y2(e);return}a?a.createObserver(r,n):K2(e,{value:r},n)}}function Y2(e){var t=e._vue_visibilityState;t&&(t.destroyObserver(),delete e._vue_visibilityState)}var EF={beforeMount:K2,updated:SF,unmounted:Y2};function xF(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 kF={itemsLimit:1e3},NF=/(auto|scroll)/;function J2(e,t){return e.parentNode===null?t:J2(e.parentNode,t.concat([e]))}var ep=function(t,n){return getComputedStyle(t,null).getPropertyValue(n)},TF=function(t){return ep(t,"overflow")+ep(t,"overflow-y")+ep(t,"overflow-x")},AF=function(t){return NF.test(TF(t))};function X2(e){if(e instanceof HTMLElement||e instanceof SVGElement){for(var t=J2(e.parentNode,[]),n=0;n<t.length;n+=1)if(AF(t[n]))return t[n];return document.scrollingElement||document.documentElement}}function tp(e){"@babel/helpers - typeof";return tp=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},tp(e)}var Q2={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 Z2(){return this.items.length&&tp(this.items[0])!=="object"}var np=!1;if(typeof window!="undefined"){np=!1;try{var OF=Object.defineProperty({},"passive",{get:function(){np=!0}});window.addEventListener("test",null,OF)}catch(e){}}let IF=0;var rp={name:"RecycleScroller",components:{ResizeObserver:Ic},directives:{ObserveVisibility:EF},props:fe(ne({},Q2),{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 s=1e4,a=0,l;for(let c=0,u=t.length;c<u;c++)l=t[c][n]||r,l<s&&(s=l),a+=l,e[c]={accumulator:a,size:l};return this.$_computedMinItemSize=s,e}return[]},simpleArray:Z2,itemIndexByKey(){const{keyField:e,items:t}=this,n={};for(let r=0,s=t.length;r<s;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,s){const a=o.markRaw({id:IF++,index:t,used:!0,key:r,type:s}),l=o.shallowReactive({item:n,position:0,nr:a});return e.push(l),l},unuseView(e,t=!1){const n=this.$_unusedViews,r=e.nr.type;let s=n.get(r);s||(s=[],n.set(r,s)),s.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,s=this.itemSecondarySize||n,a=this.$_computedMinItemSize,l=this.typeField,c=this.simpleArray?null:this.keyField,u=this.items,d=u.length,f=this.sizes,p=this.$_views,g=this.$_unusedViews,v=this.pool,b=this.itemIndexByKey;let w,_,C,k,S;if(!d)w=_=k=S=C=0;else if(this.$_prerender)w=k=0,_=S=Math.min(this.prerender,u.length),C=null;else{const P=this.getScroll();if(t){let U=P.start-this.$_lastUpdateScrollPosition;if(U<0&&(U=-U),n===null&&U<a||U<n)return{continuous:!0}}this.$_lastUpdateScrollPosition=P.start;const M=this.buffer;P.start-=M,P.end+=M;let W=0;if(this.$refs.before&&(W=this.$refs.before.scrollHeight,P.start-=W),this.$refs.after){const U=this.$refs.after.scrollHeight;P.end+=U}if(n===null){let U,Q=0,q=d-1,D=~~(d/2),j;do j=D,U=f[D].accumulator,U<P.start?Q=D:D<d-1&&f[D+1].accumulator>P.start&&(q=D),D=~~((Q+q)/2);while(D!==j);for(D<0&&(D=0),w=D,C=f[d-1].accumulator,_=D;_<d&&f[_].accumulator<P.end;_++);for(_===-1?_=u.length-1:(_++,_>d&&(_=d)),k=w;k<d&&W+f[k].accumulator<P.start;k++);for(S=k;S<d&&W+f[S].accumulator<P.end;S++);}else{w=~~(P.start/n*r);const U=w%r;w-=U,_=Math.ceil(P.end/n*r),k=Math.max(0,Math.floor((P.start-W)/n*r)),S=Math.floor((P.end-W)/n*r),w<0&&(w=0),_>d&&(_=d),k<0&&(k=0),S>d&&(S=d),C=Math.ceil(d/r)*n}}_-w>kF.itemsLimit&&this.itemsLimitError(),this.totalSize=C;let E;const N=w<=this.$_endIndex&&_>=this.$_startIndex;if(N)for(let P=0,M=v.length;P<M;P++)E=v[P],E.nr.used&&(e&&(E.nr.index=b[E.item[c]]),(E.nr.index==null||E.nr.index<w||E.nr.index>=_)&&this.unuseView(E));const A=N?null:new Map;let I,O,F;for(let P=w;P<_;P++){I=u[P];const M=c?I[c]:I;if(M==null)throw new Error(`Key is ${M} on item (keyField is '${c}')`);if(E=p.get(M),!n&&!f[P].size){E&&this.unuseView(E);continue}O=I[l];let W=g.get(O),U=!1;if(!E)N?W&&W.length?E=W.pop():E=this.addView(v,P,I,M,O):(F=A.get(O)||0,(!W||F>=W.length)&&(E=this.addView(v,P,I,M,O),this.unuseView(E,!0),W=g.get(O)),E=W[F],A.set(O,F+1)),p.delete(E.nr.key),E.nr.used=!0,E.nr.index=P,E.nr.key=M,E.nr.type=O,p.set(M,E),U=!0;else if(!E.nr.used&&(E.nr.used=!0,U=!0,W)){const Q=W.indexOf(E);Q!==-1&&W.splice(Q,1)}E.item=I,U&&(P===u.length-1&&this.$emit("scroll-end"),P===0&&this.$emit("scroll-start")),n===null?(E.position=f[P-1].accumulator,E.offset=0):(E.position=Math.floor(P/r)*n,E.offset=P%r*s)}return this.$_startIndex=w,this.$_endIndex=_,this.emitUpdate&&this.$emit("update",w,_,k,S),clearTimeout(this.$_sortTimer),this.$_sortTimer=setTimeout(this.sortViews,this.updateInterval+300),{continuous:N}},getListenerTarget(){let e=X2(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 s=e.getBoundingClientRect(),a=n?s.height:s.width;let l=-(n?s.top:s.left),c=n?window.innerHeight:window.innerWidth;l<0&&(c+=l,l=0),l+c>a&&(c=a-l),r={start:l,end:l+c}}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,np?{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,s;if(this.pageMode){const a=X2(this.$el),l=a.tagName==="HTML"?0:a[t.scroll],c=a.getBoundingClientRect(),d=this.$el.getBoundingClientRect()[t.start]-c[t.start];n=a,r=t.scroll,s=e+l+d}else n=this.$el,r=t.scroll,s=e;n[r]=s},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 BF={key:0,ref:"before",class:"vue-recycle-scroller__slot"},LF={key:1,ref:"after",class:"vue-recycle-scroller__slot"};function RF(e,t,n,r,s,a){const l=o.resolveComponent("ResizeObserver"),c=o.resolveDirective("observe-visibility");return o.withDirectives((o.openBlock(),o.createElementBlock("div",{class:o.normalizeClass(["vue-recycle-scroller",{ready:s.ready,"page-mode":n.pageMode,[`direction-${e.direction}`]:!0}]),onScrollPassive:t[0]||(t[0]=(...u)=>a.handleScroll&&a.handleScroll(...u))},[e.$slots.before?(o.openBlock(),o.createElementBlock("div",BF,[o.renderSlot(e.$slots,"before")],512)):o.createCommentVNode("v-if",!0),(o.openBlock(),o.createBlock(o.resolveDynamicComponent(n.listTag),{ref:"wrapper",style:o.normalizeStyle({[e.direction==="vertical"?"minHeight":"minWidth"]:s.totalSize+"px"}),class:o.normalizeClass(["vue-recycle-scroller__item-wrapper",n.listClass])},{default:o.withCtx(()=>[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(s.pool,u=>(o.openBlock(),o.createBlock(o.resolveDynamicComponent(n.itemTag),o.mergeProps({key:u.nr.id,style:s.ready?{transform:`translate${e.direction==="vertical"?"Y":"X"}(${u.position}px) translate${e.direction==="vertical"?"X":"Y"}(${u.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&&s.hoverKey===u.nr.key}]]},o.toHandlers(n.skipHover?{}:{mouseenter:()=>{s.hoverKey=u.nr.key},mouseleave:()=>{s.hoverKey=null}})),{default:o.withCtx(()=>[o.renderSlot(e.$slots,"default",{item:u.item,index:u.nr.index,active:u.nr.used})]),_:2},1040,["style","class"]))),128)),o.renderSlot(e.$slots,"empty")]),_:3},8,["style","class"])),e.$slots.after?(o.openBlock(),o.createElementBlock("div",LF,[o.renderSlot(e.$slots,"after")],512)):o.createCommentVNode("v-if",!0),o.createVNode(l,{onNotify:a.handleResize},null,8,["onNotify"])],34)),[[c,a.handleVisibilityChange]])}rp.render=RF,rp.__file="src/components/RecycleScroller.vue";var ip={name:"DynamicScroller",components:{RecycleScroller:rp},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 s=t.borderBoxSize[0];n=s.inlineSize,r=s.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:fe(ne({},Q2),{minItemSize:{type:[Number,String],required:!0}}),emits:["resize","visible"],data(){return{vscrollData:{active:!0,sizes:{},keyField:this.keyField,simpleArray:!1}}},computed:{simpleArray:Z2,itemsWithSize(){const e=[],{items:t,keyField:n,simpleArray:r}=this,s=this.vscrollData.sizes,a=t.length;for(let l=0;l<a;l++){const c=t[l],u=r?l:c[n];let d=s[u];typeof d=="undefined"&&!this.$_undefinedMap[u]&&(d=0),e.push({item:c,id:u,size:d})}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,s=0;const a=Math.min(e.length,t.length);for(let c=0;c<a&&!(r>=n);c++)r+=t[c].size||this.minItemSize,s+=e[c].size||this.minItemSize;const l=s-r;l!==0&&(this.$el.scrollTop+=l)}},beforeCreate(){this.$_updates=[],this.$_undefinedSizes=0,this.$_undefinedMap={},this.$_events=xF()},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 PF(e,t,n,r,s,a){const l=o.resolveComponent("RecycleScroller");return o.openBlock(),o.createBlock(l,o.mergeProps({ref:"scroller",items:a.itemsWithSize,"min-item-size":n.minItemSize,direction:e.direction,"key-field":"id","list-tag":e.listTag,"item-tag":e.itemTag},e.$attrs,{onResize:a.onScrollerResize,onVisible:a.onScrollerVisible}),{default:o.withCtx(({item:c,index:u,active:d})=>[o.renderSlot(e.$slots,"default",o.normalizeProps(o.guardReactiveProps({item:c.item,index:u,active:d,itemWithSize:c})))]),before:o.withCtx(()=>[o.renderSlot(e.$slots,"before")]),after:o.withCtx(()=>[o.renderSlot(e.$slots,"after")]),empty:o.withCtx(()=>[o.renderSlot(e.$slots,"empty")]),_:3},16,["items","min-item-size","direction","list-tag","item-tag","onResize","onVisible"])}ip.render=PF,ip.__file="src/components/DynamicScroller.vue";var V2={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 o.h(this.tag,this.$slots.default())}};V2.__file="src/components/DynamicScrollerItem.vue";const tse="",nse="",DF={components:{ForceGraphSvgIcon:so,selectSingle:KM,selectMults:cF,DynamicScroller:ip,DynamicScrollerItem:V2},mixins:[kr],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,s,a,l,c,u;const e=(a=(s=(r=this.history)==null?void 0:r.dataNow)==null?void 0:s.nodes)==null?void 0:a.map(d=>{const w=d,{x:f,y:p,vx:g,vy:v}=w;return fi(w,["x","y","vx","vy"])}),t=(u=(c=(l=this.history)==null?void 0:l.dataNow)==null?void 0:c.links)==null?void 0:u.map(d=>{const I=d,{source:f,target:p}=I,g=fi(I,["source","target"]),O=f,{x:v,y:b,vx:w,vy:_}=O,C=fi(O,["x","y","vx","vy"]),F=p,{x:k,y:S,vx:E,vy:N}=F,A=fi(F,["x","y","vx","vy"]);return ne({sourceRest:C,targetRest:A},g)});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 s;const n=this.filterValues.split("-");this.filterValues=n[0];const r=this.clone((s=this.history.dataNow)==null?void 0:s.links);if(Mh.filterValues=n[0],this.selectedNodes.length===1){const a=this.clone(this.selectedNodes[0]);this.filteredDataList=this.getSelectOneNodes(a)}else this.selectedNodes.length===0&&(this.filteredDataList=this.clone(this.noSelectNodes));if(this.filterValues!==""&&(qt({cId:"rightMenu-filterValues",c:"右侧菜单搜索"}),this.filteredDataList=this.filteredDataList.filter(a=>this.filterValues!==""?(a.parentNode=this.searchParent(a,r),a.childList=a.childList.filter(l=>{var c,u,d,f;if(l.name.toLowerCase().indexOf(this.filterValues.toLowerCase())>-1)return!0;if(l.detail!==null){for(const p in l.detail.brief)if(String((c=l==null?void 0:l.detail)==null?void 0:c.brief[p]).toLowerCase().indexOf(this.filterValues.toLowerCase())>-1)return!0;for(let p=0;p<((d=(u=l==null?void 0:l.detail)==null?void 0:u.tags)==null?void 0:d.length);p++){const g=(f=l==null?void 0:l.detail)==null?void 0:f.tags[p];if(String(g.name).toLowerCase().indexOf(this.filterValues.toLowerCase())>-1)return!0}}else return!1}),a.childList.length>0):!0),this.filteredDataList=this.deleteParentItem(this.filteredDataList)),this.selectedNodes.length===1&&ve(Re,"relationNum",this.filteredDataList[0]),this.selectedNodes.length!==0){const a=[];a.push(this.rootNode),this.filteredDataList.forEach(l=>{a.push(...l.childList),a.push(l)}),ve(Re,"sendNodesRange",a)}else{const a=[];this.filteredDataList.forEach(l=>{a.push(this.searchParent(l,r)),a.push(...l.childList),a.push(l)}),ve(Re,"sendNodesRange",a)}}},selectedNodes:{handler(e,t){var n;if(e!==t){const r=e||[],s=this.clone(r);if(this.filterValues="",this.isMoreSelect=!1,this.allOptions=[],this.initShowDiv(),s.length===0)setTimeout(()=>{this.currentSelectStatus=0,this.filteredDataList=this.noSelectNodes,this.setFilteredDataList(),ve(Re,"sendNodesRange",null)},0);else if(s.length===1){this.currentSelectNode=s[0],this.currentSelectStatus=1,this.filteredDataList=this.getSelectOneNodes(s[0]);const a=[];a.push(this.rootNode),this.filteredDataList.map(l=>{a.push(...l.childList),a.push(l)}),this.setFilteredDataList(),ve(Re,"sendNodesRange",a)}else{this.currentSelectStatus=2;const a=[],l=this.clone((n=this.history.dataNow)==null?void 0:n.links),c=s==null?void 0:s.map(u=>{var d;return u.level=this.levelNow(u),u.dangerNumber=((d=this.levelMap[u.level])==null?void 0:d.dangerNumber)||0,u.parentNode=this.searchParent(u,l),a.push(u),u});c.sort(this.handle("dangerNumber")),this.filteredDataList=c,this.setFilteredDataList(),ve(Re,"sendNodesRange",a),this.isMoreSelect=!0}}},immediate:!0,deep:!0},historyData(){this.setFilteredDataList()},filteredDataList:{handler(e,t){setTimeout(()=>{this.setRelationDataList()},0)},deep:!0}},created(){},mounted(){},beforeUnmount(){Ei(Re,"flagFiles")},methods:{searchChildren(e,t){const n=t,r=[];return n&&n.forEach(s=>{var a;s.source.id===e.id&&(s.target.level=this.levelNow(s.target),s.target.dangerNumber=((a=this.levelMap[s.target.level])==null?void 0:a.dangerNumber)||0,r.push(s.target))}),r},searchParent(e,t){const n=t;let r=[];return n&&n.forEach(s=>{var a;s.target.id===e.id&&(s.source.level=this.levelNow(s.source),s.source.dangerNumber=((a=this.levelMap[s.source.level])==null?void 0:a.dangerNumber)||0,r=s.source)}),r},setFilteredDataList(){if(Mh.filterValues===void 0||Mh.filterValues==="")if(this.selectedNodes.length===0)this.currentSelectStatus=0,this.filteredDataList=this.noSelectNodes,ve(Re,"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)}),ve(Re,"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;ve(this,"row-click",e)},handleSelectionChange(e){this.selection=e,ve(this,"selection-change",e)},getModuleDetail(e,t){const n=[],r=[],s=e.apis;this.menuOptions=[];let a=this.$parent.$parent.$parent.moduleDetail;a=a!=null&&a.plugs[e.type]?Array.from(a==null?void 0:a.plugs[e.type]):[],a.filter(c=>{c.value=0,c.children?c.children.map(u=>(u.value=0,this.menuOptions.push(u),u)):this.menuOptions.push(c)}),a.length!==0&&this.menuOptions.unshift({namec:"拓线全部",value:0,name:"",flagSelect:!1}),this.allOptions=[];let l;if(this.menuOptions.map(c=>{l=0;for(let u=0;u<t.length;u++){const d=t[u];l+=d.childList.length,d.id.split("-").pop()===c.name&&(c.value=d.childList.length)}return t.length===0&&(c.value=0),c.namec==="拓线全部"?this.allOptions.push({namec:c.namec,value:l,name:c.name,flagSelect:c.flagSelect}):this.allOptions.push({namec:c.namec,value:c.value,icon:c.icon,name:c.name,relay_name:c.relay_name}),c}),s){for(let c=0;c<s.length;c++)n[s[c].name]=!0;for(let c=0;c<this.allOptions.length;c++)n[this.allOptions[c].name]?(this.allOptions[c].flagSelect=!0,r.push(this.allOptions[c])):(this.allOptions[c].flagSelect=!1,r.push(this.allOptions[c]))}e.menuOptions=this.allOptions},clone(e){return JSON.parse(JSON.stringify(e))},getNoSelectNodes(){var s;this.isAggregation=!1;const e=this.clone(this.history.dataNow.nodes),t=this.clone((s=this.history.dataNow)==null?void 0:s.links),n=e.filter(a=>{if((a==null?void 0:a.type)==="nodeType")return a.childList=this.searchChildren(a,t),a.parentNode=this.searchParent(a,t),a.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),ve(Re,"relationNum",e),r}else if(e.type==="aggregation"){const r=[];this.isAggregation=!0;const s=[...e.list];return e.childList=s.map(a=>{var l;return a.level=this.levelNow(a),a.dangerNumber=((l=this.levelMap[a.level])==null?void 0:l.dangerNumber)||0,a}),e.childList.sort(this.handle("dangerNumber")),e.name=this.searchParent(e,t).name,r.push(e),ve(Re,"relationNum",e),r}else{this.rootNode=e,this.isAggregation=!1;const r=this.searchChildren(e,t);return r.map(s=>(s.childList=this.searchChildren(s,t),s.parentNode=this.searchParent(s,t),s.childList.sort(this.handle("dangerNumber")),s)),this.getModuleDetail(e,r),r}},handle(e){return function(t,n){const r=parseInt(t[e]),s=parseInt(n[e]);return r==null?-1:s==null?1:n[e]-t[e]}},showDetail(e,t){var r,s,a,l,c,u,d,f,p,g,v,b,w,_;const n=[];n.push(e.id),t&&(this.selectedNodes.length===0?(a=(s=(r=this.$parent)==null?void 0:r.$parent)==null?void 0:s.$parent)!=null&&a.handleTableSelect&&((u=(c=(l=this.$parent)==null?void 0:l.$parent)==null?void 0:c.$parent)==null||u.handleTableSelect(n)):(g=(p=(f=(d=this.$parent)==null?void 0:d.$parent)==null?void 0:f.$parent)==null?void 0:p.$parent)!=null&&g.handleTableSelect&&((_=(w=(b=(v=this.$parent)==null?void 0:v.$parent)==null?void 0:b.$parent)==null?void 0:w.$parent)==null||_.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 s=JSON.stringify(t(r));n[s]=n[s]||[],n[s].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(a=>a===r.parentNode.id)?r.parentNode="":n.push(r.parentNode.id),r)),t},relationClick(e){qt({cId:"relationClick",c:"点击拓线"});const n=this.allOptions.filter(r=>r.namec===e.namec)[0];this.value=!this.value,n.flagSelect=!1,n.namec==="拓线全部"?ve(Re,"relationClick",{nodes:[this.rootNode],api:z2,dataApi:null}):ve(Re,"relationClick",{nodes:[this.rootNode],api:U2,dataApi:n})},toggleFold(e){qt({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?(qt({cId:"rightMenu-toggleEye",c:"rightMenu-toggleEye"}),ve(Re,"buttonClick",{nodes:[t,n],api:{name:"hide_node"}})):ve(Re,"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 s in e)e[s]===!1&&(n=!1),e[s]===!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,s)=>{const a=this.checkNodeExtentStatus(r),l=this.checkExtentData(r),c=y2();a&&!l&&(n={id:c,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)),a||(n={id:c,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,s)=>{const a=y2();e.push({id:a,type:"nodeType",icon:r.icon,name:r.namec,namec:r.namec,show:!1,showChild:!1,childList:[],parentNode:s===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}}},MF={class:"node-relation-block"},FF={key:0,class:"textarea-wrapper"},$F={key:1,class:"relation-title"},zF={key:0,class:"extent-icon"},UF={key:2,class:"nodata"};function jF(e,t,n,r,s,a){const l=mi,c=o.resolveComponent("force-graph-svg-icon"),u=gn,d=o.resolveComponent("select-single"),f=o.resolveComponent("select-mults"),p=o.resolveComponent("DynamicScrollerItem"),g=o.resolveComponent("DynamicScroller");return o.openBlock(),o.createElementBlock("div",MF,[s.isMoreSelect?o.createCommentVNode("",!0):(o.openBlock(),o.createElementBlock(o.Fragment,{key:0},[n.canSearch?(o.openBlock(),o.createElementBlock("div",FF,[o.createVNode(l,{modelValue:s.filterValues,"onUpdate:modelValue":t[0]||(t[0]=v=>s.filterValues=v),modelModifiers:{trim:!0},class:"search-content",placeholder:"请输入搜索内容",clearable:""},null,8,["modelValue"])])):o.createCommentVNode("",!0),s.rootNode.type!=="nodeType"&&!s.isAggregation?(o.openBlock(),o.createElementBlock("div",$F,[t[1]||(t[1]=o.createElementVNode("h3",{class:"title-top"},"关联列表",-1)),a.showAllExtent?(o.openBlock(),o.createElementBlock("div",zF,[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(s.allOptions,(v,b)=>(o.openBlock(),o.createElementBlock("div",{key:b},[v.namec==="拓线全部"?(o.openBlock(),o.createBlock(u,{key:0,content:v.namec,"popper-class":"el-tooltip-gray",placement:"left"},{default:o.withCtx(()=>[o.createVNode(c,{class:"button-img","icon-class":e.imgPath["./public/d3svg1/button22/button_select_all.svg"],onClick:w=>a.relationClick(v)},null,8,["icon-class","onClick"])]),_:2},1032,["content"])):o.createCommentVNode("",!0)]))),128))])):o.createCommentVNode("",!0)])):o.createCommentVNode("",!0)],64)),s.relationDataList.length>0?(o.openBlock(),o.createElementBlock(o.Fragment,{key:1},[n.selectedNodes.length?(o.openBlock(),o.createElementBlock("div",{key:0,ref:"rightList",class:o.normalizeClass({"has-selected":n.selectedNodes.length,"has-fold-icon":a.hasFoldIcon})},[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(s.relationDataList,(v,b)=>(o.openBlock(),o.createElementBlock("div",{key:b,class:o.normalizeClass(["relation-item",!s.isMoreSelect&&(s.rootNode.type==="nodeType"||!n.isRelation)?"offset-div-1":"offset-div-2"])},[s.isMoreSelect?(o.openBlock(),o.createBlock(f,{key:1,"filter-data":v,"root-node":s.rootNode,"is-more-select":s.isMoreSelect,"is-relation":n.isRelation,onShowDetail:a.showDetail},null,8,["filter-data","root-node","is-more-select","is-relation","onShowDetail"])):(o.openBlock(),o.createBlock(d,{key:0,"filter-data":v,"unique-key":b,value:s.value,"root-node":s.rootNode,"is-more-select":s.isMoreSelect,"is-relation":n.isRelation,"is-aggregation":s.isAggregation,"flag-div":s.flagDiv,"is-combine-data":s.isCombineData,onShowDetail:a.showDetail,onToggleFold:a.toggleFold,onToggleEye:a.toggleEye,onRelationClick:a.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)):(o.openBlock(),o.createElementBlock("div",{key:1,ref:"rightList",class:o.normalizeClass(["relation-data-list",{"no-selected":!n.selectedNodes.length}])},[o.createVNode(g,{items:s.relationDataList,"min-item-size":54,class:"scroller","key-field":"id"},{default:o.withCtx(({item:v,index:b,active:w})=>[o.createVNode(p,{item:v,active:w,"size-dependencies":[v],"data-index":b,class:o.normalizeClass(["relation-item",!s.isMoreSelect&&(s.rootNode.type==="nodeType"||!n.isRelation)?"offset-div-1":"offset-div-2"])},{default:o.withCtx(()=>[s.isMoreSelect?(o.openBlock(),o.createBlock(f,{key:1,"filter-data":v,"root-node":s.rootNode,"is-more-select":s.isMoreSelect,"is-relation":n.isRelation,onShowDetail:a.showDetail},null,8,["filter-data","root-node","is-more-select","is-relation","onShowDetail"])):(o.openBlock(),o.createBlock(d,{key:0,"filter-data":v,"unique-key":b,value:s.value,"root-node":s.rootNode,"is-more-select":s.isMoreSelect,"is-relation":n.isRelation,"is-aggregation":s.isAggregation,"flag-div":s.flagDiv,"is-combine-data":s.isCombineData,onShowDetail:a.showDetail,onToggleFold:a.toggleFold,onToggleEye:a.toggleEye,onRelationClick:a.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)):(o.openBlock(),o.createElementBlock("div",UF,t[2]||(t[2]=[o.createElementVNode("span",{class:"el-table__empty-text"},"暂无数据",-1)])))])}const qF={components:{NodeDetail:pM,NodesRelation:_t(DF,[["render",jF]])},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(){ve(this,"change-box",[],!0),this.scrollTop>0&&setTimeout(()=>this.$refs.rightMenu.scrollTo(0,this.scrollTop))},handleSelectionChange(e){ve(this,"change-box",e)},handleRowClick(e){this.scrollTop=this.$refs.rightMenu.scrollTop,ve(this,"change-box",[e.id],!0)}},emits:["change-box"]},HF={class:"node-data-wrapper"};function GF(e,t,n,r,s,a){const l=o.resolveComponent("node-detail"),c=o.resolveComponent("nodes-relation");return o.openBlock(),o.createElementBlock("div",HF,[a.showDetail?(o.openBlock(),o.createElementBlock(o.Fragment,{key:0},[o.createVNode(l,{data:n.selectedNodes[0]||{},"selected-nodes":n.selectedNodes,"request-graph-data":n.requestGraphData},null,8,["data","selected-nodes","request-graph-data"]),o.createVNode(c,{data:a.relationData,"selected-nodes":n.selectedNodes,"request-graph-data":n.requestGraphData,"is-relation":!0},null,8,["data","selected-nodes","request-graph-data"])],64)):(o.openBlock(),o.createBlock(c,{key:1,data:n.data,"selected-nodes":n.selectedNodes,"request-graph-data":n.requestGraphData,"can-search":!0,onRowClick:a.handleRowClick,onSelectionChange:a.handleSelectionChange},null,8,["data","selected-nodes","request-graph-data","onRowClick","onSelectionChange"]))])}const WF=_t(qF,[["render",GF]]),ise="",KF={name:"RightMenu",components:{NodeData:WF},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(){ve(this,"change-box",[],!0),this.scrollTop>0&&setTimeout(()=>this.$refs.rightMenu.scrollTo(0,this.scrollTop))},handleSelectionChange(e){ve(this,"change-box",e)},handleRowClick(e){this.scrollTop=this.$refs.rightMenu.scrollTop,ve(this,"change-box",[e.id],!0)}}};function YF(e,t,n,r,s,a){const l=o.resolveComponent("node-data");return o.openBlock(),o.createElementBlock("div",{ref:"rightMenu",class:o.normalizeClass(["right-menu-box",{"no-select":!n.selectedNodes.length}])},[o.createVNode(l,{data:n.graphData,"selected-nodes":n.selectedNodes,"request-graph-data":n.requestGraphData,onRowClick:a.handleRowClick,onSelectionChange:a.handleSelectionChange,onGoBack:a.handleBack},null,8,["data","selected-nodes","request-graph-data","onRowClick","onSelectionChange","onGoBack"])],2)}const JF=_t(KF,[["render",YF]]);var op="http://www.w3.org/1999/xhtml";const ew={svg:"http://www.w3.org/2000/svg",xhtml:op,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function tw(e){var t=e+="",n=t.indexOf(":");return n>=0&&(t=e.slice(0,n))!=="xmlns"&&(e=e.slice(n+1)),ew.hasOwnProperty(t)?{space:ew[t],local:e}:e}function XF(e){return function(){var t=this.ownerDocument,n=this.namespaceURI;return n===op&&t.documentElement.namespaceURI===op?t.createElement(e):t.createElementNS(n,e)}}function QF(e){return function(){return this.ownerDocument.createElementNS(e.space,e.local)}}function nw(e){var t=tw(e);return(t.local?QF:XF)(t)}function ZF(){}function rw(e){return e==null?ZF:function(){return this.querySelector(e)}}function VF(e){typeof e!="function"&&(e=rw(e));for(var t=this._groups,n=t.length,r=new Array(n),s=0;s<n;++s)for(var a=t[s],l=a.length,c=r[s]=new Array(l),u,d,f=0;f<l;++f)(u=a[f])&&(d=e.call(u,u.__data__,f,a))&&("__data__"in u&&(d.__data__=u.__data__),c[f]=d);return new Bn(r,this._parents)}function iw(e){return e==null?[]:Array.isArray(e)?e:Array.from(e)}function e$(){return[]}function t$(e){return e==null?e$:function(){return this.querySelectorAll(e)}}function n$(e){return function(){return iw(e.apply(this,arguments))}}function r$(e){typeof e=="function"?e=n$(e):e=t$(e);for(var t=this._groups,n=t.length,r=[],s=[],a=0;a<n;++a)for(var l=t[a],c=l.length,u,d=0;d<c;++d)(u=l[d])&&(r.push(e.call(u,u.__data__,d,l)),s.push(u));return new Bn(r,s)}function i$(e){return function(){return this.matches(e)}}function ow(e){return function(t){return t.matches(e)}}var o$=Array.prototype.find;function s$(e){return function(){return o$.call(this.children,e)}}function a$(){return this.firstElementChild}function l$(e){return this.select(e==null?a$:s$(typeof e=="function"?e:ow(e)))}var c$=Array.prototype.filter;function d$(){return Array.from(this.children)}function u$(e){return function(){return c$.call(this.children,e)}}function f$(e){return this.selectAll(e==null?d$:u$(typeof e=="function"?e:ow(e)))}function h$(e){typeof e!="function"&&(e=i$(e));for(var t=this._groups,n=t.length,r=new Array(n),s=0;s<n;++s)for(var a=t[s],l=a.length,c=r[s]=[],u,d=0;d<l;++d)(u=a[d])&&e.call(u,u.__data__,d,a)&&c.push(u);return new Bn(r,this._parents)}function sw(e){return new Array(e.length)}function p$(){return new Bn(this._enter||this._groups.map(sw),this._parents)}function Lc(e,t){this.ownerDocument=e.ownerDocument,this.namespaceURI=e.namespaceURI,this._next=null,this._parent=e,this.__data__=t}Lc.prototype={constructor:Lc,appendChild:function(e){return this._parent.insertBefore(e,this._next)},insertBefore:function(e,t){return this._parent.insertBefore(e,t)},querySelector:function(e){return this._parent.querySelector(e)},querySelectorAll:function(e){return this._parent.querySelectorAll(e)}};function g$(e){return function(){return e}}function m$(e,t,n,r,s,a){for(var l=0,c,u=t.length,d=a.length;l<d;++l)(c=t[l])?(c.__data__=a[l],r[l]=c):n[l]=new Lc(e,a[l]);for(;l<u;++l)(c=t[l])&&(s[l]=c)}function v$(e,t,n,r,s,a,l){var c,u,d=new Map,f=t.length,p=a.length,g=new Array(f),v;for(c=0;c<f;++c)(u=t[c])&&(g[c]=v=l.call(u,u.__data__,c,t)+"",d.has(v)?s[c]=u:d.set(v,u));for(c=0;c<p;++c)v=l.call(e,a[c],c,a)+"",(u=d.get(v))?(r[c]=u,u.__data__=a[c],d.delete(v)):n[c]=new Lc(e,a[c]);for(c=0;c<f;++c)(u=t[c])&&d.get(g[c])===u&&(s[c]=u)}function y$(e){return e.__data__}function b$(e,t){if(!arguments.length)return Array.from(this,y$);var n=t?v$:m$,r=this._parents,s=this._groups;typeof e!="function"&&(e=g$(e));for(var a=s.length,l=new Array(a),c=new Array(a),u=new Array(a),d=0;d<a;++d){var f=r[d],p=s[d],g=p.length,v=w$(e.call(f,f&&f.__data__,d,r)),b=v.length,w=c[d]=new Array(b),_=l[d]=new Array(b),C=u[d]=new Array(g);n(f,p,w,_,C,v,t);for(var k=0,S=0,E,N;k<b;++k)if(E=w[k]){for(k>=S&&(S=k+1);!(N=_[S])&&++S<b;);E._next=N||null}}return l=new Bn(l,r),l._enter=c,l._exit=u,l}function w$(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function _$(){return new Bn(this._exit||this._groups.map(sw),this._parents)}function C$(e,t,n){var r=this.enter(),s=this,a=this.exit();return typeof e=="function"?(r=e(r),r&&(r=r.selection())):r=r.append(e+""),t!=null&&(s=t(s),s&&(s=s.selection())),n==null?a.remove():n(a),r&&s?r.merge(s).order():s}function S$(e){for(var t=e.selection?e.selection():e,n=this._groups,r=t._groups,s=n.length,a=r.length,l=Math.min(s,a),c=new Array(s),u=0;u<l;++u)for(var d=n[u],f=r[u],p=d.length,g=c[u]=new Array(p),v,b=0;b<p;++b)(v=d[b]||f[b])&&(g[b]=v);for(;u<s;++u)c[u]=n[u];return new Bn(c,this._parents)}function E$(){for(var e=this._groups,t=-1,n=e.length;++t<n;)for(var r=e[t],s=r.length-1,a=r[s],l;--s>=0;)(l=r[s])&&(a&&l.compareDocumentPosition(a)^4&&a.parentNode.insertBefore(l,a),a=l);return this}function x$(e){e||(e=k$);function t(p,g){return p&&g?e(p.__data__,g.__data__):!p-!g}for(var n=this._groups,r=n.length,s=new Array(r),a=0;a<r;++a){for(var l=n[a],c=l.length,u=s[a]=new Array(c),d,f=0;f<c;++f)(d=l[f])&&(u[f]=d);u.sort(t)}return new Bn(s,this._parents).order()}function k$(e,t){return e<t?-1:e>t?1:e>=t?0:NaN}function N$(){var e=arguments[0];return arguments[0]=this,e.apply(null,arguments),this}function T$(){return Array.from(this)}function A$(){for(var e=this._groups,t=0,n=e.length;t<n;++t)for(var r=e[t],s=0,a=r.length;s<a;++s){var l=r[s];if(l)return l}return null}function O$(){let e=0;for(const t of this)++e;return e}function I$(){return!this.node()}function B$(e){for(var t=this._groups,n=0,r=t.length;n<r;++n)for(var s=t[n],a=0,l=s.length,c;a<l;++a)(c=s[a])&&e.call(c,c.__data__,a,s);return this}function L$(e){return function(){this.removeAttribute(e)}}function R$(e){return function(){this.removeAttributeNS(e.space,e.local)}}function P$(e,t){return function(){this.setAttribute(e,t)}}function D$(e,t){return function(){this.setAttributeNS(e.space,e.local,t)}}function M$(e,t){return function(){var n=t.apply(this,arguments);n==null?this.removeAttribute(e):this.setAttribute(e,n)}}function F$(e,t){return function(){var n=t.apply(this,arguments);n==null?this.removeAttributeNS(e.space,e.local):this.setAttributeNS(e.space,e.local,n)}}function $$(e,t){var n=tw(e);if(arguments.length<2){var r=this.node();return n.local?r.getAttributeNS(n.space,n.local):r.getAttribute(n)}return this.each((t==null?n.local?R$:L$:typeof t=="function"?n.local?F$:M$:n.local?D$:P$)(n,t))}function aw(e){return e.ownerDocument&&e.ownerDocument.defaultView||e.document&&e||e.defaultView}function z$(e){return function(){this.style.removeProperty(e)}}function U$(e,t,n){return function(){this.style.setProperty(e,t,n)}}function j$(e,t,n){return function(){var r=t.apply(this,arguments);r==null?this.style.removeProperty(e):this.style.setProperty(e,r,n)}}function q$(e,t,n){return arguments.length>1?this.each((t==null?z$:typeof t=="function"?j$:U$)(e,t,n==null?"":n)):H$(this.node(),e)}function H$(e,t){return e.style.getPropertyValue(t)||aw(e).getComputedStyle(e,null).getPropertyValue(t)}function G$(e){return function(){delete this[e]}}function W$(e,t){return function(){this[e]=t}}function K$(e,t){return function(){var n=t.apply(this,arguments);n==null?delete this[e]:this[e]=n}}function Y$(e,t){return arguments.length>1?this.each((t==null?G$:typeof t=="function"?K$:W$)(e,t)):this.node()[e]}function lw(e){return e.trim().split(/^|\s+/)}function sp(e){return e.classList||new cw(e)}function cw(e){this._node=e,this._names=lw(e.getAttribute("class")||"")}cw.prototype={add:function(e){var t=this._names.indexOf(e);t<0&&(this._names.push(e),this._node.setAttribute("class",this._names.join(" ")))},remove:function(e){var t=this._names.indexOf(e);t>=0&&(this._names.splice(t,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(e){return this._names.indexOf(e)>=0}};function dw(e,t){for(var n=sp(e),r=-1,s=t.length;++r<s;)n.add(t[r])}function uw(e,t){for(var n=sp(e),r=-1,s=t.length;++r<s;)n.remove(t[r])}function J$(e){return function(){dw(this,e)}}function X$(e){return function(){uw(this,e)}}function Q$(e,t){return function(){(t.apply(this,arguments)?dw:uw)(this,e)}}function Z$(e,t){var n=lw(e+"");if(arguments.length<2){for(var r=sp(this.node()),s=-1,a=n.length;++s<a;)if(!r.contains(n[s]))return!1;return!0}return this.each((typeof t=="function"?Q$:t?J$:X$)(n,t))}function V$(){this.textContent=""}function ez(e){return function(){this.textContent=e}}function tz(e){return function(){var t=e.apply(this,arguments);this.textContent=t==null?"":t}}function nz(e){return arguments.length?this.each(e==null?V$:(typeof e=="function"?tz:ez)(e)):this.node().textContent}function rz(){this.innerHTML=""}function iz(e){return function(){this.innerHTML=e}}function oz(e){return function(){var t=e.apply(this,arguments);this.innerHTML=t==null?"":t}}function sz(e){return arguments.length?this.each(e==null?rz:(typeof e=="function"?oz:iz)(e)):this.node().innerHTML}function az(){this.nextSibling&&this.parentNode.appendChild(this)}function lz(){return this.each(az)}function cz(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function dz(){return this.each(cz)}function uz(e){var t=typeof e=="function"?e:nw(e);return this.select(function(){return this.appendChild(t.apply(this,arguments))})}function fz(){return null}function hz(e,t){var n=typeof e=="function"?e:nw(e),r=t==null?fz:typeof t=="function"?t:rw(t);return this.select(function(){return this.insertBefore(n.apply(this,arguments),r.apply(this,arguments)||null)})}function pz(){var e=this.parentNode;e&&e.removeChild(this)}function gz(){return this.each(pz)}function mz(){var e=this.cloneNode(!1),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function vz(){var e=this.cloneNode(!0),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function yz(e){return this.select(e?vz:mz)}function bz(e){return arguments.length?this.property("__data__",e):this.node().__data__}function wz(e){return function(t){e.call(this,t,this.__data__)}}function _z(e){return e.trim().split(/^|\s+/).map(function(t){var n="",r=t.indexOf(".");return r>=0&&(n=t.slice(r+1),t=t.slice(0,r)),{type:t,name:n}})}function Cz(e){return function(){var t=this.__on;if(t){for(var n=0,r=-1,s=t.length,a;n<s;++n)a=t[n],(!e.type||a.type===e.type)&&a.name===e.name?this.removeEventListener(a.type,a.listener,a.options):t[++r]=a;++r?t.length=r:delete this.__on}}}function Sz(e,t,n){return function(){var r=this.__on,s,a=wz(t);if(r){for(var l=0,c=r.length;l<c;++l)if((s=r[l]).type===e.type&&s.name===e.name){this.removeEventListener(s.type,s.listener,s.options),this.addEventListener(s.type,s.listener=a,s.options=n),s.value=t;return}}this.addEventListener(e.type,a,n),s={type:e.type,name:e.name,value:t,listener:a,options:n},r?r.push(s):this.__on=[s]}}function Ez(e,t,n){var r=_z(e+""),s,a=r.length,l;if(arguments.length<2){var c=this.node().__on;if(c){for(var u=0,d=c.length,f;u<d;++u)for(s=0,f=c[u];s<a;++s)if((l=r[s]).type===f.type&&l.name===f.name)return f.value}return}for(c=t?Sz:Cz,s=0;s<a;++s)this.each(c(r[s],t,n));return this}function fw(e,t,n){var r=aw(e),s=r.CustomEvent;typeof s=="function"?s=new s(t,n):(s=r.document.createEvent("Event"),n?(s.initEvent(t,n.bubbles,n.cancelable),s.detail=n.detail):s.initEvent(t,!1,!1)),e.dispatchEvent(s)}function xz(e,t){return function(){return fw(this,e,t)}}function kz(e,t){return function(){return fw(this,e,t.apply(this,arguments))}}function Nz(e,t){return this.each((typeof t=="function"?kz:xz)(e,t))}function*Tz(){for(var e=this._groups,t=0,n=e.length;t<n;++t)for(var r=e[t],s=0,a=r.length,l;s<a;++s)(l=r[s])&&(yield l)}var Az=[null];function Bn(e,t){this._groups=e,this._parents=t}function Oz(){return this}Bn.prototype={constructor:Bn,select:VF,selectAll:r$,selectChild:l$,selectChildren:f$,filter:h$,data:b$,enter:p$,exit:_$,join:C$,merge:S$,selection:Oz,order:E$,sort:x$,call:N$,nodes:T$,node:A$,size:O$,empty:I$,each:B$,attr:$$,style:q$,property:Y$,classed:Z$,text:nz,html:sz,raise:lz,lower:dz,append:uz,insert:hz,remove:gz,clone:yz,datum:bz,on:Ez,dispatch:Nz,[Symbol.iterator]:Tz};function hw(e){return typeof e=="string"?new Bn([document.querySelectorAll(e)],[document.documentElement]):new Bn([iw(e)],Az)}const Iz={},Bz={width:"28px",height:"28px",viewBox:"0 0 28 28",version:"1.1",xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink"};function Lz(e,t){return o.openBlock(),o.createElementBlock("svg",Bz,t[0]||(t[0]=[o.createStaticVNode('<title>hmdr_icon_MD5_1</title><g id="页面-1" stroke="currentColor" class="level-color" stroke-width="1" fill="#fff" fill-rule="evenodd"><g id="3图标" transform="translate(-211.000000, -47.000000)"><g id="hmdr_icon_MD5_1" transform="translate(211.000000, 47.000000)"><rect id="矩形" fill="#FFFFFF" opacity="0" x="0" y="0" width="28" height="28"></rect><g transform="translate(2.500000, 2.500000)"><g id="hmdr_icon_yangben_1"><polyline id="路径备份" stroke-width="2" fill="#FFFFFF" points="2.65384615 22.1153846 2.65384615 0 15.0384615 0 20.3461538 5.30769231 20.3461538 22.1153846"></polyline><polygon id="路径-40" class="level-color" stroke="currentColor" fill="#192039" points="-5.8207883e-12 17.67 1.80269938 19.4726994 1.80269938 17.67"></polygon><g id="编组-44"><rect id="矩形备份" class="level-color" fill="#6E7590" x="0" y="9.73076923" width="23" height="7.96153846"></rect><polyline id="路径备份-2" stroke-width="2" points="20.3461538 5.30769231 15.0384615 5.30769231 15.0384615 -5.0701964e-14"></polyline><line id="路径-21备份" x1="2.65384615" y1="23" x2="20.3461538" y2="23" stroke-width="2" stroke-linecap="square"></line></g></g></g></g></g></g>',2)]))}const Rz=_t(Iz,[["render",Lz]]),ose="",Pz={name:"Legend",components:{NodeIcon:Oa,ForceGraphSvgIcon:so,legendLevelSvg:Rz},mixins:[kr],inject:["levelList"],props:{showPoint:{type:Boolean,default:!0},history:{type:Object,default:()=>{}},moduleDetail:{type:Object,required:!0,default:()=>{}},margin:{type:String,required:!0,default:"0"},hasLevel:{type:Boolean,default:!0},showLevelCount:{type:Boolean,default:!1}},emits:["highLight"],data(){return{legendLevelPrefix:Ah,filters:{point:[{name:"收藏",value:!0,prop:"collect"},{name:"备注",value:!0,prop:"label"},{name:"标签",value:!0,prop:"detail.tags"}]},fold:!1}},computed:{levelCount(){if(!this.showLevelCount)return;const e=this.history.dataNow.nodes,t={};return this.levelList.forEach(n=>{t[n.level]=0}),e.forEach(n=>{var s,a,l;const r=(l=(a=(s=n==null?void 0:n.detail)==null?void 0:s.info)==null?void 0:a.basic)==null?void 0:l.level;t[r]=t[r]+1}),t}},methods:{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]},highlightByRule(e,t,n,r){qt({cId:"legendIcon-"+n,c:"legend图标点击-"+e.target.innerText});const s=e.currentTarget.getAttribute("class").indexOf("active")<0;hw(".legend-filter .out-box").classed("active",!1),s?(e.currentTarget.classList.add("active"),ve(this,"highLight",t,n,r)):ve(this,"highLight")},canHighlight(e){return this.history.dataNow.nodes.some(n=>n.type===e)},handleFold(){this.fold=!this.fold},svgName(e){return e={file_md5:"md5",incident:"report",internet:"ip"}[e]||e,e+"Svg"}}},Dz={class:"container"},Mz={key:0,class:"legend-filter node-type"},Fz=["onClick"],$z={class:"name"},zz=["src"],Uz={key:1,class:"legend-filter point"},jz=["onClick"],qz={key:2,class:"legend-filter level"},Hz=["onClick"],Gz={key:0,class:"legend-level-icon-dot"},Wz={key:2};function Kz(e,t,n,r,s,a){const l=o.resolveComponent("NodeIcon"),c=o.resolveComponent("legendLevelSvg"),u=o.resolveComponent("force-graph-svg-icon");return o.openBlock(),o.createElementBlock("div",{ref:"legend-box",class:o.normalizeClass(["legend-box",{"legend-close":s.fold}])},[o.createElementVNode("div",Dz,[n.moduleDetail?(o.openBlock(),o.createElementBlock("div",Mz,[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(n.moduleDetail.nodes,d=>(o.openBlock(),o.createElementBlock("div",{key:d.name,class:o.normalizeClass(["out-box node-color-1",a.canHighlight(d.name)?"":"disabled"]),onClick:f=>a.highlightByRule(f,"equal","type",d.name)},[o.createElementVNode("p",{class:"label",style:o.normalizeStyle({margin:n.margin})},[o.createVNode(l,{"node-info":{type:d.name}},null,8,["node-info"]),o.createElementVNode("span",$z,o.toDisplayString(d.namec),1)],4)],10,Fz))),128)),o.createElementVNode("div",{class:"out-box node-color-1",onClick:t[0]||(t[0]=d=>a.highlightByRule(d,"equal","type","nodeType"))},[o.createElementVNode("p",{class:"label",style:o.normalizeStyle({margin:n.margin})},[o.createElementVNode("img",{src:e.imgPath["./public/d3svg1/node_type.svg"],alt:""},null,8,zz),t[2]||(t[2]=o.createElementVNode("span",{class:"name"},"关系",-1))],4)])])):o.createCommentVNode("",!0),n.showPoint?(o.openBlock(),o.createElementBlock("div",Uz,[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(s.filters.point,d=>(o.openBlock(),o.createElementBlock("div",{key:d.prop,class:"out-box",onClick:f=>a.highlightByRule(f,"boolean",d.prop,d.value)},[o.createElementVNode("p",{class:"label",style:o.normalizeStyle({margin:n.margin})},o.toDisplayString(d.name),5)],8,jz))),128))])):o.createCommentVNode("",!0),n.hasLevel?(o.openBlock(),o.createElementBlock("div",qz,[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(a.levelList,d=>(o.openBlock(),o.createElementBlock("div",{key:d.level,class:o.normalizeClass(["out-box",`${s.legendLevelPrefix}${d.className}`]),onClick:f=>a.highlightByRule(f,"equal","detail.info.basic.level",d.level)},[o.createElementVNode("p",{class:"label",style:o.normalizeStyle({margin:n.margin})},[d.iconType==="dot"?(o.openBlock(),o.createElementBlock("span",Gz)):(o.openBlock(),o.createBlock(c,{key:1,class:"legend-level-icon"})),o.createTextVNode(" "+o.toDisplayString(d.levelName)+" ",1),n.showLevelCount?(o.openBlock(),o.createElementBlock("span",Wz,"("+o.toDisplayString(a.levelCount[d.level])+")",1)):o.createCommentVNode("",!0)],4)],10,Hz))),128))])):o.createCommentVNode("",!0),o.createElementVNode("div",{class:"fold-btn",onClick:t[1]||(t[1]=(...d)=>a.handleFold&&a.handleFold(...d))},[s.fold?(o.openBlock(),o.createBlock(u,{key:0,class:"button-img","icon-class":e.imgPath["./public/d3svg1/fold-right.svg"]},null,8,["icon-class"])):(o.openBlock(),o.createBlock(u,{key:1,class:"button-img","icon-class":e.imgPath["./public/d3svg1/fold-left.svg"]},null,8,["icon-class"]))])])],2)}const Yz=_t(Pz,[["render",Kz],["__scopeId","data-v-5e1ba822"]]),sse="",Jz={key:0,class:"node-control-panel"},Xz={key:0},Qz=["onClick"],Zz=["src"],Vz={class:"node-control-panel-name"},eU={__name:"NodeVisibleControl",props:{moduleDetail:{type:Object,default:()=>({})},history:{type:Object,default:()=>({})},startNode:{type:Array},customNodeImages:{type:Object,default:()=>{}}},setup(e){const t=e,n=o.ref({}),r=o.computed(()=>t.startNode.map(u=>u.type)),s=o.computed(()=>{var u,d;return((d=(u=t.moduleDetail)==null?void 0:u.nodes)==null?void 0:d.filter(f=>!!(c(f.name)&&!r.value.includes(f.name))))||[]}),a=()=>{var u,d;(d=(u=t.moduleDetail)==null?void 0:u.nodes)==null||d.forEach(f=>{if(c(f.name))return n.value[f.name]=!0,!0})},l=u=>{n.value[u]=!n.value[u];const d=t.history.dataNow.nodes.filter(f=>f.type===u);ve(Re,"buttonClick",{nodes:d,api:{name:n.value[u]?"show_nodes":"hide_nodes"}})},c=u=>t.history.dataNow.nodes.some(d=>d.type===u);return o.watch(()=>t.history.dataNow.nodes.length,()=>{a()},{deep:!0,immediate:!0}),(u,d)=>s.value.length?(o.openBlock(),o.createElementBlock("div",Jz,[e.moduleDetail?(o.openBlock(),o.createElementBlock("div",Xz,[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(s.value,f=>(o.openBlock(),o.createElementBlock("div",{key:f.name,class:o.normalizeClass(["node-control-panel-item",{disabled:!c(f.name),"hidden-node":!n.value[f.name]}]),onClick:p=>l(f.name)},[e.customNodeImages[f.name]?(o.openBlock(),o.createElementBlock("img",{key:0,src:e.customNodeImages[f.name],alt:"",class:"node-control-panel-img"},null,8,Zz)):(o.openBlock(),o.createBlock(Oa,{key:1,class:"node-control-panel-img","node-info":{type:f.name}},null,8,["node-info"])),o.createElementVNode("span",Vz,o.toDisplayString(f.namec),1)],10,Qz))),128))])):o.createCommentVNode("",!0)])):o.createCommentVNode("",!0)}},ase="",lse="",cse="",dse="",use="",fse="",hse="",pse="",gse="",mse="",vse="",yse="",tU={},nU={class:"search-icon",width:"16px",height:"16px",viewBox:"0 0 16 16",version:"1.1",xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink"};function rU(e,t){return o.openBlock(),o.createElementBlock("svg",nU,t[0]||(t[0]=[o.createStaticVNode('<title>放大镜</title><g id="控件" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd"><g id="基础输入框" transform="translate(-176.000000, -8.000000)"><g id="编组" transform="translate(176.000000, 8.000000)"><polygon id="蒙版" opacity="0.200000003" points="0 0 16 0 16 16 0 16"></polygon><path id="形状结合" d="M6.85714286,1.24344979e-14 C10.6442383,1.24344979e-14 13.7142857,3.07004743 13.7142857,6.85714286 C13.7142857,8.54517828 13.1043337,10.0907518 12.0928056,11.2854873 L15.8326324,15.0245104 L15.0245104,15.8326324 L15.0245104,15.8326324 L11.2854873,12.0928056 C10.0907518,13.1043337 8.54517828,13.7142857 6.85714286,13.7142857 C3.07004743,13.7142857 -3.11395354e-12,10.6442383 -3.11395354e-12,6.85714286 C-3.11395354e-12,3.07004743 3.07004743,1.24344979e-14 6.85714286,1.24344979e-14 Z M6.85714286,1.14285714 C3.70123,1.14285714 1.14285714,3.70123 1.14285714,6.85714286 C1.14285714,10.0130557 3.70123,12.5714286 6.85714286,12.5714286 C10.0130557,12.5714286 12.5714286,10.0130557 12.5714286,6.85714286 C12.5714286,3.70123 10.0130557,1.14285714 6.85714286,1.14285714 Z" fill="#999999" fill-rule="nonzero"></path></g></g></g>',2)]))}const iU=_t(tU,[["render",rU]]),bse="",wse="";function pw(e){return e.toLowerCase().indexOf("ip:")===0&&(e=e.substr(3)),/^((25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(25[0-5]|2[0-4]\d|[01]?\d\d?)$/i.test(e)}function gw(e){return e.toLowerCase().indexOf("domain:")===0&&(e=e.substr(7)),/^[a-zA-Z0-9_][-a-zA-Z0-9_]{0,62}(\.[a-zA-Z0-9_][-a-zA-Z0-9_]{0,62})+\.?$/.test(e)}function mw(e){return e.toLowerCase().indexOf("url:")===0&&(e=e.substr(4)),/^https?:\/\/[^\s<]+[^<.,:;"')\]\s]$/g.test(e)}function ap(e){return/^([a-fA-F0-9]{32})$/.test(e)}function oU(e){return/^([a-fA-F0-9]{40})$/.test(e)}function sU(e){return/^\w{32}$/.test(e)}function aU(e){return/^(cve|CVE)-[0-9]{4}-[0-9]{4,5}$/.test(e)}function lU(e){return/^\w+(\.\w+)*@\w+(\.\w+)*(\.[a-z]{2,})$/.test(e)}const _se="",Cse="",cU={props:{nodesType:{type:Array,default:()=>[]},addType:{type:String,default:"diy"}},inject:["moduleDetail"],data(){var e=(t,n,r)=>{switch(n=n.toLowerCase().split(`
|
|
104
|
+
*/(function(e,t){(function(r,s){e.exports=s()})(wi,function(){return function(){var n={686:function(a,l,c){c.d(l,{default:function(){return ie}});var u=c(279),d=c.n(u),f=c(370),p=c.n(f),g=c(817),v=c.n(g);function b(ee){try{return document.execCommand(ee)}catch(Y){return!1}}var w=function(Y){var J=v()(Y);return b("cut"),J},_=w;function C(ee){var Y=document.documentElement.getAttribute("dir")==="rtl",J=document.createElement("textarea");J.style.fontSize="12pt",J.style.border="0",J.style.padding="0",J.style.margin="0",J.style.position="absolute",J.style[Y?"right":"left"]="-9999px";var oe=window.pageYOffset||document.documentElement.scrollTop;return J.style.top="".concat(oe,"px"),J.setAttribute("readonly",""),J.value=ee,J}var k=function(Y,J){var oe=C(Y);J.container.appendChild(oe);var re=v()(oe);return b("copy"),oe.remove(),re},S=function(Y){var J=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{container:document.body},oe="";return typeof Y=="string"?oe=k(Y,J):Y instanceof HTMLInputElement&&!["text","search","url","tel","password"].includes(Y==null?void 0:Y.type)?oe=k(Y.value,J):(oe=v()(Y),b("copy")),oe},E=S;function N(ee){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?N=function(J){return typeof J}:N=function(J){return J&&typeof Symbol=="function"&&J.constructor===Symbol&&J!==Symbol.prototype?"symbol":typeof J},N(ee)}var A=function(){var Y=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},J=Y.action,oe=J===void 0?"copy":J,re=Y.container,z=Y.target,G=Y.text;if(oe!=="copy"&&oe!=="cut")throw new Error('Invalid "action" value, use either "copy" or "cut"');if(z!==void 0)if(z&&N(z)==="object"&&z.nodeType===1){if(oe==="copy"&&z.hasAttribute("disabled"))throw new Error('Invalid "target" attribute. Please use "readonly" instead of "disabled" attribute');if(oe==="cut"&&(z.hasAttribute("readonly")||z.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(G)return E(G,{container:re});if(z)return oe==="cut"?_(z):E(z,{container:re})},I=A;function O(ee){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?O=function(J){return typeof J}:O=function(J){return J&&typeof Symbol=="function"&&J.constructor===Symbol&&J!==Symbol.prototype?"symbol":typeof J},O(ee)}function F(ee,Y){if(!(ee instanceof Y))throw new TypeError("Cannot call a class as a function")}function P(ee,Y){for(var J=0;J<Y.length;J++){var oe=Y[J];oe.enumerable=oe.enumerable||!1,oe.configurable=!0,"value"in oe&&(oe.writable=!0),Object.defineProperty(ee,oe.key,oe)}}function M(ee,Y,J){return Y&&P(ee.prototype,Y),J&&P(ee,J),ee}function W(ee,Y){if(typeof Y!="function"&&Y!==null)throw new TypeError("Super expression must either be null or a function");ee.prototype=Object.create(Y&&Y.prototype,{constructor:{value:ee,writable:!0,configurable:!0}}),Y&&U(ee,Y)}function U(ee,Y){return U=Object.setPrototypeOf||function(oe,re){return oe.__proto__=re,oe},U(ee,Y)}function Q(ee){var Y=j();return function(){var oe=K(ee),re;if(Y){var z=K(this).constructor;re=Reflect.construct(oe,arguments,z)}else re=oe.apply(this,arguments);return q(this,re)}}function q(ee,Y){return Y&&(O(Y)==="object"||typeof Y=="function")?Y:D(ee)}function D(ee){if(ee===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return ee}function j(){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(ee){return!1}}function K(ee){return K=Object.setPrototypeOf?Object.getPrototypeOf:function(J){return J.__proto__||Object.getPrototypeOf(J)},K(ee)}function H(ee,Y){var J="data-clipboard-".concat(ee);if(Y.hasAttribute(J))return Y.getAttribute(J)}var R=function(ee){W(J,ee);var Y=Q(J);function J(oe,re){var z;return F(this,J),z=Y.call(this),z.resolveOptions(re),z.listenClick(oe),z}return M(J,[{key:"resolveOptions",value:function(){var re=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.action=typeof re.action=="function"?re.action:this.defaultAction,this.target=typeof re.target=="function"?re.target:this.defaultTarget,this.text=typeof re.text=="function"?re.text:this.defaultText,this.container=O(re.container)==="object"?re.container:document.body}},{key:"listenClick",value:function(re){var z=this;this.listener=p()(re,"click",function(G){return z.onClick(G)})}},{key:"onClick",value:function(re){var z=re.delegateTarget||re.currentTarget,G=this.action(z)||"copy",te=I({action:G,container:this.container,target:this.target(z),text:this.text(z)});this.emit(te?"success":"error",{action:G,text:te,trigger:z,clearSelection:function(){z&&z.focus(),window.getSelection().removeAllRanges()}})}},{key:"defaultAction",value:function(re){return H("action",re)}},{key:"defaultTarget",value:function(re){var z=H("target",re);if(z)return document.querySelector(z)}},{key:"defaultText",value:function(re){return H("text",re)}},{key:"destroy",value:function(){this.listener.destroy()}}],[{key:"copy",value:function(re){var z=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{container:document.body};return E(re,z)}},{key:"cut",value:function(re){return _(re)}},{key:"isSupported",value:function(){var re=arguments.length>0&&arguments[0]!==void 0?arguments[0]:["copy","cut"],z=typeof re=="string"?[re]:re,G=!!document.queryCommandSupported;return z.forEach(function(te){G=G&&!!document.queryCommandSupported(te)}),G}}]),J}(d()),ie=R},828:function(a){var l=9;if(typeof Element!="undefined"&&!Element.prototype.matches){var c=Element.prototype;c.matches=c.matchesSelector||c.mozMatchesSelector||c.msMatchesSelector||c.oMatchesSelector||c.webkitMatchesSelector}function u(d,f){for(;d&&d.nodeType!==l;){if(typeof d.matches=="function"&&d.matches(f))return d;d=d.parentNode}}a.exports=u},438:function(a,l,c){var u=c(828);function d(g,v,b,w,_){var C=p.apply(this,arguments);return g.addEventListener(b,C,_),{destroy:function(){g.removeEventListener(b,C,_)}}}function f(g,v,b,w,_){return typeof g.addEventListener=="function"?d.apply(null,arguments):typeof b=="function"?d.bind(null,document).apply(null,arguments):(typeof g=="string"&&(g=document.querySelectorAll(g)),Array.prototype.map.call(g,function(C){return d(C,v,b,w,_)}))}function p(g,v,b,w){return function(_){_.delegateTarget=u(_.target,v),_.delegateTarget&&w.call(g,_)}}a.exports=f},879:function(a,l){l.node=function(c){return c!==void 0&&c instanceof HTMLElement&&c.nodeType===1},l.nodeList=function(c){var u=Object.prototype.toString.call(c);return c!==void 0&&(u==="[object NodeList]"||u==="[object HTMLCollection]")&&"length"in c&&(c.length===0||l.node(c[0]))},l.string=function(c){return typeof c=="string"||c instanceof String},l.fn=function(c){var u=Object.prototype.toString.call(c);return u==="[object Function]"}},370:function(a,l,c){var u=c(879),d=c(438);function f(b,w,_){if(!b&&!w&&!_)throw new Error("Missing required arguments");if(!u.string(w))throw new TypeError("Second argument must be a String");if(!u.fn(_))throw new TypeError("Third argument must be a Function");if(u.node(b))return p(b,w,_);if(u.nodeList(b))return g(b,w,_);if(u.string(b))return v(b,w,_);throw new TypeError("First argument must be a String, HTMLElement, HTMLCollection, or NodeList")}function p(b,w,_){return b.addEventListener(w,_),{destroy:function(){b.removeEventListener(w,_)}}}function g(b,w,_){return Array.prototype.forEach.call(b,function(C){C.addEventListener(w,_)}),{destroy:function(){Array.prototype.forEach.call(b,function(C){C.removeEventListener(w,_)})}}}function v(b,w,_){return d(document.body,b,w,_)}a.exports=f},817:function(a){function l(c){var u;if(c.nodeName==="SELECT")c.focus(),u=c.value;else if(c.nodeName==="INPUT"||c.nodeName==="TEXTAREA"){var d=c.hasAttribute("readonly");d||c.setAttribute("readonly",""),c.select(),c.setSelectionRange(0,c.value.length),d||c.removeAttribute("readonly"),u=c.value}else{c.hasAttribute("contenteditable")&&c.focus();var f=window.getSelection(),p=document.createRange();p.selectNodeContents(c),f.removeAllRanges(),f.addRange(p),u=f.toString()}return u}a.exports=l},279:function(a){function l(){}l.prototype={on:function(c,u,d){var f=this.e||(this.e={});return(f[c]||(f[c]=[])).push({fn:u,ctx:d}),this},once:function(c,u,d){var f=this;function p(){f.off(c,p),u.apply(d,arguments)}return p._=u,this.on(c,p,d)},emit:function(c){var u=[].slice.call(arguments,1),d=((this.e||(this.e={}))[c]||[]).slice(),f=0,p=d.length;for(f;f<p;f++)d[f].fn.apply(d[f].ctx,u);return this},off:function(c,u){var d=this.e||(this.e={}),f=d[c],p=[];if(f&&u)for(var g=0,v=f.length;g<v;g++)f[g].fn!==u&&f[g].fn._!==u&&p.push(f[g]);return p.length?d[c]=p:delete d[c],this}},a.exports=l,a.exports.TinyEmitter=l}},r={};function s(a){if(r[a])return r[a].exports;var l=r[a]={exports:{}};return n[a](l,l.exports,s),l.exports}return function(){s.n=function(a){var l=a&&a.__esModule?function(){return a.default}:function(){return a};return s.d(l,{a:l}),l}}(),function(){s.d=function(a,l){for(var c in l)s.o(l,c)&&!s.o(a,c)&&Object.defineProperty(a,c,{enumerable:!0,get:l[c]})}}(),function(){s.o=function(a,l){return Object.prototype.hasOwnProperty.call(a,l)}}(),s(686)}().default})})(T2);var PD=T2.exports;const DD=Vy(PD),Ac=e=>{const t=(e==null?void 0:e.appendToBody)===void 0?!0:e.appendToBody;return{toClipboard(n,r){return new Promise((s,a)=>{const l=document.createElement("button"),c=new DD(l,{text:()=>n,action:()=>"copy",container:r!==void 0?r:document.body});c.on("success",u=>{c.destroy(),s(u)}),c.on("error",u=>{c.destroy(),a(u)}),t&&document.body.appendChild(l),l.click(),t&&document.body.removeChild(l)})}}},Voe="",{toClipboard:MD}=Ac(),FD={name:"NodeDetail",components:{NodeIcon:Oa,QuestionFilled:S1,ForceGraphSvgIcon:so},mixins:[kr],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"?"":Sc(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(RD),e.push(x2),e.push(BD),e.push(this.data.collect?E2:S2),e.push(this.data.textProp==="name"?AD:TD),e.push(this.data.fx?$h:Fh),e.push(zh),this.data.label&&e.push(this.data.textProp==="label"?OD:ID);else if(this.selectedNodes.length===1&&this.selectedNodes[0].type==="aggregation"){const r=this.history.dataNow.links.some(s=>s.source.id===this.data.id&&s.target.type==="aggregation");e.push(r||this.data.type==="aggregation"?C2:_2),e.push(this.data.fx?$h:Fh),e.push(zh)}else{const r=this.history.dataNow.links.some(d=>d.source.id===this.data.id&&d.target.type==="aggregation"),s=this.history.dataNow.links.filter(d=>d.source.id===this.data.id),a=this.history.dataNow.links.filter(d=>d.target.id===this.data.id),l=s.map(d=>d.target),c=a.map(d=>d.source),u=l.some(d=>{let f=0;return this.history.dataNow.links.map(p=>{p.source.id===d.id&&f++}),f===0});this.data.type!=="aggregation"&&this.data.type!=="nodeType"?(e.push(x2),e.push(this.data.collect?E2:S2),l.length===1&&e.push(k2),c.length===1&&e.push(N2)):(l.length>0&&e.push(k2),c.length>0&&e.push(N2)),e.push(this.data.fx?$h:Fh),r||this.data.type==="aggregation"?e.push(C2):u&&e.push(_2),e.push(LD),e.push(zh)}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(){Si(Re,"flagIcon",e=>{this.flagFiles={},e!==void 0&&(this.flagFiles=e)})},mounted(){Si(Re,"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(){Ei(Re,"flagIcon"),Ei(Re,"relationNum")},methods:{isSomething(e){return Bh(e)},hover(e){this.current=e},out(){this.current=null},handleButtonClick(e){qt({cId:"rightMenu-"+e.name,c:"右侧菜单-"+e.namec}),this.selectedNodes.length>1?ve(Re,"buttonClick",{nodes:[...this.selectedNodes],api:e}):this.data.type!=="nodeType"?ve(Re,"buttonClick",{nodes:[...this.selectedNodes],api:e}):ve(Re,"buttonClick",{nodes:[...this.selectedNodes],api:e})},copyText(e){qt({cId:"copyText",c:"复制"}),MD(e).then(t=>Nt({message:"复制成功",type:"success"}),t=>Nt.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 s="-";return r&&(n?s=t.length?t.join("|"):"-":s=t||"-"),s},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 Nc(Tc(e))}}},$D={class:"node-detail-block"},zD={class:"node-preview"},UD={class:"left"},jD={class:"icon-group"},qD={key:0,class:"md5-type"},HD=["title"],GD={class:"right"},WD=["title"],KD={class:"title-top"},YD={key:0,class:"node-num"},JD={class:"opt-btns"},XD={key:0,class:"node-num"},QD={class:"opt-btns"},ZD={class:"node-field-list"},VD={key:0,class:"row-item row-item-tag"},eM={class:"value"},tM={class:"graph-tags-box"},nM={key:0,class:"row-item"},rM={class:"label"},iM=["title"],oM={class:"detail"},sM=["title"],aM=["title"],lM={key:1,class:"select-mults"},cM={class:"title-top"},dM={class:"node-num"},uM={class:"controls-box"},fM=["onMouseenter"];function hM(e,t,n,r,s,a){const l=o.resolveComponent("NodeIcon"),c=gn,u=Ea,d=o.resolveComponent("QuestionFilled"),f=Ye,p=o.resolveComponent("force-graph-svg-icon");return o.openBlock(),o.createElementBlock("div",$D,[n.selectedNodes.length===1?(o.openBlock(),o.createElementBlock(o.Fragment,{key:0},[o.createElementVNode("div",zD,[o.createElementVNode("div",UD,[o.createElementVNode("div",jD,[o.createVNode(l,{class:"node-icon","node-info":n.data},null,8,["node-info"]),n.data.type==="md5"?(o.openBlock(),o.createElementBlock("p",qD,o.toDisplayString(n.data.detail&&n.data.detail.info.basic.file_type.toUpperCase()||"MD5"),1)):o.createCommentVNode("",!0)]),a.canGoDetail&&n.data.detail&&n.data.detail.info.basic.level?(o.openBlock(),o.createElementBlock("div",{key:0,class:o.normalizeClass(["level-text",a.levelClassName]),title:n.data.detail&&n.data.detail.info.basic.level},o.toDisplayString(n.data.detail&&n.data.detail.info.basic.level),11,HD)):o.createCommentVNode("",!0)]),o.createElementVNode("div",GD,[o.createElementVNode("div",{class:o.normalizeClass(["id-box",n.data.type==="nodeType"||n.data.type==="aggregation"?"id-box2":""]),title:n.data.name},[o.createElementVNode("h3",KD,[a.canGoUrl?(o.openBlock(),o.createElementBlock(o.Fragment,{key:0},[o.createElementVNode("span",{class:"go-result",onClick:t[0]||(t[0]=g=>a.handleButtonClick({name:"go_result",namec:"详情页查看",type:2}))},[o.createTextVNode(o.toDisplayString(a.cutName(n.data.name==="聚合"?"聚合节点":n.data.name))+" ",1),n.data.type==="nodeType"||n.data.type==="aggregation"?(o.openBlock(),o.createElementBlock("span",YD,o.toDisplayString(s.childNodesLength),1)):o.createCommentVNode("",!0)]),o.createElementVNode("span",JD,[o.createVNode(c,{content:"复制","popper-class":"el-tooltip-gray"},{default:o.withCtx(()=>[o.createElementVNode("img",{src:"https://s7.qhres2.com/static/d42d48bb495c87dc.svg",class:"id-copy",onClick:t[1]||(t[1]=o.withModifiers(g=>a.copyText(n.data.name),["prevent"]))})]),_:1})])],64)):(o.openBlock(),o.createElementBlock(o.Fragment,{key:1},[o.createTextVNode(o.toDisplayString(a.cutName(n.data.name==="聚合"?"聚合节点":n.data.name))+" ",1),n.data.type==="nodeType"||n.data.type==="aggregation"?(o.openBlock(),o.createElementBlock("span",XD,o.toDisplayString(s.childNodesLength),1)):o.createCommentVNode("",!0),o.createElementVNode("span",QD,[o.createVNode(c,{content:"复制","popper-class":"el-tooltip-gray"},{default:o.withCtx(()=>[o.createElementVNode("img",{src:"https://s7.qhres2.com/static/d42d48bb495c87dc.svg",class:"id-copy",onClick:t[2]||(t[2]=g=>a.copyText(n.data.name))})]),_:1})])],64))])],10,WD)])]),o.createElementVNode("div",ZD,[n.data.detail&&n.data.detail.tags&&n.data.detail.tags.length>0?(o.openBlock(),o.createElementBlock("div",VD,[t[6]||(t[6]=o.createElementVNode("div",{class:"label"},"标签:",-1)),o.createElementVNode("div",eM,[o.createElementVNode("div",tM,[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(a.formatTags(n.data.detail.tags),(g,v)=>(o.openBlock(),o.createBlock(c,{key:v,"popper-class":"el-tooltip-gray"},{content:o.withCtx(()=>[o.createElementVNode("div",null,[o.createTextVNode(o.toDisplayString(g.name===g.desc?g.name:g.name+":"+g.desc)+" ",1),g.disabled?(o.openBlock(),o.createElementBlock(o.Fragment,{key:0},[t[4]||(t[4]=o.createElementVNode("br",null,null,-1)),t[5]||(t[5]=o.createTextVNode(" 标签状态:失效 "))],64)):o.createCommentVNode("",!0)])]),default:o.withCtx(()=>[o.createVNode(u,{class:o.normalizeClass(["graph-tag-one",`${g.type||"unknown"} ${g.disabled?"tag-disable":""}`]),type:g.type||"info"},{default:o.withCtx(()=>[o.createTextVNode(o.toDisplayString(g.name),1)]),_:2},1032,["class","type"])]),_:2},1024))),128))])])])):o.createCommentVNode("",!0),(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(a.fieldMapThisType,(g,v)=>(o.openBlock(),o.createElementBlock(o.Fragment,null,[a.canShowField(g)?(o.openBlock(),o.createElementBlock("div",nM,[o.createElementVNode("div",rM,o.toDisplayString(g.zh)+":",1),o.createElementVNode("div",{class:o.normalizeClass(["value",{virus:g.prop==="virus_name"}]),title:n.data.detail.info.basic[v]},[o.createElementVNode("p",oM,[Array.isArray(n.data.detail.info.basic[g.prop])?(o.openBlock(),o.createElementBlock("span",{key:0,class:"item",title:n.data.detail.info.basic[v]},o.toDisplayString(a.getFieldValue(g)),9,sM)):(o.openBlock(),o.createElementBlock("span",{key:1,class:o.normalizeClass(["item",{desc:g.show_all}]),title:n.data.detail.info.basic[v]},[o.createTextVNode(o.toDisplayString(a.getFieldValue(g))+" ",1),g.zh==="应用类型"&&a.getUsageTypeContent(n.data.detail.info.basic[g.prop])?(o.openBlock(),o.createBlock(c,{key:0,content:a.getUsageTypeContent(n.data.detail.info.basic[g.prop]),placement:"bottom","popper-class":"el-tooltip-gray"},{default:o.withCtx(()=>[o.createVNode(f,null,{default:o.withCtx(()=>[o.createVNode(d)]),_:1})]),_:2},1032,["content"])):o.createCommentVNode("",!0)],10,aM))])],10,iM)])):o.createCommentVNode("",!0)],64))),256))])],64)):n.selectedNodes.length>1?(o.openBlock(),o.createElementBlock("div",lM,[o.createElementVNode("h3",cM,[t[7]||(t[7]=o.createTextVNode(" 选中节点")),o.createElementVNode("span",dM,o.toDisplayString(n.selectedNodes.length),1)])])):o.createCommentVNode("",!0),o.withDirectives(o.createElementVNode("div",uM,[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(s.controls,(g,v)=>(o.openBlock(),o.createElementBlock("div",{key:v,class:"image-list",onMouseenter:b=>a.hover(v),onMouseleave:t[3]||(t[3]=b=>a.out())},[o.createVNode(c,{content:g.namec,"popper-class":"el-tooltip-gray"},{default:o.withCtx(()=>[o.createVNode(p,{class:o.normalizeClass(["button-img",n.requestGraphData?s.controls.length>9?"button-img-more ":"":"disabled"]),"icon-class":e.imgPath["./public/d3svg1/button22/button_"+g.name+".svg"],onClick:b=>a.handleButtonClick(g)},null,8,["icon-class","class","onClick"])]),_:2},1032,["content"])],40,fM))),128))],512),[[o.vShow,s.controls.length>0]])])}const pM=_t(FD,[["render",hM]]),ese="",Uh={name:"fix_nodes",namec:"固定节点",type:2},jh={name:"un_fix_nodes",namec:"解除固定",type:2},A2={name:"all_fix_nodes",namec:"全部固定节点",type:2},O2={name:"all_un_fix_nodes",namec:"全部解除固定",type:2},qh={name:"show_names",namec:"显示名称",type:2},Hh={name:"un_show_names",namec:"隐藏名称",type:2},Gh={name:"un_show_label",namec:"隐藏备注",type:2},Wh={name:"show_label",namec:"显示备注",type:2},I2={name:"all_show_names",namec:"全部显示名称",type:2},B2={name:"all_un_show_names",namec:"全部隐藏名称",type:2},L2={name:"all_un_show_label",namec:"全部隐藏备注",type:2},R2={name:"all_show_label",namec:"全部显示备注",type:2},P2={name:"undo",namec:"撤销",type:2},D2={name:"redo",namec:"恢复",type:2},M2={name:"single_edge_select",namec:"单边子顶点选择",type:2},F2={name:"hold_aggregation",namec:"单边子顶点聚合",type:2},$2={name:"release_aggregation",namec:"聚合顶点释放",type:2},Kh={name:"copy",namec:"复制",type:2,shortcut:"Ctrl+c"},Yh={name:"node_star",namec:"收藏",type:2},Jh={name:"un_node_star",namec:"取消收藏",type:2},Xh={name:"edit_label",namec:"修改备注",type:2},z2={name:"expand_node",namec:"完整展开",type:2},U2={name:"expand_part_node",namec:"部分展开",type:2},j2={name:"go_result",namec:"详情页查看",type:2},gM={name:"show_group",namec:"分组显示",type:2},mM={name:"hide_group",namec:"隐藏分组",type:2},Qh={name:"delete_node",namec:"删除",type:2,shortcut:"Delete"},vM=Object.freeze(Object.defineProperty({__proto__:null,allFixNodes:A2,allShowLabel:R2,allShowNames:I2,allUnFixNodes:O2,allUnShowLabel:L2,allUnShowNames:B2,copy:Kh,deleteNode:Qh,editLabel:Xh,expandNode:z2,expandPartNode:U2,fixNodes:Uh,goResult:j2,hideGroup:mM,holdAggregation:F2,nodeStar:Yh,redo:D2,releaseAggregation:$2,showGroup:gM,showLabel:Wh,showNames:qh,singleEdgeSelect:M2,unFixNodes:jh,unNodeStar:Jh,unShowLabel:Gh,unShowNames:Hh,undo:P2},Symbol.toStringTag,{value:"Module"})),q2={org:[47,54],family:[38,38],vul:[38,38],default:[28,28]},tse="",yM={name:"SelectSingle",components:{NodeIcon:Oa,ForceGraphSvgIcon:so},mixins:[kr],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:Sc,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",xc(this.imgPath["./public/d3svg1/flags/ip.png"]).then(t=>{this.flagIcon[e]=t})):xc(this.imgPath[`./public/d3svg1/flags/${e}.png`]).then(t=>{this.flagIcon[e]=t}),ve(Re,"flagIcon",this.flagIcon)},getViewBox(e,t){const n=q2[e]||q2.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){ve(this,"toggle-fold",e)},handleToggleEye(e,t,n){ve(this,"toggle-eye",e,t,n)},handleShowDetail(e,t){ve(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){ve(this,"relation-click",e)},formatTags(e){return Nc(Tc(e))},getRefSetter(e){return t=>{!this.$arrRefs&&(this.$arrRefs={}),!this.$arrRefs[e]&&(this.$arrRefs[e]=[]),t&&this.$arrRefs[e].push(t)}}}},bM={key:0,class:"row-item row-parent"},wM={class:"left"},_M={key:0,class:"image-icon"},CM={key:0,class:"md5-type"},SM={class:"mid"},EM=["title","textContent"],xM={class:"left"},kM=["src"],NM={class:"mid"},TM={class:"text-name"},AM={key:0,class:"count-wrapper"},OM={key:0,class:"num-wrapper"},IM={class:"num"},BM={key:1,class:"count-wrapper"},LM={key:0,class:"num-wrapper"},RM={class:"num"},PM={class:"right"},DM={key:0,class:"extent-icon"},MM={class:"left"},FM={key:0,class:"md5-type"},$M={class:"mid"},zM=["onClick","textContent"],UM={key:0,class:"detail-box"},jM={key:0,class:"segment"},qM={key:1,class:"graph-tags-box"},HM={class:"right"},GM=["onClick"];function WM(e,t,n,r,s,a){const l=o.resolveComponent("NodeIcon"),c=o.resolveComponent("force-graph-svg-icon"),u=gn,d=Ea;return o.openBlock(),o.createElementBlock("div",{class:o.normalizeClass(["relation-item-single",{"aggregation-item":n.isAggregation}])},[o.createElementVNode("div",{class:o.normalizeClass([{"has-parent":a.isShowFirstLevel},"line-icon-relation"])},null,2),a.isShowFirstLevel?(o.openBlock(),o.createElementBlock("div",bM,[o.createElementVNode("div",wM,[a.hasParentNode?(o.openBlock(),o.createElementBlock("div",_M,[o.createVNode(l,{class:"svgBase","node-info":s.data.parentNode},null,8,["node-info"]),s.data.parentNode.type==="md5"?(o.openBlock(),o.createElementBlock("p",CM,o.toDisplayString(s.data.parentNode.detail&&s.data.parentNode.detail.info.basic.file_type.toUpperCase()||"MD5"),1)):o.createCommentVNode("",!0)])):o.createCommentVNode("",!0)]),o.createElementVNode("div",SM,[o.createElementVNode("div",{class:"text-name",title:s.data.parentNode&&s.data.parentNode.name,textContent:o.toDisplayString(s.data.parentNode&&s.data.parentNode.name)},null,8,EM)])])):o.createCommentVNode("",!0),o.createElementVNode("div",{class:o.normalizeClass(["row-item row-nodetype",{"extent-nodetype":s.data.isExtentNode&&!n.isCombineData,"extent-data":s.data.isExtentNode&&s.data.hasExtention,"extent-disabled":s.data.noExtentNode}])},[o.createElementVNode("div",xM,[!n.isAggregation&&s.data.childList.length>0?(o.openBlock(),o.createElementBlock("div",{key:0,class:o.normalizeClass(["image-icon-down",n.rootNode.type!=="nodeType"&&n.isRelation?"icon-left":""]),style:o.normalizeStyle({transform:s.data.showChild?"":"rotate(450deg)"}),onClick:t[0]||(t[0]=f=>a.handleToggleFold(s.data))},[o.createVNode(c,{"icon-class":e.imgPath["./public/d3svg1/jiantou.svg"],alt:""},null,8,["icon-class"])],6)):o.createCommentVNode("",!0),(o.openBlock(),o.createElementBlock("div",{key:n.value,class:"image-icon"},[o.createElementVNode("img",{src:e.imgPath["./public/d3svg1/"+s.data.icon+".svg"]||e.imgPath["./public/d3svg1/node_type.svg"],alt:""},null,8,kM)]))]),o.createElementVNode("div",NM,[o.createElementVNode("div",TM,[o.createTextVNode(o.toDisplayString(s.data.name==="聚合"?"相似同源样本":s.data.name)+" ",1),s.data.isExtentNode&&s.data.hasExtention?(o.openBlock(),o.createElementBlock("span",AM,[s.dangerNodeNum?(o.openBlock(),o.createElementBlock("span",OM,[o.createElementVNode("span",IM,o.toDisplayString(s.dangerNodeNum),1),t[3]||(t[3]=o.createTextVNode("/"))])):o.createCommentVNode("",!0),o.createTextVNode(o.toDisplayString(s.data.childList.length),1)])):o.createCommentVNode("",!0),(s.data.type==="nodeType"||n.isAggregation)&&!s.data.isExtentNode?(o.openBlock(),o.createElementBlock("span",BM,[s.dangerNodeNum?(o.openBlock(),o.createElementBlock("span",LM,[o.createElementVNode("span",RM,o.toDisplayString(s.dangerNodeNum),1),t[4]||(t[4]=o.createTextVNode("/"))])):o.createCommentVNode("",!0),o.createTextVNode(o.toDisplayString(s.data.childList.length),1)])):o.createCommentVNode("",!0)])]),o.createElementVNode("div",PM,[s.data.isExtentNode?(o.openBlock(),o.createElementBlock("div",DM,[!s.data.hasExtention||s.data.hasExtention&&s.data.childList.length===0?(o.openBlock(),o.createBlock(u,{key:0,content:"拓线","popper-class":"el-tooltip-gray",placement:"left"},{default:o.withCtx(()=>[o.createVNode(c,{class:"button-img","icon-class":e.imgPath["./public/d3svg1/button22/button_select_all.svg"],onClick:t[1]||(t[1]=f=>a.handleRelationClick(s.data))},null,8,["icon-class"])]),_:1})):(o.openBlock(),o.createBlock(u,{key:1,content:s.data.show?"显示":"隐藏","popper-class":"el-tooltip-gray",placement:"left"},{default:o.withCtx(()=>[o.createVNode(c,{class:"button-img","icon-class":s.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?o.createCommentVNode("",!0):(o.openBlock(),o.createElementBlock("div",{key:1,class:"right-icon",onClick:t[2]||(t[2]=f=>a.handleToggleEye(f,s.data,s.data.parentNode))},[o.createVNode(u,{content:s.data.show?"显示":"隐藏","popper-class":"el-tooltip-gray",placement:"left"},{default:o.withCtx(()=>[o.createVNode(c,{class:"button-img","icon-class":s.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),s.data.showChild?o.createCommentVNode("",!0):(o.openBlock(!0),o.createElementBlock(o.Fragment,{key:1},o.renderList(s.data.childList,(f,p)=>(o.openBlock(),o.createElementBlock("div",{key:"info2"+p,class:"row-item row-child"},[o.createElementVNode("div",MM,[o.createElementVNode("div",{class:o.normalizeClass(["image-icon",{"image-icom-left":n.rootNode.type==="nodeType"&&n.isRelation}])},[o.createVNode(l,{class:"svgBase","node-info":f},null,8,["node-info"]),f.type==="md5"?(o.openBlock(),o.createElementBlock("p",FM,o.toDisplayString(f.detail&&f.detail.info.basic.file_type.toUpperCase()||"MD5"),1)):o.createCommentVNode("",!0)],2)]),o.createElementVNode("div",$M,[o.createVNode(u,{ref_for:!0,ref:"tooltip",disabled:s.disable,content:f.name,placement:"top","open-delay":400,"popper-class":"el-tooltip-gray"},{default:o.withCtx(()=>[o.createElementVNode("div",{class:o.normalizeClass(["text-name",a.canShow(f,s.data)?"":"unselect-color"]),onClick:g=>a.handleShowDetail(f,a.canShow(f,s.data)),textContent:o.toDisplayString(f.name)},null,10,zM)]),_:2},1032,["disabled","content"]),f.detail&&f.detail.brief!==null?(o.openBlock(),o.createElementBlock("div",UM,[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(f.detail.brief,(g,v)=>(o.openBlock(),o.createBlock(u,{key:v,disabled:!!a.canGoDetail(f),content:g,placement:"top","popper-class":"el-tooltip-gray"},{default:o.withCtx(()=>[o.createElementVNode("div",{class:o.normalizeClass([a.canShow(f,s.data)?"":"unselect-color","text"])},[o.createTextVNode(o.toDisplayString(g)+" ",1),v!==f.detail.brief.length-1?(o.openBlock(),o.createElementBlock("span",jM,"|")):o.createCommentVNode("",!0)],2)]),_:2},1032,["disabled","content"]))),128))])):o.createCommentVNode("",!0),f.detail&&f.detail.tags&&f.detail.tags.length>0?(o.openBlock(),o.createElementBlock("div",qM,[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(a.formatTags(f.detail.tags),(g,v)=>(o.openBlock(),o.createBlock(u,{ref_for:!0,ref:a.getRefSetter("tooltip"),key:v,"open-delay":400,disabled:f.type!=="md5",content:g.desc||g.name,"popper-class":"el-tooltip-gray"},{default:o.withCtx(()=>[o.createVNode(d,{class:o.normalizeClass(["graph-tag-one",g.type||"unknown"]),type:g.type||"info"},{default:o.withCtx(()=>[o.createTextVNode(o.toDisplayString(g.name),1)]),_:2},1032,["class","type"])]),_:2},1032,["disabled","content"]))),128))])):o.createCommentVNode("",!0)]),o.createElementVNode("div",HM,[n.isAggregation?o.createCommentVNode("",!0):(o.openBlock(),o.createElementBlock("div",{key:0,class:"right-icon",onClick:g=>a.handleToggleEye(g,f,s.data)},[o.createVNode(u,{content:s.data.show?"显示":"隐藏","popper-class":"el-tooltip-gray",placement:"left"},{default:o.withCtx(()=>[o.createVNode(c,{class:"button-img","icon-class":a.canShow(f,s.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,GM))])]))),128))],2)}const KM=_t(yM,[["render",WM],["__scopeId","data-v-4e03a9d0"]]),nse="",YM={name:"SelectMults",components:{NodeIcon:Oa},mixins:[kr],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 Sc(e,this.levelMap)},getIcon(e){e.detail.info.basic.flag===""?(e.detail.info.basic.flag="ip",xc(this.imgPath["./public/d3svg1/flags/ip.png"]).then(t=>{this.flagIcon[e]=t})):xc(this.imgPath[`./public/d3svg1/flags/${e}.png`]).then(t=>{this.flagIcon[e]=t}),ve(Re,"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){ve(this,"show-detail",e,t)},formatTags(e){return Nc(Tc(e))}}},JM={class:"relation-item-mults"},XM={class:"row-item"},QM={class:"left"},ZM={class:"grid-content bg-purple"},VM={class:"image-icon"},eF={key:0,class:"md5-type"},tF={class:"mid"},nF={class:"grid-content bg-purple"},rF=["textContent"],iF={key:0,class:"detail-box"},oF={class:"text"},sF={key:0,class:"segment"},aF={class:"graph-tags-box"};function lF(e,t,n,r,s,a){const l=o.resolveComponent("NodeIcon"),c=gn,u=Ea;return o.openBlock(),o.createElementBlock("div",JM,[o.createElementVNode("div",XM,[o.createElementVNode("div",QM,[o.createElementVNode("div",ZM,[o.createElementVNode("div",VM,[o.createVNode(l,{class:"svgBase","node-info":s.data},null,8,["node-info"]),s.data.type==="md5"?(o.openBlock(),o.createElementBlock("p",eF,o.toDisplayString(s.data.detail&&s.data.detail.info.basic.file_type.toUpperCase()||"MD5"),1)):o.createCommentVNode("",!0)])])]),o.createElementVNode("div",tF,[o.createElementVNode("div",nF,[o.createVNode(c,{ref:"tooltip",disabled:s.disable,"open-delay":400,content:s.data.name,placement:"top","popper-class":"el-tooltip-gray"},{default:o.withCtx(()=>[o.createElementVNode("div",{class:"text-name text-more-select",onClick:t[0]||(t[0]=d=>a.handleShowDetail(s.data,!0)),textContent:o.toDisplayString(s.data.name)},null,8,rF)]),_:1},8,["disabled","content"]),s.data.detail&&s.data.detail.brief!==null?(o.openBlock(),o.createElementBlock("div",iF,[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(s.data.detail.brief,(d,f)=>(o.openBlock(),o.createBlock(c,{key:f,disabled:!!a.canGoDetail(s.data),content:d,placement:"top","popper-class":"el-tooltip-gray"},{default:o.withCtx(()=>[o.createElementVNode("div",oF,[o.createTextVNode(o.toDisplayString(d),1),f!==s.data.detail.brief.length-1?(o.openBlock(),o.createElementBlock("span",sF,"|")):o.createCommentVNode("",!0)])]),_:2},1032,["disabled","content"]))),128))])):o.createCommentVNode("",!0),o.withDirectives(o.createElementVNode("div",aF,[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(a.formatTags(s.data.detail&&s.data.detail.tags),(d,f)=>(o.openBlock(),o.createBlock(c,{key:f,disabled:s.data.type!=="md5",content:d.desc||d.name,"popper-class":"el-tooltip-gray"},{default:o.withCtx(()=>[o.createVNode(u,{class:o.normalizeClass(["graph-tag-one",d.type||"unknown"]),type:d.type||"info"},{default:o.withCtx(()=>[o.createTextVNode(o.toDisplayString(d.name),1)]),_:2},1032,["class","type"])]),_:2},1032,["disabled","content"]))),128))],512),[[o.vShow,s.data.detail&&s.data.detail.tags&&s.data.detail.tags.length>0]])])])])])}const cF=_t(YM,[["render",lF],["__scopeId","data-v-64a51e7d"]]);function dF(){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 s=e.indexOf("Edge/");return s>0?parseInt(e.substring(s+5,e.indexOf(".",s)),10):-1}let Oc;function Zh(){Zh.init||(Zh.init=!0,Oc=dF()!==-1)}var Ic={name:"ResizeObserver",props:{emitOnMount:{type:Boolean,default:!1},ignoreWidth:{type:Boolean,default:!1},ignoreHeight:{type:Boolean,default:!1}},emits:["notify"],mounted(){Zh(),o.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",Oc&&this.$el.appendChild(e),e.data="about:blank",Oc||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&&(!Oc&&this._resizeObject.contentDocument&&this._resizeObject.contentDocument.defaultView.removeEventListener("resize",this.compareAndNotify),this.$el.removeChild(this._resizeObject),this._resizeObject.onload=null,this._resizeObject=null)}}};const uF=o.withScopeId("data-v-b329ee4c");o.pushScopeId("data-v-b329ee4c");const fF={class:"resize-observer",tabindex:"-1"};o.popScopeId();const hF=uF((e,t,n,r,s,a)=>(o.openBlock(),o.createBlock("div",fF)));Ic.render=hF,Ic.__scopeId="data-v-b329ee4c",Ic.__file="src/components/ResizeObserver.vue";function Bc(e){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Bc=function(t){return typeof t}:Bc=function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Bc(e)}function pF(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function H2(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 gF(e,t,n){return t&&H2(e.prototype,t),n&&H2(e,n),e}function G2(e){return mF(e)||vF(e)||yF(e)||bF()}function mF(e){if(Array.isArray(e))return Vh(e)}function vF(e){if(typeof Symbol!="undefined"&&Symbol.iterator in Object(e))return Array.from(e)}function yF(e,t){if(e){if(typeof e=="string")return Vh(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 Vh(e,t)}}function Vh(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 bF(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
105
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function wF(e){var t;return typeof e=="function"?t={callback:e}:t=e,t}function _F(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},r,s,a,l=function(u){for(var d=arguments.length,f=new Array(d>1?d-1:0),p=1;p<d;p++)f[p-1]=arguments[p];if(a=f,!(r&&u===s)){var g=n.leading;typeof g=="function"&&(g=g(u,s)),(!r||u!==s)&&g&&e.apply(void 0,[u].concat(G2(a))),s=u,clearTimeout(r),r=setTimeout(function(){e.apply(void 0,[u].concat(G2(a))),r=0},t)}};return l._clear=function(){clearTimeout(r),r=null},l}function W2(e,t){if(e===t)return!0;if(Bc(e)==="object"){for(var n in e)if(!W2(e[n],t[n]))return!1;return!0}return!1}var CF=function(){function e(t,n,r){pF(this,e),this.el=t,this.observer=null,this.frozen=!1,this.createObserver(n,r)}return gF(e,[{key:"createObserver",value:function(n,r){var s=this;if(this.observer&&this.destroyObserver(),!this.frozen){if(this.options=wF(n),this.callback=function(c,u){s.options.callback(c,u),c&&s.options.once&&(s.frozen=!0,s.destroyObserver())},this.callback&&this.options.throttle){var a=this.options.throttleOptions||{},l=a.leading;this.callback=_F(this.callback,this.options.throttle,{leading:function(u){return l==="both"||l==="visible"&&u||l==="hidden"&&!u}})}this.oldResult=void 0,this.observer=new IntersectionObserver(function(c){var u=c[0];if(c.length>1){var d=c.find(function(p){return p.isIntersecting});d&&(u=d)}if(s.callback){var f=u.isIntersecting&&u.intersectionRatio>=s.threshold;if(f===s.oldResult)return;s.oldResult=f,s.callback(f,u)}},this.options.intersection),o.nextTick(function(){s.observer&&s.observer.observe(s.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 K2(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 s=new CF(e,r,n);e._vue_visibilityState=s}}function SF(e,t,n){var r=t.value,s=t.oldValue;if(!W2(r,s)){var a=e._vue_visibilityState;if(!r){Y2(e);return}a?a.createObserver(r,n):K2(e,{value:r},n)}}function Y2(e){var t=e._vue_visibilityState;t&&(t.destroyObserver(),delete e._vue_visibilityState)}var EF={beforeMount:K2,updated:SF,unmounted:Y2};function xF(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 kF={itemsLimit:1e3},NF=/(auto|scroll)/;function J2(e,t){return e.parentNode===null?t:J2(e.parentNode,t.concat([e]))}var ep=function(t,n){return getComputedStyle(t,null).getPropertyValue(n)},TF=function(t){return ep(t,"overflow")+ep(t,"overflow-y")+ep(t,"overflow-x")},AF=function(t){return NF.test(TF(t))};function X2(e){if(e instanceof HTMLElement||e instanceof SVGElement){for(var t=J2(e.parentNode,[]),n=0;n<t.length;n+=1)if(AF(t[n]))return t[n];return document.scrollingElement||document.documentElement}}function tp(e){"@babel/helpers - typeof";return tp=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},tp(e)}var Q2={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 Z2(){return this.items.length&&tp(this.items[0])!=="object"}var np=!1;if(typeof window!="undefined"){np=!1;try{var OF=Object.defineProperty({},"passive",{get:function(){np=!0}});window.addEventListener("test",null,OF)}catch(e){}}let IF=0;var rp={name:"RecycleScroller",components:{ResizeObserver:Ic},directives:{ObserveVisibility:EF},props:fe(ne({},Q2),{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 s=1e4,a=0,l;for(let c=0,u=t.length;c<u;c++)l=t[c][n]||r,l<s&&(s=l),a+=l,e[c]={accumulator:a,size:l};return this.$_computedMinItemSize=s,e}return[]},simpleArray:Z2,itemIndexByKey(){const{keyField:e,items:t}=this,n={};for(let r=0,s=t.length;r<s;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,s){const a=o.markRaw({id:IF++,index:t,used:!0,key:r,type:s}),l=o.shallowReactive({item:n,position:0,nr:a});return e.push(l),l},unuseView(e,t=!1){const n=this.$_unusedViews,r=e.nr.type;let s=n.get(r);s||(s=[],n.set(r,s)),s.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,s=this.itemSecondarySize||n,a=this.$_computedMinItemSize,l=this.typeField,c=this.simpleArray?null:this.keyField,u=this.items,d=u.length,f=this.sizes,p=this.$_views,g=this.$_unusedViews,v=this.pool,b=this.itemIndexByKey;let w,_,C,k,S;if(!d)w=_=k=S=C=0;else if(this.$_prerender)w=k=0,_=S=Math.min(this.prerender,u.length),C=null;else{const P=this.getScroll();if(t){let U=P.start-this.$_lastUpdateScrollPosition;if(U<0&&(U=-U),n===null&&U<a||U<n)return{continuous:!0}}this.$_lastUpdateScrollPosition=P.start;const M=this.buffer;P.start-=M,P.end+=M;let W=0;if(this.$refs.before&&(W=this.$refs.before.scrollHeight,P.start-=W),this.$refs.after){const U=this.$refs.after.scrollHeight;P.end+=U}if(n===null){let U,Q=0,q=d-1,D=~~(d/2),j;do j=D,U=f[D].accumulator,U<P.start?Q=D:D<d-1&&f[D+1].accumulator>P.start&&(q=D),D=~~((Q+q)/2);while(D!==j);for(D<0&&(D=0),w=D,C=f[d-1].accumulator,_=D;_<d&&f[_].accumulator<P.end;_++);for(_===-1?_=u.length-1:(_++,_>d&&(_=d)),k=w;k<d&&W+f[k].accumulator<P.start;k++);for(S=k;S<d&&W+f[S].accumulator<P.end;S++);}else{w=~~(P.start/n*r);const U=w%r;w-=U,_=Math.ceil(P.end/n*r),k=Math.max(0,Math.floor((P.start-W)/n*r)),S=Math.floor((P.end-W)/n*r),w<0&&(w=0),_>d&&(_=d),k<0&&(k=0),S>d&&(S=d),C=Math.ceil(d/r)*n}}_-w>kF.itemsLimit&&this.itemsLimitError(),this.totalSize=C;let E;const N=w<=this.$_endIndex&&_>=this.$_startIndex;if(N)for(let P=0,M=v.length;P<M;P++)E=v[P],E.nr.used&&(e&&(E.nr.index=b[E.item[c]]),(E.nr.index==null||E.nr.index<w||E.nr.index>=_)&&this.unuseView(E));const A=N?null:new Map;let I,O,F;for(let P=w;P<_;P++){I=u[P];const M=c?I[c]:I;if(M==null)throw new Error(`Key is ${M} on item (keyField is '${c}')`);if(E=p.get(M),!n&&!f[P].size){E&&this.unuseView(E);continue}O=I[l];let W=g.get(O),U=!1;if(!E)N?W&&W.length?E=W.pop():E=this.addView(v,P,I,M,O):(F=A.get(O)||0,(!W||F>=W.length)&&(E=this.addView(v,P,I,M,O),this.unuseView(E,!0),W=g.get(O)),E=W[F],A.set(O,F+1)),p.delete(E.nr.key),E.nr.used=!0,E.nr.index=P,E.nr.key=M,E.nr.type=O,p.set(M,E),U=!0;else if(!E.nr.used&&(E.nr.used=!0,U=!0,W)){const Q=W.indexOf(E);Q!==-1&&W.splice(Q,1)}E.item=I,U&&(P===u.length-1&&this.$emit("scroll-end"),P===0&&this.$emit("scroll-start")),n===null?(E.position=f[P-1].accumulator,E.offset=0):(E.position=Math.floor(P/r)*n,E.offset=P%r*s)}return this.$_startIndex=w,this.$_endIndex=_,this.emitUpdate&&this.$emit("update",w,_,k,S),clearTimeout(this.$_sortTimer),this.$_sortTimer=setTimeout(this.sortViews,this.updateInterval+300),{continuous:N}},getListenerTarget(){let e=X2(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 s=e.getBoundingClientRect(),a=n?s.height:s.width;let l=-(n?s.top:s.left),c=n?window.innerHeight:window.innerWidth;l<0&&(c+=l,l=0),l+c>a&&(c=a-l),r={start:l,end:l+c}}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,np?{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,s;if(this.pageMode){const a=X2(this.$el),l=a.tagName==="HTML"?0:a[t.scroll],c=a.getBoundingClientRect(),d=this.$el.getBoundingClientRect()[t.start]-c[t.start];n=a,r=t.scroll,s=e+l+d}else n=this.$el,r=t.scroll,s=e;n[r]=s},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 BF={key:0,ref:"before",class:"vue-recycle-scroller__slot"},LF={key:1,ref:"after",class:"vue-recycle-scroller__slot"};function RF(e,t,n,r,s,a){const l=o.resolveComponent("ResizeObserver"),c=o.resolveDirective("observe-visibility");return o.withDirectives((o.openBlock(),o.createElementBlock("div",{class:o.normalizeClass(["vue-recycle-scroller",{ready:s.ready,"page-mode":n.pageMode,[`direction-${e.direction}`]:!0}]),onScrollPassive:t[0]||(t[0]=(...u)=>a.handleScroll&&a.handleScroll(...u))},[e.$slots.before?(o.openBlock(),o.createElementBlock("div",BF,[o.renderSlot(e.$slots,"before")],512)):o.createCommentVNode("v-if",!0),(o.openBlock(),o.createBlock(o.resolveDynamicComponent(n.listTag),{ref:"wrapper",style:o.normalizeStyle({[e.direction==="vertical"?"minHeight":"minWidth"]:s.totalSize+"px"}),class:o.normalizeClass(["vue-recycle-scroller__item-wrapper",n.listClass])},{default:o.withCtx(()=>[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(s.pool,u=>(o.openBlock(),o.createBlock(o.resolveDynamicComponent(n.itemTag),o.mergeProps({key:u.nr.id,style:s.ready?{transform:`translate${e.direction==="vertical"?"Y":"X"}(${u.position}px) translate${e.direction==="vertical"?"X":"Y"}(${u.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&&s.hoverKey===u.nr.key}]]},o.toHandlers(n.skipHover?{}:{mouseenter:()=>{s.hoverKey=u.nr.key},mouseleave:()=>{s.hoverKey=null}})),{default:o.withCtx(()=>[o.renderSlot(e.$slots,"default",{item:u.item,index:u.nr.index,active:u.nr.used})]),_:2},1040,["style","class"]))),128)),o.renderSlot(e.$slots,"empty")]),_:3},8,["style","class"])),e.$slots.after?(o.openBlock(),o.createElementBlock("div",LF,[o.renderSlot(e.$slots,"after")],512)):o.createCommentVNode("v-if",!0),o.createVNode(l,{onNotify:a.handleResize},null,8,["onNotify"])],34)),[[c,a.handleVisibilityChange]])}rp.render=RF,rp.__file="src/components/RecycleScroller.vue";var ip={name:"DynamicScroller",components:{RecycleScroller:rp},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 s=t.borderBoxSize[0];n=s.inlineSize,r=s.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:fe(ne({},Q2),{minItemSize:{type:[Number,String],required:!0}}),emits:["resize","visible"],data(){return{vscrollData:{active:!0,sizes:{},keyField:this.keyField,simpleArray:!1}}},computed:{simpleArray:Z2,itemsWithSize(){const e=[],{items:t,keyField:n,simpleArray:r}=this,s=this.vscrollData.sizes,a=t.length;for(let l=0;l<a;l++){const c=t[l],u=r?l:c[n];let d=s[u];typeof d=="undefined"&&!this.$_undefinedMap[u]&&(d=0),e.push({item:c,id:u,size:d})}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,s=0;const a=Math.min(e.length,t.length);for(let c=0;c<a&&!(r>=n);c++)r+=t[c].size||this.minItemSize,s+=e[c].size||this.minItemSize;const l=s-r;l!==0&&(this.$el.scrollTop+=l)}},beforeCreate(){this.$_updates=[],this.$_undefinedSizes=0,this.$_undefinedMap={},this.$_events=xF()},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 PF(e,t,n,r,s,a){const l=o.resolveComponent("RecycleScroller");return o.openBlock(),o.createBlock(l,o.mergeProps({ref:"scroller",items:a.itemsWithSize,"min-item-size":n.minItemSize,direction:e.direction,"key-field":"id","list-tag":e.listTag,"item-tag":e.itemTag},e.$attrs,{onResize:a.onScrollerResize,onVisible:a.onScrollerVisible}),{default:o.withCtx(({item:c,index:u,active:d})=>[o.renderSlot(e.$slots,"default",o.normalizeProps(o.guardReactiveProps({item:c.item,index:u,active:d,itemWithSize:c})))]),before:o.withCtx(()=>[o.renderSlot(e.$slots,"before")]),after:o.withCtx(()=>[o.renderSlot(e.$slots,"after")]),empty:o.withCtx(()=>[o.renderSlot(e.$slots,"empty")]),_:3},16,["items","min-item-size","direction","list-tag","item-tag","onResize","onVisible"])}ip.render=PF,ip.__file="src/components/DynamicScroller.vue";var V2={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 o.h(this.tag,this.$slots.default())}};V2.__file="src/components/DynamicScrollerItem.vue";const rse="",ise="",DF={components:{ForceGraphSvgIcon:so,selectSingle:KM,selectMults:cF,DynamicScroller:ip,DynamicScrollerItem:V2},mixins:[kr],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,s,a,l,c,u;const e=(a=(s=(r=this.history)==null?void 0:r.dataNow)==null?void 0:s.nodes)==null?void 0:a.map(d=>{const w=d,{x:f,y:p,vx:g,vy:v}=w;return fi(w,["x","y","vx","vy"])}),t=(u=(c=(l=this.history)==null?void 0:l.dataNow)==null?void 0:c.links)==null?void 0:u.map(d=>{const I=d,{source:f,target:p}=I,g=fi(I,["source","target"]),O=f,{x:v,y:b,vx:w,vy:_}=O,C=fi(O,["x","y","vx","vy"]),F=p,{x:k,y:S,vx:E,vy:N}=F,A=fi(F,["x","y","vx","vy"]);return ne({sourceRest:C,targetRest:A},g)});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 s;const n=this.filterValues.split("-");this.filterValues=n[0];const r=this.clone((s=this.history.dataNow)==null?void 0:s.links);if(Mh.filterValues=n[0],this.selectedNodes.length===1){const a=this.clone(this.selectedNodes[0]);this.filteredDataList=this.getSelectOneNodes(a)}else this.selectedNodes.length===0&&(this.filteredDataList=this.clone(this.noSelectNodes));if(this.filterValues!==""&&(qt({cId:"rightMenu-filterValues",c:"右侧菜单搜索"}),this.filteredDataList=this.filteredDataList.filter(a=>this.filterValues!==""?(a.parentNode=this.searchParent(a,r),a.childList=a.childList.filter(l=>{var c,u,d,f;if(l.name.toLowerCase().indexOf(this.filterValues.toLowerCase())>-1)return!0;if(l.detail!==null){for(const p in l.detail.brief)if(String((c=l==null?void 0:l.detail)==null?void 0:c.brief[p]).toLowerCase().indexOf(this.filterValues.toLowerCase())>-1)return!0;for(let p=0;p<((d=(u=l==null?void 0:l.detail)==null?void 0:u.tags)==null?void 0:d.length);p++){const g=(f=l==null?void 0:l.detail)==null?void 0:f.tags[p];if(String(g.name).toLowerCase().indexOf(this.filterValues.toLowerCase())>-1)return!0}}else return!1}),a.childList.length>0):!0),this.filteredDataList=this.deleteParentItem(this.filteredDataList)),this.selectedNodes.length===1&&ve(Re,"relationNum",this.filteredDataList[0]),this.selectedNodes.length!==0){const a=[];a.push(this.rootNode),this.filteredDataList.forEach(l=>{a.push(...l.childList),a.push(l)}),ve(Re,"sendNodesRange",a)}else{const a=[];this.filteredDataList.forEach(l=>{a.push(this.searchParent(l,r)),a.push(...l.childList),a.push(l)}),ve(Re,"sendNodesRange",a)}}},selectedNodes:{handler(e,t){var n;if(e!==t){const r=e||[],s=this.clone(r);if(this.filterValues="",this.isMoreSelect=!1,this.allOptions=[],this.initShowDiv(),s.length===0)setTimeout(()=>{this.currentSelectStatus=0,this.filteredDataList=this.noSelectNodes,this.setFilteredDataList(),ve(Re,"sendNodesRange",null)},0);else if(s.length===1){this.currentSelectNode=s[0],this.currentSelectStatus=1,this.filteredDataList=this.getSelectOneNodes(s[0]);const a=[];a.push(this.rootNode),this.filteredDataList.map(l=>{a.push(...l.childList),a.push(l)}),this.setFilteredDataList(),ve(Re,"sendNodesRange",a)}else{this.currentSelectStatus=2;const a=[],l=this.clone((n=this.history.dataNow)==null?void 0:n.links),c=s==null?void 0:s.map(u=>{var d;return u.level=this.levelNow(u),u.dangerNumber=((d=this.levelMap[u.level])==null?void 0:d.dangerNumber)||0,u.parentNode=this.searchParent(u,l),a.push(u),u});c.sort(this.handle("dangerNumber")),this.filteredDataList=c,this.setFilteredDataList(),ve(Re,"sendNodesRange",a),this.isMoreSelect=!0}}},immediate:!0,deep:!0},historyData(){this.setFilteredDataList()},filteredDataList:{handler(e,t){setTimeout(()=>{this.setRelationDataList()},0)},deep:!0}},created(){},mounted(){},beforeUnmount(){Ei(Re,"flagFiles")},methods:{searchChildren(e,t){const n=t,r=[];return n&&n.forEach(s=>{var a;s.source.id===e.id&&(s.target.level=this.levelNow(s.target),s.target.dangerNumber=((a=this.levelMap[s.target.level])==null?void 0:a.dangerNumber)||0,r.push(s.target))}),r},searchParent(e,t){const n=t;let r=[];return n&&n.forEach(s=>{var a;s.target.id===e.id&&(s.source.level=this.levelNow(s.source),s.source.dangerNumber=((a=this.levelMap[s.source.level])==null?void 0:a.dangerNumber)||0,r=s.source)}),r},setFilteredDataList(){if(Mh.filterValues===void 0||Mh.filterValues==="")if(this.selectedNodes.length===0)this.currentSelectStatus=0,this.filteredDataList=this.noSelectNodes,ve(Re,"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)}),ve(Re,"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;ve(this,"row-click",e)},handleSelectionChange(e){this.selection=e,ve(this,"selection-change",e)},getModuleDetail(e,t){const n=[],r=[],s=e.apis;this.menuOptions=[];let a=this.$parent.$parent.$parent.moduleDetail;a=a!=null&&a.plugs[e.type]?Array.from(a==null?void 0:a.plugs[e.type]):[],a.filter(c=>{c.value=0,c.children?c.children.map(u=>(u.value=0,this.menuOptions.push(u),u)):this.menuOptions.push(c)}),a.length!==0&&this.menuOptions.unshift({namec:"拓线全部",value:0,name:"",flagSelect:!1}),this.allOptions=[];let l;if(this.menuOptions.map(c=>{l=0;for(let u=0;u<t.length;u++){const d=t[u];l+=d.childList.length,d.id.split("-").pop()===c.name&&(c.value=d.childList.length)}return t.length===0&&(c.value=0),c.namec==="拓线全部"?this.allOptions.push({namec:c.namec,value:l,name:c.name,flagSelect:c.flagSelect}):this.allOptions.push({namec:c.namec,value:c.value,icon:c.icon,name:c.name,relay_name:c.relay_name}),c}),s){for(let c=0;c<s.length;c++)n[s[c].name]=!0;for(let c=0;c<this.allOptions.length;c++)n[this.allOptions[c].name]?(this.allOptions[c].flagSelect=!0,r.push(this.allOptions[c])):(this.allOptions[c].flagSelect=!1,r.push(this.allOptions[c]))}e.menuOptions=this.allOptions},clone(e){return JSON.parse(JSON.stringify(e))},getNoSelectNodes(){var s;this.isAggregation=!1;const e=this.clone(this.history.dataNow.nodes),t=this.clone((s=this.history.dataNow)==null?void 0:s.links),n=e.filter(a=>{if((a==null?void 0:a.type)==="nodeType")return a.childList=this.searchChildren(a,t),a.parentNode=this.searchParent(a,t),a.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),ve(Re,"relationNum",e),r}else if(e.type==="aggregation"){const r=[];this.isAggregation=!0;const s=[...e.list];return e.childList=s.map(a=>{var l;return a.level=this.levelNow(a),a.dangerNumber=((l=this.levelMap[a.level])==null?void 0:l.dangerNumber)||0,a}),e.childList.sort(this.handle("dangerNumber")),e.name=this.searchParent(e,t).name,r.push(e),ve(Re,"relationNum",e),r}else{this.rootNode=e,this.isAggregation=!1;const r=this.searchChildren(e,t);return r.map(s=>(s.childList=this.searchChildren(s,t),s.parentNode=this.searchParent(s,t),s.childList.sort(this.handle("dangerNumber")),s)),this.getModuleDetail(e,r),r}},handle(e){return function(t,n){const r=parseInt(t[e]),s=parseInt(n[e]);return r==null?-1:s==null?1:n[e]-t[e]}},showDetail(e,t){var r,s,a,l,c,u,d,f,p,g,v,b,w,_;const n=[];n.push(e.id),t&&(this.selectedNodes.length===0?(a=(s=(r=this.$parent)==null?void 0:r.$parent)==null?void 0:s.$parent)!=null&&a.handleTableSelect&&((u=(c=(l=this.$parent)==null?void 0:l.$parent)==null?void 0:c.$parent)==null||u.handleTableSelect(n)):(g=(p=(f=(d=this.$parent)==null?void 0:d.$parent)==null?void 0:f.$parent)==null?void 0:p.$parent)!=null&&g.handleTableSelect&&((_=(w=(b=(v=this.$parent)==null?void 0:v.$parent)==null?void 0:b.$parent)==null?void 0:w.$parent)==null||_.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 s=JSON.stringify(t(r));n[s]=n[s]||[],n[s].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(a=>a===r.parentNode.id)?r.parentNode="":n.push(r.parentNode.id),r)),t},relationClick(e){qt({cId:"relationClick",c:"点击拓线"});const n=this.allOptions.filter(r=>r.namec===e.namec)[0];this.value=!this.value,n.flagSelect=!1,n.namec==="拓线全部"?ve(Re,"relationClick",{nodes:[this.rootNode],api:z2,dataApi:null}):ve(Re,"relationClick",{nodes:[this.rootNode],api:U2,dataApi:n})},toggleFold(e){qt({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?(qt({cId:"rightMenu-toggleEye",c:"rightMenu-toggleEye"}),ve(Re,"buttonClick",{nodes:[t,n],api:{name:"hide_node"}})):ve(Re,"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 s in e)e[s]===!1&&(n=!1),e[s]===!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,s)=>{const a=this.checkNodeExtentStatus(r),l=this.checkExtentData(r),c=y2();a&&!l&&(n={id:c,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)),a||(n={id:c,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,s)=>{const a=y2();e.push({id:a,type:"nodeType",icon:r.icon,name:r.namec,namec:r.namec,show:!1,showChild:!1,childList:[],parentNode:s===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}}},MF={class:"node-relation-block"},FF={key:0,class:"textarea-wrapper"},$F={key:1,class:"relation-title"},zF={key:0,class:"extent-icon"},UF={key:2,class:"nodata"};function jF(e,t,n,r,s,a){const l=mi,c=o.resolveComponent("force-graph-svg-icon"),u=gn,d=o.resolveComponent("select-single"),f=o.resolveComponent("select-mults"),p=o.resolveComponent("DynamicScrollerItem"),g=o.resolveComponent("DynamicScroller");return o.openBlock(),o.createElementBlock("div",MF,[s.isMoreSelect?o.createCommentVNode("",!0):(o.openBlock(),o.createElementBlock(o.Fragment,{key:0},[n.canSearch?(o.openBlock(),o.createElementBlock("div",FF,[o.createVNode(l,{modelValue:s.filterValues,"onUpdate:modelValue":t[0]||(t[0]=v=>s.filterValues=v),modelModifiers:{trim:!0},class:"search-content",placeholder:"请输入搜索内容",clearable:""},null,8,["modelValue"])])):o.createCommentVNode("",!0),s.rootNode.type!=="nodeType"&&!s.isAggregation?(o.openBlock(),o.createElementBlock("div",$F,[t[1]||(t[1]=o.createElementVNode("h3",{class:"title-top"},"关联列表",-1)),a.showAllExtent?(o.openBlock(),o.createElementBlock("div",zF,[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(s.allOptions,(v,b)=>(o.openBlock(),o.createElementBlock("div",{key:b},[v.namec==="拓线全部"?(o.openBlock(),o.createBlock(u,{key:0,content:v.namec,"popper-class":"el-tooltip-gray",placement:"left"},{default:o.withCtx(()=>[o.createVNode(c,{class:"button-img","icon-class":e.imgPath["./public/d3svg1/button22/button_select_all.svg"],onClick:w=>a.relationClick(v)},null,8,["icon-class","onClick"])]),_:2},1032,["content"])):o.createCommentVNode("",!0)]))),128))])):o.createCommentVNode("",!0)])):o.createCommentVNode("",!0)],64)),s.relationDataList.length>0?(o.openBlock(),o.createElementBlock(o.Fragment,{key:1},[n.selectedNodes.length?(o.openBlock(),o.createElementBlock("div",{key:0,ref:"rightList",class:o.normalizeClass({"has-selected":n.selectedNodes.length,"has-fold-icon":a.hasFoldIcon})},[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(s.relationDataList,(v,b)=>(o.openBlock(),o.createElementBlock("div",{key:b,class:o.normalizeClass(["relation-item",!s.isMoreSelect&&(s.rootNode.type==="nodeType"||!n.isRelation)?"offset-div-1":"offset-div-2"])},[s.isMoreSelect?(o.openBlock(),o.createBlock(f,{key:1,"filter-data":v,"root-node":s.rootNode,"is-more-select":s.isMoreSelect,"is-relation":n.isRelation,onShowDetail:a.showDetail},null,8,["filter-data","root-node","is-more-select","is-relation","onShowDetail"])):(o.openBlock(),o.createBlock(d,{key:0,"filter-data":v,"unique-key":b,value:s.value,"root-node":s.rootNode,"is-more-select":s.isMoreSelect,"is-relation":n.isRelation,"is-aggregation":s.isAggregation,"flag-div":s.flagDiv,"is-combine-data":s.isCombineData,onShowDetail:a.showDetail,onToggleFold:a.toggleFold,onToggleEye:a.toggleEye,onRelationClick:a.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)):(o.openBlock(),o.createElementBlock("div",{key:1,ref:"rightList",class:o.normalizeClass(["relation-data-list",{"no-selected":!n.selectedNodes.length}])},[o.createVNode(g,{items:s.relationDataList,"min-item-size":54,class:"scroller","key-field":"id"},{default:o.withCtx(({item:v,index:b,active:w})=>[o.createVNode(p,{item:v,active:w,"size-dependencies":[v],"data-index":b,class:o.normalizeClass(["relation-item",!s.isMoreSelect&&(s.rootNode.type==="nodeType"||!n.isRelation)?"offset-div-1":"offset-div-2"])},{default:o.withCtx(()=>[s.isMoreSelect?(o.openBlock(),o.createBlock(f,{key:1,"filter-data":v,"root-node":s.rootNode,"is-more-select":s.isMoreSelect,"is-relation":n.isRelation,onShowDetail:a.showDetail},null,8,["filter-data","root-node","is-more-select","is-relation","onShowDetail"])):(o.openBlock(),o.createBlock(d,{key:0,"filter-data":v,"unique-key":b,value:s.value,"root-node":s.rootNode,"is-more-select":s.isMoreSelect,"is-relation":n.isRelation,"is-aggregation":s.isAggregation,"flag-div":s.flagDiv,"is-combine-data":s.isCombineData,onShowDetail:a.showDetail,onToggleFold:a.toggleFold,onToggleEye:a.toggleEye,onRelationClick:a.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)):(o.openBlock(),o.createElementBlock("div",UF,t[2]||(t[2]=[o.createElementVNode("span",{class:"el-table__empty-text"},"暂无数据",-1)])))])}const qF={components:{NodeDetail:pM,NodesRelation:_t(DF,[["render",jF]])},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(){ve(this,"change-box",[],!0),this.scrollTop>0&&setTimeout(()=>this.$refs.rightMenu.scrollTo(0,this.scrollTop))},handleSelectionChange(e){ve(this,"change-box",e)},handleRowClick(e){this.scrollTop=this.$refs.rightMenu.scrollTop,ve(this,"change-box",[e.id],!0)}},emits:["change-box"]},HF={class:"node-data-wrapper"};function GF(e,t,n,r,s,a){const l=o.resolveComponent("node-detail"),c=o.resolveComponent("nodes-relation");return o.openBlock(),o.createElementBlock("div",HF,[a.showDetail?(o.openBlock(),o.createElementBlock(o.Fragment,{key:0},[o.createVNode(l,{data:n.selectedNodes[0]||{},"selected-nodes":n.selectedNodes,"request-graph-data":n.requestGraphData},null,8,["data","selected-nodes","request-graph-data"]),o.createVNode(c,{data:a.relationData,"selected-nodes":n.selectedNodes,"request-graph-data":n.requestGraphData,"is-relation":!0},null,8,["data","selected-nodes","request-graph-data"])],64)):(o.openBlock(),o.createBlock(c,{key:1,data:n.data,"selected-nodes":n.selectedNodes,"request-graph-data":n.requestGraphData,"can-search":!0,onRowClick:a.handleRowClick,onSelectionChange:a.handleSelectionChange},null,8,["data","selected-nodes","request-graph-data","onRowClick","onSelectionChange"]))])}const WF=_t(qF,[["render",GF]]),sse="",KF={name:"RightMenu",components:{NodeData:WF},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(){ve(this,"change-box",[],!0),this.scrollTop>0&&setTimeout(()=>this.$refs.rightMenu.scrollTo(0,this.scrollTop))},handleSelectionChange(e){ve(this,"change-box",e)},handleRowClick(e){this.scrollTop=this.$refs.rightMenu.scrollTop,ve(this,"change-box",[e.id],!0)}}};function YF(e,t,n,r,s,a){const l=o.resolveComponent("node-data");return o.openBlock(),o.createElementBlock("div",{ref:"rightMenu",class:o.normalizeClass(["right-menu-box",{"no-select":!n.selectedNodes.length}])},[o.createVNode(l,{data:n.graphData,"selected-nodes":n.selectedNodes,"request-graph-data":n.requestGraphData,onRowClick:a.handleRowClick,onSelectionChange:a.handleSelectionChange,onGoBack:a.handleBack},null,8,["data","selected-nodes","request-graph-data","onRowClick","onSelectionChange","onGoBack"])],2)}const JF=_t(KF,[["render",YF]]);var op="http://www.w3.org/1999/xhtml";const ew={svg:"http://www.w3.org/2000/svg",xhtml:op,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function tw(e){var t=e+="",n=t.indexOf(":");return n>=0&&(t=e.slice(0,n))!=="xmlns"&&(e=e.slice(n+1)),ew.hasOwnProperty(t)?{space:ew[t],local:e}:e}function XF(e){return function(){var t=this.ownerDocument,n=this.namespaceURI;return n===op&&t.documentElement.namespaceURI===op?t.createElement(e):t.createElementNS(n,e)}}function QF(e){return function(){return this.ownerDocument.createElementNS(e.space,e.local)}}function nw(e){var t=tw(e);return(t.local?QF:XF)(t)}function ZF(){}function rw(e){return e==null?ZF:function(){return this.querySelector(e)}}function VF(e){typeof e!="function"&&(e=rw(e));for(var t=this._groups,n=t.length,r=new Array(n),s=0;s<n;++s)for(var a=t[s],l=a.length,c=r[s]=new Array(l),u,d,f=0;f<l;++f)(u=a[f])&&(d=e.call(u,u.__data__,f,a))&&("__data__"in u&&(d.__data__=u.__data__),c[f]=d);return new Bn(r,this._parents)}function iw(e){return e==null?[]:Array.isArray(e)?e:Array.from(e)}function e$(){return[]}function t$(e){return e==null?e$:function(){return this.querySelectorAll(e)}}function n$(e){return function(){return iw(e.apply(this,arguments))}}function r$(e){typeof e=="function"?e=n$(e):e=t$(e);for(var t=this._groups,n=t.length,r=[],s=[],a=0;a<n;++a)for(var l=t[a],c=l.length,u,d=0;d<c;++d)(u=l[d])&&(r.push(e.call(u,u.__data__,d,l)),s.push(u));return new Bn(r,s)}function i$(e){return function(){return this.matches(e)}}function ow(e){return function(t){return t.matches(e)}}var o$=Array.prototype.find;function s$(e){return function(){return o$.call(this.children,e)}}function a$(){return this.firstElementChild}function l$(e){return this.select(e==null?a$:s$(typeof e=="function"?e:ow(e)))}var c$=Array.prototype.filter;function d$(){return Array.from(this.children)}function u$(e){return function(){return c$.call(this.children,e)}}function f$(e){return this.selectAll(e==null?d$:u$(typeof e=="function"?e:ow(e)))}function h$(e){typeof e!="function"&&(e=i$(e));for(var t=this._groups,n=t.length,r=new Array(n),s=0;s<n;++s)for(var a=t[s],l=a.length,c=r[s]=[],u,d=0;d<l;++d)(u=a[d])&&e.call(u,u.__data__,d,a)&&c.push(u);return new Bn(r,this._parents)}function sw(e){return new Array(e.length)}function p$(){return new Bn(this._enter||this._groups.map(sw),this._parents)}function Lc(e,t){this.ownerDocument=e.ownerDocument,this.namespaceURI=e.namespaceURI,this._next=null,this._parent=e,this.__data__=t}Lc.prototype={constructor:Lc,appendChild:function(e){return this._parent.insertBefore(e,this._next)},insertBefore:function(e,t){return this._parent.insertBefore(e,t)},querySelector:function(e){return this._parent.querySelector(e)},querySelectorAll:function(e){return this._parent.querySelectorAll(e)}};function g$(e){return function(){return e}}function m$(e,t,n,r,s,a){for(var l=0,c,u=t.length,d=a.length;l<d;++l)(c=t[l])?(c.__data__=a[l],r[l]=c):n[l]=new Lc(e,a[l]);for(;l<u;++l)(c=t[l])&&(s[l]=c)}function v$(e,t,n,r,s,a,l){var c,u,d=new Map,f=t.length,p=a.length,g=new Array(f),v;for(c=0;c<f;++c)(u=t[c])&&(g[c]=v=l.call(u,u.__data__,c,t)+"",d.has(v)?s[c]=u:d.set(v,u));for(c=0;c<p;++c)v=l.call(e,a[c],c,a)+"",(u=d.get(v))?(r[c]=u,u.__data__=a[c],d.delete(v)):n[c]=new Lc(e,a[c]);for(c=0;c<f;++c)(u=t[c])&&d.get(g[c])===u&&(s[c]=u)}function y$(e){return e.__data__}function b$(e,t){if(!arguments.length)return Array.from(this,y$);var n=t?v$:m$,r=this._parents,s=this._groups;typeof e!="function"&&(e=g$(e));for(var a=s.length,l=new Array(a),c=new Array(a),u=new Array(a),d=0;d<a;++d){var f=r[d],p=s[d],g=p.length,v=w$(e.call(f,f&&f.__data__,d,r)),b=v.length,w=c[d]=new Array(b),_=l[d]=new Array(b),C=u[d]=new Array(g);n(f,p,w,_,C,v,t);for(var k=0,S=0,E,N;k<b;++k)if(E=w[k]){for(k>=S&&(S=k+1);!(N=_[S])&&++S<b;);E._next=N||null}}return l=new Bn(l,r),l._enter=c,l._exit=u,l}function w$(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function _$(){return new Bn(this._exit||this._groups.map(sw),this._parents)}function C$(e,t,n){var r=this.enter(),s=this,a=this.exit();return typeof e=="function"?(r=e(r),r&&(r=r.selection())):r=r.append(e+""),t!=null&&(s=t(s),s&&(s=s.selection())),n==null?a.remove():n(a),r&&s?r.merge(s).order():s}function S$(e){for(var t=e.selection?e.selection():e,n=this._groups,r=t._groups,s=n.length,a=r.length,l=Math.min(s,a),c=new Array(s),u=0;u<l;++u)for(var d=n[u],f=r[u],p=d.length,g=c[u]=new Array(p),v,b=0;b<p;++b)(v=d[b]||f[b])&&(g[b]=v);for(;u<s;++u)c[u]=n[u];return new Bn(c,this._parents)}function E$(){for(var e=this._groups,t=-1,n=e.length;++t<n;)for(var r=e[t],s=r.length-1,a=r[s],l;--s>=0;)(l=r[s])&&(a&&l.compareDocumentPosition(a)^4&&a.parentNode.insertBefore(l,a),a=l);return this}function x$(e){e||(e=k$);function t(p,g){return p&&g?e(p.__data__,g.__data__):!p-!g}for(var n=this._groups,r=n.length,s=new Array(r),a=0;a<r;++a){for(var l=n[a],c=l.length,u=s[a]=new Array(c),d,f=0;f<c;++f)(d=l[f])&&(u[f]=d);u.sort(t)}return new Bn(s,this._parents).order()}function k$(e,t){return e<t?-1:e>t?1:e>=t?0:NaN}function N$(){var e=arguments[0];return arguments[0]=this,e.apply(null,arguments),this}function T$(){return Array.from(this)}function A$(){for(var e=this._groups,t=0,n=e.length;t<n;++t)for(var r=e[t],s=0,a=r.length;s<a;++s){var l=r[s];if(l)return l}return null}function O$(){let e=0;for(const t of this)++e;return e}function I$(){return!this.node()}function B$(e){for(var t=this._groups,n=0,r=t.length;n<r;++n)for(var s=t[n],a=0,l=s.length,c;a<l;++a)(c=s[a])&&e.call(c,c.__data__,a,s);return this}function L$(e){return function(){this.removeAttribute(e)}}function R$(e){return function(){this.removeAttributeNS(e.space,e.local)}}function P$(e,t){return function(){this.setAttribute(e,t)}}function D$(e,t){return function(){this.setAttributeNS(e.space,e.local,t)}}function M$(e,t){return function(){var n=t.apply(this,arguments);n==null?this.removeAttribute(e):this.setAttribute(e,n)}}function F$(e,t){return function(){var n=t.apply(this,arguments);n==null?this.removeAttributeNS(e.space,e.local):this.setAttributeNS(e.space,e.local,n)}}function $$(e,t){var n=tw(e);if(arguments.length<2){var r=this.node();return n.local?r.getAttributeNS(n.space,n.local):r.getAttribute(n)}return this.each((t==null?n.local?R$:L$:typeof t=="function"?n.local?F$:M$:n.local?D$:P$)(n,t))}function aw(e){return e.ownerDocument&&e.ownerDocument.defaultView||e.document&&e||e.defaultView}function z$(e){return function(){this.style.removeProperty(e)}}function U$(e,t,n){return function(){this.style.setProperty(e,t,n)}}function j$(e,t,n){return function(){var r=t.apply(this,arguments);r==null?this.style.removeProperty(e):this.style.setProperty(e,r,n)}}function q$(e,t,n){return arguments.length>1?this.each((t==null?z$:typeof t=="function"?j$:U$)(e,t,n==null?"":n)):H$(this.node(),e)}function H$(e,t){return e.style.getPropertyValue(t)||aw(e).getComputedStyle(e,null).getPropertyValue(t)}function G$(e){return function(){delete this[e]}}function W$(e,t){return function(){this[e]=t}}function K$(e,t){return function(){var n=t.apply(this,arguments);n==null?delete this[e]:this[e]=n}}function Y$(e,t){return arguments.length>1?this.each((t==null?G$:typeof t=="function"?K$:W$)(e,t)):this.node()[e]}function lw(e){return e.trim().split(/^|\s+/)}function sp(e){return e.classList||new cw(e)}function cw(e){this._node=e,this._names=lw(e.getAttribute("class")||"")}cw.prototype={add:function(e){var t=this._names.indexOf(e);t<0&&(this._names.push(e),this._node.setAttribute("class",this._names.join(" ")))},remove:function(e){var t=this._names.indexOf(e);t>=0&&(this._names.splice(t,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(e){return this._names.indexOf(e)>=0}};function dw(e,t){for(var n=sp(e),r=-1,s=t.length;++r<s;)n.add(t[r])}function uw(e,t){for(var n=sp(e),r=-1,s=t.length;++r<s;)n.remove(t[r])}function J$(e){return function(){dw(this,e)}}function X$(e){return function(){uw(this,e)}}function Q$(e,t){return function(){(t.apply(this,arguments)?dw:uw)(this,e)}}function Z$(e,t){var n=lw(e+"");if(arguments.length<2){for(var r=sp(this.node()),s=-1,a=n.length;++s<a;)if(!r.contains(n[s]))return!1;return!0}return this.each((typeof t=="function"?Q$:t?J$:X$)(n,t))}function V$(){this.textContent=""}function ez(e){return function(){this.textContent=e}}function tz(e){return function(){var t=e.apply(this,arguments);this.textContent=t==null?"":t}}function nz(e){return arguments.length?this.each(e==null?V$:(typeof e=="function"?tz:ez)(e)):this.node().textContent}function rz(){this.innerHTML=""}function iz(e){return function(){this.innerHTML=e}}function oz(e){return function(){var t=e.apply(this,arguments);this.innerHTML=t==null?"":t}}function sz(e){return arguments.length?this.each(e==null?rz:(typeof e=="function"?oz:iz)(e)):this.node().innerHTML}function az(){this.nextSibling&&this.parentNode.appendChild(this)}function lz(){return this.each(az)}function cz(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function dz(){return this.each(cz)}function uz(e){var t=typeof e=="function"?e:nw(e);return this.select(function(){return this.appendChild(t.apply(this,arguments))})}function fz(){return null}function hz(e,t){var n=typeof e=="function"?e:nw(e),r=t==null?fz:typeof t=="function"?t:rw(t);return this.select(function(){return this.insertBefore(n.apply(this,arguments),r.apply(this,arguments)||null)})}function pz(){var e=this.parentNode;e&&e.removeChild(this)}function gz(){return this.each(pz)}function mz(){var e=this.cloneNode(!1),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function vz(){var e=this.cloneNode(!0),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function yz(e){return this.select(e?vz:mz)}function bz(e){return arguments.length?this.property("__data__",e):this.node().__data__}function wz(e){return function(t){e.call(this,t,this.__data__)}}function _z(e){return e.trim().split(/^|\s+/).map(function(t){var n="",r=t.indexOf(".");return r>=0&&(n=t.slice(r+1),t=t.slice(0,r)),{type:t,name:n}})}function Cz(e){return function(){var t=this.__on;if(t){for(var n=0,r=-1,s=t.length,a;n<s;++n)a=t[n],(!e.type||a.type===e.type)&&a.name===e.name?this.removeEventListener(a.type,a.listener,a.options):t[++r]=a;++r?t.length=r:delete this.__on}}}function Sz(e,t,n){return function(){var r=this.__on,s,a=wz(t);if(r){for(var l=0,c=r.length;l<c;++l)if((s=r[l]).type===e.type&&s.name===e.name){this.removeEventListener(s.type,s.listener,s.options),this.addEventListener(s.type,s.listener=a,s.options=n),s.value=t;return}}this.addEventListener(e.type,a,n),s={type:e.type,name:e.name,value:t,listener:a,options:n},r?r.push(s):this.__on=[s]}}function Ez(e,t,n){var r=_z(e+""),s,a=r.length,l;if(arguments.length<2){var c=this.node().__on;if(c){for(var u=0,d=c.length,f;u<d;++u)for(s=0,f=c[u];s<a;++s)if((l=r[s]).type===f.type&&l.name===f.name)return f.value}return}for(c=t?Sz:Cz,s=0;s<a;++s)this.each(c(r[s],t,n));return this}function fw(e,t,n){var r=aw(e),s=r.CustomEvent;typeof s=="function"?s=new s(t,n):(s=r.document.createEvent("Event"),n?(s.initEvent(t,n.bubbles,n.cancelable),s.detail=n.detail):s.initEvent(t,!1,!1)),e.dispatchEvent(s)}function xz(e,t){return function(){return fw(this,e,t)}}function kz(e,t){return function(){return fw(this,e,t.apply(this,arguments))}}function Nz(e,t){return this.each((typeof t=="function"?kz:xz)(e,t))}function*Tz(){for(var e=this._groups,t=0,n=e.length;t<n;++t)for(var r=e[t],s=0,a=r.length,l;s<a;++s)(l=r[s])&&(yield l)}var Az=[null];function Bn(e,t){this._groups=e,this._parents=t}function Oz(){return this}Bn.prototype={constructor:Bn,select:VF,selectAll:r$,selectChild:l$,selectChildren:f$,filter:h$,data:b$,enter:p$,exit:_$,join:C$,merge:S$,selection:Oz,order:E$,sort:x$,call:N$,nodes:T$,node:A$,size:O$,empty:I$,each:B$,attr:$$,style:q$,property:Y$,classed:Z$,text:nz,html:sz,raise:lz,lower:dz,append:uz,insert:hz,remove:gz,clone:yz,datum:bz,on:Ez,dispatch:Nz,[Symbol.iterator]:Tz};function hw(e){return typeof e=="string"?new Bn([document.querySelectorAll(e)],[document.documentElement]):new Bn([iw(e)],Az)}const Iz={},Bz={width:"28px",height:"28px",viewBox:"0 0 28 28",version:"1.1",xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink"};function Lz(e,t){return o.openBlock(),o.createElementBlock("svg",Bz,t[0]||(t[0]=[o.createStaticVNode('<title>hmdr_icon_MD5_1</title><g id="页面-1" stroke="currentColor" class="level-color" stroke-width="1" fill="#fff" fill-rule="evenodd"><g id="3图标" transform="translate(-211.000000, -47.000000)"><g id="hmdr_icon_MD5_1" transform="translate(211.000000, 47.000000)"><rect id="矩形" fill="#FFFFFF" opacity="0" x="0" y="0" width="28" height="28"></rect><g transform="translate(2.500000, 2.500000)"><g id="hmdr_icon_yangben_1"><polyline id="路径备份" stroke-width="2" fill="#FFFFFF" points="2.65384615 22.1153846 2.65384615 0 15.0384615 0 20.3461538 5.30769231 20.3461538 22.1153846"></polyline><polygon id="路径-40" class="level-color" stroke="currentColor" fill="#192039" points="-5.8207883e-12 17.67 1.80269938 19.4726994 1.80269938 17.67"></polygon><g id="编组-44"><rect id="矩形备份" class="level-color" fill="#6E7590" x="0" y="9.73076923" width="23" height="7.96153846"></rect><polyline id="路径备份-2" stroke-width="2" points="20.3461538 5.30769231 15.0384615 5.30769231 15.0384615 -5.0701964e-14"></polyline><line id="路径-21备份" x1="2.65384615" y1="23" x2="20.3461538" y2="23" stroke-width="2" stroke-linecap="square"></line></g></g></g></g></g></g>',2)]))}const Rz=_t(Iz,[["render",Lz]]),ase="",Pz={name:"Legend",components:{NodeIcon:Oa,ForceGraphSvgIcon:so,legendLevelSvg:Rz},mixins:[kr],inject:["levelList"],props:{showPoint:{type:Boolean,default:!0},history:{type:Object,default:()=>{}},moduleDetail:{type:Object,required:!0,default:()=>{}},margin:{type:String,required:!0,default:"0"},hasLevel:{type:Boolean,default:!0},showLevelCount:{type:Boolean,default:!1}},emits:["highLight"],data(){return{legendLevelPrefix:Ah,filters:{point:[{name:"收藏",value:!0,prop:"collect"},{name:"备注",value:!0,prop:"label"},{name:"标签",value:!0,prop:"detail.tags"}]},fold:!1}},computed:{levelCount(){if(!this.showLevelCount)return;const e=this.history.dataNow.nodes,t={};return this.levelList.forEach(n=>{t[n.level]=0}),e.forEach(n=>{var s,a,l;const r=(l=(a=(s=n==null?void 0:n.detail)==null?void 0:s.info)==null?void 0:a.basic)==null?void 0:l.level;t[r]=t[r]+1}),t}},methods:{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]},highlightByRule(e,t,n,r){qt({cId:"legendIcon-"+n,c:"legend图标点击-"+e.target.innerText});const s=e.currentTarget.getAttribute("class").indexOf("active")<0;hw(".legend-filter .out-box").classed("active",!1),s?(e.currentTarget.classList.add("active"),ve(this,"highLight",t,n,r)):ve(this,"highLight")},canHighlight(e){return this.history.dataNow.nodes.some(n=>n.type===e)},handleFold(){this.fold=!this.fold},svgName(e){return e={file_md5:"md5",incident:"report",internet:"ip"}[e]||e,e+"Svg"}}},Dz={class:"container"},Mz={key:0,class:"legend-filter node-type"},Fz=["onClick"],$z={class:"name"},zz=["src"],Uz={key:1,class:"legend-filter point"},jz=["onClick"],qz={key:2,class:"legend-filter level"},Hz=["onClick"],Gz={key:0,class:"legend-level-icon-dot"},Wz={key:2};function Kz(e,t,n,r,s,a){const l=o.resolveComponent("NodeIcon"),c=o.resolveComponent("legendLevelSvg"),u=o.resolveComponent("force-graph-svg-icon");return o.openBlock(),o.createElementBlock("div",{ref:"legend-box",class:o.normalizeClass(["legend-box",{"legend-close":s.fold}])},[o.createElementVNode("div",Dz,[n.moduleDetail?(o.openBlock(),o.createElementBlock("div",Mz,[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(n.moduleDetail.nodes,d=>(o.openBlock(),o.createElementBlock("div",{key:d.name,class:o.normalizeClass(["out-box node-color-1",a.canHighlight(d.name)?"":"disabled"]),onClick:f=>a.highlightByRule(f,"equal","type",d.name)},[o.createElementVNode("p",{class:"label",style:o.normalizeStyle({margin:n.margin})},[o.createVNode(l,{"node-info":{type:d.name}},null,8,["node-info"]),o.createElementVNode("span",$z,o.toDisplayString(d.namec),1)],4)],10,Fz))),128)),o.createElementVNode("div",{class:"out-box node-color-1",onClick:t[0]||(t[0]=d=>a.highlightByRule(d,"equal","type","nodeType"))},[o.createElementVNode("p",{class:"label",style:o.normalizeStyle({margin:n.margin})},[o.createElementVNode("img",{src:e.imgPath["./public/d3svg1/node_type.svg"],alt:""},null,8,zz),t[2]||(t[2]=o.createElementVNode("span",{class:"name"},"关系",-1))],4)])])):o.createCommentVNode("",!0),n.showPoint?(o.openBlock(),o.createElementBlock("div",Uz,[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(s.filters.point,d=>(o.openBlock(),o.createElementBlock("div",{key:d.prop,class:"out-box",onClick:f=>a.highlightByRule(f,"boolean",d.prop,d.value)},[o.createElementVNode("p",{class:"label",style:o.normalizeStyle({margin:n.margin})},o.toDisplayString(d.name),5)],8,jz))),128))])):o.createCommentVNode("",!0),n.hasLevel?(o.openBlock(),o.createElementBlock("div",qz,[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(a.levelList,d=>(o.openBlock(),o.createElementBlock("div",{key:d.level,class:o.normalizeClass(["out-box",`${s.legendLevelPrefix}${d.className}`]),onClick:f=>a.highlightByRule(f,"equal","detail.info.basic.level",d.level)},[o.createElementVNode("p",{class:"label",style:o.normalizeStyle({margin:n.margin})},[d.iconType==="dot"?(o.openBlock(),o.createElementBlock("span",Gz)):(o.openBlock(),o.createBlock(c,{key:1,class:"legend-level-icon"})),o.createTextVNode(" "+o.toDisplayString(d.levelName)+" ",1),n.showLevelCount?(o.openBlock(),o.createElementBlock("span",Wz,"("+o.toDisplayString(a.levelCount[d.level])+")",1)):o.createCommentVNode("",!0)],4)],10,Hz))),128))])):o.createCommentVNode("",!0),o.createElementVNode("div",{class:"fold-btn",onClick:t[1]||(t[1]=(...d)=>a.handleFold&&a.handleFold(...d))},[s.fold?(o.openBlock(),o.createBlock(u,{key:0,class:"button-img","icon-class":e.imgPath["./public/d3svg1/fold-right.svg"]},null,8,["icon-class"])):(o.openBlock(),o.createBlock(u,{key:1,class:"button-img","icon-class":e.imgPath["./public/d3svg1/fold-left.svg"]},null,8,["icon-class"]))])])],2)}const Yz=_t(Pz,[["render",Kz],["__scopeId","data-v-5e1ba822"]]),lse="",Jz={key:0,class:"node-control-panel"},Xz={key:0},Qz=["onClick"],Zz=["src"],Vz={class:"node-control-panel-name"},eU={__name:"NodeVisibleControl",props:{moduleDetail:{type:Object,default:()=>({})},history:{type:Object,default:()=>({})},startNode:{type:Array},customNodeImages:{type:Object,default:()=>{}}},setup(e){const t=e,n=o.ref({}),r=o.computed(()=>t.startNode.map(u=>u.type)),s=o.computed(()=>{var u,d;return((d=(u=t.moduleDetail)==null?void 0:u.nodes)==null?void 0:d.filter(f=>!!(c(f.name)&&!r.value.includes(f.name))))||[]}),a=()=>{var u,d;(d=(u=t.moduleDetail)==null?void 0:u.nodes)==null||d.forEach(f=>{if(c(f.name))return n.value[f.name]=!0,!0})},l=u=>{n.value[u]=!n.value[u];const d=t.history.dataNow.nodes.filter(f=>f.type===u);ve(Re,"buttonClick",{nodes:d,api:{name:n.value[u]?"show_nodes":"hide_nodes"}})},c=u=>t.history.dataNow.nodes.some(d=>d.type===u);return o.watch(()=>t.history.dataNow.nodes.length,()=>{a()},{deep:!0,immediate:!0}),(u,d)=>s.value.length?(o.openBlock(),o.createElementBlock("div",Jz,[e.moduleDetail?(o.openBlock(),o.createElementBlock("div",Xz,[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(s.value,f=>(o.openBlock(),o.createElementBlock("div",{key:f.name,class:o.normalizeClass(["node-control-panel-item",{disabled:!c(f.name),"hidden-node":!n.value[f.name]}]),onClick:p=>l(f.name)},[e.customNodeImages[f.name]?(o.openBlock(),o.createElementBlock("img",{key:0,src:e.customNodeImages[f.name],alt:"",class:"node-control-panel-img"},null,8,Zz)):(o.openBlock(),o.createBlock(Oa,{key:1,class:"node-control-panel-img","node-info":{type:f.name}},null,8,["node-info"])),o.createElementVNode("span",Vz,o.toDisplayString(f.namec),1)],10,Qz))),128))])):o.createCommentVNode("",!0)])):o.createCommentVNode("",!0)}},cse="",dse="",use="",fse="",hse="",pse="",gse="",mse="",vse="",yse="",bse="",wse="",tU={},nU={class:"search-icon",width:"16px",height:"16px",viewBox:"0 0 16 16",version:"1.1",xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink"};function rU(e,t){return o.openBlock(),o.createElementBlock("svg",nU,t[0]||(t[0]=[o.createStaticVNode('<title>放大镜</title><g id="控件" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd"><g id="基础输入框" transform="translate(-176.000000, -8.000000)"><g id="编组" transform="translate(176.000000, 8.000000)"><polygon id="蒙版" opacity="0.200000003" points="0 0 16 0 16 16 0 16"></polygon><path id="形状结合" d="M6.85714286,1.24344979e-14 C10.6442383,1.24344979e-14 13.7142857,3.07004743 13.7142857,6.85714286 C13.7142857,8.54517828 13.1043337,10.0907518 12.0928056,11.2854873 L15.8326324,15.0245104 L15.0245104,15.8326324 L15.0245104,15.8326324 L11.2854873,12.0928056 C10.0907518,13.1043337 8.54517828,13.7142857 6.85714286,13.7142857 C3.07004743,13.7142857 -3.11395354e-12,10.6442383 -3.11395354e-12,6.85714286 C-3.11395354e-12,3.07004743 3.07004743,1.24344979e-14 6.85714286,1.24344979e-14 Z M6.85714286,1.14285714 C3.70123,1.14285714 1.14285714,3.70123 1.14285714,6.85714286 C1.14285714,10.0130557 3.70123,12.5714286 6.85714286,12.5714286 C10.0130557,12.5714286 12.5714286,10.0130557 12.5714286,6.85714286 C12.5714286,3.70123 10.0130557,1.14285714 6.85714286,1.14285714 Z" fill="#999999" fill-rule="nonzero"></path></g></g></g>',2)]))}const iU=_t(tU,[["render",rU]]),_se="",Cse="";function pw(e){return e.toLowerCase().indexOf("ip:")===0&&(e=e.substr(3)),/^((25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(25[0-5]|2[0-4]\d|[01]?\d\d?)$/i.test(e)}function gw(e){return e.toLowerCase().indexOf("domain:")===0&&(e=e.substr(7)),/^[a-zA-Z0-9_][-a-zA-Z0-9_]{0,62}(\.[a-zA-Z0-9_][-a-zA-Z0-9_]{0,62})+\.?$/.test(e)}function mw(e){return e.toLowerCase().indexOf("url:")===0&&(e=e.substr(4)),/^https?:\/\/[^\s<]+[^<.,:;"')\]\s]$/g.test(e)}function ap(e){return/^([a-fA-F0-9]{32})$/.test(e)}function oU(e){return/^([a-fA-F0-9]{40})$/.test(e)}function sU(e){return/^\w{32}$/.test(e)}function aU(e){return/^(cve|CVE)-[0-9]{4}-[0-9]{4,5}$/.test(e)}function lU(e){return/^\w+(\.\w+)*@\w+(\.\w+)*(\.[a-z]{2,})$/.test(e)}const Sse="",Ese="",cU={props:{nodesType:{type:Array,default:()=>[]},addType:{type:String,default:"diy"}},inject:["moduleDetail"],data(){var e=(t,n,r)=>{switch(n=n.toLowerCase().split(`
|
|
106
106
|
`),this.formInline.type){case"ip":n.map(s=>{pw(s)?r():r(new Error("请输入正确格式的内容"))});break;case"domain":n.map(s=>{gw(s)?r():r(new Error("请输入正确格式的内容"))});break;case"url":n.map(s=>{mw(s)?r():r(new Error("请输入正确格式的内容"))});break;case"md5":n.map(s=>{ap(s)?r():r(new Error("请输入正确格式的内容"))});break;case"report":n.map(s=>{!sU(s)&&this.module.module.name==="md5graph"?r(new Error("请输入正确格式的内容")):r()});break;case"thumbprint_md5":n.map(s=>{ap(s)?r():r(new Error("请输入正确格式的内容"))});break;case"cert_https":n.map(s=>{oU(s)?r():r(new Error("请输入正确格式的内容"))});break;case"vul":n.map(s=>{aU(s)?r():r(new Error("请输入正确格式的内容"))});break;case"email":n.map(s=>{lU(s)?r():r(new Error("请输入正确格式的内容"))});break;default:r();break}};return{dialogFormVisible:!1,connectNode:null,formInline:{inputValues:"",type:""},rules:{inputValues:[{validator:e,trigger:"blur"}]}}},computed:{module(){return this.moduleDetail()},disableSearch(){return this.formInline.inputValues===""||this.formInline.type===""||this.formInline.type==="nodeType"},disableSearchDiy(){return this.formInline.inputValues===""||this.formInline.type===""},title(){let e="";switch(this.addType){case"diy":e="新增节点";break;case"moreDiy":e="批量自主添加";break;default:e="检索添加"}return e},nodesTypeAll(){return this.addType==="diy"&&!this.connectNode?[...this.nodesType,{name:"nodeType",namec:"关系节点"}]:this.addType==="diy"&&this.connectNode.type==="nodeType"?this.nodesType:this.addType==="diy"&&this.connectNode.type!=="nodeType"?[{name:"nodeType",namec:"关系节点"}]:this.nodesType},placeholder(){var n;let e="",t="";switch((n=this.nodesType)==null||n.map(r=>{r.name===this.formInline.type&&(t=r.namec)}),this.formInline.type){case"":e="请选择节点类型";break;case"report":e=this.module.module.name==="md5graph"?"请输入"+t+",32位字母+数字":"请输入"+t;break;case"vul":e="例如:cve-xxxx-xxxxx";break;default:e="请输入"+t;break}return e}},methods:{show(e){this.connectNode=null,this.formInline.inputValues="",this.formInline.type="",this.dialogFormVisible=!0,this.connectNode=e},hide(){this.dialogFormVisible=!1,this.$refs.form.resetFields()},handleSearch(e="search"){this.$refs.form.validate(t=>{if(t){const n=this.formInline.inputValues.split(`
|
|
107
|
-
`);n.map(r=>{if(r!==""){const s={type:this.formInline.type,id:this.formInline.type==="nodeType"?r+new Date().getTime():r,name:r};ve(this,"addNodes",{node:s,type:e,connectNode:this.connectNode})}}),setTimeout(()=>{this.$parent.$parent.handleTableSelect(n)},500),this.hide()}})}},emits:["addNodes"]},dU={class:"dialog-footer"};function uU(e,t,n,r,s,a){const l=vc,c=mc,u=Wf,d=mi,f=Gf,p=no,g=xa;return o.openBlock(),o.createBlock(g,{title:a.title,modelValue:s.dialogFormVisible,"onUpdate:modelValue":t[4]||(t[4]=v=>s.dialogFormVisible=v),"append-to-body":"",class:"add-node-dialog el-dialog-graph"},{footer:o.withCtx(()=>[o.createElementVNode("div",dU,[o.createVNode(p,{onClick:a.hide},{default:o.withCtx(()=>t[5]||(t[5]=[o.createTextVNode("取 消")])),_:1},8,["onClick"]),o.createVNode(p,{class:"search-button",type:"primary",disabled:a.disableSearch,onClick:a.handleSearch},{default:o.withCtx(()=>t[6]||(t[6]=[o.createTextVNode(" 添加并拓线 ")])),_:1},8,["disabled","onClick"]),o.createVNode(p,{class:"search-button",type:"primary",disabled:a.disableSearchDiy,onClick:t[3]||(t[3]=v=>a.handleSearch("diy"))},{default:o.withCtx(()=>t[7]||(t[7]=[o.createTextVNode(" 添加单节点 ")])),_:1},8,["disabled"])])]),default:o.withCtx(()=>[o.createVNode(f,{ref:"form",inline:!0,rules:s.rules,model:s.formInline,class:"demo-form-inline"},{default:o.withCtx(()=>[o.createVNode(u,{label:"类型",prop:"type"},{default:o.withCtx(()=>[o.createVNode(c,{modelValue:s.formInline.type,"onUpdate:modelValue":t[0]||(t[0]=v=>s.formInline.type=v),class:"type-item"},{default:o.withCtx(()=>[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(a.nodesTypeAll,v=>(o.openBlock(),o.createBlock(l,{key:v.value,label:v.namec,value:v.name},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])]),_:1}),o.createVNode(u,{label:"内容",prop:"inputValues"},{default:o.withCtx(()=>[n.addType==="moreDiy"?(o.openBlock(),o.createBlock(d,{key:0,modelValue:s.formInline.inputValues,"onUpdate:modelValue":t[1]||(t[1]=v=>s.formInline.inputValues=v),type:"textarea",class:"search-content value-item",rows:5,placeholder:a.placeholder},null,8,["modelValue","placeholder"])):(o.openBlock(),o.createBlock(d,{key:1,modelValue:s.formInline.inputValues,"onUpdate:modelValue":t[2]||(t[2]=v=>s.formInline.inputValues=v),class:"search-content value-item",rows:5,placeholder:a.placeholder},null,8,["modelValue","placeholder"]))]),_:1})]),_:1},8,["rules","model"])]),_:1},8,["title","modelValue"])}const fU=_t(cU,[["render",uU],["__scopeId","data-v-0a421783"]]),Sse="",Ese="",hU={props:{nodesType:{type:Array,default:()=>[]},addType:{type:String,default:"diy"}},data(){var e=(t,n,r)=>{switch(n=n.toLowerCase(),this.formInline.type){case"ip":pw(n)?r():r(new Error("请输入正确格式的内容"));break;case"domain":gw(n)?r():r(new Error("请输入正确格式的内容"));break;case"url":mw(n)?r():r(new Error("请输入正确格式的内容"));break;default:ap(n)?r():r(new Error("请输入正确格式的内容"));break}};return{dialogFormVisible:!1,connectNode:null,formInline:{inputValues:"",type:""},rules:{inputValues:[{validator:e,trigger:"blur"}]}}},computed:{disableSearch(){return this.formInline.inputValues===""||this.formInline.type===""},title(){return"添加关联"}},methods:{show(e){this.connectNode=null,this.formInline.inputValues="",this.formInline.type="",this.dialogFormVisible=!0,this.connectNode=e},hide(){this.dialogFormVisible=!1},handleSearch(e="search"){this.$refs.form.validate(t=>{if(t){const n=this.formInline.inputValues.toLowerCase(),r={type:this.formInline.type,id:n,name:n};ve(this,"addNodes",{node:r,type:e,connectNode:this.connectNode}),this.hide()}})}},emits:["addNodes"]},pU={class:"dialog-footer"};function gU(e,t,n,r,s,a){const l=vc,c=mc,u=Wf,d=mi,f=Gf,p=no,g=xa;return o.openBlock(),o.createBlock(g,{title:a.title,modelValue:s.dialogFormVisible,"onUpdate:modelValue":t[4]||(t[4]=v=>s.dialogFormVisible=v),class:"add-node-dialog el-dialog-graph"},{footer:o.withCtx(()=>[o.createElementVNode("div",pU,[o.createVNode(p,{onClick:t[2]||(t[2]=v=>s.dialogFormVisible=!1)},{default:o.withCtx(()=>t[5]||(t[5]=[o.createTextVNode("取 消")])),_:1}),n.addType==="search"?(o.openBlock(),o.createBlock(p,{key:0,class:"search-button",type:"primary",disabled:a.disableSearch,size:"mini",onClick:a.handleSearch},{default:o.withCtx(()=>t[6]||(t[6]=[o.createTextVNode(" 查询 ")])),_:1},8,["disabled","onClick"])):(o.openBlock(),o.createBlock(p,{key:1,class:"search-button",type:"primary",disabled:a.disableSearch,size:"mini",onClick:t[3]||(t[3]=v=>a.handleSearch("diy"))},{default:o.withCtx(()=>t[7]||(t[7]=[o.createTextVNode(" 自定义添加 ")])),_:1},8,["disabled"]))])]),default:o.withCtx(()=>[o.createVNode(f,{ref:"form",inline:!0,rules:s.rules,model:s.formInline,class:"demo-form-inline"},{default:o.withCtx(()=>[o.createVNode(u,{label:"类型",prop:"type"},{default:o.withCtx(()=>[o.createVNode(c,{modelValue:s.formInline.type,"onUpdate:modelValue":t[0]||(t[0]=v=>s.formInline.type=v),class:"type-item"},{default:o.withCtx(()=>[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(n.nodesType,v=>(o.openBlock(),o.createBlock(l,{key:v.value,label:v.namec,value:v.name},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])]),_:1}),o.createVNode(u,{label:"内容",prop:"inputValues"},{default:o.withCtx(()=>[o.createVNode(d,{modelValue:s.formInline.inputValues,"onUpdate:modelValue":t[1]||(t[1]=v=>s.formInline.inputValues=v),class:"search-content value-item",rows:5,placeholder:"请输入查询内容"},null,8,["modelValue"])]),_:1})]),_:1},8,["rules","model"])]),_:1},8,["title","modelValue"])}const mU=_t(hU,[["render",gU],["__scopeId","data-v-baba7d6e"]]),xse="",vU={name:"Intro",components:{QuestionFilled:S1},mixins:[],props:{config:{type:Object,default:()=>{}}},data(){return{ctrlKey:es()?"command":"Ctrl",shiftKey:es()?"⇧":"Shift",altKey:"Alt",system:["修改备注 - 即给该节点新增自定义备注","复制 - 复制节点名称","解除固定/固定节点 - 切换节点状态,控制节点自动排布或者位置不动","收藏/取消收藏 - 切换节点收藏状态,收藏后会有红色点在节点上方","显示/隐藏名称 - 节点下方显示/隐藏名称 ","显示/隐藏备注 - 节点下方显示/隐藏备注 ","单边子顶点聚合 - 将无孙子节点的子节点收起,形成一个聚合节点","聚合顶点释放 - 将已聚合的顶点释放"],rightList:["点击眼睛开关按钮可以显示隐藏该条数据","点击折叠按钮可以折叠下方所属列表","点击关联列表里面每一个子节点名字可以选中该节点","在右侧搜素框内可以搜索对应的子节点","点击右侧关联列表上方蓝色关系名称可以进行拓线操作"]}},computed:{keyCodes(){return es()?[{key:"双击节点,可拓线该节点所有关联数据",val:""},{key:"添加关系线",val:this.ctrlKey+" + 节点拖动",tips:"节点和关系节点间"},{key:"多选节点",val:this.shiftKey+" + 节点点击"},{key:"矩形多选",val:this.altKey+" + 鼠标圈定"},{key:"撤销",val:this.ctrlKey+" + z"},{key:"恢复",val:this.ctrlKey+" + "+this.shiftKey+" + z"}]:[{key:"双击节点,可拓线该节点所有关联数据",val:""},{key:"添加关系线",val:this.ctrlKey+" + 节点拖动",tips:"节点和关系节点间"},{key:"多选节点",val:this.shiftKey+" + 节点点击"},{key:"矩形多选",val:this.altKey+" + 鼠标圈定"},{key:"撤销",val:this.ctrlKey+" + z"},{key:"恢复",val:this.ctrlKey+" + y"}]}},watch:{config:{handler:function(e,t){this.addGoDetail()},deep:!0,immediate:!0}},created(){},mounted(){},updated(){},beforeUnmount(){},methods:{addGoDetail(){var e;(e=this.config)!=null&&e.jumpDetail&&this.system.push("详情页查看 - 打开对应的详情页查看详细内容")}}},yU={class:"intro-container"},bU={class:"key"},wU={class:"val"};function _U(e,t,n,r,s,a){const l=o.resolveComponent("QuestionFilled"),c=Ye,u=gn;return o.openBlock(),o.createElementBlock("div",yU,[t[0]||(t[0]=o.createElementVNode("p",{class:"title"},"快捷操作",-1)),t[1]||(t[1]=o.createElementVNode("p",{class:"line"},null,-1)),(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(a.keyCodes,(d,f)=>(o.openBlock(),o.createElementBlock("p",{key:f},[o.createElementVNode("span",bU,o.toDisplayString(d.key),1),o.createElementVNode("span",wU,[o.createTextVNode(o.toDisplayString(d.val)+" ",1),d.tips?(o.openBlock(),o.createBlock(u,{key:0,content:d.tips,"popper-class":"el-tooltip-gray",placement:"top"},{default:o.withCtx(()=>[o.createVNode(c,null,{default:o.withCtx(()=>[o.createVNode(l)]),_:1})]),_:2},1032,["content"])):o.createCommentVNode("",!0)])]))),128))])}const CU=_t(vU,[["render",_U]]);var lp={exports:{}};(function(e,t){(function(n,r){r(t)})(wi,function(n){var r;function s(){}s.prototype=Object.create(null);function a(){a.init.call(this)}a.EventEmitter=a,a.usingDomains=!1,a.prototype.domain=void 0,a.prototype._events=void 0,a.prototype._maxListeners=void 0,a.defaultMaxListeners=10,a.init=function(){this.domain=null,a.usingDomains&&r.active,(!this._events||this._events===Object.getPrototypeOf(this)._events)&&(this._events=new s,this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},a.prototype.setMaxListeners=function(h){if(typeof h!="number"||h<0||isNaN(h))throw new TypeError('"n" argument must be a positive number');return this._maxListeners=h,this};function l(m){return m._maxListeners===void 0?a.defaultMaxListeners:m._maxListeners}a.prototype.getMaxListeners=function(){return l(this)};function c(m,h,y){if(h)m.call(y);else for(var x=m.length,T=C(m,x),B=0;B<x;++B)T[B].call(y)}function u(m,h,y,x){if(h)m.call(y,x);else for(var T=m.length,B=C(m,T),L=0;L<T;++L)B[L].call(y,x)}function d(m,h,y,x,T){if(h)m.call(y,x,T);else for(var B=m.length,L=C(m,B),X=0;X<B;++X)L[X].call(y,x,T)}function f(m,h,y,x,T,B){if(h)m.call(y,x,T,B);else for(var L=m.length,X=C(m,L),se=0;se<L;++se)X[se].call(y,x,T,B)}function p(m,h,y,x){if(h)m.apply(y,x);else for(var T=m.length,B=C(m,T),L=0;L<T;++L)B[L].apply(y,x)}a.prototype.emit=function(h){var y,x,T,B,L,X,se,pe=h==="error";if(X=this._events,X)pe=pe&&X.error==null;else if(!pe)return!1;if(se=this.domain,pe){if(y=arguments[1],se)y||(y=new Error('Uncaught, unspecified "error" event')),y.domainEmitter=this,y.domain=se,y.domainThrown=!1,se.emit("error",y);else{if(y instanceof Error)throw y;var me=new Error('Uncaught, unspecified "error" event. ('+y+")");throw me.context=y,me}return!1}if(x=X[h],!x)return!1;var we=typeof x=="function";switch(T=arguments.length,T){case 1:c(x,we,this);break;case 2:u(x,we,this,arguments[1]);break;case 3:d(x,we,this,arguments[1],arguments[2]);break;case 4:f(x,we,this,arguments[1],arguments[2],arguments[3]);break;default:for(B=new Array(T-1),L=1;L<T;L++)B[L-1]=arguments[L];p(x,we,this,B)}return!0};function g(m,h,y,x){var T,B,L;if(typeof y!="function")throw new TypeError('"listener" argument must be a function');if(B=m._events,B?(B.newListener&&(m.emit("newListener",h,y.listener?y.listener:y),B=m._events),L=B[h]):(B=m._events=new s,m._eventsCount=0),!L)L=B[h]=y,++m._eventsCount;else if(typeof L=="function"?L=B[h]=x?[y,L]:[L,y]:x?L.unshift(y):L.push(y),!L.warned&&(T=l(m),T&&T>0&&L.length>T)){L.warned=!0;var X=new Error("Possible EventEmitter memory leak detected. "+L.length+" "+h+" listeners added. Use emitter.setMaxListeners() to increase limit");X.name="MaxListenersExceededWarning",X.emitter=m,X.type=h,X.count=L.length,v(X)}return m}function v(m){typeof console.warn=="function"?console.warn(m):console.log(m)}a.prototype.addListener=function(h,y){return g(this,h,y,!1)},a.prototype.on=a.prototype.addListener,a.prototype.prependListener=function(h,y){return g(this,h,y,!0)};function b(m,h,y){var x=!1;function T(){m.removeListener(h,T),x||(x=!0,y.apply(m,arguments))}return T.listener=y,T}a.prototype.once=function(h,y){if(typeof y!="function")throw new TypeError('"listener" argument must be a function');return this.on(h,b(this,h,y)),this},a.prototype.prependOnceListener=function(h,y){if(typeof y!="function")throw new TypeError('"listener" argument must be a function');return this.prependListener(h,b(this,h,y)),this},a.prototype.removeListener=function(h,y){var x,T,B,L,X;if(typeof y!="function")throw new TypeError('"listener" argument must be a function');if(T=this._events,!T)return this;if(x=T[h],!x)return this;if(x===y||x.listener&&x.listener===y)--this._eventsCount===0?this._events=new s:(delete T[h],T.removeListener&&this.emit("removeListener",h,x.listener||y));else if(typeof x!="function"){for(B=-1,L=x.length;L-- >0;)if(x[L]===y||x[L].listener&&x[L].listener===y){X=x[L].listener,B=L;break}if(B<0)return this;if(x.length===1){if(x[0]=void 0,--this._eventsCount===0)return this._events=new s,this;delete T[h]}else _(x,B);T.removeListener&&this.emit("removeListener",h,X||y)}return this},a.prototype.removeAllListeners=function(h){var y,x;if(x=this._events,!x)return this;if(!x.removeListener)return arguments.length===0?(this._events=new s,this._eventsCount=0):x[h]&&(--this._eventsCount===0?this._events=new s:delete x[h]),this;if(arguments.length===0){for(var T=Object.keys(x),B=0,L;B<T.length;++B)L=T[B],L!=="removeListener"&&this.removeAllListeners(L);return this.removeAllListeners("removeListener"),this._events=new s,this._eventsCount=0,this}if(y=x[h],typeof y=="function")this.removeListener(h,y);else if(y)do this.removeListener(h,y[y.length-1]);while(y[0]);return this},a.prototype.listeners=function(h){var y,x,T=this._events;return T?(y=T[h],y?typeof y=="function"?x=[y.listener||y]:x=k(y):x=[]):x=[],x},a.listenerCount=function(m,h){return typeof m.listenerCount=="function"?m.listenerCount(h):w.call(m,h)},a.prototype.listenerCount=w;function w(m){var h=this._events;if(h){var y=h[m];if(typeof y=="function")return 1;if(y)return y.length}return 0}a.prototype.eventNames=function(){return this._eventsCount>0?Reflect.ownKeys(this._events):[]};function _(m,h){for(var y=h,x=y+1,T=m.length;x<T;y+=1,x+=1)m[y]=m[x];m.pop()}function C(m,h){for(var y=new Array(h);h--;)y[h]=m[h];return y}function k(m){for(var h=new Array(m.length),y=0;y<h.length;++y)h[y]=m[y].listener||m[y];return h}var S=typeof wi!="undefined"?wi:typeof self!="undefined"?self:typeof window!="undefined"?window:{},E=[],N=[],A=typeof Uint8Array!="undefined"?Uint8Array:Array,I=!1;function O(){I=!0;for(var m="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",h=0,y=m.length;h<y;++h)E[h]=m[h],N[m.charCodeAt(h)]=h;N["-".charCodeAt(0)]=62,N["_".charCodeAt(0)]=63}function F(m){I||O();var h,y,x,T,B,L,X=m.length;if(X%4>0)throw new Error("Invalid string. Length must be a multiple of 4");B=m[X-2]==="="?2:m[X-1]==="="?1:0,L=new A(X*3/4-B),x=B>0?X-4:X;var se=0;for(h=0,y=0;h<x;h+=4,y+=3)T=N[m.charCodeAt(h)]<<18|N[m.charCodeAt(h+1)]<<12|N[m.charCodeAt(h+2)]<<6|N[m.charCodeAt(h+3)],L[se++]=T>>16&255,L[se++]=T>>8&255,L[se++]=T&255;return B===2?(T=N[m.charCodeAt(h)]<<2|N[m.charCodeAt(h+1)]>>4,L[se++]=T&255):B===1&&(T=N[m.charCodeAt(h)]<<10|N[m.charCodeAt(h+1)]<<4|N[m.charCodeAt(h+2)]>>2,L[se++]=T>>8&255,L[se++]=T&255),L}function P(m){return E[m>>18&63]+E[m>>12&63]+E[m>>6&63]+E[m&63]}function M(m,h,y){for(var x,T=[],B=h;B<y;B+=3)x=(m[B]<<16)+(m[B+1]<<8)+m[B+2],T.push(P(x));return T.join("")}function W(m){I||O();for(var h,y=m.length,x=y%3,T="",B=[],L=16383,X=0,se=y-x;X<se;X+=L)B.push(M(m,X,X+L>se?se:X+L));return x===1?(h=m[y-1],T+=E[h>>2],T+=E[h<<4&63],T+="=="):x===2&&(h=(m[y-2]<<8)+m[y-1],T+=E[h>>10],T+=E[h>>4&63],T+=E[h<<2&63],T+="="),B.push(T),B.join("")}function U(m,h,y,x,T){var B,L,X=T*8-x-1,se=(1<<X)-1,pe=se>>1,me=-7,we=y?T-1:0,ut=y?-1:1,Qe=m[h+we];for(we+=ut,B=Qe&(1<<-me)-1,Qe>>=-me,me+=X;me>0;B=B*256+m[h+we],we+=ut,me-=8);for(L=B&(1<<-me)-1,B>>=-me,me+=x;me>0;L=L*256+m[h+we],we+=ut,me-=8);if(B===0)B=1-pe;else{if(B===se)return L?NaN:(Qe?-1:1)*(1/0);L=L+Math.pow(2,x),B=B-pe}return(Qe?-1:1)*L*Math.pow(2,B-x)}function Q(m,h,y,x,T,B){var L,X,se,pe=B*8-T-1,me=(1<<pe)-1,we=me>>1,ut=T===23?Math.pow(2,-24)-Math.pow(2,-77):0,Qe=x?0:B-1,Fr=x?1:-1,xl=h<0||h===0&&1/h<0?1:0;for(h=Math.abs(h),isNaN(h)||h===1/0?(X=isNaN(h)?1:0,L=me):(L=Math.floor(Math.log(h)/Math.LN2),h*(se=Math.pow(2,-L))<1&&(L--,se*=2),L+we>=1?h+=ut/se:h+=ut*Math.pow(2,1-we),h*se>=2&&(L++,se/=2),L+we>=me?(X=0,L=me):L+we>=1?(X=(h*se-1)*Math.pow(2,T),L=L+we):(X=h*Math.pow(2,we-1)*Math.pow(2,T),L=0));T>=8;m[y+Qe]=X&255,Qe+=Fr,X/=256,T-=8);for(L=L<<T|X,pe+=T;pe>0;m[y+Qe]=L&255,Qe+=Fr,L/=256,pe-=8);m[y+Qe-Fr]|=xl*128}var q={}.toString,D=Array.isArray||function(m){return q.call(m)=="[object Array]"},j=50;R.TYPED_ARRAY_SUPPORT=S.TYPED_ARRAY_SUPPORT!==void 0?S.TYPED_ARRAY_SUPPORT:!0;function K(){return R.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function H(m,h){if(K()<h)throw new RangeError("Invalid typed array length");return R.TYPED_ARRAY_SUPPORT?(m=new Uint8Array(h),m.__proto__=R.prototype):(m===null&&(m=new R(h)),m.length=h),m}function R(m,h,y){if(!R.TYPED_ARRAY_SUPPORT&&!(this instanceof R))return new R(m,h,y);if(typeof m=="number"){if(typeof h=="string")throw new Error("If encoding is specified then the first argument must be a string");return J(this,m)}return ie(this,m,h,y)}R.poolSize=8192,R._augment=function(m){return m.__proto__=R.prototype,m};function ie(m,h,y,x){if(typeof h=="number")throw new TypeError('"value" argument must not be a number');return typeof ArrayBuffer!="undefined"&&h instanceof ArrayBuffer?z(m,h,y,x):typeof h=="string"?oe(m,h,y):G(m,h)}R.from=function(m,h,y){return ie(null,m,h,y)},R.TYPED_ARRAY_SUPPORT&&(R.prototype.__proto__=Uint8Array.prototype,R.__proto__=Uint8Array);function ee(m){if(typeof m!="number")throw new TypeError('"size" argument must be a number');if(m<0)throw new RangeError('"size" argument must not be negative')}function Y(m,h,y,x){return ee(h),h<=0?H(m,h):y!==void 0?typeof x=="string"?H(m,h).fill(y,x):H(m,h).fill(y):H(m,h)}R.alloc=function(m,h,y){return Y(null,m,h,y)};function J(m,h){if(ee(h),m=H(m,h<0?0:te(h)|0),!R.TYPED_ARRAY_SUPPORT)for(var y=0;y<h;++y)m[y]=0;return m}R.allocUnsafe=function(m){return J(null,m)},R.allocUnsafeSlow=function(m){return J(null,m)};function oe(m,h,y){if((typeof y!="string"||y==="")&&(y="utf8"),!R.isEncoding(y))throw new TypeError('"encoding" must be a valid string encoding');var x=de(h,y)|0;m=H(m,x);var T=m.write(h,y);return T!==x&&(m=m.slice(0,T)),m}function re(m,h){var y=h.length<0?0:te(h.length)|0;m=H(m,y);for(var x=0;x<y;x+=1)m[x]=h[x]&255;return m}function z(m,h,y,x){if(h.byteLength,y<0||h.byteLength<y)throw new RangeError("'offset' is out of bounds");if(h.byteLength<y+(x||0))throw new RangeError("'length' is out of bounds");return y===void 0&&x===void 0?h=new Uint8Array(h):x===void 0?h=new Uint8Array(h,y):h=new Uint8Array(h,y,x),R.TYPED_ARRAY_SUPPORT?(m=h,m.__proto__=R.prototype):m=re(m,h),m}function G(m,h){if(le(h)){var y=te(h.length)|0;return m=H(m,y),m.length===0||h.copy(m,0,0,y),m}if(h){if(typeof ArrayBuffer!="undefined"&&h.buffer instanceof ArrayBuffer||"length"in h)return typeof h.length!="number"||vu(h.length)?H(m,0):re(m,h);if(h.type==="Buffer"&&D(h.data))return re(m,h.data)}throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}function te(m){if(m>=K())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+K().toString(16)+" bytes");return m|0}R.isBuffer=yu;function le(m){return!!(m!=null&&m._isBuffer)}R.compare=function(h,y){if(!le(h)||!le(y))throw new TypeError("Arguments must be Buffers");if(h===y)return 0;for(var x=h.length,T=y.length,B=0,L=Math.min(x,T);B<L;++B)if(h[B]!==y[B]){x=h[B],T=y[B];break}return x<T?-1:T<x?1:0},R.isEncoding=function(h){switch(String(h).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},R.concat=function(h,y){if(!D(h))throw new TypeError('"list" argument must be an Array of Buffers');if(h.length===0)return R.alloc(0);var x;if(y===void 0)for(y=0,x=0;x<h.length;++x)y+=h[x].length;var T=R.allocUnsafe(y),B=0;for(x=0;x<h.length;++x){var L=h[x];if(!le(L))throw new TypeError('"list" argument must be an Array of Buffers');L.copy(T,B),B+=L.length}return T};function de(m,h){if(le(m))return m.length;if(typeof ArrayBuffer!="undefined"&&typeof ArrayBuffer.isView=="function"&&(ArrayBuffer.isView(m)||m instanceof ArrayBuffer))return m.byteLength;typeof m!="string"&&(m=""+m);var y=m.length;if(y===0)return 0;for(var x=!1;;)switch(h){case"ascii":case"latin1":case"binary":return y;case"utf8":case"utf-8":case void 0:return It(m).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return y*2;case"hex":return y>>>1;case"base64":return mu(m).length;default:if(x)return It(m).length;h=(""+h).toLowerCase(),x=!0}}R.byteLength=de;function ye(m,h,y){var x=!1;if((h===void 0||h<0)&&(h=0),h>this.length||((y===void 0||y>this.length)&&(y=this.length),y<=0)||(y>>>=0,h>>>=0,y<=h))return"";for(m||(m="utf8");;)switch(m){case"hex":return qn(this,h,y);case"utf8":case"utf-8":return Et(this,h,y);case"ascii":return Me(this,h,y);case"latin1":case"binary":return nt(this,h,y);case"base64":return Le(this,h,y);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return cr(this,h,y);default:if(x)throw new TypeError("Unknown encoding: "+m);m=(m+"").toLowerCase(),x=!0}}R.prototype._isBuffer=!0;function be(m,h,y){var x=m[h];m[h]=m[y],m[y]=x}R.prototype.swap16=function(){var h=this.length;if(h%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var y=0;y<h;y+=2)be(this,y,y+1);return this},R.prototype.swap32=function(){var h=this.length;if(h%4!==0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var y=0;y<h;y+=4)be(this,y,y+3),be(this,y+1,y+2);return this},R.prototype.swap64=function(){var h=this.length;if(h%8!==0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var y=0;y<h;y+=8)be(this,y,y+7),be(this,y+1,y+6),be(this,y+2,y+5),be(this,y+3,y+4);return this},R.prototype.toString=function(){var h=this.length|0;return h===0?"":arguments.length===0?Et(this,0,h):ye.apply(this,arguments)},R.prototype.equals=function(h){if(!le(h))throw new TypeError("Argument must be a Buffer");return this===h?!0:R.compare(this,h)===0},R.prototype.inspect=function(){var h="",y=j;return this.length>0&&(h=this.toString("hex",0,y).match(/.{2}/g).join(" "),this.length>y&&(h+=" ... ")),"<Buffer "+h+">"},R.prototype.compare=function(h,y,x,T,B){if(!le(h))throw new TypeError("Argument must be a Buffer");if(y===void 0&&(y=0),x===void 0&&(x=h?h.length:0),T===void 0&&(T=0),B===void 0&&(B=this.length),y<0||x>h.length||T<0||B>this.length)throw new RangeError("out of range index");if(T>=B&&y>=x)return 0;if(T>=B)return-1;if(y>=x)return 1;if(y>>>=0,x>>>=0,T>>>=0,B>>>=0,this===h)return 0;for(var L=B-T,X=x-y,se=Math.min(L,X),pe=this.slice(T,B),me=h.slice(y,x),we=0;we<se;++we)if(pe[we]!==me[we]){L=pe[we],X=me[we];break}return L<X?-1:X<L?1:0};function Se(m,h,y,x,T){if(m.length===0)return-1;if(typeof y=="string"?(x=y,y=0):y>2147483647?y=2147483647:y<-2147483648&&(y=-2147483648),y=+y,isNaN(y)&&(y=T?0:m.length-1),y<0&&(y=m.length+y),y>=m.length){if(T)return-1;y=m.length-1}else if(y<0)if(T)y=0;else return-1;if(typeof h=="string"&&(h=R.from(h,x)),le(h))return h.length===0?-1:Be(m,h,y,x,T);if(typeof h=="number")return h=h&255,R.TYPED_ARRAY_SUPPORT&&typeof Uint8Array.prototype.indexOf=="function"?T?Uint8Array.prototype.indexOf.call(m,h,y):Uint8Array.prototype.lastIndexOf.call(m,h,y):Be(m,[h],y,x,T);throw new TypeError("val must be string, number or Buffer")}function Be(m,h,y,x,T){var B=1,L=m.length,X=h.length;if(x!==void 0&&(x=String(x).toLowerCase(),x==="ucs2"||x==="ucs-2"||x==="utf16le"||x==="utf-16le")){if(m.length<2||h.length<2)return-1;B=2,L/=2,X/=2,y/=2}function se(Qe,Fr){return B===1?Qe[Fr]:Qe.readUInt16BE(Fr*B)}var pe;if(T){var me=-1;for(pe=y;pe<L;pe++)if(se(m,pe)===se(h,me===-1?0:pe-me)){if(me===-1&&(me=pe),pe-me+1===X)return me*B}else me!==-1&&(pe-=pe-me),me=-1}else for(y+X>L&&(y=L-X),pe=y;pe>=0;pe--){for(var we=!0,ut=0;ut<X;ut++)if(se(m,pe+ut)!==se(h,ut)){we=!1;break}if(we)return pe}return-1}R.prototype.includes=function(h,y,x){return this.indexOf(h,y,x)!==-1},R.prototype.indexOf=function(h,y,x){return Se(this,h,y,x,!0)},R.prototype.lastIndexOf=function(h,y,x){return Se(this,h,y,x,!1)};function tt(m,h,y,x){y=Number(y)||0;var T=m.length-y;x?(x=Number(x),x>T&&(x=T)):x=T;var B=h.length;if(B%2!==0)throw new TypeError("Invalid hex string");x>B/2&&(x=B/2);for(var L=0;L<x;++L){var X=parseInt(h.substr(L*2,2),16);if(isNaN(X))return L;m[y+L]=X}return L}function Ee(m,h,y,x){return $s(It(h,m.length-y),m,y,x)}function Te(m,h,y,x){return $s(Fs(h),m,y,x)}function ke(m,h,y,x){return Te(m,h,y,x)}function We(m,h,y,x){return $s(mu(h),m,y,x)}function gt(m,h,y,x){return $s(b0(h,m.length-y),m,y,x)}R.prototype.write=function(h,y,x,T){if(y===void 0)T="utf8",x=this.length,y=0;else if(x===void 0&&typeof y=="string")T=y,x=this.length,y=0;else if(isFinite(y))y=y|0,isFinite(x)?(x=x|0,T===void 0&&(T="utf8")):(T=x,x=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");var B=this.length-y;if((x===void 0||x>B)&&(x=B),h.length>0&&(x<0||y<0)||y>this.length)throw new RangeError("Attempt to write outside buffer bounds");T||(T="utf8");for(var L=!1;;)switch(T){case"hex":return tt(this,h,y,x);case"utf8":case"utf-8":return Ee(this,h,y,x);case"ascii":return Te(this,h,y,x);case"latin1":case"binary":return ke(this,h,y,x);case"base64":return We(this,h,y,x);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return gt(this,h,y,x);default:if(L)throw new TypeError("Unknown encoding: "+T);T=(""+T).toLowerCase(),L=!0}},R.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function Le(m,h,y){return h===0&&y===m.length?W(m):W(m.slice(h,y))}function Et(m,h,y){y=Math.min(m.length,y);for(var x=[],T=h;T<y;){var B=m[T],L=null,X=B>239?4:B>223?3:B>191?2:1;if(T+X<=y){var se,pe,me,we;switch(X){case 1:B<128&&(L=B);break;case 2:se=m[T+1],(se&192)===128&&(we=(B&31)<<6|se&63,we>127&&(L=we));break;case 3:se=m[T+1],pe=m[T+2],(se&192)===128&&(pe&192)===128&&(we=(B&15)<<12|(se&63)<<6|pe&63,we>2047&&(we<55296||we>57343)&&(L=we));break;case 4:se=m[T+1],pe=m[T+2],me=m[T+3],(se&192)===128&&(pe&192)===128&&(me&192)===128&&(we=(B&15)<<18|(se&63)<<12|(pe&63)<<6|me&63,we>65535&&we<1114112&&(L=we))}}L===null?(L=65533,X=1):L>65535&&(L-=65536,x.push(L>>>10&1023|55296),L=56320|L&1023),x.push(L),T+=X}return ae(x)}var ge=4096;function ae(m){var h=m.length;if(h<=ge)return String.fromCharCode.apply(String,m);for(var y="",x=0;x<h;)y+=String.fromCharCode.apply(String,m.slice(x,x+=ge));return y}function Me(m,h,y){var x="";y=Math.min(m.length,y);for(var T=h;T<y;++T)x+=String.fromCharCode(m[T]&127);return x}function nt(m,h,y){var x="";y=Math.min(m.length,y);for(var T=h;T<y;++T)x+=String.fromCharCode(m[T]);return x}function qn(m,h,y){var x=m.length;(!h||h<0)&&(h=0),(!y||y<0||y>x)&&(y=x);for(var T="",B=h;B<y;++B)T+=li(m[B]);return T}function cr(m,h,y){for(var x=m.slice(h,y),T="",B=0;B<x.length;B+=2)T+=String.fromCharCode(x[B]+x[B+1]*256);return T}R.prototype.slice=function(h,y){var x=this.length;h=~~h,y=y===void 0?x:~~y,h<0?(h+=x,h<0&&(h=0)):h>x&&(h=x),y<0?(y+=x,y<0&&(y=0)):y>x&&(y=x),y<h&&(y=h);var T;if(R.TYPED_ARRAY_SUPPORT)T=this.subarray(h,y),T.__proto__=R.prototype;else{var B=y-h;T=new R(B,void 0);for(var L=0;L<B;++L)T[L]=this[L+h]}return T};function xt(m,h,y){if(m%1!==0||m<0)throw new RangeError("offset is not uint");if(m+h>y)throw new RangeError("Trying to access beyond buffer length")}R.prototype.readUIntLE=function(h,y,x){h=h|0,y=y|0,x||xt(h,y,this.length);for(var T=this[h],B=1,L=0;++L<y&&(B*=256);)T+=this[h+L]*B;return T},R.prototype.readUIntBE=function(h,y,x){h=h|0,y=y|0,x||xt(h,y,this.length);for(var T=this[h+--y],B=1;y>0&&(B*=256);)T+=this[h+--y]*B;return T},R.prototype.readUInt8=function(h,y){return y||xt(h,1,this.length),this[h]},R.prototype.readUInt16LE=function(h,y){return y||xt(h,2,this.length),this[h]|this[h+1]<<8},R.prototype.readUInt16BE=function(h,y){return y||xt(h,2,this.length),this[h]<<8|this[h+1]},R.prototype.readUInt32LE=function(h,y){return y||xt(h,4,this.length),(this[h]|this[h+1]<<8|this[h+2]<<16)+this[h+3]*16777216},R.prototype.readUInt32BE=function(h,y){return y||xt(h,4,this.length),this[h]*16777216+(this[h+1]<<16|this[h+2]<<8|this[h+3])},R.prototype.readIntLE=function(h,y,x){h=h|0,y=y|0,x||xt(h,y,this.length);for(var T=this[h],B=1,L=0;++L<y&&(B*=256);)T+=this[h+L]*B;return B*=128,T>=B&&(T-=Math.pow(2,8*y)),T},R.prototype.readIntBE=function(h,y,x){h=h|0,y=y|0,x||xt(h,y,this.length);for(var T=y,B=1,L=this[h+--T];T>0&&(B*=256);)L+=this[h+--T]*B;return B*=128,L>=B&&(L-=Math.pow(2,8*y)),L},R.prototype.readInt8=function(h,y){return y||xt(h,1,this.length),this[h]&128?(255-this[h]+1)*-1:this[h]},R.prototype.readInt16LE=function(h,y){y||xt(h,2,this.length);var x=this[h]|this[h+1]<<8;return x&32768?x|4294901760:x},R.prototype.readInt16BE=function(h,y){y||xt(h,2,this.length);var x=this[h+1]|this[h]<<8;return x&32768?x|4294901760:x},R.prototype.readInt32LE=function(h,y){return y||xt(h,4,this.length),this[h]|this[h+1]<<8|this[h+2]<<16|this[h+3]<<24},R.prototype.readInt32BE=function(h,y){return y||xt(h,4,this.length),this[h]<<24|this[h+1]<<16|this[h+2]<<8|this[h+3]},R.prototype.readFloatLE=function(h,y){return y||xt(h,4,this.length),U(this,h,!0,23,4)},R.prototype.readFloatBE=function(h,y){return y||xt(h,4,this.length),U(this,h,!1,23,4)},R.prototype.readDoubleLE=function(h,y){return y||xt(h,8,this.length),U(this,h,!0,52,8)},R.prototype.readDoubleBE=function(h,y){return y||xt(h,8,this.length),U(this,h,!1,52,8)};function he(m,h,y,x,T,B){if(!le(m))throw new TypeError('"buffer" argument must be a Buffer instance');if(h>T||h<B)throw new RangeError('"value" argument is out of bounds');if(y+x>m.length)throw new RangeError("Index out of range")}R.prototype.writeUIntLE=function(h,y,x,T){if(h=+h,y=y|0,x=x|0,!T){var B=Math.pow(2,8*x)-1;he(this,h,y,x,B,0)}var L=1,X=0;for(this[y]=h&255;++X<x&&(L*=256);)this[y+X]=h/L&255;return y+x},R.prototype.writeUIntBE=function(h,y,x,T){if(h=+h,y=y|0,x=x|0,!T){var B=Math.pow(2,8*x)-1;he(this,h,y,x,B,0)}var L=x-1,X=1;for(this[y+L]=h&255;--L>=0&&(X*=256);)this[y+L]=h/X&255;return y+x},R.prototype.writeUInt8=function(h,y,x){return h=+h,y=y|0,x||he(this,h,y,1,255,0),R.TYPED_ARRAY_SUPPORT||(h=Math.floor(h)),this[y]=h&255,y+1};function Ce(m,h,y,x){h<0&&(h=65535+h+1);for(var T=0,B=Math.min(m.length-y,2);T<B;++T)m[y+T]=(h&255<<8*(x?T:1-T))>>>(x?T:1-T)*8}R.prototype.writeUInt16LE=function(h,y,x){return h=+h,y=y|0,x||he(this,h,y,2,65535,0),R.TYPED_ARRAY_SUPPORT?(this[y]=h&255,this[y+1]=h>>>8):Ce(this,h,y,!0),y+2},R.prototype.writeUInt16BE=function(h,y,x){return h=+h,y=y|0,x||he(this,h,y,2,65535,0),R.TYPED_ARRAY_SUPPORT?(this[y]=h>>>8,this[y+1]=h&255):Ce(this,h,y,!1),y+2};function Fe(m,h,y,x){h<0&&(h=4294967295+h+1);for(var T=0,B=Math.min(m.length-y,4);T<B;++T)m[y+T]=h>>>(x?T:3-T)*8&255}R.prototype.writeUInt32LE=function(h,y,x){return h=+h,y=y|0,x||he(this,h,y,4,4294967295,0),R.TYPED_ARRAY_SUPPORT?(this[y+3]=h>>>24,this[y+2]=h>>>16,this[y+1]=h>>>8,this[y]=h&255):Fe(this,h,y,!0),y+4},R.prototype.writeUInt32BE=function(h,y,x){return h=+h,y=y|0,x||he(this,h,y,4,4294967295,0),R.TYPED_ARRAY_SUPPORT?(this[y]=h>>>24,this[y+1]=h>>>16,this[y+2]=h>>>8,this[y+3]=h&255):Fe(this,h,y,!1),y+4},R.prototype.writeIntLE=function(h,y,x,T){if(h=+h,y=y|0,!T){var B=Math.pow(2,8*x-1);he(this,h,y,x,B-1,-B)}var L=0,X=1,se=0;for(this[y]=h&255;++L<x&&(X*=256);)h<0&&se===0&&this[y+L-1]!==0&&(se=1),this[y+L]=(h/X>>0)-se&255;return y+x},R.prototype.writeIntBE=function(h,y,x,T){if(h=+h,y=y|0,!T){var B=Math.pow(2,8*x-1);he(this,h,y,x,B-1,-B)}var L=x-1,X=1,se=0;for(this[y+L]=h&255;--L>=0&&(X*=256);)h<0&&se===0&&this[y+L+1]!==0&&(se=1),this[y+L]=(h/X>>0)-se&255;return y+x},R.prototype.writeInt8=function(h,y,x){return h=+h,y=y|0,x||he(this,h,y,1,127,-128),R.TYPED_ARRAY_SUPPORT||(h=Math.floor(h)),h<0&&(h=255+h+1),this[y]=h&255,y+1},R.prototype.writeInt16LE=function(h,y,x){return h=+h,y=y|0,x||he(this,h,y,2,32767,-32768),R.TYPED_ARRAY_SUPPORT?(this[y]=h&255,this[y+1]=h>>>8):Ce(this,h,y,!0),y+2},R.prototype.writeInt16BE=function(h,y,x){return h=+h,y=y|0,x||he(this,h,y,2,32767,-32768),R.TYPED_ARRAY_SUPPORT?(this[y]=h>>>8,this[y+1]=h&255):Ce(this,h,y,!1),y+2},R.prototype.writeInt32LE=function(h,y,x){return h=+h,y=y|0,x||he(this,h,y,4,2147483647,-2147483648),R.TYPED_ARRAY_SUPPORT?(this[y]=h&255,this[y+1]=h>>>8,this[y+2]=h>>>16,this[y+3]=h>>>24):Fe(this,h,y,!0),y+4},R.prototype.writeInt32BE=function(h,y,x){return h=+h,y=y|0,x||he(this,h,y,4,2147483647,-2147483648),h<0&&(h=4294967295+h+1),R.TYPED_ARRAY_SUPPORT?(this[y]=h>>>24,this[y+1]=h>>>16,this[y+2]=h>>>8,this[y+3]=h&255):Fe(this,h,y,!1),y+4};function Pe(m,h,y,x,T,B){if(y+x>m.length)throw new RangeError("Index out of range");if(y<0)throw new RangeError("Index out of range")}function He(m,h,y,x,T){return T||Pe(m,h,y,4),Q(m,h,y,x,23,4),y+4}R.prototype.writeFloatLE=function(h,y,x){return He(this,h,y,!0,x)},R.prototype.writeFloatBE=function(h,y,x){return He(this,h,y,!1,x)};function rt(m,h,y,x,T){return T||Pe(m,h,y,8),Q(m,h,y,x,52,8),y+8}R.prototype.writeDoubleLE=function(h,y,x){return rt(this,h,y,!0,x)},R.prototype.writeDoubleBE=function(h,y,x){return rt(this,h,y,!1,x)},R.prototype.copy=function(h,y,x,T){if(x||(x=0),!T&&T!==0&&(T=this.length),y>=h.length&&(y=h.length),y||(y=0),T>0&&T<x&&(T=x),T===x||h.length===0||this.length===0)return 0;if(y<0)throw new RangeError("targetStart out of bounds");if(x<0||x>=this.length)throw new RangeError("sourceStart out of bounds");if(T<0)throw new RangeError("sourceEnd out of bounds");T>this.length&&(T=this.length),h.length-y<T-x&&(T=h.length-y+x);var B=T-x,L;if(this===h&&x<y&&y<T)for(L=B-1;L>=0;--L)h[L+y]=this[L+x];else if(B<1e3||!R.TYPED_ARRAY_SUPPORT)for(L=0;L<B;++L)h[L+y]=this[L+x];else Uint8Array.prototype.set.call(h,this.subarray(x,x+B),y);return B},R.prototype.fill=function(h,y,x,T){if(typeof h=="string"){if(typeof y=="string"?(T=y,y=0,x=this.length):typeof x=="string"&&(T=x,x=this.length),h.length===1){var B=h.charCodeAt(0);B<256&&(h=B)}if(T!==void 0&&typeof T!="string")throw new TypeError("encoding must be a string");if(typeof T=="string"&&!R.isEncoding(T))throw new TypeError("Unknown encoding: "+T)}else typeof h=="number"&&(h=h&255);if(y<0||this.length<y||this.length<x)throw new RangeError("Out of range index");if(x<=y)return this;y=y>>>0,x=x===void 0?this.length:x>>>0,h||(h=0);var L;if(typeof h=="number")for(L=y;L<x;++L)this[L]=h;else{var X=le(h)?h:It(new R(h,T).toString()),se=X.length;for(L=0;L<x-y;++L)this[L+y]=X[L%se]}return this};var Kt=/[^+\/0-9A-Za-z-_]/g;function Hn(m){if(m=Cn(m).replace(Kt,""),m.length<2)return"";for(;m.length%4!==0;)m=m+"=";return m}function Cn(m){return m.trim?m.trim():m.replace(/^\s+|\s+$/g,"")}function li(m){return m<16?"0"+m.toString(16):m.toString(16)}function It(m,h){h=h||1/0;for(var y,x=m.length,T=null,B=[],L=0;L<x;++L){if(y=m.charCodeAt(L),y>55295&&y<57344){if(!T){if(y>56319){(h-=3)>-1&&B.push(239,191,189);continue}else if(L+1===x){(h-=3)>-1&&B.push(239,191,189);continue}T=y;continue}if(y<56320){(h-=3)>-1&&B.push(239,191,189),T=y;continue}y=(T-55296<<10|y-56320)+65536}else T&&(h-=3)>-1&&B.push(239,191,189);if(T=null,y<128){if((h-=1)<0)break;B.push(y)}else if(y<2048){if((h-=2)<0)break;B.push(y>>6|192,y&63|128)}else if(y<65536){if((h-=3)<0)break;B.push(y>>12|224,y>>6&63|128,y&63|128)}else if(y<1114112){if((h-=4)<0)break;B.push(y>>18|240,y>>12&63|128,y>>6&63|128,y&63|128)}else throw new Error("Invalid code point")}return B}function Fs(m){for(var h=[],y=0;y<m.length;++y)h.push(m.charCodeAt(y)&255);return h}function b0(m,h){for(var y,x,T,B=[],L=0;L<m.length&&!((h-=2)<0);++L)y=m.charCodeAt(L),x=y>>8,T=y%256,B.push(T),B.push(x);return B}function mu(m){return F(Hn(m))}function $s(m,h,y,x){for(var T=0;T<x&&!(T+y>=h.length||T>=m.length);++T)h[T+y]=m[T];return T}function vu(m){return m!==m}function yu(m){return m!=null&&(!!m._isBuffer||zs(m)||w0(m))}function zs(m){return!!m.constructor&&typeof m.constructor.isBuffer=="function"&&m.constructor.isBuffer(m)}function w0(m){return typeof m.readFloatLE=="function"&&typeof m.slice=="function"&&zs(m.slice(0,0))}function bu(){throw new Error("setTimeout has not been defined")}function wu(){throw new Error("clearTimeout has not been defined")}var dr=bu,Dr=wu;typeof S.setTimeout=="function"&&(dr=setTimeout),typeof S.clearTimeout=="function"&&(Dr=clearTimeout);function _u(m){if(dr===setTimeout)return setTimeout(m,0);if((dr===bu||!dr)&&setTimeout)return dr=setTimeout,setTimeout(m,0);try{return dr(m,0)}catch(h){try{return dr.call(null,m,0)}catch(y){return dr.call(this,m,0)}}}function _0(m){if(Dr===clearTimeout)return clearTimeout(m);if((Dr===wu||!Dr)&&clearTimeout)return Dr=clearTimeout,clearTimeout(m);try{return Dr(m)}catch(h){try{return Dr.call(null,m)}catch(y){return Dr.call(this,m)}}}var ur=[],Z=!1,ue,$e=-1;function Ve(){!Z||!ue||(Z=!1,ue.length?ur=ue.concat(ur):$e=-1,ur.length&&fr())}function fr(){if(!Z){var m=_u(Ve);Z=!0;for(var h=ur.length;h;){for(ue=ur,ur=[];++$e<h;)ue&&ue[$e].run();$e=-1,h=ur.length}ue=null,Z=!1,_0(m)}}function Bt(m){var h=new Array(arguments.length-1);if(arguments.length>1)for(var y=1;y<arguments.length;y++)h[y-1]=arguments[y];ur.push(new ko(m,h)),ur.length===1&&!Z&&_u(fr)}function ko(m,h){this.fun=m,this.array=h}ko.prototype.run=function(){this.fun.apply(null,this.array)};var Sn=S.performance||{};Sn.now||Sn.mozNow||Sn.msNow||Sn.oNow||Sn.webkitNow;var dn;typeof Object.create=="function"?dn=function(h,y){h.super_=y,h.prototype=Object.create(y.prototype,{constructor:{value:h,enumerable:!1,writable:!0,configurable:!0}})}:dn=function(h,y){h.super_=y;var x=function(){};x.prototype=y.prototype,h.prototype=new x,h.prototype.constructor=h};var ci=dn,Hne=/%[sdj%]/g;function Gne(m){if(!k0(m)){for(var h=[],y=0;y<arguments.length;y++)h.push(Fi(arguments[y]));return h.join(" ")}for(var y=1,x=arguments,T=x.length,B=String(m).replace(Hne,function(X){if(X==="%%")return"%";if(y>=T)return X;switch(X){case"%s":return String(x[y++]);case"%d":return Number(x[y++]);case"%j":try{return JSON.stringify(x[y++])}catch(se){return"[Circular]"}default:return X}}),L=x[y];y<T;L=x[++y])x0(L)||!_l(L)?B+=" "+L:B+=" "+Fi(L);return B}function f5(m,h){if($i(S.process))return function(){return f5(m,h).apply(this,arguments)};var y=!1;function x(){return y||(console.error(h),y=!0),m.apply(this,arguments)}return x}var Cu={},C0;function Wne(m){if($i(C0)&&(C0=""),m=m.toUpperCase(),!Cu[m])if(new RegExp("\\b"+m+"\\b","i").test(C0)){var h=0;Cu[m]=function(){var y=Gne.apply(null,arguments);console.error("%s %d: %s",m,h,y)}}else Cu[m]=function(){};return Cu[m]}function Fi(m,h){var y={seen:[],stylize:Yne};return arguments.length>=3&&(y.depth=arguments[2]),arguments.length>=4&&(y.colors=arguments[3]),h5(h)?y.showHidden=h:h&&tre(y,h),$i(y.showHidden)&&(y.showHidden=!1),$i(y.depth)&&(y.depth=2),$i(y.colors)&&(y.colors=!1),$i(y.customInspect)&&(y.customInspect=!0),y.colors&&(y.stylize=Kne),Su(y,m,y.depth)}Fi.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},Fi.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"};function Kne(m,h){var y=Fi.styles[h];return y?"\x1B["+Fi.colors[y][0]+"m"+m+"\x1B["+Fi.colors[y][1]+"m":m}function Yne(m,h){return m}function Jne(m){var h={};return m.forEach(function(y,x){h[y]=!0}),h}function Su(m,h,y){if(m.customInspect&&h&&A0(h.inspect)&&h.inspect!==Fi&&!(h.constructor&&h.constructor.prototype===h)){var x=h.inspect(y,m);return k0(x)||(x=Su(m,x,y)),x}var T=Xne(m,h);if(T)return T;var B=Object.keys(h),L=Jne(B);if(m.showHidden&&(B=Object.getOwnPropertyNames(h)),T0(h)&&(B.indexOf("message")>=0||B.indexOf("description")>=0))return S0(h);if(B.length===0){if(A0(h)){var X=h.name?": "+h.name:"";return m.stylize("[Function"+X+"]","special")}if(N0(h))return m.stylize(RegExp.prototype.toString.call(h),"regexp");if(p5(h))return m.stylize(Date.prototype.toString.call(h),"date");if(T0(h))return S0(h)}var se="",pe=!1,me=["{","}"];if(Vne(h)&&(pe=!0,me=["[","]"]),A0(h)){var we=h.name?": "+h.name:"";se=" [Function"+we+"]"}if(N0(h)&&(se=" "+RegExp.prototype.toString.call(h)),p5(h)&&(se=" "+Date.prototype.toUTCString.call(h)),T0(h)&&(se=" "+S0(h)),B.length===0&&(!pe||h.length==0))return me[0]+se+me[1];if(y<0)return N0(h)?m.stylize(RegExp.prototype.toString.call(h),"regexp"):m.stylize("[Object]","special");m.seen.push(h);var ut;return pe?ut=Qne(m,h,y,L,B):ut=B.map(function(Qe){return E0(m,h,y,L,Qe,pe)}),m.seen.pop(),Zne(ut,se,me)}function Xne(m,h){if($i(h))return m.stylize("undefined","undefined");if(k0(h)){var y="'"+JSON.stringify(h).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return m.stylize(y,"string")}if(ere(h))return m.stylize(""+h,"number");if(h5(h))return m.stylize(""+h,"boolean");if(x0(h))return m.stylize("null","null")}function S0(m){return"["+Error.prototype.toString.call(m)+"]"}function Qne(m,h,y,x,T){for(var B=[],L=0,X=h.length;L<X;++L)g5(h,String(L))?B.push(E0(m,h,y,x,String(L),!0)):B.push("");return T.forEach(function(se){se.match(/^\d+$/)||B.push(E0(m,h,y,x,se,!0))}),B}function E0(m,h,y,x,T,B){var L,X,se;if(se=Object.getOwnPropertyDescriptor(h,T)||{value:h[T]},se.get?se.set?X=m.stylize("[Getter/Setter]","special"):X=m.stylize("[Getter]","special"):se.set&&(X=m.stylize("[Setter]","special")),g5(x,T)||(L="["+T+"]"),X||(m.seen.indexOf(se.value)<0?(x0(y)?X=Su(m,se.value,null):X=Su(m,se.value,y-1),X.indexOf(`
|
|
107
|
+
`);n.map(r=>{if(r!==""){const s={type:this.formInline.type,id:this.formInline.type==="nodeType"?r+new Date().getTime():r,name:r};ve(this,"addNodes",{node:s,type:e,connectNode:this.connectNode})}}),setTimeout(()=>{this.$parent.$parent.handleTableSelect(n)},500),this.hide()}})}},emits:["addNodes"]},dU={class:"dialog-footer"};function uU(e,t,n,r,s,a){const l=vc,c=mc,u=Wf,d=mi,f=Gf,p=no,g=xa;return o.openBlock(),o.createBlock(g,{title:a.title,modelValue:s.dialogFormVisible,"onUpdate:modelValue":t[4]||(t[4]=v=>s.dialogFormVisible=v),"append-to-body":"",class:"add-node-dialog el-dialog-graph"},{footer:o.withCtx(()=>[o.createElementVNode("div",dU,[o.createVNode(p,{onClick:a.hide},{default:o.withCtx(()=>t[5]||(t[5]=[o.createTextVNode("取 消")])),_:1},8,["onClick"]),o.createVNode(p,{class:"search-button",type:"primary",disabled:a.disableSearch,onClick:a.handleSearch},{default:o.withCtx(()=>t[6]||(t[6]=[o.createTextVNode(" 添加并拓线 ")])),_:1},8,["disabled","onClick"]),o.createVNode(p,{class:"search-button",type:"primary",disabled:a.disableSearchDiy,onClick:t[3]||(t[3]=v=>a.handleSearch("diy"))},{default:o.withCtx(()=>t[7]||(t[7]=[o.createTextVNode(" 添加单节点 ")])),_:1},8,["disabled"])])]),default:o.withCtx(()=>[o.createVNode(f,{ref:"form",inline:!0,rules:s.rules,model:s.formInline,class:"demo-form-inline"},{default:o.withCtx(()=>[o.createVNode(u,{label:"类型",prop:"type"},{default:o.withCtx(()=>[o.createVNode(c,{modelValue:s.formInline.type,"onUpdate:modelValue":t[0]||(t[0]=v=>s.formInline.type=v),class:"type-item"},{default:o.withCtx(()=>[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(a.nodesTypeAll,v=>(o.openBlock(),o.createBlock(l,{key:v.value,label:v.namec,value:v.name},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])]),_:1}),o.createVNode(u,{label:"内容",prop:"inputValues"},{default:o.withCtx(()=>[n.addType==="moreDiy"?(o.openBlock(),o.createBlock(d,{key:0,modelValue:s.formInline.inputValues,"onUpdate:modelValue":t[1]||(t[1]=v=>s.formInline.inputValues=v),type:"textarea",class:"search-content value-item",rows:5,placeholder:a.placeholder},null,8,["modelValue","placeholder"])):(o.openBlock(),o.createBlock(d,{key:1,modelValue:s.formInline.inputValues,"onUpdate:modelValue":t[2]||(t[2]=v=>s.formInline.inputValues=v),class:"search-content value-item",rows:5,placeholder:a.placeholder},null,8,["modelValue","placeholder"]))]),_:1})]),_:1},8,["rules","model"])]),_:1},8,["title","modelValue"])}const fU=_t(cU,[["render",uU],["__scopeId","data-v-0a421783"]]),xse="",kse="",hU={props:{nodesType:{type:Array,default:()=>[]},addType:{type:String,default:"diy"}},data(){var e=(t,n,r)=>{switch(n=n.toLowerCase(),this.formInline.type){case"ip":pw(n)?r():r(new Error("请输入正确格式的内容"));break;case"domain":gw(n)?r():r(new Error("请输入正确格式的内容"));break;case"url":mw(n)?r():r(new Error("请输入正确格式的内容"));break;default:ap(n)?r():r(new Error("请输入正确格式的内容"));break}};return{dialogFormVisible:!1,connectNode:null,formInline:{inputValues:"",type:""},rules:{inputValues:[{validator:e,trigger:"blur"}]}}},computed:{disableSearch(){return this.formInline.inputValues===""||this.formInline.type===""},title(){return"添加关联"}},methods:{show(e){this.connectNode=null,this.formInline.inputValues="",this.formInline.type="",this.dialogFormVisible=!0,this.connectNode=e},hide(){this.dialogFormVisible=!1},handleSearch(e="search"){this.$refs.form.validate(t=>{if(t){const n=this.formInline.inputValues.toLowerCase(),r={type:this.formInline.type,id:n,name:n};ve(this,"addNodes",{node:r,type:e,connectNode:this.connectNode}),this.hide()}})}},emits:["addNodes"]},pU={class:"dialog-footer"};function gU(e,t,n,r,s,a){const l=vc,c=mc,u=Wf,d=mi,f=Gf,p=no,g=xa;return o.openBlock(),o.createBlock(g,{title:a.title,modelValue:s.dialogFormVisible,"onUpdate:modelValue":t[4]||(t[4]=v=>s.dialogFormVisible=v),class:"add-node-dialog el-dialog-graph"},{footer:o.withCtx(()=>[o.createElementVNode("div",pU,[o.createVNode(p,{onClick:t[2]||(t[2]=v=>s.dialogFormVisible=!1)},{default:o.withCtx(()=>t[5]||(t[5]=[o.createTextVNode("取 消")])),_:1}),n.addType==="search"?(o.openBlock(),o.createBlock(p,{key:0,class:"search-button",type:"primary",disabled:a.disableSearch,size:"mini",onClick:a.handleSearch},{default:o.withCtx(()=>t[6]||(t[6]=[o.createTextVNode(" 查询 ")])),_:1},8,["disabled","onClick"])):(o.openBlock(),o.createBlock(p,{key:1,class:"search-button",type:"primary",disabled:a.disableSearch,size:"mini",onClick:t[3]||(t[3]=v=>a.handleSearch("diy"))},{default:o.withCtx(()=>t[7]||(t[7]=[o.createTextVNode(" 自定义添加 ")])),_:1},8,["disabled"]))])]),default:o.withCtx(()=>[o.createVNode(f,{ref:"form",inline:!0,rules:s.rules,model:s.formInline,class:"demo-form-inline"},{default:o.withCtx(()=>[o.createVNode(u,{label:"类型",prop:"type"},{default:o.withCtx(()=>[o.createVNode(c,{modelValue:s.formInline.type,"onUpdate:modelValue":t[0]||(t[0]=v=>s.formInline.type=v),class:"type-item"},{default:o.withCtx(()=>[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(n.nodesType,v=>(o.openBlock(),o.createBlock(l,{key:v.value,label:v.namec,value:v.name},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])]),_:1}),o.createVNode(u,{label:"内容",prop:"inputValues"},{default:o.withCtx(()=>[o.createVNode(d,{modelValue:s.formInline.inputValues,"onUpdate:modelValue":t[1]||(t[1]=v=>s.formInline.inputValues=v),class:"search-content value-item",rows:5,placeholder:"请输入查询内容"},null,8,["modelValue"])]),_:1})]),_:1},8,["rules","model"])]),_:1},8,["title","modelValue"])}const mU=_t(hU,[["render",gU],["__scopeId","data-v-baba7d6e"]]),Nse="",vU={name:"Intro",components:{QuestionFilled:S1},mixins:[],props:{config:{type:Object,default:()=>{}}},data(){return{ctrlKey:es()?"command":"Ctrl",shiftKey:es()?"⇧":"Shift",altKey:"Alt",system:["修改备注 - 即给该节点新增自定义备注","复制 - 复制节点名称","解除固定/固定节点 - 切换节点状态,控制节点自动排布或者位置不动","收藏/取消收藏 - 切换节点收藏状态,收藏后会有红色点在节点上方","显示/隐藏名称 - 节点下方显示/隐藏名称 ","显示/隐藏备注 - 节点下方显示/隐藏备注 ","单边子顶点聚合 - 将无孙子节点的子节点收起,形成一个聚合节点","聚合顶点释放 - 将已聚合的顶点释放"],rightList:["点击眼睛开关按钮可以显示隐藏该条数据","点击折叠按钮可以折叠下方所属列表","点击关联列表里面每一个子节点名字可以选中该节点","在右侧搜素框内可以搜索对应的子节点","点击右侧关联列表上方蓝色关系名称可以进行拓线操作"]}},computed:{keyCodes(){return es()?[{key:"双击节点,可拓线该节点所有关联数据",val:""},{key:"添加关系线",val:this.ctrlKey+" + 节点拖动",tips:"节点和关系节点间"},{key:"多选节点",val:this.shiftKey+" + 节点点击"},{key:"矩形多选",val:this.altKey+" + 鼠标圈定"},{key:"撤销",val:this.ctrlKey+" + z"},{key:"恢复",val:this.ctrlKey+" + "+this.shiftKey+" + z"}]:[{key:"双击节点,可拓线该节点所有关联数据",val:""},{key:"添加关系线",val:this.ctrlKey+" + 节点拖动",tips:"节点和关系节点间"},{key:"多选节点",val:this.shiftKey+" + 节点点击"},{key:"矩形多选",val:this.altKey+" + 鼠标圈定"},{key:"撤销",val:this.ctrlKey+" + z"},{key:"恢复",val:this.ctrlKey+" + y"}]}},watch:{config:{handler:function(e,t){this.addGoDetail()},deep:!0,immediate:!0}},created(){},mounted(){},updated(){},beforeUnmount(){},methods:{addGoDetail(){var e;(e=this.config)!=null&&e.jumpDetail&&this.system.push("详情页查看 - 打开对应的详情页查看详细内容")}}},yU={class:"intro-container"},bU={class:"key"},wU={class:"val"};function _U(e,t,n,r,s,a){const l=o.resolveComponent("QuestionFilled"),c=Ye,u=gn;return o.openBlock(),o.createElementBlock("div",yU,[t[0]||(t[0]=o.createElementVNode("p",{class:"title"},"快捷操作",-1)),t[1]||(t[1]=o.createElementVNode("p",{class:"line"},null,-1)),(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(a.keyCodes,(d,f)=>(o.openBlock(),o.createElementBlock("p",{key:f},[o.createElementVNode("span",bU,o.toDisplayString(d.key),1),o.createElementVNode("span",wU,[o.createTextVNode(o.toDisplayString(d.val)+" ",1),d.tips?(o.openBlock(),o.createBlock(u,{key:0,content:d.tips,"popper-class":"el-tooltip-gray",placement:"top"},{default:o.withCtx(()=>[o.createVNode(c,null,{default:o.withCtx(()=>[o.createVNode(l)]),_:1})]),_:2},1032,["content"])):o.createCommentVNode("",!0)])]))),128))])}const CU=_t(vU,[["render",_U]]);var lp={exports:{}};(function(e,t){(function(n,r){r(t)})(wi,function(n){var r;function s(){}s.prototype=Object.create(null);function a(){a.init.call(this)}a.EventEmitter=a,a.usingDomains=!1,a.prototype.domain=void 0,a.prototype._events=void 0,a.prototype._maxListeners=void 0,a.defaultMaxListeners=10,a.init=function(){this.domain=null,a.usingDomains&&r.active,(!this._events||this._events===Object.getPrototypeOf(this)._events)&&(this._events=new s,this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},a.prototype.setMaxListeners=function(h){if(typeof h!="number"||h<0||isNaN(h))throw new TypeError('"n" argument must be a positive number');return this._maxListeners=h,this};function l(m){return m._maxListeners===void 0?a.defaultMaxListeners:m._maxListeners}a.prototype.getMaxListeners=function(){return l(this)};function c(m,h,y){if(h)m.call(y);else for(var x=m.length,T=C(m,x),B=0;B<x;++B)T[B].call(y)}function u(m,h,y,x){if(h)m.call(y,x);else for(var T=m.length,B=C(m,T),L=0;L<T;++L)B[L].call(y,x)}function d(m,h,y,x,T){if(h)m.call(y,x,T);else for(var B=m.length,L=C(m,B),X=0;X<B;++X)L[X].call(y,x,T)}function f(m,h,y,x,T,B){if(h)m.call(y,x,T,B);else for(var L=m.length,X=C(m,L),se=0;se<L;++se)X[se].call(y,x,T,B)}function p(m,h,y,x){if(h)m.apply(y,x);else for(var T=m.length,B=C(m,T),L=0;L<T;++L)B[L].apply(y,x)}a.prototype.emit=function(h){var y,x,T,B,L,X,se,pe=h==="error";if(X=this._events,X)pe=pe&&X.error==null;else if(!pe)return!1;if(se=this.domain,pe){if(y=arguments[1],se)y||(y=new Error('Uncaught, unspecified "error" event')),y.domainEmitter=this,y.domain=se,y.domainThrown=!1,se.emit("error",y);else{if(y instanceof Error)throw y;var me=new Error('Uncaught, unspecified "error" event. ('+y+")");throw me.context=y,me}return!1}if(x=X[h],!x)return!1;var we=typeof x=="function";switch(T=arguments.length,T){case 1:c(x,we,this);break;case 2:u(x,we,this,arguments[1]);break;case 3:d(x,we,this,arguments[1],arguments[2]);break;case 4:f(x,we,this,arguments[1],arguments[2],arguments[3]);break;default:for(B=new Array(T-1),L=1;L<T;L++)B[L-1]=arguments[L];p(x,we,this,B)}return!0};function g(m,h,y,x){var T,B,L;if(typeof y!="function")throw new TypeError('"listener" argument must be a function');if(B=m._events,B?(B.newListener&&(m.emit("newListener",h,y.listener?y.listener:y),B=m._events),L=B[h]):(B=m._events=new s,m._eventsCount=0),!L)L=B[h]=y,++m._eventsCount;else if(typeof L=="function"?L=B[h]=x?[y,L]:[L,y]:x?L.unshift(y):L.push(y),!L.warned&&(T=l(m),T&&T>0&&L.length>T)){L.warned=!0;var X=new Error("Possible EventEmitter memory leak detected. "+L.length+" "+h+" listeners added. Use emitter.setMaxListeners() to increase limit");X.name="MaxListenersExceededWarning",X.emitter=m,X.type=h,X.count=L.length,v(X)}return m}function v(m){typeof console.warn=="function"?console.warn(m):console.log(m)}a.prototype.addListener=function(h,y){return g(this,h,y,!1)},a.prototype.on=a.prototype.addListener,a.prototype.prependListener=function(h,y){return g(this,h,y,!0)};function b(m,h,y){var x=!1;function T(){m.removeListener(h,T),x||(x=!0,y.apply(m,arguments))}return T.listener=y,T}a.prototype.once=function(h,y){if(typeof y!="function")throw new TypeError('"listener" argument must be a function');return this.on(h,b(this,h,y)),this},a.prototype.prependOnceListener=function(h,y){if(typeof y!="function")throw new TypeError('"listener" argument must be a function');return this.prependListener(h,b(this,h,y)),this},a.prototype.removeListener=function(h,y){var x,T,B,L,X;if(typeof y!="function")throw new TypeError('"listener" argument must be a function');if(T=this._events,!T)return this;if(x=T[h],!x)return this;if(x===y||x.listener&&x.listener===y)--this._eventsCount===0?this._events=new s:(delete T[h],T.removeListener&&this.emit("removeListener",h,x.listener||y));else if(typeof x!="function"){for(B=-1,L=x.length;L-- >0;)if(x[L]===y||x[L].listener&&x[L].listener===y){X=x[L].listener,B=L;break}if(B<0)return this;if(x.length===1){if(x[0]=void 0,--this._eventsCount===0)return this._events=new s,this;delete T[h]}else _(x,B);T.removeListener&&this.emit("removeListener",h,X||y)}return this},a.prototype.removeAllListeners=function(h){var y,x;if(x=this._events,!x)return this;if(!x.removeListener)return arguments.length===0?(this._events=new s,this._eventsCount=0):x[h]&&(--this._eventsCount===0?this._events=new s:delete x[h]),this;if(arguments.length===0){for(var T=Object.keys(x),B=0,L;B<T.length;++B)L=T[B],L!=="removeListener"&&this.removeAllListeners(L);return this.removeAllListeners("removeListener"),this._events=new s,this._eventsCount=0,this}if(y=x[h],typeof y=="function")this.removeListener(h,y);else if(y)do this.removeListener(h,y[y.length-1]);while(y[0]);return this},a.prototype.listeners=function(h){var y,x,T=this._events;return T?(y=T[h],y?typeof y=="function"?x=[y.listener||y]:x=k(y):x=[]):x=[],x},a.listenerCount=function(m,h){return typeof m.listenerCount=="function"?m.listenerCount(h):w.call(m,h)},a.prototype.listenerCount=w;function w(m){var h=this._events;if(h){var y=h[m];if(typeof y=="function")return 1;if(y)return y.length}return 0}a.prototype.eventNames=function(){return this._eventsCount>0?Reflect.ownKeys(this._events):[]};function _(m,h){for(var y=h,x=y+1,T=m.length;x<T;y+=1,x+=1)m[y]=m[x];m.pop()}function C(m,h){for(var y=new Array(h);h--;)y[h]=m[h];return y}function k(m){for(var h=new Array(m.length),y=0;y<h.length;++y)h[y]=m[y].listener||m[y];return h}var S=typeof wi!="undefined"?wi:typeof self!="undefined"?self:typeof window!="undefined"?window:{},E=[],N=[],A=typeof Uint8Array!="undefined"?Uint8Array:Array,I=!1;function O(){I=!0;for(var m="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",h=0,y=m.length;h<y;++h)E[h]=m[h],N[m.charCodeAt(h)]=h;N["-".charCodeAt(0)]=62,N["_".charCodeAt(0)]=63}function F(m){I||O();var h,y,x,T,B,L,X=m.length;if(X%4>0)throw new Error("Invalid string. Length must be a multiple of 4");B=m[X-2]==="="?2:m[X-1]==="="?1:0,L=new A(X*3/4-B),x=B>0?X-4:X;var se=0;for(h=0,y=0;h<x;h+=4,y+=3)T=N[m.charCodeAt(h)]<<18|N[m.charCodeAt(h+1)]<<12|N[m.charCodeAt(h+2)]<<6|N[m.charCodeAt(h+3)],L[se++]=T>>16&255,L[se++]=T>>8&255,L[se++]=T&255;return B===2?(T=N[m.charCodeAt(h)]<<2|N[m.charCodeAt(h+1)]>>4,L[se++]=T&255):B===1&&(T=N[m.charCodeAt(h)]<<10|N[m.charCodeAt(h+1)]<<4|N[m.charCodeAt(h+2)]>>2,L[se++]=T>>8&255,L[se++]=T&255),L}function P(m){return E[m>>18&63]+E[m>>12&63]+E[m>>6&63]+E[m&63]}function M(m,h,y){for(var x,T=[],B=h;B<y;B+=3)x=(m[B]<<16)+(m[B+1]<<8)+m[B+2],T.push(P(x));return T.join("")}function W(m){I||O();for(var h,y=m.length,x=y%3,T="",B=[],L=16383,X=0,se=y-x;X<se;X+=L)B.push(M(m,X,X+L>se?se:X+L));return x===1?(h=m[y-1],T+=E[h>>2],T+=E[h<<4&63],T+="=="):x===2&&(h=(m[y-2]<<8)+m[y-1],T+=E[h>>10],T+=E[h>>4&63],T+=E[h<<2&63],T+="="),B.push(T),B.join("")}function U(m,h,y,x,T){var B,L,X=T*8-x-1,se=(1<<X)-1,pe=se>>1,me=-7,we=y?T-1:0,ut=y?-1:1,Qe=m[h+we];for(we+=ut,B=Qe&(1<<-me)-1,Qe>>=-me,me+=X;me>0;B=B*256+m[h+we],we+=ut,me-=8);for(L=B&(1<<-me)-1,B>>=-me,me+=x;me>0;L=L*256+m[h+we],we+=ut,me-=8);if(B===0)B=1-pe;else{if(B===se)return L?NaN:(Qe?-1:1)*(1/0);L=L+Math.pow(2,x),B=B-pe}return(Qe?-1:1)*L*Math.pow(2,B-x)}function Q(m,h,y,x,T,B){var L,X,se,pe=B*8-T-1,me=(1<<pe)-1,we=me>>1,ut=T===23?Math.pow(2,-24)-Math.pow(2,-77):0,Qe=x?0:B-1,Fr=x?1:-1,xl=h<0||h===0&&1/h<0?1:0;for(h=Math.abs(h),isNaN(h)||h===1/0?(X=isNaN(h)?1:0,L=me):(L=Math.floor(Math.log(h)/Math.LN2),h*(se=Math.pow(2,-L))<1&&(L--,se*=2),L+we>=1?h+=ut/se:h+=ut*Math.pow(2,1-we),h*se>=2&&(L++,se/=2),L+we>=me?(X=0,L=me):L+we>=1?(X=(h*se-1)*Math.pow(2,T),L=L+we):(X=h*Math.pow(2,we-1)*Math.pow(2,T),L=0));T>=8;m[y+Qe]=X&255,Qe+=Fr,X/=256,T-=8);for(L=L<<T|X,pe+=T;pe>0;m[y+Qe]=L&255,Qe+=Fr,L/=256,pe-=8);m[y+Qe-Fr]|=xl*128}var q={}.toString,D=Array.isArray||function(m){return q.call(m)=="[object Array]"},j=50;R.TYPED_ARRAY_SUPPORT=S.TYPED_ARRAY_SUPPORT!==void 0?S.TYPED_ARRAY_SUPPORT:!0;function K(){return R.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function H(m,h){if(K()<h)throw new RangeError("Invalid typed array length");return R.TYPED_ARRAY_SUPPORT?(m=new Uint8Array(h),m.__proto__=R.prototype):(m===null&&(m=new R(h)),m.length=h),m}function R(m,h,y){if(!R.TYPED_ARRAY_SUPPORT&&!(this instanceof R))return new R(m,h,y);if(typeof m=="number"){if(typeof h=="string")throw new Error("If encoding is specified then the first argument must be a string");return J(this,m)}return ie(this,m,h,y)}R.poolSize=8192,R._augment=function(m){return m.__proto__=R.prototype,m};function ie(m,h,y,x){if(typeof h=="number")throw new TypeError('"value" argument must not be a number');return typeof ArrayBuffer!="undefined"&&h instanceof ArrayBuffer?z(m,h,y,x):typeof h=="string"?oe(m,h,y):G(m,h)}R.from=function(m,h,y){return ie(null,m,h,y)},R.TYPED_ARRAY_SUPPORT&&(R.prototype.__proto__=Uint8Array.prototype,R.__proto__=Uint8Array);function ee(m){if(typeof m!="number")throw new TypeError('"size" argument must be a number');if(m<0)throw new RangeError('"size" argument must not be negative')}function Y(m,h,y,x){return ee(h),h<=0?H(m,h):y!==void 0?typeof x=="string"?H(m,h).fill(y,x):H(m,h).fill(y):H(m,h)}R.alloc=function(m,h,y){return Y(null,m,h,y)};function J(m,h){if(ee(h),m=H(m,h<0?0:te(h)|0),!R.TYPED_ARRAY_SUPPORT)for(var y=0;y<h;++y)m[y]=0;return m}R.allocUnsafe=function(m){return J(null,m)},R.allocUnsafeSlow=function(m){return J(null,m)};function oe(m,h,y){if((typeof y!="string"||y==="")&&(y="utf8"),!R.isEncoding(y))throw new TypeError('"encoding" must be a valid string encoding');var x=de(h,y)|0;m=H(m,x);var T=m.write(h,y);return T!==x&&(m=m.slice(0,T)),m}function re(m,h){var y=h.length<0?0:te(h.length)|0;m=H(m,y);for(var x=0;x<y;x+=1)m[x]=h[x]&255;return m}function z(m,h,y,x){if(h.byteLength,y<0||h.byteLength<y)throw new RangeError("'offset' is out of bounds");if(h.byteLength<y+(x||0))throw new RangeError("'length' is out of bounds");return y===void 0&&x===void 0?h=new Uint8Array(h):x===void 0?h=new Uint8Array(h,y):h=new Uint8Array(h,y,x),R.TYPED_ARRAY_SUPPORT?(m=h,m.__proto__=R.prototype):m=re(m,h),m}function G(m,h){if(le(h)){var y=te(h.length)|0;return m=H(m,y),m.length===0||h.copy(m,0,0,y),m}if(h){if(typeof ArrayBuffer!="undefined"&&h.buffer instanceof ArrayBuffer||"length"in h)return typeof h.length!="number"||vu(h.length)?H(m,0):re(m,h);if(h.type==="Buffer"&&D(h.data))return re(m,h.data)}throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}function te(m){if(m>=K())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+K().toString(16)+" bytes");return m|0}R.isBuffer=yu;function le(m){return!!(m!=null&&m._isBuffer)}R.compare=function(h,y){if(!le(h)||!le(y))throw new TypeError("Arguments must be Buffers");if(h===y)return 0;for(var x=h.length,T=y.length,B=0,L=Math.min(x,T);B<L;++B)if(h[B]!==y[B]){x=h[B],T=y[B];break}return x<T?-1:T<x?1:0},R.isEncoding=function(h){switch(String(h).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},R.concat=function(h,y){if(!D(h))throw new TypeError('"list" argument must be an Array of Buffers');if(h.length===0)return R.alloc(0);var x;if(y===void 0)for(y=0,x=0;x<h.length;++x)y+=h[x].length;var T=R.allocUnsafe(y),B=0;for(x=0;x<h.length;++x){var L=h[x];if(!le(L))throw new TypeError('"list" argument must be an Array of Buffers');L.copy(T,B),B+=L.length}return T};function de(m,h){if(le(m))return m.length;if(typeof ArrayBuffer!="undefined"&&typeof ArrayBuffer.isView=="function"&&(ArrayBuffer.isView(m)||m instanceof ArrayBuffer))return m.byteLength;typeof m!="string"&&(m=""+m);var y=m.length;if(y===0)return 0;for(var x=!1;;)switch(h){case"ascii":case"latin1":case"binary":return y;case"utf8":case"utf-8":case void 0:return It(m).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return y*2;case"hex":return y>>>1;case"base64":return mu(m).length;default:if(x)return It(m).length;h=(""+h).toLowerCase(),x=!0}}R.byteLength=de;function ye(m,h,y){var x=!1;if((h===void 0||h<0)&&(h=0),h>this.length||((y===void 0||y>this.length)&&(y=this.length),y<=0)||(y>>>=0,h>>>=0,y<=h))return"";for(m||(m="utf8");;)switch(m){case"hex":return qn(this,h,y);case"utf8":case"utf-8":return Et(this,h,y);case"ascii":return Me(this,h,y);case"latin1":case"binary":return nt(this,h,y);case"base64":return Le(this,h,y);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return cr(this,h,y);default:if(x)throw new TypeError("Unknown encoding: "+m);m=(m+"").toLowerCase(),x=!0}}R.prototype._isBuffer=!0;function be(m,h,y){var x=m[h];m[h]=m[y],m[y]=x}R.prototype.swap16=function(){var h=this.length;if(h%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var y=0;y<h;y+=2)be(this,y,y+1);return this},R.prototype.swap32=function(){var h=this.length;if(h%4!==0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var y=0;y<h;y+=4)be(this,y,y+3),be(this,y+1,y+2);return this},R.prototype.swap64=function(){var h=this.length;if(h%8!==0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var y=0;y<h;y+=8)be(this,y,y+7),be(this,y+1,y+6),be(this,y+2,y+5),be(this,y+3,y+4);return this},R.prototype.toString=function(){var h=this.length|0;return h===0?"":arguments.length===0?Et(this,0,h):ye.apply(this,arguments)},R.prototype.equals=function(h){if(!le(h))throw new TypeError("Argument must be a Buffer");return this===h?!0:R.compare(this,h)===0},R.prototype.inspect=function(){var h="",y=j;return this.length>0&&(h=this.toString("hex",0,y).match(/.{2}/g).join(" "),this.length>y&&(h+=" ... ")),"<Buffer "+h+">"},R.prototype.compare=function(h,y,x,T,B){if(!le(h))throw new TypeError("Argument must be a Buffer");if(y===void 0&&(y=0),x===void 0&&(x=h?h.length:0),T===void 0&&(T=0),B===void 0&&(B=this.length),y<0||x>h.length||T<0||B>this.length)throw new RangeError("out of range index");if(T>=B&&y>=x)return 0;if(T>=B)return-1;if(y>=x)return 1;if(y>>>=0,x>>>=0,T>>>=0,B>>>=0,this===h)return 0;for(var L=B-T,X=x-y,se=Math.min(L,X),pe=this.slice(T,B),me=h.slice(y,x),we=0;we<se;++we)if(pe[we]!==me[we]){L=pe[we],X=me[we];break}return L<X?-1:X<L?1:0};function Se(m,h,y,x,T){if(m.length===0)return-1;if(typeof y=="string"?(x=y,y=0):y>2147483647?y=2147483647:y<-2147483648&&(y=-2147483648),y=+y,isNaN(y)&&(y=T?0:m.length-1),y<0&&(y=m.length+y),y>=m.length){if(T)return-1;y=m.length-1}else if(y<0)if(T)y=0;else return-1;if(typeof h=="string"&&(h=R.from(h,x)),le(h))return h.length===0?-1:Be(m,h,y,x,T);if(typeof h=="number")return h=h&255,R.TYPED_ARRAY_SUPPORT&&typeof Uint8Array.prototype.indexOf=="function"?T?Uint8Array.prototype.indexOf.call(m,h,y):Uint8Array.prototype.lastIndexOf.call(m,h,y):Be(m,[h],y,x,T);throw new TypeError("val must be string, number or Buffer")}function Be(m,h,y,x,T){var B=1,L=m.length,X=h.length;if(x!==void 0&&(x=String(x).toLowerCase(),x==="ucs2"||x==="ucs-2"||x==="utf16le"||x==="utf-16le")){if(m.length<2||h.length<2)return-1;B=2,L/=2,X/=2,y/=2}function se(Qe,Fr){return B===1?Qe[Fr]:Qe.readUInt16BE(Fr*B)}var pe;if(T){var me=-1;for(pe=y;pe<L;pe++)if(se(m,pe)===se(h,me===-1?0:pe-me)){if(me===-1&&(me=pe),pe-me+1===X)return me*B}else me!==-1&&(pe-=pe-me),me=-1}else for(y+X>L&&(y=L-X),pe=y;pe>=0;pe--){for(var we=!0,ut=0;ut<X;ut++)if(se(m,pe+ut)!==se(h,ut)){we=!1;break}if(we)return pe}return-1}R.prototype.includes=function(h,y,x){return this.indexOf(h,y,x)!==-1},R.prototype.indexOf=function(h,y,x){return Se(this,h,y,x,!0)},R.prototype.lastIndexOf=function(h,y,x){return Se(this,h,y,x,!1)};function tt(m,h,y,x){y=Number(y)||0;var T=m.length-y;x?(x=Number(x),x>T&&(x=T)):x=T;var B=h.length;if(B%2!==0)throw new TypeError("Invalid hex string");x>B/2&&(x=B/2);for(var L=0;L<x;++L){var X=parseInt(h.substr(L*2,2),16);if(isNaN(X))return L;m[y+L]=X}return L}function Ee(m,h,y,x){return $s(It(h,m.length-y),m,y,x)}function Te(m,h,y,x){return $s(Fs(h),m,y,x)}function ke(m,h,y,x){return Te(m,h,y,x)}function We(m,h,y,x){return $s(mu(h),m,y,x)}function gt(m,h,y,x){return $s(b0(h,m.length-y),m,y,x)}R.prototype.write=function(h,y,x,T){if(y===void 0)T="utf8",x=this.length,y=0;else if(x===void 0&&typeof y=="string")T=y,x=this.length,y=0;else if(isFinite(y))y=y|0,isFinite(x)?(x=x|0,T===void 0&&(T="utf8")):(T=x,x=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");var B=this.length-y;if((x===void 0||x>B)&&(x=B),h.length>0&&(x<0||y<0)||y>this.length)throw new RangeError("Attempt to write outside buffer bounds");T||(T="utf8");for(var L=!1;;)switch(T){case"hex":return tt(this,h,y,x);case"utf8":case"utf-8":return Ee(this,h,y,x);case"ascii":return Te(this,h,y,x);case"latin1":case"binary":return ke(this,h,y,x);case"base64":return We(this,h,y,x);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return gt(this,h,y,x);default:if(L)throw new TypeError("Unknown encoding: "+T);T=(""+T).toLowerCase(),L=!0}},R.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function Le(m,h,y){return h===0&&y===m.length?W(m):W(m.slice(h,y))}function Et(m,h,y){y=Math.min(m.length,y);for(var x=[],T=h;T<y;){var B=m[T],L=null,X=B>239?4:B>223?3:B>191?2:1;if(T+X<=y){var se,pe,me,we;switch(X){case 1:B<128&&(L=B);break;case 2:se=m[T+1],(se&192)===128&&(we=(B&31)<<6|se&63,we>127&&(L=we));break;case 3:se=m[T+1],pe=m[T+2],(se&192)===128&&(pe&192)===128&&(we=(B&15)<<12|(se&63)<<6|pe&63,we>2047&&(we<55296||we>57343)&&(L=we));break;case 4:se=m[T+1],pe=m[T+2],me=m[T+3],(se&192)===128&&(pe&192)===128&&(me&192)===128&&(we=(B&15)<<18|(se&63)<<12|(pe&63)<<6|me&63,we>65535&&we<1114112&&(L=we))}}L===null?(L=65533,X=1):L>65535&&(L-=65536,x.push(L>>>10&1023|55296),L=56320|L&1023),x.push(L),T+=X}return ae(x)}var ge=4096;function ae(m){var h=m.length;if(h<=ge)return String.fromCharCode.apply(String,m);for(var y="",x=0;x<h;)y+=String.fromCharCode.apply(String,m.slice(x,x+=ge));return y}function Me(m,h,y){var x="";y=Math.min(m.length,y);for(var T=h;T<y;++T)x+=String.fromCharCode(m[T]&127);return x}function nt(m,h,y){var x="";y=Math.min(m.length,y);for(var T=h;T<y;++T)x+=String.fromCharCode(m[T]);return x}function qn(m,h,y){var x=m.length;(!h||h<0)&&(h=0),(!y||y<0||y>x)&&(y=x);for(var T="",B=h;B<y;++B)T+=li(m[B]);return T}function cr(m,h,y){for(var x=m.slice(h,y),T="",B=0;B<x.length;B+=2)T+=String.fromCharCode(x[B]+x[B+1]*256);return T}R.prototype.slice=function(h,y){var x=this.length;h=~~h,y=y===void 0?x:~~y,h<0?(h+=x,h<0&&(h=0)):h>x&&(h=x),y<0?(y+=x,y<0&&(y=0)):y>x&&(y=x),y<h&&(y=h);var T;if(R.TYPED_ARRAY_SUPPORT)T=this.subarray(h,y),T.__proto__=R.prototype;else{var B=y-h;T=new R(B,void 0);for(var L=0;L<B;++L)T[L]=this[L+h]}return T};function xt(m,h,y){if(m%1!==0||m<0)throw new RangeError("offset is not uint");if(m+h>y)throw new RangeError("Trying to access beyond buffer length")}R.prototype.readUIntLE=function(h,y,x){h=h|0,y=y|0,x||xt(h,y,this.length);for(var T=this[h],B=1,L=0;++L<y&&(B*=256);)T+=this[h+L]*B;return T},R.prototype.readUIntBE=function(h,y,x){h=h|0,y=y|0,x||xt(h,y,this.length);for(var T=this[h+--y],B=1;y>0&&(B*=256);)T+=this[h+--y]*B;return T},R.prototype.readUInt8=function(h,y){return y||xt(h,1,this.length),this[h]},R.prototype.readUInt16LE=function(h,y){return y||xt(h,2,this.length),this[h]|this[h+1]<<8},R.prototype.readUInt16BE=function(h,y){return y||xt(h,2,this.length),this[h]<<8|this[h+1]},R.prototype.readUInt32LE=function(h,y){return y||xt(h,4,this.length),(this[h]|this[h+1]<<8|this[h+2]<<16)+this[h+3]*16777216},R.prototype.readUInt32BE=function(h,y){return y||xt(h,4,this.length),this[h]*16777216+(this[h+1]<<16|this[h+2]<<8|this[h+3])},R.prototype.readIntLE=function(h,y,x){h=h|0,y=y|0,x||xt(h,y,this.length);for(var T=this[h],B=1,L=0;++L<y&&(B*=256);)T+=this[h+L]*B;return B*=128,T>=B&&(T-=Math.pow(2,8*y)),T},R.prototype.readIntBE=function(h,y,x){h=h|0,y=y|0,x||xt(h,y,this.length);for(var T=y,B=1,L=this[h+--T];T>0&&(B*=256);)L+=this[h+--T]*B;return B*=128,L>=B&&(L-=Math.pow(2,8*y)),L},R.prototype.readInt8=function(h,y){return y||xt(h,1,this.length),this[h]&128?(255-this[h]+1)*-1:this[h]},R.prototype.readInt16LE=function(h,y){y||xt(h,2,this.length);var x=this[h]|this[h+1]<<8;return x&32768?x|4294901760:x},R.prototype.readInt16BE=function(h,y){y||xt(h,2,this.length);var x=this[h+1]|this[h]<<8;return x&32768?x|4294901760:x},R.prototype.readInt32LE=function(h,y){return y||xt(h,4,this.length),this[h]|this[h+1]<<8|this[h+2]<<16|this[h+3]<<24},R.prototype.readInt32BE=function(h,y){return y||xt(h,4,this.length),this[h]<<24|this[h+1]<<16|this[h+2]<<8|this[h+3]},R.prototype.readFloatLE=function(h,y){return y||xt(h,4,this.length),U(this,h,!0,23,4)},R.prototype.readFloatBE=function(h,y){return y||xt(h,4,this.length),U(this,h,!1,23,4)},R.prototype.readDoubleLE=function(h,y){return y||xt(h,8,this.length),U(this,h,!0,52,8)},R.prototype.readDoubleBE=function(h,y){return y||xt(h,8,this.length),U(this,h,!1,52,8)};function he(m,h,y,x,T,B){if(!le(m))throw new TypeError('"buffer" argument must be a Buffer instance');if(h>T||h<B)throw new RangeError('"value" argument is out of bounds');if(y+x>m.length)throw new RangeError("Index out of range")}R.prototype.writeUIntLE=function(h,y,x,T){if(h=+h,y=y|0,x=x|0,!T){var B=Math.pow(2,8*x)-1;he(this,h,y,x,B,0)}var L=1,X=0;for(this[y]=h&255;++X<x&&(L*=256);)this[y+X]=h/L&255;return y+x},R.prototype.writeUIntBE=function(h,y,x,T){if(h=+h,y=y|0,x=x|0,!T){var B=Math.pow(2,8*x)-1;he(this,h,y,x,B,0)}var L=x-1,X=1;for(this[y+L]=h&255;--L>=0&&(X*=256);)this[y+L]=h/X&255;return y+x},R.prototype.writeUInt8=function(h,y,x){return h=+h,y=y|0,x||he(this,h,y,1,255,0),R.TYPED_ARRAY_SUPPORT||(h=Math.floor(h)),this[y]=h&255,y+1};function Ce(m,h,y,x){h<0&&(h=65535+h+1);for(var T=0,B=Math.min(m.length-y,2);T<B;++T)m[y+T]=(h&255<<8*(x?T:1-T))>>>(x?T:1-T)*8}R.prototype.writeUInt16LE=function(h,y,x){return h=+h,y=y|0,x||he(this,h,y,2,65535,0),R.TYPED_ARRAY_SUPPORT?(this[y]=h&255,this[y+1]=h>>>8):Ce(this,h,y,!0),y+2},R.prototype.writeUInt16BE=function(h,y,x){return h=+h,y=y|0,x||he(this,h,y,2,65535,0),R.TYPED_ARRAY_SUPPORT?(this[y]=h>>>8,this[y+1]=h&255):Ce(this,h,y,!1),y+2};function Fe(m,h,y,x){h<0&&(h=4294967295+h+1);for(var T=0,B=Math.min(m.length-y,4);T<B;++T)m[y+T]=h>>>(x?T:3-T)*8&255}R.prototype.writeUInt32LE=function(h,y,x){return h=+h,y=y|0,x||he(this,h,y,4,4294967295,0),R.TYPED_ARRAY_SUPPORT?(this[y+3]=h>>>24,this[y+2]=h>>>16,this[y+1]=h>>>8,this[y]=h&255):Fe(this,h,y,!0),y+4},R.prototype.writeUInt32BE=function(h,y,x){return h=+h,y=y|0,x||he(this,h,y,4,4294967295,0),R.TYPED_ARRAY_SUPPORT?(this[y]=h>>>24,this[y+1]=h>>>16,this[y+2]=h>>>8,this[y+3]=h&255):Fe(this,h,y,!1),y+4},R.prototype.writeIntLE=function(h,y,x,T){if(h=+h,y=y|0,!T){var B=Math.pow(2,8*x-1);he(this,h,y,x,B-1,-B)}var L=0,X=1,se=0;for(this[y]=h&255;++L<x&&(X*=256);)h<0&&se===0&&this[y+L-1]!==0&&(se=1),this[y+L]=(h/X>>0)-se&255;return y+x},R.prototype.writeIntBE=function(h,y,x,T){if(h=+h,y=y|0,!T){var B=Math.pow(2,8*x-1);he(this,h,y,x,B-1,-B)}var L=x-1,X=1,se=0;for(this[y+L]=h&255;--L>=0&&(X*=256);)h<0&&se===0&&this[y+L+1]!==0&&(se=1),this[y+L]=(h/X>>0)-se&255;return y+x},R.prototype.writeInt8=function(h,y,x){return h=+h,y=y|0,x||he(this,h,y,1,127,-128),R.TYPED_ARRAY_SUPPORT||(h=Math.floor(h)),h<0&&(h=255+h+1),this[y]=h&255,y+1},R.prototype.writeInt16LE=function(h,y,x){return h=+h,y=y|0,x||he(this,h,y,2,32767,-32768),R.TYPED_ARRAY_SUPPORT?(this[y]=h&255,this[y+1]=h>>>8):Ce(this,h,y,!0),y+2},R.prototype.writeInt16BE=function(h,y,x){return h=+h,y=y|0,x||he(this,h,y,2,32767,-32768),R.TYPED_ARRAY_SUPPORT?(this[y]=h>>>8,this[y+1]=h&255):Ce(this,h,y,!1),y+2},R.prototype.writeInt32LE=function(h,y,x){return h=+h,y=y|0,x||he(this,h,y,4,2147483647,-2147483648),R.TYPED_ARRAY_SUPPORT?(this[y]=h&255,this[y+1]=h>>>8,this[y+2]=h>>>16,this[y+3]=h>>>24):Fe(this,h,y,!0),y+4},R.prototype.writeInt32BE=function(h,y,x){return h=+h,y=y|0,x||he(this,h,y,4,2147483647,-2147483648),h<0&&(h=4294967295+h+1),R.TYPED_ARRAY_SUPPORT?(this[y]=h>>>24,this[y+1]=h>>>16,this[y+2]=h>>>8,this[y+3]=h&255):Fe(this,h,y,!1),y+4};function Pe(m,h,y,x,T,B){if(y+x>m.length)throw new RangeError("Index out of range");if(y<0)throw new RangeError("Index out of range")}function He(m,h,y,x,T){return T||Pe(m,h,y,4),Q(m,h,y,x,23,4),y+4}R.prototype.writeFloatLE=function(h,y,x){return He(this,h,y,!0,x)},R.prototype.writeFloatBE=function(h,y,x){return He(this,h,y,!1,x)};function rt(m,h,y,x,T){return T||Pe(m,h,y,8),Q(m,h,y,x,52,8),y+8}R.prototype.writeDoubleLE=function(h,y,x){return rt(this,h,y,!0,x)},R.prototype.writeDoubleBE=function(h,y,x){return rt(this,h,y,!1,x)},R.prototype.copy=function(h,y,x,T){if(x||(x=0),!T&&T!==0&&(T=this.length),y>=h.length&&(y=h.length),y||(y=0),T>0&&T<x&&(T=x),T===x||h.length===0||this.length===0)return 0;if(y<0)throw new RangeError("targetStart out of bounds");if(x<0||x>=this.length)throw new RangeError("sourceStart out of bounds");if(T<0)throw new RangeError("sourceEnd out of bounds");T>this.length&&(T=this.length),h.length-y<T-x&&(T=h.length-y+x);var B=T-x,L;if(this===h&&x<y&&y<T)for(L=B-1;L>=0;--L)h[L+y]=this[L+x];else if(B<1e3||!R.TYPED_ARRAY_SUPPORT)for(L=0;L<B;++L)h[L+y]=this[L+x];else Uint8Array.prototype.set.call(h,this.subarray(x,x+B),y);return B},R.prototype.fill=function(h,y,x,T){if(typeof h=="string"){if(typeof y=="string"?(T=y,y=0,x=this.length):typeof x=="string"&&(T=x,x=this.length),h.length===1){var B=h.charCodeAt(0);B<256&&(h=B)}if(T!==void 0&&typeof T!="string")throw new TypeError("encoding must be a string");if(typeof T=="string"&&!R.isEncoding(T))throw new TypeError("Unknown encoding: "+T)}else typeof h=="number"&&(h=h&255);if(y<0||this.length<y||this.length<x)throw new RangeError("Out of range index");if(x<=y)return this;y=y>>>0,x=x===void 0?this.length:x>>>0,h||(h=0);var L;if(typeof h=="number")for(L=y;L<x;++L)this[L]=h;else{var X=le(h)?h:It(new R(h,T).toString()),se=X.length;for(L=0;L<x-y;++L)this[L+y]=X[L%se]}return this};var Kt=/[^+\/0-9A-Za-z-_]/g;function Hn(m){if(m=Cn(m).replace(Kt,""),m.length<2)return"";for(;m.length%4!==0;)m=m+"=";return m}function Cn(m){return m.trim?m.trim():m.replace(/^\s+|\s+$/g,"")}function li(m){return m<16?"0"+m.toString(16):m.toString(16)}function It(m,h){h=h||1/0;for(var y,x=m.length,T=null,B=[],L=0;L<x;++L){if(y=m.charCodeAt(L),y>55295&&y<57344){if(!T){if(y>56319){(h-=3)>-1&&B.push(239,191,189);continue}else if(L+1===x){(h-=3)>-1&&B.push(239,191,189);continue}T=y;continue}if(y<56320){(h-=3)>-1&&B.push(239,191,189),T=y;continue}y=(T-55296<<10|y-56320)+65536}else T&&(h-=3)>-1&&B.push(239,191,189);if(T=null,y<128){if((h-=1)<0)break;B.push(y)}else if(y<2048){if((h-=2)<0)break;B.push(y>>6|192,y&63|128)}else if(y<65536){if((h-=3)<0)break;B.push(y>>12|224,y>>6&63|128,y&63|128)}else if(y<1114112){if((h-=4)<0)break;B.push(y>>18|240,y>>12&63|128,y>>6&63|128,y&63|128)}else throw new Error("Invalid code point")}return B}function Fs(m){for(var h=[],y=0;y<m.length;++y)h.push(m.charCodeAt(y)&255);return h}function b0(m,h){for(var y,x,T,B=[],L=0;L<m.length&&!((h-=2)<0);++L)y=m.charCodeAt(L),x=y>>8,T=y%256,B.push(T),B.push(x);return B}function mu(m){return F(Hn(m))}function $s(m,h,y,x){for(var T=0;T<x&&!(T+y>=h.length||T>=m.length);++T)h[T+y]=m[T];return T}function vu(m){return m!==m}function yu(m){return m!=null&&(!!m._isBuffer||zs(m)||w0(m))}function zs(m){return!!m.constructor&&typeof m.constructor.isBuffer=="function"&&m.constructor.isBuffer(m)}function w0(m){return typeof m.readFloatLE=="function"&&typeof m.slice=="function"&&zs(m.slice(0,0))}function bu(){throw new Error("setTimeout has not been defined")}function wu(){throw new Error("clearTimeout has not been defined")}var dr=bu,Dr=wu;typeof S.setTimeout=="function"&&(dr=setTimeout),typeof S.clearTimeout=="function"&&(Dr=clearTimeout);function _u(m){if(dr===setTimeout)return setTimeout(m,0);if((dr===bu||!dr)&&setTimeout)return dr=setTimeout,setTimeout(m,0);try{return dr(m,0)}catch(h){try{return dr.call(null,m,0)}catch(y){return dr.call(this,m,0)}}}function _0(m){if(Dr===clearTimeout)return clearTimeout(m);if((Dr===wu||!Dr)&&clearTimeout)return Dr=clearTimeout,clearTimeout(m);try{return Dr(m)}catch(h){try{return Dr.call(null,m)}catch(y){return Dr.call(this,m)}}}var ur=[],Z=!1,ue,$e=-1;function Ve(){!Z||!ue||(Z=!1,ue.length?ur=ue.concat(ur):$e=-1,ur.length&&fr())}function fr(){if(!Z){var m=_u(Ve);Z=!0;for(var h=ur.length;h;){for(ue=ur,ur=[];++$e<h;)ue&&ue[$e].run();$e=-1,h=ur.length}ue=null,Z=!1,_0(m)}}function Bt(m){var h=new Array(arguments.length-1);if(arguments.length>1)for(var y=1;y<arguments.length;y++)h[y-1]=arguments[y];ur.push(new ko(m,h)),ur.length===1&&!Z&&_u(fr)}function ko(m,h){this.fun=m,this.array=h}ko.prototype.run=function(){this.fun.apply(null,this.array)};var Sn=S.performance||{};Sn.now||Sn.mozNow||Sn.msNow||Sn.oNow||Sn.webkitNow;var dn;typeof Object.create=="function"?dn=function(h,y){h.super_=y,h.prototype=Object.create(y.prototype,{constructor:{value:h,enumerable:!1,writable:!0,configurable:!0}})}:dn=function(h,y){h.super_=y;var x=function(){};x.prototype=y.prototype,h.prototype=new x,h.prototype.constructor=h};var ci=dn,Hne=/%[sdj%]/g;function Gne(m){if(!k0(m)){for(var h=[],y=0;y<arguments.length;y++)h.push(Fi(arguments[y]));return h.join(" ")}for(var y=1,x=arguments,T=x.length,B=String(m).replace(Hne,function(X){if(X==="%%")return"%";if(y>=T)return X;switch(X){case"%s":return String(x[y++]);case"%d":return Number(x[y++]);case"%j":try{return JSON.stringify(x[y++])}catch(se){return"[Circular]"}default:return X}}),L=x[y];y<T;L=x[++y])x0(L)||!_l(L)?B+=" "+L:B+=" "+Fi(L);return B}function f5(m,h){if($i(S.process))return function(){return f5(m,h).apply(this,arguments)};var y=!1;function x(){return y||(console.error(h),y=!0),m.apply(this,arguments)}return x}var Cu={},C0;function Wne(m){if($i(C0)&&(C0=""),m=m.toUpperCase(),!Cu[m])if(new RegExp("\\b"+m+"\\b","i").test(C0)){var h=0;Cu[m]=function(){var y=Gne.apply(null,arguments);console.error("%s %d: %s",m,h,y)}}else Cu[m]=function(){};return Cu[m]}function Fi(m,h){var y={seen:[],stylize:Yne};return arguments.length>=3&&(y.depth=arguments[2]),arguments.length>=4&&(y.colors=arguments[3]),h5(h)?y.showHidden=h:h&&tre(y,h),$i(y.showHidden)&&(y.showHidden=!1),$i(y.depth)&&(y.depth=2),$i(y.colors)&&(y.colors=!1),$i(y.customInspect)&&(y.customInspect=!0),y.colors&&(y.stylize=Kne),Su(y,m,y.depth)}Fi.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},Fi.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"};function Kne(m,h){var y=Fi.styles[h];return y?"\x1B["+Fi.colors[y][0]+"m"+m+"\x1B["+Fi.colors[y][1]+"m":m}function Yne(m,h){return m}function Jne(m){var h={};return m.forEach(function(y,x){h[y]=!0}),h}function Su(m,h,y){if(m.customInspect&&h&&A0(h.inspect)&&h.inspect!==Fi&&!(h.constructor&&h.constructor.prototype===h)){var x=h.inspect(y,m);return k0(x)||(x=Su(m,x,y)),x}var T=Xne(m,h);if(T)return T;var B=Object.keys(h),L=Jne(B);if(m.showHidden&&(B=Object.getOwnPropertyNames(h)),T0(h)&&(B.indexOf("message")>=0||B.indexOf("description")>=0))return S0(h);if(B.length===0){if(A0(h)){var X=h.name?": "+h.name:"";return m.stylize("[Function"+X+"]","special")}if(N0(h))return m.stylize(RegExp.prototype.toString.call(h),"regexp");if(p5(h))return m.stylize(Date.prototype.toString.call(h),"date");if(T0(h))return S0(h)}var se="",pe=!1,me=["{","}"];if(Vne(h)&&(pe=!0,me=["[","]"]),A0(h)){var we=h.name?": "+h.name:"";se=" [Function"+we+"]"}if(N0(h)&&(se=" "+RegExp.prototype.toString.call(h)),p5(h)&&(se=" "+Date.prototype.toUTCString.call(h)),T0(h)&&(se=" "+S0(h)),B.length===0&&(!pe||h.length==0))return me[0]+se+me[1];if(y<0)return N0(h)?m.stylize(RegExp.prototype.toString.call(h),"regexp"):m.stylize("[Object]","special");m.seen.push(h);var ut;return pe?ut=Qne(m,h,y,L,B):ut=B.map(function(Qe){return E0(m,h,y,L,Qe,pe)}),m.seen.pop(),Zne(ut,se,me)}function Xne(m,h){if($i(h))return m.stylize("undefined","undefined");if(k0(h)){var y="'"+JSON.stringify(h).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return m.stylize(y,"string")}if(ere(h))return m.stylize(""+h,"number");if(h5(h))return m.stylize(""+h,"boolean");if(x0(h))return m.stylize("null","null")}function S0(m){return"["+Error.prototype.toString.call(m)+"]"}function Qne(m,h,y,x,T){for(var B=[],L=0,X=h.length;L<X;++L)g5(h,String(L))?B.push(E0(m,h,y,x,String(L),!0)):B.push("");return T.forEach(function(se){se.match(/^\d+$/)||B.push(E0(m,h,y,x,se,!0))}),B}function E0(m,h,y,x,T,B){var L,X,se;if(se=Object.getOwnPropertyDescriptor(h,T)||{value:h[T]},se.get?se.set?X=m.stylize("[Getter/Setter]","special"):X=m.stylize("[Getter]","special"):se.set&&(X=m.stylize("[Setter]","special")),g5(x,T)||(L="["+T+"]"),X||(m.seen.indexOf(se.value)<0?(x0(y)?X=Su(m,se.value,null):X=Su(m,se.value,y-1),X.indexOf(`
|
|
108
108
|
`)>-1&&(B?X=X.split(`
|
|
109
109
|
`).map(function(pe){return" "+pe}).join(`
|
|
110
110
|
`).substr(2):X=`
|
|
@@ -129,12 +129,12 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
129
129
|
|
|
130
130
|
`,n=this.file.split(t);let r=[];for(let s=0;s<n.length;s++){const a=s===n.length-1?n[s]:this.manageEntityFieldsSpace(n[s]),l=fj.parse(a,{columns:!0,from:2});r=[...r,...l]}return r=this.reverseSpecialValue(r),r}manageEntityFieldsSpace(t){const n=t.split(`\r
|
|
131
131
|
`),r=n[0].split(",").length;let s=0,a=[];return a=n.map(l=>(l=this.manageSpecialValue(l),s=r-l.split(",").length,s>0?l.split(",").concat(new Array(s)).join():l)),a.join(`\r
|
|
132
|
-
`)}manageSpecialValue(t){t=t.replace(/"{2,}/g,"");const n=/"{1}[^"]*"{1}/g,r=t.match(n);return r!==null&&r.map(s=>(t=t.replace(s,s.replace(/,/g,pp)),s.replace(/,/g,pp))),t}reverseSpecialValue(t){const n=new RegExp(pp,"g");return t.map(r=>{for(const s in r){const a=r[s].replace(n,",");r[s]=a}return r})}convertToGraphData(t){const n=[];let r=t.filter(a=>a.Label===void 0),s=t.filter(a=>a.Label!==void 0);return r=r.map(a=>this.getGraphNode(a)),s=s.map((a,l)=>{const c="Source Entity ID",u="Target Entity ID",d="Label",f=this.getNode(a[c],r)[0],p=this.getNode(a[u],r)[0];return a[d]!==""&&n.push({id:p.id,label:a[d]}),{source:f.id,target:p.id,type:f.type+"-"+p.type,uniqueIndex:l}}),r=r.map(a=>(delete a.entityId,n.map(l=>{l.id===a.id&&(a.name=l.label)}),a)),{nodes:r,links:s}}getGraphNode(t){const n=vw.nodeMapReverse,r=cp.entitys;let s="",a="",l="",c=null,u=null;return r.map(d=>{const f=d.type,p=d.columnsFields[1];t[f]!==void 0&&(a=n[f],s=t[p],l=t[f],c=this.manageNodeDetail(d.columnsFields,t,n[f]),u=this.manageNodeFieldMap(n[f]))}),{id:s,type:a,name:s,entityId:l,detail:c,fieldMap:u,show:!0}}manageNodeFieldMap(t){return this.fieldMap[t]}manageNodeDetail(t,n,r){let s=null,a=!1;if(r!=="nodeType"){s={info:{basic:{}},tags:[]};for(const l in n)if(t.indexOf(l)===-1){a=!0;const c=n[l];l==="tags"&&c!==""?s.tags=c.split(",").map(u=>({name:u,desc:u})):s.info.basic[l]=n[l]}a===!1&&(s=null)}return s}getNode(t,n){return n.filter(r=>r.entityId===t)}outputData(){return this.data}}const kse="",pj={name:"ButtonList",components:{"force-graph-svg-icon":so,addNode:fU,addLink:mU,intro:CU,UploadFilled:$N,SearchIcon:iU},mixins:[kr],props:{showTopSearch:{type:Boolean,default:!1},hideButtonList:{type:Array,default:()=>[]},selection:{type:Array,default:()=>[]},history:{type:Object,default:()=>({dataNow:{}})},moduleDetail:{type:Object,default:()=>{}},requestGraphData:{type:Boolean,default:!0}},emits:["fixNodes","toggleLayout","addNodes","addLink","importCsvData","autoDisplay","toggleMove","deleteNodes","saveSnapshot"],data(){return{maxTrans:0,nowTrans:0,onceTrans:300,dialogVisible:!1,exportFormat:0,formatOptions:[{value:0,label:"JSON"},{value:2,label:"CSV"}],isAllFix:!1,dialogImportVisible:!1,importFileList:[],importFile:null,intro:!1,current:null,addType:"",flageAlias:!0,filterValues:"",relatedMidNum:2}},computed:{buttonList(){var e,t;return[{hover:!1,icon:"hm_icon_add",disable:!this.requestGraphData,fun:this.addNode,name:"新增节点",params:"diy"},{hover:!1,icon:"hm_icon_del",disable:this.selection.length===0||!this.requestGraphData,fun:this.deleteNodes,name:"删除"},{hover:!1,icon:"hm_icon_snapshot",disable:!this.requestGraphData,fun:this.addSnapshot,name:"保存快照",hide:!((t=(e=this.moduleDetail)==null?void 0:e.config)!=null&&t.hasSnapshot)},{hover:!1,icon:"hm_icon_img",disable:!this.requestGraphData,fun:this.saveAsImg,name:"保存图片"},{hover:!1,icon:"hm_icon_export",disable:!this.requestGraphData,fun:this.exportData,name:"数据导出"},{hover:!1,icon:"hm_icon_import",disable:!this.requestGraphData,fun:this.importData,name:"数据导入"},{hover:!1,icon:"hm_icon_undo",disable:this.history.currentIndex<=0||!this.requestGraphData,fun:this.backHistory,name:"撤销"},{hover:!1,icon:"hm_icon_redo",disable:this.history.currentIndex>=this.history.length-1||!this.requestGraphData,fun:this.forwardHistory,name:"恢复"},{hover:!1,icon:"hm_icon_auto",fun:this.autoDisplay,name:"自动布局"},{hover:!1,icon:"hm_icon_fix",fun:this.fixNodes,name:"全局固定",params:!0,hide:this.isAllFix},{hover:!1,icon:"hm_icon_unfix",fun:this.fixNodes,name:"全局解除固定",params:!1,hide:!this.isAllFix},{hover:!1,icon:"hm_icon_tree",fun:this.toggleLayout,name:"树型布局",params:1,hide:this.history.layoutIndex===1},{hover:!1,icon:"hm_icon_force",fun:this.toggleLayout,name:"斥力布局",params:0,hide:this.history.layoutIndex===0}]},buttonListShow(){return this.buttonList.filter(e=>e.hide!==!0&&!this.hideButtonList.includes(e.name))},noSelectNodes(){var r;const e=qr(this.history.dataNow.nodes),t=qr((r=this.history.dataNow)==null?void 0:r.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),!0});return this.deleteParentItem(n)}},mounted(){},methods:{hover(e){this.current=e},out(){this.current=null},autoDisplay(){ve(this,"autoDisplay")},fixNodes(e=!0){ve(this,"fixNodes",e),this.isAllFix=e},toggleMove(){ve(this,"toggleMove")},toggleLayout(e){ve(this,"toggleLayout",e)},addNode(e,t){this.addType=e,this.$refs.addNode.show(t)},addNodes({node:e,type:t,connectNode:n}){ve(this,"addNodes",{node:e,type:t,connectNode:n})},addLink({source:e,target:t}){ve(this,"addLink",{source:e,target:t})},backHistory(){this.$parent.historyBack()},forwardHistory(){this.history.forward()},dataURLToBlob(e){const t=e.split(","),n=t[0].match(/:(.*?);/)[1],r=atob(t[1]);let s=r.length;const a=new Uint8Array(s);for(;s--;)a[s]=r.charCodeAt(s);return new Blob([a],{type:n})},downloadURI(e,t){const n=document.createElement("a");n.download=t,n.href=e,document.body.appendChild(n),n.click(),document.body.removeChild(n)},saveAsImg(){return Ne(this,null,function*(){var t,n;this.$parent.bigLoading=!0;const e=yield this.svgToUrl();this.downloadURI(e,`${((n=(t=this.history.dataNow)==null?void 0:t.nodes[0])==null?void 0:n.id)||"img"}_${new Date().getTime()}.png`),this.$parent.bigLoading=!1})},svgToUrl(){return Ne(this,null,function*(){this.$parent.centerAndZoom(),this.$parent.addCanvasBg();const t=this.$parent.getCanvasStage().toDataURL({mimeType:"image/png"});return this.$parent.removeCanvasBg(),this.$parent.reset(),t})},svgToBlob(){return Ne(this,null,function*(){this.$parent.centerAndZoom(),this.$parent.addCanvasBg();const e=this.$parent.getCanvasStage();e.find("Image").forEach(n=>{const r=n.image();r&&(r.crossOrigin="Anonymous")});const t=yield e.toBlob();return this.$parent.removeCanvasBg(),this.$parent.reset(),t})},deleteNodes(){ve(this,"deleteNodes")},addSnapshot(){ve(this,"saveSnapshot")},exportData(){this.handleOpenModal()},handleOpenModal(){this.dialogVisible=!0},handleCloseModal(){this.dialogVisible=!1},handleExportData(){var l,c,u,d;let e=null,t=null,n=null,r=null;this.selection.length>0?(n=o.toRaw(this.selection),r=[]):(n=o.toRaw(this.history.dataNow.nodes),r=o.toRaw(this.history.dataNow.links));const s=n.map(f=>{const{id:p,type:g,detail:v}=f;return{id:p,type:g,detail:v}}),a=r.map(f=>{const{source:p,target:g}=f;return{source:p,target:g}});this.exportFormat===0?(e=JSON.stringify(s),t=`${((c=(l=this.history.dataNow)==null?void 0:l.nodes[0])==null?void 0:c.id)||"file"}_${new Date().getTime()}.json`):(e=this.setMalteGoCsv({nodes:s,links:a}),t=`${((d=(u=this.history.dataNow)==null?void 0:u.nodes[0])==null?void 0:d.id)||"file"}_${new Date().getTime()}.csv`),bD(e,t),this.handleCloseModal()},importData(){this.handleOpenImportModal()},handleOpenImportModal(){this.dialogImportVisible=!0},handleCloseImportModal(){this.dialogImportVisible=!1,this.importFileList=[],this.importFile=null},handleImportData(){try{const e=this.getFieldMap(),n=new hj(this.importFile,e).outputData();ve(this,"importCsvData",{nodes:n.nodes,links:n.links})}catch(e){Nt({message:e,type:"error"})}this.handleCloseImportModal()},getFieldMap(){const e=this.moduleDetail.detail_field_map,t={};for(const n in e){const r=n.substring(0,n.indexOf("_detail_info"));t[r]=JSON.parse(JSON.stringify(e[n]))}return t},handleFileChange(e){this.importFile=e;const t=new FileReader;t.onload=()=>{t.result&&(this.importFile=t.result)},t.readAsText(e.raw)},handleFileRemove(){this.importFile=null,this.importFileList=[]},setMalteGoCsv(e){return new EU(e).outputCsvFile()},showIntro(){this.intro=!0},hideIntro(){this.intro=!1},handleAlias(e){this.flageAlias=!e;const t=document.getElementsByClassName("right-menu-box")[0],n=document.getElementsByClassName("graph-box")[0];t&&(e?(t.style.display="none",n.style.width="100%"):(t.style.display="inline-block",n.style.width="1%"))},permissionitem(){return this.requestGraphData?!0:(Nt({message:"无可操作权限",type:"warning"}),!1)},handleIconClick(e){this.permissionitem()&&(qt({cId:"buttonList-"+e.icon,c:"顶部按钮-"+e.name}),e.fun(e.params))},handleSearch2:Wi(function(){var n;if(!this.filterValues){ve(Re,"sendNodesRange",null);return}this.filteredDataList=qr(this.noSelectNodes);const e=qr((n=this.history.dataNow)==null?void 0:n.links);this.filteredDataList=this.filteredDataList.filter(r=>this.filterValues!==""?(r.parentNode=this.searchParent(r,e),r.childList=r.childList.filter(s=>s.name.toLowerCase().indexOf(this.filterValues.toLowerCase())>-1),r.childList.length>0):!0),this.filteredDataList=this.deleteParentItem(this.filteredDataList);const t=[];this.filteredDataList.forEach(r=>{t.push(this.searchParent(r,e)),t.push(...r.childList),t.push(r)}),ve(Re,"sendNodesRange",t)},200),handleSearch:Wi(function(){this.filteredDataList=qr(this.history.dataNow.nodes),this.filteredDataList=this.filteredDataList.filter(t=>this.filterValues?t.name.toLowerCase().indexOf(this.filterValues.toLowerCase())>-1:!0);const e=[];this.filteredDataList.forEach(t=>{e.push(t)}),ve(Re,"sendNodesRange",e)},200),handleFilterMidNumber(e){vn("=>(ButtonList.vue:758) currentValue",e),e<2&&(this.relatedMidNum=2),this.filteredDataList=qr(this.history.dataNow.nodes);const t=[],n=[];this.filteredDataList=this.filteredDataList.forEach(r=>{var s,a,l;if(this.relatedMidNum){const c=(l=(a=(s=r==null?void 0:r.detail)==null?void 0:s.info)==null?void 0:a.basic)==null?void 0:l.mid_count;(c?c>=this.relatedMidNum:!0)?t.push(r):n.push(r)}}),ve(Re,"buttonClick",{nodes:t,api:{name:"show_nodes"}}),this.$nextTick(()=>{ve(Re,"buttonClick",{nodes:n,api:{name:"hide_nodes"}})})},searchChildren(e,t){const n=t,r=[];return n&&n.forEach(s=>{s.source.id===e.id&&r.push(s.target)}),r},searchParent(e,t){const n=t;let r=[];return n&&n.forEach(s=>{s.target.id===e.id&&(r=s.source)}),r},groupBy(e,t){const n={};return e.forEach(function(r){const s=JSON.stringify(t(r));n[s]=n[s]||[],n[s].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(a=>a===r.parentNode.id)?r.parentNode="":n.push(r.parentNode.id),r)),t}}},gj={class:"button-container"},mj={ref:"container",class:"button-box"},vj={ref:"box",class:"all-button"},yj={key:0,class:"search-content-wrap"},bj={class:"relative-mid-search"},wj={class:"number-input-wrap"},_j=["onClick"],Cj={key:1,class:"right-btn-wrap"},Sj={class:"button-one intro-button"},Ej={class:"dialog-footer"},xj={class:"dialog-footer"},kj={class:"intro"};function Nj(e,t,n,r,s,a){const l=o.resolveComponent("SearchIcon"),c=mi,u=LL,d=o.resolveComponent("force-graph-svg-icon"),f=gn,p=o.resolveComponent("intro"),g=rR,v=vc,b=mc,w=no,_=xa,C=o.resolveComponent("UploadFilled"),k=Ye,S=OP,E=o.resolveComponent("addNode"),N=o.resolveComponent("addLink");return o.openBlock(),o.createElementBlock("div",gj,[o.createElementVNode("div",mj,[o.createElementVNode("div",vj,[n.showTopSearch?(o.openBlock(),o.createElementBlock("div",yj,[o.createVNode(c,{modelValue:s.filterValues,"onUpdate:modelValue":t[0]||(t[0]=A=>s.filterValues=A),modelModifiers:{trim:!0},class:"search-content",placeholder:"支持查询嫌疑人终端码、虚拟身份、路由mac、域名",onInput:a.handleSearch},{suffix:o.withCtx(()=>[t[8]||(t[8]=o.createElementVNode("div",{class:"split-line"},null,-1)),o.createVNode(l,{onClick:a.handleSearch},null,8,["onClick"])]),_:1},8,["modelValue","onInput"]),o.createElementVNode("div",bj,[t[10]||(t[10]=o.createElementVNode("span",{class:"search-label"},"关联终端数量",-1)),o.createElementVNode("div",wj,[t[9]||(t[9]=o.createElementVNode("span",{class:"great-than"},"≥",-1)),o.createVNode(u,{modelValue:s.relatedMidNum,"onUpdate:modelValue":t[1]||(t[1]=A=>s.relatedMidNum=A),class:"number-input",min:2,controls:!1,onChange:a.handleFilterMidNumber},null,8,["modelValue","onChange"])])])])):o.createCommentVNode("",!0),o.createElementVNode("div",null,[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(a.buttonListShow,(A,I)=>(o.openBlock(),o.createBlock(f,{key:I,class:"item",effect:"dark",content:A.name,placement:"bottom","popper-class":"el-tooltip-gray"},{default:o.withCtx(()=>[o.createElementVNode("div",{class:o.normalizeClass(["img-box","button-one "+(A.disable?"disabled":"")]),onClick:O=>a.handleIconClick(A)},[o.createVNode(d,{class:"button-img","icon-class":e.imgPath["./public/d3svg1/button22/"+A.icon+".svg"]},null,8,["icon-class"])],10,_j)]),_:2},1032,["content"]))),128))]),!n.hideButtonList.includes("功能介绍")||!n.hideButtonList.includes("展开折叠")?(o.openBlock(),o.createElementBlock("div",Cj,[n.hideButtonList.includes("功能介绍")?o.createCommentVNode("",!0):(o.openBlock(),o.createBlock(g,{key:0,placement:"bottom-end",width:"auto",trigger:"hover"},{reference:o.withCtx(()=>[o.createElementVNode("div",Sj,[o.createVNode(f,{class:"item",effect:"dark",content:"功能介绍",placement:"bottom","popper-class":"el-tooltip-gray"},{default:o.withCtx(()=>[o.createVNode(d,{class:"button-img","icon-class":e.imgPath["./public/d3svg1/button22/hm_icon_help.svg"]},null,8,["icon-class"])]),_:1})])]),default:o.withCtx(()=>[o.createVNode(p,{config:n.moduleDetail.config||{}},null,8,["config"])]),_:1})),n.hideButtonList.includes("展开折叠")?o.createCommentVNode("",!0):(o.openBlock(),o.createElementBlock("div",{key:1,class:"button-one intro-button",onClick:t[2]||(t[2]=A=>a.handleAlias(s.flageAlias)),onMouseenter:t[3]||(t[3]=A=>a.hover(a.buttonList.length+1)),onMouseleave:t[4]||(t[4]=A=>a.out())},[o.createVNode(f,{class:"item",effect:"dark",content:s.flageAlias?"右侧折叠":"右侧展开",placement:"bottom","popper-class":"el-tooltip-gray"},{default:o.withCtx(()=>[o.createVNode(d,{class:"button-img","icon-class":e.imgPath[s.flageAlias?"./public/d3svg1/button22/hm_icon_alias_colse.svg":"./public/d3svg1/button22/hm_icon_alias.svg"]},null,8,["icon-class"])]),_:1},8,["content"])],32))])):o.createCommentVNode("",!0)],512)],512),o.createVNode(_,{modelValue:s.dialogVisible,"onUpdate:modelValue":t[6]||(t[6]=A=>s.dialogVisible=A),title:"选择导出数据格式","append-to-body":"",width:"400px","before-close":a.handleCloseModal,class:"el-dialog-graph"},{footer:o.withCtx(()=>[o.createElementVNode("span",Ej,[o.createVNode(w,{onClick:a.handleCloseModal},{default:o.withCtx(()=>t[11]||(t[11]=[o.createTextVNode("取 消")])),_:1},8,["onClick"]),o.createVNode(w,{type:"primary",onClick:a.handleExportData},{default:o.withCtx(()=>t[12]||(t[12]=[o.createTextVNode("导 出")])),_:1},8,["onClick"])])]),default:o.withCtx(()=>[o.createVNode(b,{modelValue:s.exportFormat,"onUpdate:modelValue":t[5]||(t[5]=A=>s.exportFormat=A),placeholder:"请选择导出数据格式"},{default:o.withCtx(()=>[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(s.formatOptions,A=>(o.openBlock(),o.createBlock(v,{key:A.value,label:A.label,value:A.value},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])]),_:1},8,["modelValue","before-close"]),o.createVNode(_,{modelValue:s.dialogImportVisible,"onUpdate:modelValue":t[7]||(t[7]=A=>s.dialogImportVisible=A),title:"导入数据","append-to-body":"",width:"400px","before-close":a.handleCloseImportModal,class:"el-dialog-graph"},{footer:o.withCtx(()=>[o.createElementVNode("span",xj,[o.createVNode(w,{onClick:a.handleCloseImportModal},{default:o.withCtx(()=>t[15]||(t[15]=[o.createTextVNode("取 消")])),_:1},8,["onClick"]),o.createVNode(w,{type:"primary",disabled:!s.importFile,onClick:a.handleImportData},{default:o.withCtx(()=>t[16]||(t[16]=[o.createTextVNode("导 入")])),_:1},8,["disabled","onClick"])])]),default:o.withCtx(()=>[o.createVNode(S,{drag:"",action:"#","auto-upload":!1,accept:".csv","file-list":s.importFileList,"on-change":a.handleFileChange,"on-remove":a.handleFileRemove},{tip:o.withCtx(()=>t[13]||(t[13]=[o.createElementVNode("div",{class:"el-upload__tip"},"只能上传由 Maltego 软件导出的csv文件",-1)])),default:o.withCtx(()=>[o.createVNode(k,{class:"el-icon-upload"},{default:o.withCtx(()=>[o.createVNode(C)]),_:1}),t[14]||(t[14]=o.createElementVNode("div",{class:"el-upload__text"},[o.createTextVNode("将文件拖到此处,或"),o.createElementVNode("em",null,"点击上传")],-1))]),_:1},8,["file-list","on-change","on-remove"])]),_:1},8,["modelValue","before-close"]),o.createVNode(E,{ref:"addNode","nodes-type":n.moduleDetail&&n.moduleDetail.nodes||[],"add-type":s.addType,onAddNodes:a.addNodes},null,8,["nodes-type","add-type","onAddNodes"]),o.createVNode(N,{ref:"addLink",onAddLink:a.addLink},null,8,["onAddLink"]),o.withDirectives(o.createElementVNode("div",kj,[o.createVNode(p,{config:n.moduleDetail.config||{},onMouseenter:a.showIntro,onMouseleave:a.hideIntro},null,8,["config","onMouseenter","onMouseleave"])],512),[[o.vShow,s.intro]])])}const Tj=_t(pj,[["render",Nj]]);var gp={exports:{}},mp={},st={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e._registerNode=e.Konva=e.glob=void 0;const t=Math.PI/180;function n(){return typeof window!="undefined"&&({}.toString.call(window)==="[object Window]"||{}.toString.call(window)==="[object global]")}e.glob=typeof wi!="undefined"?wi:typeof window!="undefined"?window:typeof WorkerGlobalScope!="undefined"?self:{},e.Konva={_global:e.glob,version:"9.3.15",isBrowser:n(),isUnminified:/param/.test(function(s){}.toString()),dblClickWindow:400,getAngle(s){return e.Konva.angleDeg?s*t:s},enableTrace:!1,pointerEventsEnabled:!0,autoDrawEnabled:!0,hitOnDragEnabled:!1,capturePointerEventsEnabled:!1,_mouseListenClick:!1,_touchListenClick:!1,_pointerListenClick:!1,_mouseInDblClickWindow:!1,_touchInDblClickWindow:!1,_pointerInDblClickWindow:!1,_mouseDblClickPointerId:null,_touchDblClickPointerId:null,_pointerDblClickPointerId:null,_fixTextRendering:!1,pixelRatio:typeof window!="undefined"&&window.devicePixelRatio||1,dragDistance:3,angleDeg:!0,showWarnings:!0,dragButtons:[0,1],isDragging(){return e.Konva.DD.isDragging},isTransforming(){var s;return(s=e.Konva.Transformer)===null||s===void 0?void 0:s.isTransforming()},isDragReady(){return!!e.Konva.DD.node},releaseCanvasOnDestroy:!0,document:e.glob.document,_injectGlobal(s){e.glob.Konva=s}};const r=s=>{e.Konva[s.prototype.getClassName()]=s};e._registerNode=r,e.Konva._injectGlobal(e.Konva)})(st);var Pt={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Util=e.Transform=void 0;const t=st;class n{constructor(E=[1,0,0,1,0,0]){this.dirty=!1,this.m=E&&E.slice()||[1,0,0,1,0,0]}reset(){this.m[0]=1,this.m[1]=0,this.m[2]=0,this.m[3]=1,this.m[4]=0,this.m[5]=0}copy(){return new n(this.m)}copyInto(E){E.m[0]=this.m[0],E.m[1]=this.m[1],E.m[2]=this.m[2],E.m[3]=this.m[3],E.m[4]=this.m[4],E.m[5]=this.m[5]}point(E){var N=this.m;return{x:N[0]*E.x+N[2]*E.y+N[4],y:N[1]*E.x+N[3]*E.y+N[5]}}translate(E,N){return this.m[4]+=this.m[0]*E+this.m[2]*N,this.m[5]+=this.m[1]*E+this.m[3]*N,this}scale(E,N){return this.m[0]*=E,this.m[1]*=E,this.m[2]*=N,this.m[3]*=N,this}rotate(E){var N=Math.cos(E),A=Math.sin(E),I=this.m[0]*N+this.m[2]*A,O=this.m[1]*N+this.m[3]*A,F=this.m[0]*-A+this.m[2]*N,P=this.m[1]*-A+this.m[3]*N;return this.m[0]=I,this.m[1]=O,this.m[2]=F,this.m[3]=P,this}getTranslation(){return{x:this.m[4],y:this.m[5]}}skew(E,N){var A=this.m[0]+this.m[2]*N,I=this.m[1]+this.m[3]*N,O=this.m[2]+this.m[0]*E,F=this.m[3]+this.m[1]*E;return this.m[0]=A,this.m[1]=I,this.m[2]=O,this.m[3]=F,this}multiply(E){var N=this.m[0]*E.m[0]+this.m[2]*E.m[1],A=this.m[1]*E.m[0]+this.m[3]*E.m[1],I=this.m[0]*E.m[2]+this.m[2]*E.m[3],O=this.m[1]*E.m[2]+this.m[3]*E.m[3],F=this.m[0]*E.m[4]+this.m[2]*E.m[5]+this.m[4],P=this.m[1]*E.m[4]+this.m[3]*E.m[5]+this.m[5];return this.m[0]=N,this.m[1]=A,this.m[2]=I,this.m[3]=O,this.m[4]=F,this.m[5]=P,this}invert(){var E=1/(this.m[0]*this.m[3]-this.m[1]*this.m[2]),N=this.m[3]*E,A=-this.m[1]*E,I=-this.m[2]*E,O=this.m[0]*E,F=E*(this.m[2]*this.m[5]-this.m[3]*this.m[4]),P=E*(this.m[1]*this.m[4]-this.m[0]*this.m[5]);return this.m[0]=N,this.m[1]=A,this.m[2]=I,this.m[3]=O,this.m[4]=F,this.m[5]=P,this}getMatrix(){return this.m}decompose(){var E=this.m[0],N=this.m[1],A=this.m[2],I=this.m[3],O=this.m[4],F=this.m[5],P=E*I-N*A;let M={x:O,y:F,rotation:0,scaleX:0,scaleY:0,skewX:0,skewY:0};if(E!=0||N!=0){var W=Math.sqrt(E*E+N*N);M.rotation=N>0?Math.acos(E/W):-Math.acos(E/W),M.scaleX=W,M.scaleY=P/W,M.skewX=(E*A+N*I)/P,M.skewY=0}else if(A!=0||I!=0){var U=Math.sqrt(A*A+I*I);M.rotation=Math.PI/2-(I>0?Math.acos(-A/U):-Math.acos(A/U)),M.scaleX=P/U,M.scaleY=U,M.skewX=0,M.skewY=(E*A+N*I)/P}return M.rotation=e.Util._getRotation(M.rotation),M}}e.Transform=n;var r="[object Array]",s="[object Number]",a="[object String]",l="[object Boolean]",c=Math.PI/180,u=180/Math.PI,d="#",f="",p="0",g="Konva warning: ",v="Konva error: ",b="rgb(",w={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,132,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,255,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,203],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[119,128,144],slategrey:[119,128,144],snow:[255,255,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],transparent:[255,255,255,0],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,5]},_=/rgb\((\d{1,3}),(\d{1,3}),(\d{1,3})\)/,C=[];const k=typeof requestAnimationFrame!="undefined"&&requestAnimationFrame||function(S){setTimeout(S,60)};e.Util={_isElement(S){return!!(S&&S.nodeType==1)},_isFunction(S){return!!(S&&S.constructor&&S.call&&S.apply)},_isPlainObject(S){return!!S&&S.constructor===Object},_isArray(S){return Object.prototype.toString.call(S)===r},_isNumber(S){return Object.prototype.toString.call(S)===s&&!isNaN(S)&&isFinite(S)},_isString(S){return Object.prototype.toString.call(S)===a},_isBoolean(S){return Object.prototype.toString.call(S)===l},isObject(S){return S instanceof Object},isValidSelector(S){if(typeof S!="string")return!1;var E=S[0];return E==="#"||E==="."||E===E.toUpperCase()},_sign(S){return S===0||S>0?1:-1},requestAnimFrame(S){C.push(S),C.length===1&&k(function(){const E=C;C=[],E.forEach(function(N){N()})})},createCanvasElement(){var S=document.createElement("canvas");try{S.style=S.style||{}}catch(E){}return S},createImageElement(){return document.createElement("img")},_isInDocument(S){for(;S=S.parentNode;)if(S==document)return!0;return!1},_urlToImage(S,E){var N=e.Util.createImageElement();N.onload=function(){E(N)},N.src=S},_rgbToHex(S,E,N){return((1<<24)+(S<<16)+(E<<8)+N).toString(16).slice(1)},_hexToRgb(S){S=S.replace(d,f);var E=parseInt(S,16);return{r:E>>16&255,g:E>>8&255,b:E&255}},getRandomColor(){for(var S=(Math.random()*16777215<<0).toString(16);S.length<6;)S=p+S;return d+S},getRGB(S){var E;return S in w?(E=w[S],{r:E[0],g:E[1],b:E[2]}):S[0]===d?this._hexToRgb(S.substring(1)):S.substr(0,4)===b?(E=_.exec(S.replace(/ /g,"")),{r:parseInt(E[1],10),g:parseInt(E[2],10),b:parseInt(E[3],10)}):{r:0,g:0,b:0}},colorToRGBA(S){return S=S||"black",e.Util._namedColorToRBA(S)||e.Util._hex3ColorToRGBA(S)||e.Util._hex4ColorToRGBA(S)||e.Util._hex6ColorToRGBA(S)||e.Util._hex8ColorToRGBA(S)||e.Util._rgbColorToRGBA(S)||e.Util._rgbaColorToRGBA(S)||e.Util._hslColorToRGBA(S)},_namedColorToRBA(S){var E=w[S.toLowerCase()];return E?{r:E[0],g:E[1],b:E[2],a:1}:null},_rgbColorToRGBA(S){if(S.indexOf("rgb(")===0){S=S.match(/rgb\(([^)]+)\)/)[1];var E=S.split(/ *, */).map(Number);return{r:E[0],g:E[1],b:E[2],a:1}}},_rgbaColorToRGBA(S){if(S.indexOf("rgba(")===0){S=S.match(/rgba\(([^)]+)\)/)[1];var E=S.split(/ *, */).map((N,A)=>N.slice(-1)==="%"?A===3?parseInt(N)/100:parseInt(N)/100*255:Number(N));return{r:E[0],g:E[1],b:E[2],a:E[3]}}},_hex8ColorToRGBA(S){if(S[0]==="#"&&S.length===9)return{r:parseInt(S.slice(1,3),16),g:parseInt(S.slice(3,5),16),b:parseInt(S.slice(5,7),16),a:parseInt(S.slice(7,9),16)/255}},_hex6ColorToRGBA(S){if(S[0]==="#"&&S.length===7)return{r:parseInt(S.slice(1,3),16),g:parseInt(S.slice(3,5),16),b:parseInt(S.slice(5,7),16),a:1}},_hex4ColorToRGBA(S){if(S[0]==="#"&&S.length===5)return{r:parseInt(S[1]+S[1],16),g:parseInt(S[2]+S[2],16),b:parseInt(S[3]+S[3],16),a:parseInt(S[4]+S[4],16)/255}},_hex3ColorToRGBA(S){if(S[0]==="#"&&S.length===4)return{r:parseInt(S[1]+S[1],16),g:parseInt(S[2]+S[2],16),b:parseInt(S[3]+S[3],16),a:1}},_hslColorToRGBA(S){if(/hsl\((\d+),\s*([\d.]+)%,\s*([\d.]+)%\)/g.test(S)){const[E,...N]=/hsl\((\d+),\s*([\d.]+)%,\s*([\d.]+)%\)/g.exec(S),A=Number(N[0])/360,I=Number(N[1])/100,O=Number(N[2])/100;let F,P,M;if(I===0)return M=O*255,{r:Math.round(M),g:Math.round(M),b:Math.round(M),a:1};O<.5?F=O*(1+I):F=O+I-O*I;const W=2*O-F,U=[0,0,0];for(let Q=0;Q<3;Q++)P=A+1/3*-(Q-1),P<0&&P++,P>1&&P--,6*P<1?M=W+(F-W)*6*P:2*P<1?M=F:3*P<2?M=W+(F-W)*(2/3-P)*6:M=W,U[Q]=M*255;return{r:Math.round(U[0]),g:Math.round(U[1]),b:Math.round(U[2]),a:1}}},haveIntersection(S,E){return!(E.x>S.x+S.width||E.x+E.width<S.x||E.y>S.y+S.height||E.y+E.height<S.y)},cloneObject(S){var E={};for(var N in S)this._isPlainObject(S[N])?E[N]=this.cloneObject(S[N]):this._isArray(S[N])?E[N]=this.cloneArray(S[N]):E[N]=S[N];return E},cloneArray(S){return S.slice(0)},degToRad(S){return S*c},radToDeg(S){return S*u},_degToRad(S){return e.Util.warn("Util._degToRad is removed. Please use public Util.degToRad instead."),e.Util.degToRad(S)},_radToDeg(S){return e.Util.warn("Util._radToDeg is removed. Please use public Util.radToDeg instead."),e.Util.radToDeg(S)},_getRotation(S){return t.Konva.angleDeg?e.Util.radToDeg(S):S},_capitalize(S){return S.charAt(0).toUpperCase()+S.slice(1)},throw(S){throw new Error(v+S)},error(S){console.error(v+S)},warn(S){t.Konva.showWarnings&&console.warn(g+S)},each(S,E){for(var N in S)E(N,S[N])},_inRange(S,E,N){return E<=S&&S<N},_getProjectionToSegment(S,E,N,A,I,O){var F,P,M,W=(S-N)*(S-N)+(E-A)*(E-A);if(W==0)F=S,P=E,M=(I-N)*(I-N)+(O-A)*(O-A);else{var U=((I-S)*(N-S)+(O-E)*(A-E))/W;U<0?(F=S,P=E,M=(S-I)*(S-I)+(E-O)*(E-O)):U>1?(F=N,P=A,M=(N-I)*(N-I)+(A-O)*(A-O)):(F=S+U*(N-S),P=E+U*(A-E),M=(F-I)*(F-I)+(P-O)*(P-O))}return[F,P,M]},_getProjectionToLine(S,E,N){var A=e.Util.cloneObject(S),I=Number.MAX_VALUE;return E.forEach(function(O,F){if(!(!N&&F===E.length-1)){var P=E[(F+1)%E.length],M=e.Util._getProjectionToSegment(O.x,O.y,P.x,P.y,S.x,S.y),W=M[0],U=M[1],Q=M[2];Q<I&&(A.x=W,A.y=U,I=Q)}}),A},_prepareArrayForTween(S,E,N){var A,I=[],O=[];if(S.length>E.length){var F=E;E=S,S=F}for(A=0;A<S.length;A+=2)I.push({x:S[A],y:S[A+1]});for(A=0;A<E.length;A+=2)O.push({x:E[A],y:E[A+1]});var P=[];return O.forEach(function(M){var W=e.Util._getProjectionToLine(M,I,N);P.push(W.x),P.push(W.y)}),P},_prepareToStringify(S){var E;S.visitedByCircularReferenceRemoval=!0;for(var N in S)if(S.hasOwnProperty(N)&&S[N]&&typeof S[N]=="object"){if(E=Object.getOwnPropertyDescriptor(S,N),S[N].visitedByCircularReferenceRemoval||e.Util._isElement(S[N]))if(E.configurable)delete S[N];else return null;else if(e.Util._prepareToStringify(S[N])===null)if(E.configurable)delete S[N];else return null}return delete S.visitedByCircularReferenceRemoval,S},_assign(S,E){for(var N in E)S[N]=E[N];return S},_getFirstPointerId(S){return S.touches?S.changedTouches[0].identifier:S.pointerId||999},releaseCanvas(...S){t.Konva.releaseCanvasOnDestroy&&S.forEach(E=>{E.width=0,E.height=0})},drawRoundedRectPath(S,E,N,A){let I=0,O=0,F=0,P=0;typeof A=="number"?I=O=F=P=Math.min(A,E/2,N/2):(I=Math.min(A[0]||0,E/2,N/2),O=Math.min(A[1]||0,E/2,N/2),P=Math.min(A[2]||0,E/2,N/2),F=Math.min(A[3]||0,E/2,N/2)),S.moveTo(I,0),S.lineTo(E-O,0),S.arc(E-O,O,O,Math.PI*3/2,0,!1),S.lineTo(E,N-P),S.arc(E-P,N-P,P,0,Math.PI/2,!1),S.lineTo(F,N),S.arc(F,N-F,F,Math.PI/2,Math.PI,!1),S.lineTo(0,I),S.arc(I,I,I,Math.PI,Math.PI*3/2,!1)}}})(Pt);var xi={},cn={},qe={};Object.defineProperty(qe,"__esModule",{value:!0}),qe.getComponentValidator=qe.getBooleanValidator=qe.getNumberArrayValidator=qe.getFunctionValidator=qe.getStringOrGradientValidator=qe.getStringValidator=qe.getNumberOrAutoValidator=qe.getNumberOrArrayOfNumbersValidator=qe.getNumberValidator=qe.alphaComponent=qe.RGBComponent=void 0;const Vr=st,mt=Pt;function ei(e){return mt.Util._isString(e)?'"'+e+'"':Object.prototype.toString.call(e)==="[object Number]"||mt.Util._isBoolean(e)?e:Object.prototype.toString.call(e)}function Aj(e){return e>255?255:e<0?0:Math.round(e)}qe.RGBComponent=Aj;function Oj(e){return e>1?1:e<1e-4?1e-4:e}qe.alphaComponent=Oj;function Ij(){if(Vr.Konva.isUnminified)return function(e,t){return mt.Util._isNumber(e)||mt.Util.warn(ei(e)+' is a not valid value for "'+t+'" attribute. The value should be a number.'),e}}qe.getNumberValidator=Ij;function Bj(e){if(Vr.Konva.isUnminified)return function(t,n){let r=mt.Util._isNumber(t),s=mt.Util._isArray(t)&&t.length==e;return!r&&!s&&mt.Util.warn(ei(t)+' is a not valid value for "'+n+'" attribute. The value should be a number or Array<number>('+e+")"),t}}qe.getNumberOrArrayOfNumbersValidator=Bj;function Lj(){if(Vr.Konva.isUnminified)return function(e,t){var n=mt.Util._isNumber(e),r=e==="auto";return n||r||mt.Util.warn(ei(e)+' is a not valid value for "'+t+'" attribute. The value should be a number or "auto".'),e}}qe.getNumberOrAutoValidator=Lj;function Rj(){if(Vr.Konva.isUnminified)return function(e,t){return mt.Util._isString(e)||mt.Util.warn(ei(e)+' is a not valid value for "'+t+'" attribute. The value should be a string.'),e}}qe.getStringValidator=Rj;function Pj(){if(Vr.Konva.isUnminified)return function(e,t){const n=mt.Util._isString(e),r=Object.prototype.toString.call(e)==="[object CanvasGradient]"||e&&e.addColorStop;return n||r||mt.Util.warn(ei(e)+' is a not valid value for "'+t+'" attribute. The value should be a string or a native gradient.'),e}}qe.getStringOrGradientValidator=Pj;function Dj(){if(Vr.Konva.isUnminified)return function(e,t){return mt.Util._isFunction(e)||mt.Util.warn(ei(e)+' is a not valid value for "'+t+'" attribute. The value should be a function.'),e}}qe.getFunctionValidator=Dj;function Mj(){if(Vr.Konva.isUnminified)return function(e,t){const n=Int8Array?Object.getPrototypeOf(Int8Array):null;return n&&e instanceof n||(mt.Util._isArray(e)?e.forEach(function(r){mt.Util._isNumber(r)||mt.Util.warn('"'+t+'" attribute has non numeric element '+r+". Make sure that all elements are numbers.")}):mt.Util.warn(ei(e)+' is a not valid value for "'+t+'" attribute. The value should be a array of numbers.')),e}}qe.getNumberArrayValidator=Mj;function Fj(){if(Vr.Konva.isUnminified)return function(e,t){var n=e===!0||e===!1;return n||mt.Util.warn(ei(e)+' is a not valid value for "'+t+'" attribute. The value should be a boolean.'),e}}qe.getBooleanValidator=Fj;function $j(e){if(Vr.Konva.isUnminified)return function(t,n){return t==null||mt.Util.isObject(t)||mt.Util.warn(ei(t)+' is a not valid value for "'+n+'" attribute. The value should be an object with properties '+e),t}}qe.getComponentValidator=$j,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Factory=void 0;const t=Pt,n=qe;var r="get",s="set";e.Factory={addGetterSetter(a,l,c,u,d){e.Factory.addGetter(a,l,c),e.Factory.addSetter(a,l,u,d),e.Factory.addOverloadedGetterSetter(a,l)},addGetter(a,l,c){var u=r+t.Util._capitalize(l);a.prototype[u]=a.prototype[u]||function(){var d=this.attrs[l];return d===void 0?c:d}},addSetter(a,l,c,u){var d=s+t.Util._capitalize(l);a.prototype[d]||e.Factory.overWriteSetter(a,l,c,u)},overWriteSetter(a,l,c,u){var d=s+t.Util._capitalize(l);a.prototype[d]=function(f){return c&&f!==void 0&&f!==null&&(f=c.call(this,f,l)),this._setAttr(l,f),u&&u.call(this),this}},addComponentsGetterSetter(a,l,c,u,d){var f=c.length,p=t.Util._capitalize,g=r+p(l),v=s+p(l),b,w;a.prototype[g]=function(){var C={};for(b=0;b<f;b++)w=c[b],C[w]=this.getAttr(l+p(w));return C};var _=(0,n.getComponentValidator)(c);a.prototype[v]=function(C){var k=this.attrs[l],S;u&&(C=u.call(this,C)),_&&_.call(this,C,l);for(S in C)C.hasOwnProperty(S)&&this._setAttr(l+p(S),C[S]);return C||c.forEach(E=>{this._setAttr(l+p(E),void 0)}),this._fireChangeEvent(l,k,C),d&&d.call(this),this},e.Factory.addOverloadedGetterSetter(a,l)},addOverloadedGetterSetter(a,l){var c=t.Util._capitalize(l),u=s+c,d=r+c;a.prototype[l]=function(){return arguments.length?(this[u](arguments[0]),this):this[d]()}},addDeprecatedGetterSetter(a,l,c,u){t.Util.error("Adding deprecated "+l);var d=r+t.Util._capitalize(l),f=l+" property is deprecated and will be removed soon. Look at Konva change log for more information.";a.prototype[d]=function(){t.Util.error(f);var p=this.attrs[l];return p===void 0?c:p},e.Factory.addSetter(a,l,u,function(){t.Util.error(f)}),e.Factory.addOverloadedGetterSetter(a,l)},backCompat(a,l){t.Util.each(l,function(c,u){var d=a.prototype[u],f=r+t.Util._capitalize(c),p=s+t.Util._capitalize(c);function g(){d.apply(this,arguments),t.Util.error('"'+c+'" method is deprecated and will be removed soon. Use ""'+u+'" instead.')}a.prototype[c]=g,a.prototype[f]=g,a.prototype[p]=g})},afterSetFilter(){this._filterUpToDate=!1}}}(cn);var ir={},ti={};Object.defineProperty(ti,"__esModule",{value:!0}),ti.HitContext=ti.SceneContext=ti.Context=void 0;const zw=Pt,zj=st;function Uj(e){var t=[],n=e.length,r=zw.Util,s,a;for(s=0;s<n;s++)a=e[s],r._isNumber(a)?a=Math.round(a*1e3)/1e3:r._isString(a)||(a=a+""),t.push(a);return t}var Uw=",",jj="(",qj=")",Hj="([",Gj="])",Wj=";",Kj="()",Yj="=",jw=["arc","arcTo","beginPath","bezierCurveTo","clearRect","clip","closePath","createLinearGradient","createPattern","createRadialGradient","drawImage","ellipse","fill","fillText","getImageData","createImageData","lineTo","moveTo","putImageData","quadraticCurveTo","rect","roundRect","restore","rotate","save","scale","setLineDash","setTransform","stroke","strokeText","transform","translate"],Jj=["fillStyle","strokeStyle","shadowColor","shadowBlur","shadowOffsetX","shadowOffsetY","letterSpacing","lineCap","lineDashOffset","lineJoin","lineWidth","miterLimit","direction","font","textAlign","textBaseline","globalAlpha","globalCompositeOperation","imageSmoothingEnabled"];const Xj=100;class zc{constructor(t){this.canvas=t,zj.Konva.enableTrace&&(this.traceArr=[],this._enableTrace())}fillShape(t){t.fillEnabled()&&this._fill(t)}_fill(t){}strokeShape(t){t.hasStroke()&&this._stroke(t)}_stroke(t){}fillStrokeShape(t){t.attrs.fillAfterStrokeEnabled?(this.strokeShape(t),this.fillShape(t)):(this.fillShape(t),this.strokeShape(t))}getTrace(t,n){var r=this.traceArr,s=r.length,a="",l,c,u,d;for(l=0;l<s;l++)c=r[l],u=c.method,u?(d=c.args,a+=u,t?a+=Kj:zw.Util._isArray(d[0])?a+=Hj+d.join(Uw)+Gj:(n&&(d=d.map(f=>typeof f=="number"?Math.floor(f):f)),a+=jj+d.join(Uw)+qj)):(a+=c.property,t||(a+=Yj+c.val)),a+=Wj;return a}clearTrace(){this.traceArr=[]}_trace(t){var n=this.traceArr,r;n.push(t),r=n.length,r>=Xj&&n.shift()}reset(){var t=this.getCanvas().getPixelRatio();this.setTransform(1*t,0,0,1*t,0,0)}getCanvas(){return this.canvas}clear(t){var n=this.getCanvas();t?this.clearRect(t.x||0,t.y||0,t.width||0,t.height||0):this.clearRect(0,0,n.getWidth()/n.pixelRatio,n.getHeight()/n.pixelRatio)}_applyLineCap(t){const n=t.attrs.lineCap;n&&this.setAttr("lineCap",n)}_applyOpacity(t){var n=t.getAbsoluteOpacity();n!==1&&this.setAttr("globalAlpha",n)}_applyLineJoin(t){const n=t.attrs.lineJoin;n&&this.setAttr("lineJoin",n)}setAttr(t,n){this._context[t]=n}arc(t,n,r,s,a,l){this._context.arc(t,n,r,s,a,l)}arcTo(t,n,r,s,a){this._context.arcTo(t,n,r,s,a)}beginPath(){this._context.beginPath()}bezierCurveTo(t,n,r,s,a,l){this._context.bezierCurveTo(t,n,r,s,a,l)}clearRect(t,n,r,s){this._context.clearRect(t,n,r,s)}clip(...t){this._context.clip.apply(this._context,t)}closePath(){this._context.closePath()}createImageData(t,n){var r=arguments;if(r.length===2)return this._context.createImageData(t,n);if(r.length===1)return this._context.createImageData(t)}createLinearGradient(t,n,r,s){return this._context.createLinearGradient(t,n,r,s)}createPattern(t,n){return this._context.createPattern(t,n)}createRadialGradient(t,n,r,s,a,l){return this._context.createRadialGradient(t,n,r,s,a,l)}drawImage(t,n,r,s,a,l,c,u,d){var f=arguments,p=this._context;f.length===3?p.drawImage(t,n,r):f.length===5?p.drawImage(t,n,r,s,a):f.length===9&&p.drawImage(t,n,r,s,a,l,c,u,d)}ellipse(t,n,r,s,a,l,c,u){this._context.ellipse(t,n,r,s,a,l,c,u)}isPointInPath(t,n,r,s){return r?this._context.isPointInPath(r,t,n,s):this._context.isPointInPath(t,n,s)}fill(...t){this._context.fill.apply(this._context,t)}fillRect(t,n,r,s){this._context.fillRect(t,n,r,s)}strokeRect(t,n,r,s){this._context.strokeRect(t,n,r,s)}fillText(t,n,r,s){s?this._context.fillText(t,n,r,s):this._context.fillText(t,n,r)}measureText(t){return this._context.measureText(t)}getImageData(t,n,r,s){return this._context.getImageData(t,n,r,s)}lineTo(t,n){this._context.lineTo(t,n)}moveTo(t,n){this._context.moveTo(t,n)}rect(t,n,r,s){this._context.rect(t,n,r,s)}roundRect(t,n,r,s,a){this._context.roundRect(t,n,r,s,a)}putImageData(t,n,r){this._context.putImageData(t,n,r)}quadraticCurveTo(t,n,r,s){this._context.quadraticCurveTo(t,n,r,s)}restore(){this._context.restore()}rotate(t){this._context.rotate(t)}save(){this._context.save()}scale(t,n){this._context.scale(t,n)}setLineDash(t){this._context.setLineDash?this._context.setLineDash(t):"mozDash"in this._context?this._context.mozDash=t:"webkitLineDash"in this._context&&(this._context.webkitLineDash=t)}getLineDash(){return this._context.getLineDash()}setTransform(t,n,r,s,a,l){this._context.setTransform(t,n,r,s,a,l)}stroke(t){t?this._context.stroke(t):this._context.stroke()}strokeText(t,n,r,s){this._context.strokeText(t,n,r,s)}transform(t,n,r,s,a,l){this._context.transform(t,n,r,s,a,l)}translate(t,n){this._context.translate(t,n)}_enableTrace(){var t=this,n=jw.length,r=this.setAttr,s,a,l=function(c){var u=t[c],d;t[c]=function(){return a=Uj(Array.prototype.slice.call(arguments,0)),d=u.apply(t,arguments),t._trace({method:c,args:a}),d}};for(s=0;s<n;s++)l(jw[s]);t.setAttr=function(){r.apply(t,arguments);var c=arguments[0],u=arguments[1];(c==="shadowOffsetX"||c==="shadowOffsetY"||c==="shadowBlur")&&(u=u/this.canvas.getPixelRatio()),t._trace({property:c,val:u})}}_applyGlobalCompositeOperation(t){const n=t.attrs.globalCompositeOperation;var r=!n||n==="source-over";r||this.setAttr("globalCompositeOperation",n)}}ti.Context=zc,Jj.forEach(function(e){Object.defineProperty(zc.prototype,e,{get(){return this._context[e]},set(t){this._context[e]=t}})});class Qj extends zc{constructor(t,{willReadFrequently:n=!1}={}){super(t),this._context=t._canvas.getContext("2d",{willReadFrequently:n})}_fillColor(t){var n=t.fill();this.setAttr("fillStyle",n),t._fillFunc(this)}_fillPattern(t){this.setAttr("fillStyle",t._getFillPattern()),t._fillFunc(this)}_fillLinearGradient(t){var n=t._getLinearGradient();n&&(this.setAttr("fillStyle",n),t._fillFunc(this))}_fillRadialGradient(t){const n=t._getRadialGradient();n&&(this.setAttr("fillStyle",n),t._fillFunc(this))}_fill(t){const n=t.fill(),r=t.getFillPriority();if(n&&r==="color"){this._fillColor(t);return}const s=t.getFillPatternImage();if(s&&r==="pattern"){this._fillPattern(t);return}const a=t.getFillLinearGradientColorStops();if(a&&r==="linear-gradient"){this._fillLinearGradient(t);return}const l=t.getFillRadialGradientColorStops();if(l&&r==="radial-gradient"){this._fillRadialGradient(t);return}n?this._fillColor(t):s?this._fillPattern(t):a?this._fillLinearGradient(t):l&&this._fillRadialGradient(t)}_strokeLinearGradient(t){const n=t.getStrokeLinearGradientStartPoint(),r=t.getStrokeLinearGradientEndPoint(),s=t.getStrokeLinearGradientColorStops(),a=this.createLinearGradient(n.x,n.y,r.x,r.y);if(s){for(var l=0;l<s.length;l+=2)a.addColorStop(s[l],s[l+1]);this.setAttr("strokeStyle",a)}}_stroke(t){var n=t.dash(),r=t.getStrokeScaleEnabled();if(t.hasStroke()){if(!r){this.save();var s=this.getCanvas().getPixelRatio();this.setTransform(s,0,0,s,0,0)}this._applyLineCap(t),n&&t.dashEnabled()&&(this.setLineDash(n),this.setAttr("lineDashOffset",t.dashOffset())),this.setAttr("lineWidth",t.strokeWidth()),t.getShadowForStrokeEnabled()||this.setAttr("shadowColor","rgba(0,0,0,0)");var a=t.getStrokeLinearGradientColorStops();a?this._strokeLinearGradient(t):this.setAttr("strokeStyle",t.stroke()),t._strokeFunc(this),r||this.restore()}}_applyShadow(t){var n,r,s,a=(n=t.getShadowRGBA())!==null&&n!==void 0?n:"black",l=(r=t.getShadowBlur())!==null&&r!==void 0?r:5,c=(s=t.getShadowOffset())!==null&&s!==void 0?s:{x:0,y:0},u=t.getAbsoluteScale(),d=this.canvas.getPixelRatio(),f=u.x*d,p=u.y*d;this.setAttr("shadowColor",a),this.setAttr("shadowBlur",l*Math.min(Math.abs(f),Math.abs(p))),this.setAttr("shadowOffsetX",c.x*f),this.setAttr("shadowOffsetY",c.y*p)}}ti.SceneContext=Qj;class Zj extends zc{constructor(t){super(t),this._context=t._canvas.getContext("2d",{willReadFrequently:!0})}_fill(t){this.save(),this.setAttr("fillStyle",t.colorKey),t._fillFuncHit(this),this.restore()}strokeShape(t){t.hasHitStroke()&&this._stroke(t)}_stroke(t){if(t.hasHitStroke()){const a=t.getStrokeScaleEnabled();if(!a){this.save();var n=this.getCanvas().getPixelRatio();this.setTransform(n,0,0,n,0,0)}this._applyLineCap(t);var r=t.hitStrokeWidth(),s=r==="auto"?t.strokeWidth():r;this.setAttr("lineWidth",s),this.setAttr("strokeStyle",t.colorKey),t._strokeFuncHit(this),a||this.restore()}}}ti.HitContext=Zj,Object.defineProperty(ir,"__esModule",{value:!0}),ir.HitCanvas=ir.SceneCanvas=ir.Canvas=void 0;const Uc=Pt,qw=ti,Hw=st,Vj=cn,eq=qe;var jc;function tq(){if(jc)return jc;var e=Uc.Util.createCanvasElement(),t=e.getContext("2d");return jc=function(){var n=Hw.Konva._global.devicePixelRatio||1,r=t.webkitBackingStorePixelRatio||t.mozBackingStorePixelRatio||t.msBackingStorePixelRatio||t.oBackingStorePixelRatio||t.backingStorePixelRatio||1;return n/r}(),Uc.Util.releaseCanvas(e),jc}class qc{constructor(t){this.pixelRatio=1,this.width=0,this.height=0,this.isCache=!1;var n=t||{},r=n.pixelRatio||Hw.Konva.pixelRatio||tq();this.pixelRatio=r,this._canvas=Uc.Util.createCanvasElement(),this._canvas.style.padding="0",this._canvas.style.margin="0",this._canvas.style.border="0",this._canvas.style.background="transparent",this._canvas.style.position="absolute",this._canvas.style.top="0",this._canvas.style.left="0"}getContext(){return this.context}getPixelRatio(){return this.pixelRatio}setPixelRatio(t){var n=this.pixelRatio;this.pixelRatio=t,this.setSize(this.getWidth()/n,this.getHeight()/n)}setWidth(t){this.width=this._canvas.width=t*this.pixelRatio,this._canvas.style.width=t+"px";var n=this.pixelRatio,r=this.getContext()._context;r.scale(n,n)}setHeight(t){this.height=this._canvas.height=t*this.pixelRatio,this._canvas.style.height=t+"px";var n=this.pixelRatio,r=this.getContext()._context;r.scale(n,n)}getWidth(){return this.width}getHeight(){return this.height}setSize(t,n){this.setWidth(t||0),this.setHeight(n||0)}toDataURL(t,n){try{return this._canvas.toDataURL(t,n)}catch(r){try{return this._canvas.toDataURL()}catch(s){return Uc.Util.error("Unable to get data URL. "+s.message+" For more info read https://konvajs.org/docs/posts/Tainted_Canvas.html."),""}}}}ir.Canvas=qc,Vj.Factory.addGetterSetter(qc,"pixelRatio",void 0,(0,eq.getNumberValidator)());class nq extends qc{constructor(t={width:0,height:0,willReadFrequently:!1}){super(t),this.context=new qw.SceneContext(this,{willReadFrequently:t.willReadFrequently}),this.setSize(t.width,t.height)}}ir.SceneCanvas=nq;class rq extends qc{constructor(t={width:0,height:0}){super(t),this.hitCanvas=!0,this.context=new qw.HitContext(this),this.setSize(t.width,t.height)}}ir.HitCanvas=rq;var Hc={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.DD=void 0;const t=st,n=Pt;e.DD={get isDragging(){var r=!1;return e.DD._dragElements.forEach(s=>{s.dragStatus==="dragging"&&(r=!0)}),r},justDragged:!1,get node(){var r;return e.DD._dragElements.forEach(s=>{r=s.node}),r},_dragElements:new Map,_drag(r){const s=[];e.DD._dragElements.forEach((a,l)=>{const{node:c}=a,u=c.getStage();u.setPointersPositions(r),a.pointerId===void 0&&(a.pointerId=n.Util._getFirstPointerId(r));const d=u._changedPointerPositions.find(g=>g.id===a.pointerId);if(d){if(a.dragStatus!=="dragging"){var f=c.dragDistance(),p=Math.max(Math.abs(d.x-a.startPointerPos.x),Math.abs(d.y-a.startPointerPos.y));if(p<f||(c.startDrag({evt:r}),!c.isDragging()))return}c._setDragPosition(r,a),s.push(c)}}),s.forEach(a=>{a.fire("dragmove",{type:"dragmove",target:a,evt:r},!0)})},_endDragBefore(r){const s=[];e.DD._dragElements.forEach(a=>{const{node:l}=a,c=l.getStage();if(r&&c.setPointersPositions(r),!c._changedPointerPositions.find(f=>f.id===a.pointerId))return;(a.dragStatus==="dragging"||a.dragStatus==="stopped")&&(e.DD.justDragged=!0,t.Konva._mouseListenClick=!1,t.Konva._touchListenClick=!1,t.Konva._pointerListenClick=!1,a.dragStatus="stopped");const d=a.node.getLayer()||a.node instanceof t.Konva.Stage&&a.node;d&&s.indexOf(d)===-1&&s.push(d)}),s.forEach(a=>{a.draw()})},_endDragAfter(r){e.DD._dragElements.forEach((s,a)=>{s.dragStatus==="stopped"&&s.node.fire("dragend",{type:"dragend",target:s.node,evt:r},!0),s.dragStatus!=="dragging"&&e.DD._dragElements.delete(a)})}},t.Konva.isBrowser&&(window.addEventListener("mouseup",e.DD._endDragBefore,!0),window.addEventListener("touchend",e.DD._endDragBefore,!0),window.addEventListener("mousemove",e.DD._drag),window.addEventListener("touchmove",e.DD._drag),window.addEventListener("mouseup",e.DD._endDragAfter,!1),window.addEventListener("touchend",e.DD._endDragAfter,!1))})(Hc),Object.defineProperty(xi,"__esModule",{value:!0}),xi.Node=void 0;const je=Pt,Ia=cn,Ba=ir,ki=st,Pn=Hc,Ct=qe;var Gc="absoluteOpacity",Wc="allEventListeners",ni="absoluteTransform",Gw="absoluteScale",co="canvas",iq="Change",oq="children",sq="konva",vp="listening",Ww="mouseenter",Kw="mouseleave",Yw="set",Jw="Shape",Kc=" ",Xw="stage",Ni="transform",aq="Stage",yp="visible",lq=["xChange.konva","yChange.konva","scaleXChange.konva","scaleYChange.konva","skewXChange.konva","skewYChange.konva","rotationChange.konva","offsetXChange.konva","offsetYChange.konva","transformsEnabledChange.konva"].join(Kc);let cq=1;class Ie{constructor(t){this._id=cq++,this.eventListeners={},this.attrs={},this.index=0,this._allEventListeners=null,this.parent=null,this._cache=new Map,this._attachedDepsListeners=new Map,this._lastPos=null,this._batchingTransformChange=!1,this._needClearTransformCache=!1,this._filterUpToDate=!1,this._isUnderCache=!1,this._dragEventId=null,this._shouldFireChangeEvents=!1,this.setAttrs(t),this._shouldFireChangeEvents=!0}hasChildren(){return!1}_clearCache(t){(t===Ni||t===ni)&&this._cache.get(t)?this._cache.get(t).dirty=!0:t?this._cache.delete(t):this._cache.clear()}_getCache(t,n){var r=this._cache.get(t),s=t===Ni||t===ni,a=r===void 0||s&&r.dirty===!0;return a&&(r=n.call(this),this._cache.set(t,r)),r}_calculate(t,n,r){if(!this._attachedDepsListeners.get(t)){const s=n.map(a=>a+"Change.konva").join(Kc);this.on(s,()=>{this._clearCache(t)}),this._attachedDepsListeners.set(t,!0)}return this._getCache(t,r)}_getCanvasCache(){return this._cache.get(co)}_clearSelfAndDescendantCache(t){this._clearCache(t),t===ni&&this.fire("absoluteTransformChange")}clearCache(){if(this._cache.has(co)){const{scene:t,filter:n,hit:r}=this._cache.get(co);je.Util.releaseCanvas(t,n,r),this._cache.delete(co)}return this._clearSelfAndDescendantCache(),this._requestDraw(),this}cache(t){var n=t||{},r={};(n.x===void 0||n.y===void 0||n.width===void 0||n.height===void 0)&&(r=this.getClientRect({skipTransform:!0,relativeTo:this.getParent()||void 0}));var s=Math.ceil(n.width||r.width),a=Math.ceil(n.height||r.height),l=n.pixelRatio,c=n.x===void 0?Math.floor(r.x):n.x,u=n.y===void 0?Math.floor(r.y):n.y,d=n.offset||0,f=n.drawBorder||!1,p=n.hitCanvasPixelRatio||1;if(!s||!a){je.Util.error("Can not cache the node. Width or height of the node equals 0. Caching is skipped.");return}const g=Math.abs(Math.round(r.x)-c)>.5?1:0,v=Math.abs(Math.round(r.y)-u)>.5?1:0;s+=d*2+g,a+=d*2+v,c-=d,u-=d;var b=new Ba.SceneCanvas({pixelRatio:l,width:s,height:a}),w=new Ba.SceneCanvas({pixelRatio:l,width:0,height:0,willReadFrequently:!0}),_=new Ba.HitCanvas({pixelRatio:p,width:s,height:a}),C=b.getContext(),k=_.getContext();return _.isCache=!0,b.isCache=!0,this._cache.delete(co),this._filterUpToDate=!1,n.imageSmoothingEnabled===!1&&(b.getContext()._context.imageSmoothingEnabled=!1,w.getContext()._context.imageSmoothingEnabled=!1),C.save(),k.save(),C.translate(-c,-u),k.translate(-c,-u),this._isUnderCache=!0,this._clearSelfAndDescendantCache(Gc),this._clearSelfAndDescendantCache(Gw),this.drawScene(b,this),this.drawHit(_,this),this._isUnderCache=!1,C.restore(),k.restore(),f&&(C.save(),C.beginPath(),C.rect(0,0,s,a),C.closePath(),C.setAttr("strokeStyle","red"),C.setAttr("lineWidth",5),C.stroke(),C.restore()),this._cache.set(co,{scene:b,filter:w,hit:_,x:c,y:u}),this._requestDraw(),this}isCached(){return this._cache.has(co)}getClientRect(t){throw new Error('abstract "getClientRect" method call')}_transformedRect(t,n){var r=[{x:t.x,y:t.y},{x:t.x+t.width,y:t.y},{x:t.x+t.width,y:t.y+t.height},{x:t.x,y:t.y+t.height}],s=1/0,a=1/0,l=-1/0,c=-1/0,u=this.getAbsoluteTransform(n);return r.forEach(function(d){var f=u.point(d);s===void 0&&(s=l=f.x,a=c=f.y),s=Math.min(s,f.x),a=Math.min(a,f.y),l=Math.max(l,f.x),c=Math.max(c,f.y)}),{x:s,y:a,width:l-s,height:c-a}}_drawCachedSceneCanvas(t){t.save(),t._applyOpacity(this),t._applyGlobalCompositeOperation(this);const n=this._getCanvasCache();t.translate(n.x,n.y);var r=this._getCachedSceneCanvas(),s=r.pixelRatio;t.drawImage(r._canvas,0,0,r.width/s,r.height/s),t.restore()}_drawCachedHitCanvas(t){var n=this._getCanvasCache(),r=n.hit;t.save(),t.translate(n.x,n.y),t.drawImage(r._canvas,0,0,r.width/r.pixelRatio,r.height/r.pixelRatio),t.restore()}_getCachedSceneCanvas(){var t=this.filters(),n=this._getCanvasCache(),r=n.scene,s=n.filter,a=s.getContext(),l,c,u,d;if(t){if(!this._filterUpToDate){var f=r.pixelRatio;s.setSize(r.width/r.pixelRatio,r.height/r.pixelRatio);try{for(l=t.length,a.clear(),a.drawImage(r._canvas,0,0,r.getWidth()/f,r.getHeight()/f),c=a.getImageData(0,0,s.getWidth(),s.getHeight()),u=0;u<l;u++){if(d=t[u],typeof d!="function"){je.Util.error("Filter should be type of function, but got "+typeof d+" instead. Please check correct filters");continue}d.call(this,c),a.putImageData(c,0,0)}}catch(p){je.Util.error("Unable to apply filter. "+p.message+" This post my help you https://konvajs.org/docs/posts/Tainted_Canvas.html.")}this._filterUpToDate=!0}return s}return r}on(t,n){if(this._cache&&this._cache.delete(Wc),arguments.length===3)return this._delegate.apply(this,arguments);var r=t.split(Kc),s=r.length,a,l,c,u,d;for(a=0;a<s;a++)l=r[a],c=l.split("."),u=c[0],d=c[1]||"",this.eventListeners[u]||(this.eventListeners[u]=[]),this.eventListeners[u].push({name:d,handler:n});return this}off(t,n){var r=(t||"").split(Kc),s=r.length,a,l,c,u,d,f;if(this._cache&&this._cache.delete(Wc),!t)for(l in this.eventListeners)this._off(l);for(a=0;a<s;a++)if(c=r[a],u=c.split("."),d=u[0],f=u[1],d)this.eventListeners[d]&&this._off(d,f,n);else for(l in this.eventListeners)this._off(l,f,n);return this}dispatchEvent(t){var n={target:this,type:t.type,evt:t};return this.fire(t.type,n),this}addEventListener(t,n){return this.on(t,function(r){n.call(this,r.evt)}),this}removeEventListener(t){return this.off(t),this}_delegate(t,n,r){var s=this;this.on(t,function(a){for(var l=a.target.findAncestors(n,!0,s),c=0;c<l.length;c++)a=je.Util.cloneObject(a),a.currentTarget=l[c],r.call(l[c],a)})}remove(){return this.isDragging()&&this.stopDrag(),Pn.DD._dragElements.delete(this._id),this._remove(),this}_clearCaches(){this._clearSelfAndDescendantCache(ni),this._clearSelfAndDescendantCache(Gc),this._clearSelfAndDescendantCache(Gw),this._clearSelfAndDescendantCache(Xw),this._clearSelfAndDescendantCache(yp),this._clearSelfAndDescendantCache(vp)}_remove(){this._clearCaches();var t=this.getParent();t&&t.children&&(t.children.splice(this.index,1),t._setChildrenIndices(),this.parent=null)}destroy(){return this.remove(),this.clearCache(),this}getAttr(t){var n="get"+je.Util._capitalize(t);return je.Util._isFunction(this[n])?this[n]():this.attrs[t]}getAncestors(){for(var t=this.getParent(),n=[];t;)n.push(t),t=t.getParent();return n}getAttrs(){return this.attrs||{}}setAttrs(t){return this._batchTransformChanges(()=>{var n,r;if(!t)return this;for(n in t)n!==oq&&(r=Yw+je.Util._capitalize(n),je.Util._isFunction(this[r])?this[r](t[n]):this._setAttr(n,t[n]))}),this}isListening(){return this._getCache(vp,this._isListening)}_isListening(t){if(!this.listening())return!1;const r=this.getParent();return r&&r!==t&&this!==t?r._isListening(t):!0}isVisible(){return this._getCache(yp,this._isVisible)}_isVisible(t){if(!this.visible())return!1;const r=this.getParent();return r&&r!==t&&this!==t?r._isVisible(t):!0}shouldDrawHit(t,n=!1){if(t)return this._isVisible(t)&&this._isListening(t);var r=this.getLayer(),s=!1;Pn.DD._dragElements.forEach(l=>{l.dragStatus==="dragging"&&(l.node.nodeType==="Stage"||l.node.getLayer()===r)&&(s=!0)});var a=!n&&!ki.Konva.hitOnDragEnabled&&(s||ki.Konva.isTransforming());return this.isListening()&&this.isVisible()&&!a}show(){return this.visible(!0),this}hide(){return this.visible(!1),this}getZIndex(){return this.index||0}getAbsoluteZIndex(){var t=this.getDepth(),n=this,r=0,s,a,l,c;function u(f){for(s=[],a=f.length,l=0;l<a;l++)c=f[l],r++,c.nodeType!==Jw&&(s=s.concat(c.getChildren().slice())),c._id===n._id&&(l=a);s.length>0&&s[0].getDepth()<=t&&u(s)}const d=this.getStage();return n.nodeType!==aq&&d&&u(d.getChildren()),r}getDepth(){for(var t=0,n=this.parent;n;)t++,n=n.parent;return t}_batchTransformChanges(t){this._batchingTransformChange=!0,t(),this._batchingTransformChange=!1,this._needClearTransformCache&&(this._clearCache(Ni),this._clearSelfAndDescendantCache(ni)),this._needClearTransformCache=!1}setPosition(t){return this._batchTransformChanges(()=>{this.x(t.x),this.y(t.y)}),this}getPosition(){return{x:this.x(),y:this.y()}}getRelativePointerPosition(){const t=this.getStage();if(!t)return null;var n=t.getPointerPosition();if(!n)return null;var r=this.getAbsoluteTransform().copy();return r.invert(),r.point(n)}getAbsolutePosition(t){let n=!1,r=this.parent;for(;r;){if(r.isCached()){n=!0;break}r=r.parent}n&&!t&&(t=!0);var s=this.getAbsoluteTransform(t).getMatrix(),a=new je.Transform,l=this.offset();return a.m=s.slice(),a.translate(l.x,l.y),a.getTranslation()}setAbsolutePosition(t){const l=this._clearTransform(),{x:n,y:r}=l,s=fi(l,["x","y"]);this.attrs.x=n,this.attrs.y=r,this._clearCache(Ni);var a=this._getAbsoluteTransform().copy();return a.invert(),a.translate(t.x,t.y),t={x:this.attrs.x+a.getTranslation().x,y:this.attrs.y+a.getTranslation().y},this._setTransform(s),this.setPosition({x:t.x,y:t.y}),this._clearCache(Ni),this._clearSelfAndDescendantCache(ni),this}_setTransform(t){var n;for(n in t)this.attrs[n]=t[n]}_clearTransform(){var t={x:this.x(),y:this.y(),rotation:this.rotation(),scaleX:this.scaleX(),scaleY:this.scaleY(),offsetX:this.offsetX(),offsetY:this.offsetY(),skewX:this.skewX(),skewY:this.skewY()};return this.attrs.x=0,this.attrs.y=0,this.attrs.rotation=0,this.attrs.scaleX=1,this.attrs.scaleY=1,this.attrs.offsetX=0,this.attrs.offsetY=0,this.attrs.skewX=0,this.attrs.skewY=0,t}move(t){var n=t.x,r=t.y,s=this.x(),a=this.y();return n!==void 0&&(s+=n),r!==void 0&&(a+=r),this.setPosition({x:s,y:a}),this}_eachAncestorReverse(t,n){var r=[],s=this.getParent(),a,l;if(!(n&&n._id===this._id)){for(r.unshift(this);s&&(!n||s._id!==n._id);)r.unshift(s),s=s.parent;for(a=r.length,l=0;l<a;l++)t(r[l])}}rotate(t){return this.rotation(this.rotation()+t),this}moveToTop(){if(!this.parent)return je.Util.warn("Node has no parent. moveToTop function is ignored."),!1;var t=this.index,n=this.parent.getChildren().length;return t<n-1?(this.parent.children.splice(t,1),this.parent.children.push(this),this.parent._setChildrenIndices(),!0):!1}moveUp(){if(!this.parent)return je.Util.warn("Node has no parent. moveUp function is ignored."),!1;var t=this.index,n=this.parent.getChildren().length;return t<n-1?(this.parent.children.splice(t,1),this.parent.children.splice(t+1,0,this),this.parent._setChildrenIndices(),!0):!1}moveDown(){if(!this.parent)return je.Util.warn("Node has no parent. moveDown function is ignored."),!1;var t=this.index;return t>0?(this.parent.children.splice(t,1),this.parent.children.splice(t-1,0,this),this.parent._setChildrenIndices(),!0):!1}moveToBottom(){if(!this.parent)return je.Util.warn("Node has no parent. moveToBottom function is ignored."),!1;var t=this.index;return t>0?(this.parent.children.splice(t,1),this.parent.children.unshift(this),this.parent._setChildrenIndices(),!0):!1}setZIndex(t){if(!this.parent)return je.Util.warn("Node has no parent. zIndex parameter is ignored."),this;(t<0||t>=this.parent.children.length)&&je.Util.warn("Unexpected value "+t+" for zIndex property. zIndex is just index of a node in children of its parent. Expected value is from 0 to "+(this.parent.children.length-1)+".");var n=this.index;return this.parent.children.splice(n,1),this.parent.children.splice(t,0,this),this.parent._setChildrenIndices(),this}getAbsoluteOpacity(){return this._getCache(Gc,this._getAbsoluteOpacity)}_getAbsoluteOpacity(){var t=this.opacity(),n=this.getParent();return n&&!n._isUnderCache&&(t*=n.getAbsoluteOpacity()),t}moveTo(t){return this.getParent()!==t&&(this._remove(),t.add(this)),this}toObject(){var t=this.getAttrs(),n,r,s,a,l;const c={attrs:{},className:this.getClassName()};for(n in t)r=t[n],l=je.Util.isObject(r)&&!je.Util._isPlainObject(r)&&!je.Util._isArray(r),!l&&(s=typeof this[n]=="function"&&this[n],delete t[n],a=s?s.call(this):null,t[n]=r,a!==r&&(c.attrs[n]=r));return je.Util._prepareToStringify(c)}toJSON(){return JSON.stringify(this.toObject())}getParent(){return this.parent}findAncestors(t,n,r){var s=[];n&&this._isMatch(t)&&s.push(this);for(var a=this.parent;a;){if(a===r)return s;a._isMatch(t)&&s.push(a),a=a.parent}return s}isAncestorOf(t){return!1}findAncestor(t,n,r){return this.findAncestors(t,n,r)[0]}_isMatch(t){if(!t)return!1;if(typeof t=="function")return t(this);var n=t.replace(/ /g,"").split(","),r=n.length,s,a;for(s=0;s<r;s++)if(a=n[s],je.Util.isValidSelector(a)||(je.Util.warn('Selector "'+a+'" is invalid. Allowed selectors examples are "#foo", ".bar" or "Group".'),je.Util.warn('If you have a custom shape with such className, please change it to start with upper letter like "Triangle".'),je.Util.warn("Konva is awesome, right?")),a.charAt(0)==="#"){if(this.id()===a.slice(1))return!0}else if(a.charAt(0)==="."){if(this.hasName(a.slice(1)))return!0}else if(this.className===a||this.nodeType===a)return!0;return!1}getLayer(){var t=this.getParent();return t?t.getLayer():null}getStage(){return this._getCache(Xw,this._getStage)}_getStage(){var t=this.getParent();return t?t.getStage():null}fire(t,n={},r){return n.target=n.target||this,r?this._fireAndBubble(t,n):this._fire(t,n),this}getAbsoluteTransform(t){return t?this._getAbsoluteTransform(t):this._getCache(ni,this._getAbsoluteTransform)}_getAbsoluteTransform(t){var n;if(t)return n=new je.Transform,this._eachAncestorReverse(function(s){var a=s.transformsEnabled();a==="all"?n.multiply(s.getTransform()):a==="position"&&n.translate(s.x()-s.offsetX(),s.y()-s.offsetY())},t),n;n=this._cache.get(ni)||new je.Transform,this.parent?this.parent.getAbsoluteTransform().copyInto(n):n.reset();var r=this.transformsEnabled();if(r==="all")n.multiply(this.getTransform());else if(r==="position"){const s=this.attrs.x||0,a=this.attrs.y||0,l=this.attrs.offsetX||0,c=this.attrs.offsetY||0;n.translate(s-l,a-c)}return n.dirty=!1,n}getAbsoluteScale(t){for(var n=this;n;)n._isUnderCache&&(t=n),n=n.getParent();const s=this.getAbsoluteTransform(t).decompose();return{x:s.scaleX,y:s.scaleY}}getAbsoluteRotation(){return this.getAbsoluteTransform().decompose().rotation}getTransform(){return this._getCache(Ni,this._getTransform)}_getTransform(){var t,n,r=this._cache.get(Ni)||new je.Transform;r.reset();var s=this.x(),a=this.y(),l=ki.Konva.getAngle(this.rotation()),c=(t=this.attrs.scaleX)!==null&&t!==void 0?t:1,u=(n=this.attrs.scaleY)!==null&&n!==void 0?n:1,d=this.attrs.skewX||0,f=this.attrs.skewY||0,p=this.attrs.offsetX||0,g=this.attrs.offsetY||0;return(s!==0||a!==0)&&r.translate(s,a),l!==0&&r.rotate(l),(d!==0||f!==0)&&r.skew(d,f),(c!==1||u!==1)&&r.scale(c,u),(p!==0||g!==0)&&r.translate(-1*p,-1*g),r.dirty=!1,r}clone(t){var n=je.Util.cloneObject(this.attrs),r,s,a,l,c;for(r in t)n[r]=t[r];var u=new this.constructor(n);for(r in this.eventListeners)for(s=this.eventListeners[r],a=s.length,l=0;l<a;l++)c=s[l],c.name.indexOf(sq)<0&&(u.eventListeners[r]||(u.eventListeners[r]=[]),u.eventListeners[r].push(c));return u}_toKonvaCanvas(t){t=t||{};var n=this.getClientRect(),r=this.getStage(),s=t.x!==void 0?t.x:Math.floor(n.x),a=t.y!==void 0?t.y:Math.floor(n.y),l=t.pixelRatio||1,c=new Ba.SceneCanvas({width:t.width||Math.ceil(n.width)||(r?r.width():0),height:t.height||Math.ceil(n.height)||(r?r.height():0),pixelRatio:l}),u=c.getContext();const d=new Ba.SceneCanvas({width:c.width/c.pixelRatio+Math.abs(s),height:c.height/c.pixelRatio+Math.abs(a),pixelRatio:c.pixelRatio});return t.imageSmoothingEnabled===!1&&(u._context.imageSmoothingEnabled=!1),u.save(),(s||a)&&u.translate(-1*s,-1*a),this.drawScene(c,void 0,d),u.restore(),c}toCanvas(t){return this._toKonvaCanvas(t)._canvas}toDataURL(t){t=t||{};var n=t.mimeType||null,r=t.quality||null,s=this._toKonvaCanvas(t).toDataURL(n,r);return t.callback&&t.callback(s),s}toImage(t){return new Promise((n,r)=>{try{const s=t==null?void 0:t.callback;s&&delete t.callback,je.Util._urlToImage(this.toDataURL(t),function(a){n(a),s==null||s(a)})}catch(s){r(s)}})}toBlob(t){return new Promise((n,r)=>{try{const s=t==null?void 0:t.callback;s&&delete t.callback,this.toCanvas(t).toBlob(a=>{n(a),s==null||s(a)},t==null?void 0:t.mimeType,t==null?void 0:t.quality)}catch(s){r(s)}})}setSize(t){return this.width(t.width),this.height(t.height),this}getSize(){return{width:this.width(),height:this.height()}}getClassName(){return this.className||this.nodeType}getType(){return this.nodeType}getDragDistance(){return this.attrs.dragDistance!==void 0?this.attrs.dragDistance:this.parent?this.parent.getDragDistance():ki.Konva.dragDistance}_off(t,n,r){var s=this.eventListeners[t],a,l,c;for(a=0;a<s.length;a++)if(l=s[a].name,c=s[a].handler,(l!=="konva"||n==="konva")&&(!n||l===n)&&(!r||r===c)){if(s.splice(a,1),s.length===0){delete this.eventListeners[t];break}a--}}_fireChangeEvent(t,n,r){this._fire(t+iq,{oldVal:n,newVal:r})}addName(t){if(!this.hasName(t)){var n=this.name(),r=n?n+" "+t:t;this.name(r)}return this}hasName(t){if(!t)return!1;const n=this.name();if(!n)return!1;var r=(n||"").split(/\s/g);return r.indexOf(t)!==-1}removeName(t){var n=(this.name()||"").split(/\s/g),r=n.indexOf(t);return r!==-1&&(n.splice(r,1),this.name(n.join(" "))),this}setAttr(t,n){var r=this[Yw+je.Util._capitalize(t)];return je.Util._isFunction(r)?r.call(this,n):this._setAttr(t,n),this}_requestDraw(){if(ki.Konva.autoDrawEnabled){const t=this.getLayer()||this.getStage();t==null||t.batchDraw()}}_setAttr(t,n){var r=this.attrs[t];r===n&&!je.Util.isObject(n)||(n==null?delete this.attrs[t]:this.attrs[t]=n,this._shouldFireChangeEvents&&this._fireChangeEvent(t,r,n),this._requestDraw())}_setComponentAttr(t,n,r){var s;r!==void 0&&(s=this.attrs[t],s||(this.attrs[t]=this.getAttr(t)),this.attrs[t][n]=r,this._fireChangeEvent(t,s,r))}_fireAndBubble(t,n,r){n&&this.nodeType===Jw&&(n.target=this);var s=(t===Ww||t===Kw)&&(r&&(this===r||this.isAncestorOf&&this.isAncestorOf(r))||this.nodeType==="Stage"&&!r);if(!s){this._fire(t,n);var a=(t===Ww||t===Kw)&&r&&r.isAncestorOf&&r.isAncestorOf(this)&&!r.isAncestorOf(this.parent);(n&&!n.cancelBubble||!n)&&this.parent&&this.parent.isListening()&&!a&&(r&&r.parent?this._fireAndBubble.call(this.parent,t,n,r):this._fireAndBubble.call(this.parent,t,n))}}_getProtoListeners(t){var n,r,s;const a=(n=this._cache.get(Wc))!==null&&n!==void 0?n:{};let l=a==null?void 0:a[t];if(l===void 0){l=[];let c=Object.getPrototypeOf(this);for(;c;){const u=(s=(r=c.eventListeners)===null||r===void 0?void 0:r[t])!==null&&s!==void 0?s:[];l.push(...u),c=Object.getPrototypeOf(c)}a[t]=l,this._cache.set(Wc,a)}return l}_fire(t,n){n=n||{},n.currentTarget=this,n.type=t;const r=this._getProtoListeners(t);if(r)for(var s=0;s<r.length;s++)r[s].handler.call(this,n);const a=this.eventListeners[t];if(a)for(var s=0;s<a.length;s++)a[s].handler.call(this,n)}draw(){return this.drawScene(),this.drawHit(),this}_createDragElement(t){var n=t?t.pointerId:void 0,r=this.getStage(),s=this.getAbsolutePosition();if(r){var a=r._getPointerById(n)||r._changedPointerPositions[0]||s;Pn.DD._dragElements.set(this._id,{node:this,startPointerPos:a,offset:{x:a.x-s.x,y:a.y-s.y},dragStatus:"ready",pointerId:n})}}startDrag(t,n=!0){Pn.DD._dragElements.has(this._id)||this._createDragElement(t);const r=Pn.DD._dragElements.get(this._id);r.dragStatus="dragging",this.fire("dragstart",{type:"dragstart",target:this,evt:t&&t.evt},n)}_setDragPosition(t,n){const r=this.getStage()._getPointerById(n.pointerId);if(r){var s={x:r.x-n.offset.x,y:r.y-n.offset.y},a=this.dragBoundFunc();if(a!==void 0){const l=a.call(this,s,t);l?s=l:je.Util.warn("dragBoundFunc did not return any value. That is unexpected behavior. You must return new absolute position from dragBoundFunc.")}(!this._lastPos||this._lastPos.x!==s.x||this._lastPos.y!==s.y)&&(this.setAbsolutePosition(s),this._requestDraw()),this._lastPos=s}}stopDrag(t){const n=Pn.DD._dragElements.get(this._id);n&&(n.dragStatus="stopped"),Pn.DD._endDragBefore(t),Pn.DD._endDragAfter(t)}setDraggable(t){this._setAttr("draggable",t),this._dragChange()}isDragging(){const t=Pn.DD._dragElements.get(this._id);return t?t.dragStatus==="dragging":!1}_listenDrag(){this._dragCleanup(),this.on("mousedown.konva touchstart.konva",function(t){var n=t.evt.button!==void 0,r=!n||ki.Konva.dragButtons.indexOf(t.evt.button)>=0;if(r&&!this.isDragging()){var s=!1;Pn.DD._dragElements.forEach(a=>{this.isAncestorOf(a.node)&&(s=!0)}),s||this._createDragElement(t)}})}_dragChange(){if(this.attrs.draggable)this._listenDrag();else{this._dragCleanup();var t=this.getStage();if(!t)return;const n=Pn.DD._dragElements.get(this._id),r=n&&n.dragStatus==="dragging",s=n&&n.dragStatus==="ready";r?this.stopDrag():s&&Pn.DD._dragElements.delete(this._id)}}_dragCleanup(){this.off("mousedown.konva"),this.off("touchstart.konva")}isClientRectOnScreen(t={x:0,y:0}){const n=this.getStage();if(!n)return!1;const r={x:-t.x,y:-t.y,width:n.width()+2*t.x,height:n.height()+2*t.y};return je.Util.haveIntersection(r,this.getClientRect())}static create(t,n){return je.Util._isString(t)&&(t=JSON.parse(t)),this._createNode(t,n)}static _createNode(t,n){var r=Ie.prototype.getClassName.call(t),s=t.children,a,l,c;n&&(t.attrs.container=n),ki.Konva[r]||(je.Util.warn('Can not find a node with class name "'+r+'". Fallback to "Shape".'),r="Shape");const u=ki.Konva[r];if(a=new u(t.attrs),s)for(l=s.length,c=0;c<l;c++)a.add(Ie._createNode(s[c]));return a}}xi.Node=Ie,Ie.prototype.nodeType="Node",Ie.prototype._attrsAffectingSize=[],Ie.prototype.eventListeners={},Ie.prototype.on.call(Ie.prototype,lq,function(){if(this._batchingTransformChange){this._needClearTransformCache=!0;return}this._clearCache(Ni),this._clearSelfAndDescendantCache(ni)}),Ie.prototype.on.call(Ie.prototype,"visibleChange.konva",function(){this._clearSelfAndDescendantCache(yp)}),Ie.prototype.on.call(Ie.prototype,"listeningChange.konva",function(){this._clearSelfAndDescendantCache(vp)}),Ie.prototype.on.call(Ie.prototype,"opacityChange.konva",function(){this._clearSelfAndDescendantCache(Gc)});const et=Ia.Factory.addGetterSetter;et(Ie,"zIndex"),et(Ie,"absolutePosition"),et(Ie,"position"),et(Ie,"x",0,(0,Ct.getNumberValidator)()),et(Ie,"y",0,(0,Ct.getNumberValidator)()),et(Ie,"globalCompositeOperation","source-over",(0,Ct.getStringValidator)()),et(Ie,"opacity",1,(0,Ct.getNumberValidator)()),et(Ie,"name","",(0,Ct.getStringValidator)()),et(Ie,"id","",(0,Ct.getStringValidator)()),et(Ie,"rotation",0,(0,Ct.getNumberValidator)()),Ia.Factory.addComponentsGetterSetter(Ie,"scale",["x","y"]),et(Ie,"scaleX",1,(0,Ct.getNumberValidator)()),et(Ie,"scaleY",1,(0,Ct.getNumberValidator)()),Ia.Factory.addComponentsGetterSetter(Ie,"skew",["x","y"]),et(Ie,"skewX",0,(0,Ct.getNumberValidator)()),et(Ie,"skewY",0,(0,Ct.getNumberValidator)()),Ia.Factory.addComponentsGetterSetter(Ie,"offset",["x","y"]),et(Ie,"offsetX",0,(0,Ct.getNumberValidator)()),et(Ie,"offsetY",0,(0,Ct.getNumberValidator)()),et(Ie,"dragDistance",null,(0,Ct.getNumberValidator)()),et(Ie,"width",0,(0,Ct.getNumberValidator)()),et(Ie,"height",0,(0,Ct.getNumberValidator)()),et(Ie,"listening",!0,(0,Ct.getBooleanValidator)()),et(Ie,"preventDefault",!0,(0,Ct.getBooleanValidator)()),et(Ie,"filters",null,function(e){return this._filterUpToDate=!1,e}),et(Ie,"visible",!0,(0,Ct.getBooleanValidator)()),et(Ie,"transformsEnabled","all",(0,Ct.getStringValidator)()),et(Ie,"size"),et(Ie,"dragBoundFunc"),et(Ie,"draggable",!1,(0,Ct.getBooleanValidator)()),Ia.Factory.backCompat(Ie,{rotateDeg:"rotate",setRotationDeg:"setRotation",getRotationDeg:"getRotation"});var uo={};Object.defineProperty(uo,"__esModule",{value:!0}),uo.Container=void 0;const rs=cn,bp=xi,Yc=qe;class fo extends bp.Node{constructor(){super(...arguments),this.children=[]}getChildren(t){if(!t)return this.children||[];const n=this.children||[];var r=[];return n.forEach(function(s){t(s)&&r.push(s)}),r}hasChildren(){return this.getChildren().length>0}removeChildren(){return this.getChildren().forEach(t=>{t.parent=null,t.index=0,t.remove()}),this.children=[],this._requestDraw(),this}destroyChildren(){return this.getChildren().forEach(t=>{t.parent=null,t.index=0,t.destroy()}),this.children=[],this._requestDraw(),this}add(...t){if(t.length===0)return this;if(t.length>1){for(var n=0;n<t.length;n++)this.add(t[n]);return this}const r=t[0];return r.getParent()?(r.moveTo(this),this):(this._validateAdd(r),r.index=this.getChildren().length,r.parent=this,r._clearCaches(),this.getChildren().push(r),this._fire("add",{child:r}),this._requestDraw(),this)}destroy(){return this.hasChildren()&&this.destroyChildren(),super.destroy(),this}find(t){return this._generalFind(t,!1)}findOne(t){var n=this._generalFind(t,!0);return n.length>0?n[0]:void 0}_generalFind(t,n){var r=[];return this._descendants(s=>{const a=s._isMatch(t);return a&&r.push(s),!!(a&&n)}),r}_descendants(t){let n=!1;const r=this.getChildren();for(const s of r){if(n=t(s),n)return!0;if(s.hasChildren()&&(n=s._descendants(t),n))return!0}return!1}toObject(){var t=bp.Node.prototype.toObject.call(this);return t.children=[],this.getChildren().forEach(n=>{t.children.push(n.toObject())}),t}isAncestorOf(t){for(var n=t.getParent();n;){if(n._id===this._id)return!0;n=n.getParent()}return!1}clone(t){var n=bp.Node.prototype.clone.call(this,t);return this.getChildren().forEach(function(r){n.add(r.clone())}),n}getAllIntersections(t){var n=[];return this.find("Shape").forEach(r=>{r.isVisible()&&r.intersects(t)&&n.push(r)}),n}_clearSelfAndDescendantCache(t){var n;super._clearSelfAndDescendantCache(t),!this.isCached()&&((n=this.children)===null||n===void 0||n.forEach(function(r){r._clearSelfAndDescendantCache(t)}))}_setChildrenIndices(){var t;(t=this.children)===null||t===void 0||t.forEach(function(n,r){n.index=r}),this._requestDraw()}drawScene(t,n,r){var s=this.getLayer(),a=t||s&&s.getCanvas(),l=a&&a.getContext(),c=this._getCanvasCache(),u=c&&c.scene,d=a&&a.isCache;if(!this.isVisible()&&!d)return this;if(u){l.save();var f=this.getAbsoluteTransform(n).getMatrix();l.transform(f[0],f[1],f[2],f[3],f[4],f[5]),this._drawCachedSceneCanvas(l),l.restore()}else this._drawChildren("drawScene",a,n,r);return this}drawHit(t,n){if(!this.shouldDrawHit(n))return this;var r=this.getLayer(),s=t||r&&r.hitCanvas,a=s&&s.getContext(),l=this._getCanvasCache(),c=l&&l.hit;if(c){a.save();var u=this.getAbsoluteTransform(n).getMatrix();a.transform(u[0],u[1],u[2],u[3],u[4],u[5]),this._drawCachedHitCanvas(a),a.restore()}else this._drawChildren("drawHit",s,n);return this}_drawChildren(t,n,r,s){var a,l=n&&n.getContext(),c=this.clipWidth(),u=this.clipHeight(),d=this.clipFunc(),f=typeof c=="number"&&typeof u=="number"||d;const p=r===this;if(f){l.save();var g=this.getAbsoluteTransform(r),v=g.getMatrix();l.transform(v[0],v[1],v[2],v[3],v[4],v[5]),l.beginPath();let C;if(d)C=d.call(this,l,this);else{var b=this.clipX(),w=this.clipY();l.rect(b||0,w||0,c,u)}l.clip.apply(l,C),v=g.copy().invert().getMatrix(),l.transform(v[0],v[1],v[2],v[3],v[4],v[5])}var _=!p&&this.globalCompositeOperation()!=="source-over"&&t==="drawScene";_&&(l.save(),l._applyGlobalCompositeOperation(this)),(a=this.children)===null||a===void 0||a.forEach(function(C){C[t](n,r,s)}),_&&l.restore(),f&&l.restore()}getClientRect(t={}){var n,r=t.skipTransform,s=t.relativeTo,a,l,c,u,d={x:1/0,y:1/0,width:0,height:0},f=this;(n=this.children)===null||n===void 0||n.forEach(function(w){if(w.visible()){var _=w.getClientRect({relativeTo:f,skipShadow:t.skipShadow,skipStroke:t.skipStroke});_.width===0&&_.height===0||(a===void 0?(a=_.x,l=_.y,c=_.x+_.width,u=_.y+_.height):(a=Math.min(a,_.x),l=Math.min(l,_.y),c=Math.max(c,_.x+_.width),u=Math.max(u,_.y+_.height)))}});for(var p=this.find("Shape"),g=!1,v=0;v<p.length;v++){var b=p[v];if(b._isVisible(this)){g=!0;break}}return g&&a!==void 0?d={x:a,y:l,width:c-a,height:u-l}:d={x:0,y:0,width:0,height:0},r?d:this._transformedRect(d,s)}}uo.Container=fo,rs.Factory.addComponentsGetterSetter(fo,"clip",["x","y","width","height"]),rs.Factory.addGetterSetter(fo,"clipX",void 0,(0,Yc.getNumberValidator)()),rs.Factory.addGetterSetter(fo,"clipY",void 0,(0,Yc.getNumberValidator)()),rs.Factory.addGetterSetter(fo,"clipWidth",void 0,(0,Yc.getNumberValidator)()),rs.Factory.addGetterSetter(fo,"clipHeight",void 0,(0,Yc.getNumberValidator)()),rs.Factory.addGetterSetter(fo,"clipFunc");var Qw={},yn={};Object.defineProperty(yn,"__esModule",{value:!0}),yn.releaseCapture=yn.setPointerCapture=yn.hasPointerCapture=yn.createEvent=yn.getCapturedShape=void 0;const dq=st,La=new Map,Zw=dq.Konva._global.PointerEvent!==void 0;function uq(e){return La.get(e)}yn.getCapturedShape=uq;function wp(e){return{evt:e,pointerId:e.pointerId}}yn.createEvent=wp;function fq(e,t){return La.get(e)===t}yn.hasPointerCapture=fq;function hq(e,t){Vw(e),t.getStage()&&(La.set(e,t),Zw&&t._fire("gotpointercapture",wp(new PointerEvent("gotpointercapture"))))}yn.setPointerCapture=hq;function Vw(e,t){const n=La.get(e);if(!n)return;const r=n.getStage();r&&r.content,La.delete(e),Zw&&n._fire("lostpointercapture",wp(new PointerEvent("lostpointercapture")))}yn.releaseCapture=Vw,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Stage=e.stages=void 0;const t=Pt,n=cn,r=uo,s=st,a=ir,l=Hc,c=st,u=yn;var d="Stage",f="string",p="px",g="mouseout",v="mouseleave",b="mouseover",w="mouseenter",_="mousemove",C="mousedown",k="mouseup",S="pointermove",E="pointerdown",N="pointerup",A="pointercancel",I="lostpointercapture",O="pointerout",F="pointerleave",P="pointerover",M="pointerenter",W="contextmenu",U="touchstart",Q="touchend",q="touchmove",D="touchcancel",j="wheel",K=5,H=[[w,"_pointerenter"],[C,"_pointerdown"],[_,"_pointermove"],[k,"_pointerup"],[v,"_pointerleave"],[U,"_pointerdown"],[q,"_pointermove"],[Q,"_pointerup"],[D,"_pointercancel"],[b,"_pointerover"],[j,"_wheel"],[W,"_contextmenu"],[E,"_pointerdown"],[S,"_pointermove"],[N,"_pointerup"],[A,"_pointercancel"],[I,"_lostpointercapture"]];const R={mouse:{[O]:g,[F]:v,[P]:b,[M]:w,[S]:_,[E]:C,[N]:k,[A]:"mousecancel",pointerclick:"click",pointerdblclick:"dblclick"},touch:{[O]:"touchout",[F]:"touchleave",[P]:"touchover",[M]:"touchenter",[S]:q,[E]:U,[N]:Q,[A]:D,pointerclick:"tap",pointerdblclick:"dbltap"},pointer:{[O]:O,[F]:F,[P]:P,[M]:M,[S]:S,[E]:E,[N]:N,[A]:A,pointerclick:"pointerclick",pointerdblclick:"pointerdblclick"}},ie=re=>re.indexOf("pointer")>=0?"pointer":re.indexOf("touch")>=0?"touch":"mouse",ee=re=>{const z=ie(re);if(z==="pointer")return s.Konva.pointerEventsEnabled&&R.pointer;if(z==="touch")return R.touch;if(z==="mouse")return R.mouse};function Y(re={}){return(re.clipFunc||re.clipWidth||re.clipHeight)&&t.Util.warn("Stage does not support clipping. Please use clip for Layers or Groups."),re}const J="Pointer position is missing and not registered by the stage. Looks like it is outside of the stage container. You can set it manually from event: stage.setPointersPositions(event);";e.stages=[];class oe extends r.Container{constructor(z){super(Y(z)),this._pointerPositions=[],this._changedPointerPositions=[],this._buildDOM(),this._bindContentEvents(),e.stages.push(this),this.on("widthChange.konva heightChange.konva",this._resizeDOM),this.on("visibleChange.konva",this._checkVisibility),this.on("clipWidthChange.konva clipHeightChange.konva clipFuncChange.konva",()=>{Y(this.attrs)}),this._checkVisibility()}_validateAdd(z){const G=z.getType()==="Layer",te=z.getType()==="FastLayer";G||te||t.Util.throw("You may only add layers to the stage.")}_checkVisibility(){if(!this.content)return;const z=this.visible()?"":"none";this.content.style.display=z}setContainer(z){if(typeof z===f){if(z.charAt(0)==="."){var G=z.slice(1);z=document.getElementsByClassName(G)[0]}else{var te;z.charAt(0)!=="#"?te=z:te=z.slice(1),z=document.getElementById(te)}if(!z)throw"Can not find container in document with id "+te}return this._setAttr("container",z),this.content&&(this.content.parentElement&&this.content.parentElement.removeChild(this.content),z.appendChild(this.content)),this}shouldDrawHit(){return!0}clear(){var z=this.children,G=z.length,te;for(te=0;te<G;te++)z[te].clear();return this}clone(z){return z||(z={}),z.container=typeof document!="undefined"&&document.createElement("div"),r.Container.prototype.clone.call(this,z)}destroy(){super.destroy();var z=this.content;z&&t.Util._isInDocument(z)&&this.container().removeChild(z);var G=e.stages.indexOf(this);return G>-1&&e.stages.splice(G,1),t.Util.releaseCanvas(this.bufferCanvas._canvas,this.bufferHitCanvas._canvas),this}getPointerPosition(){const z=this._pointerPositions[0]||this._changedPointerPositions[0];return z?{x:z.x,y:z.y}:(t.Util.warn(J),null)}_getPointerById(z){return this._pointerPositions.find(G=>G.id===z)}getPointersPositions(){return this._pointerPositions}getStage(){return this}getContent(){return this.content}_toKonvaCanvas(z){z=z||{},z.x=z.x||0,z.y=z.y||0,z.width=z.width||this.width(),z.height=z.height||this.height();var G=new a.SceneCanvas({width:z.width,height:z.height,pixelRatio:z.pixelRatio||1}),te=G.getContext()._context,le=this.children;return(z.x||z.y)&&te.translate(-1*z.x,-1*z.y),le.forEach(function(de){if(de.isVisible()){var ye=de._toKonvaCanvas(z);te.drawImage(ye._canvas,z.x,z.y,ye.getWidth()/ye.getPixelRatio(),ye.getHeight()/ye.getPixelRatio())}}),G}getIntersection(z){if(!z)return null;var G=this.children,te=G.length,le=te-1,de;for(de=le;de>=0;de--){const ye=G[de].getIntersection(z);if(ye)return ye}return null}_resizeDOM(){var z=this.width(),G=this.height();this.content&&(this.content.style.width=z+p,this.content.style.height=G+p),this.bufferCanvas.setSize(z,G),this.bufferHitCanvas.setSize(z,G),this.children.forEach(te=>{te.setSize({width:z,height:G}),te.draw()})}add(z,...G){if(arguments.length>1){for(var te=0;te<arguments.length;te++)this.add(arguments[te]);return this}super.add(z);var le=this.children.length;return le>K&&t.Util.warn("The stage has "+le+" layers. Recommended maximum number of layers is 3-5. Adding more layers into the stage may drop the performance. Rethink your tree structure, you can use Konva.Group."),z.setSize({width:this.width(),height:this.height()}),z.draw(),s.Konva.isBrowser&&this.content.appendChild(z.canvas._canvas),this}getParent(){return null}getLayer(){return null}hasPointerCapture(z){return u.hasPointerCapture(z,this)}setPointerCapture(z){u.setPointerCapture(z,this)}releaseCapture(z){u.releaseCapture(z,this)}getLayers(){return this.children}_bindContentEvents(){s.Konva.isBrowser&&H.forEach(([z,G])=>{this.content.addEventListener(z,te=>{this[G](te)},{passive:!1})})}_pointerenter(z){this.setPointersPositions(z);const G=ee(z.type);G&&this._fire(G.pointerenter,{evt:z,target:this,currentTarget:this})}_pointerover(z){this.setPointersPositions(z);const G=ee(z.type);G&&this._fire(G.pointerover,{evt:z,target:this,currentTarget:this})}_getTargetShape(z){let G=this[z+"targetShape"];return G&&!G.getStage()&&(G=null),G}_pointerleave(z){const G=ee(z.type),te=ie(z.type);if(G){this.setPointersPositions(z);var le=this._getTargetShape(te),de=!(s.Konva.isDragging()||s.Konva.isTransforming())||s.Konva.hitOnDragEnabled;le&&de?(le._fireAndBubble(G.pointerout,{evt:z}),le._fireAndBubble(G.pointerleave,{evt:z}),this._fire(G.pointerleave,{evt:z,target:this,currentTarget:this}),this[te+"targetShape"]=null):de&&(this._fire(G.pointerleave,{evt:z,target:this,currentTarget:this}),this._fire(G.pointerout,{evt:z,target:this,currentTarget:this})),this.pointerPos=null,this._pointerPositions=[]}}_pointerdown(z){const G=ee(z.type),te=ie(z.type);if(G){this.setPointersPositions(z);var le=!1;this._changedPointerPositions.forEach(de=>{var ye=this.getIntersection(de);if(l.DD.justDragged=!1,s.Konva["_"+te+"ListenClick"]=!0,!ye||!ye.isListening()){this[te+"ClickStartShape"]=void 0;return}s.Konva.capturePointerEventsEnabled&&ye.setPointerCapture(de.id),this[te+"ClickStartShape"]=ye,ye._fireAndBubble(G.pointerdown,{evt:z,pointerId:de.id}),le=!0;const be=z.type.indexOf("touch")>=0;ye.preventDefault()&&z.cancelable&&be&&z.preventDefault()}),le||this._fire(G.pointerdown,{evt:z,target:this,currentTarget:this,pointerId:this._pointerPositions[0].id})}}_pointermove(z){const G=ee(z.type),te=ie(z.type);if(!G)return;s.Konva.isDragging()&&l.DD.node.preventDefault()&&z.cancelable&&z.preventDefault(),this.setPointersPositions(z);var le=!(s.Konva.isDragging()||s.Konva.isTransforming())||s.Konva.hitOnDragEnabled;if(!le)return;var de={};let ye=!1;var be=this._getTargetShape(te);this._changedPointerPositions.forEach(Se=>{const Be=u.getCapturedShape(Se.id)||this.getIntersection(Se),tt=Se.id,Ee={evt:z,pointerId:tt};var Te=be!==Be;if(Te&&be&&(be._fireAndBubble(G.pointerout,ne({},Ee),Be),be._fireAndBubble(G.pointerleave,ne({},Ee),Be)),Be){if(de[Be._id])return;de[Be._id]=!0}Be&&Be.isListening()?(ye=!0,Te&&(Be._fireAndBubble(G.pointerover,ne({},Ee),be),Be._fireAndBubble(G.pointerenter,ne({},Ee),be),this[te+"targetShape"]=Be),Be._fireAndBubble(G.pointermove,ne({},Ee))):be&&(this._fire(G.pointerover,{evt:z,target:this,currentTarget:this,pointerId:tt}),this[te+"targetShape"]=null)}),ye||this._fire(G.pointermove,{evt:z,target:this,currentTarget:this,pointerId:this._changedPointerPositions[0].id})}_pointerup(z){const G=ee(z.type),te=ie(z.type);if(!G)return;this.setPointersPositions(z);const le=this[te+"ClickStartShape"],de=this[te+"ClickEndShape"];var ye={};let be=!1;this._changedPointerPositions.forEach(Se=>{const Be=u.getCapturedShape(Se.id)||this.getIntersection(Se);if(Be){if(Be.releaseCapture(Se.id),ye[Be._id])return;ye[Be._id]=!0}const tt=Se.id,Ee={evt:z,pointerId:tt};let Te=!1;s.Konva["_"+te+"InDblClickWindow"]?(Te=!0,clearTimeout(this[te+"DblTimeout"])):l.DD.justDragged||(s.Konva["_"+te+"InDblClickWindow"]=!0,clearTimeout(this[te+"DblTimeout"])),this[te+"DblTimeout"]=setTimeout(function(){s.Konva["_"+te+"InDblClickWindow"]=!1},s.Konva.dblClickWindow),Be&&Be.isListening()?(be=!0,this[te+"ClickEndShape"]=Be,Be._fireAndBubble(G.pointerup,ne({},Ee)),s.Konva["_"+te+"ListenClick"]&&le&&le===Be&&(Be._fireAndBubble(G.pointerclick,ne({},Ee)),Te&&de&&de===Be&&Be._fireAndBubble(G.pointerdblclick,ne({},Ee)))):(this[te+"ClickEndShape"]=null,s.Konva["_"+te+"ListenClick"]&&this._fire(G.pointerclick,{evt:z,target:this,currentTarget:this,pointerId:tt}),Te&&this._fire(G.pointerdblclick,{evt:z,target:this,currentTarget:this,pointerId:tt}))}),be||this._fire(G.pointerup,{evt:z,target:this,currentTarget:this,pointerId:this._changedPointerPositions[0].id}),s.Konva["_"+te+"ListenClick"]=!1,z.cancelable&&te!=="touch"&&z.preventDefault()}_contextmenu(z){this.setPointersPositions(z);var G=this.getIntersection(this.getPointerPosition());G&&G.isListening()?G._fireAndBubble(W,{evt:z}):this._fire(W,{evt:z,target:this,currentTarget:this})}_wheel(z){this.setPointersPositions(z);var G=this.getIntersection(this.getPointerPosition());G&&G.isListening()?G._fireAndBubble(j,{evt:z}):this._fire(j,{evt:z,target:this,currentTarget:this})}_pointercancel(z){this.setPointersPositions(z);const G=u.getCapturedShape(z.pointerId)||this.getIntersection(this.getPointerPosition());G&&G._fireAndBubble(N,u.createEvent(z)),u.releaseCapture(z.pointerId)}_lostpointercapture(z){u.releaseCapture(z.pointerId)}setPointersPositions(z){var G=this._getContentPosition(),te=null,le=null;z=z||window.event,z.touches!==void 0?(this._pointerPositions=[],this._changedPointerPositions=[],Array.prototype.forEach.call(z.touches,de=>{this._pointerPositions.push({id:de.identifier,x:(de.clientX-G.left)/G.scaleX,y:(de.clientY-G.top)/G.scaleY})}),Array.prototype.forEach.call(z.changedTouches||z.touches,de=>{this._changedPointerPositions.push({id:de.identifier,x:(de.clientX-G.left)/G.scaleX,y:(de.clientY-G.top)/G.scaleY})})):(te=(z.clientX-G.left)/G.scaleX,le=(z.clientY-G.top)/G.scaleY,this.pointerPos={x:te,y:le},this._pointerPositions=[{x:te,y:le,id:t.Util._getFirstPointerId(z)}],this._changedPointerPositions=[{x:te,y:le,id:t.Util._getFirstPointerId(z)}])}_setPointerPosition(z){t.Util.warn('Method _setPointerPosition is deprecated. Use "stage.setPointersPositions(event)" instead.'),this.setPointersPositions(z)}_getContentPosition(){if(!this.content||!this.content.getBoundingClientRect)return{top:0,left:0,scaleX:1,scaleY:1};var z=this.content.getBoundingClientRect();return{top:z.top,left:z.left,scaleX:z.width/this.content.clientWidth||1,scaleY:z.height/this.content.clientHeight||1}}_buildDOM(){if(this.bufferCanvas=new a.SceneCanvas({width:this.width(),height:this.height()}),this.bufferHitCanvas=new a.HitCanvas({pixelRatio:1,width:this.width(),height:this.height()}),!!s.Konva.isBrowser){var z=this.container();if(!z)throw"Stage has no container. A container is required.";z.innerHTML="",this.content=document.createElement("div"),this.content.style.position="relative",this.content.style.userSelect="none",this.content.className="konvajs-content",this.content.setAttribute("role","presentation"),z.appendChild(this.content),this._resizeDOM()}}cache(){return t.Util.warn("Cache function is not allowed for stage. You may use cache only for layers, groups and shapes."),this}clearCache(){return this}batchDraw(){return this.getChildren().forEach(function(z){z.batchDraw()}),this}}e.Stage=oe,oe.prototype.nodeType=d,(0,c._registerNode)(oe),n.Factory.addGetterSetter(oe,"container"),s.Konva.isBrowser&&document.addEventListener("visibilitychange",()=>{e.stages.forEach(re=>{re.batchDraw()})})}(Qw);var Ra={},ri={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Shape=e.shapes=void 0;const t=st,n=Pt,r=cn,s=xi,a=qe,l=st,c=yn;var u="hasShadow",d="shadowRGBA",f="patternImage",p="linearGradient",g="radialGradient";let v;function b(){return v||(v=n.Util.createCanvasElement().getContext("2d"),v)}e.shapes={};function w(F){const P=this.attrs.fillRule;P?F.fill(P):F.fill()}function _(F){F.stroke()}function C(F){const P=this.attrs.fillRule;P?F.fill(P):F.fill()}function k(F){F.stroke()}function S(){this._clearCache(u)}function E(){this._clearCache(d)}function N(){this._clearCache(f)}function A(){this._clearCache(p)}function I(){this._clearCache(g)}class O extends s.Node{constructor(P){super(P);let M;for(;M=n.Util.getRandomColor(),!(M&&!(M in e.shapes)););this.colorKey=M,e.shapes[M]=this}getContext(){return n.Util.warn("shape.getContext() method is deprecated. Please do not use it."),this.getLayer().getContext()}getCanvas(){return n.Util.warn("shape.getCanvas() method is deprecated. Please do not use it."),this.getLayer().getCanvas()}getSceneFunc(){return this.attrs.sceneFunc||this._sceneFunc}getHitFunc(){return this.attrs.hitFunc||this._hitFunc}hasShadow(){return this._getCache(u,this._hasShadow)}_hasShadow(){return this.shadowEnabled()&&this.shadowOpacity()!==0&&!!(this.shadowColor()||this.shadowBlur()||this.shadowOffsetX()||this.shadowOffsetY())}_getFillPattern(){return this._getCache(f,this.__getFillPattern)}__getFillPattern(){if(this.fillPatternImage()){var P=b();const M=P.createPattern(this.fillPatternImage(),this.fillPatternRepeat()||"repeat");if(M&&M.setTransform){const W=new n.Transform;W.translate(this.fillPatternX(),this.fillPatternY()),W.rotate(t.Konva.getAngle(this.fillPatternRotation())),W.scale(this.fillPatternScaleX(),this.fillPatternScaleY()),W.translate(-1*this.fillPatternOffsetX(),-1*this.fillPatternOffsetY());const U=W.getMatrix(),Q=typeof DOMMatrix=="undefined"?{a:U[0],b:U[1],c:U[2],d:U[3],e:U[4],f:U[5]}:new DOMMatrix(U);M.setTransform(Q)}return M}}_getLinearGradient(){return this._getCache(p,this.__getLinearGradient)}__getLinearGradient(){var P=this.fillLinearGradientColorStops();if(P){for(var M=b(),W=this.fillLinearGradientStartPoint(),U=this.fillLinearGradientEndPoint(),Q=M.createLinearGradient(W.x,W.y,U.x,U.y),q=0;q<P.length;q+=2)Q.addColorStop(P[q],P[q+1]);return Q}}_getRadialGradient(){return this._getCache(g,this.__getRadialGradient)}__getRadialGradient(){var P=this.fillRadialGradientColorStops();if(P){for(var M=b(),W=this.fillRadialGradientStartPoint(),U=this.fillRadialGradientEndPoint(),Q=M.createRadialGradient(W.x,W.y,this.fillRadialGradientStartRadius(),U.x,U.y,this.fillRadialGradientEndRadius()),q=0;q<P.length;q+=2)Q.addColorStop(P[q],P[q+1]);return Q}}getShadowRGBA(){return this._getCache(d,this._getShadowRGBA)}_getShadowRGBA(){if(this.hasShadow()){var P=n.Util.colorToRGBA(this.shadowColor());if(P)return"rgba("+P.r+","+P.g+","+P.b+","+P.a*(this.shadowOpacity()||1)+")"}}hasFill(){return this._calculate("hasFill",["fillEnabled","fill","fillPatternImage","fillLinearGradientColorStops","fillRadialGradientColorStops"],()=>this.fillEnabled()&&!!(this.fill()||this.fillPatternImage()||this.fillLinearGradientColorStops()||this.fillRadialGradientColorStops()))}hasStroke(){return this._calculate("hasStroke",["strokeEnabled","strokeWidth","stroke","strokeLinearGradientColorStops"],()=>this.strokeEnabled()&&this.strokeWidth()&&!!(this.stroke()||this.strokeLinearGradientColorStops()))}hasHitStroke(){const P=this.hitStrokeWidth();return P==="auto"?this.hasStroke():this.strokeEnabled()&&!!P}intersects(P){var M=this.getStage();if(!M)return!1;const W=M.bufferHitCanvas;return W.getContext().clear(),this.drawHit(W,void 0,!0),W.context.getImageData(Math.round(P.x),Math.round(P.y),1,1).data[3]>0}destroy(){return s.Node.prototype.destroy.call(this),delete e.shapes[this.colorKey],delete this.colorKey,this}_useBufferCanvas(P){var M;if(!((M=this.attrs.perfectDrawEnabled)!==null&&M!==void 0?M:!0))return!1;const U=P||this.hasFill(),Q=this.hasStroke(),q=this.getAbsoluteOpacity()!==1;if(U&&Q&&q)return!0;const D=this.hasShadow(),j=this.shadowForStrokeEnabled();return!!(U&&Q&&D&&j)}setStrokeHitEnabled(P){n.Util.warn("strokeHitEnabled property is deprecated. Please use hitStrokeWidth instead."),P?this.hitStrokeWidth("auto"):this.hitStrokeWidth(0)}getStrokeHitEnabled(){return this.hitStrokeWidth()!==0}getSelfRect(){var P=this.size();return{x:this._centroid?-P.width/2:0,y:this._centroid?-P.height/2:0,width:P.width,height:P.height}}getClientRect(P={}){let M=!1,W=this.getParent();for(;W;){if(W.isCached()){M=!0;break}W=W.getParent()}const U=P.skipTransform,Q=P.relativeTo||M&&this.getStage()||void 0,q=this.getSelfRect(),j=!P.skipStroke&&this.hasStroke()&&this.strokeWidth()||0,K=q.width+j,H=q.height+j,R=!P.skipShadow&&this.hasShadow(),ie=R?this.shadowOffsetX():0,ee=R?this.shadowOffsetY():0,Y=K+Math.abs(ie),J=H+Math.abs(ee),oe=R&&this.shadowBlur()||0,re=Y+oe*2,z=J+oe*2,G={width:re,height:z,x:-(j/2+oe)+Math.min(ie,0)+q.x,y:-(j/2+oe)+Math.min(ee,0)+q.y};return U?G:this._transformedRect(G,Q)}drawScene(P,M,W){var U=this.getLayer(),Q=P||U.getCanvas(),q=Q.getContext(),D=this._getCanvasCache(),j=this.getSceneFunc(),K=this.hasShadow(),H,R,ie=Q.isCache,ee=M===this;if(!this.isVisible()&&!ee)return this;if(D){q.save();var Y=this.getAbsoluteTransform(M).getMatrix();return q.transform(Y[0],Y[1],Y[2],Y[3],Y[4],Y[5]),this._drawCachedSceneCanvas(q),q.restore(),this}if(!j)return this;if(q.save(),this._useBufferCanvas()&&!ie){H=this.getStage();const re=W||H.bufferCanvas;R=re.getContext(),R.clear(),R.save(),R._applyLineJoin(this);var J=this.getAbsoluteTransform(M).getMatrix();R.transform(J[0],J[1],J[2],J[3],J[4],J[5]),j.call(this,R,this),R.restore();var oe=re.pixelRatio;K&&q._applyShadow(this),q._applyOpacity(this),q._applyGlobalCompositeOperation(this),q.drawImage(re._canvas,0,0,re.width/oe,re.height/oe)}else{if(q._applyLineJoin(this),!ee){var J=this.getAbsoluteTransform(M).getMatrix();q.transform(J[0],J[1],J[2],J[3],J[4],J[5]),q._applyOpacity(this),q._applyGlobalCompositeOperation(this)}K&&q._applyShadow(this),j.call(this,q,this)}return q.restore(),this}drawHit(P,M,W=!1){if(!this.shouldDrawHit(M,W))return this;var U=this.getLayer(),Q=P||U.hitCanvas,q=Q&&Q.getContext(),D=this.hitFunc()||this.sceneFunc(),j=this._getCanvasCache(),K=j&&j.hit;if(this.colorKey||n.Util.warn("Looks like your canvas has a destroyed shape in it. Do not reuse shape after you destroyed it. If you want to reuse shape you should call remove() instead of destroy()"),K){q.save();var H=this.getAbsoluteTransform(M).getMatrix();return q.transform(H[0],H[1],H[2],H[3],H[4],H[5]),this._drawCachedHitCanvas(q),q.restore(),this}if(!D)return this;if(q.save(),q._applyLineJoin(this),!(this===M)){var ie=this.getAbsoluteTransform(M).getMatrix();q.transform(ie[0],ie[1],ie[2],ie[3],ie[4],ie[5])}return D.call(this,q,this),q.restore(),this}drawHitFromCache(P=0){var M=this._getCanvasCache(),W=this._getCachedSceneCanvas(),U=M.hit,Q=U.getContext(),q=U.getWidth(),D=U.getHeight(),j,K,H,R,ie,ee;Q.clear(),Q.drawImage(W._canvas,0,0,q,D);try{for(j=Q.getImageData(0,0,q,D),K=j.data,H=K.length,R=n.Util._hexToRgb(this.colorKey),ie=0;ie<H;ie+=4)ee=K[ie+3],ee>P?(K[ie]=R.r,K[ie+1]=R.g,K[ie+2]=R.b,K[ie+3]=255):K[ie+3]=0;Q.putImageData(j,0,0)}catch(Y){n.Util.error("Unable to draw hit graph from cached scene canvas. "+Y.message)}return this}hasPointerCapture(P){return c.hasPointerCapture(P,this)}setPointerCapture(P){c.setPointerCapture(P,this)}releaseCapture(P){c.releaseCapture(P,this)}}e.Shape=O,O.prototype._fillFunc=w,O.prototype._strokeFunc=_,O.prototype._fillFuncHit=C,O.prototype._strokeFuncHit=k,O.prototype._centroid=!1,O.prototype.nodeType="Shape",(0,l._registerNode)(O),O.prototype.eventListeners={},O.prototype.on.call(O.prototype,"shadowColorChange.konva shadowBlurChange.konva shadowOffsetChange.konva shadowOpacityChange.konva shadowEnabledChange.konva",S),O.prototype.on.call(O.prototype,"shadowColorChange.konva shadowOpacityChange.konva shadowEnabledChange.konva",E),O.prototype.on.call(O.prototype,"fillPriorityChange.konva fillPatternImageChange.konva fillPatternRepeatChange.konva fillPatternScaleXChange.konva fillPatternScaleYChange.konva fillPatternOffsetXChange.konva fillPatternOffsetYChange.konva fillPatternXChange.konva fillPatternYChange.konva fillPatternRotationChange.konva",N),O.prototype.on.call(O.prototype,"fillPriorityChange.konva fillLinearGradientColorStopsChange.konva fillLinearGradientStartPointXChange.konva fillLinearGradientStartPointYChange.konva fillLinearGradientEndPointXChange.konva fillLinearGradientEndPointYChange.konva",A),O.prototype.on.call(O.prototype,"fillPriorityChange.konva fillRadialGradientColorStopsChange.konva fillRadialGradientStartPointXChange.konva fillRadialGradientStartPointYChange.konva fillRadialGradientEndPointXChange.konva fillRadialGradientEndPointYChange.konva fillRadialGradientStartRadiusChange.konva fillRadialGradientEndRadiusChange.konva",I),r.Factory.addGetterSetter(O,"stroke",void 0,(0,a.getStringOrGradientValidator)()),r.Factory.addGetterSetter(O,"strokeWidth",2,(0,a.getNumberValidator)()),r.Factory.addGetterSetter(O,"fillAfterStrokeEnabled",!1),r.Factory.addGetterSetter(O,"hitStrokeWidth","auto",(0,a.getNumberOrAutoValidator)()),r.Factory.addGetterSetter(O,"strokeHitEnabled",!0,(0,a.getBooleanValidator)()),r.Factory.addGetterSetter(O,"perfectDrawEnabled",!0,(0,a.getBooleanValidator)()),r.Factory.addGetterSetter(O,"shadowForStrokeEnabled",!0,(0,a.getBooleanValidator)()),r.Factory.addGetterSetter(O,"lineJoin"),r.Factory.addGetterSetter(O,"lineCap"),r.Factory.addGetterSetter(O,"sceneFunc"),r.Factory.addGetterSetter(O,"hitFunc"),r.Factory.addGetterSetter(O,"dash"),r.Factory.addGetterSetter(O,"dashOffset",0,(0,a.getNumberValidator)()),r.Factory.addGetterSetter(O,"shadowColor",void 0,(0,a.getStringValidator)()),r.Factory.addGetterSetter(O,"shadowBlur",0,(0,a.getNumberValidator)()),r.Factory.addGetterSetter(O,"shadowOpacity",1,(0,a.getNumberValidator)()),r.Factory.addComponentsGetterSetter(O,"shadowOffset",["x","y"]),r.Factory.addGetterSetter(O,"shadowOffsetX",0,(0,a.getNumberValidator)()),r.Factory.addGetterSetter(O,"shadowOffsetY",0,(0,a.getNumberValidator)()),r.Factory.addGetterSetter(O,"fillPatternImage"),r.Factory.addGetterSetter(O,"fill",void 0,(0,a.getStringOrGradientValidator)()),r.Factory.addGetterSetter(O,"fillPatternX",0,(0,a.getNumberValidator)()),r.Factory.addGetterSetter(O,"fillPatternY",0,(0,a.getNumberValidator)()),r.Factory.addGetterSetter(O,"fillLinearGradientColorStops"),r.Factory.addGetterSetter(O,"strokeLinearGradientColorStops"),r.Factory.addGetterSetter(O,"fillRadialGradientStartRadius",0),r.Factory.addGetterSetter(O,"fillRadialGradientEndRadius",0),r.Factory.addGetterSetter(O,"fillRadialGradientColorStops"),r.Factory.addGetterSetter(O,"fillPatternRepeat","repeat"),r.Factory.addGetterSetter(O,"fillEnabled",!0),r.Factory.addGetterSetter(O,"strokeEnabled",!0),r.Factory.addGetterSetter(O,"shadowEnabled",!0),r.Factory.addGetterSetter(O,"dashEnabled",!0),r.Factory.addGetterSetter(O,"strokeScaleEnabled",!0),r.Factory.addGetterSetter(O,"fillPriority","color"),r.Factory.addComponentsGetterSetter(O,"fillPatternOffset",["x","y"]),r.Factory.addGetterSetter(O,"fillPatternOffsetX",0,(0,a.getNumberValidator)()),r.Factory.addGetterSetter(O,"fillPatternOffsetY",0,(0,a.getNumberValidator)()),r.Factory.addComponentsGetterSetter(O,"fillPatternScale",["x","y"]),r.Factory.addGetterSetter(O,"fillPatternScaleX",1,(0,a.getNumberValidator)()),r.Factory.addGetterSetter(O,"fillPatternScaleY",1,(0,a.getNumberValidator)()),r.Factory.addComponentsGetterSetter(O,"fillLinearGradientStartPoint",["x","y"]),r.Factory.addComponentsGetterSetter(O,"strokeLinearGradientStartPoint",["x","y"]),r.Factory.addGetterSetter(O,"fillLinearGradientStartPointX",0),r.Factory.addGetterSetter(O,"strokeLinearGradientStartPointX",0),r.Factory.addGetterSetter(O,"fillLinearGradientStartPointY",0),r.Factory.addGetterSetter(O,"strokeLinearGradientStartPointY",0),r.Factory.addComponentsGetterSetter(O,"fillLinearGradientEndPoint",["x","y"]),r.Factory.addComponentsGetterSetter(O,"strokeLinearGradientEndPoint",["x","y"]),r.Factory.addGetterSetter(O,"fillLinearGradientEndPointX",0),r.Factory.addGetterSetter(O,"strokeLinearGradientEndPointX",0),r.Factory.addGetterSetter(O,"fillLinearGradientEndPointY",0),r.Factory.addGetterSetter(O,"strokeLinearGradientEndPointY",0),r.Factory.addComponentsGetterSetter(O,"fillRadialGradientStartPoint",["x","y"]),r.Factory.addGetterSetter(O,"fillRadialGradientStartPointX",0),r.Factory.addGetterSetter(O,"fillRadialGradientStartPointY",0),r.Factory.addComponentsGetterSetter(O,"fillRadialGradientEndPoint",["x","y"]),r.Factory.addGetterSetter(O,"fillRadialGradientEndPointX",0),r.Factory.addGetterSetter(O,"fillRadialGradientEndPointY",0),r.Factory.addGetterSetter(O,"fillPatternRotation",0),r.Factory.addGetterSetter(O,"fillRule",void 0,(0,a.getStringValidator)()),r.Factory.backCompat(O,{dashArray:"dash",getDashArray:"getDash",setDashArray:"getDash",drawFunc:"sceneFunc",getDrawFunc:"getSceneFunc",setDrawFunc:"setSceneFunc",drawHitFunc:"hitFunc",getDrawHitFunc:"getHitFunc",setDrawHitFunc:"setHitFunc"})})(ri),Object.defineProperty(Ra,"__esModule",{value:!0}),Ra.Layer=void 0;const ii=Pt,_p=uo,is=xi,Cp=cn,e_=ir,pq=qe,gq=ri,mq=st;var vq="#",yq="beforeDraw",bq="draw",t_=[{x:0,y:0},{x:-1,y:-1},{x:1,y:-1},{x:1,y:1},{x:-1,y:1}],wq=t_.length;class os extends _p.Container{constructor(t){super(t),this.canvas=new e_.SceneCanvas,this.hitCanvas=new e_.HitCanvas({pixelRatio:1}),this._waitingForDraw=!1,this.on("visibleChange.konva",this._checkVisibility),this._checkVisibility(),this.on("imageSmoothingEnabledChange.konva",this._setSmoothEnabled),this._setSmoothEnabled()}createPNGStream(){return this.canvas._canvas.createPNGStream()}getCanvas(){return this.canvas}getNativeCanvasElement(){return this.canvas._canvas}getHitCanvas(){return this.hitCanvas}getContext(){return this.getCanvas().getContext()}clear(t){return this.getContext().clear(t),this.getHitCanvas().getContext().clear(t),this}setZIndex(t){super.setZIndex(t);var n=this.getStage();return n&&n.content&&(n.content.removeChild(this.getNativeCanvasElement()),t<n.children.length-1?n.content.insertBefore(this.getNativeCanvasElement(),n.children[t+1].getCanvas()._canvas):n.content.appendChild(this.getNativeCanvasElement())),this}moveToTop(){is.Node.prototype.moveToTop.call(this);var t=this.getStage();return t&&t.content&&(t.content.removeChild(this.getNativeCanvasElement()),t.content.appendChild(this.getNativeCanvasElement())),!0}moveUp(){var t=is.Node.prototype.moveUp.call(this);if(!t)return!1;var n=this.getStage();return!n||!n.content?!1:(n.content.removeChild(this.getNativeCanvasElement()),this.index<n.children.length-1?n.content.insertBefore(this.getNativeCanvasElement(),n.children[this.index+1].getCanvas()._canvas):n.content.appendChild(this.getNativeCanvasElement()),!0)}moveDown(){if(is.Node.prototype.moveDown.call(this)){var t=this.getStage();if(t){var n=t.children;t.content&&(t.content.removeChild(this.getNativeCanvasElement()),t.content.insertBefore(this.getNativeCanvasElement(),n[this.index+1].getCanvas()._canvas))}return!0}return!1}moveToBottom(){if(is.Node.prototype.moveToBottom.call(this)){var t=this.getStage();if(t){var n=t.children;t.content&&(t.content.removeChild(this.getNativeCanvasElement()),t.content.insertBefore(this.getNativeCanvasElement(),n[1].getCanvas()._canvas))}return!0}return!1}getLayer(){return this}remove(){var t=this.getNativeCanvasElement();return is.Node.prototype.remove.call(this),t&&t.parentNode&&ii.Util._isInDocument(t)&&t.parentNode.removeChild(t),this}getStage(){return this.parent}setSize({width:t,height:n}){return this.canvas.setSize(t,n),this.hitCanvas.setSize(t,n),this._setSmoothEnabled(),this}_validateAdd(t){var n=t.getType();n!=="Group"&&n!=="Shape"&&ii.Util.throw("You may only add groups and shapes to a layer.")}_toKonvaCanvas(t){return t=t||{},t.width=t.width||this.getWidth(),t.height=t.height||this.getHeight(),t.x=t.x!==void 0?t.x:this.x(),t.y=t.y!==void 0?t.y:this.y(),is.Node.prototype._toKonvaCanvas.call(this,t)}_checkVisibility(){this.visible()?this.canvas._canvas.style.display="block":this.canvas._canvas.style.display="none"}_setSmoothEnabled(){this.getContext()._context.imageSmoothingEnabled=this.imageSmoothingEnabled()}getWidth(){if(this.parent)return this.parent.width()}setWidth(){ii.Util.warn('Can not change width of layer. Use "stage.width(value)" function instead.')}getHeight(){if(this.parent)return this.parent.height()}setHeight(){ii.Util.warn('Can not change height of layer. Use "stage.height(value)" function instead.')}batchDraw(){return this._waitingForDraw||(this._waitingForDraw=!0,ii.Util.requestAnimFrame(()=>{this.draw(),this._waitingForDraw=!1})),this}getIntersection(t){if(!this.isListening()||!this.isVisible())return null;for(var n=1,r=!1;;){for(let s=0;s<wq;s++){const a=t_[s],l=this._getIntersection({x:t.x+a.x*n,y:t.y+a.y*n}),c=l.shape;if(c)return c;if(r=!!l.antialiased,!l.antialiased)break}if(r)n+=1;else return null}}_getIntersection(t){const n=this.hitCanvas.pixelRatio,r=this.hitCanvas.context.getImageData(Math.round(t.x*n),Math.round(t.y*n),1,1).data,s=r[3];if(s===255){const a=ii.Util._rgbToHex(r[0],r[1],r[2]),l=gq.shapes[vq+a];return l?{shape:l}:{antialiased:!0}}else if(s>0)return{antialiased:!0};return{}}drawScene(t,n){var r=this.getLayer(),s=t||r&&r.getCanvas();return this._fire(yq,{node:this}),this.clearBeforeDraw()&&s.getContext().clear(),_p.Container.prototype.drawScene.call(this,s,n),this._fire(bq,{node:this}),this}drawHit(t,n){var r=this.getLayer(),s=t||r&&r.hitCanvas;return r&&r.clearBeforeDraw()&&r.getHitCanvas().getContext().clear(),_p.Container.prototype.drawHit.call(this,s,n),this}enableHitGraph(){return this.hitGraphEnabled(!0),this}disableHitGraph(){return this.hitGraphEnabled(!1),this}setHitGraphEnabled(t){ii.Util.warn("hitGraphEnabled method is deprecated. Please use layer.listening() instead."),this.listening(t)}getHitGraphEnabled(t){return ii.Util.warn("hitGraphEnabled method is deprecated. Please use layer.listening() instead."),this.listening()}toggleHitCanvas(){if(!(!this.parent||!this.parent.content)){var t=this.parent,n=!!this.hitCanvas._canvas.parentNode;n?t.content.removeChild(this.hitCanvas._canvas):t.content.appendChild(this.hitCanvas._canvas)}}destroy(){return ii.Util.releaseCanvas(this.getNativeCanvasElement(),this.getHitCanvas()._canvas),super.destroy()}}Ra.Layer=os,os.prototype.nodeType="Layer",(0,mq._registerNode)(os),Cp.Factory.addGetterSetter(os,"imageSmoothingEnabled",!0),Cp.Factory.addGetterSetter(os,"clearBeforeDraw",!0),Cp.Factory.addGetterSetter(os,"hitGraphEnabled",!0,(0,pq.getBooleanValidator)());var Jc={};Object.defineProperty(Jc,"__esModule",{value:!0}),Jc.FastLayer=void 0;const _q=Pt,Cq=Ra,Sq=st;class Sp extends Cq.Layer{constructor(t){super(t),this.listening(!1),_q.Util.warn('Konva.Fast layer is deprecated. Please use "new Konva.Layer({ listening: false })" instead.')}}Jc.FastLayer=Sp,Sp.prototype.nodeType="FastLayer",(0,Sq._registerNode)(Sp);var Xc={};Object.defineProperty(Xc,"__esModule",{value:!0}),Xc.Group=void 0;const Eq=Pt,xq=uo,kq=st;class Ep extends xq.Container{_validateAdd(t){var n=t.getType();n!=="Group"&&n!=="Shape"&&Eq.Util.throw("You may only add groups and shapes to groups.")}}Xc.Group=Ep,Ep.prototype.nodeType="Group",(0,kq._registerNode)(Ep);var Pa={};Object.defineProperty(Pa,"__esModule",{value:!0}),Pa.Animation=void 0;const xp=st,n_=Pt,kp=function(){return xp.glob.performance&&xp.glob.performance.now?function(){return xp.glob.performance.now()}:function(){return new Date().getTime()}}();class Ar{constructor(t,n){this.id=Ar.animIdCounter++,this.frame={time:0,timeDiff:0,lastTime:kp(),frameRate:0},this.func=t,this.setLayers(n)}setLayers(t){let n=[];return t&&(n=Array.isArray(t)?t:[t]),this.layers=n,this}getLayers(){return this.layers}addLayer(t){const n=this.layers,r=n.length;for(let s=0;s<r;s++)if(n[s]._id===t._id)return!1;return this.layers.push(t),!0}isRunning(){const n=Ar.animations,r=n.length;for(let s=0;s<r;s++)if(n[s].id===this.id)return!0;return!1}start(){return this.stop(),this.frame.timeDiff=0,this.frame.lastTime=kp(),Ar._addAnimation(this),this}stop(){return Ar._removeAnimation(this),this}_updateFrameObject(t){this.frame.timeDiff=t-this.frame.lastTime,this.frame.lastTime=t,this.frame.time+=this.frame.timeDiff,this.frame.frameRate=1e3/this.frame.timeDiff}static _addAnimation(t){this.animations.push(t),this._handleAnimation()}static _removeAnimation(t){const n=t.id,r=this.animations,s=r.length;for(let a=0;a<s;a++)if(r[a].id===n){this.animations.splice(a,1);break}}static _runFrames(){const t={},n=this.animations;for(let r=0;r<n.length;r++){const s=n[r],a=s.layers,l=s.func;s._updateFrameObject(kp());const c=a.length;let u;if(l?u=l.call(s,s.frame)!==!1:u=!0,!!u)for(let d=0;d<c;d++){const f=a[d];f._id!==void 0&&(t[f._id]=f)}}for(let r in t)t.hasOwnProperty(r)&&t[r].batchDraw()}static _animationLoop(){const t=Ar;t.animations.length?(t._runFrames(),n_.Util.requestAnimFrame(t._animationLoop)):t.animRunning=!1}static _handleAnimation(){this.animRunning||(this.animRunning=!0,n_.Util.requestAnimFrame(this._animationLoop))}}Pa.Animation=Ar,Ar.animations=[],Ar.animIdCounter=0,Ar.animRunning=!1;var r_={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Easings=e.Tween=void 0;const t=Pt,n=Pa,r=xi,s=st;var a={node:1,duration:1,easing:1,onFinish:1,yoyo:1},l=1,c=2,u=3,d=0,f=["fill","stroke","shadowColor"];class p{constructor(b,w,_,C,k,S,E){this.prop=b,this.propFunc=w,this.begin=C,this._pos=C,this.duration=S,this._change=0,this.prevPos=0,this.yoyo=E,this._time=0,this._position=0,this._startTime=0,this._finish=0,this.func=_,this._change=k-this.begin,this.pause()}fire(b){var w=this[b];w&&w()}setTime(b){b>this.duration?this.yoyo?(this._time=this.duration,this.reverse()):this.finish():b<0?this.yoyo?(this._time=0,this.play()):this.reset():(this._time=b,this.update())}getTime(){return this._time}setPosition(b){this.prevPos=this._pos,this.propFunc(b),this._pos=b}getPosition(b){return b===void 0&&(b=this._time),this.func(b,this.begin,this._change,this.duration)}play(){this.state=c,this._startTime=this.getTimer()-this._time,this.onEnterFrame(),this.fire("onPlay")}reverse(){this.state=u,this._time=this.duration-this._time,this._startTime=this.getTimer()-this._time,this.onEnterFrame(),this.fire("onReverse")}seek(b){this.pause(),this._time=b,this.update(),this.fire("onSeek")}reset(){this.pause(),this._time=0,this.update(),this.fire("onReset")}finish(){this.pause(),this._time=this.duration,this.update(),this.fire("onFinish")}update(){this.setPosition(this.getPosition(this._time)),this.fire("onUpdate")}onEnterFrame(){var b=this.getTimer()-this._startTime;this.state===c?this.setTime(b):this.state===u&&this.setTime(this.duration-b)}pause(){this.state=l,this.fire("onPause")}getTimer(){return new Date().getTime()}}class g{constructor(b){var w=this,_=b.node,C=_._id,k,S=b.easing||e.Easings.Linear,E=!!b.yoyo,N;typeof b.duration=="undefined"?k=.3:b.duration===0?k=.001:k=b.duration,this.node=_,this._id=d++;var A=_.getLayer()||(_ instanceof s.Konva.Stage?_.getLayers():null);A||t.Util.error("Tween constructor have `node` that is not in a layer. Please add node into layer first."),this.anim=new n.Animation(function(){w.tween.onEnterFrame()},A),this.tween=new p(N,function(I){w._tweenFunc(I)},S,0,1,k*1e3,E),this._addListeners(),g.attrs[C]||(g.attrs[C]={}),g.attrs[C][this._id]||(g.attrs[C][this._id]={}),g.tweens[C]||(g.tweens[C]={});for(N in b)a[N]===void 0&&this._addAttr(N,b[N]);this.reset(),this.onFinish=b.onFinish,this.onReset=b.onReset,this.onUpdate=b.onUpdate}_addAttr(b,w){var _=this.node,C=_._id,k,S,E,N,A,I,O,F;if(E=g.tweens[C][b],E&&delete g.attrs[C][E][b],k=_.getAttr(b),t.Util._isArray(w))if(S=[],A=Math.max(w.length,k.length),b==="points"&&w.length!==k.length&&(w.length>k.length?(O=k,k=t.Util._prepareArrayForTween(k,w,_.closed())):(I=w,w=t.Util._prepareArrayForTween(w,k,_.closed()))),b.indexOf("fill")===0)for(N=0;N<A;N++)if(N%2===0)S.push(w[N]-k[N]);else{var P=t.Util.colorToRGBA(k[N]);F=t.Util.colorToRGBA(w[N]),k[N]=P,S.push({r:F.r-P.r,g:F.g-P.g,b:F.b-P.b,a:F.a-P.a})}else for(N=0;N<A;N++)S.push(w[N]-k[N]);else f.indexOf(b)!==-1?(k=t.Util.colorToRGBA(k),F=t.Util.colorToRGBA(w),S={r:F.r-k.r,g:F.g-k.g,b:F.b-k.b,a:F.a-k.a}):S=w-k;g.attrs[C][this._id][b]={start:k,diff:S,end:w,trueEnd:I,trueStart:O},g.tweens[C][b]=this._id}_tweenFunc(b){var w=this.node,_=g.attrs[w._id][this._id],C,k,S,E,N,A,I,O;for(C in _){if(k=_[C],S=k.start,E=k.diff,O=k.end,t.Util._isArray(S))if(N=[],I=Math.max(S.length,O.length),C.indexOf("fill")===0)for(A=0;A<I;A++)A%2===0?N.push((S[A]||0)+E[A]*b):N.push("rgba("+Math.round(S[A].r+E[A].r*b)+","+Math.round(S[A].g+E[A].g*b)+","+Math.round(S[A].b+E[A].b*b)+","+(S[A].a+E[A].a*b)+")");else for(A=0;A<I;A++)N.push((S[A]||0)+E[A]*b);else f.indexOf(C)!==-1?N="rgba("+Math.round(S.r+E.r*b)+","+Math.round(S.g+E.g*b)+","+Math.round(S.b+E.b*b)+","+(S.a+E.a*b)+")":N=S+E*b;w.setAttr(C,N)}}_addListeners(){this.tween.onPlay=()=>{this.anim.start()},this.tween.onReverse=()=>{this.anim.start()},this.tween.onPause=()=>{this.anim.stop()},this.tween.onFinish=()=>{var b=this.node,w=g.attrs[b._id][this._id];w.points&&w.points.trueEnd&&b.setAttr("points",w.points.trueEnd),this.onFinish&&this.onFinish.call(this)},this.tween.onReset=()=>{var b=this.node,w=g.attrs[b._id][this._id];w.points&&w.points.trueStart&&b.points(w.points.trueStart),this.onReset&&this.onReset()},this.tween.onUpdate=()=>{this.onUpdate&&this.onUpdate.call(this)}}play(){return this.tween.play(),this}reverse(){return this.tween.reverse(),this}reset(){return this.tween.reset(),this}seek(b){return this.tween.seek(b*1e3),this}pause(){return this.tween.pause(),this}finish(){return this.tween.finish(),this}destroy(){var b=this.node._id,w=this._id,_=g.tweens[b],C;this.pause();for(C in _)delete g.tweens[b][C];delete g.attrs[b][w]}}e.Tween=g,g.attrs={},g.tweens={},r.Node.prototype.to=function(v){var b=v.onFinish;v.node=this,v.onFinish=function(){this.destroy(),b&&b()};var w=new g(v);w.play()},e.Easings={BackEaseIn(v,b,w,_){var C=1.70158;return w*(v/=_)*v*((C+1)*v-C)+b},BackEaseOut(v,b,w,_){var C=1.70158;return w*((v=v/_-1)*v*((C+1)*v+C)+1)+b},BackEaseInOut(v,b,w,_){var C=1.70158;return(v/=_/2)<1?w/2*(v*v*(((C*=1.525)+1)*v-C))+b:w/2*((v-=2)*v*(((C*=1.525)+1)*v+C)+2)+b},ElasticEaseIn(v,b,w,_,C,k){var S=0;return v===0?b:(v/=_)===1?b+w:(k||(k=_*.3),!C||C<Math.abs(w)?(C=w,S=k/4):S=k/(2*Math.PI)*Math.asin(w/C),-(C*Math.pow(2,10*(v-=1))*Math.sin((v*_-S)*(2*Math.PI)/k))+b)},ElasticEaseOut(v,b,w,_,C,k){var S=0;return v===0?b:(v/=_)===1?b+w:(k||(k=_*.3),!C||C<Math.abs(w)?(C=w,S=k/4):S=k/(2*Math.PI)*Math.asin(w/C),C*Math.pow(2,-10*v)*Math.sin((v*_-S)*(2*Math.PI)/k)+w+b)},ElasticEaseInOut(v,b,w,_,C,k){var S=0;return v===0?b:(v/=_/2)===2?b+w:(k||(k=_*(.3*1.5)),!C||C<Math.abs(w)?(C=w,S=k/4):S=k/(2*Math.PI)*Math.asin(w/C),v<1?-.5*(C*Math.pow(2,10*(v-=1))*Math.sin((v*_-S)*(2*Math.PI)/k))+b:C*Math.pow(2,-10*(v-=1))*Math.sin((v*_-S)*(2*Math.PI)/k)*.5+w+b)},BounceEaseOut(v,b,w,_){return(v/=_)<1/2.75?w*(7.5625*v*v)+b:v<2/2.75?w*(7.5625*(v-=1.5/2.75)*v+.75)+b:v<2.5/2.75?w*(7.5625*(v-=2.25/2.75)*v+.9375)+b:w*(7.5625*(v-=2.625/2.75)*v+.984375)+b},BounceEaseIn(v,b,w,_){return w-e.Easings.BounceEaseOut(_-v,0,w,_)+b},BounceEaseInOut(v,b,w,_){return v<_/2?e.Easings.BounceEaseIn(v*2,0,w,_)*.5+b:e.Easings.BounceEaseOut(v*2-_,0,w,_)*.5+w*.5+b},EaseIn(v,b,w,_){return w*(v/=_)*v+b},EaseOut(v,b,w,_){return-w*(v/=_)*(v-2)+b},EaseInOut(v,b,w,_){return(v/=_/2)<1?w/2*v*v+b:-w/2*(--v*(v-2)-1)+b},StrongEaseIn(v,b,w,_){return w*(v/=_)*v*v*v*v+b},StrongEaseOut(v,b,w,_){return w*((v=v/_-1)*v*v*v*v+1)+b},StrongEaseInOut(v,b,w,_){return(v/=_/2)<1?w/2*v*v*v*v*v+b:w/2*((v-=2)*v*v*v*v+2)+b},Linear(v,b,w,_){return w*v/_+b}}})(r_),function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Konva=void 0;const t=st,n=Pt,r=xi,s=uo,a=Qw,l=Ra,c=Jc,u=Xc,d=Hc,f=ri,p=Pa,g=r_,v=ti,b=ir;e.Konva=n.Util._assign(t.Konva,{Util:n.Util,Transform:n.Transform,Node:r.Node,Container:s.Container,Stage:a.Stage,stages:a.stages,Layer:l.Layer,FastLayer:c.FastLayer,Group:u.Group,DD:d.DD,Shape:f.Shape,shapes:f.shapes,Animation:p.Animation,Tween:g.Tween,Easings:g.Easings,Context:v.Context,Canvas:b.Canvas}),e.default=e.Konva}(mp),function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.Konva=void 0;var n=mp;Object.defineProperty(t,"Konva",{enumerable:!0,get:function(){return n.Konva}});const r=mp;e.exports=r.Konva}(gp,gp.exports);var Nq=gp.exports;const Ze=Vy(Nq);var Np={};Object.defineProperty(Np,"__esModule",{value:!0}),Np.Rect=void 0;const Tq=cn,Aq=ri,Oq=st,Iq=Pt,Bq=qe;class Qc extends Aq.Shape{_sceneFunc(t){var n=this.cornerRadius(),r=this.width(),s=this.height();t.beginPath(),n?Iq.Util.drawRoundedRectPath(t,r,s,n):t.rect(0,0,r,s),t.closePath(),t.fillStrokeShape(this)}}Np.Rect=Qc,Qc.prototype.className="Rect",(0,Oq._registerNode)(Qc),Tq.Factory.addGetterSetter(Qc,"cornerRadius",0,(0,Bq.getNumberOrArrayOfNumbersValidator)(4));var Tp={};Object.defineProperty(Tp,"__esModule",{value:!0}),Tp.Circle=void 0;const Lq=cn,Rq=ri,Pq=qe,Dq=st;class ss extends Rq.Shape{_sceneFunc(t){t.beginPath(),t.arc(0,0,this.attrs.radius||0,0,Math.PI*2,!1),t.closePath(),t.fillStrokeShape(this)}getWidth(){return this.radius()*2}getHeight(){return this.radius()*2}setWidth(t){this.radius()!==t/2&&this.radius(t/2)}setHeight(t){this.radius()!==t/2&&this.radius(t/2)}}Tp.Circle=ss,ss.prototype._centroid=!0,ss.prototype.className="Circle",ss.prototype._attrsAffectingSize=["radius"],(0,Dq._registerNode)(ss),Lq.Factory.addGetterSetter(ss,"radius",0,(0,Pq.getNumberValidator)());var Ap={};Object.defineProperty(Ap,"__esModule",{value:!0}),Ap.Image=void 0;const Op=Pt,ho=cn,Mq=ri,Fq=st,Da=qe;let Or=class PC extends Mq.Shape{constructor(t){super(t),this.on("imageChange.konva",()=>{this._setImageLoad()}),this._setImageLoad()}_setImageLoad(){const t=this.image();t&&t.complete||t&&t.readyState===4||t&&t.addEventListener&&t.addEventListener("load",()=>{this._requestDraw()})}_useBufferCanvas(){const t=!!this.cornerRadius(),n=this.hasShadow();return t&&n?!0:super._useBufferCanvas(!0)}_sceneFunc(t){const n=this.getWidth(),r=this.getHeight(),s=this.cornerRadius(),a=this.attrs.image;let l;if(a){const c=this.attrs.cropWidth,u=this.attrs.cropHeight;c&&u?l=[a,this.cropX(),this.cropY(),c,u,0,0,n,r]:l=[a,0,0,n,r]}(this.hasFill()||this.hasStroke()||s)&&(t.beginPath(),s?Op.Util.drawRoundedRectPath(t,n,r,s):t.rect(0,0,n,r),t.closePath(),t.fillStrokeShape(this)),a&&(s&&t.clip(),t.drawImage.apply(t,l))}_hitFunc(t){var n=this.width(),r=this.height(),s=this.cornerRadius();t.beginPath(),s?Op.Util.drawRoundedRectPath(t,n,r,s):t.rect(0,0,n,r),t.closePath(),t.fillStrokeShape(this)}getWidth(){var t,n;return(t=this.attrs.width)!==null&&t!==void 0?t:(n=this.image())===null||n===void 0?void 0:n.width}getHeight(){var t,n;return(t=this.attrs.height)!==null&&t!==void 0?t:(n=this.image())===null||n===void 0?void 0:n.height}static fromURL(t,n,r=null){var s=Op.Util.createImageElement();s.onload=function(){var a=new PC({image:s});n(a)},s.onerror=r,s.crossOrigin="Anonymous",s.src=t}};Ap.Image=Or,Or.prototype.className="Image",(0,Fq._registerNode)(Or),ho.Factory.addGetterSetter(Or,"cornerRadius",0,(0,Da.getNumberOrArrayOfNumbersValidator)(4)),ho.Factory.addGetterSetter(Or,"image"),ho.Factory.addComponentsGetterSetter(Or,"crop",["x","y","width","height"]),ho.Factory.addGetterSetter(Or,"cropX",0,(0,Da.getNumberValidator)()),ho.Factory.addGetterSetter(Or,"cropY",0,(0,Da.getNumberValidator)()),ho.Factory.addGetterSetter(Or,"cropWidth",0,(0,Da.getNumberValidator)()),ho.Factory.addGetterSetter(Or,"cropHeight",0,(0,Da.getNumberValidator)());var Ma={};Object.defineProperty(Ma,"__esModule",{value:!0}),Ma.Text=Ma.stringToArray=void 0;const Ip=Pt,Ht=cn,$q=ri,Bp=st,Ti=qe,zq=st;function i_(e){return[...e].reduce((t,n,r,s)=>(new RegExp("\\p{Emoji_Modifier_Base}\\p{Emoji_Modifier}?(?:\\u200D\\p{Emoji_Presentation})+","u").test(n)?t.push(n):new RegExp("\\p{Regional_Indicator}{2}","u").test(n+(s[r+1]||""))?t.push(n+s[r+1]):r>0&&new RegExp("\\p{Mn}|\\p{Me}|\\p{Mc}","u").test(n)?t[t.length-1]+=n:t.push(n),t),[])}Ma.stringToArray=i_;var as="auto",Uq="center",o_="inherit",Fa="justify",jq="Change.konva",qq="2d",s_="-",a_="left",Hq="text",Gq="Text",Wq="top",Kq="bottom",l_="middle",c_="normal",Yq="px ",Zc=" ",Jq="right",d_="rtl",Xq="word",Qq="char",u_="none",Lp="…",f_=["direction","fontFamily","fontSize","fontStyle","fontVariant","padding","align","verticalAlign","lineHeight","text","width","height","wrap","ellipsis","letterSpacing"],Zq=f_.length;function Vq(e){return e.split(",").map(t=>{t=t.trim();const n=t.indexOf(" ")>=0,r=t.indexOf('"')>=0||t.indexOf("'")>=0;return n&&!r&&(t=`"${t}"`),t}).join(", ")}var Vc;function Rp(){return Vc||(Vc=Ip.Util.createCanvasElement().getContext(qq),Vc)}function eH(e){e.fillText(this._partialText,this._partialTextX,this._partialTextY)}function tH(e){e.setAttr("miterLimit",2),e.strokeText(this._partialText,this._partialTextX,this._partialTextY)}function nH(e){return e=e||{},!e.fillLinearGradientColorStops&&!e.fillRadialGradientColorStops&&!e.fillPatternImage&&(e.fill=e.fill||"black"),e}class vt extends $q.Shape{constructor(t){super(nH(t)),this._partialTextX=0,this._partialTextY=0;for(var n=0;n<Zq;n++)this.on(f_[n]+jq,this._setTextData);this._setTextData()}_sceneFunc(t){var n=this.textArr,r=n.length;if(this.text()){var s=this.padding(),a=this.fontSize(),l=this.lineHeight()*a,c=this.verticalAlign(),u=this.direction(),d=0,f=this.align(),p=this.getWidth(),g=this.letterSpacing(),v=this.fill(),b=this.textDecoration(),w=b.indexOf("underline")!==-1,_=b.indexOf("line-through")!==-1,C;u=u===o_?t.direction:u;var k=l/2,S=l_;if(Bp.Konva._fixTextRendering){var E=this.measureSize("M");S="alphabetic",k=(E.fontBoundingBoxAscent-E.fontBoundingBoxDescent)/2+l/2}var N=0,A=0;for(u===d_&&t.setAttr("direction",u),t.setAttr("font",this._getContextFont()),t.setAttr("textBaseline",S),t.setAttr("textAlign",a_),c===l_?d=(this.getHeight()-r*l-s*2)/2:c===Kq&&(d=this.getHeight()-r*l-s*2),t.translate(s,d+s),C=0;C<r;C++){var N=0,A=0,I=n[C],O=I.text,F=I.width,P=I.lastInParagraph,M,W,U;if(t.save(),f===Jq?N+=p-F-s*2:f===Uq&&(N+=(p-F-s*2)/2),w){t.save(),t.beginPath();let H=Bp.Konva._fixTextRendering?Math.round(a/4):Math.round(a/2);const R=N,ie=k+A+H;t.moveTo(R,ie),M=O.split(" ").length-1,W=M===0,U=f===Fa&&!P?p-s*2:F,t.lineTo(R+Math.round(U),ie),t.lineWidth=a/15;const ee=this._getLinearGradient();t.strokeStyle=ee||v,t.stroke(),t.restore()}if(_){t.save(),t.beginPath();let H=Bp.Konva._fixTextRendering?-Math.round(a/4):0;t.moveTo(N,k+A+H),M=O.split(" ").length-1,W=M===0,U=f===Fa&&P&&!W?p-s*2:F,t.lineTo(N+Math.round(U),k+A+H),t.lineWidth=a/15;const R=this._getLinearGradient();t.strokeStyle=R||v,t.stroke(),t.restore()}if(u!==d_&&(g!==0||f===Fa)){M=O.split(" ").length-1;for(var Q=i_(O),q=0;q<Q.length;q++){var D=Q[q];D===" "&&!P&&f===Fa&&(N+=(p-s*2-F)/M),this._partialTextX=N,this._partialTextY=k+A,this._partialText=D,t.fillStrokeShape(this),N+=this.measureSize(D).width+g}}else g!==0&&t.setAttr("letterSpacing",`${g}px`),this._partialTextX=N,this._partialTextY=k+A,this._partialText=O,t.fillStrokeShape(this);t.restore(),r>1&&(k+=l)}}}_hitFunc(t){var n=this.getWidth(),r=this.getHeight();t.beginPath(),t.rect(0,0,n,r),t.closePath(),t.fillStrokeShape(this)}setText(t){var n=Ip.Util._isString(t)?t:t==null?"":t+"";return this._setAttr(Hq,n),this}getWidth(){var t=this.attrs.width===as||this.attrs.width===void 0;return t?this.getTextWidth()+this.padding()*2:this.attrs.width}getHeight(){var t=this.attrs.height===as||this.attrs.height===void 0;return t?this.fontSize()*this.textArr.length*this.lineHeight()+this.padding()*2:this.attrs.height}getTextWidth(){return this.textWidth}getTextHeight(){return Ip.Util.warn("text.getTextHeight() method is deprecated. Use text.height() - for full height and text.fontSize() - for one line height."),this.textHeight}measureSize(t){var n,r,s,a,l,c,u,d,f,p,g,v=Rp(),b=this.fontSize(),w;v.save(),v.font=this._getContextFont(),w=v.measureText(t),v.restore();const _=b/100;return{actualBoundingBoxAscent:(n=w.actualBoundingBoxAscent)!==null&&n!==void 0?n:71.58203125*_,actualBoundingBoxDescent:(r=w.actualBoundingBoxDescent)!==null&&r!==void 0?r:0,actualBoundingBoxLeft:(s=w.actualBoundingBoxLeft)!==null&&s!==void 0?s:-7.421875*_,actualBoundingBoxRight:(a=w.actualBoundingBoxRight)!==null&&a!==void 0?a:75.732421875*_,alphabeticBaseline:(l=w.alphabeticBaseline)!==null&&l!==void 0?l:0,emHeightAscent:(c=w.emHeightAscent)!==null&&c!==void 0?c:100*_,emHeightDescent:(u=w.emHeightDescent)!==null&&u!==void 0?u:-20*_,fontBoundingBoxAscent:(d=w.fontBoundingBoxAscent)!==null&&d!==void 0?d:91*_,fontBoundingBoxDescent:(f=w.fontBoundingBoxDescent)!==null&&f!==void 0?f:21*_,hangingBaseline:(p=w.hangingBaseline)!==null&&p!==void 0?p:72.80000305175781*_,ideographicBaseline:(g=w.ideographicBaseline)!==null&&g!==void 0?g:-21*_,width:w.width,height:b}}_getContextFont(){return this.fontStyle()+Zc+this.fontVariant()+Zc+(this.fontSize()+Yq)+Vq(this.fontFamily())}_addTextLine(t){this.align()===Fa&&(t=t.trim());var r=this._getTextWidth(t);return this.textArr.push({text:t,width:r,lastInParagraph:!1})}_getTextWidth(t){var n=this.letterSpacing(),r=t.length;return Rp().measureText(t).width+(r?n*(r-1):0)}_setTextData(){var t=this.text().split(`
|
|
133
|
-
`),n=+this.fontSize(),r=0,s=this.lineHeight()*n,a=this.attrs.width,l=this.attrs.height,c=a!==as&&a!==void 0,u=l!==as&&l!==void 0,d=this.padding(),f=a-d*2,p=l-d*2,g=0,v=this.wrap(),b=v!==u_,w=v!==Qq&&b,_=this.ellipsis();this.textArr=[],Rp().font=this._getContextFont();for(var C=_?this._getTextWidth(Lp):0,k=0,S=t.length;k<S;++k){var E=t[k],N=this._getTextWidth(E);if(c&&N>f)for(;E.length>0;){for(var A=0,I=E.length,O="",F=0;A<I;){var P=A+I>>>1,M=E.slice(0,P+1),W=this._getTextWidth(M)+C;W<=f?(A=P+1,O=M,F=W):I=P}if(O){if(w){var U,Q=E[O.length],q=Q===Zc||Q===s_;q&&F<=f?U=O.length:U=Math.max(O.lastIndexOf(Zc),O.lastIndexOf(s_))+1,U>0&&(A=U,O=O.slice(0,A),F=this._getTextWidth(O))}O=O.trimRight(),this._addTextLine(O),r=Math.max(r,F),g+=s;var D=this._shouldHandleEllipsis(g);if(D){this._tryToAddEllipsisToLastLine();break}if(E=E.slice(A),E=E.trimLeft(),E.length>0&&(N=this._getTextWidth(E),N<=f)){this._addTextLine(E),g+=s,r=Math.max(r,N);break}}else break}else this._addTextLine(E),g+=s,r=Math.max(r,N),this._shouldHandleEllipsis(g)&&k<S-1&&this._tryToAddEllipsisToLastLine();if(this.textArr[this.textArr.length-1]&&(this.textArr[this.textArr.length-1].lastInParagraph=!0),u&&g+s>p)break}this.textHeight=n,this.textWidth=r}_shouldHandleEllipsis(t){var n=+this.fontSize(),r=this.lineHeight()*n,s=this.attrs.height,a=s!==as&&s!==void 0,l=this.padding(),c=s-l*2,u=this.wrap(),d=u!==u_;return!d||a&&t+r>c}_tryToAddEllipsisToLastLine(){var t=this.attrs.width,n=t!==as&&t!==void 0,r=this.padding(),s=t-r*2,a=this.ellipsis(),l=this.textArr[this.textArr.length-1];if(!(!l||!a)){if(n){var c=this._getTextWidth(l.text+Lp)<s;c||(l.text=l.text.slice(0,l.text.length-3))}this.textArr.splice(this.textArr.length-1,1),this._addTextLine(l.text+Lp)}}getStrokeScaleEnabled(){return!0}_useBufferCanvas(){const t=this.textDecoration().indexOf("underline")!==-1||this.textDecoration().indexOf("line-through")!==-1,n=this.hasShadow();return t&&n?!0:super._useBufferCanvas()}}Ma.Text=vt,vt.prototype._fillFunc=eH,vt.prototype._strokeFunc=tH,vt.prototype.className=Gq,vt.prototype._attrsAffectingSize=["text","fontSize","padding","wrap","lineHeight","letterSpacing"],(0,zq._registerNode)(vt),Ht.Factory.overWriteSetter(vt,"width",(0,Ti.getNumberOrAutoValidator)()),Ht.Factory.overWriteSetter(vt,"height",(0,Ti.getNumberOrAutoValidator)()),Ht.Factory.addGetterSetter(vt,"direction",o_),Ht.Factory.addGetterSetter(vt,"fontFamily","Arial"),Ht.Factory.addGetterSetter(vt,"fontSize",12,(0,Ti.getNumberValidator)()),Ht.Factory.addGetterSetter(vt,"fontStyle",c_),Ht.Factory.addGetterSetter(vt,"fontVariant",c_),Ht.Factory.addGetterSetter(vt,"padding",0,(0,Ti.getNumberValidator)()),Ht.Factory.addGetterSetter(vt,"align",a_),Ht.Factory.addGetterSetter(vt,"verticalAlign",Wq),Ht.Factory.addGetterSetter(vt,"lineHeight",1,(0,Ti.getNumberValidator)()),Ht.Factory.addGetterSetter(vt,"wrap",Xq),Ht.Factory.addGetterSetter(vt,"ellipsis",!1,(0,Ti.getBooleanValidator)()),Ht.Factory.addGetterSetter(vt,"letterSpacing",0,(0,Ti.getNumberValidator)()),Ht.Factory.addGetterSetter(vt,"text","",(0,Ti.getStringValidator)()),Ht.Factory.addGetterSetter(vt,"textDecoration","");var Pp={},ed={};Object.defineProperty(ed,"__esModule",{value:!0}),ed.Line=void 0;const td=cn,rH=ri,h_=qe,iH=st;function Dp(e,t,n,r,s,a,l){var c=Math.sqrt(Math.pow(n-e,2)+Math.pow(r-t,2)),u=Math.sqrt(Math.pow(s-n,2)+Math.pow(a-r,2)),d=l*c/(c+u),f=l*u/(c+u),p=n-d*(s-e),g=r-d*(a-t),v=n+f*(s-e),b=r+f*(a-t);return[p,g,v,b]}function p_(e,t){var n=e.length,r=[],s,a;for(s=2;s<n-2;s+=2)a=Dp(e[s-2],e[s-1],e[s],e[s+1],e[s+2],e[s+3],t),!isNaN(a[0])&&(r.push(a[0]),r.push(a[1]),r.push(e[s]),r.push(e[s+1]),r.push(a[2]),r.push(a[3]));return r}class Ai extends rH.Shape{constructor(t){super(t),this.on("pointsChange.konva tensionChange.konva closedChange.konva bezierChange.konva",function(){this._clearCache("tensionPoints")})}_sceneFunc(t){var n=this.points(),r=n.length,s=this.tension(),a=this.closed(),l=this.bezier(),c,u,d;if(r){if(t.beginPath(),t.moveTo(n[0],n[1]),s!==0&&r>4){for(c=this.getTensionPoints(),u=c.length,d=a?0:4,a||t.quadraticCurveTo(c[0],c[1],c[2],c[3]);d<u-2;)t.bezierCurveTo(c[d++],c[d++],c[d++],c[d++],c[d++],c[d++]);a||t.quadraticCurveTo(c[u-2],c[u-1],n[r-2],n[r-1])}else if(l)for(d=2;d<r;)t.bezierCurveTo(n[d++],n[d++],n[d++],n[d++],n[d++],n[d++]);else for(d=2;d<r;d+=2)t.lineTo(n[d],n[d+1]);a?(t.closePath(),t.fillStrokeShape(this)):t.strokeShape(this)}}getTensionPoints(){return this._getCache("tensionPoints",this._getTensionPoints)}_getTensionPoints(){return this.closed()?this._getTensionPointsClosed():p_(this.points(),this.tension())}_getTensionPointsClosed(){var t=this.points(),n=t.length,r=this.tension(),s=Dp(t[n-2],t[n-1],t[0],t[1],t[2],t[3],r),a=Dp(t[n-4],t[n-3],t[n-2],t[n-1],t[0],t[1],r),l=p_(t,r),c=[s[2],s[3]].concat(l).concat([a[0],a[1],t[n-2],t[n-1],a[2],a[3],s[0],s[1],t[0],t[1]]);return c}getWidth(){return this.getSelfRect().width}getHeight(){return this.getSelfRect().height}getSelfRect(){var t=this.points();if(t.length<4)return{x:t[0]||0,y:t[1]||0,width:0,height:0};this.tension()!==0?t=[t[0],t[1],...this._getTensionPoints(),t[t.length-2],t[t.length-1]]:t=this.points();for(var n=t[0],r=t[0],s=t[1],a=t[1],l,c,u=0;u<t.length/2;u++)l=t[u*2],c=t[u*2+1],n=Math.min(n,l),r=Math.max(r,l),s=Math.min(s,c),a=Math.max(a,c);return{x:n,y:s,width:r-n,height:a-s}}}ed.Line=Ai,Ai.prototype.className="Line",Ai.prototype._attrsAffectingSize=["points","bezier","tension"],(0,iH._registerNode)(Ai),td.Factory.addGetterSetter(Ai,"closed",!1),td.Factory.addGetterSetter(Ai,"bezier",!1),td.Factory.addGetterSetter(Ai,"tension",0,(0,h_.getNumberValidator)()),td.Factory.addGetterSetter(Ai,"points",[],(0,h_.getNumberArrayValidator)());var nd={},g_={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.t2length=e.getQuadraticArcLength=e.getCubicArcLength=e.binomialCoefficients=e.cValues=e.tValues=void 0,e.tValues=[[],[],[-.5773502691896257,.5773502691896257],[0,-.7745966692414834,.7745966692414834],[-.33998104358485626,.33998104358485626,-.8611363115940526,.8611363115940526],[0,-.5384693101056831,.5384693101056831,-.906179845938664,.906179845938664],[.6612093864662645,-.6612093864662645,-.2386191860831969,.2386191860831969,-.932469514203152,.932469514203152],[0,.4058451513773972,-.4058451513773972,-.7415311855993945,.7415311855993945,-.9491079123427585,.9491079123427585],[-.1834346424956498,.1834346424956498,-.525532409916329,.525532409916329,-.7966664774136267,.7966664774136267,-.9602898564975363,.9602898564975363],[0,-.8360311073266358,.8360311073266358,-.9681602395076261,.9681602395076261,-.3242534234038089,.3242534234038089,-.6133714327005904,.6133714327005904],[-.14887433898163122,.14887433898163122,-.4333953941292472,.4333953941292472,-.6794095682990244,.6794095682990244,-.8650633666889845,.8650633666889845,-.9739065285171717,.9739065285171717],[0,-.26954315595234496,.26954315595234496,-.5190961292068118,.5190961292068118,-.7301520055740494,.7301520055740494,-.8870625997680953,.8870625997680953,-.978228658146057,.978228658146057],[-.1252334085114689,.1252334085114689,-.3678314989981802,.3678314989981802,-.5873179542866175,.5873179542866175,-.7699026741943047,.7699026741943047,-.9041172563704749,.9041172563704749,-.9815606342467192,.9815606342467192],[0,-.2304583159551348,.2304583159551348,-.44849275103644687,.44849275103644687,-.6423493394403402,.6423493394403402,-.8015780907333099,.8015780907333099,-.9175983992229779,.9175983992229779,-.9841830547185881,.9841830547185881],[-.10805494870734367,.10805494870734367,-.31911236892788974,.31911236892788974,-.5152486363581541,.5152486363581541,-.6872929048116855,.6872929048116855,-.827201315069765,.827201315069765,-.9284348836635735,.9284348836635735,-.9862838086968123,.9862838086968123],[0,-.20119409399743451,.20119409399743451,-.3941513470775634,.3941513470775634,-.5709721726085388,.5709721726085388,-.7244177313601701,.7244177313601701,-.8482065834104272,.8482065834104272,-.937273392400706,.937273392400706,-.9879925180204854,.9879925180204854],[-.09501250983763744,.09501250983763744,-.2816035507792589,.2816035507792589,-.45801677765722737,.45801677765722737,-.6178762444026438,.6178762444026438,-.755404408355003,.755404408355003,-.8656312023878318,.8656312023878318,-.9445750230732326,.9445750230732326,-.9894009349916499,.9894009349916499],[0,-.17848418149584785,.17848418149584785,-.3512317634538763,.3512317634538763,-.5126905370864769,.5126905370864769,-.6576711592166907,.6576711592166907,-.7815140038968014,.7815140038968014,-.8802391537269859,.8802391537269859,-.9506755217687678,.9506755217687678,-.9905754753144174,.9905754753144174],[-.0847750130417353,.0847750130417353,-.2518862256915055,.2518862256915055,-.41175116146284263,.41175116146284263,-.5597708310739475,.5597708310739475,-.6916870430603532,.6916870430603532,-.8037049589725231,.8037049589725231,-.8926024664975557,.8926024664975557,-.9558239495713977,.9558239495713977,-.9915651684209309,.9915651684209309],[0,-.16035864564022537,.16035864564022537,-.31656409996362983,.31656409996362983,-.46457074137596094,.46457074137596094,-.600545304661681,.600545304661681,-.7209661773352294,.7209661773352294,-.8227146565371428,.8227146565371428,-.9031559036148179,.9031559036148179,-.96020815213483,.96020815213483,-.9924068438435844,.9924068438435844],[-.07652652113349734,.07652652113349734,-.22778585114164507,.22778585114164507,-.37370608871541955,.37370608871541955,-.5108670019508271,.5108670019508271,-.636053680726515,.636053680726515,-.7463319064601508,.7463319064601508,-.8391169718222188,.8391169718222188,-.912234428251326,.912234428251326,-.9639719272779138,.9639719272779138,-.9931285991850949,.9931285991850949],[0,-.1455618541608951,.1455618541608951,-.2880213168024011,.2880213168024011,-.4243421202074388,.4243421202074388,-.5516188358872198,.5516188358872198,-.6671388041974123,.6671388041974123,-.7684399634756779,.7684399634756779,-.8533633645833173,.8533633645833173,-.9200993341504008,.9200993341504008,-.9672268385663063,.9672268385663063,-.9937521706203895,.9937521706203895],[-.06973927331972223,.06973927331972223,-.20786042668822127,.20786042668822127,-.34193582089208424,.34193582089208424,-.469355837986757,.469355837986757,-.5876404035069116,.5876404035069116,-.6944872631866827,.6944872631866827,-.7878168059792081,.7878168059792081,-.8658125777203002,.8658125777203002,-.926956772187174,.926956772187174,-.9700604978354287,.9700604978354287,-.9942945854823992,.9942945854823992],[0,-.1332568242984661,.1332568242984661,-.26413568097034495,.26413568097034495,-.3903010380302908,.3903010380302908,-.5095014778460075,.5095014778460075,-.6196098757636461,.6196098757636461,-.7186613631319502,.7186613631319502,-.8048884016188399,.8048884016188399,-.8767523582704416,.8767523582704416,-.9329710868260161,.9329710868260161,-.9725424712181152,.9725424712181152,-.9947693349975522,.9947693349975522],[-.06405689286260563,.06405689286260563,-.1911188674736163,.1911188674736163,-.3150426796961634,.3150426796961634,-.4337935076260451,.4337935076260451,-.5454214713888396,.5454214713888396,-.6480936519369755,.6480936519369755,-.7401241915785544,.7401241915785544,-.820001985973903,.820001985973903,-.8864155270044011,.8864155270044011,-.9382745520027328,.9382745520027328,-.9747285559713095,.9747285559713095,-.9951872199970213,.9951872199970213]],e.cValues=[[],[],[1,1],[.8888888888888888,.5555555555555556,.5555555555555556],[.6521451548625461,.6521451548625461,.34785484513745385,.34785484513745385],[.5688888888888889,.47862867049936647,.47862867049936647,.23692688505618908,.23692688505618908],[.3607615730481386,.3607615730481386,.46791393457269104,.46791393457269104,.17132449237917036,.17132449237917036],[.4179591836734694,.3818300505051189,.3818300505051189,.27970539148927664,.27970539148927664,.1294849661688697,.1294849661688697],[.362683783378362,.362683783378362,.31370664587788727,.31370664587788727,.22238103445337448,.22238103445337448,.10122853629037626,.10122853629037626],[.3302393550012598,.1806481606948574,.1806481606948574,.08127438836157441,.08127438836157441,.31234707704000286,.31234707704000286,.26061069640293544,.26061069640293544],[.29552422471475287,.29552422471475287,.26926671930999635,.26926671930999635,.21908636251598204,.21908636251598204,.1494513491505806,.1494513491505806,.06667134430868814,.06667134430868814],[.2729250867779006,.26280454451024665,.26280454451024665,.23319376459199048,.23319376459199048,.18629021092773426,.18629021092773426,.1255803694649046,.1255803694649046,.05566856711617366,.05566856711617366],[.24914704581340277,.24914704581340277,.2334925365383548,.2334925365383548,.20316742672306592,.20316742672306592,.16007832854334622,.16007832854334622,.10693932599531843,.10693932599531843,.04717533638651183,.04717533638651183],[.2325515532308739,.22628318026289723,.22628318026289723,.2078160475368885,.2078160475368885,.17814598076194574,.17814598076194574,.13887351021978725,.13887351021978725,.09212149983772845,.09212149983772845,.04048400476531588,.04048400476531588],[.2152638534631578,.2152638534631578,.2051984637212956,.2051984637212956,.18553839747793782,.18553839747793782,.15720316715819355,.15720316715819355,.12151857068790319,.12151857068790319,.08015808715976021,.08015808715976021,.03511946033175186,.03511946033175186],[.2025782419255613,.19843148532711158,.19843148532711158,.1861610000155622,.1861610000155622,.16626920581699392,.16626920581699392,.13957067792615432,.13957067792615432,.10715922046717194,.10715922046717194,.07036604748810812,.07036604748810812,.03075324199611727,.03075324199611727],[.1894506104550685,.1894506104550685,.18260341504492358,.18260341504492358,.16915651939500254,.16915651939500254,.14959598881657674,.14959598881657674,.12462897125553388,.12462897125553388,.09515851168249279,.09515851168249279,.062253523938647894,.062253523938647894,.027152459411754096,.027152459411754096],[.17944647035620653,.17656270536699264,.17656270536699264,.16800410215645004,.16800410215645004,.15404576107681028,.15404576107681028,.13513636846852548,.13513636846852548,.11188384719340397,.11188384719340397,.08503614831717918,.08503614831717918,.0554595293739872,.0554595293739872,.02414830286854793,.02414830286854793],[.1691423829631436,.1691423829631436,.16427648374583273,.16427648374583273,.15468467512626524,.15468467512626524,.14064291467065065,.14064291467065065,.12255520671147846,.12255520671147846,.10094204410628717,.10094204410628717,.07642573025488905,.07642573025488905,.0497145488949698,.0497145488949698,.02161601352648331,.02161601352648331],[.1610544498487837,.15896884339395434,.15896884339395434,.15276604206585967,.15276604206585967,.1426067021736066,.1426067021736066,.12875396253933621,.12875396253933621,.11156664554733399,.11156664554733399,.09149002162245,.09149002162245,.06904454273764123,.06904454273764123,.0448142267656996,.0448142267656996,.019461788229726478,.019461788229726478],[.15275338713072584,.15275338713072584,.14917298647260374,.14917298647260374,.14209610931838204,.14209610931838204,.13168863844917664,.13168863844917664,.11819453196151841,.11819453196151841,.10193011981724044,.10193011981724044,.08327674157670475,.08327674157670475,.06267204833410907,.06267204833410907,.04060142980038694,.04060142980038694,.017614007139152118,.017614007139152118],[.14608113364969041,.14452440398997005,.14452440398997005,.13988739479107315,.13988739479107315,.13226893863333747,.13226893863333747,.12183141605372853,.12183141605372853,.10879729916714838,.10879729916714838,.09344442345603386,.09344442345603386,.0761001136283793,.0761001136283793,.057134425426857205,.057134425426857205,.036953789770852494,.036953789770852494,.016017228257774335,.016017228257774335],[.13925187285563198,.13925187285563198,.13654149834601517,.13654149834601517,.13117350478706238,.13117350478706238,.12325237681051242,.12325237681051242,.11293229608053922,.11293229608053922,.10041414444288096,.10041414444288096,.08594160621706773,.08594160621706773,.06979646842452049,.06979646842452049,.052293335152683286,.052293335152683286,.03377490158481415,.03377490158481415,.0146279952982722,.0146279952982722],[.13365457218610619,.1324620394046966,.1324620394046966,.12890572218808216,.12890572218808216,.12304908430672953,.12304908430672953,.11499664022241136,.11499664022241136,.10489209146454141,.10489209146454141,.09291576606003515,.09291576606003515,.07928141177671895,.07928141177671895,.06423242140852585,.06423242140852585,.04803767173108467,.04803767173108467,.030988005856979445,.030988005856979445,.013411859487141771,.013411859487141771],[.12793819534675216,.12793819534675216,.1258374563468283,.1258374563468283,.12167047292780339,.12167047292780339,.1155056680537256,.1155056680537256,.10744427011596563,.10744427011596563,.09761865210411388,.09761865210411388,.08619016153195327,.08619016153195327,.0733464814110803,.0733464814110803,.05929858491543678,.05929858491543678,.04427743881741981,.04427743881741981,.028531388628933663,.028531388628933663,.0123412297999872,.0123412297999872]],e.binomialCoefficients=[[1],[1,1],[1,2,1],[1,3,3,1]];const t=(l,c,u)=>{let d,f,p;d=u/2,f=0;for(let v=0;v<20;v++)p=d*e.tValues[20][v]+d,f+=e.cValues[20][v]*r(l,c,p);return d*f};e.getCubicArcLength=t;const n=(l,c,u)=>{u===void 0&&(u=1);const d=l[0]-2*l[1]+l[2],f=c[0]-2*c[1]+c[2],p=2*l[1]-2*l[0],g=2*c[1]-2*c[0],v=4*(d*d+f*f),b=4*(d*p+f*g),w=p*p+g*g;if(v===0)return u*Math.sqrt(Math.pow(l[2]-l[0],2)+Math.pow(c[2]-c[0],2));const _=b/(2*v),C=w/v,k=u+_,S=C-_*_,E=k*k+S>0?Math.sqrt(k*k+S):0,N=_*_+S>0?Math.sqrt(_*_+S):0,A=_+Math.sqrt(_*_+S)!==0?S*Math.log(Math.abs((k+E)/(_+N))):0;return Math.sqrt(v)/2*(k*E-_*N+A)};e.getQuadraticArcLength=n;function r(l,c,u){const d=s(1,u,l),f=s(1,u,c),p=d*d+f*f;return Math.sqrt(p)}const s=(l,c,u)=>{const d=u.length-1;let f,p;if(d===0)return 0;if(l===0){p=0;for(let g=0;g<=d;g++)p+=e.binomialCoefficients[d][g]*Math.pow(1-c,d-g)*Math.pow(c,g)*u[g];return p}else{f=new Array(d);for(let g=0;g<d;g++)f[g]=d*(u[g+1]-u[g]);return s(l-1,c,f)}},a=(l,c,u)=>{let d=1,f=l/c,p=(l-u(f))/c,g=0;for(;d>.001;){const v=u(f+p),b=Math.abs(l-v)/c;if(b<d)d=b,f+=p;else{const w=u(f-p),_=Math.abs(l-w)/c;_<d?(d=_,f-=p):p/=2}if(g++,g>500)break}return f};e.t2length=a})(g_),Object.defineProperty(nd,"__esModule",{value:!0}),nd.Path=void 0;const oH=cn,sH=ri,aH=st,ls=g_;class Ot extends sH.Shape{constructor(t){super(t),this.dataArray=[],this.pathLength=0,this._readDataAttribute(),this.on("dataChange.konva",function(){this._readDataAttribute()})}_readDataAttribute(){this.dataArray=Ot.parsePathData(this.data()),this.pathLength=Ot.getPathLength(this.dataArray)}_sceneFunc(t){var n=this.dataArray;t.beginPath();for(var r=!1,s=0;s<n.length;s++){var a=n[s].command,l=n[s].points;switch(a){case"L":t.lineTo(l[0],l[1]);break;case"M":t.moveTo(l[0],l[1]);break;case"C":t.bezierCurveTo(l[0],l[1],l[2],l[3],l[4],l[5]);break;case"Q":t.quadraticCurveTo(l[0],l[1],l[2],l[3]);break;case"A":var c=l[0],u=l[1],d=l[2],f=l[3],p=l[4],g=l[5],v=l[6],b=l[7],w=d>f?d:f,_=d>f?1:d/f,C=d>f?f/d:1;t.translate(c,u),t.rotate(v),t.scale(_,C),t.arc(0,0,w,p,p+g,1-b),t.scale(1/_,1/C),t.rotate(-v),t.translate(-c,-u);break;case"z":r=!0,t.closePath();break}}!r&&!this.hasFill()?t.strokeShape(this):t.fillStrokeShape(this)}getSelfRect(){var t=[];this.dataArray.forEach(function(d){if(d.command==="A"){var f=d.points[4],p=d.points[5],g=d.points[4]+p,v=Math.PI/180;if(Math.abs(f-g)<v&&(v=Math.abs(f-g)),p<0)for(let b=f-v;b>g;b-=v){const w=Ot.getPointOnEllipticalArc(d.points[0],d.points[1],d.points[2],d.points[3],b,0);t.push(w.x,w.y)}else for(let b=f+v;b<g;b+=v){const w=Ot.getPointOnEllipticalArc(d.points[0],d.points[1],d.points[2],d.points[3],b,0);t.push(w.x,w.y)}}else if(d.command==="C")for(let b=0;b<=1;b+=.01){const w=Ot.getPointOnCubicBezier(b,d.start.x,d.start.y,d.points[0],d.points[1],d.points[2],d.points[3],d.points[4],d.points[5]);t.push(w.x,w.y)}else t=t.concat(d.points)});for(var n=t[0],r=t[0],s=t[1],a=t[1],l,c,u=0;u<t.length/2;u++)l=t[u*2],c=t[u*2+1],isNaN(l)||(n=Math.min(n,l),r=Math.max(r,l)),isNaN(c)||(s=Math.min(s,c),a=Math.max(a,c));return{x:n,y:s,width:r-n,height:a-s}}getLength(){return this.pathLength}getPointAtLength(t){return Ot.getPointAtLengthOfDataArray(t,this.dataArray)}static getLineLength(t,n,r,s){return Math.sqrt((r-t)*(r-t)+(s-n)*(s-n))}static getPathLength(t){let n=0;for(var r=0;r<t.length;++r)n+=t[r].pathLength;return n}static getPointAtLengthOfDataArray(t,n){var r,s=0,a=n.length;if(!a)return null;for(;s<a&&t>n[s].pathLength;)t-=n[s].pathLength,++s;if(s===a)return r=n[s-1].points.slice(-2),{x:r[0],y:r[1]};if(t<.01)return r=n[s].points.slice(0,2),{x:r[0],y:r[1]};var l=n[s],c=l.points;switch(l.command){case"L":return Ot.getPointOnLine(t,l.start.x,l.start.y,c[0],c[1]);case"C":return Ot.getPointOnCubicBezier((0,ls.t2length)(t,Ot.getPathLength(n),w=>(0,ls.getCubicArcLength)([l.start.x,c[0],c[2],c[4]],[l.start.y,c[1],c[3],c[5]],w)),l.start.x,l.start.y,c[0],c[1],c[2],c[3],c[4],c[5]);case"Q":return Ot.getPointOnQuadraticBezier((0,ls.t2length)(t,Ot.getPathLength(n),w=>(0,ls.getQuadraticArcLength)([l.start.x,c[0],c[2]],[l.start.y,c[1],c[3]],w)),l.start.x,l.start.y,c[0],c[1],c[2],c[3]);case"A":var u=c[0],d=c[1],f=c[2],p=c[3],g=c[4],v=c[5],b=c[6];return g+=v*t/l.pathLength,Ot.getPointOnEllipticalArc(u,d,f,p,g,b)}return null}static getPointOnLine(t,n,r,s,a,l,c){l=l!=null?l:n,c=c!=null?c:r;const u=this.getLineLength(n,r,s,a);if(u<1e-10)return{x:n,y:r};if(s===n)return{x:l,y:c+(a>r?t:-t)};const d=(a-r)/(s-n),f=Math.sqrt(t*t/(1+d*d))*(s<n?-1:1),p=d*f;if(Math.abs(c-r-d*(l-n))<1e-10)return{x:l+f,y:c+p};const g=((l-n)*(s-n)+(c-r)*(a-r))/(u*u),v=n+g*(s-n),b=r+g*(a-r),w=this.getLineLength(l,c,v,b),_=Math.sqrt(t*t-w*w),C=Math.sqrt(_*_/(1+d*d))*(s<n?-1:1),k=d*C;return{x:v+C,y:b+k}}static getPointOnCubicBezier(t,n,r,s,a,l,c,u,d){function f(_){return _*_*_}function p(_){return 3*_*_*(1-_)}function g(_){return 3*_*(1-_)*(1-_)}function v(_){return(1-_)*(1-_)*(1-_)}var b=u*f(t)+l*p(t)+s*g(t)+n*v(t),w=d*f(t)+c*p(t)+a*g(t)+r*v(t);return{x:b,y:w}}static getPointOnQuadraticBezier(t,n,r,s,a,l,c){function u(v){return v*v}function d(v){return 2*v*(1-v)}function f(v){return(1-v)*(1-v)}var p=l*u(t)+s*d(t)+n*f(t),g=c*u(t)+a*d(t)+r*f(t);return{x:p,y:g}}static getPointOnEllipticalArc(t,n,r,s,a,l){var c=Math.cos(l),u=Math.sin(l),d={x:r*Math.cos(a),y:s*Math.sin(a)};return{x:t+(d.x*c-d.y*u),y:n+(d.x*u+d.y*c)}}static parsePathData(t){if(!t)return[];var n=t,r=["m","M","l","L","v","V","h","H","z","Z","c","C","q","Q","t","T","s","S","a","A"];n=n.replace(new RegExp(" ","g"),",");for(var s=0;s<r.length;s++)n=n.replace(new RegExp(r[s],"g"),"|"+r[s]);var a=n.split("|"),l=[],c=[],u=0,d=0,f=/([-+]?((\d+\.\d+)|((\d+)|(\.\d+)))(?:e[-+]?\d+)?)/gi,p;for(s=1;s<a.length;s++){var g=a[s],v=g.charAt(0);for(g=g.slice(1),c.length=0;p=f.exec(g);)c.push(p[0]);for(var b=[],w=0,_=c.length;w<_;w++){if(c[w]==="00"){b.push(0,0);continue}var C=parseFloat(c[w]);isNaN(C)?b.push(0):b.push(C)}for(;b.length>0&&!isNaN(b[0]);){var k="",S=[],E=u,N=d,A,I,O,F,P,M,W,U,Q,q;switch(v){case"l":u+=b.shift(),d+=b.shift(),k="L",S.push(u,d);break;case"L":u=b.shift(),d=b.shift(),S.push(u,d);break;case"m":var D=b.shift(),j=b.shift();if(u+=D,d+=j,k="M",l.length>2&&l[l.length-1].command==="z"){for(var K=l.length-2;K>=0;K--)if(l[K].command==="M"){u=l[K].points[0]+D,d=l[K].points[1]+j;break}}S.push(u,d),v="l";break;case"M":u=b.shift(),d=b.shift(),k="M",S.push(u,d),v="L";break;case"h":u+=b.shift(),k="L",S.push(u,d);break;case"H":u=b.shift(),k="L",S.push(u,d);break;case"v":d+=b.shift(),k="L",S.push(u,d);break;case"V":d=b.shift(),k="L",S.push(u,d);break;case"C":S.push(b.shift(),b.shift(),b.shift(),b.shift()),u=b.shift(),d=b.shift(),S.push(u,d);break;case"c":S.push(u+b.shift(),d+b.shift(),u+b.shift(),d+b.shift()),u+=b.shift(),d+=b.shift(),k="C",S.push(u,d);break;case"S":I=u,O=d,A=l[l.length-1],A.command==="C"&&(I=u+(u-A.points[2]),O=d+(d-A.points[3])),S.push(I,O,b.shift(),b.shift()),u=b.shift(),d=b.shift(),k="C",S.push(u,d);break;case"s":I=u,O=d,A=l[l.length-1],A.command==="C"&&(I=u+(u-A.points[2]),O=d+(d-A.points[3])),S.push(I,O,u+b.shift(),d+b.shift()),u+=b.shift(),d+=b.shift(),k="C",S.push(u,d);break;case"Q":S.push(b.shift(),b.shift()),u=b.shift(),d=b.shift(),S.push(u,d);break;case"q":S.push(u+b.shift(),d+b.shift()),u+=b.shift(),d+=b.shift(),k="Q",S.push(u,d);break;case"T":I=u,O=d,A=l[l.length-1],A.command==="Q"&&(I=u+(u-A.points[0]),O=d+(d-A.points[1])),u=b.shift(),d=b.shift(),k="Q",S.push(I,O,u,d);break;case"t":I=u,O=d,A=l[l.length-1],A.command==="Q"&&(I=u+(u-A.points[0]),O=d+(d-A.points[1])),u+=b.shift(),d+=b.shift(),k="Q",S.push(I,O,u,d);break;case"A":F=b.shift(),P=b.shift(),M=b.shift(),W=b.shift(),U=b.shift(),Q=u,q=d,u=b.shift(),d=b.shift(),k="A",S=this.convertEndpointToCenterParameterization(Q,q,u,d,W,U,F,P,M);break;case"a":F=b.shift(),P=b.shift(),M=b.shift(),W=b.shift(),U=b.shift(),Q=u,q=d,u+=b.shift(),d+=b.shift(),k="A",S=this.convertEndpointToCenterParameterization(Q,q,u,d,W,U,F,P,M);break}l.push({command:k||v,points:S,start:{x:E,y:N},pathLength:this.calcLength(E,N,k||v,S)})}(v==="z"||v==="Z")&&l.push({command:"z",points:[],start:void 0,pathLength:0})}return l}static calcLength(t,n,r,s){var a,l,c,u,d=Ot;switch(r){case"L":return d.getLineLength(t,n,s[0],s[1]);case"C":return(0,ls.getCubicArcLength)([t,s[0],s[2],s[4]],[n,s[1],s[3],s[5]],1);case"Q":return(0,ls.getQuadraticArcLength)([t,s[0],s[2]],[n,s[1],s[3]],1);case"A":a=0;var f=s[4],p=s[5],g=s[4]+p,v=Math.PI/180;if(Math.abs(f-g)<v&&(v=Math.abs(f-g)),l=d.getPointOnEllipticalArc(s[0],s[1],s[2],s[3],f,0),p<0)for(u=f-v;u>g;u-=v)c=d.getPointOnEllipticalArc(s[0],s[1],s[2],s[3],u,0),a+=d.getLineLength(l.x,l.y,c.x,c.y),l=c;else for(u=f+v;u<g;u+=v)c=d.getPointOnEllipticalArc(s[0],s[1],s[2],s[3],u,0),a+=d.getLineLength(l.x,l.y,c.x,c.y),l=c;return c=d.getPointOnEllipticalArc(s[0],s[1],s[2],s[3],g,0),a+=d.getLineLength(l.x,l.y,c.x,c.y),a}return 0}static convertEndpointToCenterParameterization(t,n,r,s,a,l,c,u,d){var f=d*(Math.PI/180),p=Math.cos(f)*(t-r)/2+Math.sin(f)*(n-s)/2,g=-1*Math.sin(f)*(t-r)/2+Math.cos(f)*(n-s)/2,v=p*p/(c*c)+g*g/(u*u);v>1&&(c*=Math.sqrt(v),u*=Math.sqrt(v));var b=Math.sqrt((c*c*(u*u)-c*c*(g*g)-u*u*(p*p))/(c*c*(g*g)+u*u*(p*p)));a===l&&(b*=-1),isNaN(b)&&(b=0);var w=b*c*g/u,_=b*-u*p/c,C=(t+r)/2+Math.cos(f)*w-Math.sin(f)*_,k=(n+s)/2+Math.sin(f)*w+Math.cos(f)*_,S=function(P){return Math.sqrt(P[0]*P[0]+P[1]*P[1])},E=function(P,M){return(P[0]*M[0]+P[1]*M[1])/(S(P)*S(M))},N=function(P,M){return(P[0]*M[1]<P[1]*M[0]?-1:1)*Math.acos(E(P,M))},A=N([1,0],[(p-w)/c,(g-_)/u]),I=[(p-w)/c,(g-_)/u],O=[(-1*p-w)/c,(-1*g-_)/u],F=N(I,O);return E(I,O)<=-1&&(F=Math.PI),E(I,O)>=1&&(F=0),l===0&&F>0&&(F=F-2*Math.PI),l===1&&F<0&&(F=F+2*Math.PI),[C,k,c,u,A,F,f,l]}}nd.Path=Ot,Ot.prototype.className="Path",Ot.prototype._attrsAffectingSize=["data"],(0,aH._registerNode)(Ot),oH.Factory.addGetterSetter(Ot,"data"),Object.defineProperty(Pp,"__esModule",{value:!0}),Pp.Arrow=void 0;const rd=cn,lH=ed,m_=qe,cH=st,v_=nd;class po extends lH.Line{_sceneFunc(t){super._sceneFunc(t);var n=Math.PI*2,r=this.points(),s=r,a=this.tension()!==0&&r.length>4;a&&(s=this.getTensionPoints());var l=this.pointerLength(),c=r.length,u,d;if(a){const g=[s[s.length-4],s[s.length-3],s[s.length-2],s[s.length-1],r[c-2],r[c-1]],v=v_.Path.calcLength(s[s.length-4],s[s.length-3],"C",g),b=v_.Path.getPointOnQuadraticBezier(Math.min(1,1-l/v),g[0],g[1],g[2],g[3],g[4],g[5]);u=r[c-2]-b.x,d=r[c-1]-b.y}else u=r[c-2]-r[c-4],d=r[c-1]-r[c-3];var f=(Math.atan2(d,u)+n)%n,p=this.pointerWidth();this.pointerAtEnding()&&(t.save(),t.beginPath(),t.translate(r[c-2],r[c-1]),t.rotate(f),t.moveTo(0,0),t.lineTo(-l,p/2),t.lineTo(-l,-p/2),t.closePath(),t.restore(),this.__fillStroke(t)),this.pointerAtBeginning()&&(t.save(),t.beginPath(),t.translate(r[0],r[1]),a?(u=(s[0]+s[2])/2-r[0],d=(s[1]+s[3])/2-r[1]):(u=r[2]-r[0],d=r[3]-r[1]),t.rotate((Math.atan2(-d,-u)+n)%n),t.moveTo(0,0),t.lineTo(-l,p/2),t.lineTo(-l,-p/2),t.closePath(),t.restore(),this.__fillStroke(t))}__fillStroke(t){var n=this.dashEnabled();n&&(this.attrs.dashEnabled=!1,t.setLineDash([])),t.fillStrokeShape(this),n&&(this.attrs.dashEnabled=!0)}getSelfRect(){const t=super.getSelfRect(),n=this.pointerWidth()/2;return{x:t.x-n,y:t.y-n,width:t.width+n*2,height:t.height+n*2}}}Pp.Arrow=po,po.prototype.className="Arrow",(0,cH._registerNode)(po),rd.Factory.addGetterSetter(po,"pointerLength",10,(0,m_.getNumberValidator)()),rd.Factory.addGetterSetter(po,"pointerWidth",10,(0,m_.getNumberValidator)()),rd.Factory.addGetterSetter(po,"pointerAtBeginning",!1),rd.Factory.addGetterSetter(po,"pointerAtEnding",!0);function y_(e,t){var n,r=1;e==null&&(e=0),t==null&&(t=0);function s(){var a,l=n.length,c,u=0,d=0;for(a=0;a<l;++a)c=n[a],u+=c.x,d+=c.y;for(u=(u/l-e)*r,d=(d/l-t)*r,a=0;a<l;++a)c=n[a],c.x-=u,c.y-=d}return s.initialize=function(a){n=a},s.x=function(a){return arguments.length?(e=+a,s):e},s.y=function(a){return arguments.length?(t=+a,s):t},s.strength=function(a){return arguments.length?(r=+a,s):r},s}function dH(e){const t=+this._x.call(null,e),n=+this._y.call(null,e);return b_(this.cover(t,n),t,n,e)}function b_(e,t,n,r){if(isNaN(t)||isNaN(n))return e;var s,a=e._root,l={data:r},c=e._x0,u=e._y0,d=e._x1,f=e._y1,p,g,v,b,w,_,C,k;if(!a)return e._root=l,e;for(;a.length;)if((w=t>=(p=(c+d)/2))?c=p:d=p,(_=n>=(g=(u+f)/2))?u=g:f=g,s=a,!(a=a[C=_<<1|w]))return s[C]=l,e;if(v=+e._x.call(null,a.data),b=+e._y.call(null,a.data),t===v&&n===b)return l.next=a,s?s[C]=l:e._root=l,e;do s=s?s[C]=new Array(4):e._root=new Array(4),(w=t>=(p=(c+d)/2))?c=p:d=p,(_=n>=(g=(u+f)/2))?u=g:f=g;while((C=_<<1|w)===(k=(b>=g)<<1|v>=p));return s[k]=a,s[C]=l,e}function uH(e){var t,n,r=e.length,s,a,l=new Array(r),c=new Array(r),u=1/0,d=1/0,f=-1/0,p=-1/0;for(n=0;n<r;++n)isNaN(s=+this._x.call(null,t=e[n]))||isNaN(a=+this._y.call(null,t))||(l[n]=s,c[n]=a,s<u&&(u=s),s>f&&(f=s),a<d&&(d=a),a>p&&(p=a));if(u>f||d>p)return this;for(this.cover(u,d).cover(f,p),n=0;n<r;++n)b_(this,l[n],c[n],e[n]);return this}function fH(e,t){if(isNaN(e=+e)||isNaN(t=+t))return this;var n=this._x0,r=this._y0,s=this._x1,a=this._y1;if(isNaN(n))s=(n=Math.floor(e))+1,a=(r=Math.floor(t))+1;else{for(var l=s-n||1,c=this._root,u,d;n>e||e>=s||r>t||t>=a;)switch(d=(t<r)<<1|e<n,u=new Array(4),u[d]=c,c=u,l*=2,d){case 0:s=n+l,a=r+l;break;case 1:n=s-l,a=r+l;break;case 2:s=n+l,r=a-l;break;case 3:n=s-l,r=a-l;break}this._root&&this._root.length&&(this._root=c)}return this._x0=n,this._y0=r,this._x1=s,this._y1=a,this}function hH(){var e=[];return this.visit(function(t){if(!t.length)do e.push(t.data);while(t=t.next)}),e}function pH(e){return arguments.length?this.cover(+e[0][0],+e[0][1]).cover(+e[1][0],+e[1][1]):isNaN(this._x0)?void 0:[[this._x0,this._y0],[this._x1,this._y1]]}function Qt(e,t,n,r,s){this.node=e,this.x0=t,this.y0=n,this.x1=r,this.y1=s}function gH(e,t,n){var r,s=this._x0,a=this._y0,l,c,u,d,f=this._x1,p=this._y1,g=[],v=this._root,b,w;for(v&&g.push(new Qt(v,s,a,f,p)),n==null?n=1/0:(s=e-n,a=t-n,f=e+n,p=t+n,n*=n);b=g.pop();)if(!(!(v=b.node)||(l=b.x0)>f||(c=b.y0)>p||(u=b.x1)<s||(d=b.y1)<a))if(v.length){var _=(l+u)/2,C=(c+d)/2;g.push(new Qt(v[3],_,C,u,d),new Qt(v[2],l,C,_,d),new Qt(v[1],_,c,u,C),new Qt(v[0],l,c,_,C)),(w=(t>=C)<<1|e>=_)&&(b=g[g.length-1],g[g.length-1]=g[g.length-1-w],g[g.length-1-w]=b)}else{var k=e-+this._x.call(null,v.data),S=t-+this._y.call(null,v.data),E=k*k+S*S;if(E<n){var N=Math.sqrt(n=E);s=e-N,a=t-N,f=e+N,p=t+N,r=v.data}}return r}function mH(e){if(isNaN(f=+this._x.call(null,e))||isNaN(p=+this._y.call(null,e)))return this;var t,n=this._root,r,s,a,l=this._x0,c=this._y0,u=this._x1,d=this._y1,f,p,g,v,b,w,_,C;if(!n)return this;if(n.length)for(;;){if((b=f>=(g=(l+u)/2))?l=g:u=g,(w=p>=(v=(c+d)/2))?c=v:d=v,t=n,!(n=n[_=w<<1|b]))return this;if(!n.length)break;(t[_+1&3]||t[_+2&3]||t[_+3&3])&&(r=t,C=_)}for(;n.data!==e;)if(s=n,!(n=n.next))return this;return(a=n.next)&&delete n.next,s?(a?s.next=a:delete s.next,this):t?(a?t[_]=a:delete t[_],(n=t[0]||t[1]||t[2]||t[3])&&n===(t[3]||t[2]||t[1]||t[0])&&!n.length&&(r?r[C]=n:this._root=n),this):(this._root=a,this)}function vH(e){for(var t=0,n=e.length;t<n;++t)this.remove(e[t]);return this}function yH(){return this._root}function bH(){var e=0;return this.visit(function(t){if(!t.length)do++e;while(t=t.next)}),e}function wH(e){var t=[],n,r=this._root,s,a,l,c,u;for(r&&t.push(new Qt(r,this._x0,this._y0,this._x1,this._y1));n=t.pop();)if(!e(r=n.node,a=n.x0,l=n.y0,c=n.x1,u=n.y1)&&r.length){var d=(a+c)/2,f=(l+u)/2;(s=r[3])&&t.push(new Qt(s,d,f,c,u)),(s=r[2])&&t.push(new Qt(s,a,f,d,u)),(s=r[1])&&t.push(new Qt(s,d,l,c,f)),(s=r[0])&&t.push(new Qt(s,a,l,d,f))}return this}function _H(e){var t=[],n=[],r;for(this._root&&t.push(new Qt(this._root,this._x0,this._y0,this._x1,this._y1));r=t.pop();){var s=r.node;if(s.length){var a,l=r.x0,c=r.y0,u=r.x1,d=r.y1,f=(l+u)/2,p=(c+d)/2;(a=s[0])&&t.push(new Qt(a,l,c,f,p)),(a=s[1])&&t.push(new Qt(a,f,c,u,p)),(a=s[2])&&t.push(new Qt(a,l,p,f,d)),(a=s[3])&&t.push(new Qt(a,f,p,u,d))}n.push(r)}for(;r=n.pop();)e(r.node,r.x0,r.y0,r.x1,r.y1);return this}function CH(e){return e[0]}function SH(e){return arguments.length?(this._x=e,this):this._x}function EH(e){return e[1]}function xH(e){return arguments.length?(this._y=e,this):this._y}function Mp(e,t,n){var r=new Fp(t==null?CH:t,n==null?EH:n,NaN,NaN,NaN,NaN);return e==null?r:r.addAll(e)}function Fp(e,t,n,r,s,a){this._x=e,this._y=t,this._x0=n,this._y0=r,this._x1=s,this._y1=a,this._root=void 0}function w_(e){for(var t={data:e.data},n=t;e=e.next;)n=n.next={data:e.data};return t}var Zt=Mp.prototype=Fp.prototype;Zt.copy=function(){var e=new Fp(this._x,this._y,this._x0,this._y0,this._x1,this._y1),t=this._root,n,r;if(!t)return e;if(!t.length)return e._root=w_(t),e;for(n=[{source:t,target:e._root=new Array(4)}];t=n.pop();)for(var s=0;s<4;++s)(r=t.source[s])&&(r.length?n.push({source:r,target:t.target[s]=new Array(4)}):t.target[s]=w_(r));return e},Zt.add=dH,Zt.addAll=uH,Zt.cover=fH,Zt.data=hH,Zt.extent=pH,Zt.find=gH,Zt.remove=mH,Zt.removeAll=vH,Zt.root=yH,Zt.size=bH,Zt.visit=wH,Zt.visitAfter=_H,Zt.x=SH,Zt.y=xH;function Vt(e){return function(){return e}}function Oi(e){return(e()-.5)*1e-6}function kH(e){return e.x+e.vx}function NH(e){return e.y+e.vy}function TH(e){var t,n,r,s=1,a=1;typeof e!="function"&&(e=Vt(e==null?1:+e));function l(){for(var d,f=t.length,p,g,v,b,w,_,C=0;C<a;++C)for(p=Mp(t,kH,NH).visitAfter(c),d=0;d<f;++d)g=t[d],w=n[g.index],_=w*w,v=g.x+g.vx,b=g.y+g.vy,p.visit(k);function k(S,E,N,A,I){var O=S.data,F=S.r,P=w+F;if(O){if(O.index>g.index){var M=v-O.x-O.vx,W=b-O.y-O.vy,U=M*M+W*W;U<P*P&&(M===0&&(M=Oi(r),U+=M*M),W===0&&(W=Oi(r),U+=W*W),U=(P-(U=Math.sqrt(U)))/U*s,g.vx+=(M*=U)*(P=(F*=F)/(_+F)),g.vy+=(W*=U)*P,O.vx-=M*(P=1-P),O.vy-=W*P)}return}return E>v+P||A<v-P||N>b+P||I<b-P}}function c(d){if(d.data)return d.r=n[d.data.index];for(var f=d.r=0;f<4;++f)d[f]&&d[f].r>d.r&&(d.r=d[f].r)}function u(){if(t){var d,f=t.length,p;for(n=new Array(f),d=0;d<f;++d)p=t[d],n[p.index]=+e(p,d,t)}}return l.initialize=function(d,f){t=d,r=f,u()},l.iterations=function(d){return arguments.length?(a=+d,l):a},l.strength=function(d){return arguments.length?(s=+d,l):s},l.radius=function(d){return arguments.length?(e=typeof d=="function"?d:Vt(+d),u(),l):e},l}function AH(e){return e.index}function __(e,t){var n=e.get(t);if(!n)throw new Error("node not found: "+t);return n}function OH(e){var t=AH,n=p,r,s=Vt(30),a,l,c,u,d,f=1;e==null&&(e=[]);function p(_){return 1/Math.min(c[_.source.index],c[_.target.index])}function g(_){for(var C=0,k=e.length;C<f;++C)for(var S=0,E,N,A,I,O,F,P;S<k;++S)E=e[S],N=E.source,A=E.target,I=A.x+A.vx-N.x-N.vx||Oi(d),O=A.y+A.vy-N.y-N.vy||Oi(d),F=Math.sqrt(I*I+O*O),F=(F-a[S])/F*_*r[S],I*=F,O*=F,A.vx-=I*(P=u[S]),A.vy-=O*P,N.vx+=I*(P=1-P),N.vy+=O*P}function v(){if(l){var _,C=l.length,k=e.length,S=new Map(l.map((N,A)=>[t(N,A,l),N])),E;for(_=0,c=new Array(C);_<k;++_)E=e[_],E.index=_,typeof E.source!="object"&&(E.source=__(S,E.source)),typeof E.target!="object"&&(E.target=__(S,E.target)),c[E.source.index]=(c[E.source.index]||0)+1,c[E.target.index]=(c[E.target.index]||0)+1;for(_=0,u=new Array(k);_<k;++_)E=e[_],u[_]=c[E.source.index]/(c[E.source.index]+c[E.target.index]);r=new Array(k),b(),a=new Array(k),w()}}function b(){if(l)for(var _=0,C=e.length;_<C;++_)r[_]=+n(e[_],_,e)}function w(){if(l)for(var _=0,C=e.length;_<C;++_)a[_]=+s(e[_],_,e)}return g.initialize=function(_,C){l=_,d=C,v()},g.links=function(_){return arguments.length?(e=_,v(),g):e},g.id=function(_){return arguments.length?(t=_,g):t},g.iterations=function(_){return arguments.length?(f=+_,g):f},g.strength=function(_){return arguments.length?(n=typeof _=="function"?_:Vt(+_),b(),g):n},g.distance=function(_){return arguments.length?(s=typeof _=="function"?_:Vt(+_),w(),g):s},g}var IH={value:()=>{}};function C_(){for(var e=0,t=arguments.length,n={},r;e<t;++e){if(!(r=arguments[e]+"")||r in n||/[\s.]/.test(r))throw new Error("illegal type: "+r);n[r]=[]}return new id(n)}function id(e){this._=e}function BH(e,t){return e.trim().split(/^|\s+/).map(function(n){var r="",s=n.indexOf(".");if(s>=0&&(r=n.slice(s+1),n=n.slice(0,s)),n&&!t.hasOwnProperty(n))throw new Error("unknown type: "+n);return{type:n,name:r}})}id.prototype=C_.prototype={constructor:id,on:function(e,t){var n=this._,r=BH(e+"",n),s,a=-1,l=r.length;if(arguments.length<2){for(;++a<l;)if((s=(e=r[a]).type)&&(s=LH(n[s],e.name)))return s;return}if(t!=null&&typeof t!="function")throw new Error("invalid callback: "+t);for(;++a<l;)if(s=(e=r[a]).type)n[s]=S_(n[s],e.name,t);else if(t==null)for(s in n)n[s]=S_(n[s],e.name,null);return this},copy:function(){var e={},t=this._;for(var n in t)e[n]=t[n].slice();return new id(e)},call:function(e,t){if((s=arguments.length-2)>0)for(var n=new Array(s),r=0,s,a;r<s;++r)n[r]=arguments[r+2];if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e);for(a=this._[e],r=0,s=a.length;r<s;++r)a[r].value.apply(t,n)},apply:function(e,t,n){if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e);for(var r=this._[e],s=0,a=r.length;s<a;++s)r[s].value.apply(t,n)}};function LH(e,t){for(var n=0,r=e.length,s;n<r;++n)if((s=e[n]).name===t)return s.value}function S_(e,t,n){for(var r=0,s=e.length;r<s;++r)if(e[r].name===t){e[r]=IH,e=e.slice(0,r).concat(e.slice(r+1));break}return n!=null&&e.push({name:t,value:n}),e}var cs=0,$a=0,za=0,E_=1e3,od,Ua,sd=0,go=0,ad=0,ja=typeof performance=="object"&&performance.now?performance:Date,x_=typeof window=="object"&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(e){setTimeout(e,17)};function k_(){return go||(x_(RH),go=ja.now()+ad)}function RH(){go=0}function $p(){this._call=this._time=this._next=null}$p.prototype=N_.prototype={constructor:$p,restart:function(e,t,n){if(typeof e!="function")throw new TypeError("callback is not a function");n=(n==null?k_():+n)+(t==null?0:+t),!this._next&&Ua!==this&&(Ua?Ua._next=this:od=this,Ua=this),this._call=e,this._time=n,zp()},stop:function(){this._call&&(this._call=null,this._time=1/0,zp())}};function N_(e,t,n){var r=new $p;return r.restart(e,t,n),r}function PH(){k_(),++cs;for(var e=od,t;e;)(t=go-e._time)>=0&&e._call.call(void 0,t),e=e._next;--cs}function T_(){go=(sd=ja.now())+ad,cs=$a=0;try{PH()}finally{cs=0,MH(),go=0}}function DH(){var e=ja.now(),t=e-sd;t>E_&&(ad-=t,sd=e)}function MH(){for(var e,t=od,n,r=1/0;t;)t._call?(r>t._time&&(r=t._time),e=t,t=t._next):(n=t._next,t._next=null,t=e?e._next=n:od=n);Ua=e,zp(r)}function zp(e){if(!cs){$a&&($a=clearTimeout($a));var t=e-go;t>24?(e<1/0&&($a=setTimeout(T_,e-ja.now()-ad)),za&&(za=clearInterval(za))):(za||(sd=ja.now(),za=setInterval(DH,E_)),cs=1,x_(T_))}}const FH=1664525,$H=1013904223,A_=4294967296;function zH(){let e=1;return()=>(e=(FH*e+$H)%A_)/A_}function UH(e){return e.x}function jH(e){return e.y}var qH=10,HH=Math.PI*(3-Math.sqrt(5));function GH(e){var t,n=1,r=.001,s=1-Math.pow(r,1/300),a=0,l=.6,c=new Map,u=N_(p),d=C_("tick","end"),f=zH();e==null&&(e=[]);function p(){g(),d.call("tick",t),n<r&&(u.stop(),d.call("end",t))}function g(w){var _,C=e.length,k;w===void 0&&(w=1);for(var S=0;S<w;++S)for(n+=(a-n)*s,c.forEach(function(E){E(n)}),_=0;_<C;++_)k=e[_],k.fx==null?(isNaN(k.vx)&&(k.vx=0),k.x+=k.vx*=l):(k.x=k.fx,k.vx=0),k.fy==null?(isNaN(k.vy)&&(k.vy=0),k.y+=k.vy*=l):(k.y=k.fy,k.vy=0);return t}function v(){for(var w=0,_=e.length,C;w<_;++w){if(C=e[w],C.index=w,C.fx!=null&&(C.x=C.fx),C.fy!=null&&(C.y=C.fy),isNaN(C.x)||isNaN(C.y)){var k=qH*Math.sqrt(.5+w),S=w*HH;C.x=k*Math.cos(S),C.y=k*Math.sin(S)}(isNaN(C.vx)||isNaN(C.vy))&&(C.vx=C.vy=0)}}function b(w){return w.initialize&&w.initialize(e,f),w}return v(),t={tick:g,restart:function(){return u.restart(p),t},stop:function(){return u.stop(),t},nodes:function(w){return arguments.length?(e=w,v(),c.forEach(b),t):e},alpha:function(w){return arguments.length?(n=+w,t):n},alphaMin:function(w){return arguments.length?(r=+w,t):r},alphaDecay:function(w){return arguments.length?(s=+w,t):+s},alphaTarget:function(w){return arguments.length?(a=+w,t):a},velocityDecay:function(w){return arguments.length?(l=1-w,t):1-l},randomSource:function(w){return arguments.length?(f=w,c.forEach(b),t):f},force:function(w,_){return arguments.length>1?(_==null?c.delete(w):c.set(w,b(_)),t):c.get(w)},find:function(w,_,C){var k=0,S=e.length,E,N,A,I,O;for(C==null?C=1/0:C*=C,k=0;k<S;++k)I=e[k],E=w-I.x,N=_-I.y,A=E*E+N*N,A<C&&(O=I,C=A);return O},on:function(w,_){return arguments.length>1?(d.on(w,_),t):d.on(w)}}}function WH(){var e,t,n,r,s=Vt(-30),a,l=1,c=1/0,u=.81;function d(v){var b,w=e.length,_=Mp(e,UH,jH).visitAfter(p);for(r=v,b=0;b<w;++b)t=e[b],_.visit(g)}function f(){if(e){var v,b=e.length,w;for(a=new Array(b),v=0;v<b;++v)w=e[v],a[w.index]=+s(w,v,e)}}function p(v){var b=0,w,_,C=0,k,S,E;if(v.length){for(k=S=E=0;E<4;++E)(w=v[E])&&(_=Math.abs(w.value))&&(b+=w.value,C+=_,k+=_*w.x,S+=_*w.y);v.x=k/C,v.y=S/C}else{w=v,w.x=w.data.x,w.y=w.data.y;do b+=a[w.data.index];while(w=w.next)}v.value=b}function g(v,b,w,_){if(!v.value)return!0;var C=v.x-t.x,k=v.y-t.y,S=_-b,E=C*C+k*k;if(S*S/u<E)return E<c&&(C===0&&(C=Oi(n),E+=C*C),k===0&&(k=Oi(n),E+=k*k),E<l&&(E=Math.sqrt(l*E)),t.vx+=C*v.value*r/E,t.vy+=k*v.value*r/E),!0;if(v.length||E>=c)return;(v.data!==t||v.next)&&(C===0&&(C=Oi(n),E+=C*C),k===0&&(k=Oi(n),E+=k*k),E<l&&(E=Math.sqrt(l*E)));do v.data!==t&&(S=a[v.data.index]*r/E,t.vx+=C*S,t.vy+=k*S);while(v=v.next)}return d.initialize=function(v,b){e=v,n=b,f()},d.strength=function(v){return arguments.length?(s=typeof v=="function"?v:Vt(+v),f(),d):s},d.distanceMin=function(v){return arguments.length?(l=v*v,d):Math.sqrt(l)},d.distanceMax=function(v){return arguments.length?(c=v*v,d):Math.sqrt(c)},d.theta=function(v){return arguments.length?(u=v*v,d):Math.sqrt(u)},d}function KH(e){var t=Vt(.1),n,r,s;typeof e!="function"&&(e=Vt(e==null?0:+e));function a(c){n.length!==s.length&&l();for(var u=0,d=n.length,f;u<d;++u)f=n[u],f.vx,f.vx+=(s[u]-f.x)*r[u]*c}function l(){if(n){var c,u=n.length;for(r=new Array(u),s=new Array(u),c=0;c<u;++c)r[c]=isNaN(s[c]=+e(n[c],c,n))?0:+t(n[c],c,n)}}return a.initialize=function(c){n=c,l()},a.strength=function(c){return arguments.length?(t=typeof c=="function"?c:Vt(+c),l(),a):t},a.x=function(c){return arguments.length?(e=typeof c=="function"?c:Vt(+c),l(),a):e},a}function YH(e){var t=Vt(.1),n,r,s;typeof e!="function"&&(e=Vt(e==null?0:+e));function a(c){n.length!==s.length&&l();for(var u=0,d=n.length,f;u<d;++u)f=n[u],f.vy+=(s[u]-f.y)*r[u]*c}function l(){if(n){var c,u=n.length;for(r=new Array(u),s=new Array(u),c=0;c<u;++c)r[c]=isNaN(s[c]=+e(n[c],c,n))?0:+t(n[c],c,n)}}return a.initialize=function(c){n=c,l()},a.strength=function(c){return arguments.length?(t=typeof c=="function"?c:Vt(+c),l(),a):t},a.y=function(c){return arguments.length?(e=typeof c=="function"?c:Vt(+c),l(),a):e},a}function JH(e,t,n){return t=dd(t),P_(e,O_()?Reflect.construct(t,n||[],dd(e).constructor):t.apply(e,n))}function O_(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(O_=function(){return!!e})()}function I_(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(s){return Object.getOwnPropertyDescriptor(e,s).enumerable})),n.push.apply(n,r)}return n}function qa(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?I_(Object(n),!0).forEach(function(r){oi(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):I_(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function or(){or=function(){return t};var e,t={},n=Object.prototype,r=n.hasOwnProperty,s=Object.defineProperty||function(D,j,K){D[j]=K.value},a=typeof Symbol=="function"?Symbol:{},l=a.iterator||"@@iterator",c=a.asyncIterator||"@@asyncIterator",u=a.toStringTag||"@@toStringTag";function d(D,j,K){return Object.defineProperty(D,j,{value:K,enumerable:!0,configurable:!0,writable:!0}),D[j]}try{d({},"")}catch(D){d=function(j,K,H){return j[K]=H}}function f(D,j,K,H){var R=j&&j.prototype instanceof C?j:C,ie=Object.create(R.prototype),ee=new Q(H||[]);return s(ie,"_invoke",{value:P(D,K,ee)}),ie}function p(D,j,K){try{return{type:"normal",arg:D.call(j,K)}}catch(H){return{type:"throw",arg:H}}}t.wrap=f;var g="suspendedStart",v="suspendedYield",b="executing",w="completed",_={};function C(){}function k(){}function S(){}var E={};d(E,l,function(){return this});var N=Object.getPrototypeOf,A=N&&N(N(q([])));A&&A!==n&&r.call(A,l)&&(E=A);var I=S.prototype=C.prototype=Object.create(E);function O(D){["next","throw","return"].forEach(function(j){d(D,j,function(K){return this._invoke(j,K)})})}function F(D,j){function K(R,ie,ee,Y){var J=p(D[R],D,ie);if(J.type!=="throw"){var oe=J.arg,re=oe.value;return re&&typeof re=="object"&&r.call(re,"__await")?j.resolve(re.__await).then(function(z){K("next",z,ee,Y)},function(z){K("throw",z,ee,Y)}):j.resolve(re).then(function(z){oe.value=z,ee(oe)},function(z){return K("throw",z,ee,Y)})}Y(J.arg)}var H;s(this,"_invoke",{value:function(R,ie){function ee(){return new j(function(Y,J){K(R,ie,Y,J)})}return H=H?H.then(ee,ee):ee()}})}function P(D,j,K){var H=g;return function(R,ie){if(H===b)throw new Error("Generator is already running");if(H===w){if(R==="throw")throw ie;return{value:e,done:!0}}for(K.method=R,K.arg=ie;;){var ee=K.delegate;if(ee){var Y=M(ee,K);if(Y){if(Y===_)continue;return Y}}if(K.method==="next")K.sent=K._sent=K.arg;else if(K.method==="throw"){if(H===g)throw H=w,K.arg;K.dispatchException(K.arg)}else K.method==="return"&&K.abrupt("return",K.arg);H=b;var J=p(D,j,K);if(J.type==="normal"){if(H=K.done?w:v,J.arg===_)continue;return{value:J.arg,done:K.done}}J.type==="throw"&&(H=w,K.method="throw",K.arg=J.arg)}}}function M(D,j){var K=j.method,H=D.iterator[K];if(H===e)return j.delegate=null,K==="throw"&&D.iterator.return&&(j.method="return",j.arg=e,M(D,j),j.method==="throw")||K!=="return"&&(j.method="throw",j.arg=new TypeError("The iterator does not provide a '"+K+"' method")),_;var R=p(H,D.iterator,j.arg);if(R.type==="throw")return j.method="throw",j.arg=R.arg,j.delegate=null,_;var ie=R.arg;return ie?ie.done?(j[D.resultName]=ie.value,j.next=D.nextLoc,j.method!=="return"&&(j.method="next",j.arg=e),j.delegate=null,_):ie:(j.method="throw",j.arg=new TypeError("iterator result is not an object"),j.delegate=null,_)}function W(D){var j={tryLoc:D[0]};1 in D&&(j.catchLoc=D[1]),2 in D&&(j.finallyLoc=D[2],j.afterLoc=D[3]),this.tryEntries.push(j)}function U(D){var j=D.completion||{};j.type="normal",delete j.arg,D.completion=j}function Q(D){this.tryEntries=[{tryLoc:"root"}],D.forEach(W,this),this.reset(!0)}function q(D){if(D||D===""){var j=D[l];if(j)return j.call(D);if(typeof D.next=="function")return D;if(!isNaN(D.length)){var K=-1,H=function R(){for(;++K<D.length;)if(r.call(D,K))return R.value=D[K],R.done=!1,R;return R.value=e,R.done=!0,R};return H.next=H}}throw new TypeError(typeof D+" is not iterable")}return k.prototype=S,s(I,"constructor",{value:S,configurable:!0}),s(S,"constructor",{value:k,configurable:!0}),k.displayName=d(S,u,"GeneratorFunction"),t.isGeneratorFunction=function(D){var j=typeof D=="function"&&D.constructor;return!!j&&(j===k||(j.displayName||j.name)==="GeneratorFunction")},t.mark=function(D){return Object.setPrototypeOf?Object.setPrototypeOf(D,S):(D.__proto__=S,d(D,u,"GeneratorFunction")),D.prototype=Object.create(I),D},t.awrap=function(D){return{__await:D}},O(F.prototype),d(F.prototype,c,function(){return this}),t.AsyncIterator=F,t.async=function(D,j,K,H,R){R===void 0&&(R=Promise);var ie=new F(f(D,j,K,H),R);return t.isGeneratorFunction(j)?ie:ie.next().then(function(ee){return ee.done?ee.value:ie.next()})},O(I),d(I,u,"Generator"),d(I,l,function(){return this}),d(I,"toString",function(){return"[object Generator]"}),t.keys=function(D){var j=Object(D),K=[];for(var H in j)K.push(H);return K.reverse(),function R(){for(;K.length;){var ie=K.pop();if(ie in j)return R.value=ie,R.done=!1,R}return R.done=!0,R}},t.values=q,Q.prototype={constructor:Q,reset:function(D){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(U),!D)for(var j in this)j.charAt(0)==="t"&&r.call(this,j)&&!isNaN(+j.slice(1))&&(this[j]=e)},stop:function(){this.done=!0;var D=this.tryEntries[0].completion;if(D.type==="throw")throw D.arg;return this.rval},dispatchException:function(D){if(this.done)throw D;var j=this;function K(J,oe){return ie.type="throw",ie.arg=D,j.next=J,oe&&(j.method="next",j.arg=e),!!oe}for(var H=this.tryEntries.length-1;H>=0;--H){var R=this.tryEntries[H],ie=R.completion;if(R.tryLoc==="root")return K("end");if(R.tryLoc<=this.prev){var ee=r.call(R,"catchLoc"),Y=r.call(R,"finallyLoc");if(ee&&Y){if(this.prev<R.catchLoc)return K(R.catchLoc,!0);if(this.prev<R.finallyLoc)return K(R.finallyLoc)}else if(ee){if(this.prev<R.catchLoc)return K(R.catchLoc,!0)}else{if(!Y)throw new Error("try statement without catch or finally");if(this.prev<R.finallyLoc)return K(R.finallyLoc)}}}},abrupt:function(D,j){for(var K=this.tryEntries.length-1;K>=0;--K){var H=this.tryEntries[K];if(H.tryLoc<=this.prev&&r.call(H,"finallyLoc")&&this.prev<H.finallyLoc){var R=H;break}}R&&(D==="break"||D==="continue")&&R.tryLoc<=j&&j<=R.finallyLoc&&(R=null);var ie=R?R.completion:{};return ie.type=D,ie.arg=j,R?(this.method="next",this.next=R.finallyLoc,_):this.complete(ie)},complete:function(D,j){if(D.type==="throw")throw D.arg;return D.type==="break"||D.type==="continue"?this.next=D.arg:D.type==="return"?(this.rval=this.arg=D.arg,this.method="return",this.next="end"):D.type==="normal"&&j&&(this.next=j),_},finish:function(D){for(var j=this.tryEntries.length-1;j>=0;--j){var K=this.tryEntries[j];if(K.finallyLoc===D)return this.complete(K.completion,K.afterLoc),U(K),_}},catch:function(D){for(var j=this.tryEntries.length-1;j>=0;--j){var K=this.tryEntries[j];if(K.tryLoc===D){var H=K.completion;if(H.type==="throw"){var R=H.arg;U(K)}return R}}throw new Error("illegal catch attempt")},delegateYield:function(D,j,K){return this.delegate={iterator:q(D),resultName:j,nextLoc:K},this.method==="next"&&(this.arg=e),_}},t}function B_(e){var t=function(n,r){if(typeof n!="object"||!n)return n;var s=n[Symbol.toPrimitive];if(s!==void 0){var a=s.call(n,r||"default");if(typeof a!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return(r==="string"?String:Number)(n)}(e,"string");return typeof t=="symbol"?t:String(t)}function L_(e,t,n,r,s,a,l){try{var c=e[a](l),u=c.value}catch(d){return void n(d)}c.done?t(u):Promise.resolve(u).then(r,s)}function Ha(e){return function(){var t=this,n=arguments;return new Promise(function(r,s){var a=e.apply(t,n);function l(u){L_(a,r,s,l,c,"next",u)}function c(u){L_(a,r,s,l,c,"throw",u)}l(void 0)})}}function ld(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function R_(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,B_(r.key),r)}}function cd(e,t,n){return t&&R_(e.prototype,t),n&&R_(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function oi(e,t,n){return(t=B_(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function dd(e){return dd=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},dd(e)}function Up(e,t){return Up=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,r){return n.__proto__=r,n},Up(e,t)}function Ga(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function P_(e,t){if(t&&(typeof t=="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Ga(e)}function XH(e,t){return function(n){if(Array.isArray(n))return n}(e)||function(n,r){var s=n==null?null:typeof Symbol!="undefined"&&n[Symbol.iterator]||n["@@iterator"];if(s!=null){var a,l,c,u,d=[],f=!0,p=!1;try{if(c=(s=s.call(n)).next,r===0){if(Object(s)!==s)return;f=!1}else for(;!(f=(a=c.call(s)).done)&&(d.push(a.value),d.length!==r);f=!0);}catch(g){p=!0,l=g}finally{try{if(!f&&s.return!=null&&(u=s.return(),Object(u)!==u))return}finally{if(p)throw l}}return d}}(e,t)||D_(e,t)||function(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
132
|
+
`)}manageSpecialValue(t){t=t.replace(/"{2,}/g,"");const n=/"{1}[^"]*"{1}/g,r=t.match(n);return r!==null&&r.map(s=>(t=t.replace(s,s.replace(/,/g,pp)),s.replace(/,/g,pp))),t}reverseSpecialValue(t){const n=new RegExp(pp,"g");return t.map(r=>{for(const s in r){const a=r[s].replace(n,",");r[s]=a}return r})}convertToGraphData(t){const n=[];let r=t.filter(a=>a.Label===void 0),s=t.filter(a=>a.Label!==void 0);return r=r.map(a=>this.getGraphNode(a)),s=s.map((a,l)=>{const c="Source Entity ID",u="Target Entity ID",d="Label",f=this.getNode(a[c],r)[0],p=this.getNode(a[u],r)[0];return a[d]!==""&&n.push({id:p.id,label:a[d]}),{source:f.id,target:p.id,type:f.type+"-"+p.type,uniqueIndex:l}}),r=r.map(a=>(delete a.entityId,n.map(l=>{l.id===a.id&&(a.name=l.label)}),a)),{nodes:r,links:s}}getGraphNode(t){const n=vw.nodeMapReverse,r=cp.entitys;let s="",a="",l="",c=null,u=null;return r.map(d=>{const f=d.type,p=d.columnsFields[1];t[f]!==void 0&&(a=n[f],s=t[p],l=t[f],c=this.manageNodeDetail(d.columnsFields,t,n[f]),u=this.manageNodeFieldMap(n[f]))}),{id:s,type:a,name:s,entityId:l,detail:c,fieldMap:u,show:!0}}manageNodeFieldMap(t){return this.fieldMap[t]}manageNodeDetail(t,n,r){let s=null,a=!1;if(r!=="nodeType"){s={info:{basic:{}},tags:[]};for(const l in n)if(t.indexOf(l)===-1){a=!0;const c=n[l];l==="tags"&&c!==""?s.tags=c.split(",").map(u=>({name:u,desc:u})):s.info.basic[l]=n[l]}a===!1&&(s=null)}return s}getNode(t,n){return n.filter(r=>r.entityId===t)}outputData(){return this.data}}const Tse="",pj={name:"ButtonList",components:{"force-graph-svg-icon":so,addNode:fU,addLink:mU,intro:CU,UploadFilled:$N,SearchIcon:iU},mixins:[kr],props:{showTopSearch:{type:Boolean,default:!1},hideButtonList:{type:Array,default:()=>[]},selection:{type:Array,default:()=>[]},history:{type:Object,default:()=>({dataNow:{}})},moduleDetail:{type:Object,default:()=>{}},requestGraphData:{type:Boolean,default:!0}},emits:["fixNodes","toggleLayout","addNodes","addLink","importCsvData","autoDisplay","toggleMove","deleteNodes","saveSnapshot"],data(){return{maxTrans:0,nowTrans:0,onceTrans:300,dialogVisible:!1,exportFormat:0,formatOptions:[{value:0,label:"JSON"},{value:2,label:"CSV"}],isAllFix:!1,dialogImportVisible:!1,importFileList:[],importFile:null,intro:!1,current:null,addType:"",flageAlias:!0,filterValues:"",relatedMidNum:2}},computed:{buttonList(){var e,t;return[{hover:!1,icon:"hm_icon_add",disable:!this.requestGraphData,fun:this.addNode,name:"新增节点",params:"diy"},{hover:!1,icon:"hm_icon_del",disable:this.selection.length===0||!this.requestGraphData,fun:this.deleteNodes,name:"删除"},{hover:!1,icon:"hm_icon_snapshot",disable:!this.requestGraphData,fun:this.addSnapshot,name:"保存快照",hide:!((t=(e=this.moduleDetail)==null?void 0:e.config)!=null&&t.hasSnapshot)},{hover:!1,icon:"hm_icon_img",disable:!this.requestGraphData,fun:this.saveAsImg,name:"保存图片"},{hover:!1,icon:"hm_icon_export",disable:!this.requestGraphData,fun:this.exportData,name:"数据导出"},{hover:!1,icon:"hm_icon_import",disable:!this.requestGraphData,fun:this.importData,name:"数据导入"},{hover:!1,icon:"hm_icon_undo",disable:this.history.currentIndex<=0||!this.requestGraphData,fun:this.backHistory,name:"撤销"},{hover:!1,icon:"hm_icon_redo",disable:this.history.currentIndex>=this.history.length-1||!this.requestGraphData,fun:this.forwardHistory,name:"恢复"},{hover:!1,icon:"hm_icon_auto",fun:this.autoDisplay,name:"自动布局"},{hover:!1,icon:"hm_icon_fix",fun:this.fixNodes,name:"全局固定",params:!0,hide:this.isAllFix},{hover:!1,icon:"hm_icon_unfix",fun:this.fixNodes,name:"全局解除固定",params:!1,hide:!this.isAllFix},{hover:!1,icon:"hm_icon_tree",fun:this.toggleLayout,name:"树型布局",params:1,hide:this.history.layoutIndex===1},{hover:!1,icon:"hm_icon_force",fun:this.toggleLayout,name:"斥力布局",params:0,hide:this.history.layoutIndex===0}]},buttonListShow(){return this.buttonList.filter(e=>e.hide!==!0&&!this.hideButtonList.includes(e.name))},noSelectNodes(){var r;const e=qr(this.history.dataNow.nodes),t=qr((r=this.history.dataNow)==null?void 0:r.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),!0});return this.deleteParentItem(n)}},mounted(){},methods:{hover(e){this.current=e},out(){this.current=null},autoDisplay(){ve(this,"autoDisplay")},fixNodes(e=!0){ve(this,"fixNodes",e),this.isAllFix=e},toggleMove(){ve(this,"toggleMove")},toggleLayout(e){ve(this,"toggleLayout",e)},addNode(e,t){this.addType=e,this.$refs.addNode.show(t)},addNodes({node:e,type:t,connectNode:n}){ve(this,"addNodes",{node:e,type:t,connectNode:n})},addLink({source:e,target:t}){ve(this,"addLink",{source:e,target:t})},backHistory(){this.$parent.historyBack()},forwardHistory(){this.history.forward()},dataURLToBlob(e){const t=e.split(","),n=t[0].match(/:(.*?);/)[1],r=atob(t[1]);let s=r.length;const a=new Uint8Array(s);for(;s--;)a[s]=r.charCodeAt(s);return new Blob([a],{type:n})},downloadURI(e,t){const n=document.createElement("a");n.download=t,n.href=e,document.body.appendChild(n),n.click(),document.body.removeChild(n)},saveAsImg(){return Ne(this,null,function*(){var t,n;this.$parent.bigLoading=!0;const e=yield this.svgToUrl();this.downloadURI(e,`${((n=(t=this.history.dataNow)==null?void 0:t.nodes[0])==null?void 0:n.id)||"img"}_${new Date().getTime()}.png`),this.$parent.bigLoading=!1})},svgToUrl(){return Ne(this,null,function*(){this.$parent.centerAndZoom(),this.$parent.addCanvasBg();const t=this.$parent.getCanvasStage().toDataURL({mimeType:"image/png"});return this.$parent.removeCanvasBg(),this.$parent.reset(),t})},svgToBlob(){return Ne(this,null,function*(){this.$parent.centerAndZoom(),this.$parent.addCanvasBg();const e=this.$parent.getCanvasStage();e.find("Image").forEach(n=>{const r=n.image();r&&(r.crossOrigin="Anonymous")});const t=yield e.toBlob();return this.$parent.removeCanvasBg(),this.$parent.reset(),t})},deleteNodes(){ve(this,"deleteNodes")},addSnapshot(){ve(this,"saveSnapshot")},exportData(){this.handleOpenModal()},handleOpenModal(){this.dialogVisible=!0},handleCloseModal(){this.dialogVisible=!1},handleExportData(){var l,c,u,d;let e=null,t=null,n=null,r=null;this.selection.length>0?(n=o.toRaw(this.selection),r=[]):(n=o.toRaw(this.history.dataNow.nodes),r=o.toRaw(this.history.dataNow.links));const s=n.map(f=>{const{id:p,type:g,detail:v}=f;return{id:p,type:g,detail:v}}),a=r.map(f=>{const{source:p,target:g}=f;return{source:p,target:g}});this.exportFormat===0?(e=JSON.stringify(s),t=`${((c=(l=this.history.dataNow)==null?void 0:l.nodes[0])==null?void 0:c.id)||"file"}_${new Date().getTime()}.json`):(e=this.setMalteGoCsv({nodes:s,links:a}),t=`${((d=(u=this.history.dataNow)==null?void 0:u.nodes[0])==null?void 0:d.id)||"file"}_${new Date().getTime()}.csv`),bD(e,t),this.handleCloseModal()},importData(){this.handleOpenImportModal()},handleOpenImportModal(){this.dialogImportVisible=!0},handleCloseImportModal(){this.dialogImportVisible=!1,this.importFileList=[],this.importFile=null},handleImportData(){try{const e=this.getFieldMap(),n=new hj(this.importFile,e).outputData();ve(this,"importCsvData",{nodes:n.nodes,links:n.links})}catch(e){Nt({message:e,type:"error"})}this.handleCloseImportModal()},getFieldMap(){const e=this.moduleDetail.detail_field_map,t={};for(const n in e){const r=n.substring(0,n.indexOf("_detail_info"));t[r]=JSON.parse(JSON.stringify(e[n]))}return t},handleFileChange(e){this.importFile=e;const t=new FileReader;t.onload=()=>{t.result&&(this.importFile=t.result)},t.readAsText(e.raw)},handleFileRemove(){this.importFile=null,this.importFileList=[]},setMalteGoCsv(e){return new EU(e).outputCsvFile()},showIntro(){this.intro=!0},hideIntro(){this.intro=!1},handleAlias(e){this.flageAlias=!e;const t=document.getElementsByClassName("right-menu-box")[0],n=document.getElementsByClassName("graph-box")[0];t&&(e?(t.style.display="none",n.style.width="100%"):(t.style.display="inline-block",n.style.width="1%"))},permissionitem(){return this.requestGraphData?!0:(Nt({message:"无可操作权限",type:"warning"}),!1)},handleIconClick(e){this.permissionitem()&&(qt({cId:"buttonList-"+e.icon,c:"顶部按钮-"+e.name}),e.fun(e.params))},handleSearch2:Wi(function(){var n;if(!this.filterValues){ve(Re,"sendNodesRange",null);return}this.filteredDataList=qr(this.noSelectNodes);const e=qr((n=this.history.dataNow)==null?void 0:n.links);this.filteredDataList=this.filteredDataList.filter(r=>this.filterValues!==""?(r.parentNode=this.searchParent(r,e),r.childList=r.childList.filter(s=>s.name.toLowerCase().indexOf(this.filterValues.toLowerCase())>-1),r.childList.length>0):!0),this.filteredDataList=this.deleteParentItem(this.filteredDataList);const t=[];this.filteredDataList.forEach(r=>{t.push(this.searchParent(r,e)),t.push(...r.childList),t.push(r)}),ve(Re,"sendNodesRange",t)},200),handleSearch:Wi(function(){this.filteredDataList=qr(this.history.dataNow.nodes),this.filteredDataList=this.filteredDataList.filter(t=>this.filterValues?t.name.toLowerCase().indexOf(this.filterValues.toLowerCase())>-1:!0);const e=[];this.filteredDataList.forEach(t=>{e.push(t)}),ve(Re,"sendNodesRange",e)},200),handleFilterMidNumber(e){vn("=>(ButtonList.vue:758) currentValue",e),e<2&&(this.relatedMidNum=2),this.filteredDataList=qr(this.history.dataNow.nodes);const t=[],n=[];this.filteredDataList=this.filteredDataList.forEach(r=>{var s,a,l;if(this.relatedMidNum){const c=(l=(a=(s=r==null?void 0:r.detail)==null?void 0:s.info)==null?void 0:a.basic)==null?void 0:l.mid_count;(c?c>=this.relatedMidNum:!0)?t.push(r):n.push(r)}}),ve(Re,"buttonClick",{nodes:t,api:{name:"show_nodes"}}),this.$nextTick(()=>{ve(Re,"buttonClick",{nodes:n,api:{name:"hide_nodes"}})})},searchChildren(e,t){const n=t,r=[];return n&&n.forEach(s=>{s.source.id===e.id&&r.push(s.target)}),r},searchParent(e,t){const n=t;let r=[];return n&&n.forEach(s=>{s.target.id===e.id&&(r=s.source)}),r},groupBy(e,t){const n={};return e.forEach(function(r){const s=JSON.stringify(t(r));n[s]=n[s]||[],n[s].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(a=>a===r.parentNode.id)?r.parentNode="":n.push(r.parentNode.id),r)),t}}},gj={class:"button-container"},mj={ref:"container",class:"button-box"},vj={ref:"box",class:"all-button"},yj={key:0,class:"search-content-wrap"},bj={class:"relative-mid-search"},wj={class:"number-input-wrap"},_j=["onClick"],Cj={key:1,class:"right-btn-wrap"},Sj={class:"button-one intro-button"},Ej={class:"dialog-footer"},xj={class:"dialog-footer"},kj={class:"intro"};function Nj(e,t,n,r,s,a){const l=o.resolveComponent("SearchIcon"),c=mi,u=LL,d=o.resolveComponent("force-graph-svg-icon"),f=gn,p=o.resolveComponent("intro"),g=rR,v=vc,b=mc,w=no,_=xa,C=o.resolveComponent("UploadFilled"),k=Ye,S=OP,E=o.resolveComponent("addNode"),N=o.resolveComponent("addLink");return o.openBlock(),o.createElementBlock("div",gj,[o.createElementVNode("div",mj,[o.createElementVNode("div",vj,[n.showTopSearch?(o.openBlock(),o.createElementBlock("div",yj,[o.createVNode(c,{modelValue:s.filterValues,"onUpdate:modelValue":t[0]||(t[0]=A=>s.filterValues=A),modelModifiers:{trim:!0},class:"search-content",placeholder:"支持查询嫌疑人终端码、虚拟身份、路由mac、域名",onInput:a.handleSearch},{suffix:o.withCtx(()=>[t[8]||(t[8]=o.createElementVNode("div",{class:"split-line"},null,-1)),o.createVNode(l,{onClick:a.handleSearch},null,8,["onClick"])]),_:1},8,["modelValue","onInput"]),o.createElementVNode("div",bj,[t[10]||(t[10]=o.createElementVNode("span",{class:"search-label"},"关联终端数量",-1)),o.createElementVNode("div",wj,[t[9]||(t[9]=o.createElementVNode("span",{class:"great-than"},"≥",-1)),o.createVNode(u,{modelValue:s.relatedMidNum,"onUpdate:modelValue":t[1]||(t[1]=A=>s.relatedMidNum=A),class:"number-input",min:2,controls:!1,onChange:a.handleFilterMidNumber},null,8,["modelValue","onChange"])])])])):o.createCommentVNode("",!0),o.createElementVNode("div",null,[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(a.buttonListShow,(A,I)=>(o.openBlock(),o.createBlock(f,{key:I,class:"item",effect:"dark",content:A.name,placement:"bottom","popper-class":"el-tooltip-gray"},{default:o.withCtx(()=>[o.createElementVNode("div",{class:o.normalizeClass(["img-box","button-one "+(A.disable?"disabled":"")]),onClick:O=>a.handleIconClick(A)},[o.createVNode(d,{class:"button-img","icon-class":e.imgPath["./public/d3svg1/button22/"+A.icon+".svg"]},null,8,["icon-class"])],10,_j)]),_:2},1032,["content"]))),128))]),!n.hideButtonList.includes("功能介绍")||!n.hideButtonList.includes("展开折叠")?(o.openBlock(),o.createElementBlock("div",Cj,[n.hideButtonList.includes("功能介绍")?o.createCommentVNode("",!0):(o.openBlock(),o.createBlock(g,{key:0,placement:"bottom-end",width:"auto",trigger:"hover"},{reference:o.withCtx(()=>[o.createElementVNode("div",Sj,[o.createVNode(f,{class:"item",effect:"dark",content:"功能介绍",placement:"bottom","popper-class":"el-tooltip-gray"},{default:o.withCtx(()=>[o.createVNode(d,{class:"button-img","icon-class":e.imgPath["./public/d3svg1/button22/hm_icon_help.svg"]},null,8,["icon-class"])]),_:1})])]),default:o.withCtx(()=>[o.createVNode(p,{config:n.moduleDetail.config||{}},null,8,["config"])]),_:1})),n.hideButtonList.includes("展开折叠")?o.createCommentVNode("",!0):(o.openBlock(),o.createElementBlock("div",{key:1,class:"button-one intro-button",onClick:t[2]||(t[2]=A=>a.handleAlias(s.flageAlias)),onMouseenter:t[3]||(t[3]=A=>a.hover(a.buttonList.length+1)),onMouseleave:t[4]||(t[4]=A=>a.out())},[o.createVNode(f,{class:"item",effect:"dark",content:s.flageAlias?"右侧折叠":"右侧展开",placement:"bottom","popper-class":"el-tooltip-gray"},{default:o.withCtx(()=>[o.createVNode(d,{class:"button-img","icon-class":e.imgPath[s.flageAlias?"./public/d3svg1/button22/hm_icon_alias_colse.svg":"./public/d3svg1/button22/hm_icon_alias.svg"]},null,8,["icon-class"])]),_:1},8,["content"])],32))])):o.createCommentVNode("",!0)],512)],512),o.createVNode(_,{modelValue:s.dialogVisible,"onUpdate:modelValue":t[6]||(t[6]=A=>s.dialogVisible=A),title:"选择导出数据格式","append-to-body":"",width:"400px","before-close":a.handleCloseModal,class:"el-dialog-graph"},{footer:o.withCtx(()=>[o.createElementVNode("span",Ej,[o.createVNode(w,{onClick:a.handleCloseModal},{default:o.withCtx(()=>t[11]||(t[11]=[o.createTextVNode("取 消")])),_:1},8,["onClick"]),o.createVNode(w,{type:"primary",onClick:a.handleExportData},{default:o.withCtx(()=>t[12]||(t[12]=[o.createTextVNode("导 出")])),_:1},8,["onClick"])])]),default:o.withCtx(()=>[o.createVNode(b,{modelValue:s.exportFormat,"onUpdate:modelValue":t[5]||(t[5]=A=>s.exportFormat=A),placeholder:"请选择导出数据格式"},{default:o.withCtx(()=>[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(s.formatOptions,A=>(o.openBlock(),o.createBlock(v,{key:A.value,label:A.label,value:A.value},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])]),_:1},8,["modelValue","before-close"]),o.createVNode(_,{modelValue:s.dialogImportVisible,"onUpdate:modelValue":t[7]||(t[7]=A=>s.dialogImportVisible=A),title:"导入数据","append-to-body":"",width:"400px","before-close":a.handleCloseImportModal,class:"el-dialog-graph"},{footer:o.withCtx(()=>[o.createElementVNode("span",xj,[o.createVNode(w,{onClick:a.handleCloseImportModal},{default:o.withCtx(()=>t[15]||(t[15]=[o.createTextVNode("取 消")])),_:1},8,["onClick"]),o.createVNode(w,{type:"primary",disabled:!s.importFile,onClick:a.handleImportData},{default:o.withCtx(()=>t[16]||(t[16]=[o.createTextVNode("导 入")])),_:1},8,["disabled","onClick"])])]),default:o.withCtx(()=>[o.createVNode(S,{drag:"",action:"#","auto-upload":!1,accept:".csv","file-list":s.importFileList,"on-change":a.handleFileChange,"on-remove":a.handleFileRemove},{tip:o.withCtx(()=>t[13]||(t[13]=[o.createElementVNode("div",{class:"el-upload__tip"},"只能上传由 Maltego 软件导出的csv文件",-1)])),default:o.withCtx(()=>[o.createVNode(k,{class:"el-icon-upload"},{default:o.withCtx(()=>[o.createVNode(C)]),_:1}),t[14]||(t[14]=o.createElementVNode("div",{class:"el-upload__text"},[o.createTextVNode("将文件拖到此处,或"),o.createElementVNode("em",null,"点击上传")],-1))]),_:1},8,["file-list","on-change","on-remove"])]),_:1},8,["modelValue","before-close"]),o.createVNode(E,{ref:"addNode","nodes-type":n.moduleDetail&&n.moduleDetail.nodes||[],"add-type":s.addType,onAddNodes:a.addNodes},null,8,["nodes-type","add-type","onAddNodes"]),o.createVNode(N,{ref:"addLink",onAddLink:a.addLink},null,8,["onAddLink"]),o.withDirectives(o.createElementVNode("div",kj,[o.createVNode(p,{config:n.moduleDetail.config||{},onMouseenter:a.showIntro,onMouseleave:a.hideIntro},null,8,["config","onMouseenter","onMouseleave"])],512),[[o.vShow,s.intro]])])}const Tj=_t(pj,[["render",Nj]]);var gp={exports:{}},mp={},st={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e._registerNode=e.Konva=e.glob=void 0;const t=Math.PI/180;function n(){return typeof window!="undefined"&&({}.toString.call(window)==="[object Window]"||{}.toString.call(window)==="[object global]")}e.glob=typeof wi!="undefined"?wi:typeof window!="undefined"?window:typeof WorkerGlobalScope!="undefined"?self:{},e.Konva={_global:e.glob,version:"9.3.15",isBrowser:n(),isUnminified:/param/.test(function(s){}.toString()),dblClickWindow:400,getAngle(s){return e.Konva.angleDeg?s*t:s},enableTrace:!1,pointerEventsEnabled:!0,autoDrawEnabled:!0,hitOnDragEnabled:!1,capturePointerEventsEnabled:!1,_mouseListenClick:!1,_touchListenClick:!1,_pointerListenClick:!1,_mouseInDblClickWindow:!1,_touchInDblClickWindow:!1,_pointerInDblClickWindow:!1,_mouseDblClickPointerId:null,_touchDblClickPointerId:null,_pointerDblClickPointerId:null,_fixTextRendering:!1,pixelRatio:typeof window!="undefined"&&window.devicePixelRatio||1,dragDistance:3,angleDeg:!0,showWarnings:!0,dragButtons:[0,1],isDragging(){return e.Konva.DD.isDragging},isTransforming(){var s;return(s=e.Konva.Transformer)===null||s===void 0?void 0:s.isTransforming()},isDragReady(){return!!e.Konva.DD.node},releaseCanvasOnDestroy:!0,document:e.glob.document,_injectGlobal(s){e.glob.Konva=s}};const r=s=>{e.Konva[s.prototype.getClassName()]=s};e._registerNode=r,e.Konva._injectGlobal(e.Konva)})(st);var Pt={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Util=e.Transform=void 0;const t=st;class n{constructor(E=[1,0,0,1,0,0]){this.dirty=!1,this.m=E&&E.slice()||[1,0,0,1,0,0]}reset(){this.m[0]=1,this.m[1]=0,this.m[2]=0,this.m[3]=1,this.m[4]=0,this.m[5]=0}copy(){return new n(this.m)}copyInto(E){E.m[0]=this.m[0],E.m[1]=this.m[1],E.m[2]=this.m[2],E.m[3]=this.m[3],E.m[4]=this.m[4],E.m[5]=this.m[5]}point(E){var N=this.m;return{x:N[0]*E.x+N[2]*E.y+N[4],y:N[1]*E.x+N[3]*E.y+N[5]}}translate(E,N){return this.m[4]+=this.m[0]*E+this.m[2]*N,this.m[5]+=this.m[1]*E+this.m[3]*N,this}scale(E,N){return this.m[0]*=E,this.m[1]*=E,this.m[2]*=N,this.m[3]*=N,this}rotate(E){var N=Math.cos(E),A=Math.sin(E),I=this.m[0]*N+this.m[2]*A,O=this.m[1]*N+this.m[3]*A,F=this.m[0]*-A+this.m[2]*N,P=this.m[1]*-A+this.m[3]*N;return this.m[0]=I,this.m[1]=O,this.m[2]=F,this.m[3]=P,this}getTranslation(){return{x:this.m[4],y:this.m[5]}}skew(E,N){var A=this.m[0]+this.m[2]*N,I=this.m[1]+this.m[3]*N,O=this.m[2]+this.m[0]*E,F=this.m[3]+this.m[1]*E;return this.m[0]=A,this.m[1]=I,this.m[2]=O,this.m[3]=F,this}multiply(E){var N=this.m[0]*E.m[0]+this.m[2]*E.m[1],A=this.m[1]*E.m[0]+this.m[3]*E.m[1],I=this.m[0]*E.m[2]+this.m[2]*E.m[3],O=this.m[1]*E.m[2]+this.m[3]*E.m[3],F=this.m[0]*E.m[4]+this.m[2]*E.m[5]+this.m[4],P=this.m[1]*E.m[4]+this.m[3]*E.m[5]+this.m[5];return this.m[0]=N,this.m[1]=A,this.m[2]=I,this.m[3]=O,this.m[4]=F,this.m[5]=P,this}invert(){var E=1/(this.m[0]*this.m[3]-this.m[1]*this.m[2]),N=this.m[3]*E,A=-this.m[1]*E,I=-this.m[2]*E,O=this.m[0]*E,F=E*(this.m[2]*this.m[5]-this.m[3]*this.m[4]),P=E*(this.m[1]*this.m[4]-this.m[0]*this.m[5]);return this.m[0]=N,this.m[1]=A,this.m[2]=I,this.m[3]=O,this.m[4]=F,this.m[5]=P,this}getMatrix(){return this.m}decompose(){var E=this.m[0],N=this.m[1],A=this.m[2],I=this.m[3],O=this.m[4],F=this.m[5],P=E*I-N*A;let M={x:O,y:F,rotation:0,scaleX:0,scaleY:0,skewX:0,skewY:0};if(E!=0||N!=0){var W=Math.sqrt(E*E+N*N);M.rotation=N>0?Math.acos(E/W):-Math.acos(E/W),M.scaleX=W,M.scaleY=P/W,M.skewX=(E*A+N*I)/P,M.skewY=0}else if(A!=0||I!=0){var U=Math.sqrt(A*A+I*I);M.rotation=Math.PI/2-(I>0?Math.acos(-A/U):-Math.acos(A/U)),M.scaleX=P/U,M.scaleY=U,M.skewX=0,M.skewY=(E*A+N*I)/P}return M.rotation=e.Util._getRotation(M.rotation),M}}e.Transform=n;var r="[object Array]",s="[object Number]",a="[object String]",l="[object Boolean]",c=Math.PI/180,u=180/Math.PI,d="#",f="",p="0",g="Konva warning: ",v="Konva error: ",b="rgb(",w={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,132,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,255,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,203],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[119,128,144],slategrey:[119,128,144],snow:[255,255,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],transparent:[255,255,255,0],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,5]},_=/rgb\((\d{1,3}),(\d{1,3}),(\d{1,3})\)/,C=[];const k=typeof requestAnimationFrame!="undefined"&&requestAnimationFrame||function(S){setTimeout(S,60)};e.Util={_isElement(S){return!!(S&&S.nodeType==1)},_isFunction(S){return!!(S&&S.constructor&&S.call&&S.apply)},_isPlainObject(S){return!!S&&S.constructor===Object},_isArray(S){return Object.prototype.toString.call(S)===r},_isNumber(S){return Object.prototype.toString.call(S)===s&&!isNaN(S)&&isFinite(S)},_isString(S){return Object.prototype.toString.call(S)===a},_isBoolean(S){return Object.prototype.toString.call(S)===l},isObject(S){return S instanceof Object},isValidSelector(S){if(typeof S!="string")return!1;var E=S[0];return E==="#"||E==="."||E===E.toUpperCase()},_sign(S){return S===0||S>0?1:-1},requestAnimFrame(S){C.push(S),C.length===1&&k(function(){const E=C;C=[],E.forEach(function(N){N()})})},createCanvasElement(){var S=document.createElement("canvas");try{S.style=S.style||{}}catch(E){}return S},createImageElement(){return document.createElement("img")},_isInDocument(S){for(;S=S.parentNode;)if(S==document)return!0;return!1},_urlToImage(S,E){var N=e.Util.createImageElement();N.onload=function(){E(N)},N.src=S},_rgbToHex(S,E,N){return((1<<24)+(S<<16)+(E<<8)+N).toString(16).slice(1)},_hexToRgb(S){S=S.replace(d,f);var E=parseInt(S,16);return{r:E>>16&255,g:E>>8&255,b:E&255}},getRandomColor(){for(var S=(Math.random()*16777215<<0).toString(16);S.length<6;)S=p+S;return d+S},getRGB(S){var E;return S in w?(E=w[S],{r:E[0],g:E[1],b:E[2]}):S[0]===d?this._hexToRgb(S.substring(1)):S.substr(0,4)===b?(E=_.exec(S.replace(/ /g,"")),{r:parseInt(E[1],10),g:parseInt(E[2],10),b:parseInt(E[3],10)}):{r:0,g:0,b:0}},colorToRGBA(S){return S=S||"black",e.Util._namedColorToRBA(S)||e.Util._hex3ColorToRGBA(S)||e.Util._hex4ColorToRGBA(S)||e.Util._hex6ColorToRGBA(S)||e.Util._hex8ColorToRGBA(S)||e.Util._rgbColorToRGBA(S)||e.Util._rgbaColorToRGBA(S)||e.Util._hslColorToRGBA(S)},_namedColorToRBA(S){var E=w[S.toLowerCase()];return E?{r:E[0],g:E[1],b:E[2],a:1}:null},_rgbColorToRGBA(S){if(S.indexOf("rgb(")===0){S=S.match(/rgb\(([^)]+)\)/)[1];var E=S.split(/ *, */).map(Number);return{r:E[0],g:E[1],b:E[2],a:1}}},_rgbaColorToRGBA(S){if(S.indexOf("rgba(")===0){S=S.match(/rgba\(([^)]+)\)/)[1];var E=S.split(/ *, */).map((N,A)=>N.slice(-1)==="%"?A===3?parseInt(N)/100:parseInt(N)/100*255:Number(N));return{r:E[0],g:E[1],b:E[2],a:E[3]}}},_hex8ColorToRGBA(S){if(S[0]==="#"&&S.length===9)return{r:parseInt(S.slice(1,3),16),g:parseInt(S.slice(3,5),16),b:parseInt(S.slice(5,7),16),a:parseInt(S.slice(7,9),16)/255}},_hex6ColorToRGBA(S){if(S[0]==="#"&&S.length===7)return{r:parseInt(S.slice(1,3),16),g:parseInt(S.slice(3,5),16),b:parseInt(S.slice(5,7),16),a:1}},_hex4ColorToRGBA(S){if(S[0]==="#"&&S.length===5)return{r:parseInt(S[1]+S[1],16),g:parseInt(S[2]+S[2],16),b:parseInt(S[3]+S[3],16),a:parseInt(S[4]+S[4],16)/255}},_hex3ColorToRGBA(S){if(S[0]==="#"&&S.length===4)return{r:parseInt(S[1]+S[1],16),g:parseInt(S[2]+S[2],16),b:parseInt(S[3]+S[3],16),a:1}},_hslColorToRGBA(S){if(/hsl\((\d+),\s*([\d.]+)%,\s*([\d.]+)%\)/g.test(S)){const[E,...N]=/hsl\((\d+),\s*([\d.]+)%,\s*([\d.]+)%\)/g.exec(S),A=Number(N[0])/360,I=Number(N[1])/100,O=Number(N[2])/100;let F,P,M;if(I===0)return M=O*255,{r:Math.round(M),g:Math.round(M),b:Math.round(M),a:1};O<.5?F=O*(1+I):F=O+I-O*I;const W=2*O-F,U=[0,0,0];for(let Q=0;Q<3;Q++)P=A+1/3*-(Q-1),P<0&&P++,P>1&&P--,6*P<1?M=W+(F-W)*6*P:2*P<1?M=F:3*P<2?M=W+(F-W)*(2/3-P)*6:M=W,U[Q]=M*255;return{r:Math.round(U[0]),g:Math.round(U[1]),b:Math.round(U[2]),a:1}}},haveIntersection(S,E){return!(E.x>S.x+S.width||E.x+E.width<S.x||E.y>S.y+S.height||E.y+E.height<S.y)},cloneObject(S){var E={};for(var N in S)this._isPlainObject(S[N])?E[N]=this.cloneObject(S[N]):this._isArray(S[N])?E[N]=this.cloneArray(S[N]):E[N]=S[N];return E},cloneArray(S){return S.slice(0)},degToRad(S){return S*c},radToDeg(S){return S*u},_degToRad(S){return e.Util.warn("Util._degToRad is removed. Please use public Util.degToRad instead."),e.Util.degToRad(S)},_radToDeg(S){return e.Util.warn("Util._radToDeg is removed. Please use public Util.radToDeg instead."),e.Util.radToDeg(S)},_getRotation(S){return t.Konva.angleDeg?e.Util.radToDeg(S):S},_capitalize(S){return S.charAt(0).toUpperCase()+S.slice(1)},throw(S){throw new Error(v+S)},error(S){console.error(v+S)},warn(S){t.Konva.showWarnings&&console.warn(g+S)},each(S,E){for(var N in S)E(N,S[N])},_inRange(S,E,N){return E<=S&&S<N},_getProjectionToSegment(S,E,N,A,I,O){var F,P,M,W=(S-N)*(S-N)+(E-A)*(E-A);if(W==0)F=S,P=E,M=(I-N)*(I-N)+(O-A)*(O-A);else{var U=((I-S)*(N-S)+(O-E)*(A-E))/W;U<0?(F=S,P=E,M=(S-I)*(S-I)+(E-O)*(E-O)):U>1?(F=N,P=A,M=(N-I)*(N-I)+(A-O)*(A-O)):(F=S+U*(N-S),P=E+U*(A-E),M=(F-I)*(F-I)+(P-O)*(P-O))}return[F,P,M]},_getProjectionToLine(S,E,N){var A=e.Util.cloneObject(S),I=Number.MAX_VALUE;return E.forEach(function(O,F){if(!(!N&&F===E.length-1)){var P=E[(F+1)%E.length],M=e.Util._getProjectionToSegment(O.x,O.y,P.x,P.y,S.x,S.y),W=M[0],U=M[1],Q=M[2];Q<I&&(A.x=W,A.y=U,I=Q)}}),A},_prepareArrayForTween(S,E,N){var A,I=[],O=[];if(S.length>E.length){var F=E;E=S,S=F}for(A=0;A<S.length;A+=2)I.push({x:S[A],y:S[A+1]});for(A=0;A<E.length;A+=2)O.push({x:E[A],y:E[A+1]});var P=[];return O.forEach(function(M){var W=e.Util._getProjectionToLine(M,I,N);P.push(W.x),P.push(W.y)}),P},_prepareToStringify(S){var E;S.visitedByCircularReferenceRemoval=!0;for(var N in S)if(S.hasOwnProperty(N)&&S[N]&&typeof S[N]=="object"){if(E=Object.getOwnPropertyDescriptor(S,N),S[N].visitedByCircularReferenceRemoval||e.Util._isElement(S[N]))if(E.configurable)delete S[N];else return null;else if(e.Util._prepareToStringify(S[N])===null)if(E.configurable)delete S[N];else return null}return delete S.visitedByCircularReferenceRemoval,S},_assign(S,E){for(var N in E)S[N]=E[N];return S},_getFirstPointerId(S){return S.touches?S.changedTouches[0].identifier:S.pointerId||999},releaseCanvas(...S){t.Konva.releaseCanvasOnDestroy&&S.forEach(E=>{E.width=0,E.height=0})},drawRoundedRectPath(S,E,N,A){let I=0,O=0,F=0,P=0;typeof A=="number"?I=O=F=P=Math.min(A,E/2,N/2):(I=Math.min(A[0]||0,E/2,N/2),O=Math.min(A[1]||0,E/2,N/2),P=Math.min(A[2]||0,E/2,N/2),F=Math.min(A[3]||0,E/2,N/2)),S.moveTo(I,0),S.lineTo(E-O,0),S.arc(E-O,O,O,Math.PI*3/2,0,!1),S.lineTo(E,N-P),S.arc(E-P,N-P,P,0,Math.PI/2,!1),S.lineTo(F,N),S.arc(F,N-F,F,Math.PI/2,Math.PI,!1),S.lineTo(0,I),S.arc(I,I,I,Math.PI,Math.PI*3/2,!1)}}})(Pt);var xi={},cn={},qe={};Object.defineProperty(qe,"__esModule",{value:!0}),qe.getComponentValidator=qe.getBooleanValidator=qe.getNumberArrayValidator=qe.getFunctionValidator=qe.getStringOrGradientValidator=qe.getStringValidator=qe.getNumberOrAutoValidator=qe.getNumberOrArrayOfNumbersValidator=qe.getNumberValidator=qe.alphaComponent=qe.RGBComponent=void 0;const Vr=st,mt=Pt;function ei(e){return mt.Util._isString(e)?'"'+e+'"':Object.prototype.toString.call(e)==="[object Number]"||mt.Util._isBoolean(e)?e:Object.prototype.toString.call(e)}function Aj(e){return e>255?255:e<0?0:Math.round(e)}qe.RGBComponent=Aj;function Oj(e){return e>1?1:e<1e-4?1e-4:e}qe.alphaComponent=Oj;function Ij(){if(Vr.Konva.isUnminified)return function(e,t){return mt.Util._isNumber(e)||mt.Util.warn(ei(e)+' is a not valid value for "'+t+'" attribute. The value should be a number.'),e}}qe.getNumberValidator=Ij;function Bj(e){if(Vr.Konva.isUnminified)return function(t,n){let r=mt.Util._isNumber(t),s=mt.Util._isArray(t)&&t.length==e;return!r&&!s&&mt.Util.warn(ei(t)+' is a not valid value for "'+n+'" attribute. The value should be a number or Array<number>('+e+")"),t}}qe.getNumberOrArrayOfNumbersValidator=Bj;function Lj(){if(Vr.Konva.isUnminified)return function(e,t){var n=mt.Util._isNumber(e),r=e==="auto";return n||r||mt.Util.warn(ei(e)+' is a not valid value for "'+t+'" attribute. The value should be a number or "auto".'),e}}qe.getNumberOrAutoValidator=Lj;function Rj(){if(Vr.Konva.isUnminified)return function(e,t){return mt.Util._isString(e)||mt.Util.warn(ei(e)+' is a not valid value for "'+t+'" attribute. The value should be a string.'),e}}qe.getStringValidator=Rj;function Pj(){if(Vr.Konva.isUnminified)return function(e,t){const n=mt.Util._isString(e),r=Object.prototype.toString.call(e)==="[object CanvasGradient]"||e&&e.addColorStop;return n||r||mt.Util.warn(ei(e)+' is a not valid value for "'+t+'" attribute. The value should be a string or a native gradient.'),e}}qe.getStringOrGradientValidator=Pj;function Dj(){if(Vr.Konva.isUnminified)return function(e,t){return mt.Util._isFunction(e)||mt.Util.warn(ei(e)+' is a not valid value for "'+t+'" attribute. The value should be a function.'),e}}qe.getFunctionValidator=Dj;function Mj(){if(Vr.Konva.isUnminified)return function(e,t){const n=Int8Array?Object.getPrototypeOf(Int8Array):null;return n&&e instanceof n||(mt.Util._isArray(e)?e.forEach(function(r){mt.Util._isNumber(r)||mt.Util.warn('"'+t+'" attribute has non numeric element '+r+". Make sure that all elements are numbers.")}):mt.Util.warn(ei(e)+' is a not valid value for "'+t+'" attribute. The value should be a array of numbers.')),e}}qe.getNumberArrayValidator=Mj;function Fj(){if(Vr.Konva.isUnminified)return function(e,t){var n=e===!0||e===!1;return n||mt.Util.warn(ei(e)+' is a not valid value for "'+t+'" attribute. The value should be a boolean.'),e}}qe.getBooleanValidator=Fj;function $j(e){if(Vr.Konva.isUnminified)return function(t,n){return t==null||mt.Util.isObject(t)||mt.Util.warn(ei(t)+' is a not valid value for "'+n+'" attribute. The value should be an object with properties '+e),t}}qe.getComponentValidator=$j,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Factory=void 0;const t=Pt,n=qe;var r="get",s="set";e.Factory={addGetterSetter(a,l,c,u,d){e.Factory.addGetter(a,l,c),e.Factory.addSetter(a,l,u,d),e.Factory.addOverloadedGetterSetter(a,l)},addGetter(a,l,c){var u=r+t.Util._capitalize(l);a.prototype[u]=a.prototype[u]||function(){var d=this.attrs[l];return d===void 0?c:d}},addSetter(a,l,c,u){var d=s+t.Util._capitalize(l);a.prototype[d]||e.Factory.overWriteSetter(a,l,c,u)},overWriteSetter(a,l,c,u){var d=s+t.Util._capitalize(l);a.prototype[d]=function(f){return c&&f!==void 0&&f!==null&&(f=c.call(this,f,l)),this._setAttr(l,f),u&&u.call(this),this}},addComponentsGetterSetter(a,l,c,u,d){var f=c.length,p=t.Util._capitalize,g=r+p(l),v=s+p(l),b,w;a.prototype[g]=function(){var C={};for(b=0;b<f;b++)w=c[b],C[w]=this.getAttr(l+p(w));return C};var _=(0,n.getComponentValidator)(c);a.prototype[v]=function(C){var k=this.attrs[l],S;u&&(C=u.call(this,C)),_&&_.call(this,C,l);for(S in C)C.hasOwnProperty(S)&&this._setAttr(l+p(S),C[S]);return C||c.forEach(E=>{this._setAttr(l+p(E),void 0)}),this._fireChangeEvent(l,k,C),d&&d.call(this),this},e.Factory.addOverloadedGetterSetter(a,l)},addOverloadedGetterSetter(a,l){var c=t.Util._capitalize(l),u=s+c,d=r+c;a.prototype[l]=function(){return arguments.length?(this[u](arguments[0]),this):this[d]()}},addDeprecatedGetterSetter(a,l,c,u){t.Util.error("Adding deprecated "+l);var d=r+t.Util._capitalize(l),f=l+" property is deprecated and will be removed soon. Look at Konva change log for more information.";a.prototype[d]=function(){t.Util.error(f);var p=this.attrs[l];return p===void 0?c:p},e.Factory.addSetter(a,l,u,function(){t.Util.error(f)}),e.Factory.addOverloadedGetterSetter(a,l)},backCompat(a,l){t.Util.each(l,function(c,u){var d=a.prototype[u],f=r+t.Util._capitalize(c),p=s+t.Util._capitalize(c);function g(){d.apply(this,arguments),t.Util.error('"'+c+'" method is deprecated and will be removed soon. Use ""'+u+'" instead.')}a.prototype[c]=g,a.prototype[f]=g,a.prototype[p]=g})},afterSetFilter(){this._filterUpToDate=!1}}}(cn);var ir={},ti={};Object.defineProperty(ti,"__esModule",{value:!0}),ti.HitContext=ti.SceneContext=ti.Context=void 0;const zw=Pt,zj=st;function Uj(e){var t=[],n=e.length,r=zw.Util,s,a;for(s=0;s<n;s++)a=e[s],r._isNumber(a)?a=Math.round(a*1e3)/1e3:r._isString(a)||(a=a+""),t.push(a);return t}var Uw=",",jj="(",qj=")",Hj="([",Gj="])",Wj=";",Kj="()",Yj="=",jw=["arc","arcTo","beginPath","bezierCurveTo","clearRect","clip","closePath","createLinearGradient","createPattern","createRadialGradient","drawImage","ellipse","fill","fillText","getImageData","createImageData","lineTo","moveTo","putImageData","quadraticCurveTo","rect","roundRect","restore","rotate","save","scale","setLineDash","setTransform","stroke","strokeText","transform","translate"],Jj=["fillStyle","strokeStyle","shadowColor","shadowBlur","shadowOffsetX","shadowOffsetY","letterSpacing","lineCap","lineDashOffset","lineJoin","lineWidth","miterLimit","direction","font","textAlign","textBaseline","globalAlpha","globalCompositeOperation","imageSmoothingEnabled"];const Xj=100;class zc{constructor(t){this.canvas=t,zj.Konva.enableTrace&&(this.traceArr=[],this._enableTrace())}fillShape(t){t.fillEnabled()&&this._fill(t)}_fill(t){}strokeShape(t){t.hasStroke()&&this._stroke(t)}_stroke(t){}fillStrokeShape(t){t.attrs.fillAfterStrokeEnabled?(this.strokeShape(t),this.fillShape(t)):(this.fillShape(t),this.strokeShape(t))}getTrace(t,n){var r=this.traceArr,s=r.length,a="",l,c,u,d;for(l=0;l<s;l++)c=r[l],u=c.method,u?(d=c.args,a+=u,t?a+=Kj:zw.Util._isArray(d[0])?a+=Hj+d.join(Uw)+Gj:(n&&(d=d.map(f=>typeof f=="number"?Math.floor(f):f)),a+=jj+d.join(Uw)+qj)):(a+=c.property,t||(a+=Yj+c.val)),a+=Wj;return a}clearTrace(){this.traceArr=[]}_trace(t){var n=this.traceArr,r;n.push(t),r=n.length,r>=Xj&&n.shift()}reset(){var t=this.getCanvas().getPixelRatio();this.setTransform(1*t,0,0,1*t,0,0)}getCanvas(){return this.canvas}clear(t){var n=this.getCanvas();t?this.clearRect(t.x||0,t.y||0,t.width||0,t.height||0):this.clearRect(0,0,n.getWidth()/n.pixelRatio,n.getHeight()/n.pixelRatio)}_applyLineCap(t){const n=t.attrs.lineCap;n&&this.setAttr("lineCap",n)}_applyOpacity(t){var n=t.getAbsoluteOpacity();n!==1&&this.setAttr("globalAlpha",n)}_applyLineJoin(t){const n=t.attrs.lineJoin;n&&this.setAttr("lineJoin",n)}setAttr(t,n){this._context[t]=n}arc(t,n,r,s,a,l){this._context.arc(t,n,r,s,a,l)}arcTo(t,n,r,s,a){this._context.arcTo(t,n,r,s,a)}beginPath(){this._context.beginPath()}bezierCurveTo(t,n,r,s,a,l){this._context.bezierCurveTo(t,n,r,s,a,l)}clearRect(t,n,r,s){this._context.clearRect(t,n,r,s)}clip(...t){this._context.clip.apply(this._context,t)}closePath(){this._context.closePath()}createImageData(t,n){var r=arguments;if(r.length===2)return this._context.createImageData(t,n);if(r.length===1)return this._context.createImageData(t)}createLinearGradient(t,n,r,s){return this._context.createLinearGradient(t,n,r,s)}createPattern(t,n){return this._context.createPattern(t,n)}createRadialGradient(t,n,r,s,a,l){return this._context.createRadialGradient(t,n,r,s,a,l)}drawImage(t,n,r,s,a,l,c,u,d){var f=arguments,p=this._context;f.length===3?p.drawImage(t,n,r):f.length===5?p.drawImage(t,n,r,s,a):f.length===9&&p.drawImage(t,n,r,s,a,l,c,u,d)}ellipse(t,n,r,s,a,l,c,u){this._context.ellipse(t,n,r,s,a,l,c,u)}isPointInPath(t,n,r,s){return r?this._context.isPointInPath(r,t,n,s):this._context.isPointInPath(t,n,s)}fill(...t){this._context.fill.apply(this._context,t)}fillRect(t,n,r,s){this._context.fillRect(t,n,r,s)}strokeRect(t,n,r,s){this._context.strokeRect(t,n,r,s)}fillText(t,n,r,s){s?this._context.fillText(t,n,r,s):this._context.fillText(t,n,r)}measureText(t){return this._context.measureText(t)}getImageData(t,n,r,s){return this._context.getImageData(t,n,r,s)}lineTo(t,n){this._context.lineTo(t,n)}moveTo(t,n){this._context.moveTo(t,n)}rect(t,n,r,s){this._context.rect(t,n,r,s)}roundRect(t,n,r,s,a){this._context.roundRect(t,n,r,s,a)}putImageData(t,n,r){this._context.putImageData(t,n,r)}quadraticCurveTo(t,n,r,s){this._context.quadraticCurveTo(t,n,r,s)}restore(){this._context.restore()}rotate(t){this._context.rotate(t)}save(){this._context.save()}scale(t,n){this._context.scale(t,n)}setLineDash(t){this._context.setLineDash?this._context.setLineDash(t):"mozDash"in this._context?this._context.mozDash=t:"webkitLineDash"in this._context&&(this._context.webkitLineDash=t)}getLineDash(){return this._context.getLineDash()}setTransform(t,n,r,s,a,l){this._context.setTransform(t,n,r,s,a,l)}stroke(t){t?this._context.stroke(t):this._context.stroke()}strokeText(t,n,r,s){this._context.strokeText(t,n,r,s)}transform(t,n,r,s,a,l){this._context.transform(t,n,r,s,a,l)}translate(t,n){this._context.translate(t,n)}_enableTrace(){var t=this,n=jw.length,r=this.setAttr,s,a,l=function(c){var u=t[c],d;t[c]=function(){return a=Uj(Array.prototype.slice.call(arguments,0)),d=u.apply(t,arguments),t._trace({method:c,args:a}),d}};for(s=0;s<n;s++)l(jw[s]);t.setAttr=function(){r.apply(t,arguments);var c=arguments[0],u=arguments[1];(c==="shadowOffsetX"||c==="shadowOffsetY"||c==="shadowBlur")&&(u=u/this.canvas.getPixelRatio()),t._trace({property:c,val:u})}}_applyGlobalCompositeOperation(t){const n=t.attrs.globalCompositeOperation;var r=!n||n==="source-over";r||this.setAttr("globalCompositeOperation",n)}}ti.Context=zc,Jj.forEach(function(e){Object.defineProperty(zc.prototype,e,{get(){return this._context[e]},set(t){this._context[e]=t}})});class Qj extends zc{constructor(t,{willReadFrequently:n=!1}={}){super(t),this._context=t._canvas.getContext("2d",{willReadFrequently:n})}_fillColor(t){var n=t.fill();this.setAttr("fillStyle",n),t._fillFunc(this)}_fillPattern(t){this.setAttr("fillStyle",t._getFillPattern()),t._fillFunc(this)}_fillLinearGradient(t){var n=t._getLinearGradient();n&&(this.setAttr("fillStyle",n),t._fillFunc(this))}_fillRadialGradient(t){const n=t._getRadialGradient();n&&(this.setAttr("fillStyle",n),t._fillFunc(this))}_fill(t){const n=t.fill(),r=t.getFillPriority();if(n&&r==="color"){this._fillColor(t);return}const s=t.getFillPatternImage();if(s&&r==="pattern"){this._fillPattern(t);return}const a=t.getFillLinearGradientColorStops();if(a&&r==="linear-gradient"){this._fillLinearGradient(t);return}const l=t.getFillRadialGradientColorStops();if(l&&r==="radial-gradient"){this._fillRadialGradient(t);return}n?this._fillColor(t):s?this._fillPattern(t):a?this._fillLinearGradient(t):l&&this._fillRadialGradient(t)}_strokeLinearGradient(t){const n=t.getStrokeLinearGradientStartPoint(),r=t.getStrokeLinearGradientEndPoint(),s=t.getStrokeLinearGradientColorStops(),a=this.createLinearGradient(n.x,n.y,r.x,r.y);if(s){for(var l=0;l<s.length;l+=2)a.addColorStop(s[l],s[l+1]);this.setAttr("strokeStyle",a)}}_stroke(t){var n=t.dash(),r=t.getStrokeScaleEnabled();if(t.hasStroke()){if(!r){this.save();var s=this.getCanvas().getPixelRatio();this.setTransform(s,0,0,s,0,0)}this._applyLineCap(t),n&&t.dashEnabled()&&(this.setLineDash(n),this.setAttr("lineDashOffset",t.dashOffset())),this.setAttr("lineWidth",t.strokeWidth()),t.getShadowForStrokeEnabled()||this.setAttr("shadowColor","rgba(0,0,0,0)");var a=t.getStrokeLinearGradientColorStops();a?this._strokeLinearGradient(t):this.setAttr("strokeStyle",t.stroke()),t._strokeFunc(this),r||this.restore()}}_applyShadow(t){var n,r,s,a=(n=t.getShadowRGBA())!==null&&n!==void 0?n:"black",l=(r=t.getShadowBlur())!==null&&r!==void 0?r:5,c=(s=t.getShadowOffset())!==null&&s!==void 0?s:{x:0,y:0},u=t.getAbsoluteScale(),d=this.canvas.getPixelRatio(),f=u.x*d,p=u.y*d;this.setAttr("shadowColor",a),this.setAttr("shadowBlur",l*Math.min(Math.abs(f),Math.abs(p))),this.setAttr("shadowOffsetX",c.x*f),this.setAttr("shadowOffsetY",c.y*p)}}ti.SceneContext=Qj;class Zj extends zc{constructor(t){super(t),this._context=t._canvas.getContext("2d",{willReadFrequently:!0})}_fill(t){this.save(),this.setAttr("fillStyle",t.colorKey),t._fillFuncHit(this),this.restore()}strokeShape(t){t.hasHitStroke()&&this._stroke(t)}_stroke(t){if(t.hasHitStroke()){const a=t.getStrokeScaleEnabled();if(!a){this.save();var n=this.getCanvas().getPixelRatio();this.setTransform(n,0,0,n,0,0)}this._applyLineCap(t);var r=t.hitStrokeWidth(),s=r==="auto"?t.strokeWidth():r;this.setAttr("lineWidth",s),this.setAttr("strokeStyle",t.colorKey),t._strokeFuncHit(this),a||this.restore()}}}ti.HitContext=Zj,Object.defineProperty(ir,"__esModule",{value:!0}),ir.HitCanvas=ir.SceneCanvas=ir.Canvas=void 0;const Uc=Pt,qw=ti,Hw=st,Vj=cn,eq=qe;var jc;function tq(){if(jc)return jc;var e=Uc.Util.createCanvasElement(),t=e.getContext("2d");return jc=function(){var n=Hw.Konva._global.devicePixelRatio||1,r=t.webkitBackingStorePixelRatio||t.mozBackingStorePixelRatio||t.msBackingStorePixelRatio||t.oBackingStorePixelRatio||t.backingStorePixelRatio||1;return n/r}(),Uc.Util.releaseCanvas(e),jc}class qc{constructor(t){this.pixelRatio=1,this.width=0,this.height=0,this.isCache=!1;var n=t||{},r=n.pixelRatio||Hw.Konva.pixelRatio||tq();this.pixelRatio=r,this._canvas=Uc.Util.createCanvasElement(),this._canvas.style.padding="0",this._canvas.style.margin="0",this._canvas.style.border="0",this._canvas.style.background="transparent",this._canvas.style.position="absolute",this._canvas.style.top="0",this._canvas.style.left="0"}getContext(){return this.context}getPixelRatio(){return this.pixelRatio}setPixelRatio(t){var n=this.pixelRatio;this.pixelRatio=t,this.setSize(this.getWidth()/n,this.getHeight()/n)}setWidth(t){this.width=this._canvas.width=t*this.pixelRatio,this._canvas.style.width=t+"px";var n=this.pixelRatio,r=this.getContext()._context;r.scale(n,n)}setHeight(t){this.height=this._canvas.height=t*this.pixelRatio,this._canvas.style.height=t+"px";var n=this.pixelRatio,r=this.getContext()._context;r.scale(n,n)}getWidth(){return this.width}getHeight(){return this.height}setSize(t,n){this.setWidth(t||0),this.setHeight(n||0)}toDataURL(t,n){try{return this._canvas.toDataURL(t,n)}catch(r){try{return this._canvas.toDataURL()}catch(s){return Uc.Util.error("Unable to get data URL. "+s.message+" For more info read https://konvajs.org/docs/posts/Tainted_Canvas.html."),""}}}}ir.Canvas=qc,Vj.Factory.addGetterSetter(qc,"pixelRatio",void 0,(0,eq.getNumberValidator)());class nq extends qc{constructor(t={width:0,height:0,willReadFrequently:!1}){super(t),this.context=new qw.SceneContext(this,{willReadFrequently:t.willReadFrequently}),this.setSize(t.width,t.height)}}ir.SceneCanvas=nq;class rq extends qc{constructor(t={width:0,height:0}){super(t),this.hitCanvas=!0,this.context=new qw.HitContext(this),this.setSize(t.width,t.height)}}ir.HitCanvas=rq;var Hc={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.DD=void 0;const t=st,n=Pt;e.DD={get isDragging(){var r=!1;return e.DD._dragElements.forEach(s=>{s.dragStatus==="dragging"&&(r=!0)}),r},justDragged:!1,get node(){var r;return e.DD._dragElements.forEach(s=>{r=s.node}),r},_dragElements:new Map,_drag(r){const s=[];e.DD._dragElements.forEach((a,l)=>{const{node:c}=a,u=c.getStage();u.setPointersPositions(r),a.pointerId===void 0&&(a.pointerId=n.Util._getFirstPointerId(r));const d=u._changedPointerPositions.find(g=>g.id===a.pointerId);if(d){if(a.dragStatus!=="dragging"){var f=c.dragDistance(),p=Math.max(Math.abs(d.x-a.startPointerPos.x),Math.abs(d.y-a.startPointerPos.y));if(p<f||(c.startDrag({evt:r}),!c.isDragging()))return}c._setDragPosition(r,a),s.push(c)}}),s.forEach(a=>{a.fire("dragmove",{type:"dragmove",target:a,evt:r},!0)})},_endDragBefore(r){const s=[];e.DD._dragElements.forEach(a=>{const{node:l}=a,c=l.getStage();if(r&&c.setPointersPositions(r),!c._changedPointerPositions.find(f=>f.id===a.pointerId))return;(a.dragStatus==="dragging"||a.dragStatus==="stopped")&&(e.DD.justDragged=!0,t.Konva._mouseListenClick=!1,t.Konva._touchListenClick=!1,t.Konva._pointerListenClick=!1,a.dragStatus="stopped");const d=a.node.getLayer()||a.node instanceof t.Konva.Stage&&a.node;d&&s.indexOf(d)===-1&&s.push(d)}),s.forEach(a=>{a.draw()})},_endDragAfter(r){e.DD._dragElements.forEach((s,a)=>{s.dragStatus==="stopped"&&s.node.fire("dragend",{type:"dragend",target:s.node,evt:r},!0),s.dragStatus!=="dragging"&&e.DD._dragElements.delete(a)})}},t.Konva.isBrowser&&(window.addEventListener("mouseup",e.DD._endDragBefore,!0),window.addEventListener("touchend",e.DD._endDragBefore,!0),window.addEventListener("mousemove",e.DD._drag),window.addEventListener("touchmove",e.DD._drag),window.addEventListener("mouseup",e.DD._endDragAfter,!1),window.addEventListener("touchend",e.DD._endDragAfter,!1))})(Hc),Object.defineProperty(xi,"__esModule",{value:!0}),xi.Node=void 0;const je=Pt,Ia=cn,Ba=ir,ki=st,Pn=Hc,Ct=qe;var Gc="absoluteOpacity",Wc="allEventListeners",ni="absoluteTransform",Gw="absoluteScale",co="canvas",iq="Change",oq="children",sq="konva",vp="listening",Ww="mouseenter",Kw="mouseleave",Yw="set",Jw="Shape",Kc=" ",Xw="stage",Ni="transform",aq="Stage",yp="visible",lq=["xChange.konva","yChange.konva","scaleXChange.konva","scaleYChange.konva","skewXChange.konva","skewYChange.konva","rotationChange.konva","offsetXChange.konva","offsetYChange.konva","transformsEnabledChange.konva"].join(Kc);let cq=1;class Ie{constructor(t){this._id=cq++,this.eventListeners={},this.attrs={},this.index=0,this._allEventListeners=null,this.parent=null,this._cache=new Map,this._attachedDepsListeners=new Map,this._lastPos=null,this._batchingTransformChange=!1,this._needClearTransformCache=!1,this._filterUpToDate=!1,this._isUnderCache=!1,this._dragEventId=null,this._shouldFireChangeEvents=!1,this.setAttrs(t),this._shouldFireChangeEvents=!0}hasChildren(){return!1}_clearCache(t){(t===Ni||t===ni)&&this._cache.get(t)?this._cache.get(t).dirty=!0:t?this._cache.delete(t):this._cache.clear()}_getCache(t,n){var r=this._cache.get(t),s=t===Ni||t===ni,a=r===void 0||s&&r.dirty===!0;return a&&(r=n.call(this),this._cache.set(t,r)),r}_calculate(t,n,r){if(!this._attachedDepsListeners.get(t)){const s=n.map(a=>a+"Change.konva").join(Kc);this.on(s,()=>{this._clearCache(t)}),this._attachedDepsListeners.set(t,!0)}return this._getCache(t,r)}_getCanvasCache(){return this._cache.get(co)}_clearSelfAndDescendantCache(t){this._clearCache(t),t===ni&&this.fire("absoluteTransformChange")}clearCache(){if(this._cache.has(co)){const{scene:t,filter:n,hit:r}=this._cache.get(co);je.Util.releaseCanvas(t,n,r),this._cache.delete(co)}return this._clearSelfAndDescendantCache(),this._requestDraw(),this}cache(t){var n=t||{},r={};(n.x===void 0||n.y===void 0||n.width===void 0||n.height===void 0)&&(r=this.getClientRect({skipTransform:!0,relativeTo:this.getParent()||void 0}));var s=Math.ceil(n.width||r.width),a=Math.ceil(n.height||r.height),l=n.pixelRatio,c=n.x===void 0?Math.floor(r.x):n.x,u=n.y===void 0?Math.floor(r.y):n.y,d=n.offset||0,f=n.drawBorder||!1,p=n.hitCanvasPixelRatio||1;if(!s||!a){je.Util.error("Can not cache the node. Width or height of the node equals 0. Caching is skipped.");return}const g=Math.abs(Math.round(r.x)-c)>.5?1:0,v=Math.abs(Math.round(r.y)-u)>.5?1:0;s+=d*2+g,a+=d*2+v,c-=d,u-=d;var b=new Ba.SceneCanvas({pixelRatio:l,width:s,height:a}),w=new Ba.SceneCanvas({pixelRatio:l,width:0,height:0,willReadFrequently:!0}),_=new Ba.HitCanvas({pixelRatio:p,width:s,height:a}),C=b.getContext(),k=_.getContext();return _.isCache=!0,b.isCache=!0,this._cache.delete(co),this._filterUpToDate=!1,n.imageSmoothingEnabled===!1&&(b.getContext()._context.imageSmoothingEnabled=!1,w.getContext()._context.imageSmoothingEnabled=!1),C.save(),k.save(),C.translate(-c,-u),k.translate(-c,-u),this._isUnderCache=!0,this._clearSelfAndDescendantCache(Gc),this._clearSelfAndDescendantCache(Gw),this.drawScene(b,this),this.drawHit(_,this),this._isUnderCache=!1,C.restore(),k.restore(),f&&(C.save(),C.beginPath(),C.rect(0,0,s,a),C.closePath(),C.setAttr("strokeStyle","red"),C.setAttr("lineWidth",5),C.stroke(),C.restore()),this._cache.set(co,{scene:b,filter:w,hit:_,x:c,y:u}),this._requestDraw(),this}isCached(){return this._cache.has(co)}getClientRect(t){throw new Error('abstract "getClientRect" method call')}_transformedRect(t,n){var r=[{x:t.x,y:t.y},{x:t.x+t.width,y:t.y},{x:t.x+t.width,y:t.y+t.height},{x:t.x,y:t.y+t.height}],s=1/0,a=1/0,l=-1/0,c=-1/0,u=this.getAbsoluteTransform(n);return r.forEach(function(d){var f=u.point(d);s===void 0&&(s=l=f.x,a=c=f.y),s=Math.min(s,f.x),a=Math.min(a,f.y),l=Math.max(l,f.x),c=Math.max(c,f.y)}),{x:s,y:a,width:l-s,height:c-a}}_drawCachedSceneCanvas(t){t.save(),t._applyOpacity(this),t._applyGlobalCompositeOperation(this);const n=this._getCanvasCache();t.translate(n.x,n.y);var r=this._getCachedSceneCanvas(),s=r.pixelRatio;t.drawImage(r._canvas,0,0,r.width/s,r.height/s),t.restore()}_drawCachedHitCanvas(t){var n=this._getCanvasCache(),r=n.hit;t.save(),t.translate(n.x,n.y),t.drawImage(r._canvas,0,0,r.width/r.pixelRatio,r.height/r.pixelRatio),t.restore()}_getCachedSceneCanvas(){var t=this.filters(),n=this._getCanvasCache(),r=n.scene,s=n.filter,a=s.getContext(),l,c,u,d;if(t){if(!this._filterUpToDate){var f=r.pixelRatio;s.setSize(r.width/r.pixelRatio,r.height/r.pixelRatio);try{for(l=t.length,a.clear(),a.drawImage(r._canvas,0,0,r.getWidth()/f,r.getHeight()/f),c=a.getImageData(0,0,s.getWidth(),s.getHeight()),u=0;u<l;u++){if(d=t[u],typeof d!="function"){je.Util.error("Filter should be type of function, but got "+typeof d+" instead. Please check correct filters");continue}d.call(this,c),a.putImageData(c,0,0)}}catch(p){je.Util.error("Unable to apply filter. "+p.message+" This post my help you https://konvajs.org/docs/posts/Tainted_Canvas.html.")}this._filterUpToDate=!0}return s}return r}on(t,n){if(this._cache&&this._cache.delete(Wc),arguments.length===3)return this._delegate.apply(this,arguments);var r=t.split(Kc),s=r.length,a,l,c,u,d;for(a=0;a<s;a++)l=r[a],c=l.split("."),u=c[0],d=c[1]||"",this.eventListeners[u]||(this.eventListeners[u]=[]),this.eventListeners[u].push({name:d,handler:n});return this}off(t,n){var r=(t||"").split(Kc),s=r.length,a,l,c,u,d,f;if(this._cache&&this._cache.delete(Wc),!t)for(l in this.eventListeners)this._off(l);for(a=0;a<s;a++)if(c=r[a],u=c.split("."),d=u[0],f=u[1],d)this.eventListeners[d]&&this._off(d,f,n);else for(l in this.eventListeners)this._off(l,f,n);return this}dispatchEvent(t){var n={target:this,type:t.type,evt:t};return this.fire(t.type,n),this}addEventListener(t,n){return this.on(t,function(r){n.call(this,r.evt)}),this}removeEventListener(t){return this.off(t),this}_delegate(t,n,r){var s=this;this.on(t,function(a){for(var l=a.target.findAncestors(n,!0,s),c=0;c<l.length;c++)a=je.Util.cloneObject(a),a.currentTarget=l[c],r.call(l[c],a)})}remove(){return this.isDragging()&&this.stopDrag(),Pn.DD._dragElements.delete(this._id),this._remove(),this}_clearCaches(){this._clearSelfAndDescendantCache(ni),this._clearSelfAndDescendantCache(Gc),this._clearSelfAndDescendantCache(Gw),this._clearSelfAndDescendantCache(Xw),this._clearSelfAndDescendantCache(yp),this._clearSelfAndDescendantCache(vp)}_remove(){this._clearCaches();var t=this.getParent();t&&t.children&&(t.children.splice(this.index,1),t._setChildrenIndices(),this.parent=null)}destroy(){return this.remove(),this.clearCache(),this}getAttr(t){var n="get"+je.Util._capitalize(t);return je.Util._isFunction(this[n])?this[n]():this.attrs[t]}getAncestors(){for(var t=this.getParent(),n=[];t;)n.push(t),t=t.getParent();return n}getAttrs(){return this.attrs||{}}setAttrs(t){return this._batchTransformChanges(()=>{var n,r;if(!t)return this;for(n in t)n!==oq&&(r=Yw+je.Util._capitalize(n),je.Util._isFunction(this[r])?this[r](t[n]):this._setAttr(n,t[n]))}),this}isListening(){return this._getCache(vp,this._isListening)}_isListening(t){if(!this.listening())return!1;const r=this.getParent();return r&&r!==t&&this!==t?r._isListening(t):!0}isVisible(){return this._getCache(yp,this._isVisible)}_isVisible(t){if(!this.visible())return!1;const r=this.getParent();return r&&r!==t&&this!==t?r._isVisible(t):!0}shouldDrawHit(t,n=!1){if(t)return this._isVisible(t)&&this._isListening(t);var r=this.getLayer(),s=!1;Pn.DD._dragElements.forEach(l=>{l.dragStatus==="dragging"&&(l.node.nodeType==="Stage"||l.node.getLayer()===r)&&(s=!0)});var a=!n&&!ki.Konva.hitOnDragEnabled&&(s||ki.Konva.isTransforming());return this.isListening()&&this.isVisible()&&!a}show(){return this.visible(!0),this}hide(){return this.visible(!1),this}getZIndex(){return this.index||0}getAbsoluteZIndex(){var t=this.getDepth(),n=this,r=0,s,a,l,c;function u(f){for(s=[],a=f.length,l=0;l<a;l++)c=f[l],r++,c.nodeType!==Jw&&(s=s.concat(c.getChildren().slice())),c._id===n._id&&(l=a);s.length>0&&s[0].getDepth()<=t&&u(s)}const d=this.getStage();return n.nodeType!==aq&&d&&u(d.getChildren()),r}getDepth(){for(var t=0,n=this.parent;n;)t++,n=n.parent;return t}_batchTransformChanges(t){this._batchingTransformChange=!0,t(),this._batchingTransformChange=!1,this._needClearTransformCache&&(this._clearCache(Ni),this._clearSelfAndDescendantCache(ni)),this._needClearTransformCache=!1}setPosition(t){return this._batchTransformChanges(()=>{this.x(t.x),this.y(t.y)}),this}getPosition(){return{x:this.x(),y:this.y()}}getRelativePointerPosition(){const t=this.getStage();if(!t)return null;var n=t.getPointerPosition();if(!n)return null;var r=this.getAbsoluteTransform().copy();return r.invert(),r.point(n)}getAbsolutePosition(t){let n=!1,r=this.parent;for(;r;){if(r.isCached()){n=!0;break}r=r.parent}n&&!t&&(t=!0);var s=this.getAbsoluteTransform(t).getMatrix(),a=new je.Transform,l=this.offset();return a.m=s.slice(),a.translate(l.x,l.y),a.getTranslation()}setAbsolutePosition(t){const l=this._clearTransform(),{x:n,y:r}=l,s=fi(l,["x","y"]);this.attrs.x=n,this.attrs.y=r,this._clearCache(Ni);var a=this._getAbsoluteTransform().copy();return a.invert(),a.translate(t.x,t.y),t={x:this.attrs.x+a.getTranslation().x,y:this.attrs.y+a.getTranslation().y},this._setTransform(s),this.setPosition({x:t.x,y:t.y}),this._clearCache(Ni),this._clearSelfAndDescendantCache(ni),this}_setTransform(t){var n;for(n in t)this.attrs[n]=t[n]}_clearTransform(){var t={x:this.x(),y:this.y(),rotation:this.rotation(),scaleX:this.scaleX(),scaleY:this.scaleY(),offsetX:this.offsetX(),offsetY:this.offsetY(),skewX:this.skewX(),skewY:this.skewY()};return this.attrs.x=0,this.attrs.y=0,this.attrs.rotation=0,this.attrs.scaleX=1,this.attrs.scaleY=1,this.attrs.offsetX=0,this.attrs.offsetY=0,this.attrs.skewX=0,this.attrs.skewY=0,t}move(t){var n=t.x,r=t.y,s=this.x(),a=this.y();return n!==void 0&&(s+=n),r!==void 0&&(a+=r),this.setPosition({x:s,y:a}),this}_eachAncestorReverse(t,n){var r=[],s=this.getParent(),a,l;if(!(n&&n._id===this._id)){for(r.unshift(this);s&&(!n||s._id!==n._id);)r.unshift(s),s=s.parent;for(a=r.length,l=0;l<a;l++)t(r[l])}}rotate(t){return this.rotation(this.rotation()+t),this}moveToTop(){if(!this.parent)return je.Util.warn("Node has no parent. moveToTop function is ignored."),!1;var t=this.index,n=this.parent.getChildren().length;return t<n-1?(this.parent.children.splice(t,1),this.parent.children.push(this),this.parent._setChildrenIndices(),!0):!1}moveUp(){if(!this.parent)return je.Util.warn("Node has no parent. moveUp function is ignored."),!1;var t=this.index,n=this.parent.getChildren().length;return t<n-1?(this.parent.children.splice(t,1),this.parent.children.splice(t+1,0,this),this.parent._setChildrenIndices(),!0):!1}moveDown(){if(!this.parent)return je.Util.warn("Node has no parent. moveDown function is ignored."),!1;var t=this.index;return t>0?(this.parent.children.splice(t,1),this.parent.children.splice(t-1,0,this),this.parent._setChildrenIndices(),!0):!1}moveToBottom(){if(!this.parent)return je.Util.warn("Node has no parent. moveToBottom function is ignored."),!1;var t=this.index;return t>0?(this.parent.children.splice(t,1),this.parent.children.unshift(this),this.parent._setChildrenIndices(),!0):!1}setZIndex(t){if(!this.parent)return je.Util.warn("Node has no parent. zIndex parameter is ignored."),this;(t<0||t>=this.parent.children.length)&&je.Util.warn("Unexpected value "+t+" for zIndex property. zIndex is just index of a node in children of its parent. Expected value is from 0 to "+(this.parent.children.length-1)+".");var n=this.index;return this.parent.children.splice(n,1),this.parent.children.splice(t,0,this),this.parent._setChildrenIndices(),this}getAbsoluteOpacity(){return this._getCache(Gc,this._getAbsoluteOpacity)}_getAbsoluteOpacity(){var t=this.opacity(),n=this.getParent();return n&&!n._isUnderCache&&(t*=n.getAbsoluteOpacity()),t}moveTo(t){return this.getParent()!==t&&(this._remove(),t.add(this)),this}toObject(){var t=this.getAttrs(),n,r,s,a,l;const c={attrs:{},className:this.getClassName()};for(n in t)r=t[n],l=je.Util.isObject(r)&&!je.Util._isPlainObject(r)&&!je.Util._isArray(r),!l&&(s=typeof this[n]=="function"&&this[n],delete t[n],a=s?s.call(this):null,t[n]=r,a!==r&&(c.attrs[n]=r));return je.Util._prepareToStringify(c)}toJSON(){return JSON.stringify(this.toObject())}getParent(){return this.parent}findAncestors(t,n,r){var s=[];n&&this._isMatch(t)&&s.push(this);for(var a=this.parent;a;){if(a===r)return s;a._isMatch(t)&&s.push(a),a=a.parent}return s}isAncestorOf(t){return!1}findAncestor(t,n,r){return this.findAncestors(t,n,r)[0]}_isMatch(t){if(!t)return!1;if(typeof t=="function")return t(this);var n=t.replace(/ /g,"").split(","),r=n.length,s,a;for(s=0;s<r;s++)if(a=n[s],je.Util.isValidSelector(a)||(je.Util.warn('Selector "'+a+'" is invalid. Allowed selectors examples are "#foo", ".bar" or "Group".'),je.Util.warn('If you have a custom shape with such className, please change it to start with upper letter like "Triangle".'),je.Util.warn("Konva is awesome, right?")),a.charAt(0)==="#"){if(this.id()===a.slice(1))return!0}else if(a.charAt(0)==="."){if(this.hasName(a.slice(1)))return!0}else if(this.className===a||this.nodeType===a)return!0;return!1}getLayer(){var t=this.getParent();return t?t.getLayer():null}getStage(){return this._getCache(Xw,this._getStage)}_getStage(){var t=this.getParent();return t?t.getStage():null}fire(t,n={},r){return n.target=n.target||this,r?this._fireAndBubble(t,n):this._fire(t,n),this}getAbsoluteTransform(t){return t?this._getAbsoluteTransform(t):this._getCache(ni,this._getAbsoluteTransform)}_getAbsoluteTransform(t){var n;if(t)return n=new je.Transform,this._eachAncestorReverse(function(s){var a=s.transformsEnabled();a==="all"?n.multiply(s.getTransform()):a==="position"&&n.translate(s.x()-s.offsetX(),s.y()-s.offsetY())},t),n;n=this._cache.get(ni)||new je.Transform,this.parent?this.parent.getAbsoluteTransform().copyInto(n):n.reset();var r=this.transformsEnabled();if(r==="all")n.multiply(this.getTransform());else if(r==="position"){const s=this.attrs.x||0,a=this.attrs.y||0,l=this.attrs.offsetX||0,c=this.attrs.offsetY||0;n.translate(s-l,a-c)}return n.dirty=!1,n}getAbsoluteScale(t){for(var n=this;n;)n._isUnderCache&&(t=n),n=n.getParent();const s=this.getAbsoluteTransform(t).decompose();return{x:s.scaleX,y:s.scaleY}}getAbsoluteRotation(){return this.getAbsoluteTransform().decompose().rotation}getTransform(){return this._getCache(Ni,this._getTransform)}_getTransform(){var t,n,r=this._cache.get(Ni)||new je.Transform;r.reset();var s=this.x(),a=this.y(),l=ki.Konva.getAngle(this.rotation()),c=(t=this.attrs.scaleX)!==null&&t!==void 0?t:1,u=(n=this.attrs.scaleY)!==null&&n!==void 0?n:1,d=this.attrs.skewX||0,f=this.attrs.skewY||0,p=this.attrs.offsetX||0,g=this.attrs.offsetY||0;return(s!==0||a!==0)&&r.translate(s,a),l!==0&&r.rotate(l),(d!==0||f!==0)&&r.skew(d,f),(c!==1||u!==1)&&r.scale(c,u),(p!==0||g!==0)&&r.translate(-1*p,-1*g),r.dirty=!1,r}clone(t){var n=je.Util.cloneObject(this.attrs),r,s,a,l,c;for(r in t)n[r]=t[r];var u=new this.constructor(n);for(r in this.eventListeners)for(s=this.eventListeners[r],a=s.length,l=0;l<a;l++)c=s[l],c.name.indexOf(sq)<0&&(u.eventListeners[r]||(u.eventListeners[r]=[]),u.eventListeners[r].push(c));return u}_toKonvaCanvas(t){t=t||{};var n=this.getClientRect(),r=this.getStage(),s=t.x!==void 0?t.x:Math.floor(n.x),a=t.y!==void 0?t.y:Math.floor(n.y),l=t.pixelRatio||1,c=new Ba.SceneCanvas({width:t.width||Math.ceil(n.width)||(r?r.width():0),height:t.height||Math.ceil(n.height)||(r?r.height():0),pixelRatio:l}),u=c.getContext();const d=new Ba.SceneCanvas({width:c.width/c.pixelRatio+Math.abs(s),height:c.height/c.pixelRatio+Math.abs(a),pixelRatio:c.pixelRatio});return t.imageSmoothingEnabled===!1&&(u._context.imageSmoothingEnabled=!1),u.save(),(s||a)&&u.translate(-1*s,-1*a),this.drawScene(c,void 0,d),u.restore(),c}toCanvas(t){return this._toKonvaCanvas(t)._canvas}toDataURL(t){t=t||{};var n=t.mimeType||null,r=t.quality||null,s=this._toKonvaCanvas(t).toDataURL(n,r);return t.callback&&t.callback(s),s}toImage(t){return new Promise((n,r)=>{try{const s=t==null?void 0:t.callback;s&&delete t.callback,je.Util._urlToImage(this.toDataURL(t),function(a){n(a),s==null||s(a)})}catch(s){r(s)}})}toBlob(t){return new Promise((n,r)=>{try{const s=t==null?void 0:t.callback;s&&delete t.callback,this.toCanvas(t).toBlob(a=>{n(a),s==null||s(a)},t==null?void 0:t.mimeType,t==null?void 0:t.quality)}catch(s){r(s)}})}setSize(t){return this.width(t.width),this.height(t.height),this}getSize(){return{width:this.width(),height:this.height()}}getClassName(){return this.className||this.nodeType}getType(){return this.nodeType}getDragDistance(){return this.attrs.dragDistance!==void 0?this.attrs.dragDistance:this.parent?this.parent.getDragDistance():ki.Konva.dragDistance}_off(t,n,r){var s=this.eventListeners[t],a,l,c;for(a=0;a<s.length;a++)if(l=s[a].name,c=s[a].handler,(l!=="konva"||n==="konva")&&(!n||l===n)&&(!r||r===c)){if(s.splice(a,1),s.length===0){delete this.eventListeners[t];break}a--}}_fireChangeEvent(t,n,r){this._fire(t+iq,{oldVal:n,newVal:r})}addName(t){if(!this.hasName(t)){var n=this.name(),r=n?n+" "+t:t;this.name(r)}return this}hasName(t){if(!t)return!1;const n=this.name();if(!n)return!1;var r=(n||"").split(/\s/g);return r.indexOf(t)!==-1}removeName(t){var n=(this.name()||"").split(/\s/g),r=n.indexOf(t);return r!==-1&&(n.splice(r,1),this.name(n.join(" "))),this}setAttr(t,n){var r=this[Yw+je.Util._capitalize(t)];return je.Util._isFunction(r)?r.call(this,n):this._setAttr(t,n),this}_requestDraw(){if(ki.Konva.autoDrawEnabled){const t=this.getLayer()||this.getStage();t==null||t.batchDraw()}}_setAttr(t,n){var r=this.attrs[t];r===n&&!je.Util.isObject(n)||(n==null?delete this.attrs[t]:this.attrs[t]=n,this._shouldFireChangeEvents&&this._fireChangeEvent(t,r,n),this._requestDraw())}_setComponentAttr(t,n,r){var s;r!==void 0&&(s=this.attrs[t],s||(this.attrs[t]=this.getAttr(t)),this.attrs[t][n]=r,this._fireChangeEvent(t,s,r))}_fireAndBubble(t,n,r){n&&this.nodeType===Jw&&(n.target=this);var s=(t===Ww||t===Kw)&&(r&&(this===r||this.isAncestorOf&&this.isAncestorOf(r))||this.nodeType==="Stage"&&!r);if(!s){this._fire(t,n);var a=(t===Ww||t===Kw)&&r&&r.isAncestorOf&&r.isAncestorOf(this)&&!r.isAncestorOf(this.parent);(n&&!n.cancelBubble||!n)&&this.parent&&this.parent.isListening()&&!a&&(r&&r.parent?this._fireAndBubble.call(this.parent,t,n,r):this._fireAndBubble.call(this.parent,t,n))}}_getProtoListeners(t){var n,r,s;const a=(n=this._cache.get(Wc))!==null&&n!==void 0?n:{};let l=a==null?void 0:a[t];if(l===void 0){l=[];let c=Object.getPrototypeOf(this);for(;c;){const u=(s=(r=c.eventListeners)===null||r===void 0?void 0:r[t])!==null&&s!==void 0?s:[];l.push(...u),c=Object.getPrototypeOf(c)}a[t]=l,this._cache.set(Wc,a)}return l}_fire(t,n){n=n||{},n.currentTarget=this,n.type=t;const r=this._getProtoListeners(t);if(r)for(var s=0;s<r.length;s++)r[s].handler.call(this,n);const a=this.eventListeners[t];if(a)for(var s=0;s<a.length;s++)a[s].handler.call(this,n)}draw(){return this.drawScene(),this.drawHit(),this}_createDragElement(t){var n=t?t.pointerId:void 0,r=this.getStage(),s=this.getAbsolutePosition();if(r){var a=r._getPointerById(n)||r._changedPointerPositions[0]||s;Pn.DD._dragElements.set(this._id,{node:this,startPointerPos:a,offset:{x:a.x-s.x,y:a.y-s.y},dragStatus:"ready",pointerId:n})}}startDrag(t,n=!0){Pn.DD._dragElements.has(this._id)||this._createDragElement(t);const r=Pn.DD._dragElements.get(this._id);r.dragStatus="dragging",this.fire("dragstart",{type:"dragstart",target:this,evt:t&&t.evt},n)}_setDragPosition(t,n){const r=this.getStage()._getPointerById(n.pointerId);if(r){var s={x:r.x-n.offset.x,y:r.y-n.offset.y},a=this.dragBoundFunc();if(a!==void 0){const l=a.call(this,s,t);l?s=l:je.Util.warn("dragBoundFunc did not return any value. That is unexpected behavior. You must return new absolute position from dragBoundFunc.")}(!this._lastPos||this._lastPos.x!==s.x||this._lastPos.y!==s.y)&&(this.setAbsolutePosition(s),this._requestDraw()),this._lastPos=s}}stopDrag(t){const n=Pn.DD._dragElements.get(this._id);n&&(n.dragStatus="stopped"),Pn.DD._endDragBefore(t),Pn.DD._endDragAfter(t)}setDraggable(t){this._setAttr("draggable",t),this._dragChange()}isDragging(){const t=Pn.DD._dragElements.get(this._id);return t?t.dragStatus==="dragging":!1}_listenDrag(){this._dragCleanup(),this.on("mousedown.konva touchstart.konva",function(t){var n=t.evt.button!==void 0,r=!n||ki.Konva.dragButtons.indexOf(t.evt.button)>=0;if(r&&!this.isDragging()){var s=!1;Pn.DD._dragElements.forEach(a=>{this.isAncestorOf(a.node)&&(s=!0)}),s||this._createDragElement(t)}})}_dragChange(){if(this.attrs.draggable)this._listenDrag();else{this._dragCleanup();var t=this.getStage();if(!t)return;const n=Pn.DD._dragElements.get(this._id),r=n&&n.dragStatus==="dragging",s=n&&n.dragStatus==="ready";r?this.stopDrag():s&&Pn.DD._dragElements.delete(this._id)}}_dragCleanup(){this.off("mousedown.konva"),this.off("touchstart.konva")}isClientRectOnScreen(t={x:0,y:0}){const n=this.getStage();if(!n)return!1;const r={x:-t.x,y:-t.y,width:n.width()+2*t.x,height:n.height()+2*t.y};return je.Util.haveIntersection(r,this.getClientRect())}static create(t,n){return je.Util._isString(t)&&(t=JSON.parse(t)),this._createNode(t,n)}static _createNode(t,n){var r=Ie.prototype.getClassName.call(t),s=t.children,a,l,c;n&&(t.attrs.container=n),ki.Konva[r]||(je.Util.warn('Can not find a node with class name "'+r+'". Fallback to "Shape".'),r="Shape");const u=ki.Konva[r];if(a=new u(t.attrs),s)for(l=s.length,c=0;c<l;c++)a.add(Ie._createNode(s[c]));return a}}xi.Node=Ie,Ie.prototype.nodeType="Node",Ie.prototype._attrsAffectingSize=[],Ie.prototype.eventListeners={},Ie.prototype.on.call(Ie.prototype,lq,function(){if(this._batchingTransformChange){this._needClearTransformCache=!0;return}this._clearCache(Ni),this._clearSelfAndDescendantCache(ni)}),Ie.prototype.on.call(Ie.prototype,"visibleChange.konva",function(){this._clearSelfAndDescendantCache(yp)}),Ie.prototype.on.call(Ie.prototype,"listeningChange.konva",function(){this._clearSelfAndDescendantCache(vp)}),Ie.prototype.on.call(Ie.prototype,"opacityChange.konva",function(){this._clearSelfAndDescendantCache(Gc)});const et=Ia.Factory.addGetterSetter;et(Ie,"zIndex"),et(Ie,"absolutePosition"),et(Ie,"position"),et(Ie,"x",0,(0,Ct.getNumberValidator)()),et(Ie,"y",0,(0,Ct.getNumberValidator)()),et(Ie,"globalCompositeOperation","source-over",(0,Ct.getStringValidator)()),et(Ie,"opacity",1,(0,Ct.getNumberValidator)()),et(Ie,"name","",(0,Ct.getStringValidator)()),et(Ie,"id","",(0,Ct.getStringValidator)()),et(Ie,"rotation",0,(0,Ct.getNumberValidator)()),Ia.Factory.addComponentsGetterSetter(Ie,"scale",["x","y"]),et(Ie,"scaleX",1,(0,Ct.getNumberValidator)()),et(Ie,"scaleY",1,(0,Ct.getNumberValidator)()),Ia.Factory.addComponentsGetterSetter(Ie,"skew",["x","y"]),et(Ie,"skewX",0,(0,Ct.getNumberValidator)()),et(Ie,"skewY",0,(0,Ct.getNumberValidator)()),Ia.Factory.addComponentsGetterSetter(Ie,"offset",["x","y"]),et(Ie,"offsetX",0,(0,Ct.getNumberValidator)()),et(Ie,"offsetY",0,(0,Ct.getNumberValidator)()),et(Ie,"dragDistance",null,(0,Ct.getNumberValidator)()),et(Ie,"width",0,(0,Ct.getNumberValidator)()),et(Ie,"height",0,(0,Ct.getNumberValidator)()),et(Ie,"listening",!0,(0,Ct.getBooleanValidator)()),et(Ie,"preventDefault",!0,(0,Ct.getBooleanValidator)()),et(Ie,"filters",null,function(e){return this._filterUpToDate=!1,e}),et(Ie,"visible",!0,(0,Ct.getBooleanValidator)()),et(Ie,"transformsEnabled","all",(0,Ct.getStringValidator)()),et(Ie,"size"),et(Ie,"dragBoundFunc"),et(Ie,"draggable",!1,(0,Ct.getBooleanValidator)()),Ia.Factory.backCompat(Ie,{rotateDeg:"rotate",setRotationDeg:"setRotation",getRotationDeg:"getRotation"});var uo={};Object.defineProperty(uo,"__esModule",{value:!0}),uo.Container=void 0;const rs=cn,bp=xi,Yc=qe;class fo extends bp.Node{constructor(){super(...arguments),this.children=[]}getChildren(t){if(!t)return this.children||[];const n=this.children||[];var r=[];return n.forEach(function(s){t(s)&&r.push(s)}),r}hasChildren(){return this.getChildren().length>0}removeChildren(){return this.getChildren().forEach(t=>{t.parent=null,t.index=0,t.remove()}),this.children=[],this._requestDraw(),this}destroyChildren(){return this.getChildren().forEach(t=>{t.parent=null,t.index=0,t.destroy()}),this.children=[],this._requestDraw(),this}add(...t){if(t.length===0)return this;if(t.length>1){for(var n=0;n<t.length;n++)this.add(t[n]);return this}const r=t[0];return r.getParent()?(r.moveTo(this),this):(this._validateAdd(r),r.index=this.getChildren().length,r.parent=this,r._clearCaches(),this.getChildren().push(r),this._fire("add",{child:r}),this._requestDraw(),this)}destroy(){return this.hasChildren()&&this.destroyChildren(),super.destroy(),this}find(t){return this._generalFind(t,!1)}findOne(t){var n=this._generalFind(t,!0);return n.length>0?n[0]:void 0}_generalFind(t,n){var r=[];return this._descendants(s=>{const a=s._isMatch(t);return a&&r.push(s),!!(a&&n)}),r}_descendants(t){let n=!1;const r=this.getChildren();for(const s of r){if(n=t(s),n)return!0;if(s.hasChildren()&&(n=s._descendants(t),n))return!0}return!1}toObject(){var t=bp.Node.prototype.toObject.call(this);return t.children=[],this.getChildren().forEach(n=>{t.children.push(n.toObject())}),t}isAncestorOf(t){for(var n=t.getParent();n;){if(n._id===this._id)return!0;n=n.getParent()}return!1}clone(t){var n=bp.Node.prototype.clone.call(this,t);return this.getChildren().forEach(function(r){n.add(r.clone())}),n}getAllIntersections(t){var n=[];return this.find("Shape").forEach(r=>{r.isVisible()&&r.intersects(t)&&n.push(r)}),n}_clearSelfAndDescendantCache(t){var n;super._clearSelfAndDescendantCache(t),!this.isCached()&&((n=this.children)===null||n===void 0||n.forEach(function(r){r._clearSelfAndDescendantCache(t)}))}_setChildrenIndices(){var t;(t=this.children)===null||t===void 0||t.forEach(function(n,r){n.index=r}),this._requestDraw()}drawScene(t,n,r){var s=this.getLayer(),a=t||s&&s.getCanvas(),l=a&&a.getContext(),c=this._getCanvasCache(),u=c&&c.scene,d=a&&a.isCache;if(!this.isVisible()&&!d)return this;if(u){l.save();var f=this.getAbsoluteTransform(n).getMatrix();l.transform(f[0],f[1],f[2],f[3],f[4],f[5]),this._drawCachedSceneCanvas(l),l.restore()}else this._drawChildren("drawScene",a,n,r);return this}drawHit(t,n){if(!this.shouldDrawHit(n))return this;var r=this.getLayer(),s=t||r&&r.hitCanvas,a=s&&s.getContext(),l=this._getCanvasCache(),c=l&&l.hit;if(c){a.save();var u=this.getAbsoluteTransform(n).getMatrix();a.transform(u[0],u[1],u[2],u[3],u[4],u[5]),this._drawCachedHitCanvas(a),a.restore()}else this._drawChildren("drawHit",s,n);return this}_drawChildren(t,n,r,s){var a,l=n&&n.getContext(),c=this.clipWidth(),u=this.clipHeight(),d=this.clipFunc(),f=typeof c=="number"&&typeof u=="number"||d;const p=r===this;if(f){l.save();var g=this.getAbsoluteTransform(r),v=g.getMatrix();l.transform(v[0],v[1],v[2],v[3],v[4],v[5]),l.beginPath();let C;if(d)C=d.call(this,l,this);else{var b=this.clipX(),w=this.clipY();l.rect(b||0,w||0,c,u)}l.clip.apply(l,C),v=g.copy().invert().getMatrix(),l.transform(v[0],v[1],v[2],v[3],v[4],v[5])}var _=!p&&this.globalCompositeOperation()!=="source-over"&&t==="drawScene";_&&(l.save(),l._applyGlobalCompositeOperation(this)),(a=this.children)===null||a===void 0||a.forEach(function(C){C[t](n,r,s)}),_&&l.restore(),f&&l.restore()}getClientRect(t={}){var n,r=t.skipTransform,s=t.relativeTo,a,l,c,u,d={x:1/0,y:1/0,width:0,height:0},f=this;(n=this.children)===null||n===void 0||n.forEach(function(w){if(w.visible()){var _=w.getClientRect({relativeTo:f,skipShadow:t.skipShadow,skipStroke:t.skipStroke});_.width===0&&_.height===0||(a===void 0?(a=_.x,l=_.y,c=_.x+_.width,u=_.y+_.height):(a=Math.min(a,_.x),l=Math.min(l,_.y),c=Math.max(c,_.x+_.width),u=Math.max(u,_.y+_.height)))}});for(var p=this.find("Shape"),g=!1,v=0;v<p.length;v++){var b=p[v];if(b._isVisible(this)){g=!0;break}}return g&&a!==void 0?d={x:a,y:l,width:c-a,height:u-l}:d={x:0,y:0,width:0,height:0},r?d:this._transformedRect(d,s)}}uo.Container=fo,rs.Factory.addComponentsGetterSetter(fo,"clip",["x","y","width","height"]),rs.Factory.addGetterSetter(fo,"clipX",void 0,(0,Yc.getNumberValidator)()),rs.Factory.addGetterSetter(fo,"clipY",void 0,(0,Yc.getNumberValidator)()),rs.Factory.addGetterSetter(fo,"clipWidth",void 0,(0,Yc.getNumberValidator)()),rs.Factory.addGetterSetter(fo,"clipHeight",void 0,(0,Yc.getNumberValidator)()),rs.Factory.addGetterSetter(fo,"clipFunc");var Qw={},yn={};Object.defineProperty(yn,"__esModule",{value:!0}),yn.releaseCapture=yn.setPointerCapture=yn.hasPointerCapture=yn.createEvent=yn.getCapturedShape=void 0;const dq=st,La=new Map,Zw=dq.Konva._global.PointerEvent!==void 0;function uq(e){return La.get(e)}yn.getCapturedShape=uq;function wp(e){return{evt:e,pointerId:e.pointerId}}yn.createEvent=wp;function fq(e,t){return La.get(e)===t}yn.hasPointerCapture=fq;function hq(e,t){Vw(e),t.getStage()&&(La.set(e,t),Zw&&t._fire("gotpointercapture",wp(new PointerEvent("gotpointercapture"))))}yn.setPointerCapture=hq;function Vw(e,t){const n=La.get(e);if(!n)return;const r=n.getStage();r&&r.content,La.delete(e),Zw&&n._fire("lostpointercapture",wp(new PointerEvent("lostpointercapture")))}yn.releaseCapture=Vw,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Stage=e.stages=void 0;const t=Pt,n=cn,r=uo,s=st,a=ir,l=Hc,c=st,u=yn;var d="Stage",f="string",p="px",g="mouseout",v="mouseleave",b="mouseover",w="mouseenter",_="mousemove",C="mousedown",k="mouseup",S="pointermove",E="pointerdown",N="pointerup",A="pointercancel",I="lostpointercapture",O="pointerout",F="pointerleave",P="pointerover",M="pointerenter",W="contextmenu",U="touchstart",Q="touchend",q="touchmove",D="touchcancel",j="wheel",K=5,H=[[w,"_pointerenter"],[C,"_pointerdown"],[_,"_pointermove"],[k,"_pointerup"],[v,"_pointerleave"],[U,"_pointerdown"],[q,"_pointermove"],[Q,"_pointerup"],[D,"_pointercancel"],[b,"_pointerover"],[j,"_wheel"],[W,"_contextmenu"],[E,"_pointerdown"],[S,"_pointermove"],[N,"_pointerup"],[A,"_pointercancel"],[I,"_lostpointercapture"]];const R={mouse:{[O]:g,[F]:v,[P]:b,[M]:w,[S]:_,[E]:C,[N]:k,[A]:"mousecancel",pointerclick:"click",pointerdblclick:"dblclick"},touch:{[O]:"touchout",[F]:"touchleave",[P]:"touchover",[M]:"touchenter",[S]:q,[E]:U,[N]:Q,[A]:D,pointerclick:"tap",pointerdblclick:"dbltap"},pointer:{[O]:O,[F]:F,[P]:P,[M]:M,[S]:S,[E]:E,[N]:N,[A]:A,pointerclick:"pointerclick",pointerdblclick:"pointerdblclick"}},ie=re=>re.indexOf("pointer")>=0?"pointer":re.indexOf("touch")>=0?"touch":"mouse",ee=re=>{const z=ie(re);if(z==="pointer")return s.Konva.pointerEventsEnabled&&R.pointer;if(z==="touch")return R.touch;if(z==="mouse")return R.mouse};function Y(re={}){return(re.clipFunc||re.clipWidth||re.clipHeight)&&t.Util.warn("Stage does not support clipping. Please use clip for Layers or Groups."),re}const J="Pointer position is missing and not registered by the stage. Looks like it is outside of the stage container. You can set it manually from event: stage.setPointersPositions(event);";e.stages=[];class oe extends r.Container{constructor(z){super(Y(z)),this._pointerPositions=[],this._changedPointerPositions=[],this._buildDOM(),this._bindContentEvents(),e.stages.push(this),this.on("widthChange.konva heightChange.konva",this._resizeDOM),this.on("visibleChange.konva",this._checkVisibility),this.on("clipWidthChange.konva clipHeightChange.konva clipFuncChange.konva",()=>{Y(this.attrs)}),this._checkVisibility()}_validateAdd(z){const G=z.getType()==="Layer",te=z.getType()==="FastLayer";G||te||t.Util.throw("You may only add layers to the stage.")}_checkVisibility(){if(!this.content)return;const z=this.visible()?"":"none";this.content.style.display=z}setContainer(z){if(typeof z===f){if(z.charAt(0)==="."){var G=z.slice(1);z=document.getElementsByClassName(G)[0]}else{var te;z.charAt(0)!=="#"?te=z:te=z.slice(1),z=document.getElementById(te)}if(!z)throw"Can not find container in document with id "+te}return this._setAttr("container",z),this.content&&(this.content.parentElement&&this.content.parentElement.removeChild(this.content),z.appendChild(this.content)),this}shouldDrawHit(){return!0}clear(){var z=this.children,G=z.length,te;for(te=0;te<G;te++)z[te].clear();return this}clone(z){return z||(z={}),z.container=typeof document!="undefined"&&document.createElement("div"),r.Container.prototype.clone.call(this,z)}destroy(){super.destroy();var z=this.content;z&&t.Util._isInDocument(z)&&this.container().removeChild(z);var G=e.stages.indexOf(this);return G>-1&&e.stages.splice(G,1),t.Util.releaseCanvas(this.bufferCanvas._canvas,this.bufferHitCanvas._canvas),this}getPointerPosition(){const z=this._pointerPositions[0]||this._changedPointerPositions[0];return z?{x:z.x,y:z.y}:(t.Util.warn(J),null)}_getPointerById(z){return this._pointerPositions.find(G=>G.id===z)}getPointersPositions(){return this._pointerPositions}getStage(){return this}getContent(){return this.content}_toKonvaCanvas(z){z=z||{},z.x=z.x||0,z.y=z.y||0,z.width=z.width||this.width(),z.height=z.height||this.height();var G=new a.SceneCanvas({width:z.width,height:z.height,pixelRatio:z.pixelRatio||1}),te=G.getContext()._context,le=this.children;return(z.x||z.y)&&te.translate(-1*z.x,-1*z.y),le.forEach(function(de){if(de.isVisible()){var ye=de._toKonvaCanvas(z);te.drawImage(ye._canvas,z.x,z.y,ye.getWidth()/ye.getPixelRatio(),ye.getHeight()/ye.getPixelRatio())}}),G}getIntersection(z){if(!z)return null;var G=this.children,te=G.length,le=te-1,de;for(de=le;de>=0;de--){const ye=G[de].getIntersection(z);if(ye)return ye}return null}_resizeDOM(){var z=this.width(),G=this.height();this.content&&(this.content.style.width=z+p,this.content.style.height=G+p),this.bufferCanvas.setSize(z,G),this.bufferHitCanvas.setSize(z,G),this.children.forEach(te=>{te.setSize({width:z,height:G}),te.draw()})}add(z,...G){if(arguments.length>1){for(var te=0;te<arguments.length;te++)this.add(arguments[te]);return this}super.add(z);var le=this.children.length;return le>K&&t.Util.warn("The stage has "+le+" layers. Recommended maximum number of layers is 3-5. Adding more layers into the stage may drop the performance. Rethink your tree structure, you can use Konva.Group."),z.setSize({width:this.width(),height:this.height()}),z.draw(),s.Konva.isBrowser&&this.content.appendChild(z.canvas._canvas),this}getParent(){return null}getLayer(){return null}hasPointerCapture(z){return u.hasPointerCapture(z,this)}setPointerCapture(z){u.setPointerCapture(z,this)}releaseCapture(z){u.releaseCapture(z,this)}getLayers(){return this.children}_bindContentEvents(){s.Konva.isBrowser&&H.forEach(([z,G])=>{this.content.addEventListener(z,te=>{this[G](te)},{passive:!1})})}_pointerenter(z){this.setPointersPositions(z);const G=ee(z.type);G&&this._fire(G.pointerenter,{evt:z,target:this,currentTarget:this})}_pointerover(z){this.setPointersPositions(z);const G=ee(z.type);G&&this._fire(G.pointerover,{evt:z,target:this,currentTarget:this})}_getTargetShape(z){let G=this[z+"targetShape"];return G&&!G.getStage()&&(G=null),G}_pointerleave(z){const G=ee(z.type),te=ie(z.type);if(G){this.setPointersPositions(z);var le=this._getTargetShape(te),de=!(s.Konva.isDragging()||s.Konva.isTransforming())||s.Konva.hitOnDragEnabled;le&&de?(le._fireAndBubble(G.pointerout,{evt:z}),le._fireAndBubble(G.pointerleave,{evt:z}),this._fire(G.pointerleave,{evt:z,target:this,currentTarget:this}),this[te+"targetShape"]=null):de&&(this._fire(G.pointerleave,{evt:z,target:this,currentTarget:this}),this._fire(G.pointerout,{evt:z,target:this,currentTarget:this})),this.pointerPos=null,this._pointerPositions=[]}}_pointerdown(z){const G=ee(z.type),te=ie(z.type);if(G){this.setPointersPositions(z);var le=!1;this._changedPointerPositions.forEach(de=>{var ye=this.getIntersection(de);if(l.DD.justDragged=!1,s.Konva["_"+te+"ListenClick"]=!0,!ye||!ye.isListening()){this[te+"ClickStartShape"]=void 0;return}s.Konva.capturePointerEventsEnabled&&ye.setPointerCapture(de.id),this[te+"ClickStartShape"]=ye,ye._fireAndBubble(G.pointerdown,{evt:z,pointerId:de.id}),le=!0;const be=z.type.indexOf("touch")>=0;ye.preventDefault()&&z.cancelable&&be&&z.preventDefault()}),le||this._fire(G.pointerdown,{evt:z,target:this,currentTarget:this,pointerId:this._pointerPositions[0].id})}}_pointermove(z){const G=ee(z.type),te=ie(z.type);if(!G)return;s.Konva.isDragging()&&l.DD.node.preventDefault()&&z.cancelable&&z.preventDefault(),this.setPointersPositions(z);var le=!(s.Konva.isDragging()||s.Konva.isTransforming())||s.Konva.hitOnDragEnabled;if(!le)return;var de={};let ye=!1;var be=this._getTargetShape(te);this._changedPointerPositions.forEach(Se=>{const Be=u.getCapturedShape(Se.id)||this.getIntersection(Se),tt=Se.id,Ee={evt:z,pointerId:tt};var Te=be!==Be;if(Te&&be&&(be._fireAndBubble(G.pointerout,ne({},Ee),Be),be._fireAndBubble(G.pointerleave,ne({},Ee),Be)),Be){if(de[Be._id])return;de[Be._id]=!0}Be&&Be.isListening()?(ye=!0,Te&&(Be._fireAndBubble(G.pointerover,ne({},Ee),be),Be._fireAndBubble(G.pointerenter,ne({},Ee),be),this[te+"targetShape"]=Be),Be._fireAndBubble(G.pointermove,ne({},Ee))):be&&(this._fire(G.pointerover,{evt:z,target:this,currentTarget:this,pointerId:tt}),this[te+"targetShape"]=null)}),ye||this._fire(G.pointermove,{evt:z,target:this,currentTarget:this,pointerId:this._changedPointerPositions[0].id})}_pointerup(z){const G=ee(z.type),te=ie(z.type);if(!G)return;this.setPointersPositions(z);const le=this[te+"ClickStartShape"],de=this[te+"ClickEndShape"];var ye={};let be=!1;this._changedPointerPositions.forEach(Se=>{const Be=u.getCapturedShape(Se.id)||this.getIntersection(Se);if(Be){if(Be.releaseCapture(Se.id),ye[Be._id])return;ye[Be._id]=!0}const tt=Se.id,Ee={evt:z,pointerId:tt};let Te=!1;s.Konva["_"+te+"InDblClickWindow"]?(Te=!0,clearTimeout(this[te+"DblTimeout"])):l.DD.justDragged||(s.Konva["_"+te+"InDblClickWindow"]=!0,clearTimeout(this[te+"DblTimeout"])),this[te+"DblTimeout"]=setTimeout(function(){s.Konva["_"+te+"InDblClickWindow"]=!1},s.Konva.dblClickWindow),Be&&Be.isListening()?(be=!0,this[te+"ClickEndShape"]=Be,Be._fireAndBubble(G.pointerup,ne({},Ee)),s.Konva["_"+te+"ListenClick"]&&le&&le===Be&&(Be._fireAndBubble(G.pointerclick,ne({},Ee)),Te&&de&&de===Be&&Be._fireAndBubble(G.pointerdblclick,ne({},Ee)))):(this[te+"ClickEndShape"]=null,s.Konva["_"+te+"ListenClick"]&&this._fire(G.pointerclick,{evt:z,target:this,currentTarget:this,pointerId:tt}),Te&&this._fire(G.pointerdblclick,{evt:z,target:this,currentTarget:this,pointerId:tt}))}),be||this._fire(G.pointerup,{evt:z,target:this,currentTarget:this,pointerId:this._changedPointerPositions[0].id}),s.Konva["_"+te+"ListenClick"]=!1,z.cancelable&&te!=="touch"&&z.preventDefault()}_contextmenu(z){this.setPointersPositions(z);var G=this.getIntersection(this.getPointerPosition());G&&G.isListening()?G._fireAndBubble(W,{evt:z}):this._fire(W,{evt:z,target:this,currentTarget:this})}_wheel(z){this.setPointersPositions(z);var G=this.getIntersection(this.getPointerPosition());G&&G.isListening()?G._fireAndBubble(j,{evt:z}):this._fire(j,{evt:z,target:this,currentTarget:this})}_pointercancel(z){this.setPointersPositions(z);const G=u.getCapturedShape(z.pointerId)||this.getIntersection(this.getPointerPosition());G&&G._fireAndBubble(N,u.createEvent(z)),u.releaseCapture(z.pointerId)}_lostpointercapture(z){u.releaseCapture(z.pointerId)}setPointersPositions(z){var G=this._getContentPosition(),te=null,le=null;z=z||window.event,z.touches!==void 0?(this._pointerPositions=[],this._changedPointerPositions=[],Array.prototype.forEach.call(z.touches,de=>{this._pointerPositions.push({id:de.identifier,x:(de.clientX-G.left)/G.scaleX,y:(de.clientY-G.top)/G.scaleY})}),Array.prototype.forEach.call(z.changedTouches||z.touches,de=>{this._changedPointerPositions.push({id:de.identifier,x:(de.clientX-G.left)/G.scaleX,y:(de.clientY-G.top)/G.scaleY})})):(te=(z.clientX-G.left)/G.scaleX,le=(z.clientY-G.top)/G.scaleY,this.pointerPos={x:te,y:le},this._pointerPositions=[{x:te,y:le,id:t.Util._getFirstPointerId(z)}],this._changedPointerPositions=[{x:te,y:le,id:t.Util._getFirstPointerId(z)}])}_setPointerPosition(z){t.Util.warn('Method _setPointerPosition is deprecated. Use "stage.setPointersPositions(event)" instead.'),this.setPointersPositions(z)}_getContentPosition(){if(!this.content||!this.content.getBoundingClientRect)return{top:0,left:0,scaleX:1,scaleY:1};var z=this.content.getBoundingClientRect();return{top:z.top,left:z.left,scaleX:z.width/this.content.clientWidth||1,scaleY:z.height/this.content.clientHeight||1}}_buildDOM(){if(this.bufferCanvas=new a.SceneCanvas({width:this.width(),height:this.height()}),this.bufferHitCanvas=new a.HitCanvas({pixelRatio:1,width:this.width(),height:this.height()}),!!s.Konva.isBrowser){var z=this.container();if(!z)throw"Stage has no container. A container is required.";z.innerHTML="",this.content=document.createElement("div"),this.content.style.position="relative",this.content.style.userSelect="none",this.content.className="konvajs-content",this.content.setAttribute("role","presentation"),z.appendChild(this.content),this._resizeDOM()}}cache(){return t.Util.warn("Cache function is not allowed for stage. You may use cache only for layers, groups and shapes."),this}clearCache(){return this}batchDraw(){return this.getChildren().forEach(function(z){z.batchDraw()}),this}}e.Stage=oe,oe.prototype.nodeType=d,(0,c._registerNode)(oe),n.Factory.addGetterSetter(oe,"container"),s.Konva.isBrowser&&document.addEventListener("visibilitychange",()=>{e.stages.forEach(re=>{re.batchDraw()})})}(Qw);var Ra={},ri={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Shape=e.shapes=void 0;const t=st,n=Pt,r=cn,s=xi,a=qe,l=st,c=yn;var u="hasShadow",d="shadowRGBA",f="patternImage",p="linearGradient",g="radialGradient";let v;function b(){return v||(v=n.Util.createCanvasElement().getContext("2d"),v)}e.shapes={};function w(F){const P=this.attrs.fillRule;P?F.fill(P):F.fill()}function _(F){F.stroke()}function C(F){const P=this.attrs.fillRule;P?F.fill(P):F.fill()}function k(F){F.stroke()}function S(){this._clearCache(u)}function E(){this._clearCache(d)}function N(){this._clearCache(f)}function A(){this._clearCache(p)}function I(){this._clearCache(g)}class O extends s.Node{constructor(P){super(P);let M;for(;M=n.Util.getRandomColor(),!(M&&!(M in e.shapes)););this.colorKey=M,e.shapes[M]=this}getContext(){return n.Util.warn("shape.getContext() method is deprecated. Please do not use it."),this.getLayer().getContext()}getCanvas(){return n.Util.warn("shape.getCanvas() method is deprecated. Please do not use it."),this.getLayer().getCanvas()}getSceneFunc(){return this.attrs.sceneFunc||this._sceneFunc}getHitFunc(){return this.attrs.hitFunc||this._hitFunc}hasShadow(){return this._getCache(u,this._hasShadow)}_hasShadow(){return this.shadowEnabled()&&this.shadowOpacity()!==0&&!!(this.shadowColor()||this.shadowBlur()||this.shadowOffsetX()||this.shadowOffsetY())}_getFillPattern(){return this._getCache(f,this.__getFillPattern)}__getFillPattern(){if(this.fillPatternImage()){var P=b();const M=P.createPattern(this.fillPatternImage(),this.fillPatternRepeat()||"repeat");if(M&&M.setTransform){const W=new n.Transform;W.translate(this.fillPatternX(),this.fillPatternY()),W.rotate(t.Konva.getAngle(this.fillPatternRotation())),W.scale(this.fillPatternScaleX(),this.fillPatternScaleY()),W.translate(-1*this.fillPatternOffsetX(),-1*this.fillPatternOffsetY());const U=W.getMatrix(),Q=typeof DOMMatrix=="undefined"?{a:U[0],b:U[1],c:U[2],d:U[3],e:U[4],f:U[5]}:new DOMMatrix(U);M.setTransform(Q)}return M}}_getLinearGradient(){return this._getCache(p,this.__getLinearGradient)}__getLinearGradient(){var P=this.fillLinearGradientColorStops();if(P){for(var M=b(),W=this.fillLinearGradientStartPoint(),U=this.fillLinearGradientEndPoint(),Q=M.createLinearGradient(W.x,W.y,U.x,U.y),q=0;q<P.length;q+=2)Q.addColorStop(P[q],P[q+1]);return Q}}_getRadialGradient(){return this._getCache(g,this.__getRadialGradient)}__getRadialGradient(){var P=this.fillRadialGradientColorStops();if(P){for(var M=b(),W=this.fillRadialGradientStartPoint(),U=this.fillRadialGradientEndPoint(),Q=M.createRadialGradient(W.x,W.y,this.fillRadialGradientStartRadius(),U.x,U.y,this.fillRadialGradientEndRadius()),q=0;q<P.length;q+=2)Q.addColorStop(P[q],P[q+1]);return Q}}getShadowRGBA(){return this._getCache(d,this._getShadowRGBA)}_getShadowRGBA(){if(this.hasShadow()){var P=n.Util.colorToRGBA(this.shadowColor());if(P)return"rgba("+P.r+","+P.g+","+P.b+","+P.a*(this.shadowOpacity()||1)+")"}}hasFill(){return this._calculate("hasFill",["fillEnabled","fill","fillPatternImage","fillLinearGradientColorStops","fillRadialGradientColorStops"],()=>this.fillEnabled()&&!!(this.fill()||this.fillPatternImage()||this.fillLinearGradientColorStops()||this.fillRadialGradientColorStops()))}hasStroke(){return this._calculate("hasStroke",["strokeEnabled","strokeWidth","stroke","strokeLinearGradientColorStops"],()=>this.strokeEnabled()&&this.strokeWidth()&&!!(this.stroke()||this.strokeLinearGradientColorStops()))}hasHitStroke(){const P=this.hitStrokeWidth();return P==="auto"?this.hasStroke():this.strokeEnabled()&&!!P}intersects(P){var M=this.getStage();if(!M)return!1;const W=M.bufferHitCanvas;return W.getContext().clear(),this.drawHit(W,void 0,!0),W.context.getImageData(Math.round(P.x),Math.round(P.y),1,1).data[3]>0}destroy(){return s.Node.prototype.destroy.call(this),delete e.shapes[this.colorKey],delete this.colorKey,this}_useBufferCanvas(P){var M;if(!((M=this.attrs.perfectDrawEnabled)!==null&&M!==void 0?M:!0))return!1;const U=P||this.hasFill(),Q=this.hasStroke(),q=this.getAbsoluteOpacity()!==1;if(U&&Q&&q)return!0;const D=this.hasShadow(),j=this.shadowForStrokeEnabled();return!!(U&&Q&&D&&j)}setStrokeHitEnabled(P){n.Util.warn("strokeHitEnabled property is deprecated. Please use hitStrokeWidth instead."),P?this.hitStrokeWidth("auto"):this.hitStrokeWidth(0)}getStrokeHitEnabled(){return this.hitStrokeWidth()!==0}getSelfRect(){var P=this.size();return{x:this._centroid?-P.width/2:0,y:this._centroid?-P.height/2:0,width:P.width,height:P.height}}getClientRect(P={}){let M=!1,W=this.getParent();for(;W;){if(W.isCached()){M=!0;break}W=W.getParent()}const U=P.skipTransform,Q=P.relativeTo||M&&this.getStage()||void 0,q=this.getSelfRect(),j=!P.skipStroke&&this.hasStroke()&&this.strokeWidth()||0,K=q.width+j,H=q.height+j,R=!P.skipShadow&&this.hasShadow(),ie=R?this.shadowOffsetX():0,ee=R?this.shadowOffsetY():0,Y=K+Math.abs(ie),J=H+Math.abs(ee),oe=R&&this.shadowBlur()||0,re=Y+oe*2,z=J+oe*2,G={width:re,height:z,x:-(j/2+oe)+Math.min(ie,0)+q.x,y:-(j/2+oe)+Math.min(ee,0)+q.y};return U?G:this._transformedRect(G,Q)}drawScene(P,M,W){var U=this.getLayer(),Q=P||U.getCanvas(),q=Q.getContext(),D=this._getCanvasCache(),j=this.getSceneFunc(),K=this.hasShadow(),H,R,ie=Q.isCache,ee=M===this;if(!this.isVisible()&&!ee)return this;if(D){q.save();var Y=this.getAbsoluteTransform(M).getMatrix();return q.transform(Y[0],Y[1],Y[2],Y[3],Y[4],Y[5]),this._drawCachedSceneCanvas(q),q.restore(),this}if(!j)return this;if(q.save(),this._useBufferCanvas()&&!ie){H=this.getStage();const re=W||H.bufferCanvas;R=re.getContext(),R.clear(),R.save(),R._applyLineJoin(this);var J=this.getAbsoluteTransform(M).getMatrix();R.transform(J[0],J[1],J[2],J[3],J[4],J[5]),j.call(this,R,this),R.restore();var oe=re.pixelRatio;K&&q._applyShadow(this),q._applyOpacity(this),q._applyGlobalCompositeOperation(this),q.drawImage(re._canvas,0,0,re.width/oe,re.height/oe)}else{if(q._applyLineJoin(this),!ee){var J=this.getAbsoluteTransform(M).getMatrix();q.transform(J[0],J[1],J[2],J[3],J[4],J[5]),q._applyOpacity(this),q._applyGlobalCompositeOperation(this)}K&&q._applyShadow(this),j.call(this,q,this)}return q.restore(),this}drawHit(P,M,W=!1){if(!this.shouldDrawHit(M,W))return this;var U=this.getLayer(),Q=P||U.hitCanvas,q=Q&&Q.getContext(),D=this.hitFunc()||this.sceneFunc(),j=this._getCanvasCache(),K=j&&j.hit;if(this.colorKey||n.Util.warn("Looks like your canvas has a destroyed shape in it. Do not reuse shape after you destroyed it. If you want to reuse shape you should call remove() instead of destroy()"),K){q.save();var H=this.getAbsoluteTransform(M).getMatrix();return q.transform(H[0],H[1],H[2],H[3],H[4],H[5]),this._drawCachedHitCanvas(q),q.restore(),this}if(!D)return this;if(q.save(),q._applyLineJoin(this),!(this===M)){var ie=this.getAbsoluteTransform(M).getMatrix();q.transform(ie[0],ie[1],ie[2],ie[3],ie[4],ie[5])}return D.call(this,q,this),q.restore(),this}drawHitFromCache(P=0){var M=this._getCanvasCache(),W=this._getCachedSceneCanvas(),U=M.hit,Q=U.getContext(),q=U.getWidth(),D=U.getHeight(),j,K,H,R,ie,ee;Q.clear(),Q.drawImage(W._canvas,0,0,q,D);try{for(j=Q.getImageData(0,0,q,D),K=j.data,H=K.length,R=n.Util._hexToRgb(this.colorKey),ie=0;ie<H;ie+=4)ee=K[ie+3],ee>P?(K[ie]=R.r,K[ie+1]=R.g,K[ie+2]=R.b,K[ie+3]=255):K[ie+3]=0;Q.putImageData(j,0,0)}catch(Y){n.Util.error("Unable to draw hit graph from cached scene canvas. "+Y.message)}return this}hasPointerCapture(P){return c.hasPointerCapture(P,this)}setPointerCapture(P){c.setPointerCapture(P,this)}releaseCapture(P){c.releaseCapture(P,this)}}e.Shape=O,O.prototype._fillFunc=w,O.prototype._strokeFunc=_,O.prototype._fillFuncHit=C,O.prototype._strokeFuncHit=k,O.prototype._centroid=!1,O.prototype.nodeType="Shape",(0,l._registerNode)(O),O.prototype.eventListeners={},O.prototype.on.call(O.prototype,"shadowColorChange.konva shadowBlurChange.konva shadowOffsetChange.konva shadowOpacityChange.konva shadowEnabledChange.konva",S),O.prototype.on.call(O.prototype,"shadowColorChange.konva shadowOpacityChange.konva shadowEnabledChange.konva",E),O.prototype.on.call(O.prototype,"fillPriorityChange.konva fillPatternImageChange.konva fillPatternRepeatChange.konva fillPatternScaleXChange.konva fillPatternScaleYChange.konva fillPatternOffsetXChange.konva fillPatternOffsetYChange.konva fillPatternXChange.konva fillPatternYChange.konva fillPatternRotationChange.konva",N),O.prototype.on.call(O.prototype,"fillPriorityChange.konva fillLinearGradientColorStopsChange.konva fillLinearGradientStartPointXChange.konva fillLinearGradientStartPointYChange.konva fillLinearGradientEndPointXChange.konva fillLinearGradientEndPointYChange.konva",A),O.prototype.on.call(O.prototype,"fillPriorityChange.konva fillRadialGradientColorStopsChange.konva fillRadialGradientStartPointXChange.konva fillRadialGradientStartPointYChange.konva fillRadialGradientEndPointXChange.konva fillRadialGradientEndPointYChange.konva fillRadialGradientStartRadiusChange.konva fillRadialGradientEndRadiusChange.konva",I),r.Factory.addGetterSetter(O,"stroke",void 0,(0,a.getStringOrGradientValidator)()),r.Factory.addGetterSetter(O,"strokeWidth",2,(0,a.getNumberValidator)()),r.Factory.addGetterSetter(O,"fillAfterStrokeEnabled",!1),r.Factory.addGetterSetter(O,"hitStrokeWidth","auto",(0,a.getNumberOrAutoValidator)()),r.Factory.addGetterSetter(O,"strokeHitEnabled",!0,(0,a.getBooleanValidator)()),r.Factory.addGetterSetter(O,"perfectDrawEnabled",!0,(0,a.getBooleanValidator)()),r.Factory.addGetterSetter(O,"shadowForStrokeEnabled",!0,(0,a.getBooleanValidator)()),r.Factory.addGetterSetter(O,"lineJoin"),r.Factory.addGetterSetter(O,"lineCap"),r.Factory.addGetterSetter(O,"sceneFunc"),r.Factory.addGetterSetter(O,"hitFunc"),r.Factory.addGetterSetter(O,"dash"),r.Factory.addGetterSetter(O,"dashOffset",0,(0,a.getNumberValidator)()),r.Factory.addGetterSetter(O,"shadowColor",void 0,(0,a.getStringValidator)()),r.Factory.addGetterSetter(O,"shadowBlur",0,(0,a.getNumberValidator)()),r.Factory.addGetterSetter(O,"shadowOpacity",1,(0,a.getNumberValidator)()),r.Factory.addComponentsGetterSetter(O,"shadowOffset",["x","y"]),r.Factory.addGetterSetter(O,"shadowOffsetX",0,(0,a.getNumberValidator)()),r.Factory.addGetterSetter(O,"shadowOffsetY",0,(0,a.getNumberValidator)()),r.Factory.addGetterSetter(O,"fillPatternImage"),r.Factory.addGetterSetter(O,"fill",void 0,(0,a.getStringOrGradientValidator)()),r.Factory.addGetterSetter(O,"fillPatternX",0,(0,a.getNumberValidator)()),r.Factory.addGetterSetter(O,"fillPatternY",0,(0,a.getNumberValidator)()),r.Factory.addGetterSetter(O,"fillLinearGradientColorStops"),r.Factory.addGetterSetter(O,"strokeLinearGradientColorStops"),r.Factory.addGetterSetter(O,"fillRadialGradientStartRadius",0),r.Factory.addGetterSetter(O,"fillRadialGradientEndRadius",0),r.Factory.addGetterSetter(O,"fillRadialGradientColorStops"),r.Factory.addGetterSetter(O,"fillPatternRepeat","repeat"),r.Factory.addGetterSetter(O,"fillEnabled",!0),r.Factory.addGetterSetter(O,"strokeEnabled",!0),r.Factory.addGetterSetter(O,"shadowEnabled",!0),r.Factory.addGetterSetter(O,"dashEnabled",!0),r.Factory.addGetterSetter(O,"strokeScaleEnabled",!0),r.Factory.addGetterSetter(O,"fillPriority","color"),r.Factory.addComponentsGetterSetter(O,"fillPatternOffset",["x","y"]),r.Factory.addGetterSetter(O,"fillPatternOffsetX",0,(0,a.getNumberValidator)()),r.Factory.addGetterSetter(O,"fillPatternOffsetY",0,(0,a.getNumberValidator)()),r.Factory.addComponentsGetterSetter(O,"fillPatternScale",["x","y"]),r.Factory.addGetterSetter(O,"fillPatternScaleX",1,(0,a.getNumberValidator)()),r.Factory.addGetterSetter(O,"fillPatternScaleY",1,(0,a.getNumberValidator)()),r.Factory.addComponentsGetterSetter(O,"fillLinearGradientStartPoint",["x","y"]),r.Factory.addComponentsGetterSetter(O,"strokeLinearGradientStartPoint",["x","y"]),r.Factory.addGetterSetter(O,"fillLinearGradientStartPointX",0),r.Factory.addGetterSetter(O,"strokeLinearGradientStartPointX",0),r.Factory.addGetterSetter(O,"fillLinearGradientStartPointY",0),r.Factory.addGetterSetter(O,"strokeLinearGradientStartPointY",0),r.Factory.addComponentsGetterSetter(O,"fillLinearGradientEndPoint",["x","y"]),r.Factory.addComponentsGetterSetter(O,"strokeLinearGradientEndPoint",["x","y"]),r.Factory.addGetterSetter(O,"fillLinearGradientEndPointX",0),r.Factory.addGetterSetter(O,"strokeLinearGradientEndPointX",0),r.Factory.addGetterSetter(O,"fillLinearGradientEndPointY",0),r.Factory.addGetterSetter(O,"strokeLinearGradientEndPointY",0),r.Factory.addComponentsGetterSetter(O,"fillRadialGradientStartPoint",["x","y"]),r.Factory.addGetterSetter(O,"fillRadialGradientStartPointX",0),r.Factory.addGetterSetter(O,"fillRadialGradientStartPointY",0),r.Factory.addComponentsGetterSetter(O,"fillRadialGradientEndPoint",["x","y"]),r.Factory.addGetterSetter(O,"fillRadialGradientEndPointX",0),r.Factory.addGetterSetter(O,"fillRadialGradientEndPointY",0),r.Factory.addGetterSetter(O,"fillPatternRotation",0),r.Factory.addGetterSetter(O,"fillRule",void 0,(0,a.getStringValidator)()),r.Factory.backCompat(O,{dashArray:"dash",getDashArray:"getDash",setDashArray:"getDash",drawFunc:"sceneFunc",getDrawFunc:"getSceneFunc",setDrawFunc:"setSceneFunc",drawHitFunc:"hitFunc",getDrawHitFunc:"getHitFunc",setDrawHitFunc:"setHitFunc"})})(ri),Object.defineProperty(Ra,"__esModule",{value:!0}),Ra.Layer=void 0;const ii=Pt,_p=uo,is=xi,Cp=cn,e_=ir,pq=qe,gq=ri,mq=st;var vq="#",yq="beforeDraw",bq="draw",t_=[{x:0,y:0},{x:-1,y:-1},{x:1,y:-1},{x:1,y:1},{x:-1,y:1}],wq=t_.length;class os extends _p.Container{constructor(t){super(t),this.canvas=new e_.SceneCanvas,this.hitCanvas=new e_.HitCanvas({pixelRatio:1}),this._waitingForDraw=!1,this.on("visibleChange.konva",this._checkVisibility),this._checkVisibility(),this.on("imageSmoothingEnabledChange.konva",this._setSmoothEnabled),this._setSmoothEnabled()}createPNGStream(){return this.canvas._canvas.createPNGStream()}getCanvas(){return this.canvas}getNativeCanvasElement(){return this.canvas._canvas}getHitCanvas(){return this.hitCanvas}getContext(){return this.getCanvas().getContext()}clear(t){return this.getContext().clear(t),this.getHitCanvas().getContext().clear(t),this}setZIndex(t){super.setZIndex(t);var n=this.getStage();return n&&n.content&&(n.content.removeChild(this.getNativeCanvasElement()),t<n.children.length-1?n.content.insertBefore(this.getNativeCanvasElement(),n.children[t+1].getCanvas()._canvas):n.content.appendChild(this.getNativeCanvasElement())),this}moveToTop(){is.Node.prototype.moveToTop.call(this);var t=this.getStage();return t&&t.content&&(t.content.removeChild(this.getNativeCanvasElement()),t.content.appendChild(this.getNativeCanvasElement())),!0}moveUp(){var t=is.Node.prototype.moveUp.call(this);if(!t)return!1;var n=this.getStage();return!n||!n.content?!1:(n.content.removeChild(this.getNativeCanvasElement()),this.index<n.children.length-1?n.content.insertBefore(this.getNativeCanvasElement(),n.children[this.index+1].getCanvas()._canvas):n.content.appendChild(this.getNativeCanvasElement()),!0)}moveDown(){if(is.Node.prototype.moveDown.call(this)){var t=this.getStage();if(t){var n=t.children;t.content&&(t.content.removeChild(this.getNativeCanvasElement()),t.content.insertBefore(this.getNativeCanvasElement(),n[this.index+1].getCanvas()._canvas))}return!0}return!1}moveToBottom(){if(is.Node.prototype.moveToBottom.call(this)){var t=this.getStage();if(t){var n=t.children;t.content&&(t.content.removeChild(this.getNativeCanvasElement()),t.content.insertBefore(this.getNativeCanvasElement(),n[1].getCanvas()._canvas))}return!0}return!1}getLayer(){return this}remove(){var t=this.getNativeCanvasElement();return is.Node.prototype.remove.call(this),t&&t.parentNode&&ii.Util._isInDocument(t)&&t.parentNode.removeChild(t),this}getStage(){return this.parent}setSize({width:t,height:n}){return this.canvas.setSize(t,n),this.hitCanvas.setSize(t,n),this._setSmoothEnabled(),this}_validateAdd(t){var n=t.getType();n!=="Group"&&n!=="Shape"&&ii.Util.throw("You may only add groups and shapes to a layer.")}_toKonvaCanvas(t){return t=t||{},t.width=t.width||this.getWidth(),t.height=t.height||this.getHeight(),t.x=t.x!==void 0?t.x:this.x(),t.y=t.y!==void 0?t.y:this.y(),is.Node.prototype._toKonvaCanvas.call(this,t)}_checkVisibility(){this.visible()?this.canvas._canvas.style.display="block":this.canvas._canvas.style.display="none"}_setSmoothEnabled(){this.getContext()._context.imageSmoothingEnabled=this.imageSmoothingEnabled()}getWidth(){if(this.parent)return this.parent.width()}setWidth(){ii.Util.warn('Can not change width of layer. Use "stage.width(value)" function instead.')}getHeight(){if(this.parent)return this.parent.height()}setHeight(){ii.Util.warn('Can not change height of layer. Use "stage.height(value)" function instead.')}batchDraw(){return this._waitingForDraw||(this._waitingForDraw=!0,ii.Util.requestAnimFrame(()=>{this.draw(),this._waitingForDraw=!1})),this}getIntersection(t){if(!this.isListening()||!this.isVisible())return null;for(var n=1,r=!1;;){for(let s=0;s<wq;s++){const a=t_[s],l=this._getIntersection({x:t.x+a.x*n,y:t.y+a.y*n}),c=l.shape;if(c)return c;if(r=!!l.antialiased,!l.antialiased)break}if(r)n+=1;else return null}}_getIntersection(t){const n=this.hitCanvas.pixelRatio,r=this.hitCanvas.context.getImageData(Math.round(t.x*n),Math.round(t.y*n),1,1).data,s=r[3];if(s===255){const a=ii.Util._rgbToHex(r[0],r[1],r[2]),l=gq.shapes[vq+a];return l?{shape:l}:{antialiased:!0}}else if(s>0)return{antialiased:!0};return{}}drawScene(t,n){var r=this.getLayer(),s=t||r&&r.getCanvas();return this._fire(yq,{node:this}),this.clearBeforeDraw()&&s.getContext().clear(),_p.Container.prototype.drawScene.call(this,s,n),this._fire(bq,{node:this}),this}drawHit(t,n){var r=this.getLayer(),s=t||r&&r.hitCanvas;return r&&r.clearBeforeDraw()&&r.getHitCanvas().getContext().clear(),_p.Container.prototype.drawHit.call(this,s,n),this}enableHitGraph(){return this.hitGraphEnabled(!0),this}disableHitGraph(){return this.hitGraphEnabled(!1),this}setHitGraphEnabled(t){ii.Util.warn("hitGraphEnabled method is deprecated. Please use layer.listening() instead."),this.listening(t)}getHitGraphEnabled(t){return ii.Util.warn("hitGraphEnabled method is deprecated. Please use layer.listening() instead."),this.listening()}toggleHitCanvas(){if(!(!this.parent||!this.parent.content)){var t=this.parent,n=!!this.hitCanvas._canvas.parentNode;n?t.content.removeChild(this.hitCanvas._canvas):t.content.appendChild(this.hitCanvas._canvas)}}destroy(){return ii.Util.releaseCanvas(this.getNativeCanvasElement(),this.getHitCanvas()._canvas),super.destroy()}}Ra.Layer=os,os.prototype.nodeType="Layer",(0,mq._registerNode)(os),Cp.Factory.addGetterSetter(os,"imageSmoothingEnabled",!0),Cp.Factory.addGetterSetter(os,"clearBeforeDraw",!0),Cp.Factory.addGetterSetter(os,"hitGraphEnabled",!0,(0,pq.getBooleanValidator)());var Jc={};Object.defineProperty(Jc,"__esModule",{value:!0}),Jc.FastLayer=void 0;const _q=Pt,Cq=Ra,Sq=st;class Sp extends Cq.Layer{constructor(t){super(t),this.listening(!1),_q.Util.warn('Konva.Fast layer is deprecated. Please use "new Konva.Layer({ listening: false })" instead.')}}Jc.FastLayer=Sp,Sp.prototype.nodeType="FastLayer",(0,Sq._registerNode)(Sp);var Xc={};Object.defineProperty(Xc,"__esModule",{value:!0}),Xc.Group=void 0;const Eq=Pt,xq=uo,kq=st;class Ep extends xq.Container{_validateAdd(t){var n=t.getType();n!=="Group"&&n!=="Shape"&&Eq.Util.throw("You may only add groups and shapes to groups.")}}Xc.Group=Ep,Ep.prototype.nodeType="Group",(0,kq._registerNode)(Ep);var Pa={};Object.defineProperty(Pa,"__esModule",{value:!0}),Pa.Animation=void 0;const xp=st,n_=Pt,kp=function(){return xp.glob.performance&&xp.glob.performance.now?function(){return xp.glob.performance.now()}:function(){return new Date().getTime()}}();class Ar{constructor(t,n){this.id=Ar.animIdCounter++,this.frame={time:0,timeDiff:0,lastTime:kp(),frameRate:0},this.func=t,this.setLayers(n)}setLayers(t){let n=[];return t&&(n=Array.isArray(t)?t:[t]),this.layers=n,this}getLayers(){return this.layers}addLayer(t){const n=this.layers,r=n.length;for(let s=0;s<r;s++)if(n[s]._id===t._id)return!1;return this.layers.push(t),!0}isRunning(){const n=Ar.animations,r=n.length;for(let s=0;s<r;s++)if(n[s].id===this.id)return!0;return!1}start(){return this.stop(),this.frame.timeDiff=0,this.frame.lastTime=kp(),Ar._addAnimation(this),this}stop(){return Ar._removeAnimation(this),this}_updateFrameObject(t){this.frame.timeDiff=t-this.frame.lastTime,this.frame.lastTime=t,this.frame.time+=this.frame.timeDiff,this.frame.frameRate=1e3/this.frame.timeDiff}static _addAnimation(t){this.animations.push(t),this._handleAnimation()}static _removeAnimation(t){const n=t.id,r=this.animations,s=r.length;for(let a=0;a<s;a++)if(r[a].id===n){this.animations.splice(a,1);break}}static _runFrames(){const t={},n=this.animations;for(let r=0;r<n.length;r++){const s=n[r],a=s.layers,l=s.func;s._updateFrameObject(kp());const c=a.length;let u;if(l?u=l.call(s,s.frame)!==!1:u=!0,!!u)for(let d=0;d<c;d++){const f=a[d];f._id!==void 0&&(t[f._id]=f)}}for(let r in t)t.hasOwnProperty(r)&&t[r].batchDraw()}static _animationLoop(){const t=Ar;t.animations.length?(t._runFrames(),n_.Util.requestAnimFrame(t._animationLoop)):t.animRunning=!1}static _handleAnimation(){this.animRunning||(this.animRunning=!0,n_.Util.requestAnimFrame(this._animationLoop))}}Pa.Animation=Ar,Ar.animations=[],Ar.animIdCounter=0,Ar.animRunning=!1;var r_={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Easings=e.Tween=void 0;const t=Pt,n=Pa,r=xi,s=st;var a={node:1,duration:1,easing:1,onFinish:1,yoyo:1},l=1,c=2,u=3,d=0,f=["fill","stroke","shadowColor"];class p{constructor(b,w,_,C,k,S,E){this.prop=b,this.propFunc=w,this.begin=C,this._pos=C,this.duration=S,this._change=0,this.prevPos=0,this.yoyo=E,this._time=0,this._position=0,this._startTime=0,this._finish=0,this.func=_,this._change=k-this.begin,this.pause()}fire(b){var w=this[b];w&&w()}setTime(b){b>this.duration?this.yoyo?(this._time=this.duration,this.reverse()):this.finish():b<0?this.yoyo?(this._time=0,this.play()):this.reset():(this._time=b,this.update())}getTime(){return this._time}setPosition(b){this.prevPos=this._pos,this.propFunc(b),this._pos=b}getPosition(b){return b===void 0&&(b=this._time),this.func(b,this.begin,this._change,this.duration)}play(){this.state=c,this._startTime=this.getTimer()-this._time,this.onEnterFrame(),this.fire("onPlay")}reverse(){this.state=u,this._time=this.duration-this._time,this._startTime=this.getTimer()-this._time,this.onEnterFrame(),this.fire("onReverse")}seek(b){this.pause(),this._time=b,this.update(),this.fire("onSeek")}reset(){this.pause(),this._time=0,this.update(),this.fire("onReset")}finish(){this.pause(),this._time=this.duration,this.update(),this.fire("onFinish")}update(){this.setPosition(this.getPosition(this._time)),this.fire("onUpdate")}onEnterFrame(){var b=this.getTimer()-this._startTime;this.state===c?this.setTime(b):this.state===u&&this.setTime(this.duration-b)}pause(){this.state=l,this.fire("onPause")}getTimer(){return new Date().getTime()}}class g{constructor(b){var w=this,_=b.node,C=_._id,k,S=b.easing||e.Easings.Linear,E=!!b.yoyo,N;typeof b.duration=="undefined"?k=.3:b.duration===0?k=.001:k=b.duration,this.node=_,this._id=d++;var A=_.getLayer()||(_ instanceof s.Konva.Stage?_.getLayers():null);A||t.Util.error("Tween constructor have `node` that is not in a layer. Please add node into layer first."),this.anim=new n.Animation(function(){w.tween.onEnterFrame()},A),this.tween=new p(N,function(I){w._tweenFunc(I)},S,0,1,k*1e3,E),this._addListeners(),g.attrs[C]||(g.attrs[C]={}),g.attrs[C][this._id]||(g.attrs[C][this._id]={}),g.tweens[C]||(g.tweens[C]={});for(N in b)a[N]===void 0&&this._addAttr(N,b[N]);this.reset(),this.onFinish=b.onFinish,this.onReset=b.onReset,this.onUpdate=b.onUpdate}_addAttr(b,w){var _=this.node,C=_._id,k,S,E,N,A,I,O,F;if(E=g.tweens[C][b],E&&delete g.attrs[C][E][b],k=_.getAttr(b),t.Util._isArray(w))if(S=[],A=Math.max(w.length,k.length),b==="points"&&w.length!==k.length&&(w.length>k.length?(O=k,k=t.Util._prepareArrayForTween(k,w,_.closed())):(I=w,w=t.Util._prepareArrayForTween(w,k,_.closed()))),b.indexOf("fill")===0)for(N=0;N<A;N++)if(N%2===0)S.push(w[N]-k[N]);else{var P=t.Util.colorToRGBA(k[N]);F=t.Util.colorToRGBA(w[N]),k[N]=P,S.push({r:F.r-P.r,g:F.g-P.g,b:F.b-P.b,a:F.a-P.a})}else for(N=0;N<A;N++)S.push(w[N]-k[N]);else f.indexOf(b)!==-1?(k=t.Util.colorToRGBA(k),F=t.Util.colorToRGBA(w),S={r:F.r-k.r,g:F.g-k.g,b:F.b-k.b,a:F.a-k.a}):S=w-k;g.attrs[C][this._id][b]={start:k,diff:S,end:w,trueEnd:I,trueStart:O},g.tweens[C][b]=this._id}_tweenFunc(b){var w=this.node,_=g.attrs[w._id][this._id],C,k,S,E,N,A,I,O;for(C in _){if(k=_[C],S=k.start,E=k.diff,O=k.end,t.Util._isArray(S))if(N=[],I=Math.max(S.length,O.length),C.indexOf("fill")===0)for(A=0;A<I;A++)A%2===0?N.push((S[A]||0)+E[A]*b):N.push("rgba("+Math.round(S[A].r+E[A].r*b)+","+Math.round(S[A].g+E[A].g*b)+","+Math.round(S[A].b+E[A].b*b)+","+(S[A].a+E[A].a*b)+")");else for(A=0;A<I;A++)N.push((S[A]||0)+E[A]*b);else f.indexOf(C)!==-1?N="rgba("+Math.round(S.r+E.r*b)+","+Math.round(S.g+E.g*b)+","+Math.round(S.b+E.b*b)+","+(S.a+E.a*b)+")":N=S+E*b;w.setAttr(C,N)}}_addListeners(){this.tween.onPlay=()=>{this.anim.start()},this.tween.onReverse=()=>{this.anim.start()},this.tween.onPause=()=>{this.anim.stop()},this.tween.onFinish=()=>{var b=this.node,w=g.attrs[b._id][this._id];w.points&&w.points.trueEnd&&b.setAttr("points",w.points.trueEnd),this.onFinish&&this.onFinish.call(this)},this.tween.onReset=()=>{var b=this.node,w=g.attrs[b._id][this._id];w.points&&w.points.trueStart&&b.points(w.points.trueStart),this.onReset&&this.onReset()},this.tween.onUpdate=()=>{this.onUpdate&&this.onUpdate.call(this)}}play(){return this.tween.play(),this}reverse(){return this.tween.reverse(),this}reset(){return this.tween.reset(),this}seek(b){return this.tween.seek(b*1e3),this}pause(){return this.tween.pause(),this}finish(){return this.tween.finish(),this}destroy(){var b=this.node._id,w=this._id,_=g.tweens[b],C;this.pause();for(C in _)delete g.tweens[b][C];delete g.attrs[b][w]}}e.Tween=g,g.attrs={},g.tweens={},r.Node.prototype.to=function(v){var b=v.onFinish;v.node=this,v.onFinish=function(){this.destroy(),b&&b()};var w=new g(v);w.play()},e.Easings={BackEaseIn(v,b,w,_){var C=1.70158;return w*(v/=_)*v*((C+1)*v-C)+b},BackEaseOut(v,b,w,_){var C=1.70158;return w*((v=v/_-1)*v*((C+1)*v+C)+1)+b},BackEaseInOut(v,b,w,_){var C=1.70158;return(v/=_/2)<1?w/2*(v*v*(((C*=1.525)+1)*v-C))+b:w/2*((v-=2)*v*(((C*=1.525)+1)*v+C)+2)+b},ElasticEaseIn(v,b,w,_,C,k){var S=0;return v===0?b:(v/=_)===1?b+w:(k||(k=_*.3),!C||C<Math.abs(w)?(C=w,S=k/4):S=k/(2*Math.PI)*Math.asin(w/C),-(C*Math.pow(2,10*(v-=1))*Math.sin((v*_-S)*(2*Math.PI)/k))+b)},ElasticEaseOut(v,b,w,_,C,k){var S=0;return v===0?b:(v/=_)===1?b+w:(k||(k=_*.3),!C||C<Math.abs(w)?(C=w,S=k/4):S=k/(2*Math.PI)*Math.asin(w/C),C*Math.pow(2,-10*v)*Math.sin((v*_-S)*(2*Math.PI)/k)+w+b)},ElasticEaseInOut(v,b,w,_,C,k){var S=0;return v===0?b:(v/=_/2)===2?b+w:(k||(k=_*(.3*1.5)),!C||C<Math.abs(w)?(C=w,S=k/4):S=k/(2*Math.PI)*Math.asin(w/C),v<1?-.5*(C*Math.pow(2,10*(v-=1))*Math.sin((v*_-S)*(2*Math.PI)/k))+b:C*Math.pow(2,-10*(v-=1))*Math.sin((v*_-S)*(2*Math.PI)/k)*.5+w+b)},BounceEaseOut(v,b,w,_){return(v/=_)<1/2.75?w*(7.5625*v*v)+b:v<2/2.75?w*(7.5625*(v-=1.5/2.75)*v+.75)+b:v<2.5/2.75?w*(7.5625*(v-=2.25/2.75)*v+.9375)+b:w*(7.5625*(v-=2.625/2.75)*v+.984375)+b},BounceEaseIn(v,b,w,_){return w-e.Easings.BounceEaseOut(_-v,0,w,_)+b},BounceEaseInOut(v,b,w,_){return v<_/2?e.Easings.BounceEaseIn(v*2,0,w,_)*.5+b:e.Easings.BounceEaseOut(v*2-_,0,w,_)*.5+w*.5+b},EaseIn(v,b,w,_){return w*(v/=_)*v+b},EaseOut(v,b,w,_){return-w*(v/=_)*(v-2)+b},EaseInOut(v,b,w,_){return(v/=_/2)<1?w/2*v*v+b:-w/2*(--v*(v-2)-1)+b},StrongEaseIn(v,b,w,_){return w*(v/=_)*v*v*v*v+b},StrongEaseOut(v,b,w,_){return w*((v=v/_-1)*v*v*v*v+1)+b},StrongEaseInOut(v,b,w,_){return(v/=_/2)<1?w/2*v*v*v*v*v+b:w/2*((v-=2)*v*v*v*v+2)+b},Linear(v,b,w,_){return w*v/_+b}}})(r_),function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Konva=void 0;const t=st,n=Pt,r=xi,s=uo,a=Qw,l=Ra,c=Jc,u=Xc,d=Hc,f=ri,p=Pa,g=r_,v=ti,b=ir;e.Konva=n.Util._assign(t.Konva,{Util:n.Util,Transform:n.Transform,Node:r.Node,Container:s.Container,Stage:a.Stage,stages:a.stages,Layer:l.Layer,FastLayer:c.FastLayer,Group:u.Group,DD:d.DD,Shape:f.Shape,shapes:f.shapes,Animation:p.Animation,Tween:g.Tween,Easings:g.Easings,Context:v.Context,Canvas:b.Canvas}),e.default=e.Konva}(mp),function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.Konva=void 0;var n=mp;Object.defineProperty(t,"Konva",{enumerable:!0,get:function(){return n.Konva}});const r=mp;e.exports=r.Konva}(gp,gp.exports);var Nq=gp.exports;const Ze=Vy(Nq);var Np={};Object.defineProperty(Np,"__esModule",{value:!0}),Np.Rect=void 0;const Tq=cn,Aq=ri,Oq=st,Iq=Pt,Bq=qe;class Qc extends Aq.Shape{_sceneFunc(t){var n=this.cornerRadius(),r=this.width(),s=this.height();t.beginPath(),n?Iq.Util.drawRoundedRectPath(t,r,s,n):t.rect(0,0,r,s),t.closePath(),t.fillStrokeShape(this)}}Np.Rect=Qc,Qc.prototype.className="Rect",(0,Oq._registerNode)(Qc),Tq.Factory.addGetterSetter(Qc,"cornerRadius",0,(0,Bq.getNumberOrArrayOfNumbersValidator)(4));var Tp={};Object.defineProperty(Tp,"__esModule",{value:!0}),Tp.Circle=void 0;const Lq=cn,Rq=ri,Pq=qe,Dq=st;class ss extends Rq.Shape{_sceneFunc(t){t.beginPath(),t.arc(0,0,this.attrs.radius||0,0,Math.PI*2,!1),t.closePath(),t.fillStrokeShape(this)}getWidth(){return this.radius()*2}getHeight(){return this.radius()*2}setWidth(t){this.radius()!==t/2&&this.radius(t/2)}setHeight(t){this.radius()!==t/2&&this.radius(t/2)}}Tp.Circle=ss,ss.prototype._centroid=!0,ss.prototype.className="Circle",ss.prototype._attrsAffectingSize=["radius"],(0,Dq._registerNode)(ss),Lq.Factory.addGetterSetter(ss,"radius",0,(0,Pq.getNumberValidator)());var Ap={};Object.defineProperty(Ap,"__esModule",{value:!0}),Ap.Image=void 0;const Op=Pt,ho=cn,Mq=ri,Fq=st,Da=qe;let Or=class PC extends Mq.Shape{constructor(t){super(t),this.on("imageChange.konva",()=>{this._setImageLoad()}),this._setImageLoad()}_setImageLoad(){const t=this.image();t&&t.complete||t&&t.readyState===4||t&&t.addEventListener&&t.addEventListener("load",()=>{this._requestDraw()})}_useBufferCanvas(){const t=!!this.cornerRadius(),n=this.hasShadow();return t&&n?!0:super._useBufferCanvas(!0)}_sceneFunc(t){const n=this.getWidth(),r=this.getHeight(),s=this.cornerRadius(),a=this.attrs.image;let l;if(a){const c=this.attrs.cropWidth,u=this.attrs.cropHeight;c&&u?l=[a,this.cropX(),this.cropY(),c,u,0,0,n,r]:l=[a,0,0,n,r]}(this.hasFill()||this.hasStroke()||s)&&(t.beginPath(),s?Op.Util.drawRoundedRectPath(t,n,r,s):t.rect(0,0,n,r),t.closePath(),t.fillStrokeShape(this)),a&&(s&&t.clip(),t.drawImage.apply(t,l))}_hitFunc(t){var n=this.width(),r=this.height(),s=this.cornerRadius();t.beginPath(),s?Op.Util.drawRoundedRectPath(t,n,r,s):t.rect(0,0,n,r),t.closePath(),t.fillStrokeShape(this)}getWidth(){var t,n;return(t=this.attrs.width)!==null&&t!==void 0?t:(n=this.image())===null||n===void 0?void 0:n.width}getHeight(){var t,n;return(t=this.attrs.height)!==null&&t!==void 0?t:(n=this.image())===null||n===void 0?void 0:n.height}static fromURL(t,n,r=null){var s=Op.Util.createImageElement();s.onload=function(){var a=new PC({image:s});n(a)},s.onerror=r,s.crossOrigin="Anonymous",s.src=t}};Ap.Image=Or,Or.prototype.className="Image",(0,Fq._registerNode)(Or),ho.Factory.addGetterSetter(Or,"cornerRadius",0,(0,Da.getNumberOrArrayOfNumbersValidator)(4)),ho.Factory.addGetterSetter(Or,"image"),ho.Factory.addComponentsGetterSetter(Or,"crop",["x","y","width","height"]),ho.Factory.addGetterSetter(Or,"cropX",0,(0,Da.getNumberValidator)()),ho.Factory.addGetterSetter(Or,"cropY",0,(0,Da.getNumberValidator)()),ho.Factory.addGetterSetter(Or,"cropWidth",0,(0,Da.getNumberValidator)()),ho.Factory.addGetterSetter(Or,"cropHeight",0,(0,Da.getNumberValidator)());var Ma={};Object.defineProperty(Ma,"__esModule",{value:!0}),Ma.Text=Ma.stringToArray=void 0;const Ip=Pt,Ht=cn,$q=ri,Bp=st,Ti=qe,zq=st;function i_(e){return[...e].reduce((t,n,r,s)=>(new RegExp("\\p{Emoji_Modifier_Base}\\p{Emoji_Modifier}?(?:\\u200D\\p{Emoji_Presentation})+","u").test(n)?t.push(n):new RegExp("\\p{Regional_Indicator}{2}","u").test(n+(s[r+1]||""))?t.push(n+s[r+1]):r>0&&new RegExp("\\p{Mn}|\\p{Me}|\\p{Mc}","u").test(n)?t[t.length-1]+=n:t.push(n),t),[])}Ma.stringToArray=i_;var as="auto",Uq="center",o_="inherit",Fa="justify",jq="Change.konva",qq="2d",s_="-",a_="left",Hq="text",Gq="Text",Wq="top",Kq="bottom",l_="middle",c_="normal",Yq="px ",Zc=" ",Jq="right",d_="rtl",Xq="word",Qq="char",u_="none",Lp="…",f_=["direction","fontFamily","fontSize","fontStyle","fontVariant","padding","align","verticalAlign","lineHeight","text","width","height","wrap","ellipsis","letterSpacing"],Zq=f_.length;function Vq(e){return e.split(",").map(t=>{t=t.trim();const n=t.indexOf(" ")>=0,r=t.indexOf('"')>=0||t.indexOf("'")>=0;return n&&!r&&(t=`"${t}"`),t}).join(", ")}var Vc;function Rp(){return Vc||(Vc=Ip.Util.createCanvasElement().getContext(qq),Vc)}function eH(e){e.fillText(this._partialText,this._partialTextX,this._partialTextY)}function tH(e){e.setAttr("miterLimit",2),e.strokeText(this._partialText,this._partialTextX,this._partialTextY)}function nH(e){return e=e||{},!e.fillLinearGradientColorStops&&!e.fillRadialGradientColorStops&&!e.fillPatternImage&&(e.fill=e.fill||"black"),e}class vt extends $q.Shape{constructor(t){super(nH(t)),this._partialTextX=0,this._partialTextY=0;for(var n=0;n<Zq;n++)this.on(f_[n]+jq,this._setTextData);this._setTextData()}_sceneFunc(t){var n=this.textArr,r=n.length;if(this.text()){var s=this.padding(),a=this.fontSize(),l=this.lineHeight()*a,c=this.verticalAlign(),u=this.direction(),d=0,f=this.align(),p=this.getWidth(),g=this.letterSpacing(),v=this.fill(),b=this.textDecoration(),w=b.indexOf("underline")!==-1,_=b.indexOf("line-through")!==-1,C;u=u===o_?t.direction:u;var k=l/2,S=l_;if(Bp.Konva._fixTextRendering){var E=this.measureSize("M");S="alphabetic",k=(E.fontBoundingBoxAscent-E.fontBoundingBoxDescent)/2+l/2}var N=0,A=0;for(u===d_&&t.setAttr("direction",u),t.setAttr("font",this._getContextFont()),t.setAttr("textBaseline",S),t.setAttr("textAlign",a_),c===l_?d=(this.getHeight()-r*l-s*2)/2:c===Kq&&(d=this.getHeight()-r*l-s*2),t.translate(s,d+s),C=0;C<r;C++){var N=0,A=0,I=n[C],O=I.text,F=I.width,P=I.lastInParagraph,M,W,U;if(t.save(),f===Jq?N+=p-F-s*2:f===Uq&&(N+=(p-F-s*2)/2),w){t.save(),t.beginPath();let H=Bp.Konva._fixTextRendering?Math.round(a/4):Math.round(a/2);const R=N,ie=k+A+H;t.moveTo(R,ie),M=O.split(" ").length-1,W=M===0,U=f===Fa&&!P?p-s*2:F,t.lineTo(R+Math.round(U),ie),t.lineWidth=a/15;const ee=this._getLinearGradient();t.strokeStyle=ee||v,t.stroke(),t.restore()}if(_){t.save(),t.beginPath();let H=Bp.Konva._fixTextRendering?-Math.round(a/4):0;t.moveTo(N,k+A+H),M=O.split(" ").length-1,W=M===0,U=f===Fa&&P&&!W?p-s*2:F,t.lineTo(N+Math.round(U),k+A+H),t.lineWidth=a/15;const R=this._getLinearGradient();t.strokeStyle=R||v,t.stroke(),t.restore()}if(u!==d_&&(g!==0||f===Fa)){M=O.split(" ").length-1;for(var Q=i_(O),q=0;q<Q.length;q++){var D=Q[q];D===" "&&!P&&f===Fa&&(N+=(p-s*2-F)/M),this._partialTextX=N,this._partialTextY=k+A,this._partialText=D,t.fillStrokeShape(this),N+=this.measureSize(D).width+g}}else g!==0&&t.setAttr("letterSpacing",`${g}px`),this._partialTextX=N,this._partialTextY=k+A,this._partialText=O,t.fillStrokeShape(this);t.restore(),r>1&&(k+=l)}}}_hitFunc(t){var n=this.getWidth(),r=this.getHeight();t.beginPath(),t.rect(0,0,n,r),t.closePath(),t.fillStrokeShape(this)}setText(t){var n=Ip.Util._isString(t)?t:t==null?"":t+"";return this._setAttr(Hq,n),this}getWidth(){var t=this.attrs.width===as||this.attrs.width===void 0;return t?this.getTextWidth()+this.padding()*2:this.attrs.width}getHeight(){var t=this.attrs.height===as||this.attrs.height===void 0;return t?this.fontSize()*this.textArr.length*this.lineHeight()+this.padding()*2:this.attrs.height}getTextWidth(){return this.textWidth}getTextHeight(){return Ip.Util.warn("text.getTextHeight() method is deprecated. Use text.height() - for full height and text.fontSize() - for one line height."),this.textHeight}measureSize(t){var n,r,s,a,l,c,u,d,f,p,g,v=Rp(),b=this.fontSize(),w;v.save(),v.font=this._getContextFont(),w=v.measureText(t),v.restore();const _=b/100;return{actualBoundingBoxAscent:(n=w.actualBoundingBoxAscent)!==null&&n!==void 0?n:71.58203125*_,actualBoundingBoxDescent:(r=w.actualBoundingBoxDescent)!==null&&r!==void 0?r:0,actualBoundingBoxLeft:(s=w.actualBoundingBoxLeft)!==null&&s!==void 0?s:-7.421875*_,actualBoundingBoxRight:(a=w.actualBoundingBoxRight)!==null&&a!==void 0?a:75.732421875*_,alphabeticBaseline:(l=w.alphabeticBaseline)!==null&&l!==void 0?l:0,emHeightAscent:(c=w.emHeightAscent)!==null&&c!==void 0?c:100*_,emHeightDescent:(u=w.emHeightDescent)!==null&&u!==void 0?u:-20*_,fontBoundingBoxAscent:(d=w.fontBoundingBoxAscent)!==null&&d!==void 0?d:91*_,fontBoundingBoxDescent:(f=w.fontBoundingBoxDescent)!==null&&f!==void 0?f:21*_,hangingBaseline:(p=w.hangingBaseline)!==null&&p!==void 0?p:72.80000305175781*_,ideographicBaseline:(g=w.ideographicBaseline)!==null&&g!==void 0?g:-21*_,width:w.width,height:b}}_getContextFont(){return this.fontStyle()+Zc+this.fontVariant()+Zc+(this.fontSize()+Yq)+Vq(this.fontFamily())}_addTextLine(t){this.align()===Fa&&(t=t.trim());var r=this._getTextWidth(t);return this.textArr.push({text:t,width:r,lastInParagraph:!1})}_getTextWidth(t){var n=this.letterSpacing(),r=t.length;return Rp().measureText(t).width+(r?n*(r-1):0)}_setTextData(){var t=this.text().split(`
|
|
133
|
+
`),n=+this.fontSize(),r=0,s=this.lineHeight()*n,a=this.attrs.width,l=this.attrs.height,c=a!==as&&a!==void 0,u=l!==as&&l!==void 0,d=this.padding(),f=a-d*2,p=l-d*2,g=0,v=this.wrap(),b=v!==u_,w=v!==Qq&&b,_=this.ellipsis();this.textArr=[],Rp().font=this._getContextFont();for(var C=_?this._getTextWidth(Lp):0,k=0,S=t.length;k<S;++k){var E=t[k],N=this._getTextWidth(E);if(c&&N>f)for(;E.length>0;){for(var A=0,I=E.length,O="",F=0;A<I;){var P=A+I>>>1,M=E.slice(0,P+1),W=this._getTextWidth(M)+C;W<=f?(A=P+1,O=M,F=W):I=P}if(O){if(w){var U,Q=E[O.length],q=Q===Zc||Q===s_;q&&F<=f?U=O.length:U=Math.max(O.lastIndexOf(Zc),O.lastIndexOf(s_))+1,U>0&&(A=U,O=O.slice(0,A),F=this._getTextWidth(O))}O=O.trimRight(),this._addTextLine(O),r=Math.max(r,F),g+=s;var D=this._shouldHandleEllipsis(g);if(D){this._tryToAddEllipsisToLastLine();break}if(E=E.slice(A),E=E.trimLeft(),E.length>0&&(N=this._getTextWidth(E),N<=f)){this._addTextLine(E),g+=s,r=Math.max(r,N);break}}else break}else this._addTextLine(E),g+=s,r=Math.max(r,N),this._shouldHandleEllipsis(g)&&k<S-1&&this._tryToAddEllipsisToLastLine();if(this.textArr[this.textArr.length-1]&&(this.textArr[this.textArr.length-1].lastInParagraph=!0),u&&g+s>p)break}this.textHeight=n,this.textWidth=r}_shouldHandleEllipsis(t){var n=+this.fontSize(),r=this.lineHeight()*n,s=this.attrs.height,a=s!==as&&s!==void 0,l=this.padding(),c=s-l*2,u=this.wrap(),d=u!==u_;return!d||a&&t+r>c}_tryToAddEllipsisToLastLine(){var t=this.attrs.width,n=t!==as&&t!==void 0,r=this.padding(),s=t-r*2,a=this.ellipsis(),l=this.textArr[this.textArr.length-1];if(!(!l||!a)){if(n){var c=this._getTextWidth(l.text+Lp)<s;c||(l.text=l.text.slice(0,l.text.length-3))}this.textArr.splice(this.textArr.length-1,1),this._addTextLine(l.text+Lp)}}getStrokeScaleEnabled(){return!0}_useBufferCanvas(){const t=this.textDecoration().indexOf("underline")!==-1||this.textDecoration().indexOf("line-through")!==-1,n=this.hasShadow();return t&&n?!0:super._useBufferCanvas()}}Ma.Text=vt,vt.prototype._fillFunc=eH,vt.prototype._strokeFunc=tH,vt.prototype.className=Gq,vt.prototype._attrsAffectingSize=["text","fontSize","padding","wrap","lineHeight","letterSpacing"],(0,zq._registerNode)(vt),Ht.Factory.overWriteSetter(vt,"width",(0,Ti.getNumberOrAutoValidator)()),Ht.Factory.overWriteSetter(vt,"height",(0,Ti.getNumberOrAutoValidator)()),Ht.Factory.addGetterSetter(vt,"direction",o_),Ht.Factory.addGetterSetter(vt,"fontFamily","Arial"),Ht.Factory.addGetterSetter(vt,"fontSize",12,(0,Ti.getNumberValidator)()),Ht.Factory.addGetterSetter(vt,"fontStyle",c_),Ht.Factory.addGetterSetter(vt,"fontVariant",c_),Ht.Factory.addGetterSetter(vt,"padding",0,(0,Ti.getNumberValidator)()),Ht.Factory.addGetterSetter(vt,"align",a_),Ht.Factory.addGetterSetter(vt,"verticalAlign",Wq),Ht.Factory.addGetterSetter(vt,"lineHeight",1,(0,Ti.getNumberValidator)()),Ht.Factory.addGetterSetter(vt,"wrap",Xq),Ht.Factory.addGetterSetter(vt,"ellipsis",!1,(0,Ti.getBooleanValidator)()),Ht.Factory.addGetterSetter(vt,"letterSpacing",0,(0,Ti.getNumberValidator)()),Ht.Factory.addGetterSetter(vt,"text","",(0,Ti.getStringValidator)()),Ht.Factory.addGetterSetter(vt,"textDecoration","");var Pp={},ed={};Object.defineProperty(ed,"__esModule",{value:!0}),ed.Line=void 0;const td=cn,rH=ri,h_=qe,iH=st;function Dp(e,t,n,r,s,a,l){var c=Math.sqrt(Math.pow(n-e,2)+Math.pow(r-t,2)),u=Math.sqrt(Math.pow(s-n,2)+Math.pow(a-r,2)),d=l*c/(c+u),f=l*u/(c+u),p=n-d*(s-e),g=r-d*(a-t),v=n+f*(s-e),b=r+f*(a-t);return[p,g,v,b]}function p_(e,t){var n=e.length,r=[],s,a;for(s=2;s<n-2;s+=2)a=Dp(e[s-2],e[s-1],e[s],e[s+1],e[s+2],e[s+3],t),!isNaN(a[0])&&(r.push(a[0]),r.push(a[1]),r.push(e[s]),r.push(e[s+1]),r.push(a[2]),r.push(a[3]));return r}class Ai extends rH.Shape{constructor(t){super(t),this.on("pointsChange.konva tensionChange.konva closedChange.konva bezierChange.konva",function(){this._clearCache("tensionPoints")})}_sceneFunc(t){var n=this.points(),r=n.length,s=this.tension(),a=this.closed(),l=this.bezier(),c,u,d;if(r){if(t.beginPath(),t.moveTo(n[0],n[1]),s!==0&&r>4){for(c=this.getTensionPoints(),u=c.length,d=a?0:4,a||t.quadraticCurveTo(c[0],c[1],c[2],c[3]);d<u-2;)t.bezierCurveTo(c[d++],c[d++],c[d++],c[d++],c[d++],c[d++]);a||t.quadraticCurveTo(c[u-2],c[u-1],n[r-2],n[r-1])}else if(l)for(d=2;d<r;)t.bezierCurveTo(n[d++],n[d++],n[d++],n[d++],n[d++],n[d++]);else for(d=2;d<r;d+=2)t.lineTo(n[d],n[d+1]);a?(t.closePath(),t.fillStrokeShape(this)):t.strokeShape(this)}}getTensionPoints(){return this._getCache("tensionPoints",this._getTensionPoints)}_getTensionPoints(){return this.closed()?this._getTensionPointsClosed():p_(this.points(),this.tension())}_getTensionPointsClosed(){var t=this.points(),n=t.length,r=this.tension(),s=Dp(t[n-2],t[n-1],t[0],t[1],t[2],t[3],r),a=Dp(t[n-4],t[n-3],t[n-2],t[n-1],t[0],t[1],r),l=p_(t,r),c=[s[2],s[3]].concat(l).concat([a[0],a[1],t[n-2],t[n-1],a[2],a[3],s[0],s[1],t[0],t[1]]);return c}getWidth(){return this.getSelfRect().width}getHeight(){return this.getSelfRect().height}getSelfRect(){var t=this.points();if(t.length<4)return{x:t[0]||0,y:t[1]||0,width:0,height:0};this.tension()!==0?t=[t[0],t[1],...this._getTensionPoints(),t[t.length-2],t[t.length-1]]:t=this.points();for(var n=t[0],r=t[0],s=t[1],a=t[1],l,c,u=0;u<t.length/2;u++)l=t[u*2],c=t[u*2+1],n=Math.min(n,l),r=Math.max(r,l),s=Math.min(s,c),a=Math.max(a,c);return{x:n,y:s,width:r-n,height:a-s}}}ed.Line=Ai,Ai.prototype.className="Line",Ai.prototype._attrsAffectingSize=["points","bezier","tension"],(0,iH._registerNode)(Ai),td.Factory.addGetterSetter(Ai,"closed",!1),td.Factory.addGetterSetter(Ai,"bezier",!1),td.Factory.addGetterSetter(Ai,"tension",0,(0,h_.getNumberValidator)()),td.Factory.addGetterSetter(Ai,"points",[],(0,h_.getNumberArrayValidator)());var nd={},g_={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.t2length=e.getQuadraticArcLength=e.getCubicArcLength=e.binomialCoefficients=e.cValues=e.tValues=void 0,e.tValues=[[],[],[-.5773502691896257,.5773502691896257],[0,-.7745966692414834,.7745966692414834],[-.33998104358485626,.33998104358485626,-.8611363115940526,.8611363115940526],[0,-.5384693101056831,.5384693101056831,-.906179845938664,.906179845938664],[.6612093864662645,-.6612093864662645,-.2386191860831969,.2386191860831969,-.932469514203152,.932469514203152],[0,.4058451513773972,-.4058451513773972,-.7415311855993945,.7415311855993945,-.9491079123427585,.9491079123427585],[-.1834346424956498,.1834346424956498,-.525532409916329,.525532409916329,-.7966664774136267,.7966664774136267,-.9602898564975363,.9602898564975363],[0,-.8360311073266358,.8360311073266358,-.9681602395076261,.9681602395076261,-.3242534234038089,.3242534234038089,-.6133714327005904,.6133714327005904],[-.14887433898163122,.14887433898163122,-.4333953941292472,.4333953941292472,-.6794095682990244,.6794095682990244,-.8650633666889845,.8650633666889845,-.9739065285171717,.9739065285171717],[0,-.26954315595234496,.26954315595234496,-.5190961292068118,.5190961292068118,-.7301520055740494,.7301520055740494,-.8870625997680953,.8870625997680953,-.978228658146057,.978228658146057],[-.1252334085114689,.1252334085114689,-.3678314989981802,.3678314989981802,-.5873179542866175,.5873179542866175,-.7699026741943047,.7699026741943047,-.9041172563704749,.9041172563704749,-.9815606342467192,.9815606342467192],[0,-.2304583159551348,.2304583159551348,-.44849275103644687,.44849275103644687,-.6423493394403402,.6423493394403402,-.8015780907333099,.8015780907333099,-.9175983992229779,.9175983992229779,-.9841830547185881,.9841830547185881],[-.10805494870734367,.10805494870734367,-.31911236892788974,.31911236892788974,-.5152486363581541,.5152486363581541,-.6872929048116855,.6872929048116855,-.827201315069765,.827201315069765,-.9284348836635735,.9284348836635735,-.9862838086968123,.9862838086968123],[0,-.20119409399743451,.20119409399743451,-.3941513470775634,.3941513470775634,-.5709721726085388,.5709721726085388,-.7244177313601701,.7244177313601701,-.8482065834104272,.8482065834104272,-.937273392400706,.937273392400706,-.9879925180204854,.9879925180204854],[-.09501250983763744,.09501250983763744,-.2816035507792589,.2816035507792589,-.45801677765722737,.45801677765722737,-.6178762444026438,.6178762444026438,-.755404408355003,.755404408355003,-.8656312023878318,.8656312023878318,-.9445750230732326,.9445750230732326,-.9894009349916499,.9894009349916499],[0,-.17848418149584785,.17848418149584785,-.3512317634538763,.3512317634538763,-.5126905370864769,.5126905370864769,-.6576711592166907,.6576711592166907,-.7815140038968014,.7815140038968014,-.8802391537269859,.8802391537269859,-.9506755217687678,.9506755217687678,-.9905754753144174,.9905754753144174],[-.0847750130417353,.0847750130417353,-.2518862256915055,.2518862256915055,-.41175116146284263,.41175116146284263,-.5597708310739475,.5597708310739475,-.6916870430603532,.6916870430603532,-.8037049589725231,.8037049589725231,-.8926024664975557,.8926024664975557,-.9558239495713977,.9558239495713977,-.9915651684209309,.9915651684209309],[0,-.16035864564022537,.16035864564022537,-.31656409996362983,.31656409996362983,-.46457074137596094,.46457074137596094,-.600545304661681,.600545304661681,-.7209661773352294,.7209661773352294,-.8227146565371428,.8227146565371428,-.9031559036148179,.9031559036148179,-.96020815213483,.96020815213483,-.9924068438435844,.9924068438435844],[-.07652652113349734,.07652652113349734,-.22778585114164507,.22778585114164507,-.37370608871541955,.37370608871541955,-.5108670019508271,.5108670019508271,-.636053680726515,.636053680726515,-.7463319064601508,.7463319064601508,-.8391169718222188,.8391169718222188,-.912234428251326,.912234428251326,-.9639719272779138,.9639719272779138,-.9931285991850949,.9931285991850949],[0,-.1455618541608951,.1455618541608951,-.2880213168024011,.2880213168024011,-.4243421202074388,.4243421202074388,-.5516188358872198,.5516188358872198,-.6671388041974123,.6671388041974123,-.7684399634756779,.7684399634756779,-.8533633645833173,.8533633645833173,-.9200993341504008,.9200993341504008,-.9672268385663063,.9672268385663063,-.9937521706203895,.9937521706203895],[-.06973927331972223,.06973927331972223,-.20786042668822127,.20786042668822127,-.34193582089208424,.34193582089208424,-.469355837986757,.469355837986757,-.5876404035069116,.5876404035069116,-.6944872631866827,.6944872631866827,-.7878168059792081,.7878168059792081,-.8658125777203002,.8658125777203002,-.926956772187174,.926956772187174,-.9700604978354287,.9700604978354287,-.9942945854823992,.9942945854823992],[0,-.1332568242984661,.1332568242984661,-.26413568097034495,.26413568097034495,-.3903010380302908,.3903010380302908,-.5095014778460075,.5095014778460075,-.6196098757636461,.6196098757636461,-.7186613631319502,.7186613631319502,-.8048884016188399,.8048884016188399,-.8767523582704416,.8767523582704416,-.9329710868260161,.9329710868260161,-.9725424712181152,.9725424712181152,-.9947693349975522,.9947693349975522],[-.06405689286260563,.06405689286260563,-.1911188674736163,.1911188674736163,-.3150426796961634,.3150426796961634,-.4337935076260451,.4337935076260451,-.5454214713888396,.5454214713888396,-.6480936519369755,.6480936519369755,-.7401241915785544,.7401241915785544,-.820001985973903,.820001985973903,-.8864155270044011,.8864155270044011,-.9382745520027328,.9382745520027328,-.9747285559713095,.9747285559713095,-.9951872199970213,.9951872199970213]],e.cValues=[[],[],[1,1],[.8888888888888888,.5555555555555556,.5555555555555556],[.6521451548625461,.6521451548625461,.34785484513745385,.34785484513745385],[.5688888888888889,.47862867049936647,.47862867049936647,.23692688505618908,.23692688505618908],[.3607615730481386,.3607615730481386,.46791393457269104,.46791393457269104,.17132449237917036,.17132449237917036],[.4179591836734694,.3818300505051189,.3818300505051189,.27970539148927664,.27970539148927664,.1294849661688697,.1294849661688697],[.362683783378362,.362683783378362,.31370664587788727,.31370664587788727,.22238103445337448,.22238103445337448,.10122853629037626,.10122853629037626],[.3302393550012598,.1806481606948574,.1806481606948574,.08127438836157441,.08127438836157441,.31234707704000286,.31234707704000286,.26061069640293544,.26061069640293544],[.29552422471475287,.29552422471475287,.26926671930999635,.26926671930999635,.21908636251598204,.21908636251598204,.1494513491505806,.1494513491505806,.06667134430868814,.06667134430868814],[.2729250867779006,.26280454451024665,.26280454451024665,.23319376459199048,.23319376459199048,.18629021092773426,.18629021092773426,.1255803694649046,.1255803694649046,.05566856711617366,.05566856711617366],[.24914704581340277,.24914704581340277,.2334925365383548,.2334925365383548,.20316742672306592,.20316742672306592,.16007832854334622,.16007832854334622,.10693932599531843,.10693932599531843,.04717533638651183,.04717533638651183],[.2325515532308739,.22628318026289723,.22628318026289723,.2078160475368885,.2078160475368885,.17814598076194574,.17814598076194574,.13887351021978725,.13887351021978725,.09212149983772845,.09212149983772845,.04048400476531588,.04048400476531588],[.2152638534631578,.2152638534631578,.2051984637212956,.2051984637212956,.18553839747793782,.18553839747793782,.15720316715819355,.15720316715819355,.12151857068790319,.12151857068790319,.08015808715976021,.08015808715976021,.03511946033175186,.03511946033175186],[.2025782419255613,.19843148532711158,.19843148532711158,.1861610000155622,.1861610000155622,.16626920581699392,.16626920581699392,.13957067792615432,.13957067792615432,.10715922046717194,.10715922046717194,.07036604748810812,.07036604748810812,.03075324199611727,.03075324199611727],[.1894506104550685,.1894506104550685,.18260341504492358,.18260341504492358,.16915651939500254,.16915651939500254,.14959598881657674,.14959598881657674,.12462897125553388,.12462897125553388,.09515851168249279,.09515851168249279,.062253523938647894,.062253523938647894,.027152459411754096,.027152459411754096],[.17944647035620653,.17656270536699264,.17656270536699264,.16800410215645004,.16800410215645004,.15404576107681028,.15404576107681028,.13513636846852548,.13513636846852548,.11188384719340397,.11188384719340397,.08503614831717918,.08503614831717918,.0554595293739872,.0554595293739872,.02414830286854793,.02414830286854793],[.1691423829631436,.1691423829631436,.16427648374583273,.16427648374583273,.15468467512626524,.15468467512626524,.14064291467065065,.14064291467065065,.12255520671147846,.12255520671147846,.10094204410628717,.10094204410628717,.07642573025488905,.07642573025488905,.0497145488949698,.0497145488949698,.02161601352648331,.02161601352648331],[.1610544498487837,.15896884339395434,.15896884339395434,.15276604206585967,.15276604206585967,.1426067021736066,.1426067021736066,.12875396253933621,.12875396253933621,.11156664554733399,.11156664554733399,.09149002162245,.09149002162245,.06904454273764123,.06904454273764123,.0448142267656996,.0448142267656996,.019461788229726478,.019461788229726478],[.15275338713072584,.15275338713072584,.14917298647260374,.14917298647260374,.14209610931838204,.14209610931838204,.13168863844917664,.13168863844917664,.11819453196151841,.11819453196151841,.10193011981724044,.10193011981724044,.08327674157670475,.08327674157670475,.06267204833410907,.06267204833410907,.04060142980038694,.04060142980038694,.017614007139152118,.017614007139152118],[.14608113364969041,.14452440398997005,.14452440398997005,.13988739479107315,.13988739479107315,.13226893863333747,.13226893863333747,.12183141605372853,.12183141605372853,.10879729916714838,.10879729916714838,.09344442345603386,.09344442345603386,.0761001136283793,.0761001136283793,.057134425426857205,.057134425426857205,.036953789770852494,.036953789770852494,.016017228257774335,.016017228257774335],[.13925187285563198,.13925187285563198,.13654149834601517,.13654149834601517,.13117350478706238,.13117350478706238,.12325237681051242,.12325237681051242,.11293229608053922,.11293229608053922,.10041414444288096,.10041414444288096,.08594160621706773,.08594160621706773,.06979646842452049,.06979646842452049,.052293335152683286,.052293335152683286,.03377490158481415,.03377490158481415,.0146279952982722,.0146279952982722],[.13365457218610619,.1324620394046966,.1324620394046966,.12890572218808216,.12890572218808216,.12304908430672953,.12304908430672953,.11499664022241136,.11499664022241136,.10489209146454141,.10489209146454141,.09291576606003515,.09291576606003515,.07928141177671895,.07928141177671895,.06423242140852585,.06423242140852585,.04803767173108467,.04803767173108467,.030988005856979445,.030988005856979445,.013411859487141771,.013411859487141771],[.12793819534675216,.12793819534675216,.1258374563468283,.1258374563468283,.12167047292780339,.12167047292780339,.1155056680537256,.1155056680537256,.10744427011596563,.10744427011596563,.09761865210411388,.09761865210411388,.08619016153195327,.08619016153195327,.0733464814110803,.0733464814110803,.05929858491543678,.05929858491543678,.04427743881741981,.04427743881741981,.028531388628933663,.028531388628933663,.0123412297999872,.0123412297999872]],e.binomialCoefficients=[[1],[1,1],[1,2,1],[1,3,3,1]];const t=(l,c,u)=>{let d,f,p;d=u/2,f=0;for(let v=0;v<20;v++)p=d*e.tValues[20][v]+d,f+=e.cValues[20][v]*r(l,c,p);return d*f};e.getCubicArcLength=t;const n=(l,c,u)=>{u===void 0&&(u=1);const d=l[0]-2*l[1]+l[2],f=c[0]-2*c[1]+c[2],p=2*l[1]-2*l[0],g=2*c[1]-2*c[0],v=4*(d*d+f*f),b=4*(d*p+f*g),w=p*p+g*g;if(v===0)return u*Math.sqrt(Math.pow(l[2]-l[0],2)+Math.pow(c[2]-c[0],2));const _=b/(2*v),C=w/v,k=u+_,S=C-_*_,E=k*k+S>0?Math.sqrt(k*k+S):0,N=_*_+S>0?Math.sqrt(_*_+S):0,A=_+Math.sqrt(_*_+S)!==0?S*Math.log(Math.abs((k+E)/(_+N))):0;return Math.sqrt(v)/2*(k*E-_*N+A)};e.getQuadraticArcLength=n;function r(l,c,u){const d=s(1,u,l),f=s(1,u,c),p=d*d+f*f;return Math.sqrt(p)}const s=(l,c,u)=>{const d=u.length-1;let f,p;if(d===0)return 0;if(l===0){p=0;for(let g=0;g<=d;g++)p+=e.binomialCoefficients[d][g]*Math.pow(1-c,d-g)*Math.pow(c,g)*u[g];return p}else{f=new Array(d);for(let g=0;g<d;g++)f[g]=d*(u[g+1]-u[g]);return s(l-1,c,f)}},a=(l,c,u)=>{let d=1,f=l/c,p=(l-u(f))/c,g=0;for(;d>.001;){const v=u(f+p),b=Math.abs(l-v)/c;if(b<d)d=b,f+=p;else{const w=u(f-p),_=Math.abs(l-w)/c;_<d?(d=_,f-=p):p/=2}if(g++,g>500)break}return f};e.t2length=a})(g_),Object.defineProperty(nd,"__esModule",{value:!0}),nd.Path=void 0;const oH=cn,sH=ri,aH=st,ls=g_;class Ot extends sH.Shape{constructor(t){super(t),this.dataArray=[],this.pathLength=0,this._readDataAttribute(),this.on("dataChange.konva",function(){this._readDataAttribute()})}_readDataAttribute(){this.dataArray=Ot.parsePathData(this.data()),this.pathLength=Ot.getPathLength(this.dataArray)}_sceneFunc(t){var n=this.dataArray;t.beginPath();for(var r=!1,s=0;s<n.length;s++){var a=n[s].command,l=n[s].points;switch(a){case"L":t.lineTo(l[0],l[1]);break;case"M":t.moveTo(l[0],l[1]);break;case"C":t.bezierCurveTo(l[0],l[1],l[2],l[3],l[4],l[5]);break;case"Q":t.quadraticCurveTo(l[0],l[1],l[2],l[3]);break;case"A":var c=l[0],u=l[1],d=l[2],f=l[3],p=l[4],g=l[5],v=l[6],b=l[7],w=d>f?d:f,_=d>f?1:d/f,C=d>f?f/d:1;t.translate(c,u),t.rotate(v),t.scale(_,C),t.arc(0,0,w,p,p+g,1-b),t.scale(1/_,1/C),t.rotate(-v),t.translate(-c,-u);break;case"z":r=!0,t.closePath();break}}!r&&!this.hasFill()?t.strokeShape(this):t.fillStrokeShape(this)}getSelfRect(){var t=[];this.dataArray.forEach(function(d){if(d.command==="A"){var f=d.points[4],p=d.points[5],g=d.points[4]+p,v=Math.PI/180;if(Math.abs(f-g)<v&&(v=Math.abs(f-g)),p<0)for(let b=f-v;b>g;b-=v){const w=Ot.getPointOnEllipticalArc(d.points[0],d.points[1],d.points[2],d.points[3],b,0);t.push(w.x,w.y)}else for(let b=f+v;b<g;b+=v){const w=Ot.getPointOnEllipticalArc(d.points[0],d.points[1],d.points[2],d.points[3],b,0);t.push(w.x,w.y)}}else if(d.command==="C")for(let b=0;b<=1;b+=.01){const w=Ot.getPointOnCubicBezier(b,d.start.x,d.start.y,d.points[0],d.points[1],d.points[2],d.points[3],d.points[4],d.points[5]);t.push(w.x,w.y)}else t=t.concat(d.points)});for(var n=t[0],r=t[0],s=t[1],a=t[1],l,c,u=0;u<t.length/2;u++)l=t[u*2],c=t[u*2+1],isNaN(l)||(n=Math.min(n,l),r=Math.max(r,l)),isNaN(c)||(s=Math.min(s,c),a=Math.max(a,c));return{x:n,y:s,width:r-n,height:a-s}}getLength(){return this.pathLength}getPointAtLength(t){return Ot.getPointAtLengthOfDataArray(t,this.dataArray)}static getLineLength(t,n,r,s){return Math.sqrt((r-t)*(r-t)+(s-n)*(s-n))}static getPathLength(t){let n=0;for(var r=0;r<t.length;++r)n+=t[r].pathLength;return n}static getPointAtLengthOfDataArray(t,n){var r,s=0,a=n.length;if(!a)return null;for(;s<a&&t>n[s].pathLength;)t-=n[s].pathLength,++s;if(s===a)return r=n[s-1].points.slice(-2),{x:r[0],y:r[1]};if(t<.01)return r=n[s].points.slice(0,2),{x:r[0],y:r[1]};var l=n[s],c=l.points;switch(l.command){case"L":return Ot.getPointOnLine(t,l.start.x,l.start.y,c[0],c[1]);case"C":return Ot.getPointOnCubicBezier((0,ls.t2length)(t,Ot.getPathLength(n),w=>(0,ls.getCubicArcLength)([l.start.x,c[0],c[2],c[4]],[l.start.y,c[1],c[3],c[5]],w)),l.start.x,l.start.y,c[0],c[1],c[2],c[3],c[4],c[5]);case"Q":return Ot.getPointOnQuadraticBezier((0,ls.t2length)(t,Ot.getPathLength(n),w=>(0,ls.getQuadraticArcLength)([l.start.x,c[0],c[2]],[l.start.y,c[1],c[3]],w)),l.start.x,l.start.y,c[0],c[1],c[2],c[3]);case"A":var u=c[0],d=c[1],f=c[2],p=c[3],g=c[4],v=c[5],b=c[6];return g+=v*t/l.pathLength,Ot.getPointOnEllipticalArc(u,d,f,p,g,b)}return null}static getPointOnLine(t,n,r,s,a,l,c){l=l!=null?l:n,c=c!=null?c:r;const u=this.getLineLength(n,r,s,a);if(u<1e-10)return{x:n,y:r};if(s===n)return{x:l,y:c+(a>r?t:-t)};const d=(a-r)/(s-n),f=Math.sqrt(t*t/(1+d*d))*(s<n?-1:1),p=d*f;if(Math.abs(c-r-d*(l-n))<1e-10)return{x:l+f,y:c+p};const g=((l-n)*(s-n)+(c-r)*(a-r))/(u*u),v=n+g*(s-n),b=r+g*(a-r),w=this.getLineLength(l,c,v,b),_=Math.sqrt(t*t-w*w),C=Math.sqrt(_*_/(1+d*d))*(s<n?-1:1),k=d*C;return{x:v+C,y:b+k}}static getPointOnCubicBezier(t,n,r,s,a,l,c,u,d){function f(_){return _*_*_}function p(_){return 3*_*_*(1-_)}function g(_){return 3*_*(1-_)*(1-_)}function v(_){return(1-_)*(1-_)*(1-_)}var b=u*f(t)+l*p(t)+s*g(t)+n*v(t),w=d*f(t)+c*p(t)+a*g(t)+r*v(t);return{x:b,y:w}}static getPointOnQuadraticBezier(t,n,r,s,a,l,c){function u(v){return v*v}function d(v){return 2*v*(1-v)}function f(v){return(1-v)*(1-v)}var p=l*u(t)+s*d(t)+n*f(t),g=c*u(t)+a*d(t)+r*f(t);return{x:p,y:g}}static getPointOnEllipticalArc(t,n,r,s,a,l){var c=Math.cos(l),u=Math.sin(l),d={x:r*Math.cos(a),y:s*Math.sin(a)};return{x:t+(d.x*c-d.y*u),y:n+(d.x*u+d.y*c)}}static parsePathData(t){if(!t)return[];var n=t,r=["m","M","l","L","v","V","h","H","z","Z","c","C","q","Q","t","T","s","S","a","A"];n=n.replace(new RegExp(" ","g"),",");for(var s=0;s<r.length;s++)n=n.replace(new RegExp(r[s],"g"),"|"+r[s]);var a=n.split("|"),l=[],c=[],u=0,d=0,f=/([-+]?((\d+\.\d+)|((\d+)|(\.\d+)))(?:e[-+]?\d+)?)/gi,p;for(s=1;s<a.length;s++){var g=a[s],v=g.charAt(0);for(g=g.slice(1),c.length=0;p=f.exec(g);)c.push(p[0]);for(var b=[],w=0,_=c.length;w<_;w++){if(c[w]==="00"){b.push(0,0);continue}var C=parseFloat(c[w]);isNaN(C)?b.push(0):b.push(C)}for(;b.length>0&&!isNaN(b[0]);){var k="",S=[],E=u,N=d,A,I,O,F,P,M,W,U,Q,q;switch(v){case"l":u+=b.shift(),d+=b.shift(),k="L",S.push(u,d);break;case"L":u=b.shift(),d=b.shift(),S.push(u,d);break;case"m":var D=b.shift(),j=b.shift();if(u+=D,d+=j,k="M",l.length>2&&l[l.length-1].command==="z"){for(var K=l.length-2;K>=0;K--)if(l[K].command==="M"){u=l[K].points[0]+D,d=l[K].points[1]+j;break}}S.push(u,d),v="l";break;case"M":u=b.shift(),d=b.shift(),k="M",S.push(u,d),v="L";break;case"h":u+=b.shift(),k="L",S.push(u,d);break;case"H":u=b.shift(),k="L",S.push(u,d);break;case"v":d+=b.shift(),k="L",S.push(u,d);break;case"V":d=b.shift(),k="L",S.push(u,d);break;case"C":S.push(b.shift(),b.shift(),b.shift(),b.shift()),u=b.shift(),d=b.shift(),S.push(u,d);break;case"c":S.push(u+b.shift(),d+b.shift(),u+b.shift(),d+b.shift()),u+=b.shift(),d+=b.shift(),k="C",S.push(u,d);break;case"S":I=u,O=d,A=l[l.length-1],A.command==="C"&&(I=u+(u-A.points[2]),O=d+(d-A.points[3])),S.push(I,O,b.shift(),b.shift()),u=b.shift(),d=b.shift(),k="C",S.push(u,d);break;case"s":I=u,O=d,A=l[l.length-1],A.command==="C"&&(I=u+(u-A.points[2]),O=d+(d-A.points[3])),S.push(I,O,u+b.shift(),d+b.shift()),u+=b.shift(),d+=b.shift(),k="C",S.push(u,d);break;case"Q":S.push(b.shift(),b.shift()),u=b.shift(),d=b.shift(),S.push(u,d);break;case"q":S.push(u+b.shift(),d+b.shift()),u+=b.shift(),d+=b.shift(),k="Q",S.push(u,d);break;case"T":I=u,O=d,A=l[l.length-1],A.command==="Q"&&(I=u+(u-A.points[0]),O=d+(d-A.points[1])),u=b.shift(),d=b.shift(),k="Q",S.push(I,O,u,d);break;case"t":I=u,O=d,A=l[l.length-1],A.command==="Q"&&(I=u+(u-A.points[0]),O=d+(d-A.points[1])),u+=b.shift(),d+=b.shift(),k="Q",S.push(I,O,u,d);break;case"A":F=b.shift(),P=b.shift(),M=b.shift(),W=b.shift(),U=b.shift(),Q=u,q=d,u=b.shift(),d=b.shift(),k="A",S=this.convertEndpointToCenterParameterization(Q,q,u,d,W,U,F,P,M);break;case"a":F=b.shift(),P=b.shift(),M=b.shift(),W=b.shift(),U=b.shift(),Q=u,q=d,u+=b.shift(),d+=b.shift(),k="A",S=this.convertEndpointToCenterParameterization(Q,q,u,d,W,U,F,P,M);break}l.push({command:k||v,points:S,start:{x:E,y:N},pathLength:this.calcLength(E,N,k||v,S)})}(v==="z"||v==="Z")&&l.push({command:"z",points:[],start:void 0,pathLength:0})}return l}static calcLength(t,n,r,s){var a,l,c,u,d=Ot;switch(r){case"L":return d.getLineLength(t,n,s[0],s[1]);case"C":return(0,ls.getCubicArcLength)([t,s[0],s[2],s[4]],[n,s[1],s[3],s[5]],1);case"Q":return(0,ls.getQuadraticArcLength)([t,s[0],s[2]],[n,s[1],s[3]],1);case"A":a=0;var f=s[4],p=s[5],g=s[4]+p,v=Math.PI/180;if(Math.abs(f-g)<v&&(v=Math.abs(f-g)),l=d.getPointOnEllipticalArc(s[0],s[1],s[2],s[3],f,0),p<0)for(u=f-v;u>g;u-=v)c=d.getPointOnEllipticalArc(s[0],s[1],s[2],s[3],u,0),a+=d.getLineLength(l.x,l.y,c.x,c.y),l=c;else for(u=f+v;u<g;u+=v)c=d.getPointOnEllipticalArc(s[0],s[1],s[2],s[3],u,0),a+=d.getLineLength(l.x,l.y,c.x,c.y),l=c;return c=d.getPointOnEllipticalArc(s[0],s[1],s[2],s[3],g,0),a+=d.getLineLength(l.x,l.y,c.x,c.y),a}return 0}static convertEndpointToCenterParameterization(t,n,r,s,a,l,c,u,d){var f=d*(Math.PI/180),p=Math.cos(f)*(t-r)/2+Math.sin(f)*(n-s)/2,g=-1*Math.sin(f)*(t-r)/2+Math.cos(f)*(n-s)/2,v=p*p/(c*c)+g*g/(u*u);v>1&&(c*=Math.sqrt(v),u*=Math.sqrt(v));var b=Math.sqrt((c*c*(u*u)-c*c*(g*g)-u*u*(p*p))/(c*c*(g*g)+u*u*(p*p)));a===l&&(b*=-1),isNaN(b)&&(b=0);var w=b*c*g/u,_=b*-u*p/c,C=(t+r)/2+Math.cos(f)*w-Math.sin(f)*_,k=(n+s)/2+Math.sin(f)*w+Math.cos(f)*_,S=function(P){return Math.sqrt(P[0]*P[0]+P[1]*P[1])},E=function(P,M){return(P[0]*M[0]+P[1]*M[1])/(S(P)*S(M))},N=function(P,M){return(P[0]*M[1]<P[1]*M[0]?-1:1)*Math.acos(E(P,M))},A=N([1,0],[(p-w)/c,(g-_)/u]),I=[(p-w)/c,(g-_)/u],O=[(-1*p-w)/c,(-1*g-_)/u],F=N(I,O);return E(I,O)<=-1&&(F=Math.PI),E(I,O)>=1&&(F=0),l===0&&F>0&&(F=F-2*Math.PI),l===1&&F<0&&(F=F+2*Math.PI),[C,k,c,u,A,F,f,l]}}nd.Path=Ot,Ot.prototype.className="Path",Ot.prototype._attrsAffectingSize=["data"],(0,aH._registerNode)(Ot),oH.Factory.addGetterSetter(Ot,"data"),Object.defineProperty(Pp,"__esModule",{value:!0}),Pp.Arrow=void 0;const rd=cn,lH=ed,m_=qe,cH=st,v_=nd;class po extends lH.Line{_sceneFunc(t){super._sceneFunc(t);var n=Math.PI*2,r=this.points(),s=r,a=this.tension()!==0&&r.length>4;a&&(s=this.getTensionPoints());var l=this.pointerLength(),c=r.length,u,d;if(a){const g=[s[s.length-4],s[s.length-3],s[s.length-2],s[s.length-1],r[c-2],r[c-1]],v=v_.Path.calcLength(s[s.length-4],s[s.length-3],"C",g),b=v_.Path.getPointOnQuadraticBezier(Math.min(1,1-l/v),g[0],g[1],g[2],g[3],g[4],g[5]);u=r[c-2]-b.x,d=r[c-1]-b.y}else u=r[c-2]-r[c-4],d=r[c-1]-r[c-3];var f=(Math.atan2(d,u)+n)%n,p=this.pointerWidth();this.pointerAtEnding()&&(t.save(),t.beginPath(),t.translate(r[c-2],r[c-1]),t.rotate(f),t.moveTo(0,0),t.lineTo(-l,p/2),t.lineTo(-l,-p/2),t.closePath(),t.restore(),this.__fillStroke(t)),this.pointerAtBeginning()&&(t.save(),t.beginPath(),t.translate(r[0],r[1]),a?(u=(s[0]+s[2])/2-r[0],d=(s[1]+s[3])/2-r[1]):(u=r[2]-r[0],d=r[3]-r[1]),t.rotate((Math.atan2(-d,-u)+n)%n),t.moveTo(0,0),t.lineTo(-l,p/2),t.lineTo(-l,-p/2),t.closePath(),t.restore(),this.__fillStroke(t))}__fillStroke(t){var n=this.dashEnabled();n&&(this.attrs.dashEnabled=!1,t.setLineDash([])),t.fillStrokeShape(this),n&&(this.attrs.dashEnabled=!0)}getSelfRect(){const t=super.getSelfRect(),n=this.pointerWidth()/2;return{x:t.x-n,y:t.y-n,width:t.width+n*2,height:t.height+n*2}}}Pp.Arrow=po,po.prototype.className="Arrow",(0,cH._registerNode)(po),rd.Factory.addGetterSetter(po,"pointerLength",10,(0,m_.getNumberValidator)()),rd.Factory.addGetterSetter(po,"pointerWidth",10,(0,m_.getNumberValidator)()),rd.Factory.addGetterSetter(po,"pointerAtBeginning",!1),rd.Factory.addGetterSetter(po,"pointerAtEnding",!0);function y_(e,t){var n,r=1;e==null&&(e=0),t==null&&(t=0);function s(){var a,l=n.length,c,u=0,d=0;for(a=0;a<l;++a)c=n[a],u+=c.x,d+=c.y;for(u=(u/l-e)*r,d=(d/l-t)*r,a=0;a<l;++a)c=n[a],c.x-=u,c.y-=d}return s.initialize=function(a){n=a},s.x=function(a){return arguments.length?(e=+a,s):e},s.y=function(a){return arguments.length?(t=+a,s):t},s.strength=function(a){return arguments.length?(r=+a,s):r},s}function dH(e){const t=+this._x.call(null,e),n=+this._y.call(null,e);return b_(this.cover(t,n),t,n,e)}function b_(e,t,n,r){if(isNaN(t)||isNaN(n))return e;var s,a=e._root,l={data:r},c=e._x0,u=e._y0,d=e._x1,f=e._y1,p,g,v,b,w,_,C,k;if(!a)return e._root=l,e;for(;a.length;)if((w=t>=(p=(c+d)/2))?c=p:d=p,(_=n>=(g=(u+f)/2))?u=g:f=g,s=a,!(a=a[C=_<<1|w]))return s[C]=l,e;if(v=+e._x.call(null,a.data),b=+e._y.call(null,a.data),t===v&&n===b)return l.next=a,s?s[C]=l:e._root=l,e;do s=s?s[C]=new Array(4):e._root=new Array(4),(w=t>=(p=(c+d)/2))?c=p:d=p,(_=n>=(g=(u+f)/2))?u=g:f=g;while((C=_<<1|w)===(k=(b>=g)<<1|v>=p));return s[k]=a,s[C]=l,e}function uH(e){var t,n,r=e.length,s,a,l=new Array(r),c=new Array(r),u=1/0,d=1/0,f=-1/0,p=-1/0;for(n=0;n<r;++n)isNaN(s=+this._x.call(null,t=e[n]))||isNaN(a=+this._y.call(null,t))||(l[n]=s,c[n]=a,s<u&&(u=s),s>f&&(f=s),a<d&&(d=a),a>p&&(p=a));if(u>f||d>p)return this;for(this.cover(u,d).cover(f,p),n=0;n<r;++n)b_(this,l[n],c[n],e[n]);return this}function fH(e,t){if(isNaN(e=+e)||isNaN(t=+t))return this;var n=this._x0,r=this._y0,s=this._x1,a=this._y1;if(isNaN(n))s=(n=Math.floor(e))+1,a=(r=Math.floor(t))+1;else{for(var l=s-n||1,c=this._root,u,d;n>e||e>=s||r>t||t>=a;)switch(d=(t<r)<<1|e<n,u=new Array(4),u[d]=c,c=u,l*=2,d){case 0:s=n+l,a=r+l;break;case 1:n=s-l,a=r+l;break;case 2:s=n+l,r=a-l;break;case 3:n=s-l,r=a-l;break}this._root&&this._root.length&&(this._root=c)}return this._x0=n,this._y0=r,this._x1=s,this._y1=a,this}function hH(){var e=[];return this.visit(function(t){if(!t.length)do e.push(t.data);while(t=t.next)}),e}function pH(e){return arguments.length?this.cover(+e[0][0],+e[0][1]).cover(+e[1][0],+e[1][1]):isNaN(this._x0)?void 0:[[this._x0,this._y0],[this._x1,this._y1]]}function Qt(e,t,n,r,s){this.node=e,this.x0=t,this.y0=n,this.x1=r,this.y1=s}function gH(e,t,n){var r,s=this._x0,a=this._y0,l,c,u,d,f=this._x1,p=this._y1,g=[],v=this._root,b,w;for(v&&g.push(new Qt(v,s,a,f,p)),n==null?n=1/0:(s=e-n,a=t-n,f=e+n,p=t+n,n*=n);b=g.pop();)if(!(!(v=b.node)||(l=b.x0)>f||(c=b.y0)>p||(u=b.x1)<s||(d=b.y1)<a))if(v.length){var _=(l+u)/2,C=(c+d)/2;g.push(new Qt(v[3],_,C,u,d),new Qt(v[2],l,C,_,d),new Qt(v[1],_,c,u,C),new Qt(v[0],l,c,_,C)),(w=(t>=C)<<1|e>=_)&&(b=g[g.length-1],g[g.length-1]=g[g.length-1-w],g[g.length-1-w]=b)}else{var k=e-+this._x.call(null,v.data),S=t-+this._y.call(null,v.data),E=k*k+S*S;if(E<n){var N=Math.sqrt(n=E);s=e-N,a=t-N,f=e+N,p=t+N,r=v.data}}return r}function mH(e){if(isNaN(f=+this._x.call(null,e))||isNaN(p=+this._y.call(null,e)))return this;var t,n=this._root,r,s,a,l=this._x0,c=this._y0,u=this._x1,d=this._y1,f,p,g,v,b,w,_,C;if(!n)return this;if(n.length)for(;;){if((b=f>=(g=(l+u)/2))?l=g:u=g,(w=p>=(v=(c+d)/2))?c=v:d=v,t=n,!(n=n[_=w<<1|b]))return this;if(!n.length)break;(t[_+1&3]||t[_+2&3]||t[_+3&3])&&(r=t,C=_)}for(;n.data!==e;)if(s=n,!(n=n.next))return this;return(a=n.next)&&delete n.next,s?(a?s.next=a:delete s.next,this):t?(a?t[_]=a:delete t[_],(n=t[0]||t[1]||t[2]||t[3])&&n===(t[3]||t[2]||t[1]||t[0])&&!n.length&&(r?r[C]=n:this._root=n),this):(this._root=a,this)}function vH(e){for(var t=0,n=e.length;t<n;++t)this.remove(e[t]);return this}function yH(){return this._root}function bH(){var e=0;return this.visit(function(t){if(!t.length)do++e;while(t=t.next)}),e}function wH(e){var t=[],n,r=this._root,s,a,l,c,u;for(r&&t.push(new Qt(r,this._x0,this._y0,this._x1,this._y1));n=t.pop();)if(!e(r=n.node,a=n.x0,l=n.y0,c=n.x1,u=n.y1)&&r.length){var d=(a+c)/2,f=(l+u)/2;(s=r[3])&&t.push(new Qt(s,d,f,c,u)),(s=r[2])&&t.push(new Qt(s,a,f,d,u)),(s=r[1])&&t.push(new Qt(s,d,l,c,f)),(s=r[0])&&t.push(new Qt(s,a,l,d,f))}return this}function _H(e){var t=[],n=[],r;for(this._root&&t.push(new Qt(this._root,this._x0,this._y0,this._x1,this._y1));r=t.pop();){var s=r.node;if(s.length){var a,l=r.x0,c=r.y0,u=r.x1,d=r.y1,f=(l+u)/2,p=(c+d)/2;(a=s[0])&&t.push(new Qt(a,l,c,f,p)),(a=s[1])&&t.push(new Qt(a,f,c,u,p)),(a=s[2])&&t.push(new Qt(a,l,p,f,d)),(a=s[3])&&t.push(new Qt(a,f,p,u,d))}n.push(r)}for(;r=n.pop();)e(r.node,r.x0,r.y0,r.x1,r.y1);return this}function CH(e){return e[0]}function SH(e){return arguments.length?(this._x=e,this):this._x}function EH(e){return e[1]}function xH(e){return arguments.length?(this._y=e,this):this._y}function Mp(e,t,n){var r=new Fp(t==null?CH:t,n==null?EH:n,NaN,NaN,NaN,NaN);return e==null?r:r.addAll(e)}function Fp(e,t,n,r,s,a){this._x=e,this._y=t,this._x0=n,this._y0=r,this._x1=s,this._y1=a,this._root=void 0}function w_(e){for(var t={data:e.data},n=t;e=e.next;)n=n.next={data:e.data};return t}var Zt=Mp.prototype=Fp.prototype;Zt.copy=function(){var e=new Fp(this._x,this._y,this._x0,this._y0,this._x1,this._y1),t=this._root,n,r;if(!t)return e;if(!t.length)return e._root=w_(t),e;for(n=[{source:t,target:e._root=new Array(4)}];t=n.pop();)for(var s=0;s<4;++s)(r=t.source[s])&&(r.length?n.push({source:r,target:t.target[s]=new Array(4)}):t.target[s]=w_(r));return e},Zt.add=dH,Zt.addAll=uH,Zt.cover=fH,Zt.data=hH,Zt.extent=pH,Zt.find=gH,Zt.remove=mH,Zt.removeAll=vH,Zt.root=yH,Zt.size=bH,Zt.visit=wH,Zt.visitAfter=_H,Zt.x=SH,Zt.y=xH;function Vt(e){return function(){return e}}function Oi(e){return(e()-.5)*1e-6}function kH(e){return e.x+e.vx}function NH(e){return e.y+e.vy}function TH(e){var t,n,r,s=1,a=1;typeof e!="function"&&(e=Vt(e==null?1:+e));function l(){for(var d,f=t.length,p,g,v,b,w,_,C=0;C<a;++C)for(p=Mp(t,kH,NH).visitAfter(c),d=0;d<f;++d)g=t[d],w=n[g.index],_=w*w,v=g.x+g.vx,b=g.y+g.vy,p.visit(k);function k(S,E,N,A,I){var O=S.data,F=S.r,P=w+F;if(O){if(O.index>g.index){var M=v-O.x-O.vx,W=b-O.y-O.vy,U=M*M+W*W;U<P*P&&(M===0&&(M=Oi(r),U+=M*M),W===0&&(W=Oi(r),U+=W*W),U=(P-(U=Math.sqrt(U)))/U*s,g.vx+=(M*=U)*(P=(F*=F)/(_+F)),g.vy+=(W*=U)*P,O.vx-=M*(P=1-P),O.vy-=W*P)}return}return E>v+P||A<v-P||N>b+P||I<b-P}}function c(d){if(d.data)return d.r=n[d.data.index];for(var f=d.r=0;f<4;++f)d[f]&&d[f].r>d.r&&(d.r=d[f].r)}function u(){if(t){var d,f=t.length,p;for(n=new Array(f),d=0;d<f;++d)p=t[d],n[p.index]=+e(p,d,t)}}return l.initialize=function(d,f){t=d,r=f,u()},l.iterations=function(d){return arguments.length?(a=+d,l):a},l.strength=function(d){return arguments.length?(s=+d,l):s},l.radius=function(d){return arguments.length?(e=typeof d=="function"?d:Vt(+d),u(),l):e},l}function AH(e){return e.index}function __(e,t){var n=e.get(t);if(!n)throw new Error("node not found: "+t);return n}function OH(e){var t=AH,n=p,r,s=Vt(30),a,l,c,u,d,f=1;e==null&&(e=[]);function p(_){return 1/Math.min(c[_.source.index],c[_.target.index])}function g(_){for(var C=0,k=e.length;C<f;++C)for(var S=0,E,N,A,I,O,F,P;S<k;++S)E=e[S],N=E.source,A=E.target,I=A.x+A.vx-N.x-N.vx||Oi(d),O=A.y+A.vy-N.y-N.vy||Oi(d),F=Math.sqrt(I*I+O*O),F=(F-a[S])/F*_*r[S],I*=F,O*=F,A.vx-=I*(P=u[S]),A.vy-=O*P,N.vx+=I*(P=1-P),N.vy+=O*P}function v(){if(l){var _,C=l.length,k=e.length,S=new Map(l.map((N,A)=>[t(N,A,l),N])),E;for(_=0,c=new Array(C);_<k;++_)E=e[_],E.index=_,typeof E.source!="object"&&(E.source=__(S,E.source)),typeof E.target!="object"&&(E.target=__(S,E.target)),c[E.source.index]=(c[E.source.index]||0)+1,c[E.target.index]=(c[E.target.index]||0)+1;for(_=0,u=new Array(k);_<k;++_)E=e[_],u[_]=c[E.source.index]/(c[E.source.index]+c[E.target.index]);r=new Array(k),b(),a=new Array(k),w()}}function b(){if(l)for(var _=0,C=e.length;_<C;++_)r[_]=+n(e[_],_,e)}function w(){if(l)for(var _=0,C=e.length;_<C;++_)a[_]=+s(e[_],_,e)}return g.initialize=function(_,C){l=_,d=C,v()},g.links=function(_){return arguments.length?(e=_,v(),g):e},g.id=function(_){return arguments.length?(t=_,g):t},g.iterations=function(_){return arguments.length?(f=+_,g):f},g.strength=function(_){return arguments.length?(n=typeof _=="function"?_:Vt(+_),b(),g):n},g.distance=function(_){return arguments.length?(s=typeof _=="function"?_:Vt(+_),w(),g):s},g}var IH={value:()=>{}};function C_(){for(var e=0,t=arguments.length,n={},r;e<t;++e){if(!(r=arguments[e]+"")||r in n||/[\s.]/.test(r))throw new Error("illegal type: "+r);n[r]=[]}return new id(n)}function id(e){this._=e}function BH(e,t){return e.trim().split(/^|\s+/).map(function(n){var r="",s=n.indexOf(".");if(s>=0&&(r=n.slice(s+1),n=n.slice(0,s)),n&&!t.hasOwnProperty(n))throw new Error("unknown type: "+n);return{type:n,name:r}})}id.prototype=C_.prototype={constructor:id,on:function(e,t){var n=this._,r=BH(e+"",n),s,a=-1,l=r.length;if(arguments.length<2){for(;++a<l;)if((s=(e=r[a]).type)&&(s=LH(n[s],e.name)))return s;return}if(t!=null&&typeof t!="function")throw new Error("invalid callback: "+t);for(;++a<l;)if(s=(e=r[a]).type)n[s]=S_(n[s],e.name,t);else if(t==null)for(s in n)n[s]=S_(n[s],e.name,null);return this},copy:function(){var e={},t=this._;for(var n in t)e[n]=t[n].slice();return new id(e)},call:function(e,t){if((s=arguments.length-2)>0)for(var n=new Array(s),r=0,s,a;r<s;++r)n[r]=arguments[r+2];if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e);for(a=this._[e],r=0,s=a.length;r<s;++r)a[r].value.apply(t,n)},apply:function(e,t,n){if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e);for(var r=this._[e],s=0,a=r.length;s<a;++s)r[s].value.apply(t,n)}};function LH(e,t){for(var n=0,r=e.length,s;n<r;++n)if((s=e[n]).name===t)return s.value}function S_(e,t,n){for(var r=0,s=e.length;r<s;++r)if(e[r].name===t){e[r]=IH,e=e.slice(0,r).concat(e.slice(r+1));break}return n!=null&&e.push({name:t,value:n}),e}var cs=0,$a=0,za=0,E_=1e3,od,Ua,sd=0,go=0,ad=0,ja=typeof performance=="object"&&performance.now?performance:Date,x_=typeof window=="object"&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(e){setTimeout(e,17)};function k_(){return go||(x_(RH),go=ja.now()+ad)}function RH(){go=0}function $p(){this._call=this._time=this._next=null}$p.prototype=N_.prototype={constructor:$p,restart:function(e,t,n){if(typeof e!="function")throw new TypeError("callback is not a function");n=(n==null?k_():+n)+(t==null?0:+t),!this._next&&Ua!==this&&(Ua?Ua._next=this:od=this,Ua=this),this._call=e,this._time=n,zp()},stop:function(){this._call&&(this._call=null,this._time=1/0,zp())}};function N_(e,t,n){var r=new $p;return r.restart(e,t,n),r}function PH(){k_(),++cs;for(var e=od,t;e;)(t=go-e._time)>=0&&e._call.call(void 0,t),e=e._next;--cs}function T_(){go=(sd=ja.now())+ad,cs=$a=0;try{PH()}finally{cs=0,MH(),go=0}}function DH(){var e=ja.now(),t=e-sd;t>E_&&(ad-=t,sd=e)}function MH(){for(var e,t=od,n,r=1/0;t;)t._call?(r>t._time&&(r=t._time),e=t,t=t._next):(n=t._next,t._next=null,t=e?e._next=n:od=n);Ua=e,zp(r)}function zp(e){if(!cs){$a&&($a=clearTimeout($a));var t=e-go;t>24?(e<1/0&&($a=setTimeout(T_,e-ja.now()-ad)),za&&(za=clearInterval(za))):(za||(sd=ja.now(),za=setInterval(DH,E_)),cs=1,x_(T_))}}const FH=1664525,$H=1013904223,A_=4294967296;function zH(){let e=1;return()=>(e=(FH*e+$H)%A_)/A_}function UH(e){return e.x}function jH(e){return e.y}var qH=10,HH=Math.PI*(3-Math.sqrt(5));function GH(e){var t,n=1,r=.001,s=1-Math.pow(r,1/300),a=0,l=.6,c=new Map,u=N_(p),d=C_("tick","end"),f=zH();e==null&&(e=[]);function p(){g(),d.call("tick",t),n<r&&(u.stop(),d.call("end",t))}function g(w){var _,C=e.length,k;w===void 0&&(w=1);for(var S=0;S<w;++S)for(n+=(a-n)*s,c.forEach(function(E){E(n)}),_=0;_<C;++_)k=e[_],k.fx==null?(isNaN(k.vx)&&(k.vx=0),k.x+=k.vx*=l):(k.x=k.fx,k.vx=0),k.fy==null?(isNaN(k.vy)&&(k.vy=0),k.y+=k.vy*=l):(k.y=k.fy,k.vy=0);return t}function v(){for(var w=0,_=e.length,C;w<_;++w){if(C=e[w],C.index=w,C.fx!=null&&(C.x=C.fx),C.fy!=null&&(C.y=C.fy),isNaN(C.x)||isNaN(C.y)){var k=qH*Math.sqrt(.5+w),S=w*HH;C.x=k*Math.cos(S),C.y=k*Math.sin(S)}(isNaN(C.vx)||isNaN(C.vy))&&(C.vx=C.vy=0)}}function b(w){return w.initialize&&w.initialize(e,f),w}return v(),t={tick:g,restart:function(){return u.restart(p),t},stop:function(){return u.stop(),t},nodes:function(w){return arguments.length?(e=w,v(),c.forEach(b),t):e},alpha:function(w){return arguments.length?(n=+w,t):n},alphaMin:function(w){return arguments.length?(r=+w,t):r},alphaDecay:function(w){return arguments.length?(s=+w,t):+s},alphaTarget:function(w){return arguments.length?(a=+w,t):a},velocityDecay:function(w){return arguments.length?(l=1-w,t):1-l},randomSource:function(w){return arguments.length?(f=w,c.forEach(b),t):f},force:function(w,_){return arguments.length>1?(_==null?c.delete(w):c.set(w,b(_)),t):c.get(w)},find:function(w,_,C){var k=0,S=e.length,E,N,A,I,O;for(C==null?C=1/0:C*=C,k=0;k<S;++k)I=e[k],E=w-I.x,N=_-I.y,A=E*E+N*N,A<C&&(O=I,C=A);return O},on:function(w,_){return arguments.length>1?(d.on(w,_),t):d.on(w)}}}function WH(){var e,t,n,r,s=Vt(-30),a,l=1,c=1/0,u=.81;function d(v){var b,w=e.length,_=Mp(e,UH,jH).visitAfter(p);for(r=v,b=0;b<w;++b)t=e[b],_.visit(g)}function f(){if(e){var v,b=e.length,w;for(a=new Array(b),v=0;v<b;++v)w=e[v],a[w.index]=+s(w,v,e)}}function p(v){var b=0,w,_,C=0,k,S,E;if(v.length){for(k=S=E=0;E<4;++E)(w=v[E])&&(_=Math.abs(w.value))&&(b+=w.value,C+=_,k+=_*w.x,S+=_*w.y);v.x=k/C,v.y=S/C}else{w=v,w.x=w.data.x,w.y=w.data.y;do b+=a[w.data.index];while(w=w.next)}v.value=b}function g(v,b,w,_){if(!v.value)return!0;var C=v.x-t.x,k=v.y-t.y,S=_-b,E=C*C+k*k;if(S*S/u<E)return E<c&&(C===0&&(C=Oi(n),E+=C*C),k===0&&(k=Oi(n),E+=k*k),E<l&&(E=Math.sqrt(l*E)),t.vx+=C*v.value*r/E,t.vy+=k*v.value*r/E),!0;if(v.length||E>=c)return;(v.data!==t||v.next)&&(C===0&&(C=Oi(n),E+=C*C),k===0&&(k=Oi(n),E+=k*k),E<l&&(E=Math.sqrt(l*E)));do v.data!==t&&(S=a[v.data.index]*r/E,t.vx+=C*S,t.vy+=k*S);while(v=v.next)}return d.initialize=function(v,b){e=v,n=b,f()},d.strength=function(v){return arguments.length?(s=typeof v=="function"?v:Vt(+v),f(),d):s},d.distanceMin=function(v){return arguments.length?(l=v*v,d):Math.sqrt(l)},d.distanceMax=function(v){return arguments.length?(c=v*v,d):Math.sqrt(c)},d.theta=function(v){return arguments.length?(u=v*v,d):Math.sqrt(u)},d}function KH(e){var t=Vt(.1),n,r,s;typeof e!="function"&&(e=Vt(e==null?0:+e));function a(c){n.length!==s.length&&l();for(var u=0,d=n.length,f;u<d;++u)f=n[u],f.vx,f.vx+=(s[u]-f.x)*r[u]*c}function l(){if(n){var c,u=n.length;for(r=new Array(u),s=new Array(u),c=0;c<u;++c)r[c]=isNaN(s[c]=+e(n[c],c,n))?0:+t(n[c],c,n)}}return a.initialize=function(c){n=c,l()},a.strength=function(c){return arguments.length?(t=typeof c=="function"?c:Vt(+c),l(),a):t},a.x=function(c){return arguments.length?(e=typeof c=="function"?c:Vt(+c),l(),a):e},a}function YH(e){var t=Vt(.1),n,r,s;typeof e!="function"&&(e=Vt(e==null?0:+e));function a(c){n.length!==s.length&&l();for(var u=0,d=n.length,f;u<d;++u)f=n[u],f.vy+=(s[u]-f.y)*r[u]*c}function l(){if(n){var c,u=n.length;for(r=new Array(u),s=new Array(u),c=0;c<u;++c)r[c]=isNaN(s[c]=+e(n[c],c,n))?0:+t(n[c],c,n)}}return a.initialize=function(c){n=c,l()},a.strength=function(c){return arguments.length?(t=typeof c=="function"?c:Vt(+c),l(),a):t},a.y=function(c){return arguments.length?(e=typeof c=="function"?c:Vt(+c),l(),a):e},a}const Ase="";function JH(e,t,n){return t=dd(t),P_(e,O_()?Reflect.construct(t,n||[],dd(e).constructor):t.apply(e,n))}function O_(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(O_=function(){return!!e})()}function I_(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(s){return Object.getOwnPropertyDescriptor(e,s).enumerable})),n.push.apply(n,r)}return n}function qa(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?I_(Object(n),!0).forEach(function(r){oi(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):I_(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function or(){or=function(){return t};var e,t={},n=Object.prototype,r=n.hasOwnProperty,s=Object.defineProperty||function(D,j,K){D[j]=K.value},a=typeof Symbol=="function"?Symbol:{},l=a.iterator||"@@iterator",c=a.asyncIterator||"@@asyncIterator",u=a.toStringTag||"@@toStringTag";function d(D,j,K){return Object.defineProperty(D,j,{value:K,enumerable:!0,configurable:!0,writable:!0}),D[j]}try{d({},"")}catch(D){d=function(j,K,H){return j[K]=H}}function f(D,j,K,H){var R=j&&j.prototype instanceof C?j:C,ie=Object.create(R.prototype),ee=new Q(H||[]);return s(ie,"_invoke",{value:P(D,K,ee)}),ie}function p(D,j,K){try{return{type:"normal",arg:D.call(j,K)}}catch(H){return{type:"throw",arg:H}}}t.wrap=f;var g="suspendedStart",v="suspendedYield",b="executing",w="completed",_={};function C(){}function k(){}function S(){}var E={};d(E,l,function(){return this});var N=Object.getPrototypeOf,A=N&&N(N(q([])));A&&A!==n&&r.call(A,l)&&(E=A);var I=S.prototype=C.prototype=Object.create(E);function O(D){["next","throw","return"].forEach(function(j){d(D,j,function(K){return this._invoke(j,K)})})}function F(D,j){function K(R,ie,ee,Y){var J=p(D[R],D,ie);if(J.type!=="throw"){var oe=J.arg,re=oe.value;return re&&typeof re=="object"&&r.call(re,"__await")?j.resolve(re.__await).then(function(z){K("next",z,ee,Y)},function(z){K("throw",z,ee,Y)}):j.resolve(re).then(function(z){oe.value=z,ee(oe)},function(z){return K("throw",z,ee,Y)})}Y(J.arg)}var H;s(this,"_invoke",{value:function(R,ie){function ee(){return new j(function(Y,J){K(R,ie,Y,J)})}return H=H?H.then(ee,ee):ee()}})}function P(D,j,K){var H=g;return function(R,ie){if(H===b)throw new Error("Generator is already running");if(H===w){if(R==="throw")throw ie;return{value:e,done:!0}}for(K.method=R,K.arg=ie;;){var ee=K.delegate;if(ee){var Y=M(ee,K);if(Y){if(Y===_)continue;return Y}}if(K.method==="next")K.sent=K._sent=K.arg;else if(K.method==="throw"){if(H===g)throw H=w,K.arg;K.dispatchException(K.arg)}else K.method==="return"&&K.abrupt("return",K.arg);H=b;var J=p(D,j,K);if(J.type==="normal"){if(H=K.done?w:v,J.arg===_)continue;return{value:J.arg,done:K.done}}J.type==="throw"&&(H=w,K.method="throw",K.arg=J.arg)}}}function M(D,j){var K=j.method,H=D.iterator[K];if(H===e)return j.delegate=null,K==="throw"&&D.iterator.return&&(j.method="return",j.arg=e,M(D,j),j.method==="throw")||K!=="return"&&(j.method="throw",j.arg=new TypeError("The iterator does not provide a '"+K+"' method")),_;var R=p(H,D.iterator,j.arg);if(R.type==="throw")return j.method="throw",j.arg=R.arg,j.delegate=null,_;var ie=R.arg;return ie?ie.done?(j[D.resultName]=ie.value,j.next=D.nextLoc,j.method!=="return"&&(j.method="next",j.arg=e),j.delegate=null,_):ie:(j.method="throw",j.arg=new TypeError("iterator result is not an object"),j.delegate=null,_)}function W(D){var j={tryLoc:D[0]};1 in D&&(j.catchLoc=D[1]),2 in D&&(j.finallyLoc=D[2],j.afterLoc=D[3]),this.tryEntries.push(j)}function U(D){var j=D.completion||{};j.type="normal",delete j.arg,D.completion=j}function Q(D){this.tryEntries=[{tryLoc:"root"}],D.forEach(W,this),this.reset(!0)}function q(D){if(D||D===""){var j=D[l];if(j)return j.call(D);if(typeof D.next=="function")return D;if(!isNaN(D.length)){var K=-1,H=function R(){for(;++K<D.length;)if(r.call(D,K))return R.value=D[K],R.done=!1,R;return R.value=e,R.done=!0,R};return H.next=H}}throw new TypeError(typeof D+" is not iterable")}return k.prototype=S,s(I,"constructor",{value:S,configurable:!0}),s(S,"constructor",{value:k,configurable:!0}),k.displayName=d(S,u,"GeneratorFunction"),t.isGeneratorFunction=function(D){var j=typeof D=="function"&&D.constructor;return!!j&&(j===k||(j.displayName||j.name)==="GeneratorFunction")},t.mark=function(D){return Object.setPrototypeOf?Object.setPrototypeOf(D,S):(D.__proto__=S,d(D,u,"GeneratorFunction")),D.prototype=Object.create(I),D},t.awrap=function(D){return{__await:D}},O(F.prototype),d(F.prototype,c,function(){return this}),t.AsyncIterator=F,t.async=function(D,j,K,H,R){R===void 0&&(R=Promise);var ie=new F(f(D,j,K,H),R);return t.isGeneratorFunction(j)?ie:ie.next().then(function(ee){return ee.done?ee.value:ie.next()})},O(I),d(I,u,"Generator"),d(I,l,function(){return this}),d(I,"toString",function(){return"[object Generator]"}),t.keys=function(D){var j=Object(D),K=[];for(var H in j)K.push(H);return K.reverse(),function R(){for(;K.length;){var ie=K.pop();if(ie in j)return R.value=ie,R.done=!1,R}return R.done=!0,R}},t.values=q,Q.prototype={constructor:Q,reset:function(D){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(U),!D)for(var j in this)j.charAt(0)==="t"&&r.call(this,j)&&!isNaN(+j.slice(1))&&(this[j]=e)},stop:function(){this.done=!0;var D=this.tryEntries[0].completion;if(D.type==="throw")throw D.arg;return this.rval},dispatchException:function(D){if(this.done)throw D;var j=this;function K(J,oe){return ie.type="throw",ie.arg=D,j.next=J,oe&&(j.method="next",j.arg=e),!!oe}for(var H=this.tryEntries.length-1;H>=0;--H){var R=this.tryEntries[H],ie=R.completion;if(R.tryLoc==="root")return K("end");if(R.tryLoc<=this.prev){var ee=r.call(R,"catchLoc"),Y=r.call(R,"finallyLoc");if(ee&&Y){if(this.prev<R.catchLoc)return K(R.catchLoc,!0);if(this.prev<R.finallyLoc)return K(R.finallyLoc)}else if(ee){if(this.prev<R.catchLoc)return K(R.catchLoc,!0)}else{if(!Y)throw new Error("try statement without catch or finally");if(this.prev<R.finallyLoc)return K(R.finallyLoc)}}}},abrupt:function(D,j){for(var K=this.tryEntries.length-1;K>=0;--K){var H=this.tryEntries[K];if(H.tryLoc<=this.prev&&r.call(H,"finallyLoc")&&this.prev<H.finallyLoc){var R=H;break}}R&&(D==="break"||D==="continue")&&R.tryLoc<=j&&j<=R.finallyLoc&&(R=null);var ie=R?R.completion:{};return ie.type=D,ie.arg=j,R?(this.method="next",this.next=R.finallyLoc,_):this.complete(ie)},complete:function(D,j){if(D.type==="throw")throw D.arg;return D.type==="break"||D.type==="continue"?this.next=D.arg:D.type==="return"?(this.rval=this.arg=D.arg,this.method="return",this.next="end"):D.type==="normal"&&j&&(this.next=j),_},finish:function(D){for(var j=this.tryEntries.length-1;j>=0;--j){var K=this.tryEntries[j];if(K.finallyLoc===D)return this.complete(K.completion,K.afterLoc),U(K),_}},catch:function(D){for(var j=this.tryEntries.length-1;j>=0;--j){var K=this.tryEntries[j];if(K.tryLoc===D){var H=K.completion;if(H.type==="throw"){var R=H.arg;U(K)}return R}}throw new Error("illegal catch attempt")},delegateYield:function(D,j,K){return this.delegate={iterator:q(D),resultName:j,nextLoc:K},this.method==="next"&&(this.arg=e),_}},t}function B_(e){var t=function(n,r){if(typeof n!="object"||!n)return n;var s=n[Symbol.toPrimitive];if(s!==void 0){var a=s.call(n,r||"default");if(typeof a!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return(r==="string"?String:Number)(n)}(e,"string");return typeof t=="symbol"?t:String(t)}function L_(e,t,n,r,s,a,l){try{var c=e[a](l),u=c.value}catch(d){return void n(d)}c.done?t(u):Promise.resolve(u).then(r,s)}function Ha(e){return function(){var t=this,n=arguments;return new Promise(function(r,s){var a=e.apply(t,n);function l(u){L_(a,r,s,l,c,"next",u)}function c(u){L_(a,r,s,l,c,"throw",u)}l(void 0)})}}function ld(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function R_(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,B_(r.key),r)}}function cd(e,t,n){return t&&R_(e.prototype,t),n&&R_(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function oi(e,t,n){return(t=B_(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function dd(e){return dd=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},dd(e)}function Up(e,t){return Up=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,r){return n.__proto__=r,n},Up(e,t)}function Ga(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function P_(e,t){if(t&&(typeof t=="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Ga(e)}function XH(e,t){return function(n){if(Array.isArray(n))return n}(e)||function(n,r){var s=n==null?null:typeof Symbol!="undefined"&&n[Symbol.iterator]||n["@@iterator"];if(s!=null){var a,l,c,u,d=[],f=!0,p=!1;try{if(c=(s=s.call(n)).next,r===0){if(Object(s)!==s)return;f=!1}else for(;!(f=(a=c.call(s)).done)&&(d.push(a.value),d.length!==r);f=!0);}catch(g){p=!0,l=g}finally{try{if(!f&&s.return!=null&&(u=s.return(),Object(u)!==u))return}finally{if(p)throw l}}return d}}(e,t)||D_(e,t)||function(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
134
134
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}()}function D_(e,t){if(e){if(typeof e=="string")return M_(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set"?Array.from(e):n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?M_(e,t):void 0}}function M_(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 jp(e,t){var n=typeof Symbol!="undefined"&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=D_(e))||t&&e&&typeof e.length=="number"){n&&(e=n);var r=0,s=function(){};return{s,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(u){throw u},f:s}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
|
|
135
135
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var a,l=!0,c=!1;return{s:function(){n=n.call(e)},n:function(){var u=n.next();return l=u.done,u},e:function(u){c=!0,a=u},f:function(){try{l||n.return==null||n.return()}finally{if(c)throw a}}}}function ud(e,t,n){return $_(e,t),z_(n,"get"),function(r,s){return s.get?s.get.call(r):s.value}(e,n)}function F_(e,t,n,r){return $_(e,t),z_(n,"set"),function(s,a,l){if(a.set)a.set.call(s,l);else{if(!a.writable)throw new TypeError("attempted to set read only private field");a.value=l}}(e,n,r),r}function $_(e,t){if(e!==t)throw new TypeError("Private static access of wrong provenance")}function z_(e,t){if(e===void 0)throw new TypeError("attempted to "+t+" private static field before its declaration")}function QH(e){var t=function(n,r){if(typeof n!="object"||!n)return n;var s=n[Symbol.toPrimitive];if(s!==void 0){var a=s.call(n,"string");if(typeof a!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(n)}(e);return typeof t=="symbol"?t:String(t)}function ZH(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,QH(r.key),r)}}function VH(e,t){return function(n){if(Array.isArray(n))return n}(e)||function(n,r){var s=n==null?null:typeof Symbol!="undefined"&&n[Symbol.iterator]||n["@@iterator"];if(s!=null){var a,l,c,u,d=[],f=!0,p=!1;try{if(c=(s=s.call(n)).next,r===0){if(Object(s)!==s)return;f=!1}else for(;!(f=(a=c.call(s)).done)&&(d.push(a.value),d.length!==r);f=!0);}catch(g){p=!0,l=g}finally{try{if(!f&&s.return!=null&&(u=s.return(),Object(u)!==u))return}finally{if(p)throw l}}return d}}(e,t)||function(n,r){if(n){if(typeof n=="string")return U_(n,r);var s=Object.prototype.toString.call(n).slice(8,-1);return s==="Object"&&n.constructor&&(s=n.constructor.name),s==="Map"||s==="Set"?Array.from(n):s==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(s)?U_(n,r):void 0}}(e,t)||function(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
136
136
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}()}function U_(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var Wa=typeof globalThis!="undefined"?globalThis:typeof window!="undefined"?window:typeof global!="undefined"?global:typeof self!="undefined"?self:{},ht=function(e){try{return!!e()}catch(t){return!0}},Ft=!ht(function(){return Object.defineProperty({},1,{get:function(){return 7}})[1]!==7}),fd=!ht(function(){var e=function(){}.bind();return typeof e!="function"||e.hasOwnProperty("prototype")}),j_=fd,q_=Function.prototype,qp=q_.call,eG=j_&&q_.bind.bind(qp,qp),dt=j_?eG:function(e){return function(){return qp.apply(e,arguments)}},Ka=function(e){return e==null},tG=Ka,nG=TypeError,hd=function(e){if(tG(e))throw new nG("Can't call method on "+e);return e},rG=hd,iG=Object,mo=function(e){return iG(rG(e))},oG=mo,sG=dt({}.hasOwnProperty),bn=Object.hasOwn||function(e,t){return sG(oG(e),t)},Hp=Ft,aG=bn,H_=Function.prototype,lG=Hp&&Object.getOwnPropertyDescriptor,Gp=aG(H_,"name"),Ya={EXISTS:Gp,PROPER:Gp&&function(){}.name==="something",CONFIGURABLE:Gp&&(!Hp||Hp&&lG(H_,"name").configurable)},G_={exports:{}},Wp=typeof document=="object"&&document.all,yt=Wp===void 0&&Wp!==void 0?function(e){return typeof e=="function"||e===Wp}:function(e){return typeof e=="function"},Ja=function(e){return e&&e.Math===Math&&e},pt=Ja(typeof globalThis=="object"&&globalThis)||Ja(typeof window=="object"&&window)||Ja(typeof self=="object"&&self)||Ja(typeof Wa=="object"&&Wa)||Ja(typeof Wa=="object"&&Wa)||function(){return this}()||Function("return this")(),W_=pt,cG=Object.defineProperty,Kp=function(e,t){try{cG(W_,e,{value:t,configurable:!0,writable:!0})}catch(n){W_[e]=t}return t},dG=Kp,K_="__core-js_shared__",Yp=pt[K_]||dG(K_,{}),uG=yt,Jp=Yp,fG=dt(Function.toString);uG(Jp.inspectSource)||(Jp.inspectSource=function(e){return fG(e)});var Ii,pd,Xp=Jp.inspectSource,hG=yt,Y_=pt.WeakMap,pG=hG(Y_)&&/native code/.test(String(Y_)),gG=yt,Dn=function(e){return typeof e=="object"?e!==null:gG(e)},Ir={},J_=Dn,Qp=pt.document,mG=J_(Qp)&&J_(Qp.createElement),gd=function(e){return mG?Qp.createElement(e):{}},vG=gd,X_=!Ft&&!ht(function(){return Object.defineProperty(vG("div"),"a",{get:function(){return 7}}).a!==7}),Q_=Ft&&ht(function(){return Object.defineProperty(function(){},"prototype",{value:42,writable:!1}).prototype!==42}),yG=Dn,bG=String,wG=TypeError,Gt=function(e){if(yG(e))return e;throw new wG(bG(e)+" is not an object")},_G=fd,md=Function.prototype.call,$t=_G?md.bind(md):function(){return md.apply(md,arguments)},Zp=pt,CG=yt,vo=function(e,t){return arguments.length<2?(n=Zp[e],CG(n)?n:void 0):Zp[e]&&Zp[e][t];var n},vd=dt({}.isPrototypeOf),yd=typeof navigator!="undefined"&&String(navigator.userAgent)||"",Z_=pt,Vp=yd,V_=Z_.process,e3=Z_.Deno,t3=V_&&V_.versions||e3&&e3.version,n3=t3&&t3.v8;n3&&(pd=(Ii=n3.split("."))[0]>0&&Ii[0]<4?1:+(Ii[0]+Ii[1])),!pd&&Vp&&(!(Ii=Vp.match(/Edge\/(\d+)/))||Ii[1]>=74)&&(Ii=Vp.match(/Chrome\/(\d+)/))&&(pd=+Ii[1]);var bd=pd,r3=bd,SG=ht,EG=pt.String,i3=!!Object.getOwnPropertySymbols&&!SG(function(){var e=Symbol("symbol detection");return!EG(e)||!(Object(e)instanceof Symbol)||!Symbol.sham&&r3&&r3<41}),o3=i3&&!Symbol.sham&&typeof Symbol.iterator=="symbol",xG=vo,kG=yt,NG=vd,TG=Object,s3=o3?function(e){return typeof e=="symbol"}:function(e){var t=xG("Symbol");return kG(t)&&NG(t.prototype,TG(e))},AG=String,wd=function(e){try{return AG(e)}catch(t){return"Object"}},OG=yt,IG=wd,BG=TypeError,Bi=function(e){if(OG(e))return e;throw new BG(IG(e)+" is not a function")},LG=Bi,RG=Ka,_d=function(e,t){var n=e[t];return RG(n)?void 0:LG(n)},eg=$t,tg=yt,ng=Dn,PG=TypeError,a3={exports:{}},l3=Yp;(a3.exports=function(e,t){return l3[e]||(l3[e]=t!==void 0?t:{})})("versions",[]).push({version:"3.35.0",mode:"global",copyright:"© 2014-2023 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.35.0/LICENSE",source:"https://github.com/zloirock/core-js"});var rg=a3.exports,DG=dt,MG=0,FG=Math.random(),$G=DG(1 .toString),c3=function(e){return"Symbol("+(e===void 0?"":e)+")_"+$G(++MG+FG,36)},zG=rg,d3=bn,UG=c3,jG=i3,qG=o3,ds=pt.Symbol,ig=zG("wks"),HG=qG?ds.for||ds:ds&&ds.withoutSetter||UG,St=function(e){return d3(ig,e)||(ig[e]=jG&&d3(ds,e)?ds[e]:HG("Symbol."+e)),ig[e]},GG=$t,u3=Dn,f3=s3,WG=_d,KG=TypeError,YG=St("toPrimitive"),JG=function(e,t){if(!u3(e)||f3(e))return e;var n,r=WG(e,YG);if(r){if(t===void 0&&(t="default"),n=GG(r,e,t),!u3(n)||f3(n))return n;throw new KG("Can't convert object to primitive value")}return t===void 0&&(t="number"),function(s,a){var l,c;if(a==="string"&&tg(l=s.toString)&&!ng(c=eg(l,s))||tg(l=s.valueOf)&&!ng(c=eg(l,s))||a!=="string"&&tg(l=s.toString)&&!ng(c=eg(l,s)))return c;throw new PG("Can't convert object to primitive value")}(e,t)},XG=s3,og=function(e){var t=JG(e,"string");return XG(t)?t:t+""},QG=Ft,ZG=X_,VG=Q_,Cd=Gt,h3=og,eW=TypeError,sg=Object.defineProperty,tW=Object.getOwnPropertyDescriptor,ag="enumerable",lg="configurable",cg="writable";Ir.f=QG?VG?function(e,t,n){if(Cd(e),t=h3(t),Cd(n),typeof e=="function"&&t==="prototype"&&"value"in n&&cg in n&&!n[cg]){var r=tW(e,t);r&&r[cg]&&(e[t]=n.value,n={configurable:lg in n?n[lg]:r[lg],enumerable:ag in n?n[ag]:r[ag],writable:!1})}return sg(e,t,n)}:sg:function(e,t,n){if(Cd(e),t=h3(t),Cd(n),ZG)try{return sg(e,t,n)}catch(r){}if("get"in n||"set"in n)throw new eW("Accessors not supported");return"value"in n&&(e[t]=n.value),e};var Sd,Xa,Ed,Qa=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}},nW=Ir,rW=Qa,Za=Ft?function(e,t,n){return nW.f(e,t,rW(1,n))}:function(e,t,n){return e[t]=n,e},iW=c3,p3=rg("keys"),dg=function(e){return p3[e]||(p3[e]=iW(e))},ug={},oW=pG,g3=pt,sW=Dn,aW=Za,fg=bn,hg=Yp,lW=dg,cW=ug,m3="Object already initialized",pg=g3.TypeError,dW=g3.WeakMap;if(oW||hg.state){var Br=hg.state||(hg.state=new dW);Br.get=Br.get,Br.has=Br.has,Br.set=Br.set,Sd=function(e,t){if(Br.has(e))throw new pg(m3);return t.facade=e,Br.set(e,t),t},Xa=function(e){return Br.get(e)||{}},Ed=function(e){return Br.has(e)}}else{var us=lW("state");cW[us]=!0,Sd=function(e,t){if(fg(e,us))throw new pg(m3);return t.facade=e,aW(e,us,t),t},Xa=function(e){return fg(e,us)?e[us]:{}},Ed=function(e){return fg(e,us)}}var Li={set:Sd,get:Xa,has:Ed,enforce:function(e){return Ed(e)?Xa(e):Sd(e,{})},getterFor:function(e){return function(t){var n;if(!sW(t)||(n=Xa(t)).type!==e)throw new pg("Incompatible receiver, "+e+" required");return n}}},gg=dt,uW=ht,fW=yt,xd=bn,mg=Ft,hW=Ya.CONFIGURABLE,pW=Xp,gW=Li.enforce,mW=Li.get,v3=String,kd=Object.defineProperty,vW=gg("".slice),yW=gg("".replace),bW=gg([].join),wW=mg&&!uW(function(){return kd(function(){},"length",{value:8}).length!==8}),_W=String(String).split("String"),CW=G_.exports=function(e,t,n){vW(v3(t),0,7)==="Symbol("&&(t="["+yW(v3(t),/^Symbol\(([^)]*)\)/,"$1")+"]"),n&&n.getter&&(t="get "+t),n&&n.setter&&(t="set "+t),(!xd(e,"name")||hW&&e.name!==t)&&(mg?kd(e,"name",{value:t,configurable:!0}):e.name=t),wW&&n&&xd(n,"arity")&&e.length!==n.arity&&kd(e,"length",{value:n.arity});try{n&&xd(n,"constructor")&&n.constructor?mg&&kd(e,"prototype",{writable:!1}):e.prototype&&(e.prototype=void 0)}catch(s){}var r=gW(e);return xd(r,"source")||(r.source=bW(_W,typeof t=="string"?t:"")),e};Function.prototype.toString=CW(function(){return fW(this)&&mW(this).source||pW(this)},"toString");var y3=G_.exports,b3=y3,SW=Ir,Nd=function(e,t,n){return n.get&&b3(n.get,t,{getter:!0}),n.set&&b3(n.set,t,{setter:!0}),SW.f(e,t,n)},EW=Ft,xW=Ya.EXISTS,w3=dt,kW=Nd,_3=Function.prototype,NW=w3(_3.toString),C3=/function\b(?:\s|\/\*[\S\s]*?\*\/|\/\/[^\n\r]*[\n\r]+)*([^\s(/]*)/,TW=w3(C3.exec);EW&&!xW&&kW(_3,"name",{configurable:!0,get:function(){try{return TW(C3,NW(this))[1]}catch(e){return""}}});var vg={},Td={},S3={}.propertyIsEnumerable,E3=Object.getOwnPropertyDescriptor,AW=E3&&!S3.call({1:2},1);Td.f=AW?function(e){var t=E3(this,e);return!!t&&t.enumerable}:S3;var x3=dt,OW=x3({}.toString),IW=x3("".slice),fs=function(e){return IW(OW(e),8,-1)},BW=ht,LW=fs,yg=Object,RW=dt("".split),bg=BW(function(){return!yg("z").propertyIsEnumerable(0)})?function(e){return LW(e)==="String"?RW(e,""):yg(e)}:yg,PW=bg,DW=hd,hs=function(e){return PW(DW(e))},MW=Ft,FW=$t,$W=Td,zW=Qa,UW=hs,jW=og,qW=bn,HW=X_,k3=Object.getOwnPropertyDescriptor;vg.f=MW?k3:function(e,t){if(e=UW(e),t=jW(t),HW)try{return k3(e,t)}catch(n){}if(qW(e,t))return zW(!FW($W.f,e,t),e[t])};var GW=yt,WW=Ir,KW=y3,YW=Kp,sr=function(e,t,n,r){r||(r={});var s=r.enumerable,a=r.name!==void 0?r.name:t;if(GW(n)&&KW(n,a,r),r.global)s?e[t]=n:YW(t,n);else{try{r.unsafe?e[t]&&(s=!0):delete e[t]}catch(l){}s?e[t]=n:WW.f(e,t,{value:n,enumerable:!1,configurable:!r.nonConfigurable,writable:!r.nonWritable})}return e},N3={},JW=Math.ceil,XW=Math.floor,QW=Math.trunc||function(e){var t=+e;return(t>0?XW:JW)(t)},Ad=function(e){var t=+e;return t!=t||t===0?0:QW(t)},ZW=Ad,VW=Math.max,eK=Math.min,tK=Ad,nK=Math.min,T3=function(e){return e>0?nK(tK(e),9007199254740991):0},rK=T3,Va=function(e){return rK(e.length)},iK=hs,oK=Va,A3=function(e){return function(t,n,r){var s,a=iK(t),l=oK(a),c=function(u,d){var f=ZW(u);return f<0?VW(f+d,0):eK(f,d)}(r,l);if(e&&n!=n){for(;l>c;)if((s=a[c++])!=s)return!0}else for(;l>c;c++)if((e||c in a)&&a[c]===n)return e||c||0;return!e&&-1}},sK={includes:A3(!0),indexOf:A3(!1)},wg=bn,aK=hs,lK=sK.indexOf,cK=ug,O3=dt([].push),I3=function(e,t){var n,r=aK(e),s=0,a=[];for(n in r)!wg(cK,n)&&wg(r,n)&&O3(a,n);for(;t.length>s;)wg(r,n=t[s++])&&(~lK(a,n)||O3(a,n));return a},_g=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],dK=I3,uK=_g.concat("length","prototype");N3.f=Object.getOwnPropertyNames||function(e){return dK(e,uK)};var Cg={};Cg.f=Object.getOwnPropertySymbols;var fK=vo,hK=N3,pK=Cg,gK=Gt,mK=dt([].concat),vK=fK("Reflect","ownKeys")||function(e){var t=hK.f(gK(e)),n=pK.f;return n?mK(t,n(e)):t},B3=bn,yK=vK,bK=vg,wK=Ir,_K=ht,CK=yt,SK=/#|\.prototype\./,el=function(e,t){var n=xK[EK(e)];return n===NK||n!==kK&&(CK(t)?_K(t):!!t)},EK=el.normalize=function(e){return String(e).replace(SK,".").toLowerCase()},xK=el.data={},kK=el.NATIVE="N",NK=el.POLYFILL="P",L3=el,Sg=pt,TK=vg.f,AK=Za,OK=sr,IK=Kp,BK=function(e,t,n){for(var r=yK(t),s=wK.f,a=bK.f,l=0;l<r.length;l++){var c=r[l];B3(e,c)||n&&B3(n,c)||s(e,c,a(t,c))}},LK=L3,wn=function(e,t){var n,r,s,a,l,c=e.target,u=e.global,d=e.stat;if(n=u?Sg:d?Sg[c]||IK(c,{}):(Sg[c]||{}).prototype)for(r in t){if(a=t[r],s=e.dontCallGetSet?(l=TK(n,r))&&l.value:n[r],!LK(u?r:c+(d?".":"#")+r,e.forced)&&s!==void 0){if(typeof a==typeof s)continue;BK(a,s)}(e.sham||s&&s.sham)&&AK(a,"sham",!0),OK(n,r,a,e)}},R3={};R3[St("toStringTag")]="z";var Eg=String(R3)==="[object z]",RK=Eg,PK=yt,Od=fs,DK=St("toStringTag"),MK=Object,FK=Od(function(){return arguments}())==="Arguments",tl=RK?Od:function(e){var t,n,r;return e===void 0?"Undefined":e===null?"Null":typeof(n=function(s,a){try{return s[a]}catch(l){}}(t=MK(e),DK))=="string"?n:FK?Od(t):(r=Od(t))==="Object"&&PK(t.callee)?"Arguments":r},$K=tl,zK=String,yo=function(e){if($K(e)==="Symbol")throw new TypeError("Cannot convert a Symbol value to a string");return zK(e)},UK=Gt,P3=function(){var e=UK(this),t="";return e.hasIndices&&(t+="d"),e.global&&(t+="g"),e.ignoreCase&&(t+="i"),e.multiline&&(t+="m"),e.dotAll&&(t+="s"),e.unicode&&(t+="u"),e.unicodeSets&&(t+="v"),e.sticky&&(t+="y"),t},xg=ht,kg=pt.RegExp,Ng=xg(function(){var e=kg("a","y");return e.lastIndex=2,e.exec("abcd")!==null}),jK=Ng||xg(function(){return!kg("a","y").sticky}),qK={BROKEN_CARET:Ng||xg(function(){var e=kg("^r","gy");return e.lastIndex=2,e.exec("str")!==null}),MISSED_STICKY:jK,UNSUPPORTED_Y:Ng},D3={},HK=I3,GK=_g,Tg=Object.keys||function(e){return HK(e,GK)},WK=Ft,KK=Q_,YK=Ir,JK=Gt,XK=hs,QK=Tg;D3.f=WK&&!KK?Object.defineProperties:function(e,t){JK(e);for(var n,r=XK(t),s=QK(t),a=s.length,l=0;a>l;)YK.f(e,n=s[l++],r[n]);return e};var Id,M3=vo("document","documentElement"),ZK=Gt,VK=D3,F3=_g,eY=ug,tY=M3,nY=gd,Ag="prototype",Og="script",$3=dg("IE_PROTO"),Ig=function(){},z3=function(e){return"<"+Og+">"+e+"</"+Og+">"},U3=function(e){e.write(z3("")),e.close();var t=e.parentWindow.Object;return e=null,t},Bd=function(){try{Id=new ActiveXObject("htmlfile")}catch(s){}var e,t,n;Bd=typeof document!="undefined"?document.domain&&Id?U3(Id):(t=nY("iframe"),n="java"+Og+":",t.style.display="none",tY.appendChild(t),t.src=String(n),(e=t.contentWindow.document).open(),e.write(z3("document.F=Object")),e.close(),e.F):U3(Id);for(var r=F3.length;r--;)delete Bd[Ag][F3[r]];return Bd()};eY[$3]=!0;var j3,Bg,Ld=Object.create||function(e,t){var n;return e!==null?(Ig[Ag]=ZK(e),n=new Ig,Ig[Ag]=null,n[$3]=e):n=Bd(),t===void 0?n:VK.f(n,t)},rY=ht,iY=pt.RegExp,oY=rY(function(){var e=iY(".","s");return!(e.dotAll&&e.test(`
|
|
137
137
|
`)&&e.flags==="s")}),sY=ht,aY=pt.RegExp,lY=sY(function(){var e=aY("(?<a>b)","g");return e.exec("b").groups.a!=="b"||"b".replace(e,"$<a>c")!=="bc"}),ps=$t,Rd=dt,cY=yo,dY=P3,uY=qK,fY=Ld,hY=Li.get,pY=oY,gY=lY,mY=rg("native-string-replace",String.prototype.replace),Pd=RegExp.prototype.exec,Lg=Pd,vY=Rd("".charAt),yY=Rd("".indexOf),bY=Rd("".replace),Rg=Rd("".slice),Pg=(Bg=/b*/g,ps(Pd,j3=/a/,"a"),ps(Pd,Bg,"a"),j3.lastIndex!==0||Bg.lastIndex!==0),q3=uY.BROKEN_CARET,Dg=/()??/.exec("")[1]!==void 0;(Pg||Dg||q3||pY||gY)&&(Lg=function(e){var t,n,r,s,a,l,c,u=this,d=hY(u),f=cY(e),p=d.raw;if(p)return p.lastIndex=u.lastIndex,t=ps(Lg,p,f),u.lastIndex=p.lastIndex,t;var g=d.groups,v=q3&&u.sticky,b=ps(dY,u),w=u.source,_=0,C=f;if(v&&(b=bY(b,"y",""),yY(b,"g")===-1&&(b+="g"),C=Rg(f,u.lastIndex),u.lastIndex>0&&(!u.multiline||u.multiline&&vY(f,u.lastIndex-1)!==`
|
|
138
138
|
`)&&(w="(?: "+w+")",C=" "+C,_++),n=new RegExp("^(?:"+w+")",b)),Dg&&(n=new RegExp("^"+w+"$(?!\\s)",b)),Pg&&(r=u.lastIndex),s=ps(Pd,v?n:u,C),v?s?(s.input=Rg(s.input,_),s[0]=Rg(s[0],_),s.index=u.lastIndex,u.lastIndex+=s[0].length):u.lastIndex=0:Pg&&s&&(u.lastIndex=u.global?s.index+s[0].length:r),Dg&&s&&s.length>1&&ps(mY,s[0],n,function(){for(a=1;a<arguments.length-2;a++)arguments[a]===void 0&&(s[a]=void 0)}),s&&g)for(s.groups=l=fY(null),a=0;a<g.length;a++)l[(c=g[a])[0]]=s[c[1]];return s});var Dd=Lg;wn({target:"RegExp",proto:!0,forced:/./.exec!==Dd},{exec:Dd});var wY=fd,H3=Function.prototype,G3=H3.apply,W3=H3.call,K3=typeof Reflect=="object"&&Reflect.apply||(wY?W3.bind(G3):function(){return W3.apply(G3,arguments)}),_Y=fs,CY=dt,Mg=function(e){if(_Y(e)==="Function")return CY(e)},Y3=Mg,J3=sr,SY=Dd,X3=ht,Q3=St,EY=Za,xY=Q3("species"),Fg=RegExp.prototype,$g=dt,kY=Ad,NY=yo,TY=hd,AY=$g("".charAt),Z3=$g("".charCodeAt),OY=$g("".slice),V3=function(e){return function(t,n){var r,s,a=NY(TY(t)),l=kY(n),c=a.length;return l<0||l>=c?e?"":void 0:(r=Z3(a,l))<55296||r>56319||l+1===c||(s=Z3(a,l+1))<56320||s>57343?e?AY(a,l):r:e?OY(a,l,l+2):s-56320+(r-55296<<10)+65536}},zg={codeAt:V3(!1),charAt:V3(!0)},IY=zg.charAt,Ug=dt,BY=mo,LY=Math.floor,jg=Ug("".charAt),RY=Ug("".replace),qg=Ug("".slice),PY=/\$([$&'`]|\d{1,2}|<[^>]*>)/g,DY=/\$([$&'`]|\d{1,2})/g,e6=$t,MY=Gt,FY=yt,$Y=fs,zY=Dd,UY=TypeError,jY=K3,t6=$t,Md=dt,qY=ht,HY=Gt,GY=yt,WY=Ka,KY=Ad,YY=T3,gs=yo,JY=hd,XY=function(e,t,n){return t+(n?IY(e,t).length:1)},QY=_d,ZY=function(e,t,n,r,s,a){var l=n+e.length,c=r.length,u=DY;return s!==void 0&&(s=BY(s),u=PY),RY(a,u,function(d,f){var p;switch(jg(f,0)){case"$":return"$";case"&":return e;case"`":return qg(t,0,n);case"'":return qg(t,l);case"<":p=s[qg(f,1,-1)];break;default:var g=+f;if(g===0)return d;if(g>c){var v=LY(g/10);return v===0?d:v<=c?r[v-1]===void 0?jg(f,1):r[v-1]+jg(f,1):d}p=r[g-1]}return p===void 0?"":p})},VY=function(e,t){var n=e.exec;if(FY(n)){var r=e6(n,e,t);return r!==null&&MY(r),r}if($Y(e)==="RegExp")return e6(zY,e,t);throw new UY("RegExp#exec called on incompatible receiver")},Hg=St("replace"),eJ=Math.max,tJ=Math.min,nJ=Md([].concat),Gg=Md([].push),n6=Md("".indexOf),r6=Md("".slice),rJ="a".replace(/./,"$0")==="$0",i6=!!/./[Hg]&&/./[Hg]("a","$0")==="";(function(e,t,n,r){var s=Q3(e),a=!X3(function(){var d={};return d[s]=function(){return 7},""[e](d)!==7}),l=a&&!X3(function(){var d=!1,f=/a/;return e==="split"&&((f={}).constructor={},f.constructor[xY]=function(){return f},f.flags="",f[s]=/./[s]),f.exec=function(){return d=!0,null},f[s](""),!d});if(!a||!l||n){var c=Y3(/./[s]),u=t(s,""[e],function(d,f,p,g,v){var b=Y3(d),w=f.exec;return w===SY||w===Fg.exec?a&&!v?{done:!0,value:c(f,p,g)}:{done:!0,value:b(p,f,g)}:{done:!1}});J3(String.prototype,e,u[0]),J3(Fg,s,u[1])}r&&EY(Fg[s],"sham",!0)})("replace",function(e,t,n){var r=i6?"$":"$0";return[function(s,a){var l=JY(this),c=WY(s)?void 0:QY(s,Hg);return c?t6(c,s,l,a):t6(t,gs(l),s,a)},function(s,a){var l=HY(this),c=gs(s);if(typeof a=="string"&&n6(a,r)===-1&&n6(a,"$<")===-1){var u=n(t,l,c,a);if(u.done)return u.value}var d=GY(a);d||(a=gs(a));var f,p=l.global;p&&(f=l.unicode,l.lastIndex=0);for(var g,v=[];(g=VY(l,c))!==null&&(Gg(v,g),p);)gs(g[0])===""&&(l.lastIndex=XY(c,YY(l.lastIndex),f));for(var b,w="",_=0,C=0;C<v.length;C++){for(var k,S=gs((g=v[C])[0]),E=eJ(tJ(KY(g.index),c.length),0),N=[],A=1;A<g.length;A++)Gg(N,(b=g[A])===void 0?b:String(b));var I=g.groups;if(d){var O=nJ([S],N,E,c);I!==void 0&&Gg(O,I),k=gs(jY(a,void 0,O))}else k=ZY(S,c,E,N,I,a);E>=_&&(w+=r6(c,_,E)+k,_=E+S.length)}return w+r6(c,_)}]},!!qY(function(){var e=/./;return e.exec=function(){var t=[];return t.groups={a:"7"},t},"".replace(e,"$<a>")!=="7"})||!rJ||i6);var iJ=St,oJ=Ld,sJ=Ir.f,Wg=iJ("unscopables"),Kg=Array.prototype;Kg[Wg]===void 0&&sJ(Kg,Wg,{configurable:!0,value:oJ(null)});var bo,o6,s6,nl={},aJ=!ht(function(){function e(){}return e.prototype.constructor=null,Object.getPrototypeOf(new e)!==e.prototype}),lJ=bn,cJ=yt,dJ=mo,uJ=aJ,a6=dg("IE_PROTO"),Yg=Object,fJ=Yg.prototype,Jg=uJ?Yg.getPrototypeOf:function(e){var t=dJ(e);if(lJ(t,a6))return t[a6];var n=t.constructor;return cJ(n)&&t instanceof n?n.prototype:t instanceof Yg?fJ:null},hJ=ht,pJ=yt,gJ=Dn,l6=Jg,mJ=sr,Xg=St("iterator"),c6=!1;[].keys&&("next"in(s6=[].keys())?(o6=l6(l6(s6)))!==Object.prototype&&(bo=o6):c6=!0);var vJ=!gJ(bo)||hJ(function(){var e={};return bo[Xg].call(e)!==e});vJ&&(bo={}),pJ(bo[Xg])||mJ(bo,Xg,function(){return this});var Qg={IteratorPrototype:bo,BUGGY_SAFARI_ITERATORS:c6},yJ=Ir.f,bJ=bn,d6=St("toStringTag"),ms=function(e,t,n){e&&!n&&(e=e.prototype),e&&!bJ(e,d6)&&yJ(e,d6,{configurable:!0,value:t})},wJ=Qg.IteratorPrototype,_J=Ld,CJ=Qa,SJ=ms,EJ=nl,xJ=function(){return this},u6=function(e,t,n,r){var s=t+" Iterator";return e.prototype=_J(wJ,{next:CJ(+!r,n)}),SJ(e,s,!1),EJ[s]=xJ,e},kJ=dt,NJ=Bi,TJ=Dn,AJ=String,OJ=TypeError,IJ=Gt,BJ=function(e){if(function(t){return TJ(t)||t===null}(e))return e;throw new OJ("Can't set "+AJ(e)+" as a prototype")},f6=Object.setPrototypeOf||("__proto__"in{}?function(){var e,t=!1,n={};try{(e=function(r,s,a){try{return kJ(NJ(Object.getOwnPropertyDescriptor(r,s)[a]))}catch(l){}}(Object.prototype,"__proto__","set"))(n,[]),t=n instanceof Array}catch(r){}return function(r,s){return IJ(r),BJ(s),t?e(r,s):r.__proto__=s,r}}():void 0),LJ=wn,RJ=$t,PJ=yt,DJ=u6,h6=Jg,p6=f6,MJ=ms,FJ=Za,Zg=sr,$J=nl,zJ=Ya.PROPER,UJ=Ya.CONFIGURABLE,g6=Qg.IteratorPrototype,Fd=Qg.BUGGY_SAFARI_ITERATORS,rl=St("iterator"),m6="keys",il="values",v6="entries",jJ=function(){return this},y6=function(e,t,n,r,s,a,l){DJ(n,t,r);var c,u,d,f=function(C){if(C===s&&w)return w;if(!Fd&&C&&C in v)return v[C];switch(C){case m6:case il:case v6:return function(){return new n(this,C)}}return function(){return new n(this)}},p=t+" Iterator",g=!1,v=e.prototype,b=v[rl]||v["@@iterator"]||s&&v[s],w=!Fd&&b||f(s),_=t==="Array"&&v.entries||b;if(_&&(c=h6(_.call(new e)))!==Object.prototype&&c.next&&(h6(c)!==g6&&(p6?p6(c,g6):PJ(c[rl])||Zg(c,rl,jJ)),MJ(c,p,!0)),zJ&&s===il&&b&&b.name!==il&&(UJ?FJ(v,"name",il):(g=!0,w=function(){return RJ(b,this)})),s)if(u={values:f(il),keys:a?w:f(m6),entries:f(v6)},l)for(d in u)(Fd||g||!(d in v))&&Zg(v,d,u[d]);else LJ({target:t,proto:!0,forced:Fd||g},u);return v[rl]!==w&&Zg(v,rl,w,{name:s}),$J[t]=w,u},Vg=function(e,t){return{value:e,done:t}},qJ=hs,em=function(e){Kg[Wg][e]=!0},b6=nl,w6=Li,HJ=Ir.f,GJ=y6,$d=Vg,WJ=Ft,_6="Array Iterator",KJ=w6.set,YJ=w6.getterFor(_6),JJ=GJ(Array,"Array",function(e,t){KJ(this,{type:_6,target:qJ(e),index:0,kind:t})},function(){var e=YJ(this),t=e.target,n=e.index++;if(!t||n>=t.length)return e.target=void 0,$d(void 0,!0);switch(e.kind){case"keys":return $d(n,!1);case"values":return $d(t[n],!1)}return $d([n,t[n]],!1)},"values"),C6=b6.Arguments=b6.Array;if(em("keys"),em("values"),em("entries"),WJ&&C6.name!=="values")try{HJ(C6,"name",{value:"values"})}catch(e){}var XJ=tl,QJ=Eg?{}.toString:function(){return"[object "+XJ(this)+"]"};Eg||sr(Object.prototype,"toString",QJ,{unsafe:!0});var ZJ=zg.charAt,VJ=yo,S6=Li,eX=y6,E6=Vg,x6="String Iterator",tX=S6.set,nX=S6.getterFor(x6);eX(String,"String",function(e){tX(this,{type:x6,string:VJ(e),index:0})},function(){var e,t=nX(this),n=t.string,r=t.index;return r>=n.length?E6(void 0,!0):(e=ZJ(n,r),t.index+=e.length,E6(e,!1))});var tm=gd("span").classList,k6=tm&&tm.constructor&&tm.constructor.prototype,rX=k6===Object.prototype?void 0:k6,N6=pt,T6={CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0},iX=rX,ol=JJ,A6=Za,oX=ms,nm=St("iterator"),rm=ol.values,O6=function(e,t){if(e){if(e[nm]!==rm)try{A6(e,nm,rm)}catch(r){e[nm]=rm}if(oX(e,t,!0),T6[t]){for(var n in ol)if(e[n]!==ol[n])try{A6(e,n,ol[n])}catch(r){e[n]=ol[n]}}}};for(var im in T6)O6(N6[im]&&N6[im].prototype,im);O6(iX,"DOMTokenList");var sX=ht,aX=Ft,lX=St("iterator"),I6=!sX(function(){var e=new URL("b?a=1&b=2&c=3","http://a"),t=e.searchParams,n=new URLSearchParams("a=1&a=2&b=3"),r="";return e.pathname="c%20d",t.forEach(function(s,a){t.delete("b"),r+=a+s}),n.delete("a",2),n.delete("b",void 0),!t.size&&!aX||!t.sort||e.href!=="http://a/c%20d?a=1&c=3"||t.get("c")!=="3"||String(new URLSearchParams("?a=1"))!=="a=1"||!t[lX]||new URL("https://a@b").username!=="a"||new URLSearchParams(new URLSearchParams("a=b")).get("a")!=="b"||new URL("http://тест").host!=="xn--e1aybc"||new URL("http://a#б").hash!=="#%D0%B1"||r!=="a1c3"||new URL("http://x",void 0).host!=="x"}),cX=Bi,dX=fd,uX=Mg(Mg.bind),wo=function(e,t){return cX(e),t===void 0?e:dX?uX(e,t):function(){return e.apply(t,arguments)}},fX=vd,hX=TypeError,om=function(e,t){if(fX(t,e))return e;throw new hX("Incorrect invocation")},B6=Ft,pX=dt,gX=$t,mX=ht,sm=Tg,vX=Cg,yX=Td,bX=mo,wX=bg,vs=Object.assign,L6=Object.defineProperty,_X=pX([].concat),CX=!vs||mX(function(){if(B6&&vs({b:1},vs(L6({},"a",{enumerable:!0,get:function(){L6(this,"b",{value:3,enumerable:!1})}}),{b:2})).b!==1)return!0;var e={},t={},n=Symbol("assign detection"),r="abcdefghijklmnopqrst";return e[n]=7,r.split("").forEach(function(s){t[s]=s}),vs({},e)[n]!==7||sm(vs({},t)).join("")!==r})?function(e,t){for(var n=bX(e),r=arguments.length,s=1,a=vX.f,l=yX.f;r>s;)for(var c,u=wX(arguments[s++]),d=a?_X(sm(u),a(u)):sm(u),f=d.length,p=0;f>p;)c=d[p++],B6&&!gX(l,u,c)||(n[c]=u[c]);return n}:vs,SX=$t,R6=Gt,EX=_d,P6=function(e,t,n){var r,s;R6(e);try{if(!(r=EX(e,"return"))){if(t==="throw")throw n;return n}r=SX(r,e)}catch(a){s=!0,r=a}if(t==="throw")throw n;if(s)throw r;return R6(r),n},xX=Gt,kX=P6,NX=nl,TX=St("iterator"),AX=Array.prototype,D6=function(e){return e!==void 0&&(NX.Array===e||AX[TX]===e)},OX=dt,IX=ht,M6=yt,BX=tl,LX=Xp,F6=function(){},RX=[],$6=vo("Reflect","construct"),am=/^\s*(?:class|function)\b/,PX=OX(am.exec),DX=!am.test(F6),sl=function(e){if(!M6(e))return!1;try{return $6(F6,RX,e),!0}catch(t){return!1}},z6=function(e){if(!M6(e))return!1;switch(BX(e)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return DX||!!PX(am,LX(e))}catch(t){return!0}};z6.sham=!0;var lm=!$6||IX(function(){var e;return sl(sl.call)||!sl(Object)||!sl(function(){e=!0})||e})?z6:sl,MX=og,FX=Ir,$X=Qa,U6=function(e,t,n){var r=MX(t);r in e?FX.f(e,r,$X(0,n)):e[r]=n},zX=tl,j6=_d,UX=Ka,jX=nl,qX=St("iterator"),zd=function(e){if(!UX(e))return j6(e,qX)||j6(e,"@@iterator")||jX[zX(e)]},HX=$t,GX=Bi,WX=Gt,KX=wd,YX=zd,JX=TypeError,cm=function(e,t){var n=arguments.length<2?YX(e):t;if(GX(n))return WX(HX(n,e));throw new JX(KX(e)+" is not iterable")},XX=wo,QX=$t,ZX=mo,VX=function(e,t,n,r){try{return r?t(xX(n)[0],n[1]):t(n)}catch(s){kX(e,"throw",s)}},eQ=D6,tQ=lm,nQ=Va,q6=U6,rQ=cm,iQ=zd,H6=Array,dm=dt([].slice),_o=dt,um=2147483647,oQ=/[^\0-\u007E]/,G6=/[.\u3002\uFF0E\uFF61]/g,W6="Overflow: input needs wider integers to process",K6=RangeError,sQ=_o(G6.exec),ys=Math.floor,fm=String.fromCharCode,Y6=_o("".charCodeAt),J6=_o([].join),Ri=_o([].push),aQ=_o("".replace),lQ=_o("".split),cQ=_o("".toLowerCase),X6=function(e){return e+22+75*(e<26)},dQ=function(e,t,n){var r=0;for(e=n?ys(e/700):e>>1,e+=ys(e/t);e>455;)e=ys(e/35),r+=36;return ys(r+36*e/(e+38))},uQ=function(e){var t=[];e=function(C){for(var k=[],S=0,E=C.length;S<E;){var N=Y6(C,S++);if(N>=55296&&N<=56319&&S<E){var A=Y6(C,S++);(64512&A)==56320?Ri(k,((1023&N)<<10)+(1023&A)+65536):(Ri(k,N),S--)}else Ri(k,N)}return k}(e);var n,r,s=e.length,a=128,l=0,c=72;for(n=0;n<e.length;n++)(r=e[n])<128&&Ri(t,fm(r));var u=t.length,d=u;for(u&&Ri(t,"-");d<s;){var f=um;for(n=0;n<e.length;n++)(r=e[n])>=a&&r<f&&(f=r);var p=d+1;if(f-a>ys((um-l)/p))throw new K6(W6);for(l+=(f-a)*p,a=f,n=0;n<e.length;n++){if((r=e[n])<a&&++l>um)throw new K6(W6);if(r===a){for(var g=l,v=36;;){var b=v<=c?1:v>=c+26?26:v-c;if(g<b)break;var w=g-b,_=36-b;Ri(t,fm(X6(b+w%_))),g=ys(w/_),v+=36}Ri(t,fm(X6(g))),c=dQ(l,p,d===u),l=0,d++}}l++,a++}return J6(t,"")},fQ=TypeError,hm=function(e,t){if(e<t)throw new fQ("Not enough arguments");return e},Q6=pt,hQ=Ft,pQ=Object.getOwnPropertyDescriptor,Z6=function(e){if(!hQ)return Q6[e];var t=pQ(Q6,e);return t&&t.value},gQ=sr,V6=dm,mQ=Math.floor,pm=function(e,t){var n=e.length;if(n<8)for(var r,s,a=1;a<n;){for(s=a,r=e[a];s&&t(e[s-1],r)>0;)e[s]=e[--s];s!==a++&&(e[s]=r)}else for(var l=mQ(n/2),c=pm(V6(e,0,l),t),u=pm(V6(e,l),t),d=c.length,f=u.length,p=0,g=0;p<d||g<f;)e[p+g]=p<d&&g<f?t(c[p],u[g])<=0?c[p++]:u[g++]:p<d?c[p++]:u[g++];return e},gm=wn,Ud=pt,mm=Z6,jd=$t,Lr=dt,al=Ft,e4=I6,t4=sr,vQ=Nd,yQ=ms,bQ=u6,vm=Li,n4=om,ym=yt,wQ=bn,_Q=wo,CQ=tl,SQ=Gt,r4=Dn,en=yo,EQ=Ld,i4=Qa,o4=cm,xQ=zd,qd=Vg,bs=hm,kQ=pm,NQ=St("iterator"),ws="URLSearchParams",s4=ws+"Iterator",a4=vm.set,Mn=vm.getterFor(ws),TQ=vm.getterFor(s4),l4=mm("fetch"),Hd=mm("Request"),ll=mm("Headers"),bm=Hd&&Hd.prototype,c4=ll&&ll.prototype,AQ=Ud.RegExp,OQ=Ud.TypeError,d4=Ud.decodeURIComponent,IQ=Ud.encodeURIComponent,BQ=Lr("".charAt),u4=Lr([].join),Co=Lr([].push),wm=Lr("".replace),LQ=Lr([].shift),f4=Lr([].splice),h4=Lr("".split),RQ=Lr("".slice),PQ=/\+/g,p4=Array(4),DQ=function(e){return p4[e-1]||(p4[e-1]=AQ("((?:%[\\da-f]{2}){"+e+"})","gi"))},MQ=function(e){try{return d4(e)}catch(t){return e}},g4=function(e){var t=wm(e,PQ," "),n=4;try{return d4(t)}catch(r){for(;n;)t=wm(t,DQ(n--),MQ);return t}},FQ=/[!'()~]|%20/g,$Q={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+"},zQ=function(e){return $Q[e]},m4=function(e){return wm(IQ(e),FQ,zQ)},_m=bQ(function(e,t){a4(this,{type:s4,target:Mn(e).entries,index:0,kind:t})},ws,function(){var e=TQ(this),t=e.target,n=e.index++;if(!t||n>=t.length)return e.target=void 0,qd(void 0,!0);var r=t[n];switch(e.kind){case"keys":return qd(r.key,!1);case"values":return qd(r.value,!1)}return qd([r.key,r.value],!1)},!0),v4=function(e){this.entries=[],this.url=null,e!==void 0&&(r4(e)?this.parseObject(e):this.parseQuery(typeof e=="string"?BQ(e,0)==="?"?RQ(e,1):e:en(e)))};v4.prototype={type:ws,bindURL:function(e){this.url=e,this.update()},parseObject:function(e){var t,n,r,s,a,l,c,u=this.entries,d=xQ(e);if(d)for(n=(t=o4(e,d)).next;!(r=jd(n,t)).done;){if(a=(s=o4(SQ(r.value))).next,(l=jd(a,s)).done||(c=jd(a,s)).done||!jd(a,s).done)throw new OQ("Expected sequence with length 2");Co(u,{key:en(l.value),value:en(c.value)})}else for(var f in e)wQ(e,f)&&Co(u,{key:f,value:en(e[f])})},parseQuery:function(e){if(e)for(var t,n,r=this.entries,s=h4(e,"&"),a=0;a<s.length;)(t=s[a++]).length&&(n=h4(t,"="),Co(r,{key:g4(LQ(n)),value:g4(u4(n,"="))}))},serialize:function(){for(var e,t=this.entries,n=[],r=0;r<t.length;)e=t[r++],Co(n,m4(e.key)+"="+m4(e.value));return u4(n,"&")},update:function(){this.entries.length=0,this.parseQuery(this.url.query)},updateURL:function(){this.url&&this.url.update()}};var Gd=function(){n4(this,_s);var e=a4(this,new v4(arguments.length>0?arguments[0]:void 0));al||(this.size=e.entries.length)},_s=Gd.prototype;if(function(e,t,n){for(var r in t)gQ(e,r,t[r],n)}(_s,{append:function(e,t){var n=Mn(this);bs(arguments.length,2),Co(n.entries,{key:en(e),value:en(t)}),al||this.length++,n.updateURL()},delete:function(e){for(var t=Mn(this),n=bs(arguments.length,1),r=t.entries,s=en(e),a=n<2?void 0:arguments[1],l=a===void 0?a:en(a),c=0;c<r.length;){var u=r[c];if(u.key!==s||l!==void 0&&u.value!==l)c++;else if(f4(r,c,1),l!==void 0)break}al||(this.size=r.length),t.updateURL()},get:function(e){var t=Mn(this).entries;bs(arguments.length,1);for(var n=en(e),r=0;r<t.length;r++)if(t[r].key===n)return t[r].value;return null},getAll:function(e){var t=Mn(this).entries;bs(arguments.length,1);for(var n=en(e),r=[],s=0;s<t.length;s++)t[s].key===n&&Co(r,t[s].value);return r},has:function(e){for(var t=Mn(this).entries,n=bs(arguments.length,1),r=en(e),s=n<2?void 0:arguments[1],a=s===void 0?s:en(s),l=0;l<t.length;){var c=t[l++];if(c.key===r&&(a===void 0||c.value===a))return!0}return!1},set:function(e,t){var n=Mn(this);bs(arguments.length,1);for(var r,s=n.entries,a=!1,l=en(e),c=en(t),u=0;u<s.length;u++)(r=s[u]).key===l&&(a?f4(s,u--,1):(a=!0,r.value=c));a||Co(s,{key:l,value:c}),al||(this.size=s.length),n.updateURL()},sort:function(){var e=Mn(this);kQ(e.entries,function(t,n){return t.key>n.key?1:-1}),e.updateURL()},forEach:function(e){for(var t,n=Mn(this).entries,r=_Q(e,arguments.length>1?arguments[1]:void 0),s=0;s<n.length;)r((t=n[s++]).value,t.key,this)},keys:function(){return new _m(this,"keys")},values:function(){return new _m(this,"values")},entries:function(){return new _m(this,"entries")}},{enumerable:!0}),t4(_s,NQ,_s.entries,{name:"entries"}),t4(_s,"toString",function(){return Mn(this).serialize()},{enumerable:!0}),al&&vQ(_s,"size",{get:function(){return Mn(this).entries.length},configurable:!0,enumerable:!0}),yQ(Gd,ws),gm({global:!0,constructor:!0,forced:!e4},{URLSearchParams:Gd}),!e4&&ym(ll)){var UQ=Lr(c4.has),jQ=Lr(c4.set),y4=function(e){if(r4(e)){var t,n=e.body;if(CQ(n)===ws)return t=e.headers?new ll(e.headers):new ll,UQ(t,"content-type")||jQ(t,"content-type","application/x-www-form-urlencoded;charset=UTF-8"),EQ(e,{body:i4(0,en(n)),headers:i4(0,t)})}return e};if(ym(l4)&&gm({global:!0,enumerable:!0,dontCallGetSet:!0,forced:!0},{fetch:function(e){return l4(e,arguments.length>1?y4(arguments[1]):{})}}),ym(Hd)){var Cm=function(e){return n4(this,bm),new Hd(e,arguments.length>1?y4(arguments[1]):{})};bm.constructor=Cm,Cm.prototype=bm,gm({global:!0,constructor:!0,dontCallGetSet:!0,forced:!0},{Request:Cm})}}var Fn,qQ=wn,Sm=Ft,HQ=I6,Em=pt,b4=wo,$n=dt,Wd=sr,zn=Nd,GQ=om,xm=bn,km=CX,Cs=function(e){var t=ZX(e),n=tQ(this),r=arguments.length,s=r>1?arguments[1]:void 0,a=s!==void 0;a&&(s=XX(s,r>2?arguments[2]:void 0));var l,c,u,d,f,p,g=iQ(t),v=0;if(!g||this===H6&&eQ(g))for(l=nQ(t),c=n?new this(l):H6(l);l>v;v++)p=a?s(t[v],v):t[v],q6(c,v,p);else for(f=(d=rQ(t,g)).next,c=n?new this:[];!(u=QX(f,d)).done;v++)p=a?VX(d,s,[u.value,v],!0):u.value,q6(c,v,p);return c.length=v,c},ar=dm,WQ=zg.codeAt,si=yo,KQ=ms,YQ=hm,w4={URLSearchParams:Gd,getState:Mn},_4=Li,JQ=_4.set,Kd=_4.getterFor("URL"),XQ=w4.URLSearchParams,QQ=w4.getState,cl=Em.URL,Nm=Em.TypeError,Yd=Em.parseInt,ZQ=Math.floor,C4=Math.pow,Un=$n("".charAt),lr=$n(/./.exec),dl=$n([].join),VQ=$n(1 .toString),eZ=$n([].pop),Ss=$n([].push),Tm=$n("".replace),tZ=$n([].shift),nZ=$n("".split),ul=$n("".slice),Jd=$n("".toLowerCase),rZ=$n([].unshift),Am="Invalid scheme",So="Invalid host",S4="Invalid port",E4=/[a-z]/i,iZ=/[\d+-.a-z]/i,Om=/\d/,oZ=/^0x/i,sZ=/^[0-7]+$/,aZ=/^\d+$/,x4=/^[\da-f]+$/i,lZ=/[\0\t\n\r #%/:<>?@[\\\]^|]/,cZ=/[\0\t\n\r #/:<>?@[\\\]^|]/,dZ=/^[\u0000-\u0020]+/,uZ=/(^|[^\u0000-\u0020])[\u0000-\u0020]+$/,fZ=/[\t\n\r]/g,fl=function(e){var t,n,r,s;if(typeof e=="number"){for(t=[],n=0;n<4;n++)rZ(t,e%256),e=ZQ(e/256);return dl(t,".")}if(typeof e=="object"){for(t="",r=function(a){for(var l=null,c=1,u=null,d=0,f=0;f<8;f++)a[f]!==0?(d>c&&(l=u,c=d),u=null,d=0):(u===null&&(u=f),++d);return d>c&&(l=u,c=d),l}(e),n=0;n<8;n++)s&&e[n]===0||(s&&(s=!1),r===n?(t+=n?":":"::",s=!0):(t+=VQ(e[n],16),n<7&&(t+=":")));return"["+t+"]"}return e},Xd={},k4=km({},Xd,{" ":1,'"':1,"<":1,">":1,"`":1}),N4=km({},k4,{"#":1,"?":1,"{":1,"}":1}),Im=km({},N4,{"/":1,":":1,";":1,"=":1,"@":1,"[":1,"\\":1,"]":1,"^":1,"|":1}),Pi=function(e,t){var n=WQ(e,0);return n>32&&n<127&&!xm(t,e)?e:encodeURIComponent(e)},Qd={ftp:21,file:null,http:80,https:443,ws:80,wss:443},hl=function(e,t){var n;return e.length===2&&lr(E4,Un(e,0))&&((n=Un(e,1))===":"||!t&&n==="|")},T4=function(e){var t;return e.length>1&&hl(ul(e,0,2))&&(e.length===2||(t=Un(e,2))==="/"||t==="\\"||t==="?"||t==="#")},hZ=function(e){return e==="."||Jd(e)==="%2e"},Bm={},A4={},Lm={},O4={},I4={},Rm={},B4={},L4={},Zd={},Vd={},Pm={},Dm={},Mm={},Fm={},R4={},$m={},Es={},Rr={},P4={},Eo={},ai={},zm=function(e,t,n){var r,s,a,l=si(e);if(t){if(s=this.parse(l))throw new Nm(s);this.searchParams=null}else{if(n!==void 0&&(r=new zm(n,!0)),s=this.parse(l,null,r))throw new Nm(s);(a=QQ(new XQ)).bindURL(this),this.searchParams=a}};zm.prototype={type:"URL",parse:function(e,t,n){var r,s,a,l,c,u=this,d=t||Bm,f=0,p="",g=!1,v=!1,b=!1;for(e=si(e),t||(u.scheme="",u.username="",u.password="",u.host=null,u.port=null,u.path=[],u.query=null,u.fragment=null,u.cannotBeABaseURL=!1,e=Tm(e,dZ,""),e=Tm(e,uZ,"$1")),e=Tm(e,fZ,""),r=Cs(e);f<=r.length;){switch(s=r[f],d){case Bm:if(!s||!lr(E4,s)){if(t)return Am;d=Lm;continue}p+=Jd(s),d=A4;break;case A4:if(s&&(lr(iZ,s)||s==="+"||s==="-"||s==="."))p+=Jd(s);else{if(s!==":"){if(t)return Am;p="",d=Lm,f=0;continue}if(t&&(u.isSpecial()!==xm(Qd,p)||p==="file"&&(u.includesCredentials()||u.port!==null)||u.scheme==="file"&&!u.host))return;if(u.scheme=p,t)return void(u.isSpecial()&&Qd[u.scheme]===u.port&&(u.port=null));p="",u.scheme==="file"?d=Fm:u.isSpecial()&&n&&n.scheme===u.scheme?d=O4:u.isSpecial()?d=L4:r[f+1]==="/"?(d=I4,f++):(u.cannotBeABaseURL=!0,Ss(u.path,""),d=P4)}break;case Lm:if(!n||n.cannotBeABaseURL&&s!=="#")return Am;if(n.cannotBeABaseURL&&s==="#"){u.scheme=n.scheme,u.path=ar(n.path),u.query=n.query,u.fragment="",u.cannotBeABaseURL=!0,d=ai;break}d=n.scheme==="file"?Fm:Rm;continue;case O4:if(s!=="/"||r[f+1]!=="/"){d=Rm;continue}d=Zd,f++;break;case I4:if(s==="/"){d=Vd;break}d=Rr;continue;case Rm:if(u.scheme=n.scheme,s===Fn)u.username=n.username,u.password=n.password,u.host=n.host,u.port=n.port,u.path=ar(n.path),u.query=n.query;else if(s==="/"||s==="\\"&&u.isSpecial())d=B4;else if(s==="?")u.username=n.username,u.password=n.password,u.host=n.host,u.port=n.port,u.path=ar(n.path),u.query="",d=Eo;else{if(s!=="#"){u.username=n.username,u.password=n.password,u.host=n.host,u.port=n.port,u.path=ar(n.path),u.path.length--,d=Rr;continue}u.username=n.username,u.password=n.password,u.host=n.host,u.port=n.port,u.path=ar(n.path),u.query=n.query,u.fragment="",d=ai}break;case B4:if(!u.isSpecial()||s!=="/"&&s!=="\\"){if(s!=="/"){u.username=n.username,u.password=n.password,u.host=n.host,u.port=n.port,d=Rr;continue}d=Vd}else d=Zd;break;case L4:if(d=Zd,s!=="/"||Un(p,f+1)!=="/")continue;f++;break;case Zd:if(s!=="/"&&s!=="\\"){d=Vd;continue}break;case Vd:if(s==="@"){g&&(p="%40"+p),g=!0,a=Cs(p);for(var w=0;w<a.length;w++){var _=a[w];if(_!==":"||b){var C=Pi(_,Im);b?u.password+=C:u.username+=C}else b=!0}p=""}else if(s===Fn||s==="/"||s==="?"||s==="#"||s==="\\"&&u.isSpecial()){if(g&&p==="")return"Invalid authority";f-=Cs(p).length+1,p="",d=Pm}else p+=s;break;case Pm:case Dm:if(t&&u.scheme==="file"){d=$m;continue}if(s!==":"||v){if(s===Fn||s==="/"||s==="?"||s==="#"||s==="\\"&&u.isSpecial()){if(u.isSpecial()&&p==="")return So;if(t&&p===""&&(u.includesCredentials()||u.port!==null))return;if(l=u.parseHost(p))return l;if(p="",d=Es,t)return;continue}s==="["?v=!0:s==="]"&&(v=!1),p+=s}else{if(p==="")return So;if(l=u.parseHost(p))return l;if(p="",d=Mm,t===Dm)return}break;case Mm:if(!lr(Om,s)){if(s===Fn||s==="/"||s==="?"||s==="#"||s==="\\"&&u.isSpecial()||t){if(p!==""){var k=Yd(p,10);if(k>65535)return S4;u.port=u.isSpecial()&&k===Qd[u.scheme]?null:k,p=""}if(t)return;d=Es;continue}return S4}p+=s;break;case Fm:if(u.scheme="file",s==="/"||s==="\\")d=R4;else{if(!n||n.scheme!=="file"){d=Rr;continue}switch(s){case Fn:u.host=n.host,u.path=ar(n.path),u.query=n.query;break;case"?":u.host=n.host,u.path=ar(n.path),u.query="",d=Eo;break;case"#":u.host=n.host,u.path=ar(n.path),u.query=n.query,u.fragment="",d=ai;break;default:T4(dl(ar(r,f),""))||(u.host=n.host,u.path=ar(n.path),u.shortenPath()),d=Rr;continue}}break;case R4:if(s==="/"||s==="\\"){d=$m;break}n&&n.scheme==="file"&&!T4(dl(ar(r,f),""))&&(hl(n.path[0],!0)?Ss(u.path,n.path[0]):u.host=n.host),d=Rr;continue;case $m:if(s===Fn||s==="/"||s==="\\"||s==="?"||s==="#"){if(!t&&hl(p))d=Rr;else if(p===""){if(u.host="",t)return;d=Es}else{if(l=u.parseHost(p))return l;if(u.host==="localhost"&&(u.host=""),t)return;p="",d=Es}continue}p+=s;break;case Es:if(u.isSpecial()){if(d=Rr,s!=="/"&&s!=="\\")continue}else if(t||s!=="?")if(t||s!=="#"){if(s!==Fn&&(d=Rr,s!=="/"))continue}else u.fragment="",d=ai;else u.query="",d=Eo;break;case Rr:if(s===Fn||s==="/"||s==="\\"&&u.isSpecial()||!t&&(s==="?"||s==="#")){if((c=Jd(c=p))===".."||c==="%2e."||c===".%2e"||c==="%2e%2e"?(u.shortenPath(),s==="/"||s==="\\"&&u.isSpecial()||Ss(u.path,"")):hZ(p)?s==="/"||s==="\\"&&u.isSpecial()||Ss(u.path,""):(u.scheme==="file"&&!u.path.length&&hl(p)&&(u.host&&(u.host=""),p=Un(p,0)+":"),Ss(u.path,p)),p="",u.scheme==="file"&&(s===Fn||s==="?"||s==="#"))for(;u.path.length>1&&u.path[0]==="";)tZ(u.path);s==="?"?(u.query="",d=Eo):s==="#"&&(u.fragment="",d=ai)}else p+=Pi(s,N4);break;case P4:s==="?"?(u.query="",d=Eo):s==="#"?(u.fragment="",d=ai):s!==Fn&&(u.path[0]+=Pi(s,Xd));break;case Eo:t||s!=="#"?s!==Fn&&(s==="'"&&u.isSpecial()?u.query+="%27":u.query+=s==="#"?"%23":Pi(s,Xd)):(u.fragment="",d=ai);break;case ai:s!==Fn&&(u.fragment+=Pi(s,k4))}f++}},parseHost:function(e){var t,n,r;if(Un(e,0)==="["){if(Un(e,e.length-1)!=="]"||(t=function(s){var a,l,c,u,d,f,p,g=[0,0,0,0,0,0,0,0],v=0,b=null,w=0,_=function(){return Un(s,w)};if(_()===":"){if(Un(s,1)!==":")return;w+=2,b=++v}for(;_();){if(v===8)return;if(_()!==":"){for(a=l=0;l<4&&lr(x4,_());)a=16*a+Yd(_(),16),w++,l++;if(_()==="."){if(l===0||(w-=l,v>6))return;for(c=0;_();){if(u=null,c>0){if(!(_()==="."&&c<4))return;w++}if(!lr(Om,_()))return;for(;lr(Om,_());){if(d=Yd(_(),10),u===null)u=d;else{if(u===0)return;u=10*u+d}if(u>255)return;w++}g[v]=256*g[v]+u,++c!=2&&c!==4||v++}if(c!==4)return;break}if(_()===":"){if(w++,!_())return}else if(_())return;g[v++]=a}else{if(b!==null)return;w++,b=++v}}if(b!==null)for(f=v-b,v=7;v!==0&&f>0;)p=g[v],g[v--]=g[b+f-1],g[b+--f]=p;else if(v!==8)return;return g}(ul(e,1,-1)),!t))return So;this.host=t}else if(this.isSpecial()){if(e=function(s){var a,l,c=[],u=lQ(aQ(cQ(s),G6,"."),".");for(a=0;a<u.length;a++)l=u[a],Ri(c,sQ(oQ,l)?"xn--"+uQ(l):l);return J6(c,".")}(e),lr(lZ,e)||(t=function(s){var a,l,c,u,d,f,p,g=nZ(s,".");if(g.length&&g[g.length-1]===""&&g.length--,(a=g.length)>4)return s;for(l=[],c=0;c<a;c++){if((u=g[c])==="")return s;if(d=10,u.length>1&&Un(u,0)==="0"&&(d=lr(oZ,u)?16:8,u=ul(u,d===8?1:2)),u==="")f=0;else{if(!lr(d===10?aZ:d===8?sZ:x4,u))return s;f=Yd(u,d)}Ss(l,f)}for(c=0;c<a;c++)if(f=l[c],c===a-1){if(f>=C4(256,5-a))return null}else if(f>255)return null;for(p=eZ(l),c=0;c<l.length;c++)p+=l[c]*C4(256,3-c);return p}(e),t===null))return So;this.host=t}else{if(lr(cZ,e))return So;for(t="",n=Cs(e),r=0;r<n.length;r++)t+=Pi(n[r],Xd);this.host=t}},cannotHaveUsernamePasswordPort:function(){return!this.host||this.cannotBeABaseURL||this.scheme==="file"},includesCredentials:function(){return this.username!==""||this.password!==""},isSpecial:function(){return xm(Qd,this.scheme)},shortenPath:function(){var e=this.path,t=e.length;!t||this.scheme==="file"&&t===1&&hl(e[0],!0)||e.length--},serialize:function(){var e=this,t=e.scheme,n=e.username,r=e.password,s=e.host,a=e.port,l=e.path,c=e.query,u=e.fragment,d=t+":";return s!==null?(d+="//",e.includesCredentials()&&(d+=n+(r?":"+r:"")+"@"),d+=fl(s),a!==null&&(d+=":"+a)):t==="file"&&(d+="//"),d+=e.cannotBeABaseURL?l[0]:l.length?"/"+dl(l,"/"):"",c!==null&&(d+="?"+c),u!==null&&(d+="#"+u),d},setHref:function(e){var t=this.parse(e);if(t)throw new Nm(t);this.searchParams.update()},getOrigin:function(){var e=this.scheme,t=this.port;if(e==="blob")try{return new xs(e.path[0]).origin}catch(n){return"null"}return e!=="file"&&this.isSpecial()?e+"://"+fl(this.host)+(t!==null?":"+t:""):"null"},getProtocol:function(){return this.scheme+":"},setProtocol:function(e){this.parse(si(e)+":",Bm)},getUsername:function(){return this.username},setUsername:function(e){var t=Cs(si(e));if(!this.cannotHaveUsernamePasswordPort()){this.username="";for(var n=0;n<t.length;n++)this.username+=Pi(t[n],Im)}},getPassword:function(){return this.password},setPassword:function(e){var t=Cs(si(e));if(!this.cannotHaveUsernamePasswordPort()){this.password="";for(var n=0;n<t.length;n++)this.password+=Pi(t[n],Im)}},getHost:function(){var e=this.host,t=this.port;return e===null?"":t===null?fl(e):fl(e)+":"+t},setHost:function(e){this.cannotBeABaseURL||this.parse(e,Pm)},getHostname:function(){var e=this.host;return e===null?"":fl(e)},setHostname:function(e){this.cannotBeABaseURL||this.parse(e,Dm)},getPort:function(){var e=this.port;return e===null?"":si(e)},setPort:function(e){this.cannotHaveUsernamePasswordPort()||((e=si(e))===""?this.port=null:this.parse(e,Mm))},getPathname:function(){var e=this.path;return this.cannotBeABaseURL?e[0]:e.length?"/"+dl(e,"/"):""},setPathname:function(e){this.cannotBeABaseURL||(this.path=[],this.parse(e,Es))},getSearch:function(){var e=this.query;return e?"?"+e:""},setSearch:function(e){(e=si(e))===""?this.query=null:(Un(e,0)==="?"&&(e=ul(e,1)),this.query="",this.parse(e,Eo)),this.searchParams.update()},getSearchParams:function(){return this.searchParams.facade},getHash:function(){var e=this.fragment;return e?"#"+e:""},setHash:function(e){(e=si(e))!==""?(Un(e,0)==="#"&&(e=ul(e,1)),this.fragment="",this.parse(e,ai)):this.fragment=null},update:function(){this.query=this.searchParams.serialize()||null}};var xs=function(e){var t=GQ(this,tn),n=YQ(arguments.length,1)>1?arguments[1]:void 0,r=JQ(t,new zm(e,!1,n));Sm||(t.href=r.serialize(),t.origin=r.getOrigin(),t.protocol=r.getProtocol(),t.username=r.getUsername(),t.password=r.getPassword(),t.host=r.getHost(),t.hostname=r.getHostname(),t.port=r.getPort(),t.pathname=r.getPathname(),t.search=r.getSearch(),t.searchParams=r.getSearchParams(),t.hash=r.getHash())},tn=xs.prototype,jn=function(e,t){return{get:function(){return Kd(this)[e]()},set:t&&function(n){return Kd(this)[t](n)},configurable:!0,enumerable:!0}};if(Sm&&(zn(tn,"href",jn("serialize","setHref")),zn(tn,"origin",jn("getOrigin")),zn(tn,"protocol",jn("getProtocol","setProtocol")),zn(tn,"username",jn("getUsername","setUsername")),zn(tn,"password",jn("getPassword","setPassword")),zn(tn,"host",jn("getHost","setHost")),zn(tn,"hostname",jn("getHostname","setHostname")),zn(tn,"port",jn("getPort","setPort")),zn(tn,"pathname",jn("getPathname","setPathname")),zn(tn,"search",jn("getSearch","setSearch")),zn(tn,"searchParams",jn("getSearchParams")),zn(tn,"hash",jn("getHash","setHash"))),Wd(tn,"toJSON",function(){return Kd(this).serialize()},{enumerable:!0}),Wd(tn,"toString",function(){return Kd(this).serialize()},{enumerable:!0}),cl){var D4=cl.createObjectURL,M4=cl.revokeObjectURL;D4&&Wd(xs,"createObjectURL",b4(D4,cl)),M4&&Wd(xs,"revokeObjectURL",b4(M4,cl))}KQ(xs,"URL"),qQ({global:!0,constructor:!0,forced:!HQ,sham:!Sm},{URL:xs});var pZ=fs,F4=Array.isArray||function(e){return pZ(e)==="Array"},gZ=TypeError,$4=F4,mZ=lm,vZ=Dn,yZ=St("species"),z4=Array,U4=function(e,t){return new(function(n){var r;return $4(n)&&(r=n.constructor,(mZ(r)&&(r===z4||$4(r.prototype))||vZ(r)&&(r=r[yZ])===null)&&(r=void 0)),r===void 0?z4:r}(e))(t===0?0:t)},bZ=ht,wZ=bd,_Z=St("species"),j4=function(e){return wZ>=51||!bZ(function(){var t=[];return(t.constructor={})[_Z]=function(){return{foo:1}},t[e](Boolean).foo!==1})},CZ=wn,SZ=ht,EZ=F4,xZ=Dn,kZ=mo,NZ=Va,q4=function(e){if(e>9007199254740991)throw gZ("Maximum allowed index exceeded");return e},H4=U6,TZ=U4,AZ=j4,OZ=bd,G4=St("isConcatSpreadable"),IZ=OZ>=51||!SZ(function(){var e=[];return e[G4]=!1,e.concat()[0]!==e}),BZ=function(e){if(!xZ(e))return!1;var t=e[G4];return t!==void 0?!!t:EZ(e)};CZ({target:"Array",proto:!0,arity:1,forced:!IZ||!AZ("concat")},{concat:function(e){var t,n,r,s,a,l=kZ(this),c=TZ(l,0),u=0;for(t=-1,r=arguments.length;t<r;t++)if(BZ(a=t===-1?l:arguments[t]))for(s=NZ(a),q4(u+s),n=0;n<s;n++,u++)n in a&&H4(c,u,a[n]);else q4(u+1),H4(c,u++,a);return c.length=u,c}});var LZ=wo,RZ=bg,PZ=mo,DZ=Va,MZ=U4,W4=dt([].push),Di=function(e){var t=e===1,n=e===2,r=e===3,s=e===4,a=e===6,l=e===7,c=e===5||a;return function(u,d,f,p){for(var g,v,b=PZ(u),w=RZ(b),_=DZ(w),C=LZ(d,f),k=0,S=p||MZ,E=t?S(u,_):n||l?S(u,0):void 0;_>k;k++)if((c||k in w)&&(v=C(g=w[k],k,b),e))if(t)E[k]=v;else if(v)switch(e){case 3:return!0;case 5:return g;case 6:return k;case 2:W4(E,g)}else switch(e){case 4:return!1;case 7:W4(E,g)}return a?-1:r||s?s:E}},FZ=[Di(0),Di(1),Di(2),Di(3),Di(4),Di(5),Di(6),Di(7)][1];wn({target:"Array",proto:!0,forced:!j4("map")},{map:function(e){return FZ(this,e,arguments.length>1?arguments[1]:void 0)}});var K4=Ft,$Z=ht,Y4=dt,zZ=Jg,UZ=Tg,jZ=hs,J4=Y4(Td.f),qZ=Y4([].push),HZ=K4&&$Z(function(){var e=Object.create(null);return e[2]=2,!J4(e,2)}),X4=function(e){return function(t){for(var n,r=jZ(t),s=UZ(r),a=HZ&&zZ(r)===null,l=s.length,c=0,u=[];l>c;)n=s[c++],K4&&!(a?n in r:J4(r,n))||qZ(u,e?[n,r[n]]:r[n]);return u}},GZ=[X4(!0),X4(!1)][0];wn({target:"Object",stat:!0},{entries:function(e){return GZ(e)}});var WZ=$t,KZ=bn,YZ=vd,JZ=P3,Q4=RegExp.prototype,XZ=Ya.PROPER,QZ=sr,ZZ=Gt,Z4=yo,VZ=ht,Um="toString",V4=RegExp.prototype,e8=V4[Um],eV=VZ(function(){return e8.call({source:"a",flags:"b"})!=="/a/b"}),tV=XZ&&e8.name!==Um;(eV||tV)&&QZ(V4,Um,function(){var e=ZZ(this);return"/"+Z4(e.source)+"/"+Z4(function(t){var n=t.flags;return n!==void 0||"flags"in Q4||KZ(t,"flags")||!YZ(Q4,t)?n:WZ(JZ,t)}(e))},{unsafe:!0});var pl,ks,t8,jm,eu=fs(pt.process)==="process",nV=vo,rV=Nd,iV=Ft,n8=St("species"),oV=lm,sV=wd,aV=TypeError,r8=Gt,lV=Ka,cV=St("species"),i8=/(?:ipad|iphone|ipod).*applewebkit/i.test(yd),_n=pt,dV=K3,uV=wo,o8=yt,fV=bn,s8=ht,a8=M3,hV=dm,l8=gd,pV=hm,gV=i8,mV=eu,qm=_n.setImmediate,Hm=_n.clearImmediate,vV=_n.process,Gm=_n.Dispatch,yV=_n.Function,c8=_n.MessageChannel,bV=_n.String,Wm=0,gl={},d8="onreadystatechange";s8(function(){pl=_n.location});var Km=function(e){if(fV(gl,e)){var t=gl[e];delete gl[e],t()}},Ym=function(e){return function(){Km(e)}},u8=function(e){Km(e.data)},f8=function(e){_n.postMessage(bV(e),pl.protocol+"//"+pl.host)};qm&&Hm||(qm=function(e){pV(arguments.length,1);var t=o8(e)?e:yV(e),n=hV(arguments,1);return gl[++Wm]=function(){dV(t,void 0,n)},ks(Wm),Wm},Hm=function(e){delete gl[e]},mV?ks=function(e){vV.nextTick(Ym(e))}:Gm&&Gm.now?ks=function(e){Gm.now(Ym(e))}:c8&&!gV?(jm=(t8=new c8).port2,t8.port1.onmessage=u8,ks=uV(jm.postMessage,jm)):_n.addEventListener&&o8(_n.postMessage)&&!_n.importScripts&&pl&&pl.protocol!=="file:"&&!s8(f8)?(ks=f8,_n.addEventListener("message",u8,!1)):ks=d8 in l8("script")?function(e){a8.appendChild(l8("script"))[d8]=function(){a8.removeChild(this),Km(e)}}:function(e){setTimeout(Ym(e),0)});var h8={set:qm,clear:Hm},p8=function(){this.head=null,this.tail=null};p8.prototype={add:function(e){var t={item:e,next:null},n=this.tail;n?n.next=t:this.head=t,this.tail=t},get:function(){var e=this.head;if(e)return(this.head=e.next)===null&&(this.tail=null),e.item}};var Ns,Jm,Xm,Qm,g8,m8=p8,wV=/ipad|iphone|ipod/i.test(yd)&&typeof Pebble!="undefined",_V=/web0s(?!.*chrome)/i.test(yd),Ts=pt,CV=Z6,v8=wo,Zm=h8.set,SV=m8,EV=i8,xV=wV,kV=_V,Vm=eu,y8=Ts.MutationObserver||Ts.WebKitMutationObserver,b8=Ts.document,w8=Ts.process,tu=Ts.Promise,e0=CV("queueMicrotask");if(!e0){var nu=new SV,ru=function(){var e,t;for(Vm&&(e=w8.domain)&&e.exit();t=nu.get();)try{t()}catch(n){throw nu.head&&Ns(),n}e&&e.enter()};EV||Vm||kV||!y8||!b8?!xV&&tu&&tu.resolve?((Qm=tu.resolve(void 0)).constructor=tu,g8=v8(Qm.then,Qm),Ns=function(){g8(ru)}):Vm?Ns=function(){w8.nextTick(ru)}:(Zm=v8(Zm,Ts),Ns=function(){Zm(ru)}):(Jm=!0,Xm=b8.createTextNode(""),new y8(ru).observe(Xm,{characterData:!0}),Ns=function(){Xm.data=Jm=!Jm}),e0=function(e){nu.head||Ns(),nu.add(e)}}var NV=e0,t0=function(e){try{return{error:!1,value:e()}}catch(t){return{error:!0,value:t}}},iu=pt.Promise,_8=typeof Deno=="object"&&Deno&&typeof Deno.version=="object",TV=!_8&&!eu&&typeof window=="object"&&typeof document=="object",AV=pt,ml=iu,OV=yt,IV=L3,BV=Xp,LV=St,RV=TV,PV=_8,n0=bd;ml&&ml.prototype;var DV=LV("species"),C8=!1,S8=OV(AV.PromiseRejectionEvent),MV=IV("Promise",function(){var e=BV(ml),t=e!==String(ml);if(!t&&n0===66)return!0;if(!n0||n0<51||!/native code/.test(e)){var n=new ml(function(s){s(1)}),r=function(s){s(function(){},function(){})};if((n.constructor={})[DV]=r,!(C8=n.then(function(){})instanceof r))return!0}return!t&&(RV||PV)&&!S8}),xo={CONSTRUCTOR:MV,REJECTION_EVENT:S8,SUBCLASSING:C8},As={},E8=Bi,FV=TypeError,$V=function(e){var t,n;this.promise=new e(function(r,s){if(t!==void 0||n!==void 0)throw new FV("Bad Promise constructor");t=r,n=s}),this.resolve=E8(t),this.reject=E8(n)};As.f=function(e){return new $V(e)};var r0,x8,k8,zV=wn,ou=eu,Mi=pt,Os=$t,N8=sr,T8=f6,UV=ms,jV=Bi,su=yt,qV=Dn,HV=om,GV=function(e,t){var n,r=r8(e).constructor;return r===void 0||lV(n=r8(r)[cV])?t:function(s){if(oV(s))return s;throw new aV(sV(s)+" is not a constructor")}(n)},A8=h8.set,i0=NV,WV=t0,KV=m8,O8=Li,au=iu,I8=As,lu="Promise",B8=xo.CONSTRUCTOR,YV=xo.REJECTION_EVENT,JV=xo.SUBCLASSING,o0=O8.getterFor(lu),XV=O8.set,Is=au&&au.prototype,Bs=au,cu=Is,L8=Mi.TypeError,s0=Mi.document,a0=Mi.process,l0=I8.f,QV=l0,ZV=!!(s0&&s0.createEvent&&Mi.dispatchEvent),R8="unhandledrejection",P8=function(e){var t;return!(!qV(e)||!su(t=e.then))&&t},D8=function(e,t){var n,r,s,a=t.value,l=t.state===1,c=l?e.ok:e.fail,u=e.resolve,d=e.reject,f=e.domain;try{c?(l||(t.rejection===2&&eee(t),t.rejection=1),c===!0?n=a:(f&&f.enter(),n=c(a),f&&(f.exit(),s=!0)),n===e.promise?d(new L8("Promise-chain cycle")):(r=P8(n))?Os(r,n,u,d):u(n)):d(a)}catch(p){f&&!s&&f.exit(),d(p)}},M8=function(e,t){e.notified||(e.notified=!0,i0(function(){for(var n,r=e.reactions;n=r.get();)D8(n,e);e.notified=!1,t&&!e.rejection&&VV(e)}))},F8=function(e,t,n){var r,s;ZV?((r=s0.createEvent("Event")).promise=t,r.reason=n,r.initEvent(e,!1,!0),Mi.dispatchEvent(r)):r={promise:t,reason:n},!YV&&(s=Mi["on"+e])?s(r):e===R8&&function(a,l){try{arguments.length===1?console.error(a):console.error(a,l)}catch(c){}}("Unhandled promise rejection",n)},VV=function(e){Os(A8,Mi,function(){var t,n=e.facade,r=e.value;if($8(e)&&(t=WV(function(){ou?a0.emit("unhandledRejection",r,n):F8(R8,n,r)}),e.rejection=ou||$8(e)?2:1,t.error))throw t.value})},$8=function(e){return e.rejection!==1&&!e.parent},eee=function(e){Os(A8,Mi,function(){var t=e.facade;ou?a0.emit("rejectionHandled",t):F8("rejectionhandled",t,e.value)})},Ls=function(e,t,n){return function(r){e(t,r,n)}},Rs=function(e,t,n){e.done||(e.done=!0,n&&(e=n),e.value=t,e.state=2,M8(e,!0))},c0=function(e,t,n){if(!e.done){e.done=!0,n&&(e=n);try{if(e.facade===t)throw new L8("Promise can't be resolved itself");var r=P8(t);r?i0(function(){var s={done:!1};try{Os(r,t,Ls(c0,s,e),Ls(Rs,s,e))}catch(a){Rs(s,a,e)}}):(e.value=t,e.state=1,M8(e,!1))}catch(s){Rs({done:!1},s,e)}}};if(B8&&(cu=(Bs=function(e){HV(this,cu),jV(e),Os(r0,this);var t=o0(this);try{e(Ls(c0,t),Ls(Rs,t))}catch(n){Rs(t,n)}}).prototype,(r0=function(e){XV(this,{type:lu,done:!1,notified:!1,parent:!1,reactions:new KV,rejection:!1,state:0,value:void 0})}).prototype=N8(cu,"then",function(e,t){var n=o0(this),r=l0(GV(this,Bs));return n.parent=!0,r.ok=!su(e)||e,r.fail=su(t)&&t,r.domain=ou?a0.domain:void 0,n.state===0?n.reactions.add(r):i0(function(){D8(r,n)}),r.promise}),x8=function(){var e=new r0,t=o0(e);this.promise=e,this.resolve=Ls(c0,t),this.reject=Ls(Rs,t)},I8.f=l0=function(e){return e===Bs||e===void 0?new x8(e):QV(e)},su(au)&&Is!==Object.prototype)){k8=Is.then,JV||N8(Is,"then",function(e,t){var n=this;return new Bs(function(r,s){Os(k8,n,r,s)}).then(e,t)},{unsafe:!0});try{delete Is.constructor}catch(e){}T8&&T8(Is,cu)}zV({global:!0,constructor:!0,wrap:!0,forced:B8},{Promise:Bs}),UV(Bs,lu,!1),function(e){var t=nV(e);iV&&t&&!t[n8]&&rV(t,n8,{configurable:!0,get:function(){return this}})}(lu);var tee=wo,nee=$t,ree=Gt,iee=wd,oee=D6,see=Va,z8=vd,aee=cm,lee=zd,U8=P6,cee=TypeError,du=function(e,t){this.stopped=e,this.result=t},j8=du.prototype,q8=function(e,t,n){var r,s,a,l,c,u,d,f=n&&n.that,p=!(!n||!n.AS_ENTRIES),g=!(!n||!n.IS_RECORD),v=!(!n||!n.IS_ITERATOR),b=!(!n||!n.INTERRUPTED),w=tee(t,f),_=function(k){return r&&U8(r,"normal",k),new du(!0,k)},C=function(k){return p?(ree(k),b?w(k[0],k[1],_):w(k[0],k[1])):b?w(k,_):w(k)};if(g)r=e.iterator;else if(v)r=e;else{if(!(s=lee(e)))throw new cee(iee(e)+" is not iterable");if(oee(s)){for(a=0,l=see(e);l>a;a++)if((c=C(e[a]))&&z8(j8,c))return c;return new du(!1)}r=aee(e,s)}for(u=g?e.next:r.next;!(d=nee(u,r)).done;){try{c=C(d.value)}catch(k){U8(r,"throw",k)}if(typeof c=="object"&&c&&z8(j8,c))return c}return new du(!1)},H8=St("iterator"),G8=!1;try{var dee=0,W8={next:function(){return{done:!!dee++}},return:function(){G8=!0}};W8[H8]=function(){return this},Array.from(W8,function(){throw 2})}catch(e){}var uee=iu,K8=xo.CONSTRUCTOR||!function(e,t){try{if(!t&&!G8)return!1}catch(s){return!1}var n=!1;try{var r={};r[H8]=function(){return{next:function(){return{done:n=!0}}}},e(r)}catch(s){}return n}(function(e){uee.all(e).then(void 0,function(){})}),fee=$t,hee=Bi,pee=As,gee=t0,mee=q8;wn({target:"Promise",stat:!0,forced:K8},{all:function(e){var t=this,n=pee.f(t),r=n.resolve,s=n.reject,a=gee(function(){var l=hee(t.resolve),c=[],u=0,d=1;mee(e,function(f){var p=u++,g=!1;d++,fee(l,t,f).then(function(v){g||(g=!0,c[p]=v,--d||r(c))},s)}),--d||r(c)});return a.error&&s(a.value),n.promise}});var vee=wn,yee=xo.CONSTRUCTOR,d0=iu,bee=vo,wee=yt,_ee=sr,Y8=d0&&d0.prototype;if(vee({target:"Promise",proto:!0,forced:yee,real:!0},{catch:function(e){return this.then(void 0,e)}}),wee(d0)){var J8=bee("Promise").prototype.catch;Y8.catch!==J8&&_ee(Y8,"catch",J8,{unsafe:!0})}var Cee=$t,See=Bi,Eee=As,xee=t0,kee=q8;wn({target:"Promise",stat:!0,forced:K8},{race:function(e){var t=this,n=Eee.f(t),r=n.reject,s=xee(function(){var a=See(t.resolve);kee(e,function(l){Cee(a,t,l).then(n.resolve,r)})});return s.error&&r(s.value),n.promise}});var Nee=As;wn({target:"Promise",stat:!0,forced:xo.CONSTRUCTOR},{reject:function(e){var t=Nee.f(this);return(0,t.reject)(e),t.promise}});var Tee=Gt,Aee=Dn,Oee=As,Iee=wn,Bee=xo.CONSTRUCTOR;vo("Promise"),Iee({target:"Promise",stat:!0,forced:Bee},{resolve:function(e){return function(t,n){if(Tee(t),Aee(n)&&n.constructor===t)return n;var r=Oee.f(t);return(0,r.resolve)(n),r.promise}(this,e)}});var uu,vl,X8={exports:{}},Q8={exports:{}};uu="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",vl={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&vl.rotl(e,8)|4278255360&vl.rotl(e,24);for(var t=0;t<e.length;t++)e[t]=vl.endian(e[t]);return e},randomBytes:function(e){for(var t=[];e>0;e--)t.push(Math.floor(256*Math.random()));return t},bytesToWords:function(e){for(var t=[],n=0,r=0;n<e.length;n++,r+=8)t[r>>>5]|=e[n]<<24-r%32;return t},wordsToBytes:function(e){for(var t=[],n=0;n<32*e.length;n+=8)t.push(e[n>>>5]>>>24-n%32&255);return t},bytesToHex:function(e){for(var t=[],n=0;n<e.length;n++)t.push((e[n]>>>4).toString(16)),t.push((15&e[n]).toString(16));return t.join("")},hexToBytes:function(e){for(var t=[],n=0;n<e.length;n+=2)t.push(parseInt(e.substr(n,2),16));return t},bytesToBase64:function(e){for(var t=[],n=0;n<e.length;n+=3)for(var r=e[n]<<16|e[n+1]<<8|e[n+2],s=0;s<4;s++)8*n+6*s<=8*e.length?t.push(uu.charAt(r>>>6*(3-s)&63)):t.push("=");return t.join("")},base64ToBytes:function(e){e=e.replace(/[^A-Z0-9+\/]/gi,"");for(var t=[],n=0,r=0;n<e.length;r=++n%4)r!=0&&t.push((uu.indexOf(e.charAt(n-1))&Math.pow(2,-2*r+8)-1)<<2*r|uu.indexOf(e.charAt(n))>>>6-2*r);return t}},Q8.exports=vl;var Lee=Q8.exports,u0={utf8:{stringToBytes:function(e){return u0.bin.stringToBytes(unescape(encodeURIComponent(e)))},bytesToString:function(e){return decodeURIComponent(escape(u0.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("")}}},Z8=u0,Ree=function(e){return e!=null&&(V8(e)||function(t){return typeof t.readFloatLE=="function"&&typeof t.slice=="function"&&V8(t.slice(0,0))}(e)||!!e._isBuffer)};function V8(e){return!!e.constructor&&typeof e.constructor.isBuffer=="function"&&e.constructor.isBuffer(e)}(function(){var e=Lee,t=Z8.utf8,n=Ree,r=Z8.bin,s=function(a,l){a.constructor==String?a=l&&l.encoding==="binary"?r.stringToBytes(a):t.stringToBytes(a):n(a)?a=Array.prototype.slice.call(a,0):Array.isArray(a)||a.constructor===Uint8Array||(a=a.toString());for(var c=e.bytesToWords(a),u=8*a.length,d=1732584193,f=-271733879,p=-1732584194,g=271733878,v=0;v<c.length;v++)c[v]=16711935&(c[v]<<8|c[v]>>>24)|4278255360&(c[v]<<24|c[v]>>>8);c[u>>>5]|=128<<u%32,c[14+(u+64>>>9<<4)]=u;var b=s._ff,w=s._gg,_=s._hh,C=s._ii;for(v=0;v<c.length;v+=16){var k=d,S=f,E=p,N=g;d=b(d,f,p,g,c[v+0],7,-680876936),g=b(g,d,f,p,c[v+1],12,-389564586),p=b(p,g,d,f,c[v+2],17,606105819),f=b(f,p,g,d,c[v+3],22,-1044525330),d=b(d,f,p,g,c[v+4],7,-176418897),g=b(g,d,f,p,c[v+5],12,1200080426),p=b(p,g,d,f,c[v+6],17,-1473231341),f=b(f,p,g,d,c[v+7],22,-45705983),d=b(d,f,p,g,c[v+8],7,1770035416),g=b(g,d,f,p,c[v+9],12,-1958414417),p=b(p,g,d,f,c[v+10],17,-42063),f=b(f,p,g,d,c[v+11],22,-1990404162),d=b(d,f,p,g,c[v+12],7,1804603682),g=b(g,d,f,p,c[v+13],12,-40341101),p=b(p,g,d,f,c[v+14],17,-1502002290),d=w(d,f=b(f,p,g,d,c[v+15],22,1236535329),p,g,c[v+1],5,-165796510),g=w(g,d,f,p,c[v+6],9,-1069501632),p=w(p,g,d,f,c[v+11],14,643717713),f=w(f,p,g,d,c[v+0],20,-373897302),d=w(d,f,p,g,c[v+5],5,-701558691),g=w(g,d,f,p,c[v+10],9,38016083),p=w(p,g,d,f,c[v+15],14,-660478335),f=w(f,p,g,d,c[v+4],20,-405537848),d=w(d,f,p,g,c[v+9],5,568446438),g=w(g,d,f,p,c[v+14],9,-1019803690),p=w(p,g,d,f,c[v+3],14,-187363961),f=w(f,p,g,d,c[v+8],20,1163531501),d=w(d,f,p,g,c[v+13],5,-1444681467),g=w(g,d,f,p,c[v+2],9,-51403784),p=w(p,g,d,f,c[v+7],14,1735328473),d=_(d,f=w(f,p,g,d,c[v+12],20,-1926607734),p,g,c[v+5],4,-378558),g=_(g,d,f,p,c[v+8],11,-2022574463),p=_(p,g,d,f,c[v+11],16,1839030562),f=_(f,p,g,d,c[v+14],23,-35309556),d=_(d,f,p,g,c[v+1],4,-1530992060),g=_(g,d,f,p,c[v+4],11,1272893353),p=_(p,g,d,f,c[v+7],16,-155497632),f=_(f,p,g,d,c[v+10],23,-1094730640),d=_(d,f,p,g,c[v+13],4,681279174),g=_(g,d,f,p,c[v+0],11,-358537222),p=_(p,g,d,f,c[v+3],16,-722521979),f=_(f,p,g,d,c[v+6],23,76029189),d=_(d,f,p,g,c[v+9],4,-640364487),g=_(g,d,f,p,c[v+12],11,-421815835),p=_(p,g,d,f,c[v+15],16,530742520),d=C(d,f=_(f,p,g,d,c[v+2],23,-995338651),p,g,c[v+0],6,-198630844),g=C(g,d,f,p,c[v+7],10,1126891415),p=C(p,g,d,f,c[v+14],15,-1416354905),f=C(f,p,g,d,c[v+5],21,-57434055),d=C(d,f,p,g,c[v+12],6,1700485571),g=C(g,d,f,p,c[v+3],10,-1894986606),p=C(p,g,d,f,c[v+10],15,-1051523),f=C(f,p,g,d,c[v+1],21,-2054922799),d=C(d,f,p,g,c[v+8],6,1873313359),g=C(g,d,f,p,c[v+15],10,-30611744),p=C(p,g,d,f,c[v+6],15,-1560198380),f=C(f,p,g,d,c[v+13],21,1309151649),d=C(d,f,p,g,c[v+4],6,-145523070),g=C(g,d,f,p,c[v+11],10,-1120210379),p=C(p,g,d,f,c[v+2],15,718787259),f=C(f,p,g,d,c[v+9],21,-343485551),d=d+k>>>0,f=f+S>>>0,p=p+E>>>0,g=g+N>>>0}return e.endian([d,f,p,g])};s._ff=function(a,l,c,u,d,f,p){var g=a+(l&c|~l&u)+(d>>>0)+p;return(g<<f|g>>>32-f)+l},s._gg=function(a,l,c,u,d,f,p){var g=a+(l&u|c&~u)+(d>>>0)+p;return(g<<f|g>>>32-f)+l},s._hh=function(a,l,c,u,d,f,p){var g=a+(l^c^u)+(d>>>0)+p;return(g<<f|g>>>32-f)+l},s._ii=function(a,l,c,u,d,f,p){var g=a+(c^(l|~u))+(d>>>0)+p;return(g<<f|g>>>32-f)+l},s._blocksize=16,s._digestsize=16,X8.exports=function(a,l){if(a==null)throw new Error("Illegal argument "+a);var c=e.wordsToBytes(s(a,l));return l&&l.asBytes?c:l&&l.asString?r.bytesToString(c):e.bytesToHex(c)}})();var e5=function(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}(X8.exports),f0={exports:{}};(function(e,t){(function(n,r){var s="function",a="undefined",l="object",c="string",u="major",d="model",f="name",p="type",g="vendor",v="version",b="architecture",w="console",_="mobile",C="tablet",k="smarttv",S="wearable",E="embedded",N="Amazon",A="Apple",I="ASUS",O="BlackBerry",F="Browser",P="Chrome",M="Firefox",W="Google",U="Huawei",Q="LG",q="Microsoft",D="Motorola",j="Opera",K="Samsung",H="Sharp",R="Sony",ie="Xiaomi",ee="Zebra",Y="Facebook",J="Chromium OS",oe="Mac OS",re=function(Ee){for(var Te={},ke=0;ke<Ee.length;ke++)Te[Ee[ke].toUpperCase()]=Ee[ke];return Te},z=function(Ee,Te){return typeof Ee===c&&G(Te).indexOf(G(Ee))!==-1},G=function(Ee){return Ee.toLowerCase()},te=function(Ee,Te){if(typeof Ee===c)return Ee=Ee.replace(/^\s\s*/,""),typeof Te===a?Ee:Ee.substring(0,500)},le=function(Ee,Te){for(var ke,We,gt,Le,Et,ge,ae=0;ae<Te.length&&!Et;){var Me=Te[ae],nt=Te[ae+1];for(ke=We=0;ke<Me.length&&!Et&&Me[ke];)if(Et=Me[ke++].exec(Ee))for(gt=0;gt<nt.length;gt++)ge=Et[++We],typeof(Le=nt[gt])===l&&Le.length>0?Le.length===2?typeof Le[1]==s?this[Le[0]]=Le[1].call(this,ge):this[Le[0]]=Le[1]:Le.length===3?typeof Le[1]!==s||Le[1].exec&&Le[1].test?this[Le[0]]=ge?ge.replace(Le[1],Le[2]):r:this[Le[0]]=ge?Le[1].call(this,ge,Le[2]):r:Le.length===4&&(this[Le[0]]=ge?Le[3].call(this,ge.replace(Le[1],Le[2])):r):this[Le]=ge||r;ae+=2}},de=function(Ee,Te){for(var ke in Te)if(typeof Te[ke]===l&&Te[ke].length>0){for(var We=0;We<Te[ke].length;We++)if(z(Te[ke][We],Ee))return ke==="?"?r:ke}else if(z(Te[ke],Ee))return ke==="?"?r:ke;return Ee},ye={ME:"4.90","NT 3.11":"NT3.51","NT 4.0":"NT4.0",2e3:"NT 5.0",XP:["NT 5.1","NT 5.2"],Vista:"NT 6.0",7:"NT 6.1",8:"NT 6.2",8.1:"NT 6.3",10:["NT 6.4","NT 10.0"],RT:"ARM"},be={browser:[[/\b(?:crmo|crios)\/([\w\.]+)/i],[v,[f,"Chrome"]],[/edg(?:e|ios|a)?\/([\w\.]+)/i],[v,[f,"Edge"]],[/(opera mini)\/([-\w\.]+)/i,/(opera [mobiletab]{3,6})\b.+version\/([-\w\.]+)/i,/(opera)(?:.+version\/|[\/ ]+)([\w\.]+)/i],[f,v],[/opios[\/ ]+([\w\.]+)/i],[v,[f,j+" Mini"]],[/\bopr\/([\w\.]+)/i],[v,[f,j]],[/\bb[ai]*d(?:uhd|[ub]*[aekoprswx]{5,6})[\/ ]?([\w\.]+)/i],[v,[f,"Baidu"]],[/(kindle)\/([\w\.]+)/i,/(lunascape|maxthon|netfront|jasmine|blazer)[\/ ]?([\w\.]*)/i,/(avant|iemobile|slim)\s?(?:browser)?[\/ ]?([\w\.]*)/i,/(?:ms|\()(ie) ([\w\.]+)/i,/(flock|rockmelt|midori|epiphany|silk|skyfire|bolt|iron|vivaldi|iridium|phantomjs|bowser|quark|qupzilla|falkon|rekonq|puffin|brave|whale(?!.+naver)|qqbrowserlite|qq|duckduckgo)\/([-\w\.]+)/i,/(heytap|ovi)browser\/([\d\.]+)/i,/(weibo)__([\d\.]+)/i],[f,v],[/(?:\buc? ?browser|(?:juc.+)ucweb)[\/ ]?([\w\.]+)/i],[v,[f,"UC"+F]],[/microm.+\bqbcore\/([\w\.]+)/i,/\bqbcore\/([\w\.]+).+microm/i,/micromessenger\/([\w\.]+)/i],[v,[f,"WeChat"]],[/konqueror\/([\w\.]+)/i],[v,[f,"Konqueror"]],[/trident.+rv[: ]([\w\.]{1,9})\b.+like gecko/i],[v,[f,"IE"]],[/ya(?:search)?browser\/([\w\.]+)/i],[v,[f,"Yandex"]],[/slbrowser\/([\w\.]+)/i],[v,[f,"Smart Lenovo "+F]],[/(avast|avg)\/([\w\.]+)/i],[[f,/(.+)/,"$1 Secure "+F],v],[/\bfocus\/([\w\.]+)/i],[v,[f,M+" Focus"]],[/\bopt\/([\w\.]+)/i],[v,[f,j+" Touch"]],[/coc_coc\w+\/([\w\.]+)/i],[v,[f,"Coc Coc"]],[/dolfin\/([\w\.]+)/i],[v,[f,"Dolphin"]],[/coast\/([\w\.]+)/i],[v,[f,j+" Coast"]],[/miuibrowser\/([\w\.]+)/i],[v,[f,"MIUI "+F]],[/fxios\/([-\w\.]+)/i],[v,[f,M]],[/\bqihu|(qi?ho?o?|360)browser/i],[[f,"360 "+F]],[/(oculus|sailfish|huawei|vivo)browser\/([\w\.]+)/i],[[f,/(.+)/,"$1 "+F],v],[/samsungbrowser\/([\w\.]+)/i],[v,[f,K+" Internet"]],[/(comodo_dragon)\/([\w\.]+)/i],[[f,/_/g," "],v],[/metasr[\/ ]?([\d\.]+)/i],[v,[f,"Sogou Explorer"]],[/(sogou)mo\w+\/([\d\.]+)/i],[[f,"Sogou Mobile"],v],[/(electron)\/([\w\.]+) safari/i,/(tesla)(?: qtcarbrowser|\/(20\d\d\.[-\w\.]+))/i,/m?(qqbrowser|2345Explorer)[\/ ]?([\w\.]+)/i],[f,v],[/(lbbrowser)/i,/\[(linkedin)app\]/i],[f],[/((?:fban\/fbios|fb_iab\/fb4a)(?!.+fbav)|;fbav\/([\w\.]+);)/i],[[f,Y],v],[/(Klarna)\/([\w\.]+)/i,/(kakao(?:talk|story))[\/ ]([\w\.]+)/i,/(naver)\(.*?(\d+\.[\w\.]+).*\)/i,/safari (line)\/([\w\.]+)/i,/\b(line)\/([\w\.]+)\/iab/i,/(alipay)client\/([\w\.]+)/i,/(chromium|instagram|snapchat)[\/ ]([-\w\.]+)/i],[f,v],[/\bgsa\/([\w\.]+) .*safari\//i],[v,[f,"GSA"]],[/musical_ly(?:.+app_?version\/|_)([\w\.]+)/i],[v,[f,"TikTok"]],[/headlesschrome(?:\/([\w\.]+)| )/i],[v,[f,P+" Headless"]],[/ wv\).+(chrome)\/([\w\.]+)/i],[[f,P+" WebView"],v],[/droid.+ version\/([\w\.]+)\b.+(?:mobile safari|safari)/i],[v,[f,"Android "+F]],[/(chrome|omniweb|arora|[tizenoka]{5} ?browser)\/v?([\w\.]+)/i],[f,v],[/version\/([\w\.\,]+) .*mobile\/\w+ (safari)/i],[v,[f,"Mobile Safari"]],[/version\/([\w(\.|\,)]+) .*(mobile ?safari|safari)/i],[v,f],[/webkit.+?(mobile ?safari|safari)(\/[\w\.]+)/i],[f,[v,de,{"1.0":"/8",1.2:"/1",1.3:"/3","2.0":"/412","2.0.2":"/416","2.0.3":"/417","2.0.4":"/419","?":"/"}]],[/(webkit|khtml)\/([\w\.]+)/i],[f,v],[/(navigator|netscape\d?)\/([-\w\.]+)/i],[[f,"Netscape"],v],[/mobile vr; rv:([\w\.]+)\).+firefox/i],[v,[f,M+" Reality"]],[/ekiohf.+(flow)\/([\w\.]+)/i,/(swiftfox)/i,/(icedragon|iceweasel|camino|chimera|fennec|maemo browser|minimo|conkeror|klar)[\/ ]?([\w\.\+]+)/i,/(seamonkey|k-meleon|icecat|iceape|firebird|phoenix|palemoon|basilisk|waterfox)\/([-\w\.]+)$/i,/(firefox)\/([\w\.]+)/i,/(mozilla)\/([\w\.]+) .+rv\:.+gecko\/\d+/i,/(polaris|lynx|dillo|icab|doris|amaya|w3m|netsurf|sleipnir|obigo|mosaic|(?:go|ice|up)[\. ]?browser)[-\/ ]?v?([\w\.]+)/i,/(links) \(([\w\.]+)/i,/panasonic;(viera)/i],[f,v],[/(cobalt)\/([\w\.]+)/i],[f,[v,/master.|lts./,""]]],cpu:[[/(?:(amd|x(?:(?:86|64)[-_])?|wow|win)64)[;\)]/i],[[b,"amd64"]],[/(ia32(?=;))/i],[[b,G]],[/((?:i[346]|x)86)[;\)]/i],[[b,"ia32"]],[/\b(aarch64|arm(v?8e?l?|_?64))\b/i],[[b,"arm64"]],[/\b(arm(?:v[67])?ht?n?[fl]p?)\b/i],[[b,"armhf"]],[/windows (ce|mobile); ppc;/i],[[b,"arm"]],[/((?:ppc|powerpc)(?:64)?)(?: mac|;|\))/i],[[b,/ower/,"",G]],[/(sun4\w)[;\)]/i],[[b,"sparc"]],[/((?:avr32|ia64(?=;))|68k(?=\))|\barm(?=v(?:[1-7]|[5-7]1)l?|;|eabi)|(?=atmel )avr|(?:irix|mips|sparc)(?:64)?\b|pa-risc)/i],[[b,G]]],device:[[/\b(sch-i[89]0\d|shw-m380s|sm-[ptx]\w{2,4}|gt-[pn]\d{2,4}|sgh-t8[56]9|nexus 10)/i],[d,[g,K],[p,C]],[/\b((?:s[cgp]h|gt|sm)-\w+|sc[g-]?[\d]+a?|galaxy nexus)/i,/samsung[- ]([-\w]+)/i,/sec-(sgh\w+)/i],[d,[g,K],[p,_]],[/(?:\/|\()(ip(?:hone|od)[\w, ]*)(?:\/|;)/i],[d,[g,A],[p,_]],[/\((ipad);[-\w\),; ]+apple/i,/applecoremedia\/[\w\.]+ \((ipad)/i,/\b(ipad)\d\d?,\d\d?[;\]].+ios/i],[d,[g,A],[p,C]],[/(macintosh);/i],[d,[g,A]],[/\b(sh-?[altvz]?\d\d[a-ekm]?)/i],[d,[g,H],[p,_]],[/\b((?:ag[rs][23]?|bah2?|sht?|btv)-a?[lw]\d{2})\b(?!.+d\/s)/i],[d,[g,U],[p,C]],[/(?:huawei|honor)([-\w ]+)[;\)]/i,/\b(nexus 6p|\w{2,4}e?-[atu]?[ln][\dx][012359c][adn]?)\b(?!.+d\/s)/i],[d,[g,U],[p,_]],[/\b(poco[\w ]+|m2\d{3}j\d\d[a-z]{2})(?: bui|\))/i,/\b; (\w+) build\/hm\1/i,/\b(hm[-_ ]?note?[_ ]?(?:\d\w)?) bui/i,/\b(redmi[\-_ ]?(?:note|k)?[\w_ ]+)(?: bui|\))/i,/oid[^\)]+; (m?[12][0-389][01]\w{3,6}[c-y])( bui|; wv|\))/i,/\b(mi[-_ ]?(?:a\d|one|one[_ ]plus|note lte|max|cc)?[_ ]?(?:\d?\w?)[_ ]?(?:plus|se|lite)?)(?: bui|\))/i],[[d,/_/g," "],[g,ie],[p,_]],[/oid[^\)]+; (2\d{4}(283|rpbf)[cgl])( bui|\))/i,/\b(mi[-_ ]?(?:pad)(?:[\w_ ]+))(?: bui|\))/i],[[d,/_/g," "],[g,ie],[p,C]],[/; (\w+) bui.+ oppo/i,/\b(cph[12]\d{3}|p(?:af|c[al]|d\w|e[ar])[mt]\d0|x9007|a101op)\b/i],[d,[g,"OPPO"],[p,_]],[/vivo (\w+)(?: bui|\))/i,/\b(v[12]\d{3}\w?[at])(?: bui|;)/i],[d,[g,"Vivo"],[p,_]],[/\b(rmx[1-3]\d{3})(?: bui|;|\))/i],[d,[g,"Realme"],[p,_]],[/\b(milestone|droid(?:[2-4x]| (?:bionic|x2|pro|razr))?:?( 4g)?)\b[\w ]+build\//i,/\bmot(?:orola)?[- ](\w*)/i,/((?:moto[\w\(\) ]+|xt\d{3,4}|nexus 6)(?= bui|\)))/i],[d,[g,D],[p,_]],[/\b(mz60\d|xoom[2 ]{0,2}) build\//i],[d,[g,D],[p,C]],[/((?=lg)?[vl]k\-?\d{3}) bui| 3\.[-\w; ]{10}lg?-([06cv9]{3,4})/i],[d,[g,Q],[p,C]],[/(lm(?:-?f100[nv]?|-[\w\.]+)(?= bui|\))|nexus [45])/i,/\blg[-e;\/ ]+((?!browser|netcast|android tv)\w+)/i,/\blg-?([\d\w]+) bui/i],[d,[g,Q],[p,_]],[/(ideatab[-\w ]+)/i,/lenovo ?(s[56]000[-\w]+|tab(?:[\w ]+)|yt[-\d\w]{6}|tb[-\d\w]{6})/i],[d,[g,"Lenovo"],[p,C]],[/(?:maemo|nokia).*(n900|lumia \d+)/i,/nokia[-_ ]?([-\w\.]*)/i],[[d,/_/g," "],[g,"Nokia"],[p,_]],[/(pixel c)\b/i],[d,[g,W],[p,C]],[/droid.+; (pixel[\daxl ]{0,6})(?: bui|\))/i],[d,[g,W],[p,_]],[/droid.+ (a?\d[0-2]{2}so|[c-g]\d{4}|so[-gl]\w+|xq-a\w[4-7][12])(?= bui|\).+chrome\/(?![1-6]{0,1}\d\.))/i],[d,[g,R],[p,_]],[/sony tablet [ps]/i,/\b(?:sony)?sgp\w+(?: bui|\))/i],[[d,"Xperia Tablet"],[g,R],[p,C]],[/ (kb2005|in20[12]5|be20[12][59])\b/i,/(?:one)?(?:plus)? (a\d0\d\d)(?: b|\))/i],[d,[g,"OnePlus"],[p,_]],[/(alexa)webm/i,/(kf[a-z]{2}wi|aeo[c-r]{2})( bui|\))/i,/(kf[a-z]+)( bui|\)).+silk\//i],[d,[g,N],[p,C]],[/((?:sd|kf)[0349hijorstuw]+)( bui|\)).+silk\//i],[[d,/(.+)/g,"Fire Phone $1"],[g,N],[p,_]],[/(playbook);[-\w\),; ]+(rim)/i],[d,g,[p,C]],[/\b((?:bb[a-f]|st[hv])100-\d)/i,/\(bb10; (\w+)/i],[d,[g,O],[p,_]],[/(?:\b|asus_)(transfo[prime ]{4,10} \w+|eeepc|slider \w+|nexus 7|padfone|p00[cj])/i],[d,[g,I],[p,C]],[/ (z[bes]6[027][012][km][ls]|zenfone \d\w?)\b/i],[d,[g,I],[p,_]],[/(nexus 9)/i],[d,[g,"HTC"],[p,C]],[/(htc)[-;_ ]{1,2}([\w ]+(?=\)| bui)|\w+)/i,/(zte)[- ]([\w ]+?)(?: bui|\/|\))/i,/(alcatel|geeksphone|nexian|panasonic(?!(?:;|\.))|sony(?!-bra))[-_ ]?([-\w]*)/i],[g,[d,/_/g," "],[p,_]],[/droid.+; ([ab][1-7]-?[0178a]\d\d?)/i],[d,[g,"Acer"],[p,C]],[/droid.+; (m[1-5] note) bui/i,/\bmz-([-\w]{2,})/i],[d,[g,"Meizu"],[p,_]],[/; ((?:power )?armor(?:[\w ]{0,8}))(?: bui|\))/i],[d,[g,"Ulefone"],[p,_]],[/(blackberry|benq|palm(?=\-)|sonyericsson|acer|asus|dell|meizu|motorola|polytron|infinix|tecno)[-_ ]?([-\w]*)/i,/(hp) ([\w ]+\w)/i,/(asus)-?(\w+)/i,/(microsoft); (lumia[\w ]+)/i,/(lenovo)[-_ ]?([-\w]+)/i,/(jolla)/i,/(oppo) ?([\w ]+) bui/i],[g,d,[p,_]],[/(kobo)\s(ereader|touch)/i,/(archos) (gamepad2?)/i,/(hp).+(touchpad(?!.+tablet)|tablet)/i,/(kindle)\/([\w\.]+)/i,/(nook)[\w ]+build\/(\w+)/i,/(dell) (strea[kpr\d ]*[\dko])/i,/(le[- ]+pan)[- ]+(\w{1,9}) bui/i,/(trinity)[- ]*(t\d{3}) bui/i,/(gigaset)[- ]+(q\w{1,9}) bui/i,/(vodafone) ([\w ]+)(?:\)| bui)/i],[g,d,[p,C]],[/(surface duo)/i],[d,[g,q],[p,C]],[/droid [\d\.]+; (fp\du?)(?: b|\))/i],[d,[g,"Fairphone"],[p,_]],[/(u304aa)/i],[d,[g,"AT&T"],[p,_]],[/\bsie-(\w*)/i],[d,[g,"Siemens"],[p,_]],[/\b(rct\w+) b/i],[d,[g,"RCA"],[p,C]],[/\b(venue[\d ]{2,7}) b/i],[d,[g,"Dell"],[p,C]],[/\b(q(?:mv|ta)\w+) b/i],[d,[g,"Verizon"],[p,C]],[/\b(?:barnes[& ]+noble |bn[rt])([\w\+ ]*) b/i],[d,[g,"Barnes & Noble"],[p,C]],[/\b(tm\d{3}\w+) b/i],[d,[g,"NuVision"],[p,C]],[/\b(k88) b/i],[d,[g,"ZTE"],[p,C]],[/\b(nx\d{3}j) b/i],[d,[g,"ZTE"],[p,_]],[/\b(gen\d{3}) b.+49h/i],[d,[g,"Swiss"],[p,_]],[/\b(zur\d{3}) b/i],[d,[g,"Swiss"],[p,C]],[/\b((zeki)?tb.*\b) b/i],[d,[g,"Zeki"],[p,C]],[/\b([yr]\d{2}) b/i,/\b(dragon[- ]+touch |dt)(\w{5}) b/i],[[g,"Dragon Touch"],d,[p,C]],[/\b(ns-?\w{0,9}) b/i],[d,[g,"Insignia"],[p,C]],[/\b((nxa|next)-?\w{0,9}) b/i],[d,[g,"NextBook"],[p,C]],[/\b(xtreme\_)?(v(1[045]|2[015]|[3469]0|7[05])) b/i],[[g,"Voice"],d,[p,_]],[/\b(lvtel\-)?(v1[12]) b/i],[[g,"LvTel"],d,[p,_]],[/\b(ph-1) /i],[d,[g,"Essential"],[p,_]],[/\b(v(100md|700na|7011|917g).*\b) b/i],[d,[g,"Envizen"],[p,C]],[/\b(trio[-\w\. ]+) b/i],[d,[g,"MachSpeed"],[p,C]],[/\btu_(1491) b/i],[d,[g,"Rotor"],[p,C]],[/(shield[\w ]+) b/i],[d,[g,"Nvidia"],[p,C]],[/(sprint) (\w+)/i],[g,d,[p,_]],[/(kin\.[onetw]{3})/i],[[d,/\./g," "],[g,q],[p,_]],[/droid.+; (cc6666?|et5[16]|mc[239][23]x?|vc8[03]x?)\)/i],[d,[g,ee],[p,C]],[/droid.+; (ec30|ps20|tc[2-8]\d[kx])\)/i],[d,[g,ee],[p,_]],[/smart-tv.+(samsung)/i],[g,[p,k]],[/hbbtv.+maple;(\d+)/i],[[d,/^/,"SmartTV"],[g,K],[p,k]],[/(nux; netcast.+smarttv|lg (netcast\.tv-201\d|android tv))/i],[[g,Q],[p,k]],[/(apple) ?tv/i],[g,[d,A+" TV"],[p,k]],[/crkey/i],[[d,P+"cast"],[g,W],[p,k]],[/droid.+aft(\w+)( bui|\))/i],[d,[g,N],[p,k]],[/\(dtv[\);].+(aquos)/i,/(aquos-tv[\w ]+)\)/i],[d,[g,H],[p,k]],[/(bravia[\w ]+)( bui|\))/i],[d,[g,R],[p,k]],[/(mitv-\w{5}) bui/i],[d,[g,ie],[p,k]],[/Hbbtv.*(technisat) (.*);/i],[g,d,[p,k]],[/\b(roku)[\dx]*[\)\/]((?:dvp-)?[\d\.]*)/i,/hbbtv\/\d+\.\d+\.\d+ +\([\w\+ ]*; *([\w\d][^;]*);([^;]*)/i],[[g,te],[d,te],[p,k]],[/\b(android tv|smart[- ]?tv|opera tv|tv; rv:)\b/i],[[p,k]],[/(ouya)/i,/(nintendo) ([wids3utch]+)/i],[g,d,[p,w]],[/droid.+; (shield) bui/i],[d,[g,"Nvidia"],[p,w]],[/(playstation [345portablevi]+)/i],[d,[g,R],[p,w]],[/\b(xbox(?: one)?(?!; xbox))[\); ]/i],[d,[g,q],[p,w]],[/((pebble))app/i],[g,d,[p,S]],[/(watch)(?: ?os[,\/]|\d,\d\/)[\d\.]+/i],[d,[g,A],[p,S]],[/droid.+; (glass) \d/i],[d,[g,W],[p,S]],[/droid.+; (wt63?0{2,3})\)/i],[d,[g,ee],[p,S]],[/(quest( 2| pro)?)/i],[d,[g,Y],[p,S]],[/(tesla)(?: qtcarbrowser|\/[-\w\.]+)/i],[g,[p,E]],[/(aeobc)\b/i],[d,[g,N],[p,E]],[/droid .+?; ([^;]+?)(?: bui|; wv\)|\) applew).+? mobile safari/i],[d,[p,_]],[/droid .+?; ([^;]+?)(?: bui|\) applew).+?(?! mobile) safari/i],[d,[p,C]],[/\b((tablet|tab)[;\/]|focus\/\d(?!.+mobile))/i],[[p,C]],[/(phone|mobile(?:[;\/]| [ \w\/\.]*safari)|pda(?=.+windows ce))/i],[[p,_]],[/(android[-\w\. ]{0,9});.+buil/i],[d,[g,"Generic"]]],engine:[[/windows.+ edge\/([\w\.]+)/i],[v,[f,"EdgeHTML"]],[/webkit\/537\.36.+chrome\/(?!27)([\w\.]+)/i],[v,[f,"Blink"]],[/(presto)\/([\w\.]+)/i,/(webkit|trident|netfront|netsurf|amaya|lynx|w3m|goanna)\/([\w\.]+)/i,/ekioh(flow)\/([\w\.]+)/i,/(khtml|tasman|links)[\/ ]\(?([\w\.]+)/i,/(icab)[\/ ]([23]\.[\d\.]+)/i,/\b(libweb)/i],[f,v],[/rv\:([\w\.]{1,9})\b.+(gecko)/i],[v,f]],os:[[/microsoft (windows) (vista|xp)/i],[f,v],[/(windows (?:phone(?: os)?|mobile))[\/ ]?([\d\.\w ]*)/i],[f,[v,de,ye]],[/windows nt 6\.2; (arm)/i,/windows[\/ ]?([ntce\d\. ]+\w)(?!.+xbox)/i,/(?:win(?=3|9|n)|win 9x )([nt\d\.]+)/i],[[v,de,ye],[f,"Windows"]],[/ip[honead]{2,4}\b(?:.*os ([\w]+) like mac|; opera)/i,/(?:ios;fbsv\/|iphone.+ios[\/ ])([\d\.]+)/i,/cfnetwork\/.+darwin/i],[[v,/_/g,"."],[f,"iOS"]],[/(mac os x) ?([\w\. ]*)/i,/(macintosh|mac_powerpc\b)(?!.+haiku)/i],[[f,oe],[v,/_/g,"."]],[/droid ([\w\.]+)\b.+(android[- ]x86|harmonyos)/i],[v,f],[/(android|webos|qnx|bada|rim tablet os|maemo|meego|sailfish)[-\/ ]?([\w\.]*)/i,/(blackberry)\w*\/([\w\.]*)/i,/(tizen|kaios)[\/ ]([\w\.]+)/i,/\((series40);/i],[f,v],[/\(bb(10);/i],[v,[f,O]],[/(?:symbian ?os|symbos|s60(?=;)|series60)[-\/ ]?([\w\.]*)/i],[v,[f,"Symbian"]],[/mozilla\/[\d\.]+ \((?:mobile|tablet|tv|mobile; [\w ]+); rv:.+ gecko\/([\w\.]+)/i],[v,[f,M+" OS"]],[/web0s;.+rt(tv)/i,/\b(?:hp)?wos(?:browser)?\/([\w\.]+)/i],[v,[f,"webOS"]],[/watch(?: ?os[,\/]|\d,\d\/)([\d\.]+)/i],[v,[f,"watchOS"]],[/crkey\/([\d\.]+)/i],[v,[f,P+"cast"]],[/(cros) [\w]+(?:\)| ([\w\.]+)\b)/i],[[f,J],v],[/panasonic;(viera)/i,/(netrange)mmh/i,/(nettv)\/(\d+\.[\w\.]+)/i,/(nintendo|playstation) ([wids345portablevuch]+)/i,/(xbox); +xbox ([^\);]+)/i,/\b(joli|palm)\b ?(?:os)?\/?([\w\.]*)/i,/(mint)[\/\(\) ]?(\w*)/i,/(mageia|vectorlinux)[; ]/i,/([kxln]?ubuntu|debian|suse|opensuse|gentoo|arch(?= linux)|slackware|fedora|mandriva|centos|pclinuxos|red ?hat|zenwalk|linpus|raspbian|plan 9|minix|risc os|contiki|deepin|manjaro|elementary os|sabayon|linspire)(?: gnu\/linux)?(?: enterprise)?(?:[- ]linux)?(?:-gnu)?[-\/ ]?(?!chrom|package)([-\w\.]*)/i,/(hurd|linux) ?([\w\.]*)/i,/(gnu) ?([\w\.]*)/i,/\b([-frentopcghs]{0,5}bsd|dragonfly)[\/ ]?(?!amd|[ix346]{1,2}86)([\w\.]*)/i,/(haiku) (\w+)/i],[f,v],[/(sunos) ?([\w\.\d]*)/i],[[f,"Solaris"],v],[/((?:open)?solaris)[-\/ ]?([\w\.]*)/i,/(aix) ((\d)(?=\.|\)| )[\w\.])*/i,/\b(beos|os\/2|amigaos|morphos|openvms|fuchsia|hp-ux|serenityos)/i,/(unix) ?([\w\.]*)/i],[f,v]]},Se=function(Ee,Te){if(typeof Ee===l&&(Te=Ee,Ee=r),!(this instanceof Se))return new Se(Ee,Te).getResult();var ke=typeof n!==a&&n.navigator?n.navigator:r,We=Ee||(ke&&ke.userAgent?ke.userAgent:""),gt=ke&&ke.userAgentData?ke.userAgentData:r,Le=Te?function(ge,ae){var Me={};for(var nt in ge)ae[nt]&&ae[nt].length%2==0?Me[nt]=ae[nt].concat(ge[nt]):Me[nt]=ge[nt];return Me}(be,Te):be,Et=ke&&ke.userAgent==We;return this.getBrowser=function(){var ge={};return ge[f]=r,ge[v]=r,le.call(ge,We,Le.browser),ge[u]=function(ae){return typeof ae===c?ae.replace(/[^\d\.]/g,"").split(".")[0]:r}(ge[v]),Et&&ke&&ke.brave&&typeof ke.brave.isBrave==s&&(ge[f]="Brave"),ge},this.getCPU=function(){var ge={};return ge[b]=r,le.call(ge,We,Le.cpu),ge},this.getDevice=function(){var ge={};return ge[g]=r,ge[d]=r,ge[p]=r,le.call(ge,We,Le.device),Et&&!ge[p]&>&>.mobile&&(ge[p]=_),Et&&ge[d]=="Macintosh"&&ke&&typeof ke.standalone!==a&&ke.maxTouchPoints&&ke.maxTouchPoints>2&&(ge[d]="iPad",ge[p]=C),ge},this.getEngine=function(){var ge={};return ge[f]=r,ge[v]=r,le.call(ge,We,Le.engine),ge},this.getOS=function(){var ge={};return ge[f]=r,ge[v]=r,le.call(ge,We,Le.os),Et&&!ge[f]&>&>.platform!="Unknown"&&(ge[f]=gt.platform.replace(/chrome os/i,J).replace(/macos/i,oe)),ge},this.getResult=function(){return{ua:this.getUA(),browser:this.getBrowser(),engine:this.getEngine(),os:this.getOS(),device:this.getDevice(),cpu:this.getCPU()}},this.getUA=function(){return We},this.setUA=function(ge){return We=typeof ge===c&&ge.length>500?te(ge,500):ge,this},this.setUA(We),this};Se.VERSION="1.0.37",Se.BROWSER=re([f,v,u]),Se.CPU=re([b]),Se.DEVICE=re([d,g,p,w,_,k,C,S,E]),Se.ENGINE=Se.OS=re([f,v]),e.exports&&(t=e.exports=Se),t.UAParser=Se;var Be=typeof n!==a&&(n.jQuery||n.Zepto);if(Be&&!Be.ua){var tt=new Se;Be.ua=tt.getResult(),Be.ua.get=function(){return tt.getUA()},Be.ua.set=function(Ee){tt.setUA(Ee);var Te=tt.getResult();for(var ke in Te)Be.ua[ke]=Te[ke]}}})(typeof window=="object"?window:Wa)})(f0,f0.exports);var Pee=f0.exports,Dee=function(){function e(){var r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};(function(v,b){if(!(v instanceof b))throw new TypeError("Cannot call a class as a function")})(this,e);var s=r.appKey,a=r.ratio,l=a===void 0?10:a,c=r.env,u=c===void 0?"production":c,d=r.appVersion,f=d===void 0?"0.0.1":d,p=r.whiteScreenConfig,g=p===void 0?{target:document.body,screenshot:!0,score:1.5,domDepth:6}:p;this.appKey=s,this.sdkVersion="1.1.6",this.ratio=Math.max(0,Math.min(l,100)),this.env=u,this.appVersion=f,this.whiteScreenConfig=g,this.sid=this.sessionid(),this.timeDifference=0,this.host="qapm.360.cn"}var t,n;return t=e,n=[{key:"getUA",value:function(){var r,s=new Pee.UAParser().getResult();if(s.browser.name==="360 Browser"){var a=window.navigator.userAgent;/360EE/.test(a)&&(s.browser.name="360极速浏览器"),/360SE/.test(a)&&(s.browser.name="360安全浏览器")}return{os:s.os.name,osVersion:s.os.version,browser:s.browser.name,browserVersion:s.browser.version,ua:s.ua,device:s.device.model||"Unknow",deviceType:s.device.type||"Pc",network:(r=window.navigator)===null||r===void 0||(r=r.connection)===null||r===void 0?void 0:r.effectiveType}}},{key:"uid",value:function(){if(localStorage.getItem("__QAPM_UID__"))return localStorage.getItem("__QAPM_UID__");var r=this.mid()||e5(""+Date.now()+1e9*Math.random());return localStorage.setItem("__QAPM_UID__",r),r}},{key:"mid",value:function(){var r="";try{r=external.GetMID(external.GetSID(window))}catch(s){}if(!r)try{r=window.wdextcmd.GetMid()}catch(s){}return r||""}},{key:"sessionid",value:function(){return e5(""+Date.now()+1e9*Math.random())}},{key:"isIE",value:function(){var r=window.navigator.userAgent;return r.indexOf("MSIE")!==-1||r.indexOf("Trident")!==-1}},{key:"padLeft",value:function(r,s,a){for(var l=r+"";l.length<s;)l=(a||"0")+l;return l}},{key:"formatTime",value:function(r){var s=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"Y-m-d H:i:s";return r?(typeof r!="number"&&typeof r!="string"||r.length===10&&(r*=1e3),r=new Date(r),s.replace(/Y/g,this.padLeft(r.getFullYear(),4)).replace(/m/g,this.padLeft(r.getMonth()+1,2)).replace(/d/g,this.padLeft(r.getDate(),2)).replace(/H/g,this.padLeft(r.getHours(),2)).replace(/i/g,this.padLeft(r.getMinutes(),2)).replace(/s/g,this.padLeft(r.getSeconds(),2))):""}},{key:"formatDate",value:function(r){return this.formatTime(r,"Y-m-d")}},{key:"getTime",value:function(){var r=new Date().getTime()+this.timeDifference;return{time:this.formatTime(r)||r,date:this.formatDate(r)||r}}},{key:"calcRatio",value:function(){return Math.floor(100*Math.random())<this.ratio}},{key:"initTime",value:function(){var r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};try{var s=new URL("".concat(window.location.protocol,"//").concat(this.host,"/time"));Object.entries(r).map(function(a){var l=VH(a,2),c=l[0],u=l[1];s.searchParams.set(c,u)}),this.fetch(s.toString())}catch(a){console.error("initTime Error",a)}}},{key:"fetch",get:function(){return window.fetch?window.fetch.bind(window):function(r){var s=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return new Promise(function(a,l){var c=new XMLHttpRequest;s.keepalive&&(c.keepalive=!0),c.open(s.method||"GET",r),c.onload=function(){a({text:function(){return Promise.resolve(c.responseText)}})},c.onerror=function(){l(c)},c.send(s.body)})}}}],n&&ZH(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),e}(),t5=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")},zt=function(e){var t=Math.min(Math.max(e,0),15e3);return Number.isNaN(t)?0:t%1!=0?Number(t.toFixed(2)):t},Mee=function(){function e(t){ld(this,e),oi(this,"performanceData",{fcp:0,fp:0,lcp:0}),oi(this,"commit",function(){}),this.webCoreIns=t}return cd(e,[{key:"init",value:function(){try{if(!((t=window.performance)&&t.getEntriesByType&&t.timing))return;this.calcPerformanceTime()}catch(n){}var t}},{key:"calcNavigation",value:function(t){}},{key:"calcPerformanceTime",value:function(){var t=this;Promise.all([new Promise(function(n,r){var s=window.performance.timing,a=null;window.addEventListener("load",function l(){if(s.loadEventEnd>0){clearTimeout(a);var c=zt(s.unloadEnd-s.unloadStart),u=zt(s.redirectStart-s.redirectEnd),d=zt(s.domainLookupStart-s.fetchStart),f=zt(s.domainLookupEnd-s.domainLookupStart),p=zt(s.connectEnd-s.connectStart),g=zt(s.secureConnectionStart==0?0:s.connectEnd-s.secureConnectionStart),v=zt(s.responseStart-s.requestStart),b=zt(s.domInteractive-s.fetchStart),w=zt(s.responseEnd-s.responseStart),_=zt(s.domContentLoadedEventEnd-s.fetchStart),C=zt(s.domInteractive-s.responseEnd),k=zt(s.loadEventStart-s.domContentLoadedEventEnd),S=zt(s.loadEventEnd-s.loadEventStart),E=zt(s.loadEventEnd-s.fetchStart);n({unloadTime:c,redirectTime:u,appCacheTime:d,dnsTime:f,tcpTime:p,sslTime:g,ttfb:v,contentTime:w,domParseTime:C,tti:b,domReadyTime:_,loadEventTime:S,loadFinishTime:E,loadResourceTime:k,resource:""})}else a=setTimeout(l,100)},!1)}),new Promise(function(n,r){t5("paint",function(s){var a=0,l=0;if(s!=="err"){var c,u=jp(s.getEntries());try{for(u.s();!(c=u.n()).done;){var d=c.value,f=d.name,p=d.startTime;f==="first-paint"&&(a=zt(p)),f==="first-contentful-paint"&&(l=zt(p))}}catch(g){u.e(g)}finally{u.f()}}n({fp:a,fcp:l})})}).catch(function(n){return console.log(n)}),new Promise(function(n,r){t5("largest-contentful-paint",function(s){if(s=="err")n({lcp:0});else{var a,l=jp(s.getEntries());try{for(l.s();!(a=l.n()).done;){var c=a.value;n({lcp:zt(c.startTime)})}}catch(u){l.e(u)}finally{l.f()}}})}).catch(function(n){return console.log(n)})]).then(function(){var n=(arguments.length>0&&arguments[0]!==void 0?arguments[0]:[]).reduce(function(r,s){return qa(qa({},r),s)},t.performanceData);n.type="performance",t.webCoreIns.commit(n)}).catch(function(n){console.log(n)})}},{key:"calcResourceTime",value:function(){}}]),e}(),Fee=["SCRIPT","STYLE","META","HEAD"];function h0(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:document.body,t=arguments.length>1?arguments[1]:void 0,n=arguments.length>2?arguments[2]:void 0,r=arguments.length>3?arguments[3]:void 0,s=arguments.length>4?arguments[4]:void 0;if(!e||n>r||Fee.indexOf(e.tagName)>-1||s&&t>s)return n;var a=function(l,c){if(!c||!document.querySelector(l.tagName))return 0;var u=l.getBoundingClientRect(),d=u.top,f=u.height;return d>window.innerHeight||f<=0?0:1/Math.pow(2,c-1)}(e,t);return[].reduceRight.call(e.children,function(l,c){return h0(c,t+1,l,r,s)},n+a)}var $ee=0,p0={},zee=function(e){if(!e)return Promise.reject("empty url");var t=p0[e];return t?Promise.resolve(t):new Promise(function(n,r){var s=document.createElement("script");if(s.id="script".concat($ee++),s.src=e,s.async="async",s.src.indexOf("http")!==0)throw Error("load-script只能加载http/https协议的url,当前协议是".concat(location.protocol));s.onerror=function(a){$("#".concat(s.id)).remove(),r(a)},s.readyState?s.onreadystatechange=function(a){s.readyState!="loaded"&&s.readyState!="complete"||(s.onreadystatechange=null,p0[e]=a,n(a))}:s.onload=function(a){p0[e]=a,n(a)},document.body.appendChild(s)})};function Uee(e,t){return n5.apply(this,arguments)}function n5(){return(n5=Ha(or().mark(function e(t,n){var r,s,a;return or().wrap(function(l){for(;;)switch(l.prev=l.next){case 0:return l.next=2,zee("https://html2canvas.hertzen.com/dist/html2canvas.min.js");case 2:return l.next=4,html2canvas(document.body,{useCORS:!0});case 4:return r=l.sent,s=r.toDataURL("image/jpeg",.3),a=jee(s),l.next=9,qee(a,t,n);case 9:return l.abrupt("return",l.sent);case 10:case"end":return l.stop()}},e)}))).apply(this,arguments)}function jee(e){for(var t=e.split(","),n=t[0].match(/:(.*?);/)[1],r=atob(t[1]),s=r.length,a=new Uint8Array(s);s--;)a[s]=r.charCodeAt(s);return new Blob([a],{type:n})}function qee(e,t,n){return r5.apply(this,arguments)}function r5(){return(r5=Ha(or().mark(function e(t,n,r){var s,a;return or().wrap(function(l){for(;;)switch(l.prev=l.next){case 0:return(s=new FormData).append("filename",t,"".concat(r,".png")),s.append("https",1),l.next=5,n("//qapm.360.cn/api/upload/uploadImg",{method:"POST",body:s,keepalive:!0}).then(function(c){return c.json()});case 5:return a=l.sent,l.abrupt("return",a);case 7:case"end":return l.stop()}},e)}))).apply(this,arguments)}var Hee=function(){function e(n){ld(this,e),oi(this,"isLoaded",!1),oi(this,"timer",null),oi(this,"whiteCount",0),oi(this,"maxLoopNumber",2),oi(this,"isReport",!1),this.webCoreIns=n;var r=n.config.whiteScreenConfig||{},s=r.target,a=r.score,l=a===void 0?1.5:a;r.screenshot;var c=r.domDepth,u=c===void 0?6:c;this.target=s,this.score=l,this.screenshot=!1,this.domDepth=u,this.fetch=n.fetch}var t;return cd(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=h0(this.getTarget(),0,0,this.score,this.domDepth);this.whiteCount+=1,n<=this.score?this.openLoopToJudge(n):this.whiteCount=0}},{key:"openLoopToJudge",value:function(n){var r=this;this.whiteCount>=this.maxLoopNumber?this.commit(n):this.timer=setTimeout(function(){var s=h0(r.target,0,0,r.score,r.domDepth);r.whiteCount+=1,s<=r.score?(clearTimeout(r.timer),r.timer=null,r.openLoopToJudge(s)):(clearTimeout(r.timer),r.timer=null,r.whiteCount=0)},1e3)}},{key:"commit",value:(t=Ha(or().mark(function n(r){return or().wrap(function(s){for(;;)switch(s.prev=s.next){case 0:if(!this.isReport){s.next=2;break}return s.abrupt("return");case 2:this.isReport=!0,this.screenshot&&Uee(this.fetch,this.webCoreIns.sid),this.webCoreIns.commit({type:"whiteScreen",score:r});case 5:case"end":return s.stop()}},n,this)})),function(n){return t.apply(this,arguments)})}]),e}(),Gee=/^\s*at (?:(.*?) ?\()?((?:file|https?|blob|chrome-extension|address|native|eval|webpack|<anonymous>|[-a-z]+:|.*bundle|\/).*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,fu="js",yl="resource",i5="unhandledrejection",hu="cors",o5="vue",s5="react";function Wee(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var pu,bl,a5={exports:{}},l5={exports:{}};pu="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",bl={rotl:function(e,t){return e<<t|e>>>32-t},rotr:function(e,t){return e<<32-t|e>>>t},endian:function(e){if(e.constructor==Number)return 16711935&bl.rotl(e,8)|4278255360&bl.rotl(e,24);for(var t=0;t<e.length;t++)e[t]=bl.endian(e[t]);return e},randomBytes:function(e){for(var t=[];e>0;e--)t.push(Math.floor(256*Math.random()));return t},bytesToWords:function(e){for(var t=[],n=0,r=0;n<e.length;n++,r+=8)t[r>>>5]|=e[n]<<24-r%32;return t},wordsToBytes:function(e){for(var t=[],n=0;n<32*e.length;n+=8)t.push(e[n>>>5]>>>24-n%32&255);return t},bytesToHex:function(e){for(var t=[],n=0;n<e.length;n++)t.push((e[n]>>>4).toString(16)),t.push((15&e[n]).toString(16));return t.join("")},hexToBytes:function(e){for(var t=[],n=0;n<e.length;n+=2)t.push(parseInt(e.substr(n,2),16));return t},bytesToBase64:function(e){for(var t=[],n=0;n<e.length;n+=3)for(var r=e[n]<<16|e[n+1]<<8|e[n+2],s=0;s<4;s++)8*n+6*s<=8*e.length?t.push(pu.charAt(r>>>6*(3-s)&63)):t.push("=");return t.join("")},base64ToBytes:function(e){e=e.replace(/[^A-Z0-9+\/]/gi,"");for(var t=[],n=0,r=0;n<e.length;r=++n%4)r!=0&&t.push((pu.indexOf(e.charAt(n-1))&Math.pow(2,-2*r+8)-1)<<2*r|pu.indexOf(e.charAt(n))>>>6-2*r);return t}},l5.exports=bl;var Kee=l5.exports,g0={utf8:{stringToBytes:function(e){return g0.bin.stringToBytes(unescape(encodeURIComponent(e)))},bytesToString:function(e){return decodeURIComponent(escape(g0.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("")}}},c5=g0,Yee=function(e){return e!=null&&(d5(e)||function(t){return typeof t.readFloatLE=="function"&&typeof t.slice=="function"&&d5(t.slice(0,0))}(e)||!!e._isBuffer)};function d5(e){return!!e.constructor&&typeof e.constructor.isBuffer=="function"&&e.constructor.isBuffer(e)}(function(){var e=Kee,t=c5.utf8,n=Yee,r=c5.bin,s=function(a,l){a.constructor==String?a=l&&l.encoding==="binary"?r.stringToBytes(a):t.stringToBytes(a):n(a)?a=Array.prototype.slice.call(a,0):Array.isArray(a)||a.constructor===Uint8Array||(a=a.toString());for(var c=e.bytesToWords(a),u=8*a.length,d=1732584193,f=-271733879,p=-1732584194,g=271733878,v=0;v<c.length;v++)c[v]=16711935&(c[v]<<8|c[v]>>>24)|4278255360&(c[v]<<24|c[v]>>>8);c[u>>>5]|=128<<u%32,c[14+(u+64>>>9<<4)]=u;var b=s._ff,w=s._gg,_=s._hh,C=s._ii;for(v=0;v<c.length;v+=16){var k=d,S=f,E=p,N=g;d=b(d,f,p,g,c[v+0],7,-680876936),g=b(g,d,f,p,c[v+1],12,-389564586),p=b(p,g,d,f,c[v+2],17,606105819),f=b(f,p,g,d,c[v+3],22,-1044525330),d=b(d,f,p,g,c[v+4],7,-176418897),g=b(g,d,f,p,c[v+5],12,1200080426),p=b(p,g,d,f,c[v+6],17,-1473231341),f=b(f,p,g,d,c[v+7],22,-45705983),d=b(d,f,p,g,c[v+8],7,1770035416),g=b(g,d,f,p,c[v+9],12,-1958414417),p=b(p,g,d,f,c[v+10],17,-42063),f=b(f,p,g,d,c[v+11],22,-1990404162),d=b(d,f,p,g,c[v+12],7,1804603682),g=b(g,d,f,p,c[v+13],12,-40341101),p=b(p,g,d,f,c[v+14],17,-1502002290),d=w(d,f=b(f,p,g,d,c[v+15],22,1236535329),p,g,c[v+1],5,-165796510),g=w(g,d,f,p,c[v+6],9,-1069501632),p=w(p,g,d,f,c[v+11],14,643717713),f=w(f,p,g,d,c[v+0],20,-373897302),d=w(d,f,p,g,c[v+5],5,-701558691),g=w(g,d,f,p,c[v+10],9,38016083),p=w(p,g,d,f,c[v+15],14,-660478335),f=w(f,p,g,d,c[v+4],20,-405537848),d=w(d,f,p,g,c[v+9],5,568446438),g=w(g,d,f,p,c[v+14],9,-1019803690),p=w(p,g,d,f,c[v+3],14,-187363961),f=w(f,p,g,d,c[v+8],20,1163531501),d=w(d,f,p,g,c[v+13],5,-1444681467),g=w(g,d,f,p,c[v+2],9,-51403784),p=w(p,g,d,f,c[v+7],14,1735328473),d=_(d,f=w(f,p,g,d,c[v+12],20,-1926607734),p,g,c[v+5],4,-378558),g=_(g,d,f,p,c[v+8],11,-2022574463),p=_(p,g,d,f,c[v+11],16,1839030562),f=_(f,p,g,d,c[v+14],23,-35309556),d=_(d,f,p,g,c[v+1],4,-1530992060),g=_(g,d,f,p,c[v+4],11,1272893353),p=_(p,g,d,f,c[v+7],16,-155497632),f=_(f,p,g,d,c[v+10],23,-1094730640),d=_(d,f,p,g,c[v+13],4,681279174),g=_(g,d,f,p,c[v+0],11,-358537222),p=_(p,g,d,f,c[v+3],16,-722521979),f=_(f,p,g,d,c[v+6],23,76029189),d=_(d,f,p,g,c[v+9],4,-640364487),g=_(g,d,f,p,c[v+12],11,-421815835),p=_(p,g,d,f,c[v+15],16,530742520),d=C(d,f=_(f,p,g,d,c[v+2],23,-995338651),p,g,c[v+0],6,-198630844),g=C(g,d,f,p,c[v+7],10,1126891415),p=C(p,g,d,f,c[v+14],15,-1416354905),f=C(f,p,g,d,c[v+5],21,-57434055),d=C(d,f,p,g,c[v+12],6,1700485571),g=C(g,d,f,p,c[v+3],10,-1894986606),p=C(p,g,d,f,c[v+10],15,-1051523),f=C(f,p,g,d,c[v+1],21,-2054922799),d=C(d,f,p,g,c[v+8],6,1873313359),g=C(g,d,f,p,c[v+15],10,-30611744),p=C(p,g,d,f,c[v+6],15,-1560198380),f=C(f,p,g,d,c[v+13],21,1309151649),d=C(d,f,p,g,c[v+4],6,-145523070),g=C(g,d,f,p,c[v+11],10,-1120210379),p=C(p,g,d,f,c[v+2],15,718787259),f=C(f,p,g,d,c[v+9],21,-343485551),d=d+k>>>0,f=f+S>>>0,p=p+E>>>0,g=g+N>>>0}return e.endian([d,f,p,g])};s._ff=function(a,l,c,u,d,f,p){var g=a+(l&c|~l&u)+(d>>>0)+p;return(g<<f|g>>>32-f)+l},s._gg=function(a,l,c,u,d,f,p){var g=a+(l&u|c&~u)+(d>>>0)+p;return(g<<f|g>>>32-f)+l},s._hh=function(a,l,c,u,d,f,p){var g=a+(l^c^u)+(d>>>0)+p;return(g<<f|g>>>32-f)+l},s._ii=function(a,l,c,u,d,f,p){var g=a+(c^(l|~u))+(d>>>0)+p;return(g<<f|g>>>32-f)+l},s._blocksize=16,s._digestsize=16,a5.exports=function(a,l){if(a==null)throw new Error("Illegal argument "+a);var c=e.wordsToBytes(s(a,l));return l&&l.asBytes?c:l&&l.asString?r.bytesToString(c):e.bytesToHex(c)}})();var Jee=Wee(a5.exports);function Xee(e){var t=e.match(Gee);return t?{filename:t[2],functionName:t[1]||"",lineno:parseInt(t[3],10)||void 0,colno:parseInt(t[4],10)||void 0}:{}}function gu(e){var t=(e||{stack:""}).stack;if(!t)return[];var n,r=[],s=jp(t.split(`
|
|
139
|
-
`).slice(1));try{for(s.s();!(n=s.n()).done;){var a=Xee(n.value);a&&r.push(a)}}catch(l){s.e(l)}finally{s.f()}return r.slice(0,10)}var Ps=function(e){return Jee(e).toString()},m0=function(e){return e instanceof ErrorEvent?e.message==="Script error."?hu:fu:yl},Qee=function(){function e(t){ld(this,e),oi(this,"errorIdSet",new Set),this.webCoreIns=t,this.errorIdSet=new Set}return cd(e,[{key:"init",value:function(){var t;if(this.initJsError(),this.initResourceError(),this.initPromiseError(),this.initCorsError(),(t=window.__QAPM__)!==null&&t!==void 0&&(t=t.q)!==null&&t!==void 0&&t.length){var n={error:this.onJSError.bind(this),reject:this.onPromiseError.bind(this)};window.__QAPM__.q.forEach(function(){var r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},s=r.type,a=r.event,l=n[s];l&&l(a)}),window.__QAPM__.q=[]}}},{key:"initJsError",value:function(){var t=this;window.addEventListener("error",function(n){return t.onJSError(n)},!0)}},{key:"initResourceError",value:function(){var t=this;window.addEventListener("error",function(n){return t.onResourceError(n)},!0)}},{key:"initPromiseError",value:function(){var t=this;window.addEventListener("unhandledrejection",function(n){return t.onPromiseError(n)},!0)}},{key:"initCorsError",value:function(){var t=this;window.addEventListener("error",function(n){return function(r){if(m0(r)===hu){var s={errorType:hu,errorMessage:r.message,errorSummary:"CorsError",errorId:Ps("".concat(hu,"-").concat(r.message))};t.commit(s)}}(n)},!0)}},{key:"onResourceError",value:function(t){if(m0(t)===yl){var n=t.target||t.srcElement,r=n.src||n.href,s=JSON.stringify(yl+": "+r||"UnKnown Resource"),a={errorType:yl,errorMessage:s,errorSummary:"ResourceError",errorId:Ps("".concat(yl,"-").concat(s))};this.commit(a)}}},{key:"onJSError",value:function(t){var n,r;if(m0(t)===fu){var s=JSON.stringify(t.message),a=function(c){var u=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"unknown";if(!c)return u;try{var d=new URL(c);return d.pathname&&d.pathname.endsWith(".js")?c:u}catch(f){return c}}(t.filename,(n=this.webCoreIns.config)===null||n===void 0?void 0:n.appKey),l={errorType:fu,errorMessage:s,errorSummary:t.error&&((r=t.error)===null||r===void 0?void 0:r.name)||"UnKnown",errorStack:JSON.stringify(gu(t.error)),errorId:Ps("".concat(fu,"-").concat(s,"-").concat(a))};this.commit(l)}}},{key:"onPromiseError",value:function(t){var n,r,s=JSON.stringify(((n=t.reason)===null||n===void 0?void 0:n.message)||t.reason||"UnKnown"),a=((r=t.reason)===null||r===void 0?void 0:r.name)||"UnKnown",l={errorType:i5,errorMessage:s,errorSummary:a,errorStack:JSON.stringify(gu(t.reason)),errorId:Ps("".concat(i5,"-").concat(s,"-").concat(a))};this.commit(l)}},{key:"onVueError",value:function(t,n,r){var s=JSON.stringify(t.message),a={errorType:o5,errorMessage:s,errorSummary:t.name||"UnKnown",errorStack:JSON.stringify(gu(t)),errorId:Ps("".concat(o5,"-").concat(s,"-").concat(t.name))};this.commit(a)}},{key:"onReactError",value:function(t,n){var r=JSON.stringify(t.message),s={errorType:s5,errorMessage:r,errorSummary:t.name||"UnKnown",errorStack:JSON.stringify(gu(t)),errorId:Ps("".concat(s5,"-").concat(r,"-").concat(t.name))};this.commit(s)}},{key:"commit",value:function(t){var n=t.errorId;this.errorIdSet.has(n)||(this.errorIdSet.add(n),this.webCoreIns.commit(qa({type:"error"},t)))}}]),e}(),Zee=function(e){function t(){var s,a=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return ld(this,t),(s=JH(this,t,[a])).config=a,s.isReport()?(s.PerformancePluginInstance=new Mee(Ga(s)),s.WhiteScreenPluginInstance=new Hee(Ga(s)),s.ErrorPluginInstance=new Qee(Ga(s)),s.plugins=[s.PerformancePluginInstance,s.WhiteScreenPluginInstance,s.ErrorPluginInstance],s.init(),F_(t,t,Ds,Ga(s)),s):P_(s)}var n,r;return function(s,a){if(typeof a!="function"&&a!==null)throw new TypeError("Super expression must either be null or a function");s.prototype=Object.create(a&&a.prototype,{constructor:{value:s,writable:!0,configurable:!0}}),Object.defineProperty(s,"prototype",{writable:!1}),a&&Up(s,a)}(t,Dee),cd(t,[{key:"isReport",value:function(){var s=this.isIE(),a=this.calcRatio();return this.config.appKey&&a&&!s}},{key:"init",value:(r=Ha(or().mark(function s(){return or().wrap(function(a){for(;;)switch(a.prev=a.next){case 0:this.initTime(this.mixed()),this.plugins.forEach(function(l){try{l.init()}catch(c){console.error("initPlugin Error",c)}});case 2:case"end":return a.stop()}},s,this)})),function(){return r.apply(this,arguments)})},{key:"mixed",value:function(){var s=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},a=this.uid(),l=this.getTime(),c=l.time,u=l.date,d=this.getUA(),f=window.location,p=f.host,g=f.origin,v=f.pathname;return qa(qa({uid:a,sid:this.sid,url:window.location.href,host:p,fullPath:g+v,sdkVersion:this.sdkVersion,createDate:u,appKey:this.config.appKey,createTime:c,appVersion:this.appVersion,env:this.env},d),s)}},{key:"commit",value:(n=Ha(or().mark(function s(a){var l,c;return or().wrap(function(u){for(;;)switch(u.prev=u.next){case 0:try{l=this.mixed(a),c=new URL("".concat(window.location.protocol,"//").concat(this.host,"/log.gif")),Object.entries(l).map(function(d){var f=XH(d,2),p=f[0],g=f[1];c.searchParams.set(p,g)}),new Image().src=c.toString()}catch(d){console.log("commit Error",d)}case 1:case"end":return u.stop()}},s,this)})),function(s){return n.apply(this,arguments)})}],[{key:"install",value:function(s){var a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};ud(t,t,Ds)||(s.config.errorHandler=function(l,c,u){ud(t,t,Ds).ErrorPluginInstance.onVueError(l,c,u),console.error(l)},F_(t,t,Ds,new t(a)))}},{key:"sendError",value:function(s){ud(t,t,Ds)?ud(t,t,Ds).ErrorPluginInstance.onReactError(s):console.error("QAPM: 请先初始化 QAPM!")}}]),t}(),Ds={writable:!0,value:null};const Nse="",Tse="",Vee={components:{InfoFilled:Ef,ArrowRight:Cf},mixins:[kr],inject:["hasLevel"],props:{axis:{required:!0,type:Object,default:()=>({x:0,y:0})},show:{required:!0,type:Boolean,default:!1},nodeInfo:{required:!0,type:Array,default:()=>[]},menuOptions:{required:!0,type:Array,default:()=>[]},border:{type:Boolean,required:!1,default:!0},itemWidth:{type:Number,required:!1,default:206},itemHeight:{type:Number,required:!1,default:36},itemSize:{type:Number,required:!1,default:14},offset:{type:Object,required:!1,default:()=>({x:6,y:2})},borderWidth:{type:Number,required:!1,default:6},history:{type:Object,required:!0,default:()=>{}},moduleDetail:{type:Object,required:!0,default:()=>{}}},emits:["contextmenu-click"],data(){return{checkedItems:{},globalMenus:vM,maxMulti:6}},computed:{checkboxMenu(){return this.nodeInfo.length>1?[]:this.menuOptions},canGoDetail(){var e,t,n,r;return((t=(e=this.moduleDetail)==null?void 0:e.config)==null?void 0:t.jumpDetail)&&((r=this.moduleDetail)==null?void 0:r.config.jumpRule[(n=this.nodeInfo[0])==null?void 0:n.type])},systemMenu(){var r,s,a,l,c,u,d;const e=[];if(this.nodeInfo.length===1){const f=this.nodeInfo[0];f.type!=="aggregation"&&f.type!=="nodeType"&&(e.push(Kh),(r=this.history.keyNodeIds)!=null&&r.some(_=>_===f.id)||(e.push(Xh),(a=(s=this.moduleDetail)==null?void 0:s.config)!=null&&a.hideCollectMenu||e.push(f.collect?Jh:Yh),e.push(f.textProp==="name"?Hh:qh),f.label&&e.push(f.textProp==="label"?Gh:Wh)),this.canGoDetail&&e.push(j2)),e.push(f.fx?jh:Uh);const p=this.history.dataNow.links.some(w=>w.source.id===f.id&&w.target.type==="aggregation"),b=this.history.dataNow.links.filter(w=>w.source.id===f.id).map(w=>w.target).some(w=>{let _=0;return this.history.dataNow.links.map(C=>{C.source.id===w.id&&_++}),_===0});p||f.type==="aggregation"?e.push($2):b&&e.push(F2),b&&e.push(M2),e.push(Qh)}else this.nodeInfo.length>1?(e.push(Xh,Kh),e.push(this.nodeInfo.some(p=>!p.collect)?Yh:Jh),this.nodeInfo.some(p=>p.label)&&e.push(this.nodeInfo.some(p=>p.textProp!=="label")?Wh:Gh),e.push(this.nodeInfo.some(p=>p.textProp!=="name")?qh:Hh),e.push(this.nodeInfo.some(p=>!p.fx)?Uh:jh),e.push(Qh)):this.nodeInfo.length===0&&(this.history.dataNow.nodes.some(p=>p.label)&&e.push(this.history.dataNow.nodes.some(p=>p.textProp!=="label")?R2:L2),e.push(this.history.dataNow.nodes.some(p=>p.textProp!=="name")?I2:B2),e.push(this.history.dataNow.nodes.some(p=>!p.fx)?A2:O2),this.history.currentIndex>0&&e.push(P2),this.history.currentIndex<this.history.length-1&&e.push(D2));const t=(l=this.nodeInfo[0])==null?void 0:l.type,n=(d=(u=(c=this.nodeInfo[0])==null?void 0:c.detail)==null?void 0:u.info)==null?void 0:d.extraNodeContextMenus;return t!=="nodeType"&&(n!=null&&n.length)&&(n.forEach(f=>{f.icon||(f.icon="button_edit_label")}),e.push(...n)),e},totalHeight(){let e=this.menuOptions.length*(this.itemHeight+5)+10+44+48+5,t=this.systemMenu.length*(this.itemHeight+5)+10+44+5;return e=this.menuOptions.length===0?0:44,t=this.systemMenu.length===0?0:44,e+t},axisComputed(){const e=document.getElementsByClassName("d3-container")[0],t=this.axis.top-e.offsetTop;return{top:(t<e.offsetHeight/2?Math.min(t+this.offset.y,Math.max(e.offsetHeight-this.totalHeight,e.getBoundingClientRect().top)):Math.max(t+this.offset.y,this.totalHeight+e.getBoundingClientRect().top))+"px",left:this.axis.left+this.offset.x+"px",transform:`translate(${this.axis.left>e.offsetWidth/2?"-100%":"0%"}, ${t>e.offsetHeight/2?"-100%":"0%"})`}},liStyle(){return{width:this.itemWidth+"px",height:this.itemHeight+"px",lineHeight:this.itemHeight+"px",fontSize:this.itemSize+"px"}},firstLeft(){const e=document.body.offsetWidth;return this.axis.left+this.itemWidth*2>=e},secondLeft(){const e=document.body.offsetWidth;return this.axis.left+this.itemWidth*3>=e},checkedItemsFinal(){return Object.keys(this.checkedItems).filter(e=>this.checkedItems[e]).map(e=>this.checkedItems[e])},haveInterface(){let e=!1;return this.menuOptions.map(t=>{t.type===1&&(e=!0)}),e}},watch:{show(){this.checkedItems={}}},methods:{handleCollapse(){},isSystemItem(e){return e.type===2},isExternalItem(e){return e.type===3},hasChildren(e){var t;return((t=e==null?void 0:e.children)==null?void 0:t.length)>0},onCheck(e,t){this.checkedItems[t.name]=e.currentTarget.checked?t:!1},secondBorderCheck(e,t=0){const n=document.body.offsetWidth,r=document.body.offsetHeight,s=this.axis.top+(e+t)*this.itemHeight;return{width:this.itemWidth*2+60+"px",left:this.axis.left+this.itemWidth*2>=n?"-100%":"100%",top:r>=s?0:"auto",bottom:r<s?0:"auto"}},thirdBorderCheck(e,t,n,r){const s=document.body.offsetWidth,a=document.body.offsetHeight,l=this.secondBorderCheck(e,n).top;let c;const u=(t+r)*this.itemHeight,d=u>180?180:u;return l===0?c=this.axis.top+e*this.itemHeight+d:c=this.axis.top-e*this.itemHeight+d,{left:this.axis.left+this.itemWidth*3>=s?"-100%":"100%",bottom:a>=c?0:"auto",top:a<c?0:"auto"}},handleClick(e,t){if(!t){if(qt({cId:"contextMenu-"+e.name,c:"右键菜单-"+e.namec}),e.has_child>0)return!1;ve(this,"contextmenu-click",{nodes:this.nodeInfo,api:e})}},handleDataClick(e,t){qt({cId:"contextMenu-"+e.name,c:"右键菜单-"+e.namec}),ve(this,"contextmenu-click",{nodes:this.nodeInfo,api:t,dataApi:e}),this.checkedItems={}}}},ete={"aria-hidden":"true",style:{position:"absolute",width:"0",height:"0",overflow:"hidden",display:"none"}},tte={class:"cm-list"},nte={class:"cm-ul"},rte={class:"hd"},ite=["src"],ote={class:"bd"},ste={class:"cm-ul cm-ul-level1"},ate=["title"],lte=["title","onClick"],cte=["title","onClick"],dte={key:0,class:"icon","aria-hidden":"true"},ute=["title","onClick"],fte=["src"],hte=["title","onClick"],pte={key:0,class:"fas el-icon-fa-cog"},gte={key:1,class:"fas el-icon-fa-external-link-alt"},mte={class:"text-wrapper"},vte=["src"],yte=["src"],bte={key:3,class:"shortcut"},wte={key:2,class:"icon","aria-hidden":"true"},_te=["title","onClick"],Cte={key:1,class:"icon","aria-hidden":"true"},Ste=["title","onClick"];function Ete(e,t,n,r,s,a){const l=o.resolveComponent("ArrowRight"),c=Ye,u=o.resolveComponent("InfoFilled"),d=gn;return n.show?(o.openBlock(),o.createElementBlock("div",{key:0,class:"cm-container",style:o.normalizeStyle(a.axisComputed),onClick:t[1]||(t[1]=o.withModifiers((...f)=>a.handleCollapse&&a.handleCollapse(...f),["stop"]))},[(o.openBlock(),o.createElementBlock("svg",ete,t[2]||(t[2]=[o.createElementVNode("symbol",{id:"icon-arrow-right",viewBox:"0 0 1024 1024"},[o.createElementVNode("path",{d:"M288.791335 65.582671l446.41733 446.417329-446.41733 446.417329z"})],-1)]))),o.createElementVNode("div",tte,[o.createElementVNode("ul",nte,[a.checkboxMenu.length>0?(o.openBlock(),o.createElementBlock("li",{key:0,class:"cm-li data-opt-wrapper",style:o.normalizeStyle(a.liStyle)},[o.createElementVNode("div",rte,[o.createElementVNode("img",{src:e.imgPath["./public/d3svg1/button18/button_relation.svg"],style:{"margin-right":"10px"}},null,8,ite),t[3]||(t[3]=o.createTextVNode("按关系分类拓线")),o.createVNode(c,null,{default:o.withCtx(()=>[o.createVNode(l)]),_:1})]),o.createElementVNode("div",ote,[o.createElementVNode("ul",ste,[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(a.checkboxMenu,(f,p)=>(o.openBlock(),o.createElementBlock("li",{key:p,class:"cm-li context-one",style:o.normalizeStyle(a.liStyle)},[a.hasChildren(f)?(o.openBlock(),o.createElementBlock("div",{key:0,class:o.normalizeClass(["cm-item",a.firstLeft?"cm-left":""]),title:f.namec},[o.createElementVNode("span",null,o.toDisplayString(f.namec),1),t[4]||(t[4]=o.createElementVNode("svg",{class:"icon","aria-hidden":"true"},[o.createElementVNode("use",{"xlink:href":"#icon-arrow-right"})],-1))],10,ate)):(o.openBlock(),o.createElementBlock("div",{key:1,class:o.normalizeClass(["cm-item",a.firstLeft?"cm-left":""]),title:f.namec,onClick:o.withModifiers(g=>a.handleDataClick(f,s.globalMenus.expandPartNode),["stop"])},[o.createElementVNode("span",null,o.toDisplayString(f.namec),1)],10,lte)),a.hasChildren(f)?(o.openBlock(),o.createElementBlock("ul",{key:2,class:"cm-ul cm-ul-level2",style:o.normalizeStyle(a.secondBorderCheck(p,f.children.length))},[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(f.children,(g,v)=>(o.openBlock(),o.createElementBlock("li",{key:v,class:"cm-li",style:o.normalizeStyle(a.liStyle)},[o.createElementVNode("div",{class:o.normalizeClass(["cm-item",a.secondLeft?"cm-left":""]),title:g.namec,onClick:o.withModifiers(b=>a.handleDataClick(g,s.globalMenus.expandPartNode),["stop"])},[o.createElementVNode("span",null,o.toDisplayString(g.namec),1),a.hasChildren(g)?(o.openBlock(),o.createElementBlock("svg",dte,t[5]||(t[5]=[o.createElementVNode("use",{"xlink:href":"#icon-arrow-right"},null,-1)]))):o.createCommentVNode("",!0)],10,cte),a.hasChildren(g)?(o.openBlock(),o.createElementBlock("ul",{key:0,class:"cm-ul cm-ul-level3",style:o.normalizeStyle(a.thirdBorderCheck(p,v,f.children.length,g.children.length))},[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(g.children,(b,w)=>(o.openBlock(),o.createElementBlock("li",{key:w,class:"cm-li",style:o.normalizeStyle(a.liStyle)},[o.createElementVNode("div",{class:"cm-item",title:b.namec,onClick:o.withModifiers(_=>a.handleDataClick(b,s.globalMenus.expandPartNode),["stop"])},[o.createElementVNode("span",null,o.toDisplayString(b.namec),1)],8,ute)],4))),128))],4)):o.createCommentVNode("",!0)],4))),128))],4)):o.createCommentVNode("",!0)],4))),128))])])],4)):n.nodeInfo.length>1&&n.nodeInfo.length<s.maxMulti?(o.openBlock(),o.createElementBlock("li",{key:1,class:"cm-li data-opt-wrapper data-opt-all",style:o.normalizeStyle(a.liStyle)},[o.createElementVNode("div",{class:"hd",onClick:t[0]||(t[0]=o.withModifiers(f=>a.handleDataClick(null,s.globalMenus.expandNode),["stop"]))},[o.createElementVNode("img",{src:e.imgPath["./public/d3svg1/button18/button_relation.svg"],style:{"margin-right":"10px"}},null,8,fte),t[6]||(t[6]=o.createTextVNode("展开全部关系 "))]),t[7]||(t[7]=o.createElementVNode("div",{class:"bd"},null,-1))],4)):o.createCommentVNode("",!0),(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(a.systemMenu,(f,p)=>(o.openBlock(),o.createElementBlock("li",{key:p,class:"cm-li",style:o.normalizeStyle(a.liStyle)},[o.createElementVNode("div",{class:o.normalizeClass(["cm-item",{"cm-left":a.firstLeft,disabled:f.disabled}]),title:f.namec,onClick:o.withModifiers(g=>a.handleClick(f,f.disabled),["stop"])},[a.isSystemItem(f)?(o.openBlock(),o.createElementBlock("i",pte)):a.isExternalItem(f)?(o.openBlock(),o.createElementBlock("i",gte)):o.createCommentVNode("",!0),o.createElementVNode("div",mte,[f.icon?(o.openBlock(),o.createElementBlock("img",{key:0,src:e.imgPath["./public/d3svg1/button18/"+f.icon+".svg"],class:"t-icon"},null,8,vte)):(o.openBlock(),o.createElementBlock("img",{key:1,src:e.imgPath["./public/d3svg1/button18/button_"+f.name+".svg"],class:"t-icon"},null,8,yte)),f.tooltip?(o.openBlock(),o.createBlock(d,{key:2,class:"el-icon-info",effect:"dark",content:f.tooltip,placement:"top-start"},{default:o.withCtx(()=>[o.createVNode(c,null,{default:o.withCtx(()=>[o.createVNode(u)]),_:1})]),_:2},1032,["content"])):o.createCommentVNode("",!0),o.createElementVNode("span",null,o.toDisplayString(f.namec),1),f.shortcut?(o.openBlock(),o.createElementBlock("span",bte,o.toDisplayString(f.shortcut),1)):o.createCommentVNode("",!0)]),a.hasChildren(f)?(o.openBlock(),o.createElementBlock("svg",wte,t[8]||(t[8]=[o.createElementVNode("use",{"xlink:href":"#icon-arrow-right"},null,-1)]))):o.createCommentVNode("",!0)],10,hte),a.hasChildren(f)?(o.openBlock(),o.createElementBlock("ul",{key:0,class:"cm-ul cm-ul-level2",style:o.normalizeStyle(a.secondBorderCheck(p,f.children.length))},[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(f.children,(g,v)=>(o.openBlock(),o.createElementBlock("li",{key:v,class:"cm-li",style:o.normalizeStyle(a.liStyle)},[o.createElementVNode("div",{class:o.normalizeClass(["cm-item",{"cm-left":a.secondLeft,disabled:f.disabled||g.disabled}]),title:g.namec,onClick:o.withModifiers(b=>a.handleClick(g,f.disabled||g.disabled),["stop"])},[g.tooltip?(o.openBlock(),o.createBlock(d,{key:0,class:"el-icon-info",effect:"dark",content:g.tooltip,placement:"top-start"},{default:o.withCtx(()=>[o.createVNode(c,null,{default:o.withCtx(()=>[o.createVNode(u)]),_:1})]),_:2},1032,["content"])):o.createCommentVNode("",!0),o.createElementVNode("span",null,o.toDisplayString(g.namec),1),a.hasChildren(g)?(o.openBlock(),o.createElementBlock("svg",Cte,t[9]||(t[9]=[o.createElementVNode("use",{"xlink:href":"#icon-arrow-right"},null,-1)]))):o.createCommentVNode("",!0)],10,_te),a.hasChildren(g)?(o.openBlock(),o.createElementBlock("ul",{key:0,class:"cm-ul cm-ul-level3",style:o.normalizeStyle(a.thirdBorderCheck(p,v,f.children.length,g.children.length))},[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(g.children,(b,w)=>(o.openBlock(),o.createElementBlock("li",{key:w,class:"cm-li",style:o.normalizeStyle(a.liStyle)},[o.createElementVNode("div",{class:o.normalizeClass(["cm-item",{disabled:f.disabled||g.disabled||b.disabled}]),title:b.namec,onClick:o.withModifiers(_=>a.handleClick(b,f.disabled||g.disabled||b.disabled),["stop"])},[b.tooltip?(o.openBlock(),o.createBlock(d,{key:0,class:"el-icon-info",effect:"dark",content:b.tooltip,placement:"top-start"},{default:o.withCtx(()=>[o.createVNode(c,null,{default:o.withCtx(()=>[o.createVNode(u)]),_:1})]),_:2},1032,["content"])):o.createCommentVNode("",!0),o.createElementVNode("span",null,o.toDisplayString(b.namec),1)],10,Ste)],4))),128))],4)):o.createCommentVNode("",!0)],4))),128))],4)):o.createCommentVNode("",!0)],4))),128))])])],4)):o.createCommentVNode("",!0)}const xte=_t(Vee,[["render",Ete],["__scopeId","data-v-dd8dd8d0"]]),Ase="",Ose="",Ise="",Bse="",kte={name:"Popover",components:{ForceGraphSvgIcon:so},mixins:[kr],inject:["levelList","hasLevel"],props:{showPopover:{type:Boolean,default:!1},mousePosition:{type:Object,default:()=>({left:0,top:0})},nodeInfo:{type:Object,default:()=>{}},type:{type:String,default:"node"},moduleDetail:{type:Object,default:()=>{}},data:{type:Object,default:()=>{}},darkMode:{type:Boolean,default:!0},history:{type:Object,default:()=>({})},customTooltip:{type:Function}},data(){return{isFunction:Il,showSelf:!1,onPop:!1,position:null,aggregationList:[]}},computed:{show(){return this.showPopover||this.showSelf},name(){var e,t,n;return((n=(t=(e=this.nodeInfo)==null?void 0:e.detail)==null?void 0:t.info)==null?void 0:n.name)||this.nodeInfo.name},isNormalNode(){return this.nodeInfo.type!=="nodeType"&&this.nodeInfo.type!=="aggregation"},isNodeTypeNode(){return this.nodeInfo.type==="nodeType"},isAggregateNode(){return this.nodeInfo.type==="aggregation"},fieldMapThisType(){var e;return this.moduleDetail.detail_field_map&&this.moduleDetail.detail_field_map[`${(e=this.nodeInfo)==null?void 0:e.type}_detail_info`]},canGoDetail(){return["nodeType","aggregation","family","org","report","vul","thumbprint_md5","email","cert_https"].indexOf(this.nodeInfo.type)<0}},watch:{mousePosition(){setTimeout(()=>{var c,u,d;const e=this.mousePosition.left>document.body.offsetWidth/2,t=this.mousePosition.top>document.body.offsetHeight/2,n=(c=document.getElementsByClassName("popover-container")[0])==null?void 0:c.offsetHeight,r=(u=document.getElementsByClassName("d3-container")[0])==null?void 0:u.offsetHeight,s=(d=document.getElementsByClassName("d3-container")[0])==null?void 0:d.getBoundingClientRect().top;let a;t?a=Math.max(this.mousePosition.top,n+s)+5:a=Math.min(this.mousePosition.top,Math.max(r-n,s))-5;const l={left:(e?this.mousePosition.left+2:this.mousePosition.right-2)+"px",top:a+"px",transform:`translate(${e?"-100%":"0%"}, ${t?"-100%":"0%"})`};this.position=l},100)},nodeInfo:{handler:function(){var t;const e=(((t=this.nodeInfo)==null?void 0:t.list)||[]).map(n=>{var s,a,l;const r=n.detail;return fe(ne({},n),{name:((s=r==null?void 0:r.info)==null?void 0:s.name)||n.name,level:((l=(a=r==null?void 0:r.info)==null?void 0:a.basic)==null?void 0:l.level)||""})});e==null||e.sort((n,r)=>{var l,c;const s=(l=this.levelList.find(u=>u.level===n.level))==null?void 0:l.dangerNumber;return((c=this.levelList.find(u=>u.level===r.level))==null?void 0:c.dangerNumber)-s}),this.aggregationList=e},immediate:!0}},methods:{handleMouseEnter(){this.showSelf=!0},handleMouseLeave(){this.showSelf=!1},isSomething(e){return Bh(e)},getTypeZh(e){var n,r,s;let t=e;if(e==="nodeType")t="关系节点";else for(const a in(n=this.moduleDetail)==null?void 0:n.nodes)if(e===((r=this.moduleDetail)==null?void 0:r.nodes[a].name)){t=(s=this.moduleDetail)==null?void 0:s.nodes[a].namec;break}return t},getLevelClass(e){return Sc(e,this.levelList)},getColorStyle(e){return ao(e,this.levelList,this.darkMode)},getNodeTypeChildNum(e){var s;const t=(s=this.data)==null?void 0:s.links,n=[],r=[];return t==null||t.map(a=>{a.source.id===e&&(n.push(a.target.id),a.target.detail&&fD(a.target.detail.info.basic.level,this.levelList)&&r.push(a.target.id))}),{allChildNum:n.length,dangerChildNum:r.length}},canShowField(e){const t=this.hasFieldValue(e);return!(t===void 0||e.hide_hover||e.hide_empty&&!t)},hasFieldValue(e){const t=this.nodeInfo.detail&&this.nodeInfo.detail.info&&this.nodeInfo.detail.info.basic[e.prop];if(t===null)return;const n=Array.isArray(t);return n&&t.length>0||!n&&t!==""&&t!=="无"},getFieldValue(e){const t=this.nodeInfo.detail.info.basic[e.prop],n=Array.isArray(t),r=this.isSomething(t);let s="-";return r&&(n?s=t.length?t.join("|"):"-":s=t||"-"),s},formatTags(e){return Nc(Tc(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)ve(Re,"emitDataLoaded");else{const n=this.nodeInfo,r={deleteOne:{nodes:[n],links:[{source:n.relationId,target:n.id}]},type:"aggregation"};setTimeout(()=>{this.history.pushState(r),ve(Re,"emitDataLoaded")},0)}}}},Nte={key:0},Tte=["innerHTML"],Ate={key:1,class:"node-info-container"},Ote={class:"popover-block popover-header"},Ite={key:0,class:"popover-collect"},Bte={key:1,class:"row-item"},Lte={class:"label"},Rte={key:2,class:"row-item"},Pte={class:"value"},Dte={class:"node-type-info"},Mte={class:"name"},Fte={key:3,class:"row-item"},$te={class:"value"},zte={class:"popover-block popover-fields"},Ute={key:0,class:"node-detail top-border"},jte={key:0,class:"row-item"},qte=["title"],Hte={key:1,class:"row-item row-item-tag"},Gte={class:"value"},Wte={class:"graph-tags-box"},Kte={key:0,class:"row-item"},Yte={class:"label"},Jte=["title"],Xte={key:1,class:"node-statistics top-border"},Qte={class:"row-item node-num"},Zte={class:"value"},Vte={key:0},ene={class:"danger"},tne={key:2,class:"node-aggregation"},nne={class:"aggregation-title"},rne={class:"aggregation-box"},ine={key:2,class:"node-info-container"},one={class:"popover-fields"},sne={class:"top"};function ane(e,t,n,r,s,a){const l=o.resolveComponent("force-graph-svg-icon"),c=gn,u=Ea,d=aP,f=no,p=sP;return o.openBlock(),o.createElementBlock("div",{class:o.normalizeClass(["popover-container",a.show?"show-popover":"hide-popover"]),style:o.normalizeStyle(s.position),onMouseenter:t[0]||(t[0]=(...g)=>a.handleMouseEnter&&a.handleMouseEnter(...g)),onMouseleave:t[1]||(t[1]=(...g)=>a.handleMouseLeave&&a.handleMouseLeave(...g))},[o.createElementVNode("div",null,[a.show&&n.customTooltip&&s.isFunction(n.customTooltip)?(o.openBlock(),o.createElementBlock("div",Nte,[o.createElementVNode("div",{innerHTML:n.customTooltip({nodeInfo:n.nodeInfo,data:n.data,moduleDetail:n.moduleDetail})},null,8,Tte)])):n.type==="node"?(o.openBlock(),o.createElementBlock("div",Ate,[o.createElementVNode("div",Ote,[n.nodeInfo.collect?(o.openBlock(),o.createElementBlock("div",Ite,[o.createVNode(c,{content:"已收藏","popper-class":"el-tooltip-gray",placement:"left"},{default:o.withCtx(()=>[o.createVNode(l,{class:"button-img","icon-class":e.imgPath["./public/d3svg1/star.svg"]},null,8,["icon-class"])]),_:1})])):o.createCommentVNode("",!0),a.isNormalNode?(o.openBlock(),o.createElementBlock("div",Bte,[o.createElementVNode("div",Lte,o.toDisplayString(a.getTypeZh(n.nodeInfo.type))+":",1),o.createElementVNode("div",{class:o.normalizeClass(["value",{"star-next":n.nodeInfo.collect}])},o.toDisplayString(a.name),3)])):o.createCommentVNode("",!0),a.isNodeTypeNode?(o.openBlock(),o.createElementBlock("div",Rte,[t[2]||(t[2]=o.createElementVNode("div",{class:"label"},"关系节点:",-1)),o.createElementVNode("div",Pte,[o.createElementVNode("div",Dte,[o.createElementVNode("div",Mte,o.toDisplayString(n.nodeInfo.name),1)])])])):o.createCommentVNode("",!0),n.nodeInfo.label?(o.openBlock(),o.createElementBlock("div",Fte,[t[3]||(t[3]=o.createElementVNode("div",{class:"label"},"备注:",-1)),o.createElementVNode("div",$te,o.toDisplayString(n.nodeInfo.label),1)])):o.createCommentVNode("",!0)]),o.createElementVNode("div",zte,[a.isNormalNode&&n.nodeInfo.detail?(o.openBlock(),o.createElementBlock("div",Ute,[a.canGoDetail&&a.hasLevel?(o.openBlock(),o.createElementBlock("div",jte,[t[4]||(t[4]=o.createElementVNode("div",{class:"label"},"危险级别:",-1)),o.createElementVNode("div",{class:o.normalizeClass(["value level",a.getLevelClass(n.nodeInfo.detail&&n.nodeInfo.detail.info.basic.level)]),title:n.nodeInfo.detail&&n.nodeInfo.detail.info.basic.level||"--"},o.toDisplayString(n.nodeInfo.detail&&n.nodeInfo.detail.info.basic.level||"--"),11,qte)])):o.createCommentVNode("",!0),n.nodeInfo.detail&&n.nodeInfo.detail.tags&&n.nodeInfo.detail.tags.length>0?(o.openBlock(),o.createElementBlock("div",Hte,[t[7]||(t[7]=o.createElementVNode("div",{class:"label"},"标签:",-1)),o.createElementVNode("div",Gte,[o.createElementVNode("div",Wte,[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(a.formatTags(n.nodeInfo.detail.tags),(g,v)=>(o.openBlock(),o.createBlock(c,{key:v,"popper-class":"el-tooltip-gray"},{content:o.withCtx(()=>[o.createElementVNode("div",null,[o.createTextVNode(o.toDisplayString(g.name===g.desc?g.name:g.name+":"+g.desc)+" ",1),g.disabled?(o.openBlock(),o.createElementBlock(o.Fragment,{key:0},[t[5]||(t[5]=o.createElementVNode("br",null,null,-1)),t[6]||(t[6]=o.createTextVNode(" 标签状态:失效 "))],64)):o.createCommentVNode("",!0)])]),default:o.withCtx(()=>[o.createElementVNode("span",null,[o.createVNode(u,{class:o.normalizeClass(["graph-tag-one",`${g.type||"unknown"} ${g.disabled?"tag-disable":""}`]),type:g.type||"info"},{default:o.withCtx(()=>[o.createTextVNode(o.toDisplayString(g.name),1)]),_:2},1032,["class","type"])])]),_:2},1024))),128))])])])):o.createCommentVNode("",!0),(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(a.fieldMapThisType,(g,v)=>(o.openBlock(),o.createElementBlock(o.Fragment,null,[a.canShowField(g)?(o.openBlock(),o.createElementBlock("div",Kte,[o.createElementVNode("div",Yte,o.toDisplayString(g.zh)+":",1),o.createElementVNode("div",{class:o.normalizeClass(["value",{red:g.prop==="virus_name"}]),title:n.nodeInfo.detail.info.basic[v]},o.toDisplayString(a.getFieldValue(g)),11,Jte)])):o.createCommentVNode("",!0)],64))),256))])):o.createCommentVNode("",!0),a.isNodeTypeNode?(o.openBlock(),o.createElementBlock("div",Xte,[o.createElementVNode("div",Qte,[t[9]||(t[9]=o.createElementVNode("div",{class:"label"},"拓展节点统计:",-1)),o.createElementVNode("div",Zte,[a.getNodeTypeChildNum(n.nodeInfo.id).dangerChildNum>0?(o.openBlock(),o.createElementBlock("span",Vte,[o.createElementVNode("span",ene,o.toDisplayString(a.getNodeTypeChildNum(n.nodeInfo.id).dangerChildNum),1),t[8]||(t[8]=o.createTextVNode("/"))])):o.createCommentVNode("",!0),o.createTextVNode(o.toDisplayString(a.getNodeTypeChildNum(n.nodeInfo.id).allChildNum),1)])])])):o.createCommentVNode("",!0),a.isAggregateNode?(o.openBlock(),o.createElementBlock("div",tne,[o.createElementVNode("div",nne,"聚合节点 ("+o.toDisplayString(s.aggregationList.length)+"个)",1),o.createElementVNode("div",rne,[o.createVNode(p,{data:s.aggregationList,style:{width:"100%"}},{default:o.withCtx(()=>[o.createVNode(d,{prop:"name","min-width":"200",label:"名称"}),o.createVNode(d,{sortable:"",prop:"type",label:"类型"}),o.createVNode(d,{sortable:"",prop:"level",width:"80",label:"级别"},{default:o.withCtx(g=>[o.createElementVNode("span",{style:o.normalizeStyle({color:a.getColorStyle(g.row.level)})},o.toDisplayString(g.row.level||"--"),5)]),_:1}),o.createVNode(d,{label:"操作"},{default:o.withCtx(g=>[o.createVNode(f,{class:"add-to-graph-btn",type:"primary",text:"",size:"small",onClick:v=>a.addToGraph(g.row)},{default:o.withCtx(()=>t[10]||(t[10]=[o.createTextVNode(" 添加到图谱 ")])),_:2},1032,["onClick"])]),_:1})]),_:1},8,["data"])])])):o.createCommentVNode("",!0)])])):(o.openBlock(),o.createElementBlock("div",ine,[o.createElementVNode("div",one,[o.createElementVNode("div",sne,o.toDisplayString(n.nodeInfo.apiName),1)])]))])],38)}const lne=_t(kte,[["render",ane],["__scopeId","data-v-194a65c9"]]),cne=[{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:[]}],v0={name:"vue-safe-force-graph",version:"2.0.72",description:"force_graph in security area",author:"jason zhang",module:"./lib/vue-safe-force-graph.js",main:"./lib/vue-safe-force-graph.umd.cjs",type:"module",files:["/lib/"],exports:{".":{import:"./lib/vue-safe-force-graph.js",require:"./lib/vue-safe-force-graph.umd.cjs"},"./*":"./*"},scripts:{dev:"vite","dev:base64":"vite --mode development_base64",lib:"vite build","lib:base64":"vite build --mode production_base64","lib:webcomponent":"vite build --mode web_component",patch:'npm version patch -m "Upgrade to %s "',"patch:base64":'npm version patch -m "Upgrade to %s for base64"',p:"npm run patch && npm run lib && npm run lib:webcomponent && npm publish","p:base64":"npm run patch:base64 && npm run lib:base64 && npm publish",lint:"eslint --ext .js,.vue src",lintFix:"eslint --fix --ext .js,.vue src",imageToCdn:"node qcdn.cjs",imageToBase64:"node qcdn.cjs --buildtype=base64",changelog:"conventional-changelog -p angular -i CHANGELOG.md -s -r 0"},dependencies:{"@element-plus/icons-vue":"^2.1.0","@q/qapm":"^1.1.7","csv-parse":"^5.0.4",d3:"^7.8.5","d3-lasso":"0.0.5","element-plus":"^2.3.0",json2csv:"^5.0.7",konva:"^9.2.0","lodash-es":"^4.17.21","mime-types":"^2.1.35",minimist:"^1.2.6","radar-js-analytic-sdk":"^2.2.6",vue:"^3.5.3","vue-clipboard3":"^2.0.0","vue-router":"^4.1.6","vue-virtual-scroller":"^2.0.0-beta.8"},devDependencies:{"@babel/core":"^7.23.3","@babel/preset-env":"^7.23.3","@originjs/vite-plugin-commonjs":"^1.0.3","@q/qcdn":"^3.2.4","@vitejs/plugin-vue":"^4.1.0",axios:"^0.21.1","babel-eslint":"^10.1.0",eslint:"^7.32.0","eslint-plugin-vue":"^8.0.3",imageinfo:"^1.0.4",qs:"^6.10.1","rollup-plugin-visualizer":"^5.9.0",sass:"^1.62.0","unplugin-auto-import":"^0.15.2","unplugin-vue-components":"^0.24.1",vite:"^4.3.1"},browserslist:["> 1%","last 2 versions"],engines:{node:">=8.9",npm:">= 3.0.0"},license:"MIT"},Yse="",{toClipboard:dne}=Ac(),une="Arial,Helvetica Neue,Helvetica,PingFang SC,Hiragino Sans GB,Microsoft YaHei,sans-serif",Pr=1,fne=["ip","intranet","internet"],y0=20,Wt={},hne={name:"ForceGraphRenderByCanvas",components:{Popover:lne,NodeContextmenu:xte},mixins:[kr],provide:function(){return{levelList:this.levelList}},props:{data:{type:Object,default:()=>({nodes:[],links:[]})},history:{type:Object,default:()=>({})},linkDistance:{type:Number,default:120},strength:{type:Number,default:-600},isThreatPath:{type:Boolean,default:!1},requestGraphData:{type:Boolean,default:!1},moduleDetail:{type:Object,default:()=>{}},graphApi:{type:Object,default:()=>{}},alphaDecay:{type:Number,default:.0228},alphaMin:{type:Number,default:.001},darkMode:{type:Boolean,default:!0},levelList:{type:Array,default:()=>[{level:"未知",levelName:"未知",className:"unknown",normalColor:"#666",darkColor:"#c6cdd5",dangerNumber:0},{level:"危险",levelName:"危险",className:"warn",normalColor:"#CF1322",darkColor:"#fb2400",dangerNumber:1},{level:"普通",levelName:"普通",className:"normal",normalColor:"#007EE2",darkColor:"#0094ff",dangerNumber:-1},{level:"安全",levelName:"安全",className:"safe",normalColor:"#009A75",darkColor:"#00da90",dangerNumber:-2}]},nodeWidth:{type:Number},startNodeWidth:{type:Number},nodeTypeScale:{type:Number,default:1},nodeTypeList:{type:Array,default:()=>[]},manualTickNumber:{type:Number,default:500},startNodeAnimation:{type:Boolean,default:!0},customTooltip:{type:Function},enableScript:{type:Boolean,default:!1},edgeLabelMaxLength:{type:Number,default:10},customNodeImages:{type:Object,default:()=>{}}},emits:["handle-select-node","custom-contextmenu-click","flagFiles","updateSelection"],data(){return{prefix:"./public/",iconAllLoaded:!1,customIconLoaded:!1,iconSize:{},iconFiles:{},flagFiles:{},highlightRule:{},nodesRange:null,mousePosition:{left:0,top:0},hoverNodePosition:{},uniqueClass:"",showPopover:!1,popoverTimer:null,popoverType:"",popoverContent:{},popoverNode:{},showContextMenu:!1,contextMenuNode:{},menuOptions:[],isDragging:!1,originTransform:null,dragNodeFix:!1,destroyed:!1,actKey:es()?"metaKey":"ctrlKey",levelHeight:100,actNum:0,scriptNow:null,scriptInited:!1,canAct:!1,isKeyUp:!0,initTimes:0,resizeObserver:null,canvasElement:null,stage:o.shallowRef(null),layer:o.shallowRef(null),nodesGroup:o.shallowRef({}),linksGroup:o.shallowRef({}),grab:o.shallowRef(null),simulation:o.shallowRef(null),nodes:o.shallowRef(null),links:o.shallowRef(null),hoveredNode:o.shallowRef(null),mouseDownNode:o.shallowRef(null),selectionRect:null,selection:[],scale:Pr,mousedownPos:null,mousedownNode:null,mouseupNode:null,dragLine:null,darkBgRect:null,inited:!1,hasSimulation:!1,nodesLength:0,ticking:!1,anim1:null,anim2:null,anim3:null}},computed:{isAutoTick(){var e;return((e=this.nodes)==null?void 0:e.length)<this.manualTickNumber},iconSizeComputed(){const e=qr(this.iconSize);return this.nodeTypeList.forEach(t=>{e[t]=this.iconSize[t]*this.nodeTypeScale}),e},contextMenuNodes(){return this.contextMenuNode.id?this.selection.some(e=>e.id===this.contextMenuNode.id)?[...this.selection]:[this.contextMenuNode]:[]},showContextMenuFlag(){return this.requestGraphData?this.showContextMenu:!1}},watch:{data:{handler:function(){const e=this.nodesLength!==this.data.nodes.length;this.nodes=this.data.nodes,this.links=this.data.links,this.nodesLength=this.data.nodes.length,this.update(e)},deep:!0},moduleDetail:{handler:function(e){return Ne(this,null,function*(){e!=null&&e.nodes&&!this.iconAllLoaded&&!this.customIconLoaded&&(yield this.loadCustomIcon(),yield this.loadIcons(),this.initForceGraph(),setTimeout(()=>{this.update()},50))})},deep:!0,immediate:!0},darkMode:{handler:function(e){return Ne(this,null,function*(){const t=e?"dark":"light";setTimeout(()=>{this.update();const n=document.querySelectorAll(`.${this.uniqueClass}.render-container`);n!=null&&n.length&&(this.isThreatPath?n[0].setAttribute("data-theme",t):(n[0].setAttribute("data-theme",t),document.getElementsByClassName(this.uniqueClass+" render-container")[0].parentElement.parentElement.setAttribute("data-theme",t)))},200)})},immediate:!0}},created(){Xr.setProject("QH_10542_1724").getTrack(),console.log("组件版本: "+(v0==null?void 0:v0.version)),this.isThreatPath||this.initKeyEvent(),this.uniqueClass="unique"+new Date().getTime()+Math.floor(Math.random()*1e5)},mounted(){return Ne(this,null,function*(){new Zee({appKey:"fe-force-graph",ratio:50}),this.initForceGraph(),uD(this.levelList),!this.isThreatPath&&(Si(Re,"buttonClick",e=>{vn(e,"buttonClick msg"),this.handleContextMenuClick(e)}),Si(Re,"relationClick",e=>{this.handleContextMenuClick(e)}),Si(Re,"sendNodesRange",(e,t)=>{e!==void 0&&(this.nodesRange=e,this.updateNodeStyle())}))})},beforeUnmount(){Ei(Re,"buttonClick"),Ei(Re,"relationClick"),Ei(Re,"sendNodesRange"),this.unbindKeyEvent(),this.resetAll(),vn("destroy")},methods:{initForceGraph(){return Ne(this,null,function*(){if(this.inited)return;const e=this.$refs.canvasContainer;let t=e.clientWidth,n=e.clientHeight;this.resizeObserver=new ResizeObserver(s=>{for(const a of s){if(t=a.contentRect.width,n=a.contentRect.height,vn(`新宽度: ${t}px, 新高度: ${n}px`),t===0||n===0)return;this.stage.width(t),this.stage.height(n),this.layer&&this.layer.batchDraw(),this.hasSimulation&&this.updateSimulation()}}),this.resizeObserver.observe(e),document.addEventListener("click",this.hideContextMenu,!1),this.nodes=this.data.nodes,this.links=this.data.links,this.stage=new Ze.Stage({container:e,width:t,height:n,scaleX:Pr,scaleY:Pr}),this.layer=new Ze.Layer,this.grab=new Ze.Group({id:"grab",x:0,y:0}),this.layer.add(this.grab);const r=this.layer.getCanvas()._canvas;this.canvasElement=r,this.stage.on("mousemove",s=>{if(!this.mousedownNode||!s.evt[this.actKey]){if(this.resetMouseVars(),this.selectionRect&&s.evt.altKey){const a=this.stage.getPointerPosition(),l=(a.x-this.stage.x())/this.scale,c=(a.y-this.stage.y())/this.scale,u=l-this.selectionRect.x(),d=c-this.selectionRect.y();this.selectionRect.width(u),this.selectionRect.height(d),this.stage.batchDraw()}}else{const a=this.stage.getPointerPosition(),l=this.stage.scaleX(),c=(a.x-this.stage.x())/l,u=(a.y-this.stage.y())/l;this.dragLine.points([this.mousedownPos.x,this.mousedownPos.y,c,u]),this.layer.batchDraw()}}),this.stage.on("wheel",s=>{s.evt.preventDefault();const a=1.1,l=this.scale,c=s.evt.deltaY<0?l*a:l/a;this.scale=c;const u=this.stage.getPointerPosition(),d=this.stage.position(),f=u.x-(u.x-d.x)*(c/l),p=u.y-(u.y-d.y)*(c/l);this.stage.setAttrs({scaleX:c,scaleY:c,x:f,y:p}),this.layer.batchDraw()}),this.stage.on("mousedown",s=>{const a=s.target;if(a&&a.nodeType==="Stage"?this.stage.setDraggable(!0):this.stage.setDraggable(!1),s.evt.altKey){this.stage.setDraggable(!1);const l=this.stage.scaleX(),c=this.stage.getPointerPosition(),u=(c.x-this.stage.x())/l,d=(c.y-this.stage.y())/l;this.selectionRect=new Ze.Rect({x:u,y:d,width:0,height:0,stroke:"rgb(80, 80, 80)",strokeWidth:2}),this.layer.add(this.selectionRect),this.stage.batchDraw()}}),this.stage.on("mouseup",s=>{if(this.stage.setDraggable(!1),this.selectionRect&&s.evt.altKey){const a=this.selectionRect.x(),l=this.selectionRect.y(),c=this.selectionRect.width(),u=this.selectionRect.height();this.selection=this.nodes.filter(d=>{const f={x:d.x,y:d.y},p=Math.min(a,a+c),g=Math.max(a,a+c),v=Math.min(l,l+u),b=Math.max(l,l+u);return f.x>=p&&f.x<=g&&f.y>=v&&f.y<=b}),this.updateSelection(),this.selectionRect.destroy(),this.selectionRect=null}}),this.stage.on("contextmenu",this.handleGlobalContextMenu),this.stage.on("click",s=>{s.target&&s.target.nodeType==="Stage"&&this.handleDeselectNode(s)}),this.setSimulation(),this.stage.add(this.layer),this.stage.draw(),this.update(),this.inited=!0})},setSimulation(){var n;if(this.hasSimulation||!((n=this.nodes)!=null&&n.length))return;const e=this.stage.width()/(2*Pr),t=this.stage.height()/(2*Pr);this.hasSimulation=!0,this.simulation=GH(this.nodes).force("link",OH(this.links).id(r=>r.id).distance(this.linkDistance).strength(1)).force("charge",WH().strength(this.strength)).force("x",KH()).force("y",YH()).force("center",y_(e,t)).alphaDecay(this.alphaDecay).alphaMin(this.alphaMin).stop(),this.nodeWidth&&this.simulation.force("collision",TH().radius(this.nodeWidth/2)),this.isAutoTick?(this.simulation.alpha(1).restart(),this.simulation.on("tick",this.ticked)):(this.simulation.on("tick",null),this.sendManualTick()),this.simulation.on("end",()=>{vn("simulation end time",Date.now()),this.isThreatPath&&this.centerAndZoom(1)})},sendManualTick(){var e;vn("sendManualTick",(e=this.nodes)==null?void 0:e.length),!this.ticking&&(this.ticking=!0,this.doClearCanvas(),this.simulation.alphaDecay(this.alphaDecay*2),this.simulation.alphaMin(this.alphaMin*5),this.simulation.alpha(1).restart(),setTimeout(()=>{console.time("tick");for(let t=0,n=Math.ceil(Math.log(this.simulation.alphaMin())/Math.log(1-this.simulation.alphaDecay()));t<n;++t)vn("tick"),this.simulation.tick();console.timeEnd("tick"),this.ticking=!1,this.update(),this.centerAndZoom()},1e3))},update(e=!1){return Ne(this,null,function*(){var t,n,r;!this.iconAllLoaded&&((n=(t=this.moduleDetail)==null?void 0:t.nodes)!=null&&n.length)&&!this.customIconLoaded&&(yield this.loadIcons(),yield this.loadCustomIcon()),!this.destroyed&&(r=this.nodes)!=null&&r.length&&(this.initScript(),vn("update"),e&&this.updateSimulation(),this.doClearCanvas(),this.paintLinks(),this.paintNodes(),this.updateSelection(),this.ticked(),this.actNum===9&&setTimeout(()=>{this.centerAndZoom(.8)},200))})},doClearCanvas(){this.nodesGroup={},this.linksGroup={},this.layer.destroyChildren(),this.grab=new Ze.Group({id:"grab",x:0,y:0}),this.layer.add(this.grab)},paintNodes(){const e=this.stage.width()/2,t=this.stage.height()/2,n=this.selection.map(r=>r.id);this.nodes.forEach(r=>Ne(this,null,function*(){var _,C,k,S,E,N,A,I,O,F,P,M,W,U,Q,q,D,j,K,H,R,ie,ee;const s=(C=(_=r.detail)==null?void 0:_.info)==null?void 0:C.icon_img;let a;r.type==="nodeType"?a=this.iconSizeComputed[r.icon]||this.iconSizeComputed.node_type:a=this.iconSize[r.icon]||this.iconSize[r.type]||24,r.startNode&&this.startNodeWidth&&(a=this.startNodeWidth);const l=((E=(S=(k=r==null?void 0:r.detail)==null?void 0:k.info)==null?void 0:S.basic)==null?void 0:E.level)||"",c=(I=(A=(N=r==null?void 0:r.detail)==null?void 0:N.info)==null?void 0:A.basic)==null?void 0:I.flag;let u;try{u=yield this.getNodeImage(r)}catch(Y){console.log(Y)}this.nodesGroup[r.id]&&((O=this.nodesGroup[r.id])==null||O.destroy());const d=new Ze.Group({name:"nodeGroup",opacity:1,id:`${r.id}`,x:r.x?r.x:e,y:r.y?r.y:t,draggable:!0,visible:r.show});if(n.includes(r.id)&&d.addName("isSelected"),r.startNode&&this.startNodeAnimation){const Y=ao(l,this.levelList,this.darkMode),J=new Ze.Circle({x:0,y:0,radius:20,fill:Y,opacity:0}),oe=new Ze.Circle({x:0,y:0,radius:20,fill:Y,opacity:0}),re=new Ze.Circle({x:0,y:0,radius:20,fill:Y,opacity:0});d.add(J),d.add(oe),d.add(re);const z=(G,te)=>new Ze.Animation(function(le){const de=le.time;if(de%te/te===0)return!1;const be=.5-.5*(de%te)/te,Se=40*(de%te)/te;G.radius(Se||0),G.opacity(be)},this.layer);(F=this.anim1)==null||F.stop(),(P=this.anim2)==null||P.stop(),(M=this.anim3)==null||M.stop(),this.anim1=z(J,1500),this.anim2=z(oe,1500),this.anim3=z(re,1500),(W=this.anim1)==null||W.start(),setTimeout(()=>{this.anim2.start()},500),setTimeout(()=>{this.anim3.start()},1e3)}else if(r.startNode&&!this.startNodeAnimation){const Y=ao(l,this.levelList,this.darkMode),J=new Ze.Circle({x:0,y:0,radius:20,fill:Y,opacity:this.startNodeAnimation?0:.3});d.add(J)}if(!s&&(r.type==="ip"||r.type==="internet"||r.type==="country"||r.type==="target_country")){const Y=ao(l,this.levelList,this.darkMode),J=new Ze.Circle({x:0,y:0,fill:this.darkMode?"#182628":"#fff",radius:a/2,stroke:Y,strokeWidth:2});d.add(J)}if(u){const Y=c||(Q=(U=r==null?void 0:r.detail)==null?void 0:U.info)!=null&&Q.inner_country?20:a,J=u&&new Ze.Image({x:0,y:0,offsetX:Y/2,offsetY:Y/2,image:u,width:Y,height:Y,draggable:!1});d.add(J)}if(!s&&r.detail&&r.type==="md5"){const Y=((j=(D=(q=r.detail.info)==null?void 0:q.basic)==null?void 0:D.file_type)==null?void 0:j.toUpperCase())||"MD5",J=new Ze.Text({name:"md5Text",x:0,y:0,text:Y,fontSize:4,fontWeight:700,fontFamily:une,fill:this.darkMode?"#182628":"#fff",align:"center",listening:!1});J.x(J.x()-J.width()/2),d.add(J)}const f=r.textProp||"name",p=f==="name"?((H=(K=r==null?void 0:r.detail)==null?void 0:K.info)==null?void 0:H.name)||r.name:r[f];let g=(p==null?void 0:p.length)>14&&!fne.includes(r.type)?p.slice(0,7)+"..."+p.slice(-7):p;g=wD(g);const v=new Ze.Text({offsetY:a/2,name:"konvaText",x:0,y:a+8,text:g,fontSize:12,fontFamily:"Calibri",fill:this.darkMode?"#cdd9da":"#000",align:"center",listening:!1,visible:!!r.textProp});v.x(v.x()-v.width()/2),d.add(v);const b=new Ze.Circle({name:"border",x:0,y:0,radius:a/2,fill:"#5c6271",opacity:.4,visible:!1});if(d.add(b),(ie=(R=r.detail)==null?void 0:R.tags)!=null&&ie.length){const Y=new Ze.Circle({x:((a/2||14)+5)*Math.sin(60*Math.PI/180),y:-((a/2||14)+5)*Math.cos(60*Math.PI/180),radius:3,fill:"#9300ff",listening:!1});d.add(Y)}if(r.type!=="nodeType"&&r.type!=="aggregation"){var w=new Ze.Circle({name:"collect",x:((a/2||14)+5)*Math.sin(0*Math.PI/180),y:-((a/2||14)+5)*Math.cos(0*Math.PI/180),radius:3,fill:"#ffad00",visible:!!r.collect});d.add(w)}if(r.label){const Y=new Ze.Circle({x:((a/2||14)+5)*Math.sin(30*Math.PI/180),y:-((a/2||14)+5)*Math.cos(30*Math.PI/180),radius:3,fill:"#0099ff",listening:!1});d.add(Y)}if(r.type==="nodeType"&&r.showTotal){const Y=(a/2||14)+5,J=70*Math.PI/180,oe=Y*Math.sin(J),re=-Y*Math.cos(J),z=new Ze.Circle({x:oe,y:re,radius:10,fill:"#1890ff",stroke:"white",strokeWidth:2,listening:!1});d.add(z);const G=new Ze.Text({x:oe,y:re,text:`${((ee=r==null?void 0:r.children)==null?void 0:ee.length)||0}`,fontSize:10,fontFamily:"Calibri",fill:"#fff",align:"center",verticalAlign:"middle",listening:!1});G.offsetX(G.width()/2),G.offsetY(G.height()/2),d.add(G)}d.on("dragstart",(Y,J)=>{Y.evt&&Y.evt[this.actKey]||(this.isAutoTick&&this.simulation.alphaTarget(.3).restart(),this.isDragging=!0)}),d.on("dragmove",Y=>{if(!(Y.evt&&Y.evt[this.actKey])){var J=this.simulation.nodes().find(oe=>oe.id===r.id);J&&(J.x=d.x(),J.fx=d.x(),J.y=d.y(),J.fy=d.y(),this.links.forEach(oe=>{const re=this.linksGroup[`${oe.source.id}-${oe.target.id}`],z=re==null?void 0:re.findOne(".konvaLine"),G=re==null?void 0:re.findOne(".linkArrow"),te=re==null?void 0:re.findOne(".edgeLabel");let le,de,ye,be;if(oe.source.id===J.id){if(!this.nodesGroup[oe.target.id])return;le=J.x,de=this.nodesGroup[oe.target.id].x(),ye=J.y,be=this.nodesGroup[oe.target.id].y(),z.points([le,ye,de,be]);const Se=Lh(le,ye,de,be,y0);G==null||G.x(Se==null?void 0:Se.x),G==null||G.y(Se==null?void 0:Se.y),G==null||G.rotation(Math.atan2(be-ye,de-le)*(180/Math.PI))}else if(oe.target.id===J.id){if(!this.nodesGroup[oe.source.id])return;le=this.nodesGroup[oe.source.id].x()||0,de=J.x||0,ye=this.nodesGroup[oe.source.id].y()||0,be=J.y||0,z.points([le,ye,de,be]);const Se=Lh(le,ye,de,be,y0);G==null||G.x(Se==null?void 0:Se.x),G==null||G.y(Se==null?void 0:Se.y),G==null||G.rotation(Math.atan2(be-ye,de-le)*(180/Math.PI))}if(te&&(oe.source.id===J.id||oe.target.id===J.id)){te.x((le+de)/2),te.y((ye+be)/2),te.offsetX(te.getWidth()/2||0),te.offsetY(te.getHeight()/2+8||0);const Se=Math.atan2(be-ye,de-le)*(180/Math.PI);de<le?te.rotation(Se+180):te.rotation(Se)}}),this.layer.batchDraw())}}),d.on("dragend",Y=>{Y.evt&&Y.evt[this.actKey]||(this.isAutoTick&&this.simulation.alphaTarget(0),this.isDragging=!1)}),d.on("click",Y=>{Y.evt.detail===2?this.expandNodes(Y,r):Y.evt.detail===1&&Y.evt.button===0&&this.handleNodeClick(Y,r)}),d.on("contextmenu",Y=>{Y.cancelBubble=!0,Y.evt.preventDefault(),Y.evt.stopPropagation(),this.handleNodeContextMenu(Y,r,d)}),d.on("mouseup",Y=>this.handleNodeMouseUp(Y,r)),d.on("mousedown",Y=>this.handleNodeMouseDown(Y,r)),d.on("mouseenter",Y=>this.handleNodeMouseEnter(Y,r)),d.on("mouseleave",Y=>this.handleNodeMouseLeave(Y,r)),this.grab.add(d),this.nodesGroup[r.id]=d})),this.stage.batchDraw()},paintLinks(){const e=this.stage.width()/2,t=this.stage.height()/2;this.links.forEach(n=>{this.linksGroup[`${n.source.id}-${n.target.id}`]&&this.linksGroup[`${n.source.id}-${n.target.id}`].destroy();const r=new Ze.Group({opacity:1,id:`${n.source.id}-${n.target.id}`,visible:n.source.show&&n.target.show}),s=this.darkMode?"#445152":"#999",a=new Ze.Arrow({name:"linkArrow",pointerLength:10,pointerWidth:10,x:e,y:t,fill:s});r.add(a);const l=n.source.x||0,c=n.source.y||0,u=n.target.x||0,d=n.target.y||0,f=new Ze.Line({name:"konvaLine",id:`${n.source.id}-${n.target.id}`,points:[l,c,u,d],stroke:n.target.type==="org"?"#cf1322":s,strokeWidth:1,dash:n.diy===!0?[5,5]:null});if(n.edgeLabelProp){const p=n.edgeLabelProp.length>this.edgeLabelMaxLength?n.edgeLabelProp.substring(0,this.edgeLabelMaxLength)+"...":n.edgeLabelProp,g=new Ze.Text({name:"edgeLabel customEdgeLabel",x:(l+u)/2,y:(c+d)/2,text:p,fontSize:12,fill:this.darkMode?"#cdd9da":"#000"});r.add(g)}if(n.target.type==="nodeType"){const p=n.target.relay_name||n.target.name,g=new Ze.Text({name:"edgeLabel",x:(l+u)/2,y:(c+d)/2,text:p,fontSize:12,fill:this.darkMode?"#cdd9da":"#000"});r.add(g)}r.add(f),r.on("mouseenter",p=>this.handleLinkMouseEnter(p,n)),r.on("mouseleave",p=>this.handleLinkMouseLeave(p,n)),this.grab.add(r),r.moveToBottom(),this.linksGroup[`${n.source.id}-${n.target.id}`]=r}),this.stage.batchDraw()},updateSimulation(){var e,t;try{if(!this.simulation&&!this.hasSimulation){this.setSimulation();return}this.simulation.nodes(this.nodes),this.simulation.force("link").links(this.links),this.simulation.alpha(.4).restart(),this.history.layoutIndex===0?((e=this.nodes)==null?void 0:e.length)<this.manualTickNumber?this.simulation.on("tick",this.ticked):(this.simulation.on("tick",null),this.sendManualTick()):this.simulation.on("tick",this.ticked)}catch(n){console.log(n,"simulation-e1"),(t=this.simulation)==null||t.stop()}},ticked(){switch(vn("ticked"),this.history.layoutIndex){case 0:this.forceLayout();break;case 1:this.treeLayout();break;default:this.forceLayout();break}},forceLayout(){var t;if(!this.nodes.length||!this.links.length)return;let e=!0;for(let n=0;n<this.links.length;n++){const r=this.links[n],s=this.linksGroup[`${r.source.id}-${r.target.id}`],a=s==null?void 0:s.findOne(".konvaLine"),l=s==null?void 0:s.findOne(".linkArrow"),c=s==null?void 0:s.findOne(".edgeLabel");let u=r.source.x,d=r.source.y,f=r.target.x,p=r.target.y;const g=f-u||1,v=p-d||1,b=Math.sqrt(g*g+v*v),w=g/b||1,_=v/b||1,C=r.source.type==="nodeType"?(this.iconSizeComputed[r.source.icon]||14)/2-1:(this.iconSize[r.target.type]||14)/2-1,k=r.target.type==="nodeType"?(this.iconSizeComputed[r.target.icon]||14)/2-1:(this.iconSize[r.target.type]||14)/2-1;if(u=u+C*w,d=d+C*_,f=f-k*w,p=p-k*_,isNaN(u)||isNaN(d)||isNaN(f)||isNaN(p)){e=!1;break}if(a==null||a.points([u,d,f,p]),l){const S=Lh(u,d,f,p,y0);l==null||l.x((S==null?void 0:S.x)||0),l==null||l.y((S==null?void 0:S.y)||0),l==null||l.rotation(Math.atan2(p-d,f-u)*(180/Math.PI))}if(c){c.x((u+f)/2),c.y((d+p)/2),c.offsetX(c.getWidth()/2||0),c.offsetY(c.getHeight()/2+8||0);const S=Math.atan2(p-d,f-u)*(180/Math.PI);f<u?c.rotation(S+180):c.rotation(S)}}if(!e){vn("请点击自动布局按钮"),this.resetLayout();return}for(let n=0;n<this.nodes.length;n++){const r=this.nodes[n];(t=this.nodesGroup[r.id])==null||t.position({x:r.x||0,y:r.y||0})}},selectEdgesByNode(e){const t=e.map(n=>n.id);this.links.forEach(n=>{const r=this.linksGroup[`${n.source.id}-${n.target.id}`];t.includes(n==null?void 0:n.target.id)||t.includes(n==null?void 0:n.source.id)?r==null||r.addName("isSelected"):r==null||r.removeName("isSelected")})},showKeyWay(e){if(e.length!==1){this.links.forEach(r=>{const s=this.linksGroup[`${r.source.id}-${r.target.id}`];s==null||s.removeName("keyed")}),this.history.resetKeyLinksAndNodes();return}const{keyLinks:t,keyNodeIds:n}=this.history.findKeyLinksAndNodes(e[0].id,!0);this.links.forEach(r=>{const s=t.find(l=>l.source.id===r.source.id&&l.target.id===r.target.id),a=this.linksGroup[`${r.source.id}-${r.target.id}`];s?a==null||a.addName("keyed"):a==null||a.removeName("keyed")}),this.nodes.forEach(r=>{const s=this.nodesGroup[r.id];n.includes(r.id)?s==null||s.addName("keyed"):s==null||s.removeName("keyed")})},updateNodeStyle(){if(!this.iconAllLoaded)return;let e;this.nodesRange&&this.history.keyNodeIds?e=[...this.nodesRange.map(t=>t.id),...this.history.keyNodeIds]:this.nodesRange?e=this.nodesRange.map(t=>t.id):this.history.keyNodeIds&&(e=this.history.keyNodeIds),setTimeout(()=>{this.highlightByRule(this.highlightRule,e),this.updateNodesStyleByName(),this.updateLinksStyleByName()},0)},updateNodesStyleByName(){this.nodes.forEach(e=>{const t=this.nodesGroup[e.id];if(!t)return;const n=t==null?void 0:t.findOne(".border"),r=t==null?void 0:t.findOne(".konvaText"),s=this.darkMode?"#cdd9da":"#000";t!=null&&t.hasName("lowlight")?t==null||t.opacity(.4):t==null||t.opacity(1),t!=null&&t.hasName("isSelected")?(t.scale({x:8/7,y:8/7}),n==null||n.visible(!0)):(t.scale({x:1,y:1}),n==null||n.visible(!1)),e.type!=="nodeType"&&(t!=null&&t.hasName("isSelected")?(r==null||r.visible(!0),r==null||r.fill("#007ee2")):(r==null||r.visible(!!e.textProp),r==null||r.fill(s)))}),this.layer.batchDraw()},updateLinksStyleByName(){this.links.forEach(e=>{const t=this.linksGroup[`${e.source.id}-${e.target.id}`];if(!t)return;const n=t.findOne(".konvaLine"),r=t.findOne(".edgeLabel"),s=t.findOne(".linkArrow");t!=null&&t.hasName("lowlight")?t==null||t.opacity(.4):t==null||t.opacity(1);const a=this.darkMode?"#445152":"#999";if(t.hasName("isSelected")||t.hasName("keyed")){const l=e.target.type==="org"?"#cf1322":"#007ee2";n.stroke(l),s.fill(l),n.strokeWidth(1),t==null||t.opacity(1),r==null||r.fill("#007ee2"),t.hasName("keyed")?n.strokeWidth(3):n.strokeWidth(1)}else{const l=e.target.type==="org"?"#cf1322":a;this.linksGroup[`${e.source.id}-${e.target.id}`].removeName("isSelected"),n.strokeWidth(1),n.stroke(l),s.fill(l),r==null||r.fill(this.darkMode?"#cdd9da":"#000")}}),this.layer.batchDraw()},handleTableSelect(e=[]){this.selection=this.nodes.filter(t=>{let n;return e.length>1?n=e.indexOf(t.id)>=0&&t.type!=="nodeType"&&t.type!=="aggregation":n=e.indexOf(t.id)>=0,n}),this.updateSelection()},resetAll(){var e,t;document.removeEventListener("click",this.hideContextMenu),(e=this.simulation)==null||e.stop(),this.simulation=null,this.hasSimulation=!1,this.mousedownNode=null,this.mousedownPos=null,this.mouseupNode=null,this.$refs.canvasContainer&&((t=this.resizeObserver)==null||t.unobserve(this.$refs.canvasContainer)),this.nodes=[],this.links=[],this.resizeObserver=null,this.destroyed=!0,this.history.destroy&&this.history.destroy()},unbindKeyEvent(){this.initKeyEvent(1)},initKeyEvent(e=0){if(e){document.removeEventListener("keydown",this.keyDown),document.removeEventListener("keyup",this.keyUp);return}document.addEventListener("keydown",this.keyDown),document.addEventListener("keyup",this.keyUp),this.isKeyUp=!0},keyDown(e){const t=e.keyCode,n=e[this.actKey],r=e.shiftKey;if(this.isKeyUp)switch(t){case 17:break;case 16:this.toggleZoom(!1);break;case 38:break;case 40:this.goAction();break;case 67:if(window.getSelection().toString())return;n&&this.copyNodeText(this.selection);break;case 89:n&&!es()&&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(es())switch(n){case 17:break;case 16:this.toggleZoom(!0);break}else switch(t){case 17:break;case 16:this.toggleZoom(!0);break}this.isKeyUp=!0},initScript(){var r,s,a,l,c,u;if(!this.enableScript||this.scriptInited)return;((a=(s=(r=this.history)==null?void 0:r.dataNow)==null?void 0:s.nodes)==null?void 0:a.length)>0&&(this.scriptInited=!0);const e=["193.36.119.50","6cd7b91212983cc557c6e3e671734ff9"];let t=null;if((u=(c=(l=this.history)==null?void 0:l.dataNow)==null?void 0:c.nodes)==null||u.some(d=>{const f=e.indexOf(d.id);return f>=0&&d.startNode===!0&&(t=f),!0}),t===null)return;const n=[[{node:"193.36.119.50"},{node:"6cd7b91212983cc557c6e3e671734ff9"},{node:"http://9d1109ab.privatedns.org/download/FirefoxSetup.dll"},{node:"94.237.81.57"},{node:"chart.expocasheuro.com"}],[{node:"6cd7b91212983cc557c6e3e671734ff9"},{node:"http://9d1109ab.privatedns.org/download/FirefoxSetup.dll"},{node:"94.237.81.57"},{node:"chart.expocasheuro.com"},{node:"183.246.177.59"},{node:"e7db5b09a39e324d36e937d89f98fdb9122cd859"}]];this.scriptNow=n[t],this.canAct=!!this.scriptNow},goAction(){if(!this.scriptNow||this.actNum>(this.scriptNow.length-1)*2)return;if(this.actNum===(this.scriptNow.length-1)*2){this.centerAndZoom(),this.actNum++;return}const e=this.scriptNow[Math.floor(this.actNum/2)+1];if(this.actNum%2===0){if(!this.history.dataNow.nodes.some(t=>t.id===e.node))return;this.handleTableSelect(e.node),this.nodesMoveToCenterView([e.node]),this.actNum++}else this.$parent.expandNodes(this.selection[0]),setTimeout(()=>{this.nodesMoveToCenterView([this.selection[0].id])},100),this.actNum++},nodesMoveToCenterView(e,t=.9){if(e.length===0)return;const n=[],r=this.nodes.filter(k=>e.indexOf(k.id)>=0);r==null||r.forEach(function(k,S){const E=this.nodesGroup[k.id];n.push({bounds:(E==null?void 0:E.getClientRect())||{},fx:k.x||0,fy:k.y||0})});const s=this.getBounds(n);this.originTransform=this.originTransform={scaleX:this.stage.scaleX(),scaleY:this.stage.scaleY(),x:this.stage.x(),y:this.stage.y()};const a=this.stage.width(),l=this.stage.height()/1.5,c=s.width,u=s.height;if(c===0||u===0)return;let d=t/Math.max(c/a,u/l);d=Math.min(d,Pr)||Pr,this.scale=d;const f=this.stage.width()/(2*d),p=this.stage.height()/(2*d),g=this.nodesGroup[e[0]],v=g==null?void 0:g.getClientRect(),b=v.x*d,w=v.y*d,_=f-b,C=p-w;this.stage.setAttrs({scaleX:d,scaleY:d,x:_||0,y:C||0}),this.layer.batchDraw()},getBounds(e){let t,n,r,s;return e.map(a=>{const l=a.bounds,c=l.x+a.fx,u=l.y+a.fy;t=Math.min(c,t)||c,n=Math.min(u,n)||u,r=Math.max(c+l.width,r)||c+l.width,s=Math.max(u+l.height,s)||u+l.height}),{x:t,y:n,width:r-t,height:s-n}},resetMouseVars(){var e;this.mousedownNode=null,this.mousedownPos=null,this.mouseupNode=null,(e=this.dragLine)==null||e.destroy(),Object.keys(this.nodesGroup).forEach(t=>{this.nodesGroup[t].draggable(!0)})},loadCustomIcon(){if(this.customNodeImages&&!this.customIconLoaded){let e=0;const t=Object.keys(this.customNodeImages).length;Object.keys(this.customNodeImages).forEach(n=>Ne(this,null,function*(){e++,Wt[n]=yield xr(this.customNodeImages[n]),e===t&&(this.customIconLoaded=!0)}))}else this.customIconLoaded=!0},loadIcons(){return new Promise((e,t)=>{const n=[],r=[];for(const u in this.moduleDetail.plugs){const d=this.moduleDetail.plugs[u];d==null||d.map(f=>{f.children?r.push(...f.children):r.push(f)})}n.push(...r.map(u=>u.icon)),n.push(...this.moduleDetail.nodes.map(u=>u.name)),n.push("node_type"),n.push("node"),n.push("aggregation");const s=this;let a=0;const l=n.filter(u=>this.imgPath[`${s.prefix}d3svg1/${u}.svg`]);function c(u){return{}.VITE_SVG_TYPE==="base64"?v2(u):g2(u)}l.map(u=>{c(this.imgPath[`${s.prefix}d3svg1/${u}.svg`]).then(d=>{s.iconFiles[u]=d;const f=_D(d).width;this.iconSize[u]=this.nodeWidth?this.nodeWidth:f,a++,a===l.length&&(s.iconAllLoaded=!0,e())}).catch(d=>{console.log(d,"e"),t()})})})},toggleZoom(e){},handleNodeContextMenu(e,t){var n,r;e.evt&&e.evt[this.actKey]||(clearTimeout(this.popoverTimer),this.showPopover=!1,this.contextMenuId++,this.contextMenuNode=t,this.mousePosition.left=e.evt.clientX,this.mousePosition.top=e.evt.clientY,this.showContextMenu=!0,e.currentTarget.type==="aggregation"?this.menuOptions=cne: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){ve(this,"handle-select-node",{isSelected:!1,_node:o.toRaw(t)}),this.selection.length&&(this.selection=[],this.updateSelection()),this.setHighlightRule({}),this.hideContextMenu()},setHighlightRule({prop:e,type:t,value:n}){this.highlightRule={prop:e,type:t,value:n},this.updateNodeStyle(),t||hw(".legend-filter .out-box").classed("active",!1)},updateSelection(){const e=this.selection.map(t=>t.id);this.nodes.forEach(t=>{var n,r;e.includes(t.id)?(n=this.nodesGroup[t.id])==null||n.addName("isSelected"):(r=this.nodesGroup[t.id])==null||r.removeName("isSelected")}),ve(this,"updateSelection")},toggleLayout(e){this.history.layoutIndex=e,this.nodes.map(t=>{t.fx=t.fy=null}),this.updateSimulation(),this.ticked(),setTimeout(()=>{this.centerAndZoom()},200)},handleNodeClick(e,t){qt({cId:"handleNodeClick",c:"点击节点"}),this.canAct&&(t.type==="org"?window.open("http://bs.safe.360.net/starmap","__blank"):t.type==="nodeType"&&t.id.indexOf("org")>=0&&window.open("http://bs.safe.360.net/orglist?snapshot=true","__blank1")),this.hideContextMenu();const n=this.selection.some(s=>s.id===t.id);if(e.evt.shiftKey){if(t.type==="nodeType"||this.selection.some(s=>s.type==="nodeType"))return;n?this.selection=this.selection.filter(s=>s.id!==t.id):this.selection=[...this.selection,t]}else n?this.selection=[]:this.selection=[t];const r=this.selection.some(s=>s.id===t.id);ve(this,"handle-select-node",{isSelected:r,_node:t}),this.updateSelection(),this.setHighlightRule(this.highlightRule)},handleNodeMouseEnter(e,t){if(!this.showContextMenu&&!e.evt[this.actKey]){const n=e.target.width(),r=e.target.height(),s=e.target,a=s.getAbsolutePosition(),c=s.getStage().container().getBoundingClientRect(),u=a.x-n/2+c.left,d=a.y-r/2+c.top,f=u,p=d,g=f,v=f+n,b=p,w=p+r;this.hoverNodePosition={top:b,right:v,bottom:w,left:g,width:n,height:r},this.popoverType="node",this.popoverContent={[t.type]:t.id},this.popoverNode=t,this.popoverTimer&&clearTimeout(this.popoverTimer),this.popoverTimer=setTimeout(()=>{this.showPopover=!0},200)}},handleNodeMouseLeave(e,t){this.showContextMenu||(clearTimeout(this.popoverTimer),this.showPopover=!1)},handleNodeMouseUp(e,t){var n;e.evt[this.actKey]&&this.mousedownNode&&(this.dragLine&&((n=this.dragLine)==null||n.destroy()),this.mouseupNode=t,this.mouseupNode.id===this.mousedownNode.id||this.mouseupNode.type==="aggregation"||this.mousedownNode.type==="aggregation"||this.$parent.addLink(this.mousedownNode,this.mouseupNode)),this.resetMouseVars()},handleNodeMouseDown(e,t){if(e.evt[this.actKey]){this.mousedownNode=t,this.nodesGroup[t.id].draggable(!1);const n=this.stage.scaleX(),r=this.stage.getPointerPosition(),s=(r.x-this.stage.x())/n,a=(r.y-this.stage.y())/n;this.mousedownPos={x:s,y:a},this.dragLine=new Ze.Line({points:[s,a,s,a],stroke:"black",strokeWidth:1,dash:[5,5],opacity:.7,visible:!0}),this.layer.add(this.dragLine),this.stage.draw()}},handleLinkMouseEnter(e,t){if(t.target.type==="nodeType")return;const n=!!t.edgeLabelProp;let r;if(n?r=t.edgeLabelProp:r=t.target.relay_name||t.target.name,r.length<=this.edgeLabelMaxLength)return;const a=this.linksGroup[`${t.source.id}-${t.target.id}`].findOne(".edgeLabel"),l=t.source.x,c=t.source.y,u=t.target.x,d=t.target.y;a&&(a.text(r),a.x((l+u)/2),a.y((c+d)/2),a.offsetX(a.getWidth()/2||0),a.offsetY(a.getHeight()/2+8||0))},handleLinkMouseLeave(e,t){if(t.target.type==="nodeType")return;const n=!!t.edgeLabelProp;let r;if(n?r=t.edgeLabelProp:r=t.target.relay_name||t.target.name,r.length<=this.edgeLabelMaxLength)return;const a=this.linksGroup[`${t.source.id}-${t.target.id}`].findOne(".edgeLabel"),l=t.source.x,c=t.source.y,u=t.target.x,d=t.target.y;a&&(a.text(r.substring(0,this.edgeLabelMaxLength)+"..."),a.x((l+u)/2),a.y((c+d)/2),a.offsetX(a.getWidth()/2||0),a.offsetY(a.getHeight()/2+8||0))},treeLayout(){this.nodes.map(e=>{e.fx=e.pos,e.fy=e.levelNum*this.levelHeight}),this.forceLayout()},resetLayout(){var e,t;(e=this.simulation)!=null&&e.stop&&((t=this.simulation)==null||t.stop()),this.nodes.map(n=>{delete n.vx,delete n.vy,delete n.x,delete n.y,delete n.fx,delete n.fy}),this.updateSimulation()},selectSingleEdgeNode(e){const t=[];this.links.map(n=>{n.source.id===e.id&&t.push(n.target.id)});for(let n=t.length-1;n>=0;n--){let r=0,s=0;const a=t[n];this.links.map(l=>{l.source.id===a&&r++,l.target.id===a&&s++}),r>=1&&t.splice(n,1),s>=2&&t.splice(n,1)}return t},selectChildren(e){const t=[];this.links.map(n=>{n.source.id===e.id&&t.push(n.target.id)}),this.handleTableSelect(t)},selectParents(e){const t=[];this.links.map(n=>{n.target.id===e.id&&t.push(n.source.id)}),this.handleTableSelect(t)},handleGlobalContextMenu(e){this.mousePosition.left=e.evt.clientX,this.mousePosition.top=e.evt.clientY,this.menuOptions=[],this.showContextMenu=!0,this.showPopover=!1,this.contextMenuNode={},e.evt.preventDefault()},hideContextMenu(){this.showContextMenu=!1,this.contextMenuNode={}},centerAndZoom(e=.7,t=!1){var f,p,g;if(this.originTransform={scaleX:this.stage.scaleX(),scaleY:this.stage.scaleY(),x:this.stage.x(),y:this.stage.y()},!this.grab)return;const n=this.stage.width(),r=this.stage.height(),s=this.grab.getClientRect(),a=s.width/this.scale,l=s.height/this.scale;if(a===0||l===0)return;let c=e/Math.max(a/n,l/r);if(c=t?c:Math.min(c,Pr)||Pr,!t&&c>Pr)return;this.scale=c;const u=this.stage.width()/(2*c),d=this.stage.height()/(2*c);if((f=this.simulation)!=null&&f.force&&((p=this.simulation)==null||p.force("center",y_(u,d))),this.ticked(),this.stage.setAttrs({scaleX:c,scaleY:c,x:0,y:0}),this.layer.batchDraw(),this.history.layoutIndex===1){const v=this.grab.getClientRect(),b=(n-v.width)/2-v.x,w=(r-v.height)/2-v.y;this.stage.setAttrs({x:b,y:w}),this.layer.batchDraw(),(g=this.simulation)==null||g.stop()}},reset(){this.stage.setAttrs(this.originTransform)},handleContextMenuClick({nodes:e,api:t,dataApi:n}){if(this.requestGraphData){let r,s;const a={show_label:"label",all_show_label:"label",all_show_names:"name",show_names:"name"};switch(t&&t.name){case"edit_label":this.editLabel(e);break;case"single_edge_select":r=this.selectSingleEdgeNode(e[0]),this.selection=this.nodes.filter(l=>r.includes(l.id));break;case"hold_aggregation":s=this.selectSingleEdgeNode(e[0]),this.$parent.aggregationNodes(s,e[0]);break;case"release_aggregation":this.$parent.releaseAggregation(e[0]);break;case"show_label":case"show_names":e.map(l=>{l.textProp=a[t.name]}),this.update();break;case"all_show_label":case"all_show_names":this.nodes.map(l=>{l.textProp=a[t.name]}),this.update();break;case"un_show_names":case"un_show_label":e.map(l=>{l.textProp=null}),this.update();break;case"all_un_show_names":case"all_un_show_label":this.nodes.map(l=>{l.textProp=null}),this.update();break;case"all_show_edges_label":this.links.map(l=>{l.edgeLabelProp=l.edge_label}),this.update();break;case"all_hide_edges_label":this.links.map(l=>{l.edgeLabelProp=null}),this.update();break;case"copy":this.copyNodeText(e);break;case"node_star":e.map(l=>{this.starNode(l)});break;case"un_node_star":e.map(l=>{this.starNode(l,!1)});break;case"fix_nodes":e.map(l=>{this.toggleMove(l,!0)});break;case"un_fix_nodes":e.map(l=>{this.toggleMove(l,!1)}),this.updateSimulation();break;case"all_fix_nodes":this.fixAllNodes(!0);break;case"all_un_fix_nodes":this.fixAllNodes(!1);break;case"expand_node":e.map(l=>{this.$parent.expandNodes(l)});break;case"expand_part_node":e.map(l=>{this.$parent.expandNodes(l,n)});break;case"go_result":this.handleGoDetail(e);break;case"delete_node":this.$parent.deleteNodes(e);break;case"select_children":this.selectChildren(e[0]);break;case"select_parents":this.selectParents(e[0]);break;case"undo":this.$parent.historyBack();break;case"redo":this.$parent.historyForward();break;case"add_con_node":this.$parent.$refs.buttonList.addNode("diy",e[0]);break;case"add_link":this.$parent.$refs.buttonList.addNode("diy",e[0]);break;case"show_node":this.toggleShowNode(e[0],e[1],!0);break;case"hide_node":this.toggleShowNode(e[0],e[1],!1);break;case"show_nodes":this.toggleShowNodes(e,!0);break;case"hide_nodes":this.toggleShowNodes(e,!1);break;default:ve(this,"custom-contextmenu-click",{eventName:t.name,customConfig:t.customConfig,nodes:e,allNodes:o.toRaw(this.history.dataNow.nodes)})}this.hideContextMenu(),setTimeout(()=>{this.updateSelection()},400)}else Nt({message:"无可操作权限",type:"warning"})},expandNodes(e,t){qt({cId:"dblclick",c:"双击节点"}),this.requestGraphData?this.$parent.expandNodes(t):Nt({message:"无可操作权限",type:"warning"})},toggleShowNode(e,t,n=!0){this.history.toggleShowNode(e,null,n),this.selection.filter(s=>s.show).length>0||this.handleTableSelect([]),setTimeout(this.updateNodeStyle,100)},toggleShowNodes(e,t=!0){e.forEach(n=>{this.history.toggleShowNode(n,null,t)}),setTimeout(this.updateNodeStyle,100)},copyNodeText(e){let t="";e.filter(n=>n.type!=="aggregation"&&n.type!=="nodeType").map(n=>{t=t+n.id+`
|
|
140
|
-
`}),t&&dne(t).then(()=>{Nt({message:"复制成功",type:"success"})},n=>{console.log("copy---e",n)})},toggleMove(e,t){e.fx=t?e.x:null,e.fy=t?e.y:null},autoDisplay(){this.nodes.map(e=>{e.fx=null,e.fy=null})},editLabel(e){var t;l2.prompt("修改备注",{confirmButtonText:"确定",cancelButtonText:"取消",inputValue:(t=e[0])==null?void 0:t.label,inputPlaceholder:"请输入备注,最多20字",inputValidator:n=>n.length>20?"已超过20字":!0}).then(({value:n})=>{e.map(r=>{r.label=n,this.showLabel(r,"label")}),this.updateNodeStyle()}).catch(n=>{console.log(n)})},showLabel(e,t){e.textProp=t,this.update()},hideLabel(e,t){e.textProp=null,this.update()},safeGet(e,t){return!e||!t?void 0:t.split(".").reduce((s,a)=>s&&s[a]?s[a]:void 0,e)},fixAllNodes(e=!0){this.nodes.map(t=>{this.toggleMove(t,e)}),!e&&this.isAutoTick&&this.updateSimulation()},highlightByRule(e,t){if(!e.prop&&!t){this.nodes.forEach(c=>{const u=this.nodesGroup[c.id];u==null||u.removeName("lowlight")}),this.links.forEach(c=>{const u=this.linksGroup[`${c.source.id}-${c.target.id}`];u==null||u.removeName("lowlight")});return}const{type:n,prop:r,value:s}=e,a=this,l=[];this.nodes.forEach(c=>{const u=this.nodesGroup[c.id];r?n==="include"?s.includes(a.safeGet(c,r))&&a.inNodesRange(t,c)?(u==null||u.removeName("lowlight"),l.push(c)):u==null||u.addName("lowlight"):n==="equal"?a.safeGet(c,r)===s&&a.inNodesRange(t,c)?(u==null||u.removeName("lowlight"),l.push(c)):u==null||u.addName("lowlight"):n==="boolean"&&(Bh(a.safeGet(c,r))&&a.inNodesRange(t,c)?(u==null||u.removeName("lowlight"),l.push(c)):u==null||u.addName("lowlight")):a.inNodesRange(t,c)?(u==null||u.removeName("lowlight"),l.push(c)):u==null||u.addName("lowlight")}),this.links.forEach(c=>{const u=this.linksGroup[`${c.source.id}-${c.target.id}`];l.some(f=>f.id===c.target.id)?u==null||u.removeName("lowlight"):u==null||u.addName("lowlight")})},handleCustomSelect(e){if(this.handleDeselectNode(),!e.prop)return;const{type:t,prop:n,value:r}=e,s=this;this.nodes.forEach(a=>{if(n&&t==="include"){let l;if(a.type==="nodeType"){const c=s.safeGet(a,"parents"),u=s.safeGet(a,"children"),d=c==null?void 0:c.some(p=>r.includes(p)),f=u==null?void 0:u.some(p=>r.includes(p));l=d&&f}(r.includes(s.safeGet(a,n))||l)&&this.selection.push(a)}}),this.updateSelection()},inNodesRange(e,t){return e?e.some(n=>n===t.id):!0},loadFlagFiles(e){return Ne(this,null,function*(){return new Promise(t=>{this.flagFiles[e]?t(this.flagFiles[e]):(this.flagFiles[e]=this.imgPath[`${this.prefix}d3svg1/flags/${e}.png`],t(this.flagFiles[e]))})})},getNodeImage(e){return Ne(this,null,function*(){var s,a,l,c,u,d,f,p,g,v,b,w;let t=null;const n=(l=(a=(s=e.detail)==null?void 0:s.info)==null?void 0:a.basic)==null?void 0:l.flag,r=(d=(u=(c=e==null?void 0:e.detail)==null?void 0:c.info)==null?void 0:u.basic)==null?void 0:d.level;if(this.customNodeImages&&this.customNodeImages[e.type]){if(Wt[e.type])return Wt[e.type];t=yield xr(this.customNodeImages[e.type]),Wt[e.type]=t}else if(e.detail&&((p=(f=e.detail)==null?void 0:f.info)!=null&&p.icon_img))try{t=yield xr(e.detail.info.icon_img)}catch(_){console.log("loadCompleted error",_)}else if(e.detail&&((v=(g=e.detail)==null?void 0:g.info)!=null&&v.inner_img))try{t=yield xr(e.detail.info.inner_img)}catch(_){console.log("loadCompleted error",_)}else if(e.type==="nodeType"||e.type==="aggregation"){if(e!=null&&e.icon_img)try{return t=yield xr(e.icon_img),t}catch(C){console.log("loadCompleted error",C)}const _=e.icon||"node_type";if(Wt[_])return t=Wt[_],t;t=this.iconFiles[_]?this.iconFiles[_]:this.iconFiles.node_type,t=yield xr("data:image/svg+xml,"+encodeURIComponent(t)),Wt[_]=t}else if(n&&(e.type==="ip"||e.type==="internet")){if(Wt[n])return t=Wt[n],t;yield this.loadFlagFiles(n),t=yield xr(this.flagFiles[n]),Wt[n]=t}else if((w=(b=e.detail)==null?void 0:b.info)!=null&&w.inner_country&&(e.type==="country"||e.type==="target_country")){const _=e.detail.info.inner_country;if(Wt[_])return t=Wt[_],t;yield this.loadFlagFiles(_),t=yield xr(this.flagFiles[_]),Wt[_]=t}else{const _=`${e.type||"node"}${r}${this.darkMode}`;if(Wt[_])return t=Wt[_],t;t=this.iconFiles[e.type]?this.iconFiles[e.type]:this.iconFiles.node;const C=ao(r,this.levelList,this.darkMode),k=this.darkMode?"#182628":"#fff";t=m2(t,C,k);try{t=yield xr("data:image/svg+xml,"+encodeURIComponent(t))}catch(S){console.log(S)}Wt[_]=t}return t})},handleGoDetail(e){e.forEach(t=>{if(t.isCluster)return;const n=t.type,r=this.moduleDetail.config.jumpRule[n];if(r)if(n==="org"){const s=t.id.split("(")[0];s.indexOf("APT")>=0&&window.open(r.split("${id}").join(s),t.id)}else{let s=t.origin&&t.origin[0]||t.id;(n==="url"||n==="virus")&&(s=encodeURIComponent(s)),window.open(r.split("${id}").join(s),t.id)}})},starNode(e,t=!0){e.collect=t,this.update()},handleAddBlack(e){this.showBlackType=!0,this.node=e},changeVisible(e){this.showBlackType=e},zoomIn(){this.adjustZoom(1.1)},zoomOut(){this.adjustZoom(.909)},adjustZoom(e){const n=this.stage.scaleX()*e;this.scale=n;const r={x:this.stage.width()/2,y:this.stage.height()/2},s={x:this.stage.getPointerPosition().x-this.stage.x(),y:this.stage.getPointerPosition().y-this.stage.y()},a={x:-(s.x-r.x)*(e-1),y:-(s.y-r.y)*(e-1)};this.stage.setAttrs({x:this.stage.x()+a.x,y:this.stage.y()+a.y,scaleX:n,scaleY:n}),this.layer.batchDraw()},addNodesDetail(e){return Ne(this,null,function*(){const t=e.filter(s=>!s.detail&&s.noDetail!==!0&&s.type!=="aggregation"&&s.type!=="nodeType"),n={};t.map(s=>{n[s.type]?n[s.type].push(s):n[s.type]=[s]});const r=[];for(const s in n){const a=n[s],l={};a.map(c=>{c.origin&&(l[c.id]=c.origin)}),r.push(this.graphApi.getNodesDetail({api:this.moduleDetail.node_info[n[s][0].type],node_id:n[s].map(c=>c.id),origin:l}).then(c=>(c.data.records.map(d=>{const f=e.find(p=>p.id===d.info.id);f.detail=d}),Promise.resolve({}))))}})},addCanvasBg(){this.darkMode&&(this.darkBgRect=new Ze.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()}}},pne={class:"main-svg-box","element-loading-text":"布局中...","element-loading-background":"rgba(122, 122, 122)"},gne={ref:"canvasContainer",class:"canvas-container"};function mne(e,t,n,r,s,a){const l=o.resolveComponent("popover"),c=o.resolveComponent("node-contextmenu"),u=o2;return o.openBlock(),o.createElementBlock("div",{class:o.normalizeClass(["render-container",n.darkMode?"dark-theme "+s.uniqueClass:" "+s.uniqueClass])},[o.withDirectives((o.openBlock(),o.createElementBlock("div",pne,[o.createElementVNode("div",gne,null,512)])),[[u,s.ticking]]),o.createVNode(l,{"dark-mode":n.darkMode,"show-popover":s.showPopover&&!s.isDragging,"mouse-position":s.hoverNodePosition,"node-info":s.popoverNode,"module-detail":n.moduleDetail,type:s.popoverType,"custom-tooltip":n.customTooltip,history:n.history,data:n.history.dataNow},null,8,["dark-mode","show-popover","mouse-position","node-info","module-detail","type","custom-tooltip","history","data"]),n.isThreatPath?o.createCommentVNode("",!0):(o.openBlock(),o.createBlock(c,{key:0,show:a.showContextMenuFlag,axis:s.mousePosition,"node-info":a.contextMenuNodes,history:n.history,"menu-options":s.menuOptions,"module-detail":n.moduleDetail,onContextmenuClick:a.handleContextMenuClick},null,8,["show","axis","node-info","history","menu-options","module-detail","onContextmenuClick"]))],2)}const Ms=_t(hne,[["render",mne]]),Jse="",Xse="",Qse="",{toClipboard:u5}=Ac(),vne={name:"SnapShotDialog",components:{},mixins:[],props:{snapshot:{type:Object,default:()=>{}},graphApi:{type:Object,default:()=>{}}},data(){return{dialogVisible:!1,origin:window.location.origin,ruleForm:{radio:"0",event:"",group:"",graphDesc:""},rules:{event:[{required:!0,message:"请选择安全事件",trigger:"change"}],group:[{required:!1,message:"请选择团队",trigger:"change"}]},eventOptions:[{value:"",label:""}],groupOptions:[{value:"",label:""}],hostList:["https://sc.360.net","https://sc.b.qihoo.net","http://sec.test.safe.qihoo.net"],isInnerAccount:!1,visibleSuccess:!1,eventUrl:null}},computed:{},watch:{snapshot:{handler:function(e,t){e.name&&(this.ruleForm.graphDesc=e.name)},immediate:!0,deep:!0}},mounted(){this.graphApi.getReportList&&this.graphApi.getReportList().then(e=>{e.data!==null&&(this.eventOptions=[],e.data.map(t=>{this.eventOptions.push({label:t.title,value:t.report_id})}))}),this.graphApi.getGroupList&&this.graphApi.getGroupList().then(e=>{e.data!==null?(this.groupOptions=[],e.data.map(t=>{this.groupOptions.push({label:t.group_name,value:t.group_id})}),this.isInnerAccount=!0):this.isInnerAccount=!1})},updated(){},beforeUnmount(){},methods:{hanleClickCopy(e){u5(e).then(t=>Nt({message:"复制成功",type:"success"}),t=>Nt.error("复制失败"))},show(){this.dialogVisible=!0},hide(){this.dialogVisible=!1,this.resetForm("ruleForm")},submitForm(e){this.$refs[e].validate(t=>{if(t){const n=this.hostList.some(c=>c===this.origin);let r=null;n?this.origin===this.hostList[1]?r=`${this.hostList[0]}/graph?snapshot_id=${this.snapshot.snapshot_id}&vcode=${this.snapshot.vcode}`:r=`${this.origin}/graph?snapshot_id=${this.snapshot.snapshot_id}&vcode=${this.snapshot.vcode}`:r=`http://test.sec.360.net/graph?snapshot_id=${this.snapshot.snapshot_id}&vcode=${this.snapshot.vcode}`,this.eventUrl=window.location.origin+"/event/"+this.ruleForm.event;const s=this.snapshot.thumb;let a=null;this.groupOptions.map(c=>{c.value===this.ruleForm.group&&(a=c.label)});const l={report_id:this.ruleForm.event,group_id:this.ruleForm.group,content:s,graph_url:r,group_name:a,acl:parseInt(this.ruleForm.radio),head:this.ruleForm.graphDesc};this.graphApi.addGraph(l).then(c=>{c.code==="0"?(u5(this.eventUrl),Nt({message:"分享成功! 分享事件地址已经复制",type:"success",showClose:!0,duration:5e3})):Nt({message:"分享失败",type:"error"})}).catch(()=>{Nt({message:"分享失败",type:"error"})}),this.resetForm(e),this.dialogVisible=!1}else return!1})},resetForm(e){this.$refs[e].resetFields(),this.snapshot.name=""}}},yne={class:"sharetoEvents"},bne={class:"lable-header"},wne={class:"desc"},_ne={key:0,class:"desc-font"},Cne={key:1,class:"desc-font"},Sne={class:"dialog-footer"};function Ene(e,t,n,r,s,a){const l=XB,c=vc,u=mc,d=Wf,f=mi,p=Gf,g=no,v=xa;return o.openBlock(),o.createElementBlock("div",yne,[o.createVNode(v,{title:"分享到安全事件","append-to-body":"","close-on-click-modal":!1,width:"25%",modelValue:s.dialogVisible,"onUpdate:modelValue":t[6]||(t[6]=b=>s.dialogVisible=b),class:"el-dialog-graph"},{footer:o.withCtx(()=>[o.createElementVNode("span",Sne,[o.createVNode(g,{type:"primary",onClick:t[5]||(t[5]=b=>a.submitForm("ruleForm"))},{default:o.withCtx(()=>t[9]||(t[9]=[o.createTextVNode("确认分享")])),_:1}),o.createVNode(g,{onClick:a.hide},{default:o.withCtx(()=>t[10]||(t[10]=[o.createTextVNode("关闭")])),_:1},8,["onClick"])])]),default:o.withCtx(()=>[o.createVNode(p,{ref:"ruleForm",model:s.ruleForm,rules:s.rules,"label-width":"100px",class:"demo-ruleForm"},{default:o.withCtx(()=>[o.createElementVNode("div",bne,[o.createVNode(l,{modelValue:s.ruleForm.radio,"onUpdate:modelValue":t[0]||(t[0]=b=>s.ruleForm.radio=b),class:"el-radio",label:"1",border:"",size:"medium"},{default:o.withCtx(()=>t[7]||(t[7]=[o.createTextVNode("付费可见")])),_:1},8,["modelValue"]),o.createVNode(l,{modelValue:s.ruleForm.radio,"onUpdate:modelValue":t[1]||(t[1]=b=>s.ruleForm.radio=b),label:"0",border:"",size:"medium"},{default:o.withCtx(()=>t[8]||(t[8]=[o.createTextVNode("开放")])),_:1},8,["modelValue"]),o.createElementVNode("div",wne,[s.ruleForm.radio==="0"?(o.openBlock(),o.createElementBlock("span",_ne,"该Graph内容对所有用户可见。")):(o.openBlock(),o.createElementBlock("span",Cne,"该Graph内容对付费用户可见。"))])]),o.createVNode(d,{label:"安全事件",prop:"event"},{default:o.withCtx(()=>[o.createVNode(u,{modelValue:s.ruleForm.event,"onUpdate:modelValue":t[2]||(t[2]=b=>s.ruleForm.event=b),"popper-append-to-body":!1,filterable:"",placeholder:"请选择",class:"select-item"},{default:o.withCtx(()=>[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(s.eventOptions,b=>(o.openBlock(),o.createBlock(c,{key:b.value,label:b.label,value:b.value},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])]),_:1}),s.isInnerAccount?(o.openBlock(),o.createBlock(d,{key:0,label:"选择团队",prop:"group"},{default:o.withCtx(()=>[o.createVNode(u,{modelValue:s.ruleForm.group,"onUpdate:modelValue":t[3]||(t[3]=b=>s.ruleForm.group=b),class:"select-item",filterable:"",placeholder:"请选择"},{default:o.withCtx(()=>[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(s.groupOptions,b=>(o.openBlock(),o.createBlock(c,{key:b.value,label:b.label,value:b.value},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])]),_:1})):o.createCommentVNode("",!0),o.createVNode(d,{label:"Graph介绍",prop:"graphDesc"},{default:o.withCtx(()=>[o.createVNode(f,{modelValue:s.ruleForm.graphDesc,"onUpdate:modelValue":t[4]||(t[4]=b=>s.ruleForm.graphDesc=b),type:"textarea",rows:2,placeholder:"请输入内容",maxlength:"50",clearable:""},null,8,["modelValue"])]),_:1})]),_:1},8,["model","rules"])]),_:1},8,["modelValue"])])}const xne=_t(vne,[["render",Ene]]),Zse="",{toClipboard:kne}=Ac(),Nne={name:"SnapShotDialog",components:{ShareToSecurityEvents:xne},mixins:[],props:{customCopyPathFn:{type:Function},graphUrlPath:{type:String,default:"/graph"},snapshot:{type:Object,default:()=>{}},graphApi:{type:Object,default:()=>{}}},data(){return{dialogVisible:!1,origin:window.location.origin,isInnerAccount:!1}},computed:{linkAddress(){return this.customCopyPathFn&&typeof this.customCopyPathFn=="function"?this.customCopyPathFn({snapshot_id:this.snapshot.snapshot_id}):`${this.origin}${this.graphUrlPath}?snapshot_id=${this.snapshot.snapshot_id}`},linkAddressAndCode(){return this.customCopyPathFn&&typeof this.customCopyPathFn=="function"?this.customCopyPathFn({snapshot_id:this.snapshot.snapshot_id,vcode:this.snapshot.vcode}):`${this.linkAddress}&vcode=${this.snapshot.vcode}`}},watch:{},created(){},mounted(){Si(Re,"sharePermission",e=>{this.isInnerAccount=e})},updated(){},beforeUnmount(){Ei(Re,"sharePermission")},methods:{hanleClickCopy(e){kne(e).then(t=>Nt({message:"复制成功",type:"success"}),t=>Nt.error("复制失败"))},show(){this.dialogVisible=!0},hide(){this.dialogVisible=!1},shareToEvents(){this.dialogVisible=!1,this.$refs.sharetoevents.show()}}},Tne={class:"snapshotdialog-container"},Ane={class:"dialog-footer"};function One(e,t,n,r,s,a){const l=mi,c=bL,u=no,d=xa,f=o.resolveComponent("ShareToSecurityEvents");return o.openBlock(),o.createElementBlock("div",Tne,[o.createVNode(d,{modelValue:s.dialogVisible,"onUpdate:modelValue":t[2]||(t[2]=p=>s.dialogVisible=p),title:"复制链接及提取码","append-to-body":"","close-on-click-modal":!1,class:"el-dialog-graph"},{footer:o.withCtx(()=>[o.createElementVNode("span",Ane,[s.isInnerAccount?(o.openBlock(),o.createBlock(u,{key:0,type:"primary",onClick:t[0]||(t[0]=p=>a.shareToEvents())},{default:o.withCtx(()=>t[5]||(t[5]=[o.createTextVNode("分享到安全事件")])),_:1})):o.createCommentVNode("",!0),o.createVNode(u,{type:"primary",onClick:t[1]||(t[1]=p=>a.hanleClickCopy(a.linkAddressAndCode))},{default:o.withCtx(()=>t[6]||(t[6]=[o.createTextVNode("复制链接及提取码")])),_:1}),o.createVNode(u,{onClick:a.hide},{default:o.withCtx(()=>t[7]||(t[7]=[o.createTextVNode("关闭")])),_:1},8,["onClick"])])]),default:o.withCtx(()=>[o.createVNode(l,{value:a.linkAddress,readonly:""},{prepend:o.withCtx(()=>t[3]||(t[3]=[o.createTextVNode("链接地址:")])),_:1},8,["value"]),o.createVNode(c),o.createVNode(l,{value:n.snapshot.vcode,readonly:""},{prepend:o.withCtx(()=>t[4]||(t[4]=[o.createTextVNode("提取码:")])),_:1},8,["value"])]),_:1},8,["modelValue"]),o.createVNode(f,{ref:"sharetoevents",snapshot:n.snapshot,"graph-api":n.graphApi},null,8,["snapshot","graph-api"])])}const Ine=_t(Nne,[["render",One]]),Vse="",Bne={name:"ForceGraphByCanvas",components:{Loading:Mo,ForceGraphSvgIcon:so,RenderByCanvas:Ms,ButtonList:Tj,SnapShotDialog:Ine,RightMenu:JF,Legend:Yz,NodeVisibleControl:eU},mixins:[kr],provide:function(){return{history:this.history,hasLevel:this.hasLevel,levelList:this.levelList,levelMap:this.levelMap,getDarkMode:()=>this.darkMode,requestGraphData:this.requestGraphData,moduleDetail:()=>this.moduleDetail}},props:{showPoint:{type:Boolean,default:!0},isRenderStartNode:{type:Boolean,default:!0},isDefaultSelectStartNode:{type:Boolean,default:!0},isShowRightMenu:{type:Boolean,default:!0},hideButtonList:{type:Array,default:()=>[]},showTopSearch:{type:Boolean,default:!1},customContextMenuEvent:{type:Function},handleSelectNodeEvent:{type:Function},handleDataLoaded:{type:Function},graphApi:{type:Object,default:()=>{}},graphUrlPath:{type:String,default:"/graph"},customCopyPathFn:{type:Function},snapshot_id:{type:String,default:""},vcode:{type:String,default:""},module:{type:String,default:""},startNode:{type:Array,default:()=>[]},enterStartNode:{type:Boolean,default:!1},hasLevel:{type:Boolean,default:!0},levelList:{type:Array,default:()=>[{level:"未知",levelName:"未知",className:"unknown",iconType:"",normalColor:"#666",darkColor:"#c6cdd5",dangerNumber:0},{level:"危险",levelName:"危险",className:"warn",iconType:"",normalColor:"#CF1322",darkColor:"#fb2400",dangerNumber:1},{level:"普通",levelName:"普通",className:"normal",iconType:"",normalColor:"#007EE2",darkColor:"#0094ff",dangerNumber:-1},{level:"安全",levelName:"安全",className:"safe",iconType:"",normalColor:"#009A75",darkColor:"#00da90",dangerNumber:-2}]},showLevelCount:{type:Boolean,default:!1},darkMode:{type:Boolean,default:!1},title:{type:String,default:""},isShowNodeMessage:{type:Boolean,default:!0},nodeWidth:{type:Number},startNodeWidth:{type:Number},linkDistance:{type:Number},strength:{type:Number},nodeTypeScale:{type:Number},singlesNodeMaxNum:{type:Number,default:100},startNodeAnimation:{type:Boolean,default:!0},customTooltip:{type:Function},enableScript:{type:Boolean,default:!1},edgeLabelMaxLength:{type:Number,default:10},hasNodeVisibleControl:{type:Boolean,default:!1},hasLegend:{type:Boolean,default:!0},customNodeImages:{type:Object,default:()=>{}},isShowNodeType:{type:Boolean,default:!0}},emits:["sharePermission","custom-contextmenu-click","handle-select-node","handle-data-loaded","outdate"],data(){return{history:new lD({isShowNodeMessage:this.isShowNodeMessage}),isLoading:!1,bigLoading:!1,loadingInfo:"数据加载中",moduleDetail:{},contextMenuNode:{},contextMenuId:0,isDragging:!1,isCtrlDown:!1,selection:[],snapshot:{},inited:!1,outdateTime:0,fullScreen:!1,generateUniqueIndexNow:this.generateUniqueIndex(),screenHeight:0,margin:"0",requestGraphData:!0,nodeTypeList:[]}},computed:{topFrame(){return window.top.location===window.location},levelMap(){const e={};return this.levelList.forEach(t=>{e[t.level]=t}),e}},watch:{startNode:{handler:function(e,t){this.moduleDetail.module&&this.searchStartNode()},immediate:!0,deep:!0},screenHeight:{deep:!0,handler:function(){this.margin=this.changeMargin()}},graphApi:{handler:function(){this.$nextTick(()=>{this.initializeGraphApi()})},deep:!0,immediate:!0}},unmounted(){window.onresize=null},mounted(){return Ne(this,null,function*(){console.log('"2024/11/14 19:12:44"',"2024/11/14 19:12:44"),this.initializeGraphApi(),window.onresize=()=>{this.fullScreen=!!document.fullscreenElement,this.screenHeight=document.body.clientHeight},this.margin=this.changeMargin(),Si(Re,"emitDataLoaded",()=>{this.emitDataLoaded()})})},methods:{initializeGraphApi(){if(this.graphApi){if(this.snapshot_id)this.isLoading=!0,this.graphApi.getSnapshotDetail({snapshot_id:this.snapshot_id,vcode:this.vcode}).then(e=>{this.moduleDetail=e.data.config,this.history.initFromSnapshot(JSON.parse(e.data.data)),setTimeout(()=>{this.$refs.render.updateNodeStyle(),this.centerAndZoom(.8,!1)},1e3)}).catch(e=>{console.log(e,"e")}).finally(e=>{this.isLoading=!1});else if(this.module)this.initGraph();else{Nt.error("请传入模块名称");return}this.graphApi.userInfo&&this.graphApi.userInfo().then(e=>{e.data!==null&&(ve(Re,"sharePermission",e.data.access.graph_share),this.requestGraphData=e.data.access.request_graph_data)}).catch(e=>{this.onOutdate(e.res)})}},handleCustomContextMenuClick(e){this.customContextMenuEvent&&typeof this.customContextMenuEvent=="function"?this.customContextMenuEvent(o.toRaw(e)):ve(this,"custom-contextmenu-click",o.toRaw(e))},handleSelectNode(e){this.handleSelectNodeEvent&&typeof this.handleSelectNodeEvent=="function"?this.handleSelectNodeEvent(o.toRaw(e),o.toRaw(this.history.dataNow)):ve(this,"handle-select-node",o.toRaw(e))},searchStartNode(){this.startNode.length>0&&!this.inited&&this.startNode.map(e=>{const t={type:e.type,id:e.id,startNode:!0};this.inited=!0,this.moduleDetail.nodes.findIndex(n=>e.type===n.name)>=0?this.addNewNodesAndExpand(t):(Nt({message:"无相关数据",type:"warning"}),this.emitDataLoaded())})},initGraph(){return Ne(this,null,function*(){var e;vn("initGraph"),(e=this.graphApi)==null||e.getGraphConfig({name:this.module}).then(t=>{const n=t.data||{},r=kc(n==null?void 0:n.node_info),s=(n==null?void 0:n.nodes)||[];s.forEach(l=>{l.name=l.name.toLowerCase()});const a=kc(n==null?void 0:n.plugs);n.node_info=r,n.nodes=s,n.plugs=a,this.moduleDetail=n,this.searchStartNode(),!this.inited&&this.enterStartNode&&this.$refs.buttonList.addNode("search")}).catch(t=>{this.onOutdate(t.res),this.emitDataLoaded(),console.log("e",t)})})},addNewNodesAndExpand(e){this.isLoading=!0,this.graphApi.getNodesDetail({api:this.moduleDetail.node_info[e.type],node_id:[e.id],nodeType:e.type,moduleDetail:this.moduleDetail}).then(t=>{var s,a,l;let n={id:(s=t.data.records[0])==null?void 0:s.info.id,type:(a=t.data.records[0])==null?void 0:a.info.type,startNode:!0,detail:t.data.records[0],group:e.id,name:((l=t.data.records[0])==null?void 0:l.info.name)||e.id};n=Qr(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),Nt({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++,ve(this,"outdate"))},expandNodes(e,t){return Ne(this,null,function*(){if(!(e!=null&&e.type))return;const n=this.moduleDetail.plugs[e==null?void 0:e.type];let r=[];t?(r=Array.isArray(t)?[...t]:[t],e.apis===void 0&&(e.apis=[]),e.apis.push(...r)):(e.expand=1,e.apis=[],e.apis.push({namec:"拓线全部",value:0,name:"",flagSelect:!0}),n==null||n.map(d=>{d.children?r.push(...d.children):r.push(d)}));const s=r.map(d=>this.graphApi.getGraphRequest({api:d.name,node_id:e.id,origin:e.origin,nodeType:e.type,moduleDetail:this.moduleDetail}).then(f=>Promise.resolve(fe(ne(ne({},f),d),{api:d.name,apiC:d.relay_name,icon:d.icon,note_name:d.note_name,icon_img:d.icon_img,canLoop:d.canloop,showTotal:d.show_total}))).catch(f=>Promise.resolve(f)));this.isLoading=!0;let a;yield Promise.all(s).then(d=>{if(d.some(p=>{var g;return((g=p.res)==null?void 0:g.code)==="AC100001"})){this.onOutdate({code:"AC100001"});return}a=d.filter(p=>p.code==="0"||p.code===0)}).catch(d=>{console.log(d,"e")}).finally(d=>{this.isLoading=!1});const l=[];let c=[];if(a&&a.forEach(d=>{var S;if(e.getData[d.api]=!0,this.history.dataNow.nodes.find(N=>N.id===e.id)&&(this.history.dataNow.nodes.find(N=>N.id===e.id).getData[d.api]=!0),!d.data)return;let f;const p=(S=d.data.nodes||[])==null?void 0:S.map(N=>(N.group=e.id+"-"+d.api,N.groupC=d.apiC,N=Qr(N,this.moduleDetail.plugs),N));if(!this.isShowNodeType){f=d.data.links||[],l.push(...d.data.nodes||[]),c.push(...f||[]);return}const g=e.id+"-"+d.api;let v={id:g,name:d.apiC,note_name:d.note_name,type:"nodeType",icon:d.icon,showTotal:d.showTotal,icon_img:d.icon_img};const E=d,{code:b,msg:w,data:_}=E,C=fi(E,["code","msg","data"]);v=ne(ne({},C),v);const k={source:e.id,target:g};if(v=Qr(v,this.moduleDetail.plugs),this.nodeTypeList.push(d.icon||"node_type"),p.length>0&&this.isRenderStartNode){if(f=(d.data.links||[]).map(N=>{let A;if(N.source===e.id){const I=this.history.dataNow.nodes.filter(O=>O.id===N.target);if(I.length>0&&(A=this.findGrandSonNodeIds(I[0]).indexOf(N.source)>=0),!d.api.canLoop&&A)return;N.source=g}else N.target===e.id&&(N.target=g);return N.edgeLabelProp=N.edge_label,N}).filter(N=>N),f.length===0)return;f.push(k)}else f=d.data.links||[];if(this.isRenderStartNode&&p.length>=this.singlesNodeMaxNum){let N=null,A=null;const I=String(Math.floor(new Date().getTime()));N={id:I,list:p,type:"aggregation",name:"聚合",relationId:v.id},N=Qr(N,this.moduleDetail.plugs),A={source:v.id,target:I,uniqueIndex:this.generateUniqueIndexNow()};const O={addOne:{nodes:[v,N],links:[k,A]},type:"aggregation"};this.history.pushState(O),this.getNodeDetail(N.list,N.id)}else f.length&&this.isRenderStartNode&&p.push(v),l.push(...p||[]),c.push(...f||[])}),!this.isRenderStartNode){const d={},f={},p=[];this.nodeTypeList.push("node_type"),c.forEach(g=>{const v=g.source+"-"+g.name;if(!d[v]){let b={id:v,name:g.name,type:"nodeType",icon:g.feature.icon};b=Qr(b,this.moduleDetail.plugs),d[v]=b}f[v]?f[v].push(g):f[v]=[g]});for(const g in d)l.push(d[g]);for(const g in f)f[g].forEach(b=>{const w=fe(ne({},b),{source:b.source,target:g}),_=fe(ne({},b),{source:g,target:b.target});p.push(w),p.push(_)});c=p}c.map(d=>{d.uniqueIndex=this.generateUniqueIndexNow()});const u={addOne:{nodes:l,links:c}};(l.length>0||c.length>0)&&this.history.pushState(u),this.history.length===2&&setTimeout(()=>{this.centerAndZoom(.8,!1)},1e3),this.getNodeDetail(l)})},findGrandSonNodeIds(e){return this.history.dataNow.nodes.filter(r=>{var s;return((s=e.children)==null?void 0:s.indexOf(r.id))>=0}).reduce((r,s)=>(r.push(...s.children||[]),r),[])||[]},centerAndZoom(e,t){var n;(n=this.$refs.render)==null||n.centerAndZoom(e,t)},generateUniqueIndex(){let e=0;return function(){return e++}},reset(){this.$refs.render.reset()},getNodeDetail(e,t){const r=this.history.dataNow.nodes.filter(l=>e.findIndex(c=>c.id===l.id)>=0).filter(l=>!l.detail&&l.noDetail!==!0&&l.type!=="aggregation"&&l.type!=="nodeType"),s={};r.map(l=>{s[l.type]?s[l.type].push(l):s[l.type]=[l]});let a=Object.keys(s).length;for(const l in s){const c=s[l],u={};c.map(d=>{d.origin&&(u[d.id]=d.origin)}),this.graphApi.getNodesDetail({api:this.moduleDetail.node_info[s[l][0].type],node_id:s[l].map(d=>d.id),origin:u,nodeType:s[l][0].type,moduleDetail:this.moduleDetail}).then(d=>{const f=d.data.records;t?this.history.updateAggregationDetail(f,s[l].map(p=>p.id),t):this.history.updateData(f,s[l].map(p=>p.id))}).catch(d=>{this.onOutdate(d.res)}).finally(()=>{a=a-1,a===0&&(vn(" 数据加载完"),this.emitDataLoaded())})}Object.keys(s).length||this.emitDataLoaded()},emitDataLoaded(){this.handleDataLoaded&&typeof this.handleDataLoaded=="function"?this.handleDataLoaded({dataNow:o.toRaw(this.history.dataNow)}):ve(this,"handle-data-loaded",{dataNow:o.toRaw(this.history.dataNow)})},addNode({node:e,type:t,connectNode:n}){if(this.history.dataNow.nodes.findIndex(a=>a.id===e.id)>-1){Nt({type:"warning",message:"该节点已存在,添加失败"});return}let s;if(t==="diy"&&e.type==="nodeType"){let a=fe(ne({},e),{detail:null,diy:!0,group:e.id});a=Qr(a,this.moduleDetail.plugs);const l=n?{source:n.id,target:e.id,uniqueIndex:this.generateUniqueIndexNow()}:null;s={addOne:{nodes:[a],links:l?[l]:[]}},this.history.pushState(s)}else t==="diy"?this.graphApi.getNodesDetail({api:this.moduleDetail.node_info[e.type],node_id:[e.id],nodeType:e.type,moduleDetail:this.moduleDetail}).then(a=>{var u,d,f;let l={id:(u=a.data.records[0])==null?void 0:u.info.id,type:(d=a.data.records[0])==null?void 0:d.info.type,detail:a.data.records[0],group:e.id,name:((f=a.data.records[0])==null?void 0:f.info.name)||e.id};l=Qr(l,this.moduleDetail.plugs);const c=n?{source:n.id,target:e.id,uniqueIndex:this.generateUniqueIndexNow()}:null;s={addOne:{nodes:[l],links:c?[c]:[]}},this.history.pushState(s)}).catch(a=>{this.onOutdate(a.res);let l=fe(ne({},e),{detail:null,diy:!0,group:e.id});l=Qr(l,this.moduleDetail.plugs);const c=n?{source:n.id,target:e.id,uniqueIndex:this.generateUniqueIndexNow()}:null;s={addOne:{nodes:[l],links:c?[c]:[]}},this.history.pushState(s)}).finally(a=>{setTimeout(()=>{},500)}):this.addNewNodesAndExpand(e)},addLink(e,t){if(!([e,t].filter(a=>a.type==="nodeType").length===1))return;const r={source:e.id,target:t.id,uniqueIndex:this.generateUniqueIndexNow(),diy:!0};let s=!1;if(this.history.dataNow.links.map(a=>{a.source.id===e.id&&a.target.id===t.id&&(s=!0)}),!s){const a={addOne:{links:[r]}};this.onAction(a)}},expandSelectedNodes(e){e.map(t=>{this.expandNodes(t)})},handleTableSelect(e=[]){this.$refs.render.handleTableSelect(e)},updateSelection(){this.selection=this.$refs.render.selection,this.$refs.render.selectEdgesByNode(this.selection),this.$refs.render.showKeyWay(this.selection),this.$refs.render.updateNodeStyle()},aggregationNodes(e,t){if(e.length===0)return;const n=[];for(const l in this.history.dataNow.nodes)e.findIndex((u,d,f)=>u===this.history.dataNow.nodes[l].id)>=0&&n.push(JSON.parse(JSON.stringify(this.history.dataNow.nodes[l])));const r=String(Math.floor(new Date().getTime()));let s={id:r,list:n,type:"aggregation",name:"聚合",relationId:t.id};s=Qr(s,this.moduleDetail.plugs);const a={addOne:{nodes:[s],links:[{source:t.id,target:r,uniqueIndex:this.generateUniqueIndexNow()}]},deleteOne:{nodes:n,links:n.map(l=>({source:t.id,target:l.id}))},type:"aggregation"};this.history.pushState(a),this.emitDataLoaded()},releaseAggregation(e){let t;if(e.type==="aggregation"&&(t=e),this.history.dataNow.links.map(n=>{n.source.id===e.id&&n.target.type==="aggregation"&&(t=t||n.target,n.source)}),t){const n={deleteOne:{nodes:[t],links:[{source:t.relationId,target:t.id}]},addOne:{nodes:t.list,links:t.list.map(r=>({source:t.relationId,target:r.id}))},type:"aggregation"};for(const r in this.history.dataNow.nodes)t.list.findIndex((a,l,c)=>a===this.history.dataNow.nodes[r].id)>=0&&(this.history.dataNow.nodes[r].aggregation=!1);this.history.pushState(n),this.emitDataLoaded()}},saveSnapshot(){return Ne(this,null,function*(){l2.prompt(null,"添加快照",{confirmButtonText:"确定",cancelButtonText:"取消",inputPattern:/^.{1,20}$/,inputPlaceholder:"请输入20字以内快照名称",inputErrorMessage:"请输入20字以内快照名称"}).then(t=>Ne(this,[t],function*({value:e}){this.bigLoading=!0,setTimeout(()=>Ne(this,null,function*(){try{const n=yield this.$refs.buttonList.svgToBlob(),r=new FormData;r.append("data",this.history.toString()),r.append("name",e),r.append("thumb",n),this.graphApi.addSnapshot1(r).then(s=>{this.snapshot=s.data,this.snapshot.name=e,this.$refs.snapshot.show()}).catch(s=>{this.onOutdate(s.res)}).finally(s=>{this.bigLoading=!1})}catch(n){this.bigLoading=!1,console.log(n)}}),100)})).catch(()=>{Nt({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(){qt({cId:"toggleFullScreen",c:"切换全屏"}),document.fullscreenElement?document.exitFullscreen&&document.exitFullscreen():this.$refs["force-d3-container"].requestFullscreen()},zoomView(e="in"){e==="in"?(qt({cId:"zoomIn",c:"zoomIn"}),this.$refs.render.zoomIn()):(qt({cId:"zoomOut",c:"zoomOut"}),this.$refs.render.zoomOut())},fitScreen(){var e;qt({cId:"centerAndZoom",c:"centerAndZoom"}),(e=this.$refs.render)==null||e.centerAndZoom()},changeMargin(){let e=0;const t=document.body.clientHeight;return e=Math.floor(((t-50)/20-22)/2),e>8?"8px 0":e+"px 0"},handleHighLight(e,t,n){this.$refs.render.setHighlightRule({type:e,prop:t,value:n})},handleCustomSelect(e,t,n){this.$refs.render.handleCustomSelect({type:e,prop:t,value:n})},fixAllNodes(e){this.$refs.render.fixAllNodes(e)},toggleLayout(e){this.$refs.render.toggleLayout(e)},importCsvData(e){for(const t in e.nodes)delete e.nodes[t].vx,delete e.nodes[t].vy,delete e.nodes[t].x,delete e.nodes[t].y;this.history.dataNow=Object.assign({},e)},getCanvasStage(){var e;return(e=this.$refs.render)==null?void 0:e.stage},addCanvasBg(){var e;(e=this.$refs.render)==null||e.addCanvasBg()},removeCanvasBg(){var e;(e=this.$refs.render)==null||e.removeCanvasBg()},controlOperation(e){var t;(t=this.$refs.render)==null||t.handleContextMenuClick(e)}}},Lne={key:0,ref:"force-d3-container",class:"d3-container"},Rne=["innerHTML"],Pne={class:"top-item"},Dne={class:"top-line"},Mne={key:1,class:"select-num"},Fne={class:"highlight"},$ne={class:"loading-container"},zne={class:"corner-button-box"};function Une(e,t,n,r,s,a){const l=o.resolveComponent("ButtonList"),c=o.resolveComponent("RenderByCanvas"),u=o.resolveComponent("Loading"),d=Ye,f=o.resolveComponent("Legend"),p=o.resolveComponent("NodeVisibleControl"),g=o.resolveComponent("force-graph-svg-icon"),v=gn,b=o.resolveComponent("RightMenu"),w=o.resolveComponent("SnapShotDialog"),_=o2;return n.graphApi?o.withDirectives((o.openBlock(),o.createElementBlock("div",Lne,[o.createElementVNode("div",{class:o.normalizeClass(["graph-box",{"hide-right-menu":!n.isShowRightMenu}])},[n.title?(o.openBlock(),o.createElementBlock("div",{key:0,class:"safe-force-title",innerHTML:n.title},null,8,Rne)):o.createCommentVNode("",!0),t[4]||(t[4]=o.createElementVNode("div",{class:"top-line-bg"},null,-1)),o.createElementVNode("div",Pne,[o.createElementVNode("div",Dne,[o.createVNode(l,{ref:"buttonList","hide-button-list":n.hideButtonList,selection:s.selection,history:s.history,"module-detail":s.moduleDetail,"request-graph-data":s.requestGraphData,"show-top-search":n.showTopSearch,onSaveSnapshot:a.saveSnapshot,onAddNodes:a.addNode,onAutoDisplay:a.autoDisplay,onDeleteNodes:a.deleteNodes,onFixNodes:a.fixAllNodes,onToggleLayout:a.toggleLayout,onImportCsvData:a.importCsvData},null,8,["hide-button-list","selection","history","module-detail","request-graph-data","show-top-search","onSaveSnapshot","onAddNodes","onAutoDisplay","onDeleteNodes","onFixNodes","onToggleLayout","onImportCsvData"])])]),o.createVNode(c,{ref:"render","enable-script":n.enableScript,"module-detail":s.moduleDetail,history:s.history,"level-list":n.levelList,selection:s.selection,data:s.history.dataNow,"request-graph-data":s.requestGraphData,"dark-mode":n.darkMode,"node-type-scale":n.nodeTypeScale,"node-type-list":s.nodeTypeList,"link-distance":n.linkDistance,strength:n.strength,"node-width":n.nodeWidth,"start-node-width":n.startNodeWidth,"start-node-animation":n.startNodeAnimation,"custom-tooltip":n.customTooltip,"edge-label-max-length":n.edgeLabelMaxLength,"custom-node-images":n.customNodeImages,onUpdateSelection:a.updateSelection,onOnaction:a.onAction,onHandleSelectNode:a.handleSelectNode,onCustomContextmenuClick:a.handleCustomContextMenuClick},null,8,["enable-script","module-detail","history","level-list","selection","data","request-graph-data","dark-mode","node-type-scale","node-type-list","link-distance","strength","node-width","start-node-width","start-node-animation","custom-tooltip","edge-label-max-length","custom-node-images","onUpdateSelection","onOnaction","onHandleSelectNode","onCustomContextmenuClick"]),s.selection.length>0?(o.openBlock(),o.createElementBlock("p",Mne,[t[2]||(t[2]=o.createTextVNode(" 已选择")),o.createElementVNode("span",Fne,o.toDisplayString(s.selection.length),1),t[3]||(t[3]=o.createTextVNode("项 "))])):o.createCommentVNode("",!0),o.withDirectives(o.createElementVNode("div",$ne,[o.createElementVNode("span",null,o.toDisplayString(s.loadingInfo),1),o.createVNode(d,{class:"is-loading"},{default:o.withCtx(()=>[o.createVNode(u)]),_:1})],512),[[o.vShow,s.isLoading]]),n.hasLegend?(o.openBlock(),o.createBlock(f,{key:2,"show-point":n.showPoint,history:s.history,"module-detail":s.moduleDetail,"has-level":n.hasLevel,"show-level-count":n.showLevelCount,margin:s.margin,onHighLight:a.handleHighLight},null,8,["show-point","history","module-detail","has-level","show-level-count","margin","onHighLight"])):o.createCommentVNode("",!0),n.hasNodeVisibleControl?(o.openBlock(),o.createBlock(p,{key:3,history:s.history,"module-detail":s.moduleDetail,"start-node":n.startNode,"custom-node-images":n.customNodeImages},null,8,["history","module-detail","start-node","custom-node-images"])):o.createCommentVNode("",!0),o.createElementVNode("div",zne,[!s.fullScreen&&a.topFrame?(o.openBlock(),o.createBlock(v,{key:0,content:"进入全屏",placement:"left","popper-class":"el-tooltip-gray"},{default:o.withCtx(()=>[o.createVNode(g,{"icon-class":e.imgPath["./public/d3svg1/button18/full_button.svg"],alt:"",class:"corner-button",onClick:a.toggleFullScreen},null,8,["icon-class","onClick"])]),_:1})):o.createCommentVNode("",!0),s.fullScreen&&a.topFrame?(o.openBlock(),o.createBlock(v,{key:1,content:"退出全屏",placement:"left","popper-class":"el-tooltip-gray"},{default:o.withCtx(()=>[o.createVNode(g,{"icon-class":e.imgPath["./public/d3svg1/button18/un_full_button.svg"],alt:"",class:"corner-button",onClick:a.toggleFullScreen},null,8,["icon-class","onClick"])]),_:1})):o.createCommentVNode("",!0),o.createVNode(v,{content:"适应屏幕",placement:"left","popper-class":"el-tooltip-gray"},{default:o.withCtx(()=>[o.createVNode(g,{"icon-class":e.imgPath["./public/d3svg1/button18/fit_button.svg"],alt:"",class:"corner-button",onClick:a.fitScreen},null,8,["icon-class","onClick"])]),_:1}),o.createVNode(v,{content:"放大",placement:"left","popper-class":"el-tooltip-gray"},{default:o.withCtx(()=>[o.createVNode(g,{"icon-class":e.imgPath["./public/d3svg1/button18/zoom_in_button.svg"],alt:"",class:"corner-button",onClick:t[0]||(t[0]=C=>a.zoomView("in"))},null,8,["icon-class"])]),_:1}),o.createVNode(v,{content:"缩小",placement:"left","popper-class":"el-tooltip-gray"},{default:o.withCtx(()=>[o.createVNode(g,{"icon-class":e.imgPath["./public/d3svg1/button18/zoom_out_button.svg"],alt:"",class:"corner-button",onClick:t[1]||(t[1]=C=>a.zoomView("out"))},null,8,["icon-class"])]),_:1})])],2),n.isShowRightMenu?(o.openBlock(),o.createBlock(b,{key:0,"graph-data":s.history.dataNow,"selected-nodes":s.selection,"request-graph-data":s.requestGraphData,onChangeBox:a.handleTableSelect},null,8,["graph-data","selected-nodes","request-graph-data","onChangeBox"])):o.createCommentVNode("",!0),o.createVNode(w,{ref:"snapshot",snapshot:s.snapshot,"graph-api":n.graphApi,"graph-url-path":n.graphUrlPath,"custom-copy-path-fn":n.customCopyPathFn},null,8,["snapshot","graph-api","graph-url-path","custom-copy-path-fn"])])),[[_,s.bigLoading]]):o.createCommentVNode("",!0)}const wl=_t(Bne,[["render",Une]]);wl.install=function(e){e.component(wl.name,wl)},Ms.install=function(e){e.component(Ms.name,Ms)};const eae="",jne=[wl,Ms],qne={install:function(e,t={}){jne.forEach(n=>{e.component(n.name,n)})}};De.Graph=wl,De.Render=Ms,De.default=qne,Object.defineProperties(De,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
|
|
139
|
+
`).slice(1));try{for(s.s();!(n=s.n()).done;){var a=Xee(n.value);a&&r.push(a)}}catch(l){s.e(l)}finally{s.f()}return r.slice(0,10)}var Ps=function(e){return Jee(e).toString()},m0=function(e){return e instanceof ErrorEvent?e.message==="Script error."?hu:fu:yl},Qee=function(){function e(t){ld(this,e),oi(this,"errorIdSet",new Set),this.webCoreIns=t,this.errorIdSet=new Set}return cd(e,[{key:"init",value:function(){var t;if(this.initJsError(),this.initResourceError(),this.initPromiseError(),this.initCorsError(),(t=window.__QAPM__)!==null&&t!==void 0&&(t=t.q)!==null&&t!==void 0&&t.length){var n={error:this.onJSError.bind(this),reject:this.onPromiseError.bind(this)};window.__QAPM__.q.forEach(function(){var r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},s=r.type,a=r.event,l=n[s];l&&l(a)}),window.__QAPM__.q=[]}}},{key:"initJsError",value:function(){var t=this;window.addEventListener("error",function(n){return t.onJSError(n)},!0)}},{key:"initResourceError",value:function(){var t=this;window.addEventListener("error",function(n){return t.onResourceError(n)},!0)}},{key:"initPromiseError",value:function(){var t=this;window.addEventListener("unhandledrejection",function(n){return t.onPromiseError(n)},!0)}},{key:"initCorsError",value:function(){var t=this;window.addEventListener("error",function(n){return function(r){if(m0(r)===hu){var s={errorType:hu,errorMessage:r.message,errorSummary:"CorsError",errorId:Ps("".concat(hu,"-").concat(r.message))};t.commit(s)}}(n)},!0)}},{key:"onResourceError",value:function(t){if(m0(t)===yl){var n=t.target||t.srcElement,r=n.src||n.href,s=JSON.stringify(yl+": "+r||"UnKnown Resource"),a={errorType:yl,errorMessage:s,errorSummary:"ResourceError",errorId:Ps("".concat(yl,"-").concat(s))};this.commit(a)}}},{key:"onJSError",value:function(t){var n,r;if(m0(t)===fu){var s=JSON.stringify(t.message),a=function(c){var u=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"unknown";if(!c)return u;try{var d=new URL(c);return d.pathname&&d.pathname.endsWith(".js")?c:u}catch(f){return c}}(t.filename,(n=this.webCoreIns.config)===null||n===void 0?void 0:n.appKey),l={errorType:fu,errorMessage:s,errorSummary:t.error&&((r=t.error)===null||r===void 0?void 0:r.name)||"UnKnown",errorStack:JSON.stringify(gu(t.error)),errorId:Ps("".concat(fu,"-").concat(s,"-").concat(a))};this.commit(l)}}},{key:"onPromiseError",value:function(t){var n,r,s=JSON.stringify(((n=t.reason)===null||n===void 0?void 0:n.message)||t.reason||"UnKnown"),a=((r=t.reason)===null||r===void 0?void 0:r.name)||"UnKnown",l={errorType:i5,errorMessage:s,errorSummary:a,errorStack:JSON.stringify(gu(t.reason)),errorId:Ps("".concat(i5,"-").concat(s,"-").concat(a))};this.commit(l)}},{key:"onVueError",value:function(t,n,r){var s=JSON.stringify(t.message),a={errorType:o5,errorMessage:s,errorSummary:t.name||"UnKnown",errorStack:JSON.stringify(gu(t)),errorId:Ps("".concat(o5,"-").concat(s,"-").concat(t.name))};this.commit(a)}},{key:"onReactError",value:function(t,n){var r=JSON.stringify(t.message),s={errorType:s5,errorMessage:r,errorSummary:t.name||"UnKnown",errorStack:JSON.stringify(gu(t)),errorId:Ps("".concat(s5,"-").concat(r,"-").concat(t.name))};this.commit(s)}},{key:"commit",value:function(t){var n=t.errorId;this.errorIdSet.has(n)||(this.errorIdSet.add(n),this.webCoreIns.commit(qa({type:"error"},t)))}}]),e}(),Zee=function(e){function t(){var s,a=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return ld(this,t),(s=JH(this,t,[a])).config=a,s.isReport()?(s.PerformancePluginInstance=new Mee(Ga(s)),s.WhiteScreenPluginInstance=new Hee(Ga(s)),s.ErrorPluginInstance=new Qee(Ga(s)),s.plugins=[s.PerformancePluginInstance,s.WhiteScreenPluginInstance,s.ErrorPluginInstance],s.init(),F_(t,t,Ds,Ga(s)),s):P_(s)}var n,r;return function(s,a){if(typeof a!="function"&&a!==null)throw new TypeError("Super expression must either be null or a function");s.prototype=Object.create(a&&a.prototype,{constructor:{value:s,writable:!0,configurable:!0}}),Object.defineProperty(s,"prototype",{writable:!1}),a&&Up(s,a)}(t,Dee),cd(t,[{key:"isReport",value:function(){var s=this.isIE(),a=this.calcRatio();return this.config.appKey&&a&&!s}},{key:"init",value:(r=Ha(or().mark(function s(){return or().wrap(function(a){for(;;)switch(a.prev=a.next){case 0:this.initTime(this.mixed()),this.plugins.forEach(function(l){try{l.init()}catch(c){console.error("initPlugin Error",c)}});case 2:case"end":return a.stop()}},s,this)})),function(){return r.apply(this,arguments)})},{key:"mixed",value:function(){var s=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},a=this.uid(),l=this.getTime(),c=l.time,u=l.date,d=this.getUA(),f=window.location,p=f.host,g=f.origin,v=f.pathname;return qa(qa({uid:a,sid:this.sid,url:window.location.href,host:p,fullPath:g+v,sdkVersion:this.sdkVersion,createDate:u,appKey:this.config.appKey,createTime:c,appVersion:this.appVersion,env:this.env},d),s)}},{key:"commit",value:(n=Ha(or().mark(function s(a){var l,c;return or().wrap(function(u){for(;;)switch(u.prev=u.next){case 0:try{l=this.mixed(a),c=new URL("".concat(window.location.protocol,"//").concat(this.host,"/log.gif")),Object.entries(l).map(function(d){var f=XH(d,2),p=f[0],g=f[1];c.searchParams.set(p,g)}),new Image().src=c.toString()}catch(d){console.log("commit Error",d)}case 1:case"end":return u.stop()}},s,this)})),function(s){return n.apply(this,arguments)})}],[{key:"install",value:function(s){var a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};ud(t,t,Ds)||(s.config.errorHandler=function(l,c,u){ud(t,t,Ds).ErrorPluginInstance.onVueError(l,c,u),console.error(l)},F_(t,t,Ds,new t(a)))}},{key:"sendError",value:function(s){ud(t,t,Ds)?ud(t,t,Ds).ErrorPluginInstance.onReactError(s):console.error("QAPM: 请先初始化 QAPM!")}}]),t}(),Ds={writable:!0,value:null};const Ose="",Ise="",Vee={components:{InfoFilled:Ef,ArrowRight:Cf},mixins:[kr],inject:["hasLevel"],props:{axis:{required:!0,type:Object,default:()=>({x:0,y:0})},show:{required:!0,type:Boolean,default:!1},nodeInfo:{required:!0,type:Array,default:()=>[]},menuOptions:{required:!0,type:Array,default:()=>[]},border:{type:Boolean,required:!1,default:!0},itemWidth:{type:Number,required:!1,default:206},itemHeight:{type:Number,required:!1,default:36},itemSize:{type:Number,required:!1,default:14},offset:{type:Object,required:!1,default:()=>({x:6,y:2})},borderWidth:{type:Number,required:!1,default:6},history:{type:Object,required:!0,default:()=>{}},moduleDetail:{type:Object,required:!0,default:()=>{}}},emits:["contextmenu-click"],data(){return{checkedItems:{},globalMenus:vM,maxMulti:6}},computed:{checkboxMenu(){return this.nodeInfo.length>1?[]:this.menuOptions},canGoDetail(){var e,t,n,r;return((t=(e=this.moduleDetail)==null?void 0:e.config)==null?void 0:t.jumpDetail)&&((r=this.moduleDetail)==null?void 0:r.config.jumpRule[(n=this.nodeInfo[0])==null?void 0:n.type])},systemMenu(){var r,s,a,l,c,u,d;const e=[];if(this.nodeInfo.length===1){const f=this.nodeInfo[0];f.type!=="aggregation"&&f.type!=="nodeType"&&(e.push(Kh),(r=this.history.keyNodeIds)!=null&&r.some(_=>_===f.id)||(e.push(Xh),(a=(s=this.moduleDetail)==null?void 0:s.config)!=null&&a.hideCollectMenu||e.push(f.collect?Jh:Yh),e.push(f.textProp==="name"?Hh:qh),f.label&&e.push(f.textProp==="label"?Gh:Wh)),this.canGoDetail&&e.push(j2)),e.push(f.fx?jh:Uh);const p=this.history.dataNow.links.some(w=>w.source.id===f.id&&w.target.type==="aggregation"),b=this.history.dataNow.links.filter(w=>w.source.id===f.id).map(w=>w.target).some(w=>{let _=0;return this.history.dataNow.links.map(C=>{C.source.id===w.id&&_++}),_===0});p||f.type==="aggregation"?e.push($2):b&&e.push(F2),b&&e.push(M2),e.push(Qh)}else this.nodeInfo.length>1?(e.push(Xh,Kh),e.push(this.nodeInfo.some(p=>!p.collect)?Yh:Jh),this.nodeInfo.some(p=>p.label)&&e.push(this.nodeInfo.some(p=>p.textProp!=="label")?Wh:Gh),e.push(this.nodeInfo.some(p=>p.textProp!=="name")?qh:Hh),e.push(this.nodeInfo.some(p=>!p.fx)?Uh:jh),e.push(Qh)):this.nodeInfo.length===0&&(this.history.dataNow.nodes.some(p=>p.label)&&e.push(this.history.dataNow.nodes.some(p=>p.textProp!=="label")?R2:L2),e.push(this.history.dataNow.nodes.some(p=>p.textProp!=="name")?I2:B2),e.push(this.history.dataNow.nodes.some(p=>!p.fx)?A2:O2),this.history.currentIndex>0&&e.push(P2),this.history.currentIndex<this.history.length-1&&e.push(D2));const t=(l=this.nodeInfo[0])==null?void 0:l.type,n=(d=(u=(c=this.nodeInfo[0])==null?void 0:c.detail)==null?void 0:u.info)==null?void 0:d.extraNodeContextMenus;return t!=="nodeType"&&(n!=null&&n.length)&&(n.forEach(f=>{f.icon||(f.icon="button_edit_label")}),e.push(...n)),e},totalHeight(){let e=this.menuOptions.length*(this.itemHeight+5)+10+44+48+5,t=this.systemMenu.length*(this.itemHeight+5)+10+44+5;return e=this.menuOptions.length===0?0:44,t=this.systemMenu.length===0?0:44,e+t},axisComputed(){const e=document.getElementsByClassName("d3-container")[0],t=this.axis.top-e.offsetTop;return{top:(t<e.offsetHeight/2?Math.min(t+this.offset.y,Math.max(e.offsetHeight-this.totalHeight,e.getBoundingClientRect().top)):Math.max(t+this.offset.y,this.totalHeight+e.getBoundingClientRect().top))+"px",left:this.axis.left+this.offset.x+"px",transform:`translate(${this.axis.left>e.offsetWidth/2?"-100%":"0%"}, ${t>e.offsetHeight/2?"-100%":"0%"})`}},liStyle(){return{width:this.itemWidth+"px",height:this.itemHeight+"px",lineHeight:this.itemHeight+"px",fontSize:this.itemSize+"px"}},firstLeft(){const e=document.body.offsetWidth;return this.axis.left+this.itemWidth*2>=e},secondLeft(){const e=document.body.offsetWidth;return this.axis.left+this.itemWidth*3>=e},checkedItemsFinal(){return Object.keys(this.checkedItems).filter(e=>this.checkedItems[e]).map(e=>this.checkedItems[e])},haveInterface(){let e=!1;return this.menuOptions.map(t=>{t.type===1&&(e=!0)}),e}},watch:{show(){this.checkedItems={}}},methods:{handleCollapse(){},isSystemItem(e){return e.type===2},isExternalItem(e){return e.type===3},hasChildren(e){var t;return((t=e==null?void 0:e.children)==null?void 0:t.length)>0},onCheck(e,t){this.checkedItems[t.name]=e.currentTarget.checked?t:!1},secondBorderCheck(e,t=0){const n=document.body.offsetWidth,r=document.body.offsetHeight,s=this.axis.top+(e+t)*this.itemHeight;return{width:this.itemWidth*2+60+"px",left:this.axis.left+this.itemWidth*2>=n?"-100%":"100%",top:r>=s?0:"auto",bottom:r<s?0:"auto"}},thirdBorderCheck(e,t,n,r){const s=document.body.offsetWidth,a=document.body.offsetHeight,l=this.secondBorderCheck(e,n).top;let c;const u=(t+r)*this.itemHeight,d=u>180?180:u;return l===0?c=this.axis.top+e*this.itemHeight+d:c=this.axis.top-e*this.itemHeight+d,{left:this.axis.left+this.itemWidth*3>=s?"-100%":"100%",bottom:a>=c?0:"auto",top:a<c?0:"auto"}},handleClick(e,t){if(!t){if(qt({cId:"contextMenu-"+e.name,c:"右键菜单-"+e.namec}),e.has_child>0)return!1;ve(this,"contextmenu-click",{nodes:this.nodeInfo,api:e})}},handleDataClick(e,t){qt({cId:"contextMenu-"+e.name,c:"右键菜单-"+e.namec}),ve(this,"contextmenu-click",{nodes:this.nodeInfo,api:t,dataApi:e}),this.checkedItems={}}}},ete={"aria-hidden":"true",style:{position:"absolute",width:"0",height:"0",overflow:"hidden",display:"none"}},tte={class:"cm-list"},nte={class:"cm-ul"},rte={class:"hd"},ite=["src"],ote={class:"bd"},ste={class:"cm-ul cm-ul-level1"},ate=["title"],lte=["title","onClick"],cte=["title","onClick"],dte={key:0,class:"icon","aria-hidden":"true"},ute=["title","onClick"],fte=["src"],hte=["title","onClick"],pte={key:0,class:"fas el-icon-fa-cog"},gte={key:1,class:"fas el-icon-fa-external-link-alt"},mte={class:"text-wrapper"},vte=["src"],yte=["src"],bte={key:3,class:"shortcut"},wte={key:2,class:"icon","aria-hidden":"true"},_te=["title","onClick"],Cte={key:1,class:"icon","aria-hidden":"true"},Ste=["title","onClick"];function Ete(e,t,n,r,s,a){const l=o.resolveComponent("ArrowRight"),c=Ye,u=o.resolveComponent("InfoFilled"),d=gn;return n.show?(o.openBlock(),o.createElementBlock("div",{key:0,class:"cm-container",style:o.normalizeStyle(a.axisComputed),onClick:t[1]||(t[1]=o.withModifiers((...f)=>a.handleCollapse&&a.handleCollapse(...f),["stop"]))},[(o.openBlock(),o.createElementBlock("svg",ete,t[2]||(t[2]=[o.createElementVNode("symbol",{id:"icon-arrow-right",viewBox:"0 0 1024 1024"},[o.createElementVNode("path",{d:"M288.791335 65.582671l446.41733 446.417329-446.41733 446.417329z"})],-1)]))),o.createElementVNode("div",tte,[o.createElementVNode("ul",nte,[a.checkboxMenu.length>0?(o.openBlock(),o.createElementBlock("li",{key:0,class:"cm-li data-opt-wrapper",style:o.normalizeStyle(a.liStyle)},[o.createElementVNode("div",rte,[o.createElementVNode("img",{src:e.imgPath["./public/d3svg1/button18/button_relation.svg"],style:{"margin-right":"10px"}},null,8,ite),t[3]||(t[3]=o.createTextVNode("按关系分类拓线")),o.createVNode(c,null,{default:o.withCtx(()=>[o.createVNode(l)]),_:1})]),o.createElementVNode("div",ote,[o.createElementVNode("ul",ste,[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(a.checkboxMenu,(f,p)=>(o.openBlock(),o.createElementBlock("li",{key:p,class:"cm-li context-one",style:o.normalizeStyle(a.liStyle)},[a.hasChildren(f)?(o.openBlock(),o.createElementBlock("div",{key:0,class:o.normalizeClass(["cm-item",a.firstLeft?"cm-left":""]),title:f.namec},[o.createElementVNode("span",null,o.toDisplayString(f.namec),1),t[4]||(t[4]=o.createElementVNode("svg",{class:"icon","aria-hidden":"true"},[o.createElementVNode("use",{"xlink:href":"#icon-arrow-right"})],-1))],10,ate)):(o.openBlock(),o.createElementBlock("div",{key:1,class:o.normalizeClass(["cm-item",a.firstLeft?"cm-left":""]),title:f.namec,onClick:o.withModifiers(g=>a.handleDataClick(f,s.globalMenus.expandPartNode),["stop"])},[o.createElementVNode("span",null,o.toDisplayString(f.namec),1)],10,lte)),a.hasChildren(f)?(o.openBlock(),o.createElementBlock("ul",{key:2,class:"cm-ul cm-ul-level2",style:o.normalizeStyle(a.secondBorderCheck(p,f.children.length))},[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(f.children,(g,v)=>(o.openBlock(),o.createElementBlock("li",{key:v,class:"cm-li",style:o.normalizeStyle(a.liStyle)},[o.createElementVNode("div",{class:o.normalizeClass(["cm-item",a.secondLeft?"cm-left":""]),title:g.namec,onClick:o.withModifiers(b=>a.handleDataClick(g,s.globalMenus.expandPartNode),["stop"])},[o.createElementVNode("span",null,o.toDisplayString(g.namec),1),a.hasChildren(g)?(o.openBlock(),o.createElementBlock("svg",dte,t[5]||(t[5]=[o.createElementVNode("use",{"xlink:href":"#icon-arrow-right"},null,-1)]))):o.createCommentVNode("",!0)],10,cte),a.hasChildren(g)?(o.openBlock(),o.createElementBlock("ul",{key:0,class:"cm-ul cm-ul-level3",style:o.normalizeStyle(a.thirdBorderCheck(p,v,f.children.length,g.children.length))},[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(g.children,(b,w)=>(o.openBlock(),o.createElementBlock("li",{key:w,class:"cm-li",style:o.normalizeStyle(a.liStyle)},[o.createElementVNode("div",{class:"cm-item",title:b.namec,onClick:o.withModifiers(_=>a.handleDataClick(b,s.globalMenus.expandPartNode),["stop"])},[o.createElementVNode("span",null,o.toDisplayString(b.namec),1)],8,ute)],4))),128))],4)):o.createCommentVNode("",!0)],4))),128))],4)):o.createCommentVNode("",!0)],4))),128))])])],4)):n.nodeInfo.length>1&&n.nodeInfo.length<s.maxMulti?(o.openBlock(),o.createElementBlock("li",{key:1,class:"cm-li data-opt-wrapper data-opt-all",style:o.normalizeStyle(a.liStyle)},[o.createElementVNode("div",{class:"hd",onClick:t[0]||(t[0]=o.withModifiers(f=>a.handleDataClick(null,s.globalMenus.expandNode),["stop"]))},[o.createElementVNode("img",{src:e.imgPath["./public/d3svg1/button18/button_relation.svg"],style:{"margin-right":"10px"}},null,8,fte),t[6]||(t[6]=o.createTextVNode("展开全部关系 "))]),t[7]||(t[7]=o.createElementVNode("div",{class:"bd"},null,-1))],4)):o.createCommentVNode("",!0),(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(a.systemMenu,(f,p)=>(o.openBlock(),o.createElementBlock("li",{key:p,class:"cm-li",style:o.normalizeStyle(a.liStyle)},[o.createElementVNode("div",{class:o.normalizeClass(["cm-item",{"cm-left":a.firstLeft,disabled:f.disabled}]),title:f.namec,onClick:o.withModifiers(g=>a.handleClick(f,f.disabled),["stop"])},[a.isSystemItem(f)?(o.openBlock(),o.createElementBlock("i",pte)):a.isExternalItem(f)?(o.openBlock(),o.createElementBlock("i",gte)):o.createCommentVNode("",!0),o.createElementVNode("div",mte,[f.icon?(o.openBlock(),o.createElementBlock("img",{key:0,src:e.imgPath["./public/d3svg1/button18/"+f.icon+".svg"],class:"t-icon"},null,8,vte)):(o.openBlock(),o.createElementBlock("img",{key:1,src:e.imgPath["./public/d3svg1/button18/button_"+f.name+".svg"],class:"t-icon"},null,8,yte)),f.tooltip?(o.openBlock(),o.createBlock(d,{key:2,class:"el-icon-info",effect:"dark",content:f.tooltip,placement:"top-start"},{default:o.withCtx(()=>[o.createVNode(c,null,{default:o.withCtx(()=>[o.createVNode(u)]),_:1})]),_:2},1032,["content"])):o.createCommentVNode("",!0),o.createElementVNode("span",null,o.toDisplayString(f.namec),1),f.shortcut?(o.openBlock(),o.createElementBlock("span",bte,o.toDisplayString(f.shortcut),1)):o.createCommentVNode("",!0)]),a.hasChildren(f)?(o.openBlock(),o.createElementBlock("svg",wte,t[8]||(t[8]=[o.createElementVNode("use",{"xlink:href":"#icon-arrow-right"},null,-1)]))):o.createCommentVNode("",!0)],10,hte),a.hasChildren(f)?(o.openBlock(),o.createElementBlock("ul",{key:0,class:"cm-ul cm-ul-level2",style:o.normalizeStyle(a.secondBorderCheck(p,f.children.length))},[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(f.children,(g,v)=>(o.openBlock(),o.createElementBlock("li",{key:v,class:"cm-li",style:o.normalizeStyle(a.liStyle)},[o.createElementVNode("div",{class:o.normalizeClass(["cm-item",{"cm-left":a.secondLeft,disabled:f.disabled||g.disabled}]),title:g.namec,onClick:o.withModifiers(b=>a.handleClick(g,f.disabled||g.disabled),["stop"])},[g.tooltip?(o.openBlock(),o.createBlock(d,{key:0,class:"el-icon-info",effect:"dark",content:g.tooltip,placement:"top-start"},{default:o.withCtx(()=>[o.createVNode(c,null,{default:o.withCtx(()=>[o.createVNode(u)]),_:1})]),_:2},1032,["content"])):o.createCommentVNode("",!0),o.createElementVNode("span",null,o.toDisplayString(g.namec),1),a.hasChildren(g)?(o.openBlock(),o.createElementBlock("svg",Cte,t[9]||(t[9]=[o.createElementVNode("use",{"xlink:href":"#icon-arrow-right"},null,-1)]))):o.createCommentVNode("",!0)],10,_te),a.hasChildren(g)?(o.openBlock(),o.createElementBlock("ul",{key:0,class:"cm-ul cm-ul-level3",style:o.normalizeStyle(a.thirdBorderCheck(p,v,f.children.length,g.children.length))},[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(g.children,(b,w)=>(o.openBlock(),o.createElementBlock("li",{key:w,class:"cm-li",style:o.normalizeStyle(a.liStyle)},[o.createElementVNode("div",{class:o.normalizeClass(["cm-item",{disabled:f.disabled||g.disabled||b.disabled}]),title:b.namec,onClick:o.withModifiers(_=>a.handleClick(b,f.disabled||g.disabled||b.disabled),["stop"])},[b.tooltip?(o.openBlock(),o.createBlock(d,{key:0,class:"el-icon-info",effect:"dark",content:b.tooltip,placement:"top-start"},{default:o.withCtx(()=>[o.createVNode(c,null,{default:o.withCtx(()=>[o.createVNode(u)]),_:1})]),_:2},1032,["content"])):o.createCommentVNode("",!0),o.createElementVNode("span",null,o.toDisplayString(b.namec),1)],10,Ste)],4))),128))],4)):o.createCommentVNode("",!0)],4))),128))],4)):o.createCommentVNode("",!0)],4))),128))])])],4)):o.createCommentVNode("",!0)}const xte=_t(Vee,[["render",Ete],["__scopeId","data-v-dd8dd8d0"]]),Bse="",Lse="",Rse="",Pse="",kte={name:"Popover",components:{ForceGraphSvgIcon:so},mixins:[kr],inject:["levelList","hasLevel"],props:{showPopover:{type:Boolean,default:!1},mousePosition:{type:Object,default:()=>({left:0,top:0})},nodeInfo:{type:Object,default:()=>{}},type:{type:String,default:"node"},moduleDetail:{type:Object,default:()=>{}},data:{type:Object,default:()=>{}},darkMode:{type:Boolean,default:!0},history:{type:Object,default:()=>({})},customTooltip:{type:Function}},data(){return{isFunction:Il,showSelf:!1,onPop:!1,position:null,aggregationList:[]}},computed:{show(){return this.showPopover||this.showSelf},name(){var e,t,n;return((n=(t=(e=this.nodeInfo)==null?void 0:e.detail)==null?void 0:t.info)==null?void 0:n.name)||this.nodeInfo.name},isNormalNode(){return this.nodeInfo.type!=="nodeType"&&this.nodeInfo.type!=="aggregation"},isNodeTypeNode(){return this.nodeInfo.type==="nodeType"},isAggregateNode(){return this.nodeInfo.type==="aggregation"},fieldMapThisType(){var e;return this.moduleDetail.detail_field_map&&this.moduleDetail.detail_field_map[`${(e=this.nodeInfo)==null?void 0:e.type}_detail_info`]},canGoDetail(){return["nodeType","aggregation","family","org","report","vul","thumbprint_md5","email","cert_https"].indexOf(this.nodeInfo.type)<0}},watch:{mousePosition(){setTimeout(()=>{var c,u,d;const e=this.mousePosition.left>document.body.offsetWidth/2,t=this.mousePosition.top>document.body.offsetHeight/2,n=(c=document.getElementsByClassName("popover-container")[0])==null?void 0:c.offsetHeight,r=(u=document.getElementsByClassName("d3-container")[0])==null?void 0:u.offsetHeight,s=(d=document.getElementsByClassName("d3-container")[0])==null?void 0:d.getBoundingClientRect().top;let a;t?a=Math.max(this.mousePosition.top,n+s)+5:a=Math.min(this.mousePosition.top,Math.max(r-n,s))-5;const l={left:(e?this.mousePosition.left+2:this.mousePosition.right-2)+"px",top:a+"px",transform:`translate(${e?"-100%":"0%"}, ${t?"-100%":"0%"})`};this.position=l},100)},nodeInfo:{handler:function(){var t;const e=(((t=this.nodeInfo)==null?void 0:t.list)||[]).map(n=>{var s,a,l;const r=n.detail;return fe(ne({},n),{name:((s=r==null?void 0:r.info)==null?void 0:s.name)||n.name,level:((l=(a=r==null?void 0:r.info)==null?void 0:a.basic)==null?void 0:l.level)||""})});e==null||e.sort((n,r)=>{var l,c;const s=(l=this.levelList.find(u=>u.level===n.level))==null?void 0:l.dangerNumber;return((c=this.levelList.find(u=>u.level===r.level))==null?void 0:c.dangerNumber)-s}),this.aggregationList=e},immediate:!0}},methods:{handleMouseEnter(){this.showSelf=!0},handleMouseLeave(){this.showSelf=!1},isSomething(e){return Bh(e)},getTypeZh(e){var n,r,s;let t=e;if(e==="nodeType")t="关系节点";else for(const a in(n=this.moduleDetail)==null?void 0:n.nodes)if(e===((r=this.moduleDetail)==null?void 0:r.nodes[a].name)){t=(s=this.moduleDetail)==null?void 0:s.nodes[a].namec;break}return t},getLevelClass(e){return Sc(e,this.levelList)},getColorStyle(e){return ao(e,this.levelList,this.darkMode)},getNodeTypeChildNum(e){var s;const t=(s=this.data)==null?void 0:s.links,n=[],r=[];return t==null||t.map(a=>{a.source.id===e&&(n.push(a.target.id),a.target.detail&&fD(a.target.detail.info.basic.level,this.levelList)&&r.push(a.target.id))}),{allChildNum:n.length,dangerChildNum:r.length}},canShowField(e){const t=this.hasFieldValue(e);return!(t===void 0||e.hide_hover||e.hide_empty&&!t)},hasFieldValue(e){const t=this.nodeInfo.detail&&this.nodeInfo.detail.info&&this.nodeInfo.detail.info.basic[e.prop];if(t===null)return;const n=Array.isArray(t);return n&&t.length>0||!n&&t!==""&&t!=="无"},getFieldValue(e){const t=this.nodeInfo.detail.info.basic[e.prop],n=Array.isArray(t),r=this.isSomething(t);let s="-";return r&&(n?s=t.length?t.join("|"):"-":s=t||"-"),s},formatTags(e){return Nc(Tc(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)ve(Re,"emitDataLoaded");else{const n=this.nodeInfo,r={deleteOne:{nodes:[n],links:[{source:n.relationId,target:n.id}]},type:"aggregation"};setTimeout(()=>{this.history.pushState(r),ve(Re,"emitDataLoaded")},0)}}}},Nte={key:0},Tte=["innerHTML"],Ate={key:1,class:"node-info-container"},Ote={class:"popover-block popover-header"},Ite={key:0,class:"popover-collect"},Bte={key:1,class:"row-item"},Lte={class:"label"},Rte={key:2,class:"row-item"},Pte={class:"value"},Dte={class:"node-type-info"},Mte={class:"name"},Fte={key:3,class:"row-item"},$te={class:"value"},zte={class:"popover-block popover-fields"},Ute={key:0,class:"node-detail top-border"},jte={key:0,class:"row-item"},qte=["title"],Hte={key:1,class:"row-item row-item-tag"},Gte={class:"value"},Wte={class:"graph-tags-box"},Kte={key:0,class:"row-item"},Yte={class:"label"},Jte=["title"],Xte={key:1,class:"node-statistics top-border"},Qte={class:"row-item node-num"},Zte={class:"value"},Vte={key:0},ene={class:"danger"},tne={key:2,class:"node-aggregation"},nne={class:"aggregation-title"},rne={class:"aggregation-box"},ine={key:2,class:"node-info-container"},one={class:"popover-fields"},sne={class:"top"};function ane(e,t,n,r,s,a){const l=o.resolveComponent("force-graph-svg-icon"),c=gn,u=Ea,d=aP,f=no,p=sP;return o.openBlock(),o.createElementBlock("div",{class:o.normalizeClass(["popover-container",a.show?"show-popover":"hide-popover"]),style:o.normalizeStyle(s.position),onMouseenter:t[0]||(t[0]=(...g)=>a.handleMouseEnter&&a.handleMouseEnter(...g)),onMouseleave:t[1]||(t[1]=(...g)=>a.handleMouseLeave&&a.handleMouseLeave(...g))},[o.createElementVNode("div",null,[a.show&&n.customTooltip&&s.isFunction(n.customTooltip)?(o.openBlock(),o.createElementBlock("div",Nte,[o.createElementVNode("div",{innerHTML:n.customTooltip({nodeInfo:n.nodeInfo,data:n.data,moduleDetail:n.moduleDetail})},null,8,Tte)])):n.type==="node"?(o.openBlock(),o.createElementBlock("div",Ate,[o.createElementVNode("div",Ote,[n.nodeInfo.collect?(o.openBlock(),o.createElementBlock("div",Ite,[o.createVNode(c,{content:"已收藏","popper-class":"el-tooltip-gray",placement:"left"},{default:o.withCtx(()=>[o.createVNode(l,{class:"button-img","icon-class":e.imgPath["./public/d3svg1/star.svg"]},null,8,["icon-class"])]),_:1})])):o.createCommentVNode("",!0),a.isNormalNode?(o.openBlock(),o.createElementBlock("div",Bte,[o.createElementVNode("div",Lte,o.toDisplayString(a.getTypeZh(n.nodeInfo.type))+":",1),o.createElementVNode("div",{class:o.normalizeClass(["value",{"star-next":n.nodeInfo.collect}])},o.toDisplayString(a.name),3)])):o.createCommentVNode("",!0),a.isNodeTypeNode?(o.openBlock(),o.createElementBlock("div",Rte,[t[2]||(t[2]=o.createElementVNode("div",{class:"label"},"关系节点:",-1)),o.createElementVNode("div",Pte,[o.createElementVNode("div",Dte,[o.createElementVNode("div",Mte,o.toDisplayString(n.nodeInfo.name),1)])])])):o.createCommentVNode("",!0),n.nodeInfo.label?(o.openBlock(),o.createElementBlock("div",Fte,[t[3]||(t[3]=o.createElementVNode("div",{class:"label"},"备注:",-1)),o.createElementVNode("div",$te,o.toDisplayString(n.nodeInfo.label),1)])):o.createCommentVNode("",!0)]),o.createElementVNode("div",zte,[a.isNormalNode&&n.nodeInfo.detail?(o.openBlock(),o.createElementBlock("div",Ute,[a.canGoDetail&&a.hasLevel?(o.openBlock(),o.createElementBlock("div",jte,[t[4]||(t[4]=o.createElementVNode("div",{class:"label"},"危险级别:",-1)),o.createElementVNode("div",{class:o.normalizeClass(["value level",a.getLevelClass(n.nodeInfo.detail&&n.nodeInfo.detail.info.basic.level)]),title:n.nodeInfo.detail&&n.nodeInfo.detail.info.basic.level||"--"},o.toDisplayString(n.nodeInfo.detail&&n.nodeInfo.detail.info.basic.level||"--"),11,qte)])):o.createCommentVNode("",!0),n.nodeInfo.detail&&n.nodeInfo.detail.tags&&n.nodeInfo.detail.tags.length>0?(o.openBlock(),o.createElementBlock("div",Hte,[t[7]||(t[7]=o.createElementVNode("div",{class:"label"},"标签:",-1)),o.createElementVNode("div",Gte,[o.createElementVNode("div",Wte,[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(a.formatTags(n.nodeInfo.detail.tags),(g,v)=>(o.openBlock(),o.createBlock(c,{key:v,"popper-class":"el-tooltip-gray"},{content:o.withCtx(()=>[o.createElementVNode("div",null,[o.createTextVNode(o.toDisplayString(g.name===g.desc?g.name:g.name+":"+g.desc)+" ",1),g.disabled?(o.openBlock(),o.createElementBlock(o.Fragment,{key:0},[t[5]||(t[5]=o.createElementVNode("br",null,null,-1)),t[6]||(t[6]=o.createTextVNode(" 标签状态:失效 "))],64)):o.createCommentVNode("",!0)])]),default:o.withCtx(()=>[o.createElementVNode("span",null,[o.createVNode(u,{class:o.normalizeClass(["graph-tag-one",`${g.type||"unknown"} ${g.disabled?"tag-disable":""}`]),type:g.type||"info"},{default:o.withCtx(()=>[o.createTextVNode(o.toDisplayString(g.name),1)]),_:2},1032,["class","type"])])]),_:2},1024))),128))])])])):o.createCommentVNode("",!0),(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(a.fieldMapThisType,(g,v)=>(o.openBlock(),o.createElementBlock(o.Fragment,null,[a.canShowField(g)?(o.openBlock(),o.createElementBlock("div",Kte,[o.createElementVNode("div",Yte,o.toDisplayString(g.zh)+":",1),o.createElementVNode("div",{class:o.normalizeClass(["value",{red:g.prop==="virus_name"}]),title:n.nodeInfo.detail.info.basic[v]},o.toDisplayString(a.getFieldValue(g)),11,Jte)])):o.createCommentVNode("",!0)],64))),256))])):o.createCommentVNode("",!0),a.isNodeTypeNode?(o.openBlock(),o.createElementBlock("div",Xte,[o.createElementVNode("div",Qte,[t[9]||(t[9]=o.createElementVNode("div",{class:"label"},"拓展节点统计:",-1)),o.createElementVNode("div",Zte,[a.getNodeTypeChildNum(n.nodeInfo.id).dangerChildNum>0?(o.openBlock(),o.createElementBlock("span",Vte,[o.createElementVNode("span",ene,o.toDisplayString(a.getNodeTypeChildNum(n.nodeInfo.id).dangerChildNum),1),t[8]||(t[8]=o.createTextVNode("/"))])):o.createCommentVNode("",!0),o.createTextVNode(o.toDisplayString(a.getNodeTypeChildNum(n.nodeInfo.id).allChildNum),1)])])])):o.createCommentVNode("",!0),a.isAggregateNode?(o.openBlock(),o.createElementBlock("div",tne,[o.createElementVNode("div",nne,"聚合节点 ("+o.toDisplayString(s.aggregationList.length)+"个)",1),o.createElementVNode("div",rne,[o.createVNode(p,{data:s.aggregationList,style:{width:"100%"}},{default:o.withCtx(()=>[o.createVNode(d,{prop:"name","min-width":"200",label:"名称"}),o.createVNode(d,{sortable:"",prop:"type",label:"类型"}),o.createVNode(d,{sortable:"",prop:"level",width:"80",label:"级别"},{default:o.withCtx(g=>[o.createElementVNode("span",{style:o.normalizeStyle({color:a.getColorStyle(g.row.level)})},o.toDisplayString(g.row.level||"--"),5)]),_:1}),o.createVNode(d,{label:"操作"},{default:o.withCtx(g=>[o.createVNode(f,{class:"add-to-graph-btn",type:"primary",text:"",size:"small",onClick:v=>a.addToGraph(g.row)},{default:o.withCtx(()=>t[10]||(t[10]=[o.createTextVNode(" 添加到图谱 ")])),_:2},1032,["onClick"])]),_:1})]),_:1},8,["data"])])])):o.createCommentVNode("",!0)])])):(o.openBlock(),o.createElementBlock("div",ine,[o.createElementVNode("div",one,[o.createElementVNode("div",sne,o.toDisplayString(n.nodeInfo.apiName),1)])]))])],38)}const lne=_t(kte,[["render",ane],["__scopeId","data-v-194a65c9"]]),cne=[{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:[]}],v0={name:"vue-safe-force-graph",version:"2.0.73",description:"force_graph in security area",author:"jason zhang",module:"./lib/vue-safe-force-graph.js",main:"./lib/vue-safe-force-graph.umd.cjs",type:"module",files:["/lib/"],exports:{".":{import:"./lib/vue-safe-force-graph.js",require:"./lib/vue-safe-force-graph.umd.cjs"},"./*":"./*"},scripts:{dev:"vite","dev:base64":"vite --mode development_base64",lib:"vite build","lib:base64":"vite build --mode production_base64","lib:webcomponent":"vite build --mode web_component",patch:'npm version patch -m "Upgrade to %s "',"patch:base64":'npm version patch -m "Upgrade to %s for base64"',p:"npm run patch && npm run lib && npm run lib:webcomponent && npm publish","p:base64":"npm run patch:base64 && npm run lib:base64 && npm publish",lint:"eslint --ext .js,.vue src",lintFix:"eslint --fix --ext .js,.vue src",imageToCdn:"node qcdn.cjs",imageToBase64:"node qcdn.cjs --buildtype=base64",changelog:"conventional-changelog -p angular -i CHANGELOG.md -s -r 0"},dependencies:{"@element-plus/icons-vue":"^2.1.0","@q/qapm":"^1.1.7","csv-parse":"^5.0.4",d3:"^7.8.5","d3-lasso":"0.0.5","element-plus":"^2.3.0",json2csv:"^5.0.7",konva:"^9.2.0","lodash-es":"^4.17.21","mime-types":"^2.1.35",minimist:"^1.2.6","radar-js-analytic-sdk":"^2.2.6",vue:"^3.5.3","vue-clipboard3":"^2.0.0","vue-router":"^4.1.6","vue-virtual-scroller":"^2.0.0-beta.8"},devDependencies:{"@babel/core":"^7.23.3","@babel/preset-env":"^7.23.3","@originjs/vite-plugin-commonjs":"^1.0.3","@q/qcdn":"^3.2.4","@vitejs/plugin-vue":"^4.1.0",axios:"^0.21.1","babel-eslint":"^10.1.0",eslint:"^7.32.0","eslint-plugin-vue":"^8.0.3",imageinfo:"^1.0.4",qs:"^6.10.1","rollup-plugin-visualizer":"^5.9.0",sass:"^1.62.0","unplugin-auto-import":"^0.15.2","unplugin-element-plus":"^0.8.0","unplugin-vue-components":"^0.24.1",vite:"^4.3.1"},browserslist:["> 1%","last 2 versions"],engines:{node:">=8.9",npm:">= 3.0.0"},license:"MIT"},Qse="",{toClipboard:dne}=Ac(),une="Arial,Helvetica Neue,Helvetica,PingFang SC,Hiragino Sans GB,Microsoft YaHei,sans-serif",Pr=1,fne=["ip","intranet","internet"],y0=20,Wt={},hne={name:"ForceGraphRenderByCanvas",components:{Popover:lne,NodeContextmenu:xte},mixins:[kr],provide:function(){return{levelList:this.levelList}},props:{data:{type:Object,default:()=>({nodes:[],links:[]})},history:{type:Object,default:()=>({})},linkDistance:{type:Number,default:120},strength:{type:Number,default:-600},isThreatPath:{type:Boolean,default:!1},requestGraphData:{type:Boolean,default:!1},moduleDetail:{type:Object,default:()=>{}},graphApi:{type:Object,default:()=>{}},alphaDecay:{type:Number,default:.0228},alphaMin:{type:Number,default:.001},darkMode:{type:Boolean,default:!0},levelList:{type:Array,default:()=>[{level:"未知",levelName:"未知",className:"unknown",normalColor:"#666",darkColor:"#c6cdd5",dangerNumber:0},{level:"危险",levelName:"危险",className:"warn",normalColor:"#CF1322",darkColor:"#fb2400",dangerNumber:1},{level:"普通",levelName:"普通",className:"normal",normalColor:"#007EE2",darkColor:"#0094ff",dangerNumber:-1},{level:"安全",levelName:"安全",className:"safe",normalColor:"#009A75",darkColor:"#00da90",dangerNumber:-2}]},nodeWidth:{type:Number},startNodeWidth:{type:Number},nodeTypeScale:{type:Number,default:1},nodeTypeList:{type:Array,default:()=>[]},manualTickNumber:{type:Number,default:500},startNodeAnimation:{type:Boolean,default:!0},customTooltip:{type:Function},enableScript:{type:Boolean,default:!1},edgeLabelMaxLength:{type:Number,default:10},customNodeImages:{type:Object,default:()=>{}}},emits:["handle-select-node","custom-contextmenu-click","flagFiles","updateSelection"],data(){return{prefix:"./public/",iconAllLoaded:!1,customIconLoaded:!1,iconSize:{},iconFiles:{},flagFiles:{},highlightRule:{},nodesRange:null,mousePosition:{left:0,top:0},hoverNodePosition:{},uniqueClass:"",showPopover:!1,popoverTimer:null,popoverType:"",popoverContent:{},popoverNode:{},showContextMenu:!1,contextMenuNode:{},menuOptions:[],isDragging:!1,originTransform:null,dragNodeFix:!1,destroyed:!1,actKey:es()?"metaKey":"ctrlKey",levelHeight:100,actNum:0,scriptNow:null,scriptInited:!1,canAct:!1,isKeyUp:!0,initTimes:0,resizeObserver:null,canvasElement:null,stage:o.shallowRef(null),layer:o.shallowRef(null),nodesGroup:o.shallowRef({}),linksGroup:o.shallowRef({}),grab:o.shallowRef(null),simulation:o.shallowRef(null),nodes:o.shallowRef(null),links:o.shallowRef(null),hoveredNode:o.shallowRef(null),mouseDownNode:o.shallowRef(null),selectionRect:null,selection:[],scale:Pr,mousedownPos:null,mousedownNode:null,mouseupNode:null,dragLine:null,darkBgRect:null,inited:!1,hasSimulation:!1,nodesLength:0,ticking:!1,anim1:null,anim2:null,anim3:null}},computed:{isAutoTick(){var e;return((e=this.nodes)==null?void 0:e.length)<this.manualTickNumber},iconSizeComputed(){const e=qr(this.iconSize);return this.nodeTypeList.forEach(t=>{e[t]=this.iconSize[t]*this.nodeTypeScale}),e},contextMenuNodes(){return this.contextMenuNode.id?this.selection.some(e=>e.id===this.contextMenuNode.id)?[...this.selection]:[this.contextMenuNode]:[]},showContextMenuFlag(){return this.requestGraphData?this.showContextMenu:!1}},watch:{data:{handler:function(){const e=this.nodesLength!==this.data.nodes.length;this.nodes=this.data.nodes,this.links=this.data.links,this.nodesLength=this.data.nodes.length,this.update(e)},deep:!0},moduleDetail:{handler:function(e){return Ne(this,null,function*(){e!=null&&e.nodes&&!this.iconAllLoaded&&!this.customIconLoaded&&(yield this.loadCustomIcon(),yield this.loadIcons(),this.initForceGraph(),setTimeout(()=>{this.update()},50))})},deep:!0,immediate:!0},darkMode:{handler:function(e){return Ne(this,null,function*(){const t=e?"dark":"light";setTimeout(()=>{this.update();const n=document.querySelectorAll(`.${this.uniqueClass}.render-container`);n!=null&&n.length&&(this.isThreatPath?n[0].setAttribute("data-theme",t):(n[0].setAttribute("data-theme",t),document.getElementsByClassName(this.uniqueClass+" render-container")[0].parentElement.parentElement.setAttribute("data-theme",t)))},200)})},immediate:!0}},created(){Xr.setProject("QH_10542_1724").getTrack(),console.log("组件版本: "+(v0==null?void 0:v0.version)),this.isThreatPath||this.initKeyEvent(),this.uniqueClass="unique"+new Date().getTime()+Math.floor(Math.random()*1e5)},mounted(){return Ne(this,null,function*(){new Zee({appKey:"fe-force-graph",ratio:50}),this.initForceGraph(),uD(this.levelList),!this.isThreatPath&&(Si(Re,"buttonClick",e=>{vn(e,"buttonClick msg"),this.handleContextMenuClick(e)}),Si(Re,"relationClick",e=>{this.handleContextMenuClick(e)}),Si(Re,"sendNodesRange",(e,t)=>{e!==void 0&&(this.nodesRange=e,this.updateNodeStyle())}))})},beforeUnmount(){Ei(Re,"buttonClick"),Ei(Re,"relationClick"),Ei(Re,"sendNodesRange"),this.unbindKeyEvent(),this.resetAll(),vn("destroy")},methods:{initForceGraph(){return Ne(this,null,function*(){if(this.inited)return;const e=this.$refs.canvasContainer;let t=e.clientWidth,n=e.clientHeight;this.resizeObserver=new ResizeObserver(s=>{for(const a of s){if(t=a.contentRect.width,n=a.contentRect.height,vn(`新宽度: ${t}px, 新高度: ${n}px`),t===0||n===0)return;this.stage.width(t),this.stage.height(n),this.layer&&this.layer.batchDraw(),this.hasSimulation&&this.updateSimulation()}}),this.resizeObserver.observe(e),document.addEventListener("click",this.hideContextMenu,!1),this.nodes=this.data.nodes,this.links=this.data.links,this.stage=new Ze.Stage({container:e,width:t,height:n,scaleX:Pr,scaleY:Pr}),this.layer=new Ze.Layer,this.grab=new Ze.Group({id:"grab",x:0,y:0}),this.layer.add(this.grab);const r=this.layer.getCanvas()._canvas;this.canvasElement=r,this.stage.on("mousemove",s=>{if(!this.mousedownNode||!s.evt[this.actKey]){if(this.resetMouseVars(),this.selectionRect&&s.evt.altKey){const a=this.stage.getPointerPosition(),l=(a.x-this.stage.x())/this.scale,c=(a.y-this.stage.y())/this.scale,u=l-this.selectionRect.x(),d=c-this.selectionRect.y();this.selectionRect.width(u),this.selectionRect.height(d),this.stage.batchDraw()}}else{const a=this.stage.getPointerPosition(),l=this.stage.scaleX(),c=(a.x-this.stage.x())/l,u=(a.y-this.stage.y())/l;this.dragLine.points([this.mousedownPos.x,this.mousedownPos.y,c,u]),this.layer.batchDraw()}}),this.stage.on("wheel",s=>{s.evt.preventDefault();const a=1.1,l=this.scale,c=s.evt.deltaY<0?l*a:l/a;this.scale=c;const u=this.stage.getPointerPosition(),d=this.stage.position(),f=u.x-(u.x-d.x)*(c/l),p=u.y-(u.y-d.y)*(c/l);this.stage.setAttrs({scaleX:c,scaleY:c,x:f,y:p}),this.layer.batchDraw()}),this.stage.on("mousedown",s=>{const a=s.target;if(a&&a.nodeType==="Stage"?this.stage.setDraggable(!0):this.stage.setDraggable(!1),s.evt.altKey){this.stage.setDraggable(!1);const l=this.stage.scaleX(),c=this.stage.getPointerPosition(),u=(c.x-this.stage.x())/l,d=(c.y-this.stage.y())/l;this.selectionRect=new Ze.Rect({x:u,y:d,width:0,height:0,stroke:"rgb(80, 80, 80)",strokeWidth:2}),this.layer.add(this.selectionRect),this.stage.batchDraw()}}),this.stage.on("mouseup",s=>{if(this.stage.setDraggable(!1),this.selectionRect&&s.evt.altKey){const a=this.selectionRect.x(),l=this.selectionRect.y(),c=this.selectionRect.width(),u=this.selectionRect.height();this.selection=this.nodes.filter(d=>{const f={x:d.x,y:d.y},p=Math.min(a,a+c),g=Math.max(a,a+c),v=Math.min(l,l+u),b=Math.max(l,l+u);return f.x>=p&&f.x<=g&&f.y>=v&&f.y<=b}),this.updateSelection(),this.selectionRect.destroy(),this.selectionRect=null}}),this.stage.on("contextmenu",this.handleGlobalContextMenu),this.stage.on("click",s=>{s.target&&s.target.nodeType==="Stage"&&this.handleDeselectNode(s)}),this.setSimulation(),this.stage.add(this.layer),this.stage.draw(),this.update(),this.inited=!0})},setSimulation(){var n;if(this.hasSimulation||!((n=this.nodes)!=null&&n.length))return;const e=this.stage.width()/(2*Pr),t=this.stage.height()/(2*Pr);this.hasSimulation=!0,this.simulation=GH(this.nodes).force("link",OH(this.links).id(r=>r.id).distance(this.linkDistance).strength(1)).force("charge",WH().strength(this.strength)).force("x",KH()).force("y",YH()).force("center",y_(e,t)).alphaDecay(this.alphaDecay).alphaMin(this.alphaMin).stop(),this.nodeWidth&&this.simulation.force("collision",TH().radius(this.nodeWidth/2)),this.isAutoTick?(this.simulation.alpha(1).restart(),this.simulation.on("tick",this.ticked)):(this.simulation.on("tick",null),this.sendManualTick()),this.simulation.on("end",()=>{vn("simulation end time",Date.now()),this.isThreatPath&&this.centerAndZoom(1)})},sendManualTick(){var e;vn("sendManualTick",(e=this.nodes)==null?void 0:e.length),!this.ticking&&(this.ticking=!0,this.doClearCanvas(),this.simulation.alphaDecay(this.alphaDecay*2),this.simulation.alphaMin(this.alphaMin*5),this.simulation.alpha(1).restart(),setTimeout(()=>{console.time("tick");for(let t=0,n=Math.ceil(Math.log(this.simulation.alphaMin())/Math.log(1-this.simulation.alphaDecay()));t<n;++t)vn("tick"),this.simulation.tick();console.timeEnd("tick"),this.ticking=!1,this.update(),this.centerAndZoom()},1e3))},update(e=!1){return Ne(this,null,function*(){var t,n,r;!this.iconAllLoaded&&((n=(t=this.moduleDetail)==null?void 0:t.nodes)!=null&&n.length)&&!this.customIconLoaded&&(yield this.loadIcons(),yield this.loadCustomIcon()),!this.destroyed&&(r=this.nodes)!=null&&r.length&&(this.initScript(),vn("update"),e&&this.updateSimulation(),this.doClearCanvas(),this.paintLinks(),this.paintNodes(),this.updateSelection(),this.ticked(),this.actNum===9&&setTimeout(()=>{this.centerAndZoom(.8)},200))})},doClearCanvas(){this.nodesGroup={},this.linksGroup={},this.layer.destroyChildren(),this.grab=new Ze.Group({id:"grab",x:0,y:0}),this.layer.add(this.grab)},paintNodes(){const e=this.stage.width()/2,t=this.stage.height()/2,n=this.selection.map(r=>r.id);this.nodes.forEach(r=>Ne(this,null,function*(){var _,C,k,S,E,N,A,I,O,F,P,M,W,U,Q,q,D,j,K,H,R,ie,ee;const s=(C=(_=r.detail)==null?void 0:_.info)==null?void 0:C.icon_img;let a;r.type==="nodeType"?a=this.iconSizeComputed[r.icon]||this.iconSizeComputed.node_type:a=this.iconSize[r.icon]||this.iconSize[r.type]||24,r.startNode&&this.startNodeWidth&&(a=this.startNodeWidth);const l=((E=(S=(k=r==null?void 0:r.detail)==null?void 0:k.info)==null?void 0:S.basic)==null?void 0:E.level)||"",c=(I=(A=(N=r==null?void 0:r.detail)==null?void 0:N.info)==null?void 0:A.basic)==null?void 0:I.flag;let u;try{u=yield this.getNodeImage(r)}catch(Y){console.log(Y)}this.nodesGroup[r.id]&&((O=this.nodesGroup[r.id])==null||O.destroy());const d=new Ze.Group({name:"nodeGroup",opacity:1,id:`${r.id}`,x:r.x?r.x:e,y:r.y?r.y:t,draggable:!0,visible:r.show});if(n.includes(r.id)&&d.addName("isSelected"),r.startNode&&this.startNodeAnimation){const Y=ao(l,this.levelList,this.darkMode),J=new Ze.Circle({x:0,y:0,radius:20,fill:Y,opacity:0}),oe=new Ze.Circle({x:0,y:0,radius:20,fill:Y,opacity:0}),re=new Ze.Circle({x:0,y:0,radius:20,fill:Y,opacity:0});d.add(J),d.add(oe),d.add(re);const z=(G,te)=>new Ze.Animation(function(le){const de=le.time;if(de%te/te===0)return!1;const be=.5-.5*(de%te)/te,Se=40*(de%te)/te;G.radius(Se||0),G.opacity(be)},this.layer);(F=this.anim1)==null||F.stop(),(P=this.anim2)==null||P.stop(),(M=this.anim3)==null||M.stop(),this.anim1=z(J,1500),this.anim2=z(oe,1500),this.anim3=z(re,1500),(W=this.anim1)==null||W.start(),setTimeout(()=>{this.anim2.start()},500),setTimeout(()=>{this.anim3.start()},1e3)}else if(r.startNode&&!this.startNodeAnimation){const Y=ao(l,this.levelList,this.darkMode),J=new Ze.Circle({x:0,y:0,radius:20,fill:Y,opacity:this.startNodeAnimation?0:.3});d.add(J)}if(!s&&(r.type==="ip"||r.type==="internet"||r.type==="country"||r.type==="target_country")){const Y=ao(l,this.levelList,this.darkMode),J=new Ze.Circle({x:0,y:0,fill:this.darkMode?"#182628":"#fff",radius:a/2,stroke:Y,strokeWidth:2});d.add(J)}if(u){const Y=c||(Q=(U=r==null?void 0:r.detail)==null?void 0:U.info)!=null&&Q.inner_country?20:a,J=u&&new Ze.Image({x:0,y:0,offsetX:Y/2,offsetY:Y/2,image:u,width:Y,height:Y,draggable:!1});d.add(J)}if(!s&&r.detail&&r.type==="md5"){const Y=((j=(D=(q=r.detail.info)==null?void 0:q.basic)==null?void 0:D.file_type)==null?void 0:j.toUpperCase())||"MD5",J=new Ze.Text({name:"md5Text",x:0,y:0,text:Y,fontSize:4,fontWeight:700,fontFamily:une,fill:this.darkMode?"#182628":"#fff",align:"center",listening:!1});J.x(J.x()-J.width()/2),d.add(J)}const f=r.textProp||"name",p=f==="name"?((H=(K=r==null?void 0:r.detail)==null?void 0:K.info)==null?void 0:H.name)||r.name:r[f];let g=(p==null?void 0:p.length)>14&&!fne.includes(r.type)?p.slice(0,7)+"..."+p.slice(-7):p;g=wD(g);const v=new Ze.Text({offsetY:a/2,name:"konvaText",x:0,y:a+8,text:g,fontSize:12,fontFamily:"Calibri",fill:this.darkMode?"#cdd9da":"#000",align:"center",listening:!1,visible:!!r.textProp});v.x(v.x()-v.width()/2),d.add(v);const b=new Ze.Circle({name:"border",x:0,y:0,radius:a/2,fill:"#5c6271",opacity:.4,visible:!1});if(d.add(b),(ie=(R=r.detail)==null?void 0:R.tags)!=null&&ie.length){const Y=new Ze.Circle({x:((a/2||14)+5)*Math.sin(60*Math.PI/180),y:-((a/2||14)+5)*Math.cos(60*Math.PI/180),radius:3,fill:"#9300ff",listening:!1});d.add(Y)}if(r.type!=="nodeType"&&r.type!=="aggregation"){var w=new Ze.Circle({name:"collect",x:((a/2||14)+5)*Math.sin(0*Math.PI/180),y:-((a/2||14)+5)*Math.cos(0*Math.PI/180),radius:3,fill:"#ffad00",visible:!!r.collect});d.add(w)}if(r.label){const Y=new Ze.Circle({x:((a/2||14)+5)*Math.sin(30*Math.PI/180),y:-((a/2||14)+5)*Math.cos(30*Math.PI/180),radius:3,fill:"#0099ff",listening:!1});d.add(Y)}if(r.type==="nodeType"&&r.showTotal){const Y=(a/2||14)+5,J=70*Math.PI/180,oe=Y*Math.sin(J),re=-Y*Math.cos(J),z=new Ze.Circle({x:oe,y:re,radius:10,fill:"#1890ff",stroke:"white",strokeWidth:2,listening:!1});d.add(z);const G=new Ze.Text({x:oe,y:re,text:`${((ee=r==null?void 0:r.children)==null?void 0:ee.length)||0}`,fontSize:10,fontFamily:"Calibri",fill:"#fff",align:"center",verticalAlign:"middle",listening:!1});G.offsetX(G.width()/2),G.offsetY(G.height()/2),d.add(G)}d.on("dragstart",(Y,J)=>{Y.evt&&Y.evt[this.actKey]||(this.isAutoTick&&this.simulation.alphaTarget(.3).restart(),this.isDragging=!0)}),d.on("dragmove",Y=>{if(!(Y.evt&&Y.evt[this.actKey])){var J=this.simulation.nodes().find(oe=>oe.id===r.id);J&&(J.x=d.x(),J.fx=d.x(),J.y=d.y(),J.fy=d.y(),this.links.forEach(oe=>{const re=this.linksGroup[`${oe.source.id}-${oe.target.id}`],z=re==null?void 0:re.findOne(".konvaLine"),G=re==null?void 0:re.findOne(".linkArrow"),te=re==null?void 0:re.findOne(".edgeLabel");let le,de,ye,be;if(oe.source.id===J.id){if(!this.nodesGroup[oe.target.id])return;le=J.x,de=this.nodesGroup[oe.target.id].x(),ye=J.y,be=this.nodesGroup[oe.target.id].y(),z.points([le,ye,de,be]);const Se=Lh(le,ye,de,be,y0);G==null||G.x(Se==null?void 0:Se.x),G==null||G.y(Se==null?void 0:Se.y),G==null||G.rotation(Math.atan2(be-ye,de-le)*(180/Math.PI))}else if(oe.target.id===J.id){if(!this.nodesGroup[oe.source.id])return;le=this.nodesGroup[oe.source.id].x()||0,de=J.x||0,ye=this.nodesGroup[oe.source.id].y()||0,be=J.y||0,z.points([le,ye,de,be]);const Se=Lh(le,ye,de,be,y0);G==null||G.x(Se==null?void 0:Se.x),G==null||G.y(Se==null?void 0:Se.y),G==null||G.rotation(Math.atan2(be-ye,de-le)*(180/Math.PI))}if(te&&(oe.source.id===J.id||oe.target.id===J.id)){te.x((le+de)/2),te.y((ye+be)/2),te.offsetX(te.getWidth()/2||0),te.offsetY(te.getHeight()/2+8||0);const Se=Math.atan2(be-ye,de-le)*(180/Math.PI);de<le?te.rotation(Se+180):te.rotation(Se)}}),this.layer.batchDraw())}}),d.on("dragend",Y=>{Y.evt&&Y.evt[this.actKey]||(this.isAutoTick&&this.simulation.alphaTarget(0),this.isDragging=!1)}),d.on("click",Y=>{Y.evt.detail===2?this.expandNodes(Y,r):Y.evt.detail===1&&Y.evt.button===0&&this.handleNodeClick(Y,r)}),d.on("contextmenu",Y=>{Y.cancelBubble=!0,Y.evt.preventDefault(),Y.evt.stopPropagation(),this.handleNodeContextMenu(Y,r,d)}),d.on("mouseup",Y=>this.handleNodeMouseUp(Y,r)),d.on("mousedown",Y=>this.handleNodeMouseDown(Y,r)),d.on("mouseenter",Y=>this.handleNodeMouseEnter(Y,r)),d.on("mouseleave",Y=>this.handleNodeMouseLeave(Y,r)),this.grab.add(d),this.nodesGroup[r.id]=d})),this.stage.batchDraw()},paintLinks(){const e=this.stage.width()/2,t=this.stage.height()/2;this.links.forEach(n=>{this.linksGroup[`${n.source.id}-${n.target.id}`]&&this.linksGroup[`${n.source.id}-${n.target.id}`].destroy();const r=new Ze.Group({opacity:1,id:`${n.source.id}-${n.target.id}`,visible:n.source.show&&n.target.show}),s=this.darkMode?"#445152":"#999",a=new Ze.Arrow({name:"linkArrow",pointerLength:10,pointerWidth:10,x:e,y:t,fill:s});r.add(a);const l=n.source.x||0,c=n.source.y||0,u=n.target.x||0,d=n.target.y||0,f=new Ze.Line({name:"konvaLine",id:`${n.source.id}-${n.target.id}`,points:[l,c,u,d],stroke:n.target.type==="org"?"#cf1322":s,strokeWidth:1,dash:n.diy===!0?[5,5]:null});if(n.edgeLabelProp){const p=n.edgeLabelProp.length>this.edgeLabelMaxLength?n.edgeLabelProp.substring(0,this.edgeLabelMaxLength)+"...":n.edgeLabelProp,g=new Ze.Text({name:"edgeLabel customEdgeLabel",x:(l+u)/2,y:(c+d)/2,text:p,fontSize:12,fill:this.darkMode?"#cdd9da":"#000"});r.add(g)}if(n.target.type==="nodeType"){const p=n.target.relay_name||n.target.name,g=new Ze.Text({name:"edgeLabel",x:(l+u)/2,y:(c+d)/2,text:p,fontSize:12,fill:this.darkMode?"#cdd9da":"#000"});r.add(g)}r.add(f),r.on("mouseenter",p=>this.handleLinkMouseEnter(p,n)),r.on("mouseleave",p=>this.handleLinkMouseLeave(p,n)),this.grab.add(r),r.moveToBottom(),this.linksGroup[`${n.source.id}-${n.target.id}`]=r}),this.stage.batchDraw()},updateSimulation(){var e,t;try{if(!this.simulation&&!this.hasSimulation){this.setSimulation();return}this.simulation.nodes(this.nodes),this.simulation.force("link").links(this.links),this.simulation.alpha(.4).restart(),this.history.layoutIndex===0?((e=this.nodes)==null?void 0:e.length)<this.manualTickNumber?this.simulation.on("tick",this.ticked):(this.simulation.on("tick",null),this.sendManualTick()):this.simulation.on("tick",this.ticked)}catch(n){console.log(n,"simulation-e1"),(t=this.simulation)==null||t.stop()}},ticked(){switch(vn("ticked"),this.history.layoutIndex){case 0:this.forceLayout();break;case 1:this.treeLayout();break;default:this.forceLayout();break}},forceLayout(){var t;if(!this.nodes.length||!this.links.length)return;let e=!0;for(let n=0;n<this.links.length;n++){const r=this.links[n],s=this.linksGroup[`${r.source.id}-${r.target.id}`],a=s==null?void 0:s.findOne(".konvaLine"),l=s==null?void 0:s.findOne(".linkArrow"),c=s==null?void 0:s.findOne(".edgeLabel");let u=r.source.x,d=r.source.y,f=r.target.x,p=r.target.y;const g=f-u||1,v=p-d||1,b=Math.sqrt(g*g+v*v),w=g/b||1,_=v/b||1,C=r.source.type==="nodeType"?(this.iconSizeComputed[r.source.icon]||14)/2-1:(this.iconSize[r.target.type]||14)/2-1,k=r.target.type==="nodeType"?(this.iconSizeComputed[r.target.icon]||14)/2-1:(this.iconSize[r.target.type]||14)/2-1;if(u=u+C*w,d=d+C*_,f=f-k*w,p=p-k*_,isNaN(u)||isNaN(d)||isNaN(f)||isNaN(p)){e=!1;break}if(a==null||a.points([u,d,f,p]),l){const S=Lh(u,d,f,p,y0);l==null||l.x((S==null?void 0:S.x)||0),l==null||l.y((S==null?void 0:S.y)||0),l==null||l.rotation(Math.atan2(p-d,f-u)*(180/Math.PI))}if(c){c.x((u+f)/2),c.y((d+p)/2),c.offsetX(c.getWidth()/2||0),c.offsetY(c.getHeight()/2+8||0);const S=Math.atan2(p-d,f-u)*(180/Math.PI);f<u?c.rotation(S+180):c.rotation(S)}}if(!e){vn("请点击自动布局按钮"),this.resetLayout();return}for(let n=0;n<this.nodes.length;n++){const r=this.nodes[n];(t=this.nodesGroup[r.id])==null||t.position({x:r.x||0,y:r.y||0})}},selectEdgesByNode(e){const t=e.map(n=>n.id);this.links.forEach(n=>{const r=this.linksGroup[`${n.source.id}-${n.target.id}`];t.includes(n==null?void 0:n.target.id)||t.includes(n==null?void 0:n.source.id)?r==null||r.addName("isSelected"):r==null||r.removeName("isSelected")})},showKeyWay(e){if(e.length!==1){this.links.forEach(r=>{const s=this.linksGroup[`${r.source.id}-${r.target.id}`];s==null||s.removeName("keyed")}),this.history.resetKeyLinksAndNodes();return}const{keyLinks:t,keyNodeIds:n}=this.history.findKeyLinksAndNodes(e[0].id,!0);this.links.forEach(r=>{const s=t.find(l=>l.source.id===r.source.id&&l.target.id===r.target.id),a=this.linksGroup[`${r.source.id}-${r.target.id}`];s?a==null||a.addName("keyed"):a==null||a.removeName("keyed")}),this.nodes.forEach(r=>{const s=this.nodesGroup[r.id];n.includes(r.id)?s==null||s.addName("keyed"):s==null||s.removeName("keyed")})},updateNodeStyle(){if(!this.iconAllLoaded)return;let e;this.nodesRange&&this.history.keyNodeIds?e=[...this.nodesRange.map(t=>t.id),...this.history.keyNodeIds]:this.nodesRange?e=this.nodesRange.map(t=>t.id):this.history.keyNodeIds&&(e=this.history.keyNodeIds),setTimeout(()=>{this.highlightByRule(this.highlightRule,e),this.updateNodesStyleByName(),this.updateLinksStyleByName()},0)},updateNodesStyleByName(){this.nodes.forEach(e=>{const t=this.nodesGroup[e.id];if(!t)return;const n=t==null?void 0:t.findOne(".border"),r=t==null?void 0:t.findOne(".konvaText"),s=this.darkMode?"#cdd9da":"#000";t!=null&&t.hasName("lowlight")?t==null||t.opacity(.4):t==null||t.opacity(1),t!=null&&t.hasName("isSelected")?(t.scale({x:8/7,y:8/7}),n==null||n.visible(!0)):(t.scale({x:1,y:1}),n==null||n.visible(!1)),e.type!=="nodeType"&&(t!=null&&t.hasName("isSelected")?(r==null||r.visible(!0),r==null||r.fill("#007ee2")):(r==null||r.visible(!!e.textProp),r==null||r.fill(s)))}),this.layer.batchDraw()},updateLinksStyleByName(){this.links.forEach(e=>{const t=this.linksGroup[`${e.source.id}-${e.target.id}`];if(!t)return;const n=t.findOne(".konvaLine"),r=t.findOne(".edgeLabel"),s=t.findOne(".linkArrow");t!=null&&t.hasName("lowlight")?t==null||t.opacity(.4):t==null||t.opacity(1);const a=this.darkMode?"#445152":"#999";if(t.hasName("isSelected")||t.hasName("keyed")){const l=e.target.type==="org"?"#cf1322":"#007ee2";n.stroke(l),s.fill(l),n.strokeWidth(1),t==null||t.opacity(1),r==null||r.fill("#007ee2"),t.hasName("keyed")?n.strokeWidth(3):n.strokeWidth(1)}else{const l=e.target.type==="org"?"#cf1322":a;this.linksGroup[`${e.source.id}-${e.target.id}`].removeName("isSelected"),n.strokeWidth(1),n.stroke(l),s.fill(l),r==null||r.fill(this.darkMode?"#cdd9da":"#000")}}),this.layer.batchDraw()},handleTableSelect(e=[]){this.selection=this.nodes.filter(t=>{let n;return e.length>1?n=e.indexOf(t.id)>=0&&t.type!=="nodeType"&&t.type!=="aggregation":n=e.indexOf(t.id)>=0,n}),this.updateSelection()},resetAll(){var e,t;document.removeEventListener("click",this.hideContextMenu),(e=this.simulation)==null||e.stop(),this.simulation=null,this.hasSimulation=!1,this.mousedownNode=null,this.mousedownPos=null,this.mouseupNode=null,this.$refs.canvasContainer&&((t=this.resizeObserver)==null||t.unobserve(this.$refs.canvasContainer)),this.nodes=[],this.links=[],this.resizeObserver=null,this.destroyed=!0,this.history.destroy&&this.history.destroy()},unbindKeyEvent(){this.initKeyEvent(1)},initKeyEvent(e=0){if(e){document.removeEventListener("keydown",this.keyDown),document.removeEventListener("keyup",this.keyUp);return}document.addEventListener("keydown",this.keyDown),document.addEventListener("keyup",this.keyUp),this.isKeyUp=!0},keyDown(e){const t=e.keyCode,n=e[this.actKey],r=e.shiftKey;if(this.isKeyUp)switch(t){case 17:break;case 16:this.toggleZoom(!1);break;case 38:break;case 40:this.goAction();break;case 67:if(window.getSelection().toString())return;n&&this.copyNodeText(this.selection);break;case 89:n&&!es()&&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(es())switch(n){case 17:break;case 16:this.toggleZoom(!0);break}else switch(t){case 17:break;case 16:this.toggleZoom(!0);break}this.isKeyUp=!0},initScript(){var r,s,a,l,c,u;if(!this.enableScript||this.scriptInited)return;((a=(s=(r=this.history)==null?void 0:r.dataNow)==null?void 0:s.nodes)==null?void 0:a.length)>0&&(this.scriptInited=!0);const e=["193.36.119.50","6cd7b91212983cc557c6e3e671734ff9"];let t=null;if((u=(c=(l=this.history)==null?void 0:l.dataNow)==null?void 0:c.nodes)==null||u.some(d=>{const f=e.indexOf(d.id);return f>=0&&d.startNode===!0&&(t=f),!0}),t===null)return;const n=[[{node:"193.36.119.50"},{node:"6cd7b91212983cc557c6e3e671734ff9"},{node:"http://9d1109ab.privatedns.org/download/FirefoxSetup.dll"},{node:"94.237.81.57"},{node:"chart.expocasheuro.com"}],[{node:"6cd7b91212983cc557c6e3e671734ff9"},{node:"http://9d1109ab.privatedns.org/download/FirefoxSetup.dll"},{node:"94.237.81.57"},{node:"chart.expocasheuro.com"},{node:"183.246.177.59"},{node:"e7db5b09a39e324d36e937d89f98fdb9122cd859"}]];this.scriptNow=n[t],this.canAct=!!this.scriptNow},goAction(){if(!this.scriptNow||this.actNum>(this.scriptNow.length-1)*2)return;if(this.actNum===(this.scriptNow.length-1)*2){this.centerAndZoom(),this.actNum++;return}const e=this.scriptNow[Math.floor(this.actNum/2)+1];if(this.actNum%2===0){if(!this.history.dataNow.nodes.some(t=>t.id===e.node))return;this.handleTableSelect(e.node),this.nodesMoveToCenterView([e.node]),this.actNum++}else this.$parent.expandNodes(this.selection[0]),setTimeout(()=>{this.nodesMoveToCenterView([this.selection[0].id])},100),this.actNum++},nodesMoveToCenterView(e,t=.9){if(e.length===0)return;const n=[],r=this.nodes.filter(k=>e.indexOf(k.id)>=0);r==null||r.forEach(function(k,S){const E=this.nodesGroup[k.id];n.push({bounds:(E==null?void 0:E.getClientRect())||{},fx:k.x||0,fy:k.y||0})});const s=this.getBounds(n);this.originTransform=this.originTransform={scaleX:this.stage.scaleX(),scaleY:this.stage.scaleY(),x:this.stage.x(),y:this.stage.y()};const a=this.stage.width(),l=this.stage.height()/1.5,c=s.width,u=s.height;if(c===0||u===0)return;let d=t/Math.max(c/a,u/l);d=Math.min(d,Pr)||Pr,this.scale=d;const f=this.stage.width()/(2*d),p=this.stage.height()/(2*d),g=this.nodesGroup[e[0]],v=g==null?void 0:g.getClientRect(),b=v.x*d,w=v.y*d,_=f-b,C=p-w;this.stage.setAttrs({scaleX:d,scaleY:d,x:_||0,y:C||0}),this.layer.batchDraw()},getBounds(e){let t,n,r,s;return e.map(a=>{const l=a.bounds,c=l.x+a.fx,u=l.y+a.fy;t=Math.min(c,t)||c,n=Math.min(u,n)||u,r=Math.max(c+l.width,r)||c+l.width,s=Math.max(u+l.height,s)||u+l.height}),{x:t,y:n,width:r-t,height:s-n}},resetMouseVars(){var e;this.mousedownNode=null,this.mousedownPos=null,this.mouseupNode=null,(e=this.dragLine)==null||e.destroy(),Object.keys(this.nodesGroup).forEach(t=>{this.nodesGroup[t].draggable(!0)})},loadCustomIcon(){if(this.customNodeImages&&!this.customIconLoaded){let e=0;const t=Object.keys(this.customNodeImages).length;Object.keys(this.customNodeImages).forEach(n=>Ne(this,null,function*(){e++,Wt[n]=yield xr(this.customNodeImages[n]),e===t&&(this.customIconLoaded=!0)}))}else this.customIconLoaded=!0},loadIcons(){return new Promise((e,t)=>{const n=[],r=[];for(const u in this.moduleDetail.plugs){const d=this.moduleDetail.plugs[u];d==null||d.map(f=>{f.children?r.push(...f.children):r.push(f)})}n.push(...r.map(u=>u.icon)),n.push(...this.moduleDetail.nodes.map(u=>u.name)),n.push("node_type"),n.push("node"),n.push("aggregation");const s=this;let a=0;const l=n.filter(u=>this.imgPath[`${s.prefix}d3svg1/${u}.svg`]);function c(u){return{}.VITE_SVG_TYPE==="base64"?v2(u):g2(u)}l.map(u=>{c(this.imgPath[`${s.prefix}d3svg1/${u}.svg`]).then(d=>{s.iconFiles[u]=d;const f=_D(d).width;this.iconSize[u]=this.nodeWidth?this.nodeWidth:f,a++,a===l.length&&(s.iconAllLoaded=!0,e())}).catch(d=>{console.log(d,"e"),t()})})})},toggleZoom(e){},handleNodeContextMenu(e,t){var n,r;e.evt&&e.evt[this.actKey]||(clearTimeout(this.popoverTimer),this.showPopover=!1,this.contextMenuId++,this.contextMenuNode=t,this.mousePosition.left=e.evt.clientX,this.mousePosition.top=e.evt.clientY,this.showContextMenu=!0,e.currentTarget.type==="aggregation"?this.menuOptions=cne: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){ve(this,"handle-select-node",{isSelected:!1,_node:o.toRaw(t)}),this.selection.length&&(this.selection=[],this.updateSelection()),this.setHighlightRule({}),this.hideContextMenu()},setHighlightRule({prop:e,type:t,value:n}){this.highlightRule={prop:e,type:t,value:n},this.updateNodeStyle(),t||hw(".legend-filter .out-box").classed("active",!1)},updateSelection(){const e=this.selection.map(t=>t.id);this.nodes.forEach(t=>{var n,r;e.includes(t.id)?(n=this.nodesGroup[t.id])==null||n.addName("isSelected"):(r=this.nodesGroup[t.id])==null||r.removeName("isSelected")}),ve(this,"updateSelection")},toggleLayout(e){this.history.layoutIndex=e,this.nodes.map(t=>{t.fx=t.fy=null}),this.updateSimulation(),this.ticked(),setTimeout(()=>{this.centerAndZoom()},200)},handleNodeClick(e,t){qt({cId:"handleNodeClick",c:"点击节点"}),this.canAct&&(t.type==="org"?window.open("http://bs.safe.360.net/starmap","__blank"):t.type==="nodeType"&&t.id.indexOf("org")>=0&&window.open("http://bs.safe.360.net/orglist?snapshot=true","__blank1")),this.hideContextMenu();const n=this.selection.some(s=>s.id===t.id);if(e.evt.shiftKey){if(t.type==="nodeType"||this.selection.some(s=>s.type==="nodeType"))return;n?this.selection=this.selection.filter(s=>s.id!==t.id):this.selection=[...this.selection,t]}else n?this.selection=[]:this.selection=[t];const r=this.selection.some(s=>s.id===t.id);ve(this,"handle-select-node",{isSelected:r,_node:t}),this.updateSelection(),this.setHighlightRule(this.highlightRule)},handleNodeMouseEnter(e,t){if(!this.showContextMenu&&!e.evt[this.actKey]){const n=e.target.width(),r=e.target.height(),s=e.target,a=s.getAbsolutePosition(),c=s.getStage().container().getBoundingClientRect(),u=a.x-n/2+c.left,d=a.y-r/2+c.top,f=u,p=d,g=f,v=f+n,b=p,w=p+r;this.hoverNodePosition={top:b,right:v,bottom:w,left:g,width:n,height:r},this.popoverType="node",this.popoverContent={[t.type]:t.id},this.popoverNode=t,this.popoverTimer&&clearTimeout(this.popoverTimer),this.popoverTimer=setTimeout(()=>{this.showPopover=!0},200)}},handleNodeMouseLeave(e,t){this.showContextMenu||(clearTimeout(this.popoverTimer),this.showPopover=!1)},handleNodeMouseUp(e,t){var n;e.evt[this.actKey]&&this.mousedownNode&&(this.dragLine&&((n=this.dragLine)==null||n.destroy()),this.mouseupNode=t,this.mouseupNode.id===this.mousedownNode.id||this.mouseupNode.type==="aggregation"||this.mousedownNode.type==="aggregation"||this.$parent.addLink(this.mousedownNode,this.mouseupNode)),this.resetMouseVars()},handleNodeMouseDown(e,t){if(e.evt[this.actKey]){this.mousedownNode=t,this.nodesGroup[t.id].draggable(!1);const n=this.stage.scaleX(),r=this.stage.getPointerPosition(),s=(r.x-this.stage.x())/n,a=(r.y-this.stage.y())/n;this.mousedownPos={x:s,y:a},this.dragLine=new Ze.Line({points:[s,a,s,a],stroke:"black",strokeWidth:1,dash:[5,5],opacity:.7,visible:!0}),this.layer.add(this.dragLine),this.stage.draw()}},handleLinkMouseEnter(e,t){if(t.target.type==="nodeType")return;const n=!!t.edgeLabelProp;let r;if(n?r=t.edgeLabelProp:r=t.target.relay_name||t.target.name,r.length<=this.edgeLabelMaxLength)return;const a=this.linksGroup[`${t.source.id}-${t.target.id}`].findOne(".edgeLabel"),l=t.source.x,c=t.source.y,u=t.target.x,d=t.target.y;a&&(a.text(r),a.x((l+u)/2),a.y((c+d)/2),a.offsetX(a.getWidth()/2||0),a.offsetY(a.getHeight()/2+8||0))},handleLinkMouseLeave(e,t){if(t.target.type==="nodeType")return;const n=!!t.edgeLabelProp;let r;if(n?r=t.edgeLabelProp:r=t.target.relay_name||t.target.name,r.length<=this.edgeLabelMaxLength)return;const a=this.linksGroup[`${t.source.id}-${t.target.id}`].findOne(".edgeLabel"),l=t.source.x,c=t.source.y,u=t.target.x,d=t.target.y;a&&(a.text(r.substring(0,this.edgeLabelMaxLength)+"..."),a.x((l+u)/2),a.y((c+d)/2),a.offsetX(a.getWidth()/2||0),a.offsetY(a.getHeight()/2+8||0))},treeLayout(){this.nodes.map(e=>{e.fx=e.pos,e.fy=e.levelNum*this.levelHeight}),this.forceLayout()},resetLayout(){var e,t;(e=this.simulation)!=null&&e.stop&&((t=this.simulation)==null||t.stop()),this.nodes.map(n=>{delete n.vx,delete n.vy,delete n.x,delete n.y,delete n.fx,delete n.fy}),this.updateSimulation()},selectSingleEdgeNode(e){const t=[];this.links.map(n=>{n.source.id===e.id&&t.push(n.target.id)});for(let n=t.length-1;n>=0;n--){let r=0,s=0;const a=t[n];this.links.map(l=>{l.source.id===a&&r++,l.target.id===a&&s++}),r>=1&&t.splice(n,1),s>=2&&t.splice(n,1)}return t},selectChildren(e){const t=[];this.links.map(n=>{n.source.id===e.id&&t.push(n.target.id)}),this.handleTableSelect(t)},selectParents(e){const t=[];this.links.map(n=>{n.target.id===e.id&&t.push(n.source.id)}),this.handleTableSelect(t)},handleGlobalContextMenu(e){this.mousePosition.left=e.evt.clientX,this.mousePosition.top=e.evt.clientY,this.menuOptions=[],this.showContextMenu=!0,this.showPopover=!1,this.contextMenuNode={},e.evt.preventDefault()},hideContextMenu(){this.showContextMenu=!1,this.contextMenuNode={}},centerAndZoom(e=.7,t=!1){var f,p,g;if(this.originTransform={scaleX:this.stage.scaleX(),scaleY:this.stage.scaleY(),x:this.stage.x(),y:this.stage.y()},!this.grab)return;const n=this.stage.width(),r=this.stage.height(),s=this.grab.getClientRect(),a=s.width/this.scale,l=s.height/this.scale;if(a===0||l===0)return;let c=e/Math.max(a/n,l/r);if(c=t?c:Math.min(c,Pr)||Pr,!t&&c>Pr)return;this.scale=c;const u=this.stage.width()/(2*c),d=this.stage.height()/(2*c);if((f=this.simulation)!=null&&f.force&&((p=this.simulation)==null||p.force("center",y_(u,d))),this.ticked(),this.stage.setAttrs({scaleX:c,scaleY:c,x:0,y:0}),this.layer.batchDraw(),this.history.layoutIndex===1){const v=this.grab.getClientRect(),b=(n-v.width)/2-v.x,w=(r-v.height)/2-v.y;this.stage.setAttrs({x:b,y:w}),this.layer.batchDraw(),(g=this.simulation)==null||g.stop()}},reset(){this.stage.setAttrs(this.originTransform)},handleContextMenuClick({nodes:e,api:t,dataApi:n}){if(this.requestGraphData){let r,s;const a={show_label:"label",all_show_label:"label",all_show_names:"name",show_names:"name"};switch(t&&t.name){case"edit_label":this.editLabel(e);break;case"single_edge_select":r=this.selectSingleEdgeNode(e[0]),this.selection=this.nodes.filter(l=>r.includes(l.id));break;case"hold_aggregation":s=this.selectSingleEdgeNode(e[0]),this.$parent.aggregationNodes(s,e[0]);break;case"release_aggregation":this.$parent.releaseAggregation(e[0]);break;case"show_label":case"show_names":e.map(l=>{l.textProp=a[t.name]}),this.update();break;case"all_show_label":case"all_show_names":this.nodes.map(l=>{l.textProp=a[t.name]}),this.update();break;case"un_show_names":case"un_show_label":e.map(l=>{l.textProp=null}),this.update();break;case"all_un_show_names":case"all_un_show_label":this.nodes.map(l=>{l.textProp=null}),this.update();break;case"all_show_edges_label":this.links.map(l=>{l.edgeLabelProp=l.edge_label}),this.update();break;case"all_hide_edges_label":this.links.map(l=>{l.edgeLabelProp=null}),this.update();break;case"copy":this.copyNodeText(e);break;case"node_star":e.map(l=>{this.starNode(l)});break;case"un_node_star":e.map(l=>{this.starNode(l,!1)});break;case"fix_nodes":e.map(l=>{this.toggleMove(l,!0)});break;case"un_fix_nodes":e.map(l=>{this.toggleMove(l,!1)}),this.updateSimulation();break;case"all_fix_nodes":this.fixAllNodes(!0);break;case"all_un_fix_nodes":this.fixAllNodes(!1);break;case"expand_node":e.map(l=>{this.$parent.expandNodes(l)});break;case"expand_part_node":e.map(l=>{this.$parent.expandNodes(l,n)});break;case"go_result":this.handleGoDetail(e);break;case"delete_node":this.$parent.deleteNodes(e);break;case"select_children":this.selectChildren(e[0]);break;case"select_parents":this.selectParents(e[0]);break;case"undo":this.$parent.historyBack();break;case"redo":this.$parent.historyForward();break;case"add_con_node":this.$parent.$refs.buttonList.addNode("diy",e[0]);break;case"add_link":this.$parent.$refs.buttonList.addNode("diy",e[0]);break;case"show_node":this.toggleShowNode(e[0],e[1],!0);break;case"hide_node":this.toggleShowNode(e[0],e[1],!1);break;case"show_nodes":this.toggleShowNodes(e,!0);break;case"hide_nodes":this.toggleShowNodes(e,!1);break;default:ve(this,"custom-contextmenu-click",{eventName:t.name,customConfig:t.customConfig,nodes:e,allNodes:o.toRaw(this.history.dataNow.nodes)})}this.hideContextMenu(),setTimeout(()=>{this.updateSelection()},400)}else Nt({message:"无可操作权限",type:"warning"})},expandNodes(e,t){qt({cId:"dblclick",c:"双击节点"}),this.requestGraphData?this.$parent.expandNodes(t):Nt({message:"无可操作权限",type:"warning"})},toggleShowNode(e,t,n=!0){this.history.toggleShowNode(e,null,n),this.selection.filter(s=>s.show).length>0||this.handleTableSelect([]),setTimeout(this.updateNodeStyle,100)},toggleShowNodes(e,t=!0){e.forEach(n=>{this.history.toggleShowNode(n,null,t)}),setTimeout(this.updateNodeStyle,100)},copyNodeText(e){let t="";e.filter(n=>n.type!=="aggregation"&&n.type!=="nodeType").map(n=>{t=t+n.id+`
|
|
140
|
+
`}),t&&dne(t).then(()=>{Nt({message:"复制成功",type:"success"})},n=>{console.log("copy---e",n)})},toggleMove(e,t){e.fx=t?e.x:null,e.fy=t?e.y:null},autoDisplay(){this.nodes.map(e=>{e.fx=null,e.fy=null})},editLabel(e){var t;l2.prompt("修改备注",{confirmButtonText:"确定",cancelButtonText:"取消",inputValue:(t=e[0])==null?void 0:t.label,inputPlaceholder:"请输入备注,最多20字",inputValidator:n=>n.length>20?"已超过20字":!0}).then(({value:n})=>{e.map(r=>{r.label=n,this.showLabel(r,"label")}),this.updateNodeStyle()}).catch(n=>{console.log(n)})},showLabel(e,t){e.textProp=t,this.update()},hideLabel(e,t){e.textProp=null,this.update()},safeGet(e,t){return!e||!t?void 0:t.split(".").reduce((s,a)=>s&&s[a]?s[a]:void 0,e)},fixAllNodes(e=!0){this.nodes.map(t=>{this.toggleMove(t,e)}),!e&&this.isAutoTick&&this.updateSimulation()},highlightByRule(e,t){if(!e.prop&&!t){this.nodes.forEach(c=>{const u=this.nodesGroup[c.id];u==null||u.removeName("lowlight")}),this.links.forEach(c=>{const u=this.linksGroup[`${c.source.id}-${c.target.id}`];u==null||u.removeName("lowlight")});return}const{type:n,prop:r,value:s}=e,a=this,l=[];this.nodes.forEach(c=>{const u=this.nodesGroup[c.id];r?n==="include"?s.includes(a.safeGet(c,r))&&a.inNodesRange(t,c)?(u==null||u.removeName("lowlight"),l.push(c)):u==null||u.addName("lowlight"):n==="equal"?a.safeGet(c,r)===s&&a.inNodesRange(t,c)?(u==null||u.removeName("lowlight"),l.push(c)):u==null||u.addName("lowlight"):n==="boolean"&&(Bh(a.safeGet(c,r))&&a.inNodesRange(t,c)?(u==null||u.removeName("lowlight"),l.push(c)):u==null||u.addName("lowlight")):a.inNodesRange(t,c)?(u==null||u.removeName("lowlight"),l.push(c)):u==null||u.addName("lowlight")}),this.links.forEach(c=>{const u=this.linksGroup[`${c.source.id}-${c.target.id}`];l.some(f=>f.id===c.target.id)?u==null||u.removeName("lowlight"):u==null||u.addName("lowlight")})},handleCustomSelect(e){if(this.handleDeselectNode(),!e.prop)return;const{type:t,prop:n,value:r}=e,s=this;this.nodes.forEach(a=>{if(n&&t==="include"){let l;if(a.type==="nodeType"){const c=s.safeGet(a,"parents"),u=s.safeGet(a,"children"),d=c==null?void 0:c.some(p=>r.includes(p)),f=u==null?void 0:u.some(p=>r.includes(p));l=d&&f}(r.includes(s.safeGet(a,n))||l)&&this.selection.push(a)}}),this.updateSelection()},inNodesRange(e,t){return e?e.some(n=>n===t.id):!0},loadFlagFiles(e){return Ne(this,null,function*(){return new Promise(t=>{this.flagFiles[e]?t(this.flagFiles[e]):(this.flagFiles[e]=this.imgPath[`${this.prefix}d3svg1/flags/${e}.png`],t(this.flagFiles[e]))})})},getNodeImage(e){return Ne(this,null,function*(){var s,a,l,c,u,d,f,p,g,v,b,w;let t=null;const n=(l=(a=(s=e.detail)==null?void 0:s.info)==null?void 0:a.basic)==null?void 0:l.flag,r=(d=(u=(c=e==null?void 0:e.detail)==null?void 0:c.info)==null?void 0:u.basic)==null?void 0:d.level;if(this.customNodeImages&&this.customNodeImages[e.type]){if(Wt[e.type])return Wt[e.type];t=yield xr(this.customNodeImages[e.type]),Wt[e.type]=t}else if(e.detail&&((p=(f=e.detail)==null?void 0:f.info)!=null&&p.icon_img))try{t=yield xr(e.detail.info.icon_img)}catch(_){console.log("loadCompleted error",_)}else if(e.detail&&((v=(g=e.detail)==null?void 0:g.info)!=null&&v.inner_img))try{t=yield xr(e.detail.info.inner_img)}catch(_){console.log("loadCompleted error",_)}else if(e.type==="nodeType"||e.type==="aggregation"){if(e!=null&&e.icon_img)try{return t=yield xr(e.icon_img),t}catch(C){console.log("loadCompleted error",C)}const _=e.icon||"node_type";if(Wt[_])return t=Wt[_],t;t=this.iconFiles[_]?this.iconFiles[_]:this.iconFiles.node_type,t=yield xr("data:image/svg+xml,"+encodeURIComponent(t)),Wt[_]=t}else if(n&&(e.type==="ip"||e.type==="internet")){if(Wt[n])return t=Wt[n],t;yield this.loadFlagFiles(n),t=yield xr(this.flagFiles[n]),Wt[n]=t}else if((w=(b=e.detail)==null?void 0:b.info)!=null&&w.inner_country&&(e.type==="country"||e.type==="target_country")){const _=e.detail.info.inner_country;if(Wt[_])return t=Wt[_],t;yield this.loadFlagFiles(_),t=yield xr(this.flagFiles[_]),Wt[_]=t}else{const _=`${e.type||"node"}${r}${this.darkMode}`;if(Wt[_])return t=Wt[_],t;t=this.iconFiles[e.type]?this.iconFiles[e.type]:this.iconFiles.node;const C=ao(r,this.levelList,this.darkMode),k=this.darkMode?"#182628":"#fff";t=m2(t,C,k);try{t=yield xr("data:image/svg+xml,"+encodeURIComponent(t))}catch(S){console.log(S)}Wt[_]=t}return t})},handleGoDetail(e){e.forEach(t=>{if(t.isCluster)return;const n=t.type,r=this.moduleDetail.config.jumpRule[n];if(r)if(n==="org"){const s=t.id.split("(")[0];s.indexOf("APT")>=0&&window.open(r.split("${id}").join(s),t.id)}else{let s=t.origin&&t.origin[0]||t.id;(n==="url"||n==="virus")&&(s=encodeURIComponent(s)),window.open(r.split("${id}").join(s),t.id)}})},starNode(e,t=!0){e.collect=t,this.update()},handleAddBlack(e){this.showBlackType=!0,this.node=e},changeVisible(e){this.showBlackType=e},zoomIn(){this.adjustZoom(1.1)},zoomOut(){this.adjustZoom(.909)},adjustZoom(e){const n=this.stage.scaleX()*e;this.scale=n;const r={x:this.stage.width()/2,y:this.stage.height()/2},s={x:this.stage.getPointerPosition().x-this.stage.x(),y:this.stage.getPointerPosition().y-this.stage.y()},a={x:-(s.x-r.x)*(e-1),y:-(s.y-r.y)*(e-1)};this.stage.setAttrs({x:this.stage.x()+a.x,y:this.stage.y()+a.y,scaleX:n,scaleY:n}),this.layer.batchDraw()},addNodesDetail(e){return Ne(this,null,function*(){const t=e.filter(s=>!s.detail&&s.noDetail!==!0&&s.type!=="aggregation"&&s.type!=="nodeType"),n={};t.map(s=>{n[s.type]?n[s.type].push(s):n[s.type]=[s]});const r=[];for(const s in n){const a=n[s],l={};a.map(c=>{c.origin&&(l[c.id]=c.origin)}),r.push(this.graphApi.getNodesDetail({api:this.moduleDetail.node_info[n[s][0].type],node_id:n[s].map(c=>c.id),origin:l}).then(c=>(c.data.records.map(d=>{const f=e.find(p=>p.id===d.info.id);f.detail=d}),Promise.resolve({}))))}})},addCanvasBg(){this.darkMode&&(this.darkBgRect=new Ze.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()}}},pne={class:"main-svg-box","element-loading-text":"布局中...","element-loading-background":"rgba(122, 122, 122)"},gne={ref:"canvasContainer",class:"canvas-container"};function mne(e,t,n,r,s,a){const l=o.resolveComponent("popover"),c=o.resolveComponent("node-contextmenu"),u=o2;return o.openBlock(),o.createElementBlock("div",{class:o.normalizeClass(["render-container",n.darkMode?"dark-theme "+s.uniqueClass:" "+s.uniqueClass])},[o.withDirectives((o.openBlock(),o.createElementBlock("div",pne,[o.createElementVNode("div",gne,null,512)])),[[u,s.ticking]]),o.createVNode(l,{"dark-mode":n.darkMode,"show-popover":s.showPopover&&!s.isDragging,"mouse-position":s.hoverNodePosition,"node-info":s.popoverNode,"module-detail":n.moduleDetail,type:s.popoverType,"custom-tooltip":n.customTooltip,history:n.history,data:n.history.dataNow},null,8,["dark-mode","show-popover","mouse-position","node-info","module-detail","type","custom-tooltip","history","data"]),n.isThreatPath?o.createCommentVNode("",!0):(o.openBlock(),o.createBlock(c,{key:0,show:a.showContextMenuFlag,axis:s.mousePosition,"node-info":a.contextMenuNodes,history:n.history,"menu-options":s.menuOptions,"module-detail":n.moduleDetail,onContextmenuClick:a.handleContextMenuClick},null,8,["show","axis","node-info","history","menu-options","module-detail","onContextmenuClick"]))],2)}const Ms=_t(hne,[["render",mne]]),Zse="",Vse="",eae="",{toClipboard:u5}=Ac(),vne={name:"SnapShotDialog",components:{},mixins:[],props:{snapshot:{type:Object,default:()=>{}},graphApi:{type:Object,default:()=>{}}},data(){return{dialogVisible:!1,origin:window.location.origin,ruleForm:{radio:"0",event:"",group:"",graphDesc:""},rules:{event:[{required:!0,message:"请选择安全事件",trigger:"change"}],group:[{required:!1,message:"请选择团队",trigger:"change"}]},eventOptions:[{value:"",label:""}],groupOptions:[{value:"",label:""}],hostList:["https://sc.360.net","https://sc.b.qihoo.net","http://sec.test.safe.qihoo.net"],isInnerAccount:!1,visibleSuccess:!1,eventUrl:null}},computed:{},watch:{snapshot:{handler:function(e,t){e.name&&(this.ruleForm.graphDesc=e.name)},immediate:!0,deep:!0}},mounted(){this.graphApi.getReportList&&this.graphApi.getReportList().then(e=>{e.data!==null&&(this.eventOptions=[],e.data.map(t=>{this.eventOptions.push({label:t.title,value:t.report_id})}))}),this.graphApi.getGroupList&&this.graphApi.getGroupList().then(e=>{e.data!==null?(this.groupOptions=[],e.data.map(t=>{this.groupOptions.push({label:t.group_name,value:t.group_id})}),this.isInnerAccount=!0):this.isInnerAccount=!1})},updated(){},beforeUnmount(){},methods:{hanleClickCopy(e){u5(e).then(t=>Nt({message:"复制成功",type:"success"}),t=>Nt.error("复制失败"))},show(){this.dialogVisible=!0},hide(){this.dialogVisible=!1,this.resetForm("ruleForm")},submitForm(e){this.$refs[e].validate(t=>{if(t){const n=this.hostList.some(c=>c===this.origin);let r=null;n?this.origin===this.hostList[1]?r=`${this.hostList[0]}/graph?snapshot_id=${this.snapshot.snapshot_id}&vcode=${this.snapshot.vcode}`:r=`${this.origin}/graph?snapshot_id=${this.snapshot.snapshot_id}&vcode=${this.snapshot.vcode}`:r=`http://test.sec.360.net/graph?snapshot_id=${this.snapshot.snapshot_id}&vcode=${this.snapshot.vcode}`,this.eventUrl=window.location.origin+"/event/"+this.ruleForm.event;const s=this.snapshot.thumb;let a=null;this.groupOptions.map(c=>{c.value===this.ruleForm.group&&(a=c.label)});const l={report_id:this.ruleForm.event,group_id:this.ruleForm.group,content:s,graph_url:r,group_name:a,acl:parseInt(this.ruleForm.radio),head:this.ruleForm.graphDesc};this.graphApi.addGraph(l).then(c=>{c.code==="0"?(u5(this.eventUrl),Nt({message:"分享成功! 分享事件地址已经复制",type:"success",showClose:!0,duration:5e3})):Nt({message:"分享失败",type:"error"})}).catch(()=>{Nt({message:"分享失败",type:"error"})}),this.resetForm(e),this.dialogVisible=!1}else return!1})},resetForm(e){this.$refs[e].resetFields(),this.snapshot.name=""}}},yne={class:"sharetoEvents"},bne={class:"lable-header"},wne={class:"desc"},_ne={key:0,class:"desc-font"},Cne={key:1,class:"desc-font"},Sne={class:"dialog-footer"};function Ene(e,t,n,r,s,a){const l=XB,c=vc,u=mc,d=Wf,f=mi,p=Gf,g=no,v=xa;return o.openBlock(),o.createElementBlock("div",yne,[o.createVNode(v,{title:"分享到安全事件","append-to-body":"","close-on-click-modal":!1,width:"25%",modelValue:s.dialogVisible,"onUpdate:modelValue":t[6]||(t[6]=b=>s.dialogVisible=b),class:"el-dialog-graph"},{footer:o.withCtx(()=>[o.createElementVNode("span",Sne,[o.createVNode(g,{type:"primary",onClick:t[5]||(t[5]=b=>a.submitForm("ruleForm"))},{default:o.withCtx(()=>t[9]||(t[9]=[o.createTextVNode("确认分享")])),_:1}),o.createVNode(g,{onClick:a.hide},{default:o.withCtx(()=>t[10]||(t[10]=[o.createTextVNode("关闭")])),_:1},8,["onClick"])])]),default:o.withCtx(()=>[o.createVNode(p,{ref:"ruleForm",model:s.ruleForm,rules:s.rules,"label-width":"100px",class:"demo-ruleForm"},{default:o.withCtx(()=>[o.createElementVNode("div",bne,[o.createVNode(l,{modelValue:s.ruleForm.radio,"onUpdate:modelValue":t[0]||(t[0]=b=>s.ruleForm.radio=b),class:"el-radio",label:"1",border:"",size:"medium"},{default:o.withCtx(()=>t[7]||(t[7]=[o.createTextVNode("付费可见")])),_:1},8,["modelValue"]),o.createVNode(l,{modelValue:s.ruleForm.radio,"onUpdate:modelValue":t[1]||(t[1]=b=>s.ruleForm.radio=b),label:"0",border:"",size:"medium"},{default:o.withCtx(()=>t[8]||(t[8]=[o.createTextVNode("开放")])),_:1},8,["modelValue"]),o.createElementVNode("div",wne,[s.ruleForm.radio==="0"?(o.openBlock(),o.createElementBlock("span",_ne,"该Graph内容对所有用户可见。")):(o.openBlock(),o.createElementBlock("span",Cne,"该Graph内容对付费用户可见。"))])]),o.createVNode(d,{label:"安全事件",prop:"event"},{default:o.withCtx(()=>[o.createVNode(u,{modelValue:s.ruleForm.event,"onUpdate:modelValue":t[2]||(t[2]=b=>s.ruleForm.event=b),"popper-append-to-body":!1,filterable:"",placeholder:"请选择",class:"select-item"},{default:o.withCtx(()=>[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(s.eventOptions,b=>(o.openBlock(),o.createBlock(c,{key:b.value,label:b.label,value:b.value},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])]),_:1}),s.isInnerAccount?(o.openBlock(),o.createBlock(d,{key:0,label:"选择团队",prop:"group"},{default:o.withCtx(()=>[o.createVNode(u,{modelValue:s.ruleForm.group,"onUpdate:modelValue":t[3]||(t[3]=b=>s.ruleForm.group=b),class:"select-item",filterable:"",placeholder:"请选择"},{default:o.withCtx(()=>[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(s.groupOptions,b=>(o.openBlock(),o.createBlock(c,{key:b.value,label:b.label,value:b.value},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])]),_:1})):o.createCommentVNode("",!0),o.createVNode(d,{label:"Graph介绍",prop:"graphDesc"},{default:o.withCtx(()=>[o.createVNode(f,{modelValue:s.ruleForm.graphDesc,"onUpdate:modelValue":t[4]||(t[4]=b=>s.ruleForm.graphDesc=b),type:"textarea",rows:2,placeholder:"请输入内容",maxlength:"50",clearable:""},null,8,["modelValue"])]),_:1})]),_:1},8,["model","rules"])]),_:1},8,["modelValue"])])}const xne=_t(vne,[["render",Ene]]),tae="",{toClipboard:kne}=Ac(),Nne={name:"SnapShotDialog",components:{ShareToSecurityEvents:xne},mixins:[],props:{customCopyPathFn:{type:Function},graphUrlPath:{type:String,default:"/graph"},snapshot:{type:Object,default:()=>{}},graphApi:{type:Object,default:()=>{}}},data(){return{dialogVisible:!1,origin:window.location.origin,isInnerAccount:!1}},computed:{linkAddress(){return this.customCopyPathFn&&typeof this.customCopyPathFn=="function"?this.customCopyPathFn({snapshot_id:this.snapshot.snapshot_id}):`${this.origin}${this.graphUrlPath}?snapshot_id=${this.snapshot.snapshot_id}`},linkAddressAndCode(){return this.customCopyPathFn&&typeof this.customCopyPathFn=="function"?this.customCopyPathFn({snapshot_id:this.snapshot.snapshot_id,vcode:this.snapshot.vcode}):`${this.linkAddress}&vcode=${this.snapshot.vcode}`}},watch:{},created(){},mounted(){Si(Re,"sharePermission",e=>{this.isInnerAccount=e})},updated(){},beforeUnmount(){Ei(Re,"sharePermission")},methods:{hanleClickCopy(e){kne(e).then(t=>Nt({message:"复制成功",type:"success"}),t=>Nt.error("复制失败"))},show(){this.dialogVisible=!0},hide(){this.dialogVisible=!1},shareToEvents(){this.dialogVisible=!1,this.$refs.sharetoevents.show()}}},Tne={class:"snapshotdialog-container"},Ane={class:"dialog-footer"};function One(e,t,n,r,s,a){const l=mi,c=bL,u=no,d=xa,f=o.resolveComponent("ShareToSecurityEvents");return o.openBlock(),o.createElementBlock("div",Tne,[o.createVNode(d,{modelValue:s.dialogVisible,"onUpdate:modelValue":t[2]||(t[2]=p=>s.dialogVisible=p),title:"复制链接及提取码","append-to-body":"","close-on-click-modal":!1,class:"el-dialog-graph"},{footer:o.withCtx(()=>[o.createElementVNode("span",Ane,[s.isInnerAccount?(o.openBlock(),o.createBlock(u,{key:0,type:"primary",onClick:t[0]||(t[0]=p=>a.shareToEvents())},{default:o.withCtx(()=>t[5]||(t[5]=[o.createTextVNode("分享到安全事件")])),_:1})):o.createCommentVNode("",!0),o.createVNode(u,{type:"primary",onClick:t[1]||(t[1]=p=>a.hanleClickCopy(a.linkAddressAndCode))},{default:o.withCtx(()=>t[6]||(t[6]=[o.createTextVNode("复制链接及提取码")])),_:1}),o.createVNode(u,{onClick:a.hide},{default:o.withCtx(()=>t[7]||(t[7]=[o.createTextVNode("关闭")])),_:1},8,["onClick"])])]),default:o.withCtx(()=>[o.createVNode(l,{value:a.linkAddress,readonly:""},{prepend:o.withCtx(()=>t[3]||(t[3]=[o.createTextVNode("链接地址:")])),_:1},8,["value"]),o.createVNode(c),o.createVNode(l,{value:n.snapshot.vcode,readonly:""},{prepend:o.withCtx(()=>t[4]||(t[4]=[o.createTextVNode("提取码:")])),_:1},8,["value"])]),_:1},8,["modelValue"]),o.createVNode(f,{ref:"sharetoevents",snapshot:n.snapshot,"graph-api":n.graphApi},null,8,["snapshot","graph-api"])])}const Ine=_t(Nne,[["render",One]]),nae="",Bne={name:"ForceGraphByCanvas",components:{Loading:Mo,ForceGraphSvgIcon:so,RenderByCanvas:Ms,ButtonList:Tj,SnapShotDialog:Ine,RightMenu:JF,Legend:Yz,NodeVisibleControl:eU},mixins:[kr],provide:function(){return{history:this.history,hasLevel:this.hasLevel,levelList:this.levelList,levelMap:this.levelMap,getDarkMode:()=>this.darkMode,requestGraphData:this.requestGraphData,moduleDetail:()=>this.moduleDetail}},props:{showPoint:{type:Boolean,default:!0},isRenderStartNode:{type:Boolean,default:!0},isDefaultSelectStartNode:{type:Boolean,default:!0},isShowRightMenu:{type:Boolean,default:!0},hideButtonList:{type:Array,default:()=>[]},showTopSearch:{type:Boolean,default:!1},customContextMenuEvent:{type:Function},handleSelectNodeEvent:{type:Function},handleDataLoaded:{type:Function},graphApi:{type:Object,default:()=>{}},graphUrlPath:{type:String,default:"/graph"},customCopyPathFn:{type:Function},snapshot_id:{type:String,default:""},vcode:{type:String,default:""},module:{type:String,default:""},startNode:{type:Array,default:()=>[]},enterStartNode:{type:Boolean,default:!1},hasLevel:{type:Boolean,default:!0},levelList:{type:Array,default:()=>[{level:"未知",levelName:"未知",className:"unknown",iconType:"",normalColor:"#666",darkColor:"#c6cdd5",dangerNumber:0},{level:"危险",levelName:"危险",className:"warn",iconType:"",normalColor:"#CF1322",darkColor:"#fb2400",dangerNumber:1},{level:"普通",levelName:"普通",className:"normal",iconType:"",normalColor:"#007EE2",darkColor:"#0094ff",dangerNumber:-1},{level:"安全",levelName:"安全",className:"safe",iconType:"",normalColor:"#009A75",darkColor:"#00da90",dangerNumber:-2}]},showLevelCount:{type:Boolean,default:!1},darkMode:{type:Boolean,default:!1},title:{type:String,default:""},isShowNodeMessage:{type:Boolean,default:!0},nodeWidth:{type:Number},startNodeWidth:{type:Number},linkDistance:{type:Number},strength:{type:Number},nodeTypeScale:{type:Number},singlesNodeMaxNum:{type:Number,default:100},startNodeAnimation:{type:Boolean,default:!0},customTooltip:{type:Function},enableScript:{type:Boolean,default:!1},edgeLabelMaxLength:{type:Number,default:10},hasNodeVisibleControl:{type:Boolean,default:!1},hasLegend:{type:Boolean,default:!0},customNodeImages:{type:Object,default:()=>{}},isShowNodeType:{type:Boolean,default:!0}},emits:["sharePermission","custom-contextmenu-click","handle-select-node","handle-data-loaded","outdate"],data(){return{history:new lD({isShowNodeMessage:this.isShowNodeMessage}),isLoading:!1,bigLoading:!1,loadingInfo:"数据加载中",moduleDetail:{},contextMenuNode:{},contextMenuId:0,isDragging:!1,isCtrlDown:!1,selection:[],snapshot:{},inited:!1,outdateTime:0,fullScreen:!1,generateUniqueIndexNow:this.generateUniqueIndex(),screenHeight:0,margin:"0",requestGraphData:!0,nodeTypeList:[]}},computed:{topFrame(){return window.top.location===window.location},levelMap(){const e={};return this.levelList.forEach(t=>{e[t.level]=t}),e}},watch:{startNode:{handler:function(e,t){this.moduleDetail.module&&this.searchStartNode()},immediate:!0,deep:!0},screenHeight:{deep:!0,handler:function(){this.margin=this.changeMargin()}},graphApi:{handler:function(){this.$nextTick(()=>{this.initializeGraphApi()})},deep:!0,immediate:!0}},unmounted(){window.onresize=null},mounted(){return Ne(this,null,function*(){console.log('"2024/11/15 09:51:11"',"2024/11/15 09:51:11"),this.initializeGraphApi(),window.onresize=()=>{this.fullScreen=!!document.fullscreenElement,this.screenHeight=document.body.clientHeight},this.margin=this.changeMargin(),Si(Re,"emitDataLoaded",()=>{this.emitDataLoaded()})})},methods:{initializeGraphApi(){if(this.graphApi){if(this.snapshot_id)this.isLoading=!0,this.graphApi.getSnapshotDetail({snapshot_id:this.snapshot_id,vcode:this.vcode}).then(e=>{this.moduleDetail=e.data.config,this.history.initFromSnapshot(JSON.parse(e.data.data)),setTimeout(()=>{this.$refs.render.updateNodeStyle(),this.centerAndZoom(.8,!1)},1e3)}).catch(e=>{console.log(e,"e")}).finally(e=>{this.isLoading=!1});else if(this.module)this.initGraph();else{Nt.error("请传入模块名称");return}this.graphApi.userInfo&&this.graphApi.userInfo().then(e=>{e.data!==null&&(ve(Re,"sharePermission",e.data.access.graph_share),this.requestGraphData=e.data.access.request_graph_data)}).catch(e=>{this.onOutdate(e.res)})}},handleCustomContextMenuClick(e){this.customContextMenuEvent&&typeof this.customContextMenuEvent=="function"?this.customContextMenuEvent(o.toRaw(e)):ve(this,"custom-contextmenu-click",o.toRaw(e))},handleSelectNode(e){this.handleSelectNodeEvent&&typeof this.handleSelectNodeEvent=="function"?this.handleSelectNodeEvent(o.toRaw(e),o.toRaw(this.history.dataNow)):ve(this,"handle-select-node",o.toRaw(e))},searchStartNode(){this.startNode.length>0&&!this.inited&&this.startNode.map(e=>{const t={type:e.type,id:e.id,startNode:!0};this.inited=!0,this.moduleDetail.nodes.findIndex(n=>e.type===n.name)>=0?this.addNewNodesAndExpand(t):(Nt({message:"无相关数据",type:"warning"}),this.emitDataLoaded())})},initGraph(){return Ne(this,null,function*(){var e;vn("initGraph"),(e=this.graphApi)==null||e.getGraphConfig({name:this.module}).then(t=>{const n=t.data||{},r=kc(n==null?void 0:n.node_info),s=(n==null?void 0:n.nodes)||[];s.forEach(l=>{l.name=l.name.toLowerCase()});const a=kc(n==null?void 0:n.plugs);n.node_info=r,n.nodes=s,n.plugs=a,this.moduleDetail=n,this.searchStartNode(),!this.inited&&this.enterStartNode&&this.$refs.buttonList.addNode("search")}).catch(t=>{this.onOutdate(t.res),this.emitDataLoaded(),console.log("e",t)})})},addNewNodesAndExpand(e){this.isLoading=!0,this.graphApi.getNodesDetail({api:this.moduleDetail.node_info[e.type],node_id:[e.id],nodeType:e.type,moduleDetail:this.moduleDetail}).then(t=>{var s,a,l;let n={id:(s=t.data.records[0])==null?void 0:s.info.id,type:(a=t.data.records[0])==null?void 0:a.info.type,startNode:!0,detail:t.data.records[0],group:e.id,name:((l=t.data.records[0])==null?void 0:l.info.name)||e.id};n=Qr(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),Nt({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++,ve(this,"outdate"))},expandNodes(e,t){return Ne(this,null,function*(){if(!(e!=null&&e.type))return;const n=this.moduleDetail.plugs[e==null?void 0:e.type];let r=[];t?(r=Array.isArray(t)?[...t]:[t],e.apis===void 0&&(e.apis=[]),e.apis.push(...r)):(e.expand=1,e.apis=[],e.apis.push({namec:"拓线全部",value:0,name:"",flagSelect:!0}),n==null||n.map(d=>{d.children?r.push(...d.children):r.push(d)}));const s=r.map(d=>this.graphApi.getGraphRequest({api:d.name,node_id:e.id,origin:e.origin,nodeType:e.type,moduleDetail:this.moduleDetail}).then(f=>Promise.resolve(fe(ne(ne({},f),d),{api:d.name,apiC:d.relay_name,icon:d.icon,note_name:d.note_name,icon_img:d.icon_img,canLoop:d.canloop,showTotal:d.show_total}))).catch(f=>Promise.resolve(f)));this.isLoading=!0;let a;yield Promise.all(s).then(d=>{if(d.some(p=>{var g;return((g=p.res)==null?void 0:g.code)==="AC100001"})){this.onOutdate({code:"AC100001"});return}a=d.filter(p=>p.code==="0"||p.code===0)}).catch(d=>{console.log(d,"e")}).finally(d=>{this.isLoading=!1});const l=[];let c=[];if(a&&a.forEach(d=>{var S;if(e.getData[d.api]=!0,this.history.dataNow.nodes.find(N=>N.id===e.id)&&(this.history.dataNow.nodes.find(N=>N.id===e.id).getData[d.api]=!0),!d.data)return;let f;const p=(S=d.data.nodes||[])==null?void 0:S.map(N=>(N.group=e.id+"-"+d.api,N.groupC=d.apiC,N=Qr(N,this.moduleDetail.plugs),N));if(!this.isShowNodeType){f=d.data.links||[],l.push(...d.data.nodes||[]),c.push(...f||[]);return}const g=e.id+"-"+d.api;let v={id:g,name:d.apiC,note_name:d.note_name,type:"nodeType",icon:d.icon,showTotal:d.showTotal,icon_img:d.icon_img};const E=d,{code:b,msg:w,data:_}=E,C=fi(E,["code","msg","data"]);v=ne(ne({},C),v);const k={source:e.id,target:g};if(v=Qr(v,this.moduleDetail.plugs),this.nodeTypeList.push(d.icon||"node_type"),p.length>0&&this.isRenderStartNode){if(f=(d.data.links||[]).map(N=>{let A;if(N.source===e.id){const I=this.history.dataNow.nodes.filter(O=>O.id===N.target);if(I.length>0&&(A=this.findGrandSonNodeIds(I[0]).indexOf(N.source)>=0),!d.api.canLoop&&A)return;N.source=g}else N.target===e.id&&(N.target=g);return N.edgeLabelProp=N.edge_label,N}).filter(N=>N),f.length===0)return;f.push(k)}else f=d.data.links||[];if(this.isRenderStartNode&&p.length>=this.singlesNodeMaxNum){let N=null,A=null;const I=String(Math.floor(new Date().getTime()));N={id:I,list:p,type:"aggregation",name:"聚合",relationId:v.id},N=Qr(N,this.moduleDetail.plugs),A={source:v.id,target:I,uniqueIndex:this.generateUniqueIndexNow()};const O={addOne:{nodes:[v,N],links:[k,A]},type:"aggregation"};this.history.pushState(O),this.getNodeDetail(N.list,N.id)}else f.length&&this.isRenderStartNode&&p.push(v),l.push(...p||[]),c.push(...f||[])}),!this.isRenderStartNode){const d={},f={},p=[];this.nodeTypeList.push("node_type"),c.forEach(g=>{const v=g.source+"-"+g.name;if(!d[v]){let b={id:v,name:g.name,type:"nodeType",icon:g.feature.icon};b=Qr(b,this.moduleDetail.plugs),d[v]=b}f[v]?f[v].push(g):f[v]=[g]});for(const g in d)l.push(d[g]);for(const g in f)f[g].forEach(b=>{const w=fe(ne({},b),{source:b.source,target:g}),_=fe(ne({},b),{source:g,target:b.target});p.push(w),p.push(_)});c=p}c.map(d=>{d.uniqueIndex=this.generateUniqueIndexNow()});const u={addOne:{nodes:l,links:c}};(l.length>0||c.length>0)&&this.history.pushState(u),this.history.length===2&&setTimeout(()=>{this.centerAndZoom(.8,!1)},1e3),this.getNodeDetail(l)})},findGrandSonNodeIds(e){return this.history.dataNow.nodes.filter(r=>{var s;return((s=e.children)==null?void 0:s.indexOf(r.id))>=0}).reduce((r,s)=>(r.push(...s.children||[]),r),[])||[]},centerAndZoom(e,t){var n;(n=this.$refs.render)==null||n.centerAndZoom(e,t)},generateUniqueIndex(){let e=0;return function(){return e++}},reset(){this.$refs.render.reset()},getNodeDetail(e,t){const r=this.history.dataNow.nodes.filter(l=>e.findIndex(c=>c.id===l.id)>=0).filter(l=>!l.detail&&l.noDetail!==!0&&l.type!=="aggregation"&&l.type!=="nodeType"),s={};r.map(l=>{s[l.type]?s[l.type].push(l):s[l.type]=[l]});let a=Object.keys(s).length;for(const l in s){const c=s[l],u={};c.map(d=>{d.origin&&(u[d.id]=d.origin)}),this.graphApi.getNodesDetail({api:this.moduleDetail.node_info[s[l][0].type],node_id:s[l].map(d=>d.id),origin:u,nodeType:s[l][0].type,moduleDetail:this.moduleDetail}).then(d=>{const f=d.data.records;t?this.history.updateAggregationDetail(f,s[l].map(p=>p.id),t):this.history.updateData(f,s[l].map(p=>p.id))}).catch(d=>{this.onOutdate(d.res)}).finally(()=>{a=a-1,a===0&&(vn(" 数据加载完"),this.emitDataLoaded())})}Object.keys(s).length||this.emitDataLoaded()},emitDataLoaded(){this.handleDataLoaded&&typeof this.handleDataLoaded=="function"?this.handleDataLoaded({dataNow:o.toRaw(this.history.dataNow)}):ve(this,"handle-data-loaded",{dataNow:o.toRaw(this.history.dataNow)})},addNode({node:e,type:t,connectNode:n}){if(this.history.dataNow.nodes.findIndex(a=>a.id===e.id)>-1){Nt({type:"warning",message:"该节点已存在,添加失败"});return}let s;if(t==="diy"&&e.type==="nodeType"){let a=fe(ne({},e),{detail:null,diy:!0,group:e.id});a=Qr(a,this.moduleDetail.plugs);const l=n?{source:n.id,target:e.id,uniqueIndex:this.generateUniqueIndexNow()}:null;s={addOne:{nodes:[a],links:l?[l]:[]}},this.history.pushState(s)}else t==="diy"?this.graphApi.getNodesDetail({api:this.moduleDetail.node_info[e.type],node_id:[e.id],nodeType:e.type,moduleDetail:this.moduleDetail}).then(a=>{var u,d,f;let l={id:(u=a.data.records[0])==null?void 0:u.info.id,type:(d=a.data.records[0])==null?void 0:d.info.type,detail:a.data.records[0],group:e.id,name:((f=a.data.records[0])==null?void 0:f.info.name)||e.id};l=Qr(l,this.moduleDetail.plugs);const c=n?{source:n.id,target:e.id,uniqueIndex:this.generateUniqueIndexNow()}:null;s={addOne:{nodes:[l],links:c?[c]:[]}},this.history.pushState(s)}).catch(a=>{this.onOutdate(a.res);let l=fe(ne({},e),{detail:null,diy:!0,group:e.id});l=Qr(l,this.moduleDetail.plugs);const c=n?{source:n.id,target:e.id,uniqueIndex:this.generateUniqueIndexNow()}:null;s={addOne:{nodes:[l],links:c?[c]:[]}},this.history.pushState(s)}).finally(a=>{setTimeout(()=>{},500)}):this.addNewNodesAndExpand(e)},addLink(e,t){if(!([e,t].filter(a=>a.type==="nodeType").length===1))return;const r={source:e.id,target:t.id,uniqueIndex:this.generateUniqueIndexNow(),diy:!0};let s=!1;if(this.history.dataNow.links.map(a=>{a.source.id===e.id&&a.target.id===t.id&&(s=!0)}),!s){const a={addOne:{links:[r]}};this.onAction(a)}},expandSelectedNodes(e){e.map(t=>{this.expandNodes(t)})},handleTableSelect(e=[]){this.$refs.render.handleTableSelect(e)},updateSelection(){this.selection=this.$refs.render.selection,this.$refs.render.selectEdgesByNode(this.selection),this.$refs.render.showKeyWay(this.selection),this.$refs.render.updateNodeStyle()},aggregationNodes(e,t){if(e.length===0)return;const n=[];for(const l in this.history.dataNow.nodes)e.findIndex((u,d,f)=>u===this.history.dataNow.nodes[l].id)>=0&&n.push(JSON.parse(JSON.stringify(this.history.dataNow.nodes[l])));const r=String(Math.floor(new Date().getTime()));let s={id:r,list:n,type:"aggregation",name:"聚合",relationId:t.id};s=Qr(s,this.moduleDetail.plugs);const a={addOne:{nodes:[s],links:[{source:t.id,target:r,uniqueIndex:this.generateUniqueIndexNow()}]},deleteOne:{nodes:n,links:n.map(l=>({source:t.id,target:l.id}))},type:"aggregation"};this.history.pushState(a),this.emitDataLoaded()},releaseAggregation(e){let t;if(e.type==="aggregation"&&(t=e),this.history.dataNow.links.map(n=>{n.source.id===e.id&&n.target.type==="aggregation"&&(t=t||n.target,n.source)}),t){const n={deleteOne:{nodes:[t],links:[{source:t.relationId,target:t.id}]},addOne:{nodes:t.list,links:t.list.map(r=>({source:t.relationId,target:r.id}))},type:"aggregation"};for(const r in this.history.dataNow.nodes)t.list.findIndex((a,l,c)=>a===this.history.dataNow.nodes[r].id)>=0&&(this.history.dataNow.nodes[r].aggregation=!1);this.history.pushState(n),this.emitDataLoaded()}},saveSnapshot(){return Ne(this,null,function*(){l2.prompt(null,"添加快照",{confirmButtonText:"确定",cancelButtonText:"取消",inputPattern:/^.{1,20}$/,inputPlaceholder:"请输入20字以内快照名称",inputErrorMessage:"请输入20字以内快照名称"}).then(t=>Ne(this,[t],function*({value:e}){this.bigLoading=!0,setTimeout(()=>Ne(this,null,function*(){try{const n=yield this.$refs.buttonList.svgToBlob(),r=new FormData;r.append("data",this.history.toString()),r.append("name",e),r.append("thumb",n),this.graphApi.addSnapshot1(r).then(s=>{this.snapshot=s.data,this.snapshot.name=e,this.$refs.snapshot.show()}).catch(s=>{this.onOutdate(s.res)}).finally(s=>{this.bigLoading=!1})}catch(n){this.bigLoading=!1,console.log(n)}}),100)})).catch(()=>{Nt({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(){qt({cId:"toggleFullScreen",c:"切换全屏"}),document.fullscreenElement?document.exitFullscreen&&document.exitFullscreen():this.$refs["force-d3-container"].requestFullscreen()},zoomView(e="in"){e==="in"?(qt({cId:"zoomIn",c:"zoomIn"}),this.$refs.render.zoomIn()):(qt({cId:"zoomOut",c:"zoomOut"}),this.$refs.render.zoomOut())},fitScreen(){var e;qt({cId:"centerAndZoom",c:"centerAndZoom"}),(e=this.$refs.render)==null||e.centerAndZoom()},changeMargin(){let e=0;const t=document.body.clientHeight;return e=Math.floor(((t-50)/20-22)/2),e>8?"8px 0":e+"px 0"},handleHighLight(e,t,n){this.$refs.render.setHighlightRule({type:e,prop:t,value:n})},handleCustomSelect(e,t,n){this.$refs.render.handleCustomSelect({type:e,prop:t,value:n})},fixAllNodes(e){this.$refs.render.fixAllNodes(e)},toggleLayout(e){this.$refs.render.toggleLayout(e)},importCsvData(e){for(const t in e.nodes)delete e.nodes[t].vx,delete e.nodes[t].vy,delete e.nodes[t].x,delete e.nodes[t].y;this.history.dataNow=Object.assign({},e)},getCanvasStage(){var e;return(e=this.$refs.render)==null?void 0:e.stage},addCanvasBg(){var e;(e=this.$refs.render)==null||e.addCanvasBg()},removeCanvasBg(){var e;(e=this.$refs.render)==null||e.removeCanvasBg()},controlOperation(e){var t;(t=this.$refs.render)==null||t.handleContextMenuClick(e)}}},Lne={key:0,ref:"force-d3-container",class:"d3-container"},Rne=["innerHTML"],Pne={class:"top-item"},Dne={class:"top-line"},Mne={key:1,class:"select-num"},Fne={class:"highlight"},$ne={class:"loading-container"},zne={class:"corner-button-box"};function Une(e,t,n,r,s,a){const l=o.resolveComponent("ButtonList"),c=o.resolveComponent("RenderByCanvas"),u=o.resolveComponent("Loading"),d=Ye,f=o.resolveComponent("Legend"),p=o.resolveComponent("NodeVisibleControl"),g=o.resolveComponent("force-graph-svg-icon"),v=gn,b=o.resolveComponent("RightMenu"),w=o.resolveComponent("SnapShotDialog"),_=o2;return n.graphApi?o.withDirectives((o.openBlock(),o.createElementBlock("div",Lne,[o.createElementVNode("div",{class:o.normalizeClass(["graph-box",{"hide-right-menu":!n.isShowRightMenu}])},[n.title?(o.openBlock(),o.createElementBlock("div",{key:0,class:"safe-force-title",innerHTML:n.title},null,8,Rne)):o.createCommentVNode("",!0),t[4]||(t[4]=o.createElementVNode("div",{class:"top-line-bg"},null,-1)),o.createElementVNode("div",Pne,[o.createElementVNode("div",Dne,[o.createVNode(l,{ref:"buttonList","hide-button-list":n.hideButtonList,selection:s.selection,history:s.history,"module-detail":s.moduleDetail,"request-graph-data":s.requestGraphData,"show-top-search":n.showTopSearch,onSaveSnapshot:a.saveSnapshot,onAddNodes:a.addNode,onAutoDisplay:a.autoDisplay,onDeleteNodes:a.deleteNodes,onFixNodes:a.fixAllNodes,onToggleLayout:a.toggleLayout,onImportCsvData:a.importCsvData},null,8,["hide-button-list","selection","history","module-detail","request-graph-data","show-top-search","onSaveSnapshot","onAddNodes","onAutoDisplay","onDeleteNodes","onFixNodes","onToggleLayout","onImportCsvData"])])]),o.createVNode(c,{ref:"render","enable-script":n.enableScript,"module-detail":s.moduleDetail,history:s.history,"level-list":n.levelList,selection:s.selection,data:s.history.dataNow,"request-graph-data":s.requestGraphData,"dark-mode":n.darkMode,"node-type-scale":n.nodeTypeScale,"node-type-list":s.nodeTypeList,"link-distance":n.linkDistance,strength:n.strength,"node-width":n.nodeWidth,"start-node-width":n.startNodeWidth,"start-node-animation":n.startNodeAnimation,"custom-tooltip":n.customTooltip,"edge-label-max-length":n.edgeLabelMaxLength,"custom-node-images":n.customNodeImages,onUpdateSelection:a.updateSelection,onOnaction:a.onAction,onHandleSelectNode:a.handleSelectNode,onCustomContextmenuClick:a.handleCustomContextMenuClick},null,8,["enable-script","module-detail","history","level-list","selection","data","request-graph-data","dark-mode","node-type-scale","node-type-list","link-distance","strength","node-width","start-node-width","start-node-animation","custom-tooltip","edge-label-max-length","custom-node-images","onUpdateSelection","onOnaction","onHandleSelectNode","onCustomContextmenuClick"]),s.selection.length>0?(o.openBlock(),o.createElementBlock("p",Mne,[t[2]||(t[2]=o.createTextVNode(" 已选择")),o.createElementVNode("span",Fne,o.toDisplayString(s.selection.length),1),t[3]||(t[3]=o.createTextVNode("项 "))])):o.createCommentVNode("",!0),o.withDirectives(o.createElementVNode("div",$ne,[o.createElementVNode("span",null,o.toDisplayString(s.loadingInfo),1),o.createVNode(d,{class:"is-loading"},{default:o.withCtx(()=>[o.createVNode(u)]),_:1})],512),[[o.vShow,s.isLoading]]),n.hasLegend?(o.openBlock(),o.createBlock(f,{key:2,"show-point":n.showPoint,history:s.history,"module-detail":s.moduleDetail,"has-level":n.hasLevel,"show-level-count":n.showLevelCount,margin:s.margin,onHighLight:a.handleHighLight},null,8,["show-point","history","module-detail","has-level","show-level-count","margin","onHighLight"])):o.createCommentVNode("",!0),n.hasNodeVisibleControl?(o.openBlock(),o.createBlock(p,{key:3,history:s.history,"module-detail":s.moduleDetail,"start-node":n.startNode,"custom-node-images":n.customNodeImages},null,8,["history","module-detail","start-node","custom-node-images"])):o.createCommentVNode("",!0),o.createElementVNode("div",zne,[!s.fullScreen&&a.topFrame?(o.openBlock(),o.createBlock(v,{key:0,content:"进入全屏",placement:"left","popper-class":"el-tooltip-gray"},{default:o.withCtx(()=>[o.createVNode(g,{"icon-class":e.imgPath["./public/d3svg1/button18/full_button.svg"],alt:"",class:"corner-button",onClick:a.toggleFullScreen},null,8,["icon-class","onClick"])]),_:1})):o.createCommentVNode("",!0),s.fullScreen&&a.topFrame?(o.openBlock(),o.createBlock(v,{key:1,content:"退出全屏",placement:"left","popper-class":"el-tooltip-gray"},{default:o.withCtx(()=>[o.createVNode(g,{"icon-class":e.imgPath["./public/d3svg1/button18/un_full_button.svg"],alt:"",class:"corner-button",onClick:a.toggleFullScreen},null,8,["icon-class","onClick"])]),_:1})):o.createCommentVNode("",!0),o.createVNode(v,{content:"适应屏幕",placement:"left","popper-class":"el-tooltip-gray"},{default:o.withCtx(()=>[o.createVNode(g,{"icon-class":e.imgPath["./public/d3svg1/button18/fit_button.svg"],alt:"",class:"corner-button",onClick:a.fitScreen},null,8,["icon-class","onClick"])]),_:1}),o.createVNode(v,{content:"放大",placement:"left","popper-class":"el-tooltip-gray"},{default:o.withCtx(()=>[o.createVNode(g,{"icon-class":e.imgPath["./public/d3svg1/button18/zoom_in_button.svg"],alt:"",class:"corner-button",onClick:t[0]||(t[0]=C=>a.zoomView("in"))},null,8,["icon-class"])]),_:1}),o.createVNode(v,{content:"缩小",placement:"left","popper-class":"el-tooltip-gray"},{default:o.withCtx(()=>[o.createVNode(g,{"icon-class":e.imgPath["./public/d3svg1/button18/zoom_out_button.svg"],alt:"",class:"corner-button",onClick:t[1]||(t[1]=C=>a.zoomView("out"))},null,8,["icon-class"])]),_:1})])],2),n.isShowRightMenu?(o.openBlock(),o.createBlock(b,{key:0,"graph-data":s.history.dataNow,"selected-nodes":s.selection,"request-graph-data":s.requestGraphData,onChangeBox:a.handleTableSelect},null,8,["graph-data","selected-nodes","request-graph-data","onChangeBox"])):o.createCommentVNode("",!0),o.createVNode(w,{ref:"snapshot",snapshot:s.snapshot,"graph-api":n.graphApi,"graph-url-path":n.graphUrlPath,"custom-copy-path-fn":n.customCopyPathFn},null,8,["snapshot","graph-api","graph-url-path","custom-copy-path-fn"])])),[[_,s.bigLoading]]):o.createCommentVNode("",!0)}const wl=_t(Bne,[["render",Une]]);wl.install=function(e){e.component(wl.name,wl)},Ms.install=function(e){e.component(Ms.name,Ms)};const rae="",jne=[wl,Ms],qne={install:function(e,t={}){jne.forEach(n=>{e.component(n.name,n)})}};De.Graph=wl,De.Render=Ms,De.default=qne,Object.defineProperties(De,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
|