solo-analytics 0.1.1 → 0.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,7 +1,7 @@
1
- function x(e) {
2
- const r = () => {
3
- const t = [
4
- { name: "Edge", regex: /Edg(?:e|A|iOS)\/([0-9\.]+)/ },
1
+ function k(e, t = {}) {
2
+ const i = t.vendor ?? (typeof navigator < "u" ? navigator.vendor : ""), n = t.innerWidth ?? (typeof window < "u" ? window.innerWidth : 1024), r = t.innerHeight ?? (typeof window < "u" ? window.innerHeight : 768), f = t.maxTouchPoints ?? (typeof navigator < "u" && "maxTouchPoints" in navigator ? navigator.maxTouchPoints : 0), o = () => {
3
+ const s = [
4
+ { name: "Edge", regex: /Edg(?:e|A|iOS)?\/([0-9\.]+)/ },
5
5
  { name: "Samsung Browser", regex: /SamsungBrowser\/([0-9\.]+)/ },
6
6
  { name: "Opera", regex: /(?:Opera|OPR)\/([0-9\.]+)/ },
7
7
  { name: "Firefox", regex: /Firefox\/([0-9\.]+)/ },
@@ -9,31 +9,31 @@ function x(e) {
9
9
  { name: "Safari", regex: /Version\/([0-9\.]+).*Safari/ },
10
10
  { name: "IE", regex: /MSIE|Trident/ }
11
11
  ];
12
- for (const o of t) {
13
- const i = e.match(o.regex);
14
- if (i) {
15
- const a = i[1] || "", s = a.split(".")[0] || "";
16
- let l = "Unknown", f = "";
12
+ for (const l of s) {
13
+ const a = e.match(l.regex);
14
+ if (a) {
15
+ const c = a[1] || "", p = c.split(".")[0] || "";
16
+ let v = "Unknown", h = "";
17
17
  if (e.includes("AppleWebKit")) {
18
- const d = e.match(/AppleWebKit\/([0-9\.]+)/);
19
- l = "WebKit", f = d ? d[1] : "";
18
+ const g = e.match(/AppleWebKit\/([0-9\.]+)/);
19
+ v = "WebKit", h = g ? g[1] : "";
20
20
  } else if (e.includes("Gecko")) {
21
- l = "Gecko";
22
- const d = e.match(/rv:([0-9\.]+)/);
23
- f = d ? d[1] : "";
21
+ v = "Gecko";
22
+ const g = e.match(/rv:([0-9\.]+)/);
23
+ h = g ? g[1] : "";
24
24
  } else if (e.includes("Trident")) {
25
- l = "Trident";
26
- const d = e.match(/Trident\/([0-9\.]+)/);
27
- f = d ? d[1] : "";
25
+ v = "Trident";
26
+ const g = e.match(/Trident\/([0-9\.]+)/);
27
+ h = g ? g[1] : "";
28
28
  }
29
29
  return {
30
- name: o.name,
31
- version: a,
32
- major: s,
30
+ name: l.name,
31
+ version: c,
32
+ major: p,
33
33
  userAgent: e,
34
- vendor: navigator.vendor || "",
35
- engine: l,
36
- engineVersion: f
34
+ vendor: i,
35
+ engine: v,
36
+ engineVersion: h
37
37
  };
38
38
  }
39
39
  }
@@ -42,25 +42,25 @@ function x(e) {
42
42
  version: "",
43
43
  major: "",
44
44
  userAgent: e,
45
- vendor: navigator.vendor || "",
45
+ vendor: i,
46
46
  engine: "Unknown",
47
47
  engineVersion: ""
48
48
  };
49
- }, c = () => {
50
- const t = [
49
+ }, d = () => {
50
+ const s = [
51
51
  { name: "iOS", regex: /iPhone|iPad|iPod/ },
52
52
  { name: "Android", regex: /Android ([0-9\.]+)/ },
53
53
  { name: "Windows", regex: /Windows NT ([0-9\.]+)/ },
54
54
  { name: "macOS", regex: /Mac OS X ([0-9_\.]+)/ },
55
55
  { name: "Linux", regex: /Linux/ }
56
56
  ];
57
- for (const o of t) {
58
- const i = e.match(o.regex);
59
- if (i) {
60
- let a = "";
61
- return i[1] && (a = o.name === "macOS" ? i[1].replace(/_/g, ".") : i[1]), {
62
- name: o.name,
63
- version: a,
57
+ for (const l of s) {
58
+ const a = e.match(l.regex);
59
+ if (a) {
60
+ let c = "";
61
+ return a[1] && (c = l.name === "macOS" ? a[1].replace(/_/g, ".") : a[1]), {
62
+ name: l.name,
63
+ version: c,
64
64
  architecture: e.includes("x64") || e.includes("x86_64") ? "64-bit" : "32-bit"
65
65
  };
66
66
  }
@@ -70,41 +70,41 @@ function x(e) {
70
70
  version: "",
71
71
  architecture: e.includes("x64") || e.includes("x86_64") ? "64-bit" : "32-bit"
72
72
  };
73
- }, n = () => {
74
- const t = /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(e), o = /iPad|Android(?!.*Mobile)/i.test(e);
75
- let i = "Unknown", a = "Unknown";
73
+ }, u = () => {
74
+ const s = /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(e), l = /iPad|Android(?!.*Mobile)/i.test(e);
75
+ let a = "Unknown", c = "Unknown";
76
76
  if (e.includes("iPhone") || e.includes("iPad") || e.includes("iPod"))
77
- i = "Apple", e.includes("iPhone") && (a = "iPhone"), e.includes("iPad") && (a = "iPad"), e.includes("iPod") && (a = "iPod");
77
+ a = "Apple", e.includes("iPhone") && (c = "iPhone"), e.includes("iPad") && (c = "iPad"), e.includes("iPod") && (c = "iPod");
78
78
  else if (e.includes("Samsung"))
79
- i = "Samsung";
79
+ a = "Samsung";
80
80
  else if (e.includes("Pixel")) {
81
- i = "Google";
82
- const l = e.match(/Pixel ([0-9XL]+)/);
83
- l && (a = `Pixel ${l[1]}`);
81
+ a = "Google";
82
+ const v = e.match(/Pixel ([0-9XL]+)/);
83
+ v && (c = `Pixel ${v[1]}`);
84
84
  }
85
- const s = o ? "tablet" : t ? "mobile" : "desktop";
85
+ const p = l ? "tablet" : s ? "mobile" : "desktop";
86
86
  return {
87
- type: s,
88
- vendor: i,
89
- model: a,
90
- orientation: typeof window < "u" && window.innerHeight > window.innerWidth ? "portrait" : "landscape",
91
- isMobile: s === "mobile",
92
- isTablet: s === "tablet",
93
- isDesktop: s === "desktop",
94
- touch: typeof navigator < "u" && "maxTouchPoints" in navigator ? navigator.maxTouchPoints > 0 : !1
87
+ type: p,
88
+ vendor: a,
89
+ model: c,
90
+ orientation: r > n ? "portrait" : "landscape",
91
+ isMobile: p === "mobile",
92
+ isTablet: p === "tablet",
93
+ isDesktop: p === "desktop",
94
+ touch: f > 0
95
95
  };
96
96
  };
97
97
  return {
98
- browser: r(),
99
- os: c(),
100
- device: n()
98
+ browser: o(),
99
+ os: d(),
100
+ device: u()
101
101
  };
102
102
  }
103
- function I() {
103
+ function T() {
104
104
  const e = () => !window.performance || !window.performance.navigation ? { type: "Unknown", redirectCount: 0 } : {
105
105
  type: ["navigate", "reload", "back_forward", "prerender"][window.performance.navigation.type] || "Unknown",
106
106
  redirectCount: window.performance.navigation.redirectCount
107
- }, r = () => {
107
+ }, t = () => {
108
108
  if (!window.performance || !window.performance.timing)
109
109
  return {
110
110
  loadTime: 0,
@@ -112,17 +112,17 @@ function I() {
112
112
  firstPaint: null,
113
113
  firstContentfulPaint: null
114
114
  };
115
- const n = window.performance.timing, t = n.loadEventEnd - n.navigationStart, o = n.domContentLoadedEventEnd - n.navigationStart;
116
- let i = null, a = null;
115
+ const n = window.performance.timing, r = n.loadEventEnd - n.navigationStart, f = n.domContentLoadedEventEnd - n.navigationStart;
116
+ let o = null, d = null;
117
117
  if (window.performance && typeof window.performance.getEntriesByType == "function") {
118
- const s = window.performance.getEntriesByType("paint"), l = s.find((d) => d.name === "first-paint"), f = s.find((d) => d.name === "first-contentful-paint");
119
- l && (i = l.startTime), f && (a = f.startTime);
118
+ const u = window.performance.getEntriesByType("paint"), s = u.find((a) => a.name === "first-paint"), l = u.find((a) => a.name === "first-contentful-paint");
119
+ s && (o = s.startTime), l && (d = l.startTime);
120
120
  }
121
121
  return {
122
- loadTime: t,
123
- domContentLoaded: o,
124
- firstPaint: i,
125
- firstContentfulPaint: a
122
+ loadTime: r,
123
+ domContentLoaded: f,
124
+ firstPaint: o,
125
+ firstContentfulPaint: d
126
126
  };
127
127
  };
128
128
  return {
@@ -138,25 +138,25 @@ function I() {
138
138
  return null;
139
139
  })(),
140
140
  navigation: e(),
141
- timing: r()
141
+ timing: t()
142
142
  };
143
143
  }
144
- function C() {
144
+ function P() {
145
145
  const e = typeof navigator < "u" ? navigator.onLine : !1;
146
- let r = "unknown", c = 0, n = 0, t = !1;
146
+ let t = "unknown", i = 0, n = 0, r = !1;
147
147
  if (navigator && navigator.connection) {
148
- const o = navigator.connection;
149
- r = o.effectiveType || r, c = o.downlink || c, n = o.rtt || n, t = o.saveData || t;
148
+ const f = navigator.connection;
149
+ t = f.effectiveType || t, i = f.downlink || i, n = f.rtt || n, r = f.saveData || r;
150
150
  }
151
151
  return {
152
152
  online: e,
153
- effectiveType: r,
154
- downlink: c,
153
+ effectiveType: t,
154
+ downlink: i,
155
155
  rtt: n,
156
- saveData: t
156
+ saveData: r
157
157
  };
158
158
  }
159
- function D() {
159
+ function S() {
160
160
  if (typeof window > "u" || typeof screen > "u")
161
161
  return {
162
162
  width: 0,
@@ -170,7 +170,7 @@ function D() {
170
170
  };
171
171
  let e = "unknown";
172
172
  window.innerHeight > window.innerWidth ? e = "portrait" : e = "landscape", screen.orientation && screen.orientation.type && (e = screen.orientation.type);
173
- const r = window.devicePixelRatio || 1, c = navigator.maxTouchPoints || 0;
173
+ const t = window.devicePixelRatio || 1, i = navigator.maxTouchPoints || 0;
174
174
  return {
175
175
  width: screen.width,
176
176
  height: screen.height,
@@ -178,11 +178,11 @@ function D() {
178
178
  availHeight: screen.availHeight,
179
179
  colorDepth: screen.colorDepth,
180
180
  orientation: e,
181
- pixelRatio: r,
182
- touchPoints: c
181
+ pixelRatio: t,
182
+ touchPoints: i
183
183
  };
184
184
  }
185
- function M() {
185
+ function x() {
186
186
  if (typeof window > "u" || typeof navigator > "u")
187
187
  return {
188
188
  timeZone: "",
@@ -194,55 +194,69 @@ function M() {
194
194
  localStorage: !1,
195
195
  sessionStorage: !1
196
196
  };
197
- const e = Intl.DateTimeFormat().resolvedOptions().timeZone, r = navigator.language || "", c = navigator.languages ? Array.from(navigator.languages) : [r];
197
+ const e = Intl.DateTimeFormat().resolvedOptions().timeZone, t = navigator.language || "", i = navigator.languages ? Array.from(navigator.languages) : [t];
198
198
  let n = !1;
199
199
  try {
200
200
  n = window.self !== window.top;
201
201
  } catch {
202
202
  n = !0;
203
203
  }
204
- let t = null;
205
- navigator.doNotTrack === "1" || navigator.doNotTrack === "yes" ? t = !0 : (navigator.doNotTrack === "0" || navigator.doNotTrack === "no") && (t = !1);
206
- const o = navigator.cookieEnabled, i = (a) => {
204
+ let r = null;
205
+ navigator.doNotTrack === "1" || navigator.doNotTrack === "yes" ? r = !0 : (navigator.doNotTrack === "0" || navigator.doNotTrack === "no") && (r = !1);
206
+ const f = navigator.cookieEnabled, o = (d) => {
207
207
  try {
208
- const s = window[a], l = `__test_${a}__`;
209
- return s.setItem(l, "test"), s.removeItem(l), !0;
208
+ const u = window[d], s = `__test_${d}__`;
209
+ return u.setItem(s, "test"), u.removeItem(s), !0;
210
210
  } catch {
211
211
  return !1;
212
212
  }
213
213
  };
214
214
  return {
215
215
  timeZone: e,
216
- language: r,
217
- languages: c,
216
+ language: t,
217
+ languages: i,
218
218
  isRestricted: n,
219
- doNotTrack: t,
220
- cookiesEnabled: o,
221
- localStorage: i("localStorage"),
222
- sessionStorage: i("sessionStorage")
219
+ doNotTrack: r,
220
+ cookiesEnabled: f,
221
+ localStorage: o("localStorage"),
222
+ sessionStorage: o("sessionStorage")
223
223
  };
224
224
  }
225
- async function E() {
225
+ function C(e, t = 2e3) {
226
+ if (typeof window > "u") {
227
+ Promise.resolve().then(e);
228
+ return;
229
+ }
230
+ const i = () => {
231
+ Promise.resolve(e());
232
+ };
233
+ if ("requestIdleCallback" in window) {
234
+ window.requestIdleCallback(() => i(), { timeout: t });
235
+ return;
236
+ }
237
+ setTimeout(i, 0);
238
+ }
239
+ async function D() {
226
240
  return new Promise((e) => {
227
241
  if (typeof window > "u") {
228
242
  e(!1);
229
243
  return;
230
244
  }
231
- const r = indexedDB.open("test");
232
- r.onerror = () => e(!0), r.onsuccess = () => e(!1), setTimeout(() => e(!1), 1e3);
245
+ const t = indexedDB.open("test");
246
+ t.onerror = () => e(!0), t.onsuccess = () => e(!1), setTimeout(() => e(!1), 1e3);
233
247
  });
234
248
  }
235
- async function L() {
249
+ async function I() {
236
250
  if (typeof navigator > "u" || !navigator.mediaDevices || !navigator.mediaDevices.enumerateDevices)
237
251
  return { hasCamera: null, hasMicrophone: null };
238
252
  try {
239
- const e = await navigator.mediaDevices.enumerateDevices(), r = e.some((n) => n.kind === "videoinput"), c = e.some((n) => n.kind === "audioinput");
240
- return { hasCamera: r, hasMicrophone: c };
253
+ const e = await navigator.mediaDevices.enumerateDevices(), t = e.some((n) => n.kind === "videoinput"), i = e.some((n) => n.kind === "audioinput");
254
+ return { hasCamera: t, hasMicrophone: i };
241
255
  } catch {
242
256
  return { hasCamera: null, hasMicrophone: null };
243
257
  }
244
258
  }
245
- async function A() {
259
+ async function M() {
246
260
  if (typeof navigator > "u" || !navigator.getBattery)
247
261
  return { hasBattery: null, level: null, charging: null };
248
262
  try {
@@ -256,10 +270,10 @@ async function A() {
256
270
  return { hasBattery: null, level: null, charging: null };
257
271
  }
258
272
  }
259
- async function B() {
273
+ async function A() {
260
274
  if (typeof navigator > "u" || !navigator.permissions || !navigator.permissions.query)
261
275
  return {};
262
- const e = {}, r = [
276
+ const e = {}, t = [
263
277
  "geolocation",
264
278
  "notifications",
265
279
  "push",
@@ -270,173 +284,192 @@ async function B() {
270
284
  "accelerometer",
271
285
  "gyroscope",
272
286
  "magnetometer"
273
- ], c = async (n) => {
274
- try {
275
- return (await navigator.permissions.query({ name: n })).state;
276
- } catch {
277
- return "not-supported";
278
- }
279
- };
280
- for (const n of r)
281
- e[n] = await c(n);
287
+ ], i = await Promise.all(
288
+ t.map(async (n) => {
289
+ try {
290
+ const r = await navigator.permissions.query({ name: n });
291
+ return [n, r.state];
292
+ } catch {
293
+ return [n, "not-supported"];
294
+ }
295
+ })
296
+ );
297
+ for (const [n, r] of i)
298
+ e[n] = r;
282
299
  return e;
283
300
  }
284
- function O(e = {}) {
285
- const {
286
- autoRefresh: r = !1,
287
- refreshInterval: c = 3e4,
288
- // 30 seconds
289
- trackVisibility: n = !0
290
- } = e, t = {
291
- browser: {
292
- name: "",
293
- version: "",
294
- major: "",
295
- userAgent: "",
296
- vendor: "",
297
- engine: "",
298
- engineVersion: ""
299
- },
300
- os: {
301
- name: "",
302
- version: "",
303
- architecture: ""
304
- },
305
- device: {
306
- type: "unknown",
307
- vendor: "",
308
- model: "",
309
- orientation: "portrait",
310
- isMobile: !1,
311
- isTablet: !1,
312
- isDesktop: !1,
313
- touch: !1
301
+ const B = () => ({
302
+ browser: {
303
+ name: "",
304
+ version: "",
305
+ major: "",
306
+ userAgent: "",
307
+ vendor: "",
308
+ engine: "",
309
+ engineVersion: ""
310
+ },
311
+ os: {
312
+ name: "",
313
+ version: "",
314
+ architecture: ""
315
+ },
316
+ device: {
317
+ type: "unknown",
318
+ vendor: "",
319
+ model: "",
320
+ orientation: "portrait",
321
+ isMobile: !1,
322
+ isTablet: !1,
323
+ isDesktop: !1,
324
+ touch: !1
325
+ },
326
+ network: {
327
+ online: !1,
328
+ effectiveType: "",
329
+ downlink: 0,
330
+ rtt: 0,
331
+ saveData: !1
332
+ },
333
+ screen: {
334
+ width: 0,
335
+ height: 0,
336
+ availWidth: 0,
337
+ availHeight: 0,
338
+ colorDepth: 0,
339
+ orientation: "",
340
+ pixelRatio: 1,
341
+ touchPoints: 0
342
+ },
343
+ performance: {
344
+ memory: null,
345
+ navigation: {
346
+ type: "",
347
+ redirectCount: 0
314
348
  },
315
- network: {
316
- online: !1,
317
- effectiveType: "",
318
- downlink: 0,
319
- rtt: 0,
320
- saveData: !1
321
- },
322
- screen: {
323
- width: 0,
324
- height: 0,
325
- availWidth: 0,
326
- availHeight: 0,
327
- colorDepth: 0,
328
- orientation: "",
329
- pixelRatio: 1,
330
- touchPoints: 0
331
- },
332
- performance: {
333
- memory: null,
334
- navigation: {
335
- type: "",
336
- redirectCount: 0
337
- },
338
- timing: {
339
- loadTime: 0,
340
- domContentLoaded: 0,
341
- firstPaint: null,
342
- firstContentfulPaint: null
343
- }
344
- },
345
- location: {
346
- timeZone: "",
347
- language: "",
348
- languages: [],
349
- isRestricted: !1,
350
- doNotTrack: null,
351
- cookiesEnabled: !1,
352
- localStorage: !1,
353
- sessionStorage: !1
354
- },
355
- pageVisibility: "visible",
356
- referrer: "",
357
- isIncognito: !1,
358
- hasCamera: null,
359
- hasMicrophone: null,
360
- hasBattery: null,
361
- batteryLevel: null,
362
- batteryCharging: null,
363
- permissions: {}
364
- };
365
- let o = null, i = null;
366
- const a = async () => {
349
+ timing: {
350
+ loadTime: 0,
351
+ domContentLoaded: 0,
352
+ firstPaint: null,
353
+ firstContentfulPaint: null
354
+ }
355
+ },
356
+ location: {
357
+ timeZone: "",
358
+ language: "",
359
+ languages: [],
360
+ isRestricted: !1,
361
+ doNotTrack: null,
362
+ cookiesEnabled: !1,
363
+ localStorage: !1,
364
+ sessionStorage: !1
365
+ },
366
+ pageVisibility: "visible",
367
+ referrer: "",
368
+ isIncognito: !1,
369
+ hasCamera: null,
370
+ hasMicrophone: null,
371
+ hasBattery: null,
372
+ batteryLevel: null,
373
+ batteryCharging: null,
374
+ permissions: {}
375
+ });
376
+ function E(e = {}) {
377
+ const {
378
+ autoRefresh: t = !1,
379
+ refreshInterval: i = 3e4,
380
+ trackVisibility: n = !0,
381
+ detectFeatures: r = !0,
382
+ lazyFeatures: f = !0
383
+ } = e, o = B();
384
+ let d = null, u = null, s = !1;
385
+ const l = () => {
367
386
  if (typeof navigator > "u" || typeof window > "u")
368
387
  return;
369
- const g = navigator.userAgent, { browser: u, os: m, device: p } = x(g), v = D(), h = M(), w = await E(), { hasCamera: y, hasMicrophone: b } = await L(), { hasBattery: k, level: S, charging: T } = await A(), P = await B();
370
- Object.assign(t, {
371
- browser: u,
372
- os: m,
373
- device: p,
374
- screen: v,
375
- location: h,
376
- referrer: document.referrer,
377
- isIncognito: w,
378
- hasCamera: y,
379
- hasMicrophone: b,
380
- hasBattery: k,
381
- batteryLevel: S,
382
- batteryCharging: T,
383
- permissions: P
388
+ const m = navigator.userAgent, { browser: y, os: w, device: b } = k(m);
389
+ Object.assign(o, {
390
+ browser: y,
391
+ os: w,
392
+ device: b,
393
+ screen: S(),
394
+ location: x(),
395
+ referrer: document.referrer
384
396
  });
385
- }, s = () => {
386
- if (typeof navigator > "u" || typeof window > "u")
397
+ }, a = async () => {
398
+ if (!r || s)
387
399
  return;
388
- const g = C(), u = I();
389
- Object.assign(t, {
390
- network: g,
391
- performance: u,
400
+ const [m, y, w, b] = await Promise.all([
401
+ D(),
402
+ I(),
403
+ M(),
404
+ A()
405
+ ]);
406
+ s || Object.assign(o, {
407
+ isIncognito: m,
408
+ hasCamera: y.hasCamera,
409
+ hasMicrophone: y.hasMicrophone,
410
+ hasBattery: w.hasBattery,
411
+ batteryLevel: w.level,
412
+ batteryCharging: w.charging,
413
+ permissions: b
414
+ });
415
+ }, c = () => {
416
+ typeof navigator > "u" || typeof window > "u" || Object.assign(o, {
417
+ network: P(),
418
+ performance: T(),
392
419
  pageVisibility: document.visibilityState === "visible" ? "visible" : "hidden"
393
420
  });
421
+ }, p = () => {
422
+ if (!r)
423
+ return;
424
+ const m = () => {
425
+ a();
426
+ };
427
+ if (f) {
428
+ C(m);
429
+ return;
430
+ }
431
+ m();
394
432
  };
395
433
  if (n && typeof document < "u") {
396
- const g = () => {
397
- t.pageVisibility = document.visibilityState === "visible" ? "visible" : "hidden";
434
+ const m = () => {
435
+ o.pageVisibility = document.visibilityState === "visible" ? "visible" : "hidden";
398
436
  };
399
- document.addEventListener && (document.addEventListener("visibilitychange", g), o = g);
437
+ document.addEventListener("visibilitychange", m), d = m;
400
438
  }
401
- return r && typeof window < "u" && (i = window.setInterval(() => {
402
- s();
403
- }, c)), (async () => {
404
- await a(), s();
439
+ return t && typeof window < "u" && (u = setInterval(c, i)), (() => {
440
+ l(), c(), p();
405
441
  })(), {
406
- // Full analytics data
407
- data: t,
408
- // Utility methods
442
+ data: o,
409
443
  refresh: async () => {
410
- await a(), s();
444
+ l(), c(), await a();
411
445
  },
412
446
  destroy: () => {
413
- i !== null && (clearInterval(i), i = null), o && typeof document < "u" && (document.removeEventListener("visibilitychange", o), o = null);
447
+ s = !0, u !== null && (clearInterval(u), u = null), d && typeof document < "u" && (document.removeEventListener("visibilitychange", d), d = null);
414
448
  },
415
- // Common properties for quick access
416
449
  get isMobile() {
417
- return t.device.isMobile;
450
+ return o.device.isMobile;
418
451
  },
419
452
  get isTablet() {
420
- return t.device.isTablet;
453
+ return o.device.isTablet;
421
454
  },
422
455
  get isDesktop() {
423
- return t.device.isDesktop;
456
+ return o.device.isDesktop;
424
457
  },
425
458
  get isOnline() {
426
- return t.network.online;
459
+ return o.network.online;
427
460
  },
428
461
  get isVisible() {
429
- return t.pageVisibility === "visible";
462
+ return o.pageVisibility === "visible";
430
463
  },
431
464
  get browserName() {
432
- return t.browser.name;
465
+ return o.browser.name;
433
466
  },
434
467
  get osName() {
435
- return t.os.name;
468
+ return o.os.name;
436
469
  }
437
470
  };
438
471
  }
439
472
  export {
440
- O as useSoloAnalytics
473
+ E as useSoloAnalytics
441
474
  };
442
475
  //# sourceMappingURL=solo-analytics.js.map