@apps-in-toss/framework 0.0.0-dev.1764816865438 → 0.0.0-dev.1765732023607

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.
package/dist/index.cjs CHANGED
@@ -37,8 +37,6 @@ __export(src_exports, {
37
37
  OverlayProvider: () => import_private10.OverlayProvider,
38
38
  WebView: () => WebView,
39
39
  env: () => env,
40
- loadFullScreenAd: () => loadFullScreenAd,
41
- showFullScreenAd: () => showFullScreenAd,
42
40
  useCreateUserAgent: () => useCreateUserAgent,
43
41
  useGeolocation: () => useGeolocation,
44
42
  useOverlay: () => import_private10.useOverlay,
@@ -50,9 +48,9 @@ var import_analytics2 = require("@apps-in-toss/analytics");
50
48
 
51
49
  // src/core/registerApp.tsx
52
50
  var import_analytics = require("@apps-in-toss/analytics");
53
- var import_native_modules14 = require("@apps-in-toss/native-modules");
51
+ var import_native_modules13 = require("@apps-in-toss/native-modules");
54
52
  var import_react_native23 = require("@granite-js/react-native");
55
- var import_tds_react_native11 = require("@toss/tds-react-native");
53
+ var import_tds_react_native10 = require("@toss/tds-react-native");
56
54
  var import_react_native24 = require("react-native");
57
55
 
58
56
  // src/core/components/AppEvent.tsx
@@ -250,45 +248,17 @@ function useNavigationBarContext() {
250
248
  return context;
251
249
  }
252
250
 
253
- // src/core/hooks/useAppsInTossBridge.ts
254
- var import_native_modules3 = require("@apps-in-toss/native-modules");
255
- var import_tds_react_native = require("@toss/tds-react-native");
256
- var import_react6 = require("react");
257
-
258
- // src/core/utils/toIcon.ts
259
- function toIcon(source) {
260
- return source.startsWith("http") ? { source: { uri: source } } : { name: source };
261
- }
262
-
263
- // src/core/hooks/useAppsInTossBridge.ts
264
- function useAppsInTossBridge() {
265
- const controller = (0, import_tds_react_native.useBridge)();
266
- const appsInTossGlobals = getAppsInTossGlobals();
267
- (0, import_react6.useEffect)(() => {
268
- const isGameApp = appsInTossGlobals.webViewType === "game" || appsInTossGlobals.appType === "game";
269
- controller.open({
270
- serviceName: appsInTossGlobals.brandDisplayName,
271
- icon: toIcon(appsInTossGlobals.brandIcon),
272
- color: appsInTossGlobals.brandPrimaryColor,
273
- colorMode: isGameApp ? "inverted" : appsInTossGlobals.brandBridgeColorMode,
274
- onExited: () => {
275
- import_native_modules3.appsInTossEvent.emit("entryMessageExited", void 0);
276
- }
277
- });
278
- }, []);
279
- }
280
-
281
251
  // src/components/RNAppContainer.tsx
282
- var import_native_modules13 = require("@apps-in-toss/native-modules");
283
- var import_react18 = require("react");
252
+ var import_native_modules12 = require("@apps-in-toss/native-modules");
253
+ var import_react17 = require("react");
284
254
  var import_react_native22 = require("react-native");
285
255
 
286
256
  // src/components/GameInitializer.tsx
287
- var import_native_modules7 = require("@apps-in-toss/native-modules");
257
+ var import_native_modules6 = require("@apps-in-toss/native-modules");
288
258
  var import_react_native10 = require("@granite-js/react-native");
289
- var import_tds_react_native5 = require("@toss/tds-react-native");
259
+ var import_tds_react_native4 = require("@toss/tds-react-native");
290
260
  var import_es_hangul = require("es-hangul");
291
- var import_react12 = require("react");
261
+ var import_react11 = require("react");
292
262
  var import_react_native11 = require("react-native");
293
263
 
294
264
  // src/constant/game-center.ts
@@ -299,10 +269,10 @@ var GAME_MIN_VERSION = {
299
269
  };
300
270
 
301
271
  // src/hooks/useAppUpdateDialog.tsx
302
- var import_native_modules4 = require("@apps-in-toss/native-modules");
272
+ var import_native_modules3 = require("@apps-in-toss/native-modules");
303
273
  var import_react_native7 = require("@granite-js/react-native");
304
- var import_tds_react_native2 = require("@toss/tds-react-native");
305
- var import_react7 = require("react");
274
+ var import_tds_react_native = require("@toss/tds-react-native");
275
+ var import_react6 = require("react");
306
276
 
307
277
  // src/utils/market.ts
308
278
  var import_react_native6 = require("react-native");
@@ -314,9 +284,9 @@ var getMarketLink = () => {
314
284
 
315
285
  // src/hooks/useAppUpdateDialog.tsx
316
286
  function useAppUpdateDialog() {
317
- const { openConfirm } = (0, import_tds_react_native2.useDialog)();
287
+ const { openConfirm } = (0, import_tds_react_native.useDialog)();
318
288
  const logging = useAppUpdateDialogLogging();
319
- const openAppUpdateDialog = (0, import_react7.useCallback)(
289
+ const openAppUpdateDialog = (0, import_react6.useCallback)(
320
290
  async ({
321
291
  title,
322
292
  description,
@@ -358,7 +328,7 @@ function useAppUpdateDialogLogging() {
358
328
  app_name: import_react_native7.Granite.appName
359
329
  };
360
330
  const logUpdateClick = () => {
361
- import_native_modules4.INTERNAL__module.tossCoreEventLog({
331
+ import_native_modules3.INTERNAL__module.tossCoreEventLog({
362
332
  log_name: UPDATE_DIALOG_CTA_CLICK_LOG_NAME,
363
333
  log_type: "event",
364
334
  params: {
@@ -370,7 +340,7 @@ function useAppUpdateDialogLogging() {
370
340
  });
371
341
  };
372
342
  const logCloseClick = () => {
373
- import_native_modules4.INTERNAL__module.tossCoreEventLog({
343
+ import_native_modules3.INTERNAL__module.tossCoreEventLog({
374
344
  log_name: UPDATE_DIALOG_CTA_CLICK_LOG_NAME,
375
345
  log_type: "event",
376
346
  params: {
@@ -382,7 +352,7 @@ function useAppUpdateDialogLogging() {
382
352
  });
383
353
  };
384
354
  const logDialogShow = () => {
385
- import_native_modules4.INTERNAL__module.tossCoreEventLog({
355
+ import_native_modules3.INTERNAL__module.tossCoreEventLog({
386
356
  log_name: UPDATE_DIALOG_LOG_NAME,
387
357
  log_type: "popup",
388
358
  params: {
@@ -395,13 +365,13 @@ function useAppUpdateDialogLogging() {
395
365
  }
396
366
 
397
367
  // src/hooks/useGameCenterProfile.ts
398
- var import_native_modules6 = require("@apps-in-toss/native-modules");
399
- var import_react11 = require("react");
368
+ var import_native_modules5 = require("@apps-in-toss/native-modules");
369
+ var import_react10 = require("react");
400
370
 
401
371
  // src/hooks/useErrorAlert.ts
402
372
  var import_react_native8 = require("@granite-js/react-native");
403
- var import_tds_react_native3 = require("@toss/tds-react-native");
404
- var import_react8 = require("react");
373
+ var import_tds_react_native2 = require("@toss/tds-react-native");
374
+ var import_react7 = require("react");
405
375
 
406
376
  // src/utils/error.ts
407
377
  var DEFAULT_ERROR = {
@@ -411,8 +381,8 @@ var DEFAULT_ERROR = {
411
381
 
412
382
  // src/hooks/useErrorAlert.ts
413
383
  var useErrorAlert = () => {
414
- const { openAlert } = (0, import_tds_react_native3.useDialog)();
415
- const openErrorAlert = (0, import_react8.useCallback)(async () => {
384
+ const { openAlert } = (0, import_tds_react_native2.useDialog)();
385
+ const openErrorAlert = (0, import_react7.useCallback)(async () => {
416
386
  await openAlert({
417
387
  title: DEFAULT_ERROR.title,
418
388
  description: DEFAULT_ERROR.description
@@ -423,14 +393,14 @@ var useErrorAlert = () => {
423
393
  };
424
394
 
425
395
  // src/hooks/useTransparentWebview.tsx
426
- var import_react9 = require("react");
396
+ var import_react8 = require("react");
427
397
 
428
398
  // src/utils/openTransparentWebView.ts
429
399
  var import_react_native9 = require("@granite-js/react-native");
430
400
 
431
401
  // src/private.ts
432
- var import_native_modules5 = require("@apps-in-toss/native-modules");
433
- var INTERNAL__onVisibilityChangedByTransparentServiceWeb = import_native_modules5.onVisibilityChangedByTransparentServiceWeb;
402
+ var import_native_modules4 = require("@apps-in-toss/native-modules");
403
+ var INTERNAL__onVisibilityChangedByTransparentServiceWeb = import_native_modules4.onVisibilityChangedByTransparentServiceWeb;
434
404
 
435
405
  // src/utils/openTransparentWebView.ts
436
406
  var openTransparentWebView = ({
@@ -465,9 +435,9 @@ var openTransparentWebView = ({
465
435
 
466
436
  // src/hooks/useTransparentWebview.tsx
467
437
  var useTransparentWebview = () => {
468
- const [isWebviewLoading, setIsWebviewLoading] = (0, import_react9.useState)(false);
438
+ const [isWebviewLoading, setIsWebviewLoading] = (0, import_react8.useState)(false);
469
439
  const { open: openErrorAlert } = useErrorAlert();
470
- const _openTransparentWebview = (0, import_react9.useCallback)(
440
+ const _openTransparentWebview = (0, import_react8.useCallback)(
471
441
  ({ webUrl, onClose, onError }) => {
472
442
  if (isWebviewLoading) {
473
443
  return;
@@ -499,18 +469,18 @@ var useTransparentWebview = () => {
499
469
  };
500
470
 
501
471
  // src/components/GameProfileToast.tsx
502
- var import_tds_react_native4 = require("@toss/tds-react-native");
472
+ var import_tds_react_native3 = require("@toss/tds-react-native");
503
473
  var import_private2 = require("@toss/tds-react-native/private");
504
- var import_react10 = require("react");
474
+ var import_react9 = require("react");
505
475
  var import_jsx_runtime3 = require("react/jsx-runtime");
506
476
  var useGameProfileToast = () => {
507
477
  const overlay = (0, import_private2.useOverlay)();
508
- const openGameProfileToast = (0, import_react10.useCallback)(
478
+ const openGameProfileToast = (0, import_react9.useCallback)(
509
479
  (nickname, profileImageUri) => {
510
480
  return new Promise((resolve) => {
511
481
  overlay.open(({ isOpen, close, exit }) => {
512
482
  return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_private2.ColorPreferenceProvider, { colorPreference: "dark", children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_private2.AdaptiveColorProvider, { children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
513
- import_tds_react_native4.Toast,
483
+ import_tds_react_native3.Toast,
514
484
  {
515
485
  open: isOpen,
516
486
  onClose: () => {
@@ -521,10 +491,10 @@ var useGameProfileToast = () => {
521
491
  position: "top",
522
492
  text: `${nickname}\uB2D8 \uBC18\uAC00\uC6CC\uC694!`,
523
493
  icon: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
524
- import_tds_react_native4.Asset.Image,
494
+ import_tds_react_native3.Asset.Image,
525
495
  {
526
496
  style: { borderRadius: 64, overflow: "hidden" },
527
- frameShape: import_tds_react_native4.Asset.frameShape.CleanW32,
497
+ frameShape: import_tds_react_native3.Asset.frameShape.CleanW32,
528
498
  source: { uri: profileImageUri }
529
499
  }
530
500
  )
@@ -539,19 +509,19 @@ var useGameProfileToast = () => {
539
509
  };
540
510
 
541
511
  // src/hooks/useGameCenterProfile.ts
542
- var useGameCenterProfile = (isReadyForProfileUI) => {
543
- const [profileData, setProfileData] = (0, import_react11.useState)(void 0);
544
- const [isProfileDataLoading, setIsProfileDataLoading] = (0, import_react11.useState)(true);
545
- const [isProfileDataRefetching, setIsProfileDataRefetching] = (0, import_react11.useState)(false);
546
- const shouldShowProfileLoadingOverlay = isProfileDataLoading && isReadyForProfileUI || isProfileDataRefetching;
547
- const shouldShowProfileNotFoundOverlay = profileData?.statusCode === "PROFILE_NOT_FOUND" && isReadyForProfileUI && !isProfileDataRefetching;
548
- const canShowBottomSheetOrToast = !isProfileDataLoading && isReadyForProfileUI;
512
+ var useGameCenterProfile = () => {
513
+ const [profileData, setProfileData] = (0, import_react10.useState)(void 0);
514
+ const [isProfileDataLoading, setIsProfileDataLoading] = (0, import_react10.useState)(true);
515
+ const [isProfileDataRefetching, setIsProfileDataRefetching] = (0, import_react10.useState)(false);
516
+ const shouldShowProfileLoadingOverlay = isProfileDataLoading || isProfileDataRefetching;
517
+ const shouldShowProfileNotFoundOverlay = profileData?.statusCode === "PROFILE_NOT_FOUND" && !isProfileDataRefetching;
518
+ const canShowBottomSheetOrToast = !isProfileDataLoading;
549
519
  const { openGameProfileToast } = useGameProfileToast();
550
520
  const { open: openErrorAlert } = useErrorAlert();
551
521
  const { open: openTransparentWebView2 } = useTransparentWebview();
552
- const fetchProfileData = (0, import_react11.useCallback)(async () => {
522
+ const fetchProfileData = (0, import_react10.useCallback)(async () => {
553
523
  try {
554
- const data = await (0, import_native_modules6.getGameCenterGameProfile)();
524
+ const data = await (0, import_native_modules5.getGameCenterGameProfile)();
555
525
  setProfileData(data);
556
526
  setIsProfileDataLoading(false);
557
527
  } catch (_) {
@@ -559,10 +529,10 @@ var useGameCenterProfile = (isReadyForProfileUI) => {
559
529
  setIsProfileDataLoading(false);
560
530
  }
561
531
  }, [openErrorAlert]);
562
- const refetchProfileData = (0, import_react11.useCallback)(async () => {
532
+ const refetchProfileData = (0, import_react10.useCallback)(async () => {
563
533
  try {
564
534
  setIsProfileDataRefetching(true);
565
- const data = await (0, import_native_modules6.getGameCenterGameProfile)();
535
+ const data = await (0, import_native_modules5.getGameCenterGameProfile)();
566
536
  setProfileData(data);
567
537
  setIsProfileDataRefetching(false);
568
538
  if (data?.statusCode === "SUCCESS") {
@@ -573,7 +543,7 @@ var useGameCenterProfile = (isReadyForProfileUI) => {
573
543
  openErrorAlert();
574
544
  }
575
545
  }, [openErrorAlert, openGameProfileToast]);
576
- const openProfileWebview = (0, import_react11.useCallback)(() => {
546
+ const openProfileWebview = (0, import_react10.useCallback)(() => {
577
547
  openTransparentWebView2({
578
548
  webUrl: `${GAME_PROFILE_WEBVIEW_URL}?appName=${getAppName()}&referrer=appsintoss.${getAppName()}`,
579
549
  onClose: async () => {
@@ -607,7 +577,7 @@ var Z_INDEX = {
607
577
 
608
578
  // src/components/GameInitializer.tsx
609
579
  var import_jsx_runtime4 = require("react/jsx-runtime");
610
- var GameInitializer = ({ children, isReadyForProfileUI }) => {
580
+ var GameInitializer = ({ children }) => {
611
581
  const {
612
582
  profileData,
613
583
  shouldShowProfileLoadingOverlay,
@@ -616,13 +586,13 @@ var GameInitializer = ({ children, isReadyForProfileUI }) => {
616
586
  openProfileWebview,
617
587
  openGameProfileToast,
618
588
  fetchProfileData
619
- } = useGameCenterProfile(isReadyForProfileUI);
620
- const isCompletedFlow = (0, import_react12.useRef)(false);
589
+ } = useGameCenterProfile();
590
+ const isCompletedFlow = (0, import_react11.useRef)(false);
621
591
  const { open: openAppUpdateDialog } = useAppUpdateDialog();
622
- (0, import_react12.useEffect)(() => {
592
+ (0, import_react11.useEffect)(() => {
623
593
  fetchProfileData();
624
594
  }, []);
625
- (0, import_react12.useEffect)(() => {
595
+ (0, import_react11.useEffect)(() => {
626
596
  const handleGameProfileFlow = async () => {
627
597
  if (!canShowBottomSheetOrToast) {
628
598
  return;
@@ -631,7 +601,7 @@ var GameInitializer = ({ children, isReadyForProfileUI }) => {
631
601
  return;
632
602
  }
633
603
  isCompletedFlow.current = true;
634
- if (!(0, import_native_modules7.isMinVersionSupported)(GAME_MIN_VERSION)) {
604
+ if (!(0, import_native_modules6.isMinVersionSupported)(GAME_MIN_VERSION)) {
635
605
  openAppUpdateDialog({
636
606
  title: `${(0, import_es_hangul.josa)(getAppsInTossGlobals().brandDisplayName, "\uC744/\uB97C")} \uD558\uB824\uBA74
637
607
  \uC571\uC744 \uC5C5\uB370\uC774\uD2B8\uD574\uC8FC\uC138\uC694`,
@@ -658,7 +628,7 @@ var GameInitializer = ({ children, isReadyForProfileUI }) => {
658
628
  openProfileWebview,
659
629
  profileData
660
630
  ]);
661
- if (!(0, import_native_modules7.isMinVersionSupported)(GAME_MIN_VERSION)) {
631
+ if (!(0, import_native_modules6.isMinVersionSupported)(GAME_MIN_VERSION)) {
662
632
  return /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(import_jsx_runtime4.Fragment, { children: [
663
633
  /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(import_react_native11.View, { style: { flex: 1, position: "relative" }, children }),
664
634
  /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
@@ -692,7 +662,7 @@ var GameInitializer = ({ children, isReadyForProfileUI }) => {
692
662
  alignItems: "center",
693
663
  backgroundColor: "rgba(0, 0, 0, 0.2)"
694
664
  },
695
- children: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(import_tds_react_native5.Loader, { size: "large", type: "light" })
665
+ children: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(import_tds_react_native4.Loader, { size: "large", type: "light" })
696
666
  }
697
667
  )
698
668
  ] });
@@ -728,10 +698,10 @@ var overlayStyle = {
728
698
  var import_private5 = require("@toss/tds-react-native/private");
729
699
 
730
700
  // src/components/NavigationBar/RNNavigationBar/hooks/useHardwareBackPress.ts
731
- var import_react13 = require("react");
701
+ var import_react12 = require("react");
732
702
  var import_react_native12 = require("react-native");
733
703
  function useHardwareBackPress(handler) {
734
- (0, import_react13.useEffect)(() => {
704
+ (0, import_react12.useEffect)(() => {
735
705
  const handleBackPress = () => {
736
706
  handler();
737
707
  return true;
@@ -743,16 +713,16 @@ function useHardwareBackPress(handler) {
743
713
 
744
714
  // src/components/NavigationBar/RNNavigationBar/hooks/useNavigationEvent.ts
745
715
  var import_react_native14 = require("@granite-js/react-native");
746
- var import_react15 = require("react");
716
+ var import_react14 = require("react");
747
717
 
748
718
  // src/components/NavigationBar/RNNavigationBar/hooks/useCloseConfirm.ts
749
- var import_tds_react_native6 = require("@toss/tds-react-native");
719
+ var import_tds_react_native5 = require("@toss/tds-react-native");
750
720
  var import_es_hangul2 = require("es-hangul");
751
- var import_react14 = require("react");
721
+ var import_react13 = require("react");
752
722
  function useCloseConfirm() {
753
723
  const { brandDisplayName } = getAppsInTossGlobals();
754
- const { openConfirm } = (0, import_tds_react_native6.useDialog)();
755
- return (0, import_react14.useCallback)(async ({ onEntered }) => {
724
+ const { openConfirm } = (0, import_tds_react_native5.useDialog)();
725
+ return (0, import_react13.useCallback)(async ({ onEntered }) => {
756
726
  return await openConfirm({
757
727
  title: `${(0, import_es_hangul2.josa)(brandDisplayName, "\uC744/\uB97C")} \uC885\uB8CC\uD560\uAE4C\uC694?`,
758
728
  leftButton: "\uCDE8\uC18C",
@@ -764,7 +734,7 @@ function useCloseConfirm() {
764
734
  }
765
735
 
766
736
  // src/components/NavigationBar/common/useNavigationBarLogging.tsx
767
- var import_native_modules8 = require("@apps-in-toss/native-modules");
737
+ var import_native_modules7 = require("@apps-in-toss/native-modules");
768
738
  var import_react_native13 = require("@granite-js/react-native");
769
739
  var NAVI_BAR_IMPRESSION_SCHEMA_ID = 1596837;
770
740
  var NAVI_BAR_IMPRESSION_LOG_NAME = "appsintoss_app_visit__common_module::impression__navigation_bar";
@@ -783,7 +753,7 @@ function useNavigationBarLogging() {
783
753
  app_name: import_react_native13.Granite.appName
784
754
  };
785
755
  const logNavBarImpression = (naviBarConfig) => {
786
- import_native_modules8.INTERNAL__module.tossCoreEventLog({
756
+ import_native_modules7.INTERNAL__module.tossCoreEventLog({
787
757
  log_name: NAVI_BAR_IMPRESSION_LOG_NAME,
788
758
  log_type: "event",
789
759
  params: {
@@ -795,7 +765,7 @@ function useNavigationBarLogging() {
795
765
  });
796
766
  };
797
767
  const logHomeButtonClick = () => {
798
- import_native_modules8.INTERNAL__module.tossCoreEventLog({
768
+ import_native_modules7.INTERNAL__module.tossCoreEventLog({
799
769
  log_name: HOME_BUTTON_CLICK_LOG_NAME,
800
770
  log_type: "event",
801
771
  params: {
@@ -806,7 +776,7 @@ function useNavigationBarLogging() {
806
776
  });
807
777
  };
808
778
  const logCloseButtonClick = () => {
809
- import_native_modules8.INTERNAL__module.tossCoreEventLog({
779
+ import_native_modules7.INTERNAL__module.tossCoreEventLog({
810
780
  log_name: CLOSE_BUTTON_CLICK_LOG_NAME,
811
781
  log_type: "event",
812
782
  params: {
@@ -817,7 +787,7 @@ function useNavigationBarLogging() {
817
787
  });
818
788
  };
819
789
  const logClosePopupShow = () => {
820
- import_native_modules8.INTERNAL__module.tossCoreEventLog({
790
+ import_native_modules7.INTERNAL__module.tossCoreEventLog({
821
791
  log_name: CLOSE_POPUP_SHOW_LOG_NAME,
822
792
  log_type: "popup",
823
793
  params: {
@@ -827,7 +797,7 @@ function useNavigationBarLogging() {
827
797
  });
828
798
  };
829
799
  const logClosePopupCtaClick = (confirm) => {
830
- import_native_modules8.INTERNAL__module.tossCoreEventLog({
800
+ import_native_modules7.INTERNAL__module.tossCoreEventLog({
831
801
  log_name: CLOSE_POPUP_CTA_CLICK_LOG_NAME,
832
802
  log_type: "event",
833
803
  params: {
@@ -854,7 +824,7 @@ function useNavigationEvent() {
854
824
  const navigation = (0, import_react_native14.useNavigation)();
855
825
  const closeConfirm = useCloseConfirm();
856
826
  const { captureExitLog } = useCaptureExitLog();
857
- return (0, import_react15.useMemo)(() => {
827
+ return (0, import_react14.useMemo)(() => {
858
828
  const close = async () => {
859
829
  const hasConfirmed = await closeConfirm({
860
830
  onEntered: logging.closePopupShow
@@ -888,25 +858,25 @@ function useNavigationEvent() {
888
858
  }
889
859
 
890
860
  // src/core/hooks/useMoreButtonBottomSheet/index.tsx
891
- var import_native_modules12 = require("@apps-in-toss/native-modules");
861
+ var import_native_modules11 = require("@apps-in-toss/native-modules");
892
862
  var import_react_native20 = require("@granite-js/react-native");
893
- var import_tds_react_native9 = require("@toss/tds-react-native");
863
+ var import_tds_react_native8 = require("@toss/tds-react-native");
894
864
  var import_private4 = require("@toss/tds-react-native/private");
895
- var import_react16 = require("react");
865
+ var import_react15 = require("react");
896
866
 
897
867
  // src/core/hooks/useMoreButtonBottomSheet/AppShareListMenu.tsx
898
- var import_native_modules10 = require("@apps-in-toss/native-modules");
868
+ var import_native_modules9 = require("@apps-in-toss/native-modules");
899
869
  var import_react_native17 = require("@granite-js/react-native");
900
- var import_tds_react_native8 = require("@toss/tds-react-native");
870
+ var import_tds_react_native7 = require("@toss/tds-react-native");
901
871
  var import_react_native18 = require("react-native");
902
872
 
903
873
  // src/core/hooks/useMoreButtonBottomSheet/Menu.tsx
904
- var import_tds_react_native7 = require("@toss/tds-react-native");
874
+ var import_tds_react_native6 = require("@toss/tds-react-native");
905
875
  var import_private3 = require("@toss/tds-react-native/private");
906
876
  var import_react_native16 = require("react-native");
907
877
 
908
878
  // src/core/hooks/useMoreButtonBottomSheet/useMoreButtonBottomSheetLogging.tsx
909
- var import_native_modules9 = require("@apps-in-toss/native-modules");
879
+ var import_native_modules8 = require("@apps-in-toss/native-modules");
910
880
  var import_react_native15 = require("@granite-js/react-native");
911
881
  var BOTTOM_SHEET_SCHEMA_ID = 1596825;
912
882
  var BOTTOM_SHEET_LOG_NAME = "appsintoss_app_visit__common_module::bottomsheet__more";
@@ -923,7 +893,7 @@ function useMoreButtonBottomSheetLogging() {
923
893
  app_name: import_react_native15.Granite.appName
924
894
  };
925
895
  const logBottomSheetShow = () => {
926
- import_native_modules9.INTERNAL__module.tossCoreEventLog({
896
+ import_native_modules8.INTERNAL__module.tossCoreEventLog({
927
897
  log_name: BOTTOM_SHEET_LOG_NAME,
928
898
  log_type: "popup",
929
899
  params: {
@@ -933,7 +903,7 @@ function useMoreButtonBottomSheetLogging() {
933
903
  });
934
904
  };
935
905
  const logBottomSheetOpen = () => {
936
- import_native_modules9.INTERNAL__module.tossCoreEventLog({
906
+ import_native_modules8.INTERNAL__module.tossCoreEventLog({
937
907
  log_name: BOTTOM_SHEET_OPEN_LOG_NAME,
938
908
  log_type: "event",
939
909
  params: {
@@ -944,7 +914,7 @@ function useMoreButtonBottomSheetLogging() {
944
914
  });
945
915
  };
946
916
  const logBottomSheetCloseClick = () => {
947
- import_native_modules9.INTERNAL__module.tossCoreEventLog({
917
+ import_native_modules8.INTERNAL__module.tossCoreEventLog({
948
918
  log_name: BOTTOM_SHEET_CLOSE_CLICK_LOG_NAME,
949
919
  log_type: "event",
950
920
  params: {
@@ -955,7 +925,7 @@ function useMoreButtonBottomSheetLogging() {
955
925
  });
956
926
  };
957
927
  const logBottomSheetMenuClick = ({ title }) => {
958
- import_native_modules9.INTERNAL__module.tossCoreEventLog({
928
+ import_native_modules8.INTERNAL__module.tossCoreEventLog({
959
929
  log_name: BOTTOM_SHEET_MENU_CLICK_LOG_NAME,
960
930
  log_type: "event",
961
931
  params: {
@@ -984,7 +954,7 @@ function Menu({ title, iconURL, onPress }) {
984
954
  const brandPrimaryColorRGB = hexToRGB(globals.brandPrimaryColor);
985
955
  const iconBackgroundColor = brandPrimaryColorRGB ? `rgba(${brandPrimaryColorRGB.join(",")},0.1)` : adaptive.grey100;
986
956
  return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
987
- import_tds_react_native7.ListRow,
957
+ import_tds_react_native6.ListRow,
988
958
  {
989
959
  left: /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
990
960
  import_react_native16.View,
@@ -1000,14 +970,14 @@ function Menu({ title, iconURL, onPress }) {
1000
970
  backgroundColor: iconBackgroundColor
1001
971
  },
1002
972
  children: iconName ? /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
1003
- import_tds_react_native7.Asset.Icon,
973
+ import_tds_react_native6.Asset.Icon,
1004
974
  {
1005
975
  frameShape: { width: 20, height: 20 },
1006
976
  color: globals.brandPrimaryColor,
1007
977
  name: iconName
1008
978
  }
1009
979
  ) : /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
1010
- import_tds_react_native7.Asset.Image,
980
+ import_tds_react_native6.Asset.Image,
1011
981
  {
1012
982
  frameShape: { width: 20, height: 20 },
1013
983
  source: { uri: iconURL }
@@ -1016,7 +986,7 @@ function Menu({ title, iconURL, onPress }) {
1016
986
  }
1017
987
  ),
1018
988
  contents: /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
1019
- import_tds_react_native7.ListRow.Texts,
989
+ import_tds_react_native6.ListRow.Texts,
1020
990
  {
1021
991
  type: "1RowTypeA",
1022
992
  top: title,
@@ -1068,8 +1038,8 @@ var APP_SHARE_MENU_INFO = {
1068
1038
  };
1069
1039
  function AppShareListMenu() {
1070
1040
  const initialScheme = (0, import_react_native17.getSchemeUri)();
1071
- const isSandbox = (0, import_native_modules10.getOperationalEnvironment)() === "sandbox";
1072
- const { openConfirm } = (0, import_tds_react_native8.useDialog)();
1041
+ const isSandbox = (0, import_native_modules9.getOperationalEnvironment)() === "sandbox";
1042
+ const { openConfirm } = (0, import_tds_react_native7.useDialog)();
1073
1043
  const schemeForShare = addParamsToUrl(initialScheme, {
1074
1044
  referrer: SHARE_SCHEME_REFERRER
1075
1045
  });
@@ -1099,12 +1069,12 @@ function AppShareListMenu() {
1099
1069
  }
1100
1070
 
1101
1071
  // src/core/hooks/useMoreButtonBottomSheet/PermissionsMenu.tsx
1102
- var import_native_modules11 = require("@apps-in-toss/native-modules");
1072
+ var import_native_modules10 = require("@apps-in-toss/native-modules");
1103
1073
  var import_react_native19 = require("@granite-js/react-native");
1104
1074
  var import_jsx_runtime7 = require("react/jsx-runtime");
1105
1075
  function PermissionsMenu() {
1106
1076
  const globals = getAppsInTossGlobals();
1107
- if ((0, import_native_modules11.getOperationalEnvironment)() === "sandbox") {
1077
+ if ((0, import_native_modules10.getOperationalEnvironment)() === "sandbox") {
1108
1078
  return null;
1109
1079
  }
1110
1080
  return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
@@ -1145,19 +1115,19 @@ var MIN_VERSION = {
1145
1115
  function useMoreButtonBottomSheet() {
1146
1116
  const globals = getAppsInTossGlobals();
1147
1117
  const adaptive = (0, import_private4.useAdaptive)();
1148
- const [itemList, setItemList] = (0, import_react16.useState)([]);
1118
+ const [itemList, setItemList] = (0, import_react15.useState)([]);
1149
1119
  const appUpdateDialog = useAppUpdateDialog();
1150
1120
  const logging = useMoreButtonBottomSheetLogging();
1151
1121
  const overlay = (0, import_private4.useOverlay)();
1152
1122
  const title = ensureValue(globals.brandDisplayName, "displayName");
1153
- const isBottomSheetSupported = (0, import_native_modules12.isMinVersionSupported)(MIN_VERSION.BOTTOM_SHEET);
1154
- const isShareListMenuSupported = (0, import_native_modules12.isMinVersionSupported)(MIN_VERSION.SHARE_LIST_MENU);
1155
- const [isPermissionsMenuSupported, setIsPermissionsMenuSupported] = (0, import_react16.useState)(false);
1156
- (0, import_react16.useEffect)(() => {
1123
+ const isBottomSheetSupported = (0, import_native_modules11.isMinVersionSupported)(MIN_VERSION.BOTTOM_SHEET);
1124
+ const isShareListMenuSupported = (0, import_native_modules11.isMinVersionSupported)(MIN_VERSION.SHARE_LIST_MENU);
1125
+ const [isPermissionsMenuSupported, setIsPermissionsMenuSupported] = (0, import_react15.useState)(false);
1126
+ (0, import_react15.useEffect)(() => {
1157
1127
  if (!isBottomSheetSupported) {
1158
1128
  return;
1159
1129
  }
1160
- import_native_modules12.INTERNAL__appBridgeHandler.invokeAppBridgeMethod(
1130
+ import_native_modules11.INTERNAL__appBridgeHandler.invokeAppBridgeMethod(
1161
1131
  APP_BRIDGE_METHOD_NAME,
1162
1132
  {},
1163
1133
  {
@@ -1165,8 +1135,8 @@ function useMoreButtonBottomSheet() {
1165
1135
  onError: (error) => console.error("\uBA54\uB274 \uBAA9\uB85D\uC744 \uAC00\uC838\uC624\uB294 \uB370 \uC2E4\uD328\uD588\uC5B4\uC694:", error)
1166
1136
  }
1167
1137
  );
1168
- if ((0, import_native_modules12.isMinVersionSupported)(MIN_VERSION.PERMISSIONS_MENU)) {
1169
- import_native_modules12.INTERNAL__appBridgeHandler.invokeAppBridgeMethod(
1138
+ if ((0, import_native_modules11.isMinVersionSupported)(MIN_VERSION.PERMISSIONS_MENU)) {
1139
+ import_native_modules11.INTERNAL__appBridgeHandler.invokeAppBridgeMethod(
1170
1140
  "getAllPermission",
1171
1141
  {},
1172
1142
  {
@@ -1191,17 +1161,17 @@ function useMoreButtonBottomSheet() {
1191
1161
  close();
1192
1162
  };
1193
1163
  return /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(BottomSheetImpressionArea, { children: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
1194
- import_tds_react_native9.BottomSheet.Root,
1164
+ import_tds_react_native8.BottomSheet.Root,
1195
1165
  {
1196
1166
  header: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
1197
- import_tds_react_native9.ListHeader,
1167
+ import_tds_react_native8.ListHeader,
1198
1168
  {
1199
- title: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_tds_react_native9.ListHeader.TitleParagraph, { color: adaptive.grey800, fontWeight: "bold", typography: "t5", children: title })
1169
+ title: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_tds_react_native8.ListHeader.TitleParagraph, { color: adaptive.grey800, fontWeight: "bold", typography: "t5", children: title })
1200
1170
  }
1201
1171
  ),
1202
1172
  open: isOpen,
1203
1173
  cta: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
1204
- import_tds_react_native9.BottomSheet.CTA,
1174
+ import_tds_react_native8.BottomSheet.CTA,
1205
1175
  {
1206
1176
  size: "large",
1207
1177
  type: "dark",
@@ -1214,7 +1184,7 @@ function useMoreButtonBottomSheet() {
1214
1184
  ),
1215
1185
  onClose: handleClose,
1216
1186
  onExited: exit,
1217
- children: /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(import_tds_react_native9.List, { rowSeparator: "none", children: [
1187
+ children: /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(import_tds_react_native8.List, { rowSeparator: "none", children: [
1218
1188
  itemList.map(
1219
1189
  (item) => /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
1220
1190
  Menu,
@@ -1237,22 +1207,27 @@ function useMoreButtonBottomSheet() {
1237
1207
  }
1238
1208
  function BottomSheetImpressionArea({ children }) {
1239
1209
  const logging = useMoreButtonBottomSheetLogging();
1240
- (0, import_react16.useEffect)(() => {
1210
+ (0, import_react15.useEffect)(() => {
1241
1211
  logging.show();
1242
1212
  }, [logging]);
1243
1213
  return /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_jsx_runtime8.Fragment, { children });
1244
1214
  }
1245
1215
 
1216
+ // src/core/utils/toIcon.ts
1217
+ function toIcon(source) {
1218
+ return source.startsWith("http") ? { source: { uri: source } } : { name: source };
1219
+ }
1220
+
1246
1221
  // src/components/NavigationBar/common/NavigationBarImpressionArea.tsx
1247
- var import_react17 = require("react");
1222
+ var import_react16 = require("react");
1248
1223
  var import_jsx_runtime9 = require("react/jsx-runtime");
1249
1224
  function NavigationBarImpressionArea({
1250
1225
  children,
1251
1226
  withHomeButton
1252
1227
  }) {
1253
- const hasLogged = (0, import_react17.useRef)(false);
1228
+ const hasLogged = (0, import_react16.useRef)(false);
1254
1229
  const logging = useNavigationBarLogging();
1255
- (0, import_react17.useEffect)(() => {
1230
+ (0, import_react16.useEffect)(() => {
1256
1231
  if (hasLogged.current === false) {
1257
1232
  logging.navBarImpression({ home_icon_yn: withHomeButton ? "Y" : "N" });
1258
1233
  hasLogged.current = true;
@@ -1291,7 +1266,7 @@ function DefaultNavigationBar() {
1291
1266
 
1292
1267
  // src/components/NavigationBar/RNNavigationBar/Game.tsx
1293
1268
  var import_react_native_safe_area_context = require("@granite-js/native/react-native-safe-area-context");
1294
- var import_tds_react_native10 = require("@toss/tds-react-native");
1269
+ var import_tds_react_native9 = require("@toss/tds-react-native");
1295
1270
  var import_private6 = require("@toss/tds-react-native/private");
1296
1271
  var import_react_native21 = require("react-native");
1297
1272
  var import_jsx_runtime11 = require("react/jsx-runtime");
@@ -1303,7 +1278,7 @@ function GameNavigationBar() {
1303
1278
  const { right: safeAreaRight } = (0, import_react_native_safe_area_context.useSafeAreaInsets)();
1304
1279
  useHardwareBackPress(navigationEvent.handleBack);
1305
1280
  return /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)(import_jsx_runtime11.Fragment, { children: [
1306
- /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(import_tds_react_native10.PageNavbar, { preference: { type: "none" } }),
1281
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(import_tds_react_native9.PageNavbar, { preference: { type: "none" } }),
1307
1282
  /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
1308
1283
  import_react_native21.View,
1309
1284
  {
@@ -1359,26 +1334,18 @@ function RNAppContainer({ children }) {
1359
1334
  }
1360
1335
  }
1361
1336
  function GameAppContainer({ children }) {
1362
- const [isEntryMessageExited, setIsEntryMessageExited] = (0, import_react18.useState)(false);
1363
- (0, import_react18.useEffect)(() => {
1337
+ (0, import_react17.useEffect)(() => {
1364
1338
  if (import_react_native22.Platform.OS === "ios") {
1365
- (0, import_native_modules13.setIosSwipeGestureEnabled)({ isEnabled: false });
1339
+ (0, import_native_modules12.setIosSwipeGestureEnabled)({ isEnabled: false });
1366
1340
  return () => {
1367
- (0, import_native_modules13.setIosSwipeGestureEnabled)({ isEnabled: true });
1341
+ (0, import_native_modules12.setIosSwipeGestureEnabled)({ isEnabled: true });
1368
1342
  };
1369
1343
  }
1370
1344
  return;
1371
1345
  }, []);
1372
- (0, import_react18.useEffect)(() => {
1373
- import_native_modules13.appsInTossEvent.addEventListener("entryMessageExited", {
1374
- onEvent: () => {
1375
- setIsEntryMessageExited(true);
1376
- }
1377
- });
1378
- }, []);
1379
1346
  return /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(import_jsx_runtime12.Fragment, { children: [
1380
1347
  /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(RNNavigationBar.Game, {}),
1381
- (0, bridge_entry_exports.getOperationalEnvironment)() === "toss" ? /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(GameInitializer, { isReadyForProfileUI: isEntryMessageExited, children }) : children
1348
+ (0, bridge_entry_exports.getOperationalEnvironment)() === "toss" ? /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(GameInitializer, { children }) : children
1382
1349
  ] });
1383
1350
  }
1384
1351
  function GeneralAppContainer({ children }) {
@@ -1391,7 +1358,7 @@ function GeneralAppContainer({ children }) {
1391
1358
  // src/core/registerApp.tsx
1392
1359
  var import_jsx_runtime13 = require("react/jsx-runtime");
1393
1360
  function AppsInTossContainer(Container, { children, ...initialProps }) {
1394
- if (!(0, import_native_modules14.isMinVersionSupported)({
1361
+ if (!(0, import_native_modules13.isMinVersionSupported)({
1395
1362
  android: "5.220.0",
1396
1363
  ios: "5.221.0"
1397
1364
  })) {
@@ -1405,25 +1372,21 @@ function AppsInTossContainer(Container, { children, ...initialProps }) {
1405
1372
  /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(AppEvent.StayTime, {}),
1406
1373
  /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(AppEvent.Entry, {}),
1407
1374
  /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(AppEvent.System, { ...initialProps }),
1408
- /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(Container, { ...initialProps, children: /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_tds_react_native11.TDSProvider, { colorPreference: "light", token: { color: { primary: getAppsInTossGlobals().brandPrimaryColor } }, children: /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(TDSContainer, { ...initialProps, children }) }) })
1375
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(Container, { ...initialProps, children: /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_tds_react_native10.TDSProvider, { colorPreference: "light", token: { color: { primary: getAppsInTossGlobals().brandPrimaryColor } }, children }) })
1409
1376
  ] });
1410
1377
  }
1411
- function TDSContainer({ children }) {
1412
- useAppsInTossBridge();
1413
- return /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_jsx_runtime13.Fragment, { children });
1414
- }
1415
1378
  function registerApp(container, { context, analytics }) {
1416
1379
  const appName = getAppName();
1417
1380
  const isRegistered = import_react_native24.AppRegistry.getAppKeys().includes(appName);
1418
1381
  if (!isRegistered) {
1419
1382
  import_analytics.Analytics.init({
1420
- logger: (params) => void (0, import_native_modules14.eventLog)(params),
1383
+ logger: (params) => void (0, import_native_modules13.eventLog)(params),
1421
1384
  debug: analytics?.debug ?? __DEV__
1422
1385
  });
1423
1386
  const App = import_react_native23.Granite.registerApp(AppsInTossContainer.bind(null, container), {
1424
1387
  appName,
1425
1388
  context,
1426
- setIosSwipeGestureEnabled: import_native_modules14.setIosSwipeGestureEnabled,
1389
+ setIosSwipeGestureEnabled: import_native_modules13.setIosSwipeGestureEnabled,
1427
1390
  router: {
1428
1391
  screenContainer: AppsInTossScreenContainer,
1429
1392
  defaultScreenOption: {
@@ -1454,42 +1417,42 @@ var AppsInToss = {
1454
1417
  };
1455
1418
 
1456
1419
  // src/components/WebView.tsx
1457
- var import_native_modules23 = require("@apps-in-toss/native-modules");
1420
+ var import_native_modules18 = require("@apps-in-toss/native-modules");
1458
1421
  var appsInTossAsyncBridges = __toESM(require("@apps-in-toss/native-modules/async-bridges"), 1);
1459
1422
  var appsInTossConstantBridges = __toESM(require("@apps-in-toss/native-modules/constant-bridges"), 1);
1460
1423
  var appsInTossEventBridges = __toESM(require("@apps-in-toss/native-modules/event-bridges"), 1);
1461
1424
  var import_react_native_safe_area_context4 = require("@granite-js/native/react-native-safe-area-context");
1462
- var import_react_native37 = require("@granite-js/react-native");
1463
- var import_tds_react_native15 = require("@toss/tds-react-native");
1425
+ var import_react_native34 = require("@granite-js/react-native");
1426
+ var import_tds_react_native14 = require("@toss/tds-react-native");
1464
1427
  var import_private9 = require("@toss/tds-react-native/private");
1465
- var import_react29 = require("react");
1466
- var import_react_native38 = require("react-native");
1428
+ var import_react28 = require("react");
1429
+ var import_react_native35 = require("react-native");
1467
1430
 
1468
1431
  // src/components/GameWebView.tsx
1469
- var import_native_modules15 = require("@apps-in-toss/native-modules");
1432
+ var import_native_modules14 = require("@apps-in-toss/native-modules");
1470
1433
  var import_react_native_webview = require("@granite-js/native/react-native-webview");
1471
- var import_react20 = require("react");
1434
+ var import_react19 = require("react");
1472
1435
  var import_react_native27 = require("react-native");
1473
1436
 
1474
1437
  // src/components/NavigationBar/GameWebviewNavigationBar.tsx
1475
1438
  var import_react_native_safe_area_context2 = require("@granite-js/native/react-native-safe-area-context");
1476
1439
  var import_react_native25 = require("@granite-js/react-native");
1477
- var import_tds_react_native12 = require("@toss/tds-react-native");
1440
+ var import_tds_react_native11 = require("@toss/tds-react-native");
1478
1441
  var import_private7 = require("@toss/tds-react-native/private");
1479
1442
  var import_es_hangul3 = require("es-hangul");
1480
- var import_react19 = require("react");
1443
+ var import_react18 = require("react");
1481
1444
  var import_react_native26 = require("react-native");
1482
1445
  var import_jsx_runtime14 = require("react/jsx-runtime");
1483
1446
  function GameWebviewNavigationBar() {
1484
1447
  const safeAreaTop = (0, import_private7.useSafeAreaTop)();
1485
- const { openConfirm } = (0, import_tds_react_native12.useDialog)();
1448
+ const { openConfirm } = (0, import_tds_react_native11.useDialog)();
1486
1449
  const { captureExitLog } = useCaptureExitLog();
1487
1450
  const global2 = getAppsInTossGlobals();
1488
1451
  const logging = useNavigationBarLogging();
1489
1452
  const { open: openMoreButtonBottomSheet } = useMoreButtonBottomSheet();
1490
1453
  const { navigationRightButton } = useNavigationBarContext();
1491
1454
  const { right: safeAreaRight } = (0, import_react_native_safe_area_context2.useSafeAreaInsets)();
1492
- const handleGameWebviewClose = (0, import_react19.useCallback)(async () => {
1455
+ const handleGameWebviewClose = (0, import_react18.useCallback)(async () => {
1493
1456
  logging.closeButtonClick();
1494
1457
  const isConfirmed = await openConfirm({
1495
1458
  title: `${(0, import_es_hangul3.josa)(global2.brandDisplayName, "\uC744/\uB97C")} \uC885\uB8CC\uD560\uAE4C\uC694?`,
@@ -1505,7 +1468,7 @@ function GameWebviewNavigationBar() {
1505
1468
  }
1506
1469
  }, [captureExitLog, global2.brandDisplayName, logging, openConfirm]);
1507
1470
  return /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(import_jsx_runtime14.Fragment, { children: [
1508
- /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_tds_react_native12.PageNavbar, { preference: { type: "none" } }),
1471
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_tds_react_native11.PageNavbar, { preference: { type: "none" } }),
1509
1472
  /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
1510
1473
  import_react_native26.View,
1511
1474
  {
@@ -1540,52 +1503,44 @@ function GameWebviewNavigationBar() {
1540
1503
 
1541
1504
  // src/components/GameWebView.tsx
1542
1505
  var import_jsx_runtime15 = require("react/jsx-runtime");
1543
- var GameWebView = (0, import_react20.forwardRef)(function GameWebView2(props, ref) {
1544
- const [isEntryMessageExited, setIsEntryMessageExited] = (0, import_react20.useState)(false);
1545
- (0, import_react20.useEffect)(() => {
1506
+ var GameWebView = (0, import_react19.forwardRef)(function GameWebView2(props, ref) {
1507
+ (0, import_react19.useEffect)(() => {
1546
1508
  if (import_react_native27.Platform.OS === "ios") {
1547
- (0, import_native_modules15.setIosSwipeGestureEnabled)({ isEnabled: false });
1509
+ (0, import_native_modules14.setIosSwipeGestureEnabled)({ isEnabled: false });
1548
1510
  return () => {
1549
- (0, import_native_modules15.setIosSwipeGestureEnabled)({ isEnabled: true });
1511
+ (0, import_native_modules14.setIosSwipeGestureEnabled)({ isEnabled: true });
1550
1512
  };
1551
1513
  }
1552
1514
  return;
1553
1515
  }, []);
1554
- (0, import_react20.useEffect)(() => {
1555
- import_native_modules15.appsInTossEvent.addEventListener("entryMessageExited", {
1556
- onEvent: () => {
1557
- setIsEntryMessageExited(true);
1558
- }
1559
- });
1560
- }, []);
1561
1516
  return /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(import_jsx_runtime15.Fragment, { children: [
1562
1517
  /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(GameWebviewNavigationBar, {}),
1563
- (0, import_native_modules15.getOperationalEnvironment)() === "toss" ? /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(GameInitializer, { isReadyForProfileUI: isEntryMessageExited, children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_react_native_webview.WebView, { ref, ...props }) }) : /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_react_native_webview.WebView, { ref, ...props })
1518
+ (0, import_native_modules14.getOperationalEnvironment)() === "toss" ? /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(GameInitializer, { children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_react_native_webview.WebView, { ref, ...props }) }) : /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_react_native_webview.WebView, { ref, ...props })
1564
1519
  ] });
1565
1520
  });
1566
1521
 
1567
1522
  // src/components/PartnerWebView.tsx
1568
1523
  var import_react_native_webview2 = require("@granite-js/native/react-native-webview");
1569
- var import_react22 = require("react");
1524
+ var import_react21 = require("react");
1570
1525
 
1571
1526
  // src/components/NavigationBar/PartnerWebviewNavigationBar.tsx
1572
1527
  var import_react_native28 = require("@granite-js/react-native");
1573
- var import_tds_react_native13 = require("@toss/tds-react-native");
1528
+ var import_tds_react_native12 = require("@toss/tds-react-native");
1574
1529
  var import_private8 = require("@toss/tds-react-native/private");
1575
1530
  var import_es_hangul4 = require("es-hangul");
1576
- var import_react21 = require("react");
1531
+ var import_react20 = require("react");
1577
1532
  var import_jsx_runtime16 = require("react/jsx-runtime");
1578
1533
  function PartnerWebviewNavigationBar({ onBackButtonClick, onHomeButtonClick }) {
1579
1534
  const globals = getAppsInTossGlobals();
1580
1535
  const { captureExitLog } = useCaptureExitLog();
1581
1536
  const logging = useNavigationBarLogging();
1582
- const { openConfirm } = (0, import_tds_react_native13.useDialog)();
1537
+ const { openConfirm } = (0, import_tds_react_native12.useDialog)();
1583
1538
  const { open: openMoreButtonBottomSheet } = useMoreButtonBottomSheet();
1584
1539
  const parsedNavigationBar = globals.navigationBar != null ? safeParseNavigationBar(globals.navigationBar) : null;
1585
1540
  const withHomeButton = parsedNavigationBar?.withHomeButton ?? false;
1586
1541
  const withBackButton = parsedNavigationBar?.withBackButton ?? true;
1587
1542
  const { navigationRightButton } = useNavigationBarContext();
1588
- const handleClose = (0, import_react21.useCallback)(async () => {
1543
+ const handleClose = (0, import_react20.useCallback)(async () => {
1589
1544
  logging.closeButtonClick();
1590
1545
  const isConfirmed = await openConfirm({
1591
1546
  title: `${(0, import_es_hangul4.josa)(globals.brandDisplayName, "\uC744/\uB97C")} \uC885\uB8CC\uD560\uAE4C\uC694?`,
@@ -1619,7 +1574,7 @@ function PartnerWebviewNavigationBar({ onBackButtonClick, onHomeButtonClick }) {
1619
1574
 
1620
1575
  // src/components/PartnerWebView.tsx
1621
1576
  var import_jsx_runtime17 = require("react/jsx-runtime");
1622
- var PartnerWebView = (0, import_react22.forwardRef)(function PartnerWebViewScreen({ onBackButtonClick, onHomeButtonClick, ...webViewProps }, ref) {
1577
+ var PartnerWebView = (0, import_react21.forwardRef)(function PartnerWebViewScreen({ onBackButtonClick, onHomeButtonClick, ...webViewProps }, ref) {
1623
1578
  return /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(import_jsx_runtime17.Fragment, { children: [
1624
1579
  /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(PartnerWebviewNavigationBar, { onBackButtonClick, onHomeButtonClick }),
1625
1580
  /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_react_native_webview2.WebView, { ref, ...webViewProps, style: { flex: 1 } })
@@ -1639,357 +1594,8 @@ function convertIntentURL(url) {
1639
1594
  return `${scheme}://${url.hostname}${url.pathname}${url.search}`;
1640
1595
  }
1641
1596
 
1642
- // src/ads/fetchTossAd.ts
1643
- var import_native_modules16 = require("@apps-in-toss/native-modules");
1644
-
1645
- // ../../.yarn/cache/es-toolkit-npm-1.34.1-4cd6371dcb-aab6d07be3.zip/node_modules/es-toolkit/dist/function/noop.mjs
1646
- function noop() {
1647
- }
1648
-
1649
- // src/ads/generateSessionId.ts
1650
- function generateSessionId() {
1651
- return "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g, (c) => {
1652
- const r = Math.random() * 16 | 0;
1653
- const v = c === "x" ? r : r & 3 | 8;
1654
- return v.toString(16);
1655
- });
1656
- }
1657
-
1658
- // src/ads/constants.ts
1659
- var sessionId = generateSessionId();
1660
-
1661
- // src/ads/fetchTossAd.ts
1662
- var ANDROID_FETCH_TOSS_AD_SUPPORTED_VERSION = "5.239.0";
1663
- var IOS_FETCH_TOSS_AD_SUPPORTED_VERSION = "5.239.0";
1664
- var UNSUPPORTED_ERROR_MESSAGE = "This feature is not supported in the current environment";
1665
- var ENVIRONMENT = (0, import_native_modules16.getOperationalEnvironment)();
1666
- function fetchTossAd(params) {
1667
- if (!fetchTossAd.isSupported()) {
1668
- params.onError(new Error(UNSUPPORTED_ERROR_MESSAGE));
1669
- return noop;
1670
- }
1671
- const { onEvent, onError, options } = params;
1672
- const { adGroupId } = options;
1673
- const unregisterCallbacks = import_native_modules16.INTERNAL__appBridgeHandler.invokeAppBridgeMethod(
1674
- "fetchTossAd",
1675
- { spaceUnitId: adGroupId, sessionId },
1676
- {
1677
- onSuccess: (response) => {
1678
- onEvent(response);
1679
- },
1680
- onError: (error) => {
1681
- onError(error);
1682
- }
1683
- }
1684
- );
1685
- return unregisterCallbacks;
1686
- }
1687
- fetchTossAd.isSupported = () => {
1688
- if (ENVIRONMENT !== "toss") {
1689
- return false;
1690
- }
1691
- return (0, import_native_modules16.isMinVersionSupported)({
1692
- android: ANDROID_FETCH_TOSS_AD_SUPPORTED_VERSION,
1693
- ios: IOS_FETCH_TOSS_AD_SUPPORTED_VERSION
1694
- });
1695
- };
1696
-
1697
- // src/ads/integratedAd.ts
1698
- var import_native_modules18 = require("@apps-in-toss/native-modules");
1699
-
1700
- // src/ads/generateRequestId.ts
1701
- function generateRequestId() {
1702
- const timestamp = Date.now().toString(36).toUpperCase();
1703
- const random = Math.random().toString(36).substring(2, 7).toUpperCase();
1704
- return `ait-${timestamp}${random}`;
1705
- }
1706
-
1707
- // src/ads/getReferrer.ts
1708
- var import_react_native29 = require("@granite-js/react-native");
1709
- function getReferrer() {
1710
- try {
1711
- return new URL((0, import_react_native29.getSchemeUri)()).searchParams.get("referrer");
1712
- } catch {
1713
- return null;
1714
- }
1715
- }
1716
-
1717
- // src/ads/remotes.ts
1718
- var import_native_modules17 = require("@apps-in-toss/native-modules");
1719
-
1720
- // src/ads/getIsDev.ts
1721
- var import_react_native30 = require("@granite-js/react-native");
1722
- function getIsDev() {
1723
- try {
1724
- return new URL((0, import_react_native30.getSchemeUri)()).searchParams.get("isDev") === "true";
1725
- } catch {
1726
- return false;
1727
- }
1728
- }
1729
-
1730
- // src/ads/remotes.ts
1731
- var OPERATIONAL_ENVIRONMENT = (0, import_native_modules17.getOperationalEnvironment)();
1732
- var OS = (0, import_native_modules17.getPlatformOS)();
1733
- var APP_VER = (0, import_native_modules17.getTossAppVersion)();
1734
- var ALPHA_EVENT_TRACKER_HTTP_ENDPOINT = "https://alpha-trillion.toss.im/trk/sdk-mediation/event";
1735
- var LIVE_EVENT_TRACKER_HTTP_ENDPOINT = "https://trillion.toss.im/trk/sdk-mediation/event";
1736
- function getPostEventTrackingUrl() {
1737
- const isDev = getIsDev();
1738
- if (OPERATIONAL_ENVIRONMENT === "sandbox" || isDev) {
1739
- return ALPHA_EVENT_TRACKER_HTTP_ENDPOINT;
1740
- }
1741
- return LIVE_EVENT_TRACKER_HTTP_ENDPOINT;
1742
- }
1743
- function postEventTracking(params) {
1744
- const endpoint = getPostEventTrackingUrl();
1745
- const bodyJSON = JSON.stringify({
1746
- ...params,
1747
- os: OS,
1748
- appVer: APP_VER,
1749
- deviceIdType: "NONE",
1750
- platform: "RN"
1751
- });
1752
- return fetch(
1753
- endpoint,
1754
- {
1755
- method: "POST",
1756
- headers: {
1757
- "Content-Type": "application/json"
1758
- },
1759
- body: bodyJSON
1760
- }
1761
- ).catch(noop);
1762
- }
1763
-
1764
- // src/ads/integratedAd.ts
1765
- var INTEGRATED_AD_SDK_VERSION = "0.0.0";
1766
- var ANDROID_INTEGRATED_AD_SUPPORTED_VERSION = "5.239.0";
1767
- var IOS_INTEGRATED_AD_SUPPORTED_VERSION = "5.239.0";
1768
- var UNSUPPORTED_ERROR_MESSAGE2 = "This feature is not supported in the current environment";
1769
- var INTG_AD_ADM_FALLBACK_RID_MAP = {};
1770
- function integratedAdIsSupported() {
1771
- return (0, import_native_modules18.isMinVersionSupported)({
1772
- android: ANDROID_INTEGRATED_AD_SUPPORTED_VERSION,
1773
- ios: IOS_INTEGRATED_AD_SUPPORTED_VERSION
1774
- });
1775
- }
1776
- function loadFullScreenAd(params) {
1777
- if (!import_native_modules18.GoogleAdMob.loadAppsInTossAdMob.isSupported()) {
1778
- params.onError(new Error(UNSUPPORTED_ERROR_MESSAGE2));
1779
- return noop;
1780
- }
1781
- if (!integratedAdIsSupported()) {
1782
- return import_native_modules18.GoogleAdMob.loadAppsInTossAdMob({
1783
- ...params,
1784
- onEvent: (event) => {
1785
- if (event.type === "loaded") {
1786
- const requestId = generateRequestId();
1787
- INTG_AD_ADM_FALLBACK_RID_MAP[params.options.adGroupId] = requestId;
1788
- postEventTracking({
1789
- eventName: "LOAD",
1790
- spaceUnitId: params.options.adGroupId,
1791
- requestId,
1792
- responseId: event.data.responseInfo.responseId,
1793
- mediationType: "ADMOB",
1794
- format: "",
1795
- adSourceName: event.data.responseInfo.loadedAdNetworkInfo?.adSourceName ?? "",
1796
- sdkVer: INTEGRATED_AD_SDK_VERSION
1797
- });
1798
- }
1799
- return params.onEvent(event);
1800
- },
1801
- onError: (error) => {
1802
- const requestId = INTG_AD_ADM_FALLBACK_RID_MAP[params.options.adGroupId] ?? "";
1803
- postEventTracking({
1804
- eventName: "FAILED_TO_LOAD",
1805
- spaceUnitId: params.options.adGroupId,
1806
- requestId,
1807
- responseId: "",
1808
- mediationType: "ADMOB",
1809
- format: "",
1810
- adSourceName: "",
1811
- sdkVer: INTEGRATED_AD_SDK_VERSION
1812
- });
1813
- return params.onError(error);
1814
- }
1815
- });
1816
- }
1817
- const { onEvent, onError, options } = params;
1818
- const { adGroupId } = options;
1819
- const referrer = getReferrer();
1820
- const unregisterCallbacks = import_native_modules18.INTERNAL__appBridgeHandler.invokeAppBridgeMethod(
1821
- "loadTossAdOrAdmob",
1822
- { spaceUnitId: adGroupId, referrer, sessionId },
1823
- {
1824
- onSuccess: () => {
1825
- onEvent({ type: "loaded" });
1826
- },
1827
- onError: (error) => {
1828
- onError(error);
1829
- }
1830
- }
1831
- );
1832
- return unregisterCallbacks;
1833
- }
1834
- loadFullScreenAd.isSupported = import_native_modules18.GoogleAdMob.loadAppsInTossAdMob.isSupported;
1835
- function showFullScreenAd(params) {
1836
- if (!import_native_modules18.GoogleAdMob.showAppsInTossAdMob.isSupported()) {
1837
- params.onError(new Error(UNSUPPORTED_ERROR_MESSAGE2));
1838
- return noop;
1839
- }
1840
- if (!integratedAdIsSupported()) {
1841
- return import_native_modules18.GoogleAdMob.showAppsInTossAdMob({
1842
- ...params,
1843
- onEvent: (event) => {
1844
- const requestId = INTG_AD_ADM_FALLBACK_RID_MAP[params.options.adGroupId] ?? "";
1845
- switch (event.type) {
1846
- case "show":
1847
- postEventTracking({
1848
- eventName: "SHOW",
1849
- spaceUnitId: params.options.adGroupId,
1850
- requestId,
1851
- responseId: "",
1852
- mediationType: "ADMOB",
1853
- format: "",
1854
- adSourceName: "",
1855
- sdkVer: INTEGRATED_AD_SDK_VERSION
1856
- });
1857
- break;
1858
- case "failedToShow":
1859
- postEventTracking({
1860
- eventName: "FAILED_TO_SHOW",
1861
- spaceUnitId: params.options.adGroupId,
1862
- requestId,
1863
- responseId: "",
1864
- mediationType: "ADMOB",
1865
- format: "",
1866
- adSourceName: "",
1867
- sdkVer: INTEGRATED_AD_SDK_VERSION
1868
- });
1869
- break;
1870
- case "impression":
1871
- postEventTracking({
1872
- eventName: "IMP",
1873
- spaceUnitId: params.options.adGroupId,
1874
- requestId,
1875
- responseId: "",
1876
- mediationType: "ADMOB",
1877
- format: "",
1878
- adSourceName: "",
1879
- sdkVer: INTEGRATED_AD_SDK_VERSION
1880
- });
1881
- break;
1882
- case "clicked":
1883
- postEventTracking({
1884
- eventName: "CLICK",
1885
- spaceUnitId: params.options.adGroupId,
1886
- requestId,
1887
- responseId: "",
1888
- mediationType: "ADMOB",
1889
- format: "",
1890
- adSourceName: "",
1891
- sdkVer: INTEGRATED_AD_SDK_VERSION
1892
- });
1893
- break;
1894
- case "dismissed":
1895
- postEventTracking({
1896
- eventName: "DISMISS",
1897
- spaceUnitId: params.options.adGroupId,
1898
- requestId,
1899
- responseId: "",
1900
- mediationType: "ADMOB",
1901
- format: "",
1902
- adSourceName: "",
1903
- sdkVer: INTEGRATED_AD_SDK_VERSION
1904
- });
1905
- break;
1906
- case "userEarnedReward":
1907
- postEventTracking({
1908
- eventName: "USER_EARNED_REWARD",
1909
- spaceUnitId: params.options.adGroupId,
1910
- requestId,
1911
- responseId: "",
1912
- mediationType: "ADMOB",
1913
- format: "",
1914
- adSourceName: "",
1915
- sdkVer: INTEGRATED_AD_SDK_VERSION
1916
- });
1917
- break;
1918
- }
1919
- return params.onEvent(event);
1920
- },
1921
- onError: (error) => {
1922
- const requestId = INTG_AD_ADM_FALLBACK_RID_MAP[params.options.adGroupId] ?? "";
1923
- postEventTracking({
1924
- eventName: "FAILED_TO_SHOW",
1925
- spaceUnitId: params.options.adGroupId,
1926
- requestId,
1927
- responseId: "",
1928
- mediationType: "ADMOB",
1929
- format: "",
1930
- adSourceName: "",
1931
- sdkVer: INTEGRATED_AD_SDK_VERSION
1932
- });
1933
- return params.onError(error);
1934
- }
1935
- });
1936
- }
1937
- const { onEvent, onError, options } = params;
1938
- const { adGroupId } = options;
1939
- const referrer = getReferrer();
1940
- const unregisterCallbacks = import_native_modules18.INTERNAL__appBridgeHandler.invokeAppBridgeMethod(
1941
- "showTossAdOrAdmob",
1942
- { spaceUnitId: adGroupId, referrer, sessionId },
1943
- {
1944
- onAdClicked: () => {
1945
- onEvent({ type: "clicked" });
1946
- },
1947
- onAdDismissed: () => {
1948
- onEvent({ type: "dismissed" });
1949
- },
1950
- onAdFailedToShow: () => {
1951
- onEvent({ type: "failedToShow" });
1952
- },
1953
- onAdImpression: () => {
1954
- onEvent({ type: "impression" });
1955
- },
1956
- onAdShow: () => {
1957
- onEvent({ type: "show" });
1958
- },
1959
- onUserEarnedReward: (data) => {
1960
- onEvent({ type: "userEarnedReward", data });
1961
- },
1962
- onSuccess: () => {
1963
- onEvent({ type: "requested" });
1964
- },
1965
- onError: (error) => {
1966
- onError(error);
1967
- }
1968
- }
1969
- );
1970
- return unregisterCallbacks;
1971
- }
1972
- showFullScreenAd.isSupported = import_native_modules18.GoogleAdMob.showAppsInTossAdMob.isSupported;
1973
-
1974
- // src/ads/tossAdEventLog.ts
1975
- var import_native_modules19 = require("@apps-in-toss/native-modules");
1976
- var import_react_native31 = require("@granite-js/react-native");
1977
- async function tossAdEventLog(params) {
1978
- const referrer = getReferrer();
1979
- const appName = import_react_native31.Granite.appName;
1980
- const eventLogParams = {
1981
- ...params,
1982
- params: {
1983
- ...params.params,
1984
- referrer,
1985
- app_name: appName
1986
- }
1987
- };
1988
- return import_native_modules19.INTERNAL__module.tossCoreEventLog(eventLogParams);
1989
- }
1990
-
1991
1597
  // src/bridge-handler/useBridgeHandler.tsx
1992
- var import_react23 = require("react");
1598
+ var import_react22 = require("react");
1993
1599
  function serializeError(error) {
1994
1600
  return JSON.stringify(error, (_, value) => {
1995
1601
  if (value instanceof Error) {
@@ -2041,8 +1647,8 @@ function useBridgeHandler({
2041
1647
  asyncHandlerMap,
2042
1648
  eventListenerMap
2043
1649
  }) {
2044
- const ref = (0, import_react23.useRef)(null);
2045
- const injectedJavaScript = (0, import_react23.useMemo)(
1650
+ const ref = (0, import_react22.useRef)(null);
1651
+ const injectedJavaScript = (0, import_react22.useMemo)(
2046
1652
  () => `window.__CONSTANT_HANDLER_MAP = ${JSON.stringify(
2047
1653
  Object.entries(constantHandlerMap).reduce(
2048
1654
  (acc, [key, value]) => {
@@ -2054,7 +1660,7 @@ function useBridgeHandler({
2054
1660
  )};`,
2055
1661
  [constantHandlerMap]
2056
1662
  );
2057
- (0, import_react23.useEffect)(() => {
1663
+ (0, import_react22.useEffect)(() => {
2058
1664
  ref.current?.injectJavaScript(injectedJavaScript);
2059
1665
  }, [injectedJavaScript]);
2060
1666
  const createHandleOnEvent = (functionName, eventId) => (response) => {
@@ -2068,7 +1674,7 @@ function useBridgeHandler({
2068
1674
  window.__GRANITE_NATIVE_EMITTER.emit('${functionName}/onError/${eventId}', ${serializedError});
2069
1675
  `);
2070
1676
  };
2071
- const $onMessage = (0, import_react23.useCallback)(
1677
+ const $onMessage = (0, import_react22.useCallback)(
2072
1678
  async (e) => {
2073
1679
  onMessage?.(e);
2074
1680
  const data = parseNativeEventData(e.nativeEvent.data);
@@ -2128,7 +1734,7 @@ function parseNativeEventData(data) {
2128
1734
 
2129
1735
  // src/core/hooks/useSafeAreaInsetsEmitter.tsx
2130
1736
  var import_react_native_safe_area_context3 = require("@granite-js/native/react-native-safe-area-context");
2131
- var import_react24 = require("react");
1737
+ var import_react23 = require("react");
2132
1738
  var EventEmitter = class {
2133
1739
  listeners = {};
2134
1740
  on(event, listener) {
@@ -2152,8 +1758,8 @@ var EventEmitter = class {
2152
1758
  };
2153
1759
  function useSafeAreaInsetsEmitter() {
2154
1760
  const insets = (0, import_react_native_safe_area_context3.useSafeAreaInsets)();
2155
- const emitter = (0, import_react24.useMemo)(() => new EventEmitter(), []);
2156
- (0, import_react24.useEffect)(() => {
1761
+ const emitter = (0, import_react23.useMemo)(() => new EventEmitter(), []);
1762
+ (0, import_react23.useEffect)(() => {
2157
1763
  emitter.emit("safeAreaInsetsChange", insets);
2158
1764
  return () => {
2159
1765
  emitter.off("safeAreaInsetsChange", (listener) => listener(insets));
@@ -2163,13 +1769,13 @@ function useSafeAreaInsetsEmitter() {
2163
1769
  }
2164
1770
 
2165
1771
  // src/core/hooks/useWebBackHandler.tsx
2166
- var import_react_native32 = require("@granite-js/react-native");
2167
- var import_tds_react_native14 = require("@toss/tds-react-native");
1772
+ var import_react_native29 = require("@granite-js/react-native");
1773
+ var import_tds_react_native13 = require("@toss/tds-react-native");
2168
1774
  var import_es_hangul5 = require("es-hangul");
2169
- var import_react26 = require("react");
1775
+ var import_react25 = require("react");
2170
1776
 
2171
1777
  // src/hooks/useWebviewHistoryStack.tsx
2172
- var import_react25 = require("react");
1778
+ var import_react24 = require("react");
2173
1779
  var INITIAL_STATE = { stack: [], index: -1 };
2174
1780
  function reducer(state, action) {
2175
1781
  switch (action.type) {
@@ -2200,11 +1806,11 @@ function reducer(state, action) {
2200
1806
  }
2201
1807
  }
2202
1808
  function useWebViewHistory() {
2203
- const [state, dispatch] = (0, import_react25.useReducer)(reducer, INITIAL_STATE);
2204
- const onNavigationStateChange = (0, import_react25.useCallback)(({ url, canGoForward: canGoForward2 }) => {
1809
+ const [state, dispatch] = (0, import_react24.useReducer)(reducer, INITIAL_STATE);
1810
+ const onNavigationStateChange = (0, import_react24.useCallback)(({ url, canGoForward: canGoForward2 }) => {
2205
1811
  dispatch({ type: "NAVIGATION_CHANGE", url, canGoForward: canGoForward2 });
2206
1812
  }, []);
2207
- const { canGoBack, canGoForward } = (0, import_react25.useMemo)(() => {
1813
+ const { canGoBack, canGoForward } = (0, import_react24.useMemo)(() => {
2208
1814
  const canBack = state.index > 0;
2209
1815
  const canFwd = state.index >= 0 && state.index < state.stack.length - 1;
2210
1816
  return { canGoBack: canBack, canGoForward: canFwd };
@@ -2233,23 +1839,23 @@ function useWebBackHandler(webViewRef) {
2233
1839
  hasBackEvent: hasWebBackEvent,
2234
1840
  addEventListener: addWebBackEventListener,
2235
1841
  removeEventListener: removeWebBackEventListener
2236
- } = (0, import_react_native32.useBackEventState)();
1842
+ } = (0, import_react_native29.useBackEventState)();
2237
1843
  const logging = useNavigationBarLogging();
2238
- const { openConfirm } = (0, import_tds_react_native14.useDialog)();
1844
+ const { openConfirm } = (0, import_tds_react_native13.useDialog)();
2239
1845
  const global2 = getAppsInTossGlobals();
2240
- const addEventListener = (0, import_react26.useCallback)(
1846
+ const addEventListener = (0, import_react25.useCallback)(
2241
1847
  (handler) => {
2242
1848
  addWebBackEventListener(handler);
2243
1849
  },
2244
1850
  [addWebBackEventListener]
2245
1851
  );
2246
- const removeEventListener = (0, import_react26.useCallback)(
1852
+ const removeEventListener = (0, import_react25.useCallback)(
2247
1853
  (handler) => {
2248
1854
  removeWebBackEventListener(handler);
2249
1855
  },
2250
1856
  [removeWebBackEventListener]
2251
1857
  );
2252
- const handleWebBack = (0, import_react26.useCallback)(async () => {
1858
+ const handleWebBack = (0, import_react25.useCallback)(async () => {
2253
1859
  if (hasWebBackEvent) {
2254
1860
  for (const handler of webBackHandlersRef) {
2255
1861
  handler();
@@ -2269,7 +1875,7 @@ function useWebBackHandler(webViewRef) {
2269
1875
  logging.closePopupCtaClick(isConfirmed);
2270
1876
  if (isConfirmed) {
2271
1877
  captureExitLog(Date.now());
2272
- (0, import_react_native32.closeView)();
1878
+ (0, import_react_native29.closeView)();
2273
1879
  }
2274
1880
  }
2275
1881
  }, [
@@ -2282,7 +1888,7 @@ function useWebBackHandler(webViewRef) {
2282
1888
  openConfirm,
2283
1889
  webViewRef
2284
1890
  ]);
2285
- const handleWebHome = (0, import_react26.useCallback)(() => {
1891
+ const handleWebHome = (0, import_react25.useCallback)(() => {
2286
1892
  logging.homeButtonClick();
2287
1893
  if (hasWebBackEvent) {
2288
1894
  for (const handler of webBackHandlersRef) {
@@ -2292,7 +1898,7 @@ function useWebBackHandler(webViewRef) {
2292
1898
  }
2293
1899
  webViewRef.current?.injectJavaScript(HISTORY_HOME_SCRIPT);
2294
1900
  }, [hasWebBackEvent, webBackHandlersRef, logging, webViewRef]);
2295
- return (0, import_react26.useMemo)(
1901
+ return (0, import_react25.useMemo)(
2296
1902
  () => ({ addEventListener, removeEventListener, handleWebBack, handleWebHome, onNavigationStateChange }),
2297
1903
  [addEventListener, removeEventListener, handleWebBack, handleWebHome, onNavigationStateChange]
2298
1904
  );
@@ -2312,8 +1918,8 @@ function mergeRefs(...refs) {
2312
1918
  }
2313
1919
 
2314
1920
  // src/hooks/useCreateUserAgent.ts
2315
- var import_native_modules20 = require("@apps-in-toss/native-modules");
2316
- var import_react_native33 = require("react-native");
1921
+ var import_native_modules15 = require("@apps-in-toss/native-modules");
1922
+ var import_react_native30 = require("react-native");
2317
1923
  var FontA11yCategory = {
2318
1924
  Large: "Large",
2319
1925
  xLarge: "xLarge",
@@ -2446,9 +2052,9 @@ function useCreateUserAgent({
2446
2052
  safeArea,
2447
2053
  safeAreaBottomTransparency
2448
2054
  }) {
2449
- const platform = (0, import_native_modules20.getPlatformOS)();
2450
- const appVersion = (0, import_native_modules20.getTossAppVersion)();
2451
- const { fontScale } = (0, import_react_native33.useWindowDimensions)();
2055
+ const platform = (0, import_native_modules15.getPlatformOS)();
2056
+ const appVersion = (0, import_native_modules15.getTossAppVersion)();
2057
+ const { fontScale } = (0, import_react_native30.useWindowDimensions)();
2452
2058
  const platformString = platform === "ios" ? "iPhone" : "Android phone";
2453
2059
  const fontA11y = mapFontScaleToCategory(fontScale, platform);
2454
2060
  const normalizedFontScale = convertToAndroidStyleScale(fontScale, platform);
@@ -2469,17 +2075,17 @@ function useCreateUserAgent({
2469
2075
  }
2470
2076
 
2471
2077
  // src/hooks/useGeolocation.ts
2472
- var import_native_modules21 = require("@apps-in-toss/native-modules");
2473
- var import_react_native34 = require("@granite-js/react-native");
2474
- var import_react27 = require("react");
2078
+ var import_native_modules16 = require("@apps-in-toss/native-modules");
2079
+ var import_react_native31 = require("@granite-js/react-native");
2080
+ var import_react26 = require("react");
2475
2081
  function useGeolocation({ accuracy, distanceInterval, timeInterval }) {
2476
- const isVisible = (0, import_react_native34.useVisibility)();
2477
- const [location, setLocation] = (0, import_react27.useState)(null);
2478
- (0, import_react27.useEffect)(() => {
2082
+ const isVisible = (0, import_react_native31.useVisibility)();
2083
+ const [location, setLocation] = (0, import_react26.useState)(null);
2084
+ (0, import_react26.useEffect)(() => {
2479
2085
  if (!isVisible) {
2480
2086
  return;
2481
2087
  }
2482
- return (0, import_native_modules21.startUpdateLocation)({
2088
+ return (0, import_native_modules16.startUpdateLocation)({
2483
2089
  options: {
2484
2090
  accuracy,
2485
2091
  distanceInterval,
@@ -2493,12 +2099,12 @@ function useGeolocation({ accuracy, distanceInterval, timeInterval }) {
2493
2099
  }
2494
2100
 
2495
2101
  // src/hooks/useWaitForReturnNavigator.tsx
2496
- var import_react_native35 = require("@granite-js/react-native");
2497
- var import_react28 = require("react");
2102
+ var import_react_native32 = require("@granite-js/react-native");
2103
+ var import_react27 = require("react");
2498
2104
  function useWaitForReturnNavigator() {
2499
- const callbacks = (0, import_react28.useRef)([]).current;
2500
- const navigation = (0, import_react_native35.useNavigation)();
2501
- const startNavigating = (0, import_react28.useCallback)(
2105
+ const callbacks = (0, import_react27.useRef)([]).current;
2106
+ const navigation = (0, import_react_native32.useNavigation)();
2107
+ const startNavigating = (0, import_react27.useCallback)(
2502
2108
  (route, params) => {
2503
2109
  return new Promise((resolve) => {
2504
2110
  callbacks.push(resolve);
@@ -2507,7 +2113,7 @@ function useWaitForReturnNavigator() {
2507
2113
  },
2508
2114
  [callbacks, navigation]
2509
2115
  );
2510
- const handleVisibilityChange = (0, import_react28.useCallback)(
2116
+ const handleVisibilityChange = (0, import_react27.useCallback)(
2511
2117
  (state) => {
2512
2118
  if (state === "visible" && callbacks.length > 0) {
2513
2119
  for (const callback of callbacks) {
@@ -2518,7 +2124,7 @@ function useWaitForReturnNavigator() {
2518
2124
  },
2519
2125
  [callbacks]
2520
2126
  );
2521
- (0, import_react_native35.useVisibilityChange)(handleVisibilityChange);
2127
+ (0, import_react_native32.useVisibilityChange)(handleVisibilityChange);
2522
2128
  return startNavigating;
2523
2129
  }
2524
2130
 
@@ -2532,8 +2138,8 @@ function useTopNavigation() {
2532
2138
  }
2533
2139
 
2534
2140
  // src/utils/log.ts
2535
- var import_native_modules22 = require("@apps-in-toss/native-modules");
2536
- var import_react_native36 = require("@granite-js/react-native");
2141
+ var import_native_modules17 = require("@apps-in-toss/native-modules");
2142
+ var import_react_native33 = require("@granite-js/react-native");
2537
2143
 
2538
2144
  // src/utils/extractDateFromUUIDv7.ts
2539
2145
  var extractDateFromUUIDv7 = (uuid) => {
@@ -2557,9 +2163,9 @@ var getGroupId = (url) => {
2557
2163
  };
2558
2164
  }
2559
2165
  };
2560
- var getReferrer2 = () => {
2166
+ var getReferrer = () => {
2561
2167
  try {
2562
- const referrer = new URL((0, import_react_native36.getSchemeUri)());
2168
+ const referrer = new URL((0, import_react_native33.getSchemeUri)());
2563
2169
  return referrer.searchParams.get("referrer");
2564
2170
  } catch {
2565
2171
  return "";
@@ -2572,12 +2178,12 @@ var trackScreen = (url) => {
2572
2178
  log_name: `${groupId}::screen`,
2573
2179
  params: {
2574
2180
  search,
2575
- referrer: getReferrer2(),
2181
+ referrer: getReferrer(),
2576
2182
  deployment_id: env.getDeploymentId(),
2577
2183
  deployment_timestamp: extractDateFromUUIDv7(env.getDeploymentId()).getTime()
2578
2184
  }
2579
2185
  };
2580
- return (0, import_native_modules22.eventLog)(log);
2186
+ return (0, import_native_modules17.eventLog)(log);
2581
2187
  };
2582
2188
 
2583
2189
  // src/components/WebView.tsx
@@ -2586,12 +2192,12 @@ var operationalEnvironment = appsInTossConstantBridges.getOperationalEnvironment
2586
2192
  var TYPES = ["partner", "external", "game"];
2587
2193
  var WEBVIEW_TYPES = {
2588
2194
  partner: PartnerWebView,
2589
- external: import_tds_react_native15.ExternalWebViewScreen,
2195
+ external: import_tds_react_native14.ExternalWebViewScreen,
2590
2196
  game: GameWebView
2591
2197
  };
2592
2198
  function mergeSchemeQueryParamsInto(url) {
2593
2199
  const baseUrl = new URL(url);
2594
- const schemeUrl = new URL((0, import_react_native37.getSchemeUri)());
2200
+ const schemeUrl = new URL((0, import_react_native34.getSchemeUri)());
2595
2201
  baseUrl.pathname = schemeUrl.pathname;
2596
2202
  for (const [key, value] of schemeUrl.searchParams.entries()) {
2597
2203
  baseUrl.searchParams.set(key, value);
@@ -2603,7 +2209,7 @@ function getWebViewUri(local) {
2603
2209
  const devUrl = `http://${local.host}:${local.port}`;
2604
2210
  return mergeSchemeQueryParamsInto(devUrl).toString();
2605
2211
  }
2606
- const { url: rawUrl } = import_native_modules23.AppsInTossModule.getWebBundleURL({});
2212
+ const { url: rawUrl } = import_native_modules18.AppsInTossModule.getWebBundleURL({});
2607
2213
  const url = mergeSchemeQueryParamsInto(rawUrl);
2608
2214
  const deploymentId = env.getDeploymentId();
2609
2215
  if (deploymentId) {
@@ -2615,31 +2221,30 @@ function WebView({ type, local, onMessage, ...props }) {
2615
2221
  if (!TYPES.includes(type)) {
2616
2222
  throw new Error(`Invalid WebView type: '${type}'`);
2617
2223
  }
2618
- const webViewRef = (0, import_react29.useRef)(null);
2224
+ const webViewRef = (0, import_react28.useRef)(null);
2619
2225
  const webBackHandler = useWebBackHandler(webViewRef);
2620
- const uri = (0, import_react29.useMemo)(() => getWebViewUri(local), [local]);
2226
+ const uri = (0, import_react28.useMemo)(() => getWebViewUri(local), [local]);
2621
2227
  const top = (0, import_private9.useSafeAreaTop)();
2622
2228
  const bottom = (0, import_private9.useSafeAreaBottom)();
2623
2229
  const insets = (0, import_react_native_safe_area_context4.useSafeAreaInsets)();
2624
2230
  const global2 = getAppsInTossGlobals();
2625
2231
  const navigationBarContext = useNavigationBarContext();
2626
2232
  const safeAreaInsetsEmitter = useSafeAreaInsetsEmitter();
2627
- const [allowsBackForwardNavigationGestures, setAllowsBackForwardNavigationGestures] = (0, import_react29.useState)(
2233
+ const [allowsBackForwardNavigationGestures, setAllowsBackForwardNavigationGestures] = (0, import_react28.useState)(
2628
2234
  props.allowsBackForwardNavigationGestures
2629
2235
  );
2630
2236
  const handler = useBridgeHandler({
2631
2237
  onMessage,
2632
2238
  eventListenerMap: {
2633
2239
  ...appsInTossEventBridges,
2634
- navigationAccessoryEvent: ({ onEvent, onError }) => import_tds_react_native15.tdsEvent.addEventListener("navigationAccessoryEvent", { onEvent, onError }),
2240
+ navigationAccessoryEvent: ({ onEvent, onError }) => import_tds_react_native14.tdsEvent.addEventListener("navigationAccessoryEvent", { onEvent, onError }),
2635
2241
  backEvent: ({ onEvent }) => {
2636
2242
  webBackHandler.addEventListener(onEvent);
2637
2243
  return () => {
2638
2244
  webBackHandler.removeEventListener(onEvent);
2639
2245
  };
2640
2246
  },
2641
- entryMessageExited: ({ onEvent, onError }) => import_native_modules23.appsInTossEvent.addEventListener("entryMessageExited", { onEvent, onError }),
2642
- updateLocationEvent: ({ onEvent, onError, options }) => import_native_modules23.appsInTossEvent.addEventListener("updateLocationEvent", { onEvent, onError, options }),
2247
+ updateLocationEvent: ({ onEvent, onError, options }) => import_native_modules18.appsInTossEvent.addEventListener("updateLocationEvent", { onEvent, onError, options }),
2643
2248
  safeAreaInsetsChange: ({ onEvent }) => {
2644
2249
  safeAreaInsetsEmitter.on("safeAreaInsetsChange", onEvent);
2645
2250
  return () => {
@@ -2647,23 +2252,18 @@ function WebView({ type, local, onMessage, ...props }) {
2647
2252
  };
2648
2253
  },
2649
2254
  /** @internal */
2650
- appBridgeCallbackEvent: ({ onEvent, onError, options }) => import_native_modules23.appsInTossEvent.addEventListener("appBridgeCallbackEvent", { onEvent, onError, options }),
2255
+ appBridgeCallbackEvent: ({ onEvent, onError, options }) => import_native_modules18.appsInTossEvent.addEventListener("appBridgeCallbackEvent", { onEvent, onError, options }),
2651
2256
  /** AdMob */
2652
- loadAdMobInterstitialAd: import_native_modules23.GoogleAdMob.loadAdMobInterstitialAd,
2653
- showAdMobInterstitialAd: import_native_modules23.GoogleAdMob.showAdMobInterstitialAd,
2654
- loadAdMobRewardedAd: import_native_modules23.GoogleAdMob.loadAdMobRewardedAd,
2655
- showAdMobRewardedAd: import_native_modules23.GoogleAdMob.showAdMobRewardedAd,
2257
+ loadAdMobInterstitialAd: import_native_modules18.GoogleAdMob.loadAdMobInterstitialAd,
2258
+ showAdMobInterstitialAd: import_native_modules18.GoogleAdMob.showAdMobInterstitialAd,
2259
+ loadAdMobRewardedAd: import_native_modules18.GoogleAdMob.loadAdMobRewardedAd,
2260
+ showAdMobRewardedAd: import_native_modules18.GoogleAdMob.showAdMobRewardedAd,
2656
2261
  /** AdMobV2 */
2657
- loadAppsInTossAdMob: import_native_modules23.GoogleAdMob.loadAppsInTossAdMob,
2658
- showAppsInTossAdMob: import_native_modules23.GoogleAdMob.showAppsInTossAdMob,
2659
- /** IntegratedAd */
2660
- loadFullScreenAd,
2661
- showFullScreenAd,
2662
- /** TossAd */
2663
- fetchTossAd,
2262
+ loadAppsInTossAdMob: import_native_modules18.GoogleAdMob.loadAppsInTossAdMob,
2263
+ showAppsInTossAdMob: import_native_modules18.GoogleAdMob.showAppsInTossAdMob,
2664
2264
  /** IAP */
2665
- iapCreateOneTimePurchaseOrder: import_native_modules23.IAP.createOneTimePurchaseOrder,
2666
- requestOneTimePurchase: import_native_modules23.requestOneTimePurchase
2265
+ iapCreateOneTimePurchaseOrder: import_native_modules18.IAP.createOneTimePurchaseOrder,
2266
+ requestOneTimePurchase: import_native_modules18.requestOneTimePurchase
2667
2267
  },
2668
2268
  constantHandlerMap: {
2669
2269
  ...appsInTossConstantBridges,
@@ -2673,18 +2273,13 @@ function WebView({ type, local, onMessage, ...props }) {
2673
2273
  getSafeAreaRight: () => insets.right,
2674
2274
  ...Object.fromEntries(Object.entries(global2).map(([key, value]) => [key, () => value])),
2675
2275
  /** AdMob */
2676
- loadAdMobInterstitialAd_isSupported: import_native_modules23.GoogleAdMob.loadAdMobInterstitialAd.isSupported,
2677
- showAdMobInterstitialAd_isSupported: import_native_modules23.GoogleAdMob.showAdMobInterstitialAd.isSupported,
2678
- loadAdMobRewardedAd_isSupported: import_native_modules23.GoogleAdMob.loadAdMobRewardedAd.isSupported,
2679
- showAdMobRewardedAd_isSupported: import_native_modules23.GoogleAdMob.showAdMobRewardedAd.isSupported,
2276
+ loadAdMobInterstitialAd_isSupported: import_native_modules18.GoogleAdMob.loadAdMobInterstitialAd.isSupported,
2277
+ showAdMobInterstitialAd_isSupported: import_native_modules18.GoogleAdMob.showAdMobInterstitialAd.isSupported,
2278
+ loadAdMobRewardedAd_isSupported: import_native_modules18.GoogleAdMob.loadAdMobRewardedAd.isSupported,
2279
+ showAdMobRewardedAd_isSupported: import_native_modules18.GoogleAdMob.showAdMobRewardedAd.isSupported,
2680
2280
  /** AdMobV2 */
2681
- loadAppsInTossAdMob_isSupported: import_native_modules23.GoogleAdMob.loadAppsInTossAdMob.isSupported,
2682
- showAppsInTossAdMob_isSupported: import_native_modules23.GoogleAdMob.showAppsInTossAdMob.isSupported,
2683
- /** IntegratedAd */
2684
- loadFullScreenAd_isSupported: loadFullScreenAd.isSupported,
2685
- showFullScreenAd_isSupported: showFullScreenAd.isSupported,
2686
- /** TossAd */
2687
- fetchTossAd_isSupported: fetchTossAd.isSupported,
2281
+ loadAppsInTossAdMob_isSupported: import_native_modules18.GoogleAdMob.loadAppsInTossAdMob.isSupported,
2282
+ showAppsInTossAdMob_isSupported: import_native_modules18.GoogleAdMob.showAppsInTossAdMob.isSupported,
2688
2283
  /** env */
2689
2284
  getDeploymentId: env.getDeploymentId
2690
2285
  },
@@ -2707,22 +2302,22 @@ function WebView({ type, local, onMessage, ...props }) {
2707
2302
  getCurrentLocation: appsInTossAsyncBridges.getCurrentLocation,
2708
2303
  openCamera: appsInTossAsyncBridges.openCamera,
2709
2304
  /** Storage */
2710
- getStorageItem: import_native_modules23.Storage.getItem,
2711
- setStorageItem: import_native_modules23.Storage.setItem,
2712
- removeStorageItem: import_native_modules23.Storage.removeItem,
2713
- clearItems: import_native_modules23.Storage.clearItems,
2305
+ getStorageItem: import_native_modules18.Storage.getItem,
2306
+ setStorageItem: import_native_modules18.Storage.setItem,
2307
+ removeStorageItem: import_native_modules18.Storage.removeItem,
2308
+ clearItems: import_native_modules18.Storage.clearItems,
2714
2309
  /** IAP */
2715
- iapGetProductItemList: import_native_modules23.IAP.getProductItemList,
2716
- iapCreateOneTimePurchaseOrder: import_native_modules23.iapCreateOneTimePurchaseOrder,
2717
- processProductGrant: import_native_modules23.processProductGrant,
2718
- getPendingOrders: import_native_modules23.IAP.getPendingOrders,
2719
- getCompletedOrRefundedOrders: import_native_modules23.IAP.getCompletedOrRefundedOrders,
2720
- completeProductGrant: import_native_modules23.IAP.completeProductGrant,
2721
- /** Toss Ads */
2722
- tossAdEventLog
2310
+ iapGetProductItemList: import_native_modules18.IAP.getProductItemList,
2311
+ iapCreateOneTimePurchaseOrder: import_native_modules18.iapCreateOneTimePurchaseOrder,
2312
+ processProductGrant: import_native_modules18.processProductGrant,
2313
+ getPendingOrders: import_native_modules18.IAP.getPendingOrders,
2314
+ getCompletedOrRefundedOrders: import_native_modules18.IAP.getCompletedOrRefundedOrders,
2315
+ completeProductGrant: import_native_modules18.IAP.completeProductGrant,
2316
+ /* Private */
2317
+ memoryDebugEventLog: webViewMemoryDebugLog
2723
2318
  }
2724
2319
  });
2725
- const headerPropForExternalWebView = (0, import_react29.useMemo)(() => {
2320
+ const headerPropForExternalWebView = (0, import_react28.useMemo)(() => {
2726
2321
  const parsedNavigationBar = global2.navigationBar != null ? safeParseNavigationBar(global2.navigationBar) : null;
2727
2322
  const initialAccessoryButton = parsedNavigationBar?.initialAccessoryButton;
2728
2323
  const withBackButton = parsedNavigationBar?.withBackButton ?? true;
@@ -2743,13 +2338,13 @@ function WebView({ type, local, onMessage, ...props }) {
2743
2338
  colorPreference: "light"
2744
2339
  });
2745
2340
  const refs = mergeRefs(handler.ref, webViewRef);
2746
- (0, import_react29.useEffect)(() => {
2341
+ (0, import_react28.useEffect)(() => {
2747
2342
  const callback = () => {
2748
2343
  webBackHandler.handleWebBack();
2749
2344
  return true;
2750
2345
  };
2751
- import_react_native38.BackHandler.addEventListener("hardwareBackPress", callback);
2752
- return () => import_react_native38.BackHandler.removeEventListener("hardwareBackPress", callback);
2346
+ import_react_native35.BackHandler.addEventListener("hardwareBackPress", callback);
2347
+ return () => import_react_native35.BackHandler.removeEventListener("hardwareBackPress", callback);
2753
2348
  }, [webBackHandler]);
2754
2349
  const globalScripts = useGlobalScripts();
2755
2350
  return /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
@@ -2774,14 +2369,14 @@ function WebView({ type, local, onMessage, ...props }) {
2774
2369
  props.onNavigationStateChange?.(event);
2775
2370
  webBackHandler.onNavigationStateChange(event);
2776
2371
  },
2777
- userAgent: import_react_native38.Platform.OS === "ios" ? userAgent : void 0,
2372
+ userAgent: import_react_native35.Platform.OS === "ios" ? userAgent : void 0,
2778
2373
  sharedCookiesEnabled: true,
2779
2374
  webviewDebuggingEnabled: webViewDebuggingEnabled,
2780
2375
  thirdPartyCookiesEnabled: true,
2781
2376
  onMessage: handler.onMessage,
2782
2377
  injectedJavaScript: globalScripts.afterLoad,
2783
2378
  injectedJavaScriptBeforeContentLoaded: mergeScripts(handler.injectedJavaScript, globalScripts.beforeLoad),
2784
- decelerationRate: import_react_native38.Platform.OS === "ios" ? 1 : void 0,
2379
+ decelerationRate: import_react_native35.Platform.OS === "ios" ? 1 : void 0,
2785
2380
  allowsBackForwardNavigationGestures,
2786
2381
  onShouldStartLoadWithRequest: (event) => {
2787
2382
  try {
@@ -2789,7 +2384,7 @@ function WebView({ type, local, onMessage, ...props }) {
2789
2384
  if (["https:", "http:"].includes(url.protocol)) {
2790
2385
  return true;
2791
2386
  } else {
2792
- import_react_native38.Linking.openURL(convertIntentURL(url) ?? url.href);
2387
+ import_react_native35.Linking.openURL(convertIntentURL(url) ?? url.href);
2793
2388
  return false;
2794
2389
  }
2795
2390
  } catch (error) {
@@ -2797,10 +2392,49 @@ function WebView({ type, local, onMessage, ...props }) {
2797
2392
  return false;
2798
2393
  }
2799
2394
  },
2800
- originWhitelist: ["https://*", "http://*", "intoss://*", "intoss-private://*", "servicetoss://*", "supertoss://*", "intent://*"]
2395
+ originWhitelist: [
2396
+ "https://*",
2397
+ "http://*",
2398
+ "intoss://*",
2399
+ "intoss-private://*",
2400
+ "servicetoss://*",
2401
+ "supertoss://*",
2402
+ "intent://*"
2403
+ ],
2404
+ onContentProcessDidTerminate: (event) => {
2405
+ webViewProcessDidTerminateEventLog(event.nativeEvent.url);
2406
+ webViewRef.current?.reload();
2407
+ },
2408
+ onRenderProcessGone: () => {
2409
+ webViewProcessDidTerminateEventLog();
2410
+ webViewRef.current?.reload();
2411
+ }
2801
2412
  }
2802
2413
  );
2803
2414
  }
2415
+ async function webViewMemoryDebugLog(params) {
2416
+ webViewDebugLog("AppsInTossWebViewMemoryDebug", params);
2417
+ }
2418
+ function webViewProcessDidTerminateEventLog(url) {
2419
+ webViewDebugLog("AppsInTossWebViewProcessDidTerminate", { url });
2420
+ }
2421
+ function webViewDebugLog(logName, params) {
2422
+ const global2 = getAppsInTossGlobals();
2423
+ const event = {
2424
+ log_name: logName,
2425
+ log_type: "debug",
2426
+ params: {
2427
+ ...params,
2428
+ app_name: import_react_native34.Granite.appName,
2429
+ deployment_id: global2.deploymentId
2430
+ }
2431
+ };
2432
+ if ((0, import_native_modules18.getOperationalEnvironment)() === "toss") {
2433
+ import_native_modules18.INTERNAL__module.tossCoreEventLog(event);
2434
+ } else {
2435
+ console.log("[webViewDebugLog]", event);
2436
+ }
2437
+ }
2804
2438
  function useGlobalScripts() {
2805
2439
  const global2 = getAppsInTossGlobals();
2806
2440
  const disableTextSelectionCSS = `
@@ -2882,8 +2516,6 @@ var Analytics2 = {
2882
2516
  OverlayProvider,
2883
2517
  WebView,
2884
2518
  env,
2885
- loadFullScreenAd,
2886
- showFullScreenAd,
2887
2519
  useCreateUserAgent,
2888
2520
  useGeolocation,
2889
2521
  useOverlay,