@wireai/activation 0.8.0 → 0.9.1

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 (91) hide show
  1. package/AGENTS.md +29 -5
  2. package/CHANGELOG.md +202 -6
  3. package/README.md +105 -10
  4. package/dist/analytics/index.d.mts +6 -6
  5. package/dist/analytics/index.d.ts +6 -6
  6. package/dist/analytics/index.js +447 -49
  7. package/dist/analytics/index.js.map +1 -1
  8. package/dist/analytics/index.mjs +447 -49
  9. package/dist/analytics/index.mjs.map +1 -1
  10. package/dist/coachmarks/index.d.mts +2 -2
  11. package/dist/coachmarks/index.d.ts +2 -2
  12. package/dist/coachmarks/index.js.map +1 -1
  13. package/dist/coachmarks/index.mjs.map +1 -1
  14. package/dist/{currentSession-f7LWcdWG.d.ts → currentSession-61dcm3V-.d.ts} +10 -2
  15. package/dist/{currentSession-d9CrBxwe.d.mts → currentSession-Bs2JfTJ8.d.mts} +10 -2
  16. package/dist/{decision-BzbiKwk3.d.mts → decision-Bl_M2y3r.d.mts} +1 -1
  17. package/dist/{decision-plDEOCkt.d.ts → decision-Cau5KmP6.d.ts} +1 -1
  18. package/dist/index.d.mts +558 -15
  19. package/dist/index.d.ts +558 -15
  20. package/dist/index.js +1144 -375
  21. package/dist/index.js.map +1 -1
  22. package/dist/index.mjs +969 -207
  23. package/dist/index.mjs.map +1 -1
  24. package/dist/questionnaire/index.d.mts +69 -23
  25. package/dist/questionnaire/index.d.ts +69 -23
  26. package/dist/questionnaire/index.js +643 -172
  27. package/dist/questionnaire/index.js.map +1 -1
  28. package/dist/questionnaire/index.mjs +608 -137
  29. package/dist/questionnaire/index.mjs.map +1 -1
  30. package/dist/reviews/index.d.mts +24 -12
  31. package/dist/reviews/index.d.ts +24 -12
  32. package/dist/reviews/index.js +507 -173
  33. package/dist/reviews/index.js.map +1 -1
  34. package/dist/reviews/index.mjs +462 -129
  35. package/dist/reviews/index.mjs.map +1 -1
  36. package/dist/showcase/index.d.mts +2 -2
  37. package/dist/showcase/index.d.ts +2 -2
  38. package/dist/showcase/index.js.map +1 -1
  39. package/dist/showcase/index.mjs.map +1 -1
  40. package/dist/transport-B31G0Cib.d.ts +128 -0
  41. package/dist/transport-Bzb-bcB2.d.mts +128 -0
  42. package/dist/{types-GL_hQ0TN.d.mts → types-BcmagF6K.d.mts} +1 -1
  43. package/dist/{types-GL_hQ0TN.d.ts → types-BcmagF6K.d.ts} +1 -1
  44. package/dist/{types-BhpXJGlg.d.ts → types-Buj9Lw9t.d.ts} +15 -3
  45. package/dist/{types-CMuOexw0.d.mts → types-CKFhyrMu.d.mts} +1 -1
  46. package/dist/{types-CMuOexw0.d.ts → types-CKFhyrMu.d.ts} +1 -1
  47. package/dist/{types-A6pTxIZV.d.mts → types-CNUqMK0D.d.mts} +15 -3
  48. package/metro/index.d.ts +18 -1
  49. package/metro/index.js +80 -0
  50. package/package.json +9 -1
  51. package/src/WireOnboarding.tsx +4 -0
  52. package/src/analytics/currentSession.ts +1 -1
  53. package/src/cards/CardGridSelectCard.tsx +253 -0
  54. package/src/cards/ChipSelectCard.tsx +1 -1
  55. package/src/cards/SelectionCard.tsx +15 -19
  56. package/src/cards/index.ts +13 -1
  57. package/src/cards/optionSchema.ts +65 -0
  58. package/src/coachmarks/types.ts +1 -1
  59. package/src/components/CardHandoff.tsx +39 -7
  60. package/src/components/DoneCheck.tsx +94 -0
  61. package/src/components/ModalPaneHost.tsx +141 -0
  62. package/src/components/StepDots.tsx +112 -0
  63. package/src/device/appVersion.ts +29 -8
  64. package/src/device/deviceModel.ts +21 -8
  65. package/src/features/cache.ts +1 -1
  66. package/src/haptics/expo-haptics.d.ts +31 -0
  67. package/src/haptics/haptics.ts +58 -0
  68. package/src/icons/IconRegistry.tsx +53 -0
  69. package/src/icons/WireIcon.tsx +85 -0
  70. package/src/icons/expoIcons.ts +165 -0
  71. package/src/icons/index.ts +18 -0
  72. package/src/icons/vocabulary.ts +154 -0
  73. package/src/index.ts +20 -0
  74. package/src/questionnaire/QuestionnaireGate.tsx +315 -164
  75. package/src/questionnaire/decision.ts +4 -2
  76. package/src/questionnaire/index.ts +3 -2
  77. package/src/questionnaire/steps.ts +261 -0
  78. package/src/questionnaire/types.ts +33 -12
  79. package/src/reviews/ReviewGate.tsx +250 -152
  80. package/src/reviews/index.ts +7 -3
  81. package/src/reviews/transport.ts +119 -3
  82. package/src/reviews/types.ts +13 -0
  83. package/src/session/persistedSession.ts +1 -1
  84. package/src/session-analytics/lifecycle.ts +1 -1
  85. package/src/session-analytics/useSessionStart.ts +2 -2
  86. package/src/showcase/FeatureShowcase.tsx +1 -1
  87. package/src/showcase/showcaseColors.ts +1 -1
  88. package/src/theme/mergeThemeOver.ts +27 -0
  89. package/src/types.ts +8 -0
  90. package/dist/transport-BeO_Brcu.d.mts +0 -40
  91. package/dist/transport-DLpd1v5_.d.ts +0 -40
@@ -1,25 +1,415 @@
1
1
  'use strict';
2
2
 
3
- var react = require('react');
4
3
  var reactNative = require('react-native');
4
+ var react = require('react');
5
5
 
6
+ var __defProp = Object.defineProperty;
7
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
8
+ var __getOwnPropNames = Object.getOwnPropertyNames;
9
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
10
  var __require = /* @__PURE__ */ ((x) => typeof require !== "undefined" ? require : typeof Proxy !== "undefined" ? new Proxy(x, {
7
11
  get: (a, b) => (typeof require !== "undefined" ? require : a)[b]
8
12
  }) : x)(function(x) {
9
13
  if (typeof require !== "undefined") return require.apply(this, arguments);
10
14
  throw Error('Dynamic require of "' + x + '" is not supported');
11
15
  });
16
+ var __esm = (fn, res) => function __init() {
17
+ return fn && (res = (0, fn[__getOwnPropNames(fn)[0]])(fn = 0)), res;
18
+ };
19
+ var __export = (target, all) => {
20
+ for (var name2 in all)
21
+ __defProp(target, name2, { get: all[name2], enumerable: true });
22
+ };
23
+ var __copyProps = (to, from, except, desc) => {
24
+ if (from && typeof from === "object" || typeof from === "function") {
25
+ for (let key of __getOwnPropNames(from))
26
+ if (!__hasOwnProp.call(to, key) && key !== except)
27
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
28
+ }
29
+ return to;
30
+ };
31
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
32
+
33
+ // node_modules/expo-modules-core/src/errors/CodedError.ts
34
+ var CodedError;
35
+ var init_CodedError = __esm({
36
+ "node_modules/expo-modules-core/src/errors/CodedError.ts"() {
37
+ CodedError = class extends Error {
38
+ constructor(code, message) {
39
+ super(message);
40
+ this.code = code;
41
+ }
42
+ };
43
+ }
44
+ });
45
+
46
+ // node_modules/expo-modules-core/src/NativeModulesProxy.ts
47
+ var NativeModulesProxy_default;
48
+ var init_NativeModulesProxy = __esm({
49
+ "node_modules/expo-modules-core/src/NativeModulesProxy.ts"() {
50
+ NativeModulesProxy_default = {};
51
+ }
52
+ });
53
+
54
+ // node_modules/expo-modules-core/src/TurboModuleToExpoModuleProxy.ts
55
+ function createTurboModuleToExpoProxy(turboModule, name2) {
56
+ return null;
57
+ }
58
+ var init_TurboModuleToExpoModuleProxy = __esm({
59
+ "node_modules/expo-modules-core/src/TurboModuleToExpoModuleProxy.ts"() {
60
+ }
61
+ });
62
+ var init_ensureNativeModulesAreInstalled = __esm({
63
+ "node_modules/expo-modules-core/src/ensureNativeModulesAreInstalled.ts"() {
64
+ }
65
+ });
66
+ function requireOptionalNativeModule(moduleName) {
67
+ var _a2, _b, _c, _d, _e;
68
+ try {
69
+ return (_e = (_d = (_c = (_b = (_a2 = globalThis.expo) == null ? void 0 : _a2.modules) == null ? void 0 : _b[moduleName]) != null ? _c : NativeModulesProxy_default[moduleName]) != null ? _d : createTurboModuleToExpoProxy(reactNative.TurboModuleRegistry.get(moduleName), moduleName)) != null ? _e : null;
70
+ } catch (e) {
71
+ const error = e;
72
+ console.warn(`An error occurred while requiring the '${moduleName}' module: ${error.message}`);
73
+ return null;
74
+ }
75
+ }
76
+ var init_requireNativeModule = __esm({
77
+ "node_modules/expo-modules-core/src/requireNativeModule.ts"() {
78
+ init_NativeModulesProxy();
79
+ init_TurboModuleToExpoModuleProxy();
80
+ init_ensureNativeModulesAreInstalled();
81
+ }
82
+ });
83
+
84
+ // node_modules/expo-modules-core/src/sweet/setUpJsLogger.fx.ts
85
+ var init_setUpJsLogger_fx = __esm({
86
+ "node_modules/expo-modules-core/src/sweet/setUpJsLogger.fx.ts"() {
87
+ init_CodedError();
88
+ init_requireNativeModule();
89
+ if (__DEV__ && typeof window !== "undefined" && (process.env.EXPO_OS === "android" || process.env.EXPO_OS === "ios")) {
90
+ const NativeJSLogger = requireOptionalNativeModule("ExpoModulesCoreJSLogger");
91
+ if (NativeJSLogger) {
92
+ const onNewException = {
93
+ eventName: "ExpoModulesCoreJSLogger.onNewError",
94
+ action: console.error
95
+ };
96
+ const onNewWarning = {
97
+ eventName: "ExpoModulesCoreJSLogger.onNewWarning",
98
+ action: console.warn
99
+ };
100
+ const onNewDebug = {
101
+ eventName: "ExpoModulesCoreJSLogger.onNewDebug",
102
+ action: console.debug
103
+ };
104
+ const onNewInfo = {
105
+ eventName: "ExpoModulesCoreJSLogger.onNewInfo",
106
+ action: console.info
107
+ };
108
+ const onNewTrace = {
109
+ eventName: "ExpoModulesCoreJSLogger.onNewTrace",
110
+ action: console.trace
111
+ };
112
+ const listeners = [
113
+ onNewException,
114
+ onNewWarning,
115
+ onNewDebug,
116
+ onNewInfo,
117
+ onNewTrace
118
+ ];
119
+ for (const listener of listeners) {
120
+ NativeJSLogger.addListener(listener.eventName, ({ message }) => {
121
+ listener.action(message);
122
+ });
123
+ }
124
+ }
125
+ }
126
+ globalThis.ExpoModulesCore_CodedError = CodedError;
127
+ }
128
+ });
129
+
130
+ // node_modules/expo-modules-core/src/registerWebModule.ts
131
+ var init_registerWebModule = __esm({
132
+ "node_modules/expo-modules-core/src/registerWebModule.ts"() {
133
+ }
134
+ });
135
+
136
+ // node_modules/expo-modules-core/src/TypedArrays.types.ts
137
+ var init_TypedArrays_types = __esm({
138
+ "node_modules/expo-modules-core/src/TypedArrays.types.ts"() {
139
+ }
140
+ });
141
+
142
+ // node_modules/expo-modules-core/src/PermissionsInterface.ts
143
+ var init_PermissionsInterface = __esm({
144
+ "node_modules/expo-modules-core/src/PermissionsInterface.ts"() {
145
+ }
146
+ });
147
+ var init_PermissionsHook = __esm({
148
+ "node_modules/expo-modules-core/src/PermissionsHook.ts"() {
149
+ "use client";
150
+ }
151
+ });
152
+ var init_Refs = __esm({
153
+ "node_modules/expo-modules-core/src/Refs.ts"() {
154
+ }
155
+ });
156
+ var init_useReleasingSharedObject = __esm({
157
+ "node_modules/expo-modules-core/src/hooks/useReleasingSharedObject.ts"() {
158
+ "use client";
159
+ }
160
+ });
161
+
162
+ // node_modules/expo-modules-core/src/reload.ts
163
+ var init_reload = __esm({
164
+ "node_modules/expo-modules-core/src/reload.ts"() {
165
+ }
166
+ });
167
+
168
+ // node_modules/expo-modules-core/src/index.ts
169
+ var init_src = __esm({
170
+ "node_modules/expo-modules-core/src/index.ts"() {
171
+ init_setUpJsLogger_fx();
172
+ init_requireNativeModule();
173
+ init_registerWebModule();
174
+ init_TypedArrays_types();
175
+ init_PermissionsInterface();
176
+ init_PermissionsHook();
177
+ init_Refs();
178
+ init_useReleasingSharedObject();
179
+ init_reload();
180
+ init_CodedError();
181
+ }
182
+ });
183
+
184
+ // node_modules/expo-constants/build/Constants.types.js
185
+ var AppOwnership, ExecutionEnvironment, UserInterfaceIdiom;
186
+ var init_Constants_types = __esm({
187
+ "node_modules/expo-constants/build/Constants.types.js"() {
188
+ (function(AppOwnership2) {
189
+ AppOwnership2["Expo"] = "expo";
190
+ })(AppOwnership || (AppOwnership = {}));
191
+ (function(ExecutionEnvironment2) {
192
+ ExecutionEnvironment2["Bare"] = "bare";
193
+ ExecutionEnvironment2["Standalone"] = "standalone";
194
+ ExecutionEnvironment2["StoreClient"] = "storeClient";
195
+ })(ExecutionEnvironment || (ExecutionEnvironment = {}));
196
+ (function(UserInterfaceIdiom2) {
197
+ UserInterfaceIdiom2["Handset"] = "handset";
198
+ UserInterfaceIdiom2["Tablet"] = "tablet";
199
+ UserInterfaceIdiom2["Desktop"] = "desktop";
200
+ UserInterfaceIdiom2["TV"] = "tv";
201
+ UserInterfaceIdiom2["Unsupported"] = "unsupported";
202
+ })(UserInterfaceIdiom || (UserInterfaceIdiom = {}));
203
+ }
204
+ });
205
+
206
+ // node_modules/expo-constants/build/ExponentConstants.js
207
+ var ExponentConstants_default;
208
+ var init_ExponentConstants = __esm({
209
+ "node_modules/expo-constants/build/ExponentConstants.js"() {
210
+ init_src();
211
+ ExponentConstants_default = requireOptionalNativeModule("ExponentConstants");
212
+ }
213
+ });
214
+
215
+ // node_modules/expo-constants/build/Constants.js
216
+ var Constants_exports = {};
217
+ __export(Constants_exports, {
218
+ AppOwnership: () => AppOwnership,
219
+ ExecutionEnvironment: () => ExecutionEnvironment,
220
+ UserInterfaceIdiom: () => UserInterfaceIdiom,
221
+ default: () => Constants_default
222
+ });
223
+ function isEmbeddedManifest(manifest) {
224
+ return !isExpoUpdatesManifest(manifest);
225
+ }
226
+ function isExpoUpdatesManifest(manifest) {
227
+ return "metadata" in manifest;
228
+ }
229
+ function getManifest(suppressWarning = false) {
230
+ if (!rawManifest) {
231
+ const invalidManifestType = rawManifest === null ? "null" : "undefined";
232
+ if (nativeConstants.executionEnvironment === ExecutionEnvironment.Bare && reactNative.Platform.OS !== "web") {
233
+ if (!suppressWarning) {
234
+ console.warn(`Constants.manifest is ${invalidManifestType} because the embedded app.config could not be read. Ensure that you have installed the expo-constants build scripts if you need to read from Constants.manifest.`);
235
+ }
236
+ } else if (nativeConstants.executionEnvironment === ExecutionEnvironment.StoreClient || nativeConstants.executionEnvironment === ExecutionEnvironment.Standalone) {
237
+ throw new CodedError("ERR_CONSTANTS_MANIFEST_UNAVAILABLE", `Constants.manifest is ${invalidManifestType}, must be an object.`);
238
+ }
239
+ }
240
+ return rawManifest;
241
+ }
242
+ var ExpoUpdates, rawUpdatesManifest, rawDevLauncherManifest, rawAppConfig, _a, rawManifest, name, appOwnership, nativeConstants, constants, Constants_default;
243
+ var init_Constants = __esm({
244
+ "node_modules/expo-constants/build/Constants.js"() {
245
+ init_src();
246
+ init_Constants_types();
247
+ init_ExponentConstants();
248
+ init_Constants_types();
249
+ if (!ExponentConstants_default) {
250
+ console.warn("No native ExponentConstants module found, are you sure the expo-constants's module is linked properly?");
251
+ }
252
+ ExpoUpdates = requireOptionalNativeModule("ExpoUpdates");
253
+ rawUpdatesManifest = null;
254
+ if (ExpoUpdates) {
255
+ let updatesManifest;
256
+ if (ExpoUpdates.manifest) {
257
+ updatesManifest = ExpoUpdates.manifest;
258
+ } else if (ExpoUpdates.manifestString) {
259
+ updatesManifest = JSON.parse(ExpoUpdates.manifestString);
260
+ }
261
+ if (updatesManifest && Object.keys(updatesManifest).length > 0) {
262
+ rawUpdatesManifest = updatesManifest;
263
+ }
264
+ }
265
+ rawDevLauncherManifest = null;
266
+ if (reactNative.NativeModules.EXDevLauncher) {
267
+ let devLauncherManifest;
268
+ if (reactNative.NativeModules.EXDevLauncher.manifestString) {
269
+ devLauncherManifest = JSON.parse(reactNative.NativeModules.EXDevLauncher.manifestString);
270
+ }
271
+ if (devLauncherManifest && Object.keys(devLauncherManifest).length > 0) {
272
+ rawDevLauncherManifest = devLauncherManifest;
273
+ }
274
+ }
275
+ rawAppConfig = null;
276
+ if (ExponentConstants_default && ExponentConstants_default.manifest) {
277
+ const appConfig = ExponentConstants_default.manifest;
278
+ if (typeof appConfig === "string") {
279
+ rawAppConfig = JSON.parse(appConfig);
280
+ } else {
281
+ rawAppConfig = appConfig;
282
+ }
283
+ }
284
+ rawManifest = (_a = rawUpdatesManifest != null ? rawUpdatesManifest : rawDevLauncherManifest) != null ? _a : rawAppConfig;
285
+ ({ name, appOwnership, ...nativeConstants } = ExponentConstants_default || {});
286
+ constants = {
287
+ ...nativeConstants,
288
+ // Ensure this is null in bare workflow
289
+ appOwnership: appOwnership != null ? appOwnership : null
290
+ };
291
+ Object.defineProperties(constants, {
292
+ /**
293
+ * Use `manifest` property by default.
294
+ * This property is only used for internal purposes.
295
+ * It behaves similarly to the original one, but suppresses warning upon no manifest available.
296
+ * `expo-asset` uses it to prevent users from seeing mentioned warning.
297
+ */
298
+ __unsafeNoWarnManifest: {
299
+ get() {
300
+ const maybeManifest = getManifest(true);
301
+ if (!maybeManifest || !isEmbeddedManifest(maybeManifest)) {
302
+ return null;
303
+ }
304
+ return maybeManifest;
305
+ },
306
+ enumerable: false
307
+ },
308
+ __unsafeNoWarnManifest2: {
309
+ get() {
310
+ const maybeManifest = getManifest(true);
311
+ if (!maybeManifest || !isExpoUpdatesManifest(maybeManifest)) {
312
+ return null;
313
+ }
314
+ return maybeManifest;
315
+ },
316
+ enumerable: false
317
+ },
318
+ manifest: {
319
+ get() {
320
+ const maybeManifest = getManifest();
321
+ if (!maybeManifest || !isEmbeddedManifest(maybeManifest)) {
322
+ return null;
323
+ }
324
+ return maybeManifest;
325
+ },
326
+ enumerable: true
327
+ },
328
+ manifest2: {
329
+ get() {
330
+ const maybeManifest = getManifest();
331
+ if (!maybeManifest || !isExpoUpdatesManifest(maybeManifest)) {
332
+ return null;
333
+ }
334
+ return maybeManifest;
335
+ },
336
+ enumerable: true
337
+ },
338
+ expoConfig: {
339
+ get() {
340
+ var _a2, _b;
341
+ const maybeManifest = getManifest(true);
342
+ if (!maybeManifest) {
343
+ return null;
344
+ }
345
+ if (ExpoUpdates && ExpoUpdates.isEmbeddedLaunch) {
346
+ return rawAppConfig;
347
+ }
348
+ if (isExpoUpdatesManifest(maybeManifest)) {
349
+ return (_b = (_a2 = maybeManifest.extra) == null ? void 0 : _a2.expoClient) != null ? _b : null;
350
+ } else if (isEmbeddedManifest(maybeManifest)) {
351
+ return maybeManifest;
352
+ }
353
+ return null;
354
+ },
355
+ enumerable: true
356
+ },
357
+ expoGoConfig: {
358
+ get() {
359
+ var _a2, _b;
360
+ const maybeManifest = getManifest(true);
361
+ if (!maybeManifest) {
362
+ return null;
363
+ }
364
+ if (isExpoUpdatesManifest(maybeManifest)) {
365
+ return (_b = (_a2 = maybeManifest.extra) == null ? void 0 : _a2.expoGo) != null ? _b : null;
366
+ } else if (isEmbeddedManifest(maybeManifest)) {
367
+ return maybeManifest;
368
+ }
369
+ return null;
370
+ },
371
+ enumerable: true
372
+ },
373
+ easConfig: {
374
+ get() {
375
+ var _a2, _b;
376
+ const maybeManifest = getManifest(true);
377
+ if (!maybeManifest) {
378
+ return null;
379
+ }
380
+ if (isExpoUpdatesManifest(maybeManifest)) {
381
+ return (_b = (_a2 = maybeManifest.extra) == null ? void 0 : _a2.eas) != null ? _b : null;
382
+ } else if (isEmbeddedManifest(maybeManifest)) {
383
+ return maybeManifest;
384
+ }
385
+ return null;
386
+ },
387
+ enumerable: true
388
+ },
389
+ __rawManifest_TEST: {
390
+ get() {
391
+ return rawManifest;
392
+ },
393
+ set(value) {
394
+ rawManifest = value;
395
+ },
396
+ enumerable: false
397
+ }
398
+ });
399
+ Constants_default = constants;
400
+ }
401
+ });
12
402
 
13
403
  // src/reviews/transport.ts
14
- var reportAppEvent = (target, name, options = {}) => {
15
- if (!(target == null ? void 0 : target.serverUrl) || !name) return;
404
+ var reportAppEvent = (target, name2, options = {}) => {
405
+ if (!(target == null ? void 0 : target.serverUrl) || !name2) return;
16
406
  try {
17
407
  const url = `${target.serverUrl.replace(/\/$/, "")}/v1/events`;
18
408
  const headers = { "Content-Type": "application/json" };
19
409
  if (target.apiKey) headers.Authorization = `Bearer ${target.apiKey}`;
20
410
  const event = {
21
411
  event_type: "app_event",
22
- question_key: name
412
+ question_key: name2
23
413
  };
24
414
  if (options.sessionId) event.session_id = options.sessionId;
25
415
  if (options.deviceKey) event.user_context = { device_key: options.deviceKey };
@@ -39,24 +429,24 @@ var reportAppEvent = (target, name, options = {}) => {
39
429
  // src/analytics/screenTracking.ts
40
430
  var getActiveRouteName = (state) => {
41
431
  let current = state;
42
- let name;
432
+ let name2;
43
433
  while (current && Array.isArray(current.routes) && current.routes.length > 0) {
44
434
  const index = typeof current.index === "number" ? current.index : 0;
45
435
  const route = current.routes[index];
46
436
  if (!route) break;
47
- name = route.name;
437
+ name2 = route.name;
48
438
  current = route.state;
49
439
  }
50
- return name;
440
+ return name2;
51
441
  };
52
442
  var createScreenTracker = (options = {}) => {
53
443
  let lastScreen;
54
444
  return {
55
445
  track: (screen) => {
56
- var _a;
446
+ var _a2;
57
447
  if (!screen || screen === lastScreen) return;
58
448
  lastScreen = screen;
59
- (_a = options.onScreen) == null ? void 0 : _a.call(options, screen);
449
+ (_a2 = options.onScreen) == null ? void 0 : _a2.call(options, screen);
60
450
  if (options.shouldTrack && !options.shouldTrack(screen)) return;
61
451
  reportAppEvent(options.target, "screen", {
62
452
  sessionId: options.sessionId,
@@ -98,8 +488,8 @@ var useScreenTracking = (navigationRef, options = {}) => {
98
488
  const tracker = trackerRef.current;
99
489
  if (!tracker || !(navigationRef == null ? void 0 : navigationRef.addListener)) return;
100
490
  const report = () => {
101
- var _a, _b;
102
- return tracker.track((_b = (_a = navigationRef.getCurrentRoute) == null ? void 0 : _a.call(navigationRef)) == null ? void 0 : _b.name);
491
+ var _a2, _b;
492
+ return tracker.track((_b = (_a2 = navigationRef.getCurrentRoute) == null ? void 0 : _a2.call(navigationRef)) == null ? void 0 : _b.name);
103
493
  };
104
494
  report();
105
495
  const unsubscribe = navigationRef.addListener("state", report);
@@ -172,9 +562,16 @@ var coerceVersion = (value) => {
172
562
  return trimmed.length > 0 ? trimmed : void 0;
173
563
  };
174
564
  var runtimeRequire = (moduleName) => {
565
+ if (typeof __require !== "function") return void 0;
175
566
  try {
176
- if (typeof __require !== "function") return void 0;
177
- return __require(moduleName);
567
+ switch (moduleName) {
568
+ case "expo-constants":
569
+ return init_Constants(), __toCommonJS(Constants_exports);
570
+ case "expo-application":
571
+ return __require("expo-application");
572
+ default:
573
+ return void 0;
574
+ }
178
575
  } catch {
179
576
  return void 0;
180
577
  }
@@ -194,14 +591,14 @@ var safeInterop = (requireModule, moduleName) => {
194
591
  };
195
592
  var detectAppVersion = (requireModule = runtimeRequire) => {
196
593
  try {
197
- const constants = safeInterop(requireModule, "expo-constants");
198
- if (constants) {
199
- const expoConfig = constants.expoConfig;
594
+ const constants2 = safeInterop(requireModule, "expo-constants");
595
+ if (constants2) {
596
+ const expoConfig = constants2.expoConfig;
200
597
  if (expoConfig && typeof expoConfig === "object") {
201
598
  const fromExpoConfig = coerceVersion(expoConfig.version);
202
599
  if (fromExpoConfig) return fromExpoConfig;
203
600
  }
204
- const fromNative = coerceVersion(constants.nativeAppVersion);
601
+ const fromNative = coerceVersion(constants2.nativeAppVersion);
205
602
  if (fromNative) return fromNative;
206
603
  }
207
604
  const application = safeInterop(requireModule, "expo-application");
@@ -221,9 +618,10 @@ var coerceModel = (value) => {
221
618
  return trimmed.length > 0 ? trimmed : void 0;
222
619
  };
223
620
  var runtimeRequire2 = (moduleName) => {
621
+ if (moduleName !== "expo-device") return void 0;
622
+ if (typeof __require !== "function") return void 0;
224
623
  try {
225
- if (typeof __require !== "function") return void 0;
226
- return __require(moduleName);
624
+ return __require("expo-device");
227
625
  } catch {
228
626
  return void 0;
229
627
  }
@@ -265,7 +663,7 @@ var deriveFormFactor = (iosIdiom, width, height) => {
265
663
  return void 0;
266
664
  };
267
665
  var collectDeviceContext = () => {
268
- var _a;
666
+ var _a2;
269
667
  const ctx = { platform: reactNative.Platform.OS };
270
668
  try {
271
669
  const version = reactNative.Platform.Version;
@@ -274,26 +672,26 @@ var collectDeviceContext = () => {
274
672
  }
275
673
  } catch {
276
674
  }
277
- let constants = {};
675
+ let constants2 = {};
278
676
  try {
279
- constants = (_a = reactNative.Platform.constants) != null ? _a : {};
677
+ constants2 = (_a2 = reactNative.Platform.constants) != null ? _a2 : {};
280
678
  } catch {
281
- constants = {};
679
+ constants2 = {};
282
680
  }
283
681
  let iosIdiom;
284
682
  try {
285
683
  if (reactNative.Platform.OS === "android") {
286
- const brand = constants.Brand;
287
- const model = constants.Model;
288
- const release = constants.Release;
684
+ const brand = constants2.Brand;
685
+ const model = constants2.Model;
686
+ const release = constants2.Release;
289
687
  if (typeof brand === "string" && brand) ctx.brand = brand;
290
688
  if (typeof model === "string" && model) ctx.model = model;
291
689
  if (release !== void 0 && release !== null && String(release)) {
292
690
  ctx.osVersion = String(release);
293
691
  }
294
692
  } else if (reactNative.Platform.OS === "ios") {
295
- const osVersion = constants.osVersion;
296
- const idiom = constants.interfaceIdiom;
693
+ const osVersion = constants2.osVersion;
694
+ const idiom = constants2.interfaceIdiom;
297
695
  if (osVersion !== void 0 && osVersion !== null && String(osVersion)) {
298
696
  ctx.osVersion = String(osVersion);
299
697
  }
@@ -334,10 +732,10 @@ var collectDeviceContext = () => {
334
732
 
335
733
  // src/analytics/contextEnvelope.ts
336
734
  var buildContextEnvelope = (input = {}) => {
337
- var _a;
735
+ var _a2;
338
736
  const device = { ...collectDeviceContext() };
339
737
  if (input.appVersion) device.appVersion = input.appVersion;
340
- const effectiveAppVersion = (_a = input.appVersion) != null ? _a : device.appVersion;
738
+ const effectiveAppVersion = (_a2 = input.appVersion) != null ? _a2 : device.appVersion;
341
739
  const envelope = { device };
342
740
  if (input.sessionId) envelope.sessionId = input.sessionId;
343
741
  if (effectiveAppVersion) envelope.appVersion = effectiveAppVersion;
@@ -383,10 +781,10 @@ var parsePersisted = (raw) => {
383
781
  }
384
782
  };
385
783
  var createEventQueue = (options) => {
386
- var _a, _b, _c, _d, _e, _f, _g;
784
+ var _a2, _b, _c, _d, _e, _f, _g;
387
785
  const target = options.target;
388
786
  const storage = options.storage;
389
- const key = (_b = options.storageKey) != null ? _b : `wireai:evtq:${(_a = options.appId) != null ? _a : "default"}`;
787
+ const key = (_b = options.storageKey) != null ? _b : `wireai:evtq:${(_a2 = options.appId) != null ? _a2 : "default"}`;
390
788
  const maxSize = (_c = options.maxSize) != null ? _c : DEFAULTS.maxSize;
391
789
  const batchSize = (_d = options.batchSize) != null ? _d : DEFAULTS.batchSize;
392
790
  const baseBackoffMs = (_e = options.baseBackoffMs) != null ? _e : DEFAULTS.baseBackoffMs;
@@ -405,13 +803,13 @@ var createEventQueue = (options) => {
405
803
  }
406
804
  };
407
805
  const stamp = (event) => {
408
- var _a2;
806
+ var _a3;
409
807
  const env = resolveEnvelope();
410
808
  const stamped = { ...event };
411
809
  if (!env) return stamped;
412
810
  if (!stamped.device && env.device) stamped.device = env.device;
413
811
  if (!stamped.session_id && env.sessionId) stamped.session_id = env.sessionId;
414
- const uc = { ...(_a2 = stamped.user_context) != null ? _a2 : {} };
812
+ const uc = { ...(_a3 = stamped.user_context) != null ? _a3 : {} };
415
813
  if (env.appVersion && uc.app_version === void 0) uc.app_version = env.appVersion;
416
814
  if (env.appBuild && uc.app_build === void 0) uc.app_build = env.appBuild;
417
815
  if (env.networkType && uc.network_type === void 0) uc.network_type = env.networkType;
@@ -607,7 +1005,7 @@ var namespaceExtra = (extra) => {
607
1005
  return out;
608
1006
  };
609
1007
  var resolveUserContext = (ctx = {}, opts = {}) => {
610
- var _a;
1008
+ var _a2;
611
1009
  const result = {};
612
1010
  const bucket = {};
613
1011
  const userId = sanitizeUserId(ctx.userId);
@@ -617,7 +1015,7 @@ var resolveUserContext = (ctx = {}, opts = {}) => {
617
1015
  result.deviceKey = deviceKey;
618
1016
  bucket.device_key = deviceKey;
619
1017
  }
620
- const appVersion = (_a = cleanString(ctx.appVersion)) != null ? _a : cleanString(opts.autoAppVersion);
1018
+ const appVersion = (_a2 = cleanString(ctx.appVersion)) != null ? _a2 : cleanString(opts.autoAppVersion);
621
1019
  if (appVersion) {
622
1020
  result.appVersion = appVersion;
623
1021
  bucket.app_version = appVersion;
@@ -647,11 +1045,11 @@ var mintDeviceId = () => {
647
1045
 
648
1046
  // src/analytics/analyticsFacade.ts
649
1047
  var createAnalytics = (config, options = {}) => {
650
- var _a, _b, _c, _d, _e;
651
- const instanceSessionId = (_a = config.sessionId) != null ? _a : makeSessionId();
1048
+ var _a2, _b, _c, _d, _e;
1049
+ const instanceSessionId = (_a2 = config.sessionId) != null ? _a2 : makeSessionId();
652
1050
  const resolveSessionId = () => {
653
- var _a2, _b2;
654
- return (_b2 = (_a2 = config.sessionId) != null ? _a2 : getCurrentSessionId()) != null ? _b2 : instanceSessionId;
1051
+ var _a3, _b2;
1052
+ return (_b2 = (_a3 = config.sessionId) != null ? _a3 : getCurrentSessionId()) != null ? _b2 : instanceSessionId;
655
1053
  };
656
1054
  let userContext = { ...(_b = config.userContext) != null ? _b : {} };
657
1055
  const hostDeviceKeyAtInit = typeof ((_c = config.userContext) == null ? void 0 : _c.deviceKey) === "string" && config.userContext.deviceKey.trim() ? config.userContext.deviceKey.trim() : void 0;
@@ -668,10 +1066,10 @@ var createAnalytics = (config, options = {}) => {
668
1066
  });
669
1067
  }
670
1068
  const envelope = () => {
671
- var _a2;
1069
+ var _a3;
672
1070
  return buildContextEnvelope({
673
1071
  sessionId: resolveSessionId(),
674
- appVersion: (_a2 = userContext.appVersion) != null ? _a2 : config.appVersion,
1072
+ appVersion: (_a3 = userContext.appVersion) != null ? _a3 : config.appVersion,
675
1073
  appBuild: config.appBuild,
676
1074
  networkType: config.networkType
677
1075
  });
@@ -692,21 +1090,21 @@ var createAnalytics = (config, options = {}) => {
692
1090
  });
693
1091
  }
694
1092
  const applyContext = (event) => {
695
- var _a2;
1093
+ var _a3;
696
1094
  const hostDeviceKey = typeof userContext.deviceKey === "string" && userContext.deviceKey.trim() ? userContext.deviceKey : void 0;
697
1095
  const resolved = resolveUserContext(
698
1096
  { ...userContext, deviceKey: hostDeviceKey != null ? hostDeviceKey : autoDeviceKey },
699
1097
  { autoAppVersion: config.appVersion }
700
1098
  );
701
1099
  if (resolved.userContext) {
702
- event.user_context = { ...resolved.userContext, ...(_a2 = event.user_context) != null ? _a2 : {} };
1100
+ event.user_context = { ...resolved.userContext, ...(_a3 = event.user_context) != null ? _a3 : {} };
703
1101
  }
704
1102
  if (boundUserId && !event.user_id) event.user_id = boundUserId;
705
1103
  };
706
1104
  const setUserContext = (partial) => {
707
- var _a2, _b2;
1105
+ var _a3, _b2;
708
1106
  if (!partial || typeof partial !== "object") return;
709
- const mergedExtra = partial.extra || userContext.extra ? { ...(_a2 = userContext.extra) != null ? _a2 : {}, ...(_b2 = partial.extra) != null ? _b2 : {} } : void 0;
1107
+ const mergedExtra = partial.extra || userContext.extra ? { ...(_a3 = userContext.extra) != null ? _a3 : {}, ...(_b2 = partial.extra) != null ? _b2 : {} } : void 0;
710
1108
  userContext = { ...userContext, ...partial };
711
1109
  if (mergedExtra) userContext.extra = mergedExtra;
712
1110
  const uid = sanitizeUserId(partial.userId);
@@ -727,9 +1125,9 @@ var createAnalytics = (config, options = {}) => {
727
1125
  applyContext(clientEvent);
728
1126
  queue.enqueue(clientEvent);
729
1127
  };
730
- const screen = (name, props) => {
731
- if (!name) return;
732
- const meta = { screen: name, ...props != null ? props : {} };
1128
+ const screen = (name2, props) => {
1129
+ if (!name2) return;
1130
+ const meta = { screen: name2, ...props != null ? props : {} };
733
1131
  const clientEvent = {
734
1132
  event_type: "app_event",
735
1133
  session_id: resolveSessionId(),