@apps-in-toss/web-framework 1.2.0 → 1.2.1
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/cli/chunk-AZQN2M6D.js +63 -0
- package/dist/cli/chunk-PT6B3KQJ.js +209904 -0
- package/dist/cli/lib-GNFDOQZX.js +1007 -0
- package/dist/cli/typescript-WPGJO2BO.js +6 -0
- package/dist/prebuilt/dev.android.js +601 -536
- package/dist/prebuilt/dev.ios.js +599 -534
- package/dist/prebuilt/prod.android.js +337 -433
- package/dist/prebuilt/prod.ios.js +337 -433
- package/dist/prebuilt/prod.json +14 -0
- package/package.json +8 -8
|
@@ -1462,136 +1462,6 @@ var global=typeof globalThis!=='undefined'?globalThis:typeof global!=='undefined
|
|
|
1462
1462
|
]);
|
|
1463
1463
|
return backEvent;
|
|
1464
1464
|
}
|
|
1465
|
-
function useBackEvent() {
|
|
1466
|
-
var context2 = (0, import_react9.useContext)(BackEventContext);
|
|
1467
|
-
var handlersRef = (0, import_react9.useRef)(/* @__PURE__ */ new Set()).current;
|
|
1468
|
-
var isVisible = useVisibility();
|
|
1469
|
-
if (context2 == null) {
|
|
1470
|
-
throw new Error("useBackEvent must be used within a BackEventProvider");
|
|
1471
|
-
}
|
|
1472
|
-
var contextAddEventListener = context2.addEventListener;
|
|
1473
|
-
var contextRemoveEventListener = context2.removeEventListener;
|
|
1474
|
-
var addEventListener = (0, import_react9.useCallback)(function() {
|
|
1475
|
-
for (var _len = arguments.length, handlers = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
1476
|
-
handlers[_key] = arguments[_key];
|
|
1477
|
-
}
|
|
1478
|
-
var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = void 0;
|
|
1479
|
-
try {
|
|
1480
|
-
for (var _iterator = handlers[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {
|
|
1481
|
-
var handler = _step.value;
|
|
1482
|
-
handlersRef.add(handler);
|
|
1483
|
-
contextAddEventListener(handler);
|
|
1484
|
-
}
|
|
1485
|
-
} catch (err) {
|
|
1486
|
-
_didIteratorError = true;
|
|
1487
|
-
_iteratorError = err;
|
|
1488
|
-
} finally {
|
|
1489
|
-
try {
|
|
1490
|
-
if (!_iteratorNormalCompletion && _iterator.return != null) {
|
|
1491
|
-
_iterator.return();
|
|
1492
|
-
}
|
|
1493
|
-
} finally {
|
|
1494
|
-
if (_didIteratorError) {
|
|
1495
|
-
throw _iteratorError;
|
|
1496
|
-
}
|
|
1497
|
-
}
|
|
1498
|
-
}
|
|
1499
|
-
}, [
|
|
1500
|
-
contextAddEventListener,
|
|
1501
|
-
handlersRef
|
|
1502
|
-
]);
|
|
1503
|
-
var removeEventListener = (0, import_react9.useCallback)(function() {
|
|
1504
|
-
for (var _len = arguments.length, handlers = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
1505
|
-
handlers[_key] = arguments[_key];
|
|
1506
|
-
}
|
|
1507
|
-
var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = void 0;
|
|
1508
|
-
try {
|
|
1509
|
-
for (var _iterator = handlers[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {
|
|
1510
|
-
var handler = _step.value;
|
|
1511
|
-
handlersRef.delete(handler);
|
|
1512
|
-
contextRemoveEventListener(handler);
|
|
1513
|
-
}
|
|
1514
|
-
} catch (err) {
|
|
1515
|
-
_didIteratorError = true;
|
|
1516
|
-
_iteratorError = err;
|
|
1517
|
-
} finally {
|
|
1518
|
-
try {
|
|
1519
|
-
if (!_iteratorNormalCompletion && _iterator.return != null) {
|
|
1520
|
-
_iterator.return();
|
|
1521
|
-
}
|
|
1522
|
-
} finally {
|
|
1523
|
-
if (_didIteratorError) {
|
|
1524
|
-
throw _iteratorError;
|
|
1525
|
-
}
|
|
1526
|
-
}
|
|
1527
|
-
}
|
|
1528
|
-
}, [
|
|
1529
|
-
contextRemoveEventListener,
|
|
1530
|
-
handlersRef
|
|
1531
|
-
]);
|
|
1532
|
-
(0, import_react9.useEffect)(function() {
|
|
1533
|
-
if (!isVisible) {
|
|
1534
|
-
return;
|
|
1535
|
-
}
|
|
1536
|
-
var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = void 0;
|
|
1537
|
-
try {
|
|
1538
|
-
for (var _iterator = handlersRef[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {
|
|
1539
|
-
var handler = _step.value;
|
|
1540
|
-
contextAddEventListener(handler);
|
|
1541
|
-
}
|
|
1542
|
-
} catch (err) {
|
|
1543
|
-
_didIteratorError = true;
|
|
1544
|
-
_iteratorError = err;
|
|
1545
|
-
} finally {
|
|
1546
|
-
try {
|
|
1547
|
-
if (!_iteratorNormalCompletion && _iterator.return != null) {
|
|
1548
|
-
_iterator.return();
|
|
1549
|
-
}
|
|
1550
|
-
} finally {
|
|
1551
|
-
if (_didIteratorError) {
|
|
1552
|
-
throw _iteratorError;
|
|
1553
|
-
}
|
|
1554
|
-
}
|
|
1555
|
-
}
|
|
1556
|
-
return function() {
|
|
1557
|
-
var _iteratorNormalCompletion2 = true, _didIteratorError2 = false, _iteratorError2 = void 0;
|
|
1558
|
-
try {
|
|
1559
|
-
for (var _iterator2 = handlersRef[Symbol.iterator](), _step2; !(_iteratorNormalCompletion2 = (_step2 = _iterator2.next()).done); _iteratorNormalCompletion2 = true) {
|
|
1560
|
-
var handler2 = _step2.value;
|
|
1561
|
-
contextRemoveEventListener(handler2);
|
|
1562
|
-
}
|
|
1563
|
-
} catch (err) {
|
|
1564
|
-
_didIteratorError2 = true;
|
|
1565
|
-
_iteratorError2 = err;
|
|
1566
|
-
} finally {
|
|
1567
|
-
try {
|
|
1568
|
-
if (!_iteratorNormalCompletion2 && _iterator2.return != null) {
|
|
1569
|
-
_iterator2.return();
|
|
1570
|
-
}
|
|
1571
|
-
} finally {
|
|
1572
|
-
if (_didIteratorError2) {
|
|
1573
|
-
throw _iteratorError2;
|
|
1574
|
-
}
|
|
1575
|
-
}
|
|
1576
|
-
}
|
|
1577
|
-
};
|
|
1578
|
-
}, [
|
|
1579
|
-
contextAddEventListener,
|
|
1580
|
-
contextRemoveEventListener,
|
|
1581
|
-
handlersRef,
|
|
1582
|
-
isVisible
|
|
1583
|
-
]);
|
|
1584
|
-
var backEvent = (0, import_react9.useMemo)(function() {
|
|
1585
|
-
return {
|
|
1586
|
-
addEventListener,
|
|
1587
|
-
removeEventListener
|
|
1588
|
-
};
|
|
1589
|
-
}, [
|
|
1590
|
-
addEventListener,
|
|
1591
|
-
removeEventListener
|
|
1592
|
-
]);
|
|
1593
|
-
return backEvent;
|
|
1594
|
-
}
|
|
1595
1465
|
function useBackEventContext() {
|
|
1596
1466
|
var context2 = (0, import_react9.useContext)(BackEventContext);
|
|
1597
1467
|
if (context2 == null) {
|
|
@@ -10281,18 +10151,7 @@ var global=typeof globalThis!=='undefined'?globalThis:typeof global!=='undefined
|
|
|
10281
10151
|
});
|
|
10282
10152
|
|
|
10283
10153
|
// ../../.yarn/__virtual__/@granite-js-react-native-virtual-3bd9b9ab6b/0/cache/@granite-js-react-native-npm-0.1.22-f7a1f119e2-ae5bd16544.zip/node_modules/@granite-js/react-native/src/event/useGraniteEvent.ts
|
|
10284
|
-
|
|
10285
|
-
var backEvent = useBackEvent();
|
|
10286
|
-
var event = (0, import_react59.useMemo)(function() {
|
|
10287
|
-
return new GraniteEvent([
|
|
10288
|
-
new BackEvent(backEvent)
|
|
10289
|
-
]);
|
|
10290
|
-
}, [
|
|
10291
|
-
backEvent
|
|
10292
|
-
]);
|
|
10293
|
-
return event;
|
|
10294
|
-
}
|
|
10295
|
-
var import_react59, BackEvent;
|
|
10154
|
+
var import_react59;
|
|
10296
10155
|
var init_useGraniteEvent = __esm({
|
|
10297
10156
|
"../../.yarn/__virtual__/@granite-js-react-native-virtual-3bd9b9ab6b/0/cache/@granite-js-react-native-npm-0.1.22-f7a1f119e2-ae5bd16544.zip/node_modules/@granite-js/react-native/src/event/useGraniteEvent.ts"() {
|
|
10298
10157
|
init_class_call_check();
|
|
@@ -10302,42 +10161,6 @@ var global=typeof globalThis!=='undefined'?globalThis:typeof global!=='undefined
|
|
|
10302
10161
|
import_react59 = __toESM(require_react());
|
|
10303
10162
|
init_abstract();
|
|
10304
10163
|
init_useBackEvent();
|
|
10305
|
-
BackEvent = /* @__PURE__ */ function(GraniteEventDefinition3) {
|
|
10306
|
-
"use strict";
|
|
10307
|
-
_inherits(BackEvent2, GraniteEventDefinition3);
|
|
10308
|
-
var _super = _create_super(BackEvent2);
|
|
10309
|
-
function BackEvent2(backEventControls) {
|
|
10310
|
-
_class_call_check(this, BackEvent2);
|
|
10311
|
-
var _this;
|
|
10312
|
-
_this = _super.call(this);
|
|
10313
|
-
_this.backEventControls = backEventControls;
|
|
10314
|
-
_this.name = "backEvent";
|
|
10315
|
-
_this.ref = {
|
|
10316
|
-
remove: function() {
|
|
10317
|
-
}
|
|
10318
|
-
};
|
|
10319
|
-
return _this;
|
|
10320
|
-
}
|
|
10321
|
-
_create_class(BackEvent2, [
|
|
10322
|
-
{
|
|
10323
|
-
key: "remove",
|
|
10324
|
-
value: function remove() {
|
|
10325
|
-
this.ref.remove();
|
|
10326
|
-
}
|
|
10327
|
-
},
|
|
10328
|
-
{
|
|
10329
|
-
key: "listener",
|
|
10330
|
-
value: function listener(_17, onEvent) {
|
|
10331
|
-
var _this = this;
|
|
10332
|
-
this.backEventControls.addEventListener(onEvent);
|
|
10333
|
-
this.ref.remove = function() {
|
|
10334
|
-
return _this.backEventControls.removeEventListener(onEvent);
|
|
10335
|
-
};
|
|
10336
|
-
}
|
|
10337
|
-
}
|
|
10338
|
-
]);
|
|
10339
|
-
return BackEvent2;
|
|
10340
|
-
}(GraniteEventDefinition);
|
|
10341
10164
|
}
|
|
10342
10165
|
});
|
|
10343
10166
|
|
|
@@ -11939,21 +11762,6 @@ var global=typeof globalThis!=='undefined'?globalThis:typeof global!=='undefined
|
|
|
11939
11762
|
function onVisibilityChangedByTransparentServiceWeb(eventParams) {
|
|
11940
11763
|
return appsInTossEvent.addEventListener("onVisibilityChangedByTransparentServiceWeb", eventParams);
|
|
11941
11764
|
}
|
|
11942
|
-
function closeView2() {
|
|
11943
|
-
return _closeView2.apply(this, arguments);
|
|
11944
|
-
}
|
|
11945
|
-
function _closeView2() {
|
|
11946
|
-
_closeView2 = // src/BedrockModule/native-modules/natives/closeView.ts
|
|
11947
|
-
_async_to_generator(function() {
|
|
11948
|
-
return __generator(this, function(_state) {
|
|
11949
|
-
return [
|
|
11950
|
-
2,
|
|
11951
|
-
BedrockModule.closeView()
|
|
11952
|
-
];
|
|
11953
|
-
});
|
|
11954
|
-
});
|
|
11955
|
-
return _closeView2.apply(this, arguments);
|
|
11956
|
-
}
|
|
11957
11765
|
function setIosSwipeGestureEnabled(options) {
|
|
11958
11766
|
return _setIosSwipeGestureEnabled.apply(this, arguments);
|
|
11959
11767
|
}
|
|
@@ -43546,11 +43354,11 @@ var global=typeof globalThis!=='undefined'?globalThis:typeof global!=='undefined
|
|
|
43546
43354
|
});
|
|
43547
43355
|
|
|
43548
43356
|
// ../../.yarn/__virtual__/@apps-in-toss-native-modules-virtual-86e9653158/1/apps-in-toss-packages/native-modules/src/BedrockModule/native-modules/natives/closeView.ts
|
|
43549
|
-
function
|
|
43550
|
-
return
|
|
43357
|
+
function closeView2() {
|
|
43358
|
+
return _closeView2.apply(this, arguments);
|
|
43551
43359
|
}
|
|
43552
|
-
function
|
|
43553
|
-
|
|
43360
|
+
function _closeView2() {
|
|
43361
|
+
_closeView2 = _async_to_generator(function() {
|
|
43554
43362
|
return __generator(this, function(_state) {
|
|
43555
43363
|
return [
|
|
43556
43364
|
2,
|
|
@@ -43558,7 +43366,7 @@ var global=typeof globalThis!=='undefined'?globalThis:typeof global!=='undefined
|
|
|
43558
43366
|
];
|
|
43559
43367
|
});
|
|
43560
43368
|
});
|
|
43561
|
-
return
|
|
43369
|
+
return _closeView2.apply(this, arguments);
|
|
43562
43370
|
}
|
|
43563
43371
|
var init_closeView2 = __esm({
|
|
43564
43372
|
"../../.yarn/__virtual__/@apps-in-toss-native-modules-virtual-86e9653158/1/apps-in-toss-packages/native-modules/src/BedrockModule/native-modules/natives/closeView.ts"() {
|
|
@@ -44495,7 +44303,7 @@ var global=typeof globalThis!=='undefined'?globalThis:typeof global!=='undefined
|
|
|
44495
44303
|
return checkoutPayment;
|
|
44496
44304
|
},
|
|
44497
44305
|
closeView: function() {
|
|
44498
|
-
return
|
|
44306
|
+
return closeView2;
|
|
44499
44307
|
},
|
|
44500
44308
|
eventLog: function() {
|
|
44501
44309
|
return eventLog2;
|
|
@@ -46301,6 +46109,7 @@ var global=typeof globalThis!=='undefined'?globalThis:typeof global!=='undefined
|
|
|
46301
46109
|
return __generator(this, function(_state) {
|
|
46302
46110
|
switch (_state.label) {
|
|
46303
46111
|
case 0:
|
|
46112
|
+
logging.closeButtonClick();
|
|
46304
46113
|
return [
|
|
46305
46114
|
4,
|
|
46306
46115
|
openConfirm({
|
|
@@ -46329,18 +46138,6 @@ var global=typeof globalThis!=='undefined'?globalThis:typeof global!=='undefined
|
|
|
46329
46138
|
logging,
|
|
46330
46139
|
openConfirm
|
|
46331
46140
|
]);
|
|
46332
|
-
(0, import_react223.useEffect)(function() {
|
|
46333
|
-
var handleAndroidBackEvent = function() {
|
|
46334
|
-
handleGameWebviewClose();
|
|
46335
|
-
return true;
|
|
46336
|
-
};
|
|
46337
|
-
import_react_native229.BackHandler.addEventListener("hardwareBackPress", handleAndroidBackEvent);
|
|
46338
|
-
return function() {
|
|
46339
|
-
return import_react_native229.BackHandler.removeEventListener("hardwareBackPress", handleAndroidBackEvent);
|
|
46340
|
-
};
|
|
46341
|
-
}, [
|
|
46342
|
-
handleGameWebviewClose
|
|
46343
|
-
]);
|
|
46344
46141
|
return /* @__PURE__ */ (0, import_jsx_runtime225.jsxs)(import_jsx_runtime225.Fragment, {
|
|
46345
46142
|
children: [
|
|
46346
46143
|
/* @__PURE__ */ (0, import_jsx_runtime225.jsx)(PageNavbar, {
|
|
@@ -46366,7 +46163,6 @@ var global=typeof globalThis!=='undefined'?globalThis:typeof global!=='undefined
|
|
|
46366
46163
|
fixedRightButton: initialAccessoryButton,
|
|
46367
46164
|
onPressDots: openMoreButtonBottomSheet,
|
|
46368
46165
|
onPressClose: function() {
|
|
46369
|
-
logging.closeButtonClick();
|
|
46370
46166
|
handleGameWebviewClose();
|
|
46371
46167
|
},
|
|
46372
46168
|
theme: "dark"
|
|
@@ -46376,7 +46172,7 @@ var global=typeof globalThis!=='undefined'?globalThis:typeof global!=='undefined
|
|
|
46376
46172
|
});
|
|
46377
46173
|
}
|
|
46378
46174
|
function PartnerWebviewNavigationBar(param) {
|
|
46379
|
-
var
|
|
46175
|
+
var onBackButtonClick = param.onBackButtonClick, onHomeButtonClick = param.onHomeButtonClick;
|
|
46380
46176
|
var globals = getAppsInTossGlobals();
|
|
46381
46177
|
var captureExitLog = useCaptureExitLog().captureExitLog;
|
|
46382
46178
|
var logging = useNavigationBarLogging();
|
|
@@ -46388,13 +46184,6 @@ var global=typeof globalThis!=='undefined'?globalThis:typeof global!=='undefined
|
|
|
46388
46184
|
var _parsedNavigationBar_withBackButton;
|
|
46389
46185
|
var withBackButton = (_parsedNavigationBar_withBackButton = parsedNavigationBar === null || parsedNavigationBar === void 0 ? void 0 : parsedNavigationBar.withBackButton) !== null && _parsedNavigationBar_withBackButton !== void 0 ? _parsedNavigationBar_withBackButton : true;
|
|
46390
46186
|
var initialAccessoryButton = parsedNavigationBar === null || parsedNavigationBar === void 0 ? void 0 : parsedNavigationBar.initialAccessoryButton;
|
|
46391
|
-
var handlePressTitle = (0, import_react225.useCallback)(function() {
|
|
46392
|
-
logging.homeButtonClick();
|
|
46393
|
-
handleHomeIconButtonClick();
|
|
46394
|
-
}, [
|
|
46395
|
-
handleHomeIconButtonClick,
|
|
46396
|
-
logging
|
|
46397
|
-
]);
|
|
46398
46187
|
var handleClose = (0, import_react225.useCallback)(/* @__PURE__ */ _async_to_generator(function() {
|
|
46399
46188
|
var isConfirmed;
|
|
46400
46189
|
return __generator(this, function(_state) {
|
|
@@ -46436,103 +46225,20 @@ var global=typeof globalThis!=='undefined'?globalThis:typeof global!=='undefined
|
|
|
46436
46225
|
icon: toIcon(globals.brandIcon),
|
|
46437
46226
|
onPressDots: openMoreButtonBottomSheet,
|
|
46438
46227
|
contentVisible: true,
|
|
46439
|
-
onPressTitle: withHomeButton ?
|
|
46228
|
+
onPressTitle: withHomeButton ? onHomeButtonClick : void 0,
|
|
46440
46229
|
onPressClose: handleClose,
|
|
46441
46230
|
withHome: withHomeButton,
|
|
46442
46231
|
fixedRightButton: initialAccessoryButton,
|
|
46443
46232
|
children: /* @__PURE__ */ (0, import_jsx_runtime227.jsx)(NavigationLeft2, {
|
|
46444
46233
|
visible: withBackButton,
|
|
46445
46234
|
children: /* @__PURE__ */ (0, import_jsx_runtime227.jsx)(NavigationBackButton2, {
|
|
46446
|
-
onPress:
|
|
46235
|
+
onPress: onBackButtonClick,
|
|
46447
46236
|
canGoBack: false
|
|
46448
46237
|
})
|
|
46449
46238
|
})
|
|
46450
46239
|
})
|
|
46451
46240
|
});
|
|
46452
46241
|
}
|
|
46453
|
-
function mergeRefs4() {
|
|
46454
|
-
for (var _len = arguments.length, refs = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
46455
|
-
refs[_key] = arguments[_key];
|
|
46456
|
-
}
|
|
46457
|
-
return function(value) {
|
|
46458
|
-
refs.forEach(function(ref) {
|
|
46459
|
-
if (typeof ref === "function") {
|
|
46460
|
-
ref(value);
|
|
46461
|
-
} else if (ref != null) {
|
|
46462
|
-
ref.current = value;
|
|
46463
|
-
}
|
|
46464
|
-
});
|
|
46465
|
-
};
|
|
46466
|
-
}
|
|
46467
|
-
function reducer(state, action) {
|
|
46468
|
-
switch (action.type) {
|
|
46469
|
-
case "NAVIGATION_CHANGE": {
|
|
46470
|
-
var url = action.url, canGoForward = action.canGoForward;
|
|
46471
|
-
if (state.stack.length === 0) {
|
|
46472
|
-
return {
|
|
46473
|
-
stack: [
|
|
46474
|
-
url
|
|
46475
|
-
],
|
|
46476
|
-
index: 0
|
|
46477
|
-
};
|
|
46478
|
-
}
|
|
46479
|
-
var stack = state.stack, index = state.index;
|
|
46480
|
-
var cur = stack[index];
|
|
46481
|
-
if (url === cur) {
|
|
46482
|
-
return state;
|
|
46483
|
-
}
|
|
46484
|
-
var prev = index > 0 ? stack[index - 1] : void 0;
|
|
46485
|
-
var next = index < stack.length - 1 ? stack[index + 1] : void 0;
|
|
46486
|
-
if (prev && url === prev && canGoForward) {
|
|
46487
|
-
return _object_spread_props(_object_spread({}, state), {
|
|
46488
|
-
index: index - 1
|
|
46489
|
-
});
|
|
46490
|
-
}
|
|
46491
|
-
if (next && url === next) {
|
|
46492
|
-
return _object_spread_props(_object_spread({}, state), {
|
|
46493
|
-
index: index + 1
|
|
46494
|
-
});
|
|
46495
|
-
}
|
|
46496
|
-
var base = stack.slice(0, index + 1);
|
|
46497
|
-
var nextStack = _to_consumable_array(base).concat([
|
|
46498
|
-
url
|
|
46499
|
-
]);
|
|
46500
|
-
return {
|
|
46501
|
-
stack: nextStack,
|
|
46502
|
-
index: nextStack.length - 1
|
|
46503
|
-
};
|
|
46504
|
-
}
|
|
46505
|
-
default:
|
|
46506
|
-
return state;
|
|
46507
|
-
}
|
|
46508
|
-
}
|
|
46509
|
-
function useWebViewHistory() {
|
|
46510
|
-
var _useReducer = _sliced_to_array((0, import_react226.useReducer)(reducer, INITIAL_STATE), 2), state = _useReducer[0], dispatch = _useReducer[1];
|
|
46511
|
-
var onNavigationStateChange = (0, import_react226.useCallback)(function(param) {
|
|
46512
|
-
var url = param.url, canGoForward2 = param.canGoForward;
|
|
46513
|
-
dispatch({
|
|
46514
|
-
type: "NAVIGATION_CHANGE",
|
|
46515
|
-
url,
|
|
46516
|
-
canGoForward: canGoForward2
|
|
46517
|
-
});
|
|
46518
|
-
}, []);
|
|
46519
|
-
var _useMemo2 = (0, import_react226.useMemo)(function() {
|
|
46520
|
-
var canBack = state.index > 0;
|
|
46521
|
-
var canFwd = state.index >= 0 && state.index < state.stack.length - 1;
|
|
46522
|
-
return {
|
|
46523
|
-
canGoBack: canBack,
|
|
46524
|
-
canGoForward: canFwd
|
|
46525
|
-
};
|
|
46526
|
-
}, [
|
|
46527
|
-
state.index,
|
|
46528
|
-
state.stack.length
|
|
46529
|
-
]), canGoBack = _useMemo2.canGoBack, canGoForward = _useMemo2.canGoForward;
|
|
46530
|
-
return {
|
|
46531
|
-
onNavigationStateChange,
|
|
46532
|
-
canGoBack,
|
|
46533
|
-
canGoForward
|
|
46534
|
-
};
|
|
46535
|
-
}
|
|
46536
46242
|
function serializeError(error) {
|
|
46537
46243
|
return JSON.stringify(error, function(_17, value) {
|
|
46538
46244
|
if (_instanceof1(value, Error)) {
|
|
@@ -46593,8 +46299,8 @@ var global=typeof globalThis!=='undefined'?globalThis:typeof global!=='undefined
|
|
|
46593
46299
|
}
|
|
46594
46300
|
function useBridgeHandler(param) {
|
|
46595
46301
|
var onMessage = param.onMessage, constantHandlerMap = param.constantHandlerMap, asyncHandlerMap = param.asyncHandlerMap, eventListenerMap = param.eventListenerMap, originalInjectedJavaScript = param.injectedJavaScript;
|
|
46596
|
-
var ref = (0,
|
|
46597
|
-
var injectedJavaScript = (0,
|
|
46302
|
+
var ref = (0, import_react226.useRef)(null);
|
|
46303
|
+
var injectedJavaScript = (0, import_react226.useMemo)(function() {
|
|
46598
46304
|
return [
|
|
46599
46305
|
"window.__CONSTANT_HANDLER_MAP = ".concat(JSON.stringify(Object.entries(constantHandlerMap).reduce(function(acc, param2) {
|
|
46600
46306
|
var _param = _sliced_to_array(param2, 2), key = _param[0], value = _param[1];
|
|
@@ -46621,7 +46327,7 @@ var global=typeof globalThis!=='undefined'?globalThis:typeof global!=='undefined
|
|
|
46621
46327
|
(_ref_current = ref.current) === null || _ref_current === void 0 ? void 0 : _ref_current.injectJavaScript("\n window.__GRANITE_NATIVE_EMITTER.emit('".concat(functionName, "/onError/").concat(eventId, "', ").concat(serializedError, ");\n "));
|
|
46622
46328
|
};
|
|
46623
46329
|
};
|
|
46624
|
-
var $onMessage = (0,
|
|
46330
|
+
var $onMessage = (0, import_react226.useCallback)(
|
|
46625
46331
|
function() {
|
|
46626
46332
|
var _ref = _async_to_generator(function(e62) {
|
|
46627
46333
|
var data, _eventListenerMap_data_functionName, handleOnEvent, handleOnError, remove, key, remove1, _ref_current;
|
|
@@ -46691,6 +46397,229 @@ var global=typeof globalThis!=='undefined'?globalThis:typeof global!=='undefined
|
|
|
46691
46397
|
onMessage: $onMessage
|
|
46692
46398
|
};
|
|
46693
46399
|
}
|
|
46400
|
+
function reducer(state, action) {
|
|
46401
|
+
switch (action.type) {
|
|
46402
|
+
case "NAVIGATION_CHANGE": {
|
|
46403
|
+
var url = action.url, canGoForward = action.canGoForward;
|
|
46404
|
+
if (state.stack.length === 0) {
|
|
46405
|
+
return {
|
|
46406
|
+
stack: [
|
|
46407
|
+
url
|
|
46408
|
+
],
|
|
46409
|
+
index: 0
|
|
46410
|
+
};
|
|
46411
|
+
}
|
|
46412
|
+
var stack = state.stack, index = state.index;
|
|
46413
|
+
var cur = stack[index];
|
|
46414
|
+
if (url === cur) {
|
|
46415
|
+
return state;
|
|
46416
|
+
}
|
|
46417
|
+
var prev = index > 0 ? stack[index - 1] : void 0;
|
|
46418
|
+
var next = index < stack.length - 1 ? stack[index + 1] : void 0;
|
|
46419
|
+
if (prev && url === prev && canGoForward) {
|
|
46420
|
+
return _object_spread_props(_object_spread({}, state), {
|
|
46421
|
+
index: index - 1
|
|
46422
|
+
});
|
|
46423
|
+
}
|
|
46424
|
+
if (next && url === next) {
|
|
46425
|
+
return _object_spread_props(_object_spread({}, state), {
|
|
46426
|
+
index: index + 1
|
|
46427
|
+
});
|
|
46428
|
+
}
|
|
46429
|
+
var base = stack.slice(0, index + 1);
|
|
46430
|
+
var nextStack = _to_consumable_array(base).concat([
|
|
46431
|
+
url
|
|
46432
|
+
]);
|
|
46433
|
+
return {
|
|
46434
|
+
stack: nextStack,
|
|
46435
|
+
index: nextStack.length - 1
|
|
46436
|
+
};
|
|
46437
|
+
}
|
|
46438
|
+
default:
|
|
46439
|
+
return state;
|
|
46440
|
+
}
|
|
46441
|
+
}
|
|
46442
|
+
function useWebViewHistory() {
|
|
46443
|
+
var _useReducer = _sliced_to_array((0, import_react228.useReducer)(reducer, INITIAL_STATE), 2), state = _useReducer[0], dispatch = _useReducer[1];
|
|
46444
|
+
var onNavigationStateChange = (0, import_react228.useCallback)(function(param) {
|
|
46445
|
+
var url = param.url, canGoForward2 = param.canGoForward;
|
|
46446
|
+
dispatch({
|
|
46447
|
+
type: "NAVIGATION_CHANGE",
|
|
46448
|
+
url,
|
|
46449
|
+
canGoForward: canGoForward2
|
|
46450
|
+
});
|
|
46451
|
+
}, []);
|
|
46452
|
+
var _useMemo3 = (0, import_react228.useMemo)(function() {
|
|
46453
|
+
var canBack = state.index > 0;
|
|
46454
|
+
var canFwd = state.index >= 0 && state.index < state.stack.length - 1;
|
|
46455
|
+
return {
|
|
46456
|
+
canGoBack: canBack,
|
|
46457
|
+
canGoForward: canFwd
|
|
46458
|
+
};
|
|
46459
|
+
}, [
|
|
46460
|
+
state.index,
|
|
46461
|
+
state.stack.length
|
|
46462
|
+
]), canGoBack = _useMemo3.canGoBack, canGoForward = _useMemo3.canGoForward;
|
|
46463
|
+
return {
|
|
46464
|
+
onNavigationStateChange,
|
|
46465
|
+
hasHistory: canGoBack,
|
|
46466
|
+
canGoForward
|
|
46467
|
+
};
|
|
46468
|
+
}
|
|
46469
|
+
function useWebBackHandler(webViewRef) {
|
|
46470
|
+
var captureExitLog = useCaptureExitLog().captureExitLog;
|
|
46471
|
+
var _useWebViewHistory = useWebViewHistory(), hasHistory = _useWebViewHistory.hasHistory, onNavigationStateChange = _useWebViewHistory.onNavigationStateChange;
|
|
46472
|
+
var _useBackEventState = useBackEventState(), webBackHandlersRef = _useBackEventState.handlersRef, hasWebBackEvent = _useBackEventState.hasBackEvent, addWebBackEventListener = _useBackEventState.addEventListener, removeWebBackEventListener = _useBackEventState.removeEventListener;
|
|
46473
|
+
var logging = useNavigationBarLogging();
|
|
46474
|
+
var openConfirm = useDialog().openConfirm;
|
|
46475
|
+
var global2 = getAppsInTossGlobals();
|
|
46476
|
+
var addEventListener = (0, import_react227.useCallback)(function(handler) {
|
|
46477
|
+
addWebBackEventListener(handler);
|
|
46478
|
+
}, [
|
|
46479
|
+
addWebBackEventListener
|
|
46480
|
+
]);
|
|
46481
|
+
var removeEventListener = (0, import_react227.useCallback)(function(handler) {
|
|
46482
|
+
removeWebBackEventListener(handler);
|
|
46483
|
+
}, [
|
|
46484
|
+
removeWebBackEventListener
|
|
46485
|
+
]);
|
|
46486
|
+
var handleWebBack = (0, import_react227.useCallback)(/* @__PURE__ */ _async_to_generator(function() {
|
|
46487
|
+
var _iteratorNormalCompletion, _didIteratorError, _iteratorError, _iterator, _step, handler, _webViewRef_current, isConfirmed;
|
|
46488
|
+
return __generator(this, function(_state) {
|
|
46489
|
+
switch (_state.label) {
|
|
46490
|
+
case 0:
|
|
46491
|
+
if (hasWebBackEvent) {
|
|
46492
|
+
_iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = void 0;
|
|
46493
|
+
try {
|
|
46494
|
+
for (_iterator = webBackHandlersRef[Symbol.iterator](); !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {
|
|
46495
|
+
handler = _step.value;
|
|
46496
|
+
handler();
|
|
46497
|
+
}
|
|
46498
|
+
} catch (err) {
|
|
46499
|
+
_didIteratorError = true;
|
|
46500
|
+
_iteratorError = err;
|
|
46501
|
+
} finally {
|
|
46502
|
+
try {
|
|
46503
|
+
if (!_iteratorNormalCompletion && _iterator.return != null) {
|
|
46504
|
+
_iterator.return();
|
|
46505
|
+
}
|
|
46506
|
+
} finally {
|
|
46507
|
+
if (_didIteratorError) {
|
|
46508
|
+
throw _iteratorError;
|
|
46509
|
+
}
|
|
46510
|
+
}
|
|
46511
|
+
}
|
|
46512
|
+
return [
|
|
46513
|
+
2
|
|
46514
|
+
];
|
|
46515
|
+
}
|
|
46516
|
+
if (!hasHistory) return [
|
|
46517
|
+
3,
|
|
46518
|
+
1
|
|
46519
|
+
];
|
|
46520
|
+
(_webViewRef_current = webViewRef.current) === null || _webViewRef_current === void 0 ? void 0 : _webViewRef_current.injectJavaScript(HISTORY_BACK_SCRIPT);
|
|
46521
|
+
return [
|
|
46522
|
+
3,
|
|
46523
|
+
3
|
|
46524
|
+
];
|
|
46525
|
+
case 1:
|
|
46526
|
+
return [
|
|
46527
|
+
4,
|
|
46528
|
+
openConfirm({
|
|
46529
|
+
title: "".concat(josa(global2.brandDisplayName, "\uC744/\uB97C"), " \uC885\uB8CC\uD560\uAE4C\uC694?"),
|
|
46530
|
+
leftButton: "\uCDE8\uC18C",
|
|
46531
|
+
rightButton: "\uC885\uB8CC\uD558\uAE30",
|
|
46532
|
+
closeOnDimmerClick: true,
|
|
46533
|
+
onEntered: logging.closePopupShow
|
|
46534
|
+
})
|
|
46535
|
+
];
|
|
46536
|
+
case 2:
|
|
46537
|
+
isConfirmed = _state.sent();
|
|
46538
|
+
logging.closePopupCtaClick(isConfirmed);
|
|
46539
|
+
if (isConfirmed) {
|
|
46540
|
+
captureExitLog(Date.now());
|
|
46541
|
+
closeView();
|
|
46542
|
+
}
|
|
46543
|
+
_state.label = 3;
|
|
46544
|
+
case 3:
|
|
46545
|
+
return [
|
|
46546
|
+
2
|
|
46547
|
+
];
|
|
46548
|
+
}
|
|
46549
|
+
});
|
|
46550
|
+
}), [
|
|
46551
|
+
captureExitLog,
|
|
46552
|
+
global2.brandDisplayName,
|
|
46553
|
+
hasHistory,
|
|
46554
|
+
hasWebBackEvent,
|
|
46555
|
+
webBackHandlersRef,
|
|
46556
|
+
logging,
|
|
46557
|
+
openConfirm,
|
|
46558
|
+
webViewRef
|
|
46559
|
+
]);
|
|
46560
|
+
var handleWebHome = (0, import_react227.useCallback)(function() {
|
|
46561
|
+
var _webViewRef_current;
|
|
46562
|
+
logging.homeButtonClick();
|
|
46563
|
+
if (hasWebBackEvent) {
|
|
46564
|
+
var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = void 0;
|
|
46565
|
+
try {
|
|
46566
|
+
for (var _iterator = webBackHandlersRef[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {
|
|
46567
|
+
var handler = _step.value;
|
|
46568
|
+
handler();
|
|
46569
|
+
}
|
|
46570
|
+
} catch (err) {
|
|
46571
|
+
_didIteratorError = true;
|
|
46572
|
+
_iteratorError = err;
|
|
46573
|
+
} finally {
|
|
46574
|
+
try {
|
|
46575
|
+
if (!_iteratorNormalCompletion && _iterator.return != null) {
|
|
46576
|
+
_iterator.return();
|
|
46577
|
+
}
|
|
46578
|
+
} finally {
|
|
46579
|
+
if (_didIteratorError) {
|
|
46580
|
+
throw _iteratorError;
|
|
46581
|
+
}
|
|
46582
|
+
}
|
|
46583
|
+
}
|
|
46584
|
+
return;
|
|
46585
|
+
}
|
|
46586
|
+
(_webViewRef_current = webViewRef.current) === null || _webViewRef_current === void 0 ? void 0 : _webViewRef_current.injectJavaScript(HISTORY_HOME_SCRIPT);
|
|
46587
|
+
}, [
|
|
46588
|
+
hasWebBackEvent,
|
|
46589
|
+
webBackHandlersRef,
|
|
46590
|
+
logging,
|
|
46591
|
+
webViewRef
|
|
46592
|
+
]);
|
|
46593
|
+
return (0, import_react227.useMemo)(function() {
|
|
46594
|
+
return {
|
|
46595
|
+
addEventListener,
|
|
46596
|
+
removeEventListener,
|
|
46597
|
+
handleWebBack,
|
|
46598
|
+
handleWebHome,
|
|
46599
|
+
onNavigationStateChange
|
|
46600
|
+
};
|
|
46601
|
+
}, [
|
|
46602
|
+
addEventListener,
|
|
46603
|
+
removeEventListener,
|
|
46604
|
+
handleWebBack,
|
|
46605
|
+
handleWebHome,
|
|
46606
|
+
onNavigationStateChange
|
|
46607
|
+
]);
|
|
46608
|
+
}
|
|
46609
|
+
function mergeRefs4() {
|
|
46610
|
+
for (var _len = arguments.length, refs = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
46611
|
+
refs[_key] = arguments[_key];
|
|
46612
|
+
}
|
|
46613
|
+
return function(value) {
|
|
46614
|
+
refs.forEach(function(ref) {
|
|
46615
|
+
if (typeof ref === "function") {
|
|
46616
|
+
ref(value);
|
|
46617
|
+
} else if (ref != null) {
|
|
46618
|
+
ref.current = value;
|
|
46619
|
+
}
|
|
46620
|
+
});
|
|
46621
|
+
};
|
|
46622
|
+
}
|
|
46694
46623
|
function convertToAndroidStyleScale(fontScale, platform) {
|
|
46695
46624
|
if (platform === "android") {
|
|
46696
46625
|
if (fontScale <= 1) {
|
|
@@ -46837,7 +46766,7 @@ var global=typeof globalThis!=='undefined'?globalThis:typeof global!=='undefined
|
|
|
46837
46766
|
var batteryModePreference = param.batteryModePreference, colorPreference = param.colorPreference, locale = param.locale, navbarPreference = param.navbarPreference, pureSafeArea = param.pureSafeArea, safeArea = param.safeArea, safeAreaBottomTransparency = param.safeAreaBottomTransparency;
|
|
46838
46767
|
var platform = getPlatformOS();
|
|
46839
46768
|
var appVersion = getTossAppVersion();
|
|
46840
|
-
var fontScale = (0,
|
|
46769
|
+
var fontScale = (0, import_react_native232.useWindowDimensions)().fontScale;
|
|
46841
46770
|
var platformString = platform === "ios" ? "iPhone" : "Android";
|
|
46842
46771
|
var fontA11y = mapFontScaleToCategory(fontScale, platform);
|
|
46843
46772
|
var normalizedFontScale = convertToAndroidStyleScale(fontScale, platform);
|
|
@@ -46903,7 +46832,8 @@ var global=typeof globalThis!=='undefined'?globalThis:typeof global!=='undefined
|
|
|
46903
46832
|
if (!TYPES.includes(type)) {
|
|
46904
46833
|
throw new Error("Invalid WebView type: '".concat(type, "'"));
|
|
46905
46834
|
}
|
|
46906
|
-
var
|
|
46835
|
+
var webViewRef = (0, import_react219.useRef)(null);
|
|
46836
|
+
var webBackHandler = useWebBackHandler(webViewRef);
|
|
46907
46837
|
var uri = (0, import_react219.useMemo)(function() {
|
|
46908
46838
|
return getWebViewUri(local);
|
|
46909
46839
|
}, [
|
|
@@ -46930,12 +46860,11 @@ var global=typeof globalThis!=='undefined'?globalThis:typeof global!=='undefined
|
|
|
46930
46860
|
});
|
|
46931
46861
|
},
|
|
46932
46862
|
backEvent: function(param) {
|
|
46933
|
-
var onEvent = param.onEvent
|
|
46934
|
-
|
|
46935
|
-
|
|
46936
|
-
|
|
46937
|
-
|
|
46938
|
-
});
|
|
46863
|
+
var onEvent = param.onEvent;
|
|
46864
|
+
webBackHandler.addEventListener(onEvent);
|
|
46865
|
+
return function() {
|
|
46866
|
+
webBackHandler.removeEventListener(onEvent);
|
|
46867
|
+
};
|
|
46939
46868
|
},
|
|
46940
46869
|
entryMessageExited: function(param) {
|
|
46941
46870
|
var onEvent = param.onEvent, onError2 = param.onError;
|
|
@@ -47073,8 +47002,21 @@ var global=typeof globalThis!=='undefined'?globalThis:typeof global!=='undefined
|
|
|
47073
47002
|
var userAgent = useCreateUserAgent({
|
|
47074
47003
|
colorPreference: "light"
|
|
47075
47004
|
});
|
|
47005
|
+
var refs = mergeRefs4(handler.ref, webViewRef);
|
|
47006
|
+
(0, import_react219.useEffect)(function() {
|
|
47007
|
+
var callback = function() {
|
|
47008
|
+
webBackHandler.handleWebBack();
|
|
47009
|
+
return true;
|
|
47010
|
+
};
|
|
47011
|
+
import_react_native223.BackHandler.addEventListener("hardwareBackPress", callback);
|
|
47012
|
+
return function() {
|
|
47013
|
+
return import_react_native223.BackHandler.removeEventListener("hardwareBackPress", callback);
|
|
47014
|
+
};
|
|
47015
|
+
}, [
|
|
47016
|
+
webBackHandler
|
|
47017
|
+
]);
|
|
47076
47018
|
return /* @__PURE__ */ (0, import_jsx_runtime229.jsx)(BaseWebView, _object_spread_props(_object_spread({
|
|
47077
|
-
ref:
|
|
47019
|
+
ref: refs
|
|
47078
47020
|
}, props, headerPropForExternalWebView), {
|
|
47079
47021
|
source: {
|
|
47080
47022
|
uri,
|
|
@@ -47083,6 +47025,16 @@ var global=typeof globalThis!=='undefined'?globalThis:typeof global!=='undefined
|
|
|
47083
47025
|
"User-Agent": userAgent
|
|
47084
47026
|
}
|
|
47085
47027
|
},
|
|
47028
|
+
onHomeButtonClick: webBackHandler.handleWebHome,
|
|
47029
|
+
onBackButtonClick: webBackHandler.handleWebBack,
|
|
47030
|
+
onNavigationStateChange: function(event) {
|
|
47031
|
+
var _props_onNavigationStateChange;
|
|
47032
|
+
if (event.url) {
|
|
47033
|
+
trackScreen(event.url);
|
|
47034
|
+
}
|
|
47035
|
+
(_props_onNavigationStateChange = props.onNavigationStateChange) === null || _props_onNavigationStateChange === void 0 ? void 0 : _props_onNavigationStateChange.call(props, event);
|
|
47036
|
+
webBackHandler.onNavigationStateChange(event);
|
|
47037
|
+
},
|
|
47086
47038
|
userAgent: import_react_native223.Platform.OS === "ios" ? userAgent : void 0,
|
|
47087
47039
|
sharedCookiesEnabled: true,
|
|
47088
47040
|
webviewDebuggingEnabled: webViewDebuggingEnabled,
|
|
@@ -47094,7 +47046,7 @@ var global=typeof globalThis!=='undefined'?globalThis:typeof global!=='undefined
|
|
|
47094
47046
|
allowsBackForwardNavigationGestures
|
|
47095
47047
|
}));
|
|
47096
47048
|
}
|
|
47097
|
-
var import_react_native207, import_react210, import_react211, import_react212, import_react213, import_jsx_runtime217, import_react214, import_react215, import_react_native214, import_react216, import_jsx_runtime218, import_react217, import_react_native218, import_jsx_runtime219, import_react218, import_react_native221, import_jsx_runtime220, import_jsx_runtime221, import_jsx_runtime222, import_react219, import_react_native223, import_react220, import_react_native224, import_react221, import_react_native225, import_react222, import_jsx_runtime223, import_jsx_runtime224, import_react223, import_react_native229, import_jsx_runtime225, import_jsx_runtime226, import_react224,
|
|
47049
|
+
var import_react_native207, import_react210, import_react211, import_react212, import_react213, import_jsx_runtime217, import_react214, import_react215, import_react_native214, import_react216, import_jsx_runtime218, import_react217, import_react_native218, import_jsx_runtime219, import_react218, import_react_native221, import_jsx_runtime220, import_jsx_runtime221, import_jsx_runtime222, import_react219, import_react_native223, import_react220, import_react_native224, import_react221, import_react_native225, import_react222, import_jsx_runtime223, import_jsx_runtime224, import_react223, import_react_native229, import_jsx_runtime225, import_jsx_runtime226, import_react224, import_react225, import_jsx_runtime227, import_jsx_runtime228, import_react226, import_react227, import_react228, import_react_native232, import_react229, import_react230, import_jsx_runtime229, env, EXIT_IMPRESSION_LOG_NAME, EXIT_IMPRESSION_SCHEMA_ID, ENTRY_APP_EVENT_SCHEMA_ID, AppEvent, UPDATE_SCHEME, NAVI_BAR_IMPRESSION_SCHEMA_ID, NAVI_BAR_IMPRESSION_LOG_NAME, CLOSE_POPUP_SHOW_SCHEMA_ID, CLOSE_POPUP_SHOW_LOG_NAME, CLOSE_BUTTON_CLICK_SCHEMA_ID, CLOSE_BUTTON_CLICK_LOG_NAME, CLOSE_POPUP_CTA_CLICK_SCHEMA_ID, CLOSE_POPUP_CTA_CLICK_LOG_NAME, HOME_BUTTON_CLICK_SCHEMA_ID, HOME_BUTTON_CLICK_LOG_NAME, BOTTOM_SHEET_SCHEMA_ID, BOTTOM_SHEET_LOG_NAME, BOTTOM_SHEET_OPEN_SCHEMA_ID, BOTTOM_SHEET_OPEN_LOG_NAME, BOTTOM_SHEET_CLOSE_CLICK_SCHEMA_ID, BOTTOM_SHEET_CLOSE_CLICK_LOG_NAME, BOTTOM_SHEET_MENU_CLICK_SCHEMA_ID, BOTTOM_SHEET_MENU_CLICK_LOG_NAME, SHARE_SCHEME_REFERRER, APP_SHARE_MENU_INFO, PLAYSTORE_LINK, APPSTORE_LINK, getMarketLink, UPDATE_DIALOG_SCHEMA_ID, UPDATE_DIALOG_LOG_NAME, UPDATE_DIALOG_CTA_CLICK_SCHEMA_ID, UPDATE_DIALOG_CTA_CLICK_LOG_NAME, APP_BRIDGE_METHOD_NAME, MIN_VERSION, AppsInToss, GAME_PROFILE_WEBVIEW_URL, GAME_CENTER_MIN_VERSION3, useGameProfileToast, DEFAULT_ERROR, INTERNAL__onVisibilityChangedByTransparentServiceWeb, openTransparentWebView, useGameCenterProfile, Z_INDEX, GameProfile, overlayStyle, GameWebView, PartnerWebView, globalEventListenerMap, INITIAL_STATE, HISTORY_BACK_SCRIPT, HISTORY_HOME_SCRIPT, FontA11yCategory, androidFontScaleMap, iosScaleToAndroidScale, extractDateFromUUIDv7, getGroupId, getReferrer3, trackScreen, operationalEnvironment, TYPES, WEBVIEW_TYPES, Analytics2;
|
|
47098
47050
|
var init_dist8 = __esm({
|
|
47099
47051
|
"../../.yarn/__virtual__/@apps-in-toss-framework-virtual-574b136add/1/apps-in-toss-packages/framework/dist/index.js"() {
|
|
47100
47052
|
"use strict";
|
|
@@ -47197,26 +47149,30 @@ var global=typeof globalThis!=='undefined'?globalThis:typeof global!=='undefined
|
|
|
47197
47149
|
import_react_native229 = __toESM(require_react_native(), 1);
|
|
47198
47150
|
import_jsx_runtime225 = __toESM(require_jsx_runtime(), 1);
|
|
47199
47151
|
import_jsx_runtime226 = __toESM(require_jsx_runtime(), 1);
|
|
47200
|
-
init_dist6();
|
|
47201
47152
|
init_react_native_webview();
|
|
47202
47153
|
import_react224 = __toESM(require_react(), 1);
|
|
47203
|
-
import_react_native230 = __toESM(require_react_native(), 1);
|
|
47204
47154
|
init_src3();
|
|
47205
47155
|
init_esm8();
|
|
47206
47156
|
init_private2();
|
|
47207
47157
|
init_dist7();
|
|
47208
47158
|
import_react225 = __toESM(require_react(), 1);
|
|
47209
47159
|
import_jsx_runtime227 = __toESM(require_jsx_runtime(), 1);
|
|
47160
|
+
import_jsx_runtime228 = __toESM(require_jsx_runtime(), 1);
|
|
47210
47161
|
import_react226 = __toESM(require_react(), 1);
|
|
47211
|
-
init_dist6();
|
|
47212
47162
|
init_src3();
|
|
47213
|
-
|
|
47163
|
+
init_esm8();
|
|
47164
|
+
init_dist7();
|
|
47214
47165
|
import_react227 = __toESM(require_react(), 1);
|
|
47166
|
+
import_react228 = __toESM(require_react(), 1);
|
|
47215
47167
|
init_dist6();
|
|
47216
|
-
|
|
47168
|
+
import_react_native232 = __toESM(require_react_native(), 1);
|
|
47169
|
+
init_dist6();
|
|
47170
|
+
init_src3();
|
|
47171
|
+
import_react229 = __toESM(require_react(), 1);
|
|
47172
|
+
init_src3();
|
|
47173
|
+
import_react230 = __toESM(require_react(), 1);
|
|
47217
47174
|
init_dist6();
|
|
47218
47175
|
init_src3();
|
|
47219
|
-
import_react228 = __toESM(require_react(), 1);
|
|
47220
47176
|
import_jsx_runtime229 = __toESM(require_jsx_runtime(), 1);
|
|
47221
47177
|
init_dist3();
|
|
47222
47178
|
init_dist6();
|
|
@@ -47718,127 +47674,34 @@ var global=typeof globalThis!=='undefined'?globalThis:typeof global!=='undefined
|
|
|
47718
47674
|
]
|
|
47719
47675
|
});
|
|
47720
47676
|
});
|
|
47721
|
-
|
|
47722
|
-
|
|
47723
|
-
|
|
47724
|
-
|
|
47725
|
-
extractDateFromUUIDv7 = function(uuid) {
|
|
47726
|
-
var timestampHex = uuid.split("-").join("").slice(0, 12);
|
|
47727
|
-
var timestamp = Number.parseInt(timestampHex, 16);
|
|
47728
|
-
return new Date(timestamp);
|
|
47729
|
-
};
|
|
47730
|
-
getGroupId = function(url) {
|
|
47731
|
-
try {
|
|
47732
|
-
var urlObject = new URL(url);
|
|
47733
|
-
return {
|
|
47734
|
-
groupId: urlObject.pathname,
|
|
47735
|
-
search: urlObject.search.startsWith("?") ? urlObject.search.substring(1) : urlObject.search
|
|
47736
|
-
};
|
|
47737
|
-
} catch (e62) {
|
|
47738
|
-
return {
|
|
47739
|
-
groupId: "unknown",
|
|
47740
|
-
search: "unknown"
|
|
47741
|
-
};
|
|
47742
|
-
}
|
|
47743
|
-
};
|
|
47744
|
-
getReferrer3 = function() {
|
|
47745
|
-
try {
|
|
47746
|
-
var referrer2 = new URL(getSchemeUri());
|
|
47747
|
-
return referrer2.searchParams.get("referrer");
|
|
47748
|
-
} catch (e62) {
|
|
47749
|
-
return "";
|
|
47750
|
-
}
|
|
47751
|
-
};
|
|
47752
|
-
trackScreen = function(url) {
|
|
47753
|
-
var _getGroupId = getGroupId(url), groupId = _getGroupId.groupId, search = _getGroupId.search;
|
|
47754
|
-
var log = {
|
|
47755
|
-
log_type: "screen",
|
|
47756
|
-
log_name: "".concat(groupId, "::screen"),
|
|
47757
|
-
params: {
|
|
47758
|
-
search,
|
|
47759
|
-
referrer: getReferrer3(),
|
|
47760
|
-
deployment_id: env.getDeploymentId(),
|
|
47761
|
-
deployment_timestamp: extractDateFromUUIDv7(env.getDeploymentId()).getTime()
|
|
47762
|
-
}
|
|
47763
|
-
};
|
|
47764
|
-
return eventLog(log);
|
|
47765
|
-
};
|
|
47766
|
-
PartnerWebView = /* @__PURE__ */ (0, import_react224.forwardRef)(function PartnerWebViewScreen(webViewProps, ref) {
|
|
47767
|
-
var webViewRef = (0, import_react224.useRef)(null);
|
|
47768
|
-
var refs = mergeRefs4(ref, webViewRef);
|
|
47769
|
-
var captureExitLog = useCaptureExitLog().captureExitLog;
|
|
47770
|
-
var _useWebViewHistory = useWebViewHistory(), canGoBack = _useWebViewHistory.canGoBack, onNavigationStateChange = _useWebViewHistory.onNavigationStateChange;
|
|
47771
|
-
var historyBackScript = "\n (function() {\n window.history.back();\n true;\n })();\n ";
|
|
47772
|
-
var historyHomeScript = "\n (function() {\n window.location.href = '/';\n true;\n })();\n ";
|
|
47773
|
-
var handleBackEvent = (0, import_react224.useCallback)(function() {
|
|
47774
|
-
if (canGoBack) {
|
|
47775
|
-
var _webViewRef_current;
|
|
47776
|
-
(_webViewRef_current = webViewRef.current) === null || _webViewRef_current === void 0 ? void 0 : _webViewRef_current.injectJavaScript(historyBackScript);
|
|
47777
|
-
} else {
|
|
47778
|
-
captureExitLog(Date.now());
|
|
47779
|
-
closeView2();
|
|
47780
|
-
}
|
|
47781
|
-
}, [
|
|
47782
|
-
canGoBack,
|
|
47783
|
-
captureExitLog,
|
|
47784
|
-
historyBackScript
|
|
47785
|
-
]);
|
|
47786
|
-
(0, import_react224.useEffect)(function() {
|
|
47787
|
-
var handleAndroidBackEvent = function() {
|
|
47788
|
-
if (canGoBack) {
|
|
47789
|
-
var _webViewRef_current;
|
|
47790
|
-
(_webViewRef_current = webViewRef.current) === null || _webViewRef_current === void 0 ? void 0 : _webViewRef_current.injectJavaScript(historyBackScript);
|
|
47791
|
-
return true;
|
|
47792
|
-
} else {
|
|
47793
|
-
captureExitLog(Date.now());
|
|
47794
|
-
return false;
|
|
47795
|
-
}
|
|
47796
|
-
};
|
|
47797
|
-
import_react_native230.BackHandler.addEventListener("hardwareBackPress", handleAndroidBackEvent);
|
|
47798
|
-
return function() {
|
|
47799
|
-
return import_react_native230.BackHandler.removeEventListener("hardwareBackPress", handleAndroidBackEvent);
|
|
47800
|
-
};
|
|
47801
|
-
}, [
|
|
47802
|
-
canGoBack,
|
|
47803
|
-
captureExitLog,
|
|
47804
|
-
historyBackScript
|
|
47805
|
-
]);
|
|
47806
|
-
var handleHomeIconButtonClick = (0, import_react224.useCallback)(function() {
|
|
47807
|
-
var _webViewRef_current;
|
|
47808
|
-
(_webViewRef_current = webViewRef.current) === null || _webViewRef_current === void 0 ? void 0 : _webViewRef_current.injectJavaScript(historyHomeScript);
|
|
47809
|
-
}, [
|
|
47810
|
-
historyHomeScript
|
|
47811
|
-
]);
|
|
47812
|
-
var handleNavigationStateChange = (0, import_react224.useCallback)(function(event) {
|
|
47813
|
-
if (event.url) {
|
|
47814
|
-
trackScreen(event.url);
|
|
47815
|
-
}
|
|
47816
|
-
onNavigationStateChange(event);
|
|
47817
|
-
}, [
|
|
47818
|
-
onNavigationStateChange
|
|
47677
|
+
PartnerWebView = /* @__PURE__ */ (0, import_react224.forwardRef)(function PartnerWebViewScreen(_param, ref) {
|
|
47678
|
+
var onBackButtonClick = _param.onBackButtonClick, onHomeButtonClick = _param.onHomeButtonClick, webViewProps = _object_without_properties(_param, [
|
|
47679
|
+
"onBackButtonClick",
|
|
47680
|
+
"onHomeButtonClick"
|
|
47819
47681
|
]);
|
|
47820
47682
|
return /* @__PURE__ */ (0, import_jsx_runtime228.jsxs)(import_jsx_runtime228.Fragment, {
|
|
47821
47683
|
children: [
|
|
47822
47684
|
/* @__PURE__ */ (0, import_jsx_runtime228.jsx)(PartnerWebviewNavigationBar, {
|
|
47823
|
-
|
|
47824
|
-
|
|
47685
|
+
onBackButtonClick,
|
|
47686
|
+
onHomeButtonClick
|
|
47825
47687
|
}),
|
|
47826
47688
|
/* @__PURE__ */ (0, import_jsx_runtime228.jsx)(react_native_webview_exports.WebView, _object_spread_props(_object_spread({
|
|
47827
|
-
ref
|
|
47689
|
+
ref
|
|
47828
47690
|
}, webViewProps), {
|
|
47829
47691
|
style: {
|
|
47830
47692
|
flex: 1
|
|
47831
|
-
},
|
|
47832
|
-
onNavigationStateChange: function(event) {
|
|
47833
|
-
var _webViewProps_onNavigationStateChange;
|
|
47834
|
-
webViewProps === null || webViewProps === void 0 ? void 0 : (_webViewProps_onNavigationStateChange = webViewProps.onNavigationStateChange) === null || _webViewProps_onNavigationStateChange === void 0 ? void 0 : _webViewProps_onNavigationStateChange.call(webViewProps, event);
|
|
47835
|
-
handleNavigationStateChange(event);
|
|
47836
47693
|
}
|
|
47837
47694
|
}))
|
|
47838
47695
|
]
|
|
47839
47696
|
});
|
|
47840
47697
|
});
|
|
47841
47698
|
globalEventListenerMap = /* @__PURE__ */ new Map();
|
|
47699
|
+
INITIAL_STATE = {
|
|
47700
|
+
stack: [],
|
|
47701
|
+
index: -1
|
|
47702
|
+
};
|
|
47703
|
+
HISTORY_BACK_SCRIPT = "\n(function() {\n window.history.back();\n true;\n})();\n";
|
|
47704
|
+
HISTORY_HOME_SCRIPT = "\n (function() {\n window.location.href = '/';\n true;\n })();\n";
|
|
47842
47705
|
FontA11yCategory = {
|
|
47843
47706
|
Large: "Large",
|
|
47844
47707
|
xLarge: "xLarge",
|
|
@@ -47875,6 +47738,47 @@ var global=typeof globalThis!=='undefined'?globalThis:typeof global!=='undefined
|
|
|
47875
47738
|
3.143: 275,
|
|
47876
47739
|
3.571: 310
|
|
47877
47740
|
};
|
|
47741
|
+
extractDateFromUUIDv7 = function(uuid) {
|
|
47742
|
+
var timestampHex = uuid.split("-").join("").slice(0, 12);
|
|
47743
|
+
var timestamp = Number.parseInt(timestampHex, 16);
|
|
47744
|
+
return new Date(timestamp);
|
|
47745
|
+
};
|
|
47746
|
+
getGroupId = function(url) {
|
|
47747
|
+
try {
|
|
47748
|
+
var urlObject = new URL(url);
|
|
47749
|
+
return {
|
|
47750
|
+
groupId: urlObject.pathname,
|
|
47751
|
+
search: urlObject.search.startsWith("?") ? urlObject.search.substring(1) : urlObject.search
|
|
47752
|
+
};
|
|
47753
|
+
} catch (e62) {
|
|
47754
|
+
return {
|
|
47755
|
+
groupId: "unknown",
|
|
47756
|
+
search: "unknown"
|
|
47757
|
+
};
|
|
47758
|
+
}
|
|
47759
|
+
};
|
|
47760
|
+
getReferrer3 = function() {
|
|
47761
|
+
try {
|
|
47762
|
+
var referrer2 = new URL(getSchemeUri());
|
|
47763
|
+
return referrer2.searchParams.get("referrer");
|
|
47764
|
+
} catch (e62) {
|
|
47765
|
+
return "";
|
|
47766
|
+
}
|
|
47767
|
+
};
|
|
47768
|
+
trackScreen = function(url) {
|
|
47769
|
+
var _getGroupId = getGroupId(url), groupId = _getGroupId.groupId, search = _getGroupId.search;
|
|
47770
|
+
var log = {
|
|
47771
|
+
log_type: "screen",
|
|
47772
|
+
log_name: "".concat(groupId, "::screen"),
|
|
47773
|
+
params: {
|
|
47774
|
+
search,
|
|
47775
|
+
referrer: getReferrer3(),
|
|
47776
|
+
deployment_id: env.getDeploymentId(),
|
|
47777
|
+
deployment_timestamp: extractDateFromUUIDv7(env.getDeploymentId()).getTime()
|
|
47778
|
+
}
|
|
47779
|
+
};
|
|
47780
|
+
return eventLog(log);
|
|
47781
|
+
};
|
|
47878
47782
|
operationalEnvironment = getOperationalEnvironment2();
|
|
47879
47783
|
TYPES = [
|
|
47880
47784
|
"partner",
|
|
@@ -47903,7 +47807,7 @@ var global=typeof globalThis!=='undefined'?globalThis:typeof global!=='undefined
|
|
|
47903
47807
|
}
|
|
47904
47808
|
});
|
|
47905
47809
|
function Index() {
|
|
47906
|
-
return /* @__PURE__ */ (0, import_jsx_runtime230.jsx)(
|
|
47810
|
+
return /* @__PURE__ */ (0, import_jsx_runtime230.jsx)(import_react_native236.View, {
|
|
47907
47811
|
style: {
|
|
47908
47812
|
flex: 1
|
|
47909
47813
|
},
|
|
@@ -47925,13 +47829,13 @@ var global=typeof globalThis!=='undefined'?globalThis:typeof global!=='undefined
|
|
|
47925
47829
|
})
|
|
47926
47830
|
});
|
|
47927
47831
|
}
|
|
47928
|
-
var import_jsx_runtime230,
|
|
47832
|
+
var import_jsx_runtime230, import_react_native236;
|
|
47929
47833
|
var init_pages = __esm({
|
|
47930
47834
|
"react-native/pages/index.tsx"() {
|
|
47931
47835
|
"use strict";
|
|
47932
47836
|
import_jsx_runtime230 = __toESM(require_jsx_runtime(), 1);
|
|
47933
47837
|
init_dist8();
|
|
47934
|
-
|
|
47838
|
+
import_react_native236 = __toESM(require_react_native(), 1);
|
|
47935
47839
|
}
|
|
47936
47840
|
});
|
|
47937
47841
|
|