"undefined"==typeof WebSocket&&(global.WebSocket=require("isomorphic-ws"));const workerMain=function(e){const n=e.data["///ndt/v7/upload"],t=new WebSocket(n,"net.measurementlab.ndt.v7");let o=()=>(new Date).getTime();"undefined"!=typeof performance&&void 0!==performance.now&&(o=()=>performance.now()),uploadTest(t,postMessage,o)},uploadTest=function(e,n,t){let o=!1;e.onclose=function(){o||(o=!0,n({MsgType:"complete"}))},e.onmessage=function(e){void 0!==e.data&&n({MsgType:"measurement",Source:"server",ServerMessage:e.data})},e.onopen=function(){const s=new Uint8Array(8192),a=t(),r=a+1e4;n({MsgType:"start",Data:{StartTime:a/1e3,ExpectedEndTime:r/1e3}}),function s(a,r,i,u,d){if(o)return;let f=t();if(f>=i)return void e.close();a.length<8388608&&a.length<(d-e.bufferedAmount)/16&&(a=new Uint8Array(2*a.length));const c=7*a.length;if(e.bufferedAmount<c&&(e.send(a),d+=a.length),f>=u+250){const t=d-e.bufferedAmount,o=(f-r)/1e3;n({MsgType:"measurement",ClientData:{ElapsedTime:o,NumBytes:t,MeanClientMbps:8*t/1e6/o},Source:"client",Test:"upload"}),u=f}setTimeout(()=>s(a,r,i,u,d),0)}(s,a,r,a,0)}};"undefined"!=typeof self?self.onmessage=workerMain:void 0!==this?this.onmessage=workerMain:"undefined"!=typeof onmessage&&(onmessage=workerMain);

@@ -685,18 +685,20 @@
 )return;
-le
+cons
 t f=t();

Update minified uploader code.