MOON
Server: Apache
System: Linux server1.studioinfinity.com.br 2.6.32-954.3.5.lve1.4.90.el6.x86_64 #1 SMP Tue Feb 21 12:26:30 UTC 2023 x86_64
User: artinside (517)
PHP: 7.4.33
Disabled: exec,passthru,shell_exec,system
Upload Files
File: //proc/self/root/opt/netdata/netdata-web-files/v3/9163.9c2065fe867de6924eff.chunk.js
!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{};e.SENTRY_RELEASE={id:"d147606963bc0c498afbaa54c78aa7ffe6a22839"};var t=(new e.Error).stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="8b4014ef-7386-48a7-a131-7ef3c3b56205",e._sentryDebugIdIdentifier="sentry-dbid-8b4014ef-7386-48a7-a131-7ef3c3b56205")}catch(e){}}(),(globalThis.webpackChunkcloud_frontend=globalThis.webpackChunkcloud_frontend||[]).push([[4401,9163],{7010(e,t,o){o.d(t,{A:()=>p});var l=o(96540),n=o(40961),a=o(38429),r=o(93331),i=o(22007),s=o(44862),u=o(74848);const c={right:"left",bottom:"top"},d={right:"left",top:"bottom"},g={left:"right",bottom:"top"},h={left:"right",top:"bottom"},p=e=>{let{open:t,children:o,containerRef:p,ref:b}=e;const m=(0,l.useRef)(),[f,x]=(0,l.useState)(),y=(0,l.useRef)(),k=(0,l.useRef)(),j=(0,l.useRef)(null),v=(0,l.useRef)(h),[L,M]=(0,l.useState)(h);y.current=f,k.current=(0,i.default)(f,m,L,"width");const w=(0,s.default)(),A=(0,l.useCallback)(e=>{let{x:t,y:o}=e;if(j.current={x:t,y:o},!y.current)return;if(y.current.style.left=`${t}px`,y.current.style.top=`${o}px`,!m.current||!p?.current)return void k.current?.();const l=p.current.getBoundingClientRect(),{width:n,height:a}=m.current.getBoundingClientRect(),r=l.left+t,i=l.top+o,s=(u=r+n>l.right,b=i+a>l.bottom,u&&b?c:u?d:b?g:h);var u,b;if(s!==v.current)return v.current=s,M(s),void requestAnimationFrame(()=>k.current?.());k.current?.()},[]);return(0,l.useImperativeHandle)(b,()=>({setPosition(e){e&&A(e)},clearPosition(){j.current=null}})),(0,l.useLayoutEffect)(()=>{t&&j.current&&A(j.current)},[t]),(0,u.jsxs)(u.Fragment,{children:[(0,u.jsx)(a.Flex,{ref:e=>x(e),position:"absolute"}),t&&o?n.createPortal((0,u.jsx)(r.default,{ref:m,column:!0,margin:[L.top?2:-2,L.right?-2:2],sx:{pointerEvents:"none"},zIndex:101,children:o}),w):null]})}},48367(e,t,o){o.d(t,{Cp:()=>a,LE:()=>l,Sf:()=>s,dO:()=>i,df:()=>r,x8:()=>n});const l=0,n={north:85.051129,south:-85.051129,east:179.999,west:-179.999},a=[[n.west,n.south],[n.east,n.north]],r=(e,t)=>{const o=Math.max(0,Math.min(e||0,t||0));return Math.max(56,Math.min(120,Math.round(.14*o)))},i=(e,t)=>{const o=Math.max(0,Number(e||0)),l=Math.max(0,Number(t||0));return o<=0||l<=0?0:o>=l?1:Math.max(0,Math.min(1,o/l))},s=(e,t)=>{const o=((e,t)=>1.2+4.3*i(e,t))(e,t),l=((e,t)=>.35+.63*i(e,t))(e,t);return{strokeWidth:o,strokeOpacity:l,hitWidth:Math.max(12,o+6)}}},39163(e,t,o){o.r(t),o.d(t,{default:()=>T});o(98992),o(81454);var l=o(96540),n=o(98907),a=o(51796),r=o(90098),i=o(38429),s=o(882),u=o(85660),c=o(57591),d=o(71103),g=o(7010),h=(o(54520),o(3949),o(48367));const p=e=>Math.max(-85,Math.min(85,e));var b=o(74848);const m=(0,s.default)(i.Flex).withConfig({displayName:"globeTab__GlobeContainer",componentId:"sc-xxp3vl-0"})(["position:relative;width:100%;height:100%;min-height:0;overflow:hidden;"]),f=(0,s.default)(i.Flex).attrs({column:!0,gap:1,padding:[2,3],round:2,background:"mainBackground",border:"borderSecondary"}).withConfig({displayName:"globeTab__OverlayCard",componentId:"sc-xxp3vl-1"})(["box-shadow:0 4px 12px rgba(0,0,0,0.2);"]),x=(0,s.default)(f).withConfig({displayName:"globeTab__DetailCard",componentId:"sc-xxp3vl-2"})(["width:min(320px,calc(100% - 20px));"]),y=e=>{let{node:t}=e;return(0,b.jsxs)(f,{width:{min:"220px",max:"320px"},children:[(0,b.jsx)(i.Text,{strong:!0,children:t.label||"-"}),!!t.subtitle&&(0,b.jsx)(d.PA,{children:t.subtitle}),!!t.code&&t.code!==t.label&&(0,b.jsx)(i.TextSmall,{color:"textDescription",children:t.code}),(0,b.jsxs)(i.Flex,{column:!0,width:"100%",children:[(0,b.jsx)(d.tL,{label:"Total",value:(0,d.RU)(t.totalBytes)}),(0,b.jsx)(d.tL,{label:"Inbound",value:(0,d.RU)(t.inboundBytes)}),(0,b.jsx)(d.tL,{label:"Outbound",value:(0,d.RU)(t.outboundBytes)}),t.localBytes>0&&(0,b.jsx)(d.tL,{label:"Local",value:(0,d.RU)(t.localBytes)}),(0,b.jsx)(d.tL,{label:"Packets",value:(0,d.jw)(t.totalPackets)})]})]})},k=e=>{let{link:t}=e;if(!t)return null;const o=Array.isArray(t.directions)?t.directions:[],l=o[0]||null,n=o.length>1,a=n?`${t.nodeALabel} \u2194 ${t.nodeBLabel}`:l?`${l.sourceLabel} \u2192 ${l.targetLabel}`:`${t.nodeALabel} \u2194 ${t.nodeBLabel}`;return(0,b.jsxs)(x,{children:[(0,b.jsx)(i.Text,{strong:!0,children:a}),n&&(0,b.jsx)(d.PA,{children:"Combined bidirectional traffic"}),(0,b.jsxs)(i.Flex,{column:!0,width:"100%",children:[(0,b.jsx)(d.tL,{label:"Total bytes",value:(0,d.RU)(t.bytes)}),(0,b.jsx)(d.tL,{label:"Total packets",value:(0,d.jw)(t.packets)})]}),n&&o.map(e=>(0,b.jsxs)(i.Flex,{column:!0,gap:1,padding:[2,0,0,0],border:{side:"top",color:"borderSecondary"},children:[(0,b.jsxs)(d.PA,{children:[e.sourceLabel," \u2192 ",e.targetLabel]}),(0,b.jsxs)(i.Flex,{column:!0,width:"100%",children:[(0,b.jsx)(d.tL,{label:"Bytes",value:(0,d.RU)(e.bytes)}),(0,b.jsx)(d.tL,{label:"Packets",value:(0,d.jw)(e.packets)})]})]},e.id))]})},j="//unpkg.com/three-globe/example/img",v=`${j}/earth-night.jpg`,L=`${j}/earth-blue-marble.jpg`,M=`${j}/earth-topology.png`,w="auto",A=[{id:w,label:"Auto",tooltip:"Auto (matches theme)"},{id:"night",label:"Night",tooltip:"Night lights (NASA)",globeImageUrl:`${j}/earth-night.jpg`},{id:"day",label:"Day",tooltip:"Daytime earth",globeImageUrl:`${j}/earth-day.jpg`},{id:"blue-marble",label:"Marble",tooltip:"Blue Marble satellite (NASA)",globeImageUrl:`${j}/earth-blue-marble.jpg`},{id:"topology",label:"Topo",tooltip:"Topology relief",globeImageUrl:`${j}/earth-topology.png`},{id:"dark",label:"Dark",tooltip:"Dark monochrome",globeImageUrl:`${j}/earth-dark.jpg`},{id:"countries",label:"Borders",tooltip:"Country borders",globeImageUrl:`${j}/earth-dark.jpg`,countries:!0}],C=(0,a.A)(r,r.objects.countries).features,I=(e,t)=>{if("string"!==typeof e)return`rgba(0, 171, 68, ${t})`;const o=e.replace("#","");if(6!==o.length&&3!==o.length)return`rgba(0, 171, 68, ${t})`;const l=3===o.length?o.split("").map(e=>e+e).join(""):o;return`rgba(${parseInt(l.slice(0,2),16)}, ${parseInt(l.slice(2,4),16)}, ${parseInt(l.slice(4,6),16)}, ${t})`},S=(0,s.default)(i.Flex).withConfig({shouldForwardProp:e=>"active"!==e}).withConfig({displayName:"globeTab__StyleToolbar",componentId:"sc-xxp3vl-3"})(["position:absolute;top:8px;right:8px;z-index:5;gap:3px;align-items:center;border-radius:6px;padding:3px;background:rgba(15,24,24,0.65);opacity:",";transition:opacity 0.18s;&:hover{opacity:1;}"],e=>{let{active:t}=e;return t?1:.55}),R=e=>{let{activeStyleId:t,onSelect:o}=e;return(0,b.jsx)(S,{active:t!==w,children:A.map(e=>(0,b.jsx)(i.Button,{flavour:t===e.id?"default":"hollow",small:!0,onClick:()=>o(e.id),tooltip:e.tooltip,"aria-label":`Select ${e.tooltip} globe style`,children:e.label},e.id))})},T=e=>{let{flows:t,columns:o,metric:a="bytes",height:r="100%"}=e;const d=(0,s.useTheme)(),f="Default"!==d.name,x=(0,l.useRef)(null),j=(0,l.useRef)(null),[S,{width:T,height:$}]=(0,u.A)(),[_,D]=(0,l.useState)(null),[B,N]=(0,l.useState)(null),[P,U]=(0,l.useState)(!0),[E,F]=(0,l.useState)(w),O=(0,l.useRef)(null),H=(0,l.useRef)(null),q=(0,l.useMemo)(()=>E!==w?A.find(e=>e.id===E)||A[1]:{id:w,globeImageUrl:f?v:L,countries:!1},[E,f]),W=q.countries?C:[],z=(0,l.useMemo)(()=>(0,c.oT)(t,"city-map",o),[t,o]),G=(0,l.useMemo)(()=>function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"bytes";if(!Array.isArray(e)||!e.length)return[];const o=(e=>"packets"===e?"totalPackets":"totalBytes")(t),l=Math.max(0,...e.map(e=>Number(e?.[o]||0)));return e.map(e=>{const t=l>0?Number(e?.[o]||0)/l:0,n=.18+.72*Math.sqrt(Math.max(0,Math.min(1,t)));return{id:e.id,lat:e._geo.latitude,lng:e._geo.longitude,radius:n,node:e}})}(z.nodes,a),[z.nodes,a]),Y=(0,l.useMemo)(()=>function(e,t){let o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"bytes";if(!Array.isArray(e)||!e.length)return[];const l=(e=>"packets"===e?"packets":"bytes")(o),n=Math.max(0,...e.map(e=>Number(e?.[l]||0)));return e.map(e=>{const o=t?.[e.fromNodeId],a=t?.[e.toNodeId];if(!o||!a)return null;const r=Number(e?.[l]||0),i=(0,h.dO)(r,n),s=Math.sqrt(i),u=.22+s*(1.05-.22),c=.18+s*(1-.18);return{id:e.id,startLat:o._geo.latitude,startLng:o._geo.longitude,endLat:a._geo.latitude,endLng:a._geo.longitude,stroke:u,opacity:c,ratio:i,value:r,link:e}}).filter(Boolean)}(z.links,z.nodeById,a),[z.links,z.nodeById,a]),V=d.colors?.accent||d.colors?.primaryHighlight||d.colors?.primary||"#00ab44",X=V,J=(0,l.useCallback)(e=>I(V,e?.opacity??.5),[V]),K=(0,l.useCallback)(()=>{P&&U(!1)},[P]);(0,l.useEffect)(()=>{const e=x.current?.controls?.();e&&(e.autoRotate=P,e.autoRotateSpeed=.35)},[P]),(0,l.useEffect)(()=>{const e=x.current;if(!e||!G.length)return;const t=(e=>{if(!Array.isArray(e)||!e.length)return{lat:0,lng:0,altitude:2.4};if(1===e.length)return{lat:p(e[0]._geo.latitude),lng:e[0]._geo.longitude,altitude:1.8};let t=1/0,o=-1/0,l=1/0,n=-1/0;e.forEach(e=>{const{latitude:a,longitude:r}=e._geo;a<t&&(t=a),a>o&&(o=a),r<l&&(l=r),r>n&&(n=r)});const a=Math.max(0,o-t),r=Math.max(0,n-l),i=Math.max(a,r),s=Math.max(1.4,Math.min(3.2,.6+i/80));return{lat:p((t+o)/2),lng:(l+n)/2,altitude:s}})(z.nodes);e.pointOfView(t,900)},[z.nodes,G.length]);const Q=(0,l.useCallback)(e=>{D(e||null),e?(N(null),H.current&&O.current?.setPosition(H.current)):O.current?.clearPosition()},[]),Z=(0,l.useCallback)(e=>{_||(N(e||null),e&&H.current?O.current?.setPosition(H.current):e||O.current?.clearPosition())},[_]),ee=(0,l.useCallback)(e=>{const t=j.current?.getBoundingClientRect();if(!t)return;const o={x:e.clientX-t.left,y:e.clientY-t.top};H.current=o,O.current?.setPosition(o)},[]),te=(0,l.useCallback)(()=>{H.current=null,O.current?.clearPosition(),D(null),N(null)},[]),oe=(0,l.useMemo)(()=>_?.node?{kind:"node",data:_.node}:B?.link?{kind:"link",data:B.link}:null,[B,_]),le=(0,l.useCallback)(e=>{j.current=e,S(e)},[S]),ne=(0,l.useMemo)(()=>I(V,f?.65:.75),[V,f]),ae=(0,l.useMemo)(()=>I(V,f?.08:.05),[V,f]);return z.nodes.length?(0,b.jsxs)(m,{ref:le,height:r,onMouseMove:ee,onMouseLeave:te,onMouseDown:K,onWheel:K,children:[(0,b.jsx)(R,{activeStyleId:E,onSelect:F}),(0,b.jsx)(g.A,{ref:O,open:!!oe,containerRef:j,children:"node"===oe?.kind?(0,b.jsx)(y,{node:oe.data}):(0,b.jsx)(k,{link:oe?.data})}),(0,b.jsx)(n.A,{ref:x,width:T||void 0,height:$||void 0,backgroundColor:f?"#0b1318":"#e5f1f6",globeImageUrl:q.globeImageUrl,bumpImageUrl:M,atmosphereColor:f?"#5ec2ff":"#4ba3d1",atmosphereAltitude:.18,showAtmosphere:!0,animateIn:!0,pointsData:G,pointLat:e=>e.lat,pointLng:e=>e.lng,pointAltitude:0,pointRadius:e=>e.radius,pointColor:()=>X,pointsMerge:!1,onPointHover:Q,arcsData:Y,arcStartLat:e=>e.startLat,arcStartLng:e=>e.startLng,arcEndLat:e=>e.endLat,arcEndLng:e=>e.endLng,arcStroke:e=>e.stroke,arcAltitudeAutoScale:.4,arcColor:J,arcDashLength:1,arcDashGap:0,arcDashAnimateTime:0,arcsTransitionDuration:400,onArcHover:Z,polygonsData:W,polygonAltitude:.006,polygonCapColor:()=>ae,polygonSideColor:()=>"rgba(0, 0, 0, 0)",polygonStrokeColor:()=>ne,polygonsTransitionDuration:300})]}):(0,b.jsx)(m,{ref:le,height:r,children:(0,b.jsx)(i.Flex,{justifyContent:"center",alignItems:"center",height:"100%",padding:[5],children:(0,b.jsx)(i.Text,{color:"textLite",children:"No plottable geography available for the current selection."})})})}}}]);