1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[431],{1431:function(t,e,r){r.r(e),r.d(e,{default:function(){return w}});var n=r(5893),o=r(1131),i=r(6486),a=r(7294),l=r(7590),u=r(2582),c=r(2843),f=r(2601),s=r(721),d=r(8253);function y(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function m(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function b(t,e){return null!=e&&"undefined"!==typeof Symbol&&e[Symbol.hasInstance]?!!e[Symbol.hasInstance](t):t instanceof e}function v(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{},n=Object.keys(r);"function"===typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter((function(t){return Object.getOwnPropertyDescriptor(r,t).enumerable})))),n.forEach((function(e){m(t,e,r[e])}))}return t}function p(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var r=null==t?null:"undefined"!==typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=r){var n,o,i=[],a=!0,l=!1;try{for(r=r.call(t);!(a=(n=r.next()).done)&&(i.push(n.value),!e||i.length!==e);a=!0);}catch(u){l=!0,o=u}finally{try{a||null==r.return||r.return()}finally{if(l)throw o}}return i}}(t,e)||g(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function h(t){return function(t){if(Array.isArray(t))return y(t)}(t)||function(t){if("undefined"!==typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||g(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function g(t,e){if(t){if("string"===typeof t)return y(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(r):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?y(t,e):void 0}}function w(){var t=p((0,o.KO)(u.XP),1)[0],e=(0,a.useState)({}),r=e[0],i=e[1],f=(0,a.useState)(null),y=f[0],g=f[1],w=p((0,c.sq)(),1)[0],x=p((0,c.gV)(),1)[0],k=null===x||void 0===x?void 0:x.agoraStat;if((0,d.Z)((function(){if(b(t,l.b)&&k){var e,r=t.client,n=v((m(e={},"local audio",r.getLocalAudioStats()),m(e,"local video",r.getLocalVideoStats()),m(e,"rtc",r.getRTCStats()),e),function(t,e){var r=t.getRemoteAudioStats(),n=t.getRemoteVideoStats(),o=t.getRemoteNetworkQuality(),i=h(Object.keys(r)).concat(h(Object.keys(n)),h(Object.keys(o))),a={},l=!0,u=!1,c=void 0;try{for(var f,d=i[Symbol.iterator]();!(l=(f=d.next()).done);l=!0){var y=f.value,m=(0,s.O)(y);if(m){var b=e[m];if(b){var p={};if(r[y])p=v({},p,j(r[y],"a_"));if(n[y])p=v({},p,j(n[y],"v_"));o[y]&&(p=v({},p,o[y])),a[b.name]=p}}}}catch(g){u=!0,c=g}finally{try{l||null==d.return||d.return()}finally{if(u)throw c}}return a}(r,w));i(n)}}),1e3),(0,a.useEffect)((function(){var e=function(t){g(t)};if(b(t,l.b)&&k)return t.client.on("network-quality",e),function(){t.client.off("network-quality",e)}})),!k)return null;var A=v({network:null!==y&&void 0!==y?y:{}},r);return(0,n.jsx)(O,{children:Object.entries(A).map((function(t){var e=p(t,2),r=e[0],o=e[1];return(0,n.jsx)(S,{title:r,metric:o},r)}))})}function S(t){var e=t.title,r=t.metric;return(0,n.jsxs)("section",{children:[(0,n.jsx)("div",{className:"title",children:e}),(0,n.jsx)(x,{children:Object.entries(r).sort().map((function(t){var e,r=p(t,2),o=r[0],i=r[1];return o="RTT"===(e=o)?e:e.replace(/([A-Z])/g," $1").trim().toLowerCase(),(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)("div",{title:o,children:o}),(0,n.jsx)("div",{children:i})]})}))})]})}function j(t,e){return(0,i.mapKeys)(t,(function(t,r){return"".concat(e).concat(r)}))}var x=(0,f.zo)("div",{display:"grid",gridTemplateColumns:"repeat(1, 100px 40px)",columnGap:2,div:{textOverflow:"ellipsis",overflow:"hidden",whiteSpace:"nowrap"}}),O=(0,f.zo)("div",{position:"fixed",top:80,right:0,zIndex:"$meter",background:"black",color:"white",fontSize:10,padding:"0.5em",userSelect:"text",maxHeight:500,overflowY:"scroll",".title":{fontWeight:"bold",borderBottom:"0.5px solid white",marginBottom:2},section:{marginBottom:"0.5em"}})}}]); 2//# sourceMappingURL=431.9b8e36363e732d0f.js.map
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.