/*! For license information please see routerSharedWorker.js.LICENSE.txt */
const portList=[];let routerServicePort=null,ready=!1;onconnect=function(e){const t=e.ports[0],r=portList.push(t)-1;t.onmessage=function(e){"connect"===e.data.data&&"RouterService"===e.data.source?(routerServicePort=t,t.server="true",ready=!0):ready?t.server?portList[e.data[0].port].postMessage([r,e.data[1]]):routerServicePort.postMessage([r,e.data[1]]):console.warn("Service not connected yet")}};