@paypay/mini-app-js-sdk 1.59.0 → 1.60.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -50,8 +50,8 @@ function normalizeNativeResponseData(data2) {
50
50
  }
51
51
  class JsBridge {
52
52
  constructor(global2) {
53
- this.version = "1.59.0";
54
- this.revision = "bfb6876";
53
+ this.version = "1.60.0";
54
+ this.revision = "fa361bf";
55
55
  this.messageHandlers = /* @__PURE__ */ new Map();
56
56
  this.responseCallbacks = /* @__PURE__ */ new Map();
57
57
  this.global = global2;
@@ -59,7 +59,7 @@ class JsBridge {
59
59
  generateCallbackId() {
60
60
  return [
61
61
  "cb_",
62
- Math.random().toString(36).substr(2, 8),
62
+ Math.random().toString(36).slice(2, 10),
63
63
  "_",
64
64
  new Date().getTime()
65
65
  ].join("");
@@ -1318,10 +1318,10 @@ function getLanguage() {
1318
1318
  }
1319
1319
  function getPayPayLanguage() {
1320
1320
  var _a2, _b;
1321
- let preferredLanguage = (_a2 = navigator.language) == null ? void 0 : _a2.substr(0, 2);
1321
+ let preferredLanguage = (_a2 = navigator.language) == null ? void 0 : _a2.slice(0, 2);
1322
1322
  const langSplit = navigator.userAgent.split(" Lang/");
1323
1323
  if (langSplit.length > 1) {
1324
- preferredLanguage = (_b = langSplit[1].split(" ")[0].substr(0, 2)) != null ? _b : preferredLanguage;
1324
+ preferredLanguage = (_b = langSplit[1].split(" ")[0].slice(0, 2)) != null ? _b : preferredLanguage;
1325
1325
  }
1326
1326
  return preferredLanguage;
1327
1327
  }
@@ -1471,55 +1471,62 @@ async function topup$3(queryParams, body2) {
1471
1471
  return res;
1472
1472
  }
1473
1473
  async function getCashBackInfo() {
1474
- return await ppFetch2({
1474
+ const result2 = await ppFetch2({
1475
1475
  method: "GET",
1476
1476
  url: "/web-api/app/platform/v1/balance",
1477
1477
  headers: {
1478
1478
  "INTERNAL-CALL": "true"
1479
1479
  }
1480
1480
  });
1481
+ return result2;
1481
1482
  }
1482
1483
  async function getAddressByZip(params) {
1483
- return await ppFetch2({
1484
+ const result2 = await ppFetch2({
1484
1485
  method: "GET",
1485
1486
  url: "web-api/app/v1/addressbyzip",
1486
1487
  params
1487
1488
  });
1489
+ return result2;
1488
1490
  }
1489
1491
  async function getAddressList() {
1490
- return ppFetch2({
1492
+ const result2 = ppFetch2({
1491
1493
  method: "GET",
1492
1494
  url: "web-api/app/v1/users/addresslist",
1493
1495
  params: {
1494
1496
  type: "PREFERRED"
1495
1497
  }
1496
1498
  });
1499
+ return result2;
1497
1500
  }
1498
1501
  async function postAddress(body2) {
1499
- return await ppFetch2({
1502
+ const result2 = await ppFetch2({
1500
1503
  method: "POST",
1501
1504
  url: "web-api/app/v1/users/address",
1502
1505
  data: body2
1503
1506
  });
1507
+ return result2;
1504
1508
  }
1505
1509
  async function editAddress(body2, id) {
1506
- return await ppFetch2({
1510
+ const result2 = await ppFetch2({
1507
1511
  method: "PUT",
1508
1512
  url: `web-api/app/v1/users/address/${id}`,
1509
1513
  data: body2
1510
1514
  });
1515
+ return result2;
1511
1516
  }
1512
1517
  async function deleteAddress(id) {
1513
- return await ppFetch2({
1518
+ const result2 = await ppFetch2({
1514
1519
  method: "DELETE",
1515
1520
  url: `web-api/app/v1/users/address/${id}`
1516
1521
  });
1522
+ return result2;
1517
1523
  }
1518
1524
  async function setSelectedAddress(addressId) {
1519
- return ppFetch2({
1525
+ const result2 = ppFetch2({
1520
1526
  url: `web-api/app/v1/users/address/selected/${addressId}`,
1521
1527
  method: "PUT"
1522
1528
  });
1529
+ return result2;
1523
1530
  }
1524
1531
  async function getUserProfileData() {
1525
1532
  return ppFetch2({
@@ -1759,7 +1766,13 @@ var MiniAppRuntime = /* @__PURE__ */ ((MiniAppRuntime2) => {
1759
1766
  return MiniAppRuntime2;
1760
1767
  })(MiniAppRuntime || {});
1761
1768
  function getRuntime() {
1762
- return navigator.userAgent.match(/(iPad|iPhone|iPod)/i) && isPayPayMiniApp() ? "IOS" : navigator.userAgent.match(/Android/i) && isPayPayMiniApp() ? "ANDROID" : "WEB";
1769
+ if (navigator.userAgent.match(/(iPad|iPhone|iPod)/i) && isPayPayMiniApp()) {
1770
+ return "IOS";
1771
+ } else if (navigator.userAgent.match(/Android/i) && isPayPayMiniApp()) {
1772
+ return "ANDROID";
1773
+ } else {
1774
+ return "WEB";
1775
+ }
1763
1776
  }
1764
1777
  function isPayPayMiniApp() {
1765
1778
  return navigator.userAgent.includes("PayPayMiniApp/");
@@ -1907,6 +1920,9 @@ function getButtonType(button4, onlyButton = false) {
1907
1920
  return button4.buttonType;
1908
1921
  }
1909
1922
  }
1923
+ function isAlphabet(value2) {
1924
+ return /^([a-zA-Za-zA-Z]+[\s]?[a-zA-Za-zA-Z]*)+$/.test(value2);
1925
+ }
1910
1926
  const opaUrl = () => {
1911
1927
  switch (getEnv()) {
1912
1928
  case "staging":
@@ -1927,11 +1943,11 @@ const opaUrl = () => {
1927
1943
  const createHeaderMiniAppApi = (urlEndpoint, customHeaders) => {
1928
1944
  let headers = new Headers({
1929
1945
  "Content-Type": "application/json",
1930
- "Client-Version": "1.59.0",
1946
+ "Client-Version": "1.60.0",
1931
1947
  "Client-OS-Type": getRuntime(),
1932
1948
  ...customHeaders
1933
1949
  });
1934
- if (urlEndpoint === "web-api/app/v2/payment/methods" || urlEndpoint === "web-api/app/v2/payment/consult" || urlEndpoint === "web-api/app/v1/payment/cashbackDetail" || urlEndpoint === "web-api/app/v1/confirmAgeForCashback" || urlEndpoint === "web-api/app/v1/internal/request" || urlEndpoint === "web-api/app/v1/addressbyzip" || urlEndpoint === "/web-api/app/platform/v1/balance" || urlEndpoint === "web-api/app/v1/users/autoTopupConfiguration" || urlEndpoint === "web-api/app/v1/users/preTransactionAutoTopupConfiguration" || urlEndpoint === "web-api/app/v1/users/consultPaymentFeature") {
1950
+ if (urlEndpoint === "web-api/app/v2/payment/methods" || urlEndpoint === "web-api/app/v2/payment/consult" || urlEndpoint === "web-api/app/v1/payment/cashbackDetail" || urlEndpoint === "web-api/app/v1/confirmAgeForCashback" || urlEndpoint === "web-api/app/v1/internal/request" || urlEndpoint === "web-api/app/v1/addressbyzip" || urlEndpoint === "/web-api/app/platform/v1/balance" || urlEndpoint === "web-api/app/v1/users/autoTopupConfiguration" || urlEndpoint === "web-api/app/v1/users/preTransactionAutoTopupConfiguration" || urlEndpoint === "web-api/app/v1/users/consultPaymentFeature" || urlEndpoint === "web-api/app/v1/users/paymentFeatureSettings") {
1935
1951
  headers.set("Client-UUID", getClientUUID());
1936
1952
  headers.set("Device-UUID", getDeviceUUID());
1937
1953
  headers.set("Client-Type", "MINIAPP");
@@ -2155,10 +2171,10 @@ var MiniAppStatusType = /* @__PURE__ */ ((MiniAppStatusType2) => {
2155
2171
  })(MiniAppStatusType || {});
2156
2172
  function getUAID(params) {
2157
2173
  const newParams = reconstructParams(params);
2158
- execute$g(newParams).catch(() => {
2174
+ execute$h(newParams).catch(() => {
2159
2175
  });
2160
2176
  }
2161
- async function execute$g(params) {
2177
+ async function execute$h(params) {
2162
2178
  var _a2, _b, _c, _d, _e;
2163
2179
  const res = await ppFetch2({
2164
2180
  method: "GET",
@@ -2172,9 +2188,9 @@ async function execute$g(params) {
2172
2188
  }
2173
2189
  function checkAccessToken(params) {
2174
2190
  const newParams = reconstructParams(params);
2175
- execute$f(newParams);
2191
+ execute$g(newParams);
2176
2192
  }
2177
- function execute$f(params) {
2193
+ function execute$g(params) {
2178
2194
  var _a2, _b;
2179
2195
  const clientId = getClientId();
2180
2196
  const token = getAccessToken();
@@ -2199,9 +2215,9 @@ function execute$f(params) {
2199
2215
  }
2200
2216
  async function getUserProfile(params) {
2201
2217
  const newParams = reconstructParams(params);
2202
- await execute$e(newParams);
2218
+ await execute$f(newParams);
2203
2219
  }
2204
- async function execute$e(params) {
2220
+ async function execute$f(params) {
2205
2221
  var _a2, _b;
2206
2222
  const res = await ppFetch2({
2207
2223
  method: "GET",
@@ -7704,23 +7720,26 @@ const OTTLoginState = reactive({
7704
7720
  });
7705
7721
  async function init(params) {
7706
7722
  const newParams = reconstructParams(params);
7707
- await execute$d(newParams);
7723
+ await execute$e(newParams);
7708
7724
  }
7709
- async function execute$d(params) {
7710
- var _a2, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p;
7725
+ function checkAppVersion() {
7726
+ const appVersion = getAppVersion();
7727
+ if (appVersion) {
7728
+ if (semVerCompare("2.69.0", appVersion)) {
7729
+ setTimeout(fixDeprecatedCloseApp, 1e4);
7730
+ const jsBridge2 = new JsBridge(window);
7731
+ return jsBridge2.callNative("showUpdateWarning", {
7732
+ isMandatory: true
7733
+ });
7734
+ }
7735
+ }
7736
+ }
7737
+ async function execute$e(params) {
7738
+ var _a2, _b, _c, _d, _e, _f, _g, _h, _i;
7711
7739
  try {
7712
7740
  saveEnv((_a2 = params == null ? void 0 : params.env) != null ? _a2 : "");
7713
7741
  saveClientId((_b = params == null ? void 0 : params.clientId) != null ? _b : "");
7714
- const appVersion = getAppVersion();
7715
- if (appVersion) {
7716
- if (semVerCompare("2.69.0", appVersion)) {
7717
- setTimeout(fixDeprecatedCloseApp, 1e4);
7718
- const jsBridge2 = new JsBridge(window);
7719
- return jsBridge2.callNative("showUpdateWarning", {
7720
- isMandatory: true
7721
- });
7722
- }
7723
- }
7742
+ checkAppVersion();
7724
7743
  const url = new URL(window.location.href);
7725
7744
  const urlParams = url.searchParams;
7726
7745
  let token = urlParams == null ? void 0 : urlParams.get("token");
@@ -7752,26 +7771,11 @@ async function execute$d(params) {
7752
7771
  return;
7753
7772
  }
7754
7773
  if (((_d = (_c = res == null ? void 0 : res.body) == null ? void 0 : _c.resultInfo) == null ? void 0 : _d.code) === "SUCCESS") {
7755
- const appDetailResult = await initAppDetail(
7756
- (_g = (_f = (_e = res == null ? void 0 : res.body) == null ? void 0 : _e.data) == null ? void 0 : _f.accessToken) != null ? _g : ""
7774
+ await initApp(
7775
+ params,
7776
+ (_f = (_e = res == null ? void 0 : res.body) == null ? void 0 : _e.data) == null ? void 0 : _f.accessToken,
7777
+ (_h = (_g = res == null ? void 0 : res.body) == null ? void 0 : _g.data) == null ? void 0 : _h.refreshToken
7757
7778
  );
7758
- if (!appDetailResult) {
7759
- throw Error();
7760
- }
7761
- saveEnv((_h = params == null ? void 0 : params.env) != null ? _h : "");
7762
- saveAccessToken((_k = (_j = (_i = res == null ? void 0 : res.body) == null ? void 0 : _i.data) == null ? void 0 : _j.accessToken) != null ? _k : "");
7763
- saveRefreshToken((_n = (_m = (_l = res == null ? void 0 : res.body) == null ? void 0 : _l.data) == null ? void 0 : _m.refreshToken) != null ? _n : "");
7764
- OTTLoginState.setLoginState(true);
7765
- setTimeout(() => {
7766
- OTTLoginState.setLoginState(false);
7767
- }, 5e3);
7768
- saveUserData();
7769
- saveClientId((_o = params == null ? void 0 : params.clientId) != null ? _o : "");
7770
- removeCodeVerifier();
7771
- const configResult = await initAppConfiguration();
7772
- if (!configResult) {
7773
- throw Error();
7774
- }
7775
7779
  } else {
7776
7780
  throw Error();
7777
7781
  }
@@ -7779,10 +7783,31 @@ async function execute$d(params) {
7779
7783
  failedAuth(params, MiniAppErrorType.serverError);
7780
7784
  return;
7781
7785
  }
7782
- (_p = params == null ? void 0 : params.success) == null ? void 0 : _p.call(params, {
7786
+ (_i = params == null ? void 0 : params.success) == null ? void 0 : _i.call(params, {
7783
7787
  statusCode: MiniAppStatusType.initialized
7784
7788
  });
7785
7789
  }
7790
+ async function initApp(params, accessToken, refreshToken2) {
7791
+ var _a2, _b;
7792
+ const appDetailResult = await initAppDetail(accessToken != null ? accessToken : "");
7793
+ if (!appDetailResult) {
7794
+ throw Error();
7795
+ }
7796
+ saveEnv((_a2 = params == null ? void 0 : params.env) != null ? _a2 : "");
7797
+ saveAccessToken(accessToken != null ? accessToken : "");
7798
+ saveRefreshToken(refreshToken2 != null ? refreshToken2 : "");
7799
+ OTTLoginState.setLoginState(true);
7800
+ setTimeout(() => {
7801
+ OTTLoginState.setLoginState(false);
7802
+ }, 5e3);
7803
+ saveUserData();
7804
+ saveClientId((_b = params == null ? void 0 : params.clientId) != null ? _b : "");
7805
+ removeCodeVerifier();
7806
+ const configResult = await initAppConfiguration();
7807
+ if (!configResult) {
7808
+ throw Error();
7809
+ }
7810
+ }
7786
7811
  function fixDeprecatedCloseApp() {
7787
7812
  const jsBridge2 = new JsBridge(window);
7788
7813
  jsBridge2.callNative("closeApp", {});
@@ -8223,22 +8248,16 @@ const ActionSheet = defineComponent({
8223
8248
  YState.y = 0;
8224
8249
  };
8225
8250
  const touchMove = (e) => {
8226
- if (!props.forbiddenSwipe) {
8227
- if (e.cancelable) {
8228
- e.stopPropagation();
8229
- e.preventDefault();
8230
- }
8251
+ if (!props.forbiddenSwipe && e.cancelable) {
8252
+ e.stopPropagation();
8253
+ e.preventDefault();
8231
8254
  }
8232
8255
  if (props.forbiddenSwipe) {
8233
8256
  return;
8234
8257
  }
8235
8258
  YState.moving = true;
8236
8259
  const newY = e.changedTouches[0].clientY - YState.initial;
8237
- if (newY >= 0) {
8238
- YState.y = newY;
8239
- } else {
8240
- YState.y = 0;
8241
- }
8260
+ YState.y = newY >= 0 ? newY : 0;
8242
8261
  };
8243
8262
  const close2 = () => {
8244
8263
  if (props.show) {
@@ -8294,6 +8313,7 @@ const ActionSheet = defineComponent({
8294
8313
  default: () => {
8295
8314
  var _a2, _b;
8296
8315
  return [withDirectives(createVNode("div", {
8316
+ "role": this.type === "alert" ? "alertdialog" : "dialog",
8297
8317
  "class": [styles$6.actionSheetWrapper, styles$6.actionSheetParent, {
8298
8318
  [styles$6.round]: this.round,
8299
8319
  [styles$6.fullscreen]: this.fullScreen,
@@ -8563,17 +8583,7 @@ const _sfc_main$1B = defineComponent({
8563
8583
  openWebviewInternal({ url: buttonInfo == null ? void 0 : buttonInfo.deeplink });
8564
8584
  return;
8565
8585
  }
8566
- if (buttonInfo.deeplink) {
8567
- try {
8568
- const url = new URL(buttonInfo.deeplink);
8569
- const urlParam = url.searchParams.get("url");
8570
- if (buttonInfo.deeplink.startsWith("paypay://") && (url.host === "embed" || url.pathname === "//embed") && urlParam) {
8571
- openWebviewInternal({ url: urlParam });
8572
- return;
8573
- }
8574
- } catch {
8575
- }
8576
- }
8586
+ this.openWebView(buttonInfo);
8577
8587
  closeApp({
8578
8588
  options: {
8579
8589
  deeplink: buttonInfo.deeplink
@@ -8586,7 +8596,19 @@ const _sfc_main$1B = defineComponent({
8586
8596
  return;
8587
8597
  }
8588
8598
  this.$emit("close-click");
8589
- return;
8599
+ },
8600
+ openWebView(buttonInfo) {
8601
+ if (buttonInfo.deeplink) {
8602
+ try {
8603
+ const url = new URL(buttonInfo.deeplink);
8604
+ const urlParam = url.searchParams.get("url");
8605
+ if (buttonInfo.deeplink.startsWith("paypay://") && (url.host === "embed" || url.pathname === "//embed") && urlParam) {
8606
+ openWebviewInternal({ url: urlParam });
8607
+ return;
8608
+ }
8609
+ } catch {
8610
+ }
8611
+ }
8590
8612
  },
8591
8613
  getButtonType
8592
8614
  }
@@ -8610,7 +8632,8 @@ function _sfc_render$1B(_ctx, _cache, $props, $setup, $data, $options) {
8610
8632
  createBaseVNode("img", {
8611
8633
  src: _ctx.iconUrl,
8612
8634
  class: normalizeClass(_ctx.style.errorIcon),
8613
- style: normalizeStyle(_ctx.iconStyle)
8635
+ style: normalizeStyle(_ctx.iconStyle),
8636
+ alt: ""
8614
8637
  }, null, 14, _hoisted_1$W)
8615
8638
  ], 2),
8616
8639
  _ctx.errorTitle ? (openBlock(), createElementBlock("div", {
@@ -9025,10 +9048,10 @@ async function getUserGrantedPermission() {
9025
9048
  }
9026
9049
  async function getBalance(params) {
9027
9050
  const newParams = reconstructParams(params);
9028
- await execute$c(newParams);
9051
+ await execute$d(newParams);
9029
9052
  }
9030
- async function execute$c(params) {
9031
- var _a2, _b, _c, _d, _e, _f, _g, _h, _i;
9053
+ async function execute$d(params) {
9054
+ var _a2, _b, _c, _d, _e, _f, _g, _h;
9032
9055
  try {
9033
9056
  const grantStatus = await checkPermission(
9034
9057
  PermissionName.mini_app_payment_balance
@@ -9055,11 +9078,10 @@ async function execute$c(params) {
9055
9078
  return (_h = params == null ? void 0 : params.fail) == null ? void 0 : _h.call(params, { errorCode: MiniAppErrorType.serverError });
9056
9079
  } finally {
9057
9080
  }
9058
- return (_i = params == null ? void 0 : params.fail) == null ? void 0 : _i.call(params, { errorCode: MiniAppErrorType.serverError });
9059
9081
  }
9060
9082
  async function getAuthStatus(params) {
9061
9083
  const newParams = reconstructParams(params);
9062
- await execute$b(newParams);
9084
+ await execute$c(newParams);
9063
9085
  }
9064
9086
  async function handlePKCE() {
9065
9087
  const codeVerifier = generateCodeVerifier();
@@ -9081,7 +9103,7 @@ async function handleFailCallback(params, errorCode) {
9081
9103
  code
9082
9104
  });
9083
9105
  }
9084
- async function execute$b(params) {
9106
+ async function execute$c(params) {
9085
9107
  var _a2, _b, _c, _d, _e, _f;
9086
9108
  try {
9087
9109
  const clientId = getClientId();
@@ -12599,8 +12621,8 @@ var lottie_svg = { exports: {} };
12599
12621
  intervalStart += kSampleStepSize;
12600
12622
  }
12601
12623
  --currentSample;
12602
- var dist = (aX - mSampleValues[currentSample]) / (mSampleValues[currentSample + 1] - mSampleValues[currentSample]);
12603
- var guessForT = intervalStart + dist * kSampleStepSize;
12624
+ var dist2 = (aX - mSampleValues[currentSample]) / (mSampleValues[currentSample + 1] - mSampleValues[currentSample]);
12625
+ var guessForT = intervalStart + dist2 * kSampleStepSize;
12604
12626
  var initialSlope = getSlope(guessForT, mX1, mX2);
12605
12627
  if (initialSlope >= NEWTON_MIN_SLOPE) {
12606
12628
  return newtonRaphsonIterate(aX, guessForT, mX1, mX2);
@@ -18821,9 +18843,9 @@ var lottie_svg = { exports: {} };
18821
18843
  } else if (percent <= -1) {
18822
18844
  percent = -0.99;
18823
18845
  }
18824
- var dist = rad * percent;
18825
- var x = Math.cos(ang + itemData.a.v) * dist + pt1[0];
18826
- var y = Math.sin(ang + itemData.a.v) * dist + pt1[1];
18846
+ var dist2 = rad * percent;
18847
+ var x = Math.cos(ang + itemData.a.v) * dist2 + pt1[0];
18848
+ var y = Math.sin(ang + itemData.a.v) * dist2 + pt1[1];
18827
18849
  gfill.setAttribute("fx", x);
18828
18850
  gfill.setAttribute("fy", y);
18829
18851
  if (hasOpacity && !itemData.g._collapsable) {
@@ -23182,7 +23204,8 @@ function _sfc_render$1s(_ctx, _cache, $props, $setup, $data, $options) {
23182
23204
  }, [
23183
23205
  createBaseVNode("img", {
23184
23206
  class: normalizeClass(_ctx.style.img),
23185
- src: _ctx.images.iconBalanceIcon
23207
+ src: _ctx.images.iconBalanceIcon,
23208
+ alt: ""
23186
23209
  }, null, 10, _hoisted_1$Q)
23187
23210
  ], 2),
23188
23211
  createBaseVNode("div", {
@@ -23451,7 +23474,8 @@ function _sfc_render$1r(_ctx, _cache, $props, $setup, $data, $options) {
23451
23474
  }, [
23452
23475
  createBaseVNode("img", {
23453
23476
  src: _ctx.authInfo.img,
23454
- class: normalizeClass(_ctx.authInfo.imgStyle)
23477
+ class: normalizeClass(_ctx.authInfo.imgStyle),
23478
+ alt: ""
23455
23479
  }, null, 10, _hoisted_2$n),
23456
23480
  createBaseVNode("span", null, toDisplayString(_ctx.authInfo.text), 1)
23457
23481
  ], 2)
@@ -23556,6 +23580,11 @@ const _sfc_main$1q = defineComponent({
23556
23580
  type: Boolean,
23557
23581
  required: false,
23558
23582
  default: false
23583
+ },
23584
+ ignoreBankMaintenanceFlag: {
23585
+ type: Boolean,
23586
+ default: false,
23587
+ required: false
23559
23588
  }
23560
23589
  },
23561
23590
  emits: {
@@ -23588,12 +23617,13 @@ const _sfc_main$1q = defineComponent({
23588
23617
  openUrl(info2.linkUrl);
23589
23618
  }
23590
23619
  };
23591
- const isDisable = computed(
23592
- () => {
23593
- var _a2, _b;
23594
- return ((_b = (_a2 = props.bank) == null ? void 0 : _a2.bankInfo) == null ? void 0 : _b.paymentMethodStatus) !== PaymentMethodStatus.ACTIVATED;
23620
+ const isDisable = computed(() => {
23621
+ var _a2, _b, _c, _d;
23622
+ if (((_b = (_a2 = props.bank) == null ? void 0 : _a2.bankInfo) == null ? void 0 : _b.paymentMethodStatus) === PaymentMethodStatus.MAINTENANCE && props.ignoreBankMaintenanceFlag) {
23623
+ return false;
23595
23624
  }
23596
- );
23625
+ return ((_d = (_c = props.bank) == null ? void 0 : _c.bankInfo) == null ? void 0 : _d.paymentMethodStatus) !== PaymentMethodStatus.ACTIVATED;
23626
+ });
23597
23627
  const handleSelect = () => {
23598
23628
  if (isDisable == null ? void 0 : isDisable.value) {
23599
23629
  return;
@@ -24049,6 +24079,11 @@ const PaymentMethod = defineComponent({
24049
24079
  required: true,
24050
24080
  default: () => {
24051
24081
  }
24082
+ },
24083
+ ignoreBankMaintenanceFlag: {
24084
+ type: Boolean,
24085
+ default: false,
24086
+ required: false
24052
24087
  }
24053
24088
  },
24054
24089
  emits: {
@@ -24071,6 +24106,7 @@ const PaymentMethod = defineComponent({
24071
24106
  return createVNode(Bank, {
24072
24107
  "bank": this.paymentMethod,
24073
24108
  "round": true,
24109
+ "ignoreBankMaintenanceFlag": this.ignoreBankMaintenanceFlag,
24074
24110
  "onSelect": () => this.$emit("select")
24075
24111
  }, null);
24076
24112
  case PaymentMethodType.SBID_CARRIER_BILLING:
@@ -24123,6 +24159,11 @@ const _sfc_main$1n = defineComponent({
24123
24159
  type: Boolean,
24124
24160
  required: false,
24125
24161
  default: false
24162
+ },
24163
+ ignoreBankMaintenanceFlag: {
24164
+ type: Boolean,
24165
+ default: false,
24166
+ required: false
24126
24167
  }
24127
24168
  },
24128
24169
  emits: {
@@ -24168,8 +24209,9 @@ function _sfc_render$1n(_ctx, _cache, $props, $setup, $data, $options) {
24168
24209
  createVNode(_component_PaymentMethod, {
24169
24210
  "data-testid": "payment-method",
24170
24211
  "payment-method": paymentMethod2,
24212
+ "ignore-bank-maintenance-flag": _ctx.ignoreBankMaintenanceFlag,
24171
24213
  onSelect: ($event) => _ctx.select(index2)
24172
- }, null, 8, ["payment-method", "onSelect"])
24214
+ }, null, 8, ["payment-method", "ignore-bank-maintenance-flag", "onSelect"])
24173
24215
  ], 10, _hoisted_1$L);
24174
24216
  }), 128);
24175
24217
  }
@@ -27658,7 +27700,8 @@ function _sfc_render$16(_ctx, _cache, $props, $setup, $data, $options) {
27658
27700
  }, [
27659
27701
  createBaseVNode("img", {
27660
27702
  src: _ctx.bannerInfo.iconImageUrl,
27661
- class: normalizeClass(_ctx.style.bannerIcon)
27703
+ class: normalizeClass(_ctx.style.bannerIcon),
27704
+ alt: ""
27662
27705
  }, null, 10, _hoisted_1$E),
27663
27706
  createBaseVNode("p", {
27664
27707
  class: normalizeClass(_ctx.style.bannerTitle)
@@ -29093,7 +29136,6 @@ const _sfc_main$$ = defineComponent({
29093
29136
  return;
29094
29137
  }
29095
29138
  context.emit("close");
29096
- return;
29097
29139
  };
29098
29140
  const buttonList = computed(() => {
29099
29141
  return filterErrorButtonList(props.consultInfo.buttonList);
@@ -29119,7 +29161,8 @@ function _sfc_render$$(_ctx, _cache, $props, $setup, $data, $options) {
29119
29161
  }, [
29120
29162
  createBaseVNode("img", {
29121
29163
  src: _ctx.iconUrl,
29122
- class: normalizeClass(_ctx.$style.headerImage)
29164
+ class: normalizeClass(_ctx.$style.headerImage),
29165
+ alt: ""
29123
29166
  }, null, 10, _hoisted_1$A),
29124
29167
  createBaseVNode("div", {
29125
29168
  class: normalizeClass(_ctx.$style.content)
@@ -29558,7 +29601,8 @@ function _sfc_render$X(_ctx, _cache, $props, $setup, $data, $options) {
29558
29601
  }, [
29559
29602
  createBaseVNode("img", {
29560
29603
  class: normalizeClass(_ctx.style.buttonImage),
29561
- src: _ctx.imageUrl
29604
+ src: _ctx.imageUrl,
29605
+ alt: ""
29562
29606
  }, null, 10, _hoisted_1$w)
29563
29607
  ], 2),
29564
29608
  createBaseVNode("span", {
@@ -29613,24 +29657,14 @@ function makeSound(url) {
29613
29657
  if (!url) {
29614
29658
  return;
29615
29659
  }
29616
- try {
29617
- const audio = new Audio(url);
29618
- setTimeout(() => {
29619
- if (audio) {
29620
- try {
29621
- if (void 0)
29622
- ;
29623
- audio.play().catch((e) => {
29624
- console.warn(e);
29625
- });
29626
- } catch (e) {
29627
- console.warn(e);
29628
- }
29629
- }
29630
- });
29631
- } catch (e) {
29632
- console.warn(e);
29633
- }
29660
+ const audio = new Audio(url);
29661
+ setTimeout(() => {
29662
+ if (audio) {
29663
+ audio.play().catch((e) => {
29664
+ console.warn(e);
29665
+ });
29666
+ }
29667
+ });
29634
29668
  }
29635
29669
  var isVue2 = false;
29636
29670
  /*!
@@ -30549,9 +30583,6 @@ const useMakePaymentStore = defineStore("makePayment", {
30549
30583
  res,
30550
30584
  options == null ? void 0 : options.api
30551
30585
  );
30552
- if ((res == null ? void 0 : res.ppFetchResult) === "apiError" && options.api === "consult") {
30553
- return true;
30554
- }
30555
30586
  if ((res == null ? void 0 : res.ppFetchResult) !== "success") {
30556
30587
  if (!options.dryRun) {
30557
30588
  const { errorDescription, errorIcon: errorIcon2, errorTitle: errorTitle2 } = createErrorFromType(options.type);
@@ -30660,7 +30691,6 @@ const useMakePaymentStore = defineStore("makePayment", {
30660
30691
  amount: (_a2 = props.paymentParams.amount) == null ? void 0 : _a2.amount,
30661
30692
  productType: props.paymentParams.productType
30662
30693
  });
30663
- const errorHandled = this.private_handleError(res, { api: "consult" });
30664
30694
  if ((res == null ? void 0 : res.ppFetchResult) === "apiError" && ((_e = (_d = (_c = (_b = res == null ? void 0 : res.body) == null ? void 0 : _b.unsigned) == null ? void 0 : _c.data) == null ? void 0 : _d.error) == null ? void 0 : _e.displayErrorResponse)) {
30665
30695
  this.consultState.consultInfo = res.body.unsigned.data.error.displayErrorResponse;
30666
30696
  this.consultState.showConsult = true;
@@ -30671,6 +30701,7 @@ const useMakePaymentStore = defineStore("makePayment", {
30671
30701
  this.consultState.insufficientBalanceInfo = res.body.unsigned.data.error.insufficientBalanceInfo;
30672
30702
  return true;
30673
30703
  }
30704
+ const errorHandled = this.private_handleError(res, { api: "consult" });
30674
30705
  if ((res == null ? void 0 : res.ppFetchResult) !== "success" || !errorHandled) {
30675
30706
  return false;
30676
30707
  }
@@ -30900,12 +30931,19 @@ const _sfc_main$W = defineComponent({
30900
30931
  return (_a2 = animation.value) != null ? _a2 : { optionalText: "", url: "" };
30901
30932
  }
30902
30933
  ),
30903
- animationUrl: computed(
30904
- () => {
30905
- var _a2;
30906
- return animation.value ? isDesktop.value ? (_a2 = animation.value.largeUrl) != null ? _a2 : animation.value.url : animation.value.url : "";
30934
+ animationUrl: computed(() => {
30935
+ var _a2;
30936
+ if (animation.value) {
30937
+ if (isDesktop.value) {
30938
+ const url = (_a2 = animation.value.largeUrl) != null ? _a2 : animation.value.url;
30939
+ return url;
30940
+ } else {
30941
+ return animation.value.url;
30942
+ }
30943
+ } else {
30944
+ return "";
30907
30945
  }
30908
- ),
30946
+ }),
30909
30947
  type,
30910
30948
  showContent: computed(() => uiState.showContent),
30911
30949
  showFullScreenContent: computed(() => uiState.showFullscreenContent),
@@ -31304,7 +31342,8 @@ function _sfc_render$T(_ctx, _cache, $props, $setup, $data, $options) {
31304
31342
  _ctx.iconImageUrl && !_ctx.iconAlignRight ? (openBlock(), createElementBlock("img", {
31305
31343
  key: 0,
31306
31344
  src: _ctx.iconImageUrl,
31307
- class: normalizeClass(_ctx.style.icon)
31345
+ class: normalizeClass(_ctx.style.icon),
31346
+ alt: ""
31308
31347
  }, null, 10, _hoisted_1$s)) : createCommentVNode("", true),
31309
31348
  createBaseVNode("span", {
31310
31349
  class: normalizeClass([_ctx.style.title, _ctx.textStyle])
@@ -31312,7 +31351,8 @@ function _sfc_render$T(_ctx, _cache, $props, $setup, $data, $options) {
31312
31351
  _ctx.iconImageUrl && _ctx.iconAlignRight ? (openBlock(), createElementBlock("img", {
31313
31352
  key: 1,
31314
31353
  src: _ctx.iconImageUrl,
31315
- class: normalizeClass(_ctx.style.icon)
31354
+ class: normalizeClass(_ctx.style.icon),
31355
+ alt: ""
31316
31356
  }, null, 10, _hoisted_2$b)) : createCommentVNode("", true)
31317
31357
  ], 2)
31318
31358
  ], 2);
@@ -31992,6 +32032,11 @@ const _sfc_main$Q = defineComponent({
31992
32032
  appealDescription: {
31993
32033
  type: Object,
31994
32034
  default: null
32035
+ },
32036
+ ignoreBankMaintenanceFlag: {
32037
+ type: Boolean,
32038
+ default: false,
32039
+ required: false
31995
32040
  }
31996
32041
  },
31997
32042
  emits: {
@@ -32047,8 +32092,9 @@ function _sfc_render$Q(_ctx, _cache, $props, $setup, $data, $options) {
32047
32092
  "select-payment-index": _ctx.selectIndex,
32048
32093
  "payment-methods": _ctx.paymentMethods,
32049
32094
  "is-topup": _ctx.isTopup,
32095
+ "ignore-bank-maintenance-flag": _ctx.ignoreBankMaintenanceFlag,
32050
32096
  onSelect: _ctx.select
32051
- }, null, 8, ["select-payment-index", "payment-methods", "is-topup", "onSelect"])
32097
+ }, null, 8, ["select-payment-index", "payment-methods", "is-topup", "ignore-bank-maintenance-flag", "onSelect"])
32052
32098
  ], 2)), [
32053
32099
  [_directive_vertical_scroll]
32054
32100
  ]),
@@ -33301,7 +33347,8 @@ const initMakePayment = async (initMakePayment2) => {
33301
33347
  document.body.appendChild(container2);
33302
33348
  transactionWarning = (event) => {
33303
33349
  event.preventDefault();
33304
- return event.returnValue = "";
33350
+ event.returnValue = "";
33351
+ return "";
33305
33352
  };
33306
33353
  window.addEventListener("beforeunload", transactionWarning);
33307
33354
  };
@@ -33547,7 +33594,8 @@ function _sfc_render$L(_ctx, _cache, $props, $setup, $data, $options) {
33547
33594
  }, [
33548
33595
  createBaseVNode("img", {
33549
33596
  src: _ctx.iconUrl,
33550
- class: normalizeClass(_ctx.style.bannerInfoIcon)
33597
+ class: normalizeClass(_ctx.style.bannerInfoIcon),
33598
+ alt: ""
33551
33599
  }, null, 10, _hoisted_1$n),
33552
33600
  createBaseVNode("div", {
33553
33601
  class: normalizeClass(_ctx.style.bannerTitle)
@@ -34089,7 +34137,8 @@ const _sfc_main$I = defineComponent({
34089
34137
  (_a2 = document.getElementById("fake_input")) == null ? void 0 : _a2.focus();
34090
34138
  const cashbackInfo2 = await getCashBackInfo();
34091
34139
  if (!cashbackInfo2 || (cashbackInfo2 == null ? void 0 : cashbackInfo2.ppFetchResult) !== "success") {
34092
- this.errorCode = (cashbackInfo2 == null ? void 0 : cashbackInfo2.ppFetchResult) === "notAuthorized" ? MiniAppErrorType.notAuthorized : (cashbackInfo2 == null ? void 0 : cashbackInfo2.ppFetchResult) === "timeout" ? MiniAppErrorType.timeOut : MiniAppErrorType.serverError;
34140
+ const errorType = (cashbackInfo2 == null ? void 0 : cashbackInfo2.ppFetchResult) === "timeout" ? MiniAppErrorType.timeOut : MiniAppErrorType.serverError;
34141
+ this.errorCode = (cashbackInfo2 == null ? void 0 : cashbackInfo2.ppFetchResult) === "notAuthorized" ? MiniAppErrorType.notAuthorized : errorType;
34093
34142
  this.showError();
34094
34143
  return;
34095
34144
  }
@@ -34708,9 +34757,9 @@ function removeStorageData(params) {
34708
34757
  }
34709
34758
  async function getPermissionStatus(params) {
34710
34759
  const newParams = reconstructParams(params);
34711
- await execute$a(newParams);
34760
+ await execute$b(newParams);
34712
34761
  }
34713
- async function execute$a(params) {
34762
+ async function execute$b(params) {
34714
34763
  var _a2, _b, _c;
34715
34764
  try {
34716
34765
  const permissionList = await getUserGrantedPermission();
@@ -35166,9 +35215,9 @@ function showUpdateWarning$1(params) {
35166
35215
  }
35167
35216
  async function getPlatformInformation(params) {
35168
35217
  const newParams = reconstructParams(params);
35169
- await execute$9(newParams);
35218
+ await execute$a(newParams);
35170
35219
  }
35171
- async function execute$9(params) {
35220
+ async function execute$a(params) {
35172
35221
  var _a2, _b;
35173
35222
  let sdkVersion = null;
35174
35223
  let preferredLanguage = getPayPayLanguage();
@@ -35199,9 +35248,9 @@ async function execute$9(params) {
35199
35248
  }
35200
35249
  function getDeviceInformation(params) {
35201
35250
  const newParams = reconstructParams(params);
35202
- execute$8(newParams);
35251
+ execute$9(newParams);
35203
35252
  }
35204
- function execute$8(params) {
35253
+ function execute$9(params) {
35205
35254
  var _a2;
35206
35255
  const runtime = getRuntime();
35207
35256
  (_a2 = params == null ? void 0 : params.success) == null ? void 0 : _a2.call(params, {
@@ -35419,9 +35468,9 @@ async function share(shareParams) {
35419
35468
  }
35420
35469
  async function getKycInformation(params) {
35421
35470
  const newParams = reconstructParams(params);
35422
- await execute$7(newParams);
35471
+ await execute$8(newParams);
35423
35472
  }
35424
- async function execute$7(params) {
35473
+ async function execute$8(params) {
35425
35474
  var _a2, _b, _c, _d, _e, _f, _g, _h;
35426
35475
  try {
35427
35476
  const grantStatus = await checkPermission(PermissionName.mini_app_kyc);
@@ -35776,7 +35825,6 @@ async function getUserLocation(getUserLocationParams) {
35776
35825
  }
35777
35826
  });
35778
35827
  resolve2(null);
35779
- return;
35780
35828
  },
35781
35829
  () => {
35782
35830
  var _a4;
@@ -35784,7 +35832,6 @@ async function getUserLocation(getUserLocationParams) {
35784
35832
  errorCode: MiniAppErrorType.hostAppLocationDenied
35785
35833
  });
35786
35834
  resolve2(null);
35787
- return;
35788
35835
  },
35789
35836
  {
35790
35837
  enableHighAccuracy: (params == null ? void 0 : params.accuracy) === "high",
@@ -35797,7 +35844,6 @@ async function getUserLocation(getUserLocationParams) {
35797
35844
  errorCode: MiniAppErrorType.hostAppLocationDenied
35798
35845
  });
35799
35846
  resolve2(null);
35800
- return;
35801
35847
  }
35802
35848
  });
35803
35849
  } catch {
@@ -35845,12 +35891,12 @@ async function checkPaymentMethod(checkPayMethodParams) {
35845
35891
  }
35846
35892
  function debug(params) {
35847
35893
  const newParams = reconstructParams(params);
35848
- execute$6(newParams);
35894
+ execute$7(newParams);
35849
35895
  }
35850
- function execute$6(params) {
35896
+ function execute$7(params) {
35851
35897
  var _a2;
35852
35898
  (_a2 = params == null ? void 0 : params.success) == null ? void 0 : _a2.call(params, {
35853
- v: "1.59.0"
35899
+ v: "1.60.0"
35854
35900
  });
35855
35901
  }
35856
35902
  function useCallBack(props, ctx) {
@@ -36111,7 +36157,6 @@ const Email = defineComponent({
36111
36157
  if (!runSyncRule(value2, rule) && value2) {
36112
36158
  state.validateFailed = true;
36113
36159
  state.validateMessage = getRuleMessage(value2, rule);
36114
- return;
36115
36160
  }
36116
36161
  }), Promise.resolve());
36117
36162
  const renderMessage = () => {
@@ -37018,9 +37063,9 @@ function registerEmail(params, allowsUpdate = false) {
37018
37063
  }
37019
37064
  function registerKyc(params) {
37020
37065
  const newParams = reconstructParams(params);
37021
- execute$5(newParams);
37066
+ execute$6(newParams);
37022
37067
  }
37023
- function execute$5(params) {
37068
+ function execute$6(params) {
37024
37069
  var _a2;
37025
37070
  params = {
37026
37071
  ...params,
@@ -37035,7 +37080,7 @@ function execute$5(params) {
37035
37080
  let deeplink = `paypay://kyc/top?appId=${clientId}&appName=${encodeURIComponent(
37036
37081
  (appDetail == null ? void 0 : appDetail.appName) || ""
37037
37082
  )}`;
37038
- Object.entries(params).map(([key2, value2]) => {
37083
+ Object.entries(params).forEach(([key2, value2]) => {
37039
37084
  if (typeof value2 !== "function") {
37040
37085
  let kycData = encodeURIComponent(String(value2));
37041
37086
  if (Array.isArray(value2)) {
@@ -37066,13 +37111,13 @@ const MinVersion = {
37066
37111
  };
37067
37112
  async function startMultiFactorAuth(params) {
37068
37113
  const newParams = reconstructParams(params);
37069
- await execute$4(newParams);
37114
+ await execute$5(newParams);
37070
37115
  }
37071
37116
  function validType(params) {
37072
37117
  const authTypes = ["BIOMETRIC"];
37073
37118
  return authTypes.includes(params == null ? void 0 : params.type);
37074
37119
  }
37075
- async function execute$4(params) {
37120
+ async function execute$5(params) {
37076
37121
  var _a2, _b, _c, _d, _e, _f, _g, _h, _i;
37077
37122
  if (!validType(params)) {
37078
37123
  return (_a2 = params == null ? void 0 : params.fail) == null ? void 0 : _a2.call(params, { errorCode: MiniAppErrorType.invalidType });
@@ -37113,9 +37158,9 @@ async function execute$4(params) {
37113
37158
  }
37114
37159
  function logout(params) {
37115
37160
  const newParams = reconstructParams(params);
37116
- execute$3(newParams);
37161
+ execute$4(newParams);
37117
37162
  }
37118
- function execute$3(params) {
37163
+ function execute$4(params) {
37119
37164
  var _a2, _b;
37120
37165
  try {
37121
37166
  Object.entries(PpLocalStorageKey).forEach(([_, value2]) => {
@@ -37130,9 +37175,9 @@ function execute$3(params) {
37130
37175
  }
37131
37176
  async function verifyMultiFactorAuthResult(params) {
37132
37177
  const newParams = reconstructParams(params);
37133
- await execute$2(newParams);
37178
+ await execute$3(newParams);
37134
37179
  }
37135
- async function execute$2(params) {
37180
+ async function execute$3(params) {
37136
37181
  var _a2, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l;
37137
37182
  const urlParams = new URLSearchParams(window.location.search);
37138
37183
  const sessionId = urlParams == null ? void 0 : urlParams.get("ppSessionId");
@@ -37602,6 +37647,42 @@ function getRenderLoginInfo(params) {
37602
37647
  preferredLanguage
37603
37648
  };
37604
37649
  }
37650
+ var dist = {};
37651
+ Object.defineProperty(dist, "__esModule", { value: true });
37652
+ var sanitizeUrl_1 = dist.sanitizeUrl = void 0;
37653
+ var invalidProtocolRegex = /^([^\w]*)(javascript|data|vbscript)/im;
37654
+ var htmlEntitiesRegex = /&#(\w+)(^\w|;)?/g;
37655
+ var htmlCtrlEntityRegex = /&(newline|tab);/gi;
37656
+ var ctrlCharactersRegex = /[\u0000-\u001F\u007F-\u009F\u2000-\u200D\uFEFF]/gim;
37657
+ var urlSchemeRegex = /^.+(:|&colon;)/gim;
37658
+ var relativeFirstCharacters = [".", "/"];
37659
+ function isRelativeUrlWithoutProtocol(url) {
37660
+ return relativeFirstCharacters.indexOf(url[0]) > -1;
37661
+ }
37662
+ function decodeHtmlCharacters(str) {
37663
+ return str.replace(htmlEntitiesRegex, function(match, dec) {
37664
+ return String.fromCharCode(dec);
37665
+ });
37666
+ }
37667
+ function sanitizeUrl(url) {
37668
+ var sanitizedUrl = decodeHtmlCharacters(url || "").replace(htmlCtrlEntityRegex, "").replace(ctrlCharactersRegex, "").trim();
37669
+ if (!sanitizedUrl) {
37670
+ return "about:blank";
37671
+ }
37672
+ if (isRelativeUrlWithoutProtocol(sanitizedUrl)) {
37673
+ return sanitizedUrl;
37674
+ }
37675
+ var urlSchemeParseResults = sanitizedUrl.match(urlSchemeRegex);
37676
+ if (!urlSchemeParseResults) {
37677
+ return sanitizedUrl;
37678
+ }
37679
+ var urlScheme = urlSchemeParseResults[0];
37680
+ if (invalidProtocolRegex.test(urlScheme)) {
37681
+ return "about:blank";
37682
+ }
37683
+ return sanitizedUrl;
37684
+ }
37685
+ sanitizeUrl_1 = dist.sanitizeUrl = sanitizeUrl;
37605
37686
  const smartBtn = "_smartBtn_1112c_1";
37606
37687
  const sm = "_sm_1112c_1";
37607
37688
  const leftSection$1 = "_leftSection_1112c_18";
@@ -37694,11 +37775,19 @@ const _sfc_main$y = defineComponent({
37694
37775
  onMounted(() => {
37695
37776
  emit("mount");
37696
37777
  });
37778
+ const redirectUrl = computed(() => {
37779
+ if ((props == null ? void 0 : props.url) && isValidUrl(props.url)) {
37780
+ const sanitizedUrl = sanitizeUrl_1(props.url);
37781
+ return sanitizedUrl !== "about:blank" ? sanitizedUrl : void 0;
37782
+ }
37783
+ return void 0;
37784
+ });
37697
37785
  return {
37698
37786
  onClick,
37699
37787
  onError,
37700
37788
  iconUrl,
37701
- smallBtn
37789
+ smallBtn,
37790
+ redirectUrl
37702
37791
  };
37703
37792
  }
37704
37793
  });
@@ -37720,7 +37809,7 @@ function _sfc_render$y(_ctx, _cache, $props, $setup, $data, $options) {
37720
37809
  { [_ctx.$style.shortText]: _ctx.isShortText }
37721
37810
  ]),
37722
37811
  "data-testid": "smart-btn-container",
37723
- href: _ctx.url,
37812
+ href: _ctx.redirectUrl,
37724
37813
  onClick: _cache[1] || (_cache[1] = (...args) => _ctx.onClick && _ctx.onClick(...args))
37725
37814
  }, [
37726
37815
  createBaseVNode("span", {
@@ -37784,6 +37873,9 @@ const initSmartButton = (params, data2, preferredLanguage, isLoggedIn) => {
37784
37873
  }).catch(() => {
37785
37874
  });
37786
37875
  };
37876
+ const shouldImmediateExecutePayment = (smartButtonParams2) => {
37877
+ return smartButtonParams2.type === "pay" && isLoggedIn && (smartButtonParams2 == null ? void 0 : smartButtonParams2.autoInvoke) && OTTLoginState.isJustLoggedIn;
37878
+ };
37787
37879
  const app = createApp({
37788
37880
  setup() {
37789
37881
  return () => h(AppVue, {
@@ -37807,7 +37899,7 @@ const initSmartButton = (params, data2, preferredLanguage, isLoggedIn) => {
37807
37899
  }
37808
37900
  },
37809
37901
  onMount: () => {
37810
- if (smartButtonParams.type === "pay" && isLoggedIn && (smartButtonParams == null ? void 0 : smartButtonParams.autoInvoke) && OTTLoginState.isJustLoggedIn) {
37902
+ if (shouldImmediateExecutePayment(smartButtonParams)) {
37811
37903
  triggerPayment();
37812
37904
  }
37813
37905
  }
@@ -37864,12 +37956,13 @@ async function getExpectedCashbackInfo(orderInfo) {
37864
37956
  storeId: orderInfo == null ? void 0 : orderInfo.storeId,
37865
37957
  merchantPaymentId: orderInfo == null ? void 0 : orderInfo.merchantPaymentId
37866
37958
  };
37867
- return await ppFetch2({
37959
+ const resp = await ppFetch2({
37868
37960
  method: "POST",
37869
37961
  url: "web-api/app/v1/smartpayment/cashback/expected",
37870
37962
  params: query,
37871
37963
  data: body2
37872
37964
  });
37965
+ return resp;
37873
37966
  }
37874
37967
  function createCashbackInfo(cashbackResponse) {
37875
37968
  var _a2, _b;
@@ -38001,6 +38094,22 @@ const userProfileFormValidationTypes = [
38001
38094
  "NUMBER"
38002
38095
  ];
38003
38096
  const lg = getLanguage();
38097
+ const getStringConvertedHalfWidth = (value2, spaceFullWidth, spaceHalfWidth) => {
38098
+ let newValue = "";
38099
+ for (const char of value2) {
38100
+ const code = char.charCodeAt(0);
38101
+ if (65313 <= code && code <= 65338) {
38102
+ newValue += String.fromCharCode(code - 65313 + 65);
38103
+ } else if (65345 <= code && code <= 65370) {
38104
+ newValue += String.fromCharCode(code - 65345 + 97);
38105
+ } else if (char === spaceFullWidth) {
38106
+ newValue += spaceHalfWidth;
38107
+ } else {
38108
+ newValue += char;
38109
+ }
38110
+ }
38111
+ return newValue;
38112
+ };
38004
38113
  const validators = {
38005
38114
  KATA_KANA: (value2) => {
38006
38115
  if (value2.length > 16) {
@@ -38035,20 +38144,12 @@ const validators = {
38035
38144
  }
38036
38145
  let spaceFullWidth = "\u3000";
38037
38146
  let spaceHalfWidth = " ";
38038
- if (/^([a-zA-Za-zA-Z]+[\s]?[a-zA-Za-zA-Z]*)+$/.test(value2)) {
38039
- let newValue = "";
38040
- for (const char of value2) {
38041
- const code = char.charCodeAt(0);
38042
- if (65313 <= code && code <= 65338) {
38043
- newValue += String.fromCharCode(code - 65313 + 65);
38044
- } else if (65345 <= code && code <= 65370) {
38045
- newValue += String.fromCharCode(code - 65345 + 97);
38046
- } else if (char === spaceFullWidth) {
38047
- newValue += spaceHalfWidth;
38048
- } else {
38049
- newValue += char;
38050
- }
38051
- }
38147
+ if (isAlphabet(value2)) {
38148
+ let newValue = getStringConvertedHalfWidth(
38149
+ value2,
38150
+ spaceFullWidth,
38151
+ spaceHalfWidth
38152
+ );
38052
38153
  if (newValue.length > 0) {
38053
38154
  newValue = newValue.toLowerCase().replace(/^(.)|\s+(.)/g, (c) => c.toUpperCase());
38054
38155
  }
@@ -38316,13 +38417,11 @@ const useRegisterUserInfoStore = defineStore("registerUserInfo", {
38316
38417
  },
38317
38418
  getEmailStatus() {
38318
38419
  getUserProfileDataV2().then((resp) => {
38319
- switch (resp.ppFetchResult) {
38320
- case "success":
38321
- this.email = resp.body.unsigned.data.email || null;
38322
- this.emailStatus = resp.body.unsigned.data.emailStatus || null;
38323
- break;
38324
- default:
38325
- throw new Error();
38420
+ if (resp.ppFetchResult === "success") {
38421
+ this.email = resp.body.unsigned.data.email || null;
38422
+ this.emailStatus = resp.body.unsigned.data.emailStatus || null;
38423
+ } else {
38424
+ throw new Error();
38326
38425
  }
38327
38426
  }).catch(() => {
38328
38427
  const lg2 = getLanguage();
@@ -39780,7 +39879,7 @@ const _sfc_main$g = defineComponent({
39780
39879
  };
39781
39880
  const noPayoutMethod = computed(() => {
39782
39881
  var _a2;
39783
- return !(((_a2 = props.payoutMethods) == null ? void 0 : _a2.length) > 0);
39882
+ return !props.payoutMethods || ((_a2 = props.payoutMethods) == null ? void 0 : _a2.length) === 0;
39784
39883
  });
39785
39884
  return {
39786
39885
  lg: lg2,
@@ -39992,9 +40091,9 @@ function getBankInfo(params) {
39992
40091
  if (complete) {
39993
40092
  params.complete = createWrapComplete(complete);
39994
40093
  }
39995
- execute$1(params);
40094
+ execute$2(params);
39996
40095
  }
39997
- function execute$1(params) {
40096
+ function execute$2(params) {
39998
40097
  var _a2, _b;
39999
40098
  try {
40000
40099
  const container2 = document.createElement("div");
@@ -40275,19 +40374,16 @@ const useRegisterPaymentFeaturesStore = defineStore(
40275
40374
  return true;
40276
40375
  },
40277
40376
  handleErrorResponse(response) {
40278
- switch (response.ppFetchResult) {
40279
- case "timeout":
40280
- this.result = {
40281
- type: "fail",
40282
- errorCode: MiniAppErrorType.timeOut
40283
- };
40284
- return;
40285
- default:
40286
- this.result = {
40287
- type: "fail",
40288
- errorCode: MiniAppErrorType.serverError
40289
- };
40290
- return;
40377
+ if (response.ppFetchResult === "timeout") {
40378
+ this.result = {
40379
+ type: "fail",
40380
+ errorCode: MiniAppErrorType.timeOut
40381
+ };
40382
+ } else {
40383
+ this.result = {
40384
+ type: "fail",
40385
+ errorCode: MiniAppErrorType.serverError
40386
+ };
40291
40387
  }
40292
40388
  },
40293
40389
  async setAutoTopupConfiguration() {
@@ -40769,7 +40865,8 @@ function _sfc_render$b(_ctx, _cache, $props, $setup, $data, $options) {
40769
40865
  }, [
40770
40866
  createVNode(_component_Bank, {
40771
40867
  bank: _ctx.bankMethod,
40772
- round: ""
40868
+ round: "",
40869
+ "ignore-bank-maintenance-flag": ""
40773
40870
  }, null, 8, ["bank"]),
40774
40871
  createBaseVNode("img", {
40775
40872
  class: normalizeClass(_ctx.$style.icon),
@@ -41048,7 +41145,8 @@ function _sfc_render$a(_ctx, _cache, $props, $setup, $data, $options) {
41048
41145
  class: normalizeClass(_ctx.$style.icon)
41049
41146
  }, [
41050
41147
  createBaseVNode("img", {
41051
- src: _ctx.showEmoneyOnlyNotice ? _ctx.images.iconInfo : _ctx.images.iconNotice
41148
+ src: _ctx.showEmoneyOnlyNotice ? _ctx.images.iconInfo : _ctx.images.iconNotice,
41149
+ alt: ""
41052
41150
  }, null, 8, _hoisted_3)
41053
41151
  ], 2),
41054
41152
  createBaseVNode("div", {
@@ -41357,6 +41455,7 @@ function _sfc_render$7(_ctx, _cache, $props, $setup, $data, $options) {
41357
41455
  "payment-methods": _ctx.paymentMethodsList,
41358
41456
  "select-index": _ctx.selectIndex,
41359
41457
  "is-topup": true,
41458
+ "ignore-bank-maintenance-flag": "",
41360
41459
  onSelectPaymentMethod: _ctx.selectPaymentList
41361
41460
  }, null, 8, ["class", "payment-methods", "select-index", "onSelectPaymentMethod"])
41362
41461
  ]),
@@ -42072,9 +42171,9 @@ function triggerFailCallback(params, errorCode) {
42072
42171
  }
42073
42172
  async function getCashbackInformation(params) {
42074
42173
  const newParams = reconstructParams(params);
42075
- await execute(newParams);
42174
+ await execute$1(newParams);
42076
42175
  }
42077
- async function execute(params) {
42176
+ async function execute$1(params) {
42078
42177
  var _a2, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k;
42079
42178
  try {
42080
42179
  if (!(params == null ? void 0 : params.merchantPaymentId)) {
@@ -42108,6 +42207,46 @@ async function execute(params) {
42108
42207
  return (_k = params == null ? void 0 : params.fail) == null ? void 0 : _k.call(params, { errorCode: MiniAppErrorType.serverError });
42109
42208
  }
42110
42209
  }
42210
+ async function getUserPaymentFeatureSettings(params) {
42211
+ const newParams = reconstructParams(params);
42212
+ await execute(newParams);
42213
+ }
42214
+ async function execute(params) {
42215
+ var _a2, _b, _c, _d, _e;
42216
+ try {
42217
+ const grantStatus = await checkPermission(
42218
+ PermissionName.mini_app_check_payment_method
42219
+ );
42220
+ if (grantStatus !== PermissionStatus.granted) {
42221
+ return (_a2 = params == null ? void 0 : params.fail) == null ? void 0 : _a2.call(params, { errorCode: MiniAppErrorType.insufficientScope });
42222
+ }
42223
+ const res = await ppFetch2({
42224
+ method: "GET",
42225
+ url: "web-api/app/v1/users/paymentFeatureSettings",
42226
+ params: {
42227
+ merchantId: params == null ? void 0 : params.merchant,
42228
+ productType: params == null ? void 0 : params.productType,
42229
+ paymentFeatureType: params == null ? void 0 : params.type
42230
+ }
42231
+ });
42232
+ if (res.ppFetchResult !== "success") {
42233
+ (_b = params == null ? void 0 : params.fail) == null ? void 0 : _b.call(params, {
42234
+ errorCode: getFailErrorCode(res.ppFetchResult)
42235
+ });
42236
+ return;
42237
+ }
42238
+ const userPaymentFeatureSettings = res.body.unsigned.data;
42239
+ let paymentFeatures = {};
42240
+ (_c = Object.entries(userPaymentFeatureSettings)) == null ? void 0 : _c.forEach(([key2, value2]) => {
42241
+ paymentFeatures[key2.toUpperCase()] = value2 ? "AVAILABLE" : "UNAVAILABLE";
42242
+ });
42243
+ (_d = params == null ? void 0 : params.success) == null ? void 0 : _d.call(params, {
42244
+ paymentFeatures
42245
+ });
42246
+ } catch {
42247
+ return (_e = params == null ? void 0 : params.fail) == null ? void 0 : _e.call(params, { errorCode: MiniAppErrorType.serverError });
42248
+ }
42249
+ }
42111
42250
  class MiniAppModule extends JsBridgeModule {
42112
42251
  constructor(jsBridge2) {
42113
42252
  super();
@@ -42173,9 +42312,6 @@ class MiniAppModule extends JsBridgeModule {
42173
42312
  });
42174
42313
  }
42175
42314
  createOrder(params) {
42176
- if (!this.isExecutableService(params)) {
42177
- return;
42178
- }
42179
42315
  makePayment(params).catch(() => {
42180
42316
  });
42181
42317
  }
@@ -42302,6 +42438,10 @@ class MiniAppModule extends JsBridgeModule {
42302
42438
  registerPaymentFeatures(params) {
42303
42439
  registerPaymentFeatures(params);
42304
42440
  }
42441
+ getUserPaymentFeatureSettings(params) {
42442
+ getUserPaymentFeatureSettings(params).catch(() => {
42443
+ });
42444
+ }
42305
42445
  }
42306
42446
  class PayPayJsBridge extends PayPayJsBridgeBase {
42307
42447
  }