@wireai/activation 0.8.0 → 0.9.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 (91) hide show
  1. package/AGENTS.md +29 -5
  2. package/CHANGELOG.md +163 -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-DzU-TqZz.d.ts +86 -0
  41. package/dist/transport-f5VVB5hH.d.mts +86 -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 +77 -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
package/dist/index.mjs CHANGED
@@ -1,21 +1,406 @@
1
- import React14, { createContext, forwardRef, useRef, useState, useEffect, useCallback, useImperativeHandle, useMemo, useContext } from 'react';
1
+ import { StyleSheet, Easing, Animated, BackHandler, Modal, Pressable, Text, View, TouchableOpacity, KeyboardAvoidingView, ScrollView, useWindowDimensions, TextInput, Image, AccessibilityInfo, Platform, Dimensions, I18nManager, AppState, NativeModules, TurboModuleRegistry } from 'react-native';
2
+ import React18, { createContext, forwardRef, useRef, useState, useEffect, useCallback, useImperativeHandle, useMemo, useContext } from 'react';
2
3
  import { useWireAIThread, useWireAIAction, ComponentRenderer, WireAIProvider } from 'wireai-rn';
3
4
  import { jsxs, jsx, Fragment } from 'react/jsx-runtime';
4
- import { StyleSheet, Easing, Animated, BackHandler, Modal, Pressable, Text, View, TouchableOpacity, KeyboardAvoidingView, ScrollView, useWindowDimensions, TextInput, Image, AccessibilityInfo, Platform, Dimensions, I18nManager, AppState } from 'react-native';
5
5
  import { SafeAreaView } from 'react-native-safe-area-context';
6
6
  import { z } from 'zod';
7
7
 
8
8
  var __defProp = Object.defineProperty;
9
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
10
+ var __getOwnPropNames = Object.getOwnPropertyNames;
11
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
9
12
  var __require = /* @__PURE__ */ ((x) => typeof require !== "undefined" ? require : typeof Proxy !== "undefined" ? new Proxy(x, {
10
13
  get: (a, b) => (typeof require !== "undefined" ? require : a)[b]
11
14
  }) : x)(function(x) {
12
15
  if (typeof require !== "undefined") return require.apply(this, arguments);
13
16
  throw Error('Dynamic require of "' + x + '" is not supported');
14
17
  });
18
+ var __esm = (fn, res) => function __init() {
19
+ return fn && (res = (0, fn[__getOwnPropNames(fn)[0]])(fn = 0)), res;
20
+ };
15
21
  var __export = (target, all) => {
16
- for (var name in all)
17
- __defProp(target, name, { get: all[name], enumerable: true });
22
+ for (var name2 in all)
23
+ __defProp(target, name2, { get: all[name2], enumerable: true });
24
+ };
25
+ var __copyProps = (to, from, except, desc) => {
26
+ if (from && typeof from === "object" || typeof from === "function") {
27
+ for (let key of __getOwnPropNames(from))
28
+ if (!__hasOwnProp.call(to, key) && key !== except)
29
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
30
+ }
31
+ return to;
18
32
  };
33
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
34
+
35
+ // node_modules/expo-modules-core/src/errors/CodedError.ts
36
+ var CodedError;
37
+ var init_CodedError = __esm({
38
+ "node_modules/expo-modules-core/src/errors/CodedError.ts"() {
39
+ CodedError = class extends Error {
40
+ constructor(code, message) {
41
+ super(message);
42
+ this.code = code;
43
+ }
44
+ };
45
+ }
46
+ });
47
+
48
+ // node_modules/expo-modules-core/src/NativeModulesProxy.ts
49
+ var NativeModulesProxy_default;
50
+ var init_NativeModulesProxy = __esm({
51
+ "node_modules/expo-modules-core/src/NativeModulesProxy.ts"() {
52
+ NativeModulesProxy_default = {};
53
+ }
54
+ });
55
+
56
+ // node_modules/expo-modules-core/src/TurboModuleToExpoModuleProxy.ts
57
+ function createTurboModuleToExpoProxy(turboModule, name2) {
58
+ return null;
59
+ }
60
+ var init_TurboModuleToExpoModuleProxy = __esm({
61
+ "node_modules/expo-modules-core/src/TurboModuleToExpoModuleProxy.ts"() {
62
+ }
63
+ });
64
+ var init_ensureNativeModulesAreInstalled = __esm({
65
+ "node_modules/expo-modules-core/src/ensureNativeModulesAreInstalled.ts"() {
66
+ }
67
+ });
68
+ function requireOptionalNativeModule(moduleName) {
69
+ var _a2, _b, _c, _d, _e;
70
+ try {
71
+ 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(TurboModuleRegistry.get(moduleName), moduleName)) != null ? _e : null;
72
+ } catch (e) {
73
+ const error = e;
74
+ console.warn(`An error occurred while requiring the '${moduleName}' module: ${error.message}`);
75
+ return null;
76
+ }
77
+ }
78
+ var init_requireNativeModule = __esm({
79
+ "node_modules/expo-modules-core/src/requireNativeModule.ts"() {
80
+ init_NativeModulesProxy();
81
+ init_TurboModuleToExpoModuleProxy();
82
+ init_ensureNativeModulesAreInstalled();
83
+ }
84
+ });
85
+
86
+ // node_modules/expo-modules-core/src/sweet/setUpJsLogger.fx.ts
87
+ var init_setUpJsLogger_fx = __esm({
88
+ "node_modules/expo-modules-core/src/sweet/setUpJsLogger.fx.ts"() {
89
+ init_CodedError();
90
+ init_requireNativeModule();
91
+ if (__DEV__ && typeof window !== "undefined" && (process.env.EXPO_OS === "android" || process.env.EXPO_OS === "ios")) {
92
+ const NativeJSLogger = requireOptionalNativeModule("ExpoModulesCoreJSLogger");
93
+ if (NativeJSLogger) {
94
+ const onNewException = {
95
+ eventName: "ExpoModulesCoreJSLogger.onNewError",
96
+ action: console.error
97
+ };
98
+ const onNewWarning = {
99
+ eventName: "ExpoModulesCoreJSLogger.onNewWarning",
100
+ action: console.warn
101
+ };
102
+ const onNewDebug = {
103
+ eventName: "ExpoModulesCoreJSLogger.onNewDebug",
104
+ action: console.debug
105
+ };
106
+ const onNewInfo = {
107
+ eventName: "ExpoModulesCoreJSLogger.onNewInfo",
108
+ action: console.info
109
+ };
110
+ const onNewTrace = {
111
+ eventName: "ExpoModulesCoreJSLogger.onNewTrace",
112
+ action: console.trace
113
+ };
114
+ const listeners = [
115
+ onNewException,
116
+ onNewWarning,
117
+ onNewDebug,
118
+ onNewInfo,
119
+ onNewTrace
120
+ ];
121
+ for (const listener of listeners) {
122
+ NativeJSLogger.addListener(listener.eventName, ({ message }) => {
123
+ listener.action(message);
124
+ });
125
+ }
126
+ }
127
+ }
128
+ globalThis.ExpoModulesCore_CodedError = CodedError;
129
+ }
130
+ });
131
+
132
+ // node_modules/expo-modules-core/src/registerWebModule.ts
133
+ var init_registerWebModule = __esm({
134
+ "node_modules/expo-modules-core/src/registerWebModule.ts"() {
135
+ }
136
+ });
137
+
138
+ // node_modules/expo-modules-core/src/TypedArrays.types.ts
139
+ var init_TypedArrays_types = __esm({
140
+ "node_modules/expo-modules-core/src/TypedArrays.types.ts"() {
141
+ }
142
+ });
143
+
144
+ // node_modules/expo-modules-core/src/PermissionsInterface.ts
145
+ var init_PermissionsInterface = __esm({
146
+ "node_modules/expo-modules-core/src/PermissionsInterface.ts"() {
147
+ }
148
+ });
149
+ var init_PermissionsHook = __esm({
150
+ "node_modules/expo-modules-core/src/PermissionsHook.ts"() {
151
+ "use client";
152
+ }
153
+ });
154
+ var init_Refs = __esm({
155
+ "node_modules/expo-modules-core/src/Refs.ts"() {
156
+ }
157
+ });
158
+ var init_useReleasingSharedObject = __esm({
159
+ "node_modules/expo-modules-core/src/hooks/useReleasingSharedObject.ts"() {
160
+ "use client";
161
+ }
162
+ });
163
+
164
+ // node_modules/expo-modules-core/src/reload.ts
165
+ var init_reload = __esm({
166
+ "node_modules/expo-modules-core/src/reload.ts"() {
167
+ }
168
+ });
169
+
170
+ // node_modules/expo-modules-core/src/index.ts
171
+ var init_src = __esm({
172
+ "node_modules/expo-modules-core/src/index.ts"() {
173
+ init_setUpJsLogger_fx();
174
+ init_requireNativeModule();
175
+ init_registerWebModule();
176
+ init_TypedArrays_types();
177
+ init_PermissionsInterface();
178
+ init_PermissionsHook();
179
+ init_Refs();
180
+ init_useReleasingSharedObject();
181
+ init_reload();
182
+ init_CodedError();
183
+ }
184
+ });
185
+
186
+ // node_modules/expo-constants/build/Constants.types.js
187
+ var AppOwnership, ExecutionEnvironment, UserInterfaceIdiom;
188
+ var init_Constants_types = __esm({
189
+ "node_modules/expo-constants/build/Constants.types.js"() {
190
+ (function(AppOwnership2) {
191
+ AppOwnership2["Expo"] = "expo";
192
+ })(AppOwnership || (AppOwnership = {}));
193
+ (function(ExecutionEnvironment2) {
194
+ ExecutionEnvironment2["Bare"] = "bare";
195
+ ExecutionEnvironment2["Standalone"] = "standalone";
196
+ ExecutionEnvironment2["StoreClient"] = "storeClient";
197
+ })(ExecutionEnvironment || (ExecutionEnvironment = {}));
198
+ (function(UserInterfaceIdiom2) {
199
+ UserInterfaceIdiom2["Handset"] = "handset";
200
+ UserInterfaceIdiom2["Tablet"] = "tablet";
201
+ UserInterfaceIdiom2["Desktop"] = "desktop";
202
+ UserInterfaceIdiom2["TV"] = "tv";
203
+ UserInterfaceIdiom2["Unsupported"] = "unsupported";
204
+ })(UserInterfaceIdiom || (UserInterfaceIdiom = {}));
205
+ }
206
+ });
207
+
208
+ // node_modules/expo-constants/build/ExponentConstants.js
209
+ var ExponentConstants_default;
210
+ var init_ExponentConstants = __esm({
211
+ "node_modules/expo-constants/build/ExponentConstants.js"() {
212
+ init_src();
213
+ ExponentConstants_default = requireOptionalNativeModule("ExponentConstants");
214
+ }
215
+ });
216
+
217
+ // node_modules/expo-constants/build/Constants.js
218
+ var Constants_exports = {};
219
+ __export(Constants_exports, {
220
+ AppOwnership: () => AppOwnership,
221
+ ExecutionEnvironment: () => ExecutionEnvironment,
222
+ UserInterfaceIdiom: () => UserInterfaceIdiom,
223
+ default: () => Constants_default
224
+ });
225
+ function isEmbeddedManifest(manifest) {
226
+ return !isExpoUpdatesManifest(manifest);
227
+ }
228
+ function isExpoUpdatesManifest(manifest) {
229
+ return "metadata" in manifest;
230
+ }
231
+ function getManifest(suppressWarning = false) {
232
+ if (!rawManifest) {
233
+ const invalidManifestType = rawManifest === null ? "null" : "undefined";
234
+ if (nativeConstants.executionEnvironment === ExecutionEnvironment.Bare && Platform.OS !== "web") {
235
+ if (!suppressWarning) {
236
+ 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.`);
237
+ }
238
+ } else if (nativeConstants.executionEnvironment === ExecutionEnvironment.StoreClient || nativeConstants.executionEnvironment === ExecutionEnvironment.Standalone) {
239
+ throw new CodedError("ERR_CONSTANTS_MANIFEST_UNAVAILABLE", `Constants.manifest is ${invalidManifestType}, must be an object.`);
240
+ }
241
+ }
242
+ return rawManifest;
243
+ }
244
+ var ExpoUpdates, rawUpdatesManifest, rawDevLauncherManifest, rawAppConfig, _a, rawManifest, name, appOwnership, nativeConstants, constants, Constants_default;
245
+ var init_Constants = __esm({
246
+ "node_modules/expo-constants/build/Constants.js"() {
247
+ init_src();
248
+ init_Constants_types();
249
+ init_ExponentConstants();
250
+ init_Constants_types();
251
+ if (!ExponentConstants_default) {
252
+ console.warn("No native ExponentConstants module found, are you sure the expo-constants's module is linked properly?");
253
+ }
254
+ ExpoUpdates = requireOptionalNativeModule("ExpoUpdates");
255
+ rawUpdatesManifest = null;
256
+ if (ExpoUpdates) {
257
+ let updatesManifest;
258
+ if (ExpoUpdates.manifest) {
259
+ updatesManifest = ExpoUpdates.manifest;
260
+ } else if (ExpoUpdates.manifestString) {
261
+ updatesManifest = JSON.parse(ExpoUpdates.manifestString);
262
+ }
263
+ if (updatesManifest && Object.keys(updatesManifest).length > 0) {
264
+ rawUpdatesManifest = updatesManifest;
265
+ }
266
+ }
267
+ rawDevLauncherManifest = null;
268
+ if (NativeModules.EXDevLauncher) {
269
+ let devLauncherManifest;
270
+ if (NativeModules.EXDevLauncher.manifestString) {
271
+ devLauncherManifest = JSON.parse(NativeModules.EXDevLauncher.manifestString);
272
+ }
273
+ if (devLauncherManifest && Object.keys(devLauncherManifest).length > 0) {
274
+ rawDevLauncherManifest = devLauncherManifest;
275
+ }
276
+ }
277
+ rawAppConfig = null;
278
+ if (ExponentConstants_default && ExponentConstants_default.manifest) {
279
+ const appConfig = ExponentConstants_default.manifest;
280
+ if (typeof appConfig === "string") {
281
+ rawAppConfig = JSON.parse(appConfig);
282
+ } else {
283
+ rawAppConfig = appConfig;
284
+ }
285
+ }
286
+ rawManifest = (_a = rawUpdatesManifest != null ? rawUpdatesManifest : rawDevLauncherManifest) != null ? _a : rawAppConfig;
287
+ ({ name, appOwnership, ...nativeConstants } = ExponentConstants_default || {});
288
+ constants = {
289
+ ...nativeConstants,
290
+ // Ensure this is null in bare workflow
291
+ appOwnership: appOwnership != null ? appOwnership : null
292
+ };
293
+ Object.defineProperties(constants, {
294
+ /**
295
+ * Use `manifest` property by default.
296
+ * This property is only used for internal purposes.
297
+ * It behaves similarly to the original one, but suppresses warning upon no manifest available.
298
+ * `expo-asset` uses it to prevent users from seeing mentioned warning.
299
+ */
300
+ __unsafeNoWarnManifest: {
301
+ get() {
302
+ const maybeManifest = getManifest(true);
303
+ if (!maybeManifest || !isEmbeddedManifest(maybeManifest)) {
304
+ return null;
305
+ }
306
+ return maybeManifest;
307
+ },
308
+ enumerable: false
309
+ },
310
+ __unsafeNoWarnManifest2: {
311
+ get() {
312
+ const maybeManifest = getManifest(true);
313
+ if (!maybeManifest || !isExpoUpdatesManifest(maybeManifest)) {
314
+ return null;
315
+ }
316
+ return maybeManifest;
317
+ },
318
+ enumerable: false
319
+ },
320
+ manifest: {
321
+ get() {
322
+ const maybeManifest = getManifest();
323
+ if (!maybeManifest || !isEmbeddedManifest(maybeManifest)) {
324
+ return null;
325
+ }
326
+ return maybeManifest;
327
+ },
328
+ enumerable: true
329
+ },
330
+ manifest2: {
331
+ get() {
332
+ const maybeManifest = getManifest();
333
+ if (!maybeManifest || !isExpoUpdatesManifest(maybeManifest)) {
334
+ return null;
335
+ }
336
+ return maybeManifest;
337
+ },
338
+ enumerable: true
339
+ },
340
+ expoConfig: {
341
+ get() {
342
+ var _a2, _b;
343
+ const maybeManifest = getManifest(true);
344
+ if (!maybeManifest) {
345
+ return null;
346
+ }
347
+ if (ExpoUpdates && ExpoUpdates.isEmbeddedLaunch) {
348
+ return rawAppConfig;
349
+ }
350
+ if (isExpoUpdatesManifest(maybeManifest)) {
351
+ return (_b = (_a2 = maybeManifest.extra) == null ? void 0 : _a2.expoClient) != null ? _b : null;
352
+ } else if (isEmbeddedManifest(maybeManifest)) {
353
+ return maybeManifest;
354
+ }
355
+ return null;
356
+ },
357
+ enumerable: true
358
+ },
359
+ expoGoConfig: {
360
+ get() {
361
+ var _a2, _b;
362
+ const maybeManifest = getManifest(true);
363
+ if (!maybeManifest) {
364
+ return null;
365
+ }
366
+ if (isExpoUpdatesManifest(maybeManifest)) {
367
+ return (_b = (_a2 = maybeManifest.extra) == null ? void 0 : _a2.expoGo) != null ? _b : null;
368
+ } else if (isEmbeddedManifest(maybeManifest)) {
369
+ return maybeManifest;
370
+ }
371
+ return null;
372
+ },
373
+ enumerable: true
374
+ },
375
+ easConfig: {
376
+ get() {
377
+ var _a2, _b;
378
+ const maybeManifest = getManifest(true);
379
+ if (!maybeManifest) {
380
+ return null;
381
+ }
382
+ if (isExpoUpdatesManifest(maybeManifest)) {
383
+ return (_b = (_a2 = maybeManifest.extra) == null ? void 0 : _a2.eas) != null ? _b : null;
384
+ } else if (isEmbeddedManifest(maybeManifest)) {
385
+ return maybeManifest;
386
+ }
387
+ return null;
388
+ },
389
+ enumerable: true
390
+ },
391
+ __rawManifest_TEST: {
392
+ get() {
393
+ return rawManifest;
394
+ },
395
+ set(value) {
396
+ rawManifest = value;
397
+ },
398
+ enumerable: false
399
+ }
400
+ });
401
+ Constants_default = constants;
402
+ }
403
+ });
19
404
 
20
405
  // src/theme/defaultTheme.ts
21
406
  var defaultOnboardingTheme = {
@@ -94,10 +479,10 @@ var IllustrationProvider = ({
94
479
  const value = useMemo(() => registry != null ? registry : EMPTY_REGISTRY, [registry]);
95
480
  return /* @__PURE__ */ jsx(IllustrationContext.Provider, { value, children });
96
481
  };
97
- var useIllustration = (name) => {
482
+ var useIllustration = (name2) => {
98
483
  const registry = useContext(IllustrationContext);
99
- if (!name) return void 0;
100
- return registry[name];
484
+ if (!name2) return void 0;
485
+ return registry[name2];
101
486
  };
102
487
  var Glyph = ({ children }) => {
103
488
  const t = useOnboardingTheme();
@@ -169,6 +554,21 @@ var styles = StyleSheet.create({
169
554
  fontWeight: "700"
170
555
  }
171
556
  });
557
+ var EMPTY_REGISTRY2 = {};
558
+ var IconContext = createContext(EMPTY_REGISTRY2);
559
+ var IconRegistryProvider = ({
560
+ registry,
561
+ children
562
+ }) => {
563
+ const value = useMemo(() => registry != null ? registry : EMPTY_REGISTRY2, [registry]);
564
+ return /* @__PURE__ */ jsx(IconContext.Provider, { value, children });
565
+ };
566
+ var useHostIcon = (name2) => {
567
+ const registry = useContext(IconContext);
568
+ if (!name2) return void 0;
569
+ if (!Object.prototype.hasOwnProperty.call(registry, name2)) return void 0;
570
+ return registry[name2];
571
+ };
172
572
 
173
573
  // src/theme/typography.ts
174
574
  var round = (n) => Math.round(n);
@@ -183,9 +583,9 @@ var captionStyle = (f) => ({
183
583
  lineHeight: round(f.baseSize * 0.8125 * f.scale * 1.5)
184
584
  });
185
585
  var labelStyle = (f) => {
186
- var _a;
586
+ var _a2;
187
587
  return {
188
- fontFamily: (_a = f.medium) != null ? _a : f.bold,
588
+ fontFamily: (_a2 = f.medium) != null ? _a2 : f.bold,
189
589
  fontSize: round(f.baseSize * f.scale),
190
590
  lineHeight: round(f.baseSize * f.scale * 1.4),
191
591
  fontWeight: f.medium ? void 0 : "600"
@@ -198,9 +598,9 @@ var headingStyle = (f) => ({
198
598
  fontWeight: f.bold ? void 0 : "700"
199
599
  });
200
600
  var buttonLabelStyle = (f) => {
201
- var _a;
601
+ var _a2;
202
602
  return {
203
- fontFamily: (_a = f.bold) != null ? _a : f.medium,
603
+ fontFamily: (_a2 = f.bold) != null ? _a2 : f.medium,
204
604
  fontSize: round(f.baseSize * f.scale),
205
605
  fontWeight: f.bold ? void 0 : "600"
206
606
  };
@@ -402,7 +802,7 @@ var _AnimatedSparkle = ({ size = 30, color, variant = "spin" }) => {
402
802
  }
403
803
  ) });
404
804
  };
405
- var AnimatedSparkle = React14.memo(_AnimatedSparkle);
805
+ var AnimatedSparkle = React18.memo(_AnimatedSparkle);
406
806
  var styles2 = StyleSheet.create({
407
807
  box: { alignItems: "center", justifyContent: "center" },
408
808
  glyph: {
@@ -505,7 +905,7 @@ var _LoadingBlock = ({
505
905
  )
506
906
  ] });
507
907
  };
508
- var LoadingBlock = React14.memo(_LoadingBlock);
908
+ var LoadingBlock = React18.memo(_LoadingBlock);
509
909
  var styles3 = StyleSheet.create({
510
910
  center: { flex: 1, alignItems: "center", justifyContent: "center" },
511
911
  // Absolutely-positioned label column, pinned just under the centered stage: its top
@@ -550,7 +950,7 @@ var _LoadingScreen = ({ title, hint }) => {
550
950
  }
551
951
  );
552
952
  };
553
- var LoadingScreen = React14.memo(_LoadingScreen);
953
+ var LoadingScreen = React18.memo(_LoadingScreen);
554
954
  var styles4 = StyleSheet.create({
555
955
  flex: { flex: 1 }
556
956
  });
@@ -590,7 +990,7 @@ var _StepProgress = ({ step, complete, approxScreens }) => {
590
990
  }
591
991
  ) });
592
992
  };
593
- var StepProgress = React14.memo(_StepProgress);
993
+ var StepProgress = React18.memo(_StepProgress);
594
994
  var styles5 = StyleSheet.create({
595
995
  track: { height: 6, width: "100%", overflow: "hidden" },
596
996
  fill: { height: 6 }
@@ -606,31 +1006,31 @@ var _OnboardingScaffold = ({
606
1006
  children
607
1007
  }) => {
608
1008
  const t = useOnboardingTheme();
609
- const styles16 = useMemo(() => makeStyles(t), [t]);
1009
+ const styles18 = useMemo(() => makeStyles(t), [t]);
610
1010
  const hit = { top: 12, bottom: 12, left: 12, right: 12 };
611
1011
  return /* @__PURE__ */ jsxs(
612
1012
  SafeAreaView,
613
1013
  {
614
1014
  edges: ["top", "bottom"],
615
- style: [styles16.flex, { backgroundColor: t.colors.background }],
1015
+ style: [styles18.flex, { backgroundColor: t.colors.background }],
616
1016
  children: [
617
- /* @__PURE__ */ jsxs(View, { style: [styles16.header, { paddingHorizontal: t.spacing.md, paddingTop: t.spacing.md }], children: [
618
- /* @__PURE__ */ jsx(View, { style: styles16.progressWrap, children: /* @__PURE__ */ jsx(StepProgress, { step, complete, approxScreens }) }),
619
- onSkip ? /* @__PURE__ */ jsx(TouchableOpacity, { onPress: onSkip, hitSlop: hit, style: styles16.skip, children: /* @__PURE__ */ jsx(Text, { style: [bodyStyle(t.fonts), { color: t.colors.textMuted }], children: skipLabel }) }) : null
1017
+ /* @__PURE__ */ jsxs(View, { style: [styles18.header, { paddingHorizontal: t.spacing.md, paddingTop: t.spacing.md }], children: [
1018
+ /* @__PURE__ */ jsx(View, { style: styles18.progressWrap, children: /* @__PURE__ */ jsx(StepProgress, { step, complete, approxScreens }) }),
1019
+ onSkip ? /* @__PURE__ */ jsx(TouchableOpacity, { onPress: onSkip, hitSlop: hit, style: styles18.skip, children: /* @__PURE__ */ jsx(Text, { style: [bodyStyle(t.fonts), { color: t.colors.textMuted }], children: skipLabel }) }) : null
620
1020
  ] }),
621
1021
  /* @__PURE__ */ jsx(
622
1022
  View,
623
1023
  {
624
- style: [styles16.body, { paddingHorizontal: t.spacing.md, paddingTop: t.spacing.md }],
1024
+ style: [styles18.body, { paddingHorizontal: t.spacing.md, paddingTop: t.spacing.md }],
625
1025
  children
626
1026
  }
627
1027
  ),
628
- onBack ? /* @__PURE__ */ jsx(View, { style: [styles16.footer, { paddingHorizontal: t.spacing.md, paddingBottom: t.spacing.sm }], children: /* @__PURE__ */ jsx(TouchableOpacity, { onPress: onBack, hitSlop: hit, children: /* @__PURE__ */ jsx(Text, { style: [bodyStyle(t.fonts), { color: t.colors.textMuted }], children: backLabel }) }) }) : null
1028
+ onBack ? /* @__PURE__ */ jsx(View, { style: [styles18.footer, { paddingHorizontal: t.spacing.md, paddingBottom: t.spacing.sm }], children: /* @__PURE__ */ jsx(TouchableOpacity, { onPress: onBack, hitSlop: hit, children: /* @__PURE__ */ jsx(Text, { style: [bodyStyle(t.fonts), { color: t.colors.textMuted }], children: backLabel }) }) }) : null
629
1029
  ]
630
1030
  }
631
1031
  );
632
1032
  };
633
- var OnboardingScaffold = React14.memo(_OnboardingScaffold);
1033
+ var OnboardingScaffold = React18.memo(_OnboardingScaffold);
634
1034
  function makeStyles(t) {
635
1035
  return StyleSheet.create({
636
1036
  flex: { flex: 1 },
@@ -731,7 +1131,7 @@ var _Button = ({
731
1131
  }
732
1132
  );
733
1133
  };
734
- var Button = React14.memo(_Button);
1134
+ var Button = React18.memo(_Button);
735
1135
  var styles6 = StyleSheet.create({
736
1136
  base: { alignItems: "center", justifyContent: "center" },
737
1137
  fill: { width: "100%" }
@@ -749,7 +1149,7 @@ var _ErrorBlock = ({
749
1149
  onRetry ? /* @__PURE__ */ jsx(Button, { title: retryLabel, onPress: onRetry, variant: "outline" }) : null
750
1150
  ] });
751
1151
  };
752
- var ErrorBlock = React14.memo(_ErrorBlock);
1152
+ var ErrorBlock = React18.memo(_ErrorBlock);
753
1153
  var styles7 = StyleSheet.create({
754
1154
  center: { flex: 1, alignItems: "center", justifyContent: "center" }
755
1155
  });
@@ -762,10 +1162,10 @@ var _CardLayout = ({
762
1162
  titleNode
763
1163
  }) => {
764
1164
  const t = useOnboardingTheme();
765
- const styles16 = useMemo(() => makeStyles2(t), [t]);
1165
+ const styles18 = useMemo(() => makeStyles2(t), [t]);
766
1166
  const hasHeader = !!title || !!subtitle || !!titleNode;
767
- return /* @__PURE__ */ jsxs(KeyboardAvoidingView, { style: styles16.fill, behavior: "padding", children: [
768
- hasHeader ? /* @__PURE__ */ jsxs(View, { style: styles16.header, children: [
1167
+ return /* @__PURE__ */ jsxs(KeyboardAvoidingView, { style: styles18.fill, behavior: "padding", children: [
1168
+ hasHeader ? /* @__PURE__ */ jsxs(View, { style: styles18.header, children: [
769
1169
  titleNode != null ? titleNode : title ? /* @__PURE__ */ jsx(Text, { style: [labelStyle(t.fonts), { color: t.colors.text }], children: title }) : null,
770
1170
  subtitle ? /* @__PURE__ */ jsx(
771
1171
  Text,
@@ -781,10 +1181,10 @@ var _CardLayout = ({
781
1181
  /* @__PURE__ */ jsx(
782
1182
  ScrollView,
783
1183
  {
784
- style: styles16.fill,
1184
+ style: styles18.fill,
785
1185
  contentContainerStyle: [
786
- styles16.scrollContent,
787
- align === "center" && styles16.center
1186
+ styles18.scrollContent,
1187
+ align === "center" && styles18.center
788
1188
  ],
789
1189
  keyboardShouldPersistTaps: "handled",
790
1190
  keyboardDismissMode: "on-drag",
@@ -792,10 +1192,10 @@ var _CardLayout = ({
792
1192
  children
793
1193
  }
794
1194
  ),
795
- footer ? /* @__PURE__ */ jsx(View, { style: styles16.footer, children: footer }) : null
1195
+ footer ? /* @__PURE__ */ jsx(View, { style: styles18.footer, children: footer }) : null
796
1196
  ] });
797
1197
  };
798
- var CardLayout = React14.memo(_CardLayout);
1198
+ var CardLayout = React18.memo(_CardLayout);
799
1199
  function makeStyles2(t) {
800
1200
  return StyleSheet.create({
801
1201
  fill: { flex: 1 },
@@ -920,7 +1320,7 @@ var _CompletionView = ({
920
1320
  }
921
1321
  );
922
1322
  };
923
- var CompletionView = React14.memo(_CompletionView);
1323
+ var CompletionView = React18.memo(_CompletionView);
924
1324
  var styles8 = StyleSheet.create({
925
1325
  center: { width: "100%", alignItems: "center", justifyContent: "center" },
926
1326
  badgeStage: {
@@ -937,6 +1337,8 @@ var easeWire3 = Easing.bezier(...WIRE_BEZIER);
937
1337
  var _CardHandoff = ({
938
1338
  transitionKey,
939
1339
  variant = "slide",
1340
+ direction = "forward",
1341
+ layout = "fill",
940
1342
  children
941
1343
  }) => {
942
1344
  const reduced = useReducedMotion();
@@ -947,7 +1349,7 @@ var _CardHandoff = ({
947
1349
  const running = useRef({});
948
1350
  const mounted = useRef(false);
949
1351
  useEffect(() => {
950
- var _a, _b;
1352
+ var _a2, _b;
951
1353
  const last = prev.current;
952
1354
  prev.current = { key: transitionKey, node: children, variant };
953
1355
  if (!mounted.current) {
@@ -956,7 +1358,7 @@ var _CardHandoff = ({
956
1358
  return;
957
1359
  }
958
1360
  if (last.key === transitionKey) return;
959
- (_a = running.current.enter) == null ? void 0 : _a.stop();
1361
+ (_a2 = running.current.enter) == null ? void 0 : _a2.stop();
960
1362
  (_b = running.current.exit) == null ? void 0 : _b.stop();
961
1363
  setLeaving(last);
962
1364
  enterT.setValue(0);
@@ -981,15 +1383,15 @@ var _CardHandoff = ({
981
1383
  });
982
1384
  useEffect(
983
1385
  () => () => {
984
- var _a, _b;
985
- (_a = running.current.enter) == null ? void 0 : _a.stop();
1386
+ var _a2, _b;
1387
+ (_a2 = running.current.enter) == null ? void 0 : _a2.stop();
986
1388
  (_b = running.current.exit) == null ? void 0 : _b.stop();
987
1389
  },
988
1390
  []
989
1391
  );
990
1392
  const enterStyle = {
991
1393
  opacity: enterT,
992
- transform: transformFor(variant, enterT, reduced, "enter")
1394
+ transform: transformFor(variant, enterT, reduced, "enter", direction)
993
1395
  };
994
1396
  return /* @__PURE__ */ jsxs(Fragment, { children: [
995
1397
  leaving ? /* @__PURE__ */ jsx(
@@ -1000,13 +1402,14 @@ var _CardHandoff = ({
1000
1402
  StyleSheet.absoluteFill,
1001
1403
  {
1002
1404
  opacity: exitT.interpolate({ inputRange: [0, 1], outputRange: [1, 0] }),
1003
- transform: transformFor(leaving.variant, exitT, reduced, "exit")
1405
+ // The CURRENT direction drives BOTH layers: one transition, one geography.
1406
+ transform: transformFor(leaving.variant, exitT, reduced, "exit", direction)
1004
1407
  }
1005
1408
  ],
1006
1409
  children: leaving.node
1007
1410
  }
1008
1411
  ) : null,
1009
- /* @__PURE__ */ jsx(Animated.View, { style: [styles9.fill, enterStyle], children }, variant)
1412
+ /* @__PURE__ */ jsx(Animated.View, { style: [layout === "fill" ? styles9.fill : null, enterStyle], children }, variant)
1010
1413
  ] });
1011
1414
  };
1012
1415
  var startEnter = (value, variant, reduced, delay, onDone) => {
@@ -1032,21 +1435,22 @@ var startEnter = (value, variant, reduced, delay, onDone) => {
1032
1435
  });
1033
1436
  return anim;
1034
1437
  };
1035
- var transformFor = (variant, t, reduced, direction) => {
1438
+ var transformFor = (variant, t, reduced, layer, travel) => {
1036
1439
  if (reduced || variant === "fade") return [];
1037
- if (variant === "spring" && direction === "enter") {
1440
+ if (variant === "spring" && layer === "enter") {
1038
1441
  return [{ scale: t.interpolate({ inputRange: [0, 1], outputRange: [CARD_ENTER_SCALE_FROM, 1] }) }];
1039
1442
  }
1443
+ const slide = travel === "forward" ? CARD_SLIDE_PX : -CARD_SLIDE_PX;
1040
1444
  return [
1041
1445
  {
1042
1446
  translateX: t.interpolate({
1043
1447
  inputRange: [0, 1],
1044
- outputRange: direction === "enter" ? [CARD_SLIDE_PX, 0] : [0, -CARD_SLIDE_PX]
1448
+ outputRange: layer === "enter" ? [slide, 0] : [0, -slide]
1045
1449
  })
1046
1450
  }
1047
1451
  ];
1048
1452
  };
1049
- var CardHandoff = React14.memo(_CardHandoff);
1453
+ var CardHandoff = React18.memo(_CardHandoff);
1050
1454
  var styles9 = StyleSheet.create({
1051
1455
  fill: { flex: 1 }
1052
1456
  });
@@ -1061,13 +1465,13 @@ var tryParse = (s) => {
1061
1465
  }
1062
1466
  };
1063
1467
  var deriveAnswers = (messages) => {
1064
- var _a, _b, _c;
1468
+ var _a2, _b, _c;
1065
1469
  const out = {};
1066
1470
  for (let i = 0; i < messages.length; i++) {
1067
1471
  const m = messages[i];
1068
1472
  const r = m == null ? void 0 : m.response;
1069
1473
  if (!m || m.role !== "assistant" || !r || r.action !== "render") continue;
1070
- const props = (_a = r.props) != null ? _a : {};
1474
+ const props = (_a2 = r.props) != null ? _a2 : {};
1071
1475
  const progress = props.progress;
1072
1476
  const questionText = (_c = (_b = props.title) != null ? _b : props.label) != null ? _c : props.question;
1073
1477
  const key = (progress == null ? void 0 : progress.key) || questionText;
@@ -1081,9 +1485,9 @@ var deriveAnswers = (messages) => {
1081
1485
 
1082
1486
  // src/utils/readProgress.ts
1083
1487
  var readProgress = (response) => {
1084
- var _a;
1488
+ var _a2;
1085
1489
  if (!response || response.action !== "render") return {};
1086
- const props = (_a = response.props) != null ? _a : {};
1490
+ const props = (_a2 = response.props) != null ? _a2 : {};
1087
1491
  const raw = props.progress;
1088
1492
  if (!raw || typeof raw !== "object") return {};
1089
1493
  const p = raw;
@@ -1169,7 +1573,7 @@ var OnboardingFlow = ({
1169
1573
  resumed = false,
1170
1574
  clientContext
1171
1575
  }) => {
1172
- var _a, _b, _c, _d, _e, _f;
1576
+ var _a2, _b, _c, _d, _e, _f;
1173
1577
  const { messages, error, isLoading, sendMessage, reset } = useWireAIThread();
1174
1578
  const makeActions = useWireAIAction(sendMessage);
1175
1579
  const c = useMemo(() => ({ ...DEFAULT_COPY, ...copy }), [copy]);
@@ -1200,25 +1604,25 @@ var OnboardingFlow = ({
1200
1604
  const [validating, setValidating] = useState(false);
1201
1605
  const lastCard = useMemo(
1202
1606
  () => [...messages].reverse().find((m) => {
1203
- var _a2;
1204
- return m.role === "assistant" && ((_a2 = m.response) == null ? void 0 : _a2.action) === "render";
1607
+ var _a3;
1608
+ return m.role === "assistant" && ((_a3 = m.response) == null ? void 0 : _a3.action) === "render";
1205
1609
  }),
1206
1610
  [messages]
1207
1611
  );
1208
1612
  const renderedCount = useMemo(
1209
1613
  () => messages.filter((m) => {
1210
- var _a2;
1211
- return m.role === "assistant" && ((_a2 = m.response) == null ? void 0 : _a2.action) === "render";
1614
+ var _a3;
1615
+ return m.role === "assistant" && ((_a3 = m.response) == null ? void 0 : _a3.action) === "render";
1212
1616
  }).length,
1213
1617
  [messages]
1214
1618
  );
1215
1619
  const progress = useMemo(() => readProgress(lastCard == null ? void 0 : lastCard.response), [lastCard]);
1216
1620
  useEffect(() => {
1217
- var _a2;
1621
+ var _a3;
1218
1622
  if (started.current) return;
1219
1623
  started.current = true;
1220
1624
  sendMessage(resumed ? SKIP_ONE_SENTINEL : startMessage);
1221
- (_a2 = onEventRef.current) == null ? void 0 : _a2.call(
1625
+ (_a3 = onEventRef.current) == null ? void 0 : _a3.call(
1222
1626
  onEventRef,
1223
1627
  resumed ? { type: "resumed", contextId: sessionId } : { type: "started", contextId: sessionId }
1224
1628
  );
@@ -1229,10 +1633,10 @@ var OnboardingFlow = ({
1229
1633
  return () => clearTimeout(timer);
1230
1634
  }, [lastCard, startTimeoutMs]);
1231
1635
  useEffect(() => {
1232
- var _a2, _b2, _c2, _d2;
1636
+ var _a3, _b2, _c2, _d2;
1233
1637
  setValidationError(void 0);
1234
1638
  if (!(lastCard == null ? void 0 : lastCard.id)) return;
1235
- const step2 = (_a2 = progress.step) != null ? _a2 : renderedCount;
1639
+ const step2 = (_a3 = progress.step) != null ? _a3 : renderedCount;
1236
1640
  lastScreenIndexRef.current = Math.max(0, step2 - 1);
1237
1641
  (_c2 = onEventRef.current) == null ? void 0 : _c2.call(onEventRef, {
1238
1642
  type: "turn",
@@ -1248,13 +1652,13 @@ var OnboardingFlow = ({
1248
1652
  }, [lastCard == null ? void 0 : lastCard.id]);
1249
1653
  useEffect(() => {
1250
1654
  return () => {
1251
- var _a2, _b2, _c2;
1655
+ var _a3, _b2, _c2;
1252
1656
  if (finished.current || degradedRef.current) return;
1253
1657
  reportClientEvent(reportTargetRef.current, {
1254
1658
  event_type: "dropped",
1255
1659
  session_id: sessionIdRef.current,
1256
1660
  screen_index: lastScreenIndexRef.current >= 0 ? lastScreenIndexRef.current : void 0,
1257
- device: (_a2 = clientContextRef.current) == null ? void 0 : _a2.device,
1661
+ device: (_a3 = clientContextRef.current) == null ? void 0 : _a3.device,
1258
1662
  user_context: (_b2 = clientContextRef.current) == null ? void 0 : _b2.userContext,
1259
1663
  user_id: (_c2 = clientContextRef.current) == null ? void 0 : _c2.userId
1260
1664
  });
@@ -1267,12 +1671,12 @@ var OnboardingFlow = ({
1267
1671
  reset();
1268
1672
  }, [reset]);
1269
1673
  useEffect(() => {
1270
- var _a2, _b2, _c2, _d2, _e2, _f2, _g;
1674
+ var _a3, _b2, _c2, _d2, _e2, _f2, _g;
1271
1675
  if (errored.current) return;
1272
1676
  if (!error && !timedOut) return;
1273
1677
  errored.current = true;
1274
1678
  const reason = error ? "backend" : "timeout";
1275
- (_a2 = onEventRef.current) == null ? void 0 : _a2.call(onEventRef, { type: "error", reason });
1679
+ (_a3 = onEventRef.current) == null ? void 0 : _a3.call(onEventRef, { type: "error", reason });
1276
1680
  attempts.current += 1;
1277
1681
  if (attempts.current <= maxRetries) {
1278
1682
  (_b2 = onEventRef.current) == null ? void 0 : _b2.call(onEventRef, { type: "retry", reason, attempt: attempts.current });
@@ -1325,26 +1729,26 @@ var OnboardingFlow = ({
1325
1729
  }, []);
1326
1730
  const wrappedActions = useCallback(
1327
1731
  (messageId) => {
1328
- var _a2;
1732
+ var _a3;
1329
1733
  const base = makeActions(messageId);
1330
1734
  const key = progress.key;
1331
- const validator = key ? (_a2 = validatorsRef.current) == null ? void 0 : _a2[key] : void 0;
1735
+ const validator = key ? (_a3 = validatorsRef.current) == null ? void 0 : _a3[key] : void 0;
1332
1736
  if (!validator) return base;
1333
1737
  const out = { ...base };
1334
- for (const name of ANSWER_CALLBACKS) {
1335
- const original = base[name];
1738
+ for (const name2 of ANSWER_CALLBACKS) {
1739
+ const original = base[name2];
1336
1740
  if (!original) continue;
1337
- out[name] = (...args) => {
1741
+ out[name2] = (...args) => {
1338
1742
  const value = args[0];
1339
1743
  if (typeof value !== "string") return original(...args);
1340
1744
  setValidating(true);
1341
1745
  validator(value).then((res) => {
1342
- var _a3;
1746
+ var _a4;
1343
1747
  if (res.ok) {
1344
1748
  setValidationError(void 0);
1345
1749
  original(...args);
1346
1750
  } else {
1347
- setValidationError((_a3 = res.error) != null ? _a3 : "That value isn't available.");
1751
+ setValidationError((_a4 = res.error) != null ? _a4 : "That value isn't available.");
1348
1752
  }
1349
1753
  }).catch(() => {
1350
1754
  original(...args);
@@ -1375,7 +1779,7 @@ var OnboardingFlow = ({
1375
1779
  if (!lastCard || !response) {
1376
1780
  return /* @__PURE__ */ jsx(LoadingScreen, { title: c.startingTitle, hint: c.startingHint });
1377
1781
  }
1378
- const step = (_a = progress.step) != null ? _a : renderedCount;
1782
+ const step = (_a2 = progress.step) != null ? _a2 : renderedCount;
1379
1783
  const total = (_b = progress.total) != null ? _b : approxScreens;
1380
1784
  const isTerminal = response.action === "render" && response.component === "StatusCard";
1381
1785
  if (isTerminal) {
@@ -1562,7 +1966,7 @@ var _ChipItem = ({ chip, isSelected, multiSelect, onToggle }) => {
1562
1966
  }
1563
1967
  );
1564
1968
  };
1565
- var ChipItem = React14.memo(_ChipItem);
1969
+ var ChipItem = React18.memo(_ChipItem);
1566
1970
  var _ChipSelectCard = ({
1567
1971
  title,
1568
1972
  chips,
@@ -1627,8 +2031,8 @@ var _ChipSelectCard = ({
1627
2031
  };
1628
2032
  var ChipSelectCard = {
1629
2033
  name: "ChipSelectCard",
1630
- description: "Use for compact short labels: seasons, activities, travel styles, moods, categories. Ideal for 4\u201312 single-word or two-word options. Use SelectionCard instead when options need descriptions.",
1631
- component: React14.memo(_ChipSelectCard),
2034
+ description: "Use for compact short labels: seasons, activities, travel styles, moods, categories. Ideal for 4\u201312 single-word or two-word options. Use SelectionCard instead when options need descriptions; use CardGridSelectCard for a smaller set (2\u20136) of visual choices that each deserve an icon.",
2035
+ component: React18.memo(_ChipSelectCard),
1632
2036
  propsSchema: schema,
1633
2037
  defaultProps: { multiSelect: true, submitLabel: "Continue" }
1634
2038
  };
@@ -1664,7 +2068,7 @@ var _TextInputCard = ({
1664
2068
  lines = 6
1665
2069
  }) => {
1666
2070
  const t = useOnboardingTheme();
1667
- const styles16 = useMemo(() => makeStyles3(t), [t]);
2071
+ const styles18 = useMemo(() => makeStyles3(t), [t]);
1668
2072
  const { height: screenHeight } = useWindowDimensions();
1669
2073
  const [value, setValue] = useState("");
1670
2074
  const [submitted, setSubmitted] = useState(false);
@@ -1691,7 +2095,7 @@ var _TextInputCard = ({
1691
2095
  disabled: !value.trim() || locked
1692
2096
  }
1693
2097
  ),
1694
- children: /* @__PURE__ */ jsxs(View, { style: styles16.row, children: [
2098
+ children: /* @__PURE__ */ jsxs(View, { style: styles18.row, children: [
1695
2099
  /* @__PURE__ */ jsx(
1696
2100
  TextInput,
1697
2101
  {
@@ -1705,7 +2109,7 @@ var _TextInputCard = ({
1705
2109
  textAlignVertical: multiline ? "top" : "center",
1706
2110
  style: [
1707
2111
  bodyStyle(t.fonts),
1708
- styles16.input,
2112
+ styles18.input,
1709
2113
  {
1710
2114
  color: t.colors.text,
1711
2115
  backgroundColor: t.colors.surface,
@@ -1725,7 +2129,7 @@ var _TextInputCard = ({
1725
2129
  var TextInputCard = {
1726
2130
  name: "TextInputCard",
1727
2131
  description: "Use when the user needs to type a free-text answer: an open-ended goal, notes, feedback, a name, a destination, a search query. Multi-line by default (great for open-ended goals); set multiline:false for a short single-line field like a name. Use NumberStepperCard for numeric ranges with known bounds.",
1728
- component: React14.memo(_TextInputCard),
2132
+ component: React18.memo(_TextInputCard),
1729
2133
  propsSchema: schema2,
1730
2134
  defaultProps: { submitLabel: "Submit", multiline: true, lines: 6 }
1731
2135
  };
@@ -1735,17 +2139,201 @@ function makeStyles3(t) {
1735
2139
  input: { borderWidth: 1 }
1736
2140
  });
1737
2141
  }
1738
- var easeWire5 = Easing.bezier(...WIRE_BEZIER);
2142
+
2143
+ // src/icons/expoIcons.ts
2144
+ var runtimeRequire = (moduleName) => {
2145
+ if (moduleName !== "@expo/vector-icons") return void 0;
2146
+ if (typeof __require !== "function") return void 0;
2147
+ try {
2148
+ return __require("@expo/vector-icons");
2149
+ } catch {
2150
+ return void 0;
2151
+ }
2152
+ };
2153
+ var interop = (mod) => {
2154
+ if (!mod || typeof mod !== "object") return void 0;
2155
+ const def = mod.default;
2156
+ const ns = mod;
2157
+ if (ns.MaterialCommunityIcons || ns.Ionicons) return ns;
2158
+ if (def && typeof def === "object") return def;
2159
+ return ns;
2160
+ };
2161
+ var asComponent = (value) => {
2162
+ if (typeof value === "function") return value;
2163
+ if (value && typeof value === "object" && "$$typeof" in value) {
2164
+ return value;
2165
+ }
2166
+ return void 0;
2167
+ };
2168
+ var cached;
2169
+ var resolveIconFamily = (family, requireModule = runtimeRequire) => {
2170
+ try {
2171
+ if (cached === void 0 || requireModule !== runtimeRequire) {
2172
+ const resolved = interop(requireModule("@expo/vector-icons"));
2173
+ if (requireModule === runtimeRequire) cached = resolved != null ? resolved : null;
2174
+ if (!resolved) return void 0;
2175
+ return asComponent(resolved[family]);
2176
+ }
2177
+ if (cached === null) return void 0;
2178
+ return asComponent(cached[family]);
2179
+ } catch {
2180
+ return void 0;
2181
+ }
2182
+ };
2183
+
2184
+ // src/icons/vocabulary.ts
2185
+ var WIRE_ICON_GLYPHS = {
2186
+ // ── Acquisition channels ("where did you hear about us?") ──────────────────
2187
+ instagram: { family: "MaterialCommunityIcons", name: "instagram" },
2188
+ tiktok: { family: "Ionicons", name: "logo-tiktok" },
2189
+ youtube: { family: "MaterialCommunityIcons", name: "youtube" },
2190
+ facebook: { family: "MaterialCommunityIcons", name: "facebook" },
2191
+ twitter: { family: "MaterialCommunityIcons", name: "twitter" },
2192
+ reddit: { family: "MaterialCommunityIcons", name: "reddit" },
2193
+ linkedin: { family: "MaterialCommunityIcons", name: "linkedin" },
2194
+ discord: { family: "Ionicons", name: "logo-discord" },
2195
+ whatsapp: { family: "MaterialCommunityIcons", name: "whatsapp" },
2196
+ twitch: { family: "MaterialCommunityIcons", name: "twitch" },
2197
+ snapchat: { family: "MaterialCommunityIcons", name: "snapchat" },
2198
+ pinterest: { family: "MaterialCommunityIcons", name: "pinterest" },
2199
+ google: { family: "MaterialCommunityIcons", name: "google" },
2200
+ search: { family: "MaterialCommunityIcons", name: "magnify" },
2201
+ friend: { family: "MaterialCommunityIcons", name: "account-heart" },
2202
+ podcast: { family: "MaterialCommunityIcons", name: "podcast" },
2203
+ blog: { family: "MaterialCommunityIcons", name: "post" },
2204
+ newsletter: { family: "MaterialCommunityIcons", name: "email-outline" },
2205
+ news: { family: "MaterialCommunityIcons", name: "newspaper" },
2206
+ "app-store": { family: "MaterialCommunityIcons", name: "apple" },
2207
+ ad: { family: "MaterialCommunityIcons", name: "bullhorn" },
2208
+ // ── Intent / occasion ("what brings you here?") ────────────────────────────
2209
+ wedding: { family: "MaterialCommunityIcons", name: "ring" },
2210
+ birthday: { family: "MaterialCommunityIcons", name: "cake-variant" },
2211
+ baby: { family: "MaterialCommunityIcons", name: "baby-carriage" },
2212
+ travel: { family: "MaterialCommunityIcons", name: "airplane" },
2213
+ work: { family: "MaterialCommunityIcons", name: "briefcase" },
2214
+ celebration: { family: "MaterialCommunityIcons", name: "party-popper" },
2215
+ store: { family: "MaterialCommunityIcons", name: "storefront" },
2216
+ school: { family: "MaterialCommunityIcons", name: "school" },
2217
+ team: { family: "MaterialCommunityIcons", name: "account-multiple" },
2218
+ growth: { family: "MaterialCommunityIcons", name: "trending-up" },
2219
+ // ── General purpose ────────────────────────────────────────────────────────
2220
+ sparkle: { family: "MaterialCommunityIcons", name: "star-four-points" },
2221
+ heart: { family: "MaterialCommunityIcons", name: "heart" },
2222
+ star: { family: "MaterialCommunityIcons", name: "star" },
2223
+ fire: { family: "MaterialCommunityIcons", name: "fire" },
2224
+ target: { family: "MaterialCommunityIcons", name: "target" },
2225
+ trophy: { family: "MaterialCommunityIcons", name: "trophy" },
2226
+ rocket: { family: "MaterialCommunityIcons", name: "rocket-launch" },
2227
+ clock: { family: "MaterialCommunityIcons", name: "clock-outline" },
2228
+ calendar: { family: "MaterialCommunityIcons", name: "calendar-star" },
2229
+ camera: { family: "MaterialCommunityIcons", name: "camera" },
2230
+ image: { family: "MaterialCommunityIcons", name: "image" },
2231
+ video: { family: "MaterialCommunityIcons", name: "video" },
2232
+ mic: { family: "MaterialCommunityIcons", name: "microphone" },
2233
+ music: { family: "MaterialCommunityIcons", name: "music" },
2234
+ book: { family: "MaterialCommunityIcons", name: "book-open-variant" },
2235
+ food: { family: "MaterialCommunityIcons", name: "silverware-fork-knife" },
2236
+ coffee: { family: "MaterialCommunityIcons", name: "coffee" },
2237
+ fitness: { family: "MaterialCommunityIcons", name: "dumbbell" },
2238
+ health: { family: "MaterialCommunityIcons", name: "heart-pulse" },
2239
+ meditation: { family: "MaterialCommunityIcons", name: "meditation" },
2240
+ sleep: { family: "MaterialCommunityIcons", name: "sleep" },
2241
+ brain: { family: "MaterialCommunityIcons", name: "brain" },
2242
+ idea: { family: "MaterialCommunityIcons", name: "lightbulb-on" },
2243
+ money: { family: "MaterialCommunityIcons", name: "cash" },
2244
+ shopping: { family: "MaterialCommunityIcons", name: "cart" },
2245
+ gift: { family: "MaterialCommunityIcons", name: "gift" },
2246
+ home: { family: "MaterialCommunityIcons", name: "home" },
2247
+ car: { family: "MaterialCommunityIcons", name: "car" },
2248
+ pet: { family: "MaterialCommunityIcons", name: "paw" },
2249
+ plant: { family: "MaterialCommunityIcons", name: "sprout" },
2250
+ sun: { family: "MaterialCommunityIcons", name: "white-balance-sunny" },
2251
+ moon: { family: "MaterialCommunityIcons", name: "weather-night" },
2252
+ globe: { family: "MaterialCommunityIcons", name: "earth" },
2253
+ "map-pin": { family: "MaterialCommunityIcons", name: "map-marker" },
2254
+ compass: { family: "MaterialCommunityIcons", name: "compass" },
2255
+ flag: { family: "MaterialCommunityIcons", name: "flag" },
2256
+ bookmark: { family: "MaterialCommunityIcons", name: "bookmark" },
2257
+ bell: { family: "MaterialCommunityIcons", name: "bell" },
2258
+ mail: { family: "MaterialCommunityIcons", name: "email" },
2259
+ phone: { family: "MaterialCommunityIcons", name: "phone" },
2260
+ chat: { family: "MaterialCommunityIcons", name: "chat" },
2261
+ user: { family: "MaterialCommunityIcons", name: "account" },
2262
+ users: { family: "MaterialCommunityIcons", name: "account-group" },
2263
+ settings: { family: "MaterialCommunityIcons", name: "cog" },
2264
+ tools: { family: "MaterialCommunityIcons", name: "tools" },
2265
+ puzzle: { family: "MaterialCommunityIcons", name: "puzzle" },
2266
+ chart: { family: "MaterialCommunityIcons", name: "chart-line" },
2267
+ shield: { family: "MaterialCommunityIcons", name: "shield-check" },
2268
+ lock: { family: "MaterialCommunityIcons", name: "lock" },
2269
+ cloud: { family: "MaterialCommunityIcons", name: "cloud" },
2270
+ pencil: { family: "MaterialCommunityIcons", name: "pencil" },
2271
+ check: { family: "MaterialCommunityIcons", name: "check-circle" },
2272
+ plus: { family: "MaterialCommunityIcons", name: "plus-circle" },
2273
+ question: { family: "MaterialCommunityIcons", name: "help-circle" },
2274
+ other: { family: "MaterialCommunityIcons", name: "dots-horizontal-circle" }
2275
+ };
2276
+ var WIRE_ICON_NAMES = Object.keys(WIRE_ICON_GLYPHS).sort();
2277
+ var lookupIconGlyph = (name2) => {
2278
+ if (!name2) return void 0;
2279
+ if (!Object.prototype.hasOwnProperty.call(WIRE_ICON_GLYPHS, name2)) return void 0;
2280
+ return WIRE_ICON_GLYPHS[name2];
2281
+ };
2282
+ var _WireIcon = ({ name: name2, size = 20, color, requireModule }) => {
2283
+ const hostIcon = useHostIcon(name2);
2284
+ if (hostIcon) {
2285
+ return /* @__PURE__ */ jsx(
2286
+ View,
2287
+ {
2288
+ style: styles11.decorative,
2289
+ accessible: false,
2290
+ importantForAccessibility: "no-hide-descendants",
2291
+ children: hostIcon
2292
+ }
2293
+ );
2294
+ }
2295
+ const glyph = lookupIconGlyph(name2);
2296
+ if (!glyph) return null;
2297
+ const Family = resolveIconFamily(glyph.family, requireModule);
2298
+ if (!Family) return null;
2299
+ return /* @__PURE__ */ jsx(
2300
+ View,
2301
+ {
2302
+ style: styles11.decorative,
2303
+ accessible: false,
2304
+ importantForAccessibility: "no-hide-descendants",
2305
+ children: /* @__PURE__ */ jsx(
2306
+ Family,
2307
+ {
2308
+ name: glyph.name,
2309
+ size,
2310
+ color,
2311
+ allowFontScaling: false
2312
+ }
2313
+ )
2314
+ }
2315
+ );
2316
+ };
2317
+ var WireIcon = React18.memo(_WireIcon);
2318
+ WireIcon.displayName = "WireIcon";
2319
+ var styles11 = StyleSheet.create({
2320
+ // No size/margin of its own: the glyph decides its footprint, so an absent icon and a
2321
+ // present one differ by exactly the glyph — never by a wrapper.
2322
+ decorative: {}
2323
+ });
2324
+ var ICON_FIELD_DESCRIPTION = `Optional icon for this option, making the choice scannable at a glance. Pick the ONE name whose meaning matches the option (e.g. 'instagram' for an Instagram answer, 'friend' for 'A friend told me', 'wedding' for a wedding). Omit it when no name fits \u2014 a wrong icon is worse than none. Allowed values: ${WIRE_ICON_NAMES.join(", ")}.`;
1739
2325
  var optionObjectSchema = z.object({
1740
2326
  value: z.string().describe("Option value"),
1741
- label: z.string().describe("Option display label")
2327
+ label: z.string().describe("Option display label"),
2328
+ icon: z.string().optional().describe(ICON_FIELD_DESCRIPTION)
1742
2329
  });
2330
+ var coerceOptions = (arr) => Array.isArray(arr) ? arr.map((item) => typeof item === "string" ? { value: item, label: item } : item) : arr;
2331
+ var optionsField = (description) => z.preprocess(coerceOptions, z.array(optionObjectSchema).min(1)).describe(description);
2332
+ var normalizeOptions = (options) => options.map((opt) => typeof opt === "string" ? { value: opt, label: opt } : opt);
2333
+ var easeWire5 = Easing.bezier(...WIRE_BEZIER);
1743
2334
  var schema3 = z.object({
1744
2335
  title: z.string().describe("Question or prompt for the user"),
1745
- options: z.preprocess(
1746
- (arr) => Array.isArray(arr) ? arr.map((item) => typeof item === "string" ? { value: item, label: item } : item) : arr,
1747
- z.array(optionObjectSchema).min(1)
1748
- ).describe("List of choices"),
2336
+ options: optionsField("List of choices"),
1749
2337
  submitLabel: z.string().optional().describe("Submit button label, default: Continue"),
1750
2338
  multiSelect: z.boolean().optional().describe("Allow multiple selections")
1751
2339
  });
@@ -1813,7 +2401,7 @@ var _OptionRow = ({ opt, isSelected, multiSelect, onToggle }) => {
1813
2401
  Animated.View,
1814
2402
  {
1815
2403
  style: [
1816
- styles11.option,
2404
+ styles12.option,
1817
2405
  {
1818
2406
  padding: t.spacing.md,
1819
2407
  borderRadius: t.radius.md,
@@ -1830,7 +2418,7 @@ var _OptionRow = ({ opt, isSelected, multiSelect, onToggle }) => {
1830
2418
  pointerEvents: "none",
1831
2419
  style: [
1832
2420
  StyleSheet.absoluteFill,
1833
- styles11.selectedOverlay,
2421
+ styles12.selectedOverlay,
1834
2422
  {
1835
2423
  borderRadius: t.radius.md,
1836
2424
  borderColor: t.colors.primary,
@@ -1844,7 +2432,7 @@ var _OptionRow = ({ opt, isSelected, multiSelect, onToggle }) => {
1844
2432
  View,
1845
2433
  {
1846
2434
  style: [
1847
- styles11.indicator,
2435
+ styles12.indicator,
1848
2436
  { borderRadius: t.radius.full },
1849
2437
  isSelected ? { borderColor: t.colors.primary, backgroundColor: t.colors.primary } : { borderColor: t.colors.borderStrong, backgroundColor: "transparent" }
1850
2438
  ],
@@ -1852,7 +2440,7 @@ var _OptionRow = ({ opt, isSelected, multiSelect, onToggle }) => {
1852
2440
  Animated.Text,
1853
2441
  {
1854
2442
  style: [
1855
- styles11.check,
2443
+ styles12.check,
1856
2444
  { color: t.colors.onPrimary, opacity: checkT, transform: [{ scale: checkScale }] }
1857
2445
  ],
1858
2446
  children: "\u2713"
@@ -1860,6 +2448,7 @@ var _OptionRow = ({ opt, isSelected, multiSelect, onToggle }) => {
1860
2448
  ) : null
1861
2449
  }
1862
2450
  ),
2451
+ /* @__PURE__ */ jsx(WireIcon, { name: opt.icon, size: 20, color: t.colors.text }),
1863
2452
  /* @__PURE__ */ jsx(Text, { style: [labelStyle(t.fonts), { color: t.colors.text }], children: opt.label })
1864
2453
  ]
1865
2454
  }
@@ -1867,7 +2456,7 @@ var _OptionRow = ({ opt, isSelected, multiSelect, onToggle }) => {
1867
2456
  }
1868
2457
  );
1869
2458
  };
1870
- var OptionRow = React14.memo(_OptionRow);
2459
+ var OptionRow = React18.memo(_OptionRow);
1871
2460
  var _SelectionCard = ({
1872
2461
  title,
1873
2462
  options,
@@ -1877,6 +2466,7 @@ var _SelectionCard = ({
1877
2466
  onSelectionChange
1878
2467
  }) => {
1879
2468
  const t = useOnboardingTheme();
2469
+ const opts = React18.useMemo(() => normalizeOptions(options), [options]);
1880
2470
  const [selected, setSelected] = useState([]);
1881
2471
  const [submitted, setSubmitted] = useState(false);
1882
2472
  useEffect(() => {
@@ -1911,7 +2501,7 @@ var _SelectionCard = ({
1911
2501
  disabled: selected.length === 0 || submitted
1912
2502
  }
1913
2503
  ),
1914
- children: /* @__PURE__ */ jsx(View, { style: { gap: t.spacing.sm + t.spacing.xs }, children: options.map((opt) => /* @__PURE__ */ jsx(
2504
+ children: /* @__PURE__ */ jsx(View, { style: { gap: t.spacing.sm + t.spacing.xs }, children: opts.map((opt) => /* @__PURE__ */ jsx(
1915
2505
  OptionRow,
1916
2506
  {
1917
2507
  opt,
@@ -1926,12 +2516,12 @@ var _SelectionCard = ({
1926
2516
  };
1927
2517
  var SelectionCard = {
1928
2518
  name: "SelectionCard",
1929
- description: "Use for mutually exclusive (radio) or multi-select (checkbox) choices from 2\u20138 options. Use ChipSelectCard instead when options are short single words.",
1930
- component: React14.memo(_SelectionCard),
2519
+ description: "Use for mutually exclusive (radio) or multi-select (checkbox) choices from 2\u20138 options, as a vertical list of rows. Best when options are wordy or need reading. Options may carry an optional `icon` from the vocabulary to make the list scannable. Use ChipSelectCard instead when options are short single words; use CardGridSelectCard when the options are visual and each has an obvious icon (occasions, channels, categories).",
2520
+ component: React18.memo(_SelectionCard),
1931
2521
  propsSchema: schema3,
1932
2522
  defaultProps: { submitLabel: "Continue", multiSelect: false }
1933
2523
  };
1934
- var styles11 = StyleSheet.create({
2524
+ var styles12 = StyleSheet.create({
1935
2525
  option: { borderWidth: 1.5, flexDirection: "row", alignItems: "center", overflow: "hidden" },
1936
2526
  selectedOverlay: { borderWidth: 1.5 },
1937
2527
  indicator: { width: 24, height: 24, borderWidth: 2, alignItems: "center", justifyContent: "center" },
@@ -1939,6 +2529,168 @@ var styles11 = StyleSheet.create({
1939
2529
  });
1940
2530
  var easeWire6 = Easing.bezier(...WIRE_BEZIER);
1941
2531
  var schema4 = z.object({
2532
+ title: z.string().describe("Question or prompt for the user, e.g. 'What brings you here?'"),
2533
+ options: optionsField(
2534
+ "The choices, 2-6 of them. Give EVERY option an `icon` from the vocabulary \u2014 the icon is the point of this card, and an option without one renders as a bare label next to icon-bearing neighbours. Keep labels short (1-3 words) so they fit a half-width card."
2535
+ ),
2536
+ submitLabel: z.string().optional().describe("Submit button label, default: Continue"),
2537
+ multiSelect: z.boolean().optional().describe("Allow multiple cards selected at once, default true")
2538
+ });
2539
+ var _OptionCard = ({ opt, isSelected, multiSelect, onToggle }) => {
2540
+ const t = useOnboardingTheme();
2541
+ const reduced = useReducedMotion();
2542
+ const handlePress = useCallback(() => onToggle(opt.value), [opt.value, onToggle]);
2543
+ const pressScale = useRef(new Animated.Value(1)).current;
2544
+ const pressTo = useCallback(
2545
+ (to) => {
2546
+ if (reduced) return;
2547
+ Animated.spring(pressScale, {
2548
+ toValue: to,
2549
+ friction: PRESS_SPRING.friction,
2550
+ tension: PRESS_SPRING.tension,
2551
+ useNativeDriver: true
2552
+ }).start();
2553
+ },
2554
+ [pressScale, reduced]
2555
+ );
2556
+ const handlePressIn = useCallback(() => pressTo(ROW_PRESS_SCALE), [pressTo]);
2557
+ const handlePressOut = useCallback(() => pressTo(1), [pressTo]);
2558
+ const selectT = useRef(new Animated.Value(isSelected ? 1 : 0)).current;
2559
+ useEffect(() => {
2560
+ const anim = Animated.timing(selectT, {
2561
+ toValue: isSelected ? 1 : 0,
2562
+ duration: scaledMs(stateChangeDuration(reduced, SELECT_FILL_MS)),
2563
+ easing: easeWire6,
2564
+ useNativeDriver: true
2565
+ });
2566
+ anim.start();
2567
+ return () => anim.stop();
2568
+ }, [isSelected, reduced, selectT]);
2569
+ return /* @__PURE__ */ jsx(
2570
+ Pressable,
2571
+ {
2572
+ onPress: handlePress,
2573
+ onPressIn: handlePressIn,
2574
+ onPressOut: handlePressOut,
2575
+ accessibilityRole: multiSelect ? "checkbox" : "radio",
2576
+ accessibilityState: multiSelect ? { checked: isSelected } : { selected: isSelected },
2577
+ accessibilityLabel: opt.label,
2578
+ style: styles13.cell,
2579
+ children: /* @__PURE__ */ jsxs(
2580
+ Animated.View,
2581
+ {
2582
+ style: [
2583
+ styles13.card,
2584
+ {
2585
+ padding: t.spacing.md,
2586
+ borderRadius: t.radius.lg,
2587
+ gap: t.spacing.sm,
2588
+ borderColor: t.colors.border,
2589
+ backgroundColor: t.colors.surface,
2590
+ transform: [{ scale: pressScale }]
2591
+ }
2592
+ ],
2593
+ children: [
2594
+ /* @__PURE__ */ jsx(
2595
+ Animated.View,
2596
+ {
2597
+ pointerEvents: "none",
2598
+ style: [
2599
+ StyleSheet.absoluteFill,
2600
+ styles13.selectedOverlay,
2601
+ {
2602
+ borderRadius: t.radius.lg,
2603
+ borderColor: t.colors.primary,
2604
+ backgroundColor: t.colors.primarySoft,
2605
+ opacity: selectT
2606
+ }
2607
+ ]
2608
+ }
2609
+ ),
2610
+ /* @__PURE__ */ jsx(WireIcon, { name: opt.icon, size: 24, color: t.colors.text }),
2611
+ /* @__PURE__ */ jsx(Text, { style: [labelStyle(t.fonts), { color: t.colors.text }], children: opt.label })
2612
+ ]
2613
+ }
2614
+ )
2615
+ }
2616
+ );
2617
+ };
2618
+ var OptionCard = React18.memo(_OptionCard);
2619
+ var _CardGridSelectCard = ({
2620
+ title,
2621
+ options,
2622
+ submitLabel = "Continue",
2623
+ multiSelect = true,
2624
+ onSelect,
2625
+ onSelectionChange
2626
+ }) => {
2627
+ const t = useOnboardingTheme();
2628
+ const opts = React18.useMemo(() => normalizeOptions(options), [options]);
2629
+ const [selected, setSelected] = useState([]);
2630
+ const [submitted, setSubmitted] = useState(false);
2631
+ useEffect(() => {
2632
+ if (!submitted && selected.length) onSelectionChange == null ? void 0 : onSelectionChange(multiSelect ? selected : selected[0]);
2633
+ }, [selected, submitted, multiSelect, onSelectionChange]);
2634
+ const toggle = useCallback(
2635
+ (value) => {
2636
+ if (submitted) return;
2637
+ if (multiSelect) {
2638
+ setSelected(
2639
+ (prev) => prev.includes(value) ? prev.filter((v) => v !== value) : [...prev, value]
2640
+ );
2641
+ } else {
2642
+ setSelected([value]);
2643
+ }
2644
+ },
2645
+ [submitted, multiSelect]
2646
+ );
2647
+ const handleSubmit = useCallback(() => {
2648
+ if (!selected.length || !onSelect || submitted) return;
2649
+ setSubmitted(true);
2650
+ onSelect(multiSelect ? selected : selected[0]);
2651
+ }, [selected, onSelect, submitted, multiSelect]);
2652
+ return /* @__PURE__ */ jsx(
2653
+ CardLayout,
2654
+ {
2655
+ title,
2656
+ footer: /* @__PURE__ */ jsx(
2657
+ Button,
2658
+ {
2659
+ title: submitLabel,
2660
+ onPress: handleSubmit,
2661
+ variant: "primary",
2662
+ disabled: selected.length === 0 || submitted
2663
+ }
2664
+ ),
2665
+ children: /* @__PURE__ */ jsx(View, { style: [styles13.grid, { gap: t.spacing.sm }], children: opts.map((opt) => /* @__PURE__ */ jsx(
2666
+ OptionCard,
2667
+ {
2668
+ opt,
2669
+ isSelected: selected.includes(opt.value),
2670
+ multiSelect,
2671
+ onToggle: toggle
2672
+ },
2673
+ opt.value
2674
+ )) })
2675
+ }
2676
+ );
2677
+ };
2678
+ var CardGridSelectCard = {
2679
+ name: "CardGridSelectCard",
2680
+ description: "Use for VISUAL, icon-led choices shown as a 2-column grid of tappable cards (icon on top, short label beneath). Ideal for 2\u20136 concrete options that each have an obvious icon \u2014 occasions, channels, goals, categories \u2014 e.g. 'What brings you here?' or 'Where did you hear about us?'. Multi-select by default. Every option should carry an `icon`. Use SelectionCard instead when options need descriptions or have no natural icon; use ChipSelectCard for many short word-like tags.",
2681
+ component: React18.memo(_CardGridSelectCard),
2682
+ propsSchema: schema4,
2683
+ defaultProps: { submitLabel: "Continue", multiSelect: true }
2684
+ };
2685
+ var styles13 = StyleSheet.create({
2686
+ grid: { flexDirection: "row", flexWrap: "wrap" },
2687
+ // Two per row: ~47% basis leaves room for the gap, flexGrow fills the remainder exactly.
2688
+ cell: { flexBasis: "47%", flexGrow: 1 },
2689
+ card: { borderWidth: 1.5, alignItems: "flex-start", overflow: "hidden" },
2690
+ selectedOverlay: { borderWidth: 1.5 }
2691
+ });
2692
+ var easeWire7 = Easing.bezier(...WIRE_BEZIER);
2693
+ var schema5 = z.object({
1942
2694
  status: z.enum(["success", "warning", "error", "info"]).describe("Status type"),
1943
2695
  title: z.string().describe("Status title"),
1944
2696
  message: z.string().optional().describe("Supporting message"),
@@ -1953,7 +2705,7 @@ var STATUS_ICONS = {
1953
2705
  info: "\u2139"
1954
2706
  };
1955
2707
  var _StatusCard = ({ status, title, message, ctaLabel, onContinue, onPress, onSubmit }) => {
1956
- var _a;
2708
+ var _a2;
1957
2709
  const t = useOnboardingTheme();
1958
2710
  const reduced = useReducedMotion();
1959
2711
  const [submitted, setSubmitted] = useState(false);
@@ -1988,7 +2740,7 @@ var _StatusCard = ({ status, title, message, ctaLabel, onContinue, onPress, onSu
1988
2740
  toValue: 1,
1989
2741
  duration: scaledMs(STATUS_COPY_MS),
1990
2742
  delay: scaledMs(STATUS_COPY_STAGGER_MS),
1991
- easing: easeWire6,
2743
+ easing: easeWire7,
1992
2744
  useNativeDriver: true
1993
2745
  })
1994
2746
  ];
@@ -2010,8 +2762,8 @@ var _StatusCard = ({ status, title, message, ctaLabel, onContinue, onPress, onSu
2010
2762
  {
2011
2763
  align: "center",
2012
2764
  footer: ctaLabel ? /* @__PURE__ */ jsx(Button, { title: ctaLabel, onPress: handleContinue, variant: "primary", disabled: submitted }) : void 0,
2013
- children: /* @__PURE__ */ jsxs(View, { style: [styles12.center, { gap: t.spacing.sm }], children: [
2014
- /* @__PURE__ */ jsxs(View, { style: [styles12.titleRow, { gap: t.spacing.sm }], children: [
2765
+ children: /* @__PURE__ */ jsxs(View, { style: [styles14.center, { gap: t.spacing.sm }], children: [
2766
+ /* @__PURE__ */ jsxs(View, { style: [styles14.titleRow, { gap: t.spacing.sm }], children: [
2015
2767
  /* @__PURE__ */ jsx(
2016
2768
  Animated.Text,
2017
2769
  {
@@ -2019,7 +2771,7 @@ var _StatusCard = ({ status, title, message, ctaLabel, onContinue, onPress, onSu
2019
2771
  headingStyle(t.fonts),
2020
2772
  { color, opacity: popT, transform: [{ scale: popScale }] }
2021
2773
  ],
2022
- children: (_a = STATUS_ICONS[status]) != null ? _a : "\xB7"
2774
+ children: (_a2 = STATUS_ICONS[status]) != null ? _a2 : "\xB7"
2023
2775
  }
2024
2776
  ),
2025
2777
  /* @__PURE__ */ jsx(
@@ -2055,14 +2807,14 @@ var _StatusCard = ({ status, title, message, ctaLabel, onContinue, onPress, onSu
2055
2807
  var StatusCard = {
2056
2808
  name: "StatusCard",
2057
2809
  description: "Use ONLY for real outcomes: booking confirmed, data saved, action completed. NEVER for 'you just viewed X' acknowledgments. Always include ctaLabel so the user can continue after seeing the status.",
2058
- component: React14.memo(_StatusCard),
2059
- propsSchema: schema4
2810
+ component: React18.memo(_StatusCard),
2811
+ propsSchema: schema5
2060
2812
  };
2061
- var styles12 = StyleSheet.create({
2813
+ var styles14 = StyleSheet.create({
2062
2814
  center: { width: "100%", alignItems: "center", justifyContent: "center" },
2063
2815
  titleRow: { flexDirection: "row", alignItems: "center", justifyContent: "center" }
2064
2816
  });
2065
- var schema5 = z.object({
2817
+ var schema6 = z.object({
2066
2818
  label: z.string().describe("What is being counted, e.g. 'Number of days' or 'Travellers'"),
2067
2819
  min: z.number().optional().describe("Minimum value, default 1"),
2068
2820
  max: z.number().optional().describe("Maximum value, default 30"),
@@ -2083,7 +2835,7 @@ var _NumberStepperCard = ({
2083
2835
  onSubmit
2084
2836
  }) => {
2085
2837
  const t = useOnboardingTheme();
2086
- const styles16 = useMemo(() => makeStyles4(t), [t]);
2838
+ const styles18 = useMemo(() => makeStyles4(t), [t]);
2087
2839
  const safeMin = safeNum(min, 1);
2088
2840
  const safeMaxRaw = safeNum(max, 30);
2089
2841
  const safeMax = safeMaxRaw < safeMin ? safeMin : safeMaxRaw;
@@ -2107,7 +2859,7 @@ var _NumberStepperCard = ({
2107
2859
  const atMin = value <= safeMin;
2108
2860
  const atMax = value >= safeMax;
2109
2861
  const stepBtnStyle = (disabled) => [
2110
- styles16.stepBtn,
2862
+ styles18.stepBtn,
2111
2863
  { borderRadius: t.radius.full, backgroundColor: t.colors.background, borderColor: disabled ? t.colors.border : t.colors.primary }
2112
2864
  ];
2113
2865
  return /* @__PURE__ */ jsx(
@@ -2116,10 +2868,10 @@ var _NumberStepperCard = ({
2116
2868
  title: label,
2117
2869
  align: "center",
2118
2870
  footer: /* @__PURE__ */ jsx(Button, { title: submitLabel, onPress: handleSubmit, variant: "primary", disabled: submitted }),
2119
- children: /* @__PURE__ */ jsxs(View, { style: styles16.wrap, children: [
2120
- /* @__PURE__ */ jsxs(View, { style: [styles16.stepper, { gap: t.spacing.lg }], children: [
2871
+ children: /* @__PURE__ */ jsxs(View, { style: styles18.wrap, children: [
2872
+ /* @__PURE__ */ jsxs(View, { style: [styles18.stepper, { gap: t.spacing.lg }], children: [
2121
2873
  /* @__PURE__ */ jsx(Pressable, { onPress: atMin || submitted ? void 0 : handleDecrement, disabled: atMin || submitted, style: stepBtnStyle(atMin), children: /* @__PURE__ */ jsx(Text, { style: [headingStyle(t.fonts), { color: atMin ? t.colors.textMuted : t.colors.primary }], children: "\u2212" }) }),
2122
- /* @__PURE__ */ jsxs(View, { style: styles16.valueBox, children: [
2874
+ /* @__PURE__ */ jsxs(View, { style: styles18.valueBox, children: [
2123
2875
  /* @__PURE__ */ jsx(Text, { style: [headingStyle(t.fonts), { color: t.colors.primary }], children: String(value) }),
2124
2876
  unit ? /* @__PURE__ */ jsx(Text, { style: [captionStyle(t.fonts), { color: t.colors.textMuted }], children: unit }) : null
2125
2877
  ] }),
@@ -2133,8 +2885,8 @@ var _NumberStepperCard = ({
2133
2885
  var NumberStepperCard = {
2134
2886
  name: "NumberStepperCard",
2135
2887
  description: "Use for any bounded numeric input: days, people, portions, budget tiers, ratings. Best for ranges 1\u201399. Set unit (e.g. 'days', 'people') for clarity.",
2136
- component: React14.memo(_NumberStepperCard),
2137
- propsSchema: schema5,
2888
+ component: React18.memo(_NumberStepperCard),
2889
+ propsSchema: schema6,
2138
2890
  defaultProps: { min: 1, max: 30, defaultValue: 1, step: 1, submitLabel: "Confirm" }
2139
2891
  };
2140
2892
  function makeStyles4(t) {
@@ -2145,9 +2897,9 @@ function makeStyles4(t) {
2145
2897
  valueBox: { alignItems: "center", minWidth: 80 }
2146
2898
  });
2147
2899
  }
2148
- var easeWire7 = Easing.bezier(...WIRE_BEZIER);
2900
+ var easeWire8 = Easing.bezier(...WIRE_BEZIER);
2149
2901
  var RISE_PX = 10;
2150
- var schema6 = z.object({
2902
+ var schema7 = z.object({
2151
2903
  title: z.string().describe("Short, warm headline for the value/momentum moment"),
2152
2904
  body: z.string().optional().describe("One or two supporting lines that reflect the user's answers back and build momentum"),
2153
2905
  items: z.array(z.string()).max(4).optional().describe(
@@ -2184,7 +2936,7 @@ var _WorkItem = ({
2184
2936
  toValue: 1,
2185
2937
  duration: scaledMs(INTERSTITIAL_ITEM_MS),
2186
2938
  delay: scaledMs(interstitialItemDelay(index)),
2187
- easing: easeWire7,
2939
+ easing: easeWire8,
2188
2940
  useNativeDriver: true
2189
2941
  }),
2190
2942
  Animated.spring(checkT, {
@@ -2206,20 +2958,20 @@ var _WorkItem = ({
2206
2958
  return /* @__PURE__ */ jsxs(
2207
2959
  Animated.View,
2208
2960
  {
2209
- style: [styles13.itemRow, { gap: t.spacing.sm + t.spacing.xs, opacity: rowT, transform: [{ translateY: rise }] }],
2961
+ style: [styles15.itemRow, { gap: t.spacing.sm + t.spacing.xs, opacity: rowT, transform: [{ translateY: rise }] }],
2210
2962
  children: [
2211
2963
  /* @__PURE__ */ jsx(
2212
2964
  View,
2213
2965
  {
2214
2966
  style: [
2215
- styles13.itemBadge,
2967
+ styles15.itemBadge,
2216
2968
  { backgroundColor: t.colors.primarySoft, borderRadius: t.radius.full }
2217
2969
  ],
2218
2970
  children: /* @__PURE__ */ jsx(
2219
2971
  Animated.Text,
2220
2972
  {
2221
2973
  style: [
2222
- styles13.itemCheck,
2974
+ styles15.itemCheck,
2223
2975
  { color: t.colors.primary, opacity: checkT, transform: [{ scale: checkScale }] }
2224
2976
  ],
2225
2977
  children: "\u2713"
@@ -2227,12 +2979,12 @@ var _WorkItem = ({
2227
2979
  )
2228
2980
  }
2229
2981
  ),
2230
- /* @__PURE__ */ jsx(Text, { style: [bodyStyle(t.fonts), styles13.itemText, { color: t.colors.text }], children: text })
2982
+ /* @__PURE__ */ jsx(Text, { style: [bodyStyle(t.fonts), styles15.itemText, { color: t.colors.text }], children: text })
2231
2983
  ]
2232
2984
  }
2233
2985
  );
2234
2986
  };
2235
- var WorkItem = React14.memo(_WorkItem);
2987
+ var WorkItem = React18.memo(_WorkItem);
2236
2988
  var _InterstitialCard = ({
2237
2989
  title,
2238
2990
  body,
@@ -2269,7 +3021,7 @@ var _InterstitialCard = ({
2269
3021
  toValue: 1,
2270
3022
  duration: scaledMs(INTERSTITIAL_HEAD_MS),
2271
3023
  delay,
2272
- easing: easeWire7,
3024
+ easing: easeWire8,
2273
3025
  useNativeDriver: true
2274
3026
  });
2275
3027
  const anims = [
@@ -2305,18 +3057,18 @@ var _InterstitialCard = ({
2305
3057
  disabled: submitted || !canAdvance
2306
3058
  }
2307
3059
  ),
2308
- children: /* @__PURE__ */ jsxs(View, { style: [styles13.center, { gap: t.spacing.md }], children: [
2309
- /* @__PURE__ */ jsx(Animated.View, { style: [styles13.fullWidth, riseStyle(artT)], children: showImage ? /* @__PURE__ */ jsx(
3060
+ children: /* @__PURE__ */ jsxs(View, { style: [styles15.center, { gap: t.spacing.md }], children: [
3061
+ /* @__PURE__ */ jsx(Animated.View, { style: [styles15.fullWidth, riseStyle(artT)], children: showImage ? /* @__PURE__ */ jsx(
2310
3062
  Image,
2311
3063
  {
2312
3064
  source: { uri: imageUrl },
2313
- style: styles13.image,
3065
+ style: styles15.image,
2314
3066
  resizeMode: "contain",
2315
3067
  onError: () => setImgFailed(true)
2316
3068
  }
2317
- ) : art ? /* @__PURE__ */ jsx(View, { style: styles13.art, children: art }) : null }),
3069
+ ) : art ? /* @__PURE__ */ jsx(View, { style: styles15.art, children: art }) : null }),
2318
3070
  /* @__PURE__ */ jsx(Animated.View, { style: riseStyle(titleT), children: /* @__PURE__ */ jsx(Text, { style: [headingStyle(t.fonts), { color: t.colors.text, textAlign: "center" }], children: title }) }),
2319
- (items == null ? void 0 : items.length) ? /* @__PURE__ */ jsx(View, { style: [styles13.items, { gap: t.spacing.md, marginTop: t.spacing.sm }], children: items.map((item, i) => /* @__PURE__ */ jsx(WorkItem, { text: item, index: i, reduced }, `${item}-${i}`)) }) : body ? /* @__PURE__ */ jsx(Animated.View, { style: riseStyle(bodyT), children: /* @__PURE__ */ jsx(Text, { style: [bodyStyle(t.fonts), { color: t.colors.textMuted, textAlign: "center" }], children: body }) }) : null
3071
+ (items == null ? void 0 : items.length) ? /* @__PURE__ */ jsx(View, { style: [styles15.items, { gap: t.spacing.md, marginTop: t.spacing.sm }], children: items.map((item, i) => /* @__PURE__ */ jsx(WorkItem, { text: item, index: i, reduced }, `${item}-${i}`)) }) : body ? /* @__PURE__ */ jsx(Animated.View, { style: riseStyle(bodyT), children: /* @__PURE__ */ jsx(Text, { style: [bodyStyle(t.fonts), { color: t.colors.textMuted, textAlign: "center" }], children: body }) }) : null
2320
3072
  ] })
2321
3073
  }
2322
3074
  );
@@ -2324,11 +3076,11 @@ var _InterstitialCard = ({
2324
3076
  var InterstitialCard = {
2325
3077
  name: "InterstitialCard",
2326
3078
  description: "Use ONCE mid-flow (never first, never last) as a momentum/value screen between questions \u2014 an illustration + a warm line that reflects answers back, like Duolingo/Cal-AI. NOT a question; the user just taps Continue. Set `illustration` to an app-registered artwork name. Prefer `items` (2-3 short ticked lines, each reflecting a real answer) when you have the signal. Skip it if you don't have enough signal to make the line specific.",
2327
- component: React14.memo(_InterstitialCard),
2328
- propsSchema: schema6,
3079
+ component: React18.memo(_InterstitialCard),
3080
+ propsSchema: schema7,
2329
3081
  defaultProps: { ctaLabel: "Continue", illustrationFallback: "momentum" }
2330
3082
  };
2331
- var styles13 = StyleSheet.create({
3083
+ var styles15 = StyleSheet.create({
2332
3084
  center: { width: "100%", alignItems: "center", justifyContent: "center" },
2333
3085
  fullWidth: { width: "100%", alignItems: "center" },
2334
3086
  art: { alignItems: "center", justifyContent: "center" },
@@ -2345,6 +3097,7 @@ var onboardingComponents = [
2345
3097
  ChipSelectCard,
2346
3098
  TextInputCard,
2347
3099
  SelectionCard,
3100
+ CardGridSelectCard,
2348
3101
  StatusCard,
2349
3102
  NumberStepperCard,
2350
3103
  InterstitialCard
@@ -2356,15 +3109,22 @@ var coerceVersion = (value) => {
2356
3109
  const trimmed = value.trim();
2357
3110
  return trimmed.length > 0 ? trimmed : void 0;
2358
3111
  };
2359
- var runtimeRequire = (moduleName) => {
3112
+ var runtimeRequire2 = (moduleName) => {
3113
+ if (typeof __require !== "function") return void 0;
2360
3114
  try {
2361
- if (typeof __require !== "function") return void 0;
2362
- return __require(moduleName);
3115
+ switch (moduleName) {
3116
+ case "expo-constants":
3117
+ return init_Constants(), __toCommonJS(Constants_exports);
3118
+ case "expo-application":
3119
+ return __require("expo-application");
3120
+ default:
3121
+ return void 0;
3122
+ }
2363
3123
  } catch {
2364
3124
  return void 0;
2365
3125
  }
2366
3126
  };
2367
- var interop = (mod) => {
3127
+ var interop2 = (mod) => {
2368
3128
  if (!mod || typeof mod !== "object") return void 0;
2369
3129
  const def = mod.default;
2370
3130
  if (def && typeof def === "object") return def;
@@ -2372,21 +3132,21 @@ var interop = (mod) => {
2372
3132
  };
2373
3133
  var safeInterop = (requireModule, moduleName) => {
2374
3134
  try {
2375
- return interop(requireModule(moduleName));
3135
+ return interop2(requireModule(moduleName));
2376
3136
  } catch {
2377
3137
  return void 0;
2378
3138
  }
2379
3139
  };
2380
- var detectAppVersion = (requireModule = runtimeRequire) => {
3140
+ var detectAppVersion = (requireModule = runtimeRequire2) => {
2381
3141
  try {
2382
- const constants = safeInterop(requireModule, "expo-constants");
2383
- if (constants) {
2384
- const expoConfig = constants.expoConfig;
3142
+ const constants2 = safeInterop(requireModule, "expo-constants");
3143
+ if (constants2) {
3144
+ const expoConfig = constants2.expoConfig;
2385
3145
  if (expoConfig && typeof expoConfig === "object") {
2386
3146
  const fromExpoConfig = coerceVersion(expoConfig.version);
2387
3147
  if (fromExpoConfig) return fromExpoConfig;
2388
3148
  }
2389
- const fromNative = coerceVersion(constants.nativeAppVersion);
3149
+ const fromNative = coerceVersion(constants2.nativeAppVersion);
2390
3150
  if (fromNative) return fromNative;
2391
3151
  }
2392
3152
  const application = safeInterop(requireModule, "expo-application");
@@ -2405,15 +3165,16 @@ var coerceModel = (value) => {
2405
3165
  const trimmed = value.trim();
2406
3166
  return trimmed.length > 0 ? trimmed : void 0;
2407
3167
  };
2408
- var runtimeRequire2 = (moduleName) => {
3168
+ var runtimeRequire3 = (moduleName) => {
3169
+ if (moduleName !== "expo-device") return void 0;
3170
+ if (typeof __require !== "function") return void 0;
2409
3171
  try {
2410
- if (typeof __require !== "function") return void 0;
2411
- return __require(moduleName);
3172
+ return __require("expo-device");
2412
3173
  } catch {
2413
3174
  return void 0;
2414
3175
  }
2415
3176
  };
2416
- var interop2 = (mod) => {
3177
+ var interop3 = (mod) => {
2417
3178
  if (!mod || typeof mod !== "object") return void 0;
2418
3179
  const def = mod.default;
2419
3180
  if (def && typeof def === "object") return def;
@@ -2421,12 +3182,12 @@ var interop2 = (mod) => {
2421
3182
  };
2422
3183
  var safeInterop2 = (requireModule, moduleName) => {
2423
3184
  try {
2424
- return interop2(requireModule(moduleName));
3185
+ return interop3(requireModule(moduleName));
2425
3186
  } catch {
2426
3187
  return void 0;
2427
3188
  }
2428
3189
  };
2429
- var detectNativeModel = (requireModule = runtimeRequire2) => {
3190
+ var detectNativeModel = (requireModule = runtimeRequire3) => {
2430
3191
  try {
2431
3192
  const device = safeInterop2(requireModule, "expo-device");
2432
3193
  if (device) {
@@ -2450,7 +3211,7 @@ var deriveFormFactor = (iosIdiom, width, height) => {
2450
3211
  return void 0;
2451
3212
  };
2452
3213
  var collectDeviceContext = () => {
2453
- var _a;
3214
+ var _a2;
2454
3215
  const ctx = { platform: Platform.OS };
2455
3216
  try {
2456
3217
  const version = Platform.Version;
@@ -2459,26 +3220,26 @@ var collectDeviceContext = () => {
2459
3220
  }
2460
3221
  } catch {
2461
3222
  }
2462
- let constants = {};
3223
+ let constants2 = {};
2463
3224
  try {
2464
- constants = (_a = Platform.constants) != null ? _a : {};
3225
+ constants2 = (_a2 = Platform.constants) != null ? _a2 : {};
2465
3226
  } catch {
2466
- constants = {};
3227
+ constants2 = {};
2467
3228
  }
2468
3229
  let iosIdiom;
2469
3230
  try {
2470
3231
  if (Platform.OS === "android") {
2471
- const brand = constants.Brand;
2472
- const model = constants.Model;
2473
- const release = constants.Release;
3232
+ const brand = constants2.Brand;
3233
+ const model = constants2.Model;
3234
+ const release = constants2.Release;
2474
3235
  if (typeof brand === "string" && brand) ctx.brand = brand;
2475
3236
  if (typeof model === "string" && model) ctx.model = model;
2476
3237
  if (release !== void 0 && release !== null && String(release)) {
2477
3238
  ctx.osVersion = String(release);
2478
3239
  }
2479
3240
  } else if (Platform.OS === "ios") {
2480
- const osVersion = constants.osVersion;
2481
- const idiom = constants.interfaceIdiom;
3241
+ const osVersion = constants2.osVersion;
3242
+ const idiom = constants2.interfaceIdiom;
2482
3243
  if (osVersion !== void 0 && osVersion !== null && String(osVersion)) {
2483
3244
  ctx.osVersion = String(osVersion);
2484
3245
  }
@@ -2594,9 +3355,9 @@ var sanitizeUserId = (raw) => {
2594
3355
  return trimmed.length > USER_ID_MAX_LENGTH ? trimmed.slice(0, USER_ID_MAX_LENGTH) : trimmed;
2595
3356
  };
2596
3357
  var identifyOnboarding = async (opts) => {
2597
- var _a, _b, _c;
3358
+ var _a2, _b, _c;
2598
3359
  const userId = sanitizeUserId(opts.userId);
2599
- if (!userId || !((_a = opts.config) == null ? void 0 : _a.serverUrl)) return false;
3360
+ if (!userId || !((_a2 = opts.config) == null ? void 0 : _a2.serverUrl)) return false;
2600
3361
  let contextId = ((_b = opts.contextId) == null ? void 0 : _b.trim()) || void 0;
2601
3362
  if (!contextId && opts.storage) {
2602
3363
  const key = (_c = opts.persistKey) != null ? _c : opts.appId ? sessionStorageKey(opts.appId) : void 0;
@@ -2618,6 +3379,7 @@ var WireOnboarding = ({
2618
3379
  theme,
2619
3380
  components,
2620
3381
  illustrations,
3382
+ icons,
2621
3383
  validators,
2622
3384
  onComplete,
2623
3385
  onSkip,
@@ -2635,7 +3397,7 @@ var WireOnboarding = ({
2635
3397
  userContext,
2636
3398
  userId
2637
3399
  }) => {
2638
- var _a, _b, _c;
3400
+ var _a2, _b, _c;
2639
3401
  const boundUserId = useMemo(() => sanitizeUserId(userId), [userId]);
2640
3402
  const device = useMemo(() => {
2641
3403
  const collected = collectDeviceContext();
@@ -2671,7 +3433,7 @@ var WireOnboarding = ({
2671
3433
  },
2672
3434
  [storage, storageKey, onComplete]
2673
3435
  );
2674
- const sessionId = (_a = session == null ? void 0 : session.id) != null ? _a : "";
3436
+ const sessionId = (_a2 = session == null ? void 0 : session.id) != null ? _a2 : "";
2675
3437
  const startupUserIdRef = useRef(boundUserId);
2676
3438
  const metadataKey = config.metadata ? JSON.stringify(config.metadata) : "";
2677
3439
  const metadataStable = useMemo(() => metadataKey ? JSON.parse(metadataKey) : void 0, [metadataKey]);
@@ -2735,7 +3497,7 @@ var WireOnboarding = ({
2735
3497
  }
2736
3498
  ) });
2737
3499
  }
2738
- return /* @__PURE__ */ jsx(OnboardingThemeProvider, { theme, children: /* @__PURE__ */ jsx(IllustrationProvider, { registry: { ...defaultIllustrations, ...illustrations }, children: /* @__PURE__ */ jsx(WireAIProvider, { llm, components: cards, children: /* @__PURE__ */ jsx(
3500
+ return /* @__PURE__ */ jsx(OnboardingThemeProvider, { theme, children: /* @__PURE__ */ jsx(IllustrationProvider, { registry: { ...defaultIllustrations, ...illustrations }, children: /* @__PURE__ */ jsx(IconRegistryProvider, { registry: icons, children: /* @__PURE__ */ jsx(WireAIProvider, { llm, components: cards, children: /* @__PURE__ */ jsx(
2739
3501
  OnboardingFlow,
2740
3502
  {
2741
3503
  validators,
@@ -2754,7 +3516,7 @@ var WireOnboarding = ({
2754
3516
  resumed: session.resumed,
2755
3517
  clientContext
2756
3518
  }
2757
- ) }) }) });
3519
+ ) }) }) }) });
2758
3520
  };
2759
3521
  function DemoOnboarding({
2760
3522
  config,
@@ -2769,7 +3531,7 @@ function DemoOnboarding({
2769
3531
  const [open, setOpen] = useState(false);
2770
3532
  const [runId, setRunId] = useState(0);
2771
3533
  const t = useMemo(() => mergeTheme(theme != null ? theme : {}), [theme]);
2772
- const styles16 = useMemo(() => makeStyles5(t), [t]);
3534
+ const styles18 = useMemo(() => makeStyles5(t), [t]);
2773
3535
  const openDemo = useCallback(() => {
2774
3536
  setRunId((n) => n + 1);
2775
3537
  setOpen(true);
@@ -2783,7 +3545,7 @@ function DemoOnboarding({
2783
3545
  [onComplete]
2784
3546
  );
2785
3547
  return /* @__PURE__ */ jsxs(Fragment, { children: [
2786
- renderTrigger ? renderTrigger(openDemo) : /* @__PURE__ */ jsx(Pressable, { onPress: openDemo, style: styles16.trigger, accessibilityRole: "button", children: /* @__PURE__ */ jsx(Text, { style: styles16.triggerText, children: label }) }),
3548
+ renderTrigger ? renderTrigger(openDemo) : /* @__PURE__ */ jsx(Pressable, { onPress: openDemo, style: styles18.trigger, accessibilityRole: "button", children: /* @__PURE__ */ jsx(Text, { style: styles18.triggerText, children: label }) }),
2787
3549
  /* @__PURE__ */ jsx(
2788
3550
  Modal,
2789
3551
  {
@@ -2791,7 +3553,7 @@ function DemoOnboarding({
2791
3553
  animationType: "slide",
2792
3554
  presentationStyle: "fullScreen",
2793
3555
  onRequestClose: close,
2794
- children: /* @__PURE__ */ jsx(View, { style: styles16.modal, children: config ? /* @__PURE__ */ jsx(
3556
+ children: /* @__PURE__ */ jsx(View, { style: styles18.modal, children: config ? /* @__PURE__ */ jsx(
2795
3557
  WireOnboarding,
2796
3558
  {
2797
3559
  config,
@@ -2804,10 +3566,10 @@ function DemoOnboarding({
2804
3566
  onError: close
2805
3567
  },
2806
3568
  runId
2807
- ) : /* @__PURE__ */ jsxs(View, { style: styles16.notice, children: [
2808
- /* @__PURE__ */ jsx(Text, { style: styles16.noticeTitle, children: "Wire AI not configured" }),
2809
- /* @__PURE__ */ jsx(Text, { style: styles16.noticeBody, children: "Set the Wire AI key + server URL (e.g. via wireConfigFromEnv) to demo the AI onboarding here." }),
2810
- /* @__PURE__ */ jsx(Pressable, { onPress: close, style: styles16.trigger, accessibilityRole: "button", children: /* @__PURE__ */ jsx(Text, { style: styles16.triggerText, children: "Close" }) })
3569
+ ) : /* @__PURE__ */ jsxs(View, { style: styles18.notice, children: [
3570
+ /* @__PURE__ */ jsx(Text, { style: styles18.noticeTitle, children: "Wire AI not configured" }),
3571
+ /* @__PURE__ */ jsx(Text, { style: styles18.noticeBody, children: "Set the Wire AI key + server URL (e.g. via wireConfigFromEnv) to demo the AI onboarding here." }),
3572
+ /* @__PURE__ */ jsx(Pressable, { onPress: close, style: styles18.trigger, accessibilityRole: "button", children: /* @__PURE__ */ jsx(Text, { style: styles18.triggerText, children: "Close" }) })
2811
3573
  ] }) })
2812
3574
  }
2813
3575
  )
@@ -2886,13 +3648,13 @@ var _DoneBlock = ({
2886
3648
  message = "Personalizing your experience\u2026"
2887
3649
  }) => {
2888
3650
  const t = useOnboardingTheme();
2889
- return /* @__PURE__ */ jsxs(View, { style: [styles14.center, { gap: t.spacing.sm, padding: t.spacing.lg }], children: [
3651
+ return /* @__PURE__ */ jsxs(View, { style: [styles16.center, { gap: t.spacing.sm, padding: t.spacing.lg }], children: [
2890
3652
  /* @__PURE__ */ jsx(Text, { style: [headingStyle(t.fonts), { color: t.colors.success, textAlign: "center" }], children: title }),
2891
3653
  /* @__PURE__ */ jsx(Text, { style: [bodyStyle(t.fonts), { color: t.colors.textMuted, textAlign: "center" }], children: message })
2892
3654
  ] });
2893
3655
  };
2894
- var DoneBlock = React14.memo(_DoneBlock);
2895
- var styles14 = StyleSheet.create({
3656
+ var DoneBlock = React18.memo(_DoneBlock);
3657
+ var styles16 = StyleSheet.create({
2896
3658
  center: { flex: 1, alignItems: "center", justifyContent: "center" }
2897
3659
  });
2898
3660
 
@@ -2971,25 +3733,25 @@ var _CenteredModal = forwardRef(
2971
3733
  /* @__PURE__ */ jsx(
2972
3734
  Animated.View,
2973
3735
  {
2974
- style: [styles15.backdrop, { opacity: backdropOpacity }],
3736
+ style: [styles17.backdrop, { opacity: backdropOpacity }],
2975
3737
  pointerEvents: "none"
2976
3738
  }
2977
3739
  ),
2978
3740
  /* @__PURE__ */ jsx(
2979
3741
  Pressable,
2980
3742
  {
2981
- style: styles15.fill,
3743
+ style: styles17.fill,
2982
3744
  onPress: onBackdrop,
2983
3745
  accessibilityRole: "button",
2984
3746
  accessibilityLabel: "Dismiss",
2985
- children: /* @__PURE__ */ jsx(SafeAreaView, { style: styles15.center, pointerEvents: "box-none", children: /* @__PURE__ */ jsx(Pressable, { onPress: () => {
2986
- }, style: styles15.cardWrap, children: /* @__PURE__ */ jsx(
3747
+ children: /* @__PURE__ */ jsx(SafeAreaView, { style: styles17.center, pointerEvents: "box-none", children: /* @__PURE__ */ jsx(Pressable, { onPress: () => {
3748
+ }, style: styles17.cardWrap, children: /* @__PURE__ */ jsx(
2987
3749
  Animated.View,
2988
3750
  {
2989
3751
  accessibilityViewIsModal: true,
2990
3752
  accessibilityRole: "alert",
2991
3753
  style: [
2992
- styles15.card,
3754
+ styles17.card,
2993
3755
  {
2994
3756
  backgroundColor: theme.colors.surface,
2995
3757
  borderRadius: theme.radius.lg,
@@ -3010,8 +3772,8 @@ var _CenteredModal = forwardRef(
3010
3772
  }
3011
3773
  );
3012
3774
  _CenteredModal.displayName = "CenteredModal";
3013
- var CenteredModal = React14.memo(_CenteredModal);
3014
- var styles15 = StyleSheet.create({
3775
+ var CenteredModal = React18.memo(_CenteredModal);
3776
+ var styles17 = StyleSheet.create({
3015
3777
  fill: { flex: 1 },
3016
3778
  backdrop: { position: "absolute", top: 0, left: 0, right: 0, bottom: 0, backgroundColor: "#000" },
3017
3779
  center: { flex: 1, alignItems: "center", justifyContent: "center", padding: 24 },
@@ -3044,10 +3806,10 @@ var readEnabled = (raw) => {
3044
3806
  return { enabled: true };
3045
3807
  };
3046
3808
  var parseWireFeatures = (raw) => {
3047
- var _a;
3809
+ var _a2;
3048
3810
  if (!raw || typeof raw !== "object" || Array.isArray(raw)) return defaultWireFeatures;
3049
3811
  const src = raw;
3050
- const modeRaw = (_a = src.onboarding) == null ? void 0 : _a.mode;
3812
+ const modeRaw = (_a2 = src.onboarding) == null ? void 0 : _a2.mode;
3051
3813
  const mode = typeof modeRaw === "string" && VALID_MODES.includes(modeRaw) ? modeRaw : "ai";
3052
3814
  return {
3053
3815
  coachmarks: readEnabled(src.coachmarks),
@@ -3104,10 +3866,10 @@ var writeCachedFeatures = (storage, key, features) => {
3104
3866
  // src/features/fetchWireFeatures.ts
3105
3867
  var DEFAULT_TIMEOUT_MS = 4e3;
3106
3868
  var failOpen = async (storage, key) => {
3107
- var _a;
3869
+ var _a2;
3108
3870
  if (!storage) return defaultWireFeatures;
3109
- const cached = await readCachedFeatures(storage, key);
3110
- return (_a = cached == null ? void 0 : cached.features) != null ? _a : defaultWireFeatures;
3871
+ const cached2 = await readCachedFeatures(storage, key);
3872
+ return (_a2 = cached2 == null ? void 0 : cached2.features) != null ? _a2 : defaultWireFeatures;
3111
3873
  };
3112
3874
  var fetchWithTimeout = async (url, apiKey, timeoutMs) => {
3113
3875
  const controller = typeof AbortController !== "undefined" ? new AbortController() : void 0;
@@ -3184,17 +3946,17 @@ var WireFeaturesProvider = ({
3184
3946
  WireFeaturesProvider.displayName = "WireFeaturesProvider";
3185
3947
  var useWireFeaturesContext = () => useContext(WireFeaturesContext);
3186
3948
  var useResolvedFeatures = (options) => {
3187
- var _a, _b, _c;
3949
+ var _a2, _b, _c;
3188
3950
  const ctx = useWireFeaturesContext();
3189
3951
  const shouldFetch = !(options == null ? void 0 : options.flags) && ctx == null;
3190
3952
  const fetched = useWireFeatures(shouldFetch ? options == null ? void 0 : options.config : void 0);
3191
- return (_c = (_b = (_a = options == null ? void 0 : options.flags) != null ? _a : ctx) != null ? _b : fetched) != null ? _c : defaultWireFeatures;
3953
+ return (_c = (_b = (_a2 = options == null ? void 0 : options.flags) != null ? _a2 : ctx) != null ? _b : fetched) != null ? _c : defaultWireFeatures;
3192
3954
  };
3193
3955
 
3194
3956
  // src/config/wireConfigFromEnv.ts
3195
3957
  var wireConfigFromEnv = (overrides) => {
3196
- var _a, _b, _c, _d;
3197
- const apiKey = (_a = overrides == null ? void 0 : overrides.apiKey) != null ? _a : process.env.EXPO_PUBLIC_WIREAI_API_KEY;
3958
+ var _a2, _b, _c, _d;
3959
+ const apiKey = (_a2 = overrides == null ? void 0 : overrides.apiKey) != null ? _a2 : process.env.EXPO_PUBLIC_WIREAI_API_KEY;
3198
3960
  const serverUrl = (_b = overrides == null ? void 0 : overrides.serverUrl) != null ? _b : process.env.EXPO_PUBLIC_WIREAI_SERVER_URL;
3199
3961
  const appId = (_d = (_c = overrides == null ? void 0 : overrides.appId) != null ? _c : process.env.EXPO_PUBLIC_WIREAI_APP_ID) != null ? _d : "default";
3200
3962
  if (!apiKey || !serverUrl) return null;
@@ -3208,10 +3970,10 @@ var wireConfigFromEnv = (overrides) => {
3208
3970
 
3209
3971
  // src/config/onboardingFlag.ts
3210
3972
  var isOnboardingEnabled = (opts) => {
3211
- var _a;
3973
+ var _a2;
3212
3974
  const transportPresent = wireConfigFromEnv(opts == null ? void 0 : opts.config) !== null;
3213
3975
  if (!transportPresent) return false;
3214
- return (_a = opts == null ? void 0 : opts.remote) != null ? _a : true;
3976
+ return (_a2 = opts == null ? void 0 : opts.remote) != null ? _a2 : true;
3215
3977
  };
3216
3978
 
3217
3979
  // src/analytics/analyticsEvent.ts
@@ -3307,7 +4069,7 @@ var namespaceExtra = (extra) => {
3307
4069
  return out;
3308
4070
  };
3309
4071
  var resolveUserContext = (ctx = {}, opts = {}) => {
3310
- var _a;
4072
+ var _a2;
3311
4073
  const result = {};
3312
4074
  const bucket = {};
3313
4075
  const userId = sanitizeUserId(ctx.userId);
@@ -3317,7 +4079,7 @@ var resolveUserContext = (ctx = {}, opts = {}) => {
3317
4079
  result.deviceKey = deviceKey;
3318
4080
  bucket.device_key = deviceKey;
3319
4081
  }
3320
- const appVersion = (_a = cleanString(ctx.appVersion)) != null ? _a : cleanString(opts.autoAppVersion);
4082
+ const appVersion = (_a2 = cleanString(ctx.appVersion)) != null ? _a2 : cleanString(opts.autoAppVersion);
3321
4083
  if (appVersion) {
3322
4084
  result.appVersion = appVersion;
3323
4085
  bucket.app_version = appVersion;
@@ -3353,10 +4115,10 @@ var resetSessionStartGuard = () => {
3353
4115
  _emitted.clear();
3354
4116
  };
3355
4117
  var reportSessionStart = (opts) => {
3356
- var _a;
4118
+ var _a2;
3357
4119
  const target = opts.target;
3358
4120
  if (!opts.sink && !(target == null ? void 0 : target.serverUrl)) return;
3359
- const sessionId = (_a = opts.sessionId) != null ? _a : makeSessionId();
4121
+ const sessionId = (_a2 = opts.sessionId) != null ? _a2 : makeSessionId();
3360
4122
  setCurrentSessionId(sessionId);
3361
4123
  if (opts.once !== false) {
3362
4124
  if (_emitted.has(sessionId)) return;
@@ -3408,11 +4170,11 @@ var useSessionStart = (config, options = {}) => {
3408
4170
  latest.current = { config, options };
3409
4171
  useEffect(() => {
3410
4172
  const fire = () => {
3411
- var _a, _b;
4173
+ var _a2, _b;
3412
4174
  const { config: cfg, options: opts } = latest.current;
3413
4175
  if (!(cfg == null ? void 0 : cfg.serverUrl)) return;
3414
4176
  if (opts.enabled === false) return;
3415
- const target = { serverUrl: cfg.serverUrl, apiKey: (_a = cfg.apiKey) != null ? _a : "" };
4177
+ const target = { serverUrl: cfg.serverUrl, apiKey: (_a2 = cfg.apiKey) != null ? _a2 : "" };
3416
4178
  const device = collectDeviceContext();
3417
4179
  if (cfg.appVersion) device.appVersion = cfg.appVersion;
3418
4180
  reportSessionStart({
@@ -3463,7 +4225,7 @@ var resetFirstOpenLatch = () => {
3463
4225
  _firstOpenLatched.clear();
3464
4226
  };
3465
4227
  var buildLifecycleEvent = (questionKey, opts) => {
3466
- var _a;
4228
+ var _a2;
3467
4229
  const userContext = {};
3468
4230
  if (opts.deviceKey) userContext.device_key = opts.deviceKey;
3469
4231
  if (typeof opts.sessionCount === "number" && Number.isFinite(opts.sessionCount)) {
@@ -3475,7 +4237,7 @@ var buildLifecycleEvent = (questionKey, opts) => {
3475
4237
  const event = {
3476
4238
  event_type: "app_event",
3477
4239
  question_key: questionKey,
3478
- session_id: (_a = opts.sessionId) != null ? _a : makeSessionId()
4240
+ session_id: (_a2 = opts.sessionId) != null ? _a2 : makeSessionId()
3479
4241
  };
3480
4242
  const userId = sanitizeUserId(opts.userId);
3481
4243
  if (userId) event.user_id = userId;
@@ -3508,8 +4270,8 @@ var emitFirstOpen = (opts) => {
3508
4270
  routeLifecycleEvent(buildLifecycleEvent(FIRST_OPEN_EVENT, opts), opts);
3509
4271
  };
3510
4272
  var reportFirstOpen = (opts) => {
3511
- var _a;
3512
- const appId = (_a = opts.appId) != null ? _a : "default";
4273
+ var _a2;
4274
+ const appId = (_a2 = opts.appId) != null ? _a2 : "default";
3513
4275
  if (_firstOpenLatched.has(appId)) return;
3514
4276
  _firstOpenLatched.add(appId);
3515
4277
  const storage = opts.storage;
@@ -3586,10 +4348,10 @@ var parsePersisted2 = (raw) => {
3586
4348
  }
3587
4349
  };
3588
4350
  var createEventQueue = (options) => {
3589
- var _a, _b, _c, _d, _e, _f, _g;
4351
+ var _a2, _b, _c, _d, _e, _f, _g;
3590
4352
  const target = options.target;
3591
4353
  const storage = options.storage;
3592
- const key = (_b = options.storageKey) != null ? _b : `wireai:evtq:${(_a = options.appId) != null ? _a : "default"}`;
4354
+ const key = (_b = options.storageKey) != null ? _b : `wireai:evtq:${(_a2 = options.appId) != null ? _a2 : "default"}`;
3593
4355
  const maxSize = (_c = options.maxSize) != null ? _c : DEFAULTS.maxSize;
3594
4356
  const batchSize = (_d = options.batchSize) != null ? _d : DEFAULTS.batchSize;
3595
4357
  const baseBackoffMs = (_e = options.baseBackoffMs) != null ? _e : DEFAULTS.baseBackoffMs;
@@ -3608,13 +4370,13 @@ var createEventQueue = (options) => {
3608
4370
  }
3609
4371
  };
3610
4372
  const stamp = (event) => {
3611
- var _a2;
4373
+ var _a3;
3612
4374
  const env = resolveEnvelope();
3613
4375
  const stamped = { ...event };
3614
4376
  if (!env) return stamped;
3615
4377
  if (!stamped.device && env.device) stamped.device = env.device;
3616
4378
  if (!stamped.session_id && env.sessionId) stamped.session_id = env.sessionId;
3617
- const uc = { ...(_a2 = stamped.user_context) != null ? _a2 : {} };
4379
+ const uc = { ...(_a3 = stamped.user_context) != null ? _a3 : {} };
3618
4380
  if (env.appVersion && uc.app_version === void 0) uc.app_version = env.appVersion;
3619
4381
  if (env.appBuild && uc.app_build === void 0) uc.app_build = env.appBuild;
3620
4382
  if (env.networkType && uc.network_type === void 0) uc.network_type = env.networkType;
@@ -3763,15 +4525,15 @@ var useLifecycleEvents = (config, options = {}) => {
3763
4525
  latest.current = { config, options };
3764
4526
  const queueRef = useRef(void 0);
3765
4527
  useEffect(() => {
3766
- var _a;
4528
+ var _a2;
3767
4529
  const resolveSink = () => {
3768
- var _a2, _b;
4530
+ var _a3, _b;
3769
4531
  const { config: cfg, options: opts } = latest.current;
3770
4532
  if (opts.sink) return opts.sink;
3771
4533
  if (!(cfg == null ? void 0 : cfg.serverUrl)) return void 0;
3772
4534
  if (!queueRef.current) {
3773
4535
  queueRef.current = createEventQueue({
3774
- target: { serverUrl: cfg.serverUrl, apiKey: (_a2 = cfg.apiKey) != null ? _a2 : "" },
4536
+ target: { serverUrl: cfg.serverUrl, apiKey: (_a3 = cfg.apiKey) != null ? _a3 : "" },
3775
4537
  storage: cfg.storage,
3776
4538
  // Dedicated key so the hook's internal queue never collides with a host's main queue.
3777
4539
  storageKey: `wireai:evtq:lifecycle:${(_b = cfg.appId) != null ? _b : "default"}`,
@@ -3781,8 +4543,8 @@ var useLifecycleEvents = (config, options = {}) => {
3781
4543
  return queueRef.current.enqueue;
3782
4544
  };
3783
4545
  const targetOf = (cfg) => {
3784
- var _a2;
3785
- return (cfg == null ? void 0 : cfg.serverUrl) ? { serverUrl: cfg.serverUrl, apiKey: (_a2 = cfg.apiKey) != null ? _a2 : "" } : void 0;
4546
+ var _a3;
4547
+ return (cfg == null ? void 0 : cfg.serverUrl) ? { serverUrl: cfg.serverUrl, apiKey: (_a3 = cfg.apiKey) != null ? _a3 : "" } : void 0;
3786
4548
  };
3787
4549
  {
3788
4550
  const { config: cfg, options: opts } = latest.current;
@@ -3797,7 +4559,7 @@ var useLifecycleEvents = (config, options = {}) => {
3797
4559
  userId: opts.userId,
3798
4560
  deviceKey: opts.deviceKey,
3799
4561
  sessionCount: opts.sessionCount,
3800
- appVersion: (_a = cfg == null ? void 0 : cfg.appVersion) != null ? _a : device.appVersion,
4562
+ appVersion: (_a2 = cfg == null ? void 0 : cfg.appVersion) != null ? _a2 : device.appVersion,
3801
4563
  platform: Platform.OS,
3802
4564
  device,
3803
4565
  meta: opts.meta
@@ -3805,7 +4567,7 @@ var useLifecycleEvents = (config, options = {}) => {
3805
4567
  }
3806
4568
  }
3807
4569
  const fireSession = () => {
3808
- var _a2;
4570
+ var _a3;
3809
4571
  const { config: cfg, options: opts } = latest.current;
3810
4572
  if (opts.enabled === false) return;
3811
4573
  if (!(cfg == null ? void 0 : cfg.serverUrl) && !opts.sink) return;
@@ -3818,7 +4580,7 @@ var useLifecycleEvents = (config, options = {}) => {
3818
4580
  userId: opts.userId,
3819
4581
  deviceKey: opts.deviceKey,
3820
4582
  sessionCount: opts.sessionCount,
3821
- appVersion: (_a2 = cfg == null ? void 0 : cfg.appVersion) != null ? _a2 : device.appVersion,
4583
+ appVersion: (_a3 = cfg == null ? void 0 : cfg.appVersion) != null ? _a3 : device.appVersion,
3822
4584
  platform: Platform.OS,
3823
4585
  device,
3824
4586
  meta: opts.meta
@@ -3844,6 +4606,6 @@ var useLifecycleEvents = (config, options = {}) => {
3844
4606
  }, []);
3845
4607
  };
3846
4608
 
3847
- export { AUTO_DEVICE_ID_PREFIX, AnimatedSparkle, BACKGROUND_SESSION_MS, CardHandoff, CenteredModal, ChipSelectCard, CompletionView, DEFAULT_FEATURES_TTL_MS, DEFAULT_SESSION_TTL_MS, DemoOnboarding, DoneBlock, EXTRA_KEY_PREFIX, ErrorBlock, FIRST_OPEN_EVENT, IllustrationProvider, InterstitialCard, LoadingBlock, LoadingScreen, NumberStepperCard, Button as OnboardingButton, OnboardingFlow, OnboardingScaffold, OnboardingThemeProvider, RESERVED_USER_CONTEXT_KEYS, SESSION_STARTED_EVENT, SelectionCard, StatusCard, StepProgress, TextInputCard, USER_ID_MAX_LENGTH, WIRE_ONBOARDING_EVENTS, WireFeaturesProvider, WireOnboarding, attributionMetadata, clearPersistedSession, collectDeviceContext, defaultIllustrations, defaultOnboardingTheme, defaultWireFeatures, deriveAnswers, detectAppVersion, detectNativeModel, deviceIdStorageKey, featuresCacheKey, featuresEqual, fetchWireFeatures, firstOpenStorageKey, getCurrentSessionId, hashEmailFnv1a, identifyOnboarding, isFeaturesFresh, isOnboardingEnabled, isWireScalar, loadPersistedSession, makeSessionId, mergeTheme, mintDeviceId, motionSpec_exports as motionSpec, namespaceExtra, onboardingComponents, parseWireFeatures, peekPersistedSession, readCachedFeatures, readProgress, reportClientEvent, reportClientEvents, reportFirstOpen, reportSessionStart, resetCurrentSessionId, resetFirstOpenLatch, resetSessionStartGuard, resolveUserContext, sanitizeUserId, savePersistedSession, sessionStorageKey, setCurrentSessionId, themeFromBrand, toAnalyticsEvent, useIllustration, useLifecycleEvents, useOnboardingTheme, useReducedMotion, useResolvedFeatures, useSessionStart, useWireFeatures, useWireFeaturesContext, wireConfigFromEnv, wireLifecycleEvents, writeCachedFeatures };
4609
+ export { AUTO_DEVICE_ID_PREFIX, AnimatedSparkle, BACKGROUND_SESSION_MS, CardGridSelectCard, CardHandoff, CenteredModal, ChipSelectCard, CompletionView, DEFAULT_FEATURES_TTL_MS, DEFAULT_SESSION_TTL_MS, DemoOnboarding, DoneBlock, EXTRA_KEY_PREFIX, ErrorBlock, FIRST_OPEN_EVENT, IconRegistryProvider, IllustrationProvider, InterstitialCard, LoadingBlock, LoadingScreen, NumberStepperCard, Button as OnboardingButton, OnboardingFlow, OnboardingScaffold, OnboardingThemeProvider, RESERVED_USER_CONTEXT_KEYS, SESSION_STARTED_EVENT, SelectionCard, StatusCard, StepProgress, TextInputCard, USER_ID_MAX_LENGTH, WIRE_ICON_GLYPHS, WIRE_ICON_NAMES, WIRE_ONBOARDING_EVENTS, WireFeaturesProvider, WireIcon, WireOnboarding, attributionMetadata, clearPersistedSession, collectDeviceContext, defaultIllustrations, defaultOnboardingTheme, defaultWireFeatures, deriveAnswers, detectAppVersion, detectNativeModel, deviceIdStorageKey, featuresCacheKey, featuresEqual, fetchWireFeatures, firstOpenStorageKey, getCurrentSessionId, hashEmailFnv1a, identifyOnboarding, isFeaturesFresh, isOnboardingEnabled, isWireScalar, loadPersistedSession, lookupIconGlyph, makeSessionId, mergeTheme, mintDeviceId, motionSpec_exports as motionSpec, namespaceExtra, onboardingComponents, parseWireFeatures, peekPersistedSession, readCachedFeatures, readProgress, reportClientEvent, reportClientEvents, reportFirstOpen, reportSessionStart, resetCurrentSessionId, resetFirstOpenLatch, resetSessionStartGuard, resolveUserContext, sanitizeUserId, savePersistedSession, sessionStorageKey, setCurrentSessionId, themeFromBrand, toAnalyticsEvent, useHostIcon, useIllustration, useLifecycleEvents, useOnboardingTheme, useReducedMotion, useResolvedFeatures, useSessionStart, useWireFeatures, useWireFeaturesContext, wireConfigFromEnv, wireLifecycleEvents, writeCachedFeatures };
3848
4610
  //# sourceMappingURL=index.mjs.map
3849
4611
  //# sourceMappingURL=index.mjs.map