{"version":3,"file":"connectivity.mjs","names":[],"sources":["../../../src/domain/connectivity/connectivity.ts"],"sourcesContent":["import type { EffectiveType, NetworkInterface } from '../../browser/browser.types'\nimport { globalObject } from '../../tools/globalObject'\n\nexport interface Connectivity {\n  status: 'connected' | 'not_connected'\n  interfaces?: NetworkInterface[]\n  effective_type?: EffectiveType\n  [key: string]: unknown\n}\n\nexport function getConnectivity(): Connectivity {\n  const navigator = globalObject.navigator\n\n  return {\n    status: navigator.onLine ? 'connected' : 'not_connected',\n    interfaces: navigator.connection?.type ? [navigator.connection.type] : undefined,\n    effective_type: navigator.connection?.effectiveType,\n  }\n}\n"],"mappings":";;AAUA,SAAgB,kBAAgC;CAC9C,MAAM,YAAY,aAAa;CAE/B,OAAO;EACL,QAAQ,UAAU,SAAS,cAAc;EACzC,YAAY,UAAU,YAAY,OAAO,CAAC,UAAU,WAAW,IAAI,IAAI,KAAA;EACvE,gBAAgB,UAAU,YAAY;CACxC;AACF"}