60p82u21t54k 1.0.19 → 1.0.21

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.
@@ -4232,7 +4232,7 @@ const getFormattedAmount = (value, decimalPlaces = 2) => {
4232
4232
  }
4233
4233
  const formattedZero = `0${decimalPlaces ? "." + "0".repeat(decimalPlaces) : ""}`;
4234
4234
  const parsedValue = parseFloat(value);
4235
- if (isNaN(parsedValue) || typeof value === "string" && /[^\d.,]/.test(value)) {
4235
+ if (isNaN(parsedValue) || typeof value === "string" && !/^-?[\d.,]+$/.test(value)) {
4236
4236
  return `${formattedZero}`;
4237
4237
  }
4238
4238
  return `${parsedValue.toFixed(decimalPlaces).replace(/\B(?=(\d{3})+(?!\d))/g, ",")}`;
@@ -5309,6 +5309,7 @@ var SettingCategory = /* @__PURE__ */ ((SettingCategory2) => {
5309
5309
  SettingCategory2["socialFirebaseProjectId"] = "social_firebase_projectid";
5310
5310
  SettingCategory2["socialFirebaseAppId"] = "social_firebase_appid";
5311
5311
  SettingCategory2["userDetailMobileValidation"] = "userdetailmobilevalidation";
5312
+ SettingCategory2["allLiveChats"] = "alllivechats";
5312
5313
  return SettingCategory2;
5313
5314
  })(SettingCategory || {});
5314
5315
  const modifyVipListRequest = (requests) => {
@@ -5780,19 +5781,19 @@ const modifyPromotionResponse = (result) => {
5780
5781
  return result;
5781
5782
  };
5782
5783
  const getGetSettingResponse = (raw) => {
5783
- var _a, _b, _c, _d, _e, _f, _g, _h;
5784
+ var _a, _b, _c, _d, _e, _f, _g, _h, _i;
5784
5785
  let vipCalculation = 4;
5785
5786
  if (raw.vipcalculation) {
5786
5787
  vipCalculation = Number(raw.vipcalculation);
5787
5788
  }
5788
- let livechatList = [];
5789
+ let extraLiveChatList = [];
5789
5790
  if (raw.extralivechat) {
5790
- livechatList = JSON.parse(raw.extralivechat);
5791
+ extraLiveChatList = JSON.parse(raw.extralivechat);
5791
5792
  }
5792
5793
  return {
5793
5794
  vipCalculation,
5794
5795
  livechat: raw.livechat ?? "",
5795
- livechatList: livechatList.filter((item) => item.status == 1).map((item) => {
5796
+ extraLiveChatList: extraLiveChatList.filter((item) => item.status == 1).map((item) => {
5796
5797
  let imgUrl = item.imgname;
5797
5798
  if (imgUrl.slice(-4) === ".png") {
5798
5799
  imgUrl = item.imgname.slice(0, -4);
@@ -5838,7 +5839,13 @@ const getGetSettingResponse = (raw) => {
5838
5839
  socialFirebaseApikey: raw.social_firebase_apikey ?? "",
5839
5840
  socialFirebaseProjectId: raw.social_firebase_projectid ?? "",
5840
5841
  socialFirebaseAppId: raw.social_firebase_appid ?? "",
5841
- userDetailMobileValidation: raw.userdetailmobilevalidation ? raw.userdetailmobilevalidation === "1" : false
5842
+ userDetailMobileValidation: raw.userdetailmobilevalidation ? raw.userdetailmobilevalidation === "1" : false,
5843
+ liveChatList: ((_i = raw.alllivechats) == null ? void 0 : _i.map((item) => {
5844
+ return {
5845
+ name: item.name ?? "",
5846
+ url: item.url ?? ""
5847
+ };
5848
+ })) ?? []
5842
5849
  };
5843
5850
  };
5844
5851
  const modifyGetSettingRequest = (requests) => {