@taskon/widget-react 0.0.1-beta.4 → 0.0.1-beta.5

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.
Files changed (38) hide show
  1. package/dist/CommunityTaskList.css +110 -110
  2. package/dist/EligibilityInfo.css +69 -69
  3. package/dist/Quest.css +241 -241
  4. package/dist/chunks/{CommunityTaskList-C9Gv8KOF.js → CommunityTaskList-CrMvOB8w.js} +725 -441
  5. package/dist/chunks/{EligibilityInfo-D-Fuy9GE.js → EligibilityInfo-Beww12QX.js} +1569 -597
  6. package/dist/chunks/{LeaderboardWidget-BV2D2q1N.js → LeaderboardWidget-DwuSpVl0.js} +2 -2
  7. package/dist/chunks/{PageBuilder-DQoU4Mwf.js → PageBuilder-DsX6Tv0N.js} +5 -5
  8. package/dist/chunks/{Quest-B5NyVr3o.js → Quest-CuD2LElS.js} +661 -473
  9. package/dist/chunks/{TaskOnProvider-93UxARFo.js → TaskOnProvider-xUeP2Nro.js} +78 -65
  10. package/dist/chunks/{ThemeProvider-CPI_roeh.js → ThemeProvider-Bt4UZ33y.js} +30 -6
  11. package/dist/chunks/{UserCenterWidget-BRtigY_S.js → UserCenterWidget-CB0hnj-L.js} +67 -30
  12. package/dist/chunks/{UserCenterWidget-cADBSVg7.js → UserCenterWidget-CvU6K4AC.js} +2 -2
  13. package/dist/chunks/communitytask-es-1zawvXEX.js +311 -0
  14. package/dist/chunks/communitytask-ja-CmW6nP-L.js +311 -0
  15. package/dist/chunks/communitytask-ko-BD0hzQSi.js +311 -0
  16. package/dist/chunks/communitytask-ru-DhySaZL8.js +311 -0
  17. package/dist/chunks/createLocaleLoader-BameiEhU.js +65 -0
  18. package/dist/chunks/{dynamic-import-helper-DwXlQC0S.js → dynamic-import-helper-WmIF58Sb.js} +1 -1
  19. package/dist/chunks/quest-es-D-b5xcme.js +948 -0
  20. package/dist/chunks/quest-ja-Dxd2vqBF.js +948 -0
  21. package/dist/chunks/quest-ko-CSmRWgK_.js +948 -0
  22. package/dist/chunks/quest-ru-CkEKv1_F.js +948 -0
  23. package/dist/chunks/taskwidget-es-Do9b3Mqw.js +245 -0
  24. package/dist/chunks/taskwidget-ja-CqSu-yWA.js +245 -0
  25. package/dist/chunks/taskwidget-ko-EHgXFV4B.js +245 -0
  26. package/dist/chunks/taskwidget-ru-CMbLQDK4.js +245 -0
  27. package/dist/community-task.js +1 -1
  28. package/dist/core.d.ts +17 -5
  29. package/dist/core.js +8 -7
  30. package/dist/index.d.ts +56 -5
  31. package/dist/index.js +18 -16
  32. package/dist/leaderboard.js +2 -2
  33. package/dist/page-builder.js +1 -1
  34. package/dist/quest.d.ts +682 -0
  35. package/dist/quest.js +3 -1
  36. package/dist/user-center.d.ts +3 -1
  37. package/dist/user-center.js +5 -5
  38. package/package.json +4 -1
@@ -1,11 +1,90 @@
1
- import { jsx, jsxs, Fragment } from "react/jsx-runtime";
2
- import React__default, { forwardRef, useRef, useEffect, useCallback, useImperativeHandle, useMemo, useContext, useState } from "react";
1
+ import { jsx, Fragment, jsxs } from "react/jsx-runtime";
2
+ import React__default, { isValidElement, cloneElement, Fragment as Fragment$1, forwardRef, useRef, useEffect, useCallback, useImperativeHandle, useMemo, useContext, useState } from "react";
3
3
  import { createUserApi, ChainType, getTxExplorerUrl, RewardType, parseTitleExpress, UserIdentityType, SnsType, createQuestApi, isUnauthorizedError, ErrorCode, ApiError, createCommonApi, powIcon, contractInteractiveIcon, getSwapDexTitleExpress, EligibilityTemplateId, UserEligibleStatus } from "@taskon/core";
4
4
  import { u as useWallet, d as useToast, e as createEthereumAdapterFromProvider } from "./useToast-CaRkylKe.js";
5
- import { k as useIsMobile, l as useChainMap, m as useNftClaim, C as ClaimNftDialog, n as PendingTxDialog, B as BindWalletDialog, R as Root2, o as Trigger, p as Portal, q as Content2, r as Arrow2, s as TipPopover, g as useBindSocialAccount, j as enMessages, a as useTokenAssets, u as useRewardDetails, c as usePointsHistory, L as LoadingState, i as TokenRewardContent, h as PointsList, E as EmptyState, N as NftRewardContent, W as WithdrawForm } from "./UserCenterWidget-cADBSVg7.js";
6
- import { p as TaskOnContext, s as useTaskOnPortalContainer, u as useTaskOnAuth, b as useWidgetLocale } from "./ThemeProvider-CPI_roeh.js";
7
- import { D as Dialog, _ as __variableDynamicImportRuntimeHelper } from "./dynamic-import-helper-DwXlQC0S.js";
8
- import '../EligibilityInfo.css';const successIconUrl = new URL("data:image/svg+xml,%3csvg%20width='46'%20height='46'%20viewBox='0%200%2046%2046'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3ccircle%20cx='23'%20cy='23'%20r='23'%20fill='%2331FF90'/%3e%3cpath%20d='M16.4281%2022.8899L20.6446%2027.1063L29.6798%2018.0711'%20stroke='black'%20stroke-width='5'%20stroke-linecap='square'%20stroke-linejoin='round'/%3e%3c/svg%3e", import.meta.url).href;
5
+ import { k as useIsMobile, l as useChainMap, m as useNftClaim, C as ClaimNftDialog, n as PendingTxDialog, B as BindWalletDialog, R as Root2, o as Trigger, p as Portal, q as Content2, r as Arrow2, s as TipPopover, g as useBindSocialAccount, j as enMessages$2, a as useTokenAssets, u as useRewardDetails, c as usePointsHistory, L as LoadingState, i as TokenRewardContent, h as PointsList, E as EmptyState, N as NftRewardContent, W as WithdrawForm } from "./UserCenterWidget-CvU6K4AC.js";
6
+ import { q as TaskOnContext, t as useTaskOnPortalContainer, u as useTaskOnAuth, b as useWidgetLocale } from "./ThemeProvider-Bt4UZ33y.js";
7
+ import { u as useTranslation, c as createLocaleLoader } from "./createLocaleLoader-BameiEhU.js";
8
+ import { D as Dialog, _ as __variableDynamicImportRuntimeHelper } from "./dynamic-import-helper-WmIF58Sb.js";
9
+ import '../EligibilityInfo.css';const SLOT_TOKEN_PREFIX = "__TASKON_I18NT_SLOT_";
10
+ const SLOT_TOKEN_SUFFIX = "__";
11
+ const SLOT_TOKEN_REGEXP = /__TASKON_I18NT_SLOT_([A-Za-z0-9_]+)__/g;
12
+ function createSlotToken(name2) {
13
+ return `${SLOT_TOKEN_PREFIX}${name2}${SLOT_TOKEN_SUFFIX}`;
14
+ }
15
+ function renderRichTemplate(template, components, textClassName) {
16
+ const nodes = [];
17
+ let cursor = 0;
18
+ let tokenMatch = SLOT_TOKEN_REGEXP.exec(template);
19
+ let nodeIndex = 0;
20
+ const pushTextNode = (text2) => {
21
+ if (!text2) return;
22
+ if (!textClassName) {
23
+ nodes.push(text2);
24
+ return;
25
+ }
26
+ nodes.push(
27
+ /* @__PURE__ */ jsx("span", { className: textClassName, children: text2 }, `i18nt-text-${nodeIndex}`)
28
+ );
29
+ nodeIndex += 1;
30
+ };
31
+ while (tokenMatch) {
32
+ const tokenStart = tokenMatch.index;
33
+ const tokenText = tokenMatch[0];
34
+ const slotName = tokenMatch[1];
35
+ pushTextNode(template.slice(cursor, tokenStart));
36
+ if (!slotName) {
37
+ cursor = tokenStart + tokenText.length;
38
+ tokenMatch = SLOT_TOKEN_REGEXP.exec(template);
39
+ continue;
40
+ }
41
+ const slotNode = components[slotName];
42
+ if (slotNode !== void 0 && slotNode !== null) {
43
+ if (isValidElement(slotNode)) {
44
+ nodes.push(cloneElement(slotNode, { key: `i18nt-slot-${nodeIndex}` }));
45
+ } else {
46
+ nodes.push(
47
+ /* @__PURE__ */ jsx(Fragment$1, { children: slotNode }, `i18nt-slot-${nodeIndex}`)
48
+ );
49
+ }
50
+ nodeIndex += 1;
51
+ }
52
+ cursor = tokenStart + tokenText.length;
53
+ tokenMatch = SLOT_TOKEN_REGEXP.exec(template);
54
+ }
55
+ pushTextNode(template.slice(cursor));
56
+ return nodes;
57
+ }
58
+ function I18nT({
59
+ t,
60
+ i18nKey,
61
+ values,
62
+ components,
63
+ textClassName,
64
+ as: Wrapper,
65
+ className
66
+ }) {
67
+ const slotValues = {
68
+ ...values || {}
69
+ };
70
+ if (components) {
71
+ Object.keys(components).forEach((name2) => {
72
+ slotValues[name2] = createSlotToken(name2);
73
+ });
74
+ }
75
+ const translated = t(i18nKey, slotValues);
76
+ const hasRichSlots = !!components && Object.keys(components).length > 0;
77
+ const content2 = hasRichSlots ? renderRichTemplate(translated, components, textClassName) : textClassName ? /* @__PURE__ */ jsx("span", { className: textClassName, children: translated }) : translated;
78
+ if (!Wrapper) {
79
+ return /* @__PURE__ */ jsx(Fragment, { children: content2 });
80
+ }
81
+ const WrapperElement = Wrapper;
82
+ if (className) {
83
+ return /* @__PURE__ */ jsx(WrapperElement, { className, children: content2 });
84
+ }
85
+ return /* @__PURE__ */ jsx(WrapperElement, { children: content2 });
86
+ }
87
+ const successIconUrl = new URL("data:image/svg+xml,%3csvg%20width='46'%20height='46'%20viewBox='0%200%2046%2046'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3ccircle%20cx='23'%20cy='23'%20r='23'%20fill='%2331FF90'/%3e%3cpath%20d='M16.4281%2022.8899L20.6446%2027.1063L29.6798%2018.0711'%20stroke='black'%20stroke-width='5'%20stroke-linecap='square'%20stroke-linejoin='round'/%3e%3c/svg%3e", import.meta.url).href;
9
88
  const warnIconUrl = new URL("data:image/svg+xml,%3csvg%20width='46'%20height='46'%20viewBox='0%200%2046%2046'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M22.9783%200.0225143C10.2876%200.0225143%200%2010.3101%200%2023.0006C0%2035.6903%2010.2876%2045.9776%2022.9783%2045.9776C35.6682%2045.9776%2045.9556%2035.6903%2045.9556%2023.0006C45.9558%2010.3101%2035.6682%200.0225143%2022.9783%200.0225143ZM21.797%209.85031C21.797%209.01328%2022.4783%208.33197%2023.3154%208.33197C24.1524%208.33197%2024.8337%209.01328%2024.8337%209.85031V11.729C24.8337%2012.5662%2024.1524%2013.2475%2023.3154%2013.2475C22.4783%2013.2475%2021.797%2012.5662%2021.797%2011.7292V9.85031ZM12.0443%2023.1095H10.1657C9.32842%2023.1095%208.64717%2022.4282%208.64717%2021.5912C8.64717%2020.7541%209.32842%2020.0729%2010.1657%2020.0729H12.0443C12.8814%2020.0729%2013.5627%2020.7541%2013.5627%2021.5912C13.5627%2022.4282%2012.8819%2023.1095%2012.0443%2023.1095ZM12.6546%2014.9563C12.368%2014.6697%2012.2098%2014.2882%2012.2098%2013.8823C12.2098%2013.477%2012.3678%2013.0957%2012.6546%2012.8086C12.9411%2012.522%2013.3223%2012.3638%2013.7282%2012.3638C14.134%2012.3638%2014.515%2012.5216%2014.8021%2012.8086L16.1305%2014.137C16.4173%2014.4241%2016.5753%2014.8054%2016.5753%2015.2107C16.5753%2015.6165%2016.4171%2015.9976%2016.1305%2016.2847C15.843%2016.5715%2015.4617%2016.7295%2015.0565%2016.7295C14.6511%2016.7295%2014.2698%2016.5715%2013.9828%2016.2847L12.6546%2014.9563ZM24.2545%2039.3233H22.3764C21.5389%2039.3233%2020.8574%2038.642%2020.8574%2037.8045C20.8574%2036.9674%2021.5389%2036.2861%2022.3764%2036.2861H24.2545C25.0916%2036.2861%2025.7731%2036.9674%2025.7731%2037.8045C25.7732%2038.6421%2025.0916%2039.3233%2024.2545%2039.3233ZM26.1334%2035.8432H20.4976C19.6603%2035.8432%2018.9792%2035.1622%2018.9792%2034.3253C18.9792%2033.4875%2019.6603%2032.8063%2020.4976%2032.8063H26.133C26.9701%2032.8063%2027.6513%2033.4878%2027.6513%2034.3253C27.6518%2035.1624%2026.9705%2035.8432%2026.1334%2035.8432ZM23.3154%2032.033C18.335%2032.033%2014.2826%2027.9809%2014.2826%2023C14.2826%2018.0196%2018.3345%2013.9671%2023.3154%2013.9671C28.2958%2013.9671%2032.3478%2018.0191%2032.3478%2023C32.3478%2027.9809%2028.2958%2032.033%2023.3154%2032.033ZM31.574%2016.7295C31.1682%2016.7295%2030.7867%2016.5713%2030.5%2016.2843C29.9086%2015.6924%2029.9086%2014.7293%2030.5%2014.1374L31.8288%2012.8086C32.1155%2012.522%2032.4972%2012.364%2032.9026%2012.364C33.3082%2012.364%2033.6895%2012.522%2033.9762%2012.8084C34.568%2013.4009%2034.5676%2014.364%2033.9762%2014.9559L32.6478%2016.2843C32.3613%2016.5715%2031.98%2016.7295%2031.574%2016.7295ZM36.4652%2023.1095H34.5862C33.7491%2023.1095%2033.0678%2022.4282%2033.0678%2021.5912C33.0678%2020.7541%2033.7491%2020.0729%2034.5862%2020.0729H36.4652C37.3025%2020.0729%2037.9835%2020.7541%2037.9835%2021.5912C37.9836%2022.4282%2037.3025%2023.1095%2036.4652%2023.1095Z'%20fill='%23F89D35'/%3e%3c/svg%3e", import.meta.url).href;
10
89
  function getNoticeIcon(type) {
11
90
  if (type === "success") {
@@ -17,7 +96,7 @@ function getNoticeIcon(type) {
17
96
  return null;
18
97
  }
19
98
  function ConfirmNoticeDialog({
20
- open,
99
+ open: open2,
21
100
  onOpenChange,
22
101
  type = "default",
23
102
  title,
@@ -75,7 +154,7 @@ function ConfirmNoticeDialog({
75
154
  return /* @__PURE__ */ jsx(
76
155
  Dialog,
77
156
  {
78
- open,
157
+ open: open2,
79
158
  onOpenChange: handleOpenChange,
80
159
  title: ariaTitle,
81
160
  description: accessibilityDescription,
@@ -514,11 +593,11 @@ function useBindWallet({
514
593
  function isNftRewardType(type) {
515
594
  return type === RewardType.Nft || type === RewardType.BMintedNft || type === RewardType.Cap;
516
595
  }
517
- function buildFallbackLayer(reward) {
596
+ function buildFallbackLayer(reward2) {
518
597
  return {
519
598
  winner_index: 0,
520
599
  layer_no: 0,
521
- reward: [reward]
600
+ reward: [reward2]
522
601
  };
523
602
  }
524
603
  function useNftClaimFlow(options) {
@@ -606,18 +685,18 @@ function useNftClaimFlow(options) {
606
685
  return getTxExplorerUrl(chainInfo, pendingTxDialogState.txHash);
607
686
  }, [pendingTxDialogState, chainMap]);
608
687
  const claimNftReward = useCallback(
609
- async (reward, layer) => {
610
- if (!isNftRewardType(reward.reward_type)) {
688
+ async (reward2, layer) => {
689
+ if (!isNftRewardType(reward2.reward_type)) {
611
690
  return;
612
691
  }
613
- const targetLayer = layer ?? buildFallbackLayer(reward);
692
+ const targetLayer = layer ?? buildFallbackLayer(reward2);
614
693
  const target = {
615
694
  campaign_id: campaignId,
616
695
  target_type: targetType,
617
- reward_type: reward.reward_type,
618
- reward_value: reward.reward_value,
619
- reward_id: reward.reward_id,
620
- sourceReward: reward,
696
+ reward_type: reward2.reward_type,
697
+ reward_value: reward2.reward_value,
698
+ reward_id: reward2.reward_id,
699
+ sourceReward: reward2,
621
700
  sourceLayer: targetLayer
622
701
  };
623
702
  setPendingWalletClaimTarget(target);
@@ -783,8 +862,8 @@ function CopyableText({
783
862
  copyText
784
863
  }) {
785
864
  const portalContainer = useTaskOnPortalContainer();
786
- const [copied, setCopied] = useState(false);
787
- const [open, setOpen] = useState(false);
865
+ const [copied2, setCopied] = useState(false);
866
+ const [open2, setOpen] = useState(false);
788
867
  const closeTimerRef = useRef(null);
789
868
  const clearCloseTimer = useCallback(() => {
790
869
  if (closeTimerRef.current) {
@@ -817,7 +896,7 @@ function CopyableText({
817
896
  },
818
897
  [copyText]
819
898
  );
820
- return /* @__PURE__ */ jsxs(Root2, { open, onOpenChange: setOpen, children: [
899
+ return /* @__PURE__ */ jsxs(Root2, { open: open2, onOpenChange: setOpen, children: [
821
900
  /* @__PURE__ */ jsx(Trigger, { asChild: true, children: /* @__PURE__ */ jsx(
822
901
  "span",
823
902
  {
@@ -837,7 +916,7 @@ function CopyableText({
837
916
  onMouseLeave: handleMouseLeave,
838
917
  onClick: handleCopy,
839
918
  children: [
840
- copied ? /* @__PURE__ */ jsxs(Fragment, { children: [
919
+ copied2 ? /* @__PURE__ */ jsxs(Fragment, { children: [
841
920
  /* @__PURE__ */ jsx(CopiedIcon, {}),
842
921
  /* @__PURE__ */ jsx("span", { children: "COPIED" })
843
922
  ] }) : /* @__PURE__ */ jsxs(Fragment, { children: [
@@ -2184,8 +2263,8 @@ function formatTime$1(ms) {
2184
2263
  const totalMinutes = Math.floor(totalSeconds / 60);
2185
2264
  const totalHours = Math.floor(totalMinutes / 60);
2186
2265
  if (totalHours > 24) {
2187
- const days = Math.ceil(ms / (1e3 * 60 * 60 * 24));
2188
- return `${days} days`;
2266
+ const days2 = Math.ceil(ms / (1e3 * 60 * 60 * 24));
2267
+ return `${days2} days`;
2189
2268
  }
2190
2269
  const hours = totalHours;
2191
2270
  const minutes = totalMinutes % 60;
@@ -2224,18 +2303,205 @@ function CooldownTimer({
2224
2303
  }
2225
2304
  return /* @__PURE__ */ jsx("span", { className: `taskon-cooldown-timer ${className || ""}`, children: formatTime$1(remaining) });
2226
2305
  }
2227
- function getTaskPointDesc(pointsName) {
2228
- return `Complete tasks to earn ${pointsName}, which accumulate and are displayed in the ranking or lottery. The more ${pointsName} you have, the higher your chances of winning. Your total ${pointsName} will determine your ranking or lottery outcome at the end of the quest.`;
2306
+ const mandatory_tasks = "Mandatory Tasks";
2307
+ const optional_tasks = "Optional Tasks";
2308
+ const min_required = "(Min. {count} Required)";
2309
+ const min_points_required = "(Min. {count} Points Required)";
2310
+ const no_tasks_available = "No tasks available";
2311
+ const task_point_desc = "Complete tasks to earn {pointsName}, which accumulate and are displayed in the ranking or lottery. The more {pointsName} you have, the higher your chances of winning. Your total {pointsName} will determine your ranking or lottery outcome at the end of the quest.";
2312
+ const points_per_time = "/Time";
2313
+ const you_have_earned = "You have earned";
2314
+ const recurrence_daily = "Daily";
2315
+ const recurrence_weekly = "Weekly";
2316
+ const recurrence_monthly = "Monthly";
2317
+ const recurrence_unlimited = "Unlimited";
2318
+ const all_steps_completed = "All Steps Completed";
2319
+ const steps_completed = "{completed}/{total} Steps Completed";
2320
+ const please_view_link_before_verifying = "Please view the link before verifying.";
2321
+ const link_and_verify = "Link & Verify";
2322
+ const verify = "Verify";
2323
+ const verifying = "Verifying...";
2324
+ const verify_failed_title = "Verify Failed";
2325
+ const verify_failed_message = "Oops! You did not pass this task.";
2326
+ const not_eligible_title = "Not Eligible";
2327
+ const campaign_ineligibility_message = "You do not meet the campaign eligibility requirements.";
2328
+ const unknown_error = "Unknown error";
2329
+ const quest_api_not_initialized = "Quest API not initialized";
2330
+ const invite_not_reach_message = "You have invited {invited} users, but need {remaining} more to complete this task.";
2331
+ const show_more = "Show more";
2332
+ const show_less$1 = "Show less";
2333
+ const between = "Between";
2334
+ const dynamic_times_suffix = "/ {minTimes} times";
2335
+ const dynamic_max_suffix = "/ Max. {max}";
2336
+ const unlimited = "Unlimited";
2337
+ const max_points_title = "Max. {pointName}";
2338
+ const your_points_title = "Your {pointName}";
2339
+ const dynamic_tip_max_points = "Maximum points available for this task.";
2340
+ const dynamic_tip_your_points = "Points you've earned so far. Final rewards will be calculated when the quest ends.";
2341
+ const this_field_required = "This field is required";
2342
+ const submit_param_title = "Submit {paramName}";
2343
+ const submit_param_warning = "Warning: Please make sure you enter the correct {paramName}. Once submitted, it cannot be changed.";
2344
+ const submit_param_desc = "Enter your {paramName} to complete the verification. The system will use this information to verify your task completion.";
2345
+ const submit_param_enter_label = "Enter {paramName}";
2346
+ const submit_param_enter_placeholder = "Enter your {paramName}";
2347
+ const cancel = "Cancel";
2348
+ const confirm$1 = "Confirm";
2349
+ const completed = "Completed";
2350
+ const interact_with_contract = "Interact With Contract";
2351
+ const points$1 = "Points";
2352
+ const proof_of_work = "Proof of Work";
2353
+ const please_enter_content = "Please enter content";
2354
+ const please_enter_valid_url = "Please enter a valid URL";
2355
+ const submit_successfully = "Submit successfully";
2356
+ const submission_failed = "Submission failed";
2357
+ const please_upload_image_file = "Please upload an image file";
2358
+ const image_size_limit = "Image size must be less than 10MB";
2359
+ const upload_api_not_initialized = "Upload API not initialized";
2360
+ const upload_failed = "Upload failed";
2361
+ const resubmit = "Resubmit";
2362
+ const submit = "Submit";
2363
+ const submitting = "Submitting...";
2364
+ const pow_title_tip = "This task needs to be verified after submission.";
2365
+ const pow_points_tip = "The point rewards will be distributed to you after the quest ends if your task is verified as completed.";
2366
+ const enter_url = "Enter URL";
2367
+ const enter_here = "Enter here";
2368
+ const uploaded_image_alt = "Uploaded";
2369
+ const image_upload_hint = "JPG, PNG, SVG, WEBP, GIF.\nMAX 10MB.";
2370
+ const average_review_default = "{ownerName} handles task verification.";
2371
+ const average_review_minutes = "{ownerName} handles task verification, taking an average of {minutes} minute(s) after submission.";
2372
+ const average_review_hours = "{ownerName} handles task verification, taking an average of {hours} hour(s) after submission.";
2373
+ const rules = "Rules";
2374
+ const instructions = "Instructions";
2375
+ const swap_rule_every = "Every";
2376
+ const swap_rule_will_give = "will give you";
2377
+ const points_name_fallback = "Points";
2378
+ const fsl_id = "FSL ID";
2379
+ const verify_failed_twitter_delay = "This is usually due to X (Twitter) delays.\nPlease try again in 30 seconds and make sure you used your linked X account{nameSuffix}.";
2380
+ const verify_failed_discord_delay = "This is usually due to Discord delays.\nPlease try again in 30 seconds and make sure you used your linked Discord account{nameSuffix}.";
2381
+ const verify_failed_telegram_delay = "This is usually due to Telegram delays.\nPlease try again in 30 seconds and make sure you used your linked Telegram account{nameSuffix}.";
2382
+ const verify_failed_toast_prefix = "Oops! Verification Failed!";
2383
+ const between_time_range = "Between {start} - {end}";
2384
+ const swap_rule_sentence = "Every {volume} will give you {points} {pointName}{maxText}";
2385
+ const you_have_earned_with_points_name = "You have earned {totalPoints} {pointsName}";
2386
+ const enMessages$1 = {
2387
+ mandatory_tasks,
2388
+ optional_tasks,
2389
+ min_required,
2390
+ min_points_required,
2391
+ no_tasks_available,
2392
+ task_point_desc,
2393
+ points_per_time,
2394
+ you_have_earned,
2395
+ recurrence_daily,
2396
+ recurrence_weekly,
2397
+ recurrence_monthly,
2398
+ recurrence_unlimited,
2399
+ all_steps_completed,
2400
+ steps_completed,
2401
+ please_view_link_before_verifying,
2402
+ link_and_verify,
2403
+ verify,
2404
+ verifying,
2405
+ verify_failed_title,
2406
+ verify_failed_message,
2407
+ not_eligible_title,
2408
+ campaign_ineligibility_message,
2409
+ unknown_error,
2410
+ quest_api_not_initialized,
2411
+ invite_not_reach_message,
2412
+ show_more,
2413
+ show_less: show_less$1,
2414
+ between,
2415
+ dynamic_times_suffix,
2416
+ dynamic_max_suffix,
2417
+ unlimited,
2418
+ max_points_title,
2419
+ your_points_title,
2420
+ dynamic_tip_max_points,
2421
+ dynamic_tip_your_points,
2422
+ this_field_required,
2423
+ submit_param_title,
2424
+ submit_param_warning,
2425
+ submit_param_desc,
2426
+ submit_param_enter_label,
2427
+ submit_param_enter_placeholder,
2428
+ cancel,
2429
+ confirm: confirm$1,
2430
+ completed,
2431
+ interact_with_contract,
2432
+ points: points$1,
2433
+ proof_of_work,
2434
+ please_enter_content,
2435
+ please_enter_valid_url,
2436
+ submit_successfully,
2437
+ submission_failed,
2438
+ please_upload_image_file,
2439
+ image_size_limit,
2440
+ upload_api_not_initialized,
2441
+ upload_failed,
2442
+ resubmit,
2443
+ submit,
2444
+ submitting,
2445
+ pow_title_tip,
2446
+ pow_points_tip,
2447
+ enter_url,
2448
+ enter_here,
2449
+ uploaded_image_alt,
2450
+ image_upload_hint,
2451
+ average_review_default,
2452
+ average_review_minutes,
2453
+ average_review_hours,
2454
+ rules,
2455
+ instructions,
2456
+ swap_rule_every,
2457
+ swap_rule_will_give,
2458
+ points_name_fallback,
2459
+ fsl_id,
2460
+ verify_failed_twitter_delay,
2461
+ verify_failed_discord_delay,
2462
+ verify_failed_telegram_delay,
2463
+ verify_failed_toast_prefix,
2464
+ between_time_range,
2465
+ swap_rule_sentence,
2466
+ you_have_earned_with_points_name
2467
+ };
2468
+ const loadMessages$1 = createLocaleLoader(
2469
+ enMessages$1,
2470
+ {
2471
+ ko: () => import("./taskwidget-ko-EHgXFV4B.js").then((module2) => ({
2472
+ default: module2.default
2473
+ })),
2474
+ ja: () => import("./taskwidget-ja-CqSu-yWA.js").then((module2) => ({
2475
+ default: module2.default
2476
+ })),
2477
+ ru: () => import("./taskwidget-ru-CMbLQDK4.js").then((module2) => ({
2478
+ default: module2.default
2479
+ })),
2480
+ es: () => import("./taskwidget-es-Do9b3Mqw.js").then((module2) => ({
2481
+ default: module2.default
2482
+ }))
2483
+ }
2484
+ );
2485
+ function useTaskWidgetLocale() {
2486
+ return useTranslation({
2487
+ widgetId: "TaskWidget",
2488
+ defaultMessages: enMessages$1,
2489
+ loadMessages: loadMessages$1
2490
+ });
2229
2491
  }
2230
2492
  function PointsDisplay({
2231
- points,
2493
+ points: points2,
2232
2494
  isPeriodic,
2233
2495
  tip,
2234
2496
  isCompleted = false,
2235
- pointsName = "Points"
2497
+ pointsName
2236
2498
  }) {
2237
- if (!points) return null;
2238
- const pointsDesc = getTaskPointDesc(pointsName);
2499
+ const { t } = useTaskWidgetLocale();
2500
+ if (!points2) return null;
2501
+ const resolvedPointsName = pointsName || t("points_name_fallback");
2502
+ const pointsDesc = t("task_point_desc", {
2503
+ pointsName: resolvedPointsName
2504
+ });
2239
2505
  return /* @__PURE__ */ jsxs("span", { className: "taskon-task-item-points", children: [
2240
2506
  /* @__PURE__ */ jsx(TipPopover, { content: pointsDesc, children: /* @__PURE__ */ jsxs(
2241
2507
  "span",
@@ -2243,24 +2509,33 @@ function PointsDisplay({
2243
2509
  className: `taskon-task-item-points-value ${isCompleted ? "taskon-task-item-points-value--completed" : ""}`,
2244
2510
  children: [
2245
2511
  "+",
2246
- points
2512
+ points2
2247
2513
  ]
2248
2514
  }
2249
2515
  ) }),
2250
- isPeriodic && /* @__PURE__ */ jsx("span", { className: "taskon-task-item-points-time", children: "/Time" }),
2516
+ isPeriodic && /* @__PURE__ */ jsx("span", { className: "taskon-task-item-points-time", children: t("points_per_time") }),
2251
2517
  tip && /* @__PURE__ */ jsx(TipPopover, { content: tip, className: "taskon-task-item-tip" })
2252
2518
  ] });
2253
2519
  }
2254
2520
  function TotalEarnPoint({
2255
2521
  totalPoints,
2256
- pointsName = "points"
2522
+ pointsName
2257
2523
  }) {
2524
+ const { t } = useTaskWidgetLocale();
2258
2525
  if (!totalPoints || totalPoints <= 0) return null;
2259
- return /* @__PURE__ */ jsxs("div", { className: "taskon-task-item-total-earn", children: [
2260
- /* @__PURE__ */ jsx("span", { className: "taskon-task-item-total-earn-text", children: "You have earned" }),
2261
- /* @__PURE__ */ jsx("span", { className: "taskon-task-item-total-earn-value", children: totalPoints }),
2262
- /* @__PURE__ */ jsx("span", { className: "taskon-task-item-total-earn-text", children: pointsName })
2263
- ] });
2526
+ const resolvedPointsName = pointsName || t("points_name_fallback");
2527
+ return /* @__PURE__ */ jsx("div", { className: "taskon-task-item-total-earn", children: /* @__PURE__ */ jsx(
2528
+ I18nT,
2529
+ {
2530
+ t,
2531
+ i18nKey: "you_have_earned_with_points_name",
2532
+ textClassName: "taskon-task-item-total-earn-text",
2533
+ components: {
2534
+ totalPoints: /* @__PURE__ */ jsx("span", { className: "taskon-task-item-total-earn-value", children: totalPoints }),
2535
+ pointsName: /* @__PURE__ */ jsx("span", { className: "taskon-task-item-total-earn-text", children: resolvedPointsName })
2536
+ }
2537
+ }
2538
+ ) });
2264
2539
  }
2265
2540
  function RecurrenceBadge({
2266
2541
  type,
@@ -2268,6 +2543,7 @@ function RecurrenceBadge({
2268
2543
  coolDownRemaining,
2269
2544
  onCooldownComplete
2270
2545
  }) {
2546
+ const { t } = useTaskWidgetLocale();
2271
2547
  const [cooldownDone, setCooldownDone] = useState(false);
2272
2548
  useEffect(() => {
2273
2549
  if (coolDownRemaining && coolDownRemaining > 0) {
@@ -2290,10 +2566,10 @@ function RecurrenceBadge({
2290
2566
  }
2291
2567
  if (!isCurrentDone || cooldownDone) {
2292
2568
  const badgeText = {
2293
- Daily: "Daily",
2294
- Weekly: "Weekly",
2295
- Monthly: "Monthly",
2296
- Unlimited: "Unlimited"
2569
+ Daily: t("recurrence_daily"),
2570
+ Weekly: t("recurrence_weekly"),
2571
+ Monthly: t("recurrence_monthly"),
2572
+ Unlimited: t("recurrence_unlimited")
2297
2573
  };
2298
2574
  return /* @__PURE__ */ jsx("div", { className: "taskon-task-item-recurrence", children: badgeText[type] || type });
2299
2575
  }
@@ -2437,12 +2713,8 @@ function getSnsTypeFromIdentity(identityType) {
2437
2713
  return void 0;
2438
2714
  }
2439
2715
  }
2440
- const VERIFY_FAILED_TITLE = "Verify Failed";
2441
- const ELIGIBILITY_FAILED_TITLE = "Not Eligible";
2442
- const DEFAULT_VERIFY_FAILED_MESSAGE = "Oops! You did not pass this task.";
2443
- const DEFAULT_ELIGIBILITY_FAILED_MESSAGE = "You do not meet the campaign eligibility requirements.";
2444
2716
  const CAMPAIGN_INELIGIBILITY_CODE = "CAMPAIGN_INELIGIBILITY";
2445
- function extractErrorMessage(error) {
2717
+ function extractErrorMessage(error, fallbackMessage) {
2446
2718
  if (error instanceof Error) {
2447
2719
  return error.message;
2448
2720
  }
@@ -2455,9 +2727,9 @@ function extractErrorMessage(error) {
2455
2727
  return maybeMessage;
2456
2728
  }
2457
2729
  }
2458
- return "Unknown error";
2730
+ return fallbackMessage;
2459
2731
  }
2460
- function buildInviteNotReachMessage(errorData) {
2732
+ function buildInviteNotReachMessage(errorData, template) {
2461
2733
  if (!errorData || typeof errorData !== "object") {
2462
2734
  return null;
2463
2735
  }
@@ -2466,7 +2738,7 @@ function buildInviteNotReachMessage(errorData) {
2466
2738
  return null;
2467
2739
  }
2468
2740
  const remaining = Math.max(0, data2.min_required - data2.invited);
2469
- return `You have invited ${data2.invited} users, but need ${remaining} more to complete this task.`;
2741
+ return template.replace("{invited}", String(data2.invited)).replace("{remaining}", String(remaining));
2470
2742
  }
2471
2743
  function useTaskSubmit({
2472
2744
  campaignId,
@@ -2485,6 +2757,7 @@ function useTaskSubmit({
2485
2757
  const client = (context == null ? void 0 : context.client) ?? null;
2486
2758
  const userInfo = (context == null ? void 0 : context.userInfo) ?? null;
2487
2759
  const { toast } = useToast();
2760
+ const { t } = useTaskWidgetLocale();
2488
2761
  const [isSubmitting, setIsSubmitting] = useState(false);
2489
2762
  const [error, setError] = useState(null);
2490
2763
  const [coolDown, setCoolDown] = useState(null);
@@ -2515,22 +2788,25 @@ function useTaskSubmit({
2515
2788
  (taskPlatform) => {
2516
2789
  if (taskPlatform === "Twitter") {
2517
2790
  const name2 = getSnsUserName("Twitter");
2518
- return `This is usually due to X(Twitter) delays.
2519
- Please try again in 30 seconds and make sure you used your linked X account${name2 ? `, ${name2}` : ""}.`;
2791
+ return t("verify_failed_twitter_delay", {
2792
+ nameSuffix: name2 ? ` (${name2})` : ""
2793
+ });
2520
2794
  }
2521
2795
  if (taskPlatform === "Discord") {
2522
2796
  const name2 = getSnsUserName("Discord");
2523
- return `This is usually due to Discord delays.
2524
- Please try again in 30 seconds and make sure you used your linked Discord account${name2 ? `, ${name2}` : ""}.`;
2797
+ return t("verify_failed_discord_delay", {
2798
+ nameSuffix: name2 ? ` (${name2})` : ""
2799
+ });
2525
2800
  }
2526
2801
  if (taskPlatform === "Telegram") {
2527
2802
  const name2 = getSnsUserName("Telegram");
2528
- return `This is usually due to Telegram delays.
2529
- Please try again in 30 seconds and make sure you used your linked Telegram account${name2 ? `, ${name2}` : ""}.`;
2803
+ return t("verify_failed_telegram_delay", {
2804
+ nameSuffix: name2 ? ` (${name2})` : ""
2805
+ });
2530
2806
  }
2531
- return DEFAULT_VERIFY_FAILED_MESSAGE;
2807
+ return t("verify_failed_message");
2532
2808
  },
2533
- [getSnsUserName]
2809
+ [getSnsUserName, t]
2534
2810
  );
2535
2811
  const notifyVerifyFailed = useCallback(
2536
2812
  (notice) => {
@@ -2539,17 +2815,17 @@ Please try again in 30 seconds and make sure you used your linked Telegram accou
2539
2815
  return;
2540
2816
  }
2541
2817
  if (notice.source === "verify_failed") {
2542
- if (notice.message === DEFAULT_VERIFY_FAILED_MESSAGE) {
2543
- toast.error(DEFAULT_VERIFY_FAILED_MESSAGE);
2818
+ if (notice.message === t("verify_failed_message")) {
2819
+ toast.error(t("verify_failed_message"));
2544
2820
  return;
2545
2821
  }
2546
- toast.error(`Oops! Verification Failed!
2822
+ toast.error(`${t("verify_failed_toast_prefix")}
2547
2823
  ${notice.message}`, 1e4);
2548
2824
  return;
2549
2825
  }
2550
2826
  toast.error(notice.message);
2551
2827
  },
2552
- [onVerifyFailedNotice, toast]
2828
+ [onVerifyFailedNotice, t, toast]
2553
2829
  );
2554
2830
  const {
2555
2831
  bindIfNeed: bindSns,
@@ -2562,8 +2838,8 @@ ${notice.message}`, 1e4);
2562
2838
  await doSubmit();
2563
2839
  },
2564
2840
  // Re-auth success: resubmit task with OAuth token (same as Vue flow)
2565
- onAuthSuccess: async (token) => {
2566
- await doSubmit(token);
2841
+ onAuthSuccess: async (token2) => {
2842
+ await doSubmit(token2);
2567
2843
  },
2568
2844
  onFailed: (err) => {
2569
2845
  setError(err);
@@ -2591,10 +2867,10 @@ ${notice.message}`, 1e4);
2591
2867
  async (overrideValue) => {
2592
2868
  var _a;
2593
2869
  if (!questApi) {
2594
- const err = "Quest API not initialized";
2870
+ const err = t("quest_api_not_initialized");
2595
2871
  setError(err);
2596
2872
  notifyVerifyFailed({
2597
- title: VERIFY_FAILED_TITLE,
2873
+ title: t("verify_failed_title"),
2598
2874
  message: err,
2599
2875
  source: "api_error",
2600
2876
  platform,
@@ -2617,7 +2893,7 @@ ${notice.message}`, 1e4);
2617
2893
  const verifyFailedMessage = buildVerifyFailedMessage(platform);
2618
2894
  setError(verifyFailedMessage);
2619
2895
  notifyVerifyFailed({
2620
- title: VERIFY_FAILED_TITLE,
2896
+ title: t("verify_failed_title"),
2621
2897
  message: verifyFailedMessage,
2622
2898
  source: "verify_failed",
2623
2899
  platform
@@ -2627,19 +2903,19 @@ ${notice.message}`, 1e4);
2627
2903
  } catch (e) {
2628
2904
  const apiError = e instanceof ApiError ? e : null;
2629
2905
  const errorCode = apiError == null ? void 0 : apiError.code;
2630
- const rawErrorMessage = extractErrorMessage(e);
2906
+ const rawErrorMessage = extractErrorMessage(e, t("unknown_error"));
2631
2907
  if (errorCode && isUnauthorizedError(errorCode) && needsSnsBinding) {
2632
2908
  await reAuth();
2633
2909
  return;
2634
2910
  }
2635
2911
  if (errorCode === CAMPAIGN_INELIGIBILITY_CODE) {
2636
- const eligibilityMessage = rawErrorMessage || DEFAULT_ELIGIBILITY_FAILED_MESSAGE;
2912
+ const eligibilityMessage = rawErrorMessage || t("campaign_ineligibility_message");
2637
2913
  setError(eligibilityMessage);
2638
2914
  if (onCampaignIneligibility) {
2639
2915
  await onCampaignIneligibility();
2640
2916
  } else {
2641
2917
  notifyVerifyFailed({
2642
- title: ELIGIBILITY_FAILED_TITLE,
2918
+ title: t("not_eligible_title"),
2643
2919
  message: eligibilityMessage,
2644
2920
  source: "api_error",
2645
2921
  platform,
@@ -2650,11 +2926,17 @@ ${notice.message}`, 1e4);
2650
2926
  return;
2651
2927
  }
2652
2928
  if (errorCode === ErrorCode.INVITE_JOIN_IS_NOT_REACH) {
2653
- const inviteNotReachMessage = buildInviteNotReachMessage(apiError == null ? void 0 : apiError.data);
2929
+ const inviteNotReachMessage = buildInviteNotReachMessage(
2930
+ apiError == null ? void 0 : apiError.data,
2931
+ t("invite_not_reach_message", {
2932
+ invited: "{invited}",
2933
+ remaining: "{remaining}"
2934
+ })
2935
+ );
2654
2936
  const inviteErrorMessage = inviteNotReachMessage || rawErrorMessage;
2655
2937
  setError(inviteErrorMessage);
2656
2938
  notifyVerifyFailed({
2657
- title: VERIFY_FAILED_TITLE,
2939
+ title: t("verify_failed_title"),
2658
2940
  message: inviteErrorMessage,
2659
2941
  source: "verify_failed",
2660
2942
  platform,
@@ -2665,7 +2947,7 @@ ${notice.message}`, 1e4);
2665
2947
  }
2666
2948
  setError(rawErrorMessage);
2667
2949
  notifyVerifyFailed({
2668
- title: VERIFY_FAILED_TITLE,
2950
+ title: t("verify_failed_title"),
2669
2951
  message: rawErrorMessage,
2670
2952
  source: "api_error",
2671
2953
  platform,
@@ -2687,10 +2969,11 @@ ${notice.message}`, 1e4);
2687
2969
  buildVerifyFailedMessage,
2688
2970
  notifyVerifyFailed,
2689
2971
  needsSnsBinding,
2690
- reAuth
2972
+ reAuth,
2973
+ t
2691
2974
  ]
2692
2975
  );
2693
- const submit = useCallback(
2976
+ const submit2 = useCallback(
2694
2977
  async (overrideValue) => {
2695
2978
  setError(null);
2696
2979
  setCoolDown(null);
@@ -2721,7 +3004,7 @@ ${notice.message}`, 1e4);
2721
3004
  setError(null);
2722
3005
  }, []);
2723
3006
  return {
2724
- submit,
3007
+ submit: submit2,
2725
3008
  isSubmitting: isSubmitting || isWaitingAuth || isBindingWallet,
2726
3009
  error,
2727
3010
  coolDown,
@@ -2819,30 +3102,31 @@ function useLinkTaskTracker(taskId, isLinkTask) {
2819
3102
  needClickLink
2820
3103
  };
2821
3104
  }
2822
- const DEFAULT_TITLE = "Verify Failed";
2823
- const DEFAULT_MESSAGE = "Oops! You did not pass this task.";
2824
3105
  function TaskVerifyFailedDialog({
2825
- open,
2826
- title = DEFAULT_TITLE,
2827
- message = DEFAULT_MESSAGE,
3106
+ open: open2,
3107
+ title,
3108
+ message,
2828
3109
  onClose
2829
3110
  }) {
3111
+ const { t } = useTaskWidgetLocale();
3112
+ const resolvedTitle = title || t("verify_failed_title");
3113
+ const resolvedMessage = message || t("verify_failed_message");
2830
3114
  return /* @__PURE__ */ jsx(
2831
3115
  ConfirmNoticeDialog,
2832
3116
  {
2833
- open,
3117
+ open: open2,
2834
3118
  onOpenChange: (nextOpen) => {
2835
3119
  if (!nextOpen) {
2836
3120
  onClose();
2837
3121
  }
2838
3122
  },
2839
3123
  type: "warn",
2840
- title,
3124
+ title: resolvedTitle,
2841
3125
  showCloseButton: true,
2842
3126
  contentClassName: "taskon-task-verify-failed-dialog",
2843
- accessibilityTitle: title,
2844
- accessibilityDescription: message,
2845
- children: /* @__PURE__ */ jsx("div", { className: "taskon-task-verify-failed-dialog-message", children: message })
3127
+ accessibilityTitle: resolvedTitle,
3128
+ accessibilityDescription: resolvedMessage,
3129
+ children: /* @__PURE__ */ jsx("div", { className: "taskon-task-verify-failed-dialog-message", children: resolvedMessage })
2846
3130
  }
2847
3131
  );
2848
3132
  }
@@ -2889,9 +3173,10 @@ const VerifyButton = forwardRef(
2889
3173
  className
2890
3174
  }, ref) {
2891
3175
  const { toast } = useToast();
3176
+ const { t } = useTaskWidgetLocale();
2892
3177
  const [verifyFailedNotice, setVerifyFailedNotice] = useState(null);
2893
3178
  const {
2894
- submit,
3179
+ submit: submit2,
2895
3180
  isSubmitting,
2896
3181
  clearError,
2897
3182
  isSnsBindingRequired,
@@ -2950,7 +3235,7 @@ const VerifyButton = forwardRef(
2950
3235
  );
2951
3236
  const handleClick = async () => {
2952
3237
  if (needLink && !isLinkClicked2) {
2953
- toast.error("Please view the link before verifying.");
3238
+ toast.error(t("please_view_link_before_verifying"));
2954
3239
  return;
2955
3240
  }
2956
3241
  if (onBeforeVerify) {
@@ -2965,7 +3250,7 @@ const VerifyButton = forwardRef(
2965
3250
  }
2966
3251
  }
2967
3252
  clearError();
2968
- await submit();
3253
+ await submit2();
2969
3254
  };
2970
3255
  const closeVerifyFailedDialog = useCallback(() => {
2971
3256
  setVerifyFailedNotice(null);
@@ -2975,10 +3260,10 @@ const VerifyButton = forwardRef(
2975
3260
  const buttonLabel = React__default.useMemo(() => {
2976
3261
  if (label) return label;
2977
3262
  if (isSnsBindingRequired || isWalletBindingRequired) {
2978
- return "Link & Verify";
3263
+ return t("link_and_verify");
2979
3264
  }
2980
- return "Verify";
2981
- }, [label, isSnsBindingRequired, isWalletBindingRequired]);
3265
+ return t("verify");
3266
+ }, [label, isSnsBindingRequired, isWalletBindingRequired, t]);
2982
3267
  return /* @__PURE__ */ jsxs(Fragment, { children: [
2983
3268
  /* @__PURE__ */ jsxs("div", { className: "taskon-verify-btn-wrap", children: [
2984
3269
  /* @__PURE__ */ jsxs(
@@ -2991,7 +3276,7 @@ const VerifyButton = forwardRef(
2991
3276
  "aria-busy": isLoading,
2992
3277
  children: [
2993
3278
  isLoading && /* @__PURE__ */ jsx(SpinnerIcon, {}),
2994
- /* @__PURE__ */ jsx("span", { children: isLoading ? "Verifying..." : buttonLabel })
3279
+ /* @__PURE__ */ jsx("span", { children: isLoading ? t("verifying") : buttonLabel })
2995
3280
  ]
2996
3281
  }
2997
3282
  ),
@@ -3018,16 +3303,19 @@ const VerifyButton = forwardRef(
3018
3303
  function ExpandableContent({
3019
3304
  children,
3020
3305
  maxHeight = 21,
3021
- showMoreText = "Show more",
3022
- showLessText = "Show less",
3306
+ showMoreText,
3307
+ showLessText,
3023
3308
  className,
3024
3309
  animated = true,
3025
3310
  animationDuration = 300
3026
3311
  }) {
3312
+ const { t } = useTaskWidgetLocale();
3027
3313
  const contentRef = useRef(null);
3028
3314
  const [isExpanded, setIsExpanded] = useState(false);
3029
3315
  const [needsExpand, setNeedsExpand] = useState(false);
3030
3316
  const [contentHeight, setContentHeight] = useState(0);
3317
+ const resolvedShowMoreText = showMoreText || t("show_more");
3318
+ const resolvedShowLessText = showLessText || t("show_less");
3031
3319
  const measureContent = useCallback(() => {
3032
3320
  if (contentRef.current) {
3033
3321
  const scrollHeight = contentRef.current.scrollHeight;
@@ -3094,7 +3382,7 @@ function ExpandableContent({
3094
3382
  onClick: handleToggle,
3095
3383
  "aria-expanded": isExpanded,
3096
3384
  children: [
3097
- /* @__PURE__ */ jsx("span", { className: "taskon-expandable-toggle-text", children: isExpanded ? showLessText : showMoreText }),
3385
+ /* @__PURE__ */ jsx("span", { className: "taskon-expandable-toggle-text", children: isExpanded ? resolvedShowLessText : resolvedShowMoreText }),
3098
3386
  /* @__PURE__ */ jsx(
3099
3387
  "svg",
3100
3388
  {
@@ -3135,11 +3423,12 @@ function TimeRange({
3135
3423
  end,
3136
3424
  className
3137
3425
  }) {
3138
- const timeRangeText = `${formatTime(start)} - ${formatTime(end)}`;
3139
- return /* @__PURE__ */ jsxs("div", { className: `taskon-task-time-range ${className || ""}`, children: [
3140
- /* @__PURE__ */ jsx("span", { className: "taskon-task-time-range-label", children: "Between " }),
3141
- /* @__PURE__ */ jsx("span", { className: "taskon-task-time-range-value", children: timeRangeText })
3142
- ] });
3426
+ const { t } = useTaskWidgetLocale();
3427
+ const timeRangeText = t("between_time_range", {
3428
+ start: formatTime(start),
3429
+ end: formatTime(end)
3430
+ });
3431
+ return /* @__PURE__ */ jsx("div", { className: `taskon-task-time-range ${className || ""}`, children: /* @__PURE__ */ jsx("span", { className: "taskon-task-time-range-value", children: timeRangeText }) });
3143
3432
  }
3144
3433
  const VUE_RATE_LIMIT_TWITTER_TASK_IDS = /* @__PURE__ */ new Set([
3145
3434
  "FollowTwitter",
@@ -3216,7 +3505,7 @@ function TaskContent({
3216
3505
  }
3217
3506
  function TemplateTask({
3218
3507
  campaignId,
3219
- task,
3508
+ task: task2,
3220
3509
  userStatus,
3221
3510
  onCompleted,
3222
3511
  onBeforeVerify,
@@ -3249,11 +3538,11 @@ function TemplateTask({
3249
3538
  }, [coolDownEnd]);
3250
3539
  const params = useMemo(() => {
3251
3540
  try {
3252
- return JSON.parse(task.params);
3541
+ return JSON.parse(task2.params);
3253
3542
  } catch {
3254
3543
  return {};
3255
3544
  }
3256
- }, [task.params]);
3545
+ }, [task2.params]);
3257
3546
  const snsType = useMemo(
3258
3547
  () => getSnsTypeFromIdentity(params.user_identity_type),
3259
3548
  [params.user_identity_type]
@@ -3261,18 +3550,18 @@ function TemplateTask({
3261
3550
  const chainType = useChainType(params.network);
3262
3551
  const shouldStartVerifyFailCooldown = useMemo(() => {
3263
3552
  return shouldEnableVueVerifyFailCooldown(
3264
- task.template_id,
3553
+ task2.template_id,
3265
3554
  Boolean(snsType),
3266
3555
  Boolean(chainType)
3267
3556
  );
3268
- }, [task.template_id, snsType, chainType]);
3557
+ }, [task2.template_id, snsType, chainType]);
3269
3558
  const isLinkTask = Boolean(params.is_link_task);
3270
3559
  const {
3271
3560
  hasClicked: isLinkClicked2,
3272
3561
  markClicked: markLinkClicked2,
3273
3562
  resetClicked: resetLinkClicked,
3274
3563
  needClickLink
3275
- } = useLinkTaskTracker(task.id, isLinkTask);
3564
+ } = useLinkTaskTracker(task2.id, isLinkTask);
3276
3565
  const prevCurrentDoneRef = useRef(isCurrentDone);
3277
3566
  useEffect(() => {
3278
3567
  if (prevCurrentDoneRef.current && !isCurrentDone && isLinkTask) {
@@ -3291,9 +3580,9 @@ function TemplateTask({
3291
3580
  if (params.title_express) {
3292
3581
  return params.title_express;
3293
3582
  }
3294
- if (task.name) return task.name;
3295
- return task.template_id;
3296
- }, [params, task.name, task.template_id]);
3583
+ if (task2.name) return task2.name;
3584
+ return task2.template_id;
3585
+ }, [params, task2.name, task2.template_id]);
3297
3586
  const renderedTitle = useMemo(() => {
3298
3587
  if (params.title_express) {
3299
3588
  return /* @__PURE__ */ jsx(
@@ -3309,9 +3598,9 @@ function TemplateTask({
3309
3598
  const handleVerifySuccess = useCallback(
3310
3599
  (result) => {
3311
3600
  setIsLoading(false);
3312
- onCompleted == null ? void 0 : onCompleted(task.id, result);
3601
+ onCompleted == null ? void 0 : onCompleted(task2.id, result);
3313
3602
  },
3314
- [task.id, onCompleted]
3603
+ [task2.id, onCompleted]
3315
3604
  );
3316
3605
  const handleVerifyError = useCallback((error) => {
3317
3606
  var _a2;
@@ -3325,7 +3614,7 @@ function TemplateTask({
3325
3614
  setCoolDownEnd(null);
3326
3615
  onCooldownComplete == null ? void 0 : onCooldownComplete();
3327
3616
  }, [onCooldownComplete]);
3328
- const isPeriodic = task.recurrence && task.recurrence !== "Once";
3617
+ const isPeriodic = task2.recurrence && task2.recurrence !== "Once";
3329
3618
  const showVerifyButton = useMemo(() => {
3330
3619
  if (noVerify) {
3331
3620
  return false;
@@ -3353,8 +3642,8 @@ function TemplateTask({
3353
3642
  return /* @__PURE__ */ jsx(
3354
3643
  TaskCardBase,
3355
3644
  {
3356
- taskId: task.id,
3357
- templateId: task.template_id,
3645
+ taskId: task2.id,
3646
+ templateId: task2.template_id,
3358
3647
  title: renderedTitle,
3359
3648
  targetUrl: titleLinkUrl,
3360
3649
  onTitleLinkClick: isLinkTask ? markLinkClicked2 : void 0,
@@ -3364,13 +3653,13 @@ function TemplateTask({
3364
3653
  isSubmitted,
3365
3654
  isLoading,
3366
3655
  disabled,
3367
- recurrenceType: task.recurrence,
3656
+ recurrenceType: task2.recurrence,
3368
3657
  isPeriodic,
3369
3658
  isCurrentDone,
3370
3659
  coolDownRemaining,
3371
3660
  onCooldownComplete: handleCooldownComplete,
3372
- pointsValue: (_a = task.points) == null ? void 0 : _a.amount,
3373
- pointsName: (_b = task.points) == null ? void 0 : _b.points_name,
3661
+ pointsValue: (_a = task2.points) == null ? void 0 : _a.amount,
3662
+ pointsName: (_b = task2.points) == null ? void 0 : _b.points_name,
3374
3663
  totalEarnedPoints: userStatus == null ? void 0 : userStatus.total_points,
3375
3664
  className,
3376
3665
  actionSlot: showVerifyButton ? /* @__PURE__ */ jsx(
@@ -3378,10 +3667,10 @@ function TemplateTask({
3378
3667
  {
3379
3668
  ref: verifyButtonRef,
3380
3669
  campaignId,
3381
- taskId: task.id,
3670
+ taskId: task2.id,
3382
3671
  snsType,
3383
3672
  chainType,
3384
- platform: task.platform,
3673
+ platform: task2.platform,
3385
3674
  isLoading,
3386
3675
  disabled: isInCooldown,
3387
3676
  needLink: needClickLink,
@@ -3424,20 +3713,21 @@ function AverageReviewTime({
3424
3713
  time: time2,
3425
3714
  ownerName
3426
3715
  }) {
3716
+ const { t } = useTaskWidgetLocale();
3427
3717
  const getText = () => {
3428
3718
  if (!time2)
3429
- return `${ownerName} Handles The Task Verification`;
3719
+ return t("average_review_default", { ownerName });
3430
3720
  if (time2 < HOUR_MS) {
3431
3721
  const minutes = Math.max(1, Math.round(time2 / MINUTE_MS));
3432
- return `${ownerName} handles the task verification, taking an average of ${minutes} minute(s) after submission.`;
3722
+ return t("average_review_minutes", { ownerName, minutes });
3433
3723
  }
3434
3724
  const hours = +(time2 / HOUR_MS).toFixed(1);
3435
- return `${ownerName} handles the task verification, taking an average of ${hours} hour(s) after submission.`;
3725
+ return t("average_review_hours", { ownerName, hours });
3436
3726
  };
3437
3727
  return /* @__PURE__ */ jsx("div", { className: "taskon-pow-review-time", children: getText() });
3438
3728
  }
3439
3729
  function PowTask({
3440
- task,
3730
+ task: task2,
3441
3731
  userStatus,
3442
3732
  onCompleted,
3443
3733
  onBeforeVerify,
@@ -3453,6 +3743,7 @@ function PowTask({
3453
3743
  const context = useContext(TaskOnContext);
3454
3744
  const client = (context == null ? void 0 : context.client) ?? null;
3455
3745
  const { toast } = useToast();
3746
+ const { t } = useTaskWidgetLocale();
3456
3747
  const fileInputRef = useRef(null);
3457
3748
  const [isSubmitting, setIsSubmitting] = useState(false);
3458
3749
  const [isCheckingEligibility, setIsCheckingEligibility] = useState(false);
@@ -3464,18 +3755,18 @@ function PowTask({
3464
3755
  const [isUploading, setIsUploading] = useState(false);
3465
3756
  const params = useMemo(() => {
3466
3757
  try {
3467
- return JSON.parse(task.params);
3758
+ return JSON.parse(task2.params);
3468
3759
  } catch {
3469
3760
  return {
3470
3761
  desc: "",
3471
3762
  type: PowTaskType.Text
3472
3763
  };
3473
3764
  }
3474
- }, [task.params]);
3765
+ }, [task2.params]);
3475
3766
  const isCompleted = (userStatus == null ? void 0 : userStatus.is_qualifier) || false;
3476
3767
  const isSubmitted = (userStatus == null ? void 0 : userStatus.is_submitter) || false;
3477
3768
  const isCurrentDone = (userStatus == null ? void 0 : userStatus.current_done) || false;
3478
- const isPeriodic = task.recurrence && task.recurrence !== "Once";
3769
+ const isPeriodic = task2.recurrence && task2.recurrence !== "Once";
3479
3770
  const coolDownRemaining = useMemo(() => {
3480
3771
  if (userStatus == null ? void 0 : userStatus.next_time) {
3481
3772
  const remaining = userStatus.next_time - Date.now();
@@ -3486,14 +3777,14 @@ function PowTask({
3486
3777
  const validateContent = useCallback(
3487
3778
  (value2) => {
3488
3779
  if (!value2.trim()) {
3489
- return "Please enter content";
3780
+ return t("please_enter_content");
3490
3781
  }
3491
3782
  if (params.type === PowTaskType.URL && !isValidUrl(value2.trim())) {
3492
- return "Please enter a valid URL";
3783
+ return t("please_enter_valid_url");
3493
3784
  }
3494
3785
  return null;
3495
3786
  },
3496
- [params.type]
3787
+ [params.type, t]
3497
3788
  );
3498
3789
  const handleInputChange = (e) => {
3499
3790
  const value2 = e.target.value;
@@ -3538,7 +3829,7 @@ function PowTask({
3538
3829
  }
3539
3830
  const submitValue = value2 || content2;
3540
3831
  if (!questApi) {
3541
- setError("Quest API not initialized");
3832
+ setError(t("quest_api_not_initialized"));
3542
3833
  return;
3543
3834
  }
3544
3835
  const validationError = validateContent(submitValue);
@@ -3550,23 +3841,32 @@ function PowTask({
3550
3841
  setError(null);
3551
3842
  try {
3552
3843
  const result = await questApi.submitTask({
3553
- task_ids: [task.id],
3844
+ task_ids: [task2.id],
3554
3845
  value: submitValue.trim()
3555
3846
  });
3556
3847
  if ((_a2 = result.success_tasks) == null ? void 0 : _a2.length) {
3557
3848
  setContent("");
3558
- toast.success("Submit successfully");
3559
- onCompleted == null ? void 0 : onCompleted(task.id, result);
3849
+ toast.success(t("submit_successfully"));
3850
+ onCompleted == null ? void 0 : onCompleted(task2.id, result);
3560
3851
  } else {
3561
- setError("Submission failed");
3852
+ setError(t("submission_failed"));
3562
3853
  }
3563
3854
  } catch (e) {
3564
- toast.error(e instanceof Error ? e.message : "Unknown error");
3855
+ toast.error(e instanceof Error ? e.message : t("unknown_error"));
3565
3856
  } finally {
3566
3857
  setIsSubmitting(false);
3567
3858
  }
3568
3859
  },
3569
- [questApi, task.id, content2, validateContent, onCompleted, onBeforeVerify, toast]
3860
+ [
3861
+ content2,
3862
+ onBeforeVerify,
3863
+ onCompleted,
3864
+ questApi,
3865
+ t,
3866
+ task2.id,
3867
+ toast,
3868
+ validateContent
3869
+ ]
3570
3870
  );
3571
3871
  const handleImageUpload = async (e) => {
3572
3872
  var _a2;
@@ -3574,11 +3874,11 @@ function PowTask({
3574
3874
  if (!file) return;
3575
3875
  const validTypes = ["image/jpeg", "image/jpg", "image/png", "image/svg+xml", "image/webp", "image/gif"];
3576
3876
  if (!validTypes.some((type) => file.type === type || file.type.startsWith("image/"))) {
3577
- setError("Please upload an image file");
3877
+ setError(t("please_upload_image_file"));
3578
3878
  return;
3579
3879
  }
3580
3880
  if (file.size > 10 * 1024 * 1024) {
3581
- setError("Image size must be less than 10MB");
3881
+ setError(t("image_size_limit"));
3582
3882
  return;
3583
3883
  }
3584
3884
  const reader = new FileReader();
@@ -3587,7 +3887,7 @@ function PowTask({
3587
3887
  };
3588
3888
  reader.readAsDataURL(file);
3589
3889
  if (!commonApi) {
3590
- setError("Upload API not initialized");
3890
+ setError(t("upload_api_not_initialized"));
3591
3891
  return;
3592
3892
  }
3593
3893
  setIsUploading(true);
@@ -3601,7 +3901,7 @@ function PowTask({
3601
3901
  setUploadedImageUrl(result.cdn_url);
3602
3902
  await handleSubmit(result.cdn_url);
3603
3903
  } catch (err) {
3604
- setError(err instanceof Error ? err.message : "Upload failed");
3904
+ setError(err instanceof Error ? err.message : t("upload_failed"));
3605
3905
  setUploadedImage(null);
3606
3906
  setUploadedImageUrl(null);
3607
3907
  } finally {
@@ -3616,12 +3916,12 @@ function PowTask({
3616
3916
  };
3617
3917
  const buttonLabel = useMemo(() => {
3618
3918
  if (userStatus == null ? void 0 : userStatus.is_submitter) {
3619
- return "Resubmit";
3919
+ return t("resubmit");
3620
3920
  }
3621
- return "Submit";
3622
- }, [userStatus == null ? void 0 : userStatus.is_submitter]);
3921
+ return t("submit");
3922
+ }, [t, userStatus == null ? void 0 : userStatus.is_submitter]);
3623
3923
  const title = useMemo(() => {
3624
- const titleText = task.custom_name || "Proof of Work";
3924
+ const titleText = task2.custom_name || t("proof_of_work");
3625
3925
  if (params.task_url) {
3626
3926
  return /* @__PURE__ */ jsx(
3627
3927
  "a",
@@ -3636,7 +3936,7 @@ function PowTask({
3636
3936
  );
3637
3937
  }
3638
3938
  return titleText;
3639
- }, [task.custom_name, params.task_url]);
3939
+ }, [params.task_url, t, task2.custom_name]);
3640
3940
  const inputDisabled = disabled || isCompleted;
3641
3941
  const showSubmitArea = useMemo(() => {
3642
3942
  if (isCompleted) {
@@ -3655,22 +3955,22 @@ function PowTask({
3655
3955
  return /* @__PURE__ */ jsx("div", { className: `taskon-pow-task ${className || ""}`, children: /* @__PURE__ */ jsx(
3656
3956
  TaskCardBase,
3657
3957
  {
3658
- taskId: task.id,
3659
- templateId: task.template_id,
3958
+ taskId: task2.id,
3959
+ templateId: task2.template_id,
3660
3960
  title,
3661
- titleTip: "This task needs to be verified after submission.",
3961
+ titleTip: t("pow_title_tip"),
3662
3962
  icon: powIcon,
3663
3963
  isCompleted,
3664
3964
  isSubmitted,
3665
3965
  isLoading: isSubmitting,
3666
3966
  disabled,
3667
- recurrenceType: task.recurrence,
3967
+ recurrenceType: task2.recurrence,
3668
3968
  isPeriodic,
3669
3969
  isCurrentDone,
3670
3970
  coolDownRemaining,
3671
3971
  onCooldownComplete,
3672
- pointsValue: (_a = task.points) == null ? void 0 : _a.amount,
3673
- pointsTip: "The point rewards will be distributed to you after the quest ends if your task is verified as completed.",
3972
+ pointsValue: (_a = task2.points) == null ? void 0 : _a.amount,
3973
+ pointsTip: t("pow_points_tip"),
3674
3974
  children: /* @__PURE__ */ jsxs(ExpandableContent, { children: [
3675
3975
  params.desc && /* @__PURE__ */ jsx(CardDescExpress, { label: params.desc, noMaxHeight: true }),
3676
3976
  showSubmitArea && /* @__PURE__ */ jsxs("div", { className: "taskon-pow-input-area", children: [
@@ -3680,7 +3980,7 @@ function PowTask({
3680
3980
  {
3681
3981
  type: "text",
3682
3982
  className: "taskon-pow-input",
3683
- placeholder: "Enter URL",
3983
+ placeholder: t("enter_url"),
3684
3984
  value: content2,
3685
3985
  onChange: handleInputChange,
3686
3986
  onBlur: handleContentBlur,
@@ -3693,7 +3993,7 @@ function PowTask({
3693
3993
  className: `taskon-verify-btn ${isLoading ? "taskon-verify-btn--loading" : ""}`,
3694
3994
  onClick: () => handleSubmit(),
3695
3995
  disabled: !canSubmit || isLoading || inputDisabled,
3696
- children: isLoading ? "Submitting..." : buttonLabel
3996
+ children: isLoading ? t("submitting") : buttonLabel
3697
3997
  }
3698
3998
  )
3699
3999
  ] }),
@@ -3706,7 +4006,7 @@ function PowTask({
3706
4006
  maxLength: 500,
3707
4007
  showCount: true,
3708
4008
  disabled: inputDisabled,
3709
- placeholder: "Enter here"
4009
+ placeholder: t("enter_here")
3710
4010
  }
3711
4011
  ),
3712
4012
  /* @__PURE__ */ jsx(
@@ -3715,7 +4015,7 @@ function PowTask({
3715
4015
  className: `taskon-verify-btn ${isLoading ? "taskon-verify-btn--loading" : ""}`,
3716
4016
  onClick: () => handleSubmit(),
3717
4017
  disabled: !canSubmit || isLoading || inputDisabled,
3718
- children: isLoading ? "Submitting..." : buttonLabel
4018
+ children: isLoading ? t("submitting") : buttonLabel
3719
4019
  }
3720
4020
  )
3721
4021
  ] }),
@@ -3745,22 +4045,21 @@ function PowTask({
3745
4045
  },
3746
4046
  children: [
3747
4047
  uploadedImage ? /* @__PURE__ */ jsxs(Fragment, { children: [
3748
- /* @__PURE__ */ jsx("img", { className: "taskon-pow-image-preview", src: uploadedImage, alt: "Uploaded" }),
4048
+ /* @__PURE__ */ jsx(
4049
+ "img",
4050
+ {
4051
+ className: "taskon-pow-image-preview",
4052
+ src: uploadedImage,
4053
+ alt: t("uploaded_image_alt")
4054
+ }
4055
+ ),
3749
4056
  /* @__PURE__ */ jsxs("div", { className: "taskon-pow-image-mask", children: [
3750
4057
  /* @__PURE__ */ jsx("svg", { className: "taskon-pow-image-upload-icon", width: "20", height: "20", viewBox: "0 0 20 20", fill: "none", children: /* @__PURE__ */ jsx("path", { d: "M13 9L10 6M10 6L7 9M10 6V14M19 10C19 14.9706 14.9706 19 10 19C5.02944 19 1 14.9706 1 10C1 5.02944 5.02944 1 10 1C14.9706 1 19 5.02944 19 10Z", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }) }),
3751
- /* @__PURE__ */ jsxs("div", { className: "taskon-pow-image-upload-tip", children: [
3752
- "JPG, PNG, SVG, WEBP, GIF.",
3753
- "\n",
3754
- "MAX 10MB."
3755
- ] })
4058
+ /* @__PURE__ */ jsx("div", { className: "taskon-pow-image-upload-tip", children: t("image_upload_hint") })
3756
4059
  ] })
3757
4060
  ] }) : /* @__PURE__ */ jsxs(Fragment, { children: [
3758
4061
  /* @__PURE__ */ jsx("svg", { className: "taskon-pow-image-upload-icon", width: "20", height: "20", viewBox: "0 0 20 20", fill: "none", children: /* @__PURE__ */ jsx("path", { d: "M13 9L10 6M10 6L7 9M10 6V14M19 10C19 14.9706 14.9706 19 10 19C5.02944 19 1 14.9706 1 10C1 5.02944 5.02944 1 10 1C14.9706 1 19 5.02944 19 10Z", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }) }),
3759
- /* @__PURE__ */ jsxs("div", { className: "taskon-pow-image-upload-tip", children: [
3760
- "JPG, PNG, SVG, WEBP, GIF.",
3761
- "\n",
3762
- "MAX 10MB."
3763
- ] })
4062
+ /* @__PURE__ */ jsx("div", { className: "taskon-pow-image-upload-tip", children: t("image_upload_hint") })
3764
4063
  ] }),
3765
4064
  isUploading && /* @__PURE__ */ jsx("div", { className: "taskon-pow-image-progress-bar", children: /* @__PURE__ */ jsx(
3766
4065
  "div",
@@ -3782,7 +4081,7 @@ function PowTask({
3782
4081
  }
3783
4082
  function ContractInteractiveTask({
3784
4083
  campaignId,
3785
- task,
4084
+ task: task2,
3786
4085
  userStatus,
3787
4086
  onCompleted,
3788
4087
  onBeforeVerify,
@@ -3794,9 +4093,10 @@ function ContractInteractiveTask({
3794
4093
  className
3795
4094
  }) {
3796
4095
  var _a;
4096
+ const { t } = useTaskWidgetLocale();
3797
4097
  const params = useMemo(() => {
3798
4098
  try {
3799
- return JSON.parse(task.params);
4099
+ return JSON.parse(task2.params);
3800
4100
  } catch {
3801
4101
  return {
3802
4102
  chain: "",
@@ -3809,11 +4109,11 @@ function ContractInteractiveTask({
3809
4109
  task_name: ""
3810
4110
  };
3811
4111
  }
3812
- }, [task.params]);
4112
+ }, [task2.params]);
3813
4113
  const isCompleted = (userStatus == null ? void 0 : userStatus.is_qualifier) || false;
3814
4114
  const isSubmitted = (userStatus == null ? void 0 : userStatus.is_submitter) || false;
3815
4115
  const isCurrentDone = (userStatus == null ? void 0 : userStatus.current_done) || false;
3816
- const isPeriodic = task.recurrence && task.recurrence !== "Once";
4116
+ const isPeriodic = task2.recurrence && task2.recurrence !== "Once";
3817
4117
  const coolDownRemaining = useMemo(() => {
3818
4118
  if (userStatus == null ? void 0 : userStatus.next_time) {
3819
4119
  const remaining = userStatus.next_time - Date.now();
@@ -3833,7 +4133,7 @@ function ContractInteractiveTask({
3833
4133
  const autoSubmitAttemptedRef = useRef(false);
3834
4134
  useEffect(() => {
3835
4135
  autoSubmitAttemptedRef.current = false;
3836
- }, [task.id]);
4136
+ }, [task2.id]);
3837
4137
  useEffect(() => {
3838
4138
  if (!questApi) {
3839
4139
  return;
@@ -3853,14 +4153,14 @@ function ContractInteractiveTask({
3853
4153
  var _a2;
3854
4154
  try {
3855
4155
  const result = await questApi.submitTask({
3856
- task_ids: [task.id],
4156
+ task_ids: [task2.id],
3857
4157
  value: ""
3858
4158
  });
3859
4159
  if (cancelled) {
3860
4160
  return;
3861
4161
  }
3862
4162
  if ((_a2 = result.success_tasks) == null ? void 0 : _a2.length) {
3863
- onCompleted == null ? void 0 : onCompleted(task.id, result);
4163
+ onCompleted == null ? void 0 : onCompleted(task2.id, result);
3864
4164
  }
3865
4165
  } catch (error) {
3866
4166
  if (cancelled) {
@@ -3881,20 +4181,20 @@ function ContractInteractiveTask({
3881
4181
  userStatus,
3882
4182
  disabled,
3883
4183
  isSubmitted,
3884
- task.id,
4184
+ task2.id,
3885
4185
  onCompleted,
3886
4186
  onBeforeVerify
3887
4187
  ]);
3888
4188
  const handleVerifySuccess = useCallback(
3889
4189
  (result) => {
3890
- onCompleted == null ? void 0 : onCompleted(task.id, result);
4190
+ onCompleted == null ? void 0 : onCompleted(task2.id, result);
3891
4191
  },
3892
- [task.id, onCompleted]
4192
+ [task2.id, onCompleted]
3893
4193
  );
3894
4194
  const handleVerifyError = useCallback((error) => {
3895
4195
  console.error("Verify failed:", error);
3896
4196
  }, []);
3897
- const title = params.task_name || "Interact With Contract";
4197
+ const title = params.task_name || t("interact_with_contract");
3898
4198
  const needShowVerify = useMemo(() => {
3899
4199
  if (noVerify) {
3900
4200
  return false;
@@ -3920,29 +4220,29 @@ function ContractInteractiveTask({
3920
4220
  return /* @__PURE__ */ jsx("div", { className: `taskon-contract-task ${className || ""}`, children: /* @__PURE__ */ jsx(
3921
4221
  TaskCardBase,
3922
4222
  {
3923
- taskId: task.id,
3924
- templateId: task.template_id,
4223
+ taskId: task2.id,
4224
+ templateId: task2.template_id,
3925
4225
  title,
3926
4226
  targetUrl: params.task_url,
3927
4227
  icon: contractInteractiveIcon,
3928
4228
  isCompleted,
3929
4229
  isSubmitted,
3930
4230
  disabled,
3931
- recurrenceType: task.recurrence,
4231
+ recurrenceType: task2.recurrence,
3932
4232
  isPeriodic,
3933
4233
  isCurrentDone,
3934
4234
  coolDownRemaining,
3935
4235
  onCooldownComplete,
3936
- pointsValue: (_a = task.points) == null ? void 0 : _a.amount,
4236
+ pointsValue: (_a = task2.points) == null ? void 0 : _a.amount,
3937
4237
  actionSlot: (
3938
4238
  /* Verify button - 复用通用 VerifyButton,统一异常弹窗与绑定逻辑 */
3939
4239
  needShowVerify ? /* @__PURE__ */ jsx(
3940
4240
  VerifyButton,
3941
4241
  {
3942
4242
  campaignId,
3943
- taskId: task.id,
4243
+ taskId: task2.id,
3944
4244
  chainType,
3945
- platform: task.platform,
4245
+ platform: task2.platform,
3946
4246
  onBeforeVerify,
3947
4247
  onSuccess: handleVerifySuccess,
3948
4248
  onError: handleVerifyError
@@ -3978,7 +4278,7 @@ function DynamicPoints({
3978
4278
  max,
3979
4279
  userTimes,
3980
4280
  minTimes,
3981
- pointName = "Points",
4281
+ pointName,
3982
4282
  tipTitle,
3983
4283
  tipDesc,
3984
4284
  noTipTitle = false,
@@ -3990,11 +4290,13 @@ function DynamicPoints({
3990
4290
  className
3991
4291
  }) {
3992
4292
  const { requestLogin } = useTaskOnAuth();
4293
+ const { t } = useTaskWidgetLocale();
3993
4294
  const [isCoolingDown, setIsCoolingDown] = useState(false);
3994
4295
  const [coolDownLeft, setCoolDownLeft] = useState(coolDown / 1e3);
3995
4296
  const [isAnimating, setIsAnimating] = useState(false);
3996
4297
  const timerRef = useRef(null);
3997
4298
  const isTimesMode = userTimes !== void 0 && minTimes !== void 0;
4299
+ const resolvedPointName = pointName || t("points_name_fallback");
3998
4300
  useEffect(() => {
3999
4301
  return () => {
4000
4302
  if (timerRef.current) {
@@ -4011,33 +4313,33 @@ function DynamicPoints({
4011
4313
  }, [isTimesMode, isLoggedIn, userTimes, userPoint]);
4012
4314
  const maxLabel = React__default.useMemo(() => {
4013
4315
  if (isTimesMode) {
4014
- return `/ ${minTimes} times`;
4316
+ return t("dynamic_times_suffix", { minTimes });
4015
4317
  }
4016
4318
  if (max === void 0) return null;
4017
- const maxText = max === -1 ? "Unlimited" : max;
4018
- return `/ Max. ${maxText}`;
4019
- }, [isTimesMode, minTimes, max]);
4319
+ const maxText = max === -1 ? t("unlimited") : max;
4320
+ return t("dynamic_max_suffix", { max: maxText });
4321
+ }, [isTimesMode, max, minTimes, t]);
4020
4322
  const computedTipTitle = React__default.useMemo(() => {
4021
4323
  if (noTipTitle) return "";
4022
4324
  if (tipTitle) return tipTitle;
4023
4325
  if (!isLoggedIn) {
4024
- if (max !== void 0 && pointName) {
4025
- return `Max. ${pointName}`;
4326
+ if (max !== void 0 && resolvedPointName) {
4327
+ return t("max_points_title", { pointName: resolvedPointName });
4026
4328
  }
4027
4329
  } else {
4028
- if (pointName) {
4029
- return `Your ${pointName}`;
4330
+ if (resolvedPointName) {
4331
+ return t("your_points_title", { pointName: resolvedPointName });
4030
4332
  }
4031
4333
  }
4032
4334
  return "";
4033
- }, [noTipTitle, tipTitle, isLoggedIn, max, pointName]);
4335
+ }, [isLoggedIn, max, noTipTitle, resolvedPointName, t, tipTitle]);
4034
4336
  const computedTipDesc = React__default.useMemo(() => {
4035
4337
  if (tipDesc) return tipDesc;
4036
4338
  if (isStarted) {
4037
- return "Points you've earned so far. Final rewards will be calculated when the quest ends.";
4339
+ return t("dynamic_tip_your_points");
4038
4340
  }
4039
- return "Maximum points available for this task.";
4040
- }, [tipDesc, isStarted]);
4341
+ return t("dynamic_tip_max_points");
4342
+ }, [isStarted, t, tipDesc]);
4041
4343
  const tipContent = React__default.useMemo(() => {
4042
4344
  if (noTipTitle) return computedTipDesc;
4043
4345
  if (computedTipTitle) {
@@ -4114,7 +4416,7 @@ ${computedTipDesc}`;
4114
4416
  }
4115
4417
  function SwapDexTask({
4116
4418
  campaignId,
4117
- task,
4419
+ task: task2,
4118
4420
  userStatus,
4119
4421
  onCompleted,
4120
4422
  onVerifyAttempted,
@@ -4129,20 +4431,21 @@ function SwapDexTask({
4129
4431
  className
4130
4432
  }) {
4131
4433
  var _a, _b, _c, _d, _e;
4434
+ const { t } = useTaskWidgetLocale();
4132
4435
  const context = useContext(TaskOnContext);
4133
4436
  const communityInfo = context == null ? void 0 : context.communityInfo;
4134
4437
  const { isLoggedIn } = useTaskOnAuth();
4135
4438
  const params = useMemo(() => {
4136
4439
  try {
4137
- return JSON.parse(task.params);
4440
+ return JSON.parse(task2.params);
4138
4441
  } catch {
4139
4442
  return {};
4140
4443
  }
4141
- }, [task.params]);
4444
+ }, [task2.params]);
4142
4445
  const isCompleted = (userStatus == null ? void 0 : userStatus.is_qualifier) || false;
4143
4446
  const isSubmitted = (userStatus == null ? void 0 : userStatus.is_submitter) || false;
4144
4447
  const isCurrentDone = (userStatus == null ? void 0 : userStatus.current_done) || false;
4145
- const isPeriodic = task.recurrence && task.recurrence !== "Once";
4448
+ const isPeriodic = task2.recurrence && task2.recurrence !== "Once";
4146
4449
  const coolDownRemaining = useMemo(() => {
4147
4450
  if (userStatus == null ? void 0 : userStatus.next_time) {
4148
4451
  const remaining = userStatus.next_time - Date.now();
@@ -4167,24 +4470,24 @@ function SwapDexTask({
4167
4470
  }, [params]);
4168
4471
  const useLegacyVerifyFlow = isDynamicPoint || isDynamicTimes;
4169
4472
  const [verifyFailedNotice, setVerifyFailedNotice] = useState(null);
4170
- const { submit, isSubmitting } = useTaskSubmit({
4473
+ const { submit: submit2, isSubmitting } = useTaskSubmit({
4171
4474
  campaignId,
4172
- taskId: task.id,
4475
+ taskId: task2.id,
4173
4476
  chainType,
4174
4477
  // 钱包绑定:从 params.chain 获取
4175
- platform: task.platform,
4478
+ platform: task2.platform,
4176
4479
  onSuccess: (result) => {
4177
4480
  if (!useLegacyVerifyFlow) {
4178
4481
  return;
4179
4482
  }
4180
- onCompleted == null ? void 0 : onCompleted(task.id, result);
4181
- onVerifyAttempted == null ? void 0 : onVerifyAttempted(task.id, true, result);
4483
+ onCompleted == null ? void 0 : onCompleted(task2.id, result);
4484
+ onVerifyAttempted == null ? void 0 : onVerifyAttempted(task2.id, true, result);
4182
4485
  },
4183
4486
  onError: () => {
4184
4487
  if (!useLegacyVerifyFlow) {
4185
4488
  return;
4186
4489
  }
4187
- onVerifyAttempted == null ? void 0 : onVerifyAttempted(task.id, false);
4490
+ onVerifyAttempted == null ? void 0 : onVerifyAttempted(task2.id, false);
4188
4491
  },
4189
4492
  // 当后端返回 CAMPAIGN_INELIGIBILITY 时,复用现有 eligibility 检查逻辑
4190
4493
  onCampaignIneligibility: onBeforeVerify,
@@ -4212,18 +4515,18 @@ function SwapDexTask({
4212
4515
  setIsCheckingEligibility(false);
4213
4516
  }
4214
4517
  }
4215
- await submit();
4216
- }, [useLegacyVerifyFlow, onBeforeVerify, submit]);
4518
+ await submit2();
4519
+ }, [useLegacyVerifyFlow, onBeforeVerify, submit2]);
4217
4520
  const handleVerifyButtonSuccess = useCallback(
4218
4521
  (result) => {
4219
- onCompleted == null ? void 0 : onCompleted(task.id, result);
4220
- onVerifyAttempted == null ? void 0 : onVerifyAttempted(task.id, true, result);
4522
+ onCompleted == null ? void 0 : onCompleted(task2.id, result);
4523
+ onVerifyAttempted == null ? void 0 : onVerifyAttempted(task2.id, true, result);
4221
4524
  },
4222
- [task.id, onCompleted, onVerifyAttempted]
4525
+ [task2.id, onCompleted, onVerifyAttempted]
4223
4526
  );
4224
4527
  const handleVerifyButtonError = useCallback(() => {
4225
- onVerifyAttempted == null ? void 0 : onVerifyAttempted(task.id, false);
4226
- }, [task.id, onVerifyAttempted]);
4528
+ onVerifyAttempted == null ? void 0 : onVerifyAttempted(task2.id, false);
4529
+ }, [task2.id, onVerifyAttempted]);
4227
4530
  const titleExpress = useMemo(() => {
4228
4531
  return getSwapDexTitleExpress({
4229
4532
  tokenOutList: params.token_out_list,
@@ -4240,7 +4543,7 @@ function SwapDexTask({
4240
4543
  const title = useMemo(() => {
4241
4544
  return /* @__PURE__ */ jsx(TitleExpress, { express: titleExpress });
4242
4545
  }, [titleExpress]);
4243
- const pointsName = ((_a = task.points) == null ? void 0 : _a.points_name) || "Points";
4546
+ const pointsName = ((_a = task2.points) == null ? void 0 : _a.points_name) || t("points_name_fallback");
4244
4547
  const rulesMaxText = useMemo(() => {
4245
4548
  if (typeof params.swap_receive_max_points === "number" && params.swap_receive_max_points >= 0) {
4246
4549
  return `(Max ${params.swap_receive_max_points} ${pointsName})`;
@@ -4256,21 +4559,21 @@ function SwapDexTask({
4256
4559
  }, [isDynamicTimes, params.min_trades_times]);
4257
4560
  const dynamicMaxPoint = useMemo(() => {
4258
4561
  var _a2;
4259
- if (!isDynamicPoint) return (_a2 = task.points) == null ? void 0 : _a2.amount;
4562
+ if (!isDynamicPoint) return (_a2 = task2.points) == null ? void 0 : _a2.amount;
4260
4563
  return typeof params.swap_receive_max_points === "number" ? params.swap_receive_max_points : -1;
4261
- }, [isDynamicPoint, params.swap_receive_max_points, (_b = task.points) == null ? void 0 : _b.amount]);
4564
+ }, [isDynamicPoint, params.swap_receive_max_points, (_b = task2.points) == null ? void 0 : _b.amount]);
4262
4565
  const pointTip = useMemo(() => {
4263
4566
  if (!isStarted) {
4264
4567
  return {
4265
- title: `Max. ${pointsName}`,
4266
- content: "Maximum points available for this task."
4568
+ title: t("max_points_title", { pointName: pointsName }),
4569
+ content: t("dynamic_tip_max_points")
4267
4570
  };
4268
4571
  }
4269
4572
  return {
4270
- title: `Your ${pointsName}`,
4271
- content: "Points you've earned so far. Final rewards will be calculated when the quest ends."
4573
+ title: t("your_points_title", { pointName: pointsName }),
4574
+ content: t("dynamic_tip_your_points")
4272
4575
  };
4273
- }, [isStarted, pointsName]);
4576
+ }, [isStarted, pointsName, t]);
4274
4577
  const handleRefresh = useCallback(() => {
4275
4578
  handleVerify();
4276
4579
  }, [handleVerify]);
@@ -4307,24 +4610,26 @@ function SwapDexTask({
4307
4610
  onRefresh: handleRefresh
4308
4611
  }
4309
4612
  ),
4310
- ((_a2 = task.points) == null ? void 0 : _a2.amount) != null && task.points.amount > 0 && /* @__PURE__ */ jsxs("span", { className: "taskon-task-item-points", children: [
4613
+ ((_a2 = task2.points) == null ? void 0 : _a2.amount) != null && task2.points.amount > 0 && /* @__PURE__ */ jsxs("span", { className: "taskon-task-item-points", children: [
4311
4614
  /* @__PURE__ */ jsx(
4312
4615
  TipPopover,
4313
4616
  {
4314
- content: `Complete tasks to earn ${pointsName}, which accumulate and are displayed in the ranking or lottery. The more ${pointsName} you have, the higher your chances of winning. Your total ${pointsName} will determine your ranking or lottery outcome at the end of the quest.`,
4617
+ content: t("task_point_desc", {
4618
+ pointsName
4619
+ }),
4315
4620
  children: /* @__PURE__ */ jsxs(
4316
4621
  "span",
4317
4622
  {
4318
4623
  className: `taskon-task-item-points-value ${isCompleted ? "taskon-task-item-points-value--completed" : ""}`,
4319
4624
  children: [
4320
4625
  "+",
4321
- task.points.amount
4626
+ task2.points.amount
4322
4627
  ]
4323
4628
  }
4324
4629
  )
4325
4630
  }
4326
4631
  ),
4327
- isPeriodic && /* @__PURE__ */ jsx("span", { className: "taskon-task-item-points-time", children: "/Time" })
4632
+ isPeriodic && /* @__PURE__ */ jsx("span", { className: "taskon-task-item-points-time", children: t("points_per_time") })
4328
4633
  ] })
4329
4634
  ] });
4330
4635
  }
@@ -4342,9 +4647,10 @@ function SwapDexTask({
4342
4647
  isActive,
4343
4648
  isLoggedIn,
4344
4649
  handleRefresh,
4345
- (_c = task.points) == null ? void 0 : _c.amount,
4650
+ (_c = task2.points) == null ? void 0 : _c.amount,
4346
4651
  isPeriodic,
4347
- isCompleted
4652
+ isCompleted,
4653
+ t
4348
4654
  ]);
4349
4655
  const showVerifyButton = useMemo(() => {
4350
4656
  if (isDynamicPoint || isDynamicTimes) {
@@ -4377,30 +4683,30 @@ function SwapDexTask({
4377
4683
  /* @__PURE__ */ jsx("div", { className: `taskon-swap-task ${className || ""}`, children: /* @__PURE__ */ jsx(
4378
4684
  TaskCardBase,
4379
4685
  {
4380
- taskId: task.id,
4381
- templateId: task.template_id,
4686
+ taskId: task2.id,
4687
+ templateId: task2.template_id,
4382
4688
  title,
4383
4689
  icon: communityLogo,
4384
4690
  isCompleted,
4385
4691
  isSubmitted,
4386
4692
  isLoading,
4387
4693
  disabled,
4388
- recurrenceType: task.recurrence,
4694
+ recurrenceType: task2.recurrence,
4389
4695
  isPeriodic,
4390
4696
  isCurrentDone,
4391
4697
  coolDownRemaining,
4392
4698
  onCooldownComplete,
4393
- pointsValue: isDynamicPoint || isDynamicTimes ? void 0 : (_d = task.points) == null ? void 0 : _d.amount,
4699
+ pointsValue: isDynamicPoint || isDynamicTimes ? void 0 : (_d = task2.points) == null ? void 0 : _d.amount,
4394
4700
  pointsSlot: dynamicPointsSlot,
4395
- pointsName: (_e = task.points) == null ? void 0 : _e.points_name,
4701
+ pointsName: (_e = task2.points) == null ? void 0 : _e.points_name,
4396
4702
  totalEarnedPoints: userStatus == null ? void 0 : userStatus.total_points,
4397
4703
  actionSlot: showVerifyButton ? /* @__PURE__ */ jsx(
4398
4704
  VerifyButton,
4399
4705
  {
4400
4706
  campaignId,
4401
- taskId: task.id,
4707
+ taskId: task2.id,
4402
4708
  chainType,
4403
- platform: task.platform,
4709
+ platform: task2.platform,
4404
4710
  onBeforeVerify,
4405
4711
  onSuccess: handleVerifyButtonSuccess,
4406
4712
  onError: handleVerifyButtonError
@@ -4408,25 +4714,27 @@ function SwapDexTask({
4408
4714
  ) : void 0,
4409
4715
  children: hasContent && /* @__PURE__ */ jsx(ExpandableContent, { children: /* @__PURE__ */ jsxs("div", { className: "taskon-swap-content", children: [
4410
4716
  isDynamicPoint && /* @__PURE__ */ jsxs("div", { className: "taskon-swap-rules-section", children: [
4411
- /* @__PURE__ */ jsx("div", { className: "taskon-swap-rules-title", children: "Rules" }),
4412
- /* @__PURE__ */ jsxs("div", { className: "taskon-swap-rules-content", children: [
4413
- /* @__PURE__ */ jsx("span", { children: "Every " }),
4414
- /* @__PURE__ */ jsxs("span", { className: "taskon-swap-rules-highlight", children: [
4415
- "$",
4416
- params.each_trading_volume || "0",
4417
- " USD"
4418
- ] }),
4419
- /* @__PURE__ */ jsx("span", { children: " will give you " }),
4420
- /* @__PURE__ */ jsx("span", { className: "taskon-swap-rules-highlight", children: params.each_receive_points }),
4421
- /* @__PURE__ */ jsxs("span", { className: "taskon-swap-rules-point-name", children: [
4422
- " ",
4423
- pointsName,
4424
- rulesMaxText && /* @__PURE__ */ jsx("span", { className: "taskon-swap-rules-max", children: rulesMaxText })
4425
- ] })
4426
- ] })
4717
+ /* @__PURE__ */ jsx("div", { className: "taskon-swap-rules-title", children: t("rules") }),
4718
+ /* @__PURE__ */ jsx("div", { className: "taskon-swap-rules-content", children: /* @__PURE__ */ jsx(
4719
+ I18nT,
4720
+ {
4721
+ t,
4722
+ i18nKey: "swap_rule_sentence",
4723
+ components: {
4724
+ volume: /* @__PURE__ */ jsxs("span", { className: "taskon-swap-rules-highlight", children: [
4725
+ "$",
4726
+ params.each_trading_volume || "0",
4727
+ " USD"
4728
+ ] }),
4729
+ points: /* @__PURE__ */ jsx("span", { className: "taskon-swap-rules-highlight", children: params.each_receive_points }),
4730
+ pointName: /* @__PURE__ */ jsx("span", { className: "taskon-swap-rules-point-name", children: pointsName }),
4731
+ maxText: rulesMaxText ? /* @__PURE__ */ jsx("span", { className: "taskon-swap-rules-max", children: rulesMaxText }) : null
4732
+ }
4733
+ }
4734
+ ) })
4427
4735
  ] }),
4428
4736
  params.desc && /* @__PURE__ */ jsxs("div", { className: "taskon-swap-instructions-section", children: [
4429
- /* @__PURE__ */ jsx("div", { className: "taskon-swap-instructions-title", children: "Instructions" }),
4737
+ /* @__PURE__ */ jsx("div", { className: "taskon-swap-instructions-title", children: t("instructions") }),
4430
4738
  /* @__PURE__ */ jsx("div", { className: "taskon-swap-instructions-content", children: /* @__PURE__ */ jsx(CardDescExpress, { label: params.desc, noMaxHeight: true }) })
4431
4739
  ] })
4432
4740
  ] }) })
@@ -4476,22 +4784,23 @@ function WarningIcon({ className }) {
4476
4784
  );
4477
4785
  }
4478
4786
  function CustomizedParamDialog({
4479
- open,
4787
+ open: open2,
4480
4788
  paramName,
4481
4789
  onConfirm,
4482
4790
  onCancel
4483
4791
  }) {
4792
+ const { t } = useTaskWidgetLocale();
4484
4793
  const [value2, setValue] = useState("");
4485
4794
  const [error, setError] = useState("");
4486
4795
  const handleConfirm = useCallback(() => {
4487
4796
  if (!value2.trim()) {
4488
- setError("This field is required");
4797
+ setError(t("this_field_required"));
4489
4798
  return;
4490
4799
  }
4491
4800
  onConfirm(value2.trim());
4492
4801
  setValue("");
4493
4802
  setError("");
4494
- }, [value2, onConfirm]);
4803
+ }, [onConfirm, t, value2]);
4495
4804
  const handleCancel = useCallback(() => {
4496
4805
  setValue("");
4497
4806
  setError("");
@@ -4504,35 +4813,21 @@ function CustomizedParamDialog({
4504
4813
  return /* @__PURE__ */ jsx(
4505
4814
  Dialog,
4506
4815
  {
4507
- open,
4816
+ open: open2,
4508
4817
  onOpenChange: (isOpen) => {
4509
4818
  if (!isOpen) handleCancel();
4510
4819
  },
4511
- title: `Submit ${paramName}`,
4820
+ title: t("submit_param_title", { paramName }),
4512
4821
  maxWidth: 440,
4513
4822
  children: /* @__PURE__ */ jsxs("div", { className: "taskon-outer-point-api-dialog", children: [
4514
- /* @__PURE__ */ jsxs("h3", { className: "taskon-outer-point-api-dialog-title", children: [
4515
- "Submit ",
4516
- paramName
4517
- ] }),
4823
+ /* @__PURE__ */ jsx("h3", { className: "taskon-outer-point-api-dialog-title", children: t("submit_param_title", { paramName }) }),
4518
4824
  /* @__PURE__ */ jsxs("div", { className: "taskon-outer-point-api-dialog-warning", children: [
4519
4825
  /* @__PURE__ */ jsx(WarningIcon, { className: "taskon-outer-point-api-dialog-warning-icon" }),
4520
- /* @__PURE__ */ jsxs("span", { children: [
4521
- "Warning: Please make sure you enter the correct ",
4522
- paramName,
4523
- ". Once submitted, it cannot be changed."
4524
- ] })
4525
- ] }),
4526
- /* @__PURE__ */ jsxs("p", { className: "taskon-outer-point-api-dialog-desc", children: [
4527
- "Enter your ",
4528
- paramName,
4529
- " to complete the verification. The system will use this information to verify your task completion."
4826
+ /* @__PURE__ */ jsx("span", { children: t("submit_param_warning", { paramName }) })
4530
4827
  ] }),
4828
+ /* @__PURE__ */ jsx("p", { className: "taskon-outer-point-api-dialog-desc", children: t("submit_param_desc", { paramName }) }),
4531
4829
  /* @__PURE__ */ jsxs("div", { className: "taskon-outer-point-api-dialog-input-wrap", children: [
4532
- /* @__PURE__ */ jsxs("label", { className: "taskon-outer-point-api-dialog-label", children: [
4533
- "Enter ",
4534
- paramName
4535
- ] }),
4830
+ /* @__PURE__ */ jsx("label", { className: "taskon-outer-point-api-dialog-label", children: t("submit_param_enter_label", { paramName }) }),
4536
4831
  /* @__PURE__ */ jsx(
4537
4832
  "input",
4538
4833
  {
@@ -4540,7 +4835,7 @@ function CustomizedParamDialog({
4540
4835
  className: `taskon-outer-point-api-dialog-input ${error ? "taskon-outer-point-api-dialog-input--error" : ""}`,
4541
4836
  value: value2,
4542
4837
  onChange: handleChange,
4543
- placeholder: `Enter your ${paramName}`
4838
+ placeholder: t("submit_param_enter_placeholder", { paramName })
4544
4839
  }
4545
4840
  ),
4546
4841
  error && /* @__PURE__ */ jsx("span", { className: "taskon-outer-point-api-dialog-error", children: error })
@@ -4552,7 +4847,7 @@ function CustomizedParamDialog({
4552
4847
  type: "button",
4553
4848
  className: "taskon-outer-point-api-dialog-btn taskon-outer-point-api-dialog-btn--cancel",
4554
4849
  onClick: handleCancel,
4555
- children: "Cancel"
4850
+ children: t("cancel")
4556
4851
  }
4557
4852
  ),
4558
4853
  /* @__PURE__ */ jsx(
@@ -4561,7 +4856,7 @@ function CustomizedParamDialog({
4561
4856
  type: "button",
4562
4857
  className: "taskon-outer-point-api-dialog-btn taskon-outer-point-api-dialog-btn--confirm",
4563
4858
  onClick: handleConfirm,
4564
- children: "Confirm"
4859
+ children: t("confirm")
4565
4860
  }
4566
4861
  )
4567
4862
  ] })
@@ -4571,7 +4866,7 @@ function CustomizedParamDialog({
4571
4866
  }
4572
4867
  function OuterPointAPITask({
4573
4868
  campaignId,
4574
- task,
4869
+ task: task2,
4575
4870
  userStatus,
4576
4871
  onCompleted,
4577
4872
  onVerifyAttempted,
@@ -4583,18 +4878,19 @@ function OuterPointAPITask({
4583
4878
  className
4584
4879
  }) {
4585
4880
  var _a;
4881
+ const { t } = useTaskWidgetLocale();
4586
4882
  const { isLoggedIn } = useTaskOnAuth();
4587
4883
  const params = useMemo(() => {
4588
4884
  try {
4589
- return JSON.parse(task.params);
4885
+ return JSON.parse(task2.params);
4590
4886
  } catch {
4591
4887
  return {};
4592
4888
  }
4593
- }, [task.params]);
4889
+ }, [task2.params]);
4594
4890
  const isCompleted = (userStatus == null ? void 0 : userStatus.is_qualifier) || false;
4595
4891
  const isSubmitted = (userStatus == null ? void 0 : userStatus.is_submitter) || false;
4596
4892
  const isCurrentDone = (userStatus == null ? void 0 : userStatus.current_done) || false;
4597
- const isPeriodic = task.recurrence && task.recurrence !== "Once";
4893
+ const isPeriodic = task2.recurrence && task2.recurrence !== "Once";
4598
4894
  const coolDownRemaining = useMemo(() => {
4599
4895
  if (userStatus == null ? void 0 : userStatus.next_time) {
4600
4896
  const remaining = userStatus.next_time - Date.now();
@@ -4613,18 +4909,18 @@ function OuterPointAPITask({
4613
4909
  params.account_type !== "SNS" && !hasCustomizedParam ? params.network : void 0
4614
4910
  );
4615
4911
  const [verifyFailedNotice, setVerifyFailedNotice] = useState(null);
4616
- const { submit, isSubmitting } = useTaskSubmit({
4912
+ const { submit: submit2, isSubmitting } = useTaskSubmit({
4617
4913
  campaignId,
4618
- taskId: task.id,
4914
+ taskId: task2.id,
4619
4915
  snsType,
4620
4916
  chainType,
4621
- platform: task.platform,
4917
+ platform: task2.platform,
4622
4918
  onSuccess: (result) => {
4623
- onCompleted == null ? void 0 : onCompleted(task.id, result);
4624
- onVerifyAttempted == null ? void 0 : onVerifyAttempted(task.id, true, result);
4919
+ onCompleted == null ? void 0 : onCompleted(task2.id, result);
4920
+ onVerifyAttempted == null ? void 0 : onVerifyAttempted(task2.id, true, result);
4625
4921
  },
4626
4922
  onError: () => {
4627
- onVerifyAttempted == null ? void 0 : onVerifyAttempted(task.id, false);
4923
+ onVerifyAttempted == null ? void 0 : onVerifyAttempted(task2.id, false);
4628
4924
  },
4629
4925
  // 当后端返回 CAMPAIGN_INELIGIBILITY 时,复用现有 eligibility 检查逻辑
4630
4926
  onCampaignIneligibility: onBeforeVerify,
@@ -4646,8 +4942,8 @@ function OuterPointAPITask({
4646
4942
  setIsCheckingEligibility(false);
4647
4943
  }
4648
4944
  }
4649
- await submit(overrideValue);
4650
- }, [onBeforeVerify, submit]);
4945
+ await submit2(overrideValue);
4946
+ }, [onBeforeVerify, submit2]);
4651
4947
  const [isDialogOpen, setIsDialogOpen] = useState(false);
4652
4948
  const handleRefresh = useCallback(() => {
4653
4949
  const currentPoint = (userStatus == null ? void 0 : userStatus.total_points) || 0;
@@ -4664,32 +4960,32 @@ function OuterPointAPITask({
4664
4960
  const handleDialogCancel = useCallback(() => {
4665
4961
  setIsDialogOpen(false);
4666
4962
  }, []);
4667
- const pointsName = ((_a = task.points) == null ? void 0 : _a.points_name) || "Points";
4963
+ const pointsName = ((_a = task2.points) == null ? void 0 : _a.points_name) || t("points_name_fallback");
4668
4964
  const titleExpress = useMemo(() => {
4669
- const title = params.title || task.name;
4965
+ const title = params.title || task2.name;
4670
4966
  if (params.target_url && title) {
4671
4967
  return `{${title}}[link=${params.target_url}]`;
4672
4968
  }
4673
4969
  return void 0;
4674
- }, [params.title, params.target_url, task.name]);
4970
+ }, [params.title, params.target_url, task2.name]);
4675
4971
  const renderedTitle = useMemo(() => {
4676
4972
  if (titleExpress) {
4677
4973
  return /* @__PURE__ */ jsx(TitleExpress, { express: titleExpress });
4678
4974
  }
4679
- return params.title || task.name || task.template_id;
4680
- }, [titleExpress, params.title, task.name, task.template_id]);
4975
+ return params.title || task2.name || task2.template_id;
4976
+ }, [titleExpress, params.title, task2.name, task2.template_id]);
4681
4977
  const pointTip = useMemo(() => {
4682
4978
  if (!isStarted) {
4683
4979
  return {
4684
- title: `Max. ${pointsName}`,
4685
- content: "Maximum points available for this task."
4980
+ title: t("max_points_title", { pointName: pointsName }),
4981
+ content: t("dynamic_tip_max_points")
4686
4982
  };
4687
4983
  }
4688
4984
  return {
4689
- title: `Your ${pointsName}`,
4690
- content: "Points you've earned so far. Final rewards will be calculated when the quest ends."
4985
+ title: t("your_points_title", { pointName: pointsName }),
4986
+ content: t("dynamic_tip_your_points")
4691
4987
  };
4692
- }, [isStarted, pointsName]);
4988
+ }, [isStarted, pointsName, t]);
4693
4989
  const userDynamicPoint = (userStatus == null ? void 0 : userStatus.total_points) || 0;
4694
4990
  const dynamicPointsSlot = useMemo(() => {
4695
4991
  return /* @__PURE__ */ jsx(
@@ -4719,15 +5015,15 @@ function OuterPointAPITask({
4719
5015
  /* @__PURE__ */ jsx(
4720
5016
  TaskCardBase,
4721
5017
  {
4722
- taskId: task.id,
4723
- templateId: task.template_id,
5018
+ taskId: task2.id,
5019
+ templateId: task2.template_id,
4724
5020
  title: renderedTitle,
4725
5021
  icon: params.icon,
4726
5022
  isCompleted,
4727
5023
  isSubmitted,
4728
5024
  isLoading,
4729
5025
  disabled,
4730
- recurrenceType: task.recurrence,
5026
+ recurrenceType: task2.recurrence,
4731
5027
  isPeriodic,
4732
5028
  isCurrentDone,
4733
5029
  coolDownRemaining,
@@ -4788,7 +5084,7 @@ function getTaskComponent(templateId) {
4788
5084
  }
4789
5085
  function TaskItem({
4790
5086
  campaignId,
4791
- task,
5087
+ task: task2,
4792
5088
  userStatus,
4793
5089
  onCompleted,
4794
5090
  onVerifyAttempted,
@@ -4805,13 +5101,13 @@ function TaskItem({
4805
5101
  className
4806
5102
  }) {
4807
5103
  const TaskComponent = useMemo(() => {
4808
- return getTaskComponent(task.template_id);
4809
- }, [task.template_id]);
5104
+ return getTaskComponent(task2.template_id);
5105
+ }, [task2.template_id]);
4810
5106
  return /* @__PURE__ */ jsx(
4811
5107
  TaskComponent,
4812
5108
  {
4813
5109
  campaignId,
4814
- task,
5110
+ task: task2,
4815
5111
  userStatus,
4816
5112
  onCompleted,
4817
5113
  onVerifyAttempted,
@@ -4829,35 +5125,691 @@ function TaskItem({
4829
5125
  }
4830
5126
  );
4831
5127
  }
4832
- function RewardModuleDialog({
5128
+ const gte_100_least_1_kyc = ">=100 (At least 1 KYC)";
5129
+ const gte_20_basic_filtering_bot = ">=20 (Basic filtering bot)";
5130
+ const qualified_users_receive_reward = "All qualified users receive reward";
5131
+ const tasks_quest_verified_valid_some_tasks_may_verified_quest = "All the tasks of this quest is verified as valid, some tasks may verified by quest creator not by TaskOn.";
5132
+ const available = "Available";
5133
+ const awesome_already_meet_requirements = "Awesome! You already meet the requirements.";
5134
+ const babt_holder = "BABT holder";
5135
+ const before_join_please_meet = "Before you join please meet";
5136
+ const binance_account_bound_token_bab = "Binance Account Bound Token (BAB)";
5137
+ const bind = "Bind";
5138
+ const bind_required_accounts = "Bind Required Accounts";
5139
+ const binding = "Binding...";
5140
+ const blind_box_reward = "Blind Box Reward";
5141
+ const bonus = "Bonus";
5142
+ const bound = "Bound";
5143
+ const campaign_id_required_please_provide_campaignid_via_props_widgetid = "Campaign ID is required. Please provide campaignId via props or widgetId.";
5144
+ const cap_airdropped_soon = "Cap will be airdropped soon...";
5145
+ const check_claim = "Check & Claim";
5146
+ const check_cap_element = "Check CAP on Element";
5147
+ const check_collection_opensea = "Check Collection on OpenSea";
5148
+ const chest_key = "Chest key";
5149
+ const claim = "Claim";
5150
+ const claim_again = "Claim Again";
5151
+ const claim_nft = "Claim NFT";
5152
+ const claim_failed = "Claim failed";
5153
+ const claim_successful = "Claim successful!";
5154
+ const claimed = "Claimed";
5155
+ const claiming_nft = "Claiming NFT...";
5156
+ const close = "Close";
5157
+ const complete_campaign = "Complete Campaign";
5158
+ const complete_action_first = "Complete action first";
5159
+ const complete = "Complete all";
5160
+ const complete_campaign_2 = "Complete the Campaign";
5161
+ const complete_qualify_rewards = "Complete to qualify for rewards!";
5162
+ const complete_milestone_name_first = "Complete {milestone_name} first";
5163
+ const completing = "Completing...";
5164
+ const congratulations = "Congratulations!";
5165
+ const connect_wallet_participate = "Connect Wallet to Participate";
5166
+ const connecting_wallet = "Connecting wallet...";
5167
+ const continue_waiting = "Continue Waiting";
5168
+ const contract_address = "Contract Address";
5169
+ const copied = "Copied!";
5170
+ const copy_link = "Copy Link";
5171
+ const holder_own_least_one_token = "DID Holder(own at least one DID token)";
5172
+ const discord = "Discord";
5173
+ const discord_account_linked = "Discord Account Not Linked";
5174
+ const discord_role = "Discord Role";
5175
+ const discord_role_2 = "Discord Role:";
5176
+ const ens_domains_eth = "ENS Domains (.eth)";
5177
+ const evm_chain = "EVM Chain";
5178
+ const exp_winner = "EXP/Winner";
5179
+ const ended = "Ended";
5180
+ const ending = "Ending in";
5181
+ const ends = "Ends In";
5182
+ const extra_reward_winners = "Extra reward for winners";
5183
+ const failed_claim_nft = "Failed to claim NFT";
5184
+ const failed_complete_quest = "Failed to complete quest";
5185
+ const failed_copy_nft_address = "Failed to copy NFT address:";
5186
+ const failed_download_poster = "Failed to download poster:";
5187
+ const failed_load_leaderboard = "Failed to load leaderboard";
5188
+ const failed_load_quest_detail = "Failed to load quest detail";
5189
+ const failed_load_quest_status = "Failed to load quest status";
5190
+ const failed_load_user_status = "Failed to load user status";
5191
+ const failed_load_winners = "Failed to load winners";
5192
+ const first_complete_gets_reward = "First to complete gets the reward";
5193
+ const getting_signature = "Getting signature...";
5194
+ const hold_tokens_one_following_service_providers = "Hold tokens from one of the following DID service providers:";
5195
+ const how_winner_selected = "How is winner be selected?";
5196
+ const resident_specific_countries_regions = "Is NOT a resident of specific countries/regions";
5197
+ const resident_specific_countries_regions_2 = "Is a resident of specific countries/regions";
5198
+ const join_quest_earlier_next_time = "Join the quest earlier next time!";
5199
+ const join_campaignname_me = "Join the {campaignName} with me 🙌";
5200
+ const leaderboard = "Leaderboard";
5201
+ const limited_spots_gas_free_claiming = "Limited spots for gas free claiming!";
5202
+ const link_wallet_address = "Link Wallet Address";
5203
+ const link_copied = "Link copied!";
5204
+ const loading_quest = "Loading quest...";
5205
+ const loading = "Loading...";
5206
+ const lucky_draw = "Lucky Draw";
5207
+ const manually_upload = "Manually Upload";
5208
+ const points_required = "More Points Required";
5209
+ const tasks_required = "More Tasks Required";
5210
+ const na = "N/A";
5211
+ const nft_preview = "NFT Preview";
5212
+ const nft_airdropped_soon = "NFT will be airdropped soon...";
5213
+ const network_error_please_try_again = "Network error, please try again";
5214
+ const new_user_milestone = "New user of this milestone";
5215
+ const new_user_taskon = "New user to TaskOn";
5216
+ const no_data = "No Data";
5217
+ const no_participants = "No participants yet";
5218
+ const no_winners = "No winners yet";
5219
+ const qualified = "Not Qualified";
5220
+ const tasks_successfully_verified_better_luck_next_time = "Not all tasks are successfully verified, better luck next time!";
5221
+ const sybil_database = "Not in Sybil database";
5222
+ const included_public_sybil_address_database = "Not included in a public sybil address database.";
5223
+ const ok = "OK";
5224
+ const only = "ONLY";
5225
+ const chain_verification = "On-chain Verification";
5226
+ const once_qualified_every_point_counts_toward_better_rewards = "Once qualified, every point counts toward better rewards!";
5227
+ const ongoing = "Ongoing";
5228
+ const qualifier_selected_winner_select_method_depends_settings_fcfs = "Only Qualifier can be selected as winner, the select method depends on the settings such as FCFS.";
5229
+ const oops = "Oops!";
5230
+ const oops_better_luck_next_time = "Oops! Better Luck Next Time!";
5231
+ const oops_seems_like_already_finished_quest = "Oops! Seems like You already finished this quest";
5232
+ const oops_seems_like_already_finished_quest_2 = "Oops! Seems like you already finished this quest";
5233
+ const oops_better_luck_next_time_2 = "Oops, Better Luck Next Time!";
5234
+ const open_blind_box = "Open Blind Box";
5235
+ const open = "Open to All";
5236
+ const own = "Own";
5237
+ const own_least = "Own at least";
5238
+ const own_least_amount_token_name_chain_label = "Own at least {amount} {token_name} on {chain_label}";
5239
+ const own_amount_name_nft_chain = "Own {amount} {name} NFT On {chain}";
5240
+ const participants = "Participants";
5241
+ const participants_info = "Participants Info";
5242
+ const participants_any_user_who_complete_least_1_task_quest = "Participants: any user who complete at least 1 task of this quest.";
5243
+ const pending_transaction = "Pending Transaction";
5244
+ const please_bind_following_accounts_verify_eligibility = "Please bind the following accounts to verify eligibility.";
5245
+ const please_complete_mandatory_tasks = "Please complete all mandatory tasks";
5246
+ const please_complete_required_tasks_before_continuing = "Please complete all required tasks before continuing.";
5247
+ const please_complete_optional_tasks = "Please complete more optional tasks";
5248
+ const please_confirm_wallet = "Please confirm in your wallet";
5249
+ const please_keep_participating_tasks_e_g_keep_following_x = "Please keep participating in tasks (e.g. keep following on X) to stay eligible for winner draws!";
5250
+ const please_link_following_wallet_addresses_receive_rewards_required_fcfs = "Please link the following wallet addresses to receive rewards. This is required for FCFS rewards.";
5251
+ const please_link_following_wallet_addresses_receive_rewards_skip_step = "Please link the following wallet addresses to receive rewards. You can skip this step and link later before the campaign ends.";
5252
+ const points_history = "Points History";
5253
+ const points_winner = "Points/Winner";
5254
+ const position = "Position";
5255
+ const project_owner_selects_winners = "Project owner selects winners";
5256
+ const qr_code = "QR Code";
5257
+ const qualifier_point = "Qualifier Point";
5258
+ const qualifiers = "Qualifiers";
5259
+ const quest_eligibility = "Quest Eligibility";
5260
+ const quest_rewards = "Quest Rewards";
5261
+ const quest_found = "Quest not found";
5262
+ const random_amount = "Random Amount";
5263
+ const reach_poh_requirements = "Reach All POH Requirements";
5264
+ const reach_any_poh_requirements = "Reach Any POH Requirements";
5265
+ const read = "Read more";
5266
+ const refresh = "Refresh";
5267
+ const refresh_eligibility_status = "Refresh eligibility status";
5268
+ const refreshing = "Refreshing...";
5269
+ const retry = "Retry";
5270
+ const reward = "Reward";
5271
+ const reward_amount_revealed_once_quest_ends = "Reward amount will be revealed once quest ends.";
5272
+ const rewards = "Rewards";
5273
+ const rewards_missed = "Rewards Missed";
5274
+ const role = "Role";
5275
+ const save = "Save";
5276
+ const share = "Share";
5277
+ const share_qr_code = "Share QR Code";
5278
+ const show_less = "Show less";
5279
+ const smart_blind_box = "Smart Blind Box";
5280
+ const social_accounts = "Social Accounts";
5281
+ const sorry_late = "Sorry you are late.";
5282
+ const space_id_domains_bnb_arb = "Space ID Domains (.bnb & .arb)";
5283
+ const starting = "Starting in";
5284
+ const starts = "Starts In";
5285
+ const stay_tuned_verified_users_eligible_compete_rewards = "Stay tuned! Only verified users are eligible to compete for rewards.";
5286
+ const submitters = "Submitters";
5287
+ const successfully_entered = "Successfully Entered!";
5288
+ const switching_network = "Switching network...";
5289
+ const system_drawing_winners = "System is Drawing Winners...";
5290
+ const system_automatically_select_winners = "System will automatically select winners in";
5291
+ const task = "Task";
5292
+ const taskon_lv_level_higher = "TaskOn LV {level} or Higher";
5293
+ const taskon_lv_val = "TaskOn LV {val}";
5294
+ const taskon_poh_level_score_label = "Taskon POH Level {score_label}";
5295
+ const taskon_val_level_lv = "Taskon {val} Level {lv}";
5296
+ const tasks_incomplete = "Tasks Incomplete";
5297
+ const receive_address_t_changed = "This receive address can’t be changed:";
5298
+ const tier = "Tier";
5299
+ const ensure_fair_experience_submissions_identical_wallet_addresses_x_discord = "To ensure a fair experience, submissions with identical wallet addresses, X, Discord, or Telegram accounts, and email addresses are not permitted.";
5300
+ const receive_discord_role_reward_need_link_discord_account = "To receive the Discord Role reward, you need to link your Discord account.";
5301
+ const token_name = "Token Name";
5302
+ const token_rewards_pool = "Token Rewards Pool";
5303
+ const top_100 = "Top 100";
5304
+ const top_40_percent_50_percent = "Top 40%-50%";
5305
+ const top_ranked_users_win = "Top ranked users win";
5306
+ const total_rewards_pool = "Total Rewards Pool";
5307
+ const transaction_hash = "Transaction hash:";
5308
+ const transaction_pending = "Transaction pending...";
5309
+ const transaction_rejected_user = "Transaction was rejected by user.";
5310
+ const twitter = "Twitter";
5311
+ const txn_hash = "Txn Hash:";
5312
+ const unranked = "Unranked";
5313
+ const upcoming = "Upcoming";
5314
+ const user = "User";
5315
+ const validation_failed = "Validation Failed";
5316
+ const view_leaderboard = "View Leaderboard";
5317
+ const view_explorer = "View on Explorer";
5318
+ const view_participants_info_details = "View participants info details";
5319
+ const view_winners_list = "View winners list";
5320
+ const waiting_final_ranking_stay_tuned_see_win = "Waiting For Final Ranking, Stay tuned to see if you win!";
5321
+ const waiting_task_verification = "Waiting For Task Verification";
5322
+ const waiting_drawing_winners = "Waiting for drawing winners";
5323
+ const waiting_drawing_winners_stay_tuned_see_win = "Waiting for drawing winners, Stay tuned to see if you win!";
5324
+ const waiting_final_ranking_stay_tuned_see_win_2 = "Waiting for final ranking. Stay tuned to see if you win!";
5325
+ const waiting_project_owner_upload_winner_list_stay_tuned_see = "Waiting for project owner to upload the winner list, Stay tuned to see if you win!";
5326
+ const waiting_project_owner_upload_winner_list_stay_tuned_see_2 = "Waiting for project owner to upload the winner list. Stay tuned to see if you win!";
5327
+ const wallet_address = "Wallet Address";
5328
+ const wallet_addresses_sybil_lists_these_protocols = "Wallet addresses are not in the Sybil lists from these protocols:";
5329
+ const what_participants = "What is Participants?";
5330
+ const whitelist = "Whitelist";
5331
+ const whitelist_description = "Whitelist Description";
5332
+ const who_completes_least_1_task = "Who completes at least 1 task.";
5333
+ const who_completes_quest = "Who completes the quest.";
5334
+ const winner_bonus = "Winner Bonus";
5335
+ const winner_generated_following_chart = "Winner is generated from the following chart.";
5336
+ const winners = "Winners";
5337
+ const winners_randomly_selected = "Winners are randomly selected";
5338
+ const withdraw = "Withdraw";
5339
+ const x_twitter = "X (Twitter)";
5340
+ const x_account_verification = "X account Verification";
5341
+ const x_account_don_t_use_default_profile_image = "X account don't use default profile image";
5342
+ const you = "YOU";
5343
+ const won = "You Have Won";
5344
+ const here = "You are here";
5345
+ const qualified_rewards_tier = "You are not qualified for rewards in this tier.";
5346
+ const ranked = "You are not ranked yet.";
5347
+ const check_transaction_explorer = "You can check this transaction on explorer:";
5348
+ const complete_campaign_without_linking_won_t_able_claim_discord = "You can still complete the campaign without linking, but you won&apos;t be able to claim the Discord Role reward.";
5349
+ const already_claimed_nft_please_wait_transaction_confirmed = "You have already claimed this NFT, please wait for this transaction to be confirmed.";
5350
+ const won_multiple_rewards = "You have won multiple rewards!";
5351
+ const ranked_after_completing_mandatory_tasks_quest = "You will be ranked only after completing all mandatory tasks in this quest.";
5352
+ const estimated_rewards = "Your Estimated Rewards";
5353
+ const final_rewards = "Your Final Rewards";
5354
+ const ranking = "Your Ranking";
5355
+ const complete_task = "Your did not complete task:";
5356
+ const own_discord_role = "Your do not own a Discord Role";
5357
+ const own_discord_role_community = "Your do not own a Discord Role {role} in {community}";
5358
+ const completed_task = "Your have completed task:";
5359
+ const own_discord_role_2 = "Your own a Discord Role";
5360
+ const own_discord_role_community_2 = "Your own a Discord Role {role} in {community}";
5361
+ const name_lv_lt_count = "Your {name} Lv is ≥/< {count}";
5362
+ const val_wallet_address_allowlist = "Your {val} wallet address is in the allowlist";
5363
+ const zkme_citizenship_nft_holder = "ZKMe Citizenship NFT holder";
5364
+ const after = "after";
5365
+ const tasks_reviewed = "all tasks have been reviewed.";
5366
+ const better_luck = "better luck";
5367
+ const recaptcha_verification_required = "reCAPTCHA verification required";
5368
+ const following_eligibilities = "the following Eligibilities";
5369
+ const val_higher = "{val} or Higher";
5370
+ const official = "⚠️ Not Official";
5371
+ const winners_2 = "👑 Winners";
5372
+ const eq_total_rewards_pool_pointname_total_pointname = "= Total Rewards Pool * Your {pointName} / Total {pointName}";
5373
+ const all = "ALL";
5374
+ const any = "ANY";
5375
+ const winners_announced = "All winners are to be announced by";
5376
+ const least_count_transaction_s_chain = "At least {count} transaction(s) on {chain}";
5377
+ const click_copy_address = "Click to copy: {address}";
5378
+ const complete_2 = "Complete";
5379
+ const complete_onchain_action_number_actionid = "Complete Onchain Action #{actionId}";
5380
+ const completed_current_required_optional_tasks = "Completed: {current} / {required} optional tasks";
5381
+ const confirm = "Confirm";
5382
+ const did = "DID";
5383
+ const holder_own_least_one = "DID Holder(own at least one";
5384
+ const earned_current_required_points = "Earned: {current} / {required} points";
5385
+ const equivalent_amounts_token_name = "Equivalent amounts of {token_name}";
5386
+ const link_discord_account = "Link Discord Account";
5387
+ const lv = "Lv is";
5388
+ const meet_eligibilities_below = "Meet Eligibilities Below";
5389
+ const member_discord_server = "Member of Discord server:";
5390
+ const multiple_rewards_detail = "Multiple Rewards Detail";
5391
+ const included_public_sybil_address = "Not included in a public sybil address";
5392
+ const chain_label = "On {chain_label}";
5393
+ const poh_verification = "POH Verification";
5394
+ const please_earn_least_count_points_optional_tasks = "Please earn at least {count} points from optional tasks";
5395
+ const please_move_key_blind_box_open_blind_box = "Please move the key to the blind box to open the blind box";
5396
+ const points = "Points";
5397
+ const qualifier = "Qualifier";
5398
+ const quest = "Quest";
5399
+ const required = "REQUIRED";
5400
+ const reviewed_tasks = "Reviewed All Tasks";
5401
+ const rewards_per_winner = "Rewards Per Winner";
5402
+ const taskon_poh_level = "Taskon POH Level";
5403
+ const rankings_based_total_pointsname_earned_tasks_within_quest_instances = "The rankings are based on the total {pointsName} earned from all tasks within this quest. In instances of tied {pointsName}, submitters are ranked according to chronological order.";
5404
+ const quest_includes_proof_work_pow_tasks_which = "This quest includes Proof of Work (POW) tasks, which";
5405
+ const tier_index = "Tier {index}";
5406
+ const top_percent = "Top {from}%-{to}%";
5407
+ const top = "Top {from}-{to}";
5408
+ const top_2 = "Top {to}";
5409
+ const top_percent_2 = "Top {to}%";
5410
+ const total_pointname = "Total {pointName}";
5411
+ const usd_token_name = "USD in {token_name}";
5412
+ const waiting = "Waiting for";
5413
+ const x_account_created_months_ago = "X account created more than {months} months ago";
5414
+ const x_account_count_followers = "X account with more than {count} followers";
5415
+ const your = "Your";
5416
+ const database = "database";
5417
+ const days = "days";
5418
+ const first = "first";
5419
+ const least = "for at least";
5420
+ const is = "is";
5421
+ const participants_2 = "participants";
5422
+ const tasks_secure_valid_ranking = "tasks to secure a valid ranking.";
5423
+ const token = "token)";
5424
+ const review_winners_selected = "will review. Winners will be selected";
5425
+ const pointsname_collected_tasks_completed_during_quest = "{pointsName} collected from all tasks completed during the quest.";
5426
+ const claim_again_send_new_transaction_recommended_when_sure_there = '"Claim Again" will send a new transaction it is only recommended when you are sure there is something wrong with the current transaction.';
5427
+ const fcfs = "FCFS";
5428
+ const ranking_2 = "Ranking";
5429
+ const before_join_please_meet_express_following_eligibilities = "Before you join please meet {express} the following Eligibilities";
5430
+ const complete_required_tasks_secure_valid_ranking = "Complete all {required} tasks to secure a valid ranking.";
5431
+ const holder_own_least_one_token_2 = "DID Holder(own at least one {did} token)";
5432
+ const member_discord_server_least_days = "Member of Discord server: {server} for at least {days} days";
5433
+ const included_public_sybil_address_database_2 = "Not included in a public sybil address {database}";
5434
+ const quest_includes_proof_work_pow_tasks_which_community_review = "This quest includes Proof of Work (POW) tasks, which {community} will review. Winners will be selected {only} after all tasks have been reviewed.";
5435
+ const waiting_community_reviewed_tasks = "Waiting for {community} Reviewed All Tasks";
5436
+ const lv_operator_count = "Your Lv is {operator} {count}";
5437
+ const name_lv_operator_count = "Your {name} Lv is {operator} {count}";
5438
+ const name_operator_count = "Your {name} is {operator} {count}";
5439
+ const pointname = "Your {pointName}";
5440
+ const amount_qualifier_pointsname = "{amount} Qualifier {pointsName}";
5441
+ const days_2 = "{days} days";
5442
+ const enMessages = {
5443
+ gte_100_least_1_kyc,
5444
+ gte_20_basic_filtering_bot,
5445
+ qualified_users_receive_reward,
5446
+ tasks_quest_verified_valid_some_tasks_may_verified_quest,
5447
+ available,
5448
+ awesome_already_meet_requirements,
5449
+ babt_holder,
5450
+ before_join_please_meet,
5451
+ binance_account_bound_token_bab,
5452
+ bind,
5453
+ bind_required_accounts,
5454
+ binding,
5455
+ blind_box_reward,
5456
+ bonus,
5457
+ bound,
5458
+ campaign_id_required_please_provide_campaignid_via_props_widgetid,
5459
+ cap_airdropped_soon,
5460
+ check_claim,
5461
+ check_cap_element,
5462
+ check_collection_opensea,
5463
+ chest_key,
5464
+ claim,
5465
+ claim_again,
5466
+ claim_nft,
5467
+ claim_failed,
5468
+ claim_successful,
5469
+ claimed,
5470
+ claiming_nft,
5471
+ close,
5472
+ complete_campaign,
5473
+ complete_action_first,
5474
+ complete,
5475
+ complete_campaign_2,
5476
+ complete_qualify_rewards,
5477
+ complete_milestone_name_first,
5478
+ completing,
5479
+ congratulations,
5480
+ connect_wallet_participate,
5481
+ connecting_wallet,
5482
+ continue_waiting,
5483
+ contract_address,
5484
+ copied,
5485
+ copy_link,
5486
+ holder_own_least_one_token,
5487
+ discord,
5488
+ discord_account_linked,
5489
+ discord_role,
5490
+ discord_role_2,
5491
+ ens_domains_eth,
5492
+ evm_chain,
5493
+ exp_winner,
5494
+ ended,
5495
+ ending,
5496
+ ends,
5497
+ extra_reward_winners,
5498
+ failed_claim_nft,
5499
+ failed_complete_quest,
5500
+ failed_copy_nft_address,
5501
+ failed_download_poster,
5502
+ failed_load_leaderboard,
5503
+ failed_load_quest_detail,
5504
+ failed_load_quest_status,
5505
+ failed_load_user_status,
5506
+ failed_load_winners,
5507
+ first_complete_gets_reward,
5508
+ getting_signature,
5509
+ hold_tokens_one_following_service_providers,
5510
+ how_winner_selected,
5511
+ resident_specific_countries_regions,
5512
+ resident_specific_countries_regions_2,
5513
+ join_quest_earlier_next_time,
5514
+ join_campaignname_me,
5515
+ leaderboard,
5516
+ limited_spots_gas_free_claiming,
5517
+ link_wallet_address,
5518
+ link_copied,
5519
+ loading_quest,
5520
+ loading,
5521
+ lucky_draw,
5522
+ manually_upload,
5523
+ points_required,
5524
+ tasks_required,
5525
+ na,
5526
+ nft_preview,
5527
+ nft_airdropped_soon,
5528
+ network_error_please_try_again,
5529
+ new_user_milestone,
5530
+ new_user_taskon,
5531
+ no_data,
5532
+ no_participants,
5533
+ no_winners,
5534
+ qualified,
5535
+ tasks_successfully_verified_better_luck_next_time,
5536
+ sybil_database,
5537
+ included_public_sybil_address_database,
5538
+ ok,
5539
+ only,
5540
+ chain_verification,
5541
+ once_qualified_every_point_counts_toward_better_rewards,
5542
+ ongoing,
5543
+ qualifier_selected_winner_select_method_depends_settings_fcfs,
5544
+ oops,
5545
+ oops_better_luck_next_time,
5546
+ oops_seems_like_already_finished_quest,
5547
+ oops_seems_like_already_finished_quest_2,
5548
+ oops_better_luck_next_time_2,
5549
+ open_blind_box,
4833
5550
  open,
5551
+ own,
5552
+ own_least,
5553
+ own_least_amount_token_name_chain_label,
5554
+ own_amount_name_nft_chain,
5555
+ participants,
5556
+ participants_info,
5557
+ participants_any_user_who_complete_least_1_task_quest,
5558
+ pending_transaction,
5559
+ please_bind_following_accounts_verify_eligibility,
5560
+ please_complete_mandatory_tasks,
5561
+ please_complete_required_tasks_before_continuing,
5562
+ please_complete_optional_tasks,
5563
+ please_confirm_wallet,
5564
+ please_keep_participating_tasks_e_g_keep_following_x,
5565
+ please_link_following_wallet_addresses_receive_rewards_required_fcfs,
5566
+ please_link_following_wallet_addresses_receive_rewards_skip_step,
5567
+ points_history,
5568
+ points_winner,
5569
+ position,
5570
+ project_owner_selects_winners,
5571
+ qr_code,
5572
+ qualifier_point,
5573
+ qualifiers,
5574
+ quest_eligibility,
5575
+ quest_rewards,
5576
+ quest_found,
5577
+ random_amount,
5578
+ reach_poh_requirements,
5579
+ reach_any_poh_requirements,
5580
+ read,
5581
+ refresh,
5582
+ refresh_eligibility_status,
5583
+ refreshing,
5584
+ retry,
5585
+ reward,
5586
+ reward_amount_revealed_once_quest_ends,
5587
+ rewards,
5588
+ rewards_missed,
5589
+ role,
5590
+ save,
5591
+ share,
5592
+ share_qr_code,
5593
+ show_less,
5594
+ smart_blind_box,
5595
+ social_accounts,
5596
+ sorry_late,
5597
+ space_id_domains_bnb_arb,
5598
+ starting,
5599
+ starts,
5600
+ stay_tuned_verified_users_eligible_compete_rewards,
5601
+ submitters,
5602
+ successfully_entered,
5603
+ switching_network,
5604
+ system_drawing_winners,
5605
+ system_automatically_select_winners,
5606
+ task,
5607
+ taskon_lv_level_higher,
5608
+ taskon_lv_val,
5609
+ taskon_poh_level_score_label,
5610
+ taskon_val_level_lv,
5611
+ tasks_incomplete,
5612
+ receive_address_t_changed,
5613
+ tier,
5614
+ ensure_fair_experience_submissions_identical_wallet_addresses_x_discord,
5615
+ receive_discord_role_reward_need_link_discord_account,
5616
+ token_name,
5617
+ token_rewards_pool,
5618
+ top_100,
5619
+ top_40_percent_50_percent,
5620
+ top_ranked_users_win,
5621
+ total_rewards_pool,
5622
+ transaction_hash,
5623
+ transaction_pending,
5624
+ transaction_rejected_user,
5625
+ twitter,
5626
+ txn_hash,
5627
+ unranked,
5628
+ upcoming,
5629
+ user,
5630
+ validation_failed,
5631
+ view_leaderboard,
5632
+ view_explorer,
5633
+ view_participants_info_details,
5634
+ view_winners_list,
5635
+ waiting_final_ranking_stay_tuned_see_win,
5636
+ waiting_task_verification,
5637
+ waiting_drawing_winners,
5638
+ waiting_drawing_winners_stay_tuned_see_win,
5639
+ waiting_final_ranking_stay_tuned_see_win_2,
5640
+ waiting_project_owner_upload_winner_list_stay_tuned_see,
5641
+ waiting_project_owner_upload_winner_list_stay_tuned_see_2,
5642
+ wallet_address,
5643
+ wallet_addresses_sybil_lists_these_protocols,
5644
+ what_participants,
5645
+ whitelist,
5646
+ whitelist_description,
5647
+ who_completes_least_1_task,
5648
+ who_completes_quest,
5649
+ winner_bonus,
5650
+ winner_generated_following_chart,
5651
+ winners,
5652
+ winners_randomly_selected,
5653
+ withdraw,
5654
+ x_twitter,
5655
+ x_account_verification,
5656
+ x_account_don_t_use_default_profile_image,
5657
+ you,
5658
+ won,
5659
+ here,
5660
+ qualified_rewards_tier,
5661
+ ranked,
5662
+ check_transaction_explorer,
5663
+ complete_campaign_without_linking_won_t_able_claim_discord,
5664
+ already_claimed_nft_please_wait_transaction_confirmed,
5665
+ won_multiple_rewards,
5666
+ ranked_after_completing_mandatory_tasks_quest,
5667
+ estimated_rewards,
5668
+ final_rewards,
5669
+ ranking,
5670
+ complete_task,
5671
+ own_discord_role,
5672
+ own_discord_role_community,
5673
+ completed_task,
5674
+ own_discord_role_2,
5675
+ own_discord_role_community_2,
5676
+ name_lv_lt_count,
5677
+ val_wallet_address_allowlist,
5678
+ zkme_citizenship_nft_holder,
5679
+ after,
5680
+ tasks_reviewed,
5681
+ better_luck,
5682
+ recaptcha_verification_required,
5683
+ following_eligibilities,
5684
+ val_higher,
5685
+ official,
5686
+ winners_2,
5687
+ eq_total_rewards_pool_pointname_total_pointname,
5688
+ all,
5689
+ any,
5690
+ winners_announced,
5691
+ least_count_transaction_s_chain,
5692
+ click_copy_address,
5693
+ complete_2,
5694
+ complete_onchain_action_number_actionid,
5695
+ completed_current_required_optional_tasks,
5696
+ confirm,
5697
+ did,
5698
+ holder_own_least_one,
5699
+ earned_current_required_points,
5700
+ equivalent_amounts_token_name,
5701
+ link_discord_account,
5702
+ lv,
5703
+ meet_eligibilities_below,
5704
+ member_discord_server,
5705
+ multiple_rewards_detail,
5706
+ included_public_sybil_address,
5707
+ chain_label,
5708
+ poh_verification,
5709
+ please_earn_least_count_points_optional_tasks,
5710
+ please_move_key_blind_box_open_blind_box,
5711
+ points,
5712
+ qualifier,
5713
+ quest,
5714
+ required,
5715
+ reviewed_tasks,
5716
+ rewards_per_winner,
5717
+ taskon_poh_level,
5718
+ rankings_based_total_pointsname_earned_tasks_within_quest_instances,
5719
+ quest_includes_proof_work_pow_tasks_which,
5720
+ tier_index,
5721
+ top_percent,
5722
+ top,
5723
+ top_2,
5724
+ top_percent_2,
5725
+ total_pointname,
5726
+ usd_token_name,
5727
+ waiting,
5728
+ x_account_created_months_ago,
5729
+ x_account_count_followers,
5730
+ your,
5731
+ database,
5732
+ days,
5733
+ first,
5734
+ least,
5735
+ "in": "in",
5736
+ is,
5737
+ participants_2,
5738
+ tasks_secure_valid_ranking,
5739
+ token,
5740
+ review_winners_selected,
5741
+ pointsname_collected_tasks_completed_during_quest,
5742
+ claim_again_send_new_transaction_recommended_when_sure_there,
5743
+ fcfs,
5744
+ ranking_2,
5745
+ before_join_please_meet_express_following_eligibilities,
5746
+ complete_required_tasks_secure_valid_ranking,
5747
+ holder_own_least_one_token_2,
5748
+ member_discord_server_least_days,
5749
+ included_public_sybil_address_database_2,
5750
+ quest_includes_proof_work_pow_tasks_which_community_review,
5751
+ waiting_community_reviewed_tasks,
5752
+ lv_operator_count,
5753
+ name_lv_operator_count,
5754
+ name_operator_count,
5755
+ pointname,
5756
+ amount_qualifier_pointsname,
5757
+ days_2
5758
+ };
5759
+ const loadMessages = createLocaleLoader(
5760
+ enMessages,
5761
+ {
5762
+ ko: () => import("./quest-ko-CSmRWgK_.js").then((module2) => ({
5763
+ default: module2.default
5764
+ })),
5765
+ ja: () => import("./quest-ja-Dxd2vqBF.js").then((module2) => ({
5766
+ default: module2.default
5767
+ })),
5768
+ ru: () => import("./quest-ru-CkEKv1_F.js").then((module2) => ({
5769
+ default: module2.default
5770
+ })),
5771
+ es: () => import("./quest-es-D-b5xcme.js").then((module2) => ({
5772
+ default: module2.default
5773
+ }))
5774
+ }
5775
+ );
5776
+ function useQuestLocale() {
5777
+ return useTranslation({
5778
+ widgetId: "Quest",
5779
+ defaultMessages: enMessages,
5780
+ loadMessages
5781
+ });
5782
+ }
5783
+ function RewardModuleDialog({
5784
+ open: open2,
4834
5785
  onOpenChange,
4835
5786
  type,
4836
5787
  pointsInfo
4837
5788
  }) {
5789
+ const { t } = useQuestLocale();
4838
5790
  const isToken = type === "token";
4839
5791
  const isPoints = type === "points";
4840
5792
  const isNft = type === "nft";
4841
5793
  const { messages, isLoading } = useWidgetLocale({
4842
5794
  widgetId: "UserCenterWidget",
4843
- defaultMessages: enMessages,
4844
- loadMessages: (locale) => __variableDynamicImportRuntimeHelper(/* @__PURE__ */ Object.assign({ "../../../../UserCenter/locales/en.json": () => import("./UserCenterWidget-cADBSVg7.js").then((n) => n.w), "../../../../UserCenter/locales/ja.json": () => import("./usercenter-ja-B2465c1O.js"), "../../../../UserCenter/locales/ko.json": () => import("./usercenter-ko-xAEYxqLg.js") }), `../../../../UserCenter/locales/${locale}.json`, 7)
5795
+ defaultMessages: enMessages$2,
5796
+ loadMessages: (locale) => __variableDynamicImportRuntimeHelper(/* @__PURE__ */ Object.assign({ "../../../../UserCenter/locales/en.json": () => import("./UserCenterWidget-CvU6K4AC.js").then((n) => n.w), "../../../../UserCenter/locales/ja.json": () => import("./usercenter-ja-B2465c1O.js"), "../../../../UserCenter/locales/ko.json": () => import("./usercenter-ko-xAEYxqLg.js") }), `../../../../UserCenter/locales/${locale}.json`, 7)
4845
5797
  });
4846
5798
  const tokenAssets = useTokenAssets({
4847
- autoLoad: open && isToken
5799
+ autoLoad: open2 && isToken
4848
5800
  });
4849
5801
  const tokenHistory = useRewardDetails({
4850
5802
  rewardType: RewardType.Token,
4851
- autoLoad: open && isToken
5803
+ autoLoad: open2 && isToken
4852
5804
  });
4853
5805
  const nftHistory = useRewardDetails({
4854
5806
  rewardType: RewardType.Nft,
4855
- autoLoad: open && isNft
5807
+ autoLoad: open2 && isNft
4856
5808
  });
4857
5809
  const [showWithdrawForm, setShowWithdrawForm] = useState(false);
4858
5810
  const [selectedTokenForWithdraw, setSelectedTokenForWithdraw] = useState(null);
4859
- const handleWithdraw = useCallback((token) => {
4860
- setSelectedTokenForWithdraw(token);
5811
+ const handleWithdraw = useCallback((token2) => {
5812
+ setSelectedTokenForWithdraw(token2);
4861
5813
  setShowWithdrawForm(true);
4862
5814
  }, []);
4863
5815
  const handleBatchWithdraw = useCallback(() => {
@@ -4866,14 +5818,21 @@ function RewardModuleDialog({
4866
5818
  }, []);
4867
5819
  const pointsHistory = usePointsHistory({
4868
5820
  pointsId: (pointsInfo == null ? void 0 : pointsInfo.points_id) ?? 0,
4869
- autoLoad: open && isPoints && Boolean(pointsInfo == null ? void 0 : pointsInfo.points_id)
5821
+ autoLoad: open2 && isPoints && Boolean(pointsInfo == null ? void 0 : pointsInfo.points_id)
4870
5822
  });
4871
5823
  const dialogTitle = useMemo(() => {
4872
- if (isToken) return messages.rewardToken ?? "Token";
4873
- if (isPoints) return messages.pointsHistory ?? "Points History";
4874
- if (isNft) return messages.rewardNft ?? "NFT";
5824
+ if (isToken) return messages.rewardToken ?? t("token_name");
5825
+ if (isPoints) return messages.pointsHistory ?? t("points_history");
5826
+ if (isNft) return "NFT";
4875
5827
  return "";
4876
- }, [isToken, isPoints, isNft, messages.rewardToken, messages.pointsHistory, messages.rewardNft]);
5828
+ }, [
5829
+ isToken,
5830
+ isPoints,
5831
+ isNft,
5832
+ messages.rewardToken,
5833
+ messages.pointsHistory,
5834
+ t
5835
+ ]);
4877
5836
  const handleOpenChange = useCallback(
4878
5837
  (nextOpen) => {
4879
5838
  if (!nextOpen) {
@@ -4888,7 +5847,7 @@ function RewardModuleDialog({
4888
5847
  /* @__PURE__ */ jsx(
4889
5848
  Dialog,
4890
5849
  {
4891
- open,
5850
+ open: open2,
4892
5851
  onOpenChange: handleOpenChange,
4893
5852
  title: dialogTitle,
4894
5853
  showCloseButton: true,
@@ -7122,7 +8081,7 @@ function requireLottie() {
7122
8081
  _stopped = true;
7123
8082
  }
7124
8083
  }
7125
- function first(nowTime) {
8084
+ function first2(nowTime) {
7126
8085
  initTime = nowTime;
7127
8086
  window.requestAnimationFrame(resume);
7128
8087
  }
@@ -7189,7 +8148,7 @@ function requireLottie() {
7189
8148
  function activate() {
7190
8149
  if (!_isFrozen && playingAnimationsNum) {
7191
8150
  if (_stopped) {
7192
- window.requestAnimationFrame(first);
8151
+ window.requestAnimationFrame(first2);
7193
8152
  _stopped = false;
7194
8153
  }
7195
8154
  }
@@ -7296,8 +8255,8 @@ function requireLottie() {
7296
8255
  }
7297
8256
  return aGuessT;
7298
8257
  }
7299
- function BezierEasing(points) {
7300
- this._p = points;
8258
+ function BezierEasing(points2) {
8259
+ this._p = points2;
7301
8260
  this._mSampleValues = float32ArraySupported ? new Float32Array(kSplineTableSize) : new Array(kSplineTableSize);
7302
8261
  this._precomputed = false;
7303
8262
  this.get = this.get.bind(this);
@@ -9541,13 +10500,13 @@ function requireLottie() {
9541
10500
  }
9542
10501
  shapePath.setXYAt(pt4[0], pt4[1], "v", pos + 1);
9543
10502
  };
9544
- TrimModifier.prototype.addSegmentFromArray = function(points, shapePath, pos, newShape) {
9545
- shapePath.setXYAt(points[1], points[5], "o", pos);
9546
- shapePath.setXYAt(points[2], points[6], "i", pos + 1);
10503
+ TrimModifier.prototype.addSegmentFromArray = function(points2, shapePath, pos, newShape) {
10504
+ shapePath.setXYAt(points2[1], points2[5], "o", pos);
10505
+ shapePath.setXYAt(points2[2], points2[6], "i", pos + 1);
9547
10506
  if (newShape) {
9548
- shapePath.setXYAt(points[0], points[4], "v", pos);
10507
+ shapePath.setXYAt(points2[0], points2[4], "v", pos);
9549
10508
  }
9550
- shapePath.setXYAt(points[3], points[7], "v", pos + 1);
10509
+ shapePath.setXYAt(points2[3], points2[7], "v", pos + 1);
9551
10510
  };
9552
10511
  TrimModifier.prototype.addShapes = function(shapeData, shapeSegment, shapePath) {
9553
10512
  var pathsData = shapeData.pathsData;
@@ -11091,11 +12050,11 @@ function requireLottie() {
11091
12050
  }
11092
12051
  function getCodePoint(string) {
11093
12052
  var codePoint = 0;
11094
- var first = string.charCodeAt(0);
11095
- if (first >= 55296 && first <= 56319) {
12053
+ var first2 = string.charCodeAt(0);
12054
+ if (first2 >= 55296 && first2 <= 56319) {
11096
12055
  var second = string.charCodeAt(1);
11097
12056
  if (second >= 56320 && second <= 57343) {
11098
- codePoint = (first - 55296) * 1024 + second - 56320 + 65536;
12057
+ codePoint = (first2 - 55296) * 1024 + second - 56320 + 65536;
11099
12058
  }
11100
12059
  }
11101
12060
  return codePoint;
@@ -12687,12 +13646,12 @@ function requireLottie() {
12687
13646
  this.k = this.prop.k;
12688
13647
  this.getValue(true);
12689
13648
  }
12690
- GradientProperty.prototype.comparePoints = function(values, points) {
13649
+ GradientProperty.prototype.comparePoints = function(values, points2) {
12691
13650
  var i = 0;
12692
13651
  var len = this.o.length / 2;
12693
13652
  var diff;
12694
13653
  while (i < len) {
12695
- diff = Math.abs(values[i * 4] - values[points * 4 + i * 2]);
13654
+ diff = Math.abs(values[i * 4] - values[points2 * 4 + i * 2]);
12696
13655
  if (diff > 0.01) {
12697
13656
  return false;
12698
13657
  }
@@ -14138,7 +15097,7 @@ function requireLottie() {
14138
15097
  var pointInd;
14139
15098
  var segmentInd;
14140
15099
  var prevPoint;
14141
- var points;
15100
+ var points2;
14142
15101
  var segments;
14143
15102
  var partialLength;
14144
15103
  var totalLength;
@@ -14186,21 +15145,21 @@ function requireLottie() {
14186
15145
  currentLength = -Math.abs(currentLength) % pathInfo.tLength;
14187
15146
  }
14188
15147
  segmentInd = segments.length - 1;
14189
- points = segments[segmentInd].points;
14190
- pointInd = points.length - 1;
15148
+ points2 = segments[segmentInd].points;
15149
+ pointInd = points2.length - 1;
14191
15150
  while (currentLength < 0) {
14192
- currentLength += points[pointInd].partialLength;
15151
+ currentLength += points2[pointInd].partialLength;
14193
15152
  pointInd -= 1;
14194
15153
  if (pointInd < 0) {
14195
15154
  segmentInd -= 1;
14196
- points = segments[segmentInd].points;
14197
- pointInd = points.length - 1;
15155
+ points2 = segments[segmentInd].points;
15156
+ pointInd = points2.length - 1;
14198
15157
  }
14199
15158
  }
14200
15159
  }
14201
- points = segments[segmentInd].points;
14202
- prevPoint = points[pointInd - 1];
14203
- currentPoint = points[pointInd];
15160
+ points2 = segments[segmentInd].points;
15161
+ prevPoint = points2[pointInd - 1];
15162
+ currentPoint = points2[pointInd];
14204
15163
  partialLength = currentPoint.partialLength;
14205
15164
  }
14206
15165
  len = letters.length;
@@ -14290,9 +15249,9 @@ function requireLottie() {
14290
15249
  if (this._hasMaskedPath) {
14291
15250
  segmentInd = initSegmentInd;
14292
15251
  pointInd = initPointInd;
14293
- points = segments[segmentInd].points;
14294
- prevPoint = points[pointInd - 1];
14295
- currentPoint = points[pointInd];
15252
+ points2 = segments[segmentInd].points;
15253
+ prevPoint = points2[pointInd - 1];
15254
+ currentPoint = points2[pointInd];
14296
15255
  partialLength = currentPoint.partialLength;
14297
15256
  segmentLength = 0;
14298
15257
  }
@@ -14350,34 +15309,34 @@ function requireLottie() {
14350
15309
  currentLength += this._pathData.f.v;
14351
15310
  }
14352
15311
  while (flag) {
14353
- if (segmentLength + partialLength >= currentLength + animatorOffset || !points) {
15312
+ if (segmentLength + partialLength >= currentLength + animatorOffset || !points2) {
14354
15313
  perc = (currentLength + animatorOffset - segmentLength) / currentPoint.partialLength;
14355
15314
  xPathPos = prevPoint.point[0] + (currentPoint.point[0] - prevPoint.point[0]) * perc;
14356
15315
  yPathPos = prevPoint.point[1] + (currentPoint.point[1] - prevPoint.point[1]) * perc;
14357
15316
  matrixHelper.translate(-alignment[0] * letters[i].an * 5e-3, -(alignment[1] * yOff) * 0.01);
14358
15317
  flag = false;
14359
- } else if (points) {
15318
+ } else if (points2) {
14360
15319
  segmentLength += currentPoint.partialLength;
14361
15320
  pointInd += 1;
14362
- if (pointInd >= points.length) {
15321
+ if (pointInd >= points2.length) {
14363
15322
  pointInd = 0;
14364
15323
  segmentInd += 1;
14365
15324
  if (!segments[segmentInd]) {
14366
15325
  if (mask2.v.c) {
14367
15326
  pointInd = 0;
14368
15327
  segmentInd = 0;
14369
- points = segments[segmentInd].points;
15328
+ points2 = segments[segmentInd].points;
14370
15329
  } else {
14371
15330
  segmentLength -= currentPoint.partialLength;
14372
- points = null;
15331
+ points2 = null;
14373
15332
  }
14374
15333
  } else {
14375
- points = segments[segmentInd].points;
15334
+ points2 = segments[segmentInd].points;
14376
15335
  }
14377
15336
  }
14378
- if (points) {
15337
+ if (points2) {
14379
15338
  prevPoint = currentPoint;
14380
- currentPoint = points[pointInd];
15339
+ currentPoint = points2[pointInd];
14381
15340
  partialLength = currentPoint.partialLength;
14382
15341
  }
14383
15342
  }
@@ -18590,9 +19549,9 @@ function requireLottie() {
18590
19549
  var rndm = BMMath.random();
18591
19550
  return min + rndm * (max - min);
18592
19551
  }
18593
- function createPath(points, inTangents, outTangents, closed) {
19552
+ function createPath(points2, inTangents, outTangents, closed) {
18594
19553
  var i;
18595
- var len = points.length;
19554
+ var len = points2.length;
18596
19555
  var path = shapePool.newElement();
18597
19556
  path.setPathData(!!closed, len);
18598
19557
  var arrPlaceholder = [0, 0];
@@ -18601,7 +19560,7 @@ function requireLottie() {
18601
19560
  for (i = 0; i < len; i += 1) {
18602
19561
  inVertexPoint = inTangents && inTangents[i] ? inTangents[i] : arrPlaceholder;
18603
19562
  outVertexPoint = outTangents && outTangents[i] ? outTangents[i] : arrPlaceholder;
18604
- path.setTripleAt(points[i][0], points[i][1], outVertexPoint[0] + points[i][0], outVertexPoint[1] + points[i][1], inVertexPoint[0] + points[i][0], inVertexPoint[1] + points[i][1], i, true);
19563
+ path.setTripleAt(points2[i][0], points2[i][1], outVertexPoint[0] + points2[i][0], outVertexPoint[1] + points2[i][1], inVertexPoint[0] + points2[i][0], inVertexPoint[1] + points2[i][1], i, true);
18605
19564
  }
18606
19565
  return path;
18607
19566
  }
@@ -20538,18 +21497,18 @@ function requireLottie() {
20538
21497
  var i;
20539
21498
  var len = shapePath._length;
20540
21499
  var vertices2 = shapePath[prop];
20541
- var points = shapePath.v;
21500
+ var points2 = shapePath.v;
20542
21501
  var arr = createSizedArray(len);
20543
21502
  for (i = 0; i < len; i += 1) {
20544
21503
  if (prop === "i" || prop === "o") {
20545
- arr[i] = [vertices2[i][0] - points[i][0], vertices2[i][1] - points[i][1]];
21504
+ arr[i] = [vertices2[i][0] - points2[i][0], vertices2[i][1] - points2[i][1]];
20546
21505
  } else {
20547
21506
  arr[i] = [vertices2[i][0], vertices2[i][1]];
20548
21507
  }
20549
21508
  }
20550
21509
  return arr;
20551
21510
  },
20552
- points: function points(time2) {
21511
+ points: function points2(time2) {
20553
21512
  return this.vertices("v", time2);
20554
21513
  },
20555
21514
  inTangents: function inTangents(time2) {
@@ -21507,15 +22466,15 @@ var useLottie = function useLottie2(props, style) {
21507
22466
  };
21508
22467
  };
21509
22468
  function getContainerVisibility(container) {
21510
- var _container$getBoundin = container.getBoundingClientRect(), top = _container$getBoundin.top, height2 = _container$getBoundin.height;
21511
- var current = window.innerHeight - top;
22469
+ var _container$getBoundin = container.getBoundingClientRect(), top2 = _container$getBoundin.top, height2 = _container$getBoundin.height;
22470
+ var current = window.innerHeight - top2;
21512
22471
  var max = window.innerHeight + height2;
21513
22472
  return current / max;
21514
22473
  }
21515
22474
  function getContainerCursorPosition(container, cursorX, cursorY) {
21516
- var _container$getBoundin2 = container.getBoundingClientRect(), top = _container$getBoundin2.top, left = _container$getBoundin2.left, width2 = _container$getBoundin2.width, height2 = _container$getBoundin2.height;
22475
+ var _container$getBoundin2 = container.getBoundingClientRect(), top2 = _container$getBoundin2.top, left = _container$getBoundin2.left, width2 = _container$getBoundin2.width, height2 = _container$getBoundin2.height;
21517
22476
  var x = (cursorX - left) / width2;
21518
- var y = (cursorY - top) / height2;
22477
+ var y = (cursorY - top2) / height2;
21519
22478
  return {
21520
22479
  x,
21521
22480
  y
@@ -21741,6 +22700,7 @@ const bgImageUrl = new URL("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAgwAAA
21741
22700
  const BlindBoxDialog = forwardRef(
21742
22701
  function BlindBoxDialog2(props, ref) {
21743
22702
  const { onClose, onOpened } = props;
22703
+ const { t } = useQuestLocale();
21744
22704
  const stageRef = useRef(null);
21745
22705
  const dropZoneRef = useRef(null);
21746
22706
  const lottieRef = useRef(null);
@@ -22076,7 +23036,7 @@ const BlindBoxDialog = forwardRef(
22076
23036
  hasOpened && "taskon-quest-blindbox-chest--open"
22077
23037
  ].filter(Boolean).join(" ");
22078
23038
  return /* @__PURE__ */ jsxs("div", { className: "taskon-quest-blindbox-dialog", children: [
22079
- /* @__PURE__ */ jsx("h2", { className: "taskon-quest-blindbox-dialog-title", children: "Please move the key to the blind box to open the blind box" }),
23039
+ /* @__PURE__ */ jsx("h2", { className: "taskon-quest-blindbox-dialog-title", children: t("please_move_key_blind_box_open_blind_box") }),
22080
23040
  /* @__PURE__ */ jsxs("div", { ref: stageRef, className: "taskon-quest-blindbox-stage", children: [
22081
23041
  showBackground && /* @__PURE__ */ jsx("div", { className: "taskon-quest-blindbox-bg", children: /* @__PURE__ */ jsx("img", { src: bgImageUrl, alt: "", draggable: false }) }),
22082
23042
  /* @__PURE__ */ jsx("div", { ref: dropZoneRef, className: "taskon-quest-blindbox-dropzone" }),
@@ -22096,7 +23056,7 @@ const BlindBoxDialog = forwardRef(
22096
23056
  className: keyClassNames,
22097
23057
  style: keyStyle,
22098
23058
  src: keyImageUrl,
22099
- alt: "Chest key",
23059
+ alt: t("chest_key"),
22100
23060
  draggable: false,
22101
23061
  onPointerDown: handlePointerDown,
22102
23062
  onLoad: handleKeyLoad
@@ -22109,70 +23069,73 @@ const BlindBoxDialog = forwardRef(
22109
23069
  function TokenBalance({
22110
23070
  params
22111
23071
  }) {
22112
- return /* @__PURE__ */ jsxs("div", { className: "taskon-quest-eligs-type", children: [
22113
- "Own at least ",
22114
- /* @__PURE__ */ jsx("span", { className: "taskon-quest-eligs-highlight", children: params.amount }),
22115
- " ",
22116
- params.token_name,
22117
- " on ",
22118
- params.chain_label
22119
- ] });
23072
+ const { t } = useQuestLocale();
23073
+ return /* @__PURE__ */ jsx("div", { className: "taskon-quest-eligs-type", children: t("own_least_amount_token_name_chain_label", {
23074
+ amount: params.amount,
23075
+ token_name: params.token_name,
23076
+ chain_label: params.chain_label
23077
+ }) });
22120
23078
  }
22121
23079
  function NftHolder({
22122
23080
  params
22123
23081
  }) {
22124
- const [copied, setCopied] = useState(false);
23082
+ const { t } = useQuestLocale();
23083
+ const [copied2, setCopied] = useState(false);
22125
23084
  const handleCopy = async () => {
22126
23085
  try {
22127
23086
  await navigator.clipboard.writeText(params.nft_address);
22128
23087
  setCopied(true);
22129
23088
  setTimeout(() => setCopied(false), 2e3);
22130
23089
  } catch (err) {
22131
- console.error("Failed to copy NFT address:", err);
23090
+ console.error("failed_copy_nft_address", err);
22132
23091
  }
22133
23092
  };
22134
- return /* @__PURE__ */ jsxs("div", { className: "taskon-quest-eligs-type", children: [
22135
- "Own ",
22136
- /* @__PURE__ */ jsx("span", { className: "taskon-quest-eligs-highlight", children: params.amount }),
22137
- " ",
22138
- /* @__PURE__ */ jsxs(
22139
- "span",
22140
- {
22141
- className: "taskon-quest-eligs-nft-name",
22142
- onClick: handleCopy,
22143
- title: copied ? "Copied!" : `Click to copy: ${params.nft_address}`,
22144
- children: [
22145
- params.nft_name,
22146
- copied && /* @__PURE__ */ jsx("span", { className: "taskon-quest-eligs-copied", children: "Copied!" })
22147
- ]
23093
+ return /* @__PURE__ */ jsx("div", { className: "taskon-quest-eligs-type", children: /* @__PURE__ */ jsx(
23094
+ I18nT,
23095
+ {
23096
+ t,
23097
+ i18nKey: "own_amount_name_nft_chain",
23098
+ values: {
23099
+ amount: params.amount,
23100
+ chain: params.chain_label
23101
+ },
23102
+ components: {
23103
+ name: /* @__PURE__ */ jsxs(
23104
+ "span",
23105
+ {
23106
+ className: "taskon-quest-eligs-nft-name",
23107
+ onClick: handleCopy,
23108
+ title: copied2 ? t("copied") : t("click_copy_address", { address: params.nft_address }),
23109
+ children: [
23110
+ params.nft_name,
23111
+ copied2 && /* @__PURE__ */ jsx("span", { className: "taskon-quest-eligs-copied", children: t("copied") })
23112
+ ]
23113
+ }
23114
+ )
22148
23115
  }
22149
- ),
22150
- " ",
22151
- "NFT On ",
22152
- params.chain_label
22153
- ] });
23116
+ }
23117
+ ) });
22154
23118
  }
22155
23119
  function UserLevel({
22156
23120
  params
22157
23121
  }) {
22158
- return /* @__PURE__ */ jsxs("div", { className: "taskon-quest-eligs-type", children: [
22159
- "TaskOn LV",
22160
- " ",
22161
- /* @__PURE__ */ jsxs("span", { className: "taskon-quest-eligs-highlight", children: [
22162
- params.level,
22163
- " or Higher"
22164
- ] })
22165
- ] });
23122
+ const { t } = useQuestLocale();
23123
+ return /* @__PURE__ */ jsx("div", { className: "taskon-quest-eligs-type", children: t("taskon_lv_level_higher", {
23124
+ level: params.level
23125
+ }) });
22166
23126
  }
22167
23127
  function NewUser() {
22168
- return /* @__PURE__ */ jsx("div", { className: "taskon-quest-eligs-type", children: "New user to TaskOn" });
23128
+ const { t } = useQuestLocale();
23129
+ return /* @__PURE__ */ jsx("div", { className: "taskon-quest-eligs-type", children: t("new_user_taskon") });
22169
23130
  }
22170
23131
  function MilestoneNewUser() {
22171
- return /* @__PURE__ */ jsx("div", { className: "taskon-quest-eligs-type", children: "New user of this milestone" });
23132
+ const { t } = useQuestLocale();
23133
+ return /* @__PURE__ */ jsx("div", { className: "taskon-quest-eligs-type", children: t("new_user_milestone") });
22172
23134
  }
22173
23135
  function SupportedCountry({
22174
23136
  params
22175
23137
  }) {
23138
+ const { t } = useQuestLocale();
22176
23139
  const [showTooltip, setShowTooltip] = useState(false);
22177
23140
  const countryLabel = params.supported_country.map((item) => item.name).join(", ");
22178
23141
  const isInclude = params.type === "Include";
@@ -22183,7 +23146,7 @@ function SupportedCountry({
22183
23146
  onMouseEnter: () => setShowTooltip(true),
22184
23147
  onMouseLeave: () => setShowTooltip(false),
22185
23148
  children: [
22186
- /* @__PURE__ */ jsx("span", { children: isInclude ? "Is a resident of specific countries/regions" : "Is NOT a resident of specific countries/regions" }),
23149
+ /* @__PURE__ */ jsx("span", { children: isInclude ? t("resident_specific_countries_regions_2") : t("resident_specific_countries_regions") }),
22187
23150
  showTooltip && countryLabel && /* @__PURE__ */ jsx("div", { className: "taskon-quest-eligs-tooltip", children: countryLabel })
22188
23151
  ]
22189
23152
  }
@@ -22192,43 +23155,39 @@ function SupportedCountry({
22192
23155
  function CommunityPoint({
22193
23156
  params
22194
23157
  }) {
23158
+ const { t } = useQuestLocale();
22195
23159
  const isGte = params.operator === "Gte";
22196
- return /* @__PURE__ */ jsxs("div", { className: "taskon-quest-eligs-type", children: [
22197
- "Your",
22198
- " ",
22199
- /* @__PURE__ */ jsx("span", { className: "taskon-quest-eligs-highlight", children: params.points.points_name }),
22200
- " ",
22201
- "is ",
22202
- isGte ? "≥" : "<",
22203
- " ",
22204
- /* @__PURE__ */ jsx("span", { className: "taskon-quest-eligs-highlight", children: params.points.amount })
22205
- ] });
23160
+ const operatorLabel = isGte ? "" : "<";
23161
+ return /* @__PURE__ */ jsx("div", { className: "taskon-quest-eligs-type", children: t("name_operator_count", {
23162
+ name: params.points.points_name,
23163
+ operator: operatorLabel,
23164
+ count: params.points.amount
23165
+ }) });
22206
23166
  }
22207
23167
  const TASKON_CLUB_COMMUNITY_ID = 2;
22208
23168
  function CommunityLevel({
22209
23169
  params
22210
23170
  }) {
23171
+ const { t } = useQuestLocale();
22211
23172
  const isGte = params.operator === "Gte";
23173
+ const operatorLabel = isGte ? "≥" : "<";
22212
23174
  const showName = params.community_id === TASKON_CLUB_COMMUNITY_ID && params.points_name;
22213
- return /* @__PURE__ */ jsxs("div", { className: "taskon-quest-eligs-type", children: [
22214
- "Your",
22215
- " ",
22216
- showName && /* @__PURE__ */ jsxs(Fragment, { children: [
22217
- /* @__PURE__ */ jsx("span", { className: "taskon-quest-eligs-highlight", children: params.points_name }),
22218
- " "
22219
- ] }),
22220
- "Lv is ",
22221
- isGte ? "≥" : "<",
22222
- " ",
22223
- /* @__PURE__ */ jsx("span", { className: "taskon-quest-eligs-highlight", children: params.level })
22224
- ] });
23175
+ return /* @__PURE__ */ jsx("div", { className: "taskon-quest-eligs-type", children: showName ? t("name_lv_operator_count", {
23176
+ name: params.points_name || "",
23177
+ operator: operatorLabel,
23178
+ count: params.level
23179
+ }) : t("lv_operator_count", {
23180
+ operator: operatorLabel,
23181
+ count: params.level
23182
+ }) });
22225
23183
  }
22226
23184
  function CommunityTask({
22227
23185
  params
22228
23186
  }) {
23187
+ const { t } = useQuestLocale();
22229
23188
  const isNot = params.operator === "Not";
22230
23189
  return /* @__PURE__ */ jsxs("div", { className: "taskon-quest-eligs-type", children: [
22231
- isNot ? "Your did not complete task:" : "Your have completed task:",
23190
+ isNot ? t("complete_task") : t("completed_task"),
22232
23191
  " ",
22233
23192
  /* @__PURE__ */ jsx("span", { className: "taskon-quest-eligs-highlight", children: params.task_name })
22234
23193
  ] });
@@ -22236,61 +23195,62 @@ function CommunityTask({
22236
23195
  function CommunityMilestone({
22237
23196
  params
22238
23197
  }) {
22239
- return /* @__PURE__ */ jsxs("div", { className: "taskon-quest-eligs-type", children: [
22240
- "Complete",
22241
- " ",
22242
- /* @__PURE__ */ jsx("span", { className: "taskon-quest-eligs-highlight", children: params.milestone_name }),
22243
- " ",
22244
- "first"
22245
- ] });
23198
+ const { t } = useQuestLocale();
23199
+ return /* @__PURE__ */ jsx("div", { className: "taskon-quest-eligs-type", children: t("complete_milestone_name_first", {
23200
+ milestone_name: params.milestone_name
23201
+ }) });
22246
23202
  }
22247
23203
  function JoinDiscord({
22248
23204
  params
22249
23205
  }) {
22250
- return /* @__PURE__ */ jsxs("div", { className: "taskon-quest-eligs-type", children: [
22251
- "Member of Discord server:",
22252
- " ",
22253
- /* @__PURE__ */ jsx(
22254
- "a",
22255
- {
22256
- className: "taskon-quest-eligs-link",
22257
- href: params.discord_link,
22258
- target: "_blank",
22259
- rel: "noopener noreferrer",
22260
- children: params.server_name
23206
+ const { t } = useQuestLocale();
23207
+ return /* @__PURE__ */ jsx("div", { className: "taskon-quest-eligs-type", children: /* @__PURE__ */ jsx(
23208
+ I18nT,
23209
+ {
23210
+ t,
23211
+ i18nKey: "member_discord_server_least_days",
23212
+ values: { days: params.joined_days },
23213
+ components: {
23214
+ server: /* @__PURE__ */ jsx(
23215
+ "a",
23216
+ {
23217
+ className: "taskon-quest-eligs-link",
23218
+ href: params.discord_link,
23219
+ target: "_blank",
23220
+ rel: "noopener noreferrer",
23221
+ children: params.server_name
23222
+ }
23223
+ )
22261
23224
  }
22262
- ),
22263
- " ",
22264
- "for at least",
22265
- " ",
22266
- /* @__PURE__ */ jsx("span", { className: "taskon-quest-eligs-highlight", children: params.joined_days }),
22267
- " ",
22268
- "days"
22269
- ] });
23225
+ }
23226
+ ) });
22270
23227
  }
22271
23228
  function DiscordRole({
22272
23229
  params,
22273
23230
  communityName
22274
23231
  }) {
23232
+ const { t } = useQuestLocale();
22275
23233
  const isNot = params.operator === "Not";
22276
- return /* @__PURE__ */ jsxs("div", { className: "taskon-quest-eligs-type", children: [
22277
- isNot ? "Your do not own a Discord Role" : "Your own a Discord Role",
22278
- " ",
22279
- /* @__PURE__ */ jsx("span", { className: "taskon-quest-eligs-highlight", children: params.role }),
22280
- " ",
22281
- "in",
22282
- " ",
22283
- params.server_url ? /* @__PURE__ */ jsx(
22284
- "a",
22285
- {
22286
- className: "taskon-quest-eligs-link",
22287
- href: params.server_url,
22288
- target: "_blank",
22289
- rel: "noopener noreferrer",
22290
- children: communityName
22291
- }
22292
- ) : /* @__PURE__ */ jsx("span", { children: communityName })
22293
- ] });
23234
+ const i18nKey = isNot ? "own_discord_role_community" : "own_discord_role_community_2";
23235
+ const communityNode = params.server_url ? /* @__PURE__ */ jsx(
23236
+ "a",
23237
+ {
23238
+ className: "taskon-quest-eligs-link",
23239
+ href: params.server_url,
23240
+ target: "_blank",
23241
+ rel: "noopener noreferrer",
23242
+ children: communityName
23243
+ }
23244
+ ) : /* @__PURE__ */ jsx("span", { children: communityName });
23245
+ return /* @__PURE__ */ jsx("div", { className: "taskon-quest-eligs-type", children: /* @__PURE__ */ jsx(
23246
+ I18nT,
23247
+ {
23248
+ t,
23249
+ i18nKey,
23250
+ values: { role: params.role },
23251
+ components: { community: communityNode }
23252
+ }
23253
+ ) });
22294
23254
  }
22295
23255
  function capitalizeFirstLetter(str) {
22296
23256
  if (!str) return str;
@@ -22303,11 +23263,10 @@ function formatChainType(type) {
22303
23263
  function Whitelist({
22304
23264
  params
22305
23265
  }) {
22306
- return /* @__PURE__ */ jsxs("div", { className: "taskon-quest-eligs-type", children: [
22307
- "Your ",
22308
- formatChainType(params.chain_type),
22309
- " wallet address is in the allowlist"
22310
- ] });
23266
+ const { t } = useQuestLocale();
23267
+ return /* @__PURE__ */ jsx("div", { className: "taskon-quest-eligs-type", children: t("val_wallet_address_allowlist", {
23268
+ val: formatChainType(params.chain_type)
23269
+ }) });
22311
23270
  }
22312
23271
  function ArrowIcon$1({ expanded }) {
22313
23272
  return /* @__PURE__ */ jsx(
@@ -22370,144 +23329,145 @@ const SYBIL_LINKS = {
22370
23329
  Optimism: "https://docs.google.com/spreadsheets/d/1kUAt-vrkID0yBkic72djWRxdliK8W_5rBGxq6-Iv3cg/edit?gid=822397105#gid=822397105"
22371
23330
  };
22372
23331
  const DID_LINKS = {
22373
- "ENS Domains (.eth)": "https://ens.domains/",
22374
- "Binance Account Bound Token (BAB)": "https://www.binance.com/en/babt",
22375
- "Space ID Domains (.bnb & .arb)": "https://space.id/"
23332
+ "ens_domains_eth": "https://ens.domains/",
23333
+ "binance_account_bound_token_bab": "https://www.binance.com/en/babt",
23334
+ "space_id_domains_bnb_arb": "https://space.id/"
22376
23335
  };
22377
23336
  function SybilDataBase() {
23337
+ const { t } = useQuestLocale();
22378
23338
  const [showTooltip, setShowTooltip] = useState(false);
22379
- return /* @__PURE__ */ jsxs("span", { className: "taskon-quest-eligs-onchain-item", children: [
22380
- "Not included in a public sybil address",
22381
- " ",
22382
- /* @__PURE__ */ jsxs(
22383
- "span",
22384
- {
22385
- className: "taskon-quest-eligs-onchain-link",
22386
- onMouseEnter: () => setShowTooltip(true),
22387
- onMouseLeave: () => setShowTooltip(false),
22388
- children: [
22389
- "database",
22390
- showTooltip && /* @__PURE__ */ jsxs("div", { className: "taskon-quest-eligs-onchain-tooltip", children: [
22391
- /* @__PURE__ */ jsx("p", { children: "Wallet addresses are not in the Sybil lists from these protocols:" }),
22392
- /* @__PURE__ */ jsx("ul", { children: Object.entries(SYBIL_LINKS).map(([name2, url]) => /* @__PURE__ */ jsx("li", { children: /* @__PURE__ */ jsx(
22393
- "a",
22394
- {
22395
- href: url,
22396
- target: "_blank",
22397
- rel: "noopener noreferrer",
22398
- className: "taskon-quest-eligs-onchain-tooltip-link",
22399
- children: name2
22400
- }
22401
- ) }, name2)) })
22402
- ] })
22403
- ]
23339
+ return /* @__PURE__ */ jsx("span", { className: "taskon-quest-eligs-onchain-item", children: /* @__PURE__ */ jsx(
23340
+ I18nT,
23341
+ {
23342
+ t,
23343
+ i18nKey: "included_public_sybil_address_database_2",
23344
+ components: {
23345
+ database: /* @__PURE__ */ jsxs(
23346
+ "span",
23347
+ {
23348
+ className: "taskon-quest-eligs-onchain-link",
23349
+ onMouseEnter: () => setShowTooltip(true),
23350
+ onMouseLeave: () => setShowTooltip(false),
23351
+ children: [
23352
+ t("database"),
23353
+ showTooltip && /* @__PURE__ */ jsxs("div", { className: "taskon-quest-eligs-onchain-tooltip", children: [
23354
+ /* @__PURE__ */ jsx("p", { children: t("wallet_addresses_sybil_lists_these_protocols") }),
23355
+ /* @__PURE__ */ jsx("ul", { children: Object.entries(SYBIL_LINKS).map(([name2, url]) => /* @__PURE__ */ jsx("li", { children: /* @__PURE__ */ jsx(
23356
+ "a",
23357
+ {
23358
+ href: url,
23359
+ target: "_blank",
23360
+ rel: "noopener noreferrer",
23361
+ className: "taskon-quest-eligs-onchain-tooltip-link",
23362
+ children: name2
23363
+ }
23364
+ ) }, name2)) })
23365
+ ] })
23366
+ ]
23367
+ }
23368
+ )
22404
23369
  }
22405
- )
22406
- ] });
23370
+ }
23371
+ ) });
22407
23372
  }
22408
23373
  function DIDDataBase() {
23374
+ const { t } = useQuestLocale();
22409
23375
  const [showTooltip, setShowTooltip] = useState(false);
22410
- return /* @__PURE__ */ jsxs("span", { className: "taskon-quest-eligs-onchain-item", children: [
22411
- "DID Holder(own at least one",
22412
- " ",
22413
- /* @__PURE__ */ jsxs(
22414
- "span",
22415
- {
22416
- className: "taskon-quest-eligs-onchain-link",
22417
- onMouseEnter: () => setShowTooltip(true),
22418
- onMouseLeave: () => setShowTooltip(false),
22419
- children: [
22420
- "DID",
22421
- showTooltip && /* @__PURE__ */ jsxs("div", { className: "taskon-quest-eligs-onchain-tooltip", children: [
22422
- /* @__PURE__ */ jsx("p", { children: "Hold tokens from one of the following DID service providers:" }),
22423
- /* @__PURE__ */ jsx("ul", { children: Object.entries(DID_LINKS).map(([name2, url]) => /* @__PURE__ */ jsx("li", { children: /* @__PURE__ */ jsx(
22424
- "a",
22425
- {
22426
- href: url,
22427
- target: "_blank",
22428
- rel: "noopener noreferrer",
22429
- className: "taskon-quest-eligs-onchain-tooltip-link",
22430
- children: name2
22431
- }
22432
- ) }, name2)) })
22433
- ] })
22434
- ]
23376
+ return /* @__PURE__ */ jsx("span", { className: "taskon-quest-eligs-onchain-item", children: /* @__PURE__ */ jsx(
23377
+ I18nT,
23378
+ {
23379
+ t,
23380
+ i18nKey: "holder_own_least_one_token_2",
23381
+ components: {
23382
+ did: /* @__PURE__ */ jsxs(
23383
+ "span",
23384
+ {
23385
+ className: "taskon-quest-eligs-onchain-link",
23386
+ onMouseEnter: () => setShowTooltip(true),
23387
+ onMouseLeave: () => setShowTooltip(false),
23388
+ children: [
23389
+ t("did"),
23390
+ showTooltip && /* @__PURE__ */ jsxs("div", { className: "taskon-quest-eligs-onchain-tooltip", children: [
23391
+ /* @__PURE__ */ jsx("p", { children: t("hold_tokens_one_following_service_providers") }),
23392
+ /* @__PURE__ */ jsx("ul", { children: Object.entries(DID_LINKS).map(([name2, url]) => /* @__PURE__ */ jsx("li", { children: /* @__PURE__ */ jsx(
23393
+ "a",
23394
+ {
23395
+ href: url,
23396
+ target: "_blank",
23397
+ rel: "noopener noreferrer",
23398
+ className: "taskon-quest-eligs-onchain-tooltip-link",
23399
+ children: name2
23400
+ }
23401
+ ) }, name2)) })
23402
+ ] })
23403
+ ]
23404
+ }
23405
+ )
22435
23406
  }
22436
- ),
22437
- " ",
22438
- "token)"
22439
- ] });
23407
+ }
23408
+ ) });
22440
23409
  }
22441
23410
  function OnChainVerify({
22442
23411
  params
22443
23412
  }) {
22444
23413
  var _a, _b;
23414
+ const { t } = useQuestLocale();
22445
23415
  const hasConditions = ((_a = params.tx_num_verify) == null ? void 0 : _a.tx_num) || params.sybil_address_verify || params.did_holder_verify;
22446
23416
  if (!hasConditions) {
22447
- return /* @__PURE__ */ jsx("div", { className: "taskon-quest-eligs-type", children: "On-chain Verification" });
23417
+ return /* @__PURE__ */ jsx("div", { className: "taskon-quest-eligs-type", children: t("chain_verification") });
22448
23418
  }
22449
- return /* @__PURE__ */ jsxs(SubEligsContainer, { label: "On-chain Verification", children: [
22450
- ((_b = params.tx_num_verify) == null ? void 0 : _b.tx_num) != null && params.tx_num_verify.tx_num > 0 && /* @__PURE__ */ jsxs("li", { children: [
22451
- "At least",
22452
- " ",
22453
- /* @__PURE__ */ jsx("span", { className: "taskon-quest-eligs-highlight", children: params.tx_num_verify.tx_num }),
22454
- " ",
22455
- "transaction(s) on ",
22456
- params.tx_num_verify.chain
22457
- ] }),
23419
+ return /* @__PURE__ */ jsxs(SubEligsContainer, { label: t("chain_verification"), children: [
23420
+ ((_b = params.tx_num_verify) == null ? void 0 : _b.tx_num) != null && params.tx_num_verify.tx_num > 0 && /* @__PURE__ */ jsx("li", { children: t("least_count_transaction_s_chain", {
23421
+ count: params.tx_num_verify.tx_num,
23422
+ chain: params.tx_num_verify.chain
23423
+ }) }),
22458
23424
  params.sybil_address_verify && /* @__PURE__ */ jsx("li", { children: /* @__PURE__ */ jsx(SybilDataBase, {}) }),
22459
23425
  params.did_holder_verify && /* @__PURE__ */ jsx("li", { children: /* @__PURE__ */ jsx(DIDDataBase, {}) })
22460
23426
  ] });
22461
23427
  }
22462
23428
  function getMonthFromMillSec(ms) {
22463
- const days = Math.floor(ms / (1e3 * 60 * 60 * 24));
22464
- return Math.floor(days / 30);
23429
+ const days2 = Math.floor(ms / (1e3 * 60 * 60 * 24));
23430
+ return Math.floor(days2 / 30);
22465
23431
  }
22466
23432
  function XAccountVerify({
22467
23433
  params
22468
23434
  }) {
23435
+ const { t } = useQuestLocale();
22469
23436
  const hasConditions = params.default_avatar_verify || params.min_followers || params.account_created_before;
22470
23437
  if (!hasConditions) {
22471
- return /* @__PURE__ */ jsx("div", { className: "taskon-quest-eligs-type", children: "X account Verification" });
23438
+ return /* @__PURE__ */ jsx("div", { className: "taskon-quest-eligs-type", children: t("x_account_verification") });
22472
23439
  }
22473
- return /* @__PURE__ */ jsxs(SubEligsContainer, { label: "X account Verification", children: [
22474
- params.default_avatar_verify && /* @__PURE__ */ jsx("li", { children: "X account don't use default profile image" }),
22475
- params.min_followers && /* @__PURE__ */ jsxs("li", { children: [
22476
- "X account with more than",
22477
- " ",
22478
- /* @__PURE__ */ jsx("span", { className: "taskon-quest-eligs-highlight", children: params.min_followers }),
22479
- " ",
22480
- "followers"
22481
- ] }),
22482
- params.account_created_before && /* @__PURE__ */ jsxs("li", { children: [
22483
- "X account created more than",
22484
- " ",
22485
- /* @__PURE__ */ jsx("span", { className: "taskon-quest-eligs-highlight", children: getMonthFromMillSec(params.account_created_before) }),
22486
- " ",
22487
- "months ago"
22488
- ] })
23440
+ return /* @__PURE__ */ jsxs(SubEligsContainer, { label: t("x_account_verification"), children: [
23441
+ params.default_avatar_verify && /* @__PURE__ */ jsx("li", { children: t("x_account_don_t_use_default_profile_image") }),
23442
+ params.min_followers && /* @__PURE__ */ jsx("li", { children: t("x_account_count_followers", {
23443
+ count: params.min_followers
23444
+ }) }),
23445
+ params.account_created_before && /* @__PURE__ */ jsx("li", { children: t("x_account_created_months_ago", {
23446
+ months: getMonthFromMillSec(params.account_created_before)
23447
+ }) })
22489
23448
  ] });
22490
23449
  }
22491
23450
  function Poh({
22492
23451
  params
22493
23452
  }) {
22494
23453
  var _a;
23454
+ const { t } = useQuestLocale();
22495
23455
  const isAnd = params.provider_express === "and";
22496
- const title = isAnd ? "Reach All POH Requirements" : "Reach Any POH Requirements";
23456
+ const title = isAnd ? t("reach_poh_requirements") : t("reach_any_poh_requirements");
22497
23457
  const providers = ((_a = params.providers) == null ? void 0 : _a.filter(
22498
23458
  (item) => item.type !== "KYC_NFT"
22499
23459
  )) || [];
22500
23460
  if (providers.length === 0) {
22501
- return /* @__PURE__ */ jsx("div", { className: "taskon-quest-eligs-type", children: "POH Verification" });
23461
+ return /* @__PURE__ */ jsx("div", { className: "taskon-quest-eligs-type", children: t("poh_verification") });
22502
23462
  }
22503
23463
  return /* @__PURE__ */ jsx(SubEligsContainer, { label: title, children: providers.map((provider) => /* @__PURE__ */ jsx("li", { className: "taskon-quest-eligs-poh-provider", children: provider.title }, provider.provider_id)) });
22504
23464
  }
22505
- function getScoreTypeLabel(scoreType) {
23465
+ function getScoreTypeLabel(scoreType, t) {
22506
23466
  switch (scoreType) {
22507
23467
  case "BasicFilteringBot":
22508
- return ">=20 (Basic filtering bot)";
23468
+ return t("gte_20_basic_filtering_bot");
22509
23469
  case "AtLeast1KYC":
22510
- return ">=100 (At least 1 KYC)";
23470
+ return t("gte_100_least_1_kyc");
22511
23471
  default:
22512
23472
  return scoreType;
22513
23473
  }
@@ -22515,9 +23475,13 @@ function getScoreTypeLabel(scoreType) {
22515
23475
  function TaskonPohScore({
22516
23476
  params
22517
23477
  }) {
22518
- const scoreLabel = getScoreTypeLabel(params.score_type);
23478
+ const { t } = useQuestLocale();
23479
+ const scoreLabel = getScoreTypeLabel(
23480
+ params.score_type,
23481
+ t
23482
+ );
22519
23483
  return /* @__PURE__ */ jsxs("div", { className: "taskon-quest-eligs-type", children: [
22520
- "Taskon POH Level",
23484
+ t("taskon_poh_level"),
22521
23485
  " ",
22522
23486
  /* @__PURE__ */ jsx("span", { className: "taskon-quest-eligs-highlight", children: scoreLabel })
22523
23487
  ] });
@@ -22525,6 +23489,7 @@ function TaskonPohScore({
22525
23489
  function BABTHolder({
22526
23490
  params
22527
23491
  }) {
23492
+ const { t } = useQuestLocale();
22528
23493
  return /* @__PURE__ */ jsx("div", { className: "taskon-quest-eligs-type", children: /* @__PURE__ */ jsx(
22529
23494
  "a",
22530
23495
  {
@@ -22532,20 +23497,19 @@ function BABTHolder({
22532
23497
  href: "https://www.binance.com/en/BABT",
22533
23498
  target: "_blank",
22534
23499
  rel: "noopener noreferrer",
22535
- children: params.description || "BABT holder"
23500
+ children: params.description || t("babt_holder")
22536
23501
  }
22537
23502
  ) });
22538
23503
  }
22539
23504
  function ZKMeNftHolder() {
22540
- return /* @__PURE__ */ jsx("div", { className: "taskon-quest-eligs-type", children: "ZKMe Citizenship NFT holder" });
23505
+ const { t } = useQuestLocale();
23506
+ return /* @__PURE__ */ jsx("div", { className: "taskon-quest-eligs-type", children: t("zkme_citizenship_nft_holder") });
22541
23507
  }
22542
23508
  function SubmitAction({
22543
23509
  params
22544
23510
  }) {
22545
- return /* @__PURE__ */ jsx(SubEligsContainer, { label: "Complete action first", children: /* @__PURE__ */ jsxs("li", { children: [
22546
- "Complete Onchain Action #",
22547
- params.action_id
22548
- ] }) });
23511
+ const { t } = useQuestLocale();
23512
+ return /* @__PURE__ */ jsx(SubEligsContainer, { label: t("complete_action_first"), children: /* @__PURE__ */ jsx("li", { children: t("complete_onchain_action_number_actionid", { actionId: params.action_id }) }) });
22549
23513
  }
22550
23514
  function PassedIcon$1() {
22551
23515
  return /* @__PURE__ */ jsxs(
@@ -22786,19 +23750,20 @@ function FailedIcon() {
22786
23750
  );
22787
23751
  }
22788
23752
  function RefreshButton({
22789
- loading,
23753
+ loading: loading2,
22790
23754
  onClick
22791
23755
  }) {
23756
+ const { t } = useQuestLocale();
22792
23757
  return /* @__PURE__ */ jsx(
22793
23758
  "button",
22794
23759
  {
22795
- className: `taskon-quest-eligs-refresh ${loading ? "taskon-quest-eligs-refresh--loading" : ""}`,
23760
+ className: `taskon-quest-eligs-refresh ${loading2 ? "taskon-quest-eligs-refresh--loading" : ""}`,
22796
23761
  onClick: (e) => {
22797
23762
  e.stopPropagation();
22798
23763
  onClick == null ? void 0 : onClick();
22799
23764
  },
22800
- disabled: loading,
22801
- title: "Refresh eligibility status",
23765
+ disabled: loading2,
23766
+ title: t("refresh_eligibility_status"),
22802
23767
  children: /* @__PURE__ */ jsx(
22803
23768
  "svg",
22804
23769
  {
@@ -22837,6 +23802,7 @@ function EligibilityInfo({
22837
23802
  defaultExpanded = false,
22838
23803
  showAnimation = false
22839
23804
  }) {
23805
+ const { t } = useQuestLocale();
22840
23806
  const [expanded, setExpanded] = useState(defaultExpanded);
22841
23807
  const status = useMemo(() => {
22842
23808
  return campaignEligible || null;
@@ -22873,13 +23839,16 @@ function EligibilityInfo({
22873
23839
  },
22874
23840
  children: [
22875
23841
  renderStatusIcon(),
22876
- /* @__PURE__ */ jsxs("div", { className: "taskon-quest-eligs-header-text", children: [
22877
- "Meet",
22878
- " ",
22879
- /* @__PURE__ */ jsx("span", { className: "taskon-quest-eligs-header-express", children: express === "and" ? "ALL" : "ANY" }),
22880
- " ",
22881
- "Requirement Below"
22882
- ] }),
23842
+ /* @__PURE__ */ jsx("div", { className: "taskon-quest-eligs-header-text", children: /* @__PURE__ */ jsx(
23843
+ I18nT,
23844
+ {
23845
+ t,
23846
+ i18nKey: "before_join_please_meet_express_following_eligibilities",
23847
+ components: {
23848
+ express: /* @__PURE__ */ jsx("span", { className: "taskon-quest-eligs-header-express", children: express === "and" ? t("all") : t("any") })
23849
+ }
23850
+ }
23851
+ ) }),
22883
23852
  showRefresh && /* @__PURE__ */ jsx(RefreshButton, { loading: isRefreshing, onClick: onRefresh }),
22884
23853
  /* @__PURE__ */ jsx(ArrowIcon, { expanded })
22885
23854
  ]
@@ -22903,14 +23872,17 @@ export {
22903
23872
  BlindBoxDialog as B,
22904
23873
  ConfirmNoticeDialog as C,
22905
23874
  EligibilityInfo as E,
23875
+ I18nT as I,
22906
23876
  RewardModuleDialog as R,
22907
23877
  TitleExpress as T,
22908
- CardDescExpress as a,
22909
- useNftClaimFlow as b,
22910
- TaskItem as c,
22911
- Textarea as d,
22912
- EligibilityList as e,
22913
- getDefaultExportFromCjs as g,
23878
+ useBindWallet as a,
23879
+ CardDescExpress as b,
23880
+ useNftClaimFlow as c,
23881
+ TaskItem as d,
23882
+ Textarea as e,
23883
+ useTaskWidgetLocale as f,
23884
+ EligibilityList as g,
23885
+ getDefaultExportFromCjs as h,
22914
23886
  sanitizeHtml as s,
22915
- useBindWallet as u
23887
+ useQuestLocale as u
22916
23888
  };