UNPKG

@edgex-web/components

Version:

EdgeX Universal UI Components Library - Reusable React components for deposit, withdraw and other common UI patterns

1,236 lines (1,234 loc) 685 kB
var gm = Object.defineProperty; var bm = (e, t, n) => t in e ? gm(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n; var Lr = (e, t, n) => bm(e, typeof t != "symbol" ? t + "" : t, n); import * as U from "react"; import Z, { createContext as ke, useContext as Se, useMemo as ee, useCallback as J, forwardRef as tc, createElement as as, useRef as ie, useEffect as Pe, useState as se, useLayoutEffect as Ps, Fragment as qe, isValidElement as ym, cloneElement as vm, useId as Zn, useReducer as wm, useSyncExternalStore as xm, useImperativeHandle as $f } from "react"; import * as Kr from "react-dom"; import Af, { createPortal as Tf, flushSync as Wr } from "react-dom"; function Em(e) { return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e; } var Gi = { exports: {} }, Mr = {}; /** * @license React * react-jsx-runtime.production.min.js * * Copyright (c) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ var Ol; function Sm() { if (Ol) return Mr; Ol = 1; var e = Z, t = Symbol.for("react.element"), n = Symbol.for("react.fragment"), r = Object.prototype.hasOwnProperty, o = e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, s = { key: !0, ref: !0, __self: !0, __source: !0 }; function i(c, a, l) { var u, d = {}, p = null, f = null; l !== void 0 && (p = "" + l), a.key !== void 0 && (p = "" + a.key), a.ref !== void 0 && (f = a.ref); for (u in a) r.call(a, u) && !s.hasOwnProperty(u) && (d[u] = a[u]); if (c && c.defaultProps) for (u in a = c.defaultProps, a) d[u] === void 0 && (d[u] = a[u]); return { $$typeof: t, type: c, key: p, ref: f, props: d, _owner: o.current }; } return Mr.Fragment = n, Mr.jsx = i, Mr.jsxs = i, Mr; } var kr = {}; /** * @license React * react-jsx-runtime.development.js * * Copyright (c) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ var Nl; function Pm() { return Nl || (Nl = 1, process.env.NODE_ENV !== "production" && function() { var e = Z, t = Symbol.for("react.element"), n = Symbol.for("react.portal"), r = Symbol.for("react.fragment"), o = Symbol.for("react.strict_mode"), s = Symbol.for("react.profiler"), i = Symbol.for("react.provider"), c = Symbol.for("react.context"), a = Symbol.for("react.forward_ref"), l = Symbol.for("react.suspense"), u = Symbol.for("react.suspense_list"), d = Symbol.for("react.memo"), p = Symbol.for("react.lazy"), f = Symbol.for("react.offscreen"), h = Symbol.iterator, m = "@@iterator"; function w(M) { if (M === null || typeof M != "object") return null; var q = h && M[h] || M[m]; return typeof q == "function" ? q : null; } var A = e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED; function y(M) { { for (var q = arguments.length, X = new Array(q > 1 ? q - 1 : 0), re = 1; re < q; re++) X[re - 1] = arguments[re]; $("error", M, X); } } function $(M, q, X) { { var re = A.ReactDebugCurrentFrame, he = re.getStackAddendum(); he !== "" && (q += "%s", X = X.concat([he])); var me = X.map(function(fe) { return String(fe); }); me.unshift("Warning: " + q), Function.prototype.apply.call(console[M], console, me); } } var B = !1, L = !1, j = !1, F = !1, g = !1, v; v = Symbol.for("react.module.reference"); function P(M) { return !!(typeof M == "string" || typeof M == "function" || M === r || M === s || g || M === o || M === l || M === u || F || M === f || B || L || j || typeof M == "object" && M !== null && (M.$$typeof === p || M.$$typeof === d || M.$$typeof === i || M.$$typeof === c || M.$$typeof === a || // This needs to include all possible module reference object // types supported by any Flight configuration anywhere since // we don't know which Flight build this will end up being used // with. M.$$typeof === v || M.getModuleId !== void 0)); } function N(M, q, X) { var re = M.displayName; if (re) return re; var he = q.displayName || q.name || ""; return he !== "" ? X + "(" + he + ")" : X; } function R(M) { return M.displayName || "Context"; } function S(M) { if (M == null) return null; if (typeof M.tag == "number" && y("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."), typeof M == "function") return M.displayName || M.name || null; if (typeof M == "string") return M; switch (M) { case r: return "Fragment"; case n: return "Portal"; case s: return "Profiler"; case o: return "StrictMode"; case l: return "Suspense"; case u: return "SuspenseList"; } if (typeof M == "object") switch (M.$$typeof) { case c: var q = M; return R(q) + ".Consumer"; case i: var X = M; return R(X._context) + ".Provider"; case a: return N(M, M.render, "ForwardRef"); case d: var re = M.displayName || null; return re !== null ? re : S(M.type) || "Memo"; case p: { var he = M, me = he._payload, fe = he._init; try { return S(fe(me)); } catch { return null; } } } return null; } var E = Object.assign, x = 0, T, O, b, C, k, D, _; function z() { } z.__reactDisabledLog = !0; function K() { { if (x === 0) { T = console.log, O = console.info, b = console.warn, C = console.error, k = console.group, D = console.groupCollapsed, _ = console.groupEnd; var M = { configurable: !0, enumerable: !0, value: z, writable: !0 }; Object.defineProperties(console, { info: M, log: M, warn: M, error: M, group: M, groupCollapsed: M, groupEnd: M }); } x++; } } function V() { { if (x--, x === 0) { var M = { configurable: !0, enumerable: !0, writable: !0 }; Object.defineProperties(console, { log: E({}, M, { value: T }), info: E({}, M, { value: O }), warn: E({}, M, { value: b }), error: E({}, M, { value: C }), group: E({}, M, { value: k }), groupCollapsed: E({}, M, { value: D }), groupEnd: E({}, M, { value: _ }) }); } x < 0 && y("disabledDepth fell below zero. This is a bug in React. Please file an issue."); } } var H = A.ReactCurrentDispatcher, W; function Y(M, q, X) { { if (W === void 0) try { throw Error(); } catch (he) { var re = he.stack.trim().match(/\n( *(at )?)/); W = re && re[1] || ""; } return ` ` + W + M; } } var Q = !1, ae; { var ge = typeof WeakMap == "function" ? WeakMap : Map; ae = new ge(); } function Re(M, q) { if (!M || Q) return ""; { var X = ae.get(M); if (X !== void 0) return X; } var re; Q = !0; var he = Error.prepareStackTrace; Error.prepareStackTrace = void 0; var me; me = H.current, H.current = null, K(); try { if (q) { var fe = function() { throw Error(); }; if (Object.defineProperty(fe.prototype, "props", { set: function() { throw Error(); } }), typeof Reflect == "object" && Reflect.construct) { try { Reflect.construct(fe, []); } catch (He) { re = He; } Reflect.construct(M, [], fe); } else { try { fe.call(); } catch (He) { re = He; } M.call(fe.prototype); } } else { try { throw Error(); } catch (He) { re = He; } M(); } } catch (He) { if (He && re && typeof He.stack == "string") { for (var le = He.stack.split(` `), De = re.stack.split(` `), Te = le.length - 1, Oe = De.length - 1; Te >= 1 && Oe >= 0 && le[Te] !== De[Oe]; ) Oe--; for (; Te >= 1 && Oe >= 0; Te--, Oe--) if (le[Te] !== De[Oe]) { if (Te !== 1 || Oe !== 1) do if (Te--, Oe--, Oe < 0 || le[Te] !== De[Oe]) { var nt = ` ` + le[Te].replace(" at new ", " at "); return M.displayName && nt.includes("<anonymous>") && (nt = nt.replace("<anonymous>", M.displayName)), typeof M == "function" && ae.set(M, nt), nt; } while (Te >= 1 && Oe >= 0); break; } } } finally { Q = !1, H.current = me, V(), Error.prepareStackTrace = he; } var er = M ? M.displayName || M.name : "", Rn = er ? Y(er) : ""; return typeof M == "function" && ae.set(M, Rn), Rn; } function be(M, q, X) { return Re(M, !1); } function ye(M) { var q = M.prototype; return !!(q && q.isReactComponent); } function pe(M, q, X) { if (M == null) return ""; if (typeof M == "function") return Re(M, ye(M)); if (typeof M == "string") return Y(M); switch (M) { case l: return Y("Suspense"); case u: return Y("SuspenseList"); } if (typeof M == "object") switch (M.$$typeof) { case a: return be(M.render); case d: return pe(M.type, q, X); case p: { var re = M, he = re._payload, me = re._init; try { return pe(me(he), q, X); } catch { } } } return ""; } var hn = Object.prototype.hasOwnProperty, Gt = {}, gl = A.ReactDebugCurrentFrame; function jo(M) { if (M) { var q = M._owner, X = pe(M.type, M._source, q ? q.type : null); gl.setExtraStackFrame(X); } else gl.setExtraStackFrame(null); } function Z0(M, q, X, re, he) { { var me = Function.call.bind(hn); for (var fe in M) if (me(M, fe)) { var le = void 0; try { if (typeof M[fe] != "function") { var De = Error((re || "React class") + ": " + X + " type `" + fe + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof M[fe] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`."); throw De.name = "Invariant Violation", De; } le = M[fe](q, fe, re, X, null, "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"); } catch (Te) { le = Te; } le && !(le instanceof Error) && (jo(he), y("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).", re || "React class", X, fe, typeof le), jo(null)), le instanceof Error && !(le.message in Gt) && (Gt[le.message] = !0, jo(he), y("Failed %s type: %s", X, le.message), jo(null)); } } } var K0 = Array.isArray; function ni(M) { return K0(M); } function Y0(M) { { var q = typeof Symbol == "function" && Symbol.toStringTag, X = q && M[Symbol.toStringTag] || M.constructor.name || "Object"; return X; } } function X0(M) { try { return bl(M), !1; } catch { return !0; } } function bl(M) { return "" + M; } function yl(M) { if (X0(M)) return y("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.", Y0(M)), bl(M); } var vl = A.ReactCurrentOwner, Q0 = { key: !0, ref: !0, __self: !0, __source: !0 }, wl, xl; function J0(M) { if (hn.call(M, "ref")) { var q = Object.getOwnPropertyDescriptor(M, "ref").get; if (q && q.isReactWarning) return !1; } return M.ref !== void 0; } function em(M) { if (hn.call(M, "key")) { var q = Object.getOwnPropertyDescriptor(M, "key").get; if (q && q.isReactWarning) return !1; } return M.key !== void 0; } function tm(M, q) { typeof M.ref == "string" && vl.current; } function nm(M, q) { { var X = function() { wl || (wl = !0, y("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", q)); }; X.isReactWarning = !0, Object.defineProperty(M, "key", { get: X, configurable: !0 }); } } function rm(M, q) { { var X = function() { xl || (xl = !0, y("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", q)); }; X.isReactWarning = !0, Object.defineProperty(M, "ref", { get: X, configurable: !0 }); } } var om = function(M, q, X, re, he, me, fe) { var le = { // This tag allows us to uniquely identify this as a React Element $$typeof: t, // Built-in properties that belong on the element type: M, key: q, ref: X, props: fe, // Record the component responsible for creating this element. _owner: me }; return le._store = {}, Object.defineProperty(le._store, "validated", { configurable: !1, enumerable: !1, writable: !0, value: !1 }), Object.defineProperty(le, "_self", { configurable: !1, enumerable: !1, writable: !1, value: re }), Object.defineProperty(le, "_source", { configurable: !1, enumerable: !1, writable: !1, value: he }), Object.freeze && (Object.freeze(le.props), Object.freeze(le)), le; }; function sm(M, q, X, re, he) { { var me, fe = {}, le = null, De = null; X !== void 0 && (yl(X), le = "" + X), em(q) && (yl(q.key), le = "" + q.key), J0(q) && (De = q.ref, tm(q, he)); for (me in q) hn.call(q, me) && !Q0.hasOwnProperty(me) && (fe[me] = q[me]); if (M && M.defaultProps) { var Te = M.defaultProps; for (me in Te) fe[me] === void 0 && (fe[me] = Te[me]); } if (le || De) { var Oe = typeof M == "function" ? M.displayName || M.name || "Unknown" : M; le && nm(fe, Oe), De && rm(fe, Oe); } return om(M, le, De, he, re, vl.current, fe); } } var ri = A.ReactCurrentOwner, El = A.ReactDebugCurrentFrame; function Jn(M) { if (M) { var q = M._owner, X = pe(M.type, M._source, q ? q.type : null); El.setExtraStackFrame(X); } else El.setExtraStackFrame(null); } var oi; oi = !1; function si(M) { return typeof M == "object" && M !== null && M.$$typeof === t; } function Sl() { { if (ri.current) { var M = S(ri.current.type); if (M) return ` Check the render method of \`` + M + "`."; } return ""; } } function im(M) { return ""; } var Pl = {}; function am(M) { { var q = Sl(); if (!q) { var X = typeof M == "string" ? M : M.displayName || M.name; X && (q = ` Check the top-level render call using <` + X + ">."); } return q; } } function $l(M, q) { { if (!M._store || M._store.validated || M.key != null) return; M._store.validated = !0; var X = am(q); if (Pl[X]) return; Pl[X] = !0; var re = ""; M && M._owner && M._owner !== ri.current && (re = " It was passed a child from " + S(M._owner.type) + "."), Jn(M), y('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.', X, re), Jn(null); } } function Al(M, q) { { if (typeof M != "object") return; if (ni(M)) for (var X = 0; X < M.length; X++) { var re = M[X]; si(re) && $l(re, q); } else if (si(M)) M._store && (M._store.validated = !0); else if (M) { var he = w(M); if (typeof he == "function" && he !== M.entries) for (var me = he.call(M), fe; !(fe = me.next()).done; ) si(fe.value) && $l(fe.value, q); } } } function cm(M) { { var q = M.type; if (q == null || typeof q == "string") return; var X; if (typeof q == "function") X = q.propTypes; else if (typeof q == "object" && (q.$$typeof === a || // Note: Memo only checks outer props here. // Inner props are checked in the reconciler. q.$$typeof === d)) X = q.propTypes; else return; if (X) { var re = S(q); Z0(X, M.props, "prop", re, M); } else if (q.PropTypes !== void 0 && !oi) { oi = !0; var he = S(q); y("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?", he || "Unknown"); } typeof q.getDefaultProps == "function" && !q.getDefaultProps.isReactClassApproved && y("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead."); } } function lm(M) { { for (var q = Object.keys(M.props), X = 0; X < q.length; X++) { var re = q[X]; if (re !== "children" && re !== "key") { Jn(M), y("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.", re), Jn(null); break; } } M.ref !== null && (Jn(M), y("Invalid attribute `ref` supplied to `React.Fragment`."), Jn(null)); } } var Tl = {}; function Rl(M, q, X, re, he, me) { { var fe = P(M); if (!fe) { var le = ""; (M === void 0 || typeof M == "object" && M !== null && Object.keys(M).length === 0) && (le += " You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports."); var De = im(); De ? le += De : le += Sl(); var Te; M === null ? Te = "null" : ni(M) ? Te = "array" : M !== void 0 && M.$$typeof === t ? (Te = "<" + (S(M.type) || "Unknown") + " />", le = " Did you accidentally export a JSX literal instead of a component?") : Te = typeof M, y("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", Te, le); } var Oe = sm(M, q, X, he, me); if (Oe == null) return Oe; if (fe) { var nt = q.children; if (nt !== void 0) if (re) if (ni(nt)) { for (var er = 0; er < nt.length; er++) Al(nt[er], M); Object.freeze && Object.freeze(nt); } else y("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead."); else Al(nt, M); } if (hn.call(q, "key")) { var Rn = S(M), He = Object.keys(q).filter(function(mm) { return mm !== "key"; }), ii = He.length > 0 ? "{key: someKey, " + He.join(": ..., ") + ": ...}" : "{key: someKey}"; if (!Tl[Rn + ii]) { var hm = He.length > 0 ? "{" + He.join(": ..., ") + ": ...}" : "{}"; y(`A props object containing a "key" prop is being spread into JSX: let props = %s; <%s {...props} /> React keys must be passed directly to JSX without using spread: let props = %s; <%s key={someKey} {...props} />`, ii, Rn, hm, Rn), Tl[Rn + ii] = !0; } } return M === r ? lm(Oe) : cm(Oe), Oe; } } function um(M, q, X) { return Rl(M, q, X, !0); } function fm(M, q, X) { return Rl(M, q, X, !1); } var dm = fm, pm = um; kr.Fragment = r, kr.jsx = dm, kr.jsxs = pm; }()), kr; } process.env.NODE_ENV === "production" ? Gi.exports = Sm() : Gi.exports = Pm(); var I = Gi.exports; const $m = { // 充值相关 deposit: { title: "充值", chain: "链", asset: "资产", amount: "数量", available: "可用", equity: "总资产", confirmDeposit: "充值确认", switchNetwork: "切换网络", max: "最大", arrivalTime: "到账时间", minDeposit: "最小充值金额", minDepositParsed: "最少充值 {{amount}} {{token}}", maxDeposit: "最大充值金额", depositTipFor25w: "单笔充值金额上限为 200,000。若充值金额大于200,000,请使用Ethereum链充值。", depositAllTip: `仅支持发送 {{coin}} ({{v}}) 资产到此地址。 充值金额大于 200,000 时,到账时间存在一定延迟,请耐心等待。`, enableSystemProWithToken: "在{{network}}上启用{{token}}", enableTokenDesc: "您首次在{{network}}上存款时必须启用{{token}}。", enableWithToken: "启用 {{token}}", arrivaltimeTooltip1: "资金约在 {{v}} 分钟 内 (达到 {{v1}} 个区块确认后) 到账。", arrivaltimeTooltip2: "预计时间是根据历史数据计算所得,仅供参考。网络拥堵可能会导致实际到账时间变长。", arrivalEstimated: "≈ {{v}}分钟", availableDesc: "您可以充值的最大金额。当可用为0或负数时,无法进行充值。", noPrivateKeyWalletWarning: "请勿使用无私钥钱包进行充值,无私钥钱包充值会导致资金损失且无法追回。", layerZeroDepositTip: "系统会根据充值资金实际情况,将您的充值通过LayerZero完成。", layerZeroDepositTipExceedPool: "由于充值资金大于资金池,将通过LayerZero完成您的充值。", layerZeroDepositTipGte200k: "由于充值资金大于等于200,000 USDT,将通过LayerZero完成您的充值。", layerZeroDepositButton: "使用LayerZero充值" }, withdraw: { noticeDesc: "普通提现是一个两步过程。 此步骤将发起您的提现请求,并将在 Layer2 进行处理。 一旦资金准备就绪(可能需要最多 4 小时),您将收到一条将资金提现到钱包的通知。受链同步等情况影响下,时长可能到 48 小时。您需要自行承担交易 gas 费用。", crossChainTips: "跨链提币需在 L2(通过零知识证明)进行验证。提币过程最多约需2小时。相关链的资产池中需有充足的资金来处理跨链提币,其间还将产生矿工费。 edgeX 将收取一定的手续费作为矿工费。", commonWithdraw: "提现说明", withdraw: "提现", speed: "速度", confirmWithdraw: "提现确认", speedNote: "处理时间:", speedNoteSpeed1: "用时约8分钟", speedNoteSpeed2: "用时约 2-4 小时", speedNoteSpeed3: "用时约4小时", receiverAddress: "接收地址", fee: "手续费", feeRate: "费率", withdrawlAmount: "提现金额", amountToReceive: "到账金额", invalidReceiverAddress: "接收地址不能为空", availableDesc: "您可以提现的最大金额。当可用为0或负数时,无法进行提现。", feeCalculationTip: "提现手续费按照提现金额乘以费率计算,最低为1 USDT/USDC。费率会根据链上实际情况进行调整。", crossChainPoolBalance: "跨链资金池余额", poolBalance: "资金池余额", poolBalanceInsufficientTip: "提现金额大于资金池余额,无法进行提现。请选择资金池余额充足的选项。" }, account: { title: "账户", perpetual: "合约账户", spot: "现货账户" } }, Am = { // Deposit related deposit: { title: "Deposit", chain: "Chain", asset: "Asset", amount: "Amount", available: "Available", equity: "Equity", confirmDeposit: "Confirm Deposit", switchNetwork: "Switch Network", max: "Max", arrivalTime: "Arrival Time", minDeposit: "Minimum Deposit Amount", minDepositParsed: "Min. Deposit {{amount}} {{token}}", maxDeposit: "Maximum Deposit Amount", depositTipFor25w: "The maximum amount per deposit is 200,000. If your deposit exceeds 200,000, please use the Ethereum chain.", depositAllTip: `Only {{coin}} ({{v}}) is supported for deposits to this address. If the deposit amount exceeds 200,000, there may be a delay in the arrival time. Please be patient.`, enableSystemProWithToken: "Enable {{token}} on {{network}}", enableTokenDesc: "You must enable {{token}} the first time you deposit on {{network}}.", enableWithToken: "Enable {{token}}", arrivaltimeTooltip1: "The funds will arrive in approximately {{v}} minutes (after reaching {{v1}} block confirmations).", arrivaltimeTooltip2: "Estimated time is calculated based on historical data and is for reference only. Network congestion may result in longer actual arrival times.", arrivalEstimated: "≈ {{v}} minutes", availableDesc: "The maximum amount you can deposit. When the available balance is 0 or negative, deposits cannot be made.", noPrivateKeyWalletWarning: "Do not use keyless wallets to make deposits. Depositing with a keyless wallet may result in irreversible loss of funds.", layerZeroDepositTip: "The system will complete your deposit via LayerZero based on the actual deposit conditions.", layerZeroDepositTipExceedPool: "Since the deposit amount exceeds the pool, your deposit will be completed via LayerZero.", layerZeroDepositTipGte200k: "Since the deposit amount is greater than or equal to 200,000 USDT, your deposit will be completed via LayerZero.", layerZeroDepositButton: "Deposit with LayerZero" }, withdraw: { noticeDesc: "Normal withdrawals are a two-step process. The current step initiates your withdrawal request and will be processed on Layer 2. Once your funds are ready (can take up to 4 hours), you will receive a notification to withdraw funds to your wallet. Due to chain synchronization and other factors, the duration may take up to 48 hours. You are responsible for any transaction gas fees.", crossChainTips: "Cross-chain withdrawals require verification at L2 (via ZK proofs) and the withdrawal process may take up to 2 hours. Sufficient funds in the corresponding chain's asset pool are required to process cross-chain withdrawals. Gas fees will also be incurred. edgeX will charge a fee to cover this.", commonWithdraw: "Withdrawal FAQ", withdraw: "Withdraw", speed: "Speed", confirmWithdraw: "Confirm Withdrawal", speedNote: "Processing Times:", speedNoteSpeed1: "Approx. 8 Minutes", speedNoteSpeed2: "Approx. 2-4 Hours", speedNoteSpeed3: "Approx. 4 Hours", receiverAddress: "Receiver Address", fee: "Fee", feeRate: "Fee Rate", withdrawlAmount: "Withdrawal amount", amountToReceive: "Amount to Receive", invalidReceiverAddress: "Address cannot be empty", availableDesc: "The maximum amount you can withdraw. When the available balance is 0 or negative, withdrawals cannot be made.", feeCalculationTip: "Withdrawal fees are calculated by multiplying the withdrawal amount by the fee rate, with a minimum of 1 USDT/USDC. The fee rate may be adjusted based on actual on-chain conditions.", crossChainPoolBalance: "Cross-chain pool balance", poolBalance: "Pool balance", poolBalanceInsufficientTip: "The withdrawal amount exceeds the fund pool balance, and the withdrawal cannot be processed. Please select an option with a sufficient fund pool balance." }, account: { title: "Account", perpetual: "Perpetual Account", spot: "Spot Account" } }, Tm = { // 入金関連 deposit: { title: "入金", chain: "チェーン", asset: "資産", amount: "数量", available: "利用可能", equity: "総資産", confirmDeposit: "入金確認", switchNetwork: "ネットワークを切り替え", max: "最大", arrivalTime: "着金予定時間", minDeposit: "最低入金額", minDepositParsed: "最低入金額 {{amount}} {{token}}", maxDeposit: "最大入金額", depositTipFor25w: "1回の入金上限額は200,000です。200,000を超える場合は、Ethereumチェーンでの入金をご利用ください。", depositAllTip: `このアドレスは{{coin}}({{v}})専用です。他通貨は送金しないでください。 入金金額が 200,000 を超える場合、反映までに時間がかかることがあります。しばらくお待ちください。`, enableSystemProWithToken: "{{network}} 上で {{token}} を有効化", enableTokenDesc: "初めて {{network}} に入金する際は、{{token}} の有効化が必要です。", enableWithToken: "{{token}} を有効化", arrivaltimeTooltip1: "資金は約 {{v}} 分以内({{v1}} 回のブロック確認が完了後)に到账します。", arrivaltimeTooltip2: "着金時間は過去データに基づいた目安であり、ネットワーク状況により遅延する場合があります。", arrivalEstimated: "≈ {{v}}分", availableDesc: "入金可能な最大金額。利用可能残高が0または負の数の場合、入金はできません。", noPrivateKeyWalletWarning: "秘密鍵のないウォレットでの入金は行わないでください。そのような入金は資金を失い、取り戻すことができません。", layerZeroDepositTip: "システムは入金資金の実際の状況に基づき、LayerZeroを通じて入金を完了します。", layerZeroDepositTipExceedPool: "入金額がプールを超えているため、LayerZero を通じて入金が完了します。", layerZeroDepositTipGte200k: "入金額が 200,000 USDT 以上のため、LayerZero を通じて入金が完了します。", layerZeroDepositButton: "LayerZeroで入金" }, withdraw: { noticeDesc: "通常出金は2ステップで行われます。このステップで出金リクエストを送信し、Layer2で処理されます。資金の準備が完了すると(最大4時間かかる場合があります)、出金の通知が届きます。チェーンの同期などの影響により、所要時間は最長で48時間かかる場合があります。ガス代はユーザー負担です。", crossChainTips: "クロスチェーン出金はL2上(ゼロ知識証明経由)で検証が必要です。出金処理には最大2時間ほどかかる場合があります。対応するチェーンの資産プールに十分な流動性が必要であり、ガス代も発生します。edgeXはそのコストを補うため、一定の手数料を徴収します。", commonWithdraw: "出金ガイド", withdraw: "出金", speed: "出金時間", confirmWithdraw: "出金確認", speedNote: "処理時間:", speedNoteSpeed1: "約8分", speedNoteSpeed2: "約2~4時間", speedNoteSpeed3: "約4時間", receiverAddress: "受取アドレス", fee: "手数料", feeRate: "手数料率", withdrawlAmount: "出金額", amountToReceive: "受け取り金額", invalidReceiverAddress: "ウォレットアドレスは必須です", availableDesc: "引き出し可能な最大金額。利用可能残高が0または負の数の場合、引き出しはできません。", feeCalculationTip: "出金手数料は、出金金額に料率を乗じて計算され、最低1 USDT/USDCとなります。料率は、ブロックチェーンの実際の状況に基づいて調整される場合があります。", crossChainPoolBalance: "クロスチェーンプール残高", poolBalance: "プール残高", poolBalanceInsufficientTip: "出金額が資金プールの残高を上回っているため、出金は処理できません。資金プールの残高が十分にあるオプションを選択してください。" }, account: { title: "アカウント", perpetual: "パーペチュアルアカウント", spot: "スポットアカウント" } }, Rm = { // Депозит deposit: { title: "Депозит", chain: "Сеть", asset: "Актив", amount: "Сумма", available: "Доступно", equity: "Капитал", confirmDeposit: "Подтвердить депозит", switchNetwork: "Сменить сеть", max: "Максимум", arrivalTime: "Время поступления", minDeposit: "Минимальная сумма депозита", minDepositParsed: "Мин. депозит {{amount}} {{token}}", maxDeposit: "Максимальная сумма депозита", depositTipFor25w: "Максимальная сумма одного пополнения — 200 000. Если сумма превышает 200 000, пожалуйста, используйте сеть Ethereum для пополнения.", depositAllTip: `На этот адрес можно внести только {{coin}} ({{v}}). Если сумма депозита превышает 200 000, время поступления может быть увеличено. Пожалуйста, ожидайте.`, enableSystemProWithToken: "Включить {{token}} в сети {{network}}", enableTokenDesc: "При первом депозите в сети {{network}} необходимо включить {{token}}.", enableWithToken: "Включить {{token}}", arrivaltimeTooltip1: "Средства поступят в течение примерно {{v}} минут (после достижения {{v1}} подтверждений блоков).", arrivaltimeTooltip2: "Оценка времени основана на истории и дана только для справки. Задержки сети могут увеличить фактическое время поступления.", arrivalEstimated: "≈ {{v}} минут", availableDesc: "Максимальная сумма, которую вы можете пополнить. Если доступный баланс равен 0 или отрицательный, пополнение невозможно.", noPrivateKeyWalletWarning: "Не используйте кошельки без приватных ключей для пополнения. Пополнение с такого кошелька может привести к безвозвратной потере средств.", layerZeroDepositTip: "Система завершит ваше пополнение через LayerZero в зависимости от фактических условий депозита.", layerZeroDepositTipExceedPool: "Поскольку сумма пополнения превышает пул, ваше пополнение будет выполнено через LayerZero.", layerZeroDepositTipGte200k: "Поскольку сумма пополнения больше либо равна 200,000 USDT, ваше пополнение будет выполнено через LayerZero.", layerZeroDepositButton: "Пополнение через LayerZero" }, withdraw: { noticeDesc: "Вывод средств происходит в два этапа: сначала подаётся заявка на вывод (обрабатывается на Layer 2), затем - перевод на кошелёк после подготовки средств (до 14 часов). Из-за синхронизации цепочки и других факторов процесс может занять до 48 часов. За gas-комиссии отвечает пользователь.", crossChainTips: "• Кроссчейн выводы требуют проверки на L2 (через ZK доказательства) и могут занять до 2 часов. Для вывода нужны средства в пуле соответствующей цепи. Также взимается комиссия за газ. edgeX взимает плату за обслуживание.", commonWithdraw: "Часто задаваемые вопросы по выводу", withdraw: "Вывод", speed: "Скорость", confirmWithdraw: "Подтвердить вывод", speedNote: "Время обработки:", speedNoteSpeed1: "Прибл. 8 минут", speedNoteSpeed2: "Прибл. 2-4 часа", speedNoteSpeed3: "Прибл. 4 часа", receiverAddress: "Адрес получателя", fee: "Комиссия", feeRate: "Тариф", withdrawlAmount: "Сумма вывода", amountToReceive: "Сумма к получению", invalidReceiverAddress: "Укажите адрес кошелька", availableDesc: "Максимальная сумма, которую вы можете вывести. Если доступный баланс равен 0 или отрицательный, вывод средств невозможен.", feeCalculationTip: "Комиссия за вывод средств рассчитывается путем умножения суммы вывода на ставку комиссии, минимальная комиссия составляет 1 USDT/USDC. Ставка комиссии может быть скорректирована в зависимости от фактической ситуации в сети блокчейн.", crossChainPoolBalance: "Баланс кросс-чейн пула", poolBalance: "Баланс пула", poolBalanceInsufficientTip: "Сумма вывода превышает баланс пула средств, и операция не может быть выполнена. Пожалуйста, выберите опцию с достаточным балансом пула средств." }, account: { title: "Аккаунт", perpetual: "Перпетуальный счет", spot: "Спотовый счет" } }, Om = { // 充值相關 deposit: { title: "充值", chain: "鏈", asset: "資產", amount: "數量", available: "可用", equity: "總資產", confirmDeposit: "充值確認", switchNetwork: "切換網絡", max: "最大", arrivalTime: "到帳時間", minDeposit: "最小儲值金額", minDepositParsed: "最少充值 {{amount}} {{token}}", maxDeposit: "最大儲值金額", depositTipFor25w: "單筆充值金額上限為 200,000。若充值金額大於 200,000,請使用 Ethereum 鏈充值。", depositAllTip: `僅支援發送 {{coin}} ({{v}}) 資產到此位址。 充值金額大於 200,000 時,到账時間可能會有延遲,請耐心等待。`, enableSystemProWithToken: "在{{network}}上啓用{{token}}", enableTokenDesc: "您首次在{{network}}上存款時必須啓用{{token}}。", enableWithToken: "啓用 {{token}}", arrivaltimeTooltip1: "資金約在 {{v}} 分鐘內(達到 {{v1}} 個區塊確認後)到賬。", arrivaltimeTooltip2: "預計時間是根據歷史資料計算所得,僅供參考。網路壅塞可能會導致實際到帳時間變長。", arrivalEstimated: "≈ {{v}}分鐘", availableDesc: "您可以充值的最大金額。當可用餘額為0或負數時,無法進行充值。", noPrivateKeyWalletWarning: "請勿使用無私鑰錢包進行充值,無私鑰錢包充值會導致資金損失且無法追回。", layerZeroDepositTip: "系統會根據充值資金的實際情況,通過 LayerZero 完成您的充值。", layerZeroDepositTipExceedPool: "由於充值資金大於資金池,將透過 LayerZero 完成您的充值。", layerZeroDepositTipGte200k: "由於充值資金大於等於 200,000 USDT,將透過 LayerZero 完成您的充值。", layerZeroDepositButton: "使用LayerZero充值" }, withdraw: { noticeDesc: "普通提現是一個兩步過程。此步驟將發起您的提現請求,並將在 Layer2 進行處理。一旦資金準備就緒(可能需要最多 4 小時),您將收到一條將資金提現到錢包的通知。受鏈同步等情況影響下,時長可能需要長達 48 小時。您需要自行承擔交易 gas 費用。", crossChainTips: "跨鏈提幣需在 L2(通過零知識證明)進行驗證。提幣過程最多約需2小時。相關鏈的資產池中需有充足的資金來處理跨鏈提幣,其間還將產生礦工費。 edgeX 將收取一定的手續費作爲礦工費。", commonWithdraw: "提現說明", withdraw: "提現", speed: "速度", confirmWithdraw: "提現確認", speedNote: "處理時間:", speedNoteSpeed1: "用時約8分鐘", speedNoteSpeed2: "用時約 2-4 小時", speedNoteSpeed3: "用時約4小時", receiverAddress: "接收地址", fee: "手續費", feeRate: "費率", withdrawlAmount: "提現金額", amountToReceive: "到账金額", invalidReceiverAddress: "接收地址不能為空", availableDesc: "您可以提現的最大金額。當可用餘額為0或負數時,無法進行提現。", feeCalculationTip: "提現手續費按照提現金額乘以費率計算,最低為 1 USDT/USDC。費率會根據鏈上實際情況進行調整。", crossChainPoolBalance: "跨鏈資金池餘額", poolBalance: "資金池餘額", poolBalanceInsufficientTip: "提現金額大於資金池餘額,無法進行提現。請選擇資金池餘額充足的選項。" }, account: { title: "帳戶", perpetual: "合約帳戶", spot: "現貨帳戶" } }, Rf = [ "en-US", "ja-JP", "ru-RU", "zh-CN", "zh-TW" ], Il = { "en-US": Am, "ja-JP": Tm, "ru-RU": Rm, "zh-CN": $m, "zh-TW": Om }, qi = "en-US", e$ = { "en-US": "English", "zh-CN": "简体中文", "zh-TW": "繁體中文", "ja-JP": "日本語", "ru-RU": "Русский" }, Nm = (e) => Rf.includes(e) ? Il[e] : Il[qi], Im = (e) => Rf.includes(e), Of = ke(null), t$ = ({ config: e, children: t }) => { const n = ee(() => { const r = e.locale || qi, o = Im(r) ? r : qi, s = Nm(o); return { ...e, currentLocale: o, translations: s }; }, [e]); return /* @__PURE__ */ I.jsx(Of.Provider, { value: n, children: t }); }, Cm = () => { const e = Se(Of); if (!e) throw new Error("useComponentConfig must be used within ComponentProvider"); return e; }; var Bm = /^-?(?:\d+(?:\.\d*)?|\.\d+)(?:e[+-]?\d+)?$/i, ai = Math.ceil, it = Math.floor, We = "[BigNumber Error] ", Cl = We + "Number primitive has more than 15 significant digits: ", bt = 1e14, oe = 14, ci = 9007199254740991, li = [1, 10, 100, 1e3, 1e4, 1e5, 1e6, 1e7, 1e8, 1e9, 1e10, 1e11, 1e12, 1e13], mn = 1e7, Ie = 1e9; function Nf(e) { var t, n, r, o = y.prototype = { constructor: y, toString: null, valueOf: null }, s = new y(1), i = 20, c = 4, a = -7, l = 21, u = -1e7, d = 1e7, p = !1, f = 1, h = 0, m = { prefix: "", groupSize: 3, secondaryGroupSize: 0, groupSeparator: ",", decimalSeparator: ".", fractionGroupSize: 0, fractionGroupSeparator: " ", // non-breaking space suffix: "" }, w = "0123456789abcdefghijklmnopqrstuvwxyz", A = !0; function y(g, v) { var P, N, R, S, E, x, T, O, b = this; if (!(b instanceof y)) return new y(g, v); if (v == null) { if (g && g._isBigNumber === !0) { b.s = g.s, !g.c || g.e > d ? b.c = b.e = null : g.e < u ? b.c = [b.e = 0] : (b.e = g.e, b.c = g.c.slice()); return; } if ((x = typeof g == "number") && g * 0 == 0) { if (b.s = 1 / g < 0 ? (g = -g, -1) : 1, g === ~~g) { for (S = 0, E = g; E >= 10; E /= 10, S++) ; S > d ? b.c = b.e = null : (b.e = S, b.c = [g]); return; } O = String(g); } else { if (!Bm.test(O = String(g))) return r(b, O, x); b.s = O.charCodeAt(0) == 45 ? (O = O.slice(1), -1) : 1; } (S = O.indexOf(".")) > -1 && (O = O.replace(".", "")), (E = O.search(/e/i)) > 0 ? (S < 0 && (S = E), S += +O.slice(E + 1), O = O.substring(0, E)) : S < 0 && (S = O.length); } else { if (xe(v, 2, w.length, "Base"), v == 10 && A) return b = new y(g), j(b, i + b.e + 1, c); if (O = String(g), x = typeof g == "number") { if (g * 0 != 0) return r(b, O, x, v); if (b.s = 1 / g < 0 ? (O = O.slice(1), -1) : 1, y.DEBUG && O.replace(/^0\.0*|\./, "").length > 15) throw Error(Cl + g); } else b.s = O.charCodeAt(0) === 45 ? (O = O.slice(1), -1) : 1; for (P = w.slice(0, v), S = E = 0, T = O.length; E < T; E++) if (P.indexOf(N = O.charAt(E)) < 0) { if (N == ".") { if (E > S) { S = T; continue; } } else if (!R && (O == O.toUpperCase() && (O = O.toLowerCase()) || O == O.toLowerCase() && (O = O.toUpperCase()))) { R = !0, E = -1, S = 0; continue; } return r(b, String(g), x, v); } x = !1, O = n(O, v, 10, b.s), (S = O.indexOf(".")) > -1 ? O = O.replace(".", "") : S = O.length; } for (E = 0; O.charCodeAt(E) === 48; E++) ; for (T = O.length; O.charCodeAt(--T) === 48; ) ; if (O = O.slice(E, ++T)) { if (T -= E, x && y.DEBUG && T > 15 && (g > ci || g !== it(g))) throw Error(Cl + b.s * g); if ((S = S - E - 1) > d) b.c = b.e = null; else if (S < u) b.c = [b.e = 0]; else { if (b.e = S, b.c = [], E = (S + 1) % oe, S < 0 && (E += oe), E < T) { for (E && b.c.push(+O.slice(0, E)), T -= oe; E < T; ) b.c.push(+O.slice(E, E += oe)); E = oe - (O = O.slice(E)).length; } else E -= T; for (; E--; O += "0") ; b.c.push(+O); } } else b.c = [b.e = 0]; } y.clone = Nf, y.ROUND_UP = 0, y.ROUND_DOWN = 1, y.ROUND_CEIL = 2, y.ROUND_FLOOR = 3, y.ROUND_HALF_UP = 4, y.ROUND_HALF_DOWN = 5, y.ROUND_HALF_EVEN = 6, y.ROUND_HALF_CEIL = 7, y.ROUND_HALF_FLOOR = 8, y.EUCLID = 9, y.config = y.set = function(g) { var v, P; if (g != null) if (typeof g == "object") { if (g.hasOwnProperty(v = "DECIMAL_PLACES") && (P = g[v], xe(P, 0, Ie, v), i = P), g.hasOwnProperty(v = "ROUNDING_MODE") && (P = g[v], xe(P, 0, 8, v), c = P), g.hasOwnProperty(v = "EXPONENTIAL_AT") && (P = g[v], P && P.pop ? (xe(P[0], -Ie, 0, v), xe(P[1], 0, Ie, v), a = P[0], l = P[1]) : (xe(P, -Ie, Ie, v), a = -(l = P < 0 ? -P : P))), g.hasOwnProperty(v = "RANGE")) if (P = g[v], P && P.pop) xe(P[0], -Ie, -1, v), xe(P[1], 1, Ie, v), u = P[0], d = P[1]; else if (xe(P, -Ie, Ie, v), P) u = -(d = P < 0 ? -P : P); else throw Error(We + v + " cannot be zero: " + P); if (g.hasOwnProperty(v = "CRYPTO")) if (P = g[v], P === !!P) if (P) if (typeof crypto < "u" && crypto && (crypto.getRandomValues || crypto.randomBytes)) p = P; else throw p = !P, Error(We + "crypto unavailable"); else p = P; else throw Error(We + v + " not true or false: " + P); if (g.hasOwnProperty(v = "MODULO_MODE") && (P = g[v], xe(P, 0, 9, v), f = P), g.hasOwnProperty(v = "POW_PRECISION") && (P = g[v], xe(P, 0, Ie, v), h = P), g.hasOwnProperty(v = "FORMAT")) if (P = g[v], typeof P == "object") m = P; else throw Error(We + v + " not an object: " + P); if (g.hasOwnProperty(v = "ALPHABET")) if (P = g[v], typeof P == "string" && !/^.?$|[+\-.\s]|(.).*\1/.test(P)) A = P.slice(0, 10) == "0123456789", w = P; else throw Error(We + v + " invalid: " + P); } else throw Error(We + "Object expected: " + g); return { DECIMAL_PLACES: i, ROUNDING_MODE: c, EXPONENTIAL_AT: [a, l], RANGE: [u, d], CRYPTO: p, MODULO_MODE: f, POW_PRECISION: h, FORMAT: m, ALPHABET: w }; }, y.isBigNumber = function(g) { if (!g || g._isBigNumber !== !0) return !1; if (!y.DEBUG) return !0; var v, P, N = g.c, R = g.e, S = g.s; e: if ({}.toString.call(N) == "[object Array]") { if ((S === 1 || S === -1) && R >= -Ie && R <= Ie && R === it(R)) { if (N[0] === 0) { if (R === 0 && N.length === 1) return !0; break e; } if (v = (R + 1) % oe, v < 1 && (v += oe), String(N[0]).length == v) { for (v = 0; v < N.length; v++) if (P = N[v], P < 0 || P >= bt || P !== it(P)) break e; if (P !== 0) return !0; } } } else if (N === null && R === null && (S === null || S === 1 || S === -1)) return !0; throw Error(We + "Invalid BigNumber: " + g); }, y.maximum = y.max = function() { return B(arguments, -1); }, y.minimum = y.min = function() { return B(arguments, 1); }, y.random = function() { var g = 9007199254740992, v = Math.random() * g & 2097151 ? function() { return it(Math.random() * g); } : function() { return (Math.random() * 1073741824 | 0) * 8388608 + (Math.random() * 8388608 | 0); }; return function(P) { var N, R, S, E, x, T = 0, O = [], b = new y(s); if (P == null ? P = i : xe(P, 0, Ie), E = ai(P / oe), p) if (crypto.getRandomValues) { for (N = crypto.getRandomValues(new Uint32Array(E *= 2)); T < E; ) x = N[T] * 131072 + (N[T + 1] >>> 11), x >= 9e15 ? (R = crypto.getRandomValues(new Uint32Array(2)), N[T] = R[0], N[T + 1] = R[1]) : (O.push(x % 1e14), T += 2); T = E / 2; } else if (crypto.randomBytes) { for (N = crypto.randomBytes(E *= 7); T < E; ) x = (N[T] & 31) * 281474976710656 + N[T + 1] * 1099511627776 + N[T + 2] * 4294967296 + N[T + 3] * 16777216 + (N[T + 4] << 16) + (N[T + 5] << 8) + N[T + 6], x >= 9e15 ? crypto.randomBytes(7).copy(N, T) : (O.push(x % 1e14), T += 7); T = E / 7; } else throw p = !1, Error(We + "crypto unavailable"); if (!p) for (; T < E; ) x = v(), x < 9e15 && (O[T++] = x % 1e14); for (E = O[--T], P %= oe, E && P && (x = li[oe - P], O[T] = it(E / x) * x); O[T] === 0; O.pop(), T--) ; if (T < 0) O = [S = 0]; else { for (S = -1; O[0] === 0; O.splice(0, 1), S -= oe) ; for (T = 1, x = O[0]; x >= 10; x /= 10, T++) ; T < oe && (S -= oe - T); } return b.e = S, b.c = O, b; }; }(), y.sum = function() { for (var g = 1, v = arguments, P = new y(v[0]); g < v.length; ) P = P.plus(v[g++]); return P; }, n = /* @__PURE__ */ function() { var g = "0123456789"; function v(P, N, R, S) { for (var E, x = [0], T, O = 0, b = P.length; O < b; ) { for (T = x.length; T--; x[T] *= N) ; for (x[0] += S.indexOf(P.charAt(O++)), E = 0; E < x.length; E++) x[E] > R - 1 && (x[E + 1] == null && (x[E + 1] = 0), x[E + 1] += x[E] / R | 0, x[E] %= R); } return x.reverse(); } return function(P, N, R, S, E) { var x, T, O, b, C, k, D, _, z = P.indexOf("."), K = i, V = c; for (z >= 0 && (b = h, h = 0, P = P.replace(".", ""), _ = new y(N), k = _.pow(P.length - z), h = b, _.c = v( qt(rt(k.c), k.e, "0"), 10, R, g ), _.e = _.c.length), D = v(P, N, R, E ? (x = w, g) : (x = g, w)), O = b = D.length; D[--b] == 0; D.pop()) ; if (!D[0]) return x.charAt(0); if (z < 0 ? --O : (k.c = D, k.e = O, k.s = S, k = t(k, _, K, V, R), D = k.c, C = k.r, O = k.e), T = O + K + 1, z = D[T], b = R / 2, C = C || T < 0 || D[T + 1] != null, C = V < 4 ? (z != null || C) && (V == 0 || V == (k.s < 0 ? 3 : 2)) : z > b || z == b && (V == 4 || C || V == 6 && D[T - 1] & 1 || V == (k.s < 0 ? 8 : 7)), T < 1 || !D[0]) P = C ? qt(x.charAt(1), -K, x.charAt(0)) : x.charAt(0); else { if (D.length = T, C) for (--R; ++D[--T] > R; ) D[T] = 0, T || (++O, D = [1].concat(D)); for (b = D.length; !D[--b]; ) ; for (z = 0, P = ""; z <= b; P += x.charAt(D[z++])) ; P = qt(P, O, x.charAt(0)); } return P; }; }(), t = /* @__PURE__ */ function() { function g(N, R, S) { var E, x, T, O, b = 0, C = N.length, k = R % mn, D = R / mn | 0; for (N = N.slice(); C--; ) T = N[C] % mn, O = N[C] / mn | 0, E = D * T + O * k, x = k * T + E % mn * mn + b, b = (x / S | 0) + (E / mn | 0) + D * O, N[C] = x % S; return b && (N = [b].concat(N)), N; } function v(N, R, S, E) { var x, T; if (S != E) T = S > E ? 1 : -1; else for (x = T = 0; x < S; x++) if (N[x] != R[x]) { T = N[x] > R[x] ? 1 : -1; break; } return T; } function P(N, R, S, E) { for (var x = 0; S--; ) N[S] -= x, x = N[S] < R[S] ? 1 : 0, N[S] = x * E + N[S] - R[S]; for (; !N[0] && N.length > 1; N.splice(0, 1)) ; } return function(N, R, S, E, x) { var T, O, b, C, k, D, _, z, K, V, H, W, Y, Q, ae, ge, Re, be = N.s == R.s ? 1 : -1, ye = N.c, pe = R.c; if (!ye || !ye[0] || !pe || !pe[0]) return new y( // Return NaN if either NaN, or both Infinity or 0. !N.s || !R.s || (ye ? pe && ye[0] == pe[0] : !pe) ? NaN : ( // Return ±0 if x is ±0 or y is ±Infinity, or return ±Infinity as y is ±0. ye && ye[0] == 0 || !pe ? be * 0 : be / 0 ) ); for (z = new y(be), K = z.c = [], O = N.e - R.e, be = S + O + 1, x || (x = bt, O = at(N.e / oe) - at(R.e / oe), be = be / oe | 0), b = 0; pe[b] == (ye[b] || 0); b++) ; if (pe[b] > (ye[b] || 0) && O--, be < 0) K.push(1), C = !0; else { for (Q = ye.length, ge = pe.length, b = 0, be += 2, k = it(x / (pe[0] + 1)), k > 1 && (pe = g(pe, k, x), ye = g(ye, k, x), ge = pe.length, Q = ye.length), Y = ge, V = ye.slice(0, ge), H = V.length; H < ge; V[H++] = 0) ; Re = pe.slice(), Re = [0].concat(Re), ae = pe[0], pe[1] >= x / 2 && ae++; do { if (k = 0, T = v(pe, V, ge, H), T < 0) { if (W = V[0], ge != H && (W = W * x + (V[1] || 0)), k = it(W / ae), k > 1) for (k >= x && (k = x - 1), D = g(pe, k, x), _ = D.length, H = V.length; v(D, V, _, H) == 1; ) k--, P(D, ge < _ ? Re : pe, _, x), _ = D.length, T = 1; else k == 0 && (T = k = 1), D = pe.slice(), _ = D.length; if (_ < H && (D = [0].concat(D)), P(V, D, H, x), H = V.length, T == -1) for (; v(pe, V, ge, H) < 1; ) k++, P(V, ge < H ? Re : pe, H, x), H = V.length; } else T === 0 && (k++, V = [0]); K