@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.js CHANGED
@@ -201,64 +201,128 @@ function useAppsInTossBridge() {
201
201
 
202
202
  // src/components/RNAppContainer.tsx
203
203
  import { appsInTossEvent as appsInTossEvent2, setIosSwipeGestureEnabled } from "@apps-in-toss/native-modules";
204
- import { useEffect as useEffect9, useState as useState3 } from "react";
204
+ import { useEffect as useEffect9, useState as useState4 } from "react";
205
205
  import { Platform as Platform3 } from "react-native";
206
206
 
207
- // src/components/GameProfile.tsx
208
- import { getGameCenterGameProfile as getGameCenterGameProfile2, isMinVersionSupported } from "@apps-in-toss/native-modules";
207
+ // src/components/GameInitializer.tsx
208
+ import { isMinVersionSupported } from "@apps-in-toss/native-modules";
209
+ import { closeView as closeView2 } from "@granite-js/react-native";
209
210
  import { Loader } from "@toss/tds-react-native";
210
- import { useEffect as useEffect5 } from "react";
211
+ import { josa } from "es-hangul";
212
+ import { useEffect as useEffect5, useRef as useRef2 } from "react";
211
213
  import { Pressable, View } from "react-native";
212
214
 
213
215
  // src/constant/game-center.ts
214
216
  var GAME_PROFILE_WEBVIEW_URL = "servicetoss://game-center/profile";
215
- var GAME_CENTER_MIN_VERSION = {
216
- android: "5.221.0",
217
- ios: "5.221.0"
217
+ var GAME_MIN_VERSION = {
218
+ android: "5.232.0",
219
+ ios: "5.232.0"
218
220
  };
219
221
 
220
- // src/hooks/useGameCenterProfile.ts
221
- import { getGameCenterGameProfile } from "@apps-in-toss/native-modules";
222
- import { closeView, openURL as openURL3 } from "@granite-js/react-native";
222
+ // src/hooks/useAppUpdateDialog.tsx
223
+ import { INTERNAL__module as INTERNAL__module3 } from "@apps-in-toss/native-modules";
224
+ import { Granite as Granite3, openURL as openURL2 } from "@granite-js/react-native";
223
225
  import { useDialog } from "@toss/tds-react-native";
224
- import { josa } from "es-hangul";
225
- import { useCallback as useCallback2, useRef as useRef2, useState } from "react";
226
+ import { useCallback as useCallback2 } from "react";
226
227
 
227
- // src/components/GameProfileToast.tsx
228
- import { Asset, Toast } from "@toss/tds-react-native";
229
- import { AdaptiveColorProvider, ColorPreferenceProvider, useOverlay } from "@toss/tds-react-native/private";
230
- import { jsx as jsx2 } from "react/jsx-runtime";
231
- var useGameProfileToast = () => {
232
- const overlay = useOverlay();
233
- const openGameProfileToast = (nickname, profileImageUri) => {
234
- return new Promise((resolve) => {
235
- overlay.open(({ isOpen, close, exit }) => {
236
- return /* @__PURE__ */ jsx2(ColorPreferenceProvider, { colorPreference: "dark", children: /* @__PURE__ */ jsx2(AdaptiveColorProvider, { children: /* @__PURE__ */ jsx2(
237
- Toast,
238
- {
239
- open: isOpen,
240
- onClose: () => {
241
- resolve();
242
- close();
243
- },
244
- onExited: exit,
245
- position: "top",
246
- text: `${nickname}\uB2D8 \uBC18\uAC00\uC6CC\uC694!`,
247
- icon: /* @__PURE__ */ jsx2(
248
- Asset.Image,
249
- {
250
- style: { borderRadius: 64, overflow: "hidden" },
251
- frameShape: Asset.frameShape.CleanW32,
252
- source: { uri: profileImageUri }
253
- }
254
- )
255
- }
256
- ) }) });
228
+ // src/utils/market.ts
229
+ import { Platform } from "react-native";
230
+ var PLAYSTORE_LINK = "https://play.google.com/store/apps/details?id=viva.republica.toss";
231
+ var APPSTORE_LINK = "https://itunes.apple.com/app/id839333328";
232
+ var getMarketLink = () => {
233
+ return Platform.OS === "android" ? PLAYSTORE_LINK : APPSTORE_LINK;
234
+ };
235
+
236
+ // src/hooks/useAppUpdateDialog.tsx
237
+ function useAppUpdateDialog() {
238
+ const { openConfirm } = useDialog();
239
+ const logging = useAppUpdateDialogLogging();
240
+ const openAppUpdateDialog = useCallback2(
241
+ async ({
242
+ title,
243
+ description,
244
+ leftButton = "\uB2EB\uAE30",
245
+ rightButton = "\uC5C5\uB370\uC774\uD2B8\uD558\uAE30",
246
+ onDismiss
247
+ }) => {
248
+ logging.show();
249
+ const isConfirmed = await openConfirm({
250
+ title,
251
+ description,
252
+ leftButton,
253
+ rightButton,
254
+ closeOnDimmerClick: true
257
255
  });
256
+ if (!isConfirmed) {
257
+ logging.close();
258
+ onDismiss?.();
259
+ return;
260
+ }
261
+ logging.update();
262
+ const STORE_SCHEME = getMarketLink();
263
+ openURL2(`supertoss://web?url=${STORE_SCHEME}&external=browser`);
264
+ },
265
+ [logging, openConfirm]
266
+ );
267
+ return {
268
+ open: openAppUpdateDialog
269
+ };
270
+ }
271
+ var UPDATE_DIALOG_SCHEMA_ID = 1634992;
272
+ var UPDATE_DIALOG_LOG_NAME = "appsintoss_app_visit__common_module::bottomsheet__app_update";
273
+ var UPDATE_DIALOG_CTA_CLICK_SCHEMA_ID = 1634996;
274
+ var UPDATE_DIALOG_CTA_CLICK_LOG_NAME = "appsintoss_app_visit__common_module::bottomsheet__app_update::click__cta";
275
+ function useAppUpdateDialogLogging() {
276
+ const referrer = useReferrer();
277
+ const baseParams = {
278
+ referrer,
279
+ app_name: Granite3.appName
280
+ };
281
+ const logUpdateClick = () => {
282
+ INTERNAL__module3.tossCoreEventLog({
283
+ log_name: UPDATE_DIALOG_CTA_CLICK_LOG_NAME,
284
+ log_type: "event",
285
+ params: {
286
+ ...baseParams,
287
+ schema_id: UPDATE_DIALOG_CTA_CLICK_SCHEMA_ID,
288
+ event_type: "click",
289
+ button_type: "update"
290
+ }
258
291
  });
259
292
  };
260
- return { openGameProfileToast };
261
- };
293
+ const logCloseClick = () => {
294
+ INTERNAL__module3.tossCoreEventLog({
295
+ log_name: UPDATE_DIALOG_CTA_CLICK_LOG_NAME,
296
+ log_type: "event",
297
+ params: {
298
+ ...baseParams,
299
+ schema_id: UPDATE_DIALOG_CTA_CLICK_SCHEMA_ID,
300
+ event_type: "click",
301
+ button_type: "close"
302
+ }
303
+ });
304
+ };
305
+ const logDialogShow = () => {
306
+ INTERNAL__module3.tossCoreEventLog({
307
+ log_name: UPDATE_DIALOG_LOG_NAME,
308
+ log_type: "popup",
309
+ params: {
310
+ ...baseParams,
311
+ schema_id: UPDATE_DIALOG_SCHEMA_ID
312
+ }
313
+ });
314
+ };
315
+ return { update: logUpdateClick, close: logCloseClick, show: logDialogShow };
316
+ }
317
+
318
+ // src/hooks/useGameCenterProfile.ts
319
+ import { getGameCenterGameProfile } from "@apps-in-toss/native-modules";
320
+ import { useCallback as useCallback6, useState as useState2 } from "react";
321
+
322
+ // src/hooks/useErrorAlert.ts
323
+ import { closeView } from "@granite-js/react-native";
324
+ import { useDialog as useDialog2 } from "@toss/tds-react-native";
325
+ import { useCallback as useCallback3 } from "react";
262
326
 
263
327
  // src/utils/error.ts
264
328
  var DEFAULT_ERROR = {
@@ -266,16 +330,24 @@ var DEFAULT_ERROR = {
266
330
  description: "\uBB38\uC81C\uAC00 \uACC4\uC18D\uB418\uBA74 \uD1A0\uC2A4 \uACE0\uAC1D\uC13C\uD130(1599-4905)\uB85C \uBB38\uC758\uD574\uC8FC\uC138\uC694."
267
331
  };
268
332
 
269
- // src/utils/market.ts
270
- import { Platform } from "react-native";
271
- var PLAYSTORE_LINK = "https://play.google.com/store/apps/details?id=viva.republica.toss";
272
- var APPSTORE_LINK = "https://itunes.apple.com/app/id839333328";
273
- var getMarketLink = () => {
274
- return Platform.OS === "android" ? PLAYSTORE_LINK : APPSTORE_LINK;
333
+ // src/hooks/useErrorAlert.ts
334
+ var useErrorAlert = () => {
335
+ const { openAlert } = useDialog2();
336
+ const openErrorAlert = useCallback3(async () => {
337
+ await openAlert({
338
+ title: DEFAULT_ERROR.title,
339
+ description: DEFAULT_ERROR.description
340
+ });
341
+ closeView();
342
+ }, [openAlert]);
343
+ return { open: openErrorAlert };
275
344
  };
276
345
 
346
+ // src/hooks/useTransparentWebview.tsx
347
+ import { useCallback as useCallback4, useState } from "react";
348
+
277
349
  // src/utils/openTransparentWebView.ts
278
- import { openURL as openURL2 } from "@granite-js/react-native";
350
+ import { openURL as openURL3 } from "@granite-js/react-native";
279
351
 
280
352
  // src/private.ts
281
353
  import { onVisibilityChangedByTransparentServiceWeb } from "@apps-in-toss/native-modules";
@@ -309,91 +381,139 @@ var openTransparentWebView = ({
309
381
  }
310
382
  }
311
383
  });
312
- openURL2(url.toString());
384
+ openURL3(url.toString());
385
+ };
386
+
387
+ // src/hooks/useTransparentWebview.tsx
388
+ var useTransparentWebview = () => {
389
+ const [isWebviewLoading, setIsWebviewLoading] = useState(false);
390
+ const { open: openErrorAlert } = useErrorAlert();
391
+ const _openTransparentWebview = useCallback4(
392
+ ({ webUrl, onClose, onError }) => {
393
+ if (isWebviewLoading) {
394
+ return;
395
+ }
396
+ setIsWebviewLoading(true);
397
+ openTransparentWebView({
398
+ webUrl,
399
+ onEvent: async (isClosedTransparentWebView) => {
400
+ if (isClosedTransparentWebView) {
401
+ setIsWebviewLoading(false);
402
+ onClose?.();
403
+ }
404
+ },
405
+ onError: (error) => {
406
+ setIsWebviewLoading(false);
407
+ if (onError) {
408
+ onError(error);
409
+ } else {
410
+ openErrorAlert();
411
+ }
412
+ }
413
+ });
414
+ },
415
+ [isWebviewLoading, openErrorAlert]
416
+ );
417
+ return {
418
+ open: _openTransparentWebview
419
+ };
420
+ };
421
+
422
+ // src/components/GameProfileToast.tsx
423
+ import { Asset, Toast } from "@toss/tds-react-native";
424
+ import { AdaptiveColorProvider, ColorPreferenceProvider, useOverlay } from "@toss/tds-react-native/private";
425
+ import { useCallback as useCallback5 } from "react";
426
+ import { jsx as jsx2 } from "react/jsx-runtime";
427
+ var useGameProfileToast = () => {
428
+ const overlay = useOverlay();
429
+ const openGameProfileToast = useCallback5(
430
+ (nickname, profileImageUri) => {
431
+ return new Promise((resolve) => {
432
+ overlay.open(({ isOpen, close, exit }) => {
433
+ return /* @__PURE__ */ jsx2(ColorPreferenceProvider, { colorPreference: "dark", children: /* @__PURE__ */ jsx2(AdaptiveColorProvider, { children: /* @__PURE__ */ jsx2(
434
+ Toast,
435
+ {
436
+ open: isOpen,
437
+ onClose: () => {
438
+ resolve();
439
+ close();
440
+ },
441
+ onExited: exit,
442
+ position: "top",
443
+ text: `${nickname}\uB2D8 \uBC18\uAC00\uC6CC\uC694!`,
444
+ icon: /* @__PURE__ */ jsx2(
445
+ Asset.Image,
446
+ {
447
+ style: { borderRadius: 64, overflow: "hidden" },
448
+ frameShape: Asset.frameShape.CleanW32,
449
+ source: { uri: profileImageUri }
450
+ }
451
+ )
452
+ }
453
+ ) }) });
454
+ });
455
+ });
456
+ },
457
+ [overlay]
458
+ );
459
+ return { openGameProfileToast };
313
460
  };
314
461
 
315
462
  // src/hooks/useGameCenterProfile.ts
316
463
  var useGameCenterProfile = (isReadyForProfileUI) => {
317
- const [profileData, setProfileData] = useState(void 0);
318
- const [isProfileDataLoading, setIsProfileDataLoading] = useState(true);
319
- const [isProfileDataRefetching, setIsProfileDataRefetching] = useState(false);
320
- const shouldShowLoadingOverlay = isProfileDataLoading && isReadyForProfileUI;
464
+ const [profileData, setProfileData] = useState2(void 0);
465
+ const [isProfileDataLoading, setIsProfileDataLoading] = useState2(true);
466
+ const [isProfileDataRefetching, setIsProfileDataRefetching] = useState2(false);
467
+ const shouldShowProfileLoadingOverlay = isProfileDataLoading && isReadyForProfileUI || isProfileDataRefetching;
321
468
  const shouldShowProfileNotFoundOverlay = profileData?.statusCode === "PROFILE_NOT_FOUND" && isReadyForProfileUI && !isProfileDataRefetching;
322
469
  const canShowBottomSheetOrToast = !isProfileDataLoading && isReadyForProfileUI;
323
- const [isWebviewLoading, setIsWebviewLoading] = useState(false);
324
- const isCompletedProfileFlow = useRef2(false);
325
- const { openAlert, openConfirm } = useDialog();
326
470
  const { openGameProfileToast } = useGameProfileToast();
327
- const openErrorAlert = useCallback2(async () => {
328
- await openAlert({
329
- title: DEFAULT_ERROR.title,
330
- description: DEFAULT_ERROR.description
331
- });
332
- closeView();
333
- }, [openAlert]);
334
- const openProfileWebview = useCallback2(() => {
335
- if (isWebviewLoading) {
336
- return;
471
+ const { open: openErrorAlert } = useErrorAlert();
472
+ const { open: openTransparentWebView2 } = useTransparentWebview();
473
+ const fetchProfileData = useCallback6(async () => {
474
+ try {
475
+ const data = await getGameCenterGameProfile();
476
+ setProfileData(data);
477
+ setIsProfileDataLoading(false);
478
+ } catch (_) {
479
+ openErrorAlert();
480
+ setIsProfileDataLoading(false);
481
+ }
482
+ }, [openErrorAlert]);
483
+ const refetchProfileData = useCallback6(async () => {
484
+ try {
485
+ setIsProfileDataRefetching(true);
486
+ const data = await getGameCenterGameProfile();
487
+ setProfileData(data);
488
+ setIsProfileDataRefetching(false);
489
+ if (data?.statusCode === "SUCCESS") {
490
+ openGameProfileToast(data.nickname, data.profileImageUri);
491
+ }
492
+ } catch (_) {
493
+ setIsProfileDataRefetching(false);
494
+ openErrorAlert();
337
495
  }
338
- setIsWebviewLoading(true);
339
- openTransparentWebView({
496
+ }, [openErrorAlert, openGameProfileToast]);
497
+ const openProfileWebview = useCallback6(() => {
498
+ openTransparentWebView2({
340
499
  webUrl: `${GAME_PROFILE_WEBVIEW_URL}?appName=${getAppName()}&referrer=appsintoss.${getAppName()}`,
341
- onEvent: async (isClosedTransparentWebView) => {
342
- if (isClosedTransparentWebView) {
343
- try {
344
- setIsWebviewLoading(false);
345
- setIsProfileDataRefetching(true);
346
- const data = await getGameCenterGameProfile();
347
- setProfileData(data);
348
- setIsProfileDataRefetching(false);
349
- if (data?.statusCode === "SUCCESS") {
350
- openGameProfileToast(data.nickname, data.profileImageUri);
351
- }
352
- } catch (_) {
353
- setIsProfileDataRefetching(false);
354
- openErrorAlert();
355
- }
356
- }
357
- },
358
- onError: () => {
359
- openErrorAlert();
500
+ onClose: async () => {
501
+ refetchProfileData();
360
502
  }
361
503
  });
362
- }, [isWebviewLoading, openGameProfileToast, openErrorAlert]);
363
- const updateAppToSupportedMinVersion = useCallback2(async () => {
364
- const upddateConfirmDialogLabel = {
365
- title: `${josa(getAppsInTossGlobals().brandDisplayName, "\uC744/\uB97C")} \uD558\uB824\uBA74
366
- \uC571\uC744 \uC5C5\uB370\uC774\uD2B8\uD574\uC8FC\uC138\uC694`,
367
- leftButton: "\uB2EB\uAE30",
368
- rightButton: "\uC5C5\uB370\uC774\uD2B8\uD558\uAE30"
369
- };
370
- const isConfirmed = await openConfirm({
371
- title: upddateConfirmDialogLabel.title,
372
- leftButton: upddateConfirmDialogLabel.leftButton,
373
- rightButton: upddateConfirmDialogLabel.rightButton,
374
- closeOnDimmerClick: true
375
- });
376
- if (!isConfirmed) {
377
- closeView();
378
- return;
379
- }
380
- const STORE_SCHEME = getMarketLink();
381
- openURL3(`supertoss://web?url=${STORE_SCHEME}&external=browser`);
382
- }, [openConfirm]);
504
+ }, [openTransparentWebView2, refetchProfileData]);
383
505
  return {
384
506
  profileData,
385
507
  isProfileDataLoading,
386
- isProfileDataRefetching,
387
- shouldShowLoadingOverlay,
508
+ shouldShowProfileLoadingOverlay,
388
509
  shouldShowProfileNotFoundOverlay,
389
510
  canShowBottomSheetOrToast,
390
- isCompletedProfileFlow,
391
- updateAppToSupportedMinVersion,
392
511
  setIsProfileDataLoading,
393
512
  openProfileWebview,
394
513
  setProfileData,
395
514
  openErrorAlert,
396
- openGameProfileToast
515
+ openGameProfileToast,
516
+ fetchProfileData
397
517
  };
398
518
  };
399
519
 
@@ -406,47 +526,40 @@ var Z_INDEX = {
406
526
  CLOSE_BUTTON: 9999
407
527
  };
408
528
 
409
- // src/components/GameProfile.tsx
529
+ // src/components/GameInitializer.tsx
410
530
  import { Fragment as Fragment2, jsx as jsx3, jsxs } from "react/jsx-runtime";
411
- var GameProfile = ({ children, isReadyForProfileUI }) => {
531
+ var GameInitializer = ({ children, isReadyForProfileUI }) => {
412
532
  const {
413
533
  profileData,
414
- isProfileDataRefetching,
415
- shouldShowLoadingOverlay,
534
+ shouldShowProfileLoadingOverlay,
416
535
  shouldShowProfileNotFoundOverlay,
417
536
  canShowBottomSheetOrToast,
418
- isCompletedProfileFlow,
419
537
  openProfileWebview,
420
- updateAppToSupportedMinVersion,
421
- setIsProfileDataLoading,
422
- setProfileData,
423
- openErrorAlert,
424
- openGameProfileToast
538
+ openGameProfileToast,
539
+ fetchProfileData
425
540
  } = useGameCenterProfile(isReadyForProfileUI);
541
+ const isCompletedFlow = useRef2(false);
542
+ const { open: openAppUpdateDialog } = useAppUpdateDialog();
426
543
  useEffect5(() => {
427
- try {
428
- const getProfileData = async () => {
429
- const data = await getGameCenterGameProfile2();
430
- setProfileData(data);
431
- setIsProfileDataLoading(false);
432
- };
433
- getProfileData();
434
- } catch (_) {
435
- openErrorAlert();
436
- setIsProfileDataLoading(false);
437
- }
544
+ fetchProfileData();
438
545
  }, []);
439
546
  useEffect5(() => {
440
547
  const handleGameProfileFlow = async () => {
441
548
  if (!canShowBottomSheetOrToast) {
442
549
  return;
443
550
  }
444
- if (isCompletedProfileFlow.current) {
551
+ if (isCompletedFlow.current) {
445
552
  return;
446
553
  }
447
- isCompletedProfileFlow.current = true;
448
- if (!isMinVersionSupported(GAME_CENTER_MIN_VERSION)) {
449
- updateAppToSupportedMinVersion();
554
+ isCompletedFlow.current = true;
555
+ if (!isMinVersionSupported(GAME_MIN_VERSION)) {
556
+ openAppUpdateDialog({
557
+ title: `${josa(getAppsInTossGlobals().brandDisplayName, "\uC744/\uB97C")} \uD558\uB824\uBA74
558
+ \uC571\uC744 \uC5C5\uB370\uC774\uD2B8\uD574\uC8FC\uC138\uC694`,
559
+ onDismiss: () => {
560
+ closeView2();
561
+ }
562
+ });
450
563
  return;
451
564
  }
452
565
  if (profileData?.statusCode === "SUCCESS") {
@@ -460,13 +573,13 @@ var GameProfile = ({ children, isReadyForProfileUI }) => {
460
573
  handleGameProfileFlow();
461
574
  }, [
462
575
  canShowBottomSheetOrToast,
463
- isCompletedProfileFlow,
576
+ isCompletedFlow,
577
+ openAppUpdateDialog,
464
578
  openGameProfileToast,
465
579
  openProfileWebview,
466
- profileData,
467
- updateAppToSupportedMinVersion
580
+ profileData
468
581
  ]);
469
- if (!isMinVersionSupported(GAME_CENTER_MIN_VERSION)) {
582
+ if (!isMinVersionSupported(GAME_MIN_VERSION)) {
470
583
  return /* @__PURE__ */ jsxs(Fragment2, { children: [
471
584
  /* @__PURE__ */ jsx3(View, { style: { flex: 1, position: "relative" }, children }),
472
585
  /* @__PURE__ */ jsx3(
@@ -476,13 +589,19 @@ var GameProfile = ({ children, isReadyForProfileUI }) => {
476
589
  ...overlayStyle
477
590
  },
478
591
  onPress: () => {
479
- updateAppToSupportedMinVersion();
592
+ openAppUpdateDialog({
593
+ title: `${josa(getAppsInTossGlobals().brandDisplayName, "\uC744/\uB97C")} \uD558\uB824\uBA74
594
+ \uC571\uC744 \uC5C5\uB370\uC774\uD2B8\uD574\uC8FC\uC138\uC694`,
595
+ onDismiss: () => {
596
+ closeView2();
597
+ }
598
+ });
480
599
  }
481
600
  }
482
601
  )
483
602
  ] });
484
603
  }
485
- if (shouldShowLoadingOverlay || isProfileDataRefetching) {
604
+ if (shouldShowProfileLoadingOverlay) {
486
605
  return /* @__PURE__ */ jsxs(Fragment2, { children: [
487
606
  /* @__PURE__ */ jsx3(View, { style: { flex: 1, position: "relative" }, children }),
488
607
  /* @__PURE__ */ jsx3(
@@ -544,17 +663,17 @@ function useHardwareBackPress(handler) {
544
663
  }
545
664
 
546
665
  // src/components/NavigationBar/RNNavigationBar/hooks/useNavigationEvent.ts
547
- import { closeView as closeView2, useBackEventContext, useNavigation } from "@granite-js/react-native";
666
+ import { closeView as closeView3, useBackEventContext, useNavigation } from "@granite-js/react-native";
548
667
  import { useMemo as useMemo2 } from "react";
549
668
 
550
669
  // src/components/NavigationBar/RNNavigationBar/hooks/useCloseConfirm.ts
551
- import { useDialog as useDialog2 } from "@toss/tds-react-native";
670
+ import { useDialog as useDialog3 } from "@toss/tds-react-native";
552
671
  import { josa as josa2 } from "es-hangul";
553
- import { useCallback as useCallback3 } from "react";
672
+ import { useCallback as useCallback7 } from "react";
554
673
  function useCloseConfirm() {
555
674
  const { brandDisplayName } = getAppsInTossGlobals();
556
- const { openConfirm } = useDialog2();
557
- return useCallback3(async ({ onEntered }) => {
675
+ const { openConfirm } = useDialog3();
676
+ return useCallback7(async ({ onEntered }) => {
558
677
  return await openConfirm({
559
678
  title: `${josa2(brandDisplayName, "\uC744/\uB97C")} \uC885\uB8CC\uD560\uAE4C\uC694?`,
560
679
  leftButton: "\uCDE8\uC18C",
@@ -566,8 +685,8 @@ function useCloseConfirm() {
566
685
  }
567
686
 
568
687
  // src/components/NavigationBar/common/useNavigationBarLogging.tsx
569
- import { INTERNAL__module as INTERNAL__module3 } from "@apps-in-toss/native-modules";
570
- import { Granite as Granite3 } from "@granite-js/react-native";
688
+ import { INTERNAL__module as INTERNAL__module4 } from "@apps-in-toss/native-modules";
689
+ import { Granite as Granite4 } from "@granite-js/react-native";
571
690
  var NAVI_BAR_IMPRESSION_SCHEMA_ID = 1596837;
572
691
  var NAVI_BAR_IMPRESSION_LOG_NAME = "appsintoss_app_visit__common_module::impression__navigation_bar";
573
692
  var CLOSE_POPUP_SHOW_SCHEMA_ID = 1644490;
@@ -582,10 +701,10 @@ function useNavigationBarLogging() {
582
701
  const referrer = useReferrer();
583
702
  const baseParams = {
584
703
  referrer,
585
- app_name: Granite3.appName
704
+ app_name: Granite4.appName
586
705
  };
587
706
  const logNavBarImpression = (naviBarConfig) => {
588
- INTERNAL__module3.tossCoreEventLog({
707
+ INTERNAL__module4.tossCoreEventLog({
589
708
  log_name: NAVI_BAR_IMPRESSION_LOG_NAME,
590
709
  log_type: "event",
591
710
  params: {
@@ -597,7 +716,7 @@ function useNavigationBarLogging() {
597
716
  });
598
717
  };
599
718
  const logHomeButtonClick = () => {
600
- INTERNAL__module3.tossCoreEventLog({
719
+ INTERNAL__module4.tossCoreEventLog({
601
720
  log_name: HOME_BUTTON_CLICK_LOG_NAME,
602
721
  log_type: "event",
603
722
  params: {
@@ -608,7 +727,7 @@ function useNavigationBarLogging() {
608
727
  });
609
728
  };
610
729
  const logCloseButtonClick = () => {
611
- INTERNAL__module3.tossCoreEventLog({
730
+ INTERNAL__module4.tossCoreEventLog({
612
731
  log_name: CLOSE_BUTTON_CLICK_LOG_NAME,
613
732
  log_type: "event",
614
733
  params: {
@@ -619,7 +738,7 @@ function useNavigationBarLogging() {
619
738
  });
620
739
  };
621
740
  const logClosePopupShow = () => {
622
- INTERNAL__module3.tossCoreEventLog({
741
+ INTERNAL__module4.tossCoreEventLog({
623
742
  log_name: CLOSE_POPUP_SHOW_LOG_NAME,
624
743
  log_type: "popup",
625
744
  params: {
@@ -629,7 +748,7 @@ function useNavigationBarLogging() {
629
748
  });
630
749
  };
631
750
  const logClosePopupCtaClick = (confirm) => {
632
- INTERNAL__module3.tossCoreEventLog({
751
+ INTERNAL__module4.tossCoreEventLog({
633
752
  log_name: CLOSE_POPUP_CTA_CLICK_LOG_NAME,
634
753
  log_type: "event",
635
754
  params: {
@@ -664,7 +783,7 @@ function useNavigationEvent() {
664
783
  logging.closePopupCtaClick(hasConfirmed);
665
784
  if (hasConfirmed) {
666
785
  captureExitLog(Date.now());
667
- closeView2();
786
+ closeView3();
668
787
  }
669
788
  };
670
789
  return {
@@ -691,21 +810,21 @@ function useNavigationEvent() {
691
810
 
692
811
  // src/core/hooks/useMoreButtonBottomSheet/index.tsx
693
812
  import { INTERNAL__appBridgeHandler, isMinVersionSupported as isMinVersionSupported2 } from "@apps-in-toss/native-modules";
694
- import { openURL as openURL5 } from "@granite-js/react-native";
813
+ import { openURL as openURL4 } from "@granite-js/react-native";
695
814
  import { BottomSheet, List, ListHeader, ListRow as ListRow2 } from "@toss/tds-react-native";
696
815
  import { useAdaptive as useAdaptive2, useOverlay as useOverlay2 } from "@toss/tds-react-native/private";
697
- import { useEffect as useEffect7, useState as useState2 } from "react";
816
+ import { useEffect as useEffect7, useState as useState3 } from "react";
698
817
 
699
818
  // src/core/hooks/useMoreButtonBottomSheet/AppShareListMenu.tsx
700
819
  import { getOperationalEnvironment } from "@apps-in-toss/native-modules";
701
820
  import { getSchemeUri as getSchemeUri4 } from "@granite-js/react-native";
702
- import { ListRow, useDialog as useDialog3 } from "@toss/tds-react-native";
821
+ import { ListRow, useDialog as useDialog4 } from "@toss/tds-react-native";
703
822
  import { useAdaptive } from "@toss/tds-react-native/private";
704
823
  import { NativeModules } from "react-native";
705
824
 
706
825
  // src/core/hooks/useMoreButtonBottomSheet/useMoreButtonBottomSheetLogging.tsx
707
- import { INTERNAL__module as INTERNAL__module4 } from "@apps-in-toss/native-modules";
708
- import { Granite as Granite4 } from "@granite-js/react-native";
826
+ import { INTERNAL__module as INTERNAL__module5 } from "@apps-in-toss/native-modules";
827
+ import { Granite as Granite5 } from "@granite-js/react-native";
709
828
  var BOTTOM_SHEET_SCHEMA_ID = 1596825;
710
829
  var BOTTOM_SHEET_LOG_NAME = "appsintoss_app_visit__common_module::bottomsheet__more";
711
830
  var BOTTOM_SHEET_OPEN_SCHEMA_ID = 1596829;
@@ -718,10 +837,10 @@ function useMoreButtonBottomSheetLogging() {
718
837
  const referrer = useReferrer();
719
838
  const baseParams = {
720
839
  referrer,
721
- app_name: Granite4.appName
840
+ app_name: Granite5.appName
722
841
  };
723
842
  const logBottomSheetShow = () => {
724
- INTERNAL__module4.tossCoreEventLog({
843
+ INTERNAL__module5.tossCoreEventLog({
725
844
  log_name: BOTTOM_SHEET_LOG_NAME,
726
845
  log_type: "popup",
727
846
  params: {
@@ -731,7 +850,7 @@ function useMoreButtonBottomSheetLogging() {
731
850
  });
732
851
  };
733
852
  const logBottomSheetOpen = () => {
734
- INTERNAL__module4.tossCoreEventLog({
853
+ INTERNAL__module5.tossCoreEventLog({
735
854
  log_name: BOTTOM_SHEET_OPEN_LOG_NAME,
736
855
  log_type: "event",
737
856
  params: {
@@ -742,7 +861,7 @@ function useMoreButtonBottomSheetLogging() {
742
861
  });
743
862
  };
744
863
  const logBottomSheetCloseClick = () => {
745
- INTERNAL__module4.tossCoreEventLog({
864
+ INTERNAL__module5.tossCoreEventLog({
746
865
  log_name: BOTTOM_SHEET_CLOSE_CLICK_LOG_NAME,
747
866
  log_type: "event",
748
867
  params: {
@@ -753,7 +872,7 @@ function useMoreButtonBottomSheetLogging() {
753
872
  });
754
873
  };
755
874
  const logBottomSheetMenuClick = ({ title }) => {
756
- INTERNAL__module4.tossCoreEventLog({
875
+ INTERNAL__module5.tossCoreEventLog({
757
876
  log_name: BOTTOM_SHEET_MENU_CLICK_LOG_NAME,
758
877
  log_type: "event",
759
878
  params: {
@@ -794,7 +913,7 @@ function AppShareListMenu() {
794
913
  const logging = useMoreButtonBottomSheetLogging();
795
914
  const initialScheme = getSchemeUri4();
796
915
  const isSandbox = getOperationalEnvironment() === "sandbox";
797
- const { openConfirm } = useDialog3();
916
+ const { openConfirm } = useDialog4();
798
917
  const schemeForShare = addParamsToUrl(initialScheme, {
799
918
  referrer: SHARE_SCHEME_REFERRER
800
919
  });
@@ -839,90 +958,6 @@ function AppShareListMenu() {
839
958
  );
840
959
  }
841
960
 
842
- // src/hooks/useAppUpdateDialog.tsx
843
- import { INTERNAL__module as INTERNAL__module5 } from "@apps-in-toss/native-modules";
844
- import { Granite as Granite5, openURL as openURL4 } from "@granite-js/react-native";
845
- import { useDialog as useDialog4 } from "@toss/tds-react-native";
846
- import { useCallback as useCallback4 } from "react";
847
- function useAppUpdateDialog() {
848
- const { openConfirm } = useDialog4();
849
- const logging = useAppUpdateDialogLogging();
850
- const openAppUpdateDialog = useCallback4(
851
- async ({
852
- title,
853
- description,
854
- leftButton = "\uB2EB\uAE30",
855
- rightButton = "\uC5C5\uB370\uC774\uD2B8\uD558\uAE30"
856
- }) => {
857
- logging.show();
858
- const isConfirmed = await openConfirm({
859
- title,
860
- description,
861
- leftButton,
862
- rightButton,
863
- closeOnDimmerClick: true
864
- });
865
- if (!isConfirmed) {
866
- logging.close();
867
- return;
868
- }
869
- logging.update();
870
- const STORE_SCHEME = getMarketLink();
871
- openURL4(`supertoss://web?url=${STORE_SCHEME}&external=browser`);
872
- },
873
- [logging, openConfirm]
874
- );
875
- return {
876
- open: openAppUpdateDialog
877
- };
878
- }
879
- var UPDATE_DIALOG_SCHEMA_ID = 1634992;
880
- var UPDATE_DIALOG_LOG_NAME = "appsintoss_app_visit__common_module::bottomsheet__app_update";
881
- var UPDATE_DIALOG_CTA_CLICK_SCHEMA_ID = 1634996;
882
- var UPDATE_DIALOG_CTA_CLICK_LOG_NAME = "appsintoss_app_visit__common_module::bottomsheet__app_update::click__cta";
883
- function useAppUpdateDialogLogging() {
884
- const referrer = useReferrer();
885
- const baseParams = {
886
- referrer,
887
- app_name: Granite5.appName
888
- };
889
- const logUpdateClick = () => {
890
- INTERNAL__module5.tossCoreEventLog({
891
- log_name: UPDATE_DIALOG_CTA_CLICK_LOG_NAME,
892
- log_type: "event",
893
- params: {
894
- ...baseParams,
895
- schema_id: UPDATE_DIALOG_CTA_CLICK_SCHEMA_ID,
896
- event_type: "click",
897
- button_type: "update"
898
- }
899
- });
900
- };
901
- const logCloseClick = () => {
902
- INTERNAL__module5.tossCoreEventLog({
903
- log_name: UPDATE_DIALOG_CTA_CLICK_LOG_NAME,
904
- log_type: "event",
905
- params: {
906
- ...baseParams,
907
- schema_id: UPDATE_DIALOG_CTA_CLICK_SCHEMA_ID,
908
- event_type: "click",
909
- button_type: "close"
910
- }
911
- });
912
- };
913
- const logDialogShow = () => {
914
- INTERNAL__module5.tossCoreEventLog({
915
- log_name: UPDATE_DIALOG_LOG_NAME,
916
- log_type: "popup",
917
- params: {
918
- ...baseParams,
919
- schema_id: UPDATE_DIALOG_SCHEMA_ID
920
- }
921
- });
922
- };
923
- return { update: logUpdateClick, close: logCloseClick, show: logDialogShow };
924
- }
925
-
926
961
  // src/core/utils/ensureValue.ts
927
962
  function ensureValue(value, name) {
928
963
  if (value === void 0) {
@@ -947,7 +982,7 @@ var MIN_VERSION = {
947
982
  function useMoreButtonBottomSheet() {
948
983
  const globals = getAppsInTossGlobals();
949
984
  const adaptive = useAdaptive2();
950
- const [itemList, setItemList] = useState2([]);
985
+ const [itemList, setItemList] = useState3([]);
951
986
  const appUpdateDialog = useAppUpdateDialog();
952
987
  const logging = useMoreButtonBottomSheetLogging();
953
988
  const overlay = useOverlay2();
@@ -1029,7 +1064,7 @@ function useMoreButtonBottomSheet() {
1029
1064
  verticalPadding: "extraSmall",
1030
1065
  onPress: () => {
1031
1066
  logging.menuClick({ title: item.contactItemName });
1032
- openURL5(item.contactUri);
1067
+ openURL4(item.contactUri);
1033
1068
  }
1034
1069
  },
1035
1070
  item.contactItemName
@@ -1181,7 +1216,7 @@ function RNAppContainer({ children }) {
1181
1216
  }
1182
1217
  }
1183
1218
  function GameAppContainer({ children }) {
1184
- const [isEntryMessageExited, setIsEntryMessageExited] = useState3(false);
1219
+ const [isEntryMessageExited, setIsEntryMessageExited] = useState4(false);
1185
1220
  useEffect9(() => {
1186
1221
  if (Platform3.OS === "ios") {
1187
1222
  setIosSwipeGestureEnabled({ isEnabled: false });
@@ -1200,7 +1235,7 @@ function GameAppContainer({ children }) {
1200
1235
  }, []);
1201
1236
  return /* @__PURE__ */ jsxs4(Fragment6, { children: [
1202
1237
  /* @__PURE__ */ jsx9(RNNavigationBar.Game, {}),
1203
- (0, bridge_entry_exports.getOperationalEnvironment)() === "toss" ? /* @__PURE__ */ jsx9(GameProfile, { isReadyForProfileUI: isEntryMessageExited, children }) : children
1238
+ (0, bridge_entry_exports.getOperationalEnvironment)() === "toss" ? /* @__PURE__ */ jsx9(GameInitializer, { isReadyForProfileUI: isEntryMessageExited, children }) : children
1204
1239
  ] });
1205
1240
  }
1206
1241
  function GeneralAppContainer({ children }) {
@@ -1292,7 +1327,7 @@ import * as appsInTossEventBridges from "@apps-in-toss/native-modules/event-brid
1292
1327
  import { getSchemeUri as getSchemeUri6 } from "@granite-js/react-native";
1293
1328
  import { ExternalWebViewScreen, tdsEvent } from "@toss/tds-react-native";
1294
1329
  import { useSafeAreaBottom, useSafeAreaTop as useSafeAreaTop3, useTopNavigation } from "@toss/tds-react-native/private";
1295
- import { useEffect as useEffect12, useMemo as useMemo6, useRef as useRef6, useState as useState6 } from "react";
1330
+ import { useEffect as useEffect12, useMemo as useMemo6, useRef as useRef6, useState as useState7 } from "react";
1296
1331
  import { BackHandler as BackHandler2, Platform as Platform6 } from "react-native";
1297
1332
 
1298
1333
  // src/components/GameWebView.tsx
@@ -1300,15 +1335,15 @@ import { setIosSwipeGestureEnabled as setIosSwipeGestureEnabled3, appsInTossEven
1300
1335
  import {
1301
1336
  WebView as PlainWebView
1302
1337
  } from "@granite-js/native/react-native-webview";
1303
- import { forwardRef, useEffect as useEffect10, useState as useState4 } from "react";
1338
+ import { forwardRef, useEffect as useEffect10, useState as useState5 } from "react";
1304
1339
  import { Platform as Platform5 } from "react-native";
1305
1340
 
1306
1341
  // src/components/NavigationBar/GameWebviewNavigationBar.tsx
1307
- import { closeView as closeView3 } from "@granite-js/react-native";
1342
+ import { closeView as closeView4 } from "@granite-js/react-native";
1308
1343
  import { PageNavbar as PageNavbar2, useDialog as useDialog5 } from "@toss/tds-react-native";
1309
1344
  import { NavigationRightContent as NavigationRightContent2, useSafeAreaTop as useSafeAreaTop2 } from "@toss/tds-react-native/private";
1310
1345
  import { josa as josa3 } from "es-hangul";
1311
- import { useCallback as useCallback5 } from "react";
1346
+ import { useCallback as useCallback8 } from "react";
1312
1347
  import { Platform as Platform4, View as View3 } from "react-native";
1313
1348
  import { Fragment as Fragment8, jsx as jsx11, jsxs as jsxs6 } from "react/jsx-runtime";
1314
1349
  function GameWebviewNavigationBar() {
@@ -1320,7 +1355,7 @@ function GameWebviewNavigationBar() {
1320
1355
  const { open: openMoreButtonBottomSheet } = useMoreButtonBottomSheet();
1321
1356
  const parsedNavigationBar = global2.navigationBar != null ? safeParseNavigationBar(global2.navigationBar) : null;
1322
1357
  const initialAccessoryButton = parsedNavigationBar?.initialAccessoryButton;
1323
- const handleGameWebviewClose = useCallback5(async () => {
1358
+ const handleGameWebviewClose = useCallback8(async () => {
1324
1359
  logging.closeButtonClick();
1325
1360
  const isConfirmed = await openConfirm({
1326
1361
  title: `${josa3(global2.brandDisplayName, "\uC744/\uB97C")} \uC885\uB8CC\uD560\uAE4C\uC694?`,
@@ -1332,7 +1367,7 @@ function GameWebviewNavigationBar() {
1332
1367
  logging.closePopupCtaClick(isConfirmed);
1333
1368
  if (isConfirmed) {
1334
1369
  captureExitLog(Date.now());
1335
- closeView3();
1370
+ closeView4();
1336
1371
  }
1337
1372
  }, [captureExitLog, global2.brandDisplayName, logging, openConfirm]);
1338
1373
  return /* @__PURE__ */ jsxs6(Fragment8, { children: [
@@ -1372,7 +1407,7 @@ function GameWebviewNavigationBar() {
1372
1407
  // src/components/GameWebView.tsx
1373
1408
  import { Fragment as Fragment9, jsx as jsx12, jsxs as jsxs7 } from "react/jsx-runtime";
1374
1409
  var GameWebView = forwardRef(function GameWebView2(props, ref) {
1375
- const [isEntryMessageExited, setIsEntryMessageExited] = useState4(false);
1410
+ const [isEntryMessageExited, setIsEntryMessageExited] = useState5(false);
1376
1411
  useEffect10(() => {
1377
1412
  if (Platform5.OS === "ios") {
1378
1413
  setIosSwipeGestureEnabled3({ isEnabled: false });
@@ -1391,7 +1426,7 @@ var GameWebView = forwardRef(function GameWebView2(props, ref) {
1391
1426
  }, []);
1392
1427
  return /* @__PURE__ */ jsxs7(Fragment9, { children: [
1393
1428
  /* @__PURE__ */ jsx12(GameWebviewNavigationBar, {}),
1394
- getOperationalEnvironment3() === "toss" ? /* @__PURE__ */ jsx12(GameProfile, { isReadyForProfileUI: isEntryMessageExited, children: /* @__PURE__ */ jsx12(PlainWebView, { ref, ...props }) }) : /* @__PURE__ */ jsx12(PlainWebView, { ref, ...props })
1429
+ getOperationalEnvironment3() === "toss" ? /* @__PURE__ */ jsx12(GameInitializer, { isReadyForProfileUI: isEntryMessageExited, children: /* @__PURE__ */ jsx12(PlainWebView, { ref, ...props }) }) : /* @__PURE__ */ jsx12(PlainWebView, { ref, ...props })
1395
1430
  ] });
1396
1431
  });
1397
1432
 
@@ -1402,11 +1437,11 @@ import {
1402
1437
  import { forwardRef as forwardRef2 } from "react";
1403
1438
 
1404
1439
  // src/components/NavigationBar/PartnerWebviewNavigationBar.tsx
1405
- import { closeView as closeView4 } from "@granite-js/react-native";
1440
+ import { closeView as closeView5 } from "@granite-js/react-native";
1406
1441
  import { useDialog as useDialog6 } from "@toss/tds-react-native";
1407
1442
  import { NavigationBackButton as NavigationBackButton2, NavigationLeft as NavigationLeft2, TopNavigation as TopNavigation2 } from "@toss/tds-react-native/private";
1408
1443
  import { josa as josa4 } from "es-hangul";
1409
- import { useCallback as useCallback6 } from "react";
1444
+ import { useCallback as useCallback9 } from "react";
1410
1445
  import { jsx as jsx13 } from "react/jsx-runtime";
1411
1446
  function PartnerWebviewNavigationBar({ onBackButtonClick, onHomeButtonClick }) {
1412
1447
  const globals = getAppsInTossGlobals();
@@ -1418,7 +1453,7 @@ function PartnerWebviewNavigationBar({ onBackButtonClick, onHomeButtonClick }) {
1418
1453
  const withHomeButton = parsedNavigationBar?.withHomeButton ?? false;
1419
1454
  const withBackButton = parsedNavigationBar?.withBackButton ?? true;
1420
1455
  const initialAccessoryButton = parsedNavigationBar?.initialAccessoryButton;
1421
- const handleClose = useCallback6(async () => {
1456
+ const handleClose = useCallback9(async () => {
1422
1457
  logging.closeButtonClick();
1423
1458
  const isConfirmed = await openConfirm({
1424
1459
  title: `${josa4(globals.brandDisplayName, "\uC744/\uB97C")} \uC885\uB8CC\uD560\uAE4C\uC694?`,
@@ -1430,7 +1465,7 @@ function PartnerWebviewNavigationBar({ onBackButtonClick, onHomeButtonClick }) {
1430
1465
  logging.closePopupCtaClick(isConfirmed);
1431
1466
  if (isConfirmed) {
1432
1467
  captureExitLog(Date.now());
1433
- closeView4();
1468
+ closeView5();
1434
1469
  }
1435
1470
  }, [captureExitLog, globals.brandDisplayName, logging, openConfirm]);
1436
1471
  return /* @__PURE__ */ jsx13(NavigationBarImpressionArea, { withHomeButton, children: /* @__PURE__ */ jsx13(
@@ -1459,7 +1494,7 @@ var PartnerWebView = forwardRef2(function PartnerWebViewScreen({ onBackButtonCli
1459
1494
  });
1460
1495
 
1461
1496
  // src/bridge-handler/useBridgeHandler.tsx
1462
- import { useCallback as useCallback7, useMemo as useMemo3, useRef as useRef4 } from "react";
1497
+ import { useCallback as useCallback10, useMemo as useMemo3, useRef as useRef4 } from "react";
1463
1498
  function serializeError(error) {
1464
1499
  return JSON.stringify(error, (_, value) => {
1465
1500
  if (value instanceof Error) {
@@ -1540,7 +1575,7 @@ function useBridgeHandler({
1540
1575
  window.__GRANITE_NATIVE_EMITTER.emit('${functionName}/onError/${eventId}', ${serializedError});
1541
1576
  `);
1542
1577
  };
1543
- const $onMessage = useCallback7(
1578
+ const $onMessage = useCallback10(
1544
1579
  async (e) => {
1545
1580
  onMessage?.(e);
1546
1581
  const data = JSON.parse(e.nativeEvent.data);
@@ -1591,13 +1626,13 @@ function useBridgeHandler({
1591
1626
  }
1592
1627
 
1593
1628
  // src/core/hooks/useWebBackHandler.tsx
1594
- import { closeView as closeView5, useBackEventState } from "@granite-js/react-native";
1629
+ import { closeView as closeView6, useBackEventState } from "@granite-js/react-native";
1595
1630
  import { useDialog as useDialog7 } from "@toss/tds-react-native";
1596
1631
  import { josa as josa5 } from "es-hangul";
1597
- import { useCallback as useCallback9, useMemo as useMemo5 } from "react";
1632
+ import { useCallback as useCallback12, useMemo as useMemo5 } from "react";
1598
1633
 
1599
1634
  // src/hooks/useWebviewHistoryStack.tsx
1600
- import { useCallback as useCallback8, useMemo as useMemo4, useReducer } from "react";
1635
+ import { useCallback as useCallback11, useMemo as useMemo4, useReducer } from "react";
1601
1636
  var INITIAL_STATE = { stack: [], index: -1 };
1602
1637
  function reducer(state, action) {
1603
1638
  switch (action.type) {
@@ -1629,7 +1664,7 @@ function reducer(state, action) {
1629
1664
  }
1630
1665
  function useWebViewHistory() {
1631
1666
  const [state, dispatch] = useReducer(reducer, INITIAL_STATE);
1632
- const onNavigationStateChange = useCallback8(({ url, canGoForward: canGoForward2 }) => {
1667
+ const onNavigationStateChange = useCallback11(({ url, canGoForward: canGoForward2 }) => {
1633
1668
  dispatch({ type: "NAVIGATION_CHANGE", url, canGoForward: canGoForward2 });
1634
1669
  }, []);
1635
1670
  const { canGoBack, canGoForward } = useMemo4(() => {
@@ -1665,19 +1700,19 @@ function useWebBackHandler(webViewRef) {
1665
1700
  const logging = useNavigationBarLogging();
1666
1701
  const { openConfirm } = useDialog7();
1667
1702
  const global2 = getAppsInTossGlobals();
1668
- const addEventListener = useCallback9(
1703
+ const addEventListener = useCallback12(
1669
1704
  (handler) => {
1670
1705
  addWebBackEventListener(handler);
1671
1706
  },
1672
1707
  [addWebBackEventListener]
1673
1708
  );
1674
- const removeEventListener = useCallback9(
1709
+ const removeEventListener = useCallback12(
1675
1710
  (handler) => {
1676
1711
  removeWebBackEventListener(handler);
1677
1712
  },
1678
1713
  [removeWebBackEventListener]
1679
1714
  );
1680
- const handleWebBack = useCallback9(async () => {
1715
+ const handleWebBack = useCallback12(async () => {
1681
1716
  if (hasWebBackEvent) {
1682
1717
  for (const handler of webBackHandlersRef) {
1683
1718
  handler();
@@ -1697,7 +1732,7 @@ function useWebBackHandler(webViewRef) {
1697
1732
  logging.closePopupCtaClick(isConfirmed);
1698
1733
  if (isConfirmed) {
1699
1734
  captureExitLog(Date.now());
1700
- closeView5();
1735
+ closeView6();
1701
1736
  }
1702
1737
  }
1703
1738
  }, [
@@ -1710,7 +1745,7 @@ function useWebBackHandler(webViewRef) {
1710
1745
  openConfirm,
1711
1746
  webViewRef
1712
1747
  ]);
1713
- const handleWebHome = useCallback9(() => {
1748
+ const handleWebHome = useCallback12(() => {
1714
1749
  logging.homeButtonClick();
1715
1750
  if (hasWebBackEvent) {
1716
1751
  for (const handler of webBackHandlersRef) {
@@ -1898,10 +1933,10 @@ function useCreateUserAgent({
1898
1933
  // src/hooks/useGeolocation.ts
1899
1934
  import { startUpdateLocation } from "@apps-in-toss/native-modules";
1900
1935
  import { useVisibility as useVisibility3 } from "@granite-js/react-native";
1901
- import { useEffect as useEffect11, useState as useState5 } from "react";
1936
+ import { useEffect as useEffect11, useState as useState6 } from "react";
1902
1937
  function useGeolocation({ accuracy, distanceInterval, timeInterval }) {
1903
1938
  const isVisible = useVisibility3();
1904
- const [location, setLocation] = useState5(null);
1939
+ const [location, setLocation] = useState6(null);
1905
1940
  useEffect11(() => {
1906
1941
  if (!isVisible) {
1907
1942
  return;
@@ -1921,11 +1956,11 @@ function useGeolocation({ accuracy, distanceInterval, timeInterval }) {
1921
1956
 
1922
1957
  // src/hooks/useWaitForReturnNavigator.tsx
1923
1958
  import { useNavigation as useNavigation2, useVisibilityChange } from "@granite-js/react-native";
1924
- import { useCallback as useCallback10, useRef as useRef5 } from "react";
1959
+ import { useCallback as useCallback13, useRef as useRef5 } from "react";
1925
1960
  function useWaitForReturnNavigator() {
1926
1961
  const callbacks = useRef5([]).current;
1927
1962
  const navigation = useNavigation2();
1928
- const startNavigating = useCallback10(
1963
+ const startNavigating = useCallback13(
1929
1964
  (route, params) => {
1930
1965
  return new Promise((resolve) => {
1931
1966
  callbacks.push(resolve);
@@ -1934,7 +1969,7 @@ function useWaitForReturnNavigator() {
1934
1969
  },
1935
1970
  [callbacks, navigation]
1936
1971
  );
1937
- const handleVisibilityChange = useCallback10(
1972
+ const handleVisibilityChange = useCallback13(
1938
1973
  (state) => {
1939
1974
  if (state === "visible" && callbacks.length > 0) {
1940
1975
  for (const callback of callbacks) {
@@ -2047,7 +2082,7 @@ function WebView({ type, local, onMessage, ...props }) {
2047
2082
  document.head.appendChild(style);
2048
2083
  })();
2049
2084
  `;
2050
- const [allowsBackForwardNavigationGestures, setAllowsBackForwardNavigationGestures] = useState6(
2085
+ const [allowsBackForwardNavigationGestures, setAllowsBackForwardNavigationGestures] = useState7(
2051
2086
  props.allowsBackForwardNavigationGestures
2052
2087
  );
2053
2088
  const handler = useBridgeHandler({