@junobuild/analytics 0.1.8 → 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.
Files changed (49) hide show
  1. package/dist/browser/chunk-YVLJX3HV.js +2 -0
  2. package/dist/browser/chunk-YVLJX3HV.js.map +7 -0
  3. package/dist/browser/chunk-ZUUQVOC7.js +2 -0
  4. package/dist/browser/chunk-ZUUQVOC7.js.map +7 -0
  5. package/dist/browser/index.js +1 -1
  6. package/dist/browser/index.js.map +4 -4
  7. package/dist/browser/tracker.js +2 -0
  8. package/dist/browser/tracker.js.map +7 -0
  9. package/dist/browser/ua-parser-GFKOYVJI.js +2 -0
  10. package/dist/browser/ua-parser-GFKOYVJI.js.map +7 -0
  11. package/dist/browser/web-vitals-YBMS6D2C.js +2 -0
  12. package/dist/browser/web-vitals-YBMS6D2C.js.map +7 -0
  13. package/dist/node/index.mjs +1 -1
  14. package/dist/node/index.mjs.map +4 -4
  15. package/dist/types/api/orbiter.api.d.ts +26 -0
  16. package/dist/types/constants/container.constants.d.ts +1 -0
  17. package/dist/types/index.d.ts +8 -3
  18. package/dist/types/services/orbiter.services.d.ts +10 -0
  19. package/dist/types/services/performance.services.d.ts +11 -1
  20. package/dist/types/services/user-agent.services.d.ts +4 -0
  21. package/dist/types/tracker.d.ts +37 -0
  22. package/dist/types/types/env.d.ts +10 -25
  23. package/dist/types/types/orbiter.d.ts +95 -0
  24. package/dist/types/types/track.d.ts +2 -4
  25. package/dist/types/utils/analytics.utils.d.ts +2 -3
  26. package/dist/types/utils/dfinity/asserts.utils.d.ts +7 -0
  27. package/dist/types/utils/dfinity/debounce.utils.d.ts +12 -0
  28. package/dist/types/utils/dfinity/json.utils.d.ts +25 -0
  29. package/dist/types/utils/dfinity/nullish.utils.d.ts +30 -0
  30. package/dist/types/utils/env.utils.d.ts +5 -0
  31. package/dist/types/utils/log.utils.d.ts +1 -1
  32. package/package.json +5 -10
  33. package/dist/browser/idb.services-CVJFLYYN.js +0 -2
  34. package/dist/browser/idb.services-CVJFLYYN.js.map +0 -7
  35. package/dist/browser/web-vitals-JGDN2KW5.js +0 -2
  36. package/dist/browser/web-vitals-JGDN2KW5.js.map +0 -7
  37. package/dist/declarations/orbiter/orbiter.did.d.ts +0 -229
  38. package/dist/declarations/orbiter/orbiter.factory.certified.did.js +0 -255
  39. package/dist/declarations/orbiter/orbiter.factory.did.js +0 -271
  40. package/dist/declarations/orbiter/orbiter.factory.did.mjs +0 -271
  41. package/dist/types/api/actor.api.d.ts +0 -3
  42. package/dist/types/services/analytics.services.d.ts +0 -25
  43. package/dist/types/services/idb.services.d.ts +0 -19
  44. package/dist/types/types/idb.d.ts +0 -12
  45. package/dist/types/types/post-message.d.ts +0 -7
  46. package/dist/types/utils/actor.utils.d.ts +0 -6
  47. package/dist/types/workers/analytics.worker.d.ts +0 -1
  48. package/dist/workers/analytics.worker.js +0 -89
  49. package/dist/workers/analytics.worker.js.map +0 -7
@@ -1,24 +1,3 @@
1
- /**
2
- * Represents the path to an environment worker.
3
- * @typedef {string} EnvironmentWorkerPath
4
- */
5
- export type EnvironmentWorkerPath = string;
6
- /**
7
- * Represents the configuration of an environment worker.
8
- * @interface EnvironmentWorker
9
- */
10
- export interface EnvironmentWorker {
11
- /**
12
- * The optional path to the worker.
13
- * @type {EnvironmentWorkerPath}
14
- */
15
- path?: EnvironmentWorkerPath;
16
- /**
17
- * The optional interval for the worker's timer, in milliseconds.
18
- * @type {number}
19
- */
20
- timerInterval?: number;
21
- }
22
1
  /**
23
2
  * The options to configure the environment of the library.
24
3
  * @interface EnvironmentOptions
@@ -26,10 +5,19 @@ export interface EnvironmentWorker {
26
5
  export interface EnvironmentOptions {
27
6
  /**
28
7
  * Enable or disable tracking performances with Web Vitals.
29
- * @default true By default, the performance tracking is enabled.
8
+ * @default false By default, the performance tracking is disabled.
30
9
  * @type {boolean}
31
10
  */
32
11
  performance?: boolean;
12
+ /**
13
+ * Enable or disable parsing the user agent string to extract device and browser information.
14
+ * Disabling this reduce the bundle size of the library and per extension improve the load performance of your app,
15
+ * that is why it's the default.
16
+ *
17
+ * @default false By default, parsing is disabled.
18
+ * @type {boolean}
19
+ */
20
+ userAgentParser?: boolean;
33
21
  }
34
22
  /**
35
23
  * Represents the actor environment configuration.
@@ -49,18 +37,15 @@ export interface EnvironmentActor {
49
37
  * @property {string} orbiterId - The ID of the orbiter.
50
38
  * @property {string} satelliteId - The ID of the satellite.
51
39
  * @property {boolean | string} [container] - Specifies whether the actor is running in a container or provides the container URL.
52
- * @property {EnvironmentWorker} [worker] - The configuration of the environment worker.
53
40
  * @property {EnvironmentOptions} [options] - The options of the analytics environment.
54
41
  */
55
42
  export type Environment = EnvironmentActor & {
56
- worker?: EnvironmentWorker;
57
43
  options?: EnvironmentOptions;
58
44
  };
59
45
  /**
60
46
  * Represents the user environment configuration.
61
47
  * @typedef {Object} UserEnvironment
62
48
  * @property {boolean | string} [container] - Specifies whether the actor is running in a container or provides the container URL.
63
- * @property {EnvironmentWorker} [worker] - The configuration of the environment worker.
64
49
  * @property {string} [orbiterId] - The ID of the orbiter.
65
50
  * @property {string} [satelliteId] - The ID of the satellite.
66
51
  */
@@ -0,0 +1,95 @@
1
+ export type SatelliteIdText = string;
2
+ export interface AnalyticKey {
3
+ key: string;
4
+ collected_at: bigint;
5
+ }
6
+ export interface PageViewDevicePayload {
7
+ inner_height: number;
8
+ inner_width: number;
9
+ screen_height?: number;
10
+ screen_width?: number;
11
+ }
12
+ export interface PageViewClientPayload {
13
+ browser: string;
14
+ os: string;
15
+ device?: string;
16
+ }
17
+ export interface SetPageViewRequestEntry {
18
+ key: AnalyticKey;
19
+ page_view: SetPageViewPayload;
20
+ }
21
+ export type SetPageViewRequest = {
22
+ satellite_id: SatelliteIdText;
23
+ } & SetPageViewRequestEntry;
24
+ export type SetPageViewsRequest = Pick<SetPageViewRequest, 'satellite_id'> & {
25
+ page_views: SetPageViewRequestEntry[];
26
+ };
27
+ export interface SetPageViewPayload {
28
+ title: string;
29
+ referrer?: string;
30
+ time_zone: string;
31
+ session_id: string;
32
+ href: string;
33
+ device: PageViewDevicePayload;
34
+ version?: bigint;
35
+ user_agent?: string;
36
+ client?: PageViewClientPayload;
37
+ }
38
+ export type PageViewPayload = SetPageViewPayload & {
39
+ updated_at: bigint;
40
+ created_at: bigint;
41
+ };
42
+ export interface SetTrackEventRequestEntry {
43
+ key: AnalyticKey;
44
+ track_event: SetTrackEventPayload;
45
+ }
46
+ export type SetTrackEventRequest = {
47
+ satellite_id: SatelliteIdText;
48
+ } & SetTrackEventRequestEntry;
49
+ export type SetTrackEventsRequest = Pick<SetPageViewRequest, 'satellite_id'> & {
50
+ track_events: SetTrackEventRequestEntry[];
51
+ };
52
+ export interface SetTrackEventPayload {
53
+ name: string;
54
+ metadata?: Record<string, string>;
55
+ session_id: string;
56
+ version?: bigint;
57
+ user_agent?: string;
58
+ }
59
+ export type TrackEventPayload = Omit<SetTrackEventPayload, 'user_agent'> & {
60
+ updated_at: bigint;
61
+ created_at: bigint;
62
+ };
63
+ export type PerformanceMetricNamePayload = 'CLS' | 'FCP' | 'INP' | 'LCP' | 'TTFB';
64
+ export type PerformanceDataPayload = {
65
+ WebVitalsMetric: WebVitalsMetricPayload;
66
+ };
67
+ export interface WebVitalsMetricPayload {
68
+ value: number;
69
+ delta: number;
70
+ id: string;
71
+ navigation_type?: NavigationTypePayload;
72
+ }
73
+ export type NavigationTypePayload = 'Navigate' | 'Reload' | 'BackForward' | 'BackForwardCache' | 'Prerender' | 'Restore';
74
+ export interface SetPerformanceMetricRequestEntry {
75
+ key: AnalyticKey;
76
+ performance_metric: SetPerformanceMetricPayload;
77
+ }
78
+ export type SetPerformanceMetricRequest = {
79
+ satellite_id: SatelliteIdText;
80
+ } & SetPerformanceMetricRequestEntry;
81
+ export type SetPerformanceMetricsRequest = Pick<SetPageViewRequest, 'satellite_id'> & {
82
+ performance_metrics: SetPerformanceMetricRequestEntry[];
83
+ };
84
+ export interface SetPerformanceMetricPayload {
85
+ href: string;
86
+ metric_name: PerformanceMetricNamePayload;
87
+ data: PerformanceDataPayload;
88
+ user_agent?: string;
89
+ session_id: string;
90
+ version?: bigint;
91
+ }
92
+ export type PerformanceMetricPayload = Omit<SetPerformanceMetricPayload, 'user_agent'> & {
93
+ updated_at: bigint;
94
+ created_at: bigint;
95
+ };
@@ -1,4 +1,2 @@
1
- export interface TrackEvent {
2
- name: string;
3
- metadata?: Record<string, string>;
4
- }
1
+ import type { SetTrackEventPayload } from './orbiter';
2
+ export type TrackEvent = Pick<SetTrackEventPayload, 'name' | 'metadata'>;
@@ -1,8 +1,7 @@
1
1
  export declare const timestamp: () => {
2
2
  collected_at: bigint;
3
- updated_at: [] | [bigint];
4
- version: [] | [bigint];
3
+ version?: bigint;
5
4
  };
6
5
  export declare const userAgent: () => {
7
- user_agent: [] | [string];
6
+ user_agent?: string;
8
7
  };
@@ -0,0 +1,7 @@
1
+ export declare class InvalidPercentageError extends Error {
2
+ }
3
+ export declare class NullishError extends Error {
4
+ }
5
+ export declare const assertNonNullish: <T>(value: T, message?: string) => asserts value is NonNullable<T>;
6
+ export declare const asNonNullish: <T>(value: T, message?: string) => NonNullable<T>;
7
+ export declare const assertPercentageNumber: (percentage: number) => void;
@@ -0,0 +1,12 @@
1
+ /**
2
+ * Creates a debounced version of the provided function.
3
+ *
4
+ * The debounced function postpones its execution until after a certain amount of time
5
+ * has elapsed since the last time it was invoked. This is useful for limiting the rate
6
+ * at which a function is called (e.g. in response to user input or events).
7
+ *
8
+ * @param {Function} func - The function to debounce. It will only be called after no new calls happen within the specified timeout.
9
+ * @param {number} [timeout=300] - The debounce delay in milliseconds. Defaults to 300ms if not provided or invalid.
10
+ * @returns {(args: unknown[]) => void} A debounced version of the original function.
11
+ */
12
+ export declare const debounce: (func: Function, timeout?: number) => (...args: unknown[]) => void;
@@ -0,0 +1,25 @@
1
+ /**
2
+ * A custom replacer for `JSON.stringify` that converts specific types not natively supported
3
+ * by the API into JSON-compatible formats.
4
+ *
5
+ * Supported conversions:
6
+ * - `BigInt` → `{ "__bigint__": string }`
7
+ *
8
+ * @param {string} _key - Ignored. Only provided for API compatibility.
9
+ * @param {unknown} value - The value to transform before stringification.
10
+ * @returns {unknown} The transformed value if it matches a known type, otherwise the original value.
11
+ */
12
+ export declare const jsonReplacer: (_key: string, value: unknown) => unknown;
13
+ /**
14
+ * A custom reviver for `JSON.parse` that reconstructs specific types from their JSON-encoded representations.
15
+ *
16
+ * This reverses the transformations applied by `jsonReplacer`, restoring the original types.
17
+ *
18
+ * Supported conversions:
19
+ * - `{ "__bigint__": string }` → `BigInt`
20
+ *
21
+ * @param {string} _key - Ignored but provided for API compatibility.
22
+ * @param {unknown} value - The parsed value to transform.
23
+ * @returns {unknown} The reconstructed value if it matches a known type, otherwise the original value.
24
+ */
25
+ export declare const jsonReviver: (_key: string, value: unknown) => unknown;
@@ -0,0 +1,30 @@
1
+ /**
2
+ * Checks if a given argument is null or undefined.
3
+ *
4
+ * @template T - The type of the argument.
5
+ * @param {T | undefined | null} argument - The argument to check.
6
+ * @returns {argument is undefined | null} `true` if the argument is null or undefined; otherwise, `false`.
7
+ */
8
+ export declare const isNullish: <T>(argument: T | undefined | null) => argument is undefined | null;
9
+ /**
10
+ * Checks if a given argument is neither null nor undefined.
11
+ *
12
+ * @template T - The type of the argument.
13
+ * @param {T | undefined | null} argument - The argument to check.
14
+ * @returns {argument is NonNullable<T>} `true` if the argument is not null or undefined; otherwise, `false`.
15
+ */
16
+ export declare const nonNullish: <T>(argument: T | undefined | null) => argument is NonNullable<T>;
17
+ /**
18
+ * Checks if a given value is not null, not undefined, and not an empty string.
19
+ *
20
+ * @param {string | undefined | null} value - The value to check.
21
+ * @returns {boolean} `true` if the value is not null, not undefined, and not an empty string; otherwise, `false`.
22
+ */
23
+ export declare const notEmptyString: (value: string | undefined | null) => value is string;
24
+ /**
25
+ * Checks if a given value is null, undefined, or an empty string.
26
+ *
27
+ * @param {string | undefined | null} value - The value to check.
28
+ * @returns {value is undefined | null | ""} Type predicate indicating if the value is null, undefined, or an empty string.
29
+ */
30
+ export declare const isEmptyString: (value: string | undefined | null) => value is undefined | null | "";
@@ -0,0 +1,5 @@
1
+ /**
2
+ * Checks if the current environment is a browser.
3
+ * @returns {boolean} True if the current environment is a browser, false otherwise.
4
+ */
5
+ export declare const isBrowser: () => boolean;
@@ -1 +1 @@
1
- export declare const warningWorkerNotInitialized: <T>(value: T) => void;
1
+ export declare const warningOrbiterServicesNotInitialized: <T>(value: T) => void;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@junobuild/analytics",
3
- "version": "0.1.8",
3
+ "version": "0.2.0",
4
4
  "description": "Tracker for Juno analytics",
5
5
  "author": "David Dal Busco (https://daviddalbusco.com)",
6
6
  "license": "MIT",
@@ -28,7 +28,7 @@
28
28
  "scripts": {
29
29
  "rmdir": "node ../../scripts/rmdir.mjs",
30
30
  "ts-declaration": "tsc --emitDeclarationOnly --outDir dist/types",
31
- "build": "npm run rmdir && mkdir -p dist && cp -R declarations dist && node esbuild.mjs && npm run ts-declaration",
31
+ "build": "npm run rmdir && mkdir -p dist && node esbuild.mjs && npm run ts-declaration",
32
32
  "prepack": "npm run build"
33
33
  },
34
34
  "repository": {
@@ -54,17 +54,12 @@
54
54
  ],
55
55
  "homepage": "https://juno.build",
56
56
  "dependencies": {
57
- "idb-keyval": "^6.2.1",
58
57
  "isbot": "^5.1.25",
59
58
  "nanoid": "^5.1.5",
59
+ "ua-parser-js": "^1.0.40",
60
60
  "web-vitals": "^4.2.4"
61
61
  },
62
- "peerDependencies": {
63
- "@dfinity/agent": "^2.3.0",
64
- "@dfinity/candid": "^2.3.0",
65
- "@dfinity/identity": "^2.3.0",
66
- "@dfinity/principal": "^2.3.0",
67
- "@dfinity/utils": "^2",
68
- "@junobuild/utils": "*"
62
+ "devDependencies": {
63
+ "@types/ua-parser-js": "^0.7.39"
69
64
  }
70
65
  }
@@ -1,2 +0,0 @@
1
- function i(e){return new Promise((t,r)=>{e.oncomplete=e.onsuccess=()=>t(e.result),e.onabort=e.onerror=()=>r(e.error)})}function c(e,t){let r=indexedDB.open(e);r.onupgradeneeded=()=>r.result.createObjectStore(t);let n=i(r);return(o,l)=>n.then(d=>l(d.transaction(t,o).objectStore(t)))}var f;function y(){return f||(f=c("keyval-store","keyval")),f}function a(e,t,r=y()){return r("readwrite",n=>(n.put(t,e),i(n.transaction)))}function s(e,t=y()){return t("readwrite",r=>(e.forEach(n=>r.delete(n)),i(r.transaction)))}function P(e,t){return e.openCursor().onsuccess=function(){this.result&&(t(this.result),this.result.continue())},i(e.transaction)}function u(e=y()){return e("readonly",t=>{if(t.getAll&&t.getAllKeys)return Promise.all([i(t.getAllKeys()),i(t.getAll())]).then(([n,o])=>n.map((l,d)=>[l,o[d]]));let r=[];return e("readonly",n=>P(n,o=>r.push([o.key,o.value])).then(()=>r))})}var m=c("juno-views","views"),p=c("juno-events","events"),v=c("juno-metrics","metrics"),I=({key:e,view:t})=>a(e,t,m),b=()=>u(m),h=e=>s(e,m),k=({key:e,track:t})=>a(e,t,p),K=()=>u(p),V=e=>s(e,p),x=({key:e,view:t})=>a(e,t,v),M=()=>u(v),A=e=>s(e,v);export{h as delPageViews,A as delPerformanceMetrics,V as delTrackEvents,b as getPageViews,M as getPerformanceMetrics,K as getTrackEvents,I as setPageView,x as setPerformanceMetric,k as setTrackEvent};
2
- //# sourceMappingURL=idb.services-CVJFLYYN.js.map
@@ -1,7 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../../../../node_modules/idb-keyval/dist/index.js", "../../src/services/idb.services.ts"],
4
- "sourcesContent": ["function promisifyRequest(request) {\n return new Promise((resolve, reject) => {\n // @ts-ignore - file size hacks\n request.oncomplete = request.onsuccess = () => resolve(request.result);\n // @ts-ignore - file size hacks\n request.onabort = request.onerror = () => reject(request.error);\n });\n}\nfunction createStore(dbName, storeName) {\n const request = indexedDB.open(dbName);\n request.onupgradeneeded = () => request.result.createObjectStore(storeName);\n const dbp = promisifyRequest(request);\n return (txMode, callback) => dbp.then((db) => callback(db.transaction(storeName, txMode).objectStore(storeName)));\n}\nlet defaultGetStoreFunc;\nfunction defaultGetStore() {\n if (!defaultGetStoreFunc) {\n defaultGetStoreFunc = createStore('keyval-store', 'keyval');\n }\n return defaultGetStoreFunc;\n}\n/**\n * Get a value by its key.\n *\n * @param key\n * @param customStore Method to get a custom store. Use with caution (see the docs).\n */\nfunction get(key, customStore = defaultGetStore()) {\n return customStore('readonly', (store) => promisifyRequest(store.get(key)));\n}\n/**\n * Set a value with a key.\n *\n * @param key\n * @param value\n * @param customStore Method to get a custom store. Use with caution (see the docs).\n */\nfunction set(key, value, customStore = defaultGetStore()) {\n return customStore('readwrite', (store) => {\n store.put(value, key);\n return promisifyRequest(store.transaction);\n });\n}\n/**\n * Set multiple values at once. This is faster than calling set() multiple times.\n * It's also atomic \u2013 if one of the pairs can't be added, none will be added.\n *\n * @param entries Array of entries, where each entry is an array of `[key, value]`.\n * @param customStore Method to get a custom store. Use with caution (see the docs).\n */\nfunction setMany(entries, customStore = defaultGetStore()) {\n return customStore('readwrite', (store) => {\n entries.forEach((entry) => store.put(entry[1], entry[0]));\n return promisifyRequest(store.transaction);\n });\n}\n/**\n * Get multiple values by their keys\n *\n * @param keys\n * @param customStore Method to get a custom store. Use with caution (see the docs).\n */\nfunction getMany(keys, customStore = defaultGetStore()) {\n return customStore('readonly', (store) => Promise.all(keys.map((key) => promisifyRequest(store.get(key)))));\n}\n/**\n * Update a value. This lets you see the old value and update it as an atomic operation.\n *\n * @param key\n * @param updater A callback that takes the old value and returns a new value.\n * @param customStore Method to get a custom store. Use with caution (see the docs).\n */\nfunction update(key, updater, customStore = defaultGetStore()) {\n return customStore('readwrite', (store) => \n // Need to create the promise manually.\n // If I try to chain promises, the transaction closes in browsers\n // that use a promise polyfill (IE10/11).\n new Promise((resolve, reject) => {\n store.get(key).onsuccess = function () {\n try {\n store.put(updater(this.result), key);\n resolve(promisifyRequest(store.transaction));\n }\n catch (err) {\n reject(err);\n }\n };\n }));\n}\n/**\n * Delete a particular key from the store.\n *\n * @param key\n * @param customStore Method to get a custom store. Use with caution (see the docs).\n */\nfunction del(key, customStore = defaultGetStore()) {\n return customStore('readwrite', (store) => {\n store.delete(key);\n return promisifyRequest(store.transaction);\n });\n}\n/**\n * Delete multiple keys at once.\n *\n * @param keys List of keys to delete.\n * @param customStore Method to get a custom store. Use with caution (see the docs).\n */\nfunction delMany(keys, customStore = defaultGetStore()) {\n return customStore('readwrite', (store) => {\n keys.forEach((key) => store.delete(key));\n return promisifyRequest(store.transaction);\n });\n}\n/**\n * Clear all values in the store.\n *\n * @param customStore Method to get a custom store. Use with caution (see the docs).\n */\nfunction clear(customStore = defaultGetStore()) {\n return customStore('readwrite', (store) => {\n store.clear();\n return promisifyRequest(store.transaction);\n });\n}\nfunction eachCursor(store, callback) {\n store.openCursor().onsuccess = function () {\n if (!this.result)\n return;\n callback(this.result);\n this.result.continue();\n };\n return promisifyRequest(store.transaction);\n}\n/**\n * Get all keys in the store.\n *\n * @param customStore Method to get a custom store. Use with caution (see the docs).\n */\nfunction keys(customStore = defaultGetStore()) {\n return customStore('readonly', (store) => {\n // Fast path for modern browsers\n if (store.getAllKeys) {\n return promisifyRequest(store.getAllKeys());\n }\n const items = [];\n return eachCursor(store, (cursor) => items.push(cursor.key)).then(() => items);\n });\n}\n/**\n * Get all values in the store.\n *\n * @param customStore Method to get a custom store. Use with caution (see the docs).\n */\nfunction values(customStore = defaultGetStore()) {\n return customStore('readonly', (store) => {\n // Fast path for modern browsers\n if (store.getAll) {\n return promisifyRequest(store.getAll());\n }\n const items = [];\n return eachCursor(store, (cursor) => items.push(cursor.value)).then(() => items);\n });\n}\n/**\n * Get all entries in the store. Each entry is an array of `[key, value]`.\n *\n * @param customStore Method to get a custom store. Use with caution (see the docs).\n */\nfunction entries(customStore = defaultGetStore()) {\n return customStore('readonly', (store) => {\n // Fast path for modern browsers\n // (although, hopefully we'll get a simpler path some day)\n if (store.getAll && store.getAllKeys) {\n return Promise.all([\n promisifyRequest(store.getAllKeys()),\n promisifyRequest(store.getAll()),\n ]).then(([keys, values]) => keys.map((key, i) => [key, values[i]]));\n }\n const items = [];\n return customStore('readonly', (store) => eachCursor(store, (cursor) => items.push([cursor.key, cursor.value])).then(() => items));\n });\n}\n\nexport { clear, createStore, del, delMany, entries, get, getMany, keys, promisifyRequest, set, setMany, update, values };\n", "import {createStore, delMany, entries, set} from 'idb-keyval';\nimport type {IdbKey, IdbPageView, IdbPerformanceMetric, IdbTrackEvent} from '../types/idb';\n\nconst viewsStore = createStore('juno-views', 'views');\nconst eventsStore = createStore('juno-events', 'events');\nconst metricsStore = createStore('juno-metrics', 'metrics');\n\nexport const setPageView = ({key, view}: {key: IdbKey; view: IdbPageView}): Promise<void> =>\n set(key, view, viewsStore);\n\nexport const getPageViews = (): Promise<[IDBValidKey, IdbPageView][]> => entries(viewsStore);\n\nexport const delPageViews = (keys: IDBValidKey[]): Promise<void> => delMany(keys, viewsStore);\n\nexport const setTrackEvent = ({key, track}: {key: IdbKey; track: IdbTrackEvent}): Promise<void> =>\n set(key, track, eventsStore);\n\nexport const getTrackEvents = (): Promise<[IDBValidKey, IdbTrackEvent][]> => entries(eventsStore);\n\nexport const delTrackEvents = (keys: IDBValidKey[]): Promise<void> => delMany(keys, eventsStore);\n\nexport const setPerformanceMetric = ({\n key,\n view\n}: {\n key: IdbKey;\n view: IdbPerformanceMetric;\n}): Promise<void> => set(key, view, metricsStore);\n\nexport const getPerformanceMetrics = (): Promise<[IDBValidKey, IdbPerformanceMetric][]> =>\n entries(metricsStore);\n\nexport const delPerformanceMetrics = (keys: IDBValidKey[]): Promise<void> =>\n delMany(keys, metricsStore);\n"],
5
- "mappings": "AAAA,SAASA,EAAiBC,EAAS,CAC/B,OAAO,IAAI,QAAQ,CAACC,EAASC,IAAW,CAEpCF,EAAQ,WAAaA,EAAQ,UAAY,IAAMC,EAAQD,EAAQ,MAAM,EAErEA,EAAQ,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CAACD,EAAKD,EAAOE,CAAC,CAAC,CAAC,CAAC,EAEtE,IAAMC,EAAQ,CAAC,EACf,OAAOR,EAAY,WAAaE,GAAUO,EAAWP,EAAQQ,GAAWF,EAAM,KAAK,CAACE,EAAO,IAAKA,EAAO,KAAK,CAAC,CAAC,EAAE,KAAK,IAAMF,CAAK,CAAC,CACrI,CAAC,CACL,CClLA,IAAMG,EAAaC,EAAY,aAAc,OAAO,EAC9CC,EAAcD,EAAY,cAAe,QAAQ,EACjDE,EAAeF,EAAY,eAAgB,SAAS,EAE7CG,EAAc,CAAC,CAAC,IAAAC,EAAK,KAAAC,CAAI,IACpCC,EAAIF,EAAKC,EAAMN,CAAU,EAEdQ,EAAe,IAA6CC,EAAQT,CAAU,EAE9EU,EAAgBC,GAAuCC,EAAQD,EAAMX,CAAU,EAE/Ea,EAAgB,CAAC,CAAC,IAAAR,EAAK,MAAAS,CAAK,IACvCP,EAAIF,EAAKS,EAAOZ,CAAW,EAEhBa,EAAiB,IAA+CN,EAAQP,CAAW,EAEnFc,EAAkBL,GAAuCC,EAAQD,EAAMT,CAAW,EAElFe,EAAuB,CAAC,CACnC,IAAAZ,EACA,KAAAC,CACF,IAGqBC,EAAIF,EAAKC,EAAMH,CAAY,EAEnCe,EAAwB,IACnCT,EAAQN,CAAY,EAETgB,EAAyBR,GACpCC,EAAQD,EAAMR,CAAY",
6
- "names": ["promisifyRequest", "request", "resolve", "reject", "createStore", "dbName", "storeName", "dbp", "txMode", "callback", "db", "defaultGetStoreFunc", "defaultGetStore", "set", "key", "value", "customStore", "defaultGetStore", "store", "promisifyRequest", "delMany", "keys", "customStore", "defaultGetStore", "store", "key", "promisifyRequest", "eachCursor", "store", "callback", "promisifyRequest", "entries", "customStore", "defaultGetStore", "store", "promisifyRequest", "keys", "values", "key", "i", "items", "eachCursor", "cursor", "viewsStore", "createStore", "eventsStore", "metricsStore", "setPageView", "key", "view", "set", "getPageViews", "entries", "delPageViews", "keys", "delMany", "setTrackEvent", "track", "getTrackEvents", "delTrackEvents", "setPerformanceMetric", "getPerformanceMetrics", "delPerformanceMetrics"]
7
- }
@@ -1,2 +0,0 @@
1
- var F,p,T,z,S,G=-1,v=function(n){addEventListener("pageshow",function(t){t.persisted&&(G=t.timeStamp,n(t))},!0)},M=function(){var n=self.performance&&performance.getEntriesByType&&performance.getEntriesByType("navigation")[0];if(n&&n.responseStart>0&&n.responseStart<performance.now())return n},w=function(){var n=M();return n&&n.activationStart||0},s=function(n,t){var r=M(),i="navigate";return G>=0?i="back-forward-cache":r&&(document.prerendering||w()>0?i="prerender":document.wasDiscarded?i="restore":r.type&&(i=r.type.replace(/_/g,"-"))),{name:n,value:t===void 0?-1:t,rating:"good",delta:0,entries:[],id:"v4-".concat(Date.now(),"-").concat(Math.floor(8999999999999*Math.random())+1e12),navigationType:i}},h=function(n,t,r){try{if(PerformanceObserver.supportedEntryTypes.includes(n)){var i=new PerformanceObserver(function(e){Promise.resolve().then(function(){t(e.getEntries())})});return i.observe(Object.assign({type:n,buffered:!0},r||{})),i}}catch{}},f=function(n,t,r,i){var e,a;return function(c){t.value>=0&&(c||i)&&((a=t.value-(e||0))||e===void 0)&&(e=t.value,t.delta=a,t.rating=function(u,o){return u>o[1]?"poor":u>o[0]?"needs-improvement":"good"}(t.value,r),n(t))}},k=function(n){requestAnimationFrame(function(){return requestAnimationFrame(function(){return n()})})},y=function(n){document.addEventListener("visibilitychange",function(){document.visibilityState==="hidden"&&n()})},I=function(n){var t=!1;return function(){t||(n(),t=!0)}},m=-1,B=function(){return document.visibilityState!=="hidden"||document.prerendering?1/0:0},b=function(n){document.visibilityState==="hidden"&&m>-1&&(m=n.type==="visibilitychange"?n.timeStamp:0,Z())},x=function(){addEventListener("visibilitychange",b,!0),addEventListener("prerenderingchange",b,!0)},Z=function(){removeEventListener("visibilitychange",b,!0),removeEventListener("prerenderingchange",b,!0)},D=function(){return m<0&&(m=B(),x(),v(function(){setTimeout(function(){m=B(),x()},0)})),{get firstHiddenTime(){return m}}},E=function(n){document.prerendering?addEventListener("prerenderingchange",function(){return n()},!0):n()},R=[1800,3e3],$=function(n,t){t=t||{},E(function(){var r,i=D(),e=s("FCP"),a=h("paint",function(c){c.forEach(function(u){u.name==="first-contentful-paint"&&(a.disconnect(),u.startTime<i.firstHiddenTime&&(e.value=Math.max(u.startTime-w(),0),e.entries.push(u),r(!0)))})});a&&(r=f(n,e,R,t.reportAllChanges),v(function(c){e=s("FCP"),r=f(n,e,R,t.reportAllChanges),k(function(){e.value=performance.now()-c.timeStamp,r(!0)})}))})},H=[.1,.25],sn=function(n,t){t=t||{},$(I(function(){var r,i=s("CLS",0),e=0,a=[],c=function(o){o.forEach(function(d){if(!d.hadRecentInput){var X=a[0],Y=a[a.length-1];e&&d.startTime-Y.startTime<1e3&&d.startTime-X.startTime<5e3?(e+=d.value,a.push(d)):(e=d.value,a=[d])}}),e>i.value&&(i.value=e,i.entries=a,r())},u=h("layout-shift",c);u&&(r=f(n,i,H,t.reportAllChanges),y(function(){c(u.takeRecords()),r(!0)}),v(function(){e=0,i=s("CLS",0),r=f(n,i,H,t.reportAllChanges),k(function(){return r()})}),setTimeout(r,0))}))},J=0,P=1/0,C=0,nn=function(n){n.forEach(function(t){t.interactionId&&(P=Math.min(P,t.interactionId),C=Math.max(C,t.interactionId),J=C?(C-P)/7+1:0)})},K=function(){return F?J:performance.interactionCount||0},tn=function(){"interactionCount"in performance||F||(F=h("event",nn,{type:"event",buffered:!0,durationThreshold:0}))},l=[],L=new Map,Q=0,en=function(){var n=Math.min(l.length-1,Math.floor((K()-Q)/50));return l[n]},rn=[],on=function(n){if(rn.forEach(function(e){return e(n)}),n.interactionId||n.entryType==="first-input"){var t=l[l.length-1],r=L.get(n.interactionId);if(r||l.length<10||n.duration>t.latency){if(r)n.duration>r.latency?(r.entries=[n],r.latency=n.duration):n.duration===r.latency&&n.startTime===r.entries[0].startTime&&r.entries.push(n);else{var i={id:n.interactionId,latency:n.duration,entries:[n]};L.set(i.id,i),l.push(i)}l.sort(function(e,a){return a.latency-e.latency}),l.length>10&&l.splice(10).forEach(function(e){return L.delete(e.id)})}}},U=function(n){var t=self.requestIdleCallback||self.setTimeout,r=-1;return n=I(n),document.visibilityState==="hidden"?n():(r=t(n),y(n)),r},N=[200,500],fn=function(n,t){"PerformanceEventTiming"in self&&"interactionId"in PerformanceEventTiming.prototype&&(t=t||{},E(function(){var r;tn();var i,e=s("INP"),a=function(u){U(function(){u.forEach(on);var o=en();o&&o.latency!==e.value&&(e.value=o.latency,e.entries=o.entries,i())})},c=h("event",a,{durationThreshold:(r=t.durationThreshold)!==null&&r!==void 0?r:40});i=f(n,e,N,t.reportAllChanges),c&&(c.observe({type:"first-input",buffered:!0}),y(function(){a(c.takeRecords()),i(!0)}),v(function(){Q=K(),l.length=0,L.clear(),e=s("INP"),i=f(n,e,N,t.reportAllChanges)}))}))},q=[2500,4e3],A={},dn=function(n,t){t=t||{},E(function(){var r,i=D(),e=s("LCP"),a=function(o){t.reportAllChanges||(o=o.slice(-1)),o.forEach(function(d){d.startTime<i.firstHiddenTime&&(e.value=Math.max(d.startTime-w(),0),e.entries=[d],r())})},c=h("largest-contentful-paint",a);if(c){r=f(n,e,q,t.reportAllChanges);var u=I(function(){A[e.id]||(a(c.takeRecords()),c.disconnect(),A[e.id]=!0,r(!0))});["keydown","click"].forEach(function(o){addEventListener(o,function(){return U(u)},{once:!0,capture:!0})}),y(u),v(function(o){e=s("LCP"),r=f(n,e,q,t.reportAllChanges),k(function(){e.value=performance.now()-o.timeStamp,A[e.id]=!0,r(!0)})})}})},O=[800,1800],an=function n(t){document.prerendering?E(function(){return n(t)}):document.readyState!=="complete"?addEventListener("load",function(){return n(t)},!0):setTimeout(t,0)},ln=function(n,t){t=t||{};var r=s("TTFB"),i=f(n,r,O,t.reportAllChanges);an(function(){var e=M();e&&(r.value=Math.max(e.responseStart-w(),0),r.entries=[e],i(!0),v(function(){r=s("TTFB",0),(i=f(n,r,O,t.reportAllChanges))(!0)}))})},g={passive:!0,capture:!0},cn=new Date,j=function(n,t){p||(p=t,T=n,z=new Date,W(removeEventListener),V())},V=function(){if(T>=0&&T<z-cn){var n={entryType:"first-input",name:p.type,target:p.target,cancelable:p.cancelable,startTime:p.timeStamp,processingStart:p.timeStamp+T};S.forEach(function(t){t(n)}),S=[]}},un=function(n){if(n.cancelable){var t=(n.timeStamp>1e12?new Date:performance.now())-n.timeStamp;n.type=="pointerdown"?function(r,i){var e=function(){j(r,i),c()},a=function(){c()},c=function(){removeEventListener("pointerup",e,g),removeEventListener("pointercancel",a,g)};addEventListener("pointerup",e,g),addEventListener("pointercancel",a,g)}(t,n):j(t,n)}},W=function(n){["mousedown","keydown","touchstart","pointerdown"].forEach(function(t){return n(t,un,g)})},_=[100,300],pn=function(n,t){t=t||{},E(function(){var r,i=D(),e=s("FID"),a=function(o){o.startTime<i.firstHiddenTime&&(e.value=o.processingStart-o.startTime,e.entries.push(o),r(!0))},c=function(o){o.forEach(a)},u=h("first-input",c);r=f(n,e,_,t.reportAllChanges),u&&(y(I(function(){c(u.takeRecords()),u.disconnect()})),v(function(){var o;e=s("FID"),r=f(n,e,_,t.reportAllChanges),S=[],T=-1,p=null,W(addEventListener),o=a,S.push(o),V()}))})};export{H as CLSThresholds,R as FCPThresholds,_ as FIDThresholds,N as INPThresholds,q as LCPThresholds,O as TTFBThresholds,sn as onCLS,$ as onFCP,pn as onFID,fn as onINP,dn as onLCP,ln as onTTFB};
2
- //# sourceMappingURL=web-vitals-JGDN2KW5.js.map
@@ -1,7 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../../../../node_modules/web-vitals/dist/web-vitals.js"],
4
- "sourcesContent": ["var e,n,t,r,i,o=-1,a=function(e){addEventListener(\"pageshow\",(function(n){n.persisted&&(o=n.timeStamp,e(n))}),!0)},c=function(){var e=self.performance&&performance.getEntriesByType&&performance.getEntriesByType(\"navigation\")[0];if(e&&e.responseStart>0&&e.responseStart<performance.now())return e},u=function(){var e=c();return e&&e.activationStart||0},f=function(e,n){var t=c(),r=\"navigate\";o>=0?r=\"back-forward-cache\":t&&(document.prerendering||u()>0?r=\"prerender\":document.wasDiscarded?r=\"restore\":t.type&&(r=t.type.replace(/_/g,\"-\")));return{name:e,value:void 0===n?-1:n,rating:\"good\",delta:0,entries:[],id:\"v4-\".concat(Date.now(),\"-\").concat(Math.floor(8999999999999*Math.random())+1e12),navigationType:r}},s=function(e,n,t){try{if(PerformanceObserver.supportedEntryTypes.includes(e)){var r=new PerformanceObserver((function(e){Promise.resolve().then((function(){n(e.getEntries())}))}));return r.observe(Object.assign({type:e,buffered:!0},t||{})),r}}catch(e){}},d=function(e,n,t,r){var i,o;return function(a){n.value>=0&&(a||r)&&((o=n.value-(i||0))||void 0===i)&&(i=n.value,n.delta=o,n.rating=function(e,n){return e>n[1]?\"poor\":e>n[0]?\"needs-improvement\":\"good\"}(n.value,t),e(n))}},l=function(e){requestAnimationFrame((function(){return requestAnimationFrame((function(){return e()}))}))},p=function(e){document.addEventListener(\"visibilitychange\",(function(){\"hidden\"===document.visibilityState&&e()}))},v=function(e){var n=!1;return function(){n||(e(),n=!0)}},m=-1,h=function(){return\"hidden\"!==document.visibilityState||document.prerendering?1/0:0},g=function(e){\"hidden\"===document.visibilityState&&m>-1&&(m=\"visibilitychange\"===e.type?e.timeStamp:0,T())},y=function(){addEventListener(\"visibilitychange\",g,!0),addEventListener(\"prerenderingchange\",g,!0)},T=function(){removeEventListener(\"visibilitychange\",g,!0),removeEventListener(\"prerenderingchange\",g,!0)},E=function(){return m<0&&(m=h(),y(),a((function(){setTimeout((function(){m=h(),y()}),0)}))),{get firstHiddenTime(){return m}}},C=function(e){document.prerendering?addEventListener(\"prerenderingchange\",(function(){return e()}),!0):e()},b=[1800,3e3],S=function(e,n){n=n||{},C((function(){var t,r=E(),i=f(\"FCP\"),o=s(\"paint\",(function(e){e.forEach((function(e){\"first-contentful-paint\"===e.name&&(o.disconnect(),e.startTime<r.firstHiddenTime&&(i.value=Math.max(e.startTime-u(),0),i.entries.push(e),t(!0)))}))}));o&&(t=d(e,i,b,n.reportAllChanges),a((function(r){i=f(\"FCP\"),t=d(e,i,b,n.reportAllChanges),l((function(){i.value=performance.now()-r.timeStamp,t(!0)}))})))}))},L=[.1,.25],w=function(e,n){n=n||{},S(v((function(){var t,r=f(\"CLS\",0),i=0,o=[],c=function(e){e.forEach((function(e){if(!e.hadRecentInput){var n=o[0],t=o[o.length-1];i&&e.startTime-t.startTime<1e3&&e.startTime-n.startTime<5e3?(i+=e.value,o.push(e)):(i=e.value,o=[e])}})),i>r.value&&(r.value=i,r.entries=o,t())},u=s(\"layout-shift\",c);u&&(t=d(e,r,L,n.reportAllChanges),p((function(){c(u.takeRecords()),t(!0)})),a((function(){i=0,r=f(\"CLS\",0),t=d(e,r,L,n.reportAllChanges),l((function(){return t()}))})),setTimeout(t,0))})))},A=0,I=1/0,P=0,M=function(e){e.forEach((function(e){e.interactionId&&(I=Math.min(I,e.interactionId),P=Math.max(P,e.interactionId),A=P?(P-I)/7+1:0)}))},k=function(){return e?A:performance.interactionCount||0},F=function(){\"interactionCount\"in performance||e||(e=s(\"event\",M,{type:\"event\",buffered:!0,durationThreshold:0}))},D=[],x=new Map,R=0,B=function(){var e=Math.min(D.length-1,Math.floor((k()-R)/50));return D[e]},H=[],q=function(e){if(H.forEach((function(n){return n(e)})),e.interactionId||\"first-input\"===e.entryType){var n=D[D.length-1],t=x.get(e.interactionId);if(t||D.length<10||e.duration>n.latency){if(t)e.duration>t.latency?(t.entries=[e],t.latency=e.duration):e.duration===t.latency&&e.startTime===t.entries[0].startTime&&t.entries.push(e);else{var r={id:e.interactionId,latency:e.duration,entries:[e]};x.set(r.id,r),D.push(r)}D.sort((function(e,n){return n.latency-e.latency})),D.length>10&&D.splice(10).forEach((function(e){return x.delete(e.id)}))}}},O=function(e){var n=self.requestIdleCallback||self.setTimeout,t=-1;return e=v(e),\"hidden\"===document.visibilityState?e():(t=n(e),p(e)),t},N=[200,500],j=function(e,n){\"PerformanceEventTiming\"in self&&\"interactionId\"in PerformanceEventTiming.prototype&&(n=n||{},C((function(){var t;F();var r,i=f(\"INP\"),o=function(e){O((function(){e.forEach(q);var n=B();n&&n.latency!==i.value&&(i.value=n.latency,i.entries=n.entries,r())}))},c=s(\"event\",o,{durationThreshold:null!==(t=n.durationThreshold)&&void 0!==t?t:40});r=d(e,i,N,n.reportAllChanges),c&&(c.observe({type:\"first-input\",buffered:!0}),p((function(){o(c.takeRecords()),r(!0)})),a((function(){R=k(),D.length=0,x.clear(),i=f(\"INP\"),r=d(e,i,N,n.reportAllChanges)})))})))},_=[2500,4e3],z={},G=function(e,n){n=n||{},C((function(){var t,r=E(),i=f(\"LCP\"),o=function(e){n.reportAllChanges||(e=e.slice(-1)),e.forEach((function(e){e.startTime<r.firstHiddenTime&&(i.value=Math.max(e.startTime-u(),0),i.entries=[e],t())}))},c=s(\"largest-contentful-paint\",o);if(c){t=d(e,i,_,n.reportAllChanges);var m=v((function(){z[i.id]||(o(c.takeRecords()),c.disconnect(),z[i.id]=!0,t(!0))}));[\"keydown\",\"click\"].forEach((function(e){addEventListener(e,(function(){return O(m)}),{once:!0,capture:!0})})),p(m),a((function(r){i=f(\"LCP\"),t=d(e,i,_,n.reportAllChanges),l((function(){i.value=performance.now()-r.timeStamp,z[i.id]=!0,t(!0)}))}))}}))},J=[800,1800],K=function e(n){document.prerendering?C((function(){return e(n)})):\"complete\"!==document.readyState?addEventListener(\"load\",(function(){return e(n)}),!0):setTimeout(n,0)},Q=function(e,n){n=n||{};var t=f(\"TTFB\"),r=d(e,t,J,n.reportAllChanges);K((function(){var i=c();i&&(t.value=Math.max(i.responseStart-u(),0),t.entries=[i],r(!0),a((function(){t=f(\"TTFB\",0),(r=d(e,t,J,n.reportAllChanges))(!0)})))}))},U={passive:!0,capture:!0},V=new Date,W=function(e,i){n||(n=i,t=e,r=new Date,Z(removeEventListener),X())},X=function(){if(t>=0&&t<r-V){var e={entryType:\"first-input\",name:n.type,target:n.target,cancelable:n.cancelable,startTime:n.timeStamp,processingStart:n.timeStamp+t};i.forEach((function(n){n(e)})),i=[]}},Y=function(e){if(e.cancelable){var n=(e.timeStamp>1e12?new Date:performance.now())-e.timeStamp;\"pointerdown\"==e.type?function(e,n){var t=function(){W(e,n),i()},r=function(){i()},i=function(){removeEventListener(\"pointerup\",t,U),removeEventListener(\"pointercancel\",r,U)};addEventListener(\"pointerup\",t,U),addEventListener(\"pointercancel\",r,U)}(n,e):W(n,e)}},Z=function(e){[\"mousedown\",\"keydown\",\"touchstart\",\"pointerdown\"].forEach((function(n){return e(n,Y,U)}))},$=[100,300],ee=function(e,r){r=r||{},C((function(){var o,c=E(),u=f(\"FID\"),l=function(e){e.startTime<c.firstHiddenTime&&(u.value=e.processingStart-e.startTime,u.entries.push(e),o(!0))},m=function(e){e.forEach(l)},h=s(\"first-input\",m);o=d(e,u,$,r.reportAllChanges),h&&(p(v((function(){m(h.takeRecords()),h.disconnect()}))),a((function(){var a;u=f(\"FID\"),o=d(e,u,$,r.reportAllChanges),i=[],t=-1,n=null,Z(addEventListener),a=l,i.push(a),X()})))}))};export{L as CLSThresholds,b as FCPThresholds,$ as FIDThresholds,N as INPThresholds,_ as LCPThresholds,J as TTFBThresholds,w as onCLS,S as onFCP,ee as onFID,j as onINP,G as onLCP,Q as onTTFB};\n"],
5
- "mappings": "AAAA,IAAIA,EAAEC,EAAEC,EAAEC,EAAEC,EAAEC,EAAE,GAAGC,EAAE,SAASN,EAAE,CAAC,iBAAiB,WAAY,SAASC,EAAE,CAACA,EAAE,YAAYI,EAAEJ,EAAE,UAAUD,EAAEC,CAAC,EAAE,EAAG,EAAE,CAAC,EAAEM,EAAE,UAAU,CAAC,IAAIP,EAAE,KAAK,aAAa,YAAY,kBAAkB,YAAY,iBAAiB,YAAY,EAAE,CAAC,EAAE,GAAGA,GAAGA,EAAE,cAAc,GAAGA,EAAE,cAAc,YAAY,IAAI,EAAE,OAAOA,CAAC,EAAEQ,EAAE,UAAU,CAAC,IAAIR,EAAE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z", "G", "m", "J", "K", "Q", "U", "V", "W", "Z", "X", "Y", "$", "ee"]
7
- }
@@ -1,229 +0,0 @@
1
- import type {ActorMethod} from '@dfinity/agent';
2
- import type {IDL} from '@dfinity/candid';
3
- import type {Principal} from '@dfinity/principal';
4
-
5
- export interface AnalyticKey {
6
- key: string;
7
- collected_at: bigint;
8
- }
9
- export interface AnalyticsBrowsersPageViews {
10
- safari: number;
11
- opera: number;
12
- others: number;
13
- firefox: number;
14
- chrome: number;
15
- }
16
- export interface AnalyticsClientsPageViews {
17
- browsers: AnalyticsBrowsersPageViews;
18
- devices: AnalyticsDevicesPageViews;
19
- }
20
- export interface AnalyticsDevicesPageViews {
21
- desktop: number;
22
- others: number;
23
- mobile: number;
24
- }
25
- export interface AnalyticsMetricsPageViews {
26
- bounce_rate: number;
27
- average_page_views_per_session: number;
28
- daily_total_page_views: Array<[CalendarDate, number]>;
29
- total_page_views: number;
30
- unique_page_views: bigint;
31
- unique_sessions: bigint;
32
- }
33
- export interface AnalyticsTop10PageViews {
34
- referrers: Array<[string, number]>;
35
- pages: Array<[string, number]>;
36
- }
37
- export interface AnalyticsTrackEvents {
38
- total: Array<[string, number]>;
39
- }
40
- export interface AnalyticsWebVitalsPageMetrics {
41
- cls: [] | [number];
42
- fcp: [] | [number];
43
- inp: [] | [number];
44
- lcp: [] | [number];
45
- ttfb: [] | [number];
46
- }
47
- export interface AnalyticsWebVitalsPerformanceMetrics {
48
- overall: AnalyticsWebVitalsPageMetrics;
49
- pages: Array<[string, AnalyticsWebVitalsPageMetrics]>;
50
- }
51
- export interface CalendarDate {
52
- day: number;
53
- month: number;
54
- year: number;
55
- }
56
- export interface Controller {
57
- updated_at: bigint;
58
- metadata: Array<[string, string]>;
59
- created_at: bigint;
60
- scope: ControllerScope;
61
- expires_at: [] | [bigint];
62
- }
63
- export type ControllerScope = {Write: null} | {Admin: null};
64
- export interface DelSatelliteConfig {
65
- version: [] | [bigint];
66
- }
67
- export interface DeleteControllersArgs {
68
- controllers: Array<Principal>;
69
- }
70
- export interface DepositCyclesArgs {
71
- cycles: bigint;
72
- destination_id: Principal;
73
- }
74
- export interface GetAnalytics {
75
- to: [] | [bigint];
76
- from: [] | [bigint];
77
- satellite_id: [] | [Principal];
78
- }
79
- export interface MemorySize {
80
- stable: bigint;
81
- heap: bigint;
82
- }
83
- export type NavigationType =
84
- | {Navigate: null}
85
- | {Restore: null}
86
- | {Reload: null}
87
- | {BackForward: null}
88
- | {BackForwardCache: null}
89
- | {Prerender: null};
90
- export interface OrbiterSatelliteConfig {
91
- updated_at: bigint;
92
- features: [] | [OrbiterSatelliteFeatures];
93
- created_at: bigint;
94
- version: [] | [bigint];
95
- }
96
- export interface OrbiterSatelliteFeatures {
97
- performance_metrics: boolean;
98
- track_events: boolean;
99
- page_views: boolean;
100
- }
101
- export interface PageView {
102
- title: string;
103
- updated_at: bigint;
104
- referrer: [] | [string];
105
- time_zone: string;
106
- session_id: string;
107
- href: string;
108
- created_at: bigint;
109
- satellite_id: Principal;
110
- device: PageViewDevice;
111
- version: [] | [bigint];
112
- user_agent: [] | [string];
113
- }
114
- export interface PageViewDevice {
115
- inner_height: number;
116
- inner_width: number;
117
- }
118
- export type PerformanceData = {WebVitalsMetric: WebVitalsMetric};
119
- export interface PerformanceMetric {
120
- updated_at: bigint;
121
- session_id: string;
122
- data: PerformanceData;
123
- href: string;
124
- metric_name: PerformanceMetricName;
125
- created_at: bigint;
126
- satellite_id: Principal;
127
- version: [] | [bigint];
128
- }
129
- export type PerformanceMetricName =
130
- | {CLS: null}
131
- | {FCP: null}
132
- | {INP: null}
133
- | {LCP: null}
134
- | {TTFB: null};
135
- export type Result = {Ok: PageView} | {Err: string};
136
- export type Result_1 = {Ok: null} | {Err: Array<[AnalyticKey, string]>};
137
- export type Result_2 = {Ok: PerformanceMetric} | {Err: string};
138
- export type Result_3 = {Ok: TrackEvent} | {Err: string};
139
- export interface SetController {
140
- metadata: Array<[string, string]>;
141
- scope: ControllerScope;
142
- expires_at: [] | [bigint];
143
- }
144
- export interface SetControllersArgs {
145
- controller: SetController;
146
- controllers: Array<Principal>;
147
- }
148
- export interface SetPageView {
149
- title: string;
150
- updated_at: [] | [bigint];
151
- referrer: [] | [string];
152
- time_zone: string;
153
- session_id: string;
154
- href: string;
155
- satellite_id: Principal;
156
- device: PageViewDevice;
157
- version: [] | [bigint];
158
- user_agent: [] | [string];
159
- }
160
- export interface SetPerformanceMetric {
161
- session_id: string;
162
- data: PerformanceData;
163
- href: string;
164
- metric_name: PerformanceMetricName;
165
- satellite_id: Principal;
166
- version: [] | [bigint];
167
- user_agent: [] | [string];
168
- }
169
- export interface SetSatelliteConfig {
170
- features: [] | [OrbiterSatelliteFeatures];
171
- version: [] | [bigint];
172
- }
173
- export interface SetTrackEvent {
174
- updated_at: [] | [bigint];
175
- session_id: string;
176
- metadata: [] | [Array<[string, string]>];
177
- name: string;
178
- satellite_id: Principal;
179
- version: [] | [bigint];
180
- user_agent: [] | [string];
181
- }
182
- export interface TrackEvent {
183
- updated_at: bigint;
184
- session_id: string;
185
- metadata: [] | [Array<[string, string]>];
186
- name: string;
187
- created_at: bigint;
188
- satellite_id: Principal;
189
- version: [] | [bigint];
190
- }
191
- export interface WebVitalsMetric {
192
- id: string;
193
- value: number;
194
- navigation_type: [] | [NavigationType];
195
- delta: number;
196
- }
197
- export interface _SERVICE {
198
- del_controllers: ActorMethod<[DeleteControllersArgs], Array<[Principal, Controller]>>;
199
- del_satellite_config: ActorMethod<[Principal, DelSatelliteConfig], undefined>;
200
- deposit_cycles: ActorMethod<[DepositCyclesArgs], undefined>;
201
- get_page_views: ActorMethod<[GetAnalytics], Array<[AnalyticKey, PageView]>>;
202
- get_page_views_analytics_clients: ActorMethod<[GetAnalytics], AnalyticsClientsPageViews>;
203
- get_page_views_analytics_metrics: ActorMethod<[GetAnalytics], AnalyticsMetricsPageViews>;
204
- get_page_views_analytics_top_10: ActorMethod<[GetAnalytics], AnalyticsTop10PageViews>;
205
- get_performance_metrics: ActorMethod<[GetAnalytics], Array<[AnalyticKey, PerformanceMetric]>>;
206
- get_performance_metrics_analytics_web_vitals: ActorMethod<
207
- [GetAnalytics],
208
- AnalyticsWebVitalsPerformanceMetrics
209
- >;
210
- get_track_events: ActorMethod<[GetAnalytics], Array<[AnalyticKey, TrackEvent]>>;
211
- get_track_events_analytics: ActorMethod<[GetAnalytics], AnalyticsTrackEvents>;
212
- list_controllers: ActorMethod<[], Array<[Principal, Controller]>>;
213
- list_satellite_configs: ActorMethod<[], Array<[Principal, OrbiterSatelliteConfig]>>;
214
- memory_size: ActorMethod<[], MemorySize>;
215
- set_controllers: ActorMethod<[SetControllersArgs], Array<[Principal, Controller]>>;
216
- set_page_view: ActorMethod<[AnalyticKey, SetPageView], Result>;
217
- set_page_views: ActorMethod<[Array<[AnalyticKey, SetPageView]>], Result_1>;
218
- set_performance_metric: ActorMethod<[AnalyticKey, SetPerformanceMetric], Result_2>;
219
- set_performance_metrics: ActorMethod<[Array<[AnalyticKey, SetPerformanceMetric]>], Result_1>;
220
- set_satellite_configs: ActorMethod<
221
- [Array<[Principal, SetSatelliteConfig]>],
222
- Array<[Principal, OrbiterSatelliteConfig]>
223
- >;
224
- set_track_event: ActorMethod<[AnalyticKey, SetTrackEvent], Result_3>;
225
- set_track_events: ActorMethod<[Array<[AnalyticKey, SetTrackEvent]>], Result_1>;
226
- version: ActorMethod<[], string>;
227
- }
228
- export declare const idlFactory: IDL.InterfaceFactory;
229
- export declare const init: (args: {IDL: typeof IDL}) => IDL.Type[];