@apps-in-toss/web-framework 2.4.1 → 2.4.3
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/prebuilt/dev.android.rn84.js +566 -599
- package/dist/prebuilt/dev.ios.rn84.js +566 -599
- package/dist/prebuilt/prod.android.rn72.js +228 -272
- package/dist/prebuilt/prod.android.rn84.js +228 -272
- package/dist/prebuilt/prod.ios.rn72.js +228 -272
- package/dist/prebuilt/prod.ios.rn84.js +228 -272
- package/package.json +8 -8
|
@@ -136576,140 +136576,72 @@ __d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, e
|
|
|
136576
136576
|
module.exports = __toCommonJS(src_exports);
|
|
136577
136577
|
var import_analytics2 = _$$_REQUIRE(_dependencyMap[4], "@apps-in-toss/analytics");
|
|
136578
136578
|
var import_analytics = _$$_REQUIRE(_dependencyMap[4], "@apps-in-toss/analytics");
|
|
136579
|
-
var
|
|
136580
|
-
var
|
|
136579
|
+
var import_native_modules10 = _$$_REQUIRE(_dependencyMap[5], "@apps-in-toss/native-modules");
|
|
136580
|
+
var import_react_native21 = _$$_REQUIRE(_dependencyMap[6], "@granite-js/react-native");
|
|
136581
136581
|
var import_tds_react_native10 = _$$_REQUIRE(_dependencyMap[7], "@toss/tds-react-native");
|
|
136582
|
-
var
|
|
136583
|
-
var
|
|
136584
|
-
var
|
|
136585
|
-
var import_react3 = _$$_REQUIRE(_dependencyMap[9], "react");
|
|
136582
|
+
var import_react_native22 = _$$_REQUIRE(_dependencyMap[8], "react-native");
|
|
136583
|
+
var import_react_native2 = _$$_REQUIRE(_dependencyMap[6], "@granite-js/react-native");
|
|
136584
|
+
var import_react = _$$_REQUIRE(_dependencyMap[9], "react");
|
|
136586
136585
|
var env = {
|
|
136587
136586
|
getDeploymentId: () => __DEV__ ? "local" : global.__appsInToss?.deploymentId,
|
|
136588
136587
|
getWebViewType: () => global.__appsInToss.webViewType,
|
|
136589
136588
|
getAppName: () => global.__granite.app.name
|
|
136590
136589
|
};
|
|
136591
|
-
var import_native_modules = _$$_REQUIRE(_dependencyMap[5], "@apps-in-toss/native-modules");
|
|
136592
|
-
var import_react_native3 = _$$_REQUIRE(_dependencyMap[6], "@granite-js/react-native");
|
|
136593
|
-
var import_react2 = _$$_REQUIRE(_dependencyMap[9], "react");
|
|
136594
136590
|
var import_react_native = _$$_REQUIRE(_dependencyMap[6], "@granite-js/react-native");
|
|
136595
|
-
var import_react = _$$_REQUIRE(_dependencyMap[9], "react");
|
|
136596
|
-
function useReferrer() {
|
|
136597
|
-
return (0, import_react.useMemo)(() => {
|
|
136598
|
-
try {
|
|
136599
|
-
return new URL((0, import_react_native.getSchemeUri)()).searchParams.get("referrer");
|
|
136600
|
-
} catch {
|
|
136601
|
-
return null;
|
|
136602
|
-
}
|
|
136603
|
-
}, []);
|
|
136604
|
-
}
|
|
136605
|
-
var import_react_native2 = _$$_REQUIRE(_dependencyMap[6], "@granite-js/react-native");
|
|
136606
136591
|
function isPrivateScheme() {
|
|
136607
136592
|
try {
|
|
136608
|
-
return new URL((0,
|
|
136593
|
+
return new URL((0, import_react_native.getSchemeUri)()).protocol === "intoss-private:";
|
|
136609
136594
|
} catch {
|
|
136610
136595
|
return false;
|
|
136611
136596
|
}
|
|
136612
136597
|
}
|
|
136613
|
-
var
|
|
136614
|
-
var
|
|
136615
|
-
function
|
|
136616
|
-
var
|
|
136617
|
-
|
|
136618
|
-
|
|
136619
|
-
(
|
|
136620
|
-
|
|
136621
|
-
|
|
136622
|
-
|
|
136623
|
-
|
|
136624
|
-
|
|
136625
|
-
if (enterTime.current == null) {
|
|
136626
|
-
return;
|
|
136627
|
-
}
|
|
136628
|
-
var stayTime = Math.floor(exitTime - enterTime.current);
|
|
136629
|
-
import_native_modules.INTERNAL__module.tossCoreEventLog({
|
|
136630
|
-
log_name: EXIT_IMPRESSION_LOG_NAME,
|
|
136631
|
-
log_type: "event",
|
|
136632
|
-
params: {
|
|
136633
|
-
schema_id: EXIT_IMPRESSION_SCHEMA_ID,
|
|
136634
|
-
event_type: "impression",
|
|
136635
|
-
referrer,
|
|
136636
|
-
deployment_id: env.getDeploymentId(),
|
|
136637
|
-
app_name: import_react_native3.Granite.appName,
|
|
136638
|
-
is_private: isPrivateScheme(),
|
|
136639
|
-
stay_time: stayTime.toString(),
|
|
136640
|
-
exit_time: exitTime.toString()
|
|
136641
|
-
}
|
|
136642
|
-
});
|
|
136643
|
-
enterTime.current = void 0;
|
|
136644
|
-
}, [referrer]);
|
|
136645
|
-
return {
|
|
136646
|
-
captureExitLog
|
|
136647
|
-
};
|
|
136648
|
-
}
|
|
136649
|
-
var ENTRY_APP_EVENT_SCHEMA_ID = 1562181;
|
|
136650
|
-
function EntryAppEvent() {
|
|
136651
|
-
var referrer = useReferrer() ?? "";
|
|
136652
|
-
(0, import_react3.useEffect)(() => {
|
|
136653
|
-
import_native_modules2.INTERNAL__module.tossCoreEventLog({
|
|
136654
|
-
log_name: "appsintoss_app_visit::impression__enter_appsintoss",
|
|
136655
|
-
log_type: "info",
|
|
136656
|
-
params: {
|
|
136657
|
-
is_transform: true,
|
|
136658
|
-
schema_id: ENTRY_APP_EVENT_SCHEMA_ID,
|
|
136659
|
-
referrer,
|
|
136660
|
-
deployment_id: env.getDeploymentId(),
|
|
136661
|
-
app_name: import_react_native4.Granite.appName,
|
|
136662
|
-
is_private: isPrivateScheme()
|
|
136663
|
-
}
|
|
136664
|
-
});
|
|
136665
|
-
}, [referrer]);
|
|
136666
|
-
return null;
|
|
136598
|
+
var import_native_modules = _$$_REQUIRE(_dependencyMap[5], "@apps-in-toss/native-modules");
|
|
136599
|
+
var DEFAULT_PIPELINES = ["core", "partner"];
|
|
136600
|
+
function sendLog(logData, options) {
|
|
136601
|
+
var _ref = options ?? {},
|
|
136602
|
+
_ref$pipelines = _ref.pipelines,
|
|
136603
|
+
pipelines = _ref$pipelines === void 0 ? DEFAULT_PIPELINES : _ref$pipelines;
|
|
136604
|
+
if (pipelines.includes("core")) {
|
|
136605
|
+
import_native_modules.INTERNAL__module.tossCoreEventLog(logData);
|
|
136606
|
+
}
|
|
136607
|
+
if (pipelines.includes("partner")) {
|
|
136608
|
+
(0, import_native_modules.eventLog)(logData);
|
|
136609
|
+
}
|
|
136667
136610
|
}
|
|
136668
136611
|
function SystemAppEvent({
|
|
136669
136612
|
...initialProps
|
|
136670
136613
|
}) {
|
|
136671
|
-
(0,
|
|
136672
|
-
|
|
136614
|
+
(0, import_react.useEffect)(() => {
|
|
136615
|
+
sendLog({
|
|
136673
136616
|
log_name: "AppsInTossInitialProps",
|
|
136674
136617
|
log_type: "debug",
|
|
136675
136618
|
params: {
|
|
136676
136619
|
...initialProps,
|
|
136677
|
-
schemeUri: (0,
|
|
136620
|
+
schemeUri: (0, import_react_native2.getSchemeUri)(),
|
|
136678
136621
|
deployment_id: env.getDeploymentId(),
|
|
136679
|
-
app_name:
|
|
136622
|
+
app_name: import_react_native2.Granite.appName,
|
|
136680
136623
|
is_private: isPrivateScheme()
|
|
136681
136624
|
}
|
|
136625
|
+
}, {
|
|
136626
|
+
pipelines: ["core"]
|
|
136682
136627
|
});
|
|
136683
136628
|
}, [initialProps]);
|
|
136684
136629
|
return null;
|
|
136685
136630
|
}
|
|
136686
|
-
function StayTimeAppEvent() {
|
|
136687
|
-
var visible = (0, import_react_native4.useVisibility)();
|
|
136688
|
-
var _useCaptureExitLog = useCaptureExitLog(),
|
|
136689
|
-
captureExitLog = _useCaptureExitLog.captureExitLog;
|
|
136690
|
-
(0, import_react3.useEffect)(() => {
|
|
136691
|
-
if (visible === false) {
|
|
136692
|
-
captureExitLog(Date.now());
|
|
136693
|
-
}
|
|
136694
|
-
}, [visible, captureExitLog]);
|
|
136695
|
-
return null;
|
|
136696
|
-
}
|
|
136697
136631
|
var AppEvent = {
|
|
136698
|
-
|
|
136699
|
-
System: SystemAppEvent,
|
|
136700
|
-
StayTime: StayTimeAppEvent
|
|
136632
|
+
System: SystemAppEvent
|
|
136701
136633
|
};
|
|
136702
|
-
var
|
|
136703
|
-
var
|
|
136634
|
+
var import_react_native3 = _$$_REQUIRE(_dependencyMap[6], "@granite-js/react-native");
|
|
136635
|
+
var import_react2 = _$$_REQUIRE(_dependencyMap[9], "react");
|
|
136704
136636
|
var import_jsx_runtime = _$$_REQUIRE(_dependencyMap[10], "react/jsx-runtime");
|
|
136705
136637
|
var UPDATE_SCHEME = "servicetoss://update/forced/j?updateType=required";
|
|
136706
136638
|
function AppUpdate() {
|
|
136707
|
-
(0,
|
|
136708
|
-
(0,
|
|
136639
|
+
(0, import_react2.useEffect)(() => {
|
|
136640
|
+
(0, import_react_native3.openURL)(`supertoss://closePage?url=${UPDATE_SCHEME}`);
|
|
136709
136641
|
}, []);
|
|
136710
136642
|
return (0, import_jsx_runtime.jsx)(import_jsx_runtime.Fragment, {});
|
|
136711
136643
|
}
|
|
136712
|
-
var
|
|
136644
|
+
var import_react3 = _$$_REQUIRE(_dependencyMap[9], "react");
|
|
136713
136645
|
function getAppsInTossGlobals() {
|
|
136714
136646
|
if (global.__appsInToss == null) {
|
|
136715
136647
|
throw new Error("invalid apps-in-toss globals");
|
|
@@ -136727,16 +136659,16 @@ __d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, e
|
|
|
136727
136659
|
}
|
|
136728
136660
|
}
|
|
136729
136661
|
var import_jsx_runtime2 = _$$_REQUIRE(_dependencyMap[10], "react/jsx-runtime");
|
|
136730
|
-
var NavigationBarContext = (0,
|
|
136662
|
+
var NavigationBarContext = (0, import_react3.createContext)(null);
|
|
136731
136663
|
function NavigationBarContextProvider({
|
|
136732
136664
|
children
|
|
136733
136665
|
}) {
|
|
136734
136666
|
var globals = getAppsInTossGlobals();
|
|
136735
136667
|
var parsedNavigationBar = globals.navigationBar != null ? safeParseNavigationBar(globals.navigationBar) : null;
|
|
136736
|
-
var
|
|
136737
|
-
|
|
136738
|
-
navigationRightButton =
|
|
136739
|
-
setNavigationRightButton =
|
|
136668
|
+
var _ref2 = (0, import_react3.useState)(parsedNavigationBar?.initialAccessoryButton),
|
|
136669
|
+
_ref3 = _slicedToArray(_ref2, 2),
|
|
136670
|
+
navigationRightButton = _ref3[0],
|
|
136671
|
+
setNavigationRightButton = _ref3[1];
|
|
136740
136672
|
var addNavigationRightButton = button => {
|
|
136741
136673
|
setNavigationRightButton(button);
|
|
136742
136674
|
};
|
|
@@ -136753,42 +136685,52 @@ __d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, e
|
|
|
136753
136685
|
});
|
|
136754
136686
|
}
|
|
136755
136687
|
function useNavigationBarContext() {
|
|
136756
|
-
var context = (0,
|
|
136688
|
+
var context = (0, import_react3.useContext)(NavigationBarContext);
|
|
136757
136689
|
if (context == null) {
|
|
136758
136690
|
throw Error("useNavigationBarContext must be used within NavigationBarContextProvider");
|
|
136759
136691
|
}
|
|
136760
136692
|
return context;
|
|
136761
136693
|
}
|
|
136762
|
-
var
|
|
136763
|
-
var
|
|
136764
|
-
var
|
|
136765
|
-
var
|
|
136766
|
-
var
|
|
136694
|
+
var import_native_modules9 = _$$_REQUIRE(_dependencyMap[5], "@apps-in-toss/native-modules");
|
|
136695
|
+
var import_react16 = _$$_REQUIRE(_dependencyMap[9], "react");
|
|
136696
|
+
var import_react_native20 = _$$_REQUIRE(_dependencyMap[8], "react-native");
|
|
136697
|
+
var import_native_modules4 = _$$_REQUIRE(_dependencyMap[5], "@apps-in-toss/native-modules");
|
|
136698
|
+
var import_react_native9 = _$$_REQUIRE(_dependencyMap[6], "@granite-js/react-native");
|
|
136767
136699
|
var import_tds_react_native4 = _$$_REQUIRE(_dependencyMap[7], "@toss/tds-react-native");
|
|
136768
136700
|
var import_es_hangul = _$$_REQUIRE(_dependencyMap[11], "es-hangul");
|
|
136769
|
-
var
|
|
136770
|
-
var
|
|
136701
|
+
var import_react10 = _$$_REQUIRE(_dependencyMap[9], "react");
|
|
136702
|
+
var import_react_native10 = _$$_REQUIRE(_dependencyMap[8], "react-native");
|
|
136771
136703
|
var GAME_PROFILE_WEBVIEW_URL = "servicetoss://game-center/profile";
|
|
136772
136704
|
var GAME_MIN_VERSION = {
|
|
136773
136705
|
android: "5.232.0",
|
|
136774
136706
|
ios: "5.232.0"
|
|
136775
136707
|
};
|
|
136776
|
-
var
|
|
136777
|
-
var import_react_native7 = _$$_REQUIRE(_dependencyMap[6], "@granite-js/react-native");
|
|
136708
|
+
var import_react_native6 = _$$_REQUIRE(_dependencyMap[6], "@granite-js/react-native");
|
|
136778
136709
|
var import_tds_react_native = _$$_REQUIRE(_dependencyMap[7], "@toss/tds-react-native");
|
|
136779
|
-
var
|
|
136780
|
-
var
|
|
136710
|
+
var import_react5 = _$$_REQUIRE(_dependencyMap[9], "react");
|
|
136711
|
+
var import_react_native4 = _$$_REQUIRE(_dependencyMap[6], "@granite-js/react-native");
|
|
136712
|
+
var import_react4 = _$$_REQUIRE(_dependencyMap[9], "react");
|
|
136713
|
+
function useReferrer() {
|
|
136714
|
+
return (0, import_react4.useMemo)(() => {
|
|
136715
|
+
try {
|
|
136716
|
+
return new URL((0, import_react_native4.getSchemeUri)()).searchParams.get("referrer");
|
|
136717
|
+
} catch {
|
|
136718
|
+
return null;
|
|
136719
|
+
}
|
|
136720
|
+
}, []);
|
|
136721
|
+
}
|
|
136722
|
+
var import_react_native5 = _$$_REQUIRE(_dependencyMap[8], "react-native");
|
|
136781
136723
|
var PLAYSTORE_LINK = "https://play.google.com/store/apps/details?id=viva.republica.toss";
|
|
136782
136724
|
var APPSTORE_LINK = "https://itunes.apple.com/app/id839333328";
|
|
136783
136725
|
var getMarketLink = () => {
|
|
136784
|
-
return
|
|
136726
|
+
return import_react_native5.Platform.OS === "android" ? PLAYSTORE_LINK : APPSTORE_LINK;
|
|
136785
136727
|
};
|
|
136786
136728
|
function useAppUpdateDialog() {
|
|
136787
|
-
var
|
|
136788
|
-
openConfirm =
|
|
136729
|
+
var _ref4 = (0, import_tds_react_native.useDialog)(),
|
|
136730
|
+
openConfirm = _ref4.openConfirm;
|
|
136789
136731
|
var logging = useAppUpdateDialogLogging();
|
|
136790
|
-
var openAppUpdateDialog = (0,
|
|
136791
|
-
var
|
|
136732
|
+
var openAppUpdateDialog = (0, import_react5.useCallback)(function () {
|
|
136733
|
+
var _ref5 = _asyncToGenerator(function* ({
|
|
136792
136734
|
title,
|
|
136793
136735
|
description,
|
|
136794
136736
|
leftButton = "\uB2EB\uAE30",
|
|
@@ -136810,10 +136752,10 @@ __d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, e
|
|
|
136810
136752
|
}
|
|
136811
136753
|
logging.update();
|
|
136812
136754
|
var STORE_SCHEME = getMarketLink();
|
|
136813
|
-
(0,
|
|
136755
|
+
(0, import_react_native6.openURL)(`supertoss://web?url=${STORE_SCHEME}&external=browser`);
|
|
136814
136756
|
});
|
|
136815
136757
|
return function (_x) {
|
|
136816
|
-
return
|
|
136758
|
+
return _ref5.apply(this, arguments);
|
|
136817
136759
|
};
|
|
136818
136760
|
}(), [logging, openConfirm]);
|
|
136819
136761
|
return {
|
|
@@ -136828,10 +136770,10 @@ __d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, e
|
|
|
136828
136770
|
var referrer = useReferrer();
|
|
136829
136771
|
var baseParams = {
|
|
136830
136772
|
referrer,
|
|
136831
|
-
app_name:
|
|
136773
|
+
app_name: import_react_native6.Granite.appName
|
|
136832
136774
|
};
|
|
136833
136775
|
var logUpdateClick = () => {
|
|
136834
|
-
|
|
136776
|
+
sendLog({
|
|
136835
136777
|
log_name: UPDATE_DIALOG_CTA_CLICK_LOG_NAME,
|
|
136836
136778
|
log_type: "event",
|
|
136837
136779
|
params: {
|
|
@@ -136843,7 +136785,7 @@ __d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, e
|
|
|
136843
136785
|
});
|
|
136844
136786
|
};
|
|
136845
136787
|
var logCloseClick = () => {
|
|
136846
|
-
|
|
136788
|
+
sendLog({
|
|
136847
136789
|
log_name: UPDATE_DIALOG_CTA_CLICK_LOG_NAME,
|
|
136848
136790
|
log_type: "event",
|
|
136849
136791
|
params: {
|
|
@@ -136855,7 +136797,7 @@ __d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, e
|
|
|
136855
136797
|
});
|
|
136856
136798
|
};
|
|
136857
136799
|
var logDialogShow = () => {
|
|
136858
|
-
|
|
136800
|
+
sendLog({
|
|
136859
136801
|
log_name: UPDATE_DIALOG_LOG_NAME,
|
|
136860
136802
|
log_type: "popup",
|
|
136861
136803
|
params: {
|
|
@@ -136870,33 +136812,33 @@ __d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, e
|
|
|
136870
136812
|
show: logDialogShow
|
|
136871
136813
|
};
|
|
136872
136814
|
}
|
|
136873
|
-
var
|
|
136874
|
-
var
|
|
136875
|
-
var
|
|
136815
|
+
var import_native_modules3 = _$$_REQUIRE(_dependencyMap[5], "@apps-in-toss/native-modules");
|
|
136816
|
+
var import_react9 = _$$_REQUIRE(_dependencyMap[9], "react");
|
|
136817
|
+
var import_react_native7 = _$$_REQUIRE(_dependencyMap[6], "@granite-js/react-native");
|
|
136876
136818
|
var import_tds_react_native2 = _$$_REQUIRE(_dependencyMap[7], "@toss/tds-react-native");
|
|
136877
|
-
var
|
|
136819
|
+
var import_react6 = _$$_REQUIRE(_dependencyMap[9], "react");
|
|
136878
136820
|
var DEFAULT_ERROR = {
|
|
136879
136821
|
title: "\uC7A0\uC2DC \uD6C4 \uB2E4\uC2DC \uC2DC\uB3C4\uD574\uC8FC\uC138\uC694",
|
|
136880
136822
|
description: "\uBB38\uC81C\uAC00 \uACC4\uC18D\uB418\uBA74 \uD1A0\uC2A4 \uACE0\uAC1D\uC13C\uD130(1599-4905)\uB85C \uBB38\uC758\uD574\uC8FC\uC138\uC694."
|
|
136881
136823
|
};
|
|
136882
136824
|
var useErrorAlert = () => {
|
|
136883
|
-
var
|
|
136884
|
-
openAlert =
|
|
136885
|
-
var openErrorAlert = (0,
|
|
136825
|
+
var _ref6 = (0, import_tds_react_native2.useDialog)(),
|
|
136826
|
+
openAlert = _ref6.openAlert;
|
|
136827
|
+
var openErrorAlert = (0, import_react6.useCallback)(_asyncToGenerator(function* () {
|
|
136886
136828
|
yield openAlert({
|
|
136887
136829
|
title: DEFAULT_ERROR.title,
|
|
136888
136830
|
description: DEFAULT_ERROR.description
|
|
136889
136831
|
});
|
|
136890
|
-
(0,
|
|
136832
|
+
(0, import_react_native7.closeView)();
|
|
136891
136833
|
}), [openAlert]);
|
|
136892
136834
|
return {
|
|
136893
136835
|
open: openErrorAlert
|
|
136894
136836
|
};
|
|
136895
136837
|
};
|
|
136896
|
-
var
|
|
136897
|
-
var
|
|
136898
|
-
var
|
|
136899
|
-
var INTERNAL__onVisibilityChangedByTransparentServiceWeb =
|
|
136838
|
+
var import_react7 = _$$_REQUIRE(_dependencyMap[9], "react");
|
|
136839
|
+
var import_react_native8 = _$$_REQUIRE(_dependencyMap[6], "@granite-js/react-native");
|
|
136840
|
+
var import_native_modules2 = _$$_REQUIRE(_dependencyMap[5], "@apps-in-toss/native-modules");
|
|
136841
|
+
var INTERNAL__onVisibilityChangedByTransparentServiceWeb = import_native_modules2.onVisibilityChangedByTransparentServiceWeb;
|
|
136900
136842
|
var openTransparentWebView = ({
|
|
136901
136843
|
webUrl,
|
|
136902
136844
|
cleanupWhenDismissed = true,
|
|
@@ -136926,16 +136868,16 @@ __d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, e
|
|
|
136926
136868
|
}
|
|
136927
136869
|
}
|
|
136928
136870
|
});
|
|
136929
|
-
(0,
|
|
136871
|
+
(0, import_react_native8.openURL)(url.toString());
|
|
136930
136872
|
};
|
|
136931
136873
|
var useTransparentWebview = () => {
|
|
136932
|
-
var
|
|
136933
|
-
|
|
136934
|
-
isWebviewLoading =
|
|
136935
|
-
setIsWebviewLoading =
|
|
136874
|
+
var _ref8 = (0, import_react7.useState)(false),
|
|
136875
|
+
_ref9 = _slicedToArray(_ref8, 2),
|
|
136876
|
+
isWebviewLoading = _ref9[0],
|
|
136877
|
+
setIsWebviewLoading = _ref9[1];
|
|
136936
136878
|
var _useErrorAlert = useErrorAlert(),
|
|
136937
136879
|
openErrorAlert = _useErrorAlert.open;
|
|
136938
|
-
var _openTransparentWebview = (0,
|
|
136880
|
+
var _openTransparentWebview = (0, import_react7.useCallback)(({
|
|
136939
136881
|
webUrl,
|
|
136940
136882
|
onClose,
|
|
136941
136883
|
onError
|
|
@@ -136947,14 +136889,14 @@ __d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, e
|
|
|
136947
136889
|
openTransparentWebView({
|
|
136948
136890
|
webUrl,
|
|
136949
136891
|
onEvent: function () {
|
|
136950
|
-
var
|
|
136892
|
+
var _ref0 = _asyncToGenerator(function* (isClosedTransparentWebView) {
|
|
136951
136893
|
if (isClosedTransparentWebView) {
|
|
136952
136894
|
setIsWebviewLoading(false);
|
|
136953
136895
|
onClose?.();
|
|
136954
136896
|
}
|
|
136955
136897
|
});
|
|
136956
136898
|
return function onEvent(_x2) {
|
|
136957
|
-
return
|
|
136899
|
+
return _ref0.apply(this, arguments);
|
|
136958
136900
|
};
|
|
136959
136901
|
}(),
|
|
136960
136902
|
onError: error => {
|
|
@@ -136973,11 +136915,11 @@ __d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, e
|
|
|
136973
136915
|
};
|
|
136974
136916
|
var import_tds_react_native3 = _$$_REQUIRE(_dependencyMap[7], "@toss/tds-react-native");
|
|
136975
136917
|
var import_private2 = _$$_REQUIRE(_dependencyMap[12], "@toss/tds-react-native/private");
|
|
136976
|
-
var
|
|
136918
|
+
var import_react8 = _$$_REQUIRE(_dependencyMap[9], "react");
|
|
136977
136919
|
var import_jsx_runtime3 = _$$_REQUIRE(_dependencyMap[10], "react/jsx-runtime");
|
|
136978
136920
|
var useGameProfileToast = () => {
|
|
136979
136921
|
var overlay = (0, import_private2.useOverlay)();
|
|
136980
|
-
var openGameProfileToast = (0,
|
|
136922
|
+
var openGameProfileToast = (0, import_react8.useCallback)((nickname, profileImageUri) => {
|
|
136981
136923
|
return new Promise(resolve => {
|
|
136982
136924
|
overlay.open(({
|
|
136983
136925
|
isOpen,
|
|
@@ -137017,18 +136959,18 @@ __d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, e
|
|
|
137017
136959
|
};
|
|
137018
136960
|
};
|
|
137019
136961
|
var useGameCenterProfile = () => {
|
|
137020
|
-
var
|
|
137021
|
-
|
|
137022
|
-
profileData =
|
|
137023
|
-
setProfileData =
|
|
137024
|
-
var
|
|
137025
|
-
|
|
137026
|
-
isProfileDataLoading =
|
|
137027
|
-
setIsProfileDataLoading =
|
|
137028
|
-
var
|
|
137029
|
-
|
|
137030
|
-
isProfileDataRefetching =
|
|
137031
|
-
setIsProfileDataRefetching =
|
|
136962
|
+
var _ref1 = (0, import_react9.useState)(void 0),
|
|
136963
|
+
_ref10 = _slicedToArray(_ref1, 2),
|
|
136964
|
+
profileData = _ref10[0],
|
|
136965
|
+
setProfileData = _ref10[1];
|
|
136966
|
+
var _ref11 = (0, import_react9.useState)(true),
|
|
136967
|
+
_ref12 = _slicedToArray(_ref11, 2),
|
|
136968
|
+
isProfileDataLoading = _ref12[0],
|
|
136969
|
+
setIsProfileDataLoading = _ref12[1];
|
|
136970
|
+
var _ref13 = (0, import_react9.useState)(false),
|
|
136971
|
+
_ref14 = _slicedToArray(_ref13, 2),
|
|
136972
|
+
isProfileDataRefetching = _ref14[0],
|
|
136973
|
+
setIsProfileDataRefetching = _ref14[1];
|
|
137032
136974
|
var shouldShowProfileLoadingOverlay = isProfileDataLoading || isProfileDataRefetching;
|
|
137033
136975
|
var shouldShowProfileNotFoundOverlay = profileData?.statusCode === "PROFILE_NOT_FOUND" && !isProfileDataRefetching;
|
|
137034
136976
|
var canShowBottomSheetOrToast = !isProfileDataLoading;
|
|
@@ -137038,9 +136980,9 @@ __d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, e
|
|
|
137038
136980
|
openErrorAlert = _useErrorAlert2.open;
|
|
137039
136981
|
var _useTransparentWebvie = useTransparentWebview(),
|
|
137040
136982
|
openTransparentWebView2 = _useTransparentWebvie.open;
|
|
137041
|
-
var fetchProfileData = (0,
|
|
136983
|
+
var fetchProfileData = (0, import_react9.useCallback)(_asyncToGenerator(function* () {
|
|
137042
136984
|
try {
|
|
137043
|
-
var data = yield (0,
|
|
136985
|
+
var data = yield (0, import_native_modules3.getGameCenterGameProfile)();
|
|
137044
136986
|
setProfileData(data);
|
|
137045
136987
|
setIsProfileDataLoading(false);
|
|
137046
136988
|
} catch (_) {
|
|
@@ -137048,10 +136990,10 @@ __d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, e
|
|
|
137048
136990
|
setIsProfileDataLoading(false);
|
|
137049
136991
|
}
|
|
137050
136992
|
}), [openErrorAlert]);
|
|
137051
|
-
var refetchProfileData = (0,
|
|
136993
|
+
var refetchProfileData = (0, import_react9.useCallback)(_asyncToGenerator(function* () {
|
|
137052
136994
|
try {
|
|
137053
136995
|
setIsProfileDataRefetching(true);
|
|
137054
|
-
var data = yield (0,
|
|
136996
|
+
var data = yield (0, import_native_modules3.getGameCenterGameProfile)();
|
|
137055
136997
|
setProfileData(data);
|
|
137056
136998
|
setIsProfileDataRefetching(false);
|
|
137057
136999
|
if (data?.statusCode === "SUCCESS") {
|
|
@@ -137062,15 +137004,15 @@ __d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, e
|
|
|
137062
137004
|
openErrorAlert();
|
|
137063
137005
|
}
|
|
137064
137006
|
}), [openErrorAlert, openGameProfileToast]);
|
|
137065
|
-
var openProfileWebview = (0,
|
|
137007
|
+
var openProfileWebview = (0, import_react9.useCallback)(() => {
|
|
137066
137008
|
openTransparentWebView2({
|
|
137067
137009
|
webUrl: `${GAME_PROFILE_WEBVIEW_URL}?appName=${getAppName()}&referrer=appsintoss.${getAppName()}`,
|
|
137068
137010
|
onClose: function () {
|
|
137069
|
-
var
|
|
137011
|
+
var _ref17 = _asyncToGenerator(function* () {
|
|
137070
137012
|
refetchProfileData();
|
|
137071
137013
|
});
|
|
137072
137014
|
return function onClose() {
|
|
137073
|
-
return
|
|
137015
|
+
return _ref17.apply(this, arguments);
|
|
137074
137016
|
};
|
|
137075
137017
|
}()
|
|
137076
137018
|
});
|
|
@@ -137105,15 +137047,15 @@ __d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, e
|
|
|
137105
137047
|
openProfileWebview = _useGameCenterProfile.openProfileWebview,
|
|
137106
137048
|
openGameProfileToast = _useGameCenterProfile.openGameProfileToast,
|
|
137107
137049
|
fetchProfileData = _useGameCenterProfile.fetchProfileData;
|
|
137108
|
-
var isCompletedFlow = (0,
|
|
137050
|
+
var isCompletedFlow = (0, import_react10.useRef)(false);
|
|
137109
137051
|
var _useAppUpdateDialog = useAppUpdateDialog(),
|
|
137110
137052
|
openAppUpdateDialog = _useAppUpdateDialog.open;
|
|
137111
|
-
(0,
|
|
137053
|
+
(0, import_react10.useEffect)(() => {
|
|
137112
137054
|
fetchProfileData();
|
|
137113
137055
|
}, []);
|
|
137114
|
-
(0,
|
|
137056
|
+
(0, import_react10.useEffect)(() => {
|
|
137115
137057
|
var handleGameProfileFlow = function () {
|
|
137116
|
-
var
|
|
137058
|
+
var _ref18 = _asyncToGenerator(function* () {
|
|
137117
137059
|
if (!canShowBottomSheetOrToast) {
|
|
137118
137060
|
return;
|
|
137119
137061
|
}
|
|
@@ -137121,12 +137063,12 @@ __d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, e
|
|
|
137121
137063
|
return;
|
|
137122
137064
|
}
|
|
137123
137065
|
isCompletedFlow.current = true;
|
|
137124
|
-
if (!(0,
|
|
137066
|
+
if (!(0, import_native_modules4.isMinVersionSupported)(GAME_MIN_VERSION)) {
|
|
137125
137067
|
openAppUpdateDialog({
|
|
137126
137068
|
title: `${(0, import_es_hangul.josa)(getAppsInTossGlobals().brandDisplayName, "\uC744/\uB97C")} \uD558\uB824\uBA74
|
|
137127
137069
|
\uC571\uC744 \uC5C5\uB370\uC774\uD2B8\uD574\uC8FC\uC138\uC694`,
|
|
137128
137070
|
onDismiss: () => {
|
|
137129
|
-
(0,
|
|
137071
|
+
(0, import_react_native9.closeView)();
|
|
137130
137072
|
}
|
|
137131
137073
|
});
|
|
137132
137074
|
return;
|
|
@@ -137140,20 +137082,20 @@ __d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, e
|
|
|
137140
137082
|
}
|
|
137141
137083
|
});
|
|
137142
137084
|
return function handleGameProfileFlow() {
|
|
137143
|
-
return
|
|
137085
|
+
return _ref18.apply(this, arguments);
|
|
137144
137086
|
};
|
|
137145
137087
|
}();
|
|
137146
137088
|
handleGameProfileFlow();
|
|
137147
137089
|
}, [canShowBottomSheetOrToast, isCompletedFlow, openAppUpdateDialog, openGameProfileToast, openProfileWebview, profileData]);
|
|
137148
|
-
if (!(0,
|
|
137090
|
+
if (!(0, import_native_modules4.isMinVersionSupported)(GAME_MIN_VERSION)) {
|
|
137149
137091
|
return (0, import_jsx_runtime4.jsxs)(import_jsx_runtime4.Fragment, {
|
|
137150
|
-
children: [(0, import_jsx_runtime4.jsx)(
|
|
137092
|
+
children: [(0, import_jsx_runtime4.jsx)(import_react_native10.View, {
|
|
137151
137093
|
style: {
|
|
137152
137094
|
flex: 1,
|
|
137153
137095
|
position: "relative"
|
|
137154
137096
|
},
|
|
137155
137097
|
children
|
|
137156
|
-
}), (0, import_jsx_runtime4.jsx)(
|
|
137098
|
+
}), (0, import_jsx_runtime4.jsx)(import_react_native10.Pressable, {
|
|
137157
137099
|
style: {
|
|
137158
137100
|
...overlayStyle
|
|
137159
137101
|
},
|
|
@@ -137162,7 +137104,7 @@ __d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, e
|
|
|
137162
137104
|
title: `${(0, import_es_hangul.josa)(getAppsInTossGlobals().brandDisplayName, "\uC744/\uB97C")} \uD558\uB824\uBA74
|
|
137163
137105
|
\uC571\uC744 \uC5C5\uB370\uC774\uD2B8\uD574\uC8FC\uC138\uC694`,
|
|
137164
137106
|
onDismiss: () => {
|
|
137165
|
-
(0,
|
|
137107
|
+
(0, import_react_native9.closeView)();
|
|
137166
137108
|
}
|
|
137167
137109
|
});
|
|
137168
137110
|
}
|
|
@@ -137171,13 +137113,13 @@ __d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, e
|
|
|
137171
137113
|
}
|
|
137172
137114
|
if (shouldShowProfileLoadingOverlay) {
|
|
137173
137115
|
return (0, import_jsx_runtime4.jsxs)(import_jsx_runtime4.Fragment, {
|
|
137174
|
-
children: [(0, import_jsx_runtime4.jsx)(
|
|
137116
|
+
children: [(0, import_jsx_runtime4.jsx)(import_react_native10.View, {
|
|
137175
137117
|
style: {
|
|
137176
137118
|
flex: 1,
|
|
137177
137119
|
position: "relative"
|
|
137178
137120
|
},
|
|
137179
137121
|
children
|
|
137180
|
-
}), (0, import_jsx_runtime4.jsx)(
|
|
137122
|
+
}), (0, import_jsx_runtime4.jsx)(import_react_native10.View, {
|
|
137181
137123
|
style: {
|
|
137182
137124
|
...overlayStyle,
|
|
137183
137125
|
justifyContent: "center",
|
|
@@ -137193,13 +137135,13 @@ __d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, e
|
|
|
137193
137135
|
}
|
|
137194
137136
|
if (shouldShowProfileNotFoundOverlay) {
|
|
137195
137137
|
return (0, import_jsx_runtime4.jsxs)(import_jsx_runtime4.Fragment, {
|
|
137196
|
-
children: [(0, import_jsx_runtime4.jsx)(
|
|
137138
|
+
children: [(0, import_jsx_runtime4.jsx)(import_react_native10.View, {
|
|
137197
137139
|
style: {
|
|
137198
137140
|
flex: 1,
|
|
137199
137141
|
position: "relative"
|
|
137200
137142
|
},
|
|
137201
137143
|
children
|
|
137202
|
-
}), shouldShowProfileNotFoundOverlay && (0, import_jsx_runtime4.jsx)(
|
|
137144
|
+
}), shouldShowProfileNotFoundOverlay && (0, import_jsx_runtime4.jsx)(import_react_native10.Pressable, {
|
|
137203
137145
|
style: {
|
|
137204
137146
|
...overlayStyle
|
|
137205
137147
|
},
|
|
@@ -137210,7 +137152,7 @@ __d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, e
|
|
|
137210
137152
|
});
|
|
137211
137153
|
}
|
|
137212
137154
|
return (0, import_jsx_runtime4.jsx)(import_jsx_runtime4.Fragment, {
|
|
137213
|
-
children: (0, import_jsx_runtime4.jsx)(
|
|
137155
|
+
children: (0, import_jsx_runtime4.jsx)(import_react_native10.View, {
|
|
137214
137156
|
style: {
|
|
137215
137157
|
flex: 1,
|
|
137216
137158
|
position: "relative"
|
|
@@ -137228,30 +137170,30 @@ __d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, e
|
|
|
137228
137170
|
zIndex: Z_INDEX.PROFILE_OVERLAY
|
|
137229
137171
|
};
|
|
137230
137172
|
var import_private5 = _$$_REQUIRE(_dependencyMap[12], "@toss/tds-react-native/private");
|
|
137231
|
-
var
|
|
137232
|
-
var
|
|
137173
|
+
var import_react11 = _$$_REQUIRE(_dependencyMap[9], "react");
|
|
137174
|
+
var import_react_native11 = _$$_REQUIRE(_dependencyMap[8], "react-native");
|
|
137233
137175
|
function useHardwareBackPress(handler) {
|
|
137234
|
-
(0,
|
|
137176
|
+
(0, import_react11.useEffect)(() => {
|
|
137235
137177
|
var handleBackPress = () => {
|
|
137236
137178
|
handler();
|
|
137237
137179
|
return true;
|
|
137238
137180
|
};
|
|
137239
|
-
var backHandler =
|
|
137181
|
+
var backHandler = import_react_native11.BackHandler.addEventListener("hardwareBackPress", handleBackPress);
|
|
137240
137182
|
return () => backHandler.remove();
|
|
137241
137183
|
}, [handler]);
|
|
137242
137184
|
}
|
|
137243
|
-
var
|
|
137244
|
-
var
|
|
137185
|
+
var import_react_native13 = _$$_REQUIRE(_dependencyMap[6], "@granite-js/react-native");
|
|
137186
|
+
var import_react13 = _$$_REQUIRE(_dependencyMap[9], "react");
|
|
137245
137187
|
var import_tds_react_native5 = _$$_REQUIRE(_dependencyMap[7], "@toss/tds-react-native");
|
|
137246
137188
|
var import_es_hangul2 = _$$_REQUIRE(_dependencyMap[11], "es-hangul");
|
|
137247
|
-
var
|
|
137189
|
+
var import_react12 = _$$_REQUIRE(_dependencyMap[9], "react");
|
|
137248
137190
|
function useCloseConfirm() {
|
|
137249
137191
|
var _getAppsInTossGlobals = getAppsInTossGlobals(),
|
|
137250
137192
|
brandDisplayName = _getAppsInTossGlobals.brandDisplayName;
|
|
137251
|
-
var
|
|
137252
|
-
openConfirm =
|
|
137253
|
-
return (0,
|
|
137254
|
-
var
|
|
137193
|
+
var _ref19 = (0, import_tds_react_native5.useDialog)(),
|
|
137194
|
+
openConfirm = _ref19.openConfirm;
|
|
137195
|
+
return (0, import_react12.useCallback)(function () {
|
|
137196
|
+
var _ref20 = _asyncToGenerator(function* ({
|
|
137255
137197
|
onEntered
|
|
137256
137198
|
}) {
|
|
137257
137199
|
return yield openConfirm({
|
|
@@ -137263,7 +137205,7 @@ __d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, e
|
|
|
137263
137205
|
});
|
|
137264
137206
|
});
|
|
137265
137207
|
return function (_x3) {
|
|
137266
|
-
return
|
|
137208
|
+
return _ref20.apply(this, arguments);
|
|
137267
137209
|
};
|
|
137268
137210
|
}(), [brandDisplayName, openConfirm]);
|
|
137269
137211
|
}
|
|
@@ -137315,8 +137257,7 @@ __d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, e
|
|
|
137315
137257
|
}
|
|
137316
137258
|
var homeEvent = createEvent("homeEvent");
|
|
137317
137259
|
var safeAreaInsetsChange = createEvent("safeAreaInsetsChange");
|
|
137318
|
-
var
|
|
137319
|
-
var import_react_native13 = _$$_REQUIRE(_dependencyMap[6], "@granite-js/react-native");
|
|
137260
|
+
var import_react_native12 = _$$_REQUIRE(_dependencyMap[6], "@granite-js/react-native");
|
|
137320
137261
|
var NAVI_BAR_IMPRESSION_SCHEMA_ID = 1596837;
|
|
137321
137262
|
var NAVI_BAR_IMPRESSION_LOG_NAME = "appsintoss_app_visit__common_module::impression__navigation_bar";
|
|
137322
137263
|
var CLOSE_POPUP_SHOW_SCHEMA_ID = 1644490;
|
|
@@ -137331,10 +137272,10 @@ __d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, e
|
|
|
137331
137272
|
var referrer = useReferrer();
|
|
137332
137273
|
var baseParams = {
|
|
137333
137274
|
referrer,
|
|
137334
|
-
app_name:
|
|
137275
|
+
app_name: import_react_native12.Granite.appName
|
|
137335
137276
|
};
|
|
137336
137277
|
var logNavBarImpression = naviBarConfig => {
|
|
137337
|
-
|
|
137278
|
+
sendLog({
|
|
137338
137279
|
log_name: NAVI_BAR_IMPRESSION_LOG_NAME,
|
|
137339
137280
|
log_type: "event",
|
|
137340
137281
|
params: {
|
|
@@ -137346,7 +137287,7 @@ __d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, e
|
|
|
137346
137287
|
});
|
|
137347
137288
|
};
|
|
137348
137289
|
var logHomeButtonClick = () => {
|
|
137349
|
-
|
|
137290
|
+
sendLog({
|
|
137350
137291
|
log_name: HOME_BUTTON_CLICK_LOG_NAME,
|
|
137351
137292
|
log_type: "event",
|
|
137352
137293
|
params: {
|
|
@@ -137357,7 +137298,7 @@ __d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, e
|
|
|
137357
137298
|
});
|
|
137358
137299
|
};
|
|
137359
137300
|
var logCloseButtonClick = () => {
|
|
137360
|
-
|
|
137301
|
+
sendLog({
|
|
137361
137302
|
log_name: CLOSE_BUTTON_CLICK_LOG_NAME,
|
|
137362
137303
|
log_type: "event",
|
|
137363
137304
|
params: {
|
|
@@ -137368,7 +137309,7 @@ __d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, e
|
|
|
137368
137309
|
});
|
|
137369
137310
|
};
|
|
137370
137311
|
var logClosePopupShow = () => {
|
|
137371
|
-
|
|
137312
|
+
sendLog({
|
|
137372
137313
|
log_name: CLOSE_POPUP_SHOW_LOG_NAME,
|
|
137373
137314
|
log_type: "popup",
|
|
137374
137315
|
params: {
|
|
@@ -137378,7 +137319,7 @@ __d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, e
|
|
|
137378
137319
|
});
|
|
137379
137320
|
};
|
|
137380
137321
|
var logClosePopupCtaClick = confirm => {
|
|
137381
|
-
|
|
137322
|
+
sendLog({
|
|
137382
137323
|
log_name: CLOSE_POPUP_CTA_CLICK_LOG_NAME,
|
|
137383
137324
|
log_type: "event",
|
|
137384
137325
|
params: {
|
|
@@ -137398,26 +137339,23 @@ __d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, e
|
|
|
137398
137339
|
};
|
|
137399
137340
|
}
|
|
137400
137341
|
function useNavigationEvent() {
|
|
137401
|
-
var backEventContext = (0,
|
|
137342
|
+
var backEventContext = (0, import_react_native13.useBackEventContext)();
|
|
137402
137343
|
var logging = useNavigationBarLogging();
|
|
137403
|
-
var navigation = (0,
|
|
137344
|
+
var navigation = (0, import_react_native13.useNavigation)();
|
|
137404
137345
|
var closeConfirm = useCloseConfirm();
|
|
137405
|
-
|
|
137406
|
-
captureExitLog = _useCaptureExitLog2.captureExitLog;
|
|
137407
|
-
return (0, import_react14.useMemo)(() => {
|
|
137346
|
+
return (0, import_react13.useMemo)(() => {
|
|
137408
137347
|
var close = function () {
|
|
137409
|
-
var
|
|
137348
|
+
var _ref21 = _asyncToGenerator(function* () {
|
|
137410
137349
|
var hasConfirmed = yield closeConfirm({
|
|
137411
137350
|
onEntered: logging.closePopupShow
|
|
137412
137351
|
});
|
|
137413
137352
|
logging.closePopupCtaClick(hasConfirmed);
|
|
137414
137353
|
if (hasConfirmed) {
|
|
137415
|
-
|
|
137416
|
-
(0, import_react_native14.closeView)();
|
|
137354
|
+
(0, import_react_native13.closeView)();
|
|
137417
137355
|
}
|
|
137418
137356
|
});
|
|
137419
137357
|
return function close() {
|
|
137420
|
-
return
|
|
137358
|
+
return _ref21.apply(this, arguments);
|
|
137421
137359
|
};
|
|
137422
137360
|
}();
|
|
137423
137361
|
return {
|
|
@@ -137443,21 +137381,20 @@ __d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, e
|
|
|
137443
137381
|
close();
|
|
137444
137382
|
}
|
|
137445
137383
|
};
|
|
137446
|
-
}, [backEventContext, navigation, closeConfirm, logging
|
|
137384
|
+
}, [backEventContext, navigation, closeConfirm, logging]);
|
|
137447
137385
|
}
|
|
137448
|
-
var
|
|
137449
|
-
var
|
|
137386
|
+
var import_native_modules8 = _$$_REQUIRE(_dependencyMap[5], "@apps-in-toss/native-modules");
|
|
137387
|
+
var import_react_native18 = _$$_REQUIRE(_dependencyMap[6], "@granite-js/react-native");
|
|
137450
137388
|
var import_tds_react_native8 = _$$_REQUIRE(_dependencyMap[7], "@toss/tds-react-native");
|
|
137451
137389
|
var import_private4 = _$$_REQUIRE(_dependencyMap[12], "@toss/tds-react-native/private");
|
|
137452
|
-
var
|
|
137453
|
-
var
|
|
137454
|
-
var
|
|
137390
|
+
var import_react14 = _$$_REQUIRE(_dependencyMap[9], "react");
|
|
137391
|
+
var import_native_modules5 = _$$_REQUIRE(_dependencyMap[5], "@apps-in-toss/native-modules");
|
|
137392
|
+
var import_react_native16 = _$$_REQUIRE(_dependencyMap[6], "@granite-js/react-native");
|
|
137455
137393
|
var import_tds_react_native7 = _$$_REQUIRE(_dependencyMap[7], "@toss/tds-react-native");
|
|
137456
137394
|
var import_tds_react_native6 = _$$_REQUIRE(_dependencyMap[7], "@toss/tds-react-native");
|
|
137457
137395
|
var import_private3 = _$$_REQUIRE(_dependencyMap[12], "@toss/tds-react-native/private");
|
|
137458
|
-
var
|
|
137459
|
-
var
|
|
137460
|
-
var import_react_native15 = _$$_REQUIRE(_dependencyMap[6], "@granite-js/react-native");
|
|
137396
|
+
var import_react_native15 = _$$_REQUIRE(_dependencyMap[8], "react-native");
|
|
137397
|
+
var import_react_native14 = _$$_REQUIRE(_dependencyMap[6], "@granite-js/react-native");
|
|
137461
137398
|
var BOTTOM_SHEET_SCHEMA_ID = 1596825;
|
|
137462
137399
|
var BOTTOM_SHEET_LOG_NAME = "appsintoss_app_visit__common_module::bottomsheet__more";
|
|
137463
137400
|
var BOTTOM_SHEET_OPEN_SCHEMA_ID = 1596829;
|
|
@@ -137470,10 +137407,10 @@ __d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, e
|
|
|
137470
137407
|
var referrer = useReferrer();
|
|
137471
137408
|
var baseParams = {
|
|
137472
137409
|
referrer,
|
|
137473
|
-
app_name:
|
|
137410
|
+
app_name: import_react_native14.Granite.appName
|
|
137474
137411
|
};
|
|
137475
137412
|
var logBottomSheetShow = () => {
|
|
137476
|
-
|
|
137413
|
+
sendLog({
|
|
137477
137414
|
log_name: BOTTOM_SHEET_LOG_NAME,
|
|
137478
137415
|
log_type: "popup",
|
|
137479
137416
|
params: {
|
|
@@ -137483,7 +137420,7 @@ __d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, e
|
|
|
137483
137420
|
});
|
|
137484
137421
|
};
|
|
137485
137422
|
var logBottomSheetOpen = () => {
|
|
137486
|
-
|
|
137423
|
+
sendLog({
|
|
137487
137424
|
log_name: BOTTOM_SHEET_OPEN_LOG_NAME,
|
|
137488
137425
|
log_type: "event",
|
|
137489
137426
|
params: {
|
|
@@ -137494,7 +137431,7 @@ __d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, e
|
|
|
137494
137431
|
});
|
|
137495
137432
|
};
|
|
137496
137433
|
var logBottomSheetCloseClick = () => {
|
|
137497
|
-
|
|
137434
|
+
sendLog({
|
|
137498
137435
|
log_name: BOTTOM_SHEET_CLOSE_CLICK_LOG_NAME,
|
|
137499
137436
|
log_type: "event",
|
|
137500
137437
|
params: {
|
|
@@ -137507,7 +137444,7 @@ __d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, e
|
|
|
137507
137444
|
var logBottomSheetMenuClick = ({
|
|
137508
137445
|
title
|
|
137509
137446
|
}) => {
|
|
137510
|
-
|
|
137447
|
+
sendLog({
|
|
137511
137448
|
log_name: BOTTOM_SHEET_MENU_CLICK_LOG_NAME,
|
|
137512
137449
|
log_type: "event",
|
|
137513
137450
|
params: {
|
|
@@ -137538,7 +137475,7 @@ __d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, e
|
|
|
137538
137475
|
var brandPrimaryColorRGB = hexToRGB(globals.brandPrimaryColor);
|
|
137539
137476
|
var iconBackgroundColor = brandPrimaryColorRGB ? `rgba(${brandPrimaryColorRGB.join(",")},0.1)` : adaptive.grey100;
|
|
137540
137477
|
return (0, import_jsx_runtime5.jsx)(import_tds_react_native6.ListRow, {
|
|
137541
|
-
left: (0, import_jsx_runtime5.jsx)(
|
|
137478
|
+
left: (0, import_jsx_runtime5.jsx)(import_react_native15.View, {
|
|
137542
137479
|
style: {
|
|
137543
137480
|
width: 30,
|
|
137544
137481
|
height: 30,
|
|
@@ -137602,10 +137539,10 @@ __d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, e
|
|
|
137602
137539
|
}
|
|
137603
137540
|
function addParamsToUrl(url, params) {
|
|
137604
137541
|
var urlObj = new URL(url);
|
|
137605
|
-
for (var
|
|
137606
|
-
var
|
|
137607
|
-
var key =
|
|
137608
|
-
var value =
|
|
137542
|
+
for (var _ref22 of Object.entries(params)) {
|
|
137543
|
+
var _ref23 = _slicedToArray(_ref22, 2);
|
|
137544
|
+
var key = _ref23[0];
|
|
137545
|
+
var value = _ref23[1];
|
|
137609
137546
|
urlObj.searchParams.set(key, value);
|
|
137610
137547
|
}
|
|
137611
137548
|
return urlObj.toString();
|
|
@@ -137617,10 +137554,10 @@ __d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, e
|
|
|
137617
137554
|
contactIconUrl: "https://static.toss.im/icons/png/4x/icon-share-dots-mono.png"
|
|
137618
137555
|
};
|
|
137619
137556
|
function AppShareListMenu() {
|
|
137620
|
-
var initialScheme = (0,
|
|
137621
|
-
var isSandbox = (0,
|
|
137622
|
-
var
|
|
137623
|
-
openConfirm =
|
|
137557
|
+
var initialScheme = (0, import_react_native16.getSchemeUri)();
|
|
137558
|
+
var isSandbox = (0, import_native_modules5.getOperationalEnvironment)() === "sandbox";
|
|
137559
|
+
var _ref24 = (0, import_tds_react_native7.useDialog)(),
|
|
137560
|
+
openConfirm = _ref24.openConfirm;
|
|
137624
137561
|
var schemeForShare = addParamsToUrl(initialScheme, {
|
|
137625
137562
|
referrer: SHARE_SCHEME_REFERRER
|
|
137626
137563
|
});
|
|
@@ -137637,16 +137574,16 @@ __d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, e
|
|
|
137637
137574
|
});
|
|
137638
137575
|
return;
|
|
137639
137576
|
}
|
|
137640
|
-
(0,
|
|
137577
|
+
(0, import_native_modules5.shareWithScheme)({
|
|
137641
137578
|
schemeURL: schemeForShare
|
|
137642
137579
|
});
|
|
137643
137580
|
}
|
|
137644
137581
|
});
|
|
137645
137582
|
}
|
|
137646
|
-
var
|
|
137583
|
+
var import_native_modules6 = _$$_REQUIRE(_dependencyMap[5], "@apps-in-toss/native-modules");
|
|
137647
137584
|
var import_jsx_runtime7 = _$$_REQUIRE(_dependencyMap[10], "react/jsx-runtime");
|
|
137648
137585
|
function HomeShortcutMenu() {
|
|
137649
|
-
var isSandbox = (0,
|
|
137586
|
+
var isSandbox = (0, import_native_modules6.getOperationalEnvironment)() === "sandbox";
|
|
137650
137587
|
var globals = getAppsInTossGlobals();
|
|
137651
137588
|
if (isSandbox) {
|
|
137652
137589
|
return null;
|
|
@@ -137655,7 +137592,7 @@ __d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, e
|
|
|
137655
137592
|
title: "\uD648 \uD654\uBA74\uC5D0 \uCD94\uAC00",
|
|
137656
137593
|
iconURL: "https://static.toss.im/icons/png/4x/icon-plus-circle-mono.png",
|
|
137657
137594
|
onPress: () => {
|
|
137658
|
-
|
|
137595
|
+
import_native_modules6.INTERNAL__appBridgeHandler.invokeAppBridgeMethod("addMiniAppShortcut", {
|
|
137659
137596
|
title: globals.brandDisplayName,
|
|
137660
137597
|
appName: global.__granite.app.name,
|
|
137661
137598
|
iconUrl: globals.brandIcon,
|
|
@@ -137667,18 +137604,18 @@ __d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, e
|
|
|
137667
137604
|
}
|
|
137668
137605
|
});
|
|
137669
137606
|
}
|
|
137670
|
-
var
|
|
137671
|
-
var
|
|
137607
|
+
var import_native_modules7 = _$$_REQUIRE(_dependencyMap[5], "@apps-in-toss/native-modules");
|
|
137608
|
+
var import_react_native17 = _$$_REQUIRE(_dependencyMap[6], "@granite-js/react-native");
|
|
137672
137609
|
var import_jsx_runtime8 = _$$_REQUIRE(_dependencyMap[10], "react/jsx-runtime");
|
|
137673
137610
|
function SettingsMenu() {
|
|
137674
137611
|
var globals = getAppsInTossGlobals();
|
|
137675
|
-
if ((0,
|
|
137612
|
+
if ((0, import_native_modules7.getOperationalEnvironment)() === "sandbox") {
|
|
137676
137613
|
return null;
|
|
137677
137614
|
}
|
|
137678
137615
|
return (0, import_jsx_runtime8.jsx)(Menu, {
|
|
137679
137616
|
title: "\uC124\uC815",
|
|
137680
137617
|
iconURL: "https://static.toss.im/icons/png/4x/icon-setting-mono.png",
|
|
137681
|
-
onPress: () => (0,
|
|
137618
|
+
onPress: () => (0, import_react_native17.openURL)(`servicetoss://apps-in-toss-menu/settings?appName=${import_react_native17.Granite.appName}&displayAppName=${globals.brandDisplayName}`)
|
|
137682
137619
|
});
|
|
137683
137620
|
}
|
|
137684
137621
|
function ensureValue(value, name) {
|
|
@@ -137710,23 +137647,23 @@ __d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, e
|
|
|
137710
137647
|
function useMoreButtonBottomSheet() {
|
|
137711
137648
|
var globals = getAppsInTossGlobals();
|
|
137712
137649
|
var adaptive = (0, import_private4.useAdaptive)();
|
|
137713
|
-
var
|
|
137714
|
-
|
|
137715
|
-
itemList =
|
|
137716
|
-
setItemList =
|
|
137650
|
+
var _ref25 = (0, import_react14.useState)([]),
|
|
137651
|
+
_ref26 = _slicedToArray(_ref25, 2),
|
|
137652
|
+
itemList = _ref26[0],
|
|
137653
|
+
setItemList = _ref26[1];
|
|
137717
137654
|
var appUpdateDialog = useAppUpdateDialog();
|
|
137718
137655
|
var logging = useMoreButtonBottomSheetLogging();
|
|
137719
137656
|
var overlay = (0, import_private4.useOverlay)();
|
|
137720
137657
|
var title = ensureValue(globals.brandDisplayName, "displayName");
|
|
137721
|
-
var isHomeShortcutSupported = (0,
|
|
137722
|
-
var isBottomSheetSupported = (0,
|
|
137723
|
-
var isShareListMenuSupported = (0,
|
|
137724
|
-
var isSettingsMenuSupported = (0,
|
|
137725
|
-
(0,
|
|
137658
|
+
var isHomeShortcutSupported = (0, import_native_modules8.isMinVersionSupported)(MIN_VERSION.HOME_SHORTCUT_MENU);
|
|
137659
|
+
var isBottomSheetSupported = (0, import_native_modules8.isMinVersionSupported)(MIN_VERSION.BOTTOM_SHEET);
|
|
137660
|
+
var isShareListMenuSupported = (0, import_native_modules8.isMinVersionSupported)(MIN_VERSION.SHARE_LIST_MENU);
|
|
137661
|
+
var isSettingsMenuSupported = (0, import_native_modules8.isMinVersionSupported)(MIN_VERSION.SETTINGS_MENU);
|
|
137662
|
+
(0, import_react14.useEffect)(() => {
|
|
137726
137663
|
if (!isBottomSheetSupported) {
|
|
137727
137664
|
return;
|
|
137728
137665
|
}
|
|
137729
|
-
|
|
137666
|
+
import_native_modules8.INTERNAL__appBridgeHandler.invokeAppBridgeMethod(APP_BRIDGE_METHOD_NAME, {}, {
|
|
137730
137667
|
onSuccess: ({
|
|
137731
137668
|
items
|
|
137732
137669
|
}) => setItemList(items),
|
|
@@ -137734,7 +137671,7 @@ __d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, e
|
|
|
137734
137671
|
});
|
|
137735
137672
|
}, [isBottomSheetSupported]);
|
|
137736
137673
|
var onClickHandler = function () {
|
|
137737
|
-
var
|
|
137674
|
+
var _ref27 = _asyncToGenerator(function* () {
|
|
137738
137675
|
logging.open();
|
|
137739
137676
|
if (!isBottomSheetSupported) {
|
|
137740
137677
|
yield appUpdateDialog.open({
|
|
@@ -137779,7 +137716,7 @@ __d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, e
|
|
|
137779
137716
|
children: [itemList.map(item => (0, import_jsx_runtime9.jsx)(Menu, {
|
|
137780
137717
|
title: item.contactItemName,
|
|
137781
137718
|
iconURL: item.contactIconUrl,
|
|
137782
|
-
onPress: () => (0,
|
|
137719
|
+
onPress: () => (0, import_react_native18.openURL)(item.contactUri)
|
|
137783
137720
|
}, item.contactItemName)), isHomeShortcutSupported && (0, import_jsx_runtime9.jsx)(HomeShortcutMenu, {}), isShareListMenuSupported && (0, import_jsx_runtime9.jsx)(AppShareListMenu, {}), isSettingsMenuSupported && (0, import_jsx_runtime9.jsx)(SettingsMenu, {})]
|
|
137784
137721
|
})
|
|
137785
137722
|
})
|
|
@@ -137787,7 +137724,7 @@ __d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, e
|
|
|
137787
137724
|
});
|
|
137788
137725
|
});
|
|
137789
137726
|
return function onClickHandler() {
|
|
137790
|
-
return
|
|
137727
|
+
return _ref27.apply(this, arguments);
|
|
137791
137728
|
};
|
|
137792
137729
|
}();
|
|
137793
137730
|
return {
|
|
@@ -137798,7 +137735,7 @@ __d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, e
|
|
|
137798
137735
|
children
|
|
137799
137736
|
}) {
|
|
137800
137737
|
var logging = useMoreButtonBottomSheetLogging();
|
|
137801
|
-
(0,
|
|
137738
|
+
(0, import_react14.useEffect)(() => {
|
|
137802
137739
|
logging.show();
|
|
137803
137740
|
}, [logging]);
|
|
137804
137741
|
return (0, import_jsx_runtime9.jsx)(import_jsx_runtime9.Fragment, {
|
|
@@ -137814,15 +137751,15 @@ __d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, e
|
|
|
137814
137751
|
name: source
|
|
137815
137752
|
};
|
|
137816
137753
|
}
|
|
137817
|
-
var
|
|
137754
|
+
var import_react15 = _$$_REQUIRE(_dependencyMap[9], "react");
|
|
137818
137755
|
var import_jsx_runtime10 = _$$_REQUIRE(_dependencyMap[10], "react/jsx-runtime");
|
|
137819
137756
|
function NavigationBarImpressionArea({
|
|
137820
137757
|
children,
|
|
137821
137758
|
withHomeButton
|
|
137822
137759
|
}) {
|
|
137823
|
-
var hasLogged = (0,
|
|
137760
|
+
var hasLogged = (0, import_react15.useRef)(false);
|
|
137824
137761
|
var logging = useNavigationBarLogging();
|
|
137825
|
-
(0,
|
|
137762
|
+
(0, import_react15.useEffect)(() => {
|
|
137826
137763
|
if (hasLogged.current === false) {
|
|
137827
137764
|
logging.navBarImpression({
|
|
137828
137765
|
home_icon_yn: withHomeButton ? "Y" : "N"
|
|
@@ -137871,7 +137808,7 @@ __d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, e
|
|
|
137871
137808
|
var import_react_native_safe_area_context = _$$_REQUIRE(_dependencyMap[13], "@granite-js/native/react-native-safe-area-context");
|
|
137872
137809
|
var import_tds_react_native9 = _$$_REQUIRE(_dependencyMap[7], "@toss/tds-react-native");
|
|
137873
137810
|
var import_private6 = _$$_REQUIRE(_dependencyMap[12], "@toss/tds-react-native/private");
|
|
137874
|
-
var
|
|
137811
|
+
var import_react_native19 = _$$_REQUIRE(_dependencyMap[8], "react-native");
|
|
137875
137812
|
var import_jsx_runtime12 = _$$_REQUIRE(_dependencyMap[10], "react/jsx-runtime");
|
|
137876
137813
|
function GameNavigationBar() {
|
|
137877
137814
|
var safeAreaTop = (0, import_private6.useSafeAreaTop)();
|
|
@@ -137880,18 +137817,18 @@ __d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, e
|
|
|
137880
137817
|
var navigationEvent = useNavigationEvent();
|
|
137881
137818
|
var _useNavigationBarCont2 = useNavigationBarContext(),
|
|
137882
137819
|
navigationRightButton = _useNavigationBarCont2.navigationRightButton;
|
|
137883
|
-
var
|
|
137884
|
-
safeAreaRight =
|
|
137820
|
+
var _ref28 = (0, import_react_native_safe_area_context.useSafeAreaInsets)(),
|
|
137821
|
+
safeAreaRight = _ref28.right;
|
|
137885
137822
|
useHardwareBackPress(navigationEvent.handleBack);
|
|
137886
137823
|
return (0, import_jsx_runtime12.jsxs)(import_jsx_runtime12.Fragment, {
|
|
137887
137824
|
children: [(0, import_jsx_runtime12.jsx)(import_tds_react_native9.PageNavbar, {
|
|
137888
137825
|
preference: {
|
|
137889
137826
|
type: "none"
|
|
137890
137827
|
}
|
|
137891
|
-
}), (0, import_jsx_runtime12.jsx)(
|
|
137828
|
+
}), (0, import_jsx_runtime12.jsx)(import_react_native19.View, {
|
|
137892
137829
|
style: {
|
|
137893
137830
|
width: "100%",
|
|
137894
|
-
height:
|
|
137831
|
+
height: import_react_native19.Platform.OS === "ios" ? 44 : 54,
|
|
137895
137832
|
flexDirection: "row",
|
|
137896
137833
|
alignItems: "center",
|
|
137897
137834
|
justifyContent: "flex-end",
|
|
@@ -137938,13 +137875,13 @@ __d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, e
|
|
|
137938
137875
|
function GameAppContainer({
|
|
137939
137876
|
children
|
|
137940
137877
|
}) {
|
|
137941
|
-
(0,
|
|
137942
|
-
if (
|
|
137943
|
-
(0,
|
|
137878
|
+
(0, import_react16.useEffect)(() => {
|
|
137879
|
+
if (import_react_native20.Platform.OS === "ios") {
|
|
137880
|
+
(0, import_native_modules9.setIosSwipeGestureEnabled)({
|
|
137944
137881
|
isEnabled: false
|
|
137945
137882
|
});
|
|
137946
137883
|
return () => {
|
|
137947
|
-
(0,
|
|
137884
|
+
(0, import_native_modules9.setIosSwipeGestureEnabled)({
|
|
137948
137885
|
isEnabled: true
|
|
137949
137886
|
});
|
|
137950
137887
|
};
|
|
@@ -137969,18 +137906,18 @@ __d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, e
|
|
|
137969
137906
|
children,
|
|
137970
137907
|
...initialProps
|
|
137971
137908
|
}) {
|
|
137972
|
-
if (!(0,
|
|
137909
|
+
if (!(0, import_native_modules10.isMinVersionSupported)({
|
|
137973
137910
|
android: "5.220.0",
|
|
137974
137911
|
ios: "5.221.0"
|
|
137975
137912
|
})) {
|
|
137976
137913
|
return (0, import_jsx_runtime14.jsxs)(import_jsx_runtime14.Fragment, {
|
|
137977
|
-
children: [(0, import_jsx_runtime14.jsx)(AppEvent.
|
|
137914
|
+
children: [(0, import_jsx_runtime14.jsx)(AppEvent.System, {
|
|
137978
137915
|
...initialProps
|
|
137979
137916
|
}), (0, import_jsx_runtime14.jsx)(AppUpdate, {})]
|
|
137980
137917
|
});
|
|
137981
137918
|
}
|
|
137982
137919
|
return (0, import_jsx_runtime14.jsxs)(import_jsx_runtime14.Fragment, {
|
|
137983
|
-
children: [(0, import_jsx_runtime14.jsx)(AppEvent.
|
|
137920
|
+
children: [(0, import_jsx_runtime14.jsx)(AppEvent.System, {
|
|
137984
137921
|
...initialProps
|
|
137985
137922
|
}), (0, import_jsx_runtime14.jsx)(Container, {
|
|
137986
137923
|
...initialProps,
|
|
@@ -138001,17 +137938,17 @@ __d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, e
|
|
|
138001
137938
|
analytics
|
|
138002
137939
|
}) {
|
|
138003
137940
|
var appName = getAppName();
|
|
138004
|
-
var isRegistered =
|
|
137941
|
+
var isRegistered = import_react_native22.AppRegistry.getAppKeys().includes(appName);
|
|
138005
137942
|
if (!isRegistered) {
|
|
138006
137943
|
import_analytics.Analytics.init({
|
|
138007
|
-
logger: params => void (0,
|
|
137944
|
+
logger: params => void (0, import_native_modules10.eventLog)(params),
|
|
138008
137945
|
debug: analytics?.debug ?? __DEV__
|
|
138009
137946
|
});
|
|
138010
|
-
var App =
|
|
137947
|
+
var App = import_react_native21.Granite.registerApp(AppsInTossContainer.bind(null, container), {
|
|
138011
137948
|
appName,
|
|
138012
137949
|
context,
|
|
138013
|
-
initialScheme: (0,
|
|
138014
|
-
setIosSwipeGestureEnabled:
|
|
137950
|
+
initialScheme: (0, import_native_modules10.getSchemeUri)(),
|
|
137951
|
+
setIosSwipeGestureEnabled: import_native_modules10.setIosSwipeGestureEnabled,
|
|
138015
137952
|
router: {
|
|
138016
137953
|
screenContainer: AppsInTossScreenContainer,
|
|
138017
137954
|
defaultScreenOption: {
|
|
@@ -138046,44 +137983,42 @@ __d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, e
|
|
|
138046
137983
|
var AppsInToss = {
|
|
138047
137984
|
registerApp
|
|
138048
137985
|
};
|
|
138049
|
-
var
|
|
137986
|
+
var import_native_modules19 = _$$_REQUIRE(_dependencyMap[5], "@apps-in-toss/native-modules");
|
|
138050
137987
|
var appsInTossAsyncBridges = __toESM(_$$_REQUIRE(_dependencyMap[14], "@apps-in-toss/native-modules/async-bridges"), 1);
|
|
138051
137988
|
var appsInTossConstantBridges = __toESM(_$$_REQUIRE(_dependencyMap[15], "@apps-in-toss/native-modules/constant-bridges"), 1);
|
|
138052
137989
|
var appsInTossEventBridges = __toESM(_$$_REQUIRE(_dependencyMap[16], "@apps-in-toss/native-modules/event-bridges"), 1);
|
|
138053
137990
|
var import_user_scripts = _$$_REQUIRE(_dependencyMap[17], "@apps-in-toss/user-scripts");
|
|
138054
137991
|
var import_react_native_safe_area_context4 = _$$_REQUIRE(_dependencyMap[13], "@granite-js/native/react-native-safe-area-context");
|
|
138055
|
-
var
|
|
137992
|
+
var import_react_native36 = _$$_REQUIRE(_dependencyMap[6], "@granite-js/react-native");
|
|
138056
137993
|
var import_tds_react_native15 = _$$_REQUIRE(_dependencyMap[7], "@toss/tds-react-native");
|
|
138057
137994
|
var import_private9 = _$$_REQUIRE(_dependencyMap[12], "@toss/tds-react-native/private");
|
|
138058
|
-
var
|
|
138059
|
-
var
|
|
138060
|
-
var
|
|
137995
|
+
var import_react27 = _$$_REQUIRE(_dependencyMap[9], "react");
|
|
137996
|
+
var import_react_native37 = _$$_REQUIRE(_dependencyMap[8], "react-native");
|
|
137997
|
+
var import_native_modules11 = _$$_REQUIRE(_dependencyMap[5], "@apps-in-toss/native-modules");
|
|
138061
137998
|
var import_react_native_webview = _$$_REQUIRE(_dependencyMap[18], "@granite-js/native/react-native-webview");
|
|
138062
|
-
var
|
|
138063
|
-
var
|
|
137999
|
+
var import_react18 = _$$_REQUIRE(_dependencyMap[9], "react");
|
|
138000
|
+
var import_react_native25 = _$$_REQUIRE(_dependencyMap[8], "react-native");
|
|
138064
138001
|
var import_react_native_safe_area_context2 = _$$_REQUIRE(_dependencyMap[13], "@granite-js/native/react-native-safe-area-context");
|
|
138065
|
-
var
|
|
138002
|
+
var import_react_native23 = _$$_REQUIRE(_dependencyMap[6], "@granite-js/react-native");
|
|
138066
138003
|
var import_tds_react_native11 = _$$_REQUIRE(_dependencyMap[7], "@toss/tds-react-native");
|
|
138067
138004
|
var import_private7 = _$$_REQUIRE(_dependencyMap[12], "@toss/tds-react-native/private");
|
|
138068
138005
|
var import_es_hangul3 = _$$_REQUIRE(_dependencyMap[11], "es-hangul");
|
|
138069
|
-
var
|
|
138070
|
-
var
|
|
138006
|
+
var import_react17 = _$$_REQUIRE(_dependencyMap[9], "react");
|
|
138007
|
+
var import_react_native24 = _$$_REQUIRE(_dependencyMap[8], "react-native");
|
|
138071
138008
|
var import_jsx_runtime15 = _$$_REQUIRE(_dependencyMap[10], "react/jsx-runtime");
|
|
138072
138009
|
function GameWebviewNavigationBar() {
|
|
138073
138010
|
var safeAreaTop = (0, import_private7.useSafeAreaTop)();
|
|
138074
|
-
var
|
|
138075
|
-
openConfirm =
|
|
138076
|
-
var _useCaptureExitLog3 = useCaptureExitLog(),
|
|
138077
|
-
captureExitLog = _useCaptureExitLog3.captureExitLog;
|
|
138011
|
+
var _ref29 = (0, import_tds_react_native11.useDialog)(),
|
|
138012
|
+
openConfirm = _ref29.openConfirm;
|
|
138078
138013
|
var global2 = getAppsInTossGlobals();
|
|
138079
138014
|
var logging = useNavigationBarLogging();
|
|
138080
138015
|
var _useMoreButtonBottomS3 = useMoreButtonBottomSheet(),
|
|
138081
138016
|
openMoreButtonBottomSheet = _useMoreButtonBottomS3.open;
|
|
138082
138017
|
var _useNavigationBarCont3 = useNavigationBarContext(),
|
|
138083
138018
|
navigationRightButton = _useNavigationBarCont3.navigationRightButton;
|
|
138084
|
-
var
|
|
138085
|
-
safeAreaRight =
|
|
138086
|
-
var handleGameWebviewClose = (0,
|
|
138019
|
+
var _ref30 = (0, import_react_native_safe_area_context2.useSafeAreaInsets)(),
|
|
138020
|
+
safeAreaRight = _ref30.right;
|
|
138021
|
+
var handleGameWebviewClose = (0, import_react17.useCallback)(_asyncToGenerator(function* () {
|
|
138087
138022
|
logging.closeButtonClick();
|
|
138088
138023
|
var isConfirmed = yield openConfirm({
|
|
138089
138024
|
title: `${(0, import_es_hangul3.josa)(global2.brandDisplayName, "\uC744/\uB97C")} \uC885\uB8CC\uD560\uAE4C\uC694?`,
|
|
@@ -138094,19 +138029,18 @@ __d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, e
|
|
|
138094
138029
|
});
|
|
138095
138030
|
logging.closePopupCtaClick(isConfirmed);
|
|
138096
138031
|
if (isConfirmed) {
|
|
138097
|
-
|
|
138098
|
-
(0, import_react_native24.closeView)();
|
|
138032
|
+
(0, import_react_native23.closeView)();
|
|
138099
138033
|
}
|
|
138100
|
-
}), [
|
|
138034
|
+
}), [global2.brandDisplayName, logging, openConfirm]);
|
|
138101
138035
|
return (0, import_jsx_runtime15.jsxs)(import_jsx_runtime15.Fragment, {
|
|
138102
138036
|
children: [(0, import_jsx_runtime15.jsx)(import_tds_react_native11.PageNavbar, {
|
|
138103
138037
|
preference: {
|
|
138104
138038
|
type: "none"
|
|
138105
138039
|
}
|
|
138106
|
-
}), (0, import_jsx_runtime15.jsx)(
|
|
138040
|
+
}), (0, import_jsx_runtime15.jsx)(import_react_native24.View, {
|
|
138107
138041
|
style: {
|
|
138108
138042
|
width: "100%",
|
|
138109
|
-
height:
|
|
138043
|
+
height: import_react_native24.Platform.OS === "ios" ? 44 : 54,
|
|
138110
138044
|
flexDirection: "row",
|
|
138111
138045
|
alignItems: "center",
|
|
138112
138046
|
justifyContent: "flex-end",
|
|
@@ -138128,14 +138062,14 @@ __d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, e
|
|
|
138128
138062
|
});
|
|
138129
138063
|
}
|
|
138130
138064
|
var import_jsx_runtime16 = _$$_REQUIRE(_dependencyMap[10], "react/jsx-runtime");
|
|
138131
|
-
var GameWebView = (0,
|
|
138132
|
-
(0,
|
|
138133
|
-
if (
|
|
138134
|
-
(0,
|
|
138065
|
+
var GameWebView = (0, import_react18.forwardRef)(function GameWebView2(props, ref) {
|
|
138066
|
+
(0, import_react18.useEffect)(() => {
|
|
138067
|
+
if (import_react_native25.Platform.OS === "ios") {
|
|
138068
|
+
(0, import_native_modules11.setIosSwipeGestureEnabled)({
|
|
138135
138069
|
isEnabled: false
|
|
138136
138070
|
});
|
|
138137
138071
|
return () => {
|
|
138138
|
-
(0,
|
|
138072
|
+
(0, import_native_modules11.setIosSwipeGestureEnabled)({
|
|
138139
138073
|
isEnabled: true
|
|
138140
138074
|
});
|
|
138141
138075
|
};
|
|
@@ -138143,7 +138077,7 @@ __d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, e
|
|
|
138143
138077
|
return;
|
|
138144
138078
|
}, []);
|
|
138145
138079
|
return (0, import_jsx_runtime16.jsxs)(import_jsx_runtime16.Fragment, {
|
|
138146
|
-
children: [(0, import_jsx_runtime16.jsx)(GameWebviewNavigationBar, {}), (0,
|
|
138080
|
+
children: [(0, import_jsx_runtime16.jsx)(GameWebviewNavigationBar, {}), (0, import_native_modules11.getOperationalEnvironment)() === "toss" ? (0, import_jsx_runtime16.jsx)(GameInitializer, {
|
|
138147
138081
|
children: (0, import_jsx_runtime16.jsx)(import_react_native_webview.WebView, {
|
|
138148
138082
|
ref,
|
|
138149
138083
|
...props
|
|
@@ -138155,23 +138089,21 @@ __d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, e
|
|
|
138155
138089
|
});
|
|
138156
138090
|
});
|
|
138157
138091
|
var import_react_native_webview2 = _$$_REQUIRE(_dependencyMap[18], "@granite-js/native/react-native-webview");
|
|
138158
|
-
var
|
|
138159
|
-
var
|
|
138092
|
+
var import_react20 = _$$_REQUIRE(_dependencyMap[9], "react");
|
|
138093
|
+
var import_react_native26 = _$$_REQUIRE(_dependencyMap[6], "@granite-js/react-native");
|
|
138160
138094
|
var import_tds_react_native12 = _$$_REQUIRE(_dependencyMap[7], "@toss/tds-react-native");
|
|
138161
138095
|
var import_private8 = _$$_REQUIRE(_dependencyMap[12], "@toss/tds-react-native/private");
|
|
138162
138096
|
var import_es_hangul4 = _$$_REQUIRE(_dependencyMap[11], "es-hangul");
|
|
138163
|
-
var
|
|
138097
|
+
var import_react19 = _$$_REQUIRE(_dependencyMap[9], "react");
|
|
138164
138098
|
var import_jsx_runtime17 = _$$_REQUIRE(_dependencyMap[10], "react/jsx-runtime");
|
|
138165
138099
|
function PartnerWebviewNavigationBar({
|
|
138166
138100
|
onBackButtonClick,
|
|
138167
138101
|
onHomeButtonClick
|
|
138168
138102
|
}) {
|
|
138169
138103
|
var globals = getAppsInTossGlobals();
|
|
138170
|
-
var _useCaptureExitLog4 = useCaptureExitLog(),
|
|
138171
|
-
captureExitLog = _useCaptureExitLog4.captureExitLog;
|
|
138172
138104
|
var logging = useNavigationBarLogging();
|
|
138173
|
-
var
|
|
138174
|
-
openConfirm =
|
|
138105
|
+
var _ref32 = (0, import_tds_react_native12.useDialog)(),
|
|
138106
|
+
openConfirm = _ref32.openConfirm;
|
|
138175
138107
|
var _useMoreButtonBottomS4 = useMoreButtonBottomSheet(),
|
|
138176
138108
|
openMoreButtonBottomSheet = _useMoreButtonBottomS4.open;
|
|
138177
138109
|
var parsedNavigationBar = globals.navigationBar != null ? safeParseNavigationBar(globals.navigationBar) : null;
|
|
@@ -138179,7 +138111,7 @@ __d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, e
|
|
|
138179
138111
|
var withBackButton = parsedNavigationBar?.withBackButton ?? true;
|
|
138180
138112
|
var _useNavigationBarCont4 = useNavigationBarContext(),
|
|
138181
138113
|
navigationRightButton = _useNavigationBarCont4.navigationRightButton;
|
|
138182
|
-
var handleClose = (0,
|
|
138114
|
+
var handleClose = (0, import_react19.useCallback)(_asyncToGenerator(function* () {
|
|
138183
138115
|
logging.closeButtonClick();
|
|
138184
138116
|
var isConfirmed = yield openConfirm({
|
|
138185
138117
|
title: `${(0, import_es_hangul4.josa)(globals.brandDisplayName, "\uC744/\uB97C")} \uC885\uB8CC\uD560\uAE4C\uC694?`,
|
|
@@ -138190,10 +138122,9 @@ __d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, e
|
|
|
138190
138122
|
});
|
|
138191
138123
|
logging.closePopupCtaClick(isConfirmed);
|
|
138192
138124
|
if (isConfirmed) {
|
|
138193
|
-
|
|
138194
|
-
(0, import_react_native27.closeView)();
|
|
138125
|
+
(0, import_react_native26.closeView)();
|
|
138195
138126
|
}
|
|
138196
|
-
}), [
|
|
138127
|
+
}), [globals.brandDisplayName, logging, openConfirm]);
|
|
138197
138128
|
return (0, import_jsx_runtime17.jsx)(NavigationBarImpressionArea, {
|
|
138198
138129
|
withHomeButton,
|
|
138199
138130
|
children: (0, import_jsx_runtime17.jsx)(import_private8.TopNavigation, {
|
|
@@ -138217,7 +138148,7 @@ __d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, e
|
|
|
138217
138148
|
});
|
|
138218
138149
|
}
|
|
138219
138150
|
var import_jsx_runtime18 = _$$_REQUIRE(_dependencyMap[10], "react/jsx-runtime");
|
|
138220
|
-
var PartnerWebView = (0,
|
|
138151
|
+
var PartnerWebView = (0, import_react20.forwardRef)(function PartnerWebViewScreen({
|
|
138221
138152
|
onBackButtonClick,
|
|
138222
138153
|
onHomeButtonClick,
|
|
138223
138154
|
...webViewProps
|
|
@@ -138246,8 +138177,15 @@ __d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, e
|
|
|
138246
138177
|
}
|
|
138247
138178
|
return `${scheme}://${url.hostname}${url.pathname}${url.search}`;
|
|
138248
138179
|
}
|
|
138249
|
-
var
|
|
138180
|
+
var import_native_modules12 = _$$_REQUIRE(_dependencyMap[5], "@apps-in-toss/native-modules");
|
|
138250
138181
|
function noop() {}
|
|
138182
|
+
var INVALID_AD_GROUP_ID_ERROR_MESSAGE = "\uC798\uBABB\uB41C \uC694\uCCAD\uC774\uC5D0\uC694. \uD544\uC694\uD55C \uAC12\uC774 \uBE44\uC5B4 \uC788\uC5B4\uC694.";
|
|
138183
|
+
function normalizeAdGroupId(adGroupId) {
|
|
138184
|
+
return adGroupId.trim();
|
|
138185
|
+
}
|
|
138186
|
+
function createInvalidAdGroupIdError() {
|
|
138187
|
+
return new Error(INVALID_AD_GROUP_ID_ERROR_MESSAGE);
|
|
138188
|
+
}
|
|
138251
138189
|
function generateSessionId() {
|
|
138252
138190
|
return "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g, c => {
|
|
138253
138191
|
var r = Math.random() * 16 | 0;
|
|
@@ -138259,7 +138197,7 @@ __d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, e
|
|
|
138259
138197
|
var ANDROID_FETCH_TOSS_AD_SUPPORTED_VERSION = "5.241.0";
|
|
138260
138198
|
var IOS_FETCH_TOSS_AD_SUPPORTED_VERSION = "5.241.0";
|
|
138261
138199
|
var UNSUPPORTED_ERROR_MESSAGE = "This feature is not supported in the current environment";
|
|
138262
|
-
var ENVIRONMENT = (0,
|
|
138200
|
+
var ENVIRONMENT = (0, import_native_modules12.getOperationalEnvironment)();
|
|
138263
138201
|
function fetchTossAd(params) {
|
|
138264
138202
|
if (!fetchTossAd.isSupported()) {
|
|
138265
138203
|
params.onError(new Error(UNSUPPORTED_ERROR_MESSAGE));
|
|
@@ -138268,8 +138206,12 @@ __d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, e
|
|
|
138268
138206
|
var onEvent = params.onEvent,
|
|
138269
138207
|
onError = params.onError,
|
|
138270
138208
|
options = params.options;
|
|
138271
|
-
var adGroupId = options.adGroupId;
|
|
138272
|
-
|
|
138209
|
+
var adGroupId = normalizeAdGroupId(options.adGroupId);
|
|
138210
|
+
if (adGroupId.length === 0) {
|
|
138211
|
+
params.onError(createInvalidAdGroupIdError());
|
|
138212
|
+
return noop;
|
|
138213
|
+
}
|
|
138214
|
+
var unregisterCallbacks = import_native_modules12.INTERNAL__appBridgeHandler.invokeAppBridgeMethod("fetchTossAd", {
|
|
138273
138215
|
spaceUnitId: adGroupId,
|
|
138274
138216
|
sessionId,
|
|
138275
138217
|
sdkId: options.sdkId,
|
|
@@ -138288,37 +138230,37 @@ __d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, e
|
|
|
138288
138230
|
if (ENVIRONMENT !== "toss") {
|
|
138289
138231
|
return false;
|
|
138290
138232
|
}
|
|
138291
|
-
return (0,
|
|
138233
|
+
return (0, import_native_modules12.isMinVersionSupported)({
|
|
138292
138234
|
android: ANDROID_FETCH_TOSS_AD_SUPPORTED_VERSION,
|
|
138293
138235
|
ios: IOS_FETCH_TOSS_AD_SUPPORTED_VERSION
|
|
138294
138236
|
});
|
|
138295
138237
|
};
|
|
138296
|
-
var
|
|
138238
|
+
var import_native_modules14 = _$$_REQUIRE(_dependencyMap[5], "@apps-in-toss/native-modules");
|
|
138297
138239
|
function generateRequestId() {
|
|
138298
138240
|
var timestamp = Date.now().toString(36).toUpperCase();
|
|
138299
138241
|
var random = Math.random().toString(36).substring(2, 7).toUpperCase();
|
|
138300
138242
|
return `ait-${timestamp}${random}`;
|
|
138301
138243
|
}
|
|
138302
|
-
var
|
|
138244
|
+
var import_react_native27 = _$$_REQUIRE(_dependencyMap[6], "@granite-js/react-native");
|
|
138303
138245
|
function getReferrer() {
|
|
138304
138246
|
try {
|
|
138305
|
-
return new URL((0,
|
|
138247
|
+
return new URL((0, import_react_native27.getSchemeUri)()).searchParams.get("referrer");
|
|
138306
138248
|
} catch {
|
|
138307
138249
|
return null;
|
|
138308
138250
|
}
|
|
138309
138251
|
}
|
|
138310
|
-
var
|
|
138311
|
-
var
|
|
138252
|
+
var import_native_modules13 = _$$_REQUIRE(_dependencyMap[5], "@apps-in-toss/native-modules");
|
|
138253
|
+
var import_react_native28 = _$$_REQUIRE(_dependencyMap[6], "@granite-js/react-native");
|
|
138312
138254
|
function getIsDev() {
|
|
138313
138255
|
try {
|
|
138314
|
-
return new URL((0,
|
|
138256
|
+
return new URL((0, import_react_native28.getSchemeUri)()).searchParams.get("isDev") === "true";
|
|
138315
138257
|
} catch {
|
|
138316
138258
|
return false;
|
|
138317
138259
|
}
|
|
138318
138260
|
}
|
|
138319
|
-
var OPERATIONAL_ENVIRONMENT = (0,
|
|
138320
|
-
var OS = (0,
|
|
138321
|
-
var APP_VER = (0,
|
|
138261
|
+
var OPERATIONAL_ENVIRONMENT = (0, import_native_modules13.getOperationalEnvironment)();
|
|
138262
|
+
var OS = (0, import_native_modules13.getPlatformOS)();
|
|
138263
|
+
var APP_VER = (0, import_native_modules13.getTossAppVersion)();
|
|
138322
138264
|
var ALPHA_EVENT_TRACKER_HTTP_ENDPOINT = "https://alpha-trillion.toss.im/trk/sdk-mediation/event";
|
|
138323
138265
|
var LIVE_EVENT_TRACKER_HTTP_ENDPOINT = "https://trillion.toss.im/trk/sdk-mediation/event";
|
|
138324
138266
|
function getPostEventTrackingUrl() {
|
|
@@ -138346,32 +138288,44 @@ __d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, e
|
|
|
138346
138288
|
}).catch(noop);
|
|
138347
138289
|
}
|
|
138348
138290
|
var INTEGRATED_AD_SDK_VERSION = "0.0.0";
|
|
138349
|
-
var ANDROID_INTEGRATED_AD_SUPPORTED_VERSION = "5.
|
|
138350
|
-
var IOS_INTEGRATED_AD_SUPPORTED_VERSION = "5.
|
|
138291
|
+
var ANDROID_INTEGRATED_AD_SUPPORTED_VERSION = "5.247.0";
|
|
138292
|
+
var IOS_INTEGRATED_AD_SUPPORTED_VERSION = "5.247.0";
|
|
138351
138293
|
var UNSUPPORTED_ERROR_MESSAGE2 = "This feature is not supported in the current environment";
|
|
138352
138294
|
var INTG_AD_ADM_FALLBACK_RID_MAP = {};
|
|
138353
138295
|
function integratedAdIsSupported() {
|
|
138354
|
-
return (0,
|
|
138296
|
+
return (0, import_native_modules14.isMinVersionSupported)({
|
|
138355
138297
|
android: ANDROID_INTEGRATED_AD_SUPPORTED_VERSION,
|
|
138356
138298
|
ios: IOS_INTEGRATED_AD_SUPPORTED_VERSION
|
|
138357
138299
|
});
|
|
138358
138300
|
}
|
|
138359
138301
|
function generateLoadFullScreenAd(sdkId) {
|
|
138360
138302
|
var fn = params => {
|
|
138361
|
-
if (!
|
|
138303
|
+
if (!import_native_modules14.GoogleAdMob.loadAppsInTossAdMob.isSupported()) {
|
|
138362
138304
|
params.onError(new Error(UNSUPPORTED_ERROR_MESSAGE2));
|
|
138363
138305
|
return noop;
|
|
138364
138306
|
}
|
|
138307
|
+
var normalizedAdGroupId = normalizeAdGroupId(params.options.adGroupId);
|
|
138308
|
+
if (normalizedAdGroupId.length === 0) {
|
|
138309
|
+
params.onError(createInvalidAdGroupIdError());
|
|
138310
|
+
return noop;
|
|
138311
|
+
}
|
|
138312
|
+
var normalizedParams = {
|
|
138313
|
+
...params,
|
|
138314
|
+
options: {
|
|
138315
|
+
...params.options,
|
|
138316
|
+
adGroupId: normalizedAdGroupId
|
|
138317
|
+
}
|
|
138318
|
+
};
|
|
138365
138319
|
if (!integratedAdIsSupported()) {
|
|
138366
|
-
return
|
|
138367
|
-
...
|
|
138320
|
+
return import_native_modules14.GoogleAdMob.loadAppsInTossAdMob({
|
|
138321
|
+
...normalizedParams,
|
|
138368
138322
|
onEvent: event => {
|
|
138369
138323
|
if (event.type === "loaded") {
|
|
138370
138324
|
var requestId = generateRequestId();
|
|
138371
|
-
INTG_AD_ADM_FALLBACK_RID_MAP[
|
|
138325
|
+
INTG_AD_ADM_FALLBACK_RID_MAP[normalizedAdGroupId] = requestId;
|
|
138372
138326
|
postEventTracking({
|
|
138373
138327
|
eventName: "LOAD",
|
|
138374
|
-
spaceUnitId:
|
|
138328
|
+
spaceUnitId: normalizedAdGroupId,
|
|
138375
138329
|
requestId,
|
|
138376
138330
|
responseId: event.data.responseInfo.responseId,
|
|
138377
138331
|
mediationType: "ADMOB",
|
|
@@ -138380,13 +138334,13 @@ __d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, e
|
|
|
138380
138334
|
sdkVer: INTEGRATED_AD_SDK_VERSION
|
|
138381
138335
|
});
|
|
138382
138336
|
}
|
|
138383
|
-
return
|
|
138337
|
+
return normalizedParams.onEvent(event);
|
|
138384
138338
|
},
|
|
138385
138339
|
onError: error => {
|
|
138386
|
-
var requestId = INTG_AD_ADM_FALLBACK_RID_MAP[
|
|
138340
|
+
var requestId = INTG_AD_ADM_FALLBACK_RID_MAP[normalizedAdGroupId] ?? "";
|
|
138387
138341
|
postEventTracking({
|
|
138388
138342
|
eventName: "FAILED_TO_LOAD",
|
|
138389
|
-
spaceUnitId:
|
|
138343
|
+
spaceUnitId: normalizedAdGroupId,
|
|
138390
138344
|
requestId,
|
|
138391
138345
|
responseId: "",
|
|
138392
138346
|
mediationType: "ADMOB",
|
|
@@ -138394,16 +138348,16 @@ __d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, e
|
|
|
138394
138348
|
adSourceName: "",
|
|
138395
138349
|
sdkVer: INTEGRATED_AD_SDK_VERSION
|
|
138396
138350
|
});
|
|
138397
|
-
return
|
|
138351
|
+
return normalizedParams.onError(error);
|
|
138398
138352
|
}
|
|
138399
138353
|
});
|
|
138400
138354
|
}
|
|
138401
|
-
var onEvent =
|
|
138402
|
-
onError =
|
|
138403
|
-
options =
|
|
138355
|
+
var onEvent = normalizedParams.onEvent,
|
|
138356
|
+
onError = normalizedParams.onError,
|
|
138357
|
+
options = normalizedParams.options;
|
|
138404
138358
|
var adGroupId = options.adGroupId;
|
|
138405
138359
|
var referrer = getReferrer();
|
|
138406
|
-
var unregisterCallbacks =
|
|
138360
|
+
var unregisterCallbacks = import_native_modules14.INTERNAL__appBridgeHandler.invokeAppBridgeMethod("loadTossAdOrAdmob", {
|
|
138407
138361
|
spaceUnitId: adGroupId,
|
|
138408
138362
|
referrer,
|
|
138409
138363
|
sessionId,
|
|
@@ -138420,26 +138374,38 @@ __d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, e
|
|
|
138420
138374
|
});
|
|
138421
138375
|
return unregisterCallbacks;
|
|
138422
138376
|
};
|
|
138423
|
-
fn.isSupported =
|
|
138377
|
+
fn.isSupported = import_native_modules14.GoogleAdMob.loadAppsInTossAdMob.isSupported;
|
|
138424
138378
|
return fn;
|
|
138425
138379
|
}
|
|
138426
138380
|
var loadFullScreenAd = generateLoadFullScreenAd("107");
|
|
138427
138381
|
var loadFullScreenAdForWeb = generateLoadFullScreenAd("107");
|
|
138428
138382
|
function showFullScreenAd(params) {
|
|
138429
|
-
if (!
|
|
138383
|
+
if (!import_native_modules14.GoogleAdMob.showAppsInTossAdMob.isSupported()) {
|
|
138430
138384
|
params.onError(new Error(UNSUPPORTED_ERROR_MESSAGE2));
|
|
138431
138385
|
return noop;
|
|
138432
138386
|
}
|
|
138387
|
+
var normalizedAdGroupId = normalizeAdGroupId(params.options.adGroupId);
|
|
138388
|
+
if (normalizedAdGroupId.length === 0) {
|
|
138389
|
+
params.onError(createInvalidAdGroupIdError());
|
|
138390
|
+
return noop;
|
|
138391
|
+
}
|
|
138392
|
+
var normalizedParams = {
|
|
138393
|
+
...params,
|
|
138394
|
+
options: {
|
|
138395
|
+
...params.options,
|
|
138396
|
+
adGroupId: normalizedAdGroupId
|
|
138397
|
+
}
|
|
138398
|
+
};
|
|
138433
138399
|
if (!integratedAdIsSupported()) {
|
|
138434
|
-
return
|
|
138435
|
-
...
|
|
138400
|
+
return import_native_modules14.GoogleAdMob.showAppsInTossAdMob({
|
|
138401
|
+
...normalizedParams,
|
|
138436
138402
|
onEvent: event => {
|
|
138437
|
-
var requestId = INTG_AD_ADM_FALLBACK_RID_MAP[
|
|
138403
|
+
var requestId = INTG_AD_ADM_FALLBACK_RID_MAP[normalizedAdGroupId] ?? "";
|
|
138438
138404
|
switch (event.type) {
|
|
138439
138405
|
case "show":
|
|
138440
138406
|
postEventTracking({
|
|
138441
138407
|
eventName: "SHOW",
|
|
138442
|
-
spaceUnitId:
|
|
138408
|
+
spaceUnitId: normalizedAdGroupId,
|
|
138443
138409
|
requestId,
|
|
138444
138410
|
responseId: "",
|
|
138445
138411
|
mediationType: "ADMOB",
|
|
@@ -138451,7 +138417,7 @@ __d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, e
|
|
|
138451
138417
|
case "failedToShow":
|
|
138452
138418
|
postEventTracking({
|
|
138453
138419
|
eventName: "FAILED_TO_SHOW",
|
|
138454
|
-
spaceUnitId:
|
|
138420
|
+
spaceUnitId: normalizedAdGroupId,
|
|
138455
138421
|
requestId,
|
|
138456
138422
|
responseId: "",
|
|
138457
138423
|
mediationType: "ADMOB",
|
|
@@ -138463,7 +138429,7 @@ __d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, e
|
|
|
138463
138429
|
case "impression":
|
|
138464
138430
|
postEventTracking({
|
|
138465
138431
|
eventName: "IMP",
|
|
138466
|
-
spaceUnitId:
|
|
138432
|
+
spaceUnitId: normalizedAdGroupId,
|
|
138467
138433
|
requestId,
|
|
138468
138434
|
responseId: "",
|
|
138469
138435
|
mediationType: "ADMOB",
|
|
@@ -138475,7 +138441,7 @@ __d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, e
|
|
|
138475
138441
|
case "clicked":
|
|
138476
138442
|
postEventTracking({
|
|
138477
138443
|
eventName: "CLICK",
|
|
138478
|
-
spaceUnitId:
|
|
138444
|
+
spaceUnitId: normalizedAdGroupId,
|
|
138479
138445
|
requestId,
|
|
138480
138446
|
responseId: "",
|
|
138481
138447
|
mediationType: "ADMOB",
|
|
@@ -138487,7 +138453,7 @@ __d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, e
|
|
|
138487
138453
|
case "dismissed":
|
|
138488
138454
|
postEventTracking({
|
|
138489
138455
|
eventName: "DISMISS",
|
|
138490
|
-
spaceUnitId:
|
|
138456
|
+
spaceUnitId: normalizedAdGroupId,
|
|
138491
138457
|
requestId,
|
|
138492
138458
|
responseId: "",
|
|
138493
138459
|
mediationType: "ADMOB",
|
|
@@ -138499,7 +138465,7 @@ __d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, e
|
|
|
138499
138465
|
case "userEarnedReward":
|
|
138500
138466
|
postEventTracking({
|
|
138501
138467
|
eventName: "USER_EARNED_REWARD",
|
|
138502
|
-
spaceUnitId:
|
|
138468
|
+
spaceUnitId: normalizedAdGroupId,
|
|
138503
138469
|
requestId,
|
|
138504
138470
|
responseId: "",
|
|
138505
138471
|
mediationType: "ADMOB",
|
|
@@ -138509,13 +138475,13 @@ __d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, e
|
|
|
138509
138475
|
});
|
|
138510
138476
|
break;
|
|
138511
138477
|
}
|
|
138512
|
-
return
|
|
138478
|
+
return normalizedParams.onEvent(event);
|
|
138513
138479
|
},
|
|
138514
138480
|
onError: error => {
|
|
138515
|
-
var requestId = INTG_AD_ADM_FALLBACK_RID_MAP[
|
|
138481
|
+
var requestId = INTG_AD_ADM_FALLBACK_RID_MAP[normalizedAdGroupId] ?? "";
|
|
138516
138482
|
postEventTracking({
|
|
138517
138483
|
eventName: "FAILED_TO_SHOW",
|
|
138518
|
-
spaceUnitId:
|
|
138484
|
+
spaceUnitId: normalizedAdGroupId,
|
|
138519
138485
|
requestId,
|
|
138520
138486
|
responseId: "",
|
|
138521
138487
|
mediationType: "ADMOB",
|
|
@@ -138523,16 +138489,16 @@ __d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, e
|
|
|
138523
138489
|
adSourceName: "",
|
|
138524
138490
|
sdkVer: INTEGRATED_AD_SDK_VERSION
|
|
138525
138491
|
});
|
|
138526
|
-
return
|
|
138492
|
+
return normalizedParams.onError(error);
|
|
138527
138493
|
}
|
|
138528
138494
|
});
|
|
138529
138495
|
}
|
|
138530
|
-
var onEvent =
|
|
138531
|
-
onError =
|
|
138532
|
-
options =
|
|
138496
|
+
var onEvent = normalizedParams.onEvent,
|
|
138497
|
+
onError = normalizedParams.onError,
|
|
138498
|
+
options = normalizedParams.options;
|
|
138533
138499
|
var adGroupId = options.adGroupId;
|
|
138534
138500
|
var referrer = getReferrer();
|
|
138535
|
-
var unregisterCallbacks =
|
|
138501
|
+
var unregisterCallbacks = import_native_modules14.INTERNAL__appBridgeHandler.invokeAppBridgeMethod("showTossAdOrAdmob", {
|
|
138536
138502
|
spaceUnitId: adGroupId,
|
|
138537
138503
|
referrer,
|
|
138538
138504
|
sessionId
|
|
@@ -138579,16 +138545,15 @@ __d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, e
|
|
|
138579
138545
|
});
|
|
138580
138546
|
return unregisterCallbacks;
|
|
138581
138547
|
}
|
|
138582
|
-
showFullScreenAd.isSupported =
|
|
138583
|
-
var
|
|
138584
|
-
var import_react_native30 = _$$_REQUIRE(_dependencyMap[6], "@granite-js/react-native");
|
|
138548
|
+
showFullScreenAd.isSupported = import_native_modules14.GoogleAdMob.showAppsInTossAdMob.isSupported;
|
|
138549
|
+
var import_react_native29 = _$$_REQUIRE(_dependencyMap[6], "@granite-js/react-native");
|
|
138585
138550
|
function tossAdEventLog(_x4) {
|
|
138586
138551
|
return _tossAdEventLog.apply(this, arguments);
|
|
138587
138552
|
}
|
|
138588
138553
|
function _tossAdEventLog() {
|
|
138589
138554
|
_tossAdEventLog = _asyncToGenerator(function* (params) {
|
|
138590
138555
|
var referrer = getReferrer();
|
|
138591
|
-
var appName =
|
|
138556
|
+
var appName = import_react_native29.Granite.appName;
|
|
138592
138557
|
var eventLogParams = {
|
|
138593
138558
|
...params,
|
|
138594
138559
|
params: {
|
|
@@ -138597,11 +138562,13 @@ __d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, e
|
|
|
138597
138562
|
app_name: appName
|
|
138598
138563
|
}
|
|
138599
138564
|
};
|
|
138600
|
-
return
|
|
138565
|
+
return sendLog(eventLogParams, {
|
|
138566
|
+
pipelines: ["core"]
|
|
138567
|
+
});
|
|
138601
138568
|
});
|
|
138602
138569
|
return _tossAdEventLog.apply(this, arguments);
|
|
138603
138570
|
}
|
|
138604
|
-
var
|
|
138571
|
+
var import_react21 = _$$_REQUIRE(_dependencyMap[9], "react");
|
|
138605
138572
|
function serializeError(error) {
|
|
138606
138573
|
return JSON.stringify(error, (_, value) => {
|
|
138607
138574
|
if (value instanceof Error) {
|
|
@@ -138632,12 +138599,12 @@ __d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, e
|
|
|
138632
138599
|
return;
|
|
138633
138600
|
}
|
|
138634
138601
|
var wrappedFunc = function () {
|
|
138635
|
-
var
|
|
138602
|
+
var _ref34 = _asyncToGenerator(function* (...args2) {
|
|
138636
138603
|
var result = yield func(...args2);
|
|
138637
138604
|
return result;
|
|
138638
138605
|
});
|
|
138639
138606
|
return function wrappedFunc() {
|
|
138640
|
-
return
|
|
138607
|
+
return _ref34.apply(this, arguments);
|
|
138641
138608
|
};
|
|
138642
138609
|
}();
|
|
138643
138610
|
wrappedFunc(...args).then(result => {
|
|
@@ -138658,12 +138625,12 @@ __d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, e
|
|
|
138658
138625
|
asyncHandlerMap,
|
|
138659
138626
|
eventListenerMap
|
|
138660
138627
|
}) {
|
|
138661
|
-
var ref = (0,
|
|
138662
|
-
var injectedJavaScript = (0,
|
|
138628
|
+
var ref = (0, import_react21.useRef)(null);
|
|
138629
|
+
var injectedJavaScript = (0, import_react21.useMemo)(() => `window.__CONSTANT_HANDLER_MAP = ${JSON.stringify(Object.entries(constantHandlerMap).reduce((acc, [key, value]) => {
|
|
138663
138630
|
acc[key] = typeof value === "function" ? value() : value;
|
|
138664
138631
|
return acc;
|
|
138665
138632
|
}, {}))};`, [constantHandlerMap]);
|
|
138666
|
-
(0,
|
|
138633
|
+
(0, import_react21.useEffect)(() => {
|
|
138667
138634
|
ref.current?.injectJavaScript(injectedJavaScript);
|
|
138668
138635
|
}, [injectedJavaScript]);
|
|
138669
138636
|
var createHandleOnEvent = (functionName, eventId) => response => {
|
|
@@ -138677,8 +138644,8 @@ __d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, e
|
|
|
138677
138644
|
window.__GRANITE_NATIVE_EMITTER.emit('${functionName}/onError/${eventId}', ${serializedError});
|
|
138678
138645
|
`);
|
|
138679
138646
|
};
|
|
138680
|
-
var $onMessage = (0,
|
|
138681
|
-
var
|
|
138647
|
+
var $onMessage = (0, import_react21.useCallback)(function () {
|
|
138648
|
+
var _ref35 = _asyncToGenerator(function* (e) {
|
|
138682
138649
|
onMessage?.(e);
|
|
138683
138650
|
var data = parseNativeEventData(e.nativeEvent.data);
|
|
138684
138651
|
if (typeof data !== "object" || data === null || typeof data.functionName !== "string" || typeof data.eventId !== "string" || typeof data.type !== "string" || !["addEventListener", "removeEventListener", "method"].includes(data.type)) {
|
|
@@ -138721,7 +138688,7 @@ __d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, e
|
|
|
138721
138688
|
}
|
|
138722
138689
|
});
|
|
138723
138690
|
return function (_x5) {
|
|
138724
|
-
return
|
|
138691
|
+
return _ref35.apply(this, arguments);
|
|
138725
138692
|
};
|
|
138726
138693
|
}(), [onMessage]);
|
|
138727
138694
|
return {
|
|
@@ -138739,22 +138706,22 @@ __d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, e
|
|
|
138739
138706
|
}
|
|
138740
138707
|
}
|
|
138741
138708
|
var import_react_native_safe_area_context3 = _$$_REQUIRE(_dependencyMap[13], "@granite-js/native/react-native-safe-area-context");
|
|
138742
|
-
var
|
|
138709
|
+
var import_react22 = _$$_REQUIRE(_dependencyMap[9], "react");
|
|
138743
138710
|
function useSafeAreaInsetsEvent() {
|
|
138744
138711
|
var insets = (0, import_react_native_safe_area_context3.useSafeAreaInsets)();
|
|
138745
|
-
(0,
|
|
138712
|
+
(0, import_react22.useEffect)(() => {
|
|
138746
138713
|
safeAreaInsetsChange.emit(insets);
|
|
138747
138714
|
}, [insets]);
|
|
138748
|
-
(0,
|
|
138715
|
+
(0, import_react22.useEffect)(() => {
|
|
138749
138716
|
return () => safeAreaInsetsChange.clearSubscriptions();
|
|
138750
138717
|
}, []);
|
|
138751
138718
|
return safeAreaInsetsChange;
|
|
138752
138719
|
}
|
|
138753
|
-
var
|
|
138720
|
+
var import_react_native30 = _$$_REQUIRE(_dependencyMap[6], "@granite-js/react-native");
|
|
138754
138721
|
var import_tds_react_native13 = _$$_REQUIRE(_dependencyMap[7], "@toss/tds-react-native");
|
|
138755
138722
|
var import_es_hangul5 = _$$_REQUIRE(_dependencyMap[11], "es-hangul");
|
|
138756
|
-
var import_react25 = _$$_REQUIRE(_dependencyMap[9], "react");
|
|
138757
138723
|
var import_react24 = _$$_REQUIRE(_dependencyMap[9], "react");
|
|
138724
|
+
var import_react23 = _$$_REQUIRE(_dependencyMap[9], "react");
|
|
138758
138725
|
var INITIAL_STATE = {
|
|
138759
138726
|
stack: [],
|
|
138760
138727
|
index: -1
|
|
@@ -138803,11 +138770,11 @@ __d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, e
|
|
|
138803
138770
|
}
|
|
138804
138771
|
}
|
|
138805
138772
|
function useWebViewHistory() {
|
|
138806
|
-
var
|
|
138807
|
-
|
|
138808
|
-
state =
|
|
138809
|
-
dispatch =
|
|
138810
|
-
var onNavigationStateChange = (0,
|
|
138773
|
+
var _ref36 = (0, import_react23.useReducer)(reducer, INITIAL_STATE),
|
|
138774
|
+
_ref37 = _slicedToArray(_ref36, 2),
|
|
138775
|
+
state = _ref37[0],
|
|
138776
|
+
dispatch = _ref37[1];
|
|
138777
|
+
var onNavigationStateChange = (0, import_react23.useCallback)(({
|
|
138811
138778
|
url,
|
|
138812
138779
|
canGoForward: canGoForward2
|
|
138813
138780
|
}) => {
|
|
@@ -138817,7 +138784,7 @@ __d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, e
|
|
|
138817
138784
|
canGoForward: canGoForward2
|
|
138818
138785
|
});
|
|
138819
138786
|
}, []);
|
|
138820
|
-
var
|
|
138787
|
+
var _ref38 = (0, import_react23.useMemo)(() => {
|
|
138821
138788
|
var canBack = state.index > 0;
|
|
138822
138789
|
var canFwd = state.index >= 0 && state.index < state.stack.length - 1;
|
|
138823
138790
|
return {
|
|
@@ -138825,8 +138792,8 @@ __d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, e
|
|
|
138825
138792
|
canGoForward: canFwd
|
|
138826
138793
|
};
|
|
138827
138794
|
}, [state.index, state.stack.length]),
|
|
138828
|
-
canGoBack =
|
|
138829
|
-
canGoForward =
|
|
138795
|
+
canGoBack = _ref38.canGoBack,
|
|
138796
|
+
canGoForward = _ref38.canGoForward;
|
|
138830
138797
|
return {
|
|
138831
138798
|
onNavigationStateChange,
|
|
138832
138799
|
hasHistory: canGoBack,
|
|
@@ -138834,27 +138801,25 @@ __d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, e
|
|
|
138834
138801
|
};
|
|
138835
138802
|
}
|
|
138836
138803
|
function useWebBackHandler(webViewInitialURL, webViewRef) {
|
|
138837
|
-
var _useCaptureExitLog5 = useCaptureExitLog(),
|
|
138838
|
-
captureExitLog = _useCaptureExitLog5.captureExitLog;
|
|
138839
138804
|
var _useWebViewHistory = useWebViewHistory(),
|
|
138840
138805
|
hasHistory = _useWebViewHistory.hasHistory,
|
|
138841
138806
|
onNavigationStateChange = _useWebViewHistory.onNavigationStateChange;
|
|
138842
|
-
var
|
|
138843
|
-
webBackHandlersRef =
|
|
138844
|
-
hasWebBackEvent =
|
|
138845
|
-
addWebBackEventListener =
|
|
138846
|
-
removeWebBackEventListener =
|
|
138807
|
+
var _ref39 = (0, import_react_native30.useBackEventState)(),
|
|
138808
|
+
webBackHandlersRef = _ref39.handlersRef,
|
|
138809
|
+
hasWebBackEvent = _ref39.hasBackEvent,
|
|
138810
|
+
addWebBackEventListener = _ref39.addEventListener,
|
|
138811
|
+
removeWebBackEventListener = _ref39.removeEventListener;
|
|
138847
138812
|
var logging = useNavigationBarLogging();
|
|
138848
|
-
var
|
|
138849
|
-
openConfirm =
|
|
138813
|
+
var _ref40 = (0, import_tds_react_native13.useDialog)(),
|
|
138814
|
+
openConfirm = _ref40.openConfirm;
|
|
138850
138815
|
var global2 = getAppsInTossGlobals();
|
|
138851
|
-
var addEventListener = (0,
|
|
138816
|
+
var addEventListener = (0, import_react24.useCallback)(handler => {
|
|
138852
138817
|
addWebBackEventListener(handler);
|
|
138853
138818
|
}, [addWebBackEventListener]);
|
|
138854
|
-
var removeEventListener = (0,
|
|
138819
|
+
var removeEventListener = (0, import_react24.useCallback)(handler => {
|
|
138855
138820
|
removeWebBackEventListener(handler);
|
|
138856
138821
|
}, [removeWebBackEventListener]);
|
|
138857
|
-
var handleWebBack = (0,
|
|
138822
|
+
var handleWebBack = (0, import_react24.useCallback)(_asyncToGenerator(function* () {
|
|
138858
138823
|
if (hasWebBackEvent) {
|
|
138859
138824
|
for (var handler of webBackHandlersRef) {
|
|
138860
138825
|
handler();
|
|
@@ -138873,12 +138838,11 @@ __d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, e
|
|
|
138873
138838
|
});
|
|
138874
138839
|
logging.closePopupCtaClick(isConfirmed);
|
|
138875
138840
|
if (isConfirmed) {
|
|
138876
|
-
|
|
138877
|
-
(0, import_react_native31.closeView)();
|
|
138841
|
+
(0, import_react_native30.closeView)();
|
|
138878
138842
|
}
|
|
138879
138843
|
}
|
|
138880
|
-
}), [
|
|
138881
|
-
var handleWebHome = (0,
|
|
138844
|
+
}), [global2.brandDisplayName, hasHistory, hasWebBackEvent, webBackHandlersRef, logging, openConfirm, webViewRef]);
|
|
138845
|
+
var handleWebHome = (0, import_react24.useCallback)(() => {
|
|
138882
138846
|
logging.homeButtonClick();
|
|
138883
138847
|
if (homeEvent.hasSubscriptions()) {
|
|
138884
138848
|
homeEvent.emit({});
|
|
@@ -138891,7 +138855,7 @@ __d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, e
|
|
|
138891
138855
|
})();
|
|
138892
138856
|
`);
|
|
138893
138857
|
}, [hasWebBackEvent, webBackHandlersRef, logging, webViewInitialURL, webViewRef]);
|
|
138894
|
-
return (0,
|
|
138858
|
+
return (0, import_react24.useMemo)(() => ({
|
|
138895
138859
|
addEventListener,
|
|
138896
138860
|
removeEventListener,
|
|
138897
138861
|
handleWebBack,
|
|
@@ -138910,8 +138874,8 @@ __d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, e
|
|
|
138910
138874
|
});
|
|
138911
138875
|
};
|
|
138912
138876
|
}
|
|
138913
|
-
var
|
|
138914
|
-
var
|
|
138877
|
+
var import_native_modules15 = _$$_REQUIRE(_dependencyMap[5], "@apps-in-toss/native-modules");
|
|
138878
|
+
var import_react_native31 = _$$_REQUIRE(_dependencyMap[8], "react-native");
|
|
138915
138879
|
var FontA11yCategory = {
|
|
138916
138880
|
Large: "Large",
|
|
138917
138881
|
xLarge: "xLarge",
|
|
@@ -139044,33 +139008,33 @@ __d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, e
|
|
|
139044
139008
|
safeArea,
|
|
139045
139009
|
safeAreaBottomTransparency
|
|
139046
139010
|
}) {
|
|
139047
|
-
var platform = (0,
|
|
139048
|
-
var appVersion = (0,
|
|
139049
|
-
var
|
|
139050
|
-
fontScale =
|
|
139011
|
+
var platform = (0, import_native_modules15.getPlatformOS)();
|
|
139012
|
+
var appVersion = (0, import_native_modules15.getTossAppVersion)();
|
|
139013
|
+
var _ref42 = (0, import_react_native31.useWindowDimensions)(),
|
|
139014
|
+
fontScale = _ref42.fontScale;
|
|
139051
139015
|
var platformString = platform === "ios" ? "iPhone" : "Android phone";
|
|
139052
139016
|
var fontA11y = mapFontScaleToCategory(fontScale, platform);
|
|
139053
139017
|
var normalizedFontScale = convertToAndroidStyleScale(fontScale, platform);
|
|
139054
139018
|
return ["AppsInToss", `TossApp/${appVersion}`, batteryModePreference && `TossBatteryModePreference/${batteryModePreference}`, colorPreference && `TossColorPreference/${colorPreference}`, `TossFontAccessibility/${fontA11y}`, `TossFontScale/${normalizedFontScale}`, locale && `TossLocale/${locale}`, navbarPreference && `TossNavbarPreference/${navbarPreference}`, pureSafeArea && `TossPureSafeArea/${pureSafeArea}`, safeArea && `TossSafeArea/${safeArea}`, safeAreaBottomTransparency && `TossSafeAreaBottomTransparency/${safeAreaBottomTransparency}`, platformString].filter(Boolean).join(" ");
|
|
139055
139019
|
}
|
|
139056
|
-
var
|
|
139057
|
-
var
|
|
139058
|
-
var
|
|
139020
|
+
var import_native_modules16 = _$$_REQUIRE(_dependencyMap[5], "@apps-in-toss/native-modules");
|
|
139021
|
+
var import_react_native32 = _$$_REQUIRE(_dependencyMap[6], "@granite-js/react-native");
|
|
139022
|
+
var import_react25 = _$$_REQUIRE(_dependencyMap[9], "react");
|
|
139059
139023
|
function useGeolocation({
|
|
139060
139024
|
accuracy,
|
|
139061
139025
|
distanceInterval,
|
|
139062
139026
|
timeInterval
|
|
139063
139027
|
}) {
|
|
139064
|
-
var isVisible = (0,
|
|
139065
|
-
var
|
|
139066
|
-
|
|
139067
|
-
location =
|
|
139068
|
-
setLocation =
|
|
139069
|
-
(0,
|
|
139028
|
+
var isVisible = (0, import_react_native32.useVisibility)();
|
|
139029
|
+
var _ref43 = (0, import_react25.useState)(null),
|
|
139030
|
+
_ref44 = _slicedToArray(_ref43, 2),
|
|
139031
|
+
location = _ref44[0],
|
|
139032
|
+
setLocation = _ref44[1];
|
|
139033
|
+
(0, import_react25.useEffect)(() => {
|
|
139070
139034
|
if (!isVisible) {
|
|
139071
139035
|
return;
|
|
139072
139036
|
}
|
|
139073
|
-
return (0,
|
|
139037
|
+
return (0, import_native_modules16.startUpdateLocation)({
|
|
139074
139038
|
options: {
|
|
139075
139039
|
accuracy,
|
|
139076
139040
|
distanceInterval,
|
|
@@ -139082,18 +139046,18 @@ __d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, e
|
|
|
139082
139046
|
}, [accuracy, distanceInterval, timeInterval, isVisible]);
|
|
139083
139047
|
return location;
|
|
139084
139048
|
}
|
|
139085
|
-
var
|
|
139086
|
-
var
|
|
139049
|
+
var import_react_native33 = _$$_REQUIRE(_dependencyMap[6], "@granite-js/react-native");
|
|
139050
|
+
var import_react26 = _$$_REQUIRE(_dependencyMap[9], "react");
|
|
139087
139051
|
function useWaitForReturnNavigator() {
|
|
139088
|
-
var callbacks = (0,
|
|
139089
|
-
var navigation = (0,
|
|
139090
|
-
var startNavigating = (0,
|
|
139052
|
+
var callbacks = (0, import_react26.useRef)([]).current;
|
|
139053
|
+
var navigation = (0, import_react_native33.useNavigation)();
|
|
139054
|
+
var startNavigating = (0, import_react26.useCallback)((route, params) => {
|
|
139091
139055
|
return new Promise(resolve => {
|
|
139092
139056
|
callbacks.push(resolve);
|
|
139093
139057
|
navigation.navigate(route, params);
|
|
139094
139058
|
});
|
|
139095
139059
|
}, [callbacks, navigation]);
|
|
139096
|
-
var handleVisibilityChange = (0,
|
|
139060
|
+
var handleVisibilityChange = (0, import_react26.useCallback)(state => {
|
|
139097
139061
|
if (state === "visible" && callbacks.length > 0) {
|
|
139098
139062
|
for (var callback of callbacks) {
|
|
139099
139063
|
callback();
|
|
@@ -139101,7 +139065,7 @@ __d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, e
|
|
|
139101
139065
|
callbacks.splice(0, callbacks.length);
|
|
139102
139066
|
}
|
|
139103
139067
|
}, [callbacks]);
|
|
139104
|
-
(0,
|
|
139068
|
+
(0, import_react_native33.useVisibilityChange)(handleVisibilityChange);
|
|
139105
139069
|
return startNavigating;
|
|
139106
139070
|
}
|
|
139107
139071
|
function useTopNavigation() {
|
|
@@ -139113,8 +139077,8 @@ __d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, e
|
|
|
139113
139077
|
removeAccessoryButton: removeNavigationRightButton
|
|
139114
139078
|
};
|
|
139115
139079
|
}
|
|
139116
|
-
var
|
|
139117
|
-
var
|
|
139080
|
+
var import_native_modules17 = _$$_REQUIRE(_dependencyMap[5], "@apps-in-toss/native-modules");
|
|
139081
|
+
var import_react_native34 = _$$_REQUIRE(_dependencyMap[6], "@granite-js/react-native");
|
|
139118
139082
|
var import_tds_react_native14 = _$$_REQUIRE(_dependencyMap[7], "@toss/tds-react-native");
|
|
139119
139083
|
function useHandleWebViewProcessDidTerminate(webViewRef) {
|
|
139120
139084
|
var toast = (0, import_tds_react_native14.useToast)();
|
|
@@ -139143,18 +139107,20 @@ __d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, e
|
|
|
139143
139107
|
log_type: "debug",
|
|
139144
139108
|
params: {
|
|
139145
139109
|
...params,
|
|
139146
|
-
app_name:
|
|
139110
|
+
app_name: import_react_native34.Granite.appName,
|
|
139147
139111
|
deployment_id: global2.deploymentId
|
|
139148
139112
|
}
|
|
139149
139113
|
};
|
|
139150
|
-
if ((0,
|
|
139151
|
-
|
|
139114
|
+
if ((0, import_native_modules17.getOperationalEnvironment)() === "toss") {
|
|
139115
|
+
sendLog(event, {
|
|
139116
|
+
pipelines: ["core"]
|
|
139117
|
+
});
|
|
139152
139118
|
} else {
|
|
139153
139119
|
console.log("[webViewDebugLog]", event);
|
|
139154
139120
|
}
|
|
139155
139121
|
}
|
|
139156
|
-
var
|
|
139157
|
-
var
|
|
139122
|
+
var import_native_modules18 = _$$_REQUIRE(_dependencyMap[5], "@apps-in-toss/native-modules");
|
|
139123
|
+
var import_react_native35 = _$$_REQUIRE(_dependencyMap[6], "@granite-js/react-native");
|
|
139158
139124
|
var extractDateFromUUIDv7 = uuid => {
|
|
139159
139125
|
var timestampHex = uuid.split("-").join("").slice(0, 12);
|
|
139160
139126
|
var timestamp = Number.parseInt(timestampHex, 16);
|
|
@@ -139176,7 +139142,7 @@ __d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, e
|
|
|
139176
139142
|
};
|
|
139177
139143
|
var getReferrer2 = () => {
|
|
139178
139144
|
try {
|
|
139179
|
-
var referrer = new URL((0,
|
|
139145
|
+
var referrer = new URL((0, import_react_native35.getSchemeUri)());
|
|
139180
139146
|
return referrer.searchParams.get("referrer");
|
|
139181
139147
|
} catch {
|
|
139182
139148
|
return "";
|
|
@@ -139197,7 +139163,7 @@ __d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, e
|
|
|
139197
139163
|
deployment_timestamp: extractDateFromUUIDv7(env.getDeploymentId()).getTime()
|
|
139198
139164
|
}
|
|
139199
139165
|
};
|
|
139200
|
-
return (0,
|
|
139166
|
+
return (0, import_native_modules18.eventLog)(log);
|
|
139201
139167
|
};
|
|
139202
139168
|
var import_jsx_runtime19 = _$$_REQUIRE(_dependencyMap[10], "react/jsx-runtime");
|
|
139203
139169
|
var operationalEnvironment = appsInTossConstantBridges.getOperationalEnvironment();
|
|
@@ -139209,18 +139175,18 @@ __d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, e
|
|
|
139209
139175
|
};
|
|
139210
139176
|
function mergeSchemeQueryParamsInto(url) {
|
|
139211
139177
|
var baseUrl = new URL(url);
|
|
139212
|
-
var schemeUrl = new URL((0,
|
|
139178
|
+
var schemeUrl = new URL((0, import_react_native36.getSchemeUri)());
|
|
139213
139179
|
var resultUrl = new URL(schemeUrl.pathname, baseUrl.origin);
|
|
139214
|
-
for (var
|
|
139215
|
-
var
|
|
139216
|
-
var key =
|
|
139217
|
-
var value =
|
|
139180
|
+
for (var _ref45 of baseUrl.searchParams.entries()) {
|
|
139181
|
+
var _ref46 = _slicedToArray(_ref45, 2);
|
|
139182
|
+
var key = _ref46[0];
|
|
139183
|
+
var value = _ref46[1];
|
|
139218
139184
|
resultUrl.searchParams.set(key, value);
|
|
139219
139185
|
}
|
|
139220
|
-
for (var
|
|
139221
|
-
var
|
|
139222
|
-
var _key =
|
|
139223
|
-
var _value =
|
|
139186
|
+
for (var _ref47 of schemeUrl.searchParams.entries()) {
|
|
139187
|
+
var _ref48 = _slicedToArray(_ref47, 2);
|
|
139188
|
+
var _key = _ref48[0];
|
|
139189
|
+
var _value = _ref48[1];
|
|
139224
139190
|
resultUrl.searchParams.set(_key, _value);
|
|
139225
139191
|
}
|
|
139226
139192
|
return resultUrl;
|
|
@@ -139230,8 +139196,8 @@ __d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, e
|
|
|
139230
139196
|
var devUrl = `http://${local.host}:${local.port}`;
|
|
139231
139197
|
return mergeSchemeQueryParamsInto(devUrl);
|
|
139232
139198
|
}
|
|
139233
|
-
var
|
|
139234
|
-
rawUrl =
|
|
139199
|
+
var _ref49 = (0, import_native_modules19.safeSyncPostMessage)("getWebBundleURL", {}),
|
|
139200
|
+
rawUrl = _ref49.url;
|
|
139235
139201
|
var url = mergeSchemeQueryParamsInto(rawUrl);
|
|
139236
139202
|
var deploymentId = env.getDeploymentId();
|
|
139237
139203
|
if (deploymentId) {
|
|
@@ -139248,8 +139214,8 @@ __d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, e
|
|
|
139248
139214
|
if (!TYPES.includes(type)) {
|
|
139249
139215
|
throw new Error(`Invalid WebView type: '${type}'`);
|
|
139250
139216
|
}
|
|
139251
|
-
var webViewRef = (0,
|
|
139252
|
-
var url = (0,
|
|
139217
|
+
var webViewRef = (0, import_react27.useRef)(null);
|
|
139218
|
+
var url = (0, import_react27.useMemo)(() => getWebViewURL(local), [local]);
|
|
139253
139219
|
var webBackHandler = useWebBackHandler(url, webViewRef);
|
|
139254
139220
|
var top = (0, import_private9.useSafeAreaTop)();
|
|
139255
139221
|
var bottom = (0, import_private9.useSafeAreaBottom)();
|
|
@@ -139257,10 +139223,10 @@ __d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, e
|
|
|
139257
139223
|
var global2 = getAppsInTossGlobals();
|
|
139258
139224
|
var navigationBarContext = useNavigationBarContext();
|
|
139259
139225
|
var safeAreaInsetsEvent = useSafeAreaInsetsEvent();
|
|
139260
|
-
var
|
|
139261
|
-
|
|
139262
|
-
allowsBackForwardNavigationGestures =
|
|
139263
|
-
setAllowsBackForwardNavigationGestures =
|
|
139226
|
+
var _ref50 = (0, import_react27.useState)(props.allowsBackForwardNavigationGestures),
|
|
139227
|
+
_ref51 = _slicedToArray(_ref50, 2),
|
|
139228
|
+
allowsBackForwardNavigationGestures = _ref51[0],
|
|
139229
|
+
setAllowsBackForwardNavigationGestures = _ref51[1];
|
|
139264
139230
|
var handler = useBridgeHandler({
|
|
139265
139231
|
onMessage,
|
|
139266
139232
|
eventListenerMap: {
|
|
@@ -139287,7 +139253,7 @@ __d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, e
|
|
|
139287
139253
|
onEvent,
|
|
139288
139254
|
onError,
|
|
139289
139255
|
options
|
|
139290
|
-
}) =>
|
|
139256
|
+
}) => import_native_modules19.appsInTossEvent.addEventListener("updateLocationEvent", {
|
|
139291
139257
|
onEvent,
|
|
139292
139258
|
onError,
|
|
139293
139259
|
options
|
|
@@ -139299,19 +139265,19 @@ __d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, e
|
|
|
139299
139265
|
onEvent,
|
|
139300
139266
|
onError,
|
|
139301
139267
|
options
|
|
139302
|
-
}) =>
|
|
139268
|
+
}) => import_native_modules19.appsInTossEvent.addEventListener("appBridgeCallbackEvent", {
|
|
139303
139269
|
onEvent,
|
|
139304
139270
|
onError,
|
|
139305
139271
|
options
|
|
139306
139272
|
}),
|
|
139307
|
-
loadAppsInTossAdMob:
|
|
139308
|
-
showAppsInTossAdMob:
|
|
139273
|
+
loadAppsInTossAdMob: import_native_modules19.GoogleAdMob.loadAppsInTossAdMob,
|
|
139274
|
+
showAppsInTossAdMob: import_native_modules19.GoogleAdMob.showAppsInTossAdMob,
|
|
139309
139275
|
loadFullScreenAd: loadFullScreenAdForWeb,
|
|
139310
139276
|
showFullScreenAd,
|
|
139311
139277
|
fetchTossAd,
|
|
139312
|
-
iapCreateOneTimePurchaseOrder:
|
|
139313
|
-
requestSubscriptionPurchase:
|
|
139314
|
-
requestOneTimePurchase:
|
|
139278
|
+
iapCreateOneTimePurchaseOrder: import_native_modules19.IAP.createOneTimePurchaseOrder,
|
|
139279
|
+
requestSubscriptionPurchase: import_native_modules19.IAP.createSubscriptionPurchaseOrder,
|
|
139280
|
+
requestOneTimePurchase: import_native_modules19.requestOneTimePurchase
|
|
139315
139281
|
},
|
|
139316
139282
|
constantHandlerMap: {
|
|
139317
139283
|
...appsInTossConstantBridges,
|
|
@@ -139322,11 +139288,11 @@ __d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, e
|
|
|
139322
139288
|
right: insets.right
|
|
139323
139289
|
}),
|
|
139324
139290
|
...Object.fromEntries(Object.entries(global2).map(([key, value]) => [key, () => value])),
|
|
139325
|
-
getServerTime_isSupported:
|
|
139326
|
-
requestReview_isSupported:
|
|
139327
|
-
loadAppsInTossAdMob_isSupported:
|
|
139328
|
-
showAppsInTossAdMob_isSupported:
|
|
139329
|
-
isAppsInTossAdMobLoaded_isSupported:
|
|
139291
|
+
getServerTime_isSupported: import_native_modules19.getServerTime.isSupported,
|
|
139292
|
+
requestReview_isSupported: import_native_modules19.requestReview.isSupported,
|
|
139293
|
+
loadAppsInTossAdMob_isSupported: import_native_modules19.GoogleAdMob.loadAppsInTossAdMob.isSupported,
|
|
139294
|
+
showAppsInTossAdMob_isSupported: import_native_modules19.GoogleAdMob.showAppsInTossAdMob.isSupported,
|
|
139295
|
+
isAppsInTossAdMobLoaded_isSupported: import_native_modules19.GoogleAdMob.isAppsInTossAdMobLoaded.isSupported,
|
|
139330
139296
|
loadFullScreenAd_isSupported: loadFullScreenAdForWeb.isSupported,
|
|
139331
139297
|
showFullScreenAd_isSupported: showFullScreenAd.isSupported,
|
|
139332
139298
|
fetchTossAd_isSupported: fetchTossAd.isSupported,
|
|
@@ -139336,25 +139302,25 @@ __d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, e
|
|
|
139336
139302
|
},
|
|
139337
139303
|
asyncHandlerMap: {
|
|
139338
139304
|
...appsInTossAsyncBridges,
|
|
139339
|
-
getServerTime:
|
|
139305
|
+
getServerTime: import_native_modules19.getServerTime,
|
|
139340
139306
|
setIosSwipeGestureEnabled: options => {
|
|
139341
139307
|
setAllowsBackForwardNavigationGestures(options.isEnabled);
|
|
139342
139308
|
return appsInTossAsyncBridges.setIosSwipeGestureEnabled(options);
|
|
139343
139309
|
},
|
|
139344
139310
|
addAccessoryButton: function () {
|
|
139345
|
-
var
|
|
139311
|
+
var _ref52 = _asyncToGenerator(function* (params) {
|
|
139346
139312
|
return navigationBarContext.addNavigationRightButton(params);
|
|
139347
139313
|
});
|
|
139348
139314
|
return function addAccessoryButton(_x7) {
|
|
139349
|
-
return
|
|
139315
|
+
return _ref52.apply(this, arguments);
|
|
139350
139316
|
};
|
|
139351
139317
|
}(),
|
|
139352
139318
|
removeAccessoryButton: function () {
|
|
139353
|
-
var
|
|
139319
|
+
var _ref53 = _asyncToGenerator(function* () {
|
|
139354
139320
|
return navigationBarContext.removeNavigationRightButton();
|
|
139355
139321
|
});
|
|
139356
139322
|
return function removeAccessoryButton() {
|
|
139357
|
-
return
|
|
139323
|
+
return _ref53.apply(this, arguments);
|
|
139358
139324
|
};
|
|
139359
139325
|
}(),
|
|
139360
139326
|
requestPermission: appsInTossAsyncBridges.requestPermission,
|
|
@@ -139366,32 +139332,31 @@ __d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, e
|
|
|
139366
139332
|
fetchContacts: appsInTossAsyncBridges.fetchContacts,
|
|
139367
139333
|
getCurrentLocation: appsInTossAsyncBridges.getCurrentLocation,
|
|
139368
139334
|
openCamera: appsInTossAsyncBridges.openCamera,
|
|
139369
|
-
getStorageItem:
|
|
139370
|
-
setStorageItem:
|
|
139371
|
-
removeStorageItem:
|
|
139372
|
-
clearItems:
|
|
139373
|
-
iapGetProductItemList:
|
|
139374
|
-
iapCreateOneTimePurchaseOrder:
|
|
139375
|
-
processProductGrant:
|
|
139376
|
-
getPendingOrders:
|
|
139377
|
-
getCompletedOrRefundedOrders:
|
|
139378
|
-
completeProductGrant:
|
|
139379
|
-
getSubscriptionInfo:
|
|
139380
|
-
isAppsInTossAdMobLoaded:
|
|
139335
|
+
getStorageItem: import_native_modules19.Storage.getItem,
|
|
139336
|
+
setStorageItem: import_native_modules19.Storage.setItem,
|
|
139337
|
+
removeStorageItem: import_native_modules19.Storage.removeItem,
|
|
139338
|
+
clearItems: import_native_modules19.Storage.clearItems,
|
|
139339
|
+
iapGetProductItemList: import_native_modules19.IAP.getProductItemList,
|
|
139340
|
+
iapCreateOneTimePurchaseOrder: import_native_modules19.iapCreateOneTimePurchaseOrder,
|
|
139341
|
+
processProductGrant: import_native_modules19.processProductGrant,
|
|
139342
|
+
getPendingOrders: import_native_modules19.IAP.getPendingOrders,
|
|
139343
|
+
getCompletedOrRefundedOrders: import_native_modules19.IAP.getCompletedOrRefundedOrders,
|
|
139344
|
+
completeProductGrant: import_native_modules19.IAP.completeProductGrant,
|
|
139345
|
+
getSubscriptionInfo: import_native_modules19.IAP.getSubscriptionInfo,
|
|
139346
|
+
isAppsInTossAdMobLoaded: import_native_modules19.GoogleAdMob.isAppsInTossAdMobLoaded,
|
|
139381
139347
|
tossAdEventLog,
|
|
139382
139348
|
memoryDebugLog: webViewMemoryDebugLog,
|
|
139383
139349
|
debugLog: function () {
|
|
139384
|
-
var
|
|
139385
|
-
(
|
|
139386
|
-
import_native_modules24.INTERNAL__module.tossCoreEventLog(event);
|
|
139350
|
+
var _ref54 = _asyncToGenerator(function* (event) {
|
|
139351
|
+
sendLog(event);
|
|
139387
139352
|
});
|
|
139388
139353
|
return function debugLog(_x8) {
|
|
139389
|
-
return
|
|
139354
|
+
return _ref54.apply(this, arguments);
|
|
139390
139355
|
};
|
|
139391
139356
|
}()
|
|
139392
139357
|
}
|
|
139393
139358
|
});
|
|
139394
|
-
var headerPropForExternalWebView = (0,
|
|
139359
|
+
var headerPropForExternalWebView = (0, import_react27.useMemo)(() => {
|
|
139395
139360
|
var parsedNavigationBar = global2.navigationBar != null ? safeParseNavigationBar(global2.navigationBar) : null;
|
|
139396
139361
|
var initialAccessoryButton = parsedNavigationBar?.initialAccessoryButton;
|
|
139397
139362
|
var withBackButton = parsedNavigationBar?.withBackButton ?? true;
|
|
@@ -139412,12 +139377,12 @@ __d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, e
|
|
|
139412
139377
|
colorPreference: "light"
|
|
139413
139378
|
});
|
|
139414
139379
|
var refs = mergeRefs(handler.ref, webViewRef);
|
|
139415
|
-
(0,
|
|
139380
|
+
(0, import_react27.useEffect)(() => {
|
|
139416
139381
|
var callback = () => {
|
|
139417
139382
|
webBackHandler.handleWebBack();
|
|
139418
139383
|
return true;
|
|
139419
139384
|
};
|
|
139420
|
-
var subscription =
|
|
139385
|
+
var subscription = import_react_native37.BackHandler.addEventListener("hardwareBackPress", callback);
|
|
139421
139386
|
return () => subscription.remove();
|
|
139422
139387
|
}, [webBackHandler]);
|
|
139423
139388
|
var handleWebViewProcessDidTerminate = useHandleWebViewProcessDidTerminate(webViewRef);
|
|
@@ -139441,14 +139406,14 @@ __d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, e
|
|
|
139441
139406
|
webBackHandler.onNavigationStateChange(event);
|
|
139442
139407
|
},
|
|
139443
139408
|
textZoom: 100,
|
|
139444
|
-
userAgent:
|
|
139409
|
+
userAgent: import_react_native37.Platform.OS === "ios" ? userAgent : void 0,
|
|
139445
139410
|
sharedCookiesEnabled: true,
|
|
139446
139411
|
webviewDebuggingEnabled: webViewDebuggingEnabled,
|
|
139447
139412
|
thirdPartyCookiesEnabled: true,
|
|
139448
139413
|
onMessage: handler.onMessage,
|
|
139449
139414
|
injectedJavaScript: import_user_scripts.afterDocumentLoad,
|
|
139450
139415
|
injectedJavaScriptBeforeContentLoaded: [handler.injectedJavaScript, import_user_scripts.beforeDocumentLoad].join("\n"),
|
|
139451
|
-
decelerationRate:
|
|
139416
|
+
decelerationRate: import_react_native37.Platform.OS === "ios" ? 1 : void 0,
|
|
139452
139417
|
allowsBackForwardNavigationGestures,
|
|
139453
139418
|
onShouldStartLoadWithRequest: event => {
|
|
139454
139419
|
try {
|
|
@@ -139456,7 +139421,7 @@ __d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, e
|
|
|
139456
139421
|
if (["https:", "http:"].includes(url2.protocol) || url2.href === "about:blank") {
|
|
139457
139422
|
return true;
|
|
139458
139423
|
} else {
|
|
139459
|
-
|
|
139424
|
+
import_react_native37.Linking.openURL(convertIntentURL(url2) ?? url2.href);
|
|
139460
139425
|
return false;
|
|
139461
139426
|
}
|
|
139462
139427
|
} catch (error) {
|
|
@@ -139474,9 +139439,9 @@ __d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, e
|
|
|
139474
139439
|
__reExport(src_exports, _$$_REQUIRE(_dependencyMap[5], "@apps-in-toss/native-modules"), module.exports);
|
|
139475
139440
|
__reExport(src_exports, _$$_REQUIRE(_dependencyMap[19], "@apps-in-toss/types"), module.exports);
|
|
139476
139441
|
var import_types = _$$_REQUIRE(_dependencyMap[19], "@apps-in-toss/types");
|
|
139477
|
-
var
|
|
139478
|
-
var
|
|
139479
|
-
var
|
|
139442
|
+
var import_react_native41 = _$$_REQUIRE(_dependencyMap[6], "@granite-js/react-native");
|
|
139443
|
+
var import_react30 = _$$_REQUIRE(_dependencyMap[9], "react");
|
|
139444
|
+
var import_react_native42 = _$$_REQUIRE(_dependencyMap[8], "react-native");
|
|
139480
139445
|
var SDK_ID = "106";
|
|
139481
139446
|
var LIST_BANNER_STYLE_ID = "1";
|
|
139482
139447
|
var NATIVE_IMAGE_STYLE_ID = "2";
|
|
@@ -139667,10 +139632,11 @@ __d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, e
|
|
|
139667
139632
|
}
|
|
139668
139633
|
function _loadAd() {
|
|
139669
139634
|
_loadAd = _asyncToGenerator(function* (adGroupId) {
|
|
139670
|
-
|
|
139635
|
+
var normalizedAdGroupId = normalizeAdGroupId(adGroupId);
|
|
139636
|
+
if (normalizedAdGroupId.length === 0) {
|
|
139671
139637
|
return {
|
|
139672
139638
|
type: "error",
|
|
139673
|
-
error: createError(ERROR_CODES.INVALID_SPACE,
|
|
139639
|
+
error: createError(ERROR_CODES.INVALID_SPACE, INVALID_AD_GROUP_ID_ERROR_MESSAGE)
|
|
139674
139640
|
};
|
|
139675
139641
|
}
|
|
139676
139642
|
if (!fetchTossAd.isSupported()) {
|
|
@@ -139682,7 +139648,7 @@ __d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, e
|
|
|
139682
139648
|
var response;
|
|
139683
139649
|
try {
|
|
139684
139650
|
var raw = yield fetchTossAdPromise({
|
|
139685
|
-
adGroupId,
|
|
139651
|
+
adGroupId: normalizedAdGroupId,
|
|
139686
139652
|
sdkId: SDK_ID,
|
|
139687
139653
|
availableStyleIds: AVAILABLE_STYLE_IDS
|
|
139688
139654
|
});
|
|
@@ -139753,7 +139719,7 @@ __d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, e
|
|
|
139753
139719
|
});
|
|
139754
139720
|
return _loadAd.apply(this, arguments);
|
|
139755
139721
|
}
|
|
139756
|
-
var
|
|
139722
|
+
var import_react_native38 = _$$_REQUIRE(_dependencyMap[6], "@granite-js/react-native");
|
|
139757
139723
|
function isSafeUrl(url) {
|
|
139758
139724
|
try {
|
|
139759
139725
|
var parsed = new URL(url);
|
|
@@ -139769,7 +139735,7 @@ __d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, e
|
|
|
139769
139735
|
return;
|
|
139770
139736
|
}
|
|
139771
139737
|
try {
|
|
139772
|
-
(0,
|
|
139738
|
+
(0, import_react_native38.openURL)(getWebSchemeOrUri(url));
|
|
139773
139739
|
} catch (error) {
|
|
139774
139740
|
console.error("[InlineAd] Failed to open landing URL:", error);
|
|
139775
139741
|
}
|
|
@@ -139877,8 +139843,8 @@ __d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, e
|
|
|
139877
139843
|
}]);
|
|
139878
139844
|
}();
|
|
139879
139845
|
var import_react_native_svg = _$$_REQUIRE(_dependencyMap[20], "@granite-js/native/react-native-svg");
|
|
139880
|
-
var
|
|
139881
|
-
var
|
|
139846
|
+
var import_react28 = _$$_REQUIRE(_dependencyMap[9], "react");
|
|
139847
|
+
var import_react_native39 = _$$_REQUIRE(_dependencyMap[8], "react-native");
|
|
139882
139848
|
var import_jsx_runtime20 = _$$_REQUIRE(_dependencyMap[10], "react/jsx-runtime");
|
|
139883
139849
|
var ARROW_PATH = "m7.5 20.4c-.5-.5-.5-1.2 0-1.7l6.7-6.7-6.8-6.7c-.5-.5-.5-1.2 0-1.7s1.2-.5 1.7 0l7.5 7.5c.5.5.5 1.2 0 1.7l-7.5 7.5c-.2.3-.5.4-.8.4s-.6-.1-.8-.3z";
|
|
139884
139850
|
function FeedBannerAdView({
|
|
@@ -139896,12 +139862,12 @@ __d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, e
|
|
|
139896
139862
|
paddingStyle,
|
|
139897
139863
|
onPress
|
|
139898
139864
|
}) {
|
|
139899
|
-
var scale = (0,
|
|
139865
|
+
var scale = (0, import_react28.useRef)(new import_react_native39.Animated.Value(1)).current;
|
|
139900
139866
|
var animateScale = toValue => {
|
|
139901
|
-
|
|
139867
|
+
import_react_native39.Animated.timing(scale, {
|
|
139902
139868
|
toValue,
|
|
139903
139869
|
duration: 100,
|
|
139904
|
-
easing:
|
|
139870
|
+
easing: import_react_native39.Easing.inOut(import_react_native39.Easing.ease),
|
|
139905
139871
|
useNativeDriver: true
|
|
139906
139872
|
}).start();
|
|
139907
139873
|
};
|
|
@@ -139913,52 +139879,52 @@ __d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, e
|
|
|
139913
139879
|
};
|
|
139914
139880
|
var resolvedCtaBackground = ctaBackgroundColor ?? "#3081F9";
|
|
139915
139881
|
var resolvedCtaTextColor = ctaTextColor ?? "#ffffff";
|
|
139916
|
-
return (0, import_jsx_runtime20.jsx)(
|
|
139882
|
+
return (0, import_jsx_runtime20.jsx)(import_react_native39.Pressable, {
|
|
139917
139883
|
accessibilityRole: "button",
|
|
139918
139884
|
onPress: () => onPress(null),
|
|
139919
139885
|
onPressIn: handlePressIn,
|
|
139920
139886
|
onPressOut: handlePressOut,
|
|
139921
139887
|
style: styles.pressable,
|
|
139922
|
-
children: (0, import_jsx_runtime20.jsxs)(
|
|
139888
|
+
children: (0, import_jsx_runtime20.jsxs)(import_react_native39.Animated.View, {
|
|
139923
139889
|
style: [styles.container, paddingStyle, {
|
|
139924
139890
|
transform: [{
|
|
139925
139891
|
scale
|
|
139926
139892
|
}]
|
|
139927
139893
|
}],
|
|
139928
|
-
children: [(0, import_jsx_runtime20.jsxs)(
|
|
139894
|
+
children: [(0, import_jsx_runtime20.jsxs)(import_react_native39.View, {
|
|
139929
139895
|
style: styles.profileContainer,
|
|
139930
|
-
children: [(0, import_jsx_runtime20.jsxs)(
|
|
139896
|
+
children: [(0, import_jsx_runtime20.jsxs)(import_react_native39.View, {
|
|
139931
139897
|
style: styles.brandArea,
|
|
139932
|
-
children: [(0, import_jsx_runtime20.jsx)(
|
|
139898
|
+
children: [(0, import_jsx_runtime20.jsx)(import_react_native39.Pressable, {
|
|
139933
139899
|
accessibilityRole: "button",
|
|
139934
139900
|
onPress: () => onPress("202"),
|
|
139935
139901
|
onPressIn: handlePressIn,
|
|
139936
139902
|
onPressOut: handlePressOut,
|
|
139937
139903
|
style: styles.logoContainer,
|
|
139938
|
-
children: (0, import_jsx_runtime20.jsxs)(
|
|
139904
|
+
children: (0, import_jsx_runtime20.jsxs)(import_react_native39.View, {
|
|
139939
139905
|
style: [styles.logoWrapper, {
|
|
139940
139906
|
backgroundColor: colors.brandLogoBg
|
|
139941
139907
|
}],
|
|
139942
|
-
children: [brandLogoUri ? (0, import_jsx_runtime20.jsx)(
|
|
139908
|
+
children: [brandLogoUri ? (0, import_jsx_runtime20.jsx)(import_react_native39.Image, {
|
|
139943
139909
|
source: {
|
|
139944
139910
|
uri: brandLogoUri
|
|
139945
139911
|
},
|
|
139946
139912
|
style: styles.logoImage,
|
|
139947
139913
|
resizeMode: "cover"
|
|
139948
|
-
}) : null, (0, import_jsx_runtime20.jsx)(
|
|
139914
|
+
}) : null, (0, import_jsx_runtime20.jsx)(import_react_native39.View, {
|
|
139949
139915
|
style: [styles.logoOverlay, {
|
|
139950
139916
|
borderColor: colors.brandLogoBorder
|
|
139951
139917
|
}]
|
|
139952
139918
|
})]
|
|
139953
139919
|
})
|
|
139954
|
-
}), (0, import_jsx_runtime20.jsxs)(
|
|
139920
|
+
}), (0, import_jsx_runtime20.jsxs)(import_react_native39.View, {
|
|
139955
139921
|
style: styles.brandTextContainer,
|
|
139956
|
-
children: [(0, import_jsx_runtime20.jsx)(
|
|
139922
|
+
children: [(0, import_jsx_runtime20.jsx)(import_react_native39.Pressable, {
|
|
139957
139923
|
accessibilityRole: "button",
|
|
139958
139924
|
onPress: () => onPress("103"),
|
|
139959
139925
|
onPressIn: handlePressIn,
|
|
139960
139926
|
onPressOut: handlePressOut,
|
|
139961
|
-
children: (0, import_jsx_runtime20.jsx)(
|
|
139927
|
+
children: (0, import_jsx_runtime20.jsx)(import_react_native39.Text, {
|
|
139962
139928
|
allowFontScaling: false,
|
|
139963
139929
|
numberOfLines: 1,
|
|
139964
139930
|
style: [styles.brandName, {
|
|
@@ -139966,7 +139932,7 @@ __d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, e
|
|
|
139966
139932
|
}],
|
|
139967
139933
|
children: brandName
|
|
139968
139934
|
})
|
|
139969
|
-
}), isAdBadgeEnabled ? (0, import_jsx_runtime20.jsx)(
|
|
139935
|
+
}), isAdBadgeEnabled ? (0, import_jsx_runtime20.jsx)(import_react_native39.Text, {
|
|
139970
139936
|
allowFontScaling: false,
|
|
139971
139937
|
numberOfLines: 1,
|
|
139972
139938
|
style: [styles.adBadge, {
|
|
@@ -139975,26 +139941,26 @@ __d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, e
|
|
|
139975
139941
|
children: "\uAD11\uACE0"
|
|
139976
139942
|
}) : null]
|
|
139977
139943
|
})]
|
|
139978
|
-
}), (0, import_jsx_runtime20.jsxs)(
|
|
139944
|
+
}), (0, import_jsx_runtime20.jsxs)(import_react_native39.View, {
|
|
139979
139945
|
style: styles.textArea,
|
|
139980
|
-
children: [(0, import_jsx_runtime20.jsx)(
|
|
139946
|
+
children: [(0, import_jsx_runtime20.jsx)(import_react_native39.Pressable, {
|
|
139981
139947
|
accessibilityRole: "button",
|
|
139982
139948
|
onPress: () => onPress("101"),
|
|
139983
139949
|
onPressIn: handlePressIn,
|
|
139984
139950
|
onPressOut: handlePressOut,
|
|
139985
|
-
children: (0, import_jsx_runtime20.jsx)(
|
|
139951
|
+
children: (0, import_jsx_runtime20.jsx)(import_react_native39.Text, {
|
|
139986
139952
|
allowFontScaling: false,
|
|
139987
139953
|
style: [styles.title, {
|
|
139988
139954
|
color: colors.title
|
|
139989
139955
|
}],
|
|
139990
139956
|
children: title
|
|
139991
139957
|
})
|
|
139992
|
-
}), (0, import_jsx_runtime20.jsx)(
|
|
139958
|
+
}), (0, import_jsx_runtime20.jsx)(import_react_native39.Pressable, {
|
|
139993
139959
|
accessibilityRole: "button",
|
|
139994
139960
|
onPress: () => onPress("102"),
|
|
139995
139961
|
onPressIn: handlePressIn,
|
|
139996
139962
|
onPressOut: handlePressOut,
|
|
139997
|
-
children: (0, import_jsx_runtime20.jsx)(
|
|
139963
|
+
children: (0, import_jsx_runtime20.jsx)(import_react_native39.Text, {
|
|
139998
139964
|
allowFontScaling: false,
|
|
139999
139965
|
style: [styles.subtitle, {
|
|
140000
139966
|
color: colors.subtitle
|
|
@@ -140003,17 +139969,17 @@ __d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, e
|
|
|
140003
139969
|
})
|
|
140004
139970
|
})]
|
|
140005
139971
|
})]
|
|
140006
|
-
}), (0, import_jsx_runtime20.jsxs)(
|
|
139972
|
+
}), (0, import_jsx_runtime20.jsxs)(import_react_native39.View, {
|
|
140007
139973
|
style: styles.card,
|
|
140008
|
-
children: [(0, import_jsx_runtime20.jsx)(
|
|
139974
|
+
children: [(0, import_jsx_runtime20.jsx)(import_react_native39.Pressable, {
|
|
140009
139975
|
accessibilityRole: "button",
|
|
140010
139976
|
onPress: () => onPress("201"),
|
|
140011
139977
|
onPressIn: handlePressIn,
|
|
140012
139978
|
onPressOut: handlePressOut,
|
|
140013
139979
|
style: styles.imageButton,
|
|
140014
|
-
children: (0, import_jsx_runtime20.jsx)(
|
|
139980
|
+
children: (0, import_jsx_runtime20.jsx)(import_react_native39.View, {
|
|
140015
139981
|
style: styles.imageContainer,
|
|
140016
|
-
children: mainImageUri ? (0, import_jsx_runtime20.jsx)(
|
|
139982
|
+
children: mainImageUri ? (0, import_jsx_runtime20.jsx)(import_react_native39.Image, {
|
|
140017
139983
|
source: {
|
|
140018
139984
|
uri: mainImageUri
|
|
140019
139985
|
},
|
|
@@ -140021,7 +139987,7 @@ __d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, e
|
|
|
140021
139987
|
resizeMode: "cover"
|
|
140022
139988
|
}) : null
|
|
140023
139989
|
})
|
|
140024
|
-
}), (0, import_jsx_runtime20.jsxs)(
|
|
139990
|
+
}), (0, import_jsx_runtime20.jsxs)(import_react_native39.Pressable, {
|
|
140025
139991
|
accessibilityRole: "button",
|
|
140026
139992
|
onPress: () => onPress("0"),
|
|
140027
139993
|
onPressIn: handlePressIn,
|
|
@@ -140029,7 +139995,7 @@ __d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, e
|
|
|
140029
139995
|
style: [styles.cta, {
|
|
140030
139996
|
backgroundColor: resolvedCtaBackground
|
|
140031
139997
|
}],
|
|
140032
|
-
children: [(0, import_jsx_runtime20.jsx)(
|
|
139998
|
+
children: [(0, import_jsx_runtime20.jsx)(import_react_native39.Text, {
|
|
140033
139999
|
allowFontScaling: false,
|
|
140034
140000
|
style: [styles.ctaText, {
|
|
140035
140001
|
color: resolvedCtaTextColor
|
|
@@ -140044,12 +140010,12 @@ __d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, e
|
|
|
140044
140010
|
fill: resolvedCtaTextColor
|
|
140045
140011
|
})
|
|
140046
140012
|
})]
|
|
140047
|
-
}), (0, import_jsx_runtime20.jsx)(
|
|
140013
|
+
}), (0, import_jsx_runtime20.jsx)(import_react_native39.View, {
|
|
140048
140014
|
style: [styles.cardOverlay, {
|
|
140049
140015
|
borderColor: colors.imageOverlayBorder
|
|
140050
140016
|
}]
|
|
140051
140017
|
})]
|
|
140052
|
-
}), adClearanceText ? (0, import_jsx_runtime20.jsx)(
|
|
140018
|
+
}), adClearanceText ? (0, import_jsx_runtime20.jsx)(import_react_native39.Text, {
|
|
140053
140019
|
allowFontScaling: false,
|
|
140054
140020
|
style: [styles.adClearance, {
|
|
140055
140021
|
color: colors.adClearance
|
|
@@ -140059,7 +140025,7 @@ __d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, e
|
|
|
140059
140025
|
})
|
|
140060
140026
|
});
|
|
140061
140027
|
}
|
|
140062
|
-
var styles =
|
|
140028
|
+
var styles = import_react_native39.StyleSheet.create({
|
|
140063
140029
|
pressable: {
|
|
140064
140030
|
width: "100%"
|
|
140065
140031
|
},
|
|
@@ -140098,7 +140064,7 @@ __d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, e
|
|
|
140098
140064
|
borderRadius: 18
|
|
140099
140065
|
},
|
|
140100
140066
|
logoOverlay: {
|
|
140101
|
-
...
|
|
140067
|
+
...import_react_native39.StyleSheet.absoluteFillObject,
|
|
140102
140068
|
borderWidth: 1,
|
|
140103
140069
|
borderRadius: 18
|
|
140104
140070
|
},
|
|
@@ -140161,7 +140127,7 @@ __d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, e
|
|
|
140161
140127
|
lineHeight: 22.5
|
|
140162
140128
|
},
|
|
140163
140129
|
cardOverlay: {
|
|
140164
|
-
...
|
|
140130
|
+
...import_react_native39.StyleSheet.absoluteFillObject,
|
|
140165
140131
|
borderWidth: 2,
|
|
140166
140132
|
borderRadius: 12,
|
|
140167
140133
|
pointerEvents: "none"
|
|
@@ -140173,8 +140139,8 @@ __d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, e
|
|
|
140173
140139
|
}
|
|
140174
140140
|
});
|
|
140175
140141
|
var import_react_native_svg2 = _$$_REQUIRE(_dependencyMap[20], "@granite-js/native/react-native-svg");
|
|
140176
|
-
var
|
|
140177
|
-
var
|
|
140142
|
+
var import_react29 = _$$_REQUIRE(_dependencyMap[9], "react");
|
|
140143
|
+
var import_react_native40 = _$$_REQUIRE(_dependencyMap[8], "react-native");
|
|
140178
140144
|
var import_jsx_runtime21 = _$$_REQUIRE(_dependencyMap[10], "react/jsx-runtime");
|
|
140179
140145
|
var SQUIRCLE_PATH = "M0 17.352C0 3.564 3.564 0 17.352 0H18.648C32.436 0 36 3.564 36 17.352V18.648C36 32.436 32.436 36 18.648 36H17.352C3.564 36 0 32.436 0 18.648V17.352Z";
|
|
140180
140146
|
function ListBannerAdView({
|
|
@@ -140187,13 +140153,13 @@ __d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, e
|
|
|
140187
140153
|
colors,
|
|
140188
140154
|
onPress
|
|
140189
140155
|
}) {
|
|
140190
|
-
var scale = (0,
|
|
140191
|
-
var clipIdRef = (0,
|
|
140156
|
+
var scale = (0, import_react29.useRef)(new import_react_native40.Animated.Value(1)).current;
|
|
140157
|
+
var clipIdRef = (0, import_react29.useRef)(`clip-${Math.random().toString(36).slice(2)}`);
|
|
140192
140158
|
var animateScale = toValue => {
|
|
140193
|
-
|
|
140159
|
+
import_react_native40.Animated.timing(scale, {
|
|
140194
140160
|
toValue,
|
|
140195
140161
|
duration: 100,
|
|
140196
|
-
easing:
|
|
140162
|
+
easing: import_react_native40.Easing.inOut(import_react_native40.Easing.ease),
|
|
140197
140163
|
useNativeDriver: true
|
|
140198
140164
|
}).start();
|
|
140199
140165
|
};
|
|
@@ -140203,21 +140169,21 @@ __d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, e
|
|
|
140203
140169
|
var handlePressOut = () => {
|
|
140204
140170
|
animateScale(1);
|
|
140205
140171
|
};
|
|
140206
|
-
return (0, import_jsx_runtime21.jsx)(
|
|
140172
|
+
return (0, import_jsx_runtime21.jsx)(import_react_native40.Pressable, {
|
|
140207
140173
|
accessibilityRole: "button",
|
|
140208
140174
|
onPress: () => onPress(null),
|
|
140209
140175
|
onPressIn: handlePressIn,
|
|
140210
140176
|
onPressOut: handlePressOut,
|
|
140211
140177
|
style: styles2.pressable,
|
|
140212
|
-
children: (0, import_jsx_runtime21.jsxs)(
|
|
140178
|
+
children: (0, import_jsx_runtime21.jsxs)(import_react_native40.Animated.View, {
|
|
140213
140179
|
style: [styles2.container, paddingStyle, {
|
|
140214
140180
|
transform: [{
|
|
140215
140181
|
scale
|
|
140216
140182
|
}]
|
|
140217
140183
|
}],
|
|
140218
|
-
children: [(0, import_jsx_runtime21.jsxs)(
|
|
140184
|
+
children: [(0, import_jsx_runtime21.jsxs)(import_react_native40.View, {
|
|
140219
140185
|
style: styles2.titleRow,
|
|
140220
|
-
children: [(0, import_jsx_runtime21.jsx)(
|
|
140186
|
+
children: [(0, import_jsx_runtime21.jsx)(import_react_native40.Pressable, {
|
|
140221
140187
|
accessibilityRole: "button",
|
|
140222
140188
|
onPress: () => onPress("202"),
|
|
140223
140189
|
onPressIn: handlePressIn,
|
|
@@ -140253,26 +140219,26 @@ __d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, e
|
|
|
140253
140219
|
clipPath: `url(#${clipIdRef.current})`
|
|
140254
140220
|
})]
|
|
140255
140221
|
})
|
|
140256
|
-
}), (0, import_jsx_runtime21.jsxs)(
|
|
140222
|
+
}), (0, import_jsx_runtime21.jsxs)(import_react_native40.View, {
|
|
140257
140223
|
style: styles2.textWrapper,
|
|
140258
|
-
children: [(0, import_jsx_runtime21.jsx)(
|
|
140224
|
+
children: [(0, import_jsx_runtime21.jsx)(import_react_native40.Pressable, {
|
|
140259
140225
|
accessibilityRole: "button",
|
|
140260
140226
|
onPress: () => onPress("101"),
|
|
140261
140227
|
onPressIn: handlePressIn,
|
|
140262
140228
|
onPressOut: handlePressOut,
|
|
140263
|
-
children: (0, import_jsx_runtime21.jsx)(
|
|
140229
|
+
children: (0, import_jsx_runtime21.jsx)(import_react_native40.Text, {
|
|
140264
140230
|
allowFontScaling: false,
|
|
140265
140231
|
style: [styles2.title, {
|
|
140266
140232
|
color: colors.title
|
|
140267
140233
|
}],
|
|
140268
140234
|
children: title
|
|
140269
140235
|
})
|
|
140270
|
-
}), (0, import_jsx_runtime21.jsx)(
|
|
140236
|
+
}), (0, import_jsx_runtime21.jsx)(import_react_native40.Pressable, {
|
|
140271
140237
|
accessibilityRole: "button",
|
|
140272
140238
|
onPress: () => onPress("102"),
|
|
140273
140239
|
onPressIn: handlePressIn,
|
|
140274
140240
|
onPressOut: handlePressOut,
|
|
140275
|
-
children: (0, import_jsx_runtime21.jsx)(
|
|
140241
|
+
children: (0, import_jsx_runtime21.jsx)(import_react_native40.Text, {
|
|
140276
140242
|
allowFontScaling: false,
|
|
140277
140243
|
style: [styles2.subtitle, {
|
|
140278
140244
|
color: colors.subtitle
|
|
@@ -140281,7 +140247,7 @@ __d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, e
|
|
|
140281
140247
|
})
|
|
140282
140248
|
})]
|
|
140283
140249
|
})]
|
|
140284
|
-
}), adClearanceText ? (0, import_jsx_runtime21.jsx)(
|
|
140250
|
+
}), adClearanceText ? (0, import_jsx_runtime21.jsx)(import_react_native40.Text, {
|
|
140285
140251
|
allowFontScaling: false,
|
|
140286
140252
|
style: [styles2.adClearance, {
|
|
140287
140253
|
color: colors.adClearance,
|
|
@@ -140293,7 +140259,7 @@ __d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, e
|
|
|
140293
140259
|
})
|
|
140294
140260
|
});
|
|
140295
140261
|
}
|
|
140296
|
-
var styles2 =
|
|
140262
|
+
var styles2 = import_react_native40.StyleSheet.create({
|
|
140297
140263
|
pressable: {
|
|
140298
140264
|
width: "100%"
|
|
140299
140265
|
},
|
|
@@ -140501,27 +140467,27 @@ __d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, e
|
|
|
140501
140467
|
onAdImpression = props.onAdImpression,
|
|
140502
140468
|
onAdFailedToRender = props.onAdFailedToRender,
|
|
140503
140469
|
onNoFill = props.onNoFill;
|
|
140504
|
-
var slotIdRef = (0,
|
|
140505
|
-
var
|
|
140506
|
-
|
|
140507
|
-
ad =
|
|
140508
|
-
setAd =
|
|
140509
|
-
var
|
|
140510
|
-
|
|
140511
|
-
isAdBadgeEnabled =
|
|
140512
|
-
setIsAdBadgeEnabled =
|
|
140513
|
-
var eventTrackerRef = (0,
|
|
140514
|
-
var eventPayloadRef = (0,
|
|
140515
|
-
var hasRenderedRef = (0,
|
|
140516
|
-
var hasLoggedImp1pxRef = (0,
|
|
140517
|
-
var hasLoggedImp100pRef = (0,
|
|
140518
|
-
var hasNotifiedViewableRef = (0,
|
|
140519
|
-
var viewableTimerRef = (0,
|
|
140520
|
-
var refetchIntervalMsRef = (0,
|
|
140521
|
-
var lastImp1pxAtRef = (0,
|
|
140522
|
-
var loadingRef = (0,
|
|
140523
|
-
var loadRef = (0,
|
|
140524
|
-
var callbacksRef = (0,
|
|
140470
|
+
var slotIdRef = (0, import_react30.useRef)(createSlotId());
|
|
140471
|
+
var _ref55 = (0, import_react30.useState)(null),
|
|
140472
|
+
_ref56 = _slicedToArray(_ref55, 2),
|
|
140473
|
+
ad = _ref56[0],
|
|
140474
|
+
setAd = _ref56[1];
|
|
140475
|
+
var _ref57 = (0, import_react30.useState)(true),
|
|
140476
|
+
_ref58 = _slicedToArray(_ref57, 2),
|
|
140477
|
+
isAdBadgeEnabled = _ref58[0],
|
|
140478
|
+
setIsAdBadgeEnabled = _ref58[1];
|
|
140479
|
+
var eventTrackerRef = (0, import_react30.useRef)(null);
|
|
140480
|
+
var eventPayloadRef = (0, import_react30.useRef)(null);
|
|
140481
|
+
var hasRenderedRef = (0, import_react30.useRef)(false);
|
|
140482
|
+
var hasLoggedImp1pxRef = (0, import_react30.useRef)(false);
|
|
140483
|
+
var hasLoggedImp100pRef = (0, import_react30.useRef)(false);
|
|
140484
|
+
var hasNotifiedViewableRef = (0, import_react30.useRef)(false);
|
|
140485
|
+
var viewableTimerRef = (0, import_react30.useRef)(null);
|
|
140486
|
+
var refetchIntervalMsRef = (0, import_react30.useRef)(null);
|
|
140487
|
+
var lastImp1pxAtRef = (0, import_react30.useRef)(null);
|
|
140488
|
+
var loadingRef = (0, import_react30.useRef)(false);
|
|
140489
|
+
var loadRef = (0, import_react30.useRef)(null);
|
|
140490
|
+
var callbacksRef = (0, import_react30.useRef)({
|
|
140525
140491
|
onAdRendered,
|
|
140526
140492
|
onAdViewable,
|
|
140527
140493
|
onAdClicked,
|
|
@@ -140529,8 +140495,8 @@ __d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, e
|
|
|
140529
140495
|
onAdFailedToRender,
|
|
140530
140496
|
onNoFill
|
|
140531
140497
|
});
|
|
140532
|
-
var isMountedRef = (0,
|
|
140533
|
-
var colorScheme = (0,
|
|
140498
|
+
var isMountedRef = (0, import_react30.useRef)(false);
|
|
140499
|
+
var colorScheme = (0, import_react_native42.useColorScheme)();
|
|
140534
140500
|
var selectedTheme = theme ?? DEFAULT_INLINE_AD_THEME;
|
|
140535
140501
|
var resolvedTheme = selectedTheme === "auto" ? colorScheme === "dark" ? "dark" : "light" : selectedTheme;
|
|
140536
140502
|
var resolvedTone = tone ?? DEFAULT_INLINE_AD_TONE;
|
|
@@ -140546,7 +140512,7 @@ __d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, e
|
|
|
140546
140512
|
onAdFailedToRender,
|
|
140547
140513
|
onNoFill
|
|
140548
140514
|
};
|
|
140549
|
-
(0,
|
|
140515
|
+
(0, import_react30.useEffect)(() => {
|
|
140550
140516
|
isMountedRef.current = true;
|
|
140551
140517
|
return () => {
|
|
140552
140518
|
isMountedRef.current = false;
|
|
@@ -140556,30 +140522,31 @@ __d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, e
|
|
|
140556
140522
|
}
|
|
140557
140523
|
};
|
|
140558
140524
|
}, []);
|
|
140559
|
-
(0,
|
|
140525
|
+
(0, import_react30.useEffect)(() => {
|
|
140526
|
+
var normalizedAdGroupId = normalizeAdGroupId(adGroupId);
|
|
140560
140527
|
var loadAdRequest = () => {
|
|
140561
140528
|
if (loadingRef.current) {
|
|
140562
140529
|
return;
|
|
140563
140530
|
}
|
|
140564
|
-
if (
|
|
140565
|
-
var error = createError2(ERROR_CODES.INVALID_SPACE,
|
|
140566
|
-
callbacksRef.current.onAdFailedToRender?.(buildBannerErrorPayload(slotIdRef.current,
|
|
140531
|
+
if (normalizedAdGroupId.length === 0) {
|
|
140532
|
+
var error = createError2(ERROR_CODES.INVALID_SPACE, INVALID_AD_GROUP_ID_ERROR_MESSAGE);
|
|
140533
|
+
callbacksRef.current.onAdFailedToRender?.(buildBannerErrorPayload(slotIdRef.current, normalizedAdGroupId, error));
|
|
140567
140534
|
return;
|
|
140568
140535
|
}
|
|
140569
140536
|
loadingRef.current = true;
|
|
140570
|
-
loadAd(
|
|
140537
|
+
loadAd(normalizedAdGroupId).then(result => {
|
|
140571
140538
|
if (!isMountedRef.current) return;
|
|
140572
140539
|
if (result.type === "noFill") {
|
|
140573
|
-
callbacksRef.current.onNoFill?.(buildNoFillPayload(slotIdRef.current,
|
|
140540
|
+
callbacksRef.current.onNoFill?.(buildNoFillPayload(slotIdRef.current, normalizedAdGroupId));
|
|
140574
140541
|
return;
|
|
140575
140542
|
}
|
|
140576
140543
|
if (result.type === "error") {
|
|
140577
|
-
callbacksRef.current.onAdFailedToRender?.(buildBannerErrorPayload(slotIdRef.current,
|
|
140544
|
+
callbacksRef.current.onAdFailedToRender?.(buildBannerErrorPayload(slotIdRef.current, normalizedAdGroupId, result.error));
|
|
140578
140545
|
return;
|
|
140579
140546
|
}
|
|
140580
140547
|
if (!isValidCreative(result.ad)) {
|
|
140581
140548
|
var invalidError = createError2(ERROR_CODES.INTERNAL_ERROR, "Invalid creative payload");
|
|
140582
|
-
callbacksRef.current.onAdFailedToRender?.(buildBannerErrorPayload(slotIdRef.current,
|
|
140549
|
+
callbacksRef.current.onAdFailedToRender?.(buildBannerErrorPayload(slotIdRef.current, normalizedAdGroupId, invalidError));
|
|
140583
140550
|
return;
|
|
140584
140551
|
}
|
|
140585
140552
|
if (result.responseExt?.refetchSeconds !== void 0) {
|
|
@@ -140594,7 +140561,7 @@ __d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, e
|
|
|
140594
140561
|
clearTimeout(viewableTimerRef.current);
|
|
140595
140562
|
viewableTimerRef.current = null;
|
|
140596
140563
|
}
|
|
140597
|
-
var payload = buildBannerEventPayload(slotIdRef.current,
|
|
140564
|
+
var payload = buildBannerEventPayload(slotIdRef.current, normalizedAdGroupId, result.ad);
|
|
140598
140565
|
eventPayloadRef.current = payload;
|
|
140599
140566
|
eventTrackerRef.current = new EventTracker(result.ad.eventTrackingUrls ?? [], result.ad.eventTypes ?? [], result.ad.eventPayload ?? "", result.requestId, result.ad.creative?.id);
|
|
140600
140567
|
setIsAdBadgeEnabled(result.responseExt?.isAdBadgeEnabled !== false);
|
|
@@ -140602,7 +140569,7 @@ __d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, e
|
|
|
140602
140569
|
}).catch(error => {
|
|
140603
140570
|
if (!isMountedRef.current) return;
|
|
140604
140571
|
var adError = error instanceof Error ? createError2(ERROR_CODES.INTERNAL_ERROR, error.message) : createError2(ERROR_CODES.INTERNAL_ERROR, "Unknown error");
|
|
140605
|
-
callbacksRef.current.onAdFailedToRender?.(buildBannerErrorPayload(slotIdRef.current,
|
|
140572
|
+
callbacksRef.current.onAdFailedToRender?.(buildBannerErrorPayload(slotIdRef.current, normalizedAdGroupId, adError));
|
|
140606
140573
|
}).finally(() => {
|
|
140607
140574
|
loadingRef.current = false;
|
|
140608
140575
|
});
|
|
@@ -140613,7 +140580,7 @@ __d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, e
|
|
|
140613
140580
|
loadRef.current = null;
|
|
140614
140581
|
};
|
|
140615
140582
|
}, [adGroupId]);
|
|
140616
|
-
(0,
|
|
140583
|
+
(0, import_react_native41.useVisibilityChange)(documentVisibility => {
|
|
140617
140584
|
if (documentVisibility !== "visible") {
|
|
140618
140585
|
return;
|
|
140619
140586
|
}
|
|
@@ -140626,7 +140593,7 @@ __d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, e
|
|
|
140626
140593
|
loadRef.current?.();
|
|
140627
140594
|
}
|
|
140628
140595
|
});
|
|
140629
|
-
(0,
|
|
140596
|
+
(0, import_react30.useEffect)(() => {
|
|
140630
140597
|
if (!ad || hasRenderedRef.current) {
|
|
140631
140598
|
return;
|
|
140632
140599
|
}
|
|
@@ -140711,23 +140678,23 @@ __d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, e
|
|
|
140711
140678
|
callbacksRef.current.onAdClicked?.(basePayload);
|
|
140712
140679
|
}
|
|
140713
140680
|
};
|
|
140714
|
-
return (0, import_jsx_runtime22.jsx)(
|
|
140681
|
+
return (0, import_jsx_runtime22.jsx)(import_react_native41.ImpressionArea, {
|
|
140715
140682
|
style: styles3.impressionArea,
|
|
140716
140683
|
onImpressionStart: handleImpression1px,
|
|
140717
140684
|
areaThreshold: 0,
|
|
140718
140685
|
UNSAFE__impressFallbackOnMount: Boolean(impressFallbackOnMount),
|
|
140719
|
-
children: (0, import_jsx_runtime22.jsx)(
|
|
140686
|
+
children: (0, import_jsx_runtime22.jsx)(import_react_native41.ImpressionArea, {
|
|
140720
140687
|
onImpressionStart: handleImpression100p,
|
|
140721
140688
|
areaThreshold: 1,
|
|
140722
140689
|
UNSAFE__impressFallbackOnMount: Boolean(impressFallbackOnMount),
|
|
140723
|
-
children: (0, import_jsx_runtime22.jsx)(
|
|
140690
|
+
children: (0, import_jsx_runtime22.jsx)(import_react_native41.ImpressionArea, {
|
|
140724
140691
|
onImpressionStart: handleViewableStart,
|
|
140725
140692
|
onImpressionEnd: handleViewableEnd,
|
|
140726
140693
|
areaThreshold: 0.5,
|
|
140727
140694
|
UNSAFE__impressFallbackOnMount: Boolean(impressFallbackOnMount),
|
|
140728
|
-
children: (0, import_jsx_runtime22.jsx)(
|
|
140695
|
+
children: (0, import_jsx_runtime22.jsx)(import_react_native42.View, {
|
|
140729
140696
|
style: [styles3.wrapper, resolvedVariant === "card" && styles3.cardWrapper],
|
|
140730
|
-
children: (0, import_jsx_runtime22.jsxs)(
|
|
140697
|
+
children: (0, import_jsx_runtime22.jsxs)(import_react_native42.View, {
|
|
140731
140698
|
style: [styles3.surface, {
|
|
140732
140699
|
backgroundColor
|
|
140733
140700
|
}, resolvedVariant === "card" && styles3.cardSurface],
|
|
@@ -140761,7 +140728,7 @@ __d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, e
|
|
|
140761
140728
|
})
|
|
140762
140729
|
}, impressionKey);
|
|
140763
140730
|
}
|
|
140764
|
-
var styles3 =
|
|
140731
|
+
var styles3 = import_react_native42.StyleSheet.create({
|
|
140765
140732
|
impressionArea: {
|
|
140766
140733
|
width: "100%"
|
|
140767
140734
|
},
|
|
@@ -213453,7 +213420,7 @@ __d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, e
|
|
|
213453
213420
|
}
|
|
213454
213421
|
\`;document.head.appendChild(e);})();
|
|
213455
213422
|
`,
|
|
213456
|
-
m = '"use strict";(()=>{var de=class{get _window(){return typeof window<"u"?window:{ReactNativeWebView:{postMessage:()=>{}},__GRANITE_NATIVE_EMITTER:{on:()=>()=>{}},__CONSTANT_HANDLER_MAP:{}}}postMessage(e){let t=this._window.ReactNativeWebView;if(!t)throw new Error("ReactNativeWebView is not available in browser environment");t.postMessage(JSON.stringify(e))}on(e,t){let r=this._window.__GRANITE_NATIVE_EMITTER;if(!r)throw new Error("__GRANITE_NATIVE_EMITTER is not available");return r.on(e,t)}getConstant(e){let t=this._window.__CONSTANT_HANDLER_MAP;if(t&&e in t)return t[e];throw new Error(`${e} is not a constant handler`)}},w=new de,O=()=>Math.random().toString(36).substring(2,15),B=e=>{if(e&&e.__isError){let t=new Error(e.message);for(let[r,n]of Object.entries(e))t[r]=n;return t}return e};function d(e){return(...t)=>{let r=O(),n=[],o=()=>{for(let s of n)s()};return new Promise((s,a)=>{n.push(w.on(`${e}/resolve/${r}`,i=>{o(),s(i)})),n.push(w.on(`${e}/reject/${r}`,i=>{o(),a(B(i))})),w.postMessage({type:"method",functionName:e,eventId:r,args:t})})}}function R(e){return t=>{let r=O(),n=[w.on(`${e}/onEvent/${r}`,o=>{t.onEvent(o)}),w.on(`${e}/onError/${r}`,o=>{t.onError(B(o))})];return w.postMessage({type:"addEventListener",functionName:e,eventId:r,args:t.options}),()=>{w.postMessage({type:"removeEventListener",functionName:e,eventId:r}),n.forEach(o=>o())}}}function g(e){return()=>w.getConstant(e)}var ue=function(){return{emit:function(t,r){for(var n=this.events[t]||[],o=0,s=n.length;o<s;o++)n[o](r)},events:{},on:function(t,r){var n=this,o,s;return((o=this.events)[s=t]||(o[s]=[])).push(r),function(){var a;n.events[t]=(a=n.events[t])===null||a===void 0?void 0:a.filter(function(i){return r!==i})}}}};typeof window<"u"&&(window.__GRANITE_NATIVE_EMITTER=ue());var Xe=d("closeView"),Ye=d("generateHapticFeedback"),Ze=d("share"),Qe=d("setSecureScreen"),et=d("setScreenAwakeMode"),tt=d("getNetworkStatus"),rt=d("setIosSwipeGestureEnabled"),nt=d("openURL"),ot=d("openPermissionDialog"),st=d("getPermission"),at=d("requestPermission"),it=g("setClipboardText"),ct=g("getClipboardText"),dt=g("fetchContacts"),ut=g("fetchAlbumPhotos"),pt=g("getCurrentLocation"),mt=g("openCamera"),lt=d("appLogin"),gt=d("eventLog"),ft=d("getTossShareLink"),vt=d("setDeviceOrientation"),wt=d("checkoutPayment"),ht=d("saveBase64Data"),Et=d("appsInTossSignTossCert"),bt=d("getGameCenterGameProfile"),At=d("openGameCenterLeaderboard"),_t=d("submitGameCenterLeaderBoardScore"),St=d("getUserKeyForGame"),Ct=d("grantPromotionReward"),It=d("grantPromotionRewardForGame"),Tt=d("getIsTossLoginIntegratedService"),yt=d("getServerTime"),Lt=d("requestReview"),Rt=g("getLocale"),Pt=g("getSchemeUri"),xt=g("getPlatformOS"),Dt=g("getOperationalEnvironment"),Nt=g("getTossAppVersion"),Mt=g("getDeviceId"),Ft=g("getGroupId"),kt=R("contactsViral"),Gt=R("startUpdateLocation"),Ot=R("onVisibilityChangedByTransparentServiceWeb");var S=class extends Error{constructor({methodName:e,message:t}){super(),this.name=`${e} permission error`,this.message=t}},V=class extends S{constructor(){super({methodName:"fetchAlbumPhotos",message:"\\uC0AC\\uC9C4\\uCCA9 \\uAD8C\\uD55C\\uC774 \\uAC70\\uBD80\\uB418\\uC5C8\\uC5B4\\uC694."})}},H=class extends S{constructor(){super({methodName:"fetchContacts",message:"\\uC5F0\\uB77D\\uCC98 \\uAD8C\\uD55C\\uC774 \\uAC70\\uBD80\\uB418\\uC5C8\\uC5B4\\uC694."})}},q=class extends S{constructor(){super({methodName:"openCamera",message:"\\uCE74\\uBA54\\uB77C \\uAD8C\\uD55C\\uC774 \\uAC70\\uBD80\\uB418\\uC5C8\\uC5B4\\uC694."})}};var k=class extends S{constructor(){super({methodName:"getCurrentLocation",message:"\\uC704\\uCE58 \\uAD8C\\uD55C\\uC774 \\uAC70\\uBD80\\uB418\\uC5C8\\uC5B4\\uC694."})}},U=k,W=class extends S{constructor(){super({methodName:"getClipboardText",message:"\\uD074\\uB9BD\\uBCF4\\uB4DC \\uC77D\\uAE30 \\uAD8C\\uD55C\\uC774 \\uAC70\\uBD80\\uB418\\uC5C8\\uC5B4\\uC694."})}},z=class extends S{constructor(){super({methodName:"setClipboardText",message:"\\uD074\\uB9BD\\uBCF4\\uB4DC \\uC4F0\\uAE30 \\uAD8C\\uD55C\\uC774 \\uAC70\\uBD80\\uB418\\uC5C8\\uC5B4\\uC694."})}};var pe=class{get _window(){return typeof window<"u"?window:{ReactNativeWebView:{postMessage:()=>{}},__GRANITE_NATIVE_EMITTER:{on:()=>()=>{}},__CONSTANT_HANDLER_MAP:{}}}postMessage(e){let t=this._window.ReactNativeWebView;if(!t)throw new Error("ReactNativeWebView is not available in browser environment");t.postMessage(JSON.stringify(e))}on(e,t){let r=this._window.__GRANITE_NATIVE_EMITTER;if(!r)throw new Error("__GRANITE_NATIVE_EMITTER is not available");return r.on(e,t)}getConstant(e){let t=this._window.__CONSTANT_HANDLER_MAP;if(t&&e in t)return t[e];throw new Error(`${e} is not a constant handler`)}},h=new pe,te=()=>Math.random().toString(36).substring(2,15),re=e=>{if(e&&e.__isError){let t=new Error(e.message);for(let[r,n]of Object.entries(e))t[r]=n;return t}return e};function c(e){return(...t)=>{let r=te(),n=[],o=()=>{for(let s of n)s()};return new Promise((s,a)=>{n.push(h.on(`${e}/resolve/${r}`,i=>{o(),s(i)})),n.push(h.on(`${e}/reject/${r}`,i=>{o(),a(re(i))})),h.postMessage({type:"method",functionName:e,eventId:r,args:t})})}}function E(e){return t=>{let r=te(),n=[h.on(`${e}/onEvent/${r}`,o=>{t.onEvent(o)}),h.on(`${e}/onError/${r}`,o=>{t.onError(re(o))})];return h.postMessage({type:"addEventListener",functionName:e,eventId:r,args:t.options}),()=>{h.postMessage({type:"removeEventListener",functionName:e,eventId:r}),n.forEach(o=>o())}}}function p(e){return()=>h.getConstant(e)}var Kt={getItem:c("getStorageItem"),setItem:c("setStorageItem"),removeItem:c("removeStorageItem"),clearItems:c("clearItems")},me=/^[v^~<>=]*?(\\d+)(?:\\.([x*]|\\d+)(?:\\.([x*]|\\d+)(?:\\.([x*]|\\d+))?(?:-([\\da-z\\\\-]+(?:\\.[\\da-z\\\\-]+)*))?(?:\\+[\\da-z\\\\-]+(?:\\.[\\da-z\\\\-]+)*)?)?)?$/i,$=e=>["*","x","X"].includes(e),j=e=>{let t=parseInt(e,10);return isNaN(t)?e:t},le=(e,t)=>typeof e==typeof t?[e,t]:[String(e),String(t)],ge=(e,t)=>{if($(e)||$(t))return 0;let[r,n]=le(j(e),j(t));return r>n?1:r<n?-1:0},K=e=>{if(typeof e!="string")throw new TypeError("Invalid argument: expected a string");let t=e.match(me);if(!t)throw new Error(`Invalid semver: \'${e}\'`);let[,r,n,o,s,a]=t;return[r,n,o,s,a]},J=(e,t)=>{let r=Math.max(e.length,t.length);for(let n=0;n<r;n++){let o=e[n]??"0",s=t[n]??"0",a=ge(o,s);if(a!==0)return a}return 0},fe=(e,t)=>{let r=K(e),n=K(t),o=r.pop(),s=n.pop(),a=J(r,n);return a!==0?a:o&&s?J(o.split("."),s.split(".")):o?-1:s?1:0};function G(e){if(p("getOperationalEnvironment")()==="sandbox")return!0;let r=p("getTossAppVersion")(),o=p("getPlatformOS")()==="ios"?e.ios:e.android;return o===void 0?!1:o==="always"?!0:o==="never"?!1:fe(r,o)>=0}function X(e){return c("processProductGrant")(e)}var Jt={createOneTimePurchaseOrder:e=>{let t=G({android:"5.219.0",ios:"5.219.0"}),r=()=>{};if(!t)return r;let n=G({android:"5.231.1",ios:"5.230.0"}),{options:o,onEvent:s,onError:a}=e,i=o.sku??o.productId;return n?E("requestOneTimePurchase")({options:{sku:i},onEvent:async l=>{if(l.type==="purchased"){let m=await o.processProductGrant({orderId:l.data.orderId});await X({orderId:l.data.orderId,isProductGranted:m}).catch(a)}else s(l)},onError:l=>{a(l)}}):(c("iapCreateOneTimePurchaseOrder")({productId:i}).then(m=>{Promise.resolve(o.processProductGrant({orderId:m.orderId})).then(()=>{s({type:"success",data:m})}).catch(f=>{a(f)})}).catch(m=>{a(m)}),r)},createSubscriptionPurchaseOrder:e=>{let t=G({android:"5.248.0",ios:"5.249.0"}),r=()=>{};if(!t)return r;let{options:n,onEvent:o,onError:s}=e,{sku:a,offerId:i,processProductGrant:u}=n;return E("requestSubscriptionPurchase")({options:{sku:a,offerId:i??null},onEvent:async m=>{if(m.type==="purchased"){let f=await u({orderId:m.data.orderId,subscriptionId:m.data.subscriptionId});await X({orderId:m.data.orderId,isProductGranted:f}).catch(s)}else o(m)},onError:m=>{s(m)}})},getProductItemList:c("iapGetProductItemList"),getPendingOrders:c("getPendingOrders"),getCompletedOrRefundedOrders:c("getCompletedOrRefundedOrders"),completeProductGrant:c("completeProductGrant"),getSubscriptionInfo:c("getSubscriptionInfo")},Xt=p("getSafeAreaInsets");var Yt=p("getSafeAreaInsets");var Zt={loadAppsInTossAdMob:Object.assign(E("loadAppsInTossAdMob"),{isSupported:p("loadAppsInTossAdMob_isSupported")}),showAppsInTossAdMob:Object.assign(E("showAppsInTossAdMob"),{isSupported:p("showAppsInTossAdMob_isSupported")}),isAppsInTossAdMobLoaded:Object.assign(c("isAppsInTossAdMobLoaded"),{isSupported:p("isAppsInTossAdMobLoaded_isSupported")})};var Qt={getDeploymentId:p("getDeploymentId")},er=p("deploymentId"),tr=p("brandDisplayName"),rr=p("brandIcon"),nr=p("brandPrimaryColor");var or={addAccessoryButton:c("addAccessoryButton"),removeAccessoryButton:c("removeAccessoryButton")},ve=c("requestPermission"),we=c("getPermission"),he=c("openPermissionDialog");function C({permission:e,handler:t,error:r}){let n=async(...o)=>{if(await ve(e)==="denied")throw new r;return t(...o)};return n.getPermission=()=>we(e),n.openPermissionDialog=()=>he(e),n}var ar=C({handler:e=>c("fetchAlbumPhotos")(e),permission:{name:"photos",access:"read"},error:V}),cr=C({handler:e=>c("fetchContacts")(e),permission:{name:"contacts",access:"read"},error:H}),ur=C({handler:e=>c("getCurrentLocation")(e),permission:{name:"geolocation",access:"access"},error:k}),mr=C({handler:e=>c("openCamera")(e),permission:{name:"camera",access:"access"},error:q}),gr=C({handler:e=>c("setClipboardText")(e),permission:{name:"clipboard",access:"write"},error:z}),vr=C({handler:()=>c("getClipboardText")(),permission:{name:"clipboard",access:"read"},error:W}),Ee=c("getPermission"),be=c("openPermissionDialog"),ne=e=>E("updateLocationEvent")({...e,onError:t=>{let r=new U;return t instanceof Error&&t.name===r.name?e.onError(r):e.onError(t)}});ne.getPermission=()=>Ee({name:"geolocation",access:"access"});ne.openPermissionDialog=()=>be({name:"geolocation",access:"access"});var hr=Object.assign(E("loadFullScreenAd"),{isSupported:p("loadFullScreenAd_isSupported")}),Er=Object.assign(E("showFullScreenAd"),{isSupported:p("showFullScreenAd_isSupported")}),Ae=c("openURL");function _e(e){let t=Se(e);return Ae(t)}function Se(e){return["http://","https://"].some(r=>e.startsWith(r))?Ce(e):e}function Ce(e){return`supertoss://web?url=${encodeURIComponent(e)}&external=true`}var Y="https://static.toss.im/ads/sdk/toss-ads-space-kit-1.3.0.js",Z=15e3,P=null;function _(){if(!(typeof window>"u"))return window.TossAdsSpaceKit}function Ie(){if(typeof window>"u"||typeof document>"u")return Promise.reject(new Error("Ads SDK can only be loaded in a browser environment."));let e=_();if(e)return Promise.resolve(e);if(P)return P;let t=new Promise((r,n)=>{let o=document.createElement("script"),s=()=>{o.removeEventListener("load",a),o.removeEventListener("error",i),window.clearTimeout(u),P=null},a=()=>{let l=_();if(l){s(),r(l);return}s(),n(new Error("Ads SDK script loaded but window.TossAdsSpaceKit was not exposed."))},i=()=>{s(),n(new Error(`Failed to load Ads SDK script from ${Y}.`))},u=window.setTimeout(()=>{s(),n(new Error(`Loading Ads SDK timed out after ${Z}ms.`))},Z);o.addEventListener("load",a),o.addEventListener("error",i),o.async=!0,o.src=Y,document.head.appendChild(o)});return P=t,t}var A=Object.assign(E("fetchTossAd"),{isSupported:p("fetchTossAd_isSupported")}),Te=c("tossAdEventLog"),ye=new Set(["1","2"]);function Le(e){return new Promise((t,r)=>{if(!A.isSupported()){r(new Error("fetchTossAd is not supported in this environment."));return}return A({options:e,onEvent:t,onError:r})})}function Q(e){let t=Array.isArray(e.ads)?e.ads.filter(r=>ye.has(String(r.styleId))):[];return{requestId:e.requestId??"",status:e.status??"OK",ads:t,ext:e.ext}}function Re(e){return Pe(e)?e.resultType!=="SUCCESS"?e:e.success?{...e,success:Q(e.success)}:{resultType:"FAIL",error:{reason:"fetchTossAd returned SUCCESS without payload"}}:xe(e)?{resultType:"SUCCESS",success:Q(e)}:{resultType:"FAIL",error:{reason:"Invalid response from fetchTossAd"}}}function Pe(e){return!!(e&&typeof e=="object"&&"resultType"in e)}function xe(e){return!!(e&&typeof e=="object"&&"ads"in e)}function De(){return async(e,t)=>{try{let r=await Le({adGroupId:t.spaceUnitId,sdkId:"108",availableStyleIds:["1","2"]});return Re(r)}catch(r){return{resultType:"FAIL",error:{reason:r instanceof Error?r.message:"Unknown fetchTossAd error"}}}}}var L=null;function Ne(e){let{callbacks:t}=e,r=()=>t?.onInitialized?.(),n=a=>{let i=a instanceof Error?a:new Error(String(a));t?.onInitializationFailed?.(i)};if(_()?.isInitialized()){r();return}if(L!=null){L.then(r).catch(n);return}let s=Ie().then(a=>{if(a.isInitialized())return;let u={environment:"live",customAdFetcher:De(),opener:_e};a.init(u)});L=s,s.then(r).catch(n).finally(()=>{L===s&&(L=null)})}function Me(e,t,r={}){let{callbacks:n}=r,o=s=>{let a=s instanceof Error?s:new Error(String(s));n?.onAdFailedToRender?.({slotId:"",adGroupId:e,adMetadata:{},error:{code:0,message:a.message}})};try{let s=e,a=_();if(!a)throw new Error("[toss-ad] Call initialize() before attaching an ad.");if(!a.banner)throw new Error("[toss-ad] Loaded TossAdsSpaceKit does not support banner ads.");let i=typeof t=="string"?document.querySelector(t):t;if(!i)throw new Error(`[toss-ad] Failed to find target element: ${t}`);let u={spaceId:s,autoLoad:!0,theme:r.theme,padding:r.padding,callbacks:oe(e,r.callbacks)};a.banner.createSlot(i,u)}catch(s){o(s)}}var Fe="16px 20px",ke="20px",Ge="auto",Oe="blackAndWhite",Be="expanded",v="toss-ads-attach",ee="toss-ads-attach-style";function Ve(e){let t=e.ownerDocument;if(!t||t.getElementById(ee))return;let r=t.createElement("style");r.id=ee,r.textContent=`\n .${v} { background: #ffffff; }\n .${v}.toss-ads-tone-grey { background: #f2f4f7; }\n @media (prefers-color-scheme: dark) {\n .${v} { background: #17171c; }\n .${v}.toss-ads-tone-grey { background: #101013; }\n }\n .${v}.toss-ads-theme-light { background: #ffffff; }\n .${v}.toss-ads-theme-light.toss-ads-tone-grey { background: #f2f4f7; }\n .${v}.toss-ads-theme-dark { background: #17171c; }\n .${v}.toss-ads-theme-dark.toss-ads-tone-grey { background: #101013; }\n `;let n=t.head??t.body??t.documentElement;n&&n.appendChild(r)}function He(e,t,r={}){let{callbacks:n,theme:o=Ge,tone:s=Oe,variant:a=Be}=r,i=document.createElement("div");i.style.width="100%",i.style.height="100%",i.style.boxSizing="border-box",i.style.display="flex",i.style.flexDirection="column",i.style.justifyContent="center",i.style.overflow="hidden",a==="card"&&(i.style.padding="0 10px");let u=document.createElement("div");u.classList.add(v),s==="grey"&&u.classList.add("toss-ads-tone-grey"),o==="light"?u.classList.add("toss-ads-theme-light"):o==="dark"&&u.classList.add("toss-ads-theme-dark"),a==="card"&&(u.style.borderRadius="16px",u.style.overflow="hidden"),i.appendChild(u);let l=!1,m=null,f=b=>{let y=b instanceof Error?b:new Error(String(b));n?.onAdFailedToRender?.({slotId:"",adGroupId:e,adMetadata:{},error:{code:0,message:y.message}})},ae=oe(e,n);try{let b=e,y=_();if(!y)throw new Error("[toss-ad] Call initialize() before attaching an ad.");if(!y.banner)throw new Error("[toss-ad] Loaded TossAdsSpaceKit does not support banner ads.");let F=typeof t=="string"?document.querySelector(t):t;if(!F)throw new Error(`[toss-ad] Failed to find target element: ${t}`);Ve(F),F.appendChild(i),l=!0;let ie={spaceId:b,autoLoad:!0,theme:o==="auto"?void 0:o,renderPadding:ce=>ce==="1"?Fe:ke,callbacks:ae};m=y.banner.createSlot(u,ie)}catch(b){l&&i.parentNode&&i.parentNode.removeChild(i),f(b)}return{destroy(){m?.destroy(),l&&i.parentNode&&i.parentNode.removeChild(i)}}}function qe(e){let t=_();t?.banner&&t.banner.destroy(e)}function Ue(){let e=_();e?.banner&&e.banner.destroyAll()}function oe(e,t){if(!t)return;let r=n=>{let o={...n??{}};return o.adGroupId=o.adGroupId??o.spaceId??e,delete o.spaceId,o};return{onAdRendered:n=>t.onAdRendered?.(r(n)),onAdViewable:n=>t.onAdViewable?.(r(n)),onAdClicked:n=>t.onAdClicked?.(r(n)),onAdImpression:n=>{Te({log_name:"display_ads_all::impression__1px_banner",log_type:"event",params:{event_type:"impression",schema_id:1812034,request_id:n?.adMetadata?.requestId??""}}),t.onAdImpression?.(r(n))},onAdFailedToRender:n=>t.onAdFailedToRender?.({...r(n),error:n?.error??{code:0,message:"UNKNOWN"}}),onNoFill:n=>t.onNoFill?.(r(n))}}var br={initialize:Object.assign(Ne,{isSupported:A.isSupported}),attach:Object.assign(Me,{isSupported:A.isSupported}),attachBanner:Object.assign(He,{isSupported:A.isSupported}),destroy:Object.assign(qe,{isSupported:A.isSupported}),destroyAll:Object.assign(Ue,{isSupported:A.isSupported})},Ar=Object.assign(c("getServerTime"),{isSupported:p("getServerTime_isSupported")}),_r=Object.assign(c("requestReview"),{isSupported:p("requestReview_isSupported")});var x=class{_log=c("debugLog");log(t,r){try{this._log({log_name:`apps_in_toss_webview_${t}`,log_type:"debug",params:{...r,...this.getCommonParams()}})}catch{}}getCommonParams(){return{...this.getLocationInfo(),...this.getNavigatorInfo(),...this.getScreenInfo(),appName:window.__appsInToss.appName,deploymentId:window.__appsInToss.deploymentId,sessionId:window.__appsInToss.sessionId,isGame:window.__appsInToss.webViewType==="game",timestampMs:Date.now()}}getLocationInfo(){return{url:window.location.href,urlOrigin:window.location.origin,urlHost:window.location.hostname,urlPath:window.location.pathname,urlSearch:window.location.search}}getNavigatorInfo(){return{userAgent:navigator.userAgent,platform:navigator.platform,language:navigator.language,cookieEnabled:navigator.cookieEnabled,hardwareConcurrency:navigator.hardwareConcurrency,deviceMemory:navigator.deviceMemory?navigator.deviceMemory*1024*1024:void 0,maxTouchPoints:navigator.maxTouchPoints}}getScreenInfo(){return{screenWidth:screen.width,screenHeight:screen.height,availableScreenWidth:screen.availWidth,availableScreenHeight:screen.availHeight,devicePixelRatio:window.devicePixelRatio,colorDepth:screen.colorDepth,pixelDepth:screen.pixelDepth,viewportWidth:window.innerWidth,viewportHeight:window.innerHeight}}};var D=class{callbacks={};on(t,r){return typeof this.callbacks[t]>"u"&&(this.callbacks[t]=[]),this.callbacks[t].push(r),()=>{this.callbacks[t]=this.callbacks[t]?.filter(n=>n!==r)??[]}}emit(t,r){this.callbacks[t]?.forEach(n=>n(r))}};window.__appsInToss={appName:p("getAppName")(),deploymentId:p("getDeploymentId")(),webViewType:p("getWebViewType")(),sessionId:Math.random().toString(36).substring(2),eventEmitter:new D,debugLogger:new x};var I=/\\.(data|wasm|framework\\.js)(?:\\.gz|\\.br|\\.unityweb)?$/;function N(e){window.fetch=new Proxy(window.fetch,{apply:e})}(()=>{if(window.__appsInToss.webViewType!=="game"||typeof caches>"u")return;let e="@apps-in-toss/caches/",t=`${e}${window.__appsInToss.deploymentId}`;window.addEventListener("load",async()=>{let r=await caches.keys();for(let n of r)n.startsWith(e)&&n!==t&&await caches.delete(n)}),N(async(r,n,o)=>{let s=new Request(o[0],o[1]);if(!I.test(s.url))return await r.call(n,s);let a=await caches.open(t),i=await a.match(s);if(i){let l=i.headers.get("ETag"),m=i.headers.get("Last-Modified");l&&s.headers.set("If-None-Match",l),m&&s.headers.set("If-Modified-Since",m);let f=await r.call(n,s);return f.status===304?(i.__revalidateResponse=f,i):(a.put(s,f.clone()),f)}let u=await r.call(n,s);return a.put(s,u.clone()),u})})();N(async(e,t,r)=>{let n=new Request(r[0],r[1]),o=Date.now();window.__appsInToss.eventEmitter.emit("fetchRequest",{request:n});try{let s=await e.call(t,n);return window.__appsInToss.eventEmitter.emit("fetchResponse",{request:n,response:s,requestAt:o}),s}catch(s){throw window.__appsInToss.eventEmitter.emit("fetchError",{request:n,requestAt:o,error:s}),s}});HTMLCanvasElement.prototype.getContext=new Proxy(HTMLCanvasElement.prototype.getContext,{apply:(e,t,r)=>{let n=e.apply(t,r);return(n instanceof WebGL2RenderingContext||n instanceof WebGLRenderingContext)&&window.__appsInToss.eventEmitter.emit("webglGetContext",{canvas:t,context:n}),n}});var se=window.__appsInToss.debugLogger;se.log("load_start",{});window.addEventListener("load",()=>{let e=performance.timeOrigin,t=performance.getEntriesByType?.("navigation")[0]??null,r=typeof e<"u"&&t!==null,n=r?{navigationStartAtMs:e+t.startTime,navigationRedirectStartAtMs:e+t.redirectStart,navigationRedirectEndAtMs:e+t.redirectEnd,navigationRedirectCount:t.redirectCount,navigationServiceWorkerStartAtMs:e+t.workerStart,navigationFetchStartAtMs:e+t.fetchStart,navigationDomainLookupStartAtMs:e+t.domainLookupStart,navigationDomainLookupEndAtMs:e+t.domainLookupEnd,navigationConnectStartAtMs:e+t.connectStart,navigationSecureConnectStartAtMs:e+t.secureConnectionStart,navigationConnectEndAtMs:e+t.connectEnd,navigationRequestStartAtMs:e+t.requestStart,navigationResponseStartAtMs:e+t.responseStart,navigationResponseEndAtMs:e+t.responseEnd,navigationDomInteractiveAtMs:e+t.domInteractive,navigationDomContentLoadedEventStartAtMs:e+t.domContentLoadedEventStart,navigationDomContentLoadedEventEndAtMs:e+t.domContentLoadedEventEnd,navigationDomCompleteAtMs:e+t.domComplete}:{};se.log("load_complete",{isNavigationDebugSupported:r,...n})});function T(e,t){return parseFloat(e.toFixed(t))}(()=>{if(typeof performance.memory>"u"||typeof performance.memory.usedJSHeapSize>"u"||typeof performance.memory.totalJSHeapSize>"u"||typeof performance.memory.jsHeapSizeLimit>"u")return;function e(t){window.__appsInToss.debugLogger.log(t,{usedJSHeapSize:T(performance.memory.usedJSHeapSize/1024,2),totalJSHeapSize:T(performance.memory.totalJSHeapSize/1024,2),jsHeapSizeLimit:T(performance.memory.jsHeapSizeLimit/1024,2)})}e("memory_usage_first_0s"),setTimeout(()=>e("memory_usage_first_1s"),1e3),setTimeout(()=>e("memory_usage_first_10s"),1e4),setTimeout(()=>e("memory_usage_first_30s"),3e4),setTimeout(()=>e("memory_usage_first_60s"),6e4),setInterval(()=>e("memory_usage_every_180s"),18e4)})();(()=>{let e=window.__appsInToss.debugLogger,t=performance.timeOrigin;if(typeof t>"u"||typeof PerformanceObserver>"u")return;new PerformanceObserver(o=>{o.getEntries().forEach(a=>{a.name==="first-paint"?e.log("first_paint",{fpStartAtMs:t+a.startTime}):a.name==="first-contentful-paint"&&e.log("first_contentful_paint",{fcpStartAtMs:t+a.startTime})})}).observe({type:"paint"}),new PerformanceObserver(o=>{o.getEntries().forEach(a=>{e.log("largest_contentful_paint",{lcpStartAtMs:t+a.startTime,lcpRenderSize:a.size})})}).observe({type:"largest-contentful-paint"})})();(()=>{if(window.__appsInToss.webViewType!=="game")return;let e=window.__appsInToss.eventEmitter.on("webglGetContext",({canvas:t,context:r})=>{if(t.getAttribute("id")!=="unity-canvas")return;e();let n=r.getExtension("WEBGL_debug_renderer_info"),o=r.getParameter(r.MAX_VIEWPORT_DIMS),s={webGLRenderer:r.getParameter(r.RENDERER),webGLVendor:r.getParameter(r.VENDOR),webGLVersion:r.getParameter(r.VERSION),webGLShadingLanguageVersion:r.getParameter(r.SHADING_LANGUAGE_VERSION),webGLMaxTextureSize:r.getParameter(r.MAX_TEXTURE_SIZE),webGLMaxViewportWidth:o[0],webGLMaxViewportHeight:o[1],webGLMaxRenderbufferSize:r.getParameter(r.MAX_RENDERBUFFER_SIZE)},a=n?{webGLUnmaskedVendor:r.getParameter(n.UNMASKED_VENDOR_WEBGL),webGLUnmaskedRenderer:r.getParameter(n.UNMASKED_RENDERER_WEBGL)}:{};window.__appsInToss.debugLogger.log("unity_webgl_info",{...s,...a})})})();(()=>{if(window.__appsInToss.webViewType!=="game")return;let e=window.__appsInToss.debugLogger,t=window.__appsInToss.eventEmitter;t.on("fetchRequest",({request:n})=>{I.test(n.url)&&e.log("game_resource_download_start",{gameResourceRequestURL:n.url})});function r({request:n,requestAt:o,error:s}){e.log("game_resource_download_error",{gameResourceRequestURL:n.url,gameResourceRequestAtMs:o,gameResourceError:s instanceof Error?s.message:"Unknown Error"})}t.on("fetchResponse",async({request:n,requestAt:o,response:s})=>{if(!I.test(n.url))return;let a=await s.clone().blob().then(u=>T(u.size/1024,2)).catch(u=>(r({request:n,requestAt:o,error:u}),null));if(a===null)return;let i=Date.now();e.log("game_resource_download_end",{gameResourceRequestURL:n.url,gameResourceRequestAtMs:o,gameResourceResponseAtMs:i,gameResourceResponseSize:a,gameResourceResponseStatus:s.__revalidateResponse?.status??s.status,gameResourceDownloadDurationMs:i-o})}),t.on("fetchError",async({request:n,requestAt:o,error:s})=>{I.test(n.url)&&r({request:n,requestAt:o,error:s})})})();var M=[];function We(){let e=0;function t(r){let n=performance.now();if(r<n-1e3){M.push(e);return}e+=1,window.requestAnimationFrame(()=>t(r))}window.requestAnimationFrame(()=>t(performance.now()))}function ze(){if(M.length===0)return;let e=M;M=[];let t=$e(e).toSorted(),r={};for(let o=0;o<=100;o+=10){let s=t[Math.floor((t.length-1)*(o/100))];s&&(r[`fpsP${o}`]=s)}let n=t.reduce((o,s)=>o+s,0);r.fpsAverage=n/t.length,window.__appsInToss.debugLogger.log("fps_every_300s",r)}function $e(e){let t=new Set(e);return Array.from(t.values())}setInterval(()=>We(),1e3);setInterval(()=>ze(),3e5);})();\n';
|
|
213423
|
+
m = '"use strict";(()=>{var fe=class{get _window(){return typeof window<"u"?window:{ReactNativeWebView:{postMessage:()=>{}},__GRANITE_NATIVE_EMITTER:{on:()=>()=>{}},__CONSTANT_HANDLER_MAP:{}}}postMessage(e){let t=this._window.ReactNativeWebView;if(!t)throw new Error("ReactNativeWebView is not available in browser environment");t.postMessage(JSON.stringify(e))}on(e,t){let r=this._window.__GRANITE_NATIVE_EMITTER;if(!r)throw new Error("__GRANITE_NATIVE_EMITTER is not available");return r.on(e,t)}getConstant(e){let t=this._window.__CONSTANT_HANDLER_MAP;if(t&&e in t)return t[e];throw new Error(`${e} is not a constant handler`)}},E=new fe,q=()=>Math.random().toString(36).substring(2,15),z=e=>{if(e&&e.__isError){let t=new Error(e.message);for(let[r,n]of Object.entries(e))t[r]=n;return t}return e};function c(e){return(...t)=>{let r=q(),n=[],o=()=>{for(let s of n)s()};return new Promise((s,a)=>{n.push(E.on(`${e}/resolve/${r}`,i=>{o(),s(i)})),n.push(E.on(`${e}/reject/${r}`,i=>{o(),a(z(i))})),E.postMessage({type:"method",functionName:e,eventId:r,args:t})})}}function D(e){return t=>{let r=q(),n=[E.on(`${e}/onEvent/${r}`,o=>{t.onEvent(o)}),E.on(`${e}/onError/${r}`,o=>{t.onError(z(o))})];return E.postMessage({type:"addEventListener",functionName:e,eventId:r,args:t.options}),()=>{E.postMessage({type:"removeEventListener",functionName:e,eventId:r}),n.forEach(o=>o())}}}function v(e){return()=>E.getConstant(e)}var ve=function(){return{emit:function(t,r){for(var n=this.events[t]||[],o=0,s=n.length;o<s;o++)n[o](r)},events:{},on:function(t,r){var n=this,o,s;return((o=this.events)[s=t]||(o[s]=[])).push(r),function(){var a;n.events[t]=(a=n.events[t])===null||a===void 0?void 0:a.filter(function(i){return r!==i})}}}};typeof window<"u"&&(window.__GRANITE_NATIVE_EMITTER=ve());var at=c("closeView"),it=c("generateHapticFeedback"),dt=c("share"),ct=c("setSecureScreen"),ut=c("setScreenAwakeMode"),pt=c("getNetworkStatus"),mt=c("setIosSwipeGestureEnabled"),lt=c("openURL"),gt=c("openPermissionDialog"),ft=c("getPermission"),vt=c("requestPermission"),ht=v("setClipboardText"),wt=v("getClipboardText"),Et=v("fetchContacts"),bt=v("fetchAlbumPhotos"),At=v("getCurrentLocation"),_t=v("openCamera"),Ct=c("appLogin"),St=c("eventLog"),It=c("getTossShareLink"),Tt=c("setDeviceOrientation"),yt=c("checkoutPayment"),Rt=c("saveBase64Data"),Lt=c("appsInTossSignTossCert"),Pt=c("getGameCenterGameProfile"),xt=c("openGameCenterLeaderboard"),Dt=c("submitGameCenterLeaderBoardScore"),Nt=c("getUserKeyForGame"),Mt=c("grantPromotionReward"),Ft=c("grantPromotionRewardForGame"),Gt=c("getIsTossLoginIntegratedService"),Bt=c("getServerTime"),kt=c("requestReview"),Ot=v("getLocale"),Vt=v("getSchemeUri"),Ht=v("getPlatformOS"),Ut=v("getOperationalEnvironment"),Wt=v("getTossAppVersion"),qt=v("getDeviceId"),zt=v("getGroupId"),$t=D("contactsViral"),jt=D("startUpdateLocation"),Kt=D("onVisibilityChangedByTransparentServiceWeb");var S=class extends Error{constructor({methodName:e,message:t}){super(),this.name=`${e} permission error`,this.message=t}},$=class extends S{constructor(){super({methodName:"fetchAlbumPhotos",message:"\\uC0AC\\uC9C4\\uCCA9 \\uAD8C\\uD55C\\uC774 \\uAC70\\uBD80\\uB418\\uC5C8\\uC5B4\\uC694."})}},j=class extends S{constructor(){super({methodName:"fetchContacts",message:"\\uC5F0\\uB77D\\uCC98 \\uAD8C\\uD55C\\uC774 \\uAC70\\uBD80\\uB418\\uC5C8\\uC5B4\\uC694."})}},K=class extends S{constructor(){super({methodName:"openCamera",message:"\\uCE74\\uBA54\\uB77C \\uAD8C\\uD55C\\uC774 \\uAC70\\uBD80\\uB418\\uC5C8\\uC5B4\\uC694."})}};var V=class extends S{constructor(){super({methodName:"getCurrentLocation",message:"\\uC704\\uCE58 \\uAD8C\\uD55C\\uC774 \\uAC70\\uBD80\\uB418\\uC5C8\\uC5B4\\uC694."})}},J=V,X=class extends S{constructor(){super({methodName:"getClipboardText",message:"\\uD074\\uB9BD\\uBCF4\\uB4DC \\uC77D\\uAE30 \\uAD8C\\uD55C\\uC774 \\uAC70\\uBD80\\uB418\\uC5C8\\uC5B4\\uC694."})}},Y=class extends S{constructor(){super({methodName:"setClipboardText",message:"\\uD074\\uB9BD\\uBCF4\\uB4DC \\uC4F0\\uAE30 \\uAD8C\\uD55C\\uC774 \\uAC70\\uBD80\\uB418\\uC5C8\\uC5B4\\uC694."})}};var he=class{get _window(){return typeof window<"u"?window:{ReactNativeWebView:{postMessage:()=>{}},__GRANITE_NATIVE_EMITTER:{on:()=>()=>{}},__CONSTANT_HANDLER_MAP:{}}}postMessage(e){let t=this._window.ReactNativeWebView;if(!t)throw new Error("ReactNativeWebView is not available in browser environment");t.postMessage(JSON.stringify(e))}on(e,t){let r=this._window.__GRANITE_NATIVE_EMITTER;if(!r)throw new Error("__GRANITE_NATIVE_EMITTER is not available");return r.on(e,t)}getConstant(e){let t=this._window.__CONSTANT_HANDLER_MAP;if(t&&e in t)return t[e];throw new Error(`${e} is not a constant handler`)}},b=new he,ie=()=>Math.random().toString(36).substring(2,15),de=e=>{if(e&&e.__isError){let t=new Error(e.message);for(let[r,n]of Object.entries(e))t[r]=n;return t}return e};function d(e){return(...t)=>{let r=ie(),n=[],o=()=>{for(let s of n)s()};return new Promise((s,a)=>{n.push(b.on(`${e}/resolve/${r}`,i=>{o(),s(i)})),n.push(b.on(`${e}/reject/${r}`,i=>{o(),a(de(i))})),b.postMessage({type:"method",functionName:e,eventId:r,args:t})})}}function A(e){return t=>{let r=ie(),n=[b.on(`${e}/onEvent/${r}`,o=>{t.onEvent(o)}),b.on(`${e}/onError/${r}`,o=>{t.onError(de(o))})];return b.postMessage({type:"addEventListener",functionName:e,eventId:r,args:t.options}),()=>{b.postMessage({type:"removeEventListener",functionName:e,eventId:r}),n.forEach(o=>o())}}}function p(e){return()=>b.getConstant(e)}var or={getItem:d("getStorageItem"),setItem:d("setStorageItem"),removeItem:d("removeStorageItem"),clearItems:d("clearItems")},we=/^[v^~<>=]*?(\\d+)(?:\\.([x*]|\\d+)(?:\\.([x*]|\\d+)(?:\\.([x*]|\\d+))?(?:-([\\da-z\\\\-]+(?:\\.[\\da-z\\\\-]+)*))?(?:\\+[\\da-z\\\\-]+(?:\\.[\\da-z\\\\-]+)*)?)?)?$/i,Z=e=>["*","x","X"].includes(e),Q=e=>{let t=parseInt(e,10);return isNaN(t)?e:t},Ee=(e,t)=>typeof e==typeof t?[e,t]:[String(e),String(t)],be=(e,t)=>{if(Z(e)||Z(t))return 0;let[r,n]=Ee(Q(e),Q(t));return r>n?1:r<n?-1:0},ee=e=>{if(typeof e!="string")throw new TypeError("Invalid argument: expected a string");let t=e.match(we);if(!t)throw new Error(`Invalid semver: \'${e}\'`);let[,r,n,o,s,a]=t;return[r,n,o,s,a]},te=(e,t)=>{let r=Math.max(e.length,t.length);for(let n=0;n<r;n++){let o=e[n]??"0",s=t[n]??"0",a=be(o,s);if(a!==0)return a}return 0},Ae=(e,t)=>{let r=ee(e),n=ee(t),o=r.pop(),s=n.pop(),a=te(r,n);return a!==0?a:o&&s?te(o.split("."),s.split(".")):o?-1:s?1:0};function H(e){if(p("getOperationalEnvironment")()==="sandbox")return!0;let r=p("getTossAppVersion")(),o=p("getPlatformOS")()==="ios"?e.ios:e.android;return o===void 0?!1:o==="always"?!0:o==="never"?!1:Ae(r,o)>=0}function re(e){return d("processProductGrant")(e)}var sr={createOneTimePurchaseOrder:e=>{let t=H({android:"5.219.0",ios:"5.219.0"}),r=()=>{};if(!t)return r;let n=H({android:"5.231.1",ios:"5.230.0"}),{options:o,onEvent:s,onError:a}=e,i=o.sku??o.productId;return n?A("requestOneTimePurchase")({options:{sku:i},onEvent:async l=>{if(l.type==="purchased"){let u=await o.processProductGrant({orderId:l.data.orderId});await re({orderId:l.data.orderId,isProductGranted:u}).catch(a)}else s(l)},onError:l=>{a(l)}}):(d("iapCreateOneTimePurchaseOrder")({productId:i}).then(u=>{Promise.resolve(o.processProductGrant({orderId:u.orderId})).then(()=>{s({type:"success",data:u})}).catch(f=>{a(f)})}).catch(u=>{a(u)}),r)},createSubscriptionPurchaseOrder:e=>{let t=H({android:"5.248.0",ios:"5.249.0"}),r=()=>{};if(!t)return r;let{options:n,onEvent:o,onError:s}=e,{sku:a,offerId:i,processProductGrant:m}=n;return A("requestSubscriptionPurchase")({options:{sku:a,offerId:i??null},onEvent:async u=>{if(u.type==="purchased"){let f=await m({orderId:u.data.orderId,subscriptionId:u.data.subscriptionId});await re({orderId:u.data.orderId,isProductGranted:f}).catch(s)}else o(u)},onError:u=>{s(u)}})},getProductItemList:d("iapGetProductItemList"),getPendingOrders:d("getPendingOrders"),getCompletedOrRefundedOrders:d("getCompletedOrRefundedOrders"),completeProductGrant:d("completeProductGrant"),getSubscriptionInfo:d("getSubscriptionInfo")},ar=p("getSafeAreaInsets");var ir=p("getSafeAreaInsets");var dr={loadAppsInTossAdMob:Object.assign(A("loadAppsInTossAdMob"),{isSupported:p("loadAppsInTossAdMob_isSupported")}),showAppsInTossAdMob:Object.assign(A("showAppsInTossAdMob"),{isSupported:p("showAppsInTossAdMob_isSupported")}),isAppsInTossAdMobLoaded:Object.assign(d("isAppsInTossAdMobLoaded"),{isSupported:p("isAppsInTossAdMobLoaded_isSupported")})};var cr={getDeploymentId:p("getDeploymentId")},ur=p("deploymentId"),pr=p("brandDisplayName"),mr=p("brandIcon"),lr=p("brandPrimaryColor");var gr={addAccessoryButton:d("addAccessoryButton"),removeAccessoryButton:d("removeAccessoryButton")},_e=d("requestPermission"),Ce=d("getPermission"),Se=d("openPermissionDialog");function I({permission:e,handler:t,error:r}){let n=async(...o)=>{if(await _e(e)==="denied")throw new r;return t(...o)};return n.getPermission=()=>Ce(e),n.openPermissionDialog=()=>Se(e),n}var vr=I({handler:e=>d("fetchAlbumPhotos")(e),permission:{name:"photos",access:"read"},error:$}),wr=I({handler:e=>d("fetchContacts")(e),permission:{name:"contacts",access:"read"},error:j}),br=I({handler:e=>d("getCurrentLocation")(e),permission:{name:"geolocation",access:"access"},error:V}),_r=I({handler:e=>d("openCamera")(e),permission:{name:"camera",access:"access"},error:K}),Sr=I({handler:e=>d("setClipboardText")(e),permission:{name:"clipboard",access:"write"},error:Y}),Tr=I({handler:()=>d("getClipboardText")(),permission:{name:"clipboard",access:"read"},error:X}),Ie=d("getPermission"),Te=d("openPermissionDialog"),ce=e=>A("updateLocationEvent")({...e,onError:t=>{let r=new J;return t instanceof Error&&t.name===r.name?e.onError(r):e.onError(t)}});ce.getPermission=()=>Ie({name:"geolocation",access:"access"});ce.openPermissionDialog=()=>Te({name:"geolocation",access:"access"});var Rr=Object.assign(A("loadFullScreenAd"),{isSupported:p("loadFullScreenAd_isSupported")}),Lr=Object.assign(A("showFullScreenAd"),{isSupported:p("showFullScreenAd_isSupported")}),P=new WeakMap;function ye(e,t){let r=P.get(e);if(r)return r;let n=t(),o=!1,s={destroy(){o||(o=!0,P.get(e)===s&&P.delete(e),n.destroy())}};return P.set(e,s),s}function Re(){P=new WeakMap}var Le=d("openURL");function Pe(e){let t=xe(e);return Le(t)}function xe(e){return["http://","https://"].some(r=>e.startsWith(r))?De(e):e}function De(e){return`supertoss://web?url=${encodeURIComponent(e)}&external=true`}var ne="https://static.toss.im/ads/sdk/toss-ads-space-kit-1.3.0.js",oe=15e3,N=null;function C(){if(!(typeof window>"u"))return window.TossAdsSpaceKit}function Ne(){if(typeof window>"u"||typeof document>"u")return Promise.reject(new Error("Ads SDK can only be loaded in a browser environment."));let e=C();if(e)return Promise.resolve(e);if(N)return N;let t=new Promise((r,n)=>{let o=document.createElement("script"),s=()=>{o.removeEventListener("load",a),o.removeEventListener("error",i),window.clearTimeout(m),N=null},a=()=>{let l=C();if(l){s(),r(l);return}s(),n(new Error("Ads SDK script loaded but window.TossAdsSpaceKit was not exposed."))},i=()=>{s(),n(new Error(`Failed to load Ads SDK script from ${ne}.`))},m=window.setTimeout(()=>{s(),n(new Error(`Loading Ads SDK timed out after ${oe}ms.`))},oe);o.addEventListener("load",a),o.addEventListener("error",i),o.async=!0,o.src=ne,document.head.appendChild(o)});return N=t,t}var _=Object.assign(A("fetchTossAd"),{isSupported:p("fetchTossAd_isSupported")}),Me=d("tossAdEventLog"),Fe=new Set(["1","2"]),ue="\\uC798\\uBABB\\uB41C \\uC694\\uCCAD\\uC774\\uC5D0\\uC694. \\uD544\\uC694\\uD55C \\uAC12\\uC774 \\uBE44\\uC5B4 \\uC788\\uC5B4\\uC694.";function M(e){return e.trim()}function U(){return new Error(ue)}function Ge(){return{resultType:"FAIL",error:{reason:ue}}}function Be(e){return new Promise((t,r)=>{if(!_.isSupported()){r(new Error("fetchTossAd is not supported in this environment."));return}let n=M(e.adGroupId);if(n.length===0){r(U());return}return _({options:{...e,adGroupId:n},onEvent:t,onError:r})})}function se(e){let t=Array.isArray(e.ads)?e.ads.filter(r=>Fe.has(String(r.styleId))):[];return{requestId:e.requestId??"",status:e.status??"OK",ads:t,ext:e.ext}}function ke(e){return Oe(e)?e.resultType!=="SUCCESS"?e:e.success?{...e,success:se(e.success)}:{resultType:"FAIL",error:{reason:"fetchTossAd returned SUCCESS without payload"}}:Ve(e)?{resultType:"SUCCESS",success:se(e)}:{resultType:"FAIL",error:{reason:"Invalid response from fetchTossAd"}}}function Oe(e){return!!(e&&typeof e=="object"&&"resultType"in e)}function Ve(e){return!!(e&&typeof e=="object"&&"ads"in e)}function He(){return async(e,t)=>{let r=M(t.spaceUnitId);if(r.length===0)return Ge();try{let n=await Be({adGroupId:r,sdkId:"108",availableStyleIds:["1","2"]});return ke(n)}catch(n){return{resultType:"FAIL",error:{reason:n instanceof Error?n.message:"Unknown fetchTossAd error"}}}}}var L=null;function Ue(e){let{callbacks:t}=e,r=()=>t?.onInitialized?.(),n=a=>{let i=a instanceof Error?a:new Error(String(a));t?.onInitializationFailed?.(i)};if(C()?.isInitialized()){r();return}if(L!=null){L.then(r).catch(n);return}let s=Ne().then(a=>{if(a.isInitialized())return;let m={environment:"live",customAdFetcher:He(),opener:Pe};a.init(m)});L=s,s.then(r).catch(n).finally(()=>{L===s&&(L=null)})}function We(e,t,r={}){let{callbacks:n}=r,o=M(e),s=a=>{let i=a instanceof Error?a:new Error(String(a));n?.onAdFailedToRender?.({slotId:"",adGroupId:o,adMetadata:{},error:{code:0,message:i.message}})};try{let a=o;if(a.length===0)throw U();let i=C();if(!i)throw new Error("[toss-ad] Call initialize() before attaching an ad.");if(!i.banner)throw new Error("[toss-ad] Loaded TossAdsSpaceKit does not support banner ads.");let m=typeof t=="string"?document.querySelector(t):t;if(!m)throw new Error(`[toss-ad] Failed to find target element: ${t}`);let l={spaceId:a,autoLoad:!0,theme:r.theme,padding:r.padding,callbacks:me(o,r.callbacks)};i.banner.createSlot(m,l)}catch(a){s(a)}}var qe="16px 20px",ze="20px",$e="auto",je="blackAndWhite",Ke="expanded",h="toss-ads-attach",ae="toss-ads-attach-style",pe="data-toss-ads-attach-banner-wrapper";function Je(e){let t=e.ownerDocument;if(!t||t.getElementById(ae))return;let r=t.createElement("style");r.id=ae,r.textContent=`\n .${h} { background: #ffffff; }\n .${h}.toss-ads-tone-grey { background: #f2f4f7; }\n @media (prefers-color-scheme: dark) {\n .${h} { background: #17171c; }\n .${h}.toss-ads-tone-grey { background: #101013; }\n }\n .${h}.toss-ads-theme-light { background: #ffffff; }\n .${h}.toss-ads-theme-light.toss-ads-tone-grey { background: #f2f4f7; }\n .${h}.toss-ads-theme-dark { background: #17171c; }\n .${h}.toss-ads-theme-dark.toss-ads-tone-grey { background: #101013; }\n `;let n=t.head??t.body??t.documentElement;n&&n.appendChild(r)}function Xe(e){Array.from(e.children).forEach(t=>{t instanceof HTMLElement&&t.getAttribute(pe)==="true"&&e.removeChild(t)})}function Ye(e,t,r={}){let{callbacks:n,theme:o=$e,tone:s=je,variant:a=Ke}=r,i=M(e),m=u=>{let f=u instanceof Error?u:new Error(String(u));n?.onAdFailedToRender?.({slotId:"",adGroupId:i,adMetadata:{},error:{code:0,message:f.message}})},l=me(i,n);try{let u=i;if(u.length===0)throw U();let f=C();if(!f)throw new Error("[toss-ad] Call initialize() before attaching an ad.");if(!f.banner)throw new Error("[toss-ad] Loaded TossAdsSpaceKit does not support banner ads.");let R=typeof t=="string"?document.querySelector(t):t;if(!R)throw new Error(`[toss-ad] Failed to find target element: ${t}`);return ye(R,()=>{let g=document.createElement("div");g.style.width="100%",g.style.height="100%",g.style.boxSizing="border-box",g.style.display="flex",g.style.flexDirection="column",g.style.justifyContent="center",g.style.overflow="hidden",g.setAttribute(pe,"true"),a==="card"&&(g.style.padding="0 10px");let w=document.createElement("div");w.classList.add(h),s==="grey"&&w.classList.add("toss-ads-tone-grey"),o==="light"?w.classList.add("toss-ads-theme-light"):o==="dark"&&w.classList.add("toss-ads-theme-dark"),a==="card"&&(w.style.borderRadius="16px",w.style.overflow="hidden"),g.appendChild(w);let x=!1,W=null;try{Je(R),Xe(R),R.appendChild(g),x=!0;let O={spaceId:u,autoLoad:!0,theme:o==="auto"?void 0:o,renderPadding:ge=>ge==="1"?qe:ze,callbacks:l};W=f.banner.createSlot(w,O)}catch(O){throw x&&g.parentNode&&g.parentNode.removeChild(g),O}return{destroy(){W?.destroy(),x&&g.parentNode&&g.parentNode.removeChild(g),x=!1}}})}catch(u){return m(u),{destroy(){}}}}function Ze(e){let t=C();t?.banner&&t.banner.destroy(e)}function Qe(){let e=C();e?.banner&&(e.banner.destroyAll(),Re())}function me(e,t){if(!t)return;let r=n=>{let o={...n??{}};return o.adGroupId=o.adGroupId??o.spaceId??e,delete o.spaceId,o};return{onAdRendered:n=>t.onAdRendered?.(r(n)),onAdViewable:n=>t.onAdViewable?.(r(n)),onAdClicked:n=>t.onAdClicked?.(r(n)),onAdImpression:n=>{Me({log_name:"display_ads_all::impression__1px_banner",log_type:"event",params:{event_type:"impression",schema_id:1812034,request_id:n?.adMetadata?.requestId??""}}),t.onAdImpression?.(r(n))},onAdFailedToRender:n=>t.onAdFailedToRender?.({...r(n),error:n?.error??{code:0,message:"UNKNOWN"}}),onNoFill:n=>t.onNoFill?.(r(n))}}var Pr={initialize:Object.assign(Ue,{isSupported:_.isSupported}),attach:Object.assign(We,{isSupported:_.isSupported}),attachBanner:Object.assign(Ye,{isSupported:_.isSupported}),destroy:Object.assign(Ze,{isSupported:_.isSupported}),destroyAll:Object.assign(Qe,{isSupported:_.isSupported})},xr=Object.assign(d("getServerTime"),{isSupported:p("getServerTime_isSupported")}),Dr=Object.assign(d("requestReview"),{isSupported:p("requestReview_isSupported")});var F=class{_log=d("debugLog");log(t,r){try{this._log({log_name:`apps_in_toss_webview_${t}`,log_type:"debug",params:{...r,...this.getCommonParams()}})}catch{}}getCommonParams(){return{...this.getLocationInfo(),...this.getNavigatorInfo(),...this.getScreenInfo(),appName:window.__appsInToss.appName,deploymentId:window.__appsInToss.deploymentId,sessionId:window.__appsInToss.sessionId,isGame:window.__appsInToss.webViewType==="game",timestampMs:Date.now()}}getLocationInfo(){return{url:window.location.href,urlOrigin:window.location.origin,urlHost:window.location.hostname,urlPath:window.location.pathname,urlSearch:window.location.search}}getNavigatorInfo(){return{userAgent:navigator.userAgent,platform:navigator.platform,language:navigator.language,cookieEnabled:navigator.cookieEnabled,hardwareConcurrency:navigator.hardwareConcurrency,deviceMemory:navigator.deviceMemory?navigator.deviceMemory*1024*1024:void 0,maxTouchPoints:navigator.maxTouchPoints}}getScreenInfo(){return{screenWidth:screen.width,screenHeight:screen.height,availableScreenWidth:screen.availWidth,availableScreenHeight:screen.availHeight,devicePixelRatio:window.devicePixelRatio,colorDepth:screen.colorDepth,pixelDepth:screen.pixelDepth,viewportWidth:window.innerWidth,viewportHeight:window.innerHeight}}};var G=class{callbacks={};on(t,r){return typeof this.callbacks[t]>"u"&&(this.callbacks[t]=[]),this.callbacks[t].push(r),()=>{this.callbacks[t]=this.callbacks[t]?.filter(n=>n!==r)??[]}}emit(t,r){this.callbacks[t]?.forEach(n=>n(r))}};window.__appsInToss={appName:p("getAppName")(),deploymentId:p("getDeploymentId")(),webViewType:p("getWebViewType")(),sessionId:Math.random().toString(36).substring(2),eventEmitter:new G,debugLogger:new F};var T=/\\.(data|wasm|framework\\.js)(?:\\.gz|\\.br|\\.unityweb)?$/;function B(e){window.fetch=new Proxy(window.fetch,{apply:e})}(()=>{if(window.__appsInToss.webViewType!=="game"||typeof caches>"u")return;let e="@apps-in-toss/caches/",t=`${e}${window.__appsInToss.deploymentId}`;window.addEventListener("load",async()=>{let r=await caches.keys();for(let n of r)n.startsWith(e)&&n!==t&&await caches.delete(n)}),B(async(r,n,o)=>{let s=new Request(o[0],o[1]);if(!T.test(s.url))return await r.call(n,s);let a=await caches.open(t),i=await a.match(s);if(i){let l=i.headers.get("ETag"),u=i.headers.get("Last-Modified");l&&s.headers.set("If-None-Match",l),u&&s.headers.set("If-Modified-Since",u);let f=await r.call(n,s);return f.status===304?(i.__revalidateResponse=f,i):(a.put(s,f.clone()),f)}let m=await r.call(n,s);return a.put(s,m.clone()),m})})();B(async(e,t,r)=>{let n=new Request(r[0],r[1]),o=Date.now();window.__appsInToss.eventEmitter.emit("fetchRequest",{request:n});try{let s=await e.call(t,n);return window.__appsInToss.eventEmitter.emit("fetchResponse",{request:n,response:s,requestAt:o}),s}catch(s){throw window.__appsInToss.eventEmitter.emit("fetchError",{request:n,requestAt:o,error:s}),s}});HTMLCanvasElement.prototype.getContext=new Proxy(HTMLCanvasElement.prototype.getContext,{apply:(e,t,r)=>{let n=e.apply(t,r);return(n instanceof WebGL2RenderingContext||n instanceof WebGLRenderingContext)&&window.__appsInToss.eventEmitter.emit("webglGetContext",{canvas:t,context:n}),n}});var le=window.__appsInToss.debugLogger;le.log("load_start",{});window.addEventListener("load",()=>{let e=performance.timeOrigin,t=performance.getEntriesByType?.("navigation")[0]??null,r=typeof e<"u"&&t!==null,n=r?{navigationStartAtMs:e+t.startTime,navigationRedirectStartAtMs:e+t.redirectStart,navigationRedirectEndAtMs:e+t.redirectEnd,navigationRedirectCount:t.redirectCount,navigationServiceWorkerStartAtMs:e+t.workerStart,navigationFetchStartAtMs:e+t.fetchStart,navigationDomainLookupStartAtMs:e+t.domainLookupStart,navigationDomainLookupEndAtMs:e+t.domainLookupEnd,navigationConnectStartAtMs:e+t.connectStart,navigationSecureConnectStartAtMs:e+t.secureConnectionStart,navigationConnectEndAtMs:e+t.connectEnd,navigationRequestStartAtMs:e+t.requestStart,navigationResponseStartAtMs:e+t.responseStart,navigationResponseEndAtMs:e+t.responseEnd,navigationDomInteractiveAtMs:e+t.domInteractive,navigationDomContentLoadedEventStartAtMs:e+t.domContentLoadedEventStart,navigationDomContentLoadedEventEndAtMs:e+t.domContentLoadedEventEnd,navigationDomCompleteAtMs:e+t.domComplete}:{};le.log("load_complete",{isNavigationDebugSupported:r,...n})});function y(e,t){return parseFloat(e.toFixed(t))}(()=>{if(typeof performance.memory>"u"||typeof performance.memory.usedJSHeapSize>"u"||typeof performance.memory.totalJSHeapSize>"u"||typeof performance.memory.jsHeapSizeLimit>"u")return;function e(t){window.__appsInToss.debugLogger.log(t,{usedJSHeapSize:y(performance.memory.usedJSHeapSize/1024,2),totalJSHeapSize:y(performance.memory.totalJSHeapSize/1024,2),jsHeapSizeLimit:y(performance.memory.jsHeapSizeLimit/1024,2)})}e("memory_usage_first_0s"),setTimeout(()=>e("memory_usage_first_1s"),1e3),setTimeout(()=>e("memory_usage_first_10s"),1e4),setTimeout(()=>e("memory_usage_first_30s"),3e4),setTimeout(()=>e("memory_usage_first_60s"),6e4),setInterval(()=>e("memory_usage_every_180s"),18e4)})();(()=>{let e=window.__appsInToss.debugLogger,t=performance.timeOrigin;if(typeof t>"u"||typeof PerformanceObserver>"u")return;new PerformanceObserver(o=>{o.getEntries().forEach(a=>{a.name==="first-paint"?e.log("first_paint",{fpStartAtMs:t+a.startTime}):a.name==="first-contentful-paint"&&e.log("first_contentful_paint",{fcpStartAtMs:t+a.startTime})})}).observe({type:"paint"}),new PerformanceObserver(o=>{o.getEntries().forEach(a=>{e.log("largest_contentful_paint",{lcpStartAtMs:t+a.startTime,lcpRenderSize:a.size})})}).observe({type:"largest-contentful-paint"})})();(()=>{if(window.__appsInToss.webViewType!=="game")return;let e=window.__appsInToss.eventEmitter.on("webglGetContext",({canvas:t,context:r})=>{if(t.getAttribute("id")!=="unity-canvas")return;e();let n=r.getExtension("WEBGL_debug_renderer_info"),o=r.getParameter(r.MAX_VIEWPORT_DIMS),s={webGLRenderer:r.getParameter(r.RENDERER),webGLVendor:r.getParameter(r.VENDOR),webGLVersion:r.getParameter(r.VERSION),webGLShadingLanguageVersion:r.getParameter(r.SHADING_LANGUAGE_VERSION),webGLMaxTextureSize:r.getParameter(r.MAX_TEXTURE_SIZE),webGLMaxViewportWidth:o[0],webGLMaxViewportHeight:o[1],webGLMaxRenderbufferSize:r.getParameter(r.MAX_RENDERBUFFER_SIZE)},a=n?{webGLUnmaskedVendor:r.getParameter(n.UNMASKED_VENDOR_WEBGL),webGLUnmaskedRenderer:r.getParameter(n.UNMASKED_RENDERER_WEBGL)}:{};window.__appsInToss.debugLogger.log("unity_webgl_info",{...s,...a})})})();(()=>{if(window.__appsInToss.webViewType!=="game")return;let e=window.__appsInToss.debugLogger,t=window.__appsInToss.eventEmitter;t.on("fetchRequest",({request:n})=>{T.test(n.url)&&e.log("game_resource_download_start",{gameResourceRequestURL:n.url})});function r({request:n,requestAt:o,error:s}){e.log("game_resource_download_error",{gameResourceRequestURL:n.url,gameResourceRequestAtMs:o,gameResourceError:s instanceof Error?s.message:"Unknown Error"})}t.on("fetchResponse",async({request:n,requestAt:o,response:s})=>{if(!T.test(n.url))return;let a=await s.clone().blob().then(m=>y(m.size/1024,2)).catch(m=>(r({request:n,requestAt:o,error:m}),null));if(a===null)return;let i=Date.now();e.log("game_resource_download_end",{gameResourceRequestURL:n.url,gameResourceRequestAtMs:o,gameResourceResponseAtMs:i,gameResourceResponseSize:a,gameResourceResponseStatus:s.__revalidateResponse?.status??s.status,gameResourceDownloadDurationMs:i-o})}),t.on("fetchError",async({request:n,requestAt:o,error:s})=>{T.test(n.url)&&r({request:n,requestAt:o,error:s})})})();var k=[];function et(){let e=0;function t(r){let n=performance.now();if(r<n-1e3){k.push(e);return}e+=1,window.requestAnimationFrame(()=>t(r))}window.requestAnimationFrame(()=>t(performance.now()))}function tt(){if(k.length===0)return;let e=k;k=[];let t=rt(e).toSorted(),r={};for(let o=0;o<=100;o+=10){let s=t[Math.floor((t.length-1)*(o/100))];s&&(r[`fpsP${o}`]=s)}let n=t.reduce((o,s)=>o+s,0);r.fpsAverage=n/t.length,window.__appsInToss.debugLogger.log("fps_every_300s",r)}function rt(e){let t=new Set(e);return Array.from(t.values())}setInterval(()=>et(),1e3);setInterval(()=>tt(),3e5);})();\n';
|
|
213457
213424
|
0 && (module.exports = {
|
|
213458
213425
|
afterDocumentLoad,
|
|
213459
213426
|
beforeDocumentLoad
|