@apps-in-toss/web-framework 0.0.35 → 0.0.37

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.
@@ -38363,6 +38363,15 @@ window.__bedrock.app = { name: Ait.appName, buildNumber: Ait.buildNumber };
38363
38363
  });
38364
38364
 
38365
38365
  // ../../.yarn/__virtual__/@apps-in-toss-framework-virtual-574b136add/1/apps-in-toss-packages/framework/dist/index.js
38366
+ function useReferrer() {
38367
+ return (0, import_react159.useMemo)(function() {
38368
+ try {
38369
+ return new URL(getSchemeUri()).searchParams.get("referrer");
38370
+ } catch (e4) {
38371
+ return null;
38372
+ }
38373
+ }, []);
38374
+ }
38366
38375
  function getOperationalEnvironment() {
38367
38376
  return AppsInTossModule.operationalEnvironment;
38368
38377
  }
@@ -38402,15 +38411,6 @@ window.__bedrock.app = { name: Ait.appName, buildNumber: Ait.buildNumber };
38402
38411
  }
38403
38412
  });
38404
38413
  }
38405
- function useReferrer() {
38406
- return (0, import_react158.useMemo)(function() {
38407
- try {
38408
- return new URL(getSchemeUri()).searchParams.get("referrer");
38409
- } catch (e4) {
38410
- return null;
38411
- }
38412
- }, []);
38413
- }
38414
38414
  function isPrivateScheme() {
38415
38415
  try {
38416
38416
  return new URL(getSchemeUri()).protocol === "intoss-private:";
@@ -38418,6 +38418,44 @@ window.__bedrock.app = { name: Ait.appName, buildNumber: Ait.buildNumber };
38418
38418
  return false;
38419
38419
  }
38420
38420
  }
38421
+ function useCaptureExitLog() {
38422
+ var referrer2 = useReferrer();
38423
+ var visible = useVisibility();
38424
+ var enterTime = (0, import_react158.useRef)(void 0);
38425
+ (0, import_react158.useEffect)(function() {
38426
+ if (visible === true) {
38427
+ enterTime.current = Date.now();
38428
+ }
38429
+ }, [
38430
+ visible
38431
+ ]);
38432
+ var captureExitLog = (0, import_react158.useCallback)(function(exitTime) {
38433
+ if (enterTime.current == null) {
38434
+ return;
38435
+ }
38436
+ var stayTime = Math.floor(exitTime - enterTime.current);
38437
+ tossCoreEventLog({
38438
+ log_name: EXIT_IMPRESSION_LOG_NAME,
38439
+ log_type: "event",
38440
+ params: {
38441
+ schema_id: EXIT_IMPRESSION_SCHEMA_ID,
38442
+ event_type: "impression",
38443
+ referrer: referrer2,
38444
+ deployment_id: env.getDeploymentId(),
38445
+ app_name: Bedrock.appName,
38446
+ is_private: isPrivateScheme(),
38447
+ stay_time: stayTime.toString(),
38448
+ exit_time: exitTime.toString()
38449
+ }
38450
+ });
38451
+ enterTime.current = void 0;
38452
+ }, [
38453
+ referrer2
38454
+ ]);
38455
+ return {
38456
+ captureExitLog
38457
+ };
38458
+ }
38421
38459
  function EntryAppEvent() {
38422
38460
  var _useReferrer;
38423
38461
  var referrer2 = (_useReferrer = useReferrer()) !== null && _useReferrer !== void 0 ? _useReferrer : "";
@@ -38457,6 +38495,19 @@ window.__bedrock.app = { name: Ait.appName, buildNumber: Ait.buildNumber };
38457
38495
  ]);
38458
38496
  return null;
38459
38497
  }
38498
+ function StayTimeAppEvent() {
38499
+ var visible = useVisibility();
38500
+ var captureExitLog = useCaptureExitLog().captureExitLog;
38501
+ (0, import_react157.useEffect)(function() {
38502
+ if (visible === false) {
38503
+ captureExitLog(Date.now());
38504
+ }
38505
+ }, [
38506
+ visible,
38507
+ captureExitLog
38508
+ ]);
38509
+ return null;
38510
+ }
38460
38511
  function getPermission(permission) {
38461
38512
  return AppsInTossModule.getPermission(permission);
38462
38513
  }
@@ -38589,7 +38640,7 @@ window.__bedrock.app = { name: Ait.appName, buildNumber: Ait.buildNumber };
38589
38640
  function useAppsInTossBridge() {
38590
38641
  var controller = useBridge();
38591
38642
  var appsInTossGlobals2 = getAppsInTossGlobals();
38592
- (0, import_react159.useEffect)(function() {
38643
+ (0, import_react160.useEffect)(function() {
38593
38644
  var commonProps = {
38594
38645
  serviceName: appsInTossGlobals2.brandDisplayName,
38595
38646
  icon: toIcon(appsInTossGlobals2.brandIcon),
@@ -39071,6 +39122,7 @@ window.__bedrock.app = { name: Ait.appName, buildNumber: Ait.buildNumber };
39071
39122
  ]);
39072
39123
  return /* @__PURE__ */ (0, import_jsx_runtime188.jsxs)(import_jsx_runtime188.Fragment, {
39073
39124
  children: [
39125
+ /* @__PURE__ */ (0, import_jsx_runtime188.jsx)(AppEvent.StayTime, {}),
39074
39126
  /* @__PURE__ */ (0, import_jsx_runtime188.jsx)(AppEvent.Entry, {}),
39075
39127
  /* @__PURE__ */ (0, import_jsx_runtime188.jsx)(AppEvent.System, _object_spread({}, initialProps)),
39076
39128
  /* @__PURE__ */ (0, import_jsx_runtime188.jsx)(Container, _object_spread_props(_object_spread({}, initialProps), {
@@ -39502,14 +39554,14 @@ window.__bedrock.app = { name: Ait.appName, buildNumber: Ait.buildNumber };
39502
39554
  }
39503
39555
  function useBridgeHandler(param) {
39504
39556
  var onMessage = param.onMessage, constantHandlerMap = param.constantHandlerMap, asyncHandlerMap = param.asyncHandlerMap, eventListenerMap = param.eventListenerMap, originalInjectedJavaScript = param.injectedJavaScript;
39505
- var ref = (0, import_react164.useRef)(null);
39506
- var injectedJavaScript = (0, import_react164.useMemo)(function() {
39557
+ var ref = (0, import_react165.useRef)(null);
39558
+ var injectedJavaScript = (0, import_react165.useMemo)(function() {
39507
39559
  return [
39508
39560
  "window.__CONSTANT_HANDLER_MAP = ".concat(JSON.stringify(Object.entries(constantHandlerMap).reduce(function(acc, param2) {
39509
39561
  var _param = _sliced_to_array(param2, 2), key = _param[0], value = _param[1];
39510
39562
  acc[key] = typeof value === "function" ? value() : value;
39511
39563
  return acc;
39512
- }, {}))),
39564
+ }, {})), ";"),
39513
39565
  originalInjectedJavaScript,
39514
39566
  "true"
39515
39567
  ].join("\n");
@@ -39529,7 +39581,7 @@ window.__bedrock.app = { name: Ait.appName, buildNumber: Ait.buildNumber };
39529
39581
  (_ref_current = ref.current) === null || _ref_current === void 0 ? void 0 : _ref_current.injectJavaScript("\n window.__BEDROCK_NATIVE_EMITTER.emit('".concat(functionName, "/onError/").concat(eventId, "', ").concat(JSON.stringify(error, null, 0), ");\n "));
39530
39582
  };
39531
39583
  };
39532
- var $onMessage = (0, import_react164.useCallback)(
39584
+ var $onMessage = (0, import_react165.useCallback)(
39533
39585
  function() {
39534
39586
  var _ref = _async_to_generator(function(e4) {
39535
39587
  var data, _eventListenerMap_data_functionName, handleOnEvent, handleOnError, remove, key, remove1, _ref_current;
@@ -39812,7 +39864,7 @@ window.__bedrock.app = { name: Ait.appName, buildNumber: Ait.buildNumber };
39812
39864
  throw new Error("Invalid WebView type: '".concat(type, "'"));
39813
39865
  }
39814
39866
  var bedrockEvent = useBedrockEvent();
39815
- var uri = (0, import_react160.useMemo)(function() {
39867
+ var uri = (0, import_react161.useMemo)(function() {
39816
39868
  return getWebViewUri(local);
39817
39869
  }, [
39818
39870
  local
@@ -39821,8 +39873,12 @@ window.__bedrock.app = { name: Ait.appName, buildNumber: Ait.buildNumber };
39821
39873
  var bottom = useSafeAreaBottom();
39822
39874
  var global2 = getAppsInTossGlobals();
39823
39875
  var partner = usePartnerNavigation();
39876
+ var disableTextSelectionCSS = "\n (function() {\n const style = document.createElement('style');\n style.textContent = '*:not(input):not(textarea) { -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; -webkit-touch-callout: none; }';\n document.head.appendChild(style);\n })();\n ";
39824
39877
  var handler = useBridgeHandler({
39825
39878
  onMessage,
39879
+ injectedJavaScript: [
39880
+ disableTextSelectionCSS
39881
+ ].join("\n"),
39826
39882
  // eslint-disable-next-line @typescript-eslint/ban-ts-comment
39827
39883
  eventListenerMap: _object_spread_props(_object_spread({}, event_bridges_exports), {
39828
39884
  navigationAccessoryEvent: function(param) {
@@ -39928,7 +39984,7 @@ window.__bedrock.app = { name: Ait.appName, buildNumber: Ait.buildNumber };
39928
39984
  iapGetProductItemList: IAP.getProductItemList
39929
39985
  })
39930
39986
  });
39931
- var baseProps = (0, import_react160.useMemo)(function() {
39987
+ var baseProps = (0, import_react161.useMemo)(function() {
39932
39988
  switch (type) {
39933
39989
  case "partner": {
39934
39990
  var headerOnlyProp = {
@@ -39958,14 +40014,39 @@ window.__bedrock.app = { name: Ait.appName, buildNumber: Ait.buildNumber };
39958
40014
  ]);
39959
40015
  var BaseWebView = WEBVIEW_TYPES[type];
39960
40016
  var webViewDebuggingEnabled = operationalEnvironment === "sandbox";
39961
- var handleNavigationStateChange = (0, import_react160.useCallback)(function(event) {
40017
+ var _useState4 = _sliced_to_array((0, import_react161.useState)(false), 2), canHistoryGoBack = _useState4[0], setCanHistoryGoBack = _useState4[1];
40018
+ var handleNavigationStateChange = (0, import_react161.useCallback)(function(event) {
39962
40019
  if (event.url) {
39963
40020
  trackScreen(event.url);
39964
40021
  }
39965
- }, []);
40022
+ setCanHistoryGoBack(event.canGoBack);
40023
+ }, [
40024
+ setCanHistoryGoBack
40025
+ ]);
39966
40026
  var userAgent = useCreateUserAgent({
39967
40027
  colorPreference: "light"
39968
40028
  });
40029
+ var backEvent = useBackEvent();
40030
+ var handleBackEvent = (0, import_react161.useCallback)(function() {
40031
+ if (canHistoryGoBack) {
40032
+ var _handler_ref_current;
40033
+ (_handler_ref_current = handler.ref.current) === null || _handler_ref_current === void 0 ? void 0 : _handler_ref_current.goBack();
40034
+ } else {
40035
+ closeView();
40036
+ }
40037
+ }, [
40038
+ canHistoryGoBack,
40039
+ handler
40040
+ ]);
40041
+ (0, import_react161.useEffect)(function() {
40042
+ backEvent.addEventListener(handleBackEvent);
40043
+ return function() {
40044
+ return backEvent.removeEventListener(handleBackEvent);
40045
+ };
40046
+ }, [
40047
+ backEvent,
40048
+ handleBackEvent
40049
+ ]);
39969
40050
  return /* @__PURE__ */ (0, import_jsx_runtime194.jsx)(BaseWebView, _object_spread_props(_object_spread({
39970
40051
  ref: handler.ref
39971
40052
  }, props, baseProps), {
@@ -39993,7 +40074,7 @@ window.__bedrock.app = { name: Ait.appName, buildNumber: Ait.buildNumber };
39993
40074
  }
39994
40075
  return value;
39995
40076
  }
39996
- var import_react157, import_react_native137, import_react_native138, import_react_native139, import_react158, import_react159, import_react_native141, import_jsx_runtime188, import_react160, import_react_native143, import_react161, import_react_native145, import_react162, import_react_native147, import_react163, import_jsx_runtime189, import_react_native150, import_jsx_runtime190, import_react_native152, import_react_native153, import_react_native154, import_jsx_runtime191, import_react_native155, import_jsx_runtime192, import_jsx_runtime193, import_react164, import_react_native156, import_react165, import_jsx_runtime194, __defProp2, __export2, env, AppsInTossModuleInstance, AppsInTossModule, SEMVER_REGEX, isWildcard, tryParse, coerceTypes, compareValues, parseVersion, compareSegments, compareVersions, TossCoreModule, ENTRY_APP_EVENT_SCHEMA_ID, AppEvent, EntryMessageExitedEvent, nativeEventEmitter2, UpdateLocationEvent, INTERNAL__callbacks, INTERNAL__appBridgeHandler, UNSAFE__nativeEventEmitter, AppBridgeCallbackEvent, VisibilityChangedByTransparentServiceWebEvent, appsInTossEvent, async_bridges_exports2, DEFAULT_MAX_COUNT, DEFAULT_MAX_WIDTH, GAME_PROFILE_WEBVIEW_URL, GAME_CENTER_MIN_VERSION, AppsInToss, ANDROID_GOOGLE_AD_MOB_SUPPORTED_VERSION, IOS_GOOGLE_AD_MOB_SUPPORTED_VERSION, UNSUPPORTED_ERROR_MESSAGE, ENVIRONMENT, IAP, Storage, GoogleAdMob, useGameProfileToast, DEFAULT_ERROR, PLAYSTORE_LINK, APPSTORE_LINK, getMarketLink, INTERNAL__onVisibilityChangedByTransparentServiceWeb, openTransparentWebView, useGameCenterProfile, Z_INDEX, GameProfile, overlayStyle, RIGHT_MARGIN2, IOS_DEFAULT_MARGIN2, styles36, originXML, GameWebView, globalEventListenerMap, constant_bridges_exports2, event_bridges_exports, FontA11yCategory, androidFontScaleMap, iosScaleToAndroidScale, extractDateFromUUIDv7, getGroupId, getReferrer, trackScreen, appsInTossGlobals, operationalEnvironment, TYPES, WEBVIEW_TYPES, Analytics2;
40077
+ var import_react157, import_react158, import_react159, import_react_native137, import_react_native138, import_react_native139, import_react160, import_react_native141, import_jsx_runtime188, import_react161, import_react_native143, import_react162, import_react_native145, import_react163, import_react_native147, import_react164, import_jsx_runtime189, import_react_native150, import_jsx_runtime190, import_react_native152, import_react_native153, import_react_native154, import_jsx_runtime191, import_react_native155, import_jsx_runtime192, import_jsx_runtime193, import_react165, import_react_native156, import_react166, import_jsx_runtime194, __defProp2, __export2, env, AppsInTossModuleInstance, AppsInTossModule, SEMVER_REGEX, isWildcard, tryParse, coerceTypes, compareValues, parseVersion, compareSegments, compareVersions, TossCoreModule, EXIT_IMPRESSION_LOG_NAME, EXIT_IMPRESSION_SCHEMA_ID, ENTRY_APP_EVENT_SCHEMA_ID, AppEvent, EntryMessageExitedEvent, nativeEventEmitter2, UpdateLocationEvent, INTERNAL__callbacks, INTERNAL__appBridgeHandler, UNSAFE__nativeEventEmitter, AppBridgeCallbackEvent, VisibilityChangedByTransparentServiceWebEvent, appsInTossEvent, async_bridges_exports2, DEFAULT_MAX_COUNT, DEFAULT_MAX_WIDTH, GAME_PROFILE_WEBVIEW_URL, GAME_CENTER_MIN_VERSION, AppsInToss, ANDROID_GOOGLE_AD_MOB_SUPPORTED_VERSION, IOS_GOOGLE_AD_MOB_SUPPORTED_VERSION, UNSUPPORTED_ERROR_MESSAGE, ENVIRONMENT, IAP, Storage, GoogleAdMob, useGameProfileToast, DEFAULT_ERROR, PLAYSTORE_LINK, APPSTORE_LINK, getMarketLink, INTERNAL__onVisibilityChangedByTransparentServiceWeb, openTransparentWebView, useGameCenterProfile, Z_INDEX, GameProfile, overlayStyle, RIGHT_MARGIN2, IOS_DEFAULT_MARGIN2, styles36, originXML, GameWebView, globalEventListenerMap, constant_bridges_exports2, event_bridges_exports, FontA11yCategory, androidFontScaleMap, iosScaleToAndroidScale, extractDateFromUUIDv7, getGroupId, getReferrer, trackScreen, appsInTossGlobals, operationalEnvironment, TYPES, WEBVIEW_TYPES, Analytics2;
39997
40078
  var init_dist4 = __esm({
39998
40079
  "../../.yarn/__virtual__/@apps-in-toss-framework-virtual-574b136add/1/apps-in-toss-packages/framework/dist/index.js"() {
39999
40080
  "use strict";
@@ -40018,13 +40099,16 @@ window.__bedrock.app = { name: Ait.appName, buildNumber: Ait.buildNumber };
40018
40099
  init_src4();
40019
40100
  import_react157 = __toESM(require_react(), 1);
40020
40101
  init_src4();
40102
+ import_react158 = __toESM(require_react(), 1);
40103
+ init_src4();
40104
+ import_react159 = __toESM(require_react(), 1);
40105
+ init_src4();
40021
40106
  import_react_native137 = __toESM(require_react_native(), 1);
40022
40107
  import_react_native138 = __toESM(require_react_native(), 1);
40023
40108
  import_react_native139 = __toESM(require_react_native(), 1);
40024
- import_react158 = __toESM(require_react(), 1);
40025
40109
  init_src4();
40026
40110
  init_esm8();
40027
- import_react159 = __toESM(require_react(), 1);
40111
+ import_react160 = __toESM(require_react(), 1);
40028
40112
  init_src4();
40029
40113
  init_src4();
40030
40114
  init_src4();
@@ -40035,7 +40119,7 @@ window.__bedrock.app = { name: Ait.appName, buildNumber: Ait.buildNumber };
40035
40119
  import_jsx_runtime188 = __toESM(require_jsx_runtime(), 1);
40036
40120
  init_esm8();
40037
40121
  init_private2();
40038
- import_react160 = __toESM(require_react(), 1);
40122
+ import_react161 = __toESM(require_react(), 1);
40039
40123
  import_react_native143 = __toESM(require_react_native(), 1);
40040
40124
  init_src4();
40041
40125
  init_async_bridges();
@@ -40043,15 +40127,15 @@ window.__bedrock.app = { name: Ait.appName, buildNumber: Ait.buildNumber };
40043
40127
  init_react_native_webview();
40044
40128
  init_esm8();
40045
40129
  init_dist3();
40046
- import_react161 = __toESM(require_react(), 1);
40130
+ import_react162 = __toESM(require_react(), 1);
40047
40131
  import_react_native145 = __toESM(require_react_native(), 1);
40048
40132
  init_src4();
40049
40133
  init_esm8();
40050
- import_react162 = __toESM(require_react(), 1);
40134
+ import_react163 = __toESM(require_react(), 1);
40051
40135
  import_react_native147 = __toESM(require_react_native(), 1);
40052
40136
  init_esm8();
40053
40137
  init_dist3();
40054
- import_react163 = __toESM(require_react(), 1);
40138
+ import_react164 = __toESM(require_react(), 1);
40055
40139
  init_src4();
40056
40140
  init_esm8();
40057
40141
  init_private2();
@@ -40069,10 +40153,10 @@ window.__bedrock.app = { name: Ait.appName, buildNumber: Ait.buildNumber };
40069
40153
  import_react_native155 = __toESM(require_react_native(), 1);
40070
40154
  import_jsx_runtime192 = __toESM(require_jsx_runtime(), 1);
40071
40155
  import_jsx_runtime193 = __toESM(require_jsx_runtime(), 1);
40072
- import_react164 = __toESM(require_react(), 1);
40156
+ import_react165 = __toESM(require_react(), 1);
40073
40157
  import_react_native156 = __toESM(require_react_native(), 1);
40074
40158
  init_src4();
40075
- import_react165 = __toESM(require_react(), 1);
40159
+ import_react166 = __toESM(require_react(), 1);
40076
40160
  init_src4();
40077
40161
  init_src4();
40078
40162
  import_jsx_runtime194 = __toESM(require_jsx_runtime(), 1);
@@ -40178,10 +40262,13 @@ window.__bedrock.app = { name: Ait.appName, buildNumber: Ait.buildNumber };
40178
40262
  return 0;
40179
40263
  };
40180
40264
  TossCoreModule = import_react_native137.NativeModules.TossCoreModule;
40265
+ EXIT_IMPRESSION_LOG_NAME = "appsintoss_app_visit__common_module::impression__stay_time";
40266
+ EXIT_IMPRESSION_SCHEMA_ID = 1631628;
40181
40267
  ENTRY_APP_EVENT_SCHEMA_ID = 1562181;
40182
40268
  AppEvent = {
40183
40269
  Entry: EntryAppEvent,
40184
- System: SystemAppEvent
40270
+ System: SystemAppEvent,
40271
+ StayTime: StayTimeAppEvent
40185
40272
  };
40186
40273
  EntryMessageExitedEvent = /* @__PURE__ */ function(BedrockEventDefinition3) {
40187
40274
  "use strict";
@@ -40526,17 +40613,17 @@ window.__bedrock.app = { name: Ait.appName, buildNumber: Ait.buildNumber };
40526
40613
  openURL(url.toString());
40527
40614
  };
40528
40615
  useGameCenterProfile = function(isReadyForProfileUI) {
40529
- var _useState = _sliced_to_array((0, import_react163.useState)(void 0), 2), profileData = _useState[0], setProfileData = _useState[1];
40530
- var _useState1 = _sliced_to_array((0, import_react163.useState)(true), 2), isProfileDataLoading = _useState1[0], setIsProfileDataLoading = _useState1[1];
40531
- var _useState2 = _sliced_to_array((0, import_react163.useState)(false), 2), isProfileDataRefetching = _useState2[0], setIsProfileDataRefetching = _useState2[1];
40616
+ var _useState = _sliced_to_array((0, import_react164.useState)(void 0), 2), profileData = _useState[0], setProfileData = _useState[1];
40617
+ var _useState1 = _sliced_to_array((0, import_react164.useState)(true), 2), isProfileDataLoading = _useState1[0], setIsProfileDataLoading = _useState1[1];
40618
+ var _useState2 = _sliced_to_array((0, import_react164.useState)(false), 2), isProfileDataRefetching = _useState2[0], setIsProfileDataRefetching = _useState2[1];
40532
40619
  var shouldShowLoadingOverlay = isProfileDataLoading && isReadyForProfileUI;
40533
40620
  var shouldShowProfileNotFoundOverlay = (profileData === null || profileData === void 0 ? void 0 : profileData.statusCode) === "PROFILE_NOT_FOUND" && isReadyForProfileUI && !isProfileDataRefetching;
40534
40621
  var canShowBottomSheetOrToast = !isProfileDataLoading && isReadyForProfileUI;
40535
- var _useState3 = _sliced_to_array((0, import_react163.useState)(false), 2), isWebviewLoading = _useState3[0], setIsWebviewLoading = _useState3[1];
40536
- var isCompletedProfileFlow = (0, import_react163.useRef)(false);
40622
+ var _useState3 = _sliced_to_array((0, import_react164.useState)(false), 2), isWebviewLoading = _useState3[0], setIsWebviewLoading = _useState3[1];
40623
+ var isCompletedProfileFlow = (0, import_react164.useRef)(false);
40537
40624
  var _useDialog = useDialog(), openAlert = _useDialog.openAlert, openConfirm = _useDialog.openConfirm;
40538
40625
  var openGameProfileToast = useGameProfileToast().openGameProfileToast;
40539
- var openErrorAlert = (0, import_react163.useCallback)(/* @__PURE__ */ _async_to_generator(function() {
40626
+ var openErrorAlert = (0, import_react164.useCallback)(/* @__PURE__ */ _async_to_generator(function() {
40540
40627
  return __generator(this, function(_state) {
40541
40628
  switch (_state.label) {
40542
40629
  case 0:
@@ -40558,7 +40645,7 @@ window.__bedrock.app = { name: Ait.appName, buildNumber: Ait.buildNumber };
40558
40645
  }), [
40559
40646
  openAlert
40560
40647
  ]);
40561
- var openProfileWebview = (0, import_react163.useCallback)(function() {
40648
+ var openProfileWebview = (0, import_react164.useCallback)(function() {
40562
40649
  if (isWebviewLoading) {
40563
40650
  return;
40564
40651
  }
@@ -40628,7 +40715,7 @@ window.__bedrock.app = { name: Ait.appName, buildNumber: Ait.buildNumber };
40628
40715
  openGameProfileToast,
40629
40716
  openErrorAlert
40630
40717
  ]);
40631
- var updateAppToSupportedMinVersion = (0, import_react163.useCallback)(/* @__PURE__ */ _async_to_generator(function() {
40718
+ var updateAppToSupportedMinVersion = (0, import_react164.useCallback)(/* @__PURE__ */ _async_to_generator(function() {
40632
40719
  var upddateConfirmDialogLabel, isConfirmed, STORE_SCHEME;
40633
40720
  return __generator(this, function(_state) {
40634
40721
  switch (_state.label) {
@@ -40691,7 +40778,7 @@ window.__bedrock.app = { name: Ait.appName, buildNumber: Ait.buildNumber };
40691
40778
  GameProfile = function(param) {
40692
40779
  var children = param.children, isReadyForProfileUI = param.isReadyForProfileUI;
40693
40780
  var _useGameCenterProfile = useGameCenterProfile(isReadyForProfileUI), profileData = _useGameCenterProfile.profileData, isProfileDataRefetching = _useGameCenterProfile.isProfileDataRefetching, shouldShowLoadingOverlay = _useGameCenterProfile.shouldShowLoadingOverlay, shouldShowProfileNotFoundOverlay = _useGameCenterProfile.shouldShowProfileNotFoundOverlay, canShowBottomSheetOrToast = _useGameCenterProfile.canShowBottomSheetOrToast, isCompletedProfileFlow = _useGameCenterProfile.isCompletedProfileFlow, openProfileWebview = _useGameCenterProfile.openProfileWebview, updateAppToSupportedMinVersion = _useGameCenterProfile.updateAppToSupportedMinVersion, setIsProfileDataLoading = _useGameCenterProfile.setIsProfileDataLoading, setProfileData = _useGameCenterProfile.setProfileData, openErrorAlert = _useGameCenterProfile.openErrorAlert, openGameProfileToast = _useGameCenterProfile.openGameProfileToast;
40694
- (0, import_react162.useEffect)(function() {
40781
+ (0, import_react163.useEffect)(function() {
40695
40782
  try {
40696
40783
  var getProfileData = function() {
40697
40784
  var _ref = _async_to_generator(function() {
@@ -40723,7 +40810,7 @@ window.__bedrock.app = { name: Ait.appName, buildNumber: Ait.buildNumber };
40723
40810
  setIsProfileDataLoading(false);
40724
40811
  }
40725
40812
  }, []);
40726
- (0, import_react162.useEffect)(function() {
40813
+ (0, import_react163.useEffect)(function() {
40727
40814
  var handleGameProfileFlow = function() {
40728
40815
  var _ref = _async_to_generator(function() {
40729
40816
  return __generator(this, function(_state) {
@@ -40863,11 +40950,12 @@ window.__bedrock.app = { name: Ait.appName, buildNumber: Ait.buildNumber };
40863
40950
  }
40864
40951
  });
40865
40952
  originXML = '<svg fill="none" height="30" viewBox="0 0 30 30" width="30" xmlns="https://www.w3.org/2000/svg"><rect fill="#031832" fill-opacity=".46" height="30" rx="15" width="30"/><rect height="29.5" rx="14.75" stroke="#d9d9ff" stroke-opacity=".11" stroke-width=".5" width="29.5" x=".25" y=".25"/><path clip-rule="evenodd" d="m16.5119 15.0014 4.7092-4.7092c.0929-.0928.1666-.2031.2169-.32441.0503-.12134.0762-.25141.0762-.38276.0001-.13136-.0258-.26144-.076-.38281s-.1239-.23166-.2167-.32457c-.0929-.09291-.2031-.16662-.3245-.21692-.1213-.05031-.2514-.07622-.3827-.07626-.1314-.00004-.2615.0258-.3828.07603-.1214.05023-.2317.12388-.3246.21673l-4.7092 4.70997-4.71-4.70997c-.1897-.17718-.4408-.27373-.70034-.26927s-.5072.10959-.69069.2932c-.1835.1836-.28848.43132-.29279.69087-.00432.25954.09238.51057.26968.70017l4.71004 4.7092-4.71004 4.7092c-.1392.1401-.23385.3183-.27204.5121-.0382.1939-.01823.3946.05739.5771s.20351.3386.36759.4486.35702.169.55456.1697c.25583 0 .51164-.0975.70664-.2925l4.71-4.71 4.7092 4.71c.0927.093.2029.1668.3243.2172.1213.0504.2514.0763.3828.0763s.2614-.0259.3828-.0763c.1213-.0504.2315-.1242.3243-.2172.0929-.0929.1667-.2032.217-.3246s.0762-.2515.0762-.3829-.0259-.2616-.0762-.383-.1241-.2317-.217-.3245z" fill="#fdfdfe" fill-opacity=".89" fill-rule="evenodd"/></svg>';
40866
- GameWebView = /* @__PURE__ */ (0, import_react161.forwardRef)(function GameWebView2(props, ref) {
40953
+ GameWebView = /* @__PURE__ */ (0, import_react162.forwardRef)(function GameWebView2(props, ref) {
40867
40954
  var openConfirm = useDialog().openConfirm;
40868
40955
  var brandDisplayName = getAppsInTossGlobals().brandDisplayName;
40869
- var _useState2 = _sliced_to_array((0, import_react161.useState)(false), 2), isEntryMessageExited = _useState2[0], setIsEntryMessageExited = _useState2[1];
40870
- var handleClose = (0, import_react161.useCallback)(/* @__PURE__ */ _async_to_generator(function() {
40956
+ var captureExitLog = useCaptureExitLog().captureExitLog;
40957
+ var _useState2 = _sliced_to_array((0, import_react162.useState)(false), 2), isEntryMessageExited = _useState2[0], setIsEntryMessageExited = _useState2[1];
40958
+ var handleClose = (0, import_react162.useCallback)(/* @__PURE__ */ _async_to_generator(function() {
40871
40959
  var isConfirmed;
40872
40960
  return __generator(this, function(_state) {
40873
40961
  switch (_state.label) {
@@ -40884,6 +40972,7 @@ window.__bedrock.app = { name: Ait.appName, buildNumber: Ait.buildNumber };
40884
40972
  case 1:
40885
40973
  isConfirmed = _state.sent();
40886
40974
  if (isConfirmed) {
40975
+ captureExitLog(Date.now());
40887
40976
  closeView();
40888
40977
  }
40889
40978
  return [
@@ -40893,9 +40982,10 @@ window.__bedrock.app = { name: Ait.appName, buildNumber: Ait.buildNumber };
40893
40982
  });
40894
40983
  }), [
40895
40984
  brandDisplayName,
40985
+ captureExitLog,
40896
40986
  openConfirm
40897
40987
  ]);
40898
- (0, import_react161.useEffect)(function() {
40988
+ (0, import_react162.useEffect)(function() {
40899
40989
  if (import_react_native145.Platform.OS === "ios") {
40900
40990
  setIosSwipeGestureEnabled({
40901
40991
  isEnabled: false
@@ -40908,7 +40998,7 @@ window.__bedrock.app = { name: Ait.appName, buildNumber: Ait.buildNumber };
40908
40998
  }
40909
40999
  return;
40910
41000
  }, []);
40911
- (0, import_react161.useEffect)(function() {
41001
+ (0, import_react162.useEffect)(function() {
40912
41002
  var backHandler = function() {
40913
41003
  handleClose();
40914
41004
  return true;
@@ -40920,7 +41010,7 @@ window.__bedrock.app = { name: Ait.appName, buildNumber: Ait.buildNumber };
40920
41010
  }, [
40921
41011
  handleClose
40922
41012
  ]);
40923
- (0, import_react161.useEffect)(function() {
41013
+ (0, import_react162.useEffect)(function() {
40924
41014
  appsInTossEvent.addEventListener("entryMessageExited", {
40925
41015
  onEvent: function() {
40926
41016
  setIsEntryMessageExited(true);
@@ -41098,13 +41188,13 @@ window.__bedrock.app = { name: Ait.appName, buildNumber: Ait.buildNumber };
41098
41188
  })
41099
41189
  });
41100
41190
  }
41101
- var import_jsx_runtime195, import_react166, import_react_native157, getInitialAccessoryButtons;
41191
+ var import_jsx_runtime195, import_react167, import_react_native157, getInitialAccessoryButtons;
41102
41192
  var init_pages = __esm({
41103
41193
  "react-native/pages/index.tsx"() {
41104
41194
  "use strict";
41105
41195
  import_jsx_runtime195 = __toESM(require_jsx_runtime(), 1);
41106
41196
  init_dist4();
41107
- import_react166 = __toESM(require_react(), 1);
41197
+ import_react167 = __toESM(require_react(), 1);
41108
41198
  import_react_native157 = __toESM(require_react_native(), 1);
41109
41199
  getInitialAccessoryButtons = function() {
41110
41200
  try {