@apps-in-toss/framework 1.3.0 → 1.4.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 (3) hide show
  1. package/dist/index.cjs +410 -375
  2. package/dist/index.js +324 -289
  3. package/package.json +7 -7
package/dist/index.cjs CHANGED
@@ -49,9 +49,9 @@ var import_analytics2 = require("@apps-in-toss/analytics");
49
49
  // src/core/registerApp.tsx
50
50
  var import_analytics = require("@apps-in-toss/analytics");
51
51
  var import_native_modules13 = require("@apps-in-toss/native-modules");
52
- var import_react_native20 = require("@granite-js/react-native");
52
+ var import_react_native21 = require("@granite-js/react-native");
53
53
  var import_tds_react_native10 = require("@toss/tds-react-native");
54
- var import_react_native21 = require("react-native");
54
+ var import_react_native22 = require("react-native");
55
55
 
56
56
  // src/core/components/AppEvent.tsx
57
57
  var import_native_modules2 = require("@apps-in-toss/native-modules");
@@ -232,64 +232,128 @@ function useAppsInTossBridge() {
232
232
 
233
233
  // src/components/RNAppContainer.tsx
234
234
  var import_native_modules12 = require("@apps-in-toss/native-modules");
235
- var import_react14 = require("react");
236
- var import_react_native19 = require("react-native");
235
+ var import_react17 = require("react");
236
+ var import_react_native20 = require("react-native");
237
237
 
238
- // src/components/GameProfile.tsx
239
- var import_native_modules6 = require("@apps-in-toss/native-modules");
240
- var import_tds_react_native4 = require("@toss/tds-react-native");
241
- var import_react7 = require("react");
242
- var import_react_native9 = require("react-native");
238
+ // src/components/GameInitializer.tsx
239
+ var import_native_modules7 = require("@apps-in-toss/native-modules");
240
+ var import_react_native10 = require("@granite-js/react-native");
241
+ var import_tds_react_native5 = require("@toss/tds-react-native");
242
+ var import_es_hangul = require("es-hangul");
243
+ var import_react11 = require("react");
244
+ var import_react_native11 = require("react-native");
243
245
 
244
246
  // src/constant/game-center.ts
245
247
  var GAME_PROFILE_WEBVIEW_URL = "servicetoss://game-center/profile";
246
- var GAME_CENTER_MIN_VERSION = {
247
- android: "5.221.0",
248
- ios: "5.221.0"
248
+ var GAME_MIN_VERSION = {
249
+ android: "5.232.0",
250
+ ios: "5.232.0"
249
251
  };
250
252
 
251
- // src/hooks/useGameCenterProfile.ts
252
- var import_native_modules5 = require("@apps-in-toss/native-modules");
253
- var import_react_native8 = require("@granite-js/react-native");
254
- var import_tds_react_native3 = require("@toss/tds-react-native");
255
- var import_es_hangul = require("es-hangul");
253
+ // src/hooks/useAppUpdateDialog.tsx
254
+ var import_native_modules4 = require("@apps-in-toss/native-modules");
255
+ var import_react_native7 = require("@granite-js/react-native");
256
+ var import_tds_react_native2 = require("@toss/tds-react-native");
256
257
  var import_react6 = require("react");
257
258
 
258
- // src/components/GameProfileToast.tsx
259
- var import_tds_react_native2 = require("@toss/tds-react-native");
260
- var import_private = require("@toss/tds-react-native/private");
261
- var import_jsx_runtime2 = require("react/jsx-runtime");
262
- var useGameProfileToast = () => {
263
- const overlay = (0, import_private.useOverlay)();
264
- const openGameProfileToast = (nickname, profileImageUri) => {
265
- return new Promise((resolve) => {
266
- overlay.open(({ isOpen, close, exit }) => {
267
- return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_private.ColorPreferenceProvider, { colorPreference: "dark", children: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_private.AdaptiveColorProvider, { children: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
268
- import_tds_react_native2.Toast,
269
- {
270
- open: isOpen,
271
- onClose: () => {
272
- resolve();
273
- close();
274
- },
275
- onExited: exit,
276
- position: "top",
277
- text: `${nickname}\uB2D8 \uBC18\uAC00\uC6CC\uC694!`,
278
- icon: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
279
- import_tds_react_native2.Asset.Image,
280
- {
281
- style: { borderRadius: 64, overflow: "hidden" },
282
- frameShape: import_tds_react_native2.Asset.frameShape.CleanW32,
283
- source: { uri: profileImageUri }
284
- }
285
- )
286
- }
287
- ) }) });
259
+ // src/utils/market.ts
260
+ var import_react_native6 = require("react-native");
261
+ var PLAYSTORE_LINK = "https://play.google.com/store/apps/details?id=viva.republica.toss";
262
+ var APPSTORE_LINK = "https://itunes.apple.com/app/id839333328";
263
+ var getMarketLink = () => {
264
+ return import_react_native6.Platform.OS === "android" ? PLAYSTORE_LINK : APPSTORE_LINK;
265
+ };
266
+
267
+ // src/hooks/useAppUpdateDialog.tsx
268
+ function useAppUpdateDialog() {
269
+ const { openConfirm } = (0, import_tds_react_native2.useDialog)();
270
+ const logging = useAppUpdateDialogLogging();
271
+ const openAppUpdateDialog = (0, import_react6.useCallback)(
272
+ async ({
273
+ title,
274
+ description,
275
+ leftButton = "\uB2EB\uAE30",
276
+ rightButton = "\uC5C5\uB370\uC774\uD2B8\uD558\uAE30",
277
+ onDismiss
278
+ }) => {
279
+ logging.show();
280
+ const isConfirmed = await openConfirm({
281
+ title,
282
+ description,
283
+ leftButton,
284
+ rightButton,
285
+ closeOnDimmerClick: true
288
286
  });
287
+ if (!isConfirmed) {
288
+ logging.close();
289
+ onDismiss?.();
290
+ return;
291
+ }
292
+ logging.update();
293
+ const STORE_SCHEME = getMarketLink();
294
+ (0, import_react_native7.openURL)(`supertoss://web?url=${STORE_SCHEME}&external=browser`);
295
+ },
296
+ [logging, openConfirm]
297
+ );
298
+ return {
299
+ open: openAppUpdateDialog
300
+ };
301
+ }
302
+ var UPDATE_DIALOG_SCHEMA_ID = 1634992;
303
+ var UPDATE_DIALOG_LOG_NAME = "appsintoss_app_visit__common_module::bottomsheet__app_update";
304
+ var UPDATE_DIALOG_CTA_CLICK_SCHEMA_ID = 1634996;
305
+ var UPDATE_DIALOG_CTA_CLICK_LOG_NAME = "appsintoss_app_visit__common_module::bottomsheet__app_update::click__cta";
306
+ function useAppUpdateDialogLogging() {
307
+ const referrer = useReferrer();
308
+ const baseParams = {
309
+ referrer,
310
+ app_name: import_react_native7.Granite.appName
311
+ };
312
+ const logUpdateClick = () => {
313
+ import_native_modules4.INTERNAL__module.tossCoreEventLog({
314
+ log_name: UPDATE_DIALOG_CTA_CLICK_LOG_NAME,
315
+ log_type: "event",
316
+ params: {
317
+ ...baseParams,
318
+ schema_id: UPDATE_DIALOG_CTA_CLICK_SCHEMA_ID,
319
+ event_type: "click",
320
+ button_type: "update"
321
+ }
289
322
  });
290
323
  };
291
- return { openGameProfileToast };
292
- };
324
+ const logCloseClick = () => {
325
+ import_native_modules4.INTERNAL__module.tossCoreEventLog({
326
+ log_name: UPDATE_DIALOG_CTA_CLICK_LOG_NAME,
327
+ log_type: "event",
328
+ params: {
329
+ ...baseParams,
330
+ schema_id: UPDATE_DIALOG_CTA_CLICK_SCHEMA_ID,
331
+ event_type: "click",
332
+ button_type: "close"
333
+ }
334
+ });
335
+ };
336
+ const logDialogShow = () => {
337
+ import_native_modules4.INTERNAL__module.tossCoreEventLog({
338
+ log_name: UPDATE_DIALOG_LOG_NAME,
339
+ log_type: "popup",
340
+ params: {
341
+ ...baseParams,
342
+ schema_id: UPDATE_DIALOG_SCHEMA_ID
343
+ }
344
+ });
345
+ };
346
+ return { update: logUpdateClick, close: logCloseClick, show: logDialogShow };
347
+ }
348
+
349
+ // src/hooks/useGameCenterProfile.ts
350
+ var import_native_modules6 = require("@apps-in-toss/native-modules");
351
+ var import_react10 = require("react");
352
+
353
+ // src/hooks/useErrorAlert.ts
354
+ var import_react_native8 = require("@granite-js/react-native");
355
+ var import_tds_react_native3 = require("@toss/tds-react-native");
356
+ var import_react7 = require("react");
293
357
 
294
358
  // src/utils/error.ts
295
359
  var DEFAULT_ERROR = {
@@ -297,20 +361,28 @@ var DEFAULT_ERROR = {
297
361
  description: "\uBB38\uC81C\uAC00 \uACC4\uC18D\uB418\uBA74 \uD1A0\uC2A4 \uACE0\uAC1D\uC13C\uD130(1599-4905)\uB85C \uBB38\uC758\uD574\uC8FC\uC138\uC694."
298
362
  };
299
363
 
300
- // src/utils/market.ts
301
- var import_react_native6 = require("react-native");
302
- var PLAYSTORE_LINK = "https://play.google.com/store/apps/details?id=viva.republica.toss";
303
- var APPSTORE_LINK = "https://itunes.apple.com/app/id839333328";
304
- var getMarketLink = () => {
305
- return import_react_native6.Platform.OS === "android" ? PLAYSTORE_LINK : APPSTORE_LINK;
364
+ // src/hooks/useErrorAlert.ts
365
+ var useErrorAlert = () => {
366
+ const { openAlert } = (0, import_tds_react_native3.useDialog)();
367
+ const openErrorAlert = (0, import_react7.useCallback)(async () => {
368
+ await openAlert({
369
+ title: DEFAULT_ERROR.title,
370
+ description: DEFAULT_ERROR.description
371
+ });
372
+ (0, import_react_native8.closeView)();
373
+ }, [openAlert]);
374
+ return { open: openErrorAlert };
306
375
  };
307
376
 
377
+ // src/hooks/useTransparentWebview.tsx
378
+ var import_react8 = require("react");
379
+
308
380
  // src/utils/openTransparentWebView.ts
309
- var import_react_native7 = require("@granite-js/react-native");
381
+ var import_react_native9 = require("@granite-js/react-native");
310
382
 
311
383
  // src/private.ts
312
- var import_native_modules4 = require("@apps-in-toss/native-modules");
313
- var INTERNAL__onVisibilityChangedByTransparentServiceWeb = import_native_modules4.onVisibilityChangedByTransparentServiceWeb;
384
+ var import_native_modules5 = require("@apps-in-toss/native-modules");
385
+ var INTERNAL__onVisibilityChangedByTransparentServiceWeb = import_native_modules5.onVisibilityChangedByTransparentServiceWeb;
314
386
 
315
387
  // src/utils/openTransparentWebView.ts
316
388
  var openTransparentWebView = ({
@@ -340,91 +412,139 @@ var openTransparentWebView = ({
340
412
  }
341
413
  }
342
414
  });
343
- (0, import_react_native7.openURL)(url.toString());
415
+ (0, import_react_native9.openURL)(url.toString());
416
+ };
417
+
418
+ // src/hooks/useTransparentWebview.tsx
419
+ var useTransparentWebview = () => {
420
+ const [isWebviewLoading, setIsWebviewLoading] = (0, import_react8.useState)(false);
421
+ const { open: openErrorAlert } = useErrorAlert();
422
+ const _openTransparentWebview = (0, import_react8.useCallback)(
423
+ ({ webUrl, onClose, onError }) => {
424
+ if (isWebviewLoading) {
425
+ return;
426
+ }
427
+ setIsWebviewLoading(true);
428
+ openTransparentWebView({
429
+ webUrl,
430
+ onEvent: async (isClosedTransparentWebView) => {
431
+ if (isClosedTransparentWebView) {
432
+ setIsWebviewLoading(false);
433
+ onClose?.();
434
+ }
435
+ },
436
+ onError: (error) => {
437
+ setIsWebviewLoading(false);
438
+ if (onError) {
439
+ onError(error);
440
+ } else {
441
+ openErrorAlert();
442
+ }
443
+ }
444
+ });
445
+ },
446
+ [isWebviewLoading, openErrorAlert]
447
+ );
448
+ return {
449
+ open: _openTransparentWebview
450
+ };
451
+ };
452
+
453
+ // src/components/GameProfileToast.tsx
454
+ var import_tds_react_native4 = require("@toss/tds-react-native");
455
+ var import_private2 = require("@toss/tds-react-native/private");
456
+ var import_react9 = require("react");
457
+ var import_jsx_runtime2 = require("react/jsx-runtime");
458
+ var useGameProfileToast = () => {
459
+ const overlay = (0, import_private2.useOverlay)();
460
+ const openGameProfileToast = (0, import_react9.useCallback)(
461
+ (nickname, profileImageUri) => {
462
+ return new Promise((resolve) => {
463
+ overlay.open(({ isOpen, close, exit }) => {
464
+ return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_private2.ColorPreferenceProvider, { colorPreference: "dark", children: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_private2.AdaptiveColorProvider, { children: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
465
+ import_tds_react_native4.Toast,
466
+ {
467
+ open: isOpen,
468
+ onClose: () => {
469
+ resolve();
470
+ close();
471
+ },
472
+ onExited: exit,
473
+ position: "top",
474
+ text: `${nickname}\uB2D8 \uBC18\uAC00\uC6CC\uC694!`,
475
+ icon: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
476
+ import_tds_react_native4.Asset.Image,
477
+ {
478
+ style: { borderRadius: 64, overflow: "hidden" },
479
+ frameShape: import_tds_react_native4.Asset.frameShape.CleanW32,
480
+ source: { uri: profileImageUri }
481
+ }
482
+ )
483
+ }
484
+ ) }) });
485
+ });
486
+ });
487
+ },
488
+ [overlay]
489
+ );
490
+ return { openGameProfileToast };
344
491
  };
345
492
 
346
493
  // src/hooks/useGameCenterProfile.ts
347
494
  var useGameCenterProfile = (isReadyForProfileUI) => {
348
- const [profileData, setProfileData] = (0, import_react6.useState)(void 0);
349
- const [isProfileDataLoading, setIsProfileDataLoading] = (0, import_react6.useState)(true);
350
- const [isProfileDataRefetching, setIsProfileDataRefetching] = (0, import_react6.useState)(false);
351
- const shouldShowLoadingOverlay = isProfileDataLoading && isReadyForProfileUI;
495
+ const [profileData, setProfileData] = (0, import_react10.useState)(void 0);
496
+ const [isProfileDataLoading, setIsProfileDataLoading] = (0, import_react10.useState)(true);
497
+ const [isProfileDataRefetching, setIsProfileDataRefetching] = (0, import_react10.useState)(false);
498
+ const shouldShowProfileLoadingOverlay = isProfileDataLoading && isReadyForProfileUI || isProfileDataRefetching;
352
499
  const shouldShowProfileNotFoundOverlay = profileData?.statusCode === "PROFILE_NOT_FOUND" && isReadyForProfileUI && !isProfileDataRefetching;
353
500
  const canShowBottomSheetOrToast = !isProfileDataLoading && isReadyForProfileUI;
354
- const [isWebviewLoading, setIsWebviewLoading] = (0, import_react6.useState)(false);
355
- const isCompletedProfileFlow = (0, import_react6.useRef)(false);
356
- const { openAlert, openConfirm } = (0, import_tds_react_native3.useDialog)();
357
501
  const { openGameProfileToast } = useGameProfileToast();
358
- const openErrorAlert = (0, import_react6.useCallback)(async () => {
359
- await openAlert({
360
- title: DEFAULT_ERROR.title,
361
- description: DEFAULT_ERROR.description
362
- });
363
- (0, import_react_native8.closeView)();
364
- }, [openAlert]);
365
- const openProfileWebview = (0, import_react6.useCallback)(() => {
366
- if (isWebviewLoading) {
367
- return;
502
+ const { open: openErrorAlert } = useErrorAlert();
503
+ const { open: openTransparentWebView2 } = useTransparentWebview();
504
+ const fetchProfileData = (0, import_react10.useCallback)(async () => {
505
+ try {
506
+ const data = await (0, import_native_modules6.getGameCenterGameProfile)();
507
+ setProfileData(data);
508
+ setIsProfileDataLoading(false);
509
+ } catch (_) {
510
+ openErrorAlert();
511
+ setIsProfileDataLoading(false);
512
+ }
513
+ }, [openErrorAlert]);
514
+ const refetchProfileData = (0, import_react10.useCallback)(async () => {
515
+ try {
516
+ setIsProfileDataRefetching(true);
517
+ const data = await (0, import_native_modules6.getGameCenterGameProfile)();
518
+ setProfileData(data);
519
+ setIsProfileDataRefetching(false);
520
+ if (data?.statusCode === "SUCCESS") {
521
+ openGameProfileToast(data.nickname, data.profileImageUri);
522
+ }
523
+ } catch (_) {
524
+ setIsProfileDataRefetching(false);
525
+ openErrorAlert();
368
526
  }
369
- setIsWebviewLoading(true);
370
- openTransparentWebView({
527
+ }, [openErrorAlert, openGameProfileToast]);
528
+ const openProfileWebview = (0, import_react10.useCallback)(() => {
529
+ openTransparentWebView2({
371
530
  webUrl: `${GAME_PROFILE_WEBVIEW_URL}?appName=${getAppName()}&referrer=appsintoss.${getAppName()}`,
372
- onEvent: async (isClosedTransparentWebView) => {
373
- if (isClosedTransparentWebView) {
374
- try {
375
- setIsWebviewLoading(false);
376
- setIsProfileDataRefetching(true);
377
- const data = await (0, import_native_modules5.getGameCenterGameProfile)();
378
- setProfileData(data);
379
- setIsProfileDataRefetching(false);
380
- if (data?.statusCode === "SUCCESS") {
381
- openGameProfileToast(data.nickname, data.profileImageUri);
382
- }
383
- } catch (_) {
384
- setIsProfileDataRefetching(false);
385
- openErrorAlert();
386
- }
387
- }
388
- },
389
- onError: () => {
390
- openErrorAlert();
531
+ onClose: async () => {
532
+ refetchProfileData();
391
533
  }
392
534
  });
393
- }, [isWebviewLoading, openGameProfileToast, openErrorAlert]);
394
- const updateAppToSupportedMinVersion = (0, import_react6.useCallback)(async () => {
395
- const upddateConfirmDialogLabel = {
396
- title: `${(0, import_es_hangul.josa)(getAppsInTossGlobals().brandDisplayName, "\uC744/\uB97C")} \uD558\uB824\uBA74
397
- \uC571\uC744 \uC5C5\uB370\uC774\uD2B8\uD574\uC8FC\uC138\uC694`,
398
- leftButton: "\uB2EB\uAE30",
399
- rightButton: "\uC5C5\uB370\uC774\uD2B8\uD558\uAE30"
400
- };
401
- const isConfirmed = await openConfirm({
402
- title: upddateConfirmDialogLabel.title,
403
- leftButton: upddateConfirmDialogLabel.leftButton,
404
- rightButton: upddateConfirmDialogLabel.rightButton,
405
- closeOnDimmerClick: true
406
- });
407
- if (!isConfirmed) {
408
- (0, import_react_native8.closeView)();
409
- return;
410
- }
411
- const STORE_SCHEME = getMarketLink();
412
- (0, import_react_native8.openURL)(`supertoss://web?url=${STORE_SCHEME}&external=browser`);
413
- }, [openConfirm]);
535
+ }, [openTransparentWebView2, refetchProfileData]);
414
536
  return {
415
537
  profileData,
416
538
  isProfileDataLoading,
417
- isProfileDataRefetching,
418
- shouldShowLoadingOverlay,
539
+ shouldShowProfileLoadingOverlay,
419
540
  shouldShowProfileNotFoundOverlay,
420
541
  canShowBottomSheetOrToast,
421
- isCompletedProfileFlow,
422
- updateAppToSupportedMinVersion,
423
542
  setIsProfileDataLoading,
424
543
  openProfileWebview,
425
544
  setProfileData,
426
545
  openErrorAlert,
427
- openGameProfileToast
546
+ openGameProfileToast,
547
+ fetchProfileData
428
548
  };
429
549
  };
430
550
 
@@ -437,47 +557,40 @@ var Z_INDEX = {
437
557
  CLOSE_BUTTON: 9999
438
558
  };
439
559
 
440
- // src/components/GameProfile.tsx
560
+ // src/components/GameInitializer.tsx
441
561
  var import_jsx_runtime3 = require("react/jsx-runtime");
442
- var GameProfile = ({ children, isReadyForProfileUI }) => {
562
+ var GameInitializer = ({ children, isReadyForProfileUI }) => {
443
563
  const {
444
564
  profileData,
445
- isProfileDataRefetching,
446
- shouldShowLoadingOverlay,
565
+ shouldShowProfileLoadingOverlay,
447
566
  shouldShowProfileNotFoundOverlay,
448
567
  canShowBottomSheetOrToast,
449
- isCompletedProfileFlow,
450
568
  openProfileWebview,
451
- updateAppToSupportedMinVersion,
452
- setIsProfileDataLoading,
453
- setProfileData,
454
- openErrorAlert,
455
- openGameProfileToast
569
+ openGameProfileToast,
570
+ fetchProfileData
456
571
  } = useGameCenterProfile(isReadyForProfileUI);
457
- (0, import_react7.useEffect)(() => {
458
- try {
459
- const getProfileData = async () => {
460
- const data = await (0, import_native_modules6.getGameCenterGameProfile)();
461
- setProfileData(data);
462
- setIsProfileDataLoading(false);
463
- };
464
- getProfileData();
465
- } catch (_) {
466
- openErrorAlert();
467
- setIsProfileDataLoading(false);
468
- }
572
+ const isCompletedFlow = (0, import_react11.useRef)(false);
573
+ const { open: openAppUpdateDialog } = useAppUpdateDialog();
574
+ (0, import_react11.useEffect)(() => {
575
+ fetchProfileData();
469
576
  }, []);
470
- (0, import_react7.useEffect)(() => {
577
+ (0, import_react11.useEffect)(() => {
471
578
  const handleGameProfileFlow = async () => {
472
579
  if (!canShowBottomSheetOrToast) {
473
580
  return;
474
581
  }
475
- if (isCompletedProfileFlow.current) {
582
+ if (isCompletedFlow.current) {
476
583
  return;
477
584
  }
478
- isCompletedProfileFlow.current = true;
479
- if (!(0, import_native_modules6.isMinVersionSupported)(GAME_CENTER_MIN_VERSION)) {
480
- updateAppToSupportedMinVersion();
585
+ isCompletedFlow.current = true;
586
+ if (!(0, import_native_modules7.isMinVersionSupported)(GAME_MIN_VERSION)) {
587
+ openAppUpdateDialog({
588
+ title: `${(0, import_es_hangul.josa)(getAppsInTossGlobals().brandDisplayName, "\uC744/\uB97C")} \uD558\uB824\uBA74
589
+ \uC571\uC744 \uC5C5\uB370\uC774\uD2B8\uD574\uC8FC\uC138\uC694`,
590
+ onDismiss: () => {
591
+ (0, import_react_native10.closeView)();
592
+ }
593
+ });
481
594
  return;
482
595
  }
483
596
  if (profileData?.statusCode === "SUCCESS") {
@@ -491,33 +604,39 @@ var GameProfile = ({ children, isReadyForProfileUI }) => {
491
604
  handleGameProfileFlow();
492
605
  }, [
493
606
  canShowBottomSheetOrToast,
494
- isCompletedProfileFlow,
607
+ isCompletedFlow,
608
+ openAppUpdateDialog,
495
609
  openGameProfileToast,
496
610
  openProfileWebview,
497
- profileData,
498
- updateAppToSupportedMinVersion
611
+ profileData
499
612
  ]);
500
- if (!(0, import_native_modules6.isMinVersionSupported)(GAME_CENTER_MIN_VERSION)) {
613
+ if (!(0, import_native_modules7.isMinVersionSupported)(GAME_MIN_VERSION)) {
501
614
  return /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(import_jsx_runtime3.Fragment, { children: [
502
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_react_native9.View, { style: { flex: 1, position: "relative" }, children }),
615
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_react_native11.View, { style: { flex: 1, position: "relative" }, children }),
503
616
  /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
504
- import_react_native9.Pressable,
617
+ import_react_native11.Pressable,
505
618
  {
506
619
  style: {
507
620
  ...overlayStyle
508
621
  },
509
622
  onPress: () => {
510
- updateAppToSupportedMinVersion();
623
+ openAppUpdateDialog({
624
+ title: `${(0, import_es_hangul.josa)(getAppsInTossGlobals().brandDisplayName, "\uC744/\uB97C")} \uD558\uB824\uBA74
625
+ \uC571\uC744 \uC5C5\uB370\uC774\uD2B8\uD574\uC8FC\uC138\uC694`,
626
+ onDismiss: () => {
627
+ (0, import_react_native10.closeView)();
628
+ }
629
+ });
511
630
  }
512
631
  }
513
632
  )
514
633
  ] });
515
634
  }
516
- if (shouldShowLoadingOverlay || isProfileDataRefetching) {
635
+ if (shouldShowProfileLoadingOverlay) {
517
636
  return /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(import_jsx_runtime3.Fragment, { children: [
518
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_react_native9.View, { style: { flex: 1, position: "relative" }, children }),
637
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_react_native11.View, { style: { flex: 1, position: "relative" }, children }),
519
638
  /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
520
- import_react_native9.View,
639
+ import_react_native11.View,
521
640
  {
522
641
  style: {
523
642
  ...overlayStyle,
@@ -525,16 +644,16 @@ var GameProfile = ({ children, isReadyForProfileUI }) => {
525
644
  alignItems: "center",
526
645
  backgroundColor: "rgba(0, 0, 0, 0.2)"
527
646
  },
528
- children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_tds_react_native4.Loader, { size: "large", type: "light" })
647
+ children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_tds_react_native5.Loader, { size: "large", type: "light" })
529
648
  }
530
649
  )
531
650
  ] });
532
651
  }
533
652
  if (shouldShowProfileNotFoundOverlay) {
534
653
  return /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(import_jsx_runtime3.Fragment, { children: [
535
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_react_native9.View, { style: { flex: 1, position: "relative" }, children }),
654
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_react_native11.View, { style: { flex: 1, position: "relative" }, children }),
536
655
  shouldShowProfileNotFoundOverlay && /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
537
- import_react_native9.Pressable,
656
+ import_react_native11.Pressable,
538
657
  {
539
658
  style: {
540
659
  ...overlayStyle
@@ -546,7 +665,7 @@ var GameProfile = ({ children, isReadyForProfileUI }) => {
546
665
  )
547
666
  ] });
548
667
  }
549
- return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_jsx_runtime3.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_react_native9.View, { style: { flex: 1, position: "relative" }, children }) });
668
+ return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_jsx_runtime3.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_react_native11.View, { style: { flex: 1, position: "relative" }, children }) });
550
669
  };
551
670
  var overlayStyle = {
552
671
  position: "absolute",
@@ -561,31 +680,31 @@ var overlayStyle = {
561
680
  var import_private5 = require("@toss/tds-react-native/private");
562
681
 
563
682
  // src/components/NavigationBar/RNNavigationBar/hooks/useHardwareBackPress.ts
564
- var import_react8 = require("react");
565
- var import_react_native10 = require("react-native");
683
+ var import_react12 = require("react");
684
+ var import_react_native12 = require("react-native");
566
685
  function useHardwareBackPress(handler) {
567
- (0, import_react8.useEffect)(() => {
686
+ (0, import_react12.useEffect)(() => {
568
687
  const handleBackPress = () => {
569
688
  handler();
570
689
  return true;
571
690
  };
572
- import_react_native10.BackHandler.addEventListener("hardwareBackPress", handleBackPress);
573
- return () => import_react_native10.BackHandler.removeEventListener("hardwareBackPress", handleBackPress);
691
+ import_react_native12.BackHandler.addEventListener("hardwareBackPress", handleBackPress);
692
+ return () => import_react_native12.BackHandler.removeEventListener("hardwareBackPress", handleBackPress);
574
693
  }, [handler]);
575
694
  }
576
695
 
577
696
  // src/components/NavigationBar/RNNavigationBar/hooks/useNavigationEvent.ts
578
- var import_react_native12 = require("@granite-js/react-native");
579
- var import_react10 = require("react");
697
+ var import_react_native14 = require("@granite-js/react-native");
698
+ var import_react14 = require("react");
580
699
 
581
700
  // src/components/NavigationBar/RNNavigationBar/hooks/useCloseConfirm.ts
582
- var import_tds_react_native5 = require("@toss/tds-react-native");
701
+ var import_tds_react_native6 = require("@toss/tds-react-native");
583
702
  var import_es_hangul2 = require("es-hangul");
584
- var import_react9 = require("react");
703
+ var import_react13 = require("react");
585
704
  function useCloseConfirm() {
586
705
  const { brandDisplayName } = getAppsInTossGlobals();
587
- const { openConfirm } = (0, import_tds_react_native5.useDialog)();
588
- return (0, import_react9.useCallback)(async ({ onEntered }) => {
706
+ const { openConfirm } = (0, import_tds_react_native6.useDialog)();
707
+ return (0, import_react13.useCallback)(async ({ onEntered }) => {
589
708
  return await openConfirm({
590
709
  title: `${(0, import_es_hangul2.josa)(brandDisplayName, "\uC744/\uB97C")} \uC885\uB8CC\uD560\uAE4C\uC694?`,
591
710
  leftButton: "\uCDE8\uC18C",
@@ -597,8 +716,8 @@ function useCloseConfirm() {
597
716
  }
598
717
 
599
718
  // src/components/NavigationBar/common/useNavigationBarLogging.tsx
600
- var import_native_modules7 = require("@apps-in-toss/native-modules");
601
- var import_react_native11 = require("@granite-js/react-native");
719
+ var import_native_modules8 = require("@apps-in-toss/native-modules");
720
+ var import_react_native13 = require("@granite-js/react-native");
602
721
  var NAVI_BAR_IMPRESSION_SCHEMA_ID = 1596837;
603
722
  var NAVI_BAR_IMPRESSION_LOG_NAME = "appsintoss_app_visit__common_module::impression__navigation_bar";
604
723
  var CLOSE_POPUP_SHOW_SCHEMA_ID = 1644490;
@@ -613,10 +732,10 @@ function useNavigationBarLogging() {
613
732
  const referrer = useReferrer();
614
733
  const baseParams = {
615
734
  referrer,
616
- app_name: import_react_native11.Granite.appName
735
+ app_name: import_react_native13.Granite.appName
617
736
  };
618
737
  const logNavBarImpression = (naviBarConfig) => {
619
- import_native_modules7.INTERNAL__module.tossCoreEventLog({
738
+ import_native_modules8.INTERNAL__module.tossCoreEventLog({
620
739
  log_name: NAVI_BAR_IMPRESSION_LOG_NAME,
621
740
  log_type: "event",
622
741
  params: {
@@ -628,7 +747,7 @@ function useNavigationBarLogging() {
628
747
  });
629
748
  };
630
749
  const logHomeButtonClick = () => {
631
- import_native_modules7.INTERNAL__module.tossCoreEventLog({
750
+ import_native_modules8.INTERNAL__module.tossCoreEventLog({
632
751
  log_name: HOME_BUTTON_CLICK_LOG_NAME,
633
752
  log_type: "event",
634
753
  params: {
@@ -639,7 +758,7 @@ function useNavigationBarLogging() {
639
758
  });
640
759
  };
641
760
  const logCloseButtonClick = () => {
642
- import_native_modules7.INTERNAL__module.tossCoreEventLog({
761
+ import_native_modules8.INTERNAL__module.tossCoreEventLog({
643
762
  log_name: CLOSE_BUTTON_CLICK_LOG_NAME,
644
763
  log_type: "event",
645
764
  params: {
@@ -650,7 +769,7 @@ function useNavigationBarLogging() {
650
769
  });
651
770
  };
652
771
  const logClosePopupShow = () => {
653
- import_native_modules7.INTERNAL__module.tossCoreEventLog({
772
+ import_native_modules8.INTERNAL__module.tossCoreEventLog({
654
773
  log_name: CLOSE_POPUP_SHOW_LOG_NAME,
655
774
  log_type: "popup",
656
775
  params: {
@@ -660,7 +779,7 @@ function useNavigationBarLogging() {
660
779
  });
661
780
  };
662
781
  const logClosePopupCtaClick = (confirm) => {
663
- import_native_modules7.INTERNAL__module.tossCoreEventLog({
782
+ import_native_modules8.INTERNAL__module.tossCoreEventLog({
664
783
  log_name: CLOSE_POPUP_CTA_CLICK_LOG_NAME,
665
784
  log_type: "event",
666
785
  params: {
@@ -682,12 +801,12 @@ function useNavigationBarLogging() {
682
801
 
683
802
  // src/components/NavigationBar/RNNavigationBar/hooks/useNavigationEvent.ts
684
803
  function useNavigationEvent() {
685
- const backEventContext = (0, import_react_native12.useBackEventContext)();
804
+ const backEventContext = (0, import_react_native14.useBackEventContext)();
686
805
  const logging = useNavigationBarLogging();
687
- const navigation = (0, import_react_native12.useNavigation)();
806
+ const navigation = (0, import_react_native14.useNavigation)();
688
807
  const closeConfirm = useCloseConfirm();
689
808
  const { captureExitLog } = useCaptureExitLog();
690
- return (0, import_react10.useMemo)(() => {
809
+ return (0, import_react14.useMemo)(() => {
691
810
  const close = async () => {
692
811
  const hasConfirmed = await closeConfirm({
693
812
  onEntered: logging.closePopupShow
@@ -695,7 +814,7 @@ function useNavigationEvent() {
695
814
  logging.closePopupCtaClick(hasConfirmed);
696
815
  if (hasConfirmed) {
697
816
  captureExitLog(Date.now());
698
- (0, import_react_native12.closeView)();
817
+ (0, import_react_native14.closeView)();
699
818
  }
700
819
  };
701
820
  return {
@@ -722,21 +841,21 @@ function useNavigationEvent() {
722
841
 
723
842
  // src/core/hooks/useMoreButtonBottomSheet/index.tsx
724
843
  var import_native_modules11 = require("@apps-in-toss/native-modules");
725
- var import_react_native17 = require("@granite-js/react-native");
844
+ var import_react_native18 = require("@granite-js/react-native");
726
845
  var import_tds_react_native8 = require("@toss/tds-react-native");
727
846
  var import_private4 = require("@toss/tds-react-native/private");
728
- var import_react12 = require("react");
847
+ var import_react15 = require("react");
729
848
 
730
849
  // src/core/hooks/useMoreButtonBottomSheet/AppShareListMenu.tsx
731
- var import_native_modules9 = require("@apps-in-toss/native-modules");
732
- var import_react_native14 = require("@granite-js/react-native");
733
- var import_tds_react_native6 = require("@toss/tds-react-native");
850
+ var import_native_modules10 = require("@apps-in-toss/native-modules");
851
+ var import_react_native16 = require("@granite-js/react-native");
852
+ var import_tds_react_native7 = require("@toss/tds-react-native");
734
853
  var import_private3 = require("@toss/tds-react-native/private");
735
- var import_react_native15 = require("react-native");
854
+ var import_react_native17 = require("react-native");
736
855
 
737
856
  // src/core/hooks/useMoreButtonBottomSheet/useMoreButtonBottomSheetLogging.tsx
738
- var import_native_modules8 = require("@apps-in-toss/native-modules");
739
- var import_react_native13 = require("@granite-js/react-native");
857
+ var import_native_modules9 = require("@apps-in-toss/native-modules");
858
+ var import_react_native15 = require("@granite-js/react-native");
740
859
  var BOTTOM_SHEET_SCHEMA_ID = 1596825;
741
860
  var BOTTOM_SHEET_LOG_NAME = "appsintoss_app_visit__common_module::bottomsheet__more";
742
861
  var BOTTOM_SHEET_OPEN_SCHEMA_ID = 1596829;
@@ -749,10 +868,10 @@ function useMoreButtonBottomSheetLogging() {
749
868
  const referrer = useReferrer();
750
869
  const baseParams = {
751
870
  referrer,
752
- app_name: import_react_native13.Granite.appName
871
+ app_name: import_react_native15.Granite.appName
753
872
  };
754
873
  const logBottomSheetShow = () => {
755
- import_native_modules8.INTERNAL__module.tossCoreEventLog({
874
+ import_native_modules9.INTERNAL__module.tossCoreEventLog({
756
875
  log_name: BOTTOM_SHEET_LOG_NAME,
757
876
  log_type: "popup",
758
877
  params: {
@@ -762,7 +881,7 @@ function useMoreButtonBottomSheetLogging() {
762
881
  });
763
882
  };
764
883
  const logBottomSheetOpen = () => {
765
- import_native_modules8.INTERNAL__module.tossCoreEventLog({
884
+ import_native_modules9.INTERNAL__module.tossCoreEventLog({
766
885
  log_name: BOTTOM_SHEET_OPEN_LOG_NAME,
767
886
  log_type: "event",
768
887
  params: {
@@ -773,7 +892,7 @@ function useMoreButtonBottomSheetLogging() {
773
892
  });
774
893
  };
775
894
  const logBottomSheetCloseClick = () => {
776
- import_native_modules8.INTERNAL__module.tossCoreEventLog({
895
+ import_native_modules9.INTERNAL__module.tossCoreEventLog({
777
896
  log_name: BOTTOM_SHEET_CLOSE_CLICK_LOG_NAME,
778
897
  log_type: "event",
779
898
  params: {
@@ -784,7 +903,7 @@ function useMoreButtonBottomSheetLogging() {
784
903
  });
785
904
  };
786
905
  const logBottomSheetMenuClick = ({ title }) => {
787
- import_native_modules8.INTERNAL__module.tossCoreEventLog({
906
+ import_native_modules9.INTERNAL__module.tossCoreEventLog({
788
907
  log_name: BOTTOM_SHEET_MENU_CLICK_LOG_NAME,
789
908
  log_type: "event",
790
909
  params: {
@@ -823,17 +942,17 @@ function AppShareListMenu() {
823
942
  const globals = getAppsInTossGlobals();
824
943
  const adaptive = (0, import_private3.useAdaptive)();
825
944
  const logging = useMoreButtonBottomSheetLogging();
826
- const initialScheme = (0, import_react_native14.getSchemeUri)();
827
- const isSandbox = (0, import_native_modules9.getOperationalEnvironment)() === "sandbox";
828
- const { openConfirm } = (0, import_tds_react_native6.useDialog)();
945
+ const initialScheme = (0, import_react_native16.getSchemeUri)();
946
+ const isSandbox = (0, import_native_modules10.getOperationalEnvironment)() === "sandbox";
947
+ const { openConfirm } = (0, import_tds_react_native7.useDialog)();
829
948
  const schemeForShare = addParamsToUrl(initialScheme, {
830
949
  referrer: SHARE_SCHEME_REFERRER
831
950
  });
832
951
  return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
833
- import_tds_react_native6.ListRow,
952
+ import_tds_react_native7.ListRow,
834
953
  {
835
954
  left: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
836
- import_tds_react_native6.ListRow.Icon,
955
+ import_tds_react_native7.ListRow.Icon,
837
956
  {
838
957
  color: globals.brandPrimaryColor,
839
958
  source: { uri: APP_SHARE_MENU_INFO.contactIconUrl },
@@ -841,7 +960,7 @@ function AppShareListMenu() {
841
960
  }
842
961
  ),
843
962
  contents: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
844
- import_tds_react_native6.ListRow.Texts,
963
+ import_tds_react_native7.ListRow.Texts,
845
964
  {
846
965
  type: "1RowTypeA",
847
966
  top: APP_SHARE_MENU_INFO.contactItemName,
@@ -860,7 +979,7 @@ function AppShareListMenu() {
860
979
  return;
861
980
  }
862
981
  logging.menuClick({ title: APP_SHARE_MENU_INFO.contactItemName });
863
- import_react_native15.NativeModules.AppsInTossModule.shareWithScheme({
982
+ import_react_native17.NativeModules.AppsInTossModule.shareWithScheme({
864
983
  params: {
865
984
  schemeURL: schemeForShare
866
985
  }
@@ -870,90 +989,6 @@ function AppShareListMenu() {
870
989
  );
871
990
  }
872
991
 
873
- // src/hooks/useAppUpdateDialog.tsx
874
- var import_native_modules10 = require("@apps-in-toss/native-modules");
875
- var import_react_native16 = require("@granite-js/react-native");
876
- var import_tds_react_native7 = require("@toss/tds-react-native");
877
- var import_react11 = require("react");
878
- function useAppUpdateDialog() {
879
- const { openConfirm } = (0, import_tds_react_native7.useDialog)();
880
- const logging = useAppUpdateDialogLogging();
881
- const openAppUpdateDialog = (0, import_react11.useCallback)(
882
- async ({
883
- title,
884
- description,
885
- leftButton = "\uB2EB\uAE30",
886
- rightButton = "\uC5C5\uB370\uC774\uD2B8\uD558\uAE30"
887
- }) => {
888
- logging.show();
889
- const isConfirmed = await openConfirm({
890
- title,
891
- description,
892
- leftButton,
893
- rightButton,
894
- closeOnDimmerClick: true
895
- });
896
- if (!isConfirmed) {
897
- logging.close();
898
- return;
899
- }
900
- logging.update();
901
- const STORE_SCHEME = getMarketLink();
902
- (0, import_react_native16.openURL)(`supertoss://web?url=${STORE_SCHEME}&external=browser`);
903
- },
904
- [logging, openConfirm]
905
- );
906
- return {
907
- open: openAppUpdateDialog
908
- };
909
- }
910
- var UPDATE_DIALOG_SCHEMA_ID = 1634992;
911
- var UPDATE_DIALOG_LOG_NAME = "appsintoss_app_visit__common_module::bottomsheet__app_update";
912
- var UPDATE_DIALOG_CTA_CLICK_SCHEMA_ID = 1634996;
913
- var UPDATE_DIALOG_CTA_CLICK_LOG_NAME = "appsintoss_app_visit__common_module::bottomsheet__app_update::click__cta";
914
- function useAppUpdateDialogLogging() {
915
- const referrer = useReferrer();
916
- const baseParams = {
917
- referrer,
918
- app_name: import_react_native16.Granite.appName
919
- };
920
- const logUpdateClick = () => {
921
- import_native_modules10.INTERNAL__module.tossCoreEventLog({
922
- log_name: UPDATE_DIALOG_CTA_CLICK_LOG_NAME,
923
- log_type: "event",
924
- params: {
925
- ...baseParams,
926
- schema_id: UPDATE_DIALOG_CTA_CLICK_SCHEMA_ID,
927
- event_type: "click",
928
- button_type: "update"
929
- }
930
- });
931
- };
932
- const logCloseClick = () => {
933
- import_native_modules10.INTERNAL__module.tossCoreEventLog({
934
- log_name: UPDATE_DIALOG_CTA_CLICK_LOG_NAME,
935
- log_type: "event",
936
- params: {
937
- ...baseParams,
938
- schema_id: UPDATE_DIALOG_CTA_CLICK_SCHEMA_ID,
939
- event_type: "click",
940
- button_type: "close"
941
- }
942
- });
943
- };
944
- const logDialogShow = () => {
945
- import_native_modules10.INTERNAL__module.tossCoreEventLog({
946
- log_name: UPDATE_DIALOG_LOG_NAME,
947
- log_type: "popup",
948
- params: {
949
- ...baseParams,
950
- schema_id: UPDATE_DIALOG_SCHEMA_ID
951
- }
952
- });
953
- };
954
- return { update: logUpdateClick, close: logCloseClick, show: logDialogShow };
955
- }
956
-
957
992
  // src/core/utils/ensureValue.ts
958
993
  function ensureValue(value, name) {
959
994
  if (value === void 0) {
@@ -978,14 +1013,14 @@ var MIN_VERSION = {
978
1013
  function useMoreButtonBottomSheet() {
979
1014
  const globals = getAppsInTossGlobals();
980
1015
  const adaptive = (0, import_private4.useAdaptive)();
981
- const [itemList, setItemList] = (0, import_react12.useState)([]);
1016
+ const [itemList, setItemList] = (0, import_react15.useState)([]);
982
1017
  const appUpdateDialog = useAppUpdateDialog();
983
1018
  const logging = useMoreButtonBottomSheetLogging();
984
1019
  const overlay = (0, import_private4.useOverlay)();
985
1020
  const title = ensureValue(globals.brandDisplayName, "displayName");
986
1021
  const isBottomSheetSupported = (0, import_native_modules11.isMinVersionSupported)(MIN_VERSION.BOTTOM_SHEET);
987
1022
  const isShareListMenuSupported = (0, import_native_modules11.isMinVersionSupported)(MIN_VERSION.SHARE_LIST_MENU);
988
- (0, import_react12.useEffect)(() => {
1023
+ (0, import_react15.useEffect)(() => {
989
1024
  if (!isBottomSheetSupported) {
990
1025
  return;
991
1026
  }
@@ -1060,7 +1095,7 @@ function useMoreButtonBottomSheet() {
1060
1095
  verticalPadding: "extraSmall",
1061
1096
  onPress: () => {
1062
1097
  logging.menuClick({ title: item.contactItemName });
1063
- (0, import_react_native17.openURL)(item.contactUri);
1098
+ (0, import_react_native18.openURL)(item.contactUri);
1064
1099
  }
1065
1100
  },
1066
1101
  item.contactItemName
@@ -1076,7 +1111,7 @@ function useMoreButtonBottomSheet() {
1076
1111
  }
1077
1112
  function BottomSheetImpressionArea({ children }) {
1078
1113
  const logging = useMoreButtonBottomSheetLogging();
1079
- (0, import_react12.useEffect)(() => {
1114
+ (0, import_react15.useEffect)(() => {
1080
1115
  logging.show();
1081
1116
  }, [logging]);
1082
1117
  return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(import_jsx_runtime5.Fragment, { children });
@@ -1095,15 +1130,15 @@ function safeParseNavigationBar(navigationBar) {
1095
1130
  }
1096
1131
 
1097
1132
  // src/components/NavigationBar/common/NavigationBarImpressionArea.tsx
1098
- var import_react13 = require("react");
1133
+ var import_react16 = require("react");
1099
1134
  var import_jsx_runtime6 = require("react/jsx-runtime");
1100
1135
  function NavigationBarImpressionArea({
1101
1136
  children,
1102
1137
  withHomeButton
1103
1138
  }) {
1104
- const hasLogged = (0, import_react13.useRef)(false);
1139
+ const hasLogged = (0, import_react16.useRef)(false);
1105
1140
  const logging = useNavigationBarLogging();
1106
- (0, import_react13.useEffect)(() => {
1141
+ (0, import_react16.useEffect)(() => {
1107
1142
  if (hasLogged.current === false) {
1108
1143
  logging.navBarImpression({ home_icon_yn: withHomeButton ? "Y" : "N" });
1109
1144
  hasLogged.current = true;
@@ -1142,7 +1177,7 @@ function DefaultNavigationBar() {
1142
1177
  // src/components/NavigationBar/RNNavigationBar/Game.tsx
1143
1178
  var import_tds_react_native9 = require("@toss/tds-react-native");
1144
1179
  var import_private6 = require("@toss/tds-react-native/private");
1145
- var import_react_native18 = require("react-native");
1180
+ var import_react_native19 = require("react-native");
1146
1181
  var import_jsx_runtime8 = require("react/jsx-runtime");
1147
1182
  function GameNavigationBar() {
1148
1183
  const safeAreaTop = (0, import_private6.useSafeAreaTop)();
@@ -1155,12 +1190,12 @@ function GameNavigationBar() {
1155
1190
  return /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(import_jsx_runtime8.Fragment, { children: [
1156
1191
  /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_tds_react_native9.PageNavbar, { preference: { type: "none" } }),
1157
1192
  /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
1158
- import_react_native18.View,
1193
+ import_react_native19.View,
1159
1194
  {
1160
1195
  style: {
1161
1196
  width: "100%",
1162
1197
  // TODO: UI관련 스타일 설정은 TDS로 이관
1163
- height: import_react_native18.Platform.OS === "ios" ? 44 : 54,
1198
+ height: import_react_native19.Platform.OS === "ios" ? 44 : 54,
1164
1199
  flexDirection: "row",
1165
1200
  alignItems: "center",
1166
1201
  justifyContent: "flex-end",
@@ -1209,9 +1244,9 @@ function RNAppContainer({ children }) {
1209
1244
  }
1210
1245
  }
1211
1246
  function GameAppContainer({ children }) {
1212
- const [isEntryMessageExited, setIsEntryMessageExited] = (0, import_react14.useState)(false);
1213
- (0, import_react14.useEffect)(() => {
1214
- if (import_react_native19.Platform.OS === "ios") {
1247
+ const [isEntryMessageExited, setIsEntryMessageExited] = (0, import_react17.useState)(false);
1248
+ (0, import_react17.useEffect)(() => {
1249
+ if (import_react_native20.Platform.OS === "ios") {
1215
1250
  (0, import_native_modules12.setIosSwipeGestureEnabled)({ isEnabled: false });
1216
1251
  return () => {
1217
1252
  (0, import_native_modules12.setIosSwipeGestureEnabled)({ isEnabled: true });
@@ -1219,7 +1254,7 @@ function GameAppContainer({ children }) {
1219
1254
  }
1220
1255
  return;
1221
1256
  }, []);
1222
- (0, import_react14.useEffect)(() => {
1257
+ (0, import_react17.useEffect)(() => {
1223
1258
  import_native_modules12.appsInTossEvent.addEventListener("entryMessageExited", {
1224
1259
  onEvent: () => {
1225
1260
  setIsEntryMessageExited(true);
@@ -1228,7 +1263,7 @@ function GameAppContainer({ children }) {
1228
1263
  }, []);
1229
1264
  return /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(import_jsx_runtime9.Fragment, { children: [
1230
1265
  /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(RNNavigationBar.Game, {}),
1231
- (0, bridge_entry_exports.getOperationalEnvironment)() === "toss" ? /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(GameProfile, { isReadyForProfileUI: isEntryMessageExited, children }) : children
1266
+ (0, bridge_entry_exports.getOperationalEnvironment)() === "toss" ? /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(GameInitializer, { isReadyForProfileUI: isEntryMessageExited, children }) : children
1232
1267
  ] });
1233
1268
  }
1234
1269
  function GeneralAppContainer({ children }) {
@@ -1264,13 +1299,13 @@ function TDSContainer({ children }) {
1264
1299
  }
1265
1300
  function registerApp(container, { context, analytics }) {
1266
1301
  const appName = getAppName();
1267
- const isRegistered = import_react_native21.AppRegistry.getAppKeys().includes(appName);
1302
+ const isRegistered = import_react_native22.AppRegistry.getAppKeys().includes(appName);
1268
1303
  if (!isRegistered) {
1269
1304
  import_analytics.Analytics.init({
1270
1305
  logger: (params) => void (0, import_native_modules13.eventLog)(params),
1271
1306
  debug: analytics?.debug ?? __DEV__
1272
1307
  });
1273
- const App = import_react_native20.Granite.registerApp(AppsInTossContainer.bind(null, container), {
1308
+ const App = import_react_native21.Granite.registerApp(AppsInTossContainer.bind(null, container), {
1274
1309
  appName,
1275
1310
  context,
1276
1311
  setIosSwipeGestureEnabled: import_native_modules13.setIosSwipeGestureEnabled,
@@ -1308,25 +1343,25 @@ var import_native_modules18 = require("@apps-in-toss/native-modules");
1308
1343
  var appsInTossAsyncBridges = __toESM(require("@apps-in-toss/native-modules/async-bridges"), 1);
1309
1344
  var appsInTossConstantBridges = __toESM(require("@apps-in-toss/native-modules/constant-bridges"), 1);
1310
1345
  var appsInTossEventBridges = __toESM(require("@apps-in-toss/native-modules/event-bridges"), 1);
1311
- var import_react_native31 = require("@granite-js/react-native");
1346
+ var import_react_native32 = require("@granite-js/react-native");
1312
1347
  var import_tds_react_native14 = require("@toss/tds-react-native");
1313
1348
  var import_private9 = require("@toss/tds-react-native/private");
1314
- var import_react24 = require("react");
1315
- var import_react_native32 = require("react-native");
1349
+ var import_react27 = require("react");
1350
+ var import_react_native33 = require("react-native");
1316
1351
 
1317
1352
  // src/components/GameWebView.tsx
1318
1353
  var import_native_modules14 = require("@apps-in-toss/native-modules");
1319
1354
  var import_react_native_webview = require("@granite-js/native/react-native-webview");
1320
- var import_react16 = require("react");
1321
- var import_react_native24 = require("react-native");
1355
+ var import_react19 = require("react");
1356
+ var import_react_native25 = require("react-native");
1322
1357
 
1323
1358
  // src/components/NavigationBar/GameWebviewNavigationBar.tsx
1324
- var import_react_native22 = require("@granite-js/react-native");
1359
+ var import_react_native23 = require("@granite-js/react-native");
1325
1360
  var import_tds_react_native11 = require("@toss/tds-react-native");
1326
1361
  var import_private7 = require("@toss/tds-react-native/private");
1327
1362
  var import_es_hangul3 = require("es-hangul");
1328
- var import_react15 = require("react");
1329
- var import_react_native23 = require("react-native");
1363
+ var import_react18 = require("react");
1364
+ var import_react_native24 = require("react-native");
1330
1365
  var import_jsx_runtime11 = require("react/jsx-runtime");
1331
1366
  function GameWebviewNavigationBar() {
1332
1367
  const safeAreaTop = (0, import_private7.useSafeAreaTop)();
@@ -1337,7 +1372,7 @@ function GameWebviewNavigationBar() {
1337
1372
  const { open: openMoreButtonBottomSheet } = useMoreButtonBottomSheet();
1338
1373
  const parsedNavigationBar = global2.navigationBar != null ? safeParseNavigationBar(global2.navigationBar) : null;
1339
1374
  const initialAccessoryButton = parsedNavigationBar?.initialAccessoryButton;
1340
- const handleGameWebviewClose = (0, import_react15.useCallback)(async () => {
1375
+ const handleGameWebviewClose = (0, import_react18.useCallback)(async () => {
1341
1376
  logging.closeButtonClick();
1342
1377
  const isConfirmed = await openConfirm({
1343
1378
  title: `${(0, import_es_hangul3.josa)(global2.brandDisplayName, "\uC744/\uB97C")} \uC885\uB8CC\uD560\uAE4C\uC694?`,
@@ -1349,18 +1384,18 @@ function GameWebviewNavigationBar() {
1349
1384
  logging.closePopupCtaClick(isConfirmed);
1350
1385
  if (isConfirmed) {
1351
1386
  captureExitLog(Date.now());
1352
- (0, import_react_native22.closeView)();
1387
+ (0, import_react_native23.closeView)();
1353
1388
  }
1354
1389
  }, [captureExitLog, global2.brandDisplayName, logging, openConfirm]);
1355
1390
  return /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)(import_jsx_runtime11.Fragment, { children: [
1356
1391
  /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(import_tds_react_native11.PageNavbar, { preference: { type: "none" } }),
1357
1392
  /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
1358
- import_react_native23.View,
1393
+ import_react_native24.View,
1359
1394
  {
1360
1395
  style: {
1361
1396
  width: "100%",
1362
1397
  // TODO: UI관련 스타일 설정은 TDS로 이관
1363
- height: import_react_native23.Platform.OS === "ios" ? 44 : 54,
1398
+ height: import_react_native24.Platform.OS === "ios" ? 44 : 54,
1364
1399
  flexDirection: "row",
1365
1400
  alignItems: "center",
1366
1401
  justifyContent: "flex-end",
@@ -1388,10 +1423,10 @@ function GameWebviewNavigationBar() {
1388
1423
 
1389
1424
  // src/components/GameWebView.tsx
1390
1425
  var import_jsx_runtime12 = require("react/jsx-runtime");
1391
- var GameWebView = (0, import_react16.forwardRef)(function GameWebView2(props, ref) {
1392
- const [isEntryMessageExited, setIsEntryMessageExited] = (0, import_react16.useState)(false);
1393
- (0, import_react16.useEffect)(() => {
1394
- if (import_react_native24.Platform.OS === "ios") {
1426
+ var GameWebView = (0, import_react19.forwardRef)(function GameWebView2(props, ref) {
1427
+ const [isEntryMessageExited, setIsEntryMessageExited] = (0, import_react19.useState)(false);
1428
+ (0, import_react19.useEffect)(() => {
1429
+ if (import_react_native25.Platform.OS === "ios") {
1395
1430
  (0, import_native_modules14.setIosSwipeGestureEnabled)({ isEnabled: false });
1396
1431
  return () => {
1397
1432
  (0, import_native_modules14.setIosSwipeGestureEnabled)({ isEnabled: true });
@@ -1399,7 +1434,7 @@ var GameWebView = (0, import_react16.forwardRef)(function GameWebView2(props, re
1399
1434
  }
1400
1435
  return;
1401
1436
  }, []);
1402
- (0, import_react16.useEffect)(() => {
1437
+ (0, import_react19.useEffect)(() => {
1403
1438
  import_native_modules14.appsInTossEvent.addEventListener("entryMessageExited", {
1404
1439
  onEvent: () => {
1405
1440
  setIsEntryMessageExited(true);
@@ -1408,20 +1443,20 @@ var GameWebView = (0, import_react16.forwardRef)(function GameWebView2(props, re
1408
1443
  }, []);
1409
1444
  return /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(import_jsx_runtime12.Fragment, { children: [
1410
1445
  /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(GameWebviewNavigationBar, {}),
1411
- (0, import_native_modules14.getOperationalEnvironment)() === "toss" ? /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(GameProfile, { isReadyForProfileUI: isEntryMessageExited, children: /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_react_native_webview.WebView, { ref, ...props }) }) : /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_react_native_webview.WebView, { ref, ...props })
1446
+ (0, import_native_modules14.getOperationalEnvironment)() === "toss" ? /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(GameInitializer, { isReadyForProfileUI: isEntryMessageExited, children: /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_react_native_webview.WebView, { ref, ...props }) }) : /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_react_native_webview.WebView, { ref, ...props })
1412
1447
  ] });
1413
1448
  });
1414
1449
 
1415
1450
  // src/components/PartnerWebView.tsx
1416
1451
  var import_react_native_webview2 = require("@granite-js/native/react-native-webview");
1417
- var import_react18 = require("react");
1452
+ var import_react21 = require("react");
1418
1453
 
1419
1454
  // src/components/NavigationBar/PartnerWebviewNavigationBar.tsx
1420
- var import_react_native25 = require("@granite-js/react-native");
1455
+ var import_react_native26 = require("@granite-js/react-native");
1421
1456
  var import_tds_react_native12 = require("@toss/tds-react-native");
1422
1457
  var import_private8 = require("@toss/tds-react-native/private");
1423
1458
  var import_es_hangul4 = require("es-hangul");
1424
- var import_react17 = require("react");
1459
+ var import_react20 = require("react");
1425
1460
  var import_jsx_runtime13 = require("react/jsx-runtime");
1426
1461
  function PartnerWebviewNavigationBar({ onBackButtonClick, onHomeButtonClick }) {
1427
1462
  const globals = getAppsInTossGlobals();
@@ -1433,7 +1468,7 @@ function PartnerWebviewNavigationBar({ onBackButtonClick, onHomeButtonClick }) {
1433
1468
  const withHomeButton = parsedNavigationBar?.withHomeButton ?? false;
1434
1469
  const withBackButton = parsedNavigationBar?.withBackButton ?? true;
1435
1470
  const initialAccessoryButton = parsedNavigationBar?.initialAccessoryButton;
1436
- const handleClose = (0, import_react17.useCallback)(async () => {
1471
+ const handleClose = (0, import_react20.useCallback)(async () => {
1437
1472
  logging.closeButtonClick();
1438
1473
  const isConfirmed = await openConfirm({
1439
1474
  title: `${(0, import_es_hangul4.josa)(globals.brandDisplayName, "\uC744/\uB97C")} \uC885\uB8CC\uD560\uAE4C\uC694?`,
@@ -1445,7 +1480,7 @@ function PartnerWebviewNavigationBar({ onBackButtonClick, onHomeButtonClick }) {
1445
1480
  logging.closePopupCtaClick(isConfirmed);
1446
1481
  if (isConfirmed) {
1447
1482
  captureExitLog(Date.now());
1448
- (0, import_react_native25.closeView)();
1483
+ (0, import_react_native26.closeView)();
1449
1484
  }
1450
1485
  }, [captureExitLog, globals.brandDisplayName, logging, openConfirm]);
1451
1486
  return /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(NavigationBarImpressionArea, { withHomeButton, children: /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
@@ -1466,7 +1501,7 @@ function PartnerWebviewNavigationBar({ onBackButtonClick, onHomeButtonClick }) {
1466
1501
 
1467
1502
  // src/components/PartnerWebView.tsx
1468
1503
  var import_jsx_runtime14 = require("react/jsx-runtime");
1469
- var PartnerWebView = (0, import_react18.forwardRef)(function PartnerWebViewScreen({ onBackButtonClick, onHomeButtonClick, ...webViewProps }, ref) {
1504
+ var PartnerWebView = (0, import_react21.forwardRef)(function PartnerWebViewScreen({ onBackButtonClick, onHomeButtonClick, ...webViewProps }, ref) {
1470
1505
  return /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(import_jsx_runtime14.Fragment, { children: [
1471
1506
  /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(PartnerWebviewNavigationBar, { onBackButtonClick, onHomeButtonClick }),
1472
1507
  /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_react_native_webview2.WebView, { ref, ...webViewProps, style: { flex: 1 } })
@@ -1474,7 +1509,7 @@ var PartnerWebView = (0, import_react18.forwardRef)(function PartnerWebViewScree
1474
1509
  });
1475
1510
 
1476
1511
  // src/bridge-handler/useBridgeHandler.tsx
1477
- var import_react19 = require("react");
1512
+ var import_react22 = require("react");
1478
1513
  function serializeError(error) {
1479
1514
  return JSON.stringify(error, (_, value) => {
1480
1515
  if (value instanceof Error) {
@@ -1527,8 +1562,8 @@ function useBridgeHandler({
1527
1562
  eventListenerMap,
1528
1563
  injectedJavaScript: originalInjectedJavaScript
1529
1564
  }) {
1530
- const ref = (0, import_react19.useRef)(null);
1531
- const injectedJavaScript = (0, import_react19.useMemo)(
1565
+ const ref = (0, import_react22.useRef)(null);
1566
+ const injectedJavaScript = (0, import_react22.useMemo)(
1532
1567
  () => [
1533
1568
  `window.__CONSTANT_HANDLER_MAP = ${JSON.stringify(
1534
1569
  Object.entries(constantHandlerMap).reduce(
@@ -1555,7 +1590,7 @@ function useBridgeHandler({
1555
1590
  window.__GRANITE_NATIVE_EMITTER.emit('${functionName}/onError/${eventId}', ${serializedError});
1556
1591
  `);
1557
1592
  };
1558
- const $onMessage = (0, import_react19.useCallback)(
1593
+ const $onMessage = (0, import_react22.useCallback)(
1559
1594
  async (e) => {
1560
1595
  onMessage?.(e);
1561
1596
  const data = JSON.parse(e.nativeEvent.data);
@@ -1606,13 +1641,13 @@ function useBridgeHandler({
1606
1641
  }
1607
1642
 
1608
1643
  // src/core/hooks/useWebBackHandler.tsx
1609
- var import_react_native26 = require("@granite-js/react-native");
1644
+ var import_react_native27 = require("@granite-js/react-native");
1610
1645
  var import_tds_react_native13 = require("@toss/tds-react-native");
1611
1646
  var import_es_hangul5 = require("es-hangul");
1612
- var import_react21 = require("react");
1647
+ var import_react24 = require("react");
1613
1648
 
1614
1649
  // src/hooks/useWebviewHistoryStack.tsx
1615
- var import_react20 = require("react");
1650
+ var import_react23 = require("react");
1616
1651
  var INITIAL_STATE = { stack: [], index: -1 };
1617
1652
  function reducer(state, action) {
1618
1653
  switch (action.type) {
@@ -1643,11 +1678,11 @@ function reducer(state, action) {
1643
1678
  }
1644
1679
  }
1645
1680
  function useWebViewHistory() {
1646
- const [state, dispatch] = (0, import_react20.useReducer)(reducer, INITIAL_STATE);
1647
- const onNavigationStateChange = (0, import_react20.useCallback)(({ url, canGoForward: canGoForward2 }) => {
1681
+ const [state, dispatch] = (0, import_react23.useReducer)(reducer, INITIAL_STATE);
1682
+ const onNavigationStateChange = (0, import_react23.useCallback)(({ url, canGoForward: canGoForward2 }) => {
1648
1683
  dispatch({ type: "NAVIGATION_CHANGE", url, canGoForward: canGoForward2 });
1649
1684
  }, []);
1650
- const { canGoBack, canGoForward } = (0, import_react20.useMemo)(() => {
1685
+ const { canGoBack, canGoForward } = (0, import_react23.useMemo)(() => {
1651
1686
  const canBack = state.index > 0;
1652
1687
  const canFwd = state.index >= 0 && state.index < state.stack.length - 1;
1653
1688
  return { canGoBack: canBack, canGoForward: canFwd };
@@ -1676,23 +1711,23 @@ function useWebBackHandler(webViewRef) {
1676
1711
  hasBackEvent: hasWebBackEvent,
1677
1712
  addEventListener: addWebBackEventListener,
1678
1713
  removeEventListener: removeWebBackEventListener
1679
- } = (0, import_react_native26.useBackEventState)();
1714
+ } = (0, import_react_native27.useBackEventState)();
1680
1715
  const logging = useNavigationBarLogging();
1681
1716
  const { openConfirm } = (0, import_tds_react_native13.useDialog)();
1682
1717
  const global2 = getAppsInTossGlobals();
1683
- const addEventListener = (0, import_react21.useCallback)(
1718
+ const addEventListener = (0, import_react24.useCallback)(
1684
1719
  (handler) => {
1685
1720
  addWebBackEventListener(handler);
1686
1721
  },
1687
1722
  [addWebBackEventListener]
1688
1723
  );
1689
- const removeEventListener = (0, import_react21.useCallback)(
1724
+ const removeEventListener = (0, import_react24.useCallback)(
1690
1725
  (handler) => {
1691
1726
  removeWebBackEventListener(handler);
1692
1727
  },
1693
1728
  [removeWebBackEventListener]
1694
1729
  );
1695
- const handleWebBack = (0, import_react21.useCallback)(async () => {
1730
+ const handleWebBack = (0, import_react24.useCallback)(async () => {
1696
1731
  if (hasWebBackEvent) {
1697
1732
  for (const handler of webBackHandlersRef) {
1698
1733
  handler();
@@ -1712,7 +1747,7 @@ function useWebBackHandler(webViewRef) {
1712
1747
  logging.closePopupCtaClick(isConfirmed);
1713
1748
  if (isConfirmed) {
1714
1749
  captureExitLog(Date.now());
1715
- (0, import_react_native26.closeView)();
1750
+ (0, import_react_native27.closeView)();
1716
1751
  }
1717
1752
  }
1718
1753
  }, [
@@ -1725,7 +1760,7 @@ function useWebBackHandler(webViewRef) {
1725
1760
  openConfirm,
1726
1761
  webViewRef
1727
1762
  ]);
1728
- const handleWebHome = (0, import_react21.useCallback)(() => {
1763
+ const handleWebHome = (0, import_react24.useCallback)(() => {
1729
1764
  logging.homeButtonClick();
1730
1765
  if (hasWebBackEvent) {
1731
1766
  for (const handler of webBackHandlersRef) {
@@ -1735,7 +1770,7 @@ function useWebBackHandler(webViewRef) {
1735
1770
  }
1736
1771
  webViewRef.current?.injectJavaScript(HISTORY_HOME_SCRIPT);
1737
1772
  }, [hasWebBackEvent, webBackHandlersRef, logging, webViewRef]);
1738
- return (0, import_react21.useMemo)(
1773
+ return (0, import_react24.useMemo)(
1739
1774
  () => ({ addEventListener, removeEventListener, handleWebBack, handleWebHome, onNavigationStateChange }),
1740
1775
  [addEventListener, removeEventListener, handleWebBack, handleWebHome, onNavigationStateChange]
1741
1776
  );
@@ -1756,7 +1791,7 @@ function mergeRefs(...refs) {
1756
1791
 
1757
1792
  // src/hooks/useCreateUserAgent.ts
1758
1793
  var import_native_modules15 = require("@apps-in-toss/native-modules");
1759
- var import_react_native27 = require("react-native");
1794
+ var import_react_native28 = require("react-native");
1760
1795
  var FontA11yCategory = {
1761
1796
  Large: "Large",
1762
1797
  xLarge: "xLarge",
@@ -1891,7 +1926,7 @@ function useCreateUserAgent({
1891
1926
  }) {
1892
1927
  const platform = (0, import_native_modules15.getPlatformOS)();
1893
1928
  const appVersion = (0, import_native_modules15.getTossAppVersion)();
1894
- const { fontScale } = (0, import_react_native27.useWindowDimensions)();
1929
+ const { fontScale } = (0, import_react_native28.useWindowDimensions)();
1895
1930
  const platformString = platform === "ios" ? "iPhone" : "Android";
1896
1931
  const fontA11y = mapFontScaleToCategory(fontScale, platform);
1897
1932
  const normalizedFontScale = convertToAndroidStyleScale(fontScale, platform);
@@ -1912,12 +1947,12 @@ function useCreateUserAgent({
1912
1947
 
1913
1948
  // src/hooks/useGeolocation.ts
1914
1949
  var import_native_modules16 = require("@apps-in-toss/native-modules");
1915
- var import_react_native28 = require("@granite-js/react-native");
1916
- var import_react22 = require("react");
1950
+ var import_react_native29 = require("@granite-js/react-native");
1951
+ var import_react25 = require("react");
1917
1952
  function useGeolocation({ accuracy, distanceInterval, timeInterval }) {
1918
- const isVisible = (0, import_react_native28.useVisibility)();
1919
- const [location, setLocation] = (0, import_react22.useState)(null);
1920
- (0, import_react22.useEffect)(() => {
1953
+ const isVisible = (0, import_react_native29.useVisibility)();
1954
+ const [location, setLocation] = (0, import_react25.useState)(null);
1955
+ (0, import_react25.useEffect)(() => {
1921
1956
  if (!isVisible) {
1922
1957
  return;
1923
1958
  }
@@ -1935,12 +1970,12 @@ function useGeolocation({ accuracy, distanceInterval, timeInterval }) {
1935
1970
  }
1936
1971
 
1937
1972
  // src/hooks/useWaitForReturnNavigator.tsx
1938
- var import_react_native29 = require("@granite-js/react-native");
1939
- var import_react23 = require("react");
1973
+ var import_react_native30 = require("@granite-js/react-native");
1974
+ var import_react26 = require("react");
1940
1975
  function useWaitForReturnNavigator() {
1941
- const callbacks = (0, import_react23.useRef)([]).current;
1942
- const navigation = (0, import_react_native29.useNavigation)();
1943
- const startNavigating = (0, import_react23.useCallback)(
1976
+ const callbacks = (0, import_react26.useRef)([]).current;
1977
+ const navigation = (0, import_react_native30.useNavigation)();
1978
+ const startNavigating = (0, import_react26.useCallback)(
1944
1979
  (route, params) => {
1945
1980
  return new Promise((resolve) => {
1946
1981
  callbacks.push(resolve);
@@ -1949,7 +1984,7 @@ function useWaitForReturnNavigator() {
1949
1984
  },
1950
1985
  [callbacks, navigation]
1951
1986
  );
1952
- const handleVisibilityChange = (0, import_react23.useCallback)(
1987
+ const handleVisibilityChange = (0, import_react26.useCallback)(
1953
1988
  (state) => {
1954
1989
  if (state === "visible" && callbacks.length > 0) {
1955
1990
  for (const callback of callbacks) {
@@ -1960,13 +1995,13 @@ function useWaitForReturnNavigator() {
1960
1995
  },
1961
1996
  [callbacks]
1962
1997
  );
1963
- (0, import_react_native29.useVisibilityChange)(handleVisibilityChange);
1998
+ (0, import_react_native30.useVisibilityChange)(handleVisibilityChange);
1964
1999
  return startNavigating;
1965
2000
  }
1966
2001
 
1967
2002
  // src/utils/log.ts
1968
2003
  var import_native_modules17 = require("@apps-in-toss/native-modules");
1969
- var import_react_native30 = require("@granite-js/react-native");
2004
+ var import_react_native31 = require("@granite-js/react-native");
1970
2005
 
1971
2006
  // src/utils/extractDateFromUUIDv7.ts
1972
2007
  var extractDateFromUUIDv7 = (uuid) => {
@@ -1992,7 +2027,7 @@ var getGroupId = (url) => {
1992
2027
  };
1993
2028
  var getReferrer = () => {
1994
2029
  try {
1995
- const referrer = new URL((0, import_react_native30.getSchemeUri)());
2030
+ const referrer = new URL((0, import_react_native31.getSchemeUri)());
1996
2031
  return referrer.searchParams.get("referrer");
1997
2032
  } catch {
1998
2033
  return "";
@@ -2024,7 +2059,7 @@ var WEBVIEW_TYPES = {
2024
2059
  };
2025
2060
  function mergeSchemeQueryParamsInto(url) {
2026
2061
  const baseUrl = new URL(url);
2027
- const schemeUrl = new URL((0, import_react_native31.getSchemeUri)());
2062
+ const schemeUrl = new URL((0, import_react_native32.getSchemeUri)());
2028
2063
  baseUrl.pathname = schemeUrl.pathname;
2029
2064
  for (const [key, value] of schemeUrl.searchParams.entries()) {
2030
2065
  baseUrl.searchParams.set(key, value);
@@ -2048,9 +2083,9 @@ function WebView({ type, local, onMessage, ...props }) {
2048
2083
  if (!TYPES.includes(type)) {
2049
2084
  throw new Error(`Invalid WebView type: '${type}'`);
2050
2085
  }
2051
- const webViewRef = (0, import_react24.useRef)(null);
2086
+ const webViewRef = (0, import_react27.useRef)(null);
2052
2087
  const webBackHandler = useWebBackHandler(webViewRef);
2053
- const uri = (0, import_react24.useMemo)(() => getWebViewUri(local), [local]);
2088
+ const uri = (0, import_react27.useMemo)(() => getWebViewUri(local), [local]);
2054
2089
  const top = (0, import_private9.useSafeAreaTop)();
2055
2090
  const bottom = (0, import_private9.useSafeAreaBottom)();
2056
2091
  const global2 = getAppsInTossGlobals();
@@ -2062,7 +2097,7 @@ function WebView({ type, local, onMessage, ...props }) {
2062
2097
  document.head.appendChild(style);
2063
2098
  })();
2064
2099
  `;
2065
- const [allowsBackForwardNavigationGestures, setAllowsBackForwardNavigationGestures] = (0, import_react24.useState)(
2100
+ const [allowsBackForwardNavigationGestures, setAllowsBackForwardNavigationGestures] = (0, import_react27.useState)(
2066
2101
  props.allowsBackForwardNavigationGestures
2067
2102
  );
2068
2103
  const handler = useBridgeHandler({
@@ -2142,7 +2177,7 @@ function WebView({ type, local, onMessage, ...props }) {
2142
2177
  completeProductGrant: import_native_modules18.IAP.completeProductGrant
2143
2178
  }
2144
2179
  });
2145
- const headerPropForExternalWebView = (0, import_react24.useMemo)(() => {
2180
+ const headerPropForExternalWebView = (0, import_react27.useMemo)(() => {
2146
2181
  const parsedNavigationBar = global2.navigationBar != null ? safeParseNavigationBar(global2.navigationBar) : null;
2147
2182
  const initialAccessoryButton = parsedNavigationBar?.initialAccessoryButton;
2148
2183
  const withBackButton = parsedNavigationBar?.withBackButton ?? true;
@@ -2163,13 +2198,13 @@ function WebView({ type, local, onMessage, ...props }) {
2163
2198
  colorPreference: "light"
2164
2199
  });
2165
2200
  const refs = mergeRefs(handler.ref, webViewRef);
2166
- (0, import_react24.useEffect)(() => {
2201
+ (0, import_react27.useEffect)(() => {
2167
2202
  const callback = () => {
2168
2203
  webBackHandler.handleWebBack();
2169
2204
  return true;
2170
2205
  };
2171
- import_react_native32.BackHandler.addEventListener("hardwareBackPress", callback);
2172
- return () => import_react_native32.BackHandler.removeEventListener("hardwareBackPress", callback);
2206
+ import_react_native33.BackHandler.addEventListener("hardwareBackPress", callback);
2207
+ return () => import_react_native33.BackHandler.removeEventListener("hardwareBackPress", callback);
2173
2208
  }, [webBackHandler]);
2174
2209
  return /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
2175
2210
  BaseWebView,
@@ -2193,14 +2228,14 @@ function WebView({ type, local, onMessage, ...props }) {
2193
2228
  props.onNavigationStateChange?.(event);
2194
2229
  webBackHandler.onNavigationStateChange(event);
2195
2230
  },
2196
- userAgent: import_react_native32.Platform.OS === "ios" ? userAgent : void 0,
2231
+ userAgent: import_react_native33.Platform.OS === "ios" ? userAgent : void 0,
2197
2232
  sharedCookiesEnabled: true,
2198
2233
  webviewDebuggingEnabled: webViewDebuggingEnabled,
2199
2234
  thirdPartyCookiesEnabled: true,
2200
2235
  onMessage: handler.onMessage,
2201
2236
  injectedJavaScript: handler.injectedJavaScript,
2202
2237
  injectedJavaScriptBeforeContentLoaded: handler.injectedJavaScript,
2203
- decelerationRate: import_react_native32.Platform.OS === "ios" ? 1 : void 0,
2238
+ decelerationRate: import_react_native33.Platform.OS === "ios" ? 1 : void 0,
2204
2239
  allowsBackForwardNavigationGestures
2205
2240
  }
2206
2241
  );